1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27#ifndef __RTS51X_TRANSPORT_H
28#define __RTS51X_TRANSPORT_H
29
30#include <linux/kernel.h>
31
32#include "rts51x.h"
33#include "rts51x_chip.h"
34
35#if 1
36#define URB_NO_SETUP_DMA_MAP 0
37#endif
38
39unsigned int rts51x_access_sglist(unsigned char *buffer,
40 unsigned int buflen, void *sglist,
41 void **sgptr, unsigned int *offset,
42 enum xfer_buf_dir dir);
43void rts51x_set_xfer_buf(unsigned char *buffer, unsigned int buflen,
44 struct scsi_cmnd *srb);
45void rts51x_get_xfer_buf(unsigned char *buffer, unsigned int buflen,
46 struct scsi_cmnd *srb);
47
48int rts51x_ctrl_transfer(struct rts51x_chip *chip, unsigned int pipe,
49 u8 request, u8 requesttype, u16 value, u16 index,
50 void *data, u16 size, int timeout);
51int rts51x_transfer_data(struct rts51x_chip *chip, unsigned int pipe,
52 void *buf, unsigned int len, int use_sg,
53 unsigned int *act_len, int timeout);
54int rts51x_transfer_data_partial(struct rts51x_chip *chip, unsigned int pipe,
55 void *buf, void **ptr, unsigned int *offset,
56 unsigned int len, int use_sg,
57 unsigned int *act_len, int timeout);
58
59#ifndef POLLING_IN_THREAD
60int rts51x_start_epc_transfer(struct rts51x_chip *chip);
61void rts51x_cancel_epc_transfer(struct rts51x_chip *chip);
62#endif
63
64int rts51x_get_epc_status(struct rts51x_chip *chip, u16 *status);
65void rts51x_invoke_transport(struct scsi_cmnd *srb, struct rts51x_chip *chip);
66
67#endif
68