[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140306.162737.1605594893806967606.davem@davemloft.net>
Date: Thu, 06 Mar 2014 16:27:37 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: anton@...ba.org
Cc: joe@...ches.com, agraf@...e.de, benh@...nel.crashing.org,
dvaleev@...e.com, santil@...ux.vnet.ibm.com,
tony@...eyournoodle.com, linuxppc-dev@...ts.ozlabs.org,
netdev@...r.kernel.org
Subject: Re: ibmveth: Fix endian issues with MAC addresses
From: Anton Blanchard <anton@...ba.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@...ba.org>
> Cc: stable@...r.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists