From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux-renesas-soc@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs
Date: Thu, 10 Apr 2025 09:40:58 +0200 [thread overview]
Message-ID: <Z_d2CgxLKaEV3w8X@shikoro> (raw)
In-Reply-To: <0fe35fe3-b63c-478b-9674-a2522f582167@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 4222 bytes --]
> You should then find that you gain an LED directory per LED in sysfs,
> trigger has [netdev] and there are additional files you can use to
> configure when the LED lights/blinks for different link speeds, RX and
> TX etc.
Again thanks for the pointer, yet I get weird results. After booting,
with the interface up:
===
# cd /sys/class/leds/stmmac-0:08:green:lan/
# ls -l
total 0
-rw-r--r-- 1 root root 4096 May 5 10:13 brightness
lrwxrwxrwx 1 root root 0 May 5 10:13 device -> ../../../stmmac-0:08
-rw-r--r-- 1 root root 4096 May 5 10:13 device_name
-rw-r--r-- 1 root root 4096 May 5 10:13 full_duplex
-rw-r--r-- 1 root root 4096 May 5 10:13 half_duplex
-rw-r--r-- 1 root root 4096 May 5 10:13 interval
-rw-r--r-- 1 root root 4096 May 5 10:13 link
-r--r--r-- 1 root root 4096 May 5 10:13 max_brightness
-r--r--r-- 1 root root 4096 May 5 10:13 offloaded
drwxr-xr-x 2 root root 0 May 5 10:13 power
-rw-r--r-- 1 root root 4096 May 5 10:13 rx
-rw-r--r-- 1 root root 4096 May 5 10:13 rx_err
lrwxrwxrwx 1 root root 0 May 5 10:13 subsystem -> ../../../../../../../../../class/leds
-rw-r--r-- 1 root root 0 May 5 10:13 trigger
-rw-r--r-- 1 root root 4096 May 5 10:13 tx
-rw-r--r-- 1 root root 4096 May 5 10:13 tx_err
-rw-r--r-- 1 root root 4096 May 5 10:13 uevent
# cat trigger device_name offloaded
none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock [netdev] mmc0
0
===
This shows that 'netdev' trigger is selected, alas the device name is
empty and offloading is disabled despite the driver using those
callbacks. The only thing that works is setting 'brightness' manually.
If I now select the 'netdev' trigger _again_, things change:
===
# echo netdev > trigger
# ls -l
total 0
-rw-r--r-- 1 root root 4096 May 5 10:13 brightness
lrwxrwxrwx 1 root root 0 May 5 10:13 device -> ../../../stmmac-0:08
-rw-r--r-- 1 root root 4096 May 5 10:17 device_name
-rw-r--r-- 1 root root 4096 May 5 10:17 full_duplex
-rw-r--r-- 1 root root 4096 May 5 10:17 half_duplex
-rw-r--r-- 1 root root 4096 May 5 10:17 interval
-rw-r--r-- 1 root root 4096 May 5 10:17 link
-rw-r--r-- 1 root root 4096 May 5 10:17 link_10
-rw-r--r-- 1 root root 4096 May 5 10:17 link_100
-rw-r--r-- 1 root root 4096 May 5 10:17 link_1000
-r--r--r-- 1 root root 4096 May 5 10:13 max_brightness
-r--r--r-- 1 root root 4096 May 5 10:17 offloaded
drwxr-xr-x 2 root root 0 May 5 10:13 power
-rw-r--r-- 1 root root 4096 May 5 10:17 rx
-rw-r--r-- 1 root root 4096 May 5 10:17 rx_err
lrwxrwxrwx 1 root root 0 May 5 10:13 subsystem -> ../../../../../../../../../class/leds
-rw-r--r-- 1 root root 0 May 5 10:17 trigger
-rw-r--r-- 1 root root 4096 May 5 10:17 tx
-rw-r--r-- 1 root root 4096 May 5 10:17 tx_err
-rw-r--r-- 1 root root 4096 May 5 10:13 uevent
# cat trigger device_name offloaded
none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock [netdev] mmc0
eth1
1
===
The 'link_*' files appeared, 'device_name' and 'offloaded' have the
expected values. But now the LED is blinking like crazy despite all the
rx/tx/whatnot triggers still set to 0.
At this point, I have to stop it because I currently have not the
bandwidth to go further. I will live with the default 'link only' setup.
I hope I will have some time in the future to add the activity led
properly.
Thank you for your assistance!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-04-10 7:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 6:30 [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs Wolfram Sang
2025-04-08 12:44 ` Andrew Lunn
2025-04-09 6:55 ` Wolfram Sang
2025-04-09 12:11 ` Andrew Lunn
2025-04-10 7:40 ` Wolfram Sang [this message]
2025-04-10 13:10 ` Andrew Lunn
2025-04-10 20:05 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_d2CgxLKaEV3w8X@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox