2022-05-09 06:02:32

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH net-next v3 0/7] add ti dp83td510 support

changes v3:
- export reusable code snippets and make use of it in the dp83td510
driver

changes v2:
- rewrite the driver reduce usage of common code and to reduce amount of
quirks.
- add genphy_c45_baset1_an_config_aneg fix

Oleksij Rempel (7):
net: phy: genphy_c45_baset1_an_config_aneg: do no set unknown
configuration
net: phy: introduce genphy_c45_pma_base1_setup_master_slave()
net: phy: genphy_c45_pma_base1_setup_master_slave: do no set unknown
configuration
net: phy: introduce genphy_c45_pma_baset1_read_master_slave()
net: phy: genphy_c45_pma_baset1_read_master_slave: read actual
configuration
net: phy: export genphy_c45_baset1_read_status()
net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

drivers/net/phy/Kconfig | 6 ++
drivers/net/phy/Makefile | 1 +
drivers/net/phy/dp83td510.c | 210 ++++++++++++++++++++++++++++++++++++
drivers/net/phy/phy-c45.c | 93 +++++++++++-----
include/linux/phy.h | 3 +
5 files changed, 286 insertions(+), 27 deletions(-)
create mode 100644 drivers/net/phy/dp83td510.c

--
2.30.2



2022-05-09 08:44:39

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH net-next v3 1/7] 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 <[email protected]>
Reviewed-by: Andrew Lunn <[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