Go for the gusto and do the full 256 bytes for inquiry data.

Obtained from:gibbs@freebsd.org
This commit is contained in:
mjacob 2000-01-25 17:37:02 +00:00
parent 3176716b49
commit 456e741298
2 changed files with 8 additions and 6 deletions

View File

@ -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;
}

View File

@ -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];
};