]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Fixing TX queue stop/wake flow
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Fri, 3 Aug 2012 00:38:37 +0000 (00:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Aug 2012 23:49:02 +0000 (16:49 -0700)
commitab0300be3af5a92afb4589647305a8a6537efb6f
tree99610de8cfed12e7be3ad2b7f03996e66b7ca8a0
parent0dfa40224fc11da1b30619d4bf6c86779f61a032
net/mlx4_en: Fixing TX queue stop/wake flow

Removing the ring->blocked flag, it is redundant and leads to a race:

We close the TX queue and then set the "blocked" flag.
Between those 2 operations the completion function can check the "blocked"
flag, sees that it is 0, and wouldn't open the TX queue.

Using netif_tx_queue_stopped to check the state of the queue to avoid this race.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h