summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-06-16 13:07:19 +0100
committerJakub Kicinski <kuba@kernel.org>2023-06-22 19:41:02 -0700
commit6e5bb3da9842950a161625b4ab2743d1d5c64715 (patch)
tree552e3fd25edc9f8c71cdfd533a4fb4c08d217ca6 /drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
parentbfa0a3ac05b69842aaee7c60a8ceffd734f2e2b9 (diff)
net: sparx5: update PCS driver to use neg_mode
Update Sparx5'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: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/E1qA8EZ-00EaGF-6F@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c')
-rw-r--r--drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
index bb97d27a1da4..f8562c1a894d 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
@@ -91,8 +91,7 @@ static void sparx5_pcs_get_state(struct phylink_pcs *pcs,
state->pause = status.pause;
}
-static int sparx5_pcs_config(struct phylink_pcs *pcs,
- unsigned int mode,
+static int sparx5_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
phy_interface_t interface,
const unsigned long *advertising,
bool permit_pause_to_mac)
@@ -104,8 +103,9 @@ static int sparx5_pcs_config(struct phylink_pcs *pcs,
conf = port->conf;
conf.power_down = false;
conf.portmode = interface;
- conf.inband = phylink_autoneg_inband(mode);
- conf.autoneg = phylink_test(advertising, Autoneg);
+ conf.inband = neg_mode == PHYLINK_PCS_NEG_INBAND_DISABLED ||
+ neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED;
+ conf.autoneg = neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED;
conf.pause_adv = 0;
if (phylink_test(advertising, Pause))
conf.pause_adv |= ADVERTISE_1000XPAUSE;