Subject: Re: pci interrupts not delivered
To: Aaditya Rai <ARai@rhapsodynetworks.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 09/30/2001 21:15:10
On Sat, Sep 29, 2001 at 06:32:08PM -0700, Aaditya Rai wrote:
> Hi,
> Im writing a fibre channel driver (Tachyon XL2) for 1.5. The problem is that
> even though all registers indicate that the chip has generated an interrupt
> (pci and XL2 regs) my interrupt handler is not called.
> 
> If I put my card on a different slot, such that it shares its IRQ with the
> ethernet driver then my interrupt handler is called ALL the time (even when
> the chip is in a passive mode).

Well, in this case your irq hanlder is also called when the ethernet generates
an interrupt.

> 
> Here's my interrupt registration code:
> 
> /*register interrupts*/
>     if ((error = pci_intr_map(sc->pci.pa_pc, sc->pci.pa_intrtag, 
>                                sc->pci.pa_intrpin, sc->pci.pa_intrline, 
>                                &ih) != 0 )) {
>         printf("couldn't map interrupt: %d\n", error);
>         return;
>     }
> 
>     intrstr = pci_intr_string(sc->pci.pa_pc, ih);
>     if ((gih = pci_intr_establish(sc->pci.pa_pc, ih, IPL_BIO, txl_intr, 
>                           sc)) == NULL) {
>         printf("couldn't establish interrupt");
>         if (intrstr != NULL)
>             printf(" at %s", intrstr);
>         printf("\n");
>         return;
>     }
>     printf("TXL: interrupting at %s\n", intrstr);

This looks good. Are you sure your adapter is generating the interrupts ?
As you get interrupts from the ethernet adapters when the IRQ is shared,
the software is OK; I suspect the hardware doesn't generate the interrupts.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--