Lines Matching defs:mdev

48 	struct mlx5_core_dev *mdev = priv->mdev;
53 "%d.%d.%04d (%.16s)", fw_rev_maj(mdev),
54 fw_rev_min(mdev), fw_rev_sub(mdev), mdev->board_id);
57 "%d.%d.%04d", fw_rev_maj(mdev),
58 fw_rev_min(mdev), fw_rev_sub(mdev));
60 strscpy(drvinfo->bus_info, dev_name(mdev->device),
234 static void mlx5e_ethtool_get_speed_arr(struct mlx5_core_dev *mdev,
238 bool ext = mlx5_ptys_ext_supported(mdev);
330 u8 max_log_mpwrq_pkts = mlx5e_mpwrq_max_log_rq_pkts(priv->mdev,
402 err = mlx5e_validate_params(priv->mdev, &new_params);
479 int cur_rqt_size = mlx5e_rqt_size(priv->mdev, cur_params->num_channels);
480 int new_rqt_size = mlx5e_rqt_size(priv->mdev, count);
564 if (!MLX5_CAP_GEN(priv->mdev, cq_moderation))
599 if (!MLX5_CAP_GEN(priv->mdev, cq_moderation))
665 struct mlx5_core_dev *mdev = c->mdev;
672 mlx5e_modify_cq_moderation(mdev, &c->sq[tc].cq.mcq,
686 struct mlx5_core_dev *mdev = c->mdev;
692 mlx5e_modify_cq_moderation(mdev, &c->rq.cq.mcq, moder->usec, moder->pkts,
703 struct mlx5_core_dev *mdev = priv->mdev;
710 if (!MLX5_CAP_GEN(mdev, cq_moderation) ||
711 !MLX5_CAP_GEN(mdev, cq_period_mode_modify))
729 !MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe)) {
815 struct mlx5_core_dev *mdev = priv->mdev;
822 if (!MLX5_CAP_GEN(mdev, cq_moderation))
866 mlx5_core_modify_cq_moderation(mdev, &c->rq.cq.mcq,
876 mlx5_core_modify_cq_moderation(mdev, &c->sq[tc].cq.mcq,
894 static void ptys2ethtool_supported_link(struct mlx5_core_dev *mdev,
903 mlx5e_ethtool_get_speed_arr(mdev, &table, &max_size);
999 static void ptys2ethtool_supported_advertised_port(struct mlx5_core_dev *mdev,
1003 if (!MLX5_CAP_PCAM_FEATURE(mdev, ptys_connector_type)) {
1089 speed = mlx5_port_ptys2speed(priv->mdev, eth_proto_oper, force_legacy);
1105 static void get_supported(struct mlx5_core_dev *mdev, u32 eth_proto_cap,
1109 ptys2ethtool_supported_link(mdev, supported, eth_proto_cap);
1139 static u8 get_connector_port(struct mlx5_core_dev *mdev, u32 eth_proto, u8 connector_type)
1141 if (MLX5_CAP_PCAM_FEATURE(mdev, ptys_connector_type))
1170 static void get_lp_advertising(struct mlx5_core_dev *mdev, u32 eth_proto_lp,
1174 bool ext = mlx5_ptys_ext_supported(mdev);
1182 struct mlx5_core_dev *mdev = priv->mdev;
1198 err = mlx5_query_port_ptys(mdev, out, sizeof(out), MLX5_PTYS_EN, 1);
1230 mlx5_query_port_pause(mdev, &rx_pause, &tx_pause);
1235 get_supported(mdev, eth_proto_cap, link_ksettings);
1244 link_ksettings->base.port = get_connector_port(mdev, eth_proto_oper, connector_type);
1245 ptys2ethtool_supported_advertised_port(mdev, link_ksettings, eth_proto_admin,
1247 get_lp_advertising(mdev, eth_proto_lp, link_ksettings);
1258 err = get_fec_supported_advertised(mdev, link_ksettings);
1353 struct mlx5_core_dev *mdev = priv->mdev;
1374 ext_supported = mlx5_ptys_ext_supported(mdev);
1381 err = mlx5_port_query_eth_proto(mdev, 1, ext, &eproto);
1388 mlx5_port_speed2linkmodes(mdev, speed, !ext);
1402 mlx5_port_query_eth_autoneg(mdev, &an_status, &an_disable_cap,
1412 mlx5_port_set_eth_ptys(mdev, an_disable, link_modes, ext);
1413 mlx5_toggle_port_link(mdev);
1441 return mlx5e_rqt_size(priv->mdev, priv->channels.params.num_channels);
1520 struct mlx5_core_dev *mdev = priv->mdev;
1522 if (!MLX5_CAP_PCAM_FEATURE((priv)->mdev, pfcc_mask) ||
1523 !MLX5_CAP_DEBUG((priv)->mdev, stall_detect))
1526 return mlx5_query_port_stall_watermark(mdev, pfc_prevention_tout, NULL);
1533 struct mlx5_core_dev *mdev = priv->mdev;
1537 if (!MLX5_CAP_PCAM_FEATURE((priv)->mdev, pfcc_mask) ||
1538 !MLX5_CAP_DEBUG((priv)->mdev, stall_detect))
1555 return mlx5_set_port_stall_watermark(mdev, critical_tout,
1610 struct mlx5_core_dev *mdev = priv->mdev;
1613 err = mlx5_query_port_pause(mdev, &pauseparam->rx_pause,
1632 struct mlx5_core_dev *mdev = priv->mdev;
1635 if (!MLX5_CAP_GEN(mdev, vport_group_manager))
1641 err = mlx5_set_port_pause(mdev,
1663 struct mlx5_core_dev *mdev = priv->mdev;
1665 info->phc_index = mlx5_clock_get_ptp_index(mdev);
1667 if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz) ||
1692 static __u32 mlx5e_get_wol_supported(struct mlx5_core_dev *mdev)
1696 if (MLX5_CAP_GEN(mdev, wol_g))
1699 if (MLX5_CAP_GEN(mdev, wol_s))
1702 if (MLX5_CAP_GEN(mdev, wol_a))
1705 if (MLX5_CAP_GEN(mdev, wol_b))
1708 if (MLX5_CAP_GEN(mdev, wol_m))
1711 if (MLX5_CAP_GEN(mdev, wol_u))
1714 if (MLX5_CAP_GEN(mdev, wol_p))
1780 struct mlx5_core_dev *mdev = priv->mdev;
1786 wol->supported = mlx5e_get_wol_supported(mdev);
1790 err = mlx5_query_port_wol(mdev, &mlx5_wol_mode);
1800 struct mlx5_core_dev *mdev = priv->mdev;
1801 __u32 wol_supported = mlx5e_get_wol_supported(mdev);
1812 return mlx5_set_port_wol(mdev, mlx5_wol_mode);
1827 struct mlx5_core_dev *mdev = priv->mdev;
1832 err = mlx5e_get_fec_mode(mdev, &fec_active, &fec_configured);
1853 struct mlx5_core_dev *mdev = priv->mdev;
1870 err = mlx5e_set_fec_mode(mdev, fec_policy);
1875 mlx5_toggle_port_link(mdev);
1884 struct mlx5_core_dev *mdev = priv->mdev;
1887 if (!MLX5_CAP_GEN(mdev, beacon_led))
1901 return mlx5_set_port_beacon(mdev, beacon_duration);
1908 struct mlx5_core_dev *dev = priv->mdev;
1951 struct mlx5_core_dev *mdev = priv->mdev;
1962 size_read = mlx5_query_module_eeprom(mdev, offset, ee->len - i,
1988 struct mlx5_core_dev *mdev = priv->mdev;
2004 size_read = mlx5_query_module_eeprom_by_page(mdev, &query, data + i);
2028 struct mlx5_core_dev *mdev = priv->mdev;
2043 err = mlx5_firmware_flash(mdev, fw, NULL);
2066 if (enable && !MLX5_CAP_GEN(priv->mdev, cq_period_start_from_cqe))
2113 if (!MLX5_CAP_GEN(priv->mdev, cqe_compression))
2154 struct mlx5_core_dev *mdev = priv->mdev;
2158 if (!MLX5_CAP_GEN(mdev, cqe_compression))
2174 struct mlx5_core_dev *mdev = priv->mdev;
2183 int err = mlx5e_mpwrq_validate_regular(mdev, &priv->channels.params);
2195 mlx5e_set_rq_type(mdev, &new_params);
2232 struct mlx5_core_dev *mdev = priv->mdev;
2235 if (enable && !mlx5e_tx_mpwqe_supported(mdev))
2258 struct mlx5_core_dev *mdev = priv->mdev;
2262 if (!MLX5_CAP_GEN(mdev, ts_cqe_to_dest_cqn) ||
2263 !MLX5_CAP_GEN_2(mdev, ts_cqe_metadata_size2wqe_counter))
2390 static int query_port_status_opcode(struct mlx5_core_dev *mdev, u32 *status_opcode)
2404 err = mlx5_core_access_reg(mdev, in, sizeof(in), out,
2544 if (query_port_status_opcode(priv->mdev, &status_opcode) ||