Commit 423b3aec authored by Or Gerlitz's avatar Or Gerlitz Committed by David S. Miller

net/mlx4: Change ENOTSUPP to EOPNOTSUPP

As ENOTSUPP is specific to NFS, change the return error value to
EOPNOTSUPP in various places in the mlx4 driver.
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Suggested-by: default avatarYotam Gigi <yotamg@mellanox.com>
Reviewed-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c12f4d76
...@@ -319,7 +319,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets) ...@@ -319,7 +319,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets)
default: default:
en_err(priv, "TC[%d]: Not supported TSA: %d\n", en_err(priv, "TC[%d]: Not supported TSA: %d\n",
i, ets->tc_tsa[i]); i, ets->tc_tsa[i]);
return -ENOTSUPP; return -EOPNOTSUPP;
} }
} }
......
...@@ -2436,7 +2436,7 @@ int mlx4_config_dev_retrieval(struct mlx4_dev *dev, ...@@ -2436,7 +2436,7 @@ int mlx4_config_dev_retrieval(struct mlx4_dev *dev,
#define CONFIG_DEV_RX_CSUM_MODE_PORT2_BIT_OFFSET 4 #define CONFIG_DEV_RX_CSUM_MODE_PORT2_BIT_OFFSET 4
if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_CONFIG_DEV)) if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_CONFIG_DEV))
return -ENOTSUPP; return -EOPNOTSUPP;
err = mlx4_CONFIG_DEV_get(dev, &config_dev); err = mlx4_CONFIG_DEV_get(dev, &config_dev);
if (err) if (err)
......
...@@ -136,7 +136,7 @@ int mlx4_do_bond(struct mlx4_dev *dev, bool enable) ...@@ -136,7 +136,7 @@ int mlx4_do_bond(struct mlx4_dev *dev, bool enable)
LIST_HEAD(bond_list); LIST_HEAD(bond_list);
if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP)) if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP))
return -ENOTSUPP; return -EOPNOTSUPP;
ret = mlx4_disable_rx_port_check(dev, enable); ret = mlx4_disable_rx_port_check(dev, enable);
if (ret) { if (ret) {
......
...@@ -1447,7 +1447,7 @@ int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p) ...@@ -1447,7 +1447,7 @@ int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p)
int err; int err;
if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP)) if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP))
return -ENOTSUPP; return -EOPNOTSUPP;
mutex_lock(&priv->bond_mutex); mutex_lock(&priv->bond_mutex);
...@@ -1884,7 +1884,7 @@ int mlx4_get_internal_clock_params(struct mlx4_dev *dev, ...@@ -1884,7 +1884,7 @@ int mlx4_get_internal_clock_params(struct mlx4_dev *dev,
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
if (mlx4_is_slave(dev)) if (mlx4_is_slave(dev))
return -ENOTSUPP; return -EOPNOTSUPP;
if (!params) if (!params)
return -EINVAL; return -EINVAL;
...@@ -2384,7 +2384,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -2384,7 +2384,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
/* Query CONFIG_DEV parameters */ /* Query CONFIG_DEV parameters */
err = mlx4_config_dev_retrieval(dev, &params); err = mlx4_config_dev_retrieval(dev, &params);
if (err && err != -ENOTSUPP) { if (err && err != -EOPNOTSUPP) {
mlx4_err(dev, "Failed to query CONFIG_DEV parameters\n"); mlx4_err(dev, "Failed to query CONFIG_DEV parameters\n");
} else if (!err) { } else if (!err) {
dev->caps.rx_checksum_flags_port[1] = params.rx_csum_flags_port_1; dev->caps.rx_checksum_flags_port[1] = params.rx_csum_flags_port_1;
......
...@@ -823,7 +823,7 @@ int mlx4_mw_alloc(struct mlx4_dev *dev, u32 pd, enum mlx4_mw_type type, ...@@ -823,7 +823,7 @@ int mlx4_mw_alloc(struct mlx4_dev *dev, u32 pd, enum mlx4_mw_type type,
!(dev->caps.flags & MLX4_DEV_CAP_FLAG_MEM_WINDOW)) || !(dev->caps.flags & MLX4_DEV_CAP_FLAG_MEM_WINDOW)) ||
(type == MLX4_MW_TYPE_2 && (type == MLX4_MW_TYPE_2 &&
!(dev->caps.bmme_flags & MLX4_BMME_FLAG_TYPE_2_WIN))) !(dev->caps.bmme_flags & MLX4_BMME_FLAG_TYPE_2_WIN)))
return -ENOTSUPP; return -EOPNOTSUPP;
index = mlx4_mpt_reserve(dev); index = mlx4_mpt_reserve(dev);
if (index == -1) if (index == -1)
......
...@@ -447,7 +447,7 @@ int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn, ...@@ -447,7 +447,7 @@ int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn,
& MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) { & MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) {
mlx4_warn(dev, mlx4_warn(dev,
"Trying to set src check LB, but it isn't supported\n"); "Trying to set src check LB, but it isn't supported\n");
err = -ENOTSUPP; err = -EOPNOTSUPP;
goto out; goto out;
} }
pri_addr_path_mask |= pri_addr_path_mask |=
......
...@@ -4297,7 +4297,7 @@ int mlx4_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave, ...@@ -4297,7 +4297,7 @@ int mlx4_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave,
MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) { MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) {
mlx4_warn(dev, "Src check LB for slave %d isn't supported\n", mlx4_warn(dev, "Src check LB for slave %d isn't supported\n",
slave); slave);
return -ENOTSUPP; return -EOPNOTSUPP;
} }
/* Just change the smac for the QP */ /* Just change the smac for the QP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment