Re: [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux