diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-02-28 23:37:35 +0000 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-03-06 18:14:15 +0000 |
commit | eee6f6a9e0c83811de77a137989d4a3289e297cc (patch) | |
tree | 88f5a56b976c0c26177eeaf2b0f115e9153b92d1 /drivers/net/ethernet/sfc/nic.c | |
parent | ed74f48087d1b1cf7cf534dad03bf1584eee783d (diff) | |
download | linux-eee6f6a9e0c83811de77a137989d4a3289e297cc.tar.bz2 |
sfc: Encapsulate access to efx_{channel,nic}::last_irq_cpu in self-test
Cleanup in preparation for doing an event test on ifup.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.c')
-rw-r--r-- | drivers/net/ethernet/sfc/nic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index 5da8af5e7501..4c47b7569145 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c @@ -1332,8 +1332,10 @@ void efx_nic_remove_eventq(struct efx_channel *channel) } -void efx_nic_generate_test_event(struct efx_channel *channel) +void efx_nic_event_test_start(struct efx_channel *channel) { + channel->last_irq_cpu = -1; + smp_wmb(); efx_magic_event(channel, EFX_CHANNEL_MAGIC_TEST(channel)); } @@ -1382,8 +1384,10 @@ void efx_nic_disable_interrupts(struct efx_nic *efx) * Interrupt must already have been enabled, otherwise nasty things * may happen. */ -void efx_nic_generate_interrupt(struct efx_nic *efx) +void efx_nic_irq_test_start(struct efx_nic *efx) { + efx->last_irq_cpu = -1; + smp_wmb(); efx_nic_interrupts(efx, true, true); } |