]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
stmmac: fix PWRDWN into the PMT register for global unicast.
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Fri, 16 Sep 2016 08:50:13 +0000 (10:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Sep 2016 02:21:06 +0000 (22:21 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

index cbefe9e2207cac01a418eb8df24fb8c82278c502..885a5e64519d7af0062955294b083c097df45a06 100644 (file)
@@ -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);
index df5580dcdfedd22c64fb79d7b0b6687cc3996af5..51019b794be52dede1b50f8ac6d09ff1b09762fe 100644 (file)
@@ -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);