Changeset 81302 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Oct 17, 2019 7:25:17 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp ¶
r81301 r81302 999 999 { 1000 1000 RT_NOREF(hIoReq, cbCopy); 1001 1002 PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc; 1003 1004 if (!pReq->cbDataIn) 1005 return VINF_SUCCESS; 1006 1001 1007 PVIRTIOSCSITARGET pTarget = RT_FROM_MEMBER(pInterface, VIRTIOSCSITARGET, IMediaExPort); 1002 1008 PVIRTIOSCSI pThis = pTarget->pVirtioScsi; 1003 PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;1004 1009 1005 1010 AssertReturn(pReq->pDescChain, VERR_INVALID_PARAMETER); 1006 1011 1007 if (!pReq->cbDataIn)1008 return VINF_SUCCESS;1009 1012 1010 1013 PRTSGBUF pSgPhysReturn = pReq->pDescChain->pSgPhysReturn; … … 1015 1018 1016 1019 if (!pSgPhysReturn->idxSeg && pSgPhysReturn->cbSegLeft == pSgPhysReturn->paSegs[0].cbSeg) 1017 {1018 Log(("Do advance\n"));1019 1020 RTSgBufAdvance(pSgPhysReturn, pReq->uDataInOff); 1020 }1021 1021 1022 1022 while (cbRemain) … … 1051 1051 1052 1052 RT_NOREF(hIoReq, cbCopy); 1053 1054 PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc; 1055 1056 if (!pReq->cbDataOut) 1057 return VINF_SUCCESS; 1058 1053 1059 PVIRTIOSCSITARGET pTarget = RT_FROM_MEMBER(pInterface, VIRTIOSCSITARGET, IMediaExPort); 1054 1060 PVIRTIOSCSI pThis = pTarget->pVirtioScsi; 1055 PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;1056 1057 if (!pReq->cbDataOut)1058 return VINF_SUCCESS;1059 1061 1060 1062 PRTSGBUF pSgPhysSend = pReq->pDescChain->pSgPhysSend; … … 1091 1093 /* Extract command header and CDB from guest physical memory */ 1092 1094 1093 uint16_t cbReqHdr = sizeof(struct REQ_CMD_HDR) + pThis->virtioScsiConfig.uCdbSize;1095 size_t cbReqHdr = sizeof(struct REQ_CMD_HDR) + pThis->virtioScsiConfig.uCdbSize; 1094 1096 PVIRTIOSCSI_REQ_CMD_T pVirtqReq = (PVIRTIOSCSI_REQ_CMD_T)RTMemAlloc(cbReqHdr); 1095 1097 AssertReturn(pVirtqReq, VERR_NO_MEMORY);
Note:
See TracChangeset
for help on using the changeset viewer.