summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-05-06 06:23:51 +0200
committerDavid S. Miller <davem@davemloft.net>2022-05-09 12:09:29 +0100
commita7f0e4bea8eda1d286f4e99176bcb88f53aa703b (patch)
treea99e067951e0799af3e8e57e1972368f6f0800ca /drivers/net/phy
parent5dd6da25255a9d64622c693b99d7668da939a980 (diff)
downloadlinux-a7f0e4bea8eda1d286f4e99176bcb88f53aa703b.tar.bz2
net: phy: genphy_c45_baset1_an_config_aneg: do no set unknown configuration
Do not change default master/slave autoneg configuration if no changes was requested. Fixes: 3da8ffd8545f ("net: phy: Add 10BASE-T1L support in phy-c45") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy-c45.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index eefdd67d5556..0014aa6e73c0 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -191,8 +191,12 @@ static int genphy_c45_baset1_an_config_aneg(struct phy_device *phydev)
case MASTER_SLAVE_CFG_MASTER_PREFERRED:
case MASTER_SLAVE_CFG_SLAVE_PREFERRED:
break;
+ case MASTER_SLAVE_CFG_UNKNOWN:
+ case MASTER_SLAVE_CFG_UNSUPPORTED:
+ return 0;
default:
- break;
+ phydev_warn(phydev, "Unsupported Master/Slave mode\n");
+ return -EOPNOTSUPP;
}
switch (phydev->master_slave_set) {