Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3813064pxv; Mon, 28 Jun 2021 13:34:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYGmg8dZlbKFeI3eBjLKPzbSzOKVDFI/I8cU36o/XJof7aa62Y7JxSqXBaCwKxSINUmNSs X-Received: by 2002:a05:6638:120c:: with SMTP id n12mr1252131jas.7.1624912489040; Mon, 28 Jun 2021 13:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624912489; cv=none; d=google.com; s=arc-20160816; b=LqJ5MuBewuezhJtqmVZ5szMXuv8ftuxSQEIXDP8vp/UckF506hT5zUueTJj1NeVpVF osgOONECVJr0GWHAUrnOpMmdPVuOoPDbWqsh9shsL8Wy/TNoDVkOp20dU0Xb0qSZLSmo HcXNICygmDoRmVad5tui0dv0kpz4ezlRw9C2b/VK9w7VmPG9AqqhDvWvwJ3ZV3/JG94L nKOOv/KHobz23P2tj4MhjXLRvcBhm+Nezo4qH6GvCJHWPFAoutepS56ClYO9SRXsPGGn drTchpZtedmOhqFDS678c5QD+hgtm/05p5UWh08GK1E4mYVLr8KNDQRKvvQzvWGKbGQ+ /DlQ== 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=idquL5afT5SyJs3Ol5bedaREw/uVtCtglApvuAYTq50=; b=LZqMPR6D+kLf+4c7JXa0hgjU6Elyt73z86h9xcJohgIrJmdSVDfghOOjvtDH6vBrhe 07Mg0+rMK1cpzB9MAWTcmDpV+5oYLT4NPK8E7z1SigQ25nFWsqOC6zrNvrfN24EBuqfb MSy8szDLi7WvCH9Vs99TkyXEbWcFUbiMU6ImlmrOqdU1nhc6ZOlcm9znpN1BWC9PJlWx rnF2tklnXY3SukUi1555rsDisSgSJNq684s0vpVP7fchbRxLWQrMWikaMOAM9C036ByC ZnGvBJyvd8HcSmn/vo1it7OdnMHXWNJqOB2BmQ+IQghD4VKVjJEgBro0Ne+Z2v+tldNF j9Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YcCGJP0+; 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 p3si1923577ils.25.2021.06.28.13.34.34; Mon, 28 Jun 2021 13:34:49 -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=YcCGJP0+; 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 S237786AbhF1PK3 (ORCPT + 99 others); Mon, 28 Jun 2021 11:10:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:53668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236459AbhF1OtX (ORCPT ); Mon, 28 Jun 2021 10:49:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D419761D1D; Mon, 28 Jun 2021 14:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891016; bh=TBy26R4W5eE79CEI106NzZ33pCFVzglJfyIVJcNhHW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcCGJP0+NPJ5/xusvSs1DIA2RYJk+D+D6q6D8jD8Gt93l0Ej9eTQm2/0UgZJU0tS6 EH4SOHy/MLcdII/6zPunbirk3WYiEM0Zl5gDBrheAxLaw3XTGe1M+8EjxCiNOxKEHq 38MlJzpv/wxILTqWX0s1EsUr2oGMEZEwoqEG2fBYs0RR/IDkstys8F4OSSIbo51AYE cz5tWM3Q7yIp6Cc65Tpjo7J7O5ekM3ZNlL7njCx0QjJJI/5ncxSoPitqTOySIv2/Nh zSboM2shhs9DHbJ9Xi1lShPHRyS168mf3XvX2jhepWHsncuGE+a5cNu1FPF/G9fKDd YHD/3Q6SNuqvA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jisheng Zhang , "David S . Miller" , Sasha Levin Subject: [PATCH 4.14 29/88] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 28 Jun 2021 10:35:29 -0400 Message-Id: <20210628143628.33342-30-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+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 c02d36629c52..6f7ed3aaff1b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -87,10 +87,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