linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: Remove ATH10K_STATE_RESTARTED in simulate fw crash
@ 2018-11-14  2:50 Wen Gong
  2018-11-14  7:48 ` Michał Kazior
  0 siblings, 1 reply; 14+ messages in thread
From: Wen Gong @ 2018-11-14  2:50 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

When test simulate firmware crash, it is easy to trigger error.
command:
echo soft > /sys/kernel/debug/ieee80211/phyxx/ath10k/simulate_fw_crash.

If input more than two times continuously, then it will have error.
Error message:
ath10k_pci 0000:02:00.0: failed to set vdev 1 RX wake policy: -108
ath10k_pci 0000:02:00.0: device is wedged, will not restart

It is because the state has not changed to ATH10K_STATE_ON immediately,
then it will have more than two simulate crash process running meanwhile,
and complete/wakeup some field twice, it destroy the normal recovery
process.

Tested with QCA6174 PCI with firmware
WLAN.RM.4.4.1-00109-QCARMSWPZ-1, but this will also affect QCA9377 PCI.
It's not a regression with new firmware releases.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/debug.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index ada29a4..dc8700b 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -569,8 +569,7 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
 
 	mutex_lock(&ar->conf_mutex);
 
-	if (ar->state != ATH10K_STATE_ON &&
-	    ar->state != ATH10K_STATE_RESTARTED) {
+	if (ar->state != ATH10K_STATE_ON) {
 		ret = -ENETDOWN;
 		goto exit;
 	}
-- 
1.9.1


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

end of thread, other threads:[~2019-05-28  2:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14  2:50 [PATCH] ath10k: Remove ATH10K_STATE_RESTARTED in simulate fw crash Wen Gong
2018-11-14  7:48 ` Michał Kazior
2019-01-07  7:16   ` Wen Gong
2019-01-07  8:35     ` Michał Kazior
2019-01-08  8:45       ` Wen Gong
2019-02-08 13:32         ` Kalle Valo
2019-02-08 13:34           ` Kalle Valo
2019-04-01  6:11       ` Wen Gong
2019-04-08 10:19         ` Wen Gong
2019-04-08 17:27           ` Michał Kazior
2019-04-09  5:09             ` Wen Gong
2019-04-09 23:25               ` Brian Norris
2019-04-10  2:45                 ` Wen Gong
2019-05-28  2:49                   ` Wen Gong

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).