Le 09/08/15 19:42, Fugang Duan a écrit :
> 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.

Since this is a bug fix, do not you intend to target the "net" tree
instead of "net-next"?

> 
> Signed-off-by: Fugang Duan <b38...@freescale.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c 
> b/drivers/net/ethernet/freescale/fec_main.c
> index 91925e3..cd09dbb 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3029,6 +3029,9 @@ fec_set_mac_address(struct net_device *ndev, void *p)
>               memcpy(ndev->dev_addr, addr->sa_data, ndev->addr_len);
>       }
>  
> +     if (!netif_running(ndev))
> +             return 0;
> +
>       writel(ndev->dev_addr[3] | (ndev->dev_addr[2] << 8) |
>               (ndev->dev_addr[1] << 16) | (ndev->dev_addr[0] << 24),
>               fep->hwp + FEC_ADDR_LOW);
> 


-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to