sfc: Add support for sub-10G speeds
[linux-2.6/verdex.git] / drivers / net / sfc / selftest.h
blob252f7d71724297dd6e5f13470a928ada6137709a
1 /****************************************************************************
2 * Driver for Solarflare Solarstorm network controllers and boards
3 * Copyright 2005-2006 Fen Systems Ltd.
4 * Copyright 2006-2008 Solarflare Communications Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation, incorporated herein by reference.
9 */
11 #ifndef EFX_SELFTEST_H
12 #define EFX_SELFTEST_H
14 #include "net_driver.h"
17 * Self tests
20 struct efx_loopback_self_tests {
21 int tx_sent[EFX_TX_QUEUE_COUNT];
22 int tx_done[EFX_TX_QUEUE_COUNT];
23 int rx_good;
24 int rx_bad;
27 /* Efx self test results
28 * For fields which are not counters, 1 indicates success and -1
29 * indicates failure.
31 struct efx_self_tests {
32 /* online tests */
33 int mii;
34 int nvram;
35 int interrupt;
36 int eventq_dma[EFX_MAX_CHANNELS];
37 int eventq_int[EFX_MAX_CHANNELS];
38 int eventq_poll[EFX_MAX_CHANNELS];
39 /* offline tests */
40 int registers;
41 int phy;
42 struct efx_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
45 extern void efx_loopback_rx_packet(struct efx_nic *efx,
46 const char *buf_ptr, int pkt_len);
47 extern int efx_online_test(struct efx_nic *efx,
48 struct efx_self_tests *tests);
49 extern int efx_offline_test(struct efx_nic *efx,
50 struct efx_self_tests *tests,
51 unsigned int loopback_modes);
53 #endif /* EFX_SELFTEST_H */