From: Kalle Valo <kvalo@kernel.org>
To: Wen Gong <quic_wgong@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v8 1/4] ath11k: add support for device recovery for QCA6390/WCN6855
Date: Mon, 21 Mar 2022 13:16:29 +0200 [thread overview]
Message-ID: <87pmmfmu7m.fsf@kernel.org> (raw)
In-Reply-To: <20220228064606.8981-2-quic_wgong@quicinc.com> (Wen Gong's message of "Mon, 28 Feb 2022 01:46:03 -0500")
Wen Gong <quic_wgong@quicinc.com> writes:
> Currently ath11k has device recovery logic, it is introduced by this
> patch "ath11k: Add support for subsystem recovery" which is upstream
> by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
>
> The patch is for AHB devices such as IPQ8074, it has remote proc module
> which is used to download the firmware and boots the processor which
> firmware is running on. If firmware crashed, remote proc module will
> detect it and download and boot firmware again. Below command will
> trigger a firmware crash, and then user can test feature of device
> recovery.
>
> Test command:
> echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
> echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
>
> Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
> module, it use mhi module to communicate between firmware and ath11k.
> So ath11k does not support device recovery for QCA6390 currently.
>
> This patch is to add the extra logic which is different for QCA6390.
> When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
> firmware and then ath11k_mhi_op_status_cb which is the callback of
> mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
> will start to do recovery process, ath11k_core_reset() calls
> ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
> will start to download and boot firmware. There are some logic to
> avoid deadloop recovery and two simultaneous recovery operations.
> And because it has muti-radios for the soc, so it add some logic
> in ath11k_mac_op_reconfig_complete() to make sure all radios has
> reconfig complete and then complete the device recovery.
>
> Also it add workqueue_aux, because ab->workqueue is used when receive
> ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
> &ab->restart_work)), and ath11k_core_reset will wait for max
> ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
> ath11k_core_reset also queued in ab->workqueue, then it will delay
> restart_work of previous recovery and lead previous recovery fail.
>
> ath11k recovery success for QCA6390/WCN6855 after apply this patch.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
>
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
[...]
> void ath11k_core_free(struct ath11k_base *ab)
> {
> + flush_workqueue(ab->workqueue_aux);
> + destroy_workqueue(ab->workqueue_aux);
> +
> flush_workqueue(ab->workqueue);
> destroy_workqueue(ab->workqueue);
This had a conflict and in the pending branch I removed
flush_workqueue(ab->workqueue_aux). Flush is not needed before destroy.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: Wen Gong <quic_wgong@quicinc.com>
Cc: <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v8 1/4] ath11k: add support for device recovery for QCA6390/WCN6855
Date: Mon, 21 Mar 2022 13:16:29 +0200 [thread overview]
Message-ID: <87pmmfmu7m.fsf@kernel.org> (raw)
In-Reply-To: <20220228064606.8981-2-quic_wgong@quicinc.com> (Wen Gong's message of "Mon, 28 Feb 2022 01:46:03 -0500")
Wen Gong <quic_wgong@quicinc.com> writes:
> Currently ath11k has device recovery logic, it is introduced by this
> patch "ath11k: Add support for subsystem recovery" which is upstream
> by https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath11k-bringup&id=3a7b4838b6f6f234239f263ef3dc02e612a083ad.
>
> The patch is for AHB devices such as IPQ8074, it has remote proc module
> which is used to download the firmware and boots the processor which
> firmware is running on. If firmware crashed, remote proc module will
> detect it and download and boot firmware again. Below command will
> trigger a firmware crash, and then user can test feature of device
> recovery.
>
> Test command:
> echo assert > /sys/kernel/debug/ath11k/qca6390\ hw2.0/simulate_fw_crash
> echo assert > /sys/kernel/debug/ath11k/wcn6855\ hw2.0/simulate_fw_crash
>
> Unfortunately, QCA6390 is PCIe bus, it does not have the remote proc
> module, it use mhi module to communicate between firmware and ath11k.
> So ath11k does not support device recovery for QCA6390 currently.
>
> This patch is to add the extra logic which is different for QCA6390.
> When firmware crashed, MHI_CB_EE_RDDM event will be indicate by
> firmware and then ath11k_mhi_op_status_cb which is the callback of
> mhi_controller will receive the MHI_CB_EE_RDDM event, then ath11k
> will start to do recovery process, ath11k_core_reset() calls
> ath11k_hif_power_down()/ath11k_hif_power_up(), then the mhi/ath11k
> will start to download and boot firmware. There are some logic to
> avoid deadloop recovery and two simultaneous recovery operations.
> And because it has muti-radios for the soc, so it add some logic
> in ath11k_mac_op_reconfig_complete() to make sure all radios has
> reconfig complete and then complete the device recovery.
>
> Also it add workqueue_aux, because ab->workqueue is used when receive
> ATH11K_QMI_EVENT_FW_READY in recovery process(queue_work(ab->workqueue,
> &ab->restart_work)), and ath11k_core_reset will wait for max
> ATH11K_RESET_TIMEOUT_HZ for the previous restart_work finished, if
> ath11k_core_reset also queued in ab->workqueue, then it will delay
> restart_work of previous recovery and lead previous recovery fail.
>
> ath11k recovery success for QCA6390/WCN6855 after apply this patch.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2
>
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
[...]
> void ath11k_core_free(struct ath11k_base *ab)
> {
> + flush_workqueue(ab->workqueue_aux);
> + destroy_workqueue(ab->workqueue_aux);
> +
> flush_workqueue(ab->workqueue);
> destroy_workqueue(ab->workqueue);
This had a conflict and in the pending branch I removed
flush_workqueue(ab->workqueue_aux). Flush is not needed before destroy.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2022-03-21 11:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 6:46 [PATCH v8 0/4] ath11k: add feature for device recovery Wen Gong
2022-02-28 6:46 ` Wen Gong
2022-02-28 6:46 ` [PATCH v8 1/4] ath11k: add support for device recovery for QCA6390/WCN6855 Wen Gong
2022-02-28 6:46 ` Wen Gong
2022-03-21 11:16 ` Kalle Valo [this message]
2022-03-21 11:16 ` Kalle Valo
2022-03-23 9:02 ` Kalle Valo
2022-03-23 9:02 ` Kalle Valo
2022-02-28 6:46 ` [PATCH v8 2/4] ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base Wen Gong
2022-02-28 6:46 ` Wen Gong
2022-02-28 6:46 ` [PATCH v8 3/4] ath11k: Add hw-restart option to simulate_fw_crash Wen Gong
2022-02-28 6:46 ` Wen Gong
2022-02-28 6:46 ` [PATCH v8 4/4] ath11k: fix the warning of dev_wake in mhi_pm_disable_transition() Wen Gong
2022-02-28 6:46 ` Wen Gong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmmfmu7m.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_wgong@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.