]> git.itanic.dy.fi Git - linux-stable/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/cmd.c
net/mlx5: Collect command failures data only for known commands
[linux-stable] / drivers / net / ethernet / mellanox / mlx5 / core / cmd.c
index b00e33ed05e9177460260436c560bd37f3817fe8..4d6a94ab1f4147349945bff62ebbf9e99d043366 100644 (file)
@@ -1920,9 +1920,10 @@ static void mlx5_cmd_err_trace(struct mlx5_core_dev *dev, u16 opcode, u16 op_mod
 static void cmd_status_log(struct mlx5_core_dev *dev, u16 opcode, u8 status,
                           u32 syndrome, int err)
 {
+       const char *namep = mlx5_command_str(opcode);
        struct mlx5_cmd_stats *stats;
 
-       if (!err)
+       if (!err || !(strcmp(namep, "unknown command opcode")))
                return;
 
        stats = &dev->cmd.stats[opcode];