From: Daniel Barkalow <barkalow@iabervon.org>
To: linux-kernel@vger.kernel.org
Cc: Jeff Garzik <jeff@garzik.org>, David Miller <davem@davemloft.net>,
Roland Dreier <rdreier@cisco.com>,
Linus Torvalds <torvalds@osdl.org>,
Ayaz Abdulla <aabdulla@nvidia.com>
Subject: [PATCH] Disable INTx when enabling MSI in forcedeth
Date: Tue, 21 Nov 2006 21:28:41 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0611212118540.20138@iabervon.org> (raw)
My nVidia ethernet card doesn't disable its own INTx when MSI is
enabled. This causes a steady stream of spurious interrupts that
eventually kills my SATA IRQ if MSI is used with forcedeth, which is
true by default. Simply disabling the INTx interrupt takes care of it.
This is against -stable, and would be suitable once someone who knows the
code verifies that it's correct.
Works for me, but I've obviously only tested the codepath where using
MSI succeeds.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
(cc:s to people who were talking about the existance of devices
that misbehave like this)
The device in question is:
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
Subsystem: ASUSTeK Computer Inc. Unknown device 8234
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (250ns min, 5000ns max)
Interrupt: pin A routed to IRQ 209
Region 0: Memory at dff7d000 (32-bit, non-prefetchable) [size=4K]
Region 1: I/O ports at e480 [size=8]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 PME-Enable+ DSel=0 DScale=0 PME-
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
Address: 00000000fee00000 Data: 4032
Capabilities: [6c] HyperTransport: MSI Mapping
drivers/net/forcedeth.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 11b8f1b..97087d2 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2691,12 +2691,14 @@ static int nv_request_irq(struct net_dev
}
}
if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
+ pci_intx(np->pci_dev, 0);
if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
np->msi_flags |= NV_MSI_ENABLED;
if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) ||
(intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) {
printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
pci_disable_msi(np->pci_dev);
+ pci_intx(np->pci_dev, 1);
np->msi_flags &= ~NV_MSI_ENABLED;
goto out_err;
}
@@ -2706,6 +2708,8 @@ static int nv_request_irq(struct net_dev
writel(0, base + NvRegMSIMap1);
/* enable msi vector 0 */
writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask);
+ } else {
+ pci_intx(np->pci_dev, 1);
}
}
if (ret != 0) {
--
1.4.2.4
next reply other threads:[~2006-11-22 2:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 2:28 Daniel Barkalow [this message]
2006-11-22 2:42 ` Linus Torvalds
2006-11-22 2:53 ` Daniel Barkalow
2006-11-22 3:43 ` Jeff Garzik
2006-11-22 7:36 ` Yinghai Lu
2006-11-22 7:09 ` Benjamin Herrenschmidt
2006-12-01 1:16 ` Chris Wright
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=Pine.LNX.4.64.0611212118540.20138@iabervon.org \
--to=barkalow@iabervon.org \
--cc=aabdulla@nvidia.com \
--cc=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=torvalds@osdl.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®