net/bnxt: check for null completion ring doorbell
authorSomnath Kotur <somnath.kotur@broadcom.com>
Sat, 8 Jun 2019 19:22:04 +0000 (23:22 +0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 15:01:06 +0000 (00:01 +0900)
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 <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_irq.c

index 918f3dc..0bb3eb4 100644 (file)
@@ -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);