diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2000-01-25 17:37:02 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2000-01-25 17:37:02 +0000 |
| commit | 366f55288e6bc4b6639b4777cbd65d00f1825aae (patch) | |
| tree | 801aea15deb60936562b93a58d56b093205aa055 /sys/cam | |
| parent | 931e989797305e4967a74adb4a88779f14be7f3b (diff) | |
Notes
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 bd614cf1218f..10d4cc8595bf 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 fe01620defbb..37caa19e6f52 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]; }; |
