]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: set mac address unconditionally
authorGavin Schenk <g.schenk@eckelmann.de>
Fri, 30 Sep 2016 09:46:10 +0000 (11:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2016 05:27:41 +0000 (01:27 -0400)
commitea0d42c7280949fd89b567dbb98c2aa57bbb11ae
treec738a32907d1d236e95e4424064175a68c27e83c
parentb32a267b4b03ccca210cf56cc6844cae96f9a6b7
net: fec: set mac address unconditionally

If the mac address origin is not dt, you can only safely assign a mac
address after "link up" of the device. If the link is off the clocks are
disabled and because of issues assigning registers when clocks are off the
new mac address cannot be written in .ndo_set_mac_address() on some soc's.
This fix sets the mac address unconditionally in fec_restart(...) and
ensures consistency between fec registers and the network layer.

Signed-off-by: Gavin Schenk <g.schenk@eckelmann.de>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 8448eb5dbf59 ("net: fec: add netif status check before set mac address")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c