0001
0002
0003
0004
0005
0006 #ifndef _UAPI_LINUX_CHIO_H
0007 #define _UAPI_LINUX_CHIO_H
0008
0009
0010 #define CHET_MT 0
0011 #define CHET_ST 1
0012 #define CHET_IE 2
0013 #define CHET_DT 3
0014 #define CHET_V1 4
0015 #define CHET_V2 5
0016 #define CHET_V3 6
0017 #define CHET_V4 7
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 struct changer_params {
0033 int cp_curpicker;
0034 int cp_npickers;
0035 int cp_nslots;
0036 int cp_nportals;
0037 int cp_ndrives;
0038 };
0039 struct changer_vendor_params {
0040 int cvp_n1;
0041 char cvp_label1[16];
0042 int cvp_n2;
0043 char cvp_label2[16];
0044 int cvp_n3;
0045 char cvp_label3[16];
0046 int cvp_n4;
0047 char cvp_label4[16];
0048 int reserved[8];
0049 };
0050
0051
0052
0053
0054
0055
0056 struct changer_move {
0057 int cm_fromtype;
0058 int cm_fromunit;
0059 int cm_totype;
0060 int cm_tounit;
0061 int cm_flags;
0062 };
0063 #define CM_INVERT 1
0064
0065
0066
0067
0068
0069
0070
0071
0072 struct changer_exchange {
0073 int ce_srctype;
0074 int ce_srcunit;
0075 int ce_fdsttype;
0076 int ce_fdstunit;
0077 int ce_sdsttype;
0078 int ce_sdstunit;
0079 int ce_flags;
0080 };
0081 #define CE_INVERT1 1
0082 #define CE_INVERT2 2
0083
0084
0085
0086
0087
0088
0089 struct changer_position {
0090 int cp_type;
0091 int cp_unit;
0092 int cp_flags;
0093 };
0094 #define CP_INVERT 1
0095
0096
0097
0098
0099
0100
0101 struct changer_element_status {
0102 int ces_type;
0103 unsigned char __user *ces_data;
0104 };
0105 #define CESTATUS_FULL 0x01
0106 #define CESTATUS_IMPEXP 0x02
0107 #define CESTATUS_EXCEPT 0x04
0108 #define CESTATUS_ACCESS 0x08
0109 #define CESTATUS_EXENAB 0x10
0110 #define CESTATUS_INENAB 0x20
0111
0112
0113
0114
0115
0116
0117 struct changer_get_element {
0118 int cge_type;
0119 int cge_unit;
0120 int cge_status;
0121 int cge_errno;
0122 int cge_srctype;
0123 int cge_srcunit;
0124 int cge_id;
0125 int cge_lun;
0126 char cge_pvoltag[36];
0127 char cge_avoltag[36];
0128 int cge_flags;
0129 };
0130
0131 #define CGE_ERRNO 0x01
0132 #define CGE_INVERT 0x02
0133 #define CGE_SRC 0x04
0134 #define CGE_IDLUN 0x08
0135 #define CGE_PVOLTAG 0x10
0136 #define CGE_AVOLTAG 0x20
0137
0138
0139
0140
0141
0142
0143 struct changer_set_voltag {
0144 int csv_type;
0145 int csv_unit;
0146 char csv_voltag[36];
0147 int csv_flags;
0148 };
0149 #define CSV_PVOLTAG 0x01
0150 #define CSV_AVOLTAG 0x02
0151 #define CSV_CLEARTAG 0x04
0152
0153
0154 #define CHIOMOVE _IOW('c', 1,struct changer_move)
0155 #define CHIOEXCHANGE _IOW('c', 2,struct changer_exchange)
0156 #define CHIOPOSITION _IOW('c', 3,struct changer_position)
0157 #define CHIOGPICKER _IOR('c', 4,int)
0158 #define CHIOSPICKER _IOW('c', 5,int)
0159 #define CHIOGPARAMS _IOR('c', 6,struct changer_params)
0160 #define CHIOGSTATUS _IOW('c', 8,struct changer_element_status)
0161 #define CHIOGELEM _IOW('c',16,struct changer_get_element)
0162 #define CHIOINITELEM _IO('c',17)
0163 #define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag)
0164 #define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params)
0165
0166 #endif