From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>,
<apenwarr@gmail.com>
Subject: Re: [PATCH 2/3] ath10k: revert incomplete scatter-gather pci tx
Date: Sun, 25 May 2014 10:53:57 +0300 [thread overview]
Message-ID: <87fvjytht6.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1400158139-13836-3-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 15 May 2014 14:48:58 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> This prevents leaving incomplete scatter-gather
> transfer on CE rings which can lead firmware to
> crash.
>
> Reported-By: Avery Pennarun <apenwarr@gmail.com>
> Signed-off-by: Michal Kazior <michal.kazior@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
next prev parent reply other threads:[~2014-05-25 7:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 12:48 [PATCH 0/3] ath10k: pci fixes 2014-05-15 Michal Kazior
2014-05-15 12:48 ` [PATCH 1/3] ath10k: protect src_ring state with ce_lock in tx_sg() Michal Kazior
2014-05-15 12:48 ` [PATCH 2/3] ath10k: revert incomplete scatter-gather pci tx Michal Kazior
2014-05-25 7:53 ` Kalle Valo [this message]
2014-05-26 5:37 ` Michal Kazior
2014-05-26 9:19 ` Kalle Valo
2014-05-15 12:48 ` [PATCH 3/3] ath10k: add explicit memory barrier for ring index update Michal Kazior
2014-05-16 12:32 ` Kalle Valo
2014-05-25 7:44 ` Kalle Valo
2014-05-16 12:34 ` [PATCH 0/3] ath10k: pci fixes 2014-05-15 Kalle Valo
2014-05-26 10:02 ` [PATCH v2 0/2] " Michal Kazior
2014-05-26 10:02 ` [PATCH v2 1/2] ath10k: protect src_ring state with ce_lock in tx_sg() Michal Kazior
2014-05-26 10:02 ` [PATCH v2 2/2] ath10k: abort incomplete scatter-gather pci tx properly Michal Kazior
2014-05-27 9:32 ` [PATCH v2 0/2] ath10k: pci fixes 2014-05-15 Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvjytht6.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=apenwarr@gmail.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).