Subject: pci interrupts not delivered
To: 'tech-kern@netbsd.org' <tech-kern@netbsd.org>
From: Aaditya Rai <ARai@rhapsodynetworks.com>
List: tech-kern
Date: 09/29/2001 18:32:08
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).
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);
which seems to be the standard way to do it on Netbsd. Any help would be
great!
Thanks!
Aaditya