@@ -754,6 +754,8 @@ static const char *cmd_status_str(u8 status)
754
754
return "bad resource" ;
755
755
case MLX5_CMD_STAT_RES_BUSY :
756
756
return "resource busy" ;
757
+ case MLX5_CMD_STAT_NOT_READY :
758
+ return "FW not ready" ;
757
759
case MLX5_CMD_STAT_LIM_ERR :
758
760
return "limits exceeded" ;
759
761
case MLX5_CMD_STAT_BAD_RES_STATE_ERR :
@@ -787,6 +789,7 @@ static int cmd_status_to_err(u8 status)
787
789
case MLX5_CMD_STAT_BAD_SYS_STATE_ERR : return - EIO ;
788
790
case MLX5_CMD_STAT_BAD_RES_ERR : return - EINVAL ;
789
791
case MLX5_CMD_STAT_RES_BUSY : return - EBUSY ;
792
+ case MLX5_CMD_STAT_NOT_READY : return - EAGAIN ;
790
793
case MLX5_CMD_STAT_LIM_ERR : return - ENOMEM ;
791
794
case MLX5_CMD_STAT_BAD_RES_STATE_ERR : return - EINVAL ;
792
795
case MLX5_CMD_STAT_IX_ERR : return - EINVAL ;
@@ -815,14 +818,16 @@ EXPORT_SYMBOL(mlx5_cmd_out_err);
815
818
static void cmd_status_print (struct mlx5_core_dev * dev , void * in , void * out )
816
819
{
817
820
u16 opcode , op_mod ;
821
+ u8 status ;
818
822
u16 uid ;
819
823
820
824
opcode = in_to_opcode (in );
821
825
op_mod = MLX5_GET (mbox_in , in , op_mod );
822
826
uid = MLX5_GET (mbox_in , in , uid );
827
+ status = MLX5_GET (mbox_out , out , status );
823
828
824
829
if (!uid && opcode != MLX5_CMD_OP_DESTROY_MKEY &&
825
- opcode != MLX5_CMD_OP_CREATE_UCTX )
830
+ opcode != MLX5_CMD_OP_CREATE_UCTX && status != MLX5_CMD_STAT_NOT_READY )
826
831
mlx5_cmd_out_err (dev , opcode , op_mod , out );
827
832
}
828
833
0 commit comments