DrvSCSI.cpp revision 9de47c4ec7b0fc9a384e4b815153de399da7b8de
1N/A * available from http://www.virtualbox.org. This file is free software;
bool volatile fDummySignal;
unsigned cErrors;
bool fNonRotational;
#define PDMISCSICONNECTOR_2_DRVSCSI(pInterface) ( (PDRVSCSI)((uintptr_t)pInterface - RT_OFFSETOF(DRVSCSI, ISCSIConnector)) )
#define PDMIBLOCKASYNCPORT_2_DRVSCSI(pInterface) ( (PDRVSCSI)((uintptr_t)pInterface - RT_OFFSETOF(DRVSCSI, IPortAsync)) )
#define PDMIBLOCKPORT_2_DRVSCSI(pInterface) ( (PDRVSCSI)((uintptr_t)pInterface - RT_OFFSETOF(DRVSCSI, IPort)) )
switch (enmTxDir)
case VSCSIIOREQTXDIR_FLUSH:
case VSCSIIOREQTXDIR_READ:
case VSCSIIOREQTXDIR_WRITE:
unsigned cSeg = 0;
&paSeg);
paSeg++;
cSeg--;
case VSCSIIOREQTXDIR_UNMAP:
unsigned cRanges;
return VINF_SUCCESS;
return VINF_SUCCESS;
unsigned cSeg = 0;
return VINF_SUCCESS;
void *pvScsiLunUser,
switch (enmTxDir)
case VSCSIIOREQTXDIR_FLUSH:
case VSCSIIOREQTXDIR_UNMAP:
unsigned cRanges;
case VSCSIIOREQTXDIR_READ:
case VSCSIIOREQTXDIR_WRITE:
unsigned cSeg = 0;
return rc;
void *pvScsiLunUser,
*pfFeatures = 0;
return VINF_SUCCESS;
int rcReq)
return VINF_SUCCESS;
return VWRN_STATE_CHANGED;
return VINF_SUCCESS;
AssertMsg(rc == VWRN_STATE_CHANGED, ("Left RTReqProcess and error code is not VWRN_STATE_CHANGED rc=%Rrc\n", rc));
return VINF_SUCCESS;
int rc;
AssertMsgReturn(pThis->hQueueRequests != NIL_RTREQQUEUE, ("hQueueRequests is NULL\n"), VERR_INVALID_STATE);
LogRel(("drvscsiAsyncIOLoopWakeup#%u: previous dummy request is still pending\n", pDrvIns->iInstance));
return VERR_TIMEOUT;
rc = RTReqQueueCall(pThis->hQueueRequests, &pReq, 10000 /* 10 sec. */, (PFNRT)drvscsiAsyncIOLoopWakeupFunc, 1, pThis);
return rc;
#ifdef DEBUG
static DECLCALLBACK(int) drvscsiRequestSend(PPDMISCSICONNECTOR pInterface, PPDMSCSIREQUEST pSCSIRequest)
int rc;
#ifdef DEBUG
return rc;
return rc;
return NULL;
static DECLCALLBACK(int) drvscsiQueryDeviceLocation(PPDMIBLOCKPORT pInterface, const char **ppcszController,
static void drvscsiR3ResetOrSuspendOrPowerOff(PPDMDRVINS pDrvIns, PFNPDMDRVASYNCNOTIFY pfnAsyncNotify)
int rc = RTReqQueueCall(pThis->hQueueRequests, &pReq, 0 /*ms*/, (PFNRT)drvscsiAsyncIOLoopSyncCallback, 1, pThis);
AssertMsgReturn(pThis->pDevScsiPort, ("Missing SCSI port interface above\n"), VERR_PDM_MISSING_INTERFACE);
return VERR_PDM_MISSING_INTERFACE;
return VERR_PDM_MISSING_INTERFACE;
enmType);
pThis);
PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesRead, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,
PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatBytesWritten, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,
PDMDrvHlpSTAMRegisterF(pDrvIns, (void *)&pThis->StatIoDepth, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT,
return VINF_SUCCESS;
sizeof(DRVSCSI),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,