From: Ben Hutchings <bhutchings@solarflare.com>
To: Andreas Oberritter <obi@linuxtv.org>
Cc: Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 8139too: move wmb before TX DMA start
Date: Wed, 8 Oct 2008 11:16:00 +0100 [thread overview]
Message-ID: <20081008101558.GH7331@solarflare.com> (raw)
In-Reply-To: <48EC64E1.5070806@linuxtv.org>
Andreas Oberritter wrote:
> From: Andreas Oberritter <obi@linuxtv.org>
>
> The write barrier should be used before starting a DMA transfer. This fixes
> a problem, where almost all packets received on another machine had garbled
> content. Tested with an RTL8100C on a MIPS machine.
>
> Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
>
> diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
> index 53bd903..44344af 100644
> --- a/drivers/net/8139too.c
> +++ b/drivers/net/8139too.c
> @@ -1716,13 +1716,13 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
> }
>
> spin_lock_irqsave(&tp->lock, flags);
> + wmb();
[...]
All memory barriers need a comment to explain why and what they're doing.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2008-10-08 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 7:44 [PATCH] 8139too: move wmb before TX DMA start Andreas Oberritter
2008-10-08 10:16 ` Ben Hutchings [this message]
2008-10-08 16:14 ` [PATCH v2] " Andreas Oberritter
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=20081008101558.GH7331@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=obi@linuxtv.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).