diff options
author | Alexandre Rames <arames@solarflare.com> | 2013-06-10 11:03:21 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-29 18:12:13 +0100 |
commit | 3881d8ab065b23bb07400aa820e737d80fdaced3 (patch) | |
tree | 646f9543591f8cfcf20d40e1cdb0d7046f9fa9cc /drivers/net/ethernet/sfc/efx.c | |
parent | e8c68c0a09279107b5b239ca6fa7c5839717b7e2 (diff) | |
download | lwn-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.c | 5 |
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); } |