From: Lennert Buytenhek <buytenh@wantstofly.org>
To: David Acker <dacker@roinet.com>
Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>,
"Kok, Auke" <auke-jan.h.kok@intel.com>,
Jeff Garzik <jeff@garzik.org>,
Netdev List <netdev@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: [RFT] e100 driver on ARM
Date: Thu, 26 Apr 2007 15:50:13 +0200 [thread overview]
Message-ID: <20070426135013.GA12154@xi.wantstofly.org> (raw)
In-Reply-To: <4630AC02.7040706@roinet.com>
On Thu, Apr 26, 2007 at 09:41:22AM -0400, David Acker wrote:
> Here is a quote from Russell that describes what I believe is the main
> problem:
> http://www-gatago.com/linux/kernel/15457063.html
> "
> Has e100 actually been fixed to use the PCI DMA API correctly yet?
> Looking at it, it doesn't look like it, so until it does, eepro100
> is the far better bet for platforms needing working DMA API.
>
> What I'm talking about is e100's apparant belief that it can modify
> rfd's in the receive ring on a non-cache coherent architecture and
> expect the data around it to remain unaffected (see e100_rx_alloc_skb):
>
> struct rfd {
> u16 status;
> u16 command;
> u32 link;
> u32 rbd;
> u16 actual_size;
> u16 size;
> };
>
> it touches command and link. This means that the whole rfd plus
> maybe the following or preceding 16 bytes get loaded into a cache
> line (assuming cache lines of 32 bytes), and that data written
> out again at sync. However, it does this on what seems to be an
> active receive chain.
>
> So, both the CPU _and_ the device own the same data. Which is a
> violation of the DMA API.
> "
>
> I think that the S-bit patch fixes it because the hardware spins on the
> s-bit instead of using the packet. With just the el-bit, the hardware
> tries to use the same cache line that the software is updating.
>
> Can someone from Intel let us know if I understand the hardware's
> handling of the S and EL bits? If my interpretation is correct, can the
> s-bit patch be applied? It seems like the correct way to lock out the
> hardware while a packet is being updated. I have not seen a reason
> given not to apply the patch.
This is all a while ago now, but wasn't the e100 S-bit patch originally
written by Intel people in response to the very same quote by Russell
King that you've quoted above? The S-bit patch should probably just
be applied, IMHO.
next prev parent reply other threads:[~2007-04-26 13:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-04 10:39 Jeff Garzik
2006-09-04 12:31 ` Lennert Buytenhek
2007-03-28 23:04 ` Kok, Auke
2007-03-29 5:17 ` David Acker
2007-03-29 14:10 ` Lennart Sorensen
2007-04-16 15:07 ` David Acker
2007-04-17 17:35 ` Lennart Sorensen
2007-04-26 13:41 ` David Acker
2007-04-26 13:50 ` Lennert Buytenhek [this message]
2007-04-26 15:12 ` Jeff Garzik
2007-04-26 15:40 ` Kok, Auke
2007-04-26 16:09 ` Jeff Garzik
2007-04-26 16:20 ` Kok, Auke
2007-04-26 16:19 ` H. Peter Anvin
2007-04-27 19:01 ` Lennart Sorensen
2006-09-04 14:34 ` Catalin Marinas
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=20070426135013.GA12154@xi.wantstofly.org \
--to=buytenh@wantstofly.org \
--cc=akpm@osdl.org \
--cc=auke-jan.h.kok@intel.com \
--cc=dacker@roinet.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®