diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-02-08 10:40:37 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-04 10:39:52 +0200 |
commit | a5ee9085627eaeb501db31e3758df4e18500be71 (patch) | |
tree | 587aa233f8d13ae3f3ad1129247d5636b58e3f40 /hw/scsi-disk.c | |
parent | 31e8fd86f24b4eec8a1708d712bf0532460bb0a5 (diff) | |
download | qemu-a5ee9085627eaeb501db31e3758df4e18500be71.zip qemu-a5ee9085627eaeb501db31e3758df4e18500be71.tar.gz qemu-a5ee9085627eaeb501db31e3758df4e18500be71.tar.bz2 |
scsi: fix WRITE SAME transfer length and direction
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index eca00a6..fbb1041 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1566,8 +1566,11 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *buf) } break; case WRITE_SAME_10: + len = lduw_be_p(&buf[7]); + goto write_same; case WRITE_SAME_16: - len = r->req.cmd.xfer / s->qdev.blocksize; + len = ldl_be_p(&buf[10]) & 0xffffffffULL; + write_same: DPRINTF("WRITE SAME() (sector %" PRId64 ", count %d)\n", r->req.cmd.lba, len); |