diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-01-25 17:37:02 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-01-25 17:37:02 +0000 |
commit | 456e741298e7368d0f6c8c0fa889a204c8229742 (patch) | |
tree | ba58bfaebe9af1f5eeca68d0f88c4116e244eeb4 /sys/cam | |
parent | 3176716b498b7b71dcc1119fdb978a0c266e1a37 (diff) | |
download | FreeBSD-src-456e741298e7368d0f6c8c0fa889a204c8229742.zip FreeBSD-src-456e741298e7368d0f6c8c0fa889a204c8229742.tar.gz |
Go for the gusto and do the full 256 bytes for inquiry data.
Obtained from:gibbs@freebsd.org
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_all.c | 7 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_all.h | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index bd614cf..10d4cc8 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -2531,6 +2531,13 @@ scsi_inquiry(struct ccb_scsiio *csio, u_int32_t retries, scsi_cmd->byte2 |= SI_EVPD; scsi_cmd->page_code = page_code; } + /* + * A 'transfer units' count of 256 is coded as + * zero for all commands with a single byte count + * field. + */ + if (inq_len == 256) + inq_len = 0; scsi_cmd->length = inq_len; } diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index fe01620..37caa19 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -577,12 +577,7 @@ struct scsi_inquiry_data u_int8_t reserved3[22]; - /* - * The specifcation allows for 256 bytes of data, total. - * We avoid overflow problems with common usages of u_int8_t - * sizes by not getting at the last 4 bytes. - */ -#define SID_VENDOR_SPECIFIC_1_SIZE (256 - 96 - 4) +#define SID_VENDOR_SPECIFIC_1_SIZE 160 u_int8_t vendor_specific1[SID_VENDOR_SPECIFIC_1_SIZE]; }; |