From owner-freebsd-scsi Mon Jun 22 23:31:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA01511 for freebsd-scsi-outgoing; Mon, 22 Jun 1998 23:31:07 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA01501 for ; Mon, 22 Jun 1998 23:31:03 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.0/8.9.0) with ESMTP id PAA08388; Tue, 23 Jun 1998 15:44:54 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.0/8.9.0) id PAA00397; Tue, 23 Jun 1998 15:43:47 +0930 (CST) Message-ID: <19980623154334.A392@freebie.lemis.com> Date: Tue, 23 Jun 1998 15:43:34 +0930 From: Greg Lehey To: "Kenneth D. Merry" , Joao Carlos Mendes Luis Cc: mjacob@feral.com, julian@whistle.com, ckempf@enigami.com, freebsd-scsi@FreeBSD.ORG Subject: Re: Rolling CAM in, what is still needed? References: <199806191742.OAA02683@roma.coe.ufrj.br> <199806210305.VAA20485@panzer.plutotech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <199806210305.VAA20485@panzer.plutotech.com>; from Kenneth D. Merry on Sat, Jun 20, 1998 at 09:05:37PM -0600 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 20 June 1998 at 21:05:37 -0600, Kenneth D. Merry wrote: > Joao Carlos Mendes Luis wrote... >> #define quoting(Kenneth D. Merry) >>> - the problem is that with the old SCSI code, to send SCSI commands >>> directly to a device, you opened the device itself (/dev/rcd0a or >>> whatever) and did the SCIOCCOMMAND ioctl on that device. CAM does >>> things differently, primarily because users may want to send >>> commands to device, even though the device's open() routine may >>> fail. For instance, you can't open a CD device if there is no >>> media inserted. But the user may want to send an INQUIRY command >>> to the drive, whether or not there's a CD in the drive. So, to >>> solve this, you have two choices: (that I can think of offhand) >>> - have a special control minor number for each device, and >>> have the open call ignore failures in read capacity, test >>> unit ready, etc. >>> - have a separate passthrough driver that doesn't have to >>> have any commands succeed to attach or open. >> >> Isn't this what /dev/xxx.ctl does ? > > My guess is that that is what it was supposed to do in theory, but > in practice, I don't think it does. I looked at the open routines in the > current cd, sd and st drivers, and none of them check to see if it was the > control device that was opened. So if no media is in the drive, the open > will fail. This matches my experience. Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message