Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 1998 21:05:37 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        jonny@jonny.eng.br (Joao Carlos Mendes Luis)
Cc:        ken@plutotech.com, mjacob@feral.com, julian@whistle.com, jonny@jonny.eng.br, ckempf@enigami.com, freebsd-scsi@FreeBSD.ORG
Subject:   Re: Rolling CAM in, what is still needed?
Message-ID:  <199806210305.VAA20485@panzer.plutotech.com>
In-Reply-To: <199806191742.OAA02683@roma.coe.ufrj.br> from Joao Carlos Mendes Luis at "Jun 19, 98 02:42:45 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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.


Ken
-- 
Kenneth Merry
ken@plutotech.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806210305.VAA20485>