netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
@ 2023-06-21  9:54 Christian Marangi
  2023-06-22 12:56 ` Andrew Lunn
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christian Marangi @ 2023-06-21  9:54 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Christian Marangi,
	Pavel Machek, netdev, linux-kernel

The QCA8K switch supports additional modes that can be handled in
hardware for the LED netdev trigger.

Add these additional modes to further support the Switch LEDs and
offload more blink modes.

Add additional modes:
- link_10
- link_100
- link_1000
- half_duplex
- full_duplex

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/net/dsa/qca/qca8k-leds.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/net/dsa/qca/qca8k-leds.c b/drivers/net/dsa/qca/qca8k-leds.c
index 6f02029b454b..1261e0bb21ef 100644
--- a/drivers/net/dsa/qca/qca8k-leds.c
+++ b/drivers/net/dsa/qca/qca8k-leds.c
@@ -68,6 +68,16 @@ qca8k_parse_netdev(unsigned long rules, u32 *offload_trigger)
 		*offload_trigger |= QCA8K_LED_TX_BLINK_MASK;
 	if (test_bit(TRIGGER_NETDEV_RX, &rules))
 		*offload_trigger |= QCA8K_LED_RX_BLINK_MASK;
+	if (test_bit(TRIGGER_NETDEV_LINK_10, &rules))
+		*offload_trigger |= QCA8K_LED_LINK_10M_EN_MASK;
+	if (test_bit(TRIGGER_NETDEV_LINK_100, &rules))
+		*offload_trigger |= QCA8K_LED_LINK_100M_EN_MASK;
+	if (test_bit(TRIGGER_NETDEV_LINK_1000, &rules))
+		*offload_trigger |= QCA8K_LED_LINK_1000M_EN_MASK;
+	if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &rules))
+		*offload_trigger |= QCA8K_LED_HALF_DUPLEX_MASK;
+	if (test_bit(TRIGGER_NETDEV_FULL_DUPLEX, &rules))
+		*offload_trigger |= QCA8K_LED_FULL_DUPLEX_MASK;
 
 	if (rules && !*offload_trigger)
 		return -EOPNOTSUPP;
@@ -322,6 +332,16 @@ qca8k_cled_hw_control_get(struct led_classdev *ldev, unsigned long *rules)
 		set_bit(TRIGGER_NETDEV_TX, rules);
 	if (val & QCA8K_LED_RX_BLINK_MASK)
 		set_bit(TRIGGER_NETDEV_RX, rules);
+	if (val & QCA8K_LED_LINK_10M_EN_MASK)
+		set_bit(TRIGGER_NETDEV_LINK_10, rules);
+	if (val & QCA8K_LED_LINK_100M_EN_MASK)
+		set_bit(TRIGGER_NETDEV_LINK_100, rules);
+	if (val & QCA8K_LED_LINK_1000M_EN_MASK)
+		set_bit(TRIGGER_NETDEV_LINK_1000, rules);
+	if (val & QCA8K_LED_HALF_DUPLEX_MASK)
+		set_bit(TRIGGER_NETDEV_HALF_DUPLEX, rules);
+	if (val & QCA8K_LED_FULL_DUPLEX_MASK)
+		set_bit(TRIGGER_NETDEV_FULL_DUPLEX, rules);
 
 	return 0;
 }
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-21  9:54 [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger Christian Marangi
@ 2023-06-22 12:56 ` Andrew Lunn
  2023-06-22 15:35 ` Florian Fainelli
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2023-06-22 12:56 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Florian Fainelli, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Pavel Machek, netdev, linux-kernel

On Wed, Jun 21, 2023 at 11:54:09AM +0200, Christian Marangi wrote:
> The QCA8K switch supports additional modes that can be handled in
> hardware for the LED netdev trigger.
> 
> Add these additional modes to further support the Switch LEDs and
> offload more blink modes.
> 
> Add additional modes:
> - link_10
> - link_100
> - link_1000
> - half_duplex
> - full_duplex
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-21  9:54 [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger Christian Marangi
  2023-06-22 12:56 ` Andrew Lunn
@ 2023-06-22 15:35 ` Florian Fainelli
  2023-06-23  2:31 ` Jakub Kicinski
  2023-06-23  3:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2023-06-22 15:35 UTC (permalink / raw)
  To: Christian Marangi, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Pavel Machek, netdev,
	linux-kernel



On 6/21/2023 10:54 AM, Christian Marangi wrote:
> The QCA8K switch supports additional modes that can be handled in
> hardware for the LED netdev trigger.
> 
> Add these additional modes to further support the Switch LEDs and
> offload more blink modes.
> 
> Add additional modes:
> - link_10
> - link_100
> - link_1000
> - half_duplex
> - full_duplex
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-21  9:54 [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger Christian Marangi
  2023-06-22 12:56 ` Andrew Lunn
  2023-06-22 15:35 ` Florian Fainelli
@ 2023-06-23  2:31 ` Jakub Kicinski
  2023-06-23  3:10   ` Christian Marangi
  2023-06-23  3:00 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-23  2:31 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Paolo Abeni, Pavel Machek, netdev, linux-kernel

On Wed, 21 Jun 2023 11:54:09 +0200 Christian Marangi wrote:
> The QCA8K switch supports additional modes that can be handled in
> hardware for the LED netdev trigger.
> 
> Add these additional modes to further support the Switch LEDs and
> offload more blink modes.

Something may be funny with the date on your system, FWIW, because your
patches seem to arrive almost a day in the past.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-21  9:54 [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger Christian Marangi
                   ` (2 preceding siblings ...)
  2023-06-23  2:31 ` Jakub Kicinski
@ 2023-06-23  3:00 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-23  3:00 UTC (permalink / raw)
  To: Christian Marangi
  Cc: andrew, f.fainelli, olteanv, davem, edumazet, kuba, pabeni, pavel,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 21 Jun 2023 11:54:09 +0200 you wrote:
> The QCA8K switch supports additional modes that can be handled in
> hardware for the LED netdev trigger.
> 
> Add these additional modes to further support the Switch LEDs and
> offload more blink modes.
> 
> Add additional modes:
> - link_10
> - link_100
> - link_1000
> - half_duplex
> - full_duplex
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: qca8k: add support for additional modes for netdev trigger
    https://git.kernel.org/netdev/net-next/c/2555f35a4f42

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-23  2:31 ` Jakub Kicinski
@ 2023-06-23  3:10   ` Christian Marangi
  2023-06-23 15:34     ` Jakub Kicinski
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Marangi @ 2023-06-23  3:10 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Paolo Abeni, Pavel Machek, netdev, linux-kernel

On Thu, Jun 22, 2023 at 07:31:20PM -0700, Jakub Kicinski wrote:
> On Wed, 21 Jun 2023 11:54:09 +0200 Christian Marangi wrote:
> > The QCA8K switch supports additional modes that can be handled in
> > hardware for the LED netdev trigger.
> > 
> > Add these additional modes to further support the Switch LEDs and
> > offload more blink modes.
> 
> Something may be funny with the date on your system, FWIW, because your
> patches seem to arrive almost a day in the past.

Lovely WSL istance (Windows Subsystem for Linux) that goes out of sync with
the host machine sometimes. Does the time cause any problem? I will
check that in the future before sending patches...

-- 
	Ansuel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-23 15:34     ` Jakub Kicinski
@ 2023-06-23 15:30       ` Christian Marangi
  0 siblings, 0 replies; 8+ messages in thread
From: Christian Marangi @ 2023-06-23 15:30 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Paolo Abeni, Pavel Machek, netdev, linux-kernel

On Fri, Jun 23, 2023 at 08:34:42AM -0700, Jakub Kicinski wrote:
> On Fri, 23 Jun 2023 05:10:47 +0200 Christian Marangi wrote:
> > > Something may be funny with the date on your system, FWIW, because your
> > > patches seem to arrive almost a day in the past.  
> > 
> > Lovely WSL istance (Windows Subsystem for Linux) that goes out of sync with
> > the host machine sometimes. Does the time cause any problem? I will
> > check that in the future before sending patches...
> 
> Unfortunately for some reason patchwork orders patches by send time,
> not by the time the patches arrived, and we use a time-bound query to
> fetch new patches. So if the date is too far back the patches won't get
> fetched for the build tester.

!!! No idea! Sorry for any problem that I might have caused. Will make
sure this won't happen again.

-- 
	Ansuel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger
  2023-06-23  3:10   ` Christian Marangi
@ 2023-06-23 15:34     ` Jakub Kicinski
  2023-06-23 15:30       ` Christian Marangi
  0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-23 15:34 UTC (permalink / raw)
  To: Christian Marangi
  Cc: Andrew Lunn, Florian Fainelli, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Paolo Abeni, Pavel Machek, netdev, linux-kernel

On Fri, 23 Jun 2023 05:10:47 +0200 Christian Marangi wrote:
> > Something may be funny with the date on your system, FWIW, because your
> > patches seem to arrive almost a day in the past.  
> 
> Lovely WSL istance (Windows Subsystem for Linux) that goes out of sync with
> the host machine sometimes. Does the time cause any problem? I will
> check that in the future before sending patches...

Unfortunately for some reason patchwork orders patches by send time,
not by the time the patches arrived, and we use a time-bound query to
fetch new patches. So if the date is too far back the patches won't get
fetched for the build tester.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-23 15:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-21  9:54 [net-next PATCH] net: dsa: qca8k: add support for additional modes for netdev trigger Christian Marangi
2023-06-22 12:56 ` Andrew Lunn
2023-06-22 15:35 ` Florian Fainelli
2023-06-23  2:31 ` Jakub Kicinski
2023-06-23  3:10   ` Christian Marangi
2023-06-23 15:34     ` Jakub Kicinski
2023-06-23 15:30       ` Christian Marangi
2023-06-23  3:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).