Skip to content

Commit 833846e

Browse files
Eugenia Emantayevdavem330
authored andcommitted
net/mlx4_en: Remove selftest TX queues empty condition
Remove waiting for TX queues to become empty during selftest. This check is not necessary for any purpose, and might put the driver into an infinite loop. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3868204 commit 833846e

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

‎drivers/net/ethernet/mellanox/mlx4/en_selftest.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf)
140140
{
141141
struct mlx4_en_priv *priv = netdev_priv(dev);
142142
struct mlx4_en_dev *mdev = priv->mdev;
143-
struct mlx4_en_tx_ring *tx_ring;
144143
int i, carrier_ok;
145144

146145
memset(buf, 0, sizeof(u64) * MLX4_EN_NUM_SELF_TEST);
@@ -150,16 +149,10 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf)
150149
carrier_ok = netif_carrier_ok(dev);
151150

152151
netif_carrier_off(dev);
153-
retry_tx:
154152
/* Wait until all tx queues are empty.
155153
* there should not be any additional incoming traffic
156154
* since we turned the carrier off */
157155
msleep(200);
158-
for (i = 0; i < priv->tx_ring_num && carrier_ok; i++) {
159-
tx_ring = priv->tx_ring[i];
160-
if (tx_ring->prod != (tx_ring->cons + tx_ring->last_nr_txbb))
161-
goto retry_tx;
162-
}
163156

164157
if (priv->mdev->dev->caps.flags &
165158
MLX4_DEV_CAP_FLAG_UC_LOOPBACK) {

0 commit comments

Comments
 (0)