Commit fa9c562f authored by Ong Boon Leong's avatar Ong Boon Leong Committed by David S. Miller

net: make xpcs_do_config to accept advertising for pcs-xpcs and sja1105

xpcs_config() has 'advertising' input that is required for C37 1000BASE-X
AN in later patch series. So, we prepare xpcs_do_config() for it.

For sja1105, xpcs_do_config() is used for xpcs configuration without
depending on advertising input, so set to NULL.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 982c3e29
...@@ -2330,7 +2330,7 @@ int sja1105_static_config_reload(struct sja1105_private *priv, ...@@ -2330,7 +2330,7 @@ int sja1105_static_config_reload(struct sja1105_private *priv,
else else
mode = MLO_AN_PHY; mode = MLO_AN_PHY;
rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode); rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode, NULL);
if (rc < 0) if (rc < 0)
goto out; goto out;
......
...@@ -795,7 +795,7 @@ static int xpcs_config_2500basex(struct dw_xpcs *xpcs) ...@@ -795,7 +795,7 @@ static int xpcs_config_2500basex(struct dw_xpcs *xpcs)
} }
int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
unsigned int mode) unsigned int mode, const unsigned long *advertising)
{ {
const struct xpcs_compat *compat; const struct xpcs_compat *compat;
int ret; int ret;
...@@ -843,7 +843,7 @@ static int xpcs_config(struct phylink_pcs *pcs, unsigned int mode, ...@@ -843,7 +843,7 @@ static int xpcs_config(struct phylink_pcs *pcs, unsigned int mode,
{ {
struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs);
return xpcs_do_config(xpcs, interface, mode); return xpcs_do_config(xpcs, interface, mode, advertising);
} }
static int xpcs_get_state_c73(struct dw_xpcs *xpcs, static int xpcs_get_state_c73(struct dw_xpcs *xpcs,
...@@ -864,7 +864,7 @@ static int xpcs_get_state_c73(struct dw_xpcs *xpcs, ...@@ -864,7 +864,7 @@ static int xpcs_get_state_c73(struct dw_xpcs *xpcs,
state->link = 0; state->link = 0;
return xpcs_do_config(xpcs, state->interface, MLO_AN_INBAND); return xpcs_do_config(xpcs, state->interface, MLO_AN_INBAND, NULL);
} }
if (state->an_enabled && xpcs_aneg_done_c73(xpcs, state, compat)) { if (state->an_enabled && xpcs_aneg_done_c73(xpcs, state, compat)) {
......
...@@ -30,7 +30,7 @@ int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface); ...@@ -30,7 +30,7 @@ int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface);
void xpcs_link_up(struct phylink_pcs *pcs, unsigned int mode, void xpcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
phy_interface_t interface, int speed, int duplex); phy_interface_t interface, int speed, int duplex);
int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
unsigned int mode); unsigned int mode, const unsigned long *advertising);
void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces); void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces);
int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns,
int enable); int enable);
......
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