can: ti_hecc: Fix napi poll return value for repoll
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/net/can/ti_hecc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/can/ti_hecc.c +3 -0
@@ -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;
Signature · 1 line
2.13.6
Quoted 5 lines · Oliver Stäbler
After commit
d75b1ade567f("net: less interrupt masking in NAPI") napi repoll is done only whenwork_done== budget.
So we need to return budget if there are still packets to receive.Signed-off-by Oliver Stäbler <[email protected]>
Applied to can.
Tnx,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |