All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: rtw88: add missing call to cancel_work_sync()
@ 2023-08-15 14:28 Dmitry Antipov
  2023-08-16  3:12 ` Ping-Ke Shih
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2023-08-15 14:28 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Kalle Valo, linux-wireless, Dmitry Antipov

Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'.

Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/realtek/rtw88/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 4a33d2e47f33..3a63dfc81d06 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1522,6 +1522,7 @@ void rtw_core_stop(struct rtw_dev *rtwdev)
 	mutex_unlock(&rtwdev->mutex);
 
 	cancel_work_sync(&rtwdev->c2h_work);
+	cancel_work_sync(&rtwdev->fw_recovery_work);
 	cancel_work_sync(&rtwdev->update_beacon_work);
 	cancel_delayed_work_sync(&rtwdev->watch_dog_work);
 	cancel_delayed_work_sync(&coex->bt_relink_work);
-- 
2.41.0


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

* RE: [PATCH] wifi: rtw88: add missing call to cancel_work_sync()
  2023-08-15 14:28 [PATCH] wifi: rtw88: add missing call to cancel_work_sync() Dmitry Antipov
@ 2023-08-16  3:12 ` Ping-Ke Shih
  0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2023-08-16  3:12 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: Kalle Valo, linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Dmitry Antipov <dmantipov@yandex.ru>
> Sent: Tuesday, August 15, 2023 10:28 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru>
> Subject: [PATCH] wifi: rtw88: add missing call to cancel_work_sync()
> 
> Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'.
> 
> Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash")
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

rtwdev->fw_recovery_work is used to restart hardware when firmware reports
things get abnormal. The calling flow will be 

fw_ recovery_work() -> ... -> rtw_enter_ips() -> rtw_core_stop() ->
cancel_work_sync(&rtwdev->fw_recovery_work)  /* wait for self to finish */


It would be safe to add this cancel_work_sync(&rtwdev->fw_recovery_work)
in rtw_core_deinit()?

So, NACK. 

Ping-Ke


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

end of thread, other threads:[~2023-08-16  3:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 14:28 [PATCH] wifi: rtw88: add missing call to cancel_work_sync() Dmitry Antipov
2023-08-16  3:12 ` Ping-Ke Shih

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.