Thread (24 messages) flat view 24 messages, 4 authors, 2025-02-19

Re: [PATCH net-next 5/7] net: hibmcge: Add mac link exception handling feature in this module

From: Jijie Shao <shaojijie@huawei.com>
Date: 2025-02-14 02:39:13
Also in: lkml

on 2025/2/14 4:05, Andrew Lunn wrote:
quoted
+int hbg_reset_phy(struct hbg_priv *priv)
+{
+	struct phy_device *phydev = priv->mac.phydev;
+
+	if (phydev->drv->soft_reset)
+		return phydev->drv->soft_reset(phydev);
+
+	return genphy_soft_reset(phydev);
+}
A MAC driver should not be doing a soft reset on a PHY. For some
devices, this clears out all the settings. I would suggest you use
phy_stop(), phy_start() which are functions a MAC driver is allowed to
use.

	Andrew
Well, I think your advice is helpful.

It is also a good practice to restart the PHY, which also triggers link relinking.

Thank you. I'll test this method.

Thanks,
Jijie Shao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help