diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-04 10:28:55 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-07 08:44:21 +0200 |
commit | 065c25996b6275e306704816c6075d6c0ff66e84 (patch) | |
tree | 88fa38172598fabaaa2b27e119afe253d8f60c61 /hw/scsi-bus.c | |
parent | f62d0594604399e89ca8ece730a2a79110de5d77 (diff) | |
download | qemu-065c25996b6275e306704816c6075d6c0ff66e84.tar.gz qemu-065c25996b6275e306704816c6075d6c0ff66e84.tar.bz2 qemu-065c25996b6275e306704816c6075d6c0ff66e84.zip |
scsi: parse 16-byte tape CDBs
The transfer length for these commands is different from the transfer
length of the corresponding disk commands, so parse it specially.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-bus.c')
-rw-r--r-- | hw/scsi-bus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 5fbf8dbb14..46cd1f9324 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -891,6 +891,16 @@ static int scsi_req_stream_length(SCSICommand *cmd, SCSIDevice *dev, uint8_t *bu cmd->xfer *= dev->blocksize; } break; + case READ_16: + case READ_REVERSE_16: + case VERIFY_16: + case WRITE_16: + cmd->len = 16; + cmd->xfer = buf[14] | (buf[13] << 8) | (buf[12] << 16); + if (buf[1] & 0x01) { /* fixed */ + cmd->xfer *= dev->blocksize; + } + break; case REWIND: case START_STOP: cmd->len = 6; |