aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic.h
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-07-21 22:44:09 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-22 17:52:54 -0400
commitcd1f8160e015cd1538701b7de216cbeaefc6b0a8 (patch)
treeda264cfcbca7c5cc2989349a4536021204aa5c46 /drivers/net/netxen/netxen_nic.h
parentd9e651bc06690c5a5326e8d019fa7668409bc819 (diff)
netxen: enable tso6, intr coalescing.
Enable tso6 and ipv6 checksum, interrupt coalescing for NX3031. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/netxen/netxen_nic.h')
-rw-r--r--drivers/net/netxen/netxen_nic.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 705fdf10f95d..bcc551ef8519 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -1133,6 +1133,40 @@ typedef struct nx_mac_list_s {
1133 uint8_t mac_addr[MAX_ADDR_LEN]; 1133 uint8_t mac_addr[MAX_ADDR_LEN];
1134} nx_mac_list_t; 1134} nx_mac_list_t;
1135 1135
1136/*
1137 * Interrupt coalescing defaults. The defaults are for 1500 MTU. It is
1138 * adjusted based on configured MTU.
1139 */
1140#define NETXEN_DEFAULT_INTR_COALESCE_RX_TIME_US 3
1141#define NETXEN_DEFAULT_INTR_COALESCE_RX_PACKETS 256
1142#define NETXEN_DEFAULT_INTR_COALESCE_TX_PACKETS 64
1143#define NETXEN_DEFAULT_INTR_COALESCE_TX_TIME_US 4
1144
1145#define NETXEN_NIC_INTR_DEFAULT 0x04
1146
1147typedef union {
1148 struct {
1149 uint16_t rx_packets;
1150 uint16_t rx_time_us;
1151 uint16_t tx_packets;
1152 uint16_t tx_time_us;
1153 } data;
1154 uint64_t word;
1155} nx_nic_intr_coalesce_data_t;
1156
1157typedef struct {
1158 uint16_t stats_time_us;
1159 uint16_t rate_sample_time;
1160 uint16_t flags;
1161 uint16_t rsvd_1;
1162 uint32_t low_threshold;
1163 uint32_t high_threshold;
1164 nx_nic_intr_coalesce_data_t normal;
1165 nx_nic_intr_coalesce_data_t low;
1166 nx_nic_intr_coalesce_data_t high;
1167 nx_nic_intr_coalesce_data_t irq;
1168} nx_nic_intr_coalesce_t;
1169
1136typedef struct { 1170typedef struct {
1137 u64 qhdr; 1171 u64 qhdr;
1138 u64 req_hdr; 1172 u64 req_hdr;
@@ -1158,6 +1192,10 @@ typedef struct {
1158 1192
1159#define NETXEN_DB_MAPSIZE_BYTES 0x1000 1193#define NETXEN_DB_MAPSIZE_BYTES 0x1000
1160 1194
1195#define NETXEN_NETDEV_WEIGHT 120
1196#define NETXEN_ADAPTER_UP_MAGIC 777
1197#define NETXEN_NIC_PEG_TUNE 0
1198
1161struct netxen_dummy_dma { 1199struct netxen_dummy_dma {
1162 void *addr; 1200 void *addr;
1163 dma_addr_t phys_addr; 1201 dma_addr_t phys_addr;
@@ -1236,6 +1274,7 @@ struct netxen_adapter {
1236 1274
1237 int is_up; 1275 int is_up;
1238 struct netxen_dummy_dma dummy_dma; 1276 struct netxen_dummy_dma dummy_dma;
1277 nx_nic_intr_coalesce_t coal;
1239 1278
1240 /* Context interface shared between card and host */ 1279 /* Context interface shared between card and host */
1241 struct netxen_ring_ctx *ctx_desc; 1280 struct netxen_ring_ctx *ctx_desc;
@@ -1423,6 +1462,7 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter);
1423u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max); 1462u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctx, int max);
1424void netxen_p2_nic_set_multi(struct net_device *netdev); 1463void netxen_p2_nic_set_multi(struct net_device *netdev);
1425void netxen_p3_nic_set_multi(struct net_device *netdev); 1464void netxen_p3_nic_set_multi(struct net_device *netdev);
1465int netxen_config_intr_coalesce(struct netxen_adapter *adapter);
1426 1466
1427u32 nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, u32 mtu); 1467u32 nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, u32 mtu);
1428int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu); 1468int netxen_nic_change_mtu(struct net_device *netdev, int new_mtu);