From: Markus Stockhausen Date: Fri, 15 May 2026 19:47:08 +0000 (+0200) Subject: realtek: pcs: replace mdelay() with usleep_range() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c83c74a4823a285dde17246793b0b9fc28dc001d;p=thirdparty%2Fopenwrt.git realtek: pcs: replace mdelay() with usleep_range() Use CPU friendly operation. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/23391 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c index e3f59211580..91ba92e8e27 100644 --- a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c @@ -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) {