ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
[linux/fpc-iii.git] / drivers / net / bna / cna.h
blobbbd39dc659727cceccc2d42455e686c382af9027
1 /*
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) 2006-2010 Brocade Communications Systems, Inc.
15 * All rights reserved
16 * www.brocade.com
19 #ifndef __CNA_H__
20 #define __CNA_H__
22 #include <linux/version.h>
23 #include <linux/kernel.h>
24 #include <linux/types.h>
25 #include <linux/pci.h>
26 #include <linux/delay.h>
27 #include <linux/bitops.h>
28 #include <linux/timer.h>
29 #include <linux/interrupt.h>
30 #include <linux/if_ether.h>
31 #include <asm/page.h>
32 #include <asm/io.h>
33 #include <asm/string.h>
35 #include <linux/list.h>
37 #define bfa_sm_fault(__mod, __event) do { \
38 pr_err("SM Assertion failure: %s: %d: event = %d", __FILE__, __LINE__, \
39 __event); \
40 } while (0)
42 extern char bfa_version[];
44 #define CNA_FW_FILE_CT "ctfw_cna.bin"
45 #define FC_SYMNAME_MAX 256 /*!< max name server symbolic name size */
47 #pragma pack(1)
49 #define MAC_ADDRLEN (6)
50 typedef struct mac { u8 mac[MAC_ADDRLEN]; } mac_t;
52 #pragma pack()
54 #define bfa_q_first(_q) ((void *)(((struct list_head *) (_q))->next))
55 #define bfa_q_next(_qe) (((struct list_head *) (_qe))->next)
56 #define bfa_q_prev(_qe) (((struct list_head *) (_qe))->prev)
59 * bfa_q_qe_init - to initialize a queue element
61 #define bfa_q_qe_init(_qe) { \
62 bfa_q_next(_qe) = (struct list_head *) NULL; \
63 bfa_q_prev(_qe) = (struct list_head *) NULL; \
67 * bfa_q_deq - dequeue an element from head of the queue
69 #define bfa_q_deq(_q, _qe) { \
70 if (!list_empty(_q)) { \
71 (*((struct list_head **) (_qe))) = bfa_q_next(_q); \
72 bfa_q_prev(bfa_q_next(*((struct list_head **) _qe))) = \
73 (struct list_head *) (_q); \
74 bfa_q_next(_q) = bfa_q_next(*((struct list_head **) _qe)); \
75 bfa_q_qe_init(*((struct list_head **) _qe)); \
76 } else { \
77 *((struct list_head **) (_qe)) = (struct list_head *) NULL; \
78 } \
81 #endif /* __CNA_H__ */