Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Mar 2000 00:03:04 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        "Kenneth D. Merry" <ken@kdm.org>
Cc:        Mike Smith <msmith@FreeBSD.ORG>, scsi@FreeBSD.ORG
Subject:   Re: chio trap with not-ready changer 
Message-ID:  <200003010803.AAA04730@mass.cdrom.com>
In-Reply-To: Your message of "Wed, 01 Mar 2000 00:38:28 MST." <20000301003828.A28889@panzer.kdm.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.

> 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.)

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

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.

> I haven't tried compiling the patch, hopefully the syntax is correct.

You missed a semicolon.

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




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?200003010803.AAA04730>