[openwrt/openwrt] realtek: Fix reset register access
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 28 07:54:33 PST 2022
svanheule pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e143e27c8ca6b67af24c8bf8f2eb857919c35e48
commit e143e27c8ca6b67af24c8bf8f2eb857919c35e48
Author: Birger Koblitz <git at birger-koblitz.de>
AuthorDate: Thu May 12 20:40:45 2022 +0200
realtek: Fix reset register access
The reset register on RTL93xx not merely have bits to execute
a reset of a hardware component, but also configuration bits for
reset procedures. Keep them during executing a reset.
Signed-off-by: Birger Koblitz <git at birger-koblitz.de>
Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
[backport to 5.10 kernel]
Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c | 2 +-
target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
index 32de5cc554..16a846c8d7 100644
--- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
@@ -682,7 +682,7 @@ static void rtl838x_hw_reset(struct rtl838x_eth_priv *priv)
else
reset_mask = 0xc;
- sw_w32(reset_mask, priv->r->rst_glb_ctrl);
+ sw_w32_mask(0, reset_mask, priv->r->rst_glb_ctrl);
do { /* Wait for reset of NIC and Queues done */
udelay(20);
diff --git a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c
index 1c473cc7f3..857d389f12 100644
--- a/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-5.15/drivers/net/ethernet/rtl838x_eth.c
@@ -675,7 +675,7 @@ static void rtl838x_hw_reset(struct rtl838x_eth_priv *priv)
else
reset_mask = 0xc;
- sw_w32(reset_mask, priv->r->rst_glb_ctrl);
+ sw_w32_mask(0, reset_mask, priv->r->rst_glb_ctrl);
do { /* Wait for reset of NIC and Queues done */
udelay(20);
More information about the lede-commits
mailing list