Re: Determining pci bus from irq

From: Richard B. Johnson
Date: Tue Sep 09 2003 - 12:34:55 EST


On Tue, 9 Sep 2003, Alan Cox wrote:

> On Maw, 2003-09-09 at 17:10, Adam Litke wrote:
> > Is there a nice way to determine, given an irq number, the pci bus
> > number that raised the interrupt?
>
> In general the answer is you can't find out. PCI IRQ lines are shared.
> You can certainly lock and walk the pci device list looking for matches
> but you may get a lot of devices on different busses
>

Unless you've got a 'scope. If a device is interrupting often
or if it can be made to interrupt. you can look at the pin on
the PCI card. For some reason, on ix86, the logical "pin" is
always "A", regardless of the device, so you only have one
interrupt line connected to each slot. On lap-tops, there is
often only one IRQ shared for everything IRQ9 for Compaq.

These interrupt lines are usually not physically connected
together. They are ORed in some glue chip so you can see
what card is actually operating the line. On PCI, the IRQ
pin is (+) for TRUE, normally pulled down, and never floating.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
Note 96.31% of all statistics are fiction.


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