All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	apenwarr@gmail.com
Subject: Re: [PATCH 3/3] ath10k: add explicit memory barrier for ring index update
Date: Fri, 16 May 2014 15:32:11 +0300	[thread overview]
Message-ID: <87d2fd7vlg.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1400158139-13836-4-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 15 May 2014 14:48:59 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> 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>
> ---

[...]

> --- 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);
>  }

I see two new checkpatch warnings:

drivers/net/wireless/ath/ath10k/ce.c:66: CHECK: memory barrier without comment
drivers/net/wireless/ath/ath10k/ce.c:80: CHECK: memory barrier without comment

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
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 3/3] ath10k: add explicit memory barrier for ring index update
Date: Fri, 16 May 2014 15:32:11 +0300	[thread overview]
Message-ID: <87d2fd7vlg.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1400158139-13836-4-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Thu, 15 May 2014 14:48:59 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> 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>
> ---

[...]

> --- 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);
>  }

I see two new checkpatch warnings:

drivers/net/wireless/ath/ath10k/ce.c:66: CHECK: memory barrier without comment
drivers/net/wireless/ath/ath10k/ce.c:80: CHECK: memory barrier without comment

-- 
Kalle Valo

  reply	other threads:[~2014-05-16 12:32 UTC|newest]

Thread overview: 28+ 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 ` 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   ` Michal Kazior
2014-05-15 12:48 ` [PATCH 2/3] ath10k: revert incomplete scatter-gather pci tx Michal Kazior
2014-05-15 12:48   ` Michal Kazior
2014-05-25  7:53   ` Kalle Valo
2014-05-25  7:53     ` Kalle Valo
2014-05-26  5:37     ` Michal Kazior
2014-05-26  5:37       ` Michal Kazior
2014-05-26  9:19       ` Kalle Valo
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-15 12:48   ` Michal Kazior
2014-05-16 12:32   ` Kalle Valo [this message]
2014-05-16 12:32     ` Kalle Valo
2014-05-25  7:44   ` 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-16 12:34   ` Kalle Valo
2014-05-26 10:02 ` [PATCH v2 0/2] " Michal Kazior
2014-05-26 10:02   ` 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     ` Michal Kazior
2014-05-26 10:02   ` [PATCH v2 2/2] ath10k: abort incomplete scatter-gather pci tx properly Michal Kazior
2014-05-26 10:02     ` Michal Kazior
2014-05-27  9:32   ` [PATCH v2 0/2] ath10k: pci fixes 2014-05-15 Kalle Valo
2014-05-27  9:32     ` 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=87d2fd7vlg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.