netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jes Sorensen <jes@trained-monkey.org>
Cc: netdev@vger.kernel.org, jaswinder@infradead.org
Subject: Re: [PATCH] firmware: convert acenic driver to request_firmware()
Date: Mon, 16 Jun 2008 18:23:10 +0100	[thread overview]
Message-ID: <1213636990.26255.822.camel@pmac.infradead.org> (raw)
In-Reply-To: <18518.37862.812419.353804@jaguar.mkp.net>

On Mon, 2008-06-16 at 12:25 -0400, Jes Sorensen wrote:
> Mmmmm,
> 
> I am not particular bothered as to whether or not to put the firmware to
> userspace or not, however has this patch been tested on big endian
> systems? Given that the card is big endian, how is this going to affect
> big endian systems?

We don't have hardware, so haven't been able to test it on either
little-endian or big-endian machines, but we took care to ensure that it
should work on both.

> Honestly, I think it's a bad idea to start messing with the byte order
> of the data for something that happens once at boot time.

Currently, we have the firmware in the host's native endianness -- it's
in the driver in an array of uint32_t. And we just call writel() with
each word of it in turn.

If we provide the firmware via request_firmware(), we don't want to have
separate versions of the firmware files for big-endian and little-endian
hosts. It makes much more sense just to have _one_ version of each
binary file, and either call writel(le32_to_cpu()) for each word, or
writel(be32_to_cpu()).

We chose the former, because it can be simplified to __raw_writel().

Since the CPU on the device is big-endian, I would be amenable to an
argument that we should store the firmware in its native big-endian
form, and load it with writel(be32_to_cpu()) instead.

It doesn't matter much either way, really. 

-- 
dwmw2


  reply	other threads:[~2008-06-16 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16  9:25 [PATCH] firmware: convert acenic driver to request_firmware() David Woodhouse
2008-06-16 16:25 ` Jes Sorensen
2008-06-16 17:23   ` David Woodhouse [this message]
2008-06-17 16:50     ` Jes Sorensen
2008-06-17 16:52       ` David Woodhouse
2008-06-18 16:29       ` David Woodhouse
2008-06-16 20:34 ` Jeff Garzik
2008-06-16 21:45   ` David Woodhouse
2008-06-16 22:11     ` Jeff Garzik
2008-06-17 10:40       ` David Woodhouse
2008-06-18 16:14         ` David Woodhouse
2008-06-18 16:26           ` Jeff Garzik
2008-06-18 16:43             ` David Woodhouse
2008-06-18 16:45               ` David Woodhouse
2008-06-18 16:52                 ` Jes Sorensen

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=1213636990.26255.822.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=jaswinder@infradead.org \
    --cc=jes@trained-monkey.org \
    --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).