diff options
author | Brice Goglin <brice@myri.com> | 2006-08-21 17:36:56 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-24 00:43:51 -0400 |
commit | 85a7ea1b0a3263f3ad423b789a841d03c9acbb65 (patch) | |
tree | 1bd6e9fca08067157425fee973cf68594c827829 /drivers/net/myri10ge/myri10ge_mcp.h | |
parent | c58ac5caeb32ef17c2e4fc208f7dc93f6de32b7d (diff) |
[PATCH] myri10ge: use multicast support in the firmware
Some recent myri10ge firmwares support multicast filtering as well
as an extended mcp_irq_data structure (64 instead of 40 bytes).
The new command MXGEFW_CMD_SET_STATS_DMA_V2 is used to check
whether the firmware support those. mgp->fw_multicast_support
is defined accordingly.
When fw_multicast_support is set, some new multicast filtering
commands is passed to the board in myri10ge_set_multicast_list().
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge_mcp.h')
-rw-r--r-- | drivers/net/myri10ge/myri10ge_mcp.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge_mcp.h b/drivers/net/myri10ge/myri10ge_mcp.h index d7dfaa5f64a2..9519ae7cd5ec 100644 --- a/drivers/net/myri10ge/myri10ge_mcp.h +++ b/drivers/net/myri10ge/myri10ge_mcp.h | |||
@@ -166,7 +166,7 @@ enum myri10ge_mcp_cmd_type { | |||
166 | MXGEFW_CMD_SET_MTU, | 166 | MXGEFW_CMD_SET_MTU, |
167 | MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, /* in microseconds */ | 167 | MXGEFW_CMD_GET_INTR_COAL_DELAY_OFFSET, /* in microseconds */ |
168 | MXGEFW_CMD_SET_STATS_INTERVAL, /* in microseconds */ | 168 | MXGEFW_CMD_SET_STATS_INTERVAL, /* in microseconds */ |
169 | MXGEFW_CMD_SET_STATS_DMA, | 169 | MXGEFW_CMD_SET_STATS_DMA_OBSOLETE, /* replaced by SET_STATS_DMA_V2 */ |
170 | 170 | ||
171 | MXGEFW_ENABLE_PROMISC, | 171 | MXGEFW_ENABLE_PROMISC, |
172 | MXGEFW_DISABLE_PROMISC, | 172 | MXGEFW_DISABLE_PROMISC, |
@@ -180,7 +180,26 @@ enum myri10ge_mcp_cmd_type { | |||
180 | * data2 = RDMA length (MSH), WDMA length (LSH) | 180 | * data2 = RDMA length (MSH), WDMA length (LSH) |
181 | * command return data = repetitions (MSH), 0.5-ms ticks (LSH) | 181 | * command return data = repetitions (MSH), 0.5-ms ticks (LSH) |
182 | */ | 182 | */ |
183 | MXGEFW_DMA_TEST | 183 | MXGEFW_DMA_TEST, |
184 | |||
185 | MXGEFW_ENABLE_ALLMULTI, | ||
186 | MXGEFW_DISABLE_ALLMULTI, | ||
187 | |||
188 | /* returns MXGEFW_CMD_ERROR_MULTICAST | ||
189 | * if there is no room in the cache | ||
190 | * data0,MSH(data1) = multicast group address */ | ||
191 | MXGEFW_JOIN_MULTICAST_GROUP, | ||
192 | /* returns MXGEFW_CMD_ERROR_MULTICAST | ||
193 | * if the address is not in the cache, | ||
194 | * or is equal to FF-FF-FF-FF-FF-FF | ||
195 | * data0,MSH(data1) = multicast group address */ | ||
196 | MXGEFW_LEAVE_MULTICAST_GROUP, | ||
197 | MXGEFW_LEAVE_ALL_MULTICAST_GROUPS, | ||
198 | |||
199 | MXGEFW_CMD_SET_STATS_DMA_V2, | ||
200 | /* data0, data1 = bus addr, | ||
201 | * data2 = sizeof(struct mcp_irq_data) from driver point of view, allows | ||
202 | * adding new stuff to mcp_irq_data without changing the ABI */ | ||
184 | }; | 203 | }; |
185 | 204 | ||
186 | enum myri10ge_mcp_cmd_status { | 205 | enum myri10ge_mcp_cmd_status { |
@@ -192,11 +211,17 @@ enum myri10ge_mcp_cmd_status { | |||
192 | MXGEFW_CMD_ERROR_CLOSED, | 211 | MXGEFW_CMD_ERROR_CLOSED, |
193 | MXGEFW_CMD_ERROR_HASH_ERROR, | 212 | MXGEFW_CMD_ERROR_HASH_ERROR, |
194 | MXGEFW_CMD_ERROR_BAD_PORT, | 213 | MXGEFW_CMD_ERROR_BAD_PORT, |
195 | MXGEFW_CMD_ERROR_RESOURCES | 214 | MXGEFW_CMD_ERROR_RESOURCES, |
215 | MXGEFW_CMD_ERROR_MULTICAST | ||
196 | }; | 216 | }; |
197 | 217 | ||
198 | /* 40 Bytes */ | 218 | #define MXGEFW_OLD_IRQ_DATA_LEN 40 |
219 | |||
199 | struct mcp_irq_data { | 220 | struct mcp_irq_data { |
221 | /* add new counters at the beginning */ | ||
222 | u32 future_use[5]; | ||
223 | u32 dropped_multicast_filtered; | ||
224 | /* 40 Bytes */ | ||
200 | u32 send_done_count; | 225 | u32 send_done_count; |
201 | 226 | ||
202 | u32 link_up; | 227 | u32 link_up; |