Commit 140d1002 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski

net: mvneta: update PCS driver to use neg_mode

Update mvneta's embedded PCS driver to use neg_mode rather than the
mode argument. As there is no pcs_link_up() method, this only affects
the pcs_config() method.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1qA8EE-00EaFr-Kx@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a0e93cfd
...@@ -4002,8 +4002,8 @@ static void mvneta_pcs_get_state(struct phylink_pcs *pcs, ...@@ -4002,8 +4002,8 @@ static void mvneta_pcs_get_state(struct phylink_pcs *pcs,
state->pause |= MLO_PAUSE_TX; state->pause |= MLO_PAUSE_TX;
} }
static int mvneta_pcs_config(struct phylink_pcs *pcs, static int mvneta_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
unsigned int mode, phy_interface_t interface, phy_interface_t interface,
const unsigned long *advertising, const unsigned long *advertising,
bool permit_pause_to_mac) bool permit_pause_to_mac)
{ {
...@@ -4016,7 +4016,7 @@ static int mvneta_pcs_config(struct phylink_pcs *pcs, ...@@ -4016,7 +4016,7 @@ static int mvneta_pcs_config(struct phylink_pcs *pcs,
MVNETA_GMAC_AN_FLOW_CTRL_EN | MVNETA_GMAC_AN_FLOW_CTRL_EN |
MVNETA_GMAC_AN_DUPLEX_EN; MVNETA_GMAC_AN_DUPLEX_EN;
if (phylink_autoneg_inband(mode)) { if (neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED) {
mask |= MVNETA_GMAC_CONFIG_MII_SPEED | mask |= MVNETA_GMAC_CONFIG_MII_SPEED |
MVNETA_GMAC_CONFIG_GMII_SPEED | MVNETA_GMAC_CONFIG_GMII_SPEED |
MVNETA_GMAC_CONFIG_FULL_DUPLEX; MVNETA_GMAC_CONFIG_FULL_DUPLEX;
...@@ -5518,6 +5518,7 @@ static int mvneta_probe(struct platform_device *pdev) ...@@ -5518,6 +5518,7 @@ static int mvneta_probe(struct platform_device *pdev)
clk_prepare_enable(pp->clk_bus); clk_prepare_enable(pp->clk_bus);
pp->phylink_pcs.ops = &mvneta_phylink_pcs_ops; pp->phylink_pcs.ops = &mvneta_phylink_pcs_ops;
pp->phylink_pcs.neg_mode = true;
pp->phylink_config.dev = &dev->dev; pp->phylink_config.dev = &dev->dev;
pp->phylink_config.type = PHYLINK_NETDEV; pp->phylink_config.type = PHYLINK_NETDEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment