diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-08-03 10:49:10 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-12 08:27:37 -0500 |
commit | c39ce112b60ffafbaf700853e32bea74cbb2c148 (patch) | |
tree | 057c60e24ca46e5c880fe575fc17620c1dff0ea0 /hw/spapr_vscsi.c | |
parent | 12010e7b29a2e777153440ded6fd5bd426eed3e4 (diff) |
scsi: pass cdb already to scsi_req_new
Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.
Passing it to scsi_req_new will let scsi_req_new dispatch common requests
through different reqops.
Moving the memcpy to scsi_req_new is a hack that will go away as
soon as scsi_req_new will also take care of the parsing.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/spapr_vscsi.c')
-rw-r--r-- | hw/spapr_vscsi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c index c65308c424..d98d1fd0b9 100644 --- a/hw/spapr_vscsi.c +++ b/hw/spapr_vscsi.c @@ -600,8 +600,8 @@ static int vscsi_queue_cmd(VSCSIState *s, vscsi_req *req) } req->lun = lun; - req->sreq = scsi_req_new(sdev, req->qtag, lun, req); - n = scsi_req_enqueue(req->sreq, srp->cmd.cdb); + req->sreq = scsi_req_new(sdev, req->qtag, lun, srp->cmd.cdb, req); + n = scsi_req_enqueue(req->sreq); dprintf("VSCSI: Queued command tag 0x%x CMD 0x%x ID %d LUN %d ret: %d\n", req->qtag, srp->cmd.cdb[0], id, lun, n); |