From 86a362c49f3c0ba72f2e9217c704e10959c54bec Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 1 Dec 2017 10:24:26 +0000 Subject: phylink: get rid of separate Cisco SGMII and 802.3z modes Since the handling of SGMII and 802.3z is now the same, combine the MLO_AN_xxx constants into a single MLO_AN_INBAND, and use the PHY interface mode to distinguish between Cisco SGMII and 802.3z. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- include/linux/phylink.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'include/linux/phylink.h') diff --git a/include/linux/phylink.h b/include/linux/phylink.h index af67edd4ae38..cab22ad3bd6f 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -20,13 +20,12 @@ enum { MLO_AN_PHY = 0, /* Conventional PHY */ MLO_AN_FIXED, /* Fixed-link mode */ - MLO_AN_SGMII, /* Cisco SGMII protocol */ - MLO_AN_8023Z, /* 1000base-X protocol */ + MLO_AN_INBAND, /* In-band protocol */ }; static inline bool phylink_autoneg_inband(unsigned int mode) { - return mode == MLO_AN_SGMII || mode == MLO_AN_8023Z; + return mode == MLO_AN_INBAND; } struct phylink_link_state { @@ -69,7 +68,7 @@ struct phylink_mac_ops { /** * mac_config: configure the MAC for the selected mode and state * @ndev: net_device structure for the MAC - * @mode: one of MLO_AN_FIXED, MLO_AN_PHY, MLO_AN_8023Z, MLO_AN_SGMII + * @mode: one of MLO_AN_FIXED, MLO_AN_PHY, MLO_AN_INBAND * @state: state structure * * The action performed depends on the currently selected mode: @@ -77,14 +76,10 @@ struct phylink_mac_ops { * %MLO_AN_FIXED, %MLO_AN_PHY: * set the specified speed, duplex, pause mode, and phy interface * mode in the provided @state. - * %MLO_AN_8023Z: - * place the link in 1000base-X mode, advertising the parameters - * given in advertising in @state. - * %MLO_AN_SGMII: - * place the link in Cisco SGMII mode - there is no advertisment - * to make as the PHY communicates the speed and duplex to the - * MAC over the in-band control word. Configuration of the pause - * mode is as per MLO_AN_PHY since this is not included. + * %MLO_AN_INBAND: + * place the link in an inband negotiation mode (such as + * 1000base-X or Cisco SGMII mode depending on the phy interface + * mode), advertising the parameters given in advertising in @state. */ void (*mac_config)(struct net_device *ndev, unsigned int mode, const struct phylink_link_state *state); -- cgit v1.2.3