Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3891392pxv; Mon, 28 Jun 2021 15:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU5PzrVFOGujTE8zgdNJXdvd/Lhf4x3IQUFi97emrpNMUjuo8LX3etA19TmHjGPRTYpgae X-Received: by 2002:a17:907:9c9:: with SMTP id bx9mr26400905ejc.72.1624920764533; Mon, 28 Jun 2021 15:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624920764; cv=none; d=google.com; s=arc-20160816; b=oeYloXQBjSDxFAtDSpCvhVRHPSLKjBfeY7qKQAS4db2mB0ipk3F6uJuXVq5N5UPMiB 2dGQM3xUIY9YYjyG4ETXPtPI3Weq+/l1EFUXi5HiIc55M+m+dzQVp9vxqycUOpE5FM3c wwEAsY78TGrbB6YXSndDoJt4K2Tvd++XR9u/wJnz+ixDizK55klMJbuB6ju97rV2l4pN GedNdy+poEh8caTNYqVnuZ+EsuuuoxWA5ufkKhBZHGWsN16Cha6TnXk2THwcMxa4mR8U NvEBNk7OQVT6jYNWjKHweqOwvY45sb4nGknZHvkhSVvu+U7bYGp+QbU/xuZdB+0Csd/8 x6Ag== 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=EE/orimY5/7646g2RGvYJ/QwYoZQ6eJLEsCuT7pFTns=; b=g0ZF3z8zOuBYYG7QpRU2waGnX7bRz5SFHSHi948HLW2eqpHBUlng1CanHiYTWANvHp KFvkT9Ke4+mfXcEfrVOpvpkVc/cITbEm9X52kV1NEH3y4C178mb1feKihNhcn3Af4rMh k4gfV2mfVv2wIMk35bCaImSHu6PDcqfGaHgAW+tY6oTrIOBNBkv7kxQZ6SCz+oQEXN7d b5wPS85rXO8sfa+3cAJTGelt1K4RQnLf72PARimpTWhXeV8QjkVoEGDv6zn82WsQzlEj 2cOdYlSuVyaan7xLAeHyh1iK+gxoFGdzYgV3UfrKsD4/zgQrdiVSHXGz8ztjF8+saCgs g1Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kRHKFIr5; 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 di2si14723056edb.558.2021.06.28.15.52.20; Mon, 28 Jun 2021 15:52:44 -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=kRHKFIr5; 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 S237803AbhF1P2w (ORCPT + 99 others); Mon, 28 Jun 2021 11:28:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:39678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235805AbhF1PEP (ORCPT ); Mon, 28 Jun 2021 11:04:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5535A61CD4; Mon, 28 Jun 2021 14:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891394; bh=uz0OC/weR22y1hypAiWrhECNXa73YpaPd3rI0KJIFwo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRHKFIr5VxZHwgsNsKI2Lwou9SQsnf/FWcZ08xWcEYFBLptysWJ8RURoTpYB8u7CF xTVEskGYMAoc4ADjJrK6vHG4GjkNehZoH1on2iIG+iTnXioROI/fQMu1CFIxHUksmH Dm+Se1FTZGB/g+4rFsJt47vI6hYeA3nyRmdGyv0yExw3tFX8t9nRlcAqrrZkFX/Xsa PV/n7gZV/xkVyRnu/NTM+sA4l5mQHG1+mlbkSvx4H3+hf/PqZx5vjg6ENbPrn6ACcy qTNA/hkTE1KNJhtFItZwYNF3gtxXAlOQPTt7gv+NKLjdsuAmSIENjD+brAlgRzu+6L P2JsVxbi+kTUQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jisheng Zhang , "David S . Miller" , Sasha Levin Subject: [PATCH 4.4 19/57] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 28 Jun 2021 10:42:18 -0400 Message-Id: <20210628144256.34524-20-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144256.34524-1-sashal@kernel.org> References: <20210628144256.34524-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.4.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:42+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 b3fe0575ff6b..db2a341ae4b3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -83,10 +83,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 /* PCS registers (AN/TBI/SGMII/RGMII) offset */ -- 2.30.2