Skip to contentSkip to conversation

net: phy: realtek: replace magic number with register bit macros

PATCH In review Aleksander Jan Bajkowski 2 participants 2 messages Apr 26 – Apr 27

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

---
 drivers/net/phy/realtek/realtek_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/phy/realtek/realtek_main.c +6 -1
index 79c867ef64da..9f2a0bc03728 100644
@@ -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
maintainer
#1 lore raw
Quoted 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