Commit d916faac authored by Jeff Garzik's avatar Jeff Garzik

Remove long-unmaintained ftape driver subsystem.

It's bitrotten, long unmaintained, long hidden under BROKEN_ON_SMP,
etc.  As scheduled in feature-removal-schedule.txt, and ack'd several
times on lkml.
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 2b5f6dcc
......@@ -104,8 +104,6 @@ firmware_class/
- request_firmware() hotplug interface info.
floppy.txt
- notes and driver options for the floppy disk driver.
ftape.txt
- notes about the floppy tape device driver.
hayes-esp.txt
- info on using the Hayes ESP serial driver.
highuid.txt
......
......@@ -234,14 +234,6 @@ Who: Jean Delvare <khali@linux-fr.org>
---------------------------
What: ftape
When: 2.6.20
Why: Orphaned for ages. SMP bugs long unfixed. Few users left
in the world.
Who: Jeff Garzik <jeff@garzik.org>
---------------------------
What: IPv4 only connection tracking/NAT/helpers
When: 2.6.22
Why: The new layer 3 independant connection tracking replaces the old
......
This diff is collapsed.
......@@ -557,9 +557,6 @@ and is between 256 and 4096 characters. It is defined in the file
floppy= [HW]
See Documentation/floppy.txt.
ftape= [HW] Floppy Tape subsystem debugging options.
See Documentation/ftape.txt.
gamecon.map[2|3]=
[HW,JOY] Multisystem joystick and NES/SNES/PSX pad
support via parallel port (up to 5 devices per port)
......
......@@ -1166,11 +1166,6 @@ P: David Howells
M: dhowells@redhat.com
S: Maintained
FTAPE/QIC-117
L: linux-tape@vger.kernel.org
W: http://sourceforge.net/projects/ftape
S: Orphan
FUSE: FILESYSTEM IN USERSPACE
P: Miklos Szeredi
M: miklos@szeredi.hu
......
......@@ -855,39 +855,6 @@ config TANBAC_TB0219
depends TANBAC_TB022X
select GPIO_VR41XX
menu "Ftape, the floppy tape device driver"
config FTAPE
tristate "Ftape (QIC-80/Travan) support"
depends on BROKEN_ON_SMP && (ALPHA || X86)
---help---
If you have a tape drive that is connected to your floppy
controller, say Y here.
Some tape drives (like the Seagate "Tape Store 3200" or the Iomega
"Ditto 3200" or the Exabyte "Eagle TR-3") come with a "high speed"
controller of their own. These drives (and their companion
controllers) are also supported if you say Y here.
If you have a special controller (such as the CMS FC-10, FC-20,
Mountain Mach-II, or any controller that is based on the Intel 82078
FDC like the high speed controllers by Seagate and Exabyte and
Iomega's "Ditto Dash") you must configure it by selecting the
appropriate entries from the "Floppy tape controllers" sub-menu
below and possibly modify the default values for the IRQ and DMA
channel and the IO base in ftape's configuration menu.
If you want to use your floppy tape drive on a PCI-bus based system,
please read the file <file:drivers/char/ftape/README.PCI>.
The ftape kernel driver is also available as a runtime loadable
module. To compile this driver as a module, choose M here: the
module will be called ftape.
source "drivers/char/ftape/Kconfig"
endmenu
source "drivers/char/agp/Kconfig"
source "drivers/char/drm/Kconfig"
......
......@@ -78,7 +78,6 @@ obj-$(CONFIG_TOSHIBA) += toshiba.o
obj-$(CONFIG_I8K) += i8k.o
obj-$(CONFIG_DS1620) += ds1620.o
obj-$(CONFIG_HW_RANDOM) += hw_random/
obj-$(CONFIG_FTAPE) += ftape/
obj-$(CONFIG_COBALT_LCD) += lcd.o
obj-$(CONFIG_PPDEV) += ppdev.o
obj-$(CONFIG_NWBUTTON) += nwbutton.o
......
This diff is collapsed.
#
# Copyright (C) 1997 Claus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /homes/cvs/ftape-stacked/ftape/Makefile,v $
# $Revision: 1.4 $
# $Date: 1997/10/05 19:17:56 $
#
# Makefile for the QIC-40/80/3010/3020 floppy-tape driver for
# Linux.
#
obj-$(CONFIG_FTAPE) += lowlevel/
obj-$(CONFIG_ZFTAPE) += zftape/
obj-$(CONFIG_ZFT_COMPRESSOR) += compressor/
Some notes for ftape users with PCI motherboards:
=================================================
The problem:
------------
There have been some problem reports from people using PCI-bus based
systems getting overrun errors.
I wasn't able to reproduce these until I ran ftape on a Intel Plato
(Premiere PCI II) motherboard with bios version 1.00.08AX1.
It turned out that if GAT (Guaranteed Access Timing) is enabled (?)
ftape gets a lot of overrun errors.
The problem disappears when disabling GAT in the bios.
Note that Intel removed this setting (permanently disabled) from the
1.00.10AX1 bios !
It looks like that if GAT is enabled there are often large periods
(greater than 120 us !??) on the ISA bus that the DMA controller cannot
service the floppy disk controller.
I cannot imagine this being acceptable in a decent PCI implementation.
Maybe this is a `feature' of the chipset. I can only speculate why
Intel choose to remove the option from the latest Bios...
The lesson of this all is that there may be other motherboard
implementations having the same of similar problems.
If you experience a lot of overrun errors during a backup to tape,
see if there is some setting in the Bios that may influence the
bus timing.
I judge this a hardware problem and not a limitation of ftape ;-)
My DOS backup software seems to be suffering from the same problems
and even refuses to run at 1 Mbps !
Ftape will reduce the data-rate from 1 Mbps to 500 Kbps if the number
of overrun errors on a track exceeds a threshold.
Possible solutions:
-------------------
Some of the problems were solved by upgrading the (flash) bios.
Other suggest that it has to do with the FDC being on the PCI
bus, but that is not the case with the Intel Premiere II boards.
[If upgrading the bios doesn't solve the problem you could try
a floppy disk controller on the isa-bus].
Here is a list of systems and recommended BIOS settings:
Intel Premiere PCI (Revenge):
Bios version 1.00.09.AF2 is reported to work.
Intel Premiere PCI II (Plato):
Bios version 1.00.10.AX1 and version 11 beta are ok.
If using version 1.00.08.AX1, GAT must be disabled !
ASUS PCI/I-SP3G:
Preferred settings: ISA-GAT-mode : disabled
DMA-linebuffer-mode : standard
ISA-masterbuffer-mode : standard
DELL Dimension XPS P90
Bios version A2 is reported to be broken, while bios version A5 works.
You can get a flash bios upgrade from http://www.dell.com
To see if you're having the GAT problem, try making a backup
under DOS. If it's very slow and often repositions you're
probably having this problem.
--//--
LocalWords: ftape PCI bios GAT ISA DMA chipset Mbps Kbps FDC isa AF ok ASUS
LocalWords: SP linebuffer masterbuffer XPS http www com
This diff is collapsed.
#
# Copyright (C) 1997 Claus-Justus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /homes/cvs/ftape-stacked/ftape/compressor/Makefile,v $
# $Revision: 1.1 $
# $Date: 1997/10/05 19:12:28 $
#
# Makefile for the optional compressor for th zftape VFS
# interface to the QIC-40/80/3010/3020 floppy-tape driver for
# Linux.
#
obj-$(CONFIG_ZFT_COMPRESSOR) += zft-compressor.o
zft-compressor-objs := zftape-compress.o lzrw3.o
CFLAGS_lzrw3.o := -O6 -funroll-all-loops
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _ZFTAPE_COMPRESS_H
#define _ZFTAPE_COMPRESS_H
/*
* Copyright (c) 1994-1997 Claus-Justus Heine
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/compressor/zftape-compress.h,v $
* $Revision: 1.1 $
* $Date: 1997/10/05 19:12:32 $
*
* This file contains macros and definitions for zftape's
* builtin compression code.
*
*/
#include "../zftape/zftape-buffers.h"
#include "../zftape/zftape-vtbl.h"
#include "../compressor/lzrw3.h"
/* CMPR_WRK_MEM_SIZE gives the size of the compression wrk_mem */
/* I got these out of lzrw3.c */
#define U(X) ((__u32) X)
#define SIZE_P_BYTE (U(sizeof(__u8 *)))
#define ALIGNMENT_FUDGE (U(16))
#define CMPR_WRK_MEM_SIZE (U(4096)*(SIZE_P_BYTE) + ALIGNMENT_FUDGE)
/* the maximum number of bytes the size of the "compressed" data can
* exceed the uncompressed data. As it is quite useless to compress
* data twice it is sometimes the case that it is more efficient to
* copy a block of data but to feed it to the "compression"
* algorithm. In this case there are some flag bytes or the like
* proceding the "compressed" data. THAT MUST NOT BE THE CASE for the
* algorithm we use for this driver. Instead, the high bit 15 of
* compressed_size:
*
* compressed_size = ftape_compress()
*
* must be set in such a case.
*
* Nevertheless, it might also be as for lzrw3 that there is an
* "intermediate" overrun that exceeds the amount of the compressed
* data that is actually produced. During the algorithm we need in the
* worst case MAX_CMP_GROUP bytes more than the input-size.
*/
#define MAX_CMP_GROUP (2+16*2) /* from lzrw3.c */
#define CMPR_OVERRUN MAX_CMP_GROUP /* during compression */
/****************************************************/
#define CMPR_BUFFER_SIZE (MAX_BLOCK_SIZE + CMPR_OVERRUN)
/* the compression map stores the byte offset compressed blocks within
* the current volume for catridges with format code 2,3 and 5
* (and old versions of zftape) and the offset measured in kilobytes for
* format code 4 and 6. This gives us a possible max. size of a
* compressed volume of 1024*4GIG which should be enough.
*/
typedef __u32 CmprMap;
/* globals
*/
/* exported functions
*/
#endif /* _ZFTAPE_COMPRESS_H */
#
# Copyright (C) 1996, 1997 Clau-Justus Heine.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/Makefile,v $
# $Revision: 1.4 $
# $Date: 1997/10/07 09:26:02 $
#
# Makefile for the lowlevel part QIC-40/80/3010/3020 floppy-tape
# driver for Linux.
#
obj-$(CONFIG_FTAPE) += ftape.o
ftape-objs := ftape-init.o fdc-io.o fdc-isr.o \
ftape-bsm.o ftape-ctl.o ftape-read.o ftape-rw.o \
ftape-write.o ftape-io.o ftape-calibr.o ftape-ecc.o fc-10.o \
ftape-buffer.o ftape-format.o ftape_syms.o
ifeq ($(CONFIG_FTAPE),y)
ftape-objs += ftape-setup.o
endif
ifndef CONFIG_FT_NO_TRACE_AT_ALL
ftape-objs += ftape-tracing.o
endif
ifeq ($(CONFIG_FT_PROC_FS),y)
ftape-objs += ftape-proc.o
endif
/*
*
Copyright (C) 1993,1994 Jon Tombs.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The entire guts of this program was written by dosemu, modified to
record reads and writes to the ports in the 0x180-0x188 address space,
while running the CMS program TAPE.EXE V2.0.5 supplied with the drive.
Modified to use an array of addresses and generally cleaned up (made
much shorter) 4 June 94, dosemu isn't that good at writing short code it
would seem :-). Made independent of 0x180, but I doubt it will work
at any other address.
Modified for distribution with ftape source. 21 June 94, SJL.
Modifications on 20 October 95, by Daniel Cohen (catman@wpi.edu):
Modified to support different DMA, IRQ, and IO Ports. Borland's
Turbo Debugger in virtual 8086 mode (TD386.EXE with hardware breakpoints
provided by the TDH386.SYS Device Driver) was used on the CMS program
TAPE V4.0.5. I set breakpoints on I/O to ports 0x180-0x187. Note that
CMS's program will not successfully configure the tape drive if you set
breakpoints on IO Reads, but you can set them on IO Writes without problems.
Known problems:
- You can not use DMA Channels 5 or 7.
Modification on 29 January 96, by Daniel Cohen (catman@wpi.edu):
Modified to only accept IRQs 3 - 7, or 9. Since we can only send a 3 bit
number representing the IRQ to the card, special handling is required when
IRQ 9 is selected. IRQ 2 and 9 are the same, and we should request IRQ 9
from the kernel while telling the card to use IRQ 2. Thanks to Greg
Crider (gcrider@iclnet.org) for finding and locating this bug, as well as
testing the patch.
Modification on 11 December 96, by Claus Heine (claus@momo.math.rwth-aachen.de):
Modified a little to use variahle ft_fdc_base, ft_fdc_irq, ft_fdc_dma
instead of preprocessor symbols. Thus we can compile this into the module
or kernel and let the user specify the options as command line arguments.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/fc-10.c,v $
* $Revision: 1.2 $
* $Date: 1997/10/05 19:18:04 $
*
* This file contains code for the CMS FC-10/FC-20 card.
*/
#include <asm/io.h>
#include <linux/ftape.h>
#include "../lowlevel/ftape-tracing.h"
#include "../lowlevel/fdc-io.h"
#include "../lowlevel/fc-10.h"
static __u16 inbs_magic[] = {
0x3, 0x3, 0x0, 0x4, 0x7, 0x2, 0x5, 0x3, 0x1, 0x4,
0x3, 0x5, 0x2, 0x0, 0x3, 0x7, 0x4, 0x2,
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7
};
static __u16 fc10_ports[] = {
0x180, 0x210, 0x2A0, 0x300, 0x330, 0x340, 0x370
};
int fc10_enable(void)
{
int i;
__u8 cardConfig = 0x00;
__u8 x;
TRACE_FUN(ft_t_flow);
/* This code will only work if the FC-10 (or FC-20) is set to
* use DMA channels 1, 2, or 3. DMA channels 5 and 7 seem to be
* initialized by the same command as channels 1 and 3, respectively.
*/
if (ft_fdc_dma > 3) {
TRACE_ABORT(0, ft_t_err,
"Error: The FC-10/20 must be set to use DMA channels 1, 2, or 3!");
}
/* Only allow the FC-10/20 to use IRQ 3-7, or 9. Note that CMS's program
* only accepts IRQ's 2-7, but in linux, IRQ 2 is the same as IRQ 9.
*/
if (ft_fdc_irq < 3 || ft_fdc_irq == 8 || ft_fdc_irq > 9) {
TRACE_ABORT(0, ft_t_err,
"Error: The FC-10/20 must be set to use IRQ levels 3 - 7, or 9!\n"
KERN_INFO "Note: IRQ 9 is the same as IRQ 2");
}
/* Clear state machine ???
*/
for (i = 0; i < NR_ITEMS(inbs_magic); i++) {
inb(ft_fdc_base + inbs_magic[i]);
}
outb(0x0, ft_fdc_base);
x = inb(ft_fdc_base);
if (x == 0x13 || x == 0x93) {
for (i = 1; i < 8; i++) {
if (inb(ft_fdc_base + i) != x) {
TRACE_EXIT 0;
}
}
} else {
TRACE_EXIT 0;
}
outb(0x8, ft_fdc_base);
for (i = 0; i < 8; i++) {
if (inb(ft_fdc_base + i) != 0x0) {
TRACE_EXIT 0;
}
}
outb(0x10, ft_fdc_base);
for (i = 0; i < 8; i++) {
if (inb(ft_fdc_base + i) != 0xff) {
TRACE_EXIT 0;
}
}
/* Okay, we found a FC-10 card ! ???
*/
outb(0x0, fdc.ccr);
/* Clear state machine again ???
*/
for (i = 0; i < NR_ITEMS(inbs_magic); i++) {
inb(ft_fdc_base + inbs_magic[i]);
}
/* Send io port */
for (i = 0; i < NR_ITEMS(fc10_ports); i++)
if (ft_fdc_base == fc10_ports[i])
cardConfig = i + 1;
if (cardConfig == 0) {
TRACE_EXIT 0; /* Invalid I/O Port */
}
/* and IRQ - If using IRQ 9, tell the FC card it is actually IRQ 2 */
if (ft_fdc_irq != 9)
cardConfig |= ft_fdc_irq << 3;
else
cardConfig |= 2 << 3;
/* and finally DMA Channel */
cardConfig |= ft_fdc_dma << 6;
outb(cardConfig, ft_fdc_base); /* DMA [2 bits]/IRQ [3 bits]/BASE [3 bits] */
/* Enable FC-10 ???
*/
outb(0, fdc.ccr);
outb(0, fdc.dor2);
outb(FDC_DMA_MODE /* 8 */, fdc.dor);
outb(FDC_DMA_MODE /* 8 */, fdc.dor);
outb(1, fdc.dor2);
/*************************************
*
* cH: why the hell should this be necessary? This is done
* by fdc_reset()!!!
*
*************************************/
/* Initialize fdc, select drive B:
*/
outb(FDC_DMA_MODE, fdc.dor); /* assert reset, dma & irq enabled */
/* 0x08 */
outb(FDC_DMA_MODE|FDC_RESET_NOT, fdc.dor); /* release reset */
/* 0x08 | 0x04 = 0x0c */
outb(FDC_DMA_MODE|FDC_RESET_NOT|FDC_MOTOR_1|FTAPE_SEL_B, fdc.dor);
/* 0x08 | 0x04 | 0x20 | 0x01 = 0x2d */
/* select drive 1 */ /* why not drive 0 ???? */
TRACE_EXIT (x == 0x93) ? 2 : 1;
}
#ifndef _FC_10_H
#define _FC_10_H
/*
* Copyright (C) 1994-1996 Bas Laarhoven.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/fc-10.h,v $
* $Revision: 1.1 $
* $Date: 1997/09/19 09:05:22 $
*
* This file contains definitions for the FC-10 code
* of the QIC-40/80 floppy-tape driver for Linux.
*/
/*
* fc-10.c defined global vars.
*/
/*
* fc-10.c defined global functions.
*/
extern int fc10_enable(void);
#endif
This diff is collapsed.
#ifndef _FDC_IO_H
#define _FDC_IO_H
/*
* Copyright (C) 1993-1996 Bas Laarhoven,
* (C) 1996-1997 Claus-Justus Heine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/fdc-io.h,v $
* $Revision: 1.3 $
* $Date: 1997/10/05 19:18:06 $
*
* This file contains the declarations for the low level
* functions that communicate with the floppy disk controller,
* for the QIC-40/80/3010/3020 floppy-tape driver "ftape" for
* Linux.
*/
#include <linux/fdreg.h>
#include "../lowlevel/ftape-bsm.h"
#define FDC_SK_BIT (0x20)
#define FDC_MT_BIT (0x80)
#define FDC_READ (FD_READ & ~(FDC_SK_BIT | FDC_MT_BIT))
#define FDC_WRITE (FD_WRITE & ~FDC_MT_BIT)
#define FDC_READ_DELETED (0x4c)
#define FDC_WRITE_DELETED (0x49)
#define FDC_VERIFY (0x56)
#define FDC_READID (0x4a)
#define FDC_SENSED (0x04)
#define FDC_SENSEI (FD_SENSEI)
#define FDC_FORMAT (FD_FORMAT)
#define FDC_RECAL (FD_RECALIBRATE)
#define FDC_SEEK (FD_SEEK)
#define FDC_SPECIFY (FD_SPECIFY)
#define FDC_RECALIBR (FD_RECALIBRATE)
#define FDC_VERSION (FD_VERSION)
#define FDC_PERPEND (FD_PERPENDICULAR)
#define FDC_DUMPREGS (FD_DUMPREGS)
#define FDC_LOCK (FD_LOCK)
#define FDC_UNLOCK (FD_UNLOCK)
#define FDC_CONFIGURE (FD_CONFIGURE)
#define FDC_DRIVE_SPEC (0x8e) /* i82078 has this (any others?) */
#define FDC_PARTID (0x18) /* i82078 has this */
#define FDC_SAVE (0x2e) /* i82078 has this (any others?) */
#define FDC_RESTORE (0x4e) /* i82078 has this (any others?) */
#define FDC_STATUS_MASK (STATUS_BUSY | STATUS_DMA | STATUS_DIR | STATUS_READY)
#define FDC_DATA_READY (STATUS_READY)
#define FDC_DATA_OUTPUT (STATUS_DIR)
#define FDC_DATA_READY_MASK (STATUS_READY | STATUS_DIR)
#define FDC_DATA_OUT_READY (STATUS_READY | STATUS_DIR)
#define FDC_DATA_IN_READY (STATUS_READY)
#define FDC_BUSY (STATUS_BUSY)
#define FDC_CLK48_BIT (0x80)
#define FDC_SEL3V_BIT (0x40)
#define ST0_INT_MASK (ST0_INTR)
#define FDC_INT_NORMAL (ST0_INTR & 0x00)
#define FDC_INT_ABNORMAL (ST0_INTR & 0x40)
#define FDC_INT_INVALID (ST0_INTR & 0x80)
#define FDC_INT_READYCH (ST0_INTR & 0xC0)
#define ST0_SEEK_END (ST0_SE)
#define ST3_TRACK_0 (ST3_TZ)
#define FDC_RESET_NOT (0x04)
#define FDC_DMA_MODE (0x08)
#define FDC_MOTOR_0 (0x10)
#define FDC_MOTOR_1 (0x20)
typedef struct {
void (**hook) (void); /* our wedge into the isr */
enum {
no_fdc, i8272, i82077, i82077AA, fc10,
i82078, i82078_1
} type; /* FDC type */
unsigned int irq; /* FDC irq nr */
unsigned int dma; /* FDC dma channel nr */
__u16 sra; /* Status register A (PS/2 only) */
__u16 srb; /* Status register B (PS/2 only) */
__u16 dor; /* Digital output register */
__u16 tdr; /* Tape Drive Register (82077SL-1 &
82078 only) */
__u16 msr; /* Main Status Register */
__u16 dsr; /* Datarate Select Register (8207x only) */
__u16 fifo; /* Data register / Fifo on 8207x */
__u16 dir; /* Digital Input Register */
__u16 ccr; /* Configuration Control Register */
__u16 dor2; /* Alternate dor on MACH-2 controller,
also used with FC-10, meaning unknown */
} fdc_config_info;
typedef enum {
fdc_data_rate_250 = 2,
fdc_data_rate_300 = 1, /* any fdc in default configuration */
fdc_data_rate_500 = 0,
fdc_data_rate_1000 = 3,
fdc_data_rate_2000 = 1, /* i82078-1: when using Data Rate Table #2 */
} fdc_data_rate_type;
typedef enum {
fdc_idle = 0,
fdc_reading_data = FDC_READ,
fdc_seeking = FDC_SEEK,
fdc_writing_data = FDC_WRITE,
fdc_deleting = FDC_WRITE_DELETED,
fdc_reading_id = FDC_READID,
fdc_recalibrating = FDC_RECAL,
fdc_formatting = FDC_FORMAT,
fdc_verifying = FDC_VERIFY
} fdc_mode_enum;
typedef enum {
waiting = 0,
reading,
writing,
formatting,
verifying,
deleting,
done,
error,
mmapped,
} buffer_state_enum;
typedef struct {
__u8 *address;
volatile buffer_state_enum status;
volatile __u8 *ptr;
volatile unsigned int bytes;
volatile unsigned int segment_id;
/* bitmap for remainder of segment not yet handled.
* one bit set for each bad sector that must be skipped.
*/
volatile SectorMap bad_sector_map;
/* bitmap with bad data blocks in data buffer.
* the errors in this map may be retried.
*/
volatile SectorMap soft_error_map;
/* bitmap with bad data blocks in data buffer
* the errors in this map may not be retried.
*/
volatile SectorMap hard_error_map;
/* retry counter for soft errors.
*/
volatile int retry;
/* sectors to skip on retry ???
*/
volatile unsigned int skip;
/* nr of data blocks in data buffer
*/
volatile unsigned int data_offset;
/* offset in segment for first sector to be handled.
*/
volatile unsigned int sector_offset;
/* size of cluster of good sectors to be handled.
*/
volatile unsigned int sector_count;
/* size of remaining part of segment to be handled.
*/
volatile unsigned int remaining;
/* points to next segment (contiguous) to be handled,
* or is zero if no read-ahead is allowed.
*/
volatile unsigned int next_segment;
/* flag being set if deleted data was read.
*/
volatile int deleted;
/* floppy coordinates of first sector in segment */
volatile __u8 head;
volatile __u8 cyl;
volatile __u8 sect;
/* gap to use when formatting */
__u8 gap3;
/* flag set when buffer is mmaped */
int mmapped;
} buffer_struct;
/*
* fdc-io.c defined public variables
*/
extern volatile fdc_mode_enum fdc_mode;
extern int fdc_setup_error; /* outdated ??? */
extern wait_queue_head_t ftape_wait_intr;
extern volatile int ftape_current_cylinder; /* track nr FDC thinks we're on */
extern volatile __u8 fdc_head; /* FDC head */
extern volatile __u8 fdc_cyl; /* FDC track */
extern volatile __u8 fdc_sect; /* FDC sector */
extern fdc_config_info fdc; /* FDC hardware configuration */
extern unsigned int ft_fdc_base;
extern unsigned int ft_fdc_irq;
extern unsigned int ft_fdc_dma;
extern unsigned int ft_fdc_threshold;
extern unsigned int ft_fdc_rate_limit;
extern int ft_probe_fc10;
extern int ft_mach2;
/*
* fdc-io.c defined public functions
*/
extern void fdc_catch_stray_interrupts(int count);
extern int fdc_ready_wait(unsigned int timeout);
extern int fdc_command(const __u8 * cmd_data, int cmd_len);
extern int fdc_result(__u8 * res_data, int res_len);
extern int fdc_interrupt_wait(unsigned int time);
extern int fdc_seek(int track);
extern int fdc_sense_drive_status(int *st3);
extern void fdc_motor(int motor);
extern void fdc_reset(void);
extern void fdc_disable(void);
extern int fdc_fifo_threshold(__u8 threshold,
int *fifo_state, int *lock_state, int *fifo_thr);
extern void fdc_wait_calibrate(void);
extern int fdc_sense_interrupt_status(int *st0, int *current_cylinder);
extern void fdc_save_drive_specs(void);
extern void fdc_restore_drive_specs(void);
extern int fdc_set_data_rate(int rate);
extern void fdc_set_write_precomp(int precomp);
extern int fdc_release_irq_and_dma(void);
extern void fdc_release_regions(void);
extern int fdc_init(void);
extern int fdc_setup_read_write(buffer_struct * buff, __u8 operation);
extern int fdc_setup_formatting(buffer_struct * buff);
#endif
This diff is collapsed.
#ifndef _FDC_ISR_H
#define _FDC_ISR_H
/*
* Copyright (C) 1993-1996 Bas Laarhoven,
* (C) 1996-1997 Claus-Justus Heine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/fdc-isr.h,v $
* $Revision: 1.2 $
* $Date: 1997/10/05 19:18:07 $
*
* This file declares the global variables necessary to
* synchronize the interrupt service routine (isr) with the
* remainder of the QIC-40/80/3010/3020 floppy-tape driver
* "ftape" for Linux.
*/
/*
* fdc-isr.c defined public variables
*/
extern volatile int ft_expected_stray_interrupts; /* masks stray interrupts */
extern volatile int ft_seek_completed; /* flag set by isr */
extern volatile int ft_interrupt_seen; /* flag set by isr */
extern volatile int ft_hide_interrupt; /* flag set by isr */
/*
* fdc-io.c defined public functions
*/
extern void fdc_isr(void);
/*
* A kernel hook that steals one interrupt from the floppy
* driver (Should be fixed when the new fdc driver gets ready)
* See the linux kernel source files:
* drivers/block/floppy.c & drivers/block/blk.h
* for the details.
*/
extern void (*do_floppy) (void);
#endif
This diff is collapsed.
#ifndef _FTAPE_BSM_H
#define _FTAPE_BSM_H
/*
* Copyright (C) 1994-1996 Bas Laarhoven,
* (C) 1996-1997 Claus-Justus Heine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-bsm.h,v $
* $Revision: 1.2 $
* $Date: 1997/10/05 19:18:07 $
*
* This file contains definitions for the bad sector map handling
* routines for the QIC-117 floppy-tape driver for Linux.
*/
#include <linux/ftape.h>
#include <linux/ftape-header-segment.h>
#define EMPTY_SEGMENT (0xffffffff)
#define FAKE_SEGMENT (0xfffffffe)
/* maximum (format code 4) bad sector map size (bytes).
*/
#define BAD_SECTOR_MAP_SIZE (29 * SECTOR_SIZE - 256)
/* format code 4 bad sector entry, ftape uses this
* internally for all format codes
*/
typedef __u32 SectorMap;
/* variable and 1100 ft bad sector map entry. These three bytes represent
* a single sector address measured from BOT.
*/
typedef struct NewSectorMap {
__u8 bytes[3];
} SectorCount;
/*
* ftape-bsm.c defined global vars.
*/
/*
* ftape-bsm.c defined global functions.
*/
extern void update_bad_sector_map(__u8 * buffer);
extern void ftape_extract_bad_sector_map(__u8 * buffer);
extern SectorMap ftape_get_bad_sector_entry(int segment_id);
extern __u8 *ftape_find_end_of_bsm_list(__u8 * address);
extern void ftape_init_bsm(void);
#endif
/*
* Copyright (C) 1997 Claus-Justus Heine
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-buffer.c,v $
* $Revision: 1.3 $
* $Date: 1997/10/16 23:33:11 $
*
* This file contains the allocator/dealloctor for ftape's dynamic dma
* buffer.
*/
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <asm/dma.h>
#include <linux/ftape.h>
#include "../lowlevel/ftape-rw.h"
#include "../lowlevel/ftape-read.h"
#include "../lowlevel/ftape-tracing.h"
#include "../lowlevel/ftape-buffer.h"
/* DMA'able memory allocation stuff.
*/
static inline void *dmaalloc(size_t size)
{
unsigned long addr;
if (size == 0) {
return NULL;
}
addr = __get_dma_pages(GFP_KERNEL, get_order(size));
if (addr) {
struct page *page;
for (page = virt_to_page(addr); page < virt_to_page(addr+size); page++)
SetPageReserved(page);
}
return (void *)addr;
}
static inline void dmafree(void *addr, size_t size)
{
if (size > 0) {
struct page *page;
for (page = virt_to_page((unsigned long)addr);
page < virt_to_page((unsigned long)addr+size); page++)
ClearPageReserved(page);
free_pages((unsigned long) addr, get_order(size));
}
}
static int add_one_buffer(void)
{
TRACE_FUN(ft_t_flow);
if (ft_nr_buffers >= FT_MAX_NR_BUFFERS) {
TRACE_EXIT -ENOMEM;
}
ft_buffer[ft_nr_buffers] = kmalloc(sizeof(buffer_struct), GFP_KERNEL);
if (ft_buffer[ft_nr_buffers] == NULL) {
TRACE_EXIT -ENOMEM;
}
memset(ft_buffer[ft_nr_buffers], 0, sizeof(buffer_struct));
ft_buffer[ft_nr_buffers]->address = dmaalloc(FT_BUFF_SIZE);
if (ft_buffer[ft_nr_buffers]->address == NULL) {
kfree(ft_buffer[ft_nr_buffers]);
ft_buffer[ft_nr_buffers] = NULL;
TRACE_EXIT -ENOMEM;
}
ft_nr_buffers ++;
TRACE(ft_t_info, "buffer nr #%d @ %p, dma area @ %p",
ft_nr_buffers,
ft_buffer[ft_nr_buffers-1],
ft_buffer[ft_nr_buffers-1]->address);
TRACE_EXIT 0;
}
static void del_one_buffer(void)
{
TRACE_FUN(ft_t_flow);
if (ft_nr_buffers > 0) {
TRACE(ft_t_info, "releasing buffer nr #%d @ %p, dma area @ %p",
ft_nr_buffers,
ft_buffer[ft_nr_buffers-1],
ft_buffer[ft_nr_buffers-1]->address);
ft_nr_buffers --;
dmafree(ft_buffer[ft_nr_buffers]->address, FT_BUFF_SIZE);
kfree(ft_buffer[ft_nr_buffers]);
ft_buffer[ft_nr_buffers] = NULL;
}
TRACE_EXIT;
}
int ftape_set_nr_buffers(int cnt)
{
int delta = cnt - ft_nr_buffers;
TRACE_FUN(ft_t_flow);
if (delta > 0) {
while (delta--) {
if (add_one_buffer() < 0) {
TRACE_EXIT -ENOMEM;
}
}
} else if (delta < 0) {
while (delta++) {
del_one_buffer();
}
}
ftape_zap_read_buffers();
TRACE_EXIT 0;
}
#ifndef _FTAPE_BUFFER_H
#define _FTAPE_BUFFER_H
/*
* Copyright (C) 1997 Claus-Justus Heine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-buffer.h,v $
* $Revision: 1.2 $
* $Date: 1997/10/05 19:18:08 $
*
* This file contains the allocator/dealloctor for ftape's dynamic dma
* buffer.
*/
extern int ftape_set_nr_buffers(int cnt);
#endif
This diff is collapsed.
#ifndef _FTAPE_CALIBR_H
#define _FTAPE_CALIBR_H
/*
* Copyright (C) 1993-1996 Bas Laarhoven.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-calibr.h,v $
* $Revision: 1.1 $
* $Date: 1997/09/19 09:05:26 $
*
* This file contains a gp calibration routine for
* hardware dependent timeout functions.
*/
extern void ftape_calibrate(char *name,
void (*fun) (unsigned int),
unsigned int *calibr_count,
unsigned int *calibr_time);
extern unsigned int ftape_timestamp(void);
extern unsigned int ftape_timediff(unsigned int t0, unsigned int t1);
#endif /* _FTAPE_CALIBR_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef _FTAPE_FORMAT_H
#define _FTAPE_FORMAT_H
/*
* Copyright (C) 1996-1997 Claus-Justus Heine.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-format.h,v $
* $Revision: 1.2 $
* $Date: 1997/10/05 19:18:13 $
*
* This file contains the low level definitions for the
* formatting support for the QIC-40/80/3010/3020 floppy-tape
* driver "ftape" for Linux.
*/
#ifdef __KERNEL__
extern int ftape_format_track(const unsigned int track, const __u8 gap3);
extern int ftape_format_status(unsigned int *segment_id);
extern int ftape_verify_segment(const unsigned int segment_id, SectorMap *bsm);
#endif /* __KERNEL__ */
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -60,8 +60,6 @@ header-y += fadvise.h
header-y += fd.h
header-y += fdreg.h
header-y += fib_rules.h
header-y += ftape-header-segment.h
header-y += ftape-vendors.h
header-y += fuse.h
header-y += futex.h
header-y += genetlink.h
......@@ -206,7 +204,6 @@ unifdef-y += fcntl.h
unifdef-y += filter.h
unifdef-y += flat.h
unifdef-y += fs.h
unifdef-y += ftape.h
unifdef-y += gameport.h
unifdef-y += generic_serial.h
unifdef-y += genhd.h
......@@ -341,6 +338,5 @@ unifdef-y += wait.h
unifdef-y += wanrouter.h
unifdef-y += watchdog.h
unifdef-y += xfrm.h
unifdef-y += zftape.h
objhdr-y += version.h
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment