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 <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
This commit is contained in:
Somnath Kotur 2019-06-08 23:22:04 +04:00 committed by Ferruh Yigit
parent 11e5e19695
commit 2807c5861e

View 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);