0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef _TRANSPORT_H_
0025 #define _TRANSPORT_H_
0026
0027 #include <linux/blkdev.h>
0028
0029
0030
0031
0032
0033 #define USB_STOR_XFER_GOOD 0
0034 #define USB_STOR_XFER_SHORT 1
0035 #define USB_STOR_XFER_STALLED 2
0036 #define USB_STOR_XFER_LONG 3
0037 #define USB_STOR_XFER_ERROR 4
0038
0039
0040
0041
0042
0043 #define USB_STOR_TRANSPORT_GOOD 0
0044 #define USB_STOR_TRANSPORT_FAILED 1
0045 #define USB_STOR_TRANSPORT_NO_SENSE 2
0046 #define USB_STOR_TRANSPORT_ERROR 3
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060 #define US_CBI_ADSC 0
0061
0062 extern int usb_stor_CB_transport(struct scsi_cmnd *, struct us_data*);
0063 extern int usb_stor_CB_reset(struct us_data*);
0064
0065 extern int usb_stor_Bulk_transport(struct scsi_cmnd *, struct us_data*);
0066 extern int usb_stor_Bulk_max_lun(struct us_data*);
0067 extern int usb_stor_Bulk_reset(struct us_data*);
0068
0069 extern void usb_stor_invoke_transport(struct scsi_cmnd *, struct us_data*);
0070 extern void usb_stor_stop_transport(struct us_data*);
0071
0072 extern int usb_stor_control_msg(struct us_data *us, unsigned int pipe,
0073 u8 request, u8 requesttype, u16 value, u16 index,
0074 void *data, u16 size, int timeout);
0075 extern int usb_stor_clear_halt(struct us_data *us, unsigned int pipe);
0076
0077 extern int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,
0078 u8 request, u8 requesttype, u16 value, u16 index,
0079 void *data, u16 size);
0080 extern int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,
0081 void *buf, unsigned int length, unsigned int *act_len);
0082 extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe,
0083 void *buf, unsigned int length, int use_sg, int *residual);
0084 extern int usb_stor_bulk_srb(struct us_data* us, unsigned int pipe,
0085 struct scsi_cmnd* srb);
0086
0087 extern int usb_stor_port_reset(struct us_data *us);
0088 #endif