* [PATCH net-next] net: phy: realtek: replace magic number with register bit macros
@ 2026-04-26 22:23 Aleksander Jan Bajkowski
0 siblings, 0 replies; only message in thread
From: Aleksander Jan Bajkowski @ 2026-04-26 22:23 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, daniel,
vladimir.oltean, michael, olek2, ih, rmk+kernel, marek.vasut,
netdev, linux-kernel
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 <olek2@wp.pl>
---
drivers/net/phy/realtek/realtek_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 79c867ef64da..9f2a0bc03728 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)
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-26 22:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26 22:23 [PATCH net-next] net: phy: realtek: replace magic number with register bit macros Aleksander Jan Bajkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox