netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Danny Kukawka <danny.kukawka@bisect.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: netdev@vger.kernel.org, "Greg Kroah-Hartman" <gregkh@suse.de>,
	Steve Glendinning <steve.glendinning@smsc.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] smsc95xx: add macaddr module parameter
Date: Tue, 31 Jan 2012 19:17:11 +0100	[thread overview]
Message-ID: <201201311917.12534.danny.kukawka@bisect.de> (raw)
In-Reply-To: <20120131172731.03df5704@pyramind.ukuu.org.uk>

On Dienstag, 31. Januar 2012, Alan Cox wrote:
> On Tue, 31 Jan 2012 18:20:33 +0100
>
> Danny Kukawka <danny.kukawka@bisect.de> wrote:
> > Added smsc95xx.macaddr module parameter to allow the user to
> > change the MAC address on boot if there was no MAC on the EEPROM.
>
> NAK. Please see the discussion on this and ifconfig hw for other devices.
>
> In summary - make the device refuse to ifconfig up without a valid
> address, allow it to come into existance without a valid address and then
> use ifconfig.
>
>
> Your patch also seems to break if there are several attached to a board.

There are already other kernel driver which allow to override the (hw) MAC 
address via a module parameter (macaddr): 
- KSZ8841/2 PCI network driver (drivers/net/ethernet/micrel/ksz884x.c)
- FEC Ethernet driver (drivers/net/ethernet/freescale/fec.c)
- Sun HappyMealEthernet(HME) 10/100baseT ethernet driver
  (drivers/net/ethernet/sun/sunhme.c)

By default the MAC from the module parameter get only assigned to the first 
device which got a random MAC (caused by missing EEPROM) before. If you have 
more than one device you can simply assign the MAC to a specific interface 
(e.g. use: macaddr=01:23:45:67:89:ab;eth0). If there are only devices with 
hardware MAC nothing will get changed.

Danny

  reply	other threads:[~2012-01-31 18:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 17:20 [PATCH] smsc95xx: add macaddr module parameter Danny Kukawka
2012-01-31 17:27 ` Alan Cox
2012-01-31 18:17   ` Danny Kukawka [this message]
2012-01-31 19:45     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201201311917.12534.danny.kukawka@bisect.de \
    --to=danny.kukawka@bisect.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@smsc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).