diff mbox series

x86/PCI: Apply VMD's AERSID fixup generically

Message ID 1536348150-3535-1-git-send-email-jonathan.derrick@intel.com (mailing list archive)
State New, archived
Headers show
Series x86/PCI: Apply VMD's AERSID fixup generically | expand

Commit Message

Derrick, Jonathan Sept. 7, 2018, 7:22 p.m. UTC
A root port device-id changed between simulation and production. Rather
than match device-ids which may not be future-proof if left
unmaintained, match all root ports which exist in a VMD-domain

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
---
 arch/x86/pci/fixup.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Comments

Bjorn Helgaas Oct. 2, 2018, 9:24 p.m. UTC | #1
On Fri, Sep 07, 2018 at 01:22:30PM -0600, Jon Derrick wrote:
> A root port device-id changed between simulation and production. Rather
> than match device-ids which may not be future-proof if left
> unmaintained, match all root ports which exist in a VMD-domain
> 
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>

I applied this on pci/host-vmd for v4.20, thanks!

> ---
>  arch/x86/pci/fixup.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> index 13f4485..30a5111 100644
> --- a/arch/x86/pci/fixup.c
> +++ b/arch/x86/pci/fixup.c
> @@ -629,17 +629,11 @@ static void quirk_apple_mbp_poweroff(struct pci_dev *pdev)
>  static void quirk_no_aersid(struct pci_dev *pdev)
>  {
>  	/* VMD Domain */
> -	if (is_vmd(pdev->bus))
> +	if (is_vmd(pdev->bus) && pci_is_root_bus(pdev->bus))
>  		pdev->bus->bus_flags |= PCI_BUS_FLAGS_NO_AERSID;
>  }
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2030, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2031, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2032, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2033, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334a, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334b, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334c, quirk_no_aersid);
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334d, quirk_no_aersid);
> +DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
> +			      PCI_CLASS_BRIDGE_PCI, 8, quirk_no_aersid);
>  
>  #ifdef CONFIG_PHYS_ADDR_T_64BIT
>  
> -- 
> 1.8.3.1
>
diff mbox series

Patch

diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 13f4485..30a5111 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -629,17 +629,11 @@  static void quirk_apple_mbp_poweroff(struct pci_dev *pdev)
 static void quirk_no_aersid(struct pci_dev *pdev)
 {
 	/* VMD Domain */
-	if (is_vmd(pdev->bus))
+	if (is_vmd(pdev->bus) && pci_is_root_bus(pdev->bus))
 		pdev->bus->bus_flags |= PCI_BUS_FLAGS_NO_AERSID;
 }
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2030, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2031, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2032, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2033, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334a, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334b, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334c, quirk_no_aersid);
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x334d, quirk_no_aersid);
+DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
+			      PCI_CLASS_BRIDGE_PCI, 8, quirk_no_aersid);
 
 #ifdef CONFIG_PHYS_ADDR_T_64BIT