aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-bus.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-11-26 15:34:16 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 09:41:40 -0600
commitbd536cf3302e258cace9cfa9f554ec9f9e27591a (patch)
treec216512c4385376f4d3f80a2664bcaf4cc44c0cd /hw/scsi-bus.c
parent88f8a5ed0f4f1454ba53661fed0f676180e9be32 (diff)
scsi: add read/write 16 commands.
Add READ_16 + friends to scsi-defs.h, scsi_command_name() and the request parsing helper functions. Use them in scsi-disk.c too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r--hw/scsi-bus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index b6de5c6337..736e91e91b 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -228,6 +228,8 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd)
case WRITE_6:
case WRITE_12:
case WRITE_VERIFY_12:
+ case WRITE_16:
+ case WRITE_VERIFY_16:
req->cmd.xfer *= req->dev->blocksize;
break;
case READ_10:
@@ -235,6 +237,7 @@ static int scsi_req_length(SCSIRequest *req, uint8_t *cmd)
case READ_REVERSE:
case RECOVER_BUFFERED_DATA:
case READ_12:
+ case READ_16:
req->cmd.xfer *= req->dev->blocksize;
break;
case INQUIRY:
@@ -277,6 +280,8 @@ static void scsi_req_xfer_mode(SCSIRequest *req)
case WRITE_VERIFY:
case WRITE_12:
case WRITE_VERIFY_12:
+ case WRITE_16:
+ case WRITE_VERIFY_16:
case COPY:
case COPY_VERIFY:
case COMPARE:
@@ -441,6 +446,9 @@ static const char *scsi_command_name(uint8_t cmd)
[ REWIND ] = "REWIND",
[ REPORT_DENSITY_SUPPORT ] = "REPORT_DENSITY_SUPPORT",
[ GET_CONFIGURATION ] = "GET_CONFIGURATION",
+ [ READ_16 ] = "READ_16",
+ [ WRITE_16 ] = "WRITE_16",
+ [ WRITE_VERIFY_16 ] = "WRITE_VERIFY_16",
[ SERVICE_ACTION_IN ] = "SERVICE_ACTION_IN",
[ REPORT_LUNS ] = "REPORT_LUNS",
[ LOAD_UNLOAD ] = "LOAD_UNLOAD",