Go for the gusto and do the full 256 bytes for inquiry data.
Obtained from:gibbs@freebsd.org
This commit is contained in:
parent
3176716b49
commit
456e741298
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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];
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user