]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 17:04:39 +0000 (10:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2012 17:04:39 +0000 (10:04 -0700)
added patches:
iwlwifi-fix-tx-power-antenna-access.patch
iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch
target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch

queue-3.4/iwlwifi-fix-tx-power-antenna-access.patch [new file with mode: 0644]
queue-3.4/iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch [new file with mode: 0644]

diff --git a/queue-3.4/iwlwifi-fix-tx-power-antenna-access.patch b/queue-3.4/iwlwifi-fix-tx-power-antenna-access.patch
new file mode 100644 (file)
index 0000000..635e6e0
--- /dev/null
@@ -0,0 +1,74 @@
+From a5fdde28b4f5fb756032e7ad2c6fcdcffde20958 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Wed, 30 May 2012 10:36:12 +0200
+Subject: iwlwifi: fix TX power antenna access
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit a5fdde28b4f5fb756032e7ad2c6fcdcffde20958 upstream.
+
+Since my commit
+  iwlwifi: use valid TX/RX antenna from hw_params
+the config values are pure overrides, not the
+real values for all hardware. Therefore, the
+EEPROM TX power reading code checks the wrong
+values, it should check the hw_params values.
+
+Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/net/wireless/iwlwifi/iwl-eeprom.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
++++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+@@ -513,28 +513,28 @@ static int iwl_find_otp_image(struct iwl
+  * iwl_get_max_txpower_avg - get the highest tx power from all chains.
+  *     find the highest tx power from all chains for the channel
+  */
+-static s8 iwl_get_max_txpower_avg(const struct iwl_cfg *cfg,
++static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv,
+               struct iwl_eeprom_enhanced_txpwr *enhanced_txpower,
+               int element, s8 *max_txpower_in_half_dbm)
+ {
+       s8 max_txpower_avg = 0; /* (dBm) */
+       /* Take the highest tx power from any valid chains */
+-      if ((cfg->valid_tx_ant & ANT_A) &&
++      if ((hw_params(priv).valid_tx_ant & ANT_A) &&
+           (enhanced_txpower[element].chain_a_max > max_txpower_avg))
+               max_txpower_avg = enhanced_txpower[element].chain_a_max;
+-      if ((cfg->valid_tx_ant & ANT_B) &&
++      if ((hw_params(priv).valid_tx_ant & ANT_B) &&
+           (enhanced_txpower[element].chain_b_max > max_txpower_avg))
+               max_txpower_avg = enhanced_txpower[element].chain_b_max;
+-      if ((cfg->valid_tx_ant & ANT_C) &&
++      if ((hw_params(priv).valid_tx_ant & ANT_C) &&
+           (enhanced_txpower[element].chain_c_max > max_txpower_avg))
+               max_txpower_avg = enhanced_txpower[element].chain_c_max;
+-      if (((cfg->valid_tx_ant == ANT_AB) |
+-          (cfg->valid_tx_ant == ANT_BC) |
+-          (cfg->valid_tx_ant == ANT_AC)) &&
++      if (((hw_params(priv).valid_tx_ant == ANT_AB) |
++          (hw_params(priv).valid_tx_ant == ANT_BC) |
++          (hw_params(priv).valid_tx_ant == ANT_AC)) &&
+           (enhanced_txpower[element].mimo2_max > max_txpower_avg))
+               max_txpower_avg =  enhanced_txpower[element].mimo2_max;
+-      if ((cfg->valid_tx_ant == ANT_ABC) &&
++      if ((hw_params(priv).valid_tx_ant == ANT_ABC) &&
+           (enhanced_txpower[element].mimo3_max > max_txpower_avg))
+               max_txpower_avg = enhanced_txpower[element].mimo3_max;
+@@ -637,7 +637,7 @@ static void iwl_eeprom_enhanced_txpower(
+                                ((txp->delta_20_in_40 & 0xf0) >> 4),
+                                (txp->delta_20_in_40 & 0x0f));
+-              max_txp_avg = iwl_get_max_txpower_avg(cfg(priv), txp_array, idx,
++              max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx,
+                                                     &max_txp_avg_halfdbm);
+               /*
diff --git a/queue-3.4/iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch b/queue-3.4/iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch
new file mode 100644 (file)
index 0000000..d30544d
--- /dev/null
@@ -0,0 +1,82 @@
+From d2c8b15d0cb486f4938ba7f2af349d9d1220cb10 Mon Sep 17 00:00:00 2001
+From: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
+Date: Tue, 5 Jun 2012 20:24:37 +0200
+Subject: iwlwifi: use correct supported firmware for 6035 and 6000g2
+
+From: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
+
+commit d2c8b15d0cb486f4938ba7f2af349d9d1220cb10 upstream.
+
+My patch
+
+   iwlwifi: use correct released ucode version
+
+did not correctly report supported firmware
+for the 6035 device. This patch fixes it. The
+minimum supported firmware version for 6035
+is v6.
+
+Also correct the minimum supported firmware
+version for the 6000g2 series of devices.
+
+Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
+Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/iwlwifi/iwl-6000.c |   23 +++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
+@@ -49,17 +49,20 @@
+ #define IWL6000_UCODE_API_MAX 6
+ #define IWL6050_UCODE_API_MAX 5
+ #define IWL6000G2_UCODE_API_MAX 6
++#define IWL6035_UCODE_API_MAX 6
+ /* Oldest version we won't warn about */
+ #define IWL6000_UCODE_API_OK 4
+ #define IWL6000G2_UCODE_API_OK 5
+ #define IWL6050_UCODE_API_OK 5
+ #define IWL6000G2B_UCODE_API_OK 6
++#define IWL6035_UCODE_API_OK 6
+ /* Lowest firmware API version supported */
+ #define IWL6000_UCODE_API_MIN 4
+ #define IWL6050_UCODE_API_MIN 4
+-#define IWL6000G2_UCODE_API_MIN 4
++#define IWL6000G2_UCODE_API_MIN 5
++#define IWL6035_UCODE_API_MIN 6
+ #define IWL6000_FW_PRE "iwlwifi-6000-"
+ #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode"
+@@ -425,9 +428,25 @@ const struct iwl_cfg iwl6030_2bg_cfg = {
+       IWL_DEVICE_6030,
+ };
++#define IWL_DEVICE_6035                                               \
++      .fw_name_pre = IWL6030_FW_PRE,                          \
++      .ucode_api_max = IWL6035_UCODE_API_MAX,                 \
++      .ucode_api_ok = IWL6035_UCODE_API_OK,                   \
++      .ucode_api_min = IWL6035_UCODE_API_MIN,                 \
++      .max_inst_size = IWL60_RTC_INST_SIZE,                   \
++      .max_data_size = IWL60_RTC_DATA_SIZE,                   \
++      .eeprom_ver = EEPROM_6030_EEPROM_VERSION,               \
++      .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION,       \
++      .lib = &iwl6030_lib,                                    \
++      .base_params = &iwl6000_g2_base_params,                 \
++      .bt_params = &iwl6000_bt_params,                        \
++      .need_temp_offset_calib = true,                         \
++      .led_mode = IWL_LED_RF_STATE,                           \
++      .adv_pm = true
++
+ const struct iwl_cfg iwl6035_2agn_cfg = {
+       .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
+-      IWL_DEVICE_6030,
++      IWL_DEVICE_6035,
+       .ht_params = &iwl6000_ht_params,
+ };
index 805af61873148a38ac67f0e2d3fad817aa30c007..9242cb1eeb306125f0dc8c3521ec7b7693bfe5c1 100644 (file)
@@ -56,3 +56,6 @@ e1000e-disable-aspm-l1-on-82574.patch
 e1000e-remove-special-case-for-82573-82574-aspm-l1-disablement.patch
 ntp-correct-tai-offset-during-leap-second.patch
 iwlwifi-fix-the-transmit-frame-descriptor-rings.patch
+iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch
+iwlwifi-fix-tx-power-antenna-access.patch
+target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch
diff --git a/queue-3.4/target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch b/queue-3.4/target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch
new file mode 100644 (file)
index 0000000..a919af7
--- /dev/null
@@ -0,0 +1,53 @@
+From 59e4f541baf728dbb426949bfa9f6862387ffd0e Mon Sep 17 00:00:00 2001
+From: Roland Dreier <roland@purestorage.com>
+Date: Mon, 4 Jun 2012 23:24:51 -0700
+Subject: target: Return error to initiator if SET TARGET PORT GROUPS emulation fails
+
+From: Roland Dreier <roland@purestorage.com>
+
+commit 59e4f541baf728dbb426949bfa9f6862387ffd0e upstream.
+
+The error paths in target_emulate_set_target_port_groups() are all
+essentially "rc = -EINVAL; goto out;" but the code at "out:" ignores
+rc and always returns success.  This means that even if eg explicit
+ALUA is turned off, the initiator will always see a good SCSI status
+for SET TARGET PORT GROUPS.
+
+Fix this by returning rc as is intended.  It appears this bug was
+added by the following patch:
+
+commit 05d1c7c0d0db4cc25548d9aadebb416888a82327
+Author: Andy Grover <agrover@redhat.com>
+Date:   Wed Jul 20 19:13:28 2011 +0000
+
+    target: Make all control CDBs scatter-gather
+
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+Cc: Andy Grover <agrover@redhat.com>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+[bwh: Backported to 3.2: we have transport_complete_task()
+ and not target_complete_cmd()]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/target/target_core_alua.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/target/target_core_alua.c
++++ b/drivers/target/target_core_alua.c
+@@ -351,9 +351,11 @@ int target_emulate_set_target_port_group
+ out:
+       transport_kunmap_data_sg(cmd);
+-      task->task_scsi_status = GOOD;
+-      transport_complete_task(task, 1);
+-      return 0;
++      if (!rc) {
++              task->task_scsi_status = GOOD;
++              transport_complete_task(task, 1);
++      }
++      return rc;
+ }
+ static inline int core_alua_state_nonoptimized(