I found this thread by looking information about BPI-R4. I want to upgrade my router from a PCEngine APU6 with AMD GX-412TC SOC to something more powerful and 10GbE. But the ISP is using 1GbE (1000Mbps) fiber connection.
On Wiki Banana Pi BPI-R4 | BananaPi Docs says “The SFP serdes speed of BPI-R4 is fixed at 10Gbps, so only SFP that support this can be used!”.
Here I see that some of you is trying to use 1000Mbps SFPs.
My question is: what is the status of supporting lower speed SFPs in both ports? It is possible to connect SFP- 31W2A(SM-10)-DR for example?
The other SFP I want to use a DAC to a local switch.
all right, thanks for the tip!
would this work? I do not knnow what quirk I’m looking for, but as this dirty hacking isn’t meant to upstream anyway, I could as well turn phy detection off entirely for 2G5:
--- drivers/net/phy/sfp-bus.c 2024-05-02 16:32:50.000000000 +0200
+++ drivers/net/phy/sfp-bus.2.C 2024-05-25 08:28:21.322032789 +0200
@@ -125,8 +125,9 @@ bool sfp_may_have_phy(struct sfp_bus *bu
case SFF8024_ECC_10GBASE_T_SFI:
case SFF8024_ECC_10GBASE_T_SR:
case SFF8024_ECC_5GBASE_T:
- case SFF8024_ECC_2_5GBASE_T:
return true;
+ case SFF8024_ECC_2_5GBASE_T:
+ return false;
}
}
I know you meant that.
Unfortunately, grep mentions no ‘extended_cc’ in target/linux dir of openwrt (where all patches are stored) when running grep -R.
Openwrt is quite a lot of hacks, so as this problem seems sfp specific, I may as well turn off phy detection entirely for 2g5…
I’m using TP-LINK TL-SM410U, ONTi ONT-C2GE-R10 and some other TP-LINK and ONTi modules.
I had the same problem with Openwrt going from kernel 6.1 to 6.6 on R3. Everything was working fine before, but after the update:
[ 15.141286] sfp sfp-2: module rev 1.0 sn 2208180027 dc 220818
[ 15.150776] mt7530-mdio mdio-bus:1f sfp2: unsupported SFP module: no common interface modes
[ 15.206232] sfp sfp-1: module TP-LINK TL-SM410U rev 2.0 sn 12260M4000737 dc 220621
[ 15.208117] hwmon hwmon1: temp1_input not attached to any thermal zone
[ 15.215705] mtk_soc_eth 15100000.ethernet eth1: unsupported SFP module: no common interface modes
Then I did a sfp-bus.c diff from kernel 6.9.1 and put the patch in target/linux/mediatek/patches-6.6
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -151,10 +151,6 @@
unsigned int br_min, br_nom, br_max;
__ETHTOOL_DECLARE_LINK_MODE_MASK(modes) = { 0, };
- phylink_set(modes, Autoneg);
- phylink_set(modes, Pause);
- phylink_set(modes, Asym_Pause);
-
/* Decode the bitrate information to MBd */
br_min = br_nom = br_max = 0;
if (id->base.br_nominal) {
@@ -328,7 +324,7 @@
* modules use 2500Mbaud rather than 3100 or 3200Mbaud for
* 2500BASE-X, so we allow some slack here.
*/
- if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS) && br_nom) {
+ if (linkmode_empty(modes) && br_nom) {
if (br_min <= 1300 && br_max >= 1200) {
phylink_set(modes, 1000baseX_Full);
__set_bit(PHY_INTERFACE_MODE_1000BASEX, interfaces);
@@ -339,6 +335,10 @@
}
}
+ phylink_set(modes, Autoneg);
+ phylink_set(modes, Pause);
+ phylink_set(modes, Asym_Pause);
+
if (bus->sfp_quirk && bus->sfp_quirk->modes)
bus->sfp_quirk->modes(id, modes, interfaces);
And It seems to be working fine again
[ 15.391245] sfp sfp-2: module rev 1.0 sn 2208180027 dc 220818
[ 15.442338] sfp sfp-1: module TP-LINK TL-SM410U rev 2.0 sn 12260M4000737 dc 220621
[ 15.452578] hwmon hwmon1: temp1_input not attached to any thermal zone
[ 15.643208] mt798x-wmac 18000000.wifi: HW/SW Version: 0x8a108a10, Build Time: 20221012174743a
I am using trunk OpenWrt (version 6.6.30) and have a GPON-ONU-34-20BI module. The module is detected at boot and link is also detected.
[ 58.082859] sfp sfp2: module FS GPON-ONU-34-20BI rev 01 sn G2410075131 dc 240301
Settings for eth1:
Supported ports: [ FIBRE ]
Supported link modes: 2500baseX/Full
1000baseX/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: No
Advertised FEC modes: Not reported
Speed: 2500Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
However the speed is 2500Mb and I have to change it to 1000Mb (ethtool speed) does not work so I have to log into the module.
The IP address according to HackGPON is 192.168.1.10, but I cannot connect to it.
Am I missing something…?
it looks like @dangowrt did a nice job with openwrt’s commits for the past few days … the sfp module works without any hacks and right from the start. Thank you @dangowrt !
Yes I confirm that after the fiber is in the ONT the link is detected and that works perfectly.
My R4 is now my router instead of the ISP one, thank you !
Ok found my problem.
The ISP doesnt use GPON but AON. Therefor the TX didnt match and not came up.
Switching to FS fiber module SFP-GE-BX (be sure to install the right one) works out of the box and the link came up directly.
Settings for eth1:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseX/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseX/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 1000baseX/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
This module can be added to the ones which work with the bpi-r4
SFP filber module