Re: Devices not supporting read-6....

From: Eric Youngdale (eric@andante.org)
Date: Wed Feb 02 2000 - 23:10:08 EST


----- Original Message -----
From: "Rogier Wolff" <R.E.Wolff@BitWizard.nl>
To: "Drew Eckhardt" <drew@Poohsticks.Org>
Cc: "Kenneth D. Merry" <ken@kdm.org>; "Jonas Nickel"
<jonas.nickel@tu-berlin.de>; "Rogier Wolff" <R.E.Wolff@BitWizard.nl>;
<linux-kernel@vger.rutgers.edu>; <linux-scsi@vger.rutgers.edu>;
<phoenix@thesindicate.com>
Sent: Wednesday, February 02, 2000 6:13 PM
Subject: Re: Devices not supporting read-6....

> Drew Eckhardt wrote:
>
> > Under Linux, the CD and disk drivers are completely divorced. When
> > I wrote the disk driver, I used the smallest command possible for a
> > given transfer size. The CD driver was cloned from that.
>
> This is a bad idea! This "divorce" should be undone whenever someone
> has a chance!

    I am not so sure it is a good idea to merge them. A lot of the
common/similar code got removed from both sd.c and sr.c when I did the
rewrite of the queueing code.

> DVD RAM drives currently require a gross hack to allow them to be
> driven by both the disk driver (to write to the device), and as a
> CDROM drive (to allow cdrom ioctls like play track).

    Is this what that ghost stuff is really for? There is a much easier way
of doing this, you know. There is no technical reason why the same
Scsi_Device cannot be driven by both drivers - the only thing you would need
to do is to teach sd.c that it should also attach to DVD RAM drives.

    If I had to guess, all you would need to do is to fix it so that
scsi_scan() first marked the Scsi_Device as writable, and then a couple of
minor edits to sd.c so that it treats the combination of TYPE_ROM with the
writable flag set as equivalent to TYPE_MOD.

-Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:09 EST