lkml.org 
[lkml]   [2000]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI bookkeeping
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/

\
 
 \ /
  Last update: 2005-03-22 12:41    [W:3.350 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site