net: phy: micrel: correct KSZ9131RNX EEE capabilities and advertisement
authorOleksij Rempel <o.rempel@pengutronix.de>
Fri, 24 Mar 2023 13:39:08 +0000 (14:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Mar 2023 07:15:52 +0000 (08:15 +0100)
commitf2e9d083f768ec147da3e3e5209030d3c090c689
tree9b828f083d7f5593e7693a60e3ee45558a46ecbc
parentb465518dc27da1ed74b8cbada4659708aac35adb
net: phy: micrel: correct KSZ9131RNX EEE capabilities and advertisement

The KSZ9131RNX incorrectly shows EEE capabilities in its registers.
Although the "EEE control and capability 1" (Register 3.20) is set to 0,
indicating no EEE support, the "EEE advertisement 1" (Register 7.60) is
set to 0x6, advertising EEE support for 1000BaseT/Full and
100BaseT/Full.
This inconsistency causes PHYlib to assume there is no EEE support,
preventing control over EEE advertisement, which is enabled by default.

This patch resolves the issue by utilizing the ksz9477_get_features()
function to correctly set the EEE capabilities for the KSZ9131RNX. This
adjustment allows proper control over EEE advertisement and ensures
accurate representation of the device's capabilities.

Fixes: 8b68710a3121 ("net: phy: start using genphy_c45_ethtool_get/set_eee()")
Reported-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/micrel.c