@@ -876,9 +876,8 @@ static struct irq_info *pirq_get_info(struct pci_dev *dev)
return NULL;
}
-static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
+static int pcibios_lookup_irq(struct pci_dev *dev, u8 pin, int assign)
{
- u8 pin;
struct irq_info *info;
int i, pirq, newirq;
int irq = 0;
@@ -888,7 +887,6 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
char *msg = NULL;
/* Find IRQ pin */
- pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (!pin) {
dev_dbg(&dev->dev, "no interrupt pin\n");
return 0;
@@ -1049,7 +1047,7 @@ int pcibios_fixup_irq(struct pci_dev *dev, u8 pin)
/*
* Still no IRQ? Try to lookup one...
*/
- if (!irq && pcibios_lookup_irq(dev, 0))
+ if (!irq && pcibios_lookup_irq(dev, pin, 0))
irq = dev->irq;
return irq;
@@ -1206,7 +1204,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
u8 pin = 0;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
- if (pin && !pcibios_lookup_irq(dev, 1)) {
+ if (pin && !pcibios_lookup_irq(dev, pin, 1)) {
char *msg = "";
if (!io_apic_assign_pci_irqs && dev->irq)
The pcibios_lookup_irq currently looks up the pci interrupt pin manually. However all callers now have that information stored already. Therefore pass the pin in rather than look it up. Signed-off-by: Matthew Minter <matt@masarand.com> --- arch/x86/pci/irq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)