0001
0002
0003
0004
0005
0006
0007
0008 #ifndef EFX_SELFTEST_H
0009 #define EFX_SELFTEST_H
0010
0011 #include "net_driver.h"
0012
0013
0014
0015
0016
0017 struct efx_loopback_self_tests {
0018 int tx_sent[EFX_MAX_TXQ_PER_CHANNEL];
0019 int tx_done[EFX_MAX_TXQ_PER_CHANNEL];
0020 int rx_good;
0021 int rx_bad;
0022 };
0023
0024 #define EFX_MAX_PHY_TESTS 20
0025
0026
0027
0028
0029
0030 struct efx_self_tests {
0031
0032 int phy_alive;
0033 int nvram;
0034 int interrupt;
0035 int eventq_dma[EFX_MAX_CHANNELS];
0036 int eventq_int[EFX_MAX_CHANNELS];
0037
0038 int memory;
0039 int registers;
0040 int phy_ext[EFX_MAX_PHY_TESTS];
0041 struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
0042 };
0043
0044 void efx_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr,
0045 int pkt_len);
0046 int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
0047 unsigned flags);
0048 void efx_selftest_async_init(struct efx_nic *efx);
0049 void efx_selftest_async_start(struct efx_nic *efx);
0050 void efx_selftest_async_cancel(struct efx_nic *efx);
0051
0052 #endif