linux/include
Russell King (Oracle) e2668c34b7 net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI
When phy_ethtool_set_eee_noneg() detects a change in the LPI
parameters, it attempts to update phylib state and trigger the link
to cycle so the MAC sees the updated parameters.

However, in doing so, it sets phydev->enable_tx_lpi depending on
whether the EEE configuration allows the MAC to generate LPI without
taking into account the result of negotiation.

This can be demonstrated with a 1000base-T FD interface by:

 # ethtool --set-eee eno0 advertise 8   # cause EEE to be not negotiated
 # ethtool --set-eee eno0 tx-lpi off
 # ethtool --set-eee eno0 tx-lpi on

This results in being true, despite EEE not having been negotiated and:
 # ethtool --show-eee eno0
	EEE status: enabled - inactive
	Tx LPI: 250 (us)
	Supported EEE link modes:  100baseT/Full
	                           1000baseT/Full
	Advertised EEE link modes:  100baseT/Full
	                                         1000baseT/Full

Fix this by keeping track of whether EEE was negotiated via a new
eee_active member in struct phy_device, and include this state in
the decision whether phydev->enable_tx_lpi should be set.

Fixes: 3e43b903da ("net: phy: Immediately call adjust_link if only tx_lpi_enabled changes")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tErSe-005RhB-2R@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-11-28 09:26:13 +01:00
..
acpi ACPI: processor: Move arch_init_invariance_cppc() call later 2024-11-06 21:31:36 +01:00
asm-generic asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
clocksource
crypto This update includes the following changes: 2024-11-19 10:28:41 -08:00
cxl
drm drm/i915/gsc: ARL-H and ARL-U need a newer GSC FW. 2024-11-12 09:44:55 +02:00
dt-bindings soc: driver updates for 6.12 2024-11-20 15:40:54 -08:00
keys
kunit The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
kvm
linux net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI 2024-11-28 09:26:13 +01:00
math-emu
media media: replace obsolete hans.verkuil@cisco.com alias 2024-11-08 13:38:09 +01:00
memory
misc
net Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
pcmcia
ras
rdma move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rv
scsi Random number generator updates for Linux 6.13-rc1. 2024-11-19 10:43:44 -08:00
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
sound ALSA: hda: fix trigger_tstamp_latched 2024-10-02 12:50:24 +02:00
target move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
trace Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
uapi Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
ufs
vdso vdso: Rename struct arch_vdso_data to arch_vdso_time_data 2024-11-02 12:37:36 +01:00
video Devicetree updates for v6.13: 2024-11-20 13:19:25 -08:00
xen xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00