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)
230 const struct xpcs_compat *compat) in xpcs_soft_reset() argument
234 switch (compat->an_mode) { in xpcs_soft_reset()
412 const struct xpcs_compat *compat) in _xpcs_config_aneg_c73() argument
424 if (xpcs_linkmode_supported(compat, 2500baseX_Full)) in _xpcs_config_aneg_c73()
435 if (xpcs_linkmode_supported(compat, 1000baseKX_Full)) in _xpcs_config_aneg_c73()
437 if (xpcs_linkmode_supported(compat, 10000baseKX4_Full)) in _xpcs_config_aneg_c73()
439 if (xpcs_linkmode_supported(compat, 10000baseKR_Full)) in _xpcs_config_aneg_c73()
448 if (xpcs_linkmode_supported(compat, Pause)) in _xpcs_config_aneg_c73()
450 if (xpcs_linkmode_supported(compat, Asym_Pause)) in _xpcs_config_aneg_c73()
457 const struct xpcs_compat *compat) in xpcs_config_aneg_c73() argument
461 ret = _xpcs_config_aneg_c73(xpcs, compat); in xpcs_config_aneg_c73()
476 const struct xpcs_compat *compat) in xpcs_aneg_done_c73() argument
491 xpcs_config_aneg_c73(xpcs, compat); in xpcs_aneg_done_c73()
637 const struct xpcs_compat *compat; in xpcs_validate() local
642 compat = xpcs_find_compat(xpcs->id, state->interface); in xpcs_validate()
648 if (compat) in xpcs_validate()
649 for (i = 0; compat->supported[i] != __ETHTOOL_LINK_MODE_MASK_NBITS; i++) in xpcs_validate()
650 set_bit(compat->supported[i], xpcs_supported); in xpcs_validate()
662 const struct xpcs_compat *compat = &xpcs->id->compat[i]; in xpcs_get_interfaces() local
664 for (j = 0; j < compat->num_interfaces; j++) in xpcs_get_interfaces()
665 if (compat->interface[j] < PHY_INTERFACE_MODE_MAX) in xpcs_get_interfaces()
666 __set_bit(compat->interface[j], interfaces); in xpcs_get_interfaces()
800 const struct xpcs_compat *compat; in xpcs_do_config() local
803 compat = xpcs_find_compat(xpcs->id, interface); in xpcs_do_config()
804 if (!compat) in xpcs_do_config()
807 switch (compat->an_mode) { in xpcs_do_config()
810 ret = xpcs_config_aneg_c73(xpcs, compat); in xpcs_do_config()
829 if (compat->pma_config) { in xpcs_do_config()
830 ret = compat->pma_config(xpcs); in xpcs_do_config()
851 const struct xpcs_compat *compat) in xpcs_get_state_c73() argument
861 ret = xpcs_soft_reset(xpcs, compat); in xpcs_get_state_c73()
870 if (state->an_enabled && xpcs_aneg_done_c73(xpcs, state, compat)) { in xpcs_get_state_c73()
928 const struct xpcs_compat *compat; in xpcs_get_state() local
931 compat = xpcs_find_compat(xpcs->id, state->interface); in xpcs_get_state()
932 if (!compat) in xpcs_get_state()
935 switch (compat->an_mode) { in xpcs_get_state()
937 ret = xpcs_get_state_c73(xpcs, state, compat); in xpcs_get_state()
1102 .compat = synopsys_xpcs_compat,
1106 .compat = nxp_sja1105_xpcs_compat,
1110 .compat = nxp_sja1110_xpcs_compat,
1138 const struct xpcs_compat *compat; in xpcs_create() local
1145 compat = xpcs_find_compat(entry, interface); in xpcs_create()
1146 if (!compat) { in xpcs_create()
1154 ret = xpcs_soft_reset(xpcs, compat); in xpcs_create()