aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mxge/if_mxge_var.h
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2006-06-14 16:23:17 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2006-06-14 16:23:17 +0000
commit5e7d85418bdc04ffead9214133c54ebb008f479f (patch)
tree768093b20aee8f60dcbae72ce7a9cef84646968d /sys/dev/mxge/if_mxge_var.h
parent81623278a5df228d8eac32aa4c038f4118226f59 (diff)
downloadsrc-5e7d85418bdc04ffead9214133c54ebb008f479f.tar.gz
src-5e7d85418bdc04ffead9214133c54ebb008f479f.zip
Update the mxge driver.
- Update the firmware to the latest released firmware (1.4.3), which corresponds to the firmware in the latest shipping drivers from Myricom. This firmware fixes several bugs in the firmware's PCI-e implementation, and it also changes the driver/firmware interface: o TSO was added, and changed the format of the transmit descriptors. o The firmware no longer counts transmits descriptors, but frames. So the driver needs to keep a count of the number of frames sent. o The weird interrupt strategy changed to a normal receive return ring. This ring is much bigger, and we may be able to support DEVICE_POLLING. o Myricom's header files changed the name of firmware related #define's and enums (s/_MCP_/FW_). - Stopped spamming the console with lots of printfs unless mxge_verbose (or bootverbose) is set. - Made additional information available via sysctl, including the results of a PCI-e DMA benchmark run at device reset. - Decreased the excessively long timeouts when sending commands from 2 seconds to 20ms. Sponsored by: Myricom Inc.
Notes
Notes: svn path=/head/; revision=159612
Diffstat (limited to 'sys/dev/mxge/if_mxge_var.h')
-rw-r--r--sys/dev/mxge/if_mxge_var.h46
1 files changed, 27 insertions, 19 deletions
diff --git a/sys/dev/mxge/if_mxge_var.h b/sys/dev/mxge/if_mxge_var.h
index 06ff436aac11..35b78b2fa1b5 100644
--- a/sys/dev/mxge/if_mxge_var.h
+++ b/sys/dev/mxge/if_mxge_var.h
@@ -43,7 +43,7 @@ $FreeBSD$
#define MXGE_FW_OFFSET 1024*1024
#define MXGE_EEPROM_STRINGS_SIZE 256
-#define MXGE_NUM_INTRQS 2
+#define MXGE_MAX_SEND_DESC 12
typedef struct {
void *addr;
@@ -52,18 +52,13 @@ typedef struct {
bus_dmamap_t map;
} mxge_dma_t;
-typedef struct mxge_intrq
-{
- mcp_slot_t *q[MXGE_NUM_INTRQS];
- int intrq;
- int slot;
- int maxslots;
- uint32_t seqnum;
- uint32_t spurious;
- uint32_t cnt;
- mxge_dma_t dma[MXGE_NUM_INTRQS];
-} mxge_intrq_t;
+typedef struct {
+ mcp_slot_t *entry;
+ mxge_dma_t dma;
+ int cnt;
+ int idx;
+} mxge_rx_done_t;
typedef struct
{
@@ -72,17 +67,23 @@ typedef struct
uint32_t data2;
} mxge_cmd_t;
-struct mxge_buffer_state {
+struct mxge_rx_buffer_state {
struct mbuf *m;
bus_dmamap_t map;
};
+struct mxge_tx_buffer_state {
+ struct mbuf *m;
+ bus_dmamap_t map;
+ int flag;
+};
+
typedef struct
{
volatile mcp_kreq_ether_recv_t *lanai; /* lanai ptr for recv ring */
volatile uint8_t *wc_fifo; /* w/c rx dma addr fifo address */
mcp_kreq_ether_recv_t *shadow; /* host shadow of recv ring */
- struct mxge_buffer_state *info;
+ struct mxge_rx_buffer_state *info;
bus_dma_tag_t dmat;
bus_dmamap_t extra_map;
int cnt;
@@ -96,11 +97,12 @@ typedef struct
volatile uint8_t *wc_fifo; /* w/c send fifo address */
mcp_kreq_ether_send_t *req_list; /* host shadow of sendq */
char *req_bytes;
- struct mxge_buffer_state *info;
+ struct mxge_tx_buffer_state *info;
bus_dma_tag_t dmat;
int req; /* transmits submitted */
int mask; /* number of transmit slots -1 */
int done; /* transmits completed */
+ int pkt_done; /* packets completed */
int boundary; /* boundary transmits cannot cross*/
} mxge_tx_buf_t;
@@ -113,23 +115,23 @@ typedef struct {
mxge_tx_buf_t tx; /* transmit ring */
mxge_rx_buf_t rx_small;
mxge_rx_buf_t rx_big;
+ mxge_rx_done_t rx_done;
+ mcp_irq_data_t *fw_stats;
bus_dma_tag_t parent_dmat;
volatile uint8_t *sram;
int sram_size;
+ volatile uint32_t *irq_deassert;
volatile uint32_t *irq_claim;
- char *mac_addr_string;
- char *product_code_string;
mcp_cmd_response_t *cmd;
mxge_dma_t cmd_dma;
mxge_dma_t zeropad_dma;
- mcp_stats_t *fw_stats;
mxge_dma_t fw_stats_dma;
struct pci_dev *pdev;
int msi_enabled;
- mxge_intrq_t intr;
int link_state;
unsigned int rdma_tags_available;
int intr_coal_delay;
+ volatile uint32_t *intr_coal_delay_ptr;
int wc;
struct mtx cmd_lock;
struct sx driver_lock;
@@ -147,6 +149,12 @@ typedef struct {
char fw_version[128];
device_t dev;
struct ifmedia media;
+ int read_dma;
+ int write_dma;
+ int read_write_dma;
+ char *mac_addr_string;
+ char product_code_string[64];
+ char serial_number_string[64];
} mxge_softc_t;