]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: replace mdelay() with usleep_range()
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 15 May 2026 19:47:08 +0000 (21:47 +0200)
committerRobert Marko <robimarko@gmail.com>
Sun, 17 May 2026 10:34:47 +0000 (12:34 +0200)
Use CPU friendly operation.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23391
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c

index e3f5921158017145c0b10ab5a9a1069ccd9207c1..91ba92e8e27775b9bbeee7d4afd43fc04fa65d83 100644 (file)
@@ -863,15 +863,15 @@ static int rtpcs_838x_sds_patch(struct rtpcs_serdes *sds,
        u8 sds_id = sds->id;
 
        rtpcs_sds_write(sds, 0, 1, 0xf00);
-       mdelay(1);
+       usleep_range(1000, 2000);
        rtpcs_sds_write(sds, 0, 2, 0x7060);
-       mdelay(1);
+       usleep_range(1000, 2000);
 
        if (sds_id >= 4) {
                rtpcs_sds_write(sds, 2, 30, 0x71e);
-               mdelay(1);
+               usleep_range(1000, 2000);
                rtpcs_sds_write(sds, 0, 4, 0x74d);
-               mdelay(1);
+               usleep_range(1000, 2000);
        }
 
        switch (hw_mode) {