2019-09-10 13:58:42

by Ben Greear

[permalink] [raw]
Subject: Re: [PATCH] ath10k: Free beacon buf later in vdev teardown.



On 09/10/2019 06:12 AM, Kalle Valo wrote:
> [email protected] wrote:
>
>> My wave-1 firmware often crashes when I am bringing down
>> AP vdevs, and sometimes at least some machines lockup hard
>> after spewing IOMMU errors.
>>
>> I don't see the same issue in STA mode, so I suspect beacons
>> are the issue.
>>
>> Moving the beacon buf deletion to later in the vdev teardown
>> logic appears to help this problem. Firmware still crashes
>> often, but several iterations did not show IOMMU errors and
>> machine didn't hang.
>
> I'm not really fond of fixing issues just by luck but after a quick look at the
> code I can't see any harm in this change either. So I guess it's ok.
>
> But can you provide the exact hardware and firmware you used for testing, I'll
> add it to the commit log. I want to document that in every commit:

I used Compex WLE900VX hardware, and the firmware was ath10k-ct something or other,
it has been a long time, so I don't recall the exact firmware version.

The real fix for this is to have the firmware do proper beacon tx completion
logic so that the driver can know when it can safely free buffers. I implemented
this in my ath10k-ct firmware/driver, but unless you want to start accepting patches for my
firmware, then that will not help upstream ath10k.

Thanks,
Ben

--
Ben Greear <[email protected]>
Candela Technologies Inc http://www.candelatech.com


2019-09-12 12:48:39

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath10k: Free beacon buf later in vdev teardown.

Ben Greear <[email protected]> writes:

> On 09/10/2019 06:12 AM, Kalle Valo wrote:
>> [email protected] wrote:
>>
>>> My wave-1 firmware often crashes when I am bringing down
>>> AP vdevs, and sometimes at least some machines lockup hard
>>> after spewing IOMMU errors.
>>>
>>> I don't see the same issue in STA mode, so I suspect beacons
>>> are the issue.
>>>
>>> Moving the beacon buf deletion to later in the vdev teardown
>>> logic appears to help this problem. Firmware still crashes
>>> often, but several iterations did not show IOMMU errors and
>>> machine didn't hang.
>>
>> I'm not really fond of fixing issues just by luck but after a quick look at the
>> code I can't see any harm in this change either. So I guess it's ok.
>>
>> But can you provide the exact hardware and firmware you used for testing, I'll
>> add it to the commit log. I want to document that in every commit:
>
> I used Compex WLE900VX hardware, and the firmware was ath10k-ct something or other,
> it has been a long time, so I don't recall the exact firmware version.

Ok, I added QCA9880 and unspecified version of ath10k-ct firmware to the
commit log.

> The real fix for this is to have the firmware do proper beacon tx
> completion logic so that the driver can know when it can safely free
> buffers. I implemented this in my ath10k-ct firmware/driver, but
> unless you want to start accepting patches for my firmware, then that
> will not help upstream ath10k.

It's a challenge enough to support so many differerent QCOM firmware
branches and still try to avoid bloating the driver too much to keep it
maintainable. Adding support for a new firmware branch/fork with a
significantly different interface would make everything so much harder.

--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches