Using QIC-36 and QIC-02 tape drive bus systems with GNU/Linux


Software

Driver

Note: Currently Linux support only single drive configurations. Most of the cables I have seen are for single drives anyhow.

To use QIC-36/QIC-02 on Linux you need the driver "tpqic02". It can be found under "Character devices" in the kernel configuration. Additionally I have activated the runtime configuration option for testing. The ".config" file should now contain:

Since kernel version 2.4 Linux supports compiling this driver as module. The ".config" file should now contain:

After compiling, installing and running the new kernel, messages like this should be written to the syslog:

Jul 29 21:19:08 Test1 kernel: tpqic02: Runtime config, $Revision: 1.10 $, $Date: 1997/01/26 07:13:20 $
Jul 29 21:19:08 Test1 kernel: tpqic02: DMA buffers: 20 blocks
If you have compiled the driver as module do a:
modprobe tpqic02

and check again.


Device files

Check if the following device files exist on your "/dev" directory:

crw-rw-rw-    1 root     root      12, 255 May 12  2001 /dev/tape-reset

crw-rw-rw-    1 root     root      12,   0 May 12  2001 /dev/ntpqic-nodens
crw-rw-rw-    1 root     root      12,   2 May 12  2001 /dev/ntpqic11
crw-rw-rw-    1 root     root      12,   4 May 12  2001 /dev/ntpqic24
crw-rw-rw-    1 root     root      12,   6 May 12  2001 /dev/ntpqic120
crw-rw-rw-    1 root     root      12,   8 May 12  2001 /dev/ntpqic150

crw-rw-rw-    1 root     root      12,   1 May 12  2001 /dev/tpqic-nodens
crw-rw-rw-    1 root     root      12,   3 May 12  2001 /dev/tpqic11
crw-rw-rw-    1 root     root      12,   5 May 12  2001 /dev/tpqic24
crw-rw-rw-    1 root     root      12,   7 May 12  2001 /dev/tpqic120
crw-rw-rw-    1 root     root      12,   9 May 12  2001 /dev/tpqic150
                                    ^    ^
				Major    Minor

The first file is only used to reset the tape drive. The next block are non-rewinding devices and the last block are rewinding devices.
Except for "tape-reset" the files can have any name unless the major and minor numbers match the ones above.

If some files are missing create them using "mknod" like this:

mknod /dev/ntpqic-nodens c 12 0

Important: Create a symlink with the name "/dev/tape" that points to one of these files (the runtime config scripts rely on that):

ln -s /dev/ntpqic-nodens /dev/tape

Runtime configuration tool

To configure the driver for a specific host adapter and drive you need the tool "qic02config" from the tpqic02-support-x.y package.

This package contains scripts to call "qic02config" with appropriate parameters.
For my Wangtek 5150EQ drive/Wangtek 30631 host adapter combination a script "conf-wangtek" already exist. I have adjusted the path and the system ressources of the host adapter and the result looks like this (/dev/tape -> /dev/ntpqic150):

#!/bin/sh
# QIC02 DYNCONF parameters for Wangtek 5150EQ drive on Wangtek 30631
/usr/local/bin/qic02conf -f /dev/tape \
--drive=15 \
--card=wangtek \
--irq=5 \
--dma=1 \
--port=0x280 \
--have-dens=1 \
--have-bsf=0 \
--have-fsr=0 \
--have-bsr=0 \
--have-eod=0 \
--debug=0xfc

For the Teac MT2ST/45D I have used the following script (/dev/tape -> /dev/ntpqic-nodens):

#!/bin/sh
# QIC02 DYNCONF parameters for Teac MT2ST drive on Wangtek 30631
/usr/local/bin/qic02conf -f /dev/tape \
--drive=15 \
--card=wangtek \
--irq=5 \
--dma=1 \
--port=0x280 \
--have-dens=0 \
--have-bsf=0 \
--have-fsr=0 \
--have-bsr=0 \
--have-eod=0 \
--debug=0xfc

And this one for the Wangtek 5099EN24 on the QIC-36 host adapter (/dev/tape -> /dev/ntpqic24):

#!/bin/sh
# QIC02 DYNCONF parameters for Wangtek 5099EN24 drive on Wangtek 30850
/usr/local/bin/qic02conf -f /dev/tape \
--drive=15 \
--card=wangtek \
--irq=5 \
--dma=1 \
--port=0x280 \
--have-dens=1 \
--have-bsf=0 \
--have-fsr=0 \
--have-bsr=0 \
--have-eod=0 \
--debug=0xfc

After executing the script, the following messages should appear in the syslog:

Jul 29 22:53:30 Test1 kernel: tpqic02: Settings: IRQ 5, DMA 1, IO 0x280, IFC Wangtek
Jul 29 22:53:30 Test1 kernel: tpqic02: tp_sense: status: 81d0, error count: 0, underruns: 0

Using the drive

Now things are set up and ready. After inserting media in the drive you can do a:

mt rewind

No error should be displayed on the console. A message like this should appear in the syslog:

Jul 29 23:24:21 Test1 kernel: tpqic02: MTREW rewinding tape
Jul 29 23:24:21 Test1 kernel: tpqic02: Waiting for (re-)wind to finish: stat=0x3

Now the drive can be used like any other tape drive, but some things should be noticed:

Greetings to all users of ancient technology.



Browser        IDFC        Last update: 2005-05-08        micha@hilfe-fuer-linux.de