| [2] | 1 | #ifndef _FTAPE_H |
|---|
| 2 | #define _FTAPE_H |
|---|
| 3 | |
|---|
| 4 | /* |
|---|
| 5 | * Copyright (C) 1994-1996 Bas Laarhoven, |
|---|
| 6 | * (C) 1996-1997 Claus-Justus Heine. |
|---|
| 7 | |
|---|
| 8 | This program is free software; you can redistribute it and/or modify |
|---|
| 9 | it under the terms of the GNU General Public License as published by |
|---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
|---|
| 11 | any later version. |
|---|
| 12 | |
|---|
| 13 | This program is distributed in the hope that it will be useful, |
|---|
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 16 | GNU General Public License for more details. |
|---|
| 17 | |
|---|
| 18 | You should have received a copy of the GNU General Public License |
|---|
| 19 | along with this program; see the file COPYING. If not, write to |
|---|
| 20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 21 | |
|---|
| 22 | * |
|---|
| 23 | * $Source: /cvsroot/linux-libc-headers/include/linux/ftape.h,v $ |
|---|
| 24 | * $Revision: 1.3 $ |
|---|
| 25 | * $Date: 2005-03-25 19:09:14 +0100 (Fri, 25 Mar 2005) $ |
|---|
| 26 | * |
|---|
| 27 | * This file contains global definitions, typedefs and macro's |
|---|
| 28 | * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. |
|---|
| 29 | */ |
|---|
| 30 | |
|---|
| 31 | #define FTAPE_VERSION "ftape v3.04d 25/11/97" |
|---|
| 32 | |
|---|
| 33 | #include <linux/types.h> |
|---|
| 34 | #include <linux/mtio.h> |
|---|
| 35 | |
|---|
| 36 | #define FT_SECTOR(x) (x+1) /* sector offset into real sector */ |
|---|
| 37 | #define FT_SECTOR_SIZE 1024 |
|---|
| 38 | #define FT_SECTORS_PER_SEGMENT 32 |
|---|
| 39 | #define FT_ECC_SECTORS 3 |
|---|
| 40 | #define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE) |
|---|
| 41 | #define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE) |
|---|
| 42 | |
|---|
| 43 | /* |
|---|
| 44 | * bits of the minor device number that define drive selection |
|---|
| 45 | * methods. Could be used one day to access multiple tape |
|---|
| 46 | * drives on the same controller. |
|---|
| 47 | */ |
|---|
| 48 | #define FTAPE_SEL_A 0 |
|---|
| 49 | #define FTAPE_SEL_B 1 |
|---|
| 50 | #define FTAPE_SEL_C 2 |
|---|
| 51 | #define FTAPE_SEL_D 3 |
|---|
| 52 | #define FTAPE_SEL_MASK 3 |
|---|
| 53 | #define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK) |
|---|
| 54 | #define FTAPE_NO_REWIND 4 /* mask for minor nr */ |
|---|
| 55 | |
|---|
| 56 | /* the following two may be reported when MTIOCGET is requested ... */ |
|---|
| 57 | typedef union { |
|---|
| 58 | struct { |
|---|
| 59 | __u8 error; |
|---|
| 60 | __u8 command; |
|---|
| 61 | } error; |
|---|
| 62 | long space; |
|---|
| 63 | } ft_drive_error; |
|---|
| 64 | typedef union { |
|---|
| 65 | struct { |
|---|
| 66 | __u8 drive_status; |
|---|
| 67 | __u8 drive_config; |
|---|
| 68 | __u8 tape_status; |
|---|
| 69 | } status; |
|---|
| 70 | long space; |
|---|
| 71 | } ft_drive_status; |
|---|
| 72 | |
|---|
| 73 | #endif |
|---|