From: Michael Chan Date: Thu, 29 Dec 2016 17:13:32 +0000 (-0500) Subject: bnxt_en: Use napi_complete_done() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7b9569102995ebc26821789628eef45bd9840d8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git bnxt_en: Use napi_complete_done() For better busy polling and GRO support. Do not re-arm IRQ if napi_complete_done() returns false. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index b53f958ffcb8..3fbc8427be2e 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1778,8 +1778,9 @@ static int bnxt_poll(struct napi_struct *napi, int budget) break; if (!bnxt_has_work(bp, cpr)) { - napi_complete(napi); - BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); + if (napi_complete_done(napi, work_done)) + BNXT_CP_DB_REARM(cpr->cp_doorbell, + cpr->cp_raw_cons); break; } }