Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22.03] mt7621: VDSL SFP module does not work but works fine in 21.02.x #10892

Open
david-collett opened this issue Oct 4, 2022 · 13 comments
Open
Labels
bug issue report with a confirmed bug kernel pull request/issue with Linux kernel related changes release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release target/ramips pull request/issue for ramips target

Comments

@david-collett
Copy link

david-collett commented Oct 4, 2022

Hi,
I have a Proscent 180-T VDSL SFP module which has been working for 12 months on Openwrt 21.02.x in a Mikrotik RB760iGS (hEX S) router. The module does not support auto-negotiation and ships with instructions saying to disable autoneg and set speed to 1000. As such, I use the following ethtool command:

ethtool -s sfp speed 1000 duplex full autoneg off

The ethtool output of the working module is:

Settings for sfp:
	Supported ports: [ TP MII ]
	Supported link modes:   100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	                        1000baseX/Full 
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  1000baseT/Full 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: No
	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: MII
	PHYAD: 7
	Transceiver: external
	Auto-negotiation: off
	Current message level: 0x000000ff (255)
			       drv probe link timer ifdown ifup rx_err tx_err
	Link detected: yes

After upgrading to 22.03 (and installing/running ethtool as above), the module no longer works (Timeout waiting for PADO packets / Unable to complete PPPoE Discovery). Below is the new output of ethtool in 22.03:

Settings for sfp:
    Supported ports: [ TP MII ]
    Supported link modes:   100baseT/Half 100baseT/Full
                            1000baseT/Full
                            1000baseX/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  1000baseT/Full
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: No
    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: Twisted Pair
    PHYAD: 7
    Transceiver: external
    Auto-negotiation: off
    MDI-X: Unknown
    Current message level: 0x000000ff (255)
                   drv probe link timer ifdown ifup rx_err tx_err
    Link detected: yes

I noted that the port was different, however ethtool -s sfp port mii does nothing, at least while the interface is up. If I revert to 21.02.3, it immediately works again. It appear the driver (at803x?) has undergone some changes and no longer works for this module in 22.03. Any ideas?

Thanks,
Dave

@LGA1150
Copy link
Contributor

LGA1150 commented Oct 8, 2022

Auto-negotiation is mandatory in 1000baseT mode.

@david-collett
Copy link
Author

My issue is that this is a regression. My router that worked on 21.03 no longer works after upgrading to 22.03. Do you have any suggestions I could try?

@arinc9
Copy link
Contributor

arinc9 commented Nov 27, 2022

@david-collett can you try the image on the link below? Luci is included.

https://files.arinc9.com/OpenWrt/

@david-collett
Copy link
Author

@arinc9 What am I testing? i.e. what have you changed? Are these changes in a repository somewhere?

@arinc9
Copy link
Contributor

arinc9 commented Nov 28, 2022

On 760igs, the phy that your SFP is connected to requires the mac, which is connected to the phy, to set an RX delay. I recently made some changes to mt7621.dtsi that didn't account for this. I will send a patch if your SFP starts working with this image.

@david-collett
Copy link
Author

thanks mate, I'll let you know.

@david-collett
Copy link
Author

@arinc9

Unfortunately it hasn't made a difference and I've reverted to 21.02.5.
Attached is some output that may be helpful.

fail.txt
win.txt

@arinc9
Copy link
Contributor

arinc9 commented Nov 28, 2022

Does the sfp driver detect the sfp module?

From my 760igs with a Fiberend RJ45 SFP module:

[   12.396428] sfp sfp1: Host maximum power 1.0W
[...]
[   13.185887] sfp sfp1: module Fiberend         1G-S-T           rev 1.0  sn XXXXXXXXXX    dc XXXXXX  
[   13.204616] Qualcomm Atheros AR8031/AR8033 mdio-bus:07: SFP interface sgmii
[...]
[   97.486534] mtk_soc_eth 1e100000.ethernet sfp: PHY [mdio-bus:07] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)
[   97.507502] mtk_soc_eth 1e100000.ethernet sfp: configuring for phy/rgmii-rxid link mode
[   97.524183] at803x_config_aneg: fiber
[   97.531904] br-lan: port 5(sfp) entered blocking state
[   97.542232] br-lan: port 5(sfp) entered disabled state
[   97.553275] device sfp entered promiscuous mode
[  105.816047] mtk_soc_eth 1e100000.ethernet sfp: Link is Up - 1Gbps/Full - flow control rx/tx
[  105.832780] br-lan: port 5(sfp) entered blocking state
[  105.843224] br-lan: port 5(sfp) entered forwarding state

@david-collett
Copy link
Author

I'll reflash and check that tomorrow. Unfortunately this router+sfp is my daily driver!

@david-collett
Copy link
Author

Yes, it is detected as shown:

[  318.767791] sfp sfp1: Host maximum power 1.0W
[  319.290096] sfp sfp1: module Proscend         180-T            rev V3.4 sn 18234L4TA2180005 dc 21082400

The main difference between the outputs of ethtool on 21.02 and 22.03 is the port (MII vs Twisted Pair), could that be relevant? as mentioned in the original port, I'm unable to make any port change stick with ethtool.

@arinc9
Copy link
Contributor

arinc9 commented Nov 29, 2022

The main difference between the outputs of ethtool on 21.02 and 22.03 is the port (MII vs Twisted Pair), could that be relevant?

I believe so. I think the problem resides at the Atheros PHY driver. If I remember correctly, SFP support for the driver is maintained by OpenWrt folks. Looking at the kernel log, there are changes to the driver from 21.02 to 22.03. See how PHY [mdio-bus:07] driver [Atheros 8031 ethernet] changes to PHY [mdio-bus:07] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)?

I don't debug drivers so I can't do much at this point. It'd be a good idea to mention this issue on openwrt-devel mailing list.
The rgmii delay issue I mentioned would be another roadblock so at least we cleared that up.

@david-collett
Copy link
Author

Yeah, I had noticed there appears to be significant changes to that driver.
I'll join the dev list. Thanks for your help.

@ynezz ynezz changed the title VDSL SFP module does not work in 22.03 (does in 21.02.x) [22.03] VDSL SFP module does not work but works fine in 21.02.x Dec 2, 2022
@ynezz ynezz added kernel pull request/issue with Linux kernel related changes target/ramips pull request/issue for ramips target bug issue report with a confirmed bug labels Dec 2, 2022
@ynezz ynezz changed the title [22.03] VDSL SFP module does not work but works fine in 21.02.x [22.03] mt7621: VDSL SFP module does not work but works fine in 21.02.x Dec 2, 2022
@ynezz ynezz added the release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release label Dec 2, 2022
@david-collett
Copy link
Author

This is still broken in 23.05.0 unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue report with a confirmed bug kernel pull request/issue with Linux kernel related changes release/22.03 pull request/issue targeted (also) for OpenWrt 22.03 release target/ramips pull request/issue for ramips target
Projects
None yet
Development

No branches or pull requests

4 participants