linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: mac-address vs. local-mac-address
Date: Wed, 07 Feb 2007 15:17:43 -0600	[thread overview]
Message-ID: <45CA41F7.6020700@freescale.com> (raw)

Hi everyone,

What is the current consensus on using mac-address vs. local-mac-address in the 
device tree?  The 1275 spec says this:

"local-mac-address" Standard property name to specify preassigned network address.
"mac-address" Standard property name to specify network address last used.

I think we need to agree on some interpretation of these statements, and all the 
code should be updated to implement that interpretation.

My interpretation is that mac-address is supposed to the contain these MAC 
addresses under these circumstances:

1) If the Ethernet interface is up, it's the MAC address that is currently in use.
2) If the Ethernet interface is not up, it's the MAC address that was in use the 
last time the Ethernet interface was shut down.

In Linux, the ifconfig command is used to change the MAC address.  This command 
calls the driver's set_mac_address function, so it is the driver that sets the 
MAC address in the hardware.

In order to properly support the mac-address property, the driver must also 
update the device tree with the new MAC address.  That's the only way that 
mac-address can contain the "specify network address last used".

Linux doesn't support that.  In some cases, the actual device tree is located on 
a TFTP server, and it's only copied temporarily into RAM by U-Boot.  There's no 
way that a Linux driver can update that.

On a full-blown OF machine, the firmware does provide APIs for updating the 
device tree, and so we could support mac-address on these machines.  But U-Boot 
disappears once the kernel loads, so there is no firmware to call to update the 
device tree.

Therefore, I propose that on systems where the driver cannot update the device 
tree, the mac-address property should be absent from the device tree.  U-Boot 
should not add one, and the Linux device drivers should not reference it.

Comments?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

             reply	other threads:[~2007-02-07 21:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 21:17 Timur Tabi [this message]
2007-02-07 21:32 ` mac-address vs. local-mac-address Benjamin Herrenschmidt
2007-02-07 21:41   ` Kumar Gala
2007-02-07 21:46     ` Timur Tabi
2007-02-07 21:42   ` Timur Tabi
2007-02-07 21:51     ` Kumar Gala
2007-02-07 22:07       ` Timur Tabi
2007-02-07 22:14         ` Kumar Gala
2007-02-07 22:22           ` Timur Tabi
2007-02-07 22:07     ` Benjamin Herrenschmidt
2007-02-07 22:16       ` Timur Tabi

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=45CA41F7.6020700@freescale.com \
    --to=timur@freescale.com \
    --cc=linuxppc-dev@ozlabs.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 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).