diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-01-15 03:01:29 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-03 15:23:35 -0500 |
commit | fc1471f0613b8a31e6905d12e18aab0433375de8 (patch) | |
tree | 917caf9394119bc1420e2a34a144ab3145913711 /drivers/net/wireless/iwlwifi/mvm/utils.c | |
parent | f6415f6bcf8f977b3708672e979f22450c1f5d66 (diff) |
iwlwifi: mvm: change the format of the SRAM dump
As a debug tool, we dump the SRAM from the device when an
error occurs. The main users of this want it in a different
format, so change the format to suit their needs.
Also - add a short delay between the prints to make sure
that the user space logger can catch up.
This happens only when the firmware asserts, and only when
fw_restart is set to 0 which is typically a testing
configuration.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/utils.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c index 1aadede26919..b2162328ac96 100644 --- a/drivers/net/wireless/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/iwlwifi/mvm/utils.c | |||
@@ -457,7 +457,8 @@ void iwl_mvm_dump_sram(struct iwl_mvm *mvm) | |||
457 | { | 457 | { |
458 | const struct fw_img *img; | 458 | const struct fw_img *img; |
459 | int ofs, len = 0; | 459 | int ofs, len = 0; |
460 | u8 *buf; | 460 | int i; |
461 | __le32 *buf; | ||
461 | 462 | ||
462 | if (!mvm->ucode_loaded) | 463 | if (!mvm->ucode_loaded) |
463 | return; | 464 | return; |
@@ -471,7 +472,12 @@ void iwl_mvm_dump_sram(struct iwl_mvm *mvm) | |||
471 | return; | 472 | return; |
472 | 473 | ||
473 | iwl_trans_read_mem_bytes(mvm->trans, ofs, buf, len); | 474 | iwl_trans_read_mem_bytes(mvm->trans, ofs, buf, len); |
474 | iwl_print_hex_error(mvm->trans, buf, len); | 475 | len = len >> 2; |
476 | for (i = 0; i < len; i++) { | ||
477 | IWL_ERR(mvm, "0x%08X\n", le32_to_cpu(buf[i])); | ||
478 | /* Add a small delay to let syslog catch up */ | ||
479 | udelay(10); | ||
480 | } | ||
475 | 481 | ||
476 | kfree(buf); | 482 | kfree(buf); |
477 | } | 483 | } |