net: phy: realtek: replace magic number with register bit macros
Subsystems (3)
PATCH 1/1 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 the datasheet.
1. RTL8211B(L) Rev. 1.5 Datasheet
Signed-off-by Aleksander Jan Bajkowski <[email protected]>
--- drivers/net/phy/realtek/realtek_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/phy/realtek/realtek_main.c +6 -1
@@ -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)
Signature · 1 line
2.53.0
Jakub Kicinski
maintainerQuoted 2 lines · On Mon, 27 Apr 2026 00:23:44 +0200 Aleksander Jan Bajkowski wrote:
Replace magic number with register bit macros. The description of the RTL8211B interrupt register is obtained from the datasheet.
net-next wasn't open yet, when you posted.
Please resubmit in a couple of days.
Signature · 1 line
pw-bot: defer