OSDN Git Service

net: phy: do not force EEE support
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 22 Feb 2023 05:50:42 +0000 (06:50 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Feb 2023 12:43:23 +0000 (13:43 +0100)
commit3eeca4e199cee2066c65b872391cecee5cbbbb81
tree18faab62dcc3daefd05a9a371a5377e4c8a50dcd
parentb6478b8c93304fa0483e4657779b44634a1711c7
net: phy: do not force EEE support

With following patches:
commit 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()")
commit 5827b168125d ("net: phy: c45: migrate to genphy_c45_write_eee_adv()")

we set the advertisement to potentially supported values. This behavior
may introduce new regressions on systems where EEE was disabled by
default (BIOS or boot loader configuration or by other ways.)

At same time, with this patches, we would overwrite EEE advertisement
configuration made over ethtool.

To avoid this issues, we need to cache initial and ethtool advertisement
configuration and store it for later use.

Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()")
Fixes: 5827b168125d ("net: phy: c45: migrate to genphy_c45_write_eee_adv()")
Fixes: 022c3f87f88e ("net: phy: add genphy_c45_ethtool_get/set_eee() support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/phy-c45.c
drivers/net/phy/phy_device.c
include/linux/phy.h