0001
0002 #ifndef TARGET_CORE_RD_H
0003 #define TARGET_CORE_RD_H
0004
0005 #include <linux/module.h>
0006 #include <linux/types.h>
0007 #include <target/target_core_base.h>
0008
0009 #define RD_HBA_VERSION "v4.0"
0010 #define RD_MCP_VERSION "4.0"
0011
0012
0013 #define RD_MAX_ALLOCATION_SIZE 65536
0014 #define RD_DEVICE_QUEUE_DEPTH 32
0015 #define RD_MAX_DEVICE_QUEUE_DEPTH 128
0016 #define RD_BLOCKSIZE 512
0017
0018
0019 int __init rd_module_init(void);
0020 void rd_module_exit(void);
0021
0022 struct rd_dev_sg_table {
0023 u32 page_start_offset;
0024 u32 page_end_offset;
0025 u32 rd_sg_count;
0026 struct scatterlist *sg_table;
0027 } ____cacheline_aligned;
0028
0029 #define RDF_HAS_PAGE_COUNT 0x01
0030 #define RDF_NULLIO 0x02
0031 #define RDF_DUMMY 0x04
0032
0033 struct rd_dev {
0034 struct se_device dev;
0035 u32 rd_flags;
0036
0037 u32 rd_dev_id;
0038
0039 u32 rd_page_count;
0040
0041 u32 sg_table_count;
0042
0043 u32 sg_prot_count;
0044
0045 struct rd_dev_sg_table *sg_table_array;
0046
0047 struct rd_dev_sg_table *sg_prot_array;
0048
0049 struct rd_host *rd_host;
0050 } ____cacheline_aligned;
0051
0052 struct rd_host {
0053 u32 rd_host_dev_id_count;
0054 u32 rd_host_id;
0055 } ____cacheline_aligned;
0056
0057 #endif