Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1006193ybi; Fri, 2 Aug 2019 07:51:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyszoI5TPuBb4XsVQffGrxtxzlVjpyITRVixJ8pnGDEaYmNpkN/zf+68Ole1w9wuODGaHuP X-Received: by 2002:a17:90a:22aa:: with SMTP id s39mr4638229pjc.39.1564757498511; Fri, 02 Aug 2019 07:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564757498; cv=none; d=google.com; s=arc-20160816; b=prU1RvrX6SoXZ4UXn3J3oxKTSLYPMf0rpTKLSK+cD+5eD+tfPc8c/PIMbchmg018Bk BxW+KgfLEQUIpI7a17Sq0bLPOvQTNS7FIFYLKQoVsT/XDmELVUZskyAzoNexkVkW2nG/ p0lpKnVQI1MjQ+bY7sydQfaefCi70S/wPVoCYxhBRsmzfrNfvVWrsnNLTHtRa9R7TJCw eBC8WijMo0J+n6nPc7sztkFumBP9Cqb2oWUUcHBRKKWMcBuJ7nR7CfD9bf4lsno7loQy OQczBvLi21uCh9WNvtNMPZ7vyoObwkPydRGtvOgkNnfGLEnlk/t4RbWT0k+AYSZLSQtr xXFg== 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=L66j9tMKlUfU45zdHbZBFJQ+ce/Oa1Rh0LebEaecu/U=; b=AgC5BasaCaKonL/O6oogEQEMHb6NrK9TWoqIUW/tKhxSSslA5rPMuAHH7MOM7ptuyz 3jn/DGJX10iauHeB9vuujCQQTb891HRLaS142DT2MFe7WoDtYLoazupTzwQt4yUlKfMw LaPPoeAyxN+HbdesyDYPUQSR5cBb+AWBtmAQ5YVLmMF95n4XcFM2zGI0OkB/4tnW9AOD M+EUiJyNp1ifApV4UTlUz677dLatBjeUrT49r2IUHYrYfUOgJiMf1YAEMOlK16q5Mxo0 BiL4LnAxuOoYLkCO0PZ4QLdJSmjf179Qopml/quw+pLNMYjitj6wgDeO1Dc/rgnDZad2 OzlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2XKlKTqd; 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 n20si36350289plp.395.2019.08.02.07.51.23; Fri, 02 Aug 2019 07:51:38 -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=2XKlKTqd; 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 S2390949AbfHBJaw (ORCPT + 99 others); Fri, 2 Aug 2019 05:30:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:56486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390933AbfHBJat (ORCPT ); Fri, 2 Aug 2019 05:30:49 -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 9EC3C21773; Fri, 2 Aug 2019 09:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738249; bh=sv9oWjMBxyfhGcn1mrrgVPqG5rXCy9a3m1MYlLe2LW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2XKlKTqdANtJJWyoBrMz68brqXeaOWSC3wE7mUlH+WwdftktAIZoaU3P1GoNmO2UG NP5uvN6lqxUAUuNS1PgOnCOyLX+OGN89Yn/YKSRMg3FwdRd4CYPprSGJHl8wPXRoWL BBzTvnZBt5+kytwY94DQ42Nbmv/d5GB5d8c12Neo= 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.4 013/158] net: stmmac: dwmac1000: Clear unused address entries Date: Fri, 2 Aug 2019 11:27:14 +0200 Message-Id: <20190802092206.178469022@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@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 371a669d69fd..1df84c8de9d7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c @@ -187,6 +187,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