From 2807c5861e31b99295b915b28e121ce059a46416 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Sat, 8 Jun 2019 23:22:04 +0400 Subject: [PATCH] net/bnxt: check for null completion ring doorbell It is observed that sometimes during init, the bnxt_int_handler() gets invoked while the cpr->cp_db.doorbell is not yet initialized. Check for the same and return. Fixes: f7ecea911ec5 ("net/bnxt: fix interrupt handler") Cc: stable@dpdk.org Signed-off-by: Somnath Kotur Signed-off-by: Kalesh AP Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 918f3dcf48..0bb3eb4faf 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -31,7 +31,7 @@ static void bnxt_int_handler(void *param) raw_cons = cpr->cp_raw_cons; while (1) { - if (!cpr || !cpr->cp_ring_struct) + if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) return; cons = RING_CMP(cpr->cp_ring_struct, raw_cons); -- 2.20.1