Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3934556pxj; Mon, 21 Jun 2021 09:41:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/SkOAdQdRHW28qaAQHohV07nAZ0vXODSSNt7PGD61PI7JCiOLg0lPRWSGq/KHi+3QVBao X-Received: by 2002:a05:6402:2714:: with SMTP id y20mr23374376edd.41.1624293715312; Mon, 21 Jun 2021 09:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624293715; cv=none; d=google.com; s=arc-20160816; b=wb/HBcrivoAZ2aCIyobOqv2CHp7TLOP6WpDs7+geu6FbnEEA9aORTgX4MyptO5Y/za KzogaV4xd4i72R8idajKtqEhZ59R/cH7PYQr/ACH4S4IG3NbZ4NV2pFM0PNpzK7x6OCZ mKw/fYocg4JPWb82949Z3YjOwEjLlXeWs8+WxIYYD+gWzBBL9RaajOcIo8i5wPb4z0m/ rKzif3BRDTyHZnaXsiU9NUYKgdEq/HakCaQgDDDkPaBj9hbfWjqaReEw2OX0SCptqTxO 7VWaIBDeLwVOJQYaIKTCj/kMGuSJoC81CVGigY9EooWpZR9XhYlKxWFuO9VUNL5qrkda TSww== 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=EQf8cYlDCNIZS5V9c7nk1cUlEyY4NC8P72thUy19VSxoTeldTFVZGch/3PjAsX9a2d b9kUZnY9M9n8FmXT+9Q99PVIa8RqshXlw9r+ryNOvK4I/GoPVAar/BYxyAdYr11Xgo75 J26njKpHVUuP6g2fihRkqPBWW5DZWWsnK05I8p/hBsokLvEQ+5muVciaVazHRuFHbzHZ g3952qfUb1H8MPOs5FrfrAnt+UPrwFXSBrCwq1vS7CD6NIHfg7ZJE1FZZR9ZwjspQsfT u6FPqRvNt2QGmH/ziUii0m9DRRmauLf7ewmjmd2hGhwR+Fqgk8ca4U1jcIoIgH0KCFJP uQbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FB5rp+OF; 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 yl16si1571582ejb.352.2021.06.21.09.41.32; Mon, 21 Jun 2021 09:41:55 -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=FB5rp+OF; 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 S232274AbhFUQmn (ORCPT + 99 others); Mon, 21 Jun 2021 12:42:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:33850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232396AbhFUQjM (ORCPT ); Mon, 21 Jun 2021 12:39:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA2AE611C1; Mon, 21 Jun 2021 16:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624292981; bh=Yapg4lD6t4xYPn1E22R3TbAZRwFcCbf66/XU1lmptiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FB5rp+OF8xTOwAgQu/cZzRXYpeSbREh2UnetgFHPbUrnlQ7ZvHvEQRSEfsTi0FGmk Nle6IKEGGoQ+6xgBJoyGA03OL0PJ5pFgGe0q9ugbSQkPdV9P0yUyVOeDSmM1OOqEAE RW/YPbJCllVwPhrfCvr4BOvxSyB49vxl+B7gzIfE= 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.12 053/178] net: stmmac: dwmac1000: Fix extended MAC address registers definition Date: Mon, 21 Jun 2021 18:14:27 +0200 Message-Id: <20210621154924.213084706@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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