1 #ifndef TARGET_CORE_PSCSI_H
2 #define TARGET_CORE_PSCSI_H
4 #define PSCSI_VERSION "v4.0"
6 /* used in pscsi_find_alloc_len() */
7 #ifndef INQUIRY_DATA_SIZE
8 #define INQUIRY_DATA_SIZE 0x24
11 /* used in pscsi_add_device_to_list() */
12 #define PSCSI_DEFAULT_QUEUEDEPTH 1
15 #define PS_TIMEOUT_DISK (15*HZ)
16 #define PS_TIMEOUT_OTHER (500*HZ)
18 #include <linux/cache.h> /* ___cacheline_aligned */
19 #include <target/target_core_base.h> /* struct se_device */
25 struct pscsi_plugin_task {
26 unsigned char pscsi_cdb[0];
27 } ____cacheline_aligned;
29 #define PDF_HAS_CHANNEL_ID 0x01
30 #define PDF_HAS_TARGET_ID 0x02
31 #define PDF_HAS_LUN_ID 0x04
32 #define PDF_HAS_VPD_UNIT_SERIAL 0x08
33 #define PDF_HAS_VPD_DEV_IDENT 0x10
34 #define PDF_HAS_VIRT_HOST_ID 0x20
36 struct pscsi_dev_virt {
43 struct block_device *pdv_bd;
44 struct scsi_device *pdv_sd;
45 struct Scsi_Host *pdv_lld_host;
46 } ____cacheline_aligned;
48 typedef enum phv_modes {
53 struct pscsi_hba_virt {
56 struct Scsi_Host *phv_lld_host;
57 } ____cacheline_aligned;
59 #endif /*** TARGET_CORE_PSCSI_H ***/