freebsd-skq/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 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
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 update to isdn4bsd beta release 0.90 1999-12-14 20:54:38 +00:00
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 remove check now done in vn_isdisk(). 2000-01-10 12:24:36 +00:00
kern Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
libkern Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" 1999-12-29 05:07:58 +00:00
miscfs Fix bde'isms in acl/extattr syscall interface, renaming syscalls to 2000-01-19 06:07:34 +00:00
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 comment the string after #endif 2000-01-15 05:15:06 +00:00
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 Forward declare some structs so that this header is more self-suifficent. 2000-01-14 19:54:42 +00:00
nwfs Check if module was compiled without SMP support and running on 2000-01-15 08:35:48 +00:00
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 Track libc_r addition of semaphores implementation. 2000-01-20 07:55:42 +00:00
powerpc Update the ata driver to take more advantage of newbus, this 2000-02-18 20:57:33 +00:00
rpc $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
svr4 Fix handling of svr4_sigsets, which are implemented in SysVR4 as a sequence 2000-01-15 15:38:17 +00:00
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 Use a seperate -c and -h mode. The vnode_if.c file is compiled only into 1999-12-12 16:43:05 +00:00
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 ${MACHINE} -> ${MACHINE_ARCH} 1999-11-14 13:54:44 +00:00