From patchwork Fri Oct 19 20:25:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 10650147 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 A220517DE for ; Fri, 19 Oct 2018 20:25:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 917CB28066 for ; Fri, 19 Oct 2018 20:25:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 842C028178; Fri, 19 Oct 2018 20:25:55 +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 2CAA828066 for ; Fri, 19 Oct 2018 20:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbeJTEdZ (ORCPT ); Sat, 20 Oct 2018 00:33:25 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46860 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbeJTEdY (ORCPT ); Sat, 20 Oct 2018 00:33:24 -0400 Received: by mail-lf1-f65.google.com with SMTP id p143-v6so15129247lfp.13 for ; Fri, 19 Oct 2018 13:25:46 -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=cCUIugiLMER/xH04Wj+/MbJ4pAGG/uz7i8oFI3ij0Ng=; b=FtK0r23Kh0jE/3fhL8VZuaaxhigqSsxswmbZnWotWhn+GLFFl9YJF6oQKKKvX4L8P/ ik9hRIk+Ftx4ZOxfvwv3BgSTed8tTScqSfoZWzcCs6Iy76tzE1nI+EIQpob+9o7ttsEx tXgMN5IYm06bjfbHCPKYOiN2INRMBfQx3tdgw= 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=cCUIugiLMER/xH04Wj+/MbJ4pAGG/uz7i8oFI3ij0Ng=; b=EoIV/WNmvGI2mybEOiIHb2VV+b0uiBtQ6ieMulD6qzIsFlmjcLZXpqahvyZPdbdHxd dPsSl5ZBamZJxy/Vajyfh8lqk/ff6wH2byheiPFYtF4PMn34L5yG0TcbnwjErQszq1ow HTKtk4gLWvTTka4OYpMF7GertSy0qvCJ/EhQVV2tgHAJ/wGtkdxj7OG2sH4RgwUnINoY hLfmNlKs06V55g8UT2pQia8ImyJeuHpnFvBCYt67k5s0kwmozVa+Vtxuj62jCPYTnNow UWZhkxBp7iv/5J2K8VBvasjjfAMxsmHRarlJoa9zSkweruXf7NWydGXafzZLY9z1SoNa tbjQ== X-Gm-Message-State: ABuFfohkL4i1ePtZQMAHKxgh2srB8wWbGGt2XEXrjiE3bZYfRbk2eIVZ RUzLRt7NIQhgjRkRJ7VNpqeEkQ== X-Google-Smtp-Source: ACcGV61CT+jy+Skd5SbcQPHLucNtfZIvUPOsdEeZOQZtEFTWFLtQGdhBqSrhsxNNo+QyY0KBzFkbNg== X-Received: by 2002:a19:c4c5:: with SMTP id u188-v6mr511450lff.141.1539980745287; Fri, 19 Oct 2018 13:25:45 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id p63-v6sm5425995lfg.46.2018.10.19.13.25.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Oct 2018 13:25:44 -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 net-next] net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode Date: Fri, 19 Oct 2018 23:25:41 +0300 Message-Id: <20181019202541.10278-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. Signed-off-by: Ivan Khoronzhuk --- Based on net-nex/master and is logical continuation of the https://lore.kernel.org/patchwork/patch/1001633/ 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);