1
2 #ifndef TARGET_CORE_RD_H
3 #define TARGET_CORE_RD_H
4
5 #include <linux/module.h>
6 #include <linux/types.h>
7 #include <target/target_core_base.h>
8
9 #define RD_HBA_VERSION "v4.0"
10 #define RD_MCP_VERSION "4.0"
11
12
13 #define RD_MAX_ALLOCATION_SIZE 65536
14 #define RD_DEVICE_QUEUE_DEPTH 32
15 #define RD_MAX_DEVICE_QUEUE_DEPTH 128
16 #define RD_BLOCKSIZE 512
17
18
19 int __init rd_module_init(void);
20 void rd_module_exit(void);
21
22 struct rd_dev_sg_table {
23 u32 page_start_offset;
24 u32 page_end_offset;
25 u32 rd_sg_count;
26 struct scatterlist *sg_table;
27 } ____cacheline_aligned;
28
29 #define RDF_HAS_PAGE_COUNT 0x01
30 #define RDF_NULLIO 0x02
31
32 struct rd_dev {
33 struct se_device dev;
34 u32 rd_flags;
35
36 u32 rd_dev_id;
37
38 u32 rd_page_count;
39
40 u32 sg_table_count;
41
42 u32 sg_prot_count;
43
44 struct rd_dev_sg_table *sg_table_array;
45
46 struct rd_dev_sg_table *sg_prot_array;
47
48 struct rd_host *rd_host;
49 } ____cacheline_aligned;
50
51 struct rd_host {
52 u32 rd_host_dev_id_count;
53 u32 rd_host_id;
54 } ____cacheline_aligned;
55
56 #endif