commit: a33c122c9c5757113124bcd857704ec49864687a Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> AuthorDate: Tue Feb 14 23:08:24 2017 +0000 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> CommitDate: Tue Feb 14 23:08:24 2017 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a33c122c
Workaround to enable poweroff on Mac Pro 11. See bug #601964. 0000_README | 4 ++ 2300_enable-poweroff-on-Mac-Pro-11.patch | 76 ++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/0000_README b/0000_README index 3bab163..450839f 100644 --- a/0000_README +++ b/0000_README @@ -87,6 +87,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 2300_enable-poweroff-on-Mac-Pro-11.patch +From: http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/patch/drivers/pci/quirks.c?id=5080ff61a438f3dd80b88b423e1a20791d8a774c +Desc: Workaround to enable poweroff on Mac Pro 11. See bug #601964. + Patch: 2900_dev-root-proc-mount-fix.patch From: https://bugs.gentoo.org/show_bug.cgi?id=438380 Desc: Ensure that /dev/root doesn't appear in /proc/mounts when bootint without an initramfs. diff --git a/2300_enable-poweroff-on-Mac-Pro-11.patch b/2300_enable-poweroff-on-Mac-Pro-11.patch new file mode 100644 index 0000000..063f2a1 --- /dev/null +++ b/2300_enable-poweroff-on-Mac-Pro-11.patch @@ -0,0 +1,76 @@ +From 5080ff61a438f3dd80b88b423e1a20791d8a774c Mon Sep 17 00:00:00 2001 +From: Chen Yu <[email protected]> +Date: Fri, 19 Aug 2016 10:25:57 -0700 +Subject: UBUNTU: SAUCE: PCI: Workaround to enable poweroff on Mac Pro 11 + +BugLink: http://bugs.launchpad.net/bugs/1587714 + +People reported that they can not do a poweroff nor a +suspend to ram on their Mac Pro 11. After some investigations +it was found that, once the PCI bridge 0000:00:1c.0 reassigns its +mm windows to ([mem 0x7fa00000-0x7fbfffff] and +[mem 0x7fc00000-0x7fdfffff 64bit pref]), the region of ACPI +io resource 0x1804 becomes unaccessible immediately, where the +ACPI Sleep register is located, as a result neither poweroff(S5) +nor suspend to ram(S3) works. + +As suggested by Bjorn, further testing shows that, there is an +unreported device may be (using) conflict with above aperture, +which brings unpredictable result such as the failure of accessing +the io port, which blocks the poweroff(S5). Besides if we reassign +the memory aperture to the other place, the poweroff works again. + +As we do not find any resource declared in _CRS which contain above +memory aperture, and Mac OS does not use this pci bridge neither, we +choose a simple workaround to clear the hotplug flag(suggested by +Yinghai Lu), thus do not allocate any resource for this pci bridge, +and thereby no conflict anymore. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=103211 +Cc: Bjorn Helgaas <[email protected]> +Cc: Rafael J. Wysocki <[email protected]> +Cc: Lukas Wunner <[email protected]> +Signed-off-by: Chen Yu <[email protected]> +Reference: https://patchwork.kernel.org/patch/9289777/ +Signed-off-by: Kamal Mostafa <[email protected]> +Acked-by: Brad Figg <[email protected]> +Acked-by: Stefan Bader <[email protected]> +Signed-off-by: Tim Gardner <[email protected]> +--- + drivers/pci/quirks.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index 48cfaa0..23968b6 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -2750,6 +2750,26 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); + + /* ++ * Apple: Avoid programming the memory/io aperture of 00:1c.0 ++ * ++ * BIOS does not declare any resource for 00:1c.0, but with ++ * hotplug flag set, thus the OS allocates: ++ * [mem 0x7fa00000 - 0x7fbfffff] ++ * [mem 0x7fc00000-0x7fdfffff 64bit pref] ++ * which is conflict with an unreported device, which ++ * causes unpredictable result such as accessing io port. ++ * So clear the hotplug flag to work around it. ++ */ ++static void quirk_apple_mbp_poweroff(struct pci_dev *dev) ++{ ++ if (dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,4") || ++ dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,5")) ++ dev->is_hotplug_bridge = 0; ++} ++ ++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_apple_mbp_poweroff); ++ ++/* + * This is a quirk for the Ricoh MMC controller found as a part of + * some mulifunction chips. + +-- +cgit v0.11.2 +
