Skip to contentSkip to conversation

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

PATCH Applied Aleksander Jan Bajkowski 3 participants 3 messages May 2 – May 5

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 publicly available datasheet[1].

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
#2 lore raw
In reply to Aleksander Jan Bajkowski
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Sat, 2 May 2026 11:28:47 +0200 you wrote:

Replace magic number with register bit macros. The description of the RTL8211B interrupt register is obtained from publicly available datasheet[1].

1. RTL8211B(L) Rev. 1.5 Datasheet

[...]

Here is the summary with links:
- [net-next] net: phy: realtek: replace magic number with register bit macros

    https://git.kernel.org/netdev/net-next/c/052065add1b5

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html