CMD 640 bug fix made my /dev/hda vanish!

Luca Lizzeri (ll@niche.telnetwork.it)
Thu, 19 Oct 1995 02:59:49 -0800


This is my setup: Pentium 100 MHZ, Award 4.50g bios and the following:

Oct 19 01:24:19 darkstar kernel: ide: buggy CMD640 interface: init_cmd640: huh? 0x5b read back wrong
Oct 19 01:24:19 darkstar kernel: serialized, disabled read-ahead
Oct 19 01:24:19 darkstar kernel: hda: Maxtor 71084 AP, 1036MB w/64KB Cache, LBA, CHS=526/64/63
Oct 19 01:24:19 darkstar kernel: hdc: FX001DE, ATAPI, CDROM drive
Oct 19 01:24:19 darkstar kernel: hdd: DSAA-3540, 504MB w/96KB Cache, LBA, CHS=1024/16/63
Oct 19 01:24:19 darkstar kernel: ide1 at 0x170-0x177,0x376 on irq 15
Oct 19 01:24:19 darkstar kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 (serialized with ide1)

I am afraid that this little patch made my /dev/hda unreadable to Linux (I have my dos partitions on it).

+ * Version 5.15 bug fix in init_cmd640_vlb()
+ * bug fix in interrupt sharing code
*

*/
save_flags(flags);
cli();
- if (request_irq(hwif->irq, ide_intr,
- SA_INTERRUPT|SA_SAMPLE_RANDOM, hwif->name)) {
- restore_flags(flags);
- printk(" -- FAILED!");
- return 1;
- }
-
- /*
- * Got the irq, now set everything else up
- */
if ((hwgroup = irq_to_hwgroup[hwif->irq]) == NULL) {
+ if (request_irq(hwif->irq, ide_intr,
+ SA_INTERRUPT|SA_SAMPLE_RANDOM, hwif->name)) {
+ restore_flags(flags);
+ printk(" -- FAILED!");
+ return 1;
+ }
+
+ /*
+ * Got the irq, now set everything else up
+ */
hwgroup = kmalloc (sizeof(ide_hwgroup_t), GFP_KERNEL);
irq_to_hwgroup[hwif->irq] = hwgroup;
hwgroup->hwif = hwif->next = hwif;

When I compiled and rebooted I got the following messages:

darkstar kernel: hda:hda: irq timeout: status=0x50 { DriveReady SeekComplete }
Oct 19 01:24:19 darkstar kernel: hda: irq timeout: status=0x50 { DriveReady SeekComplete }
Oct 19 01:24:19 darkstar last message repeated 2 times
Oct 19 01:24:19 darkstar kernel: ide0: reset: success
Oct 19 01:24:19 darkstar kernel: hda: irq timeout: status=0x50 { DriveReady SeekComplete }
Oct 19 01:24:19 darkstar last message repeated 2 times
Oct 19 01:24:19 darkstar kernel: hda: irq timeout: status=0x58 { DriveReady SeekComplete DataRequest }
Oct 19 01:24:19 darkstar kernel: ide0: reset: success
Oct 19 01:24:19 darkstar kernel: hda: irq timeout: status=0x50 { DriveReady SeekComplete }
Oct 19 01:24:19 darkstar kernel: end_request: I/O error, dev 03:00, sector 0
Oct 19 01:24:19 darkstar kernel: unable to read partition table
Oct 19 01:24:19 darkstar kernel: hdd: hdd1
Oct 19 01:24:19 darkstar kernel: VFS: Mounted root (ext2 filesystem) readonly.
Oct 19 01:24:19 darkstar kernel: hda3: bad access: block=0, count=8
Oct 19 01:24:19 darkstar kernel: end_request: I/O error, dev 03:03, sector 0
Oct 19 01:24:19 darkstar kernel: Unable to find swap-space signature
Oct 19 01:24:19 darkstar kernel: attempt to access beyond end of device
Oct 19 01:24:19 darkstar kernel: MSDOS bread failed
Oct 19 01:24:19 darkstar kernel: attempt to access beyond end of device
Oct 19 01:24:19 darkstar kernel: MSDOS bread failed
Oct 19 01:24:19 darkstar kernel: attempt to access beyond end of device
Oct 19 01:24:19 darkstar kernel: MSDOS bread failed
Oct 19 01:24:19 darkstar kernel: attempt to access beyond end of device
Oct 19 01:24:19 darkstar kernel: MSDOS bread failed

After I reversed the ide.c patch everything went smoothly again, apart from the
abitual message: buggy CMD interface ....

I have no idea why this would be. I only know that my first hard drive (the maxtor)
makes also LILO go crazy: it prints screen upon screen of 101010101...

Thanks in advance, I hope it canbe fixed easily. If more details are needed I will
gladly try to give them.

-- 
Luca Lizzeri                                            Telefono: +39.2.8053884
ll@niche.telnetwork.it                                       Fax: +39.2.4982660
                                                  Indirizzo: Via Caminadella, 6
                                                           20123 Milano, Italia