summary refs log tree commit diff stats
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-07-11 15:02:24 +0200
committerKevin Wolf <kwolf@redhat.com>2011-07-19 15:38:58 +0200
commitc5bf71a9a3b10c0cce877b7b3add4484322d3e2c (patch)
tree6f1264c7e1d0ad43429b136076db8629d930502a /hw/scsi-generic.c
parent348e7b8dcd1460df4d681105f63dd90bba70496d (diff)
downloadfocaccia-qemu-c5bf71a9a3b10c0cce877b7b3add4484322d3e2c.tar.gz
focaccia-qemu-c5bf71a9a3b10c0cce877b7b3add4484322d3e2c.zip
scsi: Add 'hba_private' to SCSIRequest
'tag' is just an abstraction to identify the command
from the driver. So we should make that explicit by
replacing 'tag' with a driver-defined pointer 'hba_private'.
This saves the lookup for driver handling several commands
in parallel.
'tag' is still being kept for tracing purposes.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 8e59c7ee89..90345a714f 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -96,11 +96,12 @@ static int scsi_get_sense(SCSIRequest *req, uint8_t *outbuf, int len)
     return size;
 }
 
-static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun)
+static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun,
+                                     void *hba_private)
 {
     SCSIRequest *req;
 
-    req = scsi_req_alloc(sizeof(SCSIGenericReq), d, tag, lun);
+    req = scsi_req_alloc(sizeof(SCSIGenericReq), d, tag, lun, hba_private);
     return req;
 }