Index: /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp	(revision 53340)
+++ /trunk/src/VBox/Devices/Storage/DevBusLogic.cpp	(revision 53341)
@@ -2238,5 +2238,6 @@
             {
                 /* If there are no mailboxes configured, don't even try to do anything. */
-                if (pBusLogic->cMailbox) {
+                if (pBusLogic->cMailbox)
+                {
                     ASMAtomicIncU32(&pBusLogic->cMailboxesReady);
                     if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSend, true))
Index: /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 53340)
+++ /trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp	(revision 53341)
@@ -194,5 +194,5 @@
     bool                 fDiagnosticEnabled;
     /** Flag whether a notification was send to R3. */
-    bool                 fNotificationSend;
+    bool                 fNotificationSent;
     /** Flag whether the guest enabled event notification from the IOC. */
     bool                 fEventNotificationEnabled;
@@ -1283,17 +1283,20 @@
             ASMAtomicWriteU32(&pThis->uRequestQueueNextEntryFreeWrite, uNextWrite);
 
-            /* Send notification to R3 if there is not one send already. */
-            if (!ASMAtomicXchgBool(&pThis->fNotificationSend, true))
+            /* Send notification to R3 if there is not one sent already. Do this
+             * only if the worker thread is not sleeping or might go sleeping. */
+            if (ASMAtomicReadBool(&pThis->fWrkThreadSleeping))
             {
+                if (!ASMAtomicXchgBool(&pThis->fNotificationSent, true))
+                {
 #ifdef IN_RC
-                PPDMQUEUEITEMCORE pNotificationItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue));
-                AssertPtr(pNotificationItem);
-
-                PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), pNotificationItem);
+                    PPDMQUEUEITEMCORE pNotificationItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue));
+                    AssertPtr(pNotificationItem);
+                    PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), pNotificationItem);
 #else
-                LogFlowFunc(("Signal event semaphore\n"));
-                int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
-                AssertRC(rc);
+                    LogFlowFunc(("Signal event semaphore\n"));
+                    int rc = SUPSemEventSignal(pThis->pSupDrvSession, pThis->hEvtProcess);
+                    AssertRC(rc);
 #endif
+                }
             }
             break;
@@ -4039,5 +4042,5 @@
     pHlp->pfnPrintf(pHlp, "enmDoorbellState=%d\n", pThis->enmDoorbellState);
     pHlp->pfnPrintf(pHlp, "fDiagnosticEnabled=%RTbool\n", pThis->fDiagnosticEnabled);
-    pHlp->pfnPrintf(pHlp, "fNotificationSend=%RTbool\n", pThis->fNotificationSend);
+    pHlp->pfnPrintf(pHlp, "fNotificationSent=%RTbool\n", pThis->fNotificationSent);
     pHlp->pfnPrintf(pHlp, "fEventNotificationEnabled=%RTbool\n", pThis->fEventNotificationEnabled);
     pHlp->pfnPrintf(pHlp, "uInterruptMask=%#x\n", pThis->uInterruptMask);
@@ -4164,9 +4167,7 @@
     while (pThread->enmState == PDMTHREADSTATE_RUNNING)
     {
-        bool fNotificationSend;
-
         ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, true);
-        fNotificationSend = ASMAtomicXchgBool(&pThis->fNotificationSend, false);
-        if (!fNotificationSend)
+        bool fNotificationSent = ASMAtomicXchgBool(&pThis->fNotificationSent, false);
+        if (!fNotificationSent)
         {
             Assert(ASMAtomicReadBool(&pThis->fWrkThreadSleeping));
@@ -4176,5 +4177,5 @@
                 break;
             LogFlowFunc(("Woken up with rc=%Rrc\n", rc));
-            fNotificationSend = ASMAtomicXchgBool(&pThis->fNotificationSend, false);
+            ASMAtomicWriteBool(&pThis->fNotificationSent, false);
         }
 
@@ -4299,5 +4300,5 @@
 static void lsilogicR3Kick(PLSILOGICSCSI pThis)
 {
-    if (pThis->fNotificationSend)
+    if (pThis->fNotificationSent)
     {
         /* Send a notifier to the PDM queue that there are pending requests. */
@@ -4360,5 +4361,5 @@
     SSMR3PutU32   (pSSM, pThis->enmDoorbellState);
     SSMR3PutBool  (pSSM, pThis->fDiagnosticEnabled);
-    SSMR3PutBool  (pSSM, pThis->fNotificationSend);
+    SSMR3PutBool  (pSSM, pThis->fNotificationSent);
     SSMR3PutBool  (pSSM, pThis->fEventNotificationEnabled);
     SSMR3PutU32   (pSSM, pThis->uInterruptMask);
@@ -4601,5 +4602,5 @@
         SSMR3GetU32(pSSM, (uint32_t *)&pThis->enmDoorbellState);
     SSMR3GetBool  (pSSM, &pThis->fDiagnosticEnabled);
-    SSMR3GetBool  (pSSM, &pThis->fNotificationSend);
+    SSMR3GetBool  (pSSM, &pThis->fNotificationSent);
     SSMR3GetBool  (pSSM, &pThis->fEventNotificationEnabled);
     SSMR3GetU32   (pSSM, (uint32_t *)&pThis->uInterruptMask);
@@ -4996,5 +4997,5 @@
         ASMAtomicWriteBool(&pThis->fSignalIdle, false);
 
-        AssertMsg(!pThis->fNotificationSend, ("The PDM Queue should be empty at this point\n"));
+        AssertMsg(!pThis->fNotificationSent, ("The PDM Queue should be empty at this point\n"));
 
         if (pThis->fRedo)
@@ -5023,5 +5024,5 @@
                     pThis->uRequestQueueNextEntryFreeWrite %= pThis->cRequestQueueEntries;
 
-                    pThis->fNotificationSend = true;
+                    pThis->fNotificationSent = true;
                 }
                 else
