Commit 1f3559e7 authored by Stuart Hodgson's avatar Stuart Hodgson Committed by Ben Hutchings

sfc: Do not attempt to flush queues if DMA is disabled

[ Upstream commit 3dca9d2d ]

efx_nic_fatal_interrupt() disables DMA before scheduling a reset.
After this, we need not and *cannot* flush queues.
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 0d14440d
......@@ -650,12 +650,16 @@ 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;
struct pci_dev *dev = efx->pci_dev;
int rc;
EFX_ASSERT_RESET_SERIALISED(efx);
BUG_ON(efx->port_enabled);
/* Only perform flush if dma is enabled */
if (dev->is_busmaster) {
rc = efx_nic_flush_queues(efx);
if (rc && EFX_WORKAROUND_7803(efx)) {
/* Schedule a reset to recover from the flush failure. The
* descriptor caches reference memory we're about to free,
......@@ -670,6 +674,7 @@ static void efx_fini_channels(struct efx_nic *efx)
netif_dbg(efx, drv, efx->net_dev,
"successfully flushed all queues\n");
}
}
efx_for_each_channel(channel, efx) {
netif_dbg(channel->efx, drv, channel->efx->net_dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment