lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_d2CgxLKaEV3w8X@shikoro>
Date: Thu, 10 Apr 2025 09:40:58 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: linux-renesas-soc@...r.kernel.org,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org
Subject: Re: [RFC PATCH net-next] net: phy: marvell: support DT
 configurations with only two LEDs


> 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!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ