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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5BA2EC48BEB for ; Wed, 21 Feb 2024 19:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cKwNxxa6aayvdd9Vxqk02Yg0sXoK/THyCXWX0NFs6Vg=; b=tBAFe8rG7u0B7l QwIsp9VgwMu+bglXjXYjBfJkExQo7CVh9hIQRoV8997HgCyOjW1WvSa+I1gjRbeXvPdVXBQJRRMfW /ppiZks/qdPSEBGS9XxFdurKwFDR15KbnukcD+BqK6Pm5dFO+LBreVzVKoOhXtO2mDMyXBTkXt6+y 12FAA/rYEstEPbMm03gnInT/pD4LQdeOfo6IOSlVFT7UMce0QVC5dsSZXWkjFFxbCj4RhqGlKf4bH LG7GH1xRSktJv8B/AhncNjPZPFU0Hjf1RF4pcadaKQm2f1Ozi+x4RfW0IWcoOvNCLDpa5gx5a51iJ 03uxlxbngdMCGJw9INoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcrxu-00000002E0M-0frL; Wed, 21 Feb 2024 19:09:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcrwZ-00000002Dm4-0zed for linux-arm-kernel@lists.infradead.org; Wed, 21 Feb 2024 19:07:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 8F3F66162D; Wed, 21 Feb 2024 19:07:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90A4EC433C7; Wed, 21 Feb 2024 19:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708542466; bh=XqrbVgcMe+9uJTpreaIDujp6VV6ORFBxTdYAfPyFRic=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tNqhnJJ+13DYcaf0zhZAM+yPKK81nXX6w0b+qgQaMr8ASYEtFySKv8Hot3tMAHcJy r8vNVwX8wSCU6DfCnS7iQBUfgjBVfolWuRf6vnLsbEc2OLtkLprwy44aHfrTqbpqJ8 +HrC94gw5BIoKuX6d8+jpK5SFmRTxwbBQPbQqntm+MUhubdsljEndKVdT2SPmsl8ZL thfmTLOdo6XG5oaT2bE/mSytHqz6PYGn2v2MCXDhTpKVOHak3iqwmQl8P/xgC3aRoQ 43hWq8XZbgH/mG0pYVYDTam/t4xjWLtfgDF3WnwBTy/TJl3J7+EfNi0768rZDz+gJV tXx2hBbDoFJKQ== Date: Wed, 21 Feb 2024 19:07:40 +0000 From: Simon Horman To: Romain Gantois Cc: Russell King , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , =?utf-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Maxime Chevallier , Miquel Raynal , Thomas Petazzoni , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH net-next v4 2/7] net: phylink: add rxc_always_on flag to phylink_pcs Message-ID: <20240221190740.GG722610@kernel.org> References: <20240221-rxc_bugfix-v4-0-4883ee1cc7b1@bootlin.com> <20240221-rxc_bugfix-v4-2-4883ee1cc7b1@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240221-rxc_bugfix-v4-2-4883ee1cc7b1@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_110747_618894_C2E07E63 X-CRM114-Status: GOOD ( 23.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 21, 2024 at 02:04:19PM +0100, Romain Gantois wrote: > Some MAC drivers (e.g. stmmac) require a continuous receive clock signal to > be generated by a PCS that is handled by a standalone PCS driver. > > Such a PCS driver does not have access to a PHY device, thus cannot check > the PHY_F_RXC_ALWAYS_ON flag. They cannot check max_requires_rxc in the > phylink config either, since it is a private member. Therefore, a new flag > is needed to signal to the PCS that it should keep the RX clock signal up > at all times. > > Suggested-by: Russell King > Signed-off-by: Romain Gantois ... > @@ -549,6 +557,34 @@ void pcs_an_restart(struct phylink_pcs *pcs); > */ > void pcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode, > phy_interface_t interface, int speed, int duplex); > + > +/** > + * pcs_pre_init() - Configure PCS components necessary for MAC initialization > + * @pcs: a pointer to a &struct phylink_pcs. > + * > + * This function can be called by MAC drivers through the > + * phylink_pcs_pre_init() wrapper, before their hardware is initialized. It > + * should not be called after the link is brought up, as reconfiguring the PCS > + * at this point could break the link. > + * > + * Some MAC devices require specific hardware initialization to be performed by > + * their associated PCS device before they can properly initialize their own > + * hardware. An example of this is the initialization of stmmac controllers, > + * which requires an active REF_CLK signal to be provided by the PHY/PCS. > + * > + * By calling phylink_pcs_pre_init(), MAC drivers can ensure that the PCS is > + * setup in a way that allows for successful hardware initialization. > + * > + * The specific configuration performed by pcs_pre_init() is dependent on the > + * model of PCS and the requirements of the MAC device attached to it. PCS > + * driver authors should consider whether their target device is to be used in > + * conjunction with a MAC device whose driver calls phylink_pcs_pre_init(). MAC > + * driver authors should document their requirements for the PCS > + * pre-initialization. > + * > + */ > +int pcs_config(struct phylink_pcs *pcs); Hi Romain, Should this be pcs_pre_init instead of pcs_config? > + > #endif > > struct phylink *phylink_create(struct phylink_config *, ... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel