summary refs log tree commit diff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.com>2013-09-11 16:35:33 +0300
committerRoland Dreier <roland@purestorage.com>2013-10-10 09:23:59 -0700
commit9c8651314bea18a8a811296289adbf06c8b8b12b (patch)
treef4c613d313858e4bbf3a0d5be335a2296f4add55 /drivers/net/ethernet
parenta4774e9095de0c4ca90b7bcf6068369a66a91e36 (diff)
downloadlinux-9c8651314bea18a8a811296289adbf06c8b8b12b.tar.gz
mlx5: Fix error code translation from firmware to driver
Limits exceeded should be translated to ENOMEM.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index db3a6584939f..6ca30739625f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -1512,7 +1512,7 @@ int mlx5_cmd_status_to_err(struct mlx5_outbox_hdr *hdr)
 	case MLX5_CMD_STAT_BAD_SYS_STATE_ERR:		return -EIO;
 	case MLX5_CMD_STAT_BAD_RES_ERR:			return -EINVAL;
 	case MLX5_CMD_STAT_RES_BUSY:			return -EBUSY;
-	case MLX5_CMD_STAT_LIM_ERR:			return -EINVAL;
+	case MLX5_CMD_STAT_LIM_ERR:			return -ENOMEM;
 	case MLX5_CMD_STAT_BAD_RES_STATE_ERR:		return -EINVAL;
 	case MLX5_CMD_STAT_IX_ERR:			return -EINVAL;
 	case MLX5_CMD_STAT_NO_RES_ERR:			return -EAGAIN;