From owner-freebsd-stable Thu Aug 30 9:29:23 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 20E9437B40A; Thu, 30 Aug 2001 09:28:50 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id KAA47165; Thu, 30 Aug 2001 10:28:20 -0600 (MDT) (envelope-from ken) Date: Thu, 30 Aug 2001 10:28:20 -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: <20010830102820.A47131@panzer.kdm.org> References: <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> <20010829000834.A22196@melusine.cuivre.fr.eu.org> <20010828163211.A32009@panzer.kdm.org> <20010829095054.A69323@melusine.cuivre.fr.eu.org> <20010830090601.A554@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20010830090601.A554@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Thu, Aug 30, 2001 at 09:06:01AM +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 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Aug 30, 2001 at 09:06:01 +0200, Thomas Quinot wrote: > Le 2001-08-29, Thomas Quinot é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. > > OK, here we are: > > (cd0:sym0:0:2:0): autosense is NOT valid > (cd0:sym0:0:2:0): flags = 0x40 status = 0x4c > (cd0:sym0:0:2:0): SCSI status = 0x8 > (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 > > Isn't that 'SCSI_STATUS_BUSY' ? Yes it is. Here's a patch that should fix your problem. The only SCSI status I've allowed through (besides check condition) is busy. The rest are either not likely or are grounds for failing the attach. Let me know if this fixes your problem. Ken -- Kenneth Merry ken@kdm.org --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.c.busy_fix.20010830" ==== //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.1698.0 Thu Aug 30 10:25:20 2001 --- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c Thu Aug 30 10:20:57 2001 *************** *** 1725,1731 **** scsi_sense_key_text[sense_key], scsi_sense_desc(asc,ascq, &cgd.inq_data)); ! else if (SID_TYPE(&cgd.inq_data) == T_CDROM) { /* * We only print out an error for * CDROM type devices. For WORM --- 1725,1740 ---- scsi_sense_key_text[sense_key], scsi_sense_desc(asc,ascq, &cgd.inq_data)); ! else if ((have_sense == 0) ! && ((status & CAM_STATUS_MASK) == ! CAM_SCSI_STATUS_ERROR) ! && (csio->scsi_status == ! SCSI_STATUS_BUSY)) { ! snprintf(announce_buf, ! sizeof(announce_buf), ! "Attempt to query device " ! "size failed: SCSI status: BUSY"); ! } else if (SID_TYPE(&cgd.inq_data) == T_CDROM) { /* * We only print out an error for * CDROM type devices. For WORM --k1lZvvs/B4yU6o8G-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message