]> git.proxmox.com Git - qemu.git/commitdiff
scsi: pass cdb to alloc_req
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 12 Oct 2011 10:58:31 +0000 (12:58 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Oct 2011 17:25:52 +0000 (19:25 +0200)
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>
hw/scsi-bus.c
hw/scsi-disk.c
hw/scsi-generic.c
hw/scsi.h

index 1f38ac88e503f3d8e84936ba7bf109b36d2147da..3cf571eea44ecf42de1b53fa3933cde2cefab299 100644 (file)
@@ -451,7 +451,7 @@ SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
             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);
         }
     }
 
index 77673f251a71e045f59f440f4f40e058ddbbcafc..415f81d1db66bbaf43a2eabeedc932ceb4137383 100644 (file)
@@ -1598,8 +1598,8 @@ static const SCSIReqOps scsi_disk_reqops = {
     .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;
index 32f50cda3e366f08ae8682b5dfcb9af90852488b..2f95f2d9675a8db28108ce904994f9777d3e87ea 100644 (file)
@@ -431,7 +431,7 @@ const SCSIReqOps scsi_generic_req_ops = {
 };
 
 static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun,
-                                     void *hba_private)
+                                     uint8_t *buf, void *hba_private)
 {
     SCSIRequest *req;
 
index 01c6655f605e3e31bf2a4f3dd4d5c2d0f75ebd60..8ea744a39267ede4def7c25d7729a306998b099d 100644 (file)
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -94,7 +94,7 @@ struct SCSIDeviceInfo {
     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);
 };