Aw: Re: Re: Re: [PATCH net-next v12 08/18] net: ethernet: mtk_eth_soc: fix 1000Base-X and 2500Base-X modes

Frank Wunderlich frank-w at public-files.de
Mon Mar 13 11:39:00 PDT 2023


> Gesendet: Montag, 13. März 2023 um 11:59 Uhr
> Von: "Russell King (Oracle)" <linux at armlinux.org.uk>

> Since describing what I wanted you to test didn't work, here's a patch
> instead, based upon the quirk that you provided (which is what I'd have
> written anyway). Add a "#define DEBUG" to the top of
> drivers/net/phy/phylink.c in addition to applying this patch, and please
> test the resulting kernel, sending me the resulting kernel messages, and
> also reporting whether this works or not.

Hi

thx for the patch...sorry for misunderstanding. i thought the sfp quirk only sets a flag and i need to change
something in phylink.c to do the same as done on userspace, so i tried to simulate the userspace call there only for testing.

here relevant parts of debug

[    1.990637] sfp sfp-1: module OEM              SFP-2.5G-T       rev 1.0  sn SK2301110008     dc 230110  
[    2.000147] mtk_soc_eth 15100000.ethernet eth1: optical SFP: interfaces=[mac=2-4,21-22, sfp=]

[   56.321102] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/2500base-x link mode
[   56.329543] mtk_soc_eth 15100000.ethernet eth1: major config 2500base-x
[   56.336144] mtk_soc_eth 15100000.ethernet eth1: phylink_mac_config: mode=inband/2500base-x/Unknown/Unknown/none adv=00,00000000,00000000,0000e240 pause=04 link=0 an=1

full log here:

https://pastebin.com/vaXtXFY8

unfortunately this does not bring link up

root at bpi-r3:~# ethtool eth1
Settings for eth1:
        Supported ports: [ MII ]
        Supported link modes:   2500baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: on
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no

also after calling this link does not came up

root at bpi-r3:~# ethtool -s eth1 autoneg off
[  542.690293] mtk_soc_eth 15100000.ethernet eth1: phylink_change_inband_advert: mode=inband/2500base-x adv=00,00000000,00000000,0000e200 pause=04

so it looks like it needs to be configured first in inband mode and then autoneg needs to be disabled.

regards Frank




More information about the Linux-mediatek mailing list