Re: [PATCH v2] net/eth/ibmveth: Fixup retrieval of MAC address

2013-05-05 Thread David Miller
From: Benjamin Herrenschmidt Date: Sat, 04 May 2013 13:19:01 +1000 > Some ancient pHyp versions used to create a 8 bytes local-mac-address > property in the device-tree instead of a 6 bytes one for veth. > > The Linux driver code to deal with that is an insane hack which also > happens to break

[PATCH v2] net/eth/ibmveth: Fixup retrieval of MAC address

2013-05-03 Thread Benjamin Herrenschmidt
Some ancient pHyp versions used to create a 8 bytes local-mac-address property in the device-tree instead of a 6 bytes one for veth. The Linux driver code to deal with that is an insane hack which also happens to break with some choices of MAC addresses in qemu by testing for a bit in the address

Re: net/eth/ibmveth: Fixup retrieval of MAC address

2013-05-03 Thread Benjamin Herrenschmidt
On Fri, 2013-05-03 at 17:30 +0100, Ben Hutchings wrote: > > + /* Workaround for old/broken pHyp */ > > + if (mac_len == 8) > > + mac_addr_p += 2; > > + if (mac_len != 6) { > > Missing 'else' before the second if? Absolutely... oops :-) I couldn't find a version of pHyp with the wr

Re: net/eth/ibmveth: Fixup retrieval of MAC address

2013-05-03 Thread Ben Hutchings
On Thu, 2013-05-02 at 11:35 +1000, Benjamin Herrenschmidt wrote: > Some ancient pHyp versions used to create a 8 bytes local-mac-address > property in the device-tree instead of a 6 bytes one for veth. > > The Linux driver code to deal with that is an insane hack which also > happens to break with

net/eth/ibmveth: Fixup retrieval of MAC address

2013-05-01 Thread Benjamin Herrenschmidt
Some ancient pHyp versions used to create a 8 bytes local-mac-address property in the device-tree instead of a 6 bytes one for veth. The Linux driver code to deal with that is an insane hack which also happens to break with some choices of MAC addresses in qemu by testing for a bit in the address