net/bnxt: fix freeing all VNICs during port stop
[dpdk.git] / drivers / net / bnxt / bnxt_irq.c
index 4feb637..846325e 100644 (file)
@@ -37,6 +37,11 @@ void bnxt_int_handler(void *param)
                        return;
                }
 
+               if (is_bnxt_in_error(bp)) {
+                       pthread_mutex_unlock(&bp->def_cp_lock);
+                       return;
+               }
+
                cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
                cmp = &cpr->cp_desc_ring[cons];
 
@@ -104,6 +109,9 @@ void bnxt_disable_int(struct bnxt *bp)
        if (BNXT_NUM_ASYNC_CPR(bp) == 0)
                return;
 
+       if (is_bnxt_in_error(bp))
+               return;
+
        if (!cpr || !cpr->cp_db.doorbell)
                return;