Index: /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 24103)
+++ /trunk/src/VBox/Devices/Storage/DrvSCSI.cpp	(revision 24104)
@@ -803,11 +803,11 @@
 
 /**
- * @copydoc FNPDMDRVRESET
- */
-static DECLCALLBACK(void) drvscsiReset(PPDMDRVINS pDrvIns)
-{
-    PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
-    int rc;
-
+ * Worker for drvscsiReset, drvscsiSuspend and drvscsiPowerOff.
+ *
+ * @param   pThis               The instance data.
+ * @param   pszEvent            The notification event (for logging).
+ */
+static void drvscsiWaitForPendingRequests(PDRVSCSI pThis, const char *pszEvent)
+{
     /*
      * Try make sure any pending I/O has completed now.
@@ -817,5 +817,5 @@
         if (!drvscsiAsyncIOLoopNoPendingDummy(pThis, 20000 /*ms*/))
         {
-            LogRel(("drvscsiReset#%u: previous dummy request is still pending\n", pDrvIns->iInstance));
+            LogRel(("drvscsi%s#%u: previous dummy request is still pending\n", pszEvent, pThis->pDrvIns->iInstance));
             return;
         }
@@ -824,5 +824,5 @@
         {
             PRTREQ pReq;
-            rc = RTReqCall(pThis->pQueueRequests, &pReq, 20000 /*ms*/, (PFNRT)drvscsiAsyncIOLoopSyncCallback, 0);
+            int rc = RTReqCall(pThis->pQueueRequests, &pReq, 20000 /*ms*/, (PFNRT)drvscsiAsyncIOLoopSyncCallback, 0);
             if (RT_SUCCESS(rc))
                 RTReqFree(pReq);
@@ -830,5 +830,5 @@
             {
                 pThis->pPendingDummyReq = pReq;
-                LogRel(("drvscsiReset#%u: %Rrc pReq=%p\n", pDrvIns->iInstance, rc, pReq));
+                LogRel(("drvscsi%s#%u: %Rrc pReq=%p\n", pszEvent, pThis->pDrvIns->iInstance, rc, pReq));
             }
         }
@@ -847,4 +847,31 @@
  *        wee bit...
  */
+}
+
+/**
+ * @copydoc FNPDMDRVPOWEROFF
+ */
+static DECLCALLBACK(void) drvscsiPowerOff(PPDMDRVINS pDrvIns)
+{
+    PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
+    drvscsiWaitForPendingRequests(pThis, "PowerOff");
+}
+
+/**
+ * @copydoc FNPDMDRVSUSPEND
+ */
+static DECLCALLBACK(void) drvscsiSuspend(PPDMDRVINS pDrvIns)
+{
+    PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
+    drvscsiWaitForPendingRequests(pThis, "Suspend");
+}
+
+/**
+ * @copydoc FNPDMDRVRESET
+ */
+static DECLCALLBACK(void) drvscsiReset(PPDMDRVINS pDrvIns)
+{
+    PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI);
+    drvscsiWaitForPendingRequests(pThis, "Reset");
 }
 
@@ -990,5 +1017,5 @@
     drvscsiReset,
     /* pfnSuspend */
-    NULL,
+    drvscsiSuspend,
     /* pfnResume */
     NULL,
@@ -998,5 +1025,5 @@
     NULL,
     /* pfnPowerOff */
-    NULL,
+    drvscsiPowerOff,
     /* pfnSoftReset */
     NULL,
