From: Greg Kroah-Hartman Date: Wed, 20 Jun 2012 17:04:39 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.36~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62c68233441d01fa48b475685a0f0c3adda63515;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches 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 --- 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 index 00000000000..635e6e0d56d --- /dev/null +++ b/queue-3.4/iwlwifi-fix-tx-power-antenna-access.patch @@ -0,0 +1,74 @@ +From a5fdde28b4f5fb756032e7ad2c6fcdcffde20958 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Wed, 30 May 2012 10:36:12 +0200 +Subject: iwlwifi: fix TX power antenna access + +From: Johannes Berg + +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 +Signed-off-by: Johannes Berg +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + + +--- + 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 index 00000000000..d30544dfdae --- /dev/null +++ b/queue-3.4/iwlwifi-use-correct-supported-firmware-for-6035-and-6000g2.patch @@ -0,0 +1,82 @@ +From d2c8b15d0cb486f4938ba7f2af349d9d1220cb10 Mon Sep 17 00:00:00 2001 +From: Meenakshi Venkataraman +Date: Tue, 5 Jun 2012 20:24:37 +0200 +Subject: iwlwifi: use correct supported firmware for 6035 and 6000g2 + +From: Meenakshi Venkataraman + +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 +Reviewed-by: Emmanuel Grumbach +Signed-off-by: Johannes Berg +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + 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, + }; + diff --git a/queue-3.4/series b/queue-3.4/series index 805af618731..9242cb1eeb3 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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 index 00000000000..a919af793a0 --- /dev/null +++ b/queue-3.4/target-return-error-to-initiator-if-set-target-port-groups-emulation-fails.patch @@ -0,0 +1,53 @@ +From 59e4f541baf728dbb426949bfa9f6862387ffd0e Mon Sep 17 00:00:00 2001 +From: Roland Dreier +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 + +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 +Date: Wed Jul 20 19:13:28 2011 +0000 + + target: Make all control CDBs scatter-gather + +Signed-off-by: Roland Dreier +Cc: Andy Grover +Signed-off-by: Nicholas Bellinger +[bwh: Backported to 3.2: we have transport_complete_task() + and not target_complete_cmd()] +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + 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(