summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi
diff options
context:
space:
mode:
authorkbyanc <kbyanc@FreeBSD.org>2001-11-06 23:50:33 +0000
committerkbyanc <kbyanc@FreeBSD.org>2001-11-06 23:50:33 +0000
commit140b89bb7704684c4efa5162eb0fdde1adcf3c2c (patch)
tree63fb6d738d6a856529b4aa02fe93683511b75055 /sys/cam/scsi
parente9800edaf979627e830014c324ed4384250ac830 (diff)
downloadFreeBSD-src-140b89bb7704684c4efa5162eb0fdde1adcf3c2c.zip
FreeBSD-src-140b89bb7704684c4efa5162eb0fdde1adcf3c2c.tar.gz
Fix bug in scsi_read_write() where it might use 6-byte commands when
10/12-byte-specific flags where specified. Reviewed by: ken MFC after: 1 day
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r--sys/cam/scsi/scsi_all.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index e4061dc..46fe7e6 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -2673,15 +2673,14 @@ scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries,
u_int8_t cdb_len;
/*
* Use the smallest possible command to perform the operation
- * as some legacy hardware does not support the 10 byte
- * commands. If any of the lower 5 bits in byte2 is set, we have
- * to go with a larger command.
- *
+ * as some legacy hardware does not support the 10 byte commands.
+ * If any of the bits in byte2 is set, we have to go with a larger
+ * command.
*/
if ((minimum_cmd_size < 10)
&& ((lba & 0x1fffff) == lba)
&& ((block_count & 0xff) == block_count)
- && ((byte2 & 0xe0) == 0)) {
+ && (byte2 == 0)) {
/*
* We can fit in a 6 byte cdb.
*/
OpenPOWER on IntegriCloud