VirtualBox

Changeset 25900 in vbox


Ignore:
Timestamp:
Jan 18, 2010 3:39:35 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56712
Message:

Same goes for the write handler and the duplicate ATAController code.

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/ATAController.cpp

    r25732 r25900  
    46934693        cTransAvailable = (s->iIOBufferPIODataEnd - s->iIOBufferPIODataStart) / cb;
    46944694#ifndef IN_RING3
     4695        /* Deal with the unlikely case where no data (or not enough for the read length operation) is available; go back to ring 3. */
     4696        if (!cTransAvailable)
     4697        {
     4698            PDMCritSectLeave(&pCtl->lock);
     4699            return VINF_IOM_HC_IOPORT_READ;
     4700        }
    46954701        /* The last transfer unit cannot be handled in GC, as it involves thread communication. */
    46964702        cTransAvailable--;
     
    47394745        cTransAvailable = (s->iIOBufferPIODataEnd - s->iIOBufferPIODataStart) / cb;
    47404746#ifndef IN_RING3
     4747        /* Deal with the unlikely case where no data (or not enough for the read length operation) is available; go back to ring 3. */
     4748        if (!cTransAvailable)
     4749        {
     4750            PDMCritSectLeave(&pCtl->lock);
     4751            return VINF_IOM_HC_IOPORT_WRITE;
     4752        }
    47414753        /* The last transfer unit cannot be handled in GC, as it involves thread communication. */
    47424754        cTransAvailable--;
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r25897 r25900  
    53945394            return VINF_IOM_HC_IOPORT_READ;
    53955395        }
    5396 
    53975396        /* The last transfer unit cannot be handled in GC, as it involves thread communication. */
    53985397        cTransAvailable--;
     
    54475446        cTransAvailable = (s->iIOBufferPIODataEnd - s->iIOBufferPIODataStart) / cb;
    54485447#ifndef IN_RING3
     5448        /* Deal with the unlikely case where no data (or not enough for the read length operation) is available; go back to ring 3. */
     5449        if (!cTransAvailable)
     5450        {
     5451            PDMCritSectLeave(&pCtl->lock);
     5452            return VINF_IOM_HC_IOPORT_WRITE;
     5453        }
    54495454        /* The last transfer unit cannot be handled in GC, as it involves thread communication. */
    54505455        cTransAvailable--;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette