diff options
author | Petri Gynther <pgynther@google.com> | 2015-03-30 10:29:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-31 21:15:01 +0300 |
commit | e122966dd9aedb666df93f5ee6007e1688194611 (patch) | |
tree | 2f3f9369ef9eda713520026913f0049960fd756b /drivers/net/ethernet/broadcom/genet/bcmgenet.c | |
parent | fac25940c5e0d6f31d56bb2a704fadad6d5e382a (diff) | |
download | linux-e122966dd9aedb666df93f5ee6007e1688194611.tar.xz |
net: bcmgenet: add UMAC_IRQ_LINK_EVENT
Add #define UMAC_IRQ_LINK_EVENT to simplify link event handling code.
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 5238b33f7b8d..bf1a8711dbc0 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -1730,9 +1730,9 @@ static int init_umac(struct bcmgenet_priv *priv) /* Monitor cable plug/unplugged event for internal PHY */ if (phy_is_internal(priv->phydev)) { - int0_enable |= (UMAC_IRQ_LINK_DOWN | UMAC_IRQ_LINK_UP); + int0_enable |= UMAC_IRQ_LINK_EVENT; } else if (priv->ext_phy) { - int0_enable |= (UMAC_IRQ_LINK_DOWN | UMAC_IRQ_LINK_UP); + int0_enable |= UMAC_IRQ_LINK_EVENT; } else if (priv->phy_interface == PHY_INTERFACE_MODE_MOCA) { reg = bcmgenet_bp_mc_get(priv); reg |= BIT(priv->hw_params->bp_in_en_shift); @@ -2271,10 +2271,10 @@ static void bcmgenet_irq_task(struct work_struct *work) /* Link UP/DOWN event */ if ((priv->hw_params->flags & GENET_HAS_MDIO_INTR) && - (priv->irq0_stat & (UMAC_IRQ_LINK_UP|UMAC_IRQ_LINK_DOWN))) { + (priv->irq0_stat & UMAC_IRQ_LINK_EVENT)) { phy_mac_interrupt(priv->phydev, priv->irq0_stat & UMAC_IRQ_LINK_UP); - priv->irq0_stat &= ~(UMAC_IRQ_LINK_UP|UMAC_IRQ_LINK_DOWN); + priv->irq0_stat &= ~UMAC_IRQ_LINK_EVENT; } } @@ -2364,8 +2364,7 @@ static irqreturn_t bcmgenet_isr0(int irq, void *dev_id) if (priv->irq0_stat & (UMAC_IRQ_PHY_DET_R | UMAC_IRQ_PHY_DET_F | - UMAC_IRQ_LINK_UP | - UMAC_IRQ_LINK_DOWN | + UMAC_IRQ_LINK_EVENT | UMAC_IRQ_HFB_SM | UMAC_IRQ_HFB_MM | UMAC_IRQ_MPD_R)) { |