@@ -4710,6 +4710,7 @@ enum rtw89_flags {
enum rtw89_quirks {
RTW89_QUIRK_PCI_BER,
+ RTW89_QUIRK_PCI_NO_36BIT_DMA,
NUM_OF_RTW89_QUIRKS,
};
@@ -3061,6 +3061,9 @@ static int rtw89_pci_setup_mapping(struct rtw89_dev *rtwdev,
goto err;
}
+ if (test_bit(RTW89_QUIRK_PCI_NO_36BIT_DMA, rtwdev->quirks))
+ goto no_36bit_dma;
+
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36));
if (!ret) {
rtwpci->enable_dac = true;
@@ -3074,6 +3077,7 @@ static int rtw89_pci_setup_mapping(struct rtw89_dev *rtwdev,
}
}
+no_36bit_dma:
resource_len = pci_resource_len(pdev, bar_id);
rtwpci->mmap = pci_iomap(pdev, bar_id, resource_len);
if (!rtwpci->mmap) {
@@ -62,9 +62,21 @@ static const struct rtw89_pci_info rtw8852b_pci_info = {
.recognize_intrs = rtw89_pci_recognize_intrs,
};
+static const struct dmi_system_id rtw8852b_pci_quirks[] = {
+ {
+ .ident = "ASUSTeK COMPUTER INC. TUF GAMING B550M-PLUS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "TUF GAMING B550M-PLUS"),
+ },
+ .driver_data = (void *)RTW89_QUIRK_PCI_NO_36BIT_DMA,
+ },
+ {},
+};
+
static const struct rtw89_driver_info rtw89_8852be_info = {
.chip = &rtw8852b_chip_info,
- .quirks = NULL,
+ .quirks = rtw8852b_pci_quirks,
.bus = {
.pci = &rtw8852b_pci_info,
},
RTL8852BE has PCI 36-bit DMA interoperability problem on certain platforms, so add quirks to exclude this kind of platforms. Otherwise, failed to download firmware, and WiFi becomes unusable. Reported-by: Marcel Weißenbach <mweissenbach@ignaz.org> Closes: https://lore.kernel.org/linux-wireless/20240918073237.Horde.VLueh0_KaiDw-9asEEcdM84@ignaz.org/T/#m07c5694df1acb173a42e1a0bab7ac22bd231a2b8 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> --- drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/pci.c | 4 ++++ drivers/net/wireless/realtek/rtw89/rtw8852be.c | 14 +++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-)