ath10k: extra logging for core-restart state change logic.
PATCH 1/1 ath10k: extra logging for core-restart state change logic.
From: Ben Greear <[email protected]>
--- drivers/net/wireless/ath/ath10k/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +4 -2
@@ -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 ; }
Signature · 1 line
1.7.11.7
Quoted 4 lines · [email protected] writes:
From: Ben Greear <[email protected]>
Signed-off-by Ben Greear <[email protected]>---
[...]
Quoted 13 lines
drivers/net/wireless/ath/ath10k/core.c +1
-0@@ -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 ;
drivers/net/wireless/ath/ath10k/core.c static void ath10k_core_restart(struct work_struct *work) · line 723
Quoted 10 lines
drivers/net/wireless/ath/ath10k/core.c +3
-2case 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.
Signature · 1 line
Kalle Valo
Quoted 28 lines · Kalle Valo
Quoted 4 lines · [email protected] writes:
From: Ben Greear <[email protected]>
Signed-off-by Ben Greear <[email protected]>---
[...]
Quoted 19 lines
drivers/net/wireless/ath/ath10k/core.c +2
-2@@ -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",
Quoted 8 lines
drivers/net/wireless/ath/ath10k/core.c static void ath10k_core_restart(struct work_struct *work) · line 723
Quoted 4 lines
drivers/net/wireless/ath/ath10k/core.c +2
-0+ 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_COREor something like that.
I'll respin the patch accordingly when I get a chance.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com