net/bnxt: fix race condition when port is stopped
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 20 Feb 2020 04:12:14 +0000 (09:42 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:20 +0000 (11:41 +0100)
commitc696cc659337c682f1055e646600ab3dca733b0e
treef5b0ac03208aacd5c3c96aa63c8824e3da048f6d
parent0732bcb40f2f54397b70b6c63e0b1c7bdc03b8db
net/bnxt: fix race condition when port is stopped

Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.

Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_cpr.c