Commit:     54a24cbbd0184faffc37c39cd3a896f4ddac3e03
Parent:     553aa7659bc0e188348f64e978343ed984eb6e56
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 20 15:10:02 2007 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Dec 20 16:18:17 2007 +1100

    [POWERPC] Fix PCI IRQ fallback code to not map IRQ 0
    The PCI IRQ code has a fallback when the device-tree parsing fails, that
    tries to map the interrupt indicated by PCI_INTERRUPT_LINE if the firmware
    set something in there. This is a bit fragile but has proven useful in some
    cases so far. However, it's causing us to incorrectly try to map interrupt 0
    on various setups, so let's prevent that case, as none of the cases where
    the fallback is legit should have an IRQ 0.
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/kernel/pci-common.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 88838b0..571854f 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -225,10 +225,11 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
                if (pin == 0)
                        return -1;
                if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
-                   line == 0xff) {
+                   line == 0xff || line == 0) {
                        return -1;
-               DBG(" -> no map ! Using irq line %d from PCI config\n", line);
+               DBG(" -> no map ! Using line %d (pin %d) from PCI config\n",
+                   line, pin);
                virq = irq_create_mapping(NULL, line);
                if (virq != NO_IRQ)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to