In current RTL8139 NIC driver, spin_lock()/spin_unlock() is used
for irq handler. But for netconsole/netpoll, it prefers
spin_lock_irqsave()/spin_unlcok_irqrestore(). So this patch fixed
this problem to improve netconsole/netpoll support.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
---
b/drivers/net/8139too.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -2136,8 +2136,13 @@ static irqreturn_t rtl8139_interrupt (in
u16 status, ackstat;
int link_changed = 0; /* avoid bogus "uninit" warning */
int handled = 0;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ unsigned long flags;
+ spin_lock_irqsave (&tp->lock, flags);
+#else
spin_lock (&tp->lock);
+#endif
status = RTL_R16 (IntrStatus);
/* shared irq? */
@@ -2185,7 +2190,11 @@ static irqreturn_t rtl8139_interrupt (in
RTL_W16 (IntrStatus, TxErr);
}
out:
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ spin_unlock_irqrestore (&tp->lock, flags);
+#else
spin_unlock (&tp->lock);
+#endif
DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n",
dev->name, RTL_R16 (IntrStatus));
--
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Ingo Molnar | Re: [RFT] x86 acpi: normalize segment descriptor register on resume |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Ingo Molnar | [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
