From: Greg Kroah-Hartman Date: Mon, 13 Jan 2020 10:08:10 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.210~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd2f7987d8a7ab10df5b490c8f83a5b535bb45c5;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch --- diff --git a/queue-4.4/alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch b/queue-4.4/alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch new file mode 100644 index 00000000000..d3fac979589 --- /dev/null +++ b/queue-4.4/alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch @@ -0,0 +1,32 @@ +From 51d4efab7865e6ea6a4ebcd25b3f03c019515c4c Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 4 Jan 2020 12:09:36 +0100 +Subject: ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5 + +From: Takashi Iwai + +commit 51d4efab7865e6ea6a4ebcd25b3f03c019515c4c upstream. + +Bose Companion 5 (with USB ID 05a7:1020) doesn't seem supporting +reading back the sample rate, so the existing quirk is needed. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206063 +Cc: +Link: https://lore.kernel.org/r/20200104110936.14288-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1142,6 +1142,7 @@ bool snd_usb_get_sample_rate_quirk(struc + case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */ + case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */ + case USB_ID(0x05A3, 0x9420): /* ELP HD USB Camera */ ++ case USB_ID(0x05a7, 0x1020): /* Bose Companion 5 */ + case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */ + case USB_ID(0x1395, 0x740a): /* Sennheiser DECT */ + case USB_ID(0x1901, 0x0191): /* GE B850V3 CP2114 audio interface */ diff --git a/queue-4.4/series b/queue-4.4/series index ed56204cbce..7c1c63fb510 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,2 +1,4 @@ kobject-export-kobject_get_unless_zero.patch chardev-avoid-potential-use-after-free-in-chrdev_open.patch +usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch +alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch diff --git a/queue-4.4/usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch b/queue-4.4/usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch new file mode 100644 index 00000000000..e5deca7be4e --- /dev/null +++ b/queue-4.4/usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch @@ -0,0 +1,77 @@ +From c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Thu, 26 Dec 2019 07:57:54 -0800 +Subject: usb: chipidea: host: Disable port power only if previously enabled + +From: Guenter Roeck + +commit c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 upstream. + +On shutdown, ehci_power_off() is called unconditionally to power off +each port, even if it was never called to power on the port. +For chipidea, this results in a call to ehci_ci_portpower() with a request +to power off ports even if the port was never powered on. +This results in the following warning from the regulator code. + +WARNING: CPU: 0 PID: 182 at drivers/regulator/core.c:2596 _regulator_disable+0x1a8/0x210 +unbalanced disables for usb_otg2_vbus +Modules linked in: +CPU: 0 PID: 182 Comm: init Not tainted 5.4.6 #1 +Hardware name: Freescale i.MX7 Dual (Device Tree) +[] (unwind_backtrace) from [] (show_stack+0x10/0x14) +[] (show_stack) from [] (dump_stack+0xe0/0x10c) +[] (dump_stack) from [] (__warn+0xf4/0x10c) +[] (__warn) from [] (warn_slowpath_fmt+0x78/0xbc) +[] (warn_slowpath_fmt) from [] (_regulator_disable+0x1a8/0x210) +[] (_regulator_disable) from [] (regulator_disable+0x38/0xe8) +[] (regulator_disable) from [] (ehci_ci_portpower+0x38/0xdc) +[] (ehci_ci_portpower) from [] (ehci_port_power+0x50/0xa4) +[] (ehci_port_power) from [] (ehci_silence_controller+0x5c/0xc4) +[] (ehci_silence_controller) from [] (ehci_stop+0x3c/0xcc) +[] (ehci_stop) from [] (usb_remove_hcd+0xe0/0x19c) +[] (usb_remove_hcd) from [] (host_stop+0x38/0xa8) +[] (host_stop) from [] (ci_hdrc_remove+0x44/0xe4) +... + +Keeping track of the power enable state avoids the warning and traceback. + +Fixes: c8679a2fb8dec ("usb: chipidea: host: add portpower override") +Cc: Michael Grzeschik +Cc: Peter Chen +Cc: stable@vger.kernel.org +Signed-off-by: Guenter Roeck +Acked-by: Peter Chen +Link: https://lore.kernel.org/r/20191226155754.25451-1-linux@roeck-us.net +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/chipidea/host.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/usb/chipidea/host.c ++++ b/drivers/usb/chipidea/host.c +@@ -37,6 +37,7 @@ static int (*orig_bus_suspend)(struct us + + struct ehci_ci_priv { + struct regulator *reg_vbus; ++ bool enabled; + }; + + static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) +@@ -48,7 +49,7 @@ static int ehci_ci_portpower(struct usb_ + int ret = 0; + int port = HCS_N_PORTS(ehci->hcs_params); + +- if (priv->reg_vbus) { ++ if (priv->reg_vbus && enable != priv->enabled) { + if (port > 1) { + dev_warn(dev, + "Not support multi-port regulator control\n"); +@@ -64,6 +65,7 @@ static int ehci_ci_portpower(struct usb_ + enable ? "enable" : "disable", ret); + return ret; + } ++ priv->enabled = enable; + } + + if (enable && (ci->platdata->phy_mode == USBPHY_INTERFACE_MODE_HSIC)) {