diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 08:41:41 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-24 13:07:53 -0400 |
commit | 816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch) | |
tree | 421fa29aedff988e392f92780637553e275d37a0 /Documentation | |
parent | 70ac4385a13f78bc478f26d317511893741b05bd (diff) | |
parent | d384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts:
fs/nfs/inode.c
fs/super.c
Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch
'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'Documentation')
53 files changed, 2181 insertions, 728 deletions
diff --git a/Documentation/ABI/README b/Documentation/ABI/README new file mode 100644 index 000000000000..9feaf16f1617 --- /dev/null +++ b/Documentation/ABI/README | |||
@@ -0,0 +1,77 @@ | |||
1 | This directory attempts to document the ABI between the Linux kernel and | ||
2 | userspace, and the relative stability of these interfaces. Due to the | ||
3 | everchanging nature of Linux, and the differing maturity levels, these | ||
4 | interfaces should be used by userspace programs in different ways. | ||
5 | |||
6 | We have four different levels of ABI stability, as shown by the four | ||
7 | different subdirectories in this location. Interfaces may change levels | ||
8 | of stability according to the rules described below. | ||
9 | |||
10 | The different levels of stability are: | ||
11 | |||
12 | stable/ | ||
13 | This directory documents the interfaces that the developer has | ||
14 | defined to be stable. Userspace programs are free to use these | ||
15 | interfaces with no restrictions, and backward compatibility for | ||
16 | them will be guaranteed for at least 2 years. Most interfaces | ||
17 | (like syscalls) are expected to never change and always be | ||
18 | available. | ||
19 | |||
20 | testing/ | ||
21 | This directory documents interfaces that are felt to be stable, | ||
22 | as the main development of this interface has been completed. | ||
23 | The interface can be changed to add new features, but the | ||
24 | current interface will not break by doing this, unless grave | ||
25 | errors or security problems are found in them. Userspace | ||
26 | programs can start to rely on these interfaces, but they must be | ||
27 | aware of changes that can occur before these interfaces move to | ||
28 | be marked stable. Programs that use these interfaces are | ||
29 | strongly encouraged to add their name to the description of | ||
30 | these interfaces, so that the kernel developers can easily | ||
31 | notify them if any changes occur (see the description of the | ||
32 | layout of the files below for details on how to do this.) | ||
33 | |||
34 | obsolete/ | ||
35 | This directory documents interfaces that are still remaining in | ||
36 | the kernel, but are marked to be removed at some later point in | ||
37 | time. The description of the interface will document the reason | ||
38 | why it is obsolete and when it can be expected to be removed. | ||
39 | The file Documentation/feature-removal-schedule.txt may describe | ||
40 | some of these interfaces, giving a schedule for when they will | ||
41 | be removed. | ||
42 | |||
43 | removed/ | ||
44 | This directory contains a list of the old interfaces that have | ||
45 | been removed from the kernel. | ||
46 | |||
47 | Every file in these directories will contain the following information: | ||
48 | |||
49 | What: Short description of the interface | ||
50 | Date: Date created | ||
51 | KernelVersion: Kernel version this feature first showed up in. | ||
52 | Contact: Primary contact for this interface (may be a mailing list) | ||
53 | Description: Long description of the interface and how to use it. | ||
54 | Users: All users of this interface who wish to be notified when | ||
55 | it changes. This is very important for interfaces in | ||
56 | the "testing" stage, so that kernel developers can work | ||
57 | with userspace developers to ensure that things do not | ||
58 | break in ways that are unacceptable. It is also | ||
59 | important to get feedback for these interfaces to make | ||
60 | sure they are working in a proper way and do not need to | ||
61 | be changed further. | ||
62 | |||
63 | |||
64 | How things move between levels: | ||
65 | |||
66 | Interfaces in stable may move to obsolete, as long as the proper | ||
67 | notification is given. | ||
68 | |||
69 | Interfaces may be removed from obsolete and the kernel as long as the | ||
70 | documented amount of time has gone by. | ||
71 | |||
72 | Interfaces in the testing state can move to the stable state when the | ||
73 | developers feel they are finished. They cannot be removed from the | ||
74 | kernel tree without going through the obsolete state first. | ||
75 | |||
76 | It's up to the developer to place their interfaces in the category they | ||
77 | wish for it to start out in. | ||
diff --git a/Documentation/ABI/obsolete/devfs b/Documentation/ABI/obsolete/devfs new file mode 100644 index 000000000000..b8b87399bc8f --- /dev/null +++ b/Documentation/ABI/obsolete/devfs | |||
@@ -0,0 +1,13 @@ | |||
1 | What: devfs | ||
2 | Date: July 2005 | ||
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
4 | Description: | ||
5 | devfs has been unmaintained for a number of years, has unfixable | ||
6 | races, contains a naming policy within the kernel that is | ||
7 | against the LSB, and can be replaced by using udev. | ||
8 | The files fs/devfs/*, include/linux/devfs_fs*.h will be removed, | ||
9 | along with the the assorted devfs function calls throughout the | ||
10 | kernel tree. | ||
11 | |||
12 | Users: | ||
13 | |||
diff --git a/Documentation/ABI/stable/syscalls b/Documentation/ABI/stable/syscalls new file mode 100644 index 000000000000..c3ae3e7d6a0c --- /dev/null +++ b/Documentation/ABI/stable/syscalls | |||
@@ -0,0 +1,10 @@ | |||
1 | What: The kernel syscall interface | ||
2 | Description: | ||
3 | This interface matches much of the POSIX interface and is based | ||
4 | on it and other Unix based interfaces. It will only be added to | ||
5 | over time, and not have things removed from it. | ||
6 | |||
7 | Note that this interface is different for every architecture | ||
8 | that Linux supports. Please see the architecture-specific | ||
9 | documentation for details on the syscall numbers that are to be | ||
10 | mapped to each syscall. | ||
diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module new file mode 100644 index 000000000000..75be43118335 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-module | |||
@@ -0,0 +1,30 @@ | |||
1 | What: /sys/module | ||
2 | Description: | ||
3 | The /sys/module tree consists of the following structure: | ||
4 | |||
5 | /sys/module/MODULENAME | ||
6 | The name of the module that is in the kernel. This | ||
7 | module name will show up either if the module is built | ||
8 | directly into the kernel, or if it is loaded as a | ||
9 | dyanmic module. | ||
10 | |||
11 | /sys/module/MODULENAME/parameters | ||
12 | This directory contains individual files that are each | ||
13 | individual parameters of the module that are able to be | ||
14 | changed at runtime. See the individual module | ||
15 | documentation as to the contents of these parameters and | ||
16 | what they accomplish. | ||
17 | |||
18 | Note: The individual parameter names and values are not | ||
19 | considered stable, only the fact that they will be | ||
20 | placed in this location within sysfs. See the | ||
21 | individual driver documentation for details as to the | ||
22 | stability of the different parameters. | ||
23 | |||
24 | /sys/module/MODULENAME/refcnt | ||
25 | If the module is able to be unloaded from the kernel, this file | ||
26 | will contain the current reference count of the module. | ||
27 | |||
28 | Note: If the module is built into the kernel, or if the | ||
29 | CONFIG_MODULE_UNLOAD kernel configuration value is not enabled, | ||
30 | this file will not be present. | ||
diff --git a/Documentation/ABI/testing/sysfs-class b/Documentation/ABI/testing/sysfs-class new file mode 100644 index 000000000000..4b0cb891e46e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class | |||
@@ -0,0 +1,16 @@ | |||
1 | What: /sys/class/ | ||
2 | Date: Febuary 2006 | ||
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
4 | Description: | ||
5 | The /sys/class directory will consist of a group of | ||
6 | subdirectories describing individual classes of devices | ||
7 | in the kernel. The individual directories will consist | ||
8 | of either subdirectories, or symlinks to other | ||
9 | directories. | ||
10 | |||
11 | All programs that use this directory tree must be able | ||
12 | to handle both subdirectories or symlinks in order to | ||
13 | work properly. | ||
14 | |||
15 | Users: | ||
16 | udev <linux-hotplug-devel@lists.sourceforge.net> | ||
diff --git a/Documentation/ABI/testing/sysfs-devices b/Documentation/ABI/testing/sysfs-devices new file mode 100644 index 000000000000..6a25671ee5f6 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices | |||
@@ -0,0 +1,25 @@ | |||
1 | What: /sys/devices | ||
2 | Date: February 2006 | ||
3 | Contact: Greg Kroah-Hartman <gregkh@suse.de> | ||
4 | Description: | ||
5 | The /sys/devices tree contains a snapshot of the | ||
6 | internal state of the kernel device tree. Devices will | ||
7 | be added and removed dynamically as the machine runs, | ||
8 | and between different kernel versions, the layout of the | ||
9 | devices within this tree will change. | ||
10 | |||
11 | Please do not rely on the format of this tree because of | ||
12 | this. If a program wishes to find different things in | ||
13 | the tree, please use the /sys/class structure and rely | ||
14 | on the symlinks there to point to the proper location | ||
15 | within the /sys/devices tree of the individual devices. | ||
16 | Or rely on the uevent messages to notify programs of | ||
17 | devices being added and removed from this tree to find | ||
18 | the location of those devices. | ||
19 | |||
20 | Note that sometimes not all devices along the directory | ||
21 | chain will have emitted uevent messages, so userspace | ||
22 | programs must be able to handle such occurrences. | ||
23 | |||
24 | Users: | ||
25 | udev <linux-hotplug-devel@lists.sourceforge.net> | ||
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index ce5d2c038cf5..6d2412ec91ed 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -155,7 +155,83 @@ problem, which is called the function-growth-hormone-imbalance syndrome. | |||
155 | See next chapter. | 155 | See next chapter. |
156 | 156 | ||
157 | 157 | ||
158 | Chapter 5: Functions | 158 | Chapter 5: Typedefs |
159 | |||
160 | Please don't use things like "vps_t". | ||
161 | |||
162 | It's a _mistake_ to use typedef for structures and pointers. When you see a | ||
163 | |||
164 | vps_t a; | ||
165 | |||
166 | in the source, what does it mean? | ||
167 | |||
168 | In contrast, if it says | ||
169 | |||
170 | struct virtual_container *a; | ||
171 | |||
172 | you can actually tell what "a" is. | ||
173 | |||
174 | Lots of people think that typedefs "help readability". Not so. They are | ||
175 | useful only for: | ||
176 | |||
177 | (a) totally opaque objects (where the typedef is actively used to _hide_ | ||
178 | what the object is). | ||
179 | |||
180 | Example: "pte_t" etc. opaque objects that you can only access using | ||
181 | the proper accessor functions. | ||
182 | |||
183 | NOTE! Opaqueness and "accessor functions" are not good in themselves. | ||
184 | The reason we have them for things like pte_t etc. is that there | ||
185 | really is absolutely _zero_ portably accessible information there. | ||
186 | |||
187 | (b) Clear integer types, where the abstraction _helps_ avoid confusion | ||
188 | whether it is "int" or "long". | ||
189 | |||
190 | u8/u16/u32 are perfectly fine typedefs, although they fit into | ||
191 | category (d) better than here. | ||
192 | |||
193 | NOTE! Again - there needs to be a _reason_ for this. If something is | ||
194 | "unsigned long", then there's no reason to do | ||
195 | |||
196 | typedef unsigned long myflags_t; | ||
197 | |||
198 | but if there is a clear reason for why it under certain circumstances | ||
199 | might be an "unsigned int" and under other configurations might be | ||
200 | "unsigned long", then by all means go ahead and use a typedef. | ||
201 | |||
202 | (c) when you use sparse to literally create a _new_ type for | ||
203 | type-checking. | ||
204 | |||
205 | (d) New types which are identical to standard C99 types, in certain | ||
206 | exceptional circumstances. | ||
207 | |||
208 | Although it would only take a short amount of time for the eyes and | ||
209 | brain to become accustomed to the standard types like 'uint32_t', | ||
210 | some people object to their use anyway. | ||
211 | |||
212 | Therefore, the Linux-specific 'u8/u16/u32/u64' types and their | ||
213 | signed equivalents which are identical to standard types are | ||
214 | permitted -- although they are not mandatory in new code of your | ||
215 | own. | ||
216 | |||
217 | When editing existing code which already uses one or the other set | ||
218 | of types, you should conform to the existing choices in that code. | ||
219 | |||
220 | (e) Types safe for use in userspace. | ||
221 | |||
222 | In certain structures which are visible to userspace, we cannot | ||
223 | require C99 types and cannot use the 'u32' form above. Thus, we | ||
224 | use __u32 and similar types in all structures which are shared | ||
225 | with userspace. | ||
226 | |||
227 | Maybe there are other cases too, but the rule should basically be to NEVER | ||
228 | EVER use a typedef unless you can clearly match one of those rules. | ||
229 | |||
230 | In general, a pointer, or a struct that has elements that can reasonably | ||
231 | be directly accessed should _never_ be a typedef. | ||
232 | |||
233 | |||
234 | Chapter 6: Functions | ||
159 | 235 | ||
160 | Functions should be short and sweet, and do just one thing. They should | 236 | Functions should be short and sweet, and do just one thing. They should |
161 | fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, | 237 | fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, |
@@ -183,7 +259,7 @@ and it gets confused. You know you're brilliant, but maybe you'd like | |||
183 | to understand what you did 2 weeks from now. | 259 | to understand what you did 2 weeks from now. |
184 | 260 | ||
185 | 261 | ||
186 | Chapter 6: Centralized exiting of functions | 262 | Chapter 7: Centralized exiting of functions |
187 | 263 | ||
188 | Albeit deprecated by some people, the equivalent of the goto statement is | 264 | Albeit deprecated by some people, the equivalent of the goto statement is |
189 | used frequently by compilers in form of the unconditional jump instruction. | 265 | used frequently by compilers in form of the unconditional jump instruction. |
@@ -220,7 +296,7 @@ out: | |||
220 | return result; | 296 | return result; |
221 | } | 297 | } |
222 | 298 | ||
223 | Chapter 7: Commenting | 299 | Chapter 8: Commenting |
224 | 300 | ||
225 | Comments are good, but there is also a danger of over-commenting. NEVER | 301 | Comments are good, but there is also a danger of over-commenting. NEVER |
226 | try to explain HOW your code works in a comment: it's much better to | 302 | try to explain HOW your code works in a comment: it's much better to |
@@ -240,7 +316,7 @@ When commenting the kernel API functions, please use the kerneldoc format. | |||
240 | See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc | 316 | See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc |
241 | for details. | 317 | for details. |
242 | 318 | ||
243 | Chapter 8: You've made a mess of it | 319 | Chapter 9: You've made a mess of it |
244 | 320 | ||
245 | That's OK, we all do. You've probably been told by your long-time Unix | 321 | That's OK, we all do. You've probably been told by your long-time Unix |
246 | user helper that "GNU emacs" automatically formats the C sources for | 322 | user helper that "GNU emacs" automatically formats the C sources for |
@@ -288,7 +364,7 @@ re-formatting you may want to take a look at the man page. But | |||
288 | remember: "indent" is not a fix for bad programming. | 364 | remember: "indent" is not a fix for bad programming. |
289 | 365 | ||
290 | 366 | ||
291 | Chapter 9: Configuration-files | 367 | Chapter 10: Configuration-files |
292 | 368 | ||
293 | For configuration options (arch/xxx/Kconfig, and all the Kconfig files), | 369 | For configuration options (arch/xxx/Kconfig, and all the Kconfig files), |
294 | somewhat different indentation is used. | 370 | somewhat different indentation is used. |
@@ -313,7 +389,7 @@ support for file-systems, for instance) should be denoted (DANGEROUS), other | |||
313 | experimental options should be denoted (EXPERIMENTAL). | 389 | experimental options should be denoted (EXPERIMENTAL). |
314 | 390 | ||
315 | 391 | ||
316 | Chapter 10: Data structures | 392 | Chapter 11: Data structures |
317 | 393 | ||
318 | Data structures that have visibility outside the single-threaded | 394 | Data structures that have visibility outside the single-threaded |
319 | environment they are created and destroyed in should always have | 395 | environment they are created and destroyed in should always have |
@@ -344,7 +420,7 @@ Remember: if another thread can find your data structure, and you don't | |||
344 | have a reference count on it, you almost certainly have a bug. | 420 | have a reference count on it, you almost certainly have a bug. |
345 | 421 | ||
346 | 422 | ||
347 | Chapter 11: Macros, Enums and RTL | 423 | Chapter 12: Macros, Enums and RTL |
348 | 424 | ||
349 | Names of macros defining constants and labels in enums are capitalized. | 425 | Names of macros defining constants and labels in enums are capitalized. |
350 | 426 | ||
@@ -399,7 +475,7 @@ The cpp manual deals with macros exhaustively. The gcc internals manual also | |||
399 | covers RTL which is used frequently with assembly language in the kernel. | 475 | covers RTL which is used frequently with assembly language in the kernel. |
400 | 476 | ||
401 | 477 | ||
402 | Chapter 12: Printing kernel messages | 478 | Chapter 13: Printing kernel messages |
403 | 479 | ||
404 | Kernel developers like to be seen as literate. Do mind the spelling | 480 | Kernel developers like to be seen as literate. Do mind the spelling |
405 | of kernel messages to make a good impression. Do not use crippled | 481 | of kernel messages to make a good impression. Do not use crippled |
@@ -410,7 +486,7 @@ Kernel messages do not have to be terminated with a period. | |||
410 | Printing numbers in parentheses (%d) adds no value and should be avoided. | 486 | Printing numbers in parentheses (%d) adds no value and should be avoided. |
411 | 487 | ||
412 | 488 | ||
413 | Chapter 13: Allocating memory | 489 | Chapter 14: Allocating memory |
414 | 490 | ||
415 | The kernel provides the following general purpose memory allocators: | 491 | The kernel provides the following general purpose memory allocators: |
416 | kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API | 492 | kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API |
@@ -429,7 +505,7 @@ from void pointer to any other pointer type is guaranteed by the C programming | |||
429 | language. | 505 | language. |
430 | 506 | ||
431 | 507 | ||
432 | Chapter 14: The inline disease | 508 | Chapter 15: The inline disease |
433 | 509 | ||
434 | There appears to be a common misperception that gcc has a magic "make me | 510 | There appears to be a common misperception that gcc has a magic "make me |
435 | faster" speedup option called "inline". While the use of inlines can be | 511 | faster" speedup option called "inline". While the use of inlines can be |
@@ -457,7 +533,7 @@ something it would have done anyway. | |||
457 | 533 | ||
458 | 534 | ||
459 | 535 | ||
460 | Chapter 15: References | 536 | Appendix I: References |
461 | 537 | ||
462 | The C Programming Language, Second Edition | 538 | The C Programming Language, Second Edition |
463 | by Brian W. Kernighan and Dennis M. Ritchie. | 539 | by Brian W. Kernighan and Dennis M. Ritchie. |
@@ -481,4 +557,4 @@ Kernel CodingStyle, by greg@kroah.com at OLS 2002: | |||
481 | http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ | 557 | http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ |
482 | 558 | ||
483 | -- | 559 | -- |
484 | Last updated on 30 December 2005 by a community effort on LKML. | 560 | Last updated on 30 April 2006. |
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index ca02e04a906c..31b727ceb127 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -117,6 +117,7 @@ X!Ilib/string.c | |||
117 | <chapter id="mm"> | 117 | <chapter id="mm"> |
118 | <title>Memory Management in Linux</title> | 118 | <title>Memory Management in Linux</title> |
119 | <sect1><title>The Slab Cache</title> | 119 | <sect1><title>The Slab Cache</title> |
120 | !Iinclude/linux/slab.h | ||
120 | !Emm/slab.c | 121 | !Emm/slab.c |
121 | </sect1> | 122 | </sect1> |
122 | <sect1><title>User Space Memory Access</title> | 123 | <sect1><title>User Space Memory Access</title> |
@@ -331,6 +332,18 @@ X!Earch/i386/kernel/mca.c | |||
331 | !Esecurity/security.c | 332 | !Esecurity/security.c |
332 | </chapter> | 333 | </chapter> |
333 | 334 | ||
335 | <chapter id="audit"> | ||
336 | <title>Audit Interfaces</title> | ||
337 | !Ekernel/audit.c | ||
338 | !Ikernel/auditsc.c | ||
339 | !Ikernel/auditfilter.c | ||
340 | </chapter> | ||
341 | |||
342 | <chapter id="accounting"> | ||
343 | <title>Accounting Framework</title> | ||
344 | !Ikernel/acct.c | ||
345 | </chapter> | ||
346 | |||
334 | <chapter id="pmfuncs"> | 347 | <chapter id="pmfuncs"> |
335 | <title>Power Management</title> | 348 | <title>Power Management</title> |
336 | !Ekernel/power/pm.c | 349 | !Ekernel/power/pm.c |
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index f869b03929db..e97c32314541 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -169,6 +169,22 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | |||
169 | 169 | ||
170 | </sect2> | 170 | </sect2> |
171 | 171 | ||
172 | <sect2><title>PIO data read/write</title> | ||
173 | <programlisting> | ||
174 | void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); | ||
175 | </programlisting> | ||
176 | |||
177 | <para> | ||
178 | All bmdma-style drivers must implement this hook. This is the low-level | ||
179 | operation that actually copies the data bytes during a PIO data | ||
180 | transfer. | ||
181 | Typically the driver | ||
182 | will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or | ||
183 | ata_mmio_data_xfer(). | ||
184 | </para> | ||
185 | |||
186 | </sect2> | ||
187 | |||
172 | <sect2><title>ATA command execute</title> | 188 | <sect2><title>ATA command execute</title> |
173 | <programlisting> | 189 | <programlisting> |
174 | void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); | 190 | void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); |
@@ -204,11 +220,10 @@ command. | |||
204 | <programlisting> | 220 | <programlisting> |
205 | u8 (*check_status)(struct ata_port *ap); | 221 | u8 (*check_status)(struct ata_port *ap); |
206 | u8 (*check_altstatus)(struct ata_port *ap); | 222 | u8 (*check_altstatus)(struct ata_port *ap); |
207 | u8 (*check_err)(struct ata_port *ap); | ||
208 | </programlisting> | 223 | </programlisting> |
209 | 224 | ||
210 | <para> | 225 | <para> |
211 | Reads the Status/AltStatus/Error ATA shadow register from | 226 | Reads the Status/AltStatus ATA shadow register from |
212 | hardware. On some hardware, reading the Status register has | 227 | hardware. On some hardware, reading the Status register has |
213 | the side effect of clearing the interrupt condition. | 228 | the side effect of clearing the interrupt condition. |
214 | Most drivers for taskfile-based hardware use | 229 | Most drivers for taskfile-based hardware use |
@@ -269,23 +284,6 @@ void (*set_mode) (struct ata_port *ap); | |||
269 | 284 | ||
270 | </sect2> | 285 | </sect2> |
271 | 286 | ||
272 | <sect2><title>Reset ATA bus</title> | ||
273 | <programlisting> | ||
274 | void (*phy_reset) (struct ata_port *ap); | ||
275 | </programlisting> | ||
276 | |||
277 | <para> | ||
278 | The very first step in the probe phase. Actions vary depending | ||
279 | on the bus type, typically. After waking up the device and probing | ||
280 | for device presence (PATA and SATA), typically a soft reset | ||
281 | (SRST) will be performed. Drivers typically use the helper | ||
282 | functions ata_bus_reset() or sata_phy_reset() for this hook. | ||
283 | Many SATA drivers use sata_phy_reset() or call it from within | ||
284 | their own phy_reset() functions. | ||
285 | </para> | ||
286 | |||
287 | </sect2> | ||
288 | |||
289 | <sect2><title>Control PCI IDE BMDMA engine</title> | 287 | <sect2><title>Control PCI IDE BMDMA engine</title> |
290 | <programlisting> | 288 | <programlisting> |
291 | void (*bmdma_setup) (struct ata_queued_cmd *qc); | 289 | void (*bmdma_setup) (struct ata_queued_cmd *qc); |
@@ -354,16 +352,74 @@ int (*qc_issue) (struct ata_queued_cmd *qc); | |||
354 | 352 | ||
355 | </sect2> | 353 | </sect2> |
356 | 354 | ||
357 | <sect2><title>Timeout (error) handling</title> | 355 | <sect2><title>Exception and probe handling (EH)</title> |
358 | <programlisting> | 356 | <programlisting> |
359 | void (*eng_timeout) (struct ata_port *ap); | 357 | void (*eng_timeout) (struct ata_port *ap); |
358 | void (*phy_reset) (struct ata_port *ap); | ||
359 | </programlisting> | ||
360 | |||
361 | <para> | ||
362 | Deprecated. Use ->error_handler() instead. | ||
363 | </para> | ||
364 | |||
365 | <programlisting> | ||
366 | void (*freeze) (struct ata_port *ap); | ||
367 | void (*thaw) (struct ata_port *ap); | ||
368 | </programlisting> | ||
369 | |||
370 | <para> | ||
371 | ata_port_freeze() is called when HSM violations or some other | ||
372 | condition disrupts normal operation of the port. A frozen port | ||
373 | is not allowed to perform any operation until the port is | ||
374 | thawed, which usually follows a successful reset. | ||
375 | </para> | ||
376 | |||
377 | <para> | ||
378 | The optional ->freeze() callback can be used for freezing the port | ||
379 | hardware-wise (e.g. mask interrupt and stop DMA engine). If a | ||
380 | port cannot be frozen hardware-wise, the interrupt handler | ||
381 | must ack and clear interrupts unconditionally while the port | ||
382 | is frozen. | ||
383 | </para> | ||
384 | <para> | ||
385 | The optional ->thaw() callback is called to perform the opposite of ->freeze(): | ||
386 | prepare the port for normal operation once again. Unmask interrupts, | ||
387 | start DMA engine, etc. | ||
388 | </para> | ||
389 | |||
390 | <programlisting> | ||
391 | void (*error_handler) (struct ata_port *ap); | ||
392 | </programlisting> | ||
393 | |||
394 | <para> | ||
395 | ->error_handler() is a driver's hook into probe, hotplug, and recovery | ||
396 | and other exceptional conditions. The primary responsibility of an | ||
397 | implementation is to call ata_do_eh() or ata_bmdma_drive_eh() with a set | ||
398 | of EH hooks as arguments: | ||
399 | </para> | ||
400 | |||
401 | <para> | ||
402 | 'prereset' hook (may be NULL) is called during an EH reset, before any other actions | ||
403 | are taken. | ||
404 | </para> | ||
405 | |||
406 | <para> | ||
407 | 'postreset' hook (may be NULL) is called after the EH reset is performed. Based on | ||
408 | existing conditions, severity of the problem, and hardware capabilities, | ||
409 | </para> | ||
410 | |||
411 | <para> | ||
412 | Either 'softreset' (may be NULL) or 'hardreset' (may be NULL) will be | ||
413 | called to perform the low-level EH reset. | ||
414 | </para> | ||
415 | |||
416 | <programlisting> | ||
417 | void (*post_internal_cmd) (struct ata_queued_cmd *qc); | ||
360 | </programlisting> | 418 | </programlisting> |
361 | 419 | ||
362 | <para> | 420 | <para> |
363 | This is a high level error handling function, called from the | 421 | Perform any hardware-specific actions necessary to finish processing |
364 | error handling thread, when a command times out. Most newer | 422 | after executing a probe-time or EH-time command via ata_exec_internal(). |
365 | hardware will implement its own error handling code here. IDE BMDMA | ||
366 | drivers may use the helper function ata_eng_timeout(). | ||
367 | </para> | 423 | </para> |
368 | 424 | ||
369 | </sect2> | 425 | </sect2> |
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 07cb93b82ba9..6e459420ee9f 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
@@ -790,7 +790,6 @@ RCU pointer update: | |||
790 | 790 | ||
791 | RCU grace period: | 791 | RCU grace period: |
792 | 792 | ||
793 | synchronize_kernel (deprecated) | ||
794 | synchronize_net | 793 | synchronize_net |
795 | synchronize_sched | 794 | synchronize_sched |
796 | synchronize_rcu | 795 | synchronize_rcu |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist new file mode 100644 index 000000000000..8230098da529 --- /dev/null +++ b/Documentation/SubmitChecklist | |||
@@ -0,0 +1,57 @@ | |||
1 | Linux Kernel patch sumbittal checklist | ||
2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
3 | |||
4 | Here are some basic things that developers should do if they | ||
5 | want to see their kernel patch submittals accepted quicker. | ||
6 | |||
7 | These are all above and beyond the documentation that is provided | ||
8 | in Documentation/SubmittingPatches and elsewhere about submitting | ||
9 | Linux kernel patches. | ||
10 | |||
11 | |||
12 | |||
13 | - Builds cleanly with applicable or modified CONFIG options =y, =m, and =n. | ||
14 | No gcc warnings/errors, no linker warnings/errors. | ||
15 | |||
16 | - Passes allnoconfig, allmodconfig | ||
17 | |||
18 | - Builds on multiple CPU arch-es by using local cross-compile tools | ||
19 | or something like PLM at OSDL. | ||
20 | |||
21 | - ppc64 is a good architecture for cross-compilation checking because it | ||
22 | tends to use `unsigned long' for 64-bit quantities. | ||
23 | |||
24 | - Matches kernel coding style(!) | ||
25 | |||
26 | - Any new or modified CONFIG options don't muck up the config menu. | ||
27 | |||
28 | - All new Kconfig options have help text. | ||
29 | |||
30 | - Has been carefully reviewed with respect to relevant Kconfig | ||
31 | combinations. This is very hard to get right with testing -- | ||
32 | brainpower pays off here. | ||
33 | |||
34 | - Check cleanly with sparse. | ||
35 | |||
36 | - Use 'make checkstack' and 'make namespacecheck' and fix any | ||
37 | problems that they find. Note: checkstack does not point out | ||
38 | problems explicitly, but any one function that uses more than | ||
39 | 512 bytes on the stack is a candidate for change. | ||
40 | |||
41 | - Include kernel-doc to document global kernel APIs. (Not required | ||
42 | for static functions, but OK there also.) Use 'make htmldocs' | ||
43 | or 'make mandocs' to check the kernel-doc and fix any issues. | ||
44 | |||
45 | - Has been tested with CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, | ||
46 | CONFIG_DEBUG_SLAB, CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, | ||
47 | CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_SPINLOCK_SLEEP all simultaneously | ||
48 | enabled. | ||
49 | |||
50 | - Has been build- and runtime tested with and without CONFIG_SMP and | ||
51 | CONFIG_PREEMPT. | ||
52 | |||
53 | - If the patch affects IO/Disk, etc: has been tested with and without | ||
54 | CONFIG_LBD. | ||
55 | |||
56 | |||
57 | 2006-APR-27 | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index b369a8c46a73..b2f593fc76ca 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | Maintained by Torben Mathiasen <device@lanana.org> | 4 | Maintained by Torben Mathiasen <device@lanana.org> |
5 | 5 | ||
6 | Last revised: 25 January 2005 | 6 | Last revised: 01 March 2006 |
7 | 7 | ||
8 | This list is the Linux Device List, the official registry of allocated | 8 | This list is the Linux Device List, the official registry of allocated |
9 | device numbers and /dev directory nodes for the Linux operating | 9 | device numbers and /dev directory nodes for the Linux operating |
@@ -94,7 +94,6 @@ Your cooperation is appreciated. | |||
94 | 9 = /dev/urandom Faster, less secure random number gen. | 94 | 9 = /dev/urandom Faster, less secure random number gen. |
95 | 10 = /dev/aio Asyncronous I/O notification interface | 95 | 10 = /dev/aio Asyncronous I/O notification interface |
96 | 11 = /dev/kmsg Writes to this come out as printk's | 96 | 11 = /dev/kmsg Writes to this come out as printk's |
97 | 12 = /dev/oldmem Access to crash dump from kexec kernel | ||
98 | 1 block RAM disk | 97 | 1 block RAM disk |
99 | 0 = /dev/ram0 First RAM disk | 98 | 0 = /dev/ram0 First RAM disk |
100 | 1 = /dev/ram1 Second RAM disk | 99 | 1 = /dev/ram1 Second RAM disk |
@@ -262,13 +261,13 @@ Your cooperation is appreciated. | |||
262 | NOTE: These devices permit both read and write access. | 261 | NOTE: These devices permit both read and write access. |
263 | 262 | ||
264 | 7 block Loopback devices | 263 | 7 block Loopback devices |
265 | 0 = /dev/loop0 First loopback device | 264 | 0 = /dev/loop0 First loop device |
266 | 1 = /dev/loop1 Second loopback device | 265 | 1 = /dev/loop1 Second loop device |
267 | ... | 266 | ... |
268 | 267 | ||
269 | The loopback devices are used to mount filesystems not | 268 | The loop devices are used to mount filesystems not |
270 | associated with block devices. The binding to the | 269 | associated with block devices. The binding to the |
271 | loopback devices is handled by mount(8) or losetup(8). | 270 | loop devices is handled by mount(8) or losetup(8). |
272 | 271 | ||
273 | 8 block SCSI disk devices (0-15) | 272 | 8 block SCSI disk devices (0-15) |
274 | 0 = /dev/sda First SCSI disk whole disk | 273 | 0 = /dev/sda First SCSI disk whole disk |
@@ -943,7 +942,7 @@ Your cooperation is appreciated. | |||
943 | 240 = /dev/ftlp FTL on 16th Memory Technology Device | 942 | 240 = /dev/ftlp FTL on 16th Memory Technology Device |
944 | 943 | ||
945 | Partitions are handled in the same way as for IDE | 944 | Partitions are handled in the same way as for IDE |
946 | disks (see major number 3) expect that the partition | 945 | disks (see major number 3) except that the partition |
947 | limit is 15 rather than 63 per disk (same as SCSI.) | 946 | limit is 15 rather than 63 per disk (same as SCSI.) |
948 | 947 | ||
949 | 45 char isdn4linux ISDN BRI driver | 948 | 45 char isdn4linux ISDN BRI driver |
@@ -1168,7 +1167,7 @@ Your cooperation is appreciated. | |||
1168 | The filename of the encrypted container and the passwords | 1167 | The filename of the encrypted container and the passwords |
1169 | are sent via ioctls (using the sdmount tool) to the master | 1168 | are sent via ioctls (using the sdmount tool) to the master |
1170 | node which then activates them via one of the | 1169 | node which then activates them via one of the |
1171 | /dev/scramdisk/x nodes for loopback mounting (all handled | 1170 | /dev/scramdisk/x nodes for loop mounting (all handled |
1172 | through the sdmount tool). | 1171 | through the sdmount tool). |
1173 | 1172 | ||
1174 | Requested by: andy@scramdisklinux.org | 1173 | Requested by: andy@scramdisklinux.org |
@@ -2538,18 +2537,32 @@ Your cooperation is appreciated. | |||
2538 | 0 = /dev/usb/lp0 First USB printer | 2537 | 0 = /dev/usb/lp0 First USB printer |
2539 | ... | 2538 | ... |
2540 | 15 = /dev/usb/lp15 16th USB printer | 2539 | 15 = /dev/usb/lp15 16th USB printer |
2541 | 16 = /dev/usb/mouse0 First USB mouse | ||
2542 | ... | ||
2543 | 31 = /dev/usb/mouse15 16th USB mouse | ||
2544 | 32 = /dev/usb/ez0 First USB firmware loader | ||
2545 | ... | ||
2546 | 47 = /dev/usb/ez15 16th USB firmware loader | ||
2547 | 48 = /dev/usb/scanner0 First USB scanner | 2540 | 48 = /dev/usb/scanner0 First USB scanner |
2548 | ... | 2541 | ... |
2549 | 63 = /dev/usb/scanner15 16th USB scanner | 2542 | 63 = /dev/usb/scanner15 16th USB scanner |
2550 | 64 = /dev/usb/rio500 Diamond Rio 500 | 2543 | 64 = /dev/usb/rio500 Diamond Rio 500 |
2551 | 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) | 2544 | 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) |
2552 | 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) | 2545 | 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) |
2546 | 96 = /dev/usb/hiddev0 1st USB HID device | ||
2547 | ... | ||
2548 | 111 = /dev/usb/hiddev15 16th USB HID device | ||
2549 | 112 = /dev/usb/auer0 1st auerswald ISDN device | ||
2550 | ... | ||
2551 | 127 = /dev/usb/auer15 16th auerswald ISDN device | ||
2552 | 128 = /dev/usb/brlvgr0 First Braille Voyager device | ||
2553 | ... | ||
2554 | 131 = /dev/usb/brlvgr3 Fourth Braille Voyager device | ||
2555 | 132 = /dev/usb/idmouse ID Mouse (fingerprint scanner) device | ||
2556 | 133 = /dev/usb/sisusbvga1 First SiSUSB VGA device | ||
2557 | ... | ||
2558 | 140 = /dev/usb/sisusbvga8 Eigth SISUSB VGA device | ||
2559 | 144 = /dev/usb/lcd USB LCD device | ||
2560 | 160 = /dev/usb/legousbtower0 1st USB Legotower device | ||
2561 | ... | ||
2562 | 175 = /dev/usb/legousbtower15 16th USB Legotower device | ||
2563 | 240 = /dev/usb/dabusb0 First daubusb device | ||
2564 | ... | ||
2565 | 243 = /dev/usb/dabusb3 Fourth dabusb device | ||
2553 | 2566 | ||
2554 | 180 block USB block devices | 2567 | 180 block USB block devices |
2555 | 0 = /dev/uba First USB block device | 2568 | 0 = /dev/uba First USB block device |
@@ -2710,6 +2723,17 @@ Your cooperation is appreciated. | |||
2710 | 1 = /dev/cpu/1/msr MSRs on CPU 1 | 2723 | 1 = /dev/cpu/1/msr MSRs on CPU 1 |
2711 | ... | 2724 | ... |
2712 | 2725 | ||
2726 | 202 block Xen Virtual Block Device | ||
2727 | 0 = /dev/xvda First Xen VBD whole disk | ||
2728 | 16 = /dev/xvdb Second Xen VBD whole disk | ||
2729 | 32 = /dev/xvdc Third Xen VBD whole disk | ||
2730 | ... | ||
2731 | 240 = /dev/xvdp Sixteenth Xen VBD whole disk | ||
2732 | |||
2733 | Partitions are handled in the same way as for IDE | ||
2734 | disks (see major number 3) except that the limit on | ||
2735 | partitions is 15. | ||
2736 | |||
2713 | 203 char CPU CPUID information | 2737 | 203 char CPU CPUID information |
2714 | 0 = /dev/cpu/0/cpuid CPUID on CPU 0 | 2738 | 0 = /dev/cpu/0/cpuid CPUID on CPU 0 |
2715 | 1 = /dev/cpu/1/cpuid CPUID on CPU 1 | 2739 | 1 = /dev/cpu/1/cpuid CPUID on CPU 1 |
@@ -2747,11 +2771,26 @@ Your cooperation is appreciated. | |||
2747 | 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 | 2771 | 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 |
2748 | ... | 2772 | ... |
2749 | 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 | 2773 | 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 |
2750 | 50 = /dev/ttyIOC40 Altix serial card | 2774 | 50 = /dev/ttyIOC0 Altix serial card |
2775 | ... | ||
2776 | 81 = /dev/ttyIOC31 Altix serial card | ||
2777 | 82 = /dev/ttyVR0 NEC VR4100 series SIU | ||
2778 | 83 = /dev/ttyVR1 NEC VR4100 series DSIU | ||
2779 | 84 = /dev/ttyIOC84 Altix ioc4 serial card | ||
2780 | ... | ||
2781 | 115 = /dev/ttyIOC115 Altix ioc4 serial card | ||
2782 | 116 = /dev/ttySIOC0 Altix ioc3 serial card | ||
2783 | ... | ||
2784 | 147 = /dev/ttySIOC31 Altix ioc3 serial card | ||
2785 | 148 = /dev/ttyPSC0 PPC PSC - port 0 | ||
2786 | ... | ||
2787 | 153 = /dev/ttyPSC5 PPC PSC - port 5 | ||
2788 | 154 = /dev/ttyAT0 ATMEL serial port 0 | ||
2751 | ... | 2789 | ... |
2752 | 81 = /dev/ttyIOC431 Altix serial card | 2790 | 169 = /dev/ttyAT15 ATMEL serial port 15 |
2753 | 82 = /dev/ttyVR0 NEC VR4100 series SIU | 2791 | 170 = /dev/ttyNX0 Hilscher netX serial port 0 |
2754 | 83 = /dev/ttyVR1 NEC VR4100 series DSIU | 2792 | ... |
2793 | 185 = /dev/ttyNX15 Hilscher netX serial port 15 | ||
2755 | 2794 | ||
2756 | 205 char Low-density serial ports (alternate device) | 2795 | 205 char Low-density serial ports (alternate device) |
2757 | 0 = /dev/culu0 Callout device for ttyLU0 | 2796 | 0 = /dev/culu0 Callout device for ttyLU0 |
@@ -2786,8 +2825,8 @@ Your cooperation is appreciated. | |||
2786 | 50 = /dev/cuioc40 Callout device for ttyIOC40 | 2825 | 50 = /dev/cuioc40 Callout device for ttyIOC40 |
2787 | ... | 2826 | ... |
2788 | 81 = /dev/cuioc431 Callout device for ttyIOC431 | 2827 | 81 = /dev/cuioc431 Callout device for ttyIOC431 |
2789 | 82 = /dev/cuvr0 Callout device for ttyVR0 | 2828 | 82 = /dev/cuvr0 Callout device for ttyVR0 |
2790 | 83 = /dev/cuvr1 Callout device for ttyVR1 | 2829 | 83 = /dev/cuvr1 Callout device for ttyVR1 |
2791 | 2830 | ||
2792 | 2831 | ||
2793 | 206 char OnStream SC-x0 tape devices | 2832 | 206 char OnStream SC-x0 tape devices |
@@ -2897,7 +2936,6 @@ Your cooperation is appreciated. | |||
2897 | ... | 2936 | ... |
2898 | 196 = /dev/dvb/adapter3/video0 first video decoder of fourth card | 2937 | 196 = /dev/dvb/adapter3/video0 first video decoder of fourth card |
2899 | 2938 | ||
2900 | |||
2901 | 216 char Bluetooth RFCOMM TTY devices | 2939 | 216 char Bluetooth RFCOMM TTY devices |
2902 | 0 = /dev/rfcomm0 First Bluetooth RFCOMM TTY device | 2940 | 0 = /dev/rfcomm0 First Bluetooth RFCOMM TTY device |
2903 | 1 = /dev/rfcomm1 Second Bluetooth RFCOMM TTY device | 2941 | 1 = /dev/rfcomm1 Second Bluetooth RFCOMM TTY device |
@@ -3002,12 +3040,43 @@ Your cooperation is appreciated. | |||
3002 | ioctl()'s can be used to rewind the tape regardless of | 3040 | ioctl()'s can be used to rewind the tape regardless of |
3003 | the device used to access it. | 3041 | the device used to access it. |
3004 | 3042 | ||
3005 | 231 char InfiniBand MAD | 3043 | 231 char InfiniBand |
3006 | 0 = /dev/infiniband/umad0 | 3044 | 0 = /dev/infiniband/umad0 |
3007 | 1 = /dev/infiniband/umad1 | 3045 | 1 = /dev/infiniband/umad1 |
3008 | ... | 3046 | ... |
3047 | 63 = /dev/infiniband/umad63 63rd InfiniBandMad device | ||
3048 | 64 = /dev/infiniband/issm0 First InfiniBand IsSM device | ||
3049 | 65 = /dev/infiniband/issm1 Second InfiniBand IsSM device | ||
3050 | ... | ||
3051 | 127 = /dev/infiniband/issm63 63rd InfiniBand IsSM device | ||
3052 | 128 = /dev/infiniband/uverbs0 First InfiniBand verbs device | ||
3053 | 129 = /dev/infiniband/uverbs1 Second InfiniBand verbs device | ||
3054 | ... | ||
3055 | 159 = /dev/infiniband/uverbs31 31st InfiniBand verbs device | ||
3056 | |||
3057 | 232 char Biometric Devices | ||
3058 | 0 = /dev/biometric/sensor0/fingerprint first fingerprint sensor on first device | ||
3059 | 1 = /dev/biometric/sensor0/iris first iris sensor on first device | ||
3060 | 2 = /dev/biometric/sensor0/retina first retina sensor on first device | ||
3061 | 3 = /dev/biometric/sensor0/voiceprint first voiceprint sensor on first device | ||
3062 | 4 = /dev/biometric/sensor0/facial first facial sensor on first device | ||
3063 | 5 = /dev/biometric/sensor0/hand first hand sensor on first device | ||
3064 | ... | ||
3065 | 10 = /dev/biometric/sensor1/fingerprint first fingerprint sensor on second device | ||
3066 | ... | ||
3067 | 20 = /dev/biometric/sensor2/fingerprint first fingerprint sensor on third device | ||
3068 | ... | ||
3009 | 3069 | ||
3010 | 232-239 UNASSIGNED | 3070 | 233 char PathScale InfiniPath interconnect |
3071 | 0 = /dev/ipath Primary device for programs (any unit) | ||
3072 | 1 = /dev/ipath0 Access specifically to unit 0 | ||
3073 | 2 = /dev/ipath1 Access specifically to unit 1 | ||
3074 | ... | ||
3075 | 4 = /dev/ipath3 Access specifically to unit 3 | ||
3076 | 129 = /dev/ipath_sma Device used by Subnet Management Agent | ||
3077 | 130 = /dev/ipath_diag Device used by diagnostics programs | ||
3078 | |||
3079 | 234-239 UNASSIGNED | ||
3011 | 3080 | ||
3012 | 240-254 char LOCAL/EXPERIMENTAL USE | 3081 | 240-254 char LOCAL/EXPERIMENTAL USE |
3013 | 240-254 block LOCAL/EXPERIMENTAL USE | 3082 | 240-254 block LOCAL/EXPERIMENTAL USE |
@@ -3021,6 +3090,24 @@ Your cooperation is appreciated. | |||
3021 | This major is reserved to assist the expansion to a | 3090 | This major is reserved to assist the expansion to a |
3022 | larger number space. No device nodes with this major | 3091 | larger number space. No device nodes with this major |
3023 | should ever be created on the filesystem. | 3092 | should ever be created on the filesystem. |
3093 | (This is probaly not true anymore, but I'll leave it | ||
3094 | for now /Torben) | ||
3095 | |||
3096 | ---LARGE MAJORS!!!!!--- | ||
3097 | |||
3098 | 256 char Equinox SST multi-port serial boards | ||
3099 | 0 = /dev/ttyEQ0 First serial port on first Equinox SST board | ||
3100 | 127 = /dev/ttyEQ127 Last serial port on first Equinox SST board | ||
3101 | 128 = /dev/ttyEQ128 First serial port on second Equinox SST board | ||
3102 | ... | ||
3103 | 1027 = /dev/ttyEQ1027 Last serial port on eighth Equinox SST board | ||
3104 | |||
3105 | 256 block Resident Flash Disk Flash Translation Layer | ||
3106 | 0 = /dev/rfda First RFD FTL layer | ||
3107 | 16 = /dev/rfdb Second RFD FTL layer | ||
3108 | ... | ||
3109 | 240 = /dev/rfdp 16th RFD FTL layer | ||
3110 | |||
3024 | 3111 | ||
3025 | **** ADDITIONAL /dev DIRECTORY ENTRIES | 3112 | **** ADDITIONAL /dev DIRECTORY ENTRIES |
3026 | 3113 | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index f50cf8fac3f0..027285d0c26c 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -33,27 +33,12 @@ Who: Adrian Bunk <bunk@stusta.de> | |||
33 | 33 | ||
34 | --------------------------- | 34 | --------------------------- |
35 | 35 | ||
36 | What: RCU API moves to EXPORT_SYMBOL_GPL | ||
37 | When: April 2006 | ||
38 | Files: include/linux/rcupdate.h, kernel/rcupdate.c | ||
39 | Why: Outside of Linux, the only implementations of anything even | ||
40 | vaguely resembling RCU that I am aware of are in DYNIX/ptx, | ||
41 | VM/XA, Tornado, and K42. I do not expect anyone to port binary | ||
42 | drivers or kernel modules from any of these, since the first two | ||
43 | are owned by IBM and the last two are open-source research OSes. | ||
44 | So these will move to GPL after a grace period to allow | ||
45 | people, who might be using implementations that I am not aware | ||
46 | of, to adjust to this upcoming change. | ||
47 | Who: Paul E. McKenney <paulmck@us.ibm.com> | ||
48 | |||
49 | --------------------------- | ||
50 | |||
51 | What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN | 36 | What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN |
52 | When: November 2005 | 37 | When: November 2006 |
53 | Why: Deprecated in favour of the new ioctl-based rawiso interface, which is | 38 | Why: Deprecated in favour of the new ioctl-based rawiso interface, which is |
54 | more efficient. You should really be using libraw1394 for raw1394 | 39 | more efficient. You should really be using libraw1394 for raw1394 |
55 | access anyway. | 40 | access anyway. |
56 | Who: Jody McIntyre <scjody@steamballoon.com> | 41 | Who: Jody McIntyre <scjody@modernduck.com> |
57 | 42 | ||
58 | --------------------------- | 43 | --------------------------- |
59 | 44 | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 1045da582b9b..d31efbbdfe50 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -99,7 +99,7 @@ prototypes: | |||
99 | int (*sync_fs)(struct super_block *sb, int wait); | 99 | int (*sync_fs)(struct super_block *sb, int wait); |
100 | void (*write_super_lockfs) (struct super_block *); | 100 | void (*write_super_lockfs) (struct super_block *); |
101 | void (*unlockfs) (struct super_block *); | 101 | void (*unlockfs) (struct super_block *); |
102 | int (*statfs) (struct super_block *, struct kstatfs *); | 102 | int (*statfs) (struct dentry *, struct kstatfs *); |
103 | int (*remount_fs) (struct super_block *, int *, char *); | 103 | int (*remount_fs) (struct super_block *, int *, char *); |
104 | void (*clear_inode) (struct inode *); | 104 | void (*clear_inode) (struct inode *); |
105 | void (*umount_begin) (struct super_block *); | 105 | void (*umount_begin) (struct super_block *); |
@@ -142,15 +142,16 @@ see also dquot_operations section. | |||
142 | 142 | ||
143 | --------------------------- file_system_type --------------------------- | 143 | --------------------------- file_system_type --------------------------- |
144 | prototypes: | 144 | prototypes: |
145 | struct super_block *(*get_sb) (struct file_system_type *, int, | 145 | struct int (*get_sb) (struct file_system_type *, int, |
146 | const char *, void *); | 146 | const char *, void *, struct vfsmount *); |
147 | void (*kill_sb) (struct super_block *); | 147 | void (*kill_sb) (struct super_block *); |
148 | locking rules: | 148 | locking rules: |
149 | may block BKL | 149 | may block BKL |
150 | get_sb yes yes | 150 | get_sb yes yes |
151 | kill_sb yes yes | 151 | kill_sb yes yes |
152 | 152 | ||
153 | ->get_sb() returns error or a locked superblock (exclusive on ->s_umount). | 153 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount |
154 | (exclusive on ->s_umount). | ||
154 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, | 155 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, |
155 | unlocks and drops the reference. | 156 | unlocks and drops the reference. |
156 | 157 | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 2f388460cbe7..5531694059ab 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -50,10 +50,11 @@ Turn your foo_read_super() into a function that would return 0 in case of | |||
50 | success and negative number in case of error (-EINVAL unless you have more | 50 | success and negative number in case of error (-EINVAL unless you have more |
51 | informative error value to report). Call it foo_fill_super(). Now declare | 51 | informative error value to report). Call it foo_fill_super(). Now declare |
52 | 52 | ||
53 | struct super_block foo_get_sb(struct file_system_type *fs_type, | 53 | int foo_get_sb(struct file_system_type *fs_type, |
54 | int flags, const char *dev_name, void *data) | 54 | int flags, const char *dev_name, void *data, struct vfsmount *mnt) |
55 | { | 55 | { |
56 | return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super); | 56 | return get_sb_bdev(fs_type, flags, dev_name, data, foo_fill_super, |
57 | mnt); | ||
57 | } | 58 | } |
58 | 59 | ||
59 | (or similar with s/bdev/nodev/ or s/bdev/single/, depending on the kind of | 60 | (or similar with s/bdev/nodev/ or s/bdev/single/, depending on the kind of |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 3a2e5520c1e3..9d3aed628bc1 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -113,8 +113,8 @@ members are defined: | |||
113 | struct file_system_type { | 113 | struct file_system_type { |
114 | const char *name; | 114 | const char *name; |
115 | int fs_flags; | 115 | int fs_flags; |
116 | struct super_block *(*get_sb) (struct file_system_type *, int, | 116 | struct int (*get_sb) (struct file_system_type *, int, |
117 | const char *, void *); | 117 | const char *, void *, struct vfsmount *); |
118 | void (*kill_sb) (struct super_block *); | 118 | void (*kill_sb) (struct super_block *); |
119 | struct module *owner; | 119 | struct module *owner; |
120 | struct file_system_type * next; | 120 | struct file_system_type * next; |
@@ -211,7 +211,7 @@ struct super_operations { | |||
211 | int (*sync_fs)(struct super_block *sb, int wait); | 211 | int (*sync_fs)(struct super_block *sb, int wait); |
212 | void (*write_super_lockfs) (struct super_block *); | 212 | void (*write_super_lockfs) (struct super_block *); |
213 | void (*unlockfs) (struct super_block *); | 213 | void (*unlockfs) (struct super_block *); |
214 | int (*statfs) (struct super_block *, struct kstatfs *); | 214 | int (*statfs) (struct dentry *, struct kstatfs *); |
215 | int (*remount_fs) (struct super_block *, int *, char *); | 215 | int (*remount_fs) (struct super_block *, int *, char *); |
216 | void (*clear_inode) (struct inode *); | 216 | void (*clear_inode) (struct inode *); |
217 | void (*umount_begin) (struct super_block *); | 217 | void (*umount_begin) (struct super_block *); |
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru new file mode 100644 index 000000000000..69cdb527d58f --- /dev/null +++ b/Documentation/hwmon/abituguru | |||
@@ -0,0 +1,59 @@ | |||
1 | Kernel driver abituguru | ||
2 | ======================= | ||
3 | |||
4 | Supported chips: | ||
5 | * Abit uGuru (Hardware Monitor part only) | ||
6 | Prefix: 'abituguru' | ||
7 | Addresses scanned: ISA 0x0E0 | ||
8 | Datasheet: Not available, this driver is based on reverse engineering. | ||
9 | A "Datasheet" has been written based on the reverse engineering it | ||
10 | should be available in the same dir as this file under the name | ||
11 | abituguru-datasheet. | ||
12 | |||
13 | Authors: | ||
14 | Hans de Goede <j.w.r.degoede@hhs.nl>, | ||
15 | (Initial reverse engineering done by Olle Sandberg | ||
16 | <ollebull@gmail.com>) | ||
17 | |||
18 | |||
19 | Module Parameters | ||
20 | ----------------- | ||
21 | |||
22 | * force: bool Force detection. Note this parameter only causes the | ||
23 | detection to be skipped, if the uGuru can't be read | ||
24 | the module initialization (insmod) will still fail. | ||
25 | * fan_sensors: int Tell the driver how many fan speed sensors there are | ||
26 | on your motherboard. Default: 0 (autodetect). | ||
27 | * pwms: int Tell the driver how many fan speed controls (fan | ||
28 | pwms) your motherboard has. Default: 0 (autodetect). | ||
29 | * verbose: int How verbose should the driver be? (0-3): | ||
30 | 0 normal output | ||
31 | 1 + verbose error reporting | ||
32 | 2 + sensors type probing info\n" | ||
33 | 3 + retryable error reporting | ||
34 | Default: 2 (the driver is still in the testing phase) | ||
35 | |||
36 | Notice if you need any of the first three options above please insmod the | ||
37 | driver with verbose set to 3 and mail me <j.w.r.degoede@hhs.nl> the output of: | ||
38 | dmesg | grep abituguru | ||
39 | |||
40 | |||
41 | Description | ||
42 | ----------- | ||
43 | |||
44 | This driver supports the hardware monitoring features of the Abit uGuru chip | ||
45 | found on Abit uGuru featuring motherboards (most modern Abit motherboards). | ||
46 | |||
47 | The uGuru chip in reality is a Winbond W83L950D in disguise (despite Abit | ||
48 | claiming it is "a new microprocessor designed by the ABIT Engineers"). | ||
49 | Unfortunatly this doesn't help since the W83L950D is a generic | ||
50 | microcontroller with a custom Abit application running on it. | ||
51 | |||
52 | Despite Abit not releasing any information regarding the uGuru, Olle | ||
53 | Sandberg <ollebull@gmail.com> has managed to reverse engineer the sensor part | ||
54 | of the uGuru. Without his work this driver would not have been possible. | ||
55 | |||
56 | Known Issues | ||
57 | ------------ | ||
58 | |||
59 | The voltage and frequency control parts of the Abit uGuru are not supported. | ||
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet new file mode 100644 index 000000000000..aef5a9b36846 --- /dev/null +++ b/Documentation/hwmon/abituguru-datasheet | |||
@@ -0,0 +1,312 @@ | |||
1 | uGuru datasheet | ||
2 | =============== | ||
3 | |||
4 | First of all, what I know about uGuru is no fact based on any help, hints or | ||
5 | datasheet from Abit. The data I have got on uGuru have I assembled through | ||
6 | my weak knowledge in "backwards engineering". | ||
7 | And just for the record, you may have noticed uGuru isn't a chip developed by | ||
8 | Abit, as they claim it to be. It's realy just an microprocessor (uC) created by | ||
9 | Winbond (W83L950D). And no, reading the manual for this specific uC or | ||
10 | mailing Windbond for help won't give any usefull data about uGuru, as it is | ||
11 | the program inside the uC that is responding to calls. | ||
12 | |||
13 | Olle Sandberg <ollebull@gmail.com>, 2005-05-25 | ||
14 | |||
15 | |||
16 | Original version by Olle Sandberg who did the heavy lifting of the initial | ||
17 | reverse engineering. This version has been almost fully rewritten for clarity | ||
18 | and extended with write support and info on more databanks, the write support | ||
19 | is once again reverse engineered by Olle the additional databanks have been | ||
20 | reverse engineered by me. I would like to express my thanks to Olle, this | ||
21 | document and the Linux driver could not have been written without his efforts. | ||
22 | |||
23 | Note: because of the lack of specs only the sensors part of the uGuru is | ||
24 | described here and not the CPU / RAM / etc voltage & frequency control. | ||
25 | |||
26 | Hans de Goede <j.w.r.degoede@hhs.nl>, 28-01-2006 | ||
27 | |||
28 | |||
29 | Detection | ||
30 | ========= | ||
31 | |||
32 | As far as known the uGuru is always placed at and using the (ISA) I/O-ports | ||
33 | 0xE0 and 0xE4, so we don't have to scan any port-range, just check what the two | ||
34 | ports are holding for detection. We will refer to 0xE0 as CMD (command-port) | ||
35 | and 0xE4 as DATA because Abit refers to them with these names. | ||
36 | |||
37 | If DATA holds 0x00 or 0x08 and CMD holds 0x00 or 0xAC an uGuru could be | ||
38 | present. We have to check for two different values at data-port, because | ||
39 | after a reboot uGuru will hold 0x00 here, but if the driver is removed and | ||
40 | later on attached again data-port will hold 0x08, more about this later. | ||
41 | |||
42 | After wider testing of the Linux kernel driver some variants of the uGuru have | ||
43 | turned up which will hold 0x00 instead of 0xAC at the CMD port, thus we also | ||
44 | have to test CMD for two different values. On these uGuru's DATA will initally | ||
45 | hold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be read | ||
46 | first! | ||
47 | |||
48 | To be really sure an uGuru is present a test read of one or more register | ||
49 | sets should be done. | ||
50 | |||
51 | |||
52 | Reading / Writing | ||
53 | ================= | ||
54 | |||
55 | Addressing | ||
56 | ---------- | ||
57 | |||
58 | The uGuru has a number of different addressing levels. The first addressing | ||
59 | level we will call banks. A bank holds data for one or more sensors. The data | ||
60 | in a bank for a sensor is one or more bytes large. | ||
61 | |||
62 | The number of bytes is fixed for a given bank, you should always read or write | ||
63 | that many bytes, reading / writing more will fail, the results when writing | ||
64 | less then the number of bytes for a given bank are undetermined. | ||
65 | |||
66 | See below for all known bank addresses, numbers of sensors in that bank, | ||
67 | number of bytes data per sensor and contents/meaning of those bytes. | ||
68 | |||
69 | Although both this document and the kernel driver have kept the sensor | ||
70 | terminoligy for the addressing within a bank this is not 100% correct, in | ||
71 | bank 0x24 for example the addressing within the bank selects a PWM output not | ||
72 | a sensor. | ||
73 | |||
74 | Notice that some banks have both a read and a write address this is how the | ||
75 | uGuru determines if a read from or a write to the bank is taking place, thus | ||
76 | when reading you should always use the read address and when writing the | ||
77 | write address. The write address is always one (1) more then the read address. | ||
78 | |||
79 | |||
80 | uGuru ready | ||
81 | ----------- | ||
82 | |||
83 | Before you can read from or write to the uGuru you must first put the uGuru | ||
84 | in "ready" mode. | ||
85 | |||
86 | To put the uGuru in ready mode first write 0x00 to DATA and then wait for DATA | ||
87 | to hold 0x09, DATA should read 0x09 within 250 read cycles. | ||
88 | |||
89 | Next CMD _must_ be read and should hold 0xAC, usually CMD will hold 0xAC the | ||
90 | first read but sometimes it takes a while before CMD holds 0xAC and thus it | ||
91 | has to be read a number of times (max 50). | ||
92 | |||
93 | After reading CMD, DATA should hold 0x08 which means that the uGuru is ready | ||
94 | for input. As above DATA will usually hold 0x08 the first read but not always. | ||
95 | This step can be skipped, but it is undetermined what happens if the uGuru has | ||
96 | not yet reported 0x08 at DATA and you proceed with writing a bank address. | ||
97 | |||
98 | |||
99 | Sending bank and sensor addresses to the uGuru | ||
100 | ---------------------------------------------- | ||
101 | |||
102 | First the uGuru must be in "ready" mode as described above, DATA should hold | ||
103 | 0x08 indicating that the uGuru wants input, in this case the bank address. | ||
104 | |||
105 | Next write the bank address to DATA. After the bank address has been written | ||
106 | wait for to DATA to hold 0x08 again indicating that it wants / is ready for | ||
107 | more input (max 250 reads). | ||
108 | |||
109 | Once DATA holds 0x08 again write the sensor address to CMD. | ||
110 | |||
111 | |||
112 | Reading | ||
113 | ------- | ||
114 | |||
115 | First send the bank and sensor addresses as described above. | ||
116 | Then for each byte of data you want to read wait for DATA to hold 0x01 | ||
117 | which indicates that the uGuru is ready to be read (max 250 reads) and once | ||
118 | DATA holds 0x01 read the byte from CMD. | ||
119 | |||
120 | Once all bytes have been read data will hold 0x09, but there is no reason to | ||
121 | test for this. Notice that the number of bytes is bank address dependent see | ||
122 | above and below. | ||
123 | |||
124 | After completing a successfull read it is advised to put the uGuru back in | ||
125 | ready mode, so that it is ready for the next read / write cycle. This way | ||
126 | if your program / driver is unloaded and later loaded again the detection | ||
127 | algorithm described above will still work. | ||
128 | |||
129 | |||
130 | |||
131 | Writing | ||
132 | ------- | ||
133 | |||
134 | First send the bank and sensor addresses as described above. | ||
135 | Then for each byte of data you want to write wait for DATA to hold 0x00 | ||
136 | which indicates that the uGuru is ready to be written (max 250 reads) and | ||
137 | once DATA holds 0x00 write the byte to CMD. | ||
138 | |||
139 | Once all bytes have been written wait for DATA to hold 0x01 (max 250 reads) | ||
140 | don't ask why this is the way it is. | ||
141 | |||
142 | Once DATA holds 0x01 read CMD it should hold 0xAC now. | ||
143 | |||
144 | After completing a successfull write it is advised to put the uGuru back in | ||
145 | ready mode, so that it is ready for the next read / write cycle. This way | ||
146 | if your program / driver is unloaded and later loaded again the detection | ||
147 | algorithm described above will still work. | ||
148 | |||
149 | |||
150 | Gotchas | ||
151 | ------- | ||
152 | |||
153 | After wider testing of the Linux kernel driver some variants of the uGuru have | ||
154 | turned up which do not hold 0x08 at DATA within 250 reads after writing the | ||
155 | bank address. With these versions this happens quite frequent, using larger | ||
156 | timeouts doesn't help, they just go offline for a second or 2, doing some | ||
157 | internal callibration or whatever. Your code should be prepared to handle | ||
158 | this and in case of no response in this specific case just goto sleep for a | ||
159 | while and then retry. | ||
160 | |||
161 | |||
162 | Address Map | ||
163 | =========== | ||
164 | |||
165 | Bank 0x20 Alarms (R) | ||
166 | -------------------- | ||
167 | This bank contains 0 sensors, iow the sensor address is ignored (but must be | ||
168 | written) just use 0. Bank 0x20 contains 3 bytes: | ||
169 | |||
170 | Byte 0: | ||
171 | This byte holds the alarm flags for sensor 0-7 of Sensor Bank1, with bit 0 | ||
172 | corresponding to sensor 0, 1 to 1, etc. | ||
173 | |||
174 | Byte 1: | ||
175 | This byte holds the alarm flags for sensor 8-15 of Sensor Bank1, with bit 0 | ||
176 | corresponding to sensor 8, 1 to 9, etc. | ||
177 | |||
178 | Byte 2: | ||
179 | This byte holds the alarm flags for sensor 0-5 of Sensor Bank2, with bit 0 | ||
180 | corresponding to sensor 0, 1 to 1, etc. | ||
181 | |||
182 | |||
183 | Bank 0x21 Sensor Bank1 Values / Readings (R) | ||
184 | -------------------------------------------- | ||
185 | This bank contains 16 sensors, for each sensor it contains 1 byte. | ||
186 | So far the following sensors are known to be available on all motherboards: | ||
187 | Sensor 0 CPU temp | ||
188 | Sensor 1 SYS temp | ||
189 | Sensor 3 CPU core volt | ||
190 | Sensor 4 DDR volt | ||
191 | Sensor 10 DDR Vtt volt | ||
192 | Sensor 15 PWM temp | ||
193 | |||
194 | Byte 0: | ||
195 | This byte holds the reading from the sensor. Sensors in Bank1 can be both | ||
196 | volt and temp sensors, this is motherboard specific. The uGuru however does | ||
197 | seem to know (be programmed with) what kindoff sensor is attached see Sensor | ||
198 | Bank1 Settings description. | ||
199 | |||
200 | Volt sensors use a linear scale, a reading 0 corresponds with 0 volt and a | ||
201 | reading of 255 with 3494 mV. The sensors for higher voltages however are | ||
202 | connected through a division circuit. The currently known division circuits | ||
203 | in use result in ranges of: 0-4361mV, 0-6248mV or 0-14510mV. 3.3 volt sources | ||
204 | use the 0-4361mV range, 5 volt the 0-6248mV and 12 volt the 0-14510mV . | ||
205 | |||
206 | Temp sensors also use a linear scale, a reading of 0 corresponds with 0 degree | ||
207 | Celsius and a reading of 255 with a reading of 255 degrees Celsius. | ||
208 | |||
209 | |||
210 | Bank 0x22 Sensor Bank1 Settings (R) | ||
211 | Bank 0x23 Sensor Bank1 Settings (W) | ||
212 | ----------------------------------- | ||
213 | |||
214 | This bank contains 16 sensors, for each sensor it contains 3 bytes. Each | ||
215 | set of 3 bytes contains the settings for the sensor with the same sensor | ||
216 | address in Bank 0x21 . | ||
217 | |||
218 | Byte 0: | ||
219 | Alarm behaviour for the selected sensor. A 1 enables the described behaviour. | ||
220 | Bit 0: Give an alarm if measured temp is over the warning threshold (RW) * | ||
221 | Bit 1: Give an alarm if measured volt is over the max threshold (RW) ** | ||
222 | Bit 2: Give an alarm if measured volt is under the min threshold (RW) ** | ||
223 | Bit 3: Beep if alarm (RW) | ||
224 | Bit 4: 1 if alarm cause measured temp is over the warning threshold (R) | ||
225 | Bit 5: 1 if alarm cause measured volt is over the max threshold (R) | ||
226 | Bit 6: 1 if alarm cause measured volt is under the min threshold (R) | ||
227 | Bit 7: Volt sensor: Shutdown if alarm persist for more then 4 seconds (RW) | ||
228 | Temp sensor: Shutdown if temp is over the shutdown threshold (RW) | ||
229 | |||
230 | * This bit is only honored/used by the uGuru if a temp sensor is connected | ||
231 | ** This bit is only honored/used by the uGuru if a volt sensor is connected | ||
232 | Note with some trickery this can be used to find out what kinda sensor is | ||
233 | detected see the Linux kernel driver for an example with many comments on | ||
234 | how todo this. | ||
235 | |||
236 | Byte 1: | ||
237 | Temp sensor: warning threshold (scale as bank 0x21) | ||
238 | Volt sensor: min threshold (scale as bank 0x21) | ||
239 | |||
240 | Byte 2: | ||
241 | Temp sensor: shutdown threshold (scale as bank 0x21) | ||
242 | Volt sensor: max threshold (scale as bank 0x21) | ||
243 | |||
244 | |||
245 | Bank 0x24 PWM outputs for FAN's (R) | ||
246 | Bank 0x25 PWM outputs for FAN's (W) | ||
247 | ----------------------------------- | ||
248 | |||
249 | This bank contains 3 "sensors", for each sensor it contains 5 bytes. | ||
250 | Sensor 0 usually controls the CPU fan | ||
251 | Sensor 1 usually controls the NB (or chipset for single chip) fan | ||
252 | Sensor 2 usually controls the System fan | ||
253 | |||
254 | Byte 0: | ||
255 | Flag 0x80 to enable control, Fan runs at 100% when disabled. | ||
256 | low nibble (temp)sensor address at bank 0x21 used for control. | ||
257 | |||
258 | Byte 1: | ||
259 | 0-255 = 0-12v (linear), specify voltage at which fan will rotate when under | ||
260 | low threshold temp (specified in byte 3) | ||
261 | |||
262 | Byte 2: | ||
263 | 0-255 = 0-12v (linear), specify voltage at which fan will rotate when above | ||
264 | high threshold temp (specified in byte 4) | ||
265 | |||
266 | Byte 3: | ||
267 | Low threshold temp (scale as bank 0x21) | ||
268 | |||
269 | byte 4: | ||
270 | High threshold temp (scale as bank 0x21) | ||
271 | |||
272 | |||
273 | Bank 0x26 Sensors Bank2 Values / Readings (R) | ||
274 | --------------------------------------------- | ||
275 | |||
276 | This bank contains 6 sensors (AFAIK), for each sensor it contains 1 byte. | ||
277 | So far the following sensors are known to be available on all motherboards: | ||
278 | Sensor 0: CPU fan speed | ||
279 | Sensor 1: NB (or chipset for single chip) fan speed | ||
280 | Sensor 2: SYS fan speed | ||
281 | |||
282 | Byte 0: | ||
283 | This byte holds the reading from the sensor. 0-255 = 0-15300 (linear) | ||
284 | |||
285 | |||
286 | Bank 0x27 Sensors Bank2 Settings (R) | ||
287 | Bank 0x28 Sensors Bank2 Settings (W) | ||
288 | ------------------------------------ | ||
289 | |||
290 | This bank contains 6 sensors (AFAIK), for each sensor it contains 2 bytes. | ||
291 | |||
292 | Byte 0: | ||
293 | Alarm behaviour for the selected sensor. A 1 enables the described behaviour. | ||
294 | Bit 0: Give an alarm if measured rpm is under the min threshold (RW) | ||
295 | Bit 3: Beep if alarm (RW) | ||
296 | Bit 7: Shutdown if alarm persist for more then 4 seconds (RW) | ||
297 | |||
298 | Byte 1: | ||
299 | min threshold (scale as bank 0x26) | ||
300 | |||
301 | |||
302 | Warning for the adventerous | ||
303 | =========================== | ||
304 | |||
305 | A word of caution to those who want to experiment and see if they can figure | ||
306 | the voltage / clock programming out, I tried reading and only reading banks | ||
307 | 0-0x30 with the reading code used for the sensor banks (0x20-0x28) and this | ||
308 | resulted in a _permanent_ reprogramming of the voltages, luckily I had the | ||
309 | sensors part configured so that it would shutdown my system on any out of spec | ||
310 | voltages which proprably safed my computer (after a reboot I managed to | ||
311 | immediatly enter the bios and reload the defaults). This probably means that | ||
312 | the read/write cycle for the non sensor part is different from the sensor part. | ||
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70 new file mode 100644 index 000000000000..2bdd3feebf53 --- /dev/null +++ b/Documentation/hwmon/lm70 | |||
@@ -0,0 +1,31 @@ | |||
1 | Kernel driver lm70 | ||
2 | ================== | ||
3 | |||
4 | Supported chip: | ||
5 | * National Semiconductor LM70 | ||
6 | Datasheet: http://www.national.com/pf/LM/LM70.html | ||
7 | |||
8 | Author: | ||
9 | Kaiwan N Billimoria <kaiwan@designergraphix.com> | ||
10 | |||
11 | Description | ||
12 | ----------- | ||
13 | |||
14 | This driver implements support for the National Semiconductor LM70 | ||
15 | temperature sensor. | ||
16 | |||
17 | The LM70 temperature sensor chip supports a single temperature sensor. | ||
18 | It communicates with a host processor (or microcontroller) via an | ||
19 | SPI/Microwire Bus interface. | ||
20 | |||
21 | Communication with the LM70 is simple: when the temperature is to be sensed, | ||
22 | the driver accesses the LM70 using SPI communication: 16 SCLK cycles | ||
23 | comprise the MOSI/MISO loop. At the end of the transfer, the 11-bit 2's | ||
24 | complement digital temperature (sent via the SIO line), is available in the | ||
25 | driver for interpretation. This driver makes use of the kernel's in-core | ||
26 | SPI support. | ||
27 | |||
28 | Thanks to | ||
29 | --------- | ||
30 | Jean Delvare <khali@linux-fr.org> for mentoring the hwmon-side driver | ||
31 | development. | ||
diff --git a/Documentation/hwmon/lm83 b/Documentation/hwmon/lm83 index 061d9ed8ff43..f7aad1489cb0 100644 --- a/Documentation/hwmon/lm83 +++ b/Documentation/hwmon/lm83 | |||
@@ -7,6 +7,10 @@ Supported chips: | |||
7 | Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e | 7 | Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e |
8 | Datasheet: Publicly available at the National Semiconductor website | 8 | Datasheet: Publicly available at the National Semiconductor website |
9 | http://www.national.com/pf/LM/LM83.html | 9 | http://www.national.com/pf/LM/LM83.html |
10 | * National Semiconductor LM82 | ||
11 | Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e | ||
12 | Datasheet: Publicly available at the National Semiconductor website | ||
13 | http://www.national.com/pf/LM/LM82.html | ||
10 | 14 | ||
11 | 15 | ||
12 | Author: Jean Delvare <khali@linux-fr.org> | 16 | Author: Jean Delvare <khali@linux-fr.org> |
@@ -15,10 +19,11 @@ Description | |||
15 | ----------- | 19 | ----------- |
16 | 20 | ||
17 | The LM83 is a digital temperature sensor. It senses its own temperature as | 21 | The LM83 is a digital temperature sensor. It senses its own temperature as |
18 | well as the temperature of up to three external diodes. It is compatible | 22 | well as the temperature of up to three external diodes. The LM82 is |
19 | with many other devices such as the LM84 and all other ADM1021 clones. | 23 | a stripped down version of the LM83 that only supports one external diode. |
20 | The main difference between the LM83 and the LM84 in that the later can | 24 | Both are compatible with many other devices such as the LM84 and all |
21 | only sense the temperature of one external diode. | 25 | other ADM1021 clones. The main difference between the LM83 and the LM84 |
26 | in that the later can only sense the temperature of one external diode. | ||
22 | 27 | ||
23 | Using the adm1021 driver for a LM83 should work, but only two temperatures | 28 | Using the adm1021 driver for a LM83 should work, but only two temperatures |
24 | will be reported instead of four. | 29 | will be reported instead of four. |
@@ -30,12 +35,16 @@ contact us. Note that the LM90 can easily be misdetected as a LM83. | |||
30 | 35 | ||
31 | Confirmed motherboards: | 36 | Confirmed motherboards: |
32 | SBS P014 | 37 | SBS P014 |
38 | SBS PSL09 | ||
33 | 39 | ||
34 | Unconfirmed motherboards: | 40 | Unconfirmed motherboards: |
35 | Gigabyte GA-8IK1100 | 41 | Gigabyte GA-8IK1100 |
36 | Iwill MPX2 | 42 | Iwill MPX2 |
37 | Soltek SL-75DRV5 | 43 | Soltek SL-75DRV5 |
38 | 44 | ||
45 | The LM82 is confirmed to have been found on most AMD Geode reference | ||
46 | designs and test platforms. | ||
47 | |||
39 | The driver has been successfully tested by Magnus Forsström, who I'd | 48 | The driver has been successfully tested by Magnus Forsström, who I'd |
40 | like to thank here. More testers will be of course welcome. | 49 | like to thank here. More testers will be of course welcome. |
41 | 50 | ||
diff --git a/Documentation/hwmon/smsc47m192 b/Documentation/hwmon/smsc47m192 new file mode 100644 index 000000000000..45d6453cd435 --- /dev/null +++ b/Documentation/hwmon/smsc47m192 | |||
@@ -0,0 +1,102 @@ | |||
1 | Kernel driver smsc47m192 | ||
2 | ======================== | ||
3 | |||
4 | Supported chips: | ||
5 | * SMSC LPC47M192 and LPC47M997 | ||
6 | Prefix: 'smsc47m192' | ||
7 | Addresses scanned: I2C 0x2c - 0x2d | ||
8 | Datasheet: The datasheet for LPC47M192 is publicly available from | ||
9 | http://www.smsc.com/ | ||
10 | The LPC47M997 is compatible for hardware monitoring. | ||
11 | |||
12 | Author: Hartmut Rick <linux@rick.claranet.de> | ||
13 | Special thanks to Jean Delvare for careful checking | ||
14 | of the code and many helpful comments and suggestions. | ||
15 | |||
16 | |||
17 | Description | ||
18 | ----------- | ||
19 | |||
20 | This driver implements support for the hardware sensor capabilities | ||
21 | of the SMSC LPC47M192 and LPC47M997 Super-I/O chips. | ||
22 | |||
23 | These chips support 3 temperature channels and 8 voltage inputs | ||
24 | as well as CPU voltage VID input. | ||
25 | |||
26 | They do also have fan monitoring and control capabilities, but the | ||
27 | these features are accessed via ISA bus and are not supported by this | ||
28 | driver. Use the 'smsc47m1' driver for fan monitoring and control. | ||
29 | |||
30 | Voltages and temperatures are measured by an 8-bit ADC, the resolution | ||
31 | of the temperatures is 1 bit per degree C. | ||
32 | Voltages are scaled such that the nominal voltage corresponds to | ||
33 | 192 counts, i.e. 3/4 of the full range. Thus the available range for | ||
34 | each voltage channel is 0V ... 255/192*(nominal voltage), the resolution | ||
35 | is 1 bit per (nominal voltage)/192. | ||
36 | Both voltage and temperature values are scaled by 1000, the sys files | ||
37 | show voltages in mV and temperatures in units of 0.001 degC. | ||
38 | |||
39 | The +12V analog voltage input channel (in4_input) is multiplexed with | ||
40 | bit 4 of the encoded CPU voltage. This means that you either get | ||
41 | a +12V voltage measurement or a 5 bit CPU VID, but not both. | ||
42 | The default setting is to use the pin as 12V input, and use only 4 bit VID. | ||
43 | This driver assumes that the information in the configuration register | ||
44 | is correct, i.e. that the BIOS has updated the configuration if | ||
45 | the motherboard has this input wired to VID4. | ||
46 | |||
47 | The temperature and voltage readings are updated once every 1.5 seconds. | ||
48 | Reading them more often repeats the same values. | ||
49 | |||
50 | |||
51 | sysfs interface | ||
52 | --------------- | ||
53 | |||
54 | in0_input - +2.5V voltage input | ||
55 | in1_input - CPU voltage input (nominal 2.25V) | ||
56 | in2_input - +3.3V voltage input | ||
57 | in3_input - +5V voltage input | ||
58 | in4_input - +12V voltage input (may be missing if used as VID4) | ||
59 | in5_input - Vcc voltage input (nominal 3.3V) | ||
60 | This is the supply voltage of the sensor chip itself. | ||
61 | in6_input - +1.5V voltage input | ||
62 | in7_input - +1.8V voltage input | ||
63 | |||
64 | in[0-7]_min, | ||
65 | in[0-7]_max - lower and upper alarm thresholds for in[0-7]_input reading | ||
66 | |||
67 | All voltages are read and written in mV. | ||
68 | |||
69 | in[0-7]_alarm - alarm flags for voltage inputs | ||
70 | These files read '1' in case of alarm, '0' otherwise. | ||
71 | |||
72 | temp1_input - chip temperature measured by on-chip diode | ||
73 | temp[2-3]_input - temperature measured by external diodes (one of these would | ||
74 | typically be wired to the diode inside the CPU) | ||
75 | |||
76 | temp[1-3]_min, | ||
77 | temp[1-3]_max - lower and upper alarm thresholds for temperatures | ||
78 | |||
79 | temp[1-3]_offset - temperature offset registers | ||
80 | The chip adds the offsets stored in these registers to | ||
81 | the corresponding temperature readings. | ||
82 | Note that temp1 and temp2 offsets share the same register, | ||
83 | they cannot both be different from zero at the same time. | ||
84 | Writing a non-zero number to one of them will reset the other | ||
85 | offset to zero. | ||
86 | |||
87 | All temperatures and offsets are read and written in | ||
88 | units of 0.001 degC. | ||
89 | |||
90 | temp[1-3]_alarm - alarm flags for temperature inputs, '1' in case of alarm, | ||
91 | '0' otherwise. | ||
92 | temp[2-3]_input_fault - diode fault flags for temperature inputs 2 and 3. | ||
93 | A fault is detected if the two pins for the corresponding | ||
94 | sensor are open or shorted, or any of the two is shorted | ||
95 | to ground or Vcc. '1' indicates a diode fault. | ||
96 | |||
97 | cpu0_vid - CPU voltage as received from the CPU | ||
98 | |||
99 | vrm - CPU VID standard used for decoding CPU voltage | ||
100 | |||
101 | The *_min, *_max, *_offset and vrm files can be read and | ||
102 | written, all others are read-only. | ||
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index a0d0ab24288e..d1d390aaf620 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -3,15 +3,15 @@ Naming and data format standards for sysfs files | |||
3 | 3 | ||
4 | The libsensors library offers an interface to the raw sensors data | 4 | The libsensors library offers an interface to the raw sensors data |
5 | through the sysfs interface. See libsensors documentation and source for | 5 | through the sysfs interface. See libsensors documentation and source for |
6 | more further information. As of writing this document, libsensors | 6 | further information. As of writing this document, libsensors |
7 | (from lm_sensors 2.8.3) is heavily chip-dependant. Adding or updating | 7 | (from lm_sensors 2.8.3) is heavily chip-dependent. Adding or updating |
8 | support for any given chip requires modifying the library's code. | 8 | support for any given chip requires modifying the library's code. |
9 | This is because libsensors was written for the procfs interface | 9 | This is because libsensors was written for the procfs interface |
10 | older kernel modules were using, which wasn't standardized enough. | 10 | older kernel modules were using, which wasn't standardized enough. |
11 | Recent versions of libsensors (from lm_sensors 2.8.2 and later) have | 11 | Recent versions of libsensors (from lm_sensors 2.8.2 and later) have |
12 | support for the sysfs interface, though. | 12 | support for the sysfs interface, though. |
13 | 13 | ||
14 | The new sysfs interface was designed to be as chip-independant as | 14 | The new sysfs interface was designed to be as chip-independent as |
15 | possible. | 15 | possible. |
16 | 16 | ||
17 | Note that motherboards vary widely in the connections to sensor chips. | 17 | Note that motherboards vary widely in the connections to sensor chips. |
@@ -24,7 +24,7 @@ range using external resistors. Since the values of these resistors | |||
24 | can change from motherboard to motherboard, the conversions cannot be | 24 | can change from motherboard to motherboard, the conversions cannot be |
25 | hard coded into the driver and have to be done in user space. | 25 | hard coded into the driver and have to be done in user space. |
26 | 26 | ||
27 | For this reason, even if we aim at a chip-independant libsensors, it will | 27 | For this reason, even if we aim at a chip-independent libsensors, it will |
28 | still require a configuration file (e.g. /etc/sensors.conf) for proper | 28 | still require a configuration file (e.g. /etc/sensors.conf) for proper |
29 | values conversion, labeling of inputs and hiding of unused inputs. | 29 | values conversion, labeling of inputs and hiding of unused inputs. |
30 | 30 | ||
@@ -39,15 +39,16 @@ If you are developing a userspace application please send us feedback on | |||
39 | this standard. | 39 | this standard. |
40 | 40 | ||
41 | Note that this standard isn't completely established yet, so it is subject | 41 | Note that this standard isn't completely established yet, so it is subject |
42 | to changes, even important ones. One more reason to use the library instead | 42 | to changes. If you are writing a new hardware monitoring driver those |
43 | of accessing sysfs files directly. | 43 | features can't seem to fit in this interface, please contact us with your |
44 | extension proposal. Keep in mind that backward compatibility must be | ||
45 | preserved. | ||
44 | 46 | ||
45 | Each chip gets its own directory in the sysfs /sys/devices tree. To | 47 | Each chip gets its own directory in the sysfs /sys/devices tree. To |
46 | find all sensor chips, it is easier to follow the symlinks from | 48 | find all sensor chips, it is easier to follow the device symlinks from |
47 | /sys/i2c/devices/ | 49 | /sys/class/hwmon/hwmon*. |
48 | 50 | ||
49 | All sysfs values are fixed point numbers. To get the true value of some | 51 | All sysfs values are fixed point numbers. |
50 | of the values, you should divide by the specified value. | ||
51 | 52 | ||
52 | There is only one value per file, unlike the older /proc specification. | 53 | There is only one value per file, unlike the older /proc specification. |
53 | The common scheme for files naming is: <type><number>_<item>. Usual | 54 | The common scheme for files naming is: <type><number>_<item>. Usual |
@@ -69,28 +70,40 @@ to cause an alarm) is chip-dependent. | |||
69 | 70 | ||
70 | ------------------------------------------------------------------------- | 71 | ------------------------------------------------------------------------- |
71 | 72 | ||
73 | [0-*] denotes any positive number starting from 0 | ||
74 | [1-*] denotes any positive number starting from 1 | ||
75 | RO read only value | ||
76 | RW read/write value | ||
77 | |||
78 | Read/write values may be read-only for some chips, depending on the | ||
79 | hardware implementation. | ||
80 | |||
81 | All entries are optional, and should only be created in a given driver | ||
82 | if the chip has the feature. | ||
83 | |||
72 | ************ | 84 | ************ |
73 | * Voltages * | 85 | * Voltages * |
74 | ************ | 86 | ************ |
75 | 87 | ||
76 | in[0-8]_min Voltage min value. | 88 | in[0-*]_min Voltage min value. |
77 | Unit: millivolt | 89 | Unit: millivolt |
78 | Read/Write | 90 | RW |
79 | 91 | ||
80 | in[0-8]_max Voltage max value. | 92 | in[0-*]_max Voltage max value. |
81 | Unit: millivolt | 93 | Unit: millivolt |
82 | Read/Write | 94 | RW |
83 | 95 | ||
84 | in[0-8]_input Voltage input value. | 96 | in[0-*]_input Voltage input value. |
85 | Unit: millivolt | 97 | Unit: millivolt |
86 | Read only | 98 | RO |
99 | Voltage measured on the chip pin. | ||
87 | Actual voltage depends on the scaling resistors on the | 100 | Actual voltage depends on the scaling resistors on the |
88 | motherboard, as recommended in the chip datasheet. | 101 | motherboard, as recommended in the chip datasheet. |
89 | This varies by chip and by motherboard. | 102 | This varies by chip and by motherboard. |
90 | Because of this variation, values are generally NOT scaled | 103 | Because of this variation, values are generally NOT scaled |
91 | by the chip driver, and must be done by the application. | 104 | by the chip driver, and must be done by the application. |
92 | However, some drivers (notably lm87 and via686a) | 105 | However, some drivers (notably lm87 and via686a) |
93 | do scale, with various degrees of success. | 106 | do scale, because of internal resistors built into a chip. |
94 | These drivers will output the actual voltage. | 107 | These drivers will output the actual voltage. |
95 | 108 | ||
96 | Typical usage: | 109 | Typical usage: |
@@ -104,58 +117,72 @@ in[0-8]_input Voltage input value. | |||
104 | in7_* varies | 117 | in7_* varies |
105 | in8_* varies | 118 | in8_* varies |
106 | 119 | ||
107 | cpu[0-1]_vid CPU core reference voltage. | 120 | cpu[0-*]_vid CPU core reference voltage. |
108 | Unit: millivolt | 121 | Unit: millivolt |
109 | Read only. | 122 | RO |
110 | Not always correct. | 123 | Not always correct. |
111 | 124 | ||
112 | vrm Voltage Regulator Module version number. | 125 | vrm Voltage Regulator Module version number. |
113 | Read only. | 126 | RW (but changing it should no more be necessary) |
114 | Two digit number, first is major version, second is | 127 | Originally the VRM standard version multiplied by 10, but now |
115 | minor version. | 128 | an arbitrary number, as not all standards have a version |
129 | number. | ||
116 | Affects the way the driver calculates the CPU core reference | 130 | Affects the way the driver calculates the CPU core reference |
117 | voltage from the vid pins. | 131 | voltage from the vid pins. |
118 | 132 | ||
133 | Also see the Alarms section for status flags associated with voltages. | ||
134 | |||
119 | 135 | ||
120 | ******** | 136 | ******** |
121 | * Fans * | 137 | * Fans * |
122 | ******** | 138 | ******** |
123 | 139 | ||
124 | fan[1-3]_min Fan minimum value | 140 | fan[1-*]_min Fan minimum value |
125 | Unit: revolution/min (RPM) | 141 | Unit: revolution/min (RPM) |
126 | Read/Write. | 142 | RW |
127 | 143 | ||
128 | fan[1-3]_input Fan input value. | 144 | fan[1-*]_input Fan input value. |
129 | Unit: revolution/min (RPM) | 145 | Unit: revolution/min (RPM) |
130 | Read only. | 146 | RO |
131 | 147 | ||
132 | fan[1-3]_div Fan divisor. | 148 | fan[1-*]_div Fan divisor. |
133 | Integer value in powers of two (1, 2, 4, 8, 16, 32, 64, 128). | 149 | Integer value in powers of two (1, 2, 4, 8, 16, 32, 64, 128). |
150 | RW | ||
134 | Some chips only support values 1, 2, 4 and 8. | 151 | Some chips only support values 1, 2, 4 and 8. |
135 | Note that this is actually an internal clock divisor, which | 152 | Note that this is actually an internal clock divisor, which |
136 | affects the measurable speed range, not the read value. | 153 | affects the measurable speed range, not the read value. |
137 | 154 | ||
155 | Also see the Alarms section for status flags associated with fans. | ||
156 | |||
157 | |||
138 | ******* | 158 | ******* |
139 | * PWM * | 159 | * PWM * |
140 | ******* | 160 | ******* |
141 | 161 | ||
142 | pwm[1-3] Pulse width modulation fan control. | 162 | pwm[1-*] Pulse width modulation fan control. |
143 | Integer value in the range 0 to 255 | 163 | Integer value in the range 0 to 255 |
144 | Read/Write | 164 | RW |
145 | 255 is max or 100%. | 165 | 255 is max or 100%. |
146 | 166 | ||
147 | pwm[1-3]_enable | 167 | pwm[1-*]_enable |
148 | Switch PWM on and off. | 168 | Switch PWM on and off. |
149 | Not always present even if fan*_pwm is. | 169 | Not always present even if fan*_pwm is. |
150 | 0 to turn off | 170 | 0: turn off |
151 | 1 to turn on in manual mode | 171 | 1: turn on in manual mode |
152 | 2 to turn on in automatic mode | 172 | 2+: turn on in automatic mode |
153 | Read/Write | 173 | Check individual chip documentation files for automatic mode details. |
174 | RW | ||
175 | |||
176 | pwm[1-*]_mode | ||
177 | 0: DC mode | ||
178 | 1: PWM mode | ||
179 | RW | ||
154 | 180 | ||
155 | pwm[1-*]_auto_channels_temp | 181 | pwm[1-*]_auto_channels_temp |
156 | Select which temperature channels affect this PWM output in | 182 | Select which temperature channels affect this PWM output in |
157 | auto mode. Bitfield, 1 is temp1, 2 is temp2, 4 is temp3 etc... | 183 | auto mode. Bitfield, 1 is temp1, 2 is temp2, 4 is temp3 etc... |
158 | Which values are possible depend on the chip used. | 184 | Which values are possible depend on the chip used. |
185 | RW | ||
159 | 186 | ||
160 | pwm[1-*]_auto_point[1-*]_pwm | 187 | pwm[1-*]_auto_point[1-*]_pwm |
161 | pwm[1-*]_auto_point[1-*]_temp | 188 | pwm[1-*]_auto_point[1-*]_temp |
@@ -163,6 +190,7 @@ pwm[1-*]_auto_point[1-*]_temp_hyst | |||
163 | Define the PWM vs temperature curve. Number of trip points is | 190 | Define the PWM vs temperature curve. Number of trip points is |
164 | chip-dependent. Use this for chips which associate trip points | 191 | chip-dependent. Use this for chips which associate trip points |
165 | to PWM output channels. | 192 | to PWM output channels. |
193 | RW | ||
166 | 194 | ||
167 | OR | 195 | OR |
168 | 196 | ||
@@ -172,50 +200,57 @@ temp[1-*]_auto_point[1-*]_temp_hyst | |||
172 | Define the PWM vs temperature curve. Number of trip points is | 200 | Define the PWM vs temperature curve. Number of trip points is |
173 | chip-dependent. Use this for chips which associate trip points | 201 | chip-dependent. Use this for chips which associate trip points |
174 | to temperature channels. | 202 | to temperature channels. |
203 | RW | ||
175 | 204 | ||
176 | 205 | ||
177 | **************** | 206 | **************** |
178 | * Temperatures * | 207 | * Temperatures * |
179 | **************** | 208 | **************** |
180 | 209 | ||
181 | temp[1-3]_type Sensor type selection. | 210 | temp[1-*]_type Sensor type selection. |
182 | Integers 1 to 4 or thermistor Beta value (typically 3435) | 211 | Integers 1 to 4 or thermistor Beta value (typically 3435) |
183 | Read/Write. | 212 | RW |
184 | 1: PII/Celeron Diode | 213 | 1: PII/Celeron Diode |
185 | 2: 3904 transistor | 214 | 2: 3904 transistor |
186 | 3: thermal diode | 215 | 3: thermal diode |
187 | 4: thermistor (default/unknown Beta) | 216 | 4: thermistor (default/unknown Beta) |
188 | Not all types are supported by all chips | 217 | Not all types are supported by all chips |
189 | 218 | ||
190 | temp[1-4]_max Temperature max value. | 219 | temp[1-*]_max Temperature max value. |
191 | Unit: millidegree Celcius | 220 | Unit: millidegree Celsius (or millivolt, see below) |
192 | Read/Write value. | 221 | RW |
193 | 222 | ||
194 | temp[1-3]_min Temperature min value. | 223 | temp[1-*]_min Temperature min value. |
195 | Unit: millidegree Celcius | 224 | Unit: millidegree Celsius |
196 | Read/Write value. | 225 | RW |
197 | 226 | ||
198 | temp[1-3]_max_hyst | 227 | temp[1-*]_max_hyst |
199 | Temperature hysteresis value for max limit. | 228 | Temperature hysteresis value for max limit. |
200 | Unit: millidegree Celcius | 229 | Unit: millidegree Celsius |
201 | Must be reported as an absolute temperature, NOT a delta | 230 | Must be reported as an absolute temperature, NOT a delta |
202 | from the max value. | 231 | from the max value. |
203 | Read/Write value. | 232 | RW |
204 | 233 | ||
205 | temp[1-4]_input Temperature input value. | 234 | temp[1-*]_input Temperature input value. |
206 | Unit: millidegree Celcius | 235 | Unit: millidegree Celsius |
207 | Read only value. | 236 | RO |
208 | 237 | ||
209 | temp[1-4]_crit Temperature critical value, typically greater than | 238 | temp[1-*]_crit Temperature critical value, typically greater than |
210 | corresponding temp_max values. | 239 | corresponding temp_max values. |
211 | Unit: millidegree Celcius | 240 | Unit: millidegree Celsius |
212 | Read/Write value. | 241 | RW |
213 | 242 | ||
214 | temp[1-2]_crit_hyst | 243 | temp[1-*]_crit_hyst |
215 | Temperature hysteresis value for critical limit. | 244 | Temperature hysteresis value for critical limit. |
216 | Unit: millidegree Celcius | 245 | Unit: millidegree Celsius |
217 | Must be reported as an absolute temperature, NOT a delta | 246 | Must be reported as an absolute temperature, NOT a delta |
218 | from the critical value. | 247 | from the critical value. |
248 | RW | ||
249 | |||
250 | temp[1-4]_offset | ||
251 | Temperature offset which is added to the temperature reading | ||
252 | by the chip. | ||
253 | Unit: millidegree Celsius | ||
219 | Read/Write value. | 254 | Read/Write value. |
220 | 255 | ||
221 | If there are multiple temperature sensors, temp1_* is | 256 | If there are multiple temperature sensors, temp1_* is |
@@ -225,6 +260,17 @@ temp[1-2]_crit_hyst | |||
225 | itself, for example the thermal diode inside the CPU or | 260 | itself, for example the thermal diode inside the CPU or |
226 | a thermistor nearby. | 261 | a thermistor nearby. |
227 | 262 | ||
263 | Some chips measure temperature using external thermistors and an ADC, and | ||
264 | report the temperature measurement as a voltage. Converting this voltage | ||
265 | back to a temperature (or the other way around for limits) requires | ||
266 | mathematical functions not available in the kernel, so the conversion | ||
267 | must occur in user space. For these chips, all temp* files described | ||
268 | above should contain values expressed in millivolt instead of millidegree | ||
269 | Celsius. In other words, such temperature channels are handled as voltage | ||
270 | channels by the driver. | ||
271 | |||
272 | Also see the Alarms section for status flags associated with temperatures. | ||
273 | |||
228 | 274 | ||
229 | ************ | 275 | ************ |
230 | * Currents * | 276 | * Currents * |
@@ -233,25 +279,88 @@ temp[1-2]_crit_hyst | |||
233 | Note that no known chip provides current measurements as of writing, | 279 | Note that no known chip provides current measurements as of writing, |
234 | so this part is theoretical, so to say. | 280 | so this part is theoretical, so to say. |
235 | 281 | ||
236 | curr[1-n]_max Current max value | 282 | curr[1-*]_max Current max value |
237 | Unit: milliampere | 283 | Unit: milliampere |
238 | Read/Write. | 284 | RW |
239 | 285 | ||
240 | curr[1-n]_min Current min value. | 286 | curr[1-*]_min Current min value. |
241 | Unit: milliampere | 287 | Unit: milliampere |
242 | Read/Write. | 288 | RW |
243 | 289 | ||
244 | curr[1-n]_input Current input value | 290 | curr[1-*]_input Current input value |
245 | Unit: milliampere | 291 | Unit: milliampere |
246 | Read only. | 292 | RO |
247 | 293 | ||
248 | 294 | ||
249 | ********* | 295 | ********** |
250 | * Other * | 296 | * Alarms * |
251 | ********* | 297 | ********** |
298 | |||
299 | Each channel or limit may have an associated alarm file, containing a | ||
300 | boolean value. 1 means than an alarm condition exists, 0 means no alarm. | ||
301 | |||
302 | Usually a given chip will either use channel-related alarms, or | ||
303 | limit-related alarms, not both. The driver should just reflect the hardware | ||
304 | implementation. | ||
305 | |||
306 | in[0-*]_alarm | ||
307 | fan[1-*]_alarm | ||
308 | temp[1-*]_alarm | ||
309 | Channel alarm | ||
310 | 0: no alarm | ||
311 | 1: alarm | ||
312 | RO | ||
313 | |||
314 | OR | ||
315 | |||
316 | in[0-*]_min_alarm | ||
317 | in[0-*]_max_alarm | ||
318 | fan[1-*]_min_alarm | ||
319 | temp[1-*]_min_alarm | ||
320 | temp[1-*]_max_alarm | ||
321 | temp[1-*]_crit_alarm | ||
322 | Limit alarm | ||
323 | 0: no alarm | ||
324 | 1: alarm | ||
325 | RO | ||
326 | |||
327 | Each input channel may have an associated fault file. This can be used | ||
328 | to notify open diodes, unconnected fans etc. where the hardware | ||
329 | supports it. When this boolean has value 1, the measurement for that | ||
330 | channel should not be trusted. | ||
331 | |||
332 | in[0-*]_input_fault | ||
333 | fan[1-*]_input_fault | ||
334 | temp[1-*]_input_fault | ||
335 | Input fault condition | ||
336 | 0: no fault occured | ||
337 | 1: fault condition | ||
338 | RO | ||
339 | |||
340 | Some chips also offer the possibility to get beeped when an alarm occurs: | ||
341 | |||
342 | beep_enable Master beep enable | ||
343 | 0: no beeps | ||
344 | 1: beeps | ||
345 | RW | ||
346 | |||
347 | in[0-*]_beep | ||
348 | fan[1-*]_beep | ||
349 | temp[1-*]_beep | ||
350 | Channel beep | ||
351 | 0: disable | ||
352 | 1: enable | ||
353 | RW | ||
354 | |||
355 | In theory, a chip could provide per-limit beep masking, but no such chip | ||
356 | was seen so far. | ||
357 | |||
358 | Old drivers provided a different, non-standard interface to alarms and | ||
359 | beeps. These interface files are deprecated, but will be kept around | ||
360 | for compatibility reasons: | ||
252 | 361 | ||
253 | alarms Alarm bitmask. | 362 | alarms Alarm bitmask. |
254 | Read only. | 363 | RO |
255 | Integer representation of one to four bytes. | 364 | Integer representation of one to four bytes. |
256 | A '1' bit means an alarm. | 365 | A '1' bit means an alarm. |
257 | Chips should be programmed for 'comparator' mode so that | 366 | Chips should be programmed for 'comparator' mode so that |
@@ -259,35 +368,26 @@ alarms Alarm bitmask. | |||
259 | if it is still valid. | 368 | if it is still valid. |
260 | Generally a direct representation of a chip's internal | 369 | Generally a direct representation of a chip's internal |
261 | alarm registers; there is no standard for the position | 370 | alarm registers; there is no standard for the position |
262 | of individual bits. | 371 | of individual bits. For this reason, the use of this |
372 | interface file for new drivers is discouraged. Use | ||
373 | individual *_alarm and *_fault files instead. | ||
263 | Bits are defined in kernel/include/sensors.h. | 374 | Bits are defined in kernel/include/sensors.h. |
264 | 375 | ||
265 | alarms_in Alarm bitmask relative to in (voltage) channels | 376 | beep_mask Bitmask for beep. |
266 | Read only | 377 | Same format as 'alarms' with the same bit locations, |
267 | A '1' bit means an alarm, LSB corresponds to in0 and so on | 378 | use discouraged for the same reason. Use individual |
268 | Prefered to 'alarms' for newer chips | 379 | *_beep files instead. |
269 | 380 | RW | |
270 | alarms_fan Alarm bitmask relative to fan channels | ||
271 | Read only | ||
272 | A '1' bit means an alarm, LSB corresponds to fan1 and so on | ||
273 | Prefered to 'alarms' for newer chips | ||
274 | |||
275 | alarms_temp Alarm bitmask relative to temp (temperature) channels | ||
276 | Read only | ||
277 | A '1' bit means an alarm, LSB corresponds to temp1 and so on | ||
278 | Prefered to 'alarms' for newer chips | ||
279 | 381 | ||
280 | beep_enable Beep/interrupt enable | ||
281 | 0 to disable. | ||
282 | 1 to enable. | ||
283 | Read/Write | ||
284 | 382 | ||
285 | beep_mask Bitmask for beep. | 383 | ********* |
286 | Same format as 'alarms' with the same bit locations. | 384 | * Other * |
287 | Read/Write | 385 | ********* |
288 | 386 | ||
289 | eeprom Raw EEPROM data in binary form. | 387 | eeprom Raw EEPROM data in binary form. |
290 | Read only. | 388 | RO |
291 | 389 | ||
292 | pec Enable or disable PEC (SMBus only) | 390 | pec Enable or disable PEC (SMBus only) |
293 | Read/Write | 391 | 0: disable |
392 | 1: enable | ||
393 | RW | ||
diff --git a/Documentation/hwmon/userspace-tools b/Documentation/hwmon/userspace-tools index 2622aac65422..19900a8fe679 100644 --- a/Documentation/hwmon/userspace-tools +++ b/Documentation/hwmon/userspace-tools | |||
@@ -6,31 +6,32 @@ voltages, fans speed). They are often connected through an I2C bus, but some | |||
6 | are also connected directly through the ISA bus. | 6 | are also connected directly through the ISA bus. |
7 | 7 | ||
8 | The kernel drivers make the data from the sensor chips available in the /sys | 8 | The kernel drivers make the data from the sensor chips available in the /sys |
9 | virtual filesystem. Userspace tools are then used to display or set or the | 9 | virtual filesystem. Userspace tools are then used to display the measured |
10 | data in a more friendly manner. | 10 | values or configure the chips in a more friendly manner. |
11 | 11 | ||
12 | Lm-sensors | 12 | Lm-sensors |
13 | ---------- | 13 | ---------- |
14 | 14 | ||
15 | Core set of utilites that will allow you to obtain health information, | 15 | Core set of utilities that will allow you to obtain health information, |
16 | setup monitoring limits etc. You can get them on their homepage | 16 | setup monitoring limits etc. You can get them on their homepage |
17 | http://www.lm-sensors.nu/ or as a package from your Linux distribution. | 17 | http://www.lm-sensors.nu/ or as a package from your Linux distribution. |
18 | 18 | ||
19 | If from website: | 19 | If from website: |
20 | Get lmsensors from project web site. Please note, you need only userspace | 20 | Get lm-sensors from project web site. Please note, you need only userspace |
21 | part, so compile with "make user_install" target. | 21 | part, so compile with "make user" and install with "make user_install". |
22 | 22 | ||
23 | General hints to get things working: | 23 | General hints to get things working: |
24 | 24 | ||
25 | 0) get lm-sensors userspace utils | 25 | 0) get lm-sensors userspace utils |
26 | 1) compile all drivers in I2C section as modules in your kernel | 26 | 1) compile all drivers in I2C and Hardware Monitoring sections as modules |
27 | in your kernel | ||
27 | 2) run sensors-detect script, it will tell you what modules you need to load. | 28 | 2) run sensors-detect script, it will tell you what modules you need to load. |
28 | 3) load them and run "sensors" command, you should see some results. | 29 | 3) load them and run "sensors" command, you should see some results. |
29 | 4) fix sensors.conf, labels, limits, fan divisors | 30 | 4) fix sensors.conf, labels, limits, fan divisors |
30 | 5) if any more problems consult FAQ, or documentation | 31 | 5) if any more problems consult FAQ, or documentation |
31 | 32 | ||
32 | Other utilites | 33 | Other utilities |
33 | -------------- | 34 | --------------- |
34 | 35 | ||
35 | If you want some graphical indicators of system health look for applications | 36 | If you want some graphical indicators of system health look for applications |
36 | like: gkrellm, ksensors, xsensors, wmtemp, wmsensors, wmgtemp, ksysguardd, | 37 | like: gkrellm, ksensors, xsensors, wmtemp, wmsensors, wmgtemp, ksysguardd, |
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d new file mode 100644 index 000000000000..83a3836289c2 --- /dev/null +++ b/Documentation/hwmon/w83791d | |||
@@ -0,0 +1,113 @@ | |||
1 | Kernel driver w83791d | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Winbond W83791D | ||
6 | Prefix: 'w83791d' | ||
7 | Addresses scanned: I2C 0x2c - 0x2f | ||
8 | Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83791Da.pdf | ||
9 | |||
10 | Author: Charles Spirakis <bezaur@gmail.com> | ||
11 | |||
12 | This driver was derived from the w83781d.c and w83792d.c source files. | ||
13 | |||
14 | Credits: | ||
15 | w83781d.c: | ||
16 | Frodo Looijaard <frodol@dds.nl>, | ||
17 | Philip Edelbrock <phil@netroedge.com>, | ||
18 | and Mark Studebaker <mdsxyz123@yahoo.com> | ||
19 | w83792d.c: | ||
20 | Chunhao Huang <DZShen@Winbond.com.tw>, | ||
21 | Rudolf Marek <r.marek@sh.cvut.cz> | ||
22 | |||
23 | Module Parameters | ||
24 | ----------------- | ||
25 | |||
26 | * init boolean | ||
27 | (default 0) | ||
28 | Use 'init=1' to have the driver do extra software initializations. | ||
29 | The default behavior is to do the minimum initialization possible | ||
30 | and depend on the BIOS to properly setup the chip. If you know you | ||
31 | have a w83791d and you're having problems, try init=1 before trying | ||
32 | reset=1. | ||
33 | |||
34 | * reset boolean | ||
35 | (default 0) | ||
36 | Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default | ||
37 | behavior is no chip reset to preserve BIOS settings. | ||
38 | |||
39 | * force_subclients=bus,caddr,saddr,saddr | ||
40 | This is used to force the i2c addresses for subclients of | ||
41 | a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b' | ||
42 | to force the subclients of chip 0x2f on bus 0 to i2c addresses | ||
43 | 0x4a and 0x4b. | ||
44 | |||
45 | |||
46 | Description | ||
47 | ----------- | ||
48 | |||
49 | This driver implements support for the Winbond W83791D chip. | ||
50 | |||
51 | Detection of the chip can sometimes be foiled because it can be in an | ||
52 | internal state that allows no clean access (Bank with ID register is not | ||
53 | currently selected). If you know the address of the chip, use a 'force' | ||
54 | parameter; this will put it into a more well-behaved state first. | ||
55 | |||
56 | The driver implements three temperature sensors, five fan rotation speed | ||
57 | sensors, and ten voltage sensors. | ||
58 | |||
59 | Temperatures are measured in degrees Celsius and measurement resolution is 1 | ||
60 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when | ||
61 | the temperature gets higher than the Overtemperature Shutdown value; it stays | ||
62 | on until the temperature falls below the Hysteresis value. | ||
63 | |||
64 | Fan rotation speeds are reported in RPM (rotations per minute). An alarm is | ||
65 | triggered if the rotation speed has dropped below a programmable limit. Fan | ||
66 | readings can be divided by a programmable divider (1, 2, 4, 8 for fan 1/2/3 | ||
67 | and 1, 2, 4, 8, 16, 32, 64 or 128 for fan 4/5) to give the readings more | ||
68 | range or accuracy. | ||
69 | |||
70 | Voltage sensors (also known as IN sensors) report their values in millivolts. | ||
71 | An alarm is triggered if the voltage has crossed a programmable minimum | ||
72 | or maximum limit. | ||
73 | |||
74 | Alarms are provided as output from a "realtime status register". The | ||
75 | following bits are defined: | ||
76 | |||
77 | bit - alarm on: | ||
78 | 0 - Vcore | ||
79 | 1 - VINR0 | ||
80 | 2 - +3.3VIN | ||
81 | 3 - 5VDD | ||
82 | 4 - temp1 | ||
83 | 5 - temp2 | ||
84 | 6 - fan1 | ||
85 | 7 - fan2 | ||
86 | 8 - +12VIN | ||
87 | 9 - -12VIN | ||
88 | 10 - -5VIN | ||
89 | 11 - fan3 | ||
90 | 12 - chassis | ||
91 | 13 - temp3 | ||
92 | 14 - VINR1 | ||
93 | 15 - reserved | ||
94 | 16 - tart1 | ||
95 | 17 - tart2 | ||
96 | 18 - tart3 | ||
97 | 19 - VSB | ||
98 | 20 - VBAT | ||
99 | 21 - fan4 | ||
100 | 22 - fan5 | ||
101 | 23 - reserved | ||
102 | |||
103 | When an alarm goes off, you can be warned by a beeping signal through your | ||
104 | computer speaker. It is possible to enable all beeping globally, or only | ||
105 | the beeping for some alarms. | ||
106 | |||
107 | The driver only reads the chip values each 3 seconds; reading them more | ||
108 | often will do no harm, but will return 'old' values. | ||
109 | |||
110 | W83791D TODO: | ||
111 | --------------- | ||
112 | Provide a patch for per-file alarms as discussed on the mailing list | ||
113 | Provide a patch for smart-fan control (still need appropriate motherboard/fans) | ||
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index fd4b2712d570..e46c23458242 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -21,8 +21,7 @@ Authors: | |||
21 | Module Parameters | 21 | Module Parameters |
22 | ----------------- | 22 | ----------------- |
23 | 23 | ||
24 | * force_addr: int | 24 | None. |
25 | Forcibly enable the ICH at the given address. EXTREMELY DANGEROUS! | ||
26 | 25 | ||
27 | 26 | ||
28 | Description | 27 | Description |
diff --git a/Documentation/i2c/busses/i2c-nforce2 b/Documentation/i2c/busses/i2c-nforce2 index d751282d9b2a..cd49c428a3ab 100644 --- a/Documentation/i2c/busses/i2c-nforce2 +++ b/Documentation/i2c/busses/i2c-nforce2 | |||
@@ -7,6 +7,8 @@ Supported adapters: | |||
7 | * nForce3 250Gb MCP 10de:00E4 | 7 | * nForce3 250Gb MCP 10de:00E4 |
8 | * nForce4 MCP 10de:0052 | 8 | * nForce4 MCP 10de:0052 |
9 | * nForce4 MCP-04 10de:0034 | 9 | * nForce4 MCP-04 10de:0034 |
10 | * nForce4 MCP51 10de:0264 | ||
11 | * nForce4 MCP55 10de:0368 | ||
10 | 12 | ||
11 | Datasheet: not publically available, but seems to be similar to the | 13 | Datasheet: not publically available, but seems to be similar to the |
12 | AMD-8111 SMBus 2.0 adapter. | 14 | AMD-8111 SMBus 2.0 adapter. |
diff --git a/Documentation/i2c/busses/i2c-ocores b/Documentation/i2c/busses/i2c-ocores new file mode 100644 index 000000000000..cfcebb10d14e --- /dev/null +++ b/Documentation/i2c/busses/i2c-ocores | |||
@@ -0,0 +1,51 @@ | |||
1 | Kernel driver i2c-ocores | ||
2 | |||
3 | Supported adapters: | ||
4 | * OpenCores.org I2C controller by Richard Herveille (see datasheet link) | ||
5 | Datasheet: http://www.opencores.org/projects.cgi/web/i2c/overview | ||
6 | |||
7 | Author: Peter Korsgaard <jacmet@sunsite.dk> | ||
8 | |||
9 | Description | ||
10 | ----------- | ||
11 | |||
12 | i2c-ocores is an i2c bus driver for the OpenCores.org I2C controller | ||
13 | IP core by Richard Herveille. | ||
14 | |||
15 | Usage | ||
16 | ----- | ||
17 | |||
18 | i2c-ocores uses the platform bus, so you need to provide a struct | ||
19 | platform_device with the base address and interrupt number. The | ||
20 | dev.platform_data of the device should also point to a struct | ||
21 | ocores_i2c_platform_data (see linux/i2c-ocores.h) describing the | ||
22 | distance between registers and the input clock speed. | ||
23 | |||
24 | E.G. something like: | ||
25 | |||
26 | static struct resource ocores_resources[] = { | ||
27 | [0] = { | ||
28 | .start = MYI2C_BASEADDR, | ||
29 | .end = MYI2C_BASEADDR + 8, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | [1] = { | ||
33 | .start = MYI2C_IRQ, | ||
34 | .end = MYI2C_IRQ, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | |||
39 | static struct ocores_i2c_platform_data myi2c_data = { | ||
40 | .regstep = 2, /* two bytes between registers */ | ||
41 | .clock_khz = 50000, /* input clock of 50MHz */ | ||
42 | }; | ||
43 | |||
44 | static struct platform_device myi2c = { | ||
45 | .name = "ocores-i2c", | ||
46 | .dev = { | ||
47 | .platform_data = &myi2c_data, | ||
48 | }, | ||
49 | .num_resources = ARRAY_SIZE(ocores_resources), | ||
50 | .resource = ocores_resources, | ||
51 | }; | ||
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index a1c8f581afed..921476333235 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 | |||
@@ -6,6 +6,8 @@ Supported adapters: | |||
6 | Datasheet: Publicly available at the Intel website | 6 | Datasheet: Publicly available at the Intel website |
7 | * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges | 7 | * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges |
8 | Datasheet: Only available via NDA from ServerWorks | 8 | Datasheet: Only available via NDA from ServerWorks |
9 | * ATI IXP southbridges IXP200, IXP300, IXP400 | ||
10 | Datasheet: Not publicly available | ||
9 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge | 11 | * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge |
10 | Datasheet: Publicly available at the SMSC website http://www.smsc.com | 12 | Datasheet: Publicly available at the SMSC website http://www.smsc.com |
11 | 13 | ||
@@ -21,8 +23,6 @@ Module Parameters | |||
21 | Forcibly enable the PIIX4. DANGEROUS! | 23 | Forcibly enable the PIIX4. DANGEROUS! |
22 | * force_addr: int | 24 | * force_addr: int |
23 | Forcibly enable the PIIX4 at the given address. EXTREMELY DANGEROUS! | 25 | Forcibly enable the PIIX4 at the given address. EXTREMELY DANGEROUS! |
24 | * fix_hstcfg: int | ||
25 | Fix config register. Needed on some boards (Force CPCI735). | ||
26 | 26 | ||
27 | 27 | ||
28 | Description | 28 | Description |
@@ -63,10 +63,36 @@ The PIIX4E is just an new version of the PIIX4; it is supported as well. | |||
63 | The PIIX/PIIX3 does not implement an SMBus or I2C bus, so you can't use | 63 | The PIIX/PIIX3 does not implement an SMBus or I2C bus, so you can't use |
64 | this driver on those mainboards. | 64 | this driver on those mainboards. |
65 | 65 | ||
66 | The ServerWorks Southbridges, the Intel 440MX, and the Victory766 are | 66 | The ServerWorks Southbridges, the Intel 440MX, and the Victory66 are |
67 | identical to the PIIX4 in I2C/SMBus support. | 67 | identical to the PIIX4 in I2C/SMBus support. |
68 | 68 | ||
69 | A few OSB4 southbridges are known to be misconfigured by the BIOS. In this | 69 | If you own Force CPCI735 motherboard or other OSB4 based systems you may need |
70 | case, you have you use the fix_hstcfg module parameter. Do not use it | 70 | to change the SMBus Interrupt Select register so the SMBus controller uses |
71 | unless you know you have to, because in some cases it also breaks | 71 | the SMI mode. |
72 | configuration on southbridges that don't need it. | 72 | |
73 | 1) Use lspci command and locate the PCI device with the SMBus controller: | ||
74 | 00:0f.0 ISA bridge: ServerWorks OSB4 South Bridge (rev 4f) | ||
75 | The line may vary for different chipsets. Please consult the driver source | ||
76 | for all possible PCI ids (and lspci -n to match them). Lets assume the | ||
77 | device is located at 00:0f.0. | ||
78 | 2) Now you just need to change the value in 0xD2 register. Get it first with | ||
79 | command: lspci -xxx -s 00:0f.0 | ||
80 | If the value is 0x3 then you need to change it to 0x1 | ||
81 | setpci -s 00:0f.0 d2.b=1 | ||
82 | |||
83 | Please note that you don't need to do that in all cases, just when the SMBus is | ||
84 | not working properly. | ||
85 | |||
86 | |||
87 | Hardware-specific issues | ||
88 | ------------------------ | ||
89 | |||
90 | This driver will refuse to load on IBM systems with an Intel PIIX4 SMBus. | ||
91 | Some of these machines have an RFID EEPROM (24RF08) connected to the SMBus, | ||
92 | which can easily get corrupted due to a state machine bug. These are mostly | ||
93 | Thinkpad laptops, but desktop systems may also be affected. We have no list | ||
94 | of all affected systems, so the only safe solution was to prevent access to | ||
95 | the SMBus on all IBM systems (detected using DMI data.) | ||
96 | |||
97 | For additional information, read: | ||
98 | http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/README.thinkpad | ||
diff --git a/Documentation/i2c/busses/scx200_acb b/Documentation/i2c/busses/scx200_acb index f50e69981ec6..7c07883d4dfc 100644 --- a/Documentation/i2c/busses/scx200_acb +++ b/Documentation/i2c/busses/scx200_acb | |||
@@ -2,14 +2,31 @@ Kernel driver scx200_acb | |||
2 | 2 | ||
3 | Author: Christer Weinigel <wingel@nano-system.com> | 3 | Author: Christer Weinigel <wingel@nano-system.com> |
4 | 4 | ||
5 | The driver supersedes the older, never merged driver named i2c-nscacb. | ||
6 | |||
5 | Module Parameters | 7 | Module Parameters |
6 | ----------------- | 8 | ----------------- |
7 | 9 | ||
8 | * base: int | 10 | * base: up to 4 ints |
9 | Base addresses for the ACCESS.bus controllers on SCx200 and SC1100 devices | 11 | Base addresses for the ACCESS.bus controllers on SCx200 and SC1100 devices |
10 | 12 | ||
13 | By default the driver uses two base addresses 0x820 and 0x840. | ||
14 | If you want only one base address, specify the second as 0 so as to | ||
15 | override this default. | ||
16 | |||
11 | Description | 17 | Description |
12 | ----------- | 18 | ----------- |
13 | 19 | ||
14 | Enable the use of the ACCESS.bus controller on the Geode SCx200 and | 20 | Enable the use of the ACCESS.bus controller on the Geode SCx200 and |
15 | SC1100 processors and the CS5535 and CS5536 Geode companion devices. | 21 | SC1100 processors and the CS5535 and CS5536 Geode companion devices. |
22 | |||
23 | Device-specific notes | ||
24 | --------------------- | ||
25 | |||
26 | The SC1100 WRAP boards are known to use base addresses 0x810 and 0x820. | ||
27 | If the scx200_acb driver is built into the kernel, add the following | ||
28 | parameter to your boot command line: | ||
29 | scx200_acb.base=0x810,0x820 | ||
30 | If the scx200_acb driver is built as a module, add the following line to | ||
31 | the file /etc/modprobe.conf instead: | ||
32 | options scx200_acb base=0x810,0x820 | ||
diff --git a/Documentation/ia64/aliasing.txt b/Documentation/ia64/aliasing.txt new file mode 100644 index 000000000000..38f9a52d1820 --- /dev/null +++ b/Documentation/ia64/aliasing.txt | |||
@@ -0,0 +1,208 @@ | |||
1 | MEMORY ATTRIBUTE ALIASING ON IA-64 | ||
2 | |||
3 | Bjorn Helgaas | ||
4 | <bjorn.helgaas@hp.com> | ||
5 | May 4, 2006 | ||
6 | |||
7 | |||
8 | MEMORY ATTRIBUTES | ||
9 | |||
10 | Itanium supports several attributes for virtual memory references. | ||
11 | The attribute is part of the virtual translation, i.e., it is | ||
12 | contained in the TLB entry. The ones of most interest to the Linux | ||
13 | kernel are: | ||
14 | |||
15 | WB Write-back (cacheable) | ||
16 | UC Uncacheable | ||
17 | WC Write-coalescing | ||
18 | |||
19 | System memory typically uses the WB attribute. The UC attribute is | ||
20 | used for memory-mapped I/O devices. The WC attribute is uncacheable | ||
21 | like UC is, but writes may be delayed and combined to increase | ||
22 | performance for things like frame buffers. | ||
23 | |||
24 | The Itanium architecture requires that we avoid accessing the same | ||
25 | page with both a cacheable mapping and an uncacheable mapping[1]. | ||
26 | |||
27 | The design of the chipset determines which attributes are supported | ||
28 | on which regions of the address space. For example, some chipsets | ||
29 | support either WB or UC access to main memory, while others support | ||
30 | only WB access. | ||
31 | |||
32 | MEMORY MAP | ||
33 | |||
34 | Platform firmware describes the physical memory map and the | ||
35 | supported attributes for each region. At boot-time, the kernel uses | ||
36 | the EFI GetMemoryMap() interface. ACPI can also describe memory | ||
37 | devices and the attributes they support, but Linux/ia64 currently | ||
38 | doesn't use this information. | ||
39 | |||
40 | The kernel uses the efi_memmap table returned from GetMemoryMap() to | ||
41 | learn the attributes supported by each region of physical address | ||
42 | space. Unfortunately, this table does not completely describe the | ||
43 | address space because some machines omit some or all of the MMIO | ||
44 | regions from the map. | ||
45 | |||
46 | The kernel maintains another table, kern_memmap, which describes the | ||
47 | memory Linux is actually using and the attribute for each region. | ||
48 | This contains only system memory; it does not contain MMIO space. | ||
49 | |||
50 | The kern_memmap table typically contains only a subset of the system | ||
51 | memory described by the efi_memmap. Linux/ia64 can't use all memory | ||
52 | in the system because of constraints imposed by the identity mapping | ||
53 | scheme. | ||
54 | |||
55 | The efi_memmap table is preserved unmodified because the original | ||
56 | boot-time information is required for kexec. | ||
57 | |||
58 | KERNEL IDENTITY MAPPINGS | ||
59 | |||
60 | Linux/ia64 identity mappings are done with large pages, currently | ||
61 | either 16MB or 64MB, referred to as "granules." Cacheable mappings | ||
62 | are speculative[2], so the processor can read any location in the | ||
63 | page at any time, independent of the programmer's intentions. This | ||
64 | means that to avoid attribute aliasing, Linux can create a cacheable | ||
65 | identity mapping only when the entire granule supports cacheable | ||
66 | access. | ||
67 | |||
68 | Therefore, kern_memmap contains only full granule-sized regions that | ||
69 | can referenced safely by an identity mapping. | ||
70 | |||
71 | Uncacheable mappings are not speculative, so the processor will | ||
72 | generate UC accesses only to locations explicitly referenced by | ||
73 | software. This allows UC identity mappings to cover granules that | ||
74 | are only partially populated, or populated with a combination of UC | ||
75 | and WB regions. | ||
76 | |||
77 | USER MAPPINGS | ||
78 | |||
79 | User mappings are typically done with 16K or 64K pages. The smaller | ||
80 | page size allows more flexibility because only 16K or 64K has to be | ||
81 | homogeneous with respect to memory attributes. | ||
82 | |||
83 | POTENTIAL ATTRIBUTE ALIASING CASES | ||
84 | |||
85 | There are several ways the kernel creates new mappings: | ||
86 | |||
87 | mmap of /dev/mem | ||
88 | |||
89 | This uses remap_pfn_range(), which creates user mappings. These | ||
90 | mappings may be either WB or UC. If the region being mapped | ||
91 | happens to be in kern_memmap, meaning that it may also be mapped | ||
92 | by a kernel identity mapping, the user mapping must use the same | ||
93 | attribute as the kernel mapping. | ||
94 | |||
95 | If the region is not in kern_memmap, the user mapping should use | ||
96 | an attribute reported as being supported in the EFI memory map. | ||
97 | |||
98 | Since the EFI memory map does not describe MMIO on some | ||
99 | machines, this should use an uncacheable mapping as a fallback. | ||
100 | |||
101 | mmap of /sys/class/pci_bus/.../legacy_mem | ||
102 | |||
103 | This is very similar to mmap of /dev/mem, except that legacy_mem | ||
104 | only allows mmap of the one megabyte "legacy MMIO" area for a | ||
105 | specific PCI bus. Typically this is the first megabyte of | ||
106 | physical address space, but it may be different on machines with | ||
107 | several VGA devices. | ||
108 | |||
109 | "X" uses this to access VGA frame buffers. Using legacy_mem | ||
110 | rather than /dev/mem allows multiple instances of X to talk to | ||
111 | different VGA cards. | ||
112 | |||
113 | The /dev/mem mmap constraints apply. | ||
114 | |||
115 | However, since this is for mapping legacy MMIO space, WB access | ||
116 | does not make sense. This matters on machines without legacy | ||
117 | VGA support: these machines may have WB memory for the entire | ||
118 | first megabyte (or even the entire first granule). | ||
119 | |||
120 | On these machines, we could mmap legacy_mem as WB, which would | ||
121 | be safe in terms of attribute aliasing, but X has no way of | ||
122 | knowing that it is accessing regular memory, not a frame buffer, | ||
123 | so the kernel should fail the mmap rather than doing it with WB. | ||
124 | |||
125 | read/write of /dev/mem | ||
126 | |||
127 | This uses copy_from_user(), which implicitly uses a kernel | ||
128 | identity mapping. This is obviously safe for things in | ||
129 | kern_memmap. | ||
130 | |||
131 | There may be corner cases of things that are not in kern_memmap, | ||
132 | but could be accessed this way. For example, registers in MMIO | ||
133 | space are not in kern_memmap, but could be accessed with a UC | ||
134 | mapping. This would not cause attribute aliasing. But | ||
135 | registers typically can be accessed only with four-byte or | ||
136 | eight-byte accesses, and the copy_from_user() path doesn't allow | ||
137 | any control over the access size, so this would be dangerous. | ||
138 | |||
139 | ioremap() | ||
140 | |||
141 | This returns a kernel identity mapping for use inside the | ||
142 | kernel. | ||
143 | |||
144 | If the region is in kern_memmap, we should use the attribute | ||
145 | specified there. Otherwise, if the EFI memory map reports that | ||
146 | the entire granule supports WB, we should use that (granules | ||
147 | that are partially reserved or occupied by firmware do not appear | ||
148 | in kern_memmap). Otherwise, we should use a UC mapping. | ||
149 | |||
150 | PAST PROBLEM CASES | ||
151 | |||
152 | mmap of various MMIO regions from /dev/mem by "X" on Intel platforms | ||
153 | |||
154 | The EFI memory map may not report these MMIO regions. | ||
155 | |||
156 | These must be allowed so that X will work. This means that | ||
157 | when the EFI memory map is incomplete, every /dev/mem mmap must | ||
158 | succeed. It may create either WB or UC user mappings, depending | ||
159 | on whether the region is in kern_memmap or the EFI memory map. | ||
160 | |||
161 | mmap of 0x0-0xA0000 /dev/mem by "hwinfo" on HP sx1000 with VGA enabled | ||
162 | |||
163 | See https://bugzilla.novell.com/show_bug.cgi?id=140858. | ||
164 | |||
165 | The EFI memory map reports the following attributes: | ||
166 | 0x00000-0x9FFFF WB only | ||
167 | 0xA0000-0xBFFFF UC only (VGA frame buffer) | ||
168 | 0xC0000-0xFFFFF WB only | ||
169 | |||
170 | This mmap is done with user pages, not kernel identity mappings, | ||
171 | so it is safe to use WB mappings. | ||
172 | |||
173 | The kernel VGA driver may ioremap the VGA frame buffer at 0xA0000, | ||
174 | which will use a granule-sized UC mapping covering 0-0xFFFFF. This | ||
175 | granule covers some WB-only memory, but since UC is non-speculative, | ||
176 | the processor will never generate an uncacheable reference to the | ||
177 | WB-only areas unless the driver explicitly touches them. | ||
178 | |||
179 | mmap of 0x0-0xFFFFF legacy_mem by "X" | ||
180 | |||
181 | If the EFI memory map reports this entire range as WB, there | ||
182 | is no VGA MMIO hole, and the mmap should fail or be done with | ||
183 | a WB mapping. | ||
184 | |||
185 | There's no easy way for X to determine whether the 0xA0000-0xBFFFF | ||
186 | region is a frame buffer or just memory, so I think it's best to | ||
187 | just fail this mmap request rather than using a WB mapping. As | ||
188 | far as I know, there's no need to map legacy_mem with WB | ||
189 | mappings. | ||
190 | |||
191 | Otherwise, a UC mapping of the entire region is probably safe. | ||
192 | The VGA hole means the region will not be in kern_memmap. The | ||
193 | HP sx1000 chipset doesn't support UC access to the memory surrounding | ||
194 | the VGA hole, but X doesn't need that area anyway and should not | ||
195 | reference it. | ||
196 | |||
197 | mmap of 0xA0000-0xBFFFF legacy_mem by "X" on HP sx1000 with VGA disabled | ||
198 | |||
199 | The EFI memory map reports the following attributes: | ||
200 | 0x00000-0xFFFFF WB only (no VGA MMIO hole) | ||
201 | |||
202 | This is a special case of the previous case, and the mmap should | ||
203 | fail for the same reason as above. | ||
204 | |||
205 | NOTES | ||
206 | |||
207 | [1] SDM rev 2.2, vol 2, sec 4.4.1. | ||
208 | [2] SDM rev 2.2, vol 2, sec 4.4.6. | ||
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index 171a44ebd939..1543802ef53e 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt | |||
@@ -85,7 +85,9 @@ Code Seq# Include File Comments | |||
85 | <mailto:maassen@uni-freiburg.de> | 85 | <mailto:maassen@uni-freiburg.de> |
86 | 'C' all linux/soundcard.h | 86 | 'C' all linux/soundcard.h |
87 | 'D' all asm-s390/dasd.h | 87 | 'D' all asm-s390/dasd.h |
88 | 'E' all linux/input.h | ||
88 | 'F' all linux/fb.h | 89 | 'F' all linux/fb.h |
90 | 'H' all linux/hiddev.h | ||
89 | 'I' all linux/isdn.h | 91 | 'I' all linux/isdn.h |
90 | 'J' 00-1F drivers/scsi/gdth_ioctl.h | 92 | 'J' 00-1F drivers/scsi/gdth_ioctl.h |
91 | 'K' all linux/kd.h | 93 | 'K' all linux/kd.h |
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset index 85a64defd385..fa0d4cca964a 100644 --- a/Documentation/isdn/README.gigaset +++ b/Documentation/isdn/README.gigaset | |||
@@ -124,7 +124,8 @@ GigaSet 307x Device Driver | |||
124 | 124 | ||
125 | You can use some configuration tool of your distribution to configure this | 125 | You can use some configuration tool of your distribution to configure this |
126 | "modem" or configure pppd/wvdial manually. There are some example ppp | 126 | "modem" or configure pppd/wvdial manually. There are some example ppp |
127 | configuration files and chat scripts in the gigaset-VERSION/ppp directory. | 127 | configuration files and chat scripts in the gigaset-VERSION/ppp directory |
128 | in the driver packages from http://sourceforge.net/projects/gigaset307x/. | ||
128 | Please note that the USB drivers are not able to change the state of the | 129 | Please note that the USB drivers are not able to change the state of the |
129 | control lines (the M105 driver can be configured to use some undocumented | 130 | control lines (the M105 driver can be configured to use some undocumented |
130 | control requests, if you really need the control lines, though). This means | 131 | control requests, if you really need the control lines, though). This means |
@@ -164,8 +165,8 @@ GigaSet 307x Device Driver | |||
164 | 165 | ||
165 | If you want both of these at once, you are out of luck. | 166 | If you want both of these at once, you are out of luck. |
166 | 167 | ||
167 | You can also use /sys/module/<name>/parameters/cidmode for changing | 168 | You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode |
168 | the CID mode setting (<name> is usb_gigaset or bas_gigaset). | 169 | setting (ttyGxy is ttyGU0 or ttyGB0). |
169 | 170 | ||
170 | 171 | ||
171 | 3. Troubleshooting | 172 | 3. Troubleshooting |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index a9d3a1794b23..bca6f389da66 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -147,6 +147,9 @@ running once the system is up. | |||
147 | acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA | 147 | acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA |
148 | Format: <irq>,<irq>... | 148 | Format: <irq>,<irq>... |
149 | 149 | ||
150 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | ||
151 | Format: To spoof as Windows 98: ="Microsoft Windows" | ||
152 | |||
150 | acpi_osi= [HW,ACPI] empty param disables _OSI | 153 | acpi_osi= [HW,ACPI] empty param disables _OSI |
151 | 154 | ||
152 | acpi_serialize [HW,ACPI] force serialization of AML methods | 155 | acpi_serialize [HW,ACPI] force serialization of AML methods |
diff --git a/Documentation/keys.txt b/Documentation/keys.txt index aaa01b0e3ee9..3bbe157b45e4 100644 --- a/Documentation/keys.txt +++ b/Documentation/keys.txt | |||
@@ -19,6 +19,7 @@ This document has the following sections: | |||
19 | - Key overview | 19 | - Key overview |
20 | - Key service overview | 20 | - Key service overview |
21 | - Key access permissions | 21 | - Key access permissions |
22 | - SELinux support | ||
22 | - New procfs files | 23 | - New procfs files |
23 | - Userspace system call interface | 24 | - Userspace system call interface |
24 | - Kernel services | 25 | - Kernel services |
@@ -232,6 +233,34 @@ For changing the ownership, group ID or permissions mask, being the owner of | |||
232 | the key or having the sysadmin capability is sufficient. | 233 | the key or having the sysadmin capability is sufficient. |
233 | 234 | ||
234 | 235 | ||
236 | =============== | ||
237 | SELINUX SUPPORT | ||
238 | =============== | ||
239 | |||
240 | The security class "key" has been added to SELinux so that mandatory access | ||
241 | controls can be applied to keys created within various contexts. This support | ||
242 | is preliminary, and is likely to change quite significantly in the near future. | ||
243 | Currently, all of the basic permissions explained above are provided in SELinux | ||
244 | as well; SE Linux is simply invoked after all basic permission checks have been | ||
245 | performed. | ||
246 | |||
247 | Each key is labeled with the same context as the task to which it belongs. | ||
248 | Typically, this is the same task that was running when the key was created. | ||
249 | The default keyrings are handled differently, but in a way that is very | ||
250 | intuitive: | ||
251 | |||
252 | (*) The user and user session keyrings that are created when the user logs in | ||
253 | are currently labeled with the context of the login manager. | ||
254 | |||
255 | (*) The keyrings associated with new threads are each labeled with the context | ||
256 | of their associated thread, and both session and process keyrings are | ||
257 | handled similarly. | ||
258 | |||
259 | Note, however, that the default keyrings associated with the root user are | ||
260 | labeled with the default kernel context, since they are created early in the | ||
261 | boot process, before root has a chance to log in. | ||
262 | |||
263 | |||
235 | ================ | 264 | ================ |
236 | NEW PROCFS FILES | 265 | NEW PROCFS FILES |
237 | ================ | 266 | ================ |
@@ -935,6 +964,16 @@ The structure has a number of fields, some of which are mandatory: | |||
935 | It is not safe to sleep in this method; the caller may hold spinlocks. | 964 | It is not safe to sleep in this method; the caller may hold spinlocks. |
936 | 965 | ||
937 | 966 | ||
967 | (*) void (*revoke)(struct key *key); | ||
968 | |||
969 | This method is optional. It is called to discard part of the payload | ||
970 | data upon a key being revoked. The caller will have the key semaphore | ||
971 | write-locked. | ||
972 | |||
973 | It is safe to sleep in this method, though care should be taken to avoid | ||
974 | a deadlock against the key semaphore. | ||
975 | |||
976 | |||
938 | (*) void (*destroy)(struct key *key); | 977 | (*) void (*destroy)(struct key *key); |
939 | 978 | ||
940 | This method is optional. It is called to discard the payload data on a key | 979 | This method is optional. It is called to discard the payload data on a key |
diff --git a/Documentation/networking/tuntap.txt b/Documentation/networking/tuntap.txt index 76750fb9151a..839cbb71388b 100644 --- a/Documentation/networking/tuntap.txt +++ b/Documentation/networking/tuntap.txt | |||
@@ -39,10 +39,13 @@ Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com> | |||
39 | mknod /dev/net/tun c 10 200 | 39 | mknod /dev/net/tun c 10 200 |
40 | 40 | ||
41 | Set permissions: | 41 | Set permissions: |
42 | e.g. chmod 0700 /dev/net/tun | 42 | e.g. chmod 0666 /dev/net/tun |
43 | if you want the device only accessible by root. Giving regular users the | 43 | There's no harm in allowing the device to be accessible by non-root users, |
44 | right to assign network devices is NOT a good idea. Users could assign | 44 | since CAP_NET_ADMIN is required for creating network devices or for |
45 | bogus network interfaces to trick firewalls or administrators. | 45 | connecting to network devices which aren't owned by the user in question. |
46 | If you want to create persistent devices and give ownership of them to | ||
47 | unprivileged users, then you need the /dev/net/tun device to be usable by | ||
48 | those users. | ||
46 | 49 | ||
47 | Driver module autoloading | 50 | Driver module autoloading |
48 | 51 | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 66bbbf1d1ef6..3242e5c1ee9c 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -213,9 +213,17 @@ have been remapped by the kernel. | |||
213 | 213 | ||
214 | See Documentation/IO-mapping.txt for how to access device memory. | 214 | See Documentation/IO-mapping.txt for how to access device memory. |
215 | 215 | ||
216 | You still need to call request_region() for I/O regions and | 216 | The device driver needs to call pci_request_region() to make sure |
217 | request_mem_region() for memory regions to make sure nobody else is using the | 217 | no other device is already using the same resource. The driver is expected |
218 | same device. | 218 | to determine MMIO and IO Port resource availability _before_ calling |
219 | pci_enable_device(). Conversely, drivers should call pci_release_region() | ||
220 | _after_ calling pci_disable_device(). The idea is to prevent two devices | ||
221 | colliding on the same address range. | ||
222 | |||
223 | Generic flavors of pci_request_region() are request_mem_region() | ||
224 | (for MMIO ranges) and request_region() (for IO Port ranges). | ||
225 | Use these for address resources that are not described by "normal" PCI | ||
226 | interfaces (e.g. BAR). | ||
219 | 227 | ||
220 | All interrupt handlers should be registered with SA_SHIRQ and use the devid | 228 | All interrupt handlers should be registered with SA_SHIRQ and use the devid |
221 | to map IRQs to devices (remember that all PCI interrupts are shared). | 229 | to map IRQs to devices (remember that all PCI interrupts are shared). |
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index f987afe43e28..fba1e05c47c7 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -135,96 +135,6 @@ HW. | |||
135 | 135 | ||
136 | FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from | 136 | FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from |
137 | scratch. That probably means stop accepting upstream requests, the | 137 | scratch. That probably means stop accepting upstream requests, the |
138 | actual policy of what to do with them beeing specific to a given | ||
139 | driver. It's acceptable for a network driver to just drop packets | ||
140 | while a block driver is expected to block the queue so no request is | ||
141 | lost. (Use IDE as an example on how to do that). FREEZE requires no | ||
142 | power state change, and it's expected for drivers to be able to | ||
143 | quickly transition back to operating state. | ||
144 | |||
145 | SUSPEND -- like FREEZE, but also put hardware into low-power state. If | ||
146 | there's need to distinguish several levels of sleep, additional flag | ||
147 | is probably best way to do that. | ||
148 | |||
149 | Transitions are only from a resumed state to a suspended state, never | ||
150 | between 2 suspended states. (ON -> FREEZE or ON -> SUSPEND can happen, | ||
151 | FREEZE -> SUSPEND or SUSPEND -> FREEZE can not). | ||
152 | |||
153 | All events are: | ||
154 | |||
155 | [NOTE NOTE NOTE: If you are driver author, you should not care; you | ||
156 | should only look at event, and ignore flags.] | ||
157 | |||
158 | #Prepare for suspend -- userland is still running but we are going to | ||
159 | #enter suspend state. This gives drivers chance to load firmware from | ||
160 | #disk and store it in memory, or do other activities taht require | ||
161 | #operating userland, ability to kmalloc GFP_KERNEL, etc... All of these | ||
162 | #are forbiden once the suspend dance is started.. event = ON, flags = | ||
163 | #PREPARE_TO_SUSPEND | ||
164 | |||
165 | Apm standby -- prepare for APM event. Quiesce devices to make life | ||
166 | easier for APM BIOS. event = FREEZE, flags = APM_STANDBY | ||
167 | |||
168 | Apm suspend -- same as APM_STANDBY, but it we should probably avoid | ||
169 | spinning down disks. event = FREEZE, flags = APM_SUSPEND | ||
170 | |||
171 | System halt, reboot -- quiesce devices to make life easier for BIOS. event | ||
172 | = FREEZE, flags = SYSTEM_HALT or SYSTEM_REBOOT | ||
173 | |||
174 | System shutdown -- at least disks need to be spun down, or data may be | ||
175 | lost. Quiesce devices, just to make life easier for BIOS. event = | ||
176 | FREEZE, flags = SYSTEM_SHUTDOWN | ||
177 | |||
178 | Kexec -- turn off DMAs and put hardware into some state where new | ||
179 | kernel can take over. event = FREEZE, flags = KEXEC | ||
180 | |||
181 | Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake | ||
182 | may need to be enabled on some devices. This actually has at least 3 | ||
183 | subtypes, system can reboot, enter S4 and enter S5 at the end of | ||
184 | swsusp. event = FREEZE, flags = SWSUSP and one of SYSTEM_REBOOT, | ||
185 | SYSTEM_SHUTDOWN, SYSTEM_S4 | ||
186 | |||
187 | Suspend to ram -- put devices into low power state. event = SUSPEND, | ||
188 | flags = SUSPEND_TO_RAM | ||
189 | |||
190 | Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put | ||
191 | devices into low power mode, but you must be able to reinitialize | ||
192 | device from scratch in resume method. This has two flavors, its done | ||
193 | once on suspending kernel, once on resuming kernel. event = FREEZE, | ||
194 | flags = DURING_SUSPEND or DURING_RESUME | ||
195 | |||
196 | Device detach requested from /sys -- deinitialize device; proably same as | ||
197 | SYSTEM_SHUTDOWN, I do not understand this one too much. probably event | ||
198 | = FREEZE, flags = DEV_DETACH. | ||
199 | |||
200 | #These are not really events sent: | ||
201 | # | ||
202 | #System fully on -- device is working normally; this is probably never | ||
203 | #passed to suspend() method... event = ON, flags = 0 | ||
204 | # | ||
205 | #Ready after resume -- userland is now running, again. Time to free any | ||
206 | #memory you ate during prepare to suspend... event = ON, flags = | ||
207 | #READY_AFTER_RESUME | ||
208 | # | ||
209 | |||
210 | |||
211 | pm_message_t meaning | ||
212 | |||
213 | pm_message_t has two fields. event ("major"), and flags. If driver | ||
214 | does not know event code, it aborts the request, returning error. Some | ||
215 | drivers may need to deal with special cases based on the actual type | ||
216 | of suspend operation being done at the system level. This is why | ||
217 | there are flags. | ||
218 | |||
219 | Event codes are: | ||
220 | |||
221 | ON -- no need to do anything except special cases like broken | ||
222 | HW. | ||
223 | |||
224 | # NOTIFICATION -- pretty much same as ON? | ||
225 | |||
226 | FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from | ||
227 | scratch. That probably means stop accepting upstream requests, the | ||
228 | actual policy of what to do with them being specific to a given | 138 | actual policy of what to do with them being specific to a given |
229 | driver. It's acceptable for a network driver to just drop packets | 139 | driver. It's acceptable for a network driver to just drop packets |
230 | while a block driver is expected to block the queue so no request is | 140 | while a block driver is expected to block the queue so no request is |
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index d7814a113ee1..823b2cf6e3dc 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
@@ -18,10 +18,11 @@ Some warnings, first. | |||
18 | * | 18 | * |
19 | * (*) suspend/resume support is needed to make it safe. | 19 | * (*) suspend/resume support is needed to make it safe. |
20 | * | 20 | * |
21 | * If you have any filesystems on USB devices mounted before suspend, | 21 | * If you have any filesystems on USB devices mounted before software suspend, |
22 | * they won't be accessible after resume and you may lose data, as though | 22 | * they won't be accessible after resume and you may lose data, as though |
23 | * you have unplugged the USB devices with mounted filesystems on them | 23 | * you have unplugged the USB devices with mounted filesystems on them; |
24 | * (see the FAQ below for details). | 24 | * see the FAQ below for details. (This is not true for more traditional |
25 | * power states like "standby", which normally don't turn USB off.) | ||
25 | 26 | ||
26 | You need to append resume=/dev/your_swap_partition to kernel command | 27 | You need to append resume=/dev/your_swap_partition to kernel command |
27 | line. Then you suspend by | 28 | line. Then you suspend by |
@@ -204,7 +205,7 @@ Q: There don't seem to be any generally useful behavioral | |||
204 | distinctions between SUSPEND and FREEZE. | 205 | distinctions between SUSPEND and FREEZE. |
205 | 206 | ||
206 | A: Doing SUSPEND when you are asked to do FREEZE is always correct, | 207 | A: Doing SUSPEND when you are asked to do FREEZE is always correct, |
207 | but it may be unneccessarily slow. If you want USB to stay simple, | 208 | but it may be unneccessarily slow. If you want your driver to stay simple, |
208 | slowness may not matter to you. It can always be fixed later. | 209 | slowness may not matter to you. It can always be fixed later. |
209 | 210 | ||
210 | For devices like disk it does matter, you do not want to spindown for | 211 | For devices like disk it does matter, you do not want to spindown for |
@@ -349,25 +350,72 @@ Q: How do I make suspend more verbose? | |||
349 | 350 | ||
350 | A: If you want to see any non-error kernel messages on the virtual | 351 | A: If you want to see any non-error kernel messages on the virtual |
351 | terminal the kernel switches to during suspend, you have to set the | 352 | terminal the kernel switches to during suspend, you have to set the |
352 | kernel console loglevel to at least 5, for example by doing | 353 | kernel console loglevel to at least 4 (KERN_WARNING), for example by |
353 | 354 | doing | |
354 | echo 5 > /proc/sys/kernel/printk | 355 | |
356 | # save the old loglevel | ||
357 | read LOGLEVEL DUMMY < /proc/sys/kernel/printk | ||
358 | # set the loglevel so we see the progress bar. | ||
359 | # if the level is higher than needed, we leave it alone. | ||
360 | if [ $LOGLEVEL -lt 5 ]; then | ||
361 | echo 5 > /proc/sys/kernel/printk | ||
362 | fi | ||
363 | |||
364 | IMG_SZ=0 | ||
365 | read IMG_SZ < /sys/power/image_size | ||
366 | echo -n disk > /sys/power/state | ||
367 | RET=$? | ||
368 | # | ||
369 | # the logic here is: | ||
370 | # if image_size > 0 (without kernel support, IMG_SZ will be zero), | ||
371 | # then try again with image_size set to zero. | ||
372 | if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size | ||
373 | echo 0 > /sys/power/image_size | ||
374 | echo -n disk > /sys/power/state | ||
375 | RET=$? | ||
376 | fi | ||
377 | |||
378 | # restore previous loglevel | ||
379 | echo $LOGLEVEL > /proc/sys/kernel/printk | ||
380 | exit $RET | ||
355 | 381 | ||
356 | Q: Is this true that if I have a mounted filesystem on a USB device and | 382 | Q: Is this true that if I have a mounted filesystem on a USB device and |
357 | I suspend to disk, I can lose data unless the filesystem has been mounted | 383 | I suspend to disk, I can lose data unless the filesystem has been mounted |
358 | with "sync"? | 384 | with "sync"? |
359 | 385 | ||
360 | A: That's right. It depends on your hardware, and it could be true even for | 386 | A: That's right ... if you disconnect that device, you may lose data. |
361 | suspend-to-RAM. In fact, even with "-o sync" you can lose data if your | 387 | In fact, even with "-o sync" you can lose data if your programs have |
362 | programs have information in buffers they haven't written out to disk. | 388 | information in buffers they haven't written out to a disk you disconnect, |
389 | or if you disconnect before the device finished saving data you wrote. | ||
363 | 390 | ||
364 | If you're lucky, your hardware will support low-power modes for USB | 391 | Software suspend normally powers down USB controllers, which is equivalent |
365 | controllers while the system is asleep. Lots of hardware doesn't, | 392 | to disconnecting all USB devices attached to your system. |
366 | however. Shutting off the power to a USB controller is equivalent to | ||
367 | unplugging all the attached devices. | ||
368 | 393 | ||
369 | Remember that it's always a bad idea to unplug a disk drive containing a | 394 | Your system might well support low-power modes for its USB controllers |
370 | mounted filesystem. With USB that's true even when your system is asleep! | 395 | while the system is asleep, maintaining the connection, using true sleep |
371 | The safest thing is to unmount all USB-based filesystems before suspending | 396 | modes like "suspend-to-RAM" or "standby". (Don't write "disk" to the |
372 | and remount them after resuming. | 397 | /sys/power/state file; write "standby" or "mem".) We've not seen any |
398 | hardware that can use these modes through software suspend, although in | ||
399 | theory some systems might support "platform" or "firmware" modes that | ||
400 | won't break the USB connections. | ||
373 | 401 | ||
402 | Remember that it's always a bad idea to unplug a disk drive containing a | ||
403 | mounted filesystem. That's true even when your system is asleep! The | ||
404 | safest thing is to unmount all filesystems on removable media (such USB, | ||
405 | Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays) | ||
406 | before suspending; then remount them after resuming. | ||
407 | |||
408 | Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were | ||
409 | compiled with the similar configuration files. Anyway I found that | ||
410 | suspend to disk (and resume) is much slower on 2.6.16 compared to | ||
411 | 2.6.15. Any idea for why that might happen or how can I speed it up? | ||
412 | |||
413 | A: This is because the size of the suspend image is now greater than | ||
414 | for 2.6.15 (by saving more data we can get more responsive system | ||
415 | after resume). | ||
416 | |||
417 | There's the /sys/power/image_size knob that controls the size of the | ||
418 | image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as | ||
419 | root), the 2.6.15 behavior should be restored. If it is still too | ||
420 | slow, take a look at suspend.sf.net -- userland suspend is faster and | ||
421 | supports LZF compression to speed it up further. | ||
diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt index 43a889f8f08d..d859faa3a463 100644 --- a/Documentation/power/video.txt +++ b/Documentation/power/video.txt | |||
@@ -90,6 +90,7 @@ Table of known working notebooks: | |||
90 | Model hack (or "how to do it") | 90 | Model hack (or "how to do it") |
91 | ------------------------------------------------------------------------------ | 91 | ------------------------------------------------------------------------------ |
92 | Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI | 92 | Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI |
93 | Acer TM 230 s3_bios (2) | ||
93 | Acer TM 242FX vbetool (6) | 94 | Acer TM 242FX vbetool (6) |
94 | Acer TM C110 video_post (8) | 95 | Acer TM C110 video_post (8) |
95 | Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) or video_post (8) | 96 | Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) or video_post (8) |
@@ -115,6 +116,7 @@ Dell D610 vga=normal and X (possibly vbestate (6) too, but not tested) | |||
115 | Dell Inspiron 4000 ??? (*) | 116 | Dell Inspiron 4000 ??? (*) |
116 | Dell Inspiron 500m ??? (*) | 117 | Dell Inspiron 500m ??? (*) |
117 | Dell Inspiron 510m ??? | 118 | Dell Inspiron 510m ??? |
119 | Dell Inspiron 5150 vbetool needed (6) | ||
118 | Dell Inspiron 600m ??? (*) | 120 | Dell Inspiron 600m ??? (*) |
119 | Dell Inspiron 8200 ??? (*) | 121 | Dell Inspiron 8200 ??? (*) |
120 | Dell Inspiron 8500 ??? (*) | 122 | Dell Inspiron 8500 ??? (*) |
@@ -125,6 +127,7 @@ HP NX7000 ??? (*) | |||
125 | HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X | 127 | HP Pavilion ZD7000 vbetool post needed, need open-source nv driver for X |
126 | HP Omnibook XE3 athlon version none (1) | 128 | HP Omnibook XE3 athlon version none (1) |
127 | HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV | 129 | HP Omnibook XE3GC none (1), video is S3 Savage/IX-MV |
130 | HP Omnibook XE3L-GF vbetool (6) | ||
128 | HP Omnibook 5150 none (1), (S1 also works OK) | 131 | HP Omnibook 5150 none (1), (S1 also works OK) |
129 | IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. | 132 | IBM TP T20, model 2647-44G none (1), video is S3 Inc. 86C270-294 Savage/IX-MV, vesafb gets "interesting" but X work. |
130 | IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] | 133 | IBM TP A31 / Type 2652-M5G s3_mode (3) [works ok with BIOS 1.04 2002-08-23, but not at all with BIOS 1.11 2004-11-05 :-(] |
@@ -157,6 +160,7 @@ Sony Vaio vgn-s260 X or boot-radeon can init it (5) | |||
157 | Sony Vaio vgn-S580BH vga=normal, but suspend from X. Console will be blank unless you return to X. | 160 | Sony Vaio vgn-S580BH vga=normal, but suspend from X. Console will be blank unless you return to X. |
158 | Sony Vaio vgn-FS115B s3_bios (2),s3_mode (4) | 161 | Sony Vaio vgn-FS115B s3_bios (2),s3_mode (4) |
159 | Toshiba Libretto L5 none (1) | 162 | Toshiba Libretto L5 none (1) |
163 | Toshiba Libretto 100CT/110CT vbetool (6) | ||
160 | Toshiba Portege 3020CT s3_mode (3) | 164 | Toshiba Portege 3020CT s3_mode (3) |
161 | Toshiba Satellite 4030CDT s3_mode (3) (S1 also works OK) | 165 | Toshiba Satellite 4030CDT s3_mode (3) (S1 also works OK) |
162 | Toshiba Satellite 4080XCDT s3_mode (3) (S1 also works OK) | 166 | Toshiba Satellite 4080XCDT s3_mode (3) (S1 also works OK) |
diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX index e7da8c3a255b..12354830c6b0 100644 --- a/Documentation/scsi/00-INDEX +++ b/Documentation/scsi/00-INDEX | |||
@@ -30,8 +30,6 @@ aic7xxx.txt | |||
30 | - info on driver for Adaptec controllers | 30 | - info on driver for Adaptec controllers |
31 | aic7xxx_old.txt | 31 | aic7xxx_old.txt |
32 | - info on driver for Adaptec controllers, old generation | 32 | - info on driver for Adaptec controllers, old generation |
33 | cpqfc.txt | ||
34 | - info on driver for Compaq Tachyon TS adapters | ||
35 | dpti.txt | 33 | dpti.txt |
36 | - info on driver for DPT SmartRAID and Adaptec I2O RAID based adapters | 34 | - info on driver for DPT SmartRAID and Adaptec I2O RAID based adapters |
37 | dtc3x80.txt | 35 | dtc3x80.txt |
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 2dafa63bd370..0a85a7e8120e 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,16 @@ | |||
1 | |||
2 | 1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com> | ||
3 | 2 Current Version : 00.00.02.04 | ||
4 | 3 Older Version : 00.00.02.04 | ||
5 | |||
6 | i. Remove superflous instance_lock | ||
7 | |||
8 | gets rid of the otherwise superflous instance_lock and avoids an unsave | ||
9 | unsynchronized access in the error handler. | ||
10 | |||
11 | - Christoph Hellwig <hch@lst.de> | ||
12 | |||
13 | |||
1 | 1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com> | 14 | 1 Release Date : Wed Feb 03 14:31:44 PST 2006 - Sumant Patro <Sumant.Patro@lsil.com> |
2 | 2 Current Version : 00.00.02.04 | 15 | 2 Current Version : 00.00.02.04 |
3 | 3 Older Version : 00.00.02.04 | 16 | 3 Older Version : 00.00.02.04 |
diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt index 820fd0793502..be55670851a4 100644 --- a/Documentation/scsi/aacraid.txt +++ b/Documentation/scsi/aacraid.txt | |||
@@ -24,10 +24,10 @@ Supported Cards/Chipsets | |||
24 | 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) | 24 | 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) |
25 | 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) | 25 | 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) |
26 | 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) | 26 | 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) |
27 | 9005:0285:103c:3227 Adaptec 2610SA (Bearcat) | 27 | 9005:0285:103c:3227 Adaptec 2610SA (Bearcat HP release) |
28 | 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) | 28 | 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) |
29 | 9005:0285:9005:0294 Adaptec Prowler | 29 | 9005:0285:9005:0294 Adaptec Prowler |
30 | 9005:0286:9005:029d Adaptec 2420SA (Intruder) | 30 | 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) |
31 | 9005:0286:9005:029c Adaptec 2620SA (Intruder) | 31 | 9005:0286:9005:029c Adaptec 2620SA (Intruder) |
32 | 9005:0286:9005:029b Adaptec 2820SA (Intruder) | 32 | 9005:0286:9005:029b Adaptec 2820SA (Intruder) |
33 | 9005:0286:9005:02a7 Adaptec 2830SA (Skyray) | 33 | 9005:0286:9005:02a7 Adaptec 2830SA (Skyray) |
@@ -38,7 +38,7 @@ Supported Cards/Chipsets | |||
38 | 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark) | 38 | 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark) |
39 | 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) | 39 | 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) |
40 | 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) | 40 | 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) |
41 | 9005:0286:9005:02a2 Adaptec 4810SAS (Hurricane) | 41 | 9005:0286:9005:02a2 Adaptec 3800SAS (Hurricane44) |
42 | 1011:0046:9005:0364 Adaptec 5400S (Mustang) | 42 | 1011:0046:9005:0364 Adaptec 5400S (Mustang) |
43 | 1011:0046:9005:0365 Adaptec 5400S (Mustang) | 43 | 1011:0046:9005:0365 Adaptec 5400S (Mustang) |
44 | 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) | 44 | 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) |
@@ -72,7 +72,7 @@ Supported Cards/Chipsets | |||
72 | 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) | 72 | 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) |
73 | 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X) | 73 | 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X) |
74 | 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E) | 74 | 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E) |
75 | 9005:0286:9005:02a3 ICP ICP5085AU (Hurricane) | 75 | 9005:0286:9005:02a3 ICP ICP5445AU (Hurricane44) |
76 | 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) | 76 | 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) |
77 | 9005:0286:9005:02a9 ICP ICP5087AU (Skyray) | 77 | 9005:0286:9005:02a9 ICP ICP5087AU (Skyray) |
78 | 9005:0286:9005:02aa ICP ICP5047AU (Skyray) | 78 | 9005:0286:9005:02aa ICP ICP5047AU (Skyray) |
diff --git a/Documentation/scsi/cpqfc.txt b/Documentation/scsi/cpqfc.txt deleted file mode 100644 index dd33e61c0645..000000000000 --- a/Documentation/scsi/cpqfc.txt +++ /dev/null | |||
@@ -1,272 +0,0 @@ | |||
1 | Notes for CPQFCTS driver for Compaq Tachyon TS | ||
2 | Fibre Channel Host Bus Adapter, PCI 64-bit, 66MHz | ||
3 | for Linux (RH 6.1, 6.2 kernel 2.2.12-32, 2.2.14-5) | ||
4 | SMP tested | ||
5 | Tested in single and dual HBA configuration, 32 and 64bit busses, | ||
6 | 33 and 66MHz. Only supports FC-AL. | ||
7 | SEST size 512 Exchanges (simultaneous I/Os) limited by module kmalloc() | ||
8 | max of 128k bytes contiguous. | ||
9 | |||
10 | Ver 2.5.4 Oct 03, 2002 | ||
11 | * fixed memcpy of sense buffer in ioctl to copy the smaller defined size | ||
12 | Ver 2.5.3 Aug 01, 2002 | ||
13 | * fix the passthru ioctl to handle the Scsi_Cmnd->request being a pointer | ||
14 | Ver 2.5.1 Jul 30, 2002 | ||
15 | * fix ioctl to pay attention to the specified LUN. | ||
16 | Ver 2.5.0 Nov 29, 2001 | ||
17 | * eliminated io_request_lock. This change makes the driver specific | ||
18 | to the 2.5.x kernels. | ||
19 | * silenced excessively noisy printks. | ||
20 | |||
21 | Ver 2.1.2 July 23, 2002 | ||
22 | * initialize DumCmnd->lun in cpqfcTS_ioctl (used in fcFindLoggedInPorts as LUN index) | ||
23 | |||
24 | Ver 2.1.1 Oct 18, 2001 | ||
25 | * reinitialize Cmnd->SCp.sent_command (used to identify commands as | ||
26 | passthrus) on calling scsi_done, since the scsi mid layer does not | ||
27 | use (or reinitialize) this field to prevent subsequent comands from | ||
28 | having it set incorrectly. | ||
29 | |||
30 | Ver 2.1.0 Aug 27, 2001 | ||
31 | * Revise driver to use new kernel 2.4.x PCI DMA API, instead of | ||
32 | virt_to_bus(). (enables driver to work w/ ia64 systems with >2Gb RAM.) | ||
33 | Rework main scatter-gather code to handle cases where SG element | ||
34 | lengths are larger than 0x7FFFF bytes and use as many scatter | ||
35 | gather pages as necessary. (Steve Cameron) | ||
36 | * Makefile changes to bring cpqfc into line w/ rest of SCSI drivers | ||
37 | (thanks to Keith Owens) | ||
38 | |||
39 | Ver 2.0.5 Aug 06, 2001 | ||
40 | * Reject non-existent luns in the driver rather than letting the | ||
41 | hardware do it. (some HW behaves differently than others in this area.) | ||
42 | * Changed Makefile to rely on "make dep" instead of explicit dependencies | ||
43 | * ifdef'ed out fibre channel analyzer triggering debug code | ||
44 | * fixed a jiffies wrapping issue | ||
45 | |||
46 | Ver 2.0.4 Aug 01, 2001 | ||
47 | * Incorporated fix for target device reset from Steeleye | ||
48 | * Fixed passthrough ioctl so it doesn't hang. | ||
49 | * Fixed hang in launch_FCworker_thread() that occurred on some machines. | ||
50 | * Avoid problem when number of volumes in a single cabinet > 8 | ||
51 | |||
52 | Ver 2.0.2 July 23, 2001 | ||
53 | Changed the semiphore changes so the driver would compile in 2.4.7. | ||
54 | This version is for 2.4.7 and beyond. | ||
55 | |||
56 | Ver 2.0.1 May 7, 2001 | ||
57 | Merged version 1.3.6 fixes into version 2.0.0. | ||
58 | |||
59 | Ver 2.0.0 May 7, 2001 | ||
60 | Fixed problem so spinlock is being initialized to UNLOCKED. | ||
61 | Fixed updated driver so it compiles in the 2.4 tree. | ||
62 | |||
63 | Ver 1.3.6 Feb 27, 2001 | ||
64 | Added Target_Device_Reset function for SCSI error handling | ||
65 | Fixed problem with not reseting addressing mode after implicit logout | ||
66 | |||
67 | |||
68 | Ver 1.3.4 Sep 7, 2000 | ||
69 | Added Modinfo information | ||
70 | Fixed problem with statically linking the driver | ||
71 | |||
72 | Ver 1.3.3, Aug 23, 2000 | ||
73 | Fixed device/function number in ioctl | ||
74 | |||
75 | Ver 1.3.2, July 27, 2000 | ||
76 | Add include for Alpha compile on 2.2.14 kernel (cpq*i2c.c) | ||
77 | Change logic for different FCP-RSP sense_buffer location for HSG80 target | ||
78 | And search for Agilent Tachyon XL2 HBAs (not finished! - in test) | ||
79 | |||
80 | Tested with | ||
81 | (storage): | ||
82 | Compaq RA-4x000, RAID firmware ver 2.40 - 2.54 | ||
83 | Seagate FC drives model ST39102FC, rev 0006 | ||
84 | Hitachi DK31CJ-72FC rev J8A8 | ||
85 | IBM DDYF-T18350R rev F60K | ||
86 | Compaq FC-SCSI bridge w/ DLT 35/70 Gb DLT (tape) | ||
87 | (servers): | ||
88 | Compaq PL-1850R | ||
89 | Compaq PL-6500 Xeon (400MHz) | ||
90 | Compaq PL-8500 (500MHz, 66MHz, 64bit PCI) | ||
91 | Compaq Alpha DS20 (RH 6.1) | ||
92 | (hubs): | ||
93 | Vixel Rapport 1000 (7-port "dumb") | ||
94 | Gadzoox Gibralter (12-port "dumb") | ||
95 | Gadzoox Capellix 2000, 3000 | ||
96 | (switches): | ||
97 | Brocade 2010, 2400, 2800, rev 2.0.3a (& later) | ||
98 | Gadzoox 3210 (Fabric blade beta) | ||
99 | Vixel 7100 (Fabric beta firmare - known hot plug issues) | ||
100 | using "qa_test" (esp. io_test script) suite modified from Unix tests. | ||
101 | |||
102 | Installation: | ||
103 | make menuconfig | ||
104 | (select SCSI low-level, Compaq FC HBA) | ||
105 | make modules | ||
106 | make modules_install | ||
107 | |||
108 | e.g. insmod -f cpqfc | ||
109 | |||
110 | Due to Fabric/switch delays, driver requires 4 seconds | ||
111 | to initialize. If adapters are found, there will be a entries at | ||
112 | /proc/scsi/cpqfcTS/* | ||
113 | |||
114 | sample contents of startup messages | ||
115 | |||
116 | ************************* | ||
117 | scsi_register allocating 3596 bytes for CPQFCHBA | ||
118 | ioremap'd Membase: c887e600 | ||
119 | HBA Tachyon RevId 1.2 | ||
120 | Allocating 119808 for 576 Exchanges @ c0dc0000 | ||
121 | Allocating 112904 for LinkQ @ c0c20000 (576 elements) | ||
122 | Allocating 110600 for TachSEST for 512 Exchanges | ||
123 | cpqfcTS: writing IMQ BASE 7C0000h PI 7C4000h | ||
124 | cpqfcTS: SEST c0e40000(virt): Wrote base E40000h @ c887e740 | ||
125 | cpqfcTS: New FC port 0000E8h WWN: 500507650642499D SCSI Chan/Trgt 0/0 | ||
126 | cpqfcTS: New FC port 0000EFh WWN: 50000E100000D5A6 SCSI Chan/Trgt 0/1 | ||
127 | cpqfcTS: New FC port 0000E4h WWN: 21000020370097BB SCSI Chan/Trgt 0/2 | ||
128 | cpqfcTS: New FC port 0000E2h WWN: 2100002037009946 SCSI Chan/Trgt 0/3 | ||
129 | cpqfcTS: New FC port 0000E1h WWN: 21000020370098FE SCSI Chan/Trgt 0/4 | ||
130 | cpqfcTS: New FC port 0000E0h WWN: 21000020370097B2 SCSI Chan/Trgt 0/5 | ||
131 | cpqfcTS: New FC port 0000DCh WWN: 2100002037006CC1 SCSI Chan/Trgt 0/6 | ||
132 | cpqfcTS: New FC port 0000DAh WWN: 21000020370059F6 SCSI Chan/Trgt 0/7 | ||
133 | cpqfcTS: New FC port 00000Fh WWN: 500805F1FADB0E20 SCSI Chan/Trgt 0/8 | ||
134 | cpqfcTS: New FC port 000008h WWN: 500805F1FADB0EBA SCSI Chan/Trgt 0/9 | ||
135 | cpqfcTS: New FC port 000004h WWN: 500805F1FADB1EB9 SCSI Chan/Trgt 0/10 | ||
136 | cpqfcTS: New FC port 000002h WWN: 500805F1FADB1ADE SCSI Chan/Trgt 0/11 | ||
137 | cpqfcTS: New FC port 000001h WWN: 500805F1FADBA2CA SCSI Chan/Trgt 0/12 | ||
138 | scsi4 : Compaq FibreChannel HBA Tachyon TS HPFC-5166A/1.2: WWN 500508B200193F50 | ||
139 | on PCI bus 0 device 0xa0fc irq 5 IObaseL 0x3400, MEMBASE 0xc6ef8600 | ||
140 | PCI bus width 32 bits, bus speed 33 MHz | ||
141 | FCP-SCSI Driver v1.3.0 | ||
142 | GBIC detected: Short-wave. LPSM 0h Monitor | ||
143 | scsi : 5 hosts. | ||
144 | Vendor: IBM Model: DDYF-T18350R Rev: F60K | ||
145 | Type: Direct-Access ANSI SCSI revision: 03 | ||
146 | Detected scsi disk sdb at scsi4, channel 0, id 0, lun 0 | ||
147 | Vendor: HITACHI Model: DK31CJ-72FC Rev: J8A8 | ||
148 | Type: Direct-Access ANSI SCSI revision: 02 | ||
149 | Detected scsi disk sdc at scsi4, channel 0, id 1, lun 0 | ||
150 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
151 | Type: Direct-Access ANSI SCSI revision: 02 | ||
152 | Detected scsi disk sdd at scsi4, channel 0, id 2, lun 0 | ||
153 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
154 | Type: Direct-Access ANSI SCSI revision: 02 | ||
155 | Detected scsi disk sde at scsi4, channel 0, id 3, lun 0 | ||
156 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
157 | Type: Direct-Access ANSI SCSI revision: 02 | ||
158 | Detected scsi disk sdf at scsi4, channel 0, id 4, lun 0 | ||
159 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
160 | Type: Direct-Access ANSI SCSI revision: 02 | ||
161 | Detected scsi disk sdg at scsi4, channel 0, id 5, lun 0 | ||
162 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
163 | Type: Direct-Access ANSI SCSI revision: 02 | ||
164 | Detected scsi disk sdh at scsi4, channel 0, id 6, lun 0 | ||
165 | Vendor: SEAGATE Model: ST39102FC Rev: 0006 | ||
166 | Type: Direct-Access ANSI SCSI revision: 02 | ||
167 | Detected scsi disk sdi at scsi4, channel 0, id 7, lun 0 | ||
168 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48 | ||
169 | Type: Direct-Access ANSI SCSI revision: 02 | ||
170 | Detected scsi disk sdj at scsi4, channel 0, id 8, lun 0 | ||
171 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.48 | ||
172 | Type: Direct-Access ANSI SCSI revision: 02 | ||
173 | Detected scsi disk sdk at scsi4, channel 0, id 8, lun 1 | ||
174 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40 | ||
175 | Type: Direct-Access ANSI SCSI revision: 02 | ||
176 | Detected scsi disk sdl at scsi4, channel 0, id 9, lun 0 | ||
177 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.40 | ||
178 | Type: Direct-Access ANSI SCSI revision: 02 | ||
179 | Detected scsi disk sdm at scsi4, channel 0, id 9, lun 1 | ||
180 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 | ||
181 | Type: Direct-Access ANSI SCSI revision: 02 | ||
182 | Detected scsi disk sdn at scsi4, channel 0, id 10, lun 0 | ||
183 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 | ||
184 | Type: Direct-Access ANSI SCSI revision: 02 | ||
185 | Detected scsi disk sdo at scsi4, channel 0, id 11, lun 0 | ||
186 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 | ||
187 | Type: Direct-Access ANSI SCSI revision: 02 | ||
188 | Detected scsi disk sdp at scsi4, channel 0, id 11, lun 1 | ||
189 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 | ||
190 | Type: Direct-Access ANSI SCSI revision: 02 | ||
191 | Detected scsi disk sdq at scsi4, channel 0, id 12, lun 0 | ||
192 | Vendor: COMPAQ Model: LOGICAL VOLUME Rev: 2.54 | ||
193 | Type: Direct-Access ANSI SCSI revision: 02 | ||
194 | Detected scsi disk sdr at scsi4, channel 0, id 12, lun 1 | ||
195 | resize_dma_pool: unknown device type 12 | ||
196 | resize_dma_pool: unknown device type 12 | ||
197 | SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5 GB] | ||
198 | sdb: sdb1 | ||
199 | SCSI device sdc: hdwr sector= 512 bytes. Sectors= 144410880 [70513 MB] [70.5 GB] | ||
200 | sdc: sdc1 | ||
201 | SCSI device sdd: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
202 | sdd: sdd1 | ||
203 | SCSI device sde: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
204 | sde: sde1 | ||
205 | SCSI device sdf: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
206 | sdf: sdf1 | ||
207 | SCSI device sdg: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
208 | sdg: sdg1 | ||
209 | SCSI device sdh: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
210 | sdh: sdh1 | ||
211 | SCSI device sdi: hdwr sector= 512 bytes. Sectors= 17783240 [8683 MB] [8.7 GB] | ||
212 | sdi: sdi1 | ||
213 | SCSI device sdj: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB] | ||
214 | sdj: sdj1 | ||
215 | SCSI device sdk: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB] | ||
216 | sdk: sdk1 | ||
217 | SCSI device sdl: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] | ||
218 | sdl: sdl1 | ||
219 | SCSI device sdm: hdwr sector= 512 bytes. Sectors= 8380320 [4091 MB] [4.1 GB] | ||
220 | sdm: sdm1 | ||
221 | SCSI device sdn: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] | ||
222 | sdn: sdn1 | ||
223 | SCSI device sdo: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] | ||
224 | sdo: sdo1 | ||
225 | SCSI device sdp: hdwr sector= 512 bytes. Sectors= 17764320 [8673 MB] [8.7 GB] | ||
226 | sdp: sdp1 | ||
227 | SCSI device sdq: hdwr sector= 512 bytes. Sectors= 2056160 [1003 MB] [1.0 GB] | ||
228 | sdq: sdq1 | ||
229 | SCSI device sdr: hdwr sector= 512 bytes. Sectors= 2052736 [1002 MB] [1.0 GB] | ||
230 | sdr: sdr1 | ||
231 | |||
232 | ************************* | ||
233 | |||
234 | If a GBIC of type Short-wave, Long-wave, or Copper is detected, it will | ||
235 | print out; otherwise, "none" is displayed. If the cabling is correct | ||
236 | and a loop circuit is completed, you should see "Monitor"; otherwise, | ||
237 | "LoopFail" (on open circuit) or some LPSM number/state with bit 3 set. | ||
238 | |||
239 | |||
240 | ERRATA: | ||
241 | 1. Normally, Linux Scsi queries FC devices with INQUIRY strings. All LUNs | ||
242 | found according to INQUIRY should get READ commands at sector 0 to find | ||
243 | partition table, etc. Older kernels only query the first 4 devices. Some | ||
244 | Linux kernels only look for one LUN per target (i.e. FC device). | ||
245 | |||
246 | 2. Physically removing a device, or a malfunctioning system which hides a | ||
247 | device, leads to a 30-second timeout and subsequent _abort call. | ||
248 | In some process contexts, this will hang the kernel (crashing the system). | ||
249 | Single bit errors in frames and virtually all hot plugging events are | ||
250 | gracefully handled with internal driver timer and Abort processing. | ||
251 | |||
252 | 3. Some SCSI drives with error conditions will not handle the 7 second timeout | ||
253 | in this software driver, leading to infinite retries on timed out SCSI commands. | ||
254 | The 7 secs balances the need to quickly recover from lost frames (esp. on sequence | ||
255 | initiatives) and time needed by older/slower/error-state drives in responding. | ||
256 | This can be easily changed in "Exchanges[].timeOut". | ||
257 | |||
258 | 4. Due to the nature of FC soft addressing, there is no assurance that the | ||
259 | same LUNs (drives) will have the same path (e.g. /dev/sdb1) from one boot to | ||
260 | next. Dynamic soft address changes (i.e. 24-bit FC port_id) are | ||
261 | supported during run time (e.g. due to hot plug event) by the use of WWN to | ||
262 | SCSI Nexus (channel/target/LUN) mapping. | ||
263 | |||
264 | 5. Compaq RA4x00 firmware version 2.54 and later supports SSP (Selective | ||
265 | Storage Presentation), which maps LUNs to a WWN. If RA4x00 firmware prior | ||
266 | 2.54 (e.g. older controller) is used, or the FC HBA is replaced (another WWN | ||
267 | is used), logical volumes on the RA4x00 will no longer be visible. | ||
268 | |||
269 | |||
270 | Send questions/comments to: | ||
271 | Amy Vanzant-Hodge (fibrechannel@compaq.com) | ||
272 | |||
diff --git a/Documentation/scsi/hptiop.txt b/Documentation/scsi/hptiop.txt new file mode 100644 index 000000000000..d28a31247d4c --- /dev/null +++ b/Documentation/scsi/hptiop.txt | |||
@@ -0,0 +1,92 @@ | |||
1 | HIGHPOINT ROCKETRAID 3xxx RAID DRIVER (hptiop) | ||
2 | |||
3 | Controller Register Map | ||
4 | ------------------------- | ||
5 | |||
6 | The controller IOP is accessed via PCI BAR0. | ||
7 | |||
8 | BAR0 offset Register | ||
9 | 0x10 Inbound Message Register 0 | ||
10 | 0x14 Inbound Message Register 1 | ||
11 | 0x18 Outbound Message Register 0 | ||
12 | 0x1C Outbound Message Register 1 | ||
13 | 0x20 Inbound Doorbell Register | ||
14 | 0x24 Inbound Interrupt Status Register | ||
15 | 0x28 Inbound Interrupt Mask Register | ||
16 | 0x30 Outbound Interrupt Status Register | ||
17 | 0x34 Outbound Interrupt Mask Register | ||
18 | 0x40 Inbound Queue Port | ||
19 | 0x44 Outbound Queue Port | ||
20 | |||
21 | |||
22 | I/O Request Workflow | ||
23 | ---------------------- | ||
24 | |||
25 | All queued requests are handled via inbound/outbound queue port. | ||
26 | A request packet can be allocated in either IOP or host memory. | ||
27 | |||
28 | To send a request to the controller: | ||
29 | |||
30 | - Get a free request packet by reading the inbound queue port or | ||
31 | allocate a free request in host DMA coherent memory. | ||
32 | |||
33 | The value returned from the inbound queue port is an offset | ||
34 | relative to the IOP BAR0. | ||
35 | |||
36 | Requests allocated in host memory must be aligned on 32-bytes boundary. | ||
37 | |||
38 | - Fill the packet. | ||
39 | |||
40 | - Post the packet to IOP by writing it to inbound queue. For requests | ||
41 | allocated in IOP memory, write the offset to inbound queue port. For | ||
42 | requests allocated in host memory, write (0x80000000|(bus_addr>>5)) | ||
43 | to the inbound queue port. | ||
44 | |||
45 | - The IOP process the request. When the request is completed, it | ||
46 | will be put into outbound queue. An outbound interrupt will be | ||
47 | generated. | ||
48 | |||
49 | For requests allocated in IOP memory, the request offset is posted to | ||
50 | outbound queue. | ||
51 | |||
52 | For requests allocated in host memory, (0x80000000|(bus_addr>>5)) | ||
53 | is posted to the outbound queue. If IOP_REQUEST_FLAG_OUTPUT_CONTEXT | ||
54 | flag is set in the request, the low 32-bit context value will be | ||
55 | posted instead. | ||
56 | |||
57 | - The host read the outbound queue and complete the request. | ||
58 | |||
59 | For requests allocated in IOP memory, the host driver free the request | ||
60 | by writing it to the outbound queue. | ||
61 | |||
62 | Non-queued requests (reset/flush etc) can be sent via inbound message | ||
63 | register 0. An outbound message with the same value indicates the completion | ||
64 | of an inbound message. | ||
65 | |||
66 | |||
67 | User-level Interface | ||
68 | --------------------- | ||
69 | |||
70 | The driver exposes following sysfs attributes: | ||
71 | |||
72 | NAME R/W Description | ||
73 | driver-version R driver version string | ||
74 | firmware-version R firmware version string | ||
75 | |||
76 | The driver registers char device "hptiop" to communicate with HighPoint RAID | ||
77 | management software. Its ioctl routine acts as a general binary interface | ||
78 | between the IOP firmware and HighPoint RAID management software. New management | ||
79 | functions can be implemented in application/firmware without modification | ||
80 | in driver code. | ||
81 | |||
82 | |||
83 | ----------------------------------------------------------------------------- | ||
84 | Copyright (C) 2006 HighPoint Technologies, Inc. All Rights Reserved. | ||
85 | |||
86 | This file is distributed in the hope that it will be useful, | ||
87 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
88 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
89 | GNU General Public License for more details. | ||
90 | |||
91 | linux@highpoint-tech.com | ||
92 | http://www.highpoint-tech.com | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 0ee2c7dfc482..87d76a5c73d0 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -366,7 +366,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
366 | 366 | ||
367 | Module for C-Media CMI8338 and 8738 PCI sound cards. | 367 | Module for C-Media CMI8338 and 8738 PCI sound cards. |
368 | 368 | ||
369 | mpu_port - 0x300,0x310,0x320,0x330, 0 = disable (default) | 369 | mpu_port - 0x300,0x310,0x320,0x330 = legacy port, |
370 | 1 = integrated PCI port, | ||
371 | 0 = disable (default) | ||
370 | fm_port - 0x388 (default), 0 = disable (default) | 372 | fm_port - 0x388 (default), 0 = disable (default) |
371 | soft_ac3 - Software-conversion of raw SPDIF packets (model 033 only) | 373 | soft_ac3 - Software-conversion of raw SPDIF packets (model 033 only) |
372 | (default = 1) | 374 | (default = 1) |
@@ -468,7 +470,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
468 | 470 | ||
469 | Module for multifunction CS5535 companion PCI device | 471 | Module for multifunction CS5535 companion PCI device |
470 | 472 | ||
471 | This module supports multiple cards. | 473 | The power-management is supported. |
472 | 474 | ||
473 | Module snd-dt019x | 475 | Module snd-dt019x |
474 | ----------------- | 476 | ----------------- |
@@ -707,8 +709,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
707 | Module snd-hda-intel | 709 | Module snd-hda-intel |
708 | -------------------- | 710 | -------------------- |
709 | 711 | ||
710 | Module for Intel HD Audio (ICH6, ICH6M, ICH7), ATI SB450, | 712 | Module for Intel HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8), |
711 | VIA VT8251/VT8237A | 713 | ATI SB450, SB600, RS600, |
714 | VIA VT8251/VT8237A, | ||
715 | SIS966, ULI M5461 | ||
712 | 716 | ||
713 | model - force the model name | 717 | model - force the model name |
714 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) | 718 | position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) |
@@ -778,6 +782,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
778 | AD1981 | 782 | AD1981 |
779 | basic 3-jack (default) | 783 | basic 3-jack (default) |
780 | hp HP nx6320 | 784 | hp HP nx6320 |
785 | thinkpad Lenovo Thinkpad T60/X60/Z60 | ||
781 | 786 | ||
782 | AD1986A | 787 | AD1986A |
783 | 6stack 6-jack, separate surrounds (default) | 788 | 6stack 6-jack, separate surrounds (default) |
@@ -1633,9 +1638,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1633 | 1638 | ||
1634 | About capture IBL, see the description of snd-vx222 module. | 1639 | About capture IBL, see the description of snd-vx222 module. |
1635 | 1640 | ||
1636 | Note: the driver is build only when CONFIG_ISA is set. | 1641 | Note: snd-vxp440 driver is merged to snd-vxpocket driver since |
1637 | |||
1638 | Note2: snd-vxp440 driver is merged to snd-vxpocket driver since | ||
1639 | ALSA 1.0.10. | 1642 | ALSA 1.0.10. |
1640 | 1643 | ||
1641 | The power-management is supported. | 1644 | The power-management is supported. |
@@ -1662,8 +1665,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1662 | 1665 | ||
1663 | Module for Sound Core PDAudioCF sound card. | 1666 | Module for Sound Core PDAudioCF sound card. |
1664 | 1667 | ||
1665 | Note: the driver is build only when CONFIG_ISA is set. | ||
1666 | |||
1667 | The power-management is supported. | 1668 | The power-management is supported. |
1668 | 1669 | ||
1669 | 1670 | ||
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 1faf76383bab..635cbb94357c 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -4215,7 +4215,7 @@ struct _snd_pcm_runtime { | |||
4215 | <programlisting> | 4215 | <programlisting> |
4216 | <![CDATA[ | 4216 | <![CDATA[ |
4217 | struct snd_rawmidi *rmidi; | 4217 | struct snd_rawmidi *rmidi; |
4218 | snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, integrated, | 4218 | snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags, |
4219 | irq, irq_flags, &rmidi); | 4219 | irq, irq_flags, &rmidi); |
4220 | ]]> | 4220 | ]]> |
4221 | </programlisting> | 4221 | </programlisting> |
@@ -4242,15 +4242,36 @@ struct _snd_pcm_runtime { | |||
4242 | </para> | 4242 | </para> |
4243 | 4243 | ||
4244 | <para> | 4244 | <para> |
4245 | The 5th argument is bitflags for additional information. | ||
4245 | When the i/o port address above is a part of the PCI i/o | 4246 | When the i/o port address above is a part of the PCI i/o |
4246 | region, the MPU401 i/o port might have been already allocated | 4247 | region, the MPU401 i/o port might have been already allocated |
4247 | (reserved) by the driver itself. In such a case, pass non-zero | 4248 | (reserved) by the driver itself. In such a case, pass a bit flag |
4248 | to the 5th argument | 4249 | <constant>MPU401_INFO_INTEGRATED</constant>, |
4249 | (<parameter>integrated</parameter>). Otherwise, pass 0 to it, | ||
4250 | and | 4250 | and |
4251 | the mpu401-uart layer will allocate the i/o ports by itself. | 4251 | the mpu401-uart layer will allocate the i/o ports by itself. |
4252 | </para> | 4252 | </para> |
4253 | 4253 | ||
4254 | <para> | ||
4255 | When the controller supports only the input or output MIDI stream, | ||
4256 | pass <constant>MPU401_INFO_INPUT</constant> or | ||
4257 | <constant>MPU401_INFO_OUTPUT</constant> bitflag, respectively. | ||
4258 | Then the rawmidi instance is created as a single stream. | ||
4259 | </para> | ||
4260 | |||
4261 | <para> | ||
4262 | <constant>MPU401_INFO_MMIO</constant> bitflag is used to change | ||
4263 | the access method to MMIO (via readb and writeb) instead of | ||
4264 | iob and outb. In this case, you have to pass the iomapped address | ||
4265 | to <function>snd_mpu401_uart_new()</function>. | ||
4266 | </para> | ||
4267 | |||
4268 | <para> | ||
4269 | When <constant>MPU401_INFO_TX_IRQ</constant> is set, the output | ||
4270 | stream isn't checked in the default interrupt handler. The driver | ||
4271 | needs to call <function>snd_mpu401_uart_interrupt_tx()</function> | ||
4272 | by itself to start processing the output stream in irq handler. | ||
4273 | </para> | ||
4274 | |||
4254 | <para> | 4275 | <para> |
4255 | Usually, the port address corresponds to the command port and | 4276 | Usually, the port address corresponds to the command port and |
4256 | port + 1 corresponds to the data port. If not, you may change | 4277 | port + 1 corresponds to the data port. If not, you may change |
@@ -5333,7 +5354,7 @@ struct _snd_pcm_runtime { | |||
5333 | <informalexample> | 5354 | <informalexample> |
5334 | <programlisting> | 5355 | <programlisting> |
5335 | <![CDATA[ | 5356 | <![CDATA[ |
5336 | snd_info_set_text_ops(entry, chip, read_size, my_proc_read); | 5357 | snd_info_set_text_ops(entry, chip, my_proc_read); |
5337 | ]]> | 5358 | ]]> |
5338 | </programlisting> | 5359 | </programlisting> |
5339 | </informalexample> | 5360 | </informalexample> |
@@ -5394,7 +5415,6 @@ struct _snd_pcm_runtime { | |||
5394 | <informalexample> | 5415 | <informalexample> |
5395 | <programlisting> | 5416 | <programlisting> |
5396 | <![CDATA[ | 5417 | <![CDATA[ |
5397 | entry->c.text.write_size = 256; | ||
5398 | entry->c.text.write = my_proc_write; | 5418 | entry->c.text.write = my_proc_write; |
5399 | ]]> | 5419 | ]]> |
5400 | </programlisting> | 5420 | </programlisting> |
@@ -5402,22 +5422,6 @@ struct _snd_pcm_runtime { | |||
5402 | </para> | 5422 | </para> |
5403 | 5423 | ||
5404 | <para> | 5424 | <para> |
5405 | The buffer size for read is set to 1024 implicitly by | ||
5406 | <function>snd_info_set_text_ops()</function>. It should suffice | ||
5407 | in most cases (the size will be aligned to | ||
5408 | <constant>PAGE_SIZE</constant> anyway), but if you need to handle | ||
5409 | very large text files, you can set it explicitly, too. | ||
5410 | |||
5411 | <informalexample> | ||
5412 | <programlisting> | ||
5413 | <![CDATA[ | ||
5414 | entry->c.text.read_size = 65536; | ||
5415 | ]]> | ||
5416 | </programlisting> | ||
5417 | </informalexample> | ||
5418 | </para> | ||
5419 | |||
5420 | <para> | ||
5421 | For the write callback, you can use | 5425 | For the write callback, you can use |
5422 | <function>snd_info_get_line()</function> to get a text line, and | 5426 | <function>snd_info_get_line()</function> to get a text line, and |
5423 | <function>snd_info_get_str()</function> to retrieve a string from | 5427 | <function>snd_info_get_str()</function> to retrieve a string from |
@@ -5562,7 +5566,7 @@ struct _snd_pcm_runtime { | |||
5562 | power status.</para></listitem> | 5566 | power status.</para></listitem> |
5563 | <listitem><para>Call <function>snd_pcm_suspend_all()</function> to suspend the running PCM streams.</para></listitem> | 5567 | <listitem><para>Call <function>snd_pcm_suspend_all()</function> to suspend the running PCM streams.</para></listitem> |
5564 | <listitem><para>If AC97 codecs are used, call | 5568 | <listitem><para>If AC97 codecs are used, call |
5565 | <function>snd_ac97_resume()</function> for each codec.</para></listitem> | 5569 | <function>snd_ac97_suspend()</function> for each codec.</para></listitem> |
5566 | <listitem><para>Save the register values if necessary.</para></listitem> | 5570 | <listitem><para>Save the register values if necessary.</para></listitem> |
5567 | <listitem><para>Stop the hardware if necessary.</para></listitem> | 5571 | <listitem><para>Stop the hardware if necessary.</para></listitem> |
5568 | <listitem><para>Disable the PCI device by calling | 5572 | <listitem><para>Disable the PCI device by calling |
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 3f1c5464b1c9..5a311c38dd1a 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt | |||
@@ -1,5 +1,6 @@ | |||
1 | Copyright 2004 Linus Torvalds | 1 | Copyright 2004 Linus Torvalds |
2 | Copyright 2004 Pavel Machek <pavel@suse.cz> | 2 | Copyright 2004 Pavel Machek <pavel@suse.cz> |
3 | Copyright 2006 Bob Copeland <me@bobcopeland.com> | ||
3 | 4 | ||
4 | Using sparse for typechecking | 5 | Using sparse for typechecking |
5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 6 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -41,15 +42,8 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian | |||
41 | vs cpu-endian vs whatever), and there the constant "0" really _is_ | 42 | vs cpu-endian vs whatever), and there the constant "0" really _is_ |
42 | special. | 43 | special. |
43 | 44 | ||
44 | Use | 45 | Getting sparse |
45 | 46 | ~~~~~~~~~~~~~~ | |
46 | make C=[12] CF=-Wbitwise | ||
47 | |||
48 | or you don't get any checking at all. | ||
49 | |||
50 | |||
51 | Where to get sparse | ||
52 | ~~~~~~~~~~~~~~~~~~~ | ||
53 | 47 | ||
54 | With git, you can just get it from | 48 | With git, you can just get it from |
55 | 49 | ||
@@ -57,7 +51,7 @@ With git, you can just get it from | |||
57 | 51 | ||
58 | and DaveJ has tar-balls at | 52 | and DaveJ has tar-balls at |
59 | 53 | ||
60 | http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ | 54 | http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ |
61 | 55 | ||
62 | 56 | ||
63 | Once you have it, just do | 57 | Once you have it, just do |
@@ -65,8 +59,20 @@ Once you have it, just do | |||
65 | make | 59 | make |
66 | make install | 60 | make install |
67 | 61 | ||
68 | as your regular user, and it will install sparse in your ~/bin directory. | 62 | as a regular user, and it will install sparse in your ~/bin directory. |
69 | After that, doing a kernel make with "make C=1" will run sparse on all the | 63 | |
70 | C files that get recompiled, or with "make C=2" will run sparse on the | 64 | Using sparse |
71 | files whether they need to be recompiled or not (ie the latter is fast way | 65 | ~~~~~~~~~~~~ |
72 | to check the whole tree if you have already built it). | 66 | |
67 | Do a kernel make with "make C=1" to run sparse on all the C files that get | ||
68 | recompiled, or use "make C=2" to run sparse on the files whether they need to | ||
69 | be recompiled or not. The latter is a fast way to check the whole tree if you | ||
70 | have already built it. | ||
71 | |||
72 | The optional make variable CF can be used to pass arguments to sparse. The | ||
73 | build system passes -Wbitwise to sparse automatically. To perform endianness | ||
74 | checks, you may define __CHECK_ENDIAN__: | ||
75 | |||
76 | make C=2 CF="-D__CHECK_ENDIAN__" | ||
77 | |||
78 | These checks are disabled by default as they generate a host of warnings. | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index a46c10fcddfc..2dc246af4885 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -29,6 +29,7 @@ Currently, these files are in /proc/sys/vm: | |||
29 | - drop-caches | 29 | - drop-caches |
30 | - zone_reclaim_mode | 30 | - zone_reclaim_mode |
31 | - zone_reclaim_interval | 31 | - zone_reclaim_interval |
32 | - panic_on_oom | ||
32 | 33 | ||
33 | ============================================================== | 34 | ============================================================== |
34 | 35 | ||
@@ -178,3 +179,15 @@ Time is set in seconds and set by default to 30 seconds. | |||
178 | Reduce the interval if undesired off node allocations occur. However, too | 179 | Reduce the interval if undesired off node allocations occur. However, too |
179 | frequent scans will have a negative impact onoff node allocation performance. | 180 | frequent scans will have a negative impact onoff node allocation performance. |
180 | 181 | ||
182 | ============================================================= | ||
183 | |||
184 | panic_on_oom | ||
185 | |||
186 | This enables or disables panic on out-of-memory feature. If this is set to 1, | ||
187 | the kernel panics when out-of-memory happens. If this is set to 0, the kernel | ||
188 | will kill some rogue process, called oom_killer. Usually, oom_killer can kill | ||
189 | rogue processes and system will survive. If you want to panic the system | ||
190 | rather than killing rogue processes, set this to 1. | ||
191 | |||
192 | The default value is 0. | ||
193 | |||
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt index 63cb7edd177e..e65ec828d7aa 100644 --- a/Documentation/usb/usbmon.txt +++ b/Documentation/usb/usbmon.txt | |||
@@ -29,14 +29,13 @@ if usbmon is built into the kernel. | |||
29 | 29 | ||
30 | # mount -t debugfs none_debugs /sys/kernel/debug | 30 | # mount -t debugfs none_debugs /sys/kernel/debug |
31 | # modprobe usbmon | 31 | # modprobe usbmon |
32 | # | ||
32 | 33 | ||
33 | Verify that bus sockets are present. | 34 | Verify that bus sockets are present. |
34 | 35 | ||
35 | [root@lembas zaitcev]# ls /sys/kernel/debug/usbmon | 36 | # ls /sys/kernel/debug/usbmon |
36 | 1s 1t 2s 2t 3s 3t 4s 4t | 37 | 1s 1t 2s 2t 3s 3t 4s 4t |
37 | [root@lembas zaitcev]# | 38 | # |
38 | |||
39 | # ls /sys/kernel | ||
40 | 39 | ||
41 | 2. Find which bus connects to the desired device | 40 | 2. Find which bus connects to the desired device |
42 | 41 | ||
@@ -76,7 +75,7 @@ that the file size is not excessive for your favourite editor. | |||
76 | 75 | ||
77 | * Raw text data format | 76 | * Raw text data format |
78 | 77 | ||
79 | The '0t' type data consists of a stream of events, such as URB submission, | 78 | The '1t' type data consists of a stream of events, such as URB submission, |
80 | URB callback, submission error. Every event is a text line, which consists | 79 | URB callback, submission error. Every event is a text line, which consists |
81 | of whitespace separated words. The number of position of words may depend | 80 | of whitespace separated words. The number of position of words may depend |
82 | on the event type, but there is a set of words, common for all types. | 81 | on the event type, but there is a set of words, common for all types. |
@@ -97,20 +96,25 @@ Here is the list of words, from left to right: | |||
97 | Zi Zo Isochronous input and output | 96 | Zi Zo Isochronous input and output |
98 | Ii Io Interrupt input and output | 97 | Ii Io Interrupt input and output |
99 | Bi Bo Bulk input and output | 98 | Bi Bo Bulk input and output |
100 | Device address and Endpoint number are decimal numbers with leading zeroes | 99 | Device address and Endpoint number are 3-digit and 2-digit (respectively) |
101 | or 3 and 2 positions, correspondingly. | 100 | decimal numbers, with leading zeroes. |
102 | - URB Status. This field makes no sense for submissions, but is present | 101 | - URB Status. In most cases, this field contains a number, sometimes negative, |
103 | to help scripts with parsing. In error case, it contains the error code. | 102 | which represents a "status" field of the URB. This field makes no sense for |
104 | In case of a setup packet, it contains a Setup Tag. If scripts read a number | 103 | submissions, but is present anyway to help scripts with parsing. When an |
105 | in this field, they proceed to read Data Length. Otherwise, they read | 104 | error occurs, the field contains the error code. In case of a submission of |
106 | the setup packet before reading the Data Length. | 105 | a Control packet, this field contains a Setup Tag instead of an error code. |
106 | It is easy to tell whether the Setup Tag is present because it is never a | ||
107 | number. Thus if scripts find a number in this field, they proceed to read | ||
108 | Data Length. If they find something else, like a letter, they read the setup | ||
109 | packet before reading the Data Length. | ||
107 | - Setup packet, if present, consists of 5 words: one of each for bmRequestType, | 110 | - 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. | 111 | bRequest, wValue, wIndex, wLength, as specified by the USB Specification 2.0. |
109 | These words are safe to decode if Setup Tag was 's'. Otherwise, the setup | 112 | These words are safe to decode if Setup Tag was 's'. Otherwise, the setup |
110 | packet was present, but not captured, and the fields contain filler. | 113 | packet was present, but not captured, and the fields contain filler. |
111 | - Data Length. This is the actual length in the URB. | 114 | - Data Length. For submissions, this is the requested length. For callbacks, |
115 | this is the actual length. | ||
112 | - Data tag. The usbmon may not always capture data, even if length is nonzero. | 116 | - Data tag. The usbmon may not always capture data, even if length is nonzero. |
113 | Only if tag is '=', the data words are present. | 117 | The data words are present only if this tag is '='. |
114 | - Data words follow, in big endian hexadecimal format. Notice that they are | 118 | - Data words follow, in big endian hexadecimal format. Notice that they are |
115 | not machine words, but really just a byte stream split into words to make | 119 | not machine words, but really just a byte stream split into words to make |
116 | it easier to read. Thus, the last word may contain from one to four bytes. | 120 | it easier to read. Thus, the last word may contain from one to four bytes. |
diff --git a/Documentation/vm/page_migration b/Documentation/vm/page_migration index 0dd4ef30c361..99f89aa10169 100644 --- a/Documentation/vm/page_migration +++ b/Documentation/vm/page_migration | |||
@@ -26,8 +26,13 @@ a process are located. See also the numa_maps manpage in the numactl package. | |||
26 | Manual migration is useful if for example the scheduler has relocated | 26 | Manual migration is useful if for example the scheduler has relocated |
27 | a process to a processor on a distant node. A batch scheduler or an | 27 | a process to a processor on a distant node. A batch scheduler or an |
28 | administrator may detect the situation and move the pages of the process | 28 | administrator may detect the situation and move the pages of the process |
29 | nearer to the new processor. At some point in the future we may have | 29 | nearer to the new processor. The kernel itself does only provide |
30 | some mechanism in the scheduler that will automatically move the pages. | 30 | manual page migration support. Automatic page migration may be implemented |
31 | through user space processes that move pages. A special function call | ||
32 | "move_pages" allows the moving of individual pages within a process. | ||
33 | A NUMA profiler may f.e. obtain a log showing frequent off node | ||
34 | accesses and may use the result to move pages to more advantageous | ||
35 | locations. | ||
31 | 36 | ||
32 | Larger installations usually partition the system using cpusets into | 37 | Larger installations usually partition the system using cpusets into |
33 | sections of nodes. Paul Jackson has equipped cpusets with the ability to | 38 | sections of nodes. Paul Jackson has equipped cpusets with the ability to |
@@ -62,22 +67,14 @@ A. In kernel use of migrate_pages() | |||
62 | It also prevents the swapper or other scans to encounter | 67 | It also prevents the swapper or other scans to encounter |
63 | the page. | 68 | the page. |
64 | 69 | ||
65 | 2. Generate a list of newly allocates page. These pages will contain the | 70 | 2. We need to have a function of type new_page_t that can be |
66 | contents of the pages from the first list after page migration is | 71 | passed to migrate_pages(). This function should figure out |
67 | complete. | 72 | how to allocate the correct new page given the old page. |
68 | 73 | ||
69 | 3. The migrate_pages() function is called which attempts | 74 | 3. The migrate_pages() function is called which attempts |
70 | to do the migration. It returns the moved pages in the | 75 | to do the migration. It will call the function to allocate |
71 | list specified as the third parameter and the failed | 76 | the new page for each page that is considered for |
72 | migrations in the fourth parameter. The first parameter | 77 | moving. |
73 | will contain the pages that could still be retried. | ||
74 | |||
75 | 4. The leftover pages of various types are returned | ||
76 | to the LRU using putback_to_lru_pages() or otherwise | ||
77 | disposed of. The pages will still have the refcount as | ||
78 | increased by isolate_lru_pages() if putback_to_lru_pages() is not | ||
79 | used! The kernel may want to handle the various cases of failures in | ||
80 | different ways. | ||
81 | 78 | ||
82 | B. How migrate_pages() works | 79 | B. How migrate_pages() works |
83 | ---------------------------- | 80 | ---------------------------- |
@@ -93,83 +90,58 @@ Steps: | |||
93 | 90 | ||
94 | 2. Insure that writeback is complete. | 91 | 2. Insure that writeback is complete. |
95 | 92 | ||
96 | 3. Make sure that the page has assigned swap cache entry if | 93 | 3. Prep the new page that we want to move to. It is locked |
97 | it is an anonyous page. The swap cache reference is necessary | ||
98 | to preserve the information contain in the page table maps while | ||
99 | page migration occurs. | ||
100 | |||
101 | 4. Prep the new page that we want to move to. It is locked | ||
102 | and set to not being uptodate so that all accesses to the new | 94 | and set to not being uptodate so that all accesses to the new |
103 | page immediately lock while the move is in progress. | 95 | page immediately lock while the move is in progress. |
104 | 96 | ||
105 | 5. All the page table references to the page are either dropped (file | 97 | 4. The new page is prepped with some settings from the old page so that |
106 | backed pages) or converted to swap references (anonymous pages). | 98 | accesses to the new page will discover a page with the correct settings. |
107 | This should decrease the reference count. | 99 | |
100 | 5. All the page table references to the page are converted | ||
101 | to migration entries or dropped (nonlinear vmas). | ||
102 | This decrease the mapcount of a page. If the resulting | ||
103 | mapcount is not zero then we do not migrate the page. | ||
104 | All user space processes that attempt to access the page | ||
105 | will now wait on the page lock. | ||
108 | 106 | ||
109 | 6. The radix tree lock is taken. This will cause all processes trying | 107 | 6. The radix tree lock is taken. This will cause all processes trying |
110 | to reestablish a pte to block on the radix tree spinlock. | 108 | to access the page via the mapping to block on the radix tree spinlock. |
111 | 109 | ||
112 | 7. The refcount of the page is examined and we back out if references remain | 110 | 7. The refcount of the page is examined and we back out if references remain |
113 | otherwise we know that we are the only one referencing this page. | 111 | otherwise we know that we are the only one referencing this page. |
114 | 112 | ||
115 | 8. The radix tree is checked and if it does not contain the pointer to this | 113 | 8. The radix tree is checked and if it does not contain the pointer to this |
116 | page then we back out because someone else modified the mapping first. | 114 | page then we back out because someone else modified the radix tree. |
117 | |||
118 | 9. The mapping is checked. If the mapping is gone then a truncate action may | ||
119 | be in progress and we back out. | ||
120 | |||
121 | 10. The new page is prepped with some settings from the old page so that | ||
122 | accesses to the new page will be discovered to have the correct settings. | ||
123 | 115 | ||
124 | 11. The radix tree is changed to point to the new page. | 116 | 9. The radix tree is changed to point to the new page. |
125 | 117 | ||
126 | 12. The reference count of the old page is dropped because the radix tree | 118 | 10. The reference count of the old page is dropped because the radix tree |
127 | reference is gone. | 119 | reference is gone. A reference to the new page is established because |
120 | the new page is referenced to by the radix tree. | ||
128 | 121 | ||
129 | 13. The radix tree lock is dropped. With that lookups become possible again | 122 | 11. The radix tree lock is dropped. With that lookups in the mapping |
130 | and other processes will move from spinning on the tree lock to sleeping on | 123 | become possible again. Processes will move from spinning on the tree_lock |
131 | the locked new page. | 124 | to sleeping on the locked new page. |
132 | 125 | ||
133 | 14. The page contents are copied to the new page. | 126 | 12. The page contents are copied to the new page. |
134 | 127 | ||
135 | 15. The remaining page flags are copied to the new page. | 128 | 13. The remaining page flags are copied to the new page. |
136 | 129 | ||
137 | 16. The old page flags are cleared to indicate that the page does | 130 | 14. The old page flags are cleared to indicate that the page does |
138 | not use any information anymore. | 131 | not provide any information anymore. |
139 | 132 | ||
140 | 17. Queued up writeback on the new page is triggered. | 133 | 15. Queued up writeback on the new page is triggered. |
141 | 134 | ||
142 | 18. If swap pte's were generated for the page then replace them with real | 135 | 16. If migration entries were page then replace them with real ptes. Doing |
143 | ptes. This will reenable access for processes not blocked by the page lock. | 136 | so will enable access for user space processes not already waiting for |
137 | the page lock. | ||
144 | 138 | ||
145 | 19. The page locks are dropped from the old and new page. | 139 | 19. The page locks are dropped from the old and new page. |
146 | Processes waiting on the page lock can continue. | 140 | Processes waiting on the page lock will redo their page faults |
141 | and will reach the new page. | ||
147 | 142 | ||
148 | 20. The new page is moved to the LRU and can be scanned by the swapper | 143 | 20. The new page is moved to the LRU and can be scanned by the swapper |
149 | etc again. | 144 | etc again. |
150 | 145 | ||
151 | TODO list | 146 | Christoph Lameter, May 8, 2006. |
152 | --------- | ||
153 | |||
154 | - Page migration requires the use of swap handles to preserve the | ||
155 | information of the anonymous page table entries. This means that swap | ||
156 | space is reserved but never used. The maximum number of swap handles used | ||
157 | is determined by CHUNK_SIZE (see mm/mempolicy.c) per ongoing migration. | ||
158 | Reservation of pages could be avoided by having a special type of swap | ||
159 | handle that does not require swap space and that would only track the page | ||
160 | references. Something like that was proposed by Marcelo Tosatti in the | ||
161 | past (search for migration cache on lkml or linux-mm@kvack.org). | ||
162 | |||
163 | - Page migration unmaps ptes for file backed pages and requires page | ||
164 | faults to reestablish these ptes. This could be optimized by somehow | ||
165 | recording the references before migration and then reestablish them later. | ||
166 | However, there are several locking challenges that have to be overcome | ||
167 | before this is possible. | ||
168 | |||
169 | - Page migration generates read ptes for anonymous pages. Dirty page | ||
170 | faults are required to make the pages writable again. It may be possible | ||
171 | to generate a pte marked dirty if it is known that the page is dirty and | ||
172 | that this process has the only reference to that page. | ||
173 | |||
174 | Christoph Lameter, March 8, 2006. | ||
175 | 147 | ||
diff --git a/Documentation/w1/masters/ds2490 b/Documentation/w1/masters/ds2490 new file mode 100644 index 000000000000..44a4918bd7f2 --- /dev/null +++ b/Documentation/w1/masters/ds2490 | |||
@@ -0,0 +1,18 @@ | |||
1 | Kernel driver ds2490 | ||
2 | ==================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Maxim DS2490 based | ||
6 | |||
7 | Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru> | ||
8 | |||
9 | |||
10 | Description | ||
11 | ----------- | ||
12 | |||
13 | The Maixm/Dallas Semiconductor DS2490 is a chip | ||
14 | which allows to build USB <-> W1 bridges. | ||
15 | |||
16 | DS9490(R) is a USB <-> W1 bus master device | ||
17 | which has 0x81 family ID integrated chip and DS2490 | ||
18 | low-level operational chip. | ||
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic index f937fbe1cacb..4c6509dd4789 100644 --- a/Documentation/w1/w1.generic +++ b/Documentation/w1/w1.generic | |||
@@ -27,8 +27,19 @@ When a w1 master driver registers with the w1 subsystem, the following occurs: | |||
27 | 27 | ||
28 | When a device is found on the bus, w1 core checks if driver for it's family is | 28 | When a device is found on the bus, w1 core checks if driver for it's family is |
29 | loaded. If so, the family driver is attached to the slave. | 29 | loaded. If so, the family driver is attached to the slave. |
30 | If there is no driver for the family, a simple sysfs entry is created | 30 | If there is no driver for the family, default one is assigned, which allows to perform |
31 | for the slave device. | 31 | almost any kind of operations. Each logical operation is a transaction |
32 | in nature, which can contain several (two or one) low-level operations. | ||
33 | Let's see how one can read EEPROM context: | ||
34 | 1. one must write control buffer, i.e. buffer containing command byte | ||
35 | and two byte address. At this step bus is reset and appropriate device | ||
36 | is selected using either W1_SKIP_ROM or W1_MATCH_ROM command. | ||
37 | Then provided control buffer is being written to the wire. | ||
38 | 2. reading. This will issue reading eeprom response. | ||
39 | |||
40 | It is possible that between 1. and 2. w1 master thread will reset bus for searching | ||
41 | and slave device will be even removed, but in this case 0xff will | ||
42 | be read, since no device was selected. | ||
32 | 43 | ||
33 | 44 | ||
34 | W1 device families | 45 | W1 device families |
@@ -89,4 +100,5 @@ driver - (standard) symlink to the w1 driver | |||
89 | name - the device name, usually the same as the directory name | 100 | name - the device name, usually the same as the directory name |
90 | w1_slave - (optional) a binary file whose meaning depends on the | 101 | w1_slave - (optional) a binary file whose meaning depends on the |
91 | family driver | 102 | family driver |
92 | 103 | rw - (optional) created for slave devices which do not have | |
104 | appropriate family driver. Allows to read/write binary data. | ||
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink new file mode 100644 index 000000000000..3640c7c87d45 --- /dev/null +++ b/Documentation/w1/w1.netlink | |||
@@ -0,0 +1,98 @@ | |||
1 | Userspace communication protocol over connector [1]. | ||
2 | |||
3 | |||
4 | Message types. | ||
5 | ============= | ||
6 | |||
7 | There are three types of messages between w1 core and userspace: | ||
8 | 1. Events. They are generated each time new master or slave device found | ||
9 | either due to automatic or requested search. | ||
10 | 2. Userspace commands. Includes read/write and search/alarm search comamnds. | ||
11 | 3. Replies to userspace commands. | ||
12 | |||
13 | |||
14 | Protocol. | ||
15 | ======== | ||
16 | |||
17 | [struct cn_msg] - connector header. It's length field is equal to size of the attached data. | ||
18 | [struct w1_netlink_msg] - w1 netlink header. | ||
19 | __u8 type - message type. | ||
20 | W1_SLAVE_ADD/W1_SLAVE_REMOVE - slave add/remove events. | ||
21 | W1_MASTER_ADD/W1_MASTER_REMOVE - master add/remove events. | ||
22 | W1_MASTER_CMD - userspace command for bus master device (search/alarm search). | ||
23 | W1_SLAVE_CMD - userspace command for slave device (read/write/ search/alarm search | ||
24 | for bus master device where given slave device found). | ||
25 | __u8 res - reserved | ||
26 | __u16 len - size of attached to this header data. | ||
27 | union { | ||
28 | __u8 id; - slave unique device id | ||
29 | struct w1_mst { | ||
30 | __u32 id; - master's id. | ||
31 | __u32 res; - reserved | ||
32 | } mst; | ||
33 | } id; | ||
34 | |||
35 | [strucrt w1_netlink_cmd] - command for gived master or slave device. | ||
36 | __u8 cmd - command opcode. | ||
37 | W1_CMD_READ - read command. | ||
38 | W1_CMD_WRITE - write command. | ||
39 | W1_CMD_SEARCH - search command. | ||
40 | W1_CMD_ALARM_SEARCH - alarm search command. | ||
41 | __u8 res - reserved | ||
42 | __u16 len - length of data for this command. | ||
43 | For read command data must be allocated like for write command. | ||
44 | __u8 data[0] - data for this command. | ||
45 | |||
46 | |||
47 | Each connector message can include one or more w1_netlink_msg with zero of more attached w1_netlink_cmd messages. | ||
48 | |||
49 | For event messages there are no w1_netlink_cmd embedded structures, only connector header | ||
50 | and w1_netlink_msg strucutre with "len" field being zero and filled type (one of event types) | ||
51 | and id - either 8 bytes of slave unique id in host order, or master's id, which is assigned | ||
52 | to bus master device when it is added to w1 core. | ||
53 | |||
54 | Currently replies to userspace commands are only generated for read command request. | ||
55 | One reply is generated exactly for one w1_netlink_cmd read request. | ||
56 | Replies are not combined when sent - i.e. typical reply messages looks like the following: | ||
57 | [cn_msg][w1_netlink_msg][w1_netlink_cmd] | ||
58 | cn_msg.len = sizeof(struct w1_netlink_msg) + sizeof(struct w1_netlink_cmd) + cmd->len; | ||
59 | w1_netlink_msg.len = sizeof(struct w1_netlink_cmd) + cmd->len; | ||
60 | w1_netlink_cmd.len = cmd->len; | ||
61 | |||
62 | |||
63 | Operation steps in w1 core when new command is received. | ||
64 | ======================================================= | ||
65 | |||
66 | When new message (w1_netlink_msg) is received w1 core detects if it is master of slave request, | ||
67 | according to w1_netlink_msg.type field. | ||
68 | Then master or slave device is searched for. | ||
69 | When found, master device (requested or those one on where slave device is found) is locked. | ||
70 | If slave command is requested, then reset/select procedure is started to select given device. | ||
71 | |||
72 | Then all requested in w1_netlink_msg operations are performed one by one. | ||
73 | If command requires reply (like read command) it is sent on command completion. | ||
74 | |||
75 | When all commands (w1_netlink_cmd) are processed muster device is unlocked | ||
76 | and next w1_netlink_msg header processing started. | ||
77 | |||
78 | |||
79 | Connector [1] specific documentation. | ||
80 | ==================================== | ||
81 | |||
82 | Each connector message includes two u32 fields as "address". | ||
83 | w1 uses CN_W1_IDX and CN_W1_VAL defined in include/linux/connector.h header. | ||
84 | Each message also includes sequence and acknowledge numbers. | ||
85 | Sequence number for event messages is appropriate bus master sequence number increased with | ||
86 | each event message sent "through" this master. | ||
87 | Sequence number for userspace requests is set by userspace application. | ||
88 | Sequence number for reply is the same as was in request, and | ||
89 | acknowledge number is set to seq+1. | ||
90 | |||
91 | |||
92 | Additional documantion, source code examples. | ||
93 | ============================================ | ||
94 | |||
95 | 1. Documentation/connector | ||
96 | 2. http://tservice.net.ru/~s0mbre/archive/w1 | ||
97 | This archive includes userspace application w1d.c which | ||
98 | uses read/write/search commands for all master/slave devices found on the bus. | ||