[PATCH 2/3] ath10k: revert incomplete scatter-gather pci tx
Kalle Valo
kvalo at qca.qualcomm.com
Sun May 25 00:53:57 PDT 2014
Michal Kazior <michal.kazior at tieto.com> writes:
> This prevents leaving incomplete scatter-gather
> transfer on CE rings which can lead firmware to
> crash.
>
> Reported-By: Avery Pennarun <apenwarr at gmail.com>
> Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
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
> + 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.
> +err:
> + for (; i > 0; i--)
Isn't this just a fancy way to say 'while (i-- > 0)'?
--
Kalle Valo
More information about the ath10k
mailing list