From owner-freebsd-stable Sun Aug 26 12:30: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 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-stable@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-stable" in the body of the message