]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Oct 2016 16:22:08 +0000 (18:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Oct 2016 16:22:08 +0000 (18:22 +0200)
added patches:
iwlwifi-mvm-don-t-use-ret-when-not-initialised.patch
iwlwifi-pcie-fix-access-to-scratch-buffer.patch

queue-4.4/iwlwifi-mvm-don-t-use-ret-when-not-initialised.patch [new file with mode: 0644]
queue-4.4/iwlwifi-pcie-fix-access-to-scratch-buffer.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/iwlwifi-mvm-don-t-use-ret-when-not-initialised.patch b/queue-4.4/iwlwifi-mvm-don-t-use-ret-when-not-initialised.patch
new file mode 100644 (file)
index 0000000..caa28cf
--- /dev/null
@@ -0,0 +1,33 @@
+From ff6e58e648ed5f3cc43891767811d5c3c88bbd41 Mon Sep 17 00:00:00 2001
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Date: Wed, 3 Aug 2016 22:06:43 +0300
+Subject: iwlwifi: mvm: don't use ret when not initialised
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+commit ff6e58e648ed5f3cc43891767811d5c3c88bbd41 upstream.
+
+fw-dbg code return ret but that variable was either 0
+or not initialised. Return 0 always.
+
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Fixes: 6a95126763fb ("iwlwifi: mvm: send dbg config hcmds to fw if set in tlv")
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/mvm/fw.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/iwlwifi/mvm/fw.c
++++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
+@@ -935,7 +935,8 @@ int iwl_mvm_start_fw_dbg_conf(struct iwl
+       }
+       mvm->fw_dbg_conf = conf_id;
+-      return ret;
++
++      return 0;
+ }
+ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
diff --git a/queue-4.4/iwlwifi-pcie-fix-access-to-scratch-buffer.patch b/queue-4.4/iwlwifi-pcie-fix-access-to-scratch-buffer.patch
new file mode 100644 (file)
index 0000000..cf9fe94
--- /dev/null
@@ -0,0 +1,43 @@
+From d5d0689aefc59c6a5352ca25d7e6d47d03f543ce Mon Sep 17 00:00:00 2001
+From: Sara Sharon <sara.sharon@intel.com>
+Date: Thu, 9 Jun 2016 17:19:35 +0300
+Subject: iwlwifi: pcie: fix access to scratch buffer
+
+From: Sara Sharon <sara.sharon@intel.com>
+
+commit d5d0689aefc59c6a5352ca25d7e6d47d03f543ce upstream.
+
+This fixes a pretty ancient bug that hasn't manifested itself
+until now.
+The scratchbuf for command queue is allocated only for 32 slots
+but is accessed with the queue write pointer - which can be
+up to 256.
+Since the scratch buf size was 16 and there are up to 256 TFDs
+we never passed a page boundary when accessing the scratch buffer,
+but when attempting to increase the size of the scratch buffer a
+panic was quick to follow when trying to access the address resulted
+in a page boundary.
+
+Signed-off-by: Sara Sharon <sara.sharon@intel.com>
+Fixes: 38c0f334b359 ("iwlwifi: use coherent DMA memory for command header")
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/pcie/tx.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
++++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
+@@ -1508,9 +1508,9 @@ static int iwl_pcie_enqueue_hcmd(struct
+       /* start the TFD with the scratchbuf */
+       scratch_size = min_t(int, copy_size, IWL_HCMD_SCRATCHBUF_SIZE);
+-      memcpy(&txq->scratchbufs[q->write_ptr], &out_cmd->hdr, scratch_size);
++      memcpy(&txq->scratchbufs[idx], &out_cmd->hdr, scratch_size);
+       iwl_pcie_txq_build_tfd(trans, txq,
+-                             iwl_pcie_get_scratchbuf_dma(txq, q->write_ptr),
++                             iwl_pcie_get_scratchbuf_dma(txq, idx),
+                              scratch_size, true);
+       /* map first command fragment, if any remains */
index e066c91b41445a147123974058587c9bfa8d2aac..a8020f2ae2f68b639a07dbebf2ebaecf0b971234 100644 (file)
@@ -22,3 +22,5 @@ ipvs-fix-bind-to-link-local-mcast-ipv6-address-in-backup.patch
 nvmem-declare-nvmem_cell_read-consistently.patch
 hwmon-adt7411-set-bit-3-in-cfg1-register.patch
 spi-sh-msiof-avoid-invalid-clock-generator-parameters.patch
+iwlwifi-pcie-fix-access-to-scratch-buffer.patch
+iwlwifi-mvm-don-t-use-ret-when-not-initialised.patch