Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
scsi_ioctl.c File Reference
#include <linux/module.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <asm/uaccess.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
#include <scsi/scsi_dbg.h>
#include "scsi_logging.h"

Go to the source code of this file.

Macros

#define NORMAL_RETRIES   5
 
#define IOCTL_NORMAL_TIMEOUT   (10 * HZ)
 
#define MAX_BUF   PAGE_SIZE
 

Functions

int scsi_set_medium_removal (struct scsi_device *sdev, char state)
 
 EXPORT_SYMBOL (scsi_set_medium_removal)
 
int scsi_ioctl (struct scsi_device *sdev, int cmd, void __user *arg)
 
 EXPORT_SYMBOL (scsi_ioctl)
 
int scsi_nonblockable_ioctl (struct scsi_device *sdev, int cmd, void __user *arg, int ndelay)
 
 EXPORT_SYMBOL (scsi_nonblockable_ioctl)
 

Macro Definition Documentation

#define IOCTL_NORMAL_TIMEOUT   (10 * HZ)

Definition at line 29 of file scsi_ioctl.c.

#define MAX_BUF   PAGE_SIZE

Definition at line 31 of file scsi_ioctl.c.

#define NORMAL_RETRIES   5

Definition at line 28 of file scsi_ioctl.c.

Function Documentation

EXPORT_SYMBOL ( scsi_set_medium_removal  )
EXPORT_SYMBOL ( scsi_ioctl  )
EXPORT_SYMBOL ( scsi_nonblockable_ioctl  )
int scsi_ioctl ( struct scsi_device sdev,
int  cmd,
void __user arg 
)

scsi_ioctl - Dispatch ioctl to scsi device : scsi device receiving ioctl : which ioctl is it

  • : 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.

Definition at line 194 of file scsi_ioctl.c.

int scsi_nonblockable_ioctl ( struct scsi_device sdev,
int  cmd,
void __user arg,
int  ndelay 
)

scsi_nonblockable_ioctl() - Handle SG_SCSI_RESET : scsi device receiving ioctl : Must be SC_SCSI_RESET

  • : pointer to int containing SG_SCSI_RESET_{DEVICE,BUS,HOST} : file mode O_NDELAY flag

Definition at line 286 of file scsi_ioctl.c.

int scsi_set_medium_removal ( struct scsi_device sdev,
char  state 
)

Definition at line 134 of file scsi_ioctl.c.