| From 9a036240ecf3cea9f5bd742e1d2f34a9ab9a0e42 Mon Sep 17 00:00:00 2001 |
| From: Ley Foon Tan <lftan@altera.com> |
| Date: Wed, 9 Dec 2015 21:07:28 +0800 |
| Subject: [PATCH 7/7] PCI: altera: Fix error when INTx is 4 |
| |
| PCI interrupt lines start at 1, not at 0. So, creates additional one |
| interrupt when register for irq domain. |
| |
| Error when PCIe devices have 4 INTx: |
| |
| WARNING: CPU: 1 PID: 1 at kernel/irq/irqdomain.c:280 |
| irq_domain_associate+0x17c/0x1cc() |
| error: hwirq 0x4 is too large for dummy |
| |
| Tested on Ethernet adapter card with multi-functions. |
| |
| Signed-off-by: Ley Foon Tan <lftan@altera.com> |
| Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> |
| --- |
| drivers/pci/host/pcie-altera.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c |
| index 929a80878bb7..749954c3f9ec 100644 |
| --- a/drivers/pci/host/pcie-altera.c |
| +++ b/drivers/pci/host/pcie-altera.c |
| @@ -477,7 +477,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie) |
| struct device_node *node = dev->of_node; |
| |
| /* Setup INTx */ |
| - pcie->irq_domain = irq_domain_add_linear(node, INTX_NUM, |
| + pcie->irq_domain = irq_domain_add_linear(node, INTX_NUM + 1, |
| &intx_domain_ops, pcie); |
| if (!pcie->irq_domain) { |
| dev_err(dev, "Failed to get a INTx IRQ domain\n"); |
| -- |
| 2.6.3 |
| |