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 <scsi/scsi_host.h>
#include "common.h"

Go to the source code of this file.

Data Structures

struct  us_unusual_dev
 
struct  _SD_STATUS
 
struct  _MS_STATUS
 
struct  _SM_STATUS
 
struct  us_data
 

Macros

#define REG_CARD_STATUS   0xFF83
 
#define REG_HW_TRAP1   0xFF89
 
#define SS_SUCCESS   0x00
 
#define SS_NOT_READY   0x02
 
#define SS_MEDIUM_ERR   0x03
 
#define SS_HW_ERR   0x04
 
#define SS_ILLEGAL_REQUEST   0x05
 
#define SS_UNIT_ATTENTION   0x06
 
#define SD_INIT1_PATTERN   1
 
#define SD_INIT2_PATTERN   2
 
#define SD_RW_PATTERN   3
 
#define MS_INIT_PATTERN   4
 
#define MSP_RW_PATTERN   5
 
#define MS_RW_PATTERN   6
 
#define SM_INIT_PATTERN   7
 
#define SM_RW_PATTERN   8
 
#define FDIR_WRITE   0
 
#define FDIR_READ   1
 
#define SD_BLOCK_LEN   9
 
#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_DONT_SCAN   6 /* don't scan (disconnect) */
 
#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)
 

Typedefs

typedef struct _SD_STATUS SD_STATUS
 
typedef struct _SD_STATUSPSD_STATUS
 
typedef struct _MS_STATUS MS_STATUS
 
typedef struct _MS_STATUSPMS_STATUS
 
typedef struct _SM_STATUS SM_STATUS
 
typedef struct _SM_STATUSPSM_STATUS
 
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)
 

Macro Definition Documentation

#define FDIR_READ   1

Definition at line 52 of file usb.h.

#define FDIR_WRITE   0

Definition at line 51 of file usb.h.

#define MS_INIT_PATTERN   4

Definition at line 45 of file usb.h.

#define MS_RW_PATTERN   6

Definition at line 47 of file usb.h.

#define MSP_RW_PATTERN   5

Definition at line 46 of file usb.h.

#define REG_CARD_STATUS   0xFF83

Definition at line 30 of file usb.h.

#define REG_HW_TRAP1   0xFF89

Definition at line 31 of file usb.h.

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

Definition at line 235 of file usb.h.

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

Definition at line 234 of file usb.h.

#define SD_BLOCK_LEN   9

Definition at line 86 of file usb.h.

#define SD_INIT1_PATTERN   1

Definition at line 42 of file usb.h.

#define SD_INIT2_PATTERN   2

Definition at line 43 of file usb.h.

#define SD_RW_PATTERN   3

Definition at line 44 of file usb.h.

#define SM_INIT_PATTERN   7

Definition at line 48 of file usb.h.

#define SM_RW_PATTERN   8

Definition at line 49 of file usb.h.

#define SS_HW_ERR   0x04

Definition at line 37 of file usb.h.

#define SS_ILLEGAL_REQUEST   0x05

Definition at line 38 of file usb.h.

#define SS_MEDIUM_ERR   0x03

Definition at line 36 of file usb.h.

#define SS_NOT_READY   0x02

Definition at line 35 of file usb.h.

#define SS_SUCCESS   0x00

Definition at line 34 of file usb.h.

#define SS_UNIT_ATTENTION   0x06

Definition at line 39 of file usb.h.

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

Definition at line 91 of file usb.h.

#define US_FLIDX_DISCONNECTING   3 /* disconnect in progress */

Definition at line 92 of file usb.h.

#define US_FLIDX_DONT_SCAN   6 /* don't scan (disconnect) */

Definition at line 95 of file usb.h.

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

Definition at line 93 of file usb.h.

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

Definition at line 90 of file usb.h.

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

Definition at line 94 of file usb.h.

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

Definition at line 89 of file usb.h.

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

Definition at line 107 of file usb.h.

#define US_RESUME   1

Definition at line 117 of file usb.h.

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

Definition at line 108 of file usb.h.

#define US_SUSPEND   0

Definition at line 116 of file usb.h.

#define USB_STOR_STRING_LEN   32

Definition at line 98 of file usb.h.

Typedef Documentation

typedef void(* extra_data_destructor)(void *)

Definition at line 113 of file usb.h.

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

Definition at line 114 of file usb.h.

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

Definition at line 112 of file usb.h.

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

Definition at line 110 of file usb.h.

typedef int(* trans_reset)(struct us_data *)

Definition at line 111 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.