Deleted Added
full compact
mxge_mcp.h (159612) mxge_mcp.h (162328)
1/*******************************************************************************
2
3Copyright (c) 2006, Myricom Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 15 unchanged lines hidden (view full) ---

24LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30POSSIBILITY OF SUCH DAMAGE.
31
1/*******************************************************************************
2
3Copyright (c) 2006, Myricom Inc.
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8

--- 15 unchanged lines hidden (view full) ---

24LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30POSSIBILITY OF SUCH DAMAGE.
31
32$FreeBSD: head/sys/dev/mxge/mxge_mcp.h 159612 2006-06-14 16:23:17Z gallatin $
32$FreeBSD: head/sys/dev/mxge/mxge_mcp.h 162328 2006-09-15 19:24:45Z gallatin $
33***************************************************************************/
34
35#ifndef _myri10ge_mcp_h
36#define _myri10ge_mcp_h
37
38#define MXGEFW_VERSION_MAJOR 1
39#define MXGEFW_VERSION_MINOR 4
40

--- 101 unchanged lines hidden (view full) ---

142 uint32_t addr_high;
143 uint32_t addr_low;
144};
145typedef struct mcp_kreq_ether_recv mcp_kreq_ether_recv_t;
146
147
148/* Commands */
149
33***************************************************************************/
34
35#ifndef _myri10ge_mcp_h
36#define _myri10ge_mcp_h
37
38#define MXGEFW_VERSION_MAJOR 1
39#define MXGEFW_VERSION_MINOR 4
40

--- 101 unchanged lines hidden (view full) ---

142 uint32_t addr_high;
143 uint32_t addr_low;
144};
145typedef struct mcp_kreq_ether_recv mcp_kreq_ether_recv_t;
146
147
148/* Commands */
149
150#define MXGEFW_CMD_OFFSET 0xf80000
150#define MXGEFW_BOOT_HANDOFF 0xfc0000
151#define MXGEFW_BOOT_DUMMY_RDMA 0xfc01c0
151
152
153#define MXGEFW_ETH_CMD 0xf80000
154#define MXGEFW_ETH_SEND_4 0x200000
155#define MXGEFW_ETH_SEND_1 0x240000
156#define MXGEFW_ETH_SEND_2 0x280000
157#define MXGEFW_ETH_SEND_3 0x2c0000
158#define MXGEFW_ETH_RECV_SMALL 0x300000
159#define MXGEFW_ETH_RECV_BIG 0x340000
160
161#define MXGEFW_ETH_SEND(n) (0x200000 + (((n) & 0x03) * 0x40000))
162#define MXGEFW_ETH_SEND_OFFSET(n) (MXGEFW_ETH_SEND(n) - MXGEFW_ETH_SEND_4)
163
152enum myri10ge_mcp_cmd_type {
153 MXGEFW_CMD_NONE = 0,
154 /* Reset the mcp, it is left in a safe state, waiting
155 for the driver to set all its parameters */
156 MXGEFW_CMD_RESET,
157
158 /* get the version number of the current firmware..
159 (may be available in the eeprom strings..? */

--- 47 unchanged lines hidden (view full) ---

207 the nic. Note that increasing the mtu "live" should
208 only be done if the driver has already supplied buffers
209 sufficiently large to handle the new mtu. Decreasing
210 the mtu live is safe */
211
212 MXGEFW_CMD_SET_MTU,
213 MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, /* in microseconds */
214 MXGEFW_CMD_SET_STATS_INTERVAL, /* in microseconds */
164enum myri10ge_mcp_cmd_type {
165 MXGEFW_CMD_NONE = 0,
166 /* Reset the mcp, it is left in a safe state, waiting
167 for the driver to set all its parameters */
168 MXGEFW_CMD_RESET,
169
170 /* get the version number of the current firmware..
171 (may be available in the eeprom strings..? */

--- 47 unchanged lines hidden (view full) ---

219 the nic. Note that increasing the mtu "live" should
220 only be done if the driver has already supplied buffers
221 sufficiently large to handle the new mtu. Decreasing
222 the mtu live is safe */
223
224 MXGEFW_CMD_SET_MTU,
225 MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, /* in microseconds */
226 MXGEFW_CMD_SET_STATS_INTERVAL, /* in microseconds */
215 MXGEFW_CMD_SET_STATS_DMA,
227 MXGEFW_CMD_SET_STATS_DMA_OBSOLETE, /* replaced by SET_STATS_DMA_V2 */
216
217 MXGEFW_ENABLE_PROMISC,
218 MXGEFW_DISABLE_PROMISC,
219 MXGEFW_SET_MAC_ADDRESS,
220
221 MXGEFW_ENABLE_FLOW_CONTROL,
222 MXGEFW_DISABLE_FLOW_CONTROL,
223
224 /* do a DMA test
225 data0,data1 = DMA address
226 data2 = RDMA length (MSH), WDMA length (LSH)
227 command return data = repetitions (MSH), 0.5-ms ticks (LSH)
228 */
228
229 MXGEFW_ENABLE_PROMISC,
230 MXGEFW_DISABLE_PROMISC,
231 MXGEFW_SET_MAC_ADDRESS,
232
233 MXGEFW_ENABLE_FLOW_CONTROL,
234 MXGEFW_DISABLE_FLOW_CONTROL,
235
236 /* do a DMA test
237 data0,data1 = DMA address
238 data2 = RDMA length (MSH), WDMA length (LSH)
239 command return data = repetitions (MSH), 0.5-ms ticks (LSH)
240 */
229 MXGEFW_DMA_TEST
241 MXGEFW_DMA_TEST,
242
243 MXGEFW_ENABLE_ALLMULTI,
244 MXGEFW_DISABLE_ALLMULTI,
245
246 /* returns MXGEFW_CMD_ERROR_MULTICAST
247 if there is no room in the cache
248 data0,MSH(data1) = multicast group address */
249 MXGEFW_JOIN_MULTICAST_GROUP,
250 /* returns MXGEFW_CMD_ERROR_MULTICAST
251 if the address is not in the cache,
252 or is equal to FF-FF-FF-FF-FF-FF
253 data0,MSH(data1) = multicast group address */
254 MXGEFW_LEAVE_MULTICAST_GROUP,
255 MXGEFW_LEAVE_ALL_MULTICAST_GROUPS,
256
257 MXGEFW_CMD_SET_STATS_DMA_V2,
258 /* data0, data1 = bus addr,
259 data2 = sizeof(struct mcp_irq_data) from driver point of view, allows
260 adding new stuff to mcp_irq_data without changing the ABI */
230};
231typedef enum myri10ge_mcp_cmd_type myri10ge_mcp_cmd_type_t;
232
233
234enum myri10ge_mcp_cmd_status {
235 MXGEFW_CMD_OK = 0,
236 MXGEFW_CMD_UNKNOWN,
237 MXGEFW_CMD_ERROR_RANGE,
238 MXGEFW_CMD_ERROR_BUSY,
239 MXGEFW_CMD_ERROR_EMPTY,
240 MXGEFW_CMD_ERROR_CLOSED,
241 MXGEFW_CMD_ERROR_HASH_ERROR,
242 MXGEFW_CMD_ERROR_BAD_PORT,
261};
262typedef enum myri10ge_mcp_cmd_type myri10ge_mcp_cmd_type_t;
263
264
265enum myri10ge_mcp_cmd_status {
266 MXGEFW_CMD_OK = 0,
267 MXGEFW_CMD_UNKNOWN,
268 MXGEFW_CMD_ERROR_RANGE,
269 MXGEFW_CMD_ERROR_BUSY,
270 MXGEFW_CMD_ERROR_EMPTY,
271 MXGEFW_CMD_ERROR_CLOSED,
272 MXGEFW_CMD_ERROR_HASH_ERROR,
273 MXGEFW_CMD_ERROR_BAD_PORT,
243 MXGEFW_CMD_ERROR_RESOURCES
274 MXGEFW_CMD_ERROR_RESOURCES,
275 MXGEFW_CMD_ERROR_MULTICAST
244};
245typedef enum myri10ge_mcp_cmd_status myri10ge_mcp_cmd_status_t;
246
247
276};
277typedef enum myri10ge_mcp_cmd_status myri10ge_mcp_cmd_status_t;
278
279
248/* 40 Bytes */
280#define MXGEFW_OLD_IRQ_DATA_LEN 40
281
249struct mcp_irq_data {
282struct mcp_irq_data {
283 /* add new counters at the beginning */
284 uint32_t future_use[5];
285 uint32_t dropped_multicast_filtered;
286/* 40 Bytes */
250 uint32_t send_done_count;
251
252 uint32_t link_up;
253 uint32_t dropped_link_overflow;
254 uint32_t dropped_link_error_or_filtered;
255 uint32_t dropped_runt;
256 uint32_t dropped_overrun;
257 uint32_t dropped_no_small_buffer;

--- 12 unchanged lines hidden ---
287 uint32_t send_done_count;
288
289 uint32_t link_up;
290 uint32_t dropped_link_overflow;
291 uint32_t dropped_link_error_or_filtered;
292 uint32_t dropped_runt;
293 uint32_t dropped_overrun;
294 uint32_t dropped_no_small_buffer;

--- 12 unchanged lines hidden ---