From 5bee7bef8d6f74d43fe81fae3e786608f3a5d725 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 9 Oct 2019 18:41:51 -0700 Subject: [PATCH] net/bnxt: fix handling interface change status 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: 0b533591238f ("net/bnxt: inform firmware about IF state changes") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Signed-off-by: Ajit Khaparde Reviewed-by: Santoshkumar Karanappa Rastapur --- drivers/net/bnxt/bnxt_hwrm.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.20.1