summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/realtek/rtl8365mb.c
diff options
context:
space:
mode:
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>2024-02-12 18:34:33 -0300
committerJakub Kicinski <kuba@kernel.org>2024-02-13 18:53:11 -0800
commit32e4a5447ed9fa904a2dfcf4609c64bce053b4e8 (patch)
tree32dded36c93bf99ac913ca8fe1aba26b992710d7 /drivers/net/dsa/realtek/rtl8365mb.c
parent239ce99c28e31c47a6ef9ffa4c6b423aa00dc3e7 (diff)
downloadlinux-stable-32e4a5447ed9fa904a2dfcf4609c64bce053b4e8.tar.gz
linux-stable-32e4a5447ed9fa904a2dfcf4609c64bce053b4e8.tar.bz2
linux-stable-32e4a5447ed9fa904a2dfcf4609c64bce053b4e8.zip
net: dsa: realtek: fix digital interface select macro for EXT0
While no supported devices currently utilize EXT0, the register reserves the bits for an EXT0. EXT0 is utilized by devices from the generation prior to rtl8365mb, such as those supported by the driver library rtl8367b. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240212-realtek-fix_ext0-v1-1-f3d2536d191a@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/realtek/rtl8365mb.c')
-rw-r--r--drivers/net/dsa/realtek/rtl8365mb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c
index be56373e9473..12665a8a3412 100644
--- a/drivers/net/dsa/realtek/rtl8365mb.c
+++ b/drivers/net/dsa/realtek/rtl8365mb.c
@@ -209,10 +209,10 @@
#define RTL8365MB_EXT_PORT_MODE_100FX 13
/* External interface mode configuration registers 0~1 */
-#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 0x1305 /* EXT1 */
+#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 0x1305 /* EXT0,EXT1 */
#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 0x13C3 /* EXT2 */
#define RTL8365MB_DIGITAL_INTERFACE_SELECT_REG(_extint) \
- ((_extint) == 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
+ ((_extint) <= 1 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG0 : \
(_extint) == 2 ? RTL8365MB_DIGITAL_INTERFACE_SELECT_REG1 : \
0x0)
#define RTL8365MB_DIGITAL_INTERFACE_SELECT_MODE_MASK(_extint) \