Lines Matching +full:half +full:- +full:duplex

1 // SPDX-License-Identifier: GPL-2.0-only
13 [NETIF_F_SG_BIT] = "tx-scatter-gather",
14 [NETIF_F_IP_CSUM_BIT] = "tx-checksum-ipv4",
15 [NETIF_F_HW_CSUM_BIT] = "tx-checksum-ip-generic",
16 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
18 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
19 [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-hw-insert",
21 [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-hw-parse",
22 [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-filter",
23 [NETIF_F_HW_VLAN_STAG_TX_BIT] = "tx-vlan-stag-hw-insert",
24 [NETIF_F_HW_VLAN_STAG_RX_BIT] = "rx-vlan-stag-hw-parse",
25 [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter",
26 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
27 [NETIF_F_GSO_BIT] = "tx-generic-segmentation",
28 [NETIF_F_GRO_BIT] = "rx-gro",
29 [NETIF_F_GRO_HW_BIT] = "rx-gro-hw",
30 [NETIF_F_LRO_BIT] = "rx-lro",
32 [NETIF_F_TSO_BIT] = "tx-tcp-segmentation",
33 [NETIF_F_GSO_ROBUST_BIT] = "tx-gso-robust",
34 [NETIF_F_TSO_ECN_BIT] = "tx-tcp-ecn-segmentation",
35 [NETIF_F_TSO_MANGLEID_BIT] = "tx-tcp-mangleid-segmentation",
36 [NETIF_F_TSO6_BIT] = "tx-tcp6-segmentation",
37 [NETIF_F_FSO_BIT] = "tx-fcoe-segmentation",
38 [NETIF_F_GSO_GRE_BIT] = "tx-gre-segmentation",
39 [NETIF_F_GSO_GRE_CSUM_BIT] = "tx-gre-csum-segmentation",
40 [NETIF_F_GSO_IPXIP4_BIT] = "tx-ipxip4-segmentation",
41 [NETIF_F_GSO_IPXIP6_BIT] = "tx-ipxip6-segmentation",
42 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation",
43 [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation",
44 [NETIF_F_GSO_PARTIAL_BIT] = "tx-gso-partial",
45 [NETIF_F_GSO_TUNNEL_REMCSUM_BIT] = "tx-tunnel-remcsum-segmentation",
46 [NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation",
47 [NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation",
48 [NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation",
49 [NETIF_F_GSO_FRAGLIST_BIT] = "tx-gso-list",
51 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
52 [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
53 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter",
54 [NETIF_F_RXHASH_BIT] = "rx-hashing",
55 [NETIF_F_RXCSUM_BIT] = "rx-checksum",
56 [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy",
58 [NETIF_F_RXFCS_BIT] = "rx-fcs",
59 [NETIF_F_RXALL_BIT] = "rx-all",
60 [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload",
61 [NETIF_F_HW_TC_BIT] = "hw-tc-offload",
62 [NETIF_F_HW_ESP_BIT] = "esp-hw-offload",
63 [NETIF_F_HW_ESP_TX_CSUM_BIT] = "esp-tx-csum-hw-offload",
64 [NETIF_F_RX_UDP_TUNNEL_PORT_BIT] = "rx-udp_tunnel-port-offload",
65 [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record",
66 [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload",
67 [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload",
68 [NETIF_F_GRO_FRAGLIST_BIT] = "rx-gro-list",
69 [NETIF_F_HW_MACSEC_BIT] = "macsec-hw-offload",
70 [NETIF_F_GRO_UDP_FWD_BIT] = "rx-udp-gro-forwarding",
71 [NETIF_F_HW_HSR_TAG_INS_BIT] = "hsr-tag-ins-offload",
72 [NETIF_F_HW_HSR_TAG_RM_BIT] = "hsr-tag-rm-offload",
73 [NETIF_F_HW_HSR_FWD_BIT] = "hsr-fwd-offload",
74 [NETIF_F_HW_HSR_DUP_BIT] = "hsr-dup-offload",
87 [ETHTOOL_RX_COPYBREAK] = "rx-copybreak",
88 [ETHTOOL_TX_COPYBREAK] = "tx-copybreak",
89 [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout",
90 [ETHTOOL_TX_COPYBREAK_BUF_SIZE] = "tx-copybreak-buf-size",
96 [ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift",
97 [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down",
98 [ETHTOOL_PHY_EDPD] = "phy-energy-detect-power-down",
101 #define __LINK_MODE_NAME(speed, type, duplex) \ argument
102 #speed "base" #type "/" #duplex
103 #define __DEFINE_LINK_MODE_NAME(speed, type, duplex) \ argument
104 [ETHTOOL_LINK_MODE(speed, type, duplex)] = \
105 __LINK_MODE_NAME(speed, type, duplex)
110 __DEFINE_LINK_MODE_NAME(10, T, Half),
112 __DEFINE_LINK_MODE_NAME(100, T, Half),
114 __DEFINE_LINK_MODE_NAME(1000, T, Half),
200 __DEFINE_LINK_MODE_NAME(100, FX, Half),
210 __DEFINE_LINK_MODE_NAME(10, T1S, Half),
211 __DEFINE_LINK_MODE_NAME(10, T1S_P2MP, Half),
259 .duplex = __DUPLEX_ ## _duplex \
267 .duplex = DUPLEX_UNKNOWN, \
271 __DEFINE_LINK_MODE_PARAMS(10, T, Half),
273 __DEFINE_LINK_MODE_PARAMS(100, T, Half),
275 __DEFINE_LINK_MODE_PARAMS(1000, T, Half),
294 .duplex = DUPLEX_FULL,
365 __DEFINE_LINK_MODE_PARAMS(100, FX, Half),
375 __DEFINE_LINK_MODE_PARAMS(10, T1S, Half),
376 __DEFINE_LINK_MODE_PARAMS(10, T1S_P2MP, Half),
413 [const_ilog2(SOF_TIMESTAMPING_TX_HARDWARE)] = "hardware-transmit",
414 [const_ilog2(SOF_TIMESTAMPING_TX_SOFTWARE)] = "software-transmit",
415 [const_ilog2(SOF_TIMESTAMPING_RX_HARDWARE)] = "hardware-receive",
416 [const_ilog2(SOF_TIMESTAMPING_RX_SOFTWARE)] = "software-receive",
417 [const_ilog2(SOF_TIMESTAMPING_SOFTWARE)] = "software-system-clock",
418 [const_ilog2(SOF_TIMESTAMPING_SYS_HARDWARE)] = "hardware-legacy-clock",
419 [const_ilog2(SOF_TIMESTAMPING_RAW_HARDWARE)] = "hardware-raw-clock",
420 [const_ilog2(SOF_TIMESTAMPING_OPT_ID)] = "option-id",
421 [const_ilog2(SOF_TIMESTAMPING_TX_SCHED)] = "sched-transmit",
422 [const_ilog2(SOF_TIMESTAMPING_TX_ACK)] = "ack-transmit",
423 [const_ilog2(SOF_TIMESTAMPING_OPT_CMSG)] = "option-cmsg",
424 [const_ilog2(SOF_TIMESTAMPING_OPT_TSONLY)] = "option-tsonly",
425 [const_ilog2(SOF_TIMESTAMPING_OPT_STATS)] = "option-stats",
426 [const_ilog2(SOF_TIMESTAMPING_OPT_PKTINFO)] = "option-pktinfo",
427 [const_ilog2(SOF_TIMESTAMPING_OPT_TX_SWHW)] = "option-tx-swhw",
428 [const_ilog2(SOF_TIMESTAMPING_BIND_PHC)] = "bind-phc",
429 [const_ilog2(SOF_TIMESTAMPING_OPT_ID_TCP)] = "option-id-tcp",
430 [const_ilog2(SOF_TIMESTAMPING_OPT_RX_FILTER)] = "option-rx-filter",
437 [HWTSTAMP_TX_ONESTEP_SYNC] = "onestep-sync",
438 [HWTSTAMP_TX_ONESTEP_P2P] = "onestep-p2p",
446 [HWTSTAMP_FILTER_PTP_V1_L4_EVENT] = "ptpv1-l4-event",
447 [HWTSTAMP_FILTER_PTP_V1_L4_SYNC] = "ptpv1-l4-sync",
448 [HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ] = "ptpv1-l4-delay-req",
449 [HWTSTAMP_FILTER_PTP_V2_L4_EVENT] = "ptpv2-l4-event",
450 [HWTSTAMP_FILTER_PTP_V2_L4_SYNC] = "ptpv2-l4-sync",
451 [HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ] = "ptpv2-l4-delay-req",
452 [HWTSTAMP_FILTER_PTP_V2_L2_EVENT] = "ptpv2-l2-event",
453 [HWTSTAMP_FILTER_PTP_V2_L2_SYNC] = "ptpv2-l2-sync",
454 [HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ] = "ptpv2-l2-delay-req",
455 [HWTSTAMP_FILTER_PTP_V2_EVENT] = "ptpv2-event",
456 [HWTSTAMP_FILTER_PTP_V2_SYNC] = "ptpv2-sync",
457 [HWTSTAMP_FILTER_PTP_V2_DELAY_REQ] = "ptpv2-delay-req",
458 [HWTSTAMP_FILTER_NTP_ALL] = "ntp-all",
465 [ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE] = "vxlan-gpe",
470 /* return false if legacy contained non-0 deprecated fields
486 if (legacy_settings->maxtxpkt || in convert_legacy_settings_to_link_ksettings()
487 legacy_settings->maxrxpkt) in convert_legacy_settings_to_link_ksettings()
491 link_ksettings->link_modes.supported, in convert_legacy_settings_to_link_ksettings()
492 legacy_settings->supported); in convert_legacy_settings_to_link_ksettings()
494 link_ksettings->link_modes.advertising, in convert_legacy_settings_to_link_ksettings()
495 legacy_settings->advertising); in convert_legacy_settings_to_link_ksettings()
497 link_ksettings->link_modes.lp_advertising, in convert_legacy_settings_to_link_ksettings()
498 legacy_settings->lp_advertising); in convert_legacy_settings_to_link_ksettings()
499 link_ksettings->base.speed in convert_legacy_settings_to_link_ksettings()
501 link_ksettings->base.duplex in convert_legacy_settings_to_link_ksettings()
502 = legacy_settings->duplex; in convert_legacy_settings_to_link_ksettings()
503 link_ksettings->base.port in convert_legacy_settings_to_link_ksettings()
504 = legacy_settings->port; in convert_legacy_settings_to_link_ksettings()
505 link_ksettings->base.phy_address in convert_legacy_settings_to_link_ksettings()
506 = legacy_settings->phy_address; in convert_legacy_settings_to_link_ksettings()
507 link_ksettings->base.autoneg in convert_legacy_settings_to_link_ksettings()
508 = legacy_settings->autoneg; in convert_legacy_settings_to_link_ksettings()
509 link_ksettings->base.mdio_support in convert_legacy_settings_to_link_ksettings()
510 = legacy_settings->mdio_support; in convert_legacy_settings_to_link_ksettings()
511 link_ksettings->base.eth_tp_mdix in convert_legacy_settings_to_link_ksettings()
512 = legacy_settings->eth_tp_mdix; in convert_legacy_settings_to_link_ksettings()
513 link_ksettings->base.eth_tp_mdix_ctrl in convert_legacy_settings_to_link_ksettings()
514 = legacy_settings->eth_tp_mdix_ctrl; in convert_legacy_settings_to_link_ksettings()
520 if (!dev->ethtool_ops->get_link) in __ethtool_get_link()
521 return -EOPNOTSUPP; in __ethtool_get_link()
523 return netif_running(dev) && dev->ethtool_ops->get_link(dev); in __ethtool_get_link()
528 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_rxnfc_rule_count()
534 err = ops->get_rxnfc(dev, &info, NULL); in ethtool_get_rxnfc_rule_count()
543 const struct ethtool_ops *ops = dev->ethtool_ops; in ethtool_get_max_rxnfc_channel()
548 if (!ops->get_rxnfc) in ethtool_get_max_rxnfc_channel()
549 return -EOPNOTSUPP; in ethtool_get_max_rxnfc_channel()
553 return -EINVAL; in ethtool_get_max_rxnfc_channel()
557 return -ENOMEM; in ethtool_get_max_rxnfc_channel()
559 info->cmd = ETHTOOL_GRXCLSRLALL; in ethtool_get_max_rxnfc_channel()
560 info->rule_cnt = rule_cnt; in ethtool_get_max_rxnfc_channel()
561 err = ops->get_rxnfc(dev, info, info->rule_locs); in ethtool_get_max_rxnfc_channel()
568 .fs.location = info->rule_locs[i], in ethtool_get_max_rxnfc_channel()
571 err = ops->get_rxnfc(dev, &rule_info, NULL); in ethtool_get_max_rxnfc_channel()
598 mutex_lock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
599 xa_for_each(&dev->ethtool->rss_ctx, context, ctx) { in ethtool_get_max_rss_ctx_channel()
603 for (i = 0; i < ctx->indir_size; i++) in ethtool_get_max_rss_ctx_channel()
606 mutex_unlock(&dev->ethtool->rss_lock); in ethtool_get_max_rss_ctx_channel()
619 * Assume drivers won't auto-regenerate the additional tables, in ethtool_get_max_rxfh_channel()
627 if (!dev->ethtool_ops->get_rxfh_indir_size || in ethtool_get_max_rxfh_channel()
628 !dev->ethtool_ops->get_rxfh) in ethtool_get_max_rxfh_channel()
630 dev_size = dev->ethtool_ops->get_rxfh_indir_size(dev); in ethtool_get_max_rxfh_channel()
638 ret = dev->ethtool_ops->get_rxfh(dev, &rxfh); in ethtool_get_max_rxfh_channel()
644 while (dev_size--) in ethtool_get_max_rxfh_channel()
669 return -EINVAL; in ethtool_check_max_channel()
674 return -EINVAL; in ethtool_check_max_channel()
681 return -EINVAL; in ethtool_check_max_channel()
689 if (WARN_ON(ops->set_coalesce && !ops->supported_coalesce_params)) in ethtool_check_ops()
690 return -EINVAL; in ethtool_check_ops()
691 if (WARN_ON(ops->rxfh_max_num_contexts == 1)) in ethtool_check_ops()
692 return -EINVAL; in ethtool_check_ops()
702 const struct ethtool_ops *ops = dev->ethtool_ops; in __ethtool_get_ts_info()
703 struct phy_device *phydev = dev->phydev; in __ethtool_get_ts_info()
707 info->cmd = ETHTOOL_GET_TS_INFO; in __ethtool_get_ts_info()
708 info->phc_index = -1; in __ethtool_get_ts_info()
712 else if (ops->get_ts_info) in __ethtool_get_ts_info()
713 err = ops->get_ts_info(dev, info); in __ethtool_get_ts_info()
715 info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE | in __ethtool_get_ts_info()
758 link_ksettings->base.speed = link_info->speed; in ethtool_params_from_link_mode()
759 link_ksettings->lanes = link_info->lanes; in ethtool_params_from_link_mode()
760 link_ksettings->base.duplex = link_info->duplex; in ethtool_params_from_link_mode()
778 linkmode_set_bit_array(map->cap_arr, map->arr_size, map->caps); in ethtool_forced_speed_maps_init()
779 map->cap_arr = NULL; in ethtool_forced_speed_maps_init()
780 map->arr_size = 0; in ethtool_forced_speed_maps_init()
790 !lockdep_is_held_type(&dev->ethtool->rss_lock, -1), in ethtool_rxfh_context_lost()
794 ctx = xa_erase(&dev->ethtool->rss_ctx, context_id); in ethtool_rxfh_context_lost()