From patchwork Wed Nov 27 20:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180316 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6629271ilf; Wed, 27 Nov 2019 12:41:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyqCX66GswKXlbIzY3GYlcV//FHI9uGI3uvK8xw6/Gd6LcrGbutTFIlIvGyuuDfZonbgQGX X-Received: by 2002:a05:6402:2d7:: with SMTP id b23mr2248378edx.272.1574887307958; Wed, 27 Nov 2019 12:41:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887307; cv=none; d=google.com; s=arc-20160816; b=Zc2U5qeiP7OdlgUgfVD5AM5WL49H0T7Ie1tyPTKxcQ6kr3DLHZzmI6YEoOaTQV7dO3 uIhC7QIb6esSNtL9kRtAcUGg2UO7nOJy9am34QQYWDEPujNbDCrjEPCGK72O1Laj3Qj5 ki+xXNxS/EWvBstcjQT99MIv9I8i5sfzGv4QsIwynfm4CQBKYM2PYl0N0J13Z+dqKS7+ PcFndG6AxNbvYh5xLKJ6T49YvADUBQaC/Rjjne3umjCgiocbz5jZoXGEBcuJeMsvCnvi gfuwTmjWipDBpMzn7/o9YadrQ5TNy0ZoGF7jb/iHAaGEwuNM1cT0hH+BvJBMlGYA54Vn clNQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8sv+6ljsUVrm2juiJfxo58RSaQtuJVB9S93irB2yMJA=; b=F1lYJO2wtSNeBmedZ3hoFSM3b1Pj5uASC9X4csHTkAOIB2pi9+wUMn/sWbL/C/hUAM vvjUfL85DGbvUIeEHa4hXQPSdW8ioSM9eudINlvPVwfEFPiG0ZUWc+V6o9vntB+9hyzo vYRF4oQia8SYg7G2NlicgfZfux4Zq2T0hW2m3t1KX7adWOObtqHfeLN0i7flrBHNnv8a +6gT2n8Lttx27oMQla8vB5Q50Ok+LL7q9JKT0v/kCetqa4k6Q3u+8pQmR4pqj7WnJZn7 fLXBLEfHNDT2FzVftdc8Ca+mzF74aipvFk2LeujIxkLwUjAiy7CzZeNZPKDDQk0/uBAD PanQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GTWTM47o; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ly22si10396473ejb.300.2019.11.27.12.41.47; Wed, 27 Nov 2019 12:41:47 -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=GTWTM47o; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbfK0Ulp (ORCPT + 26 others); Wed, 27 Nov 2019 15:41:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:47106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729228AbfK0Ull (ORCPT ); Wed, 27 Nov 2019 15:41:41 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E184320863; Wed, 27 Nov 2019 20:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887300; bh=20y6msOi7lmlQ6mQ3DWuL9/PRbBq+fbqGSZPVLo2ebQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GTWTM47ok0STCqMTejmw68W8cQ1in7xYPjPN7rZF980FN60RuGdipptVRXM0AJArn 9AmZKNRtsC7jF+XFe8ycPIKhGMyutyKSpnoDK6sW9/DqEsRkRqCx1guxvRvV1JyHmM qrHVKCt6QxQJT3tZqQReQoQXaiu/VZL+hiYoUfio= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ivan Khoronzhuk , Grygorii Strashko , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 056/151] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Wed, 27 Nov 2019 21:30:39 +0100 Message-Id: <20191127203032.340864685@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203000.773542911@linuxfoundation.org> References: <20191127203000.773542911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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(+) -- 2.20.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index d7cb205fe7e26..892b06852e150 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -590,6 +590,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);