Francois Romieu [mailto:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>

--- 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to