From: Darren Hart <dvhart@linux.intel.com>
To: Alan Cox <alan@linux.intel.com>
Cc: Tomoya MORINAGA <tomoya.rohm@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, arjan@linux.intel.com,
jeffrey.t.kirsher@intel.com, paul.gortmaker@windriver.com,
jdmason@kudzu.us, netdev@vger.kernel.org
Subject: Re: [PATCH] pch_gbe: Use a randomly generated MAC instead of failing probe
Date: Mon, 16 Jan 2012 07:42:55 -0800 [thread overview]
Message-ID: <4F14457F.8060509@linux.intel.com> (raw)
In-Reply-To: <20120116123110.7ce91f2d@bob.linux.org.uk>
On 01/16/2012 04:31 AM, Alan Cox wrote:
>> Saving MAC address into external ROM is generic method, I think.
>> Though I know the ROM-less system using eg20t-pch, however I think
>> this system is not common.
>> So, I think pch_gbe shouldn't have auto-mac address assignment.
>
> The problem is the module load fails for those cases. You cannot load
> the module and use the standard ifconfig eth0 hw aa:bb:cc:dd:ee:ff
> interface. The better fix might be to make sure it loads.
>
> So change from
>
> memcpy(netdev->dev_addr, adapter->hw.mac.addr,
> netdev->addr_len);
> if (!is_valid_ether_addr(netdev->dev_addr)) {
> dev_err(&pdev->dev, "Invalid MAC Address\n");
> ret = -EIO;
> goto err_free_adapter;
> }
>
> to just printing a warning, and check the current address when a user
> tries to ifconfig it up and refuse to allow the port to go active.
I can go this route I suppose. I don't really understand the objection
to the use of a random mac addr in the special case given the prevalence
of this approach within existing drivers.
One reason I don't care for this alternative approach is that this
particular hardware is targeted at embedded use where we can't assume a
full init system is available, etc. It can be made to work of course, it
just isn't as automated.
David, would you orefer/accept an alternative patch which allows the
driver to load without a MAC address so the user can set it via ifconfig
after boot?
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2012-01-16 15:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-14 6:44 [PATCH] pch_gbe: Use a randomly generated MAC instead of failing probe Darren Hart
2012-01-14 8:14 ` David Miller
2012-01-14 15:54 ` Darren Hart
2012-01-14 19:56 ` David Miller
2012-01-14 20:29 ` Joe Perches
2012-01-14 21:46 ` Alan Cox
2012-01-14 22:36 ` Darren Hart
2012-01-16 7:38 ` Tomoya MORINAGA
2012-01-16 12:31 ` Alan Cox
2012-01-16 15:42 ` Darren Hart [this message]
2012-01-16 16:07 ` Arjan van de Ven
2012-01-16 16:20 ` David Laight
2012-01-16 16:35 ` Arjan van de Ven
2012-01-16 16:44 ` Mark Brown
2012-01-16 17:02 ` Alan Cox
2012-01-16 21:06 ` Rick Jones
2012-01-16 15:38 ` Darren Hart
2012-01-14 8:15 ` David Miller
2012-01-14 8:18 ` Cong Wang
2012-01-14 15:45 ` Darren Hart
2012-01-16 15:22 ` Nick Bowler
2012-01-16 23:04 ` David Miller
2012-01-16 23:07 ` Darren Hart
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=4F14457F.8060509@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=alan@linux.intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@linux.intel.com \
--cc=davem@davemloft.net \
--cc=jdmason@kudzu.us \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=tomoya.rohm@gmail.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).