Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3080997pxj; Mon, 17 May 2021 17:16:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQUmtylZQPDvH/49adHMNKkk+nbsTnIwF+lNn6U98BnUiSg+mk7YcNPfKAWIFy0WMiZqoy X-Received: by 2002:a17:906:13db:: with SMTP id g27mr2876913ejc.88.1621297019667; Mon, 17 May 2021 17:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621297019; cv=none; d=google.com; s=arc-20160816; b=E3xSoWP4/rI5TDXxnay+2V4csbuVohTwuVXPNgXA/cH+5IsDEi1EfhfXDx4RGlSbZE R86FTYi0k05vfjROqLHwq74llH5KjhxSBDHXop1QRLpLcTRDN5shyEArLQgwr7EGI+SH wVJ2bCJPxyYVljqVzWsk950Gd4rGuQDT2rwgjYVnDWwPU6ynbxPKlOsW0Dwfz1lsRhxy kcHUgAAnT2qhfkrJlPP+6b+Wl42d000gyq1LFNCBxP4Q52P2G8z+q1QDcj4gdJWyXJ1T 5Vy9I/3DDVgFhjUfz3GTCL+UMlcK4qlRp7pCLh2zT14l5hjSUufh+OFjr1W621QlwStg xiQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QMnpcHa7FCGbZo80bA6yA7gzC9gOTc/udfGrOpa9w48=; b=yaA9rr6Tssdi3qamKGofL1bJ6fteZOcLFO3/LcXx6lmaNPwrYu7FCEY+lViW6C+fub 92vLQhhB51KJywOOgxwBL8UgXuYewuztD0gWqHvyKS3sBKOzksXfwiqTY+LhXk1daX8+ PJVJxtEd094FySv33LkNesTE3945sxfLY5cR+6k8SZOu+8zr0TdRr7H+zEAHd7+Jc83K Dw5EY08rTZCUDoihW7+YzBj3RdAJqAi5C2W6eQanwp7y6d5eOOjjVJaGCk/E6rtSsoP0 N01dojW46phZJ3Qsdkav+Uya3N9DzmX8foVhcaeWHh+Jw6s4zdOJoy5nmLgmsjS6J5KA VE6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hC5Ng7DB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly3si15404816ejb.337.2021.05.17.17.16.30; Mon, 17 May 2021 17:16:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hC5Ng7DB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239043AbhEQO00 (ORCPT + 99 others); Mon, 17 May 2021 10:26:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:36052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235185AbhEQOWf (ORCPT ); Mon, 17 May 2021 10:22:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A1BD161460; Mon, 17 May 2021 14:12:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260728; bh=gKMpMf3gz74yna0MMct72I2wOxJOuxUhgHeuDtqBqeo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hC5Ng7DBfi068Z9HyO9m1MGotbJh6WEShCaWfsJHyGMplK0yHPxL5AjnsDKIwVRni 8mAWH1aQP0rHYLMj626cU5E0yNeHnz5SRbFO3FBXwqZ20vefaxDoM1xW9l+F7oOQj9 8RdKSQcW0QX7+s9VsXsuarZdxWT7EQQm4CL1ohOQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ramesh Babu B , "David S. Miller" , Sasha Levin Subject: [PATCH 5.12 212/363] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off Date: Mon, 17 May 2021 16:01:18 +0200 Message-Id: <20210517140309.749161361@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ramesh Babu B [ Upstream commit 4c7a94286ef7ac7301d633f17519fb1bb89d7550 ] In promiscuous mode Receive All bit is set in GMAC packet filter register, but outside promiscuous mode Receive All bit is not cleared, which resulted in all network packets are received when toggle (ON/OFF) the promiscuous mode. Fixes: e0f9956a3862 ("net: stmmac: Add option for VLAN filter fail queue enable") Signed-off-by: Ramesh Babu B Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 29f765a246a0..aaf37598cbd3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -638,6 +638,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw, value &= ~GMAC_PACKET_FILTER_PCF; value &= ~GMAC_PACKET_FILTER_PM; value &= ~GMAC_PACKET_FILTER_PR; + value &= ~GMAC_PACKET_FILTER_RA; if (dev->flags & IFF_PROMISC) { /* VLAN Tag Filter Fail Packets Queuing */ if (hw->vlan_fail_q_en) { -- 2.30.2