diff mbox series

[v3] wifi: ath11k: Add crash logging

Message ID 20230713002319.4057612-1-arowa@chromium.org
State New
Headers show
Series [v3] wifi: ath11k: Add crash logging | expand

Commit Message

Arowa Suliman July 13, 2023, 12:22 a.m. UTC
Currently, the ath11k driver does not print a crash signature when a
crash happens. Checked by triggering a simulated crash using the command
[1] and checking dmesg for logs.

[1] echo assert > /sys/kernel/debug/ath11k/../simulate_fw_crash

Change the crash logging from debug to informational and add a warning
when firmware crash MHI_CB_EE_RDDM happens.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23

Signed-off-by: Arowa Suliman <arowa@chromium.org>
---
v3:
1- Fixed the error:
drivers/net/wireless/ath/ath11k/mhi.c:328:25: warning: passing argument 2 of 'ath11k_info' makes pointer from integer without a cast [-Wint-conversion]
2- Removed extra spaces in lines 329 and 338
3- Updated commit message with correct Tested-on flag and the reason of
the change.
---
 drivers/net/wireless/ath/ath11k/mhi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jeff Johnson July 13, 2023, 2:06 a.m. UTC | #1
On 7/12/2023 5:22 PM, Arowa Suliman wrote:
> Currently, the ath11k driver does not print a crash signature when a
> crash happens. Checked by triggering a simulated crash using the command
> [1] and checking dmesg for logs.
> 
> [1] echo assert > /sys/kernel/debug/ath11k/../simulate_fw_crash
> 
> Change the crash logging from debug to informational and add a warning
> when firmware crash MHI_CB_EE_RDDM happens.
> 
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
> 
> Signed-off-by: Arowa Suliman <arowa@chromium.org>
> ---
> v3:
> 1- Fixed the error:
> drivers/net/wireless/ath/ath11k/mhi.c:328:25: warning: passing argument 2 of 'ath11k_info' makes pointer from integer without a cast [-Wint-conversion]
> 2- Removed extra spaces in lines 329 and 338
> 3- Updated commit message with correct Tested-on flag and the reason of
> the change.
> ---
>   drivers/net/wireless/ath/ath11k/mhi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
> index 3ac689f1def4..d9783c2e0529 100644
> --- a/drivers/net/wireless/ath/ath11k/mhi.c
> +++ b/drivers/net/wireless/ath/ath11k/mhi.c
> @@ -325,7 +325,7 @@ static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
>   {
>   	struct ath11k_base *ab = dev_get_drvdata(mhi_cntrl->cntrl_dev);
>   
> -	ath11k_dbg(ab, ATH11K_DBG_BOOT, "notify status reason %s\n",
> +	ath11k_info(ab, "notify status reason %s\n",
>   		   ath11k_mhi_op_callback_to_str(cb));

I would have expected this to line to shift right one space to align on (

>   
>   	switch (cb) {
> @@ -333,6 +333,7 @@ static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
>   		ath11k_warn(ab, "firmware crashed: MHI_CB_SYS_ERROR\n");
>   		break;
>   	case MHI_CB_EE_RDDM:
> +		ath11k_warn(ab, "firmware crashed: MHI_CB_EE_RDDM\n");
>   		if (!(test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)))
>   			queue_work(ab->workqueue_aux, &ab->reset_work);
>   		break;
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/mhi.c b/drivers/net/wireless/ath/ath11k/mhi.c
index 3ac689f1def4..d9783c2e0529 100644
--- a/drivers/net/wireless/ath/ath11k/mhi.c
+++ b/drivers/net/wireless/ath/ath11k/mhi.c
@@ -325,7 +325,7 @@  static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
 {
 	struct ath11k_base *ab = dev_get_drvdata(mhi_cntrl->cntrl_dev);
 
-	ath11k_dbg(ab, ATH11K_DBG_BOOT, "notify status reason %s\n",
+	ath11k_info(ab, "notify status reason %s\n",
 		   ath11k_mhi_op_callback_to_str(cb));
 
 	switch (cb) {
@@ -333,6 +333,7 @@  static void ath11k_mhi_op_status_cb(struct mhi_controller *mhi_cntrl,
 		ath11k_warn(ab, "firmware crashed: MHI_CB_SYS_ERROR\n");
 		break;
 	case MHI_CB_EE_RDDM:
+		ath11k_warn(ab, "firmware crashed: MHI_CB_EE_RDDM\n");
 		if (!(test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)))
 			queue_work(ab->workqueue_aux, &ab->reset_work);
 		break;