]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/target/target_core_pscsi.h
UBUNTU: [Config] CONFIG_TEE=m
[mirror_ubuntu-artful-kernel.git] / drivers / target / target_core_pscsi.h
CommitLineData
c66ac9db
NB
1#ifndef TARGET_CORE_PSCSI_H
2#define TARGET_CORE_PSCSI_H
3
4#define PSCSI_VERSION "v4.0"
c66ac9db
NB
5
6/* used in pscsi_find_alloc_len() */
7#ifndef INQUIRY_DATA_SIZE
8#define INQUIRY_DATA_SIZE 0x24
9#endif
10
11/* used in pscsi_add_device_to_list() */
12#define PSCSI_DEFAULT_QUEUEDEPTH 1
13
14#define PS_RETRY 5
15#define PS_TIMEOUT_DISK (15*HZ)
16#define PS_TIMEOUT_OTHER (500*HZ)
17
8dcf07be
BVA
18#include <linux/cache.h> /* ___cacheline_aligned */
19#include <target/target_core_base.h> /* struct se_device */
c66ac9db 20
8dcf07be 21struct block_device;
ba929992 22struct scsi_device;
8dcf07be 23struct Scsi_Host;
ba929992 24
c66ac9db 25struct pscsi_plugin_task {
6708bb27 26 unsigned char pscsi_cdb[0];
c66ac9db
NB
27} ____cacheline_aligned;
28
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
35
36struct pscsi_dev_virt {
0fd97ccf 37 struct se_device dev;
c66ac9db
NB
38 int pdv_flags;
39 int pdv_host_id;
40 int pdv_channel_id;
41 int pdv_target_id;
42 int pdv_lun_id;
43 struct block_device *pdv_bd;
44 struct scsi_device *pdv_sd;
5a7125c6 45 struct Scsi_Host *pdv_lld_host;
c66ac9db
NB
46} ____cacheline_aligned;
47
48typedef enum phv_modes {
e6a8a41a 49 PHV_VIRTUAL_HOST_ID,
c66ac9db
NB
50 PHV_LLD_SCSI_HOST_NO
51} phv_modes_t;
52
53struct pscsi_hba_virt {
54 int phv_host_id;
55 phv_modes_t phv_mode;
56 struct Scsi_Host *phv_lld_host;
57} ____cacheline_aligned;
58
59#endif /*** TARGET_CORE_PSCSI_H ***/