> 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:
signature.asc
Description: PGP signature