From: Greg Kroah-Hartman Date: Tue, 26 Jan 2016 03:10:12 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.10.96~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2425ddcbe211f1b48ce81bc61c7762e2aa55e5b8;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch asoc-compress-fix-compress-device-direction-check.patch usb-cp210x-add-id-for-elv-marble-sound-board-1.patch usb-ipaq.c-fix-a-timeout-loop.patch usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch xhci-refuse-loading-if-nousb-is-used.patch --- diff --git a/queue-3.10/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch b/queue-3.10/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch new file mode 100644 index 00000000000..52453bdd6bf --- /dev/null +++ b/queue-3.10/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch @@ -0,0 +1,33 @@ +From e73694d871867cae8471d2350ce89acb38bc2b63 Mon Sep 17 00:00:00 2001 +From: Nikesh Oswal +Date: Wed, 23 Dec 2015 14:18:05 +0000 +Subject: ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz + +From: Nikesh Oswal + +commit e73694d871867cae8471d2350ce89acb38bc2b63 upstream. + +For a sample rate of 12kHz the bclk was taken from the 44.1kHz table as +we test for a multiple of 8kHz. This patch fixes this issue by testing +for multiples of 4kHz instead. + +Signed-off-by: Nikesh Oswal +Signed-off-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/arizona.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/codecs/arizona.c ++++ b/sound/soc/codecs/arizona.c +@@ -1057,7 +1057,7 @@ static int arizona_hw_params(struct snd_ + int chan_limit = arizona->pdata.max_channels_clocked[dai->id - 1]; + int bclk, lrclk, wl, frame, bclk_target; + +- if (params_rate(params) % 8000) ++ if (params_rate(params) % 4000) + rates = &arizona_44k1_bclk_rates[0]; + else + rates = &arizona_48k_bclk_rates[0]; diff --git a/queue-3.10/asoc-compress-fix-compress-device-direction-check.patch b/queue-3.10/asoc-compress-fix-compress-device-direction-check.patch new file mode 100644 index 00000000000..6d72cf264e1 --- /dev/null +++ b/queue-3.10/asoc-compress-fix-compress-device-direction-check.patch @@ -0,0 +1,62 @@ +From a1068045883ed4a18363a4ebad0c3d55e473b716 Mon Sep 17 00:00:00 2001 +From: Vinod Koul +Date: Thu, 7 Jan 2016 21:48:14 +0530 +Subject: ASoC: compress: Fix compress device direction check + +From: Vinod Koul + +commit a1068045883ed4a18363a4ebad0c3d55e473b716 upstream. + +The detection of direction for compress was only taking into account codec +capabilities and not CPU ones. Fix this by checking the CPU side capabilities +as well + +Tested-by: Ashish Panwar +Signed-off-by: Vinod Koul +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/soc-compress.c | 23 ++++++++++++++++++++--- + 1 file changed, 20 insertions(+), 3 deletions(-) + +--- a/sound/soc/soc-compress.c ++++ b/sound/soc/soc-compress.c +@@ -384,17 +384,34 @@ int soc_new_compress(struct snd_soc_pcm_ + struct snd_compr *compr; + char new_name[64]; + int ret = 0, direction = 0; ++ int playback = 0, capture = 0; + + /* check client and interface hw capabilities */ + snprintf(new_name, sizeof(new_name), "%s %s-%d", + rtd->dai_link->stream_name, codec_dai->name, num); + + if (codec_dai->driver->playback.channels_min) ++ playback = 1; ++ if (codec_dai->driver->capture.channels_min) ++ capture = 1; ++ ++ capture = capture && cpu_dai->driver->capture.channels_min; ++ playback = playback && cpu_dai->driver->playback.channels_min; ++ ++ /* ++ * Compress devices are unidirectional so only one of the directions ++ * should be set, check for that (xor) ++ */ ++ if (playback + capture != 1) { ++ dev_err(rtd->card->dev, "Invalid direction for compress P %d, C %d\n", ++ playback, capture); ++ return -EINVAL; ++ } ++ ++ if(playback) + direction = SND_COMPRESS_PLAYBACK; +- else if (codec_dai->driver->capture.channels_min) +- direction = SND_COMPRESS_CAPTURE; + else +- return -EINVAL; ++ direction = SND_COMPRESS_CAPTURE; + + compr = kzalloc(sizeof(*compr), GFP_KERNEL); + if (compr == NULL) { diff --git a/queue-3.10/series b/queue-3.10/series index a773e0fc03f..17d41f91ae8 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -22,3 +22,9 @@ alsa-pcm-fix-snd_pcm_hw_params-struct-copy-in-compat-mode.patch alsa-hrtimer-fix-stall-by-hrtimer_cancel.patch alsa-control-avoid-kernel-warnings-from-tlv-ioctl-with-numid-0.patch asoc-wm8962-correct-addresses-for-hpf_c_0-1.patch +asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch +asoc-compress-fix-compress-device-direction-check.patch +usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch +usb-ipaq.c-fix-a-timeout-loop.patch +usb-cp210x-add-id-for-elv-marble-sound-board-1.patch +xhci-refuse-loading-if-nousb-is-used.patch diff --git a/queue-3.10/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch b/queue-3.10/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch new file mode 100644 index 00000000000..9e8da959b40 --- /dev/null +++ b/queue-3.10/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch @@ -0,0 +1,29 @@ +From f7d7f59ab124748156ea551edf789994f05da342 Mon Sep 17 00:00:00 2001 +From: Oliver Freyermuth +Date: Mon, 28 Dec 2015 18:37:38 +0100 +Subject: USB: cp210x: add ID for ELV Marble Sound Board 1 + +From: Oliver Freyermuth + +commit f7d7f59ab124748156ea551edf789994f05da342 upstream. + +Add the USB device ID for ELV Marble Sound Board 1. + +Signed-off-by: Oliver Freyermuth +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -160,6 +160,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ + { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ + { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ ++ { USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */ + { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ + { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ + { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */ diff --git a/queue-3.10/usb-ipaq.c-fix-a-timeout-loop.patch b/queue-3.10/usb-ipaq.c-fix-a-timeout-loop.patch new file mode 100644 index 00000000000..1fd32a22aca --- /dev/null +++ b/queue-3.10/usb-ipaq.c-fix-a-timeout-loop.patch @@ -0,0 +1,33 @@ +From abdc9a3b4bac97add99e1d77dc6d28623afe682b Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 16 Dec 2015 14:06:37 +0300 +Subject: USB: ipaq.c: fix a timeout loop + +From: Dan Carpenter + +commit abdc9a3b4bac97add99e1d77dc6d28623afe682b upstream. + +The code expects the loop to end with "retries" set to zero but, because +it is a post-op, it will end set to -1. I have fixed this by moving the +decrement inside the loop. + +Fixes: 014aa2a3c32e ('USB: ipaq: minor ipaq_open() cleanup.') +Signed-off-by: Dan Carpenter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ipaq.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/ipaq.c ++++ b/drivers/usb/serial/ipaq.c +@@ -532,7 +532,8 @@ static int ipaq_open(struct tty_struct * + * through. Since this has a reasonably high failure rate, we retry + * several times. + */ +- while (retries--) { ++ while (retries) { ++ retries--; + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21, + 0x1, 0, NULL, 0, 100); diff --git a/queue-3.10/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch b/queue-3.10/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch new file mode 100644 index 00000000000..6a86821f3f5 --- /dev/null +++ b/queue-3.10/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch @@ -0,0 +1,47 @@ +From 096b110a3dd3c868e4610937c80d2e3f3357c1a9 Mon Sep 17 00:00:00 2001 +From: Chunfeng Yun +Date: Fri, 4 Dec 2015 15:53:43 +0200 +Subject: usb: xhci: fix config fail of FS hub behind a HS hub with MTT + +From: Chunfeng Yun + +commit 096b110a3dd3c868e4610937c80d2e3f3357c1a9 upstream. + +if a full speed hub connects to a high speed hub which +supports MTT, the MTT field of its slot context will be set +to 1 when xHCI driver setups an xHCI virtual device in +xhci_setup_addressable_virt_dev(); once usb core fetch its +hub descriptor, and need to update the xHC's internal data +structures for the device, the HUB field of its slot context +will be set to 1 too, meanwhile MTT is also set before, +this will cause configure endpoint command fail, so in the +case, we should clear MTT to 0 for full speed hub according +to section 6.2.2 + +Signed-off-by: Chunfeng Yun +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -4615,8 +4615,16 @@ int xhci_update_hub_device(struct usb_hc + ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); + slot_ctx = xhci_get_slot_ctx(xhci, config_cmd->in_ctx); + slot_ctx->dev_info |= cpu_to_le32(DEV_HUB); ++ /* ++ * refer to section 6.2.2: MTT should be 0 for full speed hub, ++ * but it may be already set to 1 when setup an xHCI virtual ++ * device, so clear it anyway. ++ */ + if (tt->multi) + slot_ctx->dev_info |= cpu_to_le32(DEV_MTT); ++ else if (hdev->speed == USB_SPEED_FULL) ++ slot_ctx->dev_info &= cpu_to_le32(~DEV_MTT); ++ + if (xhci->hci_version > 0x95) { + xhci_dbg(xhci, "xHCI version %x needs hub " + "TT think time and number of ports\n", diff --git a/queue-3.10/xhci-refuse-loading-if-nousb-is-used.patch b/queue-3.10/xhci-refuse-loading-if-nousb-is-used.patch new file mode 100644 index 00000000000..466bcb5545f --- /dev/null +++ b/queue-3.10/xhci-refuse-loading-if-nousb-is-used.patch @@ -0,0 +1,31 @@ +From 1eaf35e4dd592c59041bc1ed3248c46326da1f5f Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Thu, 3 Dec 2015 15:03:34 +0100 +Subject: xhci: refuse loading if nousb is used + +From: Oliver Neukum + +commit 1eaf35e4dd592c59041bc1ed3248c46326da1f5f upstream. + +The module should fail to load. + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -4815,6 +4815,10 @@ static int __init xhci_hcd_init(void) + BUILD_BUG_ON(sizeof(struct xhci_intr_reg) != 8*32/8); + /* xhci_run_regs has eight fields and embeds 128 xhci_intr_regs */ + BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); ++ ++ if (usb_disabled()) ++ return -ENODEV; ++ + return 0; + unreg_pci: + xhci_unregister_pci();