Commit ab97a289 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 8b61fba5 e6a43910
...@@ -431,18 +431,18 @@ static int ef100_reset(struct efx_nic *efx, enum reset_type reset_type) ...@@ -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 /* A RESET_TYPE_ALL will cause filters to be removed, so we remove filters
* and reprobe after reset to avoid removing filters twice * and reprobe after reset to avoid removing filters twice
*/ */
down_read(&efx->filter_sem); down_write(&efx->filter_sem);
ef100_filter_table_down(efx); ef100_filter_table_down(efx);
up_read(&efx->filter_sem); up_write(&efx->filter_sem);
rc = efx_mcdi_reset(efx, reset_type); rc = efx_mcdi_reset(efx, reset_type);
if (rc) if (rc)
return rc; return rc;
netif_device_attach(efx->net_dev); netif_device_attach(efx->net_dev);
down_read(&efx->filter_sem); down_write(&efx->filter_sem);
rc = ef100_filter_table_up(efx); rc = ef100_filter_table_up(efx);
up_read(&efx->filter_sem); up_write(&efx->filter_sem);
if (rc) if (rc)
return rc; return rc;
...@@ -739,6 +739,7 @@ const struct efx_nic_type ef100_pf_nic_type = { ...@@ -739,6 +739,7 @@ const struct efx_nic_type ef100_pf_nic_type = {
.rx_remove = efx_mcdi_rx_remove, .rx_remove = efx_mcdi_rx_remove,
.rx_write = ef100_rx_write, .rx_write = ef100_rx_write,
.rx_packet = __ef100_rx_packet, .rx_packet = __ef100_rx_packet,
.rx_buf_hash_valid = ef100_rx_buf_hash_valid,
.fini_dmaq = efx_fini_dmaq, .fini_dmaq = efx_fini_dmaq,
.max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS, .max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS,
.filter_table_probe = ef100_filter_table_up, .filter_table_probe = ef100_filter_table_up,
...@@ -820,6 +821,7 @@ const struct efx_nic_type ef100_vf_nic_type = { ...@@ -820,6 +821,7 @@ const struct efx_nic_type ef100_vf_nic_type = {
.rx_remove = efx_mcdi_rx_remove, .rx_remove = efx_mcdi_rx_remove,
.rx_write = ef100_rx_write, .rx_write = ef100_rx_write,
.rx_packet = __ef100_rx_packet, .rx_packet = __ef100_rx_packet,
.rx_buf_hash_valid = ef100_rx_buf_hash_valid,
.fini_dmaq = efx_fini_dmaq, .fini_dmaq = efx_fini_dmaq,
.max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS, .max_rx_ip_filters = EFX_MCDI_FILTER_TBL_ROWS,
.filter_table_probe = ef100_filter_table_up, .filter_table_probe = ef100_filter_table_up,
......
...@@ -846,6 +846,7 @@ struct efx_async_filter_insertion { ...@@ -846,6 +846,7 @@ struct efx_async_filter_insertion {
* @timer_quantum_ns: Interrupt timer quantum, in nanoseconds * @timer_quantum_ns: Interrupt timer quantum, in nanoseconds
* @timer_max_ns: Interrupt timer maximum value, in nanoseconds * @timer_max_ns: Interrupt timer maximum value, in nanoseconds
* @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues * @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_mod_step_us: Step size for IRQ moderation for RX event queues
* @irq_rx_moderation_us: IRQ moderation time for RX event queues * @irq_rx_moderation_us: IRQ moderation time for RX event queues
* @msg_enable: Log message enable flags * @msg_enable: Log message enable flags
...@@ -1004,6 +1005,7 @@ struct efx_nic { ...@@ -1004,6 +1005,7 @@ struct efx_nic {
unsigned int timer_quantum_ns; unsigned int timer_quantum_ns;
unsigned int timer_max_ns; unsigned int timer_max_ns;
bool irq_rx_adaptive; bool irq_rx_adaptive;
bool irqs_hooked;
unsigned int irq_mod_step_us; unsigned int irq_mod_step_us;
unsigned int irq_rx_moderation_us; unsigned int irq_rx_moderation_us;
u32 msg_enable; u32 msg_enable;
......
...@@ -129,6 +129,7 @@ int efx_nic_init_interrupt(struct efx_nic *efx) ...@@ -129,6 +129,7 @@ int efx_nic_init_interrupt(struct efx_nic *efx)
#endif #endif
} }
efx->irqs_hooked = true;
return 0; return 0;
fail2: fail2:
...@@ -154,6 +155,8 @@ void efx_nic_fini_interrupt(struct efx_nic *efx) ...@@ -154,6 +155,8 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
efx->net_dev->rx_cpu_rmap = NULL; efx->net_dev->rx_cpu_rmap = NULL;
#endif #endif
if (!efx->irqs_hooked)
return;
if (EFX_INT_MODE_USE_MSI(efx)) { if (EFX_INT_MODE_USE_MSI(efx)) {
/* Disable MSI/MSI-X interrupts */ /* Disable MSI/MSI-X interrupts */
efx_for_each_channel(channel, efx) efx_for_each_channel(channel, efx)
...@@ -163,6 +166,7 @@ void efx_nic_fini_interrupt(struct efx_nic *efx) ...@@ -163,6 +166,7 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
/* Disable legacy interrupt */ /* Disable legacy interrupt */
free_irq(efx->legacy_irq, efx); free_irq(efx->legacy_irq, efx);
} }
efx->irqs_hooked = false;
} }
/* Register dump */ /* Register dump */
......
...@@ -849,6 +849,7 @@ void efx_remove_filters(struct efx_nic *efx) ...@@ -849,6 +849,7 @@ void efx_remove_filters(struct efx_nic *efx)
efx_for_each_channel(channel, efx) { efx_for_each_channel(channel, efx) {
cancel_delayed_work_sync(&channel->filter_work); cancel_delayed_work_sync(&channel->filter_work);
kfree(channel->rps_flow_id); kfree(channel->rps_flow_id);
channel->rps_flow_id = NULL;
} }
#endif #endif
down_write(&efx->filter_sem); down_write(&efx->filter_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment