Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325555

Re: [PATCH 1/2] net/smscx5xx: use the device tree for mac address

From Lubomir Rintel <lkundrak@v3.sk>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] net/smscx5xx: use the device tree for mac address
Date 2016-02-03 16:50 +0100
Message-ID <qY7QS-3Om-11@gated-at.bofh.it> (permalink)
References <qY7ea-3y7-19@gated-at.bofh.it> <qY7ea-3y7-23@gated-at.bofh.it> <qY7xw-3G4-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2016-02-03 at 16:23 +0100, Arnd Bergmann wrote:
> On Wednesday 03 February 2016 16:02:38 Lubomir Rintel wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> > 
> > This takes the MAC address for smsc75xx/smsc95xx USB network
> > devices
> > from a the device tree. This is required to get a usable persistent
> > address on the popular beagleboard, whose hardware designers
> > accidentally forgot that an ethernet device really requires an a
> > MAC address to be functional.
> > 
> > The smsc75xx and smsc95xx drivers are just two copies of the
> > same code, so better fix both.
> > 
> > Tested-by: Lubomir Rintel <lkundrak@v3.sk>
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > 
> 
> I have no memory of writing this patch, where did you find it?

2011's discussion: https://lkml.org/lkml/2011/3/17/416
(Link also in the cover letter).

> The changelog sounds like I wrote it, so I assume it was me after
> all.
> 
> > +       address = of_get_property(dev->udev->dev.of_node,
> > +                                 "local-mac-address", NULL);
> > +       if (address) {
> > +               memcpy(dev->net->dev_addr, address, ETH_ALEN);
> > +               return;
> > +       }
> 
> This should use of_get_mac_address(), not an open-coded property
> lookup. The function was probably added after I wrote the
> the original patch.

Okay. Will fix that up once I get feedback for the devicetree part.

> 	Arnd

Thanks,
Lubo

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] net/smscx5xx: use the device tree for mac address Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 16:10 +0100
  Re: [PATCH 1/2] net/smscx5xx: use the device tree for mac address Arnd Bergmann <arnd@arndb.de> - 2016-02-03 16:30 +0100
    Re: [PATCH 1/2] net/smscx5xx: use the device tree for mac address Lubomir Rintel <lkundrak@v3.sk> - 2016-02-03 16:50 +0100

csiph-web