Re: [PATCH] tg3: fix big endian MAC address collection failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

>   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


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux