From: Oliver Stäbler Date: Mon, 20 Nov 2017 13:45:15 +0000 (+0100) Subject: can: ti_hecc: Fix napi poll return value for repoll X-Git-Tag: v4.19~2045^2~5^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6c23b174c3c96616514827407769cbcfc8005cf;p=platform%2Fkernel%2Flinux-rpi3.git can: ti_hecc: Fix napi poll return value for repoll After commit d75b1ade567f ("net: less interrupt masking in NAPI") napi repoll is done only when work_done == budget. So we need to return budget if there are still packets to receive. Signed-off-by: Oliver Stäbler Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 4d49414..db6ea93 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -637,6 +637,9 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota) mbx_mask = hecc_read(priv, HECC_CANMIM); mbx_mask |= HECC_TX_MBOX_MASK; hecc_write(priv, HECC_CANMIM, mbx_mask); + } else { + /* repoll is done only if whole budget is used */ + num_pkts = quota; } return num_pkts;