Michal Kazior <michal.kaz...@tieto.com> writes:

> Sometimes the device just won't reset cleanly
> without retrying. This seems to depend on the host
> hardware.
>
> Signed-off-by: Michal Kazior <michal.kaz...@tieto.com>
> ---
>
> I can't reproduce the issue on my hw. Can someone
> confirm if this fixes the problem?

If you are referencing to the crash I reported to you privately, I have
seen that problem only once and haven't been able to reproduce since. So
I can't really test this patch.

> @@ -1931,7 +1935,12 @@ static int ath10k_pci_start_intr_legacy(struct ath10k 
> *ar)
>                 ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS +
>                 PCIE_SOC_WAKE_ADDRESS);
>  
> -     ath10k_pci_wait(ar);
> +     ret = ath10k_pci_wait(ar);
> +     if (ret) {
> +             ath10k_err("target did not wake up\n");
> +             free_irq(ar_pci->pdev->irq, ar);
> +             return ret;
> +     }
>  
>       /*
>        * A potential race occurs here: The CORE_BASE write
> @@ -2019,13 +2028,18 @@ static int ath10k_pci_reset_target(struct ath10k *ar)
>  {
>       struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
>       int wait_limit = 300; /* 3 sec */
> +     int ret = 0;
>  
>       /* Wait for Target to finish initialization before we proceed. */
>       iowrite32(PCIE_SOC_WAKE_V_MASK,
>                 ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS +
>                 PCIE_SOC_WAKE_ADDRESS);
>  
> -     ath10k_pci_wait(ar);
> +     ret = ath10k_pci_wait(ar);
> +     if (ret) {
> +             ath10k_warn("target did not wake up\n");
> +             goto exit;

You have same warnings messages in different places now. I recommend
adding "..for start" and "...for reset", or something like that, to
exactly identify the warning location. Example:

ath10k_warn("target did not wake up for reset\n");

-- 
Kalle Valo
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to