Subject: Re: dev/scsipi/ch.c:chattach() fix ? (and approval for commit?)
To: Stoned Elipot <>
From: Charles M. Hannum <>
List: tech-kern
Date: 06/17/2004 03:12:49
On Thursday 17 June 2004 01:28, Stoned Elipot wrote:
> 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
> 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:

I was on my way out when I wrote that earlier.

I would just remove this block of code in ch.c:

                if ((periph->periph_flags & PERIPH_OPEN) == 0) {
                         * if the device is not yet open, we can ignore this
                         * information.
                        return (0);

That should fix the problem by letting the normal mid-layer code retry the 

Really, I don't understand why that code was ever written, given that it 
couldn't have done anything before (because the TEST UNIT READY had *always* 
been there to absorb the UNIT ATTENTION).