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 B8514A04DD for ; Thu, 29 Oct 2020 10:58:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE8CCC914; Thu, 29 Oct 2020 10:58:46 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 20966C914 for ; Thu, 29 Oct 2020 10:58:45 +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-ext.broadcom.com (Postfix) with ESMTP id 114D4BB for ; Thu, 29 Oct 2020 02:58:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 114D4BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1603965523; bh=Bve1SXEAL5KHHxcj0WwA4mx9pzm/wY8ApvatyvF0wt0=; h=From:To:Subject:Date:From; b=AozTpfc/jcsSMYWERSVCNNwBjYf1VE8WUUNRpLKt7QABJzPHfhfX8PiuYglgxquni lLsSsOHwlqvGhiqwG4IwoCXMNf09yVhR8zCk+UmgKf0XAKl5NcnhMXKdR26mUUnQ6N bKf/mhC9wzpUKOYaqDCS00IJ2eanqlMwplzPeqgw= From: Kalesh A P To: stable@dpdk.org Date: Thu, 29 Oct 2020 15:43:02 +0530 Message-Id: <20201029101303.27501-1-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 Subject: [dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix link status during device recovery X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Kalesh AP [ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ] 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") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- 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 fe240b6..eeecad0 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -943,7 +943,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 @@ -3909,7 +3911,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); -- 2.10.1