linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: extra logging for core-restart state change logic.
@ 2014-08-05 20:54 greearb
  2014-08-15 12:04 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: greearb @ 2014-08-05 20:54 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath10k, Ben Greear

From: Ben Greear <greearb@candelatech.com>

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 030bef1..d522d3a 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -700,6 +700,7 @@ static void ath10k_core_restart(struct work_struct *work)
 	switch (ar->state) {
 	case ATH10K_STATE_ON:
 		ar->state = ATH10K_STATE_RESTARTING;
+		ath10k_warn("core-restart, going to state RESTARTING from ON\n");
 		del_timer_sync(&ar->scan.timeout);
 		ath10k_reset_scan((unsigned long)ar);
 		ieee80211_restart_hw(ar->hw);
@@ -713,10 +714,11 @@ static void ath10k_core_restart(struct work_struct *work)
 		/* hw restart might be requested from multiple places */
 		break;
 	case ATH10K_STATE_RESTARTED:
-		ar->state = ATH10K_STATE_WEDGED;
 		/* fall through */
 	case ATH10K_STATE_WEDGED:
-		ath10k_warn("device is wedged, will not restart\n");
+		ath10k_warn("device is wedged, will not restart (state %d)\n",
+			ar->state);
+		ar->state = ATH10K_STATE_WEDGED;
 		break;
 	}
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: extra logging for core-restart state change logic.
  2014-08-05 20:54 [PATCH] ath10k: extra logging for core-restart state change logic greearb
@ 2014-08-15 12:04 ` Kalle Valo
  2014-08-15 14:05   ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2014-08-15 12:04 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless, ath10k

greearb@candelatech.com writes:

> From: Ben Greear <greearb@candelatech.com>
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---

[...]

> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -700,6 +700,7 @@ static void ath10k_core_restart(struct work_struct *work)
>  	switch (ar->state) {
>  	case ATH10K_STATE_ON:
>  		ar->state = ATH10K_STATE_RESTARTING;
> +		ath10k_warn("core-restart, going to state RESTARTING from ON\n");
>  		del_timer_sync(&ar->scan.timeout);
>  		ath10k_reset_scan((unsigned long)ar);
>  		ieee80211_restart_hw(ar->hw);
> @@ -713,10 +714,11 @@ static void ath10k_core_restart(struct work_struct *work)
>  		/* hw restart might be requested from multiple places */
>  		break;
>  	case ATH10K_STATE_RESTARTED:
> -		ar->state = ATH10K_STATE_WEDGED;
>  		/* fall through */
>  	case ATH10K_STATE_WEDGED:
> -		ath10k_warn("device is wedged, will not restart\n");
> +		ath10k_warn("device is wedged, will not restart (state %d)\n",
> +			ar->state);
> +		ar->state = ATH10K_STATE_WEDGED;
>  		break;
>  	}

I think state prints should be debug messages, not part of error
messages. For example, we could add new debug level ATH10K_DBG_CORE or
something like that.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath10k: extra logging for core-restart state change logic.
  2014-08-15 12:04 ` Kalle Valo
@ 2014-08-15 14:05   ` Ben Greear
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2014-08-15 14:05 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k



On 08/15/2014 05:04 AM, Kalle Valo wrote:
> greearb@candelatech.com writes:
>
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>
> [...]
>
>> --- a/drivers/net/wireless/ath/ath10k/core.c
>> +++ b/drivers/net/wireless/ath/ath10k/core.c
>> @@ -700,6 +700,7 @@ static void ath10k_core_restart(struct work_struct *work)
>>   	switch (ar->state) {
>>   	case ATH10K_STATE_ON:
>>   		ar->state = ATH10K_STATE_RESTARTING;
>> +		ath10k_warn("core-restart, going to state RESTARTING from ON\n");
>>   		del_timer_sync(&ar->scan.timeout);
>>   		ath10k_reset_scan((unsigned long)ar);
>>   		ieee80211_restart_hw(ar->hw);
>> @@ -713,10 +714,11 @@ static void ath10k_core_restart(struct work_struct *work)
>>   		/* hw restart might be requested from multiple places */
>>   		break;
>>   	case ATH10K_STATE_RESTARTED:
>> -		ar->state = ATH10K_STATE_WEDGED;
>>   		/* fall through */
>>   	case ATH10K_STATE_WEDGED:
>> -		ath10k_warn("device is wedged, will not restart\n");
>> +		ath10k_warn("device is wedged, will not restart (state %d)\n",
>> +			ar->state);
>> +		ar->state = ATH10K_STATE_WEDGED;
>>   		break;
>>   	}
>
> I think state prints should be debug messages, not part of error
> messages. For example, we could add new debug level ATH10K_DBG_CORE or
> something like that.

I'll respin the patch accordingly when I get a chance.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-15 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 20:54 [PATCH] ath10k: extra logging for core-restart state change logic greearb
2014-08-15 12:04 ` Kalle Valo
2014-08-15 14:05   ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).