Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp765949lqp; Sat, 13 Apr 2024 20:41:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUE023HMKKg2zfxPlaxCYPjYnjd8+pOWozq+WfudulpOv/EuveEKEXa7yYig7jjgzrJ3fKxj75dcuIW12s1KoaowI8y7XPH5K+qluyw3A== X-Google-Smtp-Source: AGHT+IESF/Y2KkfwRWCEHMDyFvg3y+qIhjihbb3m72tUqIuvvKsM7HgX8oBx3ITPxLaqOz0f7luL X-Received: by 2002:a05:6512:98f:b0:516:cd83:a96a with SMTP id w15-20020a056512098f00b00516cd83a96amr3765002lft.37.1713066104438; Sat, 13 Apr 2024 20:41:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713066104; cv=pass; d=google.com; s=arc-20160816; b=ddGLxTxWMcLxx/XoNapwl+jYu8l4FA6I8rwghwa1dfbPnfclzPv2PhG3qkKx71BUf1 YYfNoxTTm84J5LLLYfwQGSrH6MBx+u1xTduXiQ0qag3kbHRwmgf+EUC/qC4fZl4TWgUr MzJQkDyrbyFrO0qKzPvmnYUwMkhcJIs4IE+g0jL+Acao6QUlhiStM3IDCdWcCcFQVZdA ZFV7c00IBnIU3LHFkPLdEO3JhRmhvUZkb3XLMRcnJGpqUimlSkswk2shjeY88cCOa6sI 9DHcI3lHG/cayjM0aqHLCAVSjPvhW/dGw3Cg0aLN6Ak48gqiIEenedHK9lCKn3aRY4gL CHuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=2VlaakD6hC/Yq07AzsgcVk7dQUyYpGcWfseDM5cfpeg=; fh=+cpqsugGz+TMo3fvHArfc/zuQoNGHK/i1HeoirBpC9M=; b=bxggvQnjrDuH9NUlmmhlZ95VCu4AOc4bDwd0hUwF6/FV/29wDm+sCnHGGZ8/gFLJGM WSvIdKsTur0SEj+kLprWWoUslAtDZe03lstcDypd+bfIbKN2/q5/jfy1XMCUHDELIqYj BAiuUK9s4TL+qD7bb69PuCmLyWeT87I/p2tUOzKzqI3h8SKfZK0/etmHPm6sMkkhmGZN 8Mv2Lx5boQ/UjMzDVMaZ68d+EtFZm3toh1URQEVyPxn2wZ9ymOQySeN/hD1iT4m5sJJs mWJS54fRhRvkC1kW/0V89IXI8GKtuPui0b+Ui2B2B8oE02Vau/nz4NOpUDTchGH96ENt V0ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-143955-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143955-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v7-20020a50a447000000b0056e528b0004si3107690edb.53.2024.04.13.20.41.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 20:41:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143955-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-143955-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143955-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D6581F21627 for ; Sun, 14 Apr 2024 03:41:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B91D217991; Sun, 14 Apr 2024 03:41:34 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E5D428E8; Sun, 14 Apr 2024 03:41:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713066094; cv=none; b=oAQDTLw5Fn7uKwHIdtisZCt5t8UG+zxGpbWoCMWyq+KlRn/UwmWjzh/zrDm2JVGw3T1PbETSqDcKPO4GLBgZ6YJGBc3MGFkjOjezh+UKByR8wbuq+WlMd3rwzkIxcMjHTExBWe569D98lyR2au9D1NJDrMGmg4SBtr1OEoKuQ7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713066094; c=relaxed/simple; bh=XcqDE9wDOopQ32UWvS4Gc8ZFheu9sU8EeMdFHOPHjDY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=itUl8MqqRrCchIimVs9KzZfZSoZ5nb+cqa1AuR76dz5//sPPTXQiqwum3SFcgYc4NxiqO0yKobBP7UXqcg02sEdQQmGA9NuFrToEyxPcbGNFwrWFunNjK6XU/s/qUg22BbzQQSxpfbIy7rznhcuhhudwUTKjeV1RbvVZ6kx+/UE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rvqk3-0001Ep-2T; Sun, 14 Apr 2024 03:41:19 +0000 Date: Sun, 14 Apr 2024 04:41:16 +0100 From: Daniel Golle To: arinc.unal@arinc9.com Cc: DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Holger Stadali , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net 2/2] net: dsa: mt7530: fix port mirroring for MT7988 SoC switch Message-ID: References: <20240413-b4-for-net-mt7530-fix-mirroring-to-local-port-and-mt7988-v1-0-476deff8cc06@arinc9.com> <20240413-b4-for-net-mt7530-fix-mirroring-to-local-port-and-mt7988-v1-2-476deff8cc06@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240413-b4-for-net-mt7530-fix-mirroring-to-local-port-and-mt7988-v1-2-476deff8cc06@arinc9.com> On Sat, Apr 13, 2024 at 04:01:40PM +0300, Arınç ÜNAL via B4 Relay wrote: > From: Arınç ÜNAL > > The "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version) > v0.1" document shows bits 16 to 18 as the MIRROR_PORT field of the CPU > forward control register. Currently, the MT7530 DSA subdriver configures > bits 0 to 2 of the CPU forward control register which breaks the port > mirroring feature for the MT7988 SoC switch. > > Fix this by using the MT7531_MIRROR_PORT_GET() and MT7531_MIRROR_PORT_SET() > macros which utilise the correct bits. > > Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch") > Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle > --- > drivers/net/dsa/mt7530.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index b84e1845fa02..8090390edaf9 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -1883,14 +1883,16 @@ mt7530_port_vlan_del(struct dsa_switch *ds, int port, > > static int mt753x_mirror_port_get(unsigned int id, u32 val) > { > - return (id == ID_MT7531) ? MT7531_MIRROR_PORT_GET(val) : > - MIRROR_PORT(val); > + return (id == ID_MT7531 || id == ID_MT7988) ? > + MT7531_MIRROR_PORT_GET(val) : > + MIRROR_PORT(val); > } > > static int mt753x_mirror_port_set(unsigned int id, u32 val) > { > - return (id == ID_MT7531) ? MT7531_MIRROR_PORT_SET(val) : > - MIRROR_PORT(val); > + return (id == ID_MT7531 || id == ID_MT7988) ? > + MT7531_MIRROR_PORT_SET(val) : > + MIRROR_PORT(val); > } > > static int mt753x_port_mirror_add(struct dsa_switch *ds, int port, > > -- > 2.40.1 > >