From: Jose Abreu Date: Fri, 24 May 2019 08:20:22 +0000 (+0200) Subject: net: stmmac: dwmac4/5: Fix Hash Filter X-Git-Tag: v5.4-rc1~616^2~435^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9c5f7d783852eff099ee0a940652899ad028385;p=platform%2Fkernel%2Flinux-rpi.git net: stmmac: dwmac4/5: Fix Hash Filter 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 Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index c3cbca8..01c1089 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -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 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 3167948..4038fe9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -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