aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/qeth_core.h')
-rw-r--r--drivers/s390/net/qeth_core.h50
1 files changed, 46 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 26a4110eeb2..b77c65ed138 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -110,6 +110,10 @@ struct qeth_perf_stats {
110 110
111 unsigned int sc_dp_p; 111 unsigned int sc_dp_p;
112 unsigned int sc_p_dp; 112 unsigned int sc_p_dp;
113 /* qdio_cq_handler: number of times called, time spent in */
114 __u64 cq_start_time;
115 unsigned int cq_cnt;
116 unsigned int cq_time;
113 /* qdio_input_handler: number of times called, time spent in */ 117 /* qdio_input_handler: number of times called, time spent in */
114 __u64 inbound_start_time; 118 __u64 inbound_start_time;
115 unsigned int inbound_cnt; 119 unsigned int inbound_cnt;
@@ -213,6 +217,7 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa,
213 */ 217 */
214#define QETH_TX_TIMEOUT 100 * HZ 218#define QETH_TX_TIMEOUT 100 * HZ
215#define QETH_RCD_TIMEOUT 60 * HZ 219#define QETH_RCD_TIMEOUT 60 * HZ
220#define QETH_RECLAIM_WORK_TIME HZ
216#define QETH_HEADER_SIZE 32 221#define QETH_HEADER_SIZE 32
217#define QETH_MAX_PORTNO 15 222#define QETH_MAX_PORTNO 15
218 223
@@ -231,7 +236,8 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa,
231#define QETH_IN_BUF_COUNT_MAX 128 236#define QETH_IN_BUF_COUNT_MAX 128
232#define QETH_MAX_BUFFER_ELEMENTS(card) ((card)->qdio.in_buf_size >> 12) 237#define QETH_MAX_BUFFER_ELEMENTS(card) ((card)->qdio.in_buf_size >> 12)
233#define QETH_IN_BUF_REQUEUE_THRESHOLD(card) \ 238#define QETH_IN_BUF_REQUEUE_THRESHOLD(card) \
234 ((card)->qdio.in_buf_pool.buf_count / 2) 239 ((card)->ssqd.qdioac1 & AC1_SIGA_INPUT_NEEDED ? 1 : \
240 ((card)->qdio.in_buf_pool.buf_count / 2))
235 241
236/* buffers we have to be behind before we get a PCI */ 242/* buffers we have to be behind before we get a PCI */
237#define QETH_PCI_THRESHOLD_A(card) ((card)->qdio.in_buf_pool.buf_count+1) 243#define QETH_PCI_THRESHOLD_A(card) ((card)->qdio.in_buf_pool.buf_count+1)
@@ -260,6 +266,7 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa,
260 266
261/* large receive scatter gather copy break */ 267/* large receive scatter gather copy break */
262#define QETH_RX_SG_CB (PAGE_SIZE >> 1) 268#define QETH_RX_SG_CB (PAGE_SIZE >> 1)
269#define QETH_RX_PULL_LEN 256
263 270
264struct qeth_hdr_layer3 { 271struct qeth_hdr_layer3 {
265 __u8 id; 272 __u8 id;
@@ -375,6 +382,21 @@ enum qeth_qdio_buffer_states {
375 * outbound: filled by driver; owned by hardware in order to be sent 382 * outbound: filled by driver; owned by hardware in order to be sent
376 */ 383 */
377 QETH_QDIO_BUF_PRIMED, 384 QETH_QDIO_BUF_PRIMED,
385 /*
386 * inbound: not applicable
387 * outbound: identified to be pending in TPQ
388 */
389 QETH_QDIO_BUF_PENDING,
390 /*
391 * inbound: not applicable
392 * outbound: found in completion queue
393 */
394 QETH_QDIO_BUF_IN_CQ,
395 /*
396 * inbound: not applicable
397 * outbound: handled via transfer pending / completion queue
398 */
399 QETH_QDIO_BUF_HANDLED_DELAYED,
378}; 400};
379 401
380enum qeth_qdio_info_states { 402enum qeth_qdio_info_states {
@@ -399,6 +421,7 @@ struct qeth_qdio_buffer {
399 struct qdio_buffer *buffer; 421 struct qdio_buffer *buffer;
400 /* the buffer pool entry currently associated to this buffer */ 422 /* the buffer pool entry currently associated to this buffer */
401 struct qeth_buffer_pool_entry *pool_entry; 423 struct qeth_buffer_pool_entry *pool_entry;
424 struct sk_buff *rx_skb;
402}; 425};
403 426
404struct qeth_qdio_q { 427struct qeth_qdio_q {
@@ -412,8 +435,11 @@ struct qeth_qdio_out_buffer {
412 atomic_t state; 435 atomic_t state;
413 int next_element_to_fill; 436 int next_element_to_fill;
414 struct sk_buff_head skb_list; 437 struct sk_buff_head skb_list;
415 struct list_head ctx_list;
416 int is_header[16]; 438 int is_header[16];
439
440 struct qaob *aob;
441 struct qeth_qdio_out_q *q;
442 struct qeth_qdio_out_buffer *next_pending;
417}; 443};
418 444
419struct qeth_card; 445struct qeth_card;
@@ -426,7 +452,8 @@ enum qeth_out_q_states {
426 452
427struct qeth_qdio_out_q { 453struct qeth_qdio_out_q {
428 struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q]; 454 struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q];
429 struct qeth_qdio_out_buffer bufs[QDIO_MAX_BUFFERS_PER_Q]; 455 struct qeth_qdio_out_buffer *bufs[QDIO_MAX_BUFFERS_PER_Q];
456 struct qdio_outbuf_state *bufstates; /* convenience pointer */
430 int queue_no; 457 int queue_no;
431 struct qeth_card *card; 458 struct qeth_card *card;
432 atomic_t state; 459 atomic_t state;
@@ -447,7 +474,9 @@ struct qeth_qdio_out_q {
447struct qeth_qdio_info { 474struct qeth_qdio_info {
448 atomic_t state; 475 atomic_t state;
449 /* input */ 476 /* input */
477 int no_in_queues;
450 struct qeth_qdio_q *in_q; 478 struct qeth_qdio_q *in_q;
479 struct qeth_qdio_q *c_q;
451 struct qeth_qdio_buffer_pool in_buf_pool; 480 struct qeth_qdio_buffer_pool in_buf_pool;
452 struct qeth_qdio_buffer_pool init_pool; 481 struct qeth_qdio_buffer_pool init_pool;
453 int in_buf_size; 482 int in_buf_size;
@@ -455,6 +484,7 @@ struct qeth_qdio_info {
455 /* output */ 484 /* output */
456 int no_out_queues; 485 int no_out_queues;
457 struct qeth_qdio_out_q **out_qs; 486 struct qeth_qdio_out_q **out_qs;
487 struct qdio_outbuf_state *out_bufstates;
458 488
459 /* priority queueing */ 489 /* priority queueing */
460 int do_prio_queueing; 490 int do_prio_queueing;
@@ -526,6 +556,12 @@ enum qeth_cmd_buffer_state {
526 BUF_STATE_PROCESSED, 556 BUF_STATE_PROCESSED,
527}; 557};
528 558
559enum qeth_cq {
560 QETH_CQ_DISABLED = 0,
561 QETH_CQ_ENABLED = 1,
562 QETH_CQ_NOTAVAILABLE = 2,
563};
564
529struct qeth_ipato { 565struct qeth_ipato {
530 int enabled; 566 int enabled;
531 int invert4; 567 int invert4;
@@ -650,6 +686,8 @@ struct qeth_card_options {
650 int rx_sg_cb; 686 int rx_sg_cb;
651 enum qeth_ipa_isolation_modes isolation; 687 enum qeth_ipa_isolation_modes isolation;
652 int sniffer; 688 int sniffer;
689 enum qeth_cq cq;
690 char hsuid[9];
653}; 691};
654 692
655/* 693/*
@@ -747,6 +785,8 @@ struct qeth_card {
747 struct mutex discipline_mutex; 785 struct mutex discipline_mutex;
748 struct napi_struct napi; 786 struct napi_struct napi;
749 struct qeth_rx rx; 787 struct qeth_rx rx;
788 struct delayed_work buffer_reclaim_work;
789 int reclaim_index;
750}; 790};
751 791
752struct qeth_card_list_struct { 792struct qeth_card_list_struct {
@@ -812,6 +852,7 @@ int qeth_core_create_device_attributes(struct device *);
812void qeth_core_remove_device_attributes(struct device *); 852void qeth_core_remove_device_attributes(struct device *);
813int qeth_core_create_osn_attributes(struct device *); 853int qeth_core_create_osn_attributes(struct device *);
814void qeth_core_remove_osn_attributes(struct device *); 854void qeth_core_remove_osn_attributes(struct device *);
855void qeth_buffer_reclaim_work(struct work_struct *);
815 856
816/* exports for qeth discipline device drivers */ 857/* exports for qeth discipline device drivers */
817extern struct qeth_card_list_struct qeth_core_card_list; 858extern struct qeth_card_list_struct qeth_core_card_list;
@@ -840,7 +881,7 @@ int qeth_check_qdio_errors(struct qeth_card *, struct qdio_buffer *,
840 unsigned int, const char *); 881 unsigned int, const char *);
841void qeth_queue_input_buffer(struct qeth_card *, int); 882void qeth_queue_input_buffer(struct qeth_card *, int);
842struct sk_buff *qeth_core_get_next_skb(struct qeth_card *, 883struct sk_buff *qeth_core_get_next_skb(struct qeth_card *,
843 struct qdio_buffer *, struct qdio_buffer_element **, int *, 884 struct qeth_qdio_buffer *, struct qdio_buffer_element **, int *,
844 struct qeth_hdr **); 885 struct qeth_hdr **);
845void qeth_schedule_recovery(struct qeth_card *); 886void qeth_schedule_recovery(struct qeth_card *);
846void qeth_qdio_start_poll(struct ccw_device *, int, unsigned long); 887void qeth_qdio_start_poll(struct ccw_device *, int, unsigned long);
@@ -887,6 +928,7 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);
887int qeth_core_ethtool_get_settings(struct net_device *, struct ethtool_cmd *); 928int qeth_core_ethtool_get_settings(struct net_device *, struct ethtool_cmd *);
888int qeth_set_access_ctrl_online(struct qeth_card *card); 929int qeth_set_access_ctrl_online(struct qeth_card *card);
889int qeth_hdr_chk_and_bounce(struct sk_buff *, int); 930int qeth_hdr_chk_and_bounce(struct sk_buff *, int);
931int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
890int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action); 932int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
891int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot); 933int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot);
892 934