linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: paulus@samba.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: add of_get_mac_address() and update fsl_soc.c to use it
Date: Thu, 15 Feb 2007 14:55:11 -0600	[thread overview]
Message-ID: <45D4C8AF.80607@freescale.com> (raw)
In-Reply-To: <01b23edfa0a058ae8a119594abb51e01@kernel.crashing.org>

Segher Boessenkool wrote:
>>> +    return get_property(np, "address", NULL);
>>
>> Since there is so much room for confusion with "address", please at
>> least do some basic sanity checking, like check that it's size is 6
>> bytes and maybe that the multicast bit isn't set.
> 
> Preferably, don't use "address" at all -- there shouldn't

Unfortunately, I really don't have that luxury.  I *must* support 'address'.

> be any trees in the wild that use it.  If there actually
> are some, the should use a quirk to change it to "local-
> mac-address" instead.

The whole point behind checking for 'address' is to support older device trees 
that have only that property.  We have a problem where some installations use 
'address', and if we don't support it here in the kernel, then the kernel won't 
boot.

> This holds in general: workarounds for gross errors in
> device trees should be applied much more selectively
> than is done now, it just doesn't scale this way.

There are trees in the kernel today that have 'address' in them.  Before I can 
fix the trees, though, I need to update U-Boot and the kernel to support 
local-mac-address *without* breaking support for older trees.  That's why this 
patch is written the way it is.

I have patches for U-Boot already out there, although currently none of the 
U-Boot maintainers have indicated a willingness to apply them.

This whole local-mac-address mess needs to be fixed in an iterative process. 
One day, we can remove the check for 'address' from of_get_mac_address(), but 
not yet.

I've implemented all the other suggestion so far.  I *really* need this patch to 
go in as is.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  reply	other threads:[~2007-02-15 20:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13 23:10 [PATCH] powerpc: add of_get_mac_address() and update fsl_soc.c to use it Timur Tabi
2007-02-14  0:00 ` Benjamin Herrenschmidt
2007-02-14  0:21   ` Olof Johansson
2007-02-14  5:17   ` Timur Tabi
2007-02-14  5:28     ` Benjamin Herrenschmidt
2007-02-14  5:30       ` Timur Tabi
2007-02-14 14:09     ` Sergei Shtylyov
2007-02-15 20:47   ` Segher Boessenkool
2007-02-15 20:55     ` Timur Tabi [this message]
2007-02-16 13:25       ` Segher Boessenkool
2007-02-16 14:38         ` 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=45D4C8AF.80607@freescale.com \
    --to=timur@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=segher@kernel.crashing.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).