Re: [PATCH ath-next v4 01/10] wifi: ath10k: fix SDIO aux workqueue starvation in recovery detection

From: Kang Yang

Date: Thu Nov 26 2026 - 22:24:01 EST




On 11/27/2026 12:01 AM, Loic Poulain wrote:
On Thu, Nov 26, 2026 at 9:16 AM Baochen Qiang
<baochen.qiang@xxxxxxxxxxxxxxxx> wrote:



On 11/20/2026 4:41 PM, Kang Yang wrote:

@@ -8170,9 +8177,13 @@ static void ath10k_reconfig_complete(struct ieee80211_hw *hw,
ar->state = ATH10K_STATE_ON;
ieee80211_wake_queues(ar->hw);

+ /* Cancel the deadline monitor first so it cannot declare the
+ * device wedged after recovery has completed.
+ */
+ cancel_delayed_work_sync(&ar->recovery_check_work);

If recovery monitor runs between "state = ON" and the cancel. It then wedges a device that
has just recovered. The sync cancel only waits for it to finish, after which
pending_recovery is cleared while the state stays WEDGED.

would be better to move cancel_delayed_work_sync() and the pending_recovery reset in front
of the `ar->state == ATH10K_STATE_RESTARTED` check? Then either the monitor has already
run and the check fails, or it is cancelled and can no longer race with the transition to ON.

Alternatively, disable_delayed_work_sync() could be used, but it needs
to be balanced.

I need to use a fix that can porting to v5.10 kernel. disable_delayed_work_sync() is introduce after v6 kernel.





+
/* Clear recovery state. */
complete(&ar->driver_recovery);
- atomic_set(&ar->fail_cont_count, 0);
atomic_set(&ar->pending_recovery, 0);

if (ar->hw_params.hw_restart_disconnect) {