Skip to content

Commit

Permalink
ACPI: PCI: follow typical PCI INTx swizzling pattern
Browse files Browse the repository at this point in the history
No functional change; this just uses the typical pattern of
PCI INTx swizzling done on other architectures.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent 3b1ea18 commit ee40136
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,17 +399,17 @@ static struct acpi_prt_entry *
acpi_pci_irq_derive(struct pci_dev *dev, int pin)
{
struct acpi_prt_entry *entry = NULL;
struct pci_dev *bridge = dev;
struct pci_dev *bridge;
u8 bridge_pin = 0, orig_pin = pin;


/*
* Attempt to derive an IRQ for this device from a parent bridge's
* PCI interrupt routing entry (eg. yenta bridge and add-in card bridge).
*/
while (bridge->bus->self) {
pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1;
bridge = bridge->bus->self;
bridge = dev->bus->self;
while (bridge) {
pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1;

if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) {
/* PC card has the same IRQ as its cardbridge */
Expand All @@ -431,6 +431,9 @@ acpi_pci_irq_derive(struct pci_dev *dev, int pin)
pci_name(bridge)));
return entry;
}

dev = bridge;
bridge = dev->bus->self;
}

dev_warn(&dev->dev, "can't derive routing for PCI INT %c\n",
Expand Down

0 comments on commit ee40136

Please sign in to comment.