iwlwifi: do not dump stack whet triggering firmware restart
PATCH 1/1 iwlwifi: do not dump stack whet triggering firmware restart
We send REPLY_ERROR command to the device to force microcode error and restart firmware. This is not a problem, so do not dump stack on such situation.
--- drivers/net/wireless/iwlwifi/pcie/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/iwlwifi/pcie/tx.c +2 -1
@@ -1546,7 +1546,8 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,if (test_bit (STATUS_FW_ERROR , &trans_pcie->status)) {IWL_ERR (trans,"FW error in SYNC CMD %s\n" ,get_cmd_string (trans_pcie, cmd->id)); -dump_stack (); +if (cmd->id !=REPLY_ERROR ) +dump_stack (); ret = -EIO ; goto cancel; }
Signature · 1 line
1.8.3.1
Quoted 14 lines · Stanislaw Gruszka
We send
REPLY_ERRORcommand to the device to force microcode error and restart firmware. This is not a problem, so do not dump stack on such situation.Signed-off-by Stanislaw Gruszka <[email protected]>--- drivers/net/wireless/iwlwifi/pcie/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/wireless/iwlwifi/pcie/tx.c +0
-0
drivers/net/wireless/iwlwifi/pcie/tx.c static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, · line 1550
Quoted 6 lines
drivers/net/wireless/iwlwifi/pcie/tx.c +2
-1@@ -1546,7 +1546,8 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,if (test_bit (STATUS_FW_ERROR , &trans_pcie->status)) {IWL_ERR (trans,"FW error in SYNC CMD %s\n" ,get_cmd_string (trans_pcie, cmd->id)); -dump_stack (); +if (cmd->id !=REPLY_ERROR ) +dump_stack ();
Hmm, we changed this code like below, is this still relevant?
Author: Emmanuel Grumbach <[email protected]> Date: Wed Sep 11 14:16:20 2013 +0300
iwlwifi: pcie: restart the driver when a command times out
This should really not happen. If it does, restarting is the only way to recover since the driver and the firmware might very well be out of sync. Moreover, iwl_op_mode_nic_error will print data that might help debugging.
drivers/net/wireless/iwlwifi/pcie/tx.c +3 -1
@@ -1535,7 +1535,6 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,"Error sending %s: time out after %dms.\n" ,get_cmd_string (trans_pcie, cmd->id), jiffies_to_msecs(HOST_COMPLETE_TIMEOUT)); -dump_stack (); IWL_ERR(trans, "Current CMD queue read_ptr %d write_ptr %d\n",
@@ -1546,6 +1545,9 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,"Clearing HCMD_ACTIVE for command %s\n" , get_cmd_string(trans_pcie, cmd->id)); ret = -ETIMEDOUT ; + +iwl_op_mode_nic_error (trans->op_mode); + goto cancel; } }
johannes
Quoted 2 lines · Johannes Berg
On Fri, 2013-09-13 at 10:45 +0200, Stanislaw Gruszka wrote:
Hmm, we changed this code like below, is this still relevant?
Nope, please drop.
Stanislaw