PCI: Extract ATS disabling to a helper function
[ Upstream commit f18b1137d38c091cc8c16365219f0a1d4a30b3d1 ] Introduce quirk_no_ats() helper function to provide a standard way to disable ATS capability in PCI quirks. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230908143606.685930-2-bartosz.pawlowski@intel.com Signed-off-by: Bartosz Pawlowski <bartosz.pawlowski@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6b46084582
commit
161767bb7c
1 changed files with 9 additions and 7 deletions
|
|
@ -5404,6 +5404,12 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0420, quirk_no_ext_tags);
|
||||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
|
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_ATS
|
#ifdef CONFIG_PCI_ATS
|
||||||
|
static void quirk_no_ats(struct pci_dev *pdev)
|
||||||
|
{
|
||||||
|
pci_info(pdev, "disabling ATS\n");
|
||||||
|
pdev->ats_cap = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some devices require additional driver setup to enable ATS. Don't use
|
* Some devices require additional driver setup to enable ATS. Don't use
|
||||||
* ATS for those devices as ATS will be enabled before the driver has had a
|
* ATS for those devices as ATS will be enabled before the driver has had a
|
||||||
|
|
@ -5417,14 +5423,10 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
|
||||||
(pdev->subsystem_device == 0xce19 ||
|
(pdev->subsystem_device == 0xce19 ||
|
||||||
pdev->subsystem_device == 0xcc10 ||
|
pdev->subsystem_device == 0xcc10 ||
|
||||||
pdev->subsystem_device == 0xcc08))
|
pdev->subsystem_device == 0xcc08))
|
||||||
goto no_ats;
|
quirk_no_ats(pdev);
|
||||||
else
|
} else {
|
||||||
return;
|
quirk_no_ats(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
no_ats:
|
|
||||||
pci_info(pdev, "disabling ATS\n");
|
|
||||||
pdev->ats_cap = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AMD Stoney platform GPU */
|
/* AMD Stoney platform GPU */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue