Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 | |
1cac41cb MB |
10 | #define SCSI_IOCTL_SECURITY_PROTOCOL_IN 7 |
11 | #define SCSI_IOCTL_SECURITY_PROTOCOL_OUT 8 | |
1da177e4 LT |
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 | ||
1cac41cb MB |
20 | #define SCSI_UFS_REQUEST_SENSE 0x6000 /* clear UAC in w-lun */ |
21 | ||
1da177e4 LT |
22 | #ifdef __KERNEL__ |
23 | ||
24 | struct scsi_device; | |
25 | ||
26 | /* | |
27 | * Structures used for scsi_ioctl et al. | |
28 | */ | |
29 | ||
30 | typedef struct scsi_ioctl_command { | |
31 | unsigned int inlen; | |
32 | unsigned int outlen; | |
33 | unsigned char data[0]; | |
34 | } Scsi_Ioctl_Command; | |
35 | ||
36 | typedef struct scsi_idlun { | |
37 | __u32 dev_id; | |
38 | __u32 host_unique_id; | |
39 | } Scsi_Idlun; | |
40 | ||
41 | /* Fibre Channel WWN, port_id struct */ | |
42 | typedef struct scsi_fctargaddress { | |
43 | __u32 host_port_id; | |
44 | unsigned char host_wwn[8]; // include NULL term. | |
45 | } Scsi_FCTargAddress; | |
46 | ||
906d15fb CH |
47 | int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev, |
48 | int cmd, bool ndelay); | |
1cac41cb MB |
49 | #if defined(CONFIG_UFS_SRPMB) |
50 | typedef 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 | ||
60 | extern int srpmb_scsi_ioctl(struct scsi_device *, Rpmb_Req *req); | |
61 | #endif | |
62 | ||
1da177e4 | 63 | extern int scsi_ioctl(struct scsi_device *, int, void __user *); |
1da177e4 LT |
64 | |
65 | #endif /* __KERNEL__ */ | |
66 | #endif /* _SCSI_IOCTL_H */ |