From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Thu, 9 May 2013 09:57:22 +0300 Subject: [ath9k-devel] [RFT] ath10k: retry target reset In-Reply-To: <1367826431-643-1-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 6 May 2013 09:47:11 +0200") References: <87wqrhcqxq.fsf@kamboji.qca.qualcomm.com> <1367826431-643-1-git-send-email-michal.kazior@tieto.com> Message-ID: <87sj1wy71p.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Michal Kazior writes: > Sometimes the device just won't reset cleanly > without retrying. This seems to depend on the host > hardware. > > Signed-off-by: Michal Kazior > --- > > 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