From patchwork Mon Oct 22 18:51:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 10652381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ACFC313B5 for ; Mon, 22 Oct 2018 18:52:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6591C29132 for ; Mon, 22 Oct 2018 18:52:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57F382913E; Mon, 22 Oct 2018 18:52:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECE7629132 for ; Mon, 22 Oct 2018 18:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728758AbeJWDLy (ORCPT ); Mon, 22 Oct 2018 23:11:54 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33576 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728536AbeJWDLy (ORCPT ); Mon, 22 Oct 2018 23:11:54 -0400 Received: by mail-lf1-f67.google.com with SMTP id o21-v6so31266091lfe.0 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=sb4ZLQyURreM3y2vzVly6POYZtin3w/jPtWY/o93LdhwLM7Ff5UTcWv4kBxgyL4vdA cqT9zfrp8WT7jFS6x1jea1D/ch9HxuH/FxB6pS+h7JPAz5yw9XqvdJ5j1q/GNy3neaEh kPyEkdlXSsUZM0u1/j36UoKzMN/hE1xOuqdVejWFylgGxDoiGBIcWI5Qw0tT9AS0SudJ EWyGIWiJoxbV38osVTDYYsOXUZRxFG2afCTCYIVGqMyoHoQ98InsQc3MHRG6GKn7fa4Z sHRNN513i+v4NqjVbV9bHxIKbJlaJp+YXJjoEHzdoA4ZsSvSr2l2tZAmUXzbsteNmoo9 O4oA== X-Gm-Message-State: ABuFfohRdZJlCNH6KVWcU6peSe9DARmW+RpRDf2GYi9anxzy42yKGgBT xQPhCxq7dnJGJbiedJ3xsUXonA== X-Google-Smtp-Source: ACcGV61ZlXrOG6WmwEQYikK+gXc+24D3hnVMe547uL5CAZBpnxCwaGN1+HSmBbx9C03yQya8ZvzFxA== 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);