armbian_build/patch/kernel/archive/sunxi-6.0/patches.megous/rtw89-8852c-disable-dma-during-mac-init.patch
The-going 58b77e1cfd
Sunxi 6.0: update megous patches, switch to v6.0.8 (#4425)
* sunxi-6.0: update upstream megous patches to tag orange-pi-6.0-20221105-1830

* sunxi-6.0: rebase to v6.0.8

* sunxi-6.0: switch to v6.0.8
2022-11-12 10:54:18 +03:00

36 lines
1.4 KiB
Diff

From c940c62807ec37dcfa05d684ea372b497ae75f1d Mon Sep 17 00:00:00 2001
From: Po-Hao Huang <phhuang@realtek.com>
Date: Mon, 4 Jul 2022 10:34:48 +0800
Subject: [PATCH 405/484] rtw89: 8852c: disable dma during mac init
Without this patch, our hardware attempts to perform dma while device
cpu restarts, and leads to iommu page faults caused by invalid requests.
Some platforms show warning messages as below:
rtw89_8852ce 0000:01:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT
domain=0x000a address=0x10000000004 flags=0x0030]
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220704023453.19935-2-pkshih@realtek.com
---
drivers/net/wireless/realtek/rtw89/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c
index 1c9933879..99ef17a31 100644
--- a/drivers/net/wireless/realtek/rtw89/pci.c
+++ b/drivers/net/wireless/realtek/rtw89/pci.c
@@ -1630,6 +1630,8 @@ static void rtw89_pci_ctrl_dma_all(struct rtw89_dev *rtwdev, bool enable)
else
rtw89_write32_clr(rtwdev, R_AX_PCIE_INIT_CFG1,
B_AX_STOP_AXI_MST);
+ rtw89_write32_clr(rtwdev, R_AX_PCIE_INIT_CFG1,
+ txhci_en | rxhci_en);
if (chip_id == RTL8852C)
rtw89_write32_set(rtwdev, R_AX_PCIE_INIT_CFG1,
B_AX_STOP_AXI_MST);
--
2.35.3