aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge_mcp.h
diff options
context:
space:
mode:
authorBrice Goglin <brice@myri.com>2008-05-08 20:16:19 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-13 01:30:25 -0400
commit0f7229dde3f2b5373e26e7d7dd35012bd975e452 (patch)
tree00a757685a31aca6be6d6e61fd3a79fbcd3107d2 /drivers/net/myri10ge/myri10ge_mcp.h
parente8f720fdec08daa669f46c8d76da0714f6872ccc (diff)
myri10ge: update firmware headers
Update myri10ge firmware headers. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge_mcp.h')
-rw-r--r--drivers/net/myri10ge/myri10ge_mcp.h56
1 files changed, 50 insertions, 6 deletions
diff --git a/drivers/net/myri10ge/myri10ge_mcp.h b/drivers/net/myri10ge/myri10ge_mcp.h
index 58e57178c563..fdbeeee07372 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. 8 Bytes for NDIS drivers. */ 13/* 4 Bytes */
14struct mcp_slot { 14struct mcp_slot {
15 __sum16 checksum; 15 __sum16 checksum;
16 __be16 length; 16 __be16 length;
@@ -144,6 +144,7 @@ enum myri10ge_mcp_cmd_type {
144 * a power of 2 number of entries. */ 144 * a power of 2 number of entries. */
145 145
146 MXGEFW_CMD_SET_INTRQ_SIZE, /* in bytes */ 146 MXGEFW_CMD_SET_INTRQ_SIZE, /* in bytes */
147#define MXGEFW_CMD_SET_INTRQ_SIZE_FLAG_NO_STRICT_SIZE_CHECK (1 << 31)
147 148
148 /* command to bring ethernet interface up. Above parameters 149 /* command to bring ethernet interface up. Above parameters
149 * (plus mtu & mac address) must have been exchanged prior 150 * (plus mtu & mac address) must have been exchanged prior
@@ -221,10 +222,14 @@ enum myri10ge_mcp_cmd_type {
221 MXGEFW_CMD_GET_MAX_RSS_QUEUES, 222 MXGEFW_CMD_GET_MAX_RSS_QUEUES,
222 MXGEFW_CMD_ENABLE_RSS_QUEUES, 223 MXGEFW_CMD_ENABLE_RSS_QUEUES,
223 /* data0 = number of slices n (0, 1, ..., n-1) to enable 224 /* 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 * data1 = interrupt mode.
226 * 0=share one INTx/MSI, 1=use one MSI-X per queue.
225 * If all queues share one interrupt, the driver must have set 227 * If all queues share one interrupt, the driver must have set
226 * RSS_SHARED_INTERRUPT_DMA before enabling queues. 228 * RSS_SHARED_INTERRUPT_DMA before enabling queues.
227 */ 229 */
230#define MXGEFW_SLICE_INTR_MODE_SHARED 0
231#define MXGEFW_SLICE_INTR_MODE_ONE_PER_SLICE 1
232
228 MXGEFW_CMD_GET_RSS_SHARED_INTERRUPT_MASK_OFFSET, 233 MXGEFW_CMD_GET_RSS_SHARED_INTERRUPT_MASK_OFFSET,
229 MXGEFW_CMD_SET_RSS_SHARED_INTERRUPT_DMA, 234 MXGEFW_CMD_SET_RSS_SHARED_INTERRUPT_DMA,
230 /* data0, data1 = bus address lsw, msw */ 235 /* data0, data1 = bus address lsw, msw */
@@ -241,10 +246,14 @@ enum myri10ge_mcp_cmd_type {
241 * 0: disable rss. nic does not distribute receive packets. 246 * 0: disable rss. nic does not distribute receive packets.
242 * 1: enable rss. nic distributes receive packets among queues. 247 * 1: enable rss. nic distributes receive packets among queues.
243 * data1 = hash type 248 * data1 = hash type
244 * 1: IPV4 249 * 1: IPV4 (required by RSS)
245 * 2: TCP_IPV4 250 * 2: TCP_IPV4 (required by RSS)
246 * 3: IPV4 | TCP_IPV4 251 * 3: IPV4 | TCP_IPV4 (required by RSS)
252 * 4: source port
247 */ 253 */
254#define MXGEFW_RSS_HASH_TYPE_IPV4 0x1
255#define MXGEFW_RSS_HASH_TYPE_TCP_IPV4 0x2
256#define MXGEFW_RSS_HASH_TYPE_SRC_PORT 0x4
248 257
249 MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE, 258 MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE,
250 /* Return data = the max. size of the entire headers of a IPv6 TSO packet. 259 /* Return data = the max. size of the entire headers of a IPv6 TSO packet.
@@ -260,6 +269,8 @@ enum myri10ge_mcp_cmd_type {
260 * 0: Linux/FreeBSD style (NIC default) 269 * 0: Linux/FreeBSD style (NIC default)
261 * 1: NDIS/NetBSD style 270 * 1: NDIS/NetBSD style
262 */ 271 */
272#define MXGEFW_TSO_MODE_LINUX 0
273#define MXGEFW_TSO_MODE_NDIS 1
263 274
264 MXGEFW_CMD_MDIO_READ, 275 MXGEFW_CMD_MDIO_READ,
265 /* data0 = dev_addr (PMA/PMD or PCS ...), data1 = register/addr */ 276 /* data0 = dev_addr (PMA/PMD or PCS ...), data1 = register/addr */
@@ -286,6 +297,38 @@ enum myri10ge_mcp_cmd_type {
286 /* Return data = NIC memory offset of mcp_vpump_public_global */ 297 /* Return data = NIC memory offset of mcp_vpump_public_global */
287 MXGEFW_CMD_RESET_VPUMP, 298 MXGEFW_CMD_RESET_VPUMP,
288 /* Resets the VPUMP state */ 299 /* Resets the VPUMP state */
300
301 MXGEFW_CMD_SET_RSS_MCP_SLOT_TYPE,
302 /* data0 = mcp_slot type to use.
303 * 0 = the default 4B mcp_slot
304 * 1 = 8B mcp_slot_8
305 */
306#define MXGEFW_RSS_MCP_SLOT_TYPE_MIN 0
307#define MXGEFW_RSS_MCP_SLOT_TYPE_WITH_HASH 1
308
309 MXGEFW_CMD_SET_THROTTLE_FACTOR,
310 /* set the throttle factor for ethp_z8e
311 * data0 = throttle_factor
312 * throttle_factor = 256 * pcie-raw-speed / tx_speed
313 * tx_speed = 256 * pcie-raw-speed / throttle_factor
314 *
315 * For PCI-E x8: pcie-raw-speed == 16Gb/s
316 * For PCI-E x4: pcie-raw-speed == 8Gb/s
317 *
318 * ex1: throttle_factor == 0x1a0 (416), tx_speed == 1.23GB/s == 9.846 Gb/s
319 * ex2: throttle_factor == 0x200 (512), tx_speed == 1.0GB/s == 8 Gb/s
320 *
321 * with tx_boundary == 2048, max-throttle-factor == 8191 => min-speed == 500Mb/s
322 * with tx_boundary == 4096, max-throttle-factor == 4095 => min-speed == 1Gb/s
323 */
324
325 MXGEFW_CMD_VPUMP_UP,
326 /* Allocates VPump Connection, Send Request and Zero copy buffer address tables */
327 MXGEFW_CMD_GET_VPUMP_CLK,
328 /* Get the lanai clock */
329
330 MXGEFW_CMD_GET_DCA_OFFSET,
331 /* offset of dca control for WDMAs */
289}; 332};
290 333
291enum myri10ge_mcp_cmd_status { 334enum myri10ge_mcp_cmd_status {
@@ -302,7 +345,8 @@ enum myri10ge_mcp_cmd_status {
302 MXGEFW_CMD_ERROR_UNALIGNED, 345 MXGEFW_CMD_ERROR_UNALIGNED,
303 MXGEFW_CMD_ERROR_NO_MDIO, 346 MXGEFW_CMD_ERROR_NO_MDIO,
304 MXGEFW_CMD_ERROR_XFP_FAILURE, 347 MXGEFW_CMD_ERROR_XFP_FAILURE,
305 MXGEFW_CMD_ERROR_XFP_ABSENT 348 MXGEFW_CMD_ERROR_XFP_ABSENT,
349 MXGEFW_CMD_ERROR_BAD_PCIE_LINK
306}; 350};
307 351
308#define MXGEFW_OLD_IRQ_DATA_LEN 40 352#define MXGEFW_OLD_IRQ_DATA_LEN 40