Changeset 59250 in vbox
- Timestamp:
- Jan 4, 2016 2:24:32 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r59248 r59250 175 175 0, 0, 0, 0, 0 176 176 }; 177 rc = DRVHostBaseScsiCmd(pThis, abCmd, 12, PDM BLOCKTXDIR_FROM_DEVICE, pvBuf, &cbRead32, NULL, 0, 0);177 rc = DRVHostBaseScsiCmd(pThis, abCmd, 12, PDMMEDIATXDIR_FROM_DEVICE, pvBuf, &cbRead32, NULL, 0, 0); 178 178 179 179 off += cbRead32; … … 700 700 0,0,0,0,0,0,0,0,0,0 701 701 }; 702 DRVHostBaseScsiCmd(pThis, abCmd, 6, PDM BLOCKTXDIR_NONE, NULL, NULL, NULL, 0, 0);702 DRVHostBaseScsiCmd(pThis, abCmd, 6, PDMMEDIATXDIR_NONE, NULL, NULL, NULL, 0, 0); 703 703 } 704 704 return VINF_SUCCESS; … … 1167 1167 0,0,0,0,0,0,0,0,0 1168 1168 }; 1169 int rc = DRVHostBaseScsiCmd(pThis, abCmd, 6, PDM BLOCKTXDIR_FROM_DEVICE, &Buf, &cbBuf, NULL, 0, 0);1169 int rc = DRVHostBaseScsiCmd(pThis, abCmd, 6, PDMMEDIATXDIR_FROM_DEVICE, &Buf, &cbBuf, NULL, 0, 0); 1170 1170 if (RT_SUCCESS(rc)) 1171 1171 { … … 1238 1238 * @param cbCmd The size of the SCSI command. 1239 1239 * @param enmTxDir The transfer direction. 1240 * @param pvBuf The buffer. Can be NULL if enmTxDir is PDM BLOCKTXDIR_NONE.1240 * @param pvBuf The buffer. Can be NULL if enmTxDir is PDMMEDIATXDIR_NONE. 1241 1241 * @param pcbBuf Where to get the buffer size from and put the actual transfer size. Can be NULL. 1242 1242 * @param pbSense Where to put the sense data. Can be NULL. … … 1250 1250 * @todo Fix VERR_UNRESOLVED_ERROR abuse. 1251 1251 */ 1252 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDM BLOCKTXDIR enmTxDir,1252 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDMMEDIATXDIR enmTxDir, 1253 1253 void *pvBuf, uint32_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies) 1254 1254 { … … 1256 1256 * Minimal input validation. 1257 1257 */ 1258 Assert(enmTxDir == PDM BLOCKTXDIR_NONE || enmTxDir == PDMBLOCKTXDIR_FROM_DEVICE || enmTxDir == PDMBLOCKTXDIR_TO_DEVICE);1258 Assert(enmTxDir == PDMMEDIATXDIR_NONE || enmTxDir == PDMMEDIATXDIR_FROM_DEVICE || enmTxDir == PDMMEDIATXDIR_TO_DEVICE); 1259 1259 Assert(!pvBuf || pcbBuf); 1260 Assert(pvBuf || enmTxDir == PDM BLOCKTXDIR_NONE);1260 Assert(pvBuf || enmTxDir == PDMMEDIATXDIR_NONE); 1261 1261 Assert(pbSense || !cbSense); 1262 1262 AssertPtr(pbCmd); … … 1282 1282 1283 1283 /* Setup the buffer. */ 1284 if (enmTxDir == PDM BLOCKTXDIR_NONE)1284 if (enmTxDir == PDMMEDIATXDIR_NONE) 1285 1285 irc = (*ppScsiTaskI)->SetScatterGatherEntries(ppScsiTaskI, NULL, 0, 0, kSCSIDataTransfer_NoDataTransfer); 1286 1286 else … … 1288 1288 IOVirtualRange Range = { (IOVirtualAddress)pvBuf, cbBuf }; 1289 1289 irc = (*ppScsiTaskI)->SetScatterGatherEntries(ppScsiTaskI, &Range, 1, cbBuf, 1290 enmTxDir == PDM BLOCKTXDIR_FROM_DEVICE1290 enmTxDir == PDMMEDIATXDIR_FROM_DEVICE 1291 1291 ? kSCSIDataTransfer_FromTargetToInitiator 1292 1292 : kSCSIDataTransfer_FromInitiatorToTarget); … … 1327 1327 else 1328 1328 { 1329 rc = enmTxDir == PDM BLOCKTXDIR_NONE1329 rc = enmTxDir == PDMMEDIATXDIR_NONE 1330 1330 ? VERR_DEV_IO_ERROR 1331 : enmTxDir == PDM BLOCKTXDIR_FROM_DEVICE1331 : enmTxDir == PDMMEDIATXDIR_FROM_DEVICE 1332 1332 ? VERR_READ_ERROR 1333 1333 : VERR_WRITE_ERROR; … … 1379 1379 1380 1380 /* Set direction. */ 1381 if (enmTxDir == PDM BLOCKTXDIR_NONE)1381 if (enmTxDir == PDMMEDIATXDIR_NONE) 1382 1382 fFlags = CAM_DIR_NONE; 1383 else if (enmTxDir == PDM BLOCKTXDIR_FROM_DEVICE)1383 else if (enmTxDir == PDMMEDIATXDIR_FROM_DEVICE) 1384 1384 fFlags = CAM_DIR_IN; 1385 1385 else -
trunk/src/VBox/Devices/Storage/DrvHostBase.h
r59248 r59250 185 185 DECLCALLBACK(void) DRVHostBaseDestruct(PPDMDRVINS pDrvIns); 186 186 #if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) 187 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDM BLOCKTXDIR enmTxDir,187 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDMMEDIATXDIR enmTxDir, 188 188 void *pvBuf, uint32_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies); 189 189 #endif
Note:
See TracChangeset
for help on using the changeset viewer.