net: phy: mxl-gpy: fix delay time required by loopback disable function
Subsystems (4)
Xu Liang
maintainerPATCH v2 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.
--- drivers/net/phy/mxl-gpy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/phy/mxl-gpy.c +4 -2
@@ -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
Russell King (Oracle)
reviewerHi,
Quoted 2 lines · Xu Liang
GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode.
Would it be better to record the time that loopback mode is exited, and then delay an attempt to re-enter loopback mode if it's less than three seconds since we exited?
Thanks.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Liang Xu
maintainerThanks & Regards,
Xu Liang
Quoted 11 lines
________________________________________
From: Russell King <[email protected]> on behalf of Russell King (Oracle) <[email protected]>
Sent: Wednesday, December 21, 2022 8:21 PM
To: Liang Xu
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Hauke Mehrtens; Thomas Mohren; Ismail, Mohammad Athari; [email protected]; [email protected]
Subject: Re: [PATCH net v2] net: phy: mxl-gpy: fix delay time required by loopback disable functionThis email was sent from outside of MaxLinear.
Hi,
Quoted 7 lines
Quoted 2 lines · Xu Liang
GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode.
Would it be better to record the time that loopback mode is exited, and then delay an attempt to re-enter loopback mode if it's less than three seconds since we exited?
Loopback is usually used in self-test or debugging.
So I just made a simple delay to avoid complexity of time recording. Please let me know if you think it's worth to change, then I will update the patch.
Quoted 7 lines
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/<https://www.armlinux.org.uk/developer/patches>
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Hi,
Quoted 4 lines
GPY2xx devices need 3 seconds to fully switch out of loopback mode before it can safely re-enter loopback mode.
Signed-off-by Xu Liang <[email protected]>
Again, no Fixes tag?
Changelog is missing, what has changes since v1? Also it is good practice to CC the ones which made comments on the previous versions.
-michael