Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2633325ima; Mon, 22 Oct 2018 13:08:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV60N0n8fdBk+eZUY8i0pKzkHpIJuhbVc7GqFIxlBrurYNcaaXWaQkhmm8VDDKSldLcV4uC/5 X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr47057424plf.286.1540238901825; Mon, 22 Oct 2018 13:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540238901; cv=none; d=google.com; s=arc-20160816; b=1AGSS8/eZAj4ImCIQk2qRLwmCNXGdKRdWP4lPwNgbhgxUaJZaPI4JmNfXtfOg5xw/c S3/LXZMCGZhGEiql7RQcN7bbACS3DQ9PjA29ICjE8+MBoYaf7S1mejSdxfHpGLFvliF/ pxCGjN6tlL9KeLB0LRnMJ1SKXw0568wCFINFKNv7FWfbOSlYSD6Q+Wg6DgXyCraCB4kd 5sD5VWp0K0oVDTyN9hD/WYfmcxoweqccItxmY8S8ZJc1k6JSlSzRLMbrRPNzuWrPN5I+ eh+kLvlP0KDYKUt8gV/A4G5zuYfWCtb8V4ZgFB1zcjiAP/UeI6BtQZtCrDfof78wZbAE 2Heg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=eA8Rg59dDQxH06VYFGu93+Pi57FUmhMP1ESgTyENeQo=; b=B0pFkVxCXsK+aucoIJVpuPWXNJmm2u9DOAb3thJVXodY+aN0808yDWdLtZnbWfGeWK +gf74GNpjCnwSCcApq92QJvH9YQoUPCq7QYK8C2NhgCi3J5vok+PMlACLlAINhnMhB7C pHOW/9WEu8kypC1Z1ZDOp5nDCPHrcPptB5WpZBh69RwXNa0/6TPmd/zlwz24T85vduVo jlXrjpdPwV/JeGVwAL+9/vxjkqwvWOPMlLpa7ZhU00WBkoa3qRe+qX7Vq5V+dQKf2KXC 0EjrXbzXQSeVGmVSgaiStYzXyAz2vv3s9FrloL5vW6HhJMLo4QRiqI3NI0elndeCDuwc Sjug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KUquArPM; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z189-v6si29386335pfz.32.2018.10.22.13.07.49; Mon, 22 Oct 2018 13:08:21 -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=@linaro.org header.s=google header.b=KUquArPM; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729042AbeJWDLy (ORCPT + 99 others); Mon, 22 Oct 2018 23:11:54 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:40444 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728335AbeJWDLy (ORCPT ); Mon, 22 Oct 2018 23:11:54 -0400 Received: by mail-lf1-f65.google.com with SMTP id n3-v6so4389937lfe.7 for ; Mon, 22 Oct 2018 11:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=eA8Rg59dDQxH06VYFGu93+Pi57FUmhMP1ESgTyENeQo=; b=KUquArPMYpNiss6HPj1hWxBYtlUv8jdH18zIu1S/bXjyQ1ZMn0UfMjO3YzqWHT1NoW FmPriiRAfZOsPg6EMl9FNA4rYj/+3IbjcfIwile8pjIzluVZl8ow/vvn2WKZJn2eWXlL BP2kSTEUNi0F8GXrtHyffuNYFlct+KwUbpd5o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=eA8Rg59dDQxH06VYFGu93+Pi57FUmhMP1ESgTyENeQo=; b=K9LBPFH179DGEqcYrSgoq3GtytwTiwo4S7Y6jiigYH1Rx0/BLA9XRxEvCtYrGRn47n GsYCfNQ2RMB6sAV/u3BJyF2fXuMiB6j4FdC1d/5qYuwIujvEMVHHTwWK+5X3/JuO2x43 lYB10gy6BjflCIBpWqjw5h/QarFJ9ywhvcCJx0RKqP13IxlvsIyWFsvjAEZiw0dNPPcw quX3kI+bqDh3Afk0Nme8OQSx8aWRTTxe9dxtGxZ8dhhwchkdF75vZ5wO1r/q91oVugs/ feOTEyAyuNFx3vVMUMEPJma1Pl6qp7AKjE3fVPp4VSqe9GZ7JNbpAMuc5GTIvs3rG91B fgxw== X-Gm-Message-State: ABuFfohpRkRRzycfgIya6s/W7OmfkP0OxxekUQwbpgH/GyQZfiTIz8IC ysGqSWYOERWe3geTPdZlK3It9w== X-Received: by 2002:a19:945b:: with SMTP id w88mr9978835lfd.15.1540234330907; Mon, 22 Oct 2018 11:52:10 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id n5-v6sm1431377lje.91.2018.10.22.11.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 11:52:09 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, davem@davemloft.net Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH v2 net-next] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Mon, 22 Oct 2018 21:51:36 +0300 Message-Id: <20181022185136.8215-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- Based on net-next/master 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 226be2a56c1f..f7753b240ced 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -640,6 +640,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.17.1