Subject: Re: dev/scsipi/ch.c:chattach() fix ? (and approval for commit?)
To: Charles M. Hannum <abuse@spamalicious.com>
From: Stoned Elipot <seb@ssr.univ-paris7.fr>
List: tech-kern
Date: 06/17/2004 03:28:50
--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Jun 17, 2004 at 12:41:03AM +0000, Charles M. Hannum wrote:
[SNIP]
> Nope.  The problem is that ch_interpret_sense() is eating the UNIT ATTENTION.

Hum so...
I'm surely not understanding the issue(s) but I tried the following patch
(ie without the dummy scsipi_test_unit_ready() call) and now it reads:

...
ch0 at scsibus1 target 4 lun 0: <QUALSTAR, RLS-4221, 0047> changer removable
ch0(esiop1:0:4:0): requesting sense
ch0(esiop1:0:4:0):  sense debug information:
        code 0x70 valid 0x0
        seg 0x0 key 0x6 ili 0x0 eom 0x0 fmark 0x0

info: 0x0 0x0 0x0 0x0 followed by 10 extra bytes
        extra: 0x0 0x0 0x0 0x0 0x29 0x0 0x0 0x0 0x0 0x0 
ch0(esiop1:0:4:0): restarting command
ch0: 22 slots, 1 drive, 1 picker, 0 portals
ch0: async, 8-bit transfers
...

Does this make any sense?

--x+6KMIRAuhnl3hBn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ch.c.diff2"

Index: ch.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/ch.c,v
retrieving revision 1.58
diff -u -u -r1.58 ch.c
--- ch.c	8 Sep 2003 01:27:08 -0000	1.58
+++ ch.c	17 Jun 2004 01:27:29 -0000
@@ -205,7 +205,6 @@
 	/* Glue into the SCSI bus */
 	sc->sc_periph = periph;
 	periph->periph_dev = &sc->sc_dev;
-	periph->periph_switch = &ch_switch;
 
 	printf("\n");
 
@@ -253,6 +252,8 @@
 
 	/* Default the current picker. */
 	sc->sc_picker = sc->sc_firsts[CHET_MT];
+
+	periph->periph_switch = &ch_switch;
 }
 
 int

--x+6KMIRAuhnl3hBn--