aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:49:37 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-24 18:54:37 -0400
commit6bc5d3a9334401d788e1adf8b71add211265bc8b (patch)
tree250f3de17f38b778ac8a109229c5b3687ab8d15d /drivers/net/sfc/efx.c
parent92ade881b2fcfc2744d3de43d172d3ec8e13afd7 (diff)
sfc: Make queue flushes more reliable
Increase the potential retry count for RX flushes from 5 to 100. Stop polling the RX_DESC_PTR_TBL to infer that a flush might have happened. Instead absolutely rely on the flush events, unless bug 7803 applies (Falcon rev A only). To keep things quick, request flushes for every TX and RX queue up front, and match up the events to requests. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index f65e313c2be2..06ea71c7e34e 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -445,10 +445,17 @@ static void efx_fini_channels(struct efx_nic *efx)
445 struct efx_channel *channel; 445 struct efx_channel *channel;
446 struct efx_tx_queue *tx_queue; 446 struct efx_tx_queue *tx_queue;
447 struct efx_rx_queue *rx_queue; 447 struct efx_rx_queue *rx_queue;
448 int rc;
448 449
449 EFX_ASSERT_RESET_SERIALISED(efx); 450 EFX_ASSERT_RESET_SERIALISED(efx);
450 BUG_ON(efx->port_enabled); 451 BUG_ON(efx->port_enabled);
451 452
453 rc = falcon_flush_queues(efx);
454 if (rc)
455 EFX_ERR(efx, "failed to flush queues\n");
456 else
457 EFX_LOG(efx, "successfully flushed all queues\n");
458
452 efx_for_each_channel(channel, efx) { 459 efx_for_each_channel(channel, efx) {
453 EFX_LOG(channel->efx, "shut down chan %d\n", channel->channel); 460 EFX_LOG(channel->efx, "shut down chan %d\n", channel->channel);
454 461
@@ -456,13 +463,6 @@ static void efx_fini_channels(struct efx_nic *efx)
456 efx_fini_rx_queue(rx_queue); 463 efx_fini_rx_queue(rx_queue);
457 efx_for_each_channel_tx_queue(tx_queue, channel) 464 efx_for_each_channel_tx_queue(tx_queue, channel)
458 efx_fini_tx_queue(tx_queue); 465 efx_fini_tx_queue(tx_queue);
459 }
460
461 /* Do the event queues last so that we can handle flush events
462 * for all DMA queues. */
463 efx_for_each_channel(channel, efx) {
464 EFX_LOG(channel->efx, "shut down evq %d\n", channel->channel);
465
466 efx_fini_eventq(channel); 466 efx_fini_eventq(channel);
467 } 467 }
468} 468}
@@ -1092,7 +1092,6 @@ static void efx_stop_all(struct efx_nic *efx)
1092 1092
1093 /* Isolate the MAC from the TX and RX engines, so that queue 1093 /* Isolate the MAC from the TX and RX engines, so that queue
1094 * flushes will complete in a timely fashion. */ 1094 * flushes will complete in a timely fashion. */
1095 falcon_deconfigure_mac_wrapper(efx);
1096 falcon_drain_tx_fifo(efx); 1095 falcon_drain_tx_fifo(efx);
1097 1096
1098 /* Stop the kernel transmit interface late, so the watchdog 1097 /* Stop the kernel transmit interface late, so the watchdog