]> git.ipfire.org Git - thirdparty/qemu.git/commit
scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b
authorMarkus Armbruster <armbru@redhat.com>
Wed, 29 Jan 2014 17:47:39 +0000 (18:47 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 25 Jun 2014 16:00:29 +0000 (11:00 -0500)
commit8b8dd2c4b50abe5647de7c336496c253dc474d3b
tree4c45c676bb14d300947a17f371b14e19011eb2d7
parent248de52cf84185b3bafea8ba31333bd0d7a34893
scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b

The transfer length depends on field BYTCHK, which is encoded in byte
1, bits 1..2.  However, the guard for for case BYTCHK=11b doesn't
work, and we get case 01b instead.  Fix it.

Note that since emulated scsi-hd fails the command outright, it takes
SCSI passthrough of a device that actually implements VERIFY with
BYTCHK=11b to make the bug bite.

Screwed up in commit d12ad44.  Spotted by Coverity.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 7ef8cf9a0861b6f67f5e57428478c31bfd811651)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/scsi-bus.c