aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX2
-rw-r--r--Documentation/ABI/testing/debugfs-pktcdvd20
-rw-r--r--Documentation/ABI/testing/sysfs-class-pktcdvd72
-rw-r--r--Documentation/ABI/testing/sysfs-power17
-rw-r--r--Documentation/Changes2
-rw-r--r--Documentation/CodingStyle126
-rw-r--r--Documentation/DMA-API.txt14
-rw-r--r--Documentation/DMA-ISA-LPC.txt2
-rw-r--r--Documentation/DocBook/Makefile12
-rw-r--r--Documentation/DocBook/filesystems.tmpl (renamed from Documentation/DocBook/journal-api.tmpl)252
-rw-r--r--Documentation/DocBook/kernel-api.tmpl100
-rw-r--r--Documentation/DocBook/writing_usb_driver.tmpl3
-rw-r--r--Documentation/HOWTO20
-rw-r--r--Documentation/IPMI.txt34
-rw-r--r--Documentation/MSI-HOWTO.txt65
-rw-r--r--Documentation/SubmitChecklist6
-rw-r--r--Documentation/accounting/getdelays.c66
-rw-r--r--Documentation/accounting/taskstats.txt10
-rw-r--r--Documentation/block/as-iosched.txt6
-rw-r--r--Documentation/block/biodoc.txt10
-rw-r--r--Documentation/cdrom/packet-writing.txt35
-rw-r--r--Documentation/cpu-freq/cpufreq-nforce2.txt4
-rw-r--r--Documentation/cpu-hotplug.txt152
-rw-r--r--Documentation/devices.txt110
-rw-r--r--Documentation/driver-model/platform.txt204
-rw-r--r--Documentation/driver-model/porting.txt2
-rw-r--r--Documentation/dvb/cards.txt4
-rw-r--r--Documentation/dvb/ci.txt4
-rw-r--r--Documentation/eisa.txt2
-rw-r--r--Documentation/fault-injection/failcmd.sh4
-rw-r--r--Documentation/fault-injection/failmodule.sh31
-rw-r--r--Documentation/fault-injection/fault-injection.txt225
-rw-r--r--Documentation/feature-removal-schedule.txt101
-rw-r--r--Documentation/filesystems/Locking2
-rw-r--r--Documentation/filesystems/adfs.txt2
-rw-r--r--Documentation/filesystems/configfs/configfs.txt4
-rw-r--r--Documentation/filesystems/fuse.txt25
-rw-r--r--Documentation/filesystems/hpfs.txt2
-rw-r--r--Documentation/filesystems/ntfs.txt4
-rw-r--r--Documentation/filesystems/ocfs2.txt5
-rw-r--r--Documentation/filesystems/proc.txt10
-rw-r--r--Documentation/filesystems/spufs.txt2
-rw-r--r--Documentation/filesystems/sysv-fs.txt177
-rw-r--r--Documentation/filesystems/udf.txt13
-rw-r--r--Documentation/ftape.txt307
-rw-r--r--Documentation/fujitsu/frv/gdbstub.txt2
-rw-r--r--Documentation/fujitsu/frv/kernel-ABI.txt2
-rw-r--r--Documentation/hwmon/adm92402
-rw-r--r--Documentation/hwmon/f71805f2
-rw-r--r--Documentation/hwmon/k8temp13
-rw-r--r--Documentation/hwmon/smsc47m14
-rw-r--r--Documentation/hwmon/w83627ehf6
-rw-r--r--Documentation/i2c/busses/i2c-amd81112
-rw-r--r--Documentation/i2c/busses/i2c-i8015
-rw-r--r--Documentation/i2c/busses/i2c-nforce26
-rw-r--r--Documentation/i386/boot.txt6
-rw-r--r--Documentation/ide.txt2
-rw-r--r--Documentation/input/amijoy.txt4
-rw-r--r--Documentation/input/atarikbd.txt12
-rw-r--r--Documentation/input/xpad.txt115
-rw-r--r--Documentation/input/yealink.txt2
-rw-r--r--Documentation/ioctl-number.txt2
-rw-r--r--Documentation/ioctl/cdrom.txt2
-rw-r--r--Documentation/ioctl/ioctl-decoding.txt24
-rw-r--r--Documentation/kbuild/makefiles.txt10
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt2
-rw-r--r--Documentation/kernel-parameters.txt56
-rw-r--r--Documentation/keys.txt2
-rw-r--r--Documentation/kprobes.txt5
-rw-r--r--Documentation/laptop-mode.txt8
-rw-r--r--Documentation/memory-barriers.txt6
-rw-r--r--Documentation/mips/time.README49
-rw-r--r--Documentation/networking/00-INDEX2
-rw-r--r--Documentation/networking/NAPI_HOWTO.txt26
-rw-r--r--Documentation/networking/cs89x0.txt6
-rw-r--r--Documentation/networking/dccp.txt88
-rw-r--r--Documentation/networking/e1000.txt451
-rw-r--r--Documentation/networking/generic_netlink.txt3
-rw-r--r--Documentation/networking/ip-sysctl.txt347
-rw-r--r--Documentation/networking/iphase.txt2
-rw-r--r--Documentation/networking/packet_mmap.txt2
-rw-r--r--Documentation/networking/phy.txt13
-rw-r--r--Documentation/networking/pktgen.txt6
-rw-r--r--Documentation/networking/proc_net_tcp.txt2
-rw-r--r--Documentation/networking/sk98lin.txt2
-rw-r--r--Documentation/networking/slicecom.txt2
-rw-r--r--Documentation/networking/udplite.txt281
-rw-r--r--Documentation/networking/wan-router.txt8
-rw-r--r--Documentation/networking/xfrm_sync.txt5
-rw-r--r--Documentation/pnp.txt2
-rw-r--r--Documentation/power/interface.txt13
-rw-r--r--Documentation/power/pci.txt4
-rw-r--r--Documentation/power/s2ram.txt56
-rw-r--r--Documentation/power/states.txt2
-rw-r--r--Documentation/power/swsusp-and-swap-files.txt60
-rw-r--r--Documentation/power/swsusp.txt20
-rw-r--r--Documentation/power/userland-swsusp.txt64
-rw-r--r--Documentation/powerpc/booting-without-of.txt47
-rw-r--r--Documentation/powerpc/mpc52xx-device-tree-bindings.txt189
-rw-r--r--Documentation/robust-futex-ABI.txt2
-rw-r--r--Documentation/robust-futexes.txt2
-rw-r--r--Documentation/rtc.txt463
-rw-r--r--Documentation/s390/CommonIO6
-rw-r--r--Documentation/s390/Debugging390.txt38
-rw-r--r--Documentation/s390/cds.txt64
-rw-r--r--Documentation/s390/crypto/crypto-API.txt10
-rw-r--r--Documentation/s390/driver-model.txt10
-rw-r--r--Documentation/s390/s390dbf.txt8
-rw-r--r--Documentation/scsi/aic79xx.txt4
-rw-r--r--Documentation/scsi/aic7xxx_old.txt4
-rw-r--r--Documentation/scsi/ibmmca.txt14
-rw-r--r--Documentation/scsi/in2000.txt2
-rw-r--r--Documentation/scsi/libsas.txt2
-rw-r--r--Documentation/scsi/ncr53c8xx.txt2
-rw-r--r--Documentation/scsi/scsi-changer.txt4
-rw-r--r--Documentation/scsi/scsi_eh.txt2
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt31
-rw-r--r--Documentation/scsi/st.txt2
-rw-r--r--Documentation/scsi/sym53c8xx_2.txt2
-rw-r--r--Documentation/sharedsubtree.txt4
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt4
-rw-r--r--Documentation/sound/alsa/Audigy-mixer.txt2
-rw-r--r--Documentation/sound/alsa/SB-Live-mixer.txt2
-rw-r--r--Documentation/spi/pxa2xx16
-rw-r--r--Documentation/stable_api_nonsense.txt3
-rw-r--r--Documentation/stable_kernel_rules.txt2
-rw-r--r--Documentation/sysctl/fs.txt2
-rw-r--r--Documentation/sysctl/kernel.txt8
-rw-r--r--Documentation/sysctl/vm.txt2
-rw-r--r--Documentation/uml/UserModeLinux-HOWTO.txt2
-rw-r--r--Documentation/usb/hiddev.txt2
-rw-r--r--Documentation/usb/rio.txt4
-rw-r--r--Documentation/usb/usb-serial.txt14
-rw-r--r--Documentation/video4linux/CARDLIST.cx882
-rw-r--r--Documentation/video4linux/CARDLIST.saa71347
-rw-r--r--Documentation/video4linux/cafe_ccic54
-rw-r--r--Documentation/video4linux/zr36120.txt162
-rw-r--r--Documentation/watchdog/src/watchdog-simple.c2
-rw-r--r--Documentation/watchdog/watchdog-api.txt2
-rw-r--r--Documentation/x86_64/boot-options.txt7
140 files changed, 3454 insertions, 1845 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 02457ec9c94f..f08ca9535733 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -104,8 +104,6 @@ firmware_class/
104 - request_firmware() hotplug interface info. 104 - request_firmware() hotplug interface info.
105floppy.txt 105floppy.txt
106 - notes and driver options for the floppy disk driver. 106 - notes and driver options for the floppy disk driver.
107ftape.txt
108 - notes about the floppy tape device driver.
109hayes-esp.txt 107hayes-esp.txt
110 - info on using the Hayes ESP serial driver. 108 - info on using the Hayes ESP serial driver.
111highuid.txt 109highuid.txt
diff --git a/Documentation/ABI/testing/debugfs-pktcdvd b/Documentation/ABI/testing/debugfs-pktcdvd
new file mode 100644
index 000000000000..03dbd883cc41
--- /dev/null
+++ b/Documentation/ABI/testing/debugfs-pktcdvd
@@ -0,0 +1,20 @@
1What: /debug/pktcdvd/pktcdvd[0-7]
2Date: Oct. 2006
3KernelVersion: 2.6.19
4Contact: Thomas Maier <balagi@justmail.de>
5Description:
6
7debugfs interface
8-----------------
9
10The pktcdvd module (packet writing driver) creates
11these files in debugfs:
12
13/debug/pktcdvd/pktcdvd[0-7]/
14 info (0444) Lots of human readable driver
15 statistics and infos. Multiple lines!
16
17Example:
18-------
19
20cat /debug/pktcdvd/pktcdvd0/info
diff --git a/Documentation/ABI/testing/sysfs-class-pktcdvd b/Documentation/ABI/testing/sysfs-class-pktcdvd
new file mode 100644
index 000000000000..c4c55edc9a5c
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-pktcdvd
@@ -0,0 +1,72 @@
1What: /sys/class/pktcdvd/
2Date: Oct. 2006
3KernelVersion: 2.6.19
4Contact: Thomas Maier <balagi@justmail.de>
5Description:
6
7sysfs interface
8---------------
9
10The pktcdvd module (packet writing driver) creates
11these files in the sysfs:
12(<devid> is in format major:minor )
13
14/sys/class/pktcdvd/
15 add (0200) Write a block device id (major:minor)
16 to create a new pktcdvd device and map
17 it to the block device.
18
19 remove (0200) Write the pktcdvd device id (major:minor)
20 to it to remove the pktcdvd device.
21
22 device_map (0444) Shows the device mapping in format:
23 pktcdvd[0-7] <pktdevid> <blkdevid>
24
25/sys/class/pktcdvd/pktcdvd[0-7]/
26 dev (0444) Device id
27 uevent (0200) To send an uevent.
28
29/sys/class/pktcdvd/pktcdvd[0-7]/stat/
30 packets_started (0444) Number of started packets.
31 packets_finished (0444) Number of finished packets.
32
33 kb_written (0444) kBytes written.
34 kb_read (0444) kBytes read.
35 kb_read_gather (0444) kBytes read to fill write packets.
36
37 reset (0200) Write any value to it to reset
38 pktcdvd device statistic values, like
39 bytes read/written.
40
41/sys/class/pktcdvd/pktcdvd[0-7]/write_queue/
42 size (0444) Contains the size of the bio write
43 queue.
44
45 congestion_off (0644) If bio write queue size is below
46 this mark, accept new bio requests
47 from the block layer.
48
49 congestion_on (0644) If bio write queue size is higher
50 as this mark, do no longer accept
51 bio write requests from the block
52 layer and wait till the pktcdvd
53 device has processed enough bio's
54 so that bio write queue size is
55 below congestion off mark.
56 A value of <= 0 disables congestion
57 control.
58
59
60Example:
61--------
62To use the pktcdvd sysfs interface directly, you can do:
63
64# create a new pktcdvd device mapped to /dev/hdc
65echo "22:0" >/sys/class/pktcdvd/add
66cat /sys/class/pktcdvd/device_map
67# assuming device pktcdvd0 was created, look at stat's
68cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written
69# print the device id of the mapped block device
70fgrep pktcdvd0 /sys/class/pktcdvd/device_map
71# remove device, using pktcdvd0 device id 253:0
72echo "253:0" >/sys/class/pktcdvd/remove
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index d882f8093871..dcff4d0623ad 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -21,7 +21,7 @@ Description:
21 these states. 21 these states.
22 22
23What: /sys/power/disk 23What: /sys/power/disk
24Date: August 2006 24Date: September 2006
25Contact: Rafael J. Wysocki <rjw@sisk.pl> 25Contact: Rafael J. Wysocki <rjw@sisk.pl>
26Description: 26Description:
27 The /sys/power/disk file controls the operating mode of the 27 The /sys/power/disk file controls the operating mode of the
@@ -39,6 +39,19 @@ Description:
39 'reboot' - the memory image will be saved by the kernel and 39 'reboot' - the memory image will be saved by the kernel and
40 the system will be rebooted. 40 the system will be rebooted.
41 41
42 Additionally, /sys/power/disk can be used to turn on one of the
43 two testing modes of the suspend-to-disk mechanism: 'testproc'
44 or 'test'. If the suspend-to-disk mechanism is in the
45 'testproc' mode, writing 'disk' to /sys/power/state will cause
46 the kernel to disable nonboot CPUs and freeze tasks, wait for 5
47 seconds, unfreeze tasks and enable nonboot CPUs. If it is in
48 the 'test' mode, writing 'disk' to /sys/power/state will cause
49 the kernel to disable nonboot CPUs and freeze tasks, shrink
50 memory, suspend devices, wait for 5 seconds, resume devices,
51 unfreeze tasks and enable nonboot CPUs. Then, we are able to
52 look in the log messages and work out, for example, which code
53 is being slow and which device drivers are misbehaving.
54
42 The suspend-to-disk method may be chosen by writing to this 55 The suspend-to-disk method may be chosen by writing to this
43 file one of the accepted strings: 56 file one of the accepted strings:
44 57
@@ -46,6 +59,8 @@ Description:
46 'platform' 59 'platform'
47 'shutdown' 60 'shutdown'
48 'reboot' 61 'reboot'
62 'testproc'
63 'test'
49 64
50 It will only change to 'firmware' or 'platform' if the system 65 It will only change to 'firmware' or 'platform' if the system
51 supports that. 66 supports that.
diff --git a/Documentation/Changes b/Documentation/Changes
index abee7f58c1ed..73a8617f1861 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -201,7 +201,7 @@ udev
201---- 201----
202udev is a userspace application for populating /dev dynamically with 202udev is a userspace application for populating /dev dynamically with
203only entries for devices actually present. udev replaces the basic 203only entries for devices actually present. udev replaces the basic
204functionality of devfs, while allowing persistant device naming for 204functionality of devfs, while allowing persistent device naming for
205devices. 205devices.
206 206
207FUSE 207FUSE
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 29c18966b050..0ad6dcb5d45f 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -35,12 +35,37 @@ In short, 8-char indents make things easier to read, and have the added
35benefit of warning you when you're nesting your functions too deep. 35benefit of warning you when you're nesting your functions too deep.
36Heed that warning. 36Heed that warning.
37 37
38The preferred way to ease multiple indentation levels in a switch statement is
39to align the "switch" and its subordinate "case" labels in the same column
40instead of "double-indenting" the "case" labels. E.g.:
41
42 switch (suffix) {
43 case 'G':
44 case 'g':
45 mem <<= 30;
46 break;
47 case 'M':
48 case 'm':
49 mem <<= 20;
50 break;
51 case 'K':
52 case 'k':
53 mem <<= 10;
54 /* fall through */
55 default:
56 break;
57 }
58
59
38Don't put multiple statements on a single line unless you have 60Don't put multiple statements on a single line unless you have
39something to hide: 61something to hide:
40 62
41 if (condition) do_this; 63 if (condition) do_this;
42 do_something_everytime; 64 do_something_everytime;
43 65
66Don't put multiple assignments on a single line either. Kernel coding style
67is super simple. Avoid tricky expressions.
68
44Outside of comments, documentation and except in Kconfig, spaces are never 69Outside of comments, documentation and except in Kconfig, spaces are never
45used for indentation, and the above example is deliberately broken. 70used for indentation, and the above example is deliberately broken.
46 71
@@ -69,7 +94,7 @@ void fun(int a, int b, int c)
69 next_statement; 94 next_statement;
70} 95}
71 96
72 Chapter 3: Placing Braces 97 Chapter 3: Placing Braces and Spaces
73 98
74The other issue that always comes up in C styling is the placement of 99The other issue that always comes up in C styling is the placement of
75braces. Unlike the indent size, there are few technical reasons to 100braces. Unlike the indent size, there are few technical reasons to
@@ -81,6 +106,20 @@ brace last on the line, and put the closing brace first, thusly:
81 we do y 106 we do y
82 } 107 }
83 108
109This applies to all non-function statement blocks (if, switch, for,
110while, do). E.g.:
111
112 switch (action) {
113 case KOBJ_ADD:
114 return "add";
115 case KOBJ_REMOVE:
116 return "remove";
117 case KOBJ_CHANGE:
118 return "change";
119 default:
120 return NULL;
121 }
122
84However, there is one special case, namely functions: they have the 123However, there is one special case, namely functions: they have the
85opening brace at the beginning of the next line, thus: 124opening brace at the beginning of the next line, thus:
86 125
@@ -121,6 +160,49 @@ supply of new-lines on your screen is not a renewable resource (think
12125-line terminal screens here), you have more empty lines to put 16025-line terminal screens here), you have more empty lines to put
122comments on. 161comments on.
123 162
163 3.1: Spaces
164
165Linux kernel style for use of spaces depends (mostly) on
166function-versus-keyword usage. Use a space after (most) keywords. The
167notable exceptions are sizeof, typeof, alignof, and __attribute__, which look
168somewhat like functions (and are usually used with parentheses in Linux,
169although they are not required in the language, as in: "sizeof info" after
170"struct fileinfo info;" is declared).
171
172So use a space after these keywords:
173 if, switch, case, for, do, while
174but not with sizeof, typeof, alignof, or __attribute__. E.g.,
175 s = sizeof(struct file);
176
177Do not add spaces around (inside) parenthesized expressions. This example is
178*bad*:
179
180 s = sizeof( struct file );
181
182When declaring pointer data or a function that returns a pointer type, the
183preferred use of '*' is adjacent to the data name or function name and not
184adjacent to the type name. Examples:
185
186 char *linux_banner;
187 unsigned long long memparse(char *ptr, char **retptr);
188 char *match_strdup(substring_t *s);
189
190Use one space around (on each side of) most binary and ternary operators,
191such as any of these:
192
193 = + - < > * / % | & ^ <= >= == != ? :
194
195but no space after unary operators:
196 & * + - ~ ! sizeof typeof alignof __attribute__ defined
197
198no space before the postfix increment & decrement unary operators:
199 ++ --
200
201no space after the prefix increment & decrement unary operators:
202 ++ --
203
204and no space around the '.' and "->" structure member operators.
205
124 206
125 Chapter 4: Naming 207 Chapter 4: Naming
126 208
@@ -152,7 +234,7 @@ variable that is used to hold a temporary value.
152 234
153If you are afraid to mix up your local variable names, you have another 235If you are afraid to mix up your local variable names, you have another
154problem, which is called the function-growth-hormone-imbalance syndrome. 236problem, which is called the function-growth-hormone-imbalance syndrome.
155See next chapter. 237See chapter 6 (Functions).
156 238
157 239
158 Chapter 5: Typedefs 240 Chapter 5: Typedefs
@@ -258,6 +340,20 @@ generally easily keep track of about 7 different things, anything more
258and it gets confused. You know you're brilliant, but maybe you'd like 340and it gets confused. You know you're brilliant, but maybe you'd like
259to understand what you did 2 weeks from now. 341to understand what you did 2 weeks from now.
260 342
343In source files, separate functions with one blank line. If the function is
344exported, the EXPORT* macro for it should follow immediately after the closing
345function brace line. E.g.:
346
347int system_is_up(void)
348{
349 return system_state == SYSTEM_RUNNING;
350}
351EXPORT_SYMBOL(system_is_up);
352
353In function prototypes, include parameter names with their data types.
354Although this is not required by the C language, it is preferred in Linux
355because it is a simple way to add valuable information for the reader.
356
261 357
262 Chapter 7: Centralized exiting of functions 358 Chapter 7: Centralized exiting of functions
263 359
@@ -306,16 +402,36 @@ time to explain badly written code.
306Generally, you want your comments to tell WHAT your code does, not HOW. 402Generally, you want your comments to tell WHAT your code does, not HOW.
307Also, try to avoid putting comments inside a function body: if the 403Also, try to avoid putting comments inside a function body: if the
308function is so complex that you need to separately comment parts of it, 404function is so complex that you need to separately comment parts of it,
309you should probably go back to chapter 5 for a while. You can make 405you should probably go back to chapter 6 for a while. You can make
310small comments to note or warn about something particularly clever (or 406small comments to note or warn about something particularly clever (or
311ugly), but try to avoid excess. Instead, put the comments at the head 407ugly), but try to avoid excess. Instead, put the comments at the head
312of the function, telling people what it does, and possibly WHY it does 408of the function, telling people what it does, and possibly WHY it does
313it. 409it.
314 410
315When commenting the kernel API functions, please use the kerneldoc format. 411When commenting the kernel API functions, please use the kernel-doc format.
316See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc 412See the files Documentation/kernel-doc-nano-HOWTO.txt and scripts/kernel-doc
317for details. 413for details.
318 414
415Linux style for comments is the C89 "/* ... */" style.
416Don't use C99-style "// ..." comments.
417
418The preferred style for long (multi-line) comments is:
419
420 /*
421 * This is the preferred style for multi-line
422 * comments in the Linux kernel source code.
423 * Please use it consistently.
424 *
425 * Description: A column of asterisks on the left side,
426 * with beginning and ending almost-blank lines.
427 */
428
429It's also important to comment data, whether they are basic types or derived
430types. To this end, use just one data declaration per line (no commas for
431multiple data declarations). This leaves you room for a small comment on each
432item, explaining its use.
433
434
319 Chapter 9: You've made a mess of it 435 Chapter 9: You've made a mess of it
320 436
321That's OK, we all do. You've probably been told by your long-time Unix 437That's OK, we all do. You've probably been told by your long-time Unix
@@ -591,4 +707,4 @@ Kernel CodingStyle, by greg@kroah.com at OLS 2002:
591http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/ 707http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
592 708
593-- 709--
594Last updated on 30 April 2006. 710Last updated on 2006-December-06.
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 2ffb0d62f0fe..805db4b2cba6 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -77,7 +77,7 @@ To get this part of the dma_ API, you must #include <linux/dmapool.h>
77Many drivers need lots of small dma-coherent memory regions for DMA 77Many drivers need lots of small dma-coherent memory regions for DMA
78descriptors or I/O buffers. Rather than allocating in units of a page 78descriptors or I/O buffers. Rather than allocating in units of a page
79or more using dma_alloc_coherent(), you can use DMA pools. These work 79or more using dma_alloc_coherent(), you can use DMA pools. These work
80much like a kmem_cache_t, except that they use the dma-coherent allocator 80much like a struct kmem_cache, except that they use the dma-coherent allocator
81not __get_free_pages(). Also, they understand common hardware constraints 81not __get_free_pages(). Also, they understand common hardware constraints
82for alignment, like queue heads needing to be aligned on N byte boundaries. 82for alignment, like queue heads needing to be aligned on N byte boundaries.
83 83
@@ -94,7 +94,7 @@ The pool create() routines initialize a pool of dma-coherent buffers
94for use with a given device. It must be called in a context which 94for use with a given device. It must be called in a context which
95can sleep. 95can sleep.
96 96
97The "name" is for diagnostics (like a kmem_cache_t name); dev and size 97The "name" is for diagnostics (like a struct kmem_cache name); dev and size
98are like what you'd pass to dma_alloc_coherent(). The device's hardware 98are like what you'd pass to dma_alloc_coherent(). The device's hardware
99alignment requirement for this type of data is "align" (which is expressed 99alignment requirement for this type of data is "align" (which is expressed
100in bytes, and must be a power of two). If your device has no boundary 100in bytes, and must be a power of two). If your device has no boundary
@@ -431,10 +431,10 @@ be identical to those passed in (and returned by
431dma_alloc_noncoherent()). 431dma_alloc_noncoherent()).
432 432
433int 433int
434dma_is_consistent(dma_addr_t dma_handle) 434dma_is_consistent(struct device *dev, dma_addr_t dma_handle)
435 435
436returns true if the memory pointed to by the dma_handle is actually 436returns true if the device dev is performing consistent DMA on the memory
437consistent. 437area pointed to by the dma_handle.
438 438
439int 439int
440dma_get_cache_alignment(void) 440dma_get_cache_alignment(void)
@@ -459,7 +459,7 @@ anything like this. You must also be extra careful about accessing
459memory you intend to sync partially. 459memory you intend to sync partially.
460 460
461void 461void
462dma_cache_sync(void *vaddr, size_t size, 462dma_cache_sync(struct device *dev, void *vaddr, size_t size,
463 enum dma_data_direction direction) 463 enum dma_data_direction direction)
464 464
465Do a partial sync of memory that was allocated by 465Do a partial sync of memory that was allocated by
@@ -489,7 +489,7 @@ size is the size of the area (must be multiples of PAGE_SIZE).
489flags can be or'd together and are 489flags can be or'd together and are
490 490
491DMA_MEMORY_MAP - request that the memory returned from 491DMA_MEMORY_MAP - request that the memory returned from
492dma_alloc_coherent() be directly writeable. 492dma_alloc_coherent() be directly writable.
493 493
494DMA_MEMORY_IO - request that the memory returned from 494DMA_MEMORY_IO - request that the memory returned from
495dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. 495dma_alloc_coherent() be addressable using read/write/memcpy_toio etc.
diff --git a/Documentation/DMA-ISA-LPC.txt b/Documentation/DMA-ISA-LPC.txt
index 705f6be92bdb..e767805b4182 100644
--- a/Documentation/DMA-ISA-LPC.txt
+++ b/Documentation/DMA-ISA-LPC.txt
@@ -110,7 +110,7 @@ lock.
110 110
111Once the DMA transfer is finished (or timed out) you should disable 111Once the DMA transfer is finished (or timed out) you should disable
112the channel again. You should also check get_dma_residue() to make 112the channel again. You should also check get_dma_residue() to make
113sure that all data has been transfered. 113sure that all data has been transferred.
114 114
115Example: 115Example:
116 116
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 66e1cf733571..36526a1e76d7 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -9,7 +9,7 @@
9DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ 9DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ 10 kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
11 procfs-guide.xml writing_usb_driver.xml \ 11 procfs-guide.xml writing_usb_driver.xml \
12 kernel-api.xml journal-api.xml lsm.xml usb.xml \ 12 kernel-api.xml filesystems.xml lsm.xml usb.xml \
13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ 13 gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
14 genericirq.xml 14 genericirq.xml
15 15
@@ -190,9 +190,13 @@ quiet_cmd_fig2png = FIG2PNG $@
190### 190###
191# Help targets as used by the top-level makefile 191# Help targets as used by the top-level makefile
192dochelp: 192dochelp:
193 @echo ' Linux kernel internal documentation in different formats:' 193 @echo ' Linux kernel internal documentation in different formats:'
194 @echo ' xmldocs (XML DocBook), psdocs (Postscript), pdfdocs (PDF)' 194 @echo ' htmldocs - HTML'
195 @echo ' htmldocs (HTML), mandocs (man pages, use installmandocs to install)' 195 @echo ' installmandocs - install man pages generated by mandocs'
196 @echo ' mandocs - man pages'
197 @echo ' pdfdocs - PDF'
198 @echo ' psdocs - Postscript'
199 @echo ' xmldocs - XML DocBook'
196 200
197### 201###
198# Temporary files left by various tools 202# Temporary files left by various tools
diff --git a/Documentation/DocBook/journal-api.tmpl b/Documentation/DocBook/filesystems.tmpl
index 2077f9a28c19..39fa2aba7f9b 100644
--- a/Documentation/DocBook/journal-api.tmpl
+++ b/Documentation/DocBook/filesystems.tmpl
@@ -2,39 +2,11 @@
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> 3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4 4
5<book id="LinuxJBDAPI"> 5<book id="Linux-filesystems-API">
6 <bookinfo> 6 <bookinfo>
7 <title>The Linux Journalling API</title> 7 <title>Linux Filesystems API</title>
8 <authorgroup>
9 <author>
10 <firstname>Roger</firstname>
11 <surname>Gammans</surname>
12 <affiliation>
13 <address>
14 <email>rgammans@computer-surgery.co.uk</email>
15 </address>
16 </affiliation>
17 </author>
18 </authorgroup>
19
20 <authorgroup>
21 <author>
22 <firstname>Stephen</firstname>
23 <surname>Tweedie</surname>
24 <affiliation>
25 <address>
26 <email>sct@redhat.com</email>
27 </address>
28 </affiliation>
29 </author>
30 </authorgroup>
31 8
32 <copyright> 9 <legalnotice>
33 <year>2002</year>
34 <holder>Roger Gammans</holder>
35 </copyright>
36
37<legalnotice>
38 <para> 10 <para>
39 This documentation is free software; you can redistribute 11 This documentation is free software; you can redistribute
40 it and/or modify it under the terms of the GNU General Public 12 it and/or modify it under the terms of the GNU General Public
@@ -42,21 +14,21 @@
42 version 2 of the License, or (at your option) any later 14 version 2 of the License, or (at your option) any later
43 version. 15 version.
44 </para> 16 </para>
45 17
46 <para> 18 <para>
47 This program is distributed in the hope that it will be 19 This program is distributed in the hope that it will be
48 useful, but WITHOUT ANY WARRANTY; without even the implied 20 useful, but WITHOUT ANY WARRANTY; without even the implied
49 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
50 See the GNU General Public License for more details. 22 See the GNU General Public License for more details.
51 </para> 23 </para>
52 24
53 <para> 25 <para>
54 You should have received a copy of the GNU General Public 26 You should have received a copy of the GNU General Public
55 License along with this program; if not, write to the Free 27 License along with this program; if not, write to the Free
56 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 28 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
57 MA 02111-1307 USA 29 MA 02111-1307 USA
58 </para> 30 </para>
59 31
60 <para> 32 <para>
61 For more details see the file COPYING in the source 33 For more details see the file COPYING in the source
62 distribution of Linux. 34 distribution of Linux.
@@ -66,17 +38,113 @@
66 38
67<toc></toc> 39<toc></toc>
68 40
69 <chapter id="Overview"> 41 <chapter id="vfs">
42 <title>The Linux VFS</title>
43 <sect1><title>The Filesystem types</title>
44!Iinclude/linux/fs.h
45 </sect1>
46 <sect1><title>The Directory Cache</title>
47!Efs/dcache.c
48!Iinclude/linux/dcache.h
49 </sect1>
50 <sect1><title>Inode Handling</title>
51!Efs/inode.c
52!Efs/bad_inode.c
53 </sect1>
54 <sect1><title>Registration and Superblocks</title>
55!Efs/super.c
56 </sect1>
57 <sect1><title>File Locks</title>
58!Efs/locks.c
59!Ifs/locks.c
60 </sect1>
61 <sect1><title>Other Functions</title>
62!Efs/mpage.c
63!Efs/namei.c
64!Efs/buffer.c
65!Efs/bio.c
66!Efs/seq_file.c
67!Efs/filesystems.c
68!Efs/fs-writeback.c
69!Efs/block_dev.c
70 </sect1>
71 </chapter>
72
73 <chapter id="proc">
74 <title>The proc filesystem</title>
75
76 <sect1><title>sysctl interface</title>
77!Ekernel/sysctl.c
78 </sect1>
79
80 <sect1><title>proc filesystem interface</title>
81!Ifs/proc/base.c
82 </sect1>
83 </chapter>
84
85 <chapter id="sysfs">
86 <title>The Filesystem for Exporting Kernel Objects</title>
87!Efs/sysfs/file.c
88!Efs/sysfs/symlink.c
89!Efs/sysfs/bin.c
90 </chapter>
91
92 <chapter id="debugfs">
93 <title>The debugfs filesystem</title>
94
95 <sect1><title>debugfs interface</title>
96!Efs/debugfs/inode.c
97!Efs/debugfs/file.c
98 </sect1>
99 </chapter>
100
101 <chapter id="LinuxJDBAPI">
102 <chapterinfo>
103 <title>The Linux Journalling API</title>
104
105 <authorgroup>
106 <author>
107 <firstname>Roger</firstname>
108 <surname>Gammans</surname>
109 <affiliation>
110 <address>
111 <email>rgammans@computer-surgery.co.uk</email>
112 </address>
113 </affiliation>
114 </author>
115 </authorgroup>
116
117 <authorgroup>
118 <author>
119 <firstname>Stephen</firstname>
120 <surname>Tweedie</surname>
121 <affiliation>
122 <address>
123 <email>sct@redhat.com</email>
124 </address>
125 </affiliation>
126 </author>
127 </authorgroup>
128
129 <copyright>
130 <year>2002</year>
131 <holder>Roger Gammans</holder>
132 </copyright>
133 </chapterinfo>
134
135 <title>The Linux Journalling API</title>
136
137 <sect1>
70 <title>Overview</title> 138 <title>Overview</title>
71 <sect1> 139 <sect2>
72 <title>Details</title> 140 <title>Details</title>
73<para> 141<para>
74The journalling layer is easy to use. You need to 142The journalling layer is easy to use. You need to
75first of all create a journal_t data structure. There are 143first of all create a journal_t data structure. There are
76two calls to do this dependent on how you decide to allocate the physical 144two calls to do this dependent on how you decide to allocate the physical
77media on which the journal resides. The journal_init_inode() call 145media on which the journal resides. The journal_init_inode() call
78is for journals stored in filesystem inodes, or the journal_init_dev() 146is for journals stored in filesystem inodes, or the journal_init_dev()
79call can be use for journal stored on a raw device (in a continuous range 147call can be use for journal stored on a raw device (in a continuous range
80of blocks). A journal_t is a typedef for a struct pointer, so when 148of blocks). A journal_t is a typedef for a struct pointer, so when
81you are finally finished make sure you call journal_destroy() on it 149you are finally finished make sure you call journal_destroy() on it
82to free up any used kernel memory. 150to free up any used kernel memory.
@@ -91,27 +159,26 @@ need to call journal_create().
91<para> 159<para>
92Most of the time however your journal file will already have been created, but 160Most of the time however your journal file will already have been created, but
93before you load it you must call journal_wipe() to empty the journal file. 161before you load it you must call journal_wipe() to empty the journal file.
94Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the 162Hang on, you say , what if the filesystem wasn't cleanly umount()'d . Well, it is the
95job of the client file system to detect this and skip the call to journal_wipe(). 163job of the client file system to detect this and skip the call to journal_wipe().
96</para> 164</para>
97 165
98<para> 166<para>
99In either case the next call should be to journal_load() which prepares the 167In either case the next call should be to journal_load() which prepares the
100journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery() 168journal file for use. Note that journal_wipe(..,0) calls journal_skip_recovery()
101for you if it detects any outstanding transactions in the journal and similarly 169for you if it detects any outstanding transactions in the journal and similarly
102journal_load() will call journal_recover() if necessary. 170journal_load() will call journal_recover() if necessary.
103I would advise reading fs/ext3/super.c for examples on this stage. 171I would advise reading fs/ext3/super.c for examples on this stage.
104[RGG: Why is the journal_wipe() call necessary - doesn't this needlessly 172[RGG: Why is the journal_wipe() call necessary - doesn't this needlessly
105complicate the API. Or isn't a good idea for the journal layer to hide 173complicate the API. Or isn't a good idea for the journal layer to hide
106dirty mounts from the client fs] 174dirty mounts from the client fs]
107</para> 175</para>
108 176
109<para> 177<para>
110Now you can go ahead and start modifying the underlying 178Now you can go ahead and start modifying the underlying
111filesystem. Almost. 179filesystem. Almost.
112</para> 180</para>
113 181
114
115<para> 182<para>
116 183
117You still need to actually journal your filesystem changes, this 184You still need to actually journal your filesystem changes, this
@@ -138,10 +205,10 @@ individual buffers (blocks). Before you start to modify a buffer you
138need to call journal_get_{create,write,undo}_access() as appropriate, 205need to call journal_get_{create,write,undo}_access() as appropriate,
139this allows the journalling layer to copy the unmodified data if it 206this allows the journalling layer to copy the unmodified data if it
140needs to. After all the buffer may be part of a previously uncommitted 207needs to. After all the buffer may be part of a previously uncommitted
141transaction. 208transaction.
142At this point you are at last ready to modify a buffer, and once 209At this point you are at last ready to modify a buffer, and once
143you are have done so you need to call journal_dirty_{meta,}data(). 210you are have done so you need to call journal_dirty_{meta,}data().
144Or if you've asked for access to a buffer you now know is now longer 211Or if you've asked for access to a buffer you now know is now longer
145required to be pushed back on the device you can call journal_forget() 212required to be pushed back on the device you can call journal_forget()
146in much the same way as you might have used bforget() in the past. 213in much the same way as you might have used bforget() in the past.
147</para> 214</para>
@@ -156,7 +223,6 @@ Then at umount time , in your put_super() (2.4) or write_super() (2.5)
156you can then call journal_destroy() to clean up your in-core journal object. 223you can then call journal_destroy() to clean up your in-core journal object.
157</para> 224</para>
158 225
159
160<para> 226<para>
161Unfortunately there a couple of ways the journal layer can cause a deadlock. 227Unfortunately there a couple of ways the journal layer can cause a deadlock.
162The first thing to note is that each task can only have 228The first thing to note is that each task can only have
@@ -164,19 +230,19 @@ a single outstanding transaction at any one time, remember nothing
164commits until the outermost journal_stop(). This means 230commits until the outermost journal_stop(). This means
165you must complete the transaction at the end of each file/inode/address 231you must complete the transaction at the end of each file/inode/address
166etc. operation you perform, so that the journalling system isn't re-entered 232etc. operation you perform, so that the journalling system isn't re-entered
167on another journal. Since transactions can't be nested/batched 233on another journal. Since transactions can't be nested/batched
168across differing journals, and another filesystem other than 234across differing journals, and another filesystem other than
169yours (say ext3) may be modified in a later syscall. 235yours (say ext3) may be modified in a later syscall.
170</para> 236</para>
171 237
172<para> 238<para>
173The second case to bear in mind is that journal_start() can 239The second case to bear in mind is that journal_start() can
174block if there isn't enough space in the journal for your transaction 240block if there isn't enough space in the journal for your transaction
175(based on the passed nblocks param) - when it blocks it merely(!) needs to 241(based on the passed nblocks param) - when it blocks it merely(!) needs to
176wait for transactions to complete and be committed from other tasks, 242wait for transactions to complete and be committed from other tasks,
177so essentially we are waiting for journal_stop(). So to avoid 243so essentially we are waiting for journal_stop(). So to avoid
178deadlocks you must treat journal_start/stop() as if they 244deadlocks you must treat journal_start/stop() as if they
179were semaphores and include them in your semaphore ordering rules to prevent 245were semaphores and include them in your semaphore ordering rules to prevent
180deadlocks. Note that journal_extend() has similar blocking behaviour to 246deadlocks. Note that journal_extend() has similar blocking behaviour to
181journal_start() so you can deadlock here just as easily as on journal_start(). 247journal_start() so you can deadlock here just as easily as on journal_start().
182</para> 248</para>
@@ -184,7 +250,7 @@ journal_start() so you can deadlock here just as easily as on journal_start().
184<para> 250<para>
185Try to reserve the right number of blocks the first time. ;-). This will 251Try to reserve the right number of blocks the first time. ;-). This will
186be the maximum number of blocks you are going to touch in this transaction. 252be the maximum number of blocks you are going to touch in this transaction.
187I advise having a look at at least ext3_jbd.h to see the basis on which 253I advise having a look at at least ext3_jbd.h to see the basis on which
188ext3 uses to make these decisions. 254ext3 uses to make these decisions.
189</para> 255</para>
190 256
@@ -193,13 +259,13 @@ Another wriggle to watch out for is your on-disk block allocation strategy.
193why? Because, if you undo a delete, you need to ensure you haven't reused any 259why? Because, if you undo a delete, you need to ensure you haven't reused any
194of the freed blocks in a later transaction. One simple way of doing this 260of the freed blocks in a later transaction. One simple way of doing this
195is make sure any blocks you allocate only have checkpointed transactions 261is make sure any blocks you allocate only have checkpointed transactions
196listed against them. Ext3 does this in ext3_test_allocatable(). 262listed against them. Ext3 does this in ext3_test_allocatable().
197</para> 263</para>
198 264
199<para> 265<para>
200Lock is also providing through journal_{un,}lock_updates(), 266Lock is also providing through journal_{un,}lock_updates(),
201ext3 uses this when it wants a window with a clean and stable fs for a moment. 267ext3 uses this when it wants a window with a clean and stable fs for a moment.
202eg. 268eg.
203</para> 269</para>
204 270
205<programlisting> 271<programlisting>
@@ -230,19 +296,19 @@ extend it like this:-
230 struct journal_callback for_jbd; 296 struct journal_callback for_jbd;
231 // Stuff for myfs allocated together. 297 // Stuff for myfs allocated together.
232 myfs_inode* i_commited; 298 myfs_inode* i_commited;
233 299
234 } 300 }
235</programlisting> 301</programlisting>
236 302
237<para> 303<para>
238this would be useful if you needed to know when data was committed to a 304this would be useful if you needed to know when data was committed to a
239particular inode. 305particular inode.
240</para> 306</para>
241 307
242</sect1> 308 </sect2>
243 309
244<sect1> 310 <sect2>
245<title>Summary</title> 311 <title>Summary</title>
246<para> 312<para>
247Using the journal is a matter of wrapping the different context changes, 313Using the journal is a matter of wrapping the different context changes,
248being each mount, each modification (transaction) and each changed buffer 314being each mount, each modification (transaction) and each changed buffer
@@ -260,15 +326,15 @@ an example.
260 if (clean) journal_wipe(); 326 if (clean) journal_wipe();
261 journal_load(); 327 journal_load();
262 328
263 foreach(transaction) { /*transactions must be 329 foreach(transaction) { /*transactions must be
264 completed before 330 completed before
265 a syscall returns to 331 a syscall returns to
266 userspace*/ 332 userspace*/
267 333
268 handle_t * xct=journal_start(my_jnrl); 334 handle_t * xct=journal_start(my_jnrl);
269 foreach(bh) { 335 foreach(bh) {
270 journal_get_{create,write,undo}_access(xact,bh); 336 journal_get_{create,write,undo}_access(xact,bh);
271 if ( myfs_modify(bh) ) { /* returns true 337 if ( myfs_modify(bh) ) { /* returns true
272 if makes changes */ 338 if makes changes */
273 journal_dirty_{meta,}data(xact,bh); 339 journal_dirty_{meta,}data(xact,bh);
274 } else { 340 } else {
@@ -279,55 +345,57 @@ an example.
279 } 345 }
280 journal_destroy(my_jrnl); 346 journal_destroy(my_jrnl);
281</programlisting> 347</programlisting>
282</sect1> 348 </sect2>
283 349
284</chapter> 350 </sect1>
285 351
286 <chapter id="adt"> 352 <sect1>
287 <title>Data Types</title> 353 <title>Data Types</title>
288 <para> 354 <para>
289 The journalling layer uses typedefs to 'hide' the concrete definitions 355 The journalling layer uses typedefs to 'hide' the concrete definitions
290 of the structures used. As a client of the JBD layer you can 356 of the structures used. As a client of the JBD layer you can
291 just rely on the using the pointer as a magic cookie of some sort. 357 just rely on the using the pointer as a magic cookie of some sort.
292 358
293 Obviously the hiding is not enforced as this is 'C'. 359 Obviously the hiding is not enforced as this is 'C'.
294 </para> 360 </para>
295 <sect1><title>Structures</title> 361 <sect2><title>Structures</title>
296!Iinclude/linux/jbd.h 362!Iinclude/linux/jbd.h
297 </sect1> 363 </sect2>
298</chapter> 364 </sect1>
299 365
300 <chapter id="calls"> 366 <sect1>
301 <title>Functions</title> 367 <title>Functions</title>
302 <para> 368 <para>
303 The functions here are split into two groups those that 369 The functions here are split into two groups those that
304 affect a journal as a whole, and those which are used to 370 affect a journal as a whole, and those which are used to
305 manage transactions 371 manage transactions
306</para> 372 </para>
307 <sect1><title>Journal Level</title> 373 <sect2><title>Journal Level</title>
308!Efs/jbd/journal.c 374!Efs/jbd/journal.c
309!Ifs/jbd/recovery.c 375!Ifs/jbd/recovery.c
310 </sect1> 376 </sect2>
311 <sect1><title>Transasction Level</title> 377 <sect2><title>Transasction Level</title>
312!Efs/jbd/transaction.c 378!Efs/jbd/transaction.c
313 </sect1> 379 </sect2>
314</chapter> 380 </sect1>
315<chapter> 381 <sect1>
316 <title>See also</title> 382 <title>See also</title>
317 <para> 383 <para>
318 <citation> 384 <citation>
319 <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz"> 385 <ulink url="ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/journal-design.ps.gz">
320 Journaling the Linux ext2fs Filesystem,LinuxExpo 98, Stephen Tweedie 386 Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie
321 </ulink> 387 </ulink>
322 </citation> 388 </citation>
323 </para> 389 </para>
324 <para> 390 <para>
325 <citation> 391 <citation>
326 <ulink url="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html"> 392 <ulink url="http://olstrans.sourceforge.net/release/OLS2000-ext3/OLS2000-ext3.html">
327 Ext3 Journalling FileSystem , OLS 2000, Dr. Stephen Tweedie 393 Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie
328 </ulink> 394 </ulink>
329 </citation> 395 </citation>
330 </para> 396 </para>
331</chapter> 397 </sect1>
398
399 </chapter>
332 400
333</book> 401</book>
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 2b5ac604948c..3fa0c4b4541e 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -182,66 +182,6 @@ X!Ilib/string.c
182 </sect1> 182 </sect1>
183 </chapter> 183 </chapter>
184 184
185 <chapter id="vfs">
186 <title>The Linux VFS</title>
187 <sect1><title>The Filesystem types</title>
188!Iinclude/linux/fs.h
189 </sect1>
190 <sect1><title>The Directory Cache</title>
191!Efs/dcache.c
192!Iinclude/linux/dcache.h
193 </sect1>
194 <sect1><title>Inode Handling</title>
195!Efs/inode.c
196!Efs/bad_inode.c
197 </sect1>
198 <sect1><title>Registration and Superblocks</title>
199!Efs/super.c
200 </sect1>
201 <sect1><title>File Locks</title>
202!Efs/locks.c
203!Ifs/locks.c
204 </sect1>
205 <sect1><title>Other Functions</title>
206!Efs/mpage.c
207!Efs/namei.c
208!Efs/buffer.c
209!Efs/bio.c
210!Efs/seq_file.c
211!Efs/filesystems.c
212!Efs/fs-writeback.c
213!Efs/block_dev.c
214 </sect1>
215 </chapter>
216
217 <chapter id="proc">
218 <title>The proc filesystem</title>
219
220 <sect1><title>sysctl interface</title>
221!Ekernel/sysctl.c
222 </sect1>
223
224 <sect1><title>proc filesystem interface</title>
225!Ifs/proc/base.c
226 </sect1>
227 </chapter>
228
229 <chapter id="sysfs">
230 <title>The Filesystem for Exporting Kernel Objects</title>
231!Efs/sysfs/file.c
232!Efs/sysfs/symlink.c
233!Efs/sysfs/bin.c
234 </chapter>
235
236 <chapter id="debugfs">
237 <title>The debugfs filesystem</title>
238
239 <sect1><title>debugfs interface</title>
240!Efs/debugfs/inode.c
241!Efs/debugfs/file.c
242 </sect1>
243 </chapter>
244
245 <chapter id="relayfs"> 185 <chapter id="relayfs">
246 <title>relay interface support</title> 186 <title>relay interface support</title>
247 187
@@ -478,9 +418,35 @@ X!Edrivers/pnp/system.c
478!Idrivers/parport/daisy.c 418!Idrivers/parport/daisy.c
479 </chapter> 419 </chapter>
480 420
481 <chapter id="viddev"> 421 <chapter id="message_devices">
482 <title>Video4Linux</title> 422 <title>Message-based devices</title>
483!Edrivers/media/video/videodev.c 423 <sect1><title>Fusion message devices</title>
424!Edrivers/message/fusion/mptbase.c
425!Idrivers/message/fusion/mptbase.c
426!Edrivers/message/fusion/mptscsih.c
427!Idrivers/message/fusion/mptscsih.c
428!Idrivers/message/fusion/mptctl.c
429!Idrivers/message/fusion/mptspi.c
430!Idrivers/message/fusion/mptfc.c
431!Idrivers/message/fusion/mptlan.c
432 </sect1>
433 <sect1><title>I2O message devices</title>
434!Iinclude/linux/i2o.h
435!Idrivers/message/i2o/core.h
436!Edrivers/message/i2o/iop.c
437!Idrivers/message/i2o/iop.c
438!Idrivers/message/i2o/config-osm.c
439!Edrivers/message/i2o/exec-osm.c
440!Idrivers/message/i2o/exec-osm.c
441!Idrivers/message/i2o/bus-osm.c
442!Edrivers/message/i2o/device.c
443!Idrivers/message/i2o/device.c
444!Idrivers/message/i2o/driver.c
445!Idrivers/message/i2o/pci.c
446!Idrivers/message/i2o/i2o_block.c
447!Idrivers/message/i2o/i2o_scsi.c
448!Idrivers/message/i2o/i2o_proc.c
449 </sect1>
484 </chapter> 450 </chapter>
485 451
486 <chapter id="snddev"> 452 <chapter id="snddev">
@@ -593,4 +559,12 @@ X!Idrivers/video/console/fonts.c
593--> 559-->
594 </sect1> 560 </sect1>
595 </chapter> 561 </chapter>
562
563 <chapter id="input_subsystem">
564 <title>Input Subsystem</title>
565!Iinclude/linux/input.h
566!Edrivers/input/input.c
567!Edrivers/input/ff-core.c
568!Edrivers/input/ff-memless.c
569 </chapter>
596</book> 570</book>
diff --git a/Documentation/DocBook/writing_usb_driver.tmpl b/Documentation/DocBook/writing_usb_driver.tmpl
index 07cd34c1940b..d4188d4ff535 100644
--- a/Documentation/DocBook/writing_usb_driver.tmpl
+++ b/Documentation/DocBook/writing_usb_driver.tmpl
@@ -345,8 +345,7 @@ static inline void skel_delete (struct usb_skel *dev)
345 usb_buffer_free (dev->udev, dev->bulk_out_size, 345 usb_buffer_free (dev->udev, dev->bulk_out_size,
346 dev->bulk_out_buffer, 346 dev->bulk_out_buffer,
347 dev->write_urb->transfer_dma); 347 dev->write_urb->transfer_dma);
348 if (dev->write_urb != NULL) 348 usb_free_urb (dev->write_urb);
349 usb_free_urb (dev->write_urb);
350 kfree (dev); 349 kfree (dev);
351} 350}
352 </programlisting> 351 </programlisting>
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index d6f3dd1a3464..8d51c148f721 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -395,6 +395,26 @@ bugme-janitor mailing list (every change in the bugzilla is mailed here)
395 395
396 396
397 397
398Managing bug reports
399--------------------
400
401One of the best ways to put into practice your hacking skills is by fixing
402bugs reported by other people. Not only you will help to make the kernel
403more stable, you'll learn to fix real world problems and you will improve
404your skills, and other developers will be aware of your presence. Fixing
405bugs is one of the best ways to get merits among other developers, because
406not many people like wasting time fixing other people's bugs.
407
408To work in the already reported bug reports, go to http://bugzilla.kernel.org.
409If you want to be advised of the future bug reports, you can subscribe to the
410bugme-new mailing list (only new bug reports are mailed here) or to the
411bugme-janitor mailing list (every change in the bugzilla is mailed here)
412
413 http://lists.osdl.org/mailman/listinfo/bugme-new
414 http://lists.osdl.org/mailman/listinfo/bugme-janitors
415
416
417
398Mailing lists 418Mailing lists
399------------- 419-------------
400 420
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt
index 0e3924ecd76b..24dc3fcf1594 100644
--- a/Documentation/IPMI.txt
+++ b/Documentation/IPMI.txt
@@ -365,6 +365,7 @@ You can change this at module load time (for a module) with:
365 regshifts=<shift1>,<shift2>,... 365 regshifts=<shift1>,<shift2>,...
366 slave_addrs=<addr1>,<addr2>,... 366 slave_addrs=<addr1>,<addr2>,...
367 force_kipmid=<enable1>,<enable2>,... 367 force_kipmid=<enable1>,<enable2>,...
368 unload_when_empty=[0|1]
368 369
369Each of these except si_trydefaults is a list, the first item for the 370Each of these except si_trydefaults is a list, the first item for the
370first interface, second item for the second interface, etc. 371first interface, second item for the second interface, etc.
@@ -416,6 +417,11 @@ by the driver, but systems with broken interrupts might need an enable,
416or users that don't want the daemon (don't need the performance, don't 417or users that don't want the daemon (don't need the performance, don't
417want the CPU hit) can disable it. 418want the CPU hit) can disable it.
418 419
420If unload_when_empty is set to 1, the driver will be unloaded if it
421doesn't find any interfaces or all the interfaces fail to work. The
422default is one. Setting to 0 is useful with the hotmod, but is
423obviously only useful for modules.
424
419When compiled into the kernel, the parameters can be specified on the 425When compiled into the kernel, the parameters can be specified on the
420kernel command line as: 426kernel command line as:
421 427
@@ -441,6 +447,25 @@ have high-res timers enabled in the kernel and you don't have
441interrupts enabled, the driver will run VERY slowly. Don't blame me, 447interrupts enabled, the driver will run VERY slowly. Don't blame me,
442these interfaces suck. 448these interfaces suck.
443 449
450The driver supports a hot add and remove of interfaces. This way,
451interfaces can be added or removed after the kernel is up and running.
452This is done using /sys/modules/ipmi_si/hotmod, which is a write-only
453parameter. You write a string to this interface. The string has the
454format:
455 <op1>[:op2[:op3...]]
456The "op"s are:
457 add|remove,kcs|bt|smic,mem|i/o,<address>[,<opt1>[,<opt2>[,...]]]
458You can specify more than one interface on the line. The "opt"s are:
459 rsp=<regspacing>
460 rsi=<regsize>
461 rsh=<regshift>
462 irq=<irq>
463 ipmb=<ipmb slave addr>
464and these have the same meanings as discussed above. Note that you
465can also use this on the kernel command line for a more compact format
466for specifying an interface. Note that when removing an interface,
467only the first three parameters (si type, address type, and address)
468are used for the comparison. Any options are ignored for removing.
444 469
445The SMBus Driver 470The SMBus Driver
446---------------- 471----------------
@@ -502,7 +527,10 @@ used to control it:
502 527
503 modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type> 528 modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type>
504 preaction=<preaction type> preop=<preop type> start_now=x 529 preaction=<preaction type> preop=<preop type> start_now=x
505 nowayout=x 530 nowayout=x ifnum_to_use=n
531
532ifnum_to_use specifies which interface the watchdog timer should use.
533The default is -1, which means to pick the first one registered.
506 534
507The timeout is the number of seconds to the action, and the pretimeout 535The timeout is the number of seconds to the action, and the pretimeout
508is the amount of seconds before the reset that the pre-timeout panic will 536is the amount of seconds before the reset that the pre-timeout panic will
@@ -624,5 +652,9 @@ command line. The parameter is also available via the proc filesystem
624in /proc/sys/dev/ipmi/poweroff_powercycle. Note that if the system 652in /proc/sys/dev/ipmi/poweroff_powercycle. Note that if the system
625does not support power cycling, it will always do the power off. 653does not support power cycling, it will always do the power off.
626 654
655The "ifnum_to_use" parameter specifies which interface the poweroff
656code should use. The default is -1, which means to pick the first one
657registered.
658
627Note that if you have ACPI enabled, the system will prefer using ACPI to 659Note that if you have ACPI enabled, the system will prefer using ACPI to
628power off. 660power off.
diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt
index c70306abb7b2..d389388c733e 100644
--- a/Documentation/MSI-HOWTO.txt
+++ b/Documentation/MSI-HOWTO.txt
@@ -219,7 +219,7 @@ into the field vector of each element contained in a second argument.
219Note that the pre-assigned IOAPIC dev->irq is valid only if the device 219Note that the pre-assigned IOAPIC dev->irq is valid only if the device
220operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at 220operates in PIN-IRQ assertion mode. In MSI-X mode, any attempt at
221using dev->irq by the device driver to request for interrupt service 221using dev->irq by the device driver to request for interrupt service
222may result unpredictabe behavior. 222may result in unpredictable behavior.
223 223
224For each MSI-X vector granted, a device driver is responsible for calling 224For each MSI-X vector granted, a device driver is responsible for calling
225other functions like request_irq(), enable_irq(), etc. to enable 225other functions like request_irq(), enable_irq(), etc. to enable
@@ -470,7 +470,68 @@ LOC: 324553 325068
470ERR: 0 470ERR: 0
471MIS: 0 471MIS: 0
472 472
4736. FAQ 4736. MSI quirks
474
475Several PCI chipsets or devices are known to not support MSI.
476The PCI stack provides 3 possible levels of MSI disabling:
477* on a single device
478* on all devices behind a specific bridge
479* globally
480
4816.1. Disabling MSI on a single device
482
483Under some circumstances, it might be required to disable MSI on a
484single device, It may be achived by either not calling pci_enable_msi()
485or all, or setting the pci_dev->no_msi flag before (most of the time
486in a quirk).
487
4886.2. Disabling MSI below a bridge
489
490The vast majority of MSI quirks are required by PCI bridges not
491being able to route MSI between busses. In this case, MSI have to be
492disabled on all devices behind this bridge. It is achieves by setting
493the PCI_BUS_FLAGS_NO_MSI flag in the pci_bus->bus_flags of the bridge
494subordinate bus. There is no need to set the same flag on bridges that
495are below the broken brigde. When pci_enable_msi() is called to enable
496MSI on a device, pci_msi_supported() takes care of checking the NO_MSI
497flag in all parent busses of the device.
498
499Some bridges actually support dynamic MSI support enabling/disabling
500by changing some bits in their PCI configuration space (especially
501the Hypertransport chipsets such as the nVidia nForce and Serverworks
502HT2000). It may then be required to update the NO_MSI flag on the
503corresponding devices in the sysfs hierarchy. To enable MSI support
504on device "0000:00:0e", do:
505
506 echo 1 > /sys/bus/pci/devices/0000:00:0e/msi_bus
507
508To disable MSI support, echo 0 instead of 1. Note that it should be
509used with caution since changing this value might break interrupts.
510
5116.3. Disabling MSI globally
512
513Some extreme cases may require to disable MSI globally on the system.
514For now, the only known case is a Serverworks PCI-X chipsets (MSI are
515not supported on several busses that are not all connected to the
516chipset in the Linux PCI hierarchy). In the vast majority of other
517cases, disabling only behind a specific bridge is enough.
518
519For debugging purpose, the user may also pass pci=nomsi on the kernel
520command-line to explicitly disable MSI globally. But, once the appro-
521priate quirks are added to the kernel, this option should not be
522required anymore.
523
5246.4. Finding why MSI cannot be enabled on a device
525
526Assuming that MSI are not enabled on a device, you should look at
527dmesg to find messages that quirks may output when disabling MSI
528on some devices, some bridges or even globally.
529Then, lspci -t gives the list of bridges above a device. Reading
530/sys/bus/pci/devices/0000:00:0e/msi_bus will tell you whether MSI
531are enabled (1) or disabled (0). In 0 is found in a single bridge
532msi_bus file above the device, MSI cannot be enabled.
533
5347. FAQ
474 535
475Q1. Are there any limitations on using the MSI? 536Q1. Are there any limitations on using the MSI?
476 537
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index 7ac61f60037a..2270efa10153 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -66,3 +66,9 @@ kernel patches.
66 See Documentation/ABI/README for more information. 66 See Documentation/ABI/README for more information.
67 67
6820: Check that it all passes `make headers_check'. 6820: Check that it all passes `make headers_check'.
69
7021: Has been checked with injection of at least slab and page-allocation
71 fauilures. See Documentation/fault-injection/.
72
73 If the new code is substantial, addition of subsystem-specific fault
74 injection might be appropriate.
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index b11792abd6b6..e9126e794ed7 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -7,6 +7,8 @@
7 * Copyright (C) Balbir Singh, IBM Corp. 2006 7 * Copyright (C) Balbir Singh, IBM Corp. 2006
8 * Copyright (c) Jay Lan, SGI. 2006 8 * Copyright (c) Jay Lan, SGI. 2006
9 * 9 *
10 * Compile with
11 * gcc -I/usr/src/linux/include getdelays.c -o getdelays
10 */ 12 */
11 13
12#include <stdio.h> 14#include <stdio.h>
@@ -35,13 +37,20 @@
35#define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN)) 37#define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN))
36#define NLA_PAYLOAD(len) (len - NLA_HDRLEN) 38#define NLA_PAYLOAD(len) (len - NLA_HDRLEN)
37 39
38#define err(code, fmt, arg...) do { printf(fmt, ##arg); exit(code); } while (0) 40#define err(code, fmt, arg...) \
39int done = 0; 41 do { \
40int rcvbufsz=0; 42 fprintf(stderr, fmt, ##arg); \
41 43 exit(code); \
42 char name[100]; 44 } while (0)
43int dbg=0, print_delays=0; 45
46int done;
47int rcvbufsz;
48char name[100];
49int dbg;
50int print_delays;
51int print_io_accounting;
44__u64 stime, utime; 52__u64 stime, utime;
53
45#define PRINTF(fmt, arg...) { \ 54#define PRINTF(fmt, arg...) { \
46 if (dbg) { \ 55 if (dbg) { \
47 printf(fmt, ##arg); \ 56 printf(fmt, ##arg); \
@@ -49,7 +58,7 @@ __u64 stime, utime;
49 } 58 }
50 59
51/* Maximum size of response requested or message sent */ 60/* Maximum size of response requested or message sent */
52#define MAX_MSG_SIZE 256 61#define MAX_MSG_SIZE 1024
53/* Maximum number of cpus expected to be specified in a cpumask */ 62/* Maximum number of cpus expected to be specified in a cpumask */
54#define MAX_CPUS 32 63#define MAX_CPUS 32
55/* Maximum length of pathname to log file */ 64/* Maximum length of pathname to log file */
@@ -78,8 +87,9 @@ static int create_nl_socket(int protocol)
78 if (rcvbufsz) 87 if (rcvbufsz)
79 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, 88 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
80 &rcvbufsz, sizeof(rcvbufsz)) < 0) { 89 &rcvbufsz, sizeof(rcvbufsz)) < 0) {
81 printf("Unable to set socket rcv buf size to %d\n", 90 fprintf(stderr, "Unable to set socket rcv buf size "
82 rcvbufsz); 91 "to %d\n",
92 rcvbufsz);
83 return -1; 93 return -1;
84 } 94 }
85 95
@@ -186,6 +196,15 @@ void print_delayacct(struct taskstats *t)
186 "count", "delay total", t->swapin_count, t->swapin_delay_total); 196 "count", "delay total", t->swapin_count, t->swapin_delay_total);
187} 197}
188 198
199void print_ioacct(struct taskstats *t)
200{
201 printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
202 t->ac_comm,
203 (unsigned long long)t->read_bytes,
204 (unsigned long long)t->write_bytes,
205 (unsigned long long)t->cancelled_write_bytes);
206}
207
189int main(int argc, char *argv[]) 208int main(int argc, char *argv[])
190{ 209{
191 int c, rc, rep_len, aggr_len, len2, cmd_type; 210 int c, rc, rep_len, aggr_len, len2, cmd_type;
@@ -208,7 +227,7 @@ int main(int argc, char *argv[])
208 struct msgtemplate msg; 227 struct msgtemplate msg;
209 228
210 while (1) { 229 while (1) {
211 c = getopt(argc, argv, "dw:r:m:t:p:v:l"); 230 c = getopt(argc, argv, "diw:r:m:t:p:v:l");
212 if (c < 0) 231 if (c < 0)
213 break; 232 break;
214 233
@@ -217,6 +236,10 @@ int main(int argc, char *argv[])
217 printf("print delayacct stats ON\n"); 236 printf("print delayacct stats ON\n");
218 print_delays = 1; 237 print_delays = 1;
219 break; 238 break;
239 case 'i':
240 printf("printing IO accounting\n");
241 print_io_accounting = 1;
242 break;
220 case 'w': 243 case 'w':
221 strncpy(logfile, optarg, MAX_FILENAME); 244 strncpy(logfile, optarg, MAX_FILENAME);
222 printf("write to file %s\n", logfile); 245 printf("write to file %s\n", logfile);
@@ -238,14 +261,12 @@ int main(int argc, char *argv[])
238 if (!tid) 261 if (!tid)
239 err(1, "Invalid tgid\n"); 262 err(1, "Invalid tgid\n");
240 cmd_type = TASKSTATS_CMD_ATTR_TGID; 263 cmd_type = TASKSTATS_CMD_ATTR_TGID;
241 print_delays = 1;
242 break; 264 break;
243 case 'p': 265 case 'p':
244 tid = atoi(optarg); 266 tid = atoi(optarg);
245 if (!tid) 267 if (!tid)
246 err(1, "Invalid pid\n"); 268 err(1, "Invalid pid\n");
247 cmd_type = TASKSTATS_CMD_ATTR_PID; 269 cmd_type = TASKSTATS_CMD_ATTR_PID;
248 print_delays = 1;
249 break; 270 break;
250 case 'v': 271 case 'v':
251 printf("debug on\n"); 272 printf("debug on\n");
@@ -277,7 +298,7 @@ int main(int argc, char *argv[])
277 mypid = getpid(); 298 mypid = getpid();
278 id = get_family_id(nl_sd); 299 id = get_family_id(nl_sd);
279 if (!id) { 300 if (!id) {
280 printf("Error getting family id, errno %d", errno); 301 fprintf(stderr, "Error getting family id, errno %d\n", errno);
281 goto err; 302 goto err;
282 } 303 }
283 PRINTF("family id %d\n", id); 304 PRINTF("family id %d\n", id);
@@ -288,7 +309,7 @@ int main(int argc, char *argv[])
288 &cpumask, strlen(cpumask) + 1); 309 &cpumask, strlen(cpumask) + 1);
289 PRINTF("Sent register cpumask, retval %d\n", rc); 310 PRINTF("Sent register cpumask, retval %d\n", rc);
290 if (rc < 0) { 311 if (rc < 0) {
291 printf("error sending register cpumask\n"); 312 fprintf(stderr, "error sending register cpumask\n");
292 goto err; 313 goto err;
293 } 314 }
294 } 315 }
@@ -298,7 +319,7 @@ int main(int argc, char *argv[])
298 cmd_type, &tid, sizeof(__u32)); 319 cmd_type, &tid, sizeof(__u32));
299 PRINTF("Sent pid/tgid, retval %d\n", rc); 320 PRINTF("Sent pid/tgid, retval %d\n", rc);
300 if (rc < 0) { 321 if (rc < 0) {
301 printf("error sending tid/tgid cmd\n"); 322 fprintf(stderr, "error sending tid/tgid cmd\n");
302 goto done; 323 goto done;
303 } 324 }
304 } 325 }
@@ -310,13 +331,15 @@ int main(int argc, char *argv[])
310 PRINTF("received %d bytes\n", rep_len); 331 PRINTF("received %d bytes\n", rep_len);
311 332
312 if (rep_len < 0) { 333 if (rep_len < 0) {
313 printf("nonfatal reply error: errno %d\n", errno); 334 fprintf(stderr, "nonfatal reply error: errno %d\n",
335 errno);
314 continue; 336 continue;
315 } 337 }
316 if (msg.n.nlmsg_type == NLMSG_ERROR || 338 if (msg.n.nlmsg_type == NLMSG_ERROR ||
317 !NLMSG_OK((&msg.n), rep_len)) { 339 !NLMSG_OK((&msg.n), rep_len)) {
318 struct nlmsgerr *err = NLMSG_DATA(&msg); 340 struct nlmsgerr *err = NLMSG_DATA(&msg);
319 printf("fatal reply error, errno %d\n", err->error); 341 fprintf(stderr, "fatal reply error, errno %d\n",
342 err->error);
320 goto done; 343 goto done;
321 } 344 }
322 345
@@ -356,6 +379,8 @@ int main(int argc, char *argv[])
356 count++; 379 count++;
357 if (print_delays) 380 if (print_delays)
358 print_delayacct((struct taskstats *) NLA_DATA(na)); 381 print_delayacct((struct taskstats *) NLA_DATA(na));
382 if (print_io_accounting)
383 print_ioacct((struct taskstats *) NLA_DATA(na));
359 if (fd) { 384 if (fd) {
360 if (write(fd, NLA_DATA(na), na->nla_len) < 0) { 385 if (write(fd, NLA_DATA(na), na->nla_len) < 0) {
361 err(1,"write error\n"); 386 err(1,"write error\n");
@@ -365,7 +390,9 @@ int main(int argc, char *argv[])
365 goto done; 390 goto done;
366 break; 391 break;
367 default: 392 default:
368 printf("Unknown nested nla_type %d\n", na->nla_type); 393 fprintf(stderr, "Unknown nested"
394 " nla_type %d\n",
395 na->nla_type);
369 break; 396 break;
370 } 397 }
371 len2 += NLA_ALIGN(na->nla_len); 398 len2 += NLA_ALIGN(na->nla_len);
@@ -374,7 +401,8 @@ int main(int argc, char *argv[])
374 break; 401 break;
375 402
376 default: 403 default:
377 printf("Unknown nla_type %d\n", na->nla_type); 404 fprintf(stderr, "Unknown nla_type %d\n",
405 na->nla_type);
378 break; 406 break;
379 } 407 }
380 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); 408 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
diff --git a/Documentation/accounting/taskstats.txt b/Documentation/accounting/taskstats.txt
index 92ebf29e9041..ff06b738bb88 100644
--- a/Documentation/accounting/taskstats.txt
+++ b/Documentation/accounting/taskstats.txt
@@ -96,9 +96,9 @@ a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
96a pid/tgid will be followed by some stats. 96a pid/tgid will be followed by some stats.
97 97
98b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats 98b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
99is being returned. 99are being returned.
100 100
101c) TASKSTATS_TYPE_STATS: attribute with a struct taskstsats as payload. The 101c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
102same structure is used for both per-pid and per-tgid stats. 102same structure is used for both per-pid and per-tgid stats.
103 103
1043. New message sent by kernel whenever a task exits. The payload consists of a 1043. New message sent by kernel whenever a task exits. The payload consists of a
@@ -122,12 +122,12 @@ of atomicity).
122 122
123However, maintaining per-process, in addition to per-task stats, within the 123However, maintaining per-process, in addition to per-task stats, within the
124kernel has space and time overheads. To address this, the taskstats code 124kernel has space and time overheads. To address this, the taskstats code
125accumalates each exiting task's statistics into a process-wide data structure. 125accumulates each exiting task's statistics into a process-wide data structure.
126When the last task of a process exits, the process level data accumalated also 126When the last task of a process exits, the process level data accumulated also
127gets sent to userspace (along with the per-task data). 127gets sent to userspace (along with the per-task data).
128 128
129When a user queries to get per-tgid data, the sum of all other live threads in 129When a user queries to get per-tgid data, the sum of all other live threads in
130the group is added up and added to the accumalated total for previously exited 130the group is added up and added to the accumulated total for previously exited
131threads of the same thread group. 131threads of the same thread group.
132 132
133Extending taskstats 133Extending taskstats
diff --git a/Documentation/block/as-iosched.txt b/Documentation/block/as-iosched.txt
index e2a66f8143c5..a598fe10a297 100644
--- a/Documentation/block/as-iosched.txt
+++ b/Documentation/block/as-iosched.txt
@@ -24,8 +24,10 @@ very similar behavior to the deadline IO scheduler.
24Selecting IO schedulers 24Selecting IO schedulers
25----------------------- 25-----------------------
26To choose IO schedulers at boot time, use the argument 'elevator=deadline'. 26To choose IO schedulers at boot time, use the argument 'elevator=deadline'.
27'noop' and 'as' (the default) are also available. IO schedulers are assigned 27'noop', 'as' and 'cfq' (the default) are also available. IO schedulers are
28globally at boot time only presently. 28assigned globally at boot time only presently. It's also possible to change
29the IO scheduler for a determined device on the fly, as described in
30Documentation/block/switching-sched.txt.
29 31
30 32
31Anticipatory IO scheduler Policies 33Anticipatory IO scheduler Policies
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 34bf8f60d8f8..c6c9a9c10d7f 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -183,7 +183,7 @@ it, the pci dma mapping routines and associated data structures have now been
183modified to accomplish a direct page -> bus translation, without requiring 183modified to accomplish a direct page -> bus translation, without requiring
184a virtual address mapping (unlike the earlier scheme of virtual address 184a virtual address mapping (unlike the earlier scheme of virtual address
185-> bus translation). So this works uniformly for high-memory pages (which 185-> bus translation). So this works uniformly for high-memory pages (which
186do not have a correponding kernel virtual address space mapping) and 186do not have a corresponding kernel virtual address space mapping) and
187low-memory pages. 187low-memory pages.
188 188
189Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA 189Note: Please refer to DMA-mapping.txt for a discussion on PCI high mem DMA
@@ -391,7 +391,7 @@ forced such requests to be broken up into small chunks before being passed
391on to the generic block layer, only to be merged by the i/o scheduler 391on to the generic block layer, only to be merged by the i/o scheduler
392when the underlying device was capable of handling the i/o in one shot. 392when the underlying device was capable of handling the i/o in one shot.
393Also, using the buffer head as an i/o structure for i/os that didn't originate 393Also, using the buffer head as an i/o structure for i/os that didn't originate
394from the buffer cache unecessarily added to the weight of the descriptors 394from the buffer cache unnecessarily added to the weight of the descriptors
395which were generated for each such chunk. 395which were generated for each such chunk.
396 396
397The following were some of the goals and expectations considered in the 397The following were some of the goals and expectations considered in the
@@ -403,14 +403,14 @@ i. Should be appropriate as a descriptor for both raw and buffered i/o -
403 for raw i/o. 403 for raw i/o.
404ii. Ability to represent high-memory buffers (which do not have a virtual 404ii. Ability to represent high-memory buffers (which do not have a virtual
405 address mapping in kernel address space). 405 address mapping in kernel address space).
406iii.Ability to represent large i/os w/o unecessarily breaking them up (i.e 406iii.Ability to represent large i/os w/o unnecessarily breaking them up (i.e
407 greater than PAGE_SIZE chunks in one shot) 407 greater than PAGE_SIZE chunks in one shot)
408iv. At the same time, ability to retain independent identity of i/os from 408iv. At the same time, ability to retain independent identity of i/os from
409 different sources or i/o units requiring individual completion (e.g. for 409 different sources or i/o units requiring individual completion (e.g. for
410 latency reasons) 410 latency reasons)
411v. Ability to represent an i/o involving multiple physical memory segments 411v. Ability to represent an i/o involving multiple physical memory segments
412 (including non-page aligned page fragments, as specified via readv/writev) 412 (including non-page aligned page fragments, as specified via readv/writev)
413 without unecessarily breaking it up, if the underlying device is capable of 413 without unnecessarily breaking it up, if the underlying device is capable of
414 handling it. 414 handling it.
415vi. Preferably should be based on a memory descriptor structure that can be 415vi. Preferably should be based on a memory descriptor structure that can be
416 passed around different types of subsystems or layers, maybe even 416 passed around different types of subsystems or layers, maybe even
@@ -1013,7 +1013,7 @@ Characteristics:
1013i. Binary tree 1013i. Binary tree
1014AS and deadline i/o schedulers use red black binary trees for disk position 1014AS and deadline i/o schedulers use red black binary trees for disk position
1015sorting and searching, and a fifo linked list for time-based searching. This 1015sorting and searching, and a fifo linked list for time-based searching. This
1016gives good scalability and good availablility of information. Requests are 1016gives good scalability and good availability of information. Requests are
1017almost always dispatched in disk sort order, so a cache is kept of the next 1017almost always dispatched in disk sort order, so a cache is kept of the next
1018request in sort order to prevent binary tree lookups. 1018request in sort order to prevent binary tree lookups.
1019 1019
diff --git a/Documentation/cdrom/packet-writing.txt b/Documentation/cdrom/packet-writing.txt
index 3d44c561fe6d..7715d2247c4d 100644
--- a/Documentation/cdrom/packet-writing.txt
+++ b/Documentation/cdrom/packet-writing.txt
@@ -90,6 +90,41 @@ Notes
90 to create an ext2 filesystem on the disc. 90 to create an ext2 filesystem on the disc.
91 91
92 92
93Using the pktcdvd sysfs interface
94---------------------------------
95
96Since Linux 2.6.19, the pktcdvd module has a sysfs interface
97and can be controlled by it. For example the "pktcdvd" tool uses
98this interface. (see http://people.freenet.de/BalaGi#pktcdvd )
99
100"pktcdvd" works similar to "pktsetup", e.g.:
101
102 # pktcdvd -a dev_name /dev/hdc
103 # mkudffs /dev/pktcdvd/dev_name
104 # mount -t udf -o rw,noatime /dev/pktcdvd/dev_name /dvdram
105 # cp files /dvdram
106 # umount /dvdram
107 # pktcdvd -r dev_name
108
109
110For a description of the sysfs interface look into the file:
111
112 Documentation/ABI/testing/sysfs-block-pktcdvd
113
114
115Using the pktcdvd debugfs interface
116-----------------------------------
117
118To read pktcdvd device infos in human readable form, do:
119
120 # cat /debug/pktcdvd/pktcdvd[0-7]/info
121
122For a description of the debugfs interface look into the file:
123
124 Documentation/ABI/testing/debugfs-pktcdvd
125
126
127
93Links 128Links
94----- 129-----
95 130
diff --git a/Documentation/cpu-freq/cpufreq-nforce2.txt b/Documentation/cpu-freq/cpufreq-nforce2.txt
index 9188337d8f6b..babce1315026 100644
--- a/Documentation/cpu-freq/cpufreq-nforce2.txt
+++ b/Documentation/cpu-freq/cpufreq-nforce2.txt
@@ -1,7 +1,7 @@
1 1
2The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 plattforms. 2The cpufreq-nforce2 driver changes the FSB on nVidia nForce2 platforms.
3 3
4This works better than on other plattforms, because the FSB of the CPU 4This works better than on other platforms, because the FSB of the CPU
5can be controlled independently from the PCI/AGP clock. 5can be controlled independently from the PCI/AGP clock.
6 6
7The module has two options: 7The module has two options:
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index bc107cb157a8..cc60d29b954c 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -46,7 +46,7 @@ maxcpus=n Restrict boot time cpus to n. Say if you have 4 cpus, using
46 maxcpus=2 will only boot 2. You can choose to bring the 46 maxcpus=2 will only boot 2. You can choose to bring the
47 other cpus later online, read FAQ's for more info. 47 other cpus later online, read FAQ's for more info.
48 48
49additional_cpus*=n Use this to limit hotpluggable cpus. This option sets 49additional_cpus=n (*) Use this to limit hotpluggable cpus. This option sets
50 cpu_possible_map = cpu_present_map + additional_cpus 50 cpu_possible_map = cpu_present_map + additional_cpus
51 51
52(*) Option valid only for following architectures 52(*) Option valid only for following architectures
@@ -54,8 +54,8 @@ additional_cpus*=n Use this to limit hotpluggable cpus. This option sets
54 54
55ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT 55ia64 and x86_64 use the number of disabled local apics in ACPI tables MADT
56to determine the number of potentially hot-pluggable cpus. The implementation 56to determine the number of potentially hot-pluggable cpus. The implementation
57should only rely on this to count the #of cpus, but *MUST* not rely on the 57should only rely on this to count the # of cpus, but *MUST* not rely on the
58apicid values in those tables for disabled apics. In the event BIOS doesnt 58apicid values in those tables for disabled apics. In the event BIOS doesn't
59mark such hot-pluggable cpus as disabled entries, one could use this 59mark such hot-pluggable cpus as disabled entries, one could use this
60parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. 60parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
61 61
@@ -101,15 +101,15 @@ cpu_possible_map/for_each_possible_cpu() to iterate.
101 101
102Never use anything other than cpumask_t to represent bitmap of CPUs. 102Never use anything other than cpumask_t to represent bitmap of CPUs.
103 103
104#include <linux/cpumask.h> 104 #include <linux/cpumask.h>
105 105
106for_each_possible_cpu - Iterate over cpu_possible_map 106 for_each_possible_cpu - Iterate over cpu_possible_map
107for_each_online_cpu - Iterate over cpu_online_map 107 for_each_online_cpu - Iterate over cpu_online_map
108for_each_present_cpu - Iterate over cpu_present_map 108 for_each_present_cpu - Iterate over cpu_present_map
109for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask. 109 for_each_cpu_mask(x,mask) - Iterate over some random collection of cpu mask.
110 110
111#include <linux/cpu.h> 111 #include <linux/cpu.h>
112lock_cpu_hotplug() and unlock_cpu_hotplug(): 112 lock_cpu_hotplug() and unlock_cpu_hotplug():
113 113
114The above calls are used to inhibit cpu hotplug operations. While holding the 114The above calls are used to inhibit cpu hotplug operations. While holding the
115cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid 115cpucontrol mutex, cpu_online_map will not change. If you merely need to avoid
@@ -120,7 +120,7 @@ will work as long as stop_machine_run() is used to take a cpu down.
120 120
121CPU Hotplug - Frequently Asked Questions. 121CPU Hotplug - Frequently Asked Questions.
122 122
123Q: How to i enable my kernel to support CPU hotplug? 123Q: How to enable my kernel to support CPU hotplug?
124A: When doing make defconfig, Enable CPU hotplug support 124A: When doing make defconfig, Enable CPU hotplug support
125 125
126 "Processor type and Features" -> Support for Hotpluggable CPUs 126 "Processor type and Features" -> Support for Hotpluggable CPUs
@@ -141,39 +141,39 @@ A: You should now notice an entry in sysfs.
141Check if sysfs is mounted, using the "mount" command. You should notice 141Check if sysfs is mounted, using the "mount" command. You should notice
142an entry as shown below in the output. 142an entry as shown below in the output.
143 143
144.... 144 ....
145none on /sys type sysfs (rw) 145 none on /sys type sysfs (rw)
146.... 146 ....
147 147
148if this is not mounted, do the following. 148If this is not mounted, do the following.
149 149
150#mkdir /sysfs 150 #mkdir /sysfs
151#mount -t sysfs sys /sys 151 #mount -t sysfs sys /sys
152 152
153now you should see entries for all present cpu, the following is an example 153Now you should see entries for all present cpu, the following is an example
154in a 8-way system. 154in a 8-way system.
155 155
156#pwd 156 #pwd
157#/sys/devices/system/cpu 157 #/sys/devices/system/cpu
158#ls -l 158 #ls -l
159total 0 159 total 0
160drwxr-xr-x 10 root root 0 Sep 19 07:44 . 160 drwxr-xr-x 10 root root 0 Sep 19 07:44 .
161drwxr-xr-x 13 root root 0 Sep 19 07:45 .. 161 drwxr-xr-x 13 root root 0 Sep 19 07:45 ..
162drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0 162 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu0
163drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1 163 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu1
164drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2 164 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu2
165drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3 165 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu3
166drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4 166 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu4
167drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5 167 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu5
168drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6 168 drwxr-xr-x 3 root root 0 Sep 19 07:44 cpu6
169drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7 169 drwxr-xr-x 3 root root 0 Sep 19 07:48 cpu7
170 170
171Under each directory you would find an "online" file which is the control 171Under each directory you would find an "online" file which is the control
172file to logically online/offline a processor. 172file to logically online/offline a processor.
173 173
174Q: Does hot-add/hot-remove refer to physical add/remove of cpus? 174Q: Does hot-add/hot-remove refer to physical add/remove of cpus?
175A: The usage of hot-add/remove may not be very consistently used in the code. 175A: The usage of hot-add/remove may not be very consistently used in the code.
176CONFIG_CPU_HOTPLUG enables logical online/offline capability in the kernel. 176CONFIG_HOTPLUG_CPU enables logical online/offline capability in the kernel.
177To support physical addition/removal, one would need some BIOS hooks and 177To support physical addition/removal, one would need some BIOS hooks and
178the platform should have something like an attention button in PCI hotplug. 178the platform should have something like an attention button in PCI hotplug.
179CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs. 179CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs.
@@ -181,17 +181,17 @@ CONFIG_ACPI_HOTPLUG_CPU enables ACPI support for physical add/remove of CPUs.
181Q: How do i logically offline a CPU? 181Q: How do i logically offline a CPU?
182A: Do the following. 182A: Do the following.
183 183
184#echo 0 > /sys/devices/system/cpu/cpuX/online 184 #echo 0 > /sys/devices/system/cpu/cpuX/online
185 185
186once the logical offline is successful, check 186Once the logical offline is successful, check
187 187
188#cat /proc/interrupts 188 #cat /proc/interrupts
189 189
190you should now not see the CPU that you removed. Also online file will report 190You should now not see the CPU that you removed. Also online file will report
191the state as 0 when a cpu if offline and 1 when its online. 191the state as 0 when a cpu if offline and 1 when its online.
192 192
193#To display the current cpu state. 193 #To display the current cpu state.
194#cat /sys/devices/system/cpu/cpuX/online 194 #cat /sys/devices/system/cpu/cpuX/online
195 195
196Q: Why cant i remove CPU0 on some systems? 196Q: Why cant i remove CPU0 on some systems?
197A: Some architectures may have some special dependency on a certain CPU. 197A: Some architectures may have some special dependency on a certain CPU.
@@ -234,8 +234,8 @@ Q: If i have some kernel code that needs to be aware of CPU arrival and
234 departure, how to i arrange for proper notification? 234 departure, how to i arrange for proper notification?
235A: This is what you would need in your kernel code to receive notifications. 235A: This is what you would need in your kernel code to receive notifications.
236 236
237 #include <linux/cpu.h> 237 #include <linux/cpu.h>
238 static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb, 238 static int __cpuinit foobar_cpu_callback(struct notifier_block *nfb,
239 unsigned long action, void *hcpu) 239 unsigned long action, void *hcpu)
240 { 240 {
241 unsigned int cpu = (unsigned long)hcpu; 241 unsigned int cpu = (unsigned long)hcpu;
@@ -279,10 +279,10 @@ Q: I don't see my action being called for all CPUs already up and running?
279A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined. 279A: Yes, CPU notifiers are called only when new CPUs are on-lined or offlined.
280 If you need to perform some action for each cpu already in the system, then 280 If you need to perform some action for each cpu already in the system, then
281 281
282 for_each_online_cpu(i) { 282 for_each_online_cpu(i) {
283 foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i); 283 foobar_cpu_callback(&foobar_cpu_notifier, CPU_UP_PREPARE, i);
284 foobar_cpu_callback(&foobar-cpu_notifier, CPU_ONLINE, i); 284 foobar_cpu_callback(&foobar_cpu_notifier, CPU_ONLINE, i);
285 } 285 }
286 286
287Q: If i would like to develop cpu hotplug support for a new architecture, 287Q: If i would like to develop cpu hotplug support for a new architecture,
288 what do i need at a minimum? 288 what do i need at a minimum?
@@ -307,38 +307,38 @@ Q: I need to ensure that a particular cpu is not removed when there is some
307 work specific to this cpu is in progress. 307 work specific to this cpu is in progress.
308A: First switch the current thread context to preferred cpu 308A: First switch the current thread context to preferred cpu
309 309
310 int my_func_on_cpu(int cpu) 310 int my_func_on_cpu(int cpu)
311 { 311 {
312 cpumask_t saved_mask, new_mask = CPU_MASK_NONE; 312 cpumask_t saved_mask, new_mask = CPU_MASK_NONE;
313 int curr_cpu, err = 0; 313 int curr_cpu, err = 0;
314 314
315 saved_mask = current->cpus_allowed; 315 saved_mask = current->cpus_allowed;
316 cpu_set(cpu, new_mask); 316 cpu_set(cpu, new_mask);
317 err = set_cpus_allowed(current, new_mask); 317 err = set_cpus_allowed(current, new_mask);
318 318
319 if (err) 319 if (err)
320 return err; 320 return err;
321 321
322 /* 322 /*
323 * If we got scheduled out just after the return from 323 * If we got scheduled out just after the return from
324 * set_cpus_allowed() before running the work, this ensures 324 * set_cpus_allowed() before running the work, this ensures
325 * we stay locked. 325 * we stay locked.
326 */ 326 */
327 curr_cpu = get_cpu(); 327 curr_cpu = get_cpu();
328 328
329 if (curr_cpu != cpu) { 329 if (curr_cpu != cpu) {
330 err = -EAGAIN; 330 err = -EAGAIN;
331 goto ret; 331 goto ret;
332 } else { 332 } else {
333 /* 333 /*
334 * Do work : But cant sleep, since get_cpu() disables preempt 334 * Do work : But cant sleep, since get_cpu() disables preempt
335 */ 335 */
336 } 336 }
337 ret: 337 ret:
338 put_cpu(); 338 put_cpu();
339 set_cpus_allowed(current, saved_mask); 339 set_cpus_allowed(current, saved_mask);
340 return err; 340 return err;
341 } 341 }
342 342
343 343
344Q: How do we determine how many CPUs are available for hotplug. 344Q: How do we determine how many CPUs are available for hotplug.
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 28c4f79662c2..8de132a02ba9 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: 15 May 2006 6 Last revised: 29 November 2006
7 7
8This list is the Linux Device List, the official registry of allocated 8This list is the Linux Device List, the official registry of allocated
9device numbers and /dev directory nodes for the Linux operating 9device numbers and /dev directory nodes for the Linux operating
@@ -92,8 +92,9 @@ Your cooperation is appreciated.
92 7 = /dev/full Returns ENOSPC on write 92 7 = /dev/full Returns ENOSPC on write
93 8 = /dev/random Nondeterministic random number gen. 93 8 = /dev/random Nondeterministic random number gen.
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 Asynchronous 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
97 1 block RAM disk 98 1 block RAM disk
98 0 = /dev/ram0 First RAM disk 99 0 = /dev/ram0 First RAM disk
99 1 = /dev/ram1 Second RAM disk 100 1 = /dev/ram1 Second RAM disk
@@ -122,7 +123,7 @@ Your cooperation is appreciated.
122 devices are on major 128 and above and use the PTY 123 devices are on major 128 and above and use the PTY
123 master multiplex (/dev/ptmx) to acquire a PTY on 124 master multiplex (/dev/ptmx) to acquire a PTY on
124 demand. 125 demand.
125 126
126 2 block Floppy disks 127 2 block Floppy disks
127 0 = /dev/fd0 Controller 0, drive 0, autodetect 128 0 = /dev/fd0 Controller 0, drive 0, autodetect
128 1 = /dev/fd1 Controller 0, drive 1, autodetect 129 1 = /dev/fd1 Controller 0, drive 1, autodetect
@@ -257,7 +258,7 @@ Your cooperation is appreciated.
257 129 = /dev/vcsa1 tty1 text/attribute contents 258 129 = /dev/vcsa1 tty1 text/attribute contents
258 ... 259 ...
259 191 = /dev/vcsa63 tty63 text/attribute contents 260 191 = /dev/vcsa63 tty63 text/attribute contents
260 261
261 NOTE: These devices permit both read and write access. 262 NOTE: These devices permit both read and write access.
262 263
263 7 block Loopback devices 264 7 block Loopback devices
@@ -411,7 +412,7 @@ Your cooperation is appreciated.
411 207 = /dev/video/em8300_sp EM8300 DVD decoder subpicture 412 207 = /dev/video/em8300_sp EM8300 DVD decoder subpicture
412 208 = /dev/compaq/cpqphpc Compaq PCI Hot Plug Controller 413 208 = /dev/compaq/cpqphpc Compaq PCI Hot Plug Controller
413 209 = /dev/compaq/cpqrid Compaq Remote Insight Driver 414 209 = /dev/compaq/cpqrid Compaq Remote Insight Driver
414 210 = /dev/impi/bt IMPI coprocessor block transfer 415 210 = /dev/impi/bt IMPI coprocessor block transfer
415 211 = /dev/impi/smic IMPI coprocessor stream interface 416 211 = /dev/impi/smic IMPI coprocessor stream interface
416 212 = /dev/watchdogs/0 First watchdog device 417 212 = /dev/watchdogs/0 First watchdog device
417 213 = /dev/watchdogs/1 Second watchdog device 418 213 = /dev/watchdogs/1 Second watchdog device
@@ -506,6 +507,7 @@ Your cooperation is appreciated.
506 33 = /dev/patmgr1 Sequencer patch manager 507 33 = /dev/patmgr1 Sequencer patch manager
507 34 = /dev/midi02 Third MIDI port 508 34 = /dev/midi02 Third MIDI port
508 50 = /dev/midi03 Fourth MIDI port 509 50 = /dev/midi03 Fourth MIDI port
510
509 14 block BIOS harddrive callback support {2.6} 511 14 block BIOS harddrive callback support {2.6}
510 0 = /dev/dos_hda First BIOS harddrive whole disk 512 0 = /dev/dos_hda First BIOS harddrive whole disk
511 64 = /dev/dos_hdb Second BIOS harddrive whole disk 513 64 = /dev/dos_hdb Second BIOS harddrive whole disk
@@ -527,6 +529,7 @@ Your cooperation is appreciated.
527 529
528 16 char Non-SCSI scanners 530 16 char Non-SCSI scanners
529 0 = /dev/gs4500 Genius 4500 handheld scanner 531 0 = /dev/gs4500 Genius 4500 handheld scanner
532
530 16 block GoldStar CD-ROM 533 16 block GoldStar CD-ROM
531 0 = /dev/gscd GoldStar CD-ROM 534 0 = /dev/gscd GoldStar CD-ROM
532 535
@@ -548,6 +551,7 @@ Your cooperation is appreciated.
548 0 = /dev/ttyC0 First Cyclades port 551 0 = /dev/ttyC0 First Cyclades port
549 ... 552 ...
550 31 = /dev/ttyC31 32nd Cyclades port 553 31 = /dev/ttyC31 32nd Cyclades port
554
551 19 block "Double" compressed disk 555 19 block "Double" compressed disk
552 0 = /dev/double0 First compressed disk 556 0 = /dev/double0 First compressed disk
553 ... 557 ...
@@ -563,6 +567,7 @@ Your cooperation is appreciated.
563 0 = /dev/cub0 Callout device for ttyC0 567 0 = /dev/cub0 Callout device for ttyC0
564 ... 568 ...
565 31 = /dev/cub31 Callout device for ttyC31 569 31 = /dev/cub31 Callout device for ttyC31
570
566 20 block Hitachi CD-ROM (under development) 571 20 block Hitachi CD-ROM (under development)
567 0 = /dev/hitcd Hitachi CD-ROM 572 0 = /dev/hitcd Hitachi CD-ROM
568 573
@@ -582,7 +587,7 @@ Your cooperation is appreciated.
582 587
583 This device is used on the ARM-based Acorn RiscPC. 588 This device is used on the ARM-based Acorn RiscPC.
584 Partitions are handled the same way as for IDE disks 589 Partitions are handled the same way as for IDE disks
585 (see major number 3). 590 (see major number 3).
586 591
587 22 char Digiboard serial card 592 22 char Digiboard serial card
588 0 = /dev/ttyD0 First Digiboard port 593 0 = /dev/ttyD0 First Digiboard port
@@ -591,7 +596,7 @@ Your cooperation is appreciated.
591 22 block Second IDE hard disk/CD-ROM interface 596 22 block Second IDE hard disk/CD-ROM interface
592 0 = /dev/hdc Master: whole disk (or CD-ROM) 597 0 = /dev/hdc Master: whole disk (or CD-ROM)
593 64 = /dev/hdd Slave: whole disk (or CD-ROM) 598 64 = /dev/hdd Slave: whole disk (or CD-ROM)
594 599
595 Partitions are handled the same way as for the first 600 Partitions are handled the same way as for the first
596 interface (see major number 3). 601 interface (see major number 3).
597 602
@@ -639,6 +644,7 @@ Your cooperation is appreciated.
639 644
640 26 char Quanta WinVision frame grabber {2.6} 645 26 char Quanta WinVision frame grabber {2.6}
641 0 = /dev/wvisfgrab Quanta WinVision frame grabber 646 0 = /dev/wvisfgrab Quanta WinVision frame grabber
647
642 26 block Second Matsushita (Panasonic/SoundBlaster) CD-ROM 648 26 block Second Matsushita (Panasonic/SoundBlaster) CD-ROM
643 0 = /dev/sbpcd4 Panasonic CD-ROM controller 1 unit 0 649 0 = /dev/sbpcd4 Panasonic CD-ROM controller 1 unit 0
644 1 = /dev/sbpcd5 Panasonic CD-ROM controller 1 unit 1 650 1 = /dev/sbpcd5 Panasonic CD-ROM controller 1 unit 1
@@ -670,6 +676,7 @@ Your cooperation is appreciated.
670 37 = /dev/nrawqft1 Unit 1, no rewind-on-close, no file marks 676 37 = /dev/nrawqft1 Unit 1, no rewind-on-close, no file marks
671 38 = /dev/nrawqft2 Unit 2, no rewind-on-close, no file marks 677 38 = /dev/nrawqft2 Unit 2, no rewind-on-close, no file marks
672 39 = /dev/nrawqft3 Unit 3, no rewind-on-close, no file marks 678 39 = /dev/nrawqft3 Unit 3, no rewind-on-close, no file marks
679
673 27 block Third Matsushita (Panasonic/SoundBlaster) CD-ROM 680 27 block Third Matsushita (Panasonic/SoundBlaster) CD-ROM
674 0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0 681 0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0
675 1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1 682 1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1
@@ -681,6 +688,7 @@ Your cooperation is appreciated.
681 1 = /dev/staliomem1 Second Stallion card I/O memory 688 1 = /dev/staliomem1 Second Stallion card I/O memory
682 2 = /dev/staliomem2 Third Stallion card I/O memory 689 2 = /dev/staliomem2 Third Stallion card I/O memory
683 3 = /dev/staliomem3 Fourth Stallion card I/O memory 690 3 = /dev/staliomem3 Fourth Stallion card I/O memory
691
684 28 char Atari SLM ACSI laser printer (68k/Atari) 692 28 char Atari SLM ACSI laser printer (68k/Atari)
685 0 = /dev/slm0 First SLM laser printer 693 0 = /dev/slm0 First SLM laser printer
686 1 = /dev/slm1 Second SLM laser printer 694 1 = /dev/slm1 Second SLM laser printer
@@ -690,6 +698,7 @@ Your cooperation is appreciated.
690 1 = /dev/sbpcd13 Panasonic CD-ROM controller 3 unit 1 698 1 = /dev/sbpcd13 Panasonic CD-ROM controller 3 unit 1
691 2 = /dev/sbpcd14 Panasonic CD-ROM controller 3 unit 2 699 2 = /dev/sbpcd14 Panasonic CD-ROM controller 3 unit 2
692 3 = /dev/sbpcd15 Panasonic CD-ROM controller 3 unit 3 700 3 = /dev/sbpcd15 Panasonic CD-ROM controller 3 unit 3
701
693 28 block ACSI disk (68k/Atari) 702 28 block ACSI disk (68k/Atari)
694 0 = /dev/ada First ACSI disk whole disk 703 0 = /dev/ada First ACSI disk whole disk
695 16 = /dev/adb Second ACSI disk whole disk 704 16 = /dev/adb Second ACSI disk whole disk
@@ -750,6 +759,7 @@ Your cooperation is appreciated.
750 31 char MPU-401 MIDI 759 31 char MPU-401 MIDI
751 0 = /dev/mpu401data MPU-401 data port 760 0 = /dev/mpu401data MPU-401 data port
752 1 = /dev/mpu401stat MPU-401 status port 761 1 = /dev/mpu401stat MPU-401 status port
762
753 31 block ROM/flash memory card 763 31 block ROM/flash memory card
754 0 = /dev/rom0 First ROM card (rw) 764 0 = /dev/rom0 First ROM card (rw)
755 ... 765 ...
@@ -801,7 +811,7 @@ Your cooperation is appreciated.
801 34 block Fourth IDE hard disk/CD-ROM interface 811 34 block Fourth IDE hard disk/CD-ROM interface
802 0 = /dev/hdg Master: whole disk (or CD-ROM) 812 0 = /dev/hdg Master: whole disk (or CD-ROM)
803 64 = /dev/hdh Slave: whole disk (or CD-ROM) 813 64 = /dev/hdh Slave: whole disk (or CD-ROM)
804 814
805 Partitions are handled the same way as for the first 815 Partitions are handled the same way as for the first
806 interface (see major number 3). 816 interface (see major number 3).
807 817
@@ -818,6 +828,7 @@ Your cooperation is appreciated.
818 129 = /dev/smpte1 Second MIDI port, SMPTE timed 828 129 = /dev/smpte1 Second MIDI port, SMPTE timed
819 130 = /dev/smpte2 Third MIDI port, SMPTE timed 829 130 = /dev/smpte2 Third MIDI port, SMPTE timed
820 131 = /dev/smpte3 Fourth MIDI port, SMPTE timed 830 131 = /dev/smpte3 Fourth MIDI port, SMPTE timed
831
821 35 block Slow memory ramdisk 832 35 block Slow memory ramdisk
822 0 = /dev/slram Slow memory ramdisk 833 0 = /dev/slram Slow memory ramdisk
823 834
@@ -828,6 +839,7 @@ Your cooperation is appreciated.
828 16 = /dev/tap0 First Ethertap device 839 16 = /dev/tap0 First Ethertap device
829 ... 840 ...
830 31 = /dev/tap15 16th Ethertap device 841 31 = /dev/tap15 16th Ethertap device
842
831 36 block MCA ESDI hard disk 843 36 block MCA ESDI hard disk
832 0 = /dev/eda First ESDI disk whole disk 844 0 = /dev/eda First ESDI disk whole disk
833 64 = /dev/edb Second ESDI disk whole disk 845 64 = /dev/edb Second ESDI disk whole disk
@@ -882,6 +894,7 @@ Your cooperation is appreciated.
882 894
883 40 char Matrox Meteor frame grabber {2.6} 895 40 char Matrox Meteor frame grabber {2.6}
884 0 = /dev/mmetfgrab Matrox Meteor frame grabber 896 0 = /dev/mmetfgrab Matrox Meteor frame grabber
897
885 40 block Syquest EZ135 parallel port removable drive 898 40 block Syquest EZ135 parallel port removable drive
886 0 = /dev/eza Parallel EZ135 drive, whole disk 899 0 = /dev/eza Parallel EZ135 drive, whole disk
887 900
@@ -893,6 +906,7 @@ Your cooperation is appreciated.
893 906
894 41 char Yet Another Micro Monitor 907 41 char Yet Another Micro Monitor
895 0 = /dev/yamm Yet Another Micro Monitor 908 0 = /dev/yamm Yet Another Micro Monitor
909
896 41 block MicroSolutions BackPack parallel port CD-ROM 910 41 block MicroSolutions BackPack parallel port CD-ROM
897 0 = /dev/bpcd BackPack CD-ROM 911 0 = /dev/bpcd BackPack CD-ROM
898 912
@@ -901,6 +915,7 @@ Your cooperation is appreciated.
901 the parallel port ATAPI CD-ROM driver at major number 46. 915 the parallel port ATAPI CD-ROM driver at major number 46.
902 916
903 42 char Demo/sample use 917 42 char Demo/sample use
918
904 42 block Demo/sample use 919 42 block Demo/sample use
905 920
906 This number is intended for use in sample code, as 921 This number is intended for use in sample code, as
@@ -918,6 +933,7 @@ Your cooperation is appreciated.
918 0 = /dev/ttyI0 First virtual modem 933 0 = /dev/ttyI0 First virtual modem
919 ... 934 ...
920 63 = /dev/ttyI63 64th virtual modem 935 63 = /dev/ttyI63 64th virtual modem
936
921 43 block Network block devices 937 43 block Network block devices
922 0 = /dev/nb0 First network block device 938 0 = /dev/nb0 First network block device
923 1 = /dev/nb1 Second network block device 939 1 = /dev/nb1 Second network block device
@@ -934,12 +950,13 @@ Your cooperation is appreciated.
934 0 = /dev/cui0 Callout device for ttyI0 950 0 = /dev/cui0 Callout device for ttyI0
935 ... 951 ...
936 63 = /dev/cui63 Callout device for ttyI63 952 63 = /dev/cui63 Callout device for ttyI63
953
937 44 block Flash Translation Layer (FTL) filesystems 954 44 block Flash Translation Layer (FTL) filesystems
938 0 = /dev/ftla FTL on first Memory Technology Device 955 0 = /dev/ftla FTL on first Memory Technology Device
939 16 = /dev/ftlb FTL on second Memory Technology Device 956 16 = /dev/ftlb FTL on second Memory Technology Device
940 32 = /dev/ftlc FTL on third Memory Technology Device 957 32 = /dev/ftlc FTL on third Memory Technology Device
941 ... 958 ...
942 240 = /dev/ftlp FTL on 16th Memory Technology Device 959 240 = /dev/ftlp FTL on 16th Memory Technology Device
943 960
944 Partitions are handled in the same way as for IDE 961 Partitions are handled in the same way as for IDE
945 disks (see major number 3) except that the partition 962 disks (see major number 3) except that the partition
@@ -958,6 +975,7 @@ Your cooperation is appreciated.
958 191 = /dev/ippp63 64th SyncPPP device 975 191 = /dev/ippp63 64th SyncPPP device
959 976
960 255 = /dev/isdninfo ISDN monitor interface 977 255 = /dev/isdninfo ISDN monitor interface
978
961 45 block Parallel port IDE disk devices 979 45 block Parallel port IDE disk devices
962 0 = /dev/pda First parallel port IDE disk 980 0 = /dev/pda First parallel port IDE disk
963 16 = /dev/pdb Second parallel port IDE disk 981 16 = /dev/pdb Second parallel port IDE disk
@@ -1044,6 +1062,7 @@ Your cooperation is appreciated.
1044 1 = /dev/dcbri1 Second DataComm card 1062 1 = /dev/dcbri1 Second DataComm card
1045 2 = /dev/dcbri2 Third DataComm card 1063 2 = /dev/dcbri2 Third DataComm card
1046 3 = /dev/dcbri3 Fourth DataComm card 1064 3 = /dev/dcbri3 Fourth DataComm card
1065
1047 52 block Mylex DAC960 PCI RAID controller; fifth controller 1066 52 block Mylex DAC960 PCI RAID controller; fifth controller
1048 0 = /dev/rd/c4d0 First disk, whole disk 1067 0 = /dev/rd/c4d0 First disk, whole disk
1049 8 = /dev/rd/c4d1 Second disk, whole disk 1068 8 = /dev/rd/c4d1 Second disk, whole disk
@@ -1093,7 +1112,8 @@ Your cooperation is appreciated.
1093 1112
1094 55 char DSP56001 digital signal processor 1113 55 char DSP56001 digital signal processor
1095 0 = /dev/dsp56k First DSP56001 1114 0 = /dev/dsp56k First DSP56001
1096 55 block Mylex DAC960 PCI RAID controller; eigth controller 1115
1116 55 block Mylex DAC960 PCI RAID controller; eighth controller
1097 0 = /dev/rd/c7d0 First disk, whole disk 1117 0 = /dev/rd/c7d0 First disk, whole disk
1098 8 = /dev/rd/c7d1 Second disk, whole disk 1118 8 = /dev/rd/c7d1 Second disk, whole disk
1099 ... 1119 ...
@@ -1130,6 +1150,7 @@ Your cooperation is appreciated.
1130 0 = /dev/cup0 Callout device for ttyP0 1150 0 = /dev/cup0 Callout device for ttyP0
1131 1 = /dev/cup1 Callout device for ttyP1 1151 1 = /dev/cup1 Callout device for ttyP1
1132 ... 1152 ...
1153
1133 58 block Reserved for logical volume manager 1154 58 block Reserved for logical volume manager
1134 1155
1135 59 char sf firewall package 1156 59 char sf firewall package
@@ -1149,6 +1170,7 @@ Your cooperation is appreciated.
1149 NAMING CONFLICT -- PROPOSED REVISED NAME /dev/rpda0 etc 1170 NAMING CONFLICT -- PROPOSED REVISED NAME /dev/rpda0 etc
1150 1171
1151 60-63 char LOCAL/EXPERIMENTAL USE 1172 60-63 char LOCAL/EXPERIMENTAL USE
1173
1152 60-63 block LOCAL/EXPERIMENTAL USE 1174 60-63 block LOCAL/EXPERIMENTAL USE
1153 Allocated for local/experimental use. For devices not 1175 Allocated for local/experimental use. For devices not
1154 assigned official numbers, these ranges should be 1176 assigned official numbers, these ranges should be
@@ -1434,7 +1456,6 @@ Your cooperation is appreciated.
1434 DAC960 (see major number 48) except that the limit on 1456 DAC960 (see major number 48) except that the limit on
1435 partitions is 15. 1457 partitions is 15.
1436 1458
1437
1438 78 char PAM Software's multimodem boards 1459 78 char PAM Software's multimodem boards
1439 0 = /dev/ttyM0 First PAM modem 1460 0 = /dev/ttyM0 First PAM modem
1440 1 = /dev/ttyM1 Second PAM modem 1461 1 = /dev/ttyM1 Second PAM modem
@@ -1450,13 +1471,12 @@ Your cooperation is appreciated.
1450 DAC960 (see major number 48) except that the limit on 1471 DAC960 (see major number 48) except that the limit on
1451 partitions is 15. 1472 partitions is 15.
1452 1473
1453
1454 79 char PAM Software's multimodem boards - alternate devices 1474 79 char PAM Software's multimodem boards - alternate devices
1455 0 = /dev/cum0 Callout device for ttyM0 1475 0 = /dev/cum0 Callout device for ttyM0
1456 1 = /dev/cum1 Callout device for ttyM1 1476 1 = /dev/cum1 Callout device for ttyM1
1457 ... 1477 ...
1458 1478
1459 79 block Compaq Intelligent Drive Array, eigth controller 1479 79 block Compaq Intelligent Drive Array, eighth controller
1460 0 = /dev/ida/c7d0 First logical drive whole disk 1480 0 = /dev/ida/c7d0 First logical drive whole disk
1461 16 = /dev/ida/c7d1 Second logical drive whole disk 1481 16 = /dev/ida/c7d1 Second logical drive whole disk
1462 ... 1482 ...
@@ -1466,7 +1486,6 @@ Your cooperation is appreciated.
1466 DAC960 (see major number 48) except that the limit on 1486 DAC960 (see major number 48) except that the limit on
1467 partitions is 15. 1487 partitions is 15.
1468 1488
1469
1470 80 char Photometrics AT200 CCD camera 1489 80 char Photometrics AT200 CCD camera
1471 0 = /dev/at200 Photometrics AT200 CCD camera 1490 0 = /dev/at200 Photometrics AT200 CCD camera
1472 1491
@@ -1679,7 +1698,7 @@ Your cooperation is appreciated.
1679 1 = /dev/dcxx1 Second capture card 1698 1 = /dev/dcxx1 Second capture card
1680 ... 1699 ...
1681 1700
1682 94 block IBM S/390 DASD block storage 1701 94 block IBM S/390 DASD block storage
1683 0 = /dev/dasda First DASD device, major 1702 0 = /dev/dasda First DASD device, major
1684 1 = /dev/dasda1 First DASD device, block 1 1703 1 = /dev/dasda1 First DASD device, block 1
1685 2 = /dev/dasda2 First DASD device, block 2 1704 2 = /dev/dasda2 First DASD device, block 2
@@ -1695,7 +1714,7 @@ Your cooperation is appreciated.
1695 1 = /dev/ipnat NAT control device/log file 1714 1 = /dev/ipnat NAT control device/log file
1696 2 = /dev/ipstate State information log file 1715 2 = /dev/ipstate State information log file
1697 3 = /dev/ipauth Authentication control device/log file 1716 3 = /dev/ipauth Authentication control device/log file
1698 ... 1717 ...
1699 1718
1700 96 char Parallel port ATAPI tape devices 1719 96 char Parallel port ATAPI tape devices
1701 0 = /dev/pt0 First parallel port ATAPI tape 1720 0 = /dev/pt0 First parallel port ATAPI tape
@@ -1705,7 +1724,7 @@ Your cooperation is appreciated.
1705 129 = /dev/npt1 Second p.p. ATAPI tape, no rewind 1724 129 = /dev/npt1 Second p.p. ATAPI tape, no rewind
1706 ... 1725 ...
1707 1726
1708 96 block Inverse NAND Flash Translation Layer 1727 96 block Inverse NAND Flash Translation Layer
1709 0 = /dev/inftla First INFTL layer 1728 0 = /dev/inftla First INFTL layer
1710 16 = /dev/inftlb Second INFTL layer 1729 16 = /dev/inftlb Second INFTL layer
1711 ... 1730 ...
@@ -1900,7 +1919,7 @@ Your cooperation is appreciated.
1900 1 = /dev/av1 Second A/V card 1919 1 = /dev/av1 Second A/V card
1901 ... 1920 ...
1902 1921
1903111 block Compaq Next Generation Drive Array, eigth controller 1922111 block Compaq Next Generation Drive Array, eighth controller
1904 0 = /dev/cciss/c7d0 First logical drive, whole disk 1923 0 = /dev/cciss/c7d0 First logical drive, whole disk
1905 16 = /dev/cciss/c7d1 Second logical drive, whole disk 1924 16 = /dev/cciss/c7d1 Second logical drive, whole disk
1906 ... 1925 ...
@@ -1937,7 +1956,6 @@ Your cooperation is appreciated.
1937 ... 1956 ...
1938 1957
1939113 block IBM iSeries virtual CD-ROM 1958113 block IBM iSeries virtual CD-ROM
1940
1941 0 = /dev/iseries/vcda First virtual CD-ROM 1959 0 = /dev/iseries/vcda First virtual CD-ROM
1942 1 = /dev/iseries/vcdb Second virtual CD-ROM 1960 1 = /dev/iseries/vcdb Second virtual CD-ROM
1943 ... 1961 ...
@@ -2059,11 +2077,12 @@ Your cooperation is appreciated.
2059 ... 2077 ...
2060 2078
2061119 char VMware virtual network control 2079119 char VMware virtual network control
2062 0 = /dev/vnet0 1st virtual network 2080 0 = /dev/vmnet0 1st virtual network
2063 1 = /dev/vnet1 2nd virtual network 2081 1 = /dev/vmnet1 2nd virtual network
2064 ... 2082 ...
2065 2083
2066120-127 char LOCAL/EXPERIMENTAL USE 2084120-127 char LOCAL/EXPERIMENTAL USE
2085
2067120-127 block LOCAL/EXPERIMENTAL USE 2086120-127 block LOCAL/EXPERIMENTAL USE
2068 Allocated for local/experimental use. For devices not 2087 Allocated for local/experimental use. For devices not
2069 assigned official numbers, these ranges should be 2088 assigned official numbers, these ranges should be
@@ -2075,7 +2094,6 @@ Your cooperation is appreciated.
2075 nodes; instead they should be accessed through the 2094 nodes; instead they should be accessed through the
2076 /dev/ptmx cloning interface. 2095 /dev/ptmx cloning interface.
2077 2096
2078
2079128 block SCSI disk devices (128-143) 2097128 block SCSI disk devices (128-143)
2080 0 = /dev/sddy 129th SCSI disk whole disk 2098 0 = /dev/sddy 129th SCSI disk whole disk
2081 16 = /dev/sddz 130th SCSI disk whole disk 2099 16 = /dev/sddz 130th SCSI disk whole disk
@@ -2087,7 +2105,6 @@ Your cooperation is appreciated.
2087 disks (see major number 3) except that the limit on 2105 disks (see major number 3) except that the limit on
2088 partitions is 15. 2106 partitions is 15.
2089 2107
2090
2091129 block SCSI disk devices (144-159) 2108129 block SCSI disk devices (144-159)
2092 0 = /dev/sdeo 145th SCSI disk whole disk 2109 0 = /dev/sdeo 145th SCSI disk whole disk
2093 16 = /dev/sdep 146th SCSI disk whole disk 2110 16 = /dev/sdep 146th SCSI disk whole disk
@@ -2123,7 +2140,6 @@ Your cooperation is appreciated.
2123 disks (see major number 3) except that the limit on 2140 disks (see major number 3) except that the limit on
2124 partitions is 15. 2141 partitions is 15.
2125 2142
2126
2127132 block SCSI disk devices (192-207) 2143132 block SCSI disk devices (192-207)
2128 0 = /dev/sdgk 193rd SCSI disk whole disk 2144 0 = /dev/sdgk 193rd SCSI disk whole disk
2129 16 = /dev/sdgl 194th SCSI disk whole disk 2145 16 = /dev/sdgl 194th SCSI disk whole disk
@@ -2135,7 +2151,6 @@ Your cooperation is appreciated.
2135 disks (see major number 3) except that the limit on 2151 disks (see major number 3) except that the limit on
2136 partitions is 15. 2152 partitions is 15.
2137 2153
2138
2139133 block SCSI disk devices (208-223) 2154133 block SCSI disk devices (208-223)
2140 0 = /dev/sdha 209th SCSI disk whole disk 2155 0 = /dev/sdha 209th SCSI disk whole disk
2141 16 = /dev/sdhb 210th SCSI disk whole disk 2156 16 = /dev/sdhb 210th SCSI disk whole disk
@@ -2147,7 +2162,6 @@ Your cooperation is appreciated.
2147 disks (see major number 3) except that the limit on 2162 disks (see major number 3) except that the limit on
2148 partitions is 15. 2163 partitions is 15.
2149 2164
2150
2151134 block SCSI disk devices (224-239) 2165134 block SCSI disk devices (224-239)
2152 0 = /dev/sdhq 225th SCSI disk whole disk 2166 0 = /dev/sdhq 225th SCSI disk whole disk
2153 16 = /dev/sdhr 226th SCSI disk whole disk 2167 16 = /dev/sdhr 226th SCSI disk whole disk
@@ -2159,7 +2173,6 @@ Your cooperation is appreciated.
2159 disks (see major number 3) except that the limit on 2173 disks (see major number 3) except that the limit on
2160 partitions is 15. 2174 partitions is 15.
2161 2175
2162
2163135 block SCSI disk devices (240-255) 2176135 block SCSI disk devices (240-255)
2164 0 = /dev/sdig 241st SCSI disk whole disk 2177 0 = /dev/sdig 241st SCSI disk whole disk
2165 16 = /dev/sdih 242nd SCSI disk whole disk 2178 16 = /dev/sdih 242nd SCSI disk whole disk
@@ -2171,7 +2184,6 @@ Your cooperation is appreciated.
2171 disks (see major number 3) except that the limit on 2184 disks (see major number 3) except that the limit on
2172 partitions is 15. 2185 partitions is 15.
2173 2186
2174
2175136-143 char Unix98 PTY slaves 2187136-143 char Unix98 PTY slaves
2176 0 = /dev/pts/0 First Unix98 pseudo-TTY 2188 0 = /dev/pts/0 First Unix98 pseudo-TTY
2177 1 = /dev/pts/1 Second Unix98 pesudo-TTY 2189 1 = /dev/pts/1 Second Unix98 pesudo-TTY
@@ -2384,6 +2396,7 @@ Your cooperation is appreciated.
2384 ... 2396 ...
2385 2397
2386159 char RESERVED 2398159 char RESERVED
2399
2387159 block RESERVED 2400159 block RESERVED
2388 2401
2389160 char General Purpose Instrument Bus (GPIB) 2402160 char General Purpose Instrument Bus (GPIB)
@@ -2427,7 +2440,7 @@ Your cooperation is appreciated.
2427 2440
2428 Partitions are handled in the same way as for IDE 2441 Partitions are handled in the same way as for IDE
2429 disks (see major number 3) except that the limit on 2442 disks (see major number 3) except that the limit on
2430 partitions is 31. 2443 partitions is 31.
2431 2444
2432162 char Raw block device interface 2445162 char Raw block device interface
2433 0 = /dev/rawctl Raw I/O control device 2446 0 = /dev/rawctl Raw I/O control device
@@ -2483,7 +2496,6 @@ Your cooperation is appreciated.
2483 2496
2484171 char Reserved for IEEE 1394 (Firewire) 2497171 char Reserved for IEEE 1394 (Firewire)
2485 2498
2486
2487172 char Moxa Intellio serial card 2499172 char Moxa Intellio serial card
2488 0 = /dev/ttyMX0 First Moxa port 2500 0 = /dev/ttyMX0 First Moxa port
2489 1 = /dev/ttyMX1 Second Moxa port 2501 1 = /dev/ttyMX1 Second Moxa port
@@ -2543,9 +2555,6 @@ Your cooperation is appreciated.
2543 64 = /dev/usb/rio500 Diamond Rio 500 2555 64 = /dev/usb/rio500 Diamond Rio 500
2544 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de) 2556 65 = /dev/usb/usblcd USBLCD Interface (info@usblcd.de)
2545 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD) 2557 66 = /dev/usb/cpad0 Synaptics cPad (mouse/LCD)
2546 67 = /dev/usb/adutux0 1st Ontrak ADU device
2547 ...
2548 76 = /dev/usb/adutux10 10th Ontrak ADU device
2549 96 = /dev/usb/hiddev0 1st USB HID device 2558 96 = /dev/usb/hiddev0 1st USB HID device
2550 ... 2559 ...
2551 111 = /dev/usb/hiddev15 16th USB HID device 2560 111 = /dev/usb/hiddev15 16th USB HID device
@@ -2558,7 +2567,7 @@ Your cooperation is appreciated.
2558 132 = /dev/usb/idmouse ID Mouse (fingerprint scanner) device 2567 132 = /dev/usb/idmouse ID Mouse (fingerprint scanner) device
2559 133 = /dev/usb/sisusbvga1 First SiSUSB VGA device 2568 133 = /dev/usb/sisusbvga1 First SiSUSB VGA device
2560 ... 2569 ...
2561 140 = /dev/usb/sisusbvga8 Eigth SISUSB VGA device 2570 140 = /dev/usb/sisusbvga8 Eighth SISUSB VGA device
2562 144 = /dev/usb/lcd USB LCD device 2571 144 = /dev/usb/lcd USB LCD device
2563 160 = /dev/usb/legousbtower0 1st USB Legotower device 2572 160 = /dev/usb/legousbtower0 1st USB Legotower device
2564 ... 2573 ...
@@ -2571,7 +2580,7 @@ Your cooperation is appreciated.
2571 0 = /dev/uba First USB block device 2580 0 = /dev/uba First USB block device
2572 8 = /dev/ubb Second USB block device 2581 8 = /dev/ubb Second USB block device
2573 16 = /dev/ubc Third USB block device 2582 16 = /dev/ubc Third USB block device
2574 ... 2583 ...
2575 2584
2576181 char Conrad Electronic parallel port radio clocks 2585181 char Conrad Electronic parallel port radio clocks
2577 0 = /dev/pcfclock0 First Conrad radio clock 2586 0 = /dev/pcfclock0 First Conrad radio clock
@@ -2657,7 +2666,7 @@ Your cooperation is appreciated.
2657 32 = /dev/mvideo/status2 Third device 2666 32 = /dev/mvideo/status2 Third device
2658 ... 2667 ...
2659 ... 2668 ...
2660 240 = /dev/mvideo/status15 16th device 2669 240 = /dev/mvideo/status15 16th device
2661 ... 2670 ...
2662 2671
2663195 char Nvidia graphics devices 2672195 char Nvidia graphics devices
@@ -2795,6 +2804,10 @@ Your cooperation is appreciated.
2795 ... 2804 ...
2796 185 = /dev/ttyNX15 Hilscher netX serial port 15 2805 185 = /dev/ttyNX15 Hilscher netX serial port 15
2797 186 = /dev/ttyJ0 JTAG1 DCC protocol based serial port emulation 2806 186 = /dev/ttyJ0 JTAG1 DCC protocol based serial port emulation
2807 187 = /dev/ttyUL0 Xilinx uartlite - port 0
2808 ...
2809 190 = /dev/ttyUL3 Xilinx uartlite - port 3
2810 191 = /dev/xvc0 Xen virtual console - port 0
2798 2811
2799205 char Low-density serial ports (alternate device) 2812205 char Low-density serial ports (alternate device)
2800 0 = /dev/culu0 Callout device for ttyLU0 2813 0 = /dev/culu0 Callout device for ttyLU0
@@ -2832,7 +2845,6 @@ Your cooperation is appreciated.
2832 82 = /dev/cuvr0 Callout device for ttyVR0 2845 82 = /dev/cuvr0 Callout device for ttyVR0
2833 83 = /dev/cuvr1 Callout device for ttyVR1 2846 83 = /dev/cuvr1 Callout device for ttyVR1
2834 2847
2835
2836206 char OnStream SC-x0 tape devices 2848206 char OnStream SC-x0 tape devices
2837 0 = /dev/osst0 First OnStream SCSI tape, mode 0 2849 0 = /dev/osst0 First OnStream SCSI tape, mode 0
2838 1 = /dev/osst1 Second OnStream SCSI tape, mode 0 2850 1 = /dev/osst1 Second OnStream SCSI tape, mode 0
@@ -2922,7 +2934,6 @@ Your cooperation is appreciated.
2922 ... 2934 ...
2923 2935
2924212 char LinuxTV.org DVB driver subsystem 2936212 char LinuxTV.org DVB driver subsystem
2925
2926 0 = /dev/dvb/adapter0/video0 first video decoder of first card 2937 0 = /dev/dvb/adapter0/video0 first video decoder of first card
2927 1 = /dev/dvb/adapter0/audio0 first audio decoder of first card 2938 1 = /dev/dvb/adapter0/audio0 first audio decoder of first card
2928 2 = /dev/dvb/adapter0/sec0 (obsolete/unused) 2939 2 = /dev/dvb/adapter0/sec0 (obsolete/unused)
@@ -3008,9 +3019,9 @@ Your cooperation is appreciated.
3008 2 = /dev/3270/tub2 Second 3270 terminal 3019 2 = /dev/3270/tub2 Second 3270 terminal
3009 ... 3020 ...
3010 3021
3011229 char IBM iSeries virtual console 3022229 char IBM iSeries/pSeries virtual console
3012 0 = /dev/iseries/vtty0 First console port 3023 0 = /dev/hvc0 First console port
3013 1 = /dev/iseries/vtty1 Second console port 3024 1 = /dev/hvc1 Second console port
3014 ... 3025 ...
3015 3026
3016230 char IBM iSeries virtual tape 3027230 char IBM iSeries virtual tape
@@ -3083,12 +3094,14 @@ Your cooperation is appreciated.
3083234-239 UNASSIGNED 3094234-239 UNASSIGNED
3084 3095
3085240-254 char LOCAL/EXPERIMENTAL USE 3096240-254 char LOCAL/EXPERIMENTAL USE
3097
3086240-254 block LOCAL/EXPERIMENTAL USE 3098240-254 block LOCAL/EXPERIMENTAL USE
3087 Allocated for local/experimental use. For devices not 3099 Allocated for local/experimental use. For devices not
3088 assigned official numbers, these ranges should be 3100 assigned official numbers, these ranges should be
3089 used in order to avoid conflicting with future assignments. 3101 used in order to avoid conflicting with future assignments.
3090 3102
3091255 char RESERVED 3103255 char RESERVED
3104
3092255 block RESERVED 3105255 block RESERVED
3093 3106
3094 This major is reserved to assist the expansion to a 3107 This major is reserved to assist the expansion to a
@@ -3115,7 +3128,20 @@ Your cooperation is appreciated.
3115257 char Phoenix Technologies Cryptographic Services Driver 3128257 char Phoenix Technologies Cryptographic Services Driver
3116 0 = /dev/ptlsec Crypto Services Driver 3129 0 = /dev/ptlsec Crypto Services Driver
3117 3130
3118 3131257 block SSFDC Flash Translation Layer filesystem
3132 0 = /dev/ssfdca First SSFDC layer
3133 8 = /dev/ssfdcb Second SSFDC layer
3134 16 = /dev/ssfdcc Third SSFDC layer
3135 24 = /dev/ssfdcd 4th SSFDC layer
3136 32 = /dev/ssfdce 5th SSFDC layer
3137 40 = /dev/ssfdcf 6th SSFDC layer
3138 48 = /dev/ssfdcg 7th SSFDC layer
3139 56 = /dev/ssfdch 8th SSFDC layer
3140
3141258 block ROM/Flash read-only translation layer
3142 0 = /dev/blockrom0 First ROM card's translation layer interface
3143 1 = /dev/blockrom1 Second ROM card's translation layer interface
3144 ...
3119 3145
3120 **** ADDITIONAL /dev DIRECTORY ENTRIES 3146 **** ADDITIONAL /dev DIRECTORY ENTRIES
3121 3147
diff --git a/Documentation/driver-model/platform.txt b/Documentation/driver-model/platform.txt
index 5eee3e0bfc4c..9f0bc3bfd776 100644
--- a/Documentation/driver-model/platform.txt
+++ b/Documentation/driver-model/platform.txt
@@ -1,99 +1,131 @@
1Platform Devices and Drivers 1Platform Devices and Drivers
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3See <linux/platform_device.h> for the driver model interface to the
4platform bus: platform_device, and platform_driver. This pseudo-bus
5is used to connect devices on busses with minimal infrastructure,
6like those used to integrate peripherals on many system-on-chip
7processors, or some "legacy" PC interconnects; as opposed to large
8formally specified ones like PCI or USB.
9
3 10
4Platform devices 11Platform devices
5~~~~~~~~~~~~~~~~ 12~~~~~~~~~~~~~~~~
6Platform devices are devices that typically appear as autonomous 13Platform devices are devices that typically appear as autonomous
7entities in the system. This includes legacy port-based devices and 14entities in the system. This includes legacy port-based devices and
8host bridges to peripheral buses. 15host bridges to peripheral buses, and most controllers integrated
9 16into system-on-chip platforms. What they usually have in common
10 17is direct addressing from a CPU bus. Rarely, a platform_device will
11Platform drivers 18be connected through a segment of some other kind of bus; but its
12~~~~~~~~~~~~~~~~ 19registers will still be directly addressible.
13Drivers for platform devices are typically very simple and
14unstructured. Either the device was present at a particular I/O port
15and the driver was loaded, or it was not. There was no possibility
16of hotplugging or alternative discovery besides probing at a specific
17I/O address and expecting a specific response.
18 20
21Platform devices are given a name, used in driver binding, and a
22list of resources such as addresses and IRQs.
19 23
20Other Architectures, Modern Firmware, and new Platforms 24struct platform_device {
21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 25 const char *name;
22These devices are not always at the legacy I/O ports. This is true on 26 u32 id;
23other architectures and on some modern architectures. In most cases, 27 struct device dev;
24the drivers are modified to discover the devices at other well-known 28 u32 num_resources;
25ports for the given platform. However, the firmware in these systems 29 struct resource *resource;
26does usually know where exactly these devices reside, and in some 30};
27cases, it's the only way of discovering them.
28 31
29 32
30The Platform Bus 33Platform drivers
31~~~~~~~~~~~~~~~~
32A platform bus has been created to deal with these issues. First and
33foremost, it groups all the legacy devices under a common bus, and
34gives them a common parent if they don't already have one.
35
36But, besides the organizational benefits, the platform bus can also
37accommodate firmware-based enumeration.
38
39
40Device Discovery
41~~~~~~~~~~~~~~~~ 34~~~~~~~~~~~~~~~~
42The platform bus has no concept of probing for devices. Devices 35Platform drivers follow the standard driver model convention, where
43discovery is left up to either the legacy drivers or the 36discovery/enumeration is handled outside the drivers, and drivers
44firmware. These entities are expected to notify the platform of 37provide probe() and remove() methods. They support power management
45devices that it discovers via the bus's add() callback: 38and shutdown notifications using the standard conventions.
46 39
47 platform_bus.add(parent,bus_id). 40struct platform_driver {
48 41 int (*probe)(struct platform_device *);
49 42 int (*remove)(struct platform_device *);
50Bus IDs 43 void (*shutdown)(struct platform_device *);
51~~~~~~~ 44 int (*suspend)(struct platform_device *, pm_message_t state);
52Bus IDs are the canonical names for the devices. There is no globally 45 int (*suspend_late)(struct platform_device *, pm_message_t state);
53standard addressing mechanism for legacy devices. In the IA-32 world, 46 int (*resume_early)(struct platform_device *);
54we have Pnp IDs to use, as well as the legacy I/O ports. However, 47 int (*resume)(struct platform_device *);
55neither tell what the device really is or have any meaning on other 48 struct device_driver driver;
56platforms. 49};
57 50
58Since both PnP IDs and the legacy I/O ports (and other standard I/O 51Note that probe() should general verify that the specified device hardware
59ports for specific devices) have a 1:1 mapping, we map the 52actually exists; sometimes platform setup code can't be sure. The probing
60platform-specific name or identifier to a generic name (at least 53can use device resources, including clocks, and device platform_data.
61within the scope of the kernel). 54
62 55Platform drivers register themselves the normal way:
63For example, a serial driver might find a device at I/O 0x3f8. The 56
64ACPI firmware might also discover a device with PnP ID (_HID) 57 int platform_driver_register(struct platform_driver *drv);
65PNP0501. Both correspond to the same device and should be mapped to the 58
66canonical name 'serial'. 59Or, in common situations where the device is known not to be hot-pluggable,
67 60the probe() routine can live in an init section to reduce the driver's
68The bus_id field should be a concatenation of the canonical name and 61runtime memory footprint:
69the instance of that type of device. For example, the device at I/O 62
70port 0x3f8 should have a bus_id of "serial0". This places the 63 int platform_driver_probe(struct platform_driver *drv,
71responsibility of enumerating devices of a particular type up to the 64 int (*probe)(struct platform_device *))
72discovery mechanism. But, they are the entity that should know best 65
73(as opposed to the platform bus driver). 66
74 67Device Enumeration
75 68~~~~~~~~~~~~~~~~~~
76Drivers 69As a rule, platform specific (and often board-specific) setup code wil
77~~~~~~~ 70register platform devices:
78Drivers for platform devices should have a name that is the same as 71
79the canonical name of the devices they support. This allows the 72 int platform_device_register(struct platform_device *pdev);
80platform bus driver to do simple matching with the basic data 73
81structures to determine if a driver supports a certain device. 74 int platform_add_devices(struct platform_device **pdevs, int ndev);
82 75
83For example, a legacy serial driver should have a name of 'serial' and 76The general rule is to register only those devices that actually exist,
84register itself with the platform bus. 77but in some cases extra devices might be registered. For example, a kernel
85 78might be configured to work with an external network adapter that might not
86 79be populated on all boards, or likewise to work with an integrated controller
87Driver Binding 80that some boards might not hook up to any peripherals.
88~~~~~~~~~~~~~~ 81
89Legacy drivers assume they are bound to the device once they start up 82In some cases, boot firmware will export tables describing the devices
90and probe an I/O port. Divorcing them from this will be a difficult 83that are populated on a given board. Without such tables, often the
91process. However, that shouldn't prevent us from implementing 84only way for system setup code to set up the correct devices is to build
92firmware-based enumeration. 85a kernel for a specific target board. Such board-specific kernels are
93 86common with embedded and custom systems development.
94The firmware should notify the platform bus about devices before the 87
95legacy drivers have had a chance to load. Once the drivers are loaded, 88In many cases, the memory and IRQ resources associated with the platform
96they driver model core will attempt to bind the driver to any 89device are not enough to let the device's driver work. Board setup code
97previously-discovered devices. Once that has happened, it will be free 90will often provide additional information using the device's platform_data
98to discover any other devices it pleases. 91field to hold additional information.
92
93Embedded systems frequently need one or more clocks for platform devices,
94which are normally kept off until they're actively needed (to save power).
95System setup also associates those clocks with the device, so that that
96calls to clk_get(&pdev->dev, clock_name) return them as needed.
97
98
99Device Naming and Driver Binding
100~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101The platform_device.dev.bus_id is the canonical name for the devices.
102It's built from two components:
103
104 * platform_device.name ... which is also used to for driver matching.
105
106 * platform_device.id ... the device instance number, or else "-1"
107 to indicate there's only one.
108
109These are catenated, so name/id "serial"/0 indicates bus_id "serial.0", and
110"serial/3" indicates bus_id "serial.3"; both would use the platform_driver
111named "serial". While "my_rtc"/-1 would be bus_id "my_rtc" (no instance id)
112and use the platform_driver called "my_rtc".
113
114Driver binding is performed automatically by the driver core, invoking
115driver probe() after finding a match between device and driver. If the
116probe() succeeds, the driver and device are bound as usual. There are
117three different ways to find such a match:
118
119 - Whenever a device is registered, the drivers for that bus are
120 checked for matches. Platform devices should be registered very
121 early during system boot.
122
123 - When a driver is registered using platform_driver_register(), all
124 unbound devices on that bus are checked for matches. Drivers
125 usually register later during booting, or by module loading.
126
127 - Registering a driver using platform_driver_probe() works just like
128 using platform_driver_register(), except that the the driver won't
129 be probed later if another device registers. (Which is OK, since
130 this interface is only for use with non-hotpluggable devices.)
99 131
diff --git a/Documentation/driver-model/porting.txt b/Documentation/driver-model/porting.txt
index 98b233cb8b36..92d86f7271b4 100644
--- a/Documentation/driver-model/porting.txt
+++ b/Documentation/driver-model/porting.txt
@@ -92,7 +92,7 @@ struct device represents a single device. It mainly contains metadata
92describing the relationship the device has to other entities. 92describing the relationship the device has to other entities.
93 93
94 94
95- Embedd a struct device in the bus-specific device type. 95- Embed a struct device in the bus-specific device type.
96 96
97 97
98struct pci_dev { 98struct pci_dev {
diff --git a/Documentation/dvb/cards.txt b/Documentation/dvb/cards.txt
index ca58e339d85f..cc09187a5db7 100644
--- a/Documentation/dvb/cards.txt
+++ b/Documentation/dvb/cards.txt
@@ -22,10 +22,10 @@ o Frontends drivers:
22 - ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993) 22 - ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
23 - cx24110 : Conexant HM1221/HM1811 (cx24110 or cx24106 demod, cx24108 PLL) 23 - cx24110 : Conexant HM1221/HM1811 (cx24110 or cx24106 demod, cx24108 PLL)
24 - grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL 24 - grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
25 - mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL 25 - mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLLi, Technisat Sky2Pc with bios Rev. 2.3
26 - stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL), 26 - stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
27 LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL), 27 LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
28 Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB 28 Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB, Technisat Sky2Pc with bios Rev. 2.6
29 DVB-C: 29 DVB-C:
30 - ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL) 30 - ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
31 - at76c651 : Atmel AT76c651(B) with DAT7021 PLL 31 - at76c651 : Atmel AT76c651(B) with DAT7021 PLL
diff --git a/Documentation/dvb/ci.txt b/Documentation/dvb/ci.txt
index 531239b29082..2ecd834585e6 100644
--- a/Documentation/dvb/ci.txt
+++ b/Documentation/dvb/ci.txt
@@ -71,7 +71,7 @@ eliminating the need for any additional ioctls.
71The disadvantage is that the driver/hardware has to manage the rest. For 71The disadvantage is that the driver/hardware has to manage the rest. For
72the application programmer it would be as simple as sending/receiving an 72the application programmer it would be as simple as sending/receiving an
73array to/from the CI ioctls as defined in the Linux DVB API. No changes 73array to/from the CI ioctls as defined in the Linux DVB API. No changes
74have been made in the API to accomodate this feature. 74have been made in the API to accommodate this feature.
75 75
76 76
77* Why the need for another CI interface ? 77* Why the need for another CI interface ?
@@ -102,7 +102,7 @@ This CI interface follows the CI high level interface, which is not
102implemented by most applications. Hence this area is revisited. 102implemented by most applications. Hence this area is revisited.
103 103
104This CI interface is quite different in the case that it tries to 104This CI interface is quite different in the case that it tries to
105accomodate all other CI based devices, that fall into the other categories 105accommodate all other CI based devices, that fall into the other categories.
106 106
107This means that this CI interface handles the EN50221 style tags in the 107This means that this CI interface handles the EN50221 style tags in the
108Application layer only and no session management is taken care of by the 108Application layer only and no session management is taken care of by the
diff --git a/Documentation/eisa.txt b/Documentation/eisa.txt
index 6a099edadd62..60e361ba08c0 100644
--- a/Documentation/eisa.txt
+++ b/Documentation/eisa.txt
@@ -62,7 +62,7 @@ res : root device I/O resource
62bus_base_addr : slot 0 address on this bus 62bus_base_addr : slot 0 address on this bus
63slots : max slot number to probe 63slots : max slot number to probe
64force_probe : Probe even when slot 0 is empty (no EISA mainboard) 64force_probe : Probe even when slot 0 is empty (no EISA mainboard)
65dma_mask : Default DMA mask. Usualy the bridge device dma_mask. 65dma_mask : Default DMA mask. Usually the bridge device dma_mask.
66bus_nr : unique bus id, set by eisa_root_register 66bus_nr : unique bus id, set by eisa_root_register
67 67
68** Driver : 68** Driver :
diff --git a/Documentation/fault-injection/failcmd.sh b/Documentation/fault-injection/failcmd.sh
new file mode 100644
index 000000000000..63177aba8106
--- /dev/null
+++ b/Documentation/fault-injection/failcmd.sh
@@ -0,0 +1,4 @@
1#!/bin/bash
2
3echo 1 > /proc/self/make-it-fail
4exec $*
diff --git a/Documentation/fault-injection/failmodule.sh b/Documentation/fault-injection/failmodule.sh
new file mode 100644
index 000000000000..474a8b971f9c
--- /dev/null
+++ b/Documentation/fault-injection/failmodule.sh
@@ -0,0 +1,31 @@
1#!/bin/bash
2#
3# Usage: failmodule <failname> <modulename> [stacktrace-depth]
4#
5# <failname>: "failslab", "fail_alloc_page", or "fail_make_request"
6#
7# <modulename>: module name that you want to inject faults.
8#
9# [stacktrace-depth]: the maximum number of stacktrace walking allowed
10#
11
12STACKTRACE_DEPTH=5
13if [ $# -gt 2 ]; then
14 STACKTRACE_DEPTH=$3
15fi
16
17if [ ! -d /debug/$1 ]; then
18 echo "Fault-injection $1 does not exist" >&2
19 exit 1
20fi
21if [ ! -d /sys/module/$2 ]; then
22 echo "Module $2 does not exist" >&2
23 exit 1
24fi
25
26# Disable any fault injection
27echo 0 > /debug/$1/stacktrace-depth
28
29echo `cat /sys/module/$2/sections/.text` > /debug/$1/require-start
30echo `cat /sys/module/$2/sections/.exit.text` > /debug/$1/require-end
31echo $STACKTRACE_DEPTH > /debug/$1/stacktrace-depth
diff --git a/Documentation/fault-injection/fault-injection.txt b/Documentation/fault-injection/fault-injection.txt
new file mode 100644
index 000000000000..b7ca560b9340
--- /dev/null
+++ b/Documentation/fault-injection/fault-injection.txt
@@ -0,0 +1,225 @@
1Fault injection capabilities infrastructure
2===========================================
3
4See also drivers/md/faulty.c and "every_nth" module option for scsi_debug.
5
6
7Available fault injection capabilities
8--------------------------------------
9
10o failslab
11
12 injects slab allocation failures. (kmalloc(), kmem_cache_alloc(), ...)
13
14o fail_page_alloc
15
16 injects page allocation failures. (alloc_pages(), get_free_pages(), ...)
17
18o fail_make_request
19
20 injects disk IO errors on devices permitted by setting
21 /sys/block/<device>/make-it-fail or
22 /sys/block/<device>/<partition>/make-it-fail. (generic_make_request())
23
24Configure fault-injection capabilities behavior
25-----------------------------------------------
26
27o debugfs entries
28
29fault-inject-debugfs kernel module provides some debugfs entries for runtime
30configuration of fault-injection capabilities.
31
32- /debug/fail*/probability:
33
34 likelihood of failure injection, in percent.
35 Format: <percent>
36
37 Note that one-failure-per-hundred is a very high error rate
38 for some testcases. Consider setting probability=100 and configure
39 /debug/fail*/interval for such testcases.
40
41- /debug/fail*/interval:
42
43 specifies the interval between failures, for calls to
44 should_fail() that pass all the other tests.
45
46 Note that if you enable this, by setting interval>1, you will
47 probably want to set probability=100.
48
49- /debug/fail*/times:
50
51 specifies how many times failures may happen at most.
52 A value of -1 means "no limit".
53
54- /debug/fail*/space:
55
56 specifies an initial resource "budget", decremented by "size"
57 on each call to should_fail(,size). Failure injection is
58 suppressed until "space" reaches zero.
59
60- /debug/fail*/verbose
61
62 Format: { 0 | 1 | 2 }
63 specifies the verbosity of the messages when failure is
64 injected. '0' means no messages; '1' will print only a single
65 log line per failure; '2' will print a call trace too -- useful
66 to debug the problems revealed by fault injection.
67
68- /debug/fail*/task-filter:
69
70 Format: { 'Y' | 'N' }
71 A value of 'N' disables filtering by process (default).
72 Any positive value limits failures to only processes indicated by
73 /proc/<pid>/make-it-fail==1.
74
75- /debug/fail*/require-start:
76- /debug/fail*/require-end:
77- /debug/fail*/reject-start:
78- /debug/fail*/reject-end:
79
80 specifies the range of virtual addresses tested during
81 stacktrace walking. Failure is injected only if some caller
82 in the walked stacktrace lies within the required range, and
83 none lies within the rejected range.
84 Default required range is [0,ULONG_MAX) (whole of virtual address space).
85 Default rejected range is [0,0).
86
87- /debug/fail*/stacktrace-depth:
88
89 specifies the maximum stacktrace depth walked during search
90 for a caller within [require-start,require-end) OR
91 [reject-start,reject-end).
92
93- /debug/fail_page_alloc/ignore-gfp-highmem:
94
95 Format: { 'Y' | 'N' }
96 default is 'N', setting it to 'Y' won't inject failures into
97 highmem/user allocations.
98
99- /debug/failslab/ignore-gfp-wait:
100- /debug/fail_page_alloc/ignore-gfp-wait:
101
102 Format: { 'Y' | 'N' }
103 default is 'N', setting it to 'Y' will inject failures
104 only into non-sleep allocations (GFP_ATOMIC allocations).
105
106o Boot option
107
108In order to inject faults while debugfs is not available (early boot time),
109use the boot option:
110
111 failslab=
112 fail_page_alloc=
113 fail_make_request=<interval>,<probability>,<space>,<times>
114
115How to add new fault injection capability
116-----------------------------------------
117
118o #include <linux/fault-inject.h>
119
120o define the fault attributes
121
122 DECLARE_FAULT_INJECTION(name);
123
124 Please see the definition of struct fault_attr in fault-inject.h
125 for details.
126
127o provide a way to configure fault attributes
128
129- boot option
130
131 If you need to enable the fault injection capability from boot time, you can
132 provide boot option to configure it. There is a helper function for it:
133
134 setup_fault_attr(attr, str);
135
136- debugfs entries
137
138 failslab, fail_page_alloc, and fail_make_request use this way.
139 Helper functions:
140
141 init_fault_attr_entries(entries, attr, name);
142 void cleanup_fault_attr_entries(entries);
143
144- module parameters
145
146 If the scope of the fault injection capability is limited to a
147 single kernel module, it is better to provide module parameters to
148 configure the fault attributes.
149
150o add a hook to insert failures
151
152 Upon should_fail() returning true, client code should inject a failure.
153
154 should_fail(attr, size);
155
156Application Examples
157--------------------
158
159o inject slab allocation failures into module init/cleanup code
160
161------------------------------------------------------------------------------
162#!/bin/bash
163
164FAILCMD=Documentation/fault-injection/failcmd.sh
165BLACKLIST="root_plug evbug"
166
167FAILNAME=failslab
168echo Y > /debug/$FAILNAME/task-filter
169echo 10 > /debug/$FAILNAME/probability
170echo 100 > /debug/$FAILNAME/interval
171echo -1 > /debug/$FAILNAME/times
172echo 2 > /debug/$FAILNAME/verbose
173echo 1 > /debug/$FAILNAME/ignore-gfp-wait
174
175blacklist()
176{
177 echo $BLACKLIST | grep $1 > /dev/null 2>&1
178}
179
180oops()
181{
182 dmesg | grep BUG > /dev/null 2>&1
183}
184
185find /lib/modules/`uname -r` -name '*.ko' -exec basename {} .ko \; |
186 while read i
187 do
188 oops && exit 1
189
190 if ! blacklist $i
191 then
192 echo inserting $i...
193 bash $FAILCMD modprobe $i
194 fi
195 done
196
197lsmod | awk '{ if ($3 == 0) { print $1 } }' |
198 while read i
199 do
200 oops && exit 1
201
202 if ! blacklist $i
203 then
204 echo removing $i...
205 bash $FAILCMD modprobe -r $i
206 fi
207 done
208
209------------------------------------------------------------------------------
210
211o inject slab allocation failures only for a specific module
212
213------------------------------------------------------------------------------
214#!/bin/bash
215
216FAILMOD=Documentation/fault-injection/failmodule.sh
217
218echo injecting errors into the module $1...
219
220modprobe $1
221bash $FAILMOD failslab $1 10
222echo 25 > /debug/failslab/probability
223
224------------------------------------------------------------------------------
225
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 7ebca0775ec1..64ce44da5936 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -30,11 +30,39 @@ Who: Adrian Bunk <bunk@stusta.de>
30--------------------------- 30---------------------------
31 31
32What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN 32What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
33When: November 2006 33When: June 2007
34Why: Deprecated in favour of the new ioctl-based rawiso interface, which is 34Why: Deprecated in favour of the more efficient and robust rawiso interface.
35 more efficient. You should really be using libraw1394 for raw1394 35 Affected are applications which use the deprecated part of libraw1394
36 access anyway. 36 (raw1394_iso_write, raw1394_start_iso_write, raw1394_start_iso_rcv,
37Who: Jody McIntyre <scjody@modernduck.com> 37 raw1394_stop_iso_rcv) or bypass libraw1394.
38Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
39
40---------------------------
41
42What: dv1394 driver (CONFIG_IEEE1394_DV1394)
43When: June 2007
44Why: Replaced by raw1394 + userspace libraries, notably libiec61883. This
45 shift of application support has been indicated on www.linux1394.org
46 and developers' mailinglists for quite some time. Major applications
47 have been converted, with the exception of ffmpeg and hence xine.
48 Piped output of dvgrab2 is a partial equivalent to dv1394.
49Who: Dan Dennedy <dan@dennedy.org>, Stefan Richter <stefanr@s5r6.in-berlin.de>
50
51---------------------------
52
53What: ieee1394 core's unused exports (CONFIG_IEEE1394_EXPORT_FULL_API)
54When: January 2007
55Why: There are no projects known to use these exported symbols, except
56 dfg1394 (uses one symbol whose functionality is core-internal now).
57Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
58
59---------------------------
60
61What: ieee1394's *_oui sysfs attributes (CONFIG_IEEE1394_OUI_DB)
62When: January 2007
63Files: drivers/ieee1394/: oui.db, oui2c.sh
64Why: big size, little value
65Who: Stefan Richter <stefanr@s5r6.in-berlin.de>
38 66
39--------------------------- 67---------------------------
40 68
@@ -53,18 +81,6 @@ Who: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
53 81
54--------------------------- 82---------------------------
55 83
56What: sys_sysctl
57When: January 2007
58Why: The same information is available through /proc/sys and that is the
59 interface user space prefers to use. And there do not appear to be
60 any existing user in user space of sys_sysctl. The additional
61 maintenance overhead of keeping a set of binary names gets
62 in the way of doing a good job of maintaining this interface.
63
64Who: Eric Biederman <ebiederm@xmission.com>
65
66---------------------------
67
68What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) 84What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
69When: November 2005 85When: November 2005
70Files: drivers/pcmcia/: pcmcia_ioctl.c 86Files: drivers/pcmcia/: pcmcia_ioctl.c
@@ -82,18 +98,6 @@ Who: Dominik Brodowski <linux@brodo.de>
82 98
83--------------------------- 99---------------------------
84 100
85What: ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue)
86When: December 2005
87Why: This interface has been obsoleted by the new layer3-independent
88 "nfnetlink_queue". The Kernel interface is compatible, so the old
89 ip[6]tables "QUEUE" targets still work and will transparently handle
90 all packets into nfnetlink queue number 0. Userspace users will have
91 to link against API-compatible library on top of libnfnetlink_queue
92 instead of the current 'libipq'.
93Who: Harald Welte <laforge@netfilter.org>
94
95---------------------------
96
97What: remove EXPORT_SYMBOL(kernel_thread) 101What: remove EXPORT_SYMBOL(kernel_thread)
98When: August 2006 102When: August 2006
99Files: arch/*/kernel/*_ksyms.c 103Files: arch/*/kernel/*_ksyms.c
@@ -212,17 +216,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
212 216
213--------------------------- 217---------------------------
214 218
215What: i2c-ite and i2c-algo-ite drivers
216When: September 2006
217Why: These drivers never compiled since they were added to the kernel
218 tree 5 years ago. This feature removal can be reevaluated if
219 someone shows interest in the drivers, fixes them and takes over
220 maintenance.
221 http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448
222Who: Jean Delvare <khali@linux-fr.org>
223
224---------------------------
225
226What: Bridge netfilter deferred IPv4/IPv6 output hook calling 219What: Bridge netfilter deferred IPv4/IPv6 output hook calling
227When: January 2007 220When: January 2007
228Why: The deferred output hooks are a layering violation causing unusual 221Why: The deferred output hooks are a layering violation causing unusual
@@ -239,23 +232,8 @@ Who: Patrick McHardy <kaber@trash.net>
239 232
240--------------------------- 233---------------------------
241 234
242What: frame diverter
243When: November 2006
244Why: The frame diverter is included in most distribution kernels, but is
245 broken. It does not correctly handle many things:
246 - IPV6
247 - non-linear skb's
248 - network device RCU on removal
249 - input frames not correctly checked for protocol errors
250 It also adds allocation overhead even if not enabled.
251 It is not clear if anyone is still using it.
252Who: Stephen Hemminger <shemminger@osdl.org>
253
254---------------------------
255
256
257What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment 235What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment
258When: Oktober 2008 236When: October 2008
259Why: The stacking of class devices makes these values misleading and 237Why: The stacking of class devices makes these values misleading and
260 inconsistent. 238 inconsistent.
261 Class devices should not carry any of these properties, and bus 239 Class devices should not carry any of these properties, and bus
@@ -273,11 +251,12 @@ Who: Jean Delvare <khali@linux-fr.org>
273 251
274--------------------------- 252---------------------------
275 253
276What: ftape 254What: IPv4 only connection tracking/NAT/helpers
277When: 2.6.20 255When: 2.6.22
278Why: Orphaned for ages. SMP bugs long unfixed. Few users left 256Why: The new layer 3 independant connection tracking replaces the old
279 in the world. 257 IPv4 only version. After some stabilization of the new code the
280Who: Jeff Garzik <jeff@garzik.org> 258 old one will be removed.
259Who: Patrick McHardy <kaber@trash.net>
281 260
282--------------------------- 261---------------------------
283 262
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index eb1a6cad21e6..790ef6fbe495 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -124,7 +124,7 @@ sync_fs: no no read
124write_super_lockfs: ? 124write_super_lockfs: ?
125unlockfs: ? 125unlockfs: ?
126statfs: no no no 126statfs: no no no
127remount_fs: no yes maybe (see below) 127remount_fs: yes yes maybe (see below)
128clear_inode: no 128clear_inode: no
129umount_begin: yes no no 129umount_begin: yes no no
130show_options: no (vfsmount->sem) 130show_options: no (vfsmount->sem)
diff --git a/Documentation/filesystems/adfs.txt b/Documentation/filesystems/adfs.txt
index 060abb0c7004..9e8811f92b84 100644
--- a/Documentation/filesystems/adfs.txt
+++ b/Documentation/filesystems/adfs.txt
@@ -3,7 +3,7 @@ Mount options for ADFS
3 3
4 uid=nnn All files in the partition will be owned by 4 uid=nnn All files in the partition will be owned by
5 user id nnn. Default 0 (root). 5 user id nnn. Default 0 (root).
6 gid=nnn All files in the partition willbe in group 6 gid=nnn All files in the partition will be in group
7 nnn. Default 0 (root). 7 nnn. Default 0 (root).
8 ownmask=nnn The permission mask for ADFS 'owner' permissions 8 ownmask=nnn The permission mask for ADFS 'owner' permissions
9 will be nnn. Default 0700. 9 will be nnn. Default 0700.
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt
index c3a7afb5eabf..b34cdb50eab4 100644
--- a/Documentation/filesystems/configfs/configfs.txt
+++ b/Documentation/filesystems/configfs/configfs.txt
@@ -209,7 +209,7 @@ will happen for write(2).
209 209
210[struct config_group] 210[struct config_group]
211 211
212A config_item cannot live in a vaccum. The only way one can be created 212A config_item cannot live in a vacuum. The only way one can be created
213is via mkdir(2) on a config_group. This will trigger creation of a 213is via mkdir(2) on a config_group. This will trigger creation of a
214child item. 214child item.
215 215
@@ -275,7 +275,7 @@ directory is not empty.
275 275
276[struct configfs_subsystem] 276[struct configfs_subsystem]
277 277
278A subsystem must register itself, ususally at module_init time. This 278A subsystem must register itself, usually at module_init time. This
279tells configfs to make the subsystem appear in the file tree. 279tells configfs to make the subsystem appear in the file tree.
280 280
281 struct configfs_subsystem { 281 struct configfs_subsystem {
diff --git a/Documentation/filesystems/fuse.txt b/Documentation/filesystems/fuse.txt
index a584f05403a4..345392c4caeb 100644
--- a/Documentation/filesystems/fuse.txt
+++ b/Documentation/filesystems/fuse.txt
@@ -51,6 +51,22 @@ homepage:
51 51
52 http://fuse.sourceforge.net/ 52 http://fuse.sourceforge.net/
53 53
54Filesystem type
55~~~~~~~~~~~~~~~
56
57The filesystem type given to mount(2) can be one of the following:
58
59'fuse'
60
61 This is the usual way to mount a FUSE filesystem. The first
62 argument of the mount system call may contain an arbitrary string,
63 which is not interpreted by the kernel.
64
65'fuseblk'
66
67 The filesystem is block device based. The first argument of the
68 mount system call is interpreted as the name of the device.
69
54Mount options 70Mount options
55~~~~~~~~~~~~~ 71~~~~~~~~~~~~~
56 72
@@ -94,6 +110,11 @@ Mount options
94 The default is infinite. Note that the size of read requests is 110 The default is infinite. Note that the size of read requests is
95 limited anyway to 32 pages (which is 128kbyte on i386). 111 limited anyway to 32 pages (which is 128kbyte on i386).
96 112
113'blksize=N'
114
115 Set the block size for the filesystem. The default is 512. This
116 option is only valid for 'fuseblk' type mounts.
117
97Control filesystem 118Control filesystem
98~~~~~~~~~~~~~~~~~~ 119~~~~~~~~~~~~~~~~~~
99 120
@@ -111,7 +132,7 @@ For each connection the following files exist within this directory:
111 132
112 'waiting' 133 'waiting'
113 134
114 The number of requests which are waiting to be transfered to 135 The number of requests which are waiting to be transferred to
115 userspace or being processed by the filesystem daemon. If there is 136 userspace or being processed by the filesystem daemon. If there is
116 no filesystem activity and 'waiting' is non-zero, then the 137 no filesystem activity and 'waiting' is non-zero, then the
117 filesystem is hung or deadlocked. 138 filesystem is hung or deadlocked.
@@ -136,7 +157,7 @@ following will happen:
136 157
137 2) If the request is not yet sent to userspace AND the signal is not 158 2) If the request is not yet sent to userspace AND the signal is not
138 fatal, then an 'interrupted' flag is set for the request. When 159 fatal, then an 'interrupted' flag is set for the request. When
139 the request has been successfully transfered to userspace and 160 the request has been successfully transferred to userspace and
140 this flag is set, an INTERRUPT request is queued. 161 this flag is set, an INTERRUPT request is queued.
141 162
142 3) If the request is already sent to userspace, then an INTERRUPT 163 3) If the request is already sent to userspace, then an INTERRUPT
diff --git a/Documentation/filesystems/hpfs.txt b/Documentation/filesystems/hpfs.txt
index 33dc360c8e89..38aba03efc5e 100644
--- a/Documentation/filesystems/hpfs.txt
+++ b/Documentation/filesystems/hpfs.txt
@@ -274,7 +274,7 @@ History
274 Fixed race-condition in buffer code - it is in all filesystems in Linux; 274 Fixed race-condition in buffer code - it is in all filesystems in Linux;
275 when reading device (cat /dev/hda) while creating files on it, files 275 when reading device (cat /dev/hda) while creating files on it, files
276 could be damaged 276 could be damaged
2772.02 Woraround for bug in breada in Linux. breada could cause accesses beyond 2772.02 Workaround for bug in breada in Linux. breada could cause accesses beyond
278 end of partition 278 end of partition
2792.03 Char, block devices and pipes are correctly created 2792.03 Char, block devices and pipes are correctly created
280 Fixed non-crashing race in unlink (Alexander Viro) 280 Fixed non-crashing race in unlink (Alexander Viro)
diff --git a/Documentation/filesystems/ntfs.txt b/Documentation/filesystems/ntfs.txt
index 35f105b29e3e..13ba649bda75 100644
--- a/Documentation/filesystems/ntfs.txt
+++ b/Documentation/filesystems/ntfs.txt
@@ -337,7 +337,7 @@ Finally, for a mirrored volume, i.e. raid level 1, the table would look like
337this (note all values are in 512-byte sectors): 337this (note all values are in 512-byte sectors):
338 338
339--- cut here --- 339--- cut here ---
340# Ofs Size Raid Log Number Region Should Number Source Start Taget Start 340# Ofs Size Raid Log Number Region Should Number Source Start Target Start
341# in of the type type of log size sync? of Device in Device in 341# in of the type type of log size sync? of Device in Device in
342# vol volume params mirrors Device Device 342# vol volume params mirrors Device Device
3430 2056320 mirror core 2 16 nosync 2 /dev/hda1 0 /dev/hdb1 0 3430 2056320 mirror core 2 16 nosync 2 /dev/hda1 0 /dev/hdb1 0
@@ -599,7 +599,7 @@ Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
599 - Major bug fixes for reading files and volumes in corner cases which 599 - Major bug fixes for reading files and volumes in corner cases which
600 were being hit by Windows 2k/XP users. 600 were being hit by Windows 2k/XP users.
6012.1.2: 6012.1.2:
602 - Major bug fixes aleviating the hangs in statfs experienced by some 602 - Major bug fixes alleviating the hangs in statfs experienced by some
603 users. 603 users.
6042.1.1: 6042.1.1:
605 - Update handling of compressed files so people no longer get the 605 - Update handling of compressed files so people no longer get the
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt
index 4389c684a80a..8ccf0c1b58ed 100644
--- a/Documentation/filesystems/ocfs2.txt
+++ b/Documentation/filesystems/ocfs2.txt
@@ -30,7 +30,7 @@ Caveats
30Features which OCFS2 does not support yet: 30Features which OCFS2 does not support yet:
31 - sparse files 31 - sparse files
32 - extended attributes 32 - extended attributes
33 - shared writeable mmap 33 - shared writable mmap
34 - loopback is supported, but data written will not 34 - loopback is supported, but data written will not
35 be cluster coherent. 35 be cluster coherent.
36 - quotas 36 - quotas
@@ -54,3 +54,6 @@ errors=panic Panic and halt the machine if an error occurs.
54intr (*) Allow signals to interrupt cluster operations. 54intr (*) Allow signals to interrupt cluster operations.
55nointr Do not allow signals to interrupt cluster 55nointr Do not allow signals to interrupt cluster
56 operations. 56 operations.
57atime_quantum=60(*) OCFS2 will not update atime unless this number
58 of seconds has passed since the last update.
59 Set to zero to always update atime.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 3355e6920105..72af5de1effb 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -1220,9 +1220,9 @@ applications are using mlock(), or if you are running with no swap then
1220you probably should increase the lower_zone_protection setting. 1220you probably should increase the lower_zone_protection setting.
1221 1221
1222The units of this tunable are fairly vague. It is approximately equal 1222The units of this tunable are fairly vague. It is approximately equal
1223to "megabytes". So setting lower_zone_protection=100 will protect around 100 1223to "megabytes," so setting lower_zone_protection=100 will protect around 100
1224megabytes of the lowmem zone from user allocations. It will also make 1224megabytes of the lowmem zone from user allocations. It will also make
1225those 100 megabytes unavaliable for use by applications and by 1225those 100 megabytes unavailable for use by applications and by
1226pagecache, so there is a cost. 1226pagecache, so there is a cost.
1227 1227
1228The effects of this tunable may be observed by monitoring 1228The effects of this tunable may be observed by monitoring
@@ -1538,10 +1538,10 @@ TCP settings
1538tcp_ecn 1538tcp_ecn
1539------- 1539-------
1540 1540
1541This file controls the use of the ECN bit in the IPv4 headers, this is a new 1541This file controls the use of the ECN bit in the IPv4 headers. This is a new
1542feature about Explicit Congestion Notification, but some routers and firewalls 1542feature about Explicit Congestion Notification, but some routers and firewalls
1543block trafic that has this bit set, so it could be necessary to echo 0 to 1543block traffic that has this bit set, so it could be necessary to echo 0 to
1544/proc/sys/net/ipv4/tcp_ecn, if you want to talk to this sites. For more info 1544/proc/sys/net/ipv4/tcp_ecn if you want to talk to these sites. For more info
1545you could read RFC2481. 1545you could read RFC2481.
1546 1546
1547tcp_retrans_collapse 1547tcp_retrans_collapse
diff --git a/Documentation/filesystems/spufs.txt b/Documentation/filesystems/spufs.txt
index 982645a1981d..1343d118a9b2 100644
--- a/Documentation/filesystems/spufs.txt
+++ b/Documentation/filesystems/spufs.txt
@@ -210,7 +210,7 @@ FILES
210 /signal2 210 /signal2
211 The two signal notification channels of an SPU. These are read-write 211 The two signal notification channels of an SPU. These are read-write
212 files that operate on a 32 bit word. Writing to one of these files 212 files that operate on a 32 bit word. Writing to one of these files
213 triggers an interrupt on the SPU. The value writting to the signal 213 triggers an interrupt on the SPU. The value written to the signal
214 files can be read from the SPU through a channel read or from host user 214 files can be read from the SPU through a channel read or from host user
215 space through the file. After the value has been read by the SPU, it 215 space through the file. After the value has been read by the SPU, it
216 is reset to zero. The possible operations on an open signal1 or sig- 216 is reset to zero. The possible operations on an open signal1 or sig-
diff --git a/Documentation/filesystems/sysv-fs.txt b/Documentation/filesystems/sysv-fs.txt
index d81722418010..253b50d1328e 100644
--- a/Documentation/filesystems/sysv-fs.txt
+++ b/Documentation/filesystems/sysv-fs.txt
@@ -1,11 +1,8 @@
1This is the implementation of the SystemV/Coherent filesystem for Linux.
2It implements all of 1It implements all of
3 - Xenix FS, 2 - Xenix FS,
4 - SystemV/386 FS, 3 - SystemV/386 FS,
5 - Coherent FS. 4 - Coherent FS.
6 5
7This is version beta 4.
8
9To install: 6To install:
10* Answer the 'System V and Coherent filesystem support' question with 'y' 7* Answer the 'System V and Coherent filesystem support' question with 'y'
11 when configuring the kernel. 8 when configuring the kernel.
@@ -28,11 +25,173 @@ Bugs in the present implementation:
28 for this FS on hard disk yet. 25 for this FS on hard disk yet.
29 26
30 27
31Please report any bugs and suggestions to 28These filesystems are rather similar. Here is a comparison with Minix FS:
32 Bruno Haible <haible@ma2s2.mathematik.uni-karlsruhe.de> 29
33 Pascal Haible <haible@izfm.uni-stuttgart.de> 30* Linux fdisk reports on partitions
34 Krzysztof G. Baranowski <kgb@manjak.knm.org.pl> 31 - Minix FS 0x81 Linux/Minix
32 - Xenix FS ??
33 - SystemV FS ??
34 - Coherent FS 0x08 AIX bootable
35
36* Size of a block or zone (data allocation unit on disk)
37 - Minix FS 1024
38 - Xenix FS 1024 (also 512 ??)
39 - SystemV FS 1024 (also 512 and 2048)
40 - Coherent FS 512
41
42* General layout: all have one boot block, one super block and
43 separate areas for inodes and for directories/data.
44 On SystemV Release 2 FS (e.g. Microport) the first track is reserved and
45 all the block numbers (including the super block) are offset by one track.
46
47* Byte ordering of "short" (16 bit entities) on disk:
48 - Minix FS little endian 0 1
49 - Xenix FS little endian 0 1
50 - SystemV FS little endian 0 1
51 - Coherent FS little endian 0 1
52 Of course, this affects only the file system, not the data of files on it!
53
54* Byte ordering of "long" (32 bit entities) on disk:
55 - Minix FS little endian 0 1 2 3
56 - Xenix FS little endian 0 1 2 3
57 - SystemV FS little endian 0 1 2 3
58 - Coherent FS PDP-11 2 3 0 1
59 Of course, this affects only the file system, not the data of files on it!
60
61* Inode on disk: "short", 0 means non-existent, the root dir ino is:
62 - Minix FS 1
63 - Xenix FS, SystemV FS, Coherent FS 2
64
65* Maximum number of hard links to a file:
66 - Minix FS 250
67 - Xenix FS ??
68 - SystemV FS ??
69 - Coherent FS >=10000
70
71* Free inode management:
72 - Minix FS a bitmap
73 - Xenix FS, SystemV FS, Coherent FS
74 There is a cache of a certain number of free inodes in the super-block.
75 When it is exhausted, new free inodes are found using a linear search.
76
77* Free block management:
78 - Minix FS a bitmap
79 - Xenix FS, SystemV FS, Coherent FS
80 Free blocks are organized in a "free list". Maybe a misleading term,
81 since it is not true that every free block contains a pointer to
82 the next free block. Rather, the free blocks are organized in chunks
83 of limited size, and every now and then a free block contains pointers
84 to the free blocks pertaining to the next chunk; the first of these
85 contains pointers and so on. The list terminates with a "block number"
86 0 on Xenix FS and SystemV FS, with a block zeroed out on Coherent FS.
87
88* Super-block location:
89 - Minix FS block 1 = bytes 1024..2047
90 - Xenix FS block 1 = bytes 1024..2047
91 - SystemV FS bytes 512..1023
92 - Coherent FS block 1 = bytes 512..1023
93
94* Super-block layout:
95 - Minix FS
96 unsigned short s_ninodes;
97 unsigned short s_nzones;
98 unsigned short s_imap_blocks;
99 unsigned short s_zmap_blocks;
100 unsigned short s_firstdatazone;
101 unsigned short s_log_zone_size;
102 unsigned long s_max_size;
103 unsigned short s_magic;
104 - Xenix FS, SystemV FS, Coherent FS
105 unsigned short s_firstdatazone;
106 unsigned long s_nzones;
107 unsigned short s_fzone_count;
108 unsigned long s_fzones[NICFREE];
109 unsigned short s_finode_count;
110 unsigned short s_finodes[NICINOD];
111 char s_flock;
112 char s_ilock;
113 char s_modified;
114 char s_rdonly;
115 unsigned long s_time;
116 short s_dinfo[4]; -- SystemV FS only
117 unsigned long s_free_zones;
118 unsigned short s_free_inodes;
119 short s_dinfo[4]; -- Xenix FS only
120 unsigned short s_interleave_m,s_interleave_n; -- Coherent FS only
121 char s_fname[6];
122 char s_fpack[6];
123 then they differ considerably:
124 Xenix FS
125 char s_clean;
126 char s_fill[371];
127 long s_magic;
128 long s_type;
129 SystemV FS
130 long s_fill[12 or 14];
131 long s_state;
132 long s_magic;
133 long s_type;
134 Coherent FS
135 unsigned long s_unique;
136 Note that Coherent FS has no magic.
137
138* Inode layout:
139 - Minix FS
140 unsigned short i_mode;
141 unsigned short i_uid;
142 unsigned long i_size;
143 unsigned long i_time;
144 unsigned char i_gid;
145 unsigned char i_nlinks;
146 unsigned short i_zone[7+1+1];
147 - Xenix FS, SystemV FS, Coherent FS
148 unsigned short i_mode;
149 unsigned short i_nlink;
150 unsigned short i_uid;
151 unsigned short i_gid;
152 unsigned long i_size;
153 unsigned char i_zone[3*(10+1+1+1)];
154 unsigned long i_atime;
155 unsigned long i_mtime;
156 unsigned long i_ctime;
157
158* Regular file data blocks are organized as
159 - Minix FS
160 7 direct blocks
161 1 indirect block (pointers to blocks)
162 1 double-indirect block (pointer to pointers to blocks)
163 - Xenix FS, SystemV FS, Coherent FS
164 10 direct blocks
165 1 indirect block (pointers to blocks)
166 1 double-indirect block (pointer to pointers to blocks)
167 1 triple-indirect block (pointer to pointers to pointers to blocks)
168
169* Inode size, inodes per block
170 - Minix FS 32 32
171 - Xenix FS 64 16
172 - SystemV FS 64 16
173 - Coherent FS 64 8
174
175* Directory entry on disk
176 - Minix FS
177 unsigned short inode;
178 char name[14/30];
179 - Xenix FS, SystemV FS, Coherent FS
180 unsigned short inode;
181 char name[14];
182
183* Dir entry size, dir entries per block
184 - Minix FS 16/32 64/32
185 - Xenix FS 16 64
186 - SystemV FS 16 64
187 - Coherent FS 16 32
188
189* How to implement symbolic links such that the host fsck doesn't scream:
190 - Minix FS normal
191 - Xenix FS kludge: as regular files with chmod 1000
192 - SystemV FS ??
193 - Coherent FS kludge: as regular files with chmod 1000
35 194
36Bruno Haible
37<haible@ma2s2.mathematik.uni-karlsruhe.de>
38 195
196Notation: We often speak of a "block" but mean a zone (the allocation unit)
197and not the disk driver's notion of "block".
diff --git a/Documentation/filesystems/udf.txt b/Documentation/filesystems/udf.txt
index 511b4230c053..fde829a756e6 100644
--- a/Documentation/filesystems/udf.txt
+++ b/Documentation/filesystems/udf.txt
@@ -7,8 +7,17 @@ If you encounter problems with reading UDF discs using this driver,
7please report them to linux_udf@hpesjro.fc.hp.com, which is the 7please report them to linux_udf@hpesjro.fc.hp.com, which is the
8developer's list. 8developer's list.
9 9
10Write support requires a block driver which supports writing. The current 10Write support requires a block driver which supports writing. Currently
11scsi and ide cdrom drivers do not support writing. 11dvd+rw drives and media support true random sector writes, and so a udf
12filesystem on such devices can be directly mounted read/write. CD-RW
13media however, does not support this. Instead the media can be formatted
14for packet mode using the utility cdrwtool, then the pktcdvd driver can
15be bound to the underlying cd device to provide the required buffering
16and read-modify-write cycles to allow the filesystem random sector writes
17while providing the hardware with only full packet writes. While not
18required for dvd+rw media, use of the pktcdvd driver often enhances
19performance due to very poor read-modify-write support supplied internally
20by drive firmware.
12 21
13------------------------------------------------------------------------------- 22-------------------------------------------------------------------------------
14The following mount options are supported: 23The following mount options are supported:
diff --git a/Documentation/ftape.txt b/Documentation/ftape.txt
deleted file mode 100644
index 7d8bb3384031..000000000000
--- a/Documentation/ftape.txt
+++ /dev/null
@@ -1,307 +0,0 @@
1Intro
2=====
3
4This file describes some issues involved when using the "ftape"
5floppy tape device driver that comes with the Linux kernel.
6
7ftape has a home page at
8
9http://ftape.dot-heine.de/
10
11which contains further information about ftape. Please cross check
12this WWW address against the address given (if any) in the MAINTAINERS
13file located in the top level directory of the Linux kernel source
14tree.
15
16NOTE: This is an unmaintained set of drivers, and it is not guaranteed to work.
17If you are interested in taking over maintenance, contact Claus-Justus Heine
18<ch@dot-heine.de>, the former maintainer.
19
20Contents
21========
22
23A minus 1: Ftape documentation
24
25A. Changes
26 1. Goal
27 2. I/O Block Size
28 3. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
29 4. Formatting
30 5. Interchanging cartridges with other operating systems
31
32B. Debugging Output
33 1. Introduction
34 2. Tuning the debugging output
35
36C. Boot and load time configuration
37 1. Setting boot time parameters
38 2. Module load time parameters
39 3. Ftape boot- and load time options
40 4. Example kernel parameter setting
41 5. Example module parameter setting
42
43D. Support and contacts
44
45*******************************************************************************
46
47A minus 1. Ftape documentation
48==============================
49
50Unluckily, the ftape-HOWTO is out of date. This really needs to be
51changed. Up to date documentation as well as recent development
52versions of ftape and useful links to related topics can be found at
53the ftape home page at
54
55http://ftape.dot-heine.de/
56
57*******************************************************************************
58
59A. Changes
60==========
61
621. Goal
63 ~~~~
64 The goal of all that incompatibilities was to give ftape an interface
65 that resembles the interface provided by SCSI tape drives as close
66 as possible. Thus any Unix backup program that is known to work
67 with SCSI tape drives should also work.
68
69 The concept of a fixed block size for read/write transfers is
70 rather unrelated to this SCSI tape compatibility at the file system
71 interface level. It developed out of a feature of zftape, a
72 block wise user transparent on-the-fly compression. That compression
73 support will not be dropped in future releases for compatibility
74 reasons with previous releases of zftape.
75
762. I/O Block Size
77 ~~~~~~~~~~~~~~
78 The block size defaults to 10k which is the default block size of
79 GNU tar.
80
81 The block size can be tuned either during kernel configuration or
82 at runtime with the MTIOCTOP ioctl using the MTSETBLK operation
83 (i.e. do "mt -f /dev/qft0" setblk #BLKSZ). A block size of 0
84 switches to variable block size mode i.e. "mt setblk 0" switches
85 off the block size restriction. However, this disables zftape's
86 built in on-the-fly compression which doesn't work with variable
87 block size mode.
88
89 The BLKSZ parameter must be given as a byte count and must be a
90 multiple of 32k or 0, i.e. use "mt setblk 32768" to switch to a
91 block size of 32k.
92
93 The typical symptom of a block size mismatch is an "invalid
94 argument" error message.
95
963. Write Access when not at EOD (End Of Data) or BOT (Begin Of Tape)
97 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 zftape (the file system interface of ftape-3.x) denies write access
99 to the tape cartridge when it isn't positioned either at BOT or
100 EOD.
101
1024. Formatting
103 ~~~~~~~~~~
104 ftape DOES support formatting of floppy tape cartridges. You need the
105 `ftformat' program that is shipped with the modules version of ftape.
106 Please get the latest version of ftape from
107
108 ftp://sunsite.unc.edu/pub/Linux/kernel/tapes
109
110 or from the ftape home page at
111
112 http://ftape.dot-heine.de/
113
114 `ftformat' is contained in the `./contrib/' subdirectory of that
115 separate ftape package.
116
1175. Interchanging cartridges with other operating systems
118 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119
120 The internal emulation of Unix tape device file marks has changed
121 completely. ftape now uses the volume table segment as specified
122 by the QIC-40/80/3010/3020/113 standards to emulate file marks. As
123 a consequence there is limited support to interchange cartridges
124 with other operating systems.
125
126 To be more precise: ftape will detect volumes written by other OS's
127 programs and other OS's programs will detect volumes written by
128 ftape.
129
130 However, it isn't possible to extract the data dumped to the tape
131 by some MSDOS program with ftape. This exceeds the scope of a
132 kernel device driver. If you need such functionality, then go ahead
133 and write a user space utility that is able to do that. ftape already
134 provides all kernel level support necessary to do that.
135
136*******************************************************************************
137
138B. Debugging Output
139 ================
140
1411. Introduction
142 ~~~~~~~~~~~~
143 The ftape driver can be very noisy in that is can print lots of
144 debugging messages to the kernel log files and the system console.
145 While this is useful for debugging it might be annoying during
146 normal use and enlarges the size of the driver by several kilobytes.
147
148 To reduce the size of the driver you can trim the maximal amount of
149 debugging information available during kernel configuration. Please
150 refer to the kernel configuration script and its on-line help
151 functionality.
152
153 The amount of debugging output maps to the "tracing" boot time
154 option and the "ft_tracing" modules option as follows:
155
156 0 bugs
157 1 + errors (with call-stack dump)
158 2 + warnings
159 3 + information
160 4 + more information
161 5 + program flow
162 6 + fdc/dma info
163 7 + data flow
164 8 + everything else
165
1662. Tuning the debugging output
167 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
168 To reduce the amount of debugging output printed to the system
169 console you can
170
171 i) trim the debugging output at run-time with
172
173 mt -f /dev/nqft0 setdensity #DBGLVL
174
175 where "#DBGLVL" is a number between 0 and 9
176
177 ii) trim the debugging output at module load time with
178
179 modprobe ftape ft_tracing=#DBGLVL
180
181 Of course, this applies only if you have configured ftape to be
182 compiled as a module.
183
184 iii) trim the debugging output during system boot time. Add the
185 following to the kernel command line:
186
187 ftape=#DBGLVL,tracing
188
189 Please refer also to the next section if you don't know how to
190 set boot time parameters.
191
192*******************************************************************************
193
194C. Boot and load time configuration
195 ================================
196
1971. Setting boot time parameters
198 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199 Assuming that you use lilo, the LI)nux LO)ader, boot time kernel
200 parameters can be set by adding a line
201
202 append some_kernel_boot_time_parameter
203
204 to `/etc/lilo.conf' or at real boot time by typing in the options
205 at the prompt provided by LILO. I can't give you advice on how to
206 specify those parameters with other loaders as I don't use them.
207
208 For ftape, each "some_kernel_boot_time_parameter" looks like
209 "ftape=value,option". As an example, the debugging output can be
210 increased with
211
212 ftape=4,tracing
213
214 NOTE: the value precedes the option name.
215
2162. Module load time parameters
217 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
218 Module parameters can be specified either directly when invoking
219 the program 'modprobe' at the shell prompt:
220
221 modprobe ftape ft_tracing=4
222
223 or by editing the file `/etc/modprobe.conf' in which case they take
224 effect each time when the module is loaded with `modprobe' (please
225 refer to the respective manual pages). Thus, you should add a line
226
227 options ftape ft_tracing=4
228
229 to `/etc/modprobe.conf` if you intend to increase the debugging
230 output of the driver.
231
232
2333. Ftape boot- and load time options
234 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
235
236 i. Controlling the amount of debugging output
237 DBGLVL has to be replaced by a number between 0 and 8.
238
239 module | kernel command line
240 -----------------------|----------------------
241 ft_tracing=DBGLVL | ftape=DBGLVL,tracing
242
243 ii. Hardware setup
244 BASE is the base address of your floppy disk controller,
245 IRQ and DMA give its interrupt and DMA channel, respectively.
246 BOOL is an integer, "0" means "no"; any other value means
247 "yes". You don't need to specify anything if connecting your tape
248 drive to the standard floppy disk controller. All of these
249 values have reasonable defaults. The defaults can be modified
250 during kernel configuration, i.e. while running "make config",
251 "make menuconfig" or "make xconfig" in the top level directory
252 of the Linux kernel source tree. Please refer also to the on
253 line documentation provided during that kernel configuration
254 process.
255
256 ft_probe_fc10 is set to a non-zero value if you wish for ftape to
257 probe for a Colorado FC-10 or FC-20 controller.
258
259 ft_mach2 is set to a non-zero value if you wish for ftape to probe
260 for a Mountain MACH-2 controller.
261
262 module | kernel command line
263 -----------------------|----------------------
264 ft_fdc_base=BASE | ftape=BASE,ioport
265 ft_fdc_irq=IRQ | ftape=IRQ,irq
266 ft_fdc_dma=DMA | ftape=DMA,dma
267 ft_probe_fc10=BOOL | ftape=BOOL,fc10
268 ft_mach2=BOOL | ftape=BOOL,mach2
269 ft_fdc_threshold=THR | ftape=THR,threshold
270 ft_fdc_rate_limit=RATE | ftape=RATE,datarate
271
2724. Example kernel parameter setting
273 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
274 To configure ftape to probe for a Colorado FC-10/FC-20 controller
275 and to increase the amount of debugging output a little bit, add
276 the following line to `/etc/lilo.conf':
277
278 append ftape=1,fc10 ftape=4,tracing
279
2805. Example module parameter setting
281 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282 To do the same, but with ftape compiled as a loadable kernel
283 module, add the following line to `/etc/modprobe.conf':
284
285 options ftape ft_probe_fc10=1 ft_tracing=4
286
287*******************************************************************************
288
289D. Support and contacts
290 ====================
291
292 Ftape is distributed under the GNU General Public License. There is
293 absolutely no warranty for this software. However, you can reach
294 the current maintainer of the ftape package under the email address
295 given in the MAINTAINERS file which is located in the top level
296 directory of the Linux kernel source tree. There you'll find also
297 the relevant mailing list to use as a discussion forum and the web
298 page to query for the most recent documentation, related work and
299 development versions of ftape.
300
301 Changelog:
302 ==========
303
304~1996: Original Document
305
30610-24-2004: General cleanup and updating, noting additional module options.
307 James Nelson <james4765@gmail.com>
diff --git a/Documentation/fujitsu/frv/gdbstub.txt b/Documentation/fujitsu/frv/gdbstub.txt
index 6ce5aa9abbc5..9304fb36ae8a 100644
--- a/Documentation/fujitsu/frv/gdbstub.txt
+++ b/Documentation/fujitsu/frv/gdbstub.txt
@@ -59,7 +59,7 @@ the following things on the "Kernel Hacking" tab:
59Then build as usual, download to the board and execute. Note that if 59Then build as usual, download to the board and execute. Note that if
60"Immediate activation" was selected, then the kernel will wait for GDB to 60"Immediate activation" was selected, then the kernel will wait for GDB to
61attach. If not, then the kernel will boot immediately and GDB will have to 61attach. If not, then the kernel will boot immediately and GDB will have to
62interupt it or wait for an exception to occur if before doing anything with 62interrupt it or wait for an exception to occur before doing anything with
63the kernel. 63the kernel.
64 64
65 65
diff --git a/Documentation/fujitsu/frv/kernel-ABI.txt b/Documentation/fujitsu/frv/kernel-ABI.txt
index 8b0a5fc8bfd9..aaa1cec86f0b 100644
--- a/Documentation/fujitsu/frv/kernel-ABI.txt
+++ b/Documentation/fujitsu/frv/kernel-ABI.txt
@@ -156,7 +156,7 @@ with the main kernel in this regard. Hence the debug mode code (gdbstub) is
156almost completely self-contained. The only external code used is the 156almost completely self-contained. The only external code used is the
157sprintf family of functions. 157sprintf family of functions.
158 158
159Futhermore, break.S is so complicated because single-step mode does not 159Furthermore, break.S is so complicated because single-step mode does not
160switch off on entry to an exception. That means unless manually disabled, 160switch off on entry to an exception. That means unless manually disabled,
161single-stepping will blithely go on stepping into things like interrupts. 161single-stepping will blithely go on stepping into things like interrupts.
162See gdbstub.txt for more information. 162See gdbstub.txt for more information.
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240
index 35f618f32896..2c6f1fed4618 100644
--- a/Documentation/hwmon/adm9240
+++ b/Documentation/hwmon/adm9240
@@ -24,7 +24,7 @@ Authors:
24 Frodo Looijaard <frodol@dds.nl>, 24 Frodo Looijaard <frodol@dds.nl>,
25 Philip Edelbrock <phil@netroedge.com>, 25 Philip Edelbrock <phil@netroedge.com>,
26 Michiel Rook <michiel@grendelproject.nl>, 26 Michiel Rook <michiel@grendelproject.nl>,
27 Grant Coady <gcoady@gmail.com> with guidance 27 Grant Coady <gcoady.lk@gmail.com> with guidance
28 from Jean Delvare <khali@linux-fr.org> 28 from Jean Delvare <khali@linux-fr.org>
29 29
30Interface 30Interface
diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f
index 28c5b7d1eb90..2ca69df669c3 100644
--- a/Documentation/hwmon/f71805f
+++ b/Documentation/hwmon/f71805f
@@ -17,7 +17,7 @@ Thanks to Kris Chen from Fintek for answering technical questions and
17providing additional documentation. 17providing additional documentation.
18 18
19Thanks to Chris Lin from Jetway for providing wiring schematics and 19Thanks to Chris Lin from Jetway for providing wiring schematics and
20anwsering technical questions. 20answering technical questions.
21 21
22 22
23Description 23Description
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp
index bab445ab0f52..30d123b8d920 100644
--- a/Documentation/hwmon/k8temp
+++ b/Documentation/hwmon/k8temp
@@ -2,7 +2,7 @@ Kernel driver k8temp
2==================== 2====================
3 3
4Supported chips: 4Supported chips:
5 * AMD K8 CPU 5 * AMD Athlon64/FX or Opteron CPUs
6 Prefix: 'k8temp' 6 Prefix: 'k8temp'
7 Addresses scanned: PCI space 7 Addresses scanned: PCI space
8 Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf 8 Datasheet: http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32559.pdf
@@ -13,10 +13,13 @@ Contact: Rudolf Marek <r.marek@sh.cvut.cz>
13Description 13Description
14----------- 14-----------
15 15
16This driver permits reading temperature sensor(s) embedded inside AMD K8 CPUs. 16This driver permits reading temperature sensor(s) embedded inside AMD K8
17Official documentation says that it works from revision F of K8 core, but 17family CPUs (Athlon64/FX, Opteron). Official documentation says that it works
18in fact it seems to be implemented for all revisions of K8 except the first 18from revision F of K8 core, but in fact it seems to be implemented for all
19two revisions (SH-B0 and SH-B3). 19revisions of K8 except the first two revisions (SH-B0 and SH-B3).
20
21Please note that you will need at least lm-sensors 2.10.1 for proper userspace
22support.
20 23
21There can be up to four temperature sensors inside single CPU. The driver 24There can be up to four temperature sensors inside single CPU. The driver
22will auto-detect the sensors and will display only temperatures from 25will auto-detect the sensors and will display only temperatures from
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1
index c15bbe68264e..04a11124f667 100644
--- a/Documentation/hwmon/smsc47m1
+++ b/Documentation/hwmon/smsc47m1
@@ -2,12 +2,14 @@ Kernel driver smsc47m1
2====================== 2======================
3 3
4Supported chips: 4Supported chips:
5 * SMSC LPC47B27x, LPC47M10x, LPC47M13x, LPC47M14x, LPC47M15x and LPC47M192 5 * SMSC LPC47B27x, LPC47M112, LPC47M10x, LPC47M13x, LPC47M14x,
6 LPC47M15x and LPC47M192
6 Addresses scanned: none, address read from Super I/O config space 7 Addresses scanned: none, address read from Super I/O config space
7 Prefix: 'smsc47m1' 8 Prefix: 'smsc47m1'
8 Datasheets: 9 Datasheets:
9 http://www.smsc.com/main/datasheets/47b27x.pdf 10 http://www.smsc.com/main/datasheets/47b27x.pdf
10 http://www.smsc.com/main/datasheets/47m10x.pdf 11 http://www.smsc.com/main/datasheets/47m10x.pdf
12 http://www.smsc.com/main/datasheets/47m112.pdf
11 http://www.smsc.com/main/tools/discontinued/47m13x.pdf 13 http://www.smsc.com/main/tools/discontinued/47m13x.pdf
12 http://www.smsc.com/main/datasheets/47m14x.pdf 14 http://www.smsc.com/main/datasheets/47m14x.pdf
13 http://www.smsc.com/main/tools/discontinued/47m15x.pdf 15 http://www.smsc.com/main/tools/discontinued/47m15x.pdf
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index fae3b781d82d..caa610a297e8 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -26,7 +26,7 @@ fan control mode).
26Temperatures are measured in degrees Celsius and measurement resolution is 1 26Temperatures are measured in degrees Celsius and measurement resolution is 1
27degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when 27degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
28the temperature gets higher than high limit; it stays on until the temperature 28the temperature gets higher than high limit; it stays on until the temperature
29falls below the Hysteresis value. 29falls below the hysteresis value.
30 30
31Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 31Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
32triggered if the rotation speed has dropped below a programmable limit. Fan 32triggered if the rotation speed has dropped below a programmable limit. Fan
@@ -67,9 +67,9 @@ Thermal Cruise mode
67 67
68If the temperature is in the range defined by: 68If the temperature is in the range defined by:
69 69
70pwm[1-4]_target - set target temperature, unit millidegree Celcius 70pwm[1-4]_target - set target temperature, unit millidegree Celsius
71 (range 0 - 127000) 71 (range 0 - 127000)
72pwm[1-4]_tolerance - tolerance, unit millidegree Celcius (range 0 - 15000) 72pwm[1-4]_tolerance - tolerance, unit millidegree Celsius (range 0 - 15000)
73 73
74there are no changes to fan speed. Once the temperature leaves the interval, 74there are no changes to fan speed. Once the temperature leaves the interval,
75fan speed increases (temp is higher) or decreases if lower than desired. 75fan speed increases (temp is higher) or decreases if lower than desired.
diff --git a/Documentation/i2c/busses/i2c-amd8111 b/Documentation/i2c/busses/i2c-amd8111
index db294ee7455a..460dd6635fd2 100644
--- a/Documentation/i2c/busses/i2c-amd8111
+++ b/Documentation/i2c/busses/i2c-amd8111
@@ -5,7 +5,7 @@ Supported adapters:
5 5
6Datasheets: 6Datasheets:
7 AMD datasheet not yet available, but almost everything can be found 7 AMD datasheet not yet available, but almost everything can be found
8 in publically available ACPI 2.0 specification, which the adapter 8 in the publicly available ACPI 2.0 specification, which the adapter
9 follows. 9 follows.
10 10
11Author: Vojtech Pavlik <vojtech@suse.cz> 11Author: Vojtech Pavlik <vojtech@suse.cz>
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index e46c23458242..3db69a086c41 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -9,7 +9,10 @@ Supported adapters:
9 * Intel 82801EB/ER (ICH5) (HW PEC supported, 32 byte buffer not supported) 9 * Intel 82801EB/ER (ICH5) (HW PEC supported, 32 byte buffer not supported)
10 * Intel 6300ESB 10 * Intel 6300ESB
11 * Intel 82801FB/FR/FW/FRW (ICH6) 11 * Intel 82801FB/FR/FW/FRW (ICH6)
12 * Intel ICH7 12 * Intel 82801G (ICH7)
13 * Intel 631xESB/632xESB (ESB2)
14 * Intel 82801H (ICH8)
15 * Intel ICH9
13 Datasheets: Publicly available at the Intel website 16 Datasheets: Publicly available at the Intel website
14 17
15Authors: 18Authors:
diff --git a/Documentation/i2c/busses/i2c-nforce2 b/Documentation/i2c/busses/i2c-nforce2
index cd49c428a3ab..7f61fbc03f7f 100644
--- a/Documentation/i2c/busses/i2c-nforce2
+++ b/Documentation/i2c/busses/i2c-nforce2
@@ -10,11 +10,11 @@ Supported adapters:
10 * nForce4 MCP51 10de:0264 10 * nForce4 MCP51 10de:0264
11 * nForce4 MCP55 10de:0368 11 * nForce4 MCP55 10de:0368
12 12
13Datasheet: not publically available, but seems to be similar to the 13Datasheet: not publicly available, but seems to be similar to the
14 AMD-8111 SMBus 2.0 adapter. 14 AMD-8111 SMBus 2.0 adapter.
15 15
16Authors: 16Authors:
17 Hans-Frieder Vogt <hfvogt@arcor.de>, 17 Hans-Frieder Vogt <hfvogt@gmx.net>,
18 Thomas Leibold <thomas@plx.com>, 18 Thomas Leibold <thomas@plx.com>,
19 Patrick Dreker <patrick@dreker.de> 19 Patrick Dreker <patrick@dreker.de>
20 20
@@ -38,7 +38,7 @@ Notes
38----- 38-----
39 39
40The SMBus adapter in the nForce2 chipset seems to be very similar to the 40The SMBus adapter in the nForce2 chipset seems to be very similar to the
41SMBus 2.0 adapter in the AMD-8111 southbridge. However, I could only get 41SMBus 2.0 adapter in the AMD-8111 south bridge. However, I could only get
42the driver to work with direct I/O access, which is different to the EC 42the driver to work with direct I/O access, which is different to the EC
43interface of the AMD-8111. Tested on Asus A7N8X. The ACPI DSDT table of the 43interface of the AMD-8111. Tested on Asus A7N8X. The ACPI DSDT table of the
44Asus A7N8X lists two SMBuses, both of which are supported by this driver. 44Asus A7N8X lists two SMBuses, both of which are supported by this driver.
diff --git a/Documentation/i386/boot.txt b/Documentation/i386/boot.txt
index c51314b1a463..9575de300a61 100644
--- a/Documentation/i386/boot.txt
+++ b/Documentation/i386/boot.txt
@@ -2,7 +2,7 @@
2 ---------------------------- 2 ----------------------------
3 3
4 H. Peter Anvin <hpa@zytor.com> 4 H. Peter Anvin <hpa@zytor.com>
5 Last update 2005-09-02 5 Last update 2006-11-17
6 6
7On the i386 platform, the Linux kernel uses a rather complicated boot 7On the i386 platform, the Linux kernel uses a rather complicated boot
8convention. This has evolved partially due to historical aspects, as 8convention. This has evolved partially due to historical aspects, as
@@ -35,6 +35,8 @@ Protocol 2.03: (Kernel 2.4.18-pre1) Explicitly makes the highest possible
35 initrd address available to the bootloader. 35 initrd address available to the bootloader.
36 36
37Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes. 37Protocol 2.04: (Kernel 2.6.14) Extend the syssize field to four bytes.
38Protocol 2.05: (Kernel 2.6.20) Make protected mode kernel relocatable.
39 Introduce relocatable_kernel and kernel_alignment fields.
38 40
39 41
40**** MEMORY LAYOUT 42**** MEMORY LAYOUT
@@ -129,6 +131,8 @@ Offset Proto Name Meaning
1290226/2 N/A pad1 Unused 1310226/2 N/A pad1 Unused
1300228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line 1320228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
131022C/4 2.03+ initrd_addr_max Highest legal initrd address 133022C/4 2.03+ initrd_addr_max Highest legal initrd address
1340230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
1350234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
132 136
133(1) For backwards compatibility, if the setup_sects field contains 0, the 137(1) For backwards compatibility, if the setup_sects field contains 0, the
134 real value is 4. 138 real value is 4.
diff --git a/Documentation/ide.txt b/Documentation/ide.txt
index 0bf38baa2db9..786c3a766995 100644
--- a/Documentation/ide.txt
+++ b/Documentation/ide.txt
@@ -390,5 +390,5 @@ mlord@pobox.com
390Wed Apr 17 22:52:44 CEST 2002 edited by Marcin Dalecki, the current 390Wed Apr 17 22:52:44 CEST 2002 edited by Marcin Dalecki, the current
391maintainer. 391maintainer.
392 392
393Wed Aug 20 22:31:29 CEST 2003 updated ide boot uptions to current ide.c 393Wed Aug 20 22:31:29 CEST 2003 updated ide boot options to current ide.c
394comments at 2.6.0-test4 time. Maciej Soltysiak <solt@dns.toxicfilms.tv> 394comments at 2.6.0-test4 time. Maciej Soltysiak <solt@dns.toxicfilms.tv>
diff --git a/Documentation/input/amijoy.txt b/Documentation/input/amijoy.txt
index 4f0e89df5c51..7dc4f175943c 100644
--- a/Documentation/input/amijoy.txt
+++ b/Documentation/input/amijoy.txt
@@ -91,8 +91,8 @@ JOY1DAT Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 X7 X6 X5 X4 X3 X2 X1 X0
91 | 1 | M0HQ | JOY0DAT Horizontal Clock (quadrature) | 91 | 1 | M0HQ | JOY0DAT Horizontal Clock (quadrature) |
92 | 2 | M0V | JOY0DAT Vertical Clock | 92 | 2 | M0V | JOY0DAT Vertical Clock |
93 | 3 | M0VQ | JOY0DAT Vertical Clock (quadrature) | 93 | 3 | M0VQ | JOY0DAT Vertical Clock (quadrature) |
94 | 4 | M1V | JOY1DAT Horizontall Clock | 94 | 4 | M1V | JOY1DAT Horizontal Clock |
95 | 5 | M1VQ | JOY1DAT Horizontall Clock (quadrature) | 95 | 5 | M1VQ | JOY1DAT Horizontal Clock (quadrature) |
96 | 6 | M1V | JOY1DAT Vertical Clock | 96 | 6 | M1V | JOY1DAT Vertical Clock |
97 | 7 | M1VQ | JOY1DAT Vertical Clock (quadrature) | 97 | 7 | M1VQ | JOY1DAT Vertical Clock (quadrature) |
98 +--------+----------+-----------------------------------------+ 98 +--------+----------+-----------------------------------------+
diff --git a/Documentation/input/atarikbd.txt b/Documentation/input/atarikbd.txt
index 1e7e5853ba4c..668f4d0d97d6 100644
--- a/Documentation/input/atarikbd.txt
+++ b/Documentation/input/atarikbd.txt
@@ -103,7 +103,7 @@ LEFT=0x74 & RIGHT=0x75).
103 103
1045.1 Joystick Event Reporting 1045.1 Joystick Event Reporting
105 105
106In this mode, the ikbd generates a record whever the joystick position is 106In this mode, the ikbd generates a record whenever the joystick position is
107changed (i.e. for each opening or closing of a joystick switch or trigger). 107changed (i.e. for each opening or closing of a joystick switch or trigger).
108 108
109The joystick event record is two bytes of the form: 109The joystick event record is two bytes of the form:
@@ -277,8 +277,8 @@ default to 1 at RESET (or power-up).
2779.7 SET MOUSE SCALE 2779.7 SET MOUSE SCALE
278 278
279 0x0C 279 0x0C
280 X ; horizontal mouse ticks per internel X 280 X ; horizontal mouse ticks per internal X
281 Y ; vertical mouse ticks per internel Y 281 Y ; vertical mouse ticks per internal Y
282 282
283This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode. 283This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode.
284In this mode, the specified number of mouse phase changes ('clicks') must 284In this mode, the specified number of mouse phase changes ('clicks') must
@@ -323,7 +323,7 @@ mouse position.
323 0x0F 323 0x0F
324 324
325This command makes the origin of the Y axis to be at the bottom of the 325This command makes the origin of the Y axis to be at the bottom of the
326logical coordinate system internel to the ikbd for all relative or absolute 326logical coordinate system internal to the ikbd for all relative or absolute
327mouse motion. This causes mouse motion toward the user to be negative in sign 327mouse motion. This causes mouse motion toward the user to be negative in sign
328and away from the user to be positive. 328and away from the user to be positive.
329 329
@@ -597,8 +597,8 @@ mode or FIRE BUTTON MONITORING mode.
597 597
59810. SCAN CODES 59810. SCAN CODES
599 599
600The key scan codes return by the ikbd are chosen to simplify the 600The key scan codes returned by the ikbd are chosen to simplify the
601implementaion of GSX. 601implementation of GSX.
602 602
603GSX Standard Keyboard Mapping. 603GSX Standard Keyboard Mapping.
604 604
diff --git a/Documentation/input/xpad.txt b/Documentation/input/xpad.txt
index b9111a703ce0..5427bdf225ed 100644
--- a/Documentation/input/xpad.txt
+++ b/Documentation/input/xpad.txt
@@ -3,20 +3,37 @@ xpad - Linux USB driver for X-Box gamepads
3This is the very first release of a driver for X-Box gamepads. 3This is the very first release of a driver for X-Box gamepads.
4Basically, this was hacked away in just a few hours, so don't expect 4Basically, this was hacked away in just a few hours, so don't expect
5miracles. 5miracles.
6
6In particular, there is currently NO support for the rumble pack. 7In particular, there is currently NO support for the rumble pack.
7You won't find many ff-aware linux applications anyway. 8You won't find many ff-aware linux applications anyway.
8 9
9 10
100. Status 110. Notes
11--------- 12--------
13
14Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.)
12 15
13For now, this driver has only been tested on just one Linux-Box. 16The number of buttons/axes reported varies based on 3 things:
14This one is running a 2.4.18 kernel with usb-uhci on an amd athlon 600. 17- if you are using a known controller
18- if you are using a known dance pad
19- if using an unknown device (one not listed below), what you set in the
20 module configuration for "Map D-PAD to buttons rather than axes for unknown
21 pads" (module option dpad_to_buttons)
15 22
16The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports 23If you set dpad_to_buttons to 0 and you are using an unknown device (one
178 axes and 10 buttons. 24not listed below), the driver will map the directional pad to axes (X/Y),
25if you said N it will map the d-pad to buttons, which is needed for dance
26style games to function correctly. The default is Y.
27
28dpad_to_buttons has no effect for known pads.
29
300.1 Normal Controllers
31----------------------
32With a normal controller, the directional pad is mapped to its own X/Y axes.
33The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8
34axes and 10 buttons.
18 35
19Alls 8 axes work, though they all have the same range (-32768..32767) 36All 8 axes work, though they all have the same range (-32768..32767)
20and the zero-setting is not correct for the triggers (I don't know if that 37and the zero-setting is not correct for the triggers (I don't know if that
21is some limitation of jstest, since the input device setup should be fine. I 38is some limitation of jstest, since the input device setup should be fine. I
22didn't have a look at jstest itself yet). 39didn't have a look at jstest itself yet).
@@ -30,16 +47,50 @@ in game functionality were OK. However, I find it rather difficult to
30play first person shooters with a pad. Your mileage may vary. 47play first person shooters with a pad. Your mileage may vary.
31 48
32 49
500.2 Xbox Dance Pads
51-------------------
52When using a known dance pad, jstest will report 6 axes and 14 buttons.
53
54For dance style pads (like the redoctane pad) several changes
55have been made. The old driver would map the d-pad to axes, resulting
56in the driver being unable to report when the user was pressing both
57left+right or up+down, making DDR style games unplayable.
58
59Known dance pads automatically map the d-pad to buttons and will work
60correctly out of the box.
61
62If your dance pad is recognized by the driver but is using axes instead
63of buttons, see section 0.3 - Unknown Controllers
64
65I've tested this with Stepmania, and it works quite well.
66
67
680.3 Unkown Controllers
69----------------------
70If you have an unkown xbox controller, it should work just fine with
71the default settings.
72
73HOWEVER if you have an unknown dance pad not listed below, it will not
74work UNLESS you set "dpad_to_buttons" to 1 in the module configuration.
75
76PLEASE if you have an unkown controller, email Dom <binary1230@yahoo.com> with
77a dump from /proc/bus/usb and a description of the pad (manufacturer, country,
78whether it is a dance pad or normal controller) so that we can add your pad
79to the list of supported devices, ensuring that it will work out of the
80box in the future.
81
82
331. USB adapter 831. USB adapter
34-------------- 84--------------
35 85
36Before you can actually use the driver, you need to get yourself an 86Before you can actually use the driver, you need to get yourself an
37adapter cable to connect the X-Box controller to your Linux-Box. 87adapter cable to connect the X-Box controller to your Linux-Box. You
88can buy these online fairly cheap, or build your own.
38 89
39Such a cable is pretty easy to build. The Controller itself is a USB compound 90Such a cable is pretty easy to build. The Controller itself is a USB
40device (a hub with three ports for two expansion slots and the controller 91compound device (a hub with three ports for two expansion slots and
41device) with the only difference in a nonstandard connector (5 pins vs. 4 on 92the controller device) with the only difference in a nonstandard connector
42standard USB connector). 93(5 pins vs. 4 on standard USB connector).
43 94
44You just need to solder a USB connector onto the cable and keep the 95You just need to solder a USB connector onto the cable and keep the
45yellow wire unconnected. The other pins have the same order on both 96yellow wire unconnected. The other pins have the same order on both
@@ -51,36 +102,36 @@ original one. You can buy an extension cable and cut that instead. That way,
51you can still use the controller with your X-Box, if you have one ;) 102you can still use the controller with your X-Box, if you have one ;)
52 103
53 104
542. driver installation 1052. Driver Installation
55---------------------- 106----------------------
56 107
57Once you have the adapter cable and the controller is connected, you need 108Once you have the adapter cable and the controller is connected, you need
58to load your USB subsystem and should cat /proc/bus/usb/devices. 109to load your USB subsystem and should cat /proc/bus/usb/devices.
59There should be an entry like the one at the end [4]. 110There should be an entry like the one at the end [4].
60 111
61Currently (as of version 0.0.4), the following three devices are included: 112Currently (as of version 0.0.6), the following devices are included:
62 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202 113 original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
114 smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289
63 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285 115 original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
64 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a 116 InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
117 RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809
65 118
66If you have another controller that is not listed above and is not recognized 119The driver should work with xbox pads not listed above as well, however
67by the driver, please drop me a line with the appropriate info (that is, include 120you will need to do something extra for dance pads to work.
68the name, vendor and product ID, as well as the country where you bought it;
69sending the whole dump out of /proc/bus/usb/devices along would be even better).
70 121
71In theory, the driver should work with other controllers than mine 122If you have a controller not listed above, see 0.3 - Unknown Controllers
72(InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
73for I only have this one controller.
74 123
75If you compiled and installed the driver, test the functionality: 124If you compiled and installed the driver, test the functionality:
76> modprobe xpad 125> modprobe xpad
77> modprobe joydev 126> modprobe joydev
78> jstest /dev/js0 127> jstest /dev/js0
79 128
80There should be a single line showing 18 inputs (8 axes, 10 buttons), and 129If you're using a normal controller, there should be a single line showing
81it's values should change if you move the sticks and push the buttons. 13018 inputs (8 axes, 10 buttons), and its values should change if you move
131the sticks and push the buttons. If you're using a dance pad, it should
132show 20 inputs (6 axes, 14 buttons).
82 133
83It works? Voila, your done ;) 134It works? Voila, you're done ;)
84 135
85 136
863. Thanks 1373. Thanks
@@ -111,6 +162,22 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
111E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms 162E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
112E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms 163E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms
113 164
1655. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US):
166
167T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
168D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
169P: Vendor=0c12 ProdID=8809 Rev= 0.01
170S: Product=XBOX DDR
171C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
172I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad
173E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms
174E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms
175
114-- 176--
115Marko Friedemann <mfr@bmx-chemnitz.de> 177Marko Friedemann <mfr@bmx-chemnitz.de>
1162002-07-16 1782002-07-16
179 - original doc
180
181Dominic Cerquetti <binary1230@yahoo.com>
1822005-03-19
183 - added stuff for dance pads, new d-pad->axes mappings
diff --git a/Documentation/input/yealink.txt b/Documentation/input/yealink.txt
index 0a8c97e87d47..5360e434486c 100644
--- a/Documentation/input/yealink.txt
+++ b/Documentation/input/yealink.txt
@@ -134,7 +134,7 @@ Reading /sys/../lineX will return the format string with its current value:
134 888888888888 134 888888888888
135 Linux Rocks! 135 Linux Rocks!
136 136
137Writing to /sys/../lineX will set the coresponding LCD line. 137Writing to /sys/../lineX will set the corresponding LCD line.
138 - Excess characters are ignored. 138 - Excess characters are ignored.
139 - If less characters are written than allowed, the remaining digits are 139 - If less characters are written than allowed, the remaining digits are
140 unchanged. 140 unchanged.
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt
index edc04d74ae23..5a8bd5bd88ef 100644
--- a/Documentation/ioctl-number.txt
+++ b/Documentation/ioctl-number.txt
@@ -191,3 +191,5 @@ Code Seq# Include File Comments
191 <mailto:aherrman@de.ibm.com> 191 <mailto:aherrman@de.ibm.com>
1920xF3 00-3F video/sisfb.h sisfb (in development) 1920xF3 00-3F video/sisfb.h sisfb (in development)
193 <mailto:thomas@winischhofer.net> 193 <mailto:thomas@winischhofer.net>
1940xF4 00-1F video/mbxfb.h mbxfb
195 <mailto:raph@8d.com>
diff --git a/Documentation/ioctl/cdrom.txt b/Documentation/ioctl/cdrom.txt
index 8ec32cc49eb1..62d4af44ec4a 100644
--- a/Documentation/ioctl/cdrom.txt
+++ b/Documentation/ioctl/cdrom.txt
@@ -735,7 +735,7 @@ CDROM_DISC_STATUS Get disc type, etc.
735 Ok, this is where problems start. The current interface for 735 Ok, this is where problems start. The current interface for
736 the CDROM_DISC_STATUS ioctl is flawed. It makes the false 736 the CDROM_DISC_STATUS ioctl is flawed. It makes the false
737 assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc. 737 assumption that CDs are all CDS_DATA_1 or all CDS_AUDIO, etc.
738 Unfortunatly, while this is often the case, it is also 738 Unfortunately, while this is often the case, it is also
739 very common for CDs to have some tracks with data, and some 739 very common for CDs to have some tracks with data, and some
740 tracks with audio. Just because I feel like it, I declare 740 tracks with audio. Just because I feel like it, I declare
741 the following to be the best way to cope. If the CD has 741 the following to be the best way to cope. If the CD has
diff --git a/Documentation/ioctl/ioctl-decoding.txt b/Documentation/ioctl/ioctl-decoding.txt
new file mode 100644
index 000000000000..bfdf7f3ee4f0
--- /dev/null
+++ b/Documentation/ioctl/ioctl-decoding.txt
@@ -0,0 +1,24 @@
1To decode a hex IOCTL code:
2
3Most architecures use this generic format, but check
4include/ARCH/ioctl.h for specifics, e.g. powerpc
5uses 3 bits to encode read/write and 13 bits for size.
6
7 bits meaning
8 31-30 00 - no parameters: uses _IO macro
9 10 - read: _IOR
10 01 - write: _IOW
11 11 - read/write: _IOWR
12
13 29-16 size of arguments
14
15 15-8 ascii character supposedly
16 unique to each driver
17
18 7-0 function #
19
20
21 So for example 0x82187201 is a read with arg length of 0x218,
22character 'r' function 1. Grepping the source reveals this is:
23
24#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 50f4eddf899c..4b3d6710c504 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -227,9 +227,9 @@ more details, with real examples.
227 be included in a library, lib.a. 227 be included in a library, lib.a.
228 All objects listed with lib-y are combined in a single 228 All objects listed with lib-y are combined in a single
229 library for that directory. 229 library for that directory.
230 Objects that are listed in obj-y and additionaly listed in 230 Objects that are listed in obj-y and additionally listed in
231 lib-y will not be included in the library, since they will anyway 231 lib-y will not be included in the library, since they will
232 be accessible. 232 be accessible anyway.
233 For consistency, objects listed in lib-m will be included in lib.a. 233 For consistency, objects listed in lib-m will be included in lib.a.
234 234
235 Note that the same kbuild makefile may list files to be built-in 235 Note that the same kbuild makefile may list files to be built-in
@@ -535,7 +535,7 @@ Both possibilities are described in the following.
535 Host programs can be made up based on composite objects. 535 Host programs can be made up based on composite objects.
536 The syntax used to define composite objects for host programs is 536 The syntax used to define composite objects for host programs is
537 similar to the syntax used for kernel objects. 537 similar to the syntax used for kernel objects.
538 $(<executeable>-objs) lists all objects used to link the final 538 $(<executable>-objs) lists all objects used to link the final
539 executable. 539 executable.
540 540
541 Example: 541 Example:
@@ -1022,7 +1022,7 @@ When kbuild executes, the following steps are followed (roughly):
1022 In this example, there are two possible targets, requiring different 1022 In this example, there are two possible targets, requiring different
1023 options to the linker. The linker options are specified using the 1023 options to the linker. The linker options are specified using the
1024 LDFLAGS_$@ syntax - one for each potential target. 1024 LDFLAGS_$@ syntax - one for each potential target.
1025 $(targets) are assinged all potential targets, by which kbuild knows 1025 $(targets) are assigned all potential targets, by which kbuild knows
1026 the targets and will: 1026 the targets and will:
1027 1) check for commandline changes 1027 1) check for commandline changes
1028 2) delete target during make clean 1028 2) delete target during make clean
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index c65233d430f0..284e7e198e93 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -17,7 +17,7 @@ are:
17 special place-holders for where the extracted documentation should 17 special place-holders for where the extracted documentation should
18 go. 18 go.
19 19
20- scripts/docproc.c 20- scripts/basic/docproc.c
21 21
22 This is a program for converting SGML template files into SGML 22 This is a program for converting SGML template files into SGML
23 files. When a file is referenced it is searched for symbols 23 files. When a file is referenced it is searched for symbols
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index ff571f9298e0..d8323b8893c3 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -164,6 +164,10 @@ and is between 256 and 4096 characters. It is defined in the file
164 acpi_skip_timer_override [HW,ACPI] 164 acpi_skip_timer_override [HW,ACPI]
165 Recognize and ignore IRQ0/pin2 Interrupt Override. 165 Recognize and ignore IRQ0/pin2 Interrupt Override.
166 For broken nForce2 BIOS resulting in XT-PIC timer. 166 For broken nForce2 BIOS resulting in XT-PIC timer.
167 acpi_use_timer_override [HW,ACPI}
168 Use timer override. For some broken Nvidia NF5 boards
169 that require a timer override, but don't have
170 HPET
167 171
168 acpi_dbg_layer= [HW,ACPI] 172 acpi_dbg_layer= [HW,ACPI]
169 Format: <int> 173 Format: <int>
@@ -544,6 +548,13 @@ and is between 256 and 4096 characters. It is defined in the file
544 eurwdt= [HW,WDT] Eurotech CPU-1220/1410 onboard watchdog. 548 eurwdt= [HW,WDT] Eurotech CPU-1220/1410 onboard watchdog.
545 Format: <io>[,<irq>] 549 Format: <io>[,<irq>]
546 550
551 failslab=
552 fail_page_alloc=
553 fail_make_request=[KNL]
554 General fault injection mechanism.
555 Format: <interval>,<probability>,<space>,<times>
556 See also /Documentation/fault-injection/.
557
547 fd_mcs= [HW,SCSI] 558 fd_mcs= [HW,SCSI]
548 See header of drivers/scsi/fd_mcs.c. 559 See header of drivers/scsi/fd_mcs.c.
549 560
@@ -553,9 +564,6 @@ and is between 256 and 4096 characters. It is defined in the file
553 floppy= [HW] 564 floppy= [HW]
554 See Documentation/floppy.txt. 565 See Documentation/floppy.txt.
555 566
556 ftape= [HW] Floppy Tape subsystem debugging options.
557 See Documentation/ftape.txt.
558
559 gamecon.map[2|3]= 567 gamecon.map[2|3]=
560 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad 568 [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
561 support via parallel port (up to 5 devices per port) 569 support via parallel port (up to 5 devices per port)
@@ -598,8 +606,6 @@ and is between 256 and 4096 characters. It is defined in the file
598 606
599 hugepages= [HW,IA-32,IA-64] Maximal number of HugeTLB pages. 607 hugepages= [HW,IA-32,IA-64] Maximal number of HugeTLB pages.
600 608
601 noirqbalance [IA-32,SMP,KNL] Disable kernel irq balancing
602
603 i8042.direct [HW] Put keyboard port into non-translated mode 609 i8042.direct [HW] Put keyboard port into non-translated mode
604 i8042.dumbkbd [HW] Pretend that controller can only read data from 610 i8042.dumbkbd [HW] Pretend that controller can only read data from
605 keyboard and cannot control its state 611 keyboard and cannot control its state
@@ -649,6 +655,10 @@ and is between 256 and 4096 characters. It is defined in the file
649 idle= [HW] 655 idle= [HW]
650 Format: idle=poll or idle=halt 656 Format: idle=poll or idle=halt
651 657
658 ignore_loglevel [KNL]
659 Ignore loglevel setting - this will print /all/
660 kernel messages to the console. Useful for debugging.
661
652 ihash_entries= [KNL] 662 ihash_entries= [KNL]
653 Set number of hash buckets for inode cache. 663 Set number of hash buckets for inode cache.
654 664
@@ -713,7 +723,12 @@ and is between 256 and 4096 characters. It is defined in the file
713 Format: <RDP>,<reset>,<pci_scan>,<verbosity> 723 Format: <RDP>,<reset>,<pci_scan>,<verbosity>
714 724
715 isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler. 725 isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler.
716 Format: <cpu number>,...,<cpu number> 726 Format:
727 <cpu number>,...,<cpu number>
728 or
729 <cpu number>-<cpu number> (must be a positive range in ascending order)
730 or a mixture
731 <cpu number>,...,<cpu number>-<cpu number>
717 This option can be used to specify one or more CPUs 732 This option can be used to specify one or more CPUs
718 to isolate from the general SMP balancing and scheduling 733 to isolate from the general SMP balancing and scheduling
719 algorithms. The only way to move a process onto or off 734 algorithms. The only way to move a process onto or off
@@ -1011,6 +1026,10 @@ and is between 256 and 4096 characters. It is defined in the file
1011 emulation library even if a 387 maths coprocessor 1026 emulation library even if a 387 maths coprocessor
1012 is present. 1027 is present.
1013 1028
1029 noaliencache [MM, NUMA] Disables the allcoation of alien caches in
1030 the slab allocator. Saves per-node memory, but will
1031 impact performance on real NUMA hardware.
1032
1014 noalign [KNL,ARM] 1033 noalign [KNL,ARM]
1015 1034
1016 noapic [SMP,APIC] Tells the kernel to not make use of any 1035 noapic [SMP,APIC] Tells the kernel to not make use of any
@@ -1051,9 +1070,14 @@ and is between 256 and 4096 characters. It is defined in the file
1051 in certain environments such as networked servers or 1070 in certain environments such as networked servers or
1052 real-time systems. 1071 real-time systems.
1053 1072
1073 noirqbalance [IA-32,SMP,KNL] Disable kernel irq balancing
1074
1054 noirqdebug [IA-32] Disables the code which attempts to detect and 1075 noirqdebug [IA-32] Disables the code which attempts to detect and
1055 disable unhandled interrupt sources. 1076 disable unhandled interrupt sources.
1056 1077
1078 no_timer_check [IA-32,X86_64,APIC] Disables the code which tests for
1079 broken timer IRQ sources.
1080
1057 noisapnp [ISAPNP] Disables ISA PnP code. 1081 noisapnp [ISAPNP] Disables ISA PnP code.
1058 1082
1059 noinitrd [RAM] Tells the kernel not to load any configured 1083 noinitrd [RAM] Tells the kernel not to load any configured
@@ -1231,6 +1255,11 @@ and is between 256 and 4096 characters. It is defined in the file
1231 machine check when some devices' config space 1255 machine check when some devices' config space
1232 is read. But various workarounds are disabled 1256 is read. But various workarounds are disabled
1233 and some IOMMU drivers will not work. 1257 and some IOMMU drivers will not work.
1258 bfsort Sort PCI devices into breadth-first order.
1259 This sorting is done to get a device
1260 order compatible with older (<= 2.4) kernels.
1261 nobfsort Don't sort PCI devices into breadth-first order.
1262
1234 pcmv= [HW,PCMCIA] BadgePAD 4 1263 pcmv= [HW,PCMCIA] BadgePAD 4
1235 1264
1236 pd. [PARIDE] 1265 pd. [PARIDE]
@@ -1279,6 +1308,7 @@ and is between 256 and 4096 characters. It is defined in the file
1279 Param: "schedule" - profile schedule points. 1308 Param: "schedule" - profile schedule points.
1280 Param: <number> - step/bucket size as a power of 2 for 1309 Param: <number> - step/bucket size as a power of 2 for
1281 statistical time based profiling. 1310 statistical time based profiling.
1311 Param: "sleep" - profile D-state sleeping (millisecs)
1282 1312
1283 processor.max_cstate= [HW,ACPI] 1313 processor.max_cstate= [HW,ACPI]
1284 Limit processor to maximum C-state 1314 Limit processor to maximum C-state
@@ -1360,6 +1390,12 @@ and is between 256 and 4096 characters. It is defined in the file
1360 resume= [SWSUSP] 1390 resume= [SWSUSP]
1361 Specify the partition device for software suspend 1391 Specify the partition device for software suspend
1362 1392
1393 resume_offset= [SWSUSP]
1394 Specify the offset from the beginning of the partition
1395 given by "resume=" at which the swap header is located,
1396 in <PAGE_SIZE> units (needed only for swap files).
1397 See Documentation/power/swsusp-and-swap-files.txt
1398
1363 rhash_entries= [KNL,NET] 1399 rhash_entries= [KNL,NET]
1364 Set number of hash buckets for route cache 1400 Set number of hash buckets for route cache
1365 1401
@@ -1410,6 +1446,11 @@ and is between 256 and 4096 characters. It is defined in the file
1410 1446
1411 scsi_logging= [SCSI] 1447 scsi_logging= [SCSI]
1412 1448
1449 scsi_mod.scan= [SCSI] sync (default) scans SCSI busses as they are
1450 discovered. async scans them in kernel threads,
1451 allowing boot to proceed. none ignores them, expecting
1452 user space to do the scan.
1453
1413 selinux [SELINUX] Disable or enable SELinux at boot time. 1454 selinux [SELINUX] Disable or enable SELinux at boot time.
1414 Format: { "0" | "1" } 1455 Format: { "0" | "1" }
1415 See security/selinux/Kconfig help text. 1456 See security/selinux/Kconfig help text.
@@ -1721,6 +1762,9 @@ and is between 256 and 4096 characters. It is defined in the file
1721 norandmaps Don't use address space randomization 1762 norandmaps Don't use address space randomization
1722 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space 1763 Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space
1723 1764
1765 unwind_debug=N N > 0 will enable dwarf2 unwinder debugging
1766 This is useful to get more information why
1767 you got a "dwarf2 unwinder stuck"
1724 1768
1725______________________________________________________________________ 1769______________________________________________________________________
1726 1770
diff --git a/Documentation/keys.txt b/Documentation/keys.txt
index 3da586bc7859..60c665d9cfaa 100644
--- a/Documentation/keys.txt
+++ b/Documentation/keys.txt
@@ -304,7 +304,7 @@ about the status of the key service:
304 R Revoked 304 R Revoked
305 D Dead 305 D Dead
306 Q Contributes to user's quota 306 Q Contributes to user's quota
307 U Under contruction by callback to userspace 307 U Under construction by callback to userspace
308 N Negative key 308 N Negative key
309 309
310 This file must be enabled at kernel configuration time as it allows anyone 310 This file must be enabled at kernel configuration time as it allows anyone
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index ba26201d5023..d71fafffce90 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -442,9 +442,10 @@ static int __init kprobe_init(void)
442 kp.fault_handler = handler_fault; 442 kp.fault_handler = handler_fault;
443 kp.symbol_name = "do_fork"; 443 kp.symbol_name = "do_fork";
444 444
445 if ((ret = register_kprobe(&kp) < 0)) { 445 ret = register_kprobe(&kp);
446 if (ret < 0) {
446 printk("register_kprobe failed, returned %d\n", ret); 447 printk("register_kprobe failed, returned %d\n", ret);
447 return -1; 448 return ret;
448 } 449 }
449 printk("kprobe registered\n"); 450 printk("kprobe registered\n");
450 return 0; 451 return 0;
diff --git a/Documentation/laptop-mode.txt b/Documentation/laptop-mode.txt
index c487186eb2b9..6f639e3473af 100644
--- a/Documentation/laptop-mode.txt
+++ b/Documentation/laptop-mode.txt
@@ -121,7 +121,7 @@ contains the following options:
121MAX_AGE: 121MAX_AGE:
122 122
123Maximum time, in seconds, of hard drive spindown time that you are 123Maximum time, in seconds, of hard drive spindown time that you are
124confortable with. Worst case, it's possible that you could lose this 124comfortable with. Worst case, it's possible that you could lose this
125amount of work if your battery fails while you're in laptop mode. 125amount of work if your battery fails while you're in laptop mode.
126 126
127MINIMUM_BATTERY_MINUTES: 127MINIMUM_BATTERY_MINUTES:
@@ -235,7 +235,7 @@ It should be installed as /etc/default/laptop-mode on Debian, and as
235 235
236--------------------CONFIG FILE BEGIN------------------------------------------- 236--------------------CONFIG FILE BEGIN-------------------------------------------
237# Maximum time, in seconds, of hard drive spindown time that you are 237# Maximum time, in seconds, of hard drive spindown time that you are
238# confortable with. Worst case, it's possible that you could lose this 238# comfortable with. Worst case, it's possible that you could lose this
239# amount of work if your battery fails you while in laptop mode. 239# amount of work if your battery fails you while in laptop mode.
240#MAX_AGE=600 240#MAX_AGE=600
241 241
@@ -350,7 +350,7 @@ fi
350# set defaults instead: 350# set defaults instead:
351 351
352# Maximum time, in seconds, of hard drive spindown time that you are 352# Maximum time, in seconds, of hard drive spindown time that you are
353# confortable with. Worst case, it's possible that you could lose this 353# comfortable with. Worst case, it's possible that you could lose this
354# amount of work if your battery fails you while in laptop mode. 354# amount of work if your battery fails you while in laptop mode.
355MAX_AGE=${MAX_AGE:-'600'} 355MAX_AGE=${MAX_AGE:-'600'}
356 356
@@ -699,7 +699,7 @@ ACPI integration
699Dax Kelson submitted this so that the ACPI acpid daemon will 699Dax Kelson submitted this so that the ACPI acpid daemon will
700kick off the laptop_mode script and run hdparm. The part that 700kick off the laptop_mode script and run hdparm. The part that
701automatically disables laptop mode when the battery is low was 701automatically disables laptop mode when the battery is low was
702writen by Jan Topinski. 702written by Jan Topinski.
703 703
704-----------------/etc/acpi/events/ac_adapter BEGIN------------------------------ 704-----------------/etc/acpi/events/ac_adapter BEGIN------------------------------
705event=ac_adapter 705event=ac_adapter
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 994355b0cd19..58408dd023c7 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -212,7 +212,7 @@ There are some minimal guarantees that may be expected of a CPU:
212 212
213 STORE *X = c, d = LOAD *X 213 STORE *X = c, d = LOAD *X
214 214
215 (Loads and stores overlap if they are targetted at overlapping pieces of 215 (Loads and stores overlap if they are targeted at overlapping pieces of
216 memory). 216 memory).
217 217
218And there are a number of things that _must_ or _must_not_ be assumed: 218And there are a number of things that _must_ or _must_not_ be assumed:
@@ -1016,7 +1016,7 @@ There are some more advanced barrier functions:
1016 1016
1017 (*) set_mb(var, value) 1017 (*) set_mb(var, value)
1018 1018
1019 This assigns the value to the variable and then inserts at least a write 1019 This assigns the value to the variable and then inserts a full memory
1020 barrier after it, depending on the function. It isn't guaranteed to 1020 barrier after it, depending on the function. It isn't guaranteed to
1021 insert anything more than a compiler barrier in a UP compilation. 1021 insert anything more than a compiler barrier in a UP compilation.
1022 1022
@@ -1898,7 +1898,7 @@ queue before processing any further requests:
1898 smp_wmb(); 1898 smp_wmb();
1899 <A:modify v=2> <C:busy> 1899 <A:modify v=2> <C:busy>
1900 <C:queue v=2> 1900 <C:queue v=2>
1901 p = &b; q = p; 1901 p = &v; q = p;
1902 <D:request p> 1902 <D:request p>
1903 <B:modify p=&v> <D:commit p=&v> 1903 <B:modify p=&v> <D:commit p=&v>
1904 <D:read p> 1904 <D:read p>
diff --git a/Documentation/mips/time.README b/Documentation/mips/time.README
index 69ddc5c14b79..a4ce603ed3b3 100644
--- a/Documentation/mips/time.README
+++ b/Documentation/mips/time.README
@@ -38,19 +38,14 @@ The new time code provide the following services:
38 38
39 a) Implements functions required by Linux common code: 39 a) Implements functions required by Linux common code:
40 time_init 40 time_init
41 do_gettimeofday
42 do_settimeofday
43 41
44 b) provides an abstraction of RTC and null RTC implementation as default. 42 b) provides an abstraction of RTC and null RTC implementation as default.
45 extern unsigned long (*rtc_get_time)(void); 43 extern unsigned long (*rtc_get_time)(void);
46 extern int (*rtc_set_time)(unsigned long); 44 extern int (*rtc_set_time)(unsigned long);
47 45
48 c) a set of gettimeoffset functions for different CPUs and different 46 c) high-level and low-level timer interrupt routines where the timer
49 needs. 47 interrupt source may or may not be the CPU timer. The high-level
50 48 routine is dispatched through do_IRQ() while the low-level is
51 d) high-level and low-level timer interrupt routines where the timer
52 interrupt source may or may not be the CPU timer. The high-level
53 routine is dispatched through do_IRQ() while the low-level is
54 dispatched in assemably code (usually int-handler.S) 49 dispatched in assemably code (usually int-handler.S)
55 50
56 51
@@ -63,7 +58,7 @@ the following functions or values:
63 a) board_time_init - a function pointer. Invoked at the beginnig of 58 a) board_time_init - a function pointer. Invoked at the beginnig of
64 time_init(). It is optional. 59 time_init(). It is optional.
65 1. (optional) set up RTC routines 60 1. (optional) set up RTC routines
66 2. (optional) calibrate and set the mips_counter_frequency 61 2. (optional) calibrate and set the mips_hpt_frequency
67 62
68 b) plat_timer_setup - a function pointer. Invoked at the end of time_init() 63 b) plat_timer_setup - a function pointer. Invoked at the end of time_init()
69 1. (optional) over-ride any decisions made in time_init() 64 1. (optional) over-ride any decisions made in time_init()
@@ -72,9 +67,8 @@ the following functions or values:
72 67
73 c) (optional) board-specific RTC routines. 68 c) (optional) board-specific RTC routines.
74 69
75 d) (optional) mips_counter_frequency - It must be definied if the board 70 d) (optional) mips_hpt_frequency - It must be definied if the board
76 is using CPU counter for timer interrupt or it is using fixed rate 71 is using CPU counter for timer interrupt.
77 gettimeoffset().
78 72
79 73
80PORTING GUIDE 74PORTING GUIDE
@@ -89,22 +83,12 @@ Step 1: decide how you like to implement the time services.
89 If the answer is no, you need a timer to provide the timer interrupt 83 If the answer is no, you need a timer to provide the timer interrupt
90 at 100 HZ speed. 84 at 100 HZ speed.
91 85
92 You cannot use the fast gettimeoffset functions, i.e.,
93
94 unsigned long fixed_rate_gettimeoffset(void);
95 unsigned long calibrate_div32_gettimeoffset(void);
96 unsigned long calibrate_div64_gettimeoffset(void);
97
98 You can use null_gettimeoffset() will gives the same time resolution as
99 jiffy. Or you can implement your own gettimeoffset (probably based on
100 some ad hoc hardware on your machine.)
101
102 c) The following sub steps assume your CPU has counter register. 86 c) The following sub steps assume your CPU has counter register.
103 Do you plan to use the CPU counter register as the timer interrupt 87 Do you plan to use the CPU counter register as the timer interrupt
104 or use an exnternal timer? 88 or use an exnternal timer?
105 89
106 In order to use CPU counter register as the timer interrupt source, you 90 In order to use CPU counter register as the timer interrupt source, you
107 must know the counter speed (mips_counter_frequency). It is usually the 91 must know the counter speed (mips_hpt_frequency). It is usually the
108 same as the CPU speed or an integral divisor of it. 92 same as the CPU speed or an integral divisor of it.
109 93
110 d) decide on whether you want to use high-level or low-level timer 94 d) decide on whether you want to use high-level or low-level timer
@@ -121,10 +105,10 @@ Step 3: implement rtc routines, board_time_init() and plat_timer_setup()
121 if needed. 105 if needed.
122 106
123 board_time_init() - 107 board_time_init() -
124 a) (optional) set up RTC routines, 108 a) (optional) set up RTC routines,
125 b) (optional) calibrate and set the mips_counter_frequency 109 b) (optional) calibrate and set the mips_hpt_frequency
126 (only needed if you intended to use fixed_rate_gettimeoffset 110 (only needed if you intended to use cpu counter as timer interrupt
127 or use cpu counter as timer interrupt source) 111 source)
128 112
129 plat_timer_setup() - 113 plat_timer_setup() -
130 a) (optional) over-write any choices made above by time_init(). 114 a) (optional) over-write any choices made above by time_init().
@@ -154,8 +138,8 @@ for some of the functions in time.c.
154For example, you may define your own timer interrupt routine, which does 138For example, you may define your own timer interrupt routine, which does
155some of its own processing and then calls timer_interrupt(). 139some of its own processing and then calls timer_interrupt().
156 140
157You can also over-ride any of the built-in functions (gettimeoffset, 141You can also over-ride any of the built-in functions (RTC routines
158RTC routines and/or timer interrupt routine). 142and/or timer interrupt routine).
159 143
160 144
161PORTING NOTES FOR SMP 145PORTING NOTES FOR SMP
@@ -187,10 +171,3 @@ You need to decide on your timer interrupt sources.
187 171
188 You can also do the low-level version of those interrupt routines, 172 You can also do the low-level version of those interrupt routines,
189 following similar dispatching routes described above. 173 following similar dispatching routes described above.
190
191Note about do_gettimeoffset():
192
193 It is very likely the CPU counter registers are not sync'ed up in a SMP box.
194 Therefore you cannot really use the many of the existing routines that
195 are based on CPU counter. You should wirte your own gettimeoffset rouinte
196 if you want intra-jiffy resolution.
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index b1181ce232d9..e06b6e3c1db5 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -58,6 +58,8 @@ fore200e.txt
58 - FORE Systems PCA-200E/SBA-200E ATM NIC driver info. 58 - FORE Systems PCA-200E/SBA-200E ATM NIC driver info.
59framerelay.txt 59framerelay.txt
60 - info on using Frame Relay/Data Link Connection Identifier (DLCI). 60 - info on using Frame Relay/Data Link Connection Identifier (DLCI).
61generic_netlink.txt
62 - info on Generic Netlink
61ip-sysctl.txt 63ip-sysctl.txt
62 - /proc/sys/net/ipv4/* variables 64 - /proc/sys/net/ipv4/* variables
63ip_dynaddr.txt 65ip_dynaddr.txt
diff --git a/Documentation/networking/NAPI_HOWTO.txt b/Documentation/networking/NAPI_HOWTO.txt
index 93af3e87c65b..fb8dc6422a52 100644
--- a/Documentation/networking/NAPI_HOWTO.txt
+++ b/Documentation/networking/NAPI_HOWTO.txt
@@ -95,8 +95,8 @@ There are two types of event register ACK mechanisms.
95 Move all to dev->poll() 95 Move all to dev->poll()
96 96
97C) Ability to detect new work correctly. 97C) Ability to detect new work correctly.
98NAPI works by shutting down event interrupts when theres work and 98NAPI works by shutting down event interrupts when there's work and
99turning them on when theres none. 99turning them on when there's none.
100New packets might show up in the small window while interrupts were being 100New packets might show up in the small window while interrupts were being
101re-enabled (refer to appendix 2). A packet might sneak in during the period 101re-enabled (refer to appendix 2). A packet might sneak in during the period
102we are enabling interrupts. We only get to know about such a packet when the 102we are enabling interrupts. We only get to know about such a packet when the
@@ -114,7 +114,7 @@ Locking rules and environmental guarantees
114only one CPU can pick the initial interrupt and hence the initial 114only one CPU can pick the initial interrupt and hence the initial
115netif_rx_schedule(dev); 115netif_rx_schedule(dev);
116- The core layer invokes devices to send packets in a round robin format. 116- The core layer invokes devices to send packets in a round robin format.
117This implies receive is totaly lockless because of the guarantee only that 117This implies receive is totally lockless because of the guarantee that only
118one CPU is executing it. 118one CPU is executing it.
119- contention can only be the result of some other CPU accessing the rx 119- contention can only be the result of some other CPU accessing the rx
120ring. This happens only in close() and suspend() (when these methods 120ring. This happens only in close() and suspend() (when these methods
@@ -510,7 +510,7 @@ static int my_poll (struct net_device *dev, int *budget)
510 an interrupt will be generated */ 510 an interrupt will be generated */
511 goto done; 511 goto done;
512 } 512 }
513 /* done! at least thats what it looks like ;-> 513 /* done! at least that's what it looks like ;->
514 if new packets came in after our last check on status bits 514 if new packets came in after our last check on status bits
515 they'll be caught by the while check and we go back and clear them 515 they'll be caught by the while check and we go back and clear them
516 since we havent exceeded our quota */ 516 since we havent exceeded our quota */
@@ -535,11 +535,11 @@ done:
535 * 1. it can race with disabling irqs in irq handler (which are done to 535 * 1. it can race with disabling irqs in irq handler (which are done to
536 * schedule polls) 536 * schedule polls)
537 * 2. it can race with dis/enabling irqs in other poll threads 537 * 2. it can race with dis/enabling irqs in other poll threads
538 * 3. if an irq raised after the begining of the outer beginning 538 * 3. if an irq raised after the beginning of the outer beginning
539 * loop(marked in the code above), it will be immediately 539 * loop (marked in the code above), it will be immediately
540 * triggered here. 540 * triggered here.
541 * 541 *
542 * Summarizing: the logic may results in some redundant irqs both 542 * Summarizing: the logic may result in some redundant irqs both
543 * due to races in masking and due to too late acking of already 543 * due to races in masking and due to too late acking of already
544 * processed irqs. The good news: no events are ever lost. 544 * processed irqs. The good news: no events are ever lost.
545 */ 545 */
@@ -601,7 +601,7 @@ a)
601 601
6025) dev->close() and dev->suspend() issues 6025) dev->close() and dev->suspend() issues
603========================================== 603==========================================
604The driver writter neednt worry about this. The top net layer takes 604The driver writer needn't worry about this; the top net layer takes
605care of it. 605care of it.
606 606
6076) Adding new Stats to /proc 6076) Adding new Stats to /proc
@@ -622,9 +622,9 @@ FC should be programmed to apply in the case when the system cant pull out
622packets fast enough i.e send a pause only when you run out of rx buffers. 622packets fast enough i.e send a pause only when you run out of rx buffers.
623Note FC in itself is a good solution but we have found it to not be 623Note FC in itself is a good solution but we have found it to not be
624much of a commodity feature (both in NICs and switches) and hence falls 624much of a commodity feature (both in NICs and switches) and hence falls
625under the same category as using NIC based mitigation. Also experiments 625under the same category as using NIC based mitigation. Also, experiments
626indicate that its much harder to resolve the resource allocation 626indicate that it's much harder to resolve the resource allocation
627issue (aka lazy receiving that NAPI offers) and hence quantify its usefullness 627issue (aka lazy receiving that NAPI offers) and hence quantify its usefulness
628proved harder. In any case, FC works even better with NAPI but is not 628proved harder. In any case, FC works even better with NAPI but is not
629necessary. 629necessary.
630 630
@@ -678,10 +678,10 @@ routine:
678CSR5 bit of interest is only the rx status. 678CSR5 bit of interest is only the rx status.
679If you look at the last if statement: 679If you look at the last if statement:
680you just finished grabbing all the packets from the rx ring .. you check if 680you just finished grabbing all the packets from the rx ring .. you check if
681status bit says theres more packets just in ... it says none; you then 681status bit says there are more packets just in ... it says none; you then
682enable rx interrupts again; if a new packet just came in during this check, 682enable rx interrupts again; if a new packet just came in during this check,
683we are counting that CSR5 will be set in that small window of opportunity 683we are counting that CSR5 will be set in that small window of opportunity
684and that by re-enabling interrupts, we would actually triger an interrupt 684and that by re-enabling interrupts, we would actually trigger an interrupt
685to register the new packet for processing. 685to register the new packet for processing.
686 686
687[The above description nay be very verbose, if you have better wording 687[The above description nay be very verbose, if you have better wording
diff --git a/Documentation/networking/cs89x0.txt b/Documentation/networking/cs89x0.txt
index 64896470e279..6387d3decf85 100644
--- a/Documentation/networking/cs89x0.txt
+++ b/Documentation/networking/cs89x0.txt
@@ -248,7 +248,7 @@ c) The driver's hardware probe routine is designed to avoid
248 with device probing. To avoid this behaviour, add one 248 with device probing. To avoid this behaviour, add one
249 to the `io=' module parameter. This doesn't actually change 249 to the `io=' module parameter. This doesn't actually change
250 the I/O address, but it is a flag to tell the driver 250 the I/O address, but it is a flag to tell the driver
251 topartially initialise the hardware before trying to 251 to partially initialise the hardware before trying to
252 identify the card. This could be dangerous if you are 252 identify the card. This could be dangerous if you are
253 not sure that there is a cs89x0 card at the provided address. 253 not sure that there is a cs89x0 card at the provided address.
254 254
@@ -620,8 +620,8 @@ I/O Address Device IRQ Device
620 12 Mouse (PS/2) 620 12 Mouse (PS/2)
621Memory Address Device 13 Math Coprocessor 621Memory Address Device 13 Math Coprocessor
622-------------- --------------------- 14 Hard Disk controller 622-------------- --------------------- 14 Hard Disk controller
623A000-BFFF EGA Graphics Adpater 623A000-BFFF EGA Graphics Adapter
624A000-C7FF VGA Graphics Adpater 624A000-C7FF VGA Graphics Adapter
625B000-BFFF Mono Graphics Adapter 625B000-BFFF Mono Graphics Adapter
626B800-BFFF Color Graphics Adapter 626B800-BFFF Color Graphics Adapter
627E000-FFFF AT BIOS 627E000-FFFF AT BIOS
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index 74563b38ffd9..387482e46c47 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -19,40 +19,92 @@ for real time and multimedia traffic.
19 19
20It has a base protocol and pluggable congestion control IDs (CCIDs). 20It has a base protocol and pluggable congestion control IDs (CCIDs).
21 21
22It is at draft RFC status and the homepage for DCCP as a protocol is at: 22It is at proposed standard RFC status and the homepage for DCCP as a protocol
23 http://www.icir.org/kohler/dcp/ 23is at:
24 http://www.read.cs.ucla.edu/dccp/
24 25
25Missing features 26Missing features
26================ 27================
27 28
28The DCCP implementation does not currently have all the features that are in 29The DCCP implementation does not currently have all the features that are in
29the draft RFC. 30the RFC.
30 31
31In particular the following are missing: 32The known bugs are at:
32- CCID2 support 33 http://linux-net.osdl.org/index.php/TODO#DCCP
33- feature negotiation
34
35When testing against other implementations it appears that elapsed time
36options are not coded compliant to the specification.
37 34
38Socket options 35Socket options
39============== 36==============
40 37
41DCCP_SOCKOPT_PACKET_SIZE is used for CCID3 to set default packet size for
42calculations.
43
44DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of 38DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
45service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, 39service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
46the socket will fall back to 0 (which means that no meaningful service code 40the socket will fall back to 0 (which means that no meaningful service code
47is present). Connecting sockets set at most one service option; for 41is present). Connecting sockets set at most one service option; for
48listening sockets, multiple service codes can be specified. 42listening sockets, multiple service codes can be specified.
49 43
44DCCP_SOCKOPT_SEND_CSCOV and DCCP_SOCKOPT_RECV_CSCOV are used for setting the
45partial checksum coverage (RFC 4340, sec. 9.2). The default is that checksums
46always cover the entire packet and that only fully covered application data is
47accepted by the receiver. Hence, when using this feature on the sender, it must
48be enabled at the receiver, too with suitable choice of CsCov.
49
50DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the
51 range 0..15 are acceptable. The default setting is 0 (full coverage),
52 values between 1..15 indicate partial coverage.
53DCCP_SOCKOPT_SEND_CSCOV is for the receiver and has a different meaning: it
54 sets a threshold, where again values 0..15 are acceptable. The default
55 of 0 means that all packets with a partial coverage will be discarded.
56 Values in the range 1..15 indicate that packets with minimally such a
57 coverage value are also acceptable. The higher the number, the more
58 restrictive this setting (see [RFC 4340, sec. 9.2.1]).
59
60Sysctl variables
61================
62Several DCCP default parameters can be managed by the following sysctls
63(sysctl net.dccp.default or /proc/sys/net/dccp/default):
64
65request_retries
66 The number of active connection initiation retries (the number of
67 Requests minus one) before timing out. In addition, it also governs
68 the behaviour of the other, passive side: this variable also sets
69 the number of times DCCP repeats sending a Response when the initial
70 handshake does not progress from RESPOND to OPEN (i.e. when no Ack
71 is received after the initial Request). This value should be greater
72 than 0, suggested is less than 10. Analogue of tcp_syn_retries.
73
74retries1
75 How often a DCCP Response is retransmitted until the listening DCCP
76 side considers its connecting peer dead. Analogue of tcp_retries1.
77
78retries2
79 The number of times a general DCCP packet is retransmitted. This has
80 importance for retransmitted acknowledgments and feature negotiation,
81 data packets are never retransmitted. Analogue of tcp_retries2.
82
83send_ndp = 1
84 Whether or not to send NDP count options (sec. 7.7.2).
85
86send_ackvec = 1
87 Whether or not to send Ack Vector options (sec. 11.5).
88
89ack_ratio = 2
90 The default Ack Ratio (sec. 11.3) to use.
91
92tx_ccid = 2
93 Default CCID for the sender-receiver half-connection.
94
95rx_ccid = 2
96 Default CCID for the receiver-sender half-connection.
97
98seq_window = 100
99 The initial sequence window (sec. 7.5.2).
100
101tx_qlen = 5
102 The size of the transmit buffer in packets. A value of 0 corresponds
103 to an unbounded transmit buffer.
104
50Notes 105Notes
51===== 106=====
52 107
53SELinux does not yet have support for DCCP. You will need to turn it off or 108DCCP does not travel through NAT successfully at present on many boxes. This is
54else you will get EACCES. 109because the checksum covers the psuedo-header as per TCP and UDP. Linux NAT
55 110support for DCCP has been added.
56DCCP does not travel through NAT successfully at present. This is because
57the checksum covers the psuedo-header as per TCP and UDP. It should be
58relatively trivial to add Linux NAT support for DCCP.
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt
index 5c0a5cc03998..61b171cf5313 100644
--- a/Documentation/networking/e1000.txt
+++ b/Documentation/networking/e1000.txt
@@ -1,7 +1,7 @@
1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters 1Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
2=============================================================== 2===============================================================
3 3
4November 15, 2005 4September 26, 2006
5 5
6 6
7Contents 7Contents
@@ -9,6 +9,7 @@ Contents
9 9
10- In This Release 10- In This Release
11- Identifying Your Adapter 11- Identifying Your Adapter
12- Building and Installation
12- Command Line Parameters 13- Command Line Parameters
13- Speed and Duplex Configuration 14- Speed and Duplex Configuration
14- Additional Configurations 15- Additional Configurations
@@ -41,6 +42,9 @@ or later), lspci, and ifconfig to obtain the same information.
41Instructions on updating ethtool can be found in the section "Additional 42Instructions on updating ethtool can be found in the section "Additional
42Configurations" later in this document. 43Configurations" later in this document.
43 44
45NOTE: The Intel(R) 82562v 10/100 Network Connection only provides 10/100
46support.
47
44 48
45Identifying Your Adapter 49Identifying Your Adapter
46======================== 50========================
@@ -51,28 +55,27 @@ Driver ID Guide at:
51 http://support.intel.com/support/network/adapter/pro100/21397.htm 55 http://support.intel.com/support/network/adapter/pro100/21397.htm
52 56
53For the latest Intel network drivers for Linux, refer to the following 57For the latest Intel network drivers for Linux, refer to the following
54website. In the search field, enter your adapter name or type, or use the 58website. In the search field, enter your adapter name or type, or use the
55networking link on the left to search for your adapter: 59networking link on the left to search for your adapter:
56 60
57 http://downloadfinder.intel.com/scripts-df/support_intel.asp 61 http://downloadfinder.intel.com/scripts-df/support_intel.asp
58 62
59 63
60Command Line Parameters ======================= 64Command Line Parameters
65=======================
61 66
62If the driver is built as a module, the following optional parameters 67If the driver is built as a module, the following optional parameters
63are used by entering them on the command line with the modprobe or insmod 68are used by entering them on the command line with the modprobe command
64command using this syntax: 69using this syntax:
65 70
66 modprobe e1000 [<option>=<VAL1>,<VAL2>,...] 71 modprobe e1000 [<option>=<VAL1>,<VAL2>,...]
67 72
68 insmod e1000 [<option>=<VAL1>,<VAL2>,...]
69
70For example, with two PRO/1000 PCI adapters, entering: 73For example, with two PRO/1000 PCI adapters, entering:
71 74
72 insmod e1000 TxDescriptors=80,128 75 modprobe e1000 TxDescriptors=80,128
73 76
74loads the e1000 driver with 80 TX descriptors for the first adapter and 128 77loads the e1000 driver with 80 TX descriptors for the first adapter and
75TX descriptors for the second adapter. 78128 TX descriptors for the second adapter.
76 79
77The default value for each parameter is generally the recommended setting, 80The default value for each parameter is generally the recommended setting,
78unless otherwise noted. 81unless otherwise noted.
@@ -87,7 +90,7 @@ NOTES: For more information about the AutoNeg, Duplex, and Speed
87 http://www.intel.com/design/network/applnots/ap450.htm 90 http://www.intel.com/design/network/applnots/ap450.htm
88 91
89 A descriptor describes a data buffer and attributes related to 92 A descriptor describes a data buffer and attributes related to
90 the data buffer. This information is accessed by the hardware. 93 the data buffer. This information is accessed by the hardware.
91 94
92 95
93AutoNeg 96AutoNeg
@@ -96,9 +99,9 @@ AutoNeg
96Valid Range: 0x01-0x0F, 0x20-0x2F 99Valid Range: 0x01-0x0F, 0x20-0x2F
97Default Value: 0x2F 100Default Value: 0x2F
98 101
99This parameter is a bit mask that specifies which speed and duplex 102This parameter is a bit-mask that specifies the speed and duplex settings
100settings the board advertises. When this parameter is used, the Speed 103advertised by the adapter. When this parameter is used, the Speed and
101and Duplex parameters must not be specified. 104Duplex parameters must not be specified.
102 105
103NOTE: Refer to the Speed and Duplex section of this readme for more 106NOTE: Refer to the Speed and Duplex section of this readme for more
104 information on the AutoNeg parameter. 107 information on the AutoNeg parameter.
@@ -110,14 +113,15 @@ Duplex
110Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) 113Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full)
111Default Value: 0 114Default Value: 0
112 115
113Defines the direction in which data is allowed to flow. Can be either 116This defines the direction in which data is allowed to flow. Can be
114one or two-directional. If both Duplex and the link partner are set to 117either one or two-directional. If both Duplex and the link partner are
115auto-negotiate, the board auto-detects the correct duplex. If the link 118set to auto-negotiate, the board auto-detects the correct duplex. If the
116partner is forced (either full or half), Duplex defaults to half-duplex. 119link partner is forced (either full or half), Duplex defaults to half-
120duplex.
117 121
118 122
119FlowControl 123FlowControl
120---------- 124-----------
121Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) 125Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx)
122Default Value: Reads flow control settings from the EEPROM 126Default Value: Reads flow control settings from the EEPROM
123 127
@@ -127,57 +131,107 @@ to Ethernet PAUSE frames.
127 131
128InterruptThrottleRate 132InterruptThrottleRate
129--------------------- 133---------------------
130(not supported on Intel 82542, 82543 or 82544-based adapters) 134(not supported on Intel(R) 82542, 82543 or 82544-based adapters)
131Valid Range: 100-100000 (0=off, 1=dynamic) 135Valid Range: 0,1,3,100-100000 (0=off, 1=dynamic, 3=dynamic conservative)
132Default Value: 8000 136Default Value: 3
133 137
134This value represents the maximum number of interrupts per second the 138The driver can limit the amount of interrupts per second that the adapter
135controller generates. InterruptThrottleRate is another setting used in 139will generate for incoming packets. It does this by writing a value to the
136interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust 140adapter that is based on the maximum amount of interrupts that the adapter
137InterruptThrottleRate based on the current traffic load. 141will generate per second.
142
143Setting InterruptThrottleRate to a value greater or equal to 100
144will program the adapter to send out a maximum of that many interrupts
145per second, even if more packets have come in. This reduces interrupt
146load on the system and can lower CPU utilization under heavy load,
147but will increase latency as packets are not processed as quickly.
148
149The default behaviour of the driver previously assumed a static
150InterruptThrottleRate value of 8000, providing a good fallback value for
151all traffic types,but lacking in small packet performance and latency.
152The hardware can handle many more small packets per second however, and
153for this reason an adaptive interrupt moderation algorithm was implemented.
154
155Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which
156it dynamically adjusts the InterruptThrottleRate value based on the traffic
157that it receives. After determining the type of incoming traffic in the last
158timeframe, it will adjust the InterruptThrottleRate to an appropriate value
159for that traffic.
160
161The algorithm classifies the incoming traffic every interval into
162classes. Once the class is determined, the InterruptThrottleRate value is
163adjusted to suit that traffic type the best. There are three classes defined:
164"Bulk traffic", for large amounts of packets of normal size; "Low latency",
165for small amounts of traffic and/or a significant percentage of small
166packets; and "Lowest latency", for almost completely small packets or
167minimal traffic.
168
169In dynamic conservative mode, the InterruptThrottleRate value is set to 4000
170for traffic that falls in class "Bulk traffic". If traffic falls in the "Low
171latency" or "Lowest latency" class, the InterruptThrottleRate is increased
172stepwise to 20000. This default mode is suitable for most applications.
173
174For situations where low latency is vital such as cluster or
175grid computing, the algorithm can reduce latency even more when
176InterruptThrottleRate is set to mode 1. In this mode, which operates
177the same as mode 3, the InterruptThrottleRate will be increased stepwise to
17870000 for traffic in class "Lowest latency".
179
180Setting InterruptThrottleRate to 0 turns off any interrupt moderation
181and may improve small packet latency, but is generally not suitable
182for bulk throughput traffic.
138 183
139NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and 184NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and
140 RxAbsIntDelay parameters. In other words, minimizing the receive 185 RxAbsIntDelay parameters. In other words, minimizing the receive
141 and/or transmit absolute delays does not force the controller to 186 and/or transmit absolute delays does not force the controller to
142 generate more interrupts than what the Interrupt Throttle Rate 187 generate more interrupts than what the Interrupt Throttle Rate
143 allows. 188 allows.
144 189
145CAUTION: If you are using the Intel PRO/1000 CT Network Connection 190CAUTION: If you are using the Intel(R) PRO/1000 CT Network Connection
146 (controller 82547), setting InterruptThrottleRate to a value 191 (controller 82547), setting InterruptThrottleRate to a value
147 greater than 75,000, may hang (stop transmitting) adapters 192 greater than 75,000, may hang (stop transmitting) adapters
148 under certain network conditions. If this occurs a NETDEV 193 under certain network conditions. If this occurs a NETDEV
149 WATCHDOG message is logged in the system event log. In 194 WATCHDOG message is logged in the system event log. In
150 addition, the controller is automatically reset, restoring 195 addition, the controller is automatically reset, restoring
151 the network connection. To eliminate the potential for the 196 the network connection. To eliminate the potential for the
152 hang, ensure that InterruptThrottleRate is set no greater 197 hang, ensure that InterruptThrottleRate is set no greater
153 than 75,000 and is not set to 0. 198 than 75,000 and is not set to 0.
154 199
155NOTE: When e1000 is loaded with default settings and multiple adapters 200NOTE: When e1000 is loaded with default settings and multiple adapters
156 are in use simultaneously, the CPU utilization may increase non- 201 are in use simultaneously, the CPU utilization may increase non-
157 linearly. In order to limit the CPU utilization without impacting 202 linearly. In order to limit the CPU utilization without impacting
158 the overall throughput, we recommend that you load the driver as 203 the overall throughput, we recommend that you load the driver as
159 follows: 204 follows:
160 205
161 insmod e1000.o InterruptThrottleRate=3000,3000,3000 206 modprobe e1000 InterruptThrottleRate=3000,3000,3000
162 207
163 This sets the InterruptThrottleRate to 3000 interrupts/sec for 208 This sets the InterruptThrottleRate to 3000 interrupts/sec for
164 the first, second, and third instances of the driver. The range 209 the first, second, and third instances of the driver. The range
165 of 2000 to 3000 interrupts per second works on a majority of 210 of 2000 to 3000 interrupts per second works on a majority of
166 systems and is a good starting point, but the optimal value will 211 systems and is a good starting point, but the optimal value will
167 be platform-specific. If CPU utilization is not a concern, use 212 be platform-specific. If CPU utilization is not a concern, use
168 RX_POLLING (NAPI) and default driver settings. 213 RX_POLLING (NAPI) and default driver settings.
169 214
170 215
216
171RxDescriptors 217RxDescriptors
172------------- 218-------------
173Valid Range: 80-256 for 82542 and 82543-based adapters 219Valid Range: 80-256 for 82542 and 82543-based adapters
174 80-4096 for all other supported adapters 220 80-4096 for all other supported adapters
175Default Value: 256 221Default Value: 256
176 222
177This value specifies the number of receive descriptors allocated by the 223This value specifies the number of receive buffer descriptors allocated
178driver. Increasing this value allows the driver to buffer more incoming 224by the driver. Increasing this value allows the driver to buffer more
179packets. Each descriptor is 16 bytes. A receive buffer is also 225incoming packets, at the expense of increased system memory utilization.
180allocated for each descriptor and is 2048. 226
227Each descriptor is 16 bytes. A receive buffer is also allocated for each
228descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending
229on the MTU setting. The maximum MTU size is 16110.
230
231NOTE: MTU designates the frame size. It only needs to be set for Jumbo
232 Frames. Depending on the available system resources, the request
233 for a higher number of receive descriptors may be denied. In this
234 case, use a lower number.
181 235
182 236
183RxIntDelay 237RxIntDelay
@@ -187,17 +241,17 @@ Default Value: 0
187 241
188This value delays the generation of receive interrupts in units of 1.024 242This value delays the generation of receive interrupts in units of 1.024
189microseconds. Receive interrupt reduction can improve CPU efficiency if 243microseconds. Receive interrupt reduction can improve CPU efficiency if
190properly tuned for specific network traffic. Increasing this value adds 244properly tuned for specific network traffic. Increasing this value adds
191extra latency to frame reception and can end up decreasing the throughput 245extra latency to frame reception and can end up decreasing the throughput
192of TCP traffic. If the system is reporting dropped receives, this value 246of TCP traffic. If the system is reporting dropped receives, this value
193may be set too high, causing the driver to run out of available receive 247may be set too high, causing the driver to run out of available receive
194descriptors. 248descriptors.
195 249
196CAUTION: When setting RxIntDelay to a value other than 0, adapters may 250CAUTION: When setting RxIntDelay to a value other than 0, adapters may
197 hang (stop transmitting) under certain network conditions. If 251 hang (stop transmitting) under certain network conditions. If
198 this occurs a NETDEV WATCHDOG message is logged in the system 252 this occurs a NETDEV WATCHDOG message is logged in the system
199 event log. In addition, the controller is automatically reset, 253 event log. In addition, the controller is automatically reset,
200 restoring the network connection. To eliminate the potential 254 restoring the network connection. To eliminate the potential
201 for the hang ensure that RxIntDelay is set to 0. 255 for the hang ensure that RxIntDelay is set to 0.
202 256
203 257
@@ -208,7 +262,7 @@ Valid Range: 0-65535 (0=off)
208Default Value: 128 262Default Value: 128
209 263
210This value, in units of 1.024 microseconds, limits the delay in which a 264This value, in units of 1.024 microseconds, limits the delay in which a
211receive interrupt is generated. Useful only if RxIntDelay is non-zero, 265receive interrupt is generated. Useful only if RxIntDelay is non-zero,
212this value ensures that an interrupt is generated after the initial 266this value ensures that an interrupt is generated after the initial
213packet is received within the set amount of time. Proper tuning, 267packet is received within the set amount of time. Proper tuning,
214along with RxIntDelay, may improve traffic throughput in specific network 268along with RxIntDelay, may improve traffic throughput in specific network
@@ -222,9 +276,9 @@ Valid Settings: 0, 10, 100, 1000
222Default Value: 0 (auto-negotiate at all supported speeds) 276Default Value: 0 (auto-negotiate at all supported speeds)
223 277
224Speed forces the line speed to the specified value in megabits per second 278Speed forces the line speed to the specified value in megabits per second
225(Mbps). If this parameter is not specified or is set to 0 and the link 279(Mbps). If this parameter is not specified or is set to 0 and the link
226partner is set to auto-negotiate, the board will auto-detect the correct 280partner is set to auto-negotiate, the board will auto-detect the correct
227speed. Duplex should also be set when Speed is set to either 10 or 100. 281speed. Duplex should also be set when Speed is set to either 10 or 100.
228 282
229 283
230TxDescriptors 284TxDescriptors
@@ -234,7 +288,7 @@ Valid Range: 80-256 for 82542 and 82543-based adapters
234Default Value: 256 288Default Value: 256
235 289
236This value is the number of transmit descriptors allocated by the driver. 290This value is the number of transmit descriptors allocated by the driver.
237Increasing this value allows the driver to queue more transmits. Each 291Increasing this value allows the driver to queue more transmits. Each
238descriptor is 16 bytes. 292descriptor is 16 bytes.
239 293
240NOTE: Depending on the available system resources, the request for a 294NOTE: Depending on the available system resources, the request for a
@@ -248,8 +302,8 @@ Valid Range: 0-65535 (0=off)
248Default Value: 64 302Default Value: 64
249 303
250This value delays the generation of transmit interrupts in units of 304This value delays the generation of transmit interrupts in units of
2511.024 microseconds. Transmit interrupt reduction can improve CPU 3051.024 microseconds. Transmit interrupt reduction can improve CPU
252efficiency if properly tuned for specific network traffic. If the 306efficiency if properly tuned for specific network traffic. If the
253system is reporting dropped transmits, this value may be set too high 307system is reporting dropped transmits, this value may be set too high
254causing the driver to run out of available transmit descriptors. 308causing the driver to run out of available transmit descriptors.
255 309
@@ -261,7 +315,7 @@ Valid Range: 0-65535 (0=off)
261Default Value: 64 315Default Value: 64
262 316
263This value, in units of 1.024 microseconds, limits the delay in which a 317This value, in units of 1.024 microseconds, limits the delay in which a
264transmit interrupt is generated. Useful only if TxIntDelay is non-zero, 318transmit interrupt is generated. Useful only if TxIntDelay is non-zero,
265this value ensures that an interrupt is generated after the initial 319this value ensures that an interrupt is generated after the initial
266packet is sent on the wire within the set amount of time. Proper tuning, 320packet is sent on the wire within the set amount of time. Proper tuning,
267along with TxIntDelay, may improve traffic throughput in specific 321along with TxIntDelay, may improve traffic throughput in specific
@@ -288,15 +342,15 @@ fiber interface board only links at 1000 Mbps full-duplex.
288 342
289For copper-based boards, the keywords interact as follows: 343For copper-based boards, the keywords interact as follows:
290 344
291 The default operation is auto-negotiate. The board advertises all 345 The default operation is auto-negotiate. The board advertises all
292 supported speed and duplex combinations, and it links at the highest 346 supported speed and duplex combinations, and it links at the highest
293 common speed and duplex mode IF the link partner is set to auto-negotiate. 347 common speed and duplex mode IF the link partner is set to auto-negotiate.
294 348
295 If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps 349 If Speed = 1000, limited auto-negotiation is enabled and only 1000 Mbps
296 is advertised (The 1000BaseT spec requires auto-negotiation.) 350 is advertised (The 1000BaseT spec requires auto-negotiation.)
297 351
298 If Speed = 10 or 100, then both Speed and Duplex should be set. Auto- 352 If Speed = 10 or 100, then both Speed and Duplex should be set. Auto-
299 negotiation is disabled, and the AutoNeg parameter is ignored. Partner 353 negotiation is disabled, and the AutoNeg parameter is ignored. Partner
300 SHOULD also be forced. 354 SHOULD also be forced.
301 355
302The AutoNeg parameter is used when more control is required over the 356The AutoNeg parameter is used when more control is required over the
@@ -304,7 +358,7 @@ auto-negotiation process. It should be used when you wish to control which
304speed and duplex combinations are advertised during the auto-negotiation 358speed and duplex combinations are advertised during the auto-negotiation
305process. 359process.
306 360
307The parameter may be specified as either a decimal or hexidecimal value as 361The parameter may be specified as either a decimal or hexadecimal value as
308determined by the bitmap below. 362determined by the bitmap below.
309 363
310Bit position 7 6 5 4 3 2 1 0 364Bit position 7 6 5 4 3 2 1 0
@@ -337,20 +391,19 @@ Additional Configurations
337 391
338 Configuring the Driver on Different Distributions 392 Configuring the Driver on Different Distributions
339 ------------------------------------------------- 393 -------------------------------------------------
340
341 Configuring a network driver to load properly when the system is started 394 Configuring a network driver to load properly when the system is started
342 is distribution dependent. Typically, the configuration process involves 395 is distribution dependent. Typically, the configuration process involves
343 adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well 396 adding an alias line to /etc/modules.conf or /etc/modprobe.conf as well
344 as editing other system startup scripts and/or configuration files. Many 397 as editing other system startup scripts and/or configuration files. Many
345 popular Linux distributions ship with tools to make these changes for you. 398 popular Linux distributions ship with tools to make these changes for you.
346 To learn the proper way to configure a network device for your system, 399 To learn the proper way to configure a network device for your system,
347 refer to your distribution documentation. If during this process you are 400 refer to your distribution documentation. If during this process you are
348 asked for the driver or module name, the name for the Linux Base Driver 401 asked for the driver or module name, the name for the Linux Base Driver
349 for the Intel PRO/1000 Family of Adapters is e1000. 402 for the Intel(R) PRO/1000 Family of Adapters is e1000.
350 403
351 As an example, if you install the e1000 driver for two PRO/1000 adapters 404 As an example, if you install the e1000 driver for two PRO/1000 adapters
352 (eth0 and eth1) and set the speed and duplex to 10full and 100half, add 405 (eth0 and eth1) and set the speed and duplex to 10full and 100half, add
353 the following to modules.conf or modprobe.conf: 406 the following to modules.conf or or modprobe.conf:
354 407
355 alias eth0 e1000 408 alias eth0 e1000
356 alias eth1 e1000 409 alias eth1 e1000
@@ -358,9 +411,8 @@ Additional Configurations
358 411
359 Viewing Link Messages 412 Viewing Link Messages
360 --------------------- 413 ---------------------
361
362 Link messages will not be displayed to the console if the distribution is 414 Link messages will not be displayed to the console if the distribution is
363 restricting system messages. In order to see network driver link messages 415 restricting system messages. In order to see network driver link messages
364 on your console, set dmesg to eight by entering the following: 416 on your console, set dmesg to eight by entering the following:
365 417
366 dmesg -n 8 418 dmesg -n 8
@@ -369,11 +421,9 @@ Additional Configurations
369 421
370 Jumbo Frames 422 Jumbo Frames
371 ------------ 423 ------------
372 424 Jumbo Frames support is enabled by changing the MTU to a value larger than
373 The driver supports Jumbo Frames for all adapters except 82542 and 425 the default of 1500. Use the ifconfig command to increase the MTU size.
374 82573-based adapters. Jumbo Frames support is enabled by changing the 426 For example:
375 MTU to a value larger than the default of 1500. Use the ifconfig command
376 to increase the MTU size. For example:
377 427
378 ifconfig eth<x> mtu 9000 up 428 ifconfig eth<x> mtu 9000 up
379 429
@@ -390,26 +440,49 @@ Additional Configurations
390 440
391 - To enable Jumbo Frames, increase the MTU size on the interface beyond 441 - To enable Jumbo Frames, increase the MTU size on the interface beyond
392 1500. 442 1500.
393 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides 443
444 - The maximum MTU setting for Jumbo Frames is 16110. This value coincides
394 with the maximum Jumbo Frames size of 16128. 445 with the maximum Jumbo Frames size of 16128.
446
395 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or 447 - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or
396 loss of link. 448 loss of link.
449
397 - Some Intel gigabit adapters that support Jumbo Frames have a frame size 450 - Some Intel gigabit adapters that support Jumbo Frames have a frame size
398 limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes. 451 limit of 9238 bytes, with a corresponding MTU size limit of 9216 bytes.
399 The adapters with this limitation are based on the Intel 82571EB and 452 The adapters with this limitation are based on the Intel(R) 82571EB,
400 82572EI controllers, which correspond to these product names: 453 82572EI, 82573L and 80003ES2LAN controller. These correspond to the
401 Intel® PRO/1000 PT Dual Port Server Adapter 454 following product names:
402 Intel® PRO/1000 PF Dual Port Server Adapter 455 Intel(R) PRO/1000 PT Server Adapter
403 Intel® PRO/1000 PT Server Adapter 456 Intel(R) PRO/1000 PT Desktop Adapter
404 Intel® PRO/1000 PT Desktop Adapter 457 Intel(R) PRO/1000 PT Network Connection
405 Intel® PRO/1000 PF Server Adapter 458 Intel(R) PRO/1000 PT Dual Port Server Adapter
406 459 Intel(R) PRO/1000 PT Dual Port Network Connection
407 - The Intel PRO/1000 PM Network Connection does not support jumbo frames. 460 Intel(R) PRO/1000 PF Server Adapter
461 Intel(R) PRO/1000 PF Network Connection
462 Intel(R) PRO/1000 PF Dual Port Server Adapter
463 Intel(R) PRO/1000 PB Server Connection
464 Intel(R) PRO/1000 PL Network Connection
465 Intel(R) PRO/1000 EB Network Connection with I/O Acceleration
466 Intel(R) PRO/1000 EB Backplane Connection with I/O Acceleration
467 Intel(R) PRO/1000 PT Quad Port Server Adapter
468
469 - Adapters based on the Intel(R) 82542 and 82573V/E controller do not
470 support Jumbo Frames. These correspond to the following product names:
471 Intel(R) PRO/1000 Gigabit Server Adapter
472 Intel(R) PRO/1000 PM Network Connection
473
474 - The following adapters do not support Jumbo Frames:
475 Intel(R) 82562V 10/100 Network Connection
476 Intel(R) 82566DM Gigabit Network Connection
477 Intel(R) 82566DC Gigabit Network Connection
478 Intel(R) 82566MM Gigabit Network Connection
479 Intel(R) 82566MC Gigabit Network Connection
480 Intel(R) 82562GT 10/100 Network Connection
481 Intel(R) 82562G 10/100 Network Connection
408 482
409 483
410 Ethtool 484 Ethtool
411 ------- 485 -------
412
413 The driver utilizes the ethtool interface for driver configuration and 486 The driver utilizes the ethtool interface for driver configuration and
414 diagnostics, as well as displaying statistical information. Ethtool 487 diagnostics, as well as displaying statistical information. Ethtool
415 version 1.6 or later is required for this functionality. 488 version 1.6 or later is required for this functionality.
@@ -417,15 +490,14 @@ Additional Configurations
417 The latest release of ethtool can be found from 490 The latest release of ethtool can be found from
418 http://sourceforge.net/projects/gkernel. 491 http://sourceforge.net/projects/gkernel.
419 492
420 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support 493 NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support
421 for a more complete ethtool feature set can be enabled by upgrading 494 for a more complete ethtool feature set can be enabled by upgrading
422 ethtool to ethtool-1.8.1. 495 ethtool to ethtool-1.8.1.
423 496
424 Enabling Wake on LAN* (WoL) 497 Enabling Wake on LAN* (WoL)
425 --------------------------- 498 ---------------------------
426 499 WoL is configured through the Ethtool* utility. Ethtool is included with
427 WoL is configured through the Ethtool* utility. Ethtool is included with 500 all versions of Red Hat after Red Hat 7.2. For other Linux distributions,
428 all versions of Red Hat after Red Hat 7.2. For other Linux distributions,
429 download and install Ethtool from the following website: 501 download and install Ethtool from the following website:
430 http://sourceforge.net/projects/gkernel. 502 http://sourceforge.net/projects/gkernel.
431 503
@@ -436,11 +508,17 @@ Additional Configurations
436 For this driver version, in order to enable WoL, the e1000 driver must be 508 For this driver version, in order to enable WoL, the e1000 driver must be
437 loaded when shutting down or rebooting the system. 509 loaded when shutting down or rebooting the system.
438 510
511 Wake On LAN is only supported on port A for the following devices:
512 Intel(R) PRO/1000 PT Dual Port Network Connection
513 Intel(R) PRO/1000 PT Dual Port Server Connection
514 Intel(R) PRO/1000 PT Dual Port Server Adapter
515 Intel(R) PRO/1000 PF Dual Port Server Adapter
516 Intel(R) PRO/1000 PT Quad Port Server Adapter
517
439 NAPI 518 NAPI
440 ---- 519 ----
441 520 NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled
442 NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled 521 or disabled based on the configuration of the kernel. To override
443 or disabled based on the configuration of the kernel. To override
444 the default, use the following compile-time flags. 522 the default, use the following compile-time flags.
445 523
446 To enable NAPI, compile the driver module, passing in a configuration option: 524 To enable NAPI, compile the driver module, passing in a configuration option:
@@ -457,88 +535,105 @@ Additional Configurations
457Known Issues 535Known Issues
458============ 536============
459 537
460 Jumbo Frames System Requirement 538Dropped Receive Packets on Half-duplex 10/100 Networks
461 ------------------------------- 539------------------------------------------------------
462 540If you have an Intel PCI Express adapter running at 10mbps or 100mbps, half-
463 Memory allocation failures have been observed on Linux systems with 64 MB 541duplex, you may observe occasional dropped receive packets. There are no
464 of RAM or less that are running Jumbo Frames. If you are using Jumbo 542workarounds for this problem in this network configuration. The network must
465 Frames, your system may require more than the advertised minimum 543be updated to operate in full-duplex, and/or 1000mbps only.
466 requirement of 64 MB of system memory. 544
467 545Jumbo Frames System Requirement
468 Performance Degradation with Jumbo Frames 546-------------------------------
469 ----------------------------------------- 547Memory allocation failures have been observed on Linux systems with 64 MB
470 548of RAM or less that are running Jumbo Frames. If you are using Jumbo
471 Degradation in throughput performance may be observed in some Jumbo frames 549Frames, your system may require more than the advertised minimum
472 environments. If this is observed, increasing the application's socket 550requirement of 64 MB of system memory.
473 buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values 551
474 may help. See the specific application manual and 552Performance Degradation with Jumbo Frames
475 /usr/src/linux*/Documentation/ 553-----------------------------------------
476 networking/ip-sysctl.txt for more details. 554Degradation in throughput performance may be observed in some Jumbo frames
477 555environments. If this is observed, increasing the application's socket
478 Jumbo frames on Foundry BigIron 8000 switch 556buffer size and/or increasing the /proc/sys/net/ipv4/tcp_*mem entry values
479 ------------------------------------------- 557may help. See the specific application manual and
480 There is a known issue using Jumbo frames when connected to a Foundry 558/usr/src/linux*/Documentation/
481 BigIron 8000 switch. This is a 3rd party limitation. If you experience 559networking/ip-sysctl.txt for more details.
482 loss of packets, lower the MTU size. 560
483 561Jumbo Frames on Foundry BigIron 8000 switch
484 Multiple Interfaces on Same Ethernet Broadcast Network 562-------------------------------------------
485 ------------------------------------------------------ 563There is a known issue using Jumbo frames when connected to a Foundry
486 564BigIron 8000 switch. This is a 3rd party limitation. If you experience
487 Due to the default ARP behavior on Linux, it is not possible to have 565loss of packets, lower the MTU size.
488 one system on two IP networks in the same Ethernet broadcast domain 566
489 (non-partitioned switch) behave as expected. All Ethernet interfaces 567Allocating Rx Buffers when Using Jumbo Frames
490 will respond to IP traffic for any IP address assigned to the system. 568---------------------------------------------
491 This results in unbalanced receive traffic. 569Allocating Rx buffers when using Jumbo Frames on 2.6.x kernels may fail if
492 570the available memory is heavily fragmented. This issue may be seen with PCI-X
493 If you have multiple interfaces in a server, either turn on ARP 571adapters or with packet split disabled. This can be reduced or eliminated
494 filtering by entering: 572by changing the amount of available memory for receive buffer allocation, by
495 573increasing /proc/sys/vm/min_free_kbytes.
496 echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter 574
497 (this only works if your kernel's version is higher than 2.4.5), 575Multiple Interfaces on Same Ethernet Broadcast Network
498 576------------------------------------------------------
499 NOTE: This setting is not saved across reboots. The configuration 577Due to the default ARP behavior on Linux, it is not possible to have
500 change can be made permanent by adding the line: 578one system on two IP networks in the same Ethernet broadcast domain
501 net.ipv4.conf.all.arp_filter = 1 579(non-partitioned switch) behave as expected. All Ethernet interfaces
502 to the file /etc/sysctl.conf 580will respond to IP traffic for any IP address assigned to the system.
503 581This results in unbalanced receive traffic.
504 or, 582
505 583If you have multiple interfaces in a server, either turn on ARP
506 install the interfaces in separate broadcast domains (either in 584filtering by entering:
507 different switches or in a switch partitioned to VLANs). 585
508 586 echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
509 82541/82547 can't link or are slow to link with some link partners 587(this only works if your kernel's version is higher than 2.4.5),
510 ----------------------------------------------------------------- 588
511 589NOTE: This setting is not saved across reboots. The configuration
512 There is a known compatibility issue with 82541/82547 and some 590change can be made permanent by adding the line:
513 low-end switches where the link will not be established, or will 591 net.ipv4.conf.all.arp_filter = 1
514 be slow to establish. In particular, these switches are known to 592to the file /etc/sysctl.conf
515 be incompatible with 82541/82547: 593
516 594 or,
517 Planex FXG-08TE 595
518 I-O Data ETG-SH8 596install the interfaces in separate broadcast domains (either in
519 597different switches or in a switch partitioned to VLANs).
520 To workaround this issue, the driver can be compiled with an override 598
521 of the PHY's master/slave setting. Forcing master or forcing slave 59982541/82547 can't link or are slow to link with some link partners
522 mode will improve time-to-link. 600-----------------------------------------------------------------
523 601There is a known compatibility issue with 82541/82547 and some
524 # make EXTRA_CFLAGS=-DE1000_MASTER_SLAVE=<n> 602low-end switches where the link will not be established, or will
525 603be slow to establish. In particular, these switches are known to
526 Where <n> is: 604be incompatible with 82541/82547:
527 605
528 0 = Hardware default 606 Planex FXG-08TE
529 1 = Master mode 607 I-O Data ETG-SH8
530 2 = Slave mode 608
531 3 = Auto master/slave 609To workaround this issue, the driver can be compiled with an override
532 610of the PHY's master/slave setting. Forcing master or forcing slave
533 Disable rx flow control with ethtool 611mode will improve time-to-link.
534 ------------------------------------ 612
535 613 # make CFLAGS_EXTRA=-DE1000_MASTER_SLAVE=<n>
536 In order to disable receive flow control using ethtool, you must turn 614
537 off auto-negotiation on the same command line. 615Where <n> is:
538 616
539 For example: 617 0 = Hardware default
540 618 1 = Master mode
541 ethtool -A eth? autoneg off rx off 619 2 = Slave mode
620 3 = Auto master/slave
621
622Disable rx flow control with ethtool
623------------------------------------
624In order to disable receive flow control using ethtool, you must turn
625off auto-negotiation on the same command line.
626
627For example:
628
629 ethtool -A eth? autoneg off rx off
630
631Unplugging network cable while ethtool -p is running
632----------------------------------------------------
633In kernel versions 2.5.50 and later (including 2.6 kernel), unplugging
634the network cable while ethtool -p is running will cause the system to
635become unresponsive to keyboard commands, except for control-alt-delete.
636Restarting the system appears to be the only remedy.
542 637
543 638
544Support 639Support
@@ -548,24 +643,10 @@ For general information, go to the Intel support website at:
548 643
549 http://support.intel.com 644 http://support.intel.com
550 645
551 or the Intel Wired Networking project hosted by Sourceforge at: 646or the Intel Wired Networking project hosted by Sourceforge at:
552 647
553 http://sourceforge.net/projects/e1000 648 http://sourceforge.net/projects/e1000
554 649
555If an issue is identified with the released source code on the supported 650If an issue is identified with the released source code on the supported
556kernel with a supported adapter, email the specific information related 651kernel with a supported adapter, email the specific information related
557to the issue to e1000-devel@lists.sourceforge.net 652to the issue to e1000-devel@lists.sf.net
558
559
560License
561=======
562
563This software program is released under the terms of a license agreement
564between you ('Licensee') and Intel. Do not use or load this software or any
565associated materials (collectively, the 'Software') until you have carefully
566read the full terms and conditions of the file COPYING located in this software
567package. By loading or using the Software, you agree to the terms of this
568Agreement. If you do not agree with the terms of this Agreement, do not
569install or use the Software.
570
571* Other names and brands may be claimed as the property of others.
diff --git a/Documentation/networking/generic_netlink.txt b/Documentation/networking/generic_netlink.txt
new file mode 100644
index 000000000000..d4f8b8b9b53c
--- /dev/null
+++ b/Documentation/networking/generic_netlink.txt
@@ -0,0 +1,3 @@
1A wiki document on how to use Generic Netlink can be found here:
2
3 * http://linux-net.osdl.org/index.php/Generic_Netlink_HOWTO
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index fd3c0c012351..a0f6842368c3 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -101,6 +101,11 @@ inet_peer_gc_maxtime - INTEGER
101 101
102TCP variables: 102TCP variables:
103 103
104somaxconn - INTEGER
105 Limit of socket listen() backlog, known in userspace as SOMAXCONN.
106 Defaults to 128. See also tcp_max_syn_backlog for additional tuning
107 for TCP sockets.
108
104tcp_abc - INTEGER 109tcp_abc - INTEGER
105 Controls Appropriate Byte Count (ABC) defined in RFC3465. 110 Controls Appropriate Byte Count (ABC) defined in RFC3465.
106 ABC is a way of increasing congestion window (cwnd) more slowly 111 ABC is a way of increasing congestion window (cwnd) more slowly
@@ -112,48 +117,51 @@ tcp_abc - INTEGER
112 of two segments to compensate for delayed acknowledgments. 117 of two segments to compensate for delayed acknowledgments.
113 Default: 0 (off) 118 Default: 0 (off)
114 119
115tcp_syn_retries - INTEGER 120tcp_abort_on_overflow - BOOLEAN
116 Number of times initial SYNs for an active TCP connection attempt 121 If listening service is too slow to accept new connections,
117 will be retransmitted. Should not be higher than 255. Default value 122 reset them. Default state is FALSE. It means that if overflow
118 is 5, which corresponds to ~180seconds. 123 occurred due to a burst, connection will recover. Enable this
124 option _only_ if you are really sure that listening daemon
125 cannot be tuned to accept connections faster. Enabling this
126 option can harm clients of your server.
119 127
120tcp_synack_retries - INTEGER 128tcp_adv_win_scale - INTEGER
121 Number of times SYNACKs for a passive TCP connection attempt will 129 Count buffering overhead as bytes/2^tcp_adv_win_scale
122 be retransmitted. Should not be higher than 255. Default value 130 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
123 is 5, which corresponds to ~180seconds. 131 if it is <= 0.
132 Default: 2
124 133
125tcp_keepalive_time - INTEGER 134tcp_allowed_congestion_control - STRING
126 How often TCP sends out keepalive messages when keepalive is enabled. 135 Show/set the congestion control choices available to non-privileged
127 Default: 2hours. 136 processes. The list is a subset of those listed in
137 tcp_available_congestion_control.
138 Default is "reno" and the default setting (tcp_congestion_control).
128 139
129tcp_keepalive_probes - INTEGER 140tcp_app_win - INTEGER
130 How many keepalive probes TCP sends out, until it decides that the 141 Reserve max(window/2^tcp_app_win, mss) of window for application
131 connection is broken. Default value: 9. 142 buffer. Value 0 is special, it means that nothing is reserved.
143 Default: 31
132 144
133tcp_keepalive_intvl - INTEGER 145tcp_available_congestion_control - STRING
134 How frequently the probes are send out. Multiplied by 146 Shows the available congestion control choices that are registered.
135 tcp_keepalive_probes it is time to kill not responding connection, 147 More congestion control algorithms may be available as modules,
136 after probes started. Default value: 75sec i.e. connection 148 but not loaded.
137 will be aborted after ~11 minutes of retries.
138 149
139tcp_retries1 - INTEGER 150tcp_congestion_control - STRING
140 How many times to retry before deciding that something is wrong 151 Set the congestion control algorithm to be used for new
141 and it is necessary to report this suspicion to network layer. 152 connections. The algorithm "reno" is always available, but
142 Minimal RFC value is 3, it is default, which corresponds 153 additional choices may be available based on kernel configuration.
143 to ~3sec-8min depending on RTO. 154 Default is set as part of kernel configuration.
144 155
145tcp_retries2 - INTEGER 156tcp_dsack - BOOLEAN
146 How may times to retry before killing alive TCP connection. 157 Allows TCP to send "duplicate" SACKs.
147 RFC1122 says that the limit should be longer than 100 sec.
148 It is too small number. Default value 15 corresponds to ~13-30min
149 depending on RTO.
150 158
151tcp_orphan_retries - INTEGER 159tcp_ecn - BOOLEAN
152 How may times to retry before killing TCP connection, closed 160 Enable Explicit Congestion Notification in TCP.
153 by our side. Default value 7 corresponds to ~50sec-16min 161
154 depending on RTO. If you machine is loaded WEB server, 162tcp_fack - BOOLEAN
155 you should think about lowering this value, such sockets 163 Enable FACK congestion avoidance and fast retransmission.
156 may consume significant resources. Cf. tcp_max_orphans. 164 The value is not used, if tcp_sack is not enabled.
157 165
158tcp_fin_timeout - INTEGER 166tcp_fin_timeout - INTEGER
159 Time to hold socket in state FIN-WAIT-2, if it was closed 167 Time to hold socket in state FIN-WAIT-2, if it was closed
@@ -166,24 +174,33 @@ tcp_fin_timeout - INTEGER
166 because they eat maximum 1.5K of memory, but they tend 174 because they eat maximum 1.5K of memory, but they tend
167 to live longer. Cf. tcp_max_orphans. 175 to live longer. Cf. tcp_max_orphans.
168 176
169tcp_max_tw_buckets - INTEGER 177tcp_frto - BOOLEAN
170 Maximal number of timewait sockets held by system simultaneously. 178 Enables F-RTO, an enhanced recovery algorithm for TCP retransmission
171 If this number is exceeded time-wait socket is immediately destroyed 179 timeouts. It is particularly beneficial in wireless environments
172 and warning is printed. This limit exists only to prevent 180 where packet loss is typically due to random radio interference
173 simple DoS attacks, you _must_ not lower the limit artificially, 181 rather than intermediate router congestion.
174 but rather increase it (probably, after increasing installed memory),
175 if network conditions require more than default value.
176 182
177tcp_tw_recycle - BOOLEAN 183tcp_keepalive_time - INTEGER
178 Enable fast recycling TIME-WAIT sockets. Default value is 0. 184 How often TCP sends out keepalive messages when keepalive is enabled.
179 It should not be changed without advice/request of technical 185 Default: 2hours.
180 experts.
181 186
182tcp_tw_reuse - BOOLEAN 187tcp_keepalive_probes - INTEGER
183 Allow to reuse TIME-WAIT sockets for new connections when it is 188 How many keepalive probes TCP sends out, until it decides that the
184 safe from protocol viewpoint. Default value is 0. 189 connection is broken. Default value: 9.
185 It should not be changed without advice/request of technical 190
186 experts. 191tcp_keepalive_intvl - INTEGER
192 How frequently the probes are send out. Multiplied by
193 tcp_keepalive_probes it is time to kill not responding connection,
194 after probes started. Default value: 75sec i.e. connection
195 will be aborted after ~11 minutes of retries.
196
197tcp_low_latency - BOOLEAN
198 If set, the TCP stack makes decisions that prefer lower
199 latency as opposed to higher throughput. By default, this
200 option is not set meaning that higher throughput is preferred.
201 An example of an application where this default should be
202 changed would be a Beowulf compute cluster.
203 Default: 0
187 204
188tcp_max_orphans - INTEGER 205tcp_max_orphans - INTEGER
189 Maximal number of TCP sockets not attached to any user file handle, 206 Maximal number of TCP sockets not attached to any user file handle,
@@ -197,41 +214,6 @@ tcp_max_orphans - INTEGER
197 more aggressively. Let me to remind again: each orphan eats 214 more aggressively. Let me to remind again: each orphan eats
198 up to ~64K of unswappable memory. 215 up to ~64K of unswappable memory.
199 216
200tcp_abort_on_overflow - BOOLEAN
201 If listening service is too slow to accept new connections,
202 reset them. Default state is FALSE. It means that if overflow
203 occurred due to a burst, connection will recover. Enable this
204 option _only_ if you are really sure that listening daemon
205 cannot be tuned to accept connections faster. Enabling this
206 option can harm clients of your server.
207
208tcp_syncookies - BOOLEAN
209 Only valid when the kernel was compiled with CONFIG_SYNCOOKIES
210 Send out syncookies when the syn backlog queue of a socket
211 overflows. This is to prevent against the common 'syn flood attack'
212 Default: FALSE
213
214 Note, that syncookies is fallback facility.
215 It MUST NOT be used to help highly loaded servers to stand
216 against legal connection rate. If you see synflood warnings
217 in your logs, but investigation shows that they occur
218 because of overload with legal connections, you should tune
219 another parameters until this warning disappear.
220 See: tcp_max_syn_backlog, tcp_synack_retries, tcp_abort_on_overflow.
221
222 syncookies seriously violate TCP protocol, do not allow
223 to use TCP extensions, can result in serious degradation
224 of some services (f.e. SMTP relaying), visible not by you,
225 but your clients and relays, contacting you. While you see
226 synflood warnings in logs not being really flooded, your server
227 is seriously misconfigured.
228
229tcp_stdurg - BOOLEAN
230 Use the Host requirements interpretation of the TCP urg pointer field.
231 Most hosts use the older BSD interpretation, so if you turn this on
232 Linux might not communicate correctly with them.
233 Default: FALSE
234
235tcp_max_syn_backlog - INTEGER 217tcp_max_syn_backlog - INTEGER
236 Maximal number of remembered connection requests, which are 218 Maximal number of remembered connection requests, which are
237 still did not receive an acknowledgment from connecting client. 219 still did not receive an acknowledgment from connecting client.
@@ -239,24 +221,34 @@ tcp_max_syn_backlog - INTEGER
239 and 128 for low memory machines. If server suffers of overload, 221 and 128 for low memory machines. If server suffers of overload,
240 try to increase this number. 222 try to increase this number.
241 223
242tcp_window_scaling - BOOLEAN 224tcp_max_tw_buckets - INTEGER
243 Enable window scaling as defined in RFC1323. 225 Maximal number of timewait sockets held by system simultaneously.
226 If this number is exceeded time-wait socket is immediately destroyed
227 and warning is printed. This limit exists only to prevent
228 simple DoS attacks, you _must_ not lower the limit artificially,
229 but rather increase it (probably, after increasing installed memory),
230 if network conditions require more than default value.
244 231
245tcp_timestamps - BOOLEAN 232tcp_mem - vector of 3 INTEGERs: min, pressure, max
246 Enable timestamps as defined in RFC1323. 233 min: below this number of pages TCP is not bothered about its
234 memory appetite.
247 235
248tcp_sack - BOOLEAN 236 pressure: when amount of memory allocated by TCP exceeds this number
249 Enable select acknowledgments (SACKS). 237 of pages, TCP moderates its memory consumption and enters memory
238 pressure mode, which is exited when memory consumption falls
239 under "min".
250 240
251tcp_fack - BOOLEAN 241 max: number of pages allowed for queueing by all TCP sockets.
252 Enable FACK congestion avoidance and fast retransmission.
253 The value is not used, if tcp_sack is not enabled.
254 242
255tcp_dsack - BOOLEAN 243 Defaults are calculated at boot time from amount of available
256 Allows TCP to send "duplicate" SACKs. 244 memory.
257 245
258tcp_ecn - BOOLEAN 246tcp_orphan_retries - INTEGER
259 Enable Explicit Congestion Notification in TCP. 247 How may times to retry before killing TCP connection, closed
248 by our side. Default value 7 corresponds to ~50sec-16min
249 depending on RTO. If you machine is loaded WEB server,
250 you should think about lowering this value, such sockets
251 may consume significant resources. Cf. tcp_max_orphans.
260 252
261tcp_reordering - INTEGER 253tcp_reordering - INTEGER
262 Maximal reordering of packets in a TCP stream. 254 Maximal reordering of packets in a TCP stream.
@@ -267,20 +259,23 @@ tcp_retrans_collapse - BOOLEAN
267 On retransmit try to send bigger packets to work around bugs in 259 On retransmit try to send bigger packets to work around bugs in
268 certain TCP stacks. 260 certain TCP stacks.
269 261
270tcp_wmem - vector of 3 INTEGERs: min, default, max 262tcp_retries1 - INTEGER
271 min: Amount of memory reserved for send buffers for TCP socket. 263 How many times to retry before deciding that something is wrong
272 Each TCP socket has rights to use it due to fact of its birth. 264 and it is necessary to report this suspicion to network layer.
273 Default: 4K 265 Minimal RFC value is 3, it is default, which corresponds
266 to ~3sec-8min depending on RTO.
274 267
275 default: Amount of memory allowed for send buffers for TCP socket 268tcp_retries2 - INTEGER
276 by default. This value overrides net.core.wmem_default used 269 How may times to retry before killing alive TCP connection.
277 by other protocols, it is usually lower than net.core.wmem_default. 270 RFC1122 says that the limit should be longer than 100 sec.
278 Default: 16K 271 It is too small number. Default value 15 corresponds to ~13-30min
272 depending on RTO.
279 273
280 max: Maximal amount of memory allowed for automatically selected 274tcp_rfc1337 - BOOLEAN
281 send buffers for TCP socket. This value does not override 275 If set, the TCP stack behaves conforming to RFC1337. If unset,
282 net.core.wmem_max, "static" selection via SO_SNDBUF does not use this. 276 we are not conforming to RFC, but prevent TCP TIME_WAIT
283 Default: 128K 277 assassination.
278 Default: 0
284 279
285tcp_rmem - vector of 3 INTEGERs: min, default, max 280tcp_rmem - vector of 3 INTEGERs: min, default, max
286 min: Minimal size of receive buffer used by TCP sockets. 281 min: Minimal size of receive buffer used by TCP sockets.
@@ -299,67 +294,91 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
299 net.core.rmem_max, "static" selection via SO_RCVBUF does not use this. 294 net.core.rmem_max, "static" selection via SO_RCVBUF does not use this.
300 Default: 87380*2 bytes. 295 Default: 87380*2 bytes.
301 296
302tcp_mem - vector of 3 INTEGERs: min, pressure, max 297tcp_sack - BOOLEAN
303 min: below this number of pages TCP is not bothered about its 298 Enable select acknowledgments (SACKS).
304 memory appetite.
305 299
306 pressure: when amount of memory allocated by TCP exceeds this number 300tcp_slow_start_after_idle - BOOLEAN
307 of pages, TCP moderates its memory consumption and enters memory 301 If set, provide RFC2861 behavior and time out the congestion
308 pressure mode, which is exited when memory consumption falls 302 window after an idle period. An idle period is defined at
309 under "min". 303 the current RTO. If unset, the congestion window will not
304 be timed out after an idle period.
305 Default: 1
310 306
311 max: number of pages allowed for queueing by all TCP sockets. 307tcp_stdurg - BOOLEAN
308 Use the Host requirements interpretation of the TCP urg pointer field.
309 Most hosts use the older BSD interpretation, so if you turn this on
310 Linux might not communicate correctly with them.
311 Default: FALSE
312 312
313 Defaults are calculated at boot time from amount of available 313tcp_synack_retries - INTEGER
314 memory. 314 Number of times SYNACKs for a passive TCP connection attempt will
315 be retransmitted. Should not be higher than 255. Default value
316 is 5, which corresponds to ~180seconds.
315 317
316tcp_app_win - INTEGER 318tcp_syncookies - BOOLEAN
317 Reserve max(window/2^tcp_app_win, mss) of window for application 319 Only valid when the kernel was compiled with CONFIG_SYNCOOKIES
318 buffer. Value 0 is special, it means that nothing is reserved. 320 Send out syncookies when the syn backlog queue of a socket
319 Default: 31 321 overflows. This is to prevent against the common 'syn flood attack'
322 Default: FALSE
320 323
321tcp_adv_win_scale - INTEGER 324 Note, that syncookies is fallback facility.
322 Count buffering overhead as bytes/2^tcp_adv_win_scale 325 It MUST NOT be used to help highly loaded servers to stand
323 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), 326 against legal connection rate. If you see synflood warnings
324 if it is <= 0. 327 in your logs, but investigation shows that they occur
325 Default: 2 328 because of overload with legal connections, you should tune
329 another parameters until this warning disappear.
330 See: tcp_max_syn_backlog, tcp_synack_retries, tcp_abort_on_overflow.
326 331
327tcp_rfc1337 - BOOLEAN 332 syncookies seriously violate TCP protocol, do not allow
328 If set, the TCP stack behaves conforming to RFC1337. If unset, 333 to use TCP extensions, can result in serious degradation
329 we are not conforming to RFC, but prevent TCP TIME_WAIT 334 of some services (f.e. SMTP relaying), visible not by you,
330 assassination. 335 but your clients and relays, contacting you. While you see
331 Default: 0 336 synflood warnings in logs not being really flooded, your server
337 is seriously misconfigured.
332 338
333tcp_low_latency - BOOLEAN 339tcp_syn_retries - INTEGER
334 If set, the TCP stack makes decisions that prefer lower 340 Number of times initial SYNs for an active TCP connection attempt
335 latency as opposed to higher throughput. By default, this 341 will be retransmitted. Should not be higher than 255. Default value
336 option is not set meaning that higher throughput is preferred. 342 is 5, which corresponds to ~180seconds.
337 An example of an application where this default should be 343
338 changed would be a Beowulf compute cluster. 344tcp_timestamps - BOOLEAN
339 Default: 0 345 Enable timestamps as defined in RFC1323.
340 346
341tcp_tso_win_divisor - INTEGER 347tcp_tso_win_divisor - INTEGER
342 This allows control over what percentage of the congestion window 348 This allows control over what percentage of the congestion window
343 can be consumed by a single TSO frame. 349 can be consumed by a single TSO frame.
344 The setting of this parameter is a choice between burstiness and 350 The setting of this parameter is a choice between burstiness and
345 building larger TSO frames. 351 building larger TSO frames.
346 Default: 3 352 Default: 3
347 353
348tcp_frto - BOOLEAN 354tcp_tw_recycle - BOOLEAN
349 Enables F-RTO, an enhanced recovery algorithm for TCP retransmission 355 Enable fast recycling TIME-WAIT sockets. Default value is 0.
350 timeouts. It is particularly beneficial in wireless environments 356 It should not be changed without advice/request of technical
351 where packet loss is typically due to random radio interference 357 experts.
352 rather than intermediate router congestion.
353 358
354tcp_congestion_control - STRING 359tcp_tw_reuse - BOOLEAN
355 Set the congestion control algorithm to be used for new 360 Allow to reuse TIME-WAIT sockets for new connections when it is
356 connections. The algorithm "reno" is always available, but 361 safe from protocol viewpoint. Default value is 0.
357 additional choices may be available based on kernel configuration. 362 It should not be changed without advice/request of technical
363 experts.
358 364
359somaxconn - INTEGER 365tcp_window_scaling - BOOLEAN
360 Limit of socket listen() backlog, known in userspace as SOMAXCONN. 366 Enable window scaling as defined in RFC1323.
361 Defaults to 128. See also tcp_max_syn_backlog for additional tuning 367
362 for TCP sockets. 368tcp_wmem - vector of 3 INTEGERs: min, default, max
369 min: Amount of memory reserved for send buffers for TCP socket.
370 Each TCP socket has rights to use it due to fact of its birth.
371 Default: 4K
372
373 default: Amount of memory allowed for send buffers for TCP socket
374 by default. This value overrides net.core.wmem_default used
375 by other protocols, it is usually lower than net.core.wmem_default.
376 Default: 16K
377
378 max: Maximal amount of memory allowed for automatically selected
379 send buffers for TCP socket. This value does not override
380 net.core.wmem_max, "static" selection via SO_SNDBUF does not use this.
381 Default: 128K
363 382
364tcp_workaround_signed_windows - BOOLEAN 383tcp_workaround_signed_windows - BOOLEAN
365 If set, assume no receipt of a window scaling option means the 384 If set, assume no receipt of a window scaling option means the
@@ -368,13 +387,6 @@ tcp_workaround_signed_windows - BOOLEAN
368 not receive a window scaling option from them. 387 not receive a window scaling option from them.
369 Default: 0 388 Default: 0
370 389
371tcp_slow_start_after_idle - BOOLEAN
372 If set, provide RFC2861 behavior and time out the congestion
373 window after an idle period. An idle period is defined at
374 the current RTO. If unset, the congestion window will not
375 be timed out after an idle period.
376 Default: 1
377
378CIPSOv4 Variables: 390CIPSOv4 Variables:
379 391
380cipso_cache_enable - BOOLEAN 392cipso_cache_enable - BOOLEAN
@@ -974,4 +986,3 @@ no_cong_thresh FIXME
974slot_timeout FIXME 986slot_timeout FIXME
975warn_noreply_time FIXME 987warn_noreply_time FIXME
976 988
977$Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $
diff --git a/Documentation/networking/iphase.txt b/Documentation/networking/iphase.txt
index 493203a080a8..55eac4a784e2 100644
--- a/Documentation/networking/iphase.txt
+++ b/Documentation/networking/iphase.txt
@@ -81,7 +81,7 @@ Installation
81 1M. The RAM size decides the number of buffers and buffer size. The default 81 1M. The RAM size decides the number of buffers and buffer size. The default
82 size and number of buffers are set as following: 82 size and number of buffers are set as following:
83 83
84 Totol Rx RAM Tx RAM Rx Buf Tx Buf Rx buf Tx buf 84 Total Rx RAM Tx RAM Rx Buf Tx Buf Rx buf Tx buf
85 RAM size size size size size cnt cnt 85 RAM size size size size size cnt cnt
86 -------- ------ ------ ------ ------ ------ ------ 86 -------- ------ ------ ------ ------ ------ ------
87 128K 64K 64K 10K 10K 6 6 87 128K 64K 64K 10K 10K 6 6
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 12a008a5c221..5a232d946be3 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -284,7 +284,7 @@ the necessary memory, so normally limits can be reached.
284------------------- 284-------------------
285 285
286If you check the source code you will see that what I draw here as a frame 286If you check the source code you will see that what I draw here as a frame
287is not only the link level frame. At the begining of each frame there is a 287is not only the link level frame. At the beginning of each frame there is a
288header called struct tpacket_hdr used in PACKET_MMAP to hold link level's frame 288header called struct tpacket_hdr used in PACKET_MMAP to hold link level's frame
289meta information like timestamp. So what we draw here a frame it's really 289meta information like timestamp. So what we draw here a frame it's really
290the following (from include/linux/if_packet.h): 290the following (from include/linux/if_packet.h):
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index 29ccae409031..0bc95eab1512 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -1,7 +1,7 @@
1 1
2------- 2-------
3PHY Abstraction Layer 3PHY Abstraction Layer
4(Updated 2005-07-21) 4(Updated 2006-11-30)
5 5
6Purpose 6Purpose
7 7
@@ -97,11 +97,12 @@ Letting the PHY Abstraction Layer do Everything
97 97
98 Next, you need to know the device name of the PHY connected to this device. 98 Next, you need to know the device name of the PHY connected to this device.
99 The name will look something like, "phy0:0", where the first number is the 99 The name will look something like, "phy0:0", where the first number is the
100 bus id, and the second is the PHY's address on that bus. 100 bus id, and the second is the PHY's address on that bus. Typically,
101 the bus is responsible for making its ID unique.
101 102
102 Now, to connect, just call this function: 103 Now, to connect, just call this function:
103 104
104 phydev = phy_connect(dev, phy_name, &adjust_link, flags); 105 phydev = phy_connect(dev, phy_name, &adjust_link, flags, interface);
105 106
106 phydev is a pointer to the phy_device structure which represents the PHY. If 107 phydev is a pointer to the phy_device structure which represents the PHY. If
107 phy_connect is successful, it will return the pointer. dev, here, is the 108 phy_connect is successful, it will return the pointer. dev, here, is the
@@ -115,6 +116,10 @@ Letting the PHY Abstraction Layer do Everything
115 This is useful if the system has put hardware restrictions on 116 This is useful if the system has put hardware restrictions on
116 the PHY/controller, of which the PHY needs to be aware. 117 the PHY/controller, of which the PHY needs to be aware.
117 118
119 interface is a u32 which specifies the connection type used
120 between the controller and the PHY. Examples are GMII, MII,
121 RGMII, and SGMII. For a full list, see include/linux/phy.h
122
118 Now just make sure that phydev->supported and phydev->advertising have any 123 Now just make sure that phydev->supported and phydev->advertising have any
119 values pruned from them which don't make sense for your controller (a 10/100 124 values pruned from them which don't make sense for your controller (a 10/100
120 controller may be connected to a gigabit capable PHY, so you would need to 125 controller may be connected to a gigabit capable PHY, so you would need to
@@ -191,7 +196,7 @@ Doing it all yourself
191 start, or disables then frees them for stop. 196 start, or disables then frees them for stop.
192 197
193 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id, 198 struct phy_device * phy_attach(struct net_device *dev, const char *phy_id,
194 u32 flags); 199 u32 flags, phy_interface_t interface);
195 200
196 Attaches a network device to a particular PHY, binding the PHY to a generic 201 Attaches a network device to a particular PHY, binding the PHY to a generic
197 driver if none was found during bus initialization. Passes in 202 driver if none was found during bus initialization. Passes in
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index c8eee23be8c0..c6cf4a3c16e0 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -63,8 +63,8 @@ Current:
63Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags) 63Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags)
64 763292pps 390Mb/sec (390805504bps) errors: 39664 64 763292pps 390Mb/sec (390805504bps) errors: 39664
65 65
66Confguring threads and devices 66Configuring threads and devices
67============================== 67================================
68This is done via the /proc interface easiest done via pgset in the scripts 68This is done via the /proc interface easiest done via pgset in the scripts
69 69
70Examples: 70Examples:
@@ -116,7 +116,7 @@ Examples:
116 there must be no spaces between the 116 there must be no spaces between the
117 arguments. Leading zeros are required. 117 arguments. Leading zeros are required.
118 Do not set the bottom of stack bit, 118 Do not set the bottom of stack bit,
119 thats done automatically. If you do 119 that's done automatically. If you do
120 set the bottom of stack bit, that 120 set the bottom of stack bit, that
121 indicates that you want to randomly 121 indicates that you want to randomly
122 generate that address and the flag 122 generate that address and the flag
diff --git a/Documentation/networking/proc_net_tcp.txt b/Documentation/networking/proc_net_tcp.txt
index 59cb915c3713..5e21f7cb6383 100644
--- a/Documentation/networking/proc_net_tcp.txt
+++ b/Documentation/networking/proc_net_tcp.txt
@@ -25,7 +25,7 @@ up into 3 parts because of the length of the line):
25 25
26 1000 0 54165785 4 cd1e6040 25 4 27 3 -1 26 1000 0 54165785 4 cd1e6040 25 4 27 3 -1
27 | | | | | | | | | |--> slow start size threshold, 27 | | | | | | | | | |--> slow start size threshold,
28 | | | | | | | | | or -1 if the treshold 28 | | | | | | | | | or -1 if the threshold
29 | | | | | | | | | is >= 0xFFFF 29 | | | | | | | | | is >= 0xFFFF
30 | | | | | | | | |----> sending congestion window 30 | | | | | | | | |----> sending congestion window
31 | | | | | | | |-------> (ack.quick<<1)|ack.pingpong 31 | | | | | | | |-------> (ack.quick<<1)|ack.pingpong
diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt
index 4e1cc745ec63..8590a954df1d 100644
--- a/Documentation/networking/sk98lin.txt
+++ b/Documentation/networking/sk98lin.txt
@@ -346,7 +346,7 @@ Possible modes:
346 depending on the load of the system. If the driver detects that the 346 depending on the load of the system. If the driver detects that the
347 system load is too high, the driver tries to shield the system against 347 system load is too high, the driver tries to shield the system against
348 too much network load by enabling interrupt moderation. If - at a later 348 too much network load by enabling interrupt moderation. If - at a later
349 time - the CPU utilizaton decreases again (or if the network load is 349 time - the CPU utilization decreases again (or if the network load is
350 negligible) the interrupt moderation will automatically be disabled. 350 negligible) the interrupt moderation will automatically be disabled.
351 351
352Interrupt moderation should be used when the driver has to handle one or more 352Interrupt moderation should be used when the driver has to handle one or more
diff --git a/Documentation/networking/slicecom.txt b/Documentation/networking/slicecom.txt
index 2f04c9267f89..32d3b916afad 100644
--- a/Documentation/networking/slicecom.txt
+++ b/Documentation/networking/slicecom.txt
@@ -126,7 +126,7 @@ comx0/boardnum - board number of the SliceCom in the PC (using the 'natural'
126 126
127Though the options below are to be set on a single interface, they apply to the 127Though the options below are to be set on a single interface, they apply to the
128whole board. The restriction, to use them on 'UP' interfaces, is because the 128whole board. The restriction, to use them on 'UP' interfaces, is because the
129command sequence below could lead to unpredicable results. 129command sequence below could lead to unpredictable results.
130 130
131 # echo 0 >boardnum 131 # echo 0 >boardnum
132 # echo internal >clock_source 132 # echo internal >clock_source
diff --git a/Documentation/networking/udplite.txt b/Documentation/networking/udplite.txt
new file mode 100644
index 000000000000..dd6f46b83dab
--- /dev/null
+++ b/Documentation/networking/udplite.txt
@@ -0,0 +1,281 @@
1 ===========================================================================
2 The UDP-Lite protocol (RFC 3828)
3 ===========================================================================
4
5
6 UDP-Lite is a Standards-Track IETF transport protocol whose characteristic
7 is a variable-length checksum. This has advantages for transport of multimedia
8 (video, VoIP) over wireless networks, as partly damaged packets can still be
9 fed into the codec instead of being discarded due to a failed checksum test.
10
11 This file briefly describes the existing kernel support and the socket API.
12 For in-depth information, you can consult:
13
14 o The UDP-Lite Homepage: http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/
15 Fom here you can also download some example application source code.
16
17 o The UDP-Lite HOWTO on
18 http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/UDP-Lite-HOWTO.txt
19
20 o The Wireshark UDP-Lite WiKi (with capture files):
21 http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol
22
23 o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt
24
25
26 I) APPLICATIONS
27
28 Several applications have been ported successfully to UDP-Lite. Ethereal
29 (now called wireshark) has UDP-Litev4/v6 support by default. The tarball on
30
31 http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/udplite_linux.tar.gz
32
33 has source code for several v4/v6 client-server and network testing examples.
34
35 Porting applications to UDP-Lite is straightforward: only socket level and
36 IPPROTO need to be changed; senders additionally set the checksum coverage
37 length (default = header length = 8). Details are in the next section.
38
39
40 II) PROGRAMMING API
41
42 UDP-Lite provides a connectionless, unreliable datagram service and hence
43 uses the same socket type as UDP. In fact, porting from UDP to UDP-Lite is
44 very easy: simply add `IPPROTO_UDPLITE' as the last argument of the socket(2)
45 call so that the statement looks like:
46
47 s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);
48
49 or, respectively,
50
51 s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDPLITE);
52
53 With just the above change you are able to run UDP-Lite services or connect
54 to UDP-Lite servers. The kernel will assume that you are not interested in
55 using partial checksum coverage and so emulate UDP mode (full coverage).
56
57 To make use of the partial checksum coverage facilities requires setting a
58 single socket option, which takes an integer specifying the coverage length:
59
60 * Sender checksum coverage: UDPLITE_SEND_CSCOV
61
62 For example,
63
64 int val = 20;
65 setsockopt(s, SOL_UDPLITE, UDPLITE_SEND_CSCOV, &val, sizeof(int));
66
67 sets the checksum coverage length to 20 bytes (12b data + 8b header).
68 Of each packet only the first 20 bytes (plus the pseudo-header) will be
69 checksummed. This is useful for RTP applications which have a 12-byte
70 base header.
71
72
73 * Receiver checksum coverage: UDPLITE_RECV_CSCOV
74
75 This option is the receiver-side analogue. It is truly optional, i.e. not
76 required to enable traffic with partial checksum coverage. Its function is
77 that of a traffic filter: when enabled, it instructs the kernel to drop
78 all packets which have a coverage _less_ than this value. For example, if
79 RTP and UDP headers are to be protected, a receiver can enforce that only
80 packets with a minimum coverage of 20 are admitted:
81
82 int min = 20;
83 setsockopt(s, SOL_UDPLITE, UDPLITE_RECV_CSCOV, &min, sizeof(int));
84
85 The calls to getsockopt(2) are analogous. Being an extension and not a stand-
86 alone protocol, all socket options known from UDP can be used in exactly the
87 same manner as before, e.g. UDP_CORK or UDP_ENCAP.
88
89 A detailed discussion of UDP-Lite checksum coverage options is in section IV.
90
91
92 III) HEADER FILES
93
94 The socket API requires support through header files in /usr/include:
95
96 * /usr/include/netinet/in.h
97 to define IPPROTO_UDPLITE
98
99 * /usr/include/netinet/udplite.h
100 for UDP-Lite header fields and protocol constants
101
102 For testing purposes, the following can serve as a `mini' header file:
103
104 #define IPPROTO_UDPLITE 136
105 #define SOL_UDPLITE 136
106 #define UDPLITE_SEND_CSCOV 10
107 #define UDPLITE_RECV_CSCOV 11
108
109 Ready-made header files for various distros are in the UDP-Lite tarball.
110
111
112 IV) KERNEL BEHAVIOUR WITH REGARD TO THE VARIOUS SOCKET OPTIONS
113
114 To enable debugging messages, the log level need to be set to 8, as most
115 messages use the KERN_DEBUG level (7).
116
117 1) Sender Socket Options
118
119 If the sender specifies a value of 0 as coverage length, the module
120 assumes full coverage, transmits a packet with coverage length of 0
121 and according checksum. If the sender specifies a coverage < 8 and
122 different from 0, the kernel assumes 8 as default value. Finally,
123 if the specified coverage length exceeds the packet length, the packet
124 length is used instead as coverage length.
125
126 2) Receiver Socket Options
127
128 The receiver specifies the minimum value of the coverage length it
129 is willing to accept. A value of 0 here indicates that the receiver
130 always wants the whole of the packet covered. In this case, all
131 partially covered packets are dropped and an error is logged.
132
133 It is not possible to specify illegal values (<0 and <8); in these
134 cases the default of 8 is assumed.
135
136 All packets arriving with a coverage value less than the specified
137 threshold are discarded, these events are also logged.
138
139 3) Disabling the Checksum Computation
140
141 On both sender and receiver, checksumming will always be performed
142 and can not be disabled using SO_NO_CHECK. Thus
143
144 setsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, ... );
145
146 will always will be ignored, while the value of
147
148 getsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, &value, ...);
149
150 is meaningless (as in TCP). Packets with a zero checksum field are
151 illegal (cf. RFC 3828, sec. 3.1) will be silently discarded.
152
153 4) Fragmentation
154
155 The checksum computation respects both buffersize and MTU. The size
156 of UDP-Lite packets is determined by the size of the send buffer. The
157 minimum size of the send buffer is 2048 (defined as SOCK_MIN_SNDBUF
158 in include/net/sock.h), the default value is configurable as
159 net.core.wmem_default or via setting the SO_SNDBUF socket(7)
160 option. The maximum upper bound for the send buffer is determined
161 by net.core.wmem_max.
162
163 Given a payload size larger than the send buffer size, UDP-Lite will
164 split the payload into several individual packets, filling up the
165 send buffer size in each case.
166
167 The precise value also depends on the interface MTU. The interface MTU,
168 in turn, may trigger IP fragmentation. In this case, the generated
169 UDP-Lite packet is split into several IP packets, of which only the
170 first one contains the L4 header.
171
172 The send buffer size has implications on the checksum coverage length.
173 Consider the following example:
174
175 Payload: 1536 bytes Send Buffer: 1024 bytes
176 MTU: 1500 bytes Coverage Length: 856 bytes
177
178 UDP-Lite will ship the 1536 bytes in two separate packets:
179
180 Packet 1: 1024 payload + 8 byte header + 20 byte IP header = 1052 bytes
181 Packet 2: 512 payload + 8 byte header + 20 byte IP header = 540 bytes
182
183 The coverage packet covers the UDP-Lite header and 848 bytes of the
184 payload in the first packet, the second packet is fully covered. Note
185 that for the second packet, the coverage length exceeds the packet
186 length. The kernel always re-adjusts the coverage length to the packet
187 length in such cases.
188
189 As an example of what happens when one UDP-Lite packet is split into
190 several tiny fragments, consider the following example.
191
192 Payload: 1024 bytes Send buffer size: 1024 bytes
193 MTU: 300 bytes Coverage length: 575 bytes
194
195 +-+-----------+--------------+--------------+--------------+
196 |8| 272 | 280 | 280 | 280 |
197 +-+-----------+--------------+--------------+--------------+
198 280 560 840 1032
199 ^
200 *****checksum coverage*************
201
202 The UDP-Lite module generates one 1032 byte packet (1024 + 8 byte
203 header). According to the interface MTU, these are split into 4 IP
204 packets (280 byte IP payload + 20 byte IP header). The kernel module
205 sums the contents of the entire first two packets, plus 15 bytes of
206 the last packet before releasing the fragments to the IP module.
207
208 To see the analogous case for IPv6 fragmentation, consider a link
209 MTU of 1280 bytes and a write buffer of 3356 bytes. If the checksum
210 coverage is less than 1232 bytes (MTU minus IPv6/fragment header
211 lengths), only the first fragment needs to be considered. When using
212 larger checksum coverage lengths, each eligible fragment needs to be
213 checksummed. Suppose we have a checksum coverage of 3062. The buffer
214 of 3356 bytes will be split into the following fragments:
215
216 Fragment 1: 1280 bytes carrying 1232 bytes of UDP-Lite data
217 Fragment 2: 1280 bytes carrying 1232 bytes of UDP-Lite data
218 Fragment 3: 948 bytes carrying 900 bytes of UDP-Lite data
219
220 The first two fragments have to be checksummed in full, of the last
221 fragment only 598 (= 3062 - 2*1232) bytes are checksummed.
222
223 While it is important that such cases are dealt with correctly, they
224 are (annoyingly) rare: UDP-Lite is designed for optimising multimedia
225 performance over wireless (or generally noisy) links and thus smaller
226 coverage lenghts are likely to be expected.
227
228
229 V) UDP-LITE RUNTIME STATISTICS AND THEIR MEANING
230
231 Exceptional and error conditions are logged to syslog at the KERN_DEBUG
232 level. Live statistics about UDP-Lite are available in /proc/net/snmp
233 and can (with newer versions of netstat) be viewed using
234
235 netstat -svu
236
237 This displays UDP-Lite statistics variables, whose meaning is as follows.
238
239 InDatagrams: Total number of received datagrams.
240
241 NoPorts: Number of packets received to an unknown port.
242 These cases are counted separately (not as InErrors).
243
244 InErrors: Number of erroneous UDP-Lite packets. Errors include:
245 * internal socket queue receive errors
246 * packet too short (less than 8 bytes or stated
247 coverage length exceeds received length)
248 * xfrm4_policy_check() returned with error
249 * application has specified larger min. coverage
250 length than that of incoming packet
251 * checksum coverage violated
252 * bad checksum
253
254 OutDatagrams: Total number of sent datagrams.
255
256 These statistics derive from the UDP MIB (RFC 2013).
257
258
259 VI) IPTABLES
260
261 There is packet match support for UDP-Lite as well as support for the LOG target.
262 If you copy and paste the following line into /etc/protcols,
263
264 udplite 136 UDP-Lite # UDP-Lite [RFC 3828]
265
266 then
267 iptables -A INPUT -p udplite -j LOG
268
269 will produce logging output to syslog. Dropping and rejecting packets also works.
270
271
272 VII) MAINTAINER ADDRESS
273
274 The UDP-Lite patch was developed at
275 University of Aberdeen
276 Electronics Research Group
277 Department of Engineering
278 Fraser Noble Building
279 Aberdeen AB24 3UE; UK
280 The current maintainer is Gerrit Renker, <gerrit@erg.abdn.ac.uk>. Initial
281 code was developed by William Stanislaus, <william@erg.abdn.ac.uk>.
diff --git a/Documentation/networking/wan-router.txt b/Documentation/networking/wan-router.txt
index 0cf654147634..653978dcea7f 100644
--- a/Documentation/networking/wan-router.txt
+++ b/Documentation/networking/wan-router.txt
@@ -412,7 +412,7 @@ beta-2.1.4 Jul 2000 o Dynamic interface configuration:
412 412
413beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix. 413beta3-2.1.4 Jul 2000 o X25 M_BIT Problem fix.
414 o Added the Multi-Port PPP 414 o Added the Multi-Port PPP
415 Updated utilites for the Multi-Port PPP. 415 Updated utilities for the Multi-Port PPP.
416 416
4172.1.4 Aut 2000 4172.1.4 Aut 2000
418 o In X25API: 418 o In X25API:
@@ -444,13 +444,13 @@ beta1-2.1.5 Nov 15 2000
444 444
445 o Cpipemon 445 o Cpipemon
446 - Added set FT1 commands to the cpipemon. Thus CSU/DSU 446 - Added set FT1 commands to the cpipemon. Thus CSU/DSU
447 configuraiton can be performed using cpipemon. 447 configuration can be performed using cpipemon.
448 All systems that cannot run cfgft1 GUI utility should 448 All systems that cannot run cfgft1 GUI utility should
449 use cpipemon to configure the on board CSU/DSU. 449 use cpipemon to configure the on board CSU/DSU.
450 450
451 451
452 o Keyboard Led Monitor/Debugger 452 o Keyboard Led Monitor/Debugger
453 - A new utilty /usr/sbin/wpkbdmon uses keyboard leds 453 - A new utility /usr/sbin/wpkbdmon uses keyboard leds
454 to convey operational statistic information of the 454 to convey operational statistic information of the
455 Sangoma WANPIPE cards. 455 Sangoma WANPIPE cards.
456 NUM_LOCK = Line State (On=connected, Off=disconnected) 456 NUM_LOCK = Line State (On=connected, Off=disconnected)
@@ -464,7 +464,7 @@ beta1-2.1.5 Nov 15 2000
464 - Appropriate number of devices are dynamically loaded 464 - Appropriate number of devices are dynamically loaded
465 based on the number of Sangoma cards found. 465 based on the number of Sangoma cards found.
466 466
467 Note: The kernel configuraiton option 467 Note: The kernel configuration option
468 CONFIG_WANPIPE_CARDS has been taken out. 468 CONFIG_WANPIPE_CARDS has been taken out.
469 469
470 o Fixed the Frame Relay and Chdlc network interfaces so they are 470 o Fixed the Frame Relay and Chdlc network interfaces so they are
diff --git a/Documentation/networking/xfrm_sync.txt b/Documentation/networking/xfrm_sync.txt
index 8be626f7c0b8..d7aac9dedeb4 100644
--- a/Documentation/networking/xfrm_sync.txt
+++ b/Documentation/networking/xfrm_sync.txt
@@ -47,10 +47,13 @@ aevent_id structure looks like:
47 47
48 struct xfrm_aevent_id { 48 struct xfrm_aevent_id {
49 struct xfrm_usersa_id sa_id; 49 struct xfrm_usersa_id sa_id;
50 xfrm_address_t saddr;
50 __u32 flags; 51 __u32 flags;
52 __u32 reqid;
51 }; 53 };
52 54
53xfrm_usersa_id in this message layout identifies the SA. 55The unique SA is identified by the combination of xfrm_usersa_id,
56reqid and saddr.
54 57
55flags are used to indicate different things. The possible 58flags are used to indicate different things. The possible
56flags are: 59flags are:
diff --git a/Documentation/pnp.txt b/Documentation/pnp.txt
index 9ff966bf76e6..28037aa1846c 100644
--- a/Documentation/pnp.txt
+++ b/Documentation/pnp.txt
@@ -184,7 +184,7 @@ static const struct pnp_id pnp_dev_table[] = {
184Please note that the character 'X' can be used as a wild card in the function 184Please note that the character 'X' can be used as a wild card in the function
185portion (last four characters). 185portion (last four characters).
186ex: 186ex:
187 /* Unkown PnP modems */ 187 /* Unknown PnP modems */
188 { "PNPCXXX", UNKNOWN_DEV }, 188 { "PNPCXXX", UNKNOWN_DEV },
189 189
190Supported PnP card IDs can optionally be defined. 190Supported PnP card IDs can optionally be defined.
diff --git a/Documentation/power/interface.txt b/Documentation/power/interface.txt
index a66bec222b16..74311d7e0f3c 100644
--- a/Documentation/power/interface.txt
+++ b/Documentation/power/interface.txt
@@ -30,6 +30,17 @@ testing). The system will support either 'firmware' or 'platform', and
30that is known a priori. But, the user may choose 'shutdown' or 30that is known a priori. But, the user may choose 'shutdown' or
31'reboot' as alternatives. 31'reboot' as alternatives.
32 32
33Additionally, /sys/power/disk can be used to turn on one of the two testing
34modes of the suspend-to-disk mechanism: 'testproc' or 'test'. If the
35suspend-to-disk mechanism is in the 'testproc' mode, writing 'disk' to
36/sys/power/state will cause the kernel to disable nonboot CPUs and freeze
37tasks, wait for 5 seconds, unfreeze tasks and enable nonboot CPUs. If it is
38in the 'test' mode, writing 'disk' to /sys/power/state will cause the kernel
39to disable nonboot CPUs and freeze tasks, shrink memory, suspend devices, wait
40for 5 seconds, resume devices, unfreeze tasks and enable nonboot CPUs. Then,
41we are able to look in the log messages and work out, for example, which code
42is being slow and which device drivers are misbehaving.
43
33Reading from this file will display what the mode is currently set 44Reading from this file will display what the mode is currently set
34to. Writing to this file will accept one of 45to. Writing to this file will accept one of
35 46
@@ -37,6 +48,8 @@ to. Writing to this file will accept one of
37 'platform' 48 'platform'
38 'shutdown' 49 'shutdown'
39 'reboot' 50 'reboot'
51 'testproc'
52 'test'
40 53
41It will only change to 'firmware' or 'platform' if the system supports 54It will only change to 'firmware' or 'platform' if the system supports
42it. 55it.
diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt
index 24edf25b3bb7..c750f9f2e76e 100644
--- a/Documentation/power/pci.txt
+++ b/Documentation/power/pci.txt
@@ -153,7 +153,7 @@ Description:
153 events, which is implicit if it doesn't even support it in the first 153 events, which is implicit if it doesn't even support it in the first
154 place). 154 place).
155 155
156 Note that the PMC Register in the device's PM Capabilties has a bitmask 156 Note that the PMC Register in the device's PM Capabilities has a bitmask
157 of the states it supports generating PME# from. D3hot is bit 3 and 157 of the states it supports generating PME# from. D3hot is bit 3 and
158 D3cold is bit 4. So, while a value of 4 as the state may not seem 158 D3cold is bit 4. So, while a value of 4 as the state may not seem
159 semantically correct, it is. 159 semantically correct, it is.
@@ -268,7 +268,7 @@ to wake the system up. (However, it is possible that a device may support
268some non-standard way of generating a wake event on sleep.) 268some non-standard way of generating a wake event on sleep.)
269 269
270Bits 15:11 of the PMC (Power Mgmt Capabilities) Register in a device's 270Bits 15:11 of the PMC (Power Mgmt Capabilities) Register in a device's
271PM Capabilties describe what power states the device supports generating a 271PM Capabilities describe what power states the device supports generating a
272wake event from: 272wake event from:
273 273
274+------------------+ 274+------------------+
diff --git a/Documentation/power/s2ram.txt b/Documentation/power/s2ram.txt
new file mode 100644
index 000000000000..b05f512130ea
--- /dev/null
+++ b/Documentation/power/s2ram.txt
@@ -0,0 +1,56 @@
1 How to get s2ram working
2 ~~~~~~~~~~~~~~~~~~~~~~~~
3 2006 Linus Torvalds
4 2006 Pavel Machek
5
61) Check suspend.sf.net, program s2ram there has long whitelist of
7 "known ok" machines, along with tricks to use on each one.
8
92) If that does not help, try reading tricks.txt and
10 video.txt. Perhaps problem is as simple as broken module, and
11 simple module unload can fix it.
12
133) You can use Linus' TRACE_RESUME infrastructure, described below.
14
15 Using TRACE_RESUME
16 ~~~~~~~~~~~~~~~~~~
17
18I've been working at making the machines I have able to STR, and almost
19always it's a driver that is buggy. Thank God for the suspend/resume
20debugging - the thing that Chuck tried to disable. That's often the _only_
21way to debug these things, and it's actually pretty powerful (but
22time-consuming - having to insert TRACE_RESUME() markers into the device
23driver that doesn't resume and recompile and reboot).
24
25Anyway, the way to debug this for people who are interested (have a
26machine that doesn't boot) is:
27
28 - enable PM_DEBUG, and PM_TRACE
29
30 - use a script like this:
31
32 #!/bin/sh
33 sync
34 echo 1 > /sys/power/pm_trace
35 echo mem > /sys/power/state
36
37 to suspend
38
39 - if it doesn't come back up (which is usually the problem), reboot by
40 holding the power button down, and look at the dmesg output for things
41 like
42
43 Magic number: 4:156:725
44 hash matches drivers/base/power/resume.c:28
45 hash matches device 0000:01:00.0
46
47 which means that the last trace event was just before trying to resume
48 device 0000:01:00.0. Then figure out what driver is controlling that
49 device (lspci and /sys/devices/pci* is your friend), and see if you can
50 fix it, disable it, or trace into its resume function.
51
52For example, the above happens to be the VGA device on my EVO, which I
53used to run with "radeonfb" (it's an ATI Radeon mobility). It turns out
54that "radeonfb" simply cannot resume that device - it tries to set the
55PLL's, and it just _hangs_. Using the regular VGA console and letting X
56resume it instead works fine.
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 3e5e5d3ff419..0931a330d362 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -62,7 +62,7 @@ setup via another operating system for it to use. Despite the
62inconvenience, this method requires minimal work by the kernel, since 62inconvenience, this method requires minimal work by the kernel, since
63the firmware will also handle restoring memory contents on resume. 63the firmware will also handle restoring memory contents on resume.
64 64
65If the kernel is responsible for persistantly saving state, a mechanism 65If the kernel is responsible for persistently saving state, a mechanism
66called 'swsusp' (Swap Suspend) is used to write memory contents to 66called 'swsusp' (Swap Suspend) is used to write memory contents to
67free swap space. swsusp has some restrictive requirements, but should 67free swap space. swsusp has some restrictive requirements, but should
68work in most cases. Some, albeit outdated, documentation can be found 68work in most cases. Some, albeit outdated, documentation can be found
diff --git a/Documentation/power/swsusp-and-swap-files.txt b/Documentation/power/swsusp-and-swap-files.txt
new file mode 100644
index 000000000000..06f911a5f885
--- /dev/null
+++ b/Documentation/power/swsusp-and-swap-files.txt
@@ -0,0 +1,60 @@
1Using swap files with software suspend (swsusp)
2 (C) 2006 Rafael J. Wysocki <rjw@sisk.pl>
3
4The Linux kernel handles swap files almost in the same way as it handles swap
5partitions and there are only two differences between these two types of swap
6areas:
7(1) swap files need not be contiguous,
8(2) the header of a swap file is not in the first block of the partition that
9holds it. From the swsusp's point of view (1) is not a problem, because it is
10already taken care of by the swap-handling code, but (2) has to be taken into
11consideration.
12
13In principle the location of a swap file's header may be determined with the
14help of appropriate filesystem driver. Unfortunately, however, it requires the
15filesystem holding the swap file to be mounted, and if this filesystem is
16journaled, it cannot be mounted during resume from disk. For this reason to
17identify a swap file swsusp uses the name of the partition that holds the file
18and the offset from the beginning of the partition at which the swap file's
19header is located. For convenience, this offset is expressed in <PAGE_SIZE>
20units.
21
22In order to use a swap file with swsusp, you need to:
23
241) Create the swap file and make it active, eg.
25
26# dd if=/dev/zero of=<swap_file_path> bs=1024 count=<swap_file_size_in_k>
27# mkswap <swap_file_path>
28# swapon <swap_file_path>
29
302) Use an application that will bmap the swap file with the help of the
31FIBMAP ioctl and determine the location of the file's swap header, as the
32offset, in <PAGE_SIZE> units, from the beginning of the partition which
33holds the swap file.
34
353) Add the following parameters to the kernel command line:
36
37resume=<swap_file_partition> resume_offset=<swap_file_offset>
38
39where <swap_file_partition> is the partition on which the swap file is located
40and <swap_file_offset> is the offset of the swap header determined by the
41application in 2) (of course, this step may be carried out automatically
42by the same application that determies the swap file's header offset using the
43FIBMAP ioctl)
44
45OR
46
47Use a userland suspend application that will set the partition and offset
48with the help of the SNAPSHOT_SET_SWAP_AREA ioctl described in
49Documentation/power/userland-swsusp.txt (this is the only method to suspend
50to a swap file allowing the resume to be initiated from an initrd or initramfs
51image).
52
53Now, swsusp will use the swap file in the same way in which it would use a swap
54partition. In particular, the swap file has to be active (ie. be present in
55/proc/swaps) so that it can be used for suspending.
56
57Note that if the swap file used for suspending is deleted and recreated,
58the location of its header need not be the same as before. Thus every time
59this happens the value of the "resume_offset=" kernel command line parameter
60has to be updated.
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 9ea2208b43b5..0761ff6c57ed 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -153,7 +153,7 @@ add:
153 153
154If the thread is needed for writing the image to storage, you should 154If the thread is needed for writing the image to storage, you should
155instead set the PF_NOFREEZE process flag when creating the thread (and 155instead set the PF_NOFREEZE process flag when creating the thread (and
156be very carefull). 156be very careful).
157 157
158 158
159Q: What is the difference between "platform", "shutdown" and 159Q: What is the difference between "platform", "shutdown" and
@@ -297,20 +297,12 @@ system is shut down or suspended. Additionally use the encrypted
297suspend image to prevent sensitive data from being stolen after 297suspend image to prevent sensitive data from being stolen after
298resume. 298resume.
299 299
300Q: Why can't we suspend to a swap file? 300Q: Can I suspend to a swap file?
301 301
302A: Because accessing swap file needs the filesystem mounted, and 302A: Generally, yes, you can. However, it requires you to use the "resume=" and
303filesystem might do something wrong (like replaying the journal) 303"resume_offset=" kernel command line parameters, so the resume from a swap file
304during mount. 304cannot be initiated from an initrd or initramfs image. See
305 305swsusp-and-swap-files.txt for details.
306There are few ways to get that fixed:
307
3081) Probably could be solved by modifying every filesystem to support
309some kind of "really read-only!" option. Patches welcome.
310
3112) suspend2 gets around that by storing absolute positions in on-disk
312image (and blocksize), with resume parameter pointing directly to
313suspend header.
314 306
315Q: Is there a maximum system RAM size that is supported by swsusp? 307Q: Is there a maximum system RAM size that is supported by swsusp?
316 308
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt
index 64755e9285db..000556c932e9 100644
--- a/Documentation/power/userland-swsusp.txt
+++ b/Documentation/power/userland-swsusp.txt
@@ -9,9 +9,8 @@ done it already.
9Now, to use the userland interface for software suspend you need special 9Now, to use the userland interface for software suspend you need special
10utilities that will read/write the system memory snapshot from/to the 10utilities that will read/write the system memory snapshot from/to the
11kernel. Such utilities are available, for example, from 11kernel. Such utilities are available, for example, from
12<http://www.sisk.pl/kernel/utilities/suspend>. You may want to have 12<http://suspend.sourceforge.net>. You may want to have a look at them if you
13a look at them if you are going to develop your own suspend/resume 13are going to develop your own suspend/resume utilities.
14utilities.
15 14
16The interface consists of a character device providing the open(), 15The interface consists of a character device providing the open(),
17release(), read(), and write() operations as well as several ioctl() 16release(), read(), and write() operations as well as several ioctl()
@@ -21,9 +20,9 @@ be read from /sys/class/misc/snapshot/dev.
21 20
22The device can be open either for reading or for writing. If open for 21The device can be open either for reading or for writing. If open for
23reading, it is considered to be in the suspend mode. Otherwise it is 22reading, it is considered to be in the suspend mode. Otherwise it is
24assumed to be in the resume mode. The device cannot be open for reading 23assumed to be in the resume mode. The device cannot be open for simultaneous
25and writing. It is also impossible to have the device open more than once 24reading and writing. It is also impossible to have the device open more than
26at a time. 25once at a time.
27 26
28The ioctl() commands recognized by the device are: 27The ioctl() commands recognized by the device are:
29 28
@@ -69,9 +68,46 @@ SNAPSHOT_FREE_SWAP_PAGES - free all swap pages allocated with
69SNAPSHOT_SET_SWAP_FILE - set the resume partition (the last ioctl() argument 68SNAPSHOT_SET_SWAP_FILE - set the resume partition (the last ioctl() argument
70 should specify the device's major and minor numbers in the old 69 should specify the device's major and minor numbers in the old
71 two-byte format, as returned by the stat() function in the .st_rdev 70 two-byte format, as returned by the stat() function in the .st_rdev
72 member of the stat structure); it is recommended to always use this 71 member of the stat structure)
73 call, because the code to set the resume partition could be removed from 72
74 future kernels 73SNAPSHOT_SET_SWAP_AREA - set the resume partition and the offset (in <PAGE_SIZE>
74 units) from the beginning of the partition at which the swap header is
75 located (the last ioctl() argument should point to a struct
76 resume_swap_area, as defined in kernel/power/power.h, containing the
77 resume device specification, as for the SNAPSHOT_SET_SWAP_FILE ioctl(),
78 and the offset); for swap partitions the offset is always 0, but it is
79 different to zero for swap files (please see
80 Documentation/swsusp-and-swap-files.txt for details).
81 The SNAPSHOT_SET_SWAP_AREA ioctl() is considered as a replacement for
82 SNAPSHOT_SET_SWAP_FILE which is regarded as obsolete. It is
83 recommended to always use this call, because the code to set the resume
84 partition may be removed from future kernels
85
86SNAPSHOT_S2RAM - suspend to RAM; using this call causes the kernel to
87 immediately enter the suspend-to-RAM state, so this call must always
88 be preceded by the SNAPSHOT_FREEZE call and it is also necessary
89 to use the SNAPSHOT_UNFREEZE call after the system wakes up. This call
90 is needed to implement the suspend-to-both mechanism in which the
91 suspend image is first created, as though the system had been suspended
92 to disk, and then the system is suspended to RAM (this makes it possible
93 to resume the system from RAM if there's enough battery power or restore
94 its state on the basis of the saved suspend image otherwise)
95
96SNAPSHOT_PMOPS - enable the usage of the pmops->prepare, pmops->enter and
97 pmops->finish methods (the in-kernel swsusp knows these as the "platform
98 method") which are needed on many machines to (among others) speed up
99 the resume by letting the BIOS skip some steps or to let the system
100 recognise the correct state of the hardware after the resume (in
101 particular on many machines this ensures that unplugged AC
102 adapters get correctly detected and that kacpid does not run wild after
103 the resume). The last ioctl() argument can take one of the three
104 values, defined in kernel/power/power.h:
105 PMOPS_PREPARE - make the kernel carry out the
106 pm_ops->prepare(PM_SUSPEND_DISK) operation
107 PMOPS_ENTER - make the kernel power off the system by calling
108 pm_ops->enter(PM_SUSPEND_DISK)
109 PMOPS_FINISH - make the kernel carry out the
110 pm_ops->finish(PM_SUSPEND_DISK) operation
75 111
76The device's read() operation can be used to transfer the snapshot image from 112The device's read() operation can be used to transfer the snapshot image from
77the kernel. It has the following limitations: 113the kernel. It has the following limitations:
@@ -91,10 +127,12 @@ unfreeze user space processes frozen by SNAPSHOT_UNFREEZE if they are
91still frozen when the device is being closed). 127still frozen when the device is being closed).
92 128
93Currently it is assumed that the userland utilities reading/writing the 129Currently it is assumed that the userland utilities reading/writing the
94snapshot image from/to the kernel will use a swap partition, called the resume 130snapshot image from/to the kernel will use a swap parition, called the resume
95partition, as storage space. However, this is not really required, as they 131partition, or a swap file as storage space (if a swap file is used, the resume
96can use, for example, a special (blank) suspend partition or a file on a partition 132partition is the partition that holds this file). However, this is not really
97that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and mounted afterwards. 133required, as they can use, for example, a special (blank) suspend partition or
134a file on a partition that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and
135mounted afterwards.
98 136
99These utilities SHOULD NOT make any assumptions regarding the ordering of 137These utilities SHOULD NOT make any assumptions regarding the ordering of
100data within the snapshot image, except for the image header that MAY be 138data within the snapshot image, except for the image header that MAY be
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 27b457c09729..b3bd36668db3 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -6,6 +6,8 @@
6 IBM Corp. 6 IBM Corp.
7(c) 2005 Becky Bruce <becky.bruce at freescale.com>, 7(c) 2005 Becky Bruce <becky.bruce at freescale.com>,
8 Freescale Semiconductor, FSL SOC and 32-bit additions 8 Freescale Semiconductor, FSL SOC and 32-bit additions
9(c) 2006 MontaVista Software, Inc.
10 Flash chip node definition
9 11
10 May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet. 12 May 18, 2005: Rev 0.1 - Initial draft, no chapter III yet.
11 13
@@ -33,13 +35,13 @@
33 - Change version 16 format to always align 35 - Change version 16 format to always align
34 property data to 4 bytes. Since tokens are 36 property data to 4 bytes. Since tokens are
35 already aligned, that means no specific 37 already aligned, that means no specific
36 required alignement between property size 38 required alignment between property size
37 and property data. The old style variable 39 and property data. The old style variable
38 alignment would make it impossible to do 40 alignment would make it impossible to do
39 "simple" insertion of properties using 41 "simple" insertion of properties using
40 memove (thanks Milton for 42 memove (thanks Milton for
41 noticing). Updated kernel patch as well 43 noticing). Updated kernel patch as well
42 - Correct a few more alignement constraints 44 - Correct a few more alignment constraints
43 - Add a chapter about the device-tree 45 - Add a chapter about the device-tree
44 compiler and the textural representation of 46 compiler and the textural representation of
45 the tree that can be "compiled" by dtc. 47 the tree that can be "compiled" by dtc.
@@ -854,7 +856,7 @@ address which can extend beyond that limit.
854 console device if any. Typically, if you have serial devices on 856 console device if any. Typically, if you have serial devices on
855 your board, you may want to put the full path to the one set as 857 your board, you may want to put the full path to the one set as
856 the default console in the firmware here, for the kernel to pick 858 the default console in the firmware here, for the kernel to pick
857 it up as it's own default console. If you look at the funciton 859 it up as its own default console. If you look at the function
858 set_preferred_console() in arch/ppc64/kernel/setup.c, you'll see 860 set_preferred_console() in arch/ppc64/kernel/setup.c, you'll see
859 that the kernel tries to find out the default console and has 861 that the kernel tries to find out the default console and has
860 knowledge of various types like 8250 serial ports. You may want 862 knowledge of various types like 8250 serial ports. You may want
@@ -1124,7 +1126,7 @@ should have the following properties:
1124 - interrupt-parent : contains the phandle of the interrupt 1126 - interrupt-parent : contains the phandle of the interrupt
1125 controller which handles interrupts for this device 1127 controller which handles interrupts for this device
1126 - interrupts : a list of tuples representing the interrupt 1128 - interrupts : a list of tuples representing the interrupt
1127 number and the interrupt sense and level for each interupt 1129 number and the interrupt sense and level for each interrupt
1128 for this device. 1130 for this device.
1129 1131
1130This information is used by the kernel to build the interrupt table 1132This information is used by the kernel to build the interrupt table
@@ -1693,6 +1695,43 @@ platforms are moved over to use the flattened-device-tree model.
1693 }; 1695 };
1694 }; 1696 };
1695 1697
1698 g) Flash chip nodes
1699
1700 Flash chips (Memory Technology Devices) are often used for solid state
1701 file systems on embedded devices.
1702
1703 Required properties:
1704
1705 - device_type : has to be "rom"
1706 - compatible : Should specify what this ROM device is compatible with
1707 (i.e. "onenand"). Currently, this is most likely to be "direct-mapped"
1708 (which corresponds to the MTD physmap mapping driver).
1709 - regs : Offset and length of the register set (or memory mapping) for
1710 the device.
1711
1712 Recommended properties :
1713
1714 - bank-width : Width of the flash data bus in bytes. Required
1715 for the NOR flashes (compatible == "direct-mapped" and others) ONLY.
1716 - partitions : Several pairs of 32-bit values where the first value is
1717 partition's offset from the start of the device and the second one is
1718 partition size in bytes with LSB used to signify a read only
1719 partititon (so, the parition size should always be an even number).
1720 - partition-names : The list of concatenated zero terminated strings
1721 representing the partition names.
1722
1723 Example:
1724
1725 flash@ff000000 {
1726 device_type = "rom";
1727 compatible = "direct-mapped";
1728 regs = <ff000000 01000000>;
1729 bank-width = <4>;
1730 partitions = <00000000 00f80000
1731 00f80000 00080001>;
1732 partition-names = "fs\0firmware";
1733 };
1734
1696 More devices will be defined as this spec matures. 1735 More devices will be defined as this spec matures.
1697 1736
1698 1737
diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
new file mode 100644
index 000000000000..d077d764f82b
--- /dev/null
+++ b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt
@@ -0,0 +1,189 @@
1MPC52xx Device Tree Bindings
2----------------------------
3
4(c) 2006 Secret Lab Technologies Ltd
5Grant Likely <grant.likely at secretlab.ca>
6
7I - Introduction
8================
9Boards supported by the arch/powerpc architecture require device tree be
10passed by the boot loader to the kernel at boot time. The device tree
11describes what devices are present on the board and how they are
12connected. The device tree can either be passed as a binary blob (as
13described in Documentation/powerpc/booting-without-of.txt), or passed
14by Open Firmare (IEEE 1275) compatible firmware using an OF compatible
15client interface API.
16
17This document specifies the requirements on the device-tree for mpc52xx
18based boards. These requirements are above and beyond the details
19specified in either the OpenFirmware spec or booting-without-of.txt
20
21All new mpc52xx-based boards are expected to match this document. In
22cases where this document is not sufficient to support a new board port,
23this document should be updated as part of adding the new board support.
24
25II - Philosophy
26===============
27The core of this document is naming convention. The whole point of
28defining this convention is to reduce or eliminate the number of
29special cases required to support a 52xx board. If all 52xx boards
30follow the same convention, then generic 52xx support code will work
31rather than coding special cases for each new board.
32
33This section tries to capture the thought process behind why the naming
34convention is what it is.
35
361. Node names
37-------------
38There is strong convention/requirements already established for children
39of the root node. 'cpus' describes the processor cores, 'memory'
40describes memory, and 'chosen' provides boot configuration. Other nodes
41are added to describe devices attached to the processor local bus.
42Following convention already established with other system-on-chip
43processors, MPC52xx boards must have an 'soc5200' node as a child of the
44root node.
45
46The soc5200 node holds child nodes for all on chip devices. Child nodes
47are typically named after the configured function. ie. the FEC node is
48named 'ethernet', and a PSC in uart mode is named 'serial'.
49
502. device_type property
51-----------------------
52similar to the node name convention above; the device_type reflects the
53configured function of a device. ie. 'serial' for a uart and 'spi' for
54an spi controller. However, while node names *should* reflect the
55configured function, device_type *must* match the configured function
56exactly.
57
583. compatible property
59----------------------
60Since device_type isn't enough to match devices to drivers, there also
61needs to be a naming convention for the compatible property. Compatible
62is an list of device descriptions sorted from specific to generic. For
63the mpc52xx, the required format for each compatible value is
64<chip>-<device>[-<mode>]. At the minimum, the list shall contain two
65items; the first specifying the exact chip, and the second specifying
66mpc52xx for the chip.
67
68ie. ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc52xx-ethernet"
69
70The idea here is that most drivers will match to the most generic field
71in the compatible list (mpc52xx-*), but can also test the more specific
72field for enabling bug fixes or extra features.
73
74Modal devices, like PSCs, also append the configured function to the
75end of the compatible field. ie. A PSC in i2s mode would specify
76"mpc52xx-psc-i2s", not "mpc52xx-i2s". This convention is chosen to
77avoid naming conflicts with non-psc devices providing the same
78function. For example, "mpc52xx-spi" and "mpc52xx-psc-spi" describe
79the mpc5200 simple spi device and a PSC spi mode respectively.
80
81If the soc device is more generic and present on other SOCs, the
82compatible property can specify the more generic device type also.
83
84ie. mscan: compatible = "mpc5200-mscan\0mpc52xx-mscan\0fsl,mscan";
85
86At the time of writing, exact chip may be either 'mpc5200' or
87'mpc5200b'.
88
89Device drivers should always try to match as generically as possible.
90
91III - Structure
92===============
93The device tree for an mpc52xx board follows the structure defined in
94booting-without-of.txt with the following additional notes:
95
960) the root node
97----------------
98Typical root description node; see booting-without-of
99
1001) The cpus node
101----------------
102The cpus node follows the basic layout described in booting-without-of.
103The bus-frequency property holds the XLB bus frequency
104The clock-frequency property holds the core frequency
105
1062) The memory node
107------------------
108Typical memory description node; see booting-without-of.
109
1103) The soc5200 node
111-------------------
112This node describes the on chip SOC peripherals. Every mpc52xx based
113board will have this node, and as such there is a common naming
114convention for SOC devices.
115
116Required properties:
117name type description
118---- ---- -----------
119device_type string must be "soc"
120ranges int should be <0 baseaddr baseaddr+10000>
121reg int must be <baseaddr 10000>
122
123Recommended properties:
124name type description
125---- ---- -----------
126compatible string should be "<chip>-soc\0mpc52xx-soc"
127 ie. "mpc5200b-soc\0mpc52xx-soc"
128#interrupt-cells int must be <3>. If it is not defined
129 here then it must be defined in every
130 soc device node.
131bus-frequency int IPB bus frequency in HZ. Clock rate
132 used by most of the soc devices.
133 Defining it here avoids needing it
134 added to every device node.
135
1364) soc5200 child nodes
137----------------------
138Any on chip SOC devices available to Linux must appear as soc5200 child nodes.
139
140Note: in the tables below, '*' matches all <chip> values. ie.
141*-pic would translate to "mpc5200-pic\0mpc52xx-pic"
142
143Required soc5200 child nodes:
144name device_type compatible Description
145---- ----------- ---------- -----------
146cdm@<addr> cdm *-cmd Clock Distribution
147pic@<addr> interrupt-controller *-pic need an interrupt
148 controller to boot
149bestcomm@<addr> dma-controller *-bestcomm 52xx pic also requires
150 the bestcomm device
151
152Recommended soc5200 child nodes; populate as needed for your board
153name device_type compatible Description
154---- ----------- ---------- -----------
155gpt@<addr> gpt *-gpt General purpose timers
156rtc@<addr> rtc *-rtc Real time clock
157mscan@<addr> mscan *-mscan CAN bus controller
158pci@<addr> pci *-pci PCI bridge
159serial@<addr> serial *-psc-uart PSC in serial mode
160i2s@<addr> i2s *-psc-i2s PSC in i2s mode
161ac97@<addr> ac97 *-psc-ac97 PSC in ac97 mode
162spi@<addr> spi *-psc-spi PSC in spi mode
163irda@<addr> irda *-psc-irda PSC in IrDA mode
164spi@<addr> spi *-spi MPC52xx spi device
165ethernet@<addr> network *-fec MPC52xx ethernet device
166ata@<addr> ata *-ata IDE ATA interface
167i2c@<addr> i2c *-i2c I2C controller
168usb@<addr> usb-ohci-be *-ohci,ohci-be USB controller
169xlb@<addr> xlb *-xlb XLB arbritrator
170
171IV - Extra Notes
172================
173
1741. Interrupt mapping
175--------------------
176The mpc52xx pic driver splits hardware IRQ numbers into two levels. The
177split reflects the layout of the PIC hardware itself, which groups
178interrupts into one of three groups; CRIT, MAIN or PERP. Also, the
179Bestcomm dma engine has it's own set of interrupt sources which are
180cascaded off of peripheral interrupt 0, which the driver interprets as a
181fourth group, SDMA.
182
183The interrupts property for device nodes using the mpc52xx pic consists
184of three cells; <L1 L2 level>
185
186 L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3]
187 L2 := interrupt number; directly mapped from the value in the
188 "ICTL PerStat, MainStat, CritStat Encoded Register"
189 level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3]
diff --git a/Documentation/robust-futex-ABI.txt b/Documentation/robust-futex-ABI.txt
index 8529a17ffaa1..535f69fab45f 100644
--- a/Documentation/robust-futex-ABI.txt
+++ b/Documentation/robust-futex-ABI.txt
@@ -170,7 +170,7 @@ any point:
170 1) the 'head' pointer or an subsequent linked list pointer 170 1) the 'head' pointer or an subsequent linked list pointer
171 is not a valid address of a user space word 171 is not a valid address of a user space word
172 2) the calculated location of the 'lock word' (address plus 172 2) the calculated location of the 'lock word' (address plus
173 'offset') is not the valud address of a 32 bit user space 173 'offset') is not the valid address of a 32 bit user space
174 word 174 word
175 3) if the list contains more than 1 million (subject to 175 3) if the list contains more than 1 million (subject to
176 future kernel configuration changes) elements. 176 future kernel configuration changes) elements.
diff --git a/Documentation/robust-futexes.txt b/Documentation/robust-futexes.txt
index 76e8064b8c3a..0a9446a53bd1 100644
--- a/Documentation/robust-futexes.txt
+++ b/Documentation/robust-futexes.txt
@@ -181,7 +181,7 @@ for new threads, without the need of another syscall.]
181So there is virtually zero overhead for tasks not using robust futexes, 181So there is virtually zero overhead for tasks not using robust futexes,
182and even for robust futex users, there is only one extra syscall per 182and even for robust futex users, there is only one extra syscall per
183thread lifetime, and the cleanup operation, if it happens, is fast and 183thread lifetime, and the cleanup operation, if it happens, is fast and
184straightforward. The kernel doesnt have any internal distinction between 184straightforward. The kernel doesn't have any internal distinction between
185robust and normal futexes. 185robust and normal futexes.
186 186
187If a futex is found to be held at exit time, the kernel sets the 187If a futex is found to be held at exit time, the kernel sets the
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt
index 2a58f985795a..7cf1ec5bcdd3 100644
--- a/Documentation/rtc.txt
+++ b/Documentation/rtc.txt
@@ -1,12 +1,49 @@
1 1
2 Real Time Clock Driver for Linux 2 Real Time Clock (RTC) Drivers for Linux
3 ================================ 3 =======================================
4
5When Linux developers talk about a "Real Time Clock", they usually mean
6something that tracks wall clock time and is battery backed so that it
7works even with system power off. Such clocks will normally not track
8the local time zone or daylight savings time -- unless they dual boot
9with MS-Windows -- but will instead be set to Coordinated Universal Time
10(UTC, formerly "Greenwich Mean Time").
11
12The newest non-PC hardware tends to just count seconds, like the time(2)
13system call reports, but RTCs also very commonly represent time using
14the Gregorian calendar and 24 hour time, as reported by gmtime(3).
15
16Linux has two largely-compatible userspace RTC API families you may
17need to know about:
18
19 * /dev/rtc ... is the RTC provided by PC compatible systems,
20 so it's not very portable to non-x86 systems.
21
22 * /dev/rtc0, /dev/rtc1 ... are part of a framework that's
23 supported by a wide variety of RTC chips on all systems.
24
25Programmers need to understand that the PC/AT functionality is not
26always available, and some systems can do much more. That is, the
27RTCs use the same API to make requests in both RTC frameworks (using
28different filenames of course), but the hardware may not offer the
29same functionality. For example, not every RTC is hooked up to an
30IRQ, so they can't all issue alarms; and where standard PC RTCs can
31only issue an alarm up to 24 hours in the future, other hardware may
32be able to schedule one any time in the upcoming century.
33
34
35 Old PC/AT-Compatible driver: /dev/rtc
36 --------------------------------------
4 37
5All PCs (even Alpha machines) have a Real Time Clock built into them. 38All PCs (even Alpha machines) have a Real Time Clock built into them.
6Usually they are built into the chipset of the computer, but some may 39Usually they are built into the chipset of the computer, but some may
7actually have a Motorola MC146818 (or clone) on the board. This is the 40actually have a Motorola MC146818 (or clone) on the board. This is the
8clock that keeps the date and time while your computer is turned off. 41clock that keeps the date and time while your computer is turned off.
9 42
43ACPI has standardized that MC146818 functionality, and extended it in
44a few ways (enabling longer alarm periods, and wake-from-hibernate).
45That functionality is NOT exposed in the old driver.
46
10However it can also be used to generate signals from a slow 2Hz to a 47However it can also be used to generate signals from a slow 2Hz to a
11relatively fast 8192Hz, in increments of powers of two. These signals 48relatively fast 8192Hz, in increments of powers of two. These signals
12are reported by interrupt number 8. (Oh! So *that* is what IRQ 8 is 49are reported by interrupt number 8. (Oh! So *that* is what IRQ 8 is
@@ -63,223 +100,331 @@ Rather than write 50 pages describing the ioctl() and so on, it is
63perhaps more useful to include a small test program that demonstrates 100perhaps more useful to include a small test program that demonstrates
64how to use them, and demonstrates the features of the driver. This is 101how to use them, and demonstrates the features of the driver. This is
65probably a lot more useful to people interested in writing applications 102probably a lot more useful to people interested in writing applications
66that will be using this driver. 103that will be using this driver. See the code at the end of this document.
104
105(The original /dev/rtc driver was written by Paul Gortmaker.)
106
107
108 New portable "RTC Class" drivers: /dev/rtcN
109 --------------------------------------------
110
111Because Linux supports many non-ACPI and non-PC platforms, some of which
112have more than one RTC style clock, it needed a more portable solution
113than expecting a single battery-backed MC146818 clone on every system.
114Accordingly, a new "RTC Class" framework has been defined. It offers
115three different userspace interfaces:
116
117 * /dev/rtcN ... much the same as the older /dev/rtc interface
118
119 * /sys/class/rtc/rtcN ... sysfs attributes support readonly
120 access to some RTC attributes.
121
122 * /proc/driver/rtc ... the first RTC (rtc0) may expose itself
123 using a procfs interface. More information is (currently) shown
124 here than through sysfs.
125
126The RTC Class framework supports a wide variety of RTCs, ranging from those
127integrated into embeddable system-on-chip (SOC) processors to discrete chips
128using I2C, SPI, or some other bus to communicate with the host CPU. There's
129even support for PC-style RTCs ... including the features exposed on newer PCs
130through ACPI.
131
132The new framework also removes the "one RTC per system" restriction. For
133example, maybe the low-power battery-backed RTC is a discrete I2C chip, but
134a high functionality RTC is integrated into the SOC. That system might read
135the system clock from the discrete RTC, but use the integrated one for all
136other tasks, because of its greater functionality.
137
138The ioctl() calls supported by /dev/rtc are also supported by the RTC class
139framework. However, because the chips and systems are not standardized,
140some PC/AT functionality might not be provided. And in the same way, some
141newer features -- including those enabled by ACPI -- are exposed by the
142RTC class framework, but can't be supported by the older driver.
143
144 * RTC_RD_TIME, RTC_SET_TIME ... every RTC supports at least reading
145 time, returning the result as a Gregorian calendar date and 24 hour
146 wall clock time. To be most useful, this time may also be updated.
147
148 * RTC_AIE_ON, RTC_AIE_OFF, RTC_ALM_SET, RTC_ALM_READ ... when the RTC
149 is connected to an IRQ line, it can often issue an alarm IRQ up to
150 24 hours in the future.
151
152 * RTC_WKALM_SET, RTC_WKALM_READ ... RTCs that can issue alarms beyond
153 the next 24 hours use a slightly more powerful API, which supports
154 setting the longer alarm time and enabling its IRQ using a single
155 request (using the same model as EFI firmware).
156
157 * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, it probably
158 also offers update IRQs whenever the "seconds" counter changes.
159 If needed, the RTC framework can emulate this mechanism.
160
161 * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... another
162 feature often accessible with an IRQ line is a periodic IRQ, issued
163 at settable frequencies (usually 2^N Hz).
164
165In many cases, the RTC alarm can be a system wake event, used to force
166Linux out of a low power sleep state (or hibernation) back to a fully
167operational state. For example, a system could enter a deep power saving
168state until it's time to execute some scheduled tasks.
67 169
68 Paul Gortmaker
69 170
70-------------------- 8< ---------------- 8< ----------------------------- 171-------------------- 8< ---------------- 8< -----------------------------
71 172
72/* 173/*
73 * Real Time Clock Driver Test/Example Program 174 * Real Time Clock Driver Test/Example Program
74 * 175 *
75 * Compile with: 176 * Compile with:
76 * gcc -s -Wall -Wstrict-prototypes rtctest.c -o rtctest 177 * gcc -s -Wall -Wstrict-prototypes rtctest.c -o rtctest
77 * 178 *
78 * Copyright (C) 1996, Paul Gortmaker. 179 * Copyright (C) 1996, Paul Gortmaker.
79 * 180 *
80 * Released under the GNU General Public License, version 2, 181 * Released under the GNU General Public License, version 2,
81 * included herein by reference. 182 * included herein by reference.
82 * 183 *
83 */ 184 */
84 185
85#include <stdio.h> 186#include <stdio.h>
86#include <stdlib.h>
87#include <linux/rtc.h> 187#include <linux/rtc.h>
88#include <sys/ioctl.h> 188#include <sys/ioctl.h>
89#include <sys/time.h> 189#include <sys/time.h>
90#include <sys/types.h> 190#include <sys/types.h>
91#include <fcntl.h> 191#include <fcntl.h>
92#include <unistd.h> 192#include <unistd.h>
193#include <stdlib.h>
93#include <errno.h> 194#include <errno.h>
94 195
95int main(void) {
96
97int i, fd, retval, irqcount = 0;
98unsigned long tmp, data;
99struct rtc_time rtc_tm;
100 196
101fd = open ("/dev/rtc", O_RDONLY); 197/*
198 * This expects the new RTC class driver framework, working with
199 * clocks that will often not be clones of what the PC-AT had.
200 * Use the command line to specify another RTC if you need one.
201 */
202static const char default_rtc[] = "/dev/rtc0";
203
204
205int main(int argc, char **argv)
206{
207 int i, fd, retval, irqcount = 0;
208 unsigned long tmp, data;
209 struct rtc_time rtc_tm;
210 const char *rtc = default_rtc;
211
212 switch (argc) {
213 case 2:
214 rtc = argv[1];
215 /* FALLTHROUGH */
216 case 1:
217 break;
218 default:
219 fprintf(stderr, "usage: rtctest [rtcdev]\n");
220 return 1;
221 }
102 222
103if (fd == -1) { 223 fd = open(rtc, O_RDONLY);
104 perror("/dev/rtc");
105 exit(errno);
106}
107 224
108fprintf(stderr, "\n\t\t\tRTC Driver Test Example.\n\n"); 225 if (fd == -1) {
226 perror(rtc);
227 exit(errno);
228 }
109 229
110/* Turn on update interrupts (one per second) */ 230 fprintf(stderr, "\n\t\t\tRTC Driver Test Example.\n\n");
111retval = ioctl(fd, RTC_UIE_ON, 0);
112if (retval == -1) {
113 perror("ioctl");
114 exit(errno);
115}
116 231
117fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading /dev/rtc:"); 232 /* Turn on update interrupts (one per second) */
118fflush(stderr); 233 retval = ioctl(fd, RTC_UIE_ON, 0);
119for (i=1; i<6; i++) {
120 /* This read will block */
121 retval = read(fd, &data, sizeof(unsigned long));
122 if (retval == -1) { 234 if (retval == -1) {
123 perror("read"); 235 if (errno == ENOTTY) {
236 fprintf(stderr,
237 "\n...Update IRQs not supported.\n");
238 goto test_READ;
239 }
240 perror("ioctl");
124 exit(errno); 241 exit(errno);
125 } 242 }
126 fprintf(stderr, " %d",i); 243
244 fprintf(stderr, "Counting 5 update (1/sec) interrupts from reading %s:",
245 rtc);
127 fflush(stderr); 246 fflush(stderr);
128 irqcount++; 247 for (i=1; i<6; i++) {
129} 248 /* This read will block */
249 retval = read(fd, &data, sizeof(unsigned long));
250 if (retval == -1) {
251 perror("read");
252 exit(errno);
253 }
254 fprintf(stderr, " %d",i);
255 fflush(stderr);
256 irqcount++;
257 }
130 258
131fprintf(stderr, "\nAgain, from using select(2) on /dev/rtc:"); 259 fprintf(stderr, "\nAgain, from using select(2) on /dev/rtc:");
132fflush(stderr); 260 fflush(stderr);
133for (i=1; i<6; i++) { 261 for (i=1; i<6; i++) {
134 struct timeval tv = {5, 0}; /* 5 second timeout on select */ 262 struct timeval tv = {5, 0}; /* 5 second timeout on select */
135 fd_set readfds; 263 fd_set readfds;
264
265 FD_ZERO(&readfds);
266 FD_SET(fd, &readfds);
267 /* The select will wait until an RTC interrupt happens. */
268 retval = select(fd+1, &readfds, NULL, NULL, &tv);
269 if (retval == -1) {
270 perror("select");
271 exit(errno);
272 }
273 /* This read won't block unlike the select-less case above. */
274 retval = read(fd, &data, sizeof(unsigned long));
275 if (retval == -1) {
276 perror("read");
277 exit(errno);
278 }
279 fprintf(stderr, " %d",i);
280 fflush(stderr);
281 irqcount++;
282 }
136 283
137 FD_ZERO(&readfds); 284 /* Turn off update interrupts */
138 FD_SET(fd, &readfds); 285 retval = ioctl(fd, RTC_UIE_OFF, 0);
139 /* The select will wait until an RTC interrupt happens. */
140 retval = select(fd+1, &readfds, NULL, NULL, &tv);
141 if (retval == -1) { 286 if (retval == -1) {
142 perror("select"); 287 perror("ioctl");
143 exit(errno); 288 exit(errno);
144 } 289 }
145 /* This read won't block unlike the select-less case above. */ 290
146 retval = read(fd, &data, sizeof(unsigned long)); 291test_READ:
292 /* Read the RTC time/date */
293 retval = ioctl(fd, RTC_RD_TIME, &rtc_tm);
147 if (retval == -1) { 294 if (retval == -1) {
148 perror("read"); 295 perror("ioctl");
149 exit(errno); 296 exit(errno);
150 } 297 }
151 fprintf(stderr, " %d",i);
152 fflush(stderr);
153 irqcount++;
154}
155
156/* Turn off update interrupts */
157retval = ioctl(fd, RTC_UIE_OFF, 0);
158if (retval == -1) {
159 perror("ioctl");
160 exit(errno);
161}
162
163/* Read the RTC time/date */
164retval = ioctl(fd, RTC_RD_TIME, &rtc_tm);
165if (retval == -1) {
166 perror("ioctl");
167 exit(errno);
168}
169
170fprintf(stderr, "\n\nCurrent RTC date/time is %d-%d-%d, %02d:%02d:%02d.\n",
171 rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900,
172 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
173
174/* Set the alarm to 5 sec in the future, and check for rollover */
175rtc_tm.tm_sec += 5;
176if (rtc_tm.tm_sec >= 60) {
177 rtc_tm.tm_sec %= 60;
178 rtc_tm.tm_min++;
179}
180if (rtc_tm.tm_min == 60) {
181 rtc_tm.tm_min = 0;
182 rtc_tm.tm_hour++;
183}
184if (rtc_tm.tm_hour == 24)
185 rtc_tm.tm_hour = 0;
186
187retval = ioctl(fd, RTC_ALM_SET, &rtc_tm);
188if (retval == -1) {
189 perror("ioctl");
190 exit(errno);
191}
192
193/* Read the current alarm settings */
194retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
195if (retval == -1) {
196 perror("ioctl");
197 exit(errno);
198}
199
200fprintf(stderr, "Alarm time now set to %02d:%02d:%02d.\n",
201 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
202 298
203/* Enable alarm interrupts */ 299 fprintf(stderr, "\n\nCurrent RTC date/time is %d-%d-%d, %02d:%02d:%02d.\n",
204retval = ioctl(fd, RTC_AIE_ON, 0); 300 rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year + 1900,
205if (retval == -1) { 301 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
206 perror("ioctl");
207 exit(errno);
208}
209 302
210fprintf(stderr, "Waiting 5 seconds for alarm..."); 303 /* Set the alarm to 5 sec in the future, and check for rollover */
211fflush(stderr); 304 rtc_tm.tm_sec += 5;
212/* This blocks until the alarm ring causes an interrupt */ 305 if (rtc_tm.tm_sec >= 60) {
213retval = read(fd, &data, sizeof(unsigned long)); 306 rtc_tm.tm_sec %= 60;
214if (retval == -1) { 307 rtc_tm.tm_min++;
215 perror("read"); 308 }
216 exit(errno); 309 if (rtc_tm.tm_min == 60) {
217} 310 rtc_tm.tm_min = 0;
218irqcount++; 311 rtc_tm.tm_hour++;
219fprintf(stderr, " okay. Alarm rang.\n"); 312 }
220 313 if (rtc_tm.tm_hour == 24)
221/* Disable alarm interrupts */ 314 rtc_tm.tm_hour = 0;
222retval = ioctl(fd, RTC_AIE_OFF, 0);
223if (retval == -1) {
224 perror("ioctl");
225 exit(errno);
226}
227 315
228/* Read periodic IRQ rate */ 316 retval = ioctl(fd, RTC_ALM_SET, &rtc_tm);
229retval = ioctl(fd, RTC_IRQP_READ, &tmp); 317 if (retval == -1) {
230if (retval == -1) { 318 if (errno == ENOTTY) {
231 perror("ioctl"); 319 fprintf(stderr,
232 exit(errno); 320 "\n...Alarm IRQs not supported.\n");
233} 321 goto test_PIE;
234fprintf(stderr, "\nPeriodic IRQ rate was %ldHz.\n", tmp); 322 }
323 perror("ioctl");
324 exit(errno);
325 }
235 326
236fprintf(stderr, "Counting 20 interrupts at:"); 327 /* Read the current alarm settings */
237fflush(stderr); 328 retval = ioctl(fd, RTC_ALM_READ, &rtc_tm);
329 if (retval == -1) {
330 perror("ioctl");
331 exit(errno);
332 }
238 333
239/* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */ 334 fprintf(stderr, "Alarm time now set to %02d:%02d:%02d.\n",
240for (tmp=2; tmp<=64; tmp*=2) { 335 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
241 336
242 retval = ioctl(fd, RTC_IRQP_SET, tmp); 337 /* Enable alarm interrupts */
338 retval = ioctl(fd, RTC_AIE_ON, 0);
243 if (retval == -1) { 339 if (retval == -1) {
244 perror("ioctl"); 340 perror("ioctl");
245 exit(errno); 341 exit(errno);
246 } 342 }
247 343
248 fprintf(stderr, "\n%ldHz:\t", tmp); 344 fprintf(stderr, "Waiting 5 seconds for alarm...");
249 fflush(stderr); 345 fflush(stderr);
346 /* This blocks until the alarm ring causes an interrupt */
347 retval = read(fd, &data, sizeof(unsigned long));
348 if (retval == -1) {
349 perror("read");
350 exit(errno);
351 }
352 irqcount++;
353 fprintf(stderr, " okay. Alarm rang.\n");
250 354
251 /* Enable periodic interrupts */ 355 /* Disable alarm interrupts */
252 retval = ioctl(fd, RTC_PIE_ON, 0); 356 retval = ioctl(fd, RTC_AIE_OFF, 0);
253 if (retval == -1) { 357 if (retval == -1) {
254 perror("ioctl"); 358 perror("ioctl");
255 exit(errno); 359 exit(errno);
256 } 360 }
257 361
258 for (i=1; i<21; i++) { 362test_PIE:
259 /* This blocks */ 363 /* Read periodic IRQ rate */
260 retval = read(fd, &data, sizeof(unsigned long)); 364 retval = ioctl(fd, RTC_IRQP_READ, &tmp);
365 if (retval == -1) {
366 /* not all RTCs support periodic IRQs */
367 if (errno == ENOTTY) {
368 fprintf(stderr, "\nNo periodic IRQ support\n");
369 return 0;
370 }
371 perror("ioctl");
372 exit(errno);
373 }
374 fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp);
375
376 fprintf(stderr, "Counting 20 interrupts at:");
377 fflush(stderr);
378
379 /* The frequencies 128Hz, 256Hz, ... 8192Hz are only allowed for root. */
380 for (tmp=2; tmp<=64; tmp*=2) {
381
382 retval = ioctl(fd, RTC_IRQP_SET, tmp);
261 if (retval == -1) { 383 if (retval == -1) {
262 perror("read"); 384 /* not all RTCs can change their periodic IRQ rate */
263 exit(errno); 385 if (errno == ENOTTY) {
386 fprintf(stderr,
387 "\n...Periodic IRQ rate is fixed\n");
388 goto done;
389 }
390 perror("ioctl");
391 exit(errno);
264 } 392 }
265 fprintf(stderr, " %d",i); 393
394 fprintf(stderr, "\n%ldHz:\t", tmp);
266 fflush(stderr); 395 fflush(stderr);
267 irqcount++;
268 }
269 396
270 /* Disable periodic interrupts */ 397 /* Enable periodic interrupts */
271 retval = ioctl(fd, RTC_PIE_OFF, 0); 398 retval = ioctl(fd, RTC_PIE_ON, 0);
272 if (retval == -1) { 399 if (retval == -1) {
273 perror("ioctl"); 400 perror("ioctl");
274 exit(errno); 401 exit(errno);
402 }
403
404 for (i=1; i<21; i++) {
405 /* This blocks */
406 retval = read(fd, &data, sizeof(unsigned long));
407 if (retval == -1) {
408 perror("read");
409 exit(errno);
410 }
411 fprintf(stderr, " %d",i);
412 fflush(stderr);
413 irqcount++;
414 }
415
416 /* Disable periodic interrupts */
417 retval = ioctl(fd, RTC_PIE_OFF, 0);
418 if (retval == -1) {
419 perror("ioctl");
420 exit(errno);
421 }
275 } 422 }
276}
277 423
278fprintf(stderr, "\n\n\t\t\t *** Test complete ***\n"); 424done:
279fprintf(stderr, "\nTyping \"cat /proc/interrupts\" will show %d more events on IRQ 8.\n\n", 425 fprintf(stderr, "\n\n\t\t\t *** Test complete ***\n");
280 irqcount);
281 426
282close(fd); 427 close(fd);
283return 0;
284 428
285} /* end main */ 429 return 0;
430}
diff --git a/Documentation/s390/CommonIO b/Documentation/s390/CommonIO
index 59d1166d41ee..22f82f21bc60 100644
--- a/Documentation/s390/CommonIO
+++ b/Documentation/s390/CommonIO
@@ -66,7 +66,7 @@ Command line parameters
66 66
67 When a device is un-ignored, device recognition and sensing is performed and 67 When a device is un-ignored, device recognition and sensing is performed and
68 the device driver will be notified if possible, so the device will become 68 the device driver will be notified if possible, so the device will become
69 available to the system. 69 available to the system. Note that un-ignoring is performed asynchronously.
70 70
71 You can also add ranges of devices to be ignored by piping to 71 You can also add ranges of devices to be ignored by piping to
72 /proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the 72 /proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the
@@ -74,7 +74,7 @@ Command line parameters
74 74
75 Note: While already known devices can be added to the list of devices to be 75 Note: While already known devices can be added to the list of devices to be
76 ignored, there will be no effect on then. However, if such a device 76 ignored, there will be no effect on then. However, if such a device
77 disappears and then reappeares, it will then be ignored. 77 disappears and then reappears, it will then be ignored.
78 78
79 For example, 79 For example,
80 "echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore" 80 "echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
@@ -82,7 +82,7 @@ Command line parameters
82 devices. 82 devices.
83 83
84 The devices can be specified either by bus id (0.0.abcd) or, for 2.4 backward 84 The devices can be specified either by bus id (0.0.abcd) or, for 2.4 backward
85 compatibilty, by the device number in hexadecimal (0xabcd or abcd). 85 compatibility, by the device number in hexadecimal (0xabcd or abcd).
86 86
87 87
88* /proc/s390dbf/cio_*/ (S/390 debug feature) 88* /proc/s390dbf/cio_*/ (S/390 debug feature)
diff --git a/Documentation/s390/Debugging390.txt b/Documentation/s390/Debugging390.txt
index 4dd25ee549e9..3f9ddbc23b27 100644
--- a/Documentation/s390/Debugging390.txt
+++ b/Documentation/s390/Debugging390.txt
@@ -7,7 +7,7 @@
7 7
8Overview of Document: 8Overview of Document:
9===================== 9=====================
10This document is intended to give an good overview of how to debug 10This document is intended to give a good overview of how to debug
11Linux for s/390 & z/Architecture. It isn't intended as a complete reference & not a 11Linux for s/390 & z/Architecture. It isn't intended as a complete reference & not a
12tutorial on the fundamentals of C & assembly. It doesn't go into 12tutorial on the fundamentals of C & assembly. It doesn't go into
13390 IO in any detail. It is intended to complement the documents in the 13390 IO in any detail. It is intended to complement the documents in the
@@ -300,7 +300,7 @@ On z/Architecture our page indexes are now 2k in size
300but only mess with 2 segment indices each time we mess with 300but only mess with 2 segment indices each time we mess with
301a PMD. 301a PMD.
302 302
3033) As z/Architecture supports upto a massive 5-level page table lookup we 3033) As z/Architecture supports up to a massive 5-level page table lookup we
304can only use 3 currently on Linux ( as this is all the generic kernel 304can only use 3 currently on Linux ( as this is all the generic kernel
305currently supports ) however this may change in future 305currently supports ) however this may change in future
306this allows us to access ( according to my sums ) 306this allows us to access ( according to my sums )
@@ -502,7 +502,7 @@ Notes:
502------ 502------
5031) The only requirement is that registers which are used 5031) The only requirement is that registers which are used
504by the callee are saved, e.g. the compiler is perfectly 504by the callee are saved, e.g. the compiler is perfectly
505capible of using r11 for purposes other than a frame a 505capable of using r11 for purposes other than a frame a
506frame pointer if a frame pointer is not needed. 506frame pointer if a frame pointer is not needed.
5072) In functions with variable arguments e.g. printf the calling procedure 5072) In functions with variable arguments e.g. printf the calling procedure
508is identical to one without variable arguments & the same number of 508is identical to one without variable arguments & the same number of
@@ -846,7 +846,7 @@ of time searching for debugging info. The following self explanatory line should
846instead if the code isn't compiled -g, as it is much faster: 846instead if the code isn't compiled -g, as it is much faster:
847objdump --disassemble-all --syms vmlinux > vmlinux.lst 847objdump --disassemble-all --syms vmlinux > vmlinux.lst
848 848
849As hard drive space is valuble most of us use the following approach. 849As hard drive space is valuable most of us use the following approach.
8501) Look at the emitted psw on the console to find the crash address in the kernel. 8501) Look at the emitted psw on the console to find the crash address in the kernel.
8512) Look at the file System.map ( in the linux directory ) produced when building 8512) Look at the file System.map ( in the linux directory ) produced when building
852the kernel to find the closest address less than the current PSW to find the 852the kernel to find the closest address less than the current PSW to find the
@@ -902,7 +902,7 @@ A. It is a tool for intercepting calls to the kernel & logging them
902to a file & on the screen. 902to a file & on the screen.
903 903
904Q. What use is it ? 904Q. What use is it ?
905A. You can used it to find out what files a particular program opens. 905A. You can use it to find out what files a particular program opens.
906 906
907 907
908 908
@@ -911,7 +911,7 @@ Example 1
911If you wanted to know does ping work but didn't have the source 911If you wanted to know does ping work but didn't have the source
912strace ping -c 1 127.0.0.1 912strace ping -c 1 127.0.0.1
913& then look at the man pages for each of the syscalls below, 913& then look at the man pages for each of the syscalls below,
914( In fact this is sometimes easier than looking at some spagetti 914( In fact this is sometimes easier than looking at some spaghetti
915source which conditionally compiles for several architectures ). 915source which conditionally compiles for several architectures ).
916Not everything that it throws out needs to make sense immediately. 916Not everything that it throws out needs to make sense immediately.
917 917
@@ -1037,7 +1037,7 @@ e.g. man strace, man alarm, man socket.
1037 1037
1038Performance Debugging 1038Performance Debugging
1039===================== 1039=====================
1040gcc is capible of compiling in profiling code just add the -p option 1040gcc is capable of compiling in profiling code just add the -p option
1041to the CFLAGS, this obviously affects program size & performance. 1041to the CFLAGS, this obviously affects program size & performance.
1042This can be used by the gprof gnu profiling tool or the 1042This can be used by the gprof gnu profiling tool or the
1043gcov the gnu code coverage tool ( code coverage is a means of testing 1043gcov the gnu code coverage tool ( code coverage is a means of testing
@@ -1419,7 +1419,7 @@ On a SMP guest issue a command to all CPUs try prefixing the command with cpu al
1419To issue a command to a particular cpu try cpu <cpu number> e.g. 1419To issue a command to a particular cpu try cpu <cpu number> e.g.
1420CPU 01 TR I R 2000.3000 1420CPU 01 TR I R 2000.3000
1421If you are running on a guest with several cpus & you have a IO related problem 1421If you are running on a guest with several cpus & you have a IO related problem
1422& cannot follow the flow of code but you know it isnt smp related. 1422& cannot follow the flow of code but you know it isn't smp related.
1423from the bash prompt issue 1423from the bash prompt issue
1424shutdown -h now or halt. 1424shutdown -h now or halt.
1425do a Q CPUS to find out how many cpus you have 1425do a Q CPUS to find out how many cpus you have
@@ -1602,7 +1602,7 @@ V000FFFD0 00010400 80010802 8001085A 000FFFA0
1602our 3rd return address is 8001085A 1602our 3rd return address is 8001085A
1603 1603
1604as the 04B52002 looks suspiciously like rubbish it is fair to assume that the kernel entry routines 1604as the 04B52002 looks suspiciously like rubbish it is fair to assume that the kernel entry routines
1605for the sake of optimisation dont set up a backchain. 1605for the sake of optimisation don't set up a backchain.
1606 1606
1607now look at System.map to see if the addresses make any sense. 1607now look at System.map to see if the addresses make any sense.
1608 1608
@@ -1638,11 +1638,11 @@ more useful information.
1638 1638
1639Unlike other bus architectures modern 390 systems do their IO using mostly 1639Unlike other bus architectures modern 390 systems do their IO using mostly
1640fibre optics & devices such as tapes & disks can be shared between several mainframes, 1640fibre optics & devices such as tapes & disks can be shared between several mainframes,
1641also S390 can support upto 65536 devices while a high end PC based system might be choking 1641also S390 can support up to 65536 devices while a high end PC based system might be choking
1642with around 64. Here is some of the common IO terminology 1642with around 64. Here is some of the common IO terminology
1643 1643
1644Subchannel: 1644Subchannel:
1645This is the logical number most IO commands use to talk to an IO device there can be upto 1645This is the logical number most IO commands use to talk to an IO device there can be up to
16460x10000 (65536) of these in a configuration typically there is a few hundred. Under VM 16460x10000 (65536) of these in a configuration typically there is a few hundred. Under VM
1647for simplicity they are allocated contiguously, however on the native hardware they are not 1647for simplicity they are allocated contiguously, however on the native hardware they are not
1648they typically stay consistent between boots provided no new hardware is inserted or removed. 1648they typically stay consistent between boots provided no new hardware is inserted or removed.
@@ -1651,7 +1651,7 @@ HALT SUBCHANNEL,MODIFY SUBCHANNEL,RESUME SUBCHANNEL,START SUBCHANNEL,STORE SUBCH
1651TEST SUBCHANNEL ) we use this as the ID of the device we wish to talk to, the most 1651TEST SUBCHANNEL ) we use this as the ID of the device we wish to talk to, the most
1652important of these instructions are START SUBCHANNEL ( to start IO ), TEST SUBCHANNEL ( to check 1652important of these instructions are START SUBCHANNEL ( to start IO ), TEST SUBCHANNEL ( to check
1653whether the IO completed successfully ), & HALT SUBCHANNEL ( to kill IO ), a subchannel 1653whether the IO completed successfully ), & HALT SUBCHANNEL ( to kill IO ), a subchannel
1654can have up to 8 channel paths to a device this offers redunancy if one is not available. 1654can have up to 8 channel paths to a device this offers redundancy if one is not available.
1655 1655
1656 1656
1657Device Number: 1657Device Number:
@@ -1659,7 +1659,7 @@ This number remains static & Is closely tied to the hardware, there are 65536 of
1659also they are made up of a CHPID ( Channel Path ID, the most significant 8 bits ) 1659also they are made up of a CHPID ( Channel Path ID, the most significant 8 bits )
1660& another lsb 8 bits. These remain static even if more devices are inserted or removed 1660& another lsb 8 bits. These remain static even if more devices are inserted or removed
1661from the hardware, there is a 1 to 1 mapping between Subchannels & Device Numbers provided 1661from the hardware, there is a 1 to 1 mapping between Subchannels & Device Numbers provided
1662devices arent inserted or removed. 1662devices aren't inserted or removed.
1663 1663
1664Channel Control Words: 1664Channel Control Words:
1665CCWS are linked lists of instructions initially pointed to by an operation request block (ORB), 1665CCWS are linked lists of instructions initially pointed to by an operation request block (ORB),
@@ -1674,7 +1674,7 @@ concurrently, you check how the IO went on by issuing a TEST SUBCHANNEL at each
1674from which you receive an Interruption response block (IRB). If you get channel & device end 1674from which you receive an Interruption response block (IRB). If you get channel & device end
1675status in the IRB without channel checks etc. your IO probably went okay. If you didn't you 1675status in the IRB without channel checks etc. your IO probably went okay. If you didn't you
1676probably need a doctor to examine the IRB & extended status word etc. 1676probably need a doctor to examine the IRB & extended status word etc.
1677If an error occurs, more sophistocated control units have a facitity known as 1677If an error occurs, more sophisticated control units have a facility known as
1678concurrent sense this means that if an error occurs Extended sense information will 1678concurrent sense this means that if an error occurs Extended sense information will
1679be presented in the Extended status word in the IRB if not you have to issue a 1679be presented in the Extended status word in the IRB if not you have to issue a
1680subsequent SENSE CCW command after the test subchannel. 1680subsequent SENSE CCW command after the test subchannel.
@@ -1749,7 +1749,7 @@ Interface (OEMI).
1749This byte wide Parallel channel path/bus has parity & data on the "Bus" cable 1749This byte wide Parallel channel path/bus has parity & data on the "Bus" cable
1750& control lines on the "Tag" cable. These can operate in byte multiplex mode for 1750& control lines on the "Tag" cable. These can operate in byte multiplex mode for
1751sharing between several slow devices or burst mode & monopolize the channel for the 1751sharing between several slow devices or burst mode & monopolize the channel for the
1752whole burst. Upto 256 devices can be addressed on one of these cables. These cables are 1752whole burst. Up to 256 devices can be addressed on one of these cables. These cables are
1753about one inch in diameter. The maximum unextended length supported by these cables is 1753about one inch in diameter. The maximum unextended length supported by these cables is
1754125 Meters but this can be extended up to 2km with a fibre optic channel extended 1754125 Meters but this can be extended up to 2km with a fibre optic channel extended
1755such as a 3044. The maximum burst speed supported is 4.5 megabytes per second however 1755such as a 3044. The maximum burst speed supported is 4.5 megabytes per second however
@@ -1759,7 +1759,7 @@ One of these paths can be daisy chained to up to 8 control units.
1759 1759
1760ESCON if fibre optic it is also called FICON 1760ESCON if fibre optic it is also called FICON
1761Was introduced by IBM in 1990. Has 2 fibre optic cables & uses either leds or lasers 1761Was introduced by IBM in 1990. Has 2 fibre optic cables & uses either leds or lasers
1762for communication at a signaling rate of upto 200 megabits/sec. As 10bits are transferred 1762for communication at a signaling rate of up to 200 megabits/sec. As 10bits are transferred
1763for every 8 bits info this drops to 160 megabits/sec & to 18.6 Megabytes/sec once 1763for every 8 bits info this drops to 160 megabits/sec & to 18.6 Megabytes/sec once
1764control info & CRC are added. ESCON only operates in burst mode. 1764control info & CRC are added. ESCON only operates in burst mode.
1765 1765
@@ -1767,7 +1767,7 @@ ESCONs typical max cable length is 3km for the led version & 20km for the laser
1767known as XDF ( extended distance facility ). This can be further extended by using an 1767known as XDF ( extended distance facility ). This can be further extended by using an
1768ESCON director which triples the above mentioned ranges. Unlike Bus & Tag as ESCON is 1768ESCON director which triples the above mentioned ranges. Unlike Bus & Tag as ESCON is
1769serial it uses a packet switching architecture the standard Bus & Tag control protocol 1769serial it uses a packet switching architecture the standard Bus & Tag control protocol
1770is however present within the packets. Upto 256 devices can be attached to each control 1770is however present within the packets. Up to 256 devices can be attached to each control
1771unit that uses one of these interfaces. 1771unit that uses one of these interfaces.
1772 1772
1773Common 390 Devices include: 1773Common 390 Devices include:
@@ -2050,7 +2050,7 @@ list test.c:1,10
2050 2050
2051directory: 2051directory:
2052Adds directories to be searched for source if gdb cannot find the source. 2052Adds directories to be searched for source if gdb cannot find the source.
2053(note it is a bit sensititive about slashes) 2053(note it is a bit sensitive about slashes)
2054e.g. To add the root of the filesystem to the searchpath do 2054e.g. To add the root of the filesystem to the searchpath do
2055directory // 2055directory //
2056 2056
@@ -2152,7 +2152,7 @@ program as if it just crashed on your system, it is usually called core & create
2152current working directory. 2152current working directory.
2153This is very useful in that a customer can mail a core dump to a technical support department 2153This is very useful in that a customer can mail a core dump to a technical support department
2154& the technical support department can reconstruct what happened. 2154& the technical support department can reconstruct what happened.
2155Provided the have an identical copy of this program with debugging symbols compiled in & 2155Provided they have an identical copy of this program with debugging symbols compiled in &
2156the source base of this build is available. 2156the source base of this build is available.
2157In short it is far more useful than something like a crash log could ever hope to be. 2157In short it is far more useful than something like a crash log could ever hope to be.
2158 2158
diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt
index d80e5733827d..05a2b4f7e38f 100644
--- a/Documentation/s390/cds.txt
+++ b/Documentation/s390/cds.txt
@@ -98,7 +98,7 @@ The following chapters describe the I/O related interface routines the
98Linux/390 common device support (CDS) provides to allow for device specific 98Linux/390 common device support (CDS) provides to allow for device specific
99driver implementations on the IBM ESA/390 hardware platform. Those interfaces 99driver implementations on the IBM ESA/390 hardware platform. Those interfaces
100intend to provide the functionality required by every device driver 100intend to provide the functionality required by every device driver
101implementaion to allow to drive a specific hardware device on the ESA/390 101implementation to allow to drive a specific hardware device on the ESA/390
102platform. Some of the interface routines are specific to Linux/390 and some 102platform. Some of the interface routines are specific to Linux/390 and some
103of them can be found on other Linux platforms implementations too. 103of them can be found on other Linux platforms implementations too.
104Miscellaneous function prototypes, data declarations, and macro definitions 104Miscellaneous function prototypes, data declarations, and macro definitions
@@ -114,7 +114,7 @@ the ESA/390 architecture has implemented a so called channel subsystem, that
114provides a unified view of the devices physically attached to the systems. 114provides a unified view of the devices physically attached to the systems.
115Though the ESA/390 hardware platform knows about a huge variety of different 115Though the ESA/390 hardware platform knows about a huge variety of different
116peripheral attachments like disk devices (aka. DASDs), tapes, communication 116peripheral attachments like disk devices (aka. DASDs), tapes, communication
117controllers, etc. they can all by accessed by a well defined access method and 117controllers, etc. they can all be accessed by a well defined access method and
118they are presenting I/O completion a unified way : I/O interruptions. Every 118they are presenting I/O completion a unified way : I/O interruptions. Every
119single device is uniquely identified to the system by a so called subchannel, 119single device is uniquely identified to the system by a so called subchannel,
120where the ESA/390 architecture allows for 64k devices be attached. 120where the ESA/390 architecture allows for 64k devices be attached.
@@ -174,14 +174,10 @@ read_dev_chars() - Read Device Characteristics
174 174
175This routine returns the characteristics for the device specified. 175This routine returns the characteristics for the device specified.
176 176
177The function is meant to be called with an irq handler in place; that is, 177The function is meant to be called with the device already enabled; that is,
178at earliest during set_online() processing. 178at earliest during set_online() processing.
179 179
180While the request is processed synchronously, the device interrupt 180The ccw_device must not be locked prior to calling read_dev_chars().
181handler is called for final ending status. In case of error situations the
182interrupt handler may recover appropriately. The device irq handler can
183recognize the corresponding interrupts by the interruption parameter be
1840x00524443. The ccw_device must not be locked prior to calling read_dev_chars().
185 181
186The function may be called enabled or disabled. 182The function may be called enabled or disabled.
187 183
@@ -342,7 +338,7 @@ DOIO_REPORT_ALL - report all interrupt conditions
342The ccw_device_start() function returns : 338The ccw_device_start() function returns :
343 339
344 0 - successful completion or request successfully initiated 340 0 - successful completion or request successfully initiated
345-EBUSY - The device is currently processing a previous I/O request, or ther is 341-EBUSY - The device is currently processing a previous I/O request, or there is
346 a status pending at the device. 342 a status pending at the device.
347-ENODEV - cdev is invalid, the device is not operational or the ccw_device is 343-ENODEV - cdev is invalid, the device is not operational or the ccw_device is
348 not online. 344 not online.
@@ -365,7 +361,7 @@ first:
365-EIO: the common I/O layer terminated the request due to an error state 361-EIO: the common I/O layer terminated the request due to an error state
366 362
367If the concurrent sense flag in the extended status word in the irb is set, the 363If the concurrent sense flag in the extended status word in the irb is set, the
368field irb->scsw.count describes the numer of device specific sense bytes 364field irb->scsw.count describes the number of device specific sense bytes
369available in the extended control word irb->scsw.ecw[0]. No device sensing by 365available in the extended control word irb->scsw.ecw[0]. No device sensing by
370the device driver itself is required. 366the device driver itself is required.
371 367
@@ -410,30 +406,11 @@ individual flag meanings.
410 406
411Usage Notes : 407Usage Notes :
412 408
413Prior to call ccw_device_start() the device driver must assure disabled state, 409ccw_device_start() must be called disabled and with the ccw device lock held.
414i.e. the I/O mask value in the PSW must be disabled. This can be accomplished
415by calling local_save_flags( flags). The current PSW flags are preserved and
416can be restored by local_irq_restore( flags) at a later time.
417
418If the device driver violates this rule while running in a uni-processor
419environment an interrupt might be presented prior to the ccw_device_start()
420routine returning to the device driver main path. In this case we will end in a
421deadlock situation as the interrupt handler will try to obtain the irq
422lock the device driver still owns (see below) !
423
424The driver must assure to hold the device specific lock. This can be
425accomplished by
426
427(i) spin_lock(get_ccwdev_lock(cdev)), or
428(ii) spin_lock_irqsave(get_ccwdev_lock(cdev), flags)
429
430Option (i) should be used if the calling routine is running disabled for
431I/O interrupts (see above) already. Option (ii) obtains the device gate und
432puts the CPU into I/O disabled state by preserving the current PSW flags.
433 410
434The device driver is allowed to issue the next ccw_device_start() call from 411The device driver is allowed to issue the next ccw_device_start() call from
435within its interrupt handler already. It is not required to schedule a 412within its interrupt handler already. It is not required to schedule a
436bottom-half, unless an non deterministically long running error recovery procedure 413bottom-half, unless a non deterministically long running error recovery procedure
437or similar needs to be scheduled. During I/O processing the Linux/390 generic 414or similar needs to be scheduled. During I/O processing the Linux/390 generic
438I/O device driver support has already obtained the IRQ lock, i.e. the handler 415I/O device driver support has already obtained the IRQ lock, i.e. the handler
439must not try to obtain it again when calling ccw_device_start() or we end in a 416must not try to obtain it again when calling ccw_device_start() or we end in a
@@ -454,7 +431,7 @@ information prior to device-end the device driver urgently relies on. In this
454case all I/O interruptions are presented to the device driver until final 431case all I/O interruptions are presented to the device driver until final
455status is recognized. 432status is recognized.
456 433
457If a device is able to recover from asynchronosly presented I/O errors, it can 434If a device is able to recover from asynchronously presented I/O errors, it can
458perform overlapping I/O using the DOIO_EARLY_NOTIFICATION flag. While some 435perform overlapping I/O using the DOIO_EARLY_NOTIFICATION flag. While some
459devices always report channel-end and device-end together, with a single 436devices always report channel-end and device-end together, with a single
460interrupt, others present primary status (channel-end) when the channel is 437interrupt, others present primary status (channel-end) when the channel is
@@ -488,7 +465,7 @@ int ccw_device_resume(struct ccw_device *cdev);
488 465
489cdev - ccw_device the resume operation is requested for 466cdev - ccw_device the resume operation is requested for
490 467
491The resume_IO() function returns: 468The ccw_device_resume() function returns:
492 469
493 0 - suspended channel program is resumed 470 0 - suspended channel program is resumed
494-EBUSY - status pending 471-EBUSY - status pending
@@ -507,6 +484,8 @@ a long-running channel program or the device might require to initially issue
507a halt subchannel (HSCH) I/O command. For those purposes the ccw_device_halt() 484a halt subchannel (HSCH) I/O command. For those purposes the ccw_device_halt()
508command is provided. 485command is provided.
509 486
487ccw_device_halt() must be called disabled and with the ccw device lock held.
488
510int ccw_device_halt(struct ccw_device *cdev, 489int ccw_device_halt(struct ccw_device *cdev,
511 unsigned long intparm); 490 unsigned long intparm);
512 491
@@ -517,7 +496,7 @@ intparm : interruption parameter; value is only used if no I/O
517 496
518The ccw_device_halt() function returns : 497The ccw_device_halt() function returns :
519 498
520 0 - successful completion or request successfully initiated 499 0 - request successfully initiated
521-EBUSY - the device is currently busy, or status pending. 500-EBUSY - the device is currently busy, or status pending.
522-ENODEV - cdev invalid. 501-ENODEV - cdev invalid.
523-EINVAL - The device is not operational or the ccw device is not online. 502-EINVAL - The device is not operational or the ccw device is not online.
@@ -533,6 +512,23 @@ can then perform an appropriate action. Prior to interrupt of an outstanding
533read to a network device (with or without PCI flag) a ccw_device_halt() 512read to a network device (with or without PCI flag) a ccw_device_halt()
534is required to end the pending operation. 513is required to end the pending operation.
535 514
515ccw_device_clear() - Terminage I/O Request Processing
516
517In order to terminate all I/O processing at the subchannel, the clear subchannel
518(CSCH) command is used. It can be issued via ccw_device_clear().
519
520ccw_device_clear() must be called disabled and with the ccw device lock held.
521
522int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm);
523
524cdev: ccw_device the clear operation is requested for
525intparm: interruption parameter (see ccw_device_halt())
526
527The ccw_device_clear() function returns:
528
529 0 - request successfully initiated
530-ENODEV - cdev invalid
531-EINVAL - The device is not operational or the ccw device is not online.
536 532
537Miscellaneous Support Routines 533Miscellaneous Support Routines
538 534
diff --git a/Documentation/s390/crypto/crypto-API.txt b/Documentation/s390/crypto/crypto-API.txt
index 29dee792c887..71ae6ca9f2c2 100644
--- a/Documentation/s390/crypto/crypto-API.txt
+++ b/Documentation/s390/crypto/crypto-API.txt
@@ -17,8 +17,8 @@ arch/s390/crypto directory.
172. Probing for availability of MSA 172. Probing for availability of MSA
18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19It should be possible to use Kernels with the z990 crypto implementations both 19It should be possible to use Kernels with the z990 crypto implementations both
20on machines with MSA available an on those without MSA (pre z990 or z990 20on machines with MSA available and on those without MSA (pre z990 or z990
21without MSA). Therefore a simple probing mechanisms has been implemented: 21without MSA). Therefore a simple probing mechanism has been implemented:
22In the init function of each crypto module the availability of MSA and of the 22In the init function of each crypto module the availability of MSA and of the
23respective crypto algorithm in particular will be tested. If the algorithm is 23respective crypto algorithm in particular will be tested. If the algorithm is
24available the module will load and register its algorithm with the crypto API. 24available the module will load and register its algorithm with the crypto API.
@@ -26,7 +26,7 @@ available the module will load and register its algorithm with the crypto API.
26If the respective crypto algorithm is not available, the init function will 26If the respective crypto algorithm is not available, the init function will
27return -ENOSYS. In that case a fallback to the standard software implementation 27return -ENOSYS. In that case a fallback to the standard software implementation
28of the crypto algorithm must be taken ( -> the standard crypto modules are 28of the crypto algorithm must be taken ( -> the standard crypto modules are
29also build when compiling the kernel). 29also built when compiling the kernel).
30 30
31 31
323. Ensuring z990 crypto module preference 323. Ensuring z990 crypto module preference
@@ -75,8 +75,8 @@ name of the respective module is given in square brackets.
75 75
76- SHA1 Digest Algorithm [sha1 -> sha1_z990] 76- SHA1 Digest Algorithm [sha1 -> sha1_z990]
77- DES Encrypt/Decrypt Algorithm (64bit key) [des -> des_z990] 77- DES Encrypt/Decrypt Algorithm (64bit key) [des -> des_z990]
78- Tripple DES Encrypt/Decrypt Algorithm (128bit key) [des3_ede128 -> des_z990] 78- Triple DES Encrypt/Decrypt Algorithm (128bit key) [des3_ede128 -> des_z990]
79- Tripple DES Encrypt/Decrypt Algorithm (192bit key) [des3_ede -> des_z990] 79- Triple DES Encrypt/Decrypt Algorithm (192bit key) [des3_ede -> des_z990]
80 80
81In order to load, for example, the sha1_z990 module when the sha1 algorithm is 81In order to load, for example, the sha1_z990 module when the sha1 algorithm is
82requested (see 3.2.) add 'alias sha1 sha1_z990' to /etc/modprobe.conf. 82requested (see 3.2.) add 'alias sha1 sha1_z990' to /etc/modprobe.conf.
diff --git a/Documentation/s390/driver-model.txt b/Documentation/s390/driver-model.txt
index 62c082387aea..e938c442277d 100644
--- a/Documentation/s390/driver-model.txt
+++ b/Documentation/s390/driver-model.txt
@@ -18,11 +18,18 @@ devices/
18 - 0.0.0002/ 18 - 0.0.0002/
19 - 0.1.0000/0.1.1234/ 19 - 0.1.0000/0.1.1234/
20 ... 20 ...
21 - defunct/
21 22
22In this example, device 0815 is accessed via subchannel 0 in subchannel set 0, 23In this example, device 0815 is accessed via subchannel 0 in subchannel set 0,
23device 4711 via subchannel 1 in subchannel set 0, and subchannel 2 is a non-I/O 24device 4711 via subchannel 1 in subchannel set 0, and subchannel 2 is a non-I/O
24subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1. 25subchannel. Device 1234 is accessed via subchannel 0 in subchannel set 1.
25 26
27The subchannel named 'defunct' does not represent any real subchannel on the
28system; it is a pseudo subchannel where disconnnected ccw devices are moved to
29if they are displaced by another ccw device becoming operational on their
30former subchannel. The ccw devices will be moved again to a proper subchannel
31if they become operational again on that subchannel.
32
26You should address a ccw device via its bus id (e.g. 0.0.4711); the device can 33You should address a ccw device via its bus id (e.g. 0.0.4711); the device can
27be found under bus/ccw/devices/. 34be found under bus/ccw/devices/.
28 35
@@ -239,6 +246,9 @@ status - Can be 'online' or 'offline'.
239 246
240type - The physical type of the channel path. 247type - The physical type of the channel path.
241 248
249shared - Whether the channel path is shared.
250
251cmg - The channel measurement group.
242 252
2433. System devices 2533. System devices
244----------------- 254-----------------
diff --git a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt
index 000230cd26db..0eb7c58916de 100644
--- a/Documentation/s390/s390dbf.txt
+++ b/Documentation/s390/s390dbf.txt
@@ -36,7 +36,7 @@ switches to the next debug area. This is done in order to be sure
36that the records which describe the origin of the exception are not 36that the records which describe the origin of the exception are not
37overwritten when a wrap around for the current area occurs. 37overwritten when a wrap around for the current area occurs.
38 38
39The debug areas itselve are also ordered in form of a ring buffer. 39The debug areas themselves are also ordered in form of a ring buffer.
40When an exception is thrown in the last debug area, the following debug 40When an exception is thrown in the last debug area, the following debug
41entries are then written again in the very first area. 41entries are then written again in the very first area.
42 42
@@ -55,7 +55,7 @@ The debug logs can be inspected in a live system through entries in
55the debugfs-filesystem. Under the toplevel directory "s390dbf" there is 55the debugfs-filesystem. Under the toplevel directory "s390dbf" there is
56a directory for each registered component, which is named like the 56a directory for each registered component, which is named like the
57corresponding component. The debugfs normally should be mounted to 57corresponding component. The debugfs normally should be mounted to
58/sys/kernel/debug therefore the debug feature can be accessed unter 58/sys/kernel/debug therefore the debug feature can be accessed under
59/sys/kernel/debug/s390dbf. 59/sys/kernel/debug/s390dbf.
60 60
61The content of the directories are files which represent different views 61The content of the directories are files which represent different views
@@ -87,11 +87,11 @@ There are currently 2 possible triggers, which stop the debug feature
87globally. The first possibility is to use the "debug_active" sysctl. If 87globally. The first possibility is to use the "debug_active" sysctl. If
88set to 1 the debug feature is running. If "debug_active" is set to 0 the 88set to 1 the debug feature is running. If "debug_active" is set to 0 the
89debug feature is turned off. 89debug feature is turned off.
90The second trigger which stops the debug feature is an kernel oops. 90The second trigger which stops the debug feature is a kernel oops.
91That prevents the debug feature from overwriting debug information that 91That prevents the debug feature from overwriting debug information that
92happened before the oops. After an oops you can reactivate the debug feature 92happened before the oops. After an oops you can reactivate the debug feature
93by piping 1 to /proc/sys/s390dbf/debug_active. Nevertheless, its not 93by piping 1 to /proc/sys/s390dbf/debug_active. Nevertheless, its not
94suggested to use an oopsed kernel in an production environment. 94suggested to use an oopsed kernel in a production environment.
95If you want to disallow the deactivation of the debug feature, you can use 95If you want to disallow the deactivation of the debug feature, you can use
96the "debug_stoppable" sysctl. If you set "debug_stoppable" to 0 the debug 96the "debug_stoppable" sysctl. If you set "debug_stoppable" to 0 the debug
97feature cannot be stopped. If the debug feature is already stopped, it 97feature cannot be stopped. If the debug feature is already stopped, it
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt
index 904d49e90ef2..6aa9a891f3d0 100644
--- a/Documentation/scsi/aic79xx.txt
+++ b/Documentation/scsi/aic79xx.txt
@@ -127,7 +127,7 @@ The following information is available in this file:
127 - Correct a reference to free'ed memory during controller 127 - Correct a reference to free'ed memory during controller
128 shutdown. 128 shutdown.
129 - Reset the bus on an SE->LVD change. This is required 129 - Reset the bus on an SE->LVD change. This is required
130 to reset our transcievers. 130 to reset our transceivers.
131 131
132 1.3.5 (March 24th, 2003) 132 1.3.5 (March 24th, 2003)
133 - Fix a few register window mode bugs. 133 - Fix a few register window mode bugs.
@@ -169,7 +169,7 @@ The following information is available in this file:
169 1.3.0 (January 21st, 2003) 169 1.3.0 (January 21st, 2003)
170 - Full regression testing for all U320 products completed. 170 - Full regression testing for all U320 products completed.
171 - Added abort and target/lun reset error recovery handler and 171 - Added abort and target/lun reset error recovery handler and
172 interrupt coalessing. 172 interrupt coalescing.
173 173
174 1.2.0 (November 14th, 2002) 174 1.2.0 (November 14th, 2002)
175 - Added support for Domain Validation 175 - Added support for Domain Validation
diff --git a/Documentation/scsi/aic7xxx_old.txt b/Documentation/scsi/aic7xxx_old.txt
index c92f4473193b..05667e7308d4 100644
--- a/Documentation/scsi/aic7xxx_old.txt
+++ b/Documentation/scsi/aic7xxx_old.txt
@@ -256,7 +256,7 @@ linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
256 En/Disable High Byte LVD Termination 256 En/Disable High Byte LVD Termination
257 257
258 The upper 2 bits that deal with LVD termination only apply to Ultra2 258 The upper 2 bits that deal with LVD termination only apply to Ultra2
259 controllers. Futhermore, due to the current Ultra2 controller 259 controllers. Furthermore, due to the current Ultra2 controller
260 designs, these bits are tied together such that setting either bit 260 designs, these bits are tied together such that setting either bit
261 enables both low and high byte LVD termination. It is not possible 261 enables both low and high byte LVD termination. It is not possible
262 to only set high or low byte LVD termination in this manner. This is 262 to only set high or low byte LVD termination in this manner. This is
@@ -436,7 +436,7 @@ linux-1.1.x and fairly stable since linux-1.2.x, and are also in FreeBSD
436 the commas to periods, insmod won't interpret this as more than one 436 the commas to periods, insmod won't interpret this as more than one
437 string and write junk into our binary image. I consider it a bug in 437 string and write junk into our binary image. I consider it a bug in
438 the insmod program that even if you wrap your string in quotes (quotes 438 the insmod program that even if you wrap your string in quotes (quotes
439 that pass the shell mind you and that insmod sees) it still treates 439 that pass the shell mind you and that insmod sees) it still treats
440 a comma inside of those quotes as starting a new variable, resulting 440 a comma inside of those quotes as starting a new variable, resulting
441 in memory scribbles if you don't switch the commas to periods. 441 in memory scribbles if you don't switch the commas to periods.
442 442
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt
index 35f6b8ed2295..9707941704e3 100644
--- a/Documentation/scsi/ibmmca.txt
+++ b/Documentation/scsi/ibmmca.txt
@@ -461,7 +461,7 @@
461 This needs the RD-Bit to be disabled on IM_OTHER_SCSI_CMD_CMD which 461 This needs the RD-Bit to be disabled on IM_OTHER_SCSI_CMD_CMD which
462 allows data to be written from the system to the device. It is a 462 allows data to be written from the system to the device. It is a
463 necessary step to be allowed to set blocksize of SCSI-tape-drives and 463 necessary step to be allowed to set blocksize of SCSI-tape-drives and
464 the tape-speed, whithout confusing the SCSI-Subsystem. 464 the tape-speed, without confusing the SCSI-Subsystem.
465 2) The recognition of a tape is included in the check_devices routine. 465 2) The recognition of a tape is included in the check_devices routine.
466 This is done by checking for TYPE_TAPE, that is already defined in 466 This is done by checking for TYPE_TAPE, that is already defined in
467 the kernel-scsi-environment. The markup of a tape is done in the 467 the kernel-scsi-environment. The markup of a tape is done in the
@@ -710,8 +710,8 @@
710 of troubles with some controllers and after I wanted to apply some 710 of troubles with some controllers and after I wanted to apply some
711 extensions, it jumped out in the same situation, on my w/cache, as like 711 extensions, it jumped out in the same situation, on my w/cache, as like
712 on D. Weinehalls' Model 56, having integrated SCSI. This gave me the 712 on D. Weinehalls' Model 56, having integrated SCSI. This gave me the
713 descissive hint to move the code-part out and declare it global. Now, 713 decisive hint to move the code-part out and declare it global. Now
714 it seems to work by far much better an more stable. Let us see, what 714 it seems to work far better and more stable. Let us see what
715 the world thinks of it... 715 the world thinks of it...
716 3) By the way, only Sony DAT-drives seem to show density code 0x13. A 716 3) By the way, only Sony DAT-drives seem to show density code 0x13. A
717 test with a HP drive gave right results, so the problem is vendor- 717 test with a HP drive gave right results, so the problem is vendor-
@@ -822,10 +822,10 @@
822 A long period of collecting bugreports from all corners of the world 822 A long period of collecting bugreports from all corners of the world
823 now lead to the following corrections to the code: 823 now lead to the following corrections to the code:
824 1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this 824 1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this
825 was, that it is possible to disbale Fast-SCSI for the external bus. 825 was that it is possible to disable Fast-SCSI for the external bus.
826 The feature-control command, where this crash appeared regularly tried 826 The feature-control command, where this crash appeared regularly, tried
827 to set the maximum speed of 10MHz synchronous transfer speed and that 827 to set the maximum speed of 10MHz synchronous transfer speed and that
828 reports a COMMAND ERROR, if external bus Fast-SCSI is disabled. Now, 828 reports a COMMAND ERROR if external bus Fast-SCSI is disabled. Now,
829 the feature-command probes down from maximum speed until the adapter 829 the feature-command probes down from maximum speed until the adapter
830 stops to complain, which is at the same time the maximum possible 830 stops to complain, which is at the same time the maximum possible
831 speed selected in the reference program. So, F/W external can run at 831 speed selected in the reference program. So, F/W external can run at
@@ -920,7 +920,7 @@
920 completed in such a way, that they are now completely conform to the 920 completed in such a way, that they are now completely conform to the
921 demands in the technical description of IBM. Main candidates were the 921 demands in the technical description of IBM. Main candidates were the
922 DEVICE_INQUIRY, REQUEST_SENSE and DEVICE_CAPACITY commands. They must 922 DEVICE_INQUIRY, REQUEST_SENSE and DEVICE_CAPACITY commands. They must
923 be tranferred by bypassing the internal command buffer of the adapter 923 be transferred by bypassing the internal command buffer of the adapter
924 or else the response can be a random result. GET_POS_INFO would be more 924 or else the response can be a random result. GET_POS_INFO would be more
925 safe in usage, if one could use the SUPRESS_EXCEPTION_SHORT, but this 925 safe in usage, if one could use the SUPRESS_EXCEPTION_SHORT, but this
926 is not allowed by the technical references of IBM. (Sorry, folks, the 926 is not allowed by the technical references of IBM. (Sorry, folks, the
diff --git a/Documentation/scsi/in2000.txt b/Documentation/scsi/in2000.txt
index 80f104042645..c3e2a90475d2 100644
--- a/Documentation/scsi/in2000.txt
+++ b/Documentation/scsi/in2000.txt
@@ -24,7 +24,7 @@ UPDATE NEWS: version 1.32 - 28 Mar 98
24UPDATE NEWS: version 1.31 - 6 Jul 97 24UPDATE NEWS: version 1.31 - 6 Jul 97
25 25
26 Fixed a bug that caused incorrect SCSI status bytes to be 26 Fixed a bug that caused incorrect SCSI status bytes to be
27 returned from commands sent to LUN's greater than 0. This 27 returned from commands sent to LUNs greater than 0. This
28 means that CDROM changers work now! Fixed a bug in the 28 means that CDROM changers work now! Fixed a bug in the
29 handling of command-line arguments when loaded as a module. 29 handling of command-line arguments when loaded as a module.
30 Also put all the header data in in2000.h where it belongs. 30 Also put all the header data in in2000.h where it belongs.
diff --git a/Documentation/scsi/libsas.txt b/Documentation/scsi/libsas.txt
index 9e2078b2a615..aa54f54c4a50 100644
--- a/Documentation/scsi/libsas.txt
+++ b/Documentation/scsi/libsas.txt
@@ -393,7 +393,7 @@ struct sas_task {
393 task_proto -- _one_ of enum sas_proto 393 task_proto -- _one_ of enum sas_proto
394 scatter -- pointer to scatter gather list array 394 scatter -- pointer to scatter gather list array
395 num_scatter -- number of elements in scatter 395 num_scatter -- number of elements in scatter
396 total_xfer_len -- total number of bytes expected to be transfered 396 total_xfer_len -- total number of bytes expected to be transferred
397 data_dir -- PCI_DMA_... 397 data_dir -- PCI_DMA_...
398 task_done -- callback when the task has finished execution 398 task_done -- callback when the task has finished execution
399}; 399};
diff --git a/Documentation/scsi/ncr53c8xx.txt b/Documentation/scsi/ncr53c8xx.txt
index 58ad8db333d9..caf10b155185 100644
--- a/Documentation/scsi/ncr53c8xx.txt
+++ b/Documentation/scsi/ncr53c8xx.txt
@@ -115,7 +115,7 @@ SCSI standard documentations are available at SYMBIOS ftp server:
115 115
116 ftp://ftp.symbios.com/ 116 ftp://ftp.symbios.com/
117 117
118Usefull SCSI tools written by Eric Youngdale are available at tsx-11: 118Useful SCSI tools written by Eric Youngdale are available at tsx-11:
119 119
120 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz 120 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
121 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz 121 ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
diff --git a/Documentation/scsi/scsi-changer.txt b/Documentation/scsi/scsi-changer.txt
index d74bbd29eb3a..032399b16a53 100644
--- a/Documentation/scsi/scsi-changer.txt
+++ b/Documentation/scsi/scsi-changer.txt
@@ -88,7 +88,7 @@ If the module finds the changer, it prints some messages about the
88device [ try "dmesg" if you don't see anything ] and should show up in 88device [ try "dmesg" if you don't see anything ] and should show up in
89/proc/devices. If not.... some changers use ID ? / LUN 0 for the 89/proc/devices. If not.... some changers use ID ? / LUN 0 for the
90device and ID ? / LUN 1 for the robot mechanism. But Linux does *not* 90device and ID ? / LUN 1 for the robot mechanism. But Linux does *not*
91look for LUN's other than 0 as default, becauce there are to many 91look for LUNs other than 0 as default, because there are too many
92broken devices. So you can try: 92broken devices. So you can try:
93 93
94 1) echo "scsi add-single-device 0 0 ID 1" > /proc/scsi/scsi 94 1) echo "scsi add-single-device 0 0 ID 1" > /proc/scsi/scsi
@@ -107,7 +107,7 @@ because the kernel will translate the error codes into human-readable
107strings then. 107strings then.
108 108
109You can display these messages with the dmesg command (or check the 109You can display these messages with the dmesg command (or check the
110logfiles). If you email me some question becauce of a problem with the 110logfiles). If you email me some question because of a problem with the
111driver, please include these messages. 111driver, please include these messages.
112 112
113 113
diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
index b964eef2f62f..7acbebb17fa6 100644
--- a/Documentation/scsi/scsi_eh.txt
+++ b/Documentation/scsi/scsi_eh.txt
@@ -75,7 +75,7 @@ with the command.
75 75
76 - otherwise 76 - otherwise
77 scsi_eh_scmd_add(scmd, 0) is invoked for the command. See 77 scsi_eh_scmd_add(scmd, 0) is invoked for the command. See
78 [1-3] for details of this funciton. 78 [1-3] for details of this function.
79 79
80 80
81[1-2-2] Completing a scmd w/ timeout 81[1-2-2] Completing a scmd w/ timeout
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index 75a535a975c3..6f70f2b9327e 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -375,7 +375,6 @@ Summary:
375 scsi_add_device - creates new scsi device (lu) instance 375 scsi_add_device - creates new scsi device (lu) instance
376 scsi_add_host - perform sysfs registration and set up transport class 376 scsi_add_host - perform sysfs registration and set up transport class
377 scsi_adjust_queue_depth - change the queue depth on a SCSI device 377 scsi_adjust_queue_depth - change the queue depth on a SCSI device
378 scsi_assign_lock - replace default host_lock with given lock
379 scsi_bios_ptable - return copy of block device's partition table 378 scsi_bios_ptable - return copy of block device's partition table
380 scsi_block_requests - prevent further commands being queued to given host 379 scsi_block_requests - prevent further commands being queued to given host
381 scsi_deactivate_tcq - turn off tag command queueing 380 scsi_deactivate_tcq - turn off tag command queueing
@@ -489,20 +488,6 @@ void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged,
489 488
490 489
491/** 490/**
492 * scsi_assign_lock - replace default host_lock with given lock
493 * @shost: a pointer to a scsi host instance
494 * @lock: pointer to lock to replace host_lock for this host
495 *
496 * Returns nothing
497 *
498 * Might block: no
499 *
500 * Defined in: include/scsi/scsi_host.h .
501 **/
502void scsi_assign_lock(struct Scsi_Host *shost, spinlock_t *lock)
503
504
505/**
506 * scsi_bios_ptable - return copy of block device's partition table 491 * scsi_bios_ptable - return copy of block device's partition table
507 * @dev: pointer to block device 492 * @dev: pointer to block device
508 * 493 *
@@ -1366,17 +1351,11 @@ Locks
1366Each struct Scsi_Host instance has a spin_lock called struct 1351Each struct Scsi_Host instance has a spin_lock called struct
1367Scsi_Host::default_lock which is initialized in scsi_host_alloc() [found in 1352Scsi_Host::default_lock which is initialized in scsi_host_alloc() [found in
1368hosts.c]. Within the same function the struct Scsi_Host::host_lock pointer 1353hosts.c]. Within the same function the struct Scsi_Host::host_lock pointer
1369is initialized to point at default_lock with the scsi_assign_lock() function. 1354is initialized to point at default_lock. Thereafter lock and unlock
1370Thereafter lock and unlock operations performed by the mid level use the 1355operations performed by the mid level use the struct Scsi_Host::host_lock
1371struct Scsi_Host::host_lock pointer. 1356pointer. Previously drivers could override the host_lock pointer but
1372 1357this is not allowed anymore.
1373LLDs can override the use of struct Scsi_Host::default_lock by 1358
1374using scsi_assign_lock(). The earliest opportunity to do this would
1375be in the detect() function after it has invoked scsi_register(). It
1376could be replaced by a coarser grain lock (e.g. per driver) or a
1377lock of equal granularity (i.e. per host). Using finer grain locks
1378(e.g. per SCSI device) may be possible by juggling locks in
1379queuecommand().
1380 1359
1381Autosense 1360Autosense
1382========= 1361=========
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index 5ff65b184265..3c12422f7f41 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -261,7 +261,7 @@ pairs are separated with a comma (no spaces allowed). A colon can be
261used instead of the equal mark. The definition is prepended by the 261used instead of the equal mark. The definition is prepended by the
262string st=. Here is an example: 262string st=. Here is an example:
263 263
264 st=buffer_kbs:64,write_threhold_kbs:60 264 st=buffer_kbs:64,write_threshold_kbs:60
265 265
266The following syntax used by the old kernel versions is also supported: 266The following syntax used by the old kernel versions is also supported:
267 267
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt
index 26c8a08ca3ea..2c1745a9df00 100644
--- a/Documentation/scsi/sym53c8xx_2.txt
+++ b/Documentation/scsi/sym53c8xx_2.txt
@@ -609,7 +609,7 @@ appropriate mailing lists or news-groups. Send me a copy in order to
609be sure I will receive it. Obviously, a bug in the driver code is 609be sure I will receive it. Obviously, a bug in the driver code is
610possible. 610possible.
611 611
612 My cyrrent email address: Gerard Roudier <groudier@free.fr> 612 My current email address: Gerard Roudier <groudier@free.fr>
613 613
614Allowing disconnections is important if you use several devices on 614Allowing disconnections is important if you use several devices on
615your SCSI bus but often causes problems with buggy devices. 615your SCSI bus but often causes problems with buggy devices.
diff --git a/Documentation/sharedsubtree.txt b/Documentation/sharedsubtree.txt
index 2d8f403eb6eb..ccf1cebe744f 100644
--- a/Documentation/sharedsubtree.txt
+++ b/Documentation/sharedsubtree.txt
@@ -942,13 +942,13 @@ replicas continue to be exactly same.
942 ->mnt_slave 942 ->mnt_slave
943 ->mnt_master 943 ->mnt_master
944 944
945 ->mnt_share links togather all the mount to/from which this vfsmount 945 ->mnt_share links together all the mount to/from which this vfsmount
946 send/receives propagation events. 946 send/receives propagation events.
947 947
948 ->mnt_slave_list links all the mounts to which this vfsmount propagates 948 ->mnt_slave_list links all the mounts to which this vfsmount propagates
949 to. 949 to.
950 950
951 ->mnt_slave links togather all the slaves that its master vfsmount 951 ->mnt_slave links together all the slaves that its master vfsmount
952 propagates to. 952 propagates to.
953 953
954 ->mnt_master points to the master vfsmount from which this vfsmount 954 ->mnt_master points to the master vfsmount from which this vfsmount
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 138673a907f5..9fef210ab50a 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -753,7 +753,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
753 position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size) 753 position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
754 single_cmd - Use single immediate commands to communicate with 754 single_cmd - Use single immediate commands to communicate with
755 codecs (for debugging only) 755 codecs (for debugging only)
756 disable_msi - Disable Message Signaled Interrupt (MSI) 756 enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
757 757
758 This module supports one card and autoprobe. 758 This module supports one card and autoprobe.
759 759
@@ -955,7 +955,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
955 dmx6fire, dsp24, dsp24_value, dsp24_71, ez8, 955 dmx6fire, dsp24, dsp24_value, dsp24_71, ez8,
956 phase88, mediastation 956 phase88, mediastation
957 omni - Omni I/O support for MidiMan M-Audio Delta44/66 957 omni - Omni I/O support for MidiMan M-Audio Delta44/66
958 cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transciever) 958 cs8427_timeout - reset timeout for the CS8427 chip (S/PDIF transceiver)
959 in msec resolution, default value is 500 (0.5 sec) 959 in msec resolution, default value is 500 (0.5 sec)
960 960
961 This module supports multiple cards and autoprobe. Note: The consumer part 961 This module supports multiple cards and autoprobe. Note: The consumer part
diff --git a/Documentation/sound/alsa/Audigy-mixer.txt b/Documentation/sound/alsa/Audigy-mixer.txt
index 5132fd95e074..7f10dc6ff28c 100644
--- a/Documentation/sound/alsa/Audigy-mixer.txt
+++ b/Documentation/sound/alsa/Audigy-mixer.txt
@@ -6,7 +6,7 @@ This is based on SB-Live-mixer.txt.
6 6
7The EMU10K2 chips have a DSP part which can be programmed to support 7The EMU10K2 chips have a DSP part which can be programmed to support
8various ways of sample processing, which is described here. 8various ways of sample processing, which is described here.
9(This acticle does not deal with the overall functionality of the 9(This article does not deal with the overall functionality of the
10EMU10K2 chips. See the manuals section for further details.) 10EMU10K2 chips. See the manuals section for further details.)
11 11
12The ALSA driver programs this portion of chip by default code 12The ALSA driver programs this portion of chip by default code
diff --git a/Documentation/sound/alsa/SB-Live-mixer.txt b/Documentation/sound/alsa/SB-Live-mixer.txt
index 651adaf60473..f5639d40521d 100644
--- a/Documentation/sound/alsa/SB-Live-mixer.txt
+++ b/Documentation/sound/alsa/SB-Live-mixer.txt
@@ -5,7 +5,7 @@
5 5
6The EMU10K1 chips have a DSP part which can be programmed to support 6The EMU10K1 chips have a DSP part which can be programmed to support
7various ways of sample processing, which is described here. 7various ways of sample processing, which is described here.
8(This acticle does not deal with the overall functionality of the 8(This article does not deal with the overall functionality of the
9EMU10K1 chips. See the manuals section for further details.) 9EMU10K1 chips. See the manuals section for further details.)
10 10
11The ALSA driver programs this portion of chip by default code 11The ALSA driver programs this portion of chip by default code
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index a1e0ee20f595..f9717fe9bd85 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -102,7 +102,7 @@ struct pxa2xx_spi_chip {
102 u8 tx_threshold; 102 u8 tx_threshold;
103 u8 rx_threshold; 103 u8 rx_threshold;
104 u8 dma_burst_size; 104 u8 dma_burst_size;
105 u32 timeout_microsecs; 105 u32 timeout;
106 u8 enable_loopback; 106 u8 enable_loopback;
107 void (*cs_control)(u32 command); 107 void (*cs_control)(u32 command);
108}; 108};
@@ -121,7 +121,7 @@ the PXA2xx "Developer Manual" sections on the DMA controller and SSP Controllers
121to determine the correct value. An SSP configured for byte-wide transfers would 121to determine the correct value. An SSP configured for byte-wide transfers would
122use a value of 8. 122use a value of 8.
123 123
124The "pxa2xx_spi_chip.timeout_microsecs" fields is used to efficiently handle 124The "pxa2xx_spi_chip.timeout" fields is used to efficiently handle
125trailing bytes in the SSP receiver fifo. The correct value for this field is 125trailing bytes in the SSP receiver fifo. The correct value for this field is
126dependent on the SPI bus speed ("spi_board_info.max_speed_hz") and the specific 126dependent on the SPI bus speed ("spi_board_info.max_speed_hz") and the specific
127slave device. Please note that the PXA2xx SSP 1 does not support trailing byte 127slave device. Please note that the PXA2xx SSP 1 does not support trailing byte
@@ -162,18 +162,18 @@ static void cs8405a_cs_control(u32 command)
162} 162}
163 163
164static struct pxa2xx_spi_chip cs8415a_chip_info = { 164static struct pxa2xx_spi_chip cs8415a_chip_info = {
165 .tx_threshold = 12, /* SSP hardward FIFO threshold */ 165 .tx_threshold = 8, /* SSP hardward FIFO threshold */
166 .rx_threshold = 4, /* SSP hardward FIFO threshold */ 166 .rx_threshold = 8, /* SSP hardward FIFO threshold */
167 .dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */ 167 .dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */
168 .timeout_microsecs = 64, /* Wait at least 64usec to handle trailing */ 168 .timeout = 235, /* See Intel documentation */
169 .cs_control = cs8415a_cs_control, /* Use external chip select */ 169 .cs_control = cs8415a_cs_control, /* Use external chip select */
170}; 170};
171 171
172static struct pxa2xx_spi_chip cs8405a_chip_info = { 172static struct pxa2xx_spi_chip cs8405a_chip_info = {
173 .tx_threshold = 12, /* SSP hardward FIFO threshold */ 173 .tx_threshold = 8, /* SSP hardward FIFO threshold */
174 .rx_threshold = 4, /* SSP hardward FIFO threshold */ 174 .rx_threshold = 8, /* SSP hardward FIFO threshold */
175 .dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */ 175 .dma_burst_size = 8, /* Byte wide transfers used so 8 byte bursts */
176 .timeout_microsecs = 64, /* Wait at least 64usec to handle trailing */ 176 .timeout = 235, /* See Intel documentation */
177 .cs_control = cs8405a_cs_control, /* Use external chip select */ 177 .cs_control = cs8405a_cs_control, /* Use external chip select */
178}; 178};
179 179
diff --git a/Documentation/stable_api_nonsense.txt b/Documentation/stable_api_nonsense.txt
index f39c9d714db3..a2afca3b2bab 100644
--- a/Documentation/stable_api_nonsense.txt
+++ b/Documentation/stable_api_nonsense.txt
@@ -62,9 +62,6 @@ consider the following facts about the Linux kernel:
62 - different structures can contain different fields 62 - different structures can contain different fields
63 - Some functions may not be implemented at all, (i.e. some locks 63 - Some functions may not be implemented at all, (i.e. some locks
64 compile away to nothing for non-SMP builds.) 64 compile away to nothing for non-SMP builds.)
65 - Parameter passing of variables from function to function can be
66 done in different ways (the CONFIG_REGPARM option controls
67 this.)
68 - Memory within the kernel can be aligned in different ways, 65 - Memory within the kernel can be aligned in different ways,
69 depending on the build options. 66 depending on the build options.
70 - Linux runs on a wide range of different processor architectures. 67 - Linux runs on a wide range of different processor architectures.
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index 02a481225b0d..c815c5206e84 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -50,7 +50,7 @@ Review cycle:
50 Contact the kernel security team for more details on this procedure. 50 Contact the kernel security team for more details on this procedure.
51 51
52 52
53Review committe: 53Review committee:
54 54
55 - This is made up of a number of kernel developers who have volunteered for 55 - This is made up of a number of kernel developers who have volunteered for
56 this task, and a few that haven't. 56 this task, and a few that haven't.
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
index 5c3a51905969..aa986a35e994 100644
--- a/Documentation/sysctl/fs.txt
+++ b/Documentation/sysctl/fs.txt
@@ -146,7 +146,7 @@ or otherwise protected/tainted binaries. The modes are
146 readable by root only. This allows the end user to remove 146 readable by root only. This allows the end user to remove
147 such a dump but not access it directly. For security reasons 147 such a dump but not access it directly. For security reasons
148 core dumps in this mode will not overwrite one another or 148 core dumps in this mode will not overwrite one another or
149 other files. This mode is appropriate when adminstrators are 149 other files. This mode is appropriate when administrators are
150 attempting to debug problems in a normal environment. 150 attempting to debug problems in a normal environment.
151 151
152============================================================== 152==============================================================
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 0bc7f1e3c9e6..5922e84d9133 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -27,6 +27,7 @@ show up in /proc/sys/kernel:
27- hotplug 27- hotplug
28- java-appletviewer [ binfmt_java, obsolete ] 28- java-appletviewer [ binfmt_java, obsolete ]
29- java-interpreter [ binfmt_java, obsolete ] 29- java-interpreter [ binfmt_java, obsolete ]
30- kstack_depth_to_print [ X86 only ]
30- l2cr [ PPC only ] 31- l2cr [ PPC only ]
31- modprobe ==> Documentation/kmod.txt 32- modprobe ==> Documentation/kmod.txt
32- msgmax 33- msgmax
@@ -170,6 +171,13 @@ This flag controls the L2 cache of G3 processor boards. If
170 171
171============================================================== 172==============================================================
172 173
174kstack_depth_to_print: (X86 only)
175
176Controls the number of words to print when dumping the raw
177kernel stack.
178
179==============================================================
180
173osrelease, ostype & version: 181osrelease, ostype & version:
174 182
175# cat osrelease 183# cat osrelease
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 20d0d797f539..e96a341eb7e4 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -129,7 +129,7 @@ the high water marks for each per cpu page list.
129 129
130zone_reclaim_mode: 130zone_reclaim_mode:
131 131
132Zone_reclaim_mode allows to set more or less agressive approaches to 132Zone_reclaim_mode allows someone to set more or less aggressive approaches to
133reclaim memory when a zone runs out of memory. If it is set to zero then no 133reclaim memory when a zone runs out of memory. If it is set to zero then no
134zone reclaim occurs. Allocations will be satisfied from other zones / nodes 134zone reclaim occurs. Allocations will be satisfied from other zones / nodes
135in the system. 135in the system.
diff --git a/Documentation/uml/UserModeLinux-HOWTO.txt b/Documentation/uml/UserModeLinux-HOWTO.txt
index b60590eca18f..628013f944c4 100644
--- a/Documentation/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/uml/UserModeLinux-HOWTO.txt
@@ -1477,7 +1477,7 @@
1477 1477
1478 1478
1479 1479
1480 Making it world-writeable looks bad, but it seems not to be 1480 Making it world-writable looks bad, but it seems not to be
1481 exploitable as a security hole. However, it does allow anyone to cre- 1481 exploitable as a security hole. However, it does allow anyone to cre-
1482 ate useless tap devices (useless because they can't configure them), 1482 ate useless tap devices (useless because they can't configure them),
1483 which is a DOS attack. A somewhat more secure alternative would to be 1483 which is a DOS attack. A somewhat more secure alternative would to be
diff --git a/Documentation/usb/hiddev.txt b/Documentation/usb/hiddev.txt
index 6a790754e963..6e8c9f1d2f22 100644
--- a/Documentation/usb/hiddev.txt
+++ b/Documentation/usb/hiddev.txt
@@ -8,7 +8,7 @@ interfaces, but have similar sorts of communication needs. The two big
8examples for this are power devices (especially uninterruptable power 8examples for this are power devices (especially uninterruptable power
9supplies) and monitor control on higher end monitors. 9supplies) and monitor control on higher end monitors.
10 10
11To support these disparite requirements, the Linux USB system provides 11To support these disparate requirements, the Linux USB system provides
12HID events to two separate interfaces: 12HID events to two separate interfaces:
13* the input subsystem, which converts HID events into normal input 13* the input subsystem, which converts HID events into normal input
14device interfaces (such as keyboard, mouse and joystick) and a 14device interfaces (such as keyboard, mouse and joystick) and a
diff --git a/Documentation/usb/rio.txt b/Documentation/usb/rio.txt
index ab21db454694..aee715af7db7 100644
--- a/Documentation/usb/rio.txt
+++ b/Documentation/usb/rio.txt
@@ -24,10 +24,10 @@ are in no way responsible for any damage that may occur, no matter how
24inconsequential. 24inconsequential.
25 25
26It seems that the Rio has a problem when sending .mp3 with low batteries. 26It seems that the Rio has a problem when sending .mp3 with low batteries.
27I suggest when the batteries are low and want to transfer stuff that you 27I suggest when the batteries are low and you want to transfer stuff that you
28replace it with a fresh one. In my case, what happened is I lost two 16kb 28replace it with a fresh one. In my case, what happened is I lost two 16kb
29blocks (they are no longer usable to store information to it). But I don't 29blocks (they are no longer usable to store information to it). But I don't
30know if thats normal or not. It could simply be a problem with the flash 30know if that's normal or not; it could simply be a problem with the flash
31memory. 31memory.
32 32
33In an extreme case, I left my Rio playing overnight and the batteries wore 33In an extreme case, I left my Rio playing overnight and the batteries wore
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 8dc2bacc8f1f..d61f6e7865de 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -175,7 +175,7 @@ Keyspan USA-series Serial Adapters
175 175
176 Current status: 176 Current status:
177 The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and 177 The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and
178 have been pretty throughly tested at various baud rates with 8-N-1 178 have been pretty thoroughly tested at various baud rates with 8-N-1
179 character settings. Other character lengths and parity setups are 179 character settings. Other character lengths and parity setups are
180 presently untested. 180 presently untested.
181 181
@@ -253,7 +253,7 @@ Cypress M8 CY4601 Family Serial Driver
253 together without hacking the adapter to set the line high. 253 together without hacking the adapter to set the line high.
254 254
255 The driver is smp safe. Performance with the driver is rather low when using 255 The driver is smp safe. Performance with the driver is rather low when using
256 it for transfering files. This is being worked on, but I would be willing to 256 it for transferring files. This is being worked on, but I would be willing to
257 accept patches. An urb queue or packet buffer would likely fit the bill here. 257 accept patches. An urb queue or packet buffer would likely fit the bill here.
258 258
259 If you have any questions, problems, patches, feature requests, etc. you can 259 If you have any questions, problems, patches, feature requests, etc. you can
@@ -297,7 +297,7 @@ Belkin USB Serial Adapter F5U103
297 Parity N,E,O,M,S 297 Parity N,E,O,M,S
298 Handshake None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR)* 298 Handshake None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR)*
299 Break Set and clear 299 Break Set and clear
300 Line contrl Input/Output query and control ** 300 Line control Input/Output query and control **
301 301
302 * Hardware input flow control is only enabled for firmware 302 * Hardware input flow control is only enabled for firmware
303 levels above 2.06. Read source code comments describing Belkin 303 levels above 2.06. Read source code comments describing Belkin
@@ -309,7 +309,7 @@ Belkin USB Serial Adapter F5U103
309 automatic hardware flow control. 309 automatic hardware flow control.
310 310
311 TO DO List: 311 TO DO List:
312 -- Add true modem contol line query capability. Currently tracks the 312 -- Add true modem control line query capability. Currently tracks the
313 states reported by the interrupt and the states requested. 313 states reported by the interrupt and the states requested.
314 -- Add error reporting back to application for UART error conditions. 314 -- Add error reporting back to application for UART error conditions.
315 -- Add support for flush ioctls. 315 -- Add support for flush ioctls.
@@ -428,12 +428,6 @@ Options supported:
428 See http://www.uuhaus.de/linux/palmconnect.html for up-to-date 428 See http://www.uuhaus.de/linux/palmconnect.html for up-to-date
429 information on this driver. 429 information on this driver.
430 430
431AIRcable USB Dongle Bluetooth driver
432 If there is the cdc_acm driver loaded in the system, you will find that the
433 cdc_acm claims the device before AIRcable can. This is simply corrected
434 by unloading both modules and then loading the aircable module before
435 cdc_acm module
436
437Generic Serial driver 431Generic Serial driver
438 432
439 If your device is not one of the above listed devices, compatible with 433 If your device is not one of the above listed devices, compatible with
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 8755b3e7b09e..62e32b49cec9 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -43,7 +43,7 @@
43 42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025,1822:0019] 43 42 -> digitalnow DNTV Live! DVB-T Pro [1822:0025,1822:0019]
44 43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1,12ab:2300] 44 43 -> KWorld/VStream XPert DVB-T with cx22702 [17de:08a1,12ab:2300]
45 44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50,18ac:db54] 45 44 -> DViCO FusionHDTV DVB-T Dual Digital [18ac:db50,18ac:db54]
46 45 -> KWorld HardwareMpegTV XPert [17de:0840] 46 45 -> KWorld HardwareMpegTV XPert [17de:0840,1421:0305]
47 46 -> DViCO FusionHDTV DVB-T Hybrid [18ac:db40,18ac:db44] 47 46 -> DViCO FusionHDTV DVB-T Hybrid [18ac:db40,18ac:db44]
48 47 -> pcHDTV HD5500 HDTV [7063:5500] 48 47 -> pcHDTV HD5500 HDTV [7063:5500]
49 48 -> Kworld MCE 200 Deluxe [17de:0841] 49 48 -> Kworld MCE 200 Deluxe [17de:0841]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 53ce6a39083c..f6201cc37ec5 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -76,7 +76,7 @@
76 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] 76 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044]
77 76 -> SKNet MonsterTV Mobile [1131:4ee9] 77 76 -> SKNet MonsterTV Mobile [1131:4ee9]
78 77 -> Pinnacle PCTV 40i/50i/110i (saa7133) [11bd:002e] 78 77 -> Pinnacle PCTV 40i/50i/110i (saa7133) [11bd:002e]
79 78 -> ASUSTeK P7131 Dual [1043:4862] 79 78 -> ASUSTeK P7131 Dual [1043:4862,1043:4876]
80 79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B) 80 79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B)
81 80 -> ASUS Digimatrix TV [1043:0210] 81 80 -> ASUS Digimatrix TV [1043:0210]
82 81 -> Philips Tiger reference design [1131:2018] 82 81 -> Philips Tiger reference design [1131:2018]
@@ -99,3 +99,8 @@
99 98 -> Proteus Pro 2309 [0919:2003] 99 98 -> Proteus Pro 2309 [0919:2003]
100 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] 100 99 -> AVerMedia TV Hybrid A16AR [1461:2c00]
101100 -> Asus Europa2 OEM [1043:4860] 101100 -> Asus Europa2 OEM [1043:4860]
102101 -> Pinnacle PCTV 310i [11bd:002f]
103102 -> Avermedia AVerTV Studio 507 [1461:9715]
104103 -> Compro Videomate DVB-T200A
105104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid [0070:6701]
106105 -> Terratec Cinergy HT PCMCIA [153b:1172]
diff --git a/Documentation/video4linux/cafe_ccic b/Documentation/video4linux/cafe_ccic
new file mode 100644
index 000000000000..88821022a5de
--- /dev/null
+++ b/Documentation/video4linux/cafe_ccic
@@ -0,0 +1,54 @@
1"cafe_ccic" is a driver for the Marvell 88ALP01 "cafe" CMOS camera
2controller. This is the controller found in first-generation OLPC systems,
3and this driver was written with support from the OLPC project.
4
5Current status: the core driver works. It can generate data in YUV422,
6RGB565, and RGB444 formats. (Anybody looking at the code will see RGB32 as
7well, but that is a debugging aid which will be removed shortly). VGA and
8QVGA modes work; CIF is there but the colors remain funky. Only the OV7670
9sensor is known to work with this controller at this time.
10
11To try it out: either of these commands will work:
12
13 mplayer tv:// -tv driver=v4l2:width=640:height=480 -nosound
14 mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=bgr16 -nosound
15
16The "xawtv" utility also works; gqcam does not, for unknown reasons.
17
18There are a few load-time options, most of which can be changed after
19loading via sysfs as well:
20
21 - alloc_bufs_at_load: Normally, the driver will not allocate any DMA
22 buffers until the time comes to transfer data. If this option is set,
23 then worst-case-sized buffers will be allocated at module load time.
24 This option nails down the memory for the life of the module, but
25 perhaps decreases the chances of an allocation failure later on.
26
27 - dma_buf_size: The size of DMA buffers to allocate. Note that this
28 option is only consulted for load-time allocation; when buffers are
29 allocated at run time, they will be sized appropriately for the current
30 camera settings.
31
32 - n_dma_bufs: The controller can cycle through either two or three DMA
33 buffers. Normally, the driver tries to use three buffers; on faster
34 systems, however, it will work well with only two.
35
36 - min_buffers: The minimum number of streaming I/O buffers that the driver
37 will consent to work with. Default is one, but, on slower systems,
38 better behavior with mplayer can be achieved by setting to a higher
39 value (like six).
40
41 - max_buffers: The maximum number of streaming I/O buffers; default is
42 ten. That number was carefully picked out of a hat and should not be
43 assumed to actually mean much of anything.
44
45 - flip: If this boolean parameter is set, the sensor will be instructed to
46 invert the video image. Whether it makes sense is determined by how
47 your particular camera is mounted.
48
49Work is ongoing with this driver, stay tuned.
50
51jon
52
53Jonathan Corbet
54corbet@lwn.net
diff --git a/Documentation/video4linux/zr36120.txt b/Documentation/video4linux/zr36120.txt
deleted file mode 100644
index 1a1c2d03a5c8..000000000000
--- a/Documentation/video4linux/zr36120.txt
+++ /dev/null
@@ -1,162 +0,0 @@
1Driver for Trust Computer Products Framegrabber, version 0.6.1
2------ --- ----- -------- -------- ------------ ------- - - -
3
4- ZORAN ------------------------------------------------------
5 Author: Pauline Middelink <middelin@polyware.nl>
6 Date: 18 September 1999
7Version: 0.6.1
8
9- Description ------------------------------------------------
10
11Video4Linux compatible driver for an unknown brand framegrabber
12(Sold in the Netherlands by TRUST Computer Products) and various
13other zoran zr36120 based framegrabbers.
14
15The card contains a ZR36120 Multimedia PCI Interface and a Philips
16SAA7110 Onechip Frontend videodecoder. There is also an DSP of
17which I have forgotten the number, since i will never get that thing
18to work without specs from the vendor itself.
19
20The SAA711x are capable of processing 6 different video inputs,
21CVBS1..6 and Y1+C1, Y2+C2, Y3+C3. All in 50/60Hz, NTSC, PAL or
22SECAM and delivering a YUV datastream. On my card the input
23'CVBS-0' corresponds to channel CVBS2 and 'S-Video' to Y2+C2.
24
25I have some reports of other cards working with the mentioned
26chip sets. For a list of other working cards please have a look
27at the cards named in the tvcards struct in the beginning of
28zr36120.c
29
30After some testing, I discovered that the carddesigner messed up
31on the I2C interface. The Zoran chip includes 2 lines SDA and SCL
32which (s)he connected reversely. So we have to clock on the SDA
33and r/w data on the SCL pin. Life is fun... Each cardtype now has
34a bit which signifies if you have a card with the same deficiency.
35
36Oh, for the completeness of this story I must mention that my
37card delivers the VSYNC pulse of the SAA chip to GIRQ1, not
38GIRQ0 as some other cards have. This is also incorporated in
39the driver be clearing/setting the 'useirq1' bit in the tvcard
40description.
41
42Another problems of continuous capturing data with a Zoran chip
43is something nasty inside the chip. It effectively halves the
44fps we ought to get... Here is the scenario: capturing frames
45to memory is done in the so-called snapshot mode. In this mode
46the Zoran stops after capturing a frame worth of data and wait
47till the application set GRAB bit to indicate readiness for the
48next frame. After detecting a set bit, the chip neatly waits
49till the start of a frame, captures it and it goes back to off.
50Smart ppl will notice the problem here. Its the waiting on the
51_next_ frame each time we set the GRAB bit... Oh well, 12,5 fps
52is still plenty fast for me.
53-- update 28/7/1999 --
54Don't believe a word I just said... Proof is the output
55of `streamer -t 300 -r 25 -f avi15 -o /dev/null`
56 ++--+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
57 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
58 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
59 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
60 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
61 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
62 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
63 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
64 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
65 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
66 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+- 25/25
67 +-s+-+-+-+-+-+-+-+-+-+-+-+-+-s+-+-+-+-+-+-+-+-+-+-+-
68 syncer: done
69 writer: done
70(note the /dev/null is prudent here, my system is not able to
71 grab /and/ write 25 fps to a file... gifts welcome :) )
72The technical reasoning follows: The zoran completed the last
73frame, the VSYNC goes low, and GRAB is cleared. The interrupt
74routine starts to work since its VSYNC driven, and again
75activates the GRAB bit. A few ms later the VSYNC (re-)rises and
76the zoran starts to work on a new and freshly broadcasted frame....
77
78For pointers I used the specs of both chips. Below are the URLs:
79 http://www.zoran.com/ftp/download/devices/pci/ZR36120/36120data.pdf
80 http://www-us.semiconductor.philips.com/acrobat/datasheets/SAA_7110_A_1.pdf
81Some alternatives for the Philips SAA 7110 datasheet are:
82 http://www.datasheetcatalog.com/datasheets_pdf/S/A/A/7/SAA7110.shtml
83 http://www.datasheetarchive.com/search.php?search=SAA7110&sType=part
84
85The documentation has very little on absolute numbers or timings
86needed for the various modes/resolutions, but there are other
87programs you can borrow those from.
88
89------ Install --------------------------------------------
90Read the file called TODO. Note its long list of limitations.
91
92Build a kernel with VIDEO4LINUX enabled. Activate the
93BT848 driver; we need this because we have need for the
94other modules (i2c and videodev) it enables.
95
96To install this software, extract it into a suitable directory.
97Examine the makefile and change anything you don't like. Type "make".
98
99After making the modules check if you have the much needed
100/dev/video devices. If not, execute the following 4 lines:
101 mknod /dev/video c 81 0
102 mknod /dev/video1 c 81 1
103 mknod /dev/video2 c 81 2
104 mknod /dev/video3 c 81 3
105 mknod /dev/video4 c 81 4
106
107After making/checking the devices do:
108 modprobe i2c
109 modprobe videodev
110 modprobe saa7110 (optional)
111 modprobe saa7111 (optional)
112 modprobe tuner (optional)
113 insmod zoran cardtype=<n>
114
115<n> is the cardtype of the card you have. The cardnumber can
116be found in the source of zr36120. Look for tvcards. If your
117card is not there, please try if any other card gives some
118response, and mail me if you got a working tvcard addition.
119
120PS. <TVCard editors behold!)
121 Don't forget to set video_input to the number of inputs
122 you defined in the video_mux part of the tvcard definition.
123 It's a common error to add a channel but not incrementing
124 video_input and getting angry with me/v4l/linux/linus :(
125
126You are now ready to test the framegrabber with your favorite
127video4linux compatible tool
128
129------ Application ----------------------------------------
130
131This device works with all Video4Linux compatible applications,
132given the limitations in the TODO file.
133
134------ API ------------------------------------------------
135
136This uses the V4L interface as of kernel release 2.1.116, and in
137fact has not been tested on any lower version. There are a couple
138of minor differences due to the fact that the amount of data returned
139with each frame varies, and no doubt there are discrepancies due to my
140misunderstanding of the API. I intend to convert this driver to the
141new V4L2 API when it has stabilized more.
142
143------ Current state --------------------------------------
144
145The driver is capable of overlaying a video image in screen, and
146even capable of grabbing frames. It uses the BIGPHYSAREA patch
147to allocate lots of large memory blocks when tis patch is
148found in the kernel, but it doesn't need it.
149The consequence is that, when loading the driver as a module,
150the module may tell you it's out of memory, but 'free' says
151otherwise. The reason is simple; the modules wants its memory
152contiguous, not fragmented, and after a long uptime there
153probably isn't a fragment of memory large enough...
154
155The driver uses a double buffering scheme, which should really
156be an n-way buffer, depending on the size of allocated framebuffer
157and the requested grab-size/format.
158This current version also fixes a dead-lock situation during irq
159time, which really, really froze my system... :)
160
161Good luck.
162 Pauline
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c
index 85cf17c48669..47801bc7e742 100644
--- a/Documentation/watchdog/src/watchdog-simple.c
+++ b/Documentation/watchdog/src/watchdog-simple.c
@@ -1,4 +1,6 @@
1#include <stdio.h>
1#include <stdlib.h> 2#include <stdlib.h>
3#include <unistd.h>
2#include <fcntl.h> 4#include <fcntl.h>
3 5
4int main(int argc, const char *argv[]) { 6int main(int argc, const char *argv[]) {
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt
index 7e8ae83e9847..8d16f6f3c4ec 100644
--- a/Documentation/watchdog/watchdog-api.txt
+++ b/Documentation/watchdog/watchdog-api.txt
@@ -214,7 +214,7 @@ returned value is the temperature in degrees fahrenheit.
214 214
215Finally the SETOPTIONS ioctl can be used to control some aspects of 215Finally the SETOPTIONS ioctl can be used to control some aspects of
216the cards operation; right now the pcwd driver is the only one 216the cards operation; right now the pcwd driver is the only one
217supporting thiss ioctl. 217supporting this ioctl.
218 218
219 int options = 0; 219 int options = 0;
220 ioctl(fd, WDIOC_SETOPTIONS, options); 220 ioctl(fd, WDIOC_SETOPTIONS, options);
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt
index f3c57f43ba64..dbdcaf68e3ea 100644
--- a/Documentation/x86_64/boot-options.txt
+++ b/Documentation/x86_64/boot-options.txt
@@ -52,10 +52,6 @@ APICs
52 apicmaintimer. Useful when your PIT timer is totally 52 apicmaintimer. Useful when your PIT timer is totally
53 broken. 53 broken.
54 54
55 disable_8254_timer / enable_8254_timer
56 Enable interrupt 0 timer routing over the 8254 in addition to over
57 the IO-APIC. The kernel tries to set a sensible default.
58
59Early Console 55Early Console
60 56
61 syntax: earlyprintk=vga 57 syntax: earlyprintk=vga
@@ -183,7 +179,7 @@ PCI
183IOMMU 179IOMMU
184 180
185 iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge] 181 iommu=[size][,noagp][,off][,force][,noforce][,leak][,memaper[=order]][,merge]
186 [,forcesac][,fullflush][,nomerge][,noaperture] 182 [,forcesac][,fullflush][,nomerge][,noaperture][,calgary]
187 size set size of iommu (in bytes) 183 size set size of iommu (in bytes)
188 noagp don't initialize the AGP driver and use full aperture. 184 noagp don't initialize the AGP driver and use full aperture.
189 off don't use the IOMMU 185 off don't use the IOMMU
@@ -204,6 +200,7 @@ IOMMU
204 buffering. 200 buffering.
205 nodac Forbid DMA >4GB 201 nodac Forbid DMA >4GB
206 panic Always panic when IOMMU overflows 202 panic Always panic when IOMMU overflows
203 calgary Use the Calgary IOMMU if it is available
207 204
208 swiotlb=pages[,force] 205 swiotlb=pages[,force]
209 206