aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorDotan Barak <dotanb@dev.mellanox.com>2013-06-25 05:09:37 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-25 19:29:39 -0400
commit674925edb466b027d7c61993ebe3250fb8989ee0 (patch)
tree1078807db0ccc6bfcca5ef780eebebbf1a8aed93 /drivers/net/ethernet/mellanox
parent618fad954b9becf095f1b52391af29f743ff4662 (diff)
net/mlx4_core: Add warning in case of command timeouts
Warning prints when there are command timeout to help debugging future failures. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cmd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index ea1e03896353..df04c8206ebe 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -257,6 +257,8 @@ static int mlx4_comm_cmd_wait(struct mlx4_dev *dev, u8 op,
257 257
258 if (!wait_for_completion_timeout(&context->done, 258 if (!wait_for_completion_timeout(&context->done,
259 msecs_to_jiffies(timeout))) { 259 msecs_to_jiffies(timeout))) {
260 mlx4_warn(dev, "communication channel command 0x%x timed out\n",
261 op);
260 err = -EBUSY; 262 err = -EBUSY;
261 goto out; 263 goto out;
262 } 264 }
@@ -486,6 +488,8 @@ static int mlx4_cmd_poll(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
486 } 488 }
487 489
488 if (cmd_pending(dev)) { 490 if (cmd_pending(dev)) {
491 mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n",
492 op);
489 err = -ETIMEDOUT; 493 err = -ETIMEDOUT;
490 goto out; 494 goto out;
491 } 495 }
@@ -549,6 +553,8 @@ static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
549 553
550 if (!wait_for_completion_timeout(&context->done, 554 if (!wait_for_completion_timeout(&context->done,
551 msecs_to_jiffies(timeout))) { 555 msecs_to_jiffies(timeout))) {
556 mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n",
557 op);
552 err = -EBUSY; 558 err = -EBUSY;
553 goto out; 559 goto out;
554 } 560 }