1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#ifndef __BNA_TYPES_H__
19#define __BNA_TYPES_H__
20
21#include "cna.h"
22#include "bna_hw_defs.h"
23#include "bfa_cee.h"
24#include "bfa_msgq.h"
25
26
27
28struct bna_mcam_handle;
29struct bna_txq;
30struct bna_tx;
31struct bna_rxq;
32struct bna_cq;
33struct bna_rx;
34struct bna_rxf;
35struct bna_enet;
36struct bna;
37struct bnad;
38
39
40
41enum bna_status {
42 BNA_STATUS_T_DISABLED = 0,
43 BNA_STATUS_T_ENABLED = 1
44};
45
46enum bna_cleanup_type {
47 BNA_HARD_CLEANUP = 0,
48 BNA_SOFT_CLEANUP = 1
49};
50
51enum bna_cb_status {
52 BNA_CB_SUCCESS = 0,
53 BNA_CB_FAIL = 1,
54 BNA_CB_INTERRUPT = 2,
55 BNA_CB_BUSY = 3,
56 BNA_CB_INVALID_MAC = 4,
57 BNA_CB_MCAST_LIST_FULL = 5,
58 BNA_CB_UCAST_CAM_FULL = 6,
59 BNA_CB_WAITING = 7,
60 BNA_CB_NOT_EXEC = 8
61};
62
63enum bna_res_type {
64 BNA_RES_T_MEM = 1,
65 BNA_RES_T_INTR = 2
66};
67
68enum bna_mem_type {
69 BNA_MEM_T_KVA = 1,
70 BNA_MEM_T_DMA = 2
71};
72
73enum bna_intr_type {
74 BNA_INTR_T_INTX = 1,
75 BNA_INTR_T_MSIX = 2
76};
77
78enum bna_res_req_type {
79 BNA_RES_MEM_T_COM = 0,
80 BNA_RES_MEM_T_ATTR = 1,
81 BNA_RES_MEM_T_FWTRC = 2,
82 BNA_RES_MEM_T_STATS = 3,
83 BNA_RES_T_MAX
84};
85
86enum bna_mod_res_req_type {
87 BNA_MOD_RES_MEM_T_TX_ARRAY = 0,
88 BNA_MOD_RES_MEM_T_TXQ_ARRAY = 1,
89 BNA_MOD_RES_MEM_T_RX_ARRAY = 2,
90 BNA_MOD_RES_MEM_T_RXP_ARRAY = 3,
91 BNA_MOD_RES_MEM_T_RXQ_ARRAY = 4,
92 BNA_MOD_RES_MEM_T_UCMAC_ARRAY = 5,
93 BNA_MOD_RES_MEM_T_MCMAC_ARRAY = 6,
94 BNA_MOD_RES_MEM_T_MCHANDLE_ARRAY = 7,
95 BNA_MOD_RES_T_MAX
96};
97
98enum bna_tx_res_req_type {
99 BNA_TX_RES_MEM_T_TCB = 0,
100 BNA_TX_RES_MEM_T_UNMAPQ = 1,
101 BNA_TX_RES_MEM_T_QPT = 2,
102 BNA_TX_RES_MEM_T_SWQPT = 3,
103 BNA_TX_RES_MEM_T_PAGE = 4,
104 BNA_TX_RES_MEM_T_IBIDX = 5,
105 BNA_TX_RES_INTR_T_TXCMPL = 6,
106 BNA_TX_RES_T_MAX,
107};
108
109enum bna_rx_mem_type {
110 BNA_RX_RES_MEM_T_CCB = 0,
111 BNA_RX_RES_MEM_T_RCB = 1,
112 BNA_RX_RES_MEM_T_UNMAPQ = 2,
113 BNA_RX_RES_MEM_T_CQPT = 3,
114 BNA_RX_RES_MEM_T_CSWQPT = 4,
115 BNA_RX_RES_MEM_T_CQPT_PAGE = 5,
116 BNA_RX_RES_MEM_T_HQPT = 6,
117 BNA_RX_RES_MEM_T_DQPT = 7,
118 BNA_RX_RES_MEM_T_HSWQPT = 8,
119 BNA_RX_RES_MEM_T_DSWQPT = 9,
120 BNA_RX_RES_MEM_T_DPAGE = 10,
121 BNA_RX_RES_MEM_T_HPAGE = 11,
122 BNA_RX_RES_MEM_T_IBIDX = 12,
123 BNA_RX_RES_MEM_T_RIT = 13,
124 BNA_RX_RES_T_INTR = 14,
125 BNA_RX_RES_T_MAX = 15
126};
127
128enum bna_tx_type {
129 BNA_TX_T_REGULAR = 0,
130 BNA_TX_T_LOOPBACK = 1,
131};
132
133enum bna_tx_flags {
134 BNA_TX_F_ENET_STARTED = 1,
135 BNA_TX_F_ENABLED = 2,
136 BNA_TX_F_PRIO_CHANGED = 4,
137 BNA_TX_F_BW_UPDATED = 8,
138};
139
140enum bna_tx_mod_flags {
141 BNA_TX_MOD_F_ENET_STARTED = 1,
142 BNA_TX_MOD_F_ENET_LOOPBACK = 2,
143};
144
145enum bna_rx_type {
146 BNA_RX_T_REGULAR = 0,
147 BNA_RX_T_LOOPBACK = 1,
148};
149
150enum bna_rxp_type {
151 BNA_RXP_SINGLE = 1,
152 BNA_RXP_SLR = 2,
153 BNA_RXP_HDS = 3
154};
155
156enum bna_rxmode {
157 BNA_RXMODE_PROMISC = 1,
158 BNA_RXMODE_DEFAULT = 2,
159 BNA_RXMODE_ALLMULTI = 4
160};
161
162enum bna_rx_event {
163 RX_E_START = 1,
164 RX_E_STOP = 2,
165 RX_E_FAIL = 3,
166 RX_E_STARTED = 4,
167 RX_E_STOPPED = 5,
168 RX_E_RXF_STARTED = 6,
169 RX_E_RXF_STOPPED = 7,
170 RX_E_CLEANUP_DONE = 8,
171};
172
173enum bna_rx_flags {
174 BNA_RX_F_ENET_STARTED = 1,
175 BNA_RX_F_ENABLED = 2,
176};
177
178enum bna_rx_mod_flags {
179 BNA_RX_MOD_F_ENET_STARTED = 1,
180 BNA_RX_MOD_F_ENET_LOOPBACK = 2,
181};
182
183enum bna_rxf_flags {
184 BNA_RXF_F_PAUSED = 1,
185};
186
187enum bna_rxf_event {
188 RXF_E_START = 1,
189 RXF_E_STOP = 2,
190 RXF_E_FAIL = 3,
191 RXF_E_CONFIG = 4,
192 RXF_E_PAUSE = 5,
193 RXF_E_RESUME = 6,
194 RXF_E_FW_RESP = 7,
195};
196
197enum bna_enet_type {
198 BNA_ENET_T_REGULAR = 0,
199 BNA_ENET_T_LOOPBACK_INTERNAL = 1,
200 BNA_ENET_T_LOOPBACK_EXTERNAL = 2,
201};
202
203enum bna_link_status {
204 BNA_LINK_DOWN = 0,
205 BNA_LINK_UP = 1,
206 BNA_CEE_UP = 2
207};
208
209enum bna_ethport_flags {
210 BNA_ETHPORT_F_ADMIN_UP = 1,
211 BNA_ETHPORT_F_PORT_ENABLED = 2,
212 BNA_ETHPORT_F_RX_STARTED = 4,
213};
214
215enum bna_enet_flags {
216 BNA_ENET_F_IOCETH_READY = 1,
217 BNA_ENET_F_ENABLED = 2,
218 BNA_ENET_F_PAUSE_CHANGED = 4,
219 BNA_ENET_F_MTU_CHANGED = 8
220};
221
222enum bna_rss_flags {
223 BNA_RSS_F_RIT_PENDING = 1,
224 BNA_RSS_F_CFG_PENDING = 2,
225 BNA_RSS_F_STATUS_PENDING = 4,
226};
227
228enum bna_mod_flags {
229 BNA_MOD_F_INIT_DONE = 1,
230};
231
232enum bna_pkt_rates {
233 BNA_PKT_RATE_10K = 10000,
234 BNA_PKT_RATE_20K = 20000,
235 BNA_PKT_RATE_30K = 30000,
236 BNA_PKT_RATE_40K = 40000,
237 BNA_PKT_RATE_50K = 50000,
238 BNA_PKT_RATE_60K = 60000,
239 BNA_PKT_RATE_70K = 70000,
240 BNA_PKT_RATE_80K = 80000,
241};
242
243enum bna_dim_load_types {
244 BNA_LOAD_T_HIGH_4 = 0,
245 BNA_LOAD_T_HIGH_3 = 1,
246 BNA_LOAD_T_HIGH_2 = 2,
247 BNA_LOAD_T_HIGH_1 = 3,
248 BNA_LOAD_T_LOW_1 = 4,
249 BNA_LOAD_T_LOW_2 = 5,
250 BNA_LOAD_T_LOW_3 = 6,
251 BNA_LOAD_T_LOW_4 = 7,
252 BNA_LOAD_T_MAX = 8
253};
254
255enum bna_dim_bias_types {
256 BNA_BIAS_T_SMALL = 0,
257 BNA_BIAS_T_LARGE = 1,
258 BNA_BIAS_T_MAX = 2
259};
260
261#define BNA_MAX_NAME_SIZE 64
262struct bna_ident {
263 int id;
264 char name[BNA_MAX_NAME_SIZE];
265};
266
267struct bna_mac {
268
269 struct list_head qe;
270 u8 addr[ETH_ALEN];
271 struct bna_mcam_handle *handle;
272};
273
274struct bna_mem_descr {
275 u32 len;
276 void *kva;
277 struct bna_dma_addr dma;
278};
279
280struct bna_mem_info {
281 enum bna_mem_type mem_type;
282 u32 len;
283 u32 num;
284 u32 align_sz;
285 struct bna_mem_descr *mdl;
286 void *cookie;
287};
288
289struct bna_intr_descr {
290 int vector;
291};
292
293struct bna_intr_info {
294 enum bna_intr_type intr_type;
295 int num;
296 struct bna_intr_descr *idl;
297};
298
299union bna_res_u {
300 struct bna_mem_info mem_info;
301 struct bna_intr_info intr_info;
302};
303
304struct bna_res_info {
305 enum bna_res_type res_type;
306 union bna_res_u res_u;
307};
308
309
310struct bna_qpt {
311 struct bna_dma_addr hw_qpt_ptr;
312 void *kv_qpt_ptr;
313 u32 page_count;
314 u32 page_size;
315};
316
317struct bna_attr {
318 bool fw_query_complete;
319 int num_txq;
320 int num_rxp;
321 int num_ucmac;
322 int num_mcmac;
323 int max_rit_size;
324};
325
326
327
328struct bna_ioceth {
329 bfa_fsm_t fsm;
330 struct bfa_ioc ioc;
331
332 struct bna_attr attr;
333 struct bfa_msgq_cmd_entry msgq_cmd;
334 struct bfi_enet_attr_req attr_req;
335
336 void (*stop_cbfn)(struct bnad *bnad);
337 struct bnad *stop_cbarg;
338
339 struct bna *bna;
340};
341
342
343
344
345struct bna_pause_config {
346 enum bna_status tx_pause;
347 enum bna_status rx_pause;
348};
349
350struct bna_enet {
351 bfa_fsm_t fsm;
352 enum bna_enet_flags flags;
353
354 enum bna_enet_type type;
355
356 struct bna_pause_config pause_config;
357 int mtu;
358
359
360 void (*stop_cbfn)(void *);
361 void *stop_cbarg;
362
363
364 void (*pause_cbfn)(struct bnad *);
365
366
367 void (*mtu_cbfn)(struct bnad *);
368
369 struct bfa_wc chld_stop_wc;
370
371 struct bfa_msgq_cmd_entry msgq_cmd;
372 struct bfi_enet_set_pause_req pause_req;
373
374 struct bna *bna;
375};
376
377
378
379struct bna_ethport {
380 bfa_fsm_t fsm;
381 enum bna_ethport_flags flags;
382
383 enum bna_link_status link_status;
384
385 int rx_started_count;
386
387 void (*stop_cbfn)(struct bna_enet *);
388
389 void (*adminup_cbfn)(struct bnad *, enum bna_cb_status);
390
391 void (*link_cbfn)(struct bnad *, enum bna_link_status);
392
393 struct bfa_msgq_cmd_entry msgq_cmd;
394 union {
395 struct bfi_enet_enable_req admin_req;
396 struct bfi_enet_diag_lb_req lpbk_req;
397 } bfi_enet_cmd;
398
399 struct bna *bna;
400};
401
402
403
404
405struct bna_ib_dbell {
406 void __iomem *doorbell_addr;
407 u32 doorbell_ack;
408};
409
410
411struct bna_ib {
412 struct bna_dma_addr ib_seg_host_addr;
413 void *ib_seg_host_addr_kva;
414
415 struct bna_ib_dbell door_bell;
416
417 enum bna_intr_type intr_type;
418 int intr_vector;
419
420 u8 coalescing_timeo;
421
422 int interpkt_count;
423 int interpkt_timeo;
424};
425
426
427
428
429#define BNA_Q_NAME_SIZE 16
430struct bna_tcb {
431
432 void **sw_qpt;
433 void *unmap_q;
434 u32 producer_index;
435 u32 consumer_index;
436 volatile u32 *hw_consumer_index;
437 u32 q_depth;
438 void __iomem *q_dbell;
439 struct bna_ib_dbell *i_dbell;
440 int page_idx;
441 int page_count;
442
443 struct bna_txq *txq;
444 struct bnad *bnad;
445 void *priv;
446 enum bna_intr_type intr_type;
447 int intr_vector;
448 u8 priority;
449 unsigned long flags;
450 int id;
451 char name[BNA_Q_NAME_SIZE];
452};
453
454
455struct bna_txq {
456
457 struct list_head qe;
458
459 u8 priority;
460
461 struct bna_qpt qpt;
462 struct bna_tcb *tcb;
463 struct bna_ib ib;
464
465 struct bna_tx *tx;
466
467 int hw_id;
468
469 u64 tx_packets;
470 u64 tx_bytes;
471};
472
473
474struct bna_tx {
475
476 struct list_head qe;
477 int rid;
478 int hw_id;
479
480 bfa_fsm_t fsm;
481 enum bna_tx_flags flags;
482
483 enum bna_tx_type type;
484 int num_txq;
485
486 struct list_head txq_q;
487 u16 txf_vlan_id;
488
489
490 void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
491 void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
492 void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
493 void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
494 void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
495
496
497 void (*stop_cbfn)(void *arg, struct bna_tx *tx);
498 void *stop_cbarg;
499
500
501 void (*prio_change_cbfn)(struct bnad *bnad, struct bna_tx *tx);
502
503 struct bfa_msgq_cmd_entry msgq_cmd;
504 union {
505 struct bfi_enet_tx_cfg_req cfg_req;
506 struct bfi_enet_req req;
507 struct bfi_enet_tx_cfg_rsp cfg_rsp;
508 } bfi_enet_cmd;
509
510 struct bna *bna;
511 void *priv;
512};
513
514
515struct bna_tx_config {
516 int num_txq;
517 int txq_depth;
518 int coalescing_timeo;
519 enum bna_tx_type tx_type;
520};
521
522struct bna_tx_event_cbfn {
523
524 void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
525 void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
526
527 void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
528 void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
529 void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
530};
531
532
533struct bna_tx_mod {
534 struct bna_tx *tx;
535 struct bna_txq *txq;
536
537 struct list_head tx_free_q;
538 struct list_head tx_active_q;
539
540 struct list_head txq_free_q;
541
542
543 void (*stop_cbfn)(struct bna_enet *enet);
544
545 struct bfa_wc tx_stop_wc;
546
547 enum bna_tx_mod_flags flags;
548
549 u8 prio_map;
550 int default_prio;
551 int iscsi_over_cee;
552 int iscsi_prio;
553 int prio_reconfigured;
554
555 u32 rid_mask;
556
557 struct bna *bna;
558};
559
560
561
562
563struct bna_rcb {
564
565 void **sw_qpt;
566 void *unmap_q;
567 u32 producer_index;
568 u32 consumer_index;
569 u32 q_depth;
570 void __iomem *q_dbell;
571 int page_idx;
572 int page_count;
573
574 struct bna_rxq *rxq;
575 struct bna_ccb *ccb;
576 struct bnad *bnad;
577 void *priv;
578 unsigned long flags;
579 int id;
580};
581
582
583struct bna_rxq {
584 struct list_head qe;
585
586 int buffer_size;
587 int q_depth;
588
589 struct bna_qpt qpt;
590 struct bna_rcb *rcb;
591
592 struct bna_rxp *rxp;
593 struct bna_rx *rx;
594
595 int hw_id;
596
597 u64 rx_packets;
598 u64 rx_bytes;
599 u64 rx_packets_with_error;
600 u64 rxbuf_alloc_failed;
601};
602
603
604union bna_rxq_u {
605 struct {
606 struct bna_rxq *hdr;
607 struct bna_rxq *data;
608 } hds;
609 struct {
610 struct bna_rxq *small;
611 struct bna_rxq *large;
612 } slr;
613 struct {
614 struct bna_rxq *only;
615 struct bna_rxq *reserved;
616 } single;
617};
618
619
620struct bna_pkt_rate {
621 u32 small_pkt_cnt;
622 u32 large_pkt_cnt;
623};
624
625
626struct bna_ccb {
627
628 void **sw_qpt;
629 u32 producer_index;
630 volatile u32 *hw_producer_index;
631 u32 q_depth;
632 struct bna_ib_dbell *i_dbell;
633 struct bna_rcb *rcb[2];
634 void *ctrl;
635 struct bna_pkt_rate pkt_rate;
636 int page_idx;
637 int page_count;
638
639
640 struct bna_cq *cq;
641 struct bnad *bnad;
642 void *priv;
643 enum bna_intr_type intr_type;
644 int intr_vector;
645 u8 rx_coalescing_timeo;
646 int id;
647 char name[BNA_Q_NAME_SIZE];
648};
649
650
651struct bna_cq {
652 struct bna_qpt qpt;
653 struct bna_ccb *ccb;
654
655 struct bna_ib ib;
656
657 struct bna_rx *rx;
658};
659
660struct bna_rss_config {
661 enum bfi_enet_rss_type hash_type;
662 u8 hash_mask;
663 u32 toeplitz_hash_key[BFI_ENET_RSS_KEY_LEN];
664};
665
666struct bna_hds_config {
667 enum bfi_enet_hds_type hdr_type;
668 int forced_offset;
669};
670
671
672struct bna_rx_config {
673 enum bna_rx_type rx_type;
674 int num_paths;
675 enum bna_rxp_type rxp_type;
676 int paused;
677 int q_depth;
678 int coalescing_timeo;
679
680
681
682
683
684 int small_buff_size;
685
686 enum bna_status rss_status;
687 struct bna_rss_config rss_config;
688
689 struct bna_hds_config hds_config;
690
691 enum bna_status vlan_strip_status;
692};
693
694
695struct bna_rxp {
696
697 struct list_head qe;
698
699 enum bna_rxp_type type;
700 union bna_rxq_u rxq;
701 struct bna_cq cq;
702
703 struct bna_rx *rx;
704
705
706 int vector;
707 int hw_id;
708};
709
710
711struct bna_rxf {
712 bfa_fsm_t fsm;
713 enum bna_rxf_flags flags;
714
715 struct bfa_msgq_cmd_entry msgq_cmd;
716 union {
717 struct bfi_enet_enable_req req;
718 struct bfi_enet_rss_cfg_req rss_req;
719 struct bfi_enet_rit_req rit_req;
720 struct bfi_enet_rx_vlan_req vlan_req;
721 struct bfi_enet_mcast_add_req mcast_add_req;
722 struct bfi_enet_mcast_del_req mcast_del_req;
723 struct bfi_enet_ucast_req ucast_req;
724 } bfi_enet_cmd;
725
726
727 void (*start_cbfn) (struct bna_rx *rx);
728 struct bna_rx *start_cbarg;
729
730
731 void (*stop_cbfn) (struct bna_rx *rx);
732 struct bna_rx *stop_cbarg;
733
734
735 void (*oper_state_cbfn) (struct bnad *bnad, struct bna_rx *rx);
736 struct bnad *oper_state_cbarg;
737
738
739
740
741
742
743
744
745 void (*cam_fltr_cbfn)(struct bnad *bnad, struct bna_rx *rx);
746 struct bnad *cam_fltr_cbarg;
747
748
749 struct list_head ucast_pending_add_q;
750 struct list_head ucast_pending_del_q;
751 struct bna_mac *ucast_pending_mac;
752 int ucast_pending_set;
753
754 struct list_head ucast_active_q;
755 struct bna_mac ucast_active_mac;
756 int ucast_active_set;
757
758
759 struct list_head mcast_pending_add_q;
760 struct list_head mcast_pending_del_q;
761
762 struct list_head mcast_active_q;
763 struct list_head mcast_handle_q;
764
765
766 enum bna_rxmode rxmode_pending;
767 enum bna_rxmode rxmode_pending_bitmask;
768
769 enum bna_rxmode rxmode_active;
770
771 u8 vlan_pending_bitmask;
772 enum bna_status vlan_filter_status;
773 u32 vlan_filter_table[(BFI_ENET_VLAN_ID_MAX) / 32];
774 bool vlan_strip_pending;
775 enum bna_status vlan_strip_status;
776
777 enum bna_rss_flags rss_pending;
778 enum bna_status rss_status;
779 struct bna_rss_config rss_cfg;
780 u8 *rit;
781 int rit_size;
782
783 struct bna_rx *rx;
784};
785
786
787struct bna_rx {
788
789 struct list_head qe;
790 int rid;
791 int hw_id;
792
793 bfa_fsm_t fsm;
794
795 enum bna_rx_type type;
796
797 int num_paths;
798 struct list_head rxp_q;
799
800 struct bna_hds_config hds_cfg;
801
802 struct bna_rxf rxf;
803
804 enum bna_rx_flags rx_flags;
805
806 struct bfa_msgq_cmd_entry msgq_cmd;
807 union {
808 struct bfi_enet_rx_cfg_req cfg_req;
809 struct bfi_enet_req req;
810 struct bfi_enet_rx_cfg_rsp cfg_rsp;
811 } bfi_enet_cmd;
812
813
814 void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
815 void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
816 void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
817 void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
818 void (*rx_stall_cbfn)(struct bnad *, struct bna_rx *);
819 void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
820 void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
821
822
823 void (*stop_cbfn)(void *arg, struct bna_rx *rx);
824 void *stop_cbarg;
825
826 struct bna *bna;
827 void *priv;
828};
829
830struct bna_rx_event_cbfn {
831
832 void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
833 void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
834 void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
835 void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
836 void (*rx_stall_cbfn)(struct bnad *, struct bna_rx *);
837
838 void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
839 void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
840};
841
842
843struct bna_rx_mod {
844 struct bna *bna;
845 struct bna_rx *rx;
846 struct bna_rxp *rxp;
847 struct bna_rxq *rxq;
848
849 struct list_head rx_free_q;
850 struct list_head rx_active_q;
851 int rx_free_count;
852
853 struct list_head rxp_free_q;
854 int rxp_free_count;
855
856 struct list_head rxq_free_q;
857 int rxq_free_count;
858
859 enum bna_rx_mod_flags flags;
860
861
862 void (*stop_cbfn)(struct bna_enet *enet);
863
864 struct bfa_wc rx_stop_wc;
865 u32 dim_vector[BNA_LOAD_T_MAX][BNA_BIAS_T_MAX];
866 u32 rid_mask;
867};
868
869
870
871struct bna_ucam_mod {
872 struct bna_mac *ucmac;
873 struct list_head free_q;
874
875 struct bna *bna;
876};
877
878struct bna_mcam_handle {
879
880 struct list_head qe;
881 int handle;
882 int refcnt;
883};
884
885struct bna_mcam_mod {
886 struct bna_mac *mcmac;
887 struct bna_mcam_handle *mchandle;
888 struct list_head free_q;
889 struct list_head free_handle_q;
890
891 struct bna *bna;
892};
893
894
895
896struct bna_stats {
897 struct bna_dma_addr hw_stats_dma;
898 struct bfi_enet_stats *hw_stats_kva;
899 struct bfi_enet_stats hw_stats;
900};
901
902struct bna_stats_mod {
903 bool ioc_ready;
904 bool stats_get_busy;
905 bool stats_clr_busy;
906 struct bfa_msgq_cmd_entry stats_get_cmd;
907 struct bfa_msgq_cmd_entry stats_clr_cmd;
908 struct bfi_enet_stats_req stats_get;
909 struct bfi_enet_stats_req stats_clr;
910};
911
912
913
914struct bna {
915 struct bna_ident ident;
916 struct bfa_pcidev pcidev;
917
918 struct bna_reg regs;
919 struct bna_bit_defn bits;
920
921 struct bna_stats stats;
922
923 struct bna_ioceth ioceth;
924 struct bfa_cee cee;
925 struct bfa_flash flash;
926 struct bfa_msgq msgq;
927
928 struct bna_ethport ethport;
929 struct bna_enet enet;
930 struct bna_stats_mod stats_mod;
931
932 struct bna_tx_mod tx_mod;
933 struct bna_rx_mod rx_mod;
934 struct bna_ucam_mod ucam_mod;
935 struct bna_mcam_mod mcam_mod;
936
937 enum bna_mod_flags mod_flags;
938
939 int default_mode_rid;
940 int promisc_rid;
941
942 struct bnad *bnad;
943};
944#endif
945