]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
sfc: Limit scope of a Falcon A1 IRQ workaround
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 3 Jan 2013 23:36:57 +0000 (23:36 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Wed, 21 Aug 2013 18:48:24 +0000 (19:48 +0100)
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>
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/nic.c
drivers/net/ethernet/sfc/nic.h

index f8de3824334845470722ea0533a743a2e2eae2dc..4492129cc8f94a9d25785e7b947b6236f37fa352 100644 (file)
@@ -336,7 +336,7 @@ static void falcon_prepare_flush(struct efx_nic *efx)
  *
  * NB most hardware supports MSI interrupts
  */
-inline void falcon_irq_ack_a1(struct efx_nic *efx)
+static inline void falcon_irq_ack_a1(struct efx_nic *efx)
 {
        efx_dword_t reg;
 
@@ -2343,7 +2343,7 @@ const struct efx_nic_type falcon_a1_nic_type = {
        .remove = falcon_remove_nic,
        .init = falcon_init_nic,
        .dimension_resources = falcon_dimension_resources,
-       .fini = efx_port_dummy_op_void,
+       .fini = falcon_irq_ack_a1,
        .monitor = falcon_monitor,
        .map_reset_reason = falcon_map_reset_reason,
        .map_reset_flags = falcon_map_reset_flags,
index c17d659f4525827c13de473e3a056539777a3560..2d0a584e1af2d5572880749e85875d352a50f6f0 100644 (file)
@@ -1781,7 +1781,6 @@ int efx_nic_init_interrupt(struct efx_nic *efx)
 void efx_nic_fini_interrupt(struct efx_nic *efx)
 {
        struct efx_channel *channel;
-       efx_oword_t reg;
 
 #ifdef CONFIG_RFS_ACCEL
        free_irq_cpu_rmap(efx->net_dev->rx_cpu_rmap);
@@ -1792,12 +1791,6 @@ void efx_nic_fini_interrupt(struct efx_nic *efx)
        efx_for_each_channel(channel, efx)
                free_irq(channel->irq, &efx->msi_context[channel->channel]);
 
-       /* ACK legacy interrupt */
-       if (efx_nic_rev(efx) >= EFX_REV_FALCON_B0)
-               efx_reado(efx, &reg, FR_BZ_INT_ISR0);
-       else
-               falcon_irq_ack_a1(efx);
-
        /* Disable legacy interrupt */
        if (efx->legacy_irq)
                free_irq(efx->legacy_irq, efx);
index 9120e8b824e0ec0b6759b73bd25c663a9d0396ad..33aa120e32483d015c3264c88c49fd9b8e83559d 100644 (file)
@@ -308,7 +308,6 @@ extern void efx_nic_disable_interrupts(struct efx_nic *efx);
 extern void efx_nic_fini_interrupt(struct efx_nic *efx);
 extern irqreturn_t efx_nic_fatal_interrupt(struct efx_nic *efx);
 extern irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id);
-extern void falcon_irq_ack_a1(struct efx_nic *efx);
 
 static inline int efx_nic_event_test_irq_cpu(struct efx_channel *channel)
 {