diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge_mcp.h')
-rw-r--r-- | drivers/net/myri10ge/myri10ge_mcp.h | 90 |
1 files changed, 86 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge_mcp.h b/drivers/net/myri10ge/myri10ge_mcp.h index a1d2a22296a9..58e57178c563 100644 --- a/drivers/net/myri10ge/myri10ge_mcp.h +++ b/drivers/net/myri10ge/myri10ge_mcp.h | |||
@@ -10,7 +10,7 @@ struct mcp_dma_addr { | |||
10 | __be32 low; | 10 | __be32 low; |
11 | }; | 11 | }; |
12 | 12 | ||
13 | /* 4 Bytes */ | 13 | /* 4 Bytes. 8 Bytes for NDIS drivers. */ |
14 | struct mcp_slot { | 14 | struct mcp_slot { |
15 | __sum16 checksum; | 15 | __sum16 checksum; |
16 | __be16 length; | 16 | __be16 length; |
@@ -205,8 +205,87 @@ enum myri10ge_mcp_cmd_type { | |||
205 | /* same than DMA_TEST (same args) but abort with UNALIGNED on unaligned | 205 | /* same than DMA_TEST (same args) but abort with UNALIGNED on unaligned |
206 | * chipset */ | 206 | * chipset */ |
207 | 207 | ||
208 | MXGEFW_CMD_UNALIGNED_STATUS | 208 | MXGEFW_CMD_UNALIGNED_STATUS, |
209 | /* return data = boolean, true if the chipset is known to be unaligned */ | 209 | /* return data = boolean, true if the chipset is known to be unaligned */ |
210 | |||
211 | MXGEFW_CMD_ALWAYS_USE_N_BIG_BUFFERS, | ||
212 | /* data0 = number of big buffers to use. It must be 0 or a power of 2. | ||
213 | * 0 indicates that the NIC consumes as many buffers as they are required | ||
214 | * for packet. This is the default behavior. | ||
215 | * A power of 2 number indicates that the NIC always uses the specified | ||
216 | * number of buffers for each big receive packet. | ||
217 | * It is up to the driver to ensure that this value is big enough for | ||
218 | * the NIC to be able to receive maximum-sized packets. | ||
219 | */ | ||
220 | |||
221 | MXGEFW_CMD_GET_MAX_RSS_QUEUES, | ||
222 | MXGEFW_CMD_ENABLE_RSS_QUEUES, | ||
223 | /* data0 = number of slices n (0, 1, ..., n-1) to enable | ||
224 | * data1 = interrupt mode. 0=share one INTx/MSI, 1=use one MSI-X per queue. | ||
225 | * If all queues share one interrupt, the driver must have set | ||
226 | * RSS_SHARED_INTERRUPT_DMA before enabling queues. | ||
227 | */ | ||
228 | MXGEFW_CMD_GET_RSS_SHARED_INTERRUPT_MASK_OFFSET, | ||
229 | MXGEFW_CMD_SET_RSS_SHARED_INTERRUPT_DMA, | ||
230 | /* data0, data1 = bus address lsw, msw */ | ||
231 | MXGEFW_CMD_GET_RSS_TABLE_OFFSET, | ||
232 | /* get the offset of the indirection table */ | ||
233 | MXGEFW_CMD_SET_RSS_TABLE_SIZE, | ||
234 | /* set the size of the indirection table */ | ||
235 | MXGEFW_CMD_GET_RSS_KEY_OFFSET, | ||
236 | /* get the offset of the secret key */ | ||
237 | MXGEFW_CMD_RSS_KEY_UPDATED, | ||
238 | /* tell nic that the secret key's been updated */ | ||
239 | MXGEFW_CMD_SET_RSS_ENABLE, | ||
240 | /* data0 = enable/disable rss | ||
241 | * 0: disable rss. nic does not distribute receive packets. | ||
242 | * 1: enable rss. nic distributes receive packets among queues. | ||
243 | * data1 = hash type | ||
244 | * 1: IPV4 | ||
245 | * 2: TCP_IPV4 | ||
246 | * 3: IPV4 | TCP_IPV4 | ||
247 | */ | ||
248 | |||
249 | MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE, | ||
250 | /* Return data = the max. size of the entire headers of a IPv6 TSO packet. | ||
251 | * If the header size of a IPv6 TSO packet is larger than the specified | ||
252 | * value, then the driver must not use TSO. | ||
253 | * This size restriction only applies to IPv6 TSO. | ||
254 | * For IPv4 TSO, the maximum size of the headers is fixed, and the NIC | ||
255 | * always has enough header buffer to store maximum-sized headers. | ||
256 | */ | ||
257 | |||
258 | MXGEFW_CMD_SET_TSO_MODE, | ||
259 | /* data0 = TSO mode. | ||
260 | * 0: Linux/FreeBSD style (NIC default) | ||
261 | * 1: NDIS/NetBSD style | ||
262 | */ | ||
263 | |||
264 | MXGEFW_CMD_MDIO_READ, | ||
265 | /* data0 = dev_addr (PMA/PMD or PCS ...), data1 = register/addr */ | ||
266 | MXGEFW_CMD_MDIO_WRITE, | ||
267 | /* data0 = dev_addr, data1 = register/addr, data2 = value */ | ||
268 | |||
269 | MXGEFW_CMD_XFP_I2C_READ, | ||
270 | /* Starts to get a fresh copy of one byte or of the whole xfp i2c table, the | ||
271 | * obtained data is cached inside the xaui-xfi chip : | ||
272 | * data0 : "all" flag : 0 => get one byte, 1=> get 256 bytes, | ||
273 | * data1 : if (data0 == 0): index of byte to refresh [ not used otherwise ] | ||
274 | * The operation might take ~1ms for a single byte or ~65ms when refreshing all 256 bytes | ||
275 | * During the i2c operation, MXGEFW_CMD_XFP_I2C_READ or MXGEFW_CMD_XFP_BYTE attempts | ||
276 | * will return MXGEFW_CMD_ERROR_BUSY | ||
277 | */ | ||
278 | MXGEFW_CMD_XFP_BYTE, | ||
279 | /* Return the last obtained copy of a given byte in the xfp i2c table | ||
280 | * (copy cached during the last relevant MXGEFW_CMD_XFP_I2C_READ) | ||
281 | * data0 : index of the desired table entry | ||
282 | * Return data = the byte stored at the requested index in the table | ||
283 | */ | ||
284 | |||
285 | MXGEFW_CMD_GET_VPUMP_OFFSET, | ||
286 | /* Return data = NIC memory offset of mcp_vpump_public_global */ | ||
287 | MXGEFW_CMD_RESET_VPUMP, | ||
288 | /* Resets the VPUMP state */ | ||
210 | }; | 289 | }; |
211 | 290 | ||
212 | enum myri10ge_mcp_cmd_status { | 291 | enum myri10ge_mcp_cmd_status { |
@@ -220,7 +299,10 @@ enum myri10ge_mcp_cmd_status { | |||
220 | MXGEFW_CMD_ERROR_BAD_PORT, | 299 | MXGEFW_CMD_ERROR_BAD_PORT, |
221 | MXGEFW_CMD_ERROR_RESOURCES, | 300 | MXGEFW_CMD_ERROR_RESOURCES, |
222 | MXGEFW_CMD_ERROR_MULTICAST, | 301 | MXGEFW_CMD_ERROR_MULTICAST, |
223 | MXGEFW_CMD_ERROR_UNALIGNED | 302 | MXGEFW_CMD_ERROR_UNALIGNED, |
303 | MXGEFW_CMD_ERROR_NO_MDIO, | ||
304 | MXGEFW_CMD_ERROR_XFP_FAILURE, | ||
305 | MXGEFW_CMD_ERROR_XFP_ABSENT | ||
224 | }; | 306 | }; |
225 | 307 | ||
226 | #define MXGEFW_OLD_IRQ_DATA_LEN 40 | 308 | #define MXGEFW_OLD_IRQ_DATA_LEN 40 |