From: Sasha Levin Date: Sat, 18 Jul 2020 19:15:44 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.4.231~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3184fe9cb55b5bf64f1b3ef3a34371b982e018ea;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/acpi-video-use-native-backlight-on-acer-aspire-5783z.patch b/queue-4.14/acpi-video-use-native-backlight-on-acer-aspire-5783z.patch new file mode 100644 index 00000000000..ac26bdfb668 --- /dev/null +++ b/queue-4.14/acpi-video-use-native-backlight-on-acer-aspire-5783z.patch @@ -0,0 +1,46 @@ +From f7d06ac423d6877141602f7e8dbe28ef2e2bfb80 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 31 Mar 2020 14:36:23 +0200 +Subject: ACPI: video: Use native backlight on Acer Aspire 5783z + +From: Hans de Goede + +[ Upstream commit 1c8fbc1f9bfb804ef2f0d4ee9397ab800e33f23a ] + +The Acer Aspire 5783z shipped with Windows 7 and as such does not trigger +our "win8 ready" heuristic for prefering the native backlight interface. + +Still ACPI backlight control doesn't work on this model, where as the +native (intel_video) backlight interface does work. Add a quirk to +force using native backlight control on this model. + +Signed-off-by: Hans de Goede +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Sasha Levin +--- + drivers/acpi/video_detect.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c +index 214c4e2e8ade1..5f0178967d14c 100644 +--- a/drivers/acpi/video_detect.c ++++ b/drivers/acpi/video_detect.c +@@ -328,6 +328,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"), + }, + }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "Acer Aspire 5738z", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"), ++ DMI_MATCH(DMI_BOARD_NAME, "JV50"), ++ }, ++ }, + + /* + * Desktops which falsely report a backlight and which our heuristics +-- +2.25.1 + diff --git a/queue-4.14/acpi-video-use-native-backlight-on-acer-travelmate-5.patch b/queue-4.14/acpi-video-use-native-backlight-on-acer-travelmate-5.patch new file mode 100644 index 00000000000..bd0ee03be92 --- /dev/null +++ b/queue-4.14/acpi-video-use-native-backlight-on-acer-travelmate-5.patch @@ -0,0 +1,60 @@ +From bea20f801b514563a871d3b227df8a792c2109d4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 22 May 2020 14:22:28 +0200 +Subject: ACPI: video: Use native backlight on Acer TravelMate 5735Z +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Paul Menzel + +[ Upstream commit c41c36e900a337b4132b12ccabc97f5578248b44 ] + +Currently, changing the brightness of the internal display of the Acer +TravelMate 5735Z does not work. Pressing the function keys or changing the +slider, GNOME Shell 3.36.2 displays the OSD (five steps), but the +brightness does not change. + +The Acer TravelMate 5735Z shipped with Windows 7 and as such does not +trigger our "win8 ready" heuristic for preferring the native backlight +interface. + +Still ACPI backlight control doesn't work on this model, where as the +native (intel_video) backlight interface does work by adding +`acpi_backlight=native` or `acpi_backlight=none` to Linux’ command line. + +So, add a quirk to force using native backlight control on this model. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=207835 +Reviewed-by: Hans de Goede +Signed-off-by: Paul Menzel +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Sasha Levin +--- + drivers/acpi/video_detect.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c +index 5f0178967d14c..ab1da5e6e7e3e 100644 +--- a/drivers/acpi/video_detect.c ++++ b/drivers/acpi/video_detect.c +@@ -337,6 +337,16 @@ static const struct dmi_system_id video_detect_dmi_table[] = { + DMI_MATCH(DMI_BOARD_NAME, "JV50"), + }, + }, ++ { ++ /* https://bugzilla.kernel.org/show_bug.cgi?id=207835 */ ++ .callback = video_detect_force_native, ++ .ident = "Acer TravelMate 5735Z", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5735Z"), ++ DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"), ++ }, ++ }, + + /* + * Desktops which falsely report a backlight and which our heuristics +-- +2.25.1 + diff --git a/queue-4.14/doc-dt-bindings-usb-dwc3-update-entries-for-disablin.patch b/queue-4.14/doc-dt-bindings-usb-dwc3-update-entries-for-disablin.patch new file mode 100644 index 00000000000..fdecf4e9c67 --- /dev/null +++ b/queue-4.14/doc-dt-bindings-usb-dwc3-update-entries-for-disablin.patch @@ -0,0 +1,43 @@ +From 0417cc8afd0a7ef533bcf881013a6a1ba582ba9a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 21 Feb 2020 10:15:30 +0100 +Subject: doc: dt: bindings: usb: dwc3: Update entries for disabling SS + instances in park mode + +From: Neil Armstrong + +[ Upstream commit 3d157c28d2289edf0439e8308e8de3a06acaaf0e ] + +This patch updates the documentation with the information related +to the quirks that needs to be added for disabling all SuperSpeed XHCI +instances in park mode. + +Cc: Dongjin Kim +Cc: Jianxin Pan +Cc: Thinh Nguyen +Cc: Jun Li +Reported-by: Tim +Signed-off-by: Neil Armstrong +Acked-by: Rob Herring +Signed-off-by: Felipe Balbi +Signed-off-by: Sasha Levin +--- + Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt +index 44e8bab159adc..baee73134d03e 100644 +--- a/Documentation/devicetree/bindings/usb/dwc3.txt ++++ b/Documentation/devicetree/bindings/usb/dwc3.txt +@@ -47,6 +47,8 @@ Optional properties: + from P0 to P1/P2/P3 without delay. + - snps,dis-tx-ipgap-linecheck-quirk: when set, disable u2mac linestate check + during HS transmit. ++ - snps,parkmode-disable-ss-quirk: when set, all SuperSpeed bus instances in ++ park mode are disabled. + - snps,dis_metastability_quirk: when set, disable metastability workaround. + CAUTION: use only if you are absolutely sure of it. + - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal +-- +2.25.1 + diff --git a/queue-4.14/efi-arm-defer-probe-of-pcie-backed-efifb-on-dt-syste.patch b/queue-4.14/efi-arm-defer-probe-of-pcie-backed-efifb-on-dt-syste.patch new file mode 100644 index 00000000000..a6473b778e4 --- /dev/null +++ b/queue-4.14/efi-arm-defer-probe-of-pcie-backed-efifb-on-dt-syste.patch @@ -0,0 +1,168 @@ +From 3a22f17915954263f594bbf9ca32ae9d2d171b64 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 13 Jan 2020 18:22:40 +0100 +Subject: efi/arm: Defer probe of PCIe backed efifb on DT systems + +From: Ard Biesheuvel + +[ Upstream commit 64c8a0cd0a535891d5905c3a1651150f0f141439 ] + +The new of_devlink support breaks PCIe probing on ARM platforms booting +via UEFI if the firmware exposes a EFI framebuffer that is backed by a +PCI device. The reason is that the probing order gets reversed, +resulting in a resource conflict on the framebuffer memory window when +the PCIe probes last, causing it to give up entirely. + +Given that we rely on PCI quirks to deal with EFI framebuffers that get +moved around in memory, we cannot simply drop the memory reservation, so +instead, let's use the device link infrastructure to register this +dependency, and force the probing to occur in the expected order. + +Co-developed-by: Saravana Kannan +Signed-off-by: Ard Biesheuvel +Signed-off-by: Saravana Kannan +Signed-off-by: Ard Biesheuvel +Signed-off-by: Ingo Molnar +Link: https://lore.kernel.org/r/20200113172245.27925-9-ardb@kernel.org +Signed-off-by: Sasha Levin +--- + drivers/firmware/efi/arm-init.c | 107 ++++++++++++++++++++++++++++++-- + 1 file changed, 103 insertions(+), 4 deletions(-) + +diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c +index 312f9f32e1683..7d4cb9583bf4f 100644 +--- a/drivers/firmware/efi/arm-init.c ++++ b/drivers/firmware/efi/arm-init.c +@@ -14,10 +14,12 @@ + #define pr_fmt(fmt) "efi: " fmt + + #include ++#include + #include + #include + #include + #include ++#include + #include + #include + #include +@@ -271,15 +273,112 @@ void __init efi_init(void) + efi_memmap_unmap(); + } + ++static bool efifb_overlaps_pci_range(const struct of_pci_range *range) ++{ ++ u64 fb_base = screen_info.lfb_base; ++ ++ if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE) ++ fb_base |= (u64)(unsigned long)screen_info.ext_lfb_base << 32; ++ ++ return fb_base >= range->cpu_addr && ++ fb_base < (range->cpu_addr + range->size); ++} ++ ++static struct device_node *find_pci_overlap_node(void) ++{ ++ struct device_node *np; ++ ++ for_each_node_by_type(np, "pci") { ++ struct of_pci_range_parser parser; ++ struct of_pci_range range; ++ int err; ++ ++ err = of_pci_range_parser_init(&parser, np); ++ if (err) { ++ pr_warn("of_pci_range_parser_init() failed: %d\n", err); ++ continue; ++ } ++ ++ for_each_of_pci_range(&parser, &range) ++ if (efifb_overlaps_pci_range(&range)) ++ return np; ++ } ++ return NULL; ++} ++ ++/* ++ * If the efifb framebuffer is backed by a PCI graphics controller, we have ++ * to ensure that this relation is expressed using a device link when ++ * running in DT mode, or the probe order may be reversed, resulting in a ++ * resource reservation conflict on the memory window that the efifb ++ * framebuffer steals from the PCIe host bridge. ++ */ ++static int efifb_add_links(const struct fwnode_handle *fwnode, ++ struct device *dev) ++{ ++ struct device_node *sup_np; ++ struct device *sup_dev; ++ ++ sup_np = find_pci_overlap_node(); ++ ++ /* ++ * If there's no PCI graphics controller backing the efifb, we are ++ * done here. ++ */ ++ if (!sup_np) ++ return 0; ++ ++ sup_dev = get_dev_from_fwnode(&sup_np->fwnode); ++ of_node_put(sup_np); ++ ++ /* ++ * Return -ENODEV if the PCI graphics controller device hasn't been ++ * registered yet. This ensures that efifb isn't allowed to probe ++ * and this function is retried again when new devices are ++ * registered. ++ */ ++ if (!sup_dev) ++ return -ENODEV; ++ ++ /* ++ * If this fails, retrying this function at a later point won't ++ * change anything. So, don't return an error after this. ++ */ ++ if (!device_link_add(dev, sup_dev, 0)) ++ dev_warn(dev, "device_link_add() failed\n"); ++ ++ put_device(sup_dev); ++ ++ return 0; ++} ++ ++static const struct fwnode_operations efifb_fwnode_ops = { ++ .add_links = efifb_add_links, ++}; ++ ++static struct fwnode_handle efifb_fwnode = { ++ .ops = &efifb_fwnode_ops, ++}; ++ + static int __init register_gop_device(void) + { +- void *pd; ++ struct platform_device *pd; ++ int err; + + if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI) + return 0; + +- pd = platform_device_register_data(NULL, "efi-framebuffer", 0, +- &screen_info, sizeof(screen_info)); +- return PTR_ERR_OR_ZERO(pd); ++ pd = platform_device_alloc("efi-framebuffer", 0); ++ if (!pd) ++ return -ENOMEM; ++ ++ if (IS_ENABLED(CONFIG_PCI)) ++ pd->dev.fwnode = &efifb_fwnode; ++ ++ err = platform_device_add_data(pd, &screen_info, sizeof(screen_info)); ++ if (err) ++ return err; ++ ++ return platform_device_add(pd); + } + subsys_initcall(register_gop_device); +-- +2.25.1 + diff --git a/queue-4.14/mmc-sdhci-do-not-enable-card-detect-interrupt-for-gp.patch b/queue-4.14/mmc-sdhci-do-not-enable-card-detect-interrupt-for-gp.patch new file mode 100644 index 00000000000..4d4097a640d --- /dev/null +++ b/queue-4.14/mmc-sdhci-do-not-enable-card-detect-interrupt-for-gp.patch @@ -0,0 +1,42 @@ +From b03016b367724d02f686d7f286093f729222cb1e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 19 Feb 2020 16:22:40 +0800 +Subject: mmc: sdhci: do not enable card detect interrupt for gpio cd type + +From: Haibo Chen + +[ Upstream commit e65bb38824711559844ba932132f417bc5a355e2 ] + +Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE, +we also do not need to handle controller native card detect interrupt +for gpio cd type. +If we wrong enabled the card detect interrupt for gpio case, it will +cause a lot of unexpected card detect interrupts during data transfer +which should not happen. + +Signed-off-by: Haibo Chen +Acked-by: Adrian Hunter +Reviewed-by: Linus Walleij +Link: https://lore.kernel.org/r/1582100563-20555-2-git-send-email-haibo.chen@nxp.com +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + drivers/mmc/host/sdhci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 4f1c884c0b508..33028099d3a01 100644 +--- a/drivers/mmc/host/sdhci.c ++++ b/drivers/mmc/host/sdhci.c +@@ -133,7 +133,7 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) + u32 present; + + if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || +- !mmc_card_is_removable(host->mmc)) ++ !mmc_card_is_removable(host->mmc) || mmc_can_gpio_cd(host->mmc)) + return; + + if (enable) { +-- +2.25.1 + diff --git a/queue-4.14/series b/queue-4.14/series index cf11cc80e6e..5470e56ea81 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -73,3 +73,8 @@ of-of_mdio-correct-loop-scanning-logic.patch revert-usb-ohci-platform-fix-a-warning-when-hibernat.patch revert-usb-ehci-platform-set-pm-runtime-as-active-on.patch revert-usb-xhci-plat-set-pm-runtime-as-active-on-res.patch +efi-arm-defer-probe-of-pcie-backed-efifb-on-dt-syste.patch +doc-dt-bindings-usb-dwc3-update-entries-for-disablin.patch +mmc-sdhci-do-not-enable-card-detect-interrupt-for-gp.patch +acpi-video-use-native-backlight-on-acer-aspire-5783z.patch +acpi-video-use-native-backlight-on-acer-travelmate-5.patch