Re: CD writing in future Linux (stirring up a hornets' nest)

From: Joerg Schilling
Date: Fri Jan 27 2006 - 09:33:51 EST


Vojtech Pavlik <vojtech@xxxxxxx> wrote:

> > The only integrative (and this useful for libscg) interface on Linux is /dev/sg*
> >
> > /dev/hd* may look nice if you only look skin-deep
> >
> > How do you e.g. like send SCSI commands to ATAPI tape drives on Linux?
>
> I see you asking this again and again, and you seem to want to hear this
> answer: "You don't." I haven't checked the code, but I guess the SG_IO
> interface isn't available there. And I don't think this is a problem,
> because a) if it was needed, it can be added trivially with minimum
> added code, b) ATAPI tapes are dead, much the way ATAPI floppies are.

Nice to see that agree that sending SCSI via /dev/hd* is a hack with limited
benefit.

Maybe (now that we did agree about the way to go) it makes sense to start
discussing which bugs in Linux need to be fixed in order to close e.g.
the Bugs in the Debian bug tracking system for cdrtools that are related to the
Linux kernel.

This are the three most important Linux kernel bugs:

- ide-scsi does not do DMA if the DMAsize is not a multiple of 512
A person who knows internal Linux structures shoule be able
to fix this (and allow any multiple of 4) in less than one hour.
If we sum up the time spend on this discussoion, I really cannot
understand why this has not been fixed earlier.

- /dev/hd* artificially prevents the ioctls SCSI_IOCTL_GET_IDLUN
SCSI_IOCTL_GET_BUS_NUMBER from returning useful values.
As long as this bug is present, there is no way to see SG_IO
via /dev/hd* as integral part of the Linux SCSI transport concept.

- If sending SCSI sia ATAPI, Linux under certain unknown conditions
bastardizes the content of SCSI commands. A possible reason may be
that it sends random data in the remainder between the actual
SCSI cdb size and the ATAPI SCSI cdb size.

ATAPI drives that verify SCSI cdb's for correctness fail in this
case.

Jörg

--
EMail:joerg@xxxxxxxxxxxxxxxxxxxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
js@xxxxxxxxxxxxxxx (uni)
schilling@xxxxxxxxxxxxxxxxxxx (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/