usb: gadget: f_mtp: Avoid race between mtp_read and mtp_function_disable
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / include / scsi / scsi_ioctl.h
... / ...
CommitLineData
1#ifndef _SCSI_IOCTL_H
2#define _SCSI_IOCTL_H
3
4#define SCSI_IOCTL_SEND_COMMAND 1
5#define SCSI_IOCTL_TEST_UNIT_READY 2
6#define SCSI_IOCTL_BENCHMARK_COMMAND 3
7#define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */
8#define SCSI_IOCTL_START_UNIT 5
9#define SCSI_IOCTL_STOP_UNIT 6
10#define SCSI_IOCTL_SECURITY_PROTOCOL_IN 7
11#define SCSI_IOCTL_SECURITY_PROTOCOL_OUT 8
12/* The door lock/unlock constants are compatible with Sun constants for
13 the cdrom */
14#define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */
15#define SCSI_IOCTL_DOORUNLOCK 0x5381 /* unlock the mechanism */
16
17#define SCSI_REMOVAL_PREVENT 1
18#define SCSI_REMOVAL_ALLOW 0
19
20#define SCSI_UFS_REQUEST_SENSE 0x6000 /* clear UAC in w-lun */
21
22#ifdef __KERNEL__
23
24struct scsi_device;
25
26/*
27 * Structures used for scsi_ioctl et al.
28 */
29
30typedef struct scsi_ioctl_command {
31 unsigned int inlen;
32 unsigned int outlen;
33 unsigned char data[0];
34} Scsi_Ioctl_Command;
35
36typedef struct scsi_idlun {
37 __u32 dev_id;
38 __u32 host_unique_id;
39} Scsi_Idlun;
40
41/* Fibre Channel WWN, port_id struct */
42typedef struct scsi_fctargaddress {
43 __u32 host_port_id;
44 unsigned char host_wwn[8]; // include NULL term.
45} Scsi_FCTargAddress;
46
47int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev,
48 int cmd, bool ndelay);
49#if defined(CONFIG_UFS_SRPMB)
50typedef struct rpmb_req {
51 u32 cmd;
52 volatile u32 status_flag;
53 u32 type;
54 u32 data_len;
55 u32 inlen;
56 u32 outlen;
57 u8 rpmb_data[0];
58} Rpmb_Req;
59
60extern int srpmb_scsi_ioctl(struct scsi_device *, Rpmb_Req *req);
61#endif
62
63extern int scsi_ioctl(struct scsi_device *, int, void __user *);
64
65#endif /* __KERNEL__ */
66#endif /* _SCSI_IOCTL_H */