linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, apenwarr@gmail.com,
	Michal Kazior <michal.kazior@tieto.com>
Subject: [PATCH 3/3] ath10k: add explicit memory barrier for ring index update
Date: Thu, 15 May 2014 14:48:59 +0200	[thread overview]
Message-ID: <1400158139-13836-4-git-send-email-michal.kazior@tieto.com> (raw)
In-Reply-To: <1400158139-13836-1-git-send-email-michal.kazior@tieto.com>

Avery reported he had some issues related to
instructions being re-ordered on his ARM test
system resulting in firmware crashes.

This makes sure that data is in place before CE
ring index is updated telling firmware it can
fetch the data.

Reported-By: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/ce.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 966f26e..e66159e 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -63,6 +63,7 @@ static inline void ath10k_ce_dest_ring_write_index_set(struct ath10k *ar,
 						       u32 ce_ctrl_addr,
 						       unsigned int n)
 {
+	mb();
 	ath10k_pci_write32(ar, ce_ctrl_addr + DST_WR_INDEX_ADDRESS, n);
 }
 
@@ -76,6 +77,7 @@ static inline void ath10k_ce_src_ring_write_index_set(struct ath10k *ar,
 						      u32 ce_ctrl_addr,
 						      unsigned int n)
 {
+	mb();
 	ath10k_pci_write32(ar, ce_ctrl_addr + SR_WR_INDEX_ADDRESS, n);
 }
 
-- 
1.8.5.3


  parent reply	other threads:[~2014-05-15 12:56 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
2014-05-26  5:37     ` Michal Kazior
2014-05-26  9:19       ` Kalle Valo
2014-05-15 12:48 ` Michal Kazior [this message]
2014-05-16 12:32   ` [PATCH 3/3] ath10k: add explicit memory barrier for ring index update 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=1400158139-13836-4-git-send-email-michal.kazior@tieto.com \
    --to=michal.kazior@tieto.com \
    --cc=apenwarr@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /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).