From 2a64bc6ad1fb058b0ddc48c29e26a1cdf9b9211b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Jan 2015 19:27:48 -0800 Subject: [PATCH] 3.10-stable patches added patches: asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch asoc-max98090-fix-ill-defined-sidetone-route.patch asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch ath5k-fix-hardware-queue-index-assignment.patch can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch can-peak_usb-fix-memset-usage.patch swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch --- ...-are-flushed-to-prevent-channel-swap.patch | 51 ++++++++++++ ...98090-fix-ill-defined-sidetone-route.patch | 44 +++++++++++ ...e-files-with-a-non-supported-version.patch | 37 +++++++++ ...-fix-hardware-queue-index-assignment.patch | 38 +++++++++ ...e-order-in-case-of-error-during-init.patch | 77 +++++++++++++++++++ .../can-peak_usb-fix-memset-usage.patch | 43 +++++++++++ queue-3.10/series | 7 ++ ...dev_addr-to-swiotlb_tbl_unmap_single.patch | 32 ++++++++ 8 files changed, 329 insertions(+) create mode 100644 queue-3.10/asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch create mode 100644 queue-3.10/asoc-max98090-fix-ill-defined-sidetone-route.patch create mode 100644 queue-3.10/asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch create mode 100644 queue-3.10/ath5k-fix-hardware-queue-index-assignment.patch create mode 100644 queue-3.10/can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch create mode 100644 queue-3.10/can-peak_usb-fix-memset-usage.patch create mode 100644 queue-3.10/swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch diff --git a/queue-3.10/asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch b/queue-3.10/asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch new file mode 100644 index 00000000000..a491021236c --- /dev/null +++ b/queue-3.10/asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch @@ -0,0 +1,51 @@ +From 3475c3d034d7f276a474c8bd53f44b48c8bf669d Mon Sep 17 00:00:00 2001 +From: Andrew Jackson +Date: Fri, 19 Dec 2014 16:18:05 +0000 +Subject: ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap + +From: Andrew Jackson + +commit 3475c3d034d7f276a474c8bd53f44b48c8bf669d upstream. + +Flush the FIFOs when the stream is prepared for use. This avoids +an inadvertent swapping of the left/right channels if the FIFOs are +not empty at startup. + +Signed-off-by: Andrew Jackson +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/dwc/designware_i2s.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/sound/soc/dwc/designware_i2s.c ++++ b/sound/soc/dwc/designware_i2s.c +@@ -263,6 +263,19 @@ static void dw_i2s_shutdown(struct snd_p + snd_soc_dai_set_dma_data(dai, substream, NULL); + } + ++static int dw_i2s_prepare(struct snd_pcm_substream *substream, ++ struct snd_soc_dai *dai) ++{ ++ struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(dai); ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ i2s_write_reg(dev->i2s_base, TXFFR, 1); ++ else ++ i2s_write_reg(dev->i2s_base, RXFFR, 1); ++ ++ return 0; ++} ++ + static int dw_i2s_trigger(struct snd_pcm_substream *substream, + int cmd, struct snd_soc_dai *dai) + { +@@ -294,6 +307,7 @@ static struct snd_soc_dai_ops dw_i2s_dai + .startup = dw_i2s_startup, + .shutdown = dw_i2s_shutdown, + .hw_params = dw_i2s_hw_params, ++ .prepare = dw_i2s_prepare, + .trigger = dw_i2s_trigger, + }; + diff --git a/queue-3.10/asoc-max98090-fix-ill-defined-sidetone-route.patch b/queue-3.10/asoc-max98090-fix-ill-defined-sidetone-route.patch new file mode 100644 index 00000000000..74e56e556c8 --- /dev/null +++ b/queue-3.10/asoc-max98090-fix-ill-defined-sidetone-route.patch @@ -0,0 +1,44 @@ +From 48826ee590da03e9882922edf96d8d27bdfe9552 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula +Date: Mon, 24 Nov 2014 15:32:36 +0200 +Subject: ASoC: max98090: Fix ill-defined sidetone route + +From: Jarkko Nikula + +commit 48826ee590da03e9882922edf96d8d27bdfe9552 upstream. + +Commit 5fe5b767dc6f ("ASoC: dapm: Do not pretend to support controls for non +mixer/mux widgets") revealed ill-defined control in a route between +"STENL Mux" and DACs in max98090.c: + +max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACL +max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACL +max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACL +max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACR +max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACR +max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACR + +Since there is no control between "STENL Mux" and DACs the control name must +be NULL not "NULL". + +Signed-off-by: Jarkko Nikula +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/max98090.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/soc/codecs/max98090.c ++++ b/sound/soc/codecs/max98090.c +@@ -1364,8 +1364,8 @@ static const struct snd_soc_dapm_route m + {"STENL Mux", "Sidetone Left", "DMICL"}, + {"STENR Mux", "Sidetone Right", "ADCR"}, + {"STENR Mux", "Sidetone Right", "DMICR"}, +- {"DACL", "NULL", "STENL Mux"}, +- {"DACR", "NULL", "STENL Mux"}, ++ {"DACL", NULL, "STENL Mux"}, ++ {"DACR", NULL, "STENL Mux"}, + + {"AIFINL", NULL, "SHDN"}, + {"AIFINR", NULL, "SHDN"}, diff --git a/queue-3.10/asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch b/queue-3.10/asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch new file mode 100644 index 00000000000..c0fcbf38f04 --- /dev/null +++ b/queue-3.10/asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch @@ -0,0 +1,37 @@ +From 50c0f21b42dd4cd02b51f82274f66912d9a7fa32 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Wed, 19 Nov 2014 18:29:02 +0100 +Subject: ASoC: sigmadsp: Refuse to load firmware files with a non-supported version + +From: Lars-Peter Clausen + +commit 50c0f21b42dd4cd02b51f82274f66912d9a7fa32 upstream. + +Make sure to check the version field of the firmware header to make sure to +not accidentally try to parse a firmware file with a different layout. +Trying to do so can result in loading invalid firmware code to the device. + +Signed-off-by: Lars-Peter Clausen +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/sigmadsp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/sound/soc/codecs/sigmadsp.c ++++ b/sound/soc/codecs/sigmadsp.c +@@ -176,6 +176,13 @@ static int _process_sigma_firmware(struc + goto done; + } + ++ if (ssfw_head->version != 1) { ++ dev_err(dev, ++ "Failed to load firmware: Invalid version %d. Supported firmware versions: 1\n", ++ ssfw_head->version); ++ goto done; ++ } ++ + crc = crc32(0, fw->data + sizeof(*ssfw_head), + fw->size - sizeof(*ssfw_head)); + pr_debug("%s: crc=%x\n", __func__, crc); diff --git a/queue-3.10/ath5k-fix-hardware-queue-index-assignment.patch b/queue-3.10/ath5k-fix-hardware-queue-index-assignment.patch new file mode 100644 index 00000000000..248cc6c7de3 --- /dev/null +++ b/queue-3.10/ath5k-fix-hardware-queue-index-assignment.patch @@ -0,0 +1,38 @@ +From 9e4982f6a51a2442f1bb588fee42521b44b4531c Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sun, 30 Nov 2014 21:52:57 +0100 +Subject: ath5k: fix hardware queue index assignment + +From: Felix Fietkau + +commit 9e4982f6a51a2442f1bb588fee42521b44b4531c upstream. + +Like with ath9k, ath5k queues also need to be ordered by priority. +queue_info->tqi_subtype already contains the correct index, so use it +instead of relying on the order of ath5k_hw_setup_tx_queue calls. + +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath5k/qcu.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +--- a/drivers/net/wireless/ath/ath5k/qcu.c ++++ b/drivers/net/wireless/ath/ath5k/qcu.c +@@ -225,13 +225,7 @@ ath5k_hw_setup_tx_queue(struct ath5k_hw + } else { + switch (queue_type) { + case AR5K_TX_QUEUE_DATA: +- for (queue = AR5K_TX_QUEUE_ID_DATA_MIN; +- ah->ah_txq[queue].tqi_type != +- AR5K_TX_QUEUE_INACTIVE; queue++) { +- +- if (queue > AR5K_TX_QUEUE_ID_DATA_MAX) +- return -EINVAL; +- } ++ queue = queue_info->tqi_subtype; + break; + case AR5K_TX_QUEUE_UAPSD: + queue = AR5K_TX_QUEUE_ID_UAPSD; diff --git a/queue-3.10/can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch b/queue-3.10/can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch new file mode 100644 index 00000000000..503b42ffc66 --- /dev/null +++ b/queue-3.10/can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch @@ -0,0 +1,77 @@ +From af35d0f1cce7a990286e2b94c260a2c2d2a0e4b0 Mon Sep 17 00:00:00 2001 +From: Stephane Grosjean +Date: Fri, 28 Nov 2014 13:49:10 +0100 +Subject: can: peak_usb: fix cleanup sequence order in case of error during init + +From: Stephane Grosjean + +commit af35d0f1cce7a990286e2b94c260a2c2d2a0e4b0 upstream. + +This patch sets the correct reverse sequence order to the instructions +set to run, when any failure occurs during the initialization steps. +It also adds the missing unregistration call of the can device if the +failure appears after having been registered. + +Signed-off-by: Stephane Grosjean +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/can/usb/peak_usb/pcan_usb_core.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c +@@ -727,7 +727,7 @@ static int peak_usb_create_dev(struct pe + dev->cmd_buf = kmalloc(PCAN_USB_MAX_CMD_LEN, GFP_KERNEL); + if (!dev->cmd_buf) { + err = -ENOMEM; +- goto lbl_set_intf_data; ++ goto lbl_free_candev; + } + + dev->udev = usb_dev; +@@ -766,7 +766,7 @@ static int peak_usb_create_dev(struct pe + err = register_candev(netdev); + if (err) { + dev_err(&intf->dev, "couldn't register CAN device: %d\n", err); +- goto lbl_free_cmd_buf; ++ goto lbl_restore_intf_data; + } + + if (dev->prev_siblings) +@@ -779,14 +779,14 @@ static int peak_usb_create_dev(struct pe + if (dev->adapter->dev_init) { + err = dev->adapter->dev_init(dev); + if (err) +- goto lbl_free_cmd_buf; ++ goto lbl_unregister_candev; + } + + /* set bus off */ + if (dev->adapter->dev_set_bus) { + err = dev->adapter->dev_set_bus(dev, 0); + if (err) +- goto lbl_free_cmd_buf; ++ goto lbl_unregister_candev; + } + + /* get device number early */ +@@ -798,11 +798,14 @@ static int peak_usb_create_dev(struct pe + + return 0; + +-lbl_free_cmd_buf: +- kfree(dev->cmd_buf); ++lbl_unregister_candev: ++ unregister_candev(netdev); + +-lbl_set_intf_data: ++lbl_restore_intf_data: + usb_set_intfdata(intf, dev->prev_siblings); ++ kfree(dev->cmd_buf); ++ ++lbl_free_candev: + free_candev(netdev); + + return err; diff --git a/queue-3.10/can-peak_usb-fix-memset-usage.patch b/queue-3.10/can-peak_usb-fix-memset-usage.patch new file mode 100644 index 00000000000..06529e6111d --- /dev/null +++ b/queue-3.10/can-peak_usb-fix-memset-usage.patch @@ -0,0 +1,43 @@ +From dc50ddcd4c58a5a0226038307d6ef884bec9f8c2 Mon Sep 17 00:00:00 2001 +From: Stephane Grosjean +Date: Fri, 28 Nov 2014 14:08:48 +0100 +Subject: can: peak_usb: fix memset() usage + +From: Stephane Grosjean + +commit dc50ddcd4c58a5a0226038307d6ef884bec9f8c2 upstream. + +This patchs fixes a misplaced call to memset() that fills the request +buffer with 0. The problem was with sending PCAN_USBPRO_REQ_FCT +requests, the content set by the caller was thus lost. + +With this patch, the memory area is zeroed only when requesting info +from the device. + +Signed-off-by: Stephane Grosjean +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +@@ -333,8 +333,6 @@ static int pcan_usb_pro_send_req(struct + if (!(dev->state & PCAN_USB_STATE_CONNECTED)) + return 0; + +- memset(req_addr, '\0', req_size); +- + req_type = USB_TYPE_VENDOR | USB_RECIP_OTHER; + + switch (req_id) { +@@ -345,6 +343,7 @@ static int pcan_usb_pro_send_req(struct + default: + p = usb_rcvctrlpipe(dev->udev, 0); + req_type |= USB_DIR_IN; ++ memset(req_addr, '\0', req_size); + break; + } + diff --git a/queue-3.10/series b/queue-3.10/series index d25040293f3..0f2408ae65b 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -1,3 +1,10 @@ ocfs2-fix-journal-commit-deadlock.patch ath9k_hw-fix-hardware-queue-allocation.patch ath9k-fix-be-bk-queue-order.patch +can-peak_usb-fix-cleanup-sequence-order-in-case-of-error-during-init.patch +can-peak_usb-fix-memset-usage.patch +swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch +ath5k-fix-hardware-queue-index-assignment.patch +asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch +asoc-max98090-fix-ill-defined-sidetone-route.patch +asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch diff --git a/queue-3.10/swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch b/queue-3.10/swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch new file mode 100644 index 00000000000..b8d4b955d5c --- /dev/null +++ b/queue-3.10/swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch @@ -0,0 +1,32 @@ +From 2c3fc8d26dd09b9d7069687eead849ee81c78e46 Mon Sep 17 00:00:00 2001 +From: Stefano Stabellini +Date: Fri, 21 Nov 2014 16:56:12 +0000 +Subject: swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single + +From: Stefano Stabellini + +commit 2c3fc8d26dd09b9d7069687eead849ee81c78e46 upstream. + +Need to pass the pointer within the swiotlb internal buffer to the +swiotlb library, that in the case of xen_unmap_single is dev_addr, not +paddr. + +Signed-off-by: Stefano Stabellini +Acked-by: Konrad Rzeszutek Wilk +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/xen/swiotlb-xen.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/xen/swiotlb-xen.c ++++ b/drivers/xen/swiotlb-xen.c +@@ -390,7 +390,7 @@ static void xen_unmap_single(struct devi + + /* NOTE: We use dev_addr here, not paddr! */ + if (is_xen_swiotlb_buffer(dev_addr)) { +- swiotlb_tbl_unmap_single(hwdev, paddr, size, dir); ++ swiotlb_tbl_unmap_single(hwdev, dev_addr, size, dir); + return; + } + -- 2.47.3