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: 149354 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3751730lji; Fri, 19 Oct 2018 13:25:49 -0700 (PDT) X-Google-Smtp-Source: ACcGV62vaWaPW+L1BUVkGQgF9SRnx15syKp66yi/PAkLddSky9AJ/yzD/CuyuyBVrqoMIZsWRkkT X-Received: by 2002:a63:6f45:: with SMTP id k66-v6mr32976652pgc.360.1539980749220; Fri, 19 Oct 2018 13:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539980749; cv=none; d=google.com; s=arc-20160816; b=mrqDLQxpska797DaLlJDAdVOVlHwtosZWoSvfblwxzqEgxxkcvjCkr2mAzU7xQ4ABZ cBXreOAxly8RYIhMUZVSujFfEkbA0qWmtNZY49W46qZGeF2LmOdNv0M+LcsgA/D0+YtZ nIH00LDLI3E9pq2BepasmtZ1i+/ok2aKAh93sTnYDSH3q0xnfNJSDAPjq1e/DXrOzZrg oD6falq2aBlveWYEcNGD8/asSEkNtbfdbLzFjK9bB5Y4vae5vIR6y0yR5DgBzorxBKUz nPEmwFM3b7dVFNtcCJJHIf32AhjCXM6SEt2AnBzgLUreQ2aS07HD2BfpjcrdpgosCT1U repQ== 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=cCUIugiLMER/xH04Wj+/MbJ4pAGG/uz7i8oFI3ij0Ng=; b=ylgJ6RfTnL1DKV2Ky5TY1K1dfgcexBq5bkRVVS5ksh+iBNwOxK5BvIf0x8tIev2egc e/J6/goK3y0k8GC7+QNdbJmO/Aox53pUWH5phtf0RIvO0svMZPHUb7RdGbNfWkNb/WyS ykGNGqraHwtc5zVnTrLlxCuzJkxsnnSxYy0Ay70RlSIJuOBDExNgOLis/TYMD4RgBVrW ekWIkjs6WYlrjm3SIVSXO0r0DjmoFkz3qZ/n/oD6WgI9erTZMWThMuGnem0Mmm4IhJAX N+oocb3Yu7/chZIyEv5kcBXAM7VkkC9dqUzDKdzkWoM1MmBdsyXFEVAGhqCuvRjzku6d dBZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FtK0r23K; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 a3-v6si24693892plp.199.2018.10.19.13.25.48; Fri, 19 Oct 2018 13:25:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=FtK0r23K; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1726500AbeJTEdY (ORCPT + 10 others); Sat, 20 Oct 2018 00:33:24 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45029 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbeJTEdY (ORCPT ); Sat, 20 Oct 2018 00:33:24 -0400 Received: by mail-lf1-f65.google.com with SMTP id m18-v6so26175098lfl.11 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=HId2iZuMDsElmj5xsFq+yiwEktN2I7zgIqGU//6zIcuVYA7Hg3OoU9IxVPAaC58rNl vPM0qVv6SDzGmtnp3f0Q6SWegW1dc5pVnh31U9GxQ9BVhCWWokdgpQVMJPNixTpY8r5o IamTowR6LZCocNXvo4MuhXJCXzM4A6gSPdTjVEjYKf/LfCZulb27HouUMA9LR/2tYC1w 6dLFbCvXYTmewaRXoT33MWBqWqfBfnW8+YV1V3N7mfIhnXHGwUwF9RKU17tGu4zMe2vg v6fTN2yUG7jYD+VMz4lmZxASTP+ehYkVDcgqkwm49AWaWtD7EUN1sngCOOtWGHpoXpkW yXLg== X-Gm-Message-State: ABuFfohwGoDetG5+tAcVZ4pOmyxSbGEC5lcnH/tOmb7enTsJGbW5H2Hl qx2W3ZDJS5QAo8hGFab+RKcOEg== 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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. 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(+) -- 2.17.1 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);