projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1850ec2
)
net: phy: realtek: get rid of magic number in rtlgen_read_status()
author
Daniel Golle
<daniel@makrotopia.org>
Mon, 5 Jan 2026 16:39:26 +0000
(16:39 +0000)
committer
Paolo Abeni
<pabeni@redhat.com>
Thu, 8 Jan 2026 12:18:26 +0000
(13:18 +0100)
Use newly introduced helper macros RTL822X_VND2_TO_PAGE and
RTL822X_VND2_TO_PAGE_REG to access RTL_VEND2_PHYSR register over Clause-22
paged access instead of using magic numbers.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link:
https://patch.msgid.link/a53d4577335fdda4d363db9bc4bf614fd3a56c9b.1767630451.git.daniel@makrotopia.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/realtek/realtek_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/phy/realtek/realtek_main.c
b/drivers/net/phy/realtek/realtek_main.c
index
d1c7935
..
eb5b540
100644
(file)
--- a/
drivers/net/phy/realtek/realtek_main.c
+++ b/
drivers/net/phy/realtek/realtek_main.c
@@
-1154,7
+1154,8
@@
static int rtlgen_read_status(struct phy_device *phydev)
if (!phydev->link)
return 0;
- val = phy_read_paged(phydev, 0xa43, 0x12);
+ val = phy_read_paged(phydev, RTL822X_VND2_TO_PAGE(RTL_VND2_PHYSR),
+ RTL822X_VND2_TO_PAGE_REG(RTL_VND2_PHYSR));
if (val < 0)
return val;