Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 1996 23:40:27 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-scsi@FreeBSD.org (FreeBSD SCSI list)
Cc:        lslile@lexmark.com (Larry S Lile)
Subject:   Re: Pinnacle RCD Driver
Message-ID:  <199611082240.XAA08109@uriah.heep.sax.de>
In-Reply-To: <199611081632.AA02293@interlock.lexmark.com> from Larry S Lile at "Nov 8, 96 11:29:16 am"

next in thread | previous in thread | raw e-mail | index | archive | help
(Moved to -scsi)

As Larry S Lile wrote:

> > I am currently working on a driver for the Pinnacle RCD 5040i.  My 
> > original plan was to attempt to integrate support for this device under 
> > Joerg's worm driver but it differs to much from the HP/Phillips drives 
> > to do this (or at least for me to be able to)

Why?

I hesitate seeing multiple drivers for the same purpose unless really
necessary.  The driver framework in worm.c was meant to satisfy
different types of burners.  If this isn't true for a particular
device, we should really consider rewriting worm.c, instead of
whacking another driver.


> >   I am also trying to write the 
> > driver in such a way that I can interface directly back to Julian's cd 
> > driver to give the device full functionality as both an RCD and CD.

That's also on the TODO list for the worm driver.  I never got a good
idea how to integrate the `cd' stuff without duplicating it, and
without massively violating the layering principles.

> > As to minor numbers, I have seen mention of things like "5 bit unit" in
> >  the cd driver, according to documentation Pinnacle sent to me the RCD 
> > is an 8 bit device, but supports all cd commands that the cd driver has 
> > implemented.  So do I set up the minor number in the same way Julian
> >  set up the minor number for a cd or should I use the method that Joerg 
> > used for the worm driver as the RCD is a worm device? Or have they 
> > taken two different implementation methods because cd supports both
> > block and character but worm only currently supports character.  

worm should also support block devs, it's simply an omission.  Can be
fixed within some 10 minutes or so, but there's not much use in fixing
it as long as the read functionality is broken.

I think the final decision about which minor numbering should be used
is a fairly low-priority issue.  The worm driver is not actually by
me, the original roots have been written by Peter Dufault, and i
believe he's been cloning the `sd' driver rather than the `cd' driver.

> > Second, I have seen what appear to be 2 disperate cdevsw structure 
> > definitions, could some one clarify what exactly the definition of this 
> > should be for me.  I have compared the implementation of sd, cd, and 
> > worm but now I am totally confused

Where have you seen two of them?  I can only find one, in:

j@uriah 179% fgrep cdevsw /sys/sys/*
/sys/sys/conf.h:        struct cdevsw   *d_cdev;        /* cross pointer to the cdev */
/sys/sys/conf.h:struct cdevsw {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> > Last, I really don't get the partition stuff in the cd driver whatsoever, 
> > or worse the device filesystem (DEVFS) stuff.

Don't worry about this in the first place.  Concentrate on the actual
driver first.

The `cd' driver should also be tweaked someday to support reading
multiple data tracks, and to support something that could be used by
the `cd9660' filesystem to access what ISO9660 calls `multi-session'
CDs.  And it should allow reading audio tracks, but that's a far more
difficult task (since there's no standard on this).  So as you can
see, the `cd' driver is subject to changes in its minor numbering,
too...

I once started with that work, but eventually suspended it by the time
when Justin announced his massive SCSI subsystem rewrites.  Maybe,
after 2.2R is ready, i'll continue where i left off.

> > I am fairly sure that I can write the driver functions to operate the drive, 
> > its just the interface to the kernel and low-level scsi driver that I don't 
> > understand.  I have just never had to deal with them before and I don't 
> > have much documentation on what is required to do so. 

Careful: the interface to the low-level driver has changed with the
new SCSI code.

-- 
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. ;-)



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