diff options
Diffstat (limited to 'Documentation')
59 files changed, 2562 insertions, 1182 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-net-batman-adv b/Documentation/ABI/testing/sysfs-class-net-batman-adv new file mode 100644 index 000000000000..38dd762def4b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-batman-adv | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | What: /sys/class/net/<iface>/batman-adv/mesh_iface | ||
3 | Date: May 2010 | ||
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
5 | Description: | ||
6 | The /sys/class/net/<iface>/batman-adv/mesh_iface file | ||
7 | displays the batman mesh interface this <iface> | ||
8 | currently is associated with. | ||
9 | |||
10 | What: /sys/class/net/<iface>/batman-adv/iface_status | ||
11 | Date: May 2010 | ||
12 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
13 | Description: | ||
14 | Indicates the status of <iface> as it is seen by batman. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh new file mode 100644 index 000000000000..748fe1701d25 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-mesh | |||
@@ -0,0 +1,69 @@ | |||
1 | |||
2 | What: /sys/class/net/<mesh_iface>/mesh/aggregated_ogms | ||
3 | Date: May 2010 | ||
4 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
5 | Description: | ||
6 | Indicates whether the batman protocol messages of the | ||
7 | mesh <mesh_iface> shall be aggregated or not. | ||
8 | |||
9 | What: /sys/class/net/<mesh_iface>/mesh/bonding | ||
10 | Date: June 2010 | ||
11 | Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | ||
12 | Description: | ||
13 | Indicates whether the data traffic going through the | ||
14 | mesh will be sent using multiple interfaces at the | ||
15 | same time (if available). | ||
16 | |||
17 | What: /sys/class/net/<mesh_iface>/mesh/fragmentation | ||
18 | Date: October 2010 | ||
19 | Contact: Andreas Langer <an.langer@gmx.de> | ||
20 | Description: | ||
21 | Indicates whether the data traffic going through the | ||
22 | mesh will be fragmented or silently discarded if the | ||
23 | packet size exceeds the outgoing interface MTU. | ||
24 | |||
25 | What: /sys/class/net/<mesh_iface>/mesh/gw_bandwidth | ||
26 | Date: October 2010 | ||
27 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
28 | Description: | ||
29 | Defines the bandwidth which is propagated by this | ||
30 | node if gw_mode was set to 'server'. | ||
31 | |||
32 | What: /sys/class/net/<mesh_iface>/mesh/gw_mode | ||
33 | Date: October 2010 | ||
34 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
35 | Description: | ||
36 | Defines the state of the gateway features. Can be | ||
37 | either 'off', 'client' or 'server'. | ||
38 | |||
39 | What: /sys/class/net/<mesh_iface>/mesh/gw_sel_class | ||
40 | Date: October 2010 | ||
41 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
42 | Description: | ||
43 | Defines the selection criteria this node will use | ||
44 | to choose a gateway if gw_mode was set to 'client'. | ||
45 | |||
46 | What: /sys/class/net/<mesh_iface>/mesh/orig_interval | ||
47 | Date: May 2010 | ||
48 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
49 | Description: | ||
50 | Defines the interval in milliseconds in which batman | ||
51 | sends its protocol messages. | ||
52 | |||
53 | What: /sys/class/net/<mesh_iface>/mesh/hop_penalty | ||
54 | Date: Oct 2010 | ||
55 | Contact: Linus Lüssing <linus.luessing@web.de> | ||
56 | Description: | ||
57 | Defines the penalty which will be applied to an | ||
58 | originator message's tq-field on every hop. | ||
59 | |||
60 | What: /sys/class/net/<mesh_iface>/mesh/vis_mode | ||
61 | Date: May 2010 | ||
62 | Contact: Marek Lindner <lindner_marek@yahoo.de> | ||
63 | Description: | ||
64 | Each batman node only maintains information about its | ||
65 | own local neighborhood, therefore generating graphs | ||
66 | showing the topology of the entire mesh is not easily | ||
67 | feasible without having a central instance to collect | ||
68 | the local topologies from all nodes. This file allows | ||
69 | to activate the collecting (server) mode. | ||
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty new file mode 100644 index 000000000000..b138b663bf54 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-tty | |||
@@ -0,0 +1,19 @@ | |||
1 | What: /sys/class/tty/console/active | ||
2 | Date: Nov 2010 | ||
3 | Contact: Kay Sievers <kay.sievers@vrfy.org> | ||
4 | Description: | ||
5 | Shows the list of currently configured | ||
6 | console devices, like 'tty1 ttyS0'. | ||
7 | The last entry in the file is the active | ||
8 | device connected to /dev/console. | ||
9 | The file supports poll() to detect virtual | ||
10 | console switches. | ||
11 | |||
12 | What: /sys/class/tty/tty0/active | ||
13 | Date: Nov 2010 | ||
14 | Contact: Kay Sievers <kay.sievers@vrfy.org> | ||
15 | Description: | ||
16 | Shows the currently active virtual console | ||
17 | device, like 'tty1'. | ||
18 | The file supports poll() to detect virtual | ||
19 | console switches. | ||
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 19a1210c2530..03641a08e275 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
@@ -146,6 +146,7 @@ | |||
146 | !Finclude/net/cfg80211.h cfg80211_rx_mgmt | 146 | !Finclude/net/cfg80211.h cfg80211_rx_mgmt |
147 | !Finclude/net/cfg80211.h cfg80211_mgmt_tx_status | 147 | !Finclude/net/cfg80211.h cfg80211_mgmt_tx_status |
148 | !Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify | 148 | !Finclude/net/cfg80211.h cfg80211_cqm_rssi_notify |
149 | !Finclude/net/cfg80211.h cfg80211_cqm_pktloss_notify | ||
149 | !Finclude/net/cfg80211.h cfg80211_michael_mic_failure | 150 | !Finclude/net/cfg80211.h cfg80211_michael_mic_failure |
150 | </chapter> | 151 | </chapter> |
151 | <chapter> | 152 | <chapter> |
@@ -332,10 +333,16 @@ | |||
332 | <title>functions/definitions</title> | 333 | <title>functions/definitions</title> |
333 | !Finclude/net/mac80211.h ieee80211_rx_status | 334 | !Finclude/net/mac80211.h ieee80211_rx_status |
334 | !Finclude/net/mac80211.h mac80211_rx_flags | 335 | !Finclude/net/mac80211.h mac80211_rx_flags |
336 | !Finclude/net/mac80211.h mac80211_tx_control_flags | ||
337 | !Finclude/net/mac80211.h mac80211_rate_control_flags | ||
338 | !Finclude/net/mac80211.h ieee80211_tx_rate | ||
335 | !Finclude/net/mac80211.h ieee80211_tx_info | 339 | !Finclude/net/mac80211.h ieee80211_tx_info |
340 | !Finclude/net/mac80211.h ieee80211_tx_info_clear_status | ||
336 | !Finclude/net/mac80211.h ieee80211_rx | 341 | !Finclude/net/mac80211.h ieee80211_rx |
342 | !Finclude/net/mac80211.h ieee80211_rx_ni | ||
337 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe | 343 | !Finclude/net/mac80211.h ieee80211_rx_irqsafe |
338 | !Finclude/net/mac80211.h ieee80211_tx_status | 344 | !Finclude/net/mac80211.h ieee80211_tx_status |
345 | !Finclude/net/mac80211.h ieee80211_tx_status_ni | ||
339 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe | 346 | !Finclude/net/mac80211.h ieee80211_tx_status_irqsafe |
340 | !Finclude/net/mac80211.h ieee80211_rts_get | 347 | !Finclude/net/mac80211.h ieee80211_rts_get |
341 | !Finclude/net/mac80211.h ieee80211_rts_duration | 348 | !Finclude/net/mac80211.h ieee80211_rts_duration |
@@ -346,6 +353,7 @@ | |||
346 | !Finclude/net/mac80211.h ieee80211_stop_queue | 353 | !Finclude/net/mac80211.h ieee80211_stop_queue |
347 | !Finclude/net/mac80211.h ieee80211_wake_queues | 354 | !Finclude/net/mac80211.h ieee80211_wake_queues |
348 | !Finclude/net/mac80211.h ieee80211_stop_queues | 355 | !Finclude/net/mac80211.h ieee80211_stop_queues |
356 | !Finclude/net/mac80211.h ieee80211_queue_stopped | ||
349 | </sect1> | 357 | </sect1> |
350 | </chapter> | 358 | </chapter> |
351 | 359 | ||
@@ -354,6 +362,13 @@ | |||
354 | !Pinclude/net/mac80211.h Frame filtering | 362 | !Pinclude/net/mac80211.h Frame filtering |
355 | !Finclude/net/mac80211.h ieee80211_filter_flags | 363 | !Finclude/net/mac80211.h ieee80211_filter_flags |
356 | </chapter> | 364 | </chapter> |
365 | |||
366 | <chapter id="workqueue"> | ||
367 | <title>The mac80211 workqueue</title> | ||
368 | !Pinclude/net/mac80211.h mac80211 workqueue | ||
369 | !Finclude/net/mac80211.h ieee80211_queue_work | ||
370 | !Finclude/net/mac80211.h ieee80211_queue_delayed_work | ||
371 | </chapter> | ||
357 | </part> | 372 | </part> |
358 | 373 | ||
359 | <part id="advanced"> | 374 | <part id="advanced"> |
@@ -374,6 +389,9 @@ | |||
374 | !Finclude/net/mac80211.h set_key_cmd | 389 | !Finclude/net/mac80211.h set_key_cmd |
375 | !Finclude/net/mac80211.h ieee80211_key_conf | 390 | !Finclude/net/mac80211.h ieee80211_key_conf |
376 | !Finclude/net/mac80211.h ieee80211_key_flags | 391 | !Finclude/net/mac80211.h ieee80211_key_flags |
392 | !Finclude/net/mac80211.h ieee80211_tkip_key_type | ||
393 | !Finclude/net/mac80211.h ieee80211_get_tkip_key | ||
394 | !Finclude/net/mac80211.h ieee80211_key_removed | ||
377 | </chapter> | 395 | </chapter> |
378 | 396 | ||
379 | <chapter id="powersave"> | 397 | <chapter id="powersave"> |
@@ -417,6 +435,18 @@ | |||
417 | supported by mac80211, add notes about supporting hw crypto | 435 | supported by mac80211, add notes about supporting hw crypto |
418 | with it. | 436 | with it. |
419 | </para> | 437 | </para> |
438 | !Finclude/net/mac80211.h ieee80211_iterate_active_interfaces | ||
439 | !Finclude/net/mac80211.h ieee80211_iterate_active_interfaces_atomic | ||
440 | </chapter> | ||
441 | |||
442 | <chapter id="station-handling"> | ||
443 | <title>Station handling</title> | ||
444 | <para>TODO</para> | ||
445 | !Finclude/net/mac80211.h ieee80211_sta | ||
446 | !Finclude/net/mac80211.h sta_notify_cmd | ||
447 | !Finclude/net/mac80211.h ieee80211_find_sta | ||
448 | !Finclude/net/mac80211.h ieee80211_find_sta_by_ifaddr | ||
449 | !Finclude/net/mac80211.h ieee80211_sta_block_awake | ||
420 | </chapter> | 450 | </chapter> |
421 | 451 | ||
422 | <chapter id="hardware-scan-offload"> | 452 | <chapter id="hardware-scan-offload"> |
@@ -424,6 +454,28 @@ | |||
424 | <para>TBD</para> | 454 | <para>TBD</para> |
425 | !Finclude/net/mac80211.h ieee80211_scan_completed | 455 | !Finclude/net/mac80211.h ieee80211_scan_completed |
426 | </chapter> | 456 | </chapter> |
457 | |||
458 | <chapter id="aggregation"> | ||
459 | <title>Aggregation</title> | ||
460 | <sect1> | ||
461 | <title>TX A-MPDU aggregation</title> | ||
462 | !Pnet/mac80211/agg-tx.c TX A-MPDU aggregation | ||
463 | !Cnet/mac80211/agg-tx.c | ||
464 | </sect1> | ||
465 | <sect1> | ||
466 | <title>RX A-MPDU aggregation</title> | ||
467 | !Pnet/mac80211/agg-rx.c RX A-MPDU aggregation | ||
468 | !Cnet/mac80211/agg-rx.c | ||
469 | </sect1> | ||
470 | !Finclude/net/mac80211.h ieee80211_ampdu_mlme_action | ||
471 | </chapter> | ||
472 | |||
473 | <chapter id="smps"> | ||
474 | <title>Spatial Multiplexing Powersave (SMPS)</title> | ||
475 | !Pinclude/net/mac80211.h Spatial multiplexing power save | ||
476 | !Finclude/net/mac80211.h ieee80211_request_smps | ||
477 | !Finclude/net/mac80211.h ieee80211_smps_mode | ||
478 | </chapter> | ||
427 | </part> | 479 | </part> |
428 | 480 | ||
429 | <part id="rate-control"> | 481 | <part id="rate-control"> |
@@ -435,9 +487,16 @@ | |||
435 | interface and how it relates to mac80211 and drivers. | 487 | interface and how it relates to mac80211 and drivers. |
436 | </para> | 488 | </para> |
437 | </partintro> | 489 | </partintro> |
438 | <chapter id="dummy"> | 490 | <chapter id="ratecontrol-api"> |
439 | <title>dummy chapter</title> | 491 | <title>Rate Control API</title> |
440 | <para>TBD</para> | 492 | <para>TBD</para> |
493 | !Finclude/net/mac80211.h ieee80211_start_tx_ba_session | ||
494 | !Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe | ||
495 | !Finclude/net/mac80211.h ieee80211_stop_tx_ba_session | ||
496 | !Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe | ||
497 | !Finclude/net/mac80211.h rate_control_changed | ||
498 | !Finclude/net/mac80211.h ieee80211_tx_rate_control | ||
499 | !Finclude/net/mac80211.h rate_control_send_low | ||
441 | </chapter> | 500 | </chapter> |
442 | </part> | 501 | </part> |
443 | 502 | ||
@@ -485,6 +544,13 @@ | |||
485 | </sect1> | 544 | </sect1> |
486 | </chapter> | 545 | </chapter> |
487 | 546 | ||
547 | <chapter id="aggregation-internals"> | ||
548 | <title>Aggregation</title> | ||
549 | !Fnet/mac80211/sta_info.h sta_ampdu_mlme | ||
550 | !Fnet/mac80211/sta_info.h tid_ampdu_tx | ||
551 | !Fnet/mac80211/sta_info.h tid_ampdu_rx | ||
552 | </chapter> | ||
553 | |||
488 | <chapter id="synchronisation"> | 554 | <chapter id="synchronisation"> |
489 | <title>Synchronisation</title> | 555 | <title>Synchronisation</title> |
490 | <para>TBD</para> | 556 | <para>TBD</para> |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 22edcbb9ddaf..35447e081736 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
@@ -304,6 +304,10 @@ X!Idrivers/video/console/fonts.c | |||
304 | !Edrivers/input/ff-core.c | 304 | !Edrivers/input/ff-core.c |
305 | !Edrivers/input/ff-memless.c | 305 | !Edrivers/input/ff-memless.c |
306 | </sect1> | 306 | </sect1> |
307 | <sect1><title>Multitouch Library</title> | ||
308 | !Iinclude/linux/input/mt.h | ||
309 | !Edrivers/input/input-mt.c | ||
310 | </sect1> | ||
307 | <sect1><title>Polled input devices</title> | 311 | <sect1><title>Polled input devices</title> |
308 | !Iinclude/linux/input-polldev.h | 312 | !Iinclude/linux/input-polldev.h |
309 | !Edrivers/input/input-polldev.c | 313 | !Edrivers/input/input-polldev.c |
diff --git a/Documentation/DocBook/v4l/func-ioctl.xml b/Documentation/DocBook/v4l/func-ioctl.xml index 00f9690e1c28..b60fd37a6295 100644 --- a/Documentation/DocBook/v4l/func-ioctl.xml +++ b/Documentation/DocBook/v4l/func-ioctl.xml | |||
@@ -34,8 +34,7 @@ | |||
34 | <varlistentry> | 34 | <varlistentry> |
35 | <term><parameter>request</parameter></term> | 35 | <term><parameter>request</parameter></term> |
36 | <listitem> | 36 | <listitem> |
37 | <para>V4L2 ioctl request code as defined in the <link | 37 | <para>V4L2 ioctl request code as defined in the <filename>videodev2.h</filename> header file, for example |
38 | linkend="videodev">videodev.h</link> header file, for example | ||
39 | VIDIOC_QUERYCAP.</para> | 38 | VIDIOC_QUERYCAP.</para> |
40 | </listitem> | 39 | </listitem> |
41 | </varlistentry> | 40 | </varlistentry> |
@@ -57,7 +56,7 @@ file descriptor. An ioctl <parameter>request</parameter> has encoded | |||
57 | in it whether the argument is an input, output or read/write | 56 | in it whether the argument is an input, output or read/write |
58 | parameter, and the size of the argument <parameter>argp</parameter> in | 57 | parameter, and the size of the argument <parameter>argp</parameter> in |
59 | bytes. Macros and defines specifying V4L2 ioctl requests are located | 58 | bytes. Macros and defines specifying V4L2 ioctl requests are located |
60 | in the <link linkend="videodev">videodev.h</link> header file. | 59 | in the <filename>videodev2.h</filename> header file. |
61 | Applications should use their own copy, not include the version in the | 60 | Applications should use their own copy, not include the version in the |
62 | kernel sources on the system they compile on. All V4L2 ioctl requests, | 61 | kernel sources on the system they compile on. All V4L2 ioctl requests, |
63 | their respective function and parameters are specified in <xref | 62 | their respective function and parameters are specified in <xref |
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index d7c467187095..cfffc88d7383 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -142,8 +142,8 @@ leftmost pixel of the second row from the top, and so on. The last row | |||
142 | has just as many pad bytes after it as the other rows.</para> | 142 | has just as many pad bytes after it as the other rows.</para> |
143 | 143 | ||
144 | <para>In V4L2 each format has an identifier which looks like | 144 | <para>In V4L2 each format has an identifier which looks like |
145 | <constant>PIX_FMT_XXX</constant>, defined in the <link | 145 | <constant>PIX_FMT_XXX</constant>, defined in the <filename>videodev2.h</filename> |
146 | linkend="videodev">videodev.h</link> header file. These identifiers | 146 | header file. These identifiers |
147 | represent <link linkend="v4l2-fourcc">four character codes</link> | 147 | represent <link linkend="v4l2-fourcc">four character codes</link> |
148 | which are also listed below, however they are not the same as those | 148 | which are also listed below, however they are not the same as those |
149 | used in the Windows world.</para> | 149 | used in the Windows world.</para> |
diff --git a/Documentation/Makefile b/Documentation/Makefile index 6fc7ea1d1f9d..9b4bc5c76f33 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
@@ -1,3 +1,3 @@ | |||
1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ | 1 | obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ |
2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ | 2 | filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ |
3 | pcmcia/ spi/ timers/ video4linux/ vm/ watchdog/src/ | 3 | pcmcia/ spi/ timers/ vm/ watchdog/src/ |
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index a851118775d8..6a8c73f55b80 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -1,18 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE debugfs Files and Formats | 1 | CONFIG_RCU_TRACE debugfs Files and Formats |
2 | 2 | ||
3 | 3 | ||
4 | The rcutree implementation of RCU provides debugfs trace output that | 4 | The rcutree and rcutiny implementations of RCU provide debugfs trace |
5 | summarizes counters and state. This information is useful for debugging | 5 | output that summarizes counters and state. This information is useful for |
6 | RCU itself, and can sometimes also help to debug abuses of RCU. | 6 | debugging RCU itself, and can sometimes also help to debug abuses of RCU. |
7 | The following sections describe the debugfs files and formats. | 7 | The following sections describe the debugfs files and formats, first |
8 | for rcutree and next for rcutiny. | ||
8 | 9 | ||
9 | 10 | ||
10 | Hierarchical RCU debugfs Files and Formats | 11 | CONFIG_TREE_RCU and CONFIG_TREE_PREEMPT_RCU debugfs Files and Formats |
11 | 12 | ||
12 | This implementation of RCU provides three debugfs files under the | 13 | These implementations of RCU provides five debugfs files under the |
13 | top-level directory RCU: rcu/rcudata (which displays fields in struct | 14 | top-level directory RCU: rcu/rcudata (which displays fields in struct |
14 | rcu_data), rcu/rcugp (which displays grace-period counters), and | 15 | rcu_data), rcu/rcudata.csv (which is a .csv spreadsheet version of |
15 | rcu/rcuhier (which displays the struct rcu_node hierarchy). | 16 | rcu/rcudata), rcu/rcugp (which displays grace-period counters), |
17 | rcu/rcuhier (which displays the struct rcu_node hierarchy), and | ||
18 | rcu/rcu_pending (which displays counts of the reasons that the | ||
19 | rcu_pending() function decided that there was core RCU work to do). | ||
16 | 20 | ||
17 | The output of "cat rcu/rcudata" looks as follows: | 21 | The output of "cat rcu/rcudata" looks as follows: |
18 | 22 | ||
@@ -130,7 +134,8 @@ o "ci" is the number of RCU callbacks that have been invoked for | |||
130 | been registered in absence of CPU-hotplug activity. | 134 | been registered in absence of CPU-hotplug activity. |
131 | 135 | ||
132 | o "co" is the number of RCU callbacks that have been orphaned due to | 136 | o "co" is the number of RCU callbacks that have been orphaned due to |
133 | this CPU going offline. | 137 | this CPU going offline. These orphaned callbacks have been moved |
138 | to an arbitrarily chosen online CPU. | ||
134 | 139 | ||
135 | o "ca" is the number of RCU callbacks that have been adopted due to | 140 | o "ca" is the number of RCU callbacks that have been adopted due to |
136 | other CPUs going offline. Note that ci+co-ca+ql is the number of | 141 | other CPUs going offline. Note that ci+co-ca+ql is the number of |
@@ -168,12 +173,12 @@ o "gpnum" is the number of grace periods that have started. It is | |||
168 | 173 | ||
169 | The output of "cat rcu/rcuhier" looks as follows, with very long lines: | 174 | The output of "cat rcu/rcuhier" looks as follows, with very long lines: |
170 | 175 | ||
171 | c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 oqlen=0 | 176 | c=6902 g=6903 s=2 jfq=3 j=72c7 nfqs=13142/nfqsng=0(13142) fqlh=6 |
172 | 1/1 .>. 0:127 ^0 | 177 | 1/1 .>. 0:127 ^0 |
173 | 3/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 | 178 | 3/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 |
174 | 3/3f .>. 0:5 ^0 2/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 | 179 | 3/3f .>. 0:5 ^0 2/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 |
175 | rcu_bh: | 180 | rcu_bh: |
176 | c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 oqlen=0 | 181 | c=-226 g=-226 s=1 jfq=-5701 j=72c7 nfqs=88/nfqsng=0(88) fqlh=0 |
177 | 0/1 .>. 0:127 ^0 | 182 | 0/1 .>. 0:127 ^0 |
178 | 0/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 | 183 | 0/3 .>. 0:35 ^0 0/0 .>. 36:71 ^1 0/0 .>. 72:107 ^2 0/0 .>. 108:127 ^3 |
179 | 0/3f .>. 0:5 ^0 0/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 | 184 | 0/3f .>. 0:5 ^0 0/3 .>. 6:11 ^1 0/0 .>. 12:17 ^2 0/0 .>. 18:23 ^3 0/0 .>. 24:29 ^4 0/0 .>. 30:35 ^5 0/0 .>. 36:41 ^0 0/0 .>. 42:47 ^1 0/0 .>. 48:53 ^2 0/0 .>. 54:59 ^3 0/0 .>. 60:65 ^4 0/0 .>. 66:71 ^5 0/0 .>. 72:77 ^0 0/0 .>. 78:83 ^1 0/0 .>. 84:89 ^2 0/0 .>. 90:95 ^3 0/0 .>. 96:101 ^4 0/0 .>. 102:107 ^5 0/0 .>. 108:113 ^0 0/0 .>. 114:119 ^1 0/0 .>. 120:125 ^2 0/0 .>. 126:127 ^3 |
@@ -212,11 +217,6 @@ o "fqlh" is the number of calls to force_quiescent_state() that | |||
212 | exited immediately (without even being counted in nfqs above) | 217 | exited immediately (without even being counted in nfqs above) |
213 | due to contention on ->fqslock. | 218 | due to contention on ->fqslock. |
214 | 219 | ||
215 | o "oqlen" is the number of callbacks on the "orphan" callback | ||
216 | list. RCU callbacks are placed on this list by CPUs going | ||
217 | offline, and are "adopted" either by the CPU helping the outgoing | ||
218 | CPU or by the next rcu_barrier*() call, whichever comes first. | ||
219 | |||
220 | o Each element of the form "1/1 0:127 ^0" represents one struct | 220 | o Each element of the form "1/1 0:127 ^0" represents one struct |
221 | rcu_node. Each line represents one level of the hierarchy, from | 221 | rcu_node. Each line represents one level of the hierarchy, from |
222 | root to leaves. It is best to think of the rcu_data structures | 222 | root to leaves. It is best to think of the rcu_data structures |
@@ -326,3 +326,115 @@ o "nn" is the number of times that this CPU needed nothing. Alert | |||
326 | readers will note that the rcu "nn" number for a given CPU very | 326 | readers will note that the rcu "nn" number for a given CPU very |
327 | closely matches the rcu_bh "np" number for that same CPU. This | 327 | closely matches the rcu_bh "np" number for that same CPU. This |
328 | is due to short-circuit evaluation in rcu_pending(). | 328 | is due to short-circuit evaluation in rcu_pending(). |
329 | |||
330 | |||
331 | CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats | ||
332 | |||
333 | These implementations of RCU provides a single debugfs file under the | ||
334 | top-level directory RCU, namely rcu/rcudata, which displays fields in | ||
335 | rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, | ||
336 | rcu_preempt_ctrlblk. | ||
337 | |||
338 | The output of "cat rcu/rcudata" is as follows: | ||
339 | |||
340 | rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=... | ||
341 | ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274 | ||
342 | normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0 | ||
343 | exp balk: bt=0 nos=0 | ||
344 | rcu_sched: qlen: 0 | ||
345 | rcu_bh: qlen: 0 | ||
346 | |||
347 | This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the | ||
348 | rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. | ||
349 | The last three lines of the rcu_preempt section appear only in | ||
350 | CONFIG_RCU_BOOST kernel builds. The fields are as follows: | ||
351 | |||
352 | o "qlen" is the number of RCU callbacks currently waiting either | ||
353 | for an RCU grace period or waiting to be invoked. This is the | ||
354 | only field present for rcu_sched and rcu_bh, due to the | ||
355 | short-circuiting of grace period in those two cases. | ||
356 | |||
357 | o "gp" is the number of grace periods that have completed. | ||
358 | |||
359 | o "g197/p197/c197" displays the grace-period state, with the | ||
360 | "g" number being the number of grace periods that have started | ||
361 | (mod 256), the "p" number being the number of grace periods | ||
362 | that the CPU has responded to (also mod 256), and the "c" | ||
363 | number being the number of grace periods that have completed | ||
364 | (once again mode 256). | ||
365 | |||
366 | Why have both "gp" and "g"? Because the data flowing into | ||
367 | "gp" is only present in a CONFIG_RCU_TRACE kernel. | ||
368 | |||
369 | o "tasks" is a set of bits. The first bit is "T" if there are | ||
370 | currently tasks that have recently blocked within an RCU | ||
371 | read-side critical section, the second bit is "N" if any of the | ||
372 | aforementioned tasks are blocking the current RCU grace period, | ||
373 | and the third bit is "E" if any of the aforementioned tasks are | ||
374 | blocking the current expedited grace period. Each bit is "." | ||
375 | if the corresponding condition does not hold. | ||
376 | |||
377 | o "ttb" is a single bit. It is "B" if any of the blocked tasks | ||
378 | need to be priority boosted and "." otherwise. | ||
379 | |||
380 | o "btg" indicates whether boosting has been carried out during | ||
381 | the current grace period, with "exp" indicating that boosting | ||
382 | is in progress for an expedited grace period, "no" indicating | ||
383 | that boosting has not yet started for a normal grace period, | ||
384 | "begun" indicating that boosting has bebug for a normal grace | ||
385 | period, and "done" indicating that boosting has completed for | ||
386 | a normal grace period. | ||
387 | |||
388 | o "ntb" is the total number of tasks subjected to RCU priority boosting | ||
389 | periods since boot. | ||
390 | |||
391 | o "neb" is the number of expedited grace periods that have had | ||
392 | to resort to RCU priority boosting since boot. | ||
393 | |||
394 | o "nnb" is the number of normal grace periods that have had | ||
395 | to resort to RCU priority boosting since boot. | ||
396 | |||
397 | o "j" is the low-order 12 bits of the jiffies counter in hexadecimal. | ||
398 | |||
399 | o "bt" is the low-order 12 bits of the value that the jiffies counter | ||
400 | will have at the next time that boosting is scheduled to begin. | ||
401 | |||
402 | o In the line beginning with "normal balk", the fields are as follows: | ||
403 | |||
404 | o "nt" is the number of times that the system balked from | ||
405 | boosting because there were no blocked tasks to boost. | ||
406 | Note that the system will balk from boosting even if the | ||
407 | grace period is overdue when the currently running task | ||
408 | is looping within an RCU read-side critical section. | ||
409 | There is no point in boosting in this case, because | ||
410 | boosting a running task won't make it run any faster. | ||
411 | |||
412 | o "gt" is the number of times that the system balked | ||
413 | from boosting because, although there were blocked tasks, | ||
414 | none of them were preventing the current grace period | ||
415 | from completing. | ||
416 | |||
417 | o "bt" is the number of times that the system balked | ||
418 | from boosting because boosting was already in progress. | ||
419 | |||
420 | o "b" is the number of times that the system balked from | ||
421 | boosting because boosting had already completed for | ||
422 | the grace period in question. | ||
423 | |||
424 | o "ny" is the number of times that the system balked from | ||
425 | boosting because it was not yet time to start boosting | ||
426 | the grace period in question. | ||
427 | |||
428 | o "nos" is the number of times that the system balked from | ||
429 | boosting for inexplicable ("not otherwise specified") | ||
430 | reasons. This can actually happen due to races involving | ||
431 | increments of the jiffies counter. | ||
432 | |||
433 | o In the line beginning with "exp balk", the fields are as follows: | ||
434 | |||
435 | o "bt" is the number of times that the system balked from | ||
436 | boosting because there were no blocked tasks to boost. | ||
437 | |||
438 | o "nos" is the number of times that the system balked from | ||
439 | boosting for inexplicable ("not otherwise specified") | ||
440 | reasons. | ||
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index a2976a6de033..e9c77788a39d 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c | |||
@@ -516,6 +516,7 @@ int main(int argc, char *argv[]) | |||
516 | default: | 516 | default: |
517 | fprintf(stderr, "Unknown nla_type %d\n", | 517 | fprintf(stderr, "Unknown nla_type %d\n", |
518 | na->nla_type); | 518 | na->nla_type); |
519 | case TASKSTATS_TYPE_NULL: | ||
519 | break; | 520 | break; |
520 | } | 521 | } |
521 | na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); | 522 | na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); |
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX index ecf7d04bca26..91c24a1e8a9e 100644 --- a/Documentation/arm/00-INDEX +++ b/Documentation/arm/00-INDEX | |||
@@ -34,3 +34,5 @@ memory.txt | |||
34 | - description of the virtual memory layout | 34 | - description of the virtual memory layout |
35 | nwfpe/ | 35 | nwfpe/ |
36 | - NWFPE floating point emulator documentation | 36 | - NWFPE floating point emulator documentation |
37 | swp_emulation | ||
38 | - SWP/SWPB emulation handler/logging description | ||
diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/OMAP/omap_pm index 5389440aade3..9012bb039094 100644 --- a/Documentation/arm/OMAP/omap_pm +++ b/Documentation/arm/OMAP/omap_pm | |||
@@ -127,3 +127,28 @@ implementation needs: | |||
127 | 10. (*pdata->cpu_set_freq)(unsigned long f) | 127 | 10. (*pdata->cpu_set_freq)(unsigned long f) |
128 | 128 | ||
129 | 11. (*pdata->cpu_get_freq)(void) | 129 | 11. (*pdata->cpu_get_freq)(void) |
130 | |||
131 | Customizing OPP for platform | ||
132 | ============================ | ||
133 | Defining CONFIG_PM should enable OPP layer for the silicon | ||
134 | and the registration of OPP table should take place automatically. | ||
135 | However, in special cases, the default OPP table may need to be | ||
136 | tweaked, for e.g.: | ||
137 | * enable default OPPs which are disabled by default, but which | ||
138 | could be enabled on a platform | ||
139 | * Disable an unsupported OPP on the platform | ||
140 | * Define and add a custom opp table entry | ||
141 | in these cases, the board file needs to do additional steps as follows: | ||
142 | arch/arm/mach-omapx/board-xyz.c | ||
143 | #include "pm.h" | ||
144 | .... | ||
145 | static void __init omap_xyz_init_irq(void) | ||
146 | { | ||
147 | .... | ||
148 | /* Initialize the default table */ | ||
149 | omapx_opp_init(); | ||
150 | /* Do customization to the defaults */ | ||
151 | .... | ||
152 | } | ||
153 | NOTE: omapx_opp_init will be omap3_opp_init or as required | ||
154 | based on the omap family. | ||
diff --git a/Documentation/arm/swp_emulation b/Documentation/arm/swp_emulation new file mode 100644 index 000000000000..af903d22fd93 --- /dev/null +++ b/Documentation/arm/swp_emulation | |||
@@ -0,0 +1,27 @@ | |||
1 | Software emulation of deprecated SWP instruction (CONFIG_SWP_EMULATE) | ||
2 | --------------------------------------------------------------------- | ||
3 | |||
4 | ARMv6 architecture deprecates use of the SWP/SWPB instructions, and recommeds | ||
5 | moving to the load-locked/store-conditional instructions LDREX and STREX. | ||
6 | |||
7 | ARMv7 multiprocessing extensions introduce the ability to disable these | ||
8 | instructions, triggering an undefined instruction exception when executed. | ||
9 | Trapped instructions are emulated using an LDREX/STREX or LDREXB/STREXB | ||
10 | sequence. If a memory access fault (an abort) occurs, a segmentation fault is | ||
11 | signalled to the triggering process. | ||
12 | |||
13 | /proc/cpu/swp_emulation holds some statistics/information, including the PID of | ||
14 | the last process to trigger the emulation to be invocated. For example: | ||
15 | --- | ||
16 | Emulated SWP: 12 | ||
17 | Emulated SWPB: 0 | ||
18 | Aborted SWP{B}: 1 | ||
19 | Last process: 314 | ||
20 | --- | ||
21 | |||
22 | NOTE: when accessing uncached shared regions, LDREX/STREX rely on an external | ||
23 | transaction monitoring block called a global monitor to maintain update | ||
24 | atomicity. If your system does not implement a global monitor, this option can | ||
25 | cause programs that perform SWP operations to uncached memory to deadlock, as | ||
26 | the STREX operation will always fail. | ||
27 | |||
diff --git a/Documentation/dontdiff b/Documentation/dontdiff index d9bcffd59433..470d3dba1a69 100644 --- a/Documentation/dontdiff +++ b/Documentation/dontdiff | |||
@@ -62,6 +62,10 @@ aic7*reg_print.c* | |||
62 | aic7*seq.h* | 62 | aic7*seq.h* |
63 | aicasm | 63 | aicasm |
64 | aicdb.h* | 64 | aicdb.h* |
65 | altivec1.c | ||
66 | altivec2.c | ||
67 | altivec4.c | ||
68 | altivec8.c | ||
65 | asm-offsets.h | 69 | asm-offsets.h |
66 | asm_offsets.h | 70 | asm_offsets.h |
67 | autoconf.h* | 71 | autoconf.h* |
@@ -76,6 +80,7 @@ btfixupprep | |||
76 | build | 80 | build |
77 | bvmlinux | 81 | bvmlinux |
78 | bzImage* | 82 | bzImage* |
83 | capflags.c | ||
79 | classlist.h* | 84 | classlist.h* |
80 | comp*.log | 85 | comp*.log |
81 | compile.h* | 86 | compile.h* |
@@ -94,6 +99,7 @@ devlist.h* | |||
94 | docproc | 99 | docproc |
95 | elf2ecoff | 100 | elf2ecoff |
96 | elfconfig.h* | 101 | elfconfig.h* |
102 | evergreen_reg_safe.h | ||
97 | fixdep | 103 | fixdep |
98 | flask.h | 104 | flask.h |
99 | fore200e_mkfirm | 105 | fore200e_mkfirm |
@@ -108,9 +114,16 @@ genksyms | |||
108 | *_gray256.c | 114 | *_gray256.c |
109 | ihex2fw | 115 | ihex2fw |
110 | ikconfig.h* | 116 | ikconfig.h* |
117 | inat-tables.c | ||
111 | initramfs_data.cpio | 118 | initramfs_data.cpio |
112 | initramfs_data.cpio.gz | 119 | initramfs_data.cpio.gz |
113 | initramfs_list | 120 | initramfs_list |
121 | int16.c | ||
122 | int1.c | ||
123 | int2.c | ||
124 | int32.c | ||
125 | int4.c | ||
126 | int8.c | ||
114 | kallsyms | 127 | kallsyms |
115 | kconfig | 128 | kconfig |
116 | keywords.c | 129 | keywords.c |
@@ -140,6 +153,7 @@ mkprep | |||
140 | mktables | 153 | mktables |
141 | mktree | 154 | mktree |
142 | modpost | 155 | modpost |
156 | modules.builtin | ||
143 | modules.order | 157 | modules.order |
144 | modversions.h* | 158 | modversions.h* |
145 | ncscope.* | 159 | ncscope.* |
@@ -153,14 +167,23 @@ pca200e.bin | |||
153 | pca200e_ecd.bin2 | 167 | pca200e_ecd.bin2 |
154 | piggy.gz | 168 | piggy.gz |
155 | piggyback | 169 | piggyback |
170 | piggy.S | ||
156 | pnmtologo | 171 | pnmtologo |
157 | ppc_defs.h* | 172 | ppc_defs.h* |
158 | pss_boot.h | 173 | pss_boot.h |
159 | qconf | 174 | qconf |
175 | r100_reg_safe.h | ||
176 | r200_reg_safe.h | ||
177 | r300_reg_safe.h | ||
178 | r420_reg_safe.h | ||
179 | r600_reg_safe.h | ||
160 | raid6altivec*.c | 180 | raid6altivec*.c |
161 | raid6int*.c | 181 | raid6int*.c |
162 | raid6tables.c | 182 | raid6tables.c |
163 | relocs | 183 | relocs |
184 | rn50_reg_safe.h | ||
185 | rs600_reg_safe.h | ||
186 | rv515_reg_safe.h | ||
164 | series | 187 | series |
165 | setup | 188 | setup |
166 | setup.bin | 189 | setup.bin |
@@ -169,6 +192,7 @@ sImage | |||
169 | sm_tbl* | 192 | sm_tbl* |
170 | split-include | 193 | split-include |
171 | syscalltab.h | 194 | syscalltab.h |
195 | tables.c | ||
172 | tags | 196 | tags |
173 | tftpboot.img | 197 | tftpboot.img |
174 | timeconst.h | 198 | timeconst.h |
@@ -190,6 +214,7 @@ vmlinux | |||
190 | vmlinux-* | 214 | vmlinux-* |
191 | vmlinux.aout | 215 | vmlinux.aout |
192 | vmlinux.lds | 216 | vmlinux.lds |
217 | voffset.h | ||
193 | vsyscall.lds | 218 | vsyscall.lds |
194 | vsyscall_32.lds | 219 | vsyscall_32.lds |
195 | wanxlfw.inc | 220 | wanxlfw.inc |
@@ -200,3 +225,4 @@ wakeup.elf | |||
200 | wakeup.lds | 225 | wakeup.lds |
201 | zImage* | 226 | zImage* |
202 | zconf.hash.c | 227 | zconf.hash.c |
228 | zoffset.h | ||
diff --git a/Documentation/dvb/lmedm04.txt b/Documentation/dvb/lmedm04.txt index e175784b89bf..641886504201 100644 --- a/Documentation/dvb/lmedm04.txt +++ b/Documentation/dvb/lmedm04.txt | |||
@@ -46,7 +46,7 @@ and run | |||
46 | Other LG firmware can be extracted manually from US280D.sys | 46 | Other LG firmware can be extracted manually from US280D.sys |
47 | only found in windows/system32/driver. | 47 | only found in windows/system32/driver. |
48 | 48 | ||
49 | dd if=US280D.sys ibs=1 skip=42616 count=3668 of=dvb-usb-lme2510-lg.fw | 49 | dd if=US280D.sys ibs=1 skip=42360 count=3924 of=dvb-usb-lme2510-lg.fw |
50 | 50 | ||
51 | for DM04 LME2510C (LG Tuner) | 51 | for DM04 LME2510C (LG Tuner) |
52 | --------------------------- | 52 | --------------------------- |
diff --git a/Documentation/fb/udlfb.txt b/Documentation/fb/udlfb.txt new file mode 100644 index 000000000000..7fdde2a02a27 --- /dev/null +++ b/Documentation/fb/udlfb.txt | |||
@@ -0,0 +1,144 @@ | |||
1 | |||
2 | What is udlfb? | ||
3 | =============== | ||
4 | |||
5 | This is a driver for DisplayLink USB 2.0 era graphics chips. | ||
6 | |||
7 | DisplayLink chips provide simple hline/blit operations with some compression, | ||
8 | pairing that with a hardware framebuffer (16MB) on the other end of the | ||
9 | USB wire. That hardware framebuffer is able to drive the VGA, DVI, or HDMI | ||
10 | monitor with no CPU involvement until a pixel has to change. | ||
11 | |||
12 | The CPU or other local resource does all the rendering; optinally compares the | ||
13 | result with a local shadow of the remote hardware framebuffer to identify | ||
14 | the minimal set of pixels that have changed; and compresses and sends those | ||
15 | pixels line-by-line via USB bulk transfers. | ||
16 | |||
17 | Because of the efficiency of bulk transfers and a protocol on top that | ||
18 | does not require any acks - the effect is very low latency that | ||
19 | can support surprisingly high resolutions with good performance for | ||
20 | non-gaming and non-video applications. | ||
21 | |||
22 | Mode setting, EDID read, etc are other bulk or control transfers. Mode | ||
23 | setting is very flexible - able to set nearly arbitrary modes from any timing. | ||
24 | |||
25 | Advantages of USB graphics in general: | ||
26 | |||
27 | * Ability to add a nearly arbitrary number of displays to any USB 2.0 | ||
28 | capable system. On Linux, number of displays is limited by fbdev interface | ||
29 | (FB_MAX is currently 32). Of course, all USB devices on the same | ||
30 | host controller share the same 480Mbs USB 2.0 interface. | ||
31 | |||
32 | Advantages of supporting DisplayLink chips with kernel framebuffer interface: | ||
33 | |||
34 | * The actual hardware functionality of DisplayLink chips matches nearly | ||
35 | one-to-one with the fbdev interface, making the driver quite small and | ||
36 | tight relative to the functionality it provides. | ||
37 | * X servers and other applications can use the standard fbdev interface | ||
38 | from user mode to talk to the device, without needing to know anything | ||
39 | about USB or DisplayLink's protocol at all. A "displaylink" X driver | ||
40 | and a slightly modified "fbdev" X driver are among those that already do. | ||
41 | |||
42 | Disadvantages: | ||
43 | |||
44 | * Fbdev's mmap interface assumes a real hardware framebuffer is mapped. | ||
45 | In the case of USB graphics, it is just an allocated (virtual) buffer. | ||
46 | Writes need to be detected and encoded into USB bulk transfers by the CPU. | ||
47 | Accurate damage/changed area notifications work around this problem. | ||
48 | In the future, hopefully fbdev will be enhanced with an small standard | ||
49 | interface to allow mmap clients to report damage, for the benefit | ||
50 | of virtual or remote framebuffers. | ||
51 | * Fbdev does not arbitrate client ownership of the framebuffer well. | ||
52 | * Fbcon assumes the first framebuffer it finds should be consumed for console. | ||
53 | * It's not clear what the future of fbdev is, given the rise of KMS/DRM. | ||
54 | |||
55 | How to use it? | ||
56 | ============== | ||
57 | |||
58 | Udlfb, when loaded as a module, will match against all USB 2.0 generation | ||
59 | DisplayLink chips (Alex and Ollie family). It will then attempt to read the EDID | ||
60 | of the monitor, and set the best common mode between the DisplayLink device | ||
61 | and the monitor's capabilities. | ||
62 | |||
63 | If the DisplayLink device is successful, it will paint a "green screen" which | ||
64 | means that from a hardware and fbdev software perspective, everything is good. | ||
65 | |||
66 | At that point, a /dev/fb? interface will be present for user-mode applications | ||
67 | to open and begin writing to the framebuffer of the DisplayLink device using | ||
68 | standard fbdev calls. Note that if mmap() is used, by default the user mode | ||
69 | application must send down damage notifcations to trigger repaints of the | ||
70 | changed regions. Alternatively, udlfb can be recompiled with experimental | ||
71 | defio support enabled, to support a page-fault based detection mechanism | ||
72 | that can work without explicit notifcation. | ||
73 | |||
74 | The most common client of udlfb is xf86-video-displaylink or a modified | ||
75 | xf86-video-fbdev X server. These servers have no real DisplayLink specific | ||
76 | code. They write to the standard framebuffer interface and rely on udlfb | ||
77 | to do its thing. The one extra feature they have is the ability to report | ||
78 | rectangles from the X DAMAGE protocol extension down to udlfb via udlfb's | ||
79 | damage interface (which will hopefully be standardized for all virtual | ||
80 | framebuffers that need damage info). These damage notifications allow | ||
81 | udlfb to efficiently process the changed pixels. | ||
82 | |||
83 | Module Options | ||
84 | ============== | ||
85 | |||
86 | Special configuration for udlfb is usually unnecessary. There are a few | ||
87 | options, however. | ||
88 | |||
89 | From the command line, pass options to modprobe | ||
90 | modprobe udlfb defio=1 console=1 | ||
91 | |||
92 | Or for permanent option, create file like /etc/modprobe.d/options with text | ||
93 | options udlfb defio=1 console=1 | ||
94 | |||
95 | Accepted options: | ||
96 | |||
97 | fb_defio Make use of the fb_defio (CONFIG_FB_DEFERRED_IO) kernel | ||
98 | module to track changed areas of the framebuffer by page faults. | ||
99 | Standard fbdev applications that use mmap but that do not | ||
100 | report damage, may be able to work with this enabled. | ||
101 | Disabled by default because of overhead and other issues. | ||
102 | |||
103 | console Allow fbcon to attach to udlfb provided framebuffers. This | ||
104 | is disabled by default because fbcon will aggressively consume | ||
105 | the first framebuffer it finds, which isn't usually what the | ||
106 | user wants in the case of USB displays. | ||
107 | |||
108 | Sysfs Attributes | ||
109 | ================ | ||
110 | |||
111 | Udlfb creates several files in /sys/class/graphics/fb? | ||
112 | Where ? is the sequential framebuffer id of the particular DisplayLink device | ||
113 | |||
114 | edid If a valid EDID blob is written to this file (typically | ||
115 | by a udev rule), then udlfb will use this EDID as a | ||
116 | backup in case reading the actual EDID of the monitor | ||
117 | attached to the DisplayLink device fails. This is | ||
118 | especially useful for fixed panels, etc. that cannot | ||
119 | communicate their capabilities via EDID. Reading | ||
120 | this file returns the current EDID of the attached | ||
121 | monitor (or last backup value written). This is | ||
122 | useful to get the EDID of the attached monitor, | ||
123 | which can be passed to utilities like parse-edid. | ||
124 | |||
125 | metrics_bytes_rendered 32-bit count of pixel bytes rendered | ||
126 | |||
127 | metrics_bytes_identical 32-bit count of how many of those bytes were found to be | ||
128 | unchanged, based on a shadow framebuffer check | ||
129 | |||
130 | metrics_bytes_sent 32-bit count of how many bytes were transferred over | ||
131 | USB to communicate the resulting changed pixels to the | ||
132 | hardware. Includes compression and protocol overhead | ||
133 | |||
134 | metrics_cpu_kcycles_used 32-bit count of CPU cycles used in processing the | ||
135 | above pixels (in thousands of cycles). | ||
136 | |||
137 | metrics_reset Write-only. Any write to this file resets all metrics | ||
138 | above to zero. Note that the 32-bit counters above | ||
139 | roll over very quickly. To get reliable results, design | ||
140 | performance tests to start and finish in a very short | ||
141 | period of time (one minute or less is safe). | ||
142 | |||
143 | -- | ||
144 | Bernie Thompson <bernie@plugable.com> | ||
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 6c2f55e05f13..22f10818c2b3 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -97,36 +97,38 @@ Who: Pavel Machek <pavel@ucw.cz> | |||
97 | 97 | ||
98 | --------------------------- | 98 | --------------------------- |
99 | 99 | ||
100 | What: Video4Linux API 1 ioctls and from Video devices. | ||
101 | When: kernel 2.6.38 | ||
102 | Files: include/linux/videodev.h | ||
103 | Check: include/linux/videodev.h | ||
104 | Why: V4L1 AP1 was replaced by V4L2 API during migration from 2.4 to 2.6 | ||
105 | series. The old API have lots of drawbacks and don't provide enough | ||
106 | means to work with all video and audio standards. The newer API is | ||
107 | already available on the main drivers and should be used instead. | ||
108 | Newer drivers should use v4l_compat_translate_ioctl function to handle | ||
109 | old calls, replacing to newer ones. | ||
110 | Decoder iocts are using internally to allow video drivers to | ||
111 | communicate with video decoders. This should also be improved to allow | ||
112 | V4L2 calls being translated into compatible internal ioctls. | ||
113 | Compatibility ioctls will be provided, for a while, via | ||
114 | v4l1-compat module. | ||
115 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
116 | |||
117 | --------------------------- | ||
118 | |||
119 | What: Video4Linux obsolete drivers using V4L1 API | 100 | What: Video4Linux obsolete drivers using V4L1 API |
120 | When: kernel 2.6.38 | 101 | When: kernel 2.6.39 |
121 | Files: drivers/staging/cpia/* drivers/staging/stradis/* | 102 | Files: drivers/staging/se401/* drivers/staging/usbvideo/* |
122 | Check: drivers/staging/cpia/cpia.c drivers/staging/stradis/stradis.c | 103 | Check: drivers/staging/se401/se401.c drivers/staging/usbvideo/usbvideo.c |
123 | Why: There are some drivers still using V4L1 API, despite all efforts we've done | 104 | Why: There are some drivers still using V4L1 API, despite all efforts we've done |
124 | to migrate. Those drivers are for obsolete hardware that the old maintainer | 105 | to migrate. Those drivers are for obsolete hardware that the old maintainer |
125 | didn't care (or not have the hardware anymore), and that no other developer | 106 | didn't care (or not have the hardware anymore), and that no other developer |
126 | could find any hardware to buy. They probably have no practical usage today, | 107 | could find any hardware to buy. They probably have no practical usage today, |
127 | and people with such old hardware could probably keep using an older version | 108 | and people with such old hardware could probably keep using an older version |
128 | of the kernel. Those drivers will be moved to staging on 2.6.37 and, if nobody | 109 | of the kernel. Those drivers will be moved to staging on 2.6.38 and, if nobody |
129 | care enough to port and test them with V4L2 API, they'll be removed on 2.6.38. | 110 | cares enough to port and test them with V4L2 API, they'll be removed on 2.6.39. |
111 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | ||
112 | |||
113 | --------------------------- | ||
114 | |||
115 | What: Video4Linux: Remove obsolete ioctl's | ||
116 | When: kernel 2.6.39 | ||
117 | Files: include/media/videodev2.h | ||
118 | Why: Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong | ||
119 | type of R/W arguments. They were fixed, but the old ioctl names are | ||
120 | still there, maintained to avoid breaking binary compatibility: | ||
121 | #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int) | ||
122 | #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm) | ||
123 | #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control) | ||
124 | #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio) | ||
125 | #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout) | ||
126 | #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap) | ||
127 | There's no sense on preserving those forever, as it is very doubtful | ||
128 | that someone would try to use a such old binary with a modern kernel. | ||
129 | Removing them will allow us to remove some magic done at the V4L ioctl | ||
130 | handler. | ||
131 | |||
130 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> | 132 | Who: Mauro Carvalho Chehab <mchehab@infradead.org> |
131 | 133 | ||
132 | --------------------------- | 134 | --------------------------- |
@@ -564,3 +566,13 @@ Why: This field is deprecated. I2C device drivers shouldn't change their | |||
564 | Who: Jean Delvare <khali@linux-fr.org> | 566 | Who: Jean Delvare <khali@linux-fr.org> |
565 | 567 | ||
566 | ---------------------------- | 568 | ---------------------------- |
569 | |||
570 | What: cancel_rearming_delayed_work[queue]() | ||
571 | When: 2.6.39 | ||
572 | |||
573 | Why: The functions have been superceded by cancel_delayed_work_sync() | ||
574 | quite some time ago. The conversion is trivial and there is no | ||
575 | in-kernel user left. | ||
576 | Who: Tejun Heo <tj@kernel.org> | ||
577 | |||
578 | ---------------------------- | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index b6426f15b4ae..977d8919cc69 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -9,23 +9,25 @@ be able to use diff(1). | |||
9 | 9 | ||
10 | --------------------------- dentry_operations -------------------------- | 10 | --------------------------- dentry_operations -------------------------- |
11 | prototypes: | 11 | prototypes: |
12 | int (*d_revalidate)(struct dentry *, int); | 12 | int (*d_revalidate)(struct dentry *, struct nameidata *); |
13 | int (*d_hash) (struct dentry *, struct qstr *); | 13 | int (*d_hash)(const struct dentry *, const struct inode *, |
14 | int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); | 14 | struct qstr *); |
15 | int (*d_compare)(const struct dentry *, const struct inode *, | ||
16 | const struct dentry *, const struct inode *, | ||
17 | unsigned int, const char *, const struct qstr *); | ||
15 | int (*d_delete)(struct dentry *); | 18 | int (*d_delete)(struct dentry *); |
16 | void (*d_release)(struct dentry *); | 19 | void (*d_release)(struct dentry *); |
17 | void (*d_iput)(struct dentry *, struct inode *); | 20 | void (*d_iput)(struct dentry *, struct inode *); |
18 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); | 21 | char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); |
19 | 22 | ||
20 | locking rules: | 23 | locking rules: |
21 | none have BKL | 24 | rename_lock ->d_lock may block rcu-walk |
22 | dcache_lock rename_lock ->d_lock may block | 25 | d_revalidate: no no yes (ref-walk) maybe |
23 | d_revalidate: no no no yes | 26 | d_hash no no no maybe |
24 | d_hash no no no yes | 27 | d_compare: yes no no maybe |
25 | d_compare: no yes no no | 28 | d_delete: no yes no no |
26 | d_delete: yes no yes no | 29 | d_release: no no yes no |
27 | d_release: no no no yes | 30 | d_iput: no no yes no |
28 | d_iput: no no no yes | ||
29 | d_dname: no no no no | 31 | d_dname: no no no no |
30 | 32 | ||
31 | --------------------------- inode_operations --------------------------- | 33 | --------------------------- inode_operations --------------------------- |
@@ -42,18 +44,23 @@ ata *); | |||
42 | int (*rename) (struct inode *, struct dentry *, | 44 | int (*rename) (struct inode *, struct dentry *, |
43 | struct inode *, struct dentry *); | 45 | struct inode *, struct dentry *); |
44 | int (*readlink) (struct dentry *, char __user *,int); | 46 | int (*readlink) (struct dentry *, char __user *,int); |
45 | int (*follow_link) (struct dentry *, struct nameidata *); | 47 | void * (*follow_link) (struct dentry *, struct nameidata *); |
48 | void (*put_link) (struct dentry *, struct nameidata *, void *); | ||
46 | void (*truncate) (struct inode *); | 49 | void (*truncate) (struct inode *); |
47 | int (*permission) (struct inode *, int, struct nameidata *); | 50 | int (*permission) (struct inode *, int, unsigned int); |
51 | int (*check_acl)(struct inode *, int, unsigned int); | ||
48 | int (*setattr) (struct dentry *, struct iattr *); | 52 | int (*setattr) (struct dentry *, struct iattr *); |
49 | int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); | 53 | int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *); |
50 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 54 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
51 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 55 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
52 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 56 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
53 | int (*removexattr) (struct dentry *, const char *); | 57 | int (*removexattr) (struct dentry *, const char *); |
58 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
59 | long (*fallocate)(struct inode *inode, int mode, loff_t offset, loff_t len); | ||
60 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | ||
54 | 61 | ||
55 | locking rules: | 62 | locking rules: |
56 | all may block, none have BKL | 63 | all may block |
57 | i_mutex(inode) | 64 | i_mutex(inode) |
58 | lookup: yes | 65 | lookup: yes |
59 | create: yes | 66 | create: yes |
@@ -66,19 +73,24 @@ rmdir: yes (both) (see below) | |||
66 | rename: yes (all) (see below) | 73 | rename: yes (all) (see below) |
67 | readlink: no | 74 | readlink: no |
68 | follow_link: no | 75 | follow_link: no |
76 | put_link: no | ||
69 | truncate: yes (see below) | 77 | truncate: yes (see below) |
70 | setattr: yes | 78 | setattr: yes |
71 | permission: no | 79 | permission: no (may not block if called in rcu-walk mode) |
80 | check_acl: no | ||
72 | getattr: no | 81 | getattr: no |
73 | setxattr: yes | 82 | setxattr: yes |
74 | getxattr: no | 83 | getxattr: no |
75 | listxattr: no | 84 | listxattr: no |
76 | removexattr: yes | 85 | removexattr: yes |
86 | truncate_range: yes | ||
87 | fallocate: no | ||
88 | fiemap: no | ||
77 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 89 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
78 | victim. | 90 | victim. |
79 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. | 91 | cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. |
80 | ->truncate() is never called directly - it's a callback, not a | 92 | ->truncate() is never called directly - it's a callback, not a |
81 | method. It's called by vmtruncate() - library function normally used by | 93 | method. It's called by vmtruncate() - deprecated library function used by |
82 | ->setattr(). Locking information above applies to that call (i.e. is | 94 | ->setattr(). Locking information above applies to that call (i.e. is |
83 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been | 95 | inherited from ->setattr() - vmtruncate() is used when ATTR_SIZE had been |
84 | passed). | 96 | passed). |
@@ -91,7 +103,7 @@ prototypes: | |||
91 | struct inode *(*alloc_inode)(struct super_block *sb); | 103 | struct inode *(*alloc_inode)(struct super_block *sb); |
92 | void (*destroy_inode)(struct inode *); | 104 | void (*destroy_inode)(struct inode *); |
93 | void (*dirty_inode) (struct inode *); | 105 | void (*dirty_inode) (struct inode *); |
94 | int (*write_inode) (struct inode *, int); | 106 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
95 | int (*drop_inode) (struct inode *); | 107 | int (*drop_inode) (struct inode *); |
96 | void (*evict_inode) (struct inode *); | 108 | void (*evict_inode) (struct inode *); |
97 | void (*put_super) (struct super_block *); | 109 | void (*put_super) (struct super_block *); |
@@ -105,10 +117,10 @@ prototypes: | |||
105 | int (*show_options)(struct seq_file *, struct vfsmount *); | 117 | int (*show_options)(struct seq_file *, struct vfsmount *); |
106 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 118 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
107 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 119 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
120 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | ||
108 | 121 | ||
109 | locking rules: | 122 | locking rules: |
110 | All may block [not true, see below] | 123 | All may block [not true, see below] |
111 | None have BKL | ||
112 | s_umount | 124 | s_umount |
113 | alloc_inode: | 125 | alloc_inode: |
114 | destroy_inode: | 126 | destroy_inode: |
@@ -127,6 +139,7 @@ umount_begin: no | |||
127 | show_options: no (namespace_sem) | 139 | show_options: no (namespace_sem) |
128 | quota_read: no (see below) | 140 | quota_read: no (see below) |
129 | quota_write: no (see below) | 141 | quota_write: no (see below) |
142 | bdev_try_to_free_page: no (see below) | ||
130 | 143 | ||
131 | ->statfs() has s_umount (shared) when called by ustat(2) (native or | 144 | ->statfs() has s_umount (shared) when called by ustat(2) (native or |
132 | compat), but that's an accident of bad API; s_umount is used to pin | 145 | compat), but that's an accident of bad API; s_umount is used to pin |
@@ -139,19 +152,25 @@ be the only ones operating on the quota file by the quota code (via | |||
139 | dqio_sem) (unless an admin really wants to screw up something and | 152 | dqio_sem) (unless an admin really wants to screw up something and |
140 | writes to quota files with quotas on). For other details about locking | 153 | writes to quota files with quotas on). For other details about locking |
141 | see also dquot_operations section. | 154 | see also dquot_operations section. |
155 | ->bdev_try_to_free_page is called from the ->releasepage handler of | ||
156 | the block device inode. See there for more details. | ||
142 | 157 | ||
143 | --------------------------- file_system_type --------------------------- | 158 | --------------------------- file_system_type --------------------------- |
144 | prototypes: | 159 | prototypes: |
145 | int (*get_sb) (struct file_system_type *, int, | 160 | int (*get_sb) (struct file_system_type *, int, |
146 | const char *, void *, struct vfsmount *); | 161 | const char *, void *, struct vfsmount *); |
162 | struct dentry *(*mount) (struct file_system_type *, int, | ||
163 | const char *, void *); | ||
147 | void (*kill_sb) (struct super_block *); | 164 | void (*kill_sb) (struct super_block *); |
148 | locking rules: | 165 | locking rules: |
149 | may block BKL | 166 | may block |
150 | get_sb yes no | 167 | get_sb yes |
151 | kill_sb yes no | 168 | mount yes |
169 | kill_sb yes | ||
152 | 170 | ||
153 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount | 171 | ->get_sb() returns error or 0 with locked superblock attached to the vfsmount |
154 | (exclusive on ->s_umount). | 172 | (exclusive on ->s_umount). |
173 | ->mount() returns ERR_PTR or the root dentry. | ||
155 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, | 174 | ->kill_sb() takes a write-locked superblock, does all shutdown work on it, |
156 | unlocks and drops the reference. | 175 | unlocks and drops the reference. |
157 | 176 | ||
@@ -176,27 +195,35 @@ prototypes: | |||
176 | void (*freepage)(struct page *); | 195 | void (*freepage)(struct page *); |
177 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 196 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
178 | loff_t offset, unsigned long nr_segs); | 197 | loff_t offset, unsigned long nr_segs); |
179 | int (*launder_page) (struct page *); | 198 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, |
199 | unsigned long *); | ||
200 | int (*migratepage)(struct address_space *, struct page *, struct page *); | ||
201 | int (*launder_page)(struct page *); | ||
202 | int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); | ||
203 | int (*error_remove_page)(struct address_space *, struct page *); | ||
180 | 204 | ||
181 | locking rules: | 205 | locking rules: |
182 | All except set_page_dirty and freepage may block | 206 | All except set_page_dirty and freepage may block |
183 | 207 | ||
184 | BKL PageLocked(page) i_mutex | 208 | PageLocked(page) i_mutex |
185 | writepage: no yes, unlocks (see below) | 209 | writepage: yes, unlocks (see below) |
186 | readpage: no yes, unlocks | 210 | readpage: yes, unlocks |
187 | sync_page: no maybe | 211 | sync_page: maybe |
188 | writepages: no | 212 | writepages: |
189 | set_page_dirty no no | 213 | set_page_dirty no |
190 | readpages: no | 214 | readpages: |
191 | write_begin: no locks the page yes | 215 | write_begin: locks the page yes |
192 | write_end: no yes, unlocks yes | 216 | write_end: yes, unlocks yes |
193 | perform_write: no n/a yes | 217 | bmap: |
194 | bmap: no | 218 | invalidatepage: yes |
195 | invalidatepage: no yes | 219 | releasepage: yes |
196 | releasepage: no yes | 220 | freepage: yes |
197 | freepage: no yes | 221 | direct_IO: |
198 | direct_IO: no | 222 | get_xip_mem: maybe |
199 | launder_page: no yes | 223 | migratepage: yes (both) |
224 | launder_page: yes | ||
225 | is_partially_uptodate: yes | ||
226 | error_remove_page: yes | ||
200 | 227 | ||
201 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() | 228 | ->write_begin(), ->write_end(), ->sync_page() and ->readpage() |
202 | may be called from the request handler (/dev/loop). | 229 | may be called from the request handler (/dev/loop). |
@@ -276,9 +303,8 @@ under spinlock (it cannot block) and is sometimes called with the page | |||
276 | not locked. | 303 | not locked. |
277 | 304 | ||
278 | ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some | 305 | ->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some |
279 | filesystems and by the swapper. The latter will eventually go away. All | 306 | filesystems and by the swapper. The latter will eventually go away. Please, |
280 | instances do not actually need the BKL. Please, keep it that way and don't | 307 | keep it that way and don't breed new callers. |
281 | breed new callers. | ||
282 | 308 | ||
283 | ->invalidatepage() is called when the filesystem must attempt to drop | 309 | ->invalidatepage() is called when the filesystem must attempt to drop |
284 | some or all of the buffers from the page when it is being truncated. It | 310 | some or all of the buffers from the page when it is being truncated. It |
@@ -299,47 +325,37 @@ cleaned, or an error value if not. Note that in order to prevent the page | |||
299 | getting mapped back in and redirtied, it needs to be kept locked | 325 | getting mapped back in and redirtied, it needs to be kept locked |
300 | across the entire operation. | 326 | across the entire operation. |
301 | 327 | ||
302 | Note: currently almost all instances of address_space methods are | ||
303 | using BKL for internal serialization and that's one of the worst sources | ||
304 | of contention. Normally they are calling library functions (in fs/buffer.c) | ||
305 | and pass foo_get_block() as a callback (on local block-based filesystems, | ||
306 | indeed). BKL is not needed for library stuff and is usually taken by | ||
307 | foo_get_block(). It's an overkill, since block bitmaps can be protected by | ||
308 | internal fs locking and real critical areas are much smaller than the areas | ||
309 | filesystems protect now. | ||
310 | |||
311 | ----------------------- file_lock_operations ------------------------------ | 328 | ----------------------- file_lock_operations ------------------------------ |
312 | prototypes: | 329 | prototypes: |
313 | void (*fl_insert)(struct file_lock *); /* lock insertion callback */ | ||
314 | void (*fl_remove)(struct file_lock *); /* lock removal callback */ | ||
315 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); | 330 | void (*fl_copy_lock)(struct file_lock *, struct file_lock *); |
316 | void (*fl_release_private)(struct file_lock *); | 331 | void (*fl_release_private)(struct file_lock *); |
317 | 332 | ||
318 | 333 | ||
319 | locking rules: | 334 | locking rules: |
320 | BKL may block | 335 | file_lock_lock may block |
321 | fl_insert: yes no | 336 | fl_copy_lock: yes no |
322 | fl_remove: yes no | 337 | fl_release_private: maybe no |
323 | fl_copy_lock: yes no | ||
324 | fl_release_private: yes yes | ||
325 | 338 | ||
326 | ----------------------- lock_manager_operations --------------------------- | 339 | ----------------------- lock_manager_operations --------------------------- |
327 | prototypes: | 340 | prototypes: |
328 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); | 341 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); |
329 | void (*fl_notify)(struct file_lock *); /* unblock callback */ | 342 | void (*fl_notify)(struct file_lock *); /* unblock callback */ |
343 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | ||
330 | void (*fl_release_private)(struct file_lock *); | 344 | void (*fl_release_private)(struct file_lock *); |
331 | void (*fl_break)(struct file_lock *); /* break_lease callback */ | 345 | void (*fl_break)(struct file_lock *); /* break_lease callback */ |
346 | int (*fl_mylease)(struct file_lock *, struct file_lock *); | ||
347 | int (*fl_change)(struct file_lock **, int); | ||
332 | 348 | ||
333 | locking rules: | 349 | locking rules: |
334 | BKL may block | 350 | file_lock_lock may block |
335 | fl_compare_owner: yes no | 351 | fl_compare_owner: yes no |
336 | fl_notify: yes no | 352 | fl_notify: yes no |
337 | fl_release_private: yes yes | 353 | fl_grant: no no |
338 | fl_break: yes no | 354 | fl_release_private: maybe no |
339 | 355 | fl_break: yes no | |
340 | Currently only NFSD and NLM provide instances of this class. None of the | 356 | fl_mylease: yes no |
341 | them block. If you have out-of-tree instances - please, show up. Locking | 357 | fl_change yes no |
342 | in that area will change. | 358 | |
343 | --------------------------- buffer_head ----------------------------------- | 359 | --------------------------- buffer_head ----------------------------------- |
344 | prototypes: | 360 | prototypes: |
345 | void (*b_end_io)(struct buffer_head *bh, int uptodate); | 361 | void (*b_end_io)(struct buffer_head *bh, int uptodate); |
@@ -364,17 +380,17 @@ prototypes: | |||
364 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); | 380 | void (*swap_slot_free_notify) (struct block_device *, unsigned long); |
365 | 381 | ||
366 | locking rules: | 382 | locking rules: |
367 | BKL bd_mutex | 383 | bd_mutex |
368 | open: no yes | 384 | open: yes |
369 | release: no yes | 385 | release: yes |
370 | ioctl: no no | 386 | ioctl: no |
371 | compat_ioctl: no no | 387 | compat_ioctl: no |
372 | direct_access: no no | 388 | direct_access: no |
373 | media_changed: no no | 389 | media_changed: no |
374 | unlock_native_capacity: no no | 390 | unlock_native_capacity: no |
375 | revalidate_disk: no no | 391 | revalidate_disk: no |
376 | getgeo: no no | 392 | getgeo: no |
377 | swap_slot_free_notify: no no (see below) | 393 | swap_slot_free_notify: no (see below) |
378 | 394 | ||
379 | media_changed, unlock_native_capacity and revalidate_disk are called only from | 395 | media_changed, unlock_native_capacity and revalidate_disk are called only from |
380 | check_disk_change(). | 396 | check_disk_change(). |
@@ -413,34 +429,21 @@ prototypes: | |||
413 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, | 429 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, |
414 | unsigned long, unsigned long, unsigned long); | 430 | unsigned long, unsigned long, unsigned long); |
415 | int (*check_flags)(int); | 431 | int (*check_flags)(int); |
432 | int (*flock) (struct file *, int, struct file_lock *); | ||
433 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, | ||
434 | size_t, unsigned int); | ||
435 | ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, | ||
436 | size_t, unsigned int); | ||
437 | int (*setlease)(struct file *, long, struct file_lock **); | ||
416 | }; | 438 | }; |
417 | 439 | ||
418 | locking rules: | 440 | locking rules: |
419 | All may block. | 441 | All may block except for ->setlease. |
420 | BKL | 442 | No VFS locks held on entry except for ->fsync and ->setlease. |
421 | llseek: no (see below) | 443 | |
422 | read: no | 444 | ->fsync() has i_mutex on inode. |
423 | aio_read: no | 445 | |
424 | write: no | 446 | ->setlease has the file_list_lock held and must not sleep. |
425 | aio_write: no | ||
426 | readdir: no | ||
427 | poll: no | ||
428 | unlocked_ioctl: no | ||
429 | compat_ioctl: no | ||
430 | mmap: no | ||
431 | open: no | ||
432 | flush: no | ||
433 | release: no | ||
434 | fsync: no (see below) | ||
435 | aio_fsync: no | ||
436 | fasync: no | ||
437 | lock: yes | ||
438 | readv: no | ||
439 | writev: no | ||
440 | sendfile: no | ||
441 | sendpage: no | ||
442 | get_unmapped_area: no | ||
443 | check_flags: no | ||
444 | 447 | ||
445 | ->llseek() locking has moved from llseek to the individual llseek | 448 | ->llseek() locking has moved from llseek to the individual llseek |
446 | implementations. If your fs is not using generic_file_llseek, you | 449 | implementations. If your fs is not using generic_file_llseek, you |
@@ -450,17 +453,10 @@ mutex or just to use i_size_read() instead. | |||
450 | Note: this does not protect the file->f_pos against concurrent modifications | 453 | Note: this does not protect the file->f_pos against concurrent modifications |
451 | since this is something the userspace has to take care about. | 454 | since this is something the userspace has to take care about. |
452 | 455 | ||
453 | Note: ext2_release() was *the* source of contention on fs-intensive | 456 | ->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags. |
454 | loads and dropping BKL on ->release() helps to get rid of that (we still | 457 | Most instances call fasync_helper(), which does that maintenance, so it's |
455 | grab BKL for cases when we close a file that had been opened r/w, but that | 458 | not normally something one needs to worry about. Return values > 0 will be |
456 | can and should be done using the internal locking with smaller critical areas). | 459 | mapped to zero in the VFS layer. |
457 | Current worst offender is ext2_get_block()... | ||
458 | |||
459 | ->fasync() is called without BKL protection, and is responsible for | ||
460 | maintaining the FASYNC bit in filp->f_flags. Most instances call | ||
461 | fasync_helper(), which does that maintenance, so it's not normally | ||
462 | something one needs to worry about. Return values > 0 will be mapped to | ||
463 | zero in the VFS layer. | ||
464 | 460 | ||
465 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would | 461 | ->readdir() and ->ioctl() on directories must be changed. Ideally we would |
466 | move ->readdir() to inode_operations and use a separate method for directory | 462 | move ->readdir() to inode_operations and use a separate method for directory |
@@ -471,8 +467,6 @@ components. And there are other reasons why the current interface is a mess... | |||
471 | ->read on directories probably must go away - we should just enforce -EISDIR | 467 | ->read on directories probably must go away - we should just enforce -EISDIR |
472 | in sys_read() and friends. | 468 | in sys_read() and friends. |
473 | 469 | ||
474 | ->fsync() has i_mutex on inode. | ||
475 | |||
476 | --------------------------- dquot_operations ------------------------------- | 470 | --------------------------- dquot_operations ------------------------------- |
477 | prototypes: | 471 | prototypes: |
478 | int (*write_dquot) (struct dquot *); | 472 | int (*write_dquot) (struct dquot *); |
@@ -507,12 +501,12 @@ prototypes: | |||
507 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); | 501 | int (*access)(struct vm_area_struct *, unsigned long, void*, int, int); |
508 | 502 | ||
509 | locking rules: | 503 | locking rules: |
510 | BKL mmap_sem PageLocked(page) | 504 | mmap_sem PageLocked(page) |
511 | open: no yes | 505 | open: yes |
512 | close: no yes | 506 | close: yes |
513 | fault: no yes can return with page locked | 507 | fault: yes can return with page locked |
514 | page_mkwrite: no yes can return with page locked | 508 | page_mkwrite: yes can return with page locked |
515 | access: no yes | 509 | access: yes |
516 | 510 | ||
517 | ->fault() is called when a previously not present pte is about | 511 | ->fault() is called when a previously not present pte is about |
518 | to be faulted in. The filesystem must find and return the page associated | 512 | to be faulted in. The filesystem must find and return the page associated |
@@ -539,6 +533,3 @@ VM_IO | VM_PFNMAP VMAs. | |||
539 | 533 | ||
540 | (if you break something or notice that it is broken and do not fix it yourself | 534 | (if you break something or notice that it is broken and do not fix it yourself |
541 | - at least put it here) | 535 | - at least put it here) |
542 | |||
543 | ipc/shm.c::shm_delete() - may need BKL. | ||
544 | ->read() and ->write() in many drivers are (probably) missing BKL. | ||
diff --git a/Documentation/filesystems/dentry-locking.txt b/Documentation/filesystems/dentry-locking.txt deleted file mode 100644 index 79334ed5daa7..000000000000 --- a/Documentation/filesystems/dentry-locking.txt +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | RCU-based dcache locking model | ||
2 | ============================== | ||
3 | |||
4 | On many workloads, the most common operation on dcache is to look up a | ||
5 | dentry, given a parent dentry and the name of the child. Typically, | ||
6 | for every open(), stat() etc., the dentry corresponding to the | ||
7 | pathname will be looked up by walking the tree starting with the first | ||
8 | component of the pathname and using that dentry along with the next | ||
9 | component to look up the next level and so on. Since it is a frequent | ||
10 | operation for workloads like multiuser environments and web servers, | ||
11 | it is important to optimize this path. | ||
12 | |||
13 | Prior to 2.5.10, dcache_lock was acquired in d_lookup and thus in | ||
14 | every component during path look-up. Since 2.5.10 onwards, fast-walk | ||
15 | algorithm changed this by holding the dcache_lock at the beginning and | ||
16 | walking as many cached path component dentries as possible. This | ||
17 | significantly decreases the number of acquisition of | ||
18 | dcache_lock. However it also increases the lock hold time | ||
19 | significantly and affects performance in large SMP machines. Since | ||
20 | 2.5.62 kernel, dcache has been using a new locking model that uses RCU | ||
21 | to make dcache look-up lock-free. | ||
22 | |||
23 | The current dcache locking model is not very different from the | ||
24 | existing dcache locking model. Prior to 2.5.62 kernel, dcache_lock | ||
25 | protected the hash chain, d_child, d_alias, d_lru lists as well as | ||
26 | d_inode and several other things like mount look-up. RCU-based changes | ||
27 | affect only the way the hash chain is protected. For everything else | ||
28 | the dcache_lock must be taken for both traversing as well as | ||
29 | updating. The hash chain updates too take the dcache_lock. The | ||
30 | significant change is the way d_lookup traverses the hash chain, it | ||
31 | doesn't acquire the dcache_lock for this and rely on RCU to ensure | ||
32 | that the dentry has not been *freed*. | ||
33 | |||
34 | |||
35 | Dcache locking details | ||
36 | ====================== | ||
37 | |||
38 | For many multi-user workloads, open() and stat() on files are very | ||
39 | frequently occurring operations. Both involve walking of path names to | ||
40 | find the dentry corresponding to the concerned file. In 2.4 kernel, | ||
41 | dcache_lock was held during look-up of each path component. Contention | ||
42 | and cache-line bouncing of this global lock caused significant | ||
43 | scalability problems. With the introduction of RCU in Linux kernel, | ||
44 | this was worked around by making the look-up of path components during | ||
45 | path walking lock-free. | ||
46 | |||
47 | |||
48 | Safe lock-free look-up of dcache hash table | ||
49 | =========================================== | ||
50 | |||
51 | Dcache is a complex data structure with the hash table entries also | ||
52 | linked together in other lists. In 2.4 kernel, dcache_lock protected | ||
53 | all the lists. We applied RCU only on hash chain walking. The rest of | ||
54 | the lists are still protected by dcache_lock. Some of the important | ||
55 | changes are : | ||
56 | |||
57 | 1. The deletion from hash chain is done using hlist_del_rcu() macro | ||
58 | which doesn't initialize next pointer of the deleted dentry and | ||
59 | this allows us to walk safely lock-free while a deletion is | ||
60 | happening. | ||
61 | |||
62 | 2. Insertion of a dentry into the hash table is done using | ||
63 | hlist_add_head_rcu() which take care of ordering the writes - the | ||
64 | writes to the dentry must be visible before the dentry is | ||
65 | inserted. This works in conjunction with hlist_for_each_rcu(), | ||
66 | which has since been replaced by hlist_for_each_entry_rcu(), while | ||
67 | walking the hash chain. The only requirement is that all | ||
68 | initialization to the dentry must be done before | ||
69 | hlist_add_head_rcu() since we don't have dcache_lock protection | ||
70 | while traversing the hash chain. This isn't different from the | ||
71 | existing code. | ||
72 | |||
73 | 3. The dentry looked up without holding dcache_lock by cannot be | ||
74 | returned for walking if it is unhashed. It then may have a NULL | ||
75 | d_inode or other bogosity since RCU doesn't protect the other | ||
76 | fields in the dentry. We therefore use a flag DCACHE_UNHASHED to | ||
77 | indicate unhashed dentries and use this in conjunction with a | ||
78 | per-dentry lock (d_lock). Once looked up without the dcache_lock, | ||
79 | we acquire the per-dentry lock (d_lock) and check if the dentry is | ||
80 | unhashed. If so, the look-up is failed. If not, the reference count | ||
81 | of the dentry is increased and the dentry is returned. | ||
82 | |||
83 | 4. Once a dentry is looked up, it must be ensured during the path walk | ||
84 | for that component it doesn't go away. In pre-2.5.10 code, this was | ||
85 | done holding a reference to the dentry. dcache_rcu does the same. | ||
86 | In some sense, dcache_rcu path walking looks like the pre-2.5.10 | ||
87 | version. | ||
88 | |||
89 | 5. All dentry hash chain updates must take the dcache_lock as well as | ||
90 | the per-dentry lock in that order. dput() does this to ensure that | ||
91 | a dentry that has just been looked up in another CPU doesn't get | ||
92 | deleted before dget() can be done on it. | ||
93 | |||
94 | 6. There are several ways to do reference counting of RCU protected | ||
95 | objects. One such example is in ipv4 route cache where deferred | ||
96 | freeing (using call_rcu()) is done as soon as the reference count | ||
97 | goes to zero. This cannot be done in the case of dentries because | ||
98 | tearing down of dentries require blocking (dentry_iput()) which | ||
99 | isn't supported from RCU callbacks. Instead, tearing down of | ||
100 | dentries happen synchronously in dput(), but actual freeing happens | ||
101 | later when RCU grace period is over. This allows safe lock-free | ||
102 | walking of the hash chains, but a matched dentry may have been | ||
103 | partially torn down. The checking of DCACHE_UNHASHED flag with | ||
104 | d_lock held detects such dentries and prevents them from being | ||
105 | returned from look-up. | ||
106 | |||
107 | |||
108 | Maintaining POSIX rename semantics | ||
109 | ================================== | ||
110 | |||
111 | Since look-up of dentries is lock-free, it can race against a | ||
112 | concurrent rename operation. For example, during rename of file A to | ||
113 | B, look-up of either A or B must succeed. So, if look-up of B happens | ||
114 | after A has been removed from the hash chain but not added to the new | ||
115 | hash chain, it may fail. Also, a comparison while the name is being | ||
116 | written concurrently by a rename may result in false positive matches | ||
117 | violating rename semantics. Issues related to race with rename are | ||
118 | handled as described below : | ||
119 | |||
120 | 1. Look-up can be done in two ways - d_lookup() which is safe from | ||
121 | simultaneous renames and __d_lookup() which is not. If | ||
122 | __d_lookup() fails, it must be followed up by a d_lookup() to | ||
123 | correctly determine whether a dentry is in the hash table or | ||
124 | not. d_lookup() protects look-ups using a sequence lock | ||
125 | (rename_lock). | ||
126 | |||
127 | 2. The name associated with a dentry (d_name) may be changed if a | ||
128 | rename is allowed to happen simultaneously. To avoid memcmp() in | ||
129 | __d_lookup() go out of bounds due to a rename and false positive | ||
130 | comparison, the name comparison is done while holding the | ||
131 | per-dentry lock. This prevents concurrent renames during this | ||
132 | operation. | ||
133 | |||
134 | 3. Hash table walking during look-up may move to a different bucket as | ||
135 | the current dentry is moved to a different bucket due to rename. | ||
136 | But we use hlists in dcache hash table and they are | ||
137 | null-terminated. So, even if a dentry moves to a different bucket, | ||
138 | hash chain walk will terminate. [with a list_head list, it may not | ||
139 | since termination is when the list_head in the original bucket is | ||
140 | reached]. Since we redo the d_parent check and compare name while | ||
141 | holding d_lock, lock-free look-up will not race against d_move(). | ||
142 | |||
143 | 4. There can be a theoretical race when a dentry keeps coming back to | ||
144 | original bucket due to double moves. Due to this look-up may | ||
145 | consider that it has never moved and can end up in a infinite loop. | ||
146 | But this is not any worse that theoretical livelocks we already | ||
147 | have in the kernel. | ||
148 | |||
149 | |||
150 | Important guidelines for filesystem developers related to dcache_rcu | ||
151 | ==================================================================== | ||
152 | |||
153 | 1. Existing dcache interfaces (pre-2.5.62) exported to filesystem | ||
154 | don't change. Only dcache internal implementation changes. However | ||
155 | filesystems *must not* delete from the dentry hash chains directly | ||
156 | using the list macros like allowed earlier. They must use dcache | ||
157 | APIs like d_drop() or __d_drop() depending on the situation. | ||
158 | |||
159 | 2. d_flags is now protected by a per-dentry lock (d_lock). All access | ||
160 | to d_flags must be protected by it. | ||
161 | |||
162 | 3. For a hashed dentry, checking of d_count needs to be protected by | ||
163 | d_lock. | ||
164 | |||
165 | |||
166 | Papers and other documentation on dcache locking | ||
167 | ================================================ | ||
168 | |||
169 | 1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124). | ||
170 | |||
171 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html | ||
172 | |||
173 | |||
174 | |||
diff --git a/Documentation/filesystems/path-lookup.txt b/Documentation/filesystems/path-lookup.txt new file mode 100644 index 000000000000..eb59c8b44be9 --- /dev/null +++ b/Documentation/filesystems/path-lookup.txt | |||
@@ -0,0 +1,382 @@ | |||
1 | Path walking and name lookup locking | ||
2 | ==================================== | ||
3 | |||
4 | Path resolution is the finding a dentry corresponding to a path name string, by | ||
5 | performing a path walk. Typically, for every open(), stat() etc., the path name | ||
6 | will be resolved. Paths are resolved by walking the namespace tree, starting | ||
7 | with the first component of the pathname (eg. root or cwd) with a known dentry, | ||
8 | then finding the child of that dentry, which is named the next component in the | ||
9 | path string. Then repeating the lookup from the child dentry and finding its | ||
10 | child with the next element, and so on. | ||
11 | |||
12 | Since it is a frequent operation for workloads like multiuser environments and | ||
13 | web servers, it is important to optimize this code. | ||
14 | |||
15 | Path walking synchronisation history: | ||
16 | Prior to 2.5.10, dcache_lock was acquired in d_lookup (dcache hash lookup) and | ||
17 | thus in every component during path look-up. Since 2.5.10 onwards, fast-walk | ||
18 | algorithm changed this by holding the dcache_lock at the beginning and walking | ||
19 | as many cached path component dentries as possible. This significantly | ||
20 | decreases the number of acquisition of dcache_lock. However it also increases | ||
21 | the lock hold time significantly and affects performance in large SMP machines. | ||
22 | Since 2.5.62 kernel, dcache has been using a new locking model that uses RCU to | ||
23 | make dcache look-up lock-free. | ||
24 | |||
25 | All the above algorithms required taking a lock and reference count on the | ||
26 | dentry that was looked up, so that may be used as the basis for walking the | ||
27 | next path element. This is inefficient and unscalable. It is inefficient | ||
28 | because of the locks and atomic operations required for every dentry element | ||
29 | slows things down. It is not scalable because many parallel applications that | ||
30 | are path-walk intensive tend to do path lookups starting from a common dentry | ||
31 | (usually, the root "/" or current working directory). So contention on these | ||
32 | common path elements causes lock and cacheline queueing. | ||
33 | |||
34 | Since 2.6.38, RCU is used to make a significant part of the entire path walk | ||
35 | (including dcache look-up) completely "store-free" (so, no locks, atomics, or | ||
36 | even stores into cachelines of common dentries). This is known as "rcu-walk" | ||
37 | path walking. | ||
38 | |||
39 | Path walking overview | ||
40 | ===================== | ||
41 | |||
42 | A name string specifies a start (root directory, cwd, fd-relative) and a | ||
43 | sequence of elements (directory entry names), which together refer to a path in | ||
44 | the namespace. A path is represented as a (dentry, vfsmount) tuple. The name | ||
45 | elements are sub-strings, seperated by '/'. | ||
46 | |||
47 | Name lookups will want to find a particular path that a name string refers to | ||
48 | (usually the final element, or parent of final element). This is done by taking | ||
49 | the path given by the name's starting point (which we know in advance -- eg. | ||
50 | current->fs->cwd or current->fs->root) as the first parent of the lookup. Then | ||
51 | iteratively for each subsequent name element, look up the child of the current | ||
52 | parent with the given name and if it is not the desired entry, make it the | ||
53 | parent for the next lookup. | ||
54 | |||
55 | A parent, of course, must be a directory, and we must have appropriate | ||
56 | permissions on the parent inode to be able to walk into it. | ||
57 | |||
58 | Turning the child into a parent for the next lookup requires more checks and | ||
59 | procedures. Symlinks essentially substitute the symlink name for the target | ||
60 | name in the name string, and require some recursive path walking. Mount points | ||
61 | must be followed into (thus changing the vfsmount that subsequent path elements | ||
62 | refer to), switching from the mount point path to the root of the particular | ||
63 | mounted vfsmount. These behaviours are variously modified depending on the | ||
64 | exact path walking flags. | ||
65 | |||
66 | Path walking then must, broadly, do several particular things: | ||
67 | - find the start point of the walk; | ||
68 | - perform permissions and validity checks on inodes; | ||
69 | - perform dcache hash name lookups on (parent, name element) tuples; | ||
70 | - traverse mount points; | ||
71 | - traverse symlinks; | ||
72 | - lookup and create missing parts of the path on demand. | ||
73 | |||
74 | Safe store-free look-up of dcache hash table | ||
75 | ============================================ | ||
76 | |||
77 | Dcache name lookup | ||
78 | ------------------ | ||
79 | In order to lookup a dcache (parent, name) tuple, we take a hash on the tuple | ||
80 | and use that to select a bucket in the dcache-hash table. The list of entries | ||
81 | in that bucket is then walked, and we do a full comparison of each entry | ||
82 | against our (parent, name) tuple. | ||
83 | |||
84 | The hash lists are RCU protected, so list walking is not serialised with | ||
85 | concurrent updates (insertion, deletion from the hash). This is a standard RCU | ||
86 | list application with the exception of renames, which will be covered below. | ||
87 | |||
88 | Parent and name members of a dentry, as well as its membership in the dcache | ||
89 | hash, and its inode are protected by the per-dentry d_lock spinlock. A | ||
90 | reference is taken on the dentry (while the fields are verified under d_lock), | ||
91 | and this stabilises its d_inode pointer and actual inode. This gives a stable | ||
92 | point to perform the next step of our path walk against. | ||
93 | |||
94 | These members are also protected by d_seq seqlock, although this offers | ||
95 | read-only protection and no durability of results, so care must be taken when | ||
96 | using d_seq for synchronisation (see seqcount based lookups, below). | ||
97 | |||
98 | Renames | ||
99 | ------- | ||
100 | Back to the rename case. In usual RCU protected lists, the only operations that | ||
101 | will happen to an object is insertion, and then eventually removal from the | ||
102 | list. The object will not be reused until an RCU grace period is complete. | ||
103 | This ensures the RCU list traversal primitives can run over the object without | ||
104 | problems (see RCU documentation for how this works). | ||
105 | |||
106 | However when a dentry is renamed, its hash value can change, requiring it to be | ||
107 | moved to a new hash list. Allocating and inserting a new alias would be | ||
108 | expensive and also problematic for directory dentries. Latency would be far to | ||
109 | high to wait for a grace period after removing the dentry and before inserting | ||
110 | it in the new hash bucket. So what is done is to insert the dentry into the | ||
111 | new list immediately. | ||
112 | |||
113 | However, when the dentry's list pointers are updated to point to objects in the | ||
114 | new list before waiting for a grace period, this can result in a concurrent RCU | ||
115 | lookup of the old list veering off into the new (incorrect) list and missing | ||
116 | the remaining dentries on the list. | ||
117 | |||
118 | There is no fundamental problem with walking down the wrong list, because the | ||
119 | dentry comparisons will never match. However it is fatal to miss a matching | ||
120 | dentry. So a seqlock is used to detect when a rename has occurred, and so the | ||
121 | lookup can be retried. | ||
122 | |||
123 | 1 2 3 | ||
124 | +---+ +---+ +---+ | ||
125 | hlist-->| N-+->| N-+->| N-+-> | ||
126 | head <--+-P |<-+-P |<-+-P | | ||
127 | +---+ +---+ +---+ | ||
128 | |||
129 | Rename of dentry 2 may require it deleted from the above list, and inserted | ||
130 | into a new list. Deleting 2 gives the following list. | ||
131 | |||
132 | 1 3 | ||
133 | +---+ +---+ (don't worry, the longer pointers do not | ||
134 | hlist-->| N-+-------->| N-+-> impose a measurable performance overhead | ||
135 | head <--+-P |<--------+-P | on modern CPUs) | ||
136 | +---+ +---+ | ||
137 | ^ 2 ^ | ||
138 | | +---+ | | ||
139 | | | N-+----+ | ||
140 | +----+-P | | ||
141 | +---+ | ||
142 | |||
143 | This is a standard RCU-list deletion, which leaves the deleted object's | ||
144 | pointers intact, so a concurrent list walker that is currently looking at | ||
145 | object 2 will correctly continue to object 3 when it is time to traverse the | ||
146 | next object. | ||
147 | |||
148 | However, when inserting object 2 onto a new list, we end up with this: | ||
149 | |||
150 | 1 3 | ||
151 | +---+ +---+ | ||
152 | hlist-->| N-+-------->| N-+-> | ||
153 | head <--+-P |<--------+-P | | ||
154 | +---+ +---+ | ||
155 | 2 | ||
156 | +---+ | ||
157 | | N-+----> | ||
158 | <----+-P | | ||
159 | +---+ | ||
160 | |||
161 | Because we didn't wait for a grace period, there may be a concurrent lookup | ||
162 | still at 2. Now when it follows 2's 'next' pointer, it will walk off into | ||
163 | another list without ever having checked object 3. | ||
164 | |||
165 | A related, but distinctly different, issue is that of rename atomicity versus | ||
166 | lookup operations. If a file is renamed from 'A' to 'B', a lookup must only | ||
167 | find either 'A' or 'B'. So if a lookup of 'A' returns NULL, a subsequent lookup | ||
168 | of 'B' must succeed (note the reverse is not true). | ||
169 | |||
170 | Between deleting the dentry from the old hash list, and inserting it on the new | ||
171 | hash list, a lookup may find neither 'A' nor 'B' matching the dentry. The same | ||
172 | rename seqlock is also used to cover this race in much the same way, by | ||
173 | retrying a negative lookup result if a rename was in progress. | ||
174 | |||
175 | Seqcount based lookups | ||
176 | ---------------------- | ||
177 | In refcount based dcache lookups, d_lock is used to serialise access to | ||
178 | the dentry, stabilising it while comparing its name and parent and then | ||
179 | taking a reference count (the reference count then gives a stable place to | ||
180 | start the next part of the path walk from). | ||
181 | |||
182 | As explained above, we would like to do path walking without taking locks or | ||
183 | reference counts on intermediate dentries along the path. To do this, a per | ||
184 | dentry seqlock (d_seq) is used to take a "coherent snapshot" of what the dentry | ||
185 | looks like (its name, parent, and inode). That snapshot is then used to start | ||
186 | the next part of the path walk. When loading the coherent snapshot under d_seq, | ||
187 | care must be taken to load the members up-front, and use those pointers rather | ||
188 | than reloading from the dentry later on (otherwise we'd have interesting things | ||
189 | like d_inode going NULL underneath us, if the name was unlinked). | ||
190 | |||
191 | Also important is to avoid performing any destructive operations (pretty much: | ||
192 | no non-atomic stores to shared data), and to recheck the seqcount when we are | ||
193 | "done" with the operation. Retry or abort if the seqcount does not match. | ||
194 | Avoiding destructive or changing operations means we can easily unwind from | ||
195 | failure. | ||
196 | |||
197 | What this means is that a caller, provided they are holding RCU lock to | ||
198 | protect the dentry object from disappearing, can perform a seqcount based | ||
199 | lookup which does not increment the refcount on the dentry or write to | ||
200 | it in any way. This returned dentry can be used for subsequent operations, | ||
201 | provided that d_seq is rechecked after that operation is complete. | ||
202 | |||
203 | Inodes are also rcu freed, so the seqcount lookup dentry's inode may also be | ||
204 | queried for permissions. | ||
205 | |||
206 | With this two parts of the puzzle, we can do path lookups without taking | ||
207 | locks or refcounts on dentry elements. | ||
208 | |||
209 | RCU-walk path walking design | ||
210 | ============================ | ||
211 | |||
212 | Path walking code now has two distinct modes, ref-walk and rcu-walk. ref-walk | ||
213 | is the traditional[*] way of performing dcache lookups using d_lock to | ||
214 | serialise concurrent modifications to the dentry and take a reference count on | ||
215 | it. ref-walk is simple and obvious, and may sleep, take locks, etc while path | ||
216 | walking is operating on each dentry. rcu-walk uses seqcount based dentry | ||
217 | lookups, and can perform lookup of intermediate elements without any stores to | ||
218 | shared data in the dentry or inode. rcu-walk can not be applied to all cases, | ||
219 | eg. if the filesystem must sleep or perform non trivial operations, rcu-walk | ||
220 | must be switched to ref-walk mode. | ||
221 | |||
222 | [*] RCU is still used for the dentry hash lookup in ref-walk, but not the full | ||
223 | path walk. | ||
224 | |||
225 | Where ref-walk uses a stable, refcounted ``parent'' to walk the remaining | ||
226 | path string, rcu-walk uses a d_seq protected snapshot. When looking up a | ||
227 | child of this parent snapshot, we open d_seq critical section on the child | ||
228 | before closing d_seq critical section on the parent. This gives an interlocking | ||
229 | ladder of snapshots to walk down. | ||
230 | |||
231 | |||
232 | proc 101 | ||
233 | /----------------\ | ||
234 | / comm: "vi" \ | ||
235 | / fs.root: dentry0 \ | ||
236 | \ fs.cwd: dentry2 / | ||
237 | \ / | ||
238 | \----------------/ | ||
239 | |||
240 | So when vi wants to open("/home/npiggin/test.c", O_RDWR), then it will | ||
241 | start from current->fs->root, which is a pinned dentry. Alternatively, | ||
242 | "./test.c" would start from cwd; both names refer to the same path in | ||
243 | the context of proc101. | ||
244 | |||
245 | dentry 0 | ||
246 | +---------------------+ rcu-walk begins here, we note d_seq, check the | ||
247 | | name: "/" | inode's permission, and then look up the next | ||
248 | | inode: 10 | path element which is "home"... | ||
249 | | children:"home", ...| | ||
250 | +---------------------+ | ||
251 | | | ||
252 | dentry 1 V | ||
253 | +---------------------+ ... which brings us here. We find dentry1 via | ||
254 | | name: "home" | hash lookup, then note d_seq and compare name | ||
255 | | inode: 678 | string and parent pointer. When we have a match, | ||
256 | | children:"npiggin" | we now recheck the d_seq of dentry0. Then we | ||
257 | +---------------------+ check inode and look up the next element. | ||
258 | | | ||
259 | dentry2 V | ||
260 | +---------------------+ Note: if dentry0 is now modified, lookup is | ||
261 | | name: "npiggin" | not necessarily invalid, so we need only keep a | ||
262 | | inode: 543 | parent for d_seq verification, and grandparents | ||
263 | | children:"a.c", ... | can be forgotten. | ||
264 | +---------------------+ | ||
265 | | | ||
266 | dentry3 V | ||
267 | +---------------------+ At this point we have our destination dentry. | ||
268 | | name: "a.c" | We now take its d_lock, verify d_seq of this | ||
269 | | inode: 14221 | dentry. If that checks out, we can increment | ||
270 | | children:NULL | its refcount because we're holding d_lock. | ||
271 | +---------------------+ | ||
272 | |||
273 | Taking a refcount on a dentry from rcu-walk mode, by taking its d_lock, | ||
274 | re-checking its d_seq, and then incrementing its refcount is called | ||
275 | "dropping rcu" or dropping from rcu-walk into ref-walk mode. | ||
276 | |||
277 | It is, in some sense, a bit of a house of cards. If the seqcount check of the | ||
278 | parent snapshot fails, the house comes down, because we had closed the d_seq | ||
279 | section on the grandparent, so we have nothing left to stand on. In that case, | ||
280 | the path walk must be fully restarted (which we do in ref-walk mode, to avoid | ||
281 | live locks). It is costly to have a full restart, but fortunately they are | ||
282 | quite rare. | ||
283 | |||
284 | When we reach a point where sleeping is required, or a filesystem callout | ||
285 | requires ref-walk, then instead of restarting the walk, we attempt to drop rcu | ||
286 | at the last known good dentry we have. Avoiding a full restart in ref-walk in | ||
287 | these cases is fundamental for performance and scalability because blocking | ||
288 | operations such as creates and unlinks are not uncommon. | ||
289 | |||
290 | The detailed design for rcu-walk is like this: | ||
291 | * LOOKUP_RCU is set in nd->flags, which distinguishes rcu-walk from ref-walk. | ||
292 | * Take the RCU lock for the entire path walk, starting with the acquiring | ||
293 | of the starting path (eg. root/cwd/fd-path). So now dentry refcounts are | ||
294 | not required for dentry persistence. | ||
295 | * synchronize_rcu is called when unregistering a filesystem, so we can | ||
296 | access d_ops and i_ops during rcu-walk. | ||
297 | * Similarly take the vfsmount lock for the entire path walk. So now mnt | ||
298 | refcounts are not required for persistence. Also we are free to perform mount | ||
299 | lookups, and to assume dentry mount points and mount roots are stable up and | ||
300 | down the path. | ||
301 | * Have a per-dentry seqlock to protect the dentry name, parent, and inode, | ||
302 | so we can load this tuple atomically, and also check whether any of its | ||
303 | members have changed. | ||
304 | * Dentry lookups (based on parent, candidate string tuple) recheck the parent | ||
305 | sequence after the child is found in case anything changed in the parent | ||
306 | during the path walk. | ||
307 | * inode is also RCU protected so we can load d_inode and use the inode for | ||
308 | limited things. | ||
309 | * i_mode, i_uid, i_gid can be tested for exec permissions during path walk. | ||
310 | * i_op can be loaded. | ||
311 | * When the destination dentry is reached, drop rcu there (ie. take d_lock, | ||
312 | verify d_seq, increment refcount). | ||
313 | * If seqlock verification fails anywhere along the path, do a full restart | ||
314 | of the path lookup in ref-walk mode. -ECHILD tends to be used (for want of | ||
315 | a better errno) to signal an rcu-walk failure. | ||
316 | |||
317 | The cases where rcu-walk cannot continue are: | ||
318 | * NULL dentry (ie. any uncached path element) | ||
319 | * Following links | ||
320 | |||
321 | It may be possible eventually to make following links rcu-walk aware. | ||
322 | |||
323 | Uncached path elements will always require dropping to ref-walk mode, at the | ||
324 | very least because i_mutex needs to be grabbed, and objects allocated. | ||
325 | |||
326 | Final note: | ||
327 | "store-free" path walking is not strictly store free. We take vfsmount lock | ||
328 | and refcounts (both of which can be made per-cpu), and we also store to the | ||
329 | stack (which is essentially CPU-local), and we also have to take locks and | ||
330 | refcount on final dentry. | ||
331 | |||
332 | The point is that shared data, where practically possible, is not locked | ||
333 | or stored into. The result is massive improvements in performance and | ||
334 | scalability of path resolution. | ||
335 | |||
336 | |||
337 | Interesting statistics | ||
338 | ====================== | ||
339 | |||
340 | The following table gives rcu lookup statistics for a few simple workloads | ||
341 | (2s12c24t Westmere, debian non-graphical system). Ungraceful are attempts to | ||
342 | drop rcu that fail due to d_seq failure and requiring the entire path lookup | ||
343 | again. Other cases are successful rcu-drops that are required before the final | ||
344 | element, nodentry for missing dentry, revalidate for filesystem revalidate | ||
345 | routine requiring rcu drop, permission for permission check requiring drop, | ||
346 | and link for symlink traversal requiring drop. | ||
347 | |||
348 | rcu-lookups restart nodentry link revalidate permission | ||
349 | bootup 47121 0 4624 1010 10283 7852 | ||
350 | dbench 25386793 0 6778659(26.7%) 55 549 1156 | ||
351 | kbuild 2696672 10 64442(2.3%) 108764(4.0%) 1 1590 | ||
352 | git diff 39605 0 28 2 0 106 | ||
353 | vfstest 24185492 4945 708725(2.9%) 1076136(4.4%) 0 2651 | ||
354 | |||
355 | What this shows is that failed rcu-walk lookups, ie. ones that are restarted | ||
356 | entirely with ref-walk, are quite rare. Even the "vfstest" case which | ||
357 | specifically has concurrent renames/mkdir/rmdir/ creat/unlink/etc to excercise | ||
358 | such races is not showing a huge amount of restarts. | ||
359 | |||
360 | Dropping from rcu-walk to ref-walk mean that we have encountered a dentry where | ||
361 | the reference count needs to be taken for some reason. This is either because | ||
362 | we have reached the target of the path walk, or because we have encountered a | ||
363 | condition that can't be resolved in rcu-walk mode. Ideally, we drop rcu-walk | ||
364 | only when we have reached the target dentry, so the other statistics show where | ||
365 | this does not happen. | ||
366 | |||
367 | Note that a graceful drop from rcu-walk mode due to something such as the | ||
368 | dentry not existing (which can be common) is not necessarily a failure of | ||
369 | rcu-walk scheme, because some elements of the path may have been walked in | ||
370 | rcu-walk mode. The further we get from common path elements (such as cwd or | ||
371 | root), the less contended the dentry is likely to be. The closer we are to | ||
372 | common path elements, the more likely they will exist in dentry cache. | ||
373 | |||
374 | |||
375 | Papers and other documentation on dcache locking | ||
376 | ================================================ | ||
377 | |||
378 | 1. Scaling dcache with RCU (http://linuxjournal.com/article.php?sid=7124). | ||
379 | |||
380 | 2. http://lse.sourceforge.net/locking/dcache/dcache.html | ||
381 | |||
382 | |||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index b12c89538680..07a32b42cf9c 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -216,7 +216,6 @@ had ->revalidate()) add calls in ->follow_link()/->readlink(). | |||
216 | ->d_parent changes are not protected by BKL anymore. Read access is safe | 216 | ->d_parent changes are not protected by BKL anymore. Read access is safe |
217 | if at least one of the following is true: | 217 | if at least one of the following is true: |
218 | * filesystem has no cross-directory rename() | 218 | * filesystem has no cross-directory rename() |
219 | * dcache_lock is held | ||
220 | * we know that parent had been locked (e.g. we are looking at | 219 | * we know that parent had been locked (e.g. we are looking at |
221 | ->d_parent of ->lookup() argument). | 220 | ->d_parent of ->lookup() argument). |
222 | * we are called from ->rename(). | 221 | * we are called from ->rename(). |
@@ -318,3 +317,71 @@ if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput( | |||
318 | may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly | 317 | may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly |
319 | free the on-disk inode, you may end up doing that while ->write_inode() is writing | 318 | free the on-disk inode, you may end up doing that while ->write_inode() is writing |
320 | to it. | 319 | to it. |
320 | |||
321 | --- | ||
322 | [mandatory] | ||
323 | |||
324 | .d_delete() now only advises the dcache as to whether or not to cache | ||
325 | unreferenced dentries, and is now only called when the dentry refcount goes to | ||
326 | 0. Even on 0 refcount transition, it must be able to tolerate being called 0, | ||
327 | 1, or more times (eg. constant, idempotent). | ||
328 | |||
329 | --- | ||
330 | [mandatory] | ||
331 | |||
332 | .d_compare() calling convention and locking rules are significantly | ||
333 | changed. Read updated documentation in Documentation/filesystems/vfs.txt (and | ||
334 | look at examples of other filesystems) for guidance. | ||
335 | |||
336 | --- | ||
337 | [mandatory] | ||
338 | |||
339 | .d_hash() calling convention and locking rules are significantly | ||
340 | changed. Read updated documentation in Documentation/filesystems/vfs.txt (and | ||
341 | look at examples of other filesystems) for guidance. | ||
342 | |||
343 | --- | ||
344 | [mandatory] | ||
345 | dcache_lock is gone, replaced by fine grained locks. See fs/dcache.c | ||
346 | for details of what locks to replace dcache_lock with in order to protect | ||
347 | particular things. Most of the time, a filesystem only needs ->d_lock, which | ||
348 | protects *all* the dcache state of a given dentry. | ||
349 | |||
350 | -- | ||
351 | [mandatory] | ||
352 | |||
353 | Filesystems must RCU-free their inodes, if they can have been accessed | ||
354 | via rcu-walk path walk (basically, if the file can have had a path name in the | ||
355 | vfs namespace). | ||
356 | |||
357 | i_dentry and i_rcu share storage in a union, and the vfs expects | ||
358 | i_dentry to be reinitialized before it is freed, so an: | ||
359 | |||
360 | INIT_LIST_HEAD(&inode->i_dentry); | ||
361 | |||
362 | must be done in the RCU callback. | ||
363 | |||
364 | -- | ||
365 | [recommended] | ||
366 | vfs now tries to do path walking in "rcu-walk mode", which avoids | ||
367 | atomic operations and scalability hazards on dentries and inodes (see | ||
368 | Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) | ||
369 | are examples of the changes required to support this. For more complex | ||
370 | filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so | ||
371 | no changes are required to the filesystem. However, this is costly and loses | ||
372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that | ||
373 | are rcu-walk aware, shown below. Filesystems should take advantage of this | ||
374 | where possible. | ||
375 | |||
376 | -- | ||
377 | [mandatory] | ||
378 | d_revalidate is a callback that is made on every path element (if | ||
379 | the filesystem provides it), which requires dropping out of rcu-walk mode. This | ||
380 | may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be | ||
381 | returned if the filesystem cannot handle rcu-walk. See | ||
382 | Documentation/filesystems/vfs.txt for more details. | ||
383 | |||
384 | permission and check_acl are inode permission checks that are called | ||
385 | on many or all directory inodes on the way down a path walk (to check for | ||
386 | exec permission). These must now be rcu-walk aware (flags & IPERM_RCU). See | ||
387 | Documentation/filesystems/vfs.txt for more details. | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index e73df2722ff3..9471225212c4 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1181,6 +1181,30 @@ Table 1-12: Files in /proc/fs/ext4/<devname> | |||
1181 | mb_groups details of multiblock allocator buddy cache of free blocks | 1181 | mb_groups details of multiblock allocator buddy cache of free blocks |
1182 | .............................................................................. | 1182 | .............................................................................. |
1183 | 1183 | ||
1184 | 2.0 /proc/consoles | ||
1185 | ------------------ | ||
1186 | Shows registered system console lines. | ||
1187 | |||
1188 | To see which character device lines are currently used for the system console | ||
1189 | /dev/console, you may simply look into the file /proc/consoles: | ||
1190 | |||
1191 | > cat /proc/consoles | ||
1192 | tty0 -WU (ECp) 4:7 | ||
1193 | ttyS0 -W- (Ep) 4:64 | ||
1194 | |||
1195 | The columns are: | ||
1196 | |||
1197 | device name of the device | ||
1198 | operations R = can do read operations | ||
1199 | W = can do write operations | ||
1200 | U = can do unblank | ||
1201 | flags E = it is enabled | ||
1202 | C = it is prefered console | ||
1203 | B = it is primary boot console | ||
1204 | p = it is used for printk buffer | ||
1205 | b = it is not a TTY but a Braille device | ||
1206 | a = it is safe to use when cpu is offline | ||
1207 | major:minor major and minor number of the device separated by a colon | ||
1184 | 1208 | ||
1185 | ------------------------------------------------------------------------------ | 1209 | ------------------------------------------------------------------------------ |
1186 | Summary | 1210 | Summary |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 20899e095e7e..fbb324e2bd43 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -325,7 +325,8 @@ struct inode_operations { | |||
325 | void * (*follow_link) (struct dentry *, struct nameidata *); | 325 | void * (*follow_link) (struct dentry *, struct nameidata *); |
326 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 326 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
327 | void (*truncate) (struct inode *); | 327 | void (*truncate) (struct inode *); |
328 | int (*permission) (struct inode *, int, struct nameidata *); | 328 | int (*permission) (struct inode *, int, unsigned int); |
329 | int (*check_acl)(struct inode *, int, unsigned int); | ||
329 | int (*setattr) (struct dentry *, struct iattr *); | 330 | int (*setattr) (struct dentry *, struct iattr *); |
330 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 331 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
331 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 332 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -414,6 +415,13 @@ otherwise noted. | |||
414 | permission: called by the VFS to check for access rights on a POSIX-like | 415 | permission: called by the VFS to check for access rights on a POSIX-like |
415 | filesystem. | 416 | filesystem. |
416 | 417 | ||
418 | May be called in rcu-walk mode (flags & IPERM_RCU). If in rcu-walk | ||
419 | mode, the filesystem must check the permission without blocking or | ||
420 | storing to the inode. | ||
421 | |||
422 | If a situation is encountered that rcu-walk cannot handle, return | ||
423 | -ECHILD and it will be called again in ref-walk mode. | ||
424 | |||
417 | setattr: called by the VFS to set attributes for a file. This method | 425 | setattr: called by the VFS to set attributes for a file. This method |
418 | is called by chmod(2) and related system calls. | 426 | is called by chmod(2) and related system calls. |
419 | 427 | ||
@@ -847,9 +855,12 @@ defined: | |||
847 | 855 | ||
848 | struct dentry_operations { | 856 | struct dentry_operations { |
849 | int (*d_revalidate)(struct dentry *, struct nameidata *); | 857 | int (*d_revalidate)(struct dentry *, struct nameidata *); |
850 | int (*d_hash) (struct dentry *, struct qstr *); | 858 | int (*d_hash)(const struct dentry *, const struct inode *, |
851 | int (*d_compare) (struct dentry *, struct qstr *, struct qstr *); | 859 | struct qstr *); |
852 | int (*d_delete)(struct dentry *); | 860 | int (*d_compare)(const struct dentry *, const struct inode *, |
861 | const struct dentry *, const struct inode *, | ||
862 | unsigned int, const char *, const struct qstr *); | ||
863 | int (*d_delete)(const struct dentry *); | ||
853 | void (*d_release)(struct dentry *); | 864 | void (*d_release)(struct dentry *); |
854 | void (*d_iput)(struct dentry *, struct inode *); | 865 | void (*d_iput)(struct dentry *, struct inode *); |
855 | char *(*d_dname)(struct dentry *, char *, int); | 866 | char *(*d_dname)(struct dentry *, char *, int); |
@@ -860,13 +871,45 @@ struct dentry_operations { | |||
860 | dcache. Most filesystems leave this as NULL, because all their | 871 | dcache. Most filesystems leave this as NULL, because all their |
861 | dentries in the dcache are valid | 872 | dentries in the dcache are valid |
862 | 873 | ||
863 | d_hash: called when the VFS adds a dentry to the hash table | 874 | d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU). |
875 | If in rcu-walk mode, the filesystem must revalidate the dentry without | ||
876 | blocking or storing to the dentry, d_parent and d_inode should not be | ||
877 | used without care (because they can go NULL), instead nd->inode should | ||
878 | be used. | ||
879 | |||
880 | If a situation is encountered that rcu-walk cannot handle, return | ||
881 | -ECHILD and it will be called again in ref-walk mode. | ||
882 | |||
883 | d_hash: called when the VFS adds a dentry to the hash table. The first | ||
884 | dentry passed to d_hash is the parent directory that the name is | ||
885 | to be hashed into. The inode is the dentry's inode. | ||
886 | |||
887 | Same locking and synchronisation rules as d_compare regarding | ||
888 | what is safe to dereference etc. | ||
889 | |||
890 | d_compare: called to compare a dentry name with a given name. The first | ||
891 | dentry is the parent of the dentry to be compared, the second is | ||
892 | the parent's inode, then the dentry and inode (may be NULL) of the | ||
893 | child dentry. len and name string are properties of the dentry to be | ||
894 | compared. qstr is the name to compare it with. | ||
895 | |||
896 | Must be constant and idempotent, and should not take locks if | ||
897 | possible, and should not or store into the dentry or inodes. | ||
898 | Should not dereference pointers outside the dentry or inodes without | ||
899 | lots of care (eg. d_parent, d_inode, d_name should not be used). | ||
900 | |||
901 | However, our vfsmount is pinned, and RCU held, so the dentries and | ||
902 | inodes won't disappear, neither will our sb or filesystem module. | ||
903 | ->i_sb and ->d_sb may be used. | ||
864 | 904 | ||
865 | d_compare: called when a dentry should be compared with another | 905 | It is a tricky calling convention because it needs to be called under |
906 | "rcu-walk", ie. without any locks or references on things. | ||
866 | 907 | ||
867 | d_delete: called when the last reference to a dentry is | 908 | d_delete: called when the last reference to a dentry is dropped and the |
868 | deleted. This means no-one is using the dentry, however it is | 909 | dcache is deciding whether or not to cache it. Return 1 to delete |
869 | still valid and in the dcache | 910 | immediately, or 0 to cache the dentry. Default is NULL which means to |
911 | always cache a reachable dentry. d_delete must be constant and | ||
912 | idempotent. | ||
870 | 913 | ||
871 | d_release: called when a dentry is really deallocated | 914 | d_release: called when a dentry is really deallocated |
872 | 915 | ||
@@ -910,14 +953,11 @@ manipulate dentries: | |||
910 | the usage count) | 953 | the usage count) |
911 | 954 | ||
912 | dput: close a handle for a dentry (decrements the usage count). If | 955 | dput: close a handle for a dentry (decrements the usage count). If |
913 | the usage count drops to 0, the "d_delete" method is called | 956 | the usage count drops to 0, and the dentry is still in its |
914 | and the dentry is placed on the unused list if the dentry is | 957 | parent's hash, the "d_delete" method is called to check whether |
915 | still in its parents hash list. Putting the dentry on the | 958 | it should be cached. If it should not be cached, or if the dentry |
916 | unused list just means that if the system needs some RAM, it | 959 | is not hashed, it is deleted. Otherwise cached dentries are put |
917 | goes through the unused list of dentries and deallocates them. | 960 | into an LRU list to be reclaimed on memory shortage. |
918 | If the dentry has already been unhashed and the usage count | ||
919 | drops to 0, in this case the dentry is deallocated after the | ||
920 | "d_delete" method is called | ||
921 | 961 | ||
922 | d_drop: this unhashes a dentry from its parents hash list. A | 962 | d_drop: this unhashes a dentry from its parents hash list. A |
923 | subsequent call to dput() will deallocate the dentry if its | 963 | subsequent call to dput() will deallocate the dentry if its |
diff --git a/Documentation/input/cma3000_d0x.txt b/Documentation/input/cma3000_d0x.txt new file mode 100644 index 000000000000..29d088db4afd --- /dev/null +++ b/Documentation/input/cma3000_d0x.txt | |||
@@ -0,0 +1,115 @@ | |||
1 | Kernel driver for CMA3000-D0x | ||
2 | ============================ | ||
3 | |||
4 | Supported chips: | ||
5 | * VTI CMA3000-D0x | ||
6 | Datasheet: | ||
7 | CMA3000-D0X Product Family Specification 8281000A.02.pdf | ||
8 | <http://www.vti.fi/en/> | ||
9 | |||
10 | Author: Hemanth V <hemanthv@ti.com> | ||
11 | |||
12 | |||
13 | Description | ||
14 | ----------- | ||
15 | CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and | ||
16 | Free fall modes. | ||
17 | |||
18 | Motion Detect Mode: Its the low power mode where interrupts are generated only | ||
19 | when motion exceeds the defined thresholds. | ||
20 | |||
21 | Measurement Mode: This mode is used to read the acceleration data on X,Y,Z | ||
22 | axis and supports 400, 100, 40 Hz sample frequency. | ||
23 | |||
24 | Free fall Mode: This mode is intended to save system resources. | ||
25 | |||
26 | Threshold values: Chip supports defining threshold values for above modes | ||
27 | which includes time and g value. Refer product specifications for more details. | ||
28 | |||
29 | CMA3000 chip supports mutually exclusive I2C and SPI interfaces for | ||
30 | communication, currently the driver supports I2C based communication only. | ||
31 | Initial configuration for bus mode is set in non volatile memory and can later | ||
32 | be modified through bus interface command. | ||
33 | |||
34 | Driver reports acceleration data through input subsystem. It generates ABS_MISC | ||
35 | event with value 1 when free fall is detected. | ||
36 | |||
37 | Platform data need to be configured for initial default values. | ||
38 | |||
39 | Platform Data | ||
40 | ------------- | ||
41 | fuzz_x: Noise on X Axis | ||
42 | |||
43 | fuzz_y: Noise on Y Axis | ||
44 | |||
45 | fuzz_z: Noise on Z Axis | ||
46 | |||
47 | g_range: G range in milli g i.e 2000 or 8000 | ||
48 | |||
49 | mode: Default Operating mode | ||
50 | |||
51 | mdthr: Motion detect g range threshold value | ||
52 | |||
53 | mdfftmr: Motion detect and free fall time threshold value | ||
54 | |||
55 | ffthr: Free fall g range threshold value | ||
56 | |||
57 | Input Interface | ||
58 | -------------- | ||
59 | Input driver version is 1.0.0 | ||
60 | Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0 | ||
61 | Input device name: "cma3000-accelerometer" | ||
62 | Supported events: | ||
63 | Event type 0 (Sync) | ||
64 | Event type 3 (Absolute) | ||
65 | Event code 0 (X) | ||
66 | Value 47 | ||
67 | Min -8000 | ||
68 | Max 8000 | ||
69 | Fuzz 200 | ||
70 | Event code 1 (Y) | ||
71 | Value -28 | ||
72 | Min -8000 | ||
73 | Max 8000 | ||
74 | Fuzz 200 | ||
75 | Event code 2 (Z) | ||
76 | Value 905 | ||
77 | Min -8000 | ||
78 | Max 8000 | ||
79 | Fuzz 200 | ||
80 | Event code 40 (Misc) | ||
81 | Value 0 | ||
82 | Min 0 | ||
83 | Max 1 | ||
84 | Event type 4 (Misc) | ||
85 | |||
86 | |||
87 | Register/Platform parameters Description | ||
88 | ---------------------------------------- | ||
89 | |||
90 | mode: | ||
91 | 0: power down mode | ||
92 | 1: 100 Hz Measurement mode | ||
93 | 2: 400 Hz Measurement mode | ||
94 | 3: 40 Hz Measurement mode | ||
95 | 4: Motion Detect mode (default) | ||
96 | 5: 100 Hz Free fall mode | ||
97 | 6: 40 Hz Free fall mode | ||
98 | 7: Power off mode | ||
99 | |||
100 | grange: | ||
101 | 2000: 2000 mg or 2G Range | ||
102 | 8000: 8000 mg or 8G Range | ||
103 | |||
104 | mdthr: | ||
105 | X: X * 71mg (8G Range) | ||
106 | X: X * 18mg (2G Range) | ||
107 | |||
108 | mdfftmr: | ||
109 | X: (X & 0x70) * 100 ms (MDTMR) | ||
110 | (X & 0x0F) * 2.5 ms (FFTMR 400 Hz) | ||
111 | (X & 0x0F) * 10 ms (FFTMR 100 Hz) | ||
112 | |||
113 | ffthr: | ||
114 | X: (X >> 2) * 18mg (2G Range) | ||
115 | X: (X & 0x0F) * 71 mg (8G Range) | ||
diff --git a/Documentation/input/multi-touch-protocol.txt b/Documentation/input/multi-touch-protocol.txt index bdcba154b83e..71536e78406f 100644 --- a/Documentation/input/multi-touch-protocol.txt +++ b/Documentation/input/multi-touch-protocol.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Multi-touch (MT) Protocol | 1 | Multi-touch (MT) Protocol |
2 | ------------------------- | 2 | ------------------------- |
3 | Copyright (C) 2009 Henrik Rydberg <rydberg@euromail.se> | 3 | Copyright (C) 2009-2010 Henrik Rydberg <rydberg@euromail.se> |
4 | 4 | ||
5 | 5 | ||
6 | Introduction | 6 | Introduction |
@@ -161,19 +161,24 @@ against the glass. The inner region will increase, and in general, the | |||
161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than | 161 | ratio ABS_MT_TOUCH_MAJOR / ABS_MT_WIDTH_MAJOR, which is always smaller than |
162 | unity, is related to the contact pressure. For pressure-based devices, | 162 | unity, is related to the contact pressure. For pressure-based devices, |
163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area | 163 | ABS_MT_PRESSURE may be used to provide the pressure on the contact area |
164 | instead. | 164 | instead. Devices capable of contact hovering can use ABS_MT_DISTANCE to |
165 | indicate the distance between the contact and the surface. | ||
165 | 166 | ||
166 | In addition to the MAJOR parameters, the oval shape of the contact can be | 167 | In addition to the MAJOR parameters, the oval shape of the contact can be |
167 | described by adding the MINOR parameters, such that MAJOR and MINOR are the | 168 | described by adding the MINOR parameters, such that MAJOR and MINOR are the |
168 | major and minor axis of an ellipse. Finally, the orientation of the oval | 169 | major and minor axis of an ellipse. Finally, the orientation of the oval |
169 | shape can be describe with the ORIENTATION parameter. | 170 | shape can be describe with the ORIENTATION parameter. |
170 | 171 | ||
172 | For type A devices, further specification of the touch shape is possible | ||
173 | via ABS_MT_BLOB_ID. | ||
174 | |||
171 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a | 175 | The ABS_MT_TOOL_TYPE may be used to specify whether the touching tool is a |
172 | contact or a pen or something else. Devices with more granular information | 176 | finger or a pen or something else. Finally, the ABS_MT_TRACKING_ID event |
173 | may specify general shapes as blobs, i.e., as a sequence of rectangular | 177 | may be used to track identified contacts over time [5]. |
174 | shapes grouped together by an ABS_MT_BLOB_ID. Finally, for the few devices | 178 | |
175 | that currently support it, the ABS_MT_TRACKING_ID event may be used to | 179 | In the type B protocol, ABS_MT_TOOL_TYPE and ABS_MT_TRACKING_ID are |
176 | report contact tracking from hardware [5]. | 180 | implicitly handled by input core; drivers should instead call |
181 | input_mt_report_slot_state(). | ||
177 | 182 | ||
178 | 183 | ||
179 | Event Semantics | 184 | Event Semantics |
@@ -213,6 +218,12 @@ The pressure, in arbitrary units, on the contact area. May be used instead | |||
213 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial | 218 | of TOUCH and WIDTH for pressure-based devices or any device with a spatial |
214 | signal intensity distribution. | 219 | signal intensity distribution. |
215 | 220 | ||
221 | ABS_MT_DISTANCE | ||
222 | |||
223 | The distance, in surface units, between the contact and the surface. Zero | ||
224 | distance means the contact is touching the surface. A positive number means | ||
225 | the contact is hovering above the surface. | ||
226 | |||
216 | ABS_MT_ORIENTATION | 227 | ABS_MT_ORIENTATION |
217 | 228 | ||
218 | The orientation of the ellipse. The value should describe a signed quarter | 229 | The orientation of the ellipse. The value should describe a signed quarter |
@@ -240,21 +251,24 @@ ABS_MT_TOOL_TYPE | |||
240 | The type of approaching tool. A lot of kernel drivers cannot distinguish | 251 | The type of approaching tool. A lot of kernel drivers cannot distinguish |
241 | between different tool types, such as a finger or a pen. In such cases, the | 252 | between different tool types, such as a finger or a pen. In such cases, the |
242 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and | 253 | event should be omitted. The protocol currently supports MT_TOOL_FINGER and |
243 | MT_TOOL_PEN [2]. | 254 | MT_TOOL_PEN [2]. For type B devices, this event is handled by input core; |
255 | drivers should instead use input_mt_report_slot_state(). | ||
244 | 256 | ||
245 | ABS_MT_BLOB_ID | 257 | ABS_MT_BLOB_ID |
246 | 258 | ||
247 | The BLOB_ID groups several packets together into one arbitrarily shaped | 259 | The BLOB_ID groups several packets together into one arbitrarily shaped |
248 | contact. This is a low-level anonymous grouping for type A devices, and | 260 | contact. The sequence of points forms a polygon which defines the shape of |
261 | the contact. This is a low-level anonymous grouping for type A devices, and | ||
249 | should not be confused with the high-level trackingID [5]. Most type A | 262 | should not be confused with the high-level trackingID [5]. Most type A |
250 | devices do not have blob capability, so drivers can safely omit this event. | 263 | devices do not have blob capability, so drivers can safely omit this event. |
251 | 264 | ||
252 | ABS_MT_TRACKING_ID | 265 | ABS_MT_TRACKING_ID |
253 | 266 | ||
254 | The TRACKING_ID identifies an initiated contact throughout its life cycle | 267 | The TRACKING_ID identifies an initiated contact throughout its life cycle |
255 | [5]. This event is mandatory for type B devices. The value range of the | 268 | [5]. The value range of the TRACKING_ID should be large enough to ensure |
256 | TRACKING_ID should be large enough to ensure unique identification of a | 269 | unique identification of a contact maintained over an extended period of |
257 | contact maintained over an extended period of time. | 270 | time. For type B devices, this event is handled by input core; drivers |
271 | should instead use input_mt_report_slot_state(). | ||
258 | 272 | ||
259 | 273 | ||
260 | Event Computation | 274 | Event Computation |
@@ -301,18 +315,19 @@ and with ORIENTATION, one can detect twisting of fingers. | |||
301 | Notes | 315 | Notes |
302 | ----- | 316 | ----- |
303 | 317 | ||
304 | In order to stay compatible with existing applications, the data | 318 | In order to stay compatible with existing applications, the data reported |
305 | reported in a finger packet must not be recognized as single-touch | 319 | in a finger packet must not be recognized as single-touch events. |
306 | events. In addition, all finger data must bypass input filtering, | 320 | |
307 | since subsequent events of the same type refer to different fingers. | 321 | For type A devices, all finger data bypasses input filtering, since |
322 | subsequent events of the same type refer to different fingers. | ||
308 | 323 | ||
309 | The first kernel driver to utilize the MT protocol is the bcm5974 driver, | 324 | For example usage of the type A protocol, see the bcm5974 driver. For |
310 | where examples can be found. | 325 | example usage of the type B protocol, see the hid-egalax driver. |
311 | 326 | ||
312 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the | 327 | [1] With the extension ABS_MT_APPROACH_X and ABS_MT_APPROACH_Y, the |
313 | difference between the contact position and the approaching tool position | 328 | difference between the contact position and the approaching tool position |
314 | could be used to derive tilt. | 329 | could be used to derive tilt. |
315 | [2] The list can of course be extended. | 330 | [2] The list can of course be extended. |
316 | [3] Multitouch X driver project: http://bitmath.org/code/multitouch/. | 331 | [3] The mtdev project: http://bitmath.org/code/mtdev/. |
317 | [4] See the section on event computation. | 332 | [4] See the section on event computation. |
318 | [5] See the section on finger tracking. | 333 | [5] See the section on finger tracking. |
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index 63ffd78824d8..d6a63c7b4478 100644 --- a/Documentation/ioctl/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
@@ -155,7 +155,6 @@ Code Seq#(hex) Include File Comments | |||
155 | 'Q' all linux/soundcard.h | 155 | 'Q' all linux/soundcard.h |
156 | 'R' 00-1F linux/random.h conflict! | 156 | 'R' 00-1F linux/random.h conflict! |
157 | 'R' 01 linux/rfkill.h conflict! | 157 | 'R' 01 linux/rfkill.h conflict! |
158 | 'R' 01-0F media/rds.h conflict! | ||
159 | 'R' C0-DF net/bluetooth/rfcomm.h | 158 | 'R' C0-DF net/bluetooth/rfcomm.h |
160 | 'S' all linux/cdrom.h conflict! | 159 | 'S' all linux/cdrom.h conflict! |
161 | 'S' 80-81 scsi/scsi_ioctl.h conflict! | 160 | 'S' 80-81 scsi/scsi_ioctl.h conflict! |
@@ -194,7 +193,6 @@ Code Seq#(hex) Include File Comments | |||
194 | <http://lrcwww.epfl.ch/> | 193 | <http://lrcwww.epfl.ch/> |
195 | 'b' 00-FF conflict! bit3 vme host bridge | 194 | 'b' 00-FF conflict! bit3 vme host bridge |
196 | <mailto:natalia@nikhefk.nikhef.nl> | 195 | <mailto:natalia@nikhefk.nikhef.nl> |
197 | 'b' 00-0F media/bt819.h conflict! | ||
198 | 'c' all linux/cm4000_cs.h conflict! | 196 | 'c' all linux/cm4000_cs.h conflict! |
199 | 'c' 00-7F linux/comstats.h conflict! | 197 | 'c' 00-7F linux/comstats.h conflict! |
200 | 'c' 00-7F linux/coda.h conflict! | 198 | 'c' 00-7F linux/coda.h conflict! |
@@ -260,14 +258,11 @@ Code Seq#(hex) Include File Comments | |||
260 | 't' 80-8F linux/isdn_ppp.h | 258 | 't' 80-8F linux/isdn_ppp.h |
261 | 't' 90 linux/toshiba.h | 259 | 't' 90 linux/toshiba.h |
262 | 'u' 00-1F linux/smb_fs.h gone | 260 | 'u' 00-1F linux/smb_fs.h gone |
263 | 'v' all linux/videodev.h conflict! | ||
264 | 'v' 00-1F linux/ext2_fs.h conflict! | 261 | 'v' 00-1F linux/ext2_fs.h conflict! |
265 | 'v' 00-1F linux/fs.h conflict! | 262 | 'v' 00-1F linux/fs.h conflict! |
266 | 'v' 00-0F linux/sonypi.h conflict! | 263 | 'v' 00-0F linux/sonypi.h conflict! |
267 | 'v' C0-CF drivers/media/video/ov511.h conflict! | ||
268 | 'v' C0-DF media/pwc-ioctl.h conflict! | 264 | 'v' C0-DF media/pwc-ioctl.h conflict! |
269 | 'v' C0-FF linux/meye.h conflict! | 265 | 'v' C0-FF linux/meye.h conflict! |
270 | 'v' C0-CF drivers/media/video/zoran/zoran.h conflict! | ||
271 | 'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict! | 266 | 'v' D0-DF drivers/media/video/cpia2/cpia2dev.h conflict! |
272 | 'w' all CERN SCI driver | 267 | 'w' all CERN SCI driver |
273 | 'y' 00-1F packet based user level communications | 268 | 'y' 00-1F packet based user level communications |
@@ -278,7 +273,6 @@ Code Seq#(hex) Include File Comments | |||
278 | <mailto:oe@port.de> | 273 | <mailto:oe@port.de> |
279 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! | 274 | 'z' 10-4F drivers/s390/crypto/zcrypt_api.h conflict! |
280 | 0x80 00-1F linux/fb.h | 275 | 0x80 00-1F linux/fb.h |
281 | 0x88 00-3F media/ovcamchip.h | ||
282 | 0x89 00-06 arch/x86/include/asm/sockios.h | 276 | 0x89 00-06 arch/x86/include/asm/sockios.h |
283 | 0x89 0B-DF linux/sockios.h | 277 | 0x89 0B-DF linux/sockios.h |
284 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range | 278 | 0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range |
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index 715eaaf1519d..9a8674629a07 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -537,7 +537,7 @@ | |||
537 | Notes: Further information in | 537 | Notes: Further information in |
538 | http://www.oreilly.com/catalog/linuxdrive2/ | 538 | http://www.oreilly.com/catalog/linuxdrive2/ |
539 | 539 | ||
540 | * Title: "Linux Device Drivers, 3nd Edition" | 540 | * Title: "Linux Device Drivers, 3rd Edition" |
541 | Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman | 541 | Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman |
542 | Publisher: O'Reilly & Associates. | 542 | Publisher: O'Reilly & Associates. |
543 | Date: 2005. | 543 | Date: 2005. |
@@ -592,14 +592,6 @@ | |||
592 | Pages: 600. | 592 | Pages: 600. |
593 | ISBN: 0-13-101908-2 | 593 | ISBN: 0-13-101908-2 |
594 | 594 | ||
595 | * Title: "The Design and Implementation of the 4.4 BSD UNIX | ||
596 | Operating System" | ||
597 | Author: Marshall Kirk McKusick, Keith Bostic, Michael J. Karels, | ||
598 | John S. Quarterman. | ||
599 | Publisher: Addison-Wesley. | ||
600 | Date: 1996. | ||
601 | ISBN: 0-201-54979-4 | ||
602 | |||
603 | * Title: "Programming for the real world - POSIX.4" | 595 | * Title: "Programming for the real world - POSIX.4" |
604 | Author: Bill O. Gallmeister. | 596 | Author: Bill O. Gallmeister. |
605 | Publisher: O'Reilly & Associates, Inc.. | 597 | Publisher: O'Reilly & Associates, Inc.. |
@@ -610,28 +602,13 @@ | |||
610 | POSIX. Good reference. | 602 | POSIX. Good reference. |
611 | 603 | ||
612 | * Title: "UNIX Systems for Modern Architectures: Symmetric | 604 | * Title: "UNIX Systems for Modern Architectures: Symmetric |
613 | Multiprocesssing and Caching for Kernel Programmers" | 605 | Multiprocessing and Caching for Kernel Programmers" |
614 | Author: Curt Schimmel. | 606 | Author: Curt Schimmel. |
615 | Publisher: Addison Wesley. | 607 | Publisher: Addison Wesley. |
616 | Date: June, 1994. | 608 | Date: June, 1994. |
617 | Pages: 432. | 609 | Pages: 432. |
618 | ISBN: 0-201-63338-8 | 610 | ISBN: 0-201-63338-8 |
619 | 611 | ||
620 | * Title: "The Design and Implementation of the 4.3 BSD UNIX | ||
621 | Operating System" | ||
622 | Author: Samuel J. Leffler, Marshall Kirk McKusick, Michael J. | ||
623 | Karels, John S. Quarterman. | ||
624 | Publisher: Addison-Wesley. | ||
625 | Date: 1989 (reprinted with corrections on October, 1990). | ||
626 | ISBN: 0-201-06196-1 | ||
627 | |||
628 | * Title: "The Design of the UNIX Operating System" | ||
629 | Author: Maurice J. Bach. | ||
630 | Publisher: Prentice Hall. | ||
631 | Date: 1986. | ||
632 | Pages: 471. | ||
633 | ISBN: 0-13-201757-1 | ||
634 | |||
635 | MISCELLANEOUS: | 612 | MISCELLANEOUS: |
636 | 613 | ||
637 | * Name: linux/Documentation | 614 | * Name: linux/Documentation |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 8b61c9360999..f3dc951e949f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1579,20 +1579,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1579 | 1579 | ||
1580 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels | 1580 | nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels |
1581 | Format: [panic,][num] | 1581 | Format: [panic,][num] |
1582 | Valid num: 0,1,2 | 1582 | Valid num: 0 |
1583 | 0 - turn nmi_watchdog off | 1583 | 0 - turn nmi_watchdog off |
1584 | 1 - use the IO-APIC timer for the NMI watchdog | ||
1585 | 2 - use the local APIC for the NMI watchdog using | ||
1586 | a performance counter. Note: This will use one | ||
1587 | performance counter and the local APIC's performance | ||
1588 | vector. | ||
1589 | When panic is specified, panic when an NMI watchdog | 1584 | When panic is specified, panic when an NMI watchdog |
1590 | timeout occurs. | 1585 | timeout occurs. |
1591 | This is useful when you use a panic=... timeout and | 1586 | This is useful when you use a panic=... timeout and |
1592 | need the box quickly up again. | 1587 | need the box quickly up again. |
1593 | Instead of 1 and 2 it is possible to use the following | ||
1594 | symbolic names: lapic and ioapic | ||
1595 | Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic | ||
1596 | 1588 | ||
1597 | netpoll.carrier_timeout= | 1589 | netpoll.carrier_timeout= |
1598 | [NET] Specifies amount of time (in seconds) that | 1590 | [NET] Specifies amount of time (in seconds) that |
@@ -1622,6 +1614,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1622 | noapic [SMP,APIC] Tells the kernel to not make use of any | 1614 | noapic [SMP,APIC] Tells the kernel to not make use of any |
1623 | IOAPICs that may be present in the system. | 1615 | IOAPICs that may be present in the system. |
1624 | 1616 | ||
1617 | noautogroup Disable scheduler automatic task group creation. | ||
1618 | |||
1625 | nobats [PPC] Do not use BATs for mapping kernel lowmem | 1619 | nobats [PPC] Do not use BATs for mapping kernel lowmem |
1626 | on "Classic" PPC cores. | 1620 | on "Classic" PPC cores. |
1627 | 1621 | ||
@@ -1759,7 +1753,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1759 | 1753 | ||
1760 | nousb [USB] Disable the USB subsystem | 1754 | nousb [USB] Disable the USB subsystem |
1761 | 1755 | ||
1762 | nowatchdog [KNL] Disable the lockup detector. | 1756 | nowatchdog [KNL] Disable the lockup detector (NMI watchdog). |
1763 | 1757 | ||
1764 | nowb [ARM] | 1758 | nowb [ARM] |
1765 | 1759 | ||
@@ -2467,12 +2461,13 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2467 | to facilitate early boot debugging. | 2461 | to facilitate early boot debugging. |
2468 | See also Documentation/trace/events.txt | 2462 | See also Documentation/trace/events.txt |
2469 | 2463 | ||
2470 | tsc= Disable clocksource-must-verify flag for TSC. | 2464 | tsc= Disable clocksource stability checks for TSC. |
2471 | Format: <string> | 2465 | Format: <string> |
2472 | [x86] reliable: mark tsc clocksource as reliable, this | 2466 | [x86] reliable: mark tsc clocksource as reliable, this |
2473 | disables clocksource verification at runtime. | 2467 | disables clocksource verification at runtime, as well |
2474 | Used to enable high-resolution timer mode on older | 2468 | as the stability checks done at bootup. Used to enable |
2475 | hardware, and in virtualized environment. | 2469 | high-resolution timer mode on older hardware, and in |
2470 | virtualized environment. | ||
2476 | [x86] noirqtime: Do not use TSC to do irq accounting. | 2471 | [x86] noirqtime: Do not use TSC to do irq accounting. |
2477 | Used to run time disable IRQ_TIME_ACCOUNTING on any | 2472 | Used to run time disable IRQ_TIME_ACCOUNTING on any |
2478 | platforms where RDTSC is slow and this accounting | 2473 | platforms where RDTSC is slow and this accounting |
diff --git a/Documentation/networking/LICENSE.qlcnic b/Documentation/networking/LICENSE.qlcnic new file mode 100644 index 000000000000..29ad4b106420 --- /dev/null +++ b/Documentation/networking/LICENSE.qlcnic | |||
@@ -0,0 +1,327 @@ | |||
1 | Copyright (c) 2009-2010 QLogic Corporation | ||
2 | QLogic Linux qlcnic NIC Driver | ||
3 | |||
4 | This program includes a device driver for Linux 2.6 that may be | ||
5 | distributed with QLogic hardware specific firmware binary file. | ||
6 | You may modify and redistribute the device driver code under the | ||
7 | GNU General Public License (a copy of which is attached hereto as | ||
8 | Exhibit A) published by the Free Software Foundation (version 2). | ||
9 | |||
10 | You may redistribute the hardware specific firmware binary file | ||
11 | under the following terms: | ||
12 | |||
13 | 1. Redistribution of source code (only if applicable), | ||
14 | must retain the above copyright notice, this list of | ||
15 | conditions and the following disclaimer. | ||
16 | |||
17 | 2. Redistribution in binary form must reproduce the above | ||
18 | copyright notice, this list of conditions and the | ||
19 | following disclaimer in the documentation and/or other | ||
20 | materials provided with the distribution. | ||
21 | |||
22 | 3. The name of QLogic Corporation may not be used to | ||
23 | endorse or promote products derived from this software | ||
24 | without specific prior written permission | ||
25 | |||
26 | REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE, | ||
27 | THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY | ||
28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
29 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
30 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR | ||
31 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
35 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
36 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
37 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
38 | POSSIBILITY OF SUCH DAMAGE. | ||
39 | |||
40 | USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT | ||
41 | CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR | ||
42 | OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, | ||
43 | TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN | ||
44 | ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN | ||
45 | COMBINATION WITH THIS PROGRAM. | ||
46 | |||
47 | |||
48 | EXHIBIT A | ||
49 | |||
50 | GNU GENERAL PUBLIC LICENSE | ||
51 | Version 2, June 1991 | ||
52 | |||
53 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. | ||
54 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
55 | Everyone is permitted to copy and distribute verbatim copies | ||
56 | of this license document, but changing it is not allowed. | ||
57 | |||
58 | Preamble | ||
59 | |||
60 | The licenses for most software are designed to take away your | ||
61 | freedom to share and change it. By contrast, the GNU General Public | ||
62 | License is intended to guarantee your freedom to share and change free | ||
63 | software--to make sure the software is free for all its users. This | ||
64 | General Public License applies to most of the Free Software | ||
65 | Foundation's software and to any other program whose authors commit to | ||
66 | using it. (Some other Free Software Foundation software is covered by | ||
67 | the GNU Lesser General Public License instead.) You can apply it to | ||
68 | your programs, too. | ||
69 | |||
70 | When we speak of free software, we are referring to freedom, not | ||
71 | price. Our General Public Licenses are designed to make sure that you | ||
72 | have the freedom to distribute copies of free software (and charge for | ||
73 | this service if you wish), that you receive source code or can get it | ||
74 | if you want it, that you can change the software or use pieces of it | ||
75 | in new free programs; and that you know you can do these things. | ||
76 | |||
77 | To protect your rights, we need to make restrictions that forbid | ||
78 | anyone to deny you these rights or to ask you to surrender the rights. | ||
79 | These restrictions translate to certain responsibilities for you if you | ||
80 | distribute copies of the software, or if you modify it. | ||
81 | |||
82 | For example, if you distribute copies of such a program, whether | ||
83 | gratis or for a fee, you must give the recipients all the rights that | ||
84 | you have. You must make sure that they, too, receive or can get the | ||
85 | source code. And you must show them these terms so they know their | ||
86 | rights. | ||
87 | |||
88 | We protect your rights with two steps: (1) copyright the software, and | ||
89 | (2) offer you this license which gives you legal permission to copy, | ||
90 | distribute and/or modify the software. | ||
91 | |||
92 | Also, for each author's protection and ours, we want to make certain | ||
93 | that everyone understands that there is no warranty for this free | ||
94 | software. If the software is modified by someone else and passed on, we | ||
95 | want its recipients to know that what they have is not the original, so | ||
96 | that any problems introduced by others will not reflect on the original | ||
97 | authors' reputations. | ||
98 | |||
99 | Finally, any free program is threatened constantly by software | ||
100 | patents. We wish to avoid the danger that redistributors of a free | ||
101 | program will individually obtain patent licenses, in effect making the | ||
102 | program proprietary. To prevent this, we have made it clear that any | ||
103 | patent must be licensed for everyone's free use or not licensed at all. | ||
104 | |||
105 | The precise terms and conditions for copying, distribution and | ||
106 | modification follow. | ||
107 | |||
108 | GNU GENERAL PUBLIC LICENSE | ||
109 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
110 | |||
111 | 0. This License applies to any program or other work which contains | ||
112 | a notice placed by the copyright holder saying it may be distributed | ||
113 | under the terms of this General Public License. The "Program", below, | ||
114 | refers to any such program or work, and a "work based on the Program" | ||
115 | means either the Program or any derivative work under copyright law: | ||
116 | that is to say, a work containing the Program or a portion of it, | ||
117 | either verbatim or with modifications and/or translated into another | ||
118 | language. (Hereinafter, translation is included without limitation in | ||
119 | the term "modification".) Each licensee is addressed as "you". | ||
120 | |||
121 | Activities other than copying, distribution and modification are not | ||
122 | covered by this License; they are outside its scope. The act of | ||
123 | running the Program is not restricted, and the output from the Program | ||
124 | is covered only if its contents constitute a work based on the | ||
125 | Program (independent of having been made by running the Program). | ||
126 | Whether that is true depends on what the Program does. | ||
127 | |||
128 | 1. You may copy and distribute verbatim copies of the Program's | ||
129 | source code as you receive it, in any medium, provided that you | ||
130 | conspicuously and appropriately publish on each copy an appropriate | ||
131 | copyright notice and disclaimer of warranty; keep intact all the | ||
132 | notices that refer to this License and to the absence of any warranty; | ||
133 | and give any other recipients of the Program a copy of this License | ||
134 | along with the Program. | ||
135 | |||
136 | You may charge a fee for the physical act of transferring a copy, and | ||
137 | you may at your option offer warranty protection in exchange for a fee. | ||
138 | |||
139 | 2. You may modify your copy or copies of the Program or any portion | ||
140 | of it, thus forming a work based on the Program, and copy and | ||
141 | distribute such modifications or work under the terms of Section 1 | ||
142 | above, provided that you also meet all of these conditions: | ||
143 | |||
144 | a) You must cause the modified files to carry prominent notices | ||
145 | stating that you changed the files and the date of any change. | ||
146 | |||
147 | b) You must cause any work that you distribute or publish, that in | ||
148 | whole or in part contains or is derived from the Program or any | ||
149 | part thereof, to be licensed as a whole at no charge to all third | ||
150 | parties under the terms of this License. | ||
151 | |||
152 | c) If the modified program normally reads commands interactively | ||
153 | when run, you must cause it, when started running for such | ||
154 | interactive use in the most ordinary way, to print or display an | ||
155 | announcement including an appropriate copyright notice and a | ||
156 | notice that there is no warranty (or else, saying that you provide | ||
157 | a warranty) and that users may redistribute the program under | ||
158 | these conditions, and telling the user how to view a copy of this | ||
159 | License. (Exception: if the Program itself is interactive but | ||
160 | does not normally print such an announcement, your work based on | ||
161 | the Program is not required to print an announcement.) | ||
162 | |||
163 | These requirements apply to the modified work as a whole. If | ||
164 | identifiable sections of that work are not derived from the Program, | ||
165 | and can be reasonably considered independent and separate works in | ||
166 | themselves, then this License, and its terms, do not apply to those | ||
167 | sections when you distribute them as separate works. But when you | ||
168 | distribute the same sections as part of a whole which is a work based | ||
169 | on the Program, the distribution of the whole must be on the terms of | ||
170 | this License, whose permissions for other licensees extend to the | ||
171 | entire whole, and thus to each and every part regardless of who wrote it. | ||
172 | |||
173 | Thus, it is not the intent of this section to claim rights or contest | ||
174 | your rights to work written entirely by you; rather, the intent is to | ||
175 | exercise the right to control the distribution of derivative or | ||
176 | collective works based on the Program. | ||
177 | |||
178 | In addition, mere aggregation of another work not based on the Program | ||
179 | with the Program (or with a work based on the Program) on a volume of | ||
180 | a storage or distribution medium does not bring the other work under | ||
181 | the scope of this License. | ||
182 | |||
183 | 3. You may copy and distribute the Program (or a work based on it, | ||
184 | under Section 2) in object code or executable form under the terms of | ||
185 | Sections 1 and 2 above provided that you also do one of the following: | ||
186 | |||
187 | a) Accompany it with the complete corresponding machine-readable | ||
188 | source code, which must be distributed under the terms of Sections | ||
189 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
190 | |||
191 | b) Accompany it with a written offer, valid for at least three | ||
192 | years, to give any third party, for a charge no more than your | ||
193 | cost of physically performing source distribution, a complete | ||
194 | machine-readable copy of the corresponding source code, to be | ||
195 | distributed under the terms of Sections 1 and 2 above on a medium | ||
196 | customarily used for software interchange; or, | ||
197 | |||
198 | c) Accompany it with the information you received as to the offer | ||
199 | to distribute corresponding source code. (This alternative is | ||
200 | allowed only for noncommercial distribution and only if you | ||
201 | received the program in object code or executable form with such | ||
202 | an offer, in accord with Subsection b above.) | ||
203 | |||
204 | The source code for a work means the preferred form of the work for | ||
205 | making modifications to it. For an executable work, complete source | ||
206 | code means all the source code for all modules it contains, plus any | ||
207 | associated interface definition files, plus the scripts used to | ||
208 | control compilation and installation of the executable. However, as a | ||
209 | special exception, the source code distributed need not include | ||
210 | anything that is normally distributed (in either source or binary | ||
211 | form) with the major components (compiler, kernel, and so on) of the | ||
212 | operating system on which the executable runs, unless that component | ||
213 | itself accompanies the executable. | ||
214 | |||
215 | If distribution of executable or object code is made by offering | ||
216 | access to copy from a designated place, then offering equivalent | ||
217 | access to copy the source code from the same place counts as | ||
218 | distribution of the source code, even though third parties are not | ||
219 | compelled to copy the source along with the object code. | ||
220 | |||
221 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
222 | except as expressly provided under this License. Any attempt | ||
223 | otherwise to copy, modify, sublicense or distribute the Program is | ||
224 | void, and will automatically terminate your rights under this License. | ||
225 | However, parties who have received copies, or rights, from you under | ||
226 | this License will not have their licenses terminated so long as such | ||
227 | parties remain in full compliance. | ||
228 | |||
229 | 5. You are not required to accept this License, since you have not | ||
230 | signed it. However, nothing else grants you permission to modify or | ||
231 | distribute the Program or its derivative works. These actions are | ||
232 | prohibited by law if you do not accept this License. Therefore, by | ||
233 | modifying or distributing the Program (or any work based on the | ||
234 | Program), you indicate your acceptance of this License to do so, and | ||
235 | all its terms and conditions for copying, distributing or modifying | ||
236 | the Program or works based on it. | ||
237 | |||
238 | 6. Each time you redistribute the Program (or any work based on the | ||
239 | Program), the recipient automatically receives a license from the | ||
240 | original licensor to copy, distribute or modify the Program subject to | ||
241 | these terms and conditions. You may not impose any further | ||
242 | restrictions on the recipients' exercise of the rights granted herein. | ||
243 | You are not responsible for enforcing compliance by third parties to | ||
244 | this License. | ||
245 | |||
246 | 7. If, as a consequence of a court judgment or allegation of patent | ||
247 | infringement or for any other reason (not limited to patent issues), | ||
248 | conditions are imposed on you (whether by court order, agreement or | ||
249 | otherwise) that contradict the conditions of this License, they do not | ||
250 | excuse you from the conditions of this License. If you cannot | ||
251 | distribute so as to satisfy simultaneously your obligations under this | ||
252 | License and any other pertinent obligations, then as a consequence you | ||
253 | may not distribute the Program at all. For example, if a patent | ||
254 | license would not permit royalty-free redistribution of the Program by | ||
255 | all those who receive copies directly or indirectly through you, then | ||
256 | the only way you could satisfy both it and this License would be to | ||
257 | refrain entirely from distribution of the Program. | ||
258 | |||
259 | If any portion of this section is held invalid or unenforceable under | ||
260 | any particular circumstance, the balance of the section is intended to | ||
261 | apply and the section as a whole is intended to apply in other | ||
262 | circumstances. | ||
263 | |||
264 | It is not the purpose of this section to induce you to infringe any | ||
265 | patents or other property right claims or to contest validity of any | ||
266 | such claims; this section has the sole purpose of protecting the | ||
267 | integrity of the free software distribution system, which is | ||
268 | implemented by public license practices. Many people have made | ||
269 | generous contributions to the wide range of software distributed | ||
270 | through that system in reliance on consistent application of that | ||
271 | system; it is up to the author/donor to decide if he or she is willing | ||
272 | to distribute software through any other system and a licensee cannot | ||
273 | impose that choice. | ||
274 | |||
275 | This section is intended to make thoroughly clear what is believed to | ||
276 | be a consequence of the rest of this License. | ||
277 | |||
278 | 8. If the distribution and/or use of the Program is restricted in | ||
279 | certain countries either by patents or by copyrighted interfaces, the | ||
280 | original copyright holder who places the Program under this License | ||
281 | may add an explicit geographical distribution limitation excluding | ||
282 | those countries, so that distribution is permitted only in or among | ||
283 | countries not thus excluded. In such case, this License incorporates | ||
284 | the limitation as if written in the body of this License. | ||
285 | |||
286 | 9. The Free Software Foundation may publish revised and/or new versions | ||
287 | of the General Public License from time to time. Such new versions will | ||
288 | be similar in spirit to the present version, but may differ in detail to | ||
289 | address new problems or concerns. | ||
290 | |||
291 | Each version is given a distinguishing version number. If the Program | ||
292 | specifies a version number of this License which applies to it and "any | ||
293 | later version", you have the option of following the terms and conditions | ||
294 | either of that version or of any later version published by the Free | ||
295 | Software Foundation. If the Program does not specify a version number of | ||
296 | this License, you may choose any version ever published by the Free Software | ||
297 | Foundation. | ||
298 | |||
299 | 10. If you wish to incorporate parts of the Program into other free | ||
300 | programs whose distribution conditions are different, write to the author | ||
301 | to ask for permission. For software which is copyrighted by the Free | ||
302 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
303 | make exceptions for this. Our decision will be guided by the two goals | ||
304 | of preserving the free status of all derivatives of our free software and | ||
305 | of promoting the sharing and reuse of software generally. | ||
306 | |||
307 | NO WARRANTY | ||
308 | |||
309 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
310 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
311 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
312 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
313 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
314 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
315 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
316 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
317 | REPAIR OR CORRECTION. | ||
318 | |||
319 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
320 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
321 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
322 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
323 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
324 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
325 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
326 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
327 | POSSIBILITY OF SUCH DAMAGES. | ||
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt new file mode 100644 index 000000000000..77f0cdd5b0dd --- /dev/null +++ b/Documentation/networking/batman-adv.txt | |||
@@ -0,0 +1,240 @@ | |||
1 | [state: 21-11-2010] | ||
2 | |||
3 | BATMAN-ADV | ||
4 | ---------- | ||
5 | |||
6 | Batman advanced is a new approach to wireless networking which | ||
7 | does no longer operate on the IP basis. Unlike the batman daemon, | ||
8 | which exchanges information using UDP packets and sets routing | ||
9 | tables, batman-advanced operates on ISO/OSI Layer 2 only and uses | ||
10 | and routes (or better: bridges) Ethernet Frames. It emulates a | ||
11 | virtual network switch of all nodes participating. Therefore all | ||
12 | nodes appear to be link local, thus all higher operating proto- | ||
13 | cols won't be affected by any changes within the network. You can | ||
14 | run almost any protocol above batman advanced, prominent examples | ||
15 | are: IPv4, IPv6, DHCP, IPX. | ||
16 | |||
17 | Batman advanced was implemented as a Linux kernel driver to re- | ||
18 | duce the overhead to a minimum. It does not depend on any (other) | ||
19 | network driver, and can be used on wifi as well as ethernet lan, | ||
20 | vpn, etc ... (anything with ethernet-style layer 2). | ||
21 | |||
22 | CONFIGURATION | ||
23 | ------------- | ||
24 | |||
25 | Load the batman-adv module into your kernel: | ||
26 | |||
27 | # insmod batman-adv.ko | ||
28 | |||
29 | The module is now waiting for activation. You must add some in- | ||
30 | terfaces on which batman can operate. After loading the module | ||
31 | batman advanced will scan your systems interfaces to search for | ||
32 | compatible interfaces. Once found, it will create subfolders in | ||
33 | the /sys directories of each supported interface, e.g. | ||
34 | |||
35 | # ls /sys/class/net/eth0/batman_adv/ | ||
36 | # iface_status mesh_iface | ||
37 | |||
38 | If an interface does not have the "batman_adv" subfolder it prob- | ||
39 | ably is not supported. Not supported interfaces are: loopback, | ||
40 | non-ethernet and batman's own interfaces. | ||
41 | |||
42 | Note: After the module was loaded it will continuously watch for | ||
43 | new interfaces to verify the compatibility. There is no need to | ||
44 | reload the module if you plug your USB wifi adapter into your ma- | ||
45 | chine after batman advanced was initially loaded. | ||
46 | |||
47 | To activate a given interface simply write "bat0" into its | ||
48 | "mesh_iface" file inside the batman_adv subfolder: | ||
49 | |||
50 | # echo bat0 > /sys/class/net/eth0/batman_adv/mesh_iface | ||
51 | |||
52 | Repeat this step for all interfaces you wish to add. Now batman | ||
53 | starts using/broadcasting on this/these interface(s). | ||
54 | |||
55 | By reading the "iface_status" file you can check its status: | ||
56 | |||
57 | # cat /sys/class/net/eth0/batman_adv/iface_status | ||
58 | # active | ||
59 | |||
60 | To deactivate an interface you have to write "none" into its | ||
61 | "mesh_iface" file: | ||
62 | |||
63 | # echo none > /sys/class/net/eth0/batman_adv/mesh_iface | ||
64 | |||
65 | |||
66 | All mesh wide settings can be found in batman's own interface | ||
67 | folder: | ||
68 | |||
69 | # ls /sys/class/net/bat0/mesh/ | ||
70 | # aggregated_ogms bonding fragmentation orig_interval | ||
71 | # vis_mode | ||
72 | |||
73 | |||
74 | There is a special folder for debugging informations: | ||
75 | |||
76 | # ls /sys/kernel/debug/batman_adv/bat0/ | ||
77 | # originators socket transtable_global transtable_local | ||
78 | # vis_data | ||
79 | |||
80 | |||
81 | Some of the files contain all sort of status information regard- | ||
82 | ing the mesh network. For example, you can view the table of | ||
83 | originators (mesh participants) with: | ||
84 | |||
85 | # cat /sys/kernel/debug/batman_adv/bat0/originators | ||
86 | |||
87 | Other files allow to change batman's behaviour to better fit your | ||
88 | requirements. For instance, you can check the current originator | ||
89 | interval (value in milliseconds which determines how often batman | ||
90 | sends its broadcast packets): | ||
91 | |||
92 | # cat /sys/class/net/bat0/mesh/orig_interval | ||
93 | # 1000 | ||
94 | |||
95 | and also change its value: | ||
96 | |||
97 | # echo 3000 > /sys/class/net/bat0/mesh/orig_interval | ||
98 | |||
99 | In very mobile scenarios, you might want to adjust the originator | ||
100 | interval to a lower value. This will make the mesh more respon- | ||
101 | sive to topology changes, but will also increase the overhead. | ||
102 | |||
103 | |||
104 | USAGE | ||
105 | ----- | ||
106 | |||
107 | To make use of your newly created mesh, batman advanced provides | ||
108 | a new interface "bat0" which you should use from this point on. | ||
109 | All interfaces added to batman advanced are not relevant any | ||
110 | longer because batman handles them for you. Basically, one "hands | ||
111 | over" the data by using the batman interface and batman will make | ||
112 | sure it reaches its destination. | ||
113 | |||
114 | The "bat0" interface can be used like any other regular inter- | ||
115 | face. It needs an IP address which can be either statically con- | ||
116 | figured or dynamically (by using DHCP or similar services): | ||
117 | |||
118 | # NodeA: ifconfig bat0 192.168.0.1 | ||
119 | # NodeB: ifconfig bat0 192.168.0.2 | ||
120 | # NodeB: ping 192.168.0.1 | ||
121 | |||
122 | Note: In order to avoid problems remove all IP addresses previ- | ||
123 | ously assigned to interfaces now used by batman advanced, e.g. | ||
124 | |||
125 | # ifconfig eth0 0.0.0.0 | ||
126 | |||
127 | |||
128 | VISUALIZATION | ||
129 | ------------- | ||
130 | |||
131 | If you want topology visualization, at least one mesh node must | ||
132 | be configured as VIS-server: | ||
133 | |||
134 | # echo "server" > /sys/class/net/bat0/mesh/vis_mode | ||
135 | |||
136 | Each node is either configured as "server" or as "client" (de- | ||
137 | fault: "client"). Clients send their topology data to the server | ||
138 | next to them, and server synchronize with other servers. If there | ||
139 | is no server configured (default) within the mesh, no topology | ||
140 | information will be transmitted. With these "synchronizing | ||
141 | servers", there can be 1 or more vis servers sharing the same (or | ||
142 | at least very similar) data. | ||
143 | |||
144 | When configured as server, you can get a topology snapshot of | ||
145 | your mesh: | ||
146 | |||
147 | # cat /sys/kernel/debug/batman_adv/bat0/vis_data | ||
148 | |||
149 | This raw output is intended to be easily parsable and convertable | ||
150 | with other tools. Have a look at the batctl README if you want a | ||
151 | vis output in dot or json format for instance and how those out- | ||
152 | puts could then be visualised in an image. | ||
153 | |||
154 | The raw format consists of comma separated values per entry where | ||
155 | each entry is giving information about a certain source inter- | ||
156 | face. Each entry can/has to have the following values: | ||
157 | -> "mac" - mac address of an originator's source interface | ||
158 | (each line begins with it) | ||
159 | -> "TQ mac value" - src mac's link quality towards mac address | ||
160 | of a neighbor originator's interface which | ||
161 | is being used for routing | ||
162 | -> "HNA mac" - HNA announced by source mac | ||
163 | -> "PRIMARY" - this is a primary interface | ||
164 | -> "SEC mac" - secondary mac address of source | ||
165 | (requires preceding PRIMARY) | ||
166 | |||
167 | The TQ value has a range from 4 to 255 with 255 being the best. | ||
168 | The HNA entries are showing which hosts are connected to the mesh | ||
169 | via bat0 or being bridged into the mesh network. The PRIMARY/SEC | ||
170 | values are only applied on primary interfaces | ||
171 | |||
172 | |||
173 | LOGGING/DEBUGGING | ||
174 | ----------------- | ||
175 | |||
176 | All error messages, warnings and information messages are sent to | ||
177 | the kernel log. Depending on your operating system distribution | ||
178 | this can be read in one of a number of ways. Try using the com- | ||
179 | mands: dmesg, logread, or looking in the files /var/log/kern.log | ||
180 | or /var/log/syslog. All batman-adv messages are prefixed with | ||
181 | "batman-adv:" So to see just these messages try | ||
182 | |||
183 | # dmesg | grep batman-adv | ||
184 | |||
185 | When investigating problems with your mesh network it is some- | ||
186 | times necessary to see more detail debug messages. This must be | ||
187 | enabled when compiling the batman-adv module. When building bat- | ||
188 | man-adv as part of kernel, use "make menuconfig" and enable the | ||
189 | option "B.A.T.M.A.N. debugging". | ||
190 | |||
191 | Those additional debug messages can be accessed using a special | ||
192 | file in debugfs | ||
193 | |||
194 | # cat /sys/kernel/debug/batman_adv/bat0/log | ||
195 | |||
196 | The additional debug output is by default disabled. It can be en- | ||
197 | abled during run time. Following log_levels are defined: | ||
198 | |||
199 | 0 - All debug output disabled | ||
200 | 1 - Enable messages related to routing / flooding / broadcasting | ||
201 | 2 - Enable route or hna added / changed / deleted | ||
202 | 3 - Enable all messages | ||
203 | |||
204 | The debug output can be changed at runtime using the file | ||
205 | /sys/class/net/bat0/mesh/log_level. e.g. | ||
206 | |||
207 | # echo 2 > /sys/class/net/bat0/mesh/log_level | ||
208 | |||
209 | will enable debug messages for when routes or HNAs change. | ||
210 | |||
211 | |||
212 | BATCTL | ||
213 | ------ | ||
214 | |||
215 | As batman advanced operates on layer 2 all hosts participating in | ||
216 | the virtual switch are completely transparent for all protocols | ||
217 | above layer 2. Therefore the common diagnosis tools do not work | ||
218 | as expected. To overcome these problems batctl was created. At | ||
219 | the moment the batctl contains ping, traceroute, tcpdump and | ||
220 | interfaces to the kernel module settings. | ||
221 | |||
222 | For more information, please see the manpage (man batctl). | ||
223 | |||
224 | batctl is available on http://www.open-mesh.org/ | ||
225 | |||
226 | |||
227 | CONTACT | ||
228 | ------- | ||
229 | |||
230 | Please send us comments, experiences, questions, anything :) | ||
231 | |||
232 | IRC: #batman on irc.freenode.org | ||
233 | Mailing-list: b.a.t.m.a.n@b.a.t.m.a.n@lists.open-mesh.org | ||
234 | (optional subscription at | ||
235 | https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n) | ||
236 | |||
237 | You can also contact the Authors: | ||
238 | |||
239 | Marek Lindner <lindner_marek@yahoo.de> | ||
240 | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | ||
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 271d524a4c8d..b395ca6a49f2 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -47,6 +47,26 @@ http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree | |||
47 | 47 | ||
48 | Socket options | 48 | Socket options |
49 | ============== | 49 | ============== |
50 | DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes | ||
51 | a policy ID as argument and can only be set before the connection (i.e. changes | ||
52 | during an established connection are not supported). Currently, two policies are | ||
53 | defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special, | ||
54 | and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an | ||
55 | u32 priority value as ancillary data to sendmsg(), where higher numbers indicate | ||
56 | a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to | ||
57 | be formatted using a cmsg(3) message header filled in as follows: | ||
58 | cmsg->cmsg_level = SOL_DCCP; | ||
59 | cmsg->cmsg_type = DCCP_SCM_PRIORITY; | ||
60 | cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */ | ||
61 | |||
62 | DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero | ||
63 | value is always interpreted as unbounded queue length. If different from zero, | ||
64 | the interpretation of this parameter depends on the current dequeuing policy | ||
65 | (see above): the "simple" policy will enforce a fixed queue size by returning | ||
66 | EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the | ||
67 | lowest-priority packet first. The default value for this parameter is | ||
68 | initialised from /proc/sys/net/dccp/default/tx_qlen. | ||
69 | |||
50 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of | 70 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of |
51 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, | 71 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, |
52 | the socket will fall back to 0 (which means that no meaningful service code | 72 | the socket will fall back to 0 (which means that no meaningful service code |
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt index 944aa55e79f8..162f323a7a1f 100644 --- a/Documentation/networking/e100.txt +++ b/Documentation/networking/e100.txt | |||
@@ -72,7 +72,7 @@ Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a data | |||
72 | ethtool -G eth? tx n, where n is the number of desired tx descriptors. | 72 | ethtool -G eth? tx n, where n is the number of desired tx descriptors. |
73 | 73 | ||
74 | Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by | 74 | Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by |
75 | default. Ethtool can be used as follows to force speed/duplex. | 75 | default. The ethtool utility can be used as follows to force speed/duplex. |
76 | 76 | ||
77 | ethtool -s eth? autoneg off speed {10|100} duplex {full|half} | 77 | ethtool -s eth? autoneg off speed {10|100} duplex {full|half} |
78 | 78 | ||
@@ -126,30 +126,21 @@ Additional Configurations | |||
126 | ------- | 126 | ------- |
127 | 127 | ||
128 | The driver utilizes the ethtool interface for driver configuration and | 128 | The driver utilizes the ethtool interface for driver configuration and |
129 | diagnostics, as well as displaying statistical information. Ethtool | 129 | diagnostics, as well as displaying statistical information. The ethtool |
130 | version 1.6 or later is required for this functionality. | 130 | version 1.6 or later is required for this functionality. |
131 | 131 | ||
132 | The latest release of ethtool can be found from | 132 | The latest release of ethtool can be found from |
133 | http://sourceforge.net/projects/gkernel. | 133 | http://ftp.kernel.org/pub/software/network/ethtool/ |
134 | |||
135 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | ||
136 | for a more complete ethtool feature set can be enabled by upgrading | ||
137 | ethtool to ethtool-1.8.1. | ||
138 | |||
139 | 134 | ||
140 | Enabling Wake on LAN* (WoL) | 135 | Enabling Wake on LAN* (WoL) |
141 | --------------------------- | 136 | --------------------------- |
142 | WoL is provided through the Ethtool* utility. Ethtool is included with Red | 137 | WoL is provided through the ethtool* utility. For instructions on enabling |
143 | Hat* 8.0. For other Linux distributions, download and install Ethtool from | 138 | WoL with ethtool, refer to the ethtool man page. |
144 | the following website: http://sourceforge.net/projects/gkernel. | ||
145 | |||
146 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. | ||
147 | 139 | ||
148 | WoL will be enabled on the system during the next shut down or reboot. For | 140 | WoL will be enabled on the system during the next shut down or reboot. For |
149 | this driver version, in order to enable WoL, the e100 driver must be | 141 | this driver version, in order to enable WoL, the e100 driver must be |
150 | loaded when shutting down or rebooting the system. | 142 | loaded when shutting down or rebooting the system. |
151 | 143 | ||
152 | |||
153 | NAPI | 144 | NAPI |
154 | ---- | 145 | ---- |
155 | 146 | ||
diff --git a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt index d9271e74e488..71ca95855671 100644 --- a/Documentation/networking/e1000.txt +++ b/Documentation/networking/e1000.txt | |||
@@ -79,7 +79,7 @@ InterruptThrottleRate | |||
79 | --------------------- | 79 | --------------------- |
80 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) | 80 | (not supported on Intel(R) 82542, 82543 or 82544-based adapters) |
81 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, | 81 | Valid Range: 0,1,3,4,100-100000 (0=off, 1=dynamic, 3=dynamic conservative, |
82 | 4=simplified balancing) | 82 | 4=simplified balancing) |
83 | Default Value: 3 | 83 | Default Value: 3 |
84 | 84 | ||
85 | The driver can limit the amount of interrupts per second that the adapter | 85 | The driver can limit the amount of interrupts per second that the adapter |
@@ -124,8 +124,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates | |||
124 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | 124 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to |
125 | 70000 for traffic in class "Lowest latency". | 125 | 70000 for traffic in class "Lowest latency". |
126 | 126 | ||
127 | In simplified mode the interrupt rate is based on the ratio of Tx and | 127 | In simplified mode the interrupt rate is based on the ratio of TX and |
128 | Rx traffic. If the bytes per second rate is approximately equal, the | 128 | RX traffic. If the bytes per second rate is approximately equal, the |
129 | interrupt rate will drop as low as 2000 interrupts per second. If the | 129 | interrupt rate will drop as low as 2000 interrupts per second. If the |
130 | traffic is mostly transmit or mostly receive, the interrupt rate could | 130 | traffic is mostly transmit or mostly receive, the interrupt rate could |
131 | be as high as 8000. | 131 | be as high as 8000. |
@@ -245,7 +245,7 @@ NOTE: Depending on the available system resources, the request for a | |||
245 | TxDescriptorStep | 245 | TxDescriptorStep |
246 | ---------------- | 246 | ---------------- |
247 | Valid Range: 1 (use every Tx Descriptor) | 247 | Valid Range: 1 (use every Tx Descriptor) |
248 | 4 (use every 4th Tx Descriptor) | 248 | 4 (use every 4th Tx Descriptor) |
249 | 249 | ||
250 | Default Value: 1 (use every Tx Descriptor) | 250 | Default Value: 1 (use every Tx Descriptor) |
251 | 251 | ||
@@ -312,7 +312,7 @@ Valid Range: 0-xxxxxxx (0=off) | |||
312 | Default Value: 256 | 312 | Default Value: 256 |
313 | Usage: insmod e1000.ko copybreak=128 | 313 | Usage: insmod e1000.ko copybreak=128 |
314 | 314 | ||
315 | Driver copies all packets below or equaling this size to a fresh Rx | 315 | Driver copies all packets below or equaling this size to a fresh RX |
316 | buffer before handing it up the stack. | 316 | buffer before handing it up the stack. |
317 | 317 | ||
318 | This parameter is different than other parameters, in that it is a | 318 | This parameter is different than other parameters, in that it is a |
@@ -431,15 +431,15 @@ Additional Configurations | |||
431 | Ethtool | 431 | Ethtool |
432 | ------- | 432 | ------- |
433 | The driver utilizes the ethtool interface for driver configuration and | 433 | The driver utilizes the ethtool interface for driver configuration and |
434 | diagnostics, as well as displaying statistical information. Ethtool | 434 | diagnostics, as well as displaying statistical information. The ethtool |
435 | version 1.6 or later is required for this functionality. | 435 | version 1.6 or later is required for this functionality. |
436 | 436 | ||
437 | The latest release of ethtool can be found from | 437 | The latest release of ethtool can be found from |
438 | http://sourceforge.net/projects/gkernel. | 438 | http://ftp.kernel.org/pub/software/network/ethtool/ |
439 | 439 | ||
440 | Enabling Wake on LAN* (WoL) | 440 | Enabling Wake on LAN* (WoL) |
441 | --------------------------- | 441 | --------------------------- |
442 | WoL is configured through the Ethtool* utility. | 442 | WoL is configured through the ethtool* utility. |
443 | 443 | ||
444 | WoL will be enabled on the system during the next shut down or reboot. | 444 | WoL will be enabled on the system during the next shut down or reboot. |
445 | For this driver version, in order to enable WoL, the e1000 driver must be | 445 | For this driver version, in order to enable WoL, the e1000 driver must be |
diff --git a/Documentation/networking/e1000e.txt b/Documentation/networking/e1000e.txt index 6aa048badf32..97b5ba942ebf 100644 --- a/Documentation/networking/e1000e.txt +++ b/Documentation/networking/e1000e.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Linux* Driver for Intel(R) Network Connection | 1 | Linux* Driver for Intel(R) Network Connection |
2 | =============================================================== | 2 | ============================================= |
3 | 3 | ||
4 | Intel Gigabit Linux driver. | 4 | Intel Gigabit Linux driver. |
5 | Copyright(c) 1999 - 2010 Intel Corporation. | 5 | Copyright(c) 1999 - 2010 Intel Corporation. |
@@ -61,6 +61,12 @@ per second, even if more packets have come in. This reduces interrupt | |||
61 | load on the system and can lower CPU utilization under heavy load, | 61 | load on the system and can lower CPU utilization under heavy load, |
62 | but will increase latency as packets are not processed as quickly. | 62 | but will increase latency as packets are not processed as quickly. |
63 | 63 | ||
64 | The default behaviour of the driver previously assumed a static | ||
65 | InterruptThrottleRate value of 8000, providing a good fallback value for | ||
66 | all traffic types, but lacking in small packet performance and latency. | ||
67 | The hardware can handle many more small packets per second however, and | ||
68 | for this reason an adaptive interrupt moderation algorithm was implemented. | ||
69 | |||
64 | The driver has two adaptive modes (setting 1 or 3) in which | 70 | The driver has two adaptive modes (setting 1 or 3) in which |
65 | it dynamically adjusts the InterruptThrottleRate value based on the traffic | 71 | it dynamically adjusts the InterruptThrottleRate value based on the traffic |
66 | that it receives. After determining the type of incoming traffic in the last | 72 | that it receives. After determining the type of incoming traffic in the last |
@@ -86,8 +92,8 @@ InterruptThrottleRate is set to mode 1. In this mode, which operates | |||
86 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to | 92 | the same as mode 3, the InterruptThrottleRate will be increased stepwise to |
87 | 70000 for traffic in class "Lowest latency". | 93 | 70000 for traffic in class "Lowest latency". |
88 | 94 | ||
89 | In simplified mode the interrupt rate is based on the ratio of Tx and | 95 | In simplified mode the interrupt rate is based on the ratio of TX and |
90 | Rx traffic. If the bytes per second rate is approximately equal the | 96 | RX traffic. If the bytes per second rate is approximately equal, the |
91 | interrupt rate will drop as low as 2000 interrupts per second. If the | 97 | interrupt rate will drop as low as 2000 interrupts per second. If the |
92 | traffic is mostly transmit or mostly receive, the interrupt rate could | 98 | traffic is mostly transmit or mostly receive, the interrupt rate could |
93 | be as high as 8000. | 99 | be as high as 8000. |
@@ -177,7 +183,7 @@ Copybreak | |||
177 | Valid Range: 0-xxxxxxx (0=off) | 183 | Valid Range: 0-xxxxxxx (0=off) |
178 | Default Value: 256 | 184 | Default Value: 256 |
179 | 185 | ||
180 | Driver copies all packets below or equaling this size to a fresh Rx | 186 | Driver copies all packets below or equaling this size to a fresh RX |
181 | buffer before handing it up the stack. | 187 | buffer before handing it up the stack. |
182 | 188 | ||
183 | This parameter is different than other parameters, in that it is a | 189 | This parameter is different than other parameters, in that it is a |
@@ -223,17 +229,17 @@ loading or enabling the driver, try disabling this feature. | |||
223 | 229 | ||
224 | WriteProtectNVM | 230 | WriteProtectNVM |
225 | --------------- | 231 | --------------- |
226 | Valid Range: 0-1 | 232 | Valid Range: 0,1 |
227 | Default Value: 1 (enabled) | 233 | Default Value: 1 |
228 | 234 | ||
229 | Set the hardware to ignore all write/erase cycles to the GbE region in the | 235 | If set to 1, configure the hardware to ignore all write/erase cycles to the |
230 | ICHx NVM (non-volatile memory). This feature can be disabled by the | 236 | GbE region in the ICHx NVM (in order to prevent accidental corruption of the |
231 | WriteProtectNVM module parameter (enabled by default) only after a hardware | 237 | NVM). This feature can be disabled by setting the parameter to 0 during initial |
232 | reset, but the machine must be power cycled before trying to enable writes. | 238 | driver load. |
233 | 239 | NOTE: The machine must be power cycled (full off/on) when enabling NVM writes | |
234 | Note: the kernel boot option iomem=relaxed may need to be set if the kernel | 240 | via setting the parameter to zero. Once the NVM has been locked (via the |
235 | config option CONFIG_STRICT_DEVMEM=y, if the root user wants to write the | 241 | parameter at 1 when the driver loads) it cannot be unlocked except via power |
236 | NVM from user space via ethtool. | 242 | cycle. |
237 | 243 | ||
238 | Additional Configurations | 244 | Additional Configurations |
239 | ========================= | 245 | ========================= |
@@ -259,32 +265,30 @@ Additional Configurations | |||
259 | - Some adapters limit Jumbo Frames sized packets to a maximum of | 265 | - Some adapters limit Jumbo Frames sized packets to a maximum of |
260 | 4096 bytes and some adapters do not support Jumbo Frames. | 266 | 4096 bytes and some adapters do not support Jumbo Frames. |
261 | 267 | ||
262 | |||
263 | Ethtool | 268 | Ethtool |
264 | ------- | 269 | ------- |
265 | The driver utilizes the ethtool interface for driver configuration and | 270 | The driver utilizes the ethtool interface for driver configuration and |
266 | diagnostics, as well as displaying statistical information. We | 271 | diagnostics, as well as displaying statistical information. We |
267 | strongly recommend downloading the latest version of Ethtool at: | 272 | strongly recommend downloading the latest version of ethtool at: |
268 | 273 | ||
269 | http://sourceforge.net/projects/gkernel. | 274 | http://ftp.kernel.org/pub/software/network/ethtool/ |
270 | 275 | ||
271 | Speed and Duplex | 276 | Speed and Duplex |
272 | ---------------- | 277 | ---------------- |
273 | Speed and Duplex are configured through the Ethtool* utility. For | 278 | Speed and Duplex are configured through the ethtool* utility. For |
274 | instructions, refer to the Ethtool man page. | 279 | instructions, refer to the ethtool man page. |
275 | 280 | ||
276 | Enabling Wake on LAN* (WoL) | 281 | Enabling Wake on LAN* (WoL) |
277 | --------------------------- | 282 | --------------------------- |
278 | WoL is configured through the Ethtool* utility. For instructions on | 283 | WoL is configured through the ethtool* utility. For instructions on |
279 | enabling WoL with Ethtool, refer to the Ethtool man page. | 284 | enabling WoL with ethtool, refer to the ethtool man page. |
280 | 285 | ||
281 | WoL will be enabled on the system during the next shut down or reboot. | 286 | WoL will be enabled on the system during the next shut down or reboot. |
282 | For this driver version, in order to enable WoL, the e1000e driver must be | 287 | For this driver version, in order to enable WoL, the e1000e driver must be |
283 | loaded when shutting down or rebooting the system. | 288 | loaded when shutting down or rebooting the system. |
284 | 289 | ||
285 | In most cases Wake On LAN is only supported on port A for multiple port | 290 | In most cases Wake On LAN is only supported on port A for multiple port |
286 | adapters. To verify if a port supports Wake on LAN run ethtool eth<X>. | 291 | adapters. To verify if a port supports Wake on Lan run ethtool eth<X>. |
287 | |||
288 | 292 | ||
289 | Support | 293 | Support |
290 | ======= | 294 | ======= |
diff --git a/Documentation/networking/igb.txt b/Documentation/networking/igb.txt index ab2d71831892..98953c0d5342 100644 --- a/Documentation/networking/igb.txt +++ b/Documentation/networking/igb.txt | |||
@@ -36,6 +36,7 @@ Default Value: 0 | |||
36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to | 36 | This parameter adds support for SR-IOV. It causes the driver to spawn up to |
37 | max_vfs worth of virtual function. | 37 | max_vfs worth of virtual function. |
38 | 38 | ||
39 | |||
39 | Additional Configurations | 40 | Additional Configurations |
40 | ========================= | 41 | ========================= |
41 | 42 | ||
@@ -60,15 +61,16 @@ Additional Configurations | |||
60 | Ethtool | 61 | Ethtool |
61 | ------- | 62 | ------- |
62 | The driver utilizes the ethtool interface for driver configuration and | 63 | The driver utilizes the ethtool interface for driver configuration and |
63 | diagnostics, as well as displaying statistical information. | 64 | diagnostics, as well as displaying statistical information. The latest |
65 | version of ethtool can be found at: | ||
64 | 66 | ||
65 | http://sourceforge.net/projects/gkernel. | 67 | http://ftp.kernel.org/pub/software/network/ethtool/ |
66 | 68 | ||
67 | Enabling Wake on LAN* (WoL) | 69 | Enabling Wake on LAN* (WoL) |
68 | --------------------------- | 70 | --------------------------- |
69 | WoL is configured through the Ethtool* utility. | 71 | WoL is configured through the ethtool* utility. |
70 | 72 | ||
71 | For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. | 73 | For instructions on enabling WoL with ethtool, refer to the ethtool man page. |
72 | 74 | ||
73 | WoL will be enabled on the system during the next shut down or reboot. | 75 | WoL will be enabled on the system during the next shut down or reboot. |
74 | For this driver version, in order to enable WoL, the igb driver must be | 76 | For this driver version, in order to enable WoL, the igb driver must be |
@@ -91,31 +93,6 @@ Additional Configurations | |||
91 | REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not | 93 | REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not |
92 | found, the system will fallback to MSI or to Legacy interrupts. | 94 | found, the system will fallback to MSI or to Legacy interrupts. |
93 | 95 | ||
94 | LRO | ||
95 | --- | ||
96 | Large Receive Offload (LRO) is a technique for increasing inbound throughput | ||
97 | of high-bandwidth network connections by reducing CPU overhead. It works by | ||
98 | aggregating multiple incoming packets from a single stream into a larger | ||
99 | buffer before they are passed higher up the networking stack, thus reducing | ||
100 | the number of packets that have to be processed. LRO combines multiple | ||
101 | Ethernet frames into a single receive in the stack, thereby potentially | ||
102 | decreasing CPU utilization for receives. | ||
103 | |||
104 | NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or | ||
105 | CONFIG_INET_LRO_MODULE kernel config option. Additionally, if | ||
106 | CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded | ||
107 | before the igb driver. | ||
108 | |||
109 | You can verify that the driver is using LRO by looking at these counters in | ||
110 | Ethtool: | ||
111 | |||
112 | lro_aggregated - count of total packets that were combined | ||
113 | lro_flushed - counts the number of packets flushed out of LRO | ||
114 | lro_no_desc - counts the number of times an LRO descriptor was not available | ||
115 | for the LRO packet | ||
116 | |||
117 | NOTE: IPv6 and UDP are not supported by LRO. | ||
118 | |||
119 | Support | 96 | Support |
120 | ======= | 97 | ======= |
121 | 98 | ||
diff --git a/Documentation/networking/igbvf.txt b/Documentation/networking/igbvf.txt index 056028138d9c..cbfe4ee65533 100644 --- a/Documentation/networking/igbvf.txt +++ b/Documentation/networking/igbvf.txt | |||
@@ -58,9 +58,11 @@ Additional Configurations | |||
58 | Ethtool | 58 | Ethtool |
59 | ------- | 59 | ------- |
60 | The driver utilizes the ethtool interface for driver configuration and | 60 | The driver utilizes the ethtool interface for driver configuration and |
61 | diagnostics, as well as displaying statistical information. | 61 | diagnostics, as well as displaying statistical information. The ethtool |
62 | version 3.0 or later is required for this functionality, although we | ||
63 | strongly recommend downloading the latest version at: | ||
62 | 64 | ||
63 | http://sourceforge.net/projects/gkernel. | 65 | http://ftp.kernel.org/pub/software/network/ethtool/ |
64 | 66 | ||
65 | Support | 67 | Support |
66 | ======= | 68 | ======= |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 3c5e465296e1..d99940dcfc44 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -11,7 +11,9 @@ ip_forward - BOOLEAN | |||
11 | for routers) | 11 | for routers) |
12 | 12 | ||
13 | ip_default_ttl - INTEGER | 13 | ip_default_ttl - INTEGER |
14 | default 64 | 14 | Default value of TTL field (Time To Live) for outgoing (but not |
15 | forwarded) IP packets. Should be between 1 and 255 inclusive. | ||
16 | Default: 64 (as recommended by RFC1700) | ||
15 | 17 | ||
16 | ip_no_pmtu_disc - BOOLEAN | 18 | ip_no_pmtu_disc - BOOLEAN |
17 | Disable Path MTU Discovery. | 19 | Disable Path MTU Discovery. |
@@ -708,10 +710,28 @@ igmp_max_memberships - INTEGER | |||
708 | Change the maximum number of multicast groups we can subscribe to. | 710 | Change the maximum number of multicast groups we can subscribe to. |
709 | Default: 20 | 711 | Default: 20 |
710 | 712 | ||
711 | conf/interface/* changes special settings per interface (where "interface" is | 713 | Theoretical maximum value is bounded by having to send a membership |
712 | the name of your network interface) | 714 | report in a single datagram (i.e. the report can't span multiple |
713 | conf/all/* is special, changes the settings for all interfaces | 715 | datagrams, or risk confusing the switch and leaving groups you don't |
716 | intend to). | ||
714 | 717 | ||
718 | The number of supported groups 'M' is bounded by the number of group | ||
719 | report entries you can fit into a single datagram of 65535 bytes. | ||
720 | |||
721 | M = 65536-sizeof (ip header)/(sizeof(Group record)) | ||
722 | |||
723 | Group records are variable length, with a minimum of 12 bytes. | ||
724 | So net.ipv4.igmp_max_memberships should not be set higher than: | ||
725 | |||
726 | (65536-24) / 12 = 5459 | ||
727 | |||
728 | The value 5459 assumes no IP header options, so in practice | ||
729 | this number may be lower. | ||
730 | |||
731 | conf/interface/* changes special settings per interface (where | ||
732 | "interface" is the name of your network interface) | ||
733 | |||
734 | conf/all/* is special, changes the settings for all interfaces | ||
715 | 735 | ||
716 | log_martians - BOOLEAN | 736 | log_martians - BOOLEAN |
717 | Log packets with impossible addresses to kernel log. | 737 | Log packets with impossible addresses to kernel log. |
diff --git a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt index a0d0ffb5e584..e196f16df313 100644 --- a/Documentation/networking/ixgb.txt +++ b/Documentation/networking/ixgb.txt | |||
@@ -309,15 +309,15 @@ Additional Configurations | |||
309 | Ethtool | 309 | Ethtool |
310 | ------- | 310 | ------- |
311 | The driver utilizes the ethtool interface for driver configuration and | 311 | The driver utilizes the ethtool interface for driver configuration and |
312 | diagnostics, as well as displaying statistical information. Ethtool | 312 | diagnostics, as well as displaying statistical information. The ethtool |
313 | version 1.6 or later is required for this functionality. | 313 | version 1.6 or later is required for this functionality. |
314 | 314 | ||
315 | The latest release of ethtool can be found from | 315 | The latest release of ethtool can be found from |
316 | http://sourceforge.net/projects/gkernel | 316 | http://ftp.kernel.org/pub/software/network/ethtool/ |
317 | 317 | ||
318 | NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support | 318 | NOTE: The ethtool version 1.6 only supports a limited set of ethtool options. |
319 | for a more complete ethtool feature set can be enabled by upgrading | 319 | Support for a more complete ethtool feature set can be enabled by |
320 | to the latest version. | 320 | upgrading to the latest version. |
321 | 321 | ||
322 | 322 | ||
323 | NAPI | 323 | NAPI |
diff --git a/Documentation/networking/ixgbe.txt b/Documentation/networking/ixgbe.txt index eeb68685c788..af77ed3c4172 100644 --- a/Documentation/networking/ixgbe.txt +++ b/Documentation/networking/ixgbe.txt | |||
@@ -1,107 +1,126 @@ | |||
1 | Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection | 1 | Linux Base Driver for 10 Gigabit PCI Express Intel(R) Network Connection |
2 | ======================================================================== | 2 | ======================================================================== |
3 | 3 | ||
4 | March 10, 2009 | 4 | Intel Gigabit Linux driver. |
5 | 5 | Copyright(c) 1999 - 2010 Intel Corporation. | |
6 | 6 | ||
7 | Contents | 7 | Contents |
8 | ======== | 8 | ======== |
9 | 9 | ||
10 | - In This Release | ||
11 | - Identifying Your Adapter | 10 | - Identifying Your Adapter |
12 | - Building and Installation | ||
13 | - Additional Configurations | 11 | - Additional Configurations |
12 | - Performance Tuning | ||
13 | - Known Issues | ||
14 | - Support | 14 | - Support |
15 | 15 | ||
16 | Identifying Your Adapter | ||
17 | ======================== | ||
16 | 18 | ||
19 | The driver in this release is compatible with 82598 and 82599-based Intel | ||
20 | Network Connections. | ||
17 | 21 | ||
18 | In This Release | 22 | For more information on how to identify your adapter, go to the Adapter & |
19 | =============== | 23 | Driver ID Guide at: |
20 | 24 | ||
21 | This file describes the ixgbe Linux Base Driver for the 10 Gigabit PCI | 25 | http://support.intel.com/support/network/sb/CS-012904.htm |
22 | Express Intel(R) Network Connection. This driver includes support for | ||
23 | Itanium(R)2-based systems. | ||
24 | 26 | ||
25 | For questions related to hardware requirements, refer to the documentation | 27 | SFP+ Devices with Pluggable Optics |
26 | supplied with your 10 Gigabit adapter. All hardware requirements listed apply | 28 | ---------------------------------- |
27 | to use with Linux. | ||
28 | 29 | ||
29 | The following features are available in this kernel: | 30 | 82599-BASED ADAPTERS |
30 | - Native VLANs | ||
31 | - Channel Bonding (teaming) | ||
32 | - SNMP | ||
33 | - Generic Receive Offload | ||
34 | - Data Center Bridging | ||
35 | 31 | ||
36 | Channel Bonding documentation can be found in the Linux kernel source: | 32 | NOTES: If your 82599-based Intel(R) Network Adapter came with Intel optics, or |
37 | /Documentation/networking/bonding.txt | 33 | is an Intel(R) Ethernet Server Adapter X520-2, then it only supports Intel |
34 | optics and/or the direct attach cables listed below. | ||
38 | 35 | ||
39 | Ethtool, lspci, and ifconfig can be used to display device and driver | 36 | When 82599-based SFP+ devices are connected back to back, they should be set to |
40 | specific information. | 37 | the same Speed setting via ethtool. Results may vary if you mix speed settings. |
38 | 82598-based adapters support all passive direct attach cables that comply | ||
39 | with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach | ||
40 | cables are not supported. | ||
41 | 41 | ||
42 | Supplier Type Part Numbers | ||
42 | 43 | ||
43 | Identifying Your Adapter | 44 | SR Modules |
44 | ======================== | 45 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT |
46 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDDZ-IN1 | ||
47 | Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 | ||
48 | LR Modules | ||
49 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT | ||
50 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDDZ-IN1 | ||
51 | Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 | ||
45 | 52 | ||
46 | This driver supports devices based on the 82598 controller and the 82599 | 53 | The following is a list of 3rd party SFP+ modules and direct attach cables that |
47 | controller. | 54 | have received some testing. Not all modules are applicable to all devices. |
48 | 55 | ||
49 | For specific information on identifying which adapter you have, please visit: | 56 | Supplier Type Part Numbers |
50 | 57 | ||
51 | http://support.intel.com/support/network/sb/CS-008441.htm | 58 | Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL |
59 | Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ | ||
60 | Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL | ||
52 | 61 | ||
62 | Finisar DUAL RATE 1G/10G SFP+ SR (No Bail) FTLX8571D3QCV-IT | ||
63 | Avago DUAL RATE 1G/10G SFP+ SR (No Bail) AFBR-703SDZ-IN1 | ||
64 | Finisar DUAL RATE 1G/10G SFP+ LR (No Bail) FTLX1471D3QCV-IT | ||
65 | Avago DUAL RATE 1G/10G SFP+ LR (No Bail) AFCT-701SDZ-IN1 | ||
66 | Finistar 1000BASE-T SFP FCLF8522P2BTL | ||
67 | Avago 1000BASE-T SFP ABCU-5710RZ | ||
53 | 68 | ||
54 | Building and Installation | 69 | 82599-based adapters support all passive and active limiting direct attach |
55 | ========================= | 70 | cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. |
56 | 71 | ||
57 | select m for "Intel(R) 10GbE PCI Express adapters support" located at: | 72 | Laser turns off for SFP+ when ifconfig down |
58 | Location: | 73 | ------------------------------------------- |
59 | -> Device Drivers | 74 | "ifconfig down" turns off the laser for 82599-based SFP+ fiber adapters. |
60 | -> Network device support (NETDEVICES [=y]) | 75 | "ifconfig up" turns on the later. |
61 | -> Ethernet (10000 Mbit) (NETDEV_10000 [=y]) | ||
62 | 76 | ||
63 | 1. make modules & make modules_install | ||
64 | 77 | ||
65 | 2. Load the module: | 78 | 82598-BASED ADAPTERS |
66 | 79 | ||
67 | # modprobe ixgbe | 80 | NOTES for 82598-Based Adapters: |
81 | - Intel(R) Network Adapters that support removable optical modules only support | ||
82 | their original module type (i.e., the Intel(R) 10 Gigabit SR Dual Port | ||
83 | Express Module only supports SR optical modules). If you plug in a different | ||
84 | type of module, the driver will not load. | ||
85 | - Hot Swapping/hot plugging optical modules is not supported. | ||
86 | - Only single speed, 10 gigabit modules are supported. | ||
87 | - LAN on Motherboard (LOMs) may support DA, SR, or LR modules. Other module | ||
88 | types are not supported. Please see your system documentation for details. | ||
68 | 89 | ||
69 | The insmod command can be used if the full | 90 | The following is a list of 3rd party SFP+ modules and direct attach cables that |
70 | path to the driver module is specified. For example: | 91 | have received some testing. Not all modules are applicable to all devices. |
71 | 92 | ||
72 | insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/ixgbe/ixgbe.ko | 93 | Supplier Type Part Numbers |
73 | 94 | ||
74 | With 2.6 based kernels also make sure that older ixgbe drivers are | 95 | Finisar SFP+ SR bailed, 10g single rate FTLX8571D3BCL |
75 | removed from the kernel, before loading the new module: | 96 | Avago SFP+ SR bailed, 10g single rate AFBR-700SDZ |
97 | Finisar SFP+ LR bailed, 10g single rate FTLX1471D3BCL | ||
76 | 98 | ||
77 | rmmod ixgbe; modprobe ixgbe | 99 | 82598-based adapters support all passive direct attach cables that comply |
100 | with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. Active direct attach | ||
101 | cables are not supported. | ||
78 | 102 | ||
79 | 3. Assign an IP address to the interface by entering the following, where | ||
80 | x is the interface number: | ||
81 | 103 | ||
82 | ifconfig ethx <IP_address> | 104 | Flow Control |
105 | ------------ | ||
106 | Ethernet Flow Control (IEEE 802.3x) can be configured with ethtool to enable | ||
107 | receiving and transmitting pause frames for ixgbe. When TX is enabled, PAUSE | ||
108 | frames are generated when the receive packet buffer crosses a predefined | ||
109 | threshold. When rx is enabled, the transmit unit will halt for the time delay | ||
110 | specified when a PAUSE frame is received. | ||
83 | 111 | ||
84 | 4. Verify that the interface works. Enter the following, where <IP_address> | 112 | Flow Control is enabled by default. If you want to disable a flow control |
85 | is the IP address for another machine on the same subnet as the interface | 113 | capable link partner, use ethtool: |
86 | that is being tested: | ||
87 | 114 | ||
88 | ping <IP_address> | 115 | ethtool -A eth? autoneg off RX off TX off |
89 | 116 | ||
117 | NOTE: For 82598 backplane cards entering 1 gig mode, flow control default | ||
118 | behavior is changed to off. Flow control in 1 gig mode on these devices can | ||
119 | lead to Tx hangs. | ||
90 | 120 | ||
91 | Additional Configurations | 121 | Additional Configurations |
92 | ========================= | 122 | ========================= |
93 | 123 | ||
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 | 124 | Jumbo Frames |
106 | ------------ | 125 | ------------ |
107 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is | 126 | The driver supports Jumbo Frames for all adapters. Jumbo Frames support is |
@@ -123,13 +142,8 @@ Additional Configurations | |||
123 | other protocols besides TCP. It's also safe to use with configurations that | 142 | other protocols besides TCP. It's also safe to use with configurations that |
124 | are problematic for LRO, namely bridging and iSCSI. | 143 | are problematic for LRO, namely bridging and iSCSI. |
125 | 144 | ||
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 | 145 | Data Center Bridging, aka DCB |
131 | ----------------------------- | 146 | ----------------------------- |
132 | |||
133 | DCB is a configuration Quality of Service implementation in hardware. | 147 | DCB is a configuration Quality of Service implementation in hardware. |
134 | It uses the VLAN priority tag (802.1p) to filter traffic. That means | 148 | 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. | 149 | that there are 8 different priorities that traffic can be filtered into. |
@@ -163,24 +177,71 @@ Additional Configurations | |||
163 | 177 | ||
164 | http://e1000.sf.net | 178 | http://e1000.sf.net |
165 | 179 | ||
166 | |||
167 | Ethtool | 180 | Ethtool |
168 | ------- | 181 | ------- |
169 | The driver utilizes the ethtool interface for driver configuration and | 182 | The driver utilizes the ethtool interface for driver configuration and |
170 | diagnostics, as well as displaying statistical information. Ethtool | 183 | diagnostics, as well as displaying statistical information. The latest |
171 | version 3.0 or later is required for this functionality. | 184 | ethtool version is required for this functionality. |
172 | 185 | ||
173 | The latest release of ethtool can be found from | 186 | The latest release of ethtool can be found from |
174 | http://sourceforge.net/projects/gkernel. | 187 | http://ftp.kernel.org/pub/software/network/ethtool/ |
175 | 188 | ||
176 | 189 | FCoE | |
177 | NAPI | ||
178 | ---- | 190 | ---- |
191 | This release of the ixgbe driver contains new code to enable users to use | ||
192 | Fiber Channel over Ethernet (FCoE) and Data Center Bridging (DCB) | ||
193 | functionality that is supported by the 82598-based hardware. This code has | ||
194 | no default effect on the regular driver operation, and configuring DCB and | ||
195 | FCoE is outside the scope of this driver README. Refer to | ||
196 | http://www.open-fcoe.org/ for FCoE project information and contact | ||
197 | e1000-eedc@lists.sourceforge.net for DCB information. | ||
198 | |||
199 | MAC and VLAN anti-spoofing feature | ||
200 | ---------------------------------- | ||
201 | When a malicious driver attempts to send a spoofed packet, it is dropped by | ||
202 | the hardware and not transmitted. An interrupt is sent to the PF driver | ||
203 | notifying it of the spoof attempt. | ||
204 | |||
205 | When a spoofed packet is detected the PF driver will send the following | ||
206 | message to the system log (displayed by the "dmesg" command): | ||
207 | |||
208 | Spoof event(s) detected on VF (n) | ||
209 | |||
210 | Where n=the VF that attempted to do the spoofing. | ||
211 | |||
212 | |||
213 | Performance Tuning | ||
214 | ================== | ||
215 | |||
216 | An excellent article on performance tuning can be found at: | ||
217 | |||
218 | http://www.redhat.com/promo/summit/2008/downloads/pdf/Thursday/Mark_Wagner.pdf | ||
219 | |||
220 | |||
221 | Known Issues | ||
222 | ============ | ||
223 | |||
224 | Enabling SR-IOV in a 32-bit Microsoft* Windows* Server 2008 Guest OS using | ||
225 | Intel (R) 82576-based GbE or Intel (R) 82599-based 10GbE controller under KVM | ||
226 | ----------------------------------------------------------------------------- | ||
227 | KVM Hypervisor/VMM supports direct assignment of a PCIe device to a VM. This | ||
228 | includes traditional PCIe devices, as well as SR-IOV-capable devices using | ||
229 | Intel 82576-based and 82599-based controllers. | ||
230 | |||
231 | While direct assignment of a PCIe device or an SR-IOV Virtual Function (VF) | ||
232 | to a Linux-based VM running 2.6.32 or later kernel works fine, there is a | ||
233 | known issue with Microsoft Windows Server 2008 VM that results in a "yellow | ||
234 | bang" error. This problem is within the KVM VMM itself, not the Intel driver, | ||
235 | or the SR-IOV logic of the VMM, but rather that KVM emulates an older CPU | ||
236 | model for the guests, and this older CPU model does not support MSI-X | ||
237 | interrupts, which is a requirement for Intel SR-IOV. | ||
179 | 238 | ||
180 | NAPI (Rx polling mode) is supported in the ixgbe driver. NAPI is enabled | 239 | If you wish to use the Intel 82576 or 82599-based controllers in SR-IOV mode |
181 | by default in the driver. | 240 | with KVM and a Microsoft Windows Server 2008 guest try the following |
241 | workaround. The workaround is to tell KVM to emulate a different model of CPU | ||
242 | when using qemu to create the KVM guest: | ||
182 | 243 | ||
183 | See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. | 244 | "-cpu qemu64,model=13" |
184 | 245 | ||
185 | 246 | ||
186 | Support | 247 | Support |
diff --git a/Documentation/networking/ixgbevf.txt b/Documentation/networking/ixgbevf.txt index 21dd5d15b6b4..5a91a41fa946 100644 --- a/Documentation/networking/ixgbevf.txt +++ b/Documentation/networking/ixgbevf.txt | |||
@@ -35,10 +35,6 @@ Driver ID Guide at: | |||
35 | Known Issues/Troubleshooting | 35 | Known Issues/Troubleshooting |
36 | ============================ | 36 | ============================ |
37 | 37 | ||
38 | Unloading Physical Function (PF) Driver Causes System Reboots When VM is | ||
39 | Running and VF is Loaded on the VM | ||
40 | ------------------------------------------------------------------------ | ||
41 | Do not unload the PF driver (ixgbe) while VFs are assigned to guests. | ||
42 | 38 | ||
43 | Support | 39 | Support |
44 | ======= | 40 | ======= |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index 7ee770b5ef5f..80a7a3454902 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -7,7 +7,7 @@ This is the driver for the MAC 10/100/1000 on-chip Ethernet controllers | |||
7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. | 7 | (Synopsys IP blocks); it has been fully tested on STLinux platforms. |
8 | 8 | ||
9 | Currently this network device driver is for all STM embedded MAC/GMAC | 9 | Currently this network device driver is for all STM embedded MAC/GMAC |
10 | (7xxx SoCs). | 10 | (7xxx SoCs). Other platforms start using it i.e. ARM SPEAr. |
11 | 11 | ||
12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 | 12 | DWC Ether MAC 10/100/1000 Universal version 3.41a and DWC Ether MAC 10/100 |
13 | Universal version 4.0 have been used for developing the first code | 13 | Universal version 4.0 have been used for developing the first code |
@@ -95,9 +95,14 @@ Several information came from the platform; please refer to the | |||
95 | driver's Header file in include/linux directory. | 95 | driver's Header file in include/linux directory. |
96 | 96 | ||
97 | struct plat_stmmacenet_data { | 97 | struct plat_stmmacenet_data { |
98 | int bus_id; | 98 | int bus_id; |
99 | int pbl; | 99 | int pbl; |
100 | int has_gmac; | 100 | int clk_csr; |
101 | int has_gmac; | ||
102 | int enh_desc; | ||
103 | int tx_coe; | ||
104 | int bugged_jumbo; | ||
105 | int pmt; | ||
101 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 106 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
102 | void (*bus_setup)(unsigned long ioaddr); | 107 | void (*bus_setup)(unsigned long ioaddr); |
103 | #ifdef CONFIG_STM_DRIVERS | 108 | #ifdef CONFIG_STM_DRIVERS |
@@ -114,6 +119,12 @@ Where: | |||
114 | registers (on STM platforms); | 119 | registers (on STM platforms); |
115 | - has_gmac: GMAC core is on board (get it at run-time in the next step); | 120 | - has_gmac: GMAC core is on board (get it at run-time in the next step); |
116 | - bus_id: bus identifier. | 121 | - bus_id: bus identifier. |
122 | - tx_coe: core is able to perform the tx csum in HW. | ||
123 | - enh_desc: if sets the MAC will use the enhanced descriptor structure. | ||
124 | - clk_csr: CSR Clock range selection. | ||
125 | - bugged_jumbo: some HWs are not able to perform the csum in HW for | ||
126 | over-sized frames due to limited buffer sizes. Setting this | ||
127 | flag the csum will be done in SW on JUMBO frames. | ||
117 | 128 | ||
118 | struct plat_stmmacphy_data { | 129 | struct plat_stmmacphy_data { |
119 | int bus_id; | 130 | int bus_id; |
@@ -131,13 +142,28 @@ Where: | |||
131 | - interface: physical MII interface mode; | 142 | - interface: physical MII interface mode; |
132 | - phy_reset: hook to reset HW function. | 143 | - phy_reset: hook to reset HW function. |
133 | 144 | ||
145 | SOURCES: | ||
146 | - Kconfig | ||
147 | - Makefile | ||
148 | - stmmac_main.c: main network device driver; | ||
149 | - stmmac_mdio.c: mdio functions; | ||
150 | - stmmac_ethtool.c: ethtool support; | ||
151 | - stmmac_timer.[ch]: timer code used for mitigating the driver dma interrupts | ||
152 | Only tested on ST40 platforms based. | ||
153 | - stmmac.h: private driver structure; | ||
154 | - common.h: common definitions and VFTs; | ||
155 | - descs.h: descriptor structure definitions; | ||
156 | - dwmac1000_core.c: GMAC core functions; | ||
157 | - dwmac1000_dma.c: dma functions for the GMAC chip; | ||
158 | - dwmac1000.h: specific header file for the GMAC; | ||
159 | - dwmac100_core: MAC 100 core and dma code; | ||
160 | - dwmac100_dma.c: dma funtions for the MAC chip; | ||
161 | - dwmac1000.h: specific header file for the MAC; | ||
162 | - dwmac_lib.c: generic DMA functions shared among chips | ||
163 | - enh_desc.c: functions for handling enhanced descriptors | ||
164 | - norm_desc.c: functions for handling normal descriptors | ||
165 | |||
134 | TODO: | 166 | TODO: |
135 | - Continue to make the driver more generic and suitable for other Synopsys | 167 | - XGMAC controller is not supported. |
136 | Ethernet controllers used on other architectures (i.e. ARM). | ||
137 | - 10G controllers are not supported. | ||
138 | - MAC uses Normal descriptors and GMAC uses enhanced ones. | ||
139 | This is a limit that should be reviewed. MAC could want to | ||
140 | use the enhanced structure. | ||
141 | - Checksumming: Rx/Tx csum is done in HW in case of GMAC only. | ||
142 | - Review the timer optimisation code to use an embedded device that seems to be | 168 | - Review the timer optimisation code to use an embedded device that seems to be |
143 | available in new chip generations. | 169 | available in new chip generations. |
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 00301ed9c371..b64d10d221ec 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,25 @@ | |||
1 | Release Date : Tues. Dec 14, 2010 17:00:00 PST 2010 - | ||
2 | (emaild-id:megaraidlinux@lsi.com) | ||
3 | Adam Radford | ||
4 | Current Version : 00.00.05.29-rc1 | ||
5 | Old Version : 00.00.04.31-rc1 | ||
6 | 1. Rename megaraid_sas.c to megaraid_sas_base.c. | ||
7 | 2. Update GPL headers. | ||
8 | 3. Add MSI-X support and 'msix_disable' module parameter. | ||
9 | 4. Use lowest memory bar (for SR-IOV VF support). | ||
10 | 5. Add struct megasas_instance_temlate changes, and change all code to use | ||
11 | new instance entries: | ||
12 | |||
13 | irqreturn_t (*service_isr )(int irq, void *devp); | ||
14 | void (*tasklet)(unsigned long); | ||
15 | u32 (*init_adapter)(struct megasas_instance *); | ||
16 | u32 (*build_and_issue_cmd) (struct megasas_instance *, | ||
17 | struct scsi_cmnd *); | ||
18 | void (*issue_dcmd) (struct megasas_instance *instance, | ||
19 | struct megasas_cmd *cmd); | ||
20 | |||
21 | 6. Add code to support MegaRAID 9265/9285 controllers device id (0x5b). | ||
22 | ------------------------------------------------------------------------------- | ||
1 | 1 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 - | 23 | 1 Release Date : Thur. May 03, 2010 09:12:45 PST 2009 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 24 | (emaild-id:megaraidlinux@lsi.com) |
3 | Bo Yang | 25 | Bo Yang |
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index 570ef2b3d79b..df322c103466 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt | |||
@@ -1044,9 +1044,9 @@ Details: | |||
1044 | 1044 | ||
1045 | 1045 | ||
1046 | /** | 1046 | /** |
1047 | * queuecommand - queue scsi command, invoke 'done' on completion | 1047 | * queuecommand - queue scsi command, invoke scp->scsi_done on completion |
1048 | * @shost: pointer to the scsi host object | ||
1048 | * @scp: pointer to scsi command object | 1049 | * @scp: pointer to scsi command object |
1049 | * @done: function pointer to be invoked on completion | ||
1050 | * | 1050 | * |
1051 | * Returns 0 on success. | 1051 | * Returns 0 on success. |
1052 | * | 1052 | * |
@@ -1074,42 +1074,45 @@ Details: | |||
1074 | * | 1074 | * |
1075 | * Other types of errors that are detected immediately may be | 1075 | * Other types of errors that are detected immediately may be |
1076 | * flagged by setting scp->result to an appropriate value, | 1076 | * flagged by setting scp->result to an appropriate value, |
1077 | * invoking the 'done' callback, and then returning 0 from this | 1077 | * invoking the scp->scsi_done callback, and then returning 0 |
1078 | * function. If the command is not performed immediately (and the | 1078 | * from this function. If the command is not performed |
1079 | * LLD is starting (or will start) the given command) then this | 1079 | * immediately (and the LLD is starting (or will start) the given |
1080 | * function should place 0 in scp->result and return 0. | 1080 | * command) then this function should place 0 in scp->result and |
1081 | * return 0. | ||
1081 | * | 1082 | * |
1082 | * Command ownership. If the driver returns zero, it owns the | 1083 | * Command ownership. If the driver returns zero, it owns the |
1083 | * command and must take responsibility for ensuring the 'done' | 1084 | * command and must take responsibility for ensuring the |
1084 | * callback is executed. Note: the driver may call done before | 1085 | * scp->scsi_done callback is executed. Note: the driver may |
1085 | * returning zero, but after it has called done, it may not | 1086 | * call scp->scsi_done before returning zero, but after it has |
1086 | * return any value other than zero. If the driver makes a | 1087 | * called scp->scsi_done, it may not return any value other than |
1087 | * non-zero return, it must not execute the command's done | 1088 | * zero. If the driver makes a non-zero return, it must not |
1088 | * callback at any time. | 1089 | * execute the command's scsi_done callback at any time. |
1089 | * | 1090 | * |
1090 | * Locks: struct Scsi_Host::host_lock held on entry (with "irqsave") | 1091 | * Locks: up to and including 2.6.36, struct Scsi_Host::host_lock |
1091 | * and is expected to be held on return. | 1092 | * held on entry (with "irqsave") and is expected to be |
1093 | * held on return. From 2.6.37 onwards, queuecommand is | ||
1094 | * called without any locks held. | ||
1092 | * | 1095 | * |
1093 | * Calling context: in interrupt (soft irq) or process context | 1096 | * Calling context: in interrupt (soft irq) or process context |
1094 | * | 1097 | * |
1095 | * Notes: This function should be relatively fast. Normally it will | 1098 | * Notes: This function should be relatively fast. Normally it |
1096 | * not wait for IO to complete. Hence the 'done' callback is invoked | 1099 | * will not wait for IO to complete. Hence the scp->scsi_done |
1097 | * (often directly from an interrupt service routine) some time after | 1100 | * callback is invoked (often directly from an interrupt service |
1098 | * this function has returned. In some cases (e.g. pseudo adapter | 1101 | * routine) some time after this function has returned. In some |
1099 | * drivers that manufacture the response to a SCSI INQUIRY) | 1102 | * cases (e.g. pseudo adapter drivers that manufacture the |
1100 | * the 'done' callback may be invoked before this function returns. | 1103 | * response to a SCSI INQUIRY) the scp->scsi_done callback may be |
1101 | * If the 'done' callback is not invoked within a certain period | 1104 | * invoked before this function returns. If the scp->scsi_done |
1102 | * the SCSI mid level will commence error processing. | 1105 | * callback is not invoked within a certain period the SCSI mid |
1103 | * If a status of CHECK CONDITION is placed in "result" when the | 1106 | * level will commence error processing. If a status of CHECK |
1104 | * 'done' callback is invoked, then the LLD driver should | 1107 | * CONDITION is placed in "result" when the scp->scsi_done |
1105 | * perform autosense and fill in the struct scsi_cmnd::sense_buffer | 1108 | * callback is invoked, then the LLD driver should perform |
1109 | * autosense and fill in the struct scsi_cmnd::sense_buffer | ||
1106 | * array. The scsi_cmnd::sense_buffer array is zeroed prior to | 1110 | * array. The scsi_cmnd::sense_buffer array is zeroed prior to |
1107 | * the mid level queuing a command to an LLD. | 1111 | * the mid level queuing a command to an LLD. |
1108 | * | 1112 | * |
1109 | * Defined in: LLD | 1113 | * Defined in: LLD |
1110 | **/ | 1114 | **/ |
1111 | int queuecommand(struct scsi_cmnd * scp, | 1115 | int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp) |
1112 | void (*done)(struct scsi_cmnd *)) | ||
1113 | 1116 | ||
1114 | 1117 | ||
1115 | /** | 1118 | /** |
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX index 07dcdb0d2a36..e09468ad3cb1 100644 --- a/Documentation/serial/00-INDEX +++ b/Documentation/serial/00-INDEX | |||
@@ -14,6 +14,8 @@ riscom8.txt | |||
14 | - notes on using the RISCom/8 multi-port serial driver. | 14 | - notes on using the RISCom/8 multi-port serial driver. |
15 | rocket.txt | 15 | rocket.txt |
16 | - info on the Comtrol RocketPort multiport serial driver. | 16 | - info on the Comtrol RocketPort multiport serial driver. |
17 | serial-rs485.txt | ||
18 | - info about RS485 structures and support in the kernel. | ||
17 | specialix.txt | 19 | specialix.txt |
18 | - info on hardware/driver for specialix IO8+ multiport serial card. | 20 | - info on hardware/driver for specialix IO8+ multiport serial card. |
19 | stallion.txt | 21 | stallion.txt |
diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt new file mode 100644 index 000000000000..a4932387bbfb --- /dev/null +++ b/Documentation/serial/serial-rs485.txt | |||
@@ -0,0 +1,120 @@ | |||
1 | RS485 SERIAL COMMUNICATIONS | ||
2 | |||
3 | 1. INTRODUCTION | ||
4 | |||
5 | EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the | ||
6 | electrical characteristics of drivers and receivers for use in balanced | ||
7 | digital multipoint systems. | ||
8 | This standard is widely used for communications in industrial automation | ||
9 | because it can be used effectively over long distances and in electrically | ||
10 | noisy environments. | ||
11 | |||
12 | 2. HARDWARE-RELATED CONSIDERATIONS | ||
13 | |||
14 | Some CPUs/UARTs (e.g., Atmel AT91 or 16C950 UART) contain a built-in | ||
15 | half-duplex mode capable of automatically controlling line direction by | ||
16 | toggling RTS or DTR signals. That can be used to control external | ||
17 | half-duplex hardware like an RS485 transceiver or any RS232-connected | ||
18 | half-duplex devices like some modems. | ||
19 | |||
20 | For these microcontrollers, the Linux driver should be made capable of | ||
21 | working in both modes, and proper ioctls (see later) should be made | ||
22 | available at user-level to allow switching from one mode to the other, and | ||
23 | vice versa. | ||
24 | |||
25 | 3. DATA STRUCTURES ALREADY AVAILABLE IN THE KERNEL | ||
26 | |||
27 | The Linux kernel provides the serial_rs485 structure (see [1]) to handle | ||
28 | RS485 communications. This data structure is used to set and configure RS485 | ||
29 | parameters in the platform data and in ioctls. | ||
30 | |||
31 | Any driver for devices capable of working both as RS232 and RS485 should | ||
32 | provide at least the following ioctls: | ||
33 | |||
34 | - TIOCSRS485 (typically associated with number 0x542F). This ioctl is used | ||
35 | to enable/disable RS485 mode from user-space | ||
36 | |||
37 | - TIOCGRS485 (typically associated with number 0x542E). This ioctl is used | ||
38 | to get RS485 mode from kernel-space (i.e., driver) to user-space. | ||
39 | |||
40 | In other words, the serial driver should contain a code similar to the next | ||
41 | one: | ||
42 | |||
43 | static struct uart_ops atmel_pops = { | ||
44 | /* ... */ | ||
45 | .ioctl = handle_ioctl, | ||
46 | }; | ||
47 | |||
48 | static int handle_ioctl(struct uart_port *port, | ||
49 | unsigned int cmd, | ||
50 | unsigned long arg) | ||
51 | { | ||
52 | struct serial_rs485 rs485conf; | ||
53 | |||
54 | switch (cmd) { | ||
55 | case TIOCSRS485: | ||
56 | if (copy_from_user(&rs485conf, | ||
57 | (struct serial_rs485 *) arg, | ||
58 | sizeof(rs485conf))) | ||
59 | return -EFAULT; | ||
60 | |||
61 | /* ... */ | ||
62 | break; | ||
63 | |||
64 | case TIOCGRS485: | ||
65 | if (copy_to_user((struct serial_rs485 *) arg, | ||
66 | ..., | ||
67 | sizeof(rs485conf))) | ||
68 | return -EFAULT; | ||
69 | /* ... */ | ||
70 | break; | ||
71 | |||
72 | /* ... */ | ||
73 | } | ||
74 | } | ||
75 | |||
76 | |||
77 | 4. USAGE FROM USER-LEVEL | ||
78 | |||
79 | From user-level, RS485 configuration can be get/set using the previous | ||
80 | ioctls. For instance, to set RS485 you can use the following code: | ||
81 | |||
82 | #include <linux/serial.h> | ||
83 | |||
84 | /* Driver-specific ioctls: */ | ||
85 | #define TIOCGRS485 0x542E | ||
86 | #define TIOCSRS485 0x542F | ||
87 | |||
88 | /* Open your specific device (e.g., /dev/mydevice): */ | ||
89 | int fd = open ("/dev/mydevice", O_RDWR); | ||
90 | if (fd < 0) { | ||
91 | /* Error handling. See errno. */ | ||
92 | } | ||
93 | |||
94 | struct serial_rs485 rs485conf; | ||
95 | |||
96 | /* Set RS485 mode: */ | ||
97 | rs485conf.flags |= SER_RS485_ENABLED; | ||
98 | |||
99 | /* Set rts delay before send, if needed: */ | ||
100 | rs485conf.flags |= SER_RS485_RTS_BEFORE_SEND; | ||
101 | rs485conf.delay_rts_before_send = ...; | ||
102 | |||
103 | /* Set rts delay after send, if needed: */ | ||
104 | rs485conf.flags |= SER_RS485_RTS_AFTER_SEND; | ||
105 | rs485conf.delay_rts_after_send = ...; | ||
106 | |||
107 | if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) { | ||
108 | /* Error handling. See errno. */ | ||
109 | } | ||
110 | |||
111 | /* Use read() and write() syscalls here... */ | ||
112 | |||
113 | /* Close the device when finished: */ | ||
114 | if (close (fd) < 0) { | ||
115 | /* Error handling. See errno. */ | ||
116 | } | ||
117 | |||
118 | 5. REFERENCES | ||
119 | |||
120 | [1] include/linux/serial.h | ||
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt new file mode 100644 index 000000000000..96d87b67fe37 --- /dev/null +++ b/Documentation/trace/events-power.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | |||
2 | Subsystem Trace Points: power | ||
3 | |||
4 | The power tracing system captures events related to power transitions | ||
5 | within the kernel. Broadly speaking there are three major subheadings: | ||
6 | |||
7 | o Power state switch which reports events related to suspend (S-states), | ||
8 | cpuidle (C-states) and cpufreq (P-states) | ||
9 | o System clock related changes | ||
10 | o Power domains related changes and transitions | ||
11 | |||
12 | This document describes what each of the tracepoints is and why they | ||
13 | might be useful. | ||
14 | |||
15 | Cf. include/trace/events/power.h for the events definitions. | ||
16 | |||
17 | 1. Power state switch events | ||
18 | ============================ | ||
19 | |||
20 | 1.1 New trace API | ||
21 | ----------------- | ||
22 | |||
23 | A 'cpu' event class gathers the CPU-related events: cpuidle and | ||
24 | cpufreq. | ||
25 | |||
26 | cpu_idle "state=%lu cpu_id=%lu" | ||
27 | cpu_frequency "state=%lu cpu_id=%lu" | ||
28 | |||
29 | A suspend event is used to indicate the system going in and out of the | ||
30 | suspend mode: | ||
31 | |||
32 | machine_suspend "state=%lu" | ||
33 | |||
34 | |||
35 | Note: the value of '-1' or '4294967295' for state means an exit from the current state, | ||
36 | i.e. trace_cpu_idle(4, smp_processor_id()) means that the system | ||
37 | enters the idle state 4, while trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()) | ||
38 | means that the system exits the previous idle state. | ||
39 | |||
40 | The event which has 'state=4294967295' in the trace is very important to the user | ||
41 | space tools which are using it to detect the end of the current state, and so to | ||
42 | correctly draw the states diagrams and to calculate accurate statistics etc. | ||
43 | |||
44 | 1.2 DEPRECATED trace API | ||
45 | ------------------------ | ||
46 | |||
47 | A new Kconfig option CONFIG_EVENT_POWER_TRACING_DEPRECATED with the default value of | ||
48 | 'y' has been created. This allows the legacy trace power API to be used conjointly | ||
49 | with the new trace API. | ||
50 | The Kconfig option, the old trace API (in include/trace/events/power.h) and the | ||
51 | old trace points will disappear in a future release (namely 2.6.41). | ||
52 | |||
53 | power_start "type=%lu state=%lu cpu_id=%lu" | ||
54 | power_frequency "type=%lu state=%lu cpu_id=%lu" | ||
55 | power_end "cpu_id=%lu" | ||
56 | |||
57 | The 'type' parameter takes one of those macros: | ||
58 | . POWER_NONE = 0, | ||
59 | . POWER_CSTATE = 1, /* C-State */ | ||
60 | . POWER_PSTATE = 2, /* Fequency change or DVFS */ | ||
61 | |||
62 | The 'state' parameter is set depending on the type: | ||
63 | . Target C-state for type=POWER_CSTATE, | ||
64 | . Target frequency for type=POWER_PSTATE, | ||
65 | |||
66 | power_end is used to indicate the exit of a state, corresponding to the latest | ||
67 | power_start event. | ||
68 | |||
69 | 2. Clocks events | ||
70 | ================ | ||
71 | The clock events are used for clock enable/disable and for | ||
72 | clock rate change. | ||
73 | |||
74 | clock_enable "%s state=%lu cpu_id=%lu" | ||
75 | clock_disable "%s state=%lu cpu_id=%lu" | ||
76 | clock_set_rate "%s state=%lu cpu_id=%lu" | ||
77 | |||
78 | The first parameter gives the clock name (e.g. "gpio1_iclk"). | ||
79 | The second parameter is '1' for enable, '0' for disable, the target | ||
80 | clock rate for set_rate. | ||
81 | |||
82 | 3. Power domains events | ||
83 | ======================= | ||
84 | The power domain events are used for power domains transitions | ||
85 | |||
86 | power_domain_target "%s state=%lu cpu_id=%lu" | ||
87 | |||
88 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). | ||
89 | The second parameter is the power domain target state. | ||
90 | |||
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl index b3e73ddb1567..12cecc83cd91 100644 --- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl +++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl | |||
@@ -373,9 +373,18 @@ EVENT_PROCESS: | |||
373 | print " $regex_lru_isolate/o\n"; | 373 | print " $regex_lru_isolate/o\n"; |
374 | next; | 374 | next; |
375 | } | 375 | } |
376 | my $isolate_mode = $1; | ||
376 | my $nr_scanned = $4; | 377 | my $nr_scanned = $4; |
377 | my $nr_contig_dirty = $7; | 378 | my $nr_contig_dirty = $7; |
378 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | 379 | |
380 | # To closer match vmstat scanning statistics, only count isolate_both | ||
381 | # and isolate_inactive as scanning. isolate_active is rotation | ||
382 | # isolate_inactive == 0 | ||
383 | # isolate_active == 1 | ||
384 | # isolate_both == 2 | ||
385 | if ($isolate_mode != 1) { | ||
386 | $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; | ||
387 | } | ||
379 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; | 388 | $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; |
380 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { | 389 | } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { |
381 | $details = $5; | 390 | $details = $5; |
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index b29d8e56cf28..c9ffa9ced7ee 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Alan Stern <stern@rowland.harvard.edu> | 3 | Alan Stern <stern@rowland.harvard.edu> |
4 | 4 | ||
5 | December 11, 2009 | 5 | October 28, 2010 |
6 | 6 | ||
7 | 7 | ||
8 | 8 | ||
@@ -107,9 +107,14 @@ allowed to issue dynamic suspends. | |||
107 | The user interface for controlling dynamic PM is located in the power/ | 107 | The user interface for controlling dynamic PM is located in the power/ |
108 | subdirectory of each USB device's sysfs directory, that is, in | 108 | subdirectory of each USB device's sysfs directory, that is, in |
109 | /sys/bus/usb/devices/.../power/ where "..." is the device's ID. The | 109 | /sys/bus/usb/devices/.../power/ where "..." is the device's ID. The |
110 | relevant attribute files are: wakeup, control, and autosuspend. | 110 | relevant attribute files are: wakeup, control, and |
111 | (There may also be a file named "level"; this file was deprecated | 111 | autosuspend_delay_ms. (There may also be a file named "level"; this |
112 | as of the 2.6.35 kernel and replaced by the "control" file.) | 112 | file was deprecated as of the 2.6.35 kernel and replaced by the |
113 | "control" file. In 2.6.38 the "autosuspend" file will be deprecated | ||
114 | and replaced by the "autosuspend_delay_ms" file. The only difference | ||
115 | is that the newer file expresses the delay in milliseconds whereas the | ||
116 | older file uses seconds. Confusingly, both files are present in 2.6.37 | ||
117 | but only "autosuspend" works.) | ||
113 | 118 | ||
114 | power/wakeup | 119 | power/wakeup |
115 | 120 | ||
@@ -140,33 +145,36 @@ as of the 2.6.35 kernel and replaced by the "control" file.) | |||
140 | suspended and autoresume was not allowed. This | 145 | suspended and autoresume was not allowed. This |
141 | setting is no longer supported.) | 146 | setting is no longer supported.) |
142 | 147 | ||
143 | power/autosuspend | 148 | power/autosuspend_delay_ms |
144 | 149 | ||
145 | This file contains an integer value, which is the | 150 | This file contains an integer value, which is the |
146 | number of seconds the device should remain idle before | 151 | number of milliseconds the device should remain idle |
147 | the kernel will autosuspend it (the idle-delay time). | 152 | before the kernel will autosuspend it (the idle-delay |
148 | The default is 2. 0 means to autosuspend as soon as | 153 | time). The default is 2000. 0 means to autosuspend |
149 | the device becomes idle, and negative values mean | 154 | as soon as the device becomes idle, and negative |
150 | never to autosuspend. You can write a number to the | 155 | values mean never to autosuspend. You can write a |
151 | file to change the autosuspend idle-delay time. | 156 | number to the file to change the autosuspend |
152 | 157 | idle-delay time. | |
153 | Writing "-1" to power/autosuspend and writing "on" to power/control do | 158 | |
154 | essentially the same thing -- they both prevent the device from being | 159 | Writing "-1" to power/autosuspend_delay_ms and writing "on" to |
155 | autosuspended. Yes, this is a redundancy in the API. | 160 | power/control do essentially the same thing -- they both prevent the |
161 | device from being autosuspended. Yes, this is a redundancy in the | ||
162 | API. | ||
156 | 163 | ||
157 | (In 2.6.21 writing "0" to power/autosuspend would prevent the device | 164 | (In 2.6.21 writing "0" to power/autosuspend would prevent the device |
158 | from being autosuspended; the behavior was changed in 2.6.22. The | 165 | from being autosuspended; the behavior was changed in 2.6.22. The |
159 | power/autosuspend attribute did not exist prior to 2.6.21, and the | 166 | power/autosuspend attribute did not exist prior to 2.6.21, and the |
160 | power/level attribute did not exist prior to 2.6.22. power/control | 167 | power/level attribute did not exist prior to 2.6.22. power/control |
161 | was added in 2.6.34.) | 168 | was added in 2.6.34, and power/autosuspend_delay_ms was added in |
169 | 2.6.37 but did not become functional until 2.6.38.) | ||
162 | 170 | ||
163 | 171 | ||
164 | Changing the default idle-delay time | 172 | Changing the default idle-delay time |
165 | ------------------------------------ | 173 | ------------------------------------ |
166 | 174 | ||
167 | The default autosuspend idle-delay time is controlled by a module | 175 | The default autosuspend idle-delay time (in seconds) is controlled by |
168 | parameter in usbcore. You can specify the value when usbcore is | 176 | a module parameter in usbcore. You can specify the value when usbcore |
169 | loaded. For example, to set it to 5 seconds instead of 2 you would | 177 | is loaded. For example, to set it to 5 seconds instead of 2 you would |
170 | do: | 178 | do: |
171 | 179 | ||
172 | modprobe usbcore autosuspend=5 | 180 | modprobe usbcore autosuspend=5 |
@@ -234,25 +242,23 @@ every device. | |||
234 | 242 | ||
235 | If a driver knows that its device has proper suspend/resume support, | 243 | If a driver knows that its device has proper suspend/resume support, |
236 | it can enable autosuspend all by itself. For example, the video | 244 | it can enable autosuspend all by itself. For example, the video |
237 | driver for a laptop's webcam might do this, since these devices are | 245 | driver for a laptop's webcam might do this (in recent kernels they |
238 | rarely used and so should normally be autosuspended. | 246 | do), since these devices are rarely used and so should normally be |
247 | autosuspended. | ||
239 | 248 | ||
240 | Sometimes it turns out that even when a device does work okay with | 249 | Sometimes it turns out that even when a device does work okay with |
241 | autosuspend there are still problems. For example, there are | 250 | autosuspend there are still problems. For example, the usbhid driver, |
242 | experimental patches adding autosuspend support to the usbhid driver, | 251 | which manages keyboards and mice, has autosuspend support. Tests with |
243 | which manages keyboards and mice, among other things. Tests with a | 252 | a number of keyboards show that typing on a suspended keyboard, while |
244 | number of keyboards showed that typing on a suspended keyboard, while | 253 | causing the keyboard to do a remote wakeup all right, will nonetheless |
245 | causing the keyboard to do a remote wakeup all right, would | 254 | frequently result in lost keystrokes. Tests with mice show that some |
246 | nonetheless frequently result in lost keystrokes. Tests with mice | 255 | of them will issue a remote-wakeup request in response to button |
247 | showed that some of them would issue a remote-wakeup request in | 256 | presses but not to motion, and some in response to neither. |
248 | response to button presses but not to motion, and some in response to | ||
249 | neither. | ||
250 | 257 | ||
251 | The kernel will not prevent you from enabling autosuspend on devices | 258 | The kernel will not prevent you from enabling autosuspend on devices |
252 | that can't handle it. It is even possible in theory to damage a | 259 | that can't handle it. It is even possible in theory to damage a |
253 | device by suspending it at the wrong time -- for example, suspending a | 260 | device by suspending it at the wrong time. (Highly unlikely, but |
254 | USB hard disk might cause it to spin down without parking the heads. | 261 | possible.) Take care. |
255 | (Highly unlikely, but possible.) Take care. | ||
256 | 262 | ||
257 | 263 | ||
258 | The driver interface for Power Management | 264 | The driver interface for Power Management |
@@ -336,10 +342,6 @@ autosuspend the interface's device. When the usage counter is = 0 | |||
336 | then the interface is considered to be idle, and the kernel may | 342 | then the interface is considered to be idle, and the kernel may |
337 | autosuspend the device. | 343 | autosuspend the device. |
338 | 344 | ||
339 | (There is a similar usage counter field in struct usb_device, | ||
340 | associated with the device itself rather than any of its interfaces. | ||
341 | This counter is used only by the USB core.) | ||
342 | |||
343 | Drivers need not be concerned about balancing changes to the usage | 345 | Drivers need not be concerned about balancing changes to the usage |
344 | counter; the USB core will undo any remaining "get"s when a driver | 346 | counter; the USB core will undo any remaining "get"s when a driver |
345 | is unbound from its interface. As a corollary, drivers must not call | 347 | is unbound from its interface. As a corollary, drivers must not call |
@@ -409,11 +411,11 @@ during autosuspend. For example, there's not much point | |||
409 | autosuspending a keyboard if the user can't cause the keyboard to do a | 411 | autosuspending a keyboard if the user can't cause the keyboard to do a |
410 | remote wakeup by typing on it. If the driver sets | 412 | remote wakeup by typing on it. If the driver sets |
411 | intf->needs_remote_wakeup to 1, the kernel won't autosuspend the | 413 | intf->needs_remote_wakeup to 1, the kernel won't autosuspend the |
412 | device if remote wakeup isn't available or has been disabled through | 414 | device if remote wakeup isn't available. (If the device is already |
413 | the power/wakeup attribute. (If the device is already autosuspended, | 415 | autosuspended, though, setting this flag won't cause the kernel to |
414 | though, setting this flag won't cause the kernel to autoresume it. | 416 | autoresume it. Normally a driver would set this flag in its probe |
415 | Normally a driver would set this flag in its probe method, at which | 417 | method, at which time the device is guaranteed not to be |
416 | time the device is guaranteed not to be autosuspended.) | 418 | autosuspended.) |
417 | 419 | ||
418 | If a driver does its I/O asynchronously in interrupt context, it | 420 | If a driver does its I/O asynchronously in interrupt context, it |
419 | should call usb_autopm_get_interface_async() before starting output and | 421 | should call usb_autopm_get_interface_async() before starting output and |
@@ -422,20 +424,19 @@ it receives an input event, it should call | |||
422 | 424 | ||
423 | usb_mark_last_busy(struct usb_device *udev); | 425 | usb_mark_last_busy(struct usb_device *udev); |
424 | 426 | ||
425 | in the event handler. This sets udev->last_busy to the current time. | 427 | in the event handler. This tells the PM core that the device was just |
426 | udev->last_busy is the field used for idle-delay calculations; | 428 | busy and therefore the next autosuspend idle-delay expiration should |
427 | updating it will cause any pending autosuspend to be moved back. Most | 429 | be pushed back. Many of the usb_autopm_* routines also make this call, |
428 | of the usb_autopm_* routines will also set the last_busy field to the | 430 | so drivers need to worry only when interrupt-driven input arrives. |
429 | current time. | ||
430 | 431 | ||
431 | Asynchronous operation is always subject to races. For example, a | 432 | Asynchronous operation is always subject to races. For example, a |
432 | driver may call one of the usb_autopm_*_interface_async() routines at | 433 | driver may call the usb_autopm_get_interface_async() routine at a time |
433 | a time when the core has just finished deciding the device has been | 434 | when the core has just finished deciding the device has been idle for |
434 | idle for long enough but not yet gotten around to calling the driver's | 435 | long enough but not yet gotten around to calling the driver's suspend |
435 | suspend method. The suspend method must be responsible for | 436 | method. The suspend method must be responsible for synchronizing with |
436 | synchronizing with the output request routine and the URB completion | 437 | the I/O request routine and the URB completion handler; it should |
437 | handler; it should cause autosuspends to fail with -EBUSY if the | 438 | cause autosuspends to fail with -EBUSY if the driver needs to use the |
438 | driver needs to use the device. | 439 | device. |
439 | 440 | ||
440 | External suspend calls should never be allowed to fail in this way, | 441 | External suspend calls should never be allowed to fail in this way, |
441 | only autosuspend calls. The driver can tell them apart by checking | 442 | only autosuspend calls. The driver can tell them apart by checking |
@@ -472,7 +473,9 @@ Firstly, a device may already be autosuspended when a system suspend | |||
472 | occurs. Since system suspends are supposed to be as transparent as | 473 | occurs. Since system suspends are supposed to be as transparent as |
473 | possible, the device should remain suspended following the system | 474 | possible, the device should remain suspended following the system |
474 | resume. But this theory may not work out well in practice; over time | 475 | resume. But this theory may not work out well in practice; over time |
475 | the kernel's behavior in this regard has changed. | 476 | the kernel's behavior in this regard has changed. As of 2.6.37 the |
477 | policy is to resume all devices during a system resume and let them | ||
478 | handle their own runtime suspends afterward. | ||
476 | 479 | ||
477 | Secondly, a dynamic power-management event may occur as a system | 480 | Secondly, a dynamic power-management event may occur as a system |
478 | suspend is underway. The window for this is short, since system | 481 | suspend is underway. The window for this is short, since system |
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index ac2616a62fc3..31b485723bc5 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
@@ -1,5 +1,5 @@ | |||
1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] | 1 | 0 -> Unknown EM2800 video grabber (em2800) [eb1a:2800] |
2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868] | 2 | 1 -> Unknown EM2750/28xx video grabber (em2820/em2840) [eb1a:2710,eb1a:2820,eb1a:2821,eb1a:2860,eb1a:2861,eb1a:2862,eb1a:2863,eb1a:2870,eb1a:2881,eb1a:2883,eb1a:2868,eb1a:2875] |
3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] | 3 | 2 -> Terratec Cinergy 250 USB (em2820/em2840) [0ccd:0036] |
4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] | 4 | 3 -> Pinnacle PCTV USB 2 (em2820/em2840) [2304:0208] |
5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] | 5 | 4 -> Hauppauge WinTV USB 2 (em2820/em2840) [2040:4200,2040:4201] |
@@ -9,7 +9,7 @@ | |||
9 | 8 -> Kworld USB2800 (em2800) | 9 | 8 -> Kworld USB2800 (em2800) |
10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,2304:0207,2304:021a] | 10 | 9 -> Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker (em2820/em2840) [1b80:e302,1b80:e304,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) |
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 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) | 15 | 14 -> SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0 (em2820/em2840) |
@@ -53,7 +53,7 @@ | |||
53 | 52 -> DNT DA2 Hybrid (em2881) | 53 | 52 -> DNT DA2 Hybrid (em2881) |
54 | 53 -> Pinnacle Hybrid Pro (em2881) | 54 | 53 -> Pinnacle Hybrid Pro (em2881) |
55 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] | 55 | 54 -> Kworld VS-DVB-T 323UR (em2882) [eb1a:e323] |
56 | 55 -> Terratec Hybrid XS (em2882) (em2882) [0ccd:005e] | 56 | 55 -> Terratec Cinnergy Hybrid T USB XS (em2882) (em2882) [0ccd:005e,0ccd:0042] |
57 | 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] | 57 | 56 -> Pinnacle Hybrid Pro (2) (em2882) [2304:0226] |
58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] | 58 | 57 -> Kworld PlusTV HD Hybrid 330 (em2883) [eb1a:a316] |
59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] | 59 | 58 -> Compro VideoMate ForYou/Stereo (em2820/em2840) [185b:2041] |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index 8d9afc7d8014..6b4c72d8862d 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -180,3 +180,5 @@ | |||
180 | 179 -> Beholder BeholdTV A7 [5ace:7090] | 180 | 179 -> Beholder BeholdTV A7 [5ace:7090] |
181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] | 181 | 180 -> Avermedia PCI M733A [1461:4155,1461:4255] |
182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] | 182 | 181 -> TechoTrend TT-budget T-3000 [13c2:2804] |
183 | 182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136] | ||
184 | 183 -> Compro VideoMate Vista M1F [185b:c900] | ||
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile deleted file mode 100644 index 1ed0e98d057d..000000000000 --- a/Documentation/video4linux/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # kbuild trick to avoid linker error. Can be omitted if a module is built. | ||
2 | obj- := dummy.o | ||
3 | |||
4 | # List of programs to build | ||
5 | hostprogs-y := v4lgrab | ||
6 | |||
7 | # Tell kbuild to always build the programs | ||
8 | always := $(hostprogs-y) | ||
diff --git a/Documentation/video4linux/README.cpia b/Documentation/video4linux/README.cpia deleted file mode 100644 index 8a747fee661f..000000000000 --- a/Documentation/video4linux/README.cpia +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | This is a driver for the CPiA PPC2 driven parallel connected | ||
2 | Camera. For example the Creative WebcamII is CPiA driven. | ||
3 | |||
4 | ) [1]Peter Pregler, Linz 2000, published under the [2]GNU GPL | ||
5 | |||
6 | --------------------------------------------------------------------------- | ||
7 | |||
8 | USAGE: | ||
9 | |||
10 | General: | ||
11 | ======== | ||
12 | |||
13 | 1) Make sure you have created the video devices (/dev/video*): | ||
14 | |||
15 | - if you have a recent MAKEDEV do a 'cd /dev;./MAKEDEV video' | ||
16 | - otherwise do a: | ||
17 | |||
18 | cd /dev | ||
19 | mknod video0 c 81 0 | ||
20 | ln -s video0 video | ||
21 | |||
22 | 2) Compile the kernel (see below for the list of options to use), | ||
23 | configure your parport and reboot. | ||
24 | |||
25 | 3) If all worked well you should get messages similar | ||
26 | to the following (your versions may be different) on the console: | ||
27 | |||
28 | V4L-Driver for Vision CPiA based cameras v0.7.4 | ||
29 | parport0: read2 timeout. | ||
30 | parport0: Multimedia device, VLSI Vision Ltd PPC2 | ||
31 | Parallel port driver for Vision CPiA based camera | ||
32 | CPIA Version: 1.20 (2.0) | ||
33 | CPIA PnP-ID: 0553:0002:0100 | ||
34 | VP-Version: 1.0 0100 | ||
35 | 1 camera(s) found | ||
36 | |||
37 | |||
38 | As modules: | ||
39 | =========== | ||
40 | |||
41 | Make sure you have selected the following kernel options (you can | ||
42 | select all stuff as modules): | ||
43 | |||
44 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
45 | |||
46 | CONFIG_PARPORT=m | ||
47 | CONFIG_PARPORT_PC=m | ||
48 | CONFIG_PARPORT_PC_FIFO=y | ||
49 | CONFIG_PARPORT_1284=y | ||
50 | CONFIG_VIDEO_DEV=m | ||
51 | CONFIG_VIDEO_CPIA=m | ||
52 | CONFIG_VIDEO_CPIA_PP=m | ||
53 | |||
54 | For autoloading of all those modules you need to tell module-init-tools | ||
55 | some stuff. Add the following line to your module-init-tools config-file | ||
56 | (e.g. /etc/modprobe.conf or wherever your distribution does store that | ||
57 | stuff): | ||
58 | |||
59 | options parport_pc io=0x378 irq=7 dma=3 | ||
60 | alias char-major-81 cpia_pp | ||
61 | |||
62 | The first line tells the dma/irq channels to use. Those _must_ match | ||
63 | the settings of your BIOS. Do NOT simply use the values above. See | ||
64 | Documentation/parport.txt for more information about this. The second | ||
65 | line associates the video-device file with the driver. Of cause you | ||
66 | can also load the modules once upon boot (usually done in /etc/modules). | ||
67 | |||
68 | Linked into the kernel: | ||
69 | ======================= | ||
70 | |||
71 | Make sure you have selected the following kernel options. Note that | ||
72 | you cannot compile the parport-stuff as modules and the cpia-driver | ||
73 | statically (the other way round is okay though). | ||
74 | |||
75 | The cpia-stuff is in the section 'Character devices -> Video For Linux'. | ||
76 | |||
77 | CONFIG_PARPORT=y | ||
78 | CONFIG_PARPORT_PC=y | ||
79 | CONFIG_PARPORT_PC_FIFO=y | ||
80 | CONFIG_PARPORT_1284=y | ||
81 | CONFIG_VIDEO_DEV=y | ||
82 | CONFIG_VIDEO_CPIA=y | ||
83 | CONFIG_VIDEO_CPIA_PP=y | ||
84 | |||
85 | To use DMA/irq you will need to tell the kernel upon boot time the | ||
86 | hardware configuration of the parport. You can give the boot-parameter | ||
87 | at the LILO-prompt or specify it in lilo.conf. I use the following | ||
88 | append-line in lilo.conf: | ||
89 | |||
90 | append="parport=0x378,7,3" | ||
91 | |||
92 | See Documentation/parport.txt for more information about the | ||
93 | configuration of the parport and the values given above. Do not simply | ||
94 | use the values given above. | ||
95 | |||
96 | --------------------------------------------------------------------------- | ||
97 | FEATURES: | ||
98 | |||
99 | - mmap/read v4l-interface (but no overlay) | ||
100 | - image formats: CIF/QCIF, SIF/QSIF, various others used by isabel; | ||
101 | note: all sizes except CIF/QCIF are implemented by clipping, i.e. | ||
102 | pixels are not uploaded from the camera | ||
103 | - palettes: VIDEO_PALETTE_GRAY, VIDEO_PALETTE_RGB565, VIDEO_PALETTE_RGB555, | ||
104 | VIDEO_PALETTE_RGB24, VIDEO_PALETTE_RGB32, VIDEO_PALETTE_YUYV, | ||
105 | VIDEO_PALETTE_UYVY, VIDEO_PALETTE_YUV422 | ||
106 | - state information (color balance, exposure, ...) is preserved between | ||
107 | device opens | ||
108 | - complete control over camera via proc-interface (_all_ camera settings are | ||
109 | supported), there is also a python-gtk application available for this [3] | ||
110 | - works under SMP (but the driver is completely serialized and synchronous) | ||
111 | so you get no benefit from SMP, but at least it does not crash your box | ||
112 | - might work for non-Intel architecture, let us know about this | ||
113 | |||
114 | --------------------------------------------------------------------------- | ||
115 | TESTED APPLICATIONS: | ||
116 | |||
117 | - a simple test application based on Xt is available at [3] | ||
118 | - another test-application based on gqcam-0.4 (uses GTK) | ||
119 | - gqcam-0.6 should work | ||
120 | - xawtv-3.x (also the webcam software) | ||
121 | - xawtv-2.46 | ||
122 | - w3cam (cgi-interface and vidcat, e.g. you may try out 'vidcat |xv | ||
123 | -maxpect -root -quit +noresetroot -rmode 5 -') | ||
124 | - vic, the MBONE video conferencing tool (version 2.8ucl4-1) | ||
125 | - isabel 3R4beta (barely working, but AFAICT all the problems are on | ||
126 | their side) | ||
127 | - camserv-0.40 | ||
128 | |||
129 | See [3] for pointers to v4l-applications. | ||
130 | |||
131 | --------------------------------------------------------------------------- | ||
132 | KNOWN PROBLEMS: | ||
133 | |||
134 | - some applications do not handle the image format correctly, you will | ||
135 | see strange horizontal stripes instead of a nice picture -> make sure | ||
136 | your application does use a supported image size or queries the driver | ||
137 | for the actually used size (reason behind this: the camera cannot | ||
138 | provide any image format, so if size NxM is requested the driver will | ||
139 | use a format to the closest fitting N1xM1, the application should now | ||
140 | query for this granted size, most applications do not). | ||
141 | - all the todo ;) | ||
142 | - if there is not enough light and the picture is too dark try to | ||
143 | adjust the SetSensorFPS setting, automatic frame rate adjustment | ||
144 | has its price | ||
145 | - do not try out isabel 3R4beta (built 135), you will be disappointed | ||
146 | |||
147 | --------------------------------------------------------------------------- | ||
148 | TODO: | ||
149 | |||
150 | - multiple camera support (struct camera or something) - This should work, | ||
151 | but hasn't been tested yet. | ||
152 | - architecture independence? | ||
153 | - SMP-safe asynchronous mmap interface | ||
154 | - nibble mode for old parport interfaces | ||
155 | - streaming capture, this should give a performance gain | ||
156 | |||
157 | --------------------------------------------------------------------------- | ||
158 | IMPLEMENTATION NOTES: | ||
159 | |||
160 | The camera can act in two modes, streaming or grabbing. Right now a | ||
161 | polling grab-scheme is used. Maybe interrupt driven streaming will be | ||
162 | used for a asynchronous mmap interface in the next major release of the | ||
163 | driver. This might give a better frame rate. | ||
164 | |||
165 | --------------------------------------------------------------------------- | ||
166 | THANKS (in no particular order): | ||
167 | |||
168 | - Scott J. Bertin <sbertin@mindspring.com> for cleanups, the proc-filesystem | ||
169 | and much more | ||
170 | - Henry Bruce <whb@vvl.co.uk> for providing developers information about | ||
171 | the CPiA chip, I wish all companies would treat Linux as seriously | ||
172 | - Karoly Erdei <Karoly.Erdei@risc.uni-linz.ac.at> and RISC-Linz for being | ||
173 | my boss ;) resp. my employer and for providing me the hardware and | ||
174 | allow me to devote some working time to this project | ||
175 | - Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help | ||
176 | with Isabel (http://isabel.dit.upm.es/) | ||
177 | - Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code | ||
178 | - Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list | ||
179 | and maintaining the web-server[3] | ||
180 | - Chris Whiteford <Chris@informinteractive.com> for fixes related to the | ||
181 | 1.02 firmware | ||
182 | - special kudos to all the tester whose machines crashed and/or | ||
183 | will crash. :) | ||
184 | |||
185 | --------------------------------------------------------------------------- | ||
186 | REFERENCES | ||
187 | |||
188 | 1. http://www.risc.uni-linz.ac.at/ | ||
189 | mailto:Peter_Pregler@email.com | ||
190 | 2. see the file COPYING in the top directory of the kernel tree | ||
191 | 3. http://webcam.sourceforge.net/ | ||
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index 00e3f9267814..699b60e070d2 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -322,76 +322,11 @@ your IRQs and make sure the card has its own interrupts. | |||
322 | 322 | ||
323 | 4. Programming interface | 323 | 4. Programming interface |
324 | 324 | ||
325 | This driver conforms to video4linux and video4linux2, both can be used to | 325 | This driver conforms to video4linux2. Support for V4L1 and for the custom |
326 | use the driver. Since video4linux didn't provide adequate calls to fully | 326 | zoran ioctls has been removed in kernel 2.6.38. |
327 | use the cards' features, we've introduced several programming extensions, | ||
328 | which are currently officially accepted in the 2.4.x branch of the kernel. | ||
329 | These extensions are known as the v4l/mjpeg extensions. See zoran.h for | ||
330 | details (structs/ioctls). | ||
331 | |||
332 | Information - video4linux: | ||
333 | http://linux.bytesex.org/v4l2/API.html | ||
334 | Documentation/video4linux/API.html | ||
335 | /usr/include/linux/videodev.h | ||
336 | |||
337 | Information - video4linux/mjpeg extensions: | ||
338 | ./zoran.h | ||
339 | (also see below) | ||
340 | |||
341 | Information - video4linux2: | ||
342 | http://linuxtv.org | ||
343 | http://v4l2spec.bytesex.org/ | ||
344 | /usr/include/linux/videodev2.h | ||
345 | |||
346 | More information on the video4linux/mjpeg extensions, by Serguei | ||
347 | Miridonovi and Rainer Johanni: | ||
348 | -- | ||
349 | The ioctls for that interface are as follows: | ||
350 | |||
351 | BUZIOC_G_PARAMS | ||
352 | BUZIOC_S_PARAMS | ||
353 | |||
354 | Get and set the parameters of the buz. The user should always do a | ||
355 | BUZIOC_G_PARAMS (with a struct buz_params) to obtain the default | ||
356 | settings, change what he likes and then make a BUZIOC_S_PARAMS call. | ||
357 | |||
358 | BUZIOC_REQBUFS | ||
359 | |||
360 | Before being able to capture/playback, the user has to request | ||
361 | the buffers he is wanting to use. Fill the structure | ||
362 | zoran_requestbuffers with the size (recommended: 256*1024) and | ||
363 | the number (recommended 32 up to 256). There are no such restrictions | ||
364 | as for the Video for Linux buffers, you should LEAVE SUFFICIENT | ||
365 | MEMORY for your system however, else strange things will happen .... | ||
366 | On return, the zoran_requestbuffers structure contains number and | ||
367 | size of the actually allocated buffers. | ||
368 | You should use these numbers for doing a mmap of the buffers | ||
369 | into the user space. | ||
370 | The BUZIOC_REQBUFS ioctl also makes it happen, that the next mmap | ||
371 | maps the MJPEG buffer instead of the V4L buffers. | ||
372 | |||
373 | BUZIOC_QBUF_CAPT | ||
374 | BUZIOC_QBUF_PLAY | ||
375 | |||
376 | Queue a buffer for capture or playback. The first call also starts | ||
377 | streaming capture. When streaming capture is going on, you may | ||
378 | only queue further buffers or issue syncs until streaming | ||
379 | capture is switched off again with a argument of -1 to | ||
380 | a BUZIOC_QBUF_CAPT/BUZIOC_QBUF_PLAY ioctl. | ||
381 | |||
382 | BUZIOC_SYNC | ||
383 | |||
384 | Issue this ioctl when all buffers are queued. This ioctl will | ||
385 | block until the first buffer becomes free for saving its | ||
386 | data to disk (after BUZIOC_QBUF_CAPT) or for reuse (after BUZIOC_QBUF_PLAY). | ||
387 | |||
388 | BUZIOC_G_STATUS | ||
389 | |||
390 | Get the status of the input lines (video source connected/norm). | ||
391 | 327 | ||
392 | For programming example, please, look at lavrec.c and lavplay.c code in | 328 | For programming example, please, look at lavrec.c and lavplay.c code in |
393 | lavtools-1.2p2 package (URL: http://www.cicese.mx/) | 329 | the MJPEG-tools (http://mjpeg.sf.net/). |
394 | and the 'examples' directory in the original Buz driver distribution. | ||
395 | 330 | ||
396 | Additional notes for software developers: | 331 | Additional notes for software developers: |
397 | 332 | ||
@@ -402,9 +337,6 @@ Additional notes for software developers: | |||
402 | standard is "more constant" for current country than geometry | 337 | standard is "more constant" for current country than geometry |
403 | settings of a variety of TV capture cards which may work in ITU or | 338 | settings of a variety of TV capture cards which may work in ITU or |
404 | square pixel format. | 339 | square pixel format. |
405 | -- | ||
406 | Please note that lavplay/lavrec are also included in the MJPEG-tools | ||
407 | (http://mjpeg.sf.net/). | ||
408 | 340 | ||
409 | =========================== | 341 | =========================== |
410 | 342 | ||
diff --git a/Documentation/video4linux/bttv/Cards b/Documentation/video4linux/bttv/Cards index 12217fc49725..db833ced2cb8 100644 --- a/Documentation/video4linux/bttv/Cards +++ b/Documentation/video4linux/bttv/Cards | |||
@@ -464,10 +464,6 @@ Siemens | |||
464 | ------- | 464 | ------- |
465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) | 465 | Multimedia eXtension Board (MXB) (SAA7146, SAA7111) |
466 | 466 | ||
467 | Stradis | ||
468 | ------- | ||
469 | SDM275,SDM250,SDM026,SDM025 (SAA7146, IBMMPEG2): MPEG2 decoder only | ||
470 | |||
471 | Powercolor | 467 | Powercolor |
472 | ---------- | 468 | ---------- |
473 | MTV878 | 469 | MTV878 |
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt index 6a562eeeb4cd..261776e0c5e1 100644 --- a/Documentation/video4linux/gspca.txt +++ b/Documentation/video4linux/gspca.txt | |||
@@ -366,6 +366,7 @@ t613 17a1:0128 TASCORP JPEG Webcam, NGS Cyclops | |||
366 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC | 366 | vc032x 17ef:4802 Lenovo Vc0323+MI1310_SOC |
367 | pac207 2001:f115 D-Link DSB-C120 | 367 | pac207 2001:f115 D-Link DSB-C120 |
368 | sq905c 2770:9050 Disney pix micro (CIF) | 368 | sq905c 2770:9050 Disney pix micro (CIF) |
369 | sq905c 2770:9051 Lego Bionicle | ||
369 | sq905c 2770:9052 Disney pix micro 2 (VGA) | 370 | sq905c 2770:9052 Disney pix micro 2 (VGA) |
370 | sq905c 2770:905c All 11 known cameras with this ID | 371 | sq905c 2770:905c All 11 known cameras with this ID |
371 | sq905 2770:9120 All 24 known cameras with this ID | 372 | sq905 2770:9120 All 24 known cameras with this ID |
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt index bf3af5fe558f..34e2842c70ae 100644 --- a/Documentation/video4linux/meye.txt +++ b/Documentation/video4linux/meye.txt | |||
@@ -45,8 +45,6 @@ module argument syntax (<param>=<value> when passing the option to the | |||
45 | module or meye.<param>=<value> on the kernel boot line when meye is | 45 | module or meye.<param>=<value> on the kernel boot line when meye is |
46 | statically linked into the kernel). Those options are: | 46 | statically linked into the kernel). Those options are: |
47 | 47 | ||
48 | forcev4l1: force use of V4L1 API instead of V4L2 | ||
49 | |||
50 | gbuffers: number of capture buffers, default is 2 (32 max) | 48 | gbuffers: number of capture buffers, default is 2 (32 max) |
51 | 49 | ||
52 | gbufsize: size of each capture buffer, default is 614400 | 50 | gbufsize: size of each capture buffer, default is 614400 |
@@ -79,9 +77,8 @@ Usage: | |||
79 | Private API: | 77 | Private API: |
80 | ------------ | 78 | ------------ |
81 | 79 | ||
82 | The driver supports frame grabbing with the video4linux API | 80 | The driver supports frame grabbing with the video4linux API, |
83 | (either v4l1 or v4l2), so all video4linux tools (like xawtv) | 81 | so all video4linux tools (like xawtv) should work with this driver. |
84 | should work with this driver. | ||
85 | 82 | ||
86 | Besides the video4linux interface, the driver has a private interface | 83 | Besides the video4linux interface, the driver has a private interface |
87 | for accessing the Motion Eye extended parameters (camera sharpness, | 84 | for accessing the Motion Eye extended parameters (camera sharpness, |
@@ -123,7 +120,4 @@ Private API: | |||
123 | Bugs / Todo: | 120 | Bugs / Todo: |
124 | ------------ | 121 | ------------ |
125 | 122 | ||
126 | - the driver could be much cleaned up by removing the v4l1 support. | ||
127 | However, this means all v4l1-only applications will stop working. | ||
128 | |||
129 | - 'motioneye' still uses the meye private v4l1 API extensions. | 123 | - 'motioneye' still uses the meye private v4l1 API extensions. |
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c deleted file mode 100644 index c8ded175796e..000000000000 --- a/Documentation/video4linux/v4lgrab.c +++ /dev/null | |||
@@ -1,201 +0,0 @@ | |||
1 | /* Simple Video4Linux image grabber. */ | ||
2 | /* | ||
3 | * Video4Linux Driver Test/Example Framegrabbing Program | ||
4 | * | ||
5 | * Compile with: | ||
6 | * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab | ||
7 | * Use as: | ||
8 | * v4lgrab >image.ppm | ||
9 | * | ||
10 | * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> | ||
11 | * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c | ||
12 | * with minor modifications (Dave Forrest, drf5n@virginia.edu). | ||
13 | * | ||
14 | * | ||
15 | * For some cameras you may need to pre-load libv4l to perform | ||
16 | * the necessary decompression, e.g.: | ||
17 | * | ||
18 | * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so | ||
19 | * ./v4lgrab >image.ppm | ||
20 | * | ||
21 | * see http://hansdegoede.livejournal.com/3636.html for details. | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <unistd.h> | ||
26 | #include <sys/types.h> | ||
27 | #include <sys/stat.h> | ||
28 | #include <fcntl.h> | ||
29 | #include <stdio.h> | ||
30 | #include <sys/ioctl.h> | ||
31 | #include <stdlib.h> | ||
32 | |||
33 | #include <linux/types.h> | ||
34 | #include <linux/videodev.h> | ||
35 | |||
36 | #define VIDEO_DEV "/dev/video0" | ||
37 | |||
38 | /* Stole this from tvset.c */ | ||
39 | |||
40 | #define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ | ||
41 | { \ | ||
42 | switch (format) \ | ||
43 | { \ | ||
44 | case VIDEO_PALETTE_GREY: \ | ||
45 | switch (depth) \ | ||
46 | { \ | ||
47 | case 4: \ | ||
48 | case 6: \ | ||
49 | case 8: \ | ||
50 | (r) = (g) = (b) = (*buf++ << 8);\ | ||
51 | break; \ | ||
52 | \ | ||
53 | case 16: \ | ||
54 | (r) = (g) = (b) = \ | ||
55 | *((unsigned short *) buf); \ | ||
56 | buf += 2; \ | ||
57 | break; \ | ||
58 | } \ | ||
59 | break; \ | ||
60 | \ | ||
61 | \ | ||
62 | case VIDEO_PALETTE_RGB565: \ | ||
63 | { \ | ||
64 | unsigned short tmp = *(unsigned short *)buf; \ | ||
65 | (r) = tmp&0xF800; \ | ||
66 | (g) = (tmp<<5)&0xFC00; \ | ||
67 | (b) = (tmp<<11)&0xF800; \ | ||
68 | buf += 2; \ | ||
69 | } \ | ||
70 | break; \ | ||
71 | \ | ||
72 | case VIDEO_PALETTE_RGB555: \ | ||
73 | (r) = (buf[0]&0xF8)<<8; \ | ||
74 | (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ | ||
75 | (b) = ((buf[1] << 2 ) & 0xF8)<<8; \ | ||
76 | buf += 2; \ | ||
77 | break; \ | ||
78 | \ | ||
79 | case VIDEO_PALETTE_RGB24: \ | ||
80 | (r) = buf[0] << 8; (g) = buf[1] << 8; \ | ||
81 | (b) = buf[2] << 8; \ | ||
82 | buf += 3; \ | ||
83 | break; \ | ||
84 | \ | ||
85 | default: \ | ||
86 | fprintf(stderr, \ | ||
87 | "Format %d not yet supported\n", \ | ||
88 | format); \ | ||
89 | } \ | ||
90 | } | ||
91 | |||
92 | static int get_brightness_adj(unsigned char *image, long size, int *brightness) { | ||
93 | long i, tot = 0; | ||
94 | for (i=0;i<size*3;i++) | ||
95 | tot += image[i]; | ||
96 | *brightness = (128 - tot/(size*3))/3; | ||
97 | return !((tot/(size*3)) >= 126 && (tot/(size*3)) <= 130); | ||
98 | } | ||
99 | |||
100 | int main(int argc, char ** argv) | ||
101 | { | ||
102 | int fd = open(VIDEO_DEV, O_RDONLY), f; | ||
103 | struct video_capability cap; | ||
104 | struct video_window win; | ||
105 | struct video_picture vpic; | ||
106 | |||
107 | unsigned char *buffer, *src; | ||
108 | int bpp = 24, r = 0, g = 0, b = 0; | ||
109 | unsigned int i, src_depth = 16; | ||
110 | |||
111 | if (fd < 0) { | ||
112 | perror(VIDEO_DEV); | ||
113 | exit(1); | ||
114 | } | ||
115 | |||
116 | if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { | ||
117 | perror("VIDIOGCAP"); | ||
118 | fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n"); | ||
119 | close(fd); | ||
120 | exit(1); | ||
121 | } | ||
122 | |||
123 | if (ioctl(fd, VIDIOCGWIN, &win) < 0) { | ||
124 | perror("VIDIOCGWIN"); | ||
125 | close(fd); | ||
126 | exit(1); | ||
127 | } | ||
128 | |||
129 | if (ioctl(fd, VIDIOCGPICT, &vpic) < 0) { | ||
130 | perror("VIDIOCGPICT"); | ||
131 | close(fd); | ||
132 | exit(1); | ||
133 | } | ||
134 | |||
135 | if (cap.type & VID_TYPE_MONOCHROME) { | ||
136 | vpic.depth=8; | ||
137 | vpic.palette=VIDEO_PALETTE_GREY; /* 8bit grey */ | ||
138 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
139 | vpic.depth=6; | ||
140 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
141 | vpic.depth=4; | ||
142 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
143 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
144 | close(fd); | ||
145 | exit(1); | ||
146 | } | ||
147 | } | ||
148 | } | ||
149 | } else { | ||
150 | vpic.depth=24; | ||
151 | vpic.palette=VIDEO_PALETTE_RGB24; | ||
152 | |||
153 | if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { | ||
154 | vpic.palette=VIDEO_PALETTE_RGB565; | ||
155 | vpic.depth=16; | ||
156 | |||
157 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
158 | vpic.palette=VIDEO_PALETTE_RGB555; | ||
159 | vpic.depth=15; | ||
160 | |||
161 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
162 | fprintf(stderr, "Unable to find a supported capture format.\n"); | ||
163 | return -1; | ||
164 | } | ||
165 | } | ||
166 | } | ||
167 | } | ||
168 | |||
169 | buffer = malloc(win.width * win.height * bpp); | ||
170 | if (!buffer) { | ||
171 | fprintf(stderr, "Out of memory.\n"); | ||
172 | exit(1); | ||
173 | } | ||
174 | |||
175 | do { | ||
176 | int newbright; | ||
177 | read(fd, buffer, win.width * win.height * bpp); | ||
178 | f = get_brightness_adj(buffer, win.width * win.height, &newbright); | ||
179 | if (f) { | ||
180 | vpic.brightness += (newbright << 8); | ||
181 | if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { | ||
182 | perror("VIDIOSPICT"); | ||
183 | break; | ||
184 | } | ||
185 | } | ||
186 | } while (f); | ||
187 | |||
188 | fprintf(stdout, "P6\n%d %d 255\n", win.width, win.height); | ||
189 | |||
190 | src = buffer; | ||
191 | |||
192 | for (i = 0; i < win.width * win.height; i++) { | ||
193 | READ_VIDEO_PIXEL(src, vpic.palette, src_depth, r, g, b); | ||
194 | fputc(r>>8, stdout); | ||
195 | fputc(g>>8, stdout); | ||
196 | fputc(b>>8, stdout); | ||
197 | } | ||
198 | |||
199 | close(fd); | ||
200 | return 0; | ||
201 | } | ||
diff --git a/Documentation/video4linux/videobuf b/Documentation/video4linux/videobuf index 17a1f9abf260..1d00d7f15b8f 100644 --- a/Documentation/video4linux/videobuf +++ b/Documentation/video4linux/videobuf | |||
@@ -247,8 +247,6 @@ calls. The relevant helper functions are: | |||
247 | int nonblocking); | 247 | int nonblocking); |
248 | int videobuf_streamon(struct videobuf_queue *q); | 248 | int videobuf_streamon(struct videobuf_queue *q); |
249 | int videobuf_streamoff(struct videobuf_queue *q); | 249 | int videobuf_streamoff(struct videobuf_queue *q); |
250 | int videobuf_cgmbuf(struct videobuf_queue *q, struct video_mbuf *mbuf, | ||
251 | int count); | ||
252 | 250 | ||
253 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's | 251 | So, for example, a VIDIOC_REQBUFS call turns into a call to the driver's |
254 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the | 252 | vidioc_reqbufs() callback which, in turn, usually only needs to locate the |
@@ -258,10 +256,7 @@ boilerplate in a lot of V4L2 drivers. | |||
258 | 256 | ||
259 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more | 257 | The vidioc_streamon() and vidioc_streamoff() functions will be a bit more |
260 | complex, of course, since they will also need to deal with starting and | 258 | complex, of course, since they will also need to deal with starting and |
261 | stopping the capture engine. videobuf_cgmbuf(), called from the driver's | 259 | stopping the capture engine. |
262 | vidiocgmbuf() function, only exists if the V4L1 compatibility module has | ||
263 | been selected with CONFIG_VIDEO_V4L1_COMPAT, so its use must be surrounded | ||
264 | with #ifdef directives. | ||
265 | 260 | ||
266 | Buffer allocation | 261 | Buffer allocation |
267 | 262 | ||
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt index 30b43e1b2697..bdeb81ccb5f6 100644 --- a/Documentation/x86/boot.txt +++ b/Documentation/x86/boot.txt | |||
@@ -600,6 +600,7 @@ Protocol: 2.07+ | |||
600 | 0x00000001 lguest | 600 | 0x00000001 lguest |
601 | 0x00000002 Xen | 601 | 0x00000002 Xen |
602 | 0x00000003 Moorestown MID | 602 | 0x00000003 Moorestown MID |
603 | 0x00000004 CE4100 TV Platform | ||
603 | 604 | ||
604 | Field name: hardware_subarch_data | 605 | Field name: hardware_subarch_data |
605 | Type: write (subarch-dependent) | 606 | Type: write (subarch-dependent) |