linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.8 13/24] net: dsa: felix: fix incorrect action offsets for VCAP IS2
Date: Mon, 12 Oct 2020 15:02:28 -0400	[thread overview]
Message-ID: <20201012190239.3279198-13-sashal@kernel.org> (raw)
In-Reply-To: <20201012190239.3279198-1-sashal@kernel.org>

From: Vladimir Oltean <vladimir.oltean@nxp.com>

[ Upstream commit 460e985ea07ec23d46af257e84e57b5409576577 ]

The port mask width was larger than the actual number of ports, and
therefore, all fields following this one were also shifted by the number
of excess bits. But the driver doesn't use the REW_OP, SMAC_REPLACE_ENA
or ACL_ID bits from the action vector, so the bug was inconsequential.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/dsa/ocelot/felix_vsc9959.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 7c167a394b762..885a59c97ff23 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -647,12 +647,12 @@ struct vcap_field vsc9959_vcap_is2_actions[] = {
 	[VCAP_IS2_ACT_POLICE_ENA]		= {  9,  1},
 	[VCAP_IS2_ACT_POLICE_IDX]		= { 10,  9},
 	[VCAP_IS2_ACT_POLICE_VCAP_ONLY]		= { 19,  1},
-	[VCAP_IS2_ACT_PORT_MASK]		= { 20, 11},
-	[VCAP_IS2_ACT_REW_OP]			= { 31,  9},
-	[VCAP_IS2_ACT_SMAC_REPLACE_ENA]		= { 40,  1},
-	[VCAP_IS2_ACT_RSV]			= { 41,  2},
-	[VCAP_IS2_ACT_ACL_ID]			= { 43,  6},
-	[VCAP_IS2_ACT_HIT_CNT]			= { 49, 32},
+	[VCAP_IS2_ACT_PORT_MASK]		= { 20,  6},
+	[VCAP_IS2_ACT_REW_OP]			= { 26,  9},
+	[VCAP_IS2_ACT_SMAC_REPLACE_ENA]		= { 35,  1},
+	[VCAP_IS2_ACT_RSV]			= { 36,  2},
+	[VCAP_IS2_ACT_ACL_ID]			= { 38,  6},
+	[VCAP_IS2_ACT_HIT_CNT]			= { 44, 32},
 };
 
 static const struct vcap_props vsc9959_vcap_props[] = {
-- 
2.25.1


  parent reply	other threads:[~2020-10-12 19:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 19:02 [PATCH AUTOSEL 5.8 01/24] net: lantiq: Add locking for TX DMA channel Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 02/24] platform/x86: touchscreen_dmi: Add info for the MPMAN Converter9 2-in-1 Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 03/24] platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA" Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 04/24] platform/x86: asus-wmi: Add BATC battery name to the list of supported Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 05/24] platform/x86: mlx-platform: Fix extended topology configuration for power supply units Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 06/24] mt76: mt7615: reduce maximum VHT MPDU length to 7991 Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 07/24] drivers/net/wan/x25_asy: Correct the ndo_open and ndo_stop functions Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 08/24] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 09/24] net/fsl: quieten expected MDIO access failures Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 10/24] net: usb: ax88179_178a: add Toshiba usb 3.0 adapter Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 11/24] net: atlantic: fix build when object tree is separate Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 12/24] net: usb: ax88179_178a: add MCT usb 3.0 adapter Sasha Levin
2020-10-12 19:02 ` Sasha Levin [this message]
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 14/24] via-rhine: Fix for the hardware having a reset failure after resume Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 15/24] via-rhine: VTunknown1 device is really VT8251 South Bridge Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 16/24] vhost vdpa: fix vhost_vdpa_open error handling Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 17/24] net: usb: pegasus: Proper error handing when setting pegasus' MAC address Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 18/24] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails Sasha Levin
2020-10-12 19:11   ` Joe Perches
2020-10-12 21:01     ` Petko Manolov
2020-10-14 14:04       ` Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 19/24] usermodehelper: reset umask to default before executing user process Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 20/24] riscv: Fixup bootup failure with HARDENED_USERCOPY Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 21/24] arm/arm64: xen: Fix to convert percpu address to gfn correctly Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 22/24] exfat: fix pointer error checking Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 23/24] gpio: pca953x: Survive spurious interrupts Sasha Levin
2020-10-12 19:02 ` [PATCH AUTOSEL 5.8 24/24] net: usb: qmi_wwan: add Cellient MPL200 card Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201012190239.3279198-13-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).