aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.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/efx.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/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 00e13ab080e6..7683e53fda1d 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -25,6 +25,7 @@
25#include "net_driver.h" 25#include "net_driver.h"
26#include "efx.h" 26#include "efx.h"
27#include "nic.h" 27#include "nic.h"
28#include "selftest.h"
28 29
29#include "mcdi.h" 30#include "mcdi.h"
30#include "workarounds.h" 31#include "workarounds.h"
@@ -1564,8 +1565,9 @@ static void efx_start_all(struct efx_nic *efx)
1564 * since we're holding the rtnl_lock at this point. */ 1565 * since we're holding the rtnl_lock at this point. */
1565static void efx_flush_all(struct efx_nic *efx) 1566static void efx_flush_all(struct efx_nic *efx)
1566{ 1567{
1567 /* Make sure the hardware monitor is stopped */ 1568 /* Make sure the hardware monitor and event self-test are stopped */
1568 cancel_delayed_work_sync(&efx->monitor_work); 1569 cancel_delayed_work_sync(&efx->monitor_work);
1570 efx_selftest_async_cancel(efx);
1569 /* Stop scheduled port reconfigurations */ 1571 /* Stop scheduled port reconfigurations */
1570 cancel_work_sync(&efx->mac_work); 1572 cancel_work_sync(&efx->mac_work);
1571} 1573}
@@ -1825,6 +1827,7 @@ static int efx_net_open(struct net_device *net_dev)
1825 efx_link_status_changed(efx); 1827 efx_link_status_changed(efx);
1826 1828
1827 efx_start_all(efx); 1829 efx_start_all(efx);
1830 efx_selftest_async_start(efx);
1828 return 0; 1831 return 0;
1829} 1832}
1830 1833
@@ -2375,6 +2378,7 @@ static int efx_init_struct(struct efx_nic *efx, const struct efx_nic_type *type,
2375#endif 2378#endif
2376 INIT_WORK(&efx->reset_work, efx_reset_work); 2379 INIT_WORK(&efx->reset_work, efx_reset_work);
2377 INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor); 2380 INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor);
2381 INIT_DELAYED_WORK(&efx->selftest_work, efx_selftest_async_work);
2378 efx->pci_dev = pci_dev; 2382 efx->pci_dev = pci_dev;
2379 efx->msg_enable = debug; 2383 efx->msg_enable = debug;
2380 efx->state = STATE_INIT; 2384 efx->state = STATE_INIT;