Merge tag 'selinux-pr-20190801' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / Documentation / ide / ide-tape.rst
CommitLineData
d7b461c5
MCC
1===============================
2IDE ATAPI streaming tape driver
3===============================
10569713
BP
4
5This driver is a part of the Linux ide driver.
6
7The driver, in co-operation with ide.c, basically traverses the
8request-list for the block device interface. The character device
9interface, on the other hand, creates new requests, adds them
10to the request-list of the block device, and waits for their completion.
11
12The block device major and minor numbers are determined from the
13tape's relative position in the ide interfaces, as explained in ide.c.
14
d7b461c5 15The character device interface consists of the following devices::
10569713 16
d7b461c5
MCC
17 ht0 major 37, minor 0 first IDE tape, rewind on close.
18 ht1 major 37, minor 1 second IDE tape, rewind on close.
19 ...
20 nht0 major 37, minor 128 first IDE tape, no rewind on close.
21 nht1 major 37, minor 129 second IDE tape, no rewind on close.
22 ...
10569713
BP
23
24The general magnetic tape commands compatible interface, as defined by
25include/linux/mtio.h, is accessible through the character device.
26
27General ide driver configuration options, such as the interrupt-unmask
28flag, can be configured by issuing an ioctl to the block device interface,
29as any other ide device.
30
31Our own ide-tape ioctl's can be issued to either the block device or
32the character device interface.
33
34Maximal throughput with minimal bus load will usually be achieved in the
35following scenario:
36
37 1. ide-tape is operating in the pipelined operation mode.
38 2. No buffering is performed by the user backup program.
39
40Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive.
41
42Here are some words from the first releases of hd.c, which are quoted
43in ide.c and apply here as well:
44
d7b461c5 45* Special care is recommended. Have Fun!
10569713 46
d7b461c5
MCC
47Possible improvements
48=====================
10569713
BP
49
501. Support for the ATAPI overlap protocol.
51
52In order to maximize bus throughput, we currently use the DSC
53overlap method which enables ide.c to service requests from the
54other device while the tape is busy executing a command. The
55DSC overlap method involves polling the tape's status register
56for the DSC bit, and servicing the other device while the tape
57isn't ready.
58
59In the current QIC development standard (December 1995),
60it is recommended that new tape drives will *in addition*
61implement the ATAPI overlap protocol, which is used for the
62same purpose - efficient use of the IDE bus, but is interrupt
63driven and thus has much less CPU overhead.
64
65ATAPI overlap is likely to be supported in most new ATAPI
66devices, including new ATAPI cdroms, and thus provides us
67a method by which we can achieve higher throughput when
68sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.