[PATCH 07/10] net/farady: Read MAC address from chip

Gavin Shan gwshan at linux.vnet.ibm.com
Sun Jul 3 15:35:24 AEST 2016


On Fri, Jul 01, 2016 at 09:47:58PM +0930, Joel Stanley wrote:
>On 1 Jul 2016 20:55, "Benjamin Herrenschmidt" <benh at kernel.crashing.org>
>wrote:
>>
>> On Thu, 2016-06-30 at 23:35 +0930, Joel Stanley wrote:
>> > On Thu, Jun 30, 2016 at 7:57 PM, Gavin Shan  wrote:
>> > > The device is assigned with random MAC address. It isn't reasonable.
>> > > An valid MAC address might have been in the chip. It's reasonable
>> > > to use it to maintain consistency.
>> > >
>> > > This uses the MAC address in the chip if it's valid. Otherwise, a
>> > > random MAC address is given as before.
>>
>> If that is a worry we could use a device-tree property. Does our
>> uboot update the DT ? If yes it can set the local-mac-address prop.
>
>It doesn't currently, but we will be adding that soon we need to update the
>memory node for systems where board revisions change the DRAM size.
>

In the revision I sent to community just now, the MAC address is picked from
device-tree if there is a valid one. Otherwise, the one in the chip is checked.
random MAC address will be used if both are invalid. In this way, the kernel
compatible whatever uboot changes we will have.

Thanks,
Gavin



More information about the openbmc mailing list