aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-02-28 18:37:35 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-03-06 13:14:15 -0500
commiteee6f6a9e0c83811de77a137989d4a3289e297cc (patch)
tree88f5a56b976c0c26177eeaf2b0f115e9153b92d1 /drivers/net/ethernet/sfc/nic.c
parented74f48087d1b1cf7cf534dad03bf1584eee783d (diff)
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.c8
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)
1332} 1332}
1333 1333
1334 1334
1335void efx_nic_generate_test_event(struct efx_channel *channel) 1335void efx_nic_event_test_start(struct efx_channel *channel)
1336{ 1336{
1337 channel->last_irq_cpu = -1;
1338 smp_wmb();
1337 efx_magic_event(channel, EFX_CHANNEL_MAGIC_TEST(channel)); 1339 efx_magic_event(channel, EFX_CHANNEL_MAGIC_TEST(channel));
1338} 1340}
1339 1341
@@ -1382,8 +1384,10 @@ void efx_nic_disable_interrupts(struct efx_nic *efx)
1382 * Interrupt must already have been enabled, otherwise nasty things 1384 * Interrupt must already have been enabled, otherwise nasty things
1383 * may happen. 1385 * may happen.
1384 */ 1386 */
1385void efx_nic_generate_interrupt(struct efx_nic *efx) 1387void efx_nic_irq_test_start(struct efx_nic *efx)
1386{ 1388{
1389 efx->last_irq_cpu = -1;
1390 smp_wmb();
1387 efx_nic_interrupts(efx, true, true); 1391 efx_nic_interrupts(efx, true, true);
1388} 1392}
1389 1393