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

From: Baochen Qiang

Date: Thu Nov 26 2026 - 03:16:36 EST




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.

> +
> /* 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) {
>