summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/neterion
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-03-15 02:06:26 +0100
committerDavid S. Miller <davem@davemloft.net>2014-03-15 03:52:48 +0100
commit99a09c26a8f353bc35087ffa8cc47ffdd6d5d5bc (patch)
treeb4fd085a225ec7b780b6c6ce0e54b9b15759f7f8 /drivers/net/ethernet/neterion
parentmlx4: Don't receive packets when the napi budget == 0 (diff)
downloadlinux-99a09c26a8f353bc35087ffa8cc47ffdd6d5d5bc.tar.xz
linux-99a09c26a8f353bc35087ffa8cc47ffdd6d5d5bc.zip
s2io: 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/neterion')
-rw-r--r--drivers/net/ethernet/neterion/s2io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index 56e3a9d42bb2..d44fdb91808e 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -2914,6 +2914,9 @@ static int rx_intr_handler(struct ring_info *ring_data, int budget)
struct RxD1 *rxdp1;
struct RxD3 *rxdp3;
+ if (budget <= 0)
+ return napi_pkts;
+
get_info = ring_data->rx_curr_get_info;
get_block = get_info.block_index;
memcpy(&put_info, &ring_data->rx_curr_put_info, sizeof(put_info));