diff options
Diffstat (limited to 'Documentation')
89 files changed, 3314 insertions, 1189 deletions
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy new file mode 100644 index 000000000000..6434f0df012e --- /dev/null +++ b/Documentation/ABI/testing/ima_policy | |||
@@ -0,0 +1,61 @@ | |||
1 | What: security/ima/policy | ||
2 | Date: May 2008 | ||
3 | Contact: Mimi Zohar <zohar@us.ibm.com> | ||
4 | Description: | ||
5 | The Trusted Computing Group(TCG) runtime Integrity | ||
6 | Measurement Architecture(IMA) maintains a list of hash | ||
7 | values of executables and other sensitive system files | ||
8 | loaded into the run-time of this system. At runtime, | ||
9 | the policy can be constrained based on LSM specific data. | ||
10 | Policies are loaded into the securityfs file ima/policy | ||
11 | by opening the file, writing the rules one at a time and | ||
12 | then closing the file. The new policy takes effect after | ||
13 | the file ima/policy is closed. | ||
14 | |||
15 | rule format: action [condition ...] | ||
16 | |||
17 | action: measure | dont_measure | ||
18 | condition:= base | lsm | ||
19 | base: [[func=] [mask=] [fsmagic=] [uid=]] | ||
20 | lsm: [[subj_user=] [subj_role=] [subj_type=] | ||
21 | [obj_user=] [obj_role=] [obj_type=]] | ||
22 | |||
23 | base: func:= [BPRM_CHECK][FILE_MMAP][INODE_PERMISSION] | ||
24 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | ||
25 | fsmagic:= hex value | ||
26 | uid:= decimal value | ||
27 | lsm: are LSM specific | ||
28 | |||
29 | default policy: | ||
30 | # PROC_SUPER_MAGIC | ||
31 | dont_measure fsmagic=0x9fa0 | ||
32 | # SYSFS_MAGIC | ||
33 | dont_measure fsmagic=0x62656572 | ||
34 | # DEBUGFS_MAGIC | ||
35 | dont_measure fsmagic=0x64626720 | ||
36 | # TMPFS_MAGIC | ||
37 | dont_measure fsmagic=0x01021994 | ||
38 | # SECURITYFS_MAGIC | ||
39 | dont_measure fsmagic=0x73636673 | ||
40 | |||
41 | measure func=BPRM_CHECK | ||
42 | measure func=FILE_MMAP mask=MAY_EXEC | ||
43 | measure func=INODE_PERM mask=MAY_READ uid=0 | ||
44 | |||
45 | The default policy measures all executables in bprm_check, | ||
46 | all files mmapped executable in file_mmap, and all files | ||
47 | open for read by root in inode_permission. | ||
48 | |||
49 | Examples of LSM specific definitions: | ||
50 | |||
51 | SELinux: | ||
52 | # SELINUX_MAGIC | ||
53 | dont_measure fsmagic=0xF97CFF8C | ||
54 | |||
55 | dont_measure obj_type=var_log_t | ||
56 | dont_measure obj_type=auditd_log_t | ||
57 | measure subj_user=system_u func=INODE_PERM mask=MAY_READ | ||
58 | measure subj_role=system_r func=INODE_PERM mask=MAY_READ | ||
59 | |||
60 | Smack: | ||
61 | measure subj_user=_ func=INODE_PERM mask=MAY_READ | ||
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 2a3fcc55e981..d9aa43d78bcc 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
@@ -609,3 +609,109 @@ size is the size (and should be a page-sized multiple). | |||
609 | The return value will be either a pointer to the processor virtual | 609 | The return value will be either a pointer to the processor virtual |
610 | address of the memory, or an error (via PTR_ERR()) if any part of the | 610 | address of the memory, or an error (via PTR_ERR()) if any part of the |
611 | region is occupied. | 611 | region is occupied. |
612 | |||
613 | Part III - Debug drivers use of the DMA-API | ||
614 | ------------------------------------------- | ||
615 | |||
616 | The DMA-API as described above as some constraints. DMA addresses must be | ||
617 | released with the corresponding function with the same size for example. With | ||
618 | the advent of hardware IOMMUs it becomes more and more important that drivers | ||
619 | do not violate those constraints. In the worst case such a violation can | ||
620 | result in data corruption up to destroyed filesystems. | ||
621 | |||
622 | To debug drivers and find bugs in the usage of the DMA-API checking code can | ||
623 | be compiled into the kernel which will tell the developer about those | ||
624 | violations. If your architecture supports it you can select the "Enable | ||
625 | debugging of DMA-API usage" option in your kernel configuration. Enabling this | ||
626 | option has a performance impact. Do not enable it in production kernels. | ||
627 | |||
628 | If you boot the resulting kernel will contain code which does some bookkeeping | ||
629 | about what DMA memory was allocated for which device. If this code detects an | ||
630 | error it prints a warning message with some details into your kernel log. An | ||
631 | example warning message may look like this: | ||
632 | |||
633 | ------------[ cut here ]------------ | ||
634 | WARNING: at /data2/repos/linux-2.6-iommu/lib/dma-debug.c:448 | ||
635 | check_unmap+0x203/0x490() | ||
636 | Hardware name: | ||
637 | forcedeth 0000:00:08.0: DMA-API: device driver frees DMA memory with wrong | ||
638 | function [device address=0x00000000640444be] [size=66 bytes] [mapped as | ||
639 | single] [unmapped as page] | ||
640 | Modules linked in: nfsd exportfs bridge stp llc r8169 | ||
641 | Pid: 0, comm: swapper Tainted: G W 2.6.28-dmatest-09289-g8bb99c0 #1 | ||
642 | Call Trace: | ||
643 | <IRQ> [<ffffffff80240b22>] warn_slowpath+0xf2/0x130 | ||
644 | [<ffffffff80647b70>] _spin_unlock+0x10/0x30 | ||
645 | [<ffffffff80537e75>] usb_hcd_link_urb_to_ep+0x75/0xc0 | ||
646 | [<ffffffff80647c22>] _spin_unlock_irqrestore+0x12/0x40 | ||
647 | [<ffffffff8055347f>] ohci_urb_enqueue+0x19f/0x7c0 | ||
648 | [<ffffffff80252f96>] queue_work+0x56/0x60 | ||
649 | [<ffffffff80237e10>] enqueue_task_fair+0x20/0x50 | ||
650 | [<ffffffff80539279>] usb_hcd_submit_urb+0x379/0xbc0 | ||
651 | [<ffffffff803b78c3>] cpumask_next_and+0x23/0x40 | ||
652 | [<ffffffff80235177>] find_busiest_group+0x207/0x8a0 | ||
653 | [<ffffffff8064784f>] _spin_lock_irqsave+0x1f/0x50 | ||
654 | [<ffffffff803c7ea3>] check_unmap+0x203/0x490 | ||
655 | [<ffffffff803c8259>] debug_dma_unmap_page+0x49/0x50 | ||
656 | [<ffffffff80485f26>] nv_tx_done_optimized+0xc6/0x2c0 | ||
657 | [<ffffffff80486c13>] nv_nic_irq_optimized+0x73/0x2b0 | ||
658 | [<ffffffff8026df84>] handle_IRQ_event+0x34/0x70 | ||
659 | [<ffffffff8026ffe9>] handle_edge_irq+0xc9/0x150 | ||
660 | [<ffffffff8020e3ab>] do_IRQ+0xcb/0x1c0 | ||
661 | [<ffffffff8020c093>] ret_from_intr+0x0/0xa | ||
662 | <EOI> <4>---[ end trace f6435a98e2a38c0e ]--- | ||
663 | |||
664 | The driver developer can find the driver and the device including a stacktrace | ||
665 | of the DMA-API call which caused this warning. | ||
666 | |||
667 | Per default only the first error will result in a warning message. All other | ||
668 | errors will only silently counted. This limitation exist to prevent the code | ||
669 | from flooding your kernel log. To support debugging a device driver this can | ||
670 | be disabled via debugfs. See the debugfs interface documentation below for | ||
671 | details. | ||
672 | |||
673 | The debugfs directory for the DMA-API debugging code is called dma-api/. In | ||
674 | this directory the following files can currently be found: | ||
675 | |||
676 | dma-api/all_errors This file contains a numeric value. If this | ||
677 | value is not equal to zero the debugging code | ||
678 | will print a warning for every error it finds | ||
679 | into the kernel log. Be carefull with this | ||
680 | option. It can easily flood your logs. | ||
681 | |||
682 | dma-api/disabled This read-only file contains the character 'Y' | ||
683 | if the debugging code is disabled. This can | ||
684 | happen when it runs out of memory or if it was | ||
685 | disabled at boot time | ||
686 | |||
687 | dma-api/error_count This file is read-only and shows the total | ||
688 | numbers of errors found. | ||
689 | |||
690 | dma-api/num_errors The number in this file shows how many | ||
691 | warnings will be printed to the kernel log | ||
692 | before it stops. This number is initialized to | ||
693 | one at system boot and be set by writing into | ||
694 | this file | ||
695 | |||
696 | dma-api/min_free_entries | ||
697 | This read-only file can be read to get the | ||
698 | minimum number of free dma_debug_entries the | ||
699 | allocator has ever seen. If this value goes | ||
700 | down to zero the code will disable itself | ||
701 | because it is not longer reliable. | ||
702 | |||
703 | dma-api/num_free_entries | ||
704 | The current number of free dma_debug_entries | ||
705 | in the allocator. | ||
706 | |||
707 | If you have this code compiled into your kernel it will be enabled by default. | ||
708 | If you want to boot without the bookkeeping anyway you can provide | ||
709 | 'dma_debug=off' as a boot parameter. This will disable DMA-API debugging. | ||
710 | Notice that you can not enable it again at runtime. You have to reboot to do | ||
711 | so. | ||
712 | |||
713 | When the code disables itself at runtime this is most likely because it ran | ||
714 | out of dma_debug_entries. These entries are preallocated at boot. The number | ||
715 | of preallocated entries is defined per architecture. If it is too low for you | ||
716 | boot with 'dma_debug_entries=<your_desired_number>' to overwrite the | ||
717 | architectural default. | ||
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 1462ed86d40a..a3a83d38f96f 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -12,7 +12,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ | |||
12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.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 s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
15 | mac80211.xml debugobjects.xml sh.xml regulator.xml | 15 | mac80211.xml debugobjects.xml sh.xml regulator.xml \ |
16 | alsa-driver-api.xml writing-an-alsa-driver.xml | ||
16 | 17 | ||
17 | ### | 18 | ### |
18 | # The build process is as follows (targets): | 19 | # The build process is as follows (targets): |
diff --git a/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl b/Documentation/DocBook/alsa-driver-api.tmpl index 9d644f7e241e..0230a96f0564 100644 --- a/Documentation/sound/alsa/DocBook/alsa-driver-api.tmpl +++ b/Documentation/DocBook/alsa-driver-api.tmpl | |||
@@ -1,11 +1,11 @@ | |||
1 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | |
3 | <book> | 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> |
4 | <?dbhtml filename="index.html"> | ||
5 | 4 | ||
6 | <!-- ****************************************************** --> | 5 | <!-- ****************************************************** --> |
7 | <!-- Header --> | 6 | <!-- Header --> |
8 | <!-- ****************************************************** --> | 7 | <!-- ****************************************************** --> |
8 | <book id="ALSA-Driver-API"> | ||
9 | <bookinfo> | 9 | <bookinfo> |
10 | <title>The ALSA Driver API</title> | 10 | <title>The ALSA Driver API</title> |
11 | 11 | ||
@@ -35,6 +35,8 @@ | |||
35 | 35 | ||
36 | </bookinfo> | 36 | </bookinfo> |
37 | 37 | ||
38 | <toc></toc> | ||
39 | |||
38 | <chapter><title>Management of Cards and Devices</title> | 40 | <chapter><title>Management of Cards and Devices</title> |
39 | <sect1><title>Card Management</title> | 41 | <sect1><title>Card Management</title> |
40 | !Esound/core/init.c | 42 | !Esound/core/init.c |
@@ -71,6 +73,10 @@ | |||
71 | !Esound/pci/ac97/ac97_codec.c | 73 | !Esound/pci/ac97/ac97_codec.c |
72 | !Esound/pci/ac97/ac97_pcm.c | 74 | !Esound/pci/ac97/ac97_pcm.c |
73 | </sect1> | 75 | </sect1> |
76 | <sect1><title>Virtual Master Control API</title> | ||
77 | !Esound/core/vmaster.c | ||
78 | !Iinclude/sound/control.h | ||
79 | </sect1> | ||
74 | </chapter> | 80 | </chapter> |
75 | <chapter><title>MIDI API</title> | 81 | <chapter><title>MIDI API</title> |
76 | <sect1><title>Raw MIDI API</title> | 82 | <sect1><title>Raw MIDI API</title> |
@@ -89,6 +95,9 @@ | |||
89 | <sect1><title>Hardware-Dependent Devices API</title> | 95 | <sect1><title>Hardware-Dependent Devices API</title> |
90 | !Esound/core/hwdep.c | 96 | !Esound/core/hwdep.c |
91 | </sect1> | 97 | </sect1> |
98 | <sect1><title>Jack Abstraction Layer API</title> | ||
99 | !Esound/core/jack.c | ||
100 | </sect1> | ||
92 | <sect1><title>ISA DMA Helpers</title> | 101 | <sect1><title>ISA DMA Helpers</title> |
93 | !Esound/core/isadma.c | 102 | !Esound/core/isadma.c |
94 | </sect1> | 103 | </sect1> |
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index 3a882d9a90a9..c671a0168096 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl | |||
@@ -440,6 +440,7 @@ desc->chip->end(); | |||
440 | used in the generic IRQ layer. | 440 | used in the generic IRQ layer. |
441 | </para> | 441 | </para> |
442 | !Iinclude/linux/irq.h | 442 | !Iinclude/linux/irq.h |
443 | !Iinclude/linux/interrupt.h | ||
443 | </chapter> | 444 | </chapter> |
444 | 445 | ||
445 | <chapter id="pubfunctions"> | 446 | <chapter id="pubfunctions"> |
diff --git a/Documentation/DocBook/mac80211.tmpl b/Documentation/DocBook/mac80211.tmpl index 77c3c202991b..fbeaffc1dcc3 100644 --- a/Documentation/DocBook/mac80211.tmpl +++ b/Documentation/DocBook/mac80211.tmpl | |||
@@ -17,8 +17,7 @@ | |||
17 | </authorgroup> | 17 | </authorgroup> |
18 | 18 | ||
19 | <copyright> | 19 | <copyright> |
20 | <year>2007</year> | 20 | <year>2007-2009</year> |
21 | <year>2008</year> | ||
22 | <holder>Johannes Berg</holder> | 21 | <holder>Johannes Berg</holder> |
23 | </copyright> | 22 | </copyright> |
24 | 23 | ||
@@ -165,8 +164,8 @@ usage should require reading the full document. | |||
165 | !Pinclude/net/mac80211.h Frame format | 164 | !Pinclude/net/mac80211.h Frame format |
166 | </sect1> | 165 | </sect1> |
167 | <sect1> | 166 | <sect1> |
168 | <title>Alignment issues</title> | 167 | <title>Packet alignment</title> |
169 | <para>TBD</para> | 168 | !Pnet/mac80211/rx.c Packet alignment |
170 | </sect1> | 169 | </sect1> |
171 | <sect1> | 170 | <sect1> |
172 | <title>Calling into mac80211 from interrupts</title> | 171 | <title>Calling into mac80211 from interrupts</title> |
@@ -223,6 +222,17 @@ usage should require reading the full document. | |||
223 | !Finclude/net/mac80211.h ieee80211_key_flags | 222 | !Finclude/net/mac80211.h ieee80211_key_flags |
224 | </chapter> | 223 | </chapter> |
225 | 224 | ||
225 | <chapter id="powersave"> | ||
226 | <title>Powersave support</title> | ||
227 | !Pinclude/net/mac80211.h Powersave support | ||
228 | </chapter> | ||
229 | |||
230 | <chapter id="beacon-filter"> | ||
231 | <title>Beacon filter support</title> | ||
232 | !Pinclude/net/mac80211.h Beacon filter support | ||
233 | !Finclude/net/mac80211.h ieee80211_beacon_loss | ||
234 | </chapter> | ||
235 | |||
226 | <chapter id="qos"> | 236 | <chapter id="qos"> |
227 | <title>Multiple queues and QoS support</title> | 237 | <title>Multiple queues and QoS support</title> |
228 | <para>TBD</para> | 238 | <para>TBD</para> |
diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c index 8c6396e4bf31..a5b11793b1e0 100644 --- a/Documentation/DocBook/procfs_example.c +++ b/Documentation/DocBook/procfs_example.c | |||
@@ -117,9 +117,6 @@ static int __init init_procfs_example(void) | |||
117 | rv = -ENOMEM; | 117 | rv = -ENOMEM; |
118 | goto out; | 118 | goto out; |
119 | } | 119 | } |
120 | |||
121 | example_dir->owner = THIS_MODULE; | ||
122 | |||
123 | /* create jiffies using convenience function */ | 120 | /* create jiffies using convenience function */ |
124 | jiffies_file = create_proc_read_entry("jiffies", | 121 | jiffies_file = create_proc_read_entry("jiffies", |
125 | 0444, example_dir, | 122 | 0444, example_dir, |
@@ -130,8 +127,6 @@ static int __init init_procfs_example(void) | |||
130 | goto no_jiffies; | 127 | goto no_jiffies; |
131 | } | 128 | } |
132 | 129 | ||
133 | jiffies_file->owner = THIS_MODULE; | ||
134 | |||
135 | /* create foo and bar files using same callback | 130 | /* create foo and bar files using same callback |
136 | * functions | 131 | * functions |
137 | */ | 132 | */ |
@@ -146,7 +141,6 @@ static int __init init_procfs_example(void) | |||
146 | foo_file->data = &foo_data; | 141 | foo_file->data = &foo_data; |
147 | foo_file->read_proc = proc_read_foobar; | 142 | foo_file->read_proc = proc_read_foobar; |
148 | foo_file->write_proc = proc_write_foobar; | 143 | foo_file->write_proc = proc_write_foobar; |
149 | foo_file->owner = THIS_MODULE; | ||
150 | 144 | ||
151 | bar_file = create_proc_entry("bar", 0644, example_dir); | 145 | bar_file = create_proc_entry("bar", 0644, example_dir); |
152 | if(bar_file == NULL) { | 146 | if(bar_file == NULL) { |
@@ -159,7 +153,6 @@ static int __init init_procfs_example(void) | |||
159 | bar_file->data = &bar_data; | 153 | bar_file->data = &bar_data; |
160 | bar_file->read_proc = proc_read_foobar; | 154 | bar_file->read_proc = proc_read_foobar; |
161 | bar_file->write_proc = proc_write_foobar; | 155 | bar_file->write_proc = proc_write_foobar; |
162 | bar_file->owner = THIS_MODULE; | ||
163 | 156 | ||
164 | /* create symlink */ | 157 | /* create symlink */ |
165 | symlink = proc_symlink("jiffies_too", example_dir, | 158 | symlink = proc_symlink("jiffies_too", example_dir, |
@@ -169,8 +162,6 @@ static int __init init_procfs_example(void) | |||
169 | goto no_symlink; | 162 | goto no_symlink; |
170 | } | 163 | } |
171 | 164 | ||
172 | symlink->owner = THIS_MODULE; | ||
173 | |||
174 | /* everything OK */ | 165 | /* everything OK */ |
175 | printk(KERN_INFO "%s %s initialised\n", | 166 | printk(KERN_INFO "%s %s initialised\n", |
176 | MODULE_NAME, MODULE_VERS); | 167 | MODULE_NAME, MODULE_VERS); |
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl index 52e1b79ce0e6..8f6e3b2403c7 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl | |||
@@ -42,6 +42,13 @@ GPL version 2. | |||
42 | 42 | ||
43 | <revhistory> | 43 | <revhistory> |
44 | <revision> | 44 | <revision> |
45 | <revnumber>0.8</revnumber> | ||
46 | <date>2008-12-24</date> | ||
47 | <authorinitials>hjk</authorinitials> | ||
48 | <revremark>Added name attributes in mem and portio sysfs directories. | ||
49 | </revremark> | ||
50 | </revision> | ||
51 | <revision> | ||
45 | <revnumber>0.7</revnumber> | 52 | <revnumber>0.7</revnumber> |
46 | <date>2008-12-23</date> | 53 | <date>2008-12-23</date> |
47 | <authorinitials>hjk</authorinitials> | 54 | <authorinitials>hjk</authorinitials> |
@@ -303,12 +310,19 @@ interested in translating it, please email me | |||
303 | appear if the size of the mapping is not 0. | 310 | appear if the size of the mapping is not 0. |
304 | </para> | 311 | </para> |
305 | <para> | 312 | <para> |
306 | Each <filename>mapX/</filename> directory contains two read-only files | 313 | Each <filename>mapX/</filename> directory contains four read-only files |
307 | that show start address and size of the memory: | 314 | that show attributes of the memory: |
308 | </para> | 315 | </para> |
309 | <itemizedlist> | 316 | <itemizedlist> |
310 | <listitem> | 317 | <listitem> |
311 | <para> | 318 | <para> |
319 | <filename>name</filename>: A string identifier for this mapping. This | ||
320 | is optional, the string can be empty. Drivers can set this to make it | ||
321 | easier for userspace to find the correct mapping. | ||
322 | </para> | ||
323 | </listitem> | ||
324 | <listitem> | ||
325 | <para> | ||
312 | <filename>addr</filename>: The address of memory that can be mapped. | 326 | <filename>addr</filename>: The address of memory that can be mapped. |
313 | </para> | 327 | </para> |
314 | </listitem> | 328 | </listitem> |
@@ -366,12 +380,19 @@ offset = N * getpagesize(); | |||
366 | <filename>/sys/class/uio/uioX/portio/</filename>. | 380 | <filename>/sys/class/uio/uioX/portio/</filename>. |
367 | </para> | 381 | </para> |
368 | <para> | 382 | <para> |
369 | Each <filename>portX/</filename> directory contains three read-only | 383 | Each <filename>portX/</filename> directory contains four read-only |
370 | files that show start, size, and type of the port region: | 384 | files that show name, start, size, and type of the port region: |
371 | </para> | 385 | </para> |
372 | <itemizedlist> | 386 | <itemizedlist> |
373 | <listitem> | 387 | <listitem> |
374 | <para> | 388 | <para> |
389 | <filename>name</filename>: A string identifier for this port region. | ||
390 | The string is optional and can be empty. Drivers can set it to make it | ||
391 | easier for userspace to find a certain port region. | ||
392 | </para> | ||
393 | </listitem> | ||
394 | <listitem> | ||
395 | <para> | ||
375 | <filename>start</filename>: The first port of this region. | 396 | <filename>start</filename>: The first port of this region. |
376 | </para> | 397 | </para> |
377 | </listitem> | 398 | </listitem> |
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 87a7c07ab658..46b08fef3744 100644 --- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl | |||
@@ -1,11 +1,11 @@ | |||
1 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | |
3 | <book> | 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> |
4 | <?dbhtml filename="index.html"> | ||
5 | 4 | ||
6 | <!-- ****************************************************** --> | 5 | <!-- ****************************************************** --> |
7 | <!-- Header --> | 6 | <!-- Header --> |
8 | <!-- ****************************************************** --> | 7 | <!-- ****************************************************** --> |
8 | <book id="Writing-an-ALSA-Driver"> | ||
9 | <bookinfo> | 9 | <bookinfo> |
10 | <title>Writing an ALSA Driver</title> | 10 | <title>Writing an ALSA Driver</title> |
11 | <author> | 11 | <author> |
@@ -492,9 +492,9 @@ | |||
492 | } | 492 | } |
493 | 493 | ||
494 | /* (2) */ | 494 | /* (2) */ |
495 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 495 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
496 | if (card == NULL) | 496 | if (err < 0) |
497 | return -ENOMEM; | 497 | return err; |
498 | 498 | ||
499 | /* (3) */ | 499 | /* (3) */ |
500 | err = snd_mychip_create(card, pci, &chip); | 500 | err = snd_mychip_create(card, pci, &chip); |
@@ -590,8 +590,9 @@ | |||
590 | <programlisting> | 590 | <programlisting> |
591 | <![CDATA[ | 591 | <![CDATA[ |
592 | struct snd_card *card; | 592 | struct snd_card *card; |
593 | int err; | ||
593 | .... | 594 | .... |
594 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | 595 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
595 | ]]> | 596 | ]]> |
596 | </programlisting> | 597 | </programlisting> |
597 | </informalexample> | 598 | </informalexample> |
@@ -809,26 +810,28 @@ | |||
809 | 810 | ||
810 | <para> | 811 | <para> |
811 | As mentioned above, to create a card instance, call | 812 | As mentioned above, to create a card instance, call |
812 | <function>snd_card_new()</function>. | 813 | <function>snd_card_create()</function>. |
813 | 814 | ||
814 | <informalexample> | 815 | <informalexample> |
815 | <programlisting> | 816 | <programlisting> |
816 | <![CDATA[ | 817 | <![CDATA[ |
817 | struct snd_card *card; | 818 | struct snd_card *card; |
818 | card = snd_card_new(index, id, module, extra_size); | 819 | int err; |
820 | err = snd_card_create(index, id, module, extra_size, &card); | ||
819 | ]]> | 821 | ]]> |
820 | </programlisting> | 822 | </programlisting> |
821 | </informalexample> | 823 | </informalexample> |
822 | </para> | 824 | </para> |
823 | 825 | ||
824 | <para> | 826 | <para> |
825 | The function takes four arguments, the card-index number, the | 827 | The function takes five arguments, the card-index number, the |
826 | id string, the module pointer (usually | 828 | id string, the module pointer (usually |
827 | <constant>THIS_MODULE</constant>), | 829 | <constant>THIS_MODULE</constant>), |
828 | and the size of extra-data space. The last argument is used to | 830 | the size of extra-data space, and the pointer to return the |
831 | card instance. The extra_size argument is used to | ||
829 | allocate card->private_data for the | 832 | allocate card->private_data for the |
830 | chip-specific data. Note that these data | 833 | chip-specific data. Note that these data |
831 | are allocated by <function>snd_card_new()</function>. | 834 | are allocated by <function>snd_card_create()</function>. |
832 | </para> | 835 | </para> |
833 | </section> | 836 | </section> |
834 | 837 | ||
@@ -915,15 +918,16 @@ | |||
915 | </para> | 918 | </para> |
916 | 919 | ||
917 | <section id="card-management-chip-specific-snd-card-new"> | 920 | <section id="card-management-chip-specific-snd-card-new"> |
918 | <title>1. Allocating via <function>snd_card_new()</function>.</title> | 921 | <title>1. Allocating via <function>snd_card_create()</function>.</title> |
919 | <para> | 922 | <para> |
920 | As mentioned above, you can pass the extra-data-length | 923 | As mentioned above, you can pass the extra-data-length |
921 | to the 4th argument of <function>snd_card_new()</function>, i.e. | 924 | to the 4th argument of <function>snd_card_create()</function>, i.e. |
922 | 925 | ||
923 | <informalexample> | 926 | <informalexample> |
924 | <programlisting> | 927 | <programlisting> |
925 | <![CDATA[ | 928 | <![CDATA[ |
926 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct mychip)); | 929 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, |
930 | sizeof(struct mychip), &card); | ||
927 | ]]> | 931 | ]]> |
928 | </programlisting> | 932 | </programlisting> |
929 | </informalexample> | 933 | </informalexample> |
@@ -952,8 +956,8 @@ | |||
952 | 956 | ||
953 | <para> | 957 | <para> |
954 | After allocating a card instance via | 958 | After allocating a card instance via |
955 | <function>snd_card_new()</function> (with | 959 | <function>snd_card_create()</function> (with |
956 | <constant>NULL</constant> on the 4th arg), call | 960 | <constant>0</constant> on the 4th arg), call |
957 | <function>kzalloc()</function>. | 961 | <function>kzalloc()</function>. |
958 | 962 | ||
959 | <informalexample> | 963 | <informalexample> |
@@ -961,7 +965,7 @@ | |||
961 | <![CDATA[ | 965 | <![CDATA[ |
962 | struct snd_card *card; | 966 | struct snd_card *card; |
963 | struct mychip *chip; | 967 | struct mychip *chip; |
964 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL); | 968 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
965 | ..... | 969 | ..... |
966 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 970 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
967 | ]]> | 971 | ]]> |
@@ -5750,8 +5754,9 @@ struct _snd_pcm_runtime { | |||
5750 | .... | 5754 | .... |
5751 | struct snd_card *card; | 5755 | struct snd_card *card; |
5752 | struct mychip *chip; | 5756 | struct mychip *chip; |
5757 | int err; | ||
5753 | .... | 5758 | .... |
5754 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, NULL); | 5759 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
5755 | .... | 5760 | .... |
5756 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 5761 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
5757 | .... | 5762 | .... |
@@ -5763,7 +5768,7 @@ struct _snd_pcm_runtime { | |||
5763 | </informalexample> | 5768 | </informalexample> |
5764 | 5769 | ||
5765 | When you created the chip data with | 5770 | When you created the chip data with |
5766 | <function>snd_card_new()</function>, it's anyway accessible | 5771 | <function>snd_card_create()</function>, it's anyway accessible |
5767 | via <structfield>private_data</structfield> field. | 5772 | via <structfield>private_data</structfield> field. |
5768 | 5773 | ||
5769 | <informalexample> | 5774 | <informalexample> |
@@ -5775,9 +5780,10 @@ struct _snd_pcm_runtime { | |||
5775 | .... | 5780 | .... |
5776 | struct snd_card *card; | 5781 | struct snd_card *card; |
5777 | struct mychip *chip; | 5782 | struct mychip *chip; |
5783 | int err; | ||
5778 | .... | 5784 | .... |
5779 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, | 5785 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, |
5780 | sizeof(struct mychip)); | 5786 | sizeof(struct mychip), &card); |
5781 | .... | 5787 | .... |
5782 | chip = card->private_data; | 5788 | chip = card->private_data; |
5783 | .... | 5789 | .... |
diff --git a/Documentation/Smack.txt b/Documentation/Smack.txt index 989c2fcd8111..629c92e99783 100644 --- a/Documentation/Smack.txt +++ b/Documentation/Smack.txt | |||
@@ -184,14 +184,16 @@ length. Single character labels using special characters, that being anything | |||
184 | other than a letter or digit, are reserved for use by the Smack development | 184 | other than a letter or digit, are reserved for use by the Smack development |
185 | team. Smack labels are unstructured, case sensitive, and the only operation | 185 | team. Smack labels are unstructured, case sensitive, and the only operation |
186 | ever performed on them is comparison for equality. Smack labels cannot | 186 | ever performed on them is comparison for equality. Smack labels cannot |
187 | contain unprintable characters or the "/" (slash) character. | 187 | contain unprintable characters or the "/" (slash) character. Smack labels |
188 | cannot begin with a '-', which is reserved for special options. | ||
188 | 189 | ||
189 | There are some predefined labels: | 190 | There are some predefined labels: |
190 | 191 | ||
191 | _ Pronounced "floor", a single underscore character. | 192 | _ Pronounced "floor", a single underscore character. |
192 | ^ Pronounced "hat", a single circumflex character. | 193 | ^ Pronounced "hat", a single circumflex character. |
193 | * Pronounced "star", a single asterisk character. | 194 | * Pronounced "star", a single asterisk character. |
194 | ? Pronounced "huh", a single question mark character. | 195 | ? Pronounced "huh", a single question mark character. |
196 | @ Pronounced "Internet", a single at sign character. | ||
195 | 197 | ||
196 | Every task on a Smack system is assigned a label. System tasks, such as | 198 | Every task on a Smack system is assigned a label. System tasks, such as |
197 | init(8) and systems daemons, are run with the floor ("_") label. User tasks | 199 | init(8) and systems daemons, are run with the floor ("_") label. User tasks |
@@ -412,6 +414,36 @@ sockets. | |||
412 | A privileged program may set this to match the label of another | 414 | A privileged program may set this to match the label of another |
413 | task with which it hopes to communicate. | 415 | task with which it hopes to communicate. |
414 | 416 | ||
417 | Smack Netlabel Exceptions | ||
418 | |||
419 | You will often find that your labeled application has to talk to the outside, | ||
420 | unlabeled world. To do this there's a special file /smack/netlabel where you can | ||
421 | add some exceptions in the form of : | ||
422 | @IP1 LABEL1 or | ||
423 | @IP2/MASK LABEL2 | ||
424 | |||
425 | It means that your application will have unlabeled access to @IP1 if it has | ||
426 | write access on LABEL1, and access to the subnet @IP2/MASK if it has write | ||
427 | access on LABEL2. | ||
428 | |||
429 | Entries in the /smack/netlabel file are matched by longest mask first, like in | ||
430 | classless IPv4 routing. | ||
431 | |||
432 | A special label '@' and an option '-CIPSO' can be used there : | ||
433 | @ means Internet, any application with any label has access to it | ||
434 | -CIPSO means standard CIPSO networking | ||
435 | |||
436 | If you don't know what CIPSO is and don't plan to use it, you can just do : | ||
437 | echo 127.0.0.1 -CIPSO > /smack/netlabel | ||
438 | echo 0.0.0.0/0 @ > /smack/netlabel | ||
439 | |||
440 | If you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled | ||
441 | Internet access, you can have : | ||
442 | echo 127.0.0.1 -CIPSO > /smack/netlabel | ||
443 | echo 192.168.0.0/16 -CIPSO > /smack/netlabel | ||
444 | echo 0.0.0.0/0 @ > /smack/netlabel | ||
445 | |||
446 | |||
415 | Writing Applications for Smack | 447 | Writing Applications for Smack |
416 | 448 | ||
417 | There are three sorts of applications that will run on a Smack system. How an | 449 | There are three sorts of applications that will run on a Smack system. How an |
diff --git a/Documentation/arm/Samsung-S3C24XX/Suspend.txt b/Documentation/arm/Samsung-S3C24XX/Suspend.txt index 0dab6e32c130..a30fe510572b 100644 --- a/Documentation/arm/Samsung-S3C24XX/Suspend.txt +++ b/Documentation/arm/Samsung-S3C24XX/Suspend.txt | |||
@@ -40,13 +40,13 @@ Resuming | |||
40 | Machine Support | 40 | Machine Support |
41 | --------------- | 41 | --------------- |
42 | 42 | ||
43 | The machine specific functions must call the s3c2410_pm_init() function | 43 | The machine specific functions must call the s3c_pm_init() function |
44 | to say that its bootloader is capable of resuming. This can be as | 44 | to say that its bootloader is capable of resuming. This can be as |
45 | simple as adding the following to the machine's definition: | 45 | simple as adding the following to the machine's definition: |
46 | 46 | ||
47 | INITMACHINE(s3c2410_pm_init) | 47 | INITMACHINE(s3c_pm_init) |
48 | 48 | ||
49 | A board can do its own setup before calling s3c2410_pm_init, if it | 49 | A board can do its own setup before calling s3c_pm_init, if it |
50 | needs to setup anything else for power management support. | 50 | needs to setup anything else for power management support. |
51 | 51 | ||
52 | There is currently no support for over-riding the default method of | 52 | There is currently no support for over-riding the default method of |
@@ -74,7 +74,7 @@ statuc void __init machine_init(void) | |||
74 | 74 | ||
75 | enable_irq_wake(IRQ_EINT0); | 75 | enable_irq_wake(IRQ_EINT0); |
76 | 76 | ||
77 | s3c2410_pm_init(); | 77 | s3c_pm_init(); |
78 | } | 78 | } |
79 | 79 | ||
80 | 80 | ||
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index dc6045577a8b..43cb1004d35f 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
@@ -29,7 +29,14 @@ ffff0000 ffff0fff CPU vector page. | |||
29 | CPU supports vector relocation (control | 29 | CPU supports vector relocation (control |
30 | register V bit.) | 30 | register V bit.) |
31 | 31 | ||
32 | ffc00000 fffeffff DMA memory mapping region. Memory returned | 32 | fffe0000 fffeffff XScale cache flush area. This is used |
33 | in proc-xscale.S to flush the whole data | ||
34 | cache. Free for other usage on non-XScale. | ||
35 | |||
36 | fff00000 fffdffff Fixmap mapping region. Addresses provided | ||
37 | by fix_to_virt() will be located here. | ||
38 | |||
39 | ffc00000 ffefffff DMA memory mapping region. Memory returned | ||
33 | by the dma_alloc_xxx functions will be | 40 | by the dma_alloc_xxx functions will be |
34 | dynamically mapped here. | 41 | dynamically mapped here. |
35 | 42 | ||
diff --git a/Documentation/block/switching-sched.txt b/Documentation/block/switching-sched.txt index 634c952e1964..d5af3f630814 100644 --- a/Documentation/block/switching-sched.txt +++ b/Documentation/block/switching-sched.txt | |||
@@ -35,9 +35,3 @@ noop anticipatory deadline [cfq] | |||
35 | # echo anticipatory > /sys/block/hda/queue/scheduler | 35 | # echo anticipatory > /sys/block/hda/queue/scheduler |
36 | # cat /sys/block/hda/queue/scheduler | 36 | # cat /sys/block/hda/queue/scheduler |
37 | noop [anticipatory] deadline cfq | 37 | noop [anticipatory] deadline cfq |
38 | |||
39 | Each io queue has a set of io scheduler tunables associated with it. These | ||
40 | tunables control how the io scheduler works. You can find these entries | ||
41 | in: | ||
42 | |||
43 | /sys/block/<device>/queue/iosched | ||
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt index 5b0cfa67aff9..ce73f3eb5ddb 100644 --- a/Documentation/cpu-freq/governors.txt +++ b/Documentation/cpu-freq/governors.txt | |||
@@ -117,10 +117,28 @@ accessible parameters: | |||
117 | sampling_rate: measured in uS (10^-6 seconds), this is how often you | 117 | sampling_rate: measured in uS (10^-6 seconds), this is how often you |
118 | want the kernel to look at the CPU usage and to make decisions on | 118 | want the kernel to look at the CPU usage and to make decisions on |
119 | what to do about the frequency. Typically this is set to values of | 119 | what to do about the frequency. Typically this is set to values of |
120 | around '10000' or more. | 120 | around '10000' or more. It's default value is (cmp. with users-guide.txt): |
121 | 121 | transition_latency * 1000 | |
122 | show_sampling_rate_(min|max): the minimum and maximum sampling rates | 122 | The lowest value you can set is: |
123 | available that you may set 'sampling_rate' to. | 123 | transition_latency * 100 or it may get restricted to a value where it |
124 | makes not sense for the kernel anymore to poll that often which depends | ||
125 | on your HZ config variable (HZ=1000: max=20000us, HZ=250: max=5000). | ||
126 | Be aware that transition latency is in ns and sampling_rate is in us, so you | ||
127 | get the same sysfs value by default. | ||
128 | Sampling rate should always get adjusted considering the transition latency | ||
129 | To set the sampling rate 750 times as high as the transition latency | ||
130 | in the bash (as said, 1000 is default), do: | ||
131 | echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \ | ||
132 | >ondemand/sampling_rate | ||
133 | |||
134 | show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT. | ||
135 | You can use wider ranges now and the general | ||
136 | cpuinfo_transition_latency variable (cmp. with user-guide.txt) can be | ||
137 | used to obtain exactly the same info: | ||
138 | show_sampling_rate_min = transtition_latency * 500 / 1000 | ||
139 | show_sampling_rate_max = transtition_latency * 500000 / 1000 | ||
140 | (divided by 1000 is to illustrate that sampling rate is in us and | ||
141 | transition latency is exported ns). | ||
124 | 142 | ||
125 | up_threshold: defines what the average CPU usage between the samplings | 143 | up_threshold: defines what the average CPU usage between the samplings |
126 | of 'sampling_rate' needs to be for the kernel to make a decision on | 144 | of 'sampling_rate' needs to be for the kernel to make a decision on |
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt index 917918f84fc7..75f41193f3e1 100644 --- a/Documentation/cpu-freq/user-guide.txt +++ b/Documentation/cpu-freq/user-guide.txt | |||
@@ -152,6 +152,18 @@ cpuinfo_min_freq : this file shows the minimum operating | |||
152 | frequency the processor can run at(in kHz) | 152 | frequency the processor can run at(in kHz) |
153 | cpuinfo_max_freq : this file shows the maximum operating | 153 | cpuinfo_max_freq : this file shows the maximum operating |
154 | frequency the processor can run at(in kHz) | 154 | frequency the processor can run at(in kHz) |
155 | cpuinfo_transition_latency The time it takes on this CPU to | ||
156 | switch between two frequencies in nano | ||
157 | seconds. If unknown or known to be | ||
158 | that high that the driver does not | ||
159 | work with the ondemand governor, -1 | ||
160 | (CPUFREQ_ETERNAL) will be returned. | ||
161 | Using this information can be useful | ||
162 | to choose an appropriate polling | ||
163 | frequency for a kernel governor or | ||
164 | userspace daemon. Make sure to not | ||
165 | switch the frequency too often | ||
166 | resulting in performance loss. | ||
155 | scaling_driver : this file shows what cpufreq driver is | 167 | scaling_driver : this file shows what cpufreq driver is |
156 | used to set the frequency on this CPU | 168 | used to set the frequency on this CPU |
157 | 169 | ||
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt index 45932ec21cee..b41f3e58aefa 100644 --- a/Documentation/cputopology.txt +++ b/Documentation/cputopology.txt | |||
@@ -18,11 +18,11 @@ For an architecture to support this feature, it must define some of | |||
18 | these macros in include/asm-XXX/topology.h: | 18 | these macros in include/asm-XXX/topology.h: |
19 | #define topology_physical_package_id(cpu) | 19 | #define topology_physical_package_id(cpu) |
20 | #define topology_core_id(cpu) | 20 | #define topology_core_id(cpu) |
21 | #define topology_thread_siblings(cpu) | 21 | #define topology_thread_cpumask(cpu) |
22 | #define topology_core_siblings(cpu) | 22 | #define topology_core_cpumask(cpu) |
23 | 23 | ||
24 | The type of **_id is int. | 24 | The type of **_id is int. |
25 | The type of siblings is cpumask_t. | 25 | The type of siblings is (const) struct cpumask *. |
26 | 26 | ||
27 | To be consistent on all architectures, include/linux/topology.h | 27 | To be consistent on all architectures, include/linux/topology.h |
28 | provides default definitions for any of the above macros that are | 28 | provides default definitions for any of the above macros that are |
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 2be08240ee80..62254d4510c6 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -3145,6 +3145,12 @@ Your cooperation is appreciated. | |||
3145 | 1 = /dev/blockrom1 Second ROM card's translation layer interface | 3145 | 1 = /dev/blockrom1 Second ROM card's translation layer interface |
3146 | ... | 3146 | ... |
3147 | 3147 | ||
3148 | 260 char OSD (Object-based-device) SCSI Device | ||
3149 | 0 = /dev/osd0 First OSD Device | ||
3150 | 1 = /dev/osd1 Second OSD Device | ||
3151 | ... | ||
3152 | 255 = /dev/osd255 256th OSD Device | ||
3153 | |||
3148 | **** ADDITIONAL /dev DIRECTORY ENTRIES | 3154 | **** ADDITIONAL /dev DIRECTORY ENTRIES |
3149 | 3155 | ||
3150 | This section details additional entries that should or may exist in | 3156 | This section details additional entries that should or may exist in |
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index 1e89a51ea49b..88519daab6e9 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -62,7 +62,6 @@ aic7*reg_print.c* | |||
62 | aic7*seq.h* | 62 | aic7*seq.h* |
63 | aicasm | 63 | aicasm |
64 | aicdb.h* | 64 | aicdb.h* |
65 | asm | ||
66 | asm-offsets.h | 65 | asm-offsets.h |
67 | asm_offsets.h | 66 | asm_offsets.h |
68 | autoconf.h* | 67 | autoconf.h* |
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware index f2e908d7f90d..2f21ecd4c205 100644 --- a/Documentation/dvb/get_dvb_firmware +++ b/Documentation/dvb/get_dvb_firmware | |||
@@ -25,7 +25,7 @@ use IO::Handle; | |||
25 | "tda10046lifeview", "av7110", "dec2000t", "dec2540t", | 25 | "tda10046lifeview", "av7110", "dec2000t", "dec2540t", |
26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", | 26 | "dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004", |
27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", | 27 | "or51211", "or51132_qam", "or51132_vsb", "bluebird", |
28 | "opera1"); | 28 | "opera1", "cx231xx", "cx18", "cx23885", "pvrusb2" ); |
29 | 29 | ||
30 | # Check args | 30 | # Check args |
31 | syntax() if (scalar(@ARGV) != 1); | 31 | syntax() if (scalar(@ARGV) != 1); |
@@ -37,8 +37,8 @@ for ($i=0; $i < scalar(@components); $i++) { | |||
37 | $outfile = eval($cid); | 37 | $outfile = eval($cid); |
38 | die $@ if $@; | 38 | die $@ if $@; |
39 | print STDERR <<EOF; | 39 | print STDERR <<EOF; |
40 | Firmware $outfile extracted successfully. | 40 | Firmware(s) $outfile extracted successfully. |
41 | Now copy it to either /usr/lib/hotplug/firmware or /lib/firmware | 41 | Now copy it(they) to either /usr/lib/hotplug/firmware or /lib/firmware |
42 | (depending on configuration of firmware hotplug). | 42 | (depending on configuration of firmware hotplug). |
43 | EOF | 43 | EOF |
44 | exit(0); | 44 | exit(0); |
@@ -345,6 +345,85 @@ sub or51211 { | |||
345 | $fwfile; | 345 | $fwfile; |
346 | } | 346 | } |
347 | 347 | ||
348 | sub cx231xx { | ||
349 | my $fwfile = "v4l-cx231xx-avcore-01.fw"; | ||
350 | my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; | ||
351 | my $hash = "7d3bb956dc9df0eafded2b56ba57cc42"; | ||
352 | |||
353 | checkstandard(); | ||
354 | |||
355 | wgetfile($fwfile, $url); | ||
356 | verify($fwfile, $hash); | ||
357 | |||
358 | $fwfile; | ||
359 | } | ||
360 | |||
361 | sub cx18 { | ||
362 | my $url = "http://linuxtv.org/downloads/firmware/"; | ||
363 | |||
364 | my %files = ( | ||
365 | 'v4l-cx23418-apu.fw' => '588f081b562f5c653a3db1ad8f65939a', | ||
366 | 'v4l-cx23418-cpu.fw' => 'b6c7ed64bc44b1a6e0840adaeac39d79', | ||
367 | 'v4l-cx23418-dig.fw' => '95bc688d3e7599fd5800161e9971cc55', | ||
368 | ); | ||
369 | |||
370 | checkstandard(); | ||
371 | |||
372 | my $allfiles; | ||
373 | foreach my $fwfile (keys %files) { | ||
374 | wgetfile($fwfile, "$url/$fwfile"); | ||
375 | verify($fwfile, $files{$fwfile}); | ||
376 | $allfiles .= " $fwfile"; | ||
377 | } | ||
378 | |||
379 | $allfiles =~ s/^\s//; | ||
380 | |||
381 | $allfiles; | ||
382 | } | ||
383 | |||
384 | sub cx23885 { | ||
385 | my $url = "http://linuxtv.org/downloads/firmware/"; | ||
386 | |||
387 | my %files = ( | ||
388 | 'v4l-cx23885-avcore-01.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb', | ||
389 | 'v4l-cx23885-enc.fw' => 'a9f8f5d901a7fb42f552e1ee6384f3bb', | ||
390 | ); | ||
391 | |||
392 | checkstandard(); | ||
393 | |||
394 | my $allfiles; | ||
395 | foreach my $fwfile (keys %files) { | ||
396 | wgetfile($fwfile, "$url/$fwfile"); | ||
397 | verify($fwfile, $files{$fwfile}); | ||
398 | $allfiles .= " $fwfile"; | ||
399 | } | ||
400 | |||
401 | $allfiles =~ s/^\s//; | ||
402 | |||
403 | $allfiles; | ||
404 | } | ||
405 | |||
406 | sub pvrusb2 { | ||
407 | my $url = "http://linuxtv.org/downloads/firmware/"; | ||
408 | |||
409 | my %files = ( | ||
410 | 'v4l-cx25840.fw' => 'dadb79e9904fc8af96e8111d9cb59320', | ||
411 | ); | ||
412 | |||
413 | checkstandard(); | ||
414 | |||
415 | my $allfiles; | ||
416 | foreach my $fwfile (keys %files) { | ||
417 | wgetfile($fwfile, "$url/$fwfile"); | ||
418 | verify($fwfile, $files{$fwfile}); | ||
419 | $allfiles .= " $fwfile"; | ||
420 | } | ||
421 | |||
422 | $allfiles =~ s/^\s//; | ||
423 | |||
424 | $allfiles; | ||
425 | } | ||
426 | |||
348 | sub or51132_qam { | 427 | sub or51132_qam { |
349 | my $fwfile = "dvb-fe-or51132-qam.fw"; | 428 | my $fwfile = "dvb-fe-or51132-qam.fw"; |
350 | my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; | 429 | my $url = "http://linuxtv.org/downloads/firmware/$fwfile"; |
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt new file mode 100644 index 000000000000..674c5663d346 --- /dev/null +++ b/Documentation/dynamic-debug-howto.txt | |||
@@ -0,0 +1,240 @@ | |||
1 | |||
2 | Introduction | ||
3 | ============ | ||
4 | |||
5 | This document describes how to use the dynamic debug (ddebug) feature. | ||
6 | |||
7 | Dynamic debug is designed to allow you to dynamically enable/disable kernel | ||
8 | code to obtain additional kernel information. Currently, if | ||
9 | CONFIG_DYNAMIC_DEBUG is set, then all pr_debug()/dev_debug() calls can be | ||
10 | dynamically enabled per-callsite. | ||
11 | |||
12 | Dynamic debug has even more useful features: | ||
13 | |||
14 | * Simple query language allows turning on and off debugging statements by | ||
15 | matching any combination of: | ||
16 | |||
17 | - source filename | ||
18 | - function name | ||
19 | - line number (including ranges of line numbers) | ||
20 | - module name | ||
21 | - format string | ||
22 | |||
23 | * Provides a debugfs control file: <debugfs>/dynamic_debug/control which can be | ||
24 | read to display the complete list of known debug statements, to help guide you | ||
25 | |||
26 | Controlling dynamic debug Behaviour | ||
27 | =============================== | ||
28 | |||
29 | The behaviour of pr_debug()/dev_debug()s are controlled via writing to a | ||
30 | control file in the 'debugfs' filesystem. Thus, you must first mount the debugfs | ||
31 | filesystem, in order to make use of this feature. Subsequently, we refer to the | ||
32 | control file as: <debugfs>/dynamic_debug/control. For example, if you want to | ||
33 | enable printing from source file 'svcsock.c', line 1603 you simply do: | ||
34 | |||
35 | nullarbor:~ # echo 'file svcsock.c line 1603 +p' > | ||
36 | <debugfs>/dynamic_debug/control | ||
37 | |||
38 | If you make a mistake with the syntax, the write will fail thus: | ||
39 | |||
40 | nullarbor:~ # echo 'file svcsock.c wtf 1 +p' > | ||
41 | <debugfs>/dynamic_debug/control | ||
42 | -bash: echo: write error: Invalid argument | ||
43 | |||
44 | Viewing Dynamic Debug Behaviour | ||
45 | =========================== | ||
46 | |||
47 | You can view the currently configured behaviour of all the debug statements | ||
48 | via: | ||
49 | |||
50 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | ||
51 | # filename:lineno [module]function flags format | ||
52 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:323 [svcxprt_rdma]svc_rdma_cleanup - "SVCRDMA Module Removed, deregister RPC RDMA transport\012" | ||
53 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:341 [svcxprt_rdma]svc_rdma_init - "\011max_inline : %d\012" | ||
54 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:340 [svcxprt_rdma]svc_rdma_init - "\011sq_depth : %d\012" | ||
55 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svc_rdma.c:338 [svcxprt_rdma]svc_rdma_init - "\011max_requests : %d\012" | ||
56 | ... | ||
57 | |||
58 | |||
59 | You can also apply standard Unix text manipulation filters to this | ||
60 | data, e.g. | ||
61 | |||
62 | nullarbor:~ # grep -i rdma <debugfs>/dynamic_debug/control | wc -l | ||
63 | 62 | ||
64 | |||
65 | nullarbor:~ # grep -i tcp <debugfs>/dynamic_debug/control | wc -l | ||
66 | 42 | ||
67 | |||
68 | Note in particular that the third column shows the enabled behaviour | ||
69 | flags for each debug statement callsite (see below for definitions of the | ||
70 | flags). The default value, no extra behaviour enabled, is "-". So | ||
71 | you can view all the debug statement callsites with any non-default flags: | ||
72 | |||
73 | nullarbor:~ # awk '$3 != "-"' <debugfs>/dynamic_debug/control | ||
74 | # filename:lineno [module]function flags format | ||
75 | /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c:1603 [sunrpc]svc_send p "svc_process: st_sendto returned %d\012" | ||
76 | |||
77 | |||
78 | Command Language Reference | ||
79 | ========================== | ||
80 | |||
81 | At the lexical level, a command comprises a sequence of words separated | ||
82 | by whitespace characters. Note that newlines are treated as word | ||
83 | separators and do *not* end a command or allow multiple commands to | ||
84 | be done together. So these are all equivalent: | ||
85 | |||
86 | nullarbor:~ # echo -c 'file svcsock.c line 1603 +p' > | ||
87 | <debugfs>/dynamic_debug/control | ||
88 | nullarbor:~ # echo -c ' file svcsock.c line 1603 +p ' > | ||
89 | <debugfs>/dynamic_debug/control | ||
90 | nullarbor:~ # echo -c 'file svcsock.c\nline 1603 +p' > | ||
91 | <debugfs>/dynamic_debug/control | ||
92 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
93 | <debugfs>/dynamic_debug/control | ||
94 | |||
95 | Commands are bounded by a write() system call. If you want to do | ||
96 | multiple commands you need to do a separate "echo" for each, like: | ||
97 | |||
98 | nullarbor:~ # echo 'file svcsock.c line 1603 +p' > /proc/dprintk ;\ | ||
99 | > echo 'file svcsock.c line 1563 +p' > /proc/dprintk | ||
100 | |||
101 | or even like: | ||
102 | |||
103 | nullarbor:~ # ( | ||
104 | > echo 'file svcsock.c line 1603 +p' ;\ | ||
105 | > echo 'file svcsock.c line 1563 +p' ;\ | ||
106 | > ) > /proc/dprintk | ||
107 | |||
108 | At the syntactical level, a command comprises a sequence of match | ||
109 | specifications, followed by a flags change specification. | ||
110 | |||
111 | command ::= match-spec* flags-spec | ||
112 | |||
113 | The match-spec's are used to choose a subset of the known dprintk() | ||
114 | callsites to which to apply the flags-spec. Think of them as a query | ||
115 | with implicit ANDs between each pair. Note that an empty list of | ||
116 | match-specs is possible, but is not very useful because it will not | ||
117 | match any debug statement callsites. | ||
118 | |||
119 | A match specification comprises a keyword, which controls the attribute | ||
120 | of the callsite to be compared, and a value to compare against. Possible | ||
121 | keywords are: | ||
122 | |||
123 | match-spec ::= 'func' string | | ||
124 | 'file' string | | ||
125 | 'module' string | | ||
126 | 'format' string | | ||
127 | 'line' line-range | ||
128 | |||
129 | line-range ::= lineno | | ||
130 | '-'lineno | | ||
131 | lineno'-' | | ||
132 | lineno'-'lineno | ||
133 | // Note: line-range cannot contain space, e.g. | ||
134 | // "1-30" is valid range but "1 - 30" is not. | ||
135 | |||
136 | lineno ::= unsigned-int | ||
137 | |||
138 | The meanings of each keyword are: | ||
139 | |||
140 | func | ||
141 | The given string is compared against the function name | ||
142 | of each callsite. Example: | ||
143 | |||
144 | func svc_tcp_accept | ||
145 | |||
146 | file | ||
147 | The given string is compared against either the full | ||
148 | pathname or the basename of the source file of each | ||
149 | callsite. Examples: | ||
150 | |||
151 | file svcsock.c | ||
152 | file /usr/src/packages/BUILD/sgi-enhancednfs-1.4/default/net/sunrpc/svcsock.c | ||
153 | |||
154 | module | ||
155 | The given string is compared against the module name | ||
156 | of each callsite. The module name is the string as | ||
157 | seen in "lsmod", i.e. without the directory or the .ko | ||
158 | suffix and with '-' changed to '_'. Examples: | ||
159 | |||
160 | module sunrpc | ||
161 | module nfsd | ||
162 | |||
163 | format | ||
164 | The given string is searched for in the dynamic debug format | ||
165 | string. Note that the string does not need to match the | ||
166 | entire format, only some part. Whitespace and other | ||
167 | special characters can be escaped using C octal character | ||
168 | escape \ooo notation, e.g. the space character is \040. | ||
169 | Alternatively, the string can be enclosed in double quote | ||
170 | characters (") or single quote characters ('). | ||
171 | Examples: | ||
172 | |||
173 | format svcrdma: // many of the NFS/RDMA server dprintks | ||
174 | format readahead // some dprintks in the readahead cache | ||
175 | format nfsd:\040SETATTR // one way to match a format with whitespace | ||
176 | format "nfsd: SETATTR" // a neater way to match a format with whitespace | ||
177 | format 'nfsd: SETATTR' // yet another way to match a format with whitespace | ||
178 | |||
179 | line | ||
180 | The given line number or range of line numbers is compared | ||
181 | against the line number of each dprintk() callsite. A single | ||
182 | line number matches the callsite line number exactly. A | ||
183 | range of line numbers matches any callsite between the first | ||
184 | and last line number inclusive. An empty first number means | ||
185 | the first line in the file, an empty line number means the | ||
186 | last number in the file. Examples: | ||
187 | |||
188 | line 1603 // exactly line 1603 | ||
189 | line 1600-1605 // the six lines from line 1600 to line 1605 | ||
190 | line -1605 // the 1605 lines from line 1 to line 1605 | ||
191 | line 1600- // all lines from line 1600 to the end of the file | ||
192 | |||
193 | The flags specification comprises a change operation followed | ||
194 | by one or more flag characters. The change operation is one | ||
195 | of the characters: | ||
196 | |||
197 | - | ||
198 | remove the given flags | ||
199 | |||
200 | + | ||
201 | add the given flags | ||
202 | |||
203 | = | ||
204 | set the flags to the given flags | ||
205 | |||
206 | The flags are: | ||
207 | |||
208 | p | ||
209 | Causes a printk() message to be emitted to dmesg | ||
210 | |||
211 | Note the regexp ^[-+=][scp]+$ matches a flags specification. | ||
212 | Note also that there is no convenient syntax to remove all | ||
213 | the flags at once, you need to use "-psc". | ||
214 | |||
215 | Examples | ||
216 | ======== | ||
217 | |||
218 | // enable the message at line 1603 of file svcsock.c | ||
219 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
220 | <debugfs>/dynamic_debug/control | ||
221 | |||
222 | // enable all the messages in file svcsock.c | ||
223 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
224 | <debugfs>/dynamic_debug/control | ||
225 | |||
226 | // enable all the messages in the NFS server module | ||
227 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
228 | <debugfs>/dynamic_debug/control | ||
229 | |||
230 | // enable all 12 messages in the function svc_process() | ||
231 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
232 | <debugfs>/dynamic_debug/control | ||
233 | |||
234 | // disable all 12 messages in the function svc_process() | ||
235 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
236 | <debugfs>/dynamic_debug/control | ||
237 | |||
238 | // enable messages for NFS calls READ, READLINK, READDIR and READDIR+. | ||
239 | nullarbor:~ # echo -n 'format "nfsd: READ" +p' > | ||
240 | <debugfs>/dynamic_debug/control | ||
diff --git a/Documentation/fb/00-INDEX b/Documentation/fb/00-INDEX index caabbd395e61..a618fd99c9f0 100644 --- a/Documentation/fb/00-INDEX +++ b/Documentation/fb/00-INDEX | |||
@@ -11,8 +11,6 @@ aty128fb.txt | |||
11 | - info on the ATI Rage128 frame buffer driver. | 11 | - info on the ATI Rage128 frame buffer driver. |
12 | cirrusfb.txt | 12 | cirrusfb.txt |
13 | - info on the driver for Cirrus Logic chipsets. | 13 | - info on the driver for Cirrus Logic chipsets. |
14 | cyblafb/ | ||
15 | - directory with documentation files related to the cyblafb driver. | ||
16 | deferred_io.txt | 14 | deferred_io.txt |
17 | - an introduction to deferred IO. | 15 | - an introduction to deferred IO. |
18 | fbcon.txt | 16 | fbcon.txt |
diff --git a/Documentation/fb/cyblafb/bugs b/Documentation/fb/cyblafb/bugs deleted file mode 100644 index 9443a6d72cdd..000000000000 --- a/Documentation/fb/cyblafb/bugs +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | Bugs | ||
2 | ==== | ||
3 | |||
4 | I currently don't know of any bug. Please do send reports to: | ||
5 | - linux-fbdev-devel@lists.sourceforge.net | ||
6 | - Knut_Petersen@t-online.de. | ||
7 | |||
8 | |||
9 | Untested features | ||
10 | ================= | ||
11 | |||
12 | All LCD stuff is untested. If it worked in tridentfb, it should work in | ||
13 | cyblafb. Please test and report the results to Knut_Petersen@t-online.de. | ||
diff --git a/Documentation/fb/cyblafb/credits b/Documentation/fb/cyblafb/credits deleted file mode 100644 index 0eb3b443dc2b..000000000000 --- a/Documentation/fb/cyblafb/credits +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | Thanks to | ||
2 | ========= | ||
3 | * Alan Hourihane, for writing the X trident driver | ||
4 | * Jani Monoses, for writing the tridentfb driver | ||
5 | * Antonino A. Daplas, for review of the first published | ||
6 | version of cyblafb and some code | ||
7 | * Jochen Hein, for testing and a helpfull bug report | ||
diff --git a/Documentation/fb/cyblafb/documentation b/Documentation/fb/cyblafb/documentation deleted file mode 100644 index bb1aac048425..000000000000 --- a/Documentation/fb/cyblafb/documentation +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Available Documentation | ||
2 | ======================= | ||
3 | |||
4 | Apollo PLE 133 Chipset VT8601A North Bridge Datasheet, Rev. 1.82, October 22, | ||
5 | 2001, available from VIA: | ||
6 | |||
7 | http://www.viavpsd.com/product/6/15/DS8601A182.pdf | ||
8 | |||
9 | The datasheet is incomplete, some registers that need to be programmed are not | ||
10 | explained at all and important bits are listed as "reserved". But you really | ||
11 | need the datasheet to understand the code. "p. xxx" comments refer to page | ||
12 | numbers of this document. | ||
13 | |||
14 | XFree/XOrg drivers are available and of good quality, looking at the code | ||
15 | there is a good idea if the datasheet does not provide enough information | ||
16 | or if the datasheet seems to be wrong. | ||
17 | |||
diff --git a/Documentation/fb/cyblafb/fb.modes b/Documentation/fb/cyblafb/fb.modes deleted file mode 100644 index fe0e5223ba86..000000000000 --- a/Documentation/fb/cyblafb/fb.modes +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | # | ||
2 | # Sample fb.modes file | ||
3 | # | ||
4 | # Provides an incomplete list of working modes for | ||
5 | # the cyberblade/i1 graphics core. | ||
6 | # | ||
7 | # The value 4294967256 is used instead of -40. Of course, -40 is not | ||
8 | # a really reasonable value, but chip design does not always follow | ||
9 | # logic. Believe me, it's ok, and it's the way the BIOS does it. | ||
10 | # | ||
11 | # fbset requires 4294967256 in fb.modes and -40 as an argument to | ||
12 | # the -t parameter. That's also not too reasonable, and it might change | ||
13 | # in the future or might even be differt for your current version. | ||
14 | # | ||
15 | |||
16 | mode "640x480-50" | ||
17 | geometry 640 480 2048 4096 8 | ||
18 | timings 47619 4294967256 24 17 0 216 3 | ||
19 | endmode | ||
20 | |||
21 | mode "640x480-60" | ||
22 | geometry 640 480 2048 4096 8 | ||
23 | timings 39682 4294967256 24 17 0 216 3 | ||
24 | endmode | ||
25 | |||
26 | mode "640x480-70" | ||
27 | geometry 640 480 2048 4096 8 | ||
28 | timings 34013 4294967256 24 17 0 216 3 | ||
29 | endmode | ||
30 | |||
31 | mode "640x480-72" | ||
32 | geometry 640 480 2048 4096 8 | ||
33 | timings 33068 4294967256 24 17 0 216 3 | ||
34 | endmode | ||
35 | |||
36 | mode "640x480-75" | ||
37 | geometry 640 480 2048 4096 8 | ||
38 | timings 31746 4294967256 24 17 0 216 3 | ||
39 | endmode | ||
40 | |||
41 | mode "640x480-80" | ||
42 | geometry 640 480 2048 4096 8 | ||
43 | timings 29761 4294967256 24 17 0 216 3 | ||
44 | endmode | ||
45 | |||
46 | mode "640x480-85" | ||
47 | geometry 640 480 2048 4096 8 | ||
48 | timings 28011 4294967256 24 17 0 216 3 | ||
49 | endmode | ||
50 | |||
51 | mode "800x600-50" | ||
52 | geometry 800 600 2048 4096 8 | ||
53 | timings 30303 96 24 14 0 136 11 | ||
54 | endmode | ||
55 | |||
56 | mode "800x600-60" | ||
57 | geometry 800 600 2048 4096 8 | ||
58 | timings 25252 96 24 14 0 136 11 | ||
59 | endmode | ||
60 | |||
61 | mode "800x600-70" | ||
62 | geometry 800 600 2048 4096 8 | ||
63 | timings 21645 96 24 14 0 136 11 | ||
64 | endmode | ||
65 | |||
66 | mode "800x600-72" | ||
67 | geometry 800 600 2048 4096 8 | ||
68 | timings 21043 96 24 14 0 136 11 | ||
69 | endmode | ||
70 | |||
71 | mode "800x600-75" | ||
72 | geometry 800 600 2048 4096 8 | ||
73 | timings 20202 96 24 14 0 136 11 | ||
74 | endmode | ||
75 | |||
76 | mode "800x600-80" | ||
77 | geometry 800 600 2048 4096 8 | ||
78 | timings 18939 96 24 14 0 136 11 | ||
79 | endmode | ||
80 | |||
81 | mode "800x600-85" | ||
82 | geometry 800 600 2048 4096 8 | ||
83 | timings 17825 96 24 14 0 136 11 | ||
84 | endmode | ||
85 | |||
86 | mode "1024x768-50" | ||
87 | geometry 1024 768 2048 4096 8 | ||
88 | timings 19054 144 24 29 0 120 3 | ||
89 | endmode | ||
90 | |||
91 | mode "1024x768-60" | ||
92 | geometry 1024 768 2048 4096 8 | ||
93 | timings 15880 144 24 29 0 120 3 | ||
94 | endmode | ||
95 | |||
96 | mode "1024x768-70" | ||
97 | geometry 1024 768 2048 4096 8 | ||
98 | timings 13610 144 24 29 0 120 3 | ||
99 | endmode | ||
100 | |||
101 | mode "1024x768-72" | ||
102 | geometry 1024 768 2048 4096 8 | ||
103 | timings 13232 144 24 29 0 120 3 | ||
104 | endmode | ||
105 | |||
106 | mode "1024x768-75" | ||
107 | geometry 1024 768 2048 4096 8 | ||
108 | timings 12703 144 24 29 0 120 3 | ||
109 | endmode | ||
110 | |||
111 | mode "1024x768-80" | ||
112 | geometry 1024 768 2048 4096 8 | ||
113 | timings 11910 144 24 29 0 120 3 | ||
114 | endmode | ||
115 | |||
116 | mode "1024x768-85" | ||
117 | geometry 1024 768 2048 4096 8 | ||
118 | timings 11209 144 24 29 0 120 3 | ||
119 | endmode | ||
120 | |||
121 | mode "1280x1024-50" | ||
122 | geometry 1280 1024 2048 4096 8 | ||
123 | timings 11114 232 16 39 0 160 3 | ||
124 | endmode | ||
125 | |||
126 | mode "1280x1024-60" | ||
127 | geometry 1280 1024 2048 4096 8 | ||
128 | timings 9262 232 16 39 0 160 3 | ||
129 | endmode | ||
130 | |||
131 | mode "1280x1024-70" | ||
132 | geometry 1280 1024 2048 4096 8 | ||
133 | timings 7939 232 16 39 0 160 3 | ||
134 | endmode | ||
135 | |||
136 | mode "1280x1024-72" | ||
137 | geometry 1280 1024 2048 4096 8 | ||
138 | timings 7719 232 16 39 0 160 3 | ||
139 | endmode | ||
140 | |||
141 | mode "1280x1024-75" | ||
142 | geometry 1280 1024 2048 4096 8 | ||
143 | timings 7410 232 16 39 0 160 3 | ||
144 | endmode | ||
145 | |||
146 | mode "1280x1024-80" | ||
147 | geometry 1280 1024 2048 4096 8 | ||
148 | timings 6946 232 16 39 0 160 3 | ||
149 | endmode | ||
150 | |||
151 | mode "1280x1024-85" | ||
152 | geometry 1280 1024 2048 4096 8 | ||
153 | timings 6538 232 16 39 0 160 3 | ||
154 | endmode | ||
diff --git a/Documentation/fb/cyblafb/performance b/Documentation/fb/cyblafb/performance deleted file mode 100644 index 8d15d5dfc6b3..000000000000 --- a/Documentation/fb/cyblafb/performance +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | Speed | ||
2 | ===== | ||
3 | |||
4 | CyBlaFB is much faster than tridentfb and vesafb. Compare the performance data | ||
5 | for mode 1280x1024-[8,16,32]@61 Hz. | ||
6 | |||
7 | Test 1: Cat a file with 2000 lines of 0 characters. | ||
8 | Test 2: Cat a file with 2000 lines of 80 characters. | ||
9 | Test 3: Cat a file with 2000 lines of 160 characters. | ||
10 | |||
11 | All values show system time use in seconds, kernel 2.6.12 was used for | ||
12 | the measurements. 2.6.13 is a bit slower, 2.6.14 hopefully will include a | ||
13 | patch that speeds up kernel bitblitting a lot ( > 20%). | ||
14 | |||
15 | +-----------+-----------------------------------------------------+ | ||
16 | | | not accelerated | | ||
17 | | TRIDENTFB +-----------------+-----------------+-----------------+ | ||
18 | | of 2.6.12 | 8 bpp | 16 bpp | 32 bpp | | ||
19 | | | noypan | ypan | noypan | ypan | noypan | ypan | | ||
20 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
21 | | Test 1 | 4.31 | 4.33 | 6.05 | 12.81 | ---- | ---- | | ||
22 | | Test 2 | 67.94 | 5.44 | 123.16 | 14.79 | ---- | ---- | | ||
23 | | Test 3 | 131.36 | 6.55 | 240.12 | 16.76 | ---- | ---- | | ||
24 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
25 | | Comments | | | completely bro- | | ||
26 | | | | | ken, monitor | | ||
27 | | | | | switches off | | ||
28 | +-----------+-----------------+-----------------+-----------------+ | ||
29 | |||
30 | |||
31 | +-----------+-----------------------------------------------------+ | ||
32 | | | accelerated | | ||
33 | | TRIDENTFB +-----------------+-----------------+-----------------+ | ||
34 | | of 2.6.12 | 8 bpp | 16 bpp | 32 bpp | | ||
35 | | | noypan | ypan | noypan | ypan | noypan | ypan | | ||
36 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
37 | | Test 1 | ---- | ---- | 20.62 | 1.22 | ---- | ---- | | ||
38 | | Test 2 | ---- | ---- | 22.61 | 3.19 | ---- | ---- | | ||
39 | | Test 3 | ---- | ---- | 24.59 | 5.16 | ---- | ---- | | ||
40 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
41 | | Comments | broken, writing | broken, ok only | completely bro- | | ||
42 | | | to wrong places | if bgcolor is | ken, monitor | | ||
43 | | | on screen + bug | black, bug in | switches off | | ||
44 | | | in fillrect() | fillrect() | | | ||
45 | +-----------+-----------------+-----------------+-----------------+ | ||
46 | |||
47 | |||
48 | +-----------+-----------------------------------------------------+ | ||
49 | | | not accelerated | | ||
50 | | VESAFB +-----------------+-----------------+-----------------+ | ||
51 | | of 2.6.12 | 8 bpp | 16 bpp | 32 bpp | | ||
52 | | | noypan | ypan | noypan | ypan | noypan | ypan | | ||
53 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
54 | | Test 1 | 4.26 | 3.76 | 5.99 | 7.23 | ---- | ---- | | ||
55 | | Test 2 | 65.65 | 4.89 | 120.88 | 9.08 | ---- | ---- | | ||
56 | | Test 3 | 126.91 | 5.94 | 235.77 | 11.03 | ---- | ---- | | ||
57 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
58 | | Comments | vga=0x307 | vga=0x31a | vga=0x31b not | | ||
59 | | | fh=80kHz | fh=80kHz | supported by | | ||
60 | | | fv=75kHz | fv=75kHz | video BIOS and | | ||
61 | | | | | hardware | | ||
62 | +-----------+-----------------+-----------------+-----------------+ | ||
63 | |||
64 | |||
65 | +-----------+-----------------------------------------------------+ | ||
66 | | | accelerated | | ||
67 | | CYBLAFB +-----------------+-----------------+-----------------+ | ||
68 | | | 8 bpp | 16 bpp | 32 bpp | | ||
69 | | | noypan | ypan | noypan | ypan | noypan | ypan | | ||
70 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
71 | | Test 1 | 8.02 | 0.23 | 19.04 | 0.61 | 57.12 | 2.74 | | ||
72 | | Test 2 | 8.38 | 0.55 | 19.39 | 0.92 | 57.54 | 3.13 | | ||
73 | | Test 3 | 8.73 | 0.86 | 19.74 | 1.24 | 57.95 | 3.51 | | ||
74 | +-----------+--------+--------+--------+--------+--------+--------+ | ||
75 | | Comments | | | | | ||
76 | | | | | | | ||
77 | | | | | | | ||
78 | | | | | | | ||
79 | +-----------+-----------------+-----------------+-----------------+ | ||
diff --git a/Documentation/fb/cyblafb/todo b/Documentation/fb/cyblafb/todo deleted file mode 100644 index c5f6d0eae545..000000000000 --- a/Documentation/fb/cyblafb/todo +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | TODO / Missing features | ||
2 | ======================= | ||
3 | |||
4 | Verify LCD stuff "stretch" and "center" options are | ||
5 | completely untested ... this code needs to be | ||
6 | verified. As I don't have access to such | ||
7 | hardware, please contact me if you are | ||
8 | willing run some tests. | ||
9 | |||
10 | Interlaced video modes The reason that interleaved | ||
11 | modes are disabled is that I do not know | ||
12 | the meaning of the vertical interlace | ||
13 | parameter. Also the datasheet mentions a | ||
14 | bit d8 of a horizontal interlace parameter, | ||
15 | but nowhere the lower 8 bits. Please help | ||
16 | if you can. | ||
17 | |||
18 | low-res double scan modes Who needs it? | ||
19 | |||
20 | accelerated color blitting Who needs it? The console driver does use color | ||
21 | blitting for nothing but drawing the penguine, | ||
22 | everything else is done using color expanding | ||
23 | blitting of 1bpp character bitmaps. | ||
24 | |||
25 | ioctls Who needs it? | ||
26 | |||
27 | TV-out Will be done later. Use "vga= " at boot time | ||
28 | to set a suitable video mode. | ||
29 | |||
30 | ??? Feel free to contact me if you have any | ||
31 | feature requests | ||
diff --git a/Documentation/fb/cyblafb/usage b/Documentation/fb/cyblafb/usage deleted file mode 100644 index a39bb3d402a2..000000000000 --- a/Documentation/fb/cyblafb/usage +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | CyBlaFB is a framebuffer driver for the Cyberblade/i1 graphics core integrated | ||
2 | into the VIA Apollo PLE133 (aka vt8601) south bridge. It is developed and | ||
3 | tested using a VIA EPIA 5000 board. | ||
4 | |||
5 | Cyblafb - compiled into the kernel or as a module? | ||
6 | ================================================== | ||
7 | |||
8 | You might compile cyblafb either as a module or compile it permanently into the | ||
9 | kernel. | ||
10 | |||
11 | Unless you have a real reason to do so you should not compile both vesafb and | ||
12 | cyblafb permanently into the kernel. It's possible and it helps during the | ||
13 | developement cycle, but it's useless and will at least block some otherwise | ||
14 | usefull memory for ordinary users. | ||
15 | |||
16 | Selecting Modes | ||
17 | =============== | ||
18 | |||
19 | Startup Mode | ||
20 | ============ | ||
21 | |||
22 | First of all, you might use the "vga=???" boot parameter as it is | ||
23 | documented in vesafb.txt and svga.txt. Cyblafb will detect the video | ||
24 | mode selected and will use the geometry and timings found by | ||
25 | inspecting the hardware registers. | ||
26 | |||
27 | video=cyblafb vga=0x317 | ||
28 | |||
29 | Alternatively you might use a combination of the mode, ref and bpp | ||
30 | parameters. If you compiled the driver into the kernel, add something | ||
31 | like this to the kernel command line: | ||
32 | |||
33 | video=cyblafb:1280x1024,bpp=16,ref=50 ... | ||
34 | |||
35 | If you compiled the driver as a module, the same mode would be | ||
36 | selected by the following command: | ||
37 | |||
38 | modprobe cyblafb mode=1280x1024 bpp=16 ref=50 ... | ||
39 | |||
40 | None of the modes possible to select as startup modes are affected by | ||
41 | the problems described at the end of the next subsection. | ||
42 | |||
43 | For all startup modes cyblafb chooses a virtual x resolution of 2048, | ||
44 | the only exception is mode 1280x1024 in combination with 32 bpp. This | ||
45 | allows ywrap scrolling for all those modes if rotation is 0 or 2, and | ||
46 | also fast scrolling if rotation is 1 or 3. The default virtual y reso- | ||
47 | lution is 4096 for bpp == 8, 2048 for bpp==16 and 1024 for bpp == 32, | ||
48 | again with the only exception of 1280x1024 at 32 bpp. | ||
49 | |||
50 | Please do set your video memory size to 8 Mb in the Bios setup. Other | ||
51 | values will work, but performace is decreased for a lot of modes. | ||
52 | |||
53 | Mode changes using fbset | ||
54 | ======================== | ||
55 | |||
56 | You might use fbset to change the video mode, see "man fbset". Cyblafb | ||
57 | generally does assume that you know what you are doing. But it does | ||
58 | some checks, especially those that are needed to prevent you from | ||
59 | damaging your hardware. | ||
60 | |||
61 | - only 8, 16, 24 and 32 bpp video modes are accepted | ||
62 | - interlaced video modes are not accepted | ||
63 | - double scan video modes are not accepted | ||
64 | - if a flat panel is found, cyblafb does not allow you | ||
65 | to program a resolution higher than the physical | ||
66 | resolution of the flat panel monitor | ||
67 | - cyblafb does not allow vclk to exceed 230 MHz. As 32 bpp | ||
68 | and (currently) 24 bit modes use a doubled vclk internally, | ||
69 | the dotclock limit as seen by fbset is 115 MHz for those | ||
70 | modes and 230 MHz for 8 and 16 bpp modes. | ||
71 | - cyblafb will allow you to select very high resolutions as | ||
72 | long as the hardware can be programmed to these modes. The | ||
73 | documented limit 1600x1200 is not enforced, but don't expect | ||
74 | perfect signal quality. | ||
75 | |||
76 | Any request that violates the rules given above will be either changed | ||
77 | to something the hardware supports or an error value will be returned. | ||
78 | |||
79 | If you program a virtual y resolution higher than the hardware limit, | ||
80 | cyblafb will silently decrease that value to the highest possible | ||
81 | value. The same is true for a virtual x resolution that is not | ||
82 | supported by the hardware. Cyblafb tries to adapt vyres first because | ||
83 | vxres decides if ywrap scrolling is possible or not. | ||
84 | |||
85 | Attempts to disable acceleration are ignored, I believe that this is | ||
86 | safe. | ||
87 | |||
88 | Some video modes that should work do not work as expected. If you use | ||
89 | the standard fb.modes, fbset 640x480-60 will program that mode, but | ||
90 | you will see a vertical area, about two characters wide, with only | ||
91 | much darker characters than the other characters on the screen. | ||
92 | Cyblafb does allow that mode to be set, as it does not violate the | ||
93 | official specifications. It would need a lot of code to reliably sort | ||
94 | out all invalid modes, playing around with the margin values will | ||
95 | give a valid mode quickly. And if cyblafb would detect such an invalid | ||
96 | mode, should it silently alter the requested values or should it | ||
97 | report an error? Both options have some pros and cons. As stated | ||
98 | above, none of the startup modes are affected, and if you set | ||
99 | verbosity to 1 or higher, cyblafb will print the fbset command that | ||
100 | would be needed to program that mode using fbset. | ||
101 | |||
102 | |||
103 | Other Parameters | ||
104 | ================ | ||
105 | |||
106 | |||
107 | crt don't autodetect, assume monitor connected to | ||
108 | standard VGA connector | ||
109 | |||
110 | fp don't autodetect, assume flat panel display | ||
111 | connected to flat panel monitor interface | ||
112 | |||
113 | nativex inform driver about native x resolution of | ||
114 | flat panel monitor connected to special | ||
115 | interface (should be autodetected) | ||
116 | |||
117 | stretch stretch image to adapt low resolution modes to | ||
118 | higer resolutions of flat panel monitors | ||
119 | connected to special interface | ||
120 | |||
121 | center center image to adapt low resolution modes to | ||
122 | higer resolutions of flat panel monitors | ||
123 | connected to special interface | ||
124 | |||
125 | memsize use if autodetected memsize is wrong ... | ||
126 | should never be necessary | ||
127 | |||
128 | nopcirr disable PCI read retry | ||
129 | nopciwr disable PCI write retry | ||
130 | nopcirb disable PCI read bursts | ||
131 | nopciwb disable PCI write bursts | ||
132 | |||
133 | bpp bpp for specified modes | ||
134 | valid values: 8 || 16 || 24 || 32 | ||
135 | |||
136 | ref refresh rate for specified mode | ||
137 | valid values: 50 <= ref <= 85 | ||
138 | |||
139 | mode 640x480 or 800x600 or 1024x768 or 1280x1024 | ||
140 | if not specified, the startup mode will be detected | ||
141 | and used, so you might also use the vga=??? parameter | ||
142 | described in vesafb.txt. If you do not specify a mode, | ||
143 | bpp and ref parameters are ignored. | ||
144 | |||
145 | verbosity 0 is the default, increase to at least 2 for every | ||
146 | bug report! | ||
147 | |||
148 | Development hints | ||
149 | ================= | ||
150 | |||
151 | It's much faster do compile a module and to load the new version after | ||
152 | unloading the old module than to compile a new kernel and to reboot. So if you | ||
153 | try to work on cyblafb, it might be a good idea to use cyblafb as a module. | ||
154 | In real life, fast often means dangerous, and that's also the case here. If | ||
155 | you introduce a serious bug when cyblafb is compiled into the kernel, the | ||
156 | kernel will lock or oops with a high probability before the file system is | ||
157 | mounted, and the danger for your data is low. If you load a broken own version | ||
158 | of cyblafb on a running system, the danger for the integrity of the file | ||
159 | system is much higher as you might need a hard reset afterwards. Decide | ||
160 | yourself. | ||
161 | |||
162 | Module unloading, the vfb method | ||
163 | ================================ | ||
164 | |||
165 | If you want to unload/reload cyblafb using the virtual framebuffer, you need | ||
166 | to enable vfb support in the kernel first. After that, load the modules as | ||
167 | shown below: | ||
168 | |||
169 | modprobe vfb vfb_enable=1 | ||
170 | modprobe fbcon | ||
171 | modprobe cyblafb | ||
172 | fbset -fb /dev/fb1 1280x1024-60 -vyres 2662 | ||
173 | con2fb /dev/fb1 /dev/tty1 | ||
174 | ... | ||
175 | |||
176 | If you now made some changes to cyblafb and want to reload it, you might do it | ||
177 | as show below: | ||
178 | |||
179 | con2fb /dev/fb0 /dev/tty1 | ||
180 | ... | ||
181 | rmmod cyblafb | ||
182 | modprobe cyblafb | ||
183 | con2fb /dev/fb1 /dev/tty1 | ||
184 | ... | ||
185 | |||
186 | Of course, you might choose another mode, and most certainly you also want to | ||
187 | map some other /dev/tty* to the real framebuffer device. You might also choose | ||
188 | to compile fbcon as a kernel module or place it permanently in the kernel. | ||
189 | |||
190 | I do not know of any way to unload fbcon, and fbcon will prevent the | ||
191 | framebuffer device loaded first from unloading. [If there is a way, then | ||
192 | please add a description here!] | ||
193 | |||
194 | Module unloading, the vesafb method | ||
195 | =================================== | ||
196 | |||
197 | Configure the kernel: | ||
198 | |||
199 | <*> Support for frame buffer devices | ||
200 | [*] VESA VGA graphics support | ||
201 | <M> Cyberblade/i1 support | ||
202 | |||
203 | Add e.g. "video=vesafb:ypan vga=0x307" to the kernel parameters. The ypan | ||
204 | parameter is important, choose any vga parameter you like as long as it is | ||
205 | a graphics mode. | ||
206 | |||
207 | After booting, load cyblafb without any mode and bpp parameter and assign | ||
208 | cyblafb to individual ttys using con2fb, e.g.: | ||
209 | |||
210 | modprobe cyblafb | ||
211 | con2fb /dev/fb1 /dev/tty1 | ||
212 | |||
213 | Unloading cyblafb works without problems after you assign vesafb to all | ||
214 | ttys again, e.g.: | ||
215 | |||
216 | con2fb /dev/fb0 /dev/tty1 | ||
217 | rmmod cyblafb | ||
diff --git a/Documentation/fb/cyblafb/whatsnew b/Documentation/fb/cyblafb/whatsnew deleted file mode 100644 index 76c07a26e044..000000000000 --- a/Documentation/fb/cyblafb/whatsnew +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | 0.62 | ||
2 | ==== | ||
3 | |||
4 | - the vesafb parameter has been removed as I decided to allow the | ||
5 | feature without any special parameter. | ||
6 | |||
7 | - Cyblafb does not use the vga style of panning any longer, now the | ||
8 | "right view" register in the graphics engine IO space is used. Without | ||
9 | that change it was impossible to use all available memory, and without | ||
10 | access to all available memory it is impossible to ywrap. | ||
11 | |||
12 | - The imageblit function now uses hardware acceleration for all font | ||
13 | widths. Hardware blitting across pixel column 2048 is broken in the | ||
14 | cyberblade/i1 graphics core, but we work around that hardware bug. | ||
15 | |||
16 | - modes with vxres != xres are supported now. | ||
17 | |||
18 | - ywrap scrolling is supported now and the default. This is a big | ||
19 | performance gain. | ||
20 | |||
21 | - default video modes use vyres > yres and vxres > xres to allow | ||
22 | almost optimal scrolling speed for normal and rotated screens | ||
23 | |||
24 | - some features mainly usefull for debugging the upper layers of the | ||
25 | framebuffer system have been added, have a look at the code | ||
26 | |||
27 | - fixed: Oops after unloading cyblafb when reading /proc/io* | ||
28 | |||
29 | - we work around some bugs of the higher framebuffer layers. | ||
diff --git a/Documentation/fb/cyblafb/whycyblafb b/Documentation/fb/cyblafb/whycyblafb deleted file mode 100644 index a123bc11e698..000000000000 --- a/Documentation/fb/cyblafb/whycyblafb +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | I tried the following framebuffer drivers: | ||
2 | |||
3 | - TRIDENTFB is full of bugs. Acceleration is broken for Blade3D | ||
4 | graphics cores like the cyberblade/i1. It claims to support a great | ||
5 | number of devices, but documentation for most of these devices is | ||
6 | unfortunately not available. There is _no_ reason to use tridentfb | ||
7 | for cyberblade/i1 + CRT users. VESAFB is faster, and the one | ||
8 | advantage, mode switching, is broken in tridentfb. | ||
9 | |||
10 | - VESAFB is used by many distributions as a standard. Vesafb does | ||
11 | not support mode switching. VESAFB is a bit faster than the working | ||
12 | configurations of TRIDENTFB, but it is still too slow, even if you | ||
13 | use ypan. | ||
14 | |||
15 | - EPIAFB (you'll find it on sourceforge) supports the Cyberblade/i1 | ||
16 | graphics core, but it still has serious bugs and developement seems | ||
17 | to have stopped. This is the one driver with TV-out support. If you | ||
18 | do need this feature, try epiafb. | ||
19 | |||
20 | None of these drivers was a real option for me. | ||
21 | |||
22 | I believe that is unreasonable to change code that announces to support 20 | ||
23 | devices if I only have more or less sufficient documentation for exactly one | ||
24 | of these. The risk of breaking device foo while fixing device bar is too high. | ||
25 | |||
26 | So I decided to start CyBlaFB as a stripped down tridentfb. | ||
27 | |||
28 | All code specific to other Trident chips has been removed. After that there | ||
29 | were a lot of cosmetic changes to increase the readability of the code. All | ||
30 | register names were changed to those mnemonics used in the datasheet. Function | ||
31 | and macro names were changed if they hindered easy understanding of the code. | ||
32 | |||
33 | After that I debugged the code and implemented some new features. I'll try to | ||
34 | give a little summary of the main changes: | ||
35 | |||
36 | - calculation of vertical and horizontal timings was fixed | ||
37 | |||
38 | - video signal quality has been improved dramatically | ||
39 | |||
40 | - acceleration: | ||
41 | |||
42 | - fillrect and copyarea were fixed and reenabled | ||
43 | |||
44 | - color expanding imageblit was newly implemented, color | ||
45 | imageblit (only used to draw the penguine) still uses the | ||
46 | generic code. | ||
47 | |||
48 | - init of the acceleration engine was improved and moved to a | ||
49 | place where it really works ... | ||
50 | |||
51 | - sync function has a timeout now and tries to reset and | ||
52 | reinit the accel engine if necessary | ||
53 | |||
54 | - fewer slow copyarea calls when doing ypan scrolling by using | ||
55 | undocumented bit d21 of screen start address stored in | ||
56 | CR2B[5]. BIOS does use it also, so this should be safe. | ||
57 | |||
58 | - cyblafb rejects any attempt to set modes that would cause vclk | ||
59 | values above reasonable 230 MHz. 32bit modes use a clock | ||
60 | multiplicator of 2, so fbset does show the correct values for | ||
61 | pixclock but not for vclk in this case. The fbset limit is 115 MHz | ||
62 | for 32 bpp modes. | ||
63 | |||
64 | - cyblafb rejects modes known to be broken or unimplemented (all | ||
65 | interlaced modes, all doublescan modes for now) | ||
66 | |||
67 | - cyblafb now works independant of the video mode in effect at startup | ||
68 | time (tridentfb does not init all needed registers to reasonable | ||
69 | values) | ||
70 | |||
71 | - switching between video modes does work reliably now | ||
72 | |||
73 | - the first video mode now is the one selected on startup using the | ||
74 | vga=???? mechanism or any of | ||
75 | - 640x480, 800x600, 1024x768, 1280x1024 | ||
76 | - 8, 16, 24 or 32 bpp | ||
77 | - refresh between 50 Hz and 85 Hz, 1 Hz steps (1280x1024-32 | ||
78 | is limited to 63Hz) | ||
79 | |||
80 | - pci retry and pci burst mode are settable (try to disable if you | ||
81 | experience latency problems) | ||
82 | |||
83 | - built as a module cyblafb might be unloaded and reloaded using | ||
84 | the vfb module and con2vt or might be used together with vesafb | ||
85 | |||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 8851eea06a02..d0f354670646 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -6,20 +6,47 @@ be removed from this file. | |||
6 | 6 | ||
7 | --------------------------- | 7 | --------------------------- |
8 | 8 | ||
9 | What: old static regulatory information and ieee80211_regdom module parameter | 9 | What: The ieee80211_regdom module parameter |
10 | When: 2.6.29 | 10 | When: March 2010 / desktop catchup |
11 | |||
12 | Why: This was inherited by the CONFIG_WIRELESS_OLD_REGULATORY code, | ||
13 | and currently serves as an option for users to define an | ||
14 | ISO / IEC 3166 alpha2 code for the country they are currently | ||
15 | present in. Although there are userspace API replacements for this | ||
16 | through nl80211 distributions haven't yet caught up with implementing | ||
17 | decent alternatives through standard GUIs. Although available as an | ||
18 | option through iw or wpa_supplicant its just a matter of time before | ||
19 | distributions pick up good GUI options for this. The ideal solution | ||
20 | would actually consist of intelligent designs which would do this for | ||
21 | the user automatically even when travelling through different countries. | ||
22 | Until then we leave this module parameter as a compromise. | ||
23 | |||
24 | When userspace improves with reasonable widely-available alternatives for | ||
25 | this we will no longer need this module parameter. This entry hopes that | ||
26 | by the super-futuristically looking date of "March 2010" we will have | ||
27 | such replacements widely available. | ||
28 | |||
29 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | ||
30 | |||
31 | --------------------------- | ||
32 | |||
33 | What: CONFIG_WIRELESS_OLD_REGULATORY - old static regulatory information | ||
34 | When: March 2010 / desktop catchup | ||
35 | |||
11 | Why: The old regulatory infrastructure has been replaced with a new one | 36 | Why: The old regulatory infrastructure has been replaced with a new one |
12 | which does not require statically defined regulatory domains. We do | 37 | which does not require statically defined regulatory domains. We do |
13 | not want to keep static regulatory domains in the kernel due to the | 38 | not want to keep static regulatory domains in the kernel due to the |
14 | the dynamic nature of regulatory law and localization. We kept around | 39 | the dynamic nature of regulatory law and localization. We kept around |
15 | the old static definitions for the regulatory domains of: | 40 | the old static definitions for the regulatory domains of: |
41 | |||
16 | * US | 42 | * US |
17 | * JP | 43 | * JP |
18 | * EU | 44 | * EU |
45 | |||
19 | and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was | 46 | and used by default the US when CONFIG_WIRELESS_OLD_REGULATORY was |
20 | set. We also kept around the ieee80211_regdom module parameter in case | 47 | set. We will remove this option once the standard Linux desktop catches |
21 | some applications were relying on it. Changing regulatory domains | 48 | up with the new userspace APIs we have implemented. |
22 | can now be done instead by using nl80211, as is done with iw. | 49 | |
23 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | 50 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> |
24 | 51 | ||
25 | --------------------------- | 52 | --------------------------- |
@@ -37,10 +64,10 @@ Who: Pavel Machek <pavel@suse.cz> | |||
37 | 64 | ||
38 | --------------------------- | 65 | --------------------------- |
39 | 66 | ||
40 | What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. | 67 | What: Video4Linux API 1 ioctls and from Video devices. |
41 | When: December 2008 | 68 | When: July 2009 |
42 | Files: include/linux/video_decoder.h include/linux/videodev.h | 69 | Files: include/linux/videodev.h |
43 | Check: include/linux/video_decoder.h include/linux/videodev.h | 70 | Check: include/linux/videodev.h |
44 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 | 71 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 |
45 | series. The old API have lots of drawbacks and don't provide enough | 72 | series. The old API have lots of drawbacks and don't provide enough |
46 | means to work with all video and audio standards. The newer API is | 73 | means to work with all video and audio standards. The newer API is |
@@ -229,7 +256,9 @@ Who: Jan Engelhardt <jengelh@computergmbh.de> | |||
229 | --------------------------- | 256 | --------------------------- |
230 | 257 | ||
231 | What: b43 support for firmware revision < 410 | 258 | What: b43 support for firmware revision < 410 |
232 | When: July 2008 | 259 | When: The schedule was July 2008, but it was decided that we are going to keep the |
260 | code as long as there are no major maintanance headaches. | ||
261 | So it _could_ be removed _any_ time now, if it conflicts with something new. | ||
233 | Why: The support code for the old firmware hurts code readability/maintainability | 262 | Why: The support code for the old firmware hurts code readability/maintainability |
234 | and slightly hurts runtime performance. Bugfixes for the old firmware | 263 | and slightly hurts runtime performance. Bugfixes for the old firmware |
235 | are not provided by Broadcom anymore. | 264 | are not provided by Broadcom anymore. |
@@ -282,6 +311,18 @@ Who: Vlad Yasevich <vladislav.yasevich@hp.com> | |||
282 | 311 | ||
283 | --------------------------- | 312 | --------------------------- |
284 | 313 | ||
314 | What: Ability for non root users to shm_get hugetlb pages based on mlock | ||
315 | resource limits | ||
316 | When: 2.6.31 | ||
317 | Why: Non root users need to be part of /proc/sys/vm/hugetlb_shm_group or | ||
318 | have CAP_IPC_LOCK to be able to allocate shm segments backed by | ||
319 | huge pages. The mlock based rlimit check to allow shm hugetlb is | ||
320 | inconsistent with mmap based allocations. Hence it is being | ||
321 | deprecated. | ||
322 | Who: Ravikiran Thirumalai <kiran@scalex86.org> | ||
323 | |||
324 | --------------------------- | ||
325 | |||
285 | What: CONFIG_THERMAL_HWMON | 326 | What: CONFIG_THERMAL_HWMON |
286 | When: January 2009 | 327 | When: January 2009 |
287 | Why: This option was introduced just to allow older lm-sensors userspace | 328 | Why: This option was introduced just to allow older lm-sensors userspace |
@@ -311,7 +352,8 @@ Who: Krzysztof Piotr Oledzki <ole@ans.pl> | |||
311 | --------------------------- | 352 | --------------------------- |
312 | 353 | ||
313 | What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client() | 354 | What: i2c_attach_client(), i2c_detach_client(), i2c_driver->detach_client() |
314 | When: 2.6.29 (ideally) or 2.6.30 (more likely) | 355 | When: 2.6.30 |
356 | Check: i2c_attach_client i2c_detach_client | ||
315 | Why: Deprecated by the new (standard) device driver binding model. Use | 357 | Why: Deprecated by the new (standard) device driver binding model. Use |
316 | i2c_driver->probe() and ->remove() instead. | 358 | i2c_driver->probe() and ->remove() instead. |
317 | Who: Jean Delvare <khali@linux-fr.org> | 359 | Who: Jean Delvare <khali@linux-fr.org> |
@@ -326,18 +368,6 @@ Who: Hans de Goede <hdegoede@redhat.com> | |||
326 | 368 | ||
327 | --------------------------- | 369 | --------------------------- |
328 | 370 | ||
329 | What: SELinux "compat_net" functionality | ||
330 | When: 2.6.30 at the earliest | ||
331 | Why: In 2.6.18 the Secmark concept was introduced to replace the "compat_net" | ||
332 | network access control functionality of SELinux. Secmark offers both | ||
333 | better performance and greater flexibility than the "compat_net" | ||
334 | mechanism. Now that the major Linux distributions have moved to | ||
335 | Secmark, it is time to deprecate the older mechanism and start the | ||
336 | process of removing the old code. | ||
337 | Who: Paul Moore <paul.moore@hp.com> | ||
338 | |||
339 | --------------------------- | ||
340 | |||
341 | What: sysfs ui for changing p4-clockmod parameters | 371 | What: sysfs ui for changing p4-clockmod parameters |
342 | When: September 2009 | 372 | When: September 2009 |
343 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | 373 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and |
@@ -346,6 +376,23 @@ Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | |||
346 | cause the thermal throttling not to happen at the right time. | 376 | cause the thermal throttling not to happen at the right time. |
347 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | 377 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> |
348 | 378 | ||
379 | ----------------------------- | ||
380 | |||
381 | What: __do_IRQ all in one fits nothing interrupt handler | ||
382 | When: 2.6.32 | ||
383 | Why: __do_IRQ was kept for easy migration to the type flow handlers. | ||
384 | More than two years of migration time is enough. | ||
385 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
386 | |||
387 | ----------------------------- | ||
388 | |||
389 | What: obsolete generic irq defines and typedefs | ||
390 | When: 2.6.30 | ||
391 | Why: The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t) | ||
392 | have been kept around for migration reasons. After more than two years | ||
393 | it's time to remove them finally | ||
394 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
395 | |||
349 | --------------------------- | 396 | --------------------------- |
350 | 397 | ||
351 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ | 398 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index ec6a9392a173..76efe5b71d7d 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -437,8 +437,11 @@ grab BKL for cases when we close a file that had been opened r/w, but that | |||
437 | can and should be done using the internal locking with smaller critical areas). | 437 | can and should be done using the internal locking with smaller critical areas). |
438 | Current worst offender is ext2_get_block()... | 438 | Current worst offender is ext2_get_block()... |
439 | 439 | ||
440 | ->fasync() is a mess. This area needs a big cleanup and that will probably | 440 | ->fasync() is called without BKL protection, and is responsible for |
441 | affect locking. | 441 | maintaining the FASYNC bit in filp->f_flags. Most instances call |
442 | fasync_helper(), which does that maintenance, so it's not normally | ||
443 | something one needs to worry about. Return values > 0 will be mapped to | ||
444 | zero in the VFS layer. | ||
442 | 445 | ||
443 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would | 446 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would |
444 | move ->readdir() to inode_operations and use a separate method for directory | 447 | move ->readdir() to inode_operations and use a separate method for directory |
@@ -502,7 +505,7 @@ prototypes: | |||
502 | void (*open)(struct vm_area_struct*); | 505 | void (*open)(struct vm_area_struct*); |
503 | void (*close)(struct vm_area_struct*); | 506 | void (*close)(struct vm_area_struct*); |
504 | int (*fault)(struct vm_area_struct*, struct vm_fault *); | 507 | int (*fault)(struct vm_area_struct*, struct vm_fault *); |
505 | int (*page_mkwrite)(struct vm_area_struct *, struct page *); | 508 | int (*page_mkwrite)(struct vm_area_struct *, struct vm_fault *); |
506 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); | 509 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); |
507 | 510 | ||
508 | locking rules: | 511 | locking rules: |
diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt index 23448551cabe..e055acb6b2d4 100644 --- a/Documentation/filesystems/ext2.txt +++ b/Documentation/filesystems/ext2.txt | |||
@@ -376,7 +376,8 @@ Implementations for: | |||
376 | Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs | 376 | Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs |
377 | Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 | 377 | Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 |
378 | DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ | 378 | DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ |
379 | OS/2 (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ | 379 | OS/2 (+) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ |
380 | RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ | 380 | RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ |
381 | 381 | ||
382 | (*) no longer actively developed/supported (as of Mar 2009) | 382 | (*) no longer actively developed/supported (as of Apr 2001) |
383 | (+) no longer actively developed/supported (as of Mar 2009) | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a87be42f8211..830bad7cce0f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1478,6 +1478,13 @@ of problems on the network like duplicate address or bad checksums. Normally, | |||
1478 | this should be enabled, but if the problem persists the messages can be | 1478 | this should be enabled, but if the problem persists the messages can be |
1479 | disabled. | 1479 | disabled. |
1480 | 1480 | ||
1481 | netdev_budget | ||
1482 | ------------- | ||
1483 | |||
1484 | Maximum number of packets taken from all interfaces in one polling cycle (NAPI | ||
1485 | poll). In one polling cycle interfaces which are registered to polling are | ||
1486 | probed in a round-robin manner. The limit of packets in one such probe can be | ||
1487 | set per-device via sysfs class/net/<device>/weight . | ||
1481 | 1488 | ||
1482 | netdev_max_backlog | 1489 | netdev_max_backlog |
1483 | ------------------ | 1490 | ------------------ |
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621 index 1fee6f1e6bc5..5e97f333c4df 100644 --- a/Documentation/hwmon/ds1621 +++ b/Documentation/hwmon/ds1621 | |||
@@ -49,12 +49,9 @@ of up to +/- 0.5 degrees even when compared against precise temperature | |||
49 | readings. Be sure to have a high vs. low temperature limit gap of al least | 49 | readings. Be sure to have a high vs. low temperature limit gap of al least |
50 | 1.0 degree Celsius to avoid Tout "bouncing", though! | 50 | 1.0 degree Celsius to avoid Tout "bouncing", though! |
51 | 51 | ||
52 | As for alarms, you can read the alarm status of the DS1621 via the 'alarms' | 52 | The alarm bits are set when the high or low limits are met or exceeded and |
53 | /sys file interface. The result consists mainly of bit 6 and 5 of the | 53 | are reset by the module as soon as the respective temperature ranges are |
54 | configuration register of the chip; bit 6 (0x40 or 64) is the high alarm | 54 | left. |
55 | bit and bit 5 (0x20 or 32) the low one. These bits are set when the high or | ||
56 | low limits are met or exceeded and are reset by the module as soon as the | ||
57 | respective temperature ranges are left. | ||
58 | 55 | ||
59 | The alarm registers are in no way suitable to find out about the actual | 56 | The alarm registers are in no way suitable to find out about the actual |
60 | status of Tout. They will only tell you about its history, whether or not | 57 | status of Tout. They will only tell you about its history, whether or not |
@@ -64,45 +61,3 @@ with neither of the alarms set. | |||
64 | 61 | ||
65 | Temperature conversion of the DS1621 takes up to 1000ms; internal access to | 62 | Temperature conversion of the DS1621 takes up to 1000ms; internal access to |
66 | non-volatile registers may last for 10ms or below. | 63 | non-volatile registers may last for 10ms or below. |
67 | |||
68 | High Accuracy Temperature Reading | ||
69 | --------------------------------- | ||
70 | |||
71 | As said before, the temperature issued via the 9-bit i2c-bus data is | ||
72 | somewhat arbitrary. Internally, the temperature conversion is of a | ||
73 | different kind that is explained (not so...) well in the DS1621 data sheet. | ||
74 | To cut the long story short: Inside the DS1621 there are two oscillators, | ||
75 | both of them biassed by a temperature coefficient. | ||
76 | |||
77 | Higher resolution of the temperature reading can be achieved using the | ||
78 | internal projection, which means taking account of REG_COUNT and REG_SLOPE | ||
79 | (the driver manages them): | ||
80 | |||
81 | Taken from Dallas Semiconductors App Note 068: 'Increasing Temperature | ||
82 | Resolution on the DS1620' and App Note 105: 'High Resolution Temperature | ||
83 | Measurement with Dallas Direct-to-Digital Temperature Sensors' | ||
84 | |||
85 | - Read the 9-bit temperature and strip the LSB (Truncate the .5 degs) | ||
86 | - The resulting value is TEMP_READ. | ||
87 | - Then, read REG_COUNT. | ||
88 | - And then, REG_SLOPE. | ||
89 | |||
90 | TEMP = TEMP_READ - 0.25 + ((REG_SLOPE - REG_COUNT) / REG_SLOPE) | ||
91 | |||
92 | Note that this is what the DONE bit in the DS1621 configuration register is | ||
93 | good for: Internally, one temperature conversion takes up to 1000ms. Before | ||
94 | that conversion is complete you will not be able to read valid things out | ||
95 | of REG_COUNT and REG_SLOPE. The DONE bit, as you may have guessed by now, | ||
96 | tells you whether the conversion is complete ("done", in plain English) and | ||
97 | thus, whether the values you read are good or not. | ||
98 | |||
99 | The DS1621 has two modes of operation: "Continuous" conversion, which can | ||
100 | be understood as the default stand-alone mode where the chip gets the | ||
101 | temperature and controls external devices via its Tout pin or tells other | ||
102 | i2c's about it if they care. The other mode is called "1SHOT", that means | ||
103 | that it only figures out about the temperature when it is explicitly told | ||
104 | to do so; this can be seen as power saving mode. | ||
105 | |||
106 | Now if you want to read REG_COUNT and REG_SLOPE, you have to either stop | ||
107 | the continuous conversions until the contents of these registers are valid, | ||
108 | or, in 1SHOT mode, you have to have one conversion made. | ||
diff --git a/Documentation/hwmon/lis3lv02d b/Documentation/hwmon/lis3lv02d index 287f8c902656..effe949a7282 100644 --- a/Documentation/hwmon/lis3lv02d +++ b/Documentation/hwmon/lis3lv02d | |||
@@ -1,11 +1,11 @@ | |||
1 | Kernel driver lis3lv02d | 1 | Kernel driver lis3lv02d |
2 | ================== | 2 | ======================= |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | 5 | ||
6 | * STMicroelectronics LIS3LV02DL and LIS3LV02DQ | 6 | * STMicroelectronics LIS3LV02DL and LIS3LV02DQ |
7 | 7 | ||
8 | Author: | 8 | Authors: |
9 | Yan Burman <burman.yan@gmail.com> | 9 | Yan Burman <burman.yan@gmail.com> |
10 | Eric Piel <eric.piel@tremplin-utc.net> | 10 | Eric Piel <eric.piel@tremplin-utc.net> |
11 | 11 | ||
@@ -15,7 +15,7 @@ Description | |||
15 | 15 | ||
16 | This driver provides support for the accelerometer found in various HP | 16 | This driver provides support for the accelerometer found in various HP |
17 | laptops sporting the feature officially called "HP Mobile Data | 17 | laptops sporting the feature officially called "HP Mobile Data |
18 | Protection System 3D" or "HP 3D DriveGuard". It detect automatically | 18 | Protection System 3D" or "HP 3D DriveGuard". It detects automatically |
19 | laptops with this sensor. Known models (for now the HP 2133, nc6420, | 19 | laptops with this sensor. Known models (for now the HP 2133, nc6420, |
20 | nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis | 20 | nc2510, nc8510, nc84x0, nw9440 and nx9420) will have their axis |
21 | automatically oriented on standard way (eg: you can directly play | 21 | automatically oriented on standard way (eg: you can directly play |
@@ -27,7 +27,7 @@ position - 3D position that the accelerometer reports. Format: "(x,y,z)" | |||
27 | calibrate - read: values (x, y, z) that are used as the base for input | 27 | calibrate - read: values (x, y, z) that are used as the base for input |
28 | class device operation. | 28 | class device operation. |
29 | write: forces the base to be recalibrated with the current | 29 | write: forces the base to be recalibrated with the current |
30 | position. | 30 | position. |
31 | rate - reports the sampling rate of the accelerometer device in HZ | 31 | rate - reports the sampling rate of the accelerometer device in HZ |
32 | 32 | ||
33 | This driver also provides an absolute input class device, allowing | 33 | This driver also provides an absolute input class device, allowing |
@@ -48,7 +48,7 @@ For better compatibility between the various laptops. The values reported by | |||
48 | the accelerometer are converted into a "standard" organisation of the axes | 48 | the accelerometer are converted into a "standard" organisation of the axes |
49 | (aka "can play neverball out of the box"): | 49 | (aka "can play neverball out of the box"): |
50 | * When the laptop is horizontal the position reported is about 0 for X and Y | 50 | * When the laptop is horizontal the position reported is about 0 for X and Y |
51 | and a positive value for Z | 51 | and a positive value for Z |
52 | * If the left side is elevated, X increases (becomes positive) | 52 | * If the left side is elevated, X increases (becomes positive) |
53 | * If the front side (where the touchpad is) is elevated, Y decreases | 53 | * If the front side (where the touchpad is) is elevated, Y decreases |
54 | (becomes negative) | 54 | (becomes negative) |
@@ -59,3 +59,13 @@ email to the authors to add it to the database. When reporting a new | |||
59 | laptop, please include the output of "dmidecode" plus the value of | 59 | laptop, please include the output of "dmidecode" plus the value of |
60 | /sys/devices/platform/lis3lv02d/position in these four cases. | 60 | /sys/devices/platform/lis3lv02d/position in these four cases. |
61 | 61 | ||
62 | Q&A | ||
63 | --- | ||
64 | |||
65 | Q: How do I safely simulate freefall? I have an HP "portable | ||
66 | workstation" which has about 3.5kg and a plastic case, so letting it | ||
67 | fall to the ground is out of question... | ||
68 | |||
69 | A: The sensor is pretty sensitive, so your hands can do it. Lift it | ||
70 | into free space, follow the fall with your hands for like 10 | ||
71 | centimeters. That should be enough to trigger the detection. | ||
diff --git a/Documentation/hwmon/ltc4215 b/Documentation/hwmon/ltc4215 new file mode 100644 index 000000000000..2e6a21eb656c --- /dev/null +++ b/Documentation/hwmon/ltc4215 | |||
@@ -0,0 +1,50 @@ | |||
1 | Kernel driver ltc4215 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Linear Technology LTC4215 | ||
6 | Prefix: 'ltc4215' | ||
7 | Addresses scanned: 0x44 | ||
8 | Datasheet: | ||
9 | http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1163,P17572,D12697 | ||
10 | |||
11 | Author: Ira W. Snyder <iws@ovro.caltech.edu> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The LTC4215 controller allows a board to be safely inserted and removed | ||
18 | from a live backplane. | ||
19 | |||
20 | |||
21 | Usage Notes | ||
22 | ----------- | ||
23 | |||
24 | This driver does not probe for LTC4215 devices, due to the fact that some | ||
25 | of the possible addresses are unfriendly to probing. You will need to use | ||
26 | the "force" parameter to tell the driver where to find the device. | ||
27 | |||
28 | Example: the following will load the driver for an LTC4215 at address 0x44 | ||
29 | on I2C bus #0: | ||
30 | $ modprobe ltc4215 force=0,0x44 | ||
31 | |||
32 | |||
33 | Sysfs entries | ||
34 | ------------- | ||
35 | |||
36 | The LTC4215 has built-in limits for overvoltage, undervoltage, and | ||
37 | undercurrent warnings. This makes it very likely that the reference | ||
38 | circuit will be used. | ||
39 | |||
40 | in1_input input voltage | ||
41 | in2_input output voltage | ||
42 | |||
43 | in1_min_alarm input undervoltage alarm | ||
44 | in1_max_alarm input overvoltage alarm | ||
45 | |||
46 | curr1_input current | ||
47 | curr1_max_alarm overcurrent alarm | ||
48 | |||
49 | power1_input power usage | ||
50 | power1_alarm power bad alarm | ||
diff --git a/Documentation/i2c/chips/pcf8591 b/Documentation/hwmon/pcf8591 index 5628fcf4207f..5628fcf4207f 100644 --- a/Documentation/i2c/chips/pcf8591 +++ b/Documentation/hwmon/pcf8591 | |||
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 6dbfd5efd991..2f10ce6a879f 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -365,6 +365,7 @@ energy[1-*]_input Cumulative energy use | |||
365 | Unit: microJoule | 365 | Unit: microJoule |
366 | RO | 366 | RO |
367 | 367 | ||
368 | |||
368 | ********** | 369 | ********** |
369 | * Alarms * | 370 | * Alarms * |
370 | ********** | 371 | ********** |
@@ -453,6 +454,27 @@ beep_mask Bitmask for beep. | |||
453 | RW | 454 | RW |
454 | 455 | ||
455 | 456 | ||
457 | *********************** | ||
458 | * Intrusion detection * | ||
459 | *********************** | ||
460 | |||
461 | intrusion[0-*]_alarm | ||
462 | Chassis intrusion detection | ||
463 | 0: OK | ||
464 | 1: intrusion detected | ||
465 | RW | ||
466 | Contrary to regular alarm flags which clear themselves | ||
467 | automatically when read, this one sticks until cleared by | ||
468 | the user. This is done by writing 0 to the file. Writing | ||
469 | other values is unsupported. | ||
470 | |||
471 | intrusion[0-*]_beep | ||
472 | Chassis intrusion beep | ||
473 | 0: disable | ||
474 | 1: enable | ||
475 | RW | ||
476 | |||
477 | |||
456 | sysfs attribute writes interpretation | 478 | sysfs attribute writes interpretation |
457 | ------------------------------------- | 479 | ------------------------------------- |
458 | 480 | ||
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index d6e1ae30fa6e..b6eb59384bb3 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf | |||
@@ -2,30 +2,40 @@ Kernel driver w83627ehf | |||
2 | ======================= | 2 | ======================= |
3 | 3 | ||
4 | Supported chips: | 4 | Supported chips: |
5 | * Winbond W83627EHF/EHG/DHG (ISA access ONLY) | 5 | * Winbond W83627EHF/EHG (ISA access ONLY) |
6 | Prefix: 'w83627ehf' | 6 | Prefix: 'w83627ehf' |
7 | Addresses scanned: ISA address retrieved from Super I/O registers | 7 | Addresses scanned: ISA address retrieved from Super I/O registers |
8 | Datasheet: | 8 | Datasheet: |
9 | http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83627EHF_%20W83627EHGb.pdf | 9 | http://www.nuvoton.com.tw/NR/rdonlyres/A6A258F0-F0C9-4F97-81C0-C4D29E7E943E/0/W83627EHF.pdf |
10 | DHG datasheet confidential. | 10 | * Winbond W83627DHG |
11 | Prefix: 'w83627dhg' | ||
12 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
13 | Datasheet: | ||
14 | http://www.nuvoton.com.tw/NR/rdonlyres/7885623D-A487-4CF9-A47F-30C5F73D6FE6/0/W83627DHG.pdf | ||
15 | * Winbond W83667HG | ||
16 | Prefix: 'w83667hg' | ||
17 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
18 | Datasheet: not available | ||
11 | 19 | ||
12 | Authors: | 20 | Authors: |
13 | Jean Delvare <khali@linux-fr.org> | 21 | Jean Delvare <khali@linux-fr.org> |
14 | Yuan Mu (Winbond) | 22 | Yuan Mu (Winbond) |
15 | Rudolf Marek <r.marek@assembler.cz> | 23 | Rudolf Marek <r.marek@assembler.cz> |
16 | David Hubbard <david.c.hubbard@gmail.com> | 24 | David Hubbard <david.c.hubbard@gmail.com> |
25 | Gong Jun <JGong@nuvoton.com> | ||
17 | 26 | ||
18 | Description | 27 | Description |
19 | ----------- | 28 | ----------- |
20 | 29 | ||
21 | This driver implements support for the Winbond W83627EHF, W83627EHG, and | 30 | This driver implements support for the Winbond W83627EHF, W83627EHG, |
22 | W83627DHG super I/O chips. We will refer to them collectively as Winbond chips. | 31 | W83627DHG and W83667HG super I/O chips. We will refer to them collectively |
32 | as Winbond chips. | ||
23 | 33 | ||
24 | The chips implement three temperature sensors, five fan rotation | 34 | The chips implement three temperature sensors, five fan rotation |
25 | speed sensors, ten analog voltage sensors (only nine for the 627DHG), one | 35 | speed sensors, ten analog voltage sensors (only nine for the 627DHG), one |
26 | VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep | 36 | VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG and 667HG), alarms |
27 | warnings (control unimplemented), and some automatic fan regulation | 37 | with beep warnings (control unimplemented), and some automatic fan |
28 | strategies (plus manual fan control mode). | 38 | regulation strategies (plus manual fan control mode). |
29 | 39 | ||
30 | Temperatures are measured in degrees Celsius and measurement resolution is 1 | 40 | Temperatures are measured in degrees Celsius and measurement resolution is 1 |
31 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when | 41 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when |
@@ -54,7 +64,8 @@ follows: | |||
54 | temp1 -> pwm1 | 64 | temp1 -> pwm1 |
55 | temp2 -> pwm2 | 65 | temp2 -> pwm2 |
56 | temp3 -> pwm3 | 66 | temp3 -> pwm3 |
57 | prog -> pwm4 (the programmable setting is not supported by the driver) | 67 | prog -> pwm4 (not on 667HG; the programmable setting is not supported by |
68 | the driver) | ||
58 | 69 | ||
59 | /sys files | 70 | /sys files |
60 | ---------- | 71 | ---------- |
diff --git a/Documentation/i2c/busses/i2c-nforce2 b/Documentation/i2c/busses/i2c-nforce2 index fae3495bcbaf..9698c396b830 100644 --- a/Documentation/i2c/busses/i2c-nforce2 +++ b/Documentation/i2c/busses/i2c-nforce2 | |||
@@ -7,10 +7,14 @@ Supported adapters: | |||
7 | * nForce3 250Gb MCP 10de:00E4 | 7 | * nForce3 250Gb MCP 10de:00E4 |
8 | * nForce4 MCP 10de:0052 | 8 | * nForce4 MCP 10de:0052 |
9 | * nForce4 MCP-04 10de:0034 | 9 | * nForce4 MCP-04 10de:0034 |
10 | * nForce4 MCP51 10de:0264 | 10 | * nForce MCP51 10de:0264 |
11 | * nForce4 MCP55 10de:0368 | 11 | * nForce MCP55 10de:0368 |
12 | * nForce4 MCP61 10de:03EB | 12 | * nForce MCP61 10de:03EB |
13 | * nForce4 MCP65 10de:0446 | 13 | * nForce MCP65 10de:0446 |
14 | * nForce MCP67 10de:0542 | ||
15 | * nForce MCP73 10de:07D8 | ||
16 | * nForce MCP78S 10de:0752 | ||
17 | * nForce MCP79 10de:0AA2 | ||
14 | 18 | ||
15 | Datasheet: not publicly available, but seems to be similar to the | 19 | Datasheet: not publicly available, but seems to be similar to the |
16 | AMD-8111 SMBus 2.0 adapter. | 20 | AMD-8111 SMBus 2.0 adapter. |
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4 index ef1efa79b1df..f889481762b5 100644 --- a/Documentation/i2c/busses/i2c-piix4 +++ b/Documentation/i2c/busses/i2c-piix4 | |||
@@ -4,7 +4,7 @@ Supported adapters: | |||
4 | * Intel 82371AB PIIX4 and PIIX4E | 4 | * Intel 82371AB PIIX4 and PIIX4E |
5 | * Intel 82443MX (440MX) | 5 | * Intel 82443MX (440MX) |
6 | Datasheet: Publicly available at the Intel website | 6 | Datasheet: Publicly available at the Intel website |
7 | * ServerWorks OSB4, CSB5, CSB6 and HT-1000 southbridges | 7 | * ServerWorks OSB4, CSB5, CSB6, HT-1000 and HT-1100 southbridges |
8 | Datasheet: Only available via NDA from ServerWorks | 8 | Datasheet: Only available via NDA from ServerWorks |
9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges | 9 | * ATI IXP200, IXP300, IXP400, SB600, SB700 and SB800 southbridges |
10 | Datasheet: Not publicly available | 10 | Datasheet: Not publicly available |
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices new file mode 100644 index 000000000000..b55ce57a84db --- /dev/null +++ b/Documentation/i2c/instantiating-devices | |||
@@ -0,0 +1,167 @@ | |||
1 | How to instantiate I2C devices | ||
2 | ============================== | ||
3 | |||
4 | Unlike PCI or USB devices, I2C devices are not enumerated at the hardware | ||
5 | level. Instead, the software must know which devices are connected on each | ||
6 | I2C bus segment, and what address these devices are using. For this | ||
7 | reason, the kernel code must instantiate I2C devices explicitly. There are | ||
8 | several ways to achieve this, depending on the context and requirements. | ||
9 | |||
10 | |||
11 | Method 1: Declare the I2C devices by bus number | ||
12 | ----------------------------------------------- | ||
13 | |||
14 | This method is appropriate when the I2C bus is a system bus as is the case | ||
15 | for many embedded systems. On such systems, each I2C bus has a number | ||
16 | which is known in advance. It is thus possible to pre-declare the I2C | ||
17 | devices which live on this bus. This is done with an array of struct | ||
18 | i2c_board_info which is registered by calling i2c_register_board_info(). | ||
19 | |||
20 | Example (from omap2 h4): | ||
21 | |||
22 | static struct i2c_board_info __initdata h4_i2c_board_info[] = { | ||
23 | { | ||
24 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | ||
25 | .irq = OMAP_GPIO_IRQ(125), | ||
26 | }, | ||
27 | { /* EEPROM on mainboard */ | ||
28 | I2C_BOARD_INFO("24c01", 0x52), | ||
29 | .platform_data = &m24c01, | ||
30 | }, | ||
31 | { /* EEPROM on cpu card */ | ||
32 | I2C_BOARD_INFO("24c01", 0x57), | ||
33 | .platform_data = &m24c01, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | static void __init omap_h4_init(void) | ||
38 | { | ||
39 | (...) | ||
40 | i2c_register_board_info(1, h4_i2c_board_info, | ||
41 | ARRAY_SIZE(h4_i2c_board_info)); | ||
42 | (...) | ||
43 | } | ||
44 | |||
45 | The above code declares 3 devices on I2C bus 1, including their respective | ||
46 | addresses and custom data needed by their drivers. When the I2C bus in | ||
47 | question is registered, the I2C devices will be instantiated automatically | ||
48 | by i2c-core. | ||
49 | |||
50 | The devices will be automatically unbound and destroyed when the I2C bus | ||
51 | they sit on goes away (if ever.) | ||
52 | |||
53 | |||
54 | Method 2: Instantiate the devices explicitly | ||
55 | -------------------------------------------- | ||
56 | |||
57 | This method is appropriate when a larger device uses an I2C bus for | ||
58 | internal communication. A typical case is TV adapters. These can have a | ||
59 | tuner, a video decoder, an audio decoder, etc. usually connected to the | ||
60 | main chip by the means of an I2C bus. You won't know the number of the I2C | ||
61 | bus in advance, so the method 1 described above can't be used. Instead, | ||
62 | you can instantiate your I2C devices explicitly. This is done by filling | ||
63 | a struct i2c_board_info and calling i2c_new_device(). | ||
64 | |||
65 | Example (from the sfe4001 network driver): | ||
66 | |||
67 | static struct i2c_board_info sfe4001_hwmon_info = { | ||
68 | I2C_BOARD_INFO("max6647", 0x4e), | ||
69 | }; | ||
70 | |||
71 | int sfe4001_init(struct efx_nic *efx) | ||
72 | { | ||
73 | (...) | ||
74 | efx->board_info.hwmon_client = | ||
75 | i2c_new_device(&efx->i2c_adap, &sfe4001_hwmon_info); | ||
76 | |||
77 | (...) | ||
78 | } | ||
79 | |||
80 | The above code instantiates 1 I2C device on the I2C bus which is on the | ||
81 | network adapter in question. | ||
82 | |||
83 | A variant of this is when you don't know for sure if an I2C device is | ||
84 | present or not (for example for an optional feature which is not present | ||
85 | on cheap variants of a board but you have no way to tell them apart), or | ||
86 | it may have different addresses from one board to the next (manufacturer | ||
87 | changing its design without notice). In this case, you can call | ||
88 | i2c_new_probed_device() instead of i2c_new_device(). | ||
89 | |||
90 | Example (from the pnx4008 OHCI driver): | ||
91 | |||
92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; | ||
93 | |||
94 | static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | ||
95 | { | ||
96 | (...) | ||
97 | struct i2c_adapter *i2c_adap; | ||
98 | struct i2c_board_info i2c_info; | ||
99 | |||
100 | (...) | ||
101 | i2c_adap = i2c_get_adapter(2); | ||
102 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); | ||
103 | strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); | ||
104 | isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, | ||
105 | normal_i2c); | ||
106 | i2c_put_adapter(i2c_adap); | ||
107 | (...) | ||
108 | } | ||
109 | |||
110 | The above code instantiates up to 1 I2C device on the I2C bus which is on | ||
111 | the OHCI adapter in question. It first tries at address 0x2c, if nothing | ||
112 | is found there it tries address 0x2d, and if still nothing is found, it | ||
113 | simply gives up. | ||
114 | |||
115 | The driver which instantiated the I2C device is responsible for destroying | ||
116 | it on cleanup. This is done by calling i2c_unregister_device() on the | ||
117 | pointer that was earlier returned by i2c_new_device() or | ||
118 | i2c_new_probed_device(). | ||
119 | |||
120 | |||
121 | Method 3: Probe an I2C bus for certain devices | ||
122 | ---------------------------------------------- | ||
123 | |||
124 | Sometimes you do not have enough information about an I2C device, not even | ||
125 | to call i2c_new_probed_device(). The typical case is hardware monitoring | ||
126 | chips on PC mainboards. There are several dozen models, which can live | ||
127 | at 25 different addresses. Given the huge number of mainboards out there, | ||
128 | it is next to impossible to build an exhaustive list of the hardware | ||
129 | monitoring chips being used. Fortunately, most of these chips have | ||
130 | manufacturer and device ID registers, so they can be identified by | ||
131 | probing. | ||
132 | |||
133 | In that case, I2C devices are neither declared nor instantiated | ||
134 | explicitly. Instead, i2c-core will probe for such devices as soon as their | ||
135 | drivers are loaded, and if any is found, an I2C device will be | ||
136 | instantiated automatically. In order to prevent any misbehavior of this | ||
137 | mechanism, the following restrictions apply: | ||
138 | * The I2C device driver must implement the detect() method, which | ||
139 | identifies a supported device by reading from arbitrary registers. | ||
140 | * Only buses which are likely to have a supported device and agree to be | ||
141 | probed, will be probed. For example this avoids probing for hardware | ||
142 | monitoring chips on a TV adapter. | ||
143 | |||
144 | Example: | ||
145 | See lm90_driver and lm90_detect() in drivers/hwmon/lm90.c | ||
146 | |||
147 | I2C devices instantiated as a result of such a successful probe will be | ||
148 | destroyed automatically when the driver which detected them is removed, | ||
149 | or when the underlying I2C bus is itself destroyed, whichever happens | ||
150 | first. | ||
151 | |||
152 | Those of you familiar with the i2c subsystem of 2.4 kernels and early 2.6 | ||
153 | kernels will find out that this method 3 is essentially similar to what | ||
154 | was done there. Two significant differences are: | ||
155 | * Probing is only one way to instantiate I2C devices now, while it was the | ||
156 | only way back then. Where possible, methods 1 and 2 should be preferred. | ||
157 | Method 3 should only be used when there is no other way, as it can have | ||
158 | undesirable side effects. | ||
159 | * I2C buses must now explicitly say which I2C driver classes can probe | ||
160 | them (by the means of the class bitfield), while all I2C buses were | ||
161 | probed by default back then. The default is an empty class which means | ||
162 | that no probing happens. The purpose of the class bitfield is to limit | ||
163 | the aforementioned undesirable side effects. | ||
164 | |||
165 | Once again, method 3 should be avoided wherever possible. Explicit device | ||
166 | instantiation (methods 1 and 2) is much preferred for it is safer and | ||
167 | faster. | ||
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 6b9af7d479c2..c1a06f989cf7 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -207,15 +207,26 @@ You simply have to define a detect callback which will attempt to | |||
207 | identify supported devices (returning 0 for supported ones and -ENODEV | 207 | identify supported devices (returning 0 for supported ones and -ENODEV |
208 | for unsupported ones), a list of addresses to probe, and a device type | 208 | for unsupported ones), a list of addresses to probe, and a device type |
209 | (or class) so that only I2C buses which may have that type of device | 209 | (or class) so that only I2C buses which may have that type of device |
210 | connected (and not otherwise enumerated) will be probed. The i2c | 210 | connected (and not otherwise enumerated) will be probed. For example, |
211 | core will then call you back as needed and will instantiate a device | 211 | a driver for a hardware monitoring chip for which auto-detection is |
212 | for you for every successful detection. | 212 | needed would set its class to I2C_CLASS_HWMON, and only I2C adapters |
213 | with a class including I2C_CLASS_HWMON would be probed by this driver. | ||
214 | Note that the absence of matching classes does not prevent the use of | ||
215 | a device of that type on the given I2C adapter. All it prevents is | ||
216 | auto-detection; explicit instantiation of devices is still possible. | ||
213 | 217 | ||
214 | Note that this mechanism is purely optional and not suitable for all | 218 | Note that this mechanism is purely optional and not suitable for all |
215 | devices. You need some reliable way to identify the supported devices | 219 | devices. You need some reliable way to identify the supported devices |
216 | (typically using device-specific, dedicated identification registers), | 220 | (typically using device-specific, dedicated identification registers), |
217 | otherwise misdetections are likely to occur and things can get wrong | 221 | otherwise misdetections are likely to occur and things can get wrong |
218 | quickly. | 222 | quickly. Keep in mind that the I2C protocol doesn't include any |
223 | standard way to detect the presence of a chip at a given address, let | ||
224 | alone a standard way to identify devices. Even worse is the lack of | ||
225 | semantics associated to bus transfers, which means that the same | ||
226 | transfer can be seen as a read operation by a chip and as a write | ||
227 | operation by another chip. For these reasons, explicit device | ||
228 | instantiation should always be preferred to auto-detection where | ||
229 | possible. | ||
219 | 230 | ||
220 | 231 | ||
221 | Device Deletion | 232 | Device Deletion |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index f1d639903325..1f779a25c703 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -122,10 +122,8 @@ Code Seq# Include File Comments | |||
122 | 'c' 00-7F linux/coda.h conflict! | 122 | 'c' 00-7F linux/coda.h conflict! |
123 | 'c' 80-9F arch/s390/include/asm/chsc.h | 123 | 'c' 80-9F arch/s390/include/asm/chsc.h |
124 | 'd' 00-FF linux/char/drm/drm/h conflict! | 124 | 'd' 00-FF linux/char/drm/drm/h conflict! |
125 | 'd' 00-DF linux/video_decoder.h conflict! | ||
126 | 'd' F0-FF linux/digi1.h | 125 | 'd' F0-FF linux/digi1.h |
127 | 'e' all linux/digi1.h conflict! | 126 | 'e' all linux/digi1.h conflict! |
128 | 'e' 00-1F linux/video_encoder.h conflict! | ||
129 | 'e' 00-1F net/irda/irtty.h conflict! | 127 | 'e' 00-1F net/irda/irtty.h conflict! |
130 | 'f' 00-1F linux/ext2_fs.h | 128 | 'f' 00-1F linux/ext2_fs.h |
131 | 'h' 00-7F Charon filesystem | 129 | 'h' 00-7F Charon filesystem |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 1754fedc531c..240257dd4238 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -44,6 +44,7 @@ parameter is applicable: | |||
44 | FB The frame buffer device is enabled. | 44 | FB The frame buffer device is enabled. |
45 | HW Appropriate hardware is enabled. | 45 | HW Appropriate hardware is enabled. |
46 | IA-64 IA-64 architecture is enabled. | 46 | IA-64 IA-64 architecture is enabled. |
47 | IMA Integrity measurement architecture is enabled. | ||
47 | IOSCHED More than one I/O scheduler is enabled. | 48 | IOSCHED More than one I/O scheduler is enabled. |
48 | IP_PNP IP DHCP, BOOTP, or RARP is enabled. | 49 | IP_PNP IP DHCP, BOOTP, or RARP is enabled. |
49 | ISAPNP ISA PnP code is enabled. | 50 | ISAPNP ISA PnP code is enabled. |
@@ -491,11 +492,23 @@ and is between 256 and 4096 characters. It is defined in the file | |||
491 | Range: 0 - 8192 | 492 | Range: 0 - 8192 |
492 | Default: 64 | 493 | Default: 64 |
493 | 494 | ||
495 | dma_debug=off If the kernel is compiled with DMA_API_DEBUG support | ||
496 | this option disables the debugging code at boot. | ||
497 | |||
498 | dma_debug_entries=<number> | ||
499 | This option allows to tune the number of preallocated | ||
500 | entries for DMA-API debugging code. One entry is | ||
501 | required per DMA-API allocation. Use this if the | ||
502 | DMA-API debugging code disables itself because the | ||
503 | architectural default is too low. | ||
504 | |||
494 | hpet= [X86-32,HPET] option to control HPET usage | 505 | hpet= [X86-32,HPET] option to control HPET usage |
495 | Format: { enable (default) | disable | force } | 506 | Format: { enable (default) | disable | force | |
507 | verbose } | ||
496 | disable: disable HPET and use PIT instead | 508 | disable: disable HPET and use PIT instead |
497 | force: allow force enabled of undocumented chips (ICH4, | 509 | force: allow force enabled of undocumented chips (ICH4, |
498 | VIA, nVidia) | 510 | VIA, nVidia) |
511 | verbose: show contents of HPET registers during setup | ||
499 | 512 | ||
500 | com20020= [HW,NET] ARCnet - COM20020 chipset | 513 | com20020= [HW,NET] ARCnet - COM20020 chipset |
501 | Format: | 514 | Format: |
@@ -829,6 +842,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
829 | 842 | ||
830 | hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) | 843 | hvc_iucv= [S390] Number of z/VM IUCV hypervisor console (HVC) |
831 | terminal devices. Valid values: 0..8 | 844 | terminal devices. Valid values: 0..8 |
845 | hvc_iucv_allow= [S390] Comma-separated list of z/VM user IDs. | ||
846 | If specified, z/VM IUCV HVC accepts connections | ||
847 | from listed z/VM user IDs only. | ||
848 | |||
849 | i2c_bus= [HW] Override the default board specific I2C bus speed | ||
850 | or register an additional I2C bus that is not | ||
851 | registered from board initialization code. | ||
852 | Format: | ||
853 | <bus_id>,<clkrate> | ||
832 | 854 | ||
833 | i8042.debug [HW] Toggle i8042 debug mode | 855 | i8042.debug [HW] Toggle i8042 debug mode |
834 | i8042.direct [HW] Put keyboard port into non-translated mode | 856 | i8042.direct [HW] Put keyboard port into non-translated mode |
@@ -902,6 +924,15 @@ and is between 256 and 4096 characters. It is defined in the file | |||
902 | ihash_entries= [KNL] | 924 | ihash_entries= [KNL] |
903 | Set number of hash buckets for inode cache. | 925 | Set number of hash buckets for inode cache. |
904 | 926 | ||
927 | ima_audit= [IMA] | ||
928 | Format: { "0" | "1" } | ||
929 | 0 -- integrity auditing messages. (Default) | ||
930 | 1 -- enable informational integrity auditing messages. | ||
931 | |||
932 | ima_hash= [IMA] | ||
933 | Formt: { "sha1" | "md5" } | ||
934 | default: "sha1" | ||
935 | |||
905 | in2000= [HW,SCSI] | 936 | in2000= [HW,SCSI] |
906 | See header of drivers/scsi/in2000.c. | 937 | See header of drivers/scsi/in2000.c. |
907 | 938 | ||
@@ -1310,8 +1341,13 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1310 | 1341 | ||
1311 | memtest= [KNL,X86] Enable memtest | 1342 | memtest= [KNL,X86] Enable memtest |
1312 | Format: <integer> | 1343 | Format: <integer> |
1313 | range: 0,4 : pattern number | ||
1314 | default : 0 <disable> | 1344 | default : 0 <disable> |
1345 | Specifies the number of memtest passes to be | ||
1346 | performed. Each pass selects another test | ||
1347 | pattern from a given set of patterns. Memtest | ||
1348 | fills the memory with this pattern, validates | ||
1349 | memory contents and reserves bad memory | ||
1350 | regions that are detected. | ||
1315 | 1351 | ||
1316 | meye.*= [HW] Set MotionEye Camera parameters | 1352 | meye.*= [HW] Set MotionEye Camera parameters |
1317 | See Documentation/video4linux/meye.txt. | 1353 | See Documentation/video4linux/meye.txt. |
@@ -1827,11 +1863,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1827 | autoconfiguration. | 1863 | autoconfiguration. |
1828 | Ranges are in pairs (memory base and size). | 1864 | Ranges are in pairs (memory base and size). |
1829 | 1865 | ||
1830 | dynamic_printk Enables pr_debug()/dev_dbg() calls if | ||
1831 | CONFIG_DYNAMIC_PRINTK_DEBUG has been enabled. | ||
1832 | These can also be switched on/off via | ||
1833 | <debugfs>/dynamic_printk/modules | ||
1834 | |||
1835 | print-fatal-signals= | 1866 | print-fatal-signals= |
1836 | [KNL] debug: print fatal signals | 1867 | [KNL] debug: print fatal signals |
1837 | print-fatal-signals=1: print segfault info to | 1868 | print-fatal-signals=1: print segfault info to |
@@ -2020,15 +2051,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2020 | If enabled at boot time, /selinux/disable can be used | 2051 | If enabled at boot time, /selinux/disable can be used |
2021 | later to disable prior to initial policy load. | 2052 | later to disable prior to initial policy load. |
2022 | 2053 | ||
2023 | selinux_compat_net = | ||
2024 | [SELINUX] Set initial selinux_compat_net flag value. | ||
2025 | Format: { "0" | "1" } | ||
2026 | 0 -- use new secmark-based packet controls | ||
2027 | 1 -- use legacy packet controls | ||
2028 | Default value is 0 (preferred). | ||
2029 | Value can be changed at runtime via | ||
2030 | /selinux/compat_net. | ||
2031 | |||
2032 | serialnumber [BUGS=X86-32] | 2054 | serialnumber [BUGS=X86-32] |
2033 | 2055 | ||
2034 | shapers= [NET] | 2056 | shapers= [NET] |
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index f2dbbf3bdeab..d36fcc0f2715 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -1630,6 +1630,13 @@ static bool service_io(struct device *dev) | |||
1630 | } | 1630 | } |
1631 | } | 1631 | } |
1632 | 1632 | ||
1633 | /* OK, so we noted that it was pretty poor to use an fdatasync as a | ||
1634 | * barrier. But Christoph Hellwig points out that we need a sync | ||
1635 | * *afterwards* as well: "Barriers specify no reordering to the front | ||
1636 | * or the back." And Jens Axboe confirmed it, so here we are: */ | ||
1637 | if (out->type & VIRTIO_BLK_T_BARRIER) | ||
1638 | fdatasync(vblk->fd); | ||
1639 | |||
1633 | /* We can't trigger an IRQ, because we're not the Launcher. It does | 1640 | /* We can't trigger an IRQ, because we're not the Launcher. It does |
1634 | * that when we tell it we're done. */ | 1641 | * that when we tell it we're done. */ |
1635 | add_used(dev->vq, head, wlen); | 1642 | add_used(dev->vq, head, wlen); |
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt index 488773018152..938ea22f2cc0 100644 --- a/Documentation/lockdep-design.txt +++ b/Documentation/lockdep-design.txt | |||
@@ -27,33 +27,37 @@ lock-class. | |||
27 | State | 27 | State |
28 | ----- | 28 | ----- |
29 | 29 | ||
30 | The validator tracks lock-class usage history into 5 separate state bits: | 30 | The validator tracks lock-class usage history into 4n + 1 separate state bits: |
31 | 31 | ||
32 | - 'ever held in hardirq context' [ == hardirq-safe ] | 32 | - 'ever held in STATE context' |
33 | - 'ever held in softirq context' [ == softirq-safe ] | 33 | - 'ever head as readlock in STATE context' |
34 | - 'ever held with hardirqs enabled' [ == hardirq-unsafe ] | 34 | - 'ever head with STATE enabled' |
35 | - 'ever held with softirqs and hardirqs enabled' [ == softirq-unsafe ] | 35 | - 'ever head as readlock with STATE enabled' |
36 | |||
37 | Where STATE can be either one of (kernel/lockdep_states.h) | ||
38 | - hardirq | ||
39 | - softirq | ||
40 | - reclaim_fs | ||
36 | 41 | ||
37 | - 'ever used' [ == !unused ] | 42 | - 'ever used' [ == !unused ] |
38 | 43 | ||
39 | When locking rules are violated, these 4 state bits are presented in the | 44 | When locking rules are violated, these state bits are presented in the |
40 | locking error messages, inside curlies. A contrived example: | 45 | locking error messages, inside curlies. A contrived example: |
41 | 46 | ||
42 | modprobe/2287 is trying to acquire lock: | 47 | modprobe/2287 is trying to acquire lock: |
43 | (&sio_locks[i].lock){--..}, at: [<c02867fd>] mutex_lock+0x21/0x24 | 48 | (&sio_locks[i].lock){-.-...}, at: [<c02867fd>] mutex_lock+0x21/0x24 |
44 | 49 | ||
45 | but task is already holding lock: | 50 | but task is already holding lock: |
46 | (&sio_locks[i].lock){--..}, at: [<c02867fd>] mutex_lock+0x21/0x24 | 51 | (&sio_locks[i].lock){-.-...}, at: [<c02867fd>] mutex_lock+0x21/0x24 |
47 | 52 | ||
48 | 53 | ||
49 | The bit position indicates hardirq, softirq, hardirq-read, | 54 | The bit position indicates STATE, STATE-read, for each of the states listed |
50 | softirq-read respectively, and the character displayed in each | 55 | above, and the character displayed in each indicates: |
51 | indicates: | ||
52 | 56 | ||
53 | '.' acquired while irqs disabled | 57 | '.' acquired while irqs disabled |
54 | '+' acquired in irq context | 58 | '+' acquired in irq context |
55 | '-' acquired with irqs enabled | 59 | '-' acquired with irqs enabled |
56 | '?' read acquired in irq context with irqs enabled. | 60 | '?' acquired in irq context with irqs enabled. |
57 | 61 | ||
58 | Unused mutexes cannot be part of the cause of an error. | 62 | Unused mutexes cannot be part of the cause of an error. |
59 | 63 | ||
diff --git a/Documentation/misc-devices/isl29003 b/Documentation/misc-devices/isl29003 new file mode 100644 index 000000000000..c4ff5f38e010 --- /dev/null +++ b/Documentation/misc-devices/isl29003 | |||
@@ -0,0 +1,62 @@ | |||
1 | Kernel driver isl29003 | ||
2 | ===================== | ||
3 | |||
4 | Supported chips: | ||
5 | * Intersil ISL29003 | ||
6 | Prefix: 'isl29003' | ||
7 | Addresses scanned: none | ||
8 | Datasheet: | ||
9 | http://www.intersil.com/data/fn/fn7464.pdf | ||
10 | |||
11 | Author: Daniel Mack <daniel@caiaq.de> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | The ISL29003 is an integrated light sensor with a 16-bit integrating type | ||
17 | ADC, I2C user programmable lux range select for optimized counts/lux, and | ||
18 | I2C multi-function control and monitoring capabilities. The internal ADC | ||
19 | provides 16-bit resolution while rejecting 50Hz and 60Hz flicker caused by | ||
20 | artificial light sources. | ||
21 | |||
22 | The driver allows to set the lux range, the bit resolution, the operational | ||
23 | mode (see below) and the power state of device and can read the current lux | ||
24 | value, of course. | ||
25 | |||
26 | |||
27 | Detection | ||
28 | --------- | ||
29 | |||
30 | The ISL29003 does not have an ID register which could be used to identify | ||
31 | it, so the detection routine will just try to read from the configured I2C | ||
32 | addess and consider the device to be present as soon as it ACKs the | ||
33 | transfer. | ||
34 | |||
35 | |||
36 | Sysfs entries | ||
37 | ------------- | ||
38 | |||
39 | range: | ||
40 | 0: 0 lux to 1000 lux (default) | ||
41 | 1: 0 lux to 4000 lux | ||
42 | 2: 0 lux to 16,000 lux | ||
43 | 3: 0 lux to 64,000 lux | ||
44 | |||
45 | resolution: | ||
46 | 0: 2^16 cycles (default) | ||
47 | 1: 2^12 cycles | ||
48 | 2: 2^8 cycles | ||
49 | 3: 2^4 cycles | ||
50 | |||
51 | mode: | ||
52 | 0: diode1's current (unsigned 16bit) (default) | ||
53 | 1: diode1's current (unsigned 16bit) | ||
54 | 2: difference between diodes (l1 - l2, signed 15bit) | ||
55 | |||
56 | power_state: | ||
57 | 0: device is disabled (default) | ||
58 | 1: device is enabled | ||
59 | |||
60 | lux (read only): | ||
61 | returns the value from the last sensor reading | ||
62 | |||
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 7a3bb1abb830..b132e4a3cf0f 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -141,7 +141,8 @@ rx_ccid = 2 | |||
141 | Default CCID for the receiver-sender half-connection; see tx_ccid. | 141 | Default CCID for the receiver-sender half-connection; see tx_ccid. |
142 | 142 | ||
143 | seq_window = 100 | 143 | seq_window = 100 |
144 | The initial sequence window (sec. 7.5.2). | 144 | The initial sequence window (sec. 7.5.2) of the sender. This influences |
145 | the local ackno validity and the remote seqno validity windows (7.5.1). | ||
145 | 146 | ||
146 | tx_qlen = 5 | 147 | tx_qlen = 5 |
147 | The size of the transmit buffer in packets. A value of 0 corresponds | 148 | The size of the transmit buffer in packets. A value of 0 corresponds |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index c7712787933c..ec5de02f543f 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | ip_forward - BOOLEAN | 3 | ip_forward - BOOLEAN |
4 | 0 - disabled (default) | 4 | 0 - disabled (default) |
5 | not 0 - enabled | 5 | not 0 - enabled |
6 | 6 | ||
7 | Forward Packets between interfaces. | 7 | Forward Packets between interfaces. |
8 | 8 | ||
@@ -36,49 +36,49 @@ rt_cache_rebuild_count - INTEGER | |||
36 | IP Fragmentation: | 36 | IP Fragmentation: |
37 | 37 | ||
38 | ipfrag_high_thresh - INTEGER | 38 | ipfrag_high_thresh - INTEGER |
39 | Maximum memory used to reassemble IP fragments. When | 39 | Maximum memory used to reassemble IP fragments. When |
40 | ipfrag_high_thresh bytes of memory is allocated for this purpose, | 40 | ipfrag_high_thresh bytes of memory is allocated for this purpose, |
41 | the fragment handler will toss packets until ipfrag_low_thresh | 41 | the fragment handler will toss packets until ipfrag_low_thresh |
42 | is reached. | 42 | is reached. |
43 | 43 | ||
44 | ipfrag_low_thresh - INTEGER | 44 | ipfrag_low_thresh - INTEGER |
45 | See ipfrag_high_thresh | 45 | See ipfrag_high_thresh |
46 | 46 | ||
47 | ipfrag_time - INTEGER | 47 | ipfrag_time - INTEGER |
48 | Time in seconds to keep an IP fragment in memory. | 48 | Time in seconds to keep an IP fragment in memory. |
49 | 49 | ||
50 | ipfrag_secret_interval - INTEGER | 50 | ipfrag_secret_interval - INTEGER |
51 | Regeneration interval (in seconds) of the hash secret (or lifetime | 51 | Regeneration interval (in seconds) of the hash secret (or lifetime |
52 | for the hash secret) for IP fragments. | 52 | for the hash secret) for IP fragments. |
53 | Default: 600 | 53 | Default: 600 |
54 | 54 | ||
55 | ipfrag_max_dist - INTEGER | 55 | ipfrag_max_dist - INTEGER |
56 | ipfrag_max_dist is a non-negative integer value which defines the | 56 | ipfrag_max_dist is a non-negative integer value which defines the |
57 | maximum "disorder" which is allowed among fragments which share a | 57 | maximum "disorder" which is allowed among fragments which share a |
58 | common IP source address. Note that reordering of packets is | 58 | common IP source address. Note that reordering of packets is |
59 | not unusual, but if a large number of fragments arrive from a source | 59 | not unusual, but if a large number of fragments arrive from a source |
60 | IP address while a particular fragment queue remains incomplete, it | 60 | IP address while a particular fragment queue remains incomplete, it |
61 | probably indicates that one or more fragments belonging to that queue | 61 | probably indicates that one or more fragments belonging to that queue |
62 | have been lost. When ipfrag_max_dist is positive, an additional check | 62 | have been lost. When ipfrag_max_dist is positive, an additional check |
63 | is done on fragments before they are added to a reassembly queue - if | 63 | is done on fragments before they are added to a reassembly queue - if |
64 | ipfrag_max_dist (or more) fragments have arrived from a particular IP | 64 | ipfrag_max_dist (or more) fragments have arrived from a particular IP |
65 | address between additions to any IP fragment queue using that source | 65 | address between additions to any IP fragment queue using that source |
66 | address, it's presumed that one or more fragments in the queue are | 66 | address, it's presumed that one or more fragments in the queue are |
67 | lost. The existing fragment queue will be dropped, and a new one | 67 | lost. The existing fragment queue will be dropped, and a new one |
68 | started. An ipfrag_max_dist value of zero disables this check. | 68 | started. An ipfrag_max_dist value of zero disables this check. |
69 | 69 | ||
70 | Using a very small value, e.g. 1 or 2, for ipfrag_max_dist can | 70 | Using a very small value, e.g. 1 or 2, for ipfrag_max_dist can |
71 | result in unnecessarily dropping fragment queues when normal | 71 | result in unnecessarily dropping fragment queues when normal |
72 | reordering of packets occurs, which could lead to poor application | 72 | reordering of packets occurs, which could lead to poor application |
73 | performance. Using a very large value, e.g. 50000, increases the | 73 | performance. Using a very large value, e.g. 50000, increases the |
74 | likelihood of incorrectly reassembling IP fragments that originate | 74 | likelihood of incorrectly reassembling IP fragments that originate |
75 | from different IP datagrams, which could result in data corruption. | 75 | from different IP datagrams, which could result in data corruption. |
76 | Default: 64 | 76 | Default: 64 |
77 | 77 | ||
78 | INET peer storage: | 78 | INET peer storage: |
79 | 79 | ||
80 | inet_peer_threshold - INTEGER | 80 | inet_peer_threshold - INTEGER |
81 | The approximate size of the storage. Starting from this threshold | 81 | The approximate size of the storage. Starting from this threshold |
82 | entries will be thrown aggressively. This threshold also determines | 82 | entries will be thrown aggressively. This threshold also determines |
83 | entries' time-to-live and time intervals between garbage collection | 83 | entries' time-to-live and time intervals between garbage collection |
84 | passes. More entries, less time-to-live, less GC interval. | 84 | passes. More entries, less time-to-live, less GC interval. |
@@ -105,7 +105,7 @@ inet_peer_gc_maxtime - INTEGER | |||
105 | in effect under low (or absent) memory pressure on the pool. | 105 | in effect under low (or absent) memory pressure on the pool. |
106 | Measured in seconds. | 106 | Measured in seconds. |
107 | 107 | ||
108 | TCP variables: | 108 | TCP variables: |
109 | 109 | ||
110 | somaxconn - INTEGER | 110 | somaxconn - INTEGER |
111 | Limit of socket listen() backlog, known in userspace as SOMAXCONN. | 111 | Limit of socket listen() backlog, known in userspace as SOMAXCONN. |
@@ -310,7 +310,7 @@ tcp_orphan_retries - INTEGER | |||
310 | 310 | ||
311 | tcp_reordering - INTEGER | 311 | tcp_reordering - INTEGER |
312 | Maximal reordering of packets in a TCP stream. | 312 | Maximal reordering of packets in a TCP stream. |
313 | Default: 3 | 313 | Default: 3 |
314 | 314 | ||
315 | tcp_retrans_collapse - BOOLEAN | 315 | tcp_retrans_collapse - BOOLEAN |
316 | Bug-to-bug compatibility with some broken printers. | 316 | Bug-to-bug compatibility with some broken printers. |
@@ -521,7 +521,7 @@ IP Variables: | |||
521 | 521 | ||
522 | ip_local_port_range - 2 INTEGERS | 522 | ip_local_port_range - 2 INTEGERS |
523 | Defines the local port range that is used by TCP and UDP to | 523 | Defines the local port range that is used by TCP and UDP to |
524 | choose the local port. The first number is the first, the | 524 | choose the local port. The first number is the first, the |
525 | second the last local port number. Default value depends on | 525 | second the last local port number. Default value depends on |
526 | amount of memory available on the system: | 526 | amount of memory available on the system: |
527 | > 128Mb 32768-61000 | 527 | > 128Mb 32768-61000 |
@@ -594,12 +594,12 @@ icmp_errors_use_inbound_ifaddr - BOOLEAN | |||
594 | 594 | ||
595 | If zero, icmp error messages are sent with the primary address of | 595 | If zero, icmp error messages are sent with the primary address of |
596 | the exiting interface. | 596 | the exiting interface. |
597 | 597 | ||
598 | If non-zero, the message will be sent with the primary address of | 598 | If non-zero, the message will be sent with the primary address of |
599 | the interface that received the packet that caused the icmp error. | 599 | the interface that received the packet that caused the icmp error. |
600 | This is the behaviour network many administrators will expect from | 600 | This is the behaviour network many administrators will expect from |
601 | a router. And it can make debugging complicated network layouts | 601 | a router. And it can make debugging complicated network layouts |
602 | much easier. | 602 | much easier. |
603 | 603 | ||
604 | Note that if no primary address exists for the interface selected, | 604 | Note that if no primary address exists for the interface selected, |
605 | then the primary address of the first non-loopback interface that | 605 | then the primary address of the first non-loopback interface that |
@@ -611,7 +611,7 @@ igmp_max_memberships - INTEGER | |||
611 | Change the maximum number of multicast groups we can subscribe to. | 611 | Change the maximum number of multicast groups we can subscribe to. |
612 | Default: 20 | 612 | Default: 20 |
613 | 613 | ||
614 | conf/interface/* changes special settings per interface (where "interface" is | 614 | conf/interface/* changes special settings per interface (where "interface" is |
615 | the name of your network interface) | 615 | the name of your network interface) |
616 | conf/all/* is special, changes the settings for all interfaces | 616 | conf/all/* is special, changes the settings for all interfaces |
617 | 617 | ||
@@ -625,11 +625,11 @@ log_martians - BOOLEAN | |||
625 | accept_redirects - BOOLEAN | 625 | accept_redirects - BOOLEAN |
626 | Accept ICMP redirect messages. | 626 | Accept ICMP redirect messages. |
627 | accept_redirects for the interface will be enabled if: | 627 | accept_redirects for the interface will be enabled if: |
628 | - both conf/{all,interface}/accept_redirects are TRUE in the case forwarding | 628 | - both conf/{all,interface}/accept_redirects are TRUE in the case |
629 | for the interface is enabled | 629 | forwarding for the interface is enabled |
630 | or | 630 | or |
631 | - at least one of conf/{all,interface}/accept_redirects is TRUE in the case | 631 | - at least one of conf/{all,interface}/accept_redirects is TRUE in the |
632 | forwarding for the interface is disabled | 632 | case forwarding for the interface is disabled |
633 | accept_redirects for the interface will be disabled otherwise | 633 | accept_redirects for the interface will be disabled otherwise |
634 | default TRUE (host) | 634 | default TRUE (host) |
635 | FALSE (router) | 635 | FALSE (router) |
@@ -640,8 +640,8 @@ forwarding - BOOLEAN | |||
640 | mc_forwarding - BOOLEAN | 640 | mc_forwarding - BOOLEAN |
641 | Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE | 641 | Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE |
642 | and a multicast routing daemon is required. | 642 | and a multicast routing daemon is required. |
643 | conf/all/mc_forwarding must also be set to TRUE to enable multicast routing | 643 | conf/all/mc_forwarding must also be set to TRUE to enable multicast |
644 | for the interface | 644 | routing for the interface |
645 | 645 | ||
646 | medium_id - INTEGER | 646 | medium_id - INTEGER |
647 | Integer value used to differentiate the devices by the medium they | 647 | Integer value used to differentiate the devices by the medium they |
@@ -649,7 +649,7 @@ medium_id - INTEGER | |||
649 | the broadcast packets are received only on one of them. | 649 | the broadcast packets are received only on one of them. |
650 | The default value 0 means that the device is the only interface | 650 | The default value 0 means that the device is the only interface |
651 | to its medium, value of -1 means that medium is not known. | 651 | to its medium, value of -1 means that medium is not known. |
652 | 652 | ||
653 | Currently, it is used to change the proxy_arp behavior: | 653 | Currently, it is used to change the proxy_arp behavior: |
654 | the proxy_arp feature is enabled for packets forwarded between | 654 | the proxy_arp feature is enabled for packets forwarded between |
655 | two devices attached to different media. | 655 | two devices attached to different media. |
@@ -699,16 +699,22 @@ accept_source_route - BOOLEAN | |||
699 | default TRUE (router) | 699 | default TRUE (router) |
700 | FALSE (host) | 700 | FALSE (host) |
701 | 701 | ||
702 | rp_filter - BOOLEAN | 702 | rp_filter - INTEGER |
703 | 1 - do source validation by reversed path, as specified in RFC1812 | ||
704 | Recommended option for single homed hosts and stub network | ||
705 | routers. Could cause troubles for complicated (not loop free) | ||
706 | networks running a slow unreliable protocol (sort of RIP), | ||
707 | or using static routes. | ||
708 | |||
709 | 0 - No source validation. | 703 | 0 - No source validation. |
710 | 704 | 1 - Strict mode as defined in RFC3704 Strict Reverse Path | |
711 | conf/all/rp_filter must also be set to TRUE to do source validation | 705 | Each incoming packet is tested against the FIB and if the interface |
706 | is not the best reverse path the packet check will fail. | ||
707 | By default failed packets are discarded. | ||
708 | 2 - Loose mode as defined in RFC3704 Loose Reverse Path | ||
709 | Each incoming packet's source address is also tested against the FIB | ||
710 | and if the source address is not reachable via any interface | ||
711 | the packet check will fail. | ||
712 | |||
713 | Current recommended practice in RFC3704 is to enable strict mode | ||
714 | to prevent IP spoofing from DDos attacks. If using asymmetric routing | ||
715 | or other complicated routing, then loose mode is recommended. | ||
716 | |||
717 | conf/all/rp_filter must also be set to non-zero to do source validation | ||
712 | on the interface | 718 | on the interface |
713 | 719 | ||
714 | Default value is 0. Note that some distributions enable it | 720 | Default value is 0. Note that some distributions enable it |
@@ -782,6 +788,12 @@ arp_ignore - INTEGER | |||
782 | The max value from conf/{all,interface}/arp_ignore is used | 788 | The max value from conf/{all,interface}/arp_ignore is used |
783 | when ARP request is received on the {interface} | 789 | when ARP request is received on the {interface} |
784 | 790 | ||
791 | arp_notify - BOOLEAN | ||
792 | Define mode for notification of address and device changes. | ||
793 | 0 - (default): do nothing | ||
794 | 1 - Generate gratuitous arp replies when device is brought up | ||
795 | or hardware address changes. | ||
796 | |||
785 | arp_accept - BOOLEAN | 797 | arp_accept - BOOLEAN |
786 | Define behavior when gratuitous arp replies are received: | 798 | Define behavior when gratuitous arp replies are received: |
787 | 0 - drop gratuitous arp frames | 799 | 0 - drop gratuitous arp frames |
@@ -823,7 +835,7 @@ apply to IPv6 [XXX?]. | |||
823 | 835 | ||
824 | bindv6only - BOOLEAN | 836 | bindv6only - BOOLEAN |
825 | Default value for IPV6_V6ONLY socket option, | 837 | Default value for IPV6_V6ONLY socket option, |
826 | which restricts use of the IPv6 socket to IPv6 communication | 838 | which restricts use of the IPv6 socket to IPv6 communication |
827 | only. | 839 | only. |
828 | TRUE: disable IPv4-mapped address feature | 840 | TRUE: disable IPv4-mapped address feature |
829 | FALSE: enable IPv4-mapped address feature | 841 | FALSE: enable IPv4-mapped address feature |
@@ -833,19 +845,19 @@ bindv6only - BOOLEAN | |||
833 | IPv6 Fragmentation: | 845 | IPv6 Fragmentation: |
834 | 846 | ||
835 | ip6frag_high_thresh - INTEGER | 847 | ip6frag_high_thresh - INTEGER |
836 | Maximum memory used to reassemble IPv6 fragments. When | 848 | Maximum memory used to reassemble IPv6 fragments. When |
837 | ip6frag_high_thresh bytes of memory is allocated for this purpose, | 849 | ip6frag_high_thresh bytes of memory is allocated for this purpose, |
838 | the fragment handler will toss packets until ip6frag_low_thresh | 850 | the fragment handler will toss packets until ip6frag_low_thresh |
839 | is reached. | 851 | is reached. |
840 | 852 | ||
841 | ip6frag_low_thresh - INTEGER | 853 | ip6frag_low_thresh - INTEGER |
842 | See ip6frag_high_thresh | 854 | See ip6frag_high_thresh |
843 | 855 | ||
844 | ip6frag_time - INTEGER | 856 | ip6frag_time - INTEGER |
845 | Time in seconds to keep an IPv6 fragment in memory. | 857 | Time in seconds to keep an IPv6 fragment in memory. |
846 | 858 | ||
847 | ip6frag_secret_interval - INTEGER | 859 | ip6frag_secret_interval - INTEGER |
848 | Regeneration interval (in seconds) of the hash secret (or lifetime | 860 | Regeneration interval (in seconds) of the hash secret (or lifetime |
849 | for the hash secret) for IPv6 fragments. | 861 | for the hash secret) for IPv6 fragments. |
850 | Default: 600 | 862 | Default: 600 |
851 | 863 | ||
@@ -854,17 +866,17 @@ conf/default/*: | |||
854 | 866 | ||
855 | 867 | ||
856 | conf/all/*: | 868 | conf/all/*: |
857 | Change all the interface-specific settings. | 869 | Change all the interface-specific settings. |
858 | 870 | ||
859 | [XXX: Other special features than forwarding?] | 871 | [XXX: Other special features than forwarding?] |
860 | 872 | ||
861 | conf/all/forwarding - BOOLEAN | 873 | conf/all/forwarding - BOOLEAN |
862 | Enable global IPv6 forwarding between all interfaces. | 874 | Enable global IPv6 forwarding between all interfaces. |
863 | 875 | ||
864 | IPv4 and IPv6 work differently here; e.g. netfilter must be used | 876 | IPv4 and IPv6 work differently here; e.g. netfilter must be used |
865 | to control which interfaces may forward packets and which not. | 877 | to control which interfaces may forward packets and which not. |
866 | 878 | ||
867 | This also sets all interfaces' Host/Router setting | 879 | This also sets all interfaces' Host/Router setting |
868 | 'forwarding' to the specified value. See below for details. | 880 | 'forwarding' to the specified value. See below for details. |
869 | 881 | ||
870 | This referred to as global forwarding. | 882 | This referred to as global forwarding. |
@@ -875,12 +887,12 @@ proxy_ndp - BOOLEAN | |||
875 | conf/interface/*: | 887 | conf/interface/*: |
876 | Change special settings per interface. | 888 | Change special settings per interface. |
877 | 889 | ||
878 | The functional behaviour for certain settings is different | 890 | The functional behaviour for certain settings is different |
879 | depending on whether local forwarding is enabled or not. | 891 | depending on whether local forwarding is enabled or not. |
880 | 892 | ||
881 | accept_ra - BOOLEAN | 893 | accept_ra - BOOLEAN |
882 | Accept Router Advertisements; autoconfigure using them. | 894 | Accept Router Advertisements; autoconfigure using them. |
883 | 895 | ||
884 | Functional default: enabled if local forwarding is disabled. | 896 | Functional default: enabled if local forwarding is disabled. |
885 | disabled if local forwarding is enabled. | 897 | disabled if local forwarding is enabled. |
886 | 898 | ||
@@ -926,7 +938,7 @@ accept_source_route - INTEGER | |||
926 | Default: 0 | 938 | Default: 0 |
927 | 939 | ||
928 | autoconf - BOOLEAN | 940 | autoconf - BOOLEAN |
929 | Autoconfigure addresses using Prefix Information in Router | 941 | Autoconfigure addresses using Prefix Information in Router |
930 | Advertisements. | 942 | Advertisements. |
931 | 943 | ||
932 | Functional default: enabled if accept_ra_pinfo is enabled. | 944 | Functional default: enabled if accept_ra_pinfo is enabled. |
@@ -935,11 +947,11 @@ autoconf - BOOLEAN | |||
935 | dad_transmits - INTEGER | 947 | dad_transmits - INTEGER |
936 | The amount of Duplicate Address Detection probes to send. | 948 | The amount of Duplicate Address Detection probes to send. |
937 | Default: 1 | 949 | Default: 1 |
938 | 950 | ||
939 | forwarding - BOOLEAN | 951 | forwarding - BOOLEAN |
940 | Configure interface-specific Host/Router behaviour. | 952 | Configure interface-specific Host/Router behaviour. |
941 | 953 | ||
942 | Note: It is recommended to have the same setting on all | 954 | Note: It is recommended to have the same setting on all |
943 | interfaces; mixed router/host scenarios are rather uncommon. | 955 | interfaces; mixed router/host scenarios are rather uncommon. |
944 | 956 | ||
945 | FALSE: | 957 | FALSE: |
@@ -948,13 +960,13 @@ forwarding - BOOLEAN | |||
948 | 960 | ||
949 | 1. IsRouter flag is not set in Neighbour Advertisements. | 961 | 1. IsRouter flag is not set in Neighbour Advertisements. |
950 | 2. Router Solicitations are being sent when necessary. | 962 | 2. Router Solicitations are being sent when necessary. |
951 | 3. If accept_ra is TRUE (default), accept Router | 963 | 3. If accept_ra is TRUE (default), accept Router |
952 | Advertisements (and do autoconfiguration). | 964 | Advertisements (and do autoconfiguration). |
953 | 4. If accept_redirects is TRUE (default), accept Redirects. | 965 | 4. If accept_redirects is TRUE (default), accept Redirects. |
954 | 966 | ||
955 | TRUE: | 967 | TRUE: |
956 | 968 | ||
957 | If local forwarding is enabled, Router behaviour is assumed. | 969 | If local forwarding is enabled, Router behaviour is assumed. |
958 | This means exactly the reverse from the above: | 970 | This means exactly the reverse from the above: |
959 | 971 | ||
960 | 1. IsRouter flag is set in Neighbour Advertisements. | 972 | 1. IsRouter flag is set in Neighbour Advertisements. |
@@ -989,7 +1001,7 @@ router_solicitation_interval - INTEGER | |||
989 | Default: 4 | 1001 | Default: 4 |
990 | 1002 | ||
991 | router_solicitations - INTEGER | 1003 | router_solicitations - INTEGER |
992 | Number of Router Solicitations to send until assuming no | 1004 | Number of Router Solicitations to send until assuming no |
993 | routers are present. | 1005 | routers are present. |
994 | Default: 3 | 1006 | Default: 3 |
995 | 1007 | ||
@@ -1013,11 +1025,11 @@ temp_prefered_lft - INTEGER | |||
1013 | 1025 | ||
1014 | max_desync_factor - INTEGER | 1026 | max_desync_factor - INTEGER |
1015 | Maximum value for DESYNC_FACTOR, which is a random value | 1027 | Maximum value for DESYNC_FACTOR, which is a random value |
1016 | that ensures that clients don't synchronize with each | 1028 | that ensures that clients don't synchronize with each |
1017 | other and generate new addresses at exactly the same time. | 1029 | other and generate new addresses at exactly the same time. |
1018 | value is in seconds. | 1030 | value is in seconds. |
1019 | Default: 600 | 1031 | Default: 600 |
1020 | 1032 | ||
1021 | regen_max_retry - INTEGER | 1033 | regen_max_retry - INTEGER |
1022 | Number of attempts before give up attempting to generate | 1034 | Number of attempts before give up attempting to generate |
1023 | valid temporary addresses. | 1035 | valid temporary addresses. |
@@ -1025,13 +1037,15 @@ regen_max_retry - INTEGER | |||
1025 | 1037 | ||
1026 | max_addresses - INTEGER | 1038 | max_addresses - INTEGER |
1027 | Number of maximum addresses per interface. 0 disables limitation. | 1039 | Number of maximum addresses per interface. 0 disables limitation. |
1028 | It is recommended not set too large value (or 0) because it would | 1040 | It is recommended not set too large value (or 0) because it would |
1029 | be too easy way to crash kernel to allow to create too much of | 1041 | be too easy way to crash kernel to allow to create too much of |
1030 | autoconfigured addresses. | 1042 | autoconfigured addresses. |
1031 | Default: 16 | 1043 | Default: 16 |
1032 | 1044 | ||
1033 | disable_ipv6 - BOOLEAN | 1045 | disable_ipv6 - BOOLEAN |
1034 | Disable IPv6 operation. | 1046 | Disable IPv6 operation. If accept_dad is set to 2, this value |
1047 | will be dynamically set to TRUE if DAD fails for the link-local | ||
1048 | address. | ||
1035 | Default: FALSE (enable IPv6 operation) | 1049 | Default: FALSE (enable IPv6 operation) |
1036 | 1050 | ||
1037 | accept_dad - INTEGER | 1051 | accept_dad - INTEGER |
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt new file mode 100644 index 000000000000..eeb68685c788 --- /dev/null +++ b/Documentation/networking/ixgbe.txt | |||
@@ -0,0 +1,199 @@ | |||
1 | Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection | ||
2 | ======================================================================== | ||
3 | |||
4 | March 10, 2009 | ||
5 | |||
6 | |||
7 | Contents | ||
8 | ======== | ||
9 | |||
10 | - In This Release | ||
11 | - Identifying Your Adapter | ||
12 | - Building and Installation | ||
13 | - Additional Configurations | ||
14 | - Support | ||
15 | |||
16 | |||
17 | |||
18 | In This Release | ||
19 | =============== | ||
20 | |||
21 | This file describes the ixgbe Linux Base Driver for the 10 Gigabit PCI | ||
22 | Express Intel(R) Network Connection. This driver includes support for | ||
23 | Itanium(R)2-based systems. | ||
24 | |||
25 | For questions related to hardware requirements, refer to the documentation | ||
26 | supplied with your 10 Gigabit adapter. All hardware requirements listed apply | ||
27 | to use with Linux. | ||
28 | |||
29 | The following features are available in this kernel: | ||
30 | - Native VLANs | ||
31 | - Channel Bonding (teaming) | ||
32 | - SNMP | ||
33 | - Generic Receive Offload | ||
34 | - Data Center Bridging | ||
35 | |||
36 | Channel Bonding documentation can be found in the Linux kernel source: | ||
37 | /Documentation/networking/bonding.txt | ||
38 | |||
39 | Ethtool, lspci, and ifconfig can be used to display device and driver | ||
40 | specific information. | ||
41 | |||
42 | |||
43 | Identifying Your Adapter | ||
44 | ======================== | ||
45 | |||
46 | This driver supports devices based on the 82598 controller and the 82599 | ||
47 | controller. | ||
48 | |||
49 | For specific information on identifying which adapter you have, please visit: | ||
50 | |||
51 | http://support.intel.com/support/network/sb/CS-008441.htm | ||
52 | |||
53 | |||
54 | Building and Installation | ||
55 | ========================= | ||
56 | |||
57 | select m for "Intel(R) 10GbE PCI Express adapters support" located at: | ||
58 | Location: | ||
59 | -> Device Drivers | ||
60 | -> Network device support (NETDEVICES [=y]) | ||
61 | -> Ethernet (10000 Mbit) (NETDEV_10000 [=y]) | ||
62 | |||
63 | 1. make modules & make modules_install | ||
64 | |||
65 | 2. Load the module: | ||
66 | |||
67 | # modprobe ixgbe | ||
68 | |||
69 | The insmod command can be used if the full | ||
70 | path to the driver module is specified. For example: | ||
71 | |||
72 | insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgbe/ixgbe.ko | ||
73 | |||
74 | With 2.6 based kernels also make sure that older ixgbe drivers are | ||
75 | removed from the kernel, before loading the new module: | ||
76 | |||
77 | rmmod ixgbe; modprobe ixgbe | ||
78 | |||
79 | 3. Assign an IP address to the interface by entering the following, where | ||
80 | x is the interface number: | ||
81 | |||
82 | ifconfig ethx <IP_address> | ||
83 | |||
84 | 4. Verify that the interface works. Enter the following, where <IP_address> | ||
85 | is the IP address for another machine on the same subnet as the interface | ||
86 | that is being tested: | ||
87 | |||
88 | ping <IP_address> | ||
89 | |||
90 | |||
91 | Additional Configurations | ||
92 | ========================= | ||
93 | |||
94 | Viewing Link Messages | ||
95 | --------------------- | ||
96 | Link messages will not be displayed to the console if the distribution is | ||
97 | restricting system messages. In order to see network driver link messages on | ||
98 | your console, set dmesg to eight by entering the following: | ||
99 | |||
100 | dmesg -n 8 | ||
101 | |||
102 | NOTE: This setting is not saved across reboots. | ||
103 | |||
104 | |||
105 | Jumbo Frames | ||
106 | ------------ | ||
107 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is | ||
108 | enabled by changing the MTU to a value larger than the default of 1500. | ||
109 | The maximum value for the MTU is 16110. Use the ifconfig command to | ||
110 | increase the MTU size. For example: | ||
111 | |||
112 | ifconfig ethx mtu 9000 up | ||
113 | |||
114 | The maximum MTU setting for Jumbo Frames is 16110. This value coincides | ||
115 | with the maximum Jumbo Frames size of 16128. | ||
116 | |||
117 | Generic Receive Offload, aka GRO | ||
118 | -------------------------------- | ||
119 | The driver supports the in-kernel software implementation of GRO. GRO has | ||
120 | shown that by coalescing Rx traffic into larger chunks of data, CPU | ||
121 | utilization can be significantly reduced when under large Rx load. GRO is an | ||
122 | evolution of the previously-used LRO interface. GRO is able to coalesce | ||
123 | other protocols besides TCP. It's also safe to use with configurations that | ||
124 | are problematic for LRO, namely bridging and iSCSI. | ||
125 | |||
126 | GRO is enabled by default in the driver. Future versions of ethtool will | ||
127 | support disabling and re-enabling GRO on the fly. | ||
128 | |||
129 | |||
130 | Data Center Bridging, aka DCB | ||
131 | ----------------------------- | ||
132 | |||
133 | DCB is a configuration Quality of Service implementation in hardware. | ||
134 | It uses the VLAN priority tag (802.1p) to filter traffic. That means | ||
135 | that there are 8 different priorities that traffic can be filtered into. | ||
136 | It also enables priority flow control which can limit or eliminate the | ||
137 | number of dropped packets during network stress. Bandwidth can be | ||
138 | allocated to each of these priorities, which is enforced at the hardware | ||
139 | level. | ||
140 | |||
141 | To enable DCB support in ixgbe, you must enable the DCB netlink layer to | ||
142 | allow the userspace tools (see below) to communicate with the driver. | ||
143 | This can be found in the kernel configuration here: | ||
144 | |||
145 | -> Networking support | ||
146 | -> Networking options | ||
147 | -> Data Center Bridging support | ||
148 | |||
149 | Once this is selected, DCB support must be selected for ixgbe. This can | ||
150 | be found here: | ||
151 | |||
152 | -> Device Drivers | ||
153 | -> Network device support (NETDEVICES [=y]) | ||
154 | -> Ethernet (10000 Mbit) (NETDEV_10000 [=y]) | ||
155 | -> Intel(R) 10GbE PCI Express adapters support | ||
156 | -> Data Center Bridging (DCB) Support | ||
157 | |||
158 | After these options are selected, you must rebuild your kernel and your | ||
159 | modules. | ||
160 | |||
161 | In order to use DCB, userspace tools must be downloaded and installed. | ||
162 | The dcbd tools can be found at: | ||
163 | |||
164 | http://e1000.sf.net | ||
165 | |||
166 | |||
167 | Ethtool | ||
168 | ------- | ||
169 | The driver utilizes the ethtool interface for driver configuration and | ||
170 | diagnostics, as well as displaying statistical information. Ethtool | ||
171 | version 3.0 or later is required for this functionality. | ||
172 | |||
173 | The latest release of ethtool can be found from | ||
174 | http://sourceforge.net/projects/gkernel. | ||
175 | |||
176 | |||
177 | NAPI | ||
178 | ---- | ||
179 | |||
180 | NAPI (Rx polling mode) is supported in the ixgbe driver. NAPI is enabled | ||
181 | by default in the driver. | ||
182 | |||
183 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | ||
184 | |||
185 | |||
186 | Support | ||
187 | ======= | ||
188 | |||
189 | For general information, go to the Intel support website at: | ||
190 | |||
191 | http://support.intel.com | ||
192 | |||
193 | or the Intel Wired Networking project hosted by Sourceforge at: | ||
194 | |||
195 | http://e1000.sourceforge.net | ||
196 | |||
197 | If an issue is identified with the released source code on the supported | ||
198 | kernel with a supported adapter, email the specific information related | ||
199 | to the issue to e1000-devel@lists.sf.net | ||
diff --git a/Documentation/networking/rds.txt b/Documentation/networking/rds.txt new file mode 100644 index 000000000000..c67077cbeb80 --- /dev/null +++ b/Documentation/networking/rds.txt | |||
@@ -0,0 +1,356 @@ | |||
1 | |||
2 | Overview | ||
3 | ======== | ||
4 | |||
5 | This readme tries to provide some background on the hows and whys of RDS, | ||
6 | and will hopefully help you find your way around the code. | ||
7 | |||
8 | In addition, please see this email about RDS origins: | ||
9 | http://oss.oracle.com/pipermail/rds-devel/2007-November/000228.html | ||
10 | |||
11 | RDS Architecture | ||
12 | ================ | ||
13 | |||
14 | RDS provides reliable, ordered datagram delivery by using a single | ||
15 | reliable connection between any two nodes in the cluster. This allows | ||
16 | applications to use a single socket to talk to any other process in the | ||
17 | cluster - so in a cluster with N processes you need N sockets, in contrast | ||
18 | to N*N if you use a connection-oriented socket transport like TCP. | ||
19 | |||
20 | RDS is not Infiniband-specific; it was designed to support different | ||
21 | transports. The current implementation used to support RDS over TCP as well | ||
22 | as IB. Work is in progress to support RDS over iWARP, and using DCE to | ||
23 | guarantee no dropped packets on Ethernet, it may be possible to use RDS over | ||
24 | UDP in the future. | ||
25 | |||
26 | The high-level semantics of RDS from the application's point of view are | ||
27 | |||
28 | * Addressing | ||
29 | RDS uses IPv4 addresses and 16bit port numbers to identify | ||
30 | the end point of a connection. All socket operations that involve | ||
31 | passing addresses between kernel and user space generally | ||
32 | use a struct sockaddr_in. | ||
33 | |||
34 | The fact that IPv4 addresses are used does not mean the underlying | ||
35 | transport has to be IP-based. In fact, RDS over IB uses a | ||
36 | reliable IB connection; the IP address is used exclusively to | ||
37 | locate the remote node's GID (by ARPing for the given IP). | ||
38 | |||
39 | The port space is entirely independent of UDP, TCP or any other | ||
40 | protocol. | ||
41 | |||
42 | * Socket interface | ||
43 | RDS sockets work *mostly* as you would expect from a BSD | ||
44 | socket. The next section will cover the details. At any rate, | ||
45 | all I/O is performed through the standard BSD socket API. | ||
46 | Some additions like zerocopy support are implemented through | ||
47 | control messages, while other extensions use the getsockopt/ | ||
48 | setsockopt calls. | ||
49 | |||
50 | Sockets must be bound before you can send or receive data. | ||
51 | This is needed because binding also selects a transport and | ||
52 | attaches it to the socket. Once bound, the transport assignment | ||
53 | does not change. RDS will tolerate IPs moving around (eg in | ||
54 | a active-active HA scenario), but only as long as the address | ||
55 | doesn't move to a different transport. | ||
56 | |||
57 | * sysctls | ||
58 | RDS supports a number of sysctls in /proc/sys/net/rds | ||
59 | |||
60 | |||
61 | Socket Interface | ||
62 | ================ | ||
63 | |||
64 | AF_RDS, PF_RDS, SOL_RDS | ||
65 | These constants haven't been assigned yet, because RDS isn't in | ||
66 | mainline yet. Currently, the kernel module assigns some constant | ||
67 | and publishes it to user space through two sysctl files | ||
68 | /proc/sys/net/rds/pf_rds | ||
69 | /proc/sys/net/rds/sol_rds | ||
70 | |||
71 | fd = socket(PF_RDS, SOCK_SEQPACKET, 0); | ||
72 | This creates a new, unbound RDS socket. | ||
73 | |||
74 | setsockopt(SOL_SOCKET): send and receive buffer size | ||
75 | RDS honors the send and receive buffer size socket options. | ||
76 | You are not allowed to queue more than SO_SNDSIZE bytes to | ||
77 | a socket. A message is queued when sendmsg is called, and | ||
78 | it leaves the queue when the remote system acknowledges | ||
79 | its arrival. | ||
80 | |||
81 | The SO_RCVSIZE option controls the maximum receive queue length. | ||
82 | This is a soft limit rather than a hard limit - RDS will | ||
83 | continue to accept and queue incoming messages, even if that | ||
84 | takes the queue length over the limit. However, it will also | ||
85 | mark the port as "congested" and send a congestion update to | ||
86 | the source node. The source node is supposed to throttle any | ||
87 | processes sending to this congested port. | ||
88 | |||
89 | bind(fd, &sockaddr_in, ...) | ||
90 | This binds the socket to a local IP address and port, and a | ||
91 | transport. | ||
92 | |||
93 | sendmsg(fd, ...) | ||
94 | Sends a message to the indicated recipient. The kernel will | ||
95 | transparently establish the underlying reliable connection | ||
96 | if it isn't up yet. | ||
97 | |||
98 | An attempt to send a message that exceeds SO_SNDSIZE will | ||
99 | return with -EMSGSIZE | ||
100 | |||
101 | An attempt to send a message that would take the total number | ||
102 | of queued bytes over the SO_SNDSIZE threshold will return | ||
103 | EAGAIN. | ||
104 | |||
105 | An attempt to send a message to a destination that is marked | ||
106 | as "congested" will return ENOBUFS. | ||
107 | |||
108 | recvmsg(fd, ...) | ||
109 | Receives a message that was queued to this socket. The sockets | ||
110 | recv queue accounting is adjusted, and if the queue length | ||
111 | drops below SO_SNDSIZE, the port is marked uncongested, and | ||
112 | a congestion update is sent to all peers. | ||
113 | |||
114 | Applications can ask the RDS kernel module to receive | ||
115 | notifications via control messages (for instance, there is a | ||
116 | notification when a congestion update arrived, or when a RDMA | ||
117 | operation completes). These notifications are received through | ||
118 | the msg.msg_control buffer of struct msghdr. The format of the | ||
119 | messages is described in manpages. | ||
120 | |||
121 | poll(fd) | ||
122 | RDS supports the poll interface to allow the application | ||
123 | to implement async I/O. | ||
124 | |||
125 | POLLIN handling is pretty straightforward. When there's an | ||
126 | incoming message queued to the socket, or a pending notification, | ||
127 | we signal POLLIN. | ||
128 | |||
129 | POLLOUT is a little harder. Since you can essentially send | ||
130 | to any destination, RDS will always signal POLLOUT as long as | ||
131 | there's room on the send queue (ie the number of bytes queued | ||
132 | is less than the sendbuf size). | ||
133 | |||
134 | However, the kernel will refuse to accept messages to | ||
135 | a destination marked congested - in this case you will loop | ||
136 | forever if you rely on poll to tell you what to do. | ||
137 | This isn't a trivial problem, but applications can deal with | ||
138 | this - by using congestion notifications, and by checking for | ||
139 | ENOBUFS errors returned by sendmsg. | ||
140 | |||
141 | setsockopt(SOL_RDS, RDS_CANCEL_SENT_TO, &sockaddr_in) | ||
142 | This allows the application to discard all messages queued to a | ||
143 | specific destination on this particular socket. | ||
144 | |||
145 | This allows the application to cancel outstanding messages if | ||
146 | it detects a timeout. For instance, if it tried to send a message, | ||
147 | and the remote host is unreachable, RDS will keep trying forever. | ||
148 | The application may decide it's not worth it, and cancel the | ||
149 | operation. In this case, it would use RDS_CANCEL_SENT_TO to | ||
150 | nuke any pending messages. | ||
151 | |||
152 | |||
153 | RDMA for RDS | ||
154 | ============ | ||
155 | |||
156 | see rds-rdma(7) manpage (available in rds-tools) | ||
157 | |||
158 | |||
159 | Congestion Notifications | ||
160 | ======================== | ||
161 | |||
162 | see rds(7) manpage | ||
163 | |||
164 | |||
165 | RDS Protocol | ||
166 | ============ | ||
167 | |||
168 | Message header | ||
169 | |||
170 | The message header is a 'struct rds_header' (see rds.h): | ||
171 | Fields: | ||
172 | h_sequence: | ||
173 | per-packet sequence number | ||
174 | h_ack: | ||
175 | piggybacked acknowledgment of last packet received | ||
176 | h_len: | ||
177 | length of data, not including header | ||
178 | h_sport: | ||
179 | source port | ||
180 | h_dport: | ||
181 | destination port | ||
182 | h_flags: | ||
183 | CONG_BITMAP - this is a congestion update bitmap | ||
184 | ACK_REQUIRED - receiver must ack this packet | ||
185 | RETRANSMITTED - packet has previously been sent | ||
186 | h_credit: | ||
187 | indicate to other end of connection that | ||
188 | it has more credits available (i.e. there is | ||
189 | more send room) | ||
190 | h_padding[4]: | ||
191 | unused, for future use | ||
192 | h_csum: | ||
193 | header checksum | ||
194 | h_exthdr: | ||
195 | optional data can be passed here. This is currently used for | ||
196 | passing RDMA-related information. | ||
197 | |||
198 | ACK and retransmit handling | ||
199 | |||
200 | One might think that with reliable IB connections you wouldn't need | ||
201 | to ack messages that have been received. The problem is that IB | ||
202 | hardware generates an ack message before it has DMAed the message | ||
203 | into memory. This creates a potential message loss if the HCA is | ||
204 | disabled for any reason between when it sends the ack and before | ||
205 | the message is DMAed and processed. This is only a potential issue | ||
206 | if another HCA is available for fail-over. | ||
207 | |||
208 | Sending an ack immediately would allow the sender to free the sent | ||
209 | message from their send queue quickly, but could cause excessive | ||
210 | traffic to be used for acks. RDS piggybacks acks on sent data | ||
211 | packets. Ack-only packets are reduced by only allowing one to be | ||
212 | in flight at a time, and by the sender only asking for acks when | ||
213 | its send buffers start to fill up. All retransmissions are also | ||
214 | acked. | ||
215 | |||
216 | Flow Control | ||
217 | |||
218 | RDS's IB transport uses a credit-based mechanism to verify that | ||
219 | there is space in the peer's receive buffers for more data. This | ||
220 | eliminates the need for hardware retries on the connection. | ||
221 | |||
222 | Congestion | ||
223 | |||
224 | Messages waiting in the receive queue on the receiving socket | ||
225 | are accounted against the sockets SO_RCVBUF option value. Only | ||
226 | the payload bytes in the message are accounted for. If the | ||
227 | number of bytes queued equals or exceeds rcvbuf then the socket | ||
228 | is congested. All sends attempted to this socket's address | ||
229 | should return block or return -EWOULDBLOCK. | ||
230 | |||
231 | Applications are expected to be reasonably tuned such that this | ||
232 | situation very rarely occurs. An application encountering this | ||
233 | "back-pressure" is considered a bug. | ||
234 | |||
235 | This is implemented by having each node maintain bitmaps which | ||
236 | indicate which ports on bound addresses are congested. As the | ||
237 | bitmap changes it is sent through all the connections which | ||
238 | terminate in the local address of the bitmap which changed. | ||
239 | |||
240 | The bitmaps are allocated as connections are brought up. This | ||
241 | avoids allocation in the interrupt handling path which queues | ||
242 | sages on sockets. The dense bitmaps let transports send the | ||
243 | entire bitmap on any bitmap change reasonably efficiently. This | ||
244 | is much easier to implement than some finer-grained | ||
245 | communication of per-port congestion. The sender does a very | ||
246 | inexpensive bit test to test if the port it's about to send to | ||
247 | is congested or not. | ||
248 | |||
249 | |||
250 | RDS Transport Layer | ||
251 | ================== | ||
252 | |||
253 | As mentioned above, RDS is not IB-specific. Its code is divided | ||
254 | into a general RDS layer and a transport layer. | ||
255 | |||
256 | The general layer handles the socket API, congestion handling, | ||
257 | loopback, stats, usermem pinning, and the connection state machine. | ||
258 | |||
259 | The transport layer handles the details of the transport. The IB | ||
260 | transport, for example, handles all the queue pairs, work requests, | ||
261 | CM event handlers, and other Infiniband details. | ||
262 | |||
263 | |||
264 | RDS Kernel Structures | ||
265 | ===================== | ||
266 | |||
267 | struct rds_message | ||
268 | aka possibly "rds_outgoing", the generic RDS layer copies data to | ||
269 | be sent and sets header fields as needed, based on the socket API. | ||
270 | This is then queued for the individual connection and sent by the | ||
271 | connection's transport. | ||
272 | struct rds_incoming | ||
273 | a generic struct referring to incoming data that can be handed from | ||
274 | the transport to the general code and queued by the general code | ||
275 | while the socket is awoken. It is then passed back to the transport | ||
276 | code to handle the actual copy-to-user. | ||
277 | struct rds_socket | ||
278 | per-socket information | ||
279 | struct rds_connection | ||
280 | per-connection information | ||
281 | struct rds_transport | ||
282 | pointers to transport-specific functions | ||
283 | struct rds_statistics | ||
284 | non-transport-specific statistics | ||
285 | struct rds_cong_map | ||
286 | wraps the raw congestion bitmap, contains rbnode, waitq, etc. | ||
287 | |||
288 | Connection management | ||
289 | ===================== | ||
290 | |||
291 | Connections may be in UP, DOWN, CONNECTING, DISCONNECTING, and | ||
292 | ERROR states. | ||
293 | |||
294 | The first time an attempt is made by an RDS socket to send data to | ||
295 | a node, a connection is allocated and connected. That connection is | ||
296 | then maintained forever -- if there are transport errors, the | ||
297 | connection will be dropped and re-established. | ||
298 | |||
299 | Dropping a connection while packets are queued will cause queued or | ||
300 | partially-sent datagrams to be retransmitted when the connection is | ||
301 | re-established. | ||
302 | |||
303 | |||
304 | The send path | ||
305 | ============= | ||
306 | |||
307 | rds_sendmsg() | ||
308 | struct rds_message built from incoming data | ||
309 | CMSGs parsed (e.g. RDMA ops) | ||
310 | transport connection alloced and connected if not already | ||
311 | rds_message placed on send queue | ||
312 | send worker awoken | ||
313 | rds_send_worker() | ||
314 | calls rds_send_xmit() until queue is empty | ||
315 | rds_send_xmit() | ||
316 | transmits congestion map if one is pending | ||
317 | may set ACK_REQUIRED | ||
318 | calls transport to send either non-RDMA or RDMA message | ||
319 | (RDMA ops never retransmitted) | ||
320 | rds_ib_xmit() | ||
321 | allocs work requests from send ring | ||
322 | adds any new send credits available to peer (h_credits) | ||
323 | maps the rds_message's sg list | ||
324 | piggybacks ack | ||
325 | populates work requests | ||
326 | post send to connection's queue pair | ||
327 | |||
328 | The recv path | ||
329 | ============= | ||
330 | |||
331 | rds_ib_recv_cq_comp_handler() | ||
332 | looks at write completions | ||
333 | unmaps recv buffer from device | ||
334 | no errors, call rds_ib_process_recv() | ||
335 | refill recv ring | ||
336 | rds_ib_process_recv() | ||
337 | validate header checksum | ||
338 | copy header to rds_ib_incoming struct if start of a new datagram | ||
339 | add to ibinc's fraglist | ||
340 | if competed datagram: | ||
341 | update cong map if datagram was cong update | ||
342 | call rds_recv_incoming() otherwise | ||
343 | note if ack is required | ||
344 | rds_recv_incoming() | ||
345 | drop duplicate packets | ||
346 | respond to pings | ||
347 | find the sock associated with this datagram | ||
348 | add to sock queue | ||
349 | wake up sock | ||
350 | do some congestion calculations | ||
351 | rds_recvmsg | ||
352 | copy data into user iovec | ||
353 | handle CMSGs | ||
354 | return to application | ||
355 | |||
356 | |||
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt new file mode 100644 index 000000000000..0e58b4539176 --- /dev/null +++ b/Documentation/networking/timestamping.txt | |||
@@ -0,0 +1,180 @@ | |||
1 | The existing interfaces for getting network packages time stamped are: | ||
2 | |||
3 | * SO_TIMESTAMP | ||
4 | Generate time stamp for each incoming packet using the (not necessarily | ||
5 | monotonous!) system time. Result is returned via recv_msg() in a | ||
6 | control message as timeval (usec resolution). | ||
7 | |||
8 | * SO_TIMESTAMPNS | ||
9 | Same time stamping mechanism as SO_TIMESTAMP, but returns result as | ||
10 | timespec (nsec resolution). | ||
11 | |||
12 | * IP_MULTICAST_LOOP + SO_TIMESTAMP[NS] | ||
13 | Only for multicasts: approximate send time stamp by receiving the looped | ||
14 | packet and using its receive time stamp. | ||
15 | |||
16 | The following interface complements the existing ones: receive time | ||
17 | stamps can be generated and returned for arbitrary packets and much | ||
18 | closer to the point where the packet is really sent. Time stamps can | ||
19 | be generated in software (as before) or in hardware (if the hardware | ||
20 | has such a feature). | ||
21 | |||
22 | SO_TIMESTAMPING: | ||
23 | |||
24 | Instructs the socket layer which kind of information is wanted. The | ||
25 | parameter is an integer with some of the following bits set. Setting | ||
26 | other bits is an error and doesn't change the current state. | ||
27 | |||
28 | SOF_TIMESTAMPING_TX_HARDWARE: try to obtain send time stamp in hardware | ||
29 | SOF_TIMESTAMPING_TX_SOFTWARE: if SOF_TIMESTAMPING_TX_HARDWARE is off or | ||
30 | fails, then do it in software | ||
31 | SOF_TIMESTAMPING_RX_HARDWARE: return the original, unmodified time stamp | ||
32 | as generated by the hardware | ||
33 | SOF_TIMESTAMPING_RX_SOFTWARE: if SOF_TIMESTAMPING_RX_HARDWARE is off or | ||
34 | fails, then do it in software | ||
35 | SOF_TIMESTAMPING_RAW_HARDWARE: return original raw hardware time stamp | ||
36 | SOF_TIMESTAMPING_SYS_HARDWARE: return hardware time stamp transformed to | ||
37 | the system time base | ||
38 | SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in | ||
39 | software | ||
40 | |||
41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. | ||
42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the | ||
43 | following control message: | ||
44 | struct scm_timestamping { | ||
45 | struct timespec systime; | ||
46 | struct timespec hwtimetrans; | ||
47 | struct timespec hwtimeraw; | ||
48 | }; | ||
49 | |||
50 | recvmsg() can be used to get this control message for regular incoming | ||
51 | packets. For send time stamps the outgoing packet is looped back to | ||
52 | the socket's error queue with the send time stamp(s) attached. It can | ||
53 | be received with recvmsg(flags=MSG_ERRQUEUE). The call returns the | ||
54 | original outgoing packet data including all headers preprended down to | ||
55 | and including the link layer, the scm_timestamping control message and | ||
56 | a sock_extended_err control message with ee_errno==ENOMSG and | ||
57 | ee_origin==SO_EE_ORIGIN_TIMESTAMPING. A socket with such a pending | ||
58 | bounced packet is ready for reading as far as select() is concerned. | ||
59 | If the outgoing packet has to be fragmented, then only the first | ||
60 | fragment is time stamped and returned to the sending socket. | ||
61 | |||
62 | All three values correspond to the same event in time, but were | ||
63 | generated in different ways. Each of these values may be empty (= all | ||
64 | zero), in which case no such value was available. If the application | ||
65 | is not interested in some of these values, they can be left blank to | ||
66 | avoid the potential overhead of calculating them. | ||
67 | |||
68 | systime is the value of the system time at that moment. This | ||
69 | corresponds to the value also returned via SO_TIMESTAMP[NS]. If the | ||
70 | time stamp was generated by hardware, then this field is | ||
71 | empty. Otherwise it is filled in if SOF_TIMESTAMPING_SOFTWARE is | ||
72 | set. | ||
73 | |||
74 | hwtimeraw is the original hardware time stamp. Filled in if | ||
75 | SOF_TIMESTAMPING_RAW_HARDWARE is set. No assumptions about its | ||
76 | relation to system time should be made. | ||
77 | |||
78 | hwtimetrans is the hardware time stamp transformed so that it | ||
79 | corresponds as good as possible to system time. This correlation is | ||
80 | not perfect; as a consequence, sorting packets received via different | ||
81 | NICs by their hwtimetrans may differ from the order in which they were | ||
82 | received. hwtimetrans may be non-monotonic even for the same NIC. | ||
83 | Filled in if SOF_TIMESTAMPING_SYS_HARDWARE is set. Requires support | ||
84 | by the network device and will be empty without that support. | ||
85 | |||
86 | |||
87 | SIOCSHWTSTAMP: | ||
88 | |||
89 | Hardware time stamping must also be initialized for each device driver | ||
90 | that is expected to do hardware time stamping. The parameter is: | ||
91 | |||
92 | struct hwtstamp_config { | ||
93 | int flags; /* no flags defined right now, must be zero */ | ||
94 | int tx_type; /* HWTSTAMP_TX_* */ | ||
95 | int rx_filter; /* HWTSTAMP_FILTER_* */ | ||
96 | }; | ||
97 | |||
98 | Desired behavior is passed into the kernel and to a specific device by | ||
99 | calling ioctl(SIOCSHWTSTAMP) with a pointer to a struct ifreq whose | ||
100 | ifr_data points to a struct hwtstamp_config. The tx_type and | ||
101 | rx_filter are hints to the driver what it is expected to do. If | ||
102 | the requested fine-grained filtering for incoming packets is not | ||
103 | supported, the driver may time stamp more than just the requested types | ||
104 | of packets. | ||
105 | |||
106 | A driver which supports hardware time stamping shall update the struct | ||
107 | with the actual, possibly more permissive configuration. If the | ||
108 | requested packets cannot be time stamped, then nothing should be | ||
109 | changed and ERANGE shall be returned (in contrast to EINVAL, which | ||
110 | indicates that SIOCSHWTSTAMP is not supported at all). | ||
111 | |||
112 | Only a processes with admin rights may change the configuration. User | ||
113 | space is responsible to ensure that multiple processes don't interfere | ||
114 | with each other and that the settings are reset. | ||
115 | |||
116 | /* possible values for hwtstamp_config->tx_type */ | ||
117 | enum { | ||
118 | /* | ||
119 | * no outgoing packet will need hardware time stamping; | ||
120 | * should a packet arrive which asks for it, no hardware | ||
121 | * time stamping will be done | ||
122 | */ | ||
123 | HWTSTAMP_TX_OFF, | ||
124 | |||
125 | /* | ||
126 | * enables hardware time stamping for outgoing packets; | ||
127 | * the sender of the packet decides which are to be | ||
128 | * time stamped by setting SOF_TIMESTAMPING_TX_SOFTWARE | ||
129 | * before sending the packet | ||
130 | */ | ||
131 | HWTSTAMP_TX_ON, | ||
132 | }; | ||
133 | |||
134 | /* possible values for hwtstamp_config->rx_filter */ | ||
135 | enum { | ||
136 | /* time stamp no incoming packet at all */ | ||
137 | HWTSTAMP_FILTER_NONE, | ||
138 | |||
139 | /* time stamp any incoming packet */ | ||
140 | HWTSTAMP_FILTER_ALL, | ||
141 | |||
142 | /* return value: time stamp all packets requested plus some others */ | ||
143 | HWTSTAMP_FILTER_SOME, | ||
144 | |||
145 | /* PTP v1, UDP, any kind of event packet */ | ||
146 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, | ||
147 | |||
148 | ... | ||
149 | }; | ||
150 | |||
151 | |||
152 | DEVICE IMPLEMENTATION | ||
153 | |||
154 | A driver which supports hardware time stamping must support the | ||
155 | SIOCSHWTSTAMP ioctl. Time stamps for received packets must be stored | ||
156 | in the skb with skb_hwtstamp_set(). | ||
157 | |||
158 | Time stamps for outgoing packets are to be generated as follows: | ||
159 | - In hard_start_xmit(), check if skb_hwtstamp_check_tx_hardware() | ||
160 | returns non-zero. If yes, then the driver is expected | ||
161 | to do hardware time stamping. | ||
162 | - If this is possible for the skb and requested, then declare | ||
163 | that the driver is doing the time stamping by calling | ||
164 | skb_hwtstamp_tx_in_progress(). A driver not supporting | ||
165 | hardware time stamping doesn't do that. A driver must never | ||
166 | touch sk_buff::tstamp! It is used to store how time stamping | ||
167 | for an outgoing packets is to be done. | ||
168 | - As soon as the driver has sent the packet and/or obtained a | ||
169 | hardware time stamp for it, it passes the time stamp back by | ||
170 | calling skb_hwtstamp_tx() with the original skb, the raw | ||
171 | hardware time stamp and a handle to the device (necessary | ||
172 | to convert the hardware time stamp to system time). If obtaining | ||
173 | the hardware time stamp somehow fails, then the driver should | ||
174 | not fall back to software time stamping. The rationale is that | ||
175 | this would occur at a later time in the processing pipeline | ||
176 | than other software time stamping and therefore could lead | ||
177 | to unexpected deltas between time stamps. | ||
178 | - If the driver did not call skb_hwtstamp_tx_in_progress(), then | ||
179 | dev_hard_start_xmit() checks whether software time stamping | ||
180 | is wanted as fallback and potentially generates the time stamp. | ||
diff --git a/Documentation/networking/timestamping/.gitignore b/Documentation/networking/timestamping/.gitignore new file mode 100644 index 000000000000..71e81eb2e22f --- /dev/null +++ b/Documentation/networking/timestamping/.gitignore | |||
@@ -0,0 +1 @@ | |||
timestamping | |||
diff --git a/Documentation/networking/timestamping/Makefile b/Documentation/networking/timestamping/Makefile new file mode 100644 index 000000000000..2a1489fdc036 --- /dev/null +++ b/Documentation/networking/timestamping/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | CPPFLAGS = -I../../../include | ||
2 | |||
3 | timestamping: timestamping.c | ||
4 | |||
5 | clean: | ||
6 | rm -f timestamping | ||
diff --git a/Documentation/networking/timestamping/timestamping.c b/Documentation/networking/timestamping/timestamping.c new file mode 100644 index 000000000000..43d143104210 --- /dev/null +++ b/Documentation/networking/timestamping/timestamping.c | |||
@@ -0,0 +1,533 @@ | |||
1 | /* | ||
2 | * This program demonstrates how the various time stamping features in | ||
3 | * the Linux kernel work. It emulates the behavior of a PTP | ||
4 | * implementation in stand-alone master mode by sending PTPv1 Sync | ||
5 | * multicasts once every second. It looks for similar packets, but | ||
6 | * beyond that doesn't actually implement PTP. | ||
7 | * | ||
8 | * Outgoing packets are time stamped with SO_TIMESTAMPING with or | ||
9 | * without hardware support. | ||
10 | * | ||
11 | * Incoming packets are time stamped with SO_TIMESTAMPING with or | ||
12 | * without hardware support, SIOCGSTAMP[NS] (per-socket time stamp) and | ||
13 | * SO_TIMESTAMP[NS]. | ||
14 | * | ||
15 | * Copyright (C) 2009 Intel Corporation. | ||
16 | * Author: Patrick Ohly <patrick.ohly@intel.com> | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or modify it | ||
19 | * under the terms and conditions of the GNU General Public License, | ||
20 | * version 2, as published by the Free Software Foundation. | ||
21 | * | ||
22 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
23 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
24 | * FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for | ||
25 | * more details. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License along with | ||
28 | * this program; if not, write to the Free Software Foundation, Inc., | ||
29 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
30 | */ | ||
31 | |||
32 | #include <stdio.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <errno.h> | ||
35 | #include <string.h> | ||
36 | |||
37 | #include <sys/time.h> | ||
38 | #include <sys/socket.h> | ||
39 | #include <sys/select.h> | ||
40 | #include <sys/ioctl.h> | ||
41 | #include <arpa/inet.h> | ||
42 | #include <net/if.h> | ||
43 | |||
44 | #include "asm/types.h" | ||
45 | #include "linux/net_tstamp.h" | ||
46 | #include "linux/errqueue.h" | ||
47 | |||
48 | #ifndef SO_TIMESTAMPING | ||
49 | # define SO_TIMESTAMPING 37 | ||
50 | # define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
51 | #endif | ||
52 | |||
53 | #ifndef SO_TIMESTAMPNS | ||
54 | # define SO_TIMESTAMPNS 35 | ||
55 | #endif | ||
56 | |||
57 | #ifndef SIOCGSTAMPNS | ||
58 | # define SIOCGSTAMPNS 0x8907 | ||
59 | #endif | ||
60 | |||
61 | #ifndef SIOCSHWTSTAMP | ||
62 | # define SIOCSHWTSTAMP 0x89b0 | ||
63 | #endif | ||
64 | |||
65 | static void usage(const char *error) | ||
66 | { | ||
67 | if (error) | ||
68 | printf("invalid option: %s\n", error); | ||
69 | printf("timestamping interface option*\n\n" | ||
70 | "Options:\n" | ||
71 | " IP_MULTICAST_LOOP - looping outgoing multicasts\n" | ||
72 | " SO_TIMESTAMP - normal software time stamping, ms resolution\n" | ||
73 | " SO_TIMESTAMPNS - more accurate software time stamping\n" | ||
74 | " SOF_TIMESTAMPING_TX_HARDWARE - hardware time stamping of outgoing packets\n" | ||
75 | " SOF_TIMESTAMPING_TX_SOFTWARE - software fallback for outgoing packets\n" | ||
76 | " SOF_TIMESTAMPING_RX_HARDWARE - hardware time stamping of incoming packets\n" | ||
77 | " SOF_TIMESTAMPING_RX_SOFTWARE - software fallback for incoming packets\n" | ||
78 | " SOF_TIMESTAMPING_SOFTWARE - request reporting of software time stamps\n" | ||
79 | " SOF_TIMESTAMPING_SYS_HARDWARE - request reporting of transformed HW time stamps\n" | ||
80 | " SOF_TIMESTAMPING_RAW_HARDWARE - request reporting of raw HW time stamps\n" | ||
81 | " SIOCGSTAMP - check last socket time stamp\n" | ||
82 | " SIOCGSTAMPNS - more accurate socket time stamp\n"); | ||
83 | exit(1); | ||
84 | } | ||
85 | |||
86 | static void bail(const char *error) | ||
87 | { | ||
88 | printf("%s: %s\n", error, strerror(errno)); | ||
89 | exit(1); | ||
90 | } | ||
91 | |||
92 | static const unsigned char sync[] = { | ||
93 | 0x00, 0x01, 0x00, 0x01, | ||
94 | 0x5f, 0x44, 0x46, 0x4c, | ||
95 | 0x54, 0x00, 0x00, 0x00, | ||
96 | 0x00, 0x00, 0x00, 0x00, | ||
97 | 0x00, 0x00, 0x00, 0x00, | ||
98 | 0x01, 0x01, | ||
99 | |||
100 | /* fake uuid */ | ||
101 | 0x00, 0x01, | ||
102 | 0x02, 0x03, 0x04, 0x05, | ||
103 | |||
104 | 0x00, 0x01, 0x00, 0x37, | ||
105 | 0x00, 0x00, 0x00, 0x08, | ||
106 | 0x00, 0x00, 0x00, 0x00, | ||
107 | 0x49, 0x05, 0xcd, 0x01, | ||
108 | 0x29, 0xb1, 0x8d, 0xb0, | ||
109 | 0x00, 0x00, 0x00, 0x00, | ||
110 | 0x00, 0x01, | ||
111 | |||
112 | /* fake uuid */ | ||
113 | 0x00, 0x01, | ||
114 | 0x02, 0x03, 0x04, 0x05, | ||
115 | |||
116 | 0x00, 0x00, 0x00, 0x37, | ||
117 | 0x00, 0x00, 0x00, 0x04, | ||
118 | 0x44, 0x46, 0x4c, 0x54, | ||
119 | 0x00, 0x00, 0xf0, 0x60, | ||
120 | 0x00, 0x01, 0x00, 0x00, | ||
121 | 0x00, 0x00, 0x00, 0x01, | ||
122 | 0x00, 0x00, 0xf0, 0x60, | ||
123 | 0x00, 0x00, 0x00, 0x00, | ||
124 | 0x00, 0x00, 0x00, 0x04, | ||
125 | 0x44, 0x46, 0x4c, 0x54, | ||
126 | 0x00, 0x01, | ||
127 | |||
128 | /* fake uuid */ | ||
129 | 0x00, 0x01, | ||
130 | 0x02, 0x03, 0x04, 0x05, | ||
131 | |||
132 | 0x00, 0x00, 0x00, 0x00, | ||
133 | 0x00, 0x00, 0x00, 0x00, | ||
134 | 0x00, 0x00, 0x00, 0x00, | ||
135 | 0x00, 0x00, 0x00, 0x00 | ||
136 | }; | ||
137 | |||
138 | static void sendpacket(int sock, struct sockaddr *addr, socklen_t addr_len) | ||
139 | { | ||
140 | struct timeval now; | ||
141 | int res; | ||
142 | |||
143 | res = sendto(sock, sync, sizeof(sync), 0, | ||
144 | addr, addr_len); | ||
145 | gettimeofday(&now, 0); | ||
146 | if (res < 0) | ||
147 | printf("%s: %s\n", "send", strerror(errno)); | ||
148 | else | ||
149 | printf("%ld.%06ld: sent %d bytes\n", | ||
150 | (long)now.tv_sec, (long)now.tv_usec, | ||
151 | res); | ||
152 | } | ||
153 | |||
154 | static void printpacket(struct msghdr *msg, int res, | ||
155 | char *data, | ||
156 | int sock, int recvmsg_flags, | ||
157 | int siocgstamp, int siocgstampns) | ||
158 | { | ||
159 | struct sockaddr_in *from_addr = (struct sockaddr_in *)msg->msg_name; | ||
160 | struct cmsghdr *cmsg; | ||
161 | struct timeval tv; | ||
162 | struct timespec ts; | ||
163 | struct timeval now; | ||
164 | |||
165 | gettimeofday(&now, 0); | ||
166 | |||
167 | printf("%ld.%06ld: received %s data, %d bytes from %s, %d bytes control messages\n", | ||
168 | (long)now.tv_sec, (long)now.tv_usec, | ||
169 | (recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular", | ||
170 | res, | ||
171 | inet_ntoa(from_addr->sin_addr), | ||
172 | msg->msg_controllen); | ||
173 | for (cmsg = CMSG_FIRSTHDR(msg); | ||
174 | cmsg; | ||
175 | cmsg = CMSG_NXTHDR(msg, cmsg)) { | ||
176 | printf(" cmsg len %d: ", cmsg->cmsg_len); | ||
177 | switch (cmsg->cmsg_level) { | ||
178 | case SOL_SOCKET: | ||
179 | printf("SOL_SOCKET "); | ||
180 | switch (cmsg->cmsg_type) { | ||
181 | case SO_TIMESTAMP: { | ||
182 | struct timeval *stamp = | ||
183 | (struct timeval *)CMSG_DATA(cmsg); | ||
184 | printf("SO_TIMESTAMP %ld.%06ld", | ||
185 | (long)stamp->tv_sec, | ||
186 | (long)stamp->tv_usec); | ||
187 | break; | ||
188 | } | ||
189 | case SO_TIMESTAMPNS: { | ||
190 | struct timespec *stamp = | ||
191 | (struct timespec *)CMSG_DATA(cmsg); | ||
192 | printf("SO_TIMESTAMPNS %ld.%09ld", | ||
193 | (long)stamp->tv_sec, | ||
194 | (long)stamp->tv_nsec); | ||
195 | break; | ||
196 | } | ||
197 | case SO_TIMESTAMPING: { | ||
198 | struct timespec *stamp = | ||
199 | (struct timespec *)CMSG_DATA(cmsg); | ||
200 | printf("SO_TIMESTAMPING "); | ||
201 | printf("SW %ld.%09ld ", | ||
202 | (long)stamp->tv_sec, | ||
203 | (long)stamp->tv_nsec); | ||
204 | stamp++; | ||
205 | printf("HW transformed %ld.%09ld ", | ||
206 | (long)stamp->tv_sec, | ||
207 | (long)stamp->tv_nsec); | ||
208 | stamp++; | ||
209 | printf("HW raw %ld.%09ld", | ||
210 | (long)stamp->tv_sec, | ||
211 | (long)stamp->tv_nsec); | ||
212 | break; | ||
213 | } | ||
214 | default: | ||
215 | printf("type %d", cmsg->cmsg_type); | ||
216 | break; | ||
217 | } | ||
218 | break; | ||
219 | case IPPROTO_IP: | ||
220 | printf("IPPROTO_IP "); | ||
221 | switch (cmsg->cmsg_type) { | ||
222 | case IP_RECVERR: { | ||
223 | struct sock_extended_err *err = | ||
224 | (struct sock_extended_err *)CMSG_DATA(cmsg); | ||
225 | printf("IP_RECVERR ee_errno '%s' ee_origin %d => %s", | ||
226 | strerror(err->ee_errno), | ||
227 | err->ee_origin, | ||
228 | #ifdef SO_EE_ORIGIN_TIMESTAMPING | ||
229 | err->ee_origin == SO_EE_ORIGIN_TIMESTAMPING ? | ||
230 | "bounced packet" : "unexpected origin" | ||
231 | #else | ||
232 | "probably SO_EE_ORIGIN_TIMESTAMPING" | ||
233 | #endif | ||
234 | ); | ||
235 | if (res < sizeof(sync)) | ||
236 | printf(" => truncated data?!"); | ||
237 | else if (!memcmp(sync, data + res - sizeof(sync), | ||
238 | sizeof(sync))) | ||
239 | printf(" => GOT OUR DATA BACK (HURRAY!)"); | ||
240 | break; | ||
241 | } | ||
242 | case IP_PKTINFO: { | ||
243 | struct in_pktinfo *pktinfo = | ||
244 | (struct in_pktinfo *)CMSG_DATA(cmsg); | ||
245 | printf("IP_PKTINFO interface index %u", | ||
246 | pktinfo->ipi_ifindex); | ||
247 | break; | ||
248 | } | ||
249 | default: | ||
250 | printf("type %d", cmsg->cmsg_type); | ||
251 | break; | ||
252 | } | ||
253 | break; | ||
254 | default: | ||
255 | printf("level %d type %d", | ||
256 | cmsg->cmsg_level, | ||
257 | cmsg->cmsg_type); | ||
258 | break; | ||
259 | } | ||
260 | printf("\n"); | ||
261 | } | ||
262 | |||
263 | if (siocgstamp) { | ||
264 | if (ioctl(sock, SIOCGSTAMP, &tv)) | ||
265 | printf(" %s: %s\n", "SIOCGSTAMP", strerror(errno)); | ||
266 | else | ||
267 | printf("SIOCGSTAMP %ld.%06ld\n", | ||
268 | (long)tv.tv_sec, | ||
269 | (long)tv.tv_usec); | ||
270 | } | ||
271 | if (siocgstampns) { | ||
272 | if (ioctl(sock, SIOCGSTAMPNS, &ts)) | ||
273 | printf(" %s: %s\n", "SIOCGSTAMPNS", strerror(errno)); | ||
274 | else | ||
275 | printf("SIOCGSTAMPNS %ld.%09ld\n", | ||
276 | (long)ts.tv_sec, | ||
277 | (long)ts.tv_nsec); | ||
278 | } | ||
279 | } | ||
280 | |||
281 | static void recvpacket(int sock, int recvmsg_flags, | ||
282 | int siocgstamp, int siocgstampns) | ||
283 | { | ||
284 | char data[256]; | ||
285 | struct msghdr msg; | ||
286 | struct iovec entry; | ||
287 | struct sockaddr_in from_addr; | ||
288 | struct { | ||
289 | struct cmsghdr cm; | ||
290 | char control[512]; | ||
291 | } control; | ||
292 | int res; | ||
293 | |||
294 | memset(&msg, 0, sizeof(msg)); | ||
295 | msg.msg_iov = &entry; | ||
296 | msg.msg_iovlen = 1; | ||
297 | entry.iov_base = data; | ||
298 | entry.iov_len = sizeof(data); | ||
299 | msg.msg_name = (caddr_t)&from_addr; | ||
300 | msg.msg_namelen = sizeof(from_addr); | ||
301 | msg.msg_control = &control; | ||
302 | msg.msg_controllen = sizeof(control); | ||
303 | |||
304 | res = recvmsg(sock, &msg, recvmsg_flags|MSG_DONTWAIT); | ||
305 | if (res < 0) { | ||
306 | printf("%s %s: %s\n", | ||
307 | "recvmsg", | ||
308 | (recvmsg_flags & MSG_ERRQUEUE) ? "error" : "regular", | ||
309 | strerror(errno)); | ||
310 | } else { | ||
311 | printpacket(&msg, res, data, | ||
312 | sock, recvmsg_flags, | ||
313 | siocgstamp, siocgstampns); | ||
314 | } | ||
315 | } | ||
316 | |||
317 | int main(int argc, char **argv) | ||
318 | { | ||
319 | int so_timestamping_flags = 0; | ||
320 | int so_timestamp = 0; | ||
321 | int so_timestampns = 0; | ||
322 | int siocgstamp = 0; | ||
323 | int siocgstampns = 0; | ||
324 | int ip_multicast_loop = 0; | ||
325 | char *interface; | ||
326 | int i; | ||
327 | int enabled = 1; | ||
328 | int sock; | ||
329 | struct ifreq device; | ||
330 | struct ifreq hwtstamp; | ||
331 | struct hwtstamp_config hwconfig, hwconfig_requested; | ||
332 | struct sockaddr_in addr; | ||
333 | struct ip_mreq imr; | ||
334 | struct in_addr iaddr; | ||
335 | int val; | ||
336 | socklen_t len; | ||
337 | struct timeval next; | ||
338 | |||
339 | if (argc < 2) | ||
340 | usage(0); | ||
341 | interface = argv[1]; | ||
342 | |||
343 | for (i = 2; i < argc; i++) { | ||
344 | if (!strcasecmp(argv[i], "SO_TIMESTAMP")) | ||
345 | so_timestamp = 1; | ||
346 | else if (!strcasecmp(argv[i], "SO_TIMESTAMPNS")) | ||
347 | so_timestampns = 1; | ||
348 | else if (!strcasecmp(argv[i], "SIOCGSTAMP")) | ||
349 | siocgstamp = 1; | ||
350 | else if (!strcasecmp(argv[i], "SIOCGSTAMPNS")) | ||
351 | siocgstampns = 1; | ||
352 | else if (!strcasecmp(argv[i], "IP_MULTICAST_LOOP")) | ||
353 | ip_multicast_loop = 1; | ||
354 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_TX_HARDWARE")) | ||
355 | so_timestamping_flags |= SOF_TIMESTAMPING_TX_HARDWARE; | ||
356 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_TX_SOFTWARE")) | ||
357 | so_timestamping_flags |= SOF_TIMESTAMPING_TX_SOFTWARE; | ||
358 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RX_HARDWARE")) | ||
359 | so_timestamping_flags |= SOF_TIMESTAMPING_RX_HARDWARE; | ||
360 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RX_SOFTWARE")) | ||
361 | so_timestamping_flags |= SOF_TIMESTAMPING_RX_SOFTWARE; | ||
362 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SOFTWARE")) | ||
363 | so_timestamping_flags |= SOF_TIMESTAMPING_SOFTWARE; | ||
364 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_SYS_HARDWARE")) | ||
365 | so_timestamping_flags |= SOF_TIMESTAMPING_SYS_HARDWARE; | ||
366 | else if (!strcasecmp(argv[i], "SOF_TIMESTAMPING_RAW_HARDWARE")) | ||
367 | so_timestamping_flags |= SOF_TIMESTAMPING_RAW_HARDWARE; | ||
368 | else | ||
369 | usage(argv[i]); | ||
370 | } | ||
371 | |||
372 | sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); | ||
373 | if (socket < 0) | ||
374 | bail("socket"); | ||
375 | |||
376 | memset(&device, 0, sizeof(device)); | ||
377 | strncpy(device.ifr_name, interface, sizeof(device.ifr_name)); | ||
378 | if (ioctl(sock, SIOCGIFADDR, &device) < 0) | ||
379 | bail("getting interface IP address"); | ||
380 | |||
381 | memset(&hwtstamp, 0, sizeof(hwtstamp)); | ||
382 | strncpy(hwtstamp.ifr_name, interface, sizeof(hwtstamp.ifr_name)); | ||
383 | hwtstamp.ifr_data = (void *)&hwconfig; | ||
384 | memset(&hwconfig, 0, sizeof(&hwconfig)); | ||
385 | hwconfig.tx_type = | ||
386 | (so_timestamping_flags & SOF_TIMESTAMPING_TX_HARDWARE) ? | ||
387 | HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF; | ||
388 | hwconfig.rx_filter = | ||
389 | (so_timestamping_flags & SOF_TIMESTAMPING_RX_HARDWARE) ? | ||
390 | HWTSTAMP_FILTER_PTP_V1_L4_SYNC : HWTSTAMP_FILTER_NONE; | ||
391 | hwconfig_requested = hwconfig; | ||
392 | if (ioctl(sock, SIOCSHWTSTAMP, &hwtstamp) < 0) { | ||
393 | if ((errno == EINVAL || errno == ENOTSUP) && | ||
394 | hwconfig_requested.tx_type == HWTSTAMP_TX_OFF && | ||
395 | hwconfig_requested.rx_filter == HWTSTAMP_FILTER_NONE) | ||
396 | printf("SIOCSHWTSTAMP: disabling hardware time stamping not possible\n"); | ||
397 | else | ||
398 | bail("SIOCSHWTSTAMP"); | ||
399 | } | ||
400 | printf("SIOCSHWTSTAMP: tx_type %d requested, got %d; rx_filter %d requested, got %d\n", | ||
401 | hwconfig_requested.tx_type, hwconfig.tx_type, | ||
402 | hwconfig_requested.rx_filter, hwconfig.rx_filter); | ||
403 | |||
404 | /* bind to PTP port */ | ||
405 | addr.sin_family = AF_INET; | ||
406 | addr.sin_addr.s_addr = htonl(INADDR_ANY); | ||
407 | addr.sin_port = htons(319 /* PTP event port */); | ||
408 | if (bind(sock, | ||
409 | (struct sockaddr *)&addr, | ||
410 | sizeof(struct sockaddr_in)) < 0) | ||
411 | bail("bind"); | ||
412 | |||
413 | /* set multicast group for outgoing packets */ | ||
414 | inet_aton("224.0.1.130", &iaddr); /* alternate PTP domain 1 */ | ||
415 | addr.sin_addr = iaddr; | ||
416 | imr.imr_multiaddr.s_addr = iaddr.s_addr; | ||
417 | imr.imr_interface.s_addr = | ||
418 | ((struct sockaddr_in *)&device.ifr_addr)->sin_addr.s_addr; | ||
419 | if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, | ||
420 | &imr.imr_interface.s_addr, sizeof(struct in_addr)) < 0) | ||
421 | bail("set multicast"); | ||
422 | |||
423 | /* join multicast group, loop our own packet */ | ||
424 | if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, | ||
425 | &imr, sizeof(struct ip_mreq)) < 0) | ||
426 | bail("join multicast group"); | ||
427 | |||
428 | if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, | ||
429 | &ip_multicast_loop, sizeof(enabled)) < 0) { | ||
430 | bail("loop multicast"); | ||
431 | } | ||
432 | |||
433 | /* set socket options for time stamping */ | ||
434 | if (so_timestamp && | ||
435 | setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, | ||
436 | &enabled, sizeof(enabled)) < 0) | ||
437 | bail("setsockopt SO_TIMESTAMP"); | ||
438 | |||
439 | if (so_timestampns && | ||
440 | setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, | ||
441 | &enabled, sizeof(enabled)) < 0) | ||
442 | bail("setsockopt SO_TIMESTAMPNS"); | ||
443 | |||
444 | if (so_timestamping_flags && | ||
445 | setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, | ||
446 | &so_timestamping_flags, | ||
447 | sizeof(so_timestamping_flags)) < 0) | ||
448 | bail("setsockopt SO_TIMESTAMPING"); | ||
449 | |||
450 | /* request IP_PKTINFO for debugging purposes */ | ||
451 | if (setsockopt(sock, SOL_IP, IP_PKTINFO, | ||
452 | &enabled, sizeof(enabled)) < 0) | ||
453 | printf("%s: %s\n", "setsockopt IP_PKTINFO", strerror(errno)); | ||
454 | |||
455 | /* verify socket options */ | ||
456 | len = sizeof(val); | ||
457 | if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, &val, &len) < 0) | ||
458 | printf("%s: %s\n", "getsockopt SO_TIMESTAMP", strerror(errno)); | ||
459 | else | ||
460 | printf("SO_TIMESTAMP %d\n", val); | ||
461 | |||
462 | if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, &val, &len) < 0) | ||
463 | printf("%s: %s\n", "getsockopt SO_TIMESTAMPNS", | ||
464 | strerror(errno)); | ||
465 | else | ||
466 | printf("SO_TIMESTAMPNS %d\n", val); | ||
467 | |||
468 | if (getsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, &val, &len) < 0) { | ||
469 | printf("%s: %s\n", "getsockopt SO_TIMESTAMPING", | ||
470 | strerror(errno)); | ||
471 | } else { | ||
472 | printf("SO_TIMESTAMPING %d\n", val); | ||
473 | if (val != so_timestamping_flags) | ||
474 | printf(" not the expected value %d\n", | ||
475 | so_timestamping_flags); | ||
476 | } | ||
477 | |||
478 | /* send packets forever every five seconds */ | ||
479 | gettimeofday(&next, 0); | ||
480 | next.tv_sec = (next.tv_sec + 1) / 5 * 5; | ||
481 | next.tv_usec = 0; | ||
482 | while (1) { | ||
483 | struct timeval now; | ||
484 | struct timeval delta; | ||
485 | long delta_us; | ||
486 | int res; | ||
487 | fd_set readfs, errorfs; | ||
488 | |||
489 | gettimeofday(&now, 0); | ||
490 | delta_us = (long)(next.tv_sec - now.tv_sec) * 1000000 + | ||
491 | (long)(next.tv_usec - now.tv_usec); | ||
492 | if (delta_us > 0) { | ||
493 | /* continue waiting for timeout or data */ | ||
494 | delta.tv_sec = delta_us / 1000000; | ||
495 | delta.tv_usec = delta_us % 1000000; | ||
496 | |||
497 | FD_ZERO(&readfs); | ||
498 | FD_ZERO(&errorfs); | ||
499 | FD_SET(sock, &readfs); | ||
500 | FD_SET(sock, &errorfs); | ||
501 | printf("%ld.%06ld: select %ldus\n", | ||
502 | (long)now.tv_sec, (long)now.tv_usec, | ||
503 | delta_us); | ||
504 | res = select(sock + 1, &readfs, 0, &errorfs, &delta); | ||
505 | gettimeofday(&now, 0); | ||
506 | printf("%ld.%06ld: select returned: %d, %s\n", | ||
507 | (long)now.tv_sec, (long)now.tv_usec, | ||
508 | res, | ||
509 | res < 0 ? strerror(errno) : "success"); | ||
510 | if (res > 0) { | ||
511 | if (FD_ISSET(sock, &readfs)) | ||
512 | printf("ready for reading\n"); | ||
513 | if (FD_ISSET(sock, &errorfs)) | ||
514 | printf("has error\n"); | ||
515 | recvpacket(sock, 0, | ||
516 | siocgstamp, | ||
517 | siocgstampns); | ||
518 | recvpacket(sock, MSG_ERRQUEUE, | ||
519 | siocgstamp, | ||
520 | siocgstampns); | ||
521 | } | ||
522 | } else { | ||
523 | /* write one packet */ | ||
524 | sendpacket(sock, | ||
525 | (struct sockaddr *)&addr, | ||
526 | sizeof(addr)); | ||
527 | next.tv_sec += 5; | ||
528 | continue; | ||
529 | } | ||
530 | } | ||
531 | |||
532 | return 0; | ||
533 | } | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/dma.txt b/Documentation/powerpc/dts-bindings/fsl/dma.txt index cc453110fc46..0732cdd05ba1 100644 --- a/Documentation/powerpc/dts-bindings/fsl/dma.txt +++ b/Documentation/powerpc/dts-bindings/fsl/dma.txt | |||
@@ -35,30 +35,30 @@ Example: | |||
35 | #address-cells = <1>; | 35 | #address-cells = <1>; |
36 | #size-cells = <1>; | 36 | #size-cells = <1>; |
37 | compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; | 37 | compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; |
38 | reg = <82a8 4>; | 38 | reg = <0x82a8 4>; |
39 | ranges = <0 8100 1a4>; | 39 | ranges = <0 0x8100 0x1a4>; |
40 | interrupt-parent = <&ipic>; | 40 | interrupt-parent = <&ipic>; |
41 | interrupts = <47 8>; | 41 | interrupts = <71 8>; |
42 | cell-index = <0>; | 42 | cell-index = <0>; |
43 | dma-channel@0 { | 43 | dma-channel@0 { |
44 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | 44 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; |
45 | cell-index = <0>; | 45 | cell-index = <0>; |
46 | reg = <0 80>; | 46 | reg = <0 0x80>; |
47 | }; | 47 | }; |
48 | dma-channel@80 { | 48 | dma-channel@80 { |
49 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | 49 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; |
50 | cell-index = <1>; | 50 | cell-index = <1>; |
51 | reg = <80 80>; | 51 | reg = <0x80 0x80>; |
52 | }; | 52 | }; |
53 | dma-channel@100 { | 53 | dma-channel@100 { |
54 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | 54 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; |
55 | cell-index = <2>; | 55 | cell-index = <2>; |
56 | reg = <100 80>; | 56 | reg = <0x100 0x80>; |
57 | }; | 57 | }; |
58 | dma-channel@180 { | 58 | dma-channel@180 { |
59 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | 59 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; |
60 | cell-index = <3>; | 60 | cell-index = <3>; |
61 | reg = <180 80>; | 61 | reg = <0x180 0x80>; |
62 | }; | 62 | }; |
63 | }; | 63 | }; |
64 | 64 | ||
@@ -93,36 +93,36 @@ Example: | |||
93 | #address-cells = <1>; | 93 | #address-cells = <1>; |
94 | #size-cells = <1>; | 94 | #size-cells = <1>; |
95 | compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma"; | 95 | compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma"; |
96 | reg = <21300 4>; | 96 | reg = <0x21300 4>; |
97 | ranges = <0 21100 200>; | 97 | ranges = <0 0x21100 0x200>; |
98 | cell-index = <0>; | 98 | cell-index = <0>; |
99 | dma-channel@0 { | 99 | dma-channel@0 { |
100 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | 100 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; |
101 | reg = <0 80>; | 101 | reg = <0 0x80>; |
102 | cell-index = <0>; | 102 | cell-index = <0>; |
103 | interrupt-parent = <&mpic>; | 103 | interrupt-parent = <&mpic>; |
104 | interrupts = <14 2>; | 104 | interrupts = <20 2>; |
105 | }; | 105 | }; |
106 | dma-channel@80 { | 106 | dma-channel@80 { |
107 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | 107 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; |
108 | reg = <80 80>; | 108 | reg = <0x80 0x80>; |
109 | cell-index = <1>; | 109 | cell-index = <1>; |
110 | interrupt-parent = <&mpic>; | 110 | interrupt-parent = <&mpic>; |
111 | interrupts = <15 2>; | 111 | interrupts = <21 2>; |
112 | }; | 112 | }; |
113 | dma-channel@100 { | 113 | dma-channel@100 { |
114 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | 114 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; |
115 | reg = <100 80>; | 115 | reg = <0x100 0x80>; |
116 | cell-index = <2>; | 116 | cell-index = <2>; |
117 | interrupt-parent = <&mpic>; | 117 | interrupt-parent = <&mpic>; |
118 | interrupts = <16 2>; | 118 | interrupts = <22 2>; |
119 | }; | 119 | }; |
120 | dma-channel@180 { | 120 | dma-channel@180 { |
121 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | 121 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; |
122 | reg = <180 80>; | 122 | reg = <0x180 0x80>; |
123 | cell-index = <3>; | 123 | cell-index = <3>; |
124 | interrupt-parent = <&mpic>; | 124 | interrupt-parent = <&mpic>; |
125 | interrupts = <17 2>; | 125 | interrupts = <23 2>; |
126 | }; | 126 | }; |
127 | }; | 127 | }; |
128 | 128 | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/esdhc.txt b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt new file mode 100644 index 000000000000..600846557763 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/esdhc.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * Freescale Enhanced Secure Digital Host Controller (eSDHC) | ||
2 | |||
3 | The Enhanced Secure Digital Host Controller provides an interface | ||
4 | for MMC, SD, and SDIO types of memory cards. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : should be | ||
8 | "fsl,<chip>-esdhc", "fsl,mpc8379-esdhc" for MPC83xx processors. | ||
9 | "fsl,<chip>-esdhc", "fsl,mpc8536-esdhc" for MPC85xx processors. | ||
10 | - reg : should contain eSDHC registers location and length. | ||
11 | - interrupts : should contain eSDHC interrupt. | ||
12 | - interrupt-parent : interrupt source phandle. | ||
13 | - clock-frequency : specifies eSDHC base clock frequency. | ||
14 | |||
15 | Example: | ||
16 | |||
17 | sdhci@2e000 { | ||
18 | compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc"; | ||
19 | reg = <0x2e000 0x1000>; | ||
20 | interrupts = <42 0x8>; | ||
21 | interrupt-parent = <&ipic>; | ||
22 | /* Filled in by U-Boot */ | ||
23 | clock-frequency = <0>; | ||
24 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/ssi.txt b/Documentation/powerpc/dts-bindings/fsl/ssi.txt index a2d963998a65..5ff76c9c57d2 100644 --- a/Documentation/powerpc/dts-bindings/fsl/ssi.txt +++ b/Documentation/powerpc/dts-bindings/fsl/ssi.txt | |||
@@ -4,44 +4,56 @@ The SSI is a serial device that communicates with audio codecs. It can | |||
4 | be programmed in AC97, I2S, left-justified, or right-justified modes. | 4 | be programmed in AC97, I2S, left-justified, or right-justified modes. |
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible : compatible list, containing "fsl,ssi" | 7 | - compatible: Compatible list, contains "fsl,ssi". |
8 | - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on | 8 | - cell-index: The SSI, <0> = SSI1, <1> = SSI2, and so on. |
9 | - reg : offset and length of the register set for the device | 9 | - reg: Offset and length of the register set for the device. |
10 | - interrupts : <a b> where a is the interrupt number and b is a | 10 | - interrupts: <a b> where a is the interrupt number and b is a |
11 | field that represents an encoding of the sense and | 11 | field that represents an encoding of the sense and |
12 | level information for the interrupt. This should be | 12 | level information for the interrupt. This should be |
13 | encoded based on the information in section 2) | 13 | encoded based on the information in section 2) |
14 | depending on the type of interrupt controller you | 14 | depending on the type of interrupt controller you |
15 | have. | 15 | have. |
16 | - interrupt-parent : the phandle for the interrupt controller that | 16 | - interrupt-parent: The phandle for the interrupt controller that |
17 | services interrupts for this device. | 17 | services interrupts for this device. |
18 | - fsl,mode : the operating mode for the SSI interface | 18 | - fsl,mode: The operating mode for the SSI interface. |
19 | "i2s-slave" - I2S mode, SSI is clock slave | 19 | "i2s-slave" - I2S mode, SSI is clock slave |
20 | "i2s-master" - I2S mode, SSI is clock master | 20 | "i2s-master" - I2S mode, SSI is clock master |
21 | "lj-slave" - left-justified mode, SSI is clock slave | 21 | "lj-slave" - left-justified mode, SSI is clock slave |
22 | "lj-master" - l.j. mode, SSI is clock master | 22 | "lj-master" - l.j. mode, SSI is clock master |
23 | "rj-slave" - right-justified mode, SSI is clock slave | 23 | "rj-slave" - right-justified mode, SSI is clock slave |
24 | "rj-master" - r.j., SSI is clock master | 24 | "rj-master" - r.j., SSI is clock master |
25 | "ac97-slave" - AC97 mode, SSI is clock slave | 25 | "ac97-slave" - AC97 mode, SSI is clock slave |
26 | "ac97-master" - AC97 mode, SSI is clock master | 26 | "ac97-master" - AC97 mode, SSI is clock master |
27 | - fsl,playback-dma: phandle to a node for the DMA channel to use for | 27 | - fsl,playback-dma: Phandle to a node for the DMA channel to use for |
28 | playback of audio. This is typically dictated by SOC | 28 | playback of audio. This is typically dictated by SOC |
29 | design. See the notes below. | 29 | design. See the notes below. |
30 | - fsl,capture-dma: phandle to a node for the DMA channel to use for | 30 | - fsl,capture-dma: Phandle to a node for the DMA channel to use for |
31 | capture (recording) of audio. This is typically dictated | 31 | capture (recording) of audio. This is typically dictated |
32 | by SOC design. See the notes below. | 32 | by SOC design. See the notes below. |
33 | - fsl,fifo-depth: The number of elements in the transmit and receive FIFOs. | ||
34 | This number is the maximum allowed value for SFCSR[TFWM0]. | ||
35 | - fsl,ssi-asynchronous: | ||
36 | If specified, the SSI is to be programmed in asynchronous | ||
37 | mode. In this mode, pins SRCK, STCK, SRFS, and STFS must | ||
38 | all be connected to valid signals. In synchronous mode, | ||
39 | SRCK and SRFS are ignored. Asynchronous mode allows | ||
40 | playback and capture to use different sample sizes and | ||
41 | sample rates. Some drivers may require that SRCK and STCK | ||
42 | be connected together, and SRFS and STFS be connected | ||
43 | together. This would still allow different sample sizes, | ||
44 | but not different sample rates. | ||
33 | 45 | ||
34 | Optional properties: | 46 | Optional properties: |
35 | - codec-handle : phandle to a 'codec' node that defines an audio | 47 | - codec-handle: Phandle to a 'codec' node that defines an audio |
36 | codec connected to this SSI. This node is typically | 48 | codec connected to this SSI. This node is typically |
37 | a child of an I2C or other control node. | 49 | a child of an I2C or other control node. |
38 | 50 | ||
39 | Child 'codec' node required properties: | 51 | Child 'codec' node required properties: |
40 | - compatible : compatible list, contains the name of the codec | 52 | - compatible: Compatible list, contains the name of the codec |
41 | 53 | ||
42 | Child 'codec' node optional properties: | 54 | Child 'codec' node optional properties: |
43 | - clock-frequency : The frequency of the input clock, which typically | 55 | - clock-frequency: The frequency of the input clock, which typically comes |
44 | comes from an on-board dedicated oscillator. | 56 | from an on-board dedicated oscillator. |
45 | 57 | ||
46 | Notes on fsl,playback-dma and fsl,capture-dma: | 58 | Notes on fsl,playback-dma and fsl,capture-dma: |
47 | 59 | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/tsec.txt b/Documentation/powerpc/dts-bindings/fsl/tsec.txt index 7fa4b27574b5..edb7ae19e868 100644 --- a/Documentation/powerpc/dts-bindings/fsl/tsec.txt +++ b/Documentation/powerpc/dts-bindings/fsl/tsec.txt | |||
@@ -56,6 +56,12 @@ Properties: | |||
56 | hardware. | 56 | hardware. |
57 | - fsl,magic-packet : If present, indicates that the hardware supports | 57 | - fsl,magic-packet : If present, indicates that the hardware supports |
58 | waking up via magic packet. | 58 | waking up via magic packet. |
59 | - bd-stash : If present, indicates that the hardware supports stashing | ||
60 | buffer descriptors in the L2. | ||
61 | - rx-stash-len : Denotes the number of bytes of a received buffer to stash | ||
62 | in the L2. | ||
63 | - rx-stash-idx : Denotes the index of the first byte from the received | ||
64 | buffer to stash in the L2. | ||
59 | 65 | ||
60 | Example: | 66 | Example: |
61 | ethernet@24000 { | 67 | ethernet@24000 { |
diff --git a/Documentation/powerpc/dts-bindings/mmc-spi-slot.txt b/Documentation/powerpc/dts-bindings/mmc-spi-slot.txt new file mode 100644 index 000000000000..c39ac2891951 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/mmc-spi-slot.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | MMC/SD/SDIO slot directly connected to a SPI bus | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be "mmc-spi-slot". | ||
5 | - reg : should specify SPI address (chip-select number). | ||
6 | - spi-max-frequency : maximum frequency for this device (Hz). | ||
7 | - voltage-ranges : two cells are required, first cell specifies minimum | ||
8 | slot voltage (mV), second cell specifies maximum slot voltage (mV). | ||
9 | Several ranges could be specified. | ||
10 | - gpios : (optional) may specify GPIOs in this order: Card-Detect GPIO, | ||
11 | Write-Protect GPIO. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | mmc-slot@0 { | ||
16 | compatible = "fsl,mpc8323rdb-mmc-slot", | ||
17 | "mmc-spi-slot"; | ||
18 | reg = <0>; | ||
19 | gpios = <&qe_pio_d 14 1 | ||
20 | &qe_pio_d 15 0>; | ||
21 | voltage-ranges = <3300 3300>; | ||
22 | spi-max-frequency = <50000000>; | ||
23 | }; | ||
diff --git a/Documentation/scheduler/00-INDEX b/Documentation/scheduler/00-INDEX index aabcc3a089ba..3c00c9c3219e 100644 --- a/Documentation/scheduler/00-INDEX +++ b/Documentation/scheduler/00-INDEX | |||
@@ -2,8 +2,6 @@ | |||
2 | - this file. | 2 | - this file. |
3 | sched-arch.txt | 3 | sched-arch.txt |
4 | - CPU Scheduler implementation hints for architecture specific code. | 4 | - CPU Scheduler implementation hints for architecture specific code. |
5 | sched-coding.txt | ||
6 | - reference for various scheduler-related methods in the O(1) scheduler. | ||
7 | sched-design-CFS.txt | 5 | sched-design-CFS.txt |
8 | - goals, design and implementation of the Complete Fair Scheduler. | 6 | - goals, design and implementation of the Complete Fair Scheduler. |
9 | sched-domains.txt | 7 | sched-domains.txt |
diff --git a/Documentation/scheduler/sched-coding.txt b/Documentation/scheduler/sched-coding.txt deleted file mode 100644 index cbd8db752acf..000000000000 --- a/Documentation/scheduler/sched-coding.txt +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | Reference for various scheduler-related methods in the O(1) scheduler | ||
2 | Robert Love <rml@tech9.net>, MontaVista Software | ||
3 | |||
4 | |||
5 | Note most of these methods are local to kernel/sched.c - this is by design. | ||
6 | The scheduler is meant to be self-contained and abstracted away. This document | ||
7 | is primarily for understanding the scheduler, not interfacing to it. Some of | ||
8 | the discussed interfaces, however, are general process/scheduling methods. | ||
9 | They are typically defined in include/linux/sched.h. | ||
10 | |||
11 | |||
12 | Main Scheduling Methods | ||
13 | ----------------------- | ||
14 | |||
15 | void load_balance(runqueue_t *this_rq, int idle) | ||
16 | Attempts to pull tasks from one cpu to another to balance cpu usage, | ||
17 | if needed. This method is called explicitly if the runqueues are | ||
18 | imbalanced or periodically by the timer tick. Prior to calling, | ||
19 | the current runqueue must be locked and interrupts disabled. | ||
20 | |||
21 | void schedule() | ||
22 | The main scheduling function. Upon return, the highest priority | ||
23 | process will be active. | ||
24 | |||
25 | |||
26 | Locking | ||
27 | ------- | ||
28 | |||
29 | Each runqueue has its own lock, rq->lock. When multiple runqueues need | ||
30 | to be locked, lock acquires must be ordered by ascending &runqueue value. | ||
31 | |||
32 | A specific runqueue is locked via | ||
33 | |||
34 | task_rq_lock(task_t pid, unsigned long *flags) | ||
35 | |||
36 | which disables preemption, disables interrupts, and locks the runqueue pid is | ||
37 | running on. Likewise, | ||
38 | |||
39 | task_rq_unlock(task_t pid, unsigned long *flags) | ||
40 | |||
41 | unlocks the runqueue pid is running on, restores interrupts to their previous | ||
42 | state, and reenables preemption. | ||
43 | |||
44 | The routines | ||
45 | |||
46 | double_rq_lock(runqueue_t *rq1, runqueue_t *rq2) | ||
47 | |||
48 | and | ||
49 | |||
50 | double_rq_unlock(runqueue_t *rq1, runqueue_t *rq2) | ||
51 | |||
52 | safely lock and unlock, respectively, the two specified runqueues. They do | ||
53 | not, however, disable and restore interrupts. Users are required to do so | ||
54 | manually before and after calls. | ||
55 | |||
56 | |||
57 | Values | ||
58 | ------ | ||
59 | |||
60 | MAX_PRIO | ||
61 | The maximum priority of the system, stored in the task as task->prio. | ||
62 | Lower priorities are higher. Normal (non-RT) priorities range from | ||
63 | MAX_RT_PRIO to (MAX_PRIO - 1). | ||
64 | MAX_RT_PRIO | ||
65 | The maximum real-time priority of the system. Valid RT priorities | ||
66 | range from 0 to (MAX_RT_PRIO - 1). | ||
67 | MAX_USER_RT_PRIO | ||
68 | The maximum real-time priority that is exported to user-space. Should | ||
69 | always be equal to or less than MAX_RT_PRIO. Setting it less allows | ||
70 | kernel threads to have higher priorities than any user-space task. | ||
71 | MIN_TIMESLICE | ||
72 | MAX_TIMESLICE | ||
73 | Respectively, the minimum and maximum timeslices (quanta) of a process. | ||
74 | |||
75 | Data | ||
76 | ---- | ||
77 | |||
78 | struct runqueue | ||
79 | The main per-CPU runqueue data structure. | ||
80 | struct task_struct | ||
81 | The main per-process data structure. | ||
82 | |||
83 | |||
84 | General Methods | ||
85 | --------------- | ||
86 | |||
87 | cpu_rq(cpu) | ||
88 | Returns the runqueue of the specified cpu. | ||
89 | this_rq() | ||
90 | Returns the runqueue of the current cpu. | ||
91 | task_rq(pid) | ||
92 | Returns the runqueue which holds the specified pid. | ||
93 | cpu_curr(cpu) | ||
94 | Returns the task currently running on the given cpu. | ||
95 | rt_task(pid) | ||
96 | Returns true if pid is real-time, false if not. | ||
97 | |||
98 | |||
99 | Process Control Methods | ||
100 | ----------------------- | ||
101 | |||
102 | void set_user_nice(task_t *p, long nice) | ||
103 | Sets the "nice" value of task p to the given value. | ||
104 | int setscheduler(pid_t pid, int policy, struct sched_param *param) | ||
105 | Sets the scheduling policy and parameters for the given pid. | ||
106 | int set_cpus_allowed(task_t *p, unsigned long new_mask) | ||
107 | Sets a given task's CPU affinity and migrates it to a proper cpu. | ||
108 | Callers must have a valid reference to the task and assure the | ||
109 | task not exit prematurely. No locks can be held during the call. | ||
110 | set_task_state(tsk, state_value) | ||
111 | Sets the given task's state to the given value. | ||
112 | set_current_state(state_value) | ||
113 | Sets the current task's state to the given value. | ||
114 | void set_tsk_need_resched(struct task_struct *tsk) | ||
115 | Sets need_resched in the given task. | ||
116 | void clear_tsk_need_resched(struct task_struct *tsk) | ||
117 | Clears need_resched in the given task. | ||
118 | void set_need_resched() | ||
119 | Sets need_resched in the current task. | ||
120 | void clear_need_resched() | ||
121 | Clears need_resched in the current task. | ||
122 | int need_resched() | ||
123 | Returns true if need_resched is set in the current task, false | ||
124 | otherwise. | ||
125 | yield() | ||
126 | Place the current process at the end of the runqueue and call schedule. | ||
diff --git a/Documentation/scsi/osd.txt b/Documentation/scsi/osd.txt new file mode 100644 index 000000000000..da162f7fd5f5 --- /dev/null +++ b/Documentation/scsi/osd.txt | |||
@@ -0,0 +1,198 @@ | |||
1 | The OSD Standard | ||
2 | ================ | ||
3 | OSD (Object-Based Storage Device) is a T10 SCSI command set that is designed | ||
4 | to provide efficient operation of input/output logical units that manage the | ||
5 | allocation, placement, and accessing of variable-size data-storage containers, | ||
6 | called objects. Objects are intended to contain operating system and application | ||
7 | constructs. Each object has associated attributes attached to it, which are | ||
8 | integral part of the object and provide metadata about the object. The standard | ||
9 | defines some common obligatory attributes, but user attributes can be added as | ||
10 | needed. | ||
11 | |||
12 | See: http://www.t10.org/ftp/t10/drafts/osd2/ for the latest draft for OSD 2 | ||
13 | or search the web for "OSD SCSI" | ||
14 | |||
15 | OSD in the Linux Kernel | ||
16 | ======================= | ||
17 | osd-initiator: | ||
18 | The main component of OSD in Kernel is the osd-initiator library. Its main | ||
19 | user is intended to be the pNFS-over-objects layout driver, which uses objects | ||
20 | as its back-end data storage. Other clients are the other osd parts listed below. | ||
21 | |||
22 | osd-uld: | ||
23 | This is a SCSI ULD that registers for OSD type devices and provides a testing | ||
24 | platform, both for the in-kernel initiator as well as connected targets. It | ||
25 | currently has no useful user-mode API, though it could have if need be. | ||
26 | |||
27 | exofs: | ||
28 | Is an OSD based Linux file system. It uses the osd-initiator and osd-uld, | ||
29 | to export a usable file system for users. | ||
30 | See Documentation/filesystems/exofs.txt for more details | ||
31 | |||
32 | osd target: | ||
33 | There are no current plans for an OSD target implementation in kernel. For all | ||
34 | needs, a user-mode target that is based on the scsi tgt target framework is | ||
35 | available from Ohio Supercomputer Center (OSC) at: | ||
36 | http://www.open-osd.org/bin/view/Main/OscOsdProject | ||
37 | There are several other target implementations. See http://open-osd.org for more | ||
38 | links. | ||
39 | |||
40 | Files and Folders | ||
41 | ================= | ||
42 | This is the complete list of files included in this work: | ||
43 | include/scsi/ | ||
44 | osd_initiator.h Main API for the initiator library | ||
45 | osd_types.h Common OSD types | ||
46 | osd_sec.h Security Manager API | ||
47 | osd_protocol.h Wire definitions of the OSD standard protocol | ||
48 | osd_attributes.h Wire definitions of OSD attributes | ||
49 | |||
50 | drivers/scsi/osd/ | ||
51 | osd_initiator.c OSD-Initiator library implementation | ||
52 | osd_uld.c The OSD scsi ULD | ||
53 | osd_ktest.{h,c} In-kernel test suite (called by osd_uld) | ||
54 | osd_debug.h Some printk macros | ||
55 | Makefile For both in-tree and out-of-tree compilation | ||
56 | Kconfig Enables inclusion of the different pieces | ||
57 | osd_test.c User-mode application to call the kernel tests | ||
58 | |||
59 | The OSD-Initiator Library | ||
60 | ========================= | ||
61 | osd_initiator is a low level implementation of an osd initiator encoder. | ||
62 | But even though, it should be intuitive and easy to use. Perhaps over time an | ||
63 | higher lever will form that automates some of the more common recipes. | ||
64 | |||
65 | init/fini: | ||
66 | - osd_dev_init() associates a scsi_device with an osd_dev structure | ||
67 | and initializes some global pools. This should be done once per scsi_device | ||
68 | (OSD LUN). The osd_dev structure is needed for calling osd_start_request(). | ||
69 | |||
70 | - osd_dev_fini() cleans up before a osd_dev/scsi_device destruction. | ||
71 | |||
72 | OSD commands encoding, execution, and decoding of results: | ||
73 | |||
74 | struct osd_request's is used to iteratively encode an OSD command and carry | ||
75 | its state throughout execution. Each request goes through these stages: | ||
76 | |||
77 | a. osd_start_request() allocates the request. | ||
78 | |||
79 | b. Any of the osd_req_* methods is used to encode a request of the specified | ||
80 | type. | ||
81 | |||
82 | c. osd_req_add_{get,set}_attr_* may be called to add get/set attributes to the | ||
83 | CDB. "List" or "Page" mode can be used exclusively. The attribute-list API | ||
84 | can be called multiple times on the same request. However, only one | ||
85 | attribute-page can be read, as mandated by the OSD standard. | ||
86 | |||
87 | d. osd_finalize_request() computes offsets into the data-in and data-out buffers | ||
88 | and signs the request using the provided capability key and integrity- | ||
89 | check parameters. | ||
90 | |||
91 | e. osd_execute_request() may be called to execute the request via the block | ||
92 | layer and wait for its completion. The request can be executed | ||
93 | asynchronously by calling the block layer API directly. | ||
94 | |||
95 | f. After execution, osd_req_decode_sense() can be called to decode the request's | ||
96 | sense information. | ||
97 | |||
98 | g. osd_req_decode_get_attr() may be called to retrieve osd_add_get_attr_list() | ||
99 | values. | ||
100 | |||
101 | h. osd_end_request() must be called to deallocate the request and any resource | ||
102 | associated with it. Note that osd_end_request cleans up the request at any | ||
103 | stage and it must always be called after a successful osd_start_request(). | ||
104 | |||
105 | osd_request's structure: | ||
106 | |||
107 | The OSD standard defines a complex structure of IO segments pointed to by | ||
108 | members in the CDB. Up to 3 segments can be deployed in the IN-Buffer and up to | ||
109 | 4 in the OUT-Buffer. The ASCII illustration below depicts a secure-read with | ||
110 | associated get+set of attributes-lists. Other combinations very on the same | ||
111 | basic theme. From no-segments-used up to all-segments-used. | ||
112 | |||
113 | |________OSD-CDB__________| | ||
114 | | | | ||
115 | |read_len (offset=0) -|---------\ | ||
116 | | | | | ||
117 | |get_attrs_list_length | | | ||
118 | |get_attrs_list_offset -|----\ | | ||
119 | | | | | | ||
120 | |retrieved_attrs_alloc_len| | | | ||
121 | |retrieved_attrs_offset -|----|----|-\ | ||
122 | | | | | | | ||
123 | |set_attrs_list_length | | | | | ||
124 | |set_attrs_list_offset -|-\ | | | | ||
125 | | | | | | | | ||
126 | |in_data_integ_offset -|-|--|----|-|-\ | ||
127 | |out_data_integ_offset -|-|--|--\ | | | | ||
128 | \_________________________/ | | | | | | | ||
129 | | | | | | | | ||
130 | |_______OUT-BUFFER________| | | | | | | | ||
131 | | Set attr list |</ | | | | | | ||
132 | | | | | | | | | ||
133 | |-------------------------| | | | | | | ||
134 | | Get attr descriptors |<---/ | | | | | ||
135 | | | | | | | | ||
136 | |-------------------------| | | | | | ||
137 | | Out-data integrity |<------/ | | | | ||
138 | | | | | | | ||
139 | \_________________________/ | | | | ||
140 | | | | | ||
141 | |________IN-BUFFER________| | | | | ||
142 | | In-Data read |<--------/ | | | ||
143 | | | | | | ||
144 | |-------------------------| | | | ||
145 | | Get attr list |<----------/ | | ||
146 | | | | | ||
147 | |-------------------------| | | ||
148 | | In-data integrity |<------------/ | ||
149 | | | | ||
150 | \_________________________/ | ||
151 | |||
152 | A block device request can carry bidirectional payload by means of associating | ||
153 | a bidi_read request with a main write-request. Each in/out request is described | ||
154 | by a chain of BIOs associated with each request. | ||
155 | The CDB is of a SCSI VARLEN CDB format, as described by OSD standard. | ||
156 | The OSD standard also mandates alignment restrictions at start of each segment. | ||
157 | |||
158 | In the code, in struct osd_request, there are two _osd_io_info structures to | ||
159 | describe the IN/OUT buffers above, two BIOs for the data payload and up to five | ||
160 | _osd_req_data_segment structures to hold the different segments allocation and | ||
161 | information. | ||
162 | |||
163 | Important: We have chosen to disregard the assumption that a BIO-chain (and | ||
164 | the resulting sg-list) describes a linear memory buffer. Meaning only first and | ||
165 | last scatter chain can be incomplete and all the middle chains are of PAGE_SIZE. | ||
166 | For us, a scatter-gather-list, as its name implies and as used by the Networking | ||
167 | layer, is to describe a vector of buffers that will be transferred to/from the | ||
168 | wire. It works very well with current iSCSI transport. iSCSI is currently the | ||
169 | only deployed OSD transport. In the future we anticipate SAS and FC attached OSD | ||
170 | devices as well. | ||
171 | |||
172 | The OSD Testing ULD | ||
173 | =================== | ||
174 | TODO: More user-mode control on tests. | ||
175 | |||
176 | Authors, Mailing list | ||
177 | ===================== | ||
178 | Please communicate with us on any deployment of osd, whether using this code | ||
179 | or not. | ||
180 | |||
181 | Any problems, questions, bug reports, lonely OSD nights, please email: | ||
182 | OSD Dev List <osd-dev@open-osd.org> | ||
183 | |||
184 | More up-to-date information can be found on: | ||
185 | http://open-osd.org | ||
186 | |||
187 | Boaz Harrosh <bharrosh@panasas.com> | ||
188 | Benny Halevy <bhalevy@panasas.com> | ||
189 | |||
190 | References | ||
191 | ========== | ||
192 | Weber, R., "SCSI Object-Based Storage Device Commands", | ||
193 | T10/1355-D ANSI/INCITS 400-2004, | ||
194 | http://www.t10.org/ftp/t10/drafts/osd/osd-r10.pdf | ||
195 | |||
196 | Weber, R., "SCSI Object-Based Storage Device Commands -2 (OSD-2)" | ||
197 | T10/1729-D, Working Draft, rev. 3 | ||
198 | http://www.t10.org/ftp/t10/drafts/osd2/osd2r03.pdf | ||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 841a9365d5fd..012858d2b119 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -346,6 +346,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
346 | sbirq - IRQ # for CMI8330 chip (SB16) | 346 | sbirq - IRQ # for CMI8330 chip (SB16) |
347 | sbdma8 - 8bit DMA # for CMI8330 chip (SB16) | 347 | sbdma8 - 8bit DMA # for CMI8330 chip (SB16) |
348 | sbdma16 - 16bit DMA # for CMI8330 chip (SB16) | 348 | sbdma16 - 16bit DMA # for CMI8330 chip (SB16) |
349 | fmport - (optional) OPL3 I/O port | ||
350 | mpuport - (optional) MPU401 I/O port | ||
351 | mpuirq - (optional) MPU401 irq # | ||
349 | 352 | ||
350 | This module supports multiple cards and autoprobe. | 353 | This module supports multiple cards and autoprobe. |
351 | 354 | ||
@@ -388,34 +391,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
388 | 391 | ||
389 | The power-management is supported. | 392 | The power-management is supported. |
390 | 393 | ||
391 | Module snd-cs4232 | ||
392 | ----------------- | ||
393 | |||
394 | Module for sound cards based on CS4232/CS4232A ISA chips. | ||
395 | |||
396 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | ||
397 | |||
398 | with isapnp=0, the following options are available: | ||
399 | |||
400 | port - port # for CS4232 chip (PnP setup - 0x534) | ||
401 | cport - control port # for CS4232 chip (PnP setup - 0x120,0x210,0xf00) | ||
402 | mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable | ||
403 | fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable | ||
404 | irq - IRQ # for CS4232 chip (5,7,9,11,12,15) | ||
405 | mpu_irq - IRQ # for MPU-401 UART (9,11,12,15) | ||
406 | dma1 - first DMA # for CS4232 chip (0,1,3) | ||
407 | dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable | ||
408 | |||
409 | This module supports multiple cards. This module does not support autoprobe | ||
410 | (if ISA PnP is not used) thus main port must be specified!!! Other ports are | ||
411 | optional. | ||
412 | |||
413 | The power-management is supported. | ||
414 | |||
415 | Module snd-cs4236 | 394 | Module snd-cs4236 |
416 | ----------------- | 395 | ----------------- |
417 | 396 | ||
418 | Module for sound cards based on CS4235/CS4236/CS4236B/CS4237B/ | 397 | Module for sound cards based on CS4232/CS4232A, |
398 | CS4235/CS4236/CS4236B/CS4237B/ | ||
419 | CS4238B/CS4239 ISA chips. | 399 | CS4238B/CS4239 ISA chips. |
420 | 400 | ||
421 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | 401 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) |
@@ -437,6 +417,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
437 | 417 | ||
438 | The power-management is supported. | 418 | The power-management is supported. |
439 | 419 | ||
420 | This module is aliased as snd-cs4232 since it provides the old | ||
421 | snd-cs4232 functionality, too. | ||
422 | |||
440 | Module snd-cs4281 | 423 | Module snd-cs4281 |
441 | ----------------- | 424 | ----------------- |
442 | 425 | ||
@@ -606,6 +589,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
606 | Module for ESS AudioDrive ES-1688 and ES-688 sound cards. | 589 | Module for ESS AudioDrive ES-1688 and ES-688 sound cards. |
607 | 590 | ||
608 | port - port # for ES-1688 chip (0x220,0x240,0x260) | 591 | port - port # for ES-1688 chip (0x220,0x240,0x260) |
592 | fm_port - port # for OPL3 (option; share the same port as default) | ||
609 | mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) | 593 | mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) |
610 | irq - IRQ # for ES-1688 chip (5,7,9,10) | 594 | irq - IRQ # for ES-1688 chip (5,7,9,10) |
611 | mpu_irq - IRQ # for MPU-401 port (5,7,9,10) | 595 | mpu_irq - IRQ # for MPU-401 port (5,7,9,10) |
@@ -757,6 +741,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
757 | model - force the model name | 741 | model - force the model name |
758 | position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF) | 742 | position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF) |
759 | probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) | 743 | probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) |
744 | When the bit 8 (0x100) is set, the lower 8 bits are used | ||
745 | as the "fixed" codec slots; i.e. the driver probes the | ||
746 | slots regardless what hardware reports back | ||
760 | probe_only - Only probing and no codec initialization (default=off); | 747 | probe_only - Only probing and no codec initialization (default=off); |
761 | Useful to check the initial codec status for debugging | 748 | Useful to check the initial codec status for debugging |
762 | bdl_pos_adj - Specifies the DMA IRQ timing delay in samples. | 749 | bdl_pos_adj - Specifies the DMA IRQ timing delay in samples. |
@@ -1185,6 +1172,54 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1185 | 1172 | ||
1186 | This module supports multiple devices and PnP. | 1173 | This module supports multiple devices and PnP. |
1187 | 1174 | ||
1175 | Module snd-msnd-classic | ||
1176 | ----------------------- | ||
1177 | |||
1178 | Module for Turtle Beach MultiSound Classic, Tahiti or Monterey | ||
1179 | soundcards. | ||
1180 | |||
1181 | io - Port # for msnd-classic card | ||
1182 | irq - IRQ # for msnd-classic card | ||
1183 | mem - Memory address (0xb0000, 0xc8000, 0xd0000, 0xd8000, | ||
1184 | 0xe0000 or 0xe8000) | ||
1185 | write_ndelay - enable write ndelay (default = 1) | ||
1186 | calibrate_signal - calibrate signal (default = 0) | ||
1187 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | ||
1188 | digital - Digital daughterboard present (default = 0) | ||
1189 | cfg - Config port (0x250, 0x260 or 0x270) default = PnP | ||
1190 | reset - Reset all devices | ||
1191 | mpu_io - MPU401 I/O port | ||
1192 | mpu_irq - MPU401 irq# | ||
1193 | ide_io0 - IDE port #0 | ||
1194 | ide_io1 - IDE port #1 | ||
1195 | ide_irq - IDE irq# | ||
1196 | joystick_io - Joystick I/O port | ||
1197 | |||
1198 | The driver requires firmware files "turtlebeach/msndinit.bin" and | ||
1199 | "turtlebeach/msndperm.bin" in the proper firmware directory. | ||
1200 | |||
1201 | See Documentation/sound/oss/MultiSound for important information | ||
1202 | about this driver. Note that it has been discontinued, but the | ||
1203 | Voyetra Turtle Beach knowledge base entry for it is still available | ||
1204 | at | ||
1205 | http://www.turtlebeach.com/site/kb_ftp/790.asp | ||
1206 | |||
1207 | Module snd-msnd-pinnacle | ||
1208 | ------------------------ | ||
1209 | |||
1210 | Module for Turtle Beach MultiSound Pinnacle/Fiji soundcards. | ||
1211 | |||
1212 | io - Port # for pinnacle/fiji card | ||
1213 | irq - IRQ # for pinnalce/fiji card | ||
1214 | mem - Memory address (0xb0000, 0xc8000, 0xd0000, 0xd8000, | ||
1215 | 0xe0000 or 0xe8000) | ||
1216 | write_ndelay - enable write ndelay (default = 1) | ||
1217 | calibrate_signal - calibrate signal (default = 0) | ||
1218 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | ||
1219 | |||
1220 | The driver requires firmware files "turtlebeach/pndspini.bin" and | ||
1221 | "turtlebeach/pndsperm.bin" in the proper firmware directory. | ||
1222 | |||
1188 | Module snd-mtpav | 1223 | Module snd-mtpav |
1189 | ---------------- | 1224 | ---------------- |
1190 | 1225 | ||
@@ -1824,7 +1859,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
1824 | ------------------- | 1859 | ------------------- |
1825 | 1860 | ||
1826 | Module for sound cards based on the Asus AV100/AV200 chips, | 1861 | Module for sound cards based on the Asus AV100/AV200 chips, |
1827 | i.e., Xonar D1, DX, D2, D2X and HDAV1.3 (Deluxe). | 1862 | i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), and Essence STX. |
1828 | 1863 | ||
1829 | This module supports autoprobe and multiple cards. | 1864 | This module supports autoprobe and multiple cards. |
1830 | 1865 | ||
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 0f5d26bea80f..8eec05bc079e 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -56,6 +56,7 @@ ALC262 | |||
56 | sony-assamd Sony ASSAMD | 56 | sony-assamd Sony ASSAMD |
57 | toshiba-s06 Toshiba S06 | 57 | toshiba-s06 Toshiba S06 |
58 | toshiba-rx1 Toshiba RX1 | 58 | toshiba-rx1 Toshiba RX1 |
59 | tyan Tyan Thunder n6650W (S2915-E) | ||
59 | ultra Samsung Q1 Ultra Vista model | 60 | ultra Samsung Q1 Ultra Vista model |
60 | lenovo-3000 Lenovo 3000 y410 | 61 | lenovo-3000 Lenovo 3000 y410 |
61 | nec NEC Versa S9100 | 62 | nec NEC Versa S9100 |
@@ -261,6 +262,8 @@ Conexant 5051 | |||
261 | ============= | 262 | ============= |
262 | laptop Basic Laptop config (default) | 263 | laptop Basic Laptop config (default) |
263 | hp HP Spartan laptop | 264 | hp HP Spartan laptop |
265 | hp-dv6736 HP dv6736 | ||
266 | lenovo-x200 Lenovo X200 laptop | ||
264 | 267 | ||
265 | STAC9200 | 268 | STAC9200 |
266 | ======== | 269 | ======== |
@@ -278,6 +281,7 @@ STAC9200 | |||
278 | gateway-m4 Gateway laptops with EAPD control | 281 | gateway-m4 Gateway laptops with EAPD control |
279 | gateway-m4-2 Gateway laptops with EAPD control | 282 | gateway-m4-2 Gateway laptops with EAPD control |
280 | panasonic Panasonic CF-74 | 283 | panasonic Panasonic CF-74 |
284 | auto BIOS setup (default) | ||
281 | 285 | ||
282 | STAC9205/9254 | 286 | STAC9205/9254 |
283 | ============= | 287 | ============= |
@@ -285,6 +289,8 @@ STAC9205/9254 | |||
285 | dell-m42 Dell (unknown) | 289 | dell-m42 Dell (unknown) |
286 | dell-m43 Dell Precision | 290 | dell-m43 Dell Precision |
287 | dell-m44 Dell Inspiron | 291 | dell-m44 Dell Inspiron |
292 | eapd Keep EAPD on (e.g. Gateway T1616) | ||
293 | auto BIOS setup (default) | ||
288 | 294 | ||
289 | STAC9220/9221 | 295 | STAC9220/9221 |
290 | ============= | 296 | ============= |
@@ -308,6 +314,7 @@ STAC9220/9221 | |||
308 | dell-d82 Dell (unknown) | 314 | dell-d82 Dell (unknown) |
309 | dell-m81 Dell (unknown) | 315 | dell-m81 Dell (unknown) |
310 | dell-m82 Dell XPS M1210 | 316 | dell-m82 Dell XPS M1210 |
317 | auto BIOS setup (default) | ||
311 | 318 | ||
312 | STAC9202/9250/9251 | 319 | STAC9202/9250/9251 |
313 | ================== | 320 | ================== |
@@ -319,6 +326,7 @@ STAC9202/9250/9251 | |||
319 | m3 Some Gateway MX series laptops | 326 | m3 Some Gateway MX series laptops |
320 | m5 Some Gateway MX series laptops (MP6954) | 327 | m5 Some Gateway MX series laptops (MP6954) |
321 | m6 Some Gateway NX series laptops | 328 | m6 Some Gateway NX series laptops |
329 | auto BIOS setup (default) | ||
322 | 330 | ||
323 | STAC9227/9228/9229/927x | 331 | STAC9227/9228/9229/927x |
324 | ======================= | 332 | ======================= |
@@ -328,6 +336,7 @@ STAC9227/9228/9229/927x | |||
328 | 5stack D965 5stack + SPDIF | 336 | 5stack D965 5stack + SPDIF |
329 | dell-3stack Dell Dimension E520 | 337 | dell-3stack Dell Dimension E520 |
330 | dell-bios Fixes with Dell BIOS setup | 338 | dell-bios Fixes with Dell BIOS setup |
339 | auto BIOS setup (default) | ||
331 | 340 | ||
332 | STAC92HD71B* | 341 | STAC92HD71B* |
333 | ============ | 342 | ============ |
@@ -335,7 +344,10 @@ STAC92HD71B* | |||
335 | dell-m4-1 Dell desktops | 344 | dell-m4-1 Dell desktops |
336 | dell-m4-2 Dell desktops | 345 | dell-m4-2 Dell desktops |
337 | dell-m4-3 Dell desktops | 346 | dell-m4-3 Dell desktops |
338 | hp-m4 HP dv laptops | 347 | hp-m4 HP mini 1000 |
348 | hp-dv5 HP dv series | ||
349 | hp-hdx HP HDX series | ||
350 | auto BIOS setup (default) | ||
339 | 351 | ||
340 | STAC92HD73* | 352 | STAC92HD73* |
341 | =========== | 353 | =========== |
@@ -345,13 +357,16 @@ STAC92HD73* | |||
345 | dell-m6-dmic Dell desktops/laptops with digital mics | 357 | dell-m6-dmic Dell desktops/laptops with digital mics |
346 | dell-m6 Dell desktops/laptops with both type of mics | 358 | dell-m6 Dell desktops/laptops with both type of mics |
347 | dell-eq Dell desktops/laptops | 359 | dell-eq Dell desktops/laptops |
360 | auto BIOS setup (default) | ||
348 | 361 | ||
349 | STAC92HD83* | 362 | STAC92HD83* |
350 | =========== | 363 | =========== |
351 | ref Reference board | 364 | ref Reference board |
352 | mic-ref Reference board with power managment for ports | 365 | mic-ref Reference board with power managment for ports |
366 | dell-s14 Dell laptop | ||
367 | auto BIOS setup (default) | ||
353 | 368 | ||
354 | STAC9872 | 369 | STAC9872 |
355 | ======== | 370 | ======== |
356 | vaio Setup for VAIO FE550G/SZ110 | 371 | vaio VAIO laptop without SPDIF |
357 | vaio-ar Setup for VAIO AR | 372 | auto BIOS setup (default) |
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 8d68fff71839..c5948f2f9a25 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -109,6 +109,13 @@ slot, pass `probe_mask=1`. For the first and the third slots, pass | |||
109 | Since 2.6.29 kernel, the driver has a more robust probing method, so | 109 | Since 2.6.29 kernel, the driver has a more robust probing method, so |
110 | this error might happen rarely, though. | 110 | this error might happen rarely, though. |
111 | 111 | ||
112 | On a machine with a broken BIOS, sometimes you need to force the | ||
113 | driver to probe the codec slots the hardware doesn't report for use. | ||
114 | In such a case, turn the bit 8 (0x100) of `probe_mask` option on. | ||
115 | Then the rest 8 bits are passed as the codec slots to probe | ||
116 | unconditionally. For example, `probe_mask=0x103` will force to probe | ||
117 | the codec slots 0 and 1 no matter what the hardware reports. | ||
118 | |||
112 | 119 | ||
113 | Interrupt Handling | 120 | Interrupt Handling |
114 | ~~~~~~~~~~~~~~~~~~ | 121 | ~~~~~~~~~~~~~~~~~~ |
@@ -358,10 +365,26 @@ modelname:: | |||
358 | to this file. | 365 | to this file. |
359 | init_verbs:: | 366 | init_verbs:: |
360 | The extra verbs to execute at initialization. You can add a verb by | 367 | The extra verbs to execute at initialization. You can add a verb by |
361 | writing to this file. Pass tree numbers, nid, verb and parameter. | 368 | writing to this file. Pass three numbers: nid, verb and parameter |
369 | (separated with a space). | ||
362 | hints:: | 370 | hints:: |
363 | Shows hint strings for codec parsers for any use. Right now it's | 371 | Shows / stores hint strings for codec parsers for any use. |
364 | not used. | 372 | Its format is `key = value`. For example, passing `hp_detect = yes` |
373 | to IDT/STAC codec parser will result in the disablement of the | ||
374 | headphone detection. | ||
375 | init_pin_configs:: | ||
376 | Shows the initial pin default config values set by BIOS. | ||
377 | driver_pin_configs:: | ||
378 | Shows the pin default values set by the codec parser explicitly. | ||
379 | This doesn't show all pin values but only the changed values by | ||
380 | the parser. That is, if the parser doesn't change the pin default | ||
381 | config values by itself, this will contain nothing. | ||
382 | user_pin_configs:: | ||
383 | Shows the pin default config values to override the BIOS setup. | ||
384 | Writing this (with two numbers, NID and value) appends the new | ||
385 | value. The given will be used instead of the initial BIOS value at | ||
386 | the next reconfiguration time. Note that this config will override | ||
387 | even the driver pin configs, too. | ||
365 | reconfig:: | 388 | reconfig:: |
366 | Triggers the codec re-configuration. When any value is written to | 389 | Triggers the codec re-configuration. When any value is written to |
367 | this file, the driver re-initialize and parses the codec tree | 390 | this file, the driver re-initialize and parses the codec tree |
@@ -371,6 +394,14 @@ clear:: | |||
371 | Resets the codec, removes the mixer elements and PCM stuff of the | 394 | Resets the codec, removes the mixer elements and PCM stuff of the |
372 | specified codec, and clear all init verbs and hints. | 395 | specified codec, and clear all init verbs and hints. |
373 | 396 | ||
397 | For example, when you want to change the pin default configuration | ||
398 | value of the pin widget 0x14 to 0x9993013f, and let the driver | ||
399 | re-configure based on that state, run like below: | ||
400 | ------------------------------------------------------------------------ | ||
401 | # echo 0x14 0x9993013f > /sys/class/sound/hwC0D0/user_pin_configs | ||
402 | # echo 1 > /sys/class/sound/hwC0D0/reconfig | ||
403 | ------------------------------------------------------------------------ | ||
404 | |||
374 | 405 | ||
375 | Power-Saving | 406 | Power-Saving |
376 | ~~~~~~~~~~~~ | 407 | ~~~~~~~~~~~~ |
@@ -461,6 +492,16 @@ run with `--no-upload` option, and attach the generated file. | |||
461 | There are some other useful options. See `--help` option output for | 492 | There are some other useful options. See `--help` option output for |
462 | details. | 493 | details. |
463 | 494 | ||
495 | When a probe error occurs or when the driver obviously assigns a | ||
496 | mismatched model, it'd be helpful to load the driver with | ||
497 | `probe_only=1` option (at best after the cold reboot) and run | ||
498 | alsa-info at this state. With this option, the driver won't configure | ||
499 | the mixer and PCM but just tries to probe the codec slot. After | ||
500 | probing, the proc file is available, so you can get the raw codec | ||
501 | information before modified by the driver. Of course, the driver | ||
502 | isn't usable with `probe_only=1`. But you can continue the | ||
503 | configuration via hwdep sysfs file if hda-reconfig option is enabled. | ||
504 | |||
464 | 505 | ||
465 | hda-verb | 506 | hda-verb |
466 | ~~~~~~~~ | 507 | ~~~~~~~~ |
diff --git a/Documentation/sound/alsa/soc/dapm.txt b/Documentation/sound/alsa/soc/dapm.txt index 46f9684d0b29..9e6763264a2e 100644 --- a/Documentation/sound/alsa/soc/dapm.txt +++ b/Documentation/sound/alsa/soc/dapm.txt | |||
@@ -116,6 +116,9 @@ SOC_DAPM_SINGLE("HiFi Playback Switch", WM8731_APANA, 4, 1, 0), | |||
116 | SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, wm8731_output_mixer_controls, | 116 | SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, wm8731_output_mixer_controls, |
117 | ARRAY_SIZE(wm8731_output_mixer_controls)), | 117 | ARRAY_SIZE(wm8731_output_mixer_controls)), |
118 | 118 | ||
119 | If you dont want the mixer elements prefixed with the name of the mixer widget, | ||
120 | you can use SND_SOC_DAPM_MIXER_NAMED_CTL instead. the parameters are the same | ||
121 | as for SND_SOC_DAPM_MIXER. | ||
119 | 122 | ||
120 | 2.3 Platform/Machine domain Widgets | 123 | 2.3 Platform/Machine domain Widgets |
121 | ----------------------------------- | 124 | ----------------------------------- |
diff --git a/Documentation/sound/oss/CS4232 b/Documentation/sound/oss/CS4232 deleted file mode 100644 index 7d6af7a5c1c2..000000000000 --- a/Documentation/sound/oss/CS4232 +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | To configure the Crystal CS423x sound chip and activate its DSP functions, | ||
2 | modules may be loaded in this order: | ||
3 | |||
4 | modprobe sound | ||
5 | insmod ad1848 | ||
6 | insmod uart401 | ||
7 | insmod cs4232 io=* irq=* dma=* dma2=* | ||
8 | |||
9 | This is the meaning of the parameters: | ||
10 | |||
11 | io--I/O address of the Windows Sound System (normally 0x534) | ||
12 | irq--IRQ of this device | ||
13 | dma and dma2--DMA channels (DMA2 may be 0) | ||
14 | |||
15 | On some cards, the board attempts to do non-PnP setup, and fails. If you | ||
16 | have problems, use Linux' PnP facilities. | ||
17 | |||
18 | To get MIDI facilities add | ||
19 | |||
20 | insmod opl3 io=* | ||
21 | |||
22 | where "io" is the I/O address of the OPL3 synthesizer. This will be shown | ||
23 | in /proc/sys/pnp and is normally 0x388. | ||
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction index f04ba6bb7395..75d967ff9266 100644 --- a/Documentation/sound/oss/Introduction +++ b/Documentation/sound/oss/Introduction | |||
@@ -80,7 +80,7 @@ Notes: | |||
80 | additional features. | 80 | additional features. |
81 | 81 | ||
82 | 2. The commercial OSS driver may be obtained from the site: | 82 | 2. The commercial OSS driver may be obtained from the site: |
83 | http://www/opensound.com. This may be used for cards that | 83 | http://www.opensound.com. This may be used for cards that |
84 | are unsupported by the kernel driver, or may be used | 84 | are unsupported by the kernel driver, or may be used |
85 | by other operating systems. | 85 | by other operating systems. |
86 | 86 | ||
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 9e592c718afb..afa2946892da 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -81,6 +81,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
81 | 81 | ||
82 | 'i' - Send a SIGKILL to all processes, except for init. | 82 | 'i' - Send a SIGKILL to all processes, except for init. |
83 | 83 | ||
84 | 'j' - Forcibly "Just thaw it" - filesystems frozen by the FIFREEZE ioctl. | ||
85 | |||
84 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual | 86 | 'k' - Secure Access Key (SAK) Kills all programs on the current virtual |
85 | console. NOTE: See important comments below in SAK section. | 87 | console. NOTE: See important comments below in SAK section. |
86 | 88 | ||
@@ -160,6 +162,9 @@ t'E'rm and k'I'll are useful if you have some sort of runaway process you | |||
160 | are unable to kill any other way, especially if it's spawning other | 162 | are unable to kill any other way, especially if it's spawning other |
161 | processes. | 163 | processes. |
162 | 164 | ||
165 | "'J'ust thaw it" is useful if your system becomes unresponsive due to a frozen | ||
166 | (probably root) filesystem via the FIFREEZE ioctl. | ||
167 | |||
163 | * Sometimes SysRq seems to get 'stuck' after using it, what can I do? | 168 | * Sometimes SysRq seems to get 'stuck' after using it, what can I do? |
164 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 169 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
165 | That happens to me, also. I've found that tapping shift, alt, and control | 170 | That happens to me, also. I've found that tapping shift, alt, and control |
diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt index 270481906dc8..6c3c625b7f30 100644 --- a/Documentation/usb/usbmon.txt +++ b/Documentation/usb/usbmon.txt | |||
@@ -229,16 +229,26 @@ struct usbmon_packet { | |||
229 | int status; /* 28: */ | 229 | int status; /* 28: */ |
230 | unsigned int length; /* 32: Length of data (submitted or actual) */ | 230 | unsigned int length; /* 32: Length of data (submitted or actual) */ |
231 | unsigned int len_cap; /* 36: Delivered length */ | 231 | unsigned int len_cap; /* 36: Delivered length */ |
232 | unsigned char setup[8]; /* 40: Only for Control 'S' */ | 232 | union { /* 40: */ |
233 | }; /* 48 bytes total */ | 233 | unsigned char setup[SETUP_LEN]; /* Only for Control S-type */ |
234 | struct iso_rec { /* Only for ISO */ | ||
235 | int error_count; | ||
236 | int numdesc; | ||
237 | } iso; | ||
238 | } s; | ||
239 | int interval; /* 48: Only for Interrupt and ISO */ | ||
240 | int start_frame; /* 52: For ISO */ | ||
241 | unsigned int xfer_flags; /* 56: copy of URB's transfer_flags */ | ||
242 | unsigned int ndesc; /* 60: Actual number of ISO descriptors */ | ||
243 | }; /* 64 total length */ | ||
234 | 244 | ||
235 | These events can be received from a character device by reading with read(2), | 245 | These events can be received from a character device by reading with read(2), |
236 | with an ioctl(2), or by accessing the buffer with mmap. | 246 | with an ioctl(2), or by accessing the buffer with mmap. However, read(2) |
247 | only returns first 48 bytes for compatibility reasons. | ||
237 | 248 | ||
238 | The character device is usually called /dev/usbmonN, where N is the USB bus | 249 | The character device is usually called /dev/usbmonN, where N is the USB bus |
239 | number. Number zero (/dev/usbmon0) is special and means "all buses". | 250 | number. Number zero (/dev/usbmon0) is special and means "all buses". |
240 | However, this feature is not implemented yet. Note that specific naming | 251 | Note that specific naming policy is set by your Linux distribution. |
241 | policy is set by your Linux distribution. | ||
242 | 252 | ||
243 | If you create /dev/usbmon0 by hand, make sure that it is owned by root | 253 | If you create /dev/usbmon0 by hand, make sure that it is owned by root |
244 | and has mode 0600. Otherwise, unpriviledged users will be able to snoop | 254 | and has mode 0600. Otherwise, unpriviledged users will be able to snoop |
@@ -279,9 +289,10 @@ size is out of [unspecified] bounds for this kernel, the call fails with | |||
279 | This call returns the current size of the buffer in bytes. | 289 | This call returns the current size of the buffer in bytes. |
280 | 290 | ||
281 | MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg) | 291 | MON_IOCX_GET, defined as _IOW(MON_IOC_MAGIC, 6, struct mon_get_arg) |
292 | MON_IOCX_GETX, defined as _IOW(MON_IOC_MAGIC, 10, struct mon_get_arg) | ||
282 | 293 | ||
283 | This call waits for events to arrive if none were in the kernel buffer, | 294 | These calls wait for events to arrive if none were in the kernel buffer, |
284 | then returns the first event. Its argument is a pointer to the following | 295 | then return the first event. The argument is a pointer to the following |
285 | structure: | 296 | structure: |
286 | 297 | ||
287 | struct mon_get_arg { | 298 | struct mon_get_arg { |
@@ -294,6 +305,8 @@ Before the call, hdr, data, and alloc should be filled. Upon return, the area | |||
294 | pointed by hdr contains the next event structure, and the data buffer contains | 305 | pointed by hdr contains the next event structure, and the data buffer contains |
295 | the data, if any. The event is removed from the kernel buffer. | 306 | the data, if any. The event is removed from the kernel buffer. |
296 | 307 | ||
308 | The MON_IOCX_GET copies 48 bytes, MON_IOCX_GETX copies 64 bytes. | ||
309 | |||
297 | MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg) | 310 | MON_IOCX_MFETCH, defined as _IOWR(MON_IOC_MAGIC, 7, struct mon_mfetch_arg) |
298 | 311 | ||
299 | This ioctl is primarily used when the application accesses the buffer | 312 | This ioctl is primarily used when the application accesses the buffer |
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index 0d93fa1ac25e..f11c583295e9 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -135,7 +135,7 @@ | |||
135 | 134 -> Adlink RTV24 | 135 | 134 -> Adlink RTV24 |
136 | 135 -> DViCO FusionHDTV 5 Lite [18ac:d500] | 136 | 135 -> DViCO FusionHDTV 5 Lite [18ac:d500] |
137 | 136 -> Acorp Y878F [9511:1540] | 137 | 136 -> Acorp Y878F [9511:1540] |
138 | 137 -> Conceptronic CTVFMi v2 | 138 | 137 -> Conceptronic CTVFMi v2 [036e:109e] |
139 | 138 -> Prolink Pixelview PV-BT878P+ (Rev.2E) | 139 | 138 -> Prolink Pixelview PV-BT878P+ (Rev.2E) |
140 | 139 -> Prolink PixelView PlayTV MPEG2 PV-M4900 | 140 | 139 -> Prolink PixelView PlayTV MPEG2 PV-M4900 |
141 | 140 -> Osprey 440 [0070:ff07] | 141 | 140 -> Osprey 440 [0070:ff07] |
@@ -154,3 +154,7 @@ | |||
154 | 153 -> PHYTEC VD-012 (bt878) | 154 | 153 -> PHYTEC VD-012 (bt878) |
155 | 154 -> PHYTEC VD-012-X1 (bt878) | 155 | 154 -> PHYTEC VD-012-X1 (bt878) |
156 | 155 -> PHYTEC VD-012-X2 (bt878) | 156 | 155 -> PHYTEC VD-012-X2 (bt878) |
157 | 156 -> IVCE-8784 [0000:f050,0001:f050,0002:f050,0003:f050] | ||
158 | 157 -> Geovision GV-800(S) (master) [800a:763d] | ||
159 | 158 -> Geovision GV-800(S) (slave) [800b:763d,800c:763d,800d:763d] | ||
160 | 159 -> ProVideo PV183 [1830:1540,1831:1540,1832:1540,1833:1540,1834:1540,1835:1540,1836:1540,1837:1540] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885 index 35ea130e9898..91aa3c0f0dd2 100644 --- a/Documentation/video4linux/CARDLIST.cx23885 +++ b/Documentation/video4linux/CARDLIST.cx23885 | |||
@@ -12,3 +12,7 @@ | |||
12 | 11 -> DViCO FusionHDTV DVB-T Dual Express [18ac:db78] | 12 | 11 -> DViCO FusionHDTV DVB-T Dual Express [18ac:db78] |
13 | 12 -> Leadtek Winfast PxDVR3200 H [107d:6681] | 13 | 12 -> Leadtek Winfast PxDVR3200 H [107d:6681] |
14 | 13 -> Compro VideoMate E650F [185b:e800] | 14 | 13 -> Compro VideoMate E650F [185b:e800] |
15 | 14 -> TurboSight TBS 6920 [6920:8888] | ||
16 | 15 -> TeVii S470 [d470:9022] | ||
17 | 16 -> DVBWorld DVB-S2 2005 [0001:2005] | ||
18 | 17 -> NetUP Dual DVB-S2 CI [1b55:2a2c] | ||
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 0d08f1edcf6d..71e9db0b26f7 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -77,3 +77,4 @@ | |||
77 | 76 -> SATTRADE ST4200 DVB-S/S2 [b200:4200] | 77 | 76 -> SATTRADE ST4200 DVB-S/S2 [b200:4200] |
78 | 77 -> TBS 8910 DVB-S [8910:8888] | 78 | 77 -> TBS 8910 DVB-S [8910:8888] |
79 | 78 -> Prof 6200 DVB-S [b022:3022] | 79 | 78 -> Prof 6200 DVB-S [b022:3022] |
80 | 79 -> Terratec Cinergy HT PCI MKII [153b:1177] | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index 75bded8a4aa2..78d0a6eed571 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -7,12 +7,12 @@ | |||
7 | 6 -> Terratec Cinergy 200 USB (em2800) | 7 | 6 -> Terratec Cinergy 200 USB (em2800) |
8 | 7 -> Leadtek Winfast USB II (em2800) [0413:6023] | 8 | 7 -> Leadtek Winfast USB II (em2800) [0413:6023] |
9 | 8 -> Kworld USB2800 (em2800) | 9 | 8 -> Kworld USB2800 (em2800) |
10 | 9 -> Pinnacle Dazzle DVC 90/DVC 100 (em2820/em2840) [2304:0207,2304:021a] | 10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,2304:0207,2304:021a] |
11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] | 11 | 10 -> Hauppauge WinTV HVR 900 (em2880) [2040:6500] |
12 | 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] | 12 | 11 -> Terratec Hybrid XS (em2880) [0ccd:0042] |
13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) | 13 | 12 -> Kworld PVR TV 2800 RF (em2820/em2840) |
14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] | 14 | 13 -> Terratec Prodigy XS (em2880) [0ccd:0047] |
15 | 14 -> Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) | 15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) |
16 | 15 -> V-Gear PocketTV (em2800) | 16 | 15 -> V-Gear PocketTV (em2800) |
17 | 16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b] | 17 | 16 -> Hauppauge WinTV HVR 950 (em2883) [2040:6513,2040:6517,2040:651b] |
18 | 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227] | 18 | 17 -> Pinnacle PCTV HD Pro Stick (em2880) [2304:0227] |
@@ -30,7 +30,6 @@ | |||
30 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) | 30 | 30 -> Videology 20K14XUSB USB2.0 (em2820/em2840) |
31 | 31 -> Usbgear VD204v9 (em2821) | 31 | 31 -> Usbgear VD204v9 (em2821) |
32 | 32 -> Supercomp USB 2.0 TV (em2821) | 32 | 32 -> Supercomp USB 2.0 TV (em2821) |
33 | 33 -> SIIG AVTuner-PVR/Prolink PlayTV USB 2.0 (em2821) | ||
34 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] | 33 | 34 -> Terratec Cinergy A Hybrid XS (em2860) [0ccd:004f] |
35 | 35 -> Typhoon DVD Maker (em2860) | 34 | 35 -> Typhoon DVD Maker (em2860) |
36 | 36 -> NetGMBH Cam (em2860) | 35 | 36 -> NetGMBH Cam (em2860) |
@@ -58,3 +57,7 @@ | |||
58 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] | 57 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] |
59 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] | 58 | 60 -> Hauppauge WinTV HVR 850 (em2883) [2040:651f] |
60 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) | 59 | 61 -> Pixelview PlayTV Box 4 USB 2.0 (em2820/em2840) |
60 | 62 -> Gadmei TVR200 (em2820/em2840) | ||
61 | 63 -> Kaiomy TVnPC U2 (em2860) [eb1a:e303] | ||
62 | 64 -> Easy Cap Capture DC-60 (em2860) | ||
63 | 65 -> IO-DATA GV-MVP/SZ (em2820/em2840) [04bb:0515] | ||
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index b8d470596b0c..6dacf2825259 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -153,3 +153,5 @@ | |||
153 | 152 -> Asus Tiger Rev:1.00 [1043:4857] | 153 | 152 -> Asus Tiger Rev:1.00 [1043:4857] |
154 | 153 -> Kworld Plus TV Analog Lite PCI [17de:7128] | 154 | 153 -> Kworld Plus TV Analog Lite PCI [17de:7128] |
155 | 154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d] | 155 | 154 -> Avermedia AVerTV GO 007 FM Plus [1461:f31d] |
156 | 155 -> Hauppauge WinTV-HVR1120 ATSC/QAM-Hybrid [0070:6706,0070:6708] | ||
157 | 156 -> Hauppauge WinTV-HVR1110r3 [0070:6707,0070:6709,0070:670a] | ||
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 295462b2317a..0e89e7676298 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -401,8 +401,7 @@ Additional notes for software developers: | |||
401 | first set the correct norm. Well, it seems logically correct: TV | 401 | first set the correct norm. Well, it seems logically correct: TV |
402 | standard is "more constant" for current country than geometry | 402 | standard is "more constant" for current country than geometry |
403 | settings of a variety of TV capture cards which may work in ITU or | 403 | settings of a variety of TV capture cards which may work in ITU or |
404 | square pixel format. Remember that users now can lock the norm to | 404 | square pixel format. |
405 | avoid any ambiguity. | ||
406 | -- | 405 | -- |
407 | Please note that lavplay/lavrec are also included in the MJPEG-tools | 406 | Please note that lavplay/lavrec are also included in the MJPEG-tools |
408 | (http://mjpeg.sf.net/). | 407 | (http://mjpeg.sf.net/). |
diff --git a/Documentation/video4linux/bttv/Insmod-options b/Documentation/video4linux/bttv/Insmod-options index 5ef75787f83a..bbe3ed667d91 100644 --- a/Documentation/video4linux/bttv/Insmod-options +++ b/Documentation/video4linux/bttv/Insmod-options | |||
@@ -81,16 +81,6 @@ tuner.o | |||
81 | pal=[bdgil] select PAL variant (used for some tuners | 81 | pal=[bdgil] select PAL variant (used for some tuners |
82 | only, important for the audio carrier). | 82 | only, important for the audio carrier). |
83 | 83 | ||
84 | tvmixer.o | ||
85 | registers a mixer device for the TV card's volume/bass/treble | ||
86 | controls (requires a i2c audio control chip like the msp3400). | ||
87 | |||
88 | insmod args: | ||
89 | debug=1 print some debug info to the syslog. | ||
90 | devnr=n allocate device #n (0 == /dev/mixer, | ||
91 | 1 = /dev/mixer1, ...), default is to | ||
92 | use the first free one. | ||
93 | |||
94 | tvaudio.o | 84 | tvaudio.o |
95 | new, experimental module which is supported to provide a single | 85 | new, experimental module which is supported to provide a single |
96 | driver for all simple i2c audio control chips (tda/tea*). | 86 | driver for all simple i2c audio control chips (tda/tea*). |
diff --git a/Documentation/video4linux/bttv/README b/Documentation/video4linux/bttv/README index 7ca2154c2bf5..3a367cdb664e 100644 --- a/Documentation/video4linux/bttv/README +++ b/Documentation/video4linux/bttv/README | |||
@@ -63,8 +63,8 @@ If you have some knowledge and spare time, please try to fix this | |||
63 | yourself (patches very welcome of course...) You know: The linux | 63 | yourself (patches very welcome of course...) You know: The linux |
64 | slogan is "Do it yourself". | 64 | slogan is "Do it yourself". |
65 | 65 | ||
66 | There is a mailing list: video4linux-list@redhat.com. | 66 | There is a mailing list: linux-media@vger.kernel.org |
67 | https://listman.redhat.com/mailman/listinfo/video4linux-list | 67 | http://vger.kernel.org/vger-lists.html#linux-media |
68 | 68 | ||
69 | If you have trouble with some specific TV card, try to ask there | 69 | If you have trouble with some specific TV card, try to ask there |
70 | instead of mailing me directly. The chance that someone with the | 70 | instead of mailing me directly. The chance that someone with the |
diff --git a/Documentation/video4linux/cx2341x/README.hm12 b/Documentation/video4linux/cx2341x/README.hm12 index 0e213ed095e6..b36148ea0750 100644 --- a/Documentation/video4linux/cx2341x/README.hm12 +++ b/Documentation/video4linux/cx2341x/README.hm12 | |||
@@ -32,6 +32,10 @@ Y, U and V planes. This code assumes frames of 720x576 (PAL) pixels. | |||
32 | The width of a frame is always 720 pixels, regardless of the actual specified | 32 | The width of a frame is always 720 pixels, regardless of the actual specified |
33 | width. | 33 | width. |
34 | 34 | ||
35 | If the height is not a multiple of 32 lines, then the captured video is | ||
36 | missing macroblocks at the end and is unusable. So the height must be a | ||
37 | multiple of 32. | ||
38 | |||
35 | -------------------------------------------------------------------------- | 39 | -------------------------------------------------------------------------- |
36 | 40 | ||
37 | #include <stdio.h> | 41 | #include <stdio.h> |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 1c58a7630146..98529e03a46e 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -32,6 +32,7 @@ spca561 041e:403b Creative Webcam Vista (VF0010) | |||
32 | zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250) | 32 | zc3xx 041e:4051 Creative Live!Cam Notebook Pro (VF0250) |
33 | ov519 041e:4052 Creative Live! VISTA IM | 33 | ov519 041e:4052 Creative Live! VISTA IM |
34 | zc3xx 041e:4053 Creative Live!Cam Video IM | 34 | zc3xx 041e:4053 Creative Live!Cam Video IM |
35 | vc032x 041e:405b Creative Live! Cam Notebook Ultra (VC0130) | ||
35 | ov519 041e:405f Creative Live! VISTA VF0330 | 36 | ov519 041e:405f Creative Live! VISTA VF0330 |
36 | ov519 041e:4060 Creative Live! VISTA VF0350 | 37 | ov519 041e:4060 Creative Live! VISTA VF0350 |
37 | ov519 041e:4061 Creative Live! VISTA VF0400 | 38 | ov519 041e:4061 Creative Live! VISTA VF0400 |
@@ -193,6 +194,7 @@ spca500 084d:0003 D-Link DSC-350 | |||
193 | spca500 08ca:0103 Aiptek PocketDV | 194 | spca500 08ca:0103 Aiptek PocketDV |
194 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 | 195 | sunplus 08ca:0104 Aiptek PocketDVII 1.3 |
195 | sunplus 08ca:0106 Aiptek Pocket DV3100+ | 196 | sunplus 08ca:0106 Aiptek Pocket DV3100+ |
197 | mr97310a 08ca:0111 Aiptek PenCam VGA+ | ||
196 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M | 198 | sunplus 08ca:2008 Aiptek Mini PenCam 2 M |
197 | sunplus 08ca:2010 Aiptek PocketCam 3M | 199 | sunplus 08ca:2010 Aiptek PocketCam 3M |
198 | sunplus 08ca:2016 Aiptek PocketCam 2 Mega | 200 | sunplus 08ca:2016 Aiptek PocketCam 2 Mega |
@@ -215,6 +217,7 @@ pac207 093a:2468 PAC207 | |||
215 | pac207 093a:2470 Genius GF112 | 217 | pac207 093a:2470 Genius GF112 |
216 | pac207 093a:2471 Genius VideoCam ge111 | 218 | pac207 093a:2471 Genius VideoCam ge111 |
217 | pac207 093a:2472 Genius VideoCam ge110 | 219 | pac207 093a:2472 Genius VideoCam ge110 |
220 | pac207 093a:2474 Genius iLook 111 | ||
218 | pac207 093a:2476 Genius e-Messenger 112 | 221 | pac207 093a:2476 Genius e-Messenger 112 |
219 | pac7311 093a:2600 PAC7311 Typhoon | 222 | pac7311 093a:2600 PAC7311 Typhoon |
220 | pac7311 093a:2601 Philips SPC 610 NC | 223 | pac7311 093a:2601 Philips SPC 610 NC |
@@ -279,6 +282,7 @@ spca561 10fd:7e50 FlyCam Usb 100 | |||
279 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k | 282 | zc3xx 10fd:8050 Typhoon Webshot II USB 300k |
280 | ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201) | 283 | ov534 1415:2000 Sony HD Eye for PS3 (SLEH 00201) |
281 | pac207 145f:013a Trust WB-1300N | 284 | pac207 145f:013a Trust WB-1300N |
285 | vc032x 15b8:6001 HP 2.0 Megapixel | ||
282 | vc032x 15b8:6002 HP 2.0 Megapixel rz406aa | 286 | vc032x 15b8:6002 HP 2.0 Megapixel rz406aa |
283 | spca501 1776:501c Arowana 300K CMOS Camera | 287 | spca501 1776:501c Arowana 300K CMOS Camera |
284 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | 288 | t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops |
diff --git a/Documentation/video4linux/si470x.txt b/Documentation/video4linux/si470x.txt index 49679e6aaa76..3a7823e01b4d 100644 --- a/Documentation/video4linux/si470x.txt +++ b/Documentation/video4linux/si470x.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers | 1 | Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers |
2 | 2 | ||
3 | Copyright (c) 2008 Tobias Lorenz <tobias.lorenz@gmx.net> | 3 | Copyright (c) 2009 Tobias Lorenz <tobias.lorenz@gmx.net> |
4 | 4 | ||
5 | 5 | ||
6 | Information from Silicon Labs | 6 | Information from Silicon Labs |
@@ -41,7 +41,7 @@ chips are known to work: | |||
41 | - 10c4:818a: Silicon Labs USB FM Radio Reference Design | 41 | - 10c4:818a: Silicon Labs USB FM Radio Reference Design |
42 | - 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) | 42 | - 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) |
43 | - 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700) | 43 | - 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700) |
44 | - 10c5:819a: DealExtreme USB Radio | 44 | - 10c5:819a: Sanei Electric, Inc. FM USB Radio (sold as DealExtreme.com PCear) |
45 | 45 | ||
46 | 46 | ||
47 | Software | 47 | Software |
@@ -52,6 +52,7 @@ Testing is usually done with most application under Debian/testing: | |||
52 | - gradio - GTK FM radio tuner | 52 | - gradio - GTK FM radio tuner |
53 | - kradio - Comfortable Radio Application for KDE | 53 | - kradio - Comfortable Radio Application for KDE |
54 | - radio - ncurses-based radio application | 54 | - radio - ncurses-based radio application |
55 | - mplayer - The Ultimate Movie Player For Linux | ||
55 | 56 | ||
56 | There is also a library libv4l, which can be used. It's going to have a function | 57 | There is also a library libv4l, which can be used. It's going to have a function |
57 | for frequency seeking, either by using hardware functionality as in radio-si470x | 58 | for frequency seeking, either by using hardware functionality as in radio-si470x |
@@ -69,7 +70,7 @@ Audio Listing | |||
69 | USB Audio is provided by the ALSA snd_usb_audio module. It is recommended to | 70 | USB Audio is provided by the ALSA snd_usb_audio module. It is recommended to |
70 | also select SND_USB_AUDIO, as this is required to get sound from the radio. For | 71 | also select SND_USB_AUDIO, as this is required to get sound from the radio. For |
71 | listing you have to redirect the sound, for example using one of the following | 72 | listing you have to redirect the sound, for example using one of the following |
72 | commands. | 73 | commands. Please adjust the audio devices to your needs (/dev/dsp* and hw:x,x). |
73 | 74 | ||
74 | If you just want to test audio (very poor quality): | 75 | If you just want to test audio (very poor quality): |
75 | cat /dev/dsp1 > /dev/dsp | 76 | cat /dev/dsp1 > /dev/dsp |
@@ -80,6 +81,10 @@ sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp | |||
80 | If you use arts try: | 81 | If you use arts try: |
81 | arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - | 82 | arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - |
82 | 83 | ||
84 | If you use mplayer try: | ||
85 | mplayer -radio adevice=hw=1.0:arate=96000 \ | ||
86 | -rawaudio rate=96000 \ | ||
87 | radio://<frequency>/capture | ||
83 | 88 | ||
84 | Module Parameters | 89 | Module Parameters |
85 | ================= | 90 | ================= |
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index ff124374e9ba..a31177390e55 100644 --- a/Documentation/video4linux/v4l2-framework.txt +++ b/Documentation/video4linux/v4l2-framework.txt | |||
@@ -47,7 +47,9 @@ All drivers have the following structure: | |||
47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and | 47 | 3) Creating V4L2 device nodes (/dev/videoX, /dev/vbiX, /dev/radioX and |
48 | /dev/vtxX) and keeping track of device-node specific data. | 48 | /dev/vtxX) and keeping track of device-node specific data. |
49 | 49 | ||
50 | 4) Filehandle-specific structs containing per-filehandle data. | 50 | 4) Filehandle-specific structs containing per-filehandle data; |
51 | |||
52 | 5) video buffer handling. | ||
51 | 53 | ||
52 | This is a rough schematic of how it all relates: | 54 | This is a rough schematic of how it all relates: |
53 | 55 | ||
@@ -82,12 +84,20 @@ You must register the device instance: | |||
82 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); | 84 | v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev); |
83 | 85 | ||
84 | Registration will initialize the v4l2_device struct and link dev->driver_data | 86 | Registration will initialize the v4l2_device struct and link dev->driver_data |
85 | to v4l2_dev. Registration will also set v4l2_dev->name to a value derived from | 87 | to v4l2_dev. If v4l2_dev->name is empty then it will be set to a value derived |
86 | dev (driver name followed by the bus_id, to be precise). You may change the | 88 | from dev (driver name followed by the bus_id, to be precise). If you set it |
87 | name after registration if you want. | 89 | up before calling v4l2_device_register then it will be untouched. If dev is |
90 | NULL, then you *must* setup v4l2_dev->name before calling v4l2_device_register. | ||
88 | 91 | ||
89 | The first 'dev' argument is normally the struct device pointer of a pci_dev, | 92 | The first 'dev' argument is normally the struct device pointer of a pci_dev, |
90 | usb_device or platform_device. | 93 | usb_device or platform_device. It is rare for dev to be NULL, but it happens |
94 | with ISA devices or when one device creates multiple PCI devices, thus making | ||
95 | it impossible to associate v4l2_dev with a particular parent. | ||
96 | |||
97 | You can also supply a notify() callback that can be called by sub-devices to | ||
98 | notify you of events. Whether you need to set this depends on the sub-device. | ||
99 | Any notifications a sub-device supports must be defined in a header in | ||
100 | include/media/<subdevice>.h. | ||
91 | 101 | ||
92 | You unregister with: | 102 | You unregister with: |
93 | 103 | ||
@@ -95,6 +105,17 @@ You unregister with: | |||
95 | 105 | ||
96 | Unregistering will also automatically unregister all subdevs from the device. | 106 | Unregistering will also automatically unregister all subdevs from the device. |
97 | 107 | ||
108 | If you have a hotpluggable device (e.g. a USB device), then when a disconnect | ||
109 | happens the parent device becomes invalid. Since v4l2_device has a pointer to | ||
110 | that parent device it has to be cleared as well to mark that the parent is | ||
111 | gone. To do this call: | ||
112 | |||
113 | v4l2_device_disconnect(struct v4l2_device *v4l2_dev); | ||
114 | |||
115 | This does *not* unregister the subdevs, so you still need to call the | ||
116 | v4l2_device_unregister() function for that. If your driver is not hotpluggable, | ||
117 | then there is no need to call v4l2_device_disconnect(). | ||
118 | |||
98 | Sometimes you need to iterate over all devices registered by a specific | 119 | Sometimes you need to iterate over all devices registered by a specific |
99 | driver. This is usually the case if multiple device drivers use the same | 120 | driver. This is usually the case if multiple device drivers use the same |
100 | hardware. E.g. the ivtvfb driver is a framebuffer driver that uses the ivtv | 121 | hardware. E.g. the ivtvfb driver is a framebuffer driver that uses the ivtv |
@@ -134,7 +155,7 @@ The recommended approach is as follows: | |||
134 | 155 | ||
135 | static atomic_t drv_instance = ATOMIC_INIT(0); | 156 | static atomic_t drv_instance = ATOMIC_INIT(0); |
136 | 157 | ||
137 | static int __devinit drv_probe(struct pci_dev *dev, | 158 | static int __devinit drv_probe(struct pci_dev *pdev, |
138 | const struct pci_device_id *pci_id) | 159 | const struct pci_device_id *pci_id) |
139 | { | 160 | { |
140 | ... | 161 | ... |
@@ -218,7 +239,7 @@ to add new ops and categories. | |||
218 | 239 | ||
219 | A sub-device driver initializes the v4l2_subdev struct using: | 240 | A sub-device driver initializes the v4l2_subdev struct using: |
220 | 241 | ||
221 | v4l2_subdev_init(subdev, &ops); | 242 | v4l2_subdev_init(sd, &ops); |
222 | 243 | ||
223 | Afterwards you need to initialize subdev->name with a unique name and set the | 244 | Afterwards you need to initialize subdev->name with a unique name and set the |
224 | module owner. This is done for you if you use the i2c helper functions. | 245 | module owner. This is done for you if you use the i2c helper functions. |
@@ -226,7 +247,7 @@ module owner. This is done for you if you use the i2c helper functions. | |||
226 | A device (bridge) driver needs to register the v4l2_subdev with the | 247 | A device (bridge) driver needs to register the v4l2_subdev with the |
227 | v4l2_device: | 248 | v4l2_device: |
228 | 249 | ||
229 | int err = v4l2_device_register_subdev(device, subdev); | 250 | int err = v4l2_device_register_subdev(v4l2_dev, sd); |
230 | 251 | ||
231 | This can fail if the subdev module disappeared before it could be registered. | 252 | This can fail if the subdev module disappeared before it could be registered. |
232 | After this function was called successfully the subdev->dev field points to | 253 | After this function was called successfully the subdev->dev field points to |
@@ -234,17 +255,17 @@ the v4l2_device. | |||
234 | 255 | ||
235 | You can unregister a sub-device using: | 256 | You can unregister a sub-device using: |
236 | 257 | ||
237 | v4l2_device_unregister_subdev(subdev); | 258 | v4l2_device_unregister_subdev(sd); |
238 | 259 | ||
239 | Afterwards the subdev module can be unloaded and subdev->dev == NULL. | 260 | Afterwards the subdev module can be unloaded and sd->dev == NULL. |
240 | 261 | ||
241 | You can call an ops function either directly: | 262 | You can call an ops function either directly: |
242 | 263 | ||
243 | err = subdev->ops->core->g_chip_ident(subdev, &chip); | 264 | err = sd->ops->core->g_chip_ident(sd, &chip); |
244 | 265 | ||
245 | but it is better and easier to use this macro: | 266 | but it is better and easier to use this macro: |
246 | 267 | ||
247 | err = v4l2_subdev_call(subdev, core, g_chip_ident, &chip); | 268 | err = v4l2_subdev_call(sd, core, g_chip_ident, &chip); |
248 | 269 | ||
249 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev | 270 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev |
250 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is | 271 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is |
@@ -252,19 +273,19 @@ NULL, or the actual result of the subdev->ops->core->g_chip_ident ops. | |||
252 | 273 | ||
253 | It is also possible to call all or a subset of the sub-devices: | 274 | It is also possible to call all or a subset of the sub-devices: |
254 | 275 | ||
255 | v4l2_device_call_all(dev, 0, core, g_chip_ident, &chip); | 276 | v4l2_device_call_all(v4l2_dev, 0, core, g_chip_ident, &chip); |
256 | 277 | ||
257 | Any subdev that does not support this ops is skipped and error results are | 278 | Any subdev that does not support this ops is skipped and error results are |
258 | ignored. If you want to check for errors use this: | 279 | ignored. If you want to check for errors use this: |
259 | 280 | ||
260 | err = v4l2_device_call_until_err(dev, 0, core, g_chip_ident, &chip); | 281 | err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); |
261 | 282 | ||
262 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no | 283 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no |
263 | errors (except -ENOIOCTLCMD) occured, then 0 is returned. | 284 | errors (except -ENOIOCTLCMD) occured, then 0 is returned. |
264 | 285 | ||
265 | The second argument to both calls is a group ID. If 0, then all subdevs are | 286 | The second argument to both calls is a group ID. If 0, then all subdevs are |
266 | called. If non-zero, then only those whose group ID match that value will | 287 | called. If non-zero, then only those whose group ID match that value will |
267 | be called. Before a bridge driver registers a subdev it can set subdev->grp_id | 288 | be called. Before a bridge driver registers a subdev it can set sd->grp_id |
268 | to whatever value it wants (it's 0 by default). This value is owned by the | 289 | to whatever value it wants (it's 0 by default). This value is owned by the |
269 | bridge driver and the sub-device driver will never modify or use it. | 290 | bridge driver and the sub-device driver will never modify or use it. |
270 | 291 | ||
@@ -276,6 +297,11 @@ e.g. AUDIO_CONTROLLER and specify that as the group ID value when calling | |||
276 | v4l2_device_call_all(). That ensures that it will only go to the subdev | 297 | v4l2_device_call_all(). That ensures that it will only go to the subdev |
277 | that needs it. | 298 | that needs it. |
278 | 299 | ||
300 | If the sub-device needs to notify its v4l2_device parent of an event, then | ||
301 | it can call v4l2_subdev_notify(sd, notification, arg). This macro checks | ||
302 | whether there is a notify() callback defined and returns -ENODEV if not. | ||
303 | Otherwise the result of the notify() call is returned. | ||
304 | |||
279 | The advantage of using v4l2_subdev is that it is a generic struct and does | 305 | The advantage of using v4l2_subdev is that it is a generic struct and does |
280 | not contain any knowledge about the underlying hardware. So a driver might | 306 | not contain any knowledge about the underlying hardware. So a driver might |
281 | contain several subdevs that use an I2C bus, but also a subdev that is | 307 | contain several subdevs that use an I2C bus, but also a subdev that is |
@@ -340,6 +366,12 @@ Make sure to call v4l2_device_unregister_subdev(sd) when the remove() callback | |||
340 | is called. This will unregister the sub-device from the bridge driver. It is | 366 | is called. This will unregister the sub-device from the bridge driver. It is |
341 | safe to call this even if the sub-device was never registered. | 367 | safe to call this even if the sub-device was never registered. |
342 | 368 | ||
369 | You need to do this because when the bridge driver destroys the i2c adapter | ||
370 | the remove() callbacks are called of the i2c devices on that adapter. | ||
371 | After that the corresponding v4l2_subdev structures are invalid, so they | ||
372 | have to be unregistered first. Calling v4l2_device_unregister_subdev(sd) | ||
373 | from the remove() callback ensures that this is always done correctly. | ||
374 | |||
343 | 375 | ||
344 | The bridge driver also has some helper functions it can use: | 376 | The bridge driver also has some helper functions it can use: |
345 | 377 | ||
@@ -349,8 +381,8 @@ This loads the given module (can be NULL if no module needs to be loaded) and | |||
349 | calls i2c_new_device() with the given i2c_adapter and chip/address arguments. | 381 | calls i2c_new_device() with the given i2c_adapter and chip/address arguments. |
350 | If all goes well, then it registers the subdev with the v4l2_device. It gets | 382 | If all goes well, then it registers the subdev with the v4l2_device. It gets |
351 | the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure | 383 | the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure |
352 | that adapdata is set to v4l2_device when you setup the i2c_adapter in your | 384 | to call i2c_set_adapdata(adapter, v4l2_device) when you setup the i2c_adapter |
353 | driver. | 385 | in your driver. |
354 | 386 | ||
355 | You can also use v4l2_i2c_new_probed_subdev() which is very similar to | 387 | You can also use v4l2_i2c_new_probed_subdev() which is very similar to |
356 | v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses | 388 | v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses |
@@ -358,6 +390,14 @@ that it should probe. Internally it calls i2c_new_probed_device(). | |||
358 | 390 | ||
359 | Both functions return NULL if something went wrong. | 391 | Both functions return NULL if something went wrong. |
360 | 392 | ||
393 | Note that the chipid you pass to v4l2_i2c_new_(probed_)subdev() is usually | ||
394 | the same as the module name. It allows you to specify a chip variant, e.g. | ||
395 | "saa7114" or "saa7115". In general though the i2c driver autodetects this. | ||
396 | The use of chipid is something that needs to be looked at more closely at a | ||
397 | later date. It differs between i2c drivers and as such can be confusing. | ||
398 | To see which chip variants are supported you can look in the i2c driver code | ||
399 | for the i2c_device_id table. This lists all the possibilities. | ||
400 | |||
361 | 401 | ||
362 | struct video_device | 402 | struct video_device |
363 | ------------------- | 403 | ------------------- |
@@ -396,6 +436,15 @@ You should also set these fields: | |||
396 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance | 436 | - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance |
397 | (highly recommended to use this and it might become compulsory in the | 437 | (highly recommended to use this and it might become compulsory in the |
398 | future!), then set this to your v4l2_ioctl_ops struct. | 438 | future!), then set this to your v4l2_ioctl_ops struct. |
439 | - parent: you only set this if v4l2_device was registered with NULL as | ||
440 | the parent device struct. This only happens in cases where one hardware | ||
441 | device has multiple PCI devices that all share the same v4l2_device core. | ||
442 | |||
443 | The cx88 driver is an example of this: one core v4l2_device struct, but | ||
444 | it is used by both an raw video PCI device (cx8800) and a MPEG PCI device | ||
445 | (cx8802). Since the v4l2_device cannot be associated with a particular | ||
446 | PCI device it is setup without a parent device. But when the struct | ||
447 | video_device is setup you do know which parent PCI device to use. | ||
399 | 448 | ||
400 | If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or | 449 | If you use v4l2_ioctl_ops, then you should set either .unlocked_ioctl or |
401 | .ioctl to video_ioctl2 in your v4l2_file_operations struct. | 450 | .ioctl to video_ioctl2 in your v4l2_file_operations struct. |
@@ -499,8 +548,8 @@ There are a few useful helper functions: | |||
499 | 548 | ||
500 | You can set/get driver private data in the video_device struct using: | 549 | You can set/get driver private data in the video_device struct using: |
501 | 550 | ||
502 | void *video_get_drvdata(struct video_device *dev); | 551 | void *video_get_drvdata(struct video_device *vdev); |
503 | void video_set_drvdata(struct video_device *dev, void *data); | 552 | void video_set_drvdata(struct video_device *vdev, void *data); |
504 | 553 | ||
505 | Note that you can safely call video_set_drvdata() before calling | 554 | Note that you can safely call video_set_drvdata() before calling |
506 | video_register_device(). | 555 | video_register_device(). |
@@ -519,3 +568,103 @@ void *video_drvdata(struct file *file); | |||
519 | You can go from a video_device struct to the v4l2_device struct using: | 568 | You can go from a video_device struct to the v4l2_device struct using: |
520 | 569 | ||
521 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; | 570 | struct v4l2_device *v4l2_dev = vdev->v4l2_dev; |
571 | |||
572 | video buffer helper functions | ||
573 | ----------------------------- | ||
574 | |||
575 | The v4l2 core API provides a standard method for dealing with video | ||
576 | buffers. Those methods allow a driver to implement read(), mmap() and | ||
577 | overlay() on a consistent way. | ||
578 | |||
579 | There are currently methods for using video buffers on devices that | ||
580 | supports DMA with scatter/gather method (videobuf-dma-sg), DMA with | ||
581 | linear access (videobuf-dma-contig), and vmalloced buffers, mostly | ||
582 | used on USB drivers (videobuf-vmalloc). | ||
583 | |||
584 | Any driver using videobuf should provide operations (callbacks) for | ||
585 | four handlers: | ||
586 | |||
587 | ops->buf_setup - calculates the size of the video buffers and avoid they | ||
588 | to waste more than some maximum limit of RAM; | ||
589 | ops->buf_prepare - fills the video buffer structs and calls | ||
590 | videobuf_iolock() to alloc and prepare mmaped memory; | ||
591 | ops->buf_queue - advices the driver that another buffer were | ||
592 | requested (by read() or by QBUF); | ||
593 | ops->buf_release - frees any buffer that were allocated. | ||
594 | |||
595 | In order to use it, the driver need to have a code (generally called at | ||
596 | interrupt context) that will properly handle the buffer request lists, | ||
597 | announcing that a new buffer were filled. | ||
598 | |||
599 | The irq handling code should handle the videobuf task lists, in order | ||
600 | to advice videobuf that a new frame were filled, in order to honor to a | ||
601 | request. The code is generally like this one: | ||
602 | if (list_empty(&dma_q->active)) | ||
603 | return; | ||
604 | |||
605 | buf = list_entry(dma_q->active.next, struct vbuffer, vb.queue); | ||
606 | |||
607 | if (!waitqueue_active(&buf->vb.done)) | ||
608 | return; | ||
609 | |||
610 | /* Some logic to handle the buf may be needed here */ | ||
611 | |||
612 | list_del(&buf->vb.queue); | ||
613 | do_gettimeofday(&buf->vb.ts); | ||
614 | wake_up(&buf->vb.done); | ||
615 | |||
616 | Those are the videobuffer functions used on drivers, implemented on | ||
617 | videobuf-core: | ||
618 | |||
619 | - Videobuf init functions | ||
620 | videobuf_queue_sg_init() | ||
621 | Initializes the videobuf infrastructure. This function should be | ||
622 | called before any other videobuf function on drivers that uses DMA | ||
623 | Scatter/Gather buffers. | ||
624 | |||
625 | videobuf_queue_dma_contig_init | ||
626 | Initializes the videobuf infrastructure. This function should be | ||
627 | called before any other videobuf function on drivers that need DMA | ||
628 | contiguous buffers. | ||
629 | |||
630 | videobuf_queue_vmalloc_init() | ||
631 | Initializes the videobuf infrastructure. This function should be | ||
632 | called before any other videobuf function on USB (and other drivers) | ||
633 | that need a vmalloced type of videobuf. | ||
634 | |||
635 | - videobuf_iolock() | ||
636 | Prepares the videobuf memory for the proper method (read, mmap, overlay). | ||
637 | |||
638 | - videobuf_queue_is_busy() | ||
639 | Checks if a videobuf is streaming. | ||
640 | |||
641 | - videobuf_queue_cancel() | ||
642 | Stops video handling. | ||
643 | |||
644 | - videobuf_mmap_free() | ||
645 | frees mmap buffers. | ||
646 | |||
647 | - videobuf_stop() | ||
648 | Stops video handling, ends mmap and frees mmap and other buffers. | ||
649 | |||
650 | - V4L2 api functions. Those functions correspond to VIDIOC_foo ioctls: | ||
651 | videobuf_reqbufs(), videobuf_querybuf(), videobuf_qbuf(), | ||
652 | videobuf_dqbuf(), videobuf_streamon(), videobuf_streamoff(). | ||
653 | |||
654 | - V4L1 api function (corresponds to VIDIOCMBUF ioctl): | ||
655 | videobuf_cgmbuf() | ||
656 | This function is used to provide backward compatibility with V4L1 | ||
657 | API. | ||
658 | |||
659 | - Some help functions for read()/poll() operations: | ||
660 | videobuf_read_stream() | ||
661 | For continuous stream read() | ||
662 | videobuf_read_one() | ||
663 | For snapshot read() | ||
664 | videobuf_poll_stream() | ||
665 | polling help function | ||
666 | |||
667 | The better way to understand it is to take a look at vivi driver. One | ||
668 | of the main reasons for vivi is to be a videobuf usage example. the | ||
669 | vivi_thread_tick() does the task that the IRQ callback would do on PCI | ||
670 | drivers (or the irq callback on USB). | ||
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c index d6e70bef8ad0..05769cff1009 100644 --- a/Documentation/video4linux/v4lgrab.c +++ b/Documentation/video4linux/v4lgrab.c | |||
@@ -105,8 +105,8 @@ int main(int argc, char ** argv) | |||
105 | struct video_picture vpic; | 105 | struct video_picture vpic; |
106 | 106 | ||
107 | unsigned char *buffer, *src; | 107 | unsigned char *buffer, *src; |
108 | int bpp = 24, r, g, b; | 108 | int bpp = 24, r = 0, g = 0, b = 0; |
109 | unsigned int i, src_depth; | 109 | unsigned int i, src_depth = 16; |
110 | 110 | ||
111 | if (fd < 0) { | 111 | if (fd < 0) { |
112 | perror(VIDEO_DEV); | 112 | perror(VIDEO_DEV); |
diff --git a/Documentation/video4linux/zr364xx.txt b/Documentation/video4linux/zr364xx.txt index 5c81e3ae6458..7f3d1955d214 100644 --- a/Documentation/video4linux/zr364xx.txt +++ b/Documentation/video4linux/zr364xx.txt | |||
@@ -65,3 +65,4 @@ Vendor Product Distributor Model | |||
65 | 0x06d6 0x003b Trust Powerc@m 970Z | 65 | 0x06d6 0x003b Trust Powerc@m 970Z |
66 | 0x0a17 0x004e Pentax Optio 50 | 66 | 0x0a17 0x004e Pentax Optio 50 |
67 | 0x041e 0x405d Creative DiVi CAM 516 | 67 | 0x041e 0x405d Creative DiVi CAM 516 |
68 | 0x08ca 0x2102 Aiptek DV T300 | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 7b4596ac4120..e0203662f9e9 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -158,7 +158,7 @@ Offset Proto Name Meaning | |||
158 | 0202/4 2.00+ header Magic signature "HdrS" | 158 | 0202/4 2.00+ header Magic signature "HdrS" |
159 | 0206/2 2.00+ version Boot protocol version supported | 159 | 0206/2 2.00+ version Boot protocol version supported |
160 | 0208/4 2.00+ realmode_swtch Boot loader hook (see below) | 160 | 0208/4 2.00+ realmode_swtch Boot loader hook (see below) |
161 | 020C/2 2.00+ start_sys The load-low segment (0x1000) (obsolete) | 161 | 020C/2 2.00+ start_sys_seg The load-low segment (0x1000) (obsolete) |
162 | 020E/2 2.00+ kernel_version Pointer to kernel version string | 162 | 020E/2 2.00+ kernel_version Pointer to kernel version string |
163 | 0210/1 2.00+ type_of_loader Boot loader identifier | 163 | 0210/1 2.00+ type_of_loader Boot loader identifier |
164 | 0211/1 2.00+ loadflags Boot protocol option flags | 164 | 0211/1 2.00+ loadflags Boot protocol option flags |
@@ -170,10 +170,11 @@ Offset Proto Name Meaning | |||
170 | 0224/2 2.01+ heap_end_ptr Free memory after setup end | 170 | 0224/2 2.01+ heap_end_ptr Free memory after setup end |
171 | 0226/2 N/A pad1 Unused | 171 | 0226/2 N/A pad1 Unused |
172 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line | 172 | 0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line |
173 | 022C/4 2.03+ initrd_addr_max Highest legal initrd address | 173 | 022C/4 2.03+ ramdisk_max Highest legal initrd address |
174 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel | 174 | 0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel |
175 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not | 175 | 0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not |
176 | 0235/3 N/A pad2 Unused | 176 | 0235/1 N/A pad2 Unused |
177 | 0236/2 N/A pad3 Unused | ||
177 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line | 178 | 0238/4 2.06+ cmdline_size Maximum size of the kernel command line |
178 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture | 179 | 023C/4 2.07+ hardware_subarch Hardware subarchitecture |
179 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data | 180 | 0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data |
@@ -299,14 +300,14 @@ Protocol: 2.00+ | |||
299 | e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version | 300 | e.g. 0x0204 for version 2.04, and 0x0a11 for a hypothetical version |
300 | 10.17. | 301 | 10.17. |
301 | 302 | ||
302 | Field name: readmode_swtch | 303 | Field name: realmode_swtch |
303 | Type: modify (optional) | 304 | Type: modify (optional) |
304 | Offset/size: 0x208/4 | 305 | Offset/size: 0x208/4 |
305 | Protocol: 2.00+ | 306 | Protocol: 2.00+ |
306 | 307 | ||
307 | Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) | 308 | Boot loader hook (see ADVANCED BOOT LOADER HOOKS below.) |
308 | 309 | ||
309 | Field name: start_sys | 310 | Field name: start_sys_seg |
310 | Type: read | 311 | Type: read |
311 | Offset/size: 0x20c/2 | 312 | Offset/size: 0x20c/2 |
312 | Protocol: 2.00+ | 313 | Protocol: 2.00+ |
@@ -468,7 +469,7 @@ Protocol: 2.02+ | |||
468 | zero, the kernel will assume that your boot loader does not support | 469 | zero, the kernel will assume that your boot loader does not support |
469 | the 2.02+ protocol. | 470 | the 2.02+ protocol. |
470 | 471 | ||
471 | Field name: initrd_addr_max | 472 | Field name: ramdisk_max |
472 | Type: read | 473 | Type: read |
473 | Offset/size: 0x22c/4 | 474 | Offset/size: 0x22c/4 |
474 | Protocol: 2.03+ | 475 | Protocol: 2.03+ |
@@ -542,7 +543,10 @@ Protocol: 2.08+ | |||
542 | 543 | ||
543 | The payload may be compressed. The format of both the compressed and | 544 | The payload may be compressed. The format of both the compressed and |
544 | uncompressed data should be determined using the standard magic | 545 | uncompressed data should be determined using the standard magic |
545 | numbers. Currently only gzip compressed ELF is used. | 546 | numbers. The currently supported compression formats are gzip |
547 | (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A) and LZMA | ||
548 | (magic number 5D 00). The uncompressed payload is currently always ELF | ||
549 | (magic number 7F 45 4C 46). | ||
546 | 550 | ||
547 | Field name: payload_length | 551 | Field name: payload_length |
548 | Type: read | 552 | Type: read |
diff --git a/Documentation/x86/earlyprintk.txt b/Documentation/x86/earlyprintk.txt new file mode 100644 index 000000000000..607b1a016064 --- /dev/null +++ b/Documentation/x86/earlyprintk.txt | |||
@@ -0,0 +1,101 @@ | |||
1 | |||
2 | Mini-HOWTO for using the earlyprintk=dbgp boot option with a | ||
3 | USB2 Debug port key and a debug cable, on x86 systems. | ||
4 | |||
5 | You need two computers, the 'USB debug key' special gadget and | ||
6 | and two USB cables, connected like this: | ||
7 | |||
8 | [host/target] <-------> [USB debug key] <-------> [client/console] | ||
9 | |||
10 | 1. There are three specific hardware requirements: | ||
11 | |||
12 | a.) Host/target system needs to have USB debug port capability. | ||
13 | |||
14 | You can check this capability by looking at a 'Debug port' bit in | ||
15 | the lspci -vvv output: | ||
16 | |||
17 | # lspci -vvv | ||
18 | ... | ||
19 | 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI]) | ||
20 | Subsystem: Lenovo ThinkPad T61 | ||
21 | Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- | ||
22 | Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- | ||
23 | Latency: 0 | ||
24 | Interrupt: pin D routed to IRQ 19 | ||
25 | Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K] | ||
26 | Capabilities: [50] Power Management version 2 | ||
27 | Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+) | ||
28 | Status: D0 PME-Enable- DSel=0 DScale=0 PME+ | ||
29 | Capabilities: [58] Debug port: BAR=1 offset=00a0 | ||
30 | ^^^^^^^^^^^ <==================== [ HERE ] | ||
31 | Kernel driver in use: ehci_hcd | ||
32 | Kernel modules: ehci-hcd | ||
33 | ... | ||
34 | |||
35 | ( If your system does not list a debug port capability then you probably | ||
36 | wont be able to use the USB debug key. ) | ||
37 | |||
38 | b.) You also need a Netchip USB debug cable/key: | ||
39 | |||
40 | http://www.plxtech.com/products/NET2000/NET20DC/default.asp | ||
41 | |||
42 | This is a small blue plastic connector with two USB connections, | ||
43 | it draws power from its USB connections. | ||
44 | |||
45 | c.) Thirdly, you need a second client/console system with a regular USB port. | ||
46 | |||
47 | 2. Software requirements: | ||
48 | |||
49 | a.) On the host/target system: | ||
50 | |||
51 | You need to enable the following kernel config option: | ||
52 | |||
53 | CONFIG_EARLY_PRINTK_DBGP=y | ||
54 | |||
55 | And you need to add the boot command line: "earlyprintk=dbgp". | ||
56 | (If you are using Grub, append it to the 'kernel' line in | ||
57 | /etc/grub.conf) | ||
58 | |||
59 | NOTE: normally earlyprintk console gets turned off once the | ||
60 | regular console is alive - use "earlyprintk=dbgp,keep" to keep | ||
61 | this channel open beyond early bootup. This can be useful for | ||
62 | debugging crashes under Xorg, etc. | ||
63 | |||
64 | b.) On the client/console system: | ||
65 | |||
66 | You should enable the following kernel config option: | ||
67 | |||
68 | CONFIG_USB_SERIAL_DEBUG=y | ||
69 | |||
70 | On the next bootup with the modified kernel you should | ||
71 | get a /dev/ttyUSBx device(s). | ||
72 | |||
73 | Now this channel of kernel messages is ready to be used: start | ||
74 | your favorite terminal emulator (minicom, etc.) and set | ||
75 | it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to | ||
76 | see the raw output. | ||
77 | |||
78 | c.) On Nvidia Southbridge based systems: the kernel will try to probe | ||
79 | and find out which port has debug device connected. | ||
80 | |||
81 | 3. Testing that it works fine: | ||
82 | |||
83 | You can test the output by using earlyprintk=dbgp,keep and provoking | ||
84 | kernel messages on the host/target system. You can provoke a harmless | ||
85 | kernel message by for example doing: | ||
86 | |||
87 | echo h > /proc/sysrq-trigger | ||
88 | |||
89 | On the host/target system you should see this help line in "dmesg" output: | ||
90 | |||
91 | SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z) | ||
92 | |||
93 | On the client/console system do: | ||
94 | |||
95 | cat /dev/ttyUSB0 | ||
96 | |||
97 | And you should see the help line above displayed shortly after you've | ||
98 | provoked it on the host system. | ||
99 | |||
100 | If it does not work then please ask about it on the linux-kernel@vger.kernel.org | ||
101 | mailing list or contact the x86 maintainers. | ||