plugged one of my sfp in a 2.5/10G-switch i ordered recently, the other is in r4 v1.1 on wan-sfp
root@bpi-r4-v11:~# echo "file drivers/net/* +p" > /sys/kernel/debug/dynamic_debug/control
root@bpi-r4-v11:~# ip link set eth2 up
[ 82.516418] mtk_soc_eth 15100000.ethernet eth2: configuring for inband/10gbase-r link mode
[ 82.524753] mtk_soc_eth 15100000.ethernet eth2: major config 10gbase-r
[ 82.531831] mtk_soc_eth 15100000.ethernet eth2: phylink_mac_config: mode=inband/10gbase-r/none adv=00,00000000,00000800,00006440 pause=04
[ 82.544175] mtk_soc_eth 15100000.ethernet: mux mux_gdm1_to_gmac1_esw isn't present on the SoC
[ 82.552770] mtk_soc_eth 15100000.ethernet: mux mux_gmac2_gmac0_to_gephy isn't present on the SoC
[ 82.561555] mtk_soc_eth 15100000.ethernet: mux mux_u3_gmac2_to_qphy isn't present on the SoC
[ 82.569990] mtk_soc_eth 15100000.ethernet: mux mux_gmac1_gmac2_to_sgmii_rgmii isn't present on the SoC
[ 82.579279] mtk_soc_eth 15100000.ethernet: mux mux_gmac12_to_gephy_sgmii isn't present on the SoC
[ 82.588150] mtk_soc_eth 15100000.ethernet: path gmac3_usxgmii in set_mux_gmac123_to_gephy_sgmii updated = 0
[ 82.597889] mtk_soc_eth 15100000.ethernet: path gmac3_usxgmii in set_mux_gmac123_to_usxgmii updated = 1
[ 82.609463] sfp sfp1: SM: enter present:down:down event dev_up
[ 82.615298] sfp sfp1: tx disable 1 -> 0
[ 82.619142] sfp sfp1: SM: exit present:up:wait
root@bpi-r4-v11:~# [ 82.669782] sfp sfp1: SM: enter present:up:wait event timeout
[ 82.675539] sfp sfp1: SM: exit present:up:link_up
root@bpi-r4-v11:~# ethtool eth2
Settings for eth2:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseSR/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10000baseSR/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: FIBRE
PHYAD: 0
Transceiver: internal
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: no
root@bpi-r4-v11:~#
strange are the pinmuxes, right?? seems these are defines for the packet-routing (path)
$ grep -Rni 'mux_gdm1_to_gmac1_esw'
drivers/net/ethernet/mediatek/mtk_eth_path.c:53:static int set_mux_gdm1_to_gmac1_esw(struct mtk_eth *eth, u64 path)
drivers/net/ethernet/mediatek/mtk_eth_path.c:276: .name = "mux_gdm1_to_gmac1_esw",
drivers/net/ethernet/mediatek/mtk_eth_path.c:277: .cap_bit = MTK_ETH_MUX_GDM1_TO_GMAC1_ESW,
drivers/net/ethernet/mediatek/mtk_eth_path.c:278: .set_path = set_mux_gdm1_to_gmac1_esw,
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1065: MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT,
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1112:#define MTK_ETH_MUX_GDM1_TO_GMAC1_ESW \
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1113: BIT_ULL(MTK_ETH_MUX_GDM1_TO_GMAC1_ESW_BIT)
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1158:#define MTK_MUX_GDM1_TO_GMAC1_ESW (MTK_ETH_MUX_GDM1_TO_GMAC1_ESW | MTK_MUX)
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1195: MTK_MUX_GDM1_TO_GMAC1_ESW | \
drivers/net/ethernet/mediatek/mtk_eth_soc.h:1204: MTK_GDM1_ESW | MTK_MUX_GDM1_TO_GMAC1_ESW | \
error-mesage is also printed there:
$ grep -Rni "isn't present on the SoC"
drivers/net/ethernet/mediatek/mtk_eth_path.c:330: dev_dbg(eth->dev, "mux %s isn't present on the SoC\n",
in else branch for condition
if (MTK_HAS_CAPS(eth->soc->caps, mtk_eth_muxc[i].cap_bit)) {
one point i see is that eth->soc->caps is u64 and the cap_bit is int…so maybe a unsigned/size issue in MTK_HAS_CAPS macro??
i added some debug, but it seems not related to usxgmii…only sgmii and rgmii…
noticed another thing…link_up event seems to run into timeout and later changed without updating state in ethtool…
[ 31.428589] sfp sfp1: SM: enter present:down:down event dev_up
[ 31.434413] sfp sfp1: tx disable 1 -> 0
[ 31.438267] sfp sfp1: SM: exit present:up:wait
root@bpi-r4-v11:~# [ 31.496164] sfp sfp1: SM: enter present:up:wait event timeout
[ 31.501919] sfp sfp1: SM: exit present:up:link_up
root@bpi-r4-v11:~# ethtool eth2
Settings for eth2:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseSR/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10000baseSR/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: FIBRE
PHYAD: 0
Transceiver: internal
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: no
maybe i need a quirk to extend this wait-time? in this case this is my sfp VENDOR/PN
[ 3.447503] sfp sfp1: module CISCO-FINISAR FTLX8571D3BCL-C2 rev A sn S2209167650 dc 220916
maybe someone is able to decode sfps eeprom i got via
ethtool -m eth2 raw on > hifibre10gsfp.bin
hifibre10gsfp.bin (512 Bytes)
root@bpi-r4-v11:~# hexdump -C hifibre10gsfp.bin
00000000 03 04 07 10 00 00 00 00 00 00 00 06 67 00 00 00 |............g...|
00000010 08 02 00 1e 43 49 53 43 4f 2d 46 49 4e 49 53 41 |....CISCO-FINISA|
00000020 52 20 20 20 00 00 90 65 46 54 4c 58 38 35 37 31 |R ...eFTLX8571|
00000030 44 33 42 43 4c 2d 43 32 41 20 20 20 03 52 00 a5 |D3BCL-C2A .R..|
00000040 00 1a 00 00 53 32 32 30 39 31 36 37 36 35 30 20 |....S2209167650 |
00000050 20 20 20 20 32 32 30 39 31 36 20 20 68 80 03 72 | 220916 h..r|
00000060 00 00 11 0e da 88 47 c6 c3 4f ee b2 d6 1b 47 06 |......G..O....G.|
00000070 ae 0d 17 00 00 00 00 00 00 00 00 00 4e 10 e9 bf |............N...|
00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000000f0 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 |................|
00000100 50 00 f6 00 4b 00 fb 00 8c a0 75 30 88 b8 79 18 |P...K.....u0..y.|
00000110 1d 4c 00 00 17 70 03 e8 31 2d 04 97 27 10 05 c7 |.L...p..1-..'...|
00000120 31 2d 02 86 27 10 03 2d 00 00 00 00 00 00 00 00 |1-..'..-........|
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 3f 80 00 00 00 00 00 00 01 00 00 00 |....?...........|
00000150 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 15 |................|
00000160 19 6a 82 eb 00 00 00 00 00 00 1c 00 00 00 82 00 |.j..............|
00000170 01 40 00 00 05 40 00 00 00 00 00 00 08 11 55 00 |.@[email protected].|
00000180 43 4f 55 49 41 38 4e 43 41 41 31 30 2d 32 34 31 |COUIA8NCAA10-241|
00000190 35 2d 30 33 56 30 33 20 01 00 46 00 00 00 00 c6 |5-03V03 ..F.....|
000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 aa aa |................|
000001c0 53 46 50 2d 31 30 47 2d 53 52 20 20 20 20 20 20 |SFP-10G-SR |
000001d0 20 20 20 20 32 33 00 00 00 00 00 00 00 00 00 35 | 23.........5|
000001e0 15 1a 20 24 2a 30 20 30 00 00 00 00 00 00 00 00 |.. $*0 0........|
000001f0 00 00 00 00 00 1d 00 00 ff ff ff ff 00 00 00 00 |................|
00000200