Merge branch 'sfc-more-EF100-fixes'
Edward Cree says: ==================== sfc: more EF100 fixes Fix up some bugs in the initial EF100 submission, and re-fix the hash_valid fix which was incomplete. The reset bugs are currently hard to trigger; they were found with an in-progress patch adding ethtool support, whereby ethtool --reset reliably reproduces them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
ab97a28908
|
@ -431,18 +431,18 @@ static int ef100_reset(struct efx_nic *efx, enum reset_type reset_type)
|
|||
/* A RESET_TYPE_ALL will cause filters to be removed, so we remove filters
|
||||
* and reprobe after reset to avoid removing filters twice
|
||||
*/
|
||||
down_read(&efx->filter_sem);
|
||||
down_write(&efx->filter_sem);
|
||||
ef100_filter_table_down(efx);
|
||||
up_read(&efx->filter_sem);
|
||||
up_write(&efx->filter_sem);
|
||||
rc = efx_mcdi_reset(efx, reset_type);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
netif_device_attach(efx->net_dev);
|
||||
|
||||
down_read(&efx->filter_sem);
|
||||
down_write(&efx->filter_sem);
|
||||
rc = ef100_filter_table_up(efx);
|
||||
up_read(&efx->filter_sem);
|
||||
up_write(&efx->filter_sem);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
|
@ -739,6 +739,7 @@ const struct efx_nic_type ef100_pf_nic_type = {
|
|||
.rx_remove = efx_mcdi_rx_remove,
|
||||
.rx_write = ef100_rx_write,
|
||||
.rx_packet = __ef100_rx_packet,
|
||||
.rx_buf_hash_valid = ef100_rx_buf_hash_valid,
|
||||
.fini_dmaq = efx_fini_dmaq,
|
||||
.max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS,
|
||||
.filter_table_probe = ef100_filter_table_up,
|
||||
|
@ -820,6 +821,7 @@ const struct efx_nic_type ef100_vf_nic_type = {
|
|||
.rx_remove = efx_mcdi_rx_remove,
|
||||
.rx_write = ef100_rx_write,
|
||||
.rx_packet = __ef100_rx_packet,
|
||||
.rx_buf_hash_valid = ef100_rx_buf_hash_valid,
|
||||
.fini_dmaq = efx_fini_dmaq,
|
||||
.max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS,
|
||||
.filter_table_probe = ef100_filter_table_up,
|
||||
|
|
|
@ -846,6 +846,7 @@ struct efx_async_filter_insertion {
|
|||
* @timer_quantum_ns: Interrupt timer quantum, in nanoseconds
|
||||
* @timer_max_ns: Interrupt timer maximum value, in nanoseconds
|
||||
* @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues
|
||||
* @irqs_hooked: Channel interrupts are hooked
|
||||
* @irq_rx_mod_step_us: Step size for IRQ moderation for RX event queues
|
||||
* @irq_rx_moderation_us: IRQ moderation time for RX event queues
|
||||
* @msg_enable: Log message enable flags
|
||||
|
@ -1004,6 +1005,7 @@ struct efx_nic {
|
|||
unsigned int timer_quantum_ns;
|
||||
unsigned int timer_max_ns;
|
||||
bool irq_rx_adaptive;
|
||||
bool irqs_hooked;
|
||||
unsigned int irq_mod_step_us;
|
||||
unsigned int irq_rx_moderation_us;
|
||||
u32 msg_enable;
|
||||
|
|
|
@ -129,6 +129,7 @@ int efx_nic_init_interrupt(struct efx_nic *efx)
|
|||
#endif
|
||||
}
|
||||
|
||||
efx->irqs_hooked = true;
|
||||
return 0;
|
||||
|
||||
fail2:
|
||||
|
@ -154,6 +155,8 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
|
|||
efx->net_dev->rx_cpu_rmap = NULL;
|
||||
#endif
|
||||
|
||||
if (!efx->irqs_hooked)
|
||||
return;
|
||||
if (EFX_INT_MODE_USE_MSI(efx)) {
|
||||
/* Disable MSI/MSI-X interrupts */
|
||||
efx_for_each_channel(channel, efx)
|
||||
|
@ -163,6 +166,7 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
|
|||
/* Disable legacy interrupt */
|
||||
free_irq(efx->legacy_irq, efx);
|
||||
}
|
||||
efx->irqs_hooked = false;
|
||||
}
|
||||
|
||||
/* Register dump */
|
||||
|
|
|
@ -849,6 +849,7 @@ void efx_remove_filters(struct efx_nic *efx)
|
|||
efx_for_each_channel(channel, efx) {
|
||||
cancel_delayed_work_sync(&channel->filter_work);
|
||||
kfree(channel->rps_flow_id);
|
||||
channel->rps_flow_id = NULL;
|
||||
}
|
||||
#endif
|
||||
down_write(&efx->filter_sem);
|
||||
|
|
Загрузка…
Ссылка в новой задаче