--- /dev/null
+From 3475c3d034d7f276a474c8bd53f44b48c8bf669d Mon Sep 17 00:00:00 2001
+From: Andrew Jackson <Andrew.Jackson@arm.com>
+Date: Fri, 19 Dec 2014 16:18:05 +0000
+Subject: ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap
+
+From: Andrew Jackson <Andrew.Jackson@arm.com>
+
+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 <Andrew.Jackson@arm.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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,
+ };
+
--- /dev/null
+From 077661b6ed24e530dabc9db3ab3ae48fbaf19679 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 7 Oct 2014 20:56:29 +0200
+Subject: ASoC: eukrea-tlv320: Fix of_node_put() call with uninitialized object
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 077661b6ed24e530dabc9db3ab3ae48fbaf19679 upstream.
+
+The of_node_put() call in eukrea_tlv320_probe() may take an
+uninitialized pointer, as compiler spotted out:
+ sound/soc/fsl/eukrea-tlv320.c:221:14: warning: 'ssi_np' may be used uninitialized in this function [-Wuninitialized]
+
+This patch adds the proper NULL initializations as a fix.
+(codec_np is also NULL initialized just for consistency.)
+
+Fixes: 66f232908de2 ('ASoC: eukrea-tlv320: Add DT support')
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/fsl/eukrea-tlv320.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/fsl/eukrea-tlv320.c
++++ b/sound/soc/fsl/eukrea-tlv320.c
+@@ -105,7 +105,7 @@ static int eukrea_tlv320_probe(struct pl
+ int ret;
+ int int_port = 0, ext_port;
+ struct device_node *np = pdev->dev.of_node;
+- struct device_node *ssi_np, *codec_np;
++ struct device_node *ssi_np = NULL, *codec_np = NULL;
+
+ eukrea_tlv320.dev = &pdev->dev;
+ if (np) {
--- /dev/null
+From 48826ee590da03e9882922edf96d8d27bdfe9552 Mon Sep 17 00:00:00 2001
+From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+Date: Mon, 24 Nov 2014 15:32:36 +0200
+Subject: ASoC: max98090: Fix ill-defined sidetone route
+
+From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+
+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 <jarkko.nikula@linux.intel.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -1395,8 +1395,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"},
--- /dev/null
+From 681a19560378213a193c424881b2180a783b81ae Mon Sep 17 00:00:00 2001
+From: Peter Rosin <peda@axentia.se>
+Date: Mon, 8 Dec 2014 16:33:11 +0100
+Subject: ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
+
+From: Peter Rosin <peda@axentia.se>
+
+commit 681a19560378213a193c424881b2180a783b81ae upstream.
+
+When the codec is connected using i2c, it will only auto-increment
+register addresses if msb (0x80) of the register address byte is set.
+
+[Fixes cache sync if multiple adjacent registers are updated -- broonie]
+
+Signed-off-by: Peter Rosin <peda@axentia.se>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/pcm512x-i2c.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/pcm512x-i2c.c
++++ b/sound/soc/codecs/pcm512x-i2c.c
+@@ -24,8 +24,13 @@ static int pcm512x_i2c_probe(struct i2c_
+ const struct i2c_device_id *id)
+ {
+ struct regmap *regmap;
++ struct regmap_config config = pcm512x_regmap;
+
+- regmap = devm_regmap_init_i2c(i2c, &pcm512x_regmap);
++ /* msb needs to be set to enable auto-increment of addresses */
++ config.read_flag_mask = 0x80;
++ config.write_flag_mask = 0x80;
++
++ regmap = devm_regmap_init_i2c(i2c, &config);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+
--- /dev/null
+From 50c0f21b42dd4cd02b51f82274f66912d9a7fa32 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+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 <lars@metafoo.de>
+
+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 <lars@metafoo.de>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/sigmadsp.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/sound/soc/codecs/sigmadsp.c
++++ b/sound/soc/codecs/sigmadsp.c
+@@ -159,6 +159,13 @@ int _process_sigma_firmware(struct devic
+ 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);
--- /dev/null
+From bbc686b34650b0f54affe9d9a637ccbe02b03760 Mon Sep 17 00:00:00 2001
+From: Jyri Sarha <jsarha@ti.com>
+Date: Mon, 24 Nov 2014 20:37:12 +0200
+Subject: ASoC: tlv320aic31xx: Fix off by one error in the loop stucture.
+
+From: Jyri Sarha <jsarha@ti.com>
+
+commit bbc686b34650b0f54affe9d9a637ccbe02b03760 upstream.
+
+Fix off by one read beyond the end of a table.
+
+Reported-by: David Binderman <dcb314@hotmail.com>
+Signed-off-by: Jyri Sarha <jsarha@ti.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/tlv320aic31xx.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/sound/soc/codecs/tlv320aic31xx.c
++++ b/sound/soc/codecs/tlv320aic31xx.c
+@@ -911,12 +911,13 @@ static int aic31xx_set_dai_sysclk(struct
+ }
+ aic31xx->p_div = i;
+
+- for (i = 0; aic31xx_divs[i].mclk_p != freq/aic31xx->p_div; i++) {
+- if (i == ARRAY_SIZE(aic31xx_divs)) {
+- dev_err(aic31xx->dev, "%s: Unsupported frequency %d\n",
+- __func__, freq);
+- return -EINVAL;
+- }
++ for (i = 0; i < ARRAY_SIZE(aic31xx_divs) &&
++ aic31xx_divs[i].mclk_p != freq/aic31xx->p_div; i++)
++ ;
++ if (i == ARRAY_SIZE(aic31xx_divs)) {
++ dev_err(aic31xx->dev, "%s: Unsupported frequency %d\n",
++ __func__, freq);
++ return -EINVAL;
+ }
+
+ /* set clock on MCLK, BCLK, or GPIO1 as PLL input */
--- /dev/null
+From 9e4982f6a51a2442f1bb588fee42521b44b4531c Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Sun, 30 Nov 2014 21:52:57 +0100
+Subject: ath5k: fix hardware queue index assignment
+
+From: Felix Fietkau <nbd@openwrt.org>
+
+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 <nbd@openwrt.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
--- /dev/null
+From af35d0f1cce7a990286e2b94c260a2c2d2a0e4b0 Mon Sep 17 00:00:00 2001
+From: Stephane Grosjean <s.grosjean@peak-system.com>
+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 <s.grosjean@peak-system.com>
+
+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 <s.grosjean@peak-system.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -735,7 +735,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;
+@@ -775,7 +775,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)
+@@ -788,14 +788,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 */
+@@ -807,11 +807,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;
--- /dev/null
+From dc50ddcd4c58a5a0226038307d6ef884bec9f8c2 Mon Sep 17 00:00:00 2001
+From: Stephane Grosjean <s.grosjean@peak-system.com>
+Date: Fri, 28 Nov 2014 14:08:48 +0100
+Subject: can: peak_usb: fix memset() usage
+
+From: Stephane Grosjean <s.grosjean@peak-system.com>
+
+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 <s.grosjean@peak-system.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
+ }
+
--- /dev/null
+From 55fd1ce820f461b77919a1997ba8285652219024 Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Tue, 2 Dec 2014 22:09:55 +0200
+Subject: iwlwifi: add new device IDs for 3165
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit 55fd1ce820f461b77919a1997ba8285652219024 upstream.
+
+A few device IDs were added, reflect this change in the
+driver.
+
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/pcie/drv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
++++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
+@@ -367,7 +367,11 @@ static const struct pci_device_id iwl_hw
+
+ /* 3165 Series */
+ {IWL_PCI_DEVICE(0x3165, 0x4010, iwl3165_2ac_cfg)},
++ {IWL_PCI_DEVICE(0x3165, 0x4012, iwl3165_2ac_cfg)},
++ {IWL_PCI_DEVICE(0x3165, 0x4110, iwl3165_2ac_cfg)},
+ {IWL_PCI_DEVICE(0x3165, 0x4210, iwl3165_2ac_cfg)},
++ {IWL_PCI_DEVICE(0x3165, 0x4410, iwl3165_2ac_cfg)},
++ {IWL_PCI_DEVICE(0x3165, 0x4510, iwl3165_2ac_cfg)},
+
+ /* 7265 Series */
+ {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},
--- /dev/null
+From 5a12a07e4495d1e4d79382e05c9d6e8b4d9fa4ec Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Mon, 1 Dec 2014 09:34:13 +0200
+Subject: iwlwifi: dvm: fix flush support for old firmware
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit 5a12a07e4495d1e4d79382e05c9d6e8b4d9fa4ec upstream.
+
+Since the commit below, iwldvm sends the FLUSH command to
+the firmware. All the devices that use iwldvm have a
+firmware that expects the _v3 version of this command,
+besides 5150.
+5150's latest available firmware still expects a _v2 version
+of the FLUSH command.
+This means that since the commit below, we had a mismatch for
+this specific device only.
+This mismatch led to the NMI below:
+
+Loaded firmware version: 8.24.2.2
+Start IWL Error Log Dump:
+Status: 0x0000004C, count: 5
+0x00000004 | NMI_INTERRUPT_WDG
+0x000006F4 | uPc
+0x000005BA | branchlink1
+0x000006F8 | branchlink2
+0x000008C2 | interruptlink1
+0x00005B02 | interruptlink2
+0x00000002 | data1
+0x07030000 | data2
+0x00000068 | line
+0x3E80510C | beacon time
+0x728A0EF4 | tsf low
+0x0000002A | tsf hi
+0x00000000 | time gp1
+0x01BDC977 | time gp2
+0x00000000 | time gp3
+0x00010818 | uCode version
+0x00000000 | hw version
+0x00484704 | board version
+0x00000002 | hcmd
+0x2FF23080 | isr0
+0x0103E000 | isr1
+0x0000001A | isr2
+0x1443FCC3 | isr3
+0x11800112 | isr4
+0x00000068 | isr_pref
+0x000000D4 | wait_event
+0x00000000 | l2p_control
+0x00000007 | l2p_duration
+0x00103040 | l2p_mhvalid
+0x00000007 | l2p_addr_match
+0x00000000 | lmpm_pmg_sel
+0x00000000 | timestamp
+0x00000200 | flow_handler
+
+This was reported here:
+https://bugzilla.kernel.org/show_bug.cgi?id=88961
+
+Fixes: a0855054e59b ("iwlwifi: dvm: drop non VO frames when flushing")
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/dvm/commands.h | 31 +++++++++++--------
+ drivers/net/wireless/iwlwifi/dvm/lib.c | 45 ++++++++++++++--------------
+ 2 files changed, 41 insertions(+), 35 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/dvm/commands.h
++++ b/drivers/net/wireless/iwlwifi/dvm/commands.h
+@@ -966,21 +966,21 @@ struct iwl_rem_sta_cmd {
+
+
+ /* WiFi queues mask */
+-#define IWL_SCD_BK_MSK cpu_to_le32(BIT(0))
+-#define IWL_SCD_BE_MSK cpu_to_le32(BIT(1))
+-#define IWL_SCD_VI_MSK cpu_to_le32(BIT(2))
+-#define IWL_SCD_VO_MSK cpu_to_le32(BIT(3))
+-#define IWL_SCD_MGMT_MSK cpu_to_le32(BIT(3))
++#define IWL_SCD_BK_MSK BIT(0)
++#define IWL_SCD_BE_MSK BIT(1)
++#define IWL_SCD_VI_MSK BIT(2)
++#define IWL_SCD_VO_MSK BIT(3)
++#define IWL_SCD_MGMT_MSK BIT(3)
+
+ /* PAN queues mask */
+-#define IWL_PAN_SCD_BK_MSK cpu_to_le32(BIT(4))
+-#define IWL_PAN_SCD_BE_MSK cpu_to_le32(BIT(5))
+-#define IWL_PAN_SCD_VI_MSK cpu_to_le32(BIT(6))
+-#define IWL_PAN_SCD_VO_MSK cpu_to_le32(BIT(7))
+-#define IWL_PAN_SCD_MGMT_MSK cpu_to_le32(BIT(7))
+-#define IWL_PAN_SCD_MULTICAST_MSK cpu_to_le32(BIT(8))
++#define IWL_PAN_SCD_BK_MSK BIT(4)
++#define IWL_PAN_SCD_BE_MSK BIT(5)
++#define IWL_PAN_SCD_VI_MSK BIT(6)
++#define IWL_PAN_SCD_VO_MSK BIT(7)
++#define IWL_PAN_SCD_MGMT_MSK BIT(7)
++#define IWL_PAN_SCD_MULTICAST_MSK BIT(8)
+
+-#define IWL_AGG_TX_QUEUE_MSK cpu_to_le32(0xffc00)
++#define IWL_AGG_TX_QUEUE_MSK 0xffc00
+
+ #define IWL_DROP_ALL BIT(1)
+
+@@ -1005,12 +1005,17 @@ struct iwl_rem_sta_cmd {
+ * 1: Dump multiple MSDU according to PS, INVALID STA, TTL, TID disable.
+ * 2: Dump all FIFO
+ */
+-struct iwl_txfifo_flush_cmd {
++struct iwl_txfifo_flush_cmd_v3 {
+ __le32 queue_control;
+ __le16 flush_control;
+ __le16 reserved;
+ } __packed;
+
++struct iwl_txfifo_flush_cmd_v2 {
++ __le16 queue_control;
++ __le16 flush_control;
++} __packed;
++
+ /*
+ * REPLY_WEP_KEY = 0x20
+ */
+--- a/drivers/net/wireless/iwlwifi/dvm/lib.c
++++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
+@@ -137,37 +137,38 @@ int iwlagn_manage_ibss_station(struct iw
+ */
+ int iwlagn_txfifo_flush(struct iwl_priv *priv, u32 scd_q_msk)
+ {
+- struct iwl_txfifo_flush_cmd flush_cmd;
+- struct iwl_host_cmd cmd = {
+- .id = REPLY_TXFIFO_FLUSH,
+- .len = { sizeof(struct iwl_txfifo_flush_cmd), },
+- .data = { &flush_cmd, },
++ struct iwl_txfifo_flush_cmd_v3 flush_cmd_v3 = {
++ .flush_control = cpu_to_le16(IWL_DROP_ALL),
++ };
++ struct iwl_txfifo_flush_cmd_v2 flush_cmd_v2 = {
++ .flush_control = cpu_to_le16(IWL_DROP_ALL),
+ };
+
+- memset(&flush_cmd, 0, sizeof(flush_cmd));
++ u32 queue_control = IWL_SCD_VO_MSK | IWL_SCD_VI_MSK |
++ IWL_SCD_BE_MSK | IWL_SCD_BK_MSK | IWL_SCD_MGMT_MSK;
+
+- flush_cmd.queue_control = IWL_SCD_VO_MSK | IWL_SCD_VI_MSK |
+- IWL_SCD_BE_MSK | IWL_SCD_BK_MSK |
+- IWL_SCD_MGMT_MSK;
+ if ((priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)))
+- flush_cmd.queue_control |= IWL_PAN_SCD_VO_MSK |
+- IWL_PAN_SCD_VI_MSK |
+- IWL_PAN_SCD_BE_MSK |
+- IWL_PAN_SCD_BK_MSK |
+- IWL_PAN_SCD_MGMT_MSK |
+- IWL_PAN_SCD_MULTICAST_MSK;
++ queue_control |= IWL_PAN_SCD_VO_MSK | IWL_PAN_SCD_VI_MSK |
++ IWL_PAN_SCD_BE_MSK | IWL_PAN_SCD_BK_MSK |
++ IWL_PAN_SCD_MGMT_MSK |
++ IWL_PAN_SCD_MULTICAST_MSK;
+
+ if (priv->nvm_data->sku_cap_11n_enable)
+- flush_cmd.queue_control |= IWL_AGG_TX_QUEUE_MSK;
++ queue_control |= IWL_AGG_TX_QUEUE_MSK;
+
+ if (scd_q_msk)
+- flush_cmd.queue_control = cpu_to_le32(scd_q_msk);
+-
+- IWL_DEBUG_INFO(priv, "queue control: 0x%x\n",
+- flush_cmd.queue_control);
+- flush_cmd.flush_control = cpu_to_le16(IWL_DROP_ALL);
++ queue_control = scd_q_msk;
+
+- return iwl_dvm_send_cmd(priv, &cmd);
++ IWL_DEBUG_INFO(priv, "queue control: 0x%x\n", queue_control);
++ flush_cmd_v3.queue_control = cpu_to_le32(queue_control);
++ flush_cmd_v2.queue_control = cpu_to_le16((u16)queue_control);
++
++ if (IWL_UCODE_API(priv->fw->ucode_ver) > 2)
++ return iwl_dvm_send_cmd_pdu(priv, REPLY_TXFIFO_FLUSH, 0,
++ sizeof(flush_cmd_v3),
++ &flush_cmd_v3);
++ return iwl_dvm_send_cmd_pdu(priv, REPLY_TXFIFO_FLUSH, 0,
++ sizeof(flush_cmd_v2), &flush_cmd_v2);
+ }
+
+ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv)
--- /dev/null
+From b4c82adcba8cb4b23068a6b800ca98da3bee6888 Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Mon, 1 Dec 2014 16:44:09 +0200
+Subject: iwlwifi: mvm: update values for Smart Fifo
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit b4c82adcba8cb4b23068a6b800ca98da3bee6888 upstream.
+
+Interoperability issues were identified and root caused to
+the Smart Fifo watermarks. These issues arose with
+NetGear R7000. Fix this.
+
+Fixes: 1f3b0ff8ecce ("iwlwifi: mvm: Add Smart FIFO support")
+Reviewed-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/mvm/fw-api.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h
++++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
+@@ -1589,7 +1589,7 @@ enum iwl_sf_scenario {
+ #define SF_NUM_TIMEOUT_TYPES 2 /* Aging timer and Idle timer */
+
+ /* smart FIFO default values */
+-#define SF_W_MARK_SISO 4096
++#define SF_W_MARK_SISO 6144
+ #define SF_W_MARK_MIMO2 8192
+ #define SF_W_MARK_MIMO3 6144
+ #define SF_W_MARK_LEGACY 4096
--- /dev/null
+From 9972fc0b859e7aaeb6d2d33bdb591959d9a436c0 Mon Sep 17 00:00:00 2001
+From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
+Date: Wed, 22 Oct 2014 10:11:47 -0400
+Subject: ktest: Fix make_min_config to handle new assign_configs call
+
+From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
+
+commit 9972fc0b859e7aaeb6d2d33bdb591959d9a436c0 upstream.
+
+Commit 6071c22e1755 "ktest: Rewrite the config-bisect to actually work"
+fixed the config-bisect to work nicely but in doing so it broke
+make_min_config by changing the way assign_configs works.
+
+The assign_configs function now adds the config to the hash even if
+it is disabled, but changes the hash value to be that of the
+line "# CONFIG_FOO is not set". Unfortunately, the make_min_config
+test only checks to see if the config is removed. It now needs to
+check if the config is in the hash and not set to be disabled.
+
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/testing/ktest/ktest.pl | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/tools/testing/ktest/ktest.pl
++++ b/tools/testing/ktest/ktest.pl
+@@ -3571,7 +3571,9 @@ sub test_this_config {
+ undef %configs;
+ assign_configs \%configs, $output_config;
+
+- return $config if (!defined($configs{$config}));
++ if (!defined($configs{$config}) || $configs{$config} =~ /^#/) {
++ return $config;
++ }
+
+ doprint "disabling config $config did not change .config\n";
+
ocfs2-fix-the-wrong-directory-passed-to-ocfs2_lookup_ino_from_name-when-link-file.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-xen_dma_unmap_page-and-xen_dma_sync_single_for_cpu.patch
+swiotlb-xen-remove-bug_on-in-xen_bus_to_phys.patch
+swiotlb-xen-call-xen_dma_sync_single_for_device-when-appropriate.patch
+swiotlb-xen-pass-dev_addr-to-swiotlb_tbl_unmap_single.patch
+iwlwifi-dvm-fix-flush-support-for-old-firmware.patch
+iwlwifi-mvm-update-values-for-smart-fifo.patch
+iwlwifi-add-new-device-ids-for-3165.patch
+ath5k-fix-hardware-queue-index-assignment.patch
+asoc-eukrea-tlv320-fix-of_node_put-call-with-uninitialized-object.patch
+asoc-sigmadsp-refuse-to-load-firmware-files-with-a-non-supported-version.patch
+asoc-max98090-fix-ill-defined-sidetone-route.patch
+asoc-tlv320aic31xx-fix-off-by-one-error-in-the-loop-stucture.patch
+asoc-pcm512x-trigger-auto-increment-of-register-addresses-on-i2c.patch
+asoc-dwc-ensure-fifos-are-flushed-to-prevent-channel-swap.patch
+ktest-fix-make_min_config-to-handle-new-assign_configs-call.patch
--- /dev/null
+From 9490c6c67e2f41760de8ece4e4f56f75f84ceb9e Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 16:55:12 +0000
+Subject: swiotlb-xen: call xen_dma_sync_single_for_device when appropriate
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit 9490c6c67e2f41760de8ece4e4f56f75f84ceb9e upstream.
+
+In xen_swiotlb_sync_single we always call xen_dma_sync_single_for_cpu,
+even when we should call xen_dma_sync_single_for_device. Fix that.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -500,7 +500,7 @@ xen_swiotlb_sync_single(struct device *h
+ swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target);
+
+ if (target == SYNC_FOR_DEVICE)
+- xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir);
++ xen_dma_sync_single_for_device(hwdev, dev_addr, size, dir);
+
+ if (dir != DMA_FROM_DEVICE)
+ return;
--- /dev/null
+From 2c3fc8d26dd09b9d7069687eead849ee81c78e46 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 16:56:12 +0000
+Subject: swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+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 <stefano.stabellini@eu.citrix.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -449,7 +449,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;
+ }
+
--- /dev/null
+From d6883e6f32e07ef2cc974753ba00927de099e6d7 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 11:09:39 +0000
+Subject: swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit d6883e6f32e07ef2cc974753ba00927de099e6d7 upstream.
+
+xen_dma_unmap_page and xen_dma_sync_single_for_cpu take a dma_addr_t
+handle as argument, not a physical address.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/swiotlb-xen.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -447,7 +447,7 @@ static void xen_unmap_single(struct devi
+
+ BUG_ON(dir == DMA_NONE);
+
+- xen_dma_unmap_page(hwdev, paddr, size, dir, attrs);
++ xen_dma_unmap_page(hwdev, dev_addr, size, dir, attrs);
+
+ /* NOTE: We use dev_addr here, not paddr! */
+ if (is_xen_swiotlb_buffer(dev_addr)) {
+@@ -495,14 +495,14 @@ xen_swiotlb_sync_single(struct device *h
+ BUG_ON(dir == DMA_NONE);
+
+ if (target == SYNC_FOR_CPU)
+- xen_dma_sync_single_for_cpu(hwdev, paddr, size, dir);
++ xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir);
+
+ /* NOTE: We use dev_addr here, not paddr! */
+ if (is_xen_swiotlb_buffer(dev_addr))
+ swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target);
+
+ if (target == SYNC_FOR_DEVICE)
+- xen_dma_sync_single_for_cpu(hwdev, paddr, size, dir);
++ xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir);
+
+ if (dir != DMA_FROM_DEVICE)
+ return;
--- /dev/null
+From c884227eaae9936f8ecbde6e1387bccdab5f4e90 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 11:10:39 +0000
+Subject: swiotlb-xen: remove BUG_ON in xen_bus_to_phys
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit c884227eaae9936f8ecbde6e1387bccdab5f4e90 upstream.
+
+On x86 truncation cannot occur because config XEN depends on X86_64 ||
+(X86_32 && X86_PAE).
+
+On ARM truncation can occur without CONFIG_ARM_LPAE, when the dma
+operation involves foreign grants. However in that case the physical
+address returned by xen_bus_to_phys is actually invalid (there is no mfn
+to pfn tracking for foreign grants on ARM) and it is not used.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/swiotlb-xen.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -96,8 +96,6 @@ static inline phys_addr_t xen_bus_to_phy
+ dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT;
+ phys_addr_t paddr = dma;
+
+- BUG_ON(paddr != dma); /* truncation has occurred, should never happen */
+-
+ paddr |= baddr & ~PAGE_MASK;
+
+ return paddr;