]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtw89: Lower the timeout in rtw89_fw_read_c2h_reg() for USB
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Tue, 15 Jul 2025 19:44:47 +0000 (22:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:55 +0000 (16:25 +0200)
commit0d9f2cf8a23d47786307a15d2728e8a713545163
treedb58f90b46ea427261f9d01528e576e00ee7f8ad
parente8fe53c8d4b8815af453fe1ae5a17c2dd403b403
wifi: rtw89: Lower the timeout in rtw89_fw_read_c2h_reg() for USB

[ Upstream commit 671be46afd1f03de9dc6e4679c88e1a7a81cdff6 ]

This read_poll_timeout_atomic() with a delay of 1 µs and a timeout of
1000000 µs can take ~250 seconds in the worst case because sending a
USB control message takes ~250 µs.

Lower the timeout to 4000 for USB in order to reduce the maximum polling
time to ~1 second.

This problem was observed with RTL8851BU while suspending to RAM with
WOWLAN enabled. The computer sat for 4 minutes with a black screen
before suspending.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/09313da6-c865-4e91-b758-4cb38a878796@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h