summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-10-08 18:21:51 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-08-21 20:20:45 +0100
commitbe3fc09cdd4aca438613b1d50d00afa77e9b2046 (patch)
tree85445ebbceb5af8c1faa7deaf7b545f11c82cc93 /drivers/net/ethernet/sfc/efx.c
parentab3b82506046c0038e46bb793591b9a758835645 (diff)
sfc: Do not assume efx_nic_type::ev_fini is idempotent
efx_fini_eventq() needs to be idempotent but EF10 firmware is picky about queue states. 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, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 3977926e77c3..49d06ca79d7d 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -339,6 +339,7 @@ static void efx_init_eventq(struct efx_channel *channel)
channel->eventq_read_ptr = 0;
efx_nic_init_eventq(channel);
+ channel->eventq_init = true;
}
/* Enable event queue processing and NAPI */
@@ -367,10 +368,14 @@ static void efx_stop_eventq(struct efx_channel *channel)
static void efx_fini_eventq(struct efx_channel *channel)
{
+ if (!channel->eventq_init)
+ return;
+
netif_dbg(channel->efx, drv, channel->efx->net_dev,
"chan %d fini event queue\n", channel->channel);
efx_nic_fini_eventq(channel);
+ channel->eventq_init = false;
}
static void efx_remove_eventq(struct efx_channel *channel)