From: Greg Kroah-Hartman Date: Mon, 14 Dec 2020 14:20:13 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v5.10.1~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=092c1d8296fd4ead3e96303e11839471f17e931f;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: input-cm109-do-not-stomp-on-control-urb.patch input-i8042-add-acer-laptops-to-the-i8042-reset-list.patch pinctrl-amd-remove-debounce-filter-setting-in-irq-type-setting.patch --- diff --git a/queue-4.4/input-cm109-do-not-stomp-on-control-urb.patch b/queue-4.4/input-cm109-do-not-stomp-on-control-urb.patch new file mode 100644 index 00000000000..a358e1b5e41 --- /dev/null +++ b/queue-4.4/input-cm109-do-not-stomp-on-control-urb.patch @@ -0,0 +1,42 @@ +From 82e06090473289ce63e23fdeb8737aad59b10645 Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Wed, 9 Dec 2020 20:13:24 -0800 +Subject: Input: cm109 - do not stomp on control URB + +From: Dmitry Torokhov + +commit 82e06090473289ce63e23fdeb8737aad59b10645 upstream. + +We need to make sure we are not stomping on the control URB that was +issued when opening the device when attempting to toggle buzzer. +To do that we need to mark it as pending in cm109_open(). + +Reported-and-tested-by: syzbot+150f793ac5bc18eee150@syzkaller.appspotmail.com +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/misc/cm109.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/input/misc/cm109.c ++++ b/drivers/input/misc/cm109.c +@@ -546,12 +546,15 @@ static int cm109_input_open(struct input + dev->ctl_data->byte[HID_OR2] = dev->keybit; + dev->ctl_data->byte[HID_OR3] = 0x00; + ++ dev->ctl_urb_pending = 1; + error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); +- if (error) ++ if (error) { ++ dev->ctl_urb_pending = 0; + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", + __func__, error); +- else ++ } else { + dev->open = 1; ++ } + + mutex_unlock(&dev->pm_mutex); + diff --git a/queue-4.4/input-i8042-add-acer-laptops-to-the-i8042-reset-list.patch b/queue-4.4/input-i8042-add-acer-laptops-to-the-i8042-reset-list.patch new file mode 100644 index 00000000000..862e5069f8e --- /dev/null +++ b/queue-4.4/input-i8042-add-acer-laptops-to-the-i8042-reset-list.patch @@ -0,0 +1,74 @@ +From ce6520b0eafad5962ffc21dc47cd7bd3250e9045 Mon Sep 17 00:00:00 2001 +From: Chris Chiu +Date: Wed, 9 Dec 2020 20:24:47 -0800 +Subject: Input: i8042 - add Acer laptops to the i8042 reset list + +From: Chris Chiu + +commit ce6520b0eafad5962ffc21dc47cd7bd3250e9045 upstream. + +The touchpad operates in Basic Mode by default in the Acer BIOS +setup, but some Aspire/TravelMate models require the i8042 to be +reset in order to be correctly detected. + +Signed-off-by: Chris Chiu +Link: https://lore.kernel.org/r/20201207071250.15021-1-chiu@endlessos.org +Cc: stable@vger.kernel.org +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042-x86ia64io.h | 42 ++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -688,6 +688,48 @@ static const struct dmi_system_id __init + }, + }, + { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A114-31"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A314-31"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A315-31"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-132"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-332"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-432"), ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate Spin B118-RN"), ++ }, ++ }, ++ { + /* Advent 4211 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"), diff --git a/queue-4.4/pinctrl-amd-remove-debounce-filter-setting-in-irq-type-setting.patch b/queue-4.4/pinctrl-amd-remove-debounce-filter-setting-in-irq-type-setting.patch new file mode 100644 index 00000000000..28d9a5a7610 --- /dev/null +++ b/queue-4.4/pinctrl-amd-remove-debounce-filter-setting-in-irq-type-setting.patch @@ -0,0 +1,93 @@ +From 47a0001436352c9853d72bf2071e85b316d688a2 Mon Sep 17 00:00:00 2001 +From: Coiby Xu +Date: Wed, 25 Nov 2020 21:03:19 +0800 +Subject: pinctrl: amd: remove debounce filter setting in IRQ type setting + +From: Coiby Xu + +commit 47a0001436352c9853d72bf2071e85b316d688a2 upstream. + +Debounce filter setting should be independent from IRQ type setting +because according to the ACPI specs, there are separate arguments for +specifying debounce timeout and IRQ type in GpioIo() and GpioInt(). + +Together with commit 06abe8291bc31839950f7d0362d9979edc88a666 +("pinctrl: amd: fix incorrect way to disable debounce filter") and +Andy's patch "gpiolib: acpi: Take into account debounce settings" [1], +this will fix broken touchpads for laptops whose BIOS set the +debounce timeout to a relatively large value. For example, the BIOS +of Lenovo AMD gaming laptops including Legion-5 15ARH05 (R7000), +Legion-5P (R7000P) and IdeaPad Gaming 3 15ARH05, set the debounce +timeout to 124.8ms. This led to the kernel receiving only ~7 HID +reports per second from the Synaptics touchpad +(MSFT0001:00 06CB:7F28). + +Existing touchpads like [2][3] are not troubled by this bug because +the debounce timeout has been set to 0 by the BIOS before enabling +the debounce filter in setting IRQ type. + +[1] https://lore.kernel.org/linux-gpio/20201111222008.39993-11-andriy.shevchenko@linux.intel.com/ + 8dcb7a15a585 ("gpiolib: acpi: Take into account debounce settings") +[2] https://github.com/Syniurge/i2c-amd-mp2/issues/11#issuecomment-721331582 +[3] https://forum.manjaro.org/t/random-short-touchpad-freezes/30832/28 + +Signed-off-by: Coiby Xu +Reviewed-by: Andy Shevchenko +Cc: Hans de Goede +Cc: Andy Shevchenko +Cc: Benjamin Tissoires +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/linux-gpio/CAHp75VcwiGREBUJ0A06EEw-SyabqYsp%2Bdqs2DpSrhaY-2GVdAA%40mail.gmail.com/ +BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190 +Link: https://lore.kernel.org/r/20201125130320.311059-1-coiby.xu@gmail.com +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pinctrl/pinctrl-amd.c | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/drivers/pinctrl/pinctrl-amd.c ++++ b/drivers/pinctrl/pinctrl-amd.c +@@ -399,7 +399,6 @@ static int amd_gpio_irq_set_type(struct + pin_reg &= ~BIT(LEVEL_TRIG_OFF); + pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); + pin_reg |= ACTIVE_HIGH << ACTIVE_LEVEL_OFF; +- pin_reg |= DB_TYPE_REMOVE_GLITCH << DB_CNTRL_OFF; + irq_set_handler_locked(d, handle_edge_irq); + break; + +@@ -407,7 +406,6 @@ static int amd_gpio_irq_set_type(struct + pin_reg &= ~BIT(LEVEL_TRIG_OFF); + pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); + pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF; +- pin_reg |= DB_TYPE_REMOVE_GLITCH << DB_CNTRL_OFF; + irq_set_handler_locked(d, handle_edge_irq); + break; + +@@ -415,7 +413,6 @@ static int amd_gpio_irq_set_type(struct + pin_reg &= ~BIT(LEVEL_TRIG_OFF); + pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); + pin_reg |= BOTH_EADGE << ACTIVE_LEVEL_OFF; +- pin_reg |= DB_TYPE_REMOVE_GLITCH << DB_CNTRL_OFF; + irq_set_handler_locked(d, handle_edge_irq); + break; + +@@ -423,8 +420,6 @@ static int amd_gpio_irq_set_type(struct + pin_reg |= LEVEL_TRIGGER << LEVEL_TRIG_OFF; + pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); + pin_reg |= ACTIVE_HIGH << ACTIVE_LEVEL_OFF; +- pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); +- pin_reg |= DB_TYPE_PRESERVE_LOW_GLITCH << DB_CNTRL_OFF; + irq_set_handler_locked(d, handle_level_irq); + break; + +@@ -432,8 +427,6 @@ static int amd_gpio_irq_set_type(struct + pin_reg |= LEVEL_TRIGGER << LEVEL_TRIG_OFF; + pin_reg &= ~(ACTIVE_LEVEL_MASK << ACTIVE_LEVEL_OFF); + pin_reg |= ACTIVE_LOW << ACTIVE_LEVEL_OFF; +- pin_reg &= ~(DB_CNTRl_MASK << DB_CNTRL_OFF); +- pin_reg |= DB_TYPE_PRESERVE_HIGH_GLITCH << DB_CNTRL_OFF; + irq_set_handler_locked(d, handle_level_irq); + break; + diff --git a/queue-4.4/series b/queue-4.4/series index ad06aed1068..e05dbedd5ca 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -2,3 +2,6 @@ spi-bcm2835aux-fix-use-after-free-on-unbind.patch spi-bcm2835aux-restore-err-assignment-in-bcm2835aux_spi_probe.patch arc-stack-unwinding-don-t-assume-non-current-task-is.patch platform-x86-acer-wmi-add-automatic-keyboard-backgro.patch +input-cm109-do-not-stomp-on-control-urb.patch +input-i8042-add-acer-laptops-to-the-i8042-reset-list.patch +pinctrl-amd-remove-debounce-filter-setting-in-irq-type-setting.patch