Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48781
b: refs/heads/master
c: 691cd0c
h: refs/heads/master
i:
  48779: 491c95c
v: v3
  • Loading branch information
Andreas Block authored and Greg Kroah-Hartman committed Feb 16, 2007
1 parent 805e915 commit 498c496
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4516a618a76eae6eb1b37259ad49f39b7b7f33d8
refs/heads/master: 691cd0c2ee2d4d6dff652627fca1b2d4f1377d58
18 changes: 10 additions & 8 deletions trunk/drivers/pci/setup-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pdev_fixup_irq(struct pci_dev *dev,
int (*map_irq)(struct pci_dev *, u8, u8))
{
u8 pin, slot;
int irq;
int irq = 0;

/* 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
Expand All @@ -33,16 +33,18 @@ pdev_fixup_irq(struct pci_dev *dev,
apply the swizzle function. */

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;

/* 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;

pr_debug("PCI: fixup irq: (%s) got %d\n",
Expand Down

0 comments on commit 498c496

Please sign in to comment.