Skip to contentSkip to conversation

net: phy: mxl-gpy: fix delay time required by loopback disable function

PATCH Superseded Xu Liang 3 participants 3 messages Jan 11, 2023 – Jan 13, 2023

Subsystems (4)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Xu Liang

author maintainer
#0 lore raw

PATCH v3 1/1 net: phy: mxl-gpy: fix delay time required by loopback disable function

GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode.

---
v2 changes:
Update comments.

v3 changes:
Submit for net-next.

 drivers/net/phy/mxl-gpy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/phy/mxl-gpy.c +4 -2
index 147d7a5a9b35..b682d7fc477c 100644
@@ -770,9 +770,11 @@ static int gpy_loopback(struct phy_device *phydev, bool enable)
 			 enable ? BMCR_LOOPBACK : 0);
 	if (!ret) {
 		/* It takes some time for PHY device to switch
-		 * into/out-of loopback mode.
+		 * into/out-of loopback mode. It takes 3 seconds
+		 * to fully switch out of loopback mode before
+		 * it can safely re-enter loopback mode.
 		 */
-		msleep(100);
+		msleep(enable ? 100 : 3000);
 	}
 
 	return ret;
Signature · 1 line
2.17.1
maintainer
#2 lore raw
In reply to Xu Liang
Quoted 4 lines · On Wed, 11 Jan 2023 16:22:01 +0800 Xu Liang wrote:

GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode.

Looks like a fix, it needs a Fixes tag and needs to go to net.

Michael already asked you for the Fixes tag on v2, why did you decide to switch to net-next instead?

We don't route fixes to net-next when they are targeting less important features, in case that's your reason. Either something is a fix or it's not. If you think this is not a fix - you need to explain in the commit message why.