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
62 extern int usb_stor_CB_transport(struct scsi_cmnd *, struct us_data*);
63 extern int usb_stor_CB_reset(struct us_data*);
64
65 extern int usb_stor_Bulk_transport(struct scsi_cmnd *, struct us_data*);
66 extern int usb_stor_Bulk_max_lun(struct us_data*);
67 extern int usb_stor_Bulk_reset(struct us_data*);
68
69 extern void usb_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
70 extern void usb_stor_stop_transport(struct us_data*);
71
72 extern 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);
75 extern int usb_stor_clear_halt(struct us_data *us, unsigned int pipe);
76
77 extern 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);
80 extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
81 void *buf, unsigned int length, unsigned int *act_len);
82 extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
83 void *buf, unsigned int length, int use_sg, int *residual);
84 extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
85 struct scsi_cmnd* srb);
86
87 extern int usb_stor_port_reset(struct us_data *us);
88 #endif