* [PATCH (net.git)] stmmac: fix PWRDWN into the PMT register for global unicast.
@ 2016-09-16 8:50 Giuseppe Cavallaro
2016-09-19 2:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Giuseppe Cavallaro @ 2016-09-16 8:50 UTC (permalink / raw)
To: netdev; +Cc: Giuseppe Cavallaro, Alexandre TORGUE
MAC devices use the RWKPKTEN and MGKPKTEN bits of the PMT Control/Status
register to generate power management events.
So this patch is to properly set the RWKPKTEN [BIT(2)] inside the
PMT register (needed in case of global unicast).
Reported-by: Aditi SHARMA <aditi-hed.sharma@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre TORGUE <alexandre.torgue@st.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index cbefe9e..885a5e6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -261,7 +261,7 @@ static void dwmac1000_pmt(struct mac_device_info *hw, unsigned long mode)
}
if (mode & WAKE_UCAST) {
pr_debug("GMAC: WOL on global unicast\n");
- pmt |= global_unicast;
+ pmt |= power_down | global_unicast | wake_up_frame_en;
}
writel(pmt, ioaddr + GMAC_PMT);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index df5580d..51019b7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -102,7 +102,7 @@ static void dwmac4_pmt(struct mac_device_info *hw, unsigned long mode)
}
if (mode & WAKE_UCAST) {
pr_debug("GMAC: WOL on global unicast\n");
- pmt |= global_unicast;
+ pmt |= power_down | global_unicast | wake_up_frame_en;
}
writel(pmt, ioaddr + GMAC_PMT);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH (net.git)] stmmac: fix PWRDWN into the PMT register for global unicast.
2016-09-16 8:50 [PATCH (net.git)] stmmac: fix PWRDWN into the PMT register for global unicast Giuseppe Cavallaro
@ 2016-09-19 2:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-09-19 2:21 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, alexandre.torgue
From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Date: Fri, 16 Sep 2016 10:50:13 +0200
> MAC devices use the RWKPKTEN and MGKPKTEN bits of the PMT Control/Status
> register to generate power management events.
> So this patch is to properly set the RWKPKTEN [BIT(2)] inside the
> PMT register (needed in case of global unicast).
>
> Reported-by: Aditi SHARMA <aditi-hed.sharma@st.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-19 2:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16 8:50 [PATCH (net.git)] stmmac: fix PWRDWN into the PMT register for global unicast Giuseppe Cavallaro
2016-09-19 2:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).