From: Greg Kroah-Hartman Date: Tue, 12 Mar 2019 12:06:47 +0000 (-0700) Subject: 5.0-stable patches X-Git-Tag: v5.0.2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05335d8d61f00589bba5e8bc717668e9631dd88b;p=thirdparty%2Fkernel%2Fstable-queue.git 5.0-stable patches added patches: media-revert-media-rc-some-events-are-dropped-by-userspace.patch revert-pci-pme-implement-runtime-pm-callbacks.patch --- diff --git a/queue-5.0/drm-disable-uncached-dma-optimization-for-arm-and-ar.patch b/queue-5.0/drm-disable-uncached-dma-optimization-for-arm-and-ar.patch index 7f68b684fed..a5849a43e8b 100644 --- a/queue-5.0/drm-disable-uncached-dma-optimization-for-arm-and-ar.patch +++ b/queue-5.0/drm-disable-uncached-dma-optimization-for-arm-and-ar.patch @@ -49,14 +49,12 @@ Link: https://patchwork.kernel.org/patch/10778815/ Signed-off-by: Christian König Signed-off-by: Sasha Levin --- - include/drm/drm_cache.h | 18 ++++++++++++++++++ + include/drm/drm_cache.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h -index bfe1639df02d..97fc498dc767 100644 --- a/include/drm/drm_cache.h +++ b/include/drm/drm_cache.h -@@ -47,6 +47,24 @@ static inline bool drm_arch_can_wc_memory(void) +@@ -47,6 +47,24 @@ static inline bool drm_arch_can_wc_memor return false; #elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3) return false; @@ -81,6 +79,3 @@ index bfe1639df02d..97fc498dc767 100644 #else return true; #endif --- -2.19.1 - diff --git a/queue-5.0/media-revert-media-rc-some-events-are-dropped-by-userspace.patch b/queue-5.0/media-revert-media-rc-some-events-are-dropped-by-userspace.patch new file mode 100644 index 00000000000..9d88f2c0171 --- /dev/null +++ b/queue-5.0/media-revert-media-rc-some-events-are-dropped-by-userspace.patch @@ -0,0 +1,70 @@ +From 05f0edadcc5fccdfc0676825b3e70e75dc0a8a84 Mon Sep 17 00:00:00 2001 +From: Sean Young +Date: Fri, 22 Feb 2019 04:08:05 -0500 +Subject: media: Revert "media: rc: some events are dropped by userspace" + +From: Sean Young + +commit 05f0edadcc5fccdfc0676825b3e70e75dc0a8a84 upstream. + +When an rc device is created, we do not know what key codes it will +support, since a new keymap might be loaded at some later point. So, +we set all keybit in the input device. + +The uevent for the input device includes all the key codes, of which +there are now 768. This overflows the size of the uevent +(UEVENT_BUFFER_SIZE) and no event is generated. + +Revert for now until we figure out a different solution. + +This reverts commit fec225a04330d0f222d24feb5bea045526031675. + +Cc: # 4.20+ +Reported-by: Christian Holpert +Signed-off-by: Sean Young +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/rc/rc-main.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +--- a/drivers/media/rc/rc-main.c ++++ b/drivers/media/rc/rc-main.c +@@ -274,6 +274,7 @@ static unsigned int ir_update_mapping(st + unsigned int new_keycode) + { + int old_keycode = rc_map->scan[index].keycode; ++ int i; + + /* Did the user wish to remove the mapping? */ + if (new_keycode == KEY_RESERVED || new_keycode == KEY_UNKNOWN) { +@@ -288,9 +289,20 @@ static unsigned int ir_update_mapping(st + old_keycode == KEY_RESERVED ? "New" : "Replacing", + rc_map->scan[index].scancode, new_keycode); + rc_map->scan[index].keycode = new_keycode; ++ __set_bit(new_keycode, dev->input_dev->keybit); + } + + if (old_keycode != KEY_RESERVED) { ++ /* A previous mapping was updated... */ ++ __clear_bit(old_keycode, dev->input_dev->keybit); ++ /* ... but another scancode might use the same keycode */ ++ for (i = 0; i < rc_map->len; i++) { ++ if (rc_map->scan[i].keycode == old_keycode) { ++ __set_bit(old_keycode, dev->input_dev->keybit); ++ break; ++ } ++ } ++ + /* Possibly shrink the keytable, failure is not a problem */ + ir_resize_table(dev, rc_map, GFP_ATOMIC); + } +@@ -1750,7 +1762,6 @@ static int rc_prepare_rx_device(struct r + set_bit(EV_REP, dev->input_dev->evbit); + set_bit(EV_MSC, dev->input_dev->evbit); + set_bit(MSC_SCAN, dev->input_dev->mscbit); +- bitmap_fill(dev->input_dev->keybit, KEY_CNT); + + /* Pointer/mouse events */ + set_bit(EV_REL, dev->input_dev->evbit); diff --git a/queue-5.0/revert-pci-pme-implement-runtime-pm-callbacks.patch b/queue-5.0/revert-pci-pme-implement-runtime-pm-callbacks.patch new file mode 100644 index 00000000000..aafc1b2ce4a --- /dev/null +++ b/queue-5.0/revert-pci-pme-implement-runtime-pm-callbacks.patch @@ -0,0 +1,76 @@ +From c528f7bd362b097eeeafa6fbbeccd9750b79c7ba Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Thu, 31 Jan 2019 20:07:45 +0300 +Subject: Revert "PCI/PME: Implement runtime PM callbacks" + +From: Mika Westerberg + +commit c528f7bd362b097eeeafa6fbbeccd9750b79c7ba upstream. + +This reverts commit 0e157e52860441cb26051f131dd0b5ae3187a07b. + +Heiner reported that the commit in question prevents his network adapter +from triggering PME and waking up when network cable is plugged. + +The commit tried to prevent root port waking up from D3cold immediately but +looks like disabing root port PME interrupt is not the right way to fix +that issue so revert it now. The patch following proposes an alternative +solution to that issue. + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=202103 +Fixes: 0e157e528604 ("PCI/PME: Implement runtime PM callbacks") +Reported-by: Heiner Kallweit +Tested-by: Heiner Kallweit +Signed-off-by: Mika Westerberg +Signed-off-by: Bjorn Helgaas +Acked-by: Rafael J. Wysocki +CC: stable@vger.kernel.org # v4.20+ +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pcie/pme.c | 27 --------------------------- + 1 file changed, 27 deletions(-) + +--- a/drivers/pci/pcie/pme.c ++++ b/drivers/pci/pcie/pme.c +@@ -432,31 +432,6 @@ static void pcie_pme_remove(struct pcie_ + kfree(get_service_data(srv)); + } + +-static int pcie_pme_runtime_suspend(struct pcie_device *srv) +-{ +- struct pcie_pme_service_data *data = get_service_data(srv); +- +- spin_lock_irq(&data->lock); +- pcie_pme_interrupt_enable(srv->port, false); +- pcie_clear_root_pme_status(srv->port); +- data->noirq = true; +- spin_unlock_irq(&data->lock); +- +- return 0; +-} +- +-static int pcie_pme_runtime_resume(struct pcie_device *srv) +-{ +- struct pcie_pme_service_data *data = get_service_data(srv); +- +- spin_lock_irq(&data->lock); +- pcie_pme_interrupt_enable(srv->port, true); +- data->noirq = false; +- spin_unlock_irq(&data->lock); +- +- return 0; +-} +- + static struct pcie_port_service_driver pcie_pme_driver = { + .name = "pcie_pme", + .port_type = PCI_EXP_TYPE_ROOT_PORT, +@@ -464,8 +439,6 @@ static struct pcie_port_service_driver p + + .probe = pcie_pme_probe, + .suspend = pcie_pme_suspend, +- .runtime_suspend = pcie_pme_runtime_suspend, +- .runtime_resume = pcie_pme_runtime_resume, + .resume = pcie_pme_resume, + .remove = pcie_pme_remove, + }; diff --git a/queue-5.0/series b/queue-5.0/series index 7c2a5752b42..886f27cefca 100644 --- a/queue-5.0/series +++ b/queue-5.0/series @@ -11,3 +11,5 @@ arm-dts-exynos-fix-pinctrl-definition-for-emmc-rtsn-line-on-odroid-x2-u3.patch arm-dts-exynos-add-minimal-clkout-parameters-to-exynos3250-pmu.patch arm-dts-exynos-fix-max-voltage-for-buck8-regulator-on-odroid-xu3-xu4.patch drm-disable-uncached-dma-optimization-for-arm-and-ar.patch +media-revert-media-rc-some-events-are-dropped-by-userspace.patch +revert-pci-pme-implement-runtime-pm-callbacks.patch