Skip to content

Commit 6107dbd

Browse files
committed
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: David S. Miller <davem@davemloft.net>
2 parents 889711a + 0cf45a3 commit 6107dbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/renesas/sh_eth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,6 +1605,8 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
16051605
sh_eth_write(ndev, felic_stat, ECSR); /* clear int */
16061606
if (felic_stat & ECSR_ICD)
16071607
ndev->stats.tx_carrier_errors++;
1608+
if (felic_stat & ECSR_MPD)
1609+
pm_wakeup_event(&mdp->pdev->dev, 0);
16081610
if (felic_stat & ECSR_LCHNG) {
16091611
/* Link Changed */
16101612
if (mdp->cd->no_psr || mdp->no_ether_link)
@@ -1624,8 +1626,6 @@ static void sh_eth_emac_interrupt(struct net_device *ndev)
16241626
sh_eth_rcv_snd_enable(ndev);
16251627
}
16261628
}
1627-
if (felic_stat & ECSR_MPD)
1628-
pm_wakeup_event(&mdp->pdev->dev, 0);
16291629
}
16301630

16311631
/* error control function */
@@ -3271,7 +3271,7 @@ static int sh_eth_wol_setup(struct net_device *ndev)
32713271
sh_eth_write(ndev, EESIPR_ECIIP, EESIPR);
32723272

32733273
/* Enable MagicPacket */
3274-
sh_eth_modify(ndev, ECMR, 0, ECMR_MPDE);
3274+
sh_eth_modify(ndev, ECMR, ECMR_MPDE, ECMR_MPDE);
32753275

32763276
/* Increased clock usage so device won't be suspended */
32773277
clk_enable(mdp->clk);

0 commit comments

Comments
 (0)