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: <CA+V-a8v_1u2jGVRRKQCS7ZvvjKORrHjEBdTthjAF91LYEhvYYQ@mail.gmail.com>
Date: Wed, 5 Nov 2025 17:52:32 +0000
From: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Marek Behún <kabel@...nel.org>, 
	linux-leds@...r.kernel.org, netdev@...r.kernel.org, 
	Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>, Russell King <linux@...linux.org.uk>, 
	Matthias Schiffer <matthias.schiffer@...tq-group.com>, 
	Jacek Anaszewski <jacek.anaszewski@...il.com>, 
	Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Subject: Re: [PATCH leds v2 00/10] Add support for offloading netdev trigger
 to HW + example implementation for Turris Omnia

Hi Andrew,

On Wed, Nov 5, 2025 at 3:49 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> > Sorry for the delayed response.
> >
> > I started investigating adding PHY leds. In page 53 section "4.2.27
> > LED Behavior" [0] we have an option for LED0/1 combine feature
> > disable. For this is it OK to add a new DT property?
>
> Why do you need a new property?
>
> You just need to set this bit depending on what has been selected via
> /sys/class/led.
>
Ahh I get you now. When I trigger the sysfs file I get the below files:

# ls
brightness  device  device_name  full_duplex  half_duplex  interval
link  link_10  link_100  max_brightness  offloaded  power  rx  rx_err
subsystem  trigger  tx  tx_err  uevent

As per HW manual [0] we have,
0: Combine enabled (link/activity, duplex/collision).
1: Disable combination (link only, duplex only).

# Combine DISABLED (link + duplex only)
echo netdev > trigger
echo 1 > link
echo 1 > full_duplex  # or half_duplex
echo 0 > rx
echo 0 > tx

# Combine ENABLED (link + activity + duplex + collision)
echo netdev > trigger
echo 1 > link
echo 1 > rx
echo 1 > tx

So to Enable/Disable LEDx combine feature we just need to write as
above. Is my understanding correct?

[0] https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/VMDS-10513_VSC8541-02_VSC8541-05_Datasheet.pdf

> And if the user asks for a mode which the hardware does not supported,
> the core will fall back to use on/off and blink the LED itself.
>
Ok.

> PHY LEDs are the wild west. Every vendor has its own idea what is
> important, and adds features which other vendors don't have. But that
> does not mean we need to support all the features in Linux. So the
> core has a reasonable set of features which we expect most PHYs can
> support. I don't want to add more features unless you have a big
> business case it is needed, and other PHY also have the same feature.
>
Agreed.

Cheers,
Prabhakar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ