Il 11/07/2014 10:53, TAMUKI Shoichi ha scritto:
@@ -563,7 +565,8 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, 
uint32_t lun,
     SCSIRequest *req;
     SCSICommand cmd;

-    if (scsi_req_parse(&cmd, d, buf) != 0) {
+    if (scsi_req_parse(&cmd, d, buf,
+            ((VirtIOSCSIReq *) hba_private)->dev->parent_obj.cdb_size) != 0) {
         trace_scsi_req_parse_bad(d->id, lun, tag, buf[0]);
         req = scsi_req_alloc(&reqops_invalid_opcode, d, tag, lun, hba_private);
     } else {

This function is not called only for virtio-scsi. You need to add a new argument to scsi_req_new, and modify all invocations in hw/scsi.

Thanks,

Paolo

Reply via email to