Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3777382pxv; Mon, 28 Jun 2021 12:36:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEYPMg8GsZ12T3RIenYhDoIwBGjchxund3rRXdhw1M57N97wmdFPN3jl+hEwKVD4s6XQHI X-Received: by 2002:a5e:d614:: with SMTP id w20mr829647iom.17.1624908985268; Mon, 28 Jun 2021 12:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624908985; cv=none; d=google.com; s=arc-20160816; b=NeTrE+s6SEBSxNTOhfiSwvTlSE/fBHXbMu7NAzsdX7v6jIuqinerOf6EADbvzAguqi WevCjbvOBcNL5D0tSDY4pjj4O1AI25cMNyda7lKThRQVQGRSSLa3sCAbnfCkRd/ZtAab GyrVp1ulgIA+IDSk6eZLJ9p/iY0g3zaJDUrd1kROskWXQSYFe2XpyZeoGnfgXp4fAGXV i93GmetnlkTp+7jKDsrDcR9w75xQtra5w3PEcoY8xFOOoaxFxOMvrmmCWflbGlkXn53q GE76+RJaTT+5Om9EZk8S2zSNTI5e8nZGWOt4APnS3OTt1F6xe30ISaDYJ8e00NSSbB51 /jlg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e/pqeXralGcuHPUPzqrnEzPbOwjNlBx5Kp3nFiklscg=; b=iGDg+qIGj+nJ1YSQqX2pDGG4v6LVDhKslMcv9p4P/DJLOuJ4NzqjQZZYQaCe3NXcP5 4kIDdkta3mc5WTLJXf+vPX9DY6dRecSYeXBfQB0sKRfeeFiPjdaZHBQWgXVIDKs1cF+t kzt2IKRlkeBXLSVAAFqBvcRg++dis5X3CwKkChwaibywAbGJMLDT9iphg5AcRUmgtDhQ uOYcJ64YqqmEcXk8VzLwOHcwuRgbyEYtqmcTpWh6J+nGH12sMTMKcRcUTmYOeLvhWIZh tDTu3Ff4UReoTpn5e1rTqpkAQUVBczizLDl6rgptr9cg/zX98iKNTH7tJVUmqXKhrSWj IMwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RsLyY912; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si734410ioj.78.2021.06.28.12.36.13; Mon, 28 Jun 2021 12:36:25 -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=@kernel.org header.s=k20201202 header.b=RsLyY912; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236913AbhF1O4W (ORCPT + 99 others); Mon, 28 Jun 2021 10:56:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234814AbhF1OmK (ORCPT ); Mon, 28 Jun 2021 10:42:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61BB961CC0; Mon, 28 Jun 2021 14:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624890819; bh=EVrBlPelXsMPhaLqpFwS7PJEuEFvz25UUEbaqvot6Lc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RsLyY9129uHKTm6IDfq98Dj0WzkNk1ywC1Xo2OWBVz2nwj/bHwZwvnPdWtnXNfvJd fp7dUwZYwPCrUEoY2Rx1jj46o2hoVt91lrk+9LG7G9vxFEZLqwP78n5acn/mWBW7+A Bnd2MuqaZJUzTrsBlTCyV7CaY9BnqPUPtuU4UWWhoS/QShV56JrCbnktKqbaui9QVn YbOzCO3fpjZ8m2+hRiuPb24rWGR6/Lwv52OAkW/R3d0/b5WizQ3WORUj/bQBKvm+Ym Jd8SL1XQHJJuxr7sfaIlg9a91xx8xl05ZYgMbWZCa7ImSLKA9j7Yt1CJY1h6sKkAtW hcgHfuA24MWog== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jisheng Zhang , "David S . Miller" , Sasha Levin Subject: [PATCH 4.19 036/109] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 28 Jun 2021 10:31:52 -0400 Message-Id: <20210628143305.32978-37-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143305.32978-1-sashal@kernel.org> References: <20210628143305.32978-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.196-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.19.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.19.196-rc1 X-KernelTest-Deadline: 2021-06-30T14:32+00:00 X-stable: review X-Patchwork-Hint: Ignore 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 184ca13c8f79..1a84cf459e40 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -86,10 +86,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