2 * Linux network driver for Brocade Converged Network Adapter.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License (GPL) Version 2 as
6 * published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
14 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
18 #ifndef __BNA_TYPES_H__
19 #define __BNA_TYPES_H__
22 #include "bna_hw_defs.h"
29 * Forward declarations
33 struct bna_mcam_handle;
47 * Enums, primitive data types
52 BNA_STATUS_T_DISABLED = 0,
53 BNA_STATUS_T_ENABLED = 1
56 enum bna_cleanup_type {
66 BNA_CB_INVALID_MAC = 4,
67 BNA_CB_MCAST_LIST_FULL = 5,
68 BNA_CB_UCAST_CAM_FULL = 6,
88 enum bna_res_req_type {
89 BNA_RES_MEM_T_COM = 0,
90 BNA_RES_MEM_T_ATTR = 1,
91 BNA_RES_MEM_T_FWTRC = 2,
92 BNA_RES_MEM_T_STATS = 3,
93 BNA_RES_MEM_T_SWSTATS = 4,
94 BNA_RES_MEM_T_IBIDX = 5,
95 BNA_RES_MEM_T_IB_ARRAY = 6,
96 BNA_RES_MEM_T_INTR_ARRAY = 7,
97 BNA_RES_MEM_T_IDXSEG_ARRAY = 8,
98 BNA_RES_MEM_T_TX_ARRAY = 9,
99 BNA_RES_MEM_T_TXQ_ARRAY = 10,
100 BNA_RES_MEM_T_RX_ARRAY = 11,
101 BNA_RES_MEM_T_RXP_ARRAY = 12,
102 BNA_RES_MEM_T_RXQ_ARRAY = 13,
103 BNA_RES_MEM_T_UCMAC_ARRAY = 14,
104 BNA_RES_MEM_T_MCMAC_ARRAY = 15,
105 BNA_RES_MEM_T_RIT_ENTRY = 16,
106 BNA_RES_MEM_T_RIT_SEGMENT = 17,
107 BNA_RES_INTR_T_MBOX = 18,
111 enum bna_mod_res_req_type {
112 BNA_MOD_RES_MEM_T_TX_ARRAY = 0,
113 BNA_MOD_RES_MEM_T_TXQ_ARRAY = 1,
114 BNA_MOD_RES_MEM_T_RX_ARRAY = 2,
115 BNA_MOD_RES_MEM_T_RXP_ARRAY = 3,
116 BNA_MOD_RES_MEM_T_RXQ_ARRAY = 4,
117 BNA_MOD_RES_MEM_T_UCMAC_ARRAY = 5,
118 BNA_MOD_RES_MEM_T_MCMAC_ARRAY = 6,
119 BNA_MOD_RES_MEM_T_MCHANDLE_ARRAY = 7,
123 enum bna_tx_res_req_type {
124 BNA_TX_RES_MEM_T_TCB = 0,
125 BNA_TX_RES_MEM_T_UNMAPQ = 1,
126 BNA_TX_RES_MEM_T_QPT = 2,
127 BNA_TX_RES_MEM_T_SWQPT = 3,
128 BNA_TX_RES_MEM_T_PAGE = 4,
129 BNA_TX_RES_MEM_T_IBIDX = 5,
130 BNA_TX_RES_INTR_T_TXCMPL = 6,
134 enum bna_rx_mem_type {
135 BNA_RX_RES_MEM_T_CCB = 0, /* CQ context */
136 BNA_RX_RES_MEM_T_RCB = 1, /* CQ context */
137 BNA_RX_RES_MEM_T_UNMAPQ = 2, /* UnmapQ for RxQs */
138 BNA_RX_RES_MEM_T_CQPT = 3, /* CQ QPT */
139 BNA_RX_RES_MEM_T_CSWQPT = 4, /* S/W QPT */
140 BNA_RX_RES_MEM_T_CQPT_PAGE = 5, /* CQPT page */
141 BNA_RX_RES_MEM_T_HQPT = 6, /* RX QPT */
142 BNA_RX_RES_MEM_T_DQPT = 7, /* RX QPT */
143 BNA_RX_RES_MEM_T_HSWQPT = 8, /* RX s/w QPT */
144 BNA_RX_RES_MEM_T_DSWQPT = 9, /* RX s/w QPT */
145 BNA_RX_RES_MEM_T_DPAGE = 10, /* RX s/w QPT */
146 BNA_RX_RES_MEM_T_HPAGE = 11, /* RX s/w QPT */
147 BNA_RX_RES_MEM_T_IBIDX = 12,
148 BNA_RX_RES_MEM_T_RIT = 13,
149 BNA_RX_RES_T_INTR = 14, /* Rx interrupts */
150 BNA_RX_RES_T_MAX = 15
153 enum bna_mbox_state {
159 BNA_TX_T_REGULAR = 0,
160 BNA_TX_T_LOOPBACK = 1,
164 BNA_TX_F_ENET_STARTED = 1,
165 BNA_TX_F_ENABLED = 2,
166 BNA_TX_F_PRIO_CHANGED = 4,
167 BNA_TX_F_BW_UPDATED = 8,
170 enum bna_tx_mod_flags {
171 BNA_TX_MOD_F_ENET_STARTED = 1,
172 BNA_TX_MOD_F_ENET_LOOPBACK = 2,
176 BNA_RX_T_REGULAR = 0,
177 BNA_RX_T_LOOPBACK = 1,
187 BNA_RXMODE_PROMISC = 1,
188 BNA_RXMODE_DEFAULT = 2,
189 BNA_RXMODE_ALLMULTI = 4
198 RX_E_RXF_STARTED = 6,
199 RX_E_RXF_STOPPED = 7,
200 RX_E_CLEANUP_DONE = 8,
205 BNA_RX_RXF_START_WAIT = 2,
207 BNA_RX_RXF_STOP_WAIT = 4,
208 BNA_RX_RXQ_STOP_WAIT = 5,
212 BNA_RX_F_ENET_STARTED = 1,
213 BNA_RX_F_ENABLED = 2,
216 enum bna_rx_mod_flags {
217 BNA_RX_MOD_F_ENET_STARTED = 1,
218 BNA_RX_MOD_F_ENET_LOOPBACK = 2,
221 enum bna_rxf_oper_state {
222 BNA_RXF_OPER_STATE_RUNNING = 0x01, /* rxf operational */
223 BNA_RXF_OPER_STATE_PAUSED = 0x02, /* rxf in PAUSED state */
227 BNA_RXF_F_PAUSED = 1,
242 BNA_RXF_START_WAIT = 2,
243 BNA_RXF_CAM_FLTR_MOD_WAIT = 3,
245 BNA_RXF_CAM_FLTR_CLR_WAIT = 5,
246 BNA_RXF_STOP_WAIT = 6,
247 BNA_RXF_PAUSE_WAIT = 7,
248 BNA_RXF_RESUME_WAIT = 8,
249 BNA_RXF_STAT_CLR_WAIT = 9,
253 BNA_PORT_T_REGULAR = 0,
254 BNA_PORT_T_LOOPBACK_INTERNAL = 1,
255 BNA_PORT_T_LOOPBACK_EXTERNAL = 2,
259 BNA_ENET_T_REGULAR = 0,
260 BNA_ENET_T_LOOPBACK_INTERNAL = 1,
261 BNA_ENET_T_LOOPBACK_EXTERNAL = 2,
264 enum bna_link_status {
270 enum bna_llport_flags {
271 BNA_LLPORT_F_ADMIN_UP = 1,
272 BNA_LLPORT_F_PORT_ENABLED = 2,
273 BNA_LLPORT_F_RX_STARTED = 4
276 enum bna_ethport_flags {
277 BNA_ETHPORT_F_ADMIN_UP = 1,
278 BNA_ETHPORT_F_PORT_ENABLED = 2,
279 BNA_ETHPORT_F_RX_STARTED = 4,
282 enum bna_port_flags {
283 BNA_PORT_F_DEVICE_READY = 1,
284 BNA_PORT_F_ENABLED = 2,
285 BNA_PORT_F_PAUSE_CHANGED = 4,
286 BNA_PORT_F_MTU_CHANGED = 8
289 enum bna_enet_flags {
290 BNA_ENET_F_IOCETH_READY = 1,
291 BNA_ENET_F_ENABLED = 2,
292 BNA_ENET_F_PAUSE_CHANGED = 4,
293 BNA_ENET_F_MTU_CHANGED = 8
297 BNA_RSS_F_RIT_PENDING = 1,
298 BNA_RSS_F_CFG_PENDING = 2,
299 BNA_RSS_F_STATUS_PENDING = 4,
303 BNA_MOD_F_INIT_DONE = 1,
307 BNA_PKT_RATE_10K = 10000,
308 BNA_PKT_RATE_20K = 20000,
309 BNA_PKT_RATE_30K = 30000,
310 BNA_PKT_RATE_40K = 40000,
311 BNA_PKT_RATE_50K = 50000,
312 BNA_PKT_RATE_60K = 60000,
313 BNA_PKT_RATE_70K = 70000,
314 BNA_PKT_RATE_80K = 80000,
317 enum bna_dim_load_types {
318 BNA_LOAD_T_HIGH_4 = 0, /* 80K <= r */
319 BNA_LOAD_T_HIGH_3 = 1, /* 60K <= r < 80K */
320 BNA_LOAD_T_HIGH_2 = 2, /* 50K <= r < 60K */
321 BNA_LOAD_T_HIGH_1 = 3, /* 40K <= r < 50K */
322 BNA_LOAD_T_LOW_1 = 4, /* 30K <= r < 40K */
323 BNA_LOAD_T_LOW_2 = 5, /* 20K <= r < 30K */
324 BNA_LOAD_T_LOW_3 = 6, /* 10K <= r < 20K */
325 BNA_LOAD_T_LOW_4 = 7, /* r < 10K */
329 enum bna_dim_bias_types {
330 BNA_BIAS_T_SMALL = 0, /* small pkts > (large pkts * 2) */
331 BNA_BIAS_T_LARGE = 1, /* Not BNA_BIAS_T_SMALL */
335 #define BNA_MAX_NAME_SIZE 64
338 char name[BNA_MAX_NAME_SIZE];
342 /* This should be the first one */
345 struct bna_mcam_handle *handle;
348 struct bna_mem_descr {
351 struct bna_dma_addr dma;
354 struct bna_mem_info {
355 enum bna_mem_type mem_type;
358 u32 align_sz; /* 0/1 = no alignment */
359 struct bna_mem_descr *mdl;
360 void *cookie; /* For bnad to unmap dma later */
363 struct bna_intr_descr {
367 struct bna_intr_info {
368 enum bna_intr_type intr_type;
370 struct bna_intr_descr *idl;
374 struct bna_mem_info mem_info;
375 struct bna_intr_info intr_info;
378 struct bna_res_info {
379 enum bna_res_type res_type;
380 union bna_res_u res_u;
385 struct bna_dma_addr hw_qpt_ptr;
409 struct bna_attr attr;
410 struct bfa_msgq_cmd_entry msgq_cmd;
411 struct bfi_enet_attr_req attr_req;
413 void (*stop_cbfn)(struct bnad *bnad);
414 struct bnad *stop_cbarg;
426 /* This should be the first one */
429 struct bfa_mbox_cmd cmd;
431 /* Callback for port, tx, rx, rxf */
432 void (*cbfn)(void *arg, int status);
436 struct bna_mbox_mod {
437 enum bna_mbox_state state;
438 struct list_head posted_q;
450 /* Pause configuration */
451 struct bna_pause_config {
452 enum bna_status tx_pause;
453 enum bna_status rx_pause;
458 enum bna_llport_flags flags;
460 enum bna_port_type type;
462 enum bna_link_status link_status;
464 int rx_started_count;
466 void (*stop_cbfn)(struct bna_port *, enum bna_cb_status);
468 struct bna_mbox_qe mbox_qe;
475 enum bna_port_flags flags;
477 enum bna_port_type type;
479 struct bna_llport llport;
481 struct bna_pause_config pause_config;
485 /* Callback for bna_port_disable(), port_stop() */
486 void (*stop_cbfn)(void *, enum bna_cb_status);
489 /* Callback for bna_port_pause_config() */
490 void (*pause_cbfn)(struct bnad *, enum bna_cb_status);
492 /* Callback for bna_port_mtu_set() */
493 void (*mtu_cbfn)(struct bnad *, enum bna_cb_status);
495 void (*link_cbfn)(struct bnad *, enum bna_link_status);
497 struct bfa_wc chld_stop_wc;
499 struct bna_mbox_qe mbox_qe;
512 enum bna_enet_flags flags;
514 enum bna_enet_type type;
516 struct bna_pause_config pause_config;
519 /* Callback for bna_enet_disable(), enet_stop() */
520 void (*stop_cbfn)(void *);
523 /* Callback for bna_enet_pause_config() */
524 void (*pause_cbfn)(struct bnad *);
526 /* Callback for bna_enet_mtu_set() */
527 void (*mtu_cbfn)(struct bnad *);
529 struct bfa_wc chld_stop_wc;
531 struct bfa_msgq_cmd_entry msgq_cmd;
532 struct bfi_enet_set_pause_req pause_req;
545 enum bna_ethport_flags flags;
547 enum bna_link_status link_status;
549 int rx_started_count;
551 void (*stop_cbfn)(struct bna_enet *);
553 void (*adminup_cbfn)(struct bnad *, enum bna_cb_status);
555 void (*link_cbfn)(struct bnad *, enum bna_link_status);
557 struct bfa_msgq_cmd_entry msgq_cmd;
559 struct bfi_enet_enable_req admin_req;
560 struct bfi_enet_diag_lb_req lpbk_req;
572 /* IB index segment structure */
573 struct bna_ibidx_seg {
574 /* This should be the first one */
578 u8 ib_idx_tbl_offset;
581 /* Interrupt structure */
583 /* This should be the first one */
587 enum bna_intr_type intr_type;
593 /* Doorbell structure */
594 struct bna_ib_dbell {
595 void *__iomem doorbell_addr;
601 struct bna_dma_addr ib_seg_host_addr;
602 void *ib_seg_host_addr_kva;
604 struct bna_ib_dbell door_bell;
606 enum bna_intr_type intr_type;
609 u8 coalescing_timeo; /* Unit is 5usec. */
621 /* Tx datapath control structure */
622 #define BNA_Q_NAME_SIZE 16
629 volatile u32 *hw_consumer_index;
631 void *__iomem q_dbell;
632 struct bna_ib_dbell *i_dbell;
638 void *priv; /* BNAD's cookie */
639 enum bna_intr_type intr_type;
641 u8 priority; /* Current priority */
642 unsigned long flags; /* Used by bnad as required */
644 char name[BNA_Q_NAME_SIZE];
647 /* TxQ QPT and configuration */
649 /* This should be the first one */
668 /* This should be the first one */
674 enum bna_tx_flags flags;
676 enum bna_tx_type type;
679 struct list_head txq_q;
682 /* Tx event handlers */
683 void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
684 void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
685 void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
686 void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
687 void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
689 /* callback for bna_tx_disable(), bna_tx_stop() */
690 void (*stop_cbfn)(void *arg, struct bna_tx *tx);
693 /* callback for bna_tx_prio_set() */
694 void (*prio_change_cbfn)(struct bnad *bnad, struct bna_tx *tx);
696 struct bfa_msgq_cmd_entry msgq_cmd;
698 struct bfi_enet_tx_cfg_req cfg_req;
699 struct bfi_enet_req req;
700 struct bfi_enet_tx_cfg_rsp cfg_rsp;
704 void *priv; /* bnad's cookie */
707 /* Tx object configuration used during creation */
708 struct bna_tx_config {
711 int coalescing_timeo;
712 enum bna_tx_type tx_type;
715 struct bna_tx_event_cbfn {
717 void (*tcb_setup_cbfn)(struct bnad *, struct bna_tcb *);
718 void (*tcb_destroy_cbfn)(struct bnad *, struct bna_tcb *);
720 void (*tx_stall_cbfn)(struct bnad *, struct bna_tx *);
721 void (*tx_resume_cbfn)(struct bnad *, struct bna_tx *);
722 void (*tx_cleanup_cbfn)(struct bnad *, struct bna_tx *);
725 /* Tx module - keeps track of free, active tx objects */
727 struct bna_tx *tx; /* BFI_MAX_TXQ entries */
728 struct bna_txq *txq; /* BFI_MAX_TXQ entries */
730 struct list_head tx_free_q;
731 struct list_head tx_active_q;
733 struct list_head txq_free_q;
735 /* callback for bna_tx_mod_stop() */
736 void (*stop_cbfn)(struct bna_enet *enet);
738 struct bfa_wc tx_stop_wc;
740 enum bna_tx_mod_flags flags;
746 int prio_reconfigured;
755 * Receive Indirection Table
759 /* One row of RIT table */
760 struct bna_rit_entry {
761 u8 large_rxq_id; /* used for either large or data buffers */
762 u8 small_rxq_id; /* used for either small or header buffers */
766 struct bna_rit_segment {
772 * max_rit_size: Varies per RIT segment depending on how RIT is
777 struct bna_rit_entry *rit;
786 /* Rx datapath control structure */
794 void *__iomem q_dbell;
801 void *priv; /* BNAD's cookie */
806 /* RxQ structure - QPT, configuration */
823 u64 rx_packets_with_error;
824 u64 rxbuf_alloc_failed;
831 struct bna_rxq *data;
834 struct bna_rxq *small;
835 struct bna_rxq *large;
838 struct bna_rxq *only;
839 struct bna_rxq *reserved;
843 /* Packet rate for Dynamic Interrupt Moderation */
844 struct bna_pkt_rate {
849 /* Completion control structure */
854 volatile u32 *hw_producer_index;
856 struct bna_ib_dbell *i_dbell;
857 struct bna_rcb *rcb[2];
858 void *ctrl; /* For bnad */
859 struct bna_pkt_rate pkt_rate;
866 void *priv; /* BNAD's cookie */
867 enum bna_intr_type intr_type;
869 u8 rx_coalescing_timeo; /* For NAPI */
871 char name[BNA_Q_NAME_SIZE];
874 /* CQ QPT, configuration */
884 struct bna_rss_config {
885 enum bfi_enet_rss_type hash_type;
887 u32 toeplitz_hash_key[BFI_ENET_RSS_KEY_LEN];
890 struct bna_hds_config {
891 enum bfi_enet_hds_type hdr_type;
895 /* Rx object configuration used during creation */
896 struct bna_rx_config {
897 enum bna_rx_type rx_type;
899 enum bna_rxp_type rxp_type;
902 int coalescing_timeo;
904 * Small/Large (or Header/Data) buffer size to be configured
905 * for SLR and HDS queue type. Large buffer size comes from
910 enum bna_status rss_status;
911 struct bna_rss_config rss_config;
913 struct bna_hds_config hds_config;
915 enum bna_status vlan_strip_status;
918 /* Rx Path structure - one per MSIX vector/CPU */
920 /* This should be the first one */
923 enum bna_rxp_type type;
929 /* MSI-x vector number for configuring RSS */
934 /* RxF structure (hardware Rx Function) */
937 enum bna_rxf_flags flags;
939 struct bfa_msgq_cmd_entry msgq_cmd;
941 struct bfi_enet_enable_req req;
942 struct bfi_enet_rss_cfg_req rss_req;
943 struct bfi_enet_rit_req rit_req;
944 struct bfi_enet_rx_vlan_req vlan_req;
945 struct bfi_enet_mcast_add_req mcast_add_req;
946 struct bfi_enet_mcast_del_req mcast_del_req;
947 struct bfi_enet_ucast_req ucast_req;
950 /* callback for bna_rxf_start() */
951 void (*start_cbfn) (struct bna_rx *rx);
952 struct bna_rx *start_cbarg;
954 /* callback for bna_rxf_stop() */
955 void (*stop_cbfn) (struct bna_rx *rx);
956 struct bna_rx *stop_cbarg;
958 /* callback for bna_rx_receive_pause() / bna_rx_receive_resume() */
959 void (*oper_state_cbfn) (struct bnad *bnad, struct bna_rx *rx);
960 struct bnad *oper_state_cbarg;
964 * bna_rxf_ucast_set()
965 * bna_rxf_{ucast/mcast}_add(),
966 * bna_rxf_{ucast/mcast}_del(),
969 void (*cam_fltr_cbfn)(struct bnad *bnad, struct bna_rx *rx);
970 struct bnad *cam_fltr_cbarg;
972 /* List of unicast addresses yet to be applied to h/w */
973 struct list_head ucast_pending_add_q;
974 struct list_head ucast_pending_del_q;
975 struct bna_mac *ucast_pending_mac;
976 int ucast_pending_set;
977 /* ucast addresses applied to the h/w */
978 struct list_head ucast_active_q;
979 struct bna_mac ucast_active_mac;
980 int ucast_active_set;
982 /* List of multicast addresses yet to be applied to h/w */
983 struct list_head mcast_pending_add_q;
984 struct list_head mcast_pending_del_q;
985 /* multicast addresses applied to the h/w */
986 struct list_head mcast_active_q;
987 struct list_head mcast_handle_q;
989 /* Rx modes yet to be applied to h/w */
990 enum bna_rxmode rxmode_pending;
991 enum bna_rxmode rxmode_pending_bitmask;
992 /* Rx modes applied to h/w */
993 enum bna_rxmode rxmode_active;
995 u8 vlan_pending_bitmask;
996 enum bna_status vlan_filter_status;
997 u32 vlan_filter_table[(BFI_ENET_VLAN_ID_MAX) / 32];
998 bool vlan_strip_pending;
999 enum bna_status vlan_strip_status;
1001 enum bna_rss_flags rss_pending;
1002 enum bna_status rss_status;
1003 struct bna_rss_config rss_cfg;
1012 /* This should be the first one */
1013 struct list_head qe;
1019 enum bna_rx_type type;
1022 struct list_head rxp_q;
1024 struct bna_hds_config hds_cfg;
1028 enum bna_rx_flags rx_flags;
1030 struct bfa_msgq_cmd_entry msgq_cmd;
1032 struct bfi_enet_rx_cfg_req cfg_req;
1033 struct bfi_enet_req req;
1034 struct bfi_enet_rx_cfg_rsp cfg_rsp;
1037 /* Rx event handlers */
1038 void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
1039 void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
1040 void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
1041 void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
1042 void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
1043 void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
1045 /* callback for bna_rx_disable(), bna_rx_stop() */
1046 void (*stop_cbfn)(void *arg, struct bna_rx *rx);
1050 void *priv; /* bnad's cookie */
1053 struct bna_rx_event_cbfn {
1055 void (*rcb_setup_cbfn)(struct bnad *, struct bna_rcb *);
1056 void (*rcb_destroy_cbfn)(struct bnad *, struct bna_rcb *);
1057 void (*ccb_setup_cbfn)(struct bnad *, struct bna_ccb *);
1058 void (*ccb_destroy_cbfn)(struct bnad *, struct bna_ccb *);
1060 void (*rx_cleanup_cbfn)(struct bnad *, struct bna_rx *);
1061 void (*rx_post_cbfn)(struct bnad *, struct bna_rx *);
1064 /* Rx module - keeps track of free, active rx objects */
1066 struct bna *bna; /* back pointer to parent */
1067 struct bna_rx *rx; /* BFI_MAX_RXQ entries */
1068 struct bna_rxp *rxp; /* BFI_MAX_RXQ entries */
1069 struct bna_rxq *rxq; /* BFI_MAX_RXQ entries */
1071 struct list_head rx_free_q;
1072 struct list_head rx_active_q;
1075 struct list_head rxp_free_q;
1078 struct list_head rxq_free_q;
1081 enum bna_rx_mod_flags flags;
1083 /* callback for bna_rx_mod_stop() */
1084 void (*stop_cbfn)(struct bna_enet *enet);
1086 struct bfa_wc rx_stop_wc;
1087 u32 dim_vector[BNA_LOAD_T_MAX][BNA_BIAS_T_MAX];
1097 struct bna_ucam_mod {
1098 struct bna_mac *ucmac; /* BFI_MAX_UCMAC entries */
1099 struct list_head free_q;
1104 struct bna_mcam_handle {
1105 /* This should be the first one */
1106 struct list_head qe;
1111 struct bna_mcam_mod {
1112 struct bna_mac *mcmac; /* BFI_MAX_MCMAC entries */
1113 struct bna_mcam_handle *mchandle; /* BFI_MAX_MCMAC entries */
1114 struct list_head free_q;
1115 struct list_head free_handle_q;
1126 struct bna_tx_stats {
1134 struct bna_rx_stats {
1144 int num_active_ucast;
1145 int num_active_mcast;
1147 int vlan_filter_status;
1152 struct bna_sw_stats {
1163 struct bna_dma_addr hw_stats_dma;
1164 struct bfi_enet_stats *hw_stats_kva;
1165 struct bfi_enet_stats hw_stats;
1168 struct bna_stats_mod {
1170 bool stats_get_busy;
1171 bool stats_clr_busy;
1172 struct bfa_msgq_cmd_entry stats_get_cmd;
1173 struct bfa_msgq_cmd_entry stats_clr_cmd;
1174 struct bfi_enet_stats_req stats_get;
1175 struct bfi_enet_stats_req stats_clr;
1185 struct bna_ident ident;
1186 struct bfa_pcidev pcidev;
1188 struct bna_reg regs;
1189 struct bna_bit_defn bits;
1191 struct bna_stats stats;
1193 struct bna_ioceth ioceth;
1195 struct bfa_msgq msgq;
1197 struct bna_ethport ethport;
1198 struct bna_enet enet;
1199 struct bna_stats_mod stats_mod;
1201 struct bna_tx_mod tx_mod;
1202 struct bna_rx_mod rx_mod;
1203 struct bna_ucam_mod ucam_mod;
1204 struct bna_mcam_mod mcam_mod;
1206 enum bna_mod_flags mod_flags;
1208 int default_mode_rid;
1213 #endif /* __BNA_TYPES_H__ */