summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-08-08 21:51:18 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-08-08 21:51:18 +0000
commit7f9bfa3fcd05aa1ee864ba07b8f74bd6cd6de025 (patch)
tree533db97a66b0029d8646d193b7fb0132abff7d3f /target
parent5e877f02b4c12076623c5d42a3c4e0ba14221fdd (diff)
downloadmtk-20170518-7f9bfa3fcd05aa1ee864ba07b8f74bd6cd6de025.zip
mtk-20170518-7f9bfa3fcd05aa1ee864ba07b8f74bd6cd6de025.tar.gz
mtk-20170518-7f9bfa3fcd05aa1ee864ba07b8f74bd6cd6de025.tar.bz2
nuport-mac: rework PHY interrupt configuration to avoid races
SVN-Revision: 33070
Diffstat (limited to 'target')
-rw-r--r--target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c
index 8cd3d0e..833e6fa 100644
--- a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c
+++ b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c
@@ -765,7 +765,12 @@ static int nuport_mac_open(struct net_device *dev)
goto out_emac_clk;
}
- phy_start(priv->phydev);
+ ret = request_irq(priv->tx_irq, &nuport_mac_tx_interrupt,
+ 0, dev->name, dev);
+ if (ret) {
+ netdev_err(dev, "unable to request rx interrupt\n");
+ goto out_link_irq;
+ }
/* Enable link interrupt monitoring for our PHY address */
reg = LINK_INT_EN | (priv->phydev->addr << LINK_PHY_ADDR_SHIFT);
@@ -779,12 +784,7 @@ static int nuport_mac_open(struct net_device *dev)
nuport_mac_writel(LINK_POLL_MASK, LINK_INT_POLL_TIME);
spin_unlock_irqrestore(&priv->lock, flags);
- ret = request_irq(priv->tx_irq, &nuport_mac_tx_interrupt,
- 0, dev->name, dev);
- if (ret) {
- netdev_err(dev, "unable to request rx interrupt\n");
- goto out_link_irq;
- }
+ phy_start(priv->phydev);
napi_enable(&priv->napi);