linux/include/scsi/scsi_ioctl.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _SCSI_IOCTL_H
#define _SCSI_IOCTL_H 

#define SCSI_IOCTL_SEND_COMMAND
#define SCSI_IOCTL_TEST_UNIT_READY
#define SCSI_IOCTL_BENCHMARK_COMMAND
#define SCSI_IOCTL_SYNC
#define SCSI_IOCTL_START_UNIT
#define SCSI_IOCTL_STOP_UNIT
/* The door lock/unlock constants are compatible with Sun constants for
   the cdrom */
#define SCSI_IOCTL_DOORLOCK
#define SCSI_IOCTL_DOORUNLOCK

#define SCSI_REMOVAL_PREVENT
#define SCSI_REMOVAL_ALLOW

#ifdef __KERNEL__

struct gendisk;
struct scsi_device;
struct sg_io_hdr;

/*
 * Structures used for scsi_ioctl et al.
 */

Scsi_Ioctl_Command;

Scsi_Idlun;

/* Fibre Channel WWN, port_id struct */
Scsi_FCTargAddress;

int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev,
		int cmd, bool ndelay);
int scsi_ioctl(struct scsi_device *sdev, bool open_for_write, int cmd,
		void __user *arg);
int get_sg_io_hdr(struct sg_io_hdr *hdr, const void __user *argp);
int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp);
bool scsi_cmd_allowed(unsigned char *cmd, bool open_for_write);

#endif /* __KERNEL__ */
#endif /* _SCSI_IOCTL_H */