summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/selftest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/selftest.c')
-rw-r--r--drivers/net/ethernet/sfc/selftest.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index e4b4c8a3abc6..aa4ab53cac57 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -149,11 +149,7 @@ static int efx_test_interrupts(struct efx_nic *efx,
netif_dbg(efx, drv, efx->net_dev, "testing interrupts\n");
tests->interrupt = -1;
- /* Reset interrupt flag */
- efx->last_irq_cpu = -1;
- smp_wmb();
-
- efx_nic_generate_interrupt(efx);
+ efx_nic_irq_test_start(efx);
timeout = jiffies + IRQ_TIMEOUT;
wait = 1;
@@ -161,7 +157,7 @@ static int efx_test_interrupts(struct efx_nic *efx,
netif_dbg(efx, drv, efx->net_dev, "waiting for test interrupt\n");
do {
schedule_timeout_uninterruptible(wait);
- cpu = ACCESS_ONCE(efx->last_irq_cpu);
+ cpu = efx_nic_irq_test_irq_cpu(efx);
if (cpu >= 0)
goto success;
wait *= 2;
@@ -192,9 +188,7 @@ static int efx_test_eventq_irq(struct efx_nic *efx,
read_ptr[channel->channel] = channel->eventq_read_ptr;
set_bit(channel->channel, &dma_pend);
set_bit(channel->channel, &int_pend);
- channel->last_irq_cpu = -1;
- smp_wmb();
- efx_nic_generate_test_event(channel);
+ efx_nic_event_test_start(channel);
}
timeout = jiffies + IRQ_TIMEOUT;
@@ -216,7 +210,7 @@ static int efx_test_eventq_irq(struct efx_nic *efx,
} else {
if (efx_nic_event_present(channel))
clear_bit(channel->channel, &dma_pend);
- if (ACCESS_ONCE(channel->last_irq_cpu) >= 0)
+ if (efx_nic_event_test_irq_cpu(channel) >= 0)
clear_bit(channel->channel, &int_pend);
}
napi_enable(&channel->napi_str);