From owner-freebsd-stable Sun Aug 26 11:24:17 2001 Delivered-To: freebsd-stable@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-stable@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-stable" in the body of the message