aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm-2.6/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-16 14:21:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-16 14:21:30 +0000
commit11e5e050ae811ebb9f08964d4bd0922ac135b7b8 (patch)
treec885cca32715ccd41d46c5c8c5b88ea1a0fc232c /target/linux/brcm-2.6/patches
parent431576e9ccdb4b87bb0549eb5ff6f0dd68a6043f (diff)
downloadupstream-11e5e050ae811ebb9f08964d4bd0922ac135b7b8.tar.gz
upstream-11e5e050ae811ebb9f08964d4bd0922ac135b7b8.tar.bz2
upstream-11e5e050ae811ebb9f08964d4bd0922ac135b7b8.zip
fix extpci irq assignment bug
SVN-Revision: 5159
Diffstat (limited to 'target/linux/brcm-2.6/patches')
-rw-r--r--target/linux/brcm-2.6/patches/001-bcm947xx.patch20
1 files changed, 16 insertions, 4 deletions
diff --git a/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
index 786b9af788..864f7747de 100644
--- a/target/linux/brcm-2.6/patches/001-bcm947xx.patch
+++ b/target/linux/brcm-2.6/patches/001-bcm947xx.patch
@@ -11243,7 +11243,7 @@ diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Mak
diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
--- linux.old/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100
+++ linux.dev/arch/mips/bcm947xx/pci.c 2006-10-15 23:29:14.000000000 +0200
-@@ -0,0 +1,215 @@
+@@ -0,0 +1,227 @@
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/pci.h>
@@ -11356,11 +11356,23 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c
+
+int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
++ unsigned long flags;
+ u8 irq;
++ uint idx;
+
-+ if (dev->bus->number == 1)
-+ return 2;
-+
++ /* external: use the irq of the pci core */
++ if (dev->bus->number >= 1) {
++ spin_lock_irqsave(&sbh_lock, flags);
++ idx = sb_coreidx(sbh);
++ sb_setcore(sbh, SB_PCI, 0);
++ irq = sb_irq(sbh);
++ sb_setcoreidx(sbh, idx);
++ spin_unlock_irqrestore(&sbh_lock, flags);
++
++ return irq + 2;
++ }
++
++ /* internal */
+ pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+ return irq + 2;
+}