net/mlx4: Change ENOTSUPP to EOPNOTSUPP
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 23 Feb 2017 10:02:41 +0000 (12:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2017 15:57:56 +0000 (10:57 -0500)
As ENOTSUPP is specific to NFS, change the return error value to
EOPNOTSUPP in various places in the mlx4 driver.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Suggested-by: Yotam Gigi <yotamg@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/intf.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/qp.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

index b04760a5034b9c84038c0bbb44fe80035bc1e0f7..1dae8e40fb25f7da4ba7b0b7c9e4623cce1f63dc 100644 (file)
@@ -319,7 +319,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets)
                default:
                        en_err(priv, "TC[%d]: Not supported TSA: %d\n",
                                        i, ets->tc_tsa[i]);
-                       return -ENOTSUPP;
+                       return -EOPNOTSUPP;
                }
        }
 
index 3fe885ce1902d2ca1221029438892d1bcb53f7ab..37e84a59e751d8ad44c34f5a0c7b16337a207c9e 100644 (file)
@@ -2436,7 +2436,7 @@ int mlx4_config_dev_retrieval(struct mlx4_dev *dev,
 #define CONFIG_DEV_RX_CSUM_MODE_PORT2_BIT_OFFSET       4
 
        if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_CONFIG_DEV))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        err = mlx4_CONFIG_DEV_get(dev, &config_dev);
        if (err)
index 8258d08acd8c2029a8bcb812dd5efd85d8c7b0f2..e00f627331cb6f75a7cacd478246daea0b996c13 100644 (file)
@@ -136,7 +136,7 @@ int mlx4_do_bond(struct mlx4_dev *dev, bool enable)
        LIST_HEAD(bond_list);
 
        if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        ret = mlx4_disable_rx_port_check(dev, enable);
        if (ret) {
index 15ef787e71ba1072d2f9693392ae5e0269e06066..6832342217410c9079872cd4b17bc80d148912be 100644 (file)
@@ -1447,7 +1447,7 @@ int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p)
        int err;
 
        if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_PORT_REMAP))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        mutex_lock(&priv->bond_mutex);
 
@@ -1884,7 +1884,7 @@ int mlx4_get_internal_clock_params(struct mlx4_dev *dev,
        struct mlx4_priv *priv = mlx4_priv(dev);
 
        if (mlx4_is_slave(dev))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        if (!params)
                return -EINVAL;
@@ -2384,7 +2384,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
 
        /* Query CONFIG_DEV parameters */
        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");
        } else if (!err) {
                dev->caps.rx_checksum_flags_port[1] = params.rx_csum_flags_port_1;
index 395b5463cfd953e9c947bb47b6382f580f7dad3d..db65f72879e98d0dfef54cac4b5cf2c0ac682783 100644 (file)
@@ -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)) ||
             (type == MLX4_MW_TYPE_2 &&
             !(dev->caps.bmme_flags & MLX4_BMME_FLAG_TYPE_2_WIN)))
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        index = mlx4_mpt_reserve(dev);
        if (index == -1)
index d1cd9c32a9ae83912e9b3b552c5680768b8449c3..2d6abd4662b143612769ef9b91783249bcd2ac8b 100644 (file)
@@ -447,7 +447,7 @@ int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn,
                      & MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB)) {
                        mlx4_warn(dev,
                                  "Trying to set src check LB, but it isn't supported\n");
-                       err = -ENOTSUPP;
+                       err = -EOPNOTSUPP;
                        goto out;
                }
                pri_addr_path_mask |=
index 6fe9f76ae656b6b11056154eafcc34e83e844666..d8d5d161b8c7bfb82abbf19de17ea08047473cc0 100644 (file)
@@ -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_warn(dev, "Src check LB for slave %d isn't supported\n",
                          slave);
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
 
        /* Just change the smac for the QP */