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]
Date:   Mon, 19 Sep 2022 22:47:57 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Alexander 'lynxis' Couzens <lynxis@...0.eu>
Cc:     netdev@...r.kernel.org
Subject: Re: Handle phys changing the interface between 2500basex & SGMII

On Mon, Sep 19, 2022 at 04:47:13PM +0200, Alexander 'lynxis' Couzens wrote:
> Hi,
> 
> I've a mediatek mt7622 SoC connected to a realtek 2.5gbit copper phy
> (rtl8221) via SGMII/2500basex.
> 
> The rtl8221 is changing its phy interface depending on the link.
> So 2500basex for 2.5gbit copper and for all lower speeds (down to
> 10mbit) it's using SGMII.
> 
> What's the best way to implement it?

The marvel10g PHY driver is a good example to follow. It also changes
its host side interface mode as needed by whatever the copper side has
negotiated.

> Should the phy driver change the phy_interface on link up?

Yes.

> As a hack I've modified mac_link_up to handle the different speeds
> and changed the phylink_mac_ops validate to allow advertising lower
> speeds on 2500basex.

phylink should not need any changes. You just need your MAC driver to
follow what is happening in its callbacks.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ