VirtualBox

Ignore:
Timestamp:
Oct 7, 2010 3:14:54 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66493
Message:

LsiLogic: Suspend the VM on a recoverable error without changing the saved state format

File:
1 edited

Legend:

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

    r28800 r32983  
    271271    if (pVBoxSCSI->uTxDir == VBOXSCSI_TXDIR_FROM_DEVICE)
    272272    {
    273         Assert(!pVBoxSCSI->pBuf);
     273        if (pVBoxSCSI->pBuf)
     274            RTMemFree(pVBoxSCSI->pBuf);
     275
    274276        pVBoxSCSI->pBuf = (uint8_t *)RTMemAllocZ(pVBoxSCSI->cbBuf);
    275277        if (!pVBoxSCSI->pBuf)
     
    277279    }
    278280
    279     /** Allocate scatter gather element. */
     281    /* Allocate scatter gather element. */
    280282    pScsiRequest->paScatterGatherHead = (PRTSGSEG)RTMemAllocZ(sizeof(RTSGSEG) * 1); /* Only one element. */
    281283    if (!pScsiRequest->paScatterGatherHead)
     
    286288    }
    287289
    288     /** Allocate sense buffer. */
     290    /* Allocate sense buffer. */
    289291    pScsiRequest->cbSenseBuffer = 18;
    290292    pScsiRequest->pbSenseBuffer = (uint8_t *)RTMemAllocZ(pScsiRequest->cbSenseBuffer);
     
    385387}
    386388
     389void vboxscsiSetRequestRedo(PVBOXSCSI pVBoxSCSI, PPDMSCSIREQUEST pScsiRequest)
     390{
     391    AssertMsg(pVBoxSCSI->fBusy, ("No request to redo\n"));
     392
     393    RTMemFree(pScsiRequest->paScatterGatherHead);
     394    RTMemFree(pScsiRequest->pbSenseBuffer);
     395
     396    if (pVBoxSCSI->uTxDir == VBOXSCSI_TXDIR_FROM_DEVICE)
     397    {
     398        AssertPtr(pVBoxSCSI->pBuf);
     399    }
     400}
     401
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