From: Huisong Li Date: Thu, 29 Apr 2021 09:03:59 +0000 (+0800) Subject: net/hns3: fix MAC enable failure rollback X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c70d8e99fbde1830389be95ef2878767787bf2c6;p=dpdk.git net/hns3: fix MAC enable failure rollback If driver fails to enable MAC, it does not need to rollback the MAC configuration. This patch fixes it. Fixes: bdaf190f8235 ("net/hns3: support link speed autoneg for PF") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index b6655549e9..c554d2adfc 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5608,12 +5608,14 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue) ret = hns3_apply_link_speed(hw); if (ret) - goto err_config_mac_mode; + goto err_set_link_speed; return 0; -err_config_mac_mode: +err_set_link_speed: (void)hns3_cfg_mac_mode(hw, false); + +err_config_mac_mode: hns3_dev_release_mbufs(hns); /* * Here is exception handling, hns3_reset_all_tqps will have the