1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
15 #include <linux/types.h>
16 #include <linux/ioctl.h>
17 #include <linux/qic117.h>
44 #define MTSETDENSITY 21
47 #define MTSETDRVBUFFER 24
57 #define MTCOMPRESSION 32
69 __kernel_daddr_t mt_fileno;
70 __kernel_daddr_t mt_blkno;
73 #define MT_ISUNKNOWN 0x01
74 #define MT_ISQIC02 0x02
75 #define MT_ISWT5150 0x03
76 #define MT_ISARCHIVE_5945L2 0x04
77 #define MT_ISCMSJ500 0x05
78 #define MT_ISTDC3610 0x06
79 #define MT_ISARCHIVE_VP60I 0x07
80 #define MT_ISARCHIVE_2150L 0x08
81 #define MT_ISARCHIVE_2060L 0x09
82 #define MT_ISARCHIVESC499 0x0A
83 #define MT_ISQIC02_ALL_FEATURES 0x0F
84 #define MT_ISWT5099EEN24 0x11
85 #define MT_ISTEAC_MT2ST 0x12
86 #define MT_ISEVEREX_FT40A 0x32
87 #define MT_ISDDS1 0x51
88 #define MT_ISDDS2 0x52
89 #define MT_ISONSTREAM_SC 0x61
90 #define MT_ISSCSI1 0x71
91 #define MT_ISSCSI2 0x72
93 #define MT_ISFTAPE_UNKNOWN 0x800000
94 #define MT_ISFTAPE_FLAG 0x800000
101 #define MT_TAPE_INFO { {MT_ISUNKNOWN, "Unknown type of tape device"}, {MT_ISQIC02, "Generic QIC-02 tape streamer"}, {MT_ISWT5150, "Wangtek 5150, QIC-150"}, {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, {MT_ISCMSJ500, "CMS Jumbo 500"}, {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, {MT_ISSCSI1, "Generic SCSI-1 tape"}, {MT_ISSCSI2, "Generic SCSI-2 tape"}, {0, NULL} }
108 unsigned int mt_volno;
109 unsigned int mt_blksz;
110 unsigned int mt_rawsize;
111 unsigned int mt_size;
112 unsigned int mt_cmpr:1;
115 #define MT_FT_RD_SINGLE 0
116 #define MT_FT_RD_AHEAD 1
117 #define MT_FT_WR_ASYNC 0
118 #define MT_FT_WR_MULTI 1
119 #define MT_FT_WR_SINGLE 2
120 #define MT_FT_WR_DELETE 3
127 void __user *mt_data;
131 unsigned long mt_capacity;
132 unsigned long mt_used;
135 #define FTFMT_SET_PARMS 1
136 #define FTFMT_GET_PARMS 2
137 #define FTFMT_FORMAT_TRACK 3
138 #define FTFMT_STATUS 4
139 #define FTFMT_VERIFY 5
142 unsigned char ft_qicstd;
143 unsigned char ft_fmtcode;
144 unsigned char ft_fhm;
145 unsigned char ft_ftm;
146 unsigned short ft_spt;
147 unsigned short ft_tpc;
151 unsigned int ft_track;
152 unsigned char ft_gap3;
156 unsigned int ft_segment;
160 unsigned int ft_segment;
161 unsigned long ft_bsm;
167 struct ftfmtparms fmt_parms;
168 struct ftfmttrack fmt_track;
169 struct ftfmtstatus fmt_status;
170 struct ftfmtverify fmt_verify;
175 unsigned int ft_wait_before;
177 unsigned char ft_parm_cnt;
178 unsigned char ft_parms[3];
179 unsigned int ft_result_bits;
180 unsigned int ft_result;
181 unsigned int ft_wait_after;
186 #define MTIOCTOP _IOW('m', 1, struct mtop)
187 #define MTIOCGET _IOR('m', 2, struct mtget)
188 #define MTIOCPOS _IOR('m', 3, struct mtpos)
190 #define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo)
191 #define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo)
193 #define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg)
194 #define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg)
195 #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo)
196 #define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)
197 #define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat)
198 #define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd)
200 #define GMT_EOF(x) ((x) & 0x80000000)
201 #define GMT_BOT(x) ((x) & 0x40000000)
202 #define GMT_EOT(x) ((x) & 0x20000000)
203 #define GMT_SM(x) ((x) & 0x10000000)
204 #define GMT_EOD(x) ((x) & 0x08000000)
205 #define GMT_WR_PROT(x) ((x) & 0x04000000)
207 #define GMT_ONLINE(x) ((x) & 0x01000000)
208 #define GMT_D_6250(x) ((x) & 0x00800000)
209 #define GMT_D_1600(x) ((x) & 0x00400000)
210 #define GMT_D_800(x) ((x) & 0x00200000)
212 #define GMT_DR_OPEN(x) ((x) & 0x00040000)
214 #define GMT_IM_REP_EN(x) ((x) & 0x00010000)
215 #define GMT_CLN(x) ((x) & 0x00008000)
217 #define MT_ST_BLKSIZE_SHIFT 0
218 #define MT_ST_BLKSIZE_MASK 0xffffff
219 #define MT_ST_DENSITY_SHIFT 24
220 #define MT_ST_DENSITY_MASK 0xff000000
222 #define MT_ST_SOFTERR_SHIFT 0
223 #define MT_ST_SOFTERR_MASK 0xffff
225 #define MT_ST_OPTIONS 0xf0000000
226 #define MT_ST_BOOLEANS 0x10000000
227 #define MT_ST_SETBOOLEANS 0x30000000
228 #define MT_ST_CLEARBOOLEANS 0x40000000
229 #define MT_ST_WRITE_THRESHOLD 0x20000000
230 #define MT_ST_DEF_BLKSIZE 0x50000000
231 #define MT_ST_DEF_OPTIONS 0x60000000
232 #define MT_ST_TIMEOUTS 0x70000000
233 #define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000)
234 #define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000)
235 #define MT_ST_SET_CLN 0x80000000
237 #define MT_ST_BUFFER_WRITES 0x1
238 #define MT_ST_ASYNC_WRITES 0x2
239 #define MT_ST_READ_AHEAD 0x4
240 #define MT_ST_DEBUGGING 0x8
241 #define MT_ST_TWO_FM 0x10
242 #define MT_ST_FAST_MTEOM 0x20
243 #define MT_ST_AUTO_LOCK 0x40
244 #define MT_ST_DEF_WRITES 0x80
245 #define MT_ST_CAN_BSR 0x100
246 #define MT_ST_NO_BLKLIMS 0x200
247 #define MT_ST_CAN_PARTITIONS 0x400
248 #define MT_ST_SCSI2LOGICAL 0x800
249 #define MT_ST_SYSV 0x1000
250 #define MT_ST_NOWAIT 0x2000
252 #define MT_ST_CLEAR_DEFAULT 0xfffff
253 #define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
254 #define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
255 #define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
257 #define MT_ST_HPLOADER_OFFSET 10000