How to get back ftape (QIC-117 driver) in recent Linux kernels



Background

Because it was unmaintained, ftape was removed since kernel 2.6.20. But there are still people who use it for QIC-117 tapes (aka floppy tapes) ... myself for example ;-)


Patch for Kernel 2.6.23

This patch contains ftape 3.04d ported from kernel 2.6.16.20 and should be applied to a vanilla 2.6.23 source tree:
QIC-117 patch for 2.6.23 [172KiByte]

To apply the patch go to the toplevel directory of the kernel source tree (the patch file is expected one level above) and execute:

   gunzip -c ../qic117-patch_linux-2.6.23.gz | patch -p1
      

Patch for Kernel 2.6.24.2

This patch contains ftape 3.04d ported from kernel 2.6.16.20 and should be applied to a vanilla 2.6.24.2 source tree:
QIC-117 patch for 2.6.24.2 [172KiByte]

To apply the patch go to the toplevel directory of the kernel source tree (the patch file is expected one level above) and execute:

   gunzip -c ../qic117-patch_linux-2.6.24.2.gz | patch -p1
      

Patch for Kernel 2.6.26

This patch contains ftape 3.04d ported from kernel 2.6.16.20 and should be applied to a vanilla 2.6.26 source tree:
QIC-117 patch for 2.6.26 [173KiByte]

The option for information in '/proc/ftape' compile and work again.
I have rewritten the calibrated loop timings because they failed on my 'tickless' configuration running with a HPET timer (Intel 845 chipset).

To apply the patch go to the toplevel directory of the kernel source tree (the patch file is expected one level above) and execute:

   gunzip -c ../qic117-patch_linux-2.6.26_V2.gz | patch -p1
      

Patch for Kernel 2.6.33

This patch contains ftape 3.04d ported from kernel 2.6.16.20 and should be applied to a vanilla 2.6.33 source tree:
QIC-117 patch for 2.6.33 [173KiByte]

To apply the patch go to the toplevel directory of the kernel source tree (the patch file is expected one level above) and execute:

   gunzip -c ../qic117-patch_linux-2.6.33.gz | patch -p1
      

Patch for Kernel 2.6.36

This patch contains ftape 3.04d ported from kernel 2.6.16.20 and should be applied to a vanilla 2.6.36 source tree:
QIC-117 patch for 2.6.36 [174KiByte]

To apply the patch go to the toplevel directory of the kernel source tree (the patch file is expected one level above) and execute:

   gunzip -c ../qic117-patch_linux-2.6.36.gz | patch -p1
      

Notes

If you run 'make menuconfig' on the patched kernel you find an 'ftape' entry under 'Character devices'. At least ftape and zftape must be enabled.

The required device files must have major number 27. The minor number bits 0 und 1 are the device number, bit 2 is the "no rewind" flag.


Warnings

Formatting of cartridges do not work.
It is no longer possible to have both floppy.ko and ftape.ko/zftape.ko loaded at the same time if the drives are connected to the same controller. Therefore none of them can be compiled into the kernel directly in this case if both drives should be usable.
Maybe this driver have problems on SMP machines.
Maybe this driver have problems on 64Bit x86 machines.
This patch was tested and work for me but there is no warranty!



2010-10-28 Michael Bäuerle <michael.baeuerle@gmx.net>