diff options
author | ken <ken@FreeBSD.org> | 2000-02-20 04:42:44 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2000-02-20 04:42:44 +0000 |
commit | 73428f2e29abdd4ab292f3d2713ff3081c923721 (patch) | |
tree | e8a4466d94a73a993c6f06bb9f5854cd5ac36568 /include/pthread.h | |
parent | c764ef2782535d3b93c0fa2fbee29ab3de263db8 (diff) | |
download | FreeBSD-src-73428f2e29abdd4ab292f3d2713ff3081c923721.zip FreeBSD-src-73428f2e29abdd4ab292f3d2713ff3081c923721.tar.gz |
Fix 'camcontrol inquiry'. The inquiry data structure changes (increased to
256 bytes) caused it to break on many devices.
The SCSI spec says that for commands with 8-bit length fields, a value of 0
means 256 bytes. As it turns out, many devices don't deal with that
properly. Some interpret the 0 as 0, and return no data. Others return
more than 256 bytes of data, and cause an overrun.
The fix is to tell the device we've only allocated SHORT_INQUIRY_LENGTH (36
bytes) of inquiry data, instead of sizeof(struct scsi_inquiry_data).
camcontrol.c: Change inq_len in the call to scsi_inquiry() to
SHORT_INQUIRY_LENGTH, and add a long comment
explaining the reason for the change.
scsi_all.h: Add a comment above the definitinon of
SHORT_INQUIRY_LENGTH alerting people that it is
both the initial probe inquiry length, and the
minimum amount of data needed for scsi_print_inquiry()
to function.
scsi_all.c: Add a comment about SHORT_INQUIRY_LENGTH being the
minimum amount of data needed for
scsi_print_inquiry() to function.
Reviewed by: gibbs
Approved by: jkh
Reported by: "John W. DeBoskey" <jwd@unx.sas.com>
Diffstat (limited to 'include/pthread.h')
0 files changed, 0 insertions, 0 deletions