aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-02-28 18:40:21 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-03-06 13:14:15 -0500
commitdd40781e3a4e9d3177a548c389232ee9496dae8e (patch)
tree6308028fab5fa47ec105eb77888e3cc8a59b4323 /drivers/net/ethernet/sfc/nic.c
parenteee6f6a9e0c83811de77a137989d4a3289e297cc (diff)
sfc: Run event/IRQ self-test asynchronously when interface is brought up
Generate a test event on each event queue whenever the interface is brought up, then after 1 second check that we have either handled a test event or handled another IRQ for each event queue. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c
index 4c47b7569145..4a9a5beec8fc 100644
--- a/drivers/net/ethernet/sfc/nic.c
+++ b/drivers/net/ethernet/sfc/nic.c
@@ -1083,7 +1083,7 @@ efx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)
1083 code = _EFX_CHANNEL_MAGIC_CODE(magic); 1083 code = _EFX_CHANNEL_MAGIC_CODE(magic);
1084 1084
1085 if (magic == EFX_CHANNEL_MAGIC_TEST(channel)) { 1085 if (magic == EFX_CHANNEL_MAGIC_TEST(channel)) {
1086 /* ignore */ 1086 channel->event_test_cpu = raw_smp_processor_id();
1087 } else if (rx_queue && magic == EFX_CHANNEL_MAGIC_FILL(rx_queue)) { 1087 } else if (rx_queue && magic == EFX_CHANNEL_MAGIC_FILL(rx_queue)) {
1088 /* The queue must be empty, so we won't receive any rx 1088 /* The queue must be empty, so we won't receive any rx
1089 * events, so efx_process_channel() won't refill the 1089 * events, so efx_process_channel() won't refill the
@@ -1334,7 +1334,7 @@ void efx_nic_remove_eventq(struct efx_channel *channel)
1334 1334
1335void efx_nic_event_test_start(struct efx_channel *channel) 1335void efx_nic_event_test_start(struct efx_channel *channel)
1336{ 1336{
1337 channel->last_irq_cpu = -1; 1337 channel->event_test_cpu = -1;
1338 smp_wmb(); 1338 smp_wmb();
1339 efx_magic_event(channel, EFX_CHANNEL_MAGIC_TEST(channel)); 1339 efx_magic_event(channel, EFX_CHANNEL_MAGIC_TEST(channel));
1340} 1340}