Go to the documentation of this file.
22 #include <linux/kernel.h>
23 #include <linux/types.h>
25 #include <linux/pci.h>
27 #include <linux/bitops.h>
30 #include <linux/if_vlan.h>
31 #include <linux/if_ether.h>
33 #define bfa_sm_fault(__event) do { \
34 pr_err("SM Assertion failure: %s: %d: event = %d\n", \
35 __FILE__, __LINE__, __event); \
40 #define CNA_FW_FILE_CT "ctfw.bin"
41 #define CNA_FW_FILE_CT2 "ct2fw.bin"
42 #define FC_SYMNAME_MAX 256
50 #define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next))
51 #define bfa_q_next(_qe) (((struct list_head *) (_qe))->next)
52 #define bfa_q_prev(_qe) (((struct list_head *) (_qe))->prev)
57 #define bfa_q_qe_init(_qe) { \
58 bfa_q_next(_qe) = (struct list_head *) NULL; \
59 bfa_q_prev(_qe) = (struct list_head *) NULL; \
65 #define bfa_q_deq(_q, _qe) { \
66 if (!list_empty(_q)) { \
67 (*((struct list_head **) (_qe))) = bfa_q_next(_q); \
68 bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \
69 (struct list_head *) (_q); \
70 bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \
71 bfa_q_qe_init(*((struct list_head **) _qe)); \
73 *((struct list_head **)(_qe)) = NULL; \
80 #define bfa_q_deq_tail(_q, _qe) { \
81 if (!list_empty(_q)) { \
82 *((struct list_head **) (_qe)) = bfa_q_prev(_q); \
83 bfa_q_next(bfa_q_prev(*((struct list_head **) _qe))) = \
84 (struct list_head *) (_q); \
85 bfa_q_prev(_q) = bfa_q_prev(*(struct list_head **) _qe);\
86 bfa_q_qe_init(*((struct list_head **) _qe)); \
88 *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
95 #define bfa_q_enq_head(_q, _qe) { \
96 if (!(bfa_q_next(_qe) == NULL) && (bfa_q_prev(_qe) == NULL)) \
97 pr_err("Assertion failure: %s:%d: %d", \
99 (bfa_q_next(_qe) == NULL) && (bfa_q_prev(_qe) == NULL));\
100 bfa_q_next(_qe) = bfa_q_next(_q); \
101 bfa_q_prev(_qe) = (struct list_head *) (_q); \
102 bfa_q_prev(bfa_q_next(_q)) = (struct list_head *) (_qe); \
103 bfa_q_next(_q) = (struct list_head *) (_qe); \