From owner-freebsd-stable Mon Aug 27 12:38:46 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 D97D637B409; Mon, 27 Aug 2001 12:38:22 -0700 (PDT) (envelope-from groudier@free.fr) Received: from nas-cbv-8-16-172.dial.proxad.net (nas-cbv-8-16-172.dial.proxad.net [213.228.16.172]) by postfix1-2.free.fr (Postfix) with ESMTP id CD012AB215; Mon, 27 Aug 2001 21:38:15 +0200 (CEST) Date: Mon, 27 Aug 2001 21:35:28 +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: <20010826172020.A15037@panzer.kdm.org> Message-ID: <20010827211435.C1471-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 Sun, 26 Aug 2001, Kenneth D. Merry wrote: > On Mon, Aug 27, 2001 at 01:09:14 +0200, Thomas Quinot wrote: > > Le 2001-08-26, Kenneth D. Merry =E9crivait : > > > > > Hmm. Well, try applying the attached patch to sys/cam/scsi/scsi_cd.c= and > > > recompile your kernel. > > > > OK, some new info: > > > > 1. with NO CD in the drive, I did not actually get the failure reported > > before, but only the following messages: > > > > cd0 at sym0 bus 0 target 2 lun 0 > > cd0: Removable CD-ROM SCSI-2 device > > cd0: 3.300MB/s transfers > > cd0: Attempt to query device size failed: NOT READY, Logical unit not r= eady, cause not reportable > > > > (and then subsequently cd0 was correctly attached and usable) > > That's normal. > > > 2. with a DEFECTIVE CD-R in the drive (that had been sitting in there > > for some time I guess...) I reproduced the failure: > > > > (cd0:sym0:0:2:0): autosense is NOT valid > > (cd0:sym0:0:2:0): flags =3D 0x40 status =3D 0x4c > > (cd0:sym0:0:2:0): got CAM status 0x4c > > (cd0:sym0:0:2:0): fatal error, failed to attach to device > > (cd0:sym0:0:2:0): lost device > > (cd0:sym0:0:2:0): removing device entry > > > > and then retrying the command with camcontrol yields /valid/ > > sense data. > > Hmm, okay. So the drive was not empty before when you were having > failures? It looks like, at least the first time through, the autosense > valid flag isn't getting set for the read capacity command. > > Gerard, do you have any ideas as to why the autosense valid bit might not > be getting set the first time we send a read capacity to his drive? > (Apparantly with a certain bad CD-R in the drive.) I could better understand the situation if I got the previous postings on this topic. Btw, I didn't retrieve in what place the first 2 messages are printed from the code. May-be they are just printed out by your patch (?). If I understand your statement, the SIM is reported a CHECK CONDITION SCSI status from the device, but does not assert the CAM_AUTOSNS_VALID flag. Is my guessing correct? G=E9rard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message