Search Linux Wireless

Re: [PATCH 2/3] ath10k: revert incomplete scatter-gather pci tx

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

 



On 25 May 2014 09:53, Kalle Valo <kvalo@xxxxxxxxxxxxxxxx> wrote:
> Michal Kazior <michal.kazior@xxxxxxxxx> writes:
>
>> This prevents leaving incomplete scatter-gather
>> transfer on CE rings which can lead firmware to
>> crash.
>>
>> Reported-By: Avery Pennarun <apenwarr@xxxxxxxxx>
>> Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx>
>
> The title is a bit misleading as usually the commit log with the word
> revert means that the commit is reverting another git commit. Maybe
> something like this is better:
>
> ath10k: drop incomplete scatter-gather pci tx transfers

Good point. I was actually thinking 'abort' .. 'properly'.


>> +     if (WARN_ON(src_ring->write_index == src_ring->sw_index))
>> +             return;
>> +
>> +     if (WARN_ON(src_ring->write_index ==
>> +                 ath10k_ce_src_ring_write_index_get(ar, ctrl_addr)))
>> +             return;
>
> WARN_ON() on data path is dangerous. WARN_ON_ONCE() or ath10k_warn() is
> better.

Good point!


>> +err:
>> +     for (; i > 0; i--)
>
> Isn't this just a fancy way to say 'while (i-- > 0)'?

Not really. More like do { .. } while (--i > 0), no? First iteration
must use unmodified `i`.


Michał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux