From owner-freebsd-stable Wed Aug 29 11:28:35 2001 Delivered-To: freebsd-stable@freebsd.org Received: from postfix1-2.free.fr (postfix1-2.free.fr [213.228.0.130]) by hub.freebsd.org (Postfix) with ESMTP id E3D8A37B407; Wed, 29 Aug 2001 11:28:26 -0700 (PDT) (envelope-from groudier@free.fr) Received: from nas-cbv-7-20-95.dial.proxad.net (nas-cbv-7-20-95.dial.proxad.net [213.228.20.95]) by postfix1-2.free.fr (Postfix) with ESMTP id 6F308AB397; Wed, 29 Aug 2001 20:28:20 +0200 (CEST) Date: Wed, 29 Aug 2001 20:25:31 +0200 (CEST) From: =?ISO-8859-1?Q?G=E9rard_Roudier?= X-X-Sender: To: "Kenneth D. Merry" Cc: Thomas Quinot , , Subject: Re: Failure to attach SCSI CD burner In-Reply-To: <20010828162812.A31937@panzer.kdm.org> Message-ID: <20010829201629.B1561-100000@gerard> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 28 Aug 2001, Kenneth D. Merry wrote: > > > Yes, that is what it looks like is happening. Apparantly it only hap= pens > > > the first time we send a read capacity to the drive. (On probe.) > > > Subsequent read capacity commands via camcontrol return CCBs with val= id > > > sense data and the CAM_AUTOSNS_VALID flag set. > > > > I double-checked the sym driver source and didn't find any code path > > explaining such behaviour. I mean, the driver returning SCSI_STATUS_ERR= OR > > on either CHECK CONDITION or TERMINATED STATUS. If an error occurs duri= ng > > auto-sense, the driver should either return some severe cam status valu= e, > > or indicate that sense data are not valid in the cam status. > > Well, it looks like it's doing just that -- returning > CAM_SCSI_STATUS_ERROR, but without the CAM_AUTOSNS_VALID flag set. > > > It would have been fine to also display out the actual value of the scs= i > > status returned by the device. Being 100% sure is far better than only > > 99%. :) > > Let me suggest Thomas to add such a trace to scsi_cd.c and to give anot= her > > try with his CD burner. > > The patch I gave him does this -- the status is 0x4c, which is > CAM_SCSI_STATUS_ERROR | CAM_DEV_QFRZN. (See above.) I didn't miss a single bit, but have been unclear in my reply. > > This 1% of chance for another SCSI status to have been returned gives t= he > > following scenario some chance to happen. :) > > > > The read capacity is performed with 1 retry max by the cd driver. > > > > 1) The device returns SCSI_STATUS_BUSY. > > 2) 1 second later the retry is performed. > > 3) The device still returns SCSI_STATUS_BUSY. > > 4) cam_periph_errof() return EIO. > > 5) then the problem reported by Thomas does happen. > > > > I may be wrong, obviously. Sorry if I am. > > You've got a point, it may well be returning busy instead of check > condition. I'll send him another patch to check for that. Some other not good SCSI statuses are also candidate in theory, but very unlikely given the situation. Even if the situation I described does not apply to our problem (we will know very soon), it can indeed happen and should be considered as a potential problem, in my opinion. G=E9rard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message