[7/9] net/ngbe: fix issues caused by MNG veto bit setting

Message ID 20230614023429.1002071-8-jiawenwu@trustnetic.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series Wangxun bug fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Jiawen Wu June 14, 2023, 2:34 a.m. UTC
  In the new firmware, MNG veto bit is set by default for new features. It
causes the PHY configuration not to be reset after LAN reset. So PHY power
will be down after stopping device. The internal PHY then cannot be
initialized successfully at device start. Add setting power on for internal
PHY to fix this issue.

Fixes: abea8974c7a6 ("net/ngbe: support link down/up")
Cc: stable@dpdk.org

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_phy_rtl.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/ngbe/base/ngbe_phy_rtl.c b/drivers/net/ngbe/base/ngbe_phy_rtl.c
index 9b323624ec..88bacec114 100644
--- a/drivers/net/ngbe/base/ngbe_phy_rtl.c
+++ b/drivers/net/ngbe/base/ngbe_phy_rtl.c
@@ -120,6 +120,8 @@  s32 ngbe_init_phy_rtl(struct ngbe_hw *hw)
 	hw->init_phy = true;
 	msec_delay(1);
 
+	hw->phy.set_phy_power(hw, true);
+
 	for (i = 0; i < 15; i++) {
 		if (!rd32m(hw, NGBE_STAT,
 			NGBE_STAT_GPHY_IN_RST(hw->bus.lan_id)))