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
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
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
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>
21 drivers/net/dsa/realtek/rtl8365mb.c | 4 ++--
22 1 file changed, 2 insertions(+), 2 deletions(-)
24 --- a/drivers/net/dsa/realtek/rtl8365mb.c
25 +++ b/drivers/net/dsa/realtek/rtl8365mb.c
27 #define RTL8365MB_EXT_PORT_MODE_100FX 13
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 : \
38 #define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \