VirtualBox

Ignore:
Timestamp:
Mar 17, 2015 5:12:44 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99016
Message:

DevATA: Allow 1-byte data reads.

File:
1 edited

Legend:

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

    r53409 r54817  
    59015901    {
    59025902        /* Reads from the data register may be 16-bit or 32-bit. */
    5903         Assert(cb == 2 || cb == 4);
    5904         rc = ataDataRead(pCtl, Port, cb, (uint8_t *)pu32);
    5905         if (cb == 2)
    5906             *pu32 &= 0xffff;
     5903        Assert(cb == 1 || cb == 2 || cb == 4);
     5904        rc = ataDataRead(pCtl, Port, cb == 1 ? 2 : cb, (uint8_t *)pu32);
     5905        if (cb <= 2)
     5906            *pu32 &= 0xffff >> (16 - cb * 8);
    59075907    }
    59085908    else
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