aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ehea/ehea.h')
-rw-r--r--drivers/net/ehea/ehea.h42
1 files changed, 15 insertions, 27 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 42295d61ecd8..602872dbe15f 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@
39#include <asm/io.h> 39#include <asm/io.h>
40 40
41#define DRV_NAME "ehea" 41#define DRV_NAME "ehea"
42#define DRV_VERSION "EHEA_0046" 42#define DRV_VERSION "EHEA_0058"
43 43
44#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ 44#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) 45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
@@ -78,10 +78,7 @@
78#define EHEA_RQ2_PKT_SIZE 1522 78#define EHEA_RQ2_PKT_SIZE 1522
79#define EHEA_L_PKT_SIZE 256 /* low latency */ 79#define EHEA_L_PKT_SIZE 256 /* low latency */
80 80
81#define EHEA_POLL_MAX_RWQE 1000
82
83/* Send completion signaling */ 81/* Send completion signaling */
84#define EHEA_SIG_IV_LONG 1
85 82
86/* Protection Domain Identifier */ 83/* Protection Domain Identifier */
87#define EHEA_PD_ID 0xaabcdeff 84#define EHEA_PD_ID 0xaabcdeff
@@ -108,11 +105,7 @@
108#define EHEA_CACHE_LINE 128 105#define EHEA_CACHE_LINE 128
109 106
110/* Memory Regions */ 107/* Memory Regions */
111#define EHEA_MR_MAX_TX_PAGES 20
112#define EHEA_MR_TX_DATA_PN 3
113#define EHEA_MR_ACC_CTRL 0x00800000 108#define EHEA_MR_ACC_CTRL 0x00800000
114#define EHEA_RWQES_PER_MR_RQ2 10
115#define EHEA_RWQES_PER_MR_RQ3 10
116 109
117#define EHEA_WATCH_DOG_TIMEOUT 10*HZ 110#define EHEA_WATCH_DOG_TIMEOUT 10*HZ
118 111
@@ -311,6 +304,7 @@ struct ehea_cq {
311 * Memory Region 304 * Memory Region
312 */ 305 */
313struct ehea_mr { 306struct ehea_mr {
307 struct ehea_adapter *adapter;
314 u64 handle; 308 u64 handle;
315 u64 vaddr; 309 u64 vaddr;
316 u32 lkey; 310 u32 lkey;
@@ -319,17 +313,12 @@ struct ehea_mr {
319/* 313/*
320 * Port state information 314 * Port state information
321 */ 315 */
322struct port_state { 316struct port_stats {
323 int poll_max_processed;
324 int poll_receive_errors; 317 int poll_receive_errors;
325 int ehea_poll;
326 int queue_stopped; 318 int queue_stopped;
327 int min_swqe_avail; 319 int err_tcp_cksum;
328 u64 sqc_stop_sum; 320 int err_ip_cksum;
329 int pkt_send; 321 int err_frame_crc;
330 int pkt_xmit;
331 int send_tasklet;
332 int nwqe;
333}; 322};
334 323
335#define EHEA_IRQ_NAME_SIZE 20 324#define EHEA_IRQ_NAME_SIZE 20
@@ -348,6 +337,7 @@ struct ehea_q_skb_arr {
348 * Port resources 337 * Port resources
349 */ 338 */
350struct ehea_port_res { 339struct ehea_port_res {
340 struct port_stats p_stats;
351 struct ehea_mr send_mr; /* send memory region */ 341 struct ehea_mr send_mr; /* send memory region */
352 struct ehea_mr recv_mr; /* receive memory region */ 342 struct ehea_mr recv_mr; /* receive memory region */
353 spinlock_t xmit_lock; 343 spinlock_t xmit_lock;
@@ -357,9 +347,8 @@ struct ehea_port_res {
357 struct ehea_qp *qp; 347 struct ehea_qp *qp;
358 struct ehea_cq *send_cq; 348 struct ehea_cq *send_cq;
359 struct ehea_cq *recv_cq; 349 struct ehea_cq *recv_cq;
360 struct ehea_eq *send_eq; 350 struct ehea_eq *eq;
361 struct ehea_eq *recv_eq; 351 struct net_device *d_netdev;
362 spinlock_t send_lock;
363 struct ehea_q_skb_arr rq1_skba; 352 struct ehea_q_skb_arr rq1_skba;
364 struct ehea_q_skb_arr rq2_skba; 353 struct ehea_q_skb_arr rq2_skba;
365 struct ehea_q_skb_arr rq3_skba; 354 struct ehea_q_skb_arr rq3_skba;
@@ -369,21 +358,18 @@ struct ehea_port_res {
369 int swqe_refill_th; 358 int swqe_refill_th;
370 atomic_t swqe_avail; 359 atomic_t swqe_avail;
371 int swqe_ll_count; 360 int swqe_ll_count;
372 int swqe_count;
373 u32 swqe_id_counter; 361 u32 swqe_id_counter;
374 u64 tx_packets; 362 u64 tx_packets;
375 struct tasklet_struct send_comp_task;
376 spinlock_t recv_lock;
377 struct port_state p_state;
378 u64 rx_packets; 363 u64 rx_packets;
379 u32 poll_counter; 364 u32 poll_counter;
380}; 365};
381 366
382 367
368#define EHEA_MAX_PORTS 16
383struct ehea_adapter { 369struct ehea_adapter {
384 u64 handle; 370 u64 handle;
385 u8 num_ports; 371 struct ibmebus_dev *ebus_dev;
386 struct ehea_port *port[16]; 372 struct ehea_port *port[EHEA_MAX_PORTS];
387 struct ehea_eq *neq; /* notification event queue */ 373 struct ehea_eq *neq; /* notification event queue */
388 struct workqueue_struct *ehea_wq; 374 struct workqueue_struct *ehea_wq;
389 struct tasklet_struct neq_tasklet; 375 struct tasklet_struct neq_tasklet;
@@ -406,7 +392,7 @@ struct ehea_port {
406 struct net_device *netdev; 392 struct net_device *netdev;
407 struct net_device_stats stats; 393 struct net_device_stats stats;
408 struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; 394 struct ehea_port_res port_res[EHEA_MAX_PORT_RES];
409 struct device_node *of_dev_node; /* Open Firmware Device Node */ 395 struct of_device ofdev; /* Open Firmware Device */
410 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ 396 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */
411 struct vlan_group *vgrp; 397 struct vlan_group *vgrp;
412 struct ehea_eq *qp_eq; 398 struct ehea_eq *qp_eq;
@@ -415,7 +401,9 @@ struct ehea_port {
415 char int_aff_name[EHEA_IRQ_NAME_SIZE]; 401 char int_aff_name[EHEA_IRQ_NAME_SIZE];
416 int allmulti; /* Indicates IFF_ALLMULTI state */ 402 int allmulti; /* Indicates IFF_ALLMULTI state */
417 int promisc; /* Indicates IFF_PROMISC state */ 403 int promisc; /* Indicates IFF_PROMISC state */
404 int num_tx_qps;
418 int num_add_tx_qps; 405 int num_add_tx_qps;
406 int num_mcs;
419 int resets; 407 int resets;
420 u64 mac_addr; 408 u64 mac_addr;
421 u32 logical_port_id; 409 u32 logical_port_id;