lkml.org 
[lkml]   [2022]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-03-31 14:24    [W:0.061 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site