diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-10-25 17:08:27 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-05 10:12:25 -0500 |
commit | adca1235cccacee91beb640a044e51b1c457b1ea (patch) | |
tree | 948ae97e253d7c13a8bd337da29d65333b7b4d25 /drivers/net/wireless/iwlwifi/pcie/trans.c | |
parent | e2b1930e6fd9aaa72cc44519b257ae71a1c2e29f (diff) |
iwlwifi: check the SCD conf from ALIVE response
The ALIVE response of new fw inclues the base address of
the SCD in SRAM. Until we read it from a prph register,
which was set by the fw. Since the fw might well stop
updating the prph register, add a WARN when there is an
inconsitency between the ALIVE response and the register
to catch any change in the behavior.
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 288d2297f77d..0703da892e59 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -1079,7 +1079,7 @@ static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask) | |||
1079 | iwl_write_prph(trans, SCD_TXFACT, mask); | 1079 | iwl_write_prph(trans, SCD_TXFACT, mask); |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | static void iwl_tx_start(struct iwl_trans *trans) | 1082 | static void iwl_tx_start(struct iwl_trans *trans, u32 scd_base_addr) |
1083 | { | 1083 | { |
1084 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1084 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1085 | u32 a; | 1085 | u32 a; |
@@ -1092,6 +1092,10 @@ static void iwl_tx_start(struct iwl_trans *trans) | |||
1092 | 1092 | ||
1093 | trans_pcie->scd_base_addr = | 1093 | trans_pcie->scd_base_addr = |
1094 | iwl_read_prph(trans, SCD_SRAM_BASE_ADDR); | 1094 | iwl_read_prph(trans, SCD_SRAM_BASE_ADDR); |
1095 | |||
1096 | WARN_ON(scd_base_addr != 0 && | ||
1097 | scd_base_addr != trans_pcie->scd_base_addr); | ||
1098 | |||
1095 | a = trans_pcie->scd_base_addr + SCD_CONTEXT_MEM_LOWER_BOUND; | 1099 | a = trans_pcie->scd_base_addr + SCD_CONTEXT_MEM_LOWER_BOUND; |
1096 | /* reset conext data memory */ | 1100 | /* reset conext data memory */ |
1097 | for (; a < trans_pcie->scd_base_addr + SCD_CONTEXT_MEM_UPPER_BOUND; | 1101 | for (; a < trans_pcie->scd_base_addr + SCD_CONTEXT_MEM_UPPER_BOUND; |
@@ -1137,10 +1141,10 @@ static void iwl_tx_start(struct iwl_trans *trans) | |||
1137 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); | 1141 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); |
1138 | } | 1142 | } |
1139 | 1143 | ||
1140 | static void iwl_trans_pcie_fw_alive(struct iwl_trans *trans) | 1144 | static void iwl_trans_pcie_fw_alive(struct iwl_trans *trans, u32 scd_addr) |
1141 | { | 1145 | { |
1142 | iwl_reset_ict(trans); | 1146 | iwl_reset_ict(trans); |
1143 | iwl_tx_start(trans); | 1147 | iwl_tx_start(trans, scd_addr); |
1144 | } | 1148 | } |
1145 | 1149 | ||
1146 | /** | 1150 | /** |