Re: PCI bookkeeping

From: Martin Mares (mj@suse.cz)
Date: Sat Oct 21 2000 - 16:37:42 EST


Hello!

> The problem I'm seeing is that at least one driver
> has signed up to handle the wrong IRQ because,
> when it queried that PCI config value, it went
> back and got it from PCI config space rather
> than from the in-kernel data structures where the
> (correct) recalculated value had been stored. So,
> I'm wondering if our Official Approach is to always
> query the in-kernel data structures which have
> been setup so nicely for us, or are we supposed
> to obtain (some or all of) that sort of info from
> PCI space? Or is this all just a bleeding mess?

The only correct way to get the IRQ number for a given PCI card is to look
to the pci_dev structure. This holds for both 2.2 and 2.4 kernels. (The main
reason being that on some architectures the interrupt number doesn't fit
in a single byte.)

If you know of any drivers reading interrupt line information from the
configuration space, please tell us and we'll fix them.

                                Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"Immanuel doesn't pun, he Kant."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:18 EST