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>
This commit is contained in:
committed by
Jeff Garzik
parent
92ade881b2
commit
6bc5d3a933
@@ -445,10 +445,17 @@ static void efx_fini_channels(struct efx_nic *efx)
|
||||
struct efx_channel *channel;
|
||||
struct efx_tx_queue *tx_queue;
|
||||
struct efx_rx_queue *rx_queue;
|
||||
int rc;
|
||||
|
||||
EFX_ASSERT_RESET_SERIALISED(efx);
|
||||
BUG_ON(efx->port_enabled);
|
||||
|
||||
rc = falcon_flush_queues(efx);
|
||||
if (rc)
|
||||
EFX_ERR(efx, "failed to flush queues\n");
|
||||
else
|
||||
EFX_LOG(efx, "successfully flushed all queues\n");
|
||||
|
||||
efx_for_each_channel(channel, efx) {
|
||||
EFX_LOG(channel->efx, "shut down chan %d\n", channel->channel);
|
||||
|
||||
@@ -456,13 +463,6 @@ static void efx_fini_channels(struct efx_nic *efx)
|
||||
efx_fini_rx_queue(rx_queue);
|
||||
efx_for_each_channel_tx_queue(tx_queue, channel)
|
||||
efx_fini_tx_queue(tx_queue);
|
||||
}
|
||||
|
||||
/* Do the event queues last so that we can handle flush events
|
||||
* for all DMA queues. */
|
||||
efx_for_each_channel(channel, efx) {
|
||||
EFX_LOG(channel->efx, "shut down evq %d\n", channel->channel);
|
||||
|
||||
efx_fini_eventq(channel);
|
||||
}
|
||||
}
|
||||
@@ -1092,7 +1092,6 @@ static void efx_stop_all(struct efx_nic *efx)
|
||||
|
||||
/* Isolate the MAC from the TX and RX engines, so that queue
|
||||
* flushes will complete in a timely fashion. */
|
||||
falcon_deconfigure_mac_wrapper(efx);
|
||||
falcon_drain_tx_fifo(efx);
|
||||
|
||||
/* Stop the kernel transmit interface late, so the watchdog
|
||||
|
Reference in New Issue
Block a user