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 typedefstruct{ 40 intused; /* any reading or writing done */ 41 /* isr statistics */ 42 unsignedintid_am_errors; /* id address mark not found */ 43 unsignedintid_crc_errors; /* crc error in id address mark */ 44 unsignedintdata_am_errors; /* data address mark not found */ 45 unsignedintdata_crc_errors; /* crc error in data field */ 46 unsignedintoverrun_errors; /* fdc access timing problem */ 47 unsignedintno_data_errors; /* sector not found */ 48 unsignedintretries; /* number of tape retries */ 49 /* ecc statistics */ 50 unsignedintcrc_errors; /* crc error in data */ 51 unsignedintcrc_failures; /* bad data without crc error */ 52 unsignedintecc_failures; /* failed to correct */ 53 unsignedintcorrected; /* total sectors corrected */ 54 /* general statistics */ 55 unsignedintrewinds; /* number of tape rewinds */ 56 unsignedintdefects; /* bad sectors due to media defects */ 57 }history_record;
58
59 /* 60 * ftape-ctl.c defined global vars. 61 */ 62 externintftape_failure;
63 externintwrite_protected;
64 externftape_offline;
65 externintformatted;
66 externintno_tape;
67 externhistory_recordhistory;
68 externintftape_data_rate;
69 externintgoing_offline;
70 externvendor_structdrive_type;
71 externintsegments_per_track;
72 externintsegments_per_head;
73 externintsegments_per_cylinder;
74 externinttracks_per_tape;
75 externintftape_seg_pos;
76 externintfirst_data_segment;
77 externintftape_state;
78 externintread_only;
79
80 /* 81 * ftape-ctl.c defined global functions. 82 */ 83 externint_ftape_open(void);
84 externint_ftape_close(void);
85 externint_ftape_ioctl(unsignedintcommand, void *arg);
86 externintftape_seek_to_bot(void);
87 externintftape_seek_to_eot(void);
88 externintftape_new_cartridge(void);
89 externintftape_abort_operation(void);
90 externvoidftape_reset_position(void);
91 externvoidftape_calc_timeouts(void);
92 externvoidftape_init_driver(void);
93
94 #endif