Commit 02ab55b8 authored by Linus Torvalds's avatar Linus Torvalds

Fix up the IDE irq disable to take into account some

odd-ball IDE controllers without a control register.

(Apparently Amiga X-Surf and Amiga Gayle with IDE doubler)

Also, clean up the code a bit while I'm at it.
parent 69766ad7
...@@ -385,19 +385,21 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd) ...@@ -385,19 +385,21 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd)
int autoprobe = 0; int autoprobe = 0;
unsigned long cookie = 0; unsigned long cookie = 0;
if (IDE_CONTROL_REG && !hwif->irq) { /*
autoprobe = 1; * Disable device irq unless we need to
cookie = probe_irq_on(); * probe for it. Otherwise we'll get spurious
/* enable device irq */ * interrupts during the identify-phase that
hwif->OUTB(drive->ctl, IDE_CONTROL_REG); * the irq handler isn't expecting.
} else { */
/* if (IDE_CONTROL_REG) {
* Disable device irq if we don't need to u8 ctl = drive->ctl | 2;
* probe for it. Otherwise we'll get spurious if (!hwif->irq) {
* interrupts during the identify-phase that autoprobe = 1;
* the irq handler isn't expecting. cookie = probe_irq_on();
*/ /* enable device irq */
hwif->OUTB(drive->ctl|2, IDE_CONTROL_REG); ctl &= ~2;
}
hwif->OUTB(ctl, IDE_CONTROL_REG);
} }
retval = actual_try_to_identify(drive, cmd); retval = actual_try_to_identify(drive, cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment