Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128107
b: refs/heads/master
c: 063563b
h: refs/heads/master
i:
  128105: afb452e
  128103: e4d6714
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent c8bbeb4 commit 6ca3c61
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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: c458033c9b72a81b890d97ec6339694bab252383
refs/heads/master: 063563b4b8f87e2be0e127ccf3a8e6eef6309ff4
27 changes: 12 additions & 15 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ static inline char pin_name(int pin)
PCI IRQ Routing Table (PRT) Support
-------------------------------------------------------------------------- */

static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
int bus,
int device, int pin)
static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(struct pci_dev *dev,
int pin)
{
struct acpi_prt_entry *entry = NULL;
int segment = pci_domain_nr(dev->bus);
int bus = dev->bus->number;
int device = PCI_SLOT(dev->devfn);

if (!acpi_prt.count)
return NULL;
Expand Down Expand Up @@ -385,23 +387,18 @@ acpi_pci_free_irq(struct acpi_prt_entry *entry,
* failure: return -1
*/
static int
acpi_pci_irq_lookup(struct pci_bus *bus,
int device,
int pin,
acpi_pci_irq_lookup(struct pci_dev *dev, int pin,
int *triggering,
int *polarity, char **link, irq_lookup_func func)
{
struct acpi_prt_entry *entry = NULL;
int segment = pci_domain_nr(bus);
int bus_nr = bus->number;
int ret;


ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Searching for _PRT entry for %04x:%02x:%02x[%c]\n",
segment, bus_nr, device, pin_name(pin)));
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Searching for _PRT entry for %s[%c]\n",
pci_name(dev), pin_name(pin)));

entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin);
entry = acpi_pci_irq_find_prt_entry(dev, pin);
if (!entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_PRT entry not found\n"));
return -1;
Expand Down Expand Up @@ -447,7 +444,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
pin = bridge_pin;
}

irq = acpi_pci_irq_lookup(bridge->bus, PCI_SLOT(bridge->devfn),
irq = acpi_pci_irq_lookup(bridge,
pin, triggering, polarity,
link, func);
}
Expand Down Expand Up @@ -493,7 +490,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
* First we check the PCI IRQ routing table (PRT) for an IRQ. PRT
* values override any BIOS-assigned IRQs set during boot.
*/
gsi = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin,
gsi = acpi_pci_irq_lookup(dev, pin,
&triggering, &polarity, &link,
acpi_pci_allocate_irq);

Expand Down Expand Up @@ -574,7 +571,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
/*
* First we check the PCI IRQ routing table (PRT) for an IRQ.
*/
gsi = acpi_pci_irq_lookup(dev->bus, PCI_SLOT(dev->devfn), pin,
gsi = acpi_pci_irq_lookup(dev, pin,
&triggering, &polarity, NULL,
acpi_pci_free_irq);
/*
Expand Down

0 comments on commit 6ca3c61

Please sign in to comment.