VirtualBox

Changeset 27660 in vbox for trunk/src


Ignore:
Timestamp:
Mar 24, 2010 11:01:01 AM (15 years ago)
Author:
vboxsync
Message:

BusLogic: Update the sense data only for a CHECK_CONDITION return code

File:
1 edited

Legend:

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

    r27302 r27660  
    12081208 * @returns nothing.
    12091209 * @param   pTaskState   Pointer to the task state.
    1210  */
    1211 static void buslogicSenseBufferFree(PBUSLOGICTASKSTATE pTaskState)
     1210 * @param   fCopy        If sense data should be copied to guest memory.
     1211 */
     1212static void buslogicSenseBufferFree(PBUSLOGICTASKSTATE pTaskState, bool fCopy)
    12121213{
    12131214    PPDMDEVINS pDevIns = pTaskState->CTX_SUFF(pTargetDevice)->CTX_SUFF(pBusLogic)->CTX_SUFF(pDevIns);
     
    12161217
    12171218    /* Copy into guest memory. */
    1218     PDMDevHlpPhysWrite(pDevIns, GCPhysAddrSenseBuffer, pTaskState->pbSenseBuffer, cbSenseBuffer);
     1219    if (fCopy)
     1220        PDMDevHlpPhysWrite(pDevIns, GCPhysAddrSenseBuffer, pTaskState->pbSenseBuffer, cbSenseBuffer);
    12191221
    12201222    RTMemFree(pTaskState->pbSenseBuffer);
     
    19781980
    19791981        if (pTaskState->pbSenseBuffer)
    1980             buslogicSenseBufferFree(pTaskState);
     1982            buslogicSenseBufferFree(pTaskState, (rcCompletion != SCSI_STATUS_OK));
    19811983
    19821984        buslogicSendIncomingMailbox(pBusLogic, pTaskState,
     
    20692071
    20702072            if (pTaskState->pbSenseBuffer)
    2071                 buslogicSenseBufferFree(pTaskState);
     2073                buslogicSenseBufferFree(pTaskState, true);
    20722074
    20732075            buslogicSendIncomingMailbox(pBusLogic, pTaskState,
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