From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 859B3C072B5 for ; Fri, 24 May 2019 08:21:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 488732081C for ; Fri, 24 May 2019 08:21:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="YizF1Bnj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389832AbfEXIVX (ORCPT ); Fri, 24 May 2019 04:21:23 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:35558 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389488AbfEXIUi (ORCPT ); Fri, 24 May 2019 04:20:38 -0400 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 16CB1C012F; Fri, 24 May 2019 08:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1558686046; bh=vbiINay3aeS1idUVvkAwFPMq+uSnPPCE9dguIoQsROg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=YizF1BnjeoJ/dc9xyh5d7ZLfWtrjb01BG4nsvX9r7Zg0RZBWE6U+6EcEXMTH9rGTY wCQ1W+ZhM8OpuRwdXmEPr0beV72rUxDMfIaJTXoPsf1QslErCFNXgi9AP+wqqarKB6 aCfl/hXSY3pWo/kT6GBWq+ZgEta58WVcASkpf1xihqpRmiww7uAi7fvaZ1eAxm1CZ8 +/Jb1XmAKicIGzZx/H2T5cEoWu0PrQfqIfuEPfVyM+SjxwppqfPQBl0nNATXtdTEh4 DlYa54XgO5/ScqpGXqzyY4Ts46mNMJb00rW1OQWaPJqzCRy6z/1tO+utP2MA3s9QSf gsottXG7x69aw== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 5A70CA0257; Fri, 24 May 2019 08:20:38 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id 6437D3FB1B; Fri, 24 May 2019 10:20:36 +0200 (CEST) From: Jose Abreu To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Jose Abreu , Joao Pinto , "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue Subject: [PATCH net-next v2 14/18] net: stmmac: dwmac4/5: Fix Hash Filter Date: Fri, 24 May 2019 10:20:22 +0200 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index c3cbca804bcd..01c10893b7a5 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 31679480564a..4038fe914f72 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 -- 2.7.4