diff options
author | Nimrod Andy <B38611@freescale.com> | 2014-12-11 02:20:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-11 05:37:01 +0100 |
commit | 0c5a3aef9ffc8a7a6fb74be6d87e066b5424f8c3 (patch) | |
tree | 4a549a98368a3f9baa6e552dc3072b4da535c070 | |
parent | net: fec: clear all interrupt events to support i.MX6SX (diff) | |
download | linux-0c5a3aef9ffc8a7a6fb74be6d87e066b5424f8c3.tar.xz linux-0c5a3aef9ffc8a7a6fb74be6d87e066b5424f8c3.zip |
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 <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |