1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /****************************************************************************
3 * Driver for Solarflare network controllers and boards
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2012 Solarflare Communications Inc.
11 #include "net_driver.h"
17 struct efx_loopback_self_tests
{
18 int tx_sent
[EFX_TXQ_TYPES
];
19 int tx_done
[EFX_TXQ_TYPES
];
24 #define EFX_MAX_PHY_TESTS 20
26 /* Efx self test results
27 * For fields which are not counters, 1 indicates success and -1
28 * indicates failure; 0 indicates test could not be run.
30 struct efx_self_tests
{
35 int eventq_dma
[EFX_MAX_CHANNELS
];
36 int eventq_int
[EFX_MAX_CHANNELS
];
40 int phy_ext
[EFX_MAX_PHY_TESTS
];
41 struct efx_loopback_self_tests loopback
[LOOPBACK_TEST_MAX
+ 1];
44 void efx_loopback_rx_packet(struct efx_nic
*efx
, const char *buf_ptr
,
46 int efx_selftest(struct efx_nic
*efx
, struct efx_self_tests
*tests
,
48 void efx_selftest_async_init(struct efx_nic
*efx
);
49 void efx_selftest_async_start(struct efx_nic
*efx
);
50 void efx_selftest_async_cancel(struct efx_nic
*efx
);
52 #endif /* EFX_SELFTEST_H */