[IPoIB] Improve ipoib_timeout() output
authorRoland Dreier <rolandd@cisco.com>
Tue, 18 Oct 2005 19:20:06 +0000 (12:20 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 18 Oct 2005 19:20:06 +0000 (12:20 -0700)
Use jiffies_to_msecs() so we print a human-readable time so
we don't have to worry about what HZ is configured to, and
print out a few values to make post-mortem analysis easier.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c

index 6c5bf07489f4a47bb4dab5ee527ad09c9e50c87c..ee303859b044716dbec66813356377ba674a041c 100644 (file)
@@ -637,8 +637,11 @@ static void ipoib_timeout(struct net_device *dev)
 {
        struct ipoib_dev_priv *priv = netdev_priv(dev);
 
-       ipoib_warn(priv, "transmit timeout: latency %ld\n",
-                  jiffies - dev->trans_start);
+       ipoib_warn(priv, "transmit timeout: latency %d msecs\n",
+                  jiffies_to_msecs(jiffies - dev->trans_start));
+       ipoib_warn(priv, "queue stopped %d, tx_head %u, tx_tail %u\n",
+                  netif_queue_stopped(dev),
+                  priv->tx_head, priv->tx_tail);
        /* XXX reset QP, etc. */
 }