From owner-freebsd-scsi Wed Mar 1 0: 3:14 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from mass.cdrom.com (mass.cdrom.com [204.216.28.184]) by hub.freebsd.org (Postfix) with ESMTP id 6CF9A37BE00; Wed, 1 Mar 2000 00:03:10 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id AAA04730; Wed, 1 Mar 2000 00:03:04 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <200003010803.AAA04730@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: "Kenneth D. Merry" Cc: Mike Smith , scsi@FreeBSD.ORG Subject: Re: chio trap with not-ready changer In-reply-to: Your message of "Wed, 01 Mar 2000 00:38:28 MST." <20000301003828.A28889@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 01 Mar 2000 00:03:04 -0800 From: Mike Smith Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > 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