brintos

brintos / linux-shallow public Read only

0
0
Text · 1.3 KiB · 9acaa21 Raw
57 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef TARGET_CORE_PSCSI_H3#define TARGET_CORE_PSCSI_H4 5#define PSCSI_VERSION		"v4.0"6 7/* used in pscsi_find_alloc_len() */8#ifndef INQUIRY_DATA_SIZE9#define INQUIRY_DATA_SIZE	0x2410#endif11 12/* used in pscsi_add_device_to_list() */13#define PSCSI_DEFAULT_QUEUEDEPTH	114 15#define PS_RETRY		516#define PS_TIMEOUT_DISK		(15*HZ)17#define PS_TIMEOUT_OTHER	(500*HZ)18 19#include <linux/cache.h>             /* ___cacheline_aligned */20#include <target/target_core_base.h> /* struct se_device */21 22struct block_device;23struct scsi_device;24struct Scsi_Host;25 26#define PDF_HAS_CHANNEL_ID	0x0127#define PDF_HAS_TARGET_ID	0x0228#define PDF_HAS_LUN_ID		0x0429#define PDF_HAS_VPD_UNIT_SERIAL 0x0830#define PDF_HAS_VPD_DEV_IDENT	0x1031#define PDF_HAS_VIRT_HOST_ID	0x2032 33struct pscsi_dev_virt {34	struct se_device dev;35	int	pdv_flags;36	int	pdv_host_id;37	int	pdv_channel_id;38	int	pdv_target_id;39	int	pdv_lun_id;40	struct file *pdv_bdev_file;41	struct scsi_device *pdv_sd;42	struct Scsi_Host *pdv_lld_host;43} ____cacheline_aligned;44 45typedef enum phv_modes {46	PHV_VIRTUAL_HOST_ID,47	PHV_LLD_SCSI_HOST_NO48} phv_modes_t;49 50struct pscsi_hba_virt {51	int			phv_host_id;52	phv_modes_t		phv_mode;53	struct Scsi_Host	*phv_lld_host;54} ____cacheline_aligned;55 56#endif   /*** TARGET_CORE_PSCSI_H ***/57