From mboxrd@z Thu Jan 1 00:00:00 1970 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 D9B69182D0; Thu, 17 Apr 2025 15:45:38 +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=1744904740; cv=none; b=bsqtwhHGZcQ1TTP0LCGGZTgsq3Iio7wmdtVeUs8gfn81kDCsIg6FyneVMcc1uXoM1bGUjR1L+bz2j2/VWeZpjMHNBmpePPZezkVqgKqf+JdNu05wDHwxaD1jTs+YXWhGnnu0GBsVrxg639dVTU6cnlYuth/UGO1oWU3xytmpv7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744904740; c=relaxed/simple; bh=dQh+X+m8OEmQKRtOdQmQPjj5mBNJKtXEfgJHzuVkwSg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A0cYP1Ke/3BqYaxQJSIM7haL2lB07Vf7gbXJ1UzRUKzVqbV5PHMWcguAq9fm3dSSQ4xNQhZm0x/HFQzCe3UxlsvVkiKfH0rGIC7Ib5B3GWpvbOOzdiTJR7gCVFE4RCaMGvMFwXhsobPAvZ1g0JoiSFcDXv5ZiZo4tf7f4kbEXLc= 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.98.2) (envelope-from ) id 1u5RNv-000000001vT-3TbA; Thu, 17 Apr 2025 15:45:17 +0000 Date: Thu, 17 Apr 2025 16:45:14 +0100 From: Daniel Golle To: Jakub Kicinski Cc: Felix Fietkau , Sean Wang , Lorenzo Bianconi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net v2 4/5] net: ethernet: mtk_eth_soc: net: revise NETSYSv3 hardware configuration Message-ID: References: <8ab7381447e6cdcb317d5b5a6ddd90a1734efcb0.1744764277.git.daniel@makrotopia.org> <28929b5bb2bfd45e040a07c0efefb29e57a77513.1744764277.git.daniel@makrotopia.org> <20250417081055.1bda2ff6@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20250417081055.1bda2ff6@kernel.org> On Thu, Apr 17, 2025 at 08:10:55AM -0700, Jakub Kicinski wrote: > On Wed, 16 Apr 2025 01:51:42 +0100 Daniel Golle wrote: > > + /* PSE should not drop port8, port9 and port13 packets from WDMA Tx */ > > + mtk_w32(eth, 0x00002300, PSE_DROP_CFG); > > + > > + /* PSE should drop packets to port8, port9 and port13 on WDMA Rx ring full */ > > nit: please try to wrap at 80 chars. There's really no need to go over > on comments. Some of us stick to 80 char terminals. Too late now to send another revision... > > [...] > > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h > > index 39709649ea8d1..eaa96c8483b70 100644 > > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h > > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h > > @@ -151,7 +151,12 @@ > > #define PSE_FQFC_CFG1 0x100 > > #define PSE_FQFC_CFG2 0x104 > > #define PSE_DROP_CFG 0x108 > > -#define PSE_PPE0_DROP 0x110 > > +#define PSE_PPE_DROP(x) (0x110 + ((x) * 0x4)) > > + > > +/* PSE Last FreeQ Page Request Control */ > > +#define PSE_DUMY_REQ 0x10C > > This really looks like misspelling of DUMMY, is it really supposed > to have one 'M' ? I also thought that when I first saw that and have told MediaTek engineers about it, they told me that the register is called like that also in their datasheet and hence they want the name to be consistent in the driver.