Commit 6107dbdb authored by David S. Miller's avatar David S. Miller

Merge branch 'sh_eth-fixes-for-MagicPacket-handling'

Niklas Söderlund says:

====================
sh_eth: fixes for MagicPacket handling

This series contain two fixes for MagicPacket handling. It's based on
top of net-next and is tested on Koelsch.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 889711a0 0cf45a3b
...@@ -1605,6 +1605,8 @@ static void sh_eth_emac_interrupt(struct net_device *ndev) ...@@ -1605,6 +1605,8 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
sh_eth_write(ndev, felic_stat, ECSR); /* clear int */ sh_eth_write(ndev, felic_stat, ECSR); /* clear int */
if (felic_stat & ECSR_ICD) if (felic_stat & ECSR_ICD)
ndev->stats.tx_carrier_errors++; ndev->stats.tx_carrier_errors++;
if (felic_stat & ECSR_MPD)
pm_wakeup_event(&mdp->pdev->dev, 0);
if (felic_stat & ECSR_LCHNG) { if (felic_stat & ECSR_LCHNG) {
/* Link Changed */ /* Link Changed */
if (mdp->cd->no_psr || mdp->no_ether_link) if (mdp->cd->no_psr || mdp->no_ether_link)
...@@ -1624,8 +1626,6 @@ static void sh_eth_emac_interrupt(struct net_device *ndev) ...@@ -1624,8 +1626,6 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
sh_eth_rcv_snd_enable(ndev); sh_eth_rcv_snd_enable(ndev);
} }
} }
if (felic_stat & ECSR_MPD)
pm_wakeup_event(&mdp->pdev->dev, 0);
} }
/* error control function */ /* error control function */
...@@ -3271,7 +3271,7 @@ static int sh_eth_wol_setup(struct net_device *ndev) ...@@ -3271,7 +3271,7 @@ static int sh_eth_wol_setup(struct net_device *ndev)
sh_eth_write(ndev, EESIPR_ECIIP, EESIPR); sh_eth_write(ndev, EESIPR_ECIIP, EESIPR);
/* Enable MagicPacket */ /* Enable MagicPacket */
sh_eth_modify(ndev, ECMR, 0, ECMR_MPDE); sh_eth_modify(ndev, ECMR, ECMR_MPDE, ECMR_MPDE);
/* Increased clock usage so device won't be suspended */ /* Increased clock usage so device won't be suspended */
clk_enable(mdp->clk); clk_enable(mdp->clk);
......
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