[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <010C7BAE6783F34D9AC336EE5A01A08802D2D762@dbde01.ent.ti.com>
Date: Wed, 29 Nov 2006 14:20:31 +0530
From: "Basheer, Mansoor Ahamed" <mansoor.ahamed@...com>
To: "Francois Romieu" <romieu@...zoreil.com>
Cc: <netdev@...r.kernel.org>
Subject: RE: Realtek 8139 driver (8139too.c) TX Timeout doesn't allow interrupt handler to disable receive interrupts at high bi-directional traffic
Francois Romieu [mailto:romieu@...zoreil.com] wrote:
> Afaics your change may disable the Rx irq right after the poll routine
> enabled it again. It will not always work either.
>
> The (slow) timeout watchdog could grab the poll handler and hack the
> irq mask depending on whether poll was scheduled or not.
Could you please confirm whether the attached patch would work?
I tested it and it works for me.
Signed-off-by: Mansoor Ahamed <mansoor.ahamed@...com>
--- old/8139too.c 2006-11-14 10:44:27.000000000 +0530
+++ new/8139too.c 2006-11-14 10:44:18.000000000 +0530
@@ -1438,8 +1438,18 @@
if ((!(tmp & CmdRxEnb)) || (!(tmp & CmdTxEnb)))
RTL_W8 (ChipCmd, CmdRxEnb | CmdTxEnb);
- /* Enable all known interrupts by setting the interrupt mask. */
- RTL_W16 (IntrMask, rtl8139_intr_mask);
+ local_irq_disable();
+ /* Don't enable RX if RX was already scheduled */
+ if(test_bit(__LINK_STATE_START, &dev->state) &&
+ test_bit(__LINK_STATE_RX_SCHED, &dev->state) ) {
+ /* Enable all interrupts except RX by setting the
interrupt mask. */
+ RTL_W16 (IntrMask, rtl8139_norx_intr_mask);
+ }
+ else {
+ /* Enable all known interrupts by setting the interrupt
mask. */
+ RTL_W16 (IntrMask, rtl8139_intr_mask);
+ }
+ local_irq_enable();
}
Thanks
Mansoor
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists