diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-08-03 10:49:15 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-12 08:31:05 -0500 |
commit | 739df2150d7e6291d54b3d2dcbd9ed52078e991c (patch) | |
tree | e18479535801438d789d4e094574330a21c2c630 /hw/scsi-generic.c | |
parent | fdaef06917100d97782df550c1807a1da054e27e (diff) |
scsi: move handling of REQUEST SENSE to common code
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r-- | hw/scsi-generic.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index 70265d06b9..83723acd1e 100644 --- a/hw/scsi-generic.c +++ b/hw/scsi-generic.c @@ -183,22 +183,6 @@ static void scsi_read_data(SCSIRequest *req) return; } - if (r->req.cmd.buf[0] == REQUEST_SENSE) { - r->io_header.driver_status = 0; - r->io_header.status = 0; - r->io_header.dxfer_len = - scsi_device_get_sense(&s->qdev, r->buf, r->req.cmd.xfer, - (r->req.cmd.buf[1] & 1) == 0); - r->len = -1; - DPRINTF("Data ready tag=0x%x len=%d\n", r->req.tag, r->io_header.dxfer_len); - DPRINTF("Sense: %d %d %d %d %d %d %d %d\n", - r->buf[0], r->buf[1], r->buf[2], r->buf[3], - r->buf[4], r->buf[5], r->buf[6], r->buf[7]); - scsi_req_data(&r->req, r->io_header.dxfer_len); - /* The sense buffer is cleared when we return GOOD */ - return; - } - ret = execute_command(s->bs, r, SG_DXFER_FROM_DEV, scsi_read_complete); if (ret < 0) { scsi_command_complete(r, ret); |