diff options
Diffstat (limited to 'drivers/net/chelsio/ch_ethtool.h')
-rw-r--r-- | drivers/net/chelsio/ch_ethtool.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/drivers/net/chelsio/ch_ethtool.h b/drivers/net/chelsio/ch_ethtool.h new file mode 100644 index 000000000000..c523d24836b5 --- /dev/null +++ b/drivers/net/chelsio/ch_ethtool.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /***************************************************************************** | ||
2 | * * | ||
3 | * File: ch_ethtool.h * | ||
4 | * $Revision: 1.5 $ * | ||
5 | * $Date: 2005/03/23 07:15:58 $ * | ||
6 | * Description: * | ||
7 | * part of the Chelsio 10Gb Ethernet Driver. * | ||
8 | * * | ||
9 | * This program is free software; you can redistribute it and/or modify * | ||
10 | * it under the terms of the GNU General Public License, version 2, as * | ||
11 | * published by the Free Software Foundation. * | ||
12 | * * | ||
13 | * You should have received a copy of the GNU General Public License along * | ||
14 | * with this program; if not, write to the Free Software Foundation, Inc., * | ||
15 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | ||
16 | * * | ||
17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * | ||
18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * | ||
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * | ||
20 | * * | ||
21 | * http://www.chelsio.com * | ||
22 | * * | ||
23 | * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. * | ||
24 | * All rights reserved. * | ||
25 | * * | ||
26 | * Maintainers: maintainers@chelsio.com * | ||
27 | * * | ||
28 | * Authors: Dimitrios Michailidis <dm@chelsio.com> * | ||
29 | * Tina Yang <tainay@chelsio.com> * | ||
30 | * Felix Marti <felix@chelsio.com> * | ||
31 | * Scott Bardone <sbardone@chelsio.com> * | ||
32 | * Kurt Ottaway <kottaway@chelsio.com> * | ||
33 | * Frank DiMambro <frank@chelsio.com> * | ||
34 | * * | ||
35 | * History: * | ||
36 | * * | ||
37 | ****************************************************************************/ | ||
38 | |||
39 | #ifndef __CHETHTOOL_LINUX_H__ | ||
40 | #define __CHETHTOOL_LINUX_H__ | ||
41 | |||
42 | /* TCB size in 32-bit words */ | ||
43 | #define TCB_WORDS (TCB_SIZE / 4) | ||
44 | |||
45 | enum { | ||
46 | ETHTOOL_SETREG, | ||
47 | ETHTOOL_GETREG, | ||
48 | ETHTOOL_SETTPI, | ||
49 | ETHTOOL_GETTPI, | ||
50 | ETHTOOL_DEVUP, | ||
51 | ETHTOOL_GETMTUTAB, | ||
52 | ETHTOOL_SETMTUTAB, | ||
53 | ETHTOOL_GETMTU, | ||
54 | ETHTOOL_SET_PM, | ||
55 | ETHTOOL_GET_PM, | ||
56 | ETHTOOL_GET_TCAM, | ||
57 | ETHTOOL_SET_TCAM, | ||
58 | ETHTOOL_GET_TCB, | ||
59 | ETHTOOL_READ_TCAM_WORD, | ||
60 | }; | ||
61 | |||
62 | struct ethtool_reg { | ||
63 | uint32_t cmd; | ||
64 | uint32_t addr; | ||
65 | uint32_t val; | ||
66 | }; | ||
67 | |||
68 | struct ethtool_mtus { | ||
69 | uint32_t cmd; | ||
70 | uint16_t mtus[NMTUS]; | ||
71 | }; | ||
72 | |||
73 | struct ethtool_pm { | ||
74 | uint32_t cmd; | ||
75 | uint32_t tx_pg_sz; | ||
76 | uint32_t tx_num_pg; | ||
77 | uint32_t rx_pg_sz; | ||
78 | uint32_t rx_num_pg; | ||
79 | uint32_t pm_total; | ||
80 | }; | ||
81 | |||
82 | struct ethtool_tcam { | ||
83 | uint32_t cmd; | ||
84 | uint32_t tcam_size; | ||
85 | uint32_t nservers; | ||
86 | uint32_t nroutes; | ||
87 | }; | ||
88 | |||
89 | struct ethtool_tcb { | ||
90 | uint32_t cmd; | ||
91 | uint32_t tcb_index; | ||
92 | uint32_t tcb_data[TCB_WORDS]; | ||
93 | }; | ||
94 | |||
95 | struct ethtool_tcam_word { | ||
96 | uint32_t cmd; | ||
97 | uint32_t addr; | ||
98 | uint32_t buf[3]; | ||
99 | }; | ||
100 | |||
101 | #define SIOCCHETHTOOL SIOCDEVPRIVATE | ||
102 | #endif | ||