netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Steve.Glendinning@smsc.com
Cc: Magnus Damm <magnus.damm@gmail.com>,
	davem@davemloft.net, iwamatsu@nigauri.org,
	netdev@vger.kernel.org, Ian.Saturley@smsc.com
Subject: Re: [PATCH] smsc911x: add fifo byteswap support
Date: Thu, 23 Apr 2009 11:09:25 +0900	[thread overview]
Message-ID: <20090423020925.GA8818@linux-sh.org> (raw)
In-Reply-To: <OFC89C8D8B.9962FD9A-ON802575A0.005335A8-802575A0.00545CBF@smsc.com>

On Wed, Apr 22, 2009 at 04:21:32PM +0100, Steve.Glendinning@smsc.com wrote:
> Magnus Damm <magnus.damm@gmail.com> wrote on 22/04/2009 15:55:53:
> 
> > From: Magnus Damm <damm@igel.co.jp>
> > 
> > This patch adds fifo byteswap support to the smsc911x driver.
> > 
> > The smsc911x hardware supports both big and little and endian
> > hardware configurations, and the linux smsc911x driver currently
> > detects word order.
> > 
> > For correct operation on big endian platforms lacking swapped
> > byte lanes the following patch is needed. Only fifo data is
> > swapped, register data does not require any swapping. 
> > 
> > Signed-off-by: Magnus Damm <damm@igel.co.jp>
> 
> I guess this is to work around a problem with hardware that's
> already in production?
> 
Good guess ;-)

> The best solution would be to swap the byte lanes in hardware,
> as the device's endian swapping features only affect registers
> (not the FIFOs).  The very latest devices in this family
> (such as the LAN9221) can swap both independently, but this
> driver has to also support older parts.
> 
> Performance will be suboptimal with this software byteswapping,
> so I think we should also add a comment to stress that this is
> a "last resort" workaround for broken hardware.
> 
> Acked-by: Steve Glendinning <steve.glendinning@smsc.com>

Performance is not much of a consideration here, it's basically between
this and no ethernet at all. On the plus side, at least not many boards
will need this, I believe it's only 2 generations of microcontroller
evaluation boards that suffer from this particular bit of idiocy on our
side.

  reply	other threads:[~2009-04-23  2:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 14:55 [PATCH] smsc911x: add fifo byteswap support Magnus Damm
2009-04-22 15:21 ` Steve.Glendinning
2009-04-23  2:09   ` Paul Mundt [this message]
2009-04-23 11:33     ` Steve.Glendinning
2009-04-24  1:15   ` Magnus Damm
2009-04-27  7:40     ` Steve.Glendinning

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=20090423020925.GA8818@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=Ian.Saturley@smsc.com \
    --cc=Steve.Glendinning@smsc.com \
    --cc=davem@davemloft.net \
    --cc=iwamatsu@nigauri.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.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).