diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:20:36 -0700 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/char/ftape |
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/char/ftape')
62 files changed, 19417 insertions, 0 deletions
diff --git a/drivers/char/ftape/Kconfig b/drivers/char/ftape/Kconfig new file mode 100644 index 000000000000..7d3ecb56a1bd --- /dev/null +++ b/drivers/char/ftape/Kconfig @@ -0,0 +1,340 @@ +# +# Ftape configuration +# +config ZFTAPE + tristate "Zftape, the VFS interface" + depends on FTAPE + ---help--- + Normally, you want to say Y or M. DON'T say N here or you + WON'T BE ABLE TO USE YOUR FLOPPY TAPE DRIVE. + + The ftape module itself no longer contains the routines necessary + to interface with the kernel VFS layer (i.e. to actually write data + to and read data from the tape drive). Instead the file system + interface (i.e. the hardware independent part of the driver) has + been moved to a separate module. + + To compile this driver as a module, choose M here: the + module will be called zftape. + + Regardless of whether you say Y or M here, an additional runtime + loadable module called `zft-compressor' which contains code to + support user transparent on-the-fly compression based on Ross + William's lzrw3 algorithm will be produced. If you have enabled the + kernel module loader (i.e. have said Y to "Kernel module loader + support", above) then `zft-compressor' will be loaded + automatically by zftape when needed. + + Despite its name, zftape does NOT use compression by default. The + file <file:Documentation/ftape.txt> contains a short description of + the most important changes in the file system interface compared to + previous versions of ftape. The ftape home page + <http://www.instmath.rwth-aachen.de/~heine/ftape/> contains + further information. + + IMPORTANT NOTE: zftape can read archives created by previous + versions of ftape and provide file mark support (i.e. fast skipping + between tape archives) but previous version of ftape will lack file + mark support when reading archives produced by zftape. + +config ZFT_DFLT_BLK_SZ + int "Default block size" + depends on ZFTAPE + default "10240" + ---help--- + If unsure leave this at its default value, i.e. 10240. Note that + you specify only the default block size here. The block size can be + changed at run time using the MTSETBLK tape operation with the + MTIOCTOP ioctl (i.e. with "mt -f /dev/qft0 setblk #BLKSZ" from the + shell command line). + + The probably most striking difference between zftape and previous + versions of ftape is the fact that all data must be written or read + in multiples of a fixed block size. The block size defaults to + 10240 which is what GNU tar uses. The values for the block size + should be either 1 or multiples of 1024 up to a maximum value of + 63488 (i.e. 62 K). If you specify `1' then zftape's builtin + compression will be disabled. + + Reasonable values are `10240' (GNU tar's default block size), + `5120' (afio's default block size), `32768' (default block size some + backup programs assume for SCSI tape drives) or `1' (no restriction + on block size, but disables builtin compression). + +comment "The compressor will be built as a module only!" + depends on FTAPE && ZFTAPE + +config ZFT_COMPRESSOR + tristate + depends on FTAPE!=n && ZFTAPE!=n + default m + +config FT_NR_BUFFERS + int "Number of ftape buffers (EXPERIMENTAL)" + depends on FTAPE && EXPERIMENTAL + default "3" + help + Please leave this at `3' unless you REALLY know what you are doing. + It is not necessary to change this value. Values below 3 make the + proper use of ftape impossible, values greater than 3 are a waste of + memory. You can change the amount of DMA memory used by ftape at + runtime with "mt -f /dev/qft0 setdrvbuffer #NUMBUFFERS". Each buffer + wastes 32 KB of memory. Please note that this memory cannot be + swapped out. + +config FT_PROC_FS + bool "Enable procfs status report (+2kb)" + depends on FTAPE && PROC_FS + ---help--- + Optional. Saying Y will result in creation of a directory + `/proc/ftape' under the /proc file system. The files can be viewed + with your favorite pager (i.e. use "more /proc/ftape/history" or + "less /proc/ftape/history" or simply "cat /proc/ftape/history"). The + file will contain some status information about the inserted + cartridge, the kernel driver, your tape drive, the floppy disk + controller and the error history for the most recent use of the + kernel driver. Saying Y will enlarge the size of the ftape driver + by approximately 2 KB. + + WARNING: When compiling ftape as a module (i.e. saying M to "Floppy + tape drive") it is dangerous to use ftape's /proc file system + interface. Accessing `/proc/ftape' while the module is unloaded will + result in a kernel Oops. This cannot be fixed from inside ftape. + +choice + prompt "Debugging output" + depends on FTAPE + default FT_NORMAL_DEBUG + +config FT_NORMAL_DEBUG + bool "Normal" + ---help--- + This option controls the amount of debugging output the ftape driver + is ABLE to produce; it does not increase or diminish the debugging + level itself. If unsure, leave this at its default setting, + i.e. choose "Normal". + + Ftape can print lots of debugging messages to the system console + resp. kernel log files. Reducing the amount of possible debugging + output reduces the size of the kernel module by some KB, so it might + be a good idea to use "None" for emergency boot floppies. + + If you want to save memory then the following strategy is + recommended: leave this option at its default setting "Normal" until + you know that the driver works as expected, afterwards reconfigure + the kernel, this time specifying "Reduced" or "None" and recompile + and install the kernel as usual. Note that choosing "Excessive" + debugging output does not increase the amount of debugging output + printed to the console but only makes it possible to produce + "Excessive" debugging output. + + Please read <file:Documentation/ftape.txt> for a short description + how to control the amount of debugging output. + +config FT_FULL_DEBUG + bool "Excessive" + help + Extremely verbose output for driver debugging purposes. + +config FT_NO_TRACE + bool "Reduced" + help + Reduced tape driver debugging output. + +config FT_NO_TRACE_AT_ALL + bool "None" + help + Suppress all debugging output from the tape drive. + +endchoice + +comment "Hardware configuration" + depends on FTAPE + +choice + prompt "Floppy tape controllers" + depends on FTAPE + default FT_STD_FDC + +config FT_STD_FDC + bool "Standard" + ---help--- + Only change this setting if you have a special controller. If you + didn't plug any add-on card into your computer system but just + plugged the floppy tape cable into the already existing floppy drive + controller then you don't want to change the default setting, + i.e. choose "Standard". + + Choose "MACH-2" if you have a Mountain Mach-2 controller. + Choose "FC-10/FC-20" if you have a Colorado FC-10 or FC-20 + controller. + Choose "Alt/82078" if you have another controller that is located at + an IO base address different from the standard floppy drive + controller's base address of `0x3f0', or uses an IRQ (interrupt) + channel different from `6', or a DMA channel different from + `2'. This is necessary for any controller card that is based on + Intel's 82078 FDC such as Seagate's, Exabyte's and Iomega's "high + speed" controllers. + + If you choose something other than "Standard" then please make + sure that the settings for the IO base address and the IRQ and DMA + channel in the configuration menus below are correct. Use the manual + of your tape drive to determine the correct settings! + + If you are already successfully using your tape drive with another + operating system then you definitely should use the same settings + for the IO base, the IRQ and DMA channel that have proven to work + with that other OS. + + Note that this menu lets you specify only the default setting for + the hardware setup. The hardware configuration can be changed at + boot time (when ftape is compiled into the kernel, i.e. if you + have said Y to "Floppy tape drive") or module load time (i.e. if you + have said M to "Floppy tape drive"). + + Please read also the file <file:Documentation/ftape.txt> which + contains a short description of the parameters that can be set at + boot or load time. 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>. + +config FT_MACH2 + bool "MACH-2" + +config FT_PROBE_FC10 + bool "FC-10/FC-20" + +config FT_ALT_FDC + bool "Alt/82078" + +endchoice + +comment "Consult the manuals of your tape drive for the correct settings!" + depends on FTAPE && !FT_STD_FDC + +config FT_FDC_BASE + hex "IO base of the floppy disk controller" + depends on FTAPE && !FT_STD_FDC + default "0" + ---help--- + You don't need to specify a value if the following default + settings for the base IO address are correct: + <<< MACH-2 : 0x1E0 >>> + <<< FC-10/FC-20: 0x180 >>> + <<< Secondary : 0x370 >>> + Secondary refers to a secondary FDC controller like the "high speed" + controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash. + Please make sure that the setting for the IO base address + specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR + CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already + successfully using the tape drive with another operating system then + you definitely should use the same settings for the IO base that has + proven to work with that other OS. + + Note that this menu lets you specify only the default setting for + the IO base. The hardware configuration can be changed at boot time + (when ftape is compiled into the kernel, i.e. if you specified Y to + "Floppy tape drive") or module load time (i.e. if you have said M to + "Floppy tape drive"). + + Please read also the file <file:Documentation/ftape.txt> which + contains a short description of the parameters that can be set at + boot or load time. + +config FT_FDC_IRQ + int "IRQ channel of the floppy disk controller" + depends on FTAPE && !FT_STD_FDC + default "0" + ---help--- + You don't need to specify a value if the following default + settings for the interrupt channel are correct: + <<< MACH-2 : 6 >>> + <<< FC-10/FC-20: 9 >>> + <<< Secondary : 6 >>> + Secondary refers to secondary a FDC controller like the "high speed" + controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash. + Please make sure that the setting for the IO base address + specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR + CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already + successfully using the tape drive with another operating system then + you definitely should use the same settings for the IO base that has + proven to work with that other OS. + + Note that this menu lets you specify only the default setting for + the IRQ channel. The hardware configuration can be changed at boot + time (when ftape is compiled into the kernel, i.e. if you said Y to + "Floppy tape drive") or module load time (i.e. if you said M to + "Floppy tape drive"). + + Please read also the file <file:Documentation/ftape.txt> which + contains a short description of the parameters that can be set at + boot or load time. + +config FT_FDC_DMA + int "DMA channel of the floppy disk controller" + depends on FTAPE && !FT_STD_FDC + default "0" + ---help--- + You don't need to specify a value if the following default + settings for the DMA channel are correct: + <<< MACH-2 : 2 >>> + <<< FC-10/FC-20: 3 >>> + <<< Secondary : 2 >>> + Secondary refers to a secondary FDC controller like the "high speed" + controllers delivered by Seagate or Exabyte or Iomega's Ditto Dash. + Please make sure that the setting for the IO base address + specified here is correct. USE THE MANUAL OF YOUR TAPE DRIVE OR + CONTROLLER CARD TO DETERMINE THE CORRECT SETTING. If you are already + successfully using the tape drive with another operating system then + you definitely should use the same settings for the IO base that has + proven to work with that other OS. + + Note that this menu lets you specify only the default setting for + the DMA channel. The hardware configuration can be changed at boot + time (when ftape is compiled into the kernel, i.e. if you said Y to + "Floppy tape drive") or module load time (i.e. if you said M to + "Floppy tape drive"). + + Please read also the file <file:Documentation/ftape.txt> which + contains a short description of the parameters that can be set at + boot or load time. + +config FT_FDC_THR + int "Default FIFO threshold (EXPERIMENTAL)" + depends on FTAPE && EXPERIMENTAL + default "8" + help + Set the FIFO threshold of the FDC. If this is higher the DMA + controller may serve the FDC after a higher latency time. If this is + lower, fewer DMA transfers occur leading to less bus contention. + You may try to tune this if ftape annoys you with "reduced data + rate because of excessive overrun errors" messages. However, this + doesn't seem to have too much effect. + + If unsure, don't touch the initial value, i.e. leave it at "8". + +config FT_FDC_MAX_RATE + int "Maximal data rate to use (EXPERIMENTAL)" + depends on FTAPE && EXPERIMENTAL + default "2000" + ---help--- + With some motherboard/FDC combinations ftape will not be able to + run your FDC/tape drive combination at the highest available + speed. If this is the case you'll encounter "reduced data rate + because of excessive overrun errors" messages and lots of retries + before ftape finally decides to reduce the data rate. + + In this case it might be desirable to tell ftape beforehand that + it need not try to run the tape drive at the highest available + speed. If unsure, leave this disabled, i.e. leave it at 2000 + bits/sec. + +config FT_ALPHA_CLOCK + int "CPU clock frequency of your DEC Alpha" if ALPHA + depends on FTAPE + default "0" + help + On some DEC Alpha machines the CPU clock frequency cannot be + determined automatically, so you need to specify it here ONLY if + running a DEC Alpha, otherwise this setting has no effect. + diff --git a/drivers/char/ftape/Makefile b/drivers/char/ftape/Makefile new file mode 100644 index 000000000000..0e67d2f8b7ec --- /dev/null +++ b/drivers/char/ftape/Makefile @@ -0,0 +1,28 @@ +# +# 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/ diff --git a/drivers/char/ftape/README.PCI b/drivers/char/ftape/README.PCI new file mode 100644 index 000000000000..18de159d36e0 --- /dev/null +++ b/drivers/char/ftape/README.PCI @@ -0,0 +1,81 @@ +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 diff --git a/drivers/char/ftape/RELEASE-NOTES b/drivers/char/ftape/RELEASE-NOTES new file mode 100644 index 000000000000..03799dbc05a4 --- /dev/null +++ b/drivers/char/ftape/RELEASE-NOTES @@ -0,0 +1,966 @@ +Hey, Emacs, we're -*-Text-*- mode! + +===== Release notes for ftape-3.04d 25/11/97 ===== +- The correct pre-processor statement for "else if" is "#elif" not + "elsif". +- Need to call zft_reset_position() when overwriting cartridges + previously written with ftape-2.x, sftape, or ancient + (pre-ftape-3.x) versions of zftape. + +===== Release notes for ftape-3.04c 16/11/97 ===== +- fdc_probe() was calling DUMPREGS with a result length of "1" which + was just fine. Undo previous change. + +===== Release notes for ftape-3.04b 14/11/97 ===== + +- patches/2.x.x/floppy.c.diff was somewhat broken, releasing i/o + regions it never had allocated. +- fdc_probe() was calling DUMPREGS with a result length of "1" instead + of "10" +- Writing deleted data marks if the first segents on track zero are + should work now. +- ftformat should now be able to handle those cases where the tape + drive sets the read only status bit (QIC-40/80 cartridges with + QIC-3010/3020 tape drives) because the header segment is damaged. +- the MTIOCFTCMD ioctl may now be issued by the superuser ONLY. + +===== Release notes for ftape-3.04a 12/11/97 ===== +- Fix an "infinite loop can't be killed by signal" bug in + ftape_get_drive_status(). Only relevant when trying to access + buggy/misconfigured hardware +- Try to compensate a bug in the HP Colorado T3000's firmware: it + doesn't set the write protect bit for QIC80/QIC40 cartridges. + +===== Release notes for ftape-3.04 06/11/97 ===== +- If positioning with fast seeking fails fall back to a slow seek + before giving up. +- (nearly) no retries on "no data errors" when verifying after + formatting. Improved tuning of the bad sector map after formatting. +- the directo |