diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2017-10-11 08:29:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-18 16:45:18 +0200 |
commit | e30bd4f8342ff251d110ab62eadf3ea9bf37c20f (patch) | |
tree | 7e4a11f05bd780843a04594d3a054a11238f0333 /drivers/staging/fsl-dpaa2 | |
parent | 8658094a22987086a307cfb1fdf9c66d137b8fe3 (diff) |
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 <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 |
1 files changed, 1 insertions, 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); |