Lines Matching refs:compat
130 const struct xpcs_compat *compat; member
139 const struct xpcs_compat *compat = &id->compat[i]; in xpcs_find_compat() local
141 for (j = 0; j < compat->num_interfaces; j++) in xpcs_find_compat()
142 if (compat->interface[j] == interface) in xpcs_find_compat()
143 return compat; in xpcs_find_compat()
151 const struct xpcs_compat *compat; in xpcs_get_an_mode() local
153 compat = xpcs_find_compat(xpcs->id, interface); in xpcs_get_an_mode()
154 if (!compat) in xpcs_get_an_mode()
157 return compat->an_mode; in xpcs_get_an_mode()
161 static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat, in __xpcs_linkmode_supported() argument
166 for (i = 0; compat->supported[i] != __ETHTOOL_LINK_MODE_MASK_NBITS; i++) in __xpcs_linkmode_supported()
167 if (compat->supported[i] == linkmode) in __xpcs_linkmode_supported()
173 #define xpcs_linkmode_supported(compat, mode) \ argument
174 __xpcs_linkmode_supported(compat, ETHTOOL_LINK_MODE_ ## mode ## _BIT)
232 const struct xpcs_compat *compat) in xpcs_soft_reset() argument
236 switch (compat->an_mode) { in xpcs_soft_reset()
414 const struct xpcs_compat *compat) in _xpcs_config_aneg_c73() argument
426 if (xpcs_linkmode_supported(compat, 2500baseX_Full)) in _xpcs_config_aneg_c73()
437 if (xpcs_linkmode_supported(compat, 1000baseKX_Full)) in _xpcs_config_aneg_c73()
439 if (xpcs_linkmode_supported(compat, 10000baseKX4_Full)) in _xpcs_config_aneg_c73()
441 if (xpcs_linkmode_supported(compat, 10000baseKR_Full)) in _xpcs_config_aneg_c73()
450 if (xpcs_linkmode_supported(compat, Pause)) in _xpcs_config_aneg_c73()
452 if (xpcs_linkmode_supported(compat, Asym_Pause)) in _xpcs_config_aneg_c73()
459 const struct xpcs_compat *compat) in xpcs_config_aneg_c73() argument
463 ret = _xpcs_config_aneg_c73(xpcs, compat); in xpcs_config_aneg_c73()
478 const struct xpcs_compat *compat) in xpcs_aneg_done_c73() argument
493 xpcs_config_aneg_c73(xpcs, compat); in xpcs_aneg_done_c73()
639 const struct xpcs_compat *compat; in xpcs_validate() local
651 compat = xpcs_find_compat(xpcs->id, state->interface); in xpcs_validate()
656 if (compat) in xpcs_validate()
657 for (i = 0; compat->supported[i] != __ETHTOOL_LINK_MODE_MASK_NBITS; i++) in xpcs_validate()
658 set_bit(compat->supported[i], xpcs_supported); in xpcs_validate()
794 const struct xpcs_compat *compat; in xpcs_do_config() local
797 compat = xpcs_find_compat(xpcs->id, interface); in xpcs_do_config()
798 if (!compat) in xpcs_do_config()
801 switch (compat->an_mode) { in xpcs_do_config()
804 ret = xpcs_config_aneg_c73(xpcs, compat); in xpcs_do_config()
823 if (compat->pma_config) { in xpcs_do_config()
824 ret = compat->pma_config(xpcs); in xpcs_do_config()
845 const struct xpcs_compat *compat) in xpcs_get_state_c73() argument
855 ret = xpcs_soft_reset(xpcs, compat); in xpcs_get_state_c73()
864 if (state->an_enabled && xpcs_aneg_done_c73(xpcs, state, compat)) { in xpcs_get_state_c73()
922 const struct xpcs_compat *compat; in xpcs_get_state() local
925 compat = xpcs_find_compat(xpcs->id, state->interface); in xpcs_get_state()
926 if (!compat) in xpcs_get_state()
929 switch (compat->an_mode) { in xpcs_get_state()
931 ret = xpcs_get_state_c73(xpcs, state, compat); in xpcs_get_state()
1096 .compat = synopsys_xpcs_compat,
1100 .compat = nxp_sja1105_xpcs_compat,
1104 .compat = nxp_sja1110_xpcs_compat,
1131 const struct xpcs_compat *compat; in xpcs_create() local
1138 compat = xpcs_find_compat(entry, interface); in xpcs_create()
1139 if (!compat) { in xpcs_create()
1147 ret = xpcs_soft_reset(xpcs, compat); in xpcs_create()