From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWoYK-0006yp-4C for ath10k@lists.infradead.org; Thu, 17 Oct 2013 14:27:52 +0000 From: Kalle Valo Subject: Re: [PATCH] ath10k: add error handling to ath10k_pci_wait() References: <20131017083615.31028.25088.stgit@localhost6.localdomain6> Date: Thu, 17 Oct 2013 17:27:22 +0300 In-Reply-To: (Michal Kazior's message of "Thu, 17 Oct 2013 07:24:07 -0700") Message-ID: <87a9i82cs5.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Michal Kazior Cc: linux-wireless , ath10k@lists.infradead.org Michal Kazior writes: > On 17 October 2013 01:36, Kalle Valo wrote: >> ath10k_pci_wait() didn't notify any errors to callers, it >> just printed a warning so add proper error handling. >> >> Signed-off-by: Kalle Valo [...] >> @@ -2227,7 +2231,13 @@ 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_warn("Failed to enable legacy interrupt, target did not wake up: %d\n", >> + ret); >> + free_irq(ar_pci->pdev->irq, ar); >> + return ret; >> + } > > I think we could actually use ath10k_do_pci_wake/sleep() here (see > above iowrite). It does basically the same thing - sets the wake > register and waits until HW wakes up. I think ath10k_pci_wait() could > even go away. That would be nice, I'll take a look. Thanks for the review. -- Kalle Valo _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k