diff options
Diffstat (limited to 'include/linux/mtio.h')
| -rw-r--r-- | include/linux/mtio.h | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 8c66151821e3..6f8d2d45a8fb 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h | |||
| @@ -10,7 +10,6 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
| 13 | #include <linux/qic117.h> | ||
| 14 | 13 | ||
| 15 | /* | 14 | /* |
| 16 | * Structures and definitions for mag tape io control commands | 15 | * Structures and definitions for mag tape io control commands |
| @@ -116,32 +115,6 @@ struct mtget { | |||
| 116 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ | 115 | #define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */ |
| 117 | #define MT_ISFTAPE_FLAG 0x800000 | 116 | #define MT_ISFTAPE_FLAG 0x800000 |
| 118 | 117 | ||
| 119 | struct mt_tape_info { | ||
| 120 | long t_type; /* device type id (mt_type) */ | ||
| 121 | char *t_name; /* descriptive name */ | ||
| 122 | }; | ||
| 123 | |||
| 124 | #define MT_TAPE_INFO { \ | ||
| 125 | {MT_ISUNKNOWN, "Unknown type of tape device"}, \ | ||
| 126 | {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \ | ||
| 127 | {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \ | ||
| 128 | {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \ | ||
| 129 | {MT_ISCMSJ500, "CMS Jumbo 500"}, \ | ||
| 130 | {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \ | ||
| 131 | {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \ | ||
| 132 | {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \ | ||
| 133 | {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \ | ||
| 134 | {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \ | ||
| 135 | {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \ | ||
| 136 | {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \ | ||
| 137 | {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \ | ||
| 138 | {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \ | ||
| 139 | {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, \ | ||
| 140 | {MT_ISSCSI1, "Generic SCSI-1 tape"}, \ | ||
| 141 | {MT_ISSCSI2, "Generic SCSI-2 tape"}, \ | ||
| 142 | {0, NULL} \ | ||
| 143 | } | ||
| 144 | |||
| 145 | 118 | ||
| 146 | /* structure for MTIOCPOS - mag tape get position command */ | 119 | /* structure for MTIOCPOS - mag tape get position command */ |
| 147 | 120 | ||
| @@ -150,130 +123,11 @@ struct mtpos { | |||
| 150 | }; | 123 | }; |
| 151 | 124 | ||
| 152 | 125 | ||
| 153 | /* structure for MTIOCVOLINFO, query information about the volume | ||
| 154 | * currently positioned at (zftape) | ||
| 155 | */ | ||
| 156 | struct mtvolinfo { | ||
| 157 | unsigned int mt_volno; /* vol-number */ | ||
| 158 | unsigned int mt_blksz; /* blocksize used when recording */ | ||
| 159 | unsigned int mt_rawsize; /* raw tape space consumed, in kb */ | ||
| 160 | unsigned int mt_size; /* volume size after decompression, in kb */ | ||
| 161 | unsigned int mt_cmpr:1; /* this volume has been compressed */ | ||
| 162 | }; | ||
| 163 | |||
| 164 | /* raw access to a floppy drive, read and write an arbitrary segment. | ||
| 165 | * For ftape/zftape to support formatting etc. | ||
| 166 | */ | ||
| 167 | #define MT_FT_RD_SINGLE 0 | ||
| 168 | #define MT_FT_RD_AHEAD 1 | ||
| 169 | #define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */ | ||
| 170 | #define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */ | ||
| 171 | #define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */ | ||
| 172 | #define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */ | ||
| 173 | |||
| 174 | struct mtftseg | ||
| 175 | { | ||
| 176 | unsigned mt_segno; /* the segment to read or write */ | ||
| 177 | unsigned mt_mode; /* modes for read/write (sync/async etc.) */ | ||
| 178 | int mt_result; /* result of r/w request, not of the ioctl */ | ||
| 179 | void __user *mt_data; /* User space buffer: must be 29kb */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | /* get tape capacity (ftape/zftape) | ||
| 183 | */ | ||
| 184 | struct mttapesize { | ||
| 185 | unsigned long mt_capacity; /* entire, uncompressed capacity | ||
| 186 | * of a cartridge | ||
| 187 | */ | ||
| 188 | unsigned long mt_used; /* what has been used so far, raw | ||
| 189 | * uncompressed amount | ||
| 190 | */ | ||
| 191 | }; | ||
| 192 | |||
| 193 | /* possible values of the ftfmt_op field | ||
| 194 | */ | ||
| 195 | #define FTFMT_SET_PARMS 1 /* set software parms */ | ||
| 196 | #define FTFMT_GET_PARMS 2 /* get software parms */ | ||
| 197 | #define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */ | ||
| 198 | #define FTFMT_STATUS 4 /* monitor formatting a tape track */ | ||
| 199 | #define FTFMT_VERIFY 5 /* verify the given segment */ | ||
| 200 | |||
| 201 | struct ftfmtparms { | ||
| 202 | unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */ | ||
| 203 | unsigned char ft_fmtcode; /* Refer to the QIC specs */ | ||
| 204 | unsigned char ft_fhm; /* floppy head max */ | ||
| 205 | unsigned char ft_ftm; /* floppy track max */ | ||
| 206 | unsigned short ft_spt; /* segments per track */ | ||
| 207 | unsigned short ft_tpc; /* tracks per cartridge */ | ||
| 208 | }; | ||
| 209 | |||
| 210 | struct ftfmttrack { | ||
| 211 | unsigned int ft_track; /* track to format */ | ||
| 212 | unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */ | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct ftfmtstatus { | ||
| 216 | unsigned int ft_segment; /* segment currently being formatted */ | ||
| 217 | }; | ||
| 218 | |||
| 219 | struct ftfmtverify { | ||
| 220 | unsigned int ft_segment; /* segment to verify */ | ||
| 221 | unsigned long ft_bsm; /* bsm as result of VERIFY cmd */ | ||
| 222 | }; | ||
| 223 | |||
| 224 | struct mtftformat { | ||
| 225 | unsigned int fmt_op; /* operation to perform */ | ||
| 226 | union fmt_arg { | ||
| 227 | struct ftfmtparms fmt_parms; /* format parameters */ | ||
| 228 | struct ftfmttrack fmt_track; /* ctrl while formatting */ | ||
| 229 | struct ftfmtstatus fmt_status; | ||
| 230 | struct ftfmtverify fmt_verify; /* for verifying */ | ||
| 231 | } fmt_arg; | ||
| 232 | }; | ||
| 233 | |||
| 234 | struct mtftcmd { | ||
| 235 | unsigned int ft_wait_before; /* timeout to wait for drive to get ready | ||
| 236 | * before command is sent. Milliseconds | ||
| 237 | */ | ||
| 238 | qic117_cmd_t ft_cmd; /* command to send */ | ||
| 239 | unsigned char ft_parm_cnt; /* zero: no parm is sent. */ | ||
| 240 | unsigned char ft_parms[3]; /* parameter(s) to send to | ||
| 241 | * the drive. The parms are nibbles | ||
| 242 | * driver sends cmd + 2 step pulses */ | ||
| 243 | unsigned int ft_result_bits; /* if non zero, number of bits | ||
| 244 | * returned by the tape drive | ||
| 245 | */ | ||
| 246 | unsigned int ft_result; /* the result returned by the tape drive*/ | ||
| 247 | unsigned int ft_wait_after; /* timeout to wait for drive to get ready | ||
| 248 | * after command is sent. 0: don't wait */ | ||
| 249 | int ft_status; /* status returned by ready wait | ||
| 250 | * undefined if timeout was 0. | ||
| 251 | */ | ||
| 252 | int ft_error; /* error code if error status was set by | ||
| 253 | * command | ||
| 254 | */ | ||
| 255 | }; | ||
| 256 | |||
| 257 | /* mag tape io control commands */ | 126 | /* mag tape io control commands */ |
| 258 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ | 127 | #define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */ |
| 259 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ | 128 | #define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */ |
| 260 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ | 129 | #define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */ |
| 261 | 130 | ||
| 262 | /* The next two are used by the QIC-02 driver for runtime reconfiguration. | ||
| 263 | * See tpqic02.h for struct mtconfiginfo. | ||
| 264 | */ | ||
| 265 | #define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */ | ||
| 266 | #define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */ | ||
| 267 | |||
| 268 | /* the next six are used by the floppy ftape drivers and its frontends | ||
| 269 | * sorry, but MTIOCTOP commands are write only. | ||
| 270 | */ | ||
| 271 | #define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */ | ||
| 272 | #define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */ | ||
| 273 | #define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */ | ||
| 274 | #define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/ | ||
| 275 | #define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */ | ||
| 276 | #define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */ | ||
| 277 | 131 | ||
| 278 | /* Generic Mag Tape (device independent) status macros for examining | 132 | /* Generic Mag Tape (device independent) status macros for examining |
| 279 | * mt_gstat -- HP-UX compatible. | 133 | * mt_gstat -- HP-UX compatible. |
