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>
This commit is contained in:
parent
ab3b825060
commit
be3fc09cdd
2 changed files with 7 additions and 0 deletions
|
@ -339,6 +339,7 @@ static void efx_init_eventq(struct efx_channel *channel)
|
||||||
channel->eventq_read_ptr = 0;
|
channel->eventq_read_ptr = 0;
|
||||||
|
|
||||||
efx_nic_init_eventq(channel);
|
efx_nic_init_eventq(channel);
|
||||||
|
channel->eventq_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable event queue processing and NAPI */
|
/* 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)
|
static void efx_fini_eventq(struct efx_channel *channel)
|
||||||
{
|
{
|
||||||
|
if (!channel->eventq_init)
|
||||||
|
return;
|
||||||
|
|
||||||
netif_dbg(channel->efx, drv, channel->efx->net_dev,
|
netif_dbg(channel->efx, drv, channel->efx->net_dev,
|
||||||
"chan %d fini event queue\n", channel->channel);
|
"chan %d fini event queue\n", channel->channel);
|
||||||
|
|
||||||
efx_nic_fini_eventq(channel);
|
efx_nic_fini_eventq(channel);
|
||||||
|
channel->eventq_init = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void efx_remove_eventq(struct efx_channel *channel)
|
static void efx_remove_eventq(struct efx_channel *channel)
|
||||||
|
|
|
@ -356,6 +356,7 @@ enum efx_rx_alloc_method {
|
||||||
* @efx: Associated Efx NIC
|
* @efx: Associated Efx NIC
|
||||||
* @channel: Channel instance number
|
* @channel: Channel instance number
|
||||||
* @type: Channel type definition
|
* @type: Channel type definition
|
||||||
|
* @eventq_init: Event queue initialised flag
|
||||||
* @enabled: Channel enabled indicator
|
* @enabled: Channel enabled indicator
|
||||||
* @irq: IRQ number (MSI and MSI-X only)
|
* @irq: IRQ number (MSI and MSI-X only)
|
||||||
* @irq_moderation: IRQ moderation value (in hardware ticks)
|
* @irq_moderation: IRQ moderation value (in hardware ticks)
|
||||||
|
@ -387,6 +388,7 @@ struct efx_channel {
|
||||||
struct efx_nic *efx;
|
struct efx_nic *efx;
|
||||||
int channel;
|
int channel;
|
||||||
const struct efx_channel_type *type;
|
const struct efx_channel_type *type;
|
||||||
|
bool eventq_init;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
int irq;
|
int irq;
|
||||||
unsigned int irq_moderation;
|
unsigned int irq_moderation;
|
||||||
|
|
Loading…
Add table
Reference in a new issue