Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1669781ybm; Thu, 23 May 2019 05:05:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5jvgVYWpLTMGsX+wfEiLZ9trLzbI5Bl3EPTkawQG2P7u/gWjFb7DB3rZS34Q8BBCPhjZ6 X-Received: by 2002:a17:902:404:: with SMTP id 4mr5873042ple.204.1558613109670; Thu, 23 May 2019 05:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558613109; cv=none; d=google.com; s=arc-20160816; b=VIe+VTvFt/lHvhtIwmVEyDEF6iWmNNOgHMaPY5spvNXujU8YkwMeAXgYljEZ747BUV g1QQQXDRSQGpCVmI8gsg0HJoYB0IRCWX0uYL6mYCobdeUI/D2J4f4xs722y8yDysq29t qun3cT9r8/N/OaysCFfGD1YVLxUGUSZWNz0WQmGS/d8dX7ishwGSx80w570L9vDvQ7Ei lqLOUH200Yfs7Tth9xDjKp9GpKQVhfbmAwnhYzQ8/D7qnrwNDy2HI0bsxh9C/usl3TfB wxtzBlCZVWiapK7n0k/lBXISMv3sSOnwfZ6wFnOIa1vziYdjeJEyQ0O46hyoJ7FR+w1D WYfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gZ6USsc2l3oiMka5fwNQQHojUlmT43MMpCNsVeESEeA=; b=n0l6papKlT2PjeXVCKJFSGZi3PmenJvc+p4vzzVMnMLLS+Q1UIwNFBoVX4DOQRqT6c BVdTkd98rSapw7yDOjLn1UspjuJb8ytYnf7PU5U9ObYTcwsaMF9kp+mkr2JEMGWhpmz5 uMp2g5+Frd+TJxkcf4+1ENUM2DQGHcpKUwGWNq/6j+LQ8kJV89IAg8z1xXh2GX1PW5+n L6OsfOSLUdp5RWLxrKtnCdZyLONsJHjMmN4j0YmFQl0J8SK/Xe1egVGB30HjUMbGmWAA acapvERaVsSTYarJzNTfJbifXOwYzuwKEzoZI40XRpx/jFDEUG3GhYHg319iZcqVA2lN NGTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@geanix.com header.s=first header.b=kJ9FPLj5; 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=geanix.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si30090084pgi.568.2019.05.23.05.04.53; Thu, 23 May 2019 05:05:09 -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=@geanix.com header.s=first header.b=kJ9FPLj5; 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=geanix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730709AbfEWMCl (ORCPT + 99 others); Thu, 23 May 2019 08:02:41 -0400 Received: from first.geanix.com ([116.203.34.67]:60966 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730602AbfEWMCk (ORCPT ); Thu, 23 May 2019 08:02:40 -0400 Received: from localhost (unknown [193.163.1.7]) by first.geanix.com (Postfix) with ESMTPSA id 0AC531175; Thu, 23 May 2019 12:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1558612908; bh=LfwnnfieQzBuyg6h9W7Y1rNS6lVNSdfd8KNtUtWZaJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kJ9FPLj5cx2w28szRXrBMPa80YBVClPnPnf8PgMldxwNQNVQjcQVsb9GXwrNpHk8N tJw+foiDGU3AlHxlwy1KxgylPLUXJ8l0/4v7k97mTXKebpU6xDh/tqDNzdbCpthRYC lVoruh+96ZhSW95HeTTMGmNngDsvtq/IfG93U7ZyOzze5deytBIZ2xSUsxE+36Y9hD 0joBBVPV4ZE+gs8wNK4t2ySBpADW9+OAeZtB6SDZg1HKniPNL6FtMqKOlMSxUSEMsJ mETqg/v7SetcrogeS3zMkJOkKZKLGfwYAiCP/uPwj35XXH4APyC7zG6CIG1mm7UuHp 7kmjkQI1dM+KQ== From: Esben Haabendal To: netdev@vger.kernel.org Cc: "David S. Miller" , Michal Simek , Andrew Lunn , =?UTF-8?q?Petr=20=C5=A0tetiar?= , YueHaibing , Dan Carpenter , Yang Wei , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] net: ll_temac: Cleanup multicast filter on change Date: Thu, 23 May 2019 14:02:21 +0200 Message-Id: <20190523120222.3807-4-esben@geanix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523120222.3807-1-esben@geanix.com> References: <20190523120222.3807-1-esben@geanix.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on 796779db2bec Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid leaving old address table entries when using multicast. If more than one multicast address were removed, only the first removed address would actually be cleared. Signed-off-by: Esben Haabendal --- drivers/net/ethernet/xilinx/ll_temac_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 9d43be3..75da604 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c @@ -484,10 +484,13 @@ static void temac_set_multicast_list(struct net_device *ndev) multi_addr_lsw); i++; } - } else { + } + + /* Clear all or remaining/unused address table entries */ + while (i < MULTICAST_CAM_TABLE_NUM) { temac_indirect_out32_locked(lp, XTE_MAW0_OFFSET, 0); temac_indirect_out32_locked(lp, XTE_MAW1_OFFSET, i << 16); - } + i++; } /* Enable address filter block if currently disabled */ -- 2.4.11