diff options
author | Olliver Schinagl <oliver@schinagl.nl> | 2022-08-31 17:20:52 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-09-14 18:23:06 +0200 |
commit | c4d030f24cff34737d7cf1f116022b8dbe45f5be (patch) | |
tree | 257f0ba397150cb6f9abdd31645378ff9a0134c7 | |
parent | 67144f38e7e2bf6e973ffee3043883192fb73764 (diff) | |
download | upstream-c4d030f24cff34737d7cf1f116022b8dbe45f5be.tar.gz upstream-c4d030f24cff34737d7cf1f116022b8dbe45f5be.tar.bz2 upstream-c4d030f24cff34737d7cf1f116022b8dbe45f5be.zip |
realtek: rtl838x: Fix ethernet polling timeout on probe
Due to an oversight we accidentally inverted the timeout check. This
patch corrects this.
Fixes: 9cec4a0ea45b ("realtek: Use built-in functionality for timeout loop")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[ wrap poll_timeout line to 80 char ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl838x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl838x.c index f56901d707..76b6cde7be 100644 --- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl838x.c @@ -1809,7 +1809,8 @@ int rtl838x_smi_wait_op(int timeout) int ret = 0; u32 val; - ret = readx_poll_timeout(sw_r32, RTL838X_SMI_ACCESS_PHY_CTRL_1, val, val & 0x1, 20, timeout); + ret = readx_poll_timeout(sw_r32, RTL838X_SMI_ACCESS_PHY_CTRL_1, + val, !(val & 0x1), 20, timeout); if (ret) pr_err("%s: timeout\n", __func__); |