Subject: Re: [PATCH] dnet: Dave DNET ethernet controller driver

From: Stephen Hemminger <[email-masked]>
Date: Wed, 11 Mar 2009 17:13:54 -0700

On Wed, 11 Mar 2009 21:56:06 +0100
Christer Weinigel <[email-masked]> wrote:

> David Miller wrote:
> 
> > From: Sascha Hauer <[email-masked]>
> > Date: Wed, 11 Mar 2009 09:44:30 +0100
> 
>  > > [some code to pass the MAC address as module parameters]
> 
> > Please remove this code.  If we let you do it, we have to let everyone
> > else do it too, and that's something we don't want to do.
> > 
> > There are other ways you can handle this, for example have your board
> > firmware properly program the MAC address into the card at power-on,
> > and then have the driver here look in the MAC address registers to see
> > if a valid ethernet address has been left there.
> 
> 
> It's still a pain to have to do this.  Many embedded systems that I have 
> seen have a bootloader which I can't modify to do that, but the 
> bootloader allows me to save the kernel command line into some kind of 
> volatile storage.  Så being able to set the MAC address with a:
> 
>      setenv cmdline foo.hwaddr=00:de:ad:be:ef:ed
> 
> is very nice because it allows me to use a NFS root without having to 
> jump through hoops with initrds an such.
> 
> Actually, I wish we had a generic way of doing that, so that could set 
> the mac address of any ethernet interface from the kernel command in a 
> nice and supported way.
> 
>    /Christer

The problem is that usually users end up with all devices with the
same address, unless there is some other procedure to hand out addresses
during configuration. That is why the random_ether_addr is safer.