1*1da177e4SLinus Torvalds #ifndef _SCSI_IOCTL_H 2*1da177e4SLinus Torvalds #define _SCSI_IOCTL_H 3*1da177e4SLinus Torvalds 4*1da177e4SLinus Torvalds #define SCSI_IOCTL_SEND_COMMAND 1 5*1da177e4SLinus Torvalds #define SCSI_IOCTL_TEST_UNIT_READY 2 6*1da177e4SLinus Torvalds #define SCSI_IOCTL_BENCHMARK_COMMAND 3 7*1da177e4SLinus Torvalds #define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */ 8*1da177e4SLinus Torvalds #define SCSI_IOCTL_START_UNIT 5 9*1da177e4SLinus Torvalds #define SCSI_IOCTL_STOP_UNIT 6 10*1da177e4SLinus Torvalds /* The door lock/unlock constants are compatible with Sun constants for 11*1da177e4SLinus Torvalds the cdrom */ 12*1da177e4SLinus Torvalds #define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */ 13*1da177e4SLinus Torvalds #define SCSI_IOCTL_DOORUNLOCK 0x5381 /* unlock the mechanism */ 14*1da177e4SLinus Torvalds 15*1da177e4SLinus Torvalds #define SCSI_REMOVAL_PREVENT 1 16*1da177e4SLinus Torvalds #define SCSI_REMOVAL_ALLOW 0 17*1da177e4SLinus Torvalds 18*1da177e4SLinus Torvalds #ifdef __KERNEL__ 19*1da177e4SLinus Torvalds 20*1da177e4SLinus Torvalds struct scsi_device; 21*1da177e4SLinus Torvalds 22*1da177e4SLinus Torvalds /* 23*1da177e4SLinus Torvalds * Structures used for scsi_ioctl et al. 24*1da177e4SLinus Torvalds */ 25*1da177e4SLinus Torvalds 26*1da177e4SLinus Torvalds typedef struct scsi_ioctl_command { 27*1da177e4SLinus Torvalds unsigned int inlen; 28*1da177e4SLinus Torvalds unsigned int outlen; 29*1da177e4SLinus Torvalds unsigned char data[0]; 30*1da177e4SLinus Torvalds } Scsi_Ioctl_Command; 31*1da177e4SLinus Torvalds 32*1da177e4SLinus Torvalds typedef struct scsi_idlun { 33*1da177e4SLinus Torvalds __u32 dev_id; 34*1da177e4SLinus Torvalds __u32 host_unique_id; 35*1da177e4SLinus Torvalds } Scsi_Idlun; 36*1da177e4SLinus Torvalds 37*1da177e4SLinus Torvalds /* Fibre Channel WWN, port_id struct */ 38*1da177e4SLinus Torvalds typedef struct scsi_fctargaddress { 39*1da177e4SLinus Torvalds __u32 host_port_id; 40*1da177e4SLinus Torvalds unsigned char host_wwn[8]; // include NULL term. 41*1da177e4SLinus Torvalds } Scsi_FCTargAddress; 42*1da177e4SLinus Torvalds 43*1da177e4SLinus Torvalds extern int scsi_ioctl(struct scsi_device *, int, void __user *); 44*1da177e4SLinus Torvalds extern int scsi_ioctl_send_command(struct scsi_device *, 45*1da177e4SLinus Torvalds struct scsi_ioctl_command __user *); 46*1da177e4SLinus Torvalds extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, 47*1da177e4SLinus Torvalds void __user *arg, struct file *filp); 48*1da177e4SLinus Torvalds 49*1da177e4SLinus Torvalds #endif /* __KERNEL__ */ 50*1da177e4SLinus Torvalds #endif /* _SCSI_IOCTL_H */ 51