diff options
author | David S. Miller <davem@davemloft.net> | 2021-06-14 12:54:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-14 12:54:43 -0700 |
commit | 645a7fe13c8b7b66a8898b58b38405e26913527c (patch) | |
tree | 6419850c016f2e0f5acb59ce2ab6f4c0c6bd42b1 /net | |
parent | ffa85b73c3c4143a8e8087c0930f6c5a6ead8e9f (diff) | |
parent | 49011e0c1555dd7a689d0f32fd78c1ecd43e59cd (diff) |
Merge branch 'ksz886x-cable-test'
Oleksij Rempel says:
====================
provide cable test support for the ksz886x switch
changes v5:
- drop resume() patch
- add Reviewed-by tags.
- rework dsa_slave_phy_connect() patch
changes v4:
- use fallthrough;
- use EOPNOTSUPP instead of ENOTSUPP
- drop flags variable in dsa_slave_phy_connect patch
- extend description for the "net: phy: micrel: apply resume errat"
patch
- fix "use consistent alignments" patch
changes v3:
- remove RFC tag
changes v2:
- use generic MII_* defines where possible
- rework phylink validate
- remove phylink get state function
- reorder cabletest patches to make PHY flag patch in the right order
- fix MDI-X detection
This patches provide support for cable testing on the ksz886x switches.
Since it has one special port, we needed to add phylink with validation
and extra quirk for the PHY to signal, that one port will not provide
valid cable testing reports.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa/slave.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 3ca509eb284d..798944aa847a 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1749,7 +1749,8 @@ static void dsa_slave_phylink_fixed_state(struct phylink_config *config, } /* slave device setup *******************************************************/ -static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr) +static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr, + u32 flags) { struct dsa_port *dp = dsa_slave_to_port(slave_dev); struct dsa_switch *ds = dp->ds; @@ -1760,6 +1761,8 @@ static int dsa_slave_phy_connect(struct net_device *slave_dev, int addr) return -ENODEV; } + slave_dev->phydev->dev_flags |= flags; + return phylink_connect_phy(dp->pl, slave_dev->phydev); } @@ -1804,7 +1807,7 @@ static int dsa_slave_phy_setup(struct net_device *slave_dev) /* We could not connect to a designated PHY or SFP, so try to * use the switch internal MDIO bus instead */ - ret = dsa_slave_phy_connect(slave_dev, dp->index); + ret = dsa_slave_phy_connect(slave_dev, dp->index, phy_flags); if (ret) { netdev_err(slave_dev, "failed to connect to port %d: %d\n", |