Commit 8fdb0e0f authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3ae64ae
...@@ -1836,6 +1836,13 @@ static void bcmgenet_irq_task(struct work_struct *work) ...@@ -1836,6 +1836,13 @@ static void bcmgenet_irq_task(struct work_struct *work)
netif_dbg(priv, intr, priv->dev, "%s\n", __func__); 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 */ /* Link UP/DOWN event */
if ((priv->hw_params->flags & GENET_HAS_MDIO_INTR) && 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_UP|UMAC_IRQ_LINK_DOWN))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment