[MLX4] print to Event Log first several HCA commands timeout errors. [mlnx: 3194]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 22 Oct 2008 11:27:31 +0000 (11:27 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 22 Oct 2008 11:27:31 +0000 (11:27 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1676 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/bus/net/cmd.c

index a49a5f1..123ad70 100644 (file)
@@ -280,7 +280,11 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
 
        if (wait_for_completion_timeout(&context->done, msecs_to_jiffies(timeout))) {
                if (!context->done.done) {
+                       static int spam_limit = 10;
                        err = -EBUSY;
+                       if (spam_limit-- > 0)
+                               mlx4_err(dev, "mlx4_cmd_wait: Command %02x completed with timeout after %d secs \n",
+                                 op, timeout/1000);
                        goto out;
                }
        }