2023-03-27 14:28:13

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH net-next v2 8/8] net: fec: Indicate EEE (LPI) support for some FEC Ethernet controllers

This commit adds EEE (LPI) support indication for specific FEC Ethernet
controllers. By indicating EEE support for these controllers, it allows
PHY drivers to choose the right configuration for EEE and LPI features,
depending on whether the MAC or the PHY is responsible for handling them.

This change provides more flexibility and control over energy-saving
features, enabling PHY drivers to disable SmartEEE functionality in favor
of MAC EEE support when appropriate, depending on their specific use cases
and requirements.

Signed-off-by: Oleksij Rempel <[email protected]>
---
drivers/net/ethernet/freescale/fec_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index f3b16a6673e2..554a5dc92817 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2318,6 +2318,8 @@ static int fec_enet_mii_probe(struct net_device *ndev)
fep->link = 0;
fep->full_duplex = 0;

+ if (fep->quirks & FEC_QUIRK_HAS_EEE)
+ phy_dev->mac_supports_eee = true;
phy_dev->mac_managed_pm = true;

phy_attached_info(phy_dev);
--
2.30.2


2023-03-28 01:57:02

by Wei Fang

[permalink] [raw]
Subject: RE: [PATCH net-next v2 8/8] net: fec: Indicate EEE (LPI) support for some FEC Ethernet controllers

> -----Original Message-----
> From: Oleksij Rempel <[email protected]>
> Sent: 2023??3??27?? 22:22
> To: Wei Fang <[email protected]>; David S. Miller <[email protected]>;
> Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>;
> Paolo Abeni <[email protected]>; Andrew Lunn <[email protected]>; Heiner
> Kallweit <[email protected]>; Russell King <[email protected]>
> Cc: Oleksij Rempel <[email protected]>; [email protected];
> [email protected]; [email protected]; Shenwei Wang
> <[email protected]>; Clark Wang <[email protected]>;
> dl-linux-imx <[email protected]>; Amit Cohen <[email protected]>; Gal
> Pressman <[email protected]>; Alexandru Tachici
> <[email protected]>; Piergiorgio Beruto
> <[email protected]>; Willem de Bruijn <[email protected]>;
> Vladimir Oltean <[email protected]>
> Subject: [PATCH net-next v2 8/8] net: fec: Indicate EEE (LPI) support for some
> FEC Ethernet controllers
>
> This commit adds EEE (LPI) support indication for specific FEC Ethernet
> controllers. By indicating EEE support for these controllers, it allows PHY
> drivers to choose the right configuration for EEE and LPI features, depending
> on whether the MAC or the PHY is responsible for handling them.
>
> This change provides more flexibility and control over energy-saving features,
> enabling PHY drivers to disable SmartEEE functionality in favor of MAC EEE
> support when appropriate, depending on their specific use cases and
> requirements.
>
> Signed-off-by: Oleksij Rempel <[email protected]>

Reviewed-by: Wei Fang <[email protected]>