|
@@ -24,7 +24,7 @@ pdev_fixup_irq(struct pci_dev *dev,
|
|
int (*map_irq)(struct pci_dev *, u8, u8))
|
|
int (*map_irq)(struct pci_dev *, u8, u8))
|
|
{
|
|
{
|
|
u8 pin, slot;
|
|
u8 pin, slot;
|
|
- int irq;
|
|
|
|
|
|
+ int irq = 0;
|
|
|
|
|
|
/* If this device is not on the primary bus, we need to figure out
|
|
/* If this device is not on the primary bus, we need to figure out
|
|
which interrupt pin it will come in on. We know which slot it
|
|
which interrupt pin it will come in on. We know which slot it
|
|
@@ -33,16 +33,18 @@ pdev_fixup_irq(struct pci_dev *dev,
|
|
apply the swizzle function. */
|
|
apply the swizzle function. */
|
|
|
|
|
|
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
|
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
|
- /* Cope with 0 and illegal. */
|
|
|
|
- if (pin == 0 || pin > 4)
|
|
|
|
|
|
+ /* Cope with illegal. */
|
|
|
|
+ if (pin > 4)
|
|
pin = 1;
|
|
pin = 1;
|
|
|
|
|
|
- /* Follow the chain of bridges, swizzling as we go. */
|
|
|
|
- slot = (*swizzle)(dev, &pin);
|
|
|
|
|
|
+ if (pin != 0) {
|
|
|
|
+ /* Follow the chain of bridges, swizzling as we go. */
|
|
|
|
+ slot = (*swizzle)(dev, &pin);
|
|
|
|
|
|
- irq = (*map_irq)(dev, slot, pin);
|
|
|
|
- if (irq == -1)
|
|
|
|
- irq = 0;
|
|
|
|
|
|
+ irq = (*map_irq)(dev, slot, pin);
|
|
|
|
+ if (irq == -1)
|
|
|
|
+ irq = 0;
|
|
|
|
+ }
|
|
dev->irq = irq;
|
|
dev->irq = irq;
|
|
|
|
|
|
pr_debug("PCI: fixup irq: (%s) got %d\n",
|
|
pr_debug("PCI: fixup irq: (%s) got %d\n",
|