Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3924037pxj; Mon, 21 Jun 2021 09:28:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx73hHVILP83OnonRGbDGE3ToHckL+phhSvKyW7E/eLU0Zaix8RAuHDTrGElJwWUm+D25tN X-Received: by 2002:a05:6402:1c04:: with SMTP id ck4mr7044453edb.301.1624292921929; Mon, 21 Jun 2021 09:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624292921; cv=none; d=google.com; s=arc-20160816; b=MfBlRcrx25oqoDtl8tT4ozo1o8eCvJ0JLzJKbQYUcYSH2kWAjouOAcKgxHyBTtXDE1 oq5IK6JSa5iUacVbjE/J1sClhry56RzUxdwVUAHmMfHvfMG2ipNxpKYCEhVvID2QBMr9 V403H0WsWXqlcW9PKuiRTMr6hvYX1d5XS7tCPaA82CKVTv3s7zkm47fwMUvsfoA6nvkU vU5HvIzKNirmKYvE4R6hzDUkwt9ENQtREJDSsNWCKrC5Bp0+HicNWuB1OnzaoXq25kJn RN92+39dtp7w3a+/LQpNYQFGzf8KrRZx4RTlFMfOQTUzX0y2ktV02N9qrBbN+KAN3vm5 ePjA== 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=kxMmEMdB80gzjeZdEyXa+kNN/55Md7cm+VMejTWiscY9t7o7qWSv98x2Czn6Lx/Czc eG4tnLBrEK3yjQtYRlHcVpKcQEQFCPGDzZkPMCpztdNLjCzUOKhKGGqsswAaewnUjI1M JxsAC6uaB9Q9oTPLNIymjUlz6q5K2P6d2WcmLVAI7aBwfmZ1EAHgenxbh4THMaMAFdX8 6sMc9fCKOaQL0VtWvgOlzt2sgL9AXZPbIzqMxZbG7Y7SVfO59y3Uv/U1KrXKsfCqgHct aLguBswkquJM+k9uIl9wV5bgypWUGyso17EezyuGypKaJI7w/agvnzNd5sd7sXEAKhkZ 5HxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VVGJdwvy; 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 gw19si10232906ejb.748.2021.06.21.09.28.17; Mon, 21 Jun 2021 09:28:41 -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=VVGJdwvy; 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 S232022AbhFUQ3G (ORCPT + 99 others); Mon, 21 Jun 2021 12:29:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:49624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231968AbhFUQ1b (ORCPT ); Mon, 21 Jun 2021 12:27:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7424161363; Mon, 21 Jun 2021 16:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292577; bh=Yapg4lD6t4xYPn1E22R3TbAZRwFcCbf66/XU1lmptiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VVGJdwvyj7YnhI5w1tqRmZrlkUgvmp5LqAdc4evg+NBPBTWE4jEKmQ9Urp09P+B5p 2tbvnR4M3ilC7HrTxULytB1potUSnGpChiHBfxPa/1LNz6BBRrzWqokpYzNGEClUJG fCl+W0eEMqVoYjJn+TZYPh9yGdpqO2K4rkaYhvQg= 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.10 044/146] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 21 Jun 2021 18:14:34 +0200 Message-Id: <20210621154912.792191396@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154911.244649123@linuxfoundation.org> References: <20210621154911.244649123@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