[PATCH v2] net: mvneta: read MAC address from hardware when available

David Miller davem at davemloft.net
Tue Jun 4 20:24:17 EDT 2013


From: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Tue,  4 Jun 2013 16:52:23 +0200

> This patch improves the logic used by the mvneta driver to find a MAC
> address for a particular interface. Until now, it was only looking at
> the Device Tree, and if no address was found, was falling back to
> generating a random MAC address.
> 
> This patch adds the intermediate solution of reading the MAC address
> from the hardware registers, in case it has been set by the
> bootloader. So the order is now:
> 
>  1) MAC address from the Device Tree
>  2) MAC address from the hardware registers
>  3) Random MAC address
> 
> This requires moving the MAC address initialization a little bit later
> in the ->probe() code, because it now requires the hardware registers
> to be remapped.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

Applied to net-next, thanks.



More information about the linux-arm-kernel mailing list