Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
devio.c File Reference
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/signal.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <linux/usb/hcd.h>
#include <linux/cdev.h>
#include <linux/notifier.h>
#include <linux/security.h>
#include <linux/user_namespace.h>
#include <linux/scatterlist.h>
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include <linux/moduleparam.h>
#include "usb.h"

Go to the source code of this file.

Data Structures

struct  dev_state
 
struct  async
 

Macros

#define USB_MAXBUS   64
 
#define USB_DEVICE_MAX   USB_MAXBUS * 128
 
#define USB_SG_SIZE   16384 /* split-size for large txs */
 
#define snoop(dev, format, arg...)
 
#define USB_DEVICE_DEV   MKDEV(USB_DEVICE_MAJOR, 0)
 
#define USBFS_XFER_MAX   (UINT_MAX / 2 - 1000000)
 
#define AS_CONTINUATION   1
 
#define AS_UNLINK   2
 

Enumerations

enum  snoop_when { SUBMIT, COMPLETE }
 

Functions

 DEFINE_MUTEX (usbfs_mutex)
 
 module_param (usbfs_snoop, bool, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (usbfs_snoop,"true to log all usbfs traffic")
 
 module_param (usbfs_memory_mb, uint, 0644)
 
 MODULE_PARM_DESC (usbfs_memory_mb,"maximum MB allowed for usbfs buffers (0 = no limit)")
 
int __init usb_devio_init (void)
 
void usb_devio_cleanup (void)
 

Variables

struct usb_driver usbfs_driver
 
struct file_operations usbdev_file_operations
 

Macro Definition Documentation

#define AS_CONTINUATION   1

Definition at line 447 of file devio.c.

#define AS_UNLINK   2

Definition at line 448 of file devio.c.

#define snoop (   dev,
  format,
  arg... 
)
Value:
do { \
if (usbfs_snoop) \
dev_info(dev , format , ## arg); \
} while (0)

Definition at line 102 of file devio.c.

#define USB_DEVICE_DEV   MKDEV(USB_DEVICE_MAJOR, 0)

Definition at line 112 of file devio.c.

#define USB_DEVICE_MAX   USB_MAXBUS * 128

Definition at line 58 of file devio.c.

#define USB_MAXBUS   64

Definition at line 57 of file devio.c.

#define USB_SG_SIZE   16384 /* split-size for large txs */

Definition at line 59 of file devio.c.

#define USBFS_XFER_MAX   (UINT_MAX / 2 - 1000000)

Definition at line 121 of file devio.c.

Enumeration Type Documentation

enum snoop_when
Enumerator:
SUBMIT 
COMPLETE 

Definition at line 108 of file devio.c.

Function Documentation

DEFINE_MUTEX ( usbfs_mutex  )
module_param ( usbfs_snoop  ,
bool  ,
S_IRUGO S_IWUSR 
)
module_param ( usbfs_memory_mb  ,
uint  ,
0644   
)
MODULE_PARM_DESC ( usbfs_snoop  ,
"true to log all usbfs traffic"   
)
MODULE_PARM_DESC ( usbfs_memory_mb  ,
"maximum MB allowed for usbfs buffers (0 = no limit)"   
)
void usb_devio_cleanup ( void  )

Definition at line 2263 of file devio.c.

int __init usb_devio_init ( void  )

Definition at line 2237 of file devio.c.

Variable Documentation

struct file_operations usbdev_file_operations
Initial value:
= {
.owner = THIS_MODULE,
.llseek = usbdev_lseek,
.read = usbdev_read,
.poll = usbdev_poll,
.unlocked_ioctl = usbdev_ioctl,
.open = usbdev_open,
.release = usbdev_release,
}

Definition at line 2184 of file devio.c.

struct usb_driver usbfs_driver
Initial value:
= {
.name = "usbfs",
.probe = driver_probe,
.disconnect = driver_disconnect,
.suspend = driver_suspend,
.resume = driver_resume,
}

Definition at line 622 of file devio.c.