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