summaryrefslogtreecommitdiffstats
path: root/sys/dev/mxge/mxge_mcp.h
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2007-08-22 13:22:12 +0000
committergallatin <gallatin@FreeBSD.org>2007-08-22 13:22:12 +0000
commit51a89ea67c6451e9f0542bd7778ddea57d128092 (patch)
tree47159cfe4a555d2909829d7014a63caf7e8decf4 /sys/dev/mxge/mxge_mcp.h
parent8e094e5065828429b3637d88bd24d896ae848454 (diff)
downloadFreeBSD-src-51a89ea67c6451e9f0542bd7778ddea57d128092.zip
FreeBSD-src-51a89ea67c6451e9f0542bd7778ddea57d128092.tar.gz
- Fix a bug which could cause a panic when enabling LRO
on an down mxge interface - Fix a bug where mxge reported the link state as active when it wasn't (after ifconfig down). - Prevent spurious watchdog resets when link partner is not consuming - Add support for CX4 and popular XFP media detection - Update the firmware and associated header files to 1.4.25 Approved by: re (kensmith)
Diffstat (limited to 'sys/dev/mxge/mxge_mcp.h')
-rw-r--r--sys/dev/mxge/mxge_mcp.h94
1 files changed, 91 insertions, 3 deletions
diff --git a/sys/dev/mxge/mxge_mcp.h b/sys/dev/mxge/mxge_mcp.h
index 03da8a2..61e8601 100644
--- a/sys/dev/mxge/mxge_mcp.h
+++ b/sys/dev/mxge/mxge_mcp.h
@@ -52,13 +52,27 @@ struct mcp_dma_addr {
};
typedef struct mcp_dma_addr mcp_dma_addr_t;
-/* 4 Bytes */
+/* 4 Bytes. 8 Bytes for NDIS drivers. */
struct mcp_slot {
+#ifdef MXGEFW_NDIS
+ /* Place at the top so it gets written before length.
+ * The driver polls length.
+ */
+ uint32_t hash;
+#endif
uint16_t checksum;
uint16_t length;
};
typedef struct mcp_slot mcp_slot_t;
+#ifdef MXGEFW_NDIS
+/* Two bits of length in mcp_slot are used to indicate hash type. */
+#define MXGEFW_RSS_HASH_NULL (0 << 14) /* bit 15:14 = 00 */
+#define MXGEFW_RSS_HASH_IPV4 (1 << 14) /* bit 15:14 = 01 */
+#define MXGEFW_RSS_HASH_TCP_IPV4 (2 << 14) /* bit 15:14 = 10 */
+#define MXGEFW_RSS_HASH_MASK (3 << 14) /* bit 15:14 = 11 */
+#endif
+
/* 64 Bytes */
struct mcp_cmd {
uint32_t cmd;
@@ -261,7 +275,7 @@ enum myri10ge_mcp_cmd_type {
MXGEFW_CMD_UNALIGNED_STATUS,
/* return data = boolean, true if the chipset is known to be unaligned */
-
+
MXGEFW_CMD_ALWAYS_USE_N_BIG_BUFFERS,
/* data0 = number of big buffers to use. It must be 0 or a power of 2.
* 0 indicates that the NIC consumes as many buffers as they are required
@@ -271,6 +285,70 @@ enum myri10ge_mcp_cmd_type {
* It is up to the driver to ensure that this value is big enough for
* the NIC to be able to receive maximum-sized packets.
*/
+
+ MXGEFW_CMD_GET_MAX_RSS_QUEUES,
+ MXGEFW_CMD_ENABLE_RSS_QUEUES,
+ /* data0 = number of slices n (0, 1, ..., n-1) to enable
+ * data1 = interrupt mode. 0=share one INTx/MSI, 1=use one MSI-X per queue.
+ * If all queues share one interrupt, the driver must have set
+ * RSS_SHARED_INTERRUPT_DMA before enabling queues.
+ */
+ MXGEFW_CMD_GET_RSS_SHARED_INTERRUPT_MASK_OFFSET,
+ MXGEFW_CMD_SET_RSS_SHARED_INTERRUPT_DMA,
+ /* data0, data1 = bus address lsw, msw */
+ MXGEFW_CMD_GET_RSS_TABLE_OFFSET,
+ /* get the offset of the indirection table */
+ MXGEFW_CMD_SET_RSS_TABLE_SIZE,
+ /* set the size of the indirection table */
+ MXGEFW_CMD_GET_RSS_KEY_OFFSET,
+ /* get the offset of the secret key */
+ MXGEFW_CMD_RSS_KEY_UPDATED,
+ /* tell nic that the secret key's been updated */
+ MXGEFW_CMD_SET_RSS_ENABLE,
+ /* data0 = enable/disable rss
+ * 0: disable rss. nic does not distribute receive packets.
+ * 1: enable rss. nic distributes receive packets among queues.
+ * data1 = hash type
+ * 1: IPV4
+ * 2: TCP_IPV4
+ * 3: IPV4 | TCP_IPV4
+ */
+
+ MXGEFW_CMD_GET_MAX_TSO6_HDR_SIZE,
+ /* Return data = the max. size of the entire headers of a IPv6 TSO packet.
+ * If the header size of a IPv6 TSO packet is larger than the specified
+ * value, then the driver must not use TSO.
+ * This size restriction only applies to IPv6 TSO.
+ * For IPv4 TSO, the maximum size of the headers is fixed, and the NIC
+ * always has enough header buffer to store maximum-sized headers.
+ */
+
+ MXGEFW_CMD_SET_TSO_MODE,
+ /* data0 = TSO mode.
+ * 0: Linux/FreeBSD style (NIC default)
+ * 1: NDIS/NetBSD style
+ */
+
+ MXGEFW_CMD_MDIO_READ,
+ /* data0 = dev_addr (PMA/PMD or PCS ...), data1 = register/addr */
+ MXGEFW_CMD_MDIO_WRITE,
+ /* data0 = dev_addr, data1 = register/addr, data2 = value */
+
+ MXGEFW_CMD_XFP_I2C_READ,
+ /* Starts to get a fresh copy of one byte or of the whole xfp i2c table, the
+ * obtained data is cached inside the xaui-xfi chip :
+ * data0 : "all" flag : 0 => get one byte, 1=> get 256 bytes,
+ * data1 : if (data0 == 0): index of byte to refresh [ not used otherwise ]
+ * The operation might take ~1ms for a single byte or ~65ms when refreshing all 256 bytes
+ * During the i2c operation, MXGEFW_CMD_XFP_I2C_READ or MXGEFW_CMD_XFP_BYTE attempts
+ * will return MXGEFW_CMD_ERROR_BUSY
+ */
+ MXGEFW_CMD_XFP_BYTE
+ /* Return the last obtained copy of a given byte in the xfp i2c table
+ * (copy cached during the last relevant MXGEFW_CMD_XFP_I2C_READ)
+ * data0 : index of the desired table entry
+ * Return data = the byte stored at the requested index in the table
+ */
};
typedef enum myri10ge_mcp_cmd_type myri10ge_mcp_cmd_type_t;
@@ -286,7 +364,10 @@ enum myri10ge_mcp_cmd_status {
MXGEFW_CMD_ERROR_BAD_PORT,
MXGEFW_CMD_ERROR_RESOURCES,
MXGEFW_CMD_ERROR_MULTICAST,
- MXGEFW_CMD_ERROR_UNALIGNED
+ MXGEFW_CMD_ERROR_UNALIGNED,
+ MXGEFW_CMD_ERROR_NO_MDIO,
+ MXGEFW_CMD_ERROR_XFP_FAILURE,
+ MXGEFW_CMD_ERROR_XFP_ABSENT
};
typedef enum myri10ge_mcp_cmd_status myri10ge_mcp_cmd_status_t;
@@ -324,5 +405,12 @@ struct mcp_irq_data {
};
typedef struct mcp_irq_data mcp_irq_data_t;
+#ifdef MXGEFW_NDIS
+struct mcp_rss_shared_interrupt {
+ uint8_t pad[2];
+ uint8_t queue;
+ uint8_t valid;
+};
+#endif
#endif /* _myri10ge_mcp_h */
OpenPOWER on IntegriCloud