Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128105
b: refs/heads/master
c: e64e9db
h: refs/heads/master
i:
  128103: e4d6714
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent 8a5ceb4 commit afb452e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: cf68b80b0e0cbc6a0d7bbb36b07ce94779ef5f1f
refs/heads/master: e64e9db53ab78d20dff4cc1aec8a6b0e4e70ce8c
15 changes: 8 additions & 7 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static DEFINE_SPINLOCK(acpi_prt_lock);

static inline char pin_name(int pin)
{
return 'A' + pin;
return 'A' + pin - 1;
}

/* --------------------------------------------------------------------------
Expand Down Expand Up @@ -203,10 +203,15 @@ acpi_pci_irq_add_entry(acpi_handle handle,
if (!entry)
return -ENOMEM;

/*
* Note that the _PRT uses 0=INTA, 1=INTB, etc, while PCI uses
* 1=INTA, 2=INTB. We use the PCI encoding throughout, so convert
* it here.
*/
entry->id.segment = segment;
entry->id.bus = bus;
entry->id.device = (prt->address >> 16) & 0xFFFF;
entry->pin = prt->pin;
entry->pin = prt->pin + 1;

do_prt_fixups(entry, prt);

Expand Down Expand Up @@ -425,7 +430,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
* PCI interrupt routing entry (eg. yenta bridge and add-in card bridge).
*/
while (irq < 0 && bridge->bus->self) {
pin = (pin + PCI_SLOT(bridge->devfn)) % 4;
pin = (((pin - 1) + PCI_SLOT(bridge->devfn)) % 4) + 1;
bridge = bridge->bus->self;

if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) {
Expand All @@ -437,8 +442,6 @@ acpi_pci_irq_derive(struct pci_dev *dev,
pci_name(bridge)));
return -1;
}
/* Pin is from 0 to 3 */
bridge_pin--;
pin = bridge_pin;
}

Expand Down Expand Up @@ -483,7 +486,6 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pci_name(dev)));
return 0;
}
pin--;

/*
* First we check the PCI IRQ routing table (PRT) for an IRQ. PRT
Expand Down Expand Up @@ -566,7 +568,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
pin = dev->pin;
if (!pin)
return;
pin--;

/*
* First we check the PCI IRQ routing table (PRT) for an IRQ.
Expand Down

0 comments on commit afb452e

Please sign in to comment.