[U-Boot] [PATCH 2/9] mvgbe: Support preserving the existing MAC address

Mike Frysinger vapier at gentoo.org
Sun May 1 07:40:48 CEST 2011


On Sat, Apr 30, 2011 at 10:34, Tabi Timur-B04825 wrote:
> Mike Frysinger wrote:
>> so implement this in your board file in misc_init_r or board_eth_init.  have
>> the code do something like:
>>       uchar enetaddr[6];
>>       if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
>>               /* ... read current MAC out of the driver's registers ... */
>>               eth_setenv_enetaddr("ethaddr", enetaddr);
>>       }
>>
>> then you dont need ugly config hacks in random drivers
>
> This is a feature that could be applied to the e1000 drivers.  The current situation is a mess.  Some drivers ignore the environment, some of them always use it.  This should probably be standardized.

it is standardized already.  no driver should be touching the
environment.  it should only ever use its own eth_device->enetaddr.
the common eth code already takes care of syncing the env and that
member.

also, please fix your e-mailer to properly wrap long lines.
-mike


More information about the U-Boot mailing list