Re: [PATCH net-next v2 07/10] net/faraday: Read MAC address from chip

2016-07-19 Thread Gavin Shan
On Tue, Jul 19, 2016 at 08:57:53PM +1000, Benjamin Herrenschmidt wrote: >On Tue, 2016-07-19 at 10:50 +, David Laight wrote: >> > + if (!is_valid_ether_addr(mac)) { >> > + mac[5] = (m >> 8) & 0xff; >> > + mac[4] = m & 0xff; >> > + mac[3] = (l >> 24) & 0xff

Re: [PATCH net-next v2 07/10] net/faraday: Read MAC address from chip

2016-07-19 Thread Benjamin Herrenschmidt
On Tue, 2016-07-19 at 10:50 +, David Laight wrote: > > + if (!is_valid_ether_addr(mac)) { > > + mac[5] = (m >> 8) & 0xff; > > + mac[4] = m & 0xff; > > + mac[3] = (l >> 24) & 0xff; > > + mac[2] = (l >> 16) & 0xff; > > + mac[1] = (l

RE: [PATCH net-next v2 07/10] net/faraday: Read MAC address from chip

2016-07-19 Thread David Laight
From: Gavin Shan > Sent: 15 July 2016 11:44 > The device is assigned with random MAC address. It isn't reasonable. > An valid MAC address might have been provided by (uboot) firmware by > device-tree or in chip. It's reasonable to use it to maintain consistency. > > This uses the MAC address from

[PATCH net-next v2 07/10] net/faraday: Read MAC address from chip

2016-07-15 Thread Gavin Shan
The device is assigned with random MAC address. It isn't reasonable. An valid MAC address might have been provided by (uboot) firmware by device-tree or in chip. It's reasonable to use it to maintain consistency. This uses the MAC address from device-tree or that in the chip if it's valid. Otherwi