From: Atsushi Nemoto Date: Mon, 26 Oct 2009 03:46:21 +0000 (+0000) Subject: tc35815: Fix return value of tc35815_do_interrupt when NAPI enabled X-Git-Tag: v2.6.33-rc1~388^2~644 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=02c5c8ec170a159a563e22c67f8ca111071b8e9f;p=linux.git tc35815: Fix return value of tc35815_do_interrupt when NAPI enabled 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index d1298e5b72c5..3d3847904c00 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c @@ -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; }