Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
dummy_hcd.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/list.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/usb.h>
#include <linux/usb/gadget.h>
#include <linux/usb/hcd.h>
#include <linux/scatterlist.h>
#include <asm/byteorder.h>
#include <linux/io.h>
#include <asm/irq.h>
#include <asm/unaligned.h>

Go to the source code of this file.

Data Structures

struct  dummy_hcd_module_parameters
 
struct  dummy_ep
 
struct  dummy_request
 
struct  urbp
 
struct  dummy_hcd
 
struct  dummy
 

Macros

#define DRIVER_DESC   "USB Host+Gadget Emulator"
 
#define DRIVER_VERSION   "02 May 2005"
 
#define POWER_BUDGET   500 /* in mA; use 8 for low-power port testing */
 
#define DUMMY_ENDPOINTS   ARRAY_SIZE(ep_name)
 
#define FIFO_SIZE   64
 
#define is_enabled(dum)   (dum->port_status & USB_PORT_STAT_ENABLE)
 
#define is_active(dum_hcd)
 
#define Dev_Request   (USB_TYPE_STANDARD | USB_RECIP_DEVICE)
 
#define Dev_InRequest   (Dev_Request | USB_DIR_IN)
 
#define Intf_Request   (USB_TYPE_STANDARD | USB_RECIP_INTERFACE)
 
#define Intf_InRequest   (Intf_Request | USB_DIR_IN)
 
#define Ep_Request   (USB_TYPE_STANDARD | USB_RECIP_ENDPOINT)
 
#define Ep_InRequest   (Ep_Request | USB_DIR_IN)
 
#define PORT_C_MASK
 

Enumerations

enum  dummy_rh_state { DUMMY_RH_RESET, DUMMY_RH_SUSPENDED, DUMMY_RH_RUNNING }
 

Functions

 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_AUTHOR ("David Brownell")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (is_super_speed, mod_data.is_super_speed, bool, S_IRUGO)
 
 MODULE_PARM_DESC (is_super_speed,"true to simulate SuperSpeed connection")
 
 module_param_named (is_high_speed, mod_data.is_high_speed, bool, S_IRUGO)
 
 MODULE_PARM_DESC (is_high_speed,"true to simulate HighSpeed connection")
 
 module_init (init)
 
 module_exit (cleanup)
 

Variables

struct {
   struct usb_bos_descriptor   bos
 
   struct usb_ss_cap_descriptor   ss_cap
 
usb3_bos_desc
 

Macro Definition Documentation

#define Dev_InRequest   (Dev_Request | USB_DIR_IN)

Definition at line 1480 of file dummy_hcd.c.

#define Dev_Request   (USB_TYPE_STANDARD | USB_RECIP_DEVICE)

Definition at line 1479 of file dummy_hcd.c.

#define DRIVER_DESC   "USB Host+Gadget Emulator"

Definition at line 49 of file dummy_hcd.c.

#define DRIVER_VERSION   "02 May 2005"

Definition at line 50 of file dummy_hcd.c.

#define DUMMY_ENDPOINTS   ARRAY_SIZE(ep_name)

Definition at line 141 of file dummy_hcd.c.

#define Ep_InRequest   (Ep_Request | USB_DIR_IN)

Definition at line 1484 of file dummy_hcd.c.

#define Ep_Request   (USB_TYPE_STANDARD | USB_RECIP_ENDPOINT)

Definition at line 1483 of file dummy_hcd.c.

#define FIFO_SIZE   64

Definition at line 145 of file dummy_hcd.c.

#define Intf_InRequest   (Intf_Request | USB_DIR_IN)

Definition at line 1482 of file dummy_hcd.c.

#define Intf_Request   (USB_TYPE_STANDARD | USB_RECIP_INTERFACE)

Definition at line 1481 of file dummy_hcd.c.

#define is_active (   dum_hcd)
Value:
((dum_hcd->port_status & \
USB_PORT_STAT_SUSPEND)) \

Definition at line 1452 of file dummy_hcd.c.

#define is_enabled (   dum)    (dum->port_status & USB_PORT_STAT_ENABLE)

Definition at line 407 of file dummy_hcd.c.

#define PORT_C_MASK
#define POWER_BUDGET   500 /* in mA; use 8 for low-power port testing */

Definition at line 52 of file dummy_hcd.c.

Enumeration Type Documentation

Enumerator:
DUMMY_RH_RESET 
DUMMY_RH_SUSPENDED 
DUMMY_RH_RUNNING 

Definition at line 155 of file dummy_hcd.c.

Function Documentation

MODULE_AUTHOR ( "David Brownell"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
module_exit ( cleanup  )
module_init ( init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( is_super_speed  ,
mod_data.  is_super_speed,
bool  ,
S_IRUGO   
)
module_param_named ( is_high_speed  ,
mod_data.  is_high_speed,
bool  ,
S_IRUGO   
)
MODULE_PARM_DESC ( is_super_speed  ,
"true to simulate SuperSpeed connection  
)
MODULE_PARM_DESC ( is_high_speed  ,
"true to simulate HighSpeed connection  
)

Variable Documentation

Definition at line 1923 of file dummy_hcd.c.

Definition at line 1924 of file dummy_hcd.c.

struct { ... } usb3_bos_desc
Initial value:
= {
.bos = {
.bLength = USB_DT_BOS_SIZE,
.bDescriptorType = USB_DT_BOS,
.wTotalLength = cpu_to_le16(sizeof(usb3_bos_desc)),
.bNumDeviceCaps = 1,
},
.ss_cap = {
.bDescriptorType = USB_DT_DEVICE_CAPABILITY,
.bDevCapabilityType = USB_SS_CAP_TYPE,
.wSpeedSupported = cpu_to_le16(USB_5GBPS_OPERATION),
.bFunctionalitySupport = ilog2(USB_5GBPS_OPERATION),
},
}