From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90C2BC6FD1C for ; Fri, 24 Mar 2023 13:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231562AbjCXNtW (ORCPT ); Fri, 24 Mar 2023 09:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbjCXNtU (ORCPT ); Fri, 24 Mar 2023 09:49:20 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F16481515C for ; Fri, 24 Mar 2023 06:49:14 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pfhmm-0006Oz-2c; Fri, 24 Mar 2023 14:48:52 +0100 Date: Fri, 24 Mar 2023 13:47:10 +0000 From: Daniel Golle To: Felix Fietkau Cc: Frank Wunderlich , Mark Lee , Sean Wang , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , John Crispin , AngeloGioacchino Del Regno , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: Aw: Re: [BUG] MTK SoC Ethernet throughput TX only ~620Mbit/s since 6.2-rc1 Message-ID: References: <4a229d53-f058-115a-afc6-dd544a0dedf2@nbd.name> <4462a0c2-f7ea-c81c-e12f-ec629113fc40@nbd.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4462a0c2-f7ea-c81c-e12f-ec629113fc40@nbd.name> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Felix, Hi Frank, On Fri, Mar 24, 2023 at 12:52:09PM +0100, Felix Fietkau wrote: > On 18.03.23 14:07, Frank Wunderlich wrote: > > on BPI-R2 the eth0/gmac0 (tested with wan-port) is affected. here i have in TX-Direction only 620Mbit. > > > > I have no idea yet why there the gmac0 is affected and on r3 only gmac1. > > > > But it looks differently...on r3 the gmac1 is nearly completely broken. If it looks "completely broken" as in you see only kilobits or even complete starvation of RX, then you probably miss this fix: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=193250ace270fecd586dd2d0dfbd9cbd2ade977f > Please try this patch and let me know if it resolves the regression: > > --- > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > @@ -718,8 +718,6 @@ static void mtk_mac_link_up(struct phyli > break; > } > - mtk_set_queue_speed(mac->hw, mac->id, speed); > - > /* Configure duplex */ > if (duplex == DUPLEX_FULL) > mcr |= MAC_MCR_FORCE_DPX; > > I was about to suggest exactly this fix, and yes, it resolves the issue and now I see full 1 Gbit/s speed on both, switch ports (even while 100M connection is also used) and eth1 (via 1000Base-T SFP module). Thank you for taking care of this!