linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Adrian Cox <adrian@humboldt.co.uk>
Cc: Paulo Afonso Graner Fessel <pafessel@zaz.com.br>,
	linux-kernel@vger.kernel.org, hollis@austin.rr.com,
	torben.mathiasen@compaq.com
Subject: Re: Probable endianess problem in TLAN driver
Date: Sat, 9 Jun 2001 15:38:45 -0700 (PDT)	[thread overview]
Message-ID: <15138.42357.146305.892652@pizda.ninka.net> (raw)
In-Reply-To: <3B21F918.4090101@humboldt.co.uk>
In-Reply-To: <3B21A790.63F428CE@zaz.com.br> <3B21F918.4090101@humboldt.co.uk>


Adrian Cox writes:
 > > +#if defined(__powerpc__)
 > > +#define inw(addr)                      le32_to_cpu(inw(addr))
 > > +#define inl(addr)                      le32_to_cpu(inl(addr))
 > > +#define outw(val, addr)                outw(cpu_to_le32(val), addr)
 > > +#define outl(val, addr)                outl(cpu_to_le32(val), addr)
 > > +#endif
 > 
 > On ppc the inw, inl, outw, and outl functions already byteswap, so by 
 > adding the extra byteswap you're now passing unswapped data to the chip. 

Yes, and this is true for every architecture.

All of {in,out}{b,w,l}() and {read/write}{b,w,l}() swap to/from
bus endianness for you.

Later,
David S. Miller
davem@redhat.com

  parent reply	other threads:[~2001-06-09 22:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-09  4:35 Probable endianess problem in TLAN driver Paulo Afonso Graner Fessel
2001-06-09 10:23 ` Adrian Cox
2001-06-09 22:38 ` David S. Miller [this message]
2001-06-09 22:58   ` Riley Williams
2001-06-09 23:36     ` David Woodhouse
2001-06-10  6:45     ` David S. Miller
2001-06-09 23:12   ` David S. Miller
2001-06-09 10:11 Mathiasen, Torben
2001-06-09 16:21 ` Paulo Afonso Graner Fessel

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=15138.42357.146305.892652@pizda.ninka.net \
    --to=davem@redhat.com \
    --cc=adrian@humboldt.co.uk \
    --cc=hollis@austin.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pafessel@zaz.com.br \
    --cc=torben.mathiasen@compaq.com \
    /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).