lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YlAy2PrmZuOr/bSx@lunn.ch>
Date:   Fri, 8 Apr 2022 15:04:24 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     "huangguangbin (A)" <huangguangbin2@...wei.com>,
        davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, lipeng321@...wei.com,
        chenhao288@...ilicon.com
Subject: Re: [PATCH] net: phy: genphy_loopback: fix loopback failed when
 speed is unknown

On Fri, Apr 08, 2022 at 10:18:24AM +0200, Oleksij Rempel wrote:
> On Thu, Apr 07, 2022 at 04:45:03PM +0200, Andrew Lunn wrote:
> > > Hi Andrew,
> > > The PHY we test is RTL8211F, it supports 10 half. This problem actually is,
> > > our board has MAC connected with PHY, when loopback test, packet flow is
> > > MAC->PHY->MAC, it needs speed of MAC and PHY should be same when they work.
> > > 
> > > If PHY speed is unknown when PHY goes down, we will not set MAC speed in
> > > adjust_link interface. In this case, we hope that PHY speed should not be
> > > changed, as the old code of function genphy_loopback() before patch
> > > "net: phy: genphy_loopback: add link speed configuration".
> > > 
> > > If PHY has never link, MAC speed has never be set in adjust_link interface,
> > > yeah, in this case, MAC and PHY may has different speed, and they can not work.
> > > I think we can accept this situation.
> > > 
> > > I think it is general problem if there is MAC connected with PHY.
> > 
> > Thanks for investigating. Looks like we are getting close the real
> > solution. And it is a generic problem, that the MAC and PHY might not
> > be using the same configuration.
> > 
> > So it looks like if the link is down, or speed is UNKNOWN, we need to
> > set phydev->link true, speed 10, duplex half...
> 
> Hm, i was thinking, is it impossible to run loopback test on half duplex link.
> Do I missing something?

Ah, you might be right. I was just thinking of the lowest common
denominator. So 10 Full. Or maybe even look at phydev->supported and
pick one from there.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ