diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-08-08 21:51:18 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-08-08 21:51:18 +0000 |
commit | 9ded359521b7b8de47cb01c2ed6c53f6922b504c (patch) | |
tree | e0c973e4152820951db033188cb43abdde8f1abf /target/linux/mcs814x | |
parent | 6f503e42e080097cbfc1397ba887cd7edb378819 (diff) | |
download | master-187ad058-9ded359521b7b8de47cb01c2ed6c53f6922b504c.tar.gz master-187ad058-9ded359521b7b8de47cb01c2ed6c53f6922b504c.tar.bz2 master-187ad058-9ded359521b7b8de47cb01c2ed6c53f6922b504c.zip |
[mcs814x] nuport-mac: rework PHY interrupt configuration to avoid races
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33070 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mcs814x')
-rw-r--r-- | target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c | 14 |
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 8cd3d0e6b6..833e6fa018 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); |