From owner-freebsd-scsi Fri Jun 19 10:31:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA27055 for freebsd-scsi-outgoing; Fri, 19 Jun 1998 10:31:59 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from panzer.plutotech.com (ken@panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA26926 for ; Fri, 19 Jun 1998 10:31:19 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.8.8/8.8.5) id LAA12458; Fri, 19 Jun 1998 11:30:01 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199806191730.LAA12458@panzer.plutotech.com> Subject: Re: Rolling CAM in, what is still needed? In-Reply-To: <358A909B.1DF72290@feral.com> from Matthew Jacob at "Jun 19, 98 09:23:55 am" To: mjacob@feral.com (Matthew Jacob) Date: Fri, 19 Jun 1998 11:30:01 -0600 (MDT) Cc: julian@whistle.com, ken@plutotech.com, jonny@jonny.eng.br, ckempf@enigami.com, freebsd-scsi@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Matthew Jacob wrote... > Julian Elischer wrote: > > > > Surely the old interface is pretty generic.. > > > > (userland scsi that is) > > Yes, but how many of these are there that Ken hasn't done yet? Right, that's what I'm interested in. I talked to Julian this morning (in person, actually!) and that's the question I had. So I'll say it so everyone can see: - How many more programs use this (scsireq) interface? - Are people going to yell and scream loudly if it goes away when CAM is integrated into the tree?? I have already ported the largest application I know of that used the old scsireq interface. (I did it last fall, it's a big part of Pluto's products.) As far as generally available applications, I ported xmcd, Mike Smith ported cdrecord and Russell Cattelan has ported tosha. That leaves SANE and cdd. What other applications are out there, either publically available or in use privately? > If it's really a consensus on everyone's part to have the OLD > interfaces around, Ken, I'll help integrate that. Yeah, if there is enough need for it, I think we can do something, at least for one release or so. There are several issues here: - the old SCIOCCOMMAND ioctl can be emulated in the current passthrough driver, I did it at one time last year. - 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. For CAM, we chose the latter. Anyway, I've gotta go, so I'll just say that in order to have devices respond to the SCIOCCOMMAND ioctl in the same way, we'd have to wire code to handle that ioctl into each device driver's ioctl routine. (probably in cam_periph_ioctl()) I'd rather not kludge any of this up, though, unless someone can make a compelling case that it needs to be done. [ p.s. I won't be able to answer email again until tomorrow night. ] Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message