0001
0002
0003
0004
0005
0006
0007
0008 #ifndef EF4_SELFTEST_H
0009 #define EF4_SELFTEST_H
0010
0011 #include "net_driver.h"
0012
0013
0014
0015
0016
0017 struct ef4_loopback_self_tests {
0018 int tx_sent[EF4_TXQ_TYPES];
0019 int tx_done[EF4_TXQ_TYPES];
0020 int rx_good;
0021 int rx_bad;
0022 };
0023
0024 #define EF4_MAX_PHY_TESTS 20
0025
0026
0027
0028
0029
0030 struct ef4_self_tests {
0031
0032 int phy_alive;
0033 int nvram;
0034 int interrupt;
0035 int eventq_dma[EF4_MAX_CHANNELS];
0036 int eventq_int[EF4_MAX_CHANNELS];
0037
0038 int memory;
0039 int registers;
0040 int phy_ext[EF4_MAX_PHY_TESTS];
0041 struct ef4_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
0042 };
0043
0044 void ef4_loopback_rx_packet(struct ef4_nic *efx, const char *buf_ptr,
0045 int pkt_len);
0046 int ef4_selftest(struct ef4_nic *efx, struct ef4_self_tests *tests,
0047 unsigned flags);
0048 void ef4_selftest_async_start(struct ef4_nic *efx);
0049 void ef4_selftest_async_cancel(struct ef4_nic *efx);
0050 void ef4_selftest_async_work(struct work_struct *data);
0051
0052 #endif