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 <[email protected]>
---
drivers/net/phy/phy-c45.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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) {
--
2.30.2
On Wed, May 04, 2022 at 02:27:37PM +0200, Andrew Lunn wrote:
> On Wed, May 04, 2022 at 01:06:54PM +0200, Oleksij Rempel wrote:
> > 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 <[email protected]>
>
> Hi Oleksij
>
> I'm i right in saying 3da8ffd8545f is only in net-next?
ack.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
On Wed, May 04, 2022 at 01:06:54PM +0200, Oleksij Rempel wrote:
> 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 <[email protected]>
Hi Oleksij
I'm i right in saying 3da8ffd8545f is only in net-next?
Reviewed-by: Andrew Lunn <[email protected]>
Andrew