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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZWGwJE0aCC/H3O2A@shell.armlinux.org.uk>
Date:   Sat, 25 Nov 2023 08:28:20 +0000
From:   "Russell King (Oracle)" <linux@...linux.org.uk>
To:     Daniel Golle <daniel@...rotopia.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Marek Behún <kabel@...nel.org>,
        Pali Rohár <pali@...nel.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Eric Woudstra <ericwouds@...il.com>,
        John Crispin <john@...ozen.org>
Subject: Re: [PATCH net] net: phylink: set phy_state interface when attaching
 SFP

On Sat, Nov 25, 2023 at 04:56:20AM +0000, Daniel Golle wrote:
> Assume 'usxgmii' being set as initial interface mode in DTS. Now plug
> a 2.5GBase-T SFP module with exposed PHY. Currently this results in
> a rather bizare situation:
> 
> RTL8221B-VB-CG 2.5Gbps PHY (C45) i2c:sfp1-wan:11: rtl822x_c45_get_features: supported=00,00000000,00008000,000080ef
> mtk_soc_eth 15100000.ethernet eth2: requesting link mode phy/2500base-x with support 00,00000000,00008000,0000e0ef
> mtk_soc_eth 15100000.ethernet eth2: switched to phy/2500base-x link mode   <<< !!!!!!
> mtk_soc_eth 15100000.ethernet eth2: major config usxgmii    <<< !!!!!!
> mtk_soc_eth 15100000.ethernet eth2: phylink_mac_config: mode=phy/usxgmii/none adv=00,00000000,00000000,00000000 pause=00
> mtk_soc_eth 15100000.ethernet eth2: PHY [i2c:sfp1-wan:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)
> mtk_soc_eth 15100000.ethernet eth2: phy: 2500base-x setting supported 00,00000000,00008000,0000e0ef advertising 00,00000000,00008000,0000e0ef
> 
> Then the link seemingly comes up (but is dead) because no subsequent
> call to phylink_major_config actually configured MAC and PCS for
> 2500base-x mode.
> 
> This is because phylink_mac_initial_config() considers
> pl->phy_state.interface if in MLO_AN_PHY mode while
> phylink_sfp_set_config() only sets pl->link_config.interface.
> 
> Also set pl->phy_state.interface in phylink_sfp_set_config().

Does it _actually_ matter?

When the PHY's link comes up, doesn't it get sorted out for the real
mode that will be used?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ