From: Nimrod Andy Date: Thu, 11 Dec 2014 01:20:33 +0000 (+0800) Subject: net: fec: only enable mdio interrupt before phy device link up X-Git-Tag: firefly_0821_release~176^2~2717^2~6^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0c5a3aef9ffc8a7a6fb74be6d87e066b5424f8c3;p=firefly-linux-kernel-4.4.55.git net: fec: only enable mdio interrupt before phy device link up Before phy device link up, we only enable FEC mdio interrupt, which is more reasonable. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 85c955e4383f..8c5b15ee5ed7 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1075,7 +1075,10 @@ fec_restart(struct net_device *ndev) fec_ptp_start_cyclecounter(ndev); /* Enable interrupts we wish to service */ - writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK); + if (fep->link) + writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK); + else + writel(FEC_ENET_MII, fep->hwp + FEC_IMASK); /* Init the interrupt coalescing */ fec_enet_itr_coal_init(ndev);