diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/pci/irq.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/visws.c | 7 |
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index e1d605bfeb47..4064345cf144 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -1068,7 +1068,7 @@ static void __init pcibios_fixup_irqs(void) | |||
1068 | struct pci_dev *bridge = dev->bus->self; | 1068 | struct pci_dev *bridge = dev->bus->self; |
1069 | int bus; | 1069 | int bus; |
1070 | 1070 | ||
1071 | pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1; | 1071 | pin = pci_swizzle_interrupt_pin(dev, pin); |
1072 | bus = bridge->bus->number; | 1072 | bus = bridge->bus->number; |
1073 | irq = IO_APIC_get_PCI_irq_vector(bus, | 1073 | irq = IO_APIC_get_PCI_irq_vector(bus, |
1074 | PCI_SLOT(bridge->devfn), pin - 1); | 1074 | PCI_SLOT(bridge->devfn), pin - 1); |
@@ -1232,7 +1232,7 @@ static int pirq_enable_irq(struct pci_dev *dev) | |||
1232 | while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ | 1232 | while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ |
1233 | struct pci_dev *bridge = dev->bus->self; | 1233 | struct pci_dev *bridge = dev->bus->self; |
1234 | 1234 | ||
1235 | pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1; | 1235 | pin = pci_swizzle_interrupt_pin(dev, pin); |
1236 | irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, | 1236 | irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, |
1237 | PCI_SLOT(bridge->devfn), pin - 1); | 1237 | PCI_SLOT(bridge->devfn), pin - 1); |
1238 | if (irq >= 0) | 1238 | if (irq >= 0) |
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 16d0c0eb0d19..2c54e7e03f53 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c | |||
@@ -24,17 +24,12 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } | |||
24 | 24 | ||
25 | unsigned int pci_bus0, pci_bus1; | 25 | unsigned int pci_bus0, pci_bus1; |
26 | 26 | ||
27 | static inline u8 bridge_swizzle(u8 pin, u8 slot) | ||
28 | { | ||
29 | return (((pin - 1) + slot) % 4) + 1; | ||
30 | } | ||
31 | |||
32 | static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) | 27 | static u8 __init visws_swizzle(struct pci_dev *dev, u8 *pinp) |
33 | { | 28 | { |
34 | u8 pin = *pinp; | 29 | u8 pin = *pinp; |
35 | 30 | ||
36 | while (dev->bus->self) { /* Move up the chain of bridges. */ | 31 | while (dev->bus->self) { /* Move up the chain of bridges. */ |
37 | pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)); | 32 | pin = pci_swizzle_interrupt_pin(dev, pin); |
38 | dev = dev->bus->self; | 33 | dev = dev->bus->self; |
39 | } | 34 | } |
40 | *pinp = pin; | 35 | *pinp = pin; |