Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6516806yba; Tue, 14 May 2019 08:50:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+v5l0QrR5br54sSnOuIHDNZhEczVzkFDZ6xGzxn4w+76L32wou6l7BEf8KbXcRNGqqfrQ X-Received: by 2002:a65:5248:: with SMTP id q8mr37847521pgp.92.1557849021631; Tue, 14 May 2019 08:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557849021; cv=none; d=google.com; s=arc-20160816; b=F83B9rZCLYeFkIhYqWrAB9eEppomC6NsQk6Uf0/UxG/nb3HVZ0A2srWdJcYiSPO9nQ 8C46Gbmp8C/RCg/UAk+wQeEwHdZxGE24hAiwYeXZjOyT86qhj8yP9Fu8YXDQP6q0ly4A /rummE367WJZW2x0zkC9QUtu40JFV/nWAD4LIc2UpkUeFebRovEn0M++r5P41C14TG5S EuT7o5sOF46g/WkPsHsiUgAlIWdEBiGym997WU+DeY2mLsQJbeHi0C8W+f14IPNChOnV T4MmuKTYFbdsM67Qz2tw00nAnV1M767TwgdAeSOnHpniFy9G56KI8VUlfCxXtZcIeyP7 NJHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=I6jUeOA/YhpF4FQWoFPoTdRDhSQ3tmonA8JaBxBKMog=; b=JfOGyDPk+menTLi/hL4wC4LkIdDZVPsLjGha0qRm05E1gw0daX44sJVCtFoetyyNGV 5oC2KOWQfuhlSOBXEBmMPUrZsXSIQZSHb9OeSdn0Ek/sF+c/OmBs7Oo+KhFbVn2zB7N6 oxpjR/3P3tEmSq/wQBlHh8KIzV1gM0sjhQW/Kug2x1W6ceDm5GWg1Xv7KkWm4ww33cyH +SXzjRykfdP4kejRvzVjmuBgR5L6DGmg8LVY4pfMZyCRouBVIgt+VZS1LmlTmM5xvMBq a/3wj6Vlsp0u2uLWRp2W/YLxhvdw6TBhdgl2+qzofHWiKUvE+ICedVqW0S1/ST+b5obB BPbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=kImKw8Sg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si484518pll.2.2019.05.14.08.50.07; Tue, 14 May 2019 08:50:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=kImKw8Sg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726916AbfENPrU (ORCPT + 99 others); Tue, 14 May 2019 11:47:20 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:35804 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726246AbfENPpl (ORCPT ); Tue, 14 May 2019 11:45:41 -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 228C2C0991; Tue, 14 May 2019 15:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1557848732; bh=nU4eyfuhVOYZ4Njb6dkyUp+NF+GLuqM+QrOrWCyNdeQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=kImKw8SgXBP438IdiC2+clkKPY804C16u3ur10wTwDxSibhcG1cN0hMNk72MwwnDu by9limBufNU4UmVFzIPxX4KCNlVeH5s0mxxvTJSOBZ52tWMeHkQTEnr4NH2Xp+Gu8q EgIz/5OjKHL9NM9EA5XgW6k5BHyWw1UaeWK6NKgx/xMdxBr4rrAOvGgaMGBMu3i0rq rbnsuPbuaE/wUje433HHSl1VTFkAV4TiZUL34EsR1058cks7Woh7TKFKGvhsW3qV1w VPNlLVx8EBwMqx779hvmjNAPKv9i3xi0yFMm1s7vBbv6Nxv0bc4kxYTdEuvNqzF5ir 6oRQjX2tL+6kw== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 4E718A0250; Tue, 14 May 2019 15:45:41 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id C63D73EA31; Tue, 14 May 2019 17:45:39 +0200 (CEST) From: Jose Abreu To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jose Abreu , Joao Pinto , "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue , Corentin Labbe Subject: [RFC net-next v2 10/14] net: stmmac: dwxgmac2: Also pass control frames while in promisc mode Date: Tue, 14 May 2019 17:45:32 +0200 Message-Id: <1404f154579c30549ba62cb95cdf8516dc2b7882.1557848472.git.joabreu@synopsys.com> 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 the selftests to run the Flow Control selftest we need to also pass pause frames to the stack. Pass this type of frames while in promiscuous mode. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h index f629ccc8932a..b8296eb41011 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h @@ -40,6 +40,7 @@ #define XGMAC_CORE_INIT_RX 0 #define XGMAC_PACKET_FILTER 0x00000008 #define XGMAC_FILTER_RA BIT(31) +#define XGMAC_FILTER_PCF BIT(7) #define XGMAC_FILTER_PM BIT(4) #define XGMAC_FILTER_HMC BIT(2) #define XGMAC_FILTER_PR BIT(0) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c index c27b3ca052ea..bfa7d6913fd4 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c @@ -310,7 +310,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw, u32 value = XGMAC_FILTER_RA; if (dev->flags & IFF_PROMISC) { - value |= XGMAC_FILTER_PR; + value |= XGMAC_FILTER_PR | XGMAC_FILTER_PCF; } else if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > HASH_TABLE_SIZE)) { value |= XGMAC_FILTER_PM; -- 2.7.4