mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00

Uses upstream DSA switch modules (rtl8365mb, rtl8366), similar to RTL8367C and rtl8366rb swconfig drivers. The package dependencies exclude targets built without kernel CONFIG_OF. It also fixes the rtl8366rb LED support. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com>
46 lines
1.7 KiB
Diff
46 lines
1.7 KiB
Diff
From 4f580e9aced1816398c1c64f178302a22b8ea6e2 Mon Sep 17 00:00:00 2001
|
|
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Date: Sat, 27 Apr 2024 02:11:29 -0300
|
|
Subject: [PATCH 2/3] net: dsa: realtek: do not assert reset on remove
|
|
|
|
The necessity of asserting the reset on removal was previously
|
|
questioned, as DSA's own cleanup methods should suffice to prevent
|
|
traffic leakage[1].
|
|
|
|
When a driver has subdrivers controlled by devres, they will be
|
|
unregistered after the main driver's .remove is executed. If it asserts
|
|
a reset, the subdrivers will be unable to communicate with the hardware
|
|
during their cleanup. For LEDs, this means that they will fail to turn
|
|
off, resulting in a timeout error.
|
|
|
|
[1] https://lore.kernel.org/r/20240123215606.26716-9-luizluca@gmail.com/
|
|
|
|
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/dsa/realtek/rtl83xx.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/dsa/realtek/rtl83xx.c
|
|
+++ b/drivers/net/dsa/realtek/rtl83xx.c
|
|
@@ -291,16 +291,13 @@ EXPORT_SYMBOL_NS_GPL(rtl83xx_shutdown, R
|
|
* rtl83xx_remove() - Cleanup a realtek switch driver
|
|
* @priv: realtek_priv pointer
|
|
*
|
|
- * If a method is provided, this function asserts the hard reset of the switch
|
|
- * in order to avoid leaking traffic when the driver is gone.
|
|
+ * Placehold for common cleanup procedures.
|
|
*
|
|
- * Context: Might sleep if priv->gdev->chip->can_sleep.
|
|
+ * Context: Any
|
|
* Return: nothing
|
|
*/
|
|
void rtl83xx_remove(struct realtek_priv *priv)
|
|
{
|
|
- /* leave the device reset asserted */
|
|
- rtl83xx_reset_assert(priv);
|
|
}
|
|
EXPORT_SYMBOL_NS_GPL(rtl83xx_remove, REALTEK_DSA);
|
|
|