From: Greg Kroah-Hartman Date: Wed, 5 May 2021 08:08:31 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.19.190~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=469c076374d040c247ed7ae331f96bcc834bb112;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: alsa-usb-audio-add-midi-quirk-for-vox-tonelab-ex.patch platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch usb-add-lpm-quirk-for-lenovo-thinkpad-usb-c-dock-gen2-ethernet.patch usb-add-reset-resume-quirk-for-wd19-s-realtek-hub.patch --- diff --git a/queue-4.9/alsa-usb-audio-add-midi-quirk-for-vox-tonelab-ex.patch b/queue-4.9/alsa-usb-audio-add-midi-quirk-for-vox-tonelab-ex.patch new file mode 100644 index 00000000000..203b90d9fab --- /dev/null +++ b/queue-4.9/alsa-usb-audio-add-midi-quirk-for-vox-tonelab-ex.patch @@ -0,0 +1,40 @@ +From 64f40f9be14106e7df0098c427cb60be645bddb7 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 7 Apr 2021 16:45:49 +0200 +Subject: ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX + +From: Takashi Iwai + +commit 64f40f9be14106e7df0098c427cb60be645bddb7 upstream. + +ToneLab EX guitar pedal device requires the same quirk like ToneLab ST +for supporting the MIDI. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212593 +Cc: +Link: https://lore.kernel.org/r/20210407144549.1530-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks-table.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -2479,6 +2479,16 @@ YAMAHA_DEVICE(0x7010, "UB99"), + } + }, + ++{ ++ USB_DEVICE_VENDOR_SPEC(0x0944, 0x0204), ++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { ++ .vendor_name = "KORG, Inc.", ++ /* .product_name = "ToneLab EX", */ ++ .ifnum = 3, ++ .type = QUIRK_MIDI_STANDARD_INTERFACE, ++ } ++}, ++ + /* AKAI devices */ + { + USB_DEVICE(0x09e8, 0x0062), diff --git a/queue-4.9/platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch b/queue-4.9/platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch new file mode 100644 index 00000000000..f531638ca3e --- /dev/null +++ b/queue-4.9/platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch @@ -0,0 +1,102 @@ +From 6759e18e5cd8745a5dfc5726e4a3db5281ec1639 Mon Sep 17 00:00:00 2001 +From: Mark Pearson +Date: Wed, 7 Apr 2021 17:20:15 -0400 +Subject: platform/x86: thinkpad_acpi: Correct thermal sensor allocation + +From: Mark Pearson + +commit 6759e18e5cd8745a5dfc5726e4a3db5281ec1639 upstream. + +On recent Thinkpad platforms it was reported that temp sensor 11 was +always incorrectly displaying 66C. It turns out the reason for this is +that this location in EC RAM is not a temperature sensor but is the +power supply ID (offset 0xC2). + +Based on feedback from the Lenovo firmware team the EC RAM version can +be determined and for the current version (3) only the 0x78 to 0x7F +range is used for temp sensors. I don't have any details for earlier +versions so I have left the implementation unaltered there. + +Note - in this block only 0x78 and 0x79 are officially designated (CPU & +GPU sensors). The use of the other locations in the block will vary from +platform to platform; but the existing logic to detect a sensor presence +holds. + +Signed-off-by: Mark Pearson +Link: https://lore.kernel.org/r/20210407212015.298222-1-markpearson@lenovo.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/thinkpad_acpi.c | 31 ++++++++++++++++++++++--------- + 1 file changed, 22 insertions(+), 9 deletions(-) + +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -6044,6 +6044,7 @@ enum thermal_access_mode { + enum { /* TPACPI_THERMAL_TPEC_* */ + TP_EC_THERMAL_TMP0 = 0x78, /* ACPI EC regs TMP 0..7 */ + TP_EC_THERMAL_TMP8 = 0xC0, /* ACPI EC regs TMP 8..15 */ ++ TP_EC_FUNCREV = 0xEF, /* ACPI EC Functional revision */ + TP_EC_THERMAL_TMP_NA = -128, /* ACPI EC sensor not available */ + + TPACPI_THERMAL_SENSOR_NA = -128000, /* Sensor not available */ +@@ -6242,7 +6243,7 @@ static const struct attribute_group ther + + static int __init thermal_init(struct ibm_init_struct *iibm) + { +- u8 t, ta1, ta2; ++ u8 t, ta1, ta2, ver = 0; + int i; + int acpi_tmp7; + int res; +@@ -6257,7 +6258,14 @@ static int __init thermal_init(struct ib + * 0x78-0x7F, 0xC0-0xC7. Registers return 0x00 for + * non-implemented, thermal sensors return 0x80 when + * not available ++ * The above rule is unfortunately flawed. This has been seen with ++ * 0xC2 (power supply ID) causing thermal control problems. ++ * The EC version can be determined by offset 0xEF and at least for ++ * version 3 the Lenovo firmware team confirmed that registers 0xC0-0xC7 ++ * are not thermal registers. + */ ++ if (!acpi_ec_read(TP_EC_FUNCREV, &ver)) ++ pr_warn("Thinkpad ACPI EC unable to access EC version\n"); + + ta1 = ta2 = 0; + for (i = 0; i < 8; i++) { +@@ -6267,11 +6275,13 @@ static int __init thermal_init(struct ib + ta1 = 0; + break; + } +- if (acpi_ec_read(TP_EC_THERMAL_TMP8 + i, &t)) { +- ta2 |= t; +- } else { +- ta1 = 0; +- break; ++ if (ver < 3) { ++ if (acpi_ec_read(TP_EC_THERMAL_TMP8 + i, &t)) { ++ ta2 |= t; ++ } else { ++ ta1 = 0; ++ break; ++ } + } + } + if (ta1 == 0) { +@@ -6287,9 +6297,12 @@ static int __init thermal_init(struct ib + thermal_read_mode = TPACPI_THERMAL_NONE; + } + } else { +- thermal_read_mode = +- (ta2 != 0) ? +- TPACPI_THERMAL_TPEC_16 : TPACPI_THERMAL_TPEC_8; ++ if (ver >= 3) ++ thermal_read_mode = TPACPI_THERMAL_TPEC_8; ++ else ++ thermal_read_mode = ++ (ta2 != 0) ? ++ TPACPI_THERMAL_TPEC_16 : TPACPI_THERMAL_TPEC_8; + } + } else if (acpi_tmp7) { + if (tpacpi_is_ibm() && diff --git a/queue-4.9/series b/queue-4.9/series index 51ad582fb48..1f83c9a8779 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1,2 +1,6 @@ net-usb-ax88179_178a-initialize-local-variables-before-use.patch iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_enqueue_hcmd.patch +alsa-usb-audio-add-midi-quirk-for-vox-tonelab-ex.patch +usb-add-lpm-quirk-for-lenovo-thinkpad-usb-c-dock-gen2-ethernet.patch +usb-add-reset-resume-quirk-for-wd19-s-realtek-hub.patch +platform-x86-thinkpad_acpi-correct-thermal-sensor-allocation.patch diff --git a/queue-4.9/usb-add-lpm-quirk-for-lenovo-thinkpad-usb-c-dock-gen2-ethernet.patch b/queue-4.9/usb-add-lpm-quirk-for-lenovo-thinkpad-usb-c-dock-gen2-ethernet.patch new file mode 100644 index 00000000000..725789b4d53 --- /dev/null +++ b/queue-4.9/usb-add-lpm-quirk-for-lenovo-thinkpad-usb-c-dock-gen2-ethernet.patch @@ -0,0 +1,36 @@ +From 8f23fe35ff1e5491b4d279323a8209a31f03ae65 Mon Sep 17 00:00:00 2001 +From: Kai-Heng Feng +Date: Mon, 12 Apr 2021 21:54:53 +0800 +Subject: USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet + +From: Kai-Heng Feng + +commit 8f23fe35ff1e5491b4d279323a8209a31f03ae65 upstream. + +This is another branded 8153 device that doesn't work well with LPM +enabled: +[ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 + +So disable LPM to resolve the issue. + +Signed-off-by: Kai-Heng Feng +BugLink: https://bugs.launchpad.net/bugs/1922651 +Link: https://lore.kernel.org/r/20210412135455.791971-1-kai.heng.feng@canonical.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/core/quirks.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -264,6 +264,9 @@ static const struct usb_device_id usb_qu + { USB_DEVICE(0x1532, 0x0116), .driver_info = + USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + ++ /* Lenovo ThinkPad USB-C Dock Gen2 Ethernet (RTL8153 GigE) */ ++ { USB_DEVICE(0x17ef, 0xa387), .driver_info = USB_QUIRK_NO_LPM }, ++ + /* BUILDWIN Photo Frame */ + { USB_DEVICE(0x1908, 0x1315), .driver_info = + USB_QUIRK_HONOR_BNUMINTERFACES }, diff --git a/queue-4.9/usb-add-reset-resume-quirk-for-wd19-s-realtek-hub.patch b/queue-4.9/usb-add-reset-resume-quirk-for-wd19-s-realtek-hub.patch new file mode 100644 index 00000000000..c07d25f2e5b --- /dev/null +++ b/queue-4.9/usb-add-reset-resume-quirk-for-wd19-s-realtek-hub.patch @@ -0,0 +1,55 @@ +From ca91fd8c7643d93bfc18a6fec1a0d3972a46a18a Mon Sep 17 00:00:00 2001 +From: Chris Chiu +Date: Wed, 21 Apr 2021 01:46:51 +0800 +Subject: USB: Add reset-resume quirk for WD19's Realtek Hub + +From: Chris Chiu + +commit ca91fd8c7643d93bfc18a6fec1a0d3972a46a18a upstream. + +Realtek Hub (0bda:5487) in Dell Dock WD19 sometimes fails to work +after the system resumes from suspend with remote wakeup enabled +device connected: +[ 1947.640907] hub 5-2.3:1.0: hub_ext_port_status failed (err = -71) +[ 1947.641208] usb 5-2.3-port5: cannot disable (err = -71) +[ 1947.641401] hub 5-2.3:1.0: hub_ext_port_status failed (err = -71) +[ 1947.641450] usb 5-2.3-port4: cannot reset (err = -71) + +Information of this hub: +T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 5 +D: Ver= 2.10 Cls=09(hub ) Sub=00 Prot=02 MxPS=64 #Cfgs= 1 +P: Vendor=0bda ProdID=5487 Rev= 1.47 +S: Manufacturer=Dell Inc. +S: Product=Dell dock +C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=01 Driver=hub +E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms +I:* If#= 0 Alt= 1 #EPs= 1 Cls=09(hub ) Sub=00 Prot=02 Driver=hub +E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms + +The failure results from the ETIMEDOUT by chance when turning on +the suspend feature for the specified port of the hub. The port +seems to be in an unknown state so the hub_activate during resume +fails the hub_port_status, then the hub will fail to work. + +The quirky hub needs the reset-resume quirk to function correctly. + +Acked-by: Alan Stern +Signed-off-by: Chris Chiu +Cc: stable +Link: https://lore.kernel.org/r/20210420174651.6202-1-chris.chiu@canonical.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/core/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -245,6 +245,7 @@ static const struct usb_device_id usb_qu + + /* Realtek hub in Dell WD19 (Type-C) */ + { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM }, ++ { USB_DEVICE(0x0bda, 0x5487), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Generic RTL8153 based ethernet adapters */ + { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM },