diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-27 13:13:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-27 13:13:06 -0400 |
commit | fba5c1af5c4fd6645fe62ea84ccde0981282cf66 (patch) | |
tree | 834022eb683e0badd5a1e5eb5957f74c0e69ebb4 /Documentation | |
parent | f222eba0f9d98376d363b51fcc2361fb56929844 (diff) | |
parent | 077e3bdb9ec34d7cb5751b5be81a4a0f6f0eb5dc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (49 commits)
ide-tape: remove tape->merge_stage
ide-tape: mv tape->merge_stage_size tape->merge_bh_size
ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
ide-tape: make __idetape_discard_read_pipeline() of type void
ide: remove now unused ide_pci_create_host_proc()
ide: remove /proc/ide/ali
ide-tape: improve buffer pages freeing strategy
ide-tape: mv tape->pages_per_stage tape->pages_per_buffer
ide-tape: mv tape->stage_size tape->buffer_size
ide-tape: improve buffer allocation strategy
ide: add struct ide_io_ports (take 3)
ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
ide: sanitize ide_unregister() usage
mpc8xx-ide: use ide_find_port()
ide: add "noacpi" / "acpigtf" / "acpionboot" parameters
gayle: add "doubler" parameter
ide: add "cdrom=" and "chs=" parameters
ide: add "nodma|noflush|noprobe|nowerr=" parameters
ide: remove obsoleted "hdx=autotune" kernel parameter
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ide/ide-tape.txt | 211 | ||||
-rw-r--r-- | Documentation/ide/ide.txt | 107 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 |
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 | /* | 1 | IDE ATAPI streaming tape driver. |
2 | * IDE ATAPI streaming tape driver. | 2 | |
3 | * | 3 | This driver is a part of the Linux ide driver. |
4 | * This driver is a part of the Linux ide driver. | 4 | |
5 | * | 5 | The driver, in co-operation with ide.c, basically traverses the |
6 | * The driver, in co-operation with ide.c, basically traverses the | 6 | request-list for the block device interface. The character device |
7 | * request-list for the block device interface. The character device | 7 | interface, on the other hand, creates new requests, adds them |
8 | * interface, on the other hand, creates new requests, adds them | 8 | to 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 | * | 10 | The block device major and minor numbers are determined from the |
11 | * Pipelined operation mode is now supported on both reads and writes. | 11 | tape'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 | 13 | The character device interface consists of the following devices: |
14 | * tape's relative position in the ide interfaces, as explained in ide.c. | 14 | |
15 | * | 15 | ht0 major 37, minor 0 first IDE tape, rewind on close. |
16 | * The character device interface consists of the following devices: | 16 | ht1 major 37, minor 1 second IDE tape, rewind on close. |
17 | * | 17 | ... |
18 | * ht0 major 37, minor 0 first IDE tape, rewind on close. | 18 | nht0 major 37, minor 128 first IDE tape, no rewind on close. |
19 | * ht1 major 37, minor 1 second IDE tape, rewind on close. | 19 | nht1 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. | 22 | The general magnetic tape commands compatible interface, as defined by |
23 | * ... | 23 | include/linux/mtio.h, is accessible through the character device. |
24 | * | 24 | |
25 | * The general magnetic tape commands compatible interface, as defined by | 25 | General ide driver configuration options, such as the interrupt-unmask |
26 | * include/linux/mtio.h, is accessible through the character device. | 26 | flag, can be configured by issuing an ioctl to the block device interface, |
27 | * | 27 | as 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, | 29 | Our own ide-tape ioctl's can be issued to either the block device or |
30 | * as any other ide device. | 30 | the character device interface. |
31 | * | 31 | |
32 | * Our own ide-tape ioctl's can be issued to either the block device or | 32 | Maximal throughput with minimal bus load will usually be achieved in the |
33 | * the character device interface. | 33 | following 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. | 38 | Testing 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 | * | 40 | Here 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. | 41 | in 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 | * | 45 | Possible improvements: |
46 | * | Special care is recommended. Have Fun! | 46 | |
47 | * | 47 | 1. Support for the ATAPI overlap protocol. |
48 | * | 48 | |
49 | * An overview of the pipelined operation mode. | 49 | In order to maximize bus throughput, we currently use the DSC |
50 | * | 50 | overlap method which enables ide.c to service requests from the |
51 | * In the pipelined write mode, we will usually just add requests to our | 51 | other device while the tape is busy executing a command. The |
52 | * pipeline and return immediately, before we even start to service them. The | 52 | DSC overlap method involves polling the tape's status register |
53 | * user program will then have enough time to prepare the next request while | 53 | for the DSC bit, and servicing the other device while the tape |
54 | * we are still busy servicing previous requests. In the pipelined read mode, | 54 | isn't ready. |
55 | * the situation is similar - we add read-ahead requests into the pipeline, | 55 | |
56 | * before the user even requested them. | 56 | In the current QIC development standard (December 1995), |
57 | * | 57 | it is recommended that new tape drives will *in addition* |
58 | * The pipeline can be viewed as a "safety net" which will be activated when | 58 | implement the ATAPI overlap protocol, which is used for the |
59 | * the system load is high and prevents the user backup program from keeping up | 59 | same purpose - efficient use of the IDE bus, but is interrupt |
60 | * with the current tape speed. At this point, the pipeline will get | 60 | driven 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 | 62 | ATAPI overlap is likely to be supported in most new ATAPI |
63 | * decrease before the pipeline is completely empty, and the backup program | 63 | devices, including new ATAPI cdroms, and thus provides us |
64 | * will be able to "catch up" and refill the pipeline again. | 64 | a method by which we can achieve higher throughput when |
65 | * | 65 | sharing 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. | |||
82 | For really weird situations, the apparent (fdisk) geometry can also be specified | 82 | For really weird situations, the apparent (fdisk) geometry can also be specified |
83 | on the kernel "command line" using LILO. The format of such lines is: | 83 | on 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 |
86 | or hdx=cdrom | 86 | or ide_core.cdrom=[interface_number.device_number] |
87 | 87 | ||
88 | where hdx can be any of hda through hdh, Three values are required | 88 | For 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 | ||
93 | either {hda,hdb} or {hdc,hdd}. The results of successful auto-probing may | 92 | The results of successful auto-probing may override the physical geometry/irq |
94 | override the physical geometry/irq specified, though the "original" geometry | 93 | specified, though the "original" geometry may be retained as the "logical" |
95 | may be retained as the "logical" geometry for partitioning purposes (fdisk). | 94 | geometry for partitioning purposes (fdisk). |
96 | 95 | ||
97 | If the auto-probing during boot time confuses a drive (ie. the drive works | 96 | If the auto-probing during boot time confuses a drive (ie. the drive works |
98 | with hd.c but not with ide.c), then an command line option may be specified | 97 | with hd.c but not with ide.c), then an command line option may be specified |
99 | for each drive for which you'd like the drive to skip the hardware | 98 | for each drive for which you'd like the drive to skip the hardware |
100 | probe/identification sequence. For example: | 99 | probe/identification sequence. For example: |
101 | 100 | ||
102 | hdb=noprobe | 101 | ide_core.noprobe=0.1 |
103 | or | 102 | or |
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 | ||
107 | Note that when only one IDE device is attached to an interface, it should be | 106 | Note that when only one IDE device is attached to an interface, it should be |
108 | jumpered as "single" or "master", *not* "slave". Many folks have had | 107 | jumpered 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 | |||
118 | the probe to look harder by supplying a kernel command line parameter | 117 | the probe to look harder by supplying a kernel command line parameter |
119 | via LILO, such as: | 118 | via LILO, such as: |
120 | 119 | ||
121 | hdc=cdrom /* hdc = "master" on second interface */ | 120 | ide_core.cdrom=1.0 /* "master" on second interface (hdc) */ |
122 | or | 121 | or |
123 | hdd=cdrom /* hdd = "slave" on second interface */ | 122 | ide_core.cdrom=1.1 /* "slave" on second interface (hdd) */ |
124 | 123 | ||
125 | For example, a GW2000 system might have a hard drive on the primary | 124 | For example, a GW2000 system might have a hard drive on the primary |
126 | interface (/dev/hda) and an IDE cdrom drive on the secondary interface | 125 | interface (/dev/hda) and an IDE cdrom drive on the secondary interface |
@@ -174,9 +173,7 @@ to /etc/modprobe.conf. | |||
174 | 173 | ||
175 | When ide.c is used as a module, you can pass command line parameters to the | 174 | When ide.c is used as a module, you can pass command line parameters to the |
176 | driver using the "options=" keyword to insmod, while replacing any ',' with | 175 | driver 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 | |||
184 | Summary of ide driver parameters for kernel command line | 181 | Summary 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 | |||
234 | There may be more options than shown -- use the source, Luke! | ||
235 | |||
236 | Everything else is rejected with a "BAD OPTION" message. | ||
237 | |||
238 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) | 184 | For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672) |
239 | you need to explicitly enable probing by using "probe" kernel parameter, | 185 | you need to explicitly enable probing by using "probe" kernel parameter, |
240 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: | 186 | i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use: |
@@ -251,6 +197,33 @@ are detected automatically). | |||
251 | You also need to use "probe" kernel parameter for ide-4drives driver | 197 | You 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 | ||
200 | To enable support for IDE doublers on Amiga use "doubler" kernel parameter | ||
201 | for gayle host driver (i.e. "gayle.doubler" if the driver is built-in). | ||
202 | |||
203 | To force ignoring cable detection (this should be needed only if you're using | ||
204 | short 40-wires cable which cannot be automatically detected - if this is not | ||
205 | a 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 | |||
213 | Other 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 | ||
256 | Some Terminology | 229 | Some 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 | ||