linux-pikaos-template/patches/nobara/0001-Revert-PCI-Add-a-REBAR-size-quirk-for-Sapphire-RX-56.patch

35 lines
1.0 KiB
Diff
Raw Normal View History

2023-11-04 19:37:27 +01:00
From 4b4ce124699c160925e5fdeb147a78f79d38351f Mon Sep 17 00:00:00 2001
From: Simon May <simon.may@protonmail.ch>
Date: Sun, 19 Sep 2021 23:45:59 +0200
Subject: [PATCH] Revert "PCI: Add a REBAR size quirk for Sapphire RX 5600 XT
Pulse"
This reverts commit 907830b0fc9e374d00f3c83de5e426157b482c01.
---
drivers/pci/pci.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
2023-12-12 12:10:53 +01:00
index a607f277c..3174fa871 100644
2023-11-04 19:37:27 +01:00
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
2023-12-12 12:10:53 +01:00
@@ -3755,14 +3755,8 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
2023-11-04 19:37:27 +01:00
return 0;
2023-12-12 12:10:53 +01:00
2023-11-04 19:37:27 +01:00
pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap);
2023-12-12 12:10:53 +01:00
- cap = FIELD_GET(PCI_REBAR_CAP_SIZES, cap);
2023-11-04 19:37:27 +01:00
- /* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */
- if (pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x731f &&
2023-12-12 12:10:53 +01:00
- bar == 0 && cap == 0x700)
- return 0x3f00;
2023-11-04 19:37:27 +01:00
-
2023-12-12 12:10:53 +01:00
- return cap;
2023-11-04 19:37:27 +01:00
+ return (cap & PCI_REBAR_CAP_SIZES) >> 4;
}
EXPORT_SYMBOL(pci_rebar_get_possible_sizes);
2023-12-12 12:10:53 +01:00
2023-11-04 19:37:27 +01:00
--
2.30.2