Changeset 60015 in vbox
- Timestamp:
- Mar 14, 2016 9:37:22 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r59252 r60015 341 341 /** Flag whether the worker thread is sleeping. */ 342 342 volatile bool fWrkThreadSleeping; 343 /** Flag whether a request from the BIOS is pending which the 344 * worker thread needs to process. */ 345 volatile bool fBiosReqPending; 346 #if HC_ARCH_BITS == 64 343 347 /** Alignment padding. */ 344 bool afPadding2[HC_ARCH_BITS == 32 ? 1 : 5]; 348 bool afPadding2[4]; 349 #endif 345 350 /** List of tasks which can be redone. */ 346 351 R3PTRTYPE(volatile PLSILOGICREQ) pTasksRedoHead; … … 2143 2148 lsilogicR3WarningISCSI(pThis->CTX_SUFF(pDevIns)); 2144 2149 } 2145 else 2150 else if (rc != VERR_VD_DEK_MISSING) 2146 2151 lsilogicR3WarningUnknown(pThis->CTX_SUFF(pDevIns), rc); 2147 2152 } … … 3836 3841 Assert(cb == 1); 3837 3842 3843 /* 3844 * If there is already a request form the BIOS pending ignore this write 3845 * because it should not happen. 3846 */ 3847 if (ASMAtomicReadBool(&pThis->fBiosReqPending)) 3848 return VINF_SUCCESS; 3849 3838 3850 uint8_t iRegister = pThis->enmCtrlType == LSILOGICCTRLTYPE_SCSI_SPI 3839 3851 ? Port - LSILOGIC_BIOS_IO_PORT … … 3842 3854 if (rc == VERR_MORE_DATA) 3843 3855 { 3844 rc = lsilogicR3PrepareBiosScsiRequest(pThis); 3845 AssertRC(rc); 3856 ASMAtomicXchgBool(&pThis->fBiosReqPending, true); 3857 /* Send a notifier to the PDM queue that there are pending requests. */ 3858 PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pThis->CTX_SUFF(pNotificationQueue)); 3859 AssertMsg(pItem, ("Allocating item for queue failed\n")); 3860 PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), (PPDMQUEUEITEMCORE)pItem); 3846 3861 } 3847 3862 else if (RT_FAILURE(rc)) … … 4183 4198 4184 4199 ASMAtomicWriteBool(&pThis->fWrkThreadSleeping, false); 4200 4201 /* Check whether there is a BIOS request pending and process it first. */ 4202 if (ASMAtomicReadBool(&pThis->fBiosReqPending)) 4203 { 4204 rc = lsilogicR3PrepareBiosScsiRequest(pThis); 4205 AssertRC(rc); 4206 ASMAtomicXchgBool(&pThis->fBiosReqPending, false); 4207 } 4185 4208 4186 4209 /* Only process request which arrived before we received the notification. */ … … 4302 4325 static void lsilogicR3Kick(PLSILOGICSCSI pThis) 4303 4326 { 4327 if ( pThis->VBoxSCSI.fBusy 4328 && !pThis->fBiosReqPending) 4329 pThis->fBiosReqPending = true; 4330 4304 4331 if (pThis->fNotificationSent) 4305 4332 { … … 4309 4336 PDMQueueInsert(pThis->CTX_SUFF(pNotificationQueue), (PPDMQUEUEITEMCORE)pItem); 4310 4337 } 4311 else if (pThis->VBoxSCSI.fBusy)4312 {4313 /* The BIOS had a request active when we got suspended. Resume it. */4314 int rc = lsilogicR3PrepareBiosScsiRequest(pThis);4315 AssertRC(rc);4316 }4317 4318 4338 } 4319 4339 … … 4997 5017 pThis->uRequestQueueNextEntryFreeWrite++; 4998 5018 pThis->uRequestQueueNextEntryFreeWrite %= pThis->cRequestQueueEntries; 4999 5000 pThis->fNotificationSent = true;5001 5019 } 5002 5020 else … … 5006 5024 } 5007 5025 5026 pThis->fNotificationSent = true; 5027 5008 5028 pFree = pLsiReq; 5009 5029 pLsiReq = pLsiReq->pRedoNext; … … 5227 5247 pThis->hTaskCache = NIL_RTMEMCACHE; 5228 5248 pThis->hEvtProcess = NIL_SUPSEMEVENT; 5249 pThis->fBiosReqPending = false; 5229 5250 RTListInit(&pThis->ListMemRegns); 5230 5251
Note:
See TracChangeset
for help on using the changeset viewer.