~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/staging/keucr/transport.h

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
/* command block wrapper */
9
9
struct bulk_cb_wrap {
10
10
        __le32  Signature;                      /* contains 'USBC' */
11
 
        __u32   Tag;                                    /* unique per command id */
 
11
        __u32   Tag;                            /* unique per command id */
12
12
        __le32  DataTransferLength;     /* size of data */
13
13
        __u8    Flags;                          /* direction in bit 0 */
14
14
        __u8    Lun;                                    /* LUN normally 0 */
49
49
 
50
50
/* Transport return codes */
51
51
#define USB_STOR_TRANSPORT_GOOD 0       /* Transport good, command good */
52
 
#define USB_STOR_TRANSPORT_FAILED       1       /* Transport good, command failed   */
53
 
#define USB_STOR_TRANSPORT_NO_SENSE     2       /* Command failed, no auto-sense    */
54
 
#define USB_STOR_TRANSPORT_ERROR        3       /* Transport bad (i.e. device dead) */
 
52
#define USB_STOR_TRANSPORT_FAILED 1     /* Transport good, command failed */
 
53
#define USB_STOR_TRANSPORT_NO_SENSE 2   /* Command failed, no auto-sense */
 
54
#define USB_STOR_TRANSPORT_ERROR 3      /* Transport bad (i.e. device dead) */
55
55
 
56
56
/*
57
57
 * We used to have USB_STOR_XFER_ABORTED and USB_STOR_TRANSPORT_ABORTED
64
64
/* CBI accept device specific command */
65
65
#define US_CBI_ADSC             0
66
66
extern int usb_stor_Bulk_transport(struct scsi_cmnd *, struct us_data*);
67
 
extern int usb_stor_Bulk_max_lun(struct us_data*);
68
 
extern int usb_stor_Bulk_reset(struct us_data*);
 
67
extern int usb_stor_Bulk_max_lun(struct us_data *);
 
68
extern int usb_stor_Bulk_reset(struct us_data *);
69
69
extern void usb_stor_print_cmd(struct scsi_cmnd *);
70
70
extern void usb_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
71
 
extern void usb_stor_stop_transport(struct us_data*);
 
71
extern void usb_stor_stop_transport(struct us_data *);
72
72
extern int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
73
73
                u8 request, u8 requesttype, u16 value, u16 index,
74
74
                void *data, u16 size, int timeout);
77
77
                void *buf, unsigned int length, unsigned int *act_len);
78
78
extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
79
79
                void *buf, unsigned int length, int use_sg, int *residual);
80
 
extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
81
 
                struct scsi_cmnd* srb);
 
80
extern int usb_stor_bulk_srb(struct us_data *us, unsigned int pipe,
 
81
                struct scsi_cmnd *srb);
82
82
extern int usb_stor_port_reset(struct us_data *us);
83
83
 
84
84
/* Protocol handling routines */
85
85
enum xfer_buf_dir       {TO_XFER_BUF, FROM_XFER_BUF};
86
 
extern unsigned int usb_stor_access_xfer_buf(struct us_data*, unsigned char *buffer,
87
 
        unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **,
88
 
        unsigned int *offset, enum xfer_buf_dir dir);
89
 
extern void usb_stor_set_xfer_buf(struct us_data*, unsigned char *buffer, unsigned int buflen, struct scsi_cmnd *srb,
 
86
extern unsigned int usb_stor_access_xfer_buf(struct us_data*,
 
87
        unsigned char *buffer, unsigned int buflen, struct scsi_cmnd *srb,
 
88
        struct scatterlist **, unsigned int *offset, enum xfer_buf_dir dir);
 
89
extern void usb_stor_set_xfer_buf(struct us_data*, unsigned char *buffer,
 
90
        unsigned int buflen, struct scsi_cmnd *srb,
90
91
        unsigned int dir);
91
92
 
92
 
// ENE scsi function
93
 
extern void ENE_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
94
 
extern int ENE_InitMedia(struct us_data*);
95
 
extern int ENE_MSInit(struct us_data*);
96
 
extern int ENE_SMInit(struct us_data*);
 
93
/*
 
94
 * ENE scsi function
 
95
 */
 
96
extern void ENE_stor_invoke_transport(struct scsi_cmnd *, struct us_data *);
 
97
extern int ENE_InitMedia(struct us_data *);
 
98
extern int ENE_MSInit(struct us_data *);
 
99
extern int ENE_SMInit(struct us_data *);
97
100
extern int ENE_SendScsiCmd(struct us_data*, BYTE, void*, int);
98
101
extern int ENE_LoadBinCode(struct us_data*, BYTE);
99
102
extern int ENE_Read_BYTE(struct us_data*, WORD index, void *buf);
101
104
extern int ENE_Write_Data(struct us_data*, void *buf, unsigned int length);
102
105
extern void BuildSenseBuffer(struct scsi_cmnd *, int);
103
106
 
104
 
// ENE scsi function
 
107
/*
 
108
 * ENE scsi function
 
109
 */
105
110
extern int MS_SCSIIrp(struct us_data *us, struct scsi_cmnd *srb);
106
111
extern int SM_SCSIIrp(struct us_data *us, struct scsi_cmnd *srb);
107
112
 
108
 
// ENE MS function
109
 
extern int      MS_CardInit(struct us_data *us);
 
113
/*
 
114
 * ENE MS function
 
115
 */
 
116
extern int      MS_CardInit(struct us_data *us);
110
117
extern void     MS_LibFreeAllocatedArea(struct us_data *us);
111
118
extern void     MS_LibFreeWriteBuf(struct us_data *us);
112
119
extern int      MS_LibFreeLogicalMap(struct us_data *us);
113
 
extern int      MS_LibForceSetLogicalPair(struct us_data *us, WORD logblk, WORD phyblk);
114
 
extern int      MS_ReaderReadPage(struct us_data *us, DWORD PhyBlockAddr, BYTE PageNum, DWORD *PageBuf, MS_LibTypeExtdat *ExtraDat);
115
 
extern int      MS_ReaderCopyBlock(struct us_data *us, WORD oldphy, WORD newphy, WORD PhyBlockAddr, BYTE PageNum, PBYTE buf, WORD len);
 
120
extern int      MS_LibForceSetLogicalPair(struct us_data *us, WORD logblk,
 
121
                                                                WORD phyblk);
 
122
extern int      MS_ReaderReadPage(struct us_data *us, DWORD PhyBlockAddr,
 
123
                                        BYTE PageNum, DWORD *PageBuf,
 
124
                                        MS_LibTypeExtdat *ExtraDat);
 
125
extern int      MS_ReaderCopyBlock(struct us_data *us, WORD oldphy,
 
126
                                        WORD newphy, WORD PhyBlockAddr,
 
127
                                        BYTE PageNum, PBYTE buf, WORD len);
116
128
extern int      MS_ReaderEraseBlock(struct us_data *us, DWORD PhyBlockAddr);
117
 
extern int      MS_LibProcessBootBlock(struct us_data *us, WORD PhyBlock, BYTE *PageData);
 
129
extern int      MS_LibProcessBootBlock(struct us_data *us, WORD PhyBlock,
 
130
                                                        BYTE *PageData);
118
131
extern int      MS_LibAllocLogicalMap(struct us_data *us);
119
132
extern int      MS_LibSetBootBlockMark(struct us_data *us, WORD phyblk);
120
 
extern int      MS_LibSetLogicalBlockMark(struct us_data *us, WORD phyblk, WORD mark);
 
133
extern int      MS_LibSetLogicalBlockMark(struct us_data *us, WORD phyblk,
 
134
                                                                WORD mark);
121
135
extern int      MS_LibSetInitialErrorBlock(struct us_data *us, WORD phyblk);
122
136
extern int      MS_LibScanLogicalBlockNumber(struct us_data *us, WORD phyblk);
123
137
extern int      MS_LibAllocWriteBuf(struct us_data *us);
124
138
void            MS_LibClearWriteBuf(struct us_data *us);
125
 
void            MS_LibPhy2LogRange(WORD PhyBlock, WORD *LogStart, WORD *LogEnde);
126
 
extern int      MS_LibReadExtra(struct us_data *us, DWORD PhyBlock, BYTE PageNum, MS_LibTypeExtdat *ExtraDat);
127
 
extern int      MS_LibReadExtraBlock(struct us_data *us, DWORD PhyBlock, BYTE PageNum, BYTE blen, void *buf);
 
139
void            MS_LibPhy2LogRange(WORD PhyBlock, WORD *LogStart,
 
140
                                                        WORD *LogEnde);
 
141
extern int      MS_LibReadExtra(struct us_data *us, DWORD PhyBlock,
 
142
                                BYTE PageNum, MS_LibTypeExtdat *ExtraDat);
 
143
extern int      MS_LibReadExtraBlock(struct us_data *us, DWORD PhyBlock,
 
144
                                        BYTE PageNum, BYTE blen, void *buf);
128
145
extern int      MS_LibSetAcquiredErrorBlock(struct us_data *us, WORD phyblk);
129
146
extern int      MS_LibErasePhyBlock(struct us_data *us, WORD phyblk);
130
147
extern int      MS_LibErrorPhyBlock(struct us_data *us, WORD phyblk);
131
 
extern int      MS_LibOverwriteExtra(struct us_data *us, DWORD PhyBlockAddr, BYTE PageNum, BYTE OverwriteFlag);
132
 
extern int      MS_LibSetLogicalPair(struct us_data *us, WORD logblk, WORD phyblk);
 
148
extern int      MS_LibOverwriteExtra(struct us_data *us, DWORD PhyBlockAddr,
 
149
                                        BYTE PageNum, BYTE OverwriteFlag);
 
150
extern int      MS_LibSetLogicalPair(struct us_data *us,
 
151
                                        WORD logblk, WORD phyblk);
133
152
extern int      MS_LibCheckDisableBlock(struct us_data *us, WORD PhyBlock);
134
153
extern int      MS_CountFreeBlock(struct us_data *us, WORD PhyBlock);
135
154
extern int      MS_LibSearchBlockFromLogical(struct us_data *us, WORD logblk);
136
155
extern int      MS_LibSearchBlockFromPhysical(struct us_data *us, WORD phyblk);
137
156
 
138
 
// ENE SM function
139
 
extern int      SM_FreeMem(void);
140
 
 
141
157
#endif