aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-01-03 18:36:57 -0500
committerBen Hutchings <bhutchings@solarflare.com>2013-08-21 14:48:24 -0400
commit1840667a851efb5f719d2c76b235c172104722e8 (patch)
tree0fb8df706a5cf5e9e7d0f0afa74372b9783ca6b7 /drivers
parentd829118705f8213ffeffa4fefa8931dea6b7f016 (diff)
sfc: Limit scope of a Falcon A1 IRQ workaround
We unconditionally acknowledge legacy interrupts just before disabling them. This workaround is needed on Falcon A1 but probably not on later chips where the legacy interrupt mechanism is different. It was also originally done after the IRQ handler was removed, not before. Restore the original behaviour for Falcon A1 only by doing this acknowledgement in the efx_nic_type::fini operation. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/sfc/falcon.c4
-rw-r--r--drivers/net/ethernet/sfc/nic.c7
-rw-r--r--drivers/net/ethernet/sfc/nic.h1
3 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c
index f8de38243348..4492129cc8f9 100644
--- a/drivers/net/ethernet/sfc/falcon.c
+++ b/drivers/net/ethernet/sfc/falcon.c
@@ -336,7 +336,7 @@ static void falcon_prepare_flush(struct efx_nic *efx)
336 * 336 *
337 * NB most hardware supports MSI interrupts 337 * NB most hardware supports MSI interrupts
338 */ 338 */
339inline void falcon_irq_ack_a1(struct efx_nic *efx) 339static inline void falcon_irq_ack_a1(struct efx_nic *efx)
340{ 340{
341 efx_dword_t reg; 341 efx_dword_t reg;
342 342
@@ -2343,7 +2343,7 @@ const struct efx_nic_type falcon_a1_nic_type = {
2343 .remove = falcon_remove_nic, 2343 .remove = falcon_remove_nic,
2344 .init = falcon_init_nic, 2344 .init = falcon_init_nic,
2345 .dimension_resources = falcon_dimension_resources, 2345 .dimension_resources = falcon_dimension_resources,
2346 .fini = efx_port_dummy_op_void, 2346 .fini = falcon_irq_ack_a1,
2347 .monitor = falcon_monitor, 2347 .monitor = falcon_monitor,
2348 .map_reset_reason = falcon_map_reset_reason, 2348 .map_reset_reason = falcon_map_reset_reason,
2349 .map_reset_flags = falcon_map_reset_flags, 2349 .map_reset_flags = falcon_map_reset_flags,
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c
index c17d659f4525..2d0a584e1af2 100644
--- a/drivers/net/ethernet/sfc/nic.c
+++ b/drivers/net/ethernet/sfc/nic.c
@@ -1781,7 +1781,6 @@ int efx_nic_init_interrupt(struct efx_nic *efx)
1781void efx_nic_fini_interrupt(struct efx_nic *efx) 1781void efx_nic_fini_interrupt(struct efx_nic *efx)
1782{ 1782{
1783 struct efx_channel *channel; 1783 struct efx_channel *channel;
1784 efx_oword_t reg;
1785 1784
1786#ifdef CONFIG_RFS_ACCEL 1785#ifdef CONFIG_RFS_ACCEL
1787 free_irq_cpu_rmap(efx->net_dev->rx_cpu_rmap); 1786 free_irq_cpu_rmap(efx->net_dev->rx_cpu_rmap);
@@ -1792,12 +1791,6 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
1792 efx_for_each_channel(channel, efx) 1791 efx_for_each_channel(channel, efx)
1793 free_irq(channel->irq, &efx->msi_context[channel->channel]); 1792 free_irq(channel->irq, &efx->msi_context[channel->channel]);
1794 1793
1795 /* ACK legacy interrupt */
1796 if (efx_nic_rev(efx) >= EFX_REV_FALCON_B0)
1797 efx_reado(efx, &reg, FR_BZ_INT_ISR0);
1798 else
1799 falcon_irq_ack_a1(efx);
1800
1801 /* Disable legacy interrupt */ 1794 /* Disable legacy interrupt */
1802 if (efx->legacy_irq) 1795 if (efx->legacy_irq)
1803 free_irq(efx->legacy_irq, efx); 1796 free_irq(efx->legacy_irq, efx);
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index 9120e8b824e0..33aa120e3248 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -308,7 +308,6 @@ extern void efx_nic_disable_interrupts(struct efx_nic *efx);
308extern void efx_nic_fini_interrupt(struct efx_nic *efx); 308extern void efx_nic_fini_interrupt(struct efx_nic *efx);
309extern irqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx); 309extern irqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx);
310extern irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id); 310extern irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id);
311extern void falcon_irq_ack_a1(struct efx_nic *efx);
312 311
313static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel) 312static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel)
314{ 313{