Lines Matching refs:mdev

111 	struct mlx5_core_dev *mdev = priv->mdev;  in mlx5e_getmaxrate()  local
118 err = -mlx5_query_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); in mlx5e_getmaxrate()
122 for (i = 0; i <= mlx5_max_tc(mdev); i++) { in mlx5e_getmaxrate()
147 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_get_max_alloc() local
152 err = -mlx5_query_port_tc_bw_alloc(mdev, priv->params_ethtool.max_bw_share); in mlx5e_get_max_alloc()
159 err = -mlx5_set_port_tc_bw_alloc(mdev, in mlx5e_get_max_alloc()
170 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_get_dscp() local
173 if (MLX5_CAP_GEN(mdev, qcam_reg) == 0 || in mlx5e_get_dscp()
174 MLX5_CAP_QCAM_REG(mdev, qpts) == 0 || in mlx5e_get_dscp()
175 MLX5_CAP_QCAM_REG(mdev, qpdpm) == 0) in mlx5e_get_dscp()
179 err = -mlx5_query_dscp2prio(mdev, priv->params_ethtool.dscp2prio); in mlx5e_get_dscp()
183 err = -mlx5_query_trust_state(mdev, &priv->params_ethtool.trust_state); in mlx5e_get_dscp()
203 for (i = 0; i <= mlx5_max_tc(priv->mdev); i++) { in mlx5e_tc_get_parameters()
225 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_tc_maxrate_handler() local
229 u8 max_rates = mlx5_max_tc(mdev) + 1; in mlx5e_tc_maxrate_handler()
253 err = -mlx5_modify_port_tc_rate_limit(mdev, max_bw_value, max_bw_unit); in mlx5e_tc_maxrate_handler()
268 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_tc_rate_share_handler() local
270 u8 max_rates = mlx5_max_tc(mdev) + 1; in mlx5e_tc_rate_share_handler()
298 err = -mlx5_set_port_tc_bw_alloc(mdev, max_bw_share); in mlx5e_tc_rate_share_handler()
312 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_get_prio_tc() local
317 if (!MLX5_CAP_GEN(priv->mdev, ets)) { in mlx5e_get_prio_tc()
323 err = -mlx5_query_port_prio_tc(mdev, i, priv->params_ethtool.prio_tc + i); in mlx5e_get_prio_tc()
335 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_prio_to_tc_handler() local
349 if (temp[i] > mlx5_max_tc(mdev)) { in mlx5e_prio_to_tc_handler()
358 err = -mlx5_set_port_prio_tc(mdev, i, temp[i]); in mlx5e_prio_to_tc_handler()
372 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_fec_update() local
377 if (!MLX5_CAP_GEN(mdev, pcam_reg)) in mlx5e_fec_update()
380 if (!MLX5_CAP_PCAM_REG(mdev, pplm)) in mlx5e_fec_update()
385 err = -mlx5_core_access_reg(mdev, in, sz, in, sz, MLX5_REG_PPLM, 0, 0); in mlx5e_fec_update()
442 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_fec_mask_10x_25x_handler() local
462 if (!MLX5_CAP_GEN(mdev, pcam_reg)) { in mlx5e_fec_mask_10x_25x_handler()
467 if (!MLX5_CAP_PCAM_REG(mdev, pplm)) { in mlx5e_fec_mask_10x_25x_handler()
474 err = -mlx5_core_access_reg(mdev, in, sz, in, sz, MLX5_REG_PPLM, 0, 0); in mlx5e_fec_mask_10x_25x_handler()
517 err = -mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPLM, 0, 1); in mlx5e_fec_mask_10x_25x_handler()
524 mlx5_toggle_port_link(priv->mdev); in mlx5e_fec_mask_10x_25x_handler()
547 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_fec_mask_50x_handler() local
567 if (!MLX5_CAP_GEN(mdev, pcam_reg)) { in mlx5e_fec_mask_50x_handler()
572 if (!MLX5_CAP_PCAM_REG(mdev, pplm)) { in mlx5e_fec_mask_50x_handler()
579 err = -mlx5_core_access_reg(mdev, in, sz, in, sz, MLX5_REG_PPLM, 0, 0); in mlx5e_fec_mask_50x_handler()
622 err = -mlx5_core_access_reg(mdev, in, sz, out, sz, MLX5_REG_PPLM, 0, 1); in mlx5e_fec_mask_50x_handler()
629 mlx5_toggle_port_link(priv->mdev); in mlx5e_fec_mask_50x_handler()
652 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_trust_state_handler() local
668 if (!MLX5_CAP_QCAM_FEATURE(mdev, qpts_trust_both)) { in mlx5e_trust_state_handler()
678 err = -mlx5_set_trust_state(mdev, result); in mlx5e_trust_state_handler()
699 struct mlx5_core_dev *mdev = priv->mdev; in mlx5e_dscp_prio_handler() local
720 err = -mlx5_set_dscp2prio(mdev, dscp2prio); in mlx5e_dscp_prio_handler()
776 struct mlx5_core_dev *mdev; in mlx5e_buf_prio_handler() local
781 mdev = priv->mdev; in mlx5e_buf_prio_handler()
783 error = -mlx5e_port_query_priority2buffer(mdev, buffer); in mlx5e_buf_prio_handler()
852 err = -mlx5_core_access_reg(priv->mdev, NULL, 0, out_cap, sz_cap, in mlx5e_hw_temperature_update()
871 err = -mlx5_core_access_reg(priv->mdev, out_sensor, sz_sensor, in mlx5e_hw_temperature_update()
915 mode_modify = MLX5_CAP_GEN(priv->mdev, cq_period_mode_modify); in mlx5e_ethtool_handler()
1068 (u64) priv->mdev->priv.eq_table.num_comp_vectors) { in mlx5e_ethtool_handler()
1070 (u64) priv->mdev->priv.eq_table.num_comp_vectors; in mlx5e_ethtool_handler()
1126 MLX5_CAP_ETH(priv->mdev, lro_cap)) { in mlx5e_ethtool_handler()
1156 MLX5_CAP_GEN(priv->mdev, cqe_compression)) { in mlx5e_ethtool_handler()
1211 error = -mlx5_core_set_diagnostics_full(priv->mdev, in mlx5e_ethtool_handler()
1220 error = -mlx5_core_set_diagnostics_full(priv->mdev, in mlx5e_ethtool_handler()
1227 if (MLX5_CAP_GEN(priv->mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH) { in mlx5e_ethtool_handler()
1235 if (MLX5_CAP_GEN(priv->mdev, disable_local_lb_mc)) { in mlx5e_ethtool_handler()
1236 error = mlx5_nic_vport_modify_local_lb(priv->mdev, in mlx5e_ethtool_handler()
1245 if (MLX5_CAP_GEN(priv->mdev, port_type) != MLX5_CAP_PORT_TYPE_ETH) { in mlx5e_ethtool_handler()
1253 if (MLX5_CAP_GEN(priv->mdev, disable_local_lb_uc)) { in mlx5e_ethtool_handler()
1254 error = mlx5_nic_vport_modify_local_lb(priv->mdev, in mlx5e_ethtool_handler()
1309 priv->mdev->priv.msix_arr[MLX5_EQ_VEC_PAGES].vector); in mlx5e_ethtool_debug_channel_info()
1311 priv->mdev->priv.msix_arr[MLX5_EQ_VEC_CMD].vector); in mlx5e_ethtool_debug_channel_info()
1313 priv->mdev->priv.msix_arr[MLX5_EQ_VEC_ASYNC].vector); in mlx5e_ethtool_debug_channel_info()
1319 if (mlx5_vector2eqn(priv->mdev, i, &eqn_not_used, &irqn) != 0) in mlx5e_ethtool_debug_channel_info()
1327 priv->mdev->priv.msix_arr[irqn].vector); in mlx5e_ethtool_debug_channel_info()
1335 priv->mdev->priv.msix_arr[irqn].vector); in mlx5e_ethtool_debug_channel_info()
1403 if (mlx5_core_supports_diagnostics(priv->mdev, entry.counter_id) == 0) in mlx5e_create_diagnostics()
1413 if (mlx5_core_supports_diagnostics(priv->mdev, entry.counter_id) == 0) in mlx5e_create_diagnostics()
1454 if (MLX5_CAP_GEN(priv->mdev, disable_local_lb_mc) || in mlx5e_create_ethtool()
1455 MLX5_CAP_GEN(priv->mdev, disable_local_lb_uc)) { in mlx5e_create_ethtool()
1459 err = mlx5_nic_vport_query_local_lb(priv->mdev, MLX5_LOCAL_MC_LB, &val); in mlx5e_create_ethtool()
1463 err = mlx5_nic_vport_query_local_lb(priv->mdev, MLX5_LOCAL_UC_LB, &val); in mlx5e_create_ethtool()
1555 pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); in mlx5e_create_ethtool()
1614 MLX5_CAP_QCAM_FEATURE(priv->mdev, qpts_trust_both) ? in mlx5e_create_ethtool()