mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
rockchip: fix rtw88 broken driver
* hundred of read32/write8 errors with rtl8723cs chipset, caused by a driver mistake. Backporting solution from 6.19-rc4 fixes the issue
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
From f3ccdfda345ca9a624ea425840a926b8338c1e25 Mon Sep 17 00:00:00 2001
|
||||
From: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Date: Tue, 25 Nov 2025 09:38:49 +0800
|
||||
Subject: [PATCH] wifi: rtw88: limit indirect IO under powered off for
|
||||
RTL8822CS
|
||||
|
||||
The indirect IO is necessary for RTL8822CS, but not necessary for other
|
||||
chips. Otherwiese, it throws errors and becomes unusable.
|
||||
|
||||
rtw88_8723cs mmc1:0001:1: WOW Firmware version 11.0.0, H2C version 0
|
||||
rtw88_8723cs mmc1:0001:1: Firmware version 11.0.0, H2C version 0
|
||||
rtw88_8723cs mmc1:0001:1: sdio read32 failed (0xf0): -110
|
||||
rtw88_8723cs mmc1:0001:1: sdio write8 failed (0x1c): -110
|
||||
rtw88_8723cs mmc1:0001:1: sdio read32 failed (0xf0): -110
|
||||
|
||||
By vendor driver, only RTL8822CS and RTL8822ES need indirect IO, but
|
||||
RTL8822ES isn't supported yet. Therefore, limit it to RTL8822CS only.
|
||||
|
||||
Reported-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
|
||||
Closes: https://lore.kernel.org/linux-wireless/07a32e2d6c764eb1bd9415b5a921a652@realtek.com/T/#m997b4522f7209ba629561c776bfd1d13ab24c1d4
|
||||
Fixes: 58de1f91e033 ("wifi: rtw88: sdio: use indirect IO for device registers before power-on")
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
|
||||
Link: https://patch.msgid.link/1764034729-1251-1-git-send-email-pkshih@realtek.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
index 99d7c629eac6fb..e35de52d8eb430 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -144,8 +144,10 @@ static u32 rtw_sdio_to_io_address(struct rtw_dev *rtwdev, u32 addr,
|
||||
|
||||
static bool rtw_sdio_use_direct_io(struct rtw_dev *rtwdev, u32 addr)
|
||||
{
|
||||
+ bool might_indirect_under_power_off = rtwdev->chip->id == RTW_CHIP_TYPE_8822C;
|
||||
+
|
||||
if (!test_bit(RTW_FLAG_POWERON, rtwdev->flags) &&
|
||||
- !rtw_sdio_is_bus_addr(addr))
|
||||
+ !rtw_sdio_is_bus_addr(addr) && might_indirect_under_power_off)
|
||||
return false;
|
||||
|
||||
return !rtw_sdio_is_sdio30_supported(rtwdev) ||
|
||||
@@ -170,3 +170,4 @@
|
||||
patches.armbian/wifi-driver-esp8089.patch
|
||||
patches.armbian/wifi-driver-esp8089-6.18.patch
|
||||
patches.armbian/wifi-driver-ssv6051.patch
|
||||
patches.armbian/wifi-fix-driver-rtw88.patch
|
||||
|
||||
Reference in New Issue
Block a user