summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/tile
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-03-14 18:08:21 -0700
committerDavid S. Miller <davem@davemloft.net>2014-03-14 22:52:48 -0400
commitd110ec4533261e7f9d89bfeeae80cc50fd9e7468 (patch)
treee58fb56f740773da45bb2ee41999e1aea29dc6f8 /drivers/net/ethernet/tile
parent99a09c26a8f353bc35087ffa8cc47ffdd6d5d5bc (diff)
downloadlinux-d110ec4533261e7f9d89bfeeae80cc50fd9e7468.tar.bz2
tilegx: Don't receive packets when the napi budget == 0
Processing any incoming packets with a with a napi budget of 0 is incorrect driver behavior. This matters as netpoll will shortly call drivers with a budget of 0 to avoid receive packet processing happening in hard irq context. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/tile')
-rw-r--r--drivers/net/ethernet/tile/tilegx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 17503da9f7a5..b43f1b3b9632 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -659,6 +659,9 @@ static int tile_net_poll(struct napi_struct *napi, int budget)
struct info_mpipe *info_mpipe =
container_of(napi, struct info_mpipe, napi);
+ if (budget <= 0)
+ goto done;
+
instance = info_mpipe->instance;
while ((n = gxio_mpipe_iqueue_try_peek(
&info_mpipe->iqueue,