diff options
author | Mark Einon <mark.einon@gmail.com> | 2011-10-19 20:18:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-23 04:07:09 -0400 |
commit | 1c1c1b5fda62419615c8fda99359206b2b279489 (patch) | |
tree | 03e0701d1a812ad36886306eaf79232772d5b860 /drivers | |
parent | fd0651a6d185e9572e1b2530d9f8f18c4cd5295c (diff) |
staging: et131x: move et131x_defs.h contents into et131x.c
Move et131x_defs.h contents into et131x.c and delete et131x_defs.h
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/et131x/et131x.c | 66 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x_defs.h | 128 |
2 files changed, 64 insertions, 130 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index e88c277b2544..402ab7f7ae27 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c | |||
@@ -53,8 +53,6 @@ | |||
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include "et131x_defs.h" | ||
57 | |||
58 | #include <linux/pci.h> | 56 | #include <linux/pci.h> |
59 | #include <linux/init.h> | 57 | #include <linux/init.h> |
60 | #include <linux/module.h> | 58 | #include <linux/module.h> |
@@ -124,6 +122,70 @@ MODULE_DESCRIPTION("10/100/1000 Base-T Ethernet Driver " | |||
124 | #define INT_MASK_ENABLE 0xfffebf17 | 122 | #define INT_MASK_ENABLE 0xfffebf17 |
125 | #define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 | 123 | #define INT_MASK_ENABLE_NO_FLOW 0xfffebfd7 |
126 | 124 | ||
125 | /* General defines */ | ||
126 | /* Packet and header sizes */ | ||
127 | #define NIC_MIN_PACKET_SIZE 60 | ||
128 | |||
129 | /* Multicast list size */ | ||
130 | #define NIC_MAX_MCAST_LIST 128 | ||
131 | |||
132 | /* Supported Filters */ | ||
133 | #define ET131X_PACKET_TYPE_DIRECTED 0x0001 | ||
134 | #define ET131X_PACKET_TYPE_MULTICAST 0x0002 | ||
135 | #define ET131X_PACKET_TYPE_BROADCAST 0x0004 | ||
136 | #define ET131X_PACKET_TYPE_PROMISCUOUS 0x0008 | ||
137 | #define ET131X_PACKET_TYPE_ALL_MULTICAST 0x0010 | ||
138 | |||
139 | /* Tx Timeout */ | ||
140 | #define ET131X_TX_TIMEOUT (1 * HZ) | ||
141 | #define NIC_SEND_HANG_THRESHOLD 0 | ||
142 | |||
143 | /* MP_TCB flags */ | ||
144 | #define fMP_DEST_MULTI 0x00000001 | ||
145 | #define fMP_DEST_BROAD 0x00000002 | ||
146 | |||
147 | /* MP_ADAPTER flags */ | ||
148 | #define fMP_ADAPTER_RECV_LOOKASIDE 0x00000004 | ||
149 | #define fMP_ADAPTER_INTERRUPT_IN_USE 0x00000008 | ||
150 | #define fMP_ADAPTER_SECONDARY 0x00000010 | ||
151 | |||
152 | /* MP_SHARED flags */ | ||
153 | #define fMP_ADAPTER_SHUTDOWN 0x00100000 | ||
154 | #define fMP_ADAPTER_LOWER_POWER 0x00200000 | ||
155 | |||
156 | #define fMP_ADAPTER_NON_RECOVER_ERROR 0x00800000 | ||
157 | #define fMP_ADAPTER_RESET_IN_PROGRESS 0x01000000 | ||
158 | #define fMP_ADAPTER_NO_CABLE 0x02000000 | ||
159 | #define fMP_ADAPTER_HARDWARE_ERROR 0x04000000 | ||
160 | #define fMP_ADAPTER_REMOVE_IN_PROGRESS 0x08000000 | ||
161 | #define fMP_ADAPTER_HALT_IN_PROGRESS 0x10000000 | ||
162 | |||
163 | #define fMP_ADAPTER_FAIL_SEND_MASK 0x3ff00000 | ||
164 | #define fMP_ADAPTER_NOT_READY_MASK 0x3ff00000 | ||
165 | |||
166 | /* Some offsets in PCI config space that are actually used. */ | ||
167 | #define ET1310_PCI_MAX_PYLD 0x4C | ||
168 | #define ET1310_PCI_MAC_ADDRESS 0xA4 | ||
169 | #define ET1310_PCI_EEPROM_STATUS 0xB2 | ||
170 | #define ET1310_PCI_ACK_NACK 0xC0 | ||
171 | #define ET1310_PCI_REPLAY 0xC2 | ||
172 | #define ET1310_PCI_L0L1LATENCY 0xCF | ||
173 | |||
174 | /* PCI Vendor/Product IDs */ | ||
175 | #define ET131X_PCI_VENDOR_ID 0x11C1 /* Agere Systems */ | ||
176 | #define ET131X_PCI_DEVICE_ID_GIG 0xED00 /* ET1310 1000 Base-T 8 */ | ||
177 | #define ET131X_PCI_DEVICE_ID_FAST 0xED01 /* ET1310 100 Base-T */ | ||
178 | |||
179 | /* Define order of magnitude converter */ | ||
180 | #define NANO_IN_A_MICRO 1000 | ||
181 | |||
182 | #define PARM_RX_NUM_BUFS_DEF 4 | ||
183 | #define PARM_RX_TIME_INT_DEF 10 | ||
184 | #define PARM_RX_MEM_END_DEF 0x2bc | ||
185 | #define PARM_TX_TIME_INT_DEF 40 | ||
186 | #define PARM_TX_NUM_BUFS_DEF 4 | ||
187 | #define PARM_DMA_CACHE_DEF 0 | ||
188 | |||
127 | /* ADAPTER defines */ | 189 | /* ADAPTER defines */ |
128 | /* | 190 | /* |
129 | * Do not change these values: if changed, then change also in respective | 191 | * Do not change these values: if changed, then change also in respective |
diff --git a/drivers/staging/et131x/et131x_defs.h b/drivers/staging/et131x/et131x_defs.h deleted file mode 100644 index 872a5afc3577..000000000000 --- a/drivers/staging/et131x/et131x_defs.h +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | * Agere Systems Inc. | ||
3 | * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs | ||
4 | * | ||
5 | * Copyright © 2005 Agere Systems Inc. | ||
6 | * All rights reserved. | ||
7 | * http://www.agere.com | ||
8 | * | ||
9 | * Copyright (c) 2011 Mark Einon <mark.einon@gmail.com> | ||
10 | * | ||
11 | *------------------------------------------------------------------------------ | ||
12 | * | ||
13 | * et131x_defs.h - Defines, structs, enums, prototypes, etc. to assist with OS | ||
14 | * compatibility | ||
15 | * | ||
16 | *------------------------------------------------------------------------------ | ||
17 | * | ||
18 | * SOFTWARE LICENSE | ||
19 | * | ||
20 | * This software is provided subject to the following terms and conditions, | ||
21 | * which you should read carefully before using the software. Using this | ||
22 | * software indicates your acceptance of these terms and conditions. If you do | ||
23 | * not agree with these terms and conditions, do not use the software. | ||
24 | * | ||
25 | * Copyright © 2005 Agere Systems Inc. | ||
26 | * All rights reserved. | ||
27 | * | ||
28 | * Redistribution and use in source or binary forms, with or without | ||
29 | * modifications, are permitted provided that the following conditions are met: | ||
30 | * | ||
31 | * . Redistributions of source code must retain the above copyright notice, this | ||
32 | * list of conditions and the following Disclaimer as comments in the code as | ||
33 | * well as in the documentation and/or other materials provided with the | ||
34 | * distribution. | ||
35 | * | ||
36 | * . Redistributions in binary form must reproduce the above copyright notice, | ||
37 | * this list of conditions and the following Disclaimer in the documentation | ||
38 | * and/or other materials provided with the distribution. | ||
39 | * | ||
40 | * . Neither the name of Agere Systems Inc. nor the names of the contributors | ||
41 | * may be used to endorse or promote products derived from this software | ||
42 | * without specific prior written permission. | ||
43 | * | ||
44 | * Disclaimer | ||
45 | * | ||
46 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
47 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF | ||
48 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY | ||
49 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN | ||
50 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY | ||
51 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
52 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
53 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
54 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT | ||
55 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
56 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
57 | * DAMAGE. | ||
58 | * | ||
59 | */ | ||
60 | |||
61 | #ifndef __ET131X_DEFS_H__ | ||
62 | #define __ET131X_DEFS_H__ | ||
63 | |||
64 | /* Packet and header sizes */ | ||
65 | #define NIC_MIN_PACKET_SIZE 60 | ||
66 | |||
67 | /* Multicast list size */ | ||
68 | #define NIC_MAX_MCAST_LIST 128 | ||
69 | |||
70 | /* Supported Filters */ | ||
71 | #define ET131X_PACKET_TYPE_DIRECTED 0x0001 | ||
72 | #define ET131X_PACKET_TYPE_MULTICAST 0x0002 | ||
73 | #define ET131X_PACKET_TYPE_BROADCAST 0x0004 | ||
74 | #define ET131X_PACKET_TYPE_PROMISCUOUS 0x0008 | ||
75 | #define ET131X_PACKET_TYPE_ALL_MULTICAST 0x0010 | ||
76 | |||
77 | /* Tx Timeout */ | ||
78 | #define ET131X_TX_TIMEOUT (1 * HZ) | ||
79 | #define NIC_SEND_HANG_THRESHOLD 0 | ||
80 | |||
81 | /* MP_TCB flags */ | ||
82 | #define fMP_DEST_MULTI 0x00000001 | ||
83 | #define fMP_DEST_BROAD 0x00000002 | ||
84 | |||
85 | /* MP_ADAPTER flags */ | ||
86 | #define fMP_ADAPTER_RECV_LOOKASIDE 0x00000004 | ||
87 | #define fMP_ADAPTER_INTERRUPT_IN_USE 0x00000008 | ||
88 | #define fMP_ADAPTER_SECONDARY 0x00000010 | ||
89 | |||
90 | /* MP_SHARED flags */ | ||
91 | #define fMP_ADAPTER_SHUTDOWN 0x00100000 | ||
92 | #define fMP_ADAPTER_LOWER_POWER 0x00200000 | ||
93 | |||
94 | #define fMP_ADAPTER_NON_RECOVER_ERROR 0x00800000 | ||
95 | #define fMP_ADAPTER_RESET_IN_PROGRESS 0x01000000 | ||
96 | #define fMP_ADAPTER_NO_CABLE 0x02000000 | ||
97 | #define fMP_ADAPTER_HARDWARE_ERROR 0x04000000 | ||
98 | #define fMP_ADAPTER_REMOVE_IN_PROGRESS 0x08000000 | ||
99 | #define fMP_ADAPTER_HALT_IN_PROGRESS 0x10000000 | ||
100 | |||
101 | #define fMP_ADAPTER_FAIL_SEND_MASK 0x3ff00000 | ||
102 | #define fMP_ADAPTER_NOT_READY_MASK 0x3ff00000 | ||
103 | |||
104 | /* Some offsets in PCI config space that are actually used. */ | ||
105 | #define ET1310_PCI_MAX_PYLD 0x4C | ||
106 | #define ET1310_PCI_MAC_ADDRESS 0xA4 | ||
107 | #define ET1310_PCI_EEPROM_STATUS 0xB2 | ||
108 | #define ET1310_PCI_ACK_NACK 0xC0 | ||
109 | #define ET1310_PCI_REPLAY 0xC2 | ||
110 | #define ET1310_PCI_L0L1LATENCY 0xCF | ||
111 | |||
112 | /* PCI Vendor/Product IDs */ | ||
113 | #define ET131X_PCI_VENDOR_ID 0x11C1 /* Agere Systems */ | ||
114 | #define ET131X_PCI_DEVICE_ID_GIG 0xED00 /* ET1310 1000 Base-T 8 */ | ||
115 | #define ET131X_PCI_DEVICE_ID_FAST 0xED01 /* ET1310 100 Base-T */ | ||
116 | |||
117 | /* Define order of magnitude converter */ | ||
118 | #define NANO_IN_A_MICRO 1000 | ||
119 | |||
120 | #define PARM_RX_NUM_BUFS_DEF 4 | ||
121 | #define PARM_RX_TIME_INT_DEF 10 | ||
122 | #define PARM_RX_MEM_END_DEF 0x2bc | ||
123 | #define PARM_TX_TIME_INT_DEF 40 | ||
124 | #define PARM_TX_NUM_BUFS_DEF 4 | ||
125 | #define PARM_DMA_CACHE_DEF 0 | ||
126 | |||
127 | |||
128 | #endif /* __ET131X_DEFS_H__ */ | ||