From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH rtw-next 2/2] wifi: rtw89: Increase polling delay in rtw89_fwdl_check_path_ready_* for USB
Date: Fri, 11 Jul 2025 15:50:02 +0300 [thread overview]
Message-ID: <403f7a7f-a1dc-4bff-b456-b2c43a8031b3@gmail.com> (raw)
In-Reply-To: <73f8bdbf-ff7f-4741-a6ea-b1d9026833c3@gmail.com>
When the chip is not powered on correctly (like during driver
development) rtw89_fwdl_check_path_ready_ax() can fail.
read_poll_timeout_atomic() with a delay of 1 µs and a timeout of
400000 µs can take 50 seconds with USB because of the time it takes to
send a USB control message. The firmware upload is tried 5 times, so
in total it takes 250 seconds.
Increase the delay to 250 µs in order to reduce the time
rtw89_fwdl_check_path_ready_ax() takes from 50 seconds to less than 1
second.
Make the same change in rtw89_fwdl_check_path_ready_be() as well.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw89/mac.c | 2 +-
drivers/net/wireless/realtek/rtw89/mac_be.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index ff4335ef4033..6878109e3f42 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -6928,7 +6928,7 @@ int rtw89_fwdl_check_path_ready_ax(struct rtw89_dev *rtwdev,
u8 val;
return read_poll_timeout_atomic(rtw89_read8, val, val & check,
- 1, FWDL_WAIT_CNT, false,
+ 250, FWDL_WAIT_CNT, false,
rtwdev, R_AX_WCPU_FW_CTRL);
}
diff --git a/drivers/net/wireless/realtek/rtw89/mac_be.c b/drivers/net/wireless/realtek/rtw89/mac_be.c
index 0078080b3999..cdb8005d2dc0 100644
--- a/drivers/net/wireless/realtek/rtw89/mac_be.c
+++ b/drivers/net/wireless/realtek/rtw89/mac_be.c
@@ -571,7 +571,7 @@ static int rtw89_fwdl_check_path_ready_be(struct rtw89_dev *rtwdev,
u32 val;
return read_poll_timeout_atomic(rtw89_read32, val, val & check,
- 1, 1000000, false,
+ 250, 1000000, false,
rtwdev, R_BE_WCPU_FW_CTRL);
}
--
2.50.0
next prev parent reply other threads:[~2025-07-11 12:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 12:47 [PATCH rtw-next 1/2] wifi: rtw89: Increase polling delay in rtw89_fw_read_c2h_reg() for USB Bitterblue Smith
2025-07-11 12:50 ` Bitterblue Smith [this message]
2025-07-14 2:49 ` Ping-Ke Shih
2025-07-14 22:01 ` Bitterblue Smith
2025-07-15 0:28 ` Ping-Ke Shih
2025-07-15 10:07 ` Bitterblue Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=403f7a7f-a1dc-4bff-b456-b2c43a8031b3@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.