diff options
author | Timur Tabi <timur@codeaurora.org> | 2017-01-20 17:21:04 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-23 13:03:28 -0500 |
commit | 4404323c6ac256c2a11d86fda65fbdb7d198ff8c (patch) | |
tree | cfe7c2cd98fd0cfc4212b631577216c9700fb045 /drivers/net/ethernet/qualcomm/emac/emac-mac.c | |
parent | 41c1093f2e1a33f4bf38848b4b1526903c5052bb (diff) | |
download | linux-4404323c6ac256c2a11d86fda65fbdb7d198ff8c.tar.gz linux-4404323c6ac256c2a11d86fda65fbdb7d198ff8c.tar.bz2 linux-4404323c6ac256c2a11d86fda65fbdb7d198ff8c.zip |
net: qcom/emac: claim the irq only when the device is opened
During reset, functions emac_mac_down() and emac_mac_up() are called,
so we don't want to free and claim the IRQ unnecessarily. Move those
operations to open/close.
Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac/emac-mac.c')
-rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac-mac.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.c b/drivers/net/ethernet/qualcomm/emac/emac-mac.c index 98570eb6ef1a..e4793d703ed9 100644 --- a/drivers/net/ethernet/qualcomm/emac/emac-mac.c +++ b/drivers/net/ethernet/qualcomm/emac/emac-mac.c @@ -314,8 +314,6 @@ struct emac_skb_cb { RX_PKT_INT2 |\ RX_PKT_INT3) -#define EMAC_MAC_IRQ_RES "core0" - void emac_mac_multicast_addr_set(struct emac_adapter *adpt, u8 *addr) { u32 crc32, bit, reg, mta; @@ -977,26 +975,16 @@ static void emac_adjust_link(struct net_device *netdev) int emac_mac_up(struct emac_adapter *adpt) { struct net_device *netdev = adpt->netdev; - struct emac_irq *irq = &adpt->irq; int ret; emac_mac_rx_tx_ring_reset_all(adpt); emac_mac_config(adpt); - - ret = request_irq(irq->irq, emac_isr, 0, EMAC_MAC_IRQ_RES, irq); - if (ret) { - netdev_err(adpt->netdev, "could not request %s irq\n", - EMAC_MAC_IRQ_RES); - return ret; - } - emac_mac_rx_descs_refill(adpt, &adpt->rx_q); ret = phy_connect_direct(netdev, adpt->phydev, emac_adjust_link, PHY_INTERFACE_MODE_SGMII); if (ret) { netdev_err(adpt->netdev, "could not connect phy\n"); - free_irq(irq->irq, irq); return ret; } @@ -1030,7 +1018,6 @@ void emac_mac_down(struct emac_adapter *adpt) writel(DIS_INT, adpt->base + EMAC_INT_STATUS); writel(0, adpt->base + EMAC_INT_MASK); synchronize_irq(adpt->irq.irq); - free_irq(adpt->irq.irq, &adpt->irq); phy_disconnect(adpt->phydev); |