]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/target/target_core_rd.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef TARGET_CORE_RD_H
3 #define TARGET_CORE_RD_H
5 #include <linux/module.h>
6 #include <linux/types.h>
7 #include <target/target_core_base.h>
9 #define RD_HBA_VERSION "v4.0"
10 #define RD_MCP_VERSION "4.0"
12 /* Largest piece of memory kmalloc can allocate */
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
18 /* Used in target_core_init_configfs() for virtual LUN 0 access */
19 int __init
rd_module_init(void);
20 void rd_module_exit(void);
22 struct rd_dev_sg_table
{
23 u32 page_start_offset
;
26 struct scatterlist
*sg_table
;
27 } ____cacheline_aligned
;
29 #define RDF_HAS_PAGE_COUNT 0x01
30 #define RDF_NULLIO 0x02
35 /* Unique Ramdisk Device ID in Ramdisk HBA */
37 /* Total page count for ramdisk device */
39 /* Number of SG tables in sg_table_array */
41 /* Number of SG tables in sg_prot_array */
43 /* Array of rd_dev_sg_table_t containing scatterlists */
44 struct rd_dev_sg_table
*sg_table_array
;
45 /* Array of rd_dev_sg_table containing protection scatterlists */
46 struct rd_dev_sg_table
*sg_prot_array
;
47 /* Ramdisk HBA device is connected to */
48 struct rd_host
*rd_host
;
49 } ____cacheline_aligned
;
52 u32 rd_host_dev_id_count
;
53 u32 rd_host_id
; /* Unique Ramdisk Host ID */
54 } ____cacheline_aligned
;
56 #endif /* TARGET_CORE_RD_H */