[U-Boot] [PATCH] mvgbe: remove setting of ethaddr within the driver

Prafulla Wadaskar prafulla at marvell.com
Tue Nov 8 08:18:20 CET 2011



> -----Original Message-----
> From: Michael Walle [mailto:michael at walle.cc]
> Sent: Tuesday, November 08, 2011 3:38 AM
> To: u-boot at lists.denx.de
> Cc: Michael Walle; Mike Frysinger; Valentin Longchamp; Eric
> Cooper; Jason Cooper; Siddarth Gore; Albert ARIBAUD; Prafulla
> Wadaskar; Simon Guinot
> Subject: [PATCH] mvgbe: remove setting of ethaddr within the
> driver
> 
> A network driver should not touch the environment at all. This
> patch fixes
> this behaviour by removing the code for setting a
> default/randomized MAC
> address.
> 
> Instead a board should either set CONFIG_ETHADDR,
> CONFIG_ETH1ADDR etc. or
> use some specific code within the board files, eg. if
> randomization is
> needed.

Dear Michael

Yes, it is needed on few boards.
This patch removes this support for these boards, it is good to remove it from driver code, but this functionality should not be broken, the same should be supported in board specific code.

So NAK for this patch.

I had suggested to add some common framework like common/hush.c,

Here are my suggestions-
1. commond/random_mac.c should be added
2. call back function should be provided to generate random number, those should be defined in arch specific code (for Kirkwood arch-kirkwood/cpu.c)
3. mac randomization should be enabled by CONFIG_SYS_LOCAL_MAC_RANDOMIZATION macro
4. For mvgbe uses it should be enabled by default in include/configs/mv-common.h.
5. for corner case like edminiv2, in should be undefed in board config file
6. Some documentation should be supported for this generic framework.

Regards..
Prafulla . .


More information about the U-Boot mailing list