Subject: RE: pci interrupts not delivered
To: 'Manuel Bouyer' <>
From: Aaditya Rai <>
List: tech-kern
Date: 10/01/2001 10:27:44
Thanks for the reply. I got them working now. I may be doing something
really stupid, but interrupts dont work when I write to the "pci
configuration space address of the chip corresponding to the interrupt
enable register, using pci_conf_write". They worked as soon as I wrote to
the corresponding memory offset using bus_space_write. (why..? )

-----Original Message-----
From: Manuel Bouyer []
Sent: Sunday, September 30, 2001 12:15 PM
To: Aaditya Rai
Cc: ''
Subject: Re: pci interrupts not delivered

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
> even though all registers indicate that the chip has generated an
> (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
> the chip is in a passive mode).

Well, in this case your irq hanlder is also called when the ethernet
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 <>