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 06F20A3160 for ; Thu, 10 Oct 2019 03:43:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5EF811E8C2; Thu, 10 Oct 2019 03:42:24 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id E550A1DFF2; Thu, 10 Oct 2019 03:42:01 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 01CB330C140; Wed, 9 Oct 2019 18:40:27 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 01CB330C140 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570671627; bh=kNrw53RBQViSUXXCXMdQMqLLdL6pXSiaXmYowsPaXY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=msDlpVj/IM9VwnssM6Xzg7wMB297fbYxXfF509GW6LMxp8OSc9+EhiDTgXJtu9XsJ UCkhik0gO6DwvvrWThwCztz0hEnvVEk+J29IrHWYkxfYlKCjBX8rG8toH44JBTfDC3 PMuF80cj9H5+HunlGh09sM9t1IEvDdwGBog6XaPs= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 43CC114008B; Wed, 9 Oct 2019 18:41:59 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Santoshkumar Karanappa Rastapur Date: Wed, 9 Oct 2019 18:41:51 -0700 Message-Id: <20191010014153.64908-11-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191010014153.64908-1-ajit.khaparde@broadcom.com> References: <167a2652-7ad6-e02a-8a02-01f828bcba8c@intel.com> <20191010014153.64908-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 10/12] net/bnxt: fix to handle interface change status in port start only 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 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 Reviewed-by: Santoshkumar Karanappa Rastapur Reviewed-by: Ajit Khaparde Signed-off-by: Ajit Khaparde --- 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 (Apple Git-117)