From: Andrew Lunn <andrew@lunn.ch>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Yang Li <yang.lee@linux.alibaba.com>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] leds: trigger: netdev: add additional specific link speed mode
Date: Sun, 11 Jun 2023 17:57:04 +0200 [thread overview]
Message-ID: <ef4f7d7b-6dd9-4dbc-adea-2470b5478b50@lunn.ch> (raw)
In-Reply-To: <20230610041616.21141-2-ansuelsmth@gmail.com>
On Sat, Jun 10, 2023 at 06:16:15AM +0200, Christian Marangi wrote:
> Add additional modes for specific link speed. Use ethtool APIs to get the
> current link speed and enable the LED accordingly. Under netdev event
> handler the rtnl lock is already held and is not needed to be set to
> access ethtool APIs.
>
> This is especially useful for PHY and Switch that supports LEDs hw
> control for specific link speed. (example scenario a PHY that have 2 LED
> connected one green and one orange where the green is turned on with
> 1000mbps speed and orange is turned on with 10mpbs speed)
>
> On mode set from sysfs we check if we have enabled split link speed mode
> and reject enabling generic link mode to prevent wrong and redundant
> configuration.
>
> Rework logic on the set baseline state to support these new modes to
> select if we need to turn on or off the LED.
>
> Add additional modes:
> - link_10: Turn on LED when link speed is 10mbps
> - link_100: Turn on LED when link speed is 100mbps
> - link_1000: Turn on LED when link speed is 1000mbps
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2023-06-11 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-10 4:16 [PATCH v2 0/2] leds: trigger: netdev: add additional modes Christian Marangi
2023-06-10 4:16 ` [PATCH v2 1/2] leds: trigger: netdev: add additional specific link speed mode Christian Marangi
2023-06-11 15:57 ` Andrew Lunn [this message]
2023-06-10 4:16 ` [PATCH v2 2/2] leds: trigger: netdev: add additional specific link duplex mode Christian Marangi
2023-06-11 16:01 ` Andrew Lunn
2023-06-11 7:54 ` Christian Marangi
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=ef4f7d7b-6dd9-4dbc-adea-2470b5478b50@lunn.ch \
--to=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=yang.lee@linux.alibaba.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
all inboxes | Powered by JetHome®