scsi: pass cdb to alloc_req This will let scsi-block choose between passthrough and emulation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 1f38ac8..3cf571e 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c
@@ -451,7 +451,7 @@ req = scsi_req_alloc(&reqops_target_command, d, tag, lun, hba_private); } else { - req = d->info->alloc_req(d, tag, lun, hba_private); + req = d->info->alloc_req(d, tag, lun, buf, hba_private); } }
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 77673f2..415f81d 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c
@@ -1598,8 +1598,8 @@ .get_buf = scsi_get_buf, }; -static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, - uint32_t lun, void *hba_private) +static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, + uint8_t *buf, void *hba_private) { SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d); SCSIRequest *req;
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 32f50cd..2f95f2d 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c
@@ -431,7 +431,7 @@ }; static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, - void *hba_private) + uint8_t *buf, void *hba_private) { SCSIRequest *req;
diff --git a/hw/scsi.h b/hw/scsi.h index 01c6655..8ea744a 100644 --- a/hw/scsi.h +++ b/hw/scsi.h
@@ -94,7 +94,7 @@ scsi_qdev_initfn init; void (*destroy)(SCSIDevice *s); SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun, - void *hba_private); + uint8_t *buf, void *hba_private); void (*unit_attention_reported)(SCSIDevice *s); };