From e30bd4f8342ff251d110ab62eadf3ea9bf37c20f Mon Sep 17 00:00:00 2001 From: Ioana Radulescu Date: Wed, 11 Oct 2017 08:29:47 -0500 Subject: [PATCH] staging: fsl-dpaa2/eth: Refactor interrupt arming in NAPI poll Take into consideration the return value of napi_complete_done(), since there might be an indication that it's not suitable to enable driver interrupts yet. Signed-off-by: Bogdan Purcareata Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index f390de642222..a0be9ab9d326 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -948,8 +948,7 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget) break; } - if (cleaned < budget) { - napi_complete_done(napi, cleaned); + if (cleaned < budget && napi_complete_done(napi, cleaned)) { /* Re-enable data available notifications */ do { err = dpaa2_io_service_rearm(NULL, &ch->nctx);