Ring the Rx doorbell during the Rx ring flush processing only if there is a valid completion. Signed-off-by: Ajit Khaparde Reviewed-by: Damodharam Ammepalli --- drivers/net/bnxt/bnxt_rxr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index c5c9f9e6e6..d0706874a6 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -1713,10 +1713,11 @@ int bnxt_flush_rx_cmp(struct bnxt_cp_ring_info *cpr) nb_rx++; } while (nb_rx < ring_mask); - cpr->cp_raw_cons = raw_cons; - - /* Ring the completion queue doorbell. */ - bnxt_db_cq(cpr); + if (nb_rx) { + cpr->cp_raw_cons = raw_cons; + /* Ring the completion queue doorbell. */ + bnxt_db_cq(cpr); + } return 0; } -- 2.39.2 (Apple Git-143)