Am 01.11.21 um 22:55 schrieb Bjorn Helgaas:
[+cc Christian, Nirmoy]
On Tue, Oct 26, 2021 at 10:44:59PM +0100, Robin McCorkell wrote:
A particular RX 5600 device requires a hack in the rebar logic, but the current branch is too general and catches other devices too, breaking them. This patch changes the branch to be more selective on the particular revision.
This patch fixes intermittent freezes on other RX 5600 devices where the hack is unnecessary. Credit to all contributors in the linked issue on the AMD bug tracker.
See also: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.fre...
Fixes: 907830b0fc9e ("PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse") Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Robin McCorkell robin@mccorkell.me.uk Reported-by: Simon May <@Socob on gitlab.freedesktop.com> Tested-by: Kain Centeno <@kaincenteno on gitlab.freedesktop.com> Tested-by: Tobias Jakobi <@tobiasjakobi on gitlab.freedesktop.com> Suggested-by: lijo lazar <@lijo on gitlab.freedesktop.com>
I'll wait for an ack from Christian on this one, since it doesn't seem to make sense to him.
Please just completely drop the patch for now.
It's really interesting that resizing the BAR makes the problem on that hardware more likely to appear, but we have already found people reporting issues even with the patch in question completely reverted.
So that is most likely not the root cause and we need to dig deeper.
Thanks, Christian.
drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index ce2ab62b64cf..1fe75243019e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3647,7 +3647,7 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar) /* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */ if (pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x731f &&
bar == 0 && cap == 0x7000)
cap = 0x3f000;pdev->revision == 0xC1 && bar == 0 && cap == 0x7000)
return cap >> 4; -- 2.31.1