1 #ifndef _FTAPE_CTL_H
2 #define _FTAPE_CTL_H
3
4 /*
5 * Copyright (C) 1993-1995 Bas Laarhoven.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 *
22 $Source: /home/bas/distr/ftape-2.03b/RCS/ftape-ctl.h,v $
23 $Author: bas $
24 *
25 $Revision: 1.4 $
26 $Date: 1995/05/03 18:04:03 $
27 $State: Beta $
28 *
29 * This file contains the non-standard IOCTL related definitions
30 * for the QIC-40/80 floppy-tape driver for Linux.
31 */
32
33 #include <linux/ioctl.h>
34 #include <linux/mtio.h>
35
36 #include "vendors.h"
37
38
39 typedef struct {
40 int used; /* any reading or writing done */
41 /* isr statistics */
42 unsigned int id_am_errors; /* id address mark not found */
43 unsigned int id_crc_errors; /* crc error in id address mark */
44 unsigned int data_am_errors; /* data address mark not found */
45 unsigned int data_crc_errors; /* crc error in data field */
46 unsigned int overrun_errors; /* fdc access timing problem */
47 unsigned int no_data_errors; /* sector not found */
48 unsigned int retries; /* number of tape retries */
49 /* ecc statistics */
50 unsigned int crc_errors; /* crc error in data */
51 unsigned int crc_failures; /* bad data without crc error */
52 unsigned int ecc_failures; /* failed to correct */
53 unsigned int corrected; /* total sectors corrected */
54 /* general statistics */
55 unsigned int rewinds; /* number of tape rewinds */
56 unsigned int defects; /* bad sectors due to media defects */
57 } history_record;
58
59 /*
60 * ftape-ctl.c defined global vars.
61 */
62 extern int ftape_failure;
63 extern int write_protected;
64 extern ftape_offline;
65 extern int formatted;
66 extern int no_tape;
67 extern history_record history;
68 extern int ftape_data_rate;
69 extern int going_offline;
70 extern vendor_struct drive_type;
71 extern int segments_per_track;
72 extern int segments_per_head;
73 extern int segments_per_cylinder;
74 extern int tracks_per_tape;
75 extern int ftape_seg_pos;
76 extern int first_data_segment;
77 extern int ftape_state;
78 extern int read_only;
79
80 /*
81 * ftape-ctl.c defined global functions.
82 */
83 extern int _ftape_open(void);
84 extern int _ftape_close(void);
85 extern int _ftape_ioctl(unsigned int command, void *arg);
86 extern int ftape_seek_to_bot(void);
87 extern int ftape_seek_to_eot(void);
88 extern int ftape_new_cartridge(void);
89 extern int ftape_abort_operation(void);
90 extern void ftape_reset_position(void);
91 extern void ftape_calc_timeouts(void);
92 extern void ftape_init_driver(void);
93
94 #endif