Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3919248pxj; Mon, 21 Jun 2021 09:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYWXVylkHB6XOXhI7HWUfjMo3FWoMXWU2T+uf2wzIeUz2+Njo9pT6JZQKjZUI+fSBjGpwB X-Received: by 2002:a17:906:d83:: with SMTP id m3mr11430859eji.63.1624292531363; Mon, 21 Jun 2021 09:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292531; cv=none; d=google.com; s=arc-20160816; b=kW8mnKRBJLRlDh8dhbsz/F+VeRml3Zlv85U5OH6O4u5ry3ncNZQyfd+qpIMGTjlesq rFdt7ylKS4MeiOLt+3gzAo06tAveKxcaevfl3kIngN4wknj2Ey3lcn2TuUsvfAxptU3Q k+FbvxScl+4ECAMwNSf75EY6kZ4vSDlXhfU2mrPhM5DISJ5k+4nvnB8KashCiEg4Yy+r YirZloOVbX7it11rH9Hh/irIHoZ7Bo/3Qxd3yD1h4YmepIqlJ+dAvVNr3qShsDZlYTK9 xRP5/Xce0hm79AfWoy19E/2TfsV5fARIOsUmqC8JywtvnUar2Ou+UbtmZXd0XWvaqxcn BRyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6KCG/rBPl8ftuX8uvmjQZDc014wSMeaubFYKH+jrgiw=; b=HghzSTGcGiZoct07p+LFA5qSGPKYpkV0gh+LxjqvC3s+rvJ7xftHx3eF/K/HX/iDVm bqxEMgB3GF5g5eb8jYHsF27YeRBzMosthzlYiD5K+xFflks4JR4AMoM1aSLWb4oriiWb 070aIVWOpir1KYXdgOQb0rxWG+fU1mmPCYts8UNUXjdz4Pnom9n26UyKG3vvHcjzPrV9 jQlJCr8ZB2a/f3SSoRzhpmTVjhpSDGz5iueMj/eH/pHG8s3tKtNvbcxfdgHWw1jtPTYp 5uGbuOrtzEyDRiSdNWY1VCuZc4waKTHX6JBN2tDMaCgpswwgRvNmHyqZ/5ZfxH2lfWbb V5dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=We+ZioUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ia17si5634753ejc.157.2021.06.21.09.21.49; Mon, 21 Jun 2021 09:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=We+ZioUP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231464AbhFUQUW (ORCPT + 99 others); Mon, 21 Jun 2021 12:20:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:40216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbhFUQTw (ORCPT ); Mon, 21 Jun 2021 12:19:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 99C806124B; Mon, 21 Jun 2021 16:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292257; bh=Yapg4lD6t4xYPn1E22R3TbAZRwFcCbf66/XU1lmptiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=We+ZioUPcjzA/Z9pcSuLdAYtY40+t9Q9eEN+2f9M2SV/8lFOQDNWJl7dFMs3nC9eL AHulpUnwIdefhM+X5fLq20fAXCUOAABuD1QJIBJ5qtL/nLou0bKwan3MwQkRP/05bh SE1BlKNxP0BWV6QTLGPCQ7JtHli0TmIZuOazLgQ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jisheng Zhang , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 23/90] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 21 Jun 2021 18:14:58 +0200 Message-Id: <20210621154904.916571224@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154904.159672728@linuxfoundation.org> References: <20210621154904.159672728@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jisheng Zhang [ Upstream commit 1adb20f0d496b2c61e9aa1f4761b8d71f93d258e ] The register starts from 0x800 is the 16th MAC address register rather than the first one. Fixes: cffb13f4d6fb ("stmmac: extend mac addr reg and fix perfect filering") Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h index b70d44ac0990..3c73453725f9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -76,10 +76,10 @@ enum power_event { #define LPI_CTRL_STATUS_TLPIEN 0x00000001 /* Transmit LPI Entry */ /* GMAC HW ADDR regs */ -#define GMAC_ADDR_HIGH(reg) (((reg > 15) ? 0x00000800 : 0x00000040) + \ - (reg * 8)) -#define GMAC_ADDR_LOW(reg) (((reg > 15) ? 0x00000804 : 0x00000044) + \ - (reg * 8)) +#define GMAC_ADDR_HIGH(reg) ((reg > 15) ? 0x00000800 + (reg - 16) * 8 : \ + 0x00000040 + (reg * 8)) +#define GMAC_ADDR_LOW(reg) ((reg > 15) ? 0x00000804 + (reg - 16) * 8 : \ + 0x00000044 + (reg * 8)) #define GMAC_MAX_PERFECT_ADDRESSES 1 #define GMAC_PCS_BASE 0x000000c0 /* PCS register base */ -- 2.30.2