netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Acker <dacker@roinet.com>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: "Kok, Auke" <auke-jan.h.kok@intel.com>,
	Lennert Buytenhek <buytenh@wantstofly.org>,
	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 09:41:22 -0400	[thread overview]
Message-ID: <4630AC02.7040706@roinet.com> (raw)
In-Reply-To: <20070417173507.GB5575@csclub.uwaterloo.ca>

Lennart Sorensen wrote:
> Well the IT8152G+PXA255 combination used on the SBC we tried a couple of
> years ago did not work.  The PCI bus had errors and the SBC maker gave
> up trying to fix it.  We switched to a Geode SC1200 based board instead
> which works fine PCI wise.
> 

I don't think this is it.  Other PCI devices work fine on this board 
include several 802.11 radios.  The S-bit patch totally fixes the problem.

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.

-Ack

  reply	other threads:[~2007-04-26 13:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04 10:39 [RFT] e100 driver on ARM 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 [this message]
2007-04-26 13:50               ` Lennert Buytenhek
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=4630AC02.7040706@roinet.com \
    --to=dacker@roinet.com \
    --cc=akpm@osdl.org \
    --cc=auke-jan.h.kok@intel.com \
    --cc=buytenh@wantstofly.org \
    --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;
as well as URLs for NNTP newsgroup(s).