1
2
3
4
5
6
7
8 #ifndef EFX_SELFTEST_H
9 #define EFX_SELFTEST_H
10
11 #include "net_driver.h"
12
13
14
15
16
17 struct efx_loopback_self_tests {
18 int tx_sent[EFX_TXQ_TYPES];
19 int tx_done[EFX_TXQ_TYPES];
20 int rx_good;
21 int rx_bad;
22 };
23
24 #define EFX_MAX_PHY_TESTS 20
25
26
27
28
29
30 struct efx_self_tests {
31
32 int phy_alive;
33 int nvram;
34 int interrupt;
35 int eventq_dma[EFX_MAX_CHANNELS];
36 int eventq_int[EFX_MAX_CHANNELS];
37
38 int memory;
39 int registers;
40 int phy_ext[EFX_MAX_PHY_TESTS];
41 struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
42 };
43
44 void efx_loopback_rx_packet(struct efx_nic *efx, const char *buf_ptr,
45 int pkt_len);
46 int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
47 unsigned flags);
48 void efx_selftest_async_start(struct efx_nic *efx);
49 void efx_selftest_async_cancel(struct efx_nic *efx);
50 void efx_selftest_async_work(struct work_struct *data);
51
52 #endif