diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-07-21 22:29:26 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-21 23:04:31 (GMT) |
commit | 8fdb0e0fb972f9665dd21aa69825ba748ebbdf45 (patch) | |
tree | e67557a60601aef5f98aec75a8cc8f6d92a06492 /drivers/net/ethernet/broadcom/genet/bcmgenet.c | |
parent | c3ae64ae0c08b3ff7fe0dea4d43c586f02a3adb5 (diff) | |
download | linux-8fdb0e0fb972f9665dd21aa69825ba748ebbdf45.tar.xz |
net: bcmgenet: handle UMAC_IRQ_MPD_R interrupt bit
Handle UMAC_IRQ_MPD_R interrupt bit in our workqueue to make sure that
we properly re-configure the GENET adapter from Wake-on-LAN.
bcmgenet_power_up() makes sure that we will not leave the UniMAC
hardware in MagicPacket matching mode, since that would prevent any
other packet from being received.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index f5118f4..319b943 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -1836,6 +1836,13 @@ static void bcmgenet_irq_task(struct work_struct *work) netif_dbg(priv, intr, priv->dev, "%s\n", __func__); + if (priv->irq0_stat & UMAC_IRQ_MPD_R) { + priv->irq0_stat &= ~UMAC_IRQ_MPD_R; + netif_dbg(priv, wol, priv->dev, + "magic packet detected, waking up\n"); + bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC); + } + /* Link UP/DOWN event */ if ((priv->hw_params->flags & GENET_HAS_MDIO_INTR) && (priv->irq0_stat & (UMAC_IRQ_LINK_UP|UMAC_IRQ_LINK_DOWN))) { |