* [PATCH] ath10k: Fix hw-restart crash inject mode for WCN3990
@ 2019-01-29 9:26 Rakesh Pillai
2019-02-07 14:51 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Rakesh Pillai @ 2019-01-29 9:26 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Rakesh Pillai
The hw-restart crash inject mode is a special mode, where
there is no crash generated in the firmware, but instead
the driver restarts the firmware. In order to restart WCN3990
firmware, the driver needs to send qmi_wlan_disable message
followed by the qmi_wlan_enable message to the WCN3990 firmware.
Currently the qmi_wlan_disable message is not sent to
the WCN3990 firmware when hw-restart crash is injected,
which causes the firmware to crash when the driver sends
qmi_wlan_enable message during ath10k_restart.
Send qmi_wlan_disable to the WCN3990 firmware when the
hw-restart crash is injected via debugfs.
Tested HW: WCN3990
Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
---
drivers/net/wireless/ath/ath10k/snoc.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 54efe6b..cceb6d4 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1000,7 +1000,16 @@ static int ath10k_snoc_wlan_enable(struct ath10k *ar)
static void ath10k_snoc_wlan_disable(struct ath10k *ar)
{
- if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags))
+ struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
+
+ /* If both ATH10K_FLAG_CRASH_FLUSH and ATH10K_SNOC_FLAG_RECOVERY
+ * flags are not set, it means that the driver has restarted
+ * due to a crash inject via debugfs. In this case, the driver
+ * needs to restart the firmware and hence send qmi wlan disable,
+ * during the driver restart sequence.
+ */
+ if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags) ||
+ !test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags))
ath10k_qmi_wlan_disable(ar);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath10k: Fix hw-restart crash inject mode for WCN3990
2019-01-29 9:26 [PATCH] ath10k: Fix hw-restart crash inject mode for WCN3990 Rakesh Pillai
@ 2019-02-07 14:51 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-02-07 14:51 UTC (permalink / raw)
To: Rakesh Pillai; +Cc: ath10k, linux-wireless, Rakesh Pillai
Rakesh Pillai <pillair@codeaurora.org> wrote:
> The hw-restart crash inject mode is a special mode, where
> there is no crash generated in the firmware, but instead
> the driver restarts the firmware. In order to restart WCN3990
> firmware, the driver needs to send qmi_wlan_disable message
> followed by the qmi_wlan_enable message to the WCN3990 firmware.
>
> Currently the qmi_wlan_disable message is not sent to
> the WCN3990 firmware when hw-restart crash is injected,
> which causes the firmware to crash when the driver sends
> qmi_wlan_enable message during ath10k_restart.
>
> Send qmi_wlan_disable to the WCN3990 firmware when the
> hw-restart crash is injected via debugfs.
>
> Tested HW: WCN3990
> Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1
>
> Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
cdb78e5af491 ath10k: fix hw-restart crash inject mode for WCN3990
--
https://patchwork.kernel.org/patch/10785855/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-07 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 9:26 [PATCH] ath10k: Fix hw-restart crash inject mode for WCN3990 Rakesh Pillai
2019-02-07 14:51 ` Kalle Valo
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).