From: "Matt Carlson" <mcarlson@broadcom.com>
To: "James Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "Matthew Carlson" <mcarlson@broadcom.com>,
"linux-netdev@vger.kernel.org" <linux-netdev@vger.kernel.org>,
"Parisc List" <linux-parisc@vger.kernel.org>,
"Michael Chan" <mchan@broadcom.com>
Subject: Re: [PATCH] tg3: fix big endian MAC address collection failure
Date: Mon, 13 Apr 2009 11:37:25 -0700 [thread overview]
Message-ID: <20090413183725.GC11109@xw6200.broadcom.net> (raw)
In-Reply-To: <1239646516.3278.57.camel@mulgrave.int.hansenpartnership.com>
On Mon, Apr 13, 2009 at 11:15:16AM -0700, James Bottomley wrote:
> On Mon, 2009-04-13 at 11:00 -0700, Matt Carlson wrote:
> > Hi James. I'd like to think about this some more before we apply it. I
> > investigated this problem using a 5703 on a SPARC Ultra 10, and all my
> > assumptions checked out.
>
> Um, I think you'll find the SPARC has a special routine for extracting
> the MAC address from Open Firmware, so it doesn't exercise the NVRAM
> path.
Yes, it does. The driver moves beyond that point because the routine
fails on this system. (It's really old and doesn't have a Broadcom LOM
on it.)
> > I don't dispute that you and Robin are having
> > a problem. I just don't understand where the root cause of the problem
> > is yet. Stay tuned.
>
> The root cause is basically that if you get the MAC from NVRAM into two
> native 32 bit words, you have to be careful about how you convert them
> to a byte stream for the MAC address. You can't use a memcpy from the
> native number to the MAC because it's not endian invariant (it copies
> the numbers the opposite ways around on big and little endian boxes).
>
> James
But that is exactly what the code is doing. tg3_nvram_read_be32() will
return the data in bytestream format. A memcpy() should be all that is
needed to transport the data to a different memory location.
next prev parent reply other threads:[~2009-04-13 18:37 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 15:21 [PATCH] tg3: fix big endian MAC address collection failure James Bottomley
2009-04-13 18:00 ` Matt Carlson
2009-04-13 18:04 ` Kyle McMartin
2009-04-13 18:13 ` Matt Carlson
2009-04-13 18:18 ` James Bottomley
2009-04-13 18:24 ` Matt Carlson
2009-04-13 18:15 ` James Bottomley
2009-04-13 18:37 ` Matt Carlson [this message]
2009-04-13 20:48 ` James Bottomley
2009-04-14 1:17 ` Matt Carlson
2009-04-14 15:39 ` Grant Grundler
2009-04-14 19:02 ` Matt Carlson
2009-04-18 23:00 ` Grant Grundler
2009-04-19 7:30 ` Michael Chan
2009-04-19 22:32 ` Grant Grundler
2009-04-20 20:46 ` Matt Carlson
-- strict thread matches above, loose matches on Subject: below --
2009-04-13 15:29 James Bottomley
2009-04-13 21:32 ` David Miller
2009-04-13 21:42 ` James Bottomley
2009-04-13 21:44 ` David Miller
2009-04-13 22:17 ` Michael Chan
2009-04-13 22:32 ` James Bottomley
2009-04-14 1:25 ` Matt Carlson
2009-04-14 1:40 ` David Miller
2009-04-14 2:00 ` Matt Carlson
2009-04-14 2:19 ` Kyle McMartin
2009-04-14 2:51 ` David Miller
2009-04-14 3:56 ` Michael Chan
2009-04-14 3:51 ` James Bottomley
2009-04-14 4:11 ` Michael Chan
2009-04-14 15:26 ` James Bottomley
2009-04-14 15:31 ` Robin Holt
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=20090413183725.GC11109@xw6200.broadcom.net \
--to=mcarlson@broadcom.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-netdev@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=mchan@broadcom.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