Skip to contentSkip to conversation

scsi-block: fix direction of BYTCHK test for VERIFY commands

PATCH New Paolo Bonzini 1 participant 1 message Jan 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 8fdc7839e40f43a426bc7e858cf1dbfe315a3804
---
 hw/scsi/scsi-disk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/scsi-disk.c +1 -1
index bdd1e5f..c080888 100644
@@ -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;
Signature · 1 line
2.9.3