From: Ley Foon Tan <lftan@altera.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Ley Foon Tan <lftan@altera.com>, <lftan.linux@gmail.com>
Subject: [PATCH 3/3] PCI: altera: fix error when INTX is 4
Date: Thu, 3 Dec 2015 19:17:54 +0800 [thread overview]
Message-ID: <1449141474-3378-4-git-send-email-lftan@altera.com> (raw)
In-Reply-To: <1449141474-3378-1-git-send-email-lftan@altera.com>
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>
---
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 e4176b3..1a2d4a6 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -467,7 +467,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");
--
1.8.2.1
next prev parent reply other threads:[~2015-12-03 11:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 11:17 [PATCH 0/3] fixes to support multi-functions device Ley Foon Tan
2015-12-03 11:17 ` [PATCH 1/3] PCI: altera: fix incorrect devfn for requester ID Ley Foon Tan
2015-12-03 11:17 ` [PATCH 2/3] PCI: altera: check TLP completion status Ley Foon Tan
2015-12-03 11:17 ` Ley Foon Tan [this message]
2015-12-04 22:28 ` [PATCH 0/3] fixes to support multi-functions device Bjorn Helgaas
2015-12-07 1:49 ` Ley Foon Tan
-- strict thread matches above, loose matches on Subject: below --
2015-12-03 9:54 Ley Foon Tan
2015-12-03 9:54 ` [PATCH 3/3] PCI: altera: fix error when INTX is 4 Ley Foon Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449141474-3378-4-git-send-email-lftan@altera.com \
--to=lftan@altera.com \
--cc=bhelgaas@google.com \
--cc=lftan.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®