1
2
3
4
5
6#ifndef _UAPI_LINUX_CHIO_H
7#define _UAPI_LINUX_CHIO_H
8
9
10#define CHET_MT 0
11#define CHET_ST 1
12#define CHET_IE 2
13#define CHET_DT 3
14#define CHET_V1 4
15#define CHET_V2 5
16#define CHET_V3 6
17#define CHET_V4 7
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32struct changer_params {
33 int cp_curpicker;
34 int cp_npickers;
35 int cp_nslots;
36 int cp_nportals;
37 int cp_ndrives;
38};
39struct changer_vendor_params {
40 int cvp_n1;
41 char cvp_label1[16];
42 int cvp_n2;
43 char cvp_label2[16];
44 int cvp_n3;
45 char cvp_label3[16];
46 int cvp_n4;
47 char cvp_label4[16];
48 int reserved[8];
49};
50
51
52
53
54
55
56struct changer_move {
57 int cm_fromtype;
58 int cm_fromunit;
59 int cm_totype;
60 int cm_tounit;
61 int cm_flags;
62};
63#define CM_INVERT 1
64
65
66
67
68
69
70
71
72struct changer_exchange {
73 int ce_srctype;
74 int ce_srcunit;
75 int ce_fdsttype;
76 int ce_fdstunit;
77 int ce_sdsttype;
78 int ce_sdstunit;
79 int ce_flags;
80};
81#define CE_INVERT1 1
82#define CE_INVERT2 2
83
84
85
86
87
88
89struct changer_position {
90 int cp_type;
91 int cp_unit;
92 int cp_flags;
93};
94#define CP_INVERT 1
95
96
97
98
99
100
101struct changer_element_status {
102 int ces_type;
103 unsigned char __user *ces_data;
104};
105#define CESTATUS_FULL 0x01
106#define CESTATUS_IMPEXP 0x02
107#define CESTATUS_EXCEPT 0x04
108#define CESTATUS_ACCESS 0x08
109#define CESTATUS_EXENAB 0x10
110#define CESTATUS_INENAB 0x20
111
112
113
114
115
116
117struct changer_get_element {
118 int cge_type;
119 int cge_unit;
120 int cge_status;
121 int cge_errno;
122 int cge_srctype;
123 int cge_srcunit;
124 int cge_id;
125 int cge_lun;
126 char cge_pvoltag[36];
127 char cge_avoltag[36];
128 int cge_flags;
129};
130
131#define CGE_ERRNO 0x01
132#define CGE_INVERT 0x02
133#define CGE_SRC 0x04
134#define CGE_IDLUN 0x08
135#define CGE_PVOLTAG 0x10
136#define CGE_AVOLTAG 0x20
137
138
139
140
141
142
143struct changer_set_voltag {
144 int csv_type;
145 int csv_unit;
146 char csv_voltag[36];
147 int csv_flags;
148};
149#define CSV_PVOLTAG 0x01
150#define CSV_AVOLTAG 0x02
151#define CSV_CLEARTAG 0x04
152
153
154#define CHIOMOVE _IOW('c', 1,struct changer_move)
155#define CHIOEXCHANGE _IOW('c', 2,struct changer_exchange)
156#define CHIOPOSITION _IOW('c', 3,struct changer_position)
157#define CHIOGPICKER _IOR('c', 4,int)
158#define CHIOSPICKER _IOW('c', 5,int)
159#define CHIOGPARAMS _IOR('c', 6,struct changer_params)
160#define CHIOGSTATUS _IOW('c', 8,struct changer_element_status)
161#define CHIOGELEM _IOW('c',16,struct changer_get_element)
162#define CHIOINITELEM _IO('c',17)
163#define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag)
164#define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params)
165
166#endif
167