From: Aleksander Jan Bajkowski Date: Sat, 2 May 2026 09:28:47 +0000 (+0200) Subject: net: phy: realtek: replace magic number with register bit macros X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=052065add1b5acaba235e7ca7f0354edac3116c6;p=thirdparty%2Flinux.git net: phy: realtek: replace magic number with register bit macros Replace magic number with register bit macros. The description of the RTL8211B interrupt register is obtained from publicly available datasheet (RTL8211B(L) Rev. 1.5 Datasheet) Signed-off-by: Aleksander Jan Bajkowski Reviewed-by: Daniel Golle Link: https://patch.msgid.link/20260502092857.156831-1-olek2@wp.pl Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c index e0b37e8d34104..3d98df197a337 100644 --- a/drivers/net/phy/realtek/realtek_main.c +++ b/drivers/net/phy/realtek/realtek_main.c @@ -40,7 +40,12 @@ RTL8201F_ISR_LINK) #define RTL821x_INER 0x12 -#define RTL8211B_INER_INIT 0x6400 +#define RTL8211B_INER_SPEED BIT(14) +#define RTL8211B_INER_DUPLEX BIT(13) +#define RTL8211B_INER_LINK_STATUS BIT(10) +#define RTL8211B_INER_INIT (RTL8211B_INER_SPEED | \ + RTL8211B_INER_DUPLEX | \ + RTL8211B_INER_LINK_STATUS) #define RTL8211E_INER_LINK_STATUS BIT(10) #define RTL8211F_INER_PME BIT(7) #define RTL8211F_INER_LINK_STATUS BIT(4)