From patchwork Wed Nov 27 20:29:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180349 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6674439ilf; Wed, 27 Nov 2019 13:26:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyPDs58gxhd6Ca9rY/mU0EdI/C6hJmpmYGx1k30hxf3wuPUNpQRCXm1+MKMurcvAe579V/F X-Received: by 2002:a05:6402:1a50:: with SMTP id bf16mr34488420edb.116.1574889998735; Wed, 27 Nov 2019 13:26:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574889998; cv=none; d=google.com; s=arc-20160816; b=u7FTUushkTho27/Qfk1dQSDmbp2WKpMHgvZIHo3STcpW4nkIyhoxnmlDSpm9EPT+9Y VbsFkXQZg3Ek7+kuye4AjXOiPCP9bpNqfDXzSF4wsuzoxron+nbzT09KwynLHaHNJCU7 ln3Vc43IMgvDh/Xhu30ztoqtJDwdELmfISCrmbGFs99sa4c6SngDEjfJa96+qNmk8ksn FlScfhoChzaIKLQYrM7+nklXwz15kfHy0QY+orNMD9BXbWLHdvgEViajYSkfgTu0pUNH 8GjSj0OyOXP6GUfokCAnsxIRzh5pJFlWxShhSsptjluJU332VMj1qEGuuMJOVuyEMeGN nu/g== 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=xAqNQXpz/EEtJlT/73j2b1RDG10dlxV0ojHxBZ5B6Mo=; b=BfVQnoC/ZINQdOStacG0KGV2KCYDSvL9dfMtoc71DhY0V93fXflM0QZDToke8lJ4S6 1E5v9ErxbTa8mv/3rJx23MaKWd7jaDWO/HgDGqo8Bkz+uCi2YW5IlmBJxeoHp41Lb70m TZ8OIGHAnJRG5jB/RXl6yJO/52cC9V5+XEOS757va9zIt0+8NqRcnEto0ghKe9KABX+m j8Loc3WU9VVnYFbJHmICVs6hjaJddBAxS8XjqW67ri7Nk0vpks2pDv9c9j1yw/o/cn8z CMHZJ2FERm2Ww54UZiXumVATIyB4R1+EZ00CtsLYLsAOZLcTG/rdSpj04XFj8bR3C1L8 Jvlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yRn21wEu; 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 k3si11357004edq.409.2019.11.27.13.26.38; Wed, 27 Nov 2019 13:26:38 -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=yRn21wEu; 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 S1731562AbfK0VA1 (ORCPT + 26 others); Wed, 27 Nov 2019 16:00:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:52222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731540AbfK0VAU (ORCPT ); Wed, 27 Nov 2019 16:00:20 -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 CE8242084B; Wed, 27 Nov 2019 21:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888420; bh=WeEIEc584qKbnLnJJjfQHq4AJ1PlgR0ZnvgFb83cxXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yRn21wEuZjCKYOWHsS5eXreXHBCupVOKiq39HpHNtIRro+dfg7kqSJ9QLfNQ+5FU5 d3AFDJeXg+xxQ6IdO2TlmkT4lmEBdRhXFjhS1LbQu/z53yjH7pp2TwnIhkaDirhZ9A zW5AnqBrlGegrkxEDkIJD9R9n/0/8Y9CUIgMQTmc= 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.19 126/306] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Wed, 27 Nov 2019 21:29:36 +0100 Message-Id: <20191127203124.320663717@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@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 1afed85550c0a..8417d4c178447 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);