Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 1999 16:23:03 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        garbanzo@hooked.net (Alex Zepeda)
Cc:        ken@plutotech.com (Kenneth D. Merry), ohashi@mickey.ai.kyutech.ac.jp (Takeshi OHASHI), dmiller@search.sparks.net, freebsd-hackers@FreeBSD.ORG
Subject:   Re: DVD-ram
Message-ID:  <199907062223.QAA86704@panzer.kdm.org>
In-Reply-To: <Pine.BSF.4.05.9907061447030.254-100000@zippy.dyn.ml.org> from Alex Zepeda at "Jul 6, 1999 02:49:21 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

--ELM931299783-86655-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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
ken@plutotech.com

--ELM931299783-86655-0_
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename=scsi_cd.c.diffs.070699
Content-Description: scsi_cd.c.diffs.070699
Content-Transfer-Encoding: 7bit

==== //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,

--ELM931299783-86655-0_--


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




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