提交 0cf45a3b 编写于 作者: N Niklas Söderlund 提交者: David S. Miller

sh_eth: fix wakeup event reporting from MagicPacket

If a link change interrupt happens along side the MagicPacket interrupt
and the link change interrupt is ignored the interrupt handler will
return and the wakeup event is not registered. Fix this by moving the
MagicPacket check before the link change check.
Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reported-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5e2ed132
......@@ -1605,6 +1605,8 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
sh_eth_write(ndev, felic_stat, ECSR); /* clear int */
if (felic_stat & ECSR_ICD)
ndev->stats.tx_carrier_errors++;
if (felic_stat & ECSR_MPD)
pm_wakeup_event(&mdp->pdev->dev, 0);
if (felic_stat & ECSR_LCHNG) {
/* Link Changed */
if (mdp->cd->no_psr || mdp->no_ether_link)
......@@ -1624,8 +1626,6 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
sh_eth_rcv_snd_enable(ndev);
}
}
if (felic_stat & ECSR_MPD)
pm_wakeup_event(&mdp->pdev->dev, 0);
}
/* error control function */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册