]> git.ipfire.org Git - thirdparty/openwrt.git/blob
a3ccf5d4ad0ad18a9cbb7cd613484483e2a38dc0
[thirdparty/openwrt.git] /
1 From 32e4a5447ed9fa904a2dfcf4609c64bce053b4e8 Mon Sep 17 00:00:00 2001
2 From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
3 Date: Mon, 12 Feb 2024 18:34:33 -0300
4 Subject: [PATCH] net: dsa: realtek: fix digital interface select macro for
5 EXT0
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 While no supported devices currently utilize EXT0, the register reserves
11 the bits for an EXT0. EXT0 is utilized by devices from the generation
12 prior to rtl8365mb, such as those supported by the driver library
13 rtl8367b.
14
15 Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
16 Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
17 Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
18 Link: https://lore.kernel.org/r/20240212-realtek-fix_ext0-v1-1-f3d2536d191a@gmail.com
19 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 ---
21 drivers/net/dsa/realtek/rtl8365mb.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
23
24 --- a/drivers/net/dsa/realtek/rtl8365mb.c
25 +++ b/drivers/net/dsa/realtek/rtl8365mb.c
26 @@ -209,10 +209,10 @@
27 #define RTL8365MB_EXT_PORT_MODE_100FX 13
28
29 /* External interface mode configuration registers 0~1 */
30 -#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 0x1305 /* EXT1 */
31 +#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 0x1305 /* EXT0,EXT1 */
32 #define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 0x13C3 /* EXT2 */
33 #define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(_extint) \
34 - ((_extint) == 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
35 + ((_extint) <= 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
36 (_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \
37 0x0)
38 #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \