* Re: [PATCH] iwlwifi: do not dump stack whet triggering firmware restart
2013-09-13 8:45 [PATCH] iwlwifi: do not dump stack whet triggering firmware restart Stanislaw Gruszka
@ 2013-09-13 9:15 ` Johannes Berg
2013-09-13 9:31 ` Stanislaw Gruszka
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2013-09-13 9:15 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: ilw, linux-wireless, emmanuel.grumbach
On Fri, 2013-09-13 at 10:45 +0200, Stanislaw Gruszka wrote:
> 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.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
> drivers/net/wireless/iwlwifi/pcie/tx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
> index f45eb29..ec49033 100644
> --- a/drivers/net/wireless/iwlwifi/pcie/tx.c
> +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
> @@ -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 <emmanuel.grumbach@intel.com>
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.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index d92baa7..32f179f 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread