mbox series

[net-next,0/7] net: phy: smsc: add support for edpd tunable

Message ID 17fcccf5-8d81-298e-0671-d543340da105@gmail.com (mailing list archive)
Headers show
Series net: phy: smsc: add support for edpd tunable | expand

Message

Heiner Kallweit April 2, 2023, 9:43 a.m. UTC
This adds support for the EDPD PHY tunable.
Per default EDPD is disabled in interrupt mode, the tunable can be used
to override this, e.g. if the link partner doesn't use EDPD.
The interval to check for energy can be chosen between 1000ms and
2000ms. Note that this value consists of the 1000ms phylib interval
for state machine runs plus the time to wait for energy being detected.

Heiner Kallweit (7):
  net: phy: smsc: rename flag energy_enable
  net: phy: smsc: add helper smsc_phy_config_edpd
  net: phy: smsc: clear edpd_enable if interrupt mode is used
  net: phy: smsc: add flag edpd_mode_set_by_user
  net: phy: smss: prepare for making edpd wait period configurable
  net: phy: smsc: add edpd tunable support
  net: phy: smsc: enable edpd tunable support

 drivers/net/phy/smsc.c  | 138 ++++++++++++++++++++++++++++++++++++----
 include/linux/smscphy.h |   4 ++
 2 files changed, 131 insertions(+), 11 deletions(-)

Comments

Florian Fainelli April 2, 2023, 2 p.m. UTC | #1
On 4/2/2023 2:43 AM, Heiner Kallweit wrote:
> This adds support for the EDPD PHY tunable.
> Per default EDPD is disabled in interrupt mode, the tunable can be used
> to override this, e.g. if the link partner doesn't use EDPD.
> The interval to check for energy can be chosen between 1000ms and
> 2000ms. Note that this value consists of the 1000ms phylib interval
> for state machine runs plus the time to wait for energy being detected.

AFAIR Chris Healy was trying to get something similar done, maybe you 
can CC him on the next version?
Heiner Kallweit April 2, 2023, 2:58 p.m. UTC | #2
On 02.04.2023 16:00, Florian Fainelli wrote:
> 
> 
> On 4/2/2023 2:43 AM, Heiner Kallweit wrote:
>> This adds support for the EDPD PHY tunable.
>> Per default EDPD is disabled in interrupt mode, the tunable can be used
>> to override this, e.g. if the link partner doesn't use EDPD.
>> The interval to check for energy can be chosen between 1000ms and
>> 2000ms. Note that this value consists of the 1000ms phylib interval
>> for state machine runs plus the time to wait for energy being detected.
> 
> AFAIR Chris Healy was trying to get something similar done, maybe you can CC him on the next version?

Actually this is based on a conversation between him and me. Chris came up
with a first version and I reworked it from scratch to meet mainline standards
and make it usable on SMSC and Amlogic PHY's.
Chris Healy April 2, 2023, 11:33 p.m. UTC | #3
On Sun, Apr 2, 2023 at 7:58 AM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> On 02.04.2023 16:00, Florian Fainelli wrote:
> >
> >
> > On 4/2/2023 2:43 AM, Heiner Kallweit wrote:
> >> This adds support for the EDPD PHY tunable.
> >> Per default EDPD is disabled in interrupt mode, the tunable can be used
> >> to override this, e.g. if the link partner doesn't use EDPD.
> >> The interval to check for energy can be chosen between 1000ms and
> >> 2000ms. Note that this value consists of the 1000ms phylib interval
> >> for state machine runs plus the time to wait for energy being detected.
> >
> > AFAIR Chris Healy was trying to get something similar done, maybe you can CC him on the next version?
>
> Actually this is based on a conversation between him and me. Chris came up
> with a first version and I reworked it from scratch to meet mainline standards
> and make it usable on SMSC and Amlogic PHY's.
>

It's great to see this feature coming together.  I wish I would have
had more time to help out.