[v2,10/12] net/bnxt: fix to handle interface change status in port start only
diff mbox series

Message ID 20191010014153.64908-11-ajit.khaparde@broadcom.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • bnxt patchset with bug fixes
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde Oct. 10, 2019, 1:41 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

Driver issues hwrm_if_change when the port is started and stopped.
This command returns whether the fw has undergone a reset while port
was down. Fix to handle hwrm_if_change status during port start only.

Fixes: 92d6617b6e33 ("net/bnxt: inform firmware about IF state changes")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5e3117fee9..f94fdde2b1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4858,6 +4858,9 @@  int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
 	flags = rte_le_to_cpu_32(resp->flags);
 	HWRM_UNLOCK();
 
+	if (!up)
+		return 0;
+
 	if (flags & HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_HOT_FW_RESET_DONE) {
 		PMD_DRV_LOG(INFO, "FW reset happened while port was down\n");
 		bp->flags |= BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE;