linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [IDE] trying to make MO drive work with ide-floppy
@ 2003-05-05 20:04 Pascal Schmidt
  2003-05-06  9:41 ` Alan Cox
  0 siblings, 1 reply; 21+ messages in thread
From: Pascal Schmidt @ 2003-05-05 20:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox


Hi all, Alan,

I've been trying to make my 640 MB ATAPI MO drive work with the
ide-floppy driver. I've patched ide-probe.c and ide-floppy.c for
assigning the MO drive (type ide_optical) to the floppy driver
(patch against 2.4-bkcvs below).

On bootup, the drive now gets reported as:

hde: FUJITSU MCC3064AP, ATAPI OPTICAL drive
hde: attached ide-floppy driver.
hde: No disk in drive
hde: 520192kB, 508/64/32 CHS, 2000 kBps, 512 sector size, 3600 rpm

These values would be correct for a 512 MB MO disk in the drive. So far,
so good.

Upon inserting a 640 MB disk and running 'fdisk -l /dev/hde' I get:

hde: 620704kB, 310352 blocks, 2048 sector size
hde: warning: non 512 bytes block size not fully supported
hde: 618496kB, 151/64/32 CHS, 2000 kBps, 2048 sector size, 3600 rpm
hde: The disk reports a capacity of 635600896 bytes, but the drive only handles 633339904
 hde: unknown partition table

The size and geometry stuff reported first looks good (310352 blocks is 
also reported when using ide-scsi/sd for the drive). The second line
with slightly different size looks wrong, though.

That "non 512 bytes block size" stuff doesn't look encouraging. On
trying 'mount -t ext2 -o ro /dev/hde /mnt/mo', I get:

hde: warning: non 512 bytes block size not fully supported
hde: The disk reports a capacity of 635600896 bytes, but the drive only handles 633339904
 hde: unknown partition table
hde: unsupported r/w request size
end_request: I/O error, dev 21:00 (hde), sector 2
EXT2-fs: unable to read superblock
hde: warning: non 512 bytes block size not fully supported
hde: The disk reports a capacity of 635600896 bytes, but the drive only handles 633339904
 hde: unknown partition table

The disk is formatted as a whole (no partition table) and works just fine
when using ide-scsi.

I cannot test with an MO disk with 512 byte sectors since I don't own 
any.

Are there any plans to support drives with blocksizes != 512 bytes? What 
changes would be needed to make it work? Or do I simply have to live with 
ide-scsi (still broken on 2.5, I assume...)?

Finally, the patch I used:

--- ide-probe.c.orig	Mon May  5 21:25:32 2003
+++ ide-probe.c	Mon May  5 21:25:59 2003
@@ -222,6 +222,7 @@ static inline void do_identify (ide_driv
 				break;
 			case ide_optical:
 				printk ("OPTICAL");
+				type = ide_floppy;
 				drive->removable = 1;
 				break;
 			default:
--- ide-floppy.c.orig	Mon May  5 21:25:45 2003
+++ ide-floppy.c	Mon May  5 21:26:40 2003
@@ -1962,7 +1962,7 @@ static int idefloppy_identify_device (id
 
 	if (gcw.protocol != 2)
 		printk(KERN_ERR "ide-floppy: Protocol is not ATAPI\n");
-	else if (gcw.device_type != 0)
+	else if ((gcw.device_type != 0) && (gcw.device_type != 7))
 		printk(KERN_ERR "ide-floppy: Device type is not set to floppy\n");
 	else if (!gcw.removable)
 		printk(KERN_ERR "ide-floppy: The removable flag is not set\n");

-- 
Ciao,
Pascal


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2003-05-08 12:30 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 20:04 [IDE] trying to make MO drive work with ide-floppy Pascal Schmidt
2003-05-06  9:41 ` Alan Cox
2003-05-06 14:02   ` [IDE] trying to make MO drive work with ide-floppy/ide-cd Pascal Schmidt
2003-05-06 14:07     ` Jens Axboe
2003-05-06 15:19       ` Pascal Schmidt
2003-05-06 15:25         ` Jens Axboe
2003-05-06 15:43           ` Jens Axboe
2003-05-06 16:23             ` Pascal Schmidt
2003-05-06 16:22           ` Pascal Schmidt
2003-05-06 17:59           ` Pascal Schmidt
2003-05-06 18:04             ` Jens Axboe
2003-05-06 18:18               ` Pascal Schmidt
2003-05-06 14:10     ` Pascal Schmidt
2003-05-06 14:11       ` Jens Axboe
2003-05-06 15:15         ` Pascal Schmidt
2003-05-07 18:02       ` Pascal Schmidt
2003-05-07 19:33         ` Jens Axboe
2003-05-08 11:33           ` Pascal Schmidt
2003-05-08 12:09             ` Jens Axboe
2003-05-08 12:20               ` Bartlomiej Zolnierkiewicz
2003-05-08 12:43                 ` Pascal Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).