All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Bryan Whitehead <bryan.whitehead@microchip.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Marcin Wojtas <marcin.s.wojtas@gmail.com>,
	netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next 05/10] net: phylink: add EEE management
Date: Fri, 13 Dec 2024 09:37:09 +0000	[thread overview]
Message-ID: <20241213093709.GE2110@kernel.org> (raw)
In-Reply-To: <E1tKefi-006SMp-Hw@rmk-PC.armlinux.org.uk>

On Mon, Dec 09, 2024 at 02:23:38PM +0000, Russell King (Oracle) wrote:
> Add EEE management to phylink, making use of the phylib implementation.
> This will only be used where a MAC driver populates the methods and
> capabilities bitfield, otherwise we keep our old behaviour.
> 
> Phylink will keep track of the EEE configuration, including the clock
> stop abilities at each end of the MAC to PHY link, programming the PHY
> appropriately and preserving the EEE configuration should the PHY go
> away.
> 
> It will also call into the MAC driver when LPI needs to be enabled or
> disabled, with the expectation that the MAC have LPI disabled during
> probe.
> 
> Support for phylink managed EEE is enabled by populating both tx_lpi
> MAC operations method pointers.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

...

> diff --git a/include/linux/phylink.h b/include/linux/phylink.h

...

> @@ -143,11 +145,17 @@ enum phylink_op_type {
>   *                    possible and avoid stopping it during suspend events.
>   * @default_an_inband: if true, defaults to MLO_AN_INBAND rather than
>   *		       MLO_AN_PHY. A fixed-link specification will override.
> + * @eee_rx_clk_stop_enable: if true, PHY can stop the receive clock during LPI
>   * @get_fixed_state: callback to execute to determine the fixed link state,
>   *		     if MAC link is at %MLO_AN_FIXED mode.
>   * @supported_interfaces: bitmap describing which PHY_INTERFACE_MODE_xxx
>   *                        are supported by the MAC/PCS.
> + * @lpi_interfaces: bitmap describing which PHY interface modes can support
> + *		    LPI signalling.
>   * @mac_capabilities: MAC pause/speed/duplex capabilities.
> + * @lpi_capabilities: MAC speeds which can support LPI signalling
> + * @eee: default EEE configuration.
> + * @lpi_timer_limit_us: Maximum (inclusive) value of the EEE LPI timer.
>   */
>  struct phylink_config {
>  	struct device *dev;
> @@ -156,10 +164,16 @@ struct phylink_config {
>  	bool mac_managed_pm;
>  	bool mac_requires_rxc;
>  	bool default_an_inband;
> +	bool eee_rx_clk_stop_enable;
>  	void (*get_fixed_state)(struct phylink_config *config,
>  				struct phylink_link_state *state);
>  	DECLARE_PHY_INTERFACE_MASK(supported_interfaces);
> +	DECLARE_PHY_INTERFACE_MASK(lpi_interfaces);
>  	unsigned long mac_capabilities;
> +	unsigned long lpi_capabilities;
> +	u32 lpi_timer_limit_us;
> +	u32 lpi_timer_default;
> +	bool eee_enabled_default;
>  };

Hi Russell,

A minor nit from my side.

The Kernel doc updates don't correspond entirely to the structure updates:
- @eee is documented but not present in the structure
- Conversely, @lpi_timer_default and @ee_enabled_default are
  present in the structure but not documented.

...

  parent reply	other threads:[~2024-12-13  9:37 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:22 [PATCH net-next 00/10] net: add phylink managed EEE support Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 01/10] net: mdio: add definition for clock stop capable bit Russell King (Oracle)
2024-12-10  2:21   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 02/10] net: phy: add support for querying PHY clock stop capability Russell King (Oracle)
2024-12-10  3:00   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 03/10] net: phy: add configuration of rx clock stop mode Russell King (Oracle)
2024-12-10  3:03   ` Andrew Lunn
2024-12-10  3:11   ` Andrew Lunn
2024-12-10  9:51     ` Russell King (Oracle)
2024-12-10 23:15       ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 04/10] net: phylink: add phylink_link_is_up() helper Russell King (Oracle)
2024-12-10  3:03   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 05/10] net: phylink: add EEE management Russell King (Oracle)
2024-12-10  3:18   ` Andrew Lunn
2024-12-13  9:37   ` Simon Horman [this message]
2024-12-14 23:38   ` Heiner Kallweit
2025-01-02 16:39     ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 06/10] net: phylink: allow MAC driver to validate eee params Russell King (Oracle)
2024-12-10  3:21   ` Andrew Lunn
2024-12-10  9:58     ` Russell King (Oracle)
2024-12-10 13:58       ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 07/10] net: mvneta: convert to phylink EEE implementation Russell King (Oracle)
2024-12-10  3:25   ` Andrew Lunn
2024-12-12  0:54   ` kernel test robot
2024-12-13 10:04   ` Simon Horman
2024-12-13 10:22     ` Simon Horman
2024-12-13 10:51       ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 08/10] net: mvpp2: add " Russell King (Oracle)
2024-12-10  3:27   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 09/10] net: lan743x: use netdev in lan743x_phylink_mac_link_down() Russell King (Oracle)
2024-12-10  3:28   ` Andrew Lunn
2024-12-09 14:24 ` [PATCH net-next 10/10] net: lan743x: convert to phylink managed EEE Russell King (Oracle)
2024-12-10  3:37   ` Andrew Lunn
2024-12-10 10:07     ` Russell King (Oracle)
2024-12-10 14:57   ` kernel test robot
2024-12-12  1:31   ` kernel test robot
2024-12-09 18:35 ` [PATCH net-next 00/10] net: add phylink managed EEE support Christian Marangi
2024-12-09 18:59   ` Russell King (Oracle)
2024-12-11 12:07 ` Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241213093709.GE2110@kernel.org \
    --to=horms@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=marcin.s.wojtas@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.