Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3599134imm; Fri, 19 Oct 2018 13:26:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV60J+VlrBNGtl5xzmaG15q/3aDIa+jkV5OEllseaLkalcvWXY18Asph4FdPd05uXAYQpbkHD X-Received: by 2002:a17:902:e28a:: with SMTP id cf10-v6mr36190231plb.81.1539980786740; Fri, 19 Oct 2018 13:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539980786; cv=none; d=google.com; s=arc-20160816; b=O5Oh5FsH2jE7nwqIehvgjpChLnEfxfOIgFv4zn+uPu1q7uzGwDYJMcrp6ew7MIFiPT PvtA39Z3KuFYeuw50glzEnu+dWTaO1oRFVFJskhIbuPAjOkcKfbikpzzQk/bj5JTSx8F +nuXNutDxBOrTd1AbKUwAwLkTLUW7hfCO9GzokBIgdObIUHVvvU7Dzxl/frGY7V1JpwO uJnLw4jPUM1oI/eku3TsAtG7S77sjBsKvLkInDMhIXv9+wflf3fY9dtNL88WcTQObskL 68CYOjFDTvvtvBzKy5elORevDeG9hpbTyxZaRS2+bDFDIfyzZa2lcVof3NnAKzT1xXQl WIag== 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=jApP0Nioy3MR68ePt94whf2atjeErAUg0O8u5IpqdK04HjcbNJNLKDFujGdsWfmG9X cT4LT3iDhrjGEwdpgklEoLQTj1in0rdMsy2hdEERDQHksvQALEDsNgRlexcf37NSOL5Z mteR2bFjjvh1gEkfGGOEuwMDCRsg7nKkHB1FMNqXtiFzM/ygZrvRb8eMTi2mY0Tb+3yp 4WAKjADK2/Rjs04HpNxMsZXggm+Q6YiUOB72xdZcyCkR7+1mllfyJLDHVkTb7p19+9J/ T1a5TCdRVaee3BO+ziv4ErVLspFNlINIOH/fOHiaAoHfHoGNpEQM3muc6klpem3Q6uH4 UQdw== 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 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 u127-v6si25414640pgc.234.2018.10.19.13.26.10; Fri, 19 Oct 2018 13:26:26 -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=FtK0r23K; 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 S1726686AbeJTEdZ (ORCPT + 99 others); Sat, 20 Oct 2018 00:33:25 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:45858 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbeJTEdY (ORCPT ); Sat, 20 Oct 2018 00:33:24 -0400 Received: by mail-lf1-f67.google.com with SMTP id v22-v6so14364403lfe.12 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=fxEK650Ir6nEDqgKHiSJMIa7zFwysDiMEzJFn6K7h0b0G8+ST3SGqv5apl8Ve7FK9k pCjzQd7sYDKA1moImGdvaE0eG6TTmHpFcgL6ZAd+PEuFweR83r2JpzhCMGU4B3dhR67e QzlBX9jPTWlv/DJVT/8pVBgjbOEXJKimBNLi5SDESjFb9dtQv8hJHE3ScRIHTXHXnM1Y WmTE0OrCpJZvfaWLnxMFy9JaKSoOk/HsVZBEepMnfmemt8FufZZI8PU6aX4WsvqBqMrf dE9pMHqHJ+0U2ulnKTbhYKydJwYLHGS+oJrISR+GNxwFc1s/xYsi12ZcaulTc2Le8yfp i9bQ== X-Gm-Message-State: ABuFfoiMS49jXrMHk0Rowr9lN9cTVkRKG8gpwJOQBOiW1+/Zg+/65LxK dAt6zoxik26AMBcwSasE/wCsmQ== 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-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. 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); -- 2.17.1