mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
net: phy: Add phy library support to check supported list when autoneg is enabled
Adds support in phy library to accept autoneg configuration only when feature is enabled in supported list. Signed-off-by: Divya Koppera <divya.koppera@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20240821055906.27717-2-Divya.Koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e540e3bcf2
commit
d4c897675a
@ -1089,7 +1089,10 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
|
||||
if (autoneg != AUTONEG_ENABLE && autoneg != AUTONEG_DISABLE)
|
||||
return -EINVAL;
|
||||
|
||||
if (autoneg == AUTONEG_ENABLE && linkmode_empty(advertising))
|
||||
if (autoneg == AUTONEG_ENABLE &&
|
||||
(linkmode_empty(advertising) ||
|
||||
!linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
|
||||
phydev->supported)))
|
||||
return -EINVAL;
|
||||
|
||||
if (autoneg == AUTONEG_DISABLE &&
|
||||
|
Loading…
Reference in New Issue
Block a user