Re: writable mmc profiles actually are writable

Jens Axboe
2003-10-06T20:34:09Z

On Mon, Oct 06 2003, Pat LaVarre wrote:
> > CDC_DVD_RAM ...
> > the only thing the kernel supports out of the box.
>
> Do we understand this choice? I'm new to linux, new to t10 mmc, old to
> unix, old to t10 scsi. I think I see:

You conviniently snipped the rest of the message. I said that media that
is _like_ DVD-RAM. I'll grant you that it isn't quite obvious, but that
is the way it was done. That covers stuff like MO drives, too.

> 1) In mmc, seven of the standard profiles imply feature x0020
> random_writable, specifically profiles x 0001 0002 0003 0005 0012 001A
> 0022 i.e. non_removable_disk, removable_disk, magneto_optical_erasable,
> as_mo, dvd_ram, dvd+rw, ddcd_rw.

the disk profiles aren't driven by ide-cd or sr. mo and dvd-ram have
been supported for a long time and should be set with CDC_DVD_RAM, I
haven't yet had to deal with dvd+rw or ddcd_rw (is this like mtr?). Feel
free to extend that to cover those, too. I know of patches for dvd+rw
floating around, they have never been sent for kernel inclusion though.
Which either means that they don't work too well (they probably do), or
that people just don't care enough for that feature.

> 2) In sr_mod.ko and ide-cd.ko, we conservatively fetch only mode page
> x2A Capabilities. Specifically we do not yet try the op x46 Get
> Configuration of 1999 mmc 2, not even after we see mode page x2A.
>
> 3) Omitting op x46 by definition precludes linux from distinguishing
> from legacy cd_rom all the new writable kinds of pdt x05 dvd/cd,
> excepting only the 1997 mmc 1 choices that /proc/sys/dev/cdrom already
> offers i.e. cd_r, cd_rw, dvd, dvd_r, and dvd_ram.
>
> How wrong am I?

You are not wrong, and I'd be happy to review patches to make the
detection more modern. And this is what you should have done from the
beginning, instead of just hacking around the write open. This is what
my objection was for, not supporting other devices.

--
Jens Axboe