VirtualBox

Changeset 81997 in vbox


Ignore:
Timestamp:
Nov 19, 2019 3:57:09 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134797
Message:

DevATA: Changed register state at the end of read/write operations for improved compatibility with old ATA devices (see bugref:5869).

File:
1 edited

Legend:

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

    r81870 r81997  
    18471847    if (RT_SUCCESS(rc))
    18481848    {
    1849         ataR3SetSector(s, iLBA + cSectors);
     1849        /* When READ SECTORS etc. finishes, the address in the task
     1850         * file register points at the last sector read, not at the next
     1851         * sector that would be read. This ensures the registers always
     1852         * contain a valid sector address.
     1853         */
    18501854        if (s->cbElementaryTransfer == s->cbTotalTransfer)
     1855        {
    18511856            s->iSourceSink = ATAFN_SS_NULL;
     1857            ataR3SetSector(s, iLBA + cSectors - 1);
     1858        }
     1859        else
     1860            ataR3SetSector(s, iLBA + cSectors);
     1861        s->uATARegNSector -= cSectors;
    18521862        ataR3CmdOK(pCtl, s, ATA_STAT_SEEK);
    18531863    }
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