Commit 7e3cb4e8 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski
Browse files

net: phylink: pass neg_mode into c22 state decoder



Pass the current neg_mode into phylink_mii_c22_pcs_get_state() and
phylink_mii_c22_pcs_decode_state(). Update all users of phylink PCS
that use these functions.

Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/E1tXGeY-000Et9-8g@rmk-PC.armlinux.org.uk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c6739623
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -760,7 +760,7 @@ static void dtsec_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,
{
	struct fman_mac *dtsec = pcs_to_dtsec(pcs);

	phylink_mii_c22_pcs_get_state(dtsec->tbidev, state);
	phylink_mii_c22_pcs_get_state(dtsec->tbidev, neg_mode, state);
}

static int dtsec_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
+1 −1
Original line number Diff line number Diff line
@@ -443,7 +443,7 @@ int lan966x_stats_init(struct lan966x *lan966x);

void lan966x_port_config_down(struct lan966x_port *port);
void lan966x_port_config_up(struct lan966x_port *port);
void lan966x_port_status_get(struct lan966x_port *port,
void lan966x_port_status_get(struct lan966x_port *port, unsigned int neg_mode,
			     struct phylink_link_state *state);
int lan966x_port_pcs_set(struct lan966x_port *port,
			 struct lan966x_port_config *config);
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ static void lan966x_pcs_get_state(struct phylink_pcs *pcs,
{
	struct lan966x_port *port = lan966x_pcs_to_port(pcs);

	lan966x_port_status_get(port, state);
	lan966x_port_status_get(port, neg_mode, state);
}

static int lan966x_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
+2 −2
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ void lan966x_port_config_up(struct lan966x_port *port)
	lan966x_port_link_up(port);
}

void lan966x_port_status_get(struct lan966x_port *port,
void lan966x_port_status_get(struct lan966x_port *port, unsigned int neg_mode,
			     struct phylink_link_state *state)
{
	struct lan966x *lan966x = port->lan966x;
@@ -314,7 +314,7 @@ void lan966x_port_status_get(struct lan966x_port *port,
		bmsr |= BMSR_ANEGCOMPLETE;

		lp_adv = DEV_PCS1G_ANEG_STATUS_LP_ADV_GET(val);
		phylink_mii_c22_pcs_decode_state(state, bmsr, lp_adv);
		phylink_mii_c22_pcs_decode_state(state, neg_mode, bmsr, lp_adv);
	} else {
		if (!state->link)
			return;
+1 −1
Original line number Diff line number Diff line
@@ -2336,7 +2336,7 @@ static void axienet_pcs_get_state(struct phylink_pcs *pcs,
{
	struct mdio_device *pcs_phy = pcs_to_axienet_local(pcs)->pcs_phy;

	phylink_mii_c22_pcs_get_state(pcs_phy, state);
	phylink_mii_c22_pcs_get_state(pcs_phy, neg_mode, state);
}

static void axienet_pcs_an_restart(struct phylink_pcs *pcs)
Loading