On 2020-09-07 23:55, Kalle Valo wrote:
Wen Gong <wg...@codeaurora.org> writes:

On 2020-08-15 01:19, Kalle Valo wrote:
...

I have been thinking a different approach for this. I think another
option is to have a function like this:

ath10k_core_firmware_crashed()
{
        queue_work(ar->workqueue, &ar->restart_work);
}

In patch 1 we would convert all existing callers to call that
function instead of queue_work() directly.

In patch 2 we would add a new flag to enum ath10k_dev_flags, or maybe
should actually use existing ATH10K_FLAG_CRASH_FLUSH? Don't know yet
which one is better. Now the function would do:

I thinks we can use test_and_set_bit for atomic operation athough it
is same with restart_count.

I didn't quite understand what you mean here, but using
test_and_set_bit() is the correct methdo.

and add a new flag, ATH10K_FLAG_CRASH_FLUSH is used for flush, if
still use ATH10K_FLAG_CRASH_FLUSH, it should change clear_bit of it
from ath10k_core_start to ath10k_reconfig_complete,because
ieee80211_reconfig(called by ieee80211_restart_work) of mac80211 do
many things and drv_start is 1st thing and drv_reconfig_complete is
last thing, drv_reconfig_complete done means the restart finished.

Ok, let's discuss about that in v5. I hope you added the analysis to the
commit log.
yes, v5 have alread sent in https://patchwork.kernel.org/patch/11728101/
[v5] ath10k: add atomic protection for device recovery

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to