x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / drivers / net / ethernet / sfc / falcon / selftest.h
blobbe52a49c006ae0492c8568ee72a71f86d00f23a6
1 /****************************************************************************
2 * Driver for Solarflare network controllers and boards
3 * Copyright 2005-2006 Fen Systems Ltd.
4 * Copyright 2006-2012 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 EF4_SELFTEST_H
12 #define EF4_SELFTEST_H
14 #include "net_driver.h"
17 * Self tests
20 struct ef4_loopback_self_tests {
21 int tx_sent[EF4_TXQ_TYPES];
22 int tx_done[EF4_TXQ_TYPES];
23 int rx_good;
24 int rx_bad;
27 #define EF4_MAX_PHY_TESTS 20
29 /* Efx self test results
30 * For fields which are not counters, 1 indicates success and -1
31 * indicates failure; 0 indicates test could not be run.
33 struct ef4_self_tests {
34 /* online tests */
35 int phy_alive;
36 int nvram;
37 int interrupt;
38 int eventq_dma[EF4_MAX_CHANNELS];
39 int eventq_int[EF4_MAX_CHANNELS];
40 /* offline tests */
41 int memory;
42 int registers;
43 int phy_ext[EF4_MAX_PHY_TESTS];
44 struct ef4_loopback_self_tests loopback[LOOPBACK_TEST_MAX + 1];
47 void ef4_loopback_rx_packet(struct ef4_nic *efx, const char *buf_ptr,
48 int pkt_len);
49 int ef4_selftest(struct ef4_nic *efx, struct ef4_self_tests *tests,
50 unsigned flags);
51 void ef4_selftest_async_start(struct ef4_nic *efx);
52 void ef4_selftest_async_cancel(struct ef4_nic *efx);
53 void ef4_selftest_async_work(struct work_struct *data);
55 #endif /* EF4_SELFTEST_H */