Home
last modified time | relevance | path

Searched refs:link_modes (Results 1 – 25 of 89) sorted by relevance

1234

/linux/net/ethtool/
H A Dfec.c32 ethtool_fec_to_link_modes(u32 fec, unsigned long *link_modes, u8 *fec_auto) in ethtool_fec_to_link_modes() argument
38 __set_bit(ETHTOOL_LINK_MODE_FEC_NONE_BIT, link_modes); in ethtool_fec_to_link_modes()
40 __set_bit(ETHTOOL_LINK_MODE_FEC_RS_BIT, link_modes); in ethtool_fec_to_link_modes()
42 __set_bit(ETHTOOL_LINK_MODE_FEC_BASER_BIT, link_modes); in ethtool_fec_to_link_modes()
44 __set_bit(ETHTOOL_LINK_MODE_FEC_LLRS_BIT, link_modes); in ethtool_fec_to_link_modes()
49 unsigned long *link_modes, u8 fec_auto) in ethtool_link_modes_to_fecparam() argument
56 if (__test_and_clear_bit(ETHTOOL_LINK_MODE_FEC_NONE_BIT, link_modes)) in ethtool_link_modes_to_fecparam()
58 if (__test_and_clear_bit(ETHTOOL_LINK_MODE_FEC_RS_BIT, link_modes)) in ethtool_link_modes_to_fecparam()
60 if (__test_and_clear_bit(ETHTOOL_LINK_MODE_FEC_BASER_BIT, link_modes)) in ethtool_link_modes_to_fecparam()
62 if (__test_and_clear_bit(ETHTOOL_LINK_MODE_FEC_LLRS_BIT, link_modes)) in ethtool_link_modes_to_fecparam()
[all …]
H A Dlinkmodes.c52 bitmap_empty(data->ksettings.link_modes.lp_advertising, in linkmodes_prepare_data()
75 ret = ethnl_bitset_size(ksettings->link_modes.advertising, in linkmodes_reply_size()
76 ksettings->link_modes.supported, in linkmodes_reply_size()
83 ret = ethnl_bitset_size(ksettings->link_modes.lp_advertising, in linkmodes_reply_size()
114 ksettings->link_modes.advertising, in linkmodes_fill_reply()
115 ksettings->link_modes.supported, in linkmodes_fill_reply()
122 ksettings->link_modes.lp_advertising, in linkmodes_fill_reply()
176 unsigned long *advertising = ksettings->link_modes.advertising; in ethnl_auto_linkmodes()
177 unsigned long *supported = ksettings->link_modes.supported; in ethnl_auto_linkmodes()
281 ret = ethnl_update_bitset(ksettings->link_modes.advertising, in ethnl_update_linkmodes()
H A Dioctl.c350 dst->link_modes.supported[idx] &= in ethtool_intersect_link_masks()
351 src->link_modes.supported[idx]; in ethtool_intersect_link_masks()
352 dst->link_modes.advertising[idx] &= in ethtool_intersect_link_masks()
353 src->link_modes.advertising[idx]; in ethtool_intersect_link_masks()
395 link_ksettings->link_modes.supported); in convert_link_ksettings_to_legacy_settings()
398 link_ksettings->link_modes.advertising); in convert_link_ksettings_to_legacy_settings()
401 link_ksettings->link_modes.lp_advertising); in convert_link_ksettings_to_legacy_settings()
433 } link_modes; member
465 bitmap_from_arr32(to->link_modes.supported, in load_link_ksettings_from_user()
466 link_usettings.link_modes.supported, in load_link_ksettings_from_user()
[all …]
/linux/drivers/net/phy/
H A Dsfp-bus.c358 const unsigned long *link_modes) in sfp_select_interface() argument
360 if (phylink_test(link_modes, 25000baseCR_Full) || in sfp_select_interface()
361 phylink_test(link_modes, 25000baseKR_Full) || in sfp_select_interface()
362 phylink_test(link_modes, 25000baseSR_Full)) in sfp_select_interface()
365 if (phylink_test(link_modes, 10000baseCR_Full) || in sfp_select_interface()
366 phylink_test(link_modes, 10000baseSR_Full) || in sfp_select_interface()
367 phylink_test(link_modes, 10000baseLR_Full) || in sfp_select_interface()
368 phylink_test(link_modes, 10000baseLRM_Full) || in sfp_select_interface()
369 phylink_test(link_modes, 10000baseER_Full) || in sfp_select_interface()
370 phylink_test(link_modes, 10000baseT_Full)) in sfp_select_interface()
[all …]
/linux/tools/testing/selftests/drivers/net/hw/lib/py/
H A Dlinkconfig.py170 link_modes = self.get_ethtool_field("supported-link-modes")
172 if link_modes is None:
176 common_link_modes = set(link_modes) and set(partner_link_modes)
179 def get_speed_duplex_values(self, link_modes: list[str]) -> tuple[list[str], list[str]]:
183 for data in link_modes:
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_ethtool.c330 ecmd->link_modes.supported)) { in prestera_port_type_set()
359 static void prestera_modes_to_eth(unsigned long *eth_modes, u64 link_modes, in prestera_modes_to_eth() argument
365 if ((port_link_modes[mode].pr_mask & link_modes) == 0) in prestera_modes_to_eth()
384 u64 *link_modes, u8 *fec, u8 type) in prestera_modes_from_eth() argument
407 *link_modes = adver_modes; in prestera_modes_from_eth()
424 ecmd->link_modes.supported); in prestera_port_supp_types_get()
446 prestera_modes_to_eth(ecmd->link_modes.lp_advertising, in prestera_port_remote_cap_get()
449 if (!bitmap_empty(ecmd->link_modes.lp_advertising, in prestera_port_remote_cap_get()
539 prestera_modes_to_eth(ecmd->link_modes.supported, in prestera_ethtool_get_link_ksettings()
553 prestera_modes_to_eth(ecmd->link_modes.advertising, in prestera_ethtool_get_link_ksettings()
[all …]
/linux/drivers/net/ethernet/oki-semi/pch_gbe/
H A Dpch_gbe_ethtool.c83 ecmd->link_modes.supported); in pch_gbe_get_link_ksettings()
85 ecmd->link_modes.advertising); in pch_gbe_get_link_ksettings()
90 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.supported, in pch_gbe_get_link_ksettings()
92 ethtool_convert_legacy_u32_to_link_mode(ecmd->link_modes.advertising, in pch_gbe_get_link_ksettings()
138 &advertising, copy_ecmd.link_modes.advertising); in pch_gbe_set_link_ksettings()
/linux/drivers/net/ethernet/apm/xgene/
H A Dxgene_enet_ethtool.c136 cmd->link_modes.supported, in xgene_get_link_ksettings()
139 cmd->link_modes.advertising, in xgene_get_link_ksettings()
149 cmd->link_modes.supported, in xgene_get_link_ksettings()
152 cmd->link_modes.advertising, in xgene_get_link_ksettings()
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Den_ethtool.c955 link_ksettings->link_modes.supported);\
994 link_ksettings->link_modes.advertising); in get_fec_supported_advertised()
1108 unsigned long *supported = link_ksettings->link_modes.supported; in get_supported()
1118 unsigned long *advertising = link_ksettings->link_modes.advertising; in get_advertising()
1173 unsigned long *lp_advertising = link_ksettings->link_modes.lp_advertising; in get_lp_advertising()
1282 const unsigned long link_modes, u8 autoneg) in mlx5e_speed_validate() argument
1288 if ((link_modes & MLX5E_PROT_MASK(MLX5E_56GBASE_R4)) && in mlx5e_speed_validate()
1297 static u32 mlx5e_ethtool2ptys_adver_link(const unsigned long *link_modes) in mlx5e_ethtool2ptys_adver_link() argument
1306 link_modes, in mlx5e_ethtool2ptys_adver_link()
1314 static u32 mlx5e_ethtool2ptys_ext_adver_link(const unsigned long *link_modes) in mlx5e_ethtool2ptys_ext_adver_link() argument
[all …]
/linux/drivers/net/ethernet/atheros/alx/
H A Dethtool.c171 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in alx_get_link_ksettings()
173 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in alx_get_link_ksettings()
189 cmd->link_modes.advertising); in alx_set_link_ksettings()
/linux/drivers/net/ethernet/sfc/falcon/
H A Dmdio_10g.c242 cmd->link_modes.advertising); in ef4_mdio_set_link_ksettings()
244 prev.link_modes.advertising); in ef4_mdio_set_link_ksettings()
246 prev.link_modes.supported); in ef4_mdio_set_link_ksettings()
/linux/include/linux/
H A Dethtool.h219 } link_modes; member
229 bitmap_zero((ptr)->link_modes.name, __ETHTOOL_LINK_MODE_MASK_NBITS)
240 __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
251 __clear_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
263 test_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
/linux/drivers/net/ethernet/marvell/octeontx2/nic/
H A Dotx2_ethtool.c1107 linkmode_or(link_ksettings->link_modes.advertising, in otx2_get_fec_info()
1108 link_ksettings->link_modes.advertising, in otx2_get_fec_info()
1111 linkmode_or(link_ksettings->link_modes.supported, in otx2_get_fec_info()
1112 link_ksettings->link_modes.supported, in otx2_get_fec_info()
1173 linkmode_copy(link_ksettings->link_modes.advertising, in otx2_get_link_mode_info()
1176 linkmode_copy(link_ksettings->link_modes.supported, in otx2_get_link_mode_info()
1218 bit_pos = find_first_bit(cmd->link_modes.advertising, in otx2_get_advertised_mode()
1246 if (!linkmode_subset(cmd->link_modes.advertising, in otx2_set_link_ksettings()
1247 cur_ks.link_modes.supported)) in otx2_set_link_ksettings()
/linux/drivers/net/ethernet/broadcom/bnxt/
H A Dbnxt_ethtool.c2426 lk_ksettings->link_modes.supported); in bnxt_get_ethtool_modes()
2428 lk_ksettings->link_modes.supported); in bnxt_get_ethtool_modes()
2434 lk_ksettings->link_modes.supported); in bnxt_get_ethtool_modes()
2441 lk_ksettings->link_modes.advertising); in bnxt_get_ethtool_modes()
2444 lk_ksettings->link_modes.advertising); in bnxt_get_ethtool_modes()
2447 lk_ksettings->link_modes.lp_advertising); in bnxt_get_ethtool_modes()
2450 lk_ksettings->link_modes.lp_advertising); in bnxt_get_ethtool_modes()
2592 lk_ksettings->link_modes.supported); in bnxt_get_all_ethtool_support_speeds()
2594 lk_ksettings->link_modes.supported); in bnxt_get_all_ethtool_support_speeds()
2596 phy_flags, lk_ksettings->link_modes.supported); in bnxt_get_all_ethtool_support_speeds()
[all …]
/linux/drivers/net/ethernet/atheros/atl1e/
H A Datl1e_ethtool.c52 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in atl1e_get_link_ksettings()
54 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in atl1e_get_link_ksettings()
68 cmd->link_modes.advertising); in atl1e_set_link_ksettings()
/linux/drivers/net/ethernet/amd/xgbe/
H A Dxgbe-ethtool.c370 __ETHTOOL_LINK_MODE_MASK_NBITS, cmd->link_modes.advertising, in xgbe_set_link_ksettings()
371 __ETHTOOL_LINK_MODE_MASK_NBITS, lks->link_modes.supported); in xgbe_set_link_ksettings()
373 linkmode_and(advertising, cmd->link_modes.advertising, in xgbe_set_link_ksettings()
374 lks->link_modes.supported); in xgbe_set_link_ksettings()
387 linkmode_copy(lks->link_modes.advertising, advertising); in xgbe_set_link_ksettings()
/linux/drivers/net/
H A Dmii.c218 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in mii_ethtool_get_link_ksettings()
220 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in mii_ethtool_get_link_ksettings()
222 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.lp_advertising, in mii_ethtool_get_link_ksettings()
357 &advertising, cmd->link_modes.advertising); in mii_ethtool_set_link_ksettings()
/linux/drivers/net/ethernet/ibm/ehea/
H A Dehea_ethtool.c76 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in ehea_get_link_ksettings()
78 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in ehea_get_link_ksettings()
/linux/drivers/net/ethernet/mellanox/mlx4/
H A Den_ethtool.c686 static void ptys2ethtool_update_link_modes(unsigned long *link_modes, in ptys2ethtool_update_link_modes() argument
693 linkmode_or(link_modes, link_modes, in ptys2ethtool_update_link_modes()
698 static u32 ethtool2ptys_link_modes(const unsigned long *link_modes, in ethtool2ptys_link_modes() argument
707 if (linkmode_intersects(map_mode, link_modes)) in ethtool2ptys_link_modes()
760 ptys2ethtool_update_supported_port(link_ksettings->link_modes.supported, in ethtool_get_ptys_link_ksettings()
764 ptys2ethtool_update_link_modes(link_ksettings->link_modes.supported, in ethtool_get_ptys_link_ksettings()
768 ptys2ethtool_update_link_modes(link_ksettings->link_modes.advertising, in ethtool_get_ptys_link_ksettings()
800 link_ksettings->link_modes.lp_advertising, in ethtool_get_ptys_link_ksettings()
908 link_ksettings->link_modes.advertising, ADVERTISED); in mlx4_en_set_link_ksettings()
914 link_ksettings->link_modes.advertising, in mlx4_en_set_link_ksettings()
/linux/drivers/scsi/fcoe/
H A Dfcoe_transport.c128 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
134 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
141 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
146 if (ecmd.link_modes.supported[0] & ( in fcoe_link_speed_update()
/linux/drivers/net/ethernet/atheros/atl1c/
H A Datl1c_ethtool.c51 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in atl1c_get_link_ksettings()
53 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in atl1c_get_link_ksettings()
/linux/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_ethtool.c347 &supported, cmd->link_modes.supported); in stmmac_ethtool_get_link_ksettings()
349 &advertising, cmd->link_modes.advertising); in stmmac_ethtool_get_link_ksettings()
351 &lp_advertising, cmd->link_modes.lp_advertising); in stmmac_ethtool_get_link_ksettings()
394 cmd->link_modes.supported, supported); in stmmac_ethtool_get_link_ksettings()
396 cmd->link_modes.advertising, advertising); in stmmac_ethtool_get_link_ksettings()
398 cmd->link_modes.lp_advertising, lp_advertising); in stmmac_ethtool_get_link_ksettings()
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port_common.c555 cmd->link_modes.supported); in efx_siena_mcdi_phy_get_link_ksettings()
556 memcpy(cmd->link_modes.advertising, efx->link_advertising, in efx_siena_mcdi_phy_get_link_ksettings()
566 cmd->link_modes.lp_advertising); in efx_siena_mcdi_phy_get_link_ksettings()
578 caps = (ethtool_linkset_to_mcdi_cap(cmd->link_modes.advertising) | in efx_siena_mcdi_phy_set_link_ksettings()
609 efx_siena_link_set_advertising(efx, cmd->link_modes.advertising); in efx_siena_mcdi_phy_set_link_ksettings()
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_port_common.c553 cmd->link_modes.supported); in efx_mcdi_phy_get_link_ksettings()
554 memcpy(cmd->link_modes.advertising, efx->link_advertising, in efx_mcdi_phy_get_link_ksettings()
564 cmd->link_modes.lp_advertising); in efx_mcdi_phy_get_link_ksettings()
574 caps = (ethtool_linkset_to_mcdi_cap(cmd->link_modes.advertising) | in efx_mcdi_phy_set_link_ksettings()
605 efx_link_set_advertising(efx, cmd->link_modes.advertising); in efx_mcdi_phy_set_link_ksettings()
/linux/drivers/net/ethernet/fungible/funeth/
H A Dfuneth_ethtool.c228 ks->link_modes.lp_advertising); in fun_get_link_ksettings()
238 fun_link_modes_to_ethtool(fp->port_caps, ks->link_modes.supported); in fun_get_link_ksettings()
242 fun_link_modes_to_ethtool(fp->advertising, ks->link_modes.advertising); in fun_get_link_ksettings()
334 if (linkmode_empty(ks->link_modes.advertising)) in fun_set_link_ksettings()
338 if (!linkmode_subset(ks->link_modes.advertising, supported)) in fun_set_link_ksettings()

1234