net: dsa: qca8k: add support for additional modes for netdev trigger
Christian Marangi
maintainerPATCH 1/1 net: dsa: qca8k: add support for additional modes for netdev trigger
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
--- drivers/net/dsa/qca/qca8k-leds.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/net/dsa/qca/qca8k-leds.c +20 -0
@@ -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 ; }
Signature · 1 line
2.40.1
Quoted 6 lines · Christian Marangi
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.
Quoted 8 lines
Add additional modes:
-link_10
-link_100
-link_1000
-half_duplex
-full_duplexSigned-off-by Christian Marangi <[email protected]>
Andrew
Quoted 6 lines · Christian Marangi
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.
Quoted 8 lines
Add additional modes:
-link_10
-link_100
-link_1000
-half_duplex
-full_duplexSigned-off-by Christian Marangi <[email protected]>
Signature · 1 line
Florian
Jakub Kicinski
maintainerQuoted 5 lines · 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.
Christian Marangi
maintainerQuoted 9 lines · Jakub Kicinski
Quoted 5 lines · 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...
Signature · 1 line
Ansuel
Jakub Kicinski
maintainerQuoted 6 lines · On Fri, 23 Jun 2023 05:10:47 +0200 Christian Marangi wrote:
Quoted 2 lines
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.
Christian Marangi
maintainerQuoted 4 lines · Jakub Kicinski
Quoted 3 lines · On Fri, 23 Jun 2023 05:10:47 +0200 Christian Marangi wrote:
Quoted 2 lines
Something may be funny with the date on your system, FWIW, because your patches seem to arrive almost a day in the past.
Quoted 8 lines
Quoted 3 lines
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.
Signature · 1 line
Ansuel
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · 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.
Quoted 8 lines
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html