Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp773772ybc; Sat, 16 Nov 2019 08:26:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwvUehUFFAXk97aPA5vx13ERDwKZ+2LDLQUuOH1RDdMFGvmPSbEyJwJLmfKc/0bcuqiQ5jY X-Received: by 2002:a17:906:4d99:: with SMTP id s25mr11196123eju.187.1573921605325; Sat, 16 Nov 2019 08:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921605; cv=none; d=google.com; s=arc-20160816; b=EYn6V5WhlpnjuevrHGPDoqZhNP8wFb04lqilLdlGjCu5ByCMk8Uqu2Q+SwlCGEwnoQ u6kwW4o2im0wotERP6iNxk4xJFCXnzCpfdJrzAuVoEXaX7GDlxS3dqS/SY6SjS9IQxqz 2d7FMVn5O1dTM6lwZ0JNbZ+HZx6K2+j+jv0BHD78VACGGmoCyOaySaXhYMZDyRDwn4tb I2uCLqpRIkP0Hbie10IDVXx4HR9Lh/CQWrgL6P1l1Mb8UCx1sr2kA8Rxdi6VbZIkKphy sDqbjFUQsw+nhpLmuIrtS4vLO+RWMu41Rwmbpnab8KCsZXV7lhxrVpfct1da6j5Q0XfA 4d+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rSACmMAzDWJregARIyzWjxbyZyAUl9/Wj3WUzvQDUdg=; b=DPSyb+NsME08yd9GBtqMgqp66ojNBGrsa5QYCgyijFzjqNgMWJK4Ia2CGqFa0sprRb hoqhv9ho2MKbTu/seNMDckJ3gN43LsWjWDPMmsaDzaeKLxRnbWzX3lMfFkuSns4aL9DM hJ9WhDt3DBdNi9bdtGlb5ac8Dmw3IrWcI/Y9jH8cqKmIS8XyC281d+iOk5XkiKJNUdSw 1KMHGf6p0PyPd7GBqQyDcPjEbUxcXp3c92/JhBpXMDVjgNldvz4ODP9LxZ9Wka404Shc 25lGT15dHsjVW2eq+7n6rdg/2PQJb9fv8XcE84GhvyK+JARKwcO7A/NZuC9ebB5vqTZ+ DPHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SWFnamHm; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rp9si8201330ejb.40.2019.11.16.08.26.20; Sat, 16 Nov 2019 08:26:45 -0800 (PST) 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=@kernel.org header.s=default header.b=SWFnamHm; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732015AbfKPQVy (ORCPT + 99 others); Sat, 16 Nov 2019 11:21:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:47450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728725AbfKPPn1 (ORCPT ); Sat, 16 Nov 2019 10:43:27 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EB142072D; Sat, 16 Nov 2019 15:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919006; bh=8dmS8o1S1OWyghfPQaJAbhcPEyv6AWCXgS+qPBjMVWE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SWFnamHmPeOpXYByNutqf8rIRd7MLsZRsOojIIy+4SGTcbCUx+3XdxgviAsrPOzc+ ffhb8sBp3R5SHEVS4UKMV1brNmPTy6RgjmSs5U47LlreWpTjNjU8FynlWGh9pZHhz1 rA7TxUyTVBE5xQxw+XBkjTk3in7Xbnp/pNcFXAtY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ivan Khoronzhuk , Grygorii Strashko , "David S . Miller" , Sasha Levin , linux-omap@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 108/237] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Sat, 16 Nov 2019 10:39:03 -0500 Message-Id: <20191116154113.7417-108-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ivan Khoronzhuk [ Upstream commit 9737cc99dd14b5b8b9d267618a6061feade8ea68 ] After flushing all mcast entries from the table, the ones contained in mc list of ndev are not restored when promisc mode is toggled off, because they are considered as synched with ALE, thus, in order to restore them after promisc mode - reset syncing info. This fix touches only switch mode devices, including single port boards like Beagle Bone. Fixes: commit 5da1948969bc ("net: ethernet: ti: cpsw: fix lost of mcast packets while rx_mode update") Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index ef79d2b6070b9..8f93ef74fa407 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -642,6 +642,7 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) /* Clear all mcast from ALE */ cpsw_ale_flush_multicast(ale, ALE_ALL_PORTS, -1); + __dev_mc_unsync(ndev, NULL); /* Flood All Unicast Packets to Host port */ cpsw_ale_control_set(ale, 0, ALE_P0_UNI_FLOOD, 1); -- 2.20.1