Skip to contentSkip to conversation

OK, anybody have any hints and tips to get an MFM drive working again?

DISCUSSION Rogier Wolff 1 participant 1 message Jul 30, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Albert Cahalan
Quoted 5 lines

We've tried the modern IDE driver, and the 2.4.20 one, and the "old hd only" driver.

Going "retro": Compiling 2.0.39 gives me: "bus error" while doing make dep.

You need the old "xd" driver. It isn't IDE at all. You can be pretty sure you need the "xd" driver when:

a. the drive is 5, 10, or 20 MB

20. Yes, we're sure we have an MFM drive.
(The KL330 is a 30Mb RLL drive. It requires a different controller, but would require exactly the same driver treatment from Linux)

Quoted 1 line

b. the drive has 3 cables: data, power, and control

Yup.

Quoted 1 line

c. the drive is called MFM, RLL, or some other strange thing

Yup.

Quoted 7 lines

The mkdep bus error is easy to fix. The program is relying on an old well-loved Linux behavior that turned out to violate the POSIX standard. Linux used to give you a free zero page when doing a mmap() past the end of a file.

You might grab the mkdep from a later kernel.

OK. Will do.

Quoted 6 lines

Anyway, the 2.0.xx kernel is about right. Linux didn't get a working "xd" driver until long after the hardware was obsolete. The driver wasn't kept around for very long, because all the hardware was gone... except for your stash, if we assume that those drives really work.

Last thing we tried is booting it. It boots! i.e. we've now verified that the hardware actually works..... But this card has a jumper where 1-2 means IRQ5, 2-3 means IRQ 7, and there is no jumper installed. Guess what that means for the interrupt line it uses.... :-)

Quoted 4 lines

Um, you'll most likely need an i386 to even boot with the card installed. Maybe you can boot on a somewhat recent machine if you disable IDE from the BIOS. Got SCSI? How about a network boot?

We've got two machines up-and-running which seem to be up to the task. One is an i386 (WITH coprocessor!!!), only ISA slots, no "integrated peripherals". It goes "NFS root" as soon as it's loaded the kernel off the boot floppy. (We couldn't find any 4Mb SIMMs, so it only has 8M ram...)

The other is an Intel Celeron 466, which has one last ISA slot. When I disable "integrated IDE controller" (and the floppy for cards that have a floppy), then I get the same results as on the 386. (It loads a boot-prom off the floppy and goes "diskless" one step earlier: before loading the kernel)

Ah! Shit! During this whole excercise I forgot to lookup the source-line-that-generated-the-error! That is usually helpful.

Look! This is the line that triggers:

  if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {

I'll take a guess that if I initialize an MFM drive, nr_sects get initlialized to "0". Any block I ask for is beyond end-of-disk.

I'll put a drive->part[0].nr_sects = 63960 in there. (That's the number of sectors that the drives would have if they are RLL formatted and not MFM). Other things will go wrong if I access a sector beyond the end-of-the-disk. "just don't do that then"!

And, I've made the beginners mistake of not including the error messages I got. I apologise....

Roger.

Signature · 3 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
**** "Linux is like a wigwam -  no windows, no gates, apache inside!" ****