Anyone seeing tx-credits 'hang'?

Michal Kazior michal.kazior at tieto.com
Wed Jan 21 22:11:44 PST 2015


On 21 January 2015 at 16:42, Ben Greear <greearb at candelatech.com> wrote:
> On 01/20/2015 11:22 PM, Michal Kazior wrote:
>> On 20 January 2015 at 05:34, Ben Greear <greearb at candelatech.com> wrote:
[...]
>> Out of curiosity - what irq mode are you using? Shared or MSI? Or did
>> you try both?
>
>
> Probably MSI, but I don't actually know.  Is there an easy way to tell?

When ath10k loads it prints in the kernel log either:

 ath10k_pci 0000:00:00.0: pci irq legacy interrupts 0 irq_mode 0 reset_mode 0
 (shared)
or
 ath10k_pci 0000:00:05.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0
 (MSI)

You can force shared interrupts if you load ath10k_pci with irq_mode=1.


>>> The combination of WMI keep-alive messages sent from host, and
>>> timer to check for timeouts (and do CE polling at higher intervals
>>> when timeout is detected) appears to be enough.  I also check
>>> for the IRQ working again and stop the polling at that time.
>>>
>>> I plan to clean the firmware changes up and commit them to my
>>> own repo...but it will require host changes to enable the keep-alive
>>> to fully work around this problem.  Probably none of this will make
>>> it upstream....
>>
>>
>> We could add a watchdog to WMI which uses the `echo` command and look
>> at echo events and tx credit completion (WMI is notified about that).
>> In case neither comes in in a timely fashion (lets say 1s which is
>> less than WMI command timeout of 3s) we start polling until things
>> settle down. This should work with standard firmware, no?
>
>
> Since it is firmware that has to do the CE polling, then I don't see any
> way to resolve this w/out hacking firmware..and you need a new message to
> send to firmware from host that firmware can be sure is periodic to use
> as it's WMI keep-alive timer.  That is why I made a new message type
> for this (otherwise, cannot really be backwards compat with old kernels that
> do not send regular keep-alives, but *may* send any other valid message type
> for
> whatever reason whenever they want.)

Oh. I totally misunderstood you before. Thanks for claryfing.


Michał



More information about the ath10k mailing list