Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128114
b: refs/heads/master
c: 4eaf6db
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Dec 31, 2008
1 parent 27411b8 commit 2056b3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 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: 3604a9f445afde2801b8c24b63dd289c33e290a6
refs/heads/master: 4eaf6db3ea0edf7e011a613b5a15360444e58fec
35 changes: 15 additions & 20 deletions trunk/drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ struct acpi_prt_entry {
struct list_head list;
struct acpi_pci_id id;
u8 pin;
struct {
acpi_handle handle;
u32 index;
} link;
u32 irq;
acpi_handle link;
u32 index; /* GSI, or link _CRS index */
};

static LIST_HEAD(acpi_prt_list);
Expand Down Expand Up @@ -205,6 +202,8 @@ acpi_pci_irq_add_entry(acpi_handle handle,

do_prt_fixups(entry, prt);

entry->index = prt->source_index;

/*
* Type 1: Dynamic
* ---------------
Expand All @@ -218,25 +217,22 @@ acpi_pci_irq_add_entry(acpi_handle handle,
* (e.g. exists somewhere 'below' this _PRT entry in the ACPI
* namespace).
*/
if (prt->source[0]) {
acpi_get_handle(handle, prt->source, &entry->link.handle);
entry->link.index = prt->source_index;
}
if (prt->source[0])
acpi_get_handle(handle, prt->source, &entry->link);

/*
* Type 2: Static
* --------------
* The 'source' field is NULL, and the 'source_index' field specifies
* the IRQ value, which is hardwired to specific interrupt inputs on
* the interrupt controller.
*/
else
entry->link.index = prt->source_index;

ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO,
" %04x:%02x:%02x[%c] -> %s[%d]\n",
entry->id.segment, entry->id.bus,
entry->id.device, pin_name(entry->pin),
prt->source, entry->link.index));
prt->source, entry->index));

spin_lock(&acpi_prt_lock);
list_add_tail(&entry->list, &acpi_prt_list);
Expand Down Expand Up @@ -310,17 +306,16 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
int irq;


if (entry->link.handle) {
irq = acpi_pci_link_allocate_irq(entry->link.handle,
entry->link.index, triggering,
polarity, link);
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->link.index;
irq = entry->index;
*triggering = ACPI_LEVEL_SENSITIVE;
*polarity = ACPI_ACTIVE_LOW;
}
Expand All @@ -334,10 +329,10 @@ acpi_pci_free_irq(struct acpi_prt_entry *entry)
{
int irq;

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

0 comments on commit 2056b3e

Please sign in to comment.