Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy-c45: Fix genphy_c45_ethtool_set_eee description

The text has been cut/paste from genphy_c45_ethtool_get_eee but not
changed to reflect it performs set.

Additionally, extend the comment. This function implements the logic
that eee_enabled has global control over EEE. When eee_enabled is
false, no link modes will be advertised, and as a result, the MAC
should not transmit LPI.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230619220332.4038924-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Andrew Lunn and committed by
Jakub Kicinski
b7c31ccd 634236b3

+6 -3
+6 -3
drivers/net/phy/phy-c45.c
··· 1425 1425 EXPORT_SYMBOL(genphy_c45_ethtool_get_eee); 1426 1426 1427 1427 /** 1428 - * genphy_c45_ethtool_set_eee - get EEE supported and status 1428 + * genphy_c45_ethtool_set_eee - set EEE supported and status 1429 1429 * @phydev: target phy_device struct 1430 1430 * @data: ethtool_eee data 1431 1431 * 1432 - * Description: it reportes the Supported/Advertisement/LP Advertisement 1433 - * capabilities. 1432 + * Description: sets the Supported/Advertisement/LP Advertisement 1433 + * capabilities. If eee_enabled is false, no links modes are 1434 + * advertised, but the previously advertised link modes are 1435 + * retained. This allows EEE to be enabled/disabled in a 1436 + * non-destructive way. 1434 1437 */ 1435 1438 int genphy_c45_ethtool_set_eee(struct phy_device *phydev, 1436 1439 struct ethtool_eee *data)