aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/tx.c
diff options
context:
space:
mode:
authorNeil Turton <nturton@solarflare.com>2011-04-04 08:46:23 -0400
committerBen Hutchings <bhutchings@solarflare.com>2011-04-12 11:20:25 -0400
commit9d1aea62e45d447e7fc05d4e7f4e90f633e3abfc (patch)
tree19869ff5f97c2b270bde599a7c0ce59bb5afa5f7 /drivers/net/sfc/tx.c
parent4a9f65f6304a00f6473e83b19c1e83caa1e42530 (diff)
sfc: Stop the TX queues during loopback self-tests
If the TX queues are running during loopback self tests, host traffic gets looped back which causes the test to fail. Avoid restarting the TX queues after the port reset so that any packets sent by the host get held back until after the tests have completed. [bwh: Also wake all TX queues at the end of self-tests.] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/tx.c')
-rw-r--r--drivers/net/sfc/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 139801908217..d2c85dfdf3bf 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -435,7 +435,8 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
435 * queue state. */ 435 * queue state. */
436 smp_mb(); 436 smp_mb();
437 if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) && 437 if (unlikely(netif_tx_queue_stopped(tx_queue->core_txq)) &&
438 likely(efx->port_enabled)) { 438 likely(efx->port_enabled) &&
439 likely(!efx->port_inhibited)) {
439 fill_level = tx_queue->insert_count - tx_queue->read_count; 440 fill_level = tx_queue->insert_count - tx_queue->read_count;
440 if (fill_level < EFX_TXQ_THRESHOLD(efx)) { 441 if (fill_level < EFX_TXQ_THRESHOLD(efx)) {
441 EFX_BUG_ON_PARANOID(!efx_dev_registered(efx)); 442 EFX_BUG_ON_PARANOID(!efx_dev_registered(efx));