Lines Matching refs:mode

325 	u32 type, mode;  in prestera_port_type_set()  local
342 for (mode = 0; mode < PRESTERA_LINK_MODE_MAX; mode++) { in prestera_port_type_set()
343 if ((port_link_modes[mode].pr_mask & in prestera_port_type_set()
345 type == port_link_modes[mode].port_type) { in prestera_port_type_set()
346 new_mode = mode; in prestera_port_type_set()
362 u32 mode; in prestera_modes_to_eth() local
364 for (mode = 0; mode < PRESTERA_LINK_MODE_MAX; mode++) { in prestera_modes_to_eth()
365 if ((port_link_modes[mode].pr_mask & link_modes) == 0) in prestera_modes_to_eth()
369 port_link_modes[mode].port_type != type) in prestera_modes_to_eth()
372 __set_bit(port_link_modes[mode].eth_mode, eth_modes); in prestera_modes_to_eth()
375 for (mode = 0; mode < PRESTERA_PORT_FEC_MAX; mode++) { in prestera_modes_to_eth()
376 if ((port_fec_caps[mode].pr_fec & fec) == 0) in prestera_modes_to_eth()
379 __set_bit(port_fec_caps[mode].eth_mode, eth_modes); in prestera_modes_to_eth()
388 u32 mode; in prestera_modes_from_eth() local
390 for (mode = 0; mode < PRESTERA_LINK_MODE_MAX; mode++) { in prestera_modes_from_eth()
391 if (!test_bit(port_link_modes[mode].eth_mode, eth_modes)) in prestera_modes_from_eth()
394 if (port_link_modes[mode].port_type != type) in prestera_modes_from_eth()
397 adver_modes |= port_link_modes[mode].pr_mask; in prestera_modes_from_eth()
400 for (mode = 0; mode < PRESTERA_PORT_FEC_MAX; mode++) { in prestera_modes_from_eth()
401 if (!test_bit(port_fec_caps[mode].eth_mode, eth_modes)) in prestera_modes_from_eth()
404 fec_modes |= port_fec_caps[mode].pr_fec; in prestera_modes_from_eth()
414 u32 mode; in prestera_port_supp_types_get() local
417 for (mode = 0; mode < PRESTERA_LINK_MODE_MAX; mode++) { in prestera_port_supp_types_get()
418 if ((port_link_modes[mode].pr_mask & in prestera_port_supp_types_get()
422 ptype = port_link_modes[mode].port_type; in prestera_port_supp_types_get()
576 port->cfg_phy.mode, in prestera_port_mdix_set()
588 u32 mode; in prestera_port_link_mode_set() local
591 for (mode = 0; mode < PRESTERA_LINK_MODE_MAX; mode++) { in prestera_port_link_mode_set()
593 speed != port_link_modes[mode].speed) in prestera_port_link_mode_set()
597 duplex != port_link_modes[mode].duplex) in prestera_port_link_mode_set()
600 if (!(port_link_modes[mode].pr_mask & in prestera_port_link_mode_set()
604 if (type != port_link_modes[mode].port_type) in prestera_port_link_mode_set()
607 new_mode = mode; in prestera_port_link_mode_set()
622 port->cfg_phy.mode = new_mode; in prestera_port_link_mode_set()
677 u32 mode; in prestera_ethtool_get_fecparam() local
686 for (mode = 0; mode < PRESTERA_PORT_FEC_MAX; mode++) { in prestera_ethtool_get_fecparam()
687 if ((port_fec_caps[mode].pr_fec & port->caps.supp_fec) == 0) in prestera_ethtool_get_fecparam()
690 fecparam->fec |= port_fec_caps[mode].eth_fec; in prestera_ethtool_get_fecparam()
706 u32 mode; in prestera_ethtool_set_fecparam() local
720 for (mode = 0; mode < PRESTERA_PORT_FEC_MAX; mode++) { in prestera_ethtool_set_fecparam()
721 if ((port_fec_caps[mode].eth_fec & fecparam->fec) && in prestera_ethtool_set_fecparam()
722 (port_fec_caps[mode].pr_fec & port->caps.supp_fec)) { in prestera_ethtool_set_fecparam()
723 fec = mode; in prestera_ethtool_set_fecparam()
793 smac->mode = evt->data.mac.mode; in prestera_ethtool_port_state_changed()
799 smac->mode = PRESTERA_MAC_MODE_MAX; in prestera_ethtool_port_state_changed()