Lines Matching full:conf

96 	if (port->conf.portmode == PHY_INTERFACE_MODE_1000BASEX)  in sparx5_get_dev2g5_status()
98 else if (port->conf.portmode == PHY_INTERFACE_MODE_2500BASEX) in sparx5_get_dev2g5_status()
109 if (port->conf.portmode == PHY_INTERFACE_MODE_SGMII) { in sparx5_get_dev2g5_status()
124 bool high_speed_dev = sparx5_is_baser(port->conf.portmode); in sparx5_get_sfi_status()
147 if (port->conf.portmode == PHY_INTERFACE_MODE_5GBASER) in sparx5_get_sfi_status()
149 else if (port->conf.portmode == PHY_INTERFACE_MODE_10GBASER) in sparx5_get_sfi_status()
164 status->speed = port->conf.speed; in sparx5_get_port_status()
165 if (port->conf.power_down) { in sparx5_get_port_status()
169 switch (port->conf.portmode) { in sparx5_get_port_status()
189 struct sparx5_port_config *conf, in sparx5_port_error() argument
196 conf->speed, phy_modes(conf->portmode)); in sparx5_port_error()
201 phy_modes(conf->portmode)); in sparx5_port_error()
213 struct sparx5_port_config *conf) in sparx5_port_verify_speed() argument
216 conf->speed > SPEED_2500) || in sparx5_port_verify_speed()
218 conf->speed > SPEED_5000) || in sparx5_port_verify_speed()
220 conf->speed > SPEED_10000)) in sparx5_port_verify_speed()
221 return sparx5_port_error(port, conf, SPX5_PERR_SPEED); in sparx5_port_verify_speed()
223 switch (conf->portmode) { in sparx5_port_verify_speed()
227 if (conf->speed != SPEED_1000 || in sparx5_port_verify_speed()
229 return sparx5_port_error(port, conf, SPX5_PERR_SPEED); in sparx5_port_verify_speed()
231 return sparx5_port_error(port, conf, SPX5_PERR_IFTYPE); in sparx5_port_verify_speed()
234 if (conf->speed != SPEED_2500 || in sparx5_port_verify_speed()
236 return sparx5_port_error(port, conf, SPX5_PERR_SPEED); in sparx5_port_verify_speed()
240 return sparx5_port_error(port, conf, SPX5_PERR_IFTYPE); in sparx5_port_verify_speed()
243 if (conf->speed != SPEED_1000 && in sparx5_port_verify_speed()
244 conf->speed != SPEED_100 && in sparx5_port_verify_speed()
245 conf->speed != SPEED_10 && in sparx5_port_verify_speed()
246 conf->speed != SPEED_2500) in sparx5_port_verify_speed()
247 return sparx5_port_error(port, conf, SPX5_PERR_SPEED); in sparx5_port_verify_speed()
252 if ((conf->speed != SPEED_5000 && in sparx5_port_verify_speed()
253 conf->speed != SPEED_10000 && in sparx5_port_verify_speed()
254 conf->speed != SPEED_25000)) in sparx5_port_verify_speed()
255 return sparx5_port_error(port, conf, SPX5_PERR_SPEED); in sparx5_port_verify_speed()
258 return sparx5_port_error(port, conf, SPX5_PERR_IFTYPE); in sparx5_port_verify_speed()
265 struct sparx5_port_config *conf) in sparx5_dev_change() argument
267 return sparx5_is_baser(port->conf.portmode) ^ in sparx5_dev_change()
268 sparx5_is_baser(conf->portmode); in sparx5_dev_change()
322 u32 spd = port->conf.speed; in sparx5_port_disable()
517 struct sparx5_port_config *conf) in sparx5_port_mux_set() argument
522 if (port->conf.portmode == conf->portmode) in sparx5_port_mux_set()
525 switch (conf->portmode) { in sparx5_port_mux_set()
636 struct sparx5_port_config *conf) in sparx5_port_fc_setup() argument
638 bool fc_obey = conf->pause & MLO_PAUSE_RX ? 1 : 0; in sparx5_port_fc_setup()
641 if (conf->pause & MLO_PAUSE_TX) in sparx5_port_fc_setup()
646 spx5_rmw(DSM_MAC_CFG_HDX_BACKPREASSURE_SET(conf->duplex == DUPLEX_HALF), in sparx5_port_fc_setup()
672 static u16 sparx5_get_aneg_word(struct sparx5_port_config *conf) in sparx5_get_aneg_word() argument
674 if (conf->portmode == PHY_INTERFACE_MODE_1000BASEX) /* cl-37 aneg */ in sparx5_get_aneg_word()
675 return (conf->pause_adv | ADVERTISE_LPACK | ADVERTISE_1000XFULL); in sparx5_get_aneg_word()
682 struct sparx5_port_config *conf) in sparx5_serdes_set() argument
684 int portmode, err, speed = conf->speed; in sparx5_serdes_set()
686 if (conf->portmode == PHY_INTERFACE_MODE_QSGMII && in sparx5_serdes_set()
690 if (sparx5_is_baser(conf->portmode)) { in sparx5_serdes_set()
691 if (conf->portmode == PHY_INTERFACE_MODE_25GBASER) in sparx5_serdes_set()
693 else if (conf->portmode == PHY_INTERFACE_MODE_10GBASER) in sparx5_serdes_set()
699 err = phy_set_media(port->serdes, conf->media); in sparx5_serdes_set()
707 if (conf->serdes_reset) { in sparx5_serdes_set()
716 portmode = conf->portmode; in sparx5_serdes_set()
717 if (sparx5_is_baser(conf->portmode)) in sparx5_serdes_set()
722 conf->serdes_reset = false; in sparx5_serdes_set()
728 struct sparx5_port_config *conf) in sparx5_port_pcs_low_set() argument
733 if (port->conf.inband) { in sparx5_port_pcs_low_set()
734 if (conf->portmode == PHY_INTERFACE_MODE_SGMII || in sparx5_port_pcs_low_set()
735 conf->portmode == PHY_INTERFACE_MODE_QSGMII) in sparx5_port_pcs_low_set()
737 else if (conf->portmode == PHY_INTERFACE_MODE_1000BASEX && in sparx5_port_pcs_low_set()
738 conf->autoneg) in sparx5_port_pcs_low_set()
741 err = sparx5_serdes_set(sparx5, port, conf); in sparx5_port_pcs_low_set()
760 u16 abil = sparx5_get_aneg_word(conf); in sparx5_port_pcs_low_set()
788 struct sparx5_port_config *conf) in sparx5_port_pcs_high_set() argument
790 u32 clk_spd = conf->portmode == PHY_INTERFACE_MODE_5GBASER ? 1 : 0; in sparx5_port_pcs_high_set()
802 err = sparx5_serdes_set(sparx5, port, conf); in sparx5_port_pcs_high_set()
805 if (conf->portmode == PHY_INTERFACE_MODE_25GBASER) { in sparx5_port_pcs_high_set()
868 struct sparx5_port_config *conf) in sparx5_port_config_low_set() argument
871 bool fdx = conf->duplex == DUPLEX_FULL; in sparx5_port_config_low_set()
872 int spd = conf->speed; in sparx5_port_config_low_set()
922 struct sparx5_port_config *conf) in sparx5_port_pcs_set() argument
925 bool high_speed_dev = sparx5_is_baser(conf->portmode); in sparx5_port_pcs_set()
928 if (sparx5_dev_change(sparx5, port, conf)) { in sparx5_port_pcs_set()
943 err = sparx5_port_pcs_high_set(sparx5, port, conf); in sparx5_port_pcs_set()
945 err = sparx5_port_pcs_low_set(sparx5, port, conf); in sparx5_port_pcs_set()
950 if (port->conf.inband) { in sparx5_port_pcs_set()
964 port->conf = *conf; in sparx5_port_pcs_set()
971 struct sparx5_port_config *conf) in sparx5_port_config() argument
973 bool high_speed_dev = sparx5_is_baser(conf->portmode); in sparx5_port_config()
976 err = sparx5_port_verify_speed(sparx5, port, conf); in sparx5_port_config()
982 sparx5_port_config_low_set(sparx5, port, conf); in sparx5_port_config()
985 err = sparx5_port_fc_setup(sparx5, port, conf); in sparx5_port_config()
990 stop_wm = sparx5_port_fifo_sz(sparx5, port->portno, conf->speed); in sparx5_port_config()
997 urgency = sparx5_port_fwd_urg(sparx5, conf->speed); in sparx5_port_config()
1006 port->conf = *conf; in sparx5_port_config()
1014 struct sparx5_port_config *conf) in sparx5_port_init() argument
1033 err = sparx5_port_mux_set(sparx5, port, conf); in sparx5_port_init()
1073 if (conf->portmode == PHY_INTERFACE_MODE_QSGMII || in sparx5_port_init()
1074 conf->portmode == PHY_INTERFACE_MODE_SGMII) { in sparx5_port_init()
1075 err = sparx5_serdes_set(sparx5, port, conf); in sparx5_port_init()
1088 if (conf->portmode == PHY_INTERFACE_MODE_QSGMII) { in sparx5_port_init()
1106 if (conf->portmode == PHY_INTERFACE_MODE_NA) in sparx5_port_init()
1107 conf->portmode = PHY_INTERFACE_MODE_10GBASER; in sparx5_port_init()
1109 if (sparx5_is_baser(conf->portmode)) in sparx5_port_init()