linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: anton@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, dvaleev@suse.com, agraf@suse.de,
	netdev@vger.kernel.org, joe@perches.com,
	santil@linux.vnet.ibm.com
Subject: Re: ibmveth: Fix endian issues with MAC addresses
Date: Thu, 06 Mar 2014 16:27:37 -0500 (EST)	[thread overview]
Message-ID: <20140306.162737.1605594893806967606.davem@davemloft.net> (raw)
In-Reply-To: <20140305145137.3460dbe7@kryten>

From: Anton Blanchard <anton@samba.org>
Date: Wed, 5 Mar 2014 14:51:37 +1100

> The code to load a MAC address into a u64 for passing to the
> hypervisor via a register is broken on little endian.
> 
> Create a helper function called ibmveth_encode_mac_addr
> which does the right thing in both big and little endian.
> 
> We were storing the MAC address in a long in struct ibmveth_adapter.
> It's never used so remove it - we don't need another place in the
> driver where we create endian issues with MAC addresses.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Cc: stable@vger.kernel.org

Applied, thanks Anton.

> -	memcpy(&adapter->mac_addr, mac_addr_p, ETH_ALEN);
 ...
> -    unsigned long mac_addr;

That's some scary stuff right there.

  reply	other threads:[~2014-03-06 21:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23  1:29 [PATCH] ibmveth: Fix more little endian issues Alexander Graf
2013-12-23  6:38 ` Anton Blanchard
2013-12-23 10:17   ` Alexander Graf
2013-12-23 14:52   ` Joe Perches
2013-12-24  1:55     ` Anton Blanchard
2013-12-25 10:38       ` Ben Hutchings
2014-03-05  3:51       ` ibmveth: Fix endian issues with MAC addresses Anton Blanchard
2014-03-06 21:27         ` David Miller [this message]
2013-12-24  4:37     ` [PATCH] ibmveth: Fix more little endian issues Benjamin Herrenschmidt

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=20140306.162737.1605594893806967606.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=agraf@suse.de \
    --cc=anton@samba.org \
    --cc=dvaleev@suse.com \
    --cc=joe@perches.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=santil@linux.vnet.ibm.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).