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