Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx4 / cmd.c
index 923c4878461e8a1c1242034b618473efba584060..b16e1b95566f4db9708540742c4002233a429cb2 100644 (file)
@@ -580,8 +580,18 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
 
        err = context->result;
        if (err) {
-               mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n",
-                        op, context->fw_status);
+               /* Since we do not want to have this error message always
+                * displayed at driver start when there are ConnectX2 HCAs
+                * on the host, we deprecate the error message for this
+                * specific command/input_mod/opcode_mod/fw-status to be debug.
+                */
+               if (op == MLX4_CMD_SET_PORT && in_modifier == 1 &&
+                   op_modifier == 0 && context->fw_status == CMD_STAT_BAD_SIZE)
+                       mlx4_dbg(dev, "command 0x%x failed: fw status = 0x%x\n",
+                                op, context->fw_status);
+               else
+                       mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n",
+                                op, context->fw_status);
                goto out;
        }