diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-04-18 17:06:17 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2011-05-26 12:14:15 +0200 |
commit | 2b8b3bb9dd1c67d8296b7610dca909539e25a196 (patch) | |
tree | 644f3e02e75dc869f9967009fa328f70921d3106 /hw/scsi-generic.c | |
parent | 94d3f98a3f3caddd7875f9a11776daeb84962a7b (diff) |
scsi: use scsi_req_complete
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r-- | hw/scsi-generic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index c008e9c59..229d24ff1 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -290,7 +290,6 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd) { SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev); SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req); - SCSIBus *bus; int ret; scsi_req_enqueue(req); @@ -307,8 +306,8 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd) s->sensebuf[6] = 0x00; s->senselen = 7; s->driver_status = SG_ERR_DRIVER_SENSE; - bus = scsi_bus_from_device(&s->qdev); - bus->ops->complete(req, SCSI_REASON_DONE, CHECK_CONDITION); + r->req.status = CHECK_CONDITION; + scsi_req_complete(&r->req); return 0; } |