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: 987024 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FtK0r23K"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42cHVP192Jz9s4s for ; Sat, 20 Oct 2018 07:25:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726500AbeJTEdY (ORCPT ); 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-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: 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(+) 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);