Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4200307pxu; Mon, 12 Oct 2020 12:04:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRgzhgLEpsy3FukVhopt7QbvKOJ8cFLHLzn+iAU3CMcTxTmTUTsP03a8twHUayk53tY+JN X-Received: by 2002:a17:906:85c1:: with SMTP id i1mr30487763ejy.157.1602529483645; Mon, 12 Oct 2020 12:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602529483; cv=none; d=google.com; s=arc-20160816; b=zvPeg+yUl3sfVbHradgu9tjL1NMUwWLUxWWdxGBMUrrNtPb1RhWvyY2MRstycJLYbL gJiZA10ao2+SL+LPCGGUWB4jBl1N1JO85jofoA0gDI8daDSA0y8HlGud9oDMsEtGGKeF rIsjnghgYNwKRD5pq3+33E0XUzuCS6ZDzVVO1ucEY9I9eT436ewOBAAAHfQlFh4by8fe prtVmxJnus+xRAeprvx6Yo2K5Fu9NbA+3+zmH6JsrqPT03jGVjGiNWPTDiEVzpnv+5II 5fDhBQxqx9AjtuZrvHAM1q++vcrD5NDj2aJQAIC2DSTPAI3eO3aqT1CwzcGP7mbfUKf9 2qsA== 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=uZlsU677HHn9+pDyyfa1OLgDgnTUniDERxy4f0jZQrs=; b=AMHlF2NE/k1B0mQEr5cPQp3u5GU11vmSMcg9CA/1LIJ7+6dg1wHmgOuyXhK3+WohlF 5BBqnI0Tvtcq1A06PvCgXKDzxxFdNFJzY2Z96jfHToQlrLfpVIDEeHfTVuTY1AJDaLK8 KPlz2Y8vsUO1LHXqo80tpX3lYILiQKZEuql6oRzgroH7i5kgnV43KYlxOcRUW7FG+vLm tBaX8H1U5nEuAZ3khgyGHFYScjc94Z6HWqq5177l5ST+5kn57Dzblkha8K50GLW9Z3tQ EJYTV3tXK9NR8110B1DlhlLG6TaAYUj4mnwAqgiQ1n8VceC5o00pV3LlbjHKwOpadFlV sP/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yNqkhBXA; 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 w23si13248394edu.226.2020.10.12.12.04.08; Mon, 12 Oct 2020 12:04:43 -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=default header.b=yNqkhBXA; 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 S2387745AbgJLTCz (ORCPT + 99 others); Mon, 12 Oct 2020 15:02:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:52146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730977AbgJLTCv (ORCPT ); Mon, 12 Oct 2020 15:02:51 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 23D952067C; Mon, 12 Oct 2020 19:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602529370; bh=7h9TvESMrhhKu6jYFRB16daB7q5SKQLUEEx2WKhSA1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yNqkhBXAmyQM1AUuaaFDiRne3tulIyZCd+BFv/WXBQDz5A+EiX9PfhFM51w9QoNDn YF2WWMFbq7rQfiKmC0K8xwn9jlSJjxSggIFTukIm612dndbwoYUy1Q5P1go8yx95Ox 4n0MEt0os2YqywNSJBKGR+QoSPhxHp/aVkiiQQHM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Xiaoliang Yang , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 5.8 08/24] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Date: Mon, 12 Oct 2020 15:02:23 -0400 Message-Id: <20201012190239.3279198-8-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201012190239.3279198-1-sashal@kernel.org> References: <20201012190239.3279198-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiaoliang Yang [ Upstream commit 4ab810a4e04ab6c851007033d39c13e6d3f55110 ] INIT_IPS and GATE_ENABLE fields have a wrong offset in SG_CONFIG_REG_3. This register is used by stream gate control of PSFP, and it has not been used before, because PSFP is not implemented in ocelot driver. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/soc/mscc/ocelot_ana.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/soc/mscc/ocelot_ana.h b/include/soc/mscc/ocelot_ana.h index 841c6ec22b641..1669481d97794 100644 --- a/include/soc/mscc/ocelot_ana.h +++ b/include/soc/mscc/ocelot_ana.h @@ -252,10 +252,10 @@ #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_M GENMASK(18, 16) #define ANA_SG_CONFIG_REG_3_LIST_LENGTH_X(x) (((x) & GENMASK(18, 16)) >> 16) #define ANA_SG_CONFIG_REG_3_GATE_ENABLE BIT(20) -#define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 24) & GENMASK(27, 24)) -#define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(27, 24) -#define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(27, 24)) >> 24) -#define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(28) +#define ANA_SG_CONFIG_REG_3_INIT_IPS(x) (((x) << 21) & GENMASK(24, 21)) +#define ANA_SG_CONFIG_REG_3_INIT_IPS_M GENMASK(24, 21) +#define ANA_SG_CONFIG_REG_3_INIT_IPS_X(x) (((x) & GENMASK(24, 21)) >> 21) +#define ANA_SG_CONFIG_REG_3_INIT_GATE_STATE BIT(25) #define ANA_SG_GCL_GS_CONFIG_RSZ 0x4 -- 2.25.1