[dpdk-stable] [PATCH 19.11 1/2] net/bnxt: fix link status during device recovery
Kalesh A P
kalesh-anakkur.purayil at broadcom.com
Thu Oct 29 11:13:02 CET 2020
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
[ 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 <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
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
More information about the stable
mailing list