1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys
Kenneth D. Merry 955f7e7474 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>
2000-02-20 04:42:44 +00:00
..
alpha Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
amd64 Make it clear that 'options XSERVER' is for pcvt and not for syscons. 2000-02-16 04:27:04 +00:00
boot Close a file descriptor leak in the code which loads file objects. 2000-02-17 02:19:19 +00:00
cam Fix 'camcontrol inquiry'. The inquiry data structure changes (increased to 2000-02-20 04:42:44 +00:00
coda
compat Avoid passing an uninitialized structure member to the real 2000-02-01 16:20:24 +00:00
compile
conf Make it clear that 'options XSERVER' is for pcvt and not for syscons. 2000-02-16 04:27:04 +00:00
contrib When writing out bitmap buffers, need to skip over ones that already 2000-01-30 20:32:59 +00:00
crypto Prototype fix for IPsec authentication related functions 2000-02-10 19:35:53 +00:00
ddb Add a new sysctl "debug.enter_debugger" (when the kernel is compiled 2000-01-27 22:27:34 +00:00
dev Remove the vga-pci driver. It serves no purpose and it hides the hardware 2000-02-19 09:44:06 +00:00
fs Supported non-512 bytes/sector format. 2000-01-27 14:43:07 +00:00
geom Remove #if NCCD > 0 - it's guaranteed to be true by config if ccd.c is 2000-01-29 14:29:56 +00:00
gnu Remove #if NDGB > 0 and #if NDGM > 0 2000-01-29 18:42:45 +00:00
i4b
i386 Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This 2000-02-17 18:37:45 +00:00
isa Fixed regressions in rev.1.274: 2000-02-15 17:29:09 +00:00
isofs/cd9660
kern Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
libkern
miscfs
modules Use config's conditional compilation rather than using #ifdefs that make 2000-01-29 15:08:56 +00:00
msdosfs Supported non-512 bytes/sector format. 2000-01-27 14:43:07 +00:00
net Track if_i{bytes,packets,errors}. 2000-02-16 04:04:36 +00:00
netatalk Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netatm Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netgraph Add control message ASCII conversion for this node type. 2000-01-27 01:32:53 +00:00
netinet Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netinet6 Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netipx Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netkey
netnatm Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
netncp Enable '=' character in the filename. 2000-01-29 02:10:37 +00:00
netns Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfs Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfsclient Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
nfsserver Clean up some loose ends in the network code, including the X.25 and ISO 2000-02-13 03:32:07 +00:00
ntfs
nwfs
pc98 Merged from sys/isa/sio.c rev 1.288. 2000-02-17 15:09:12 +00:00
pccard Update the pci->pcic compatability module to newbus. This is a simple 2000-02-02 16:49:21 +00:00
pci Remove the vga-pci driver. It serves no purpose and it hides the hardware 2000-02-19 09:44:06 +00:00
posix4
powerpc Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
rpc
svr4
sys Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This 2000-02-17 18:37:45 +00:00
tools
ufs Disable chflags() from within jail() so that root within jail can't make 2000-02-20 01:10:36 +00:00
vm Fix null-pointer dereference crash when the system is intentionally 2000-02-16 21:11:33 +00:00
Makefile