mlx5: Fix error code translation from firmware to driver
authorEli Cohen <eli@mellanox.com>
Wed, 11 Sep 2013 13:35:33 +0000 (16:35 +0300)
committerRoland Dreier <roland@purestorage.com>
Thu, 10 Oct 2013 16:23:59 +0000 (09:23 -0700)
Limits exceeded should be translated to ENOMEM.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c

index db3a6584939f6561b18a8e67e0fe1db05f10daa2..6ca30739625f7ac568d693b5d4b9d3d9e47b46de 100644 (file)
@@ -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;