Commit 899698da authored by Jack Morgenstein's avatar Jack Morgenstein Committed by Roland Dreier

mlx4_code: Add missing FW status return code

Add ICM_ERROR firmware status code.  In mapping to errnos, -ENFILE
seems closest.

This is in preparation for providing more detailed log info using
mlx4_err() in low-level driver when a non-zero status is returned.
Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 47b37475
...@@ -67,6 +67,8 @@ enum { ...@@ -67,6 +67,8 @@ enum {
CMD_STAT_BAD_INDEX = 0x0a, CMD_STAT_BAD_INDEX = 0x0a,
/* FW image corrupted: */ /* FW image corrupted: */
CMD_STAT_BAD_NVMEM = 0x0b, CMD_STAT_BAD_NVMEM = 0x0b,
/* Error in ICM mapping (e.g. not enough auxiliary ICM pages to execute command): */
CMD_STAT_ICM_ERROR = 0x0c,
/* Attempt to modify a QP/EE which is not in the presumed state: */ /* Attempt to modify a QP/EE which is not in the presumed state: */
CMD_STAT_BAD_QP_STATE = 0x10, CMD_STAT_BAD_QP_STATE = 0x10,
/* Bad segment parameters (Address/Size): */ /* Bad segment parameters (Address/Size): */
...@@ -119,6 +121,7 @@ static int mlx4_status_to_errno(u8 status) ...@@ -119,6 +121,7 @@ static int mlx4_status_to_errno(u8 status)
[CMD_STAT_BAD_RES_STATE] = -EBADF, [CMD_STAT_BAD_RES_STATE] = -EBADF,
[CMD_STAT_BAD_INDEX] = -EBADF, [CMD_STAT_BAD_INDEX] = -EBADF,
[CMD_STAT_BAD_NVMEM] = -EFAULT, [CMD_STAT_BAD_NVMEM] = -EFAULT,
[CMD_STAT_ICM_ERROR] = -ENFILE,
[CMD_STAT_BAD_QP_STATE] = -EINVAL, [CMD_STAT_BAD_QP_STATE] = -EINVAL,
[CMD_STAT_BAD_SEG_PARAM] = -EFAULT, [CMD_STAT_BAD_SEG_PARAM] = -EFAULT,
[CMD_STAT_REG_BOUND] = -EBUSY, [CMD_STAT_REG_BOUND] = -EBUSY,
......
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