From: "Richard Röjfors" <richard.rojfors@pelagicore.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] ks8842: Add module param for setting mac address
Date: Sun, 18 Apr 2010 23:35:47 +0200 [thread overview]
Message-ID: <4BCB7B33.4040306@pelagicore.com> (raw)
In-Reply-To: <1271620221.3679.265.camel@localhost>
On 04/18/2010 09:50 PM, Ben Hutchings wrote:
> On Sun, 2010-04-18 at 19:25 +0200, Richard Röjfors wrote:
>> This patch adds a module parameter for setting the MAC address.
>>
>> To ensure this MAC address is used, the MAC address is written
>> after each hardware reset.
> [...]
>
> This is not an accepted way of setting the MAC address.
I agree it's not the cleanest way of doing this, I saw some of the
other drivers do like this.
> The accepted ways to initialise a network controller's address are:
>
> 1. a. Controller reads it from dedicated NVRAM. Driver reads it from
> controller.
> b. Driver reads it from dedicated NVRAM.
Not possible with the current hardware.
> 2. Platform firmware or boot loader passes platform data (OpenFirmware,
> device tree, etc.) to the kernel, which includes the assigned MAC
> address. Driver uses kernel functions to read it from platform data.
On our system (X86 based) the ks8842 is connected via a FPGA, the FPGA is
connected via PCI express. The system has a standard BIOS.
In linux we have a MFD driver chunking up the PCI memory space into
platform devices. In that case we would need to feed the data as a param
to the MFD driver which copies into the platform data of the ks8842, would
be doable.
> 3. Platform firmware or boot loader programs it into the controller.
> Driver reads it from the controller.
We use standard BIOS and boot loaders from the X86 distros -> more or less
not doable.
> 4. Driver generates random address.
That's the current fallback if none is given and the random address
in the chip isn't valid.
>
> In any case, userland can change the MAC address later.
If we don't need to have a known MAC before the root FS is mounted.
--Richard
next prev parent reply other threads:[~2010-04-18 21:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 17:25 [PATCH] ks8842: Add module param for setting mac address Richard Röjfors
2010-04-18 19:50 ` Ben Hutchings
2010-04-18 21:35 ` Richard Röjfors [this message]
2010-04-19 4:18 ` David Miller
2010-04-19 6:16 ` Richard Röjfors
2010-04-19 6:36 ` David Miller
2010-04-19 6:46 ` Richard Röjfors
2010-04-19 7:13 ` 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=4BCB7B33.4040306@pelagicore.com \
--to=richard.rojfors@pelagicore.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.