[PATCH] ath10k: add error handling to ath10k_pci_wait()

Kalle Valo kvalo at qca.qualcomm.com
Thu Oct 17 10:27:22 EDT 2013


Michal Kazior <michal.kazior at tieto.com> writes:

> On 17 October 2013 01:36, Kalle Valo <kvalo at qca.qualcomm.com> 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 <kvalo at qca.qualcomm.com>

[...]

>> @@ -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



More information about the ath10k mailing list