From cba2e7f3b81798ddbf898d829756e473564708db Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 25 Jan 2016 19:07:00 -0800 Subject: [PATCH] 3.14-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 asoc-wm8974-set-cache-type-for-regmap.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 --- ...mple-rates-that-are-multiple-of-4khz.patch | 33 ++++++++++ ...-fix-compress-device-direction-check.patch | 62 +++++++++++++++++++ ...soc-wm8974-set-cache-type-for-regmap.patch | 32 ++++++++++ queue-3.14/series | 7 +++ ...-add-id-for-elv-marble-sound-board-1.patch | 29 +++++++++ .../usb-ipaq.c-fix-a-timeout-loop.patch | 33 ++++++++++ ...l-of-fs-hub-behind-a-hs-hub-with-mtt.patch | 47 ++++++++++++++ ...xhci-refuse-loading-if-nousb-is-used.patch | 31 ++++++++++ 8 files changed, 274 insertions(+) create mode 100644 queue-3.14/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch create mode 100644 queue-3.14/asoc-compress-fix-compress-device-direction-check.patch create mode 100644 queue-3.14/asoc-wm8974-set-cache-type-for-regmap.patch create mode 100644 queue-3.14/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch create mode 100644 queue-3.14/usb-ipaq.c-fix-a-timeout-loop.patch create mode 100644 queue-3.14/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch create mode 100644 queue-3.14/xhci-refuse-loading-if-nousb-is-used.patch diff --git a/queue-3.14/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch b/queue-3.14/asoc-arizona-fix-bclk-for-sample-rates-that-are-multiple-of-4khz.patch new file mode 100644 index 00000000000..5bcb71baae7 --- /dev/null +++ b/queue-3.14/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 +@@ -1171,7 +1171,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.14/asoc-compress-fix-compress-device-direction-check.patch b/queue-3.14/asoc-compress-fix-compress-device-direction-check.patch new file mode 100644 index 00000000000..0d985f6a0c6 --- /dev/null +++ b/queue-3.14/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 +@@ -665,17 +665,34 @@ int soc_new_compress(struct snd_soc_pcm_ + struct snd_pcm *be_pcm; + 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.14/asoc-wm8974-set-cache-type-for-regmap.patch b/queue-3.14/asoc-wm8974-set-cache-type-for-regmap.patch new file mode 100644 index 00000000000..39abdee9935 --- /dev/null +++ b/queue-3.14/asoc-wm8974-set-cache-type-for-regmap.patch @@ -0,0 +1,32 @@ +From 1ea5998afe903384ddc16391d4c023cd4c867bea Mon Sep 17 00:00:00 2001 +From: Mans Rullgard +Date: Fri, 11 Dec 2015 11:27:08 +0000 +Subject: ASoC: wm8974: set cache type for regmap + +From: Mans Rullgard + +commit 1ea5998afe903384ddc16391d4c023cd4c867bea upstream. + +Attempting to use this codec driver triggers a BUG() in regcache_sync() +since no cache type is set. The register map of this device is fairly +small and has few holes so a flat cache is suitable. + +Signed-off-by: Mans Rullgard +Acked-by: Charles Keepax +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/wm8974.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/codecs/wm8974.c ++++ b/sound/soc/codecs/wm8974.c +@@ -587,6 +587,7 @@ static const struct regmap_config wm8974 + .max_register = WM8974_MONOMIX, + .reg_defaults = wm8974_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(wm8974_reg_defaults), ++ .cache_type = REGCACHE_FLAT, + }; + + static int wm8974_probe(struct snd_soc_codec *codec) diff --git a/queue-3.14/series b/queue-3.14/series index 086b47e253c..42b7d633ae6 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -21,3 +21,10 @@ 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-wm8974-set-cache-type-for-regmap.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.14/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch b/queue-3.14/usb-cp210x-add-id-for-elv-marble-sound-board-1.patch new file mode 100644 index 00000000000..9e8da959b40 --- /dev/null +++ b/queue-3.14/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.14/usb-ipaq.c-fix-a-timeout-loop.patch b/queue-3.14/usb-ipaq.c-fix-a-timeout-loop.patch new file mode 100644 index 00000000000..f7035bfbdc0 --- /dev/null +++ b/queue-3.14/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 +@@ -531,7 +531,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.14/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch b/queue-3.14/usb-xhci-fix-config-fail-of-fs-hub-behind-a-hs-hub-with-mtt.patch new file mode 100644 index 00000000000..bc01a87e9fa --- /dev/null +++ b/queue-3.14/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 +@@ -4696,8 +4696,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.14/xhci-refuse-loading-if-nousb-is-used.patch b/queue-3.14/xhci-refuse-loading-if-nousb-is-used.patch new file mode 100644 index 00000000000..954b29d741c --- /dev/null +++ b/queue-3.14/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 +@@ -4893,6 +4893,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(); -- 2.47.3