From: Kalesh AP Date: Thu, 10 Oct 2019 01:41:51 +0000 (-0700) Subject: net/bnxt: fix handling interface change status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5bee7bef8d6f74d43fe81fae3e786608f3a5d725;p=dpdk.git 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 --- 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;