Subject: Re: Device Drivers Info wanted
To: John Marohn <marohn@iquest.net>
From: "" <is@beverly.rhein.de>
List: tech-kern
Date: 02/15/1996 11:59:05
In article <v01530500ad438162e94a@[206.53.236.102]> marohn@iquest.net
(John Marohn) wrote:

: Where can I find info on how to write a device driver for a Magneto Optical
: drive?  Maybe I can modify an existing driver.

Should work out of the box. The scsi disk driver attaches to fixed or
removable magnetic or optical disks.

: Currently it is recognized as a scsi disk (sd?). 

Which seems correct to me :-)

:						    I don't know the disk
: geometry so using it as a disk is out of the question.

: The drive is reported by NetBSD as not to support a mode sense command.

Then it is severely broken. The device is asked with a READ CAPACITY
command about its size, and on any failing command, a MODE SENSE would
be sent (I guess) to get the exact error code. Maybe some entry in the
scsi_quirks table in scsiconf.c will help you, but I don't know... especially,
you should be more specific about the error message: what is the exact wording?
When does it appear, in the kernel startup messages or at a later time?
  
:							I would like to use
: it as a tape drive.  I can tar to it as long as I don't exceed the capacity
: of the disk.

Just use it --- no kernel change necessary. To be precise, use the raw version 
of it, that is, /dev/rsd5c (if it is your 5th scsi disk). Be sure you use the number
reported when the kernel boots.

: 
: I found a file, /usr/src/sys/scsi/st.c, that appears to be the one to
: modify since it has ident strings for various tape drives.  Is this file to
: modify?

Most certainly not, IMHO.

please excuse my slight reordering of the stuff. I'm forwarding it to
tech-kern, which is the only list which can help you.

	Ignatios Souvatzis