All of lore.kernel.org
 help / color / mirror / Atom feed
From: John W. Linville <linville@tuxdriver.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [RFC] ath9k: Insert wmb before linking dma descriptors
Date: Tue, 5 Oct 2010 09:17:44 -0400	[thread overview]
Message-ID: <20101005131744.GB4074@tuxdriver.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1010042059130.29449@vtdt3>

On Mon, Oct 04, 2010 at 10:55:08PM +0200, Bj?rn Smedman wrote:
> Hi all,
> 
> I've been looking at how ath9k does DMA and comparing with the
> recommendations in the Linux kernel documentation for the DMA API[1]. To
> me it looks like we risk setting up incorrect DMA descriptors on
> platforms that can reorder writes because all data in the descriptor may
> not be written to memory before the descriptor is linked into the DMA
> chain.
> 
> The patch below attempts to remove this risk by inserting a write memory
> barrier between where we set up a descriptor and where we add it to the 
> DMA chain. My hope is that this may solve some of the harder chip lockups 
> on MIPS but more testing is required to determine if it has this effect.
> 
> Any thoughts?
> 
> /Bj?rn
> 
> 1. http://www.mjmwired.net/kernel/Documentation/DMA-API.txt

I think this seems OK...?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.

WARNING: multiple messages have this Message-ID (diff)
From: "John W. Linville" <linville@tuxdriver.com>
To: "Björn Smedman" <bjorn.smedman@venatech.se>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	ath9k-devel@venema.h4ckr.net
Subject: Re: [RFC] ath9k: Insert wmb before linking dma descriptors
Date: Tue, 5 Oct 2010 09:17:44 -0400	[thread overview]
Message-ID: <20101005131744.GB4074@tuxdriver.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1010042059130.29449@vtdt3>

On Mon, Oct 04, 2010 at 10:55:08PM +0200, Björn Smedman wrote:
> Hi all,
> 
> I've been looking at how ath9k does DMA and comparing with the
> recommendations in the Linux kernel documentation for the DMA API[1]. To
> me it looks like we risk setting up incorrect DMA descriptors on
> platforms that can reorder writes because all data in the descriptor may
> not be written to memory before the descriptor is linked into the DMA
> chain.
> 
> The patch below attempts to remove this risk by inserting a write memory
> barrier between where we set up a descriptor and where we add it to the 
> DMA chain. My hope is that this may solve some of the harder chip lockups 
> on MIPS but more testing is required to determine if it has this effect.
> 
> Any thoughts?
> 
> /Björn
> 
> 1. http://www.mjmwired.net/kernel/Documentation/DMA-API.txt

I think this seems OK...?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2010-10-05 13:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 20:55 [ath9k-devel] [RFC] ath9k: Insert wmb before linking dma descriptors Björn Smedman
2010-10-04 20:55 ` Björn Smedman
2010-10-05 13:17 ` John W. Linville [this message]
2010-10-05 13:17   ` John W. Linville
2010-10-05 19:50   ` [ath9k-devel] " Luis R. Rodriguez
2010-10-05 19:50     ` Luis R. Rodriguez
2010-10-09 15:19     ` Björn Smedman
2010-10-09 15:19       ` Björn Smedman
2010-10-09 15:23       ` Felix Fietkau
2010-10-09 15:23         ` Felix Fietkau
2010-10-28 23:36         ` Ben Greear
2010-10-28 23:36           ` Ben Greear
2010-10-28 23:45           ` Felix Fietkau
2010-10-28 23:45             ` Felix Fietkau
2010-10-29  0:57             ` Luis R. Rodriguez
2010-10-29  0:57               ` Luis R. Rodriguez
2010-11-01 15:44               ` Björn Smedman
2010-11-01 15:44                 ` Björn Smedman
2010-11-01 17:17                 ` Bob Copeland
2010-11-01 17:17                   ` Bob Copeland
2010-11-01 18:49                   ` Björn Smedman
2010-11-01 18:49                     ` Björn Smedman
2010-11-01 18:56                     ` Bob Copeland
2010-11-01 18:56                       ` Bob Copeland
2010-11-01 22:45                     ` Peter Stuge
2010-11-01 22:45                       ` Peter Stuge
2010-11-01 22:51                       ` Ben Greear
2010-11-01 22:51                         ` Ben Greear

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=20101005131744.GB4074@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ath9k-devel@lists.ath9k.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 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.