The below patch allows me to use the ATAPI MO drive read-only using
ide-cd. It does not send the drive any commands it might not understand.
I'm still trying to get write support to work, but being able to read
from the drive is an independent feature and useful in itself, I think.
Would it be possible to apply this to 2.5?
Tested by reading an entire ext2 filesystem from an MO disk and comparing
against the result obtained from 2.4 with ide-scsi/sd. No differences.
Patch against 2.5-bkcvs.
Index: drivers/ide/ide-cd.c
===================================================================
RCS file: /home/bkcvs/linux-2.5/drivers/ide/ide-cd.c,v
retrieving revision 1.107
diff -u -1 -b -p -r1.107 ide-cd.c
--- drivers/ide/ide-cd.c 20 Apr 2003 21:52:14 -0000 1.107
+++ drivers/ide/ide-cd.c 7 May 2003 17:34:30 -0000
@@ -2873,2 +2873,7 @@ int ide_cdrom_probe_capabilities (ide_dr
+ if (drive->media == ide_optical) {
+ printk("%s: ATAPI magneto-optical drive\n", drive->name);
+ return nslots;
+ }
+
if (CDROM_CONFIG_FLAGS(drive)->nec260) {
@@ -3339,3 +3344,3 @@ static int ide_cdrom_attach (ide_drive_t
goto failed;
- if (drive->media != ide_cdrom)
+ if (drive->media != ide_cdrom && drive->media != ide_optical)
goto failed;
Index: drivers/ide/ide-probe.c
===================================================================
RCS file: /home/bkcvs/linux-2.5/drivers/ide/ide-probe.c,v
retrieving revision 1.85
diff -u -1 -b -p -r1.85 ide-probe.c
--- drivers/ide/ide-probe.c 24 Apr 2003 17:07:04 -0000 1.85
+++ drivers/ide/ide-probe.c 7 May 2003 17:25:37 -0000
@@ -1237,3 +1237,3 @@ struct gendisk *ata_probe(dev_t dev, int
(void) request_module("ide-scsi");
- if (drive->media == ide_cdrom)
+ if (drive->media == ide_cdrom || drive->media == ide_optical)
(void) request_module("ide-cd");
-- Ciao, Pascal- 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/