]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlx4: use new txqueue timeout argument
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 10 Dec 2019 14:23:55 +0000 (09:23 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Dec 2019 05:38:57 +0000 (21:38 -0800)
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 71c083960a8723f5be38d00f7495a364ecf6dfae..43dcbd8214c695862cec927d0628c41025310708 100644 (file)
@@ -1367,20 +1367,14 @@ static void mlx4_en_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
        struct mlx4_en_priv *priv = netdev_priv(dev);
        struct mlx4_en_dev *mdev = priv->mdev;
-       int i;
+       struct mlx4_en_tx_ring *tx_ring = priv->tx_ring[TX][txqueue];
 
        if (netif_msg_timer(priv))
                en_warn(priv, "Tx timeout called on port:%d\n", priv->port);
 
-       for (i = 0; i < priv->tx_ring_num[TX]; i++) {
-               struct mlx4_en_tx_ring *tx_ring = priv->tx_ring[TX][i];
-
-               if (!netif_tx_queue_stopped(netdev_get_tx_queue(dev, i)))
-                       continue;
-               en_warn(priv, "TX timeout on queue: %d, QP: 0x%x, CQ: 0x%x, Cons: 0x%x, Prod: 0x%x\n",
-                       i, tx_ring->qpn, tx_ring->sp_cqn,
-                       tx_ring->cons, tx_ring->prod);
-       }
+       en_warn(priv, "TX timeout on queue: %d, QP: 0x%x, CQ: 0x%x, Cons: 0x%x, Prod: 0x%x\n",
+               txqueue, tx_ring->qpn, tx_ring->sp_cqn,
+               tx_ring->cons, tx_ring->prod);
 
        priv->port_stats.tx_timeout++;
        en_dbg(DRV, priv, "Scheduling watchdog\n");