diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-03 18:20:28 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-01-16 17:52:35 +0100 |
commit | 1f8af0d186abf9ef775a74d41bf2852ed8d59b63 (patch) | |
tree | ac3500f35d9d3f8b025b364b8209c127050cab5f /hw/scsi/scsi-disk.c | |
parent | 26ef65beab852caf2b1ef4976e3473f2d525164d (diff) | |
download | qemu-1f8af0d186abf9ef775a74d41bf2852ed8d59b63.zip qemu-1f8af0d186abf9ef775a74d41bf2852ed8d59b63.tar.gz qemu-1f8af0d186abf9ef775a74d41bf2852ed8d59b63.tar.bz2 |
scsi-block: fix direction of BYTCHK test for VERIFY commands
The direction is wrong; scsi_block_is_passthrough returns
false for commands that *can* use sglists.
Reported-by: Zhang Qian <zhangqian@sangfor.com.cn>
Fixes: 8fdc7839e40f43a426bc7e858cf1dbfe315a3804
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-disk.c')
-rw-r--r-- | hw/scsi/scsi-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index bdd1e5f..c080888 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2701,7 +2701,7 @@ static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf) * for the number of logical blocks specified in the length * field). For other modes, do not use scatter/gather operation. */ - if ((buf[1] & 6) != 2) { + if ((buf[1] & 6) == 2) { return false; } break; |