Messages in this thread | | | Date | Thu, 31 Mar 2022 14:23:42 +0200 | From | Andrew Lunn <> | Subject | Re: [PATCH] net: phy: genphy_loopback: fix loopback failed when speed is unknown |
| |
On Thu, Mar 31, 2022 at 07:48:19PM +0800, Guangbin Huang wrote: > If phy link status is down because link partner goes down, the phy speed > will be updated to SPEED_UNKNOWN when autoneg on with general phy driver. > If test loopback in this case, the phy speed will be set to 10M. However, > the speed of mac may not be 10M, it causes loopback test failed. > > To fix this problem, if speed is SPEED_UNKNOWN, don't configure link speed.
I don't think this explanation is correct.
If speed is UNKNOWN, ctl is just going to have BMCR_LOOPBACK set. That is very similar to what you are doing. The code then waits for the link to establish. This is where i guess your problem is. Are you seeing ETIMEDOUT? Does the link not establish?
Thanks Andrew
| |