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#include <scsi/scsi_device.h>
27
28enum {
29 SCSI_DH_OK = 0,
30
31
32
33 SCSI_DH_DEV_FAILED,
34 SCSI_DH_DEV_TEMP_BUSY,
35 SCSI_DH_DEV_UNSUPP,
36 SCSI_DH_DEVICE_MAX,
37
38
39
40
41 SCSI_DH_NOTCONN = SCSI_DH_DEVICE_MAX + 1,
42 SCSI_DH_CONN_FAILURE,
43 SCSI_DH_TRANSPORT_MAX,
44
45
46
47
48 SCSI_DH_IO = SCSI_DH_TRANSPORT_MAX + 1,
49 SCSI_DH_INVALID_IO,
50 SCSI_DH_RETRY,
51 SCSI_DH_IMM_RETRY,
52 SCSI_DH_TIMED_OUT,
53 SCSI_DH_RES_TEMP_UNAVAIL,
54 SCSI_DH_DEV_OFFLINED,
55 SCSI_DH_NOSYS,
56 SCSI_DH_DRIVER_MAX,
57};
58#if defined(CONFIG_SCSI_DH) || defined(CONFIG_SCSI_DH_MODULE)
59extern int scsi_dh_activate(struct request_queue *, activate_complete, void *);
60extern int scsi_dh_handler_exist(const char *);
61extern int scsi_dh_attach(struct request_queue *, const char *);
62extern void scsi_dh_detach(struct request_queue *);
63extern int scsi_dh_set_params(struct request_queue *, const char *);
64#else
65static inline int scsi_dh_activate(struct request_queue *req,
66 activate_complete fn, void *data)
67{
68 fn(data, 0);
69 return 0;
70}
71static inline int scsi_dh_handler_exist(const char *name)
72{
73 return 0;
74}
75static inline int scsi_dh_attach(struct request_queue *req, const char *name)
76{
77 return SCSI_DH_NOSYS;
78}
79static inline void scsi_dh_detach(struct request_queue *q)
80{
81 return;
82}
83static inline int scsi_dh_set_params(struct request_queue *req, const char *params)
84{
85 return -SCSI_DH_NOSYS;
86}
87#endif
88