USB: cp210x: call generic open last in open
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / target / target_core_rd.h
blob784e56a041001008bdec29f2afd47f11b1d9d31f
1 #ifndef TARGET_CORE_RD_H
2 #define TARGET_CORE_RD_H
4 #define RD_HBA_VERSION "v4.0"
5 #define RD_DR_VERSION "4.0"
6 #define RD_MCP_VERSION "4.0"
8 /* Largest piece of memory kmalloc can allocate */
9 #define RD_MAX_ALLOCATION_SIZE 65536
10 #define RD_DEVICE_QUEUE_DEPTH 32
11 #define RD_MAX_DEVICE_QUEUE_DEPTH 128
12 #define RD_BLOCKSIZE 512
13 #define RD_MAX_SECTORS 1024
15 /* Used in target_core_init_configfs() for virtual LUN 0 access */
16 int __init rd_module_init(void);
17 void rd_module_exit(void);
19 #define RRF_EMULATE_CDB 0x01
20 #define RRF_GOT_LBA 0x02
22 struct rd_request {
23 struct se_task rd_task;
25 /* Offset from start of page */
26 u32 rd_offset;
27 /* Starting page in Ramdisk for request */
28 u32 rd_page;
29 /* Total number of pages needed for request */
30 u32 rd_page_count;
31 /* Scatterlist count */
32 u32 rd_size;
33 } ____cacheline_aligned;
35 struct rd_dev_sg_table {
36 u32 page_start_offset;
37 u32 page_end_offset;
38 u32 rd_sg_count;
39 struct scatterlist *sg_table;
40 } ____cacheline_aligned;
42 #define RDF_HAS_PAGE_COUNT 0x01
44 struct rd_dev {
45 int rd_direct;
46 u32 rd_flags;
47 /* Unique Ramdisk Device ID in Ramdisk HBA */
48 u32 rd_dev_id;
49 /* Total page count for ramdisk device */
50 u32 rd_page_count;
51 /* Number of SG tables in sg_table_array */
52 u32 sg_table_count;
53 u32 rd_queue_depth;
54 /* Array of rd_dev_sg_table_t containing scatterlists */
55 struct rd_dev_sg_table *sg_table_array;
56 /* Ramdisk HBA device is connected to */
57 struct rd_host *rd_host;
58 } ____cacheline_aligned;
60 struct rd_host {
61 u32 rd_host_dev_id_count;
62 u32 rd_host_id; /* Unique Ramdisk Host ID */
63 } ____cacheline_aligned;
65 #endif /* TARGET_CORE_RD_H */