summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorAlexandre Rames <arames@solarflare.com>2013-06-10 11:03:21 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-08-29 18:12:13 +0100
commit3881d8ab065b23bb07400aa820e737d80fdaced3 (patch)
tree646f9543591f8cfcf20d40e1cdb0d7046f9fa9cc /drivers/net/ethernet/sfc/efx.c
parente8c68c0a09279107b5b239ca6fa7c5839717b7e2 (diff)
downloadlwn-3881d8ab065b23bb07400aa820e737d80fdaced3.tar.gz
lwn-3881d8ab065b23bb07400aa820e737d80fdaced3.zip
sfc: Use a global count of active queues instead of pending drains
On EF10, the firmware will initiate a queue flush in certain error cases. We need to accept that flush events might appear at any time after a queue has been initialised, not just when we try to flush them. We can handle Falcon-architecture in just the same way. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index b4832230d744..34788fbb4c66 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -631,11 +631,14 @@ static void efx_start_datapath(struct efx_nic *efx)
/* Initialise the channels */
efx_for_each_channel(channel, efx) {
- efx_for_each_channel_tx_queue(tx_queue, channel)
+ efx_for_each_channel_tx_queue(tx_queue, channel) {
efx_init_tx_queue(tx_queue);
+ atomic_inc(&efx->active_queues);
+ }
efx_for_each_channel_rx_queue(rx_queue, channel) {
efx_init_rx_queue(rx_queue);
+ atomic_inc(&efx->active_queues);
efx_nic_generate_fill_event(rx_queue);
}