]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/mlx4/cmd.c
Merge branches 'bkl-removal', 'cma', 'ehca', 'for-2.6.27', 'mlx4', 'mthca' and 'nes...
[linux-2.6-omap-h63xx.git] / drivers / net / mlx4 / cmd.c
index db49051b97b168b7a004e52c865bef94311ce56a..04d5bc69a6f817a182a341a0121ad397b7bbce69 100644 (file)
@@ -67,6 +67,8 @@ enum {
        CMD_STAT_BAD_INDEX      = 0x0a,
        /* FW image corrupted: */
        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: */
        CMD_STAT_BAD_QP_STATE   = 0x10,
        /* Bad segment parameters (Address/Size): */
@@ -106,7 +108,8 @@ struct mlx4_cmd_context {
        u16                     token;
 };
 
-static int mlx4_status_to_errno(u8 status) {
+static int mlx4_status_to_errno(u8 status)
+{
        static const int trans_table[] = {
                [CMD_STAT_INTERNAL_ERR]   = -EIO,
                [CMD_STAT_BAD_OP]         = -EPERM,
@@ -118,6 +121,7 @@ static int mlx4_status_to_errno(u8 status) {
                [CMD_STAT_BAD_RES_STATE]  = -EBADF,
                [CMD_STAT_BAD_INDEX]      = -EBADF,
                [CMD_STAT_BAD_NVMEM]      = -EFAULT,
+               [CMD_STAT_ICM_ERROR]      = -ENFILE,
                [CMD_STAT_BAD_QP_STATE]   = -EINVAL,
                [CMD_STAT_BAD_SEG_PARAM]  = -EFAULT,
                [CMD_STAT_REG_BOUND]      = -EBUSY,