Messages in this thread Patch in this message |  | | Date | Wed, 29 May 1996 20:45:00 -0400 | From | "mark (m.s.) lord" <> | Subject | re:IDE problems (1.99.7) |
| |
In message "IDE problems (1.99.7)", 'pjb27@cam.ac.uk' writes:
>I'm still getting these problems with the IDE driver in pre-2.0.7.
... >May 26 12:58:39 ermintrude linux: hdc: IRQ probe failed (0) >May 26 12:58:39 ermintrude linux: hdc: Hmmm.. probably a driver problem. >May 26 12:58:39 ermintrude linux: hdc: cmd640 reg 09h == 0x0a >May 26 12:58:39 ermintrude linux: hdc: cmd640 reg 51h == 0x08
Okay, does this help?
-ml mlord@pobox.com
--- linux-pre2.0.9/drivers/block/ide.c Wed May 29 18:55:36 1996 +++ linux/drivers/block/ide.c Wed May 29 20:44:45 1996 @@ -2369,8 +2369,13 @@ { int hd_status, rc; unsigned long timeout; - int irqs = 0; + int irqs; +#ifdef CONFIG_BLK_DEV_CMD640 + int retry = 0; +try_again: +#endif /* CONFIG_BLK_DEV_CMD640 */ + irqs = 0; if (!HWIF(drive)->irq) { /* already got an IRQ? */ probe_irq_off(probe_irq_on()); /* clear dangling irqs */ irqs = probe_irq_on(); /* start monitoring irqs */ @@ -2435,9 +2440,19 @@ #ifdef CONFIG_BLK_DEV_CMD640 if (HWIF(drive)->chipset == ide_cmd640) { extern byte (*get_cmd640_reg)(int); + byte reg9 = get_cmd640_reg(0x09); printk("%s: Hmmm.. probably a driver problem.\n", drive->name); - printk("%s: cmd640 reg 09h == 0x%02x\n", drive->name, get_cmd640_reg(9)); + printk("%s: cmd640 reg 09h == 0x%02x\n", drive->name, reg9); printk("%s: cmd640 reg 51h == 0x%02x\n", drive->name, get_cmd640_reg(0x51)); + if (reg9 == 0x0a) { + printk("%s: perhaps PCI INTA has not been set to IRQ15?\n", drive->name); + if (retry++ == 0) { + extern void (*put_cmd640_reg)(int, int); + printk("%s: switching secondary interface to legacy mode\n", drive->name); + put_cmd640_reg(0x09,0x00); + goto try_again; + } + } } #endif /* CONFIG_BLK_DEV_CMD640 */ } --- linux-pre2.0.9/drivers/block/cmd640.c Tue May 7 18:36:49 1996 +++ linux/drivers/block/cmd640.c Wed May 29 20:41:14 1996 @@ -109,8 +109,8 @@ static ide_tuneproc_t cmd640_tune_drive; /* Interface to access cmd640x registers */ -static void (*put_cmd640_reg)(int reg_no, int val); - byte (*get_cmd640_reg)(int reg_no); +void (*put_cmd640_reg)(int reg_no, int val); +byte (*get_cmd640_reg)(int reg_no); enum { none, vlb, pci1, pci2 }; static int bus_type = none;
|  |