From owner-freebsd-scsi Sun Aug 26 1:54:53 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 7F0F337B409; Sun, 26 Aug 2001 01:54:47 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id BAABF7609; Sun, 26 Aug 2001 10:54:45 +0200 (CEST) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 23C6924D45; Sun, 26 Aug 2001 10:54:44 +0200 (CEST) Date: Sun, 26 Aug 2001 10:54:44 +0200 From: Thomas Quinot To: "Kenneth D. Merry" Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010826105444.A65894@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010825141549.A8851@panzer.kdm.org>; from ken@kdm.org on Sat, Aug 25, 2001 at 02:15:49PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Le 2001-08-25, Kenneth D. Merry écrivait : > So this didn't happen before? Have you done anything to the drive? > (like upgrade the firmware?) No firmware upgrade... This happened after making world 'at some time in 4.3-STABLE'. I know that this was strictly after 4.3-REL, but unfortunately I did not notice the problem for some time, and then it got covered by another bug. > Do you have any other controllers you could put the drive on to see if it > is a controller/driver issue? Unfortunately not right now... > camcontrol cmd cd0 -v -c "25 0 0 0 0 0 0 0 0 0" -i 8 "i4 i4" (cd0 -> 0:2:0) # camcontrol cmd 0:2:0 -v -c "25 0 0 0 0 0 0 0 0 0 " -i 8 "i4 i4" camcontrol: error sending command (pass0:sym0:0:2:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (pass0:sym0:0:2:0): NOT READY asc:4,0 (pass0:sym0:0:2:0): Logical unit not ready, cause not reportable Right after inserting a CD-ROM, I get UNIT ATTENTION and (pass0:sym0:0:2:0): Not ready to ready change, medium may have changed. Subsequent tries yield no error and correctly return the CD size as '268207 2048'. Thanks for your help, Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 11:24:15 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id AB4FA37B40F; Sun, 26 Aug 2001 11:24:07 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id MAA13671; Sun, 26 Aug 2001 12:24:01 -0600 (MDT) (envelope-from ken) Date: Sun, 26 Aug 2001 12:24:01 -0600 From: "Kenneth D. Merry" To: Thomas Quinot Cc: stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010826122401.A13602@panzer.kdm.org> References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010826105444.A65894@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Sun, Aug 26, 2001 at 10:54:44AM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --huq684BweRXVnRxX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Aug 26, 2001 at 10:54:44 +0200, Thomas Quinot wrote: > Le 2001-08-25, Kenneth D. Merry écrivait : > > > So this didn't happen before? Have you done anything to the drive? > > (like upgrade the firmware?) > > No firmware upgrade... This happened after making world 'at some time > in 4.3-STABLE'. I know that this was strictly after 4.3-REL, but > unfortunately I did not notice the problem for some time, and then > it got covered by another bug. Hmm. Well, there were two changes to the sym driver since 4.3, but neither one of them look like they might cause problems. > > Do you have any other controllers you could put the drive on to see if it > > is a controller/driver issue? > > Unfortunately not right now... > > > camcontrol cmd cd0 -v -c "25 0 0 0 0 0 0 0 0 0" -i 8 "i4 i4" > > (cd0 -> 0:2:0) > > # camcontrol cmd 0:2:0 -v -c "25 0 0 0 0 0 0 0 0 0 > " -i 8 "i4 i4" > camcontrol: error sending command > (pass0:sym0:0:2:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 > (pass0:sym0:0:2:0): NOT READY asc:4,0 > (pass0:sym0:0:2:0): Logical unit not ready, cause not reportable Okay, that looks normal. camcontrol is not quite as strict as the cd driver about making sure the right flags have been filled in in the CCB. I've attached a patch, please apply it to camcontrol and try the same test again. This will tell me whether the autosense valid bit is being set. It looks like the sense information is there, but it may be that the autosense valid bit isn't being set. That is supposed to be set by the controller driver. > Right after inserting a CD-ROM, I get UNIT ATTENTION and > (pass0:sym0:0:2:0): Not ready to ready change, medium may have changed. > Subsequent tries yield no error and correctly return the CD size > as '268207 2048'. That is correct. The Unit Attention condition is cleared once it is read. Ken -- Kenneth Merry ken@kdm.org --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="camcontrol.c.autosense_test.20010826" ==== //depot/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c#3 - /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c ==== *** /tmp/tmp.707.0 Sun Aug 26 12:19:36 2001 --- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c Sun Aug 26 12:19:17 2001 *************** *** 1828,1833 **** --- 1828,1838 ---- warnx("error sending command"); if (arglist & CAM_ARG_VERBOSE) { + if (ccb->ccb_h.status & CAM_AUTOSNS_VALID) + fprintf(stderr, "Autosense is valid\n"); + else + fprintf(stderr, "Autosense is NOT valid\n"); + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR) scsi_sense_print(device, &ccb->csio, stderr); --huq684BweRXVnRxX-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 11:45:12 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 4931837B403; Sun, 26 Aug 2001 11:45:07 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id 9F4007B77; Sun, 26 Aug 2001 20:45:04 +0200 (CEST) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 4774124D45; Sun, 26 Aug 2001 20:44:59 +0200 (CEST) Date: Sun, 26 Aug 2001 20:44:58 +0200 From: Thomas Quinot To: "Kenneth D. Merry" Cc: stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010826204458.A18333@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010826122401.A13602@panzer.kdm.org>; from ken@kdm.org on Sun, Aug 26, 2001 at 12:24:01PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Le 2001-08-26, Kenneth D. Merry écrivait : > I've attached a patch, please apply it to camcontrol and try the same test > again. This will tell me whether the autosense valid bit is being set. It > looks like the sense information is there, but it may be that the autosense > valid bit isn't being set. That is supposed to be set by the controller > driver. According to the patched camcontrol, the sense valid bit is set: # ./camcontrol cmd 0:2:0 -v -c "25 0 0 0 0 0 0 0 0 0" -i 8 "i4 i4" camcontrol: error sending command Autosense is valid (pass0:sym0:0:2:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (pass0:sym0:0:2:0): NOT READY asc:4,0 (pass0:sym0:0:2:0): Logical unit not ready, cause not reportable Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 12:30:17 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id DB1BC37B407; Sun, 26 Aug 2001 12:30:04 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id NAA13961; Sun, 26 Aug 2001 13:29:58 -0600 (MDT) (envelope-from ken) Date: Sun, 26 Aug 2001 13:29:58 -0600 From: "Kenneth D. Merry" To: Thomas Quinot Cc: stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010826132958.A13920@panzer.kdm.org> References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> <20010826204458.A18333@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010826204458.A18333@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Sun, Aug 26, 2001 at 08:44:58PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sun, Aug 26, 2001 at 20:44:58 +0200, Thomas Quinot wrote: > Le 2001-08-26, Kenneth D. Merry écrivait : > > > I've attached a patch, please apply it to camcontrol and try the same test > > again. This will tell me whether the autosense valid bit is being set. It > > looks like the sense information is there, but it may be that the autosense > > valid bit isn't being set. That is supposed to be set by the controller > > driver. > > According to the patched camcontrol, the sense valid bit is set: > > # ./camcontrol cmd 0:2:0 -v -c "25 0 0 0 0 0 0 0 0 0" -i 8 "i4 i4" > camcontrol: error sending command > Autosense is valid > (pass0:sym0:0:2:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 > (pass0:sym0:0:2:0): NOT READY asc:4,0 > (pass0:sym0:0:2:0): Logical unit not ready, cause not reportable Hmm. Well, try applying the attached patch to sys/cam/scsi/scsi_cd.c and recompile your kernel. Then try booting without a CD in the drive and see what is printed. Ken -- Kenneth Merry ken@kdm.org --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.c.autosense_test.20010826" ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c#4 - /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c ==== *** /tmp/tmp.1548.0 Sun Aug 26 13:28:07 2001 --- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c Sun Aug 26 13:27:35 2001 *************** *** 1699,1707 **** if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) ! || ((status & CAM_AUTOSNS_VALID) == 0)) have_sense = FALSE; ! else have_sense = TRUE; if (have_sense) { --- 1699,1719 ---- if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) ! || ((status & CAM_AUTOSNS_VALID) == 0)) { ! if (status & CAM_AUTOSNS_VALID) { ! xpt_print_path(periph->path); ! printf("autosense is valid\n"); ! } else { ! xpt_print_path(periph->path); ! printf("autosense is NOT " ! "valid\n"); ! } ! xpt_print_path(periph->path); ! printf("flags = %#x status = %#x\n", ! csio->ccb_h.flags, status); ! have_sense = FALSE; ! } else have_sense = TRUE; if (have_sense) { --tThc/1wpZn/ma/RB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 16: 9:32 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 2E56A37B407; Sun, 26 Aug 2001 16:09:25 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id DF5A87C26; Mon, 27 Aug 2001 01:09:14 +0200 (CEST) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id BD95F24D45; Mon, 27 Aug 2001 01:09:14 +0200 (CEST) Date: Mon, 27 Aug 2001 01:09:14 +0200 From: Thomas Quinot To: "Kenneth D. Merry" Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010827010914.A2265@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> <20010826204458.A18333@melusine.cuivre.fr.eu.org> <20010826132958.A13920@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010826132958.A13920@panzer.kdm.org>; from ken@kdm.org on Sun, Aug 26, 2001 at 01:29:58PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Le 2001-08-26, Kenneth D. Merry écrivait : > 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 ready, cause not reportable (and then subsequently cd0 was correctly attached and usable) 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 = 0x40 status = 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. Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 16:20:30 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 56BAF37B413; Sun, 26 Aug 2001 16:20:24 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id RAA15067; Sun, 26 Aug 2001 17:20:20 -0600 (MDT) (envelope-from ken) Date: Sun, 26 Aug 2001 17:20:20 -0600 From: "Kenneth D. Merry" To: Thomas Quinot Cc: stable@FreeBSD.ORG, scsi@FreeBSD.ORG, groudier@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010826172020.A15037@panzer.kdm.org> References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> <20010826204458.A18333@melusine.cuivre.fr.eu.org> <20010826132958.A13920@panzer.kdm.org> <20010827010914.A2265@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010827010914.A2265@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Mon, Aug 27, 2001 at 01:09:14AM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Aug 27, 2001 at 01:09:14 +0200, Thomas Quinot wrote: > Le 2001-08-26, Kenneth D. Merry écrivait : > > > 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 ready, 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 = 0x40 status = 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.) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sun Aug 26 22:54: 0 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from pmp.uni-hannover.de (kirk.pmp.uni-hannover.de [130.75.117.28]) by hub.freebsd.org (Postfix) with ESMTP id 883A737B409 for ; Sun, 26 Aug 2001 22:53:57 -0700 (PDT) (envelope-from gerrit@pmp.uni-hannover.de) Received: from mako.pmp.uni-hannover.de (mako [130.75.117.34]) by pmp.uni-hannover.de (8.9.3+Sun/8.9.3) with SMTP id HAA27310 for ; Mon, 27 Aug 2001 07:55:45 +0200 (MEST) From: Gerrit Kuehn To: freebsd-scsi@FreeBSD.ORG Date: Mon, 27 Aug 2001 07:53:45 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <01082707535501.22981@mako.pmp.uni-hannover.de> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Am Fri, 24 Aug 2001 schrieb Kenneth D. Merry > I would suspect the driver, but it's rather hard to say. If you have > access to another SCSI controller (especially an Adaptec or LSI Logic-based > controller), it might be good to see if you can reproduce your problem with > a different controller. Unfortunately I don't have a spare controller at the moment to test this; I would have to buy one. Well, perhaps I can ,,lend'' a card somewhere here in our institute for a day or two... > It sounds like what is likely happening is that the controller isn't > returning some of the CCBs that are being sent down to scan the bus. Since > the CCBs don't get returned, the rescan hangs forever. That would fit to what I have been experiencing. > One thing to try, if you haven't already, is just rescan the bus/target/lun > that the device is on. (See the output of camcontrol devlist to determine > that.) I alreadu tried this, with the same effect: it just hangs. cu Gerrit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 3:59:48 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id D741C37B406; Mon, 27 Aug 2001 03:59:42 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 27 Aug 2001 11:59:42 +0100 (BST) Date: Mon, 27 Aug 2001 11:59:38 +0100 From: David Malone To: "Kenneth D. Merry" Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG, groudier@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010827115938.A75639@walton.maths.tcd.ie> References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> <20010826204458.A18333@melusine.cuivre.fr.eu.org> <20010826132958.A13920@panzer.kdm.org> <20010827010914.A2265@melusine.cuivre.fr.eu.org> <20010826172020.A15037@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010826172020.A15037@panzer.kdm.org>; from ken@kdm.org on Sun, Aug 26, 2001 at 05:20:20PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Aug 26, 2001 at 05:20:20PM -0600, Kenneth D. Merry wrote: > 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've been seeing something very similar to this with an adv controler and a HP CD burner. I'd say it started about 3 months ago in -current, I'll check the messages I'm getting to make sure the message is the same - but I definitely get the "device lost" message shortly after boot. David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 4:45:45 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from pmp.uni-hannover.de (kirk.pmp.uni-hannover.de [130.75.117.28]) by hub.freebsd.org (Postfix) with ESMTP id 3C47C37B403 for ; Mon, 27 Aug 2001 04:45:42 -0700 (PDT) (envelope-from gerrit@pmp.uni-hannover.de) Received: from mako.pmp.uni-hannover.de (mako [130.75.117.34]) by pmp.uni-hannover.de (8.9.3+Sun/8.9.3) with SMTP id NAA27828; Mon, 27 Aug 2001 13:46:58 +0200 (MEST) From: Gerrit Kuehn To: "Kenneth D. Merry" Subject: Re: problems with camcontrol rescan Date: Mon, 27 Aug 2001 13:41:22 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <0108241008070E.15703@mako.pmp.uni-hannover.de> <20010824140054.A5088@panzer.kdm.org> In-Reply-To: <20010824140054.A5088@panzer.kdm.org> Cc: freebsd-scsi@FreeBSD.ORG MIME-Version: 1.0 Message-Id: <01082713450808.22981@mako.pmp.uni-hannover.de> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Am Fri, 24 Aug 2001 schrieb Kenneth D. Merry > It sounds like what is likely happening is that the controller isn't > returning some of the CCBs that are being sent down to scan the bus. Since > the CCBs don't get returned, the rescan hangs forever. This is just > speculation, though; I haven't looked at the driver. BTW: Joerg Wunsch, who advised me to state my problem in this list here, already did have a quick look at the source of the driver. This is what he sent me: case XPT_SCAN_BUS: { #ifdef DC395x_trm_DEBUG1 printf(" XPT_SCAN_BUS \n"); #endif pccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(pccb); } break; ... case XPT_SCAN_LUN: { #ifdef DC395x_trm_DEBUG1 printf(" XPT_SCAN_LUN \n"); #endif pccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(pccb); } break; From this fragment of code I really don't understand why there isn't at least an error message. And what is more: what happens when FreeBSD is scanning the devices on boot-time? That procedure obviously is working fine... cu Gerrit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 12: 1:58 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 9516F37B408 for ; Mon, 27 Aug 2001 12:01:46 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id NAA20603; Mon, 27 Aug 2001 13:01:31 -0600 (MDT) (envelope-from ken) Date: Mon, 27 Aug 2001 13:01:31 -0600 From: "Kenneth D. Merry" To: Gerrit Kuehn Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: problems with camcontrol rescan Message-ID: <20010827130130.A20496@panzer.kdm.org> References: <0108241008070E.15703@mako.pmp.uni-hannover.de> <20010824140054.A5088@panzer.kdm.org> <01082713450808.22981@mako.pmp.uni-hannover.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <01082713450808.22981@mako.pmp.uni-hannover.de>; from gerrit@pmp.uni-hannover.de on Mon, Aug 27, 2001 at 01:41:22PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Aug 27, 2001 at 13:41:22 +0200, Gerrit Kuehn wrote: > Am Fri, 24 Aug 2001 schrieb Kenneth D. Merry > > > It sounds like what is likely happening is that the controller isn't > > returning some of the CCBs that are being sent down to scan the bus. Since > > the CCBs don't get returned, the rescan hangs forever. This is just > > speculation, though; I haven't looked at the driver. > > BTW: Joerg Wunsch, who advised me to state my problem in this list here, already > did have a quick look at the source of the driver. This is what he sent me: > > case XPT_SCAN_BUS: > { > #ifdef DC395x_trm_DEBUG1 > printf(" XPT_SCAN_BUS \n"); > #endif > pccb->ccb_h.status = CAM_REQ_INVALID; > xpt_done(pccb); > } > break; > > ... > > case XPT_SCAN_LUN: > { > #ifdef DC395x_trm_DEBUG1 > printf(" XPT_SCAN_LUN \n"); > #endif > pccb->ccb_h.status = CAM_REQ_INVALID; > xpt_done(pccb); > } > break; > > > >From this fragment of code I really don't understand why there isn't at least > an error message. Well, the HBA driver doesn't have to deal with XPT_SCAN_BUS and XPT_SCAN_LUN CCBs. Those CCB types are handled by the transport layer and then translated into SCSI commands which are then sent to the HBA driver. HBA drivers should send back an error if you send down a scan bus or scan lun ccb, but there's probably no need to print something. > And what is more: what happens when FreeBSD is scanning the devices on > boot-time? That procedure obviously is working fine... It's pretty much the same code path at boot time. That's why it's somewhat puzzling that it's hanging up. Rescanning seems to work with other HBAs, though. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 12: 5: 3 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 4E21437B401; Mon, 27 Aug 2001 12:04:57 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id NAA20633; Mon, 27 Aug 2001 13:04:39 -0600 (MDT) (envelope-from ken) Date: Mon, 27 Aug 2001 13:04:39 -0600 From: "Kenneth D. Merry" To: David Malone Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG, groudier@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010827130439.B20496@panzer.kdm.org> References: <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org> <20010826122401.A13602@panzer.kdm.org> <20010826204458.A18333@melusine.cuivre.fr.eu.org> <20010826132958.A13920@panzer.kdm.org> <20010827010914.A2265@melusine.cuivre.fr.eu.org> <20010826172020.A15037@panzer.kdm.org> <20010827115938.A75639@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20010827115938.A75639@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Mon, Aug 27, 2001 at 11:59:38AM +0100 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Aug 27, 2001 at 11:59:38 +0100, David Malone wrote: > On Sun, Aug 26, 2001 at 05:20:20PM -0600, Kenneth D. Merry wrote: > > 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've been seeing something very similar to this with an adv controler > and a HP CD burner. I'd say it started about 3 months ago in -current, > I'll check the messages I'm getting to make sure the message is the > same - but I definitely get the "device lost" message shortly after > boot. We'll need some more details. If it is -current, the messages may not be the same. Does it happen with media in or out of the drive? If there is media in the drive, what kind of media? What happens if you do a read capacity on the drive after it has booted? (See the camcontrol commands I sent out earlier in the thread.) Anyway, a full dmesg from both failing and working scenarios would be helpful. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 12:38:45 2001 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Mon Aug 27 12:54:58 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id ABA3337B406; Mon, 27 Aug 2001 12:54:48 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id NAA21204; Mon, 27 Aug 2001 13:54:40 -0600 (MDT) (envelope-from ken) Date: Mon, 27 Aug 2001 13:54:40 -0600 From: "Kenneth D. Merry" To: =?iso-8859-1?Q?G=E9rard_Roudier?= Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010827135440.A21092@panzer.kdm.org> References: <20010826172020.A15037@panzer.kdm.org> <20010827211435.C1471-100000@gerard> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010827211435.C1471-100000@gerard>; from groudier@free.fr on Mon, Aug 27, 2001 at 09:35:28PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Aug 27, 2001 at 21:35:28 +0200, Gérard Roudier wrote: > 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 écrivait : > > > > > > > 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 ready, 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 = 0x40 status = 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 (?). They're on the -scsi list, I figured you were still on the list. See: http://docs.freebsd.org/mail/archive/2001/freebsd-scsi/20010826.freebsd-scsi.html http://docs.freebsd.org/mail/current/freebsd-scsi.html Yes, the first two lines are printed out by a patch I gave Thomas. (To figure out why the cd(4) driver was not attaching. It will attach, regardless of the SCSI sense sent back, unless the sense information is "logical unit not supported". When there is no sense, though, there's no way to figure out what's going on.) > 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? Yes, that is what it looks like is happening. Apparantly it only happens the first time we send a read capacity to the drive. (On probe.) Subsequent read capacity commands via camcontrol return CCBs with valid sense data and the CAM_AUTOSNS_VALID flag set. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 5:57: 1 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from pmp.uni-hannover.de (kirk.pmp.uni-hannover.de [130.75.117.28]) by hub.freebsd.org (Postfix) with ESMTP id D118637B401 for ; Tue, 28 Aug 2001 05:56:58 -0700 (PDT) (envelope-from gerrit@pmp.uni-hannover.de) Received: from mako.pmp.uni-hannover.de (mako [130.75.117.34]) by pmp.uni-hannover.de (8.9.3+Sun/8.9.3) with SMTP id OAA00156; Tue, 28 Aug 2001 14:58:06 +0200 (MEST) From: Gerrit Kuehn To: "Kenneth D. Merry" Subject: Re: problems with camcontrol rescan Date: Tue, 28 Aug 2001 14:54:25 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <0108241008070E.15703@mako.pmp.uni-hannover.de> <01082707530500.22981@mako.pmp.uni-hannover.de> <20010827130559.C20496@panzer.kdm.org> In-Reply-To: <20010827130559.C20496@panzer.kdm.org> Cc: freebsd-scsi@FreeBSD.ORG MIME-Version: 1.0 Message-Id: <01082814561503.24795@mako.pmp.uni-hannover.de> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Am Mon, 27 Aug 2001 schrieb Kenneth D. Merry > > Unfortunately I don't have a spare controller at the moment to test this; I > > would have to buy one. Well, perhaps I can ,,lend'' a card somewhere here in > > our institute for a day or two... > Yeah, borrowing a controller would be a quick way to figure out whether > it's a problem with the driver or a more generic problem. I just run over a small AdvanSys narrow card that came with some kind of scanner. I'll take this one home and give it a try. cu Gerrit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 13: 3:15 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from postfix2-1.free.fr (postfix2-1.free.fr [213.228.0.9]) by hub.freebsd.org (Postfix) with ESMTP id E678A37B406; Tue, 28 Aug 2001 13:03:02 -0700 (PDT) (envelope-from groudier@free.fr) Received: from nas-cbv-7-23-44.dial.proxad.net (nas-cbv-7-23-44.dial.proxad.net [213.228.23.44]) by postfix2-1.free.fr (Postfix) with ESMTP id A561D28E; Tue, 28 Aug 2001 22:02:59 +0200 (CEST) Date: Tue, 28 Aug 2001 22:00:11 +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: <20010827135440.A21092@panzer.kdm.org> Message-ID: <20010828212323.J1476-100000@gerard> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 27 Aug 2001, Kenneth D. Merry wrote: > On Mon, Aug 27, 2001 at 21:35:28 +0200, G=E9rard Roudier wrote: > > 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 repo= rted > > > > 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 n= ot ready, 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 the= re > > > > 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 autose= nse > > > 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 a= re > > printed from the code. May-be they are just printed out by your patch (= ?). > > They're on the -scsi list, I figured you were still on the list. > > See: > > http://docs.freebsd.org/mail/archive/2001/freebsd-scsi/20010826.freebsd-s= csi.html > http://docs.freebsd.org/mail/current/freebsd-scsi.html > > Yes, the first two lines are printed out by a patch I gave Thomas. (To > figure out why the cd(4) driver was not attaching. It will attach, > regardless of the SCSI sense sent back, unless the sense information is > "logical unit not supported". When there is no sense, though, there's no > way to figure out what's going on.) > > > If I understand your statement, the SIM is reported a CHECK CONDITION S= CSI > > status from the device, but does not assert the CAM_AUTOSNS_VALID flag.= Is > > my guessing correct? > > Yes, that is what it looks like is happening. Apparantly it only happens > the first time we send a read capacity to the drive. (On probe.) > Subsequent read capacity commands via camcontrol return CCBs with valid > 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_ERROR on either CHECK CONDITION or TERMINATED STATUS. If an error occurs during auto-sense, the driver should either return some severe cam status value, or indicate that sense data are not valid in the cam status. It would have been fine to also display out the actual value of the scsi 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 another try with his CD burner. This 1% of chance for another SCSI status to have been returned gives the 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. G=E9rard. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 15: 8:43 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 2C30137B401; Tue, 28 Aug 2001 15:08:38 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id E65648366; Wed, 29 Aug 2001 00:08:35 +0200 (CEST) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id CC5FF24D45; Wed, 29 Aug 2001 00:08:34 +0200 (CEST) Date: Wed, 29 Aug 2001 00:08:34 +0200 From: Thomas Quinot To: =?iso-8859-1?Q?G=E9rard_Roudier?= Cc: "Kenneth D. Merry" , Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010829000834.A22196@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010828212323.J1476-100000@gerard>; from groudier@free.fr on Tue, Aug 28, 2001 at 10:00:11PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Le 2001-08-28, Gérard Roudier écrivait : >>>>> (cd0:sym0:0:2:0): autosense is NOT valid >>>>> (cd0:sym0:0:2:0): flags = 0x40 status = 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 > It would have been fine to also display out the actual value of the scsi > 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 another > try with his CD burner. Hum... You are crediting me with more knowledge of the SCSI subsystem's internals than I deserve ;) Do you mean that I should trace the status in sym_sir_bad_scsi_status? As far as scsi_cd is concerned, Kenneth's patch did already trace status = done_ccb->ccb_h.status (2nd line of output above.) Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 15:37:29 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 8926937B407; Tue, 28 Aug 2001 15:37:16 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id QAA31981; Tue, 28 Aug 2001 16:28:12 -0600 (MDT) (envelope-from ken) Date: Tue, 28 Aug 2001 16:28:12 -0600 From: "Kenneth D. Merry" To: =?iso-8859-1?Q?G=E9rard_Roudier?= Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010828162812.A31937@panzer.kdm.org> References: <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010828212323.J1476-100000@gerard>; from groudier@free.fr on Tue, Aug 28, 2001 at 10:00:11PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Aug 28, 2001 at 22:00:11 +0200, Gérard Roudier wrote: > On Mon, 27 Aug 2001, Kenneth D. Merry wrote: > > On Mon, Aug 27, 2001 at 21:35:28 +0200, Gérard Roudier wrote: > > > 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 écrivait : > > > > > > > > > > > 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 ready, 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 = 0x40 status = 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 (?). > > > > They're on the -scsi list, I figured you were still on the list. > > > > See: > > > > http://docs.freebsd.org/mail/archive/2001/freebsd-scsi/20010826.freebsd-scsi.html > > http://docs.freebsd.org/mail/current/freebsd-scsi.html > > > > Yes, the first two lines are printed out by a patch I gave Thomas. (To > > figure out why the cd(4) driver was not attaching. It will attach, > > regardless of the SCSI sense sent back, unless the sense information is > > "logical unit not supported". When there is no sense, though, there's no > > way to figure out what's going on.) > > > > > 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? > > > > Yes, that is what it looks like is happening. Apparantly it only happens > > the first time we send a read capacity to the drive. (On probe.) > > Subsequent read capacity commands via camcontrol return CCBs with valid > > 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_ERROR > on either CHECK CONDITION or TERMINATED STATUS. If an error occurs during > auto-sense, the driver should either return some severe cam status value, > 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 scsi > 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 another > 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.) > This 1% of chance for another SCSI status to have been returned gives the > 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. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 15:41:59 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id BE34037B401; Tue, 28 Aug 2001 15:41:49 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id QAA32026; Tue, 28 Aug 2001 16:32:11 -0600 (MDT) (envelope-from ken) Date: Tue, 28 Aug 2001 16:32:11 -0600 From: "Kenneth D. Merry" To: Thomas Quinot Cc: =?iso-8859-1?Q?G=E9rard_Roudier?= , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010828163211.A32009@panzer.kdm.org> References: <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> <20010829000834.A22196@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010829000834.A22196@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Wed, Aug 29, 2001 at 12:08:34AM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Wed, Aug 29, 2001 at 00:08:34 +0200, Thomas Quinot wrote: > Le 2001-08-28, Gérard Roudier écrivait : > > >>>>> (cd0:sym0:0:2:0): autosense is NOT valid > >>>>> (cd0:sym0:0:2:0): flags = 0x40 status = 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 > > > It would have been fine to also display out the actual value of the scsi > > 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 another > > try with his CD burner. > > Hum... You are crediting me with more knowledge of the SCSI subsystem's > internals than I deserve ;) Do you mean that I should trace the status > in sym_sir_bad_scsi_status? As far as scsi_cd is concerned, Kenneth's > patch did already trace status = done_ccb->ccb_h.status (2nd line of > output above.) Apply the attached patch in place of the one I gave you before and send the output when you boot. This will print out the SCSI status byte. This problem is happening with a bad CD-R, right? Ken -- Kenneth Merry ken@kdm.org --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.c.autosense_test.20010828" ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c#4 - /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c ==== *** /tmp/tmp.2660.0 Tue Aug 28 16:30:27 2001 --- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c Tue Aug 28 16:29:45 2001 *************** *** 1699,1707 **** if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) ! || ((status & CAM_AUTOSNS_VALID) == 0)) have_sense = FALSE; ! else have_sense = TRUE; if (have_sense) { --- 1699,1722 ---- if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) ! || ((status & CAM_AUTOSNS_VALID) == 0)) { ! if (status & CAM_AUTOSNS_VALID) { ! xpt_print_path(periph->path); ! printf("autosense is valid\n"); ! } else { ! xpt_print_path(periph->path); ! printf("autosense is NOT " ! "valid\n"); ! } ! xpt_print_path(periph->path); ! printf("flags = %#x status = %#x\n", ! csio->ccb_h.flags, status); ! xpt_print_path(periph->path); ! printf("SCSI status = %#x\n", ! csio->scsi_status); ! have_sense = FALSE; ! } else have_sense = TRUE; if (have_sense) { --+QahgC5+KEYLbs62-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Aug 28 23: 3:18 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from pmp.uni-hannover.de (kirk.pmp.uni-hannover.de [130.75.117.28]) by hub.freebsd.org (Postfix) with ESMTP id AA55A37B405 for ; Tue, 28 Aug 2001 23:03:14 -0700 (PDT) (envelope-from gerrit@pmp.uni-hannover.de) Received: from mako.pmp.uni-hannover.de (mako [130.75.117.34]) by pmp.uni-hannover.de (8.9.3+Sun/8.9.3) with SMTP id IAA01520; Wed, 29 Aug 2001 08:04:32 +0200 (MEST) From: Gerrit Kuehn To: "Kenneth D. Merry" Subject: Re: problems with camcontrol rescan Date: Wed, 29 Aug 2001 07:59:00 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <0108241008070E.15703@mako.pmp.uni-hannover.de> <01082707530500.22981@mako.pmp.uni-hannover.de> <20010827130559.C20496@panzer.kdm.org> In-Reply-To: <20010827130559.C20496@panzer.kdm.org> Cc: freebsd-scsi@FreeBSD.ORG MIME-Version: 1.0 Message-Id: <01082908024004.25982@mako.pmp.uni-hannover.de> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Am Mon, 27 Aug 2001 schrieb Kenneth D. Merry > Yeah, borrowing a controller would be a quick way to figure out whether > it's a problem with the driver or a more generic problem. I borrowed a small AdvanSys card from a colleague and gave it a try yesterday evening. It works without any problems and I can also rescan the MOD, while rescanning the second scsi bus with the TekRAM-controller and the CDRW still hangs. After this I would say TekRAM's driver is simply broken... :-( I already wrote TekRAM an email about this problem more than a week ago but I got zero response until now... :-( cu Gerrit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 0:52:39 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 5766537B406; Wed, 29 Aug 2001 00:52:25 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id CE2A08118; Wed, 29 Aug 2001 09:51:26 +0200 (CEST) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id EAEF124D46; Wed, 29 Aug 2001 09:50:54 +0200 (CEST) Date: Wed, 29 Aug 2001 09:50:54 +0200 From: Thomas Quinot To: "Kenneth D. Merry" Cc: =?iso-8859-1?Q?G=E9rard_Roudier?= , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010829095054.A69323@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> <20010829000834.A22196@melusine.cuivre.fr.eu.org> <20010828163211.A32009@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010828163211.A32009@panzer.kdm.org>; from ken@kdm.org on Tue, Aug 28, 2001 at 04:32:11PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Le 2001-08-29, Kenneth D. Merry écrivait : > Apply the attached patch in place of the one I gave you before and send the > output when you boot. This will print out the SCSI status byte. Thanks, applied, I'll let you know as soon as I get a chance to reboot. > This problem is happening with a bad CD-R, right? Yes. Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 8:38:42 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 560B437B406 for ; Wed, 29 Aug 2001 08:38:38 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id JAA37670; Wed, 29 Aug 2001 09:38:32 -0600 (MDT) (envelope-from ken) Date: Wed, 29 Aug 2001 09:38:32 -0600 From: "Kenneth D. Merry" To: Gerrit Kuehn Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: problems with camcontrol rescan Message-ID: <20010829093832.B37551@panzer.kdm.org> References: <0108241008070E.15703@mako.pmp.uni-hannover.de> <01082707530500.22981@mako.pmp.uni-hannover.de> <20010827130559.C20496@panzer.kdm.org> <01082908024004.25982@mako.pmp.uni-hannover.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <01082908024004.25982@mako.pmp.uni-hannover.de>; from gerrit@pmp.uni-hannover.de on Wed, Aug 29, 2001 at 07:59:00AM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Aug 29, 2001 at 07:59:00 +0200, Gerrit Kuehn wrote: > Am Mon, 27 Aug 2001 schrieb Kenneth D. Merry > > > Yeah, borrowing a controller would be a quick way to figure out whether > > it's a problem with the driver or a more generic problem. > > I borrowed a small AdvanSys card from a colleague and gave it a try yesterday > evening. It works without any problems and I can also rescan the MOD, while > rescanning the second scsi bus with the TekRAM-controller and the CDRW still > hangs. After this I would say TekRAM's driver is simply broken... :-( > I already wrote TekRAM an email about this problem more than a week ago but I > got zero response until now... :-( Well, if you're up for digging into the Tekram driver, you can try to fix the problem yourself. :) Otherwise, the easiest thing is probably to look for a better-supported controller. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 11:28:34 2001 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 13:27:18 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from beppo.feral.com (beppo.feral.com [192.67.166.79]) by hub.freebsd.org (Postfix) with ESMTP id 7C56737B407 for ; Wed, 29 Aug 2001 13:27:15 -0700 (PDT) (envelope-from mjacob@feral.com) Received: from mailhost.feral.com (mjacob@mailhost.feral.com [192.67.166.1]) by beppo.feral.com (8.11.3/8.11.3) with ESMTP id f7TKR9I35306 for ; Wed, 29 Aug 2001 13:27:09 -0700 (PDT) (envelope-from mjacob@feral.com) Date: Wed, 29 Aug 2001 13:27:09 -0700 (PDT) From: Matthew Jacob X-Sender: mjacob@beppo Reply-To: mjacob@feral.com To: scsi@freebsd.org Subject: Re: tape testers wanted for freebsd-current In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 'ullo? anyone 'ome? On Fri, 24 Aug 2001, Matthew Jacob wrote: > > I've made some changes which cleared up problems with EOM handling and > correctly doing things with QIC. I hope. I have done a lot of testing, but > this is an area which, sad to say, can take a lot to get right and it's easy > to miss things. > > I've done several passes of my tape pattern tester for: > > TANDBERG SLR5 4/8GB > ARCHIVE Python 29279-XXX > DEC TLZ09 > EXABYTE 8500S > EXABYTE 8505XL > HP DDS3 4mm > DEC DLT4000 > QIC-150 > > and I did spanned tape backups and restores and compares for the TANDBERG and > the ARCHIVE. I also did a couple of runs using an eot model of 1 even for > variable drives like the DDS3 4mm. > > In the process of all this testing I killed my DLT4000, killed one Exabyte > 8505 and had to buy on EBay a couple of more drives. I think at this point I'd > like some of the actual users of tape stuff in FreeBSD to help out and see if > things work for them or not. > > If you all would be so kind- could you fetch > > http://people.freebsd.org/~mjacob/scsi_sa.c > > and give it a shot? I'll be away until next wednesday (I have to go to > Minneapolis on a business trip)- and can't easily check email while I'm away- > but I really would like feedback- thanks! > > -matt > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 14:47: 9 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 2774B37B40F; Wed, 29 Aug 2001 14:47:01 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id PAA40286; Wed, 29 Aug 2001 15:46:46 -0600 (MDT) (envelope-from ken) Date: Wed, 29 Aug 2001 15:46:46 -0600 From: "Kenneth D. Merry" To: =?iso-8859-1?Q?G=E9rard_Roudier?= Cc: Thomas Quinot , stable@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: Failure to attach SCSI CD burner Message-ID: <20010829154646.A40267@panzer.kdm.org> References: <20010828162812.A31937@panzer.kdm.org> <20010829201629.B1561-100000@gerard> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010829201629.B1561-100000@gerard>; from groudier@free.fr on Wed, Aug 29, 2001 at 08:25:31PM +0200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Aug 29, 2001 at 20:25:31 +0200, Gérard Roudier wrote: > On Tue, 28 Aug 2001, Kenneth D. Merry wrote: > > > > > Yes, that is what it looks like is happening. Apparantly it only happens > > > > the first time we send a read capacity to the drive. (On probe.) > > > > Subsequent read capacity commands via camcontrol return CCBs with valid > > > > 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_ERROR > > > on either CHECK CONDITION or TERMINATED STATUS. If an error occurs during > > > auto-sense, the driver should either return some severe cam status value, > > > 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 scsi > > > 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 another > > > 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. Ahh. > > > This 1% of chance for another SCSI status to have been returned gives the > > > 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. True enough, I'll need to figure out what I want to do when the status is busy. (i.e. attach or not attach. I'll probably just attach.) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 15:11: 2 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com [216.136.173.58]) by hub.freebsd.org (Postfix) with SMTP id 5D94B37B403 for ; Wed, 29 Aug 2001 15:10:58 -0700 (PDT) (envelope-from kc5vdj@yahoo.com) Received: from mkc-65-28-47-209.kc.rr.com (HELO yahoo.com) (65.28.47.209) by smtp.mail.vip.sc5.yahoo.com with SMTP; 29 Aug 2001 22:10:57 -0000 X-Apparently-From: Message-ID: <3B8D6870.4010804@yahoo.com> Date: Wed, 29 Aug 2001 17:10:56 -0500 From: Jim Bryant Reply-To: kc5vdj@yahoo.com User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: mjacob@feral.com Cc: scsi@freebsd.org Subject: Re: tape testers wanted for freebsd-current References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Tested and seems to work fine on a HP C1533 DDS-2 drive. A mysterious filesystem corruption of /var happened the day after I did a two-tape dump, and the fixed tape driver was a godsend! I would have reported back last night, but some moron driving a backhoe dealt a 22-hour fatal blow to Time Warner/Roadrunner locally, and it all was restored about half an hour ago... Thanks Matt! Matthew Jacob wrote: > 'ullo? anyone 'ome? > > > On Fri, 24 Aug 2001, Matthew Jacob wrote: > > >>I've made some changes which cleared up problems with EOM handling and >>correctly doing things with QIC. I hope. I have done a lot of testing, but >>this is an area which, sad to say, can take a lot to get right and it's easy >>to miss things. >> >>I've done several passes of my tape pattern tester for: >> >>TANDBERG SLR5 4/8GB >>ARCHIVE Python 29279-XXX >>DEC TLZ09 >>EXABYTE 8500S >>EXABYTE 8505XL >>HP DDS3 4mm >>DEC DLT4000 >>QIC-150 >> >>and I did spanned tape backups and restores and compares for the TANDBERG and >>the ARCHIVE. I also did a couple of runs using an eot model of 1 even for >>variable drives like the DDS3 4mm. >> >>In the process of all this testing I killed my DLT4000, killed one Exabyte >>8505 and had to buy on EBay a couple of more drives. I think at this point I'd >>like some of the actual users of tape stuff in FreeBSD to help out and see if >>things work for them or not. >> >>If you all would be so kind- could you fetch >> >> http://people.freebsd.org/~mjacob/scsi_sa.c >> >>and give it a shot? I'll be away until next wednesday (I have to go to >>Minneapolis on a business trip)- and can't easily check email while I'm away- >>but I really would like feedback- thanks! >> >>-matt >> >> >> >> >> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-scsi" in the body of the message > > -- ET has one helluva sense of humor! He's always anal-probing right-wing schizos! _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Aug 29 16:43:52 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from smtp2.ihug.co.nz (smtp2.ihug.co.nz [203.109.252.8]) by hub.freebsd.org (Postfix) with ESMTP id A9E9D37B403 for ; Wed, 29 Aug 2001 16:43:43 -0700 (PDT) (envelope-from kluckie@ihug.co.nz) Received: from neoprene (203-173-203-216.nzwide.ihug.co.nz [203.173.203.216]) by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id LAA32421 for ; Thu, 30 Aug 2001 11:41:58 +1200 X-Authentication-Warning: smtp2.ihug.co.nz: Host 203-173-203-216.nzwide.ihug.co.nz [203.173.203.216] claimed to be neoprene Message-ID: <003201c130e4$1819b820$0a00a8c0@neoprene> From: "Matthew Luckie" To: Subject: aic6360 Date: Thu, 30 Aug 2001 11:41:09 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi I'm not sure if cards with the aic6360 chipset are supported in freebsd. aic0: at port 0x340-0x35f irq 12 on isa0 aic0: aic6360, dma, disconnection, parity check Anyway, i have two ISA scsi controllers with this chip on it - the mighty aha1502i SB and the equally mighty aha1505. Both of them are jumpered to irq 12 and port 0x340. I am wanting to run an old 1gb scsi drive in my pc that will hold /usr/src to free up space on my 2gb IDE drive so i can install more ports. I am running FreeBSD 4.4-RC cvsup'd 5 days ago. da0 at aic0 bus 0 target 6 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 5.000MB/s transfers (5.000MHz, offset 8), Tagged Queueing Enabled da0: 1013MB (2074880 512 byte sectors: 64H 32S/T 1013C) this drive had a fat partition on it; i copied all my data off it and then added the disk to freebsd with /stand/sysinstall as laid out in the handbook. the drive now has a freebsd file system on it. everything was going good with the drive and the cheap controller until i wanted to put usr/src on it. to start with i did this: cd /usr && tar -czf src.tar.gz src/ i then copied the 85mb tar over to the 1gb drive. the tar went over perfectly (sequential I/O). then i tried to extract the tar. the drive will work for about 10 seconds doing heavy random i/o and then hang. the light on the front of the drive remains on for about 10seconds and then goes off. I get messages such as the following: Aug 29 22:43:53 lycra /kernel: (da0:aic0:0:6:0): ccb 0xc0a8a000 - timed out, nexus 0xc0bd7800, phase 0xc6, state 4 Aug 29 22:45:08 lycra /kernel: (da0:aic0:0:6:0): ccb 0xc0a8c400 - timed out, nexus 0xc0bc1000, phase 0x84, state 4 While the machine is still responsive to do anything else, if i try and shutdown -h now the machine it doesnt seem to ever shut down, and i have to power cycle it. I am reasonably sure that I have the scsi bus terminated correctly: i have tried with a terminator and a zip drive that can be jumpered to terminate. This is my dmesg output at boot Copyright (c) 1992-2001 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.4-RC #9: Wed Aug 29 14:35:21 NZST 2001 root@lycra:/usr/src/sys/compile/MATTHEW Timecounter "i8254" frequency 1193182 Hz CPU: Pentium Pro (180.00-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x617 Stepping = 7 Features=0xfbff real memory = 134217728 (131072K bytes) avail memory = 127152128 (124172K bytes) Programming 24 pins in IOAPIC #0 IOAPIC #0 intpin 2 -> irq 0 FreeBSD/SMP: Multiprocessor motherboard cpu0 (BSP): apic id: 1, version: 0x00040011, at 0xfee00000 cpu1 (AP): apic id: 0, version: 0x00040011, at 0xfee00000 io0 (APIC): apic id: 2, version: 0x00170011, at 0xfec00000 Preloaded elf kernel "kernel" at 0xc0378000. Pentium Pro MTRR support enabled md0: Malloc disk npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard IOAPIC #0 intpin 16 -> irq 2 IOAPIC #0 intpin 18 -> irq 16 pci0: on pcib0 isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 pci0: at 12.0 irq 2 ed0: port 0x7f40-0x7f5f irq 16 at device 14.0 on pci0 ed0: address 00:00:21:10:49:c1, type NE2000 (16 bit) orm0: