Re: Fix IDE initialization when we don't probe for interrupts.

Jeff Garzik (jgarzik@pobox.com)
Wed, 09 Jul 2003 18:08:17 -0400


Linux Kernel Mailing List wrote:
> ChangeSet 1.1374, 2003/07/09 13:40:53-07:00, torvalds@home.osdl.org
>
> Fix IDE initialization when we don't probe for interrupts.
>
> The driver obviously cannot rely on the interrupt handler
> when it is probing for interrupts, so the identify code is
> written to not use interrupts and the probing code will
> disable the interrupt after having figured out which one it
> is.
>
> The non-probe code should do the same, otherwise confusion
> happens.

> diff -Nru a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
> --- a/drivers/ide/ide-probe.c Wed Jul 9 14:10:54 2003
> +++ b/drivers/ide/ide-probe.c Wed Jul 9 14:10:54 2003
> @@ -390,6 +390,14 @@
> cookie = probe_irq_on();
> /* enable device irq */
> hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
> + } else {
> + /*
> + * Disable device irq if we don't need to
> + * probe for it. Otherwise we'll get spurious
> + * interrupts during the identify-phase that
> + * the irq handler isn't expecting.
> + */
> + hwif->OUTB(drive->ctl|2, IDE_CONTROL_REG);

Yeah, my driver does probing with interrupts disabled, too.

I'm curious where interrupts are re-enabled, though?

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/