Skip to content

Commit

Permalink
CHROMIUM: iwl7000: sdio: avoid read/write operations if the bus is dead
Browse files Browse the repository at this point in the history
Recovery takes too much time if the bus is dead (each timeout
is 2000ms, etc.).
try avoiding it by setting a flag when the bus is dead, and avoid
any bus access until recovery.

There still might be significant delays caused by implicit
mmc access (e.g. sdio_disable_func()), but at least avoid
the direct read/write operations.

Additionally, explicitly skip fw dump in this case, as it will
result in garbage data (and might take signifcant time)
--
TODO: are there valid failures?

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
iwl7000-tree: b5e41377e07fe71bbb562ffb36057ffd93adacd8
  • Loading branch information
Eliad Peller authored and Anatol Pomazau committed Oct 23, 2015
1 parent 7d50826 commit 6041c6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/iwl7000/iwlwifi/iwl-trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ enum iwl_d3_status {
* are sent
* @STATUS_TRANS_IDLE: the trans is idle - general commands are not to be sent
* @STATUS_TA_ACTIVE: target access is in progress
* @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
*/
enum iwl_trans_status {
STATUS_SYNC_HCMD_ACTIVE,
Expand All @@ -423,6 +424,7 @@ enum iwl_trans_status {
STATUS_TRANS_GOING_IDLE,
STATUS_TRANS_IDLE,
STATUS_TA_ACTIVE,
STATUS_TRANS_DEAD,
};

/**
Expand Down
6 changes: 6 additions & 0 deletions drivers/net/wireless/iwl7000/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,12 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm)

lockdep_assert_held(&mvm->mutex);

/* there's no point in fw dump if the bus is dead */
if (test_bit(STATUS_TRANS_DEAD, &mvm->trans->status)) {
IWL_ERR(mvm, "Skip fw error dump since bus is dead\n");
return;
}

fw_error_dump = kzalloc(sizeof(*fw_error_dump), GFP_KERNEL);
if (!fw_error_dump)
return;
Expand Down

0 comments on commit 6041c6e

Please sign in to comment.