On 2020-01-01 19:10, Justin Capella wrote:
Instead of the atomic restart count, can the state be updated to
ATH10K_STATE_RESTARTING while holding
mutex_unlock(&ar->conf_mutex);
the recovery process is begin with ath10k_core_restart, and end with
ath10k_reconfig_complete.
I already see it has mutex_lock(&ar->conf_mutex) and
mutex_unlock(&ar->conf_mutex) in ath10k_core_restart,
but it is not enough, for example:
1st recovery has finished ath10k_core_restart, but not arrive
ath10k_reconfig_complete, then the 2nd recovery
begin to enter ath10k_core_restart, it will destroy the 1st recovery and
let 1st recovery fail.
After apply this patch, after recovery about 18000+ times, and still can
connect/scan/ping success.
I don't understand the bundles, but I wonder about the case when there
are multiple packets (n_rx_pkts) and if pkt_bundle_len might be the
one to check. Also if there needs to be a check that the len > sizeof
HTC HDR.
the htc_hdr->len is len of payload, so it allow < sizeof HTC HDR, but
not allow > ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH.
pkt_bundle is only used when it has many packet in rx side, otherwise it
is not bundled in rx.
patch v3:
https://patchwork.kernel.org/patch/11313853/
https://patchwork.kernel.org/patch/11313859/
On Tue, Dec 31, 2019 at 1:37 AM <wgong@xxxxxxxxxxxxxx> wrote:
On 2019-12-25 23:14, Justin Capella wrote:
> This does not only effect SDIO.
>
> Why a semaphore / count? Could the conf_mutex be held earlier, or
> perhaps change the state to ATH10K_STATE_RESTARTING first?
> ath10k_reconfig_complete is also called in mac.c when channel is
> changed so
patch v2:
https://patchwork.kernel.org/patch/11313853/
https://patchwork.kernel.org/patch/11313859/