lkml.org 
[lkml]   [2006]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Disable INTx when enabling MSI in forcedeth
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-22 03:31    [W:0.043 / U:5.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site