All of lore.kernel.org
 help / color / mirror / Atom feed
From: stigge@antcom.de (Roland Stigge)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: LPC32xx: Ethernet driver
Date: Tue, 28 Feb 2012 14:49:56 +0100	[thread overview]
Message-ID: <4F4CDB84.7070502@antcom.de> (raw)
In-Reply-To: <201202281341.01690.arnd@arndb.de>

On 02/28/2012 02:41 PM, Arnd Bergmann wrote:
>> So if the hardware defaults to 00:00:00:00:00:00, what is the
>> "consistent policy we want to enforce in all drivers"?
>>
>> A link or hint would be sufficient.
> 
> I think the most common strategy for platform drivers these days is
> 
> 1. use what the hardware provides
> 2. call of_get_mac_address(dev->of_node, ...)
> 3. use random_ether_addr
> 
> in that order. of_get_mac_address just returns NULL when there
> is no device tree or no local-mac-address property, so you can
> put it into the driver right away.

Cool, thanks - will do!

Roland

WARNING: multiple messages have this Message-ID (diff)
From: Roland Stigge <stigge@antcom.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: David Laight <David.Laight@aculab.com>,
	baruch@tkos.co.il, alexander.h.duyck@intel.com,
	ian.campbell@citrix.com, netdev@vger.kernel.org,
	eilong@broadcom.com, Kevin Wells <kevin.wells@nxp.com>,
	Wolfram Sang <w.sang@pengutronix.de>,
	jeffrey.t.kirsher@intel.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: LPC32xx: Ethernet driver
Date: Tue, 28 Feb 2012 14:49:56 +0100	[thread overview]
Message-ID: <4F4CDB84.7070502@antcom.de> (raw)
In-Reply-To: <201202281341.01690.arnd@arndb.de>

On 02/28/2012 02:41 PM, Arnd Bergmann wrote:
>> So if the hardware defaults to 00:00:00:00:00:00, what is the
>> "consistent policy we want to enforce in all drivers"?
>>
>> A link or hint would be sufficient.
> 
> I think the most common strategy for platform drivers these days is
> 
> 1. use what the hardware provides
> 2. call of_get_mac_address(dev->of_node, ...)
> 3. use random_ether_addr
> 
> in that order. of_get_mac_address just returns NULL when there
> is no device tree or no local-mac-address property, so you can
> put it into the driver right away.

Cool, thanks - will do!

Roland

  reply	other threads:[~2012-02-28 13:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 13:08 [PATCH v2] ARM: LPC32xx: Ethernet driver Roland Stigge
2012-02-28 13:11 ` David Laight
2012-02-28 13:11   ` David Laight
2012-02-28 13:32   ` Roland Stigge
2012-02-28 13:32     ` Roland Stigge
2012-02-28 13:41     ` Arnd Bergmann
2012-02-28 13:41       ` Arnd Bergmann
2012-02-28 13:41       ` Arnd Bergmann
2012-02-28 13:49       ` Roland Stigge [this message]
2012-02-28 13:49         ` Roland Stigge
2012-02-28 15:53       ` Ben Hutchings
2012-02-28 15:53         ` Ben Hutchings
2012-02-28 19:13 ` David Miller
2012-02-28 19:13   ` David Miller
2012-02-28 19:13   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2012-02-25 20:21 Roland Stigge
2012-02-25 20:21 ` Roland Stigge
2012-02-25 20:41 ` Joe Perches
2012-02-25 20:41   ` Joe Perches
2012-02-26  1:52 ` Baruch Siach
2012-02-26  1:52   ` Baruch Siach
2012-02-26  2:28   ` David Miller
2012-02-26  2:28     ` David Miller
2012-02-26  2:28     ` 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=4F4CDB84.7070502@antcom.de \
    --to=stigge@antcom.de \
    --cc=linux-arm-kernel@lists.infradead.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.