diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2008-12-09 18:11:41 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 14:12:47 -0500 |
commit | 98d3333a13029ab07ca1d1bfb9bfa138ea76c3c0 (patch) | |
tree | ee00d479e95241d5cdd147517b47755383c22845 /drivers/pci/hotplug/cpqphp_ctrl.c | |
parent | 23a36002742bca87510201770a7d931c4aa63e97 (diff) |
PCI hotplug: cpqphp: use config space PCI interrupt pin encoding
This patch changes cpqphp to use interrupt pin values just as they
come from PCI config space, i.e., 1=INTA, ..., 4=INTD.
pcibios_set_irq_routing() takes pin arguments in the range 0=INTA, ...,
3=INTD, so we'll adjust the pin just before calling it.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_ctrl.c')
-rw-r--r-- | drivers/pci/hotplug/cpqphp_ctrl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c index a60a25290995..d94722149e02 100644 --- a/drivers/pci/hotplug/cpqphp_ctrl.c +++ b/drivers/pci/hotplug/cpqphp_ctrl.c | |||
@@ -2604,7 +2604,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2604 | for (cloop = 0; cloop < 4; cloop++) { | 2604 | for (cloop = 0; cloop < 4; cloop++) { |
2605 | if (irqs.valid_INT & (0x01 << cloop)) { | 2605 | if (irqs.valid_INT & (0x01 << cloop)) { |
2606 | rc = cpqhp_set_irq(func->bus, func->device, | 2606 | rc = cpqhp_set_irq(func->bus, func->device, |
2607 | 0x0A + cloop, irqs.interrupt[cloop]); | 2607 | cloop + 1, irqs.interrupt[cloop]); |
2608 | if (rc) | 2608 | if (rc) |
2609 | goto free_and_out; | 2609 | goto free_and_out; |
2610 | } | 2610 | } |
@@ -2945,7 +2945,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func | |||
2945 | } | 2945 | } |
2946 | 2946 | ||
2947 | if (!behind_bridge) { | 2947 | if (!behind_bridge) { |
2948 | rc = cpqhp_set_irq(func->bus, func->device, temp_byte + 0x09, IRQ); | 2948 | rc = cpqhp_set_irq(func->bus, func->device, temp_byte, IRQ); |
2949 | if (rc) | 2949 | if (rc) |
2950 | return 1; | 2950 | return 1; |
2951 | } else { | 2951 | } else { |