From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA846A04F0; Tue, 10 Dec 2019 15:48:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B4631BF6D; Tue, 10 Dec 2019 15:48:11 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id D2C891BC25 for ; Tue, 10 Dec 2019 15:48:06 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 83E021BD7BF; Tue, 10 Dec 2019 06:48:05 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 83E021BD7BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1575989286; bh=SJIPetInbhevEQ9/ug4HhMoVSemtkbO0xCpMAO/wfTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mjAKefva3pLGSV3rQbdVHGIMANLoNZjjZxkB9tYmHLLu6VMCZkcCdDsVsWTf89Vfi 3QR90tVfeAUoYkBv3Uy7BWn4XMKMvR29ZboN9mmM3sbv8AzYRNrHfNmfiYNb9wFTso 9qDqUyoQALx3Z2tgJnUnCiN5N97osyje9lwYnHZY= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Tue, 10 Dec 2019 20:35:26 +0530 Message-Id: <20191210150529.27922-4-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20191210150529.27922-1-kalesh-anakkur.purayil@broadcom.com> References: <20191210150529.27922-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 3/6] net/bnxt: fix request for hot reset support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kalesh AP During the registration process, the drivers must publish "HOT_RESET_SUPPORTED" capability to the core firmware only if core firmware is capable of Hot Reset. Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_hwrm.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index e259c82..f9e4d76 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -517,6 +517,7 @@ struct bnxt { #define BNXT_FLAG_INIT_DONE BIT(24) #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS BIT(25) #define BNXT_FLAG_ADV_FLOW_MGMT BIT(26) +#define BNXT_FLAG_FW_CAP_HOT_RESET BIT(27) #define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF)) #define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF) #define BNXT_NPAR(bp) ((bp)->port_partition_type) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index b1f908e..d30da9b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -672,6 +672,11 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp) else bp->flags &= ~BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD; + if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_HOT_RESET_CAPABLE) + bp->flags |= BNXT_FLAG_FW_CAP_HOT_RESET; + else + bp->flags &= ~BNXT_FLAG_FW_CAP_HOT_RESET; + HWRM_UNLOCK(); return rc; @@ -756,7 +761,8 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp) if (bp->flags & BNXT_FLAG_REGISTERED) return 0; - flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT; + if (bp->flags & BNXT_FLAG_FW_CAP_HOT_RESET) + flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT; if (bp->flags & BNXT_FLAG_FW_CAP_ERROR_RECOVERY) flags |= HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ERROR_RECOVERY_SUPPORT; -- 2.10.1