1 |
commit: a33c122c9c5757113124bcd857704ec49864687a |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 14 23:08:24 2017 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 14 23:08:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a33c122c |
7 |
|
8 |
Workaround to enable poweroff on Mac Pro 11. See bug #601964. |
9 |
|
10 |
0000_README | 4 ++ |
11 |
2300_enable-poweroff-on-Mac-Pro-11.patch | 76 ++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 80 insertions(+) |
13 |
|
14 |
diff --git a/0000_README b/0000_README |
15 |
index 3bab163..450839f 100644 |
16 |
--- a/0000_README |
17 |
+++ b/0000_README |
18 |
@@ -87,6 +87,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch |
19 |
From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ |
20 |
Desc: Enable link security restrictions by default. |
21 |
|
22 |
+Patch: 2300_enable-poweroff-on-Mac-Pro-11.patch |
23 |
+From: http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/patch/drivers/pci/quirks.c?id=5080ff61a438f3dd80b88b423e1a20791d8a774c |
24 |
+Desc: Workaround to enable poweroff on Mac Pro 11. See bug #601964. |
25 |
+ |
26 |
Patch: 2900_dev-root-proc-mount-fix.patch |
27 |
From: https://bugs.gentoo.org/show_bug.cgi?id=438380 |
28 |
Desc: Ensure that /dev/root doesn't appear in /proc/mounts when bootint without an initramfs. |
29 |
|
30 |
diff --git a/2300_enable-poweroff-on-Mac-Pro-11.patch b/2300_enable-poweroff-on-Mac-Pro-11.patch |
31 |
new file mode 100644 |
32 |
index 0000000..063f2a1 |
33 |
--- /dev/null |
34 |
+++ b/2300_enable-poweroff-on-Mac-Pro-11.patch |
35 |
@@ -0,0 +1,76 @@ |
36 |
+From 5080ff61a438f3dd80b88b423e1a20791d8a774c Mon Sep 17 00:00:00 2001 |
37 |
+From: Chen Yu <yu.c.chen@×××××.com> |
38 |
+Date: Fri, 19 Aug 2016 10:25:57 -0700 |
39 |
+Subject: UBUNTU: SAUCE: PCI: Workaround to enable poweroff on Mac Pro 11 |
40 |
+ |
41 |
+BugLink: http://bugs.launchpad.net/bugs/1587714 |
42 |
+ |
43 |
+People reported that they can not do a poweroff nor a |
44 |
+suspend to ram on their Mac Pro 11. After some investigations |
45 |
+it was found that, once the PCI bridge 0000:00:1c.0 reassigns its |
46 |
+mm windows to ([mem 0x7fa00000-0x7fbfffff] and |
47 |
+[mem 0x7fc00000-0x7fdfffff 64bit pref]), the region of ACPI |
48 |
+io resource 0x1804 becomes unaccessible immediately, where the |
49 |
+ACPI Sleep register is located, as a result neither poweroff(S5) |
50 |
+nor suspend to ram(S3) works. |
51 |
+ |
52 |
+As suggested by Bjorn, further testing shows that, there is an |
53 |
+unreported device may be (using) conflict with above aperture, |
54 |
+which brings unpredictable result such as the failure of accessing |
55 |
+the io port, which blocks the poweroff(S5). Besides if we reassign |
56 |
+the memory aperture to the other place, the poweroff works again. |
57 |
+ |
58 |
+As we do not find any resource declared in _CRS which contain above |
59 |
+memory aperture, and Mac OS does not use this pci bridge neither, we |
60 |
+choose a simple workaround to clear the hotplug flag(suggested by |
61 |
+Yinghai Lu), thus do not allocate any resource for this pci bridge, |
62 |
+and thereby no conflict anymore. |
63 |
+ |
64 |
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=103211 |
65 |
+Cc: Bjorn Helgaas <bhelgaas@××××××.com> |
66 |
+Cc: Rafael J. Wysocki <rafael@××××××.org> |
67 |
+Cc: Lukas Wunner <lukas@××××××.de> |
68 |
+Signed-off-by: Chen Yu <yu.c.chen@×××××.com> |
69 |
+Reference: https://patchwork.kernel.org/patch/9289777/ |
70 |
+Signed-off-by: Kamal Mostafa <kamal@×××××××××.com> |
71 |
+Acked-by: Brad Figg <brad.figg@×××××××××.com> |
72 |
+Acked-by: Stefan Bader <stefan.bader@×××××××××.com> |
73 |
+Signed-off-by: Tim Gardner <tim.gardner@×××××××××.com> |
74 |
+--- |
75 |
+ drivers/pci/quirks.c | 20 ++++++++++++++++++++ |
76 |
+ 1 file changed, 20 insertions(+) |
77 |
+ |
78 |
+diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c |
79 |
+index 48cfaa0..23968b6 100644 |
80 |
+--- a/drivers/pci/quirks.c |
81 |
++++ b/drivers/pci/quirks.c |
82 |
+@@ -2750,6 +2750,26 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) |
83 |
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); |
84 |
+ |
85 |
+ /* |
86 |
++ * Apple: Avoid programming the memory/io aperture of 00:1c.0 |
87 |
++ * |
88 |
++ * BIOS does not declare any resource for 00:1c.0, but with |
89 |
++ * hotplug flag set, thus the OS allocates: |
90 |
++ * [mem 0x7fa00000 - 0x7fbfffff] |
91 |
++ * [mem 0x7fc00000-0x7fdfffff 64bit pref] |
92 |
++ * which is conflict with an unreported device, which |
93 |
++ * causes unpredictable result such as accessing io port. |
94 |
++ * So clear the hotplug flag to work around it. |
95 |
++ */ |
96 |
++static void quirk_apple_mbp_poweroff(struct pci_dev *dev) |
97 |
++{ |
98 |
++ if (dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,4") || |
99 |
++ dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,5")) |
100 |
++ dev->is_hotplug_bridge = 0; |
101 |
++} |
102 |
++ |
103 |
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_apple_mbp_poweroff); |
104 |
++ |
105 |
++/* |
106 |
+ * This is a quirk for the Ricoh MMC controller found as a part of |
107 |
+ * some mulifunction chips. |
108 |
+ |
109 |
+-- |
110 |
+cgit v0.11.2 |
111 |
+ |