1 #ifndef TARGET_CORE_PSCSI_H
2 #define TARGET_CORE_PSCSI_H
4 #define PSCSI_VERSION "v4.0"
5 #define PSCSI_VIRTUAL_HBA_DEPTH 2048
7 /* used in pscsi_find_alloc_len() */
8 #ifndef INQUIRY_DATA_SIZE
9 #define INQUIRY_DATA_SIZE 0x24
12 /* used in pscsi_add_device_to_list() */
13 #define PSCSI_DEFAULT_QUEUEDEPTH 1
16 #define PS_TIMEOUT_DISK (15*HZ)
17 #define PS_TIMEOUT_OTHER (500*HZ)
19 #include <linux/device.h>
20 #include <scsi/scsi_driver.h>
21 #include <scsi/scsi_device.h>
22 #include <linux/kref.h>
23 #include <linux/kobject.h>
25 struct pscsi_plugin_task
{
26 struct se_task pscsi_task
;
27 unsigned char *pscsi_cdb
;
28 unsigned char __pscsi_cdb
[TCM_MAX_COMMAND_SIZE
];
29 unsigned char pscsi_sense
[SCSI_SENSE_BUFFERSIZE
];
33 struct request
*pscsi_req
;
34 } ____cacheline_aligned
;
36 #define PDF_HAS_CHANNEL_ID 0x01
37 #define PDF_HAS_TARGET_ID 0x02
38 #define PDF_HAS_LUN_ID 0x04
39 #define PDF_HAS_VPD_UNIT_SERIAL 0x08
40 #define PDF_HAS_VPD_DEV_IDENT 0x10
41 #define PDF_HAS_VIRT_HOST_ID 0x20
43 struct pscsi_dev_virt
{
49 struct block_device
*pdv_bd
;
50 struct scsi_device
*pdv_sd
;
51 struct se_hba
*pdv_se_hba
;
52 } ____cacheline_aligned
;
54 typedef enum phv_modes
{
59 struct pscsi_hba_virt
{
62 struct Scsi_Host
*phv_lld_host
;
63 } ____cacheline_aligned
;
65 #endif /*** TARGET_CORE_PSCSI_H ***/