aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ide/ide-tape.txt211
-rw-r--r--Documentation/ide/ide.txt107
-rw-r--r--Documentation/kernel-parameters.txt4
3 files changed, 105 insertions, 217 deletions
diff --git a/Documentation/ide/ide-tape.txt b/Documentation/ide/ide-tape.txt
index 658f271a373f..3f348a0b21d8 100644
--- a/Documentation/ide/ide-tape.txt
+++ b/Documentation/ide/ide-tape.txt
@@ -1,146 +1,65 @@
1/* 1IDE ATAPI streaming tape driver.
2 * IDE ATAPI streaming tape driver. 2
3 * 3This driver is a part of the Linux ide driver.
4 * This driver is a part of the Linux ide driver. 4
5 * 5The driver, in co-operation with ide.c, basically traverses the
6 * The driver, in co-operation with ide.c, basically traverses the 6request-list for the block device interface. The character device
7 * request-list for the block device interface. The character device 7interface, on the other hand, creates new requests, adds them
8 * interface, on the other hand, creates new requests, adds them 8to the request-list of the block device, and waits for their completion.
9 * to the request-list of the block device, and waits for their completion. 9
10 * 10The block device major and minor numbers are determined from the
11 * Pipelined operation mode is now supported on both reads and writes. 11tape's relative position in the ide interfaces, as explained in ide.c.
12 * 12
13 * The block device major and minor numbers are determined from the 13The character device interface consists of the following devices:
14 * tape's relative position in the ide interfaces, as explained in ide.c. 14
15 * 15ht0 major 37, minor 0 first IDE tape, rewind on close.
16 * The character device interface consists of the following devices: 16ht1 major 37, minor 1 second IDE tape, rewind on close.
17 * 17...
18 * ht0 major 37, minor 0 first IDE tape, rewind on close. 18nht0 major 37, minor 128 first IDE tape, no rewind on close.
19 * ht1 major 37, minor 1 second IDE tape, rewind on close. 19nht1 major 37, minor 129 second IDE tape, no rewind on close.
20 * ... 20...
21 * nht0 major 37, minor 128 first IDE tape, no rewind on close. 21
22 * nht1 major 37, minor 129 second IDE tape, no rewind on close. 22The general magnetic tape commands compatible interface, as defined by
23 * ... 23include/linux/mtio.h, is accessible through the character device.
24 * 24
25 * The general magnetic tape commands compatible interface, as defined by 25General ide driver configuration options, such as the interrupt-unmask
26 * include/linux/mtio.h, is accessible through the character device. 26flag, can be configured by issuing an ioctl to the block device interface,
27 * 27as any other ide device.
28 * General ide driver configuration options, such as the interrupt-unmask 28
29 * flag, can be configured by issuing an ioctl to the block device interface, 29Our own ide-tape ioctl's can be issued to either the block device or
30 * as any other ide device. 30the character device interface.
31 * 31
32 * Our own ide-tape ioctl's can be issued to either the block device or 32Maximal throughput with minimal bus load will usually be achieved in the
33 * the character device interface. 33following scenario:
34 * 34
35 * Maximal throughput with minimal bus load will usually be achieved in the 35 1. ide-tape is operating in the pipelined operation mode.
36 * following scenario: 36 2. No buffering is performed by the user backup program.
37 * 37
38 * 1. ide-tape is operating in the pipelined operation mode. 38Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive.
39 * 2. No buffering is performed by the user backup program. 39
40 * 40Here are some words from the first releases of hd.c, which are quoted
41 * Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive. 41in ide.c and apply here as well:
42 * 42
43 * Here are some words from the first releases of hd.c, which are quoted 43| Special care is recommended. Have Fun!
44 * in ide.c and apply here as well: 44
45 * 45Possible improvements:
46 * | Special care is recommended. Have Fun! 46
47 * 471. Support for the ATAPI overlap protocol.
48 * 48
49 * An overview of the pipelined operation mode. 49In order to maximize bus throughput, we currently use the DSC
50 * 50overlap method which enables ide.c to service requests from the
51 * In the pipelined write mode, we will usually just add requests to our 51other device while the tape is busy executing a command. The
52 * pipeline and return immediately, before we even start to service them. The 52DSC overlap method involves polling the tape's status register
53 * user program will then have enough time to prepare the next request while 53for the DSC bit, and servicing the other device while the tape
54 * we are still busy servicing previous requests. In the pipelined read mode, 54isn't ready.
55 * the situation is similar - we add read-ahead requests into the pipeline, 55
56 * before the user even requested them. 56In the current QIC development standard (December 1995),
57 * 57it is recommended that new tape drives will *in addition*
58 * The pipeline can be viewed as a "safety net" which will be activated when 58implement the ATAPI overlap protocol, which is used for the
59 * the system load is high and prevents the user backup program from keeping up 59same purpose - efficient use of the IDE bus, but is interrupt
60 * with the current tape speed. At this point, the pipeline will get 60driven and thus has much less CPU overhead.
61 * shorter and shorter but the tape will still be streaming at the same speed. 61
62 * Assuming we have enough pipeline stages, the system load will hopefully 62ATAPI overlap is likely to be supported in most new ATAPI
63 * decrease before the pipeline is completely empty, and the backup program 63devices, including new ATAPI cdroms, and thus provides us
64 * will be able to "catch up" and refill the pipeline again. 64a method by which we can achieve higher throughput when
65 * 65sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
66 * When using the pipelined mode, it would be best to disable any type of
67 * buffering done by the user program, as ide-tape already provides all the
68 * benefits in the kernel, where it can be done in a more efficient way.
69 * As we will usually not block the user program on a request, the most
70 * efficient user code will then be a simple read-write-read-... cycle.
71 * Any additional logic will usually just slow down the backup process.
72 *
73 * Using the pipelined mode, I get a constant over 400 KBps throughput,
74 * which seems to be the maximum throughput supported by my tape.
75 *
76 * However, there are some downfalls:
77 *
78 * 1. We use memory (for data buffers) in proportional to the number
79 * of pipeline stages (each stage is about 26 KB with my tape).
80 * 2. In the pipelined write mode, we cheat and postpone error codes
81 * to the user task. In read mode, the actual tape position
82 * will be a bit further than the last requested block.
83 *
84 * Concerning (1):
85 *
86 * 1. We allocate stages dynamically only when we need them. When
87 * we don't need them, we don't consume additional memory. In
88 * case we can't allocate stages, we just manage without them
89 * (at the expense of decreased throughput) so when Linux is
90 * tight in memory, we will not pose additional difficulties.
91 *
92 * 2. The maximum number of stages (which is, in fact, the maximum
93 * amount of memory) which we allocate is limited by the compile
94 * time parameter IDETAPE_MAX_PIPELINE_STAGES.
95 *
96 * 3. The maximum number of stages is a controlled parameter - We
97 * don't start from the user defined maximum number of stages
98 * but from the lower IDETAPE_MIN_PIPELINE_STAGES (again, we
99 * will not even allocate this amount of stages if the user
100 * program can't handle the speed). We then implement a feedback
101 * loop which checks if the pipeline is empty, and if it is, we
102 * increase the maximum number of stages as necessary until we
103 * reach the optimum value which just manages to keep the tape
104 * busy with minimum allocated memory or until we reach
105 * IDETAPE_MAX_PIPELINE_STAGES.
106 *
107 * Concerning (2):
108 *
109 * In pipelined write mode, ide-tape can not return accurate error codes
110 * to the user program since we usually just add the request to the
111 * pipeline without waiting for it to be serviced. In case an error
112 * occurs, I will report it on the next user request.
113 *
114 * In the pipelined read mode, subsequent read requests or forward
115 * filemark spacing will perform correctly, as we preserve all blocks
116 * and filemarks which we encountered during our excess read-ahead.
117 *
118 * For accurate tape positioning and error reporting, disabling
119 * pipelined mode might be the best option.
120 *
121 * You can enable/disable/tune the pipelined operation mode by adjusting
122 * the compile time parameters below.
123 *
124 *
125 * Possible improvements.
126 *
127 * 1. Support for the ATAPI overlap protocol.
128 *
129 * In order to maximize bus throughput, we currently use the DSC
130 * overlap method which enables ide.c to service requests from the
131 * other device while the tape is busy executing a command. The
132 * DSC overlap method involves polling the tape's status register
133 * for the DSC bit, and servicing the other device while the tape
134 * isn't ready.
135 *
136 * In the current QIC development standard (December 1995),
137 * it is recommended that new tape drives will *in addition*
138 * implement the ATAPI overlap protocol, which is used for the
139 * same purpose - efficient use of the IDE bus, but is interrupt
140 * driven and thus has much less CPU overhead.
141 *
142 * ATAPI overlap is likely to be supported in most new ATAPI
143 * devices, including new ATAPI cdroms, and thus provides us
144 * a method by which we can achieve higher throughput when
145 * sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
146 */
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt
index 486c699f4aea..0c78f4b1d9d9 100644
--- a/Documentation/ide/ide.txt
+++ b/Documentation/ide/ide.txt
@@ -82,27 +82,26 @@ Drives are normally found by auto-probing and/or examining the CMOS/BIOS data.
82For really weird situations, the apparent (fdisk) geometry can also be specified 82For really weird situations, the apparent (fdisk) geometry can also be specified
83on the kernel "command line" using LILO. The format of such lines is: 83on the kernel "command line" using LILO. The format of such lines is:
84 84
85 hdx=cyls,heads,sects 85 ide_core.chs=[interface_number.device_number]:cyls,heads,sects
86or hdx=cdrom 86or ide_core.cdrom=[interface_number.device_number]
87 87
88where hdx can be any of hda through hdh, Three values are required 88For example:
89(cyls,heads,sects). For example:
90 89
91 hdc=1050,32,64 hdd=cdrom 90 ide_core.chs=1.0:1050,32,64 ide_core.cdrom=1.1
92 91
93either {hda,hdb} or {hdc,hdd}. The results of successful auto-probing may 92The results of successful auto-probing may override the physical geometry/irq
94override the physical geometry/irq specified, though the "original" geometry 93specified, though the "original" geometry may be retained as the "logical"
95may be retained as the "logical" geometry for partitioning purposes (fdisk). 94geometry for partitioning purposes (fdisk).
96 95
97If the auto-probing during boot time confuses a drive (ie. the drive works 96If the auto-probing during boot time confuses a drive (ie. the drive works
98with hd.c but not with ide.c), then an command line option may be specified 97with hd.c but not with ide.c), then an command line option may be specified
99for each drive for which you'd like the drive to skip the hardware 98for each drive for which you'd like the drive to skip the hardware
100probe/identification sequence. For example: 99probe/identification sequence. For example:
101 100
102 hdb=noprobe 101 ide_core.noprobe=0.1
103or 102or
104 hdc=768,16,32 103 ide_core.chs=1.0:768,16,32
105 hdc=noprobe 104 ide_core.noprobe=1.0
106 105
107Note that when only one IDE device is attached to an interface, it should be 106Note that when only one IDE device is attached to an interface, it should be
108jumpered as "single" or "master", *not* "slave". Many folks have had 107jumpered as "single" or "master", *not* "slave". Many folks have had
@@ -118,9 +117,9 @@ If for some reason your cdrom drive is *not* found at boot time, you can force
118the probe to look harder by supplying a kernel command line parameter 117the probe to look harder by supplying a kernel command line parameter
119via LILO, such as: 118via LILO, such as:
120 119
121 hdc=cdrom /* hdc = "master" on second interface */ 120 ide_core.cdrom=1.0 /* "master" on second interface (hdc) */
122or 121or
123 hdd=cdrom /* hdd = "slave" on second interface */ 122 ide_core.cdrom=1.1 /* "slave" on second interface (hdd) */
124 123
125For example, a GW2000 system might have a hard drive on the primary 124For example, a GW2000 system might have a hard drive on the primary
126interface (/dev/hda) and an IDE cdrom drive on the secondary interface 125interface (/dev/hda) and an IDE cdrom drive on the secondary interface
@@ -174,9 +173,7 @@ to /etc/modprobe.conf.
174 173
175When ide.c is used as a module, you can pass command line parameters to the 174When ide.c is used as a module, you can pass command line parameters to the
176driver using the "options=" keyword to insmod, while replacing any ',' with 175driver using the "options=" keyword to insmod, while replacing any ',' with
177';'. For example: 176';'.
178
179 insmod ide.o options="hda=nodma hdb=nodma"
180 177
181 178
182================================================================================ 179================================================================================
@@ -184,57 +181,6 @@ driver using the "options=" keyword to insmod, while replacing any ',' with
184Summary of ide driver parameters for kernel command line 181Summary of ide driver parameters for kernel command line
185-------------------------------------------------------- 182--------------------------------------------------------
186 183
187 "hdx=" is recognized for all "x" from "a" to "u", such as "hdc".
188
189 "idex=" is recognized for all "x" from "0" to "9", such as "ide1".
190
191 "hdx=noprobe" : drive may be present, but do not probe for it
192
193 "hdx=none" : drive is NOT present, ignore cmos and do not probe
194
195 "hdx=nowerr" : ignore the WRERR_STAT bit on this drive
196
197 "hdx=cdrom" : drive is present, and is a cdrom drive
198
199 "hdx=cyl,head,sect" : disk drive is present, with specified geometry
200
201 "hdx=autotune" : driver will attempt to tune interface speed
202 to the fastest PIO mode supported,
203 if possible for this drive only.
204 Not fully supported by all chipset types,
205 and quite likely to cause trouble with
206 older/odd IDE drives.
207
208 "hdx=nodma" : disallow DMA
209
210 "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
211 where "xx" is between 20 and 66 inclusive,
212 used when tuning chipset PIO modes.
213 For PCI bus, 25 is correct for a P75 system,
214 30 is correct for P90,P120,P180 systems,
215 and 33 is used for P100,P133,P166 systems.
216 If in doubt, use idebus=33 for PCI.
217 As for VLB, it is safest to not specify it.
218 Bigger values are safer than smaller ones.
219
220 "idex=serialize" : do not overlap operations on idex. Please note
221 that you will have to specify this option for
222 both the respective primary and secondary channel
223 to take effect.
224
225 "idex=reset" : reset interface after probe
226
227 "idex=ata66" : informs the interface that it has an 80c cable
228 for chipsets that are ATA-66 capable, but the
229 ability to bit test for detection is currently
230 unknown.
231
232 "ide=doubler" : probe/support IDE doublers on Amiga
233
234There may be more options than shown -- use the source, Luke!
235
236Everything else is rejected with a "BAD OPTION" message.
237
238For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) 184For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672)
239you need to explicitly enable probing by using "probe" kernel parameter, 185you need to explicitly enable probing by using "probe" kernel parameter,
240i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: 186i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use:
@@ -251,6 +197,33 @@ are detected automatically).
251You also need to use "probe" kernel parameter for ide-4drives driver 197You also need to use "probe" kernel parameter for ide-4drives driver
252(support for IDE generic chipset with four drives on one port). 198(support for IDE generic chipset with four drives on one port).
253 199
200To enable support for IDE doublers on Amiga use "doubler" kernel parameter
201for gayle host driver (i.e. "gayle.doubler" if the driver is built-in).
202
203To force ignoring cable detection (this should be needed only if you're using
204short 40-wires cable which cannot be automatically detected - if this is not
205a case please report it as a bug instead) use "ignore_cable" kernel parameter:
206
207* "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in
208 (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1")
209
210* "ignore_cable=[interface_number]" module parameter (for ide_core module)
211 if IDE is compiled as module
212
213Other kernel parameters for ide_core are:
214
215* "nodma=[interface_number.device_number]" to disallow DMA for a device
216
217* "noflush=[interface_number.device_number]" to disable flush requests
218
219* "noprobe=[interface_number.device_number]" to skip probing
220
221* "nowerr=[interface_number.device_number]" to ignore the WRERR_STAT bit
222
223* "cdrom=[interface_number.device_number]" to force device as a CD-ROM
224
225* "chs=[interface_number.device_number]" to force device as a disk (using CHS)
226
254================================================================================ 227================================================================================
255 228
256Some Terminology 229Some Terminology
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index bf6303ec0bde..e5f3d918316f 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -772,10 +772,6 @@ and is between 256 and 4096 characters. It is defined in the file
772 Format: ide=nodma or ide=doubler 772 Format: ide=nodma or ide=doubler
773 See Documentation/ide/ide.txt. 773 See Documentation/ide/ide.txt.
774 774
775 ide?= [HW] (E)IDE subsystem
776 Format: ide?=ata66 or chipset specific parameters.
777 See Documentation/ide/ide.txt.
778
779 idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed 775 idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed
780 See Documentation/ide/ide.txt. 776 See Documentation/ide/ide.txt.
781 777