Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3783928ybi; Mon, 29 Jul 2019 12:33:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWpa84ManFa6w7FC1WNRR30kBKsVzd8vEtmD+fOgzwDN1W02NXyBmBHD73Qf9G6UeBpVA+ X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr111351687pje.123.1564428795116; Mon, 29 Jul 2019 12:33:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428795; cv=none; d=google.com; s=arc-20160816; b=HbiM4lEbp3GSttnU/EXwggqZCfNXHzQnoFXnYsfTn0vaKhuSo2q2XzR7pFmjJX/OQ1 LrS/dMC/XXEZmzdlMnMoGySERHh22XxXNJETbAkJQuL6ajA1hczI2p6mvBzZWGTR5vTP iS5Ap2ilfkFrKLQZJZwy7vpp2yJ2fluTmoaTc0HFTlRbdxlFJA3FgKe4PBkgOU2wUtcy eT+4XtPQpTbbpbWJLL5B0zC9vMMILyIVbDdpa9QfOhEKLowR3evq3izSwdvj59QUET3E jzvgozMlJdzDZmWSQMrwJe9ki8OCcXv2tOG7ZqzsXoQMQzoAD3oKpO1CNp20ui4JQclI guYg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QNZ/hJsbSjhXVxTJlvqE3Z0qzMDqje/Ye1GieHtOAHI=; b=MX22w1XdhDOaWTj1VY/mHUb1USAGJMW4usiDOqtYmST6XwJih7SgocuOuJktzQQcVo f5cmnJw+w4lA0mhsKkiRnUj9nl7/2IAC7Tsoj3pJKGwhRmCe+RDc8OZG/KtFGbxotSVy q7eW8Il0BvlJQa/cpw50bGwCTjaF7CrRw/YOs8o9T+hK1eNVRUyDzkVH/RFnj2SPDZiB 46Muh2FCLlzkg+RTTGV63beMg38XBhxGSS+3UuQEkOh140ZtpmCvdUSwdGLB8A2vV6NQ KpIXoTrsLrz3za1lEUMiMb1ZW+gscbZphPSDfYmSzvdeXza+8uYCN+ta7F8NLEqoyEHV lORw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kgMpPE3T; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si30481430pfd.126.2019.07.29.12.33.00; Mon, 29 Jul 2019 12:33:15 -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=@kernel.org header.s=default header.b=kgMpPE3T; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387994AbfG2TZN (ORCPT + 99 others); Mon, 29 Jul 2019 15:25:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:37486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729624AbfG2TZL (ORCPT ); Mon, 29 Jul 2019 15:25:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED19220C01; Mon, 29 Jul 2019 19:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428310; bh=fv//Of7PmnidvkSqcQO0Gq0jqPc/1g+A/IuhhFeHayk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgMpPE3T0wIc1AU06GOJePsHsqlTnrYiMPltC3X0bVYmqS57ecFhs2ewoxgUg3Q+H OgrS9r5e0t/JxUzcICfUVHCDELvALB0SpMVkYSKp1jj5GIK/OobrYCBiOtvdBzhY+J oj2mWwpWCpG241mWr6iCsaSa0ppqVjXTgP98W8Bs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jose Abreu , Joao Pinto , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue , Sasha Levin Subject: [PATCH 4.14 018/293] net: stmmac: dwmac1000: Clear unused address entries Date: Mon, 29 Jul 2019 21:18:29 +0200 Message-Id: <20190729190822.012203808@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 9463c445590091202659cdfdd44b236acadfbd84 ] In case we don't use a given address entry we need to clear it because it could contain previous values that are no longer valid. Found out while running stmmac selftests. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c index 540d21786a43..08dd6a06ac58 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c @@ -217,6 +217,12 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, GMAC_ADDR_LOW(reg)); reg++; } + + while (reg <= perfect_addr_number) { + writel(0, ioaddr + GMAC_ADDR_HIGH(reg)); + writel(0, ioaddr + GMAC_ADDR_LOW(reg)); + reg++; + } } #ifdef FRAME_FILTER_DEBUG -- 2.20.1