Increasing SCSI sense byte length in scsi.h from 16 to 24 locks up SG layer

Fabien COLLIN Fabien.Collin at cern.ch
Thu Mar 25 02:38:05 PST 1999


Hello, 

	First, I must apologize because this problem is not really
AIC7XXX specific but it concerns all SCSI chipsets.

	I have a problem with the SG SCSI layer and the SCSI low level 
drivers under Linux. I tried both AIC7xxx and NCR8xx drivers without
success.

	The problem is the following : I use STK tape devices
(namely STK SD-3 and STK 9840 units) at CERN under Linux.
The problem is that this kind of devices report internal STK
error codes (called FSC, fault symtom codes) in SCSI sense bytes
18-23 (three 16 bits FSCs). I would like to fetch those FSCs in case
of error. The problem I have with the current versions of the SCSI 
drivers is that only the first 16 SCSI sense bytes are fetched from
the SCSI device (see scsi.h, sense_buffer array). 
I tried to increase the size of  the sense_buffer array from 16 
to 24. With the help of a SCSI analyzer, I checked the behaviour 
of the low level SCSI drivers and the REQUEST SENSE command really ask 
for 24 bytes...

	But, as soon as I use the SG layer (our application requires
to send vendor specific commands to those tape drives), it seems that 
the call to the SG layer (via the ioctl system call) doesn't return. I
had a 
look at the sg.c source file but I cannot guess why the SG hangs when
more than 16 sense bytes are requested.
 
	What's wrong ?

						Fabien
----------------------------------------------------------------------
Fabien COLLIN                    
CERN                                e-mail :
Fabien.Collin at cern.ch         
Information Technology Division                              
Building 31 Office 2-015            Tel : + 41 22 767 9457         
1211 Geneva 23                      GSM : + 41 79 201 0278
SWITZERLAND                         Fax : + 41 22 767 9345
----------------------------------------------------------------------


To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message




More information about the aic7xxx mailing list