diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/acpi-hotkey.txt | 3 | ||||
-rw-r--r-- | Documentation/arm/Samsung-S3C24XX/USB-Host.txt | 93 | ||||
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 12 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 5 | ||||
-rw-r--r-- | Documentation/kprobes.txt | 588 | ||||
-rw-r--r-- | Documentation/networking/cxgb.txt | 352 | ||||
-rw-r--r-- | Documentation/networking/phy.txt | 288 | ||||
-rw-r--r-- | Documentation/pci.txt | 14 | ||||
-rw-r--r-- | Documentation/serial/driver | 15 | ||||
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 1 | ||||
-rw-r--r-- | Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | 15 | ||||
-rw-r--r-- | Documentation/usb/usbmon.txt | 2 | ||||
-rw-r--r-- | Documentation/video4linux/bttv/Insmod-options | 3 | ||||
-rw-r--r-- | Documentation/x86_64/boot-options.txt | 5 |
14 files changed, 1366 insertions, 30 deletions
diff --git a/Documentation/acpi-hotkey.txt b/Documentation/acpi-hotkey.txt index 4c115a7bb826..0acdc80c30c2 100644 --- a/Documentation/acpi-hotkey.txt +++ b/Documentation/acpi-hotkey.txt | |||
@@ -33,3 +33,6 @@ The result of the execution of this aml method is | |||
33 | attached to /proc/acpi/hotkey/poll_method, which is dnyamically | 33 | attached to /proc/acpi/hotkey/poll_method, which is dnyamically |
34 | created. Please use command "cat /proc/acpi/hotkey/polling_method" | 34 | created. Please use command "cat /proc/acpi/hotkey/polling_method" |
35 | to retrieve it. | 35 | to retrieve it. |
36 | |||
37 | Note: Use cmdline "acpi_generic_hotkey" to over-ride | ||
38 | loading any platform specific drivers. | ||
diff --git a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt new file mode 100644 index 000000000000..b93b68e2b143 --- /dev/null +++ b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt | |||
@@ -0,0 +1,93 @@ | |||
1 | S3C24XX USB Host support | ||
2 | ======================== | ||
3 | |||
4 | |||
5 | |||
6 | Introduction | ||
7 | ------------ | ||
8 | |||
9 | This document details the S3C2410/S3C2440 in-built OHCI USB host support. | ||
10 | |||
11 | Configuration | ||
12 | ------------- | ||
13 | |||
14 | Enable at least the following kernel options: | ||
15 | |||
16 | menuconfig: | ||
17 | |||
18 | Device Drivers ---> | ||
19 | USB support ---> | ||
20 | <*> Support for Host-side USB | ||
21 | <*> OHCI HCD support | ||
22 | |||
23 | |||
24 | .config: | ||
25 | CONFIG_USB | ||
26 | CONFIG_USB_OHCI_HCD | ||
27 | |||
28 | |||
29 | Once these options are configured, the standard set of USB device | ||
30 | drivers can be configured and used. | ||
31 | |||
32 | |||
33 | Board Support | ||
34 | ------------- | ||
35 | |||
36 | The driver attaches to a platform device, which will need to be | ||
37 | added by the board specific support file in linux/arch/arm/mach-s3c2410, | ||
38 | such as mach-bast.c or mach-smdk2410.c | ||
39 | |||
40 | The platform device's platform_data field is only needed if the | ||
41 | board implements extra power control or over-current monitoring. | ||
42 | |||
43 | The OHCI driver does not ensure the state of the S3C2410's MISCCTRL | ||
44 | register, so if both ports are to be used for the host, then it is | ||
45 | the board support file's responsibility to ensure that the second | ||
46 | port is configured to be connected to the OHCI core. | ||
47 | |||
48 | |||
49 | Platform Data | ||
50 | ------------- | ||
51 | |||
52 | See linux/include/asm-arm/arch-s3c2410/usb-control.h for the | ||
53 | descriptions of the platform device data. An implementation | ||
54 | can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c . | ||
55 | |||
56 | The `struct s3c2410_hcd_info` contains a pair of functions | ||
57 | that get called to enable over-current detection, and to | ||
58 | control the port power status. | ||
59 | |||
60 | The ports are numbered 0 and 1. | ||
61 | |||
62 | power_control: | ||
63 | |||
64 | Called to enable or disable the power on the port. | ||
65 | |||
66 | enable_oc: | ||
67 | |||
68 | Called to enable or disable the over-current monitoring. | ||
69 | This should claim or release the resources being used to | ||
70 | check the power condition on the port, such as an IRQ. | ||
71 | |||
72 | report_oc: | ||
73 | |||
74 | The OHCI driver fills this field in for the over-current code | ||
75 | to call when there is a change to the over-current state on | ||
76 | an port. The ports argument is a bitmask of 1 bit per port, | ||
77 | with bit X being 1 for an over-current on port X. | ||
78 | |||
79 | The function s3c2410_usb_report_oc() has been provided to | ||
80 | ensure this is called correctly. | ||
81 | |||
82 | port[x]: | ||
83 | |||
84 | This is struct describes each port, 0 or 1. The platform driver | ||
85 | should set the flags field of each port to S3C_HCDFLG_USED if | ||
86 | the port is enabled. | ||
87 | |||
88 | |||
89 | |||
90 | Document Author | ||
91 | --------------- | ||
92 | |||
93 | Ben Dooks, (c) 2005 Simtec Electronics | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 8b1430b46655..0665cb12bd66 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -135,3 +135,15 @@ Why: With the 16-bit PCMCIA subsystem now behaving (almost) like a | |||
135 | pcmciautils package available at | 135 | pcmciautils package available at |
136 | http://kernel.org/pub/linux/utils/kernel/pcmcia/ | 136 | http://kernel.org/pub/linux/utils/kernel/pcmcia/ |
137 | Who: Dominik Brodowski <linux@brodo.de> | 137 | Who: Dominik Brodowski <linux@brodo.de> |
138 | |||
139 | --------------------------- | ||
140 | |||
141 | What: ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue) | ||
142 | When: December 2005 | ||
143 | Why: This interface has been obsoleted by the new layer3-independent | ||
144 | "nfnetlink_queue". The Kernel interface is compatible, so the old | ||
145 | ip[6]tables "QUEUE" targets still work and will transparently handle | ||
146 | all packets into nfnetlink queue number 0. Userspace users will have | ||
147 | to link against API-compatible library on top of libnfnetlink_queue | ||
148 | instead of the current 'libipq'. | ||
149 | Who: Harald Welte <laforge@netfilter.org> | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a998a8c2f95b..3d5cd7a09b2f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -159,6 +159,11 @@ running once the system is up. | |||
159 | 159 | ||
160 | acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT | 160 | acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT |
161 | 161 | ||
162 | acpi_generic_hotkey [HW,ACPI] | ||
163 | Allow consolidated generic hotkey driver to | ||
164 | over-ride platform specific driver. | ||
165 | See also Documentation/acpi-hotkey.txt. | ||
166 | |||
162 | ad1816= [HW,OSS] | 167 | ad1816= [HW,OSS] |
163 | Format: <io>,<irq>,<dma>,<dma2> | 168 | Format: <io>,<irq>,<dma>,<dma2> |
164 | See also Documentation/sound/oss/AD1816. | 169 | See also Documentation/sound/oss/AD1816. |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt new file mode 100644 index 000000000000..0541fe1de704 --- /dev/null +++ b/Documentation/kprobes.txt | |||
@@ -0,0 +1,588 @@ | |||
1 | Title : Kernel Probes (Kprobes) | ||
2 | Authors : Jim Keniston <jkenisto@us.ibm.com> | ||
3 | : Prasanna S Panchamukhi <prasanna@in.ibm.com> | ||
4 | |||
5 | CONTENTS | ||
6 | |||
7 | 1. Concepts: Kprobes, Jprobes, Return Probes | ||
8 | 2. Architectures Supported | ||
9 | 3. Configuring Kprobes | ||
10 | 4. API Reference | ||
11 | 5. Kprobes Features and Limitations | ||
12 | 6. Probe Overhead | ||
13 | 7. TODO | ||
14 | 8. Kprobes Example | ||
15 | 9. Jprobes Example | ||
16 | 10. Kretprobes Example | ||
17 | |||
18 | 1. Concepts: Kprobes, Jprobes, Return Probes | ||
19 | |||
20 | Kprobes enables you to dynamically break into any kernel routine and | ||
21 | collect debugging and performance information non-disruptively. You | ||
22 | can trap at almost any kernel code address, specifying a handler | ||
23 | routine to be invoked when the breakpoint is hit. | ||
24 | |||
25 | There are currently three types of probes: kprobes, jprobes, and | ||
26 | kretprobes (also called return probes). A kprobe can be inserted | ||
27 | on virtually any instruction in the kernel. A jprobe is inserted at | ||
28 | the entry to a kernel function, and provides convenient access to the | ||
29 | function's arguments. A return probe fires when a specified function | ||
30 | returns. | ||
31 | |||
32 | In the typical case, Kprobes-based instrumentation is packaged as | ||
33 | a kernel module. The module's init function installs ("registers") | ||
34 | one or more probes, and the exit function unregisters them. A | ||
35 | registration function such as register_kprobe() specifies where | ||
36 | the probe is to be inserted and what handler is to be called when | ||
37 | the probe is hit. | ||
38 | |||
39 | The next three subsections explain how the different types of | ||
40 | probes work. They explain certain things that you'll need to | ||
41 | know in order to make the best use of Kprobes -- e.g., the | ||
42 | difference between a pre_handler and a post_handler, and how | ||
43 | to use the maxactive and nmissed fields of a kretprobe. But | ||
44 | if you're in a hurry to start using Kprobes, you can skip ahead | ||
45 | to section 2. | ||
46 | |||
47 | 1.1 How Does a Kprobe Work? | ||
48 | |||
49 | When a kprobe is registered, Kprobes makes a copy of the probed | ||
50 | instruction and replaces the first byte(s) of the probed instruction | ||
51 | with a breakpoint instruction (e.g., int3 on i386 and x86_64). | ||
52 | |||
53 | When a CPU hits the breakpoint instruction, a trap occurs, the CPU's | ||
54 | registers are saved, and control passes to Kprobes via the | ||
55 | notifier_call_chain mechanism. Kprobes executes the "pre_handler" | ||
56 | associated with the kprobe, passing the handler the addresses of the | ||
57 | kprobe struct and the saved registers. | ||
58 | |||
59 | Next, Kprobes single-steps its copy of the probed instruction. | ||
60 | (It would be simpler to single-step the actual instruction in place, | ||
61 | but then Kprobes would have to temporarily remove the breakpoint | ||
62 | instruction. This would open a small time window when another CPU | ||
63 | could sail right past the probepoint.) | ||
64 | |||
65 | After the instruction is single-stepped, Kprobes executes the | ||
66 | "post_handler," if any, that is associated with the kprobe. | ||
67 | Execution then continues with the instruction following the probepoint. | ||
68 | |||
69 | 1.2 How Does a Jprobe Work? | ||
70 | |||
71 | A jprobe is implemented using a kprobe that is placed on a function's | ||
72 | entry point. It employs a simple mirroring principle to allow | ||
73 | seamless access to the probed function's arguments. The jprobe | ||
74 | handler routine should have the same signature (arg list and return | ||
75 | type) as the function being probed, and must always end by calling | ||
76 | the Kprobes function jprobe_return(). | ||
77 | |||
78 | Here's how it works. When the probe is hit, Kprobes makes a copy of | ||
79 | the saved registers and a generous portion of the stack (see below). | ||
80 | Kprobes then points the saved instruction pointer at the jprobe's | ||
81 | handler routine, and returns from the trap. As a result, control | ||
82 | passes to the handler, which is presented with the same register and | ||
83 | stack contents as the probed function. When it is done, the handler | ||
84 | calls jprobe_return(), which traps again to restore the original stack | ||
85 | contents and processor state and switch to the probed function. | ||
86 | |||
87 | By convention, the callee owns its arguments, so gcc may produce code | ||
88 | that unexpectedly modifies that portion of the stack. This is why | ||
89 | Kprobes saves a copy of the stack and restores it after the jprobe | ||
90 | handler has run. Up to MAX_STACK_SIZE bytes are copied -- e.g., | ||
91 | 64 bytes on i386. | ||
92 | |||
93 | Note that the probed function's args may be passed on the stack | ||
94 | or in registers (e.g., for x86_64 or for an i386 fastcall function). | ||
95 | The jprobe will work in either case, so long as the handler's | ||
96 | prototype matches that of the probed function. | ||
97 | |||
98 | 1.3 How Does a Return Probe Work? | ||
99 | |||
100 | When you call register_kretprobe(), Kprobes establishes a kprobe at | ||
101 | the entry to the function. When the probed function is called and this | ||
102 | probe is hit, Kprobes saves a copy of the return address, and replaces | ||
103 | the return address with the address of a "trampoline." The trampoline | ||
104 | is an arbitrary piece of code -- typically just a nop instruction. | ||
105 | At boot time, Kprobes registers a kprobe at the trampoline. | ||
106 | |||
107 | When the probed function executes its return instruction, control | ||
108 | passes to the trampoline and that probe is hit. Kprobes' trampoline | ||
109 | handler calls the user-specified handler associated with the kretprobe, | ||
110 | then sets the saved instruction pointer to the saved return address, | ||
111 | and that's where execution resumes upon return from the trap. | ||
112 | |||
113 | While the probed function is executing, its return address is | ||
114 | stored in an object of type kretprobe_instance. Before calling | ||
115 | register_kretprobe(), the user sets the maxactive field of the | ||
116 | kretprobe struct to specify how many instances of the specified | ||
117 | function can be probed simultaneously. register_kretprobe() | ||
118 | pre-allocates the indicated number of kretprobe_instance objects. | ||
119 | |||
120 | For example, if the function is non-recursive and is called with a | ||
121 | spinlock held, maxactive = 1 should be enough. If the function is | ||
122 | non-recursive and can never relinquish the CPU (e.g., via a semaphore | ||
123 | or preemption), NR_CPUS should be enough. If maxactive <= 0, it is | ||
124 | set to a default value. If CONFIG_PREEMPT is enabled, the default | ||
125 | is max(10, 2*NR_CPUS). Otherwise, the default is NR_CPUS. | ||
126 | |||
127 | It's not a disaster if you set maxactive too low; you'll just miss | ||
128 | some probes. In the kretprobe struct, the nmissed field is set to | ||
129 | zero when the return probe is registered, and is incremented every | ||
130 | time the probed function is entered but there is no kretprobe_instance | ||
131 | object available for establishing the return probe. | ||
132 | |||
133 | 2. Architectures Supported | ||
134 | |||
135 | Kprobes, jprobes, and return probes are implemented on the following | ||
136 | architectures: | ||
137 | |||
138 | - i386 | ||
139 | - x86_64 (AMD-64, E64MT) | ||
140 | - ppc64 | ||
141 | - ia64 (Support for probes on certain instruction types is still in progress.) | ||
142 | - sparc64 (Return probes not yet implemented.) | ||
143 | |||
144 | 3. Configuring Kprobes | ||
145 | |||
146 | When configuring the kernel using make menuconfig/xconfig/oldconfig, | ||
147 | ensure that CONFIG_KPROBES is set to "y". Under "Kernel hacking", | ||
148 | look for "Kprobes". You may have to enable "Kernel debugging" | ||
149 | (CONFIG_DEBUG_KERNEL) before you can enable Kprobes. | ||
150 | |||
151 | You may also want to ensure that CONFIG_KALLSYMS and perhaps even | ||
152 | CONFIG_KALLSYMS_ALL are set to "y", since kallsyms_lookup_name() | ||
153 | is a handy, version-independent way to find a function's address. | ||
154 | |||
155 | If you need to insert a probe in the middle of a function, you may find | ||
156 | it useful to "Compile the kernel with debug info" (CONFIG_DEBUG_INFO), | ||
157 | so you can use "objdump -d -l vmlinux" to see the source-to-object | ||
158 | code mapping. | ||
159 | |||
160 | 4. API Reference | ||
161 | |||
162 | The Kprobes API includes a "register" function and an "unregister" | ||
163 | function for each type of probe. Here are terse, mini-man-page | ||
164 | specifications for these functions and the associated probe handlers | ||
165 | that you'll write. See the latter half of this document for examples. | ||
166 | |||
167 | 4.1 register_kprobe | ||
168 | |||
169 | #include <linux/kprobes.h> | ||
170 | int register_kprobe(struct kprobe *kp); | ||
171 | |||
172 | Sets a breakpoint at the address kp->addr. When the breakpoint is | ||
173 | hit, Kprobes calls kp->pre_handler. After the probed instruction | ||
174 | is single-stepped, Kprobe calls kp->post_handler. If a fault | ||
175 | occurs during execution of kp->pre_handler or kp->post_handler, | ||
176 | or during single-stepping of the probed instruction, Kprobes calls | ||
177 | kp->fault_handler. Any or all handlers can be NULL. | ||
178 | |||
179 | register_kprobe() returns 0 on success, or a negative errno otherwise. | ||
180 | |||
181 | User's pre-handler (kp->pre_handler): | ||
182 | #include <linux/kprobes.h> | ||
183 | #include <linux/ptrace.h> | ||
184 | int pre_handler(struct kprobe *p, struct pt_regs *regs); | ||
185 | |||
186 | Called with p pointing to the kprobe associated with the breakpoint, | ||
187 | and regs pointing to the struct containing the registers saved when | ||
188 | the breakpoint was hit. Return 0 here unless you're a Kprobes geek. | ||
189 | |||
190 | User's post-handler (kp->post_handler): | ||
191 | #include <linux/kprobes.h> | ||
192 | #include <linux/ptrace.h> | ||
193 | void post_handler(struct kprobe *p, struct pt_regs *regs, | ||
194 | unsigned long flags); | ||
195 | |||
196 | p and regs are as described for the pre_handler. flags always seems | ||
197 | to be zero. | ||
198 | |||
199 | User's fault-handler (kp->fault_handler): | ||
200 | #include <linux/kprobes.h> | ||
201 | #include <linux/ptrace.h> | ||
202 | int fault_handler(struct kprobe *p, struct pt_regs *regs, int trapnr); | ||
203 | |||
204 | p and regs are as described for the pre_handler. trapnr is the | ||
205 | architecture-specific trap number associated with the fault (e.g., | ||
206 | on i386, 13 for a general protection fault or 14 for a page fault). | ||
207 | Returns 1 if it successfully handled the exception. | ||
208 | |||
209 | 4.2 register_jprobe | ||
210 | |||
211 | #include <linux/kprobes.h> | ||
212 | int register_jprobe(struct jprobe *jp) | ||
213 | |||
214 | Sets a breakpoint at the address jp->kp.addr, which must be the address | ||
215 | of the first instruction of a function. When the breakpoint is hit, | ||
216 | Kprobes runs the handler whose address is jp->entry. | ||
217 | |||
218 | The handler should have the same arg list and return type as the probed | ||
219 | function; and just before it returns, it must call jprobe_return(). | ||
220 | (The handler never actually returns, since jprobe_return() returns | ||
221 | control to Kprobes.) If the probed function is declared asmlinkage, | ||
222 | fastcall, or anything else that affects how args are passed, the | ||
223 | handler's declaration must match. | ||
224 | |||
225 | register_jprobe() returns 0 on success, or a negative errno otherwise. | ||
226 | |||
227 | 4.3 register_kretprobe | ||
228 | |||
229 | #include <linux/kprobes.h> | ||
230 | int register_kretprobe(struct kretprobe *rp); | ||
231 | |||
232 | Establishes a return probe for the function whose address is | ||
233 | rp->kp.addr. When that function returns, Kprobes calls rp->handler. | ||
234 | You must set rp->maxactive appropriately before you call | ||
235 | register_kretprobe(); see "How Does a Return Probe Work?" for details. | ||
236 | |||
237 | register_kretprobe() returns 0 on success, or a negative errno | ||
238 | otherwise. | ||
239 | |||
240 | User's return-probe handler (rp->handler): | ||
241 | #include <linux/kprobes.h> | ||
242 | #include <linux/ptrace.h> | ||
243 | int kretprobe_handler(struct kretprobe_instance *ri, struct pt_regs *regs); | ||
244 | |||
245 | regs is as described for kprobe.pre_handler. ri points to the | ||
246 | kretprobe_instance object, of which the following fields may be | ||
247 | of interest: | ||
248 | - ret_addr: the return address | ||
249 | - rp: points to the corresponding kretprobe object | ||
250 | - task: points to the corresponding task struct | ||
251 | The handler's return value is currently ignored. | ||
252 | |||
253 | 4.4 unregister_*probe | ||
254 | |||
255 | #include <linux/kprobes.h> | ||
256 | void unregister_kprobe(struct kprobe *kp); | ||
257 | void unregister_jprobe(struct jprobe *jp); | ||
258 | void unregister_kretprobe(struct kretprobe *rp); | ||
259 | |||
260 | Removes the specified probe. The unregister function can be called | ||
261 | at any time after the probe has been registered. | ||
262 | |||
263 | 5. Kprobes Features and Limitations | ||
264 | |||
265 | As of Linux v2.6.12, Kprobes allows multiple probes at the same | ||
266 | address. Currently, however, there cannot be multiple jprobes on | ||
267 | the same function at the same time. | ||
268 | |||
269 | In general, you can install a probe anywhere in the kernel. | ||
270 | In particular, you can probe interrupt handlers. Known exceptions | ||
271 | are discussed in this section. | ||
272 | |||
273 | For obvious reasons, it's a bad idea to install a probe in | ||
274 | the code that implements Kprobes (mostly kernel/kprobes.c and | ||
275 | arch/*/kernel/kprobes.c). A patch in the v2.6.13 timeframe instructs | ||
276 | Kprobes to reject such requests. | ||
277 | |||
278 | If you install a probe in an inline-able function, Kprobes makes | ||
279 | no attempt to chase down all inline instances of the function and | ||
280 | install probes there. gcc may inline a function without being asked, | ||
281 | so keep this in mind if you're not seeing the probe hits you expect. | ||
282 | |||
283 | A probe handler can modify the environment of the probed function | ||
284 | -- e.g., by modifying kernel data structures, or by modifying the | ||
285 | contents of the pt_regs struct (which are restored to the registers | ||
286 | upon return from the breakpoint). So Kprobes can be used, for example, | ||
287 | to install a bug fix or to inject faults for testing. Kprobes, of | ||
288 | course, has no way to distinguish the deliberately injected faults | ||
289 | from the accidental ones. Don't drink and probe. | ||
290 | |||
291 | Kprobes makes no attempt to prevent probe handlers from stepping on | ||
292 | each other -- e.g., probing printk() and then calling printk() from a | ||
293 | probe handler. As of Linux v2.6.12, if a probe handler hits a probe, | ||
294 | that second probe's handlers won't be run in that instance. | ||
295 | |||
296 | In Linux v2.6.12 and previous versions, Kprobes' data structures are | ||
297 | protected by a single lock that is held during probe registration and | ||
298 | unregistration and while handlers are run. Thus, no two handlers | ||
299 | can run simultaneously. To improve scalability on SMP systems, | ||
300 | this restriction will probably be removed soon, in which case | ||
301 | multiple handlers (or multiple instances of the same handler) may | ||
302 | run concurrently on different CPUs. Code your handlers accordingly. | ||
303 | |||
304 | Kprobes does not use semaphores or allocate memory except during | ||
305 | registration and unregistration. | ||
306 | |||
307 | Probe handlers are run with preemption disabled. Depending on the | ||
308 | architecture, handlers may also run with interrupts disabled. In any | ||
309 | case, your handler should not yield the CPU (e.g., by attempting to | ||
310 | acquire a semaphore). | ||
311 | |||
312 | Since a return probe is implemented by replacing the return | ||
313 | address with the trampoline's address, stack backtraces and calls | ||
314 | to __builtin_return_address() will typically yield the trampoline's | ||
315 | address instead of the real return address for kretprobed functions. | ||
316 | (As far as we can tell, __builtin_return_address() is used only | ||
317 | for instrumentation and error reporting.) | ||
318 | |||
319 | If the number of times a function is called does not match the | ||
320 | number of times it returns, registering a return probe on that | ||
321 | function may produce undesirable results. We have the do_exit() | ||
322 | and do_execve() cases covered. do_fork() is not an issue. We're | ||
323 | unaware of other specific cases where this could be a problem. | ||
324 | |||
325 | 6. Probe Overhead | ||
326 | |||
327 | On a typical CPU in use in 2005, a kprobe hit takes 0.5 to 1.0 | ||
328 | microseconds to process. Specifically, a benchmark that hits the same | ||
329 | probepoint repeatedly, firing a simple handler each time, reports 1-2 | ||
330 | million hits per second, depending on the architecture. A jprobe or | ||
331 | return-probe hit typically takes 50-75% longer than a kprobe hit. | ||
332 | When you have a return probe set on a function, adding a kprobe at | ||
333 | the entry to that function adds essentially no overhead. | ||
334 | |||
335 | Here are sample overhead figures (in usec) for different architectures. | ||
336 | k = kprobe; j = jprobe; r = return probe; kr = kprobe + return probe | ||
337 | on same function; jr = jprobe + return probe on same function | ||
338 | |||
339 | i386: Intel Pentium M, 1495 MHz, 2957.31 bogomips | ||
340 | k = 0.57 usec; j = 1.00; r = 0.92; kr = 0.99; jr = 1.40 | ||
341 | |||
342 | x86_64: AMD Opteron 246, 1994 MHz, 3971.48 bogomips | ||
343 | k = 0.49 usec; j = 0.76; r = 0.80; kr = 0.82; jr = 1.07 | ||
344 | |||
345 | ppc64: POWER5 (gr), 1656 MHz (SMT disabled, 1 virtual CPU per physical CPU) | ||
346 | k = 0.77 usec; j = 1.31; r = 1.26; kr = 1.45; jr = 1.99 | ||
347 | |||
348 | 7. TODO | ||
349 | |||
350 | a. SystemTap (http://sourceware.org/systemtap): Work in progress | ||
351 | to provide a simplified programming interface for probe-based | ||
352 | instrumentation. | ||
353 | b. Improved SMP scalability: Currently, work is in progress to handle | ||
354 | multiple kprobes in parallel. | ||
355 | c. Kernel return probes for sparc64. | ||
356 | d. Support for other architectures. | ||
357 | e. User-space probes. | ||
358 | |||
359 | 8. Kprobes Example | ||
360 | |||
361 | Here's a sample kernel module showing the use of kprobes to dump a | ||
362 | stack trace and selected i386 registers when do_fork() is called. | ||
363 | ----- cut here ----- | ||
364 | /*kprobe_example.c*/ | ||
365 | #include <linux/kernel.h> | ||
366 | #include <linux/module.h> | ||
367 | #include <linux/kprobes.h> | ||
368 | #include <linux/kallsyms.h> | ||
369 | #include <linux/sched.h> | ||
370 | |||
371 | /*For each probe you need to allocate a kprobe structure*/ | ||
372 | static struct kprobe kp; | ||
373 | |||
374 | /*kprobe pre_handler: called just before the probed instruction is executed*/ | ||
375 | int handler_pre(struct kprobe *p, struct pt_regs *regs) | ||
376 | { | ||
377 | printk("pre_handler: p->addr=0x%p, eip=%lx, eflags=0x%lx\n", | ||
378 | p->addr, regs->eip, regs->eflags); | ||
379 | dump_stack(); | ||
380 | return 0; | ||
381 | } | ||
382 | |||
383 | /*kprobe post_handler: called after the probed instruction is executed*/ | ||
384 | void handler_post(struct kprobe *p, struct pt_regs *regs, unsigned long flags) | ||
385 | { | ||
386 | printk("post_handler: p->addr=0x%p, eflags=0x%lx\n", | ||
387 | p->addr, regs->eflags); | ||
388 | } | ||
389 | |||
390 | /* fault_handler: this is called if an exception is generated for any | ||
391 | * instruction within the pre- or post-handler, or when Kprobes | ||
392 | * single-steps the probed instruction. | ||
393 | */ | ||
394 | int handler_fault(struct kprobe *p, struct pt_regs *regs, int trapnr) | ||
395 | { | ||
396 | printk("fault_handler: p->addr=0x%p, trap #%dn", | ||
397 | p->addr, trapnr); | ||
398 | /* Return 0 because we don't handle the fault. */ | ||
399 | return 0; | ||
400 | } | ||
401 | |||
402 | int init_module(void) | ||
403 | { | ||
404 | int ret; | ||
405 | kp.pre_handler = handler_pre; | ||
406 | kp.post_handler = handler_post; | ||
407 | kp.fault_handler = handler_fault; | ||
408 | kp.addr = (kprobe_opcode_t*) kallsyms_lookup_name("do_fork"); | ||
409 | /* register the kprobe now */ | ||
410 | if (!kp.addr) { | ||
411 | printk("Couldn't find %s to plant kprobe\n", "do_fork"); | ||
412 | return -1; | ||
413 | } | ||
414 | if ((ret = register_kprobe(&kp) < 0)) { | ||
415 | printk("register_kprobe failed, returned %d\n", ret); | ||
416 | return -1; | ||
417 | } | ||
418 | printk("kprobe registered\n"); | ||
419 | return 0; | ||
420 | } | ||
421 | |||
422 | void cleanup_module(void) | ||
423 | { | ||
424 | unregister_kprobe(&kp); | ||
425 | printk("kprobe unregistered\n"); | ||
426 | } | ||
427 | |||
428 | MODULE_LICENSE("GPL"); | ||
429 | ----- cut here ----- | ||
430 | |||
431 | You can build the kernel module, kprobe-example.ko, using the following | ||
432 | Makefile: | ||
433 | ----- cut here ----- | ||
434 | obj-m := kprobe-example.o | ||
435 | KDIR := /lib/modules/$(shell uname -r)/build | ||
436 | PWD := $(shell pwd) | ||
437 | default: | ||
438 | $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules | ||
439 | clean: | ||
440 | rm -f *.mod.c *.ko *.o | ||
441 | ----- cut here ----- | ||
442 | |||
443 | $ make | ||
444 | $ su - | ||
445 | ... | ||
446 | # insmod kprobe-example.ko | ||
447 | |||
448 | You will see the trace data in /var/log/messages and on the console | ||
449 | whenever do_fork() is invoked to create a new process. | ||
450 | |||
451 | 9. Jprobes Example | ||
452 | |||
453 | Here's a sample kernel module showing the use of jprobes to dump | ||
454 | the arguments of do_fork(). | ||
455 | ----- cut here ----- | ||
456 | /*jprobe-example.c */ | ||
457 | #include <linux/kernel.h> | ||
458 | #include <linux/module.h> | ||
459 | #include <linux/fs.h> | ||
460 | #include <linux/uio.h> | ||
461 | #include <linux/kprobes.h> | ||
462 | #include <linux/kallsyms.h> | ||
463 | |||
464 | /* | ||
465 | * Jumper probe for do_fork. | ||
466 | * Mirror principle enables access to arguments of the probed routine | ||
467 | * from the probe handler. | ||
468 | */ | ||
469 | |||
470 | /* Proxy routine having the same arguments as actual do_fork() routine */ | ||
471 | long jdo_fork(unsigned long clone_flags, unsigned long stack_start, | ||
472 | struct pt_regs *regs, unsigned long stack_size, | ||
473 | int __user * parent_tidptr, int __user * child_tidptr) | ||
474 | { | ||
475 | printk("jprobe: clone_flags=0x%lx, stack_size=0x%lx, regs=0x%p\n", | ||
476 | clone_flags, stack_size, regs); | ||
477 | /* Always end with a call to jprobe_return(). */ | ||
478 | jprobe_return(); | ||
479 | /*NOTREACHED*/ | ||
480 | return 0; | ||
481 | } | ||
482 | |||
483 | static struct jprobe my_jprobe = { | ||
484 | .entry = (kprobe_opcode_t *) jdo_fork | ||
485 | }; | ||
486 | |||
487 | int init_module(void) | ||
488 | { | ||
489 | int ret; | ||
490 | my_jprobe.kp.addr = (kprobe_opcode_t *) kallsyms_lookup_name("do_fork"); | ||
491 | if (!my_jprobe.kp.addr) { | ||
492 | printk("Couldn't find %s to plant jprobe\n", "do_fork"); | ||
493 | return -1; | ||
494 | } | ||
495 | |||
496 | if ((ret = register_jprobe(&my_jprobe)) <0) { | ||
497 | printk("register_jprobe failed, returned %d\n", ret); | ||
498 | return -1; | ||
499 | } | ||
500 | printk("Planted jprobe at %p, handler addr %p\n", | ||
501 | my_jprobe.kp.addr, my_jprobe.entry); | ||
502 | return 0; | ||
503 | } | ||
504 | |||
505 | void cleanup_module(void) | ||
506 | { | ||
507 | unregister_jprobe(&my_jprobe); | ||
508 | printk("jprobe unregistered\n"); | ||
509 | } | ||
510 | |||
511 | MODULE_LICENSE("GPL"); | ||
512 | ----- cut here ----- | ||
513 | |||
514 | Build and insert the kernel module as shown in the above kprobe | ||
515 | example. You will see the trace data in /var/log/messages and on | ||
516 | the console whenever do_fork() is invoked to create a new process. | ||
517 | (Some messages may be suppressed if syslogd is configured to | ||
518 | eliminate duplicate messages.) | ||
519 | |||
520 | 10. Kretprobes Example | ||
521 | |||
522 | Here's a sample kernel module showing the use of return probes to | ||
523 | report failed calls to sys_open(). | ||
524 | ----- cut here ----- | ||
525 | /*kretprobe-example.c*/ | ||
526 | #include <linux/kernel.h> | ||
527 | #include <linux/module.h> | ||
528 | #include <linux/kprobes.h> | ||
529 | #include <linux/kallsyms.h> | ||
530 | |||
531 | static const char *probed_func = "sys_open"; | ||
532 | |||
533 | /* Return-probe handler: If the probed function fails, log the return value. */ | ||
534 | static int ret_handler(struct kretprobe_instance *ri, struct pt_regs *regs) | ||
535 | { | ||
536 | // Substitute the appropriate register name for your architecture -- | ||
537 | // e.g., regs->rax for x86_64, regs->gpr[3] for ppc64. | ||
538 | int retval = (int) regs->eax; | ||
539 | if (retval < 0) { | ||
540 | printk("%s returns %d\n", probed_func, retval); | ||
541 | } | ||
542 | return 0; | ||
543 | } | ||
544 | |||
545 | static struct kretprobe my_kretprobe = { | ||
546 | .handler = ret_handler, | ||
547 | /* Probe up to 20 instances concurrently. */ | ||
548 | .maxactive = 20 | ||
549 | }; | ||
550 | |||
551 | int init_module(void) | ||
552 | { | ||
553 | int ret; | ||
554 | my_kretprobe.kp.addr = | ||
555 | (kprobe_opcode_t *) kallsyms_lookup_name(probed_func); | ||
556 | if (!my_kretprobe.kp.addr) { | ||
557 | printk("Couldn't find %s to plant return probe\n", probed_func); | ||
558 | return -1; | ||
559 | } | ||
560 | if ((ret = register_kretprobe(&my_kretprobe)) < 0) { | ||
561 | printk("register_kretprobe failed, returned %d\n", ret); | ||
562 | return -1; | ||
563 | } | ||
564 | printk("Planted return probe at %p\n", my_kretprobe.kp.addr); | ||
565 | return 0; | ||
566 | } | ||
567 | |||
568 | void cleanup_module(void) | ||
569 | { | ||
570 | unregister_kretprobe(&my_kretprobe); | ||
571 | printk("kretprobe unregistered\n"); | ||
572 | /* nmissed > 0 suggests that maxactive was set too low. */ | ||
573 | printk("Missed probing %d instances of %s\n", | ||
574 | my_kretprobe.nmissed, probed_func); | ||
575 | } | ||
576 | |||
577 | MODULE_LICENSE("GPL"); | ||
578 | ----- cut here ----- | ||
579 | |||
580 | Build and insert the kernel module as shown in the above kprobe | ||
581 | example. You will see the trace data in /var/log/messages and on the | ||
582 | console whenever sys_open() returns a negative value. (Some messages | ||
583 | may be suppressed if syslogd is configured to eliminate duplicate | ||
584 | messages.) | ||
585 | |||
586 | For additional information on Kprobes, refer to the following URLs: | ||
587 | http://www-106.ibm.com/developerworks/library/l-kprobes.html?ca=dgr-lnxw42Kprobe | ||
588 | http://www.redhat.com/magazine/005mar05/features/kprobes/ | ||
diff --git a/Documentation/networking/cxgb.txt b/Documentation/networking/cxgb.txt new file mode 100644 index 000000000000..76324638626b --- /dev/null +++ b/Documentation/networking/cxgb.txt | |||
@@ -0,0 +1,352 @@ | |||
1 | Chelsio N210 10Gb Ethernet Network Controller | ||
2 | |||
3 | Driver Release Notes for Linux | ||
4 | |||
5 | Version 2.1.1 | ||
6 | |||
7 | June 20, 2005 | ||
8 | |||
9 | CONTENTS | ||
10 | ======== | ||
11 | INTRODUCTION | ||
12 | FEATURES | ||
13 | PERFORMANCE | ||
14 | DRIVER MESSAGES | ||
15 | KNOWN ISSUES | ||
16 | SUPPORT | ||
17 | |||
18 | |||
19 | INTRODUCTION | ||
20 | ============ | ||
21 | |||
22 | This document describes the Linux driver for Chelsio 10Gb Ethernet Network | ||
23 | Controller. This driver supports the Chelsio N210 NIC and is backward | ||
24 | compatible with the Chelsio N110 model 10Gb NICs. | ||
25 | |||
26 | |||
27 | FEATURES | ||
28 | ======== | ||
29 | |||
30 | Adaptive Interrupts (adaptive-rx) | ||
31 | --------------------------------- | ||
32 | |||
33 | This feature provides an adaptive algorithm that adjusts the interrupt | ||
34 | coalescing parameters, allowing the driver to dynamically adapt the latency | ||
35 | settings to achieve the highest performance during various types of network | ||
36 | load. | ||
37 | |||
38 | The interface used to control this feature is ethtool. Please see the | ||
39 | ethtool manpage for additional usage information. | ||
40 | |||
41 | By default, adaptive-rx is disabled. | ||
42 | To enable adaptive-rx: | ||
43 | |||
44 | ethtool -C <interface> adaptive-rx on | ||
45 | |||
46 | To disable adaptive-rx, use ethtool: | ||
47 | |||
48 | ethtool -C <interface> adaptive-rx off | ||
49 | |||
50 | After disabling adaptive-rx, the timer latency value will be set to 50us. | ||
51 | You may set the timer latency after disabling adaptive-rx: | ||
52 | |||
53 | ethtool -C <interface> rx-usecs <microseconds> | ||
54 | |||
55 | An example to set the timer latency value to 100us on eth0: | ||
56 | |||
57 | ethtool -C eth0 rx-usecs 100 | ||
58 | |||
59 | You may also provide a timer latency value while disabling adpative-rx: | ||
60 | |||
61 | ethtool -C <interface> adaptive-rx off rx-usecs <microseconds> | ||
62 | |||
63 | If adaptive-rx is disabled and a timer latency value is specified, the timer | ||
64 | will be set to the specified value until changed by the user or until | ||
65 | adaptive-rx is enabled. | ||
66 | |||
67 | To view the status of the adaptive-rx and timer latency values: | ||
68 | |||
69 | ethtool -c <interface> | ||
70 | |||
71 | |||
72 | TCP Segmentation Offloading (TSO) Support | ||
73 | ----------------------------------------- | ||
74 | |||
75 | This feature, also known as "large send", enables a system's protocol stack | ||
76 | to offload portions of outbound TCP processing to a network interface card | ||
77 | thereby reducing system CPU utilization and enhancing performance. | ||
78 | |||
79 | The interface used to control this feature is ethtool version 1.8 or higher. | ||
80 | Please see the ethtool manpage for additional usage information. | ||
81 | |||
82 | By default, TSO is enabled. | ||
83 | To disable TSO: | ||
84 | |||
85 | ethtool -K <interface> tso off | ||
86 | |||
87 | To enable TSO: | ||
88 | |||
89 | ethtool -K <interface> tso on | ||
90 | |||
91 | To view the status of TSO: | ||
92 | |||
93 | ethtool -k <interface> | ||
94 | |||
95 | |||
96 | PERFORMANCE | ||
97 | =========== | ||
98 | |||
99 | The following information is provided as an example of how to change system | ||
100 | parameters for "performance tuning" an what value to use. You may or may not | ||
101 | want to change these system parameters, depending on your server/workstation | ||
102 | application. Doing so is not warranted in any way by Chelsio Communications, | ||
103 | and is done at "YOUR OWN RISK". Chelsio will not be held responsible for loss | ||
104 | of data or damage to equipment. | ||
105 | |||
106 | Your distribution may have a different way of doing things, or you may prefer | ||
107 | a different method. These commands are shown only to provide an example of | ||
108 | what to do and are by no means definitive. | ||
109 | |||
110 | Making any of the following system changes will only last until you reboot | ||
111 | your system. You may want to write a script that runs at boot-up which | ||
112 | includes the optimal settings for your system. | ||
113 | |||
114 | Setting PCI Latency Timer: | ||
115 | setpci -d 1425:* 0x0c.l=0x0000F800 | ||
116 | |||
117 | Disabling TCP timestamp: | ||
118 | sysctl -w net.ipv4.tcp_timestamps=0 | ||
119 | |||
120 | Disabling SACK: | ||
121 | sysctl -w net.ipv4.tcp_sack=0 | ||
122 | |||
123 | Setting large number of incoming connection requests: | ||
124 | sysctl -w net.ipv4.tcp_max_syn_backlog=3000 | ||
125 | |||
126 | Setting maximum receive socket buffer size: | ||
127 | sysctl -w net.core.rmem_max=1024000 | ||
128 | |||
129 | Setting maximum send socket buffer size: | ||
130 | sysctl -w net.core.wmem_max=1024000 | ||
131 | |||
132 | Set smp_affinity (on a multiprocessor system) to a single CPU: | ||
133 | echo 1 > /proc/irq/<interrupt_number>/smp_affinity | ||
134 | |||
135 | Setting default receive socket buffer size: | ||
136 | sysctl -w net.core.rmem_default=524287 | ||
137 | |||
138 | Setting default send socket buffer size: | ||
139 | sysctl -w net.core.wmem_default=524287 | ||
140 | |||
141 | Setting maximum option memory buffers: | ||
142 | sysctl -w net.core.optmem_max=524287 | ||
143 | |||
144 | Setting maximum backlog (# of unprocessed packets before kernel drops): | ||
145 | sysctl -w net.core.netdev_max_backlog=300000 | ||
146 | |||
147 | Setting TCP read buffers (min/default/max): | ||
148 | sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000" | ||
149 | |||
150 | Setting TCP write buffers (min/pressure/max): | ||
151 | sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000" | ||
152 | |||
153 | Setting TCP buffer space (min/pressure/max): | ||
154 | sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000" | ||
155 | |||
156 | TCP window size for single connections: | ||
157 | The receive buffer (RX_WINDOW) size must be at least as large as the | ||
158 | Bandwidth-Delay Product of the communication link between the sender and | ||
159 | receiver. Due to the variations of RTT, you may want to increase the buffer | ||
160 | size up to 2 times the Bandwidth-Delay Product. Reference page 289 of | ||
161 | "TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens. | ||
162 | At 10Gb speeds, use the following formula: | ||
163 | RX_WINDOW >= 1.25MBytes * RTT(in milliseconds) | ||
164 | Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000 | ||
165 | RX_WINDOW sizes of 256KB - 512KB should be sufficient. | ||
166 | Setting the min, max, and default receive buffer (RX_WINDOW) size: | ||
167 | sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>" | ||
168 | |||
169 | TCP window size for multiple connections: | ||
170 | The receive buffer (RX_WINDOW) size may be calculated the same as single | ||
171 | connections, but should be divided by the number of connections. The | ||
172 | smaller window prevents congestion and facilitates better pacing, | ||
173 | especially if/when MAC level flow control does not work well or when it is | ||
174 | not supported on the machine. Experimentation may be necessary to attain | ||
175 | the correct value. This method is provided as a starting point fot the | ||
176 | correct receive buffer size. | ||
177 | Setting the min, max, and default receive buffer (RX_WINDOW) size is | ||
178 | performed in the same manner as single connection. | ||
179 | |||
180 | |||
181 | DRIVER MESSAGES | ||
182 | =============== | ||
183 | |||
184 | The following messages are the most common messages logged by syslog. These | ||
185 | may be found in /var/log/messages. | ||
186 | |||
187 | Driver up: | ||
188 | Chelsio Network Driver - version 2.1.1 | ||
189 | |||
190 | NIC detected: | ||
191 | eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit | ||
192 | |||
193 | Link up: | ||
194 | eth#: link is up at 10 Gbps, full duplex | ||
195 | |||
196 | Link down: | ||
197 | eth#: link is down | ||
198 | |||
199 | |||
200 | KNOWN ISSUES | ||
201 | ============ | ||
202 | |||
203 | These issues have been identified during testing. The following information | ||
204 | is provided as a workaround to the problem. In some cases, this problem is | ||
205 | inherent to Linux or to a particular Linux Distribution and/or hardware | ||
206 | platform. | ||
207 | |||
208 | 1. Large number of TCP retransmits on a multiprocessor (SMP) system. | ||
209 | |||
210 | On a system with multiple CPUs, the interrupt (IRQ) for the network | ||
211 | controller may be bound to more than one CPU. This will cause TCP | ||
212 | retransmits if the packet data were to be split across different CPUs | ||
213 | and re-assembled in a different order than expected. | ||
214 | |||
215 | To eliminate the TCP retransmits, set smp_affinity on the particular | ||
216 | interrupt to a single CPU. You can locate the interrupt (IRQ) used on | ||
217 | the N110/N210 by using ifconfig: | ||
218 | ifconfig <dev_name> | grep Interrupt | ||
219 | Set the smp_affinity to a single CPU: | ||
220 | echo 1 > /proc/irq/<interrupt_number>/smp_affinity | ||
221 | |||
222 | It is highly suggested that you do not run the irqbalance daemon on your | ||
223 | system, as this will change any smp_affinity setting you have applied. | ||
224 | The irqbalance daemon runs on a 10 second interval and binds interrupts | ||
225 | to the least loaded CPU determined by the daemon. To disable this daemon: | ||
226 | chkconfig --level 2345 irqbalance off | ||
227 | |||
228 | By default, some Linux distributions enable the kernel feature, | ||
229 | irqbalance, which performs the same function as the daemon. To disable | ||
230 | this feature, add the following line to your bootloader: | ||
231 | noirqbalance | ||
232 | |||
233 | Example using the Grub bootloader: | ||
234 | title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp) | ||
235 | root (hd0,0) | ||
236 | kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance | ||
237 | initrd /initrd-2.4.21-27.ELsmp.img | ||
238 | |||
239 | 2. After running insmod, the driver is loaded and the incorrect network | ||
240 | interface is brought up without running ifup. | ||
241 | |||
242 | When using 2.4.x kernels, including RHEL kernels, the Linux kernel | ||
243 | invokes a script named "hotplug". This script is primarily used to | ||
244 | automatically bring up USB devices when they are plugged in, however, | ||
245 | the script also attempts to automatically bring up a network interface | ||
246 | after loading the kernel module. The hotplug script does this by scanning | ||
247 | the ifcfg-eth# config files in /etc/sysconfig/network-scripts, looking | ||
248 | for HWADDR=<mac_address>. | ||
249 | |||
250 | If the hotplug script does not find the HWADDRR within any of the | ||
251 | ifcfg-eth# files, it will bring up the device with the next available | ||
252 | interface name. If this interface is already configured for a different | ||
253 | network card, your new interface will have incorrect IP address and | ||
254 | network settings. | ||
255 | |||
256 | To solve this issue, you can add the HWADDR=<mac_address> key to the | ||
257 | interface config file of your network controller. | ||
258 | |||
259 | To disable this "hotplug" feature, you may add the driver (module name) | ||
260 | to the "blacklist" file located in /etc/hotplug. It has been noted that | ||
261 | this does not work for network devices because the net.agent script | ||
262 | does not use the blacklist file. Simply remove, or rename, the net.agent | ||
263 | script located in /etc/hotplug to disable this feature. | ||
264 | |||
265 | 3. Transport Protocol (TP) hangs when running heavy multi-connection traffic | ||
266 | on an AMD Opteron system with HyperTransport PCI-X Tunnel chipset. | ||
267 | |||
268 | If your AMD Opteron system uses the AMD-8131 HyperTransport PCI-X Tunnel | ||
269 | chipset, you may experience the "133-Mhz Mode Split Completion Data | ||
270 | Corruption" bug identified by AMD while using a 133Mhz PCI-X card on the | ||
271 | bus PCI-X bus. | ||
272 | |||
273 | AMD states, "Under highly specific conditions, the AMD-8131 PCI-X Tunnel | ||
274 | can provide stale data via split completion cycles to a PCI-X card that | ||
275 | is operating at 133 Mhz", causing data corruption. | ||
276 | |||
277 | AMD's provides three workarounds for this problem, however, Chelsio | ||
278 | recommends the first option for best performance with this bug: | ||
279 | |||
280 | For 133Mhz secondary bus operation, limit the transaction length and | ||
281 | the number of outstanding transactions, via BIOS configuration | ||
282 | programming of the PCI-X card, to the following: | ||
283 | |||
284 | Data Length (bytes): 1k | ||
285 | Total allowed outstanding transactions: 2 | ||
286 | |||
287 | Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004, | ||
288 | section 56, "133-MHz Mode Split Completion Data Corruption" for more | ||
289 | details with this bug and workarounds suggested by AMD. | ||
290 | |||
291 | It may be possible to work outside AMD's recommended PCI-X settings, try | ||
292 | increasing the Data Length to 2k bytes for increased performance. If you | ||
293 | have issues with these settings, please revert to the "safe" settings | ||
294 | and duplicate the problem before submitting a bug or asking for support. | ||
295 | |||
296 | NOTE: The default setting on most systems is 8 outstanding transactions | ||
297 | and 2k bytes data length. | ||
298 | |||
299 | 4. On multiprocessor systems, it has been noted that an application which | ||
300 | is handling 10Gb networking can switch between CPUs causing degraded | ||
301 | and/or unstable performance. | ||
302 | |||
303 | If running on an SMP system and taking performance measurements, it | ||
304 | is suggested you either run the latest netperf-2.4.0+ or use a binding | ||
305 | tool such as Tim Hockin's procstate utilities (runon) | ||
306 | <http://www.hockin.org/~thockin/procstate/>. | ||
307 | |||
308 | Binding netserver and netperf (or other applications) to particular | ||
309 | CPUs will have a significant difference in performance measurements. | ||
310 | You may need to experiment which CPU to bind the application to in | ||
311 | order to achieve the best performance for your system. | ||
312 | |||
313 | If you are developing an application designed for 10Gb networking, | ||
314 | please keep in mind you may want to look at kernel functions | ||
315 | sched_setaffinity & sched_getaffinity to bind your application. | ||
316 | |||
317 | If you are just running user-space applications such as ftp, telnet, | ||
318 | etc., you may want to try the runon tool provided by Tim Hockin's | ||
319 | procstate utility. You could also try binding the interface to a | ||
320 | particular CPU: runon 0 ifup eth0 | ||
321 | |||
322 | |||
323 | SUPPORT | ||
324 | ======= | ||
325 | |||
326 | If you have problems with the software or hardware, please contact our | ||
327 | customer support team via email at support@chelsio.com or check our website | ||
328 | at http://www.chelsio.com | ||
329 | |||
330 | =============================================================================== | ||
331 | |||
332 | Chelsio Communications | ||
333 | 370 San Aleso Ave. | ||
334 | Suite 100 | ||
335 | Sunnyvale, CA 94085 | ||
336 | http://www.chelsio.com | ||
337 | |||
338 | This program is free software; you can redistribute it and/or modify | ||
339 | it under the terms of the GNU General Public License, version 2, as | ||
340 | published by the Free Software Foundation. | ||
341 | |||
342 | You should have received a copy of the GNU General Public License along | ||
343 | with this program; if not, write to the Free Software Foundation, Inc., | ||
344 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
345 | |||
346 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | ||
347 | WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | ||
348 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
349 | |||
350 | Copyright (c) 2003-2005 Chelsio Communications. All rights reserved. | ||
351 | |||
352 | =============================================================================== | ||
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt new file mode 100644 index 000000000000..29ccae409031 --- /dev/null +++ b/Documentation/networking/phy.txt | |||
@@ -0,0 +1,288 @@ | |||
1 | |||
2 | ------- | ||
3 | PHY Abstraction Layer | ||
4 | (Updated 2005-07-21) | ||
5 | |||
6 | Purpose | ||
7 | |||
8 | Most network devices consist of set of registers which provide an interface | ||
9 | to a MAC layer, which communicates with the physical connection through a | ||
10 | PHY. The PHY concerns itself with negotiating link parameters with the link | ||
11 | partner on the other side of the network connection (typically, an ethernet | ||
12 | cable), and provides a register interface to allow drivers to determine what | ||
13 | settings were chosen, and to configure what settings are allowed. | ||
14 | |||
15 | While these devices are distinct from the network devices, and conform to a | ||
16 | standard layout for the registers, it has been common practice to integrate | ||
17 | the PHY management code with the network driver. This has resulted in large | ||
18 | amounts of redundant code. Also, on embedded systems with multiple (and | ||
19 | sometimes quite different) ethernet controllers connected to the same | ||
20 | management bus, it is difficult to ensure safe use of the bus. | ||
21 | |||
22 | Since the PHYs are devices, and the management busses through which they are | ||
23 | accessed are, in fact, busses, the PHY Abstraction Layer treats them as such. | ||
24 | In doing so, it has these goals: | ||
25 | |||
26 | 1) Increase code-reuse | ||
27 | 2) Increase overall code-maintainability | ||
28 | 3) Speed development time for new network drivers, and for new systems | ||
29 | |||
30 | Basically, this layer is meant to provide an interface to PHY devices which | ||
31 | allows network driver writers to write as little code as possible, while | ||
32 | still providing a full feature set. | ||
33 | |||
34 | The MDIO bus | ||
35 | |||
36 | Most network devices are connected to a PHY by means of a management bus. | ||
37 | Different devices use different busses (though some share common interfaces). | ||
38 | In order to take advantage of the PAL, each bus interface needs to be | ||
39 | registered as a distinct device. | ||
40 | |||
41 | 1) read and write functions must be implemented. Their prototypes are: | ||
42 | |||
43 | int write(struct mii_bus *bus, int mii_id, int regnum, u16 value); | ||
44 | int read(struct mii_bus *bus, int mii_id, int regnum); | ||
45 | |||
46 | mii_id is the address on the bus for the PHY, and regnum is the register | ||
47 | number. These functions are guaranteed not to be called from interrupt | ||
48 | time, so it is safe for them to block, waiting for an interrupt to signal | ||
49 | the operation is complete | ||
50 | |||
51 | 2) A reset function is necessary. This is used to return the bus to an | ||
52 | initialized state. | ||
53 | |||
54 | 3) A probe function is needed. This function should set up anything the bus | ||
55 | driver needs, setup the mii_bus structure, and register with the PAL using | ||
56 | mdiobus_register. Similarly, there's a remove function to undo all of | ||
57 | that (use mdiobus_unregister). | ||
58 | |||
59 | 4) Like any driver, the device_driver structure must be configured, and init | ||
60 | exit functions are used to register the driver. | ||
61 | |||
62 | 5) The bus must also be declared somewhere as a device, and registered. | ||
63 | |||
64 | As an example for how one driver implemented an mdio bus driver, see | ||
65 | drivers/net/gianfar_mii.c and arch/ppc/syslib/mpc85xx_devices.c | ||
66 | |||
67 | Connecting to a PHY | ||
68 | |||
69 | Sometime during startup, the network driver needs to establish a connection | ||
70 | between the PHY device, and the network device. At this time, the PHY's bus | ||
71 | and drivers need to all have been loaded, so it is ready for the connection. | ||
72 | At this point, there are several ways to connect to the PHY: | ||
73 | |||
74 | 1) The PAL handles everything, and only calls the network driver when | ||
75 | the link state changes, so it can react. | ||
76 | |||
77 | 2) The PAL handles everything except interrupts (usually because the | ||
78 | controller has the interrupt registers). | ||
79 | |||
80 | 3) The PAL handles everything, but checks in with the driver every second, | ||
81 | allowing the network driver to react first to any changes before the PAL | ||
82 | does. | ||
83 | |||
84 | 4) The PAL serves only as a library of functions, with the network device | ||
85 | manually calling functions to update status, and configure the PHY | ||
86 | |||
87 | |||
88 | Letting the PHY Abstraction Layer do Everything | ||
89 | |||
90 | If you choose option 1 (The hope is that every driver can, but to still be | ||
91 | useful to drivers that can't), connecting to the PHY is simple: | ||
92 | |||
93 | First, you need a function to react to changes in the link state. This | ||
94 | function follows this protocol: | ||
95 | |||
96 | static void adjust_link(struct net_device *dev); | ||
97 | |||
98 | Next, you need to know the device name of the PHY connected to this device. | ||
99 | The name will look something like, "phy0:0", where the first number is the | ||
100 | bus id, and the second is the PHY's address on that bus. | ||
101 | |||
102 | Now, to connect, just call this function: | ||
103 | |||
104 | phydev = phy_connect(dev, phy_name, &adjust_link, flags); | ||
105 | |||
106 | phydev is a pointer to the phy_device structure which represents the PHY. If | ||
107 | phy_connect is successful, it will return the pointer. dev, here, is the | ||
108 | pointer to your net_device. Once done, this function will have started the | ||
109 | PHY's software state machine, and registered for the PHY's interrupt, if it | ||
110 | has one. The phydev structure will be populated with information about the | ||
111 | current state, though the PHY will not yet be truly operational at this | ||
112 | point. | ||
113 | |||
114 | flags is a u32 which can optionally contain phy-specific flags. | ||
115 | This is useful if the system has put hardware restrictions on | ||
116 | the PHY/controller, of which the PHY needs to be aware. | ||
117 | |||
118 | Now just make sure that phydev->supported and phydev->advertising have any | ||
119 | values pruned from them which don't make sense for your controller (a 10/100 | ||
120 | controller may be connected to a gigabit capable PHY, so you would need to | ||
121 | mask off SUPPORTED_1000baseT*). See include/linux/ethtool.h for definitions | ||
122 | for these bitfields. Note that you should not SET any bits, or the PHY may | ||
123 | get put into an unsupported state. | ||
124 | |||
125 | Lastly, once the controller is ready to handle network traffic, you call | ||
126 | phy_start(phydev). This tells the PAL that you are ready, and configures the | ||
127 | PHY to connect to the network. If you want to handle your own interrupts, | ||
128 | just set phydev->irq to PHY_IGNORE_INTERRUPT before you call phy_start. | ||
129 | Similarly, if you don't want to use interrupts, set phydev->irq to PHY_POLL. | ||
130 | |||
131 | When you want to disconnect from the network (even if just briefly), you call | ||
132 | phy_stop(phydev). | ||
133 | |||
134 | Keeping Close Tabs on the PAL | ||
135 | |||
136 | It is possible that the PAL's built-in state machine needs a little help to | ||
137 | keep your network device and the PHY properly in sync. If so, you can | ||
138 | register a helper function when connecting to the PHY, which will be called | ||
139 | every second before the state machine reacts to any changes. To do this, you | ||
140 | need to manually call phy_attach() and phy_prepare_link(), and then call | ||
141 | phy_start_machine() with the second argument set to point to your special | ||
142 | handler. | ||
143 | |||
144 | Currently there are no examples of how to use this functionality, and testing | ||
145 | on it has been limited because the author does not have any drivers which use | ||
146 | it (they all use option 1). So Caveat Emptor. | ||
147 | |||
148 | Doing it all yourself | ||
149 | |||
150 | There's a remote chance that the PAL's built-in state machine cannot track | ||
151 | the complex interactions between the PHY and your network device. If this is | ||
152 | so, you can simply call phy_attach(), and not call phy_start_machine or | ||
153 | phy_prepare_link(). This will mean that phydev->state is entirely yours to | ||
154 | handle (phy_start and phy_stop toggle between some of the states, so you | ||
155 | might need to avoid them). | ||
156 | |||
157 | An effort has been made to make sure that useful functionality can be | ||
158 | accessed without the state-machine running, and most of these functions are | ||
159 | descended from functions which did not interact with a complex state-machine. | ||
160 | However, again, no effort has been made so far to test running without the | ||
161 | state machine, so tryer beware. | ||
162 | |||
163 | Here is a brief rundown of the functions: | ||
164 | |||
165 | int phy_read(struct phy_device *phydev, u16 regnum); | ||
166 | int phy_write(struct phy_device *phydev, u16 regnum, u16 val); | ||
167 | |||
168 | Simple read/write primitives. They invoke the bus's read/write function | ||
169 | pointers. | ||
170 | |||
171 | void phy_print_status(struct phy_device *phydev); | ||
172 | |||
173 | A convenience function to print out the PHY status neatly. | ||
174 | |||
175 | int phy_clear_interrupt(struct phy_device *phydev); | ||
176 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | ||
177 | |||
178 | Clear the PHY's interrupt, and configure which ones are allowed, | ||
179 | respectively. Currently only supports all on, or all off. | ||
180 | |||
181 | int phy_enable_interrupts(struct phy_device *phydev); | ||
182 | int phy_disable_interrupts(struct phy_device *phydev); | ||
183 | |||
184 | Functions which enable/disable PHY interrupts, clearing them | ||
185 | before and after, respectively. | ||
186 | |||
187 | int phy_start_interrupts(struct phy_device *phydev); | ||
188 | int phy_stop_interrupts(struct phy_device *phydev); | ||
189 | |||
190 | Requests the IRQ for the PHY interrupts, then enables them for | ||
191 | start, or disables then frees them for stop. | ||
192 | |||
193 | struct phy_device * phy_attach(struct net_device *dev, const char *phy_id, | ||
194 | u32 flags); | ||
195 | |||
196 | Attaches a network device to a particular PHY, binding the PHY to a generic | ||
197 | driver if none was found during bus initialization. Passes in | ||
198 | any phy-specific flags as needed. | ||
199 | |||
200 | int phy_start_aneg(struct phy_device *phydev); | ||
201 | |||
202 | Using variables inside the phydev structure, either configures advertising | ||
203 | and resets autonegotiation, or disables autonegotiation, and configures | ||
204 | forced settings. | ||
205 | |||
206 | static inline int phy_read_status(struct phy_device *phydev); | ||
207 | |||
208 | Fills the phydev structure with up-to-date information about the current | ||
209 | settings in the PHY. | ||
210 | |||
211 | void phy_sanitize_settings(struct phy_device *phydev) | ||
212 | |||
213 | Resolves differences between currently desired settings, and | ||
214 | supported settings for the given PHY device. Does not make | ||
215 | the changes in the hardware, though. | ||
216 | |||
217 | int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); | ||
218 | int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd); | ||
219 | |||
220 | Ethtool convenience functions. | ||
221 | |||
222 | int phy_mii_ioctl(struct phy_device *phydev, | ||
223 | struct mii_ioctl_data *mii_data, int cmd); | ||
224 | |||
225 | The MII ioctl. Note that this function will completely screw up the state | ||
226 | machine if you write registers like BMCR, BMSR, ADVERTISE, etc. Best to | ||
227 | use this only to write registers which are not standard, and don't set off | ||
228 | a renegotiation. | ||
229 | |||
230 | |||
231 | PHY Device Drivers | ||
232 | |||
233 | With the PHY Abstraction Layer, adding support for new PHYs is | ||
234 | quite easy. In some cases, no work is required at all! However, | ||
235 | many PHYs require a little hand-holding to get up-and-running. | ||
236 | |||
237 | Generic PHY driver | ||
238 | |||
239 | If the desired PHY doesn't have any errata, quirks, or special | ||
240 | features you want to support, then it may be best to not add | ||
241 | support, and let the PHY Abstraction Layer's Generic PHY Driver | ||
242 | do all of the work. | ||
243 | |||
244 | Writing a PHY driver | ||
245 | |||
246 | If you do need to write a PHY driver, the first thing to do is | ||
247 | make sure it can be matched with an appropriate PHY device. | ||
248 | This is done during bus initialization by reading the device's | ||
249 | UID (stored in registers 2 and 3), then comparing it to each | ||
250 | driver's phy_id field by ANDing it with each driver's | ||
251 | phy_id_mask field. Also, it needs a name. Here's an example: | ||
252 | |||
253 | static struct phy_driver dm9161_driver = { | ||
254 | .phy_id = 0x0181b880, | ||
255 | .name = "Davicom DM9161E", | ||
256 | .phy_id_mask = 0x0ffffff0, | ||
257 | ... | ||
258 | } | ||
259 | |||
260 | Next, you need to specify what features (speed, duplex, autoneg, | ||
261 | etc) your PHY device and driver support. Most PHYs support | ||
262 | PHY_BASIC_FEATURES, but you can look in include/mii.h for other | ||
263 | features. | ||
264 | |||
265 | Each driver consists of a number of function pointers: | ||
266 | |||
267 | config_init: configures PHY into a sane state after a reset. | ||
268 | For instance, a Davicom PHY requires descrambling disabled. | ||
269 | probe: Does any setup needed by the driver | ||
270 | suspend/resume: power management | ||
271 | config_aneg: Changes the speed/duplex/negotiation settings | ||
272 | read_status: Reads the current speed/duplex/negotiation settings | ||
273 | ack_interrupt: Clear a pending interrupt | ||
274 | config_intr: Enable or disable interrupts | ||
275 | remove: Does any driver take-down | ||
276 | |||
277 | Of these, only config_aneg and read_status are required to be | ||
278 | assigned by the driver code. The rest are optional. Also, it is | ||
279 | preferred to use the generic phy driver's versions of these two | ||
280 | functions if at all possible: genphy_read_status and | ||
281 | genphy_config_aneg. If this is not possible, it is likely that | ||
282 | you only need to perform some actions before and after invoking | ||
283 | these functions, and so your functions will wrap the generic | ||
284 | ones. | ||
285 | |||
286 | Feel free to look at the Marvell, Cicada, and Davicom drivers in | ||
287 | drivers/net/phy/ for examples (the lxt and qsemi drivers have | ||
288 | not been tested as of this writing) | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 62b1dc5d97e2..76d28d033657 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -266,20 +266,6 @@ port an old driver to the new PCI interface. They are no longer present | |||
266 | in the kernel as they aren't compatible with hotplug or PCI domains or | 266 | in the kernel as they aren't compatible with hotplug or PCI domains or |
267 | having sane locking. | 267 | having sane locking. |
268 | 268 | ||
269 | pcibios_present() and Since ages, you don't need to test presence | ||
270 | pci_present() of PCI subsystem when trying to talk to it. | ||
271 | If it's not there, the list of PCI devices | ||
272 | is empty and all functions for searching for | ||
273 | devices just return NULL. | ||
274 | pcibios_(read|write)_* Superseded by their pci_(read|write)_* | ||
275 | counterparts. | ||
276 | pcibios_find_* Superseded by their pci_get_* counterparts. | ||
277 | pci_for_each_dev() Superseded by pci_get_device() | ||
278 | pci_for_each_dev_reverse() Superseded by pci_find_device_reverse() | ||
279 | pci_for_each_bus() Superseded by pci_find_next_bus() | ||
280 | pci_find_device() Superseded by pci_get_device() | 269 | pci_find_device() Superseded by pci_get_device() |
281 | pci_find_subsys() Superseded by pci_get_subsys() | 270 | pci_find_subsys() Superseded by pci_get_subsys() |
282 | pci_find_slot() Superseded by pci_get_slot() | 271 | pci_find_slot() Superseded by pci_get_slot() |
283 | pcibios_find_class() Superseded by pci_get_class() | ||
284 | pci_find_class() Superseded by pci_get_class() | ||
285 | pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() | ||
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index ac7eabbf662a..87856d3cfb67 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -111,24 +111,17 @@ hardware. | |||
111 | Interrupts: locally disabled. | 111 | Interrupts: locally disabled. |
112 | This call must not sleep | 112 | This call must not sleep |
113 | 113 | ||
114 | stop_tx(port,tty_stop) | 114 | stop_tx(port) |
115 | Stop transmitting characters. This might be due to the CTS | 115 | Stop transmitting characters. This might be due to the CTS |
116 | line becoming inactive or the tty layer indicating we want | 116 | line becoming inactive or the tty layer indicating we want |
117 | to stop transmission. | 117 | to stop transmission due to an XOFF character. |
118 | |||
119 | tty_stop: 1 if this call is due to the TTY layer issuing a | ||
120 | TTY stop to the driver (equiv to rs_stop). | ||
121 | 118 | ||
122 | Locking: port->lock taken. | 119 | Locking: port->lock taken. |
123 | Interrupts: locally disabled. | 120 | Interrupts: locally disabled. |
124 | This call must not sleep | 121 | This call must not sleep |
125 | 122 | ||
126 | start_tx(port,tty_start) | 123 | start_tx(port) |
127 | start transmitting characters. (incidentally, nonempty will | 124 | start transmitting characters. |
128 | always be nonzero, and shouldn't be used - it will be dropped). | ||
129 | |||
130 | tty_start: 1 if this call was due to the TTY layer issuing | ||
131 | a TTY start to the driver (equiv to rs_start) | ||
132 | 125 | ||
133 | Locking: port->lock taken. | 126 | Locking: port->lock taken. |
134 | Interrupts: locally disabled. | 127 | Interrupts: locally disabled. |
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index a18ecb92b356..5c49ba07e709 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -132,6 +132,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
132 | mpu_irq - IRQ # for MPU-401 UART (PnP setup) | 132 | mpu_irq - IRQ # for MPU-401 UART (PnP setup) |
133 | dma1 - first DMA # for AD1816A chip (PnP setup) | 133 | dma1 - first DMA # for AD1816A chip (PnP setup) |
134 | dma2 - second DMA # for AD1816A chip (PnP setup) | 134 | dma2 - second DMA # for AD1816A chip (PnP setup) |
135 | clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz) | ||
135 | 136 | ||
136 | Module supports up to 8 cards, autoprobe and PnP. | 137 | Module supports up to 8 cards, autoprobe and PnP. |
137 | 138 | ||
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index db0b7d2dc477..0475478c2484 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -3422,10 +3422,17 @@ struct _snd_pcm_runtime { | |||
3422 | 3422 | ||
3423 | <para> | 3423 | <para> |
3424 | The <structfield>iface</structfield> field specifies the type of | 3424 | The <structfield>iface</structfield> field specifies the type of |
3425 | the control, | 3425 | the control, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which |
3426 | <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>. There are | 3426 | is usually <constant>MIXER</constant>. |
3427 | <constant>MIXER</constant>, <constant>PCM</constant>, | 3427 | Use <constant>CARD</constant> for global controls that are not |
3428 | <constant>CARD</constant>, etc. | 3428 | logically part of the mixer. |
3429 | If the control is closely associated with some specific device on | ||
3430 | the sound card, use <constant>HWDEP</constant>, | ||
3431 | <constant>PCM</constant>, <constant>RAWMIDI</constant>, | ||
3432 | <constant>TIMER</constant>, or <constant>SEQUENCER</constant>, and | ||
3433 | specify the device number with the | ||
3434 | <structfield>device</structfield> and | ||
3435 | <structfield>subdevice</structfield> fields. | ||
3429 | </para> | 3436 | </para> |
3430 | 3437 | ||
3431 | <para> | 3438 | <para> |
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt index f1896ee3bb2a..63cb7edd177e 100644 --- a/Documentation/usb/usbmon.txt +++ b/Documentation/usb/usbmon.txt | |||
@@ -102,7 +102,7 @@ Here is the list of words, from left to right: | |||
102 | - URB Status. This field makes no sense for submissions, but is present | 102 | - URB Status. This field makes no sense for submissions, but is present |
103 | to help scripts with parsing. In error case, it contains the error code. | 103 | to help scripts with parsing. In error case, it contains the error code. |
104 | In case of a setup packet, it contains a Setup Tag. If scripts read a number | 104 | In case of a setup packet, it contains a Setup Tag. If scripts read a number |
105 | in this field, the proceed to read Data Length. Otherwise, they read | 105 | in this field, they proceed to read Data Length. Otherwise, they read |
106 | the setup packet before reading the Data Length. | 106 | the setup packet before reading the Data Length. |
107 | - Setup packet, if present, consists of 5 words: one of each for bmRequestType, | 107 | - Setup packet, if present, consists of 5 words: one of each for bmRequestType, |
108 | bRequest, wValue, wIndex, wLength, as specified by the USB Specification 2.0. | 108 | bRequest, wValue, wIndex, wLength, as specified by the USB Specification 2.0. |
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options index 7bb5a50b0779..fc94ff235ffa 100644 --- a/Documentation/video4linux/bttv/Insmod-options +++ b/Documentation/video4linux/bttv/Insmod-options | |||
@@ -44,6 +44,9 @@ bttv.o | |||
44 | push used by bttv. bttv will disable overlay | 44 | push used by bttv. bttv will disable overlay |
45 | by default on this hardware to avoid crashes. | 45 | by default on this hardware to avoid crashes. |
46 | With this insmod option you can override this. | 46 | With this insmod option you can override this. |
47 | no_overlay=1 Disable overlay. It should be used by broken | ||
48 | hardware that doesn't support PCI2PCI direct | ||
49 | transfers. | ||
47 | automute=0/1 Automatically mutes the sound if there is | 50 | automute=0/1 Automatically mutes the sound if there is |
48 | no TV signal, on by default. You might try | 51 | no TV signal, on by default. You might try |
49 | to disable this if you have bad input signal | 52 | to disable this if you have bad input signal |
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt index 476c0c22fbb7..678e8f192db2 100644 --- a/Documentation/x86_64/boot-options.txt +++ b/Documentation/x86_64/boot-options.txt | |||
@@ -6,6 +6,11 @@ only the AMD64 specific ones are listed here. | |||
6 | Machine check | 6 | Machine check |
7 | 7 | ||
8 | mce=off disable machine check | 8 | mce=off disable machine check |
9 | mce=bootlog Enable logging of machine checks left over from booting. | ||
10 | Disabled by default because some BIOS leave bogus ones. | ||
11 | If your BIOS doesn't do that it's a good idea to enable though | ||
12 | to make sure you log even machine check events that result | ||
13 | in a reboot. | ||
9 | 14 | ||
10 | nomce (for compatibility with i386): same as mce=off | 15 | nomce (for compatibility with i386): same as mce=off |
11 | 16 | ||