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 3AD9EA2F63 for ; Fri, 4 Oct 2019 07:03:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC1291C1DA; Fri, 4 Oct 2019 07:03:11 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 8DD051C1A8 for ; Fri, 4 Oct 2019 07:02:55 +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 5A8A230C2D0; Thu, 3 Oct 2019 22:01:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 5A8A230C2D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1570165295; bh=aWC4HU88Wd5W66MOwc/ApKZBg3WXZkn7YwHAHP7AfT4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p/HchTdJMLpFDcFBP24AoCR2D+Bgh9eb9y0MA+LlAcMJiY9kesp2PfSMnPUQafAaG CqB+JMxDn6MTv3kPa2ih1/gacNYpM0CP82Lij9BEnPtwhtsDPWhNNgJphLDVYuUgW7 /FXTKwRZOVfqFlDG64/rX5autJdhlmh3waPtASYs= Received: from localhost.localdomain (unknown [10.230.30.225]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 5D71114008D; Thu, 3 Oct 2019 22:02:51 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP Date: Thu, 3 Oct 2019 22:02:45 -0700 Message-Id: <20191004050246.90165-10-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20191004050246.90165-1-ajit.khaparde@broadcom.com> References: <20191004050246.90165-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 09/10] net/bnxt: fix to handle if 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 should handle if change status during port start only. Also fixed to enable interrupts after issuing hwrm_if_change. Fixes: 92d6617b6e33 ("net/bnxt: inform firmware about IF state changes") Signed-off-by: Kalesh AP --- drivers/net/bnxt/bnxt_ethdev.c | 3 ++- drivers/net/bnxt/bnxt_hwrm.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index fb4deef821..81d58a60c5 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -867,7 +867,6 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS); } - bnxt_enable_int(bp); rc = bnxt_hwrm_if_change(bp, 1); if (!rc) { if (bp->flags & BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE) { @@ -877,6 +876,8 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) } } + bnxt_enable_int(bp); + rc = bnxt_init_chip(bp); if (rc) goto error; 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)