From owner-freebsd-scsi Mon May 19 08:51:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA28769 for freebsd-scsi-outgoing; Mon, 19 May 1997 08:51:03 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id IAA28764 for ; Mon, 19 May 1997 08:50:55 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id RAA18495; Mon, 19 May 1997 17:50:47 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id RAA00931; Mon, 19 May 1997 17:45:16 +0200 (MET DST) Message-ID: <19970519174516.AT53845@uriah.heep.sax.de> Date: Mon, 19 May 1997 17:45:16 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-scsi@FreeBSD.ORG Cc: henrich@crh.cl.msu.edu (Charles Henrich) Subject: Re: scsi library interface References: <19970518184034.10726@crh.cl.msu.edu> <19970519103618.LH45116@uriah.heep.sax.de> <19970519110533.07999@crh.cl.msu.edu> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <19970519110533.07999@crh.cl.msu.edu>; from Charles Henrich on May 19, 1997 11:05:33 -0400 Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Charles Henrich wrote: > Then why is it when you start sending raw SCSI read commands to > rcd0.ctl behind which lives a Toshiba, you explode the SCSI bus, yet > if you send them to /dev/cd0c things appear to work? (And with a > plextor, both work!) There is not much difference between both when it comes to passing down raw SCSI commands. They are caught by the upper layers of the SCSI driver and never passed down to the type driver. If you see a difference, it probably means you don't initialize the device correctly. Opening a regular device causes a series of actions like checking for the device being ready, sending a START UNIT command etc., whereas opening the control devices causes nothing of this. Needless to say, no userland program is meant to issue READ or WRITE commands to a CD-ROM drive at all... I would be much more happy if you would think about integrating all this into the type drivers. I've already exchanged a few ideas with Jean-Marc Zucchoni lately, who became very active on the CD-R front. Reading and writing devices in userland when there's a real device driver for it violates the layering principles. Things like jitter correction don't belong in the kernel however. Either you've got a ``good'' device, then you can copy the data with dd(1), or you don't, then you still need cdd(1) doing the error correction for you (but not doing the actual read/write). NB: the above is an ideal picture, and the ultimate goal for the future. It's not immediately reachable, see also my recent discussion about the bogus field b_blkno in the struct buf (it needs to become a b_offset in order to cope with block sizes that are not a power of 2 multiple of 512). -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)