Re: pci_write_config_byte question..

Russell King (rmk@arm.linux.org.uk)
Mon, 19 Nov 2001 17:23:00 +0000


On Mon, Nov 19, 2001 at 12:48:24PM -0500, John Clemens wrote:
> I've been hacking some PCI code to get USB working on my laptop. I need
> to change PCI config space to use IRQ 11 for the device instead of IRQ 9.

Changing interrupts is non-trivial, especially on x86.

> So i call pci_write_config_byte(...), but that only appears to change the
> "system" view of PCI space.. if you boot the kernel and do an lspci, it
> shows up as IRQ11, but if you do a lspci -b (for "Bus" view), it still
> shows up as IRQ 9.

The kernel caches a copy of the IRQ number register. The IRQ number
register (PCI_INTERRUPT_LINE) is just like RAM - you can read it, you
can write it. However, it has no hardware side effects however. It's
sole purpose in life is to communicate the IRQ number from the POST
(which knows how the interrupts are arranged) to the driver.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

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