Skip to contentSkip to conversation

clarify pci.txt wrt IRQ allocation

PATCH In review Bjorn Helgaas 2 participants 2 messages Jun 11, 2004 – Jun 12, 2004 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clarify pci.txt wrt IRQ allocation

I think we should make it explicit that PCI IRQs shouldn't be relied upon until after pci_enable_device(). This patch:

    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7-rc3/2.6.7-rc3-mm1/broken-out/bk-acpi.patch

does PCI interrupt routing (based on ACPI _PRT) and IRQ allocation at pci_enable_device()-time.

(To avoid breaking things in 2.6, the above patch still allocates all PCI IRQs in pci_acpi_init(), before any drivers are initialized. But that shouldn't be needed by correct drivers, and I'd like to remove it in 2.7.)

Here's a possible update:

===== Documentation/pci.txt 1.11 vs edited =====

Documentation/pci.txt +3 -2
@@ -166,8 +166,9 @@
 ~~~~~~~~~~~~~~~~~~~
    Before you do anything with the device you've found, you need to enable
 it by calling pci_enable_device() which enables I/O and memory regions of
-the device, assigns missing resources if needed and wakes up the device
-if it was in suspended state. Please note that this function can fail.
+the device, allocates an IRQ if necessary, assigns missing resources if
+needed and wakes up the device if it was in suspended state. Please note
+that this function can fail.
 
    If you want to use the device in bus mastering mode, call pci_set_master()
 which enables the bus master bit in PCI_COMMAND register and also fixes
#1 lore raw
Quoted 5 lines · Bjorn Helgaas

I think we should make it explicit that PCI IRQs shouldn't be relied upon until after pci_enable_device(). This patch:

    ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7-rc3/2.6.7-rc3-mm1/broken-out/bk-acpi.patch
Quoted 7 lines

does PCI interrupt routing (based on ACPI _PRT) and IRQ allocation at pci_enable_device()-time.

(To avoid breaking things in 2.6, the above patch still allocates all PCI IRQs in pci_acpi_init(), before any drivers are initialized. But that shouldn't be needed by correct drivers, and I'd like to remove it in 2.7.)

I agree.

Quoted 1 line

Here's a possible update:

Thanks, I've applied this to my trees.

greg k-h