VirtualBox

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


Ignore:
Timestamp:
Oct 19, 2013 6:07:58 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90072
Message:

Storage/AHCI: Fix detection of CD/DVD media when switching from an empty to a host drive

File:
1 edited

Legend:

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

    r49173 r49195  
    38273827 * Sets the given media track type.
    38283828 */
    3829 static uint32_t ataMediumTypeSet(PAHCIPort pAhciPort, uint32_t MediaTrackType)
     3829static uint32_t ahciMediumTypeSet(PAHCIPort pAhciPort, uint32_t MediaTrackType)
    38303830{
    38313831    return ASMAtomicXchgU32(&pAhciPort->MediaTrackType, MediaTrackType);
     
    72427242            pAhciPort->cNotifiedMediaChange = 2;
    72437243        ahciMediumInserted(pAhciPort);
    7244         ataMediumTypeSet(pAhciPort, ATA_MEDIA_TYPE_UNKNOWN);
     7244        ahciMediumTypeSet(pAhciPort, ATA_MEDIA_TYPE_UNKNOWN);
    72457245    }
    72467246    else
     
    72697269        pAhciPort->cNotifiedMediaChange = 4;
    72707270        ahciMediumRemoved(pAhciPort);
    7271         ataMediumTypeSet(pAhciPort, ATA_MEDIA_TYPE_UNKNOWN);
     7271        ahciMediumTypeSet(pAhciPort, ATA_MEDIA_TYPE_UNKNOWN);
    72727272    }
    72737273    else
     
    76747674    rc = PDMDevHlpDriverAttach(pDevIns, pAhciPort->iLUN, &pAhciPort->IBase, &pAhciPort->pDrvBase, NULL);
    76757675    if (RT_SUCCESS(rc))
     7676    {
    76767677        rc = ahciR3ConfigureLUN(pDevIns, pAhciPort);
     7678
     7679        /*
     7680         * In case there is a medium inserted.
     7681         */
     7682        ahciMediumInserted(pAhciPort);
     7683        ahciMediumTypeSet(pAhciPort, ATA_MEDIA_TYPE_UNKNOWN);
     7684    }
    76777685    else
    76787686        AssertMsgFailed(("Failed to attach LUN#%d. rc=%Rrc\n", pAhciPort->iLUN, rc));
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