VirtualBox

Changeset 47787 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Aug 16, 2013 9:00:01 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88048
Message:

DevATA: Avoid truncating passthrough ATAPI transfers larger than I/O buffer size.

File:
1 edited

Legend:

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

    r47785 r47787  
    19341934    PSTAMPROFILEADV pProf = NULL;
    19351935
    1936     cbTransfer = RT_MIN(s->cbElementaryTransfer, s->cbIOBuffer);
     1936    cbTransfer = RT_MIN(s->cbTotalTransfer, s->cbIOBuffer);
    19371937
    19381938    if (s->uTxDir == PDMBLOCKTXDIR_TO_DEVICE)
     
    21622162            /*
    21632163             * Reply with the same amount of data as the real drive
    2164              * but only if the command wasn't splitted.
     2164             * but only if the command wasn't split.
    21652165             */
     2166#if 0   //@todo: This destroys commands where cbTotalTransfer > cbIOBuffer
    21662167            if (s->cbElementaryTransfer < s->cbIOBuffer)
    21672168                s->cbTotalTransfer = cbTransfer;
     2169#endif
    21682170
    21692171            if (   s->aATAPICmd[0] == SCSI_INQUIRY
     
    36923694            /*
    36933695             * Send a command to the drive, passing data in/out as required.
    3694              * Commands which exceed the I/O buffer size are splitted below
     3696             * Commands which exceed the I/O buffer size are split below
    36953697             * or aborted if splitting is not implemented.
    36963698             */
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