net: stmmac: dwmac4/5: Fix Hash Filter
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 24 May 2019 08:20:22 +0000 (10:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 May 2019 20:45:56 +0000 (13:45 -0700)
In order for hash filter to work we need to set the HPF bit.

Fout out while running stmmac selftests

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: 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/dwmac4.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

index c3cbca804bcd0d3d9e83a3fb64d6ec46d2abe8fd..01c10893b7a5d649b5fab5dd1d8b1f1065aedbed 100644 (file)
@@ -65,6 +65,7 @@
 #define GMAC_PACKET_FILTER_HMC         BIT(2)
 #define GMAC_PACKET_FILTER_PM          BIT(4)
 #define GMAC_PACKET_FILTER_PCF         BIT(7)
+#define GMAC_PACKET_FILTER_HPF         BIT(10)
 
 #define GMAC_MAX_PERFECT_ADDRESSES     128
 
index 31679480564a0b3885db9ac4a74d5ae44bbc51ab..4038fe914f7221386efe340af828aa469d007dc3 100644 (file)
@@ -440,6 +440,8 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
                writel(mc_filter[1], ioaddr + GMAC_HASH_TAB_32_63);
        }
 
+       value |= GMAC_PACKET_FILTER_HPF;
+
        /* Handle multiple unicast addresses */
        if (netdev_uc_count(dev) > GMAC_MAX_PERFECT_ADDRESSES) {
                /* Switch to promiscuous mode if more than 128 addrs