Subject: Re: SCSI message translation, please?
To: None <tech-kern@netbsd.org>
From: Chris Jones <chris@cjones.org>
List: tech-kern
Date: 03/25/2004 15:01:43
This is a multi-part message in MIME format.
--------------090601060706030403000304
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I've figured it out.  The unit in question can't handle "disabled block 
descriptors," whatever that means.  The attached patch fixes it, though 
it probably breaks other ch devices.

This time around, I'm going to file a PR...

Chris

Chris Jones wrote:
> Could somebody with a SCSI spec translate this message for me?  In a 
> previous life, I got one of these CDL1100 devices to work with NetBSD, 
> and I remember it involved a small kernel source change.  I'm hoping 
> that the device is actually trying to tell me what's wrong.
> 
> ch0 at scsibus0 target 1 lun 0: <SONY, CDL1100, 1.12> SCSI2 8/changer 
> removable
> ch0(umass0:0:1:0):  Check Condition on CDB: 0x1a 08 1d 00 18 00
>     SENSE KEY:  Illegal Request
>      ASC/ASCQ:  Illegal Field in CDB
> 
> ch0: could not sense element address page
> ch0: offline
> 
> 
> Any hints?
> 
> Chris
> 

-- 
Chris Jones               chris@cjones.org                www.cjones.org
     PGP ID 5AFDD40A

--------------090601060706030403000304
Content-Type: text/plain;
 name="ch.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ch.patch"

Index: ch.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/ch.c,v
retrieving revision 1.49
diff -u -w -r1.49 ch.c
--- ch.c	6 May 2002 13:43:57 -0000	1.49
+++ ch.c	25 Mar 2004 22:00:52 -0000
@@ -1162,7 +1162,7 @@
 	 * Grab info from the element address assignment page.
 	 */
 	memset(&sense_data, 0, sizeof(sense_data));
-	error = scsipi_mode_sense(sc->sc_periph, SMS_DBD, 0x1d,
+	error = scsipi_mode_sense(sc->sc_periph, 0, 0x1d,
 	    &sense_data.header, sizeof(sense_data),
 	    scsiflags | XS_CTL_DATA_ONSTACK, CHRETRIES, 6000);
 	if (error) {
@@ -1189,7 +1189,7 @@
 	/*
 	 * XXX: Note: not all changers can deal with disabled block descriptors
 	 */
-	error = scsipi_mode_sense(sc->sc_periph, SMS_DBD, 0x1f,
+	error = scsipi_mode_sense(sc->sc_periph, 0, 0x1f,
 	    &sense_data.header, sizeof(sense_data),
 	    scsiflags | XS_CTL_DATA_ONSTACK, CHRETRIES, 6000);
 	if (error) {

--------------090601060706030403000304--