Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/efx_phy.c
Show First 20 Lines • Show All 554 Lines • ▼ Show 20 Lines | efx_phy_media_type_get( | ||||
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); | EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT); | ||||
if (epp->ep_module_type != EFX_PHY_MEDIA_INVALID) | if (epp->ep_module_type != EFX_PHY_MEDIA_INVALID) | ||||
*typep = epp->ep_module_type; | *typep = epp->ep_module_type; | ||||
else | else | ||||
*typep = epp->ep_fixed_port_type; | *typep = epp->ep_fixed_port_type; | ||||
} | } | ||||
__checkReturn efx_rc_t | |||||
efx_phy_module_get_info( | |||||
__in efx_nic_t *enp, | |||||
__in uint8_t dev_addr, | |||||
__in uint8_t offset, | |||||
__in uint8_t len, | |||||
__out_bcount(len) uint8_t *data) | |||||
{ | |||||
efx_rc_t rc; | |||||
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | |||||
EFSYS_ASSERT(data != NULL); | |||||
if ((uint32_t)offset + len > 0xff) { | |||||
rc = EINVAL; | |||||
goto fail1; | |||||
} | |||||
if ((rc = efx_mcdi_phy_module_get_info(enp, dev_addr, | |||||
offset, len, data)) != 0) | |||||
goto fail2; | |||||
return (0); | |||||
fail2: | |||||
EFSYS_PROBE(fail2); | |||||
fail1: | |||||
EFSYS_PROBE1(fail1, efx_rc_t, rc); | |||||
return (rc); | |||||
} | |||||
#if EFSYS_OPT_PHY_STATS | #if EFSYS_OPT_PHY_STATS | ||||
#if EFSYS_OPT_NAMES | #if EFSYS_OPT_NAMES | ||||
/* START MKCONFIG GENERATED PhyStatNamesBlock d5f79b4bc2c050fe */ | /* START MKCONFIG GENERATED PhyStatNamesBlock d5f79b4bc2c050fe */ | ||||
static const char *__efx_phy_stat_name[] = { | static const char *__efx_phy_stat_name[] = { | ||||
"oui", | "oui", | ||||
"pma_pmd_link_up", | "pma_pmd_link_up", | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |