Search Linux Wireless

Re: [PATCH] iwlwifi: do not dump stack whet triggering firmware restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxx>
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@xxxxxxxxx>
    Reviewed-by: Johannes Berg <johannes.berg@xxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux