1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _TRANSPORT_H_
25#define _TRANSPORT_H_
26
27#include <linux/blkdev.h>
28
29
30
31
32
33#define USB_STOR_XFER_GOOD 0
34#define USB_STOR_XFER_SHORT 1
35#define USB_STOR_XFER_STALLED 2
36#define USB_STOR_XFER_LONG 3
37#define USB_STOR_XFER_ERROR 4
38
39
40
41
42
43#define USB_STOR_TRANSPORT_GOOD 0
44#define USB_STOR_TRANSPORT_FAILED 1
45#define USB_STOR_TRANSPORT_NO_SENSE 2
46#define USB_STOR_TRANSPORT_ERROR 3
47
48
49
50
51
52
53
54
55
56
57
58
59
60#define US_CBI_ADSC 0
61
62extern int usb_stor_CB_transport(struct scsi_cmnd *, struct us_data*);
63extern int usb_stor_CB_reset(struct us_data*);
64
65extern int usb_stor_Bulk_transport(struct scsi_cmnd *, struct us_data*);
66extern int usb_stor_Bulk_max_lun(struct us_data*);
67extern int usb_stor_Bulk_reset(struct us_data*);
68
69extern void usb_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
70extern void usb_stor_stop_transport(struct us_data*);
71
72extern int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
73 u8 request, u8 requesttype, u16 value, u16 index,
74 void *data, u16 size, int timeout);
75extern int usb_stor_clear_halt(struct us_data *us, unsigned int pipe);
76
77extern int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
78 u8 request, u8 requesttype, u16 value, u16 index,
79 void *data, u16 size);
80extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
81 void *buf, unsigned int length, unsigned int *act_len);
82extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
83 void *buf, unsigned int length, int use_sg, int *residual);
84extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
85 struct scsi_cmnd* srb);
86
87extern int usb_stor_port_reset(struct us_data *us);
88#endif
89