Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 01:25:28 -0700
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        scsi@FreeBSD.ORG
Subject:   Re: chio trap with not-ready changer
Message-ID:  <20000301012528.A29274@panzer.kdm.org>
In-Reply-To: <200003010803.AAA04730@mass.cdrom.com>; from msmith@FreeBSD.ORG on Wed, Mar 01, 2000 at 12:03:04AM -0800
References:  <20000301003828.A28889@panzer.kdm.org> <200003010803.AAA04730@mass.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 01, 2000 at 00:03:04 -0800, Mike Smith wrote:
> > > Looks like it might want a TEST UNIT READY to clear the condition?
> > 
> > Not necessarily a test unit ready, but perhaps something other than mode
> > sense or inquiry.
> > 
> > *sigh*
> > 
> > I still don't understand how the retry count is getting decremented.
> 
> I think there's something basic wrong there, yes.  Whatever it is also 
> seems to be inhibiting the TEST UNIT READY that your quirk entry is 
> trying to send.

Maybe, mabye not.  It could be that the quirk entry isn't matching for some
reason.

> > Anyway, try the attached patch to scsi_all.c.  It should send one or two
> > test unit ready commands to the drive in response to a unit attention.
> > 
> > Hopefully that'll clear the condition, and the mode sense can then succeed.
> > 
> > Just for kicks, try it with the default retry count for the mode sense (in
> > chstart()) of 1.
> 
> I tried with both 1 and also 100.  With the latter, I get a lot of 
> repeats, ending in:
> 
> (ch0:ahc0:0:4:0): CAM status = 0x4c, retry count = 1
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 8 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): CAM status = 0x4c, retry count = 0
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 8 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): CAM status = 0x4c, retry count = 0
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 0 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 0 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): fatal error, failed to attach to device
> (ch0:ahc0:0:4:0): lost device
> (ch0:ahc0:0:4:0): removing device entry
> 
> (Note two there with a retry count of 0.  Weird.)

Note that one has the SMS_DBD flag set in the second byte of the CDB,
the other has it cleared.

> With 1, there's obviously a lot less, but the same result.

Can you include a little more of the retries?  The disable block
descriptors flag is getting cleared mighty late if the above is the tail
end of the output from the 100 retries.

> Anyway, while this was spewing out, I logged in and issued two 
> 'camcontrol tur 0:4 -v'.  Neither ran until the device was removed, 
> wherupon we get the same results - the first one fails, the second one 
> succeeds.

Hmm.  Not surprising I suppose.

> > I haven't tried compiling the patch, hopefully the syntax is correct.
> 
> You missed a semicolon.

Oops, sorry.

In any case, try putting a printf inside the SS_TUR case in
cam_periph_error() in cam_periph.c, to see whether the quirk entry is
getting matched correctly and therefore whether the test unit ready is
getting issued.

I won't be able to debug this more until tomorrow -- time to sleep. :)

Ken
-- 
Kenneth Merry
ken@kdm.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000301012528.A29274>