Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

scsi_ioctl(9) [centos man page]

SCSI_IOCTL(9)							  SCSI mid layer						     SCSI_IOCTL(9)

NAME
scsi_ioctl - Dispatch ioctl to scsi device SYNOPSIS
int scsi_ioctl(struct scsi_device * sdev, int cmd, void __user * arg); ARGUMENTS
sdev scsi device receiving ioctl cmd which ioctl is it arg data associated with ioctl DESCRIPTION
The scsi_ioctl function differs from most ioctls in that it does not take a major/minor number as the dev field. Rather, it takes a pointer to a struct scsi_device. AUTHORS
James Bottomley <James.Bottomley@hansenpartnership.com> Author. Rob Landley <rob@landley.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 SCSI_IOCTL(9)

Check Out this Related Man Page

ldi_ioctl(9F)						   Kernel Functions for Drivers 					     ldi_ioctl(9F)

NAME
ldi_ioctl - Send an ioctl to a device SYNOPSIS
#include <sys/sunldi.h> int ldi_ioctl(ldi_handle_t lh, int cmd, intptr_t arg, int mode, cred_t *cr, int *rvalp); PARAMETERS
lh Layered handle. cr Pointer to a credential structure used to open a device. rvalp Caller return value. (May be set by driver and is valid only if the ioctl() succeeds). cmd Command argument. Interpreted by driver ioctl() as the operation to be performed. arg Driver parameter. Argument interpretation is driver dependent and usually depends on the command type. mode Bit field that contains: FKIOCTL Inform the target device that the ioctl originated from within the kernel. DESCRIPTION
The ldi_ioctl() function passes an ioctl request to the device entry point for the device specified by the layered handle. This operation is supported for block, character, and streams devices. If arg is interpreted as a pointer (that is, as not an immediate value) and the data pointed to by arg is in the kernels address space, the FKIOCTL flag should be set. This indicates to the target driver that no data model conversion is necessary. If the caller of ldi_ioctl() is not the originator of the ioctl data pointed to by arg, (for example, when passing on an ioctl request from a userland process), the caller must pass on the mode parameter from the original ioctl. This is because the mode parameter contains the contains the FMODELS bits which enable the target driver to determine the data model of the process which originated the ioctl and perform any necessary conversions. See ddi_model_convert_from(9F) for more information. STREAM IOCTLS
For a general description of streams ioctls see streamio(7I). ldi_ioctl() supports a number of streams ioctls, using layered handles in the place of file descriptors. When issuing streams ioctls the FKIOCTL parameter should be specified. The possible return values for supported ioctl commands are also documented in streamio(7I). The following streams ioctls are supported: I_PLINK Behaves as documented in streamio(7I). The layered handle lh should point to the streams multiplexer. The arg parameter should point to a layered handle for another streams driver. I_UNPLINK Behaves as documented in streamio(7I)). The layered handle lh should point to the streams multiplexer. The arg parameter is the multiplexor ID number returned by I_PLINK when the streams were linked. RETURN VALUES
The ldi_ioctl() function returns 0 upon success. If a failure occurs before the request is passed on to the device, possible return values are shown below. Otherwise any other error number may be returned by the device. EINVAL Invalid input parameters. ENOTSUP Operation is not supported for this device. CONTEXT
These functions may be called from user or kernel context. SunOS 5.10 3 June 2003 ldi_ioctl(9F)
Man Page