From patchwork Tue Sep 22 05:34:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Somnath Kotur X-Patchwork-Id: 78229 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2F0BCA04E1; Tue, 22 Sep 2020 07:41:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC6B31D70C; Tue, 22 Sep 2020 07:41:07 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 358481D702; Tue, 22 Sep 2020 07:41:06 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id 398EE422B3; Mon, 21 Sep 2020 22:41:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 398EE422B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1600753265; bh=6uauTJv/S6aRNPeDYXnkSjLbQwIqt1DTjQono0Bt/cE=; h=From:To:Cc:Subject:Date:From; b=l7ITd9l3axnan0eCkZ+yYNwamK9VU8YcZPQnE0+ggNk/YPxp1LSxJilRL6HR8Hsne huSMwMOtSD4te53RoGk7nGsHDsbz3yxsQfAqgyYEfmvDkBqfJwBoiEyFhUJXmbV1aW tDkC+nN/Agdsd4nAlHAd3mVwEbcAziEQvx3lh6G0= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Kalesh AP , stable@dpdk.org, Somnath Kotur Date: Tue, 22 Sep 2020 11:04:16 +0530 Message-Id: <20200922053416.16818-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.28.0.450.g3a238e5 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/bnxt: fix to not bring link down during reset recovery 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 not send the phy_cfg request to bring link down during reset recovery. If the driver sends the phy_cfg request in recovery process, then FW needs to re-establish the link which in turn increases the recovery time based on PHY type and link partners. Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 05e9a6a..e0afaac 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) bnxt_cancel_fw_health_check(bp); - bnxt_dev_set_link_down_op(eth_dev); + /* Do not bring link down during reset recovery */ + if (!is_bnxt_in_error(bp)) + bnxt_dev_set_link_down_op(eth_dev); /* Wait for link to be reset and the async notification to process. * During reset recovery, there is no need to wait and @@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index) static void bnxt_dev_cleanup(struct bnxt *bp) { - bnxt_set_hwrm_link_config(bp, false); + bp->eth_dev->data->dev_link.link_status = 0; bp->link_info->link_up = 0; if (bp->eth_dev->data->dev_started) bnxt_dev_stop_op(bp->eth_dev);