From: Greg Kroah-Hartman Date: Mon, 9 Jan 2017 11:14:28 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.42~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37679a094d1cbd07ce993c8c053fb8b63789775a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch arm-dts-r8a7794-correct-hsusb-parent-clock.patch mei-bus-fix-mei_cldev_enable-kdoc.patch staging-iio-ad7606-fix-improper-setting-of-oversampling-pins.patch usb-phy-am335x-control-fix-device-and-of_node-leaks.patch usb-serial-io_ti-bind-to-interface-after-fw-download.patch usb-serial-kl5kusb105-abort-on-open-exception-path.patch --- diff --git a/queue-4.4/alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch b/queue-4.4/alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch new file mode 100644 index 00000000000..6216917f461 --- /dev/null +++ b/queue-4.4/alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch @@ -0,0 +1,33 @@ +From 4763601a56f155ddf94ef35fc2c41504a2de15f5 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 29 Nov 2016 22:28:40 +0100 +Subject: ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream() + +From: Takashi Iwai + +commit 4763601a56f155ddf94ef35fc2c41504a2de15f5 upstream. + +The function returns -EINVAL even if it builds the stream properly. +The bogus error code sneaked in during the code refactoring, but it +wasn't noticed until now since the returned error code itself is +ignored in anyway. Kill it here, but there is no behavior change by +this patch, obviously. + +Fixes: e5779998bf8b ('ALSA: usb-audio: refactor code') +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/card.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/sound/usb/card.c ++++ b/sound/usb/card.c +@@ -202,7 +202,6 @@ static int snd_usb_create_stream(struct + if (! snd_usb_parse_audio_interface(chip, interface)) { + usb_set_interface(dev, interface, 0); /* reset the current interface */ + usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L); +- return -EINVAL; + } + + return 0; diff --git a/queue-4.4/arm-dts-r8a7794-correct-hsusb-parent-clock.patch b/queue-4.4/arm-dts-r8a7794-correct-hsusb-parent-clock.patch new file mode 100644 index 00000000000..3aa8f80e205 --- /dev/null +++ b/queue-4.4/arm-dts-r8a7794-correct-hsusb-parent-clock.patch @@ -0,0 +1,32 @@ +From dc8ee9dbdba509fb58e23ba79f2e6059fe5d8b3b Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Mon, 7 Nov 2016 20:07:07 +0100 +Subject: ARM: dts: r8a7794: Correct hsusb parent clock + +From: Geert Uytterhoeven + +commit dc8ee9dbdba509fb58e23ba79f2e6059fe5d8b3b upstream. + +The parent clock of the HSUSB clock is the HP clock, not the MP clock. + +Fixes: c7bab9f929e51761 ("ARM: shmobile: r8a7794: Add USB clocks to device tree") +Signed-off-by: Geert Uytterhoeven +Acked-by: Yoshihiro Shimoda +Signed-off-by: Simon Horman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/r8a7794.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/r8a7794.dtsi ++++ b/arch/arm/boot/dts/r8a7794.dtsi +@@ -1023,7 +1023,7 @@ + mstp7_clks: mstp7_clks@e615014c { + compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks"; + reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>; +- clocks = <&mp_clk>, <&mp_clk>, ++ clocks = <&mp_clk>, <&hp_clk>, + <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>, + <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>; + #clock-cells = <1>; diff --git a/queue-4.4/mei-bus-fix-mei_cldev_enable-kdoc.patch b/queue-4.4/mei-bus-fix-mei_cldev_enable-kdoc.patch new file mode 100644 index 00000000000..62126c2e28f --- /dev/null +++ b/queue-4.4/mei-bus-fix-mei_cldev_enable-kdoc.patch @@ -0,0 +1,31 @@ +From 5026c9cb0744a9cd40242743ca91a5d712f468c6 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Wed, 14 Dec 2016 17:56:51 +0200 +Subject: mei: bus: fix mei_cldev_enable KDoc + +From: Alexander Usyskin + +commit 5026c9cb0744a9cd40242743ca91a5d712f468c6 upstream. + +Adjust function name in KDoc. + +Fixes: d49dc5e76fc9 (mei: bus: use mei_cldev_ prefix for the API functions) +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/bus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/misc/mei/bus.c ++++ b/drivers/misc/mei/bus.c +@@ -399,7 +399,7 @@ bool mei_cldev_enabled(struct mei_cl_dev + EXPORT_SYMBOL_GPL(mei_cldev_enabled); + + /** +- * mei_cldev_enable_device - enable me client device ++ * mei_cldev_enable - enable me client device + * create connection with me client + * + * @cldev: me client device diff --git a/queue-4.4/series b/queue-4.4/series index 2035ab933ec..3937e7f76d1 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -51,3 +51,10 @@ usb-dwc3-pci-add-intel-gemini-lake-pci-id.patch usb-musb-fix-trying-to-free-already-free-irq-4.patch usb-hub-move-hub_port_disable-to-fix-warning-if-pm-is-disabled.patch usb-musb-blackfin-add-bfin_fifo_offset-in-bfin_ops.patch +alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch +usb-serial-kl5kusb105-abort-on-open-exception-path.patch +arm-dts-r8a7794-correct-hsusb-parent-clock.patch +usb-phy-am335x-control-fix-device-and-of_node-leaks.patch +usb-serial-io_ti-bind-to-interface-after-fw-download.patch +mei-bus-fix-mei_cldev_enable-kdoc.patch +staging-iio-ad7606-fix-improper-setting-of-oversampling-pins.patch diff --git a/queue-4.4/staging-iio-ad7606-fix-improper-setting-of-oversampling-pins.patch b/queue-4.4/staging-iio-ad7606-fix-improper-setting-of-oversampling-pins.patch new file mode 100644 index 00000000000..c92c2570a3a --- /dev/null +++ b/queue-4.4/staging-iio-ad7606-fix-improper-setting-of-oversampling-pins.patch @@ -0,0 +1,38 @@ +From b321a38d2407c7e425c54bc09be909a34e49f740 Mon Sep 17 00:00:00 2001 +From: Eva Rachel Retuya +Date: Sun, 9 Oct 2016 00:05:39 +0800 +Subject: staging: iio: ad7606: fix improper setting of oversampling pins + +From: Eva Rachel Retuya + +commit b321a38d2407c7e425c54bc09be909a34e49f740 upstream. + +The oversampling ratio is controlled using the oversampling pins, +OS [2:0] with OS2 being the MSB control bit, and OS0 the LSB control +bit. + +The gpio connected to the OS2 pin is not being set correctly, only OS0 +and OS1 pins are being set. Fix the typo to allow proper control of the +oversampling pins. + +Signed-off-by: Eva Rachel Retuya +Fixes: b9618c0 ("staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4") +Acked-by: Lars-Peter Clausen +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/iio/adc/ad7606_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/staging/iio/adc/ad7606_core.c ++++ b/drivers/staging/iio/adc/ad7606_core.c +@@ -189,7 +189,7 @@ static ssize_t ad7606_store_oversampling + mutex_lock(&indio_dev->mlock); + gpio_set_value(st->pdata->gpio_os0, (ret >> 0) & 1); + gpio_set_value(st->pdata->gpio_os1, (ret >> 1) & 1); +- gpio_set_value(st->pdata->gpio_os1, (ret >> 2) & 1); ++ gpio_set_value(st->pdata->gpio_os2, (ret >> 2) & 1); + st->oversampling = lval; + mutex_unlock(&indio_dev->mlock); + diff --git a/queue-4.4/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch b/queue-4.4/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch new file mode 100644 index 00000000000..fdc0c25dd1f --- /dev/null +++ b/queue-4.4/usb-phy-am335x-control-fix-device-and-of_node-leaks.patch @@ -0,0 +1,41 @@ +From 015105b12183556771e111e93f5266851e7c5582 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Tue, 1 Nov 2016 11:40:25 +0100 +Subject: USB: phy: am335x-control: fix device and of_node leaks + +From: Johan Hovold + +commit 015105b12183556771e111e93f5266851e7c5582 upstream. + +Make sure to drop the references taken by of_parse_phandle() and +bus_find_device() before returning from am335x_get_phy_control(). + +Note that there is no guarantee that the devres-managed struct +phy_control will be valid for the lifetime of the sibling phy device +regardless of this change. + +Fixes: 3bb869c8b3f1 ("usb: phy: Add AM335x PHY driver") +Acked-by: Bin Liu +Signed-off-by: Johan Hovold +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/phy/phy-am335x-control.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/phy/phy-am335x-control.c ++++ b/drivers/usb/phy/phy-am335x-control.c +@@ -126,10 +126,12 @@ struct phy_control *am335x_get_phy_contr + return NULL; + + dev = bus_find_device(&platform_bus_type, NULL, node, match); ++ of_node_put(node); + if (!dev) + return NULL; + + ctrl_usb = dev_get_drvdata(dev); ++ put_device(dev); + if (!ctrl_usb) + return NULL; + return &ctrl_usb->phy_ctrl; diff --git a/queue-4.4/usb-serial-io_ti-bind-to-interface-after-fw-download.patch b/queue-4.4/usb-serial-io_ti-bind-to-interface-after-fw-download.patch new file mode 100644 index 00000000000..49bd872e6d3 --- /dev/null +++ b/queue-4.4/usb-serial-io_ti-bind-to-interface-after-fw-download.patch @@ -0,0 +1,35 @@ +From e35d6d7c4e6532a89732cf4bace0e910ee684c88 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Tue, 3 Jan 2017 16:39:46 +0100 +Subject: USB: serial: io_ti: bind to interface after fw download + +From: Johan Hovold + +commit e35d6d7c4e6532a89732cf4bace0e910ee684c88 upstream. + +Bind to the interface, but do not register any ports, after having +downloaded the firmware. The device will still disconnect and +re-enumerate, but this way we avoid an error messages from being logged +as part of the process: + +io_ti: probe of 1-1.3:1.0 failed with error -5 + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/io_ti.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/usb/serial/io_ti.c ++++ b/drivers/usb/serial/io_ti.c +@@ -1499,8 +1499,7 @@ static int do_boot_mode(struct edgeport_ + + dev_dbg(dev, "%s - Download successful -- Device rebooting...\n", __func__); + +- /* return an error on purpose */ +- return -ENODEV; ++ return 1; + } + + stayinbootmode: diff --git a/queue-4.4/usb-serial-kl5kusb105-abort-on-open-exception-path.patch b/queue-4.4/usb-serial-kl5kusb105-abort-on-open-exception-path.patch new file mode 100644 index 00000000000..3ddde9eebc5 --- /dev/null +++ b/queue-4.4/usb-serial-kl5kusb105-abort-on-open-exception-path.patch @@ -0,0 +1,43 @@ +From 3c3dd1e058cb01e835dcade4b54a6f13ffaeaf7c Mon Sep 17 00:00:00 2001 +From: Pan Bian +Date: Tue, 29 Nov 2016 16:55:02 +0100 +Subject: USB: serial: kl5kusb105: abort on open exception path + +From: Pan Bian + +commit 3c3dd1e058cb01e835dcade4b54a6f13ffaeaf7c upstream. + +Function klsi_105_open() calls usb_control_msg() (to "enable read") and +checks its return value. When the return value is unexpected, it only +assigns the error code to the return variable retval, but does not +terminate the exception path. This patch fixes the bug by inserting +"goto err_generic_close;" when the call to usb_control_msg() fails. + +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Signed-off-by: Pan Bian +[johan: rebase on prerequisite fix and amend commit message] +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/kl5kusb105.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/kl5kusb105.c ++++ b/drivers/usb/serial/kl5kusb105.c +@@ -311,6 +311,7 @@ static int klsi_105_open(struct tty_str + if (rc < 0) { + dev_err(&port->dev, "Enabling read failed (error = %d)\n", rc); + retval = rc; ++ goto err_generic_close; + } else + dev_dbg(&port->dev, "%s - enabled reading\n", __func__); + +@@ -337,6 +338,7 @@ err_disable_read: + 0, /* index */ + NULL, 0, + KLSI_TIMEOUT); ++err_generic_close: + usb_serial_generic_close(port); + err_free_cfg: + kfree(cfg);