VirtualBox

Changeset 35792 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jan 31, 2011 3:40:27 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69764
Message:

ATAController: Brought over device reset fix.

File:
1 edited

Legend:

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

    r35595 r35792  
    42604260
    42614261            case AHCIATA_AIO_ABORT:
    4262                 /* Abort the current command only if it operates on the same interface. */
    4263                 if (pCtl->iAIOIf == pReq->u.a.iIf)
     4262                /* Abort the current command no matter what. There cannot be
     4263                 * any command activity on the other drive otherwise using
     4264                 * one thread per controller wouldn't work at all. */
     4265                s = &pCtl->aIfs[pReq->u.a.iIf];
     4266
     4267                pCtl->uAsyncIOState = AHCIATA_AIO_NEW;
     4268                /* Do not change the DMA registers, they are not affected by the
     4269                 * ATA controller reset logic. It should be sufficient to issue a
     4270                 * new command, which is now possible as the state is cleared. */
     4271                if (pReq->u.a.fResetDrive)
    42644272                {
    4265                     s = &pCtl->aIfs[pCtl->iAIOIf];
    4266 
    4267                     pCtl->uAsyncIOState = AHCIATA_AIO_NEW;
    4268                     /* Do not change the DMA registers, they are not affected by the
    4269                      * ATA controller reset logic. It should be sufficient to issue a
    4270                      * new command, which is now possible as the state is cleared. */
    4271                     if (pReq->u.a.fResetDrive)
    4272                     {
    4273                         ataResetDevice(s);
    4274                         ataExecuteDeviceDiagnosticSS(s);
    4275                     }
    4276                     else
    4277                     {
    4278                         ataPIOTransferStop(s);
    4279                         ataUnsetStatus(s, ATA_STAT_BUSY | ATA_STAT_DRQ | ATA_STAT_SEEK | ATA_STAT_ERR);
    4280                         ataSetStatus(s, ATA_STAT_READY);
    4281                         ataSetIRQ(s);
    4282                     }
     4273                    ataResetDevice(s);
     4274                    ataExecuteDeviceDiagnosticSS(s);
     4275                }
     4276                else
     4277                {
     4278                    ataPIOTransferStop(s);
     4279                    ataUnsetStatus(s, ATA_STAT_BUSY | ATA_STAT_DRQ | ATA_STAT_SEEK | ATA_STAT_ERR);
     4280                    ataSetStatus(s, ATA_STAT_READY);
     4281                    ataSetIRQ(s);
    42834282                }
    42844283                break;
Note: See TracChangeset for help on using the changeset viewer.

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