Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128115
b: refs/heads/master
c: 74f82af
h: refs/heads/master
i:
  128113: 27411b8
  128111: 047ec17
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent 2056b3e commit c2da6a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 44 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: 4eaf6db3ea0edf7e011a613b5a15360444e58fec
refs/heads/master: 74f82af1eda39c26c17f8030e4f60c00929ec9df
56 changes: 13 additions & 43 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,44 +299,6 @@ void acpi_pci_irq_del_prt(int segment, int bus)
/* --------------------------------------------------------------------------
PCI Interrupt Routing Support
-------------------------------------------------------------------------- */
static int
acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
int *triggering, int *polarity, char **link)
{
int irq;


if (entry->link) {
irq = acpi_pci_link_allocate_irq(entry->link, entry->index,
triggering, polarity, link);
if (irq < 0) {
printk(KERN_WARNING PREFIX
"Invalid IRQ link routing entry\n");
return -1;
}
} else {
irq = entry->index;
*triggering = ACPI_LEVEL_SENSITIVE;
*polarity = ACPI_ACTIVE_LOW;
}

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found GSI %d\n", irq));
return irq;
}

static int
acpi_pci_free_irq(struct acpi_prt_entry *entry)
{
int irq;

if (entry->link) {
irq = acpi_pci_link_free_irq(entry->link);
} else {
irq = entry->index;
}
return irq;
}

static struct acpi_prt_entry *
acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
{
Expand Down Expand Up @@ -426,10 +388,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
return 0;
}

if (entry)
gsi = acpi_pci_allocate_irq(entry, &triggering, &polarity,
&link);
else
if (entry) {
if (entry->link)
gsi = acpi_pci_link_allocate_irq(entry->link,
entry->index,
&triggering, &polarity,
&link);
else
gsi = entry->index;
} else
gsi = -1;

/*
Expand Down Expand Up @@ -491,7 +458,10 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
if (!entry)
return;

gsi = acpi_pci_free_irq(entry);
if (entry->link)
gsi = acpi_pci_link_free_irq(entry->link);
else
gsi = entry->index;

/*
* TBD: It might be worth clearing dev->irq by magic constant
Expand Down

0 comments on commit c2da6a8

Please sign in to comment.