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

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Thu Feb 03 2000 - 03:51:27 EST


Eric Youngdale wrote:

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

Which is what the ghost stuff does, maybe not in the cleanest way, but
that is still the only thing that it does.

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

The end result is exactly the same as what the ghost stuff does now.

The common code between sd and sr is "read a block". This is code that
should be shared. Moreover, that's about the only "real" thing that
should be in those drivers. Of course "sr" also supports a few ioctls,
and "sd" also does writing.

                                Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
 "I didn't say it was your fault. I said I was going to blame it on you."

- 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