Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6496272rdb; Tue, 2 Jan 2024 04:10:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaJoQacaGrjZKxEjEELi8qCocGpcmBmv24XD78smrKUdK0VyYK9+24rjjvKh3L1QDyV1vF X-Received: by 2002:a05:622a:1646:b0:427:80c4:aa2c with SMTP id y6-20020a05622a164600b0042780c4aa2cmr28785823qtj.50.1704197425060; Tue, 02 Jan 2024 04:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704197425; cv=none; d=google.com; s=arc-20160816; b=zwOhoqzCEOUFKNtkG75WA/CclmOcjSjKkleO6jmCcNL1fUsH4op32I2dt+xOEWdy5y 6Sl2tOuJxnKExrid6hfPUMEK1NX78jJ0QOhG6V/5PzaHA7xbBiqZOfafhMMtG4DllhLl dZ1yGGN8ee+eZvD9F7GaEzxfr+ufc6+KBaj6rSr7nA7Joxuuo9ZdlqCE2p8QivpvqTD/ sIKNaHy/9En+teqZJjFvJB3vq6rrsw85dkRal3h2aVlBIVlwplogG/BZfNHq/Ve+fHlC TdtWMGZAJlxwkpFYze+Iod6IMQZwf2hxueBQ7AKoJ9C6G95sGcYuT3ouIHjfoVyRTBS5 u0lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=su1M2ye5o0dILxMk9cyElIFBQ93oGry7ZL5GdcqEe5c=; fh=erskXGMcgYP0Cy2dGxNNQCCMZp941rdrJIeZNfPJvdQ=; b=Uae3dnJjzGa9SLVHWoD8XAh9Bjp+im3TxczBWBcdHZCkHYxc2NBTU+0V37jwpux71X jDd+fI6yfq59yzOTUUoccsLk3jVVRmRG5uxtcEtu9pQ1mCgtykLCeN7uB7NzWI4RdHG+ yB3GgNbvagv4v6WeguLlwlt/wXMG31N0SGbcznL3KNIvx8y7s5CwffyXCRGaFKbEy/sI dtQ0NmVPzPRKcONGRm7bPOhfaKynRLcLr7UozUkfdNcxA1PTWCyp3XySnfyavIxBLfUW 67yGz111sU2UlTdMjJ8zZJ/AuByBihA9EavZEXxBPbbDTUhcVoB+Q3tFmyMmbCtwM/0S 5iYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=A+4Q2ju+; spf=pass (google.com: domain of linux-kernel+bounces-14327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c11-20020a05622a058b00b00427ea0d926dsi14055050qtb.273.2024.01.02.04.10.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 04:10:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=A+4Q2ju+; spf=pass (google.com: domain of linux-kernel+bounces-14327-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14327-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CC6FE1C20919 for ; Tue, 2 Jan 2024 12:10:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 579DBF4EE; Tue, 2 Jan 2024 12:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="A+4Q2ju+" X-Original-To: linux-kernel@vger.kernel.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 E6EF8EAE5; Tue, 2 Jan 2024 12:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=su1M2ye5o0dILxMk9cyElIFBQ93oGry7ZL5GdcqEe5c=; b=A+4Q2ju+LRwnACQadXkh3mRDOd F4GjSEr48wc7/6dH+TGpdTTVy+yOEJMzKGAvhnKZ2WqDHdz9Yfil/pofBF9pG85v5bIxSor/ksZsw ddZ//ZQ5wpf3NIRoFjM40NZhQtTpM4xOu79dYkqpqxLp8Pr2+0QtDdOsOtXgPizonvaqIz69URts9 xqAbqIzfjmCZM5bz2WMNDgi2ID8bVdj9kANgTkCzUzAcRqED1QIkl/AlAbg3erSCwYGSGfsh2HVEv T/QMUxFge9AJYEWnWJpHHRqApfDINJyCSZ0H2yU3nJjZLoaMSQyaaddYENww1KgSnn4H3pkebA0yO A7nW7RyQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46174) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rKdas-0006Wk-01; Tue, 02 Jan 2024 12:10:02 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rKdar-0005Hg-2n; Tue, 02 Jan 2024 12:10:01 +0000 Date: Tue, 2 Jan 2024 12:10:01 +0000 From: "Russell King (Oracle)" To: Eric Woudstra Cc: Alexander Couzens , Daniel Golle , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Frank Wunderlich , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH RFC net-next] net: pcs: pcs-mtk-lynxi fix mtk_pcs_lynxi_get_state() for 2500base-x Message-ID: References: <20240102074408.1049203-1-ericwouds@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: <20240102074408.1049203-1-ericwouds@gmail.com> Sender: Russell King (Oracle) On Tue, Jan 02, 2024 at 08:44:08AM +0100, Eric Woudstra wrote: > From: Daniel Golle > > Need to fix mtk_pcs_lynxi_get_state() in order for the pcs to function > correctly when the interface is set to 2500base-x, even when > PHYLINK_PCS_NEG_INBAND_DISABLED is set. Please describe your setup more fully. What is the link partner on this 2500base-X link? In PHYLINK_PCS_NEG_INBAND_DISABLED mode, this means that phylink is operating in inband mode, but Autoneg is clear in the advertisement mask, meaning Autoneg is disabled and we are using a "fixed" setting. state->speed and state->duplex should already be initialised. > When the pcs is set to 2500base-x, the register values are not compatible > with phylink_mii_c22_pcs_decode_state(). It results in parameters such as > speed unknown and such. Then the mac/pcs are setup incorrectly and do not > function. Since Autoneg is clear, phylink_mii_c22_pcs_decode_state() won't change state->speed and state->duplex, which should already be correctly set. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!