diff options
author | Tony Lambiris | 2017-02-10 19:39:27 -0500 |
---|---|---|
committer | Tony Lambiris | 2017-02-10 19:39:27 -0500 |
commit | f789e89446330ecb56413115ac7a54c78622039f (patch) | |
tree | 6ad33282f23912e0f75535cffd380162e7f834b5 /macbook-suspend.patch | |
parent | c6cec6060c318ea2c59cbf7b739515b8a27e29b9 (diff) | |
download | aur-f789e89446330ecb56413115ac7a54c78622039f.tar.gz |
Version bump to 4.9.9
Diffstat (limited to 'macbook-suspend.patch')
-rw-r--r-- | macbook-suspend.patch | 155 |
1 files changed, 59 insertions, 96 deletions
diff --git a/macbook-suspend.patch b/macbook-suspend.patch index 0d9be4815124..2b85a931d71d 100644 --- a/macbook-suspend.patch +++ b/macbook-suspend.patch @@ -1,48 +1,8 @@ ---- linux_for_test.orig/scripts/mod/modpost.c 2016-04-21 17:01:42.917757676 +0800 -+++ linux_for_test.orig/scripts/mod/modpost.c 2016-05-29 13:32:41.266916072 +0800 -@@ -877,6 +877,7 @@ - - #define ALL_PCI_INIT_SECTIONS \ - ".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \ -+ ".pci_fixup_assign", \ - ".pci_fixup_enable", ".pci_fixup_resume", \ - ".pci_fixup_resume_early", ".pci_fixup_suspend" - ---- linux_for_test.orig/include/asm-generic/vmlinux.lds.h 2016-05-18 13:14:13.970951863 +0800 -+++ linux_for_test.orig/include/asm-generic/vmlinux.lds.h 2016-05-29 13:32:24.870916334 +0800 -@@ -283,6 +283,9 @@ - VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \ - *(.pci_fixup_final) \ - VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \ -+ VMLINUX_SYMBOL(__start_pci_fixups_assign) = .; \ -+ *(.pci_fixup_assign) \ -+ VMLINUX_SYMBOL(__end_pci_fixups_assign) = .; \ - VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \ - *(.pci_fixup_enable) \ - VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ ---- linux_for_test.orig/include/linux/pci.h 2016-05-29 12:51:02.000000000 +0800 -+++ linux_for_test.orig/include/linux/pci.h 2016-05-29 13:39:20.926909684 +0800 -@@ -1584,6 +1584,7 @@ - pci_fixup_early, /* Before probing BARs */ - pci_fixup_header, /* After reading configuration header */ - pci_fixup_final, /* Final phase of device fixups */ -+ pci_fixup_assign, /* Before resource assignment */ - pci_fixup_enable, /* pci_enable_device() time */ - pci_fixup_resume, /* pci_device_resume() */ - pci_fixup_suspend, /* pci_device_suspend() */ -@@ -1644,6 +1645,9 @@ - #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ - hook, vendor, device, PCI_ANY_ID, 0, hook) -+#define DECLARE_PCI_FIXUP_ASSIGN(vendor, device, hook) \ -+ DECLARE_PCI_FIXUP_SECTION(.pci_fixup_assign, \ -+ hook, vendor, device, PCI_ANY_ID, 0, hook) - #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ - DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ - hook, vendor, device, PCI_ANY_ID, 0, hook) ---- linux_for_test.orig/drivers/pci/quirks.c 2016-05-27 13:20:01.114516646 +0800 -+++ linux_for_test.orig/drivers/pci/quirks.c 2016-05-29 16:07:58.230767144 +0800 -@@ -3370,6 +3370,8 @@ +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index ee72ebe..e347047 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -3370,6 +3370,8 @@ extern struct pci_fixup __start_pci_fixups_header[]; extern struct pci_fixup __end_pci_fixups_header[]; extern struct pci_fixup __start_pci_fixups_final[]; extern struct pci_fixup __end_pci_fixups_final[]; @@ -51,7 +11,7 @@ extern struct pci_fixup __start_pci_fixups_enable[]; extern struct pci_fixup __end_pci_fixups_enable[]; extern struct pci_fixup __start_pci_fixups_resume[]; -@@ -3405,6 +3407,11 @@ +@@ -3405,6 +3407,11 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) end = __end_pci_fixups_final; break; @@ -63,40 +23,11 @@ case pci_fixup_enable: start = __start_pci_fixups_enable; end = __end_pci_fixups_enable; -@@ -4419,3 +4426,30 @@ - } - } - DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); -+ -+static int disable_mode; -+/* On Mac Pro 11, mem allocation broke ACPI Sleep Type register region. */ -+static void quirk_disable_mmio_bar(struct pci_dev *dev) -+{ -+ struct resource *b_res; -+ -+ dev_info(&dev->dev, "[Quirk] Disable mmio regions for Mac Pro 11\n"); -+ if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) -+ return; -+ -+ b_res = &dev->resource[PCI_BRIDGE_RESOURCES]; -+ b_res[1].flags = 0; -+ -+ if (disable_mode & 1) { -+ b_res[2].flags = 0; -+ } -+ -+} -+DECLARE_PCI_FIXUP_ASSIGN(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_disable_mmio_bar); -+ -+static int __init parse_disable_mode(char *str) -+{ -+ get_option(&str, &disable_mode); -+ return 0; -+} -+early_param("disable_mode", parse_disable_mode); ---- linux_for_test.orig/drivers/pci/setup-bus.c 2016-05-29 12:26:08.000000000 +0800 -+++ linux_for_test.orig/drivers/pci/setup-bus.c 2016-05-29 13:58:36.086891219 +0800 -@@ -1256,6 +1256,8 @@ +diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c +index 55641a3..730d6fd 100644 +--- a/drivers/pci/setup-bus.c ++++ b/drivers/pci/setup-bus.c +@@ -1256,6 +1256,8 @@ void __pci_bus_size_bridges(struct pci_bus *bus, struct list_head *realloc_head) additional_io_size = pci_hotplug_io_size; additional_mem_size = pci_hotplug_mem_size; } @@ -105,19 +36,51 @@ /* Fall through */ default: pbus_size_io(bus, realloc_head ? 0 : additional_io_size, ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -2775,6 +2775,13 @@ static void quirk_hotplug_bridge(struct pci_dev *dev) - - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge); - -+static void quirk_hotplug_bridge_skip(struct pci_dev *dev) -+{ -+ dev->is_hotplug_bridge = 0; -+} -+ -+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_hotplug_bridge_skip); -+ - /* - * This is a quirk for the Ricoh MMC controller found as a part of - * some mulifunction chips. +diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h +index 6a67ab9..3ba05f0 100644 +--- a/include/asm-generic/vmlinux.lds.h ++++ b/include/asm-generic/vmlinux.lds.h +@@ -283,6 +283,9 @@ + VMLINUX_SYMBOL(__start_pci_fixups_final) = .; \ + *(.pci_fixup_final) \ + VMLINUX_SYMBOL(__end_pci_fixups_final) = .; \ ++ VMLINUX_SYMBOL(__start_pci_fixups_assign) = .; \ ++ *(.pci_fixup_assign) \ ++ VMLINUX_SYMBOL(__end_pci_fixups_assign) = .; \ + VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \ + *(.pci_fixup_enable) \ + VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ +diff --git a/include/linux/pci.h b/include/linux/pci.h +index b67e4df..14a35bb 100644 +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -1584,6 +1584,7 @@ enum pci_fixup_pass { + pci_fixup_early, /* Before probing BARs */ + pci_fixup_header, /* After reading configuration header */ + pci_fixup_final, /* Final phase of device fixups */ ++ pci_fixup_assign, /* Before resource assignment */ + pci_fixup_enable, /* pci_enable_device() time */ + pci_fixup_resume, /* pci_device_resume() */ + pci_fixup_suspend, /* pci_device_suspend() */ +@@ -1644,6 +1645,9 @@ enum pci_fixup_pass { + #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \ + DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ + hook, vendor, device, PCI_ANY_ID, 0, hook) ++#define DECLARE_PCI_FIXUP_ASSIGN(vendor, device, hook) \ ++ DECLARE_PCI_FIXUP_SECTION(.pci_fixup_assign, \ ++ hook, vendor, device, PCI_ANY_ID, 0, hook) + #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ + DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ + hook, vendor, device, PCI_ANY_ID, 0, hook) +diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c +index 48958d3..248acdb 100644 +--- a/scripts/mod/modpost.c ++++ b/scripts/mod/modpost.c +@@ -877,6 +877,7 @@ static void check_section(const char *modname, struct elf_info *elf, + + #define ALL_PCI_INIT_SECTIONS \ + ".pci_fixup_early", ".pci_fixup_header", ".pci_fixup_final", \ ++ ".pci_fixup_assign", \ + ".pci_fixup_enable", ".pci_fixup_resume", \ + ".pci_fixup_resume_early", ".pci_fixup_suspend" + |