Re: [RFC PATCH 2/3] wifi: ath11k: make external IRQ control idempotent

Mark Ruvald <[email protected]>
Newsgroups org.kernel.vger.linux-wireless,org.infradead.lists.ath11k
Message-ID <CABmnzGrncCNgsjKHyScF_PzCWdBeezBb=utBc36cYhbzL-WyQw@mail.gmail.com>
> can you elaborate the scenario where the repeated lifecycle disable
> happen for better understand ?

Hey Karthikeyan, the scenario is a failed reset retry:

ath11k_core_reset()
  disable IRQ/NAPI                 depth 0 -> 1
  power-cycle
  recovery does not complete
    another reset_work is queued
      reset_count > 1
        wait_for(reset_complete) times out
          disable IRQ/NAPI again   depth 1 -> 2

later recovery succeeds
  enable IRQ/NAPI                  depth 2 -> 1

NAPI is then enabled, but the IRQ remains masked. The patch makes the second
lifecycle disable a no-op - ie idempotent.

This is an error/retry path, mainly the PCI/MHI reset path.

I haven't reproduced that exact sequence on hardware, but it was under
suspicion during testing, reloading of modules and kexec etc.
So this patch is more of a belt-and-suspenders kind of thing.
Idempotency helps me sleep at night.

regards Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.