diff options
Diffstat (limited to 'arch/x86/pci/fixup.c')
-rw-r--r-- | arch/x86/pci/fixup.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 6d52b94f4bb9..11e407489db0 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -571,3 +571,50 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, pci_invalid_bar); | |||
571 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_invalid_bar); | 571 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_invalid_bar); |
572 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_invalid_bar); | 572 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_invalid_bar); |
573 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_invalid_bar); | 573 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_invalid_bar); |
574 | |||
575 | /* | ||
576 | * Device [1022:7808] | ||
577 | * 23. USB Wake on Connect/Disconnect with Low Speed Devices | ||
578 | * https://support.amd.com/TechDocs/46837.pdf | ||
579 | * Appendix A2 | ||
580 | * https://support.amd.com/TechDocs/42413.pdf | ||
581 | */ | ||
582 | static void pci_fixup_amd_ehci_pme(struct pci_dev *dev) | ||
583 | { | ||
584 | dev_info(&dev->dev, "PME# does not work under D3, disabling it\n"); | ||
585 | dev->pme_support &= ~((PCI_PM_CAP_PME_D3 | PCI_PM_CAP_PME_D3cold) | ||
586 | >> PCI_PM_CAP_PME_SHIFT); | ||
587 | } | ||
588 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7808, pci_fixup_amd_ehci_pme); | ||
589 | |||
590 | /* | ||
591 | * Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff] | ||
592 | * | ||
593 | * Using the [mem 0x7fa00000-0x7fbfffff] region, e.g., by assigning it to | ||
594 | * the 00:1c.0 Root Port, causes a conflict with [io 0x1804], which is used | ||
595 | * for soft poweroff and suspend-to-RAM. | ||
596 | * | ||
597 | * As far as we know, this is related to the address space, not to the Root | ||
598 | * Port itself. Attaching the quirk to the Root Port is a convenience, but | ||
599 | * it could probably also be a standalone DMI quirk. | ||
600 | * | ||
601 | * https://bugzilla.kernel.org/show_bug.cgi?id=103211 | ||
602 | */ | ||
603 | static void quirk_apple_mbp_poweroff(struct pci_dev *pdev) | ||
604 | { | ||
605 | struct device *dev = &pdev->dev; | ||
606 | struct resource *res; | ||
607 | |||
608 | if ((!dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,4") && | ||
609 | !dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,5")) || | ||
610 | pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(0x1c, 0)) | ||
611 | return; | ||
612 | |||
613 | res = request_mem_region(0x7fa00000, 0x200000, | ||
614 | "MacBook Pro poweroff workaround"); | ||
615 | if (res) | ||
616 | dev_info(dev, "claimed %s %pR\n", res->name, res); | ||
617 | else | ||
618 | dev_info(dev, "can't work around MacBook Pro poweroff issue\n"); | ||
619 | } | ||
620 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_apple_mbp_poweroff); | ||