Christoph,
Thanks for alerting me to the implementation (by Jens) of
the sg driver's SG_IO ioctl in drivers/block/scsi_ioctl.c .
It goes by the name SCSI_IOCTL_SEND_COMMAND which is the same
name as the old ioctl defined in drivers/scsi/scsi_ioctl.c .
As far as I can see if you send that ioctl to a block device
(including an ATA disk) you get the new functionality (i.e.
similar to sg's SG_IO). However if you send that ioctl to
a char device (e.g. st, osst or sg) you get the old
interface (i.e. as found in drivers/scsi/scsi_ioctl.c).
Somewhat confusing.
So old utilities like scsiinfo will now fail for disks
but continue to work for tapes.
I believe IDESCSI_SG_TRANSFORM translated 6 byte
MODE SENSE ** commands (mandatory in SCSI-2, 10 byte
MODE SENSE optional in SCSI-2) to 10 byte MODE SENSE
commands (mandatory in ATAPI, 6 byte MODE SENSE
commands optional (or not supported) in ATAPI). The
correct solution is to stop applications sending 6
byte MODE SENSE commands to CD/DVD writers. I don't
believe cdrecord uses the IDESCSI_SG_TRANSFORM
ioctl anymore. [Perhaps it comes from the cdwrite
days.]
** Equivalent translations for READ(6), WRITE(6) and
MODE_SELECT(6) command are done by the ide-scsi driver.
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/