VirtualBox

Changeset 38328 in vbox for trunk


Ignore:
Timestamp:
Aug 5, 2011 3:16:49 PM (13 years ago)
Author:
vboxsync
Message:

AHCI: Fixes for CD/DVD hotplugging

File:
1 edited

Legend:

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

    r37887 r38328  
    10431043    pAhciPort->regCI &= ~uCIValue;
    10441044
    1045     if (   (pAhciPort->regCMD & AHCI_PORT_CMD_ST)
     1045    if (   (pAhciPort->regCMD & AHCI_PORT_CMD_CR)
    10461046        && u32Value > 0)
    10471047    {
     
    13121312            ahciLog(("%s: Engine starts\n", __FUNCTION__));
    13131313
    1314             /** Set engine state to running. */
    1315             u32Value |= AHCI_PORT_CMD_CR;
     1314            /* Set engine state to running if there is a device attached. */
     1315            if (pAhciPort->pDrvBase)
     1316                u32Value |= AHCI_PORT_CMD_CR;
    13161317        }
    13171318        else
     
    13201321            /* Clear command issue register. */
    13211322            pAhciPort->regCI = 0;
    1322             /** Clear current command slot. */
     1323            /* Clear current command slot. */
    13231324            pAhciPort->u32CurrentCommandSlot = 0;
    13241325            u32Value &= ~AHCI_PORT_CMD_CR;
     
    80618062         */
    80628063        pAhciPort->regSSTS = 0;
    8063         ASMAtomicAndU32(&pAhciPort->regCMD, ~AHCI_PORT_CMD_CPS);
     8064        /*
     8065         * Clear CR bit too to prevent submission of new commands when CI is written
     8066         * (AHCI Spec 1.2: 7.4 Interaction of the Command List and Port Change Status).
     8067         */
     8068        ASMAtomicAndU32(&pAhciPort->regCMD, ~(AHCI_PORT_CMD_CPS | AHCI_PORT_CMD_CR));
    80648069        ASMAtomicOrU32(&pAhciPort->regIS, AHCI_PORT_IS_CPDS | AHCI_PORT_IS_PRCS);
    80658070        ASMAtomicOrU32(&pAhciPort->regSERR, AHCI_PORT_SERR_N);
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