Home
last modified time | relevance | path

Searched hist:"9638 d19e481605217f95d9ab3c8896e499b1407d" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/net/ethernet/freescale/
H A Dfec_main.cdiff 9638d19e481605217f95d9ab3c8896e499b1407d Thu Sep 10 03:35:39 CEST 2015 Nimrod Andy <B38611@freescale.com> net: fec: add netif status check before set mac address

There exist one issue by below case that case system hang:
ifconfig eth0 down
ifconfig eth0 hw ether 00:10:19:19:81:19

After eth0 down, all fec clocks are gated off. In the .fec_set_mac_address()
function, it will set new MAC address to registers, which causes system hang.

So it needs to add netif status check to avoid registers access when clocks are
gated off. Until eth0 up the new MAC address are wrote into related registers.

V2:
As Lucas Stach's suggestion, add a comment in the code to explain why it needed.

CC: Lucas Stach <l.stach@pengutronix.de>
CC: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>