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

software-controlled LEDs spanning multiple LAN ports (DSA) #2756

Open
AiyionPrime opened this issue Jan 10, 2023 · 1 comment
Open

software-controlled LEDs spanning multiple LAN ports (DSA) #2756

AiyionPrime opened this issue Jan 10, 2023 · 1 comment
Labels
0. type: bug This is a bug 9. meta: upstream issue Issue pertains to an upstream project

Comments

@AiyionPrime
Copy link
Member

AiyionPrime commented Jan 10, 2023

I think there is no need to stall #2716 much longer.

I think we have to take a look at software-controlled LEDs spanning multiple LAN ports in conjunction with DSA, as this is currently not handled nicely upstream. I assume some other devices have lost sane handling with migrating to DSA also.

Originally posted by @blocktrron in #2716 (comment)

tldr;
Several devices in OpenWrt use 'br-lan' as LED-trigger in DSA, while swconfig provided a trigger for the switch, which in combination with a portmask aloowed to only fire on lan ports.

@AiyionPrime AiyionPrime added 0. type: bug This is a bug 9. meta: upstream issue Issue pertains to an upstream project labels Jan 10, 2023
@Djfe
Copy link
Contributor

Djfe commented Feb 5, 2023

Also: LED handles for MT7621 devices (MT7530 switch) were removed by openwrt/openwrt@fc33c41

So there is only a hacky way right now to disable them if you want to by using mdio manually.
https://forum.openwrt.org/t/openwrt-support-for-wax206/127523/294?u=djfe

Why where they removed? Because registering them as mdio and firing them with netdev doesn't show the offloaded traffic between lan ports on a switch and because they cause many interrupts to be fired on mdio which reduces performance massively.
Discussion was here (it spans over several posts):
openwrt/openwrt#10829 (comment)

This is how I got aware of it:
openwrt/openwrt#11601 (comment)
openwrt/openwrt#11601 (comment)

OpenWRT maintainers are waiting for this to be resolved upstream (Linux), so they don't have to maintain a solution downstream that belongs upstream. The solution would be to allow setting registers on the switch to enable and disable it from there (or something like that). Right now the switch handles blinking on packets itself. (in hardware/offloaded)
This was a first try to send in a patch upstream, I think:
https://lwn.net/ml/linux-kernel/20220503151633.18760-1-ansuelsmth@gmail.com/

Issue in OpenWRT:
openwrt/openwrt#11010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. type: bug This is a bug 9. meta: upstream issue Issue pertains to an upstream project
Projects
None yet
Development

No branches or pull requests

2 participants