From patchwork Wed Oct 31 23:03:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 149885 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp96599ljp; Wed, 31 Oct 2018 16:05:50 -0700 (PDT) X-Google-Smtp-Source: AJdET5fBG6oXtRu99JohfD3SaDAXB3WEcc/Tr+XWlOxoCtcdUSDvFndIXxhARAGoeozMyCu7F9mA X-Received: by 2002:a62:764e:: with SMTP id r75-v6mr5295787pfc.230.1541027150722; Wed, 31 Oct 2018 16:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541027150; cv=none; d=google.com; s=arc-20160816; b=fCxKGLNi+yuthnL99Nb+vBq9CdhjXtCkR3Er5hYe5ZkZSPi+/m4OVfUpOkzGomRNSi 3E2OiNhhD9txCB3ccygZawOEFBtJ3500+M0if9qCowQ+41fsuN51IeDwJOzISmt2NFtG /x+OSjBmgCoim+fMhqsOALa3NXHe3FKgpimZXhLA/HYGb6EBodrGJR6PYjXLpz3SBQKx rYFrNuU1cLEN/5JsV40+awB4ctjs4grA/9PY0yp2FmRXGlRkOrt5m5X3Dwq3nAecZJ50 AviQ2r9NVhB9dYYJH7wsqlVdAanaW0lekgHORCbYqeA8jNG8oisguXjhjcnKiANPKq/b AXsA== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=tj6iG4luhBGT7lbhLPEFvR9e3OmkqDUbq+DFF/qgcUE=; b=B5ewigyHyn5GOLJYQcAzZ11tSe/YUudREj3Mp4b47MexnbI+7zezw4DANqRFIXSaUg Rsg6216GMx6guKYcWK7skuN5bsU43encfSb7niQ9ycDnAIDCgl6tQXecNcRF4QN69or4 wNjDtGtCibMykLTfTqBJuBbwj/2mOhMdDfOGfMxJQk9jw83dPysgCdsFzyQkAv2F1ATy JGkysqlFcp3qH83f0OxBQrIgcz5FesF5lHO3XTptgYsvflhx8RJ8gvD7dstscgPiMflJ 1ktE6MCbzmKEYQM4FQe0TB64iCsUDzng6C9TS/iQ2nGIxaArmG3pN+d2tdJT0+6oSvNQ 4HDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="oUC1mT7/"; 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 f66-v6si28931028pfc.35.2018.10.31.16.05.50; Wed, 31 Oct 2018 16:05:50 -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=@kernel.org header.s=default header.b="oUC1mT7/"; 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 S1726522AbeKAIF5 (ORCPT + 32 others); Thu, 1 Nov 2018 04:05:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:52508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbeKAIFy (ORCPT ); Thu, 1 Nov 2018 04:05:54 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 0E57E20821; Wed, 31 Oct 2018 23:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027144; bh=xAdmKk/JVjAvz92xh2DUBBvhRaMTlrBku1ZbuEwDElk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUC1mT7/q5OrtL+fnakt+/wvQzYaog3uYmWrIZzLSfFwUBOlXLlWKIUuioBx/PFcE Zqj32zvhFY+IvEJnoIAebnz1gep/EWzyK05cSY/hQMWcBpln62TH1rMKA38f0GfGSp LGnMonyqyHz4viWw/49RbYBpl3hO3Df7ybZ9Bp60= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ivan Khoronzhuk , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 002/146] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Wed, 31 Oct 2018 19:03:17 -0400 Message-Id: <20181031230541.28822-2-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> 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.17.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 832bce07c385..5dd838a67417 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);