Changeset 44888 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Mar 1, 2013 3:42:23 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84056
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r44719 r44888 376 376 bool fISAEnabled; /**< @todo unused, to be removed */ 377 377 /** Flag whether 24-bit mailboxes are in use (default is 32-bit). */ 378 bool fMbxIs24Bit; /**< @todo save? */378 bool fMbxIs24Bit; 379 379 /** ISA I/O port base (encoded in FW-compatible format). */ 380 380 uint8_t uISABaseCode; … … 2161 2161 if ((uVal == BUSLOGICCOMMAND_EXECUTE_MAILBOX_COMMAND) && (pBusLogic->uOperationCode == 0xff)) 2162 2162 { 2163 ASMAtomicIncU32(&pBusLogic->cMailboxesReady); 2164 if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSend, true)) 2165 { 2166 /* Send new notification to the queue. */ 2167 PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pBusLogic->CTX_SUFF(pNotifierQueue)); 2168 AssertMsg(pItem, ("Allocating item for queue failed\n")); 2169 PDMQueueInsert(pBusLogic->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem); 2163 /* If there are no mailboxes configured, don't even try to do anything. */ 2164 if (pBusLogic->cMailbox) { 2165 ASMAtomicIncU32(&pBusLogic->cMailboxesReady); 2166 if (!ASMAtomicXchgBool(&pBusLogic->fNotificationSend, true)) 2167 { 2168 /* Send new notification to the queue. */ 2169 PPDMQUEUEITEMCORE pItem = PDMQueueAlloc(pBusLogic->CTX_SUFF(pNotifierQueue)); 2170 AssertMsg(pItem, ("Allocating item for queue failed\n")); 2171 PDMQueueInsert(pBusLogic->CTX_SUFF(pNotifierQueue), (PPDMQUEUEITEMCORE)pItem); 2172 } 2170 2173 } 2171 2174 -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r44528 r44888 258 258 } 259 259 260 static DECLCALLBACK(int) drvscsiEject(VSCSILUN hVScsiLun, void *pvScsiLunUser) 261 { 262 PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser; 263 int rc; 264 265 #if 0 266 /* This must be done from EMT. */ 267 PPDMDEVINS pDevIns = NULL; //ATADEVSTATE_2_DEVINS(s); 268 269 rc = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, 270 (PFNRT)pThis->pDrvMount->pfnUnmount, 3, 271 pThis->pDrvMount, false /*=fForce*/, true /*=fEject*/); 272 Assert(RT_SUCCESS(rc) || (rc == VERR_PDM_MEDIA_LOCKED) || (rc = VERR_PDM_MEDIA_NOT_MOUNTED)); 273 if (RT_SUCCESS(rc) && pThis->pMediaNotify) 274 { 275 rc = VMR3ReqCallNoWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY, 276 (PFNRT)pThis->pMediaNotify->pfnEjected, 2, 277 pThis->pMediaNotify, s->iLUN); 278 AssertRC(rc); 279 } 280 #endif 281 return VINF_SUCCESS; 282 } 283 260 284 static int drvscsiTransferCompleteNotify(PPDMIBLOCKASYNCPORT pInterface, void *pvUser, int rc) 261 285 { … … 974 998 pThis->VScsiIoCallbacks.pfnVScsiLunGetFeatureFlags = drvscsiGetFeatureFlags; 975 999 pThis->VScsiIoCallbacks.pfnVScsiLunMediumSetLock = drvscsiSetLock; 1000 pThis->VScsiIoCallbacks.pfnVScsiLunMediumEject = drvscsiEject; 976 1001 977 1002 rc = VSCSIDeviceCreate(&pThis->hVScsiDevice, drvscsiVScsiReqCompleted, pThis); -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
r44528 r44888 364 364 365 365 /** 366 * Wrapper for the getmedium lock/unlock I/O callback.366 * Wrapper for the medium lock/unlock I/O callback. 367 367 * 368 368 * @returns VBox status code. … … 378 378 379 379 /** 380 * Wrapper for the medium eject I/O callback. 381 * 382 * @returns VBox status code. 383 * @param pVScsiLun The LUN. 384 */ 385 DECLINLINE(int) vscsiLunMediumEject(PVSCSILUNINT pVScsiLun) 386 { 387 return pVScsiLun->pVScsiLunIoCallbacks->pfnVScsiLunMediumEject(pVScsiLun, 388 pVScsiLun->pvVScsiLunUser); 389 } 390 391 /** 380 392 * Wrapper for the I/O request enqueue I/O callback. 381 393 *
Note:
See TracChangeset
for help on using the changeset viewer.