lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240221190740.GG722610@kernel.org>
Date: Wed, 21 Feb 2024 19:07:40 +0000
From: Simon Horman <horms@...nel.org>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Russell King <linux@...linux.org.uk>, Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Clément Léger <clement.leger@...tlin.com>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org,
	linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH net-next v4 2/7] net: phylink: add rxc_always_on flag to
 phylink_pcs

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 <linux@...linux.org.uk>
> Signed-off-by: Romain Gantois <romain.gantois@...tlin.com>

...

> @@ -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 *,

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ