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