Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
usb.h File Reference
#include <linux/usb.h>
#include <linux/usb_usual.h>
#include <linux/blkdev.h>
#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <scsi/scsi_host.h>

Go to the source code of this file.

Data Structures

struct  us_unusual_dev
 
struct  us_data
 

Macros

#define US_FLIDX_URB_ACTIVE   0 /* current_urb is in use */
 
#define US_FLIDX_SG_ACTIVE   1 /* current_sg is in use */
 
#define US_FLIDX_ABORTING   2 /* abort is in progress */
 
#define US_FLIDX_DISCONNECTING   3 /* disconnect in progress */
 
#define US_FLIDX_RESETTING   4 /* device reset in progress */
 
#define US_FLIDX_TIMED_OUT   5 /* SCSI midlayer timed out */
 
#define US_FLIDX_SCAN_PENDING   6 /* scanning not yet done */
 
#define US_FLIDX_REDO_READ10   7 /* redo READ(10) command */
 
#define US_FLIDX_READ10_WORKED   8 /* previous READ(10) succeeded */
 
#define USB_STOR_STRING_LEN   32
 
#define US_IOBUF_SIZE   64 /* Size of the DMA-mapped I/O buffer */
 
#define US_SENSE_SIZE   18 /* Size of the autosense data buffer */
 
#define US_SUSPEND   0
 
#define US_RESUME   1
 
#define scsi_unlock(host)   spin_unlock_irq(host->host_lock)
 
#define scsi_lock(host)   spin_lock_irq(host->host_lock)
 
#define usb_stor_suspend   NULL
 
#define usb_stor_resume   NULL
 
#define usb_stor_reset_resume   NULL
 

Typedefs

typedef int(* trans_cmnd )(struct scsi_cmnd *, struct us_data *)
 
typedef int(* trans_reset )(struct us_data *)
 
typedef void(* proto_cmnd )(struct scsi_cmnd *, struct us_data *)
 
typedef void(* extra_data_destructor )(void *)
 
typedef void(* pm_hook )(struct us_data *, int)
 

Functions

void fill_inquiry_response (struct us_data *us, unsigned char *data, unsigned int data_len)
 
int usb_stor_pre_reset (struct usb_interface *iface)
 
int usb_stor_post_reset (struct usb_interface *iface)
 
int usb_stor_probe1 (struct us_data **pus, struct usb_interface *intf, const struct usb_device_id *id, struct us_unusual_dev *unusual_dev)
 
int usb_stor_probe2 (struct us_data *us)
 
void usb_stor_disconnect (struct usb_interface *intf)
 

Macro Definition Documentation

#define scsi_lock (   host)    spin_lock_irq(host->host_lock)

Definition at line 181 of file usb.h.

#define scsi_unlock (   host)    spin_unlock_irq(host->host_lock)

Definition at line 180 of file usb.h.

#define US_FLIDX_ABORTING   2 /* abort is in progress */

Definition at line 72 of file usb.h.

#define US_FLIDX_DISCONNECTING   3 /* disconnect in progress */

Definition at line 73 of file usb.h.

#define US_FLIDX_READ10_WORKED   8 /* previous READ(10) succeeded */

Definition at line 78 of file usb.h.

#define US_FLIDX_REDO_READ10   7 /* redo READ(10) command */

Definition at line 77 of file usb.h.

#define US_FLIDX_RESETTING   4 /* device reset in progress */

Definition at line 74 of file usb.h.

#define US_FLIDX_SCAN_PENDING   6 /* scanning not yet done */

Definition at line 76 of file usb.h.

#define US_FLIDX_SG_ACTIVE   1 /* current_sg is in use */

Definition at line 71 of file usb.h.

#define US_FLIDX_TIMED_OUT   5 /* SCSI midlayer timed out */

Definition at line 75 of file usb.h.

#define US_FLIDX_URB_ACTIVE   0 /* current_urb is in use */

Definition at line 70 of file usb.h.

#define US_IOBUF_SIZE   64 /* Size of the DMA-mapped I/O buffer */

Definition at line 89 of file usb.h.

#define US_RESUME   1

Definition at line 99 of file usb.h.

#define US_SENSE_SIZE   18 /* Size of the autosense data buffer */

Definition at line 90 of file usb.h.

#define US_SUSPEND   0

Definition at line 98 of file usb.h.

#define usb_stor_reset_resume   NULL

Definition at line 191 of file usb.h.

#define usb_stor_resume   NULL

Definition at line 190 of file usb.h.

#define USB_STOR_STRING_LEN   32

Definition at line 80 of file usb.h.

#define usb_stor_suspend   NULL

Definition at line 189 of file usb.h.

Typedef Documentation

typedef void(* extra_data_destructor)(void *)

Definition at line 95 of file usb.h.

typedef void(* pm_hook)(struct us_data *, int)

Definition at line 96 of file usb.h.

typedef void(* proto_cmnd)(struct scsi_cmnd *, struct us_data *)

Definition at line 94 of file usb.h.

typedef int(* trans_cmnd)(struct scsi_cmnd *, struct us_data *)

Definition at line 92 of file usb.h.

typedef int(* trans_reset)(struct us_data *)

Definition at line 93 of file usb.h.

Function Documentation

void fill_inquiry_response ( struct us_data us,
unsigned char data,
unsigned int  data_len 
)

Definition at line 140 of file usb.c.

void usb_stor_disconnect ( struct usb_interface intf)

Definition at line 1024 of file usb.c.

int usb_stor_post_reset ( struct usb_interface iface)

Definition at line 235 of file usb.c.

int usb_stor_pre_reset ( struct usb_interface iface)

Definition at line 223 of file usb.c.

int usb_stor_probe1 ( struct us_data **  pus,
struct usb_interface intf,
const struct usb_device_id id,
struct us_unusual_dev unusual_dev 
)

Definition at line 900 of file usb.c.

int usb_stor_probe2 ( struct us_data us)

Definition at line 963 of file usb.c.