Merge tag 'mfd-for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
[cascardo/linux.git] / include / linux / qed / rdma_common.h
1 /* QLogic qed NIC Driver
2  * Copyright (c) 2015 QLogic Corporation
3  *
4  * This software is available under the terms of the GNU General Public License
5  * (GPL) Version 2, available from the file COPYING in the main directory of
6  * this source tree.
7  */
8
9 #ifndef __RDMA_COMMON__
10 #define __RDMA_COMMON__
11 /************************/
12 /* RDMA FW CONSTANTS */
13 /************************/
14
15 #define RDMA_RESERVED_LKEY                      (0)
16 #define RDMA_RING_PAGE_SIZE                     (0x1000)
17
18 #define RDMA_MAX_SGE_PER_SQ_WQE         (4)
19 #define RDMA_MAX_SGE_PER_RQ_WQE         (4)
20
21 #define RDMA_MAX_DATA_SIZE_IN_WQE       (0x7FFFFFFF)
22
23 #define RDMA_REQ_RD_ATOMIC_ELM_SIZE             (0x50)
24 #define RDMA_RESP_RD_ATOMIC_ELM_SIZE    (0x20)
25
26 #define RDMA_MAX_CQS                            (64 * 1024)
27 #define RDMA_MAX_TIDS                           (128 * 1024 - 1)
28 #define RDMA_MAX_PDS                            (64 * 1024)
29
30 #define RDMA_NUM_STATISTIC_COUNTERS                     MAX_NUM_VPORTS
31
32 #define RDMA_TASK_TYPE (PROTOCOLID_ROCE)
33
34 struct rdma_srq_id {
35         __le16 srq_idx;
36         __le16 opaque_fid;
37 };
38
39 struct rdma_srq_producers {
40         __le32 sge_prod;
41         __le32 wqe_prod;
42 };
43
44 #endif /* __RDMA_COMMON__ */