linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Schmidt <der.eremit@email.de>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [IDE] trying to make MO drive work with ide-floppy
Date: Mon, 5 May 2003 22:04:03 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0305052154200.1105-100000@neptune.local> (raw)


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


             reply	other threads:[~2003-05-05 19:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05 20:04 Pascal Schmidt [this message]
2003-05-06  9:41 ` [IDE] trying to make MO drive work with ide-floppy 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0305052154200.1105-100000@neptune.local \
    --to=der.eremit@email.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).