[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200803311458.56119.yhlu.kernel@gmail.com>
Date: Mon, 31 Mar 2008 14:58:55 -0700
From: Yinghai Lu <yhlu.kernel.send@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
David Miller <davem@...emloft.net>,
Jeff Garzik <jeff@...zik.org>, Greg KH <greg@...ah.com>,
Ingo Molnar <mingo@...e.hu>
Cc: kernel list <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
linux-pci@...ey.karlin.mff.cuni.cz,
Vadim Dyadkin <dyadkin@....pnpi.spb.ru>
Subject: [PATCH] r8169: fix IRQx nobody cared for shared irq with INTx
try to solve
troubles with r8169
http://lkml.org/lkml/2007/8/12/225
same to
[PATCH] e1000: fix IRQx nobody cared for shared irq with INTx
http://lkml.org/lkml/2008/3/29/103
Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 3acfeea..7405a95 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1619,6 +1619,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp->dev = dev;
tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);
+ /* disable INTx at first */
+ pci_intx(pdev, 0);
/* enable device (incl. PCI PM wakeup and hotplug setup) */
rc = pci_enable_device(pdev);
if (rc < 0) {
@@ -1887,6 +1889,11 @@ static int rtl8169_open(struct net_device *dev)
if (retval < 0)
goto err_release_ring_2;
+ if (!(tp->features & RTL_FEATURE_MSI)) {
+ /* enable INTx if not using MSI */
+ pci_intx(pdev, 1);
+ }
+
#ifdef CONFIG_R8169_NAPI
napi_enable(&tp->napi);
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists