tc35815: Fix return value of tc35815_do_interrupt when NAPI enabled
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Mon, 26 Oct 2009 03:46:21 +0000 (03:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Oct 2009 10:56:54 +0000 (03:56 -0700)
Return received count correctly even if tx completed at the same time.
Currently NAPI is disabled for this driver so this patch does not fix
any real problem.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tc35815.c

index d1298e5b72c565d0e9c37fa4bef9052030475e5a..3d3847904c00c218119b8292255513d88e175fc5 100644 (file)
@@ -1592,7 +1592,12 @@ static int tc35815_do_interrupt(struct net_device *dev, u32 status)
                lp->lstats.tx_ints++;
                tc35815_txdone(dev);
                netif_wake_queue(dev);
+#ifdef TC35815_NAPI
+               if (ret < 0)
+                       ret = 0;
+#else
                ret = 0;
+#endif
        }
        return ret;
 }