Alex Zepeda wrote...
> On Tue, 6 Jul 1999, Kenneth D. Merry wrote:
> 
> > IMO, DVD drives are probably best handled through the CD driver, and
> > Optical drives are probably best handled through the DA driver.  The
> > CD driver doesn't currently handle writes, but it's a one-line fix to
> > change that.
> 
> >From what I can tell, some of the DVD-RAM drives are actually treated as
> disks (would use the da driver).  For example, check out
> http://mpeg.openprojects.net/panasonic.html to see the Linux "driver" for
> the Panasonic LF-D100.  The comments outnumber the code.

Well, that makes sense from one perspective, and doesn't make sense from
another perspective.

Sure, DVD drives look like a disk from the standpoint that you can use
standard read *and* write calls on them.

But in most other ways, they're like CDROM drives.  You can play audio CDs
in them, mount regular data CDs in them, etc.  With a disk driver, you
don't have any of the special ioctl set to deal with CD-type drives and
media.

In fact, you probably wouldn't be able to mount disk with an ISO 9660
filesystem using the da driver, since it doesn't support the TOC ioctls
that the cd9660 filesystem code uses.  (because DA devices don't support
those SCSI commands)

The best of both worlds for accessing a DVD-RAM drive would be to just add
write support to the CD driver.  The CAM CD driver already has write
support, but it isn't currently enabled.

The attached one-line patch enables write support, and should make things
just work.  If anyone has a DVD-RAM drive and cares to test it, I'd be very
interested to hear how things work.

Ken
-- 
Kenneth Merry
[EMAIL PROTECTED]
==== //depot/cam/sys/cam/scsi/scsi_cd.c#107 - 
/a/ken/perforce/cam/sys/cam/scsi/scsi_cd.c ====
*** /tmp/tmp.73024.0    Tue Jul  6 16:16:09 1999
--- /a/ken/perforce/cam/sys/cam/scsi/scsi_cd.c  Tue Jul  6 11:18:01 1999
***************
*** 247,253 ****
        /* open */      cdopen,
        /* close */     cdclose,
        /* read */      physread,
!       /* write */     nowrite,
        /* ioctl */     cdioctl,
        /* stop */      nostop,
        /* reset */     noreset,
--- 247,253 ----
        /* open */      cdopen,
        /* close */     cdclose,
        /* read */      physread,
!       /* write */     physwrite,
        /* ioctl */     cdioctl,
        /* stop */      nostop,
        /* reset */     noreset,

Reply via email to