Search Linux Wireless

Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25.03.22 08:12, Oleksandr Natalenko wrote:
> On čtvrtek 24. března 2022 18:07:29 CET Toke Høiland-Jørgensen wrote:
>> Right, but is that sync_for_device call really needed? AFAICT, that
>> ath9k_hw_process_rxdesc_edma() invocation doesn't actually modify any of
>> the data when it returns EINPROGRESS, so could we just skip it? Like
>> the patch below? Or am I misunderstanding the semantics here?
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
>> index 0c0624a3b40d..19244d4c0ada 100644
>> --- a/drivers/net/wireless/ath/ath9k/recv.c
>> +++ b/drivers/net/wireless/ath/ath9k/recv.c
>> @@ -647,12 +647,8 @@ static bool ath_edma_get_buffers(struct ath_softc *sc,
>>                                 common->rx_bufsize, DMA_FROM_DEVICE);
>>  
>>         ret = ath9k_hw_process_rxdesc_edma(ah, rs, skb->data);
>> -       if (ret == -EINPROGRESS) {
>> -               /*let device gain the buffer again*/
>> -               dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
>> -                               common->rx_bufsize, DMA_FROM_DEVICE);
>> +       if (ret == -EINPROGRESS)
>>                 return false;
>> -       }
>>  
>>         __skb_unlink(skb, &rx_edma->rx_fifo);
>>         if (ret == -EINVAL) {
> 
> With this patch and both ddbd89deb7d3+aa6f8dcbab47 in place the AP works for me.

TWIMC: If anyone needs more testers or something, I noticed two bug
report in bko about this problem:

https://bugzilla.kernel.org/show_bug.cgi?id=215703
https://bugzilla.kernel.org/show_bug.cgi?id=215698

I'll point both to this discussion and the patch.

Ciao, Thorsten



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux