Merge branch 'net-ethernet-rework-eee'
authorJakub Kicinski <kuba@kernel.org>
Wed, 6 Mar 2024 03:21:19 +0000 (19:21 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Mar 2024 03:21:20 +0000 (19:21 -0800)
commit6d0f77a0e3eec7a23a48297901cc4e4a89649cb6
tree0c2225062ad928f9c50f06a6f7db25566d9aefab
parent344f7a4651497ffc62166ec6318b33f79d71c3df
parent6a2495adc0c83d039a872b75d9d348a5dd3eb9f4
Merge branch 'net-ethernet-rework-eee'

Oleksij Rempel says:

====================
net: ethernet: Rework EEE

with Andrew's permission I'll continue mainlining this patches:
==============================================================

Most MAC drivers get EEE wrong. The API to the PHY is not very
obvious, which is probably why. Rework the API, pushing most of the
EEE handling into phylib core, leaving the MAC drivers to just
enable/disable support for EEE in there change_link call back.

MAC drivers are now expect to indicate to phylib if they support
EEE. This will allow future patches to configure the PHY to advertise
no EEE link modes when EEE is not supported. The information could
also be used to enable SmartEEE if the PHY supports it.

With these changes, the uAPI configuration eee_enable becomes a global
on/off. tx-lpi must also be enabled before EEE is enabled. This fits
the discussion here:

https://lore.kernel.org/netdev/af880ce8-a7b8-138e-1ab9-8c89e662eecf@gmail.com/T/

This patchset puts in place all the infrastructure, and converts one
MAC driver to the new API. Following patchsets will convert other MAC
drivers, extend support into phylink, and when all MAC drivers are
converted to the new scheme, clean up some unneeded code.
====================

Link: https://lore.kernel.org/r/20240302195306.3207716-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>