diff options
1446 files changed, 19917 insertions, 12287 deletions
diff --git a/.gitignore b/.gitignore index 090b293b8779..d24ad506e799 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -52,8 +52,8 @@ series | |||
52 | 52 | ||
53 | # cscope files | 53 | # cscope files |
54 | cscope.* | 54 | cscope.* |
55 | ncscope.* | ||
55 | 56 | ||
56 | *.orig | 57 | *.orig |
57 | *.rej | ||
58 | *~ | 58 | *~ |
59 | \#*# | 59 | \#*# |
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi index 5ac1e01bbd48..5f500977b42f 100644 --- a/Documentation/ABI/testing/sysfs-class-bdi +++ b/Documentation/ABI/testing/sysfs-class-bdi | |||
@@ -14,6 +14,10 @@ MAJOR:MINOR | |||
14 | non-block filesystems which provide their own BDI, such as NFS | 14 | non-block filesystems which provide their own BDI, such as NFS |
15 | and FUSE. | 15 | and FUSE. |
16 | 16 | ||
17 | MAJOR:MINOR-fuseblk | ||
18 | |||
19 | Value of st_dev on fuseblk filesystems. | ||
20 | |||
17 | default | 21 | default |
18 | 22 | ||
19 | The default backing dev, used for non-block device backed | 23 | The default backing dev, used for non-block device backed |
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl index 77c42f40be5d..2510763295d0 100644 --- a/Documentation/DocBook/kernel-locking.tmpl +++ b/Documentation/DocBook/kernel-locking.tmpl | |||
@@ -703,6 +703,31 @@ | |||
703 | </sect1> | 703 | </sect1> |
704 | </chapter> | 704 | </chapter> |
705 | 705 | ||
706 | <chapter id="trylock-functions"> | ||
707 | <title>The trylock Functions</title> | ||
708 | <para> | ||
709 | There are functions that try to acquire a lock only once and immediately | ||
710 | return a value telling about success or failure to acquire the lock. | ||
711 | They can be used if you need no access to the data protected with the lock | ||
712 | when some other thread is holding the lock. You should acquire the lock | ||
713 | later if you then need access to the data protected with the lock. | ||
714 | </para> | ||
715 | |||
716 | <para> | ||
717 | <function>spin_trylock()</function> does not spin but returns non-zero if | ||
718 | it acquires the spinlock on the first try or 0 if not. This function can | ||
719 | be used in all contexts like <function>spin_lock</function>: you must have | ||
720 | disabled the contexts that might interrupt you and acquire the spin lock. | ||
721 | </para> | ||
722 | |||
723 | <para> | ||
724 | <function>mutex_trylock()</function> does not suspend your task | ||
725 | but returns non-zero if it could lock the mutex on the first try | ||
726 | or 0 if not. This function cannot be safely used in hardware or software | ||
727 | interrupt contexts despite not sleeping. | ||
728 | </para> | ||
729 | </chapter> | ||
730 | |||
706 | <chapter id="Examples"> | 731 | <chapter id="Examples"> |
707 | <title>Common Examples</title> | 732 | <title>Common Examples</title> |
708 | <para> | 733 | <para> |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 9c93a03ea33b..118ca6e9404f 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -327,6 +327,52 @@ Some people also put extra tags at the end. They'll just be ignored for | |||
327 | now, but you can do this to mark internal company procedures or just | 327 | now, but you can do this to mark internal company procedures or just |
328 | point out some special detail about the sign-off. | 328 | point out some special detail about the sign-off. |
329 | 329 | ||
330 | If you are a subsystem or branch maintainer, sometimes you need to slightly | ||
331 | modify patches you receive in order to merge them, because the code is not | ||
332 | exactly the same in your tree and the submitters'. If you stick strictly to | ||
333 | rule (c), you should ask the submitter to rediff, but this is a totally | ||
334 | counter-productive waste of time and energy. Rule (b) allows you to adjust | ||
335 | the code, but then it is very impolite to change one submitter's code and | ||
336 | make him endorse your bugs. To solve this problem, it is recommended that | ||
337 | you add a line between the last Signed-off-by header and yours, indicating | ||
338 | the nature of your changes. While there is nothing mandatory about this, it | ||
339 | seems like prepending the description with your mail and/or name, all | ||
340 | enclosed in square brackets, is noticeable enough to make it obvious that | ||
341 | you are responsible for last-minute changes. Example : | ||
342 | |||
343 | Signed-off-by: Random J Developer <random@developer.example.org> | ||
344 | [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h] | ||
345 | Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org> | ||
346 | |||
347 | This practise is particularly helpful if you maintain a stable branch and | ||
348 | want at the same time to credit the author, track changes, merge the fix, | ||
349 | and protect the submitter from complaints. Note that under no circumstances | ||
350 | can you change the author's identity (the From header), as it is the one | ||
351 | which appears in the changelog. | ||
352 | |||
353 | Special note to back-porters: It seems to be a common and useful practise | ||
354 | to insert an indication of the origin of a patch at the top of the commit | ||
355 | message (just after the subject line) to facilitate tracking. For instance, | ||
356 | here's what we see in 2.6-stable : | ||
357 | |||
358 | Date: Tue May 13 19:10:30 2008 +0000 | ||
359 | |||
360 | SCSI: libiscsi regression in 2.6.25: fix nop timer handling | ||
361 | |||
362 | commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream | ||
363 | |||
364 | And here's what appears in 2.4 : | ||
365 | |||
366 | Date: Tue May 13 22:12:27 2008 +0200 | ||
367 | |||
368 | wireless, airo: waitbusy() won't delay | ||
369 | |||
370 | [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a] | ||
371 | |||
372 | Whatever the format, this information provides a valuable help to people | ||
373 | tracking your trees, and to people trying to trouble-shoot bugs in your | ||
374 | tree. | ||
375 | |||
330 | 376 | ||
331 | 13) When to use Acked-by: and Cc: | 377 | 13) When to use Acked-by: and Cc: |
332 | 378 | ||
diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt index e65736c6b8bc..63e59b8847c5 100644 --- a/Documentation/cciss.txt +++ b/Documentation/cciss.txt | |||
@@ -21,6 +21,11 @@ This driver is known to work with the following cards: | |||
21 | * SA E200 | 21 | * SA E200 |
22 | * SA E200i | 22 | * SA E200i |
23 | * SA E500 | 23 | * SA E500 |
24 | * SA P212 | ||
25 | * SA P410 | ||
26 | * SA P410i | ||
27 | * SA P411 | ||
28 | * SA P812 | ||
24 | 29 | ||
25 | Detecting drive failures: | 30 | Detecting drive failures: |
26 | ------------------------- | 31 | ------------------------- |
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt index 6a9c55bd556b..dcec0564d040 100644 --- a/Documentation/cpu-freq/governors.txt +++ b/Documentation/cpu-freq/governors.txt | |||
@@ -129,14 +129,6 @@ to its default value of '80' it means that between the checking | |||
129 | intervals the CPU needs to be on average more than 80% in use to then | 129 | intervals the CPU needs to be on average more than 80% in use to then |
130 | decide that the CPU frequency needs to be increased. | 130 | decide that the CPU frequency needs to be increased. |
131 | 131 | ||
132 | sampling_down_factor: this parameter controls the rate that the CPU | ||
133 | makes a decision on when to decrease the frequency. When set to its | ||
134 | default value of '5' it means that at 1/5 the sampling_rate the kernel | ||
135 | makes a decision to lower the frequency. Five "lower rate" decisions | ||
136 | have to be made in a row before the CPU frequency is actually lower. | ||
137 | If set to '1' then the frequency decreases as quickly as it increases, | ||
138 | if set to '2' it decreases at half the rate of the increase. | ||
139 | |||
140 | ignore_nice_load: this parameter takes a value of '0' or '1'. When | 132 | ignore_nice_load: this parameter takes a value of '0' or '1'. When |
141 | set to '0' (its default), all processes are counted towards the | 133 | set to '0' (its default), all processes are counted towards the |
142 | 'cpu utilisation' value. When set to '1', the processes that are | 134 | 'cpu utilisation' value. When set to '1', the processes that are |
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index fb7b361e6eea..d803c5c68ab5 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -199,7 +199,7 @@ using the sched_setaffinity, mbind and set_mempolicy system calls. | |||
199 | The following rules apply to each cpuset: | 199 | The following rules apply to each cpuset: |
200 | 200 | ||
201 | - Its CPUs and Memory Nodes must be a subset of its parents. | 201 | - Its CPUs and Memory Nodes must be a subset of its parents. |
202 | - It can only be marked exclusive if its parent is. | 202 | - It can't be marked exclusive unless its parent is. |
203 | - If its cpu or memory is exclusive, they may not overlap any sibling. | 203 | - If its cpu or memory is exclusive, they may not overlap any sibling. |
204 | 204 | ||
205 | These rules, and the natural hierarchy of cpusets, enable efficient | 205 | These rules, and the natural hierarchy of cpusets, enable efficient |
@@ -345,7 +345,7 @@ is modified to perform an inline check for this PF_SPREAD_PAGE task | |||
345 | flag, and if set, a call to a new routine cpuset_mem_spread_node() | 345 | flag, and if set, a call to a new routine cpuset_mem_spread_node() |
346 | returns the node to prefer for the allocation. | 346 | returns the node to prefer for the allocation. |
347 | 347 | ||
348 | Similarly, setting 'memory_spread_cache' turns on the flag | 348 | Similarly, setting 'memory_spread_slab' turns on the flag |
349 | PF_SPREAD_SLAB, and appropriately marked slab caches will allocate | 349 | PF_SPREAD_SLAB, and appropriately marked slab caches will allocate |
350 | pages from the node returned by cpuset_mem_spread_node(). | 350 | pages from the node returned by cpuset_mem_spread_node(). |
351 | 351 | ||
@@ -709,7 +709,10 @@ Now you want to do something with this cpuset. | |||
709 | 709 | ||
710 | In this directory you can find several files: | 710 | In this directory you can find several files: |
711 | # ls | 711 | # ls |
712 | cpus cpu_exclusive mems mem_exclusive mem_hardwall tasks | 712 | cpu_exclusive memory_migrate mems tasks |
713 | cpus memory_pressure notify_on_release | ||
714 | mem_exclusive memory_spread_page sched_load_balance | ||
715 | mem_hardwall memory_spread_slab sched_relax_domain_level | ||
713 | 716 | ||
714 | Reading them will give you information about the state of this cpuset: | 717 | Reading them will give you information about the state of this cpuset: |
715 | the CPUs and Memory Nodes it can use, the processes that are using | 718 | the CPUs and Memory Nodes it can use, the processes that are using |
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt index 560f88dc7090..0c5086db8352 100644 --- a/Documentation/filesystems/ext4.txt +++ b/Documentation/filesystems/ext4.txt | |||
@@ -139,8 +139,16 @@ commit=nrsec (*) Ext4 can be told to sync all its data and metadata | |||
139 | Setting it to very large values will improve | 139 | Setting it to very large values will improve |
140 | performance. | 140 | performance. |
141 | 141 | ||
142 | barrier=1 This enables/disables barriers. barrier=0 disables | 142 | barrier=<0|1(*)> This enables/disables the use of write barriers in |
143 | it, barrier=1 enables it. | 143 | the jbd code. barrier=0 disables, barrier=1 enables. |
144 | This also requires an IO stack which can support | ||
145 | barriers, and if jbd gets an error on a barrier | ||
146 | write, it will disable again with a warning. | ||
147 | Write barriers enforce proper on-disk ordering | ||
148 | of journal commits, making volatile disk write caches | ||
149 | safe to use, at some performance penalty. If | ||
150 | your disks are battery-backed in one way or another, | ||
151 | disabling barriers may safely improve performance. | ||
144 | 152 | ||
145 | orlov (*) This enables the new Orlov block allocator. It is | 153 | orlov (*) This enables the new Orlov block allocator. It is |
146 | enabled by default. | 154 | enabled by default. |
diff --git a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt index 5daa2aaec2c5..68ef48839c04 100644 --- a/Documentation/filesystems/sysfs-pci.txt +++ b/Documentation/filesystems/sysfs-pci.txt | |||
@@ -36,6 +36,7 @@ files, each with their own function. | |||
36 | local_cpus nearby CPU mask (cpumask, ro) | 36 | local_cpus nearby CPU mask (cpumask, ro) |
37 | resource PCI resource host addresses (ascii, ro) | 37 | resource PCI resource host addresses (ascii, ro) |
38 | resource0..N PCI resource N, if present (binary, mmap) | 38 | resource0..N PCI resource N, if present (binary, mmap) |
39 | resource0_wc..N_wc PCI WC map resource N, if prefetchable (binary, mmap) | ||
39 | rom PCI ROM resource, if present (binary, ro) | 40 | rom PCI ROM resource, if present (binary, ro) |
40 | subsystem_device PCI subsystem device (ascii, ro) | 41 | subsystem_device PCI subsystem device (ascii, ro) |
41 | subsystem_vendor PCI subsystem vendor (ascii, ro) | 42 | subsystem_vendor PCI subsystem vendor (ascii, ro) |
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem new file mode 100644 index 000000000000..2fefaf582a43 --- /dev/null +++ b/Documentation/hwmon/ibmaem | |||
@@ -0,0 +1,37 @@ | |||
1 | Kernel driver ibmaem | ||
2 | ====================== | ||
3 | |||
4 | Supported systems: | ||
5 | * Any recent IBM System X server with Active Energy Manager support. | ||
6 | This includes the x3350, x3550, x3650, x3655, x3755, x3850 M2, | ||
7 | x3950 M2, and certain HS2x/LS2x/QS2x blades. The IPMI host interface | ||
8 | driver ("ipmi-si") needs to be loaded for this driver to do anything. | ||
9 | Prefix: 'ibmaem' | ||
10 | Datasheet: Not available | ||
11 | |||
12 | Author: Darrick J. Wong | ||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | This driver implements sensor reading support for the energy and power | ||
18 | meters available on various IBM System X hardware through the BMC. All | ||
19 | sensor banks will be exported as platform devices; this driver can talk | ||
20 | to both v1 and v2 interfaces. This driver is completely separate from the | ||
21 | older ibmpex driver. | ||
22 | |||
23 | The v1 AEM interface has a simple set of features to monitor energy use. | ||
24 | There is a register that displays an estimate of raw energy consumption | ||
25 | since the last BMC reset, and a power sensor that returns average power | ||
26 | use over a configurable interval. | ||
27 | |||
28 | The v2 AEM interface is a bit more sophisticated, being able to present | ||
29 | a wider range of energy and power use registers, the power cap as | ||
30 | set by the AEM software, and temperature sensors. | ||
31 | |||
32 | Special Features | ||
33 | ---------------- | ||
34 | |||
35 | The "power_cap" value displays the current system power cap, as set by | ||
36 | the Active Energy Manager software. Setting the power cap from the host | ||
37 | is not currently supported. | ||
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt index 2075c0658bf5..0bd32748a467 100644 --- a/Documentation/kernel-doc-nano-HOWTO.txt +++ b/Documentation/kernel-doc-nano-HOWTO.txt | |||
@@ -1,6 +1,105 @@ | |||
1 | kernel-doc nano-HOWTO | 1 | kernel-doc nano-HOWTO |
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | How to format kernel-doc comments | ||
5 | --------------------------------- | ||
6 | |||
7 | In order to provide embedded, 'C' friendly, easy to maintain, | ||
8 | but consistent and extractable documentation of the functions and | ||
9 | data structures in the Linux kernel, the Linux kernel has adopted | ||
10 | a consistent style for documenting functions and their parameters, | ||
11 | and structures and their members. | ||
12 | |||
13 | The format for this documentation is called the kernel-doc format. | ||
14 | It is documented in this Documentation/kernel-doc-nano-HOWTO.txt file. | ||
15 | |||
16 | This style embeds the documentation within the source files, using | ||
17 | a few simple conventions. The scripts/kernel-doc perl script, some | ||
18 | SGML templates in Documentation/DocBook, and other tools understand | ||
19 | these conventions, and are used to extract this embedded documentation | ||
20 | into various documents. | ||
21 | |||
22 | In order to provide good documentation of kernel functions and data | ||
23 | structures, please use the following conventions to format your | ||
24 | kernel-doc comments in Linux kernel source. | ||
25 | |||
26 | We definitely need kernel-doc formatted documentation for functions | ||
27 | that are exported to loadable modules using EXPORT_SYMBOL. | ||
28 | |||
29 | We also look to provide kernel-doc formatted documentation for | ||
30 | functions externally visible to other kernel files (not marked | ||
31 | "static"). | ||
32 | |||
33 | We also recommend providing kernel-doc formatted documentation | ||
34 | for private (file "static") routines, for consistency of kernel | ||
35 | source code layout. But this is lower priority and at the | ||
36 | discretion of the MAINTAINER of that kernel source file. | ||
37 | |||
38 | Data structures visible in kernel include files should also be | ||
39 | documented using kernel-doc formatted comments. | ||
40 | |||
41 | The opening comment mark "/**" is reserved for kernel-doc comments. | ||
42 | Only comments so marked will be considered by the kernel-doc scripts, | ||
43 | and any comment so marked must be in kernel-doc format. Do not use | ||
44 | "/**" to be begin a comment block unless the comment block contains | ||
45 | kernel-doc formatted comments. The closing comment marker for | ||
46 | kernel-doc comments can be either "*/" or "**/". | ||
47 | |||
48 | Kernel-doc comments should be placed just before the function | ||
49 | or data structure being described. | ||
50 | |||
51 | Example kernel-doc function comment: | ||
52 | |||
53 | /** | ||
54 | * foobar() - short function description of foobar | ||
55 | * @arg1: Describe the first argument to foobar. | ||
56 | * @arg2: Describe the second argument to foobar. | ||
57 | * One can provide multiple line descriptions | ||
58 | * for arguments. | ||
59 | * | ||
60 | * A longer description, with more discussion of the function foobar() | ||
61 | * that might be useful to those using or modifying it. Begins with | ||
62 | * empty comment line, and may include additional embedded empty | ||
63 | * comment lines. | ||
64 | * | ||
65 | * The longer description can have multiple paragraphs. | ||
66 | **/ | ||
67 | |||
68 | The first line, with the short description, must be on a single line. | ||
69 | |||
70 | The @argument descriptions must begin on the very next line following | ||
71 | this opening short function description line, with no intervening | ||
72 | empty comment lines. | ||
73 | |||
74 | Example kernel-doc data structure comment. | ||
75 | |||
76 | /** | ||
77 | * struct blah - the basic blah structure | ||
78 | * @mem1: describe the first member of struct blah | ||
79 | * @mem2: describe the second member of struct blah, | ||
80 | * perhaps with more lines and words. | ||
81 | * | ||
82 | * Longer description of this structure. | ||
83 | **/ | ||
84 | |||
85 | The kernel-doc function comments describe each parameter to the | ||
86 | function, in order, with the @name lines. | ||
87 | |||
88 | The kernel-doc data structure comments describe each structure member | ||
89 | in the data structure, with the @name lines. | ||
90 | |||
91 | The longer description formatting is "reflowed", losing your line | ||
92 | breaks. So presenting carefully formatted lists within these | ||
93 | descriptions won't work so well; derived documentation will lose | ||
94 | the formatting. | ||
95 | |||
96 | See the section below "How to add extractable documentation to your | ||
97 | source files" for more details and notes on how to format kernel-doc | ||
98 | comments. | ||
99 | |||
100 | Components of the kernel-doc system | ||
101 | ----------------------------------- | ||
102 | |||
4 | Many places in the source tree have extractable documentation in the | 103 | Many places in the source tree have extractable documentation in the |
5 | form of block comments above functions. The components of this system | 104 | form of block comments above functions. The components of this system |
6 | are: | 105 | are: |
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index 5a4ef48224ae..28cdc2af2131 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -715,14 +715,14 @@ | |||
715 | 715 | ||
716 | * Name: "Gary's Encyclopedia - The Linux Kernel" | 716 | * Name: "Gary's Encyclopedia - The Linux Kernel" |
717 | Author: Gary (I suppose...). | 717 | Author: Gary (I suppose...). |
718 | URL: http://www.lisoleg.net/cgi-bin/lisoleg.pl?view=kernel.htm | 718 | URL: http://slencyclopedia.berlios.de/index.html |
719 | Keywords: links, not found here?. | 719 | Keywords: linux, community, everything! |
720 | Description: Gary's Encyclopedia exists to allow the rapid finding | 720 | Description: Gary's Encyclopedia exists to allow the rapid finding |
721 | of documentation and other information of interest to GNU/Linux | 721 | of documentation and other information of interest to GNU/Linux |
722 | users. It has about 4000 links to external pages in 150 major | 722 | users. It has about 4000 links to external pages in 150 major |
723 | categories. This link is for kernel-specific links, documents, | 723 | categories. This link is for kernel-specific links, documents, |
724 | sites... Look there if you could not find here what you were | 724 | sites... This list is now hosted by developer.Berlios.de, |
725 | looking for. | 725 | but seems not to have been updated since sometime in 1999. |
726 | 726 | ||
727 | * Name: "The home page of Linux-MM" | 727 | * Name: "The home page of Linux-MM" |
728 | Author: The Linux-MM team. | 728 | Author: The Linux-MM team. |
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt index bf3256e04027..51a8021ee532 100644 --- a/Documentation/kobject.txt +++ b/Documentation/kobject.txt | |||
@@ -305,7 +305,7 @@ should not be manipulated by any other user. | |||
305 | 305 | ||
306 | A kset keeps its children in a standard kernel linked list. Kobjects point | 306 | A kset keeps its children in a standard kernel linked list. Kobjects point |
307 | back to their containing kset via their kset field. In almost all cases, | 307 | back to their containing kset via their kset field. In almost all cases, |
308 | the kobjects belonging to a ket have that kset (or, strictly, its embedded | 308 | the kobjects belonging to a kset have that kset (or, strictly, its embedded |
309 | kobject) in their parent. | 309 | kobject) in their parent. |
310 | 310 | ||
311 | As a kset contains a kobject within it, it should always be dynamically | 311 | As a kset contains a kobject within it, it should always be dynamically |
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt index 01c6c3d8a7e3..64b3f146e4b0 100644 --- a/Documentation/laptops/thinkpad-acpi.txt +++ b/Documentation/laptops/thinkpad-acpi.txt | |||
@@ -503,7 +503,7 @@ generate input device EV_KEY events. | |||
503 | In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW | 503 | In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW |
504 | events for switches: | 504 | events for switches: |
505 | 505 | ||
506 | SW_RADIO T60 and later hardare rfkill rocker switch | 506 | SW_RFKILL_ALL T60 and later hardare rfkill rocker switch |
507 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A | 507 | SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A |
508 | 508 | ||
509 | Non hot-key ACPI HKEY event map: | 509 | Non hot-key ACPI HKEY event map: |
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 3be8ab2a886a..82fafe0429fe 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -157,6 +157,9 @@ struct virtqueue | |||
157 | 157 | ||
158 | /* The routine to call when the Guest pings us. */ | 158 | /* The routine to call when the Guest pings us. */ |
159 | void (*handle_output)(int fd, struct virtqueue *me); | 159 | void (*handle_output)(int fd, struct virtqueue *me); |
160 | |||
161 | /* Outstanding buffers */ | ||
162 | unsigned int inflight; | ||
160 | }; | 163 | }; |
161 | 164 | ||
162 | /* Remember the arguments to the program so we can "reboot" */ | 165 | /* Remember the arguments to the program so we can "reboot" */ |
@@ -702,6 +705,7 @@ static unsigned get_vq_desc(struct virtqueue *vq, | |||
702 | errx(1, "Looped descriptor"); | 705 | errx(1, "Looped descriptor"); |
703 | } while ((i = next_desc(vq, i)) != vq->vring.num); | 706 | } while ((i = next_desc(vq, i)) != vq->vring.num); |
704 | 707 | ||
708 | vq->inflight++; | ||
705 | return head; | 709 | return head; |
706 | } | 710 | } |
707 | 711 | ||
@@ -719,6 +723,7 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len) | |||
719 | /* Make sure buffer is written before we update index. */ | 723 | /* Make sure buffer is written before we update index. */ |
720 | wmb(); | 724 | wmb(); |
721 | vq->vring.used->idx++; | 725 | vq->vring.used->idx++; |
726 | vq->inflight--; | ||
722 | } | 727 | } |
723 | 728 | ||
724 | /* This actually sends the interrupt for this virtqueue */ | 729 | /* This actually sends the interrupt for this virtqueue */ |
@@ -726,8 +731,9 @@ static void trigger_irq(int fd, struct virtqueue *vq) | |||
726 | { | 731 | { |
727 | unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; | 732 | unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; |
728 | 733 | ||
729 | /* If they don't want an interrupt, don't send one. */ | 734 | /* If they don't want an interrupt, don't send one, unless empty. */ |
730 | if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) | 735 | if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) |
736 | && vq->inflight) | ||
731 | return; | 737 | return; |
732 | 738 | ||
733 | /* Send the Guest an interrupt tell them we used something up. */ | 739 | /* Send the Guest an interrupt tell them we used something up. */ |
@@ -1107,6 +1113,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1107 | vq->next = NULL; | 1113 | vq->next = NULL; |
1108 | vq->last_avail_idx = 0; | 1114 | vq->last_avail_idx = 0; |
1109 | vq->dev = dev; | 1115 | vq->dev = dev; |
1116 | vq->inflight = 0; | ||
1110 | 1117 | ||
1111 | /* Initialize the configuration. */ | 1118 | /* Initialize the configuration. */ |
1112 | vq->config.num = num_descs; | 1119 | vq->config.num = num_descs; |
@@ -1368,6 +1375,7 @@ static void setup_tun_net(const char *arg) | |||
1368 | 1375 | ||
1369 | /* Tell Guest what MAC address to use. */ | 1376 | /* Tell Guest what MAC address to use. */ |
1370 | add_feature(dev, VIRTIO_NET_F_MAC); | 1377 | add_feature(dev, VIRTIO_NET_F_MAC); |
1378 | add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); | ||
1371 | set_config(dev, sizeof(conf), &conf); | 1379 | set_config(dev, sizeof(conf), &conf); |
1372 | 1380 | ||
1373 | /* We don't need the socket any more; setup is done. */ | 1381 | /* We don't need the socket any more; setup is done. */ |
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt index 770fc41a78e8..796012540386 100644 --- a/Documentation/networking/arcnet.txt +++ b/Documentation/networking/arcnet.txt | |||
@@ -46,7 +46,7 @@ These are the ARCnet drivers for Linux. | |||
46 | 46 | ||
47 | 47 | ||
48 | This new release (2.91) has been put together by David Woodhouse | 48 | This new release (2.91) has been put together by David Woodhouse |
49 | <dwmw2@cam.ac.uk>, in an attempt to tidy up the driver after adding support | 49 | <dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support |
50 | for yet another chipset. Now the generic support has been separated from the | 50 | for yet another chipset. Now the generic support has been separated from the |
51 | individual chipset drivers, and the source files aren't quite so packed with | 51 | individual chipset drivers, and the source files aren't quite so packed with |
52 | #ifdefs! I've changed this file a bit, but kept it in the first person from | 52 | #ifdefs! I've changed this file a bit, but kept it in the first person from |
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt index bdae2db4119c..bec69a8a1697 100644 --- a/Documentation/networking/bridge.txt +++ b/Documentation/networking/bridge.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | 1 | In order to use the Ethernet bridging functionality, you'll need the |
2 | userspace tools. These programs and documentation are available | 2 | userspace tools. These programs and documentation are available |
3 | at http://bridge.sourceforge.net. The download page is | 3 | at http://www.linux-foundation.org/en/Net:Bridge. The download page is |
4 | http://prdownloads.sourceforge.net/bridge. | 4 | http://prdownloads.sourceforge.net/bridge. |
5 | 5 | ||
6 | If you still have questions, don't hesitate to post to the mailing list | 6 | If you still have questions, don't hesitate to post to the mailing list |
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 543957346469..7cf5685d3645 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -60,7 +60,7 @@ | |||
60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] | 60 | 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] |
61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] | 61 | 60 -> Pinnacle Hybrid PCTV [12ab:1788] |
62 | 61 -> Winfast TV2000 XP Global [107d:6f18] | 62 | 61 -> Winfast TV2000 XP Global [107d:6f18] |
63 | 62 -> PowerColor Real Angel 330 [14f1:ea3d] | 63 | 62 -> PowerColor RA330 [14f1:ea3d] |
64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] | 64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] |
65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] | 65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] |
66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] | 66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] |
diff --git a/Documentation/video4linux/cx18.txt b/Documentation/video4linux/cx18.txt index 077d56ec3f3d..6842c262890f 100644 --- a/Documentation/video4linux/cx18.txt +++ b/Documentation/video4linux/cx18.txt | |||
@@ -1,7 +1,9 @@ | |||
1 | Some notes regarding the cx18 driver for the Conexant CX23418 MPEG | 1 | Some notes regarding the cx18 driver for the Conexant CX23418 MPEG |
2 | encoder chip: | 2 | encoder chip: |
3 | 3 | ||
4 | 1) The only hardware currently supported is the Hauppauge HVR-1600. | 4 | 1) The only hardware currently supported is the Hauppauge HVR-1600 |
5 | card and the Compro VideoMate H900 (note that this card only | ||
6 | supports analog input, it has no digital tuner!). | ||
5 | 7 | ||
6 | 2) Some people have problems getting the i2c bus to work. Cause unknown. | 8 | 2) Some people have problems getting the i2c bus to work. Cause unknown. |
7 | The symptom is that the eeprom cannot be read and the card is | 9 | The symptom is that the eeprom cannot be read and the card is |
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt new file mode 100644 index 000000000000..ce72c0fe6177 --- /dev/null +++ b/Documentation/vm/pagemap.txt | |||
@@ -0,0 +1,77 @@ | |||
1 | pagemap, from the userspace perspective | ||
2 | --------------------------------------- | ||
3 | |||
4 | pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow | ||
5 | userspace programs to examine the page tables and related information by | ||
6 | reading files in /proc. | ||
7 | |||
8 | There are three components to pagemap: | ||
9 | |||
10 | * /proc/pid/pagemap. This file lets a userspace process find out which | ||
11 | physical frame each virtual page is mapped to. It contains one 64-bit | ||
12 | value for each virtual page, containing the following data (from | ||
13 | fs/proc/task_mmu.c, above pagemap_read): | ||
14 | |||
15 | * Bits 0-55 page frame number (PFN) if present | ||
16 | * Bits 0-4 swap type if swapped | ||
17 | * Bits 5-55 swap offset if swapped | ||
18 | * Bits 55-60 page shift (page size = 1<<page shift) | ||
19 | * Bit 61 reserved for future use | ||
20 | * Bit 62 page swapped | ||
21 | * Bit 63 page present | ||
22 | |||
23 | If the page is not present but in swap, then the PFN contains an | ||
24 | encoding of the swap file number and the page's offset into the | ||
25 | swap. Unmapped pages return a null PFN. This allows determining | ||
26 | precisely which pages are mapped (or in swap) and comparing mapped | ||
27 | pages between processes. | ||
28 | |||
29 | Efficient users of this interface will use /proc/pid/maps to | ||
30 | determine which areas of memory are actually mapped and llseek to | ||
31 | skip over unmapped regions. | ||
32 | |||
33 | * /proc/kpagecount. This file contains a 64-bit count of the number of | ||
34 | times each page is mapped, indexed by PFN. | ||
35 | |||
36 | * /proc/kpageflags. This file contains a 64-bit set of flags for each | ||
37 | page, indexed by PFN. | ||
38 | |||
39 | The flags are (from fs/proc/proc_misc, above kpageflags_read): | ||
40 | |||
41 | 0. LOCKED | ||
42 | 1. ERROR | ||
43 | 2. REFERENCED | ||
44 | 3. UPTODATE | ||
45 | 4. DIRTY | ||
46 | 5. LRU | ||
47 | 6. ACTIVE | ||
48 | 7. SLAB | ||
49 | 8. WRITEBACK | ||
50 | 9. RECLAIM | ||
51 | 10. BUDDY | ||
52 | |||
53 | Using pagemap to do something useful: | ||
54 | |||
55 | The general procedure for using pagemap to find out about a process' memory | ||
56 | usage goes like this: | ||
57 | |||
58 | 1. Read /proc/pid/maps to determine which parts of the memory space are | ||
59 | mapped to what. | ||
60 | 2. Select the maps you are interested in -- all of them, or a particular | ||
61 | library, or the stack or the heap, etc. | ||
62 | 3. Open /proc/pid/pagemap and seek to the pages you would like to examine. | ||
63 | 4. Read a u64 for each page from pagemap. | ||
64 | 5. Open /proc/kpagecount and/or /proc/kpageflags. For each PFN you just | ||
65 | read, seek to that entry in the file, and read the data you want. | ||
66 | |||
67 | For example, to find the "unique set size" (USS), which is the amount of | ||
68 | memory that a process is using that is not shared with any other process, | ||
69 | you can go through every map in the process, find the PFNs, look those up | ||
70 | in kpagecount, and tally up the number of pages that are only referenced | ||
71 | once. | ||
72 | |||
73 | Other notes: | ||
74 | |||
75 | Reading from any of the files will return -EINVAL if you are not starting | ||
76 | the read on an 8-byte boundary (e.g., if you seeked an odd number of bytes | ||
77 | into the file), or if the size of the read is not a multiple of 8 bytes. | ||
@@ -96,5 +96,4 @@ missing-syscalls: scripts/checksyscalls.sh FORCE | |||
96 | $(call cmd,syscalls) | 96 | $(call cmd,syscalls) |
97 | 97 | ||
98 | # Delete all targets during make clean | 98 | # Delete all targets during make clean |
99 | clean-files := $(addprefix $(objtree)/,$(targets)) | 99 | clean-files := $(addprefix $(objtree)/,$(filter-out $(bounds-file) $(offsets-file),$(targets))) |
100 | |||
diff --git a/MAINTAINERS b/MAINTAINERS index c68a1189140c..cd587eec9fa7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -228,21 +228,21 @@ ACPI BATTERY DRIVERS | |||
228 | P: Alexey Starikovskiy | 228 | P: Alexey Starikovskiy |
229 | M: astarikovskiy@suse.de | 229 | M: astarikovskiy@suse.de |
230 | L: linux-acpi@vger.kernel.org | 230 | L: linux-acpi@vger.kernel.org |
231 | W: http://acpi.sourceforge.net/ | 231 | W: http://www.lesswatts.org/projects/acpi/ |
232 | S: Supported | 232 | S: Supported |
233 | 233 | ||
234 | ACPI EC DRIVER | 234 | ACPI EC DRIVER |
235 | P: Alexey Starikovskiy | 235 | P: Alexey Starikovskiy |
236 | M: astarikovskiy@suse.de | 236 | M: astarikovskiy@suse.de |
237 | L: linux-acpi@vger.kernel.org | 237 | L: linux-acpi@vger.kernel.org |
238 | W: http://acpi.sourceforge.net/ | 238 | W: http://www.lesswatts.org/projects/acpi/ |
239 | S: Supported | 239 | S: Supported |
240 | 240 | ||
241 | ACPI FAN DRIVER | 241 | ACPI FAN DRIVER |
242 | P: Len Brown | 242 | P: Len Brown |
243 | M: len.brown@intel.com | 243 | M: len.brown@intel.com |
244 | L: linux-acpi@vger.kernel.org | 244 | L: linux-acpi@vger.kernel.org |
245 | W: http://acpi.sourceforge.net/ | 245 | W: http://www.lesswatts.org/projects/acpi/ |
246 | S: Supported | 246 | S: Supported |
247 | 247 | ||
248 | ACPI PCI HOTPLUG DRIVER | 248 | ACPI PCI HOTPLUG DRIVER |
@@ -255,14 +255,14 @@ ACPI THERMAL DRIVER | |||
255 | P: Len Brown | 255 | P: Len Brown |
256 | M: len.brown@intel.com | 256 | M: len.brown@intel.com |
257 | L: linux-acpi@vger.kernel.org | 257 | L: linux-acpi@vger.kernel.org |
258 | W: http://acpi.sourceforge.net/ | 258 | W: http://www.lesswatts.org/projects/acpi/ |
259 | S: Supported | 259 | S: Supported |
260 | 260 | ||
261 | ACPI VIDEO DRIVER | 261 | ACPI VIDEO DRIVER |
262 | P: Rui Zhang | 262 | P: Rui Zhang |
263 | M: rui.zhang@intel.com | 263 | M: rui.zhang@intel.com |
264 | L: linux-acpi@vger.kernel.org | 264 | L: linux-acpi@vger.kernel.org |
265 | W: http://acpi.sourceforge.net/ | 265 | W: http://www.lesswatts.org/projects/acpi/ |
266 | S: Supported | 266 | S: Supported |
267 | 267 | ||
268 | ACPI WMI DRIVER | 268 | ACPI WMI DRIVER |
@@ -274,7 +274,7 @@ S: Maintained | |||
274 | 274 | ||
275 | AD1889 ALSA SOUND DRIVER | 275 | AD1889 ALSA SOUND DRIVER |
276 | P: Kyle McMartin | 276 | P: Kyle McMartin |
277 | M: kyle@parisc-linux.org | 277 | M: kyle@mcmartin.ca |
278 | P: Thibaut Varene | 278 | P: Thibaut Varene |
279 | M: T-Bone@parisc-linux.org | 279 | M: T-Bone@parisc-linux.org |
280 | W: http://wiki.parisc-linux.org/AD1889 | 280 | W: http://wiki.parisc-linux.org/AD1889 |
@@ -982,13 +982,6 @@ L: bonding-devel@lists.sourceforge.net | |||
982 | W: http://sourceforge.net/projects/bonding/ | 982 | W: http://sourceforge.net/projects/bonding/ |
983 | S: Supported | 983 | S: Supported |
984 | 984 | ||
985 | BROADBAND PROCESSOR ARCHITECTURE | ||
986 | P: Arnd Bergmann | ||
987 | M: arnd@arndb.de | ||
988 | L: linuxppc-dev@ozlabs.org | ||
989 | W: http://www.penguinppc.org/ppc64/ | ||
990 | S: Supported | ||
991 | |||
992 | BROADCOM B44 10/100 ETHERNET DRIVER | 985 | BROADCOM B44 10/100 ETHERNET DRIVER |
993 | P: Gary Zambrano | 986 | P: Gary Zambrano |
994 | M: zambrano@broadcom.com | 987 | M: zambrano@broadcom.com |
@@ -1002,8 +995,8 @@ L: netdev@vger.kernel.org | |||
1002 | S: Supported | 995 | S: Supported |
1003 | 996 | ||
1004 | BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER | 997 | BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER |
1005 | P: Eliezer Tamir | 998 | P: Eilon Greenstein |
1006 | M: eliezert@broadcom.com | 999 | M: eilong@broadcom.com |
1007 | L: netdev@vger.kernel.org | 1000 | L: netdev@vger.kernel.org |
1008 | S: Supported | 1001 | S: Supported |
1009 | 1002 | ||
@@ -1052,6 +1045,14 @@ L: linux-kernel@vger.kernel.org | |||
1052 | L: discuss@x86-64.org | 1045 | L: discuss@x86-64.org |
1053 | S: Maintained | 1046 | S: Maintained |
1054 | 1047 | ||
1048 | CELL BROADBAND ENGINE ARCHITECTURE | ||
1049 | P: Arnd Bergmann | ||
1050 | M: arnd@arndb.de | ||
1051 | L: linuxppc-dev@ozlabs.org | ||
1052 | L: cbe-oss-dev@ozlabs.org | ||
1053 | W: http://www.ibm.com/developerworks/power/cell/ | ||
1054 | S: Supported | ||
1055 | |||
1055 | CFAG12864B LCD DRIVER | 1056 | CFAG12864B LCD DRIVER |
1056 | P: Miguel Ojeda Sandonis | 1057 | P: Miguel Ojeda Sandonis |
1057 | M: maxextreme@gmail.com | 1058 | M: maxextreme@gmail.com |
@@ -1201,6 +1202,7 @@ M: pj@sgi.com | |||
1201 | M: menage@google.com | 1202 | M: menage@google.com |
1202 | L: linux-kernel@vger.kernel.org | 1203 | L: linux-kernel@vger.kernel.org |
1203 | W: http://www.bullopensource.org/cpuset/ | 1204 | W: http://www.bullopensource.org/cpuset/ |
1205 | W: http://oss.sgi.com/projects/cpusets/ | ||
1204 | S: Supported | 1206 | S: Supported |
1205 | 1207 | ||
1206 | CRAMFS FILESYSTEM | 1208 | CRAMFS FILESYSTEM |
@@ -1239,6 +1241,20 @@ L: video4linux-list@redhat.com | |||
1239 | W: http://linuxtv.org | 1241 | W: http://linuxtv.org |
1240 | S: Maintained | 1242 | S: Maintained |
1241 | 1243 | ||
1244 | CXGB3 ETHERNET DRIVER (CXGB3) | ||
1245 | P: Divy Le Ray | ||
1246 | M: divy@chelsio.com | ||
1247 | L: netdev@vger.kernel.org | ||
1248 | W: http://www.chelsio.com | ||
1249 | S: Supported | ||
1250 | |||
1251 | CXGB3 IWARP RNIC DRIVER (IW_CXGB3) | ||
1252 | P: Steve Wise | ||
1253 | M: swise@chelsio.com | ||
1254 | L: general@lists.openfabrics.org | ||
1255 | W: http://www.openfabrics.org | ||
1256 | S: Supported | ||
1257 | |||
1242 | CYBERPRO FB DRIVER | 1258 | CYBERPRO FB DRIVER |
1243 | P: Russell King | 1259 | P: Russell King |
1244 | M: rmk@arm.linux.org.uk | 1260 | M: rmk@arm.linux.org.uk |
@@ -1596,7 +1612,7 @@ ETHERNET BRIDGE | |||
1596 | P: Stephen Hemminger | 1612 | P: Stephen Hemminger |
1597 | M: shemminger@linux-foundation.org | 1613 | M: shemminger@linux-foundation.org |
1598 | L: bridge@lists.linux-foundation.org | 1614 | L: bridge@lists.linux-foundation.org |
1599 | W: http://bridge.sourceforge.net/ | 1615 | W: http://www.linux-foundation.org/en/Net:Bridge |
1600 | S: Maintained | 1616 | S: Maintained |
1601 | 1617 | ||
1602 | ETHERTEAM 16I DRIVER | 1618 | ETHERTEAM 16I DRIVER |
@@ -1645,8 +1661,10 @@ W: http://linux-fbdev.sourceforge.net/ | |||
1645 | S: Maintained | 1661 | S: Maintained |
1646 | 1662 | ||
1647 | FREESCALE DMA DRIVER | 1663 | FREESCALE DMA DRIVER |
1648 | P; Zhang Wei | 1664 | P: Li Yang |
1649 | M: wei.zhang@freescale.com | 1665 | M: leoli@freescale.com |
1666 | P: Zhang Wei | ||
1667 | M: zw@zh-kernel.org | ||
1650 | L: linuxppc-embedded@ozlabs.org | 1668 | L: linuxppc-embedded@ozlabs.org |
1651 | L: linux-kernel@vger.kernel.org | 1669 | L: linux-kernel@vger.kernel.org |
1652 | S: Maintained | 1670 | S: Maintained |
@@ -1810,7 +1828,7 @@ S: Maintained | |||
1810 | 1828 | ||
1811 | HARMONY SOUND DRIVER | 1829 | HARMONY SOUND DRIVER |
1812 | P: Kyle McMartin | 1830 | P: Kyle McMartin |
1813 | M: kyle@parisc-linux.org | 1831 | M: kyle@mcmartin.ca |
1814 | L: linux-parisc@vger.kernel.org | 1832 | L: linux-parisc@vger.kernel.org |
1815 | S: Maintained | 1833 | S: Maintained |
1816 | 1834 | ||
@@ -2329,7 +2347,8 @@ S: Maintained | |||
2329 | KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) | 2347 | KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) |
2330 | P: Sam Ravnborg | 2348 | P: Sam Ravnborg |
2331 | M: sam@ravnborg.org | 2349 | M: sam@ravnborg.org |
2332 | T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git | 2350 | T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-next.git |
2351 | T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-fixes.git | ||
2333 | L: linux-kbuild@vger.kernel.org | 2352 | L: linux-kbuild@vger.kernel.org |
2334 | S: Maintained | 2353 | S: Maintained |
2335 | 2354 | ||
@@ -2351,24 +2370,24 @@ S: Supported | |||
2351 | KERNEL VIRTUAL MACHINE (KVM) | 2370 | KERNEL VIRTUAL MACHINE (KVM) |
2352 | P: Avi Kivity | 2371 | P: Avi Kivity |
2353 | M: avi@qumranet.com | 2372 | M: avi@qumranet.com |
2354 | L: kvm-devel@lists.sourceforge.net | 2373 | L: kvm@vger.kernel.org |
2355 | W: kvm.sourceforge.net | 2374 | W: http://kvm.qumranet.com |
2356 | S: Supported | 2375 | S: Supported |
2357 | 2376 | ||
2358 | KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC | 2377 | KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC |
2359 | P: Hollis Blanchard | 2378 | P: Hollis Blanchard |
2360 | M: hollisb@us.ibm.com | 2379 | M: hollisb@us.ibm.com |
2361 | L: kvm-ppc-devel@lists.sourceforge.net | 2380 | L: kvm-ppc@vger.kernel.org |
2362 | W: kvm.sourceforge.net | 2381 | W: http://kvm.qumranet.com |
2363 | S: Supported | 2382 | S: Supported |
2364 | 2383 | ||
2365 | KERNEL VIRTUAL MACHINE For Itanium(KVM/IA64) | 2384 | KERNEL VIRTUAL MACHINE For Itanium (KVM/IA64) |
2366 | P: Anthony Xu | 2385 | P: Anthony Xu |
2367 | M: anthony.xu@intel.com | 2386 | M: anthony.xu@intel.com |
2368 | P: Xiantao Zhang | 2387 | P: Xiantao Zhang |
2369 | M: xiantao.zhang@intel.com | 2388 | M: xiantao.zhang@intel.com |
2370 | L: kvm-ia64-devel@lists.sourceforge.net | 2389 | L: kvm-ia64@vger.kernel.org |
2371 | W: kvm.sourceforge.net | 2390 | W: http://kvm.qumranet.com |
2372 | S: Supported | 2391 | S: Supported |
2373 | 2392 | ||
2374 | KERNEL VIRTUAL MACHINE for s390 (KVM/s390) | 2393 | KERNEL VIRTUAL MACHINE for s390 (KVM/s390) |
@@ -2547,7 +2566,6 @@ LINUX SECURITY MODULE (LSM) FRAMEWORK | |||
2547 | P: Chris Wright | 2566 | P: Chris Wright |
2548 | M: chrisw@sous-sol.org | 2567 | M: chrisw@sous-sol.org |
2549 | L: linux-security-module@vger.kernel.org | 2568 | L: linux-security-module@vger.kernel.org |
2550 | W: http://lsm.immunix.org | ||
2551 | T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git | 2569 | T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git |
2552 | S: Supported | 2570 | S: Supported |
2553 | 2571 | ||
@@ -2819,6 +2837,15 @@ M: jirislaby@gmail.com | |||
2819 | L: linux-kernel@vger.kernel.org | 2837 | L: linux-kernel@vger.kernel.org |
2820 | S: Maintained | 2838 | S: Maintained |
2821 | 2839 | ||
2840 | MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE) | ||
2841 | P: Andrew Gallatin | ||
2842 | M: gallatin@myri.com | ||
2843 | P: Brice Goglin | ||
2844 | M: brice@myri.com | ||
2845 | L: netdev@vger.kernel.org | ||
2846 | W: http://www.myri.com/scs/download-Myri10GE.html | ||
2847 | S: Supported | ||
2848 | |||
2822 | NATSEMI ETHERNET DRIVER (DP8381x) | 2849 | NATSEMI ETHERNET DRIVER (DP8381x) |
2823 | P: Tim Hockin | 2850 | P: Tim Hockin |
2824 | M: thockin@hockin.org | 2851 | M: thockin@hockin.org |
@@ -2839,8 +2866,8 @@ S: Maintained | |||
2839 | NETEFFECT IWARP RNIC DRIVER (IW_NES) | 2866 | NETEFFECT IWARP RNIC DRIVER (IW_NES) |
2840 | P: Faisal Latif | 2867 | P: Faisal Latif |
2841 | M: flatif@neteffect.com | 2868 | M: flatif@neteffect.com |
2842 | P: Nishi Gupta | 2869 | P: Chien Tung |
2843 | M: ngupta@neteffect.com | 2870 | M: ctung@neteffect.com |
2844 | P: Glenn Streiff | 2871 | P: Glenn Streiff |
2845 | M: gstreiff@neteffect.com | 2872 | M: gstreiff@neteffect.com |
2846 | L: general@lists.openfabrics.org | 2873 | L: general@lists.openfabrics.org |
@@ -3094,7 +3121,7 @@ S: Maintained | |||
3094 | 3121 | ||
3095 | PARISC ARCHITECTURE | 3122 | PARISC ARCHITECTURE |
3096 | P: Kyle McMartin | 3123 | P: Kyle McMartin |
3097 | M: kyle@parisc-linux.org | 3124 | M: kyle@mcmartin.ca |
3098 | P: Matthew Wilcox | 3125 | P: Matthew Wilcox |
3099 | M: matthew@wil.cx | 3126 | M: matthew@wil.cx |
3100 | P: Grant Grundler | 3127 | P: Grant Grundler |
@@ -3132,7 +3159,7 @@ PCI ERROR RECOVERY | |||
3132 | P: Linas Vepstas | 3159 | P: Linas Vepstas |
3133 | M: linas@austin.ibm.com | 3160 | M: linas@austin.ibm.com |
3134 | L: linux-kernel@vger.kernel.org | 3161 | L: linux-kernel@vger.kernel.org |
3135 | L: linux-pci@atrey.karlin.mff.cuni.cz | 3162 | L: linux-pci@vger.kernel.org |
3136 | S: Supported | 3163 | S: Supported |
3137 | 3164 | ||
3138 | PCI SUBSYSTEM | 3165 | PCI SUBSYSTEM |
@@ -3238,7 +3265,7 @@ S: Maintained | |||
3238 | 3265 | ||
3239 | PPP OVER ETHERNET | 3266 | PPP OVER ETHERNET |
3240 | P: Michal Ostrowski | 3267 | P: Michal Ostrowski |
3241 | M: mostrows@speakeasy.net | 3268 | M: mostrows@earthlink.net |
3242 | S: Maintained | 3269 | S: Maintained |
3243 | 3270 | ||
3244 | PPP OVER L2TP | 3271 | PPP OVER L2TP |
@@ -3303,9 +3330,11 @@ L: video4linux-list@redhat.com | |||
3303 | W: http://www.isely.net/pvrusb2/ | 3330 | W: http://www.isely.net/pvrusb2/ |
3304 | S: Maintained | 3331 | S: Maintained |
3305 | 3332 | ||
3306 | PXA2xx SUPPORT | 3333 | PXA2xx/PXA3xx SUPPORT |
3307 | P: Nicolas Pitre | 3334 | P: Eric Miao |
3308 | M: nico@cam.org | 3335 | M: eric.miao@marvell.com |
3336 | P: Russell King | ||
3337 | M: linux@arm.linux.org.uk | ||
3309 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | 3338 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) |
3310 | S: Maintained | 3339 | S: Maintained |
3311 | 3340 | ||
@@ -3412,10 +3441,7 @@ L: rtc-linux@googlegroups.com | |||
3412 | S: Maintained | 3441 | S: Maintained |
3413 | 3442 | ||
3414 | REISERFS FILE SYSTEM | 3443 | REISERFS FILE SYSTEM |
3415 | P: Hans Reiser | ||
3416 | M: reiserfs-dev@namesys.com | ||
3417 | L: reiserfs-devel@vger.kernel.org | 3444 | L: reiserfs-devel@vger.kernel.org |
3418 | W: http://www.namesys.com | ||
3419 | S: Supported | 3445 | S: Supported |
3420 | 3446 | ||
3421 | RFKILL | 3447 | RFKILL |
@@ -3635,13 +3661,6 @@ M: romieu@fr.zoreil.com | |||
3635 | L: netdev@vger.kernel.org | 3661 | L: netdev@vger.kernel.org |
3636 | S: Maintained | 3662 | S: Maintained |
3637 | 3663 | ||
3638 | SIS 5513 IDE CONTROLLER DRIVER | ||
3639 | P: Lionel Bouton | ||
3640 | M: Lionel.Bouton@inet6.fr | ||
3641 | W: http://inet6.dyn.dhs.org/sponsoring/sis5513/index.html | ||
3642 | W: http://gyver.homeip.net/sis5513/index.html | ||
3643 | S: Maintained | ||
3644 | |||
3645 | SIS 900/7016 FAST ETHERNET DRIVER | 3664 | SIS 900/7016 FAST ETHERNET DRIVER |
3646 | P: Daniele Venzano | 3665 | P: Daniele Venzano |
3647 | M: venza@brownhat.org | 3666 | M: venza@brownhat.org |
@@ -3766,6 +3785,14 @@ M: dbrownell@users.sourceforge.net | |||
3766 | L: spi-devel-general@lists.sourceforge.net | 3785 | L: spi-devel-general@lists.sourceforge.net |
3767 | S: Maintained | 3786 | S: Maintained |
3768 | 3787 | ||
3788 | SPU FILE SYSTEM | ||
3789 | P: Jeremy Kerr | ||
3790 | M: jk@ozlabs.org | ||
3791 | L: linuxppc-dev@ozlabs.org | ||
3792 | L: cbe-oss-dev@ozlabs.org | ||
3793 | W: http://www.ibm.com/developerworks/power/cell/ | ||
3794 | S: Supported | ||
3795 | |||
3769 | STABLE BRANCH: | 3796 | STABLE BRANCH: |
3770 | P: Greg Kroah-Hartman | 3797 | P: Greg Kroah-Hartman |
3771 | M: greg@kroah.com | 3798 | M: greg@kroah.com |
@@ -3999,7 +4026,7 @@ TULIP NETWORK DRIVERS | |||
3999 | P: Grant Grundler | 4026 | P: Grant Grundler |
4000 | M: grundler@parisc-linux.org | 4027 | M: grundler@parisc-linux.org |
4001 | P: Kyle McMartin | 4028 | P: Kyle McMartin |
4002 | M: kyle@parisc-linux.org | 4029 | M: kyle@mcmartin.ca |
4003 | L: netdev@vger.kernel.org | 4030 | L: netdev@vger.kernel.org |
4004 | S: Maintained | 4031 | S: Maintained |
4005 | 4032 | ||
@@ -4021,12 +4048,41 @@ M: ballabio_dario@emc.com | |||
4021 | L: linux-scsi@vger.kernel.org | 4048 | L: linux-scsi@vger.kernel.org |
4022 | S: Maintained | 4049 | S: Maintained |
4023 | 4050 | ||
4051 | UCLINUX (AND M68KNOMMU) | ||
4052 | P: Greg Ungerer | ||
4053 | M: gerg@uclinux.org | ||
4054 | W: http://www.uclinux.org/ | ||
4055 | L: uclinux-dev@uclinux.org (subscribers-only) | ||
4056 | S: Maintained | ||
4057 | |||
4058 | UCLINUX FOR NEC V850 | ||
4059 | P: Miles Bader | ||
4060 | |||
4061 | UCLINUX FOR RENESAS H8/300 | ||
4062 | P: Yoshinori Sato | ||
4063 | M: ysato@users.sourceforge.jp | ||
4064 | W: http://uclinux-h8.sourceforge.jp/ | ||
4065 | S: Supported | ||
4066 | |||
4024 | UDF FILESYSTEM | 4067 | UDF FILESYSTEM |
4025 | P: Jan Kara | 4068 | P: Jan Kara |
4026 | M: jack@suse.cz | 4069 | M: jack@suse.cz |
4027 | W: http://linux-udf.sourceforge.net | 4070 | W: http://linux-udf.sourceforge.net |
4028 | S: Maintained | 4071 | S: Maintained |
4029 | 4072 | ||
4073 | UFS FILESYSTEM | ||
4074 | P: Evgeniy Dushistov | ||
4075 | M: dushistov@mail.ru | ||
4076 | L: linux-kernel@vger.kernel.org | ||
4077 | S: Maintained | ||
4078 | |||
4079 | UltraSPARC (sparc64): | ||
4080 | P: David S. Miller | ||
4081 | M: davem@davemloft.net | ||
4082 | L: sparclinux@vger.kernel.org | ||
4083 | T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git | ||
4084 | S: Maintained | ||
4085 | |||
4030 | UNIFORM CDROM DRIVER | 4086 | UNIFORM CDROM DRIVER |
4031 | P: Jens Axboe | 4087 | P: Jens Axboe |
4032 | M: axboe@kernel.dk | 4088 | M: axboe@kernel.dk |
@@ -4073,6 +4129,13 @@ L: netdev@vger.kernel.org | |||
4073 | W: http://www.linux-usb.org/usbnet | 4129 | W: http://www.linux-usb.org/usbnet |
4074 | S: Maintained | 4130 | S: Maintained |
4075 | 4131 | ||
4132 | USB DIAMOND RIO500 DRIVER | ||
4133 | P: Cesar Miquel | ||
4134 | M: miquel@df.uba.ar | ||
4135 | L: rio500-users@lists.sourceforge.net | ||
4136 | W: http://rio500.sourceforge.net | ||
4137 | S: Maintained | ||
4138 | |||
4076 | USB EHCI DRIVER | 4139 | USB EHCI DRIVER |
4077 | P: David Brownell | 4140 | P: David Brownell |
4078 | M: dbrownell@users.sourceforge.net | 4141 | M: dbrownell@users.sourceforge.net |
@@ -4304,6 +4367,14 @@ M: gregkh@suse.de | |||
4304 | L: linux-kernel@vger.kernel.org | 4367 | L: linux-kernel@vger.kernel.org |
4305 | S: Maintained | 4368 | S: Maintained |
4306 | 4369 | ||
4370 | UTIL-LINUX-NG PACKAGE | ||
4371 | P: Karel Zak | ||
4372 | M: kzak@redhat.com | ||
4373 | L: util-linux-ng@vger.kernel.org | ||
4374 | W: http://kernel.org/~kzak/util-linux-ng/ | ||
4375 | T: git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git | ||
4376 | S: Maintained | ||
4377 | |||
4307 | VFAT/FAT/MSDOS FILESYSTEM: | 4378 | VFAT/FAT/MSDOS FILESYSTEM: |
4308 | P: OGAWA Hirofumi | 4379 | P: OGAWA Hirofumi |
4309 | M: hirofumi@mail.parknet.co.jp | 4380 | M: hirofumi@mail.parknet.co.jp |
@@ -4327,42 +4398,6 @@ M: romieu@fr.zoreil.com | |||
4327 | L: netdev@vger.kernel.org | 4398 | L: netdev@vger.kernel.org |
4328 | S: Maintained | 4399 | S: Maintained |
4329 | 4400 | ||
4330 | UCLINUX (AND M68KNOMMU) | ||
4331 | P: Greg Ungerer | ||
4332 | M: gerg@uclinux.org | ||
4333 | W: http://www.uclinux.org/ | ||
4334 | L: uclinux-dev@uclinux.org (subscribers-only) | ||
4335 | S: Maintained | ||
4336 | |||
4337 | UCLINUX FOR NEC V850 | ||
4338 | P: Miles Bader | ||
4339 | |||
4340 | UCLINUX FOR RENESAS H8/300 | ||
4341 | P: Yoshinori Sato | ||
4342 | M: ysato@users.sourceforge.jp | ||
4343 | W: http://uclinux-h8.sourceforge.jp/ | ||
4344 | S: Supported | ||
4345 | |||
4346 | UFS FILESYSTEM | ||
4347 | P: Evgeniy Dushistov | ||
4348 | M: dushistov@mail.ru | ||
4349 | L: linux-kernel@vger.kernel.org | ||
4350 | S: Maintained | ||
4351 | |||
4352 | UltraSPARC (sparc64): | ||
4353 | P: David S. Miller | ||
4354 | M: davem@davemloft.net | ||
4355 | L: sparclinux@vger.kernel.org | ||
4356 | T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git | ||
4357 | S: Maintained | ||
4358 | |||
4359 | USB DIAMOND RIO500 DRIVER | ||
4360 | P: Cesar Miquel | ||
4361 | M: miquel@df.uba.ar | ||
4362 | L: rio500-users@lists.sourceforge.net | ||
4363 | W: http://rio500.sourceforge.net | ||
4364 | S: Maintained | ||
4365 | |||
4366 | VIDEO FOR LINUX | 4401 | VIDEO FOR LINUX |
4367 | P: Mauro Carvalho Chehab | 4402 | P: Mauro Carvalho Chehab |
4368 | M: mchehab@infradead.org | 4403 | M: mchehab@infradead.org |
@@ -1,8 +1,8 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 26 | 3 | SUBLEVEL = 26 |
4 | EXTRAVERSION = -rc3 | 4 | EXTRAVERSION = -rc6 |
5 | NAME = Funky Weasel is Jiggy wit it | 5 | NAME = Rotary Wombat |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
@@ -1114,6 +1114,7 @@ MRPROPER_DIRS += include/config include2 usr/include | |||
1114 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ | 1114 | MRPROPER_FILES += .config .config.old include/asm .version .old_version \ |
1115 | include/linux/autoconf.h include/linux/version.h \ | 1115 | include/linux/autoconf.h include/linux/version.h \ |
1116 | include/linux/utsrelease.h \ | 1116 | include/linux/utsrelease.h \ |
1117 | include/linux/bounds.h include/asm*/asm-offsets.h \ | ||
1117 | Module.symvers tags TAGS cscope* | 1118 | Module.symvers tags TAGS cscope* |
1118 | 1119 | ||
1119 | # clean - Delete most, but leave enough to build external modules | 1120 | # clean - Delete most, but leave enough to build external modules |
@@ -1431,7 +1432,7 @@ define xtags | |||
1431 | elif $1 --version 2>&1 | grep -iq emacs; then \ | 1432 | elif $1 --version 2>&1 | grep -iq emacs; then \ |
1432 | $(all-sources) | xargs $1 -a; \ | 1433 | $(all-sources) | xargs $1 -a; \ |
1433 | $(all-kconfigs) | xargs $1 -a \ | 1434 | $(all-kconfigs) | xargs $1 -a \ |
1434 | --regex='/^[ \t]*(menu|)config[ \t]+\([a-zA-Z0-9_]+\)/\2/'; \ | 1435 | --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \ |
1435 | $(all-defconfigs) | xargs -r $1 -a \ | 1436 | $(all-defconfigs) | xargs -r $1 -a \ |
1436 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ | 1437 | --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ |
1437 | else \ | 1438 | else \ |
diff --git a/arch/alpha/kernel/init_task.c b/arch/alpha/kernel/init_task.c index 835d09a7b332..1f762189fa64 100644 --- a/arch/alpha/kernel/init_task.c +++ b/arch/alpha/kernel/init_task.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | 10 | ||
11 | static struct fs_struct init_fs = INIT_FS; | 11 | static struct fs_struct init_fs = INIT_FS; |
12 | static struct files_struct init_files = INIT_FILES; | ||
13 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
14 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
15 | struct mm_struct init_mm = INIT_MM(init_mm); | 14 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index 67ea99ef6521..dd3fbd6766e1 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S | |||
@@ -33,10 +33,6 @@ __XScale_start: | |||
33 | bic r0, r0, #0x1000 @ clear Icache | 33 | bic r0, r0, #0x1000 @ clear Icache |
34 | mcr p15, 0, r0, c1, c0, 0 | 34 | mcr p15, 0, r0, c1, c0, 0 |
35 | 35 | ||
36 | #ifdef CONFIG_ARCH_COTULLA_IDP | ||
37 | mov r7, #MACH_TYPE_COTULLA_IDP | ||
38 | #endif | ||
39 | |||
40 | #ifdef CONFIG_ARCH_IXP2000 | 36 | #ifdef CONFIG_ARCH_IXP2000 |
41 | mov r1, #-1 | 37 | mov r1, #-1 |
42 | mov r0, #0xd6000000 | 38 | mov r0, #0xd6000000 |
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c index bd4ef53bc6b9..8b8c9d38a761 100644 --- a/arch/arm/kernel/init_task.c +++ b/arch/arm/kernel/init_task.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | 14 | ||
15 | static struct fs_struct init_fs = INIT_FS; | 15 | static struct fs_struct init_fs = INIT_FS; |
16 | static struct files_struct init_files = INIT_FILES; | ||
17 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
18 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
19 | struct mm_struct init_mm = INIT_MM(init_mm); | 18 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c index 1de121fc55f4..f44647738ee4 100644 --- a/arch/arm/mach-at91/at91x40.c +++ b/arch/arm/mach-at91/at91x40.c | |||
@@ -16,16 +16,32 @@ | |||
16 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
17 | #include <asm/arch/at91x40.h> | 17 | #include <asm/arch/at91x40.h> |
18 | #include <asm/arch/at91_st.h> | 18 | #include <asm/arch/at91_st.h> |
19 | #include <asm/arch/timex.h> | ||
19 | #include "generic.h" | 20 | #include "generic.h" |
20 | 21 | ||
21 | /* | 22 | /* |
22 | * This is used in the gpio code, stub locally. | 23 | * Export the clock functions for the AT91X40. Some external code common |
24 | * to all AT91 family parts relys on this, like the gpio and serial support. | ||
23 | */ | 25 | */ |
24 | int clk_enable(struct clk *clk) | 26 | int clk_enable(struct clk *clk) |
25 | { | 27 | { |
26 | return 0; | 28 | return 0; |
27 | } | 29 | } |
28 | 30 | ||
31 | void clk_disable(struct clk *clk) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | unsigned long clk_get_rate(struct clk *clk) | ||
36 | { | ||
37 | return AT91X40_MASTER_CLOCK; | ||
38 | } | ||
39 | |||
40 | struct clk *clk_get(struct device *dev, const char *id) | ||
41 | { | ||
42 | return NULL; | ||
43 | } | ||
44 | |||
29 | void __init at91x40_initialize(unsigned long main_clock) | 45 | void __init at91x40_initialize(unsigned long main_clock) |
30 | { | 46 | { |
31 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) | 47 | at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 92d79fb39311..62e653a3ea1a 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -369,7 +369,8 @@ static int impd1_probe(struct lm_device *dev) | |||
369 | 369 | ||
370 | lm_set_drvdata(dev, impd1); | 370 | lm_set_drvdata(dev, impd1); |
371 | 371 | ||
372 | printk("IM-PD1 found at 0x%08lx\n", dev->resource.start); | 372 | printk("IM-PD1 found at 0x%08lx\n", |
373 | (unsigned long)dev->resource.start); | ||
373 | 374 | ||
374 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { | 375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { |
375 | impd1->vcos[i].owner = THIS_MODULE, | 376 | impd1->vcos[i].owner = THIS_MODULE, |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index d55fa4e9bb43..c07f497000ca 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -405,7 +405,6 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
405 | addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, | 405 | addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, |
406 | v3_readb(V3_LB_ISTAT)); | 406 | v3_readb(V3_LB_ISTAT)); |
407 | printk(KERN_DEBUG "%s", buf); | 407 | printk(KERN_DEBUG "%s", buf); |
408 | printascii(buf); | ||
409 | #endif | 408 | #endif |
410 | 409 | ||
411 | v3_writeb(V3_LB_ISTAT, 0); | 410 | v3_writeb(V3_LB_ISTAT, 0); |
@@ -447,6 +446,7 @@ static irqreturn_t v3_irq(int dummy, void *devid) | |||
447 | unsigned long pc = instruction_pointer(regs); | 446 | unsigned long pc = instruction_pointer(regs); |
448 | unsigned long instr = *(unsigned long *)pc; | 447 | unsigned long instr = *(unsigned long *)pc; |
449 | char buf[128]; | 448 | char buf[128]; |
449 | extern void printascii(const char *); | ||
450 | 450 | ||
451 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " | 451 | sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " |
452 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, | 452 | "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index a0b16a7e8a04..a4d20127a60e 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
27 | #include <linux/spi/tsc2102.h> | ||
28 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
29 | #include <linux/apm-emulation.h> | 28 | #include <linux/apm-emulation.h> |
30 | 29 | ||
@@ -315,14 +314,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) | |||
315 | #define palmte_get_power_status NULL | 314 | #define palmte_get_power_status NULL |
316 | #endif | 315 | #endif |
317 | 316 | ||
318 | static struct tsc2102_config palmte_tsc2102_config = { | ||
319 | .use_internal = 0, | ||
320 | .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP, | ||
321 | .temp_at25c = { 2200, 2615 }, | ||
322 | .apm_report = palmte_get_power_status, | ||
323 | .alsa_config = &palmte_alsa_config, | ||
324 | }; | ||
325 | |||
326 | static struct omap_board_config_kernel palmte_config[] __initdata = { | 317 | static struct omap_board_config_kernel palmte_config[] __initdata = { |
327 | { OMAP_TAG_USB, &palmte_usb_config }, | 318 | { OMAP_TAG_USB, &palmte_usb_config }, |
328 | { OMAP_TAG_MMC, &palmte_mmc_config }, | 319 | { OMAP_TAG_MMC, &palmte_mmc_config }, |
@@ -336,7 +327,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = { | |||
336 | .bus_num = 2, /* uWire (officially) */ | 327 | .bus_num = 2, /* uWire (officially) */ |
337 | .chip_select = 0, /* As opposed to 3 */ | 328 | .chip_select = 0, /* As opposed to 3 */ |
338 | .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO), | 329 | .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO), |
339 | .platform_data = &palmte_tsc2102_config, | ||
340 | .max_speed_hz = 8000000, | 330 | .max_speed_hz = 8000000, |
341 | }, | 331 | }, |
342 | }; | 332 | }; |
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index 6d4416a4f378..f5851d1adc25 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c | |||
@@ -59,7 +59,7 @@ static struct resource cmx270_dm9k_resource[] = { | |||
59 | [2] = { | 59 | [2] = { |
60 | .start = CMX270_ETHIRQ, | 60 | .start = CMX270_ETHIRQ, |
61 | .end = CMX270_ETHIRQ, | 61 | .end = CMX270_ETHIRQ, |
62 | .flags = IORESOURCE_IRQ, | 62 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
63 | } | 63 | } |
64 | }; | 64 | }; |
65 | 65 | ||
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index edc4f07a230d..9c57700ee5c2 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -50,7 +50,7 @@ static struct resource em_x270_dm9k_resource[] = { | |||
50 | [2] = { | 50 | [2] = { |
51 | .start = EM_X270_ETHIRQ, | 51 | .start = EM_X270_ETHIRQ, |
52 | .end = EM_X270_ETHIRQ, | 52 | .end = EM_X270_ETHIRQ, |
53 | .flags = IORESOURCE_IRQ, | 53 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
54 | } | 54 | } |
55 | }; | 55 | }; |
56 | 56 | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index dace3820f1ee..e7d0fcd9b43f 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/arch/pxa-regs.h> | 38 | #include <asm/arch/pxa-regs.h> |
39 | #include <asm/arch/pxa2xx-regs.h> | 39 | #include <asm/arch/pxa2xx-regs.h> |
40 | #include <asm/arch/pxa2xx-gpio.h> | 40 | #include <asm/arch/pxa2xx-gpio.h> |
41 | #include <asm/arch/pxa27x-udc.h> | ||
42 | #include <asm/arch/irda.h> | 41 | #include <asm/arch/irda.h> |
43 | #include <asm/arch/mmc.h> | 42 | #include <asm/arch/mmc.h> |
44 | #include <asm/arch/ohci.h> | 43 | #include <asm/arch/ohci.h> |
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 00af7f2fed66..0bb31982fb6f 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -330,7 +330,7 @@ struct ssp_device *ssp_request(int port, const char *label) | |||
330 | 330 | ||
331 | mutex_unlock(&ssp_lock); | 331 | mutex_unlock(&ssp_lock); |
332 | 332 | ||
333 | if (ssp->port_id != port) | 333 | if (&ssp->node == &ssp_list) |
334 | return NULL; | 334 | return NULL; |
335 | 335 | ||
336 | return ssp; | 336 | return ssp; |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index c2cbd66db814..ab4a9f579913 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -467,8 +467,8 @@ static struct platform_device *devices[] __initdata = { | |||
467 | 467 | ||
468 | static void tosa_poweroff(void) | 468 | static void tosa_poweroff(void) |
469 | { | 469 | { |
470 | pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT); | 470 | gpio_direction_output(TOSA_GPIO_ON_RESET, 0); |
471 | GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET); | 471 | gpio_set_value(TOSA_GPIO_ON_RESET, 1); |
472 | 472 | ||
473 | mdelay(1000); | 473 | mdelay(1000); |
474 | arm_machine_restart('h'); | 474 | arm_machine_restart('h'); |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 661a2358ac22..27f63d5d3a7b 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -374,7 +374,7 @@ static struct resource bast_dm9k_resource[] = { | |||
374 | [2] = { | 374 | [2] = { |
375 | .start = IRQ_DM9000, | 375 | .start = IRQ_DM9000, |
376 | .end = IRQ_DM9000, | 376 | .end = IRQ_DM9000, |
377 | .flags = IORESOURCE_IRQ, | 377 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
378 | } | 378 | } |
379 | 379 | ||
380 | }; | 380 | }; |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index c56423373ff3..4c4b5c4207c4 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -263,7 +263,7 @@ static struct resource vr1000_dm9k0_resource[] = { | |||
263 | [2] = { | 263 | [2] = { |
264 | .start = IRQ_VR1000_DM9000A, | 264 | .start = IRQ_VR1000_DM9000A, |
265 | .end = IRQ_VR1000_DM9000A, | 265 | .end = IRQ_VR1000_DM9000A, |
266 | .flags = IORESOURCE_IRQ | 266 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
267 | } | 267 | } |
268 | 268 | ||
269 | }; | 269 | }; |
@@ -282,7 +282,7 @@ static struct resource vr1000_dm9k1_resource[] = { | |||
282 | [2] = { | 282 | [2] = { |
283 | .start = IRQ_VR1000_DM9000N, | 283 | .start = IRQ_VR1000_DM9000N, |
284 | .end = IRQ_VR1000_DM9000N, | 284 | .end = IRQ_VR1000_DM9000N, |
285 | .flags = IORESOURCE_IRQ | 285 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, |
286 | } | 286 | } |
287 | }; | 287 | }; |
288 | 288 | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 6496eb645cee..2f772a3965c4 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -225,26 +225,28 @@ static void __init collie_init(void) | |||
225 | int ret = 0; | 225 | int ret = 0; |
226 | 226 | ||
227 | /* cpu initialize */ | 227 | /* cpu initialize */ |
228 | GAFR = ( GPIO_SSP_TXD | \ | 228 | GAFR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK | |
229 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK | GPIO_TIC_ACK | \ | 229 | GPIO_MCP_CLK | GPIO_32_768kHz; |
230 | GPIO_32_768kHz ); | 230 | |
231 | 231 | GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | | |
232 | GPDR = ( GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | \ | 232 | GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | |
233 | GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | \ | 233 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | |
234 | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | \ | 234 | COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON | |
235 | GPIO_SDLC_AAF | GPIO_UART_SCLK1 | GPIO_32_768kHz ); | 235 | COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz; |
236 | GPLR = GPIO_GPIO18; | 236 | |
237 | 237 | PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | | |
238 | // PPC pin setting | 238 | PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | |
239 | PPDR = ( PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | \ | 239 | PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM; |
240 | PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | \ | 240 | |
241 | PPC_TXD1 | PPC_TXD2 | PPC_RXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM ); | 241 | PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY | |
242 | 242 | COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC; | |
243 | PSDR = ( PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4 ); | 243 | |
244 | 244 | PGSR = COLLIE_GPIO_nREMOCON_ON; | |
245 | GAFR |= GPIO_32_768kHz; | 245 | |
246 | GPDR |= GPIO_32_768kHz; | 246 | PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4; |
247 | TUCR = TUCR_32_768kHz; | 247 | |
248 | PCFR = PCFR_OPDE; | ||
249 | |||
248 | 250 | ||
249 | platform_scoop_config = &collie_pcmcia_config; | 251 | platform_scoop_config = &collie_pcmcia_config; |
250 | 252 | ||
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 2946c193a7d6..2db5580048d8 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/cpufreq.h> | ||
24 | 25 | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | 27 | ||
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c index f197bb3a2366..2f01af5f64c4 100644 --- a/arch/arm/plat-s3c24xx/s3c244x.c +++ b/arch/arm/plat-s3c24xx/s3c244x.c | |||
@@ -65,6 +65,7 @@ void __init s3c244x_map_io(struct map_desc *mach_desc, int size) | |||
65 | 65 | ||
66 | /* rename any peripherals used differing from the s3c2410 */ | 66 | /* rename any peripherals used differing from the s3c2410 */ |
67 | 67 | ||
68 | s3c_device_sdi.name = "s3c2440-sdi"; | ||
68 | s3c_device_i2c.name = "s3c2440-i2c"; | 69 | s3c_device_i2c.name = "s3c2440-i2c"; |
69 | s3c_device_nand.name = "s3c2440-nand"; | 70 | s3c_device_nand.name = "s3c2440-nand"; |
70 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; | 71 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; |
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index 06046074d68b..119edb839ac3 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24-rc7 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Wed Jan 9 23:20:41 2008 | 4 | # Mon May 26 13:30:59 2008 |
5 | # | 5 | # |
6 | CONFIG_AVR32=y | 6 | CONFIG_AVR32=y |
7 | CONFIG_GENERIC_GPIO=y | 7 | CONFIG_GENERIC_GPIO=y |
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y | |||
13 | CONFIG_GENERIC_IRQ_PROBE=y | 13 | CONFIG_GENERIC_IRQ_PROBE=y |
14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
15 | CONFIG_GENERIC_TIME=y | 15 | CONFIG_GENERIC_TIME=y |
16 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
16 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 17 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
17 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
18 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
19 | CONFIG_ARCH_SUPPORTS_OPROFILE=y | ||
20 | CONFIG_GENERIC_HWEIGHT=y | 20 | CONFIG_GENERIC_HWEIGHT=y |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 21 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
22 | CONFIG_GENERIC_BUG=y | 22 | CONFIG_GENERIC_BUG=y |
@@ -37,17 +37,15 @@ CONFIG_POSIX_MQUEUE=y | |||
37 | CONFIG_BSD_PROCESS_ACCT=y | 37 | CONFIG_BSD_PROCESS_ACCT=y |
38 | CONFIG_BSD_PROCESS_ACCT_V3=y | 38 | CONFIG_BSD_PROCESS_ACCT_V3=y |
39 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
40 | # CONFIG_USER_NS is not set | ||
41 | # CONFIG_PID_NS is not set | ||
42 | # CONFIG_AUDIT is not set | 40 | # CONFIG_AUDIT is not set |
43 | # CONFIG_IKCONFIG is not set | 41 | # CONFIG_IKCONFIG is not set |
44 | CONFIG_LOG_BUF_SHIFT=14 | 42 | CONFIG_LOG_BUF_SHIFT=14 |
45 | # CONFIG_CGROUPS is not set | 43 | # CONFIG_CGROUPS is not set |
46 | CONFIG_FAIR_GROUP_SCHED=y | 44 | # CONFIG_GROUP_SCHED is not set |
47 | CONFIG_FAIR_USER_SCHED=y | ||
48 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
49 | CONFIG_SYSFS_DEPRECATED=y | 45 | CONFIG_SYSFS_DEPRECATED=y |
46 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
50 | # CONFIG_RELAY is not set | 47 | # CONFIG_RELAY is not set |
48 | # CONFIG_NAMESPACES is not set | ||
51 | CONFIG_BLK_DEV_INITRD=y | 49 | CONFIG_BLK_DEV_INITRD=y |
52 | CONFIG_INITRAMFS_SOURCE="" | 50 | CONFIG_INITRAMFS_SOURCE="" |
53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 51 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -61,11 +59,13 @@ CONFIG_HOTPLUG=y | |||
61 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
62 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
63 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | ||
64 | # CONFIG_BASE_FULL is not set | 63 | # CONFIG_BASE_FULL is not set |
65 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
66 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
67 | CONFIG_EPOLL=y | 66 | CONFIG_EPOLL=y |
68 | CONFIG_SIGNALFD=y | 67 | CONFIG_SIGNALFD=y |
68 | CONFIG_TIMERFD=y | ||
69 | CONFIG_EVENTFD=y | 69 | CONFIG_EVENTFD=y |
70 | CONFIG_SHMEM=y | 70 | CONFIG_SHMEM=y |
71 | CONFIG_VM_EVENT_COUNTERS=y | 71 | CONFIG_VM_EVENT_COUNTERS=y |
@@ -73,11 +73,21 @@ CONFIG_SLUB_DEBUG=y | |||
73 | # CONFIG_SLAB is not set | 73 | # CONFIG_SLAB is not set |
74 | CONFIG_SLUB=y | 74 | CONFIG_SLUB=y |
75 | # CONFIG_SLOB is not set | 75 | # CONFIG_SLOB is not set |
76 | CONFIG_PROFILING=y | ||
77 | # CONFIG_MARKERS is not set | ||
78 | CONFIG_OPROFILE=m | ||
79 | CONFIG_HAVE_OPROFILE=y | ||
80 | CONFIG_KPROBES=y | ||
81 | CONFIG_HAVE_KPROBES=y | ||
82 | # CONFIG_HAVE_KRETPROBES is not set | ||
83 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
84 | CONFIG_PROC_PAGE_MONITOR=y | ||
76 | CONFIG_SLABINFO=y | 85 | CONFIG_SLABINFO=y |
77 | CONFIG_RT_MUTEXES=y | 86 | CONFIG_RT_MUTEXES=y |
78 | # CONFIG_TINY_SHMEM is not set | 87 | # CONFIG_TINY_SHMEM is not set |
79 | CONFIG_BASE_SMALL=1 | 88 | CONFIG_BASE_SMALL=1 |
80 | CONFIG_MODULES=y | 89 | CONFIG_MODULES=y |
90 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
81 | CONFIG_MODULE_UNLOAD=y | 91 | CONFIG_MODULE_UNLOAD=y |
82 | CONFIG_MODULE_FORCE_UNLOAD=y | 92 | CONFIG_MODULE_FORCE_UNLOAD=y |
83 | # CONFIG_MODVERSIONS is not set | 93 | # CONFIG_MODVERSIONS is not set |
@@ -101,10 +111,15 @@ CONFIG_IOSCHED_CFQ=y | |||
101 | CONFIG_DEFAULT_CFQ=y | 111 | CONFIG_DEFAULT_CFQ=y |
102 | # CONFIG_DEFAULT_NOOP is not set | 112 | # CONFIG_DEFAULT_NOOP is not set |
103 | CONFIG_DEFAULT_IOSCHED="cfq" | 113 | CONFIG_DEFAULT_IOSCHED="cfq" |
114 | CONFIG_CLASSIC_RCU=y | ||
104 | 115 | ||
105 | # | 116 | # |
106 | # System Type and features | 117 | # System Type and features |
107 | # | 118 | # |
119 | CONFIG_TICK_ONESHOT=y | ||
120 | CONFIG_NO_HZ=y | ||
121 | CONFIG_HIGH_RES_TIMERS=y | ||
122 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
108 | CONFIG_SUBARCH_AVR32B=y | 123 | CONFIG_SUBARCH_AVR32B=y |
109 | CONFIG_MMU=y | 124 | CONFIG_MMU=y |
110 | CONFIG_PERFORMANCE_COUNTERS=y | 125 | CONFIG_PERFORMANCE_COUNTERS=y |
@@ -141,16 +156,19 @@ CONFIG_FLATMEM=y | |||
141 | CONFIG_FLAT_NODE_MEM_MAP=y | 156 | CONFIG_FLAT_NODE_MEM_MAP=y |
142 | # CONFIG_SPARSEMEM_STATIC is not set | 157 | # CONFIG_SPARSEMEM_STATIC is not set |
143 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 158 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
159 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
144 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 160 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
145 | # CONFIG_RESOURCES_64BIT is not set | 161 | # CONFIG_RESOURCES_64BIT is not set |
146 | CONFIG_ZONE_DMA_FLAG=0 | 162 | CONFIG_ZONE_DMA_FLAG=0 |
147 | CONFIG_VIRT_TO_BUS=y | 163 | CONFIG_VIRT_TO_BUS=y |
148 | # CONFIG_OWNERSHIP_TRACE is not set | 164 | # CONFIG_OWNERSHIP_TRACE is not set |
165 | CONFIG_NMI_DEBUGGING=y | ||
149 | # CONFIG_HZ_100 is not set | 166 | # CONFIG_HZ_100 is not set |
150 | CONFIG_HZ_250=y | 167 | CONFIG_HZ_250=y |
151 | # CONFIG_HZ_300 is not set | 168 | # CONFIG_HZ_300 is not set |
152 | # CONFIG_HZ_1000 is not set | 169 | # CONFIG_HZ_1000 is not set |
153 | CONFIG_HZ=250 | 170 | CONFIG_HZ=250 |
171 | # CONFIG_SCHED_HRTICK is not set | ||
154 | CONFIG_CMDLINE="" | 172 | CONFIG_CMDLINE="" |
155 | 173 | ||
156 | # | 174 | # |
@@ -164,9 +182,10 @@ CONFIG_CPU_FREQ=y | |||
164 | CONFIG_CPU_FREQ_TABLE=y | 182 | CONFIG_CPU_FREQ_TABLE=y |
165 | # CONFIG_CPU_FREQ_DEBUG is not set | 183 | # CONFIG_CPU_FREQ_DEBUG is not set |
166 | # CONFIG_CPU_FREQ_STAT is not set | 184 | # CONFIG_CPU_FREQ_STAT is not set |
167 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 185 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
186 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
168 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 187 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
169 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 188 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
170 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 189 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
171 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 190 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
172 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 191 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
@@ -202,6 +221,7 @@ CONFIG_XFRM=y | |||
202 | CONFIG_XFRM_USER=y | 221 | CONFIG_XFRM_USER=y |
203 | # CONFIG_XFRM_SUB_POLICY is not set | 222 | # CONFIG_XFRM_SUB_POLICY is not set |
204 | # CONFIG_XFRM_MIGRATE is not set | 223 | # CONFIG_XFRM_MIGRATE is not set |
224 | # CONFIG_XFRM_STATISTICS is not set | ||
205 | CONFIG_NET_KEY=y | 225 | CONFIG_NET_KEY=y |
206 | # CONFIG_NET_KEY_MIGRATE is not set | 226 | # CONFIG_NET_KEY_MIGRATE is not set |
207 | CONFIG_INET=y | 227 | CONFIG_INET=y |
@@ -255,87 +275,40 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y | |||
255 | CONFIG_INET6_XFRM_MODE_BEET=y | 275 | CONFIG_INET6_XFRM_MODE_BEET=y |
256 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 276 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
257 | CONFIG_IPV6_SIT=y | 277 | CONFIG_IPV6_SIT=y |
278 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
258 | # CONFIG_IPV6_TUNNEL is not set | 279 | # CONFIG_IPV6_TUNNEL is not set |
259 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 280 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
281 | # CONFIG_IPV6_MROUTE is not set | ||
260 | # CONFIG_NETWORK_SECMARK is not set | 282 | # CONFIG_NETWORK_SECMARK is not set |
261 | CONFIG_NETFILTER=y | 283 | CONFIG_NETFILTER=y |
262 | # CONFIG_NETFILTER_DEBUG is not set | 284 | # CONFIG_NETFILTER_DEBUG is not set |
263 | CONFIG_BRIDGE_NETFILTER=y | 285 | # CONFIG_NETFILTER_ADVANCED is not set |
264 | 286 | ||
265 | # | 287 | # |
266 | # Core Netfilter Configuration | 288 | # Core Netfilter Configuration |
267 | # | 289 | # |
268 | # CONFIG_NETFILTER_NETLINK is not set | 290 | CONFIG_NETFILTER_NETLINK=m |
269 | CONFIG_NF_CONNTRACK_ENABLED=m | 291 | CONFIG_NETFILTER_NETLINK_LOG=m |
270 | CONFIG_NF_CONNTRACK=m | 292 | CONFIG_NF_CONNTRACK=m |
271 | CONFIG_NF_CT_ACCT=y | ||
272 | CONFIG_NF_CONNTRACK_MARK=y | ||
273 | # CONFIG_NF_CONNTRACK_EVENTS is not set | ||
274 | CONFIG_NF_CT_PROTO_GRE=m | ||
275 | # CONFIG_NF_CT_PROTO_SCTP is not set | ||
276 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | ||
277 | CONFIG_NF_CONNTRACK_AMANDA=m | ||
278 | CONFIG_NF_CONNTRACK_FTP=m | 293 | CONFIG_NF_CONNTRACK_FTP=m |
279 | CONFIG_NF_CONNTRACK_H323=m | ||
280 | CONFIG_NF_CONNTRACK_IRC=m | 294 | CONFIG_NF_CONNTRACK_IRC=m |
281 | CONFIG_NF_CONNTRACK_NETBIOS_NS=m | ||
282 | CONFIG_NF_CONNTRACK_PPTP=m | ||
283 | CONFIG_NF_CONNTRACK_SANE=m | ||
284 | CONFIG_NF_CONNTRACK_SIP=m | 295 | CONFIG_NF_CONNTRACK_SIP=m |
285 | CONFIG_NF_CONNTRACK_TFTP=m | 296 | CONFIG_NF_CT_NETLINK=m |
286 | CONFIG_NETFILTER_XTABLES=y | 297 | CONFIG_NETFILTER_XTABLES=y |
287 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
288 | # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set | ||
289 | # CONFIG_NETFILTER_XT_TARGET_DSCP is not set | ||
290 | CONFIG_NETFILTER_XT_TARGET_MARK=m | 298 | CONFIG_NETFILTER_XT_TARGET_MARK=m |
291 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
292 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | 299 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m |
293 | # CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set | ||
294 | # CONFIG_NETFILTER_XT_TARGET_TRACE is not set | ||
295 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | 300 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m |
296 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
297 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
298 | # CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set | ||
299 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
300 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | 301 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m |
301 | # CONFIG_NETFILTER_XT_MATCH_DCCP is not set | ||
302 | # CONFIG_NETFILTER_XT_MATCH_DSCP is not set | ||
303 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
304 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
305 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
306 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
307 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
308 | CONFIG_NETFILTER_XT_MATCH_MARK=m | 302 | CONFIG_NETFILTER_XT_MATCH_MARK=m |
309 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | 303 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
310 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
311 | # CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set | ||
312 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
313 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
314 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
315 | # CONFIG_NETFILTER_XT_MATCH_SCTP is not set | ||
316 | CONFIG_NETFILTER_XT_MATCH_STATE=m | 304 | CONFIG_NETFILTER_XT_MATCH_STATE=m |
317 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
318 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
319 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
320 | # CONFIG_NETFILTER_XT_MATCH_TIME is not set | ||
321 | # CONFIG_NETFILTER_XT_MATCH_U32 is not set | ||
322 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
323 | 305 | ||
324 | # | 306 | # |
325 | # IP: Netfilter Configuration | 307 | # IP: Netfilter Configuration |
326 | # | 308 | # |
327 | CONFIG_NF_CONNTRACK_IPV4=m | 309 | CONFIG_NF_CONNTRACK_IPV4=m |
328 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | 310 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y |
329 | # CONFIG_IP_NF_QUEUE is not set | ||
330 | CONFIG_IP_NF_IPTABLES=m | 311 | CONFIG_IP_NF_IPTABLES=m |
331 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
332 | CONFIG_IP_NF_MATCH_TOS=m | ||
333 | CONFIG_IP_NF_MATCH_RECENT=m | ||
334 | CONFIG_IP_NF_MATCH_ECN=m | ||
335 | CONFIG_IP_NF_MATCH_AH=m | ||
336 | CONFIG_IP_NF_MATCH_TTL=m | ||
337 | CONFIG_IP_NF_MATCH_OWNER=m | ||
338 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
339 | CONFIG_IP_NF_FILTER=m | 312 | CONFIG_IP_NF_FILTER=m |
340 | CONFIG_IP_NF_TARGET_REJECT=m | 313 | CONFIG_IP_NF_TARGET_REJECT=m |
341 | CONFIG_IP_NF_TARGET_LOG=m | 314 | CONFIG_IP_NF_TARGET_LOG=m |
@@ -343,54 +316,25 @@ CONFIG_IP_NF_TARGET_LOG=m | |||
343 | CONFIG_NF_NAT=m | 316 | CONFIG_NF_NAT=m |
344 | CONFIG_NF_NAT_NEEDED=y | 317 | CONFIG_NF_NAT_NEEDED=y |
345 | CONFIG_IP_NF_TARGET_MASQUERADE=m | 318 | CONFIG_IP_NF_TARGET_MASQUERADE=m |
346 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
347 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
348 | CONFIG_IP_NF_TARGET_SAME=m | ||
349 | CONFIG_NF_NAT_SNMP_BASIC=m | ||
350 | CONFIG_NF_NAT_PROTO_GRE=m | ||
351 | CONFIG_NF_NAT_FTP=m | 319 | CONFIG_NF_NAT_FTP=m |
352 | CONFIG_NF_NAT_IRC=m | 320 | CONFIG_NF_NAT_IRC=m |
353 | CONFIG_NF_NAT_TFTP=m | 321 | # CONFIG_NF_NAT_TFTP is not set |
354 | CONFIG_NF_NAT_AMANDA=m | 322 | # CONFIG_NF_NAT_AMANDA is not set |
355 | CONFIG_NF_NAT_PPTP=m | 323 | # CONFIG_NF_NAT_PPTP is not set |
356 | CONFIG_NF_NAT_H323=m | 324 | # CONFIG_NF_NAT_H323 is not set |
357 | CONFIG_NF_NAT_SIP=m | 325 | CONFIG_NF_NAT_SIP=m |
358 | CONFIG_IP_NF_MANGLE=m | 326 | CONFIG_IP_NF_MANGLE=m |
359 | CONFIG_IP_NF_TARGET_TOS=m | ||
360 | CONFIG_IP_NF_TARGET_ECN=m | ||
361 | CONFIG_IP_NF_TARGET_TTL=m | ||
362 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
363 | CONFIG_IP_NF_RAW=m | ||
364 | CONFIG_IP_NF_ARPTABLES=m | ||
365 | CONFIG_IP_NF_ARPFILTER=m | ||
366 | CONFIG_IP_NF_ARP_MANGLE=m | ||
367 | 327 | ||
368 | # | 328 | # |
369 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | 329 | # IPv6: Netfilter Configuration |
370 | # | 330 | # |
371 | CONFIG_NF_CONNTRACK_IPV6=m | 331 | CONFIG_NF_CONNTRACK_IPV6=m |
372 | CONFIG_IP6_NF_QUEUE=m | ||
373 | CONFIG_IP6_NF_IPTABLES=m | 332 | CONFIG_IP6_NF_IPTABLES=m |
374 | CONFIG_IP6_NF_MATCH_RT=m | ||
375 | CONFIG_IP6_NF_MATCH_OPTS=m | ||
376 | CONFIG_IP6_NF_MATCH_FRAG=m | ||
377 | CONFIG_IP6_NF_MATCH_HL=m | ||
378 | CONFIG_IP6_NF_MATCH_OWNER=m | ||
379 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m | 333 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m |
380 | CONFIG_IP6_NF_MATCH_AH=m | ||
381 | CONFIG_IP6_NF_MATCH_MH=m | ||
382 | CONFIG_IP6_NF_MATCH_EUI64=m | ||
383 | CONFIG_IP6_NF_FILTER=m | 334 | CONFIG_IP6_NF_FILTER=m |
384 | CONFIG_IP6_NF_TARGET_LOG=m | 335 | CONFIG_IP6_NF_TARGET_LOG=m |
385 | CONFIG_IP6_NF_TARGET_REJECT=m | 336 | CONFIG_IP6_NF_TARGET_REJECT=m |
386 | CONFIG_IP6_NF_MANGLE=m | 337 | CONFIG_IP6_NF_MANGLE=m |
387 | CONFIG_IP6_NF_TARGET_HL=m | ||
388 | CONFIG_IP6_NF_RAW=m | ||
389 | |||
390 | # | ||
391 | # Bridge: Netfilter Configuration | ||
392 | # | ||
393 | # CONFIG_BRIDGE_NF_EBTABLES is not set | ||
394 | # CONFIG_IP_DCCP is not set | 338 | # CONFIG_IP_DCCP is not set |
395 | # CONFIG_IP_SCTP is not set | 339 | # CONFIG_IP_SCTP is not set |
396 | # CONFIG_TIPC is not set | 340 | # CONFIG_TIPC is not set |
@@ -407,7 +351,6 @@ CONFIG_LLC=m | |||
407 | # CONFIG_ECONET is not set | 351 | # CONFIG_ECONET is not set |
408 | # CONFIG_WAN_ROUTER is not set | 352 | # CONFIG_WAN_ROUTER is not set |
409 | # CONFIG_NET_SCHED is not set | 353 | # CONFIG_NET_SCHED is not set |
410 | CONFIG_NET_CLS_ROUTE=y | ||
411 | 354 | ||
412 | # | 355 | # |
413 | # Network testing | 356 | # Network testing |
@@ -415,6 +358,7 @@ CONFIG_NET_CLS_ROUTE=y | |||
415 | # CONFIG_NET_PKTGEN is not set | 358 | # CONFIG_NET_PKTGEN is not set |
416 | # CONFIG_NET_TCPPROBE is not set | 359 | # CONFIG_NET_TCPPROBE is not set |
417 | # CONFIG_HAMRADIO is not set | 360 | # CONFIG_HAMRADIO is not set |
361 | # CONFIG_CAN is not set | ||
418 | # CONFIG_IRDA is not set | 362 | # CONFIG_IRDA is not set |
419 | # CONFIG_BT is not set | 363 | # CONFIG_BT is not set |
420 | # CONFIG_AF_RXRPC is not set | 364 | # CONFIG_AF_RXRPC is not set |
@@ -450,6 +394,7 @@ CONFIG_MTD=y | |||
450 | CONFIG_MTD_PARTITIONS=y | 394 | CONFIG_MTD_PARTITIONS=y |
451 | # CONFIG_MTD_REDBOOT_PARTS is not set | 395 | # CONFIG_MTD_REDBOOT_PARTS is not set |
452 | CONFIG_MTD_CMDLINE_PARTS=y | 396 | CONFIG_MTD_CMDLINE_PARTS=y |
397 | # CONFIG_MTD_AR7_PARTS is not set | ||
453 | 398 | ||
454 | # | 399 | # |
455 | # User Modules And Translation Layers | 400 | # User Modules And Translation Layers |
@@ -531,11 +476,18 @@ CONFIG_BLK_DEV_NBD=m | |||
531 | CONFIG_BLK_DEV_RAM=m | 476 | CONFIG_BLK_DEV_RAM=m |
532 | CONFIG_BLK_DEV_RAM_COUNT=16 | 477 | CONFIG_BLK_DEV_RAM_COUNT=16 |
533 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 478 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
534 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 479 | # CONFIG_BLK_DEV_XIP is not set |
535 | # CONFIG_CDROM_PKTCDVD is not set | 480 | # CONFIG_CDROM_PKTCDVD is not set |
536 | # CONFIG_ATA_OVER_ETH is not set | 481 | # CONFIG_ATA_OVER_ETH is not set |
537 | # CONFIG_MISC_DEVICES is not set | 482 | CONFIG_MISC_DEVICES=y |
538 | # CONFIG_IDE is not set | 483 | # CONFIG_ATMEL_PWM is not set |
484 | CONFIG_ATMEL_TCLIB=y | ||
485 | CONFIG_ATMEL_TCB_CLKSRC=y | ||
486 | CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 | ||
487 | # CONFIG_EEPROM_93CX6 is not set | ||
488 | # CONFIG_ATMEL_SSC is not set | ||
489 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
490 | # CONFIG_HAVE_IDE is not set | ||
539 | 491 | ||
540 | # | 492 | # |
541 | # SCSI device support | 493 | # SCSI device support |
@@ -568,11 +520,13 @@ CONFIG_PHYLIB=y | |||
568 | # CONFIG_SMSC_PHY is not set | 520 | # CONFIG_SMSC_PHY is not set |
569 | # CONFIG_BROADCOM_PHY is not set | 521 | # CONFIG_BROADCOM_PHY is not set |
570 | # CONFIG_ICPLUS_PHY is not set | 522 | # CONFIG_ICPLUS_PHY is not set |
523 | # CONFIG_REALTEK_PHY is not set | ||
571 | # CONFIG_FIXED_PHY is not set | 524 | # CONFIG_FIXED_PHY is not set |
572 | # CONFIG_MDIO_BITBANG is not set | 525 | # CONFIG_MDIO_BITBANG is not set |
573 | CONFIG_NET_ETHERNET=y | 526 | CONFIG_NET_ETHERNET=y |
574 | # CONFIG_MII is not set | 527 | # CONFIG_MII is not set |
575 | CONFIG_MACB=y | 528 | CONFIG_MACB=y |
529 | # CONFIG_ENC28J60 is not set | ||
576 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 530 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
577 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 531 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
578 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 532 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
@@ -586,6 +540,7 @@ CONFIG_MACB=y | |||
586 | # | 540 | # |
587 | # CONFIG_WLAN_PRE80211 is not set | 541 | # CONFIG_WLAN_PRE80211 is not set |
588 | # CONFIG_WLAN_80211 is not set | 542 | # CONFIG_WLAN_80211 is not set |
543 | # CONFIG_IWLWIFI_LEDS is not set | ||
589 | # CONFIG_WAN is not set | 544 | # CONFIG_WAN is not set |
590 | CONFIG_PPP=m | 545 | CONFIG_PPP=m |
591 | # CONFIG_PPP_MULTILINK is not set | 546 | # CONFIG_PPP_MULTILINK is not set |
@@ -599,7 +554,6 @@ CONFIG_PPPOE=m | |||
599 | # CONFIG_PPPOL2TP is not set | 554 | # CONFIG_PPPOL2TP is not set |
600 | # CONFIG_SLIP is not set | 555 | # CONFIG_SLIP is not set |
601 | CONFIG_SLHC=m | 556 | CONFIG_SLHC=m |
602 | # CONFIG_SHAPER is not set | ||
603 | # CONFIG_NETCONSOLE is not set | 557 | # CONFIG_NETCONSOLE is not set |
604 | # CONFIG_NETPOLL is not set | 558 | # CONFIG_NETPOLL is not set |
605 | # CONFIG_NET_POLL_CONTROLLER is not set | 559 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -621,6 +575,7 @@ CONFIG_SLHC=m | |||
621 | # Character devices | 575 | # Character devices |
622 | # | 576 | # |
623 | # CONFIG_VT is not set | 577 | # CONFIG_VT is not set |
578 | # CONFIG_DEVKMEM is not set | ||
624 | # CONFIG_SERIAL_NONSTANDARD is not set | 579 | # CONFIG_SERIAL_NONSTANDARD is not set |
625 | 580 | ||
626 | # | 581 | # |
@@ -633,6 +588,7 @@ CONFIG_SLHC=m | |||
633 | # | 588 | # |
634 | CONFIG_SERIAL_ATMEL=y | 589 | CONFIG_SERIAL_ATMEL=y |
635 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 590 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
591 | CONFIG_SERIAL_ATMEL_PDC=y | ||
636 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | 592 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
637 | CONFIG_SERIAL_CORE=y | 593 | CONFIG_SERIAL_CORE=y |
638 | CONFIG_SERIAL_CORE_CONSOLE=y | 594 | CONFIG_SERIAL_CORE_CONSOLE=y |
@@ -640,21 +596,13 @@ CONFIG_UNIX98_PTYS=y | |||
640 | # CONFIG_LEGACY_PTYS is not set | 596 | # CONFIG_LEGACY_PTYS is not set |
641 | # CONFIG_IPMI_HANDLER is not set | 597 | # CONFIG_IPMI_HANDLER is not set |
642 | # CONFIG_HW_RANDOM is not set | 598 | # CONFIG_HW_RANDOM is not set |
643 | # CONFIG_RTC is not set | ||
644 | # CONFIG_GEN_RTC is not set | ||
645 | # CONFIG_R3964 is not set | 599 | # CONFIG_R3964 is not set |
646 | # CONFIG_RAW_DRIVER is not set | 600 | # CONFIG_RAW_DRIVER is not set |
647 | # CONFIG_TCG_TPM is not set | 601 | # CONFIG_TCG_TPM is not set |
648 | CONFIG_I2C=m | 602 | CONFIG_I2C=m |
649 | CONFIG_I2C_BOARDINFO=y | 603 | CONFIG_I2C_BOARDINFO=y |
650 | CONFIG_I2C_CHARDEV=m | 604 | CONFIG_I2C_CHARDEV=m |
651 | |||
652 | # | ||
653 | # I2C Algorithms | ||
654 | # | ||
655 | CONFIG_I2C_ALGOBIT=m | 605 | CONFIG_I2C_ALGOBIT=m |
656 | # CONFIG_I2C_ALGOPCF is not set | ||
657 | # CONFIG_I2C_ALGOPCA is not set | ||
658 | 606 | ||
659 | # | 607 | # |
660 | # I2C Hardware Bus support | 608 | # I2C Hardware Bus support |
@@ -665,27 +613,23 @@ CONFIG_I2C_GPIO=m | |||
665 | # CONFIG_I2C_SIMTEC is not set | 613 | # CONFIG_I2C_SIMTEC is not set |
666 | # CONFIG_I2C_TAOS_EVM is not set | 614 | # CONFIG_I2C_TAOS_EVM is not set |
667 | # CONFIG_I2C_STUB is not set | 615 | # CONFIG_I2C_STUB is not set |
616 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
668 | 617 | ||
669 | # | 618 | # |
670 | # Miscellaneous I2C Chip support | 619 | # Miscellaneous I2C Chip support |
671 | # | 620 | # |
672 | # CONFIG_SENSORS_DS1337 is not set | ||
673 | # CONFIG_SENSORS_DS1374 is not set | ||
674 | # CONFIG_DS1682 is not set | 621 | # CONFIG_DS1682 is not set |
675 | # CONFIG_SENSORS_EEPROM is not set | 622 | # CONFIG_SENSORS_EEPROM is not set |
676 | # CONFIG_SENSORS_PCF8574 is not set | 623 | # CONFIG_SENSORS_PCF8574 is not set |
677 | # CONFIG_SENSORS_PCA9539 is not set | 624 | # CONFIG_PCF8575 is not set |
678 | # CONFIG_SENSORS_PCF8591 is not set | 625 | # CONFIG_SENSORS_PCF8591 is not set |
626 | # CONFIG_TPS65010 is not set | ||
679 | # CONFIG_SENSORS_MAX6875 is not set | 627 | # CONFIG_SENSORS_MAX6875 is not set |
680 | # CONFIG_SENSORS_TSL2550 is not set | 628 | # CONFIG_SENSORS_TSL2550 is not set |
681 | # CONFIG_I2C_DEBUG_CORE is not set | 629 | # CONFIG_I2C_DEBUG_CORE is not set |
682 | # CONFIG_I2C_DEBUG_ALGO is not set | 630 | # CONFIG_I2C_DEBUG_ALGO is not set |
683 | # CONFIG_I2C_DEBUG_BUS is not set | 631 | # CONFIG_I2C_DEBUG_BUS is not set |
684 | # CONFIG_I2C_DEBUG_CHIP is not set | 632 | # CONFIG_I2C_DEBUG_CHIP is not set |
685 | |||
686 | # | ||
687 | # SPI support | ||
688 | # | ||
689 | CONFIG_SPI=y | 633 | CONFIG_SPI=y |
690 | # CONFIG_SPI_DEBUG is not set | 634 | # CONFIG_SPI_DEBUG is not set |
691 | CONFIG_SPI_MASTER=y | 635 | CONFIG_SPI_MASTER=y |
@@ -702,9 +646,27 @@ CONFIG_SPI_ATMEL=y | |||
702 | # CONFIG_SPI_AT25 is not set | 646 | # CONFIG_SPI_AT25 is not set |
703 | CONFIG_SPI_SPIDEV=m | 647 | CONFIG_SPI_SPIDEV=m |
704 | # CONFIG_SPI_TLE62X0 is not set | 648 | # CONFIG_SPI_TLE62X0 is not set |
649 | CONFIG_HAVE_GPIO_LIB=y | ||
650 | |||
651 | # | ||
652 | # GPIO Support | ||
653 | # | ||
654 | # CONFIG_DEBUG_GPIO is not set | ||
655 | |||
656 | # | ||
657 | # I2C GPIO expanders: | ||
658 | # | ||
659 | # CONFIG_GPIO_PCA953X is not set | ||
660 | # CONFIG_GPIO_PCF857X is not set | ||
661 | |||
662 | # | ||
663 | # SPI GPIO expanders: | ||
664 | # | ||
665 | # CONFIG_GPIO_MCP23S08 is not set | ||
705 | # CONFIG_W1 is not set | 666 | # CONFIG_W1 is not set |
706 | # CONFIG_POWER_SUPPLY is not set | 667 | # CONFIG_POWER_SUPPLY is not set |
707 | # CONFIG_HWMON is not set | 668 | # CONFIG_HWMON is not set |
669 | # CONFIG_THERMAL is not set | ||
708 | CONFIG_WATCHDOG=y | 670 | CONFIG_WATCHDOG=y |
709 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 671 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
710 | 672 | ||
@@ -724,12 +686,22 @@ CONFIG_SSB_POSSIBLE=y | |||
724 | # Multifunction device drivers | 686 | # Multifunction device drivers |
725 | # | 687 | # |
726 | # CONFIG_MFD_SM501 is not set | 688 | # CONFIG_MFD_SM501 is not set |
689 | # CONFIG_HTC_PASIC3 is not set | ||
727 | 690 | ||
728 | # | 691 | # |
729 | # Multimedia devices | 692 | # Multimedia devices |
730 | # | 693 | # |
694 | |||
695 | # | ||
696 | # Multimedia core support | ||
697 | # | ||
731 | # CONFIG_VIDEO_DEV is not set | 698 | # CONFIG_VIDEO_DEV is not set |
732 | # CONFIG_DVB_CORE is not set | 699 | # CONFIG_DVB_CORE is not set |
700 | # CONFIG_VIDEO_MEDIA is not set | ||
701 | |||
702 | # | ||
703 | # Multimedia drivers | ||
704 | # | ||
733 | # CONFIG_DAB is not set | 705 | # CONFIG_DAB is not set |
734 | 706 | ||
735 | # | 707 | # |
@@ -753,14 +725,12 @@ CONFIG_USB_SUPPORT=y | |||
753 | # CONFIG_USB_ARCH_HAS_HCD is not set | 725 | # CONFIG_USB_ARCH_HAS_HCD is not set |
754 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 726 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
755 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 727 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
728 | # CONFIG_USB_OTG_WHITELIST is not set | ||
729 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
756 | 730 | ||
757 | # | 731 | # |
758 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 732 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
759 | # | 733 | # |
760 | |||
761 | # | ||
762 | # USB Gadget Support | ||
763 | # | ||
764 | CONFIG_USB_GADGET=y | 734 | CONFIG_USB_GADGET=y |
765 | # CONFIG_USB_GADGET_DEBUG is not set | 735 | # CONFIG_USB_GADGET_DEBUG is not set |
766 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 736 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
@@ -772,6 +742,7 @@ CONFIG_USB_ATMEL_USBA=y | |||
772 | # CONFIG_USB_GADGET_NET2280 is not set | 742 | # CONFIG_USB_GADGET_NET2280 is not set |
773 | # CONFIG_USB_GADGET_PXA2XX is not set | 743 | # CONFIG_USB_GADGET_PXA2XX is not set |
774 | # CONFIG_USB_GADGET_M66592 is not set | 744 | # CONFIG_USB_GADGET_M66592 is not set |
745 | # CONFIG_USB_GADGET_PXA27X is not set | ||
775 | # CONFIG_USB_GADGET_GOKU is not set | 746 | # CONFIG_USB_GADGET_GOKU is not set |
776 | # CONFIG_USB_GADGET_LH7A40X is not set | 747 | # CONFIG_USB_GADGET_LH7A40X is not set |
777 | # CONFIG_USB_GADGET_OMAP is not set | 748 | # CONFIG_USB_GADGET_OMAP is not set |
@@ -787,6 +758,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
787 | # CONFIG_USB_FILE_STORAGE_TEST is not set | 758 | # CONFIG_USB_FILE_STORAGE_TEST is not set |
788 | CONFIG_USB_G_SERIAL=m | 759 | CONFIG_USB_G_SERIAL=m |
789 | # CONFIG_USB_MIDI_GADGET is not set | 760 | # CONFIG_USB_MIDI_GADGET is not set |
761 | # CONFIG_USB_G_PRINTER is not set | ||
790 | CONFIG_MMC=m | 762 | CONFIG_MMC=m |
791 | # CONFIG_MMC_DEBUG is not set | 763 | # CONFIG_MMC_DEBUG is not set |
792 | # CONFIG_MMC_UNSAFE_RESUME is not set | 764 | # CONFIG_MMC_UNSAFE_RESUME is not set |
@@ -797,11 +769,13 @@ CONFIG_MMC=m | |||
797 | CONFIG_MMC_BLOCK=m | 769 | CONFIG_MMC_BLOCK=m |
798 | CONFIG_MMC_BLOCK_BOUNCE=y | 770 | CONFIG_MMC_BLOCK_BOUNCE=y |
799 | # CONFIG_SDIO_UART is not set | 771 | # CONFIG_SDIO_UART is not set |
772 | # CONFIG_MMC_TEST is not set | ||
800 | 773 | ||
801 | # | 774 | # |
802 | # MMC/SD Host Controller Drivers | 775 | # MMC/SD Host Controller Drivers |
803 | # | 776 | # |
804 | CONFIG_MMC_SPI=m | 777 | CONFIG_MMC_SPI=m |
778 | # CONFIG_MEMSTICK is not set | ||
805 | CONFIG_NEW_LEDS=y | 779 | CONFIG_NEW_LEDS=y |
806 | CONFIG_LEDS_CLASS=y | 780 | CONFIG_LEDS_CLASS=y |
807 | 781 | ||
@@ -816,6 +790,8 @@ CONFIG_LEDS_GPIO=y | |||
816 | CONFIG_LEDS_TRIGGERS=y | 790 | CONFIG_LEDS_TRIGGERS=y |
817 | CONFIG_LEDS_TRIGGER_TIMER=y | 791 | CONFIG_LEDS_TRIGGER_TIMER=y |
818 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 792 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
793 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
794 | # CONFIG_ACCESSIBILITY is not set | ||
819 | CONFIG_RTC_LIB=y | 795 | CONFIG_RTC_LIB=y |
820 | CONFIG_RTC_CLASS=y | 796 | CONFIG_RTC_CLASS=y |
821 | CONFIG_RTC_HCTOSYS=y | 797 | CONFIG_RTC_HCTOSYS=y |
@@ -844,19 +820,22 @@ CONFIG_RTC_INTF_DEV=y | |||
844 | # CONFIG_RTC_DRV_PCF8563 is not set | 820 | # CONFIG_RTC_DRV_PCF8563 is not set |
845 | # CONFIG_RTC_DRV_PCF8583 is not set | 821 | # CONFIG_RTC_DRV_PCF8583 is not set |
846 | # CONFIG_RTC_DRV_M41T80 is not set | 822 | # CONFIG_RTC_DRV_M41T80 is not set |
823 | # CONFIG_RTC_DRV_S35390A is not set | ||
847 | 824 | ||
848 | # | 825 | # |
849 | # SPI RTC drivers | 826 | # SPI RTC drivers |
850 | # | 827 | # |
851 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
852 | # CONFIG_RTC_DRV_MAX6902 is not set | 828 | # CONFIG_RTC_DRV_MAX6902 is not set |
829 | # CONFIG_RTC_DRV_R9701 is not set | ||
830 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
853 | 831 | ||
854 | # | 832 | # |
855 | # Platform RTC drivers | 833 | # Platform RTC drivers |
856 | # | 834 | # |
835 | # CONFIG_RTC_DRV_DS1511 is not set | ||
857 | # CONFIG_RTC_DRV_DS1553 is not set | 836 | # CONFIG_RTC_DRV_DS1553 is not set |
858 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
859 | # CONFIG_RTC_DRV_DS1742 is not set | 837 | # CONFIG_RTC_DRV_DS1742 is not set |
838 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
860 | # CONFIG_RTC_DRV_M48T86 is not set | 839 | # CONFIG_RTC_DRV_M48T86 is not set |
861 | # CONFIG_RTC_DRV_M48T59 is not set | 840 | # CONFIG_RTC_DRV_M48T59 is not set |
862 | # CONFIG_RTC_DRV_V3020 is not set | 841 | # CONFIG_RTC_DRV_V3020 is not set |
@@ -865,10 +844,6 @@ CONFIG_RTC_INTF_DEV=y | |||
865 | # on-CPU RTC drivers | 844 | # on-CPU RTC drivers |
866 | # | 845 | # |
867 | CONFIG_RTC_DRV_AT32AP700X=y | 846 | CONFIG_RTC_DRV_AT32AP700X=y |
868 | |||
869 | # | ||
870 | # Userspace I/O | ||
871 | # | ||
872 | # CONFIG_UIO is not set | 847 | # CONFIG_UIO is not set |
873 | 848 | ||
874 | # | 849 | # |
@@ -885,14 +860,11 @@ CONFIG_JBD=m | |||
885 | # CONFIG_JFS_FS is not set | 860 | # CONFIG_JFS_FS is not set |
886 | # CONFIG_FS_POSIX_ACL is not set | 861 | # CONFIG_FS_POSIX_ACL is not set |
887 | # CONFIG_XFS_FS is not set | 862 | # CONFIG_XFS_FS is not set |
888 | # CONFIG_GFS2_FS is not set | ||
889 | # CONFIG_OCFS2_FS is not set | 863 | # CONFIG_OCFS2_FS is not set |
890 | # CONFIG_MINIX_FS is not set | 864 | # CONFIG_DNOTIFY is not set |
891 | # CONFIG_ROMFS_FS is not set | ||
892 | CONFIG_INOTIFY=y | 865 | CONFIG_INOTIFY=y |
893 | CONFIG_INOTIFY_USER=y | 866 | CONFIG_INOTIFY_USER=y |
894 | # CONFIG_QUOTA is not set | 867 | # CONFIG_QUOTA is not set |
895 | # CONFIG_DNOTIFY is not set | ||
896 | # CONFIG_AUTOFS_FS is not set | 868 | # CONFIG_AUTOFS_FS is not set |
897 | # CONFIG_AUTOFS4_FS is not set | 869 | # CONFIG_AUTOFS4_FS is not set |
898 | CONFIG_FUSE_FS=m | 870 | CONFIG_FUSE_FS=m |
@@ -948,8 +920,10 @@ CONFIG_JFFS2_RTIME=y | |||
948 | # CONFIG_JFFS2_RUBIN is not set | 920 | # CONFIG_JFFS2_RUBIN is not set |
949 | # CONFIG_CRAMFS is not set | 921 | # CONFIG_CRAMFS is not set |
950 | # CONFIG_VXFS_FS is not set | 922 | # CONFIG_VXFS_FS is not set |
923 | # CONFIG_MINIX_FS is not set | ||
951 | # CONFIG_HPFS_FS is not set | 924 | # CONFIG_HPFS_FS is not set |
952 | # CONFIG_QNX4FS_FS is not set | 925 | # CONFIG_QNX4FS_FS is not set |
926 | # CONFIG_ROMFS_FS is not set | ||
953 | # CONFIG_SYSV_FS is not set | 927 | # CONFIG_SYSV_FS is not set |
954 | # CONFIG_UFS_FS is not set | 928 | # CONFIG_UFS_FS is not set |
955 | CONFIG_NETWORK_FILESYSTEMS=y | 929 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -957,12 +931,10 @@ CONFIG_NFS_FS=y | |||
957 | CONFIG_NFS_V3=y | 931 | CONFIG_NFS_V3=y |
958 | # CONFIG_NFS_V3_ACL is not set | 932 | # CONFIG_NFS_V3_ACL is not set |
959 | # CONFIG_NFS_V4 is not set | 933 | # CONFIG_NFS_V4 is not set |
960 | # CONFIG_NFS_DIRECTIO is not set | ||
961 | CONFIG_NFSD=m | 934 | CONFIG_NFSD=m |
962 | CONFIG_NFSD_V3=y | 935 | CONFIG_NFSD_V3=y |
963 | # CONFIG_NFSD_V3_ACL is not set | 936 | # CONFIG_NFSD_V3_ACL is not set |
964 | # CONFIG_NFSD_V4 is not set | 937 | # CONFIG_NFSD_V4 is not set |
965 | CONFIG_NFSD_TCP=y | ||
966 | CONFIG_ROOT_NFS=y | 938 | CONFIG_ROOT_NFS=y |
967 | CONFIG_LOCKD=y | 939 | CONFIG_LOCKD=y |
968 | CONFIG_LOCKD_V4=y | 940 | CONFIG_LOCKD_V4=y |
@@ -1030,11 +1002,6 @@ CONFIG_NLS_ISO8859_1=m | |||
1030 | # CONFIG_NLS_KOI8_U is not set | 1002 | # CONFIG_NLS_KOI8_U is not set |
1031 | CONFIG_NLS_UTF8=m | 1003 | CONFIG_NLS_UTF8=m |
1032 | # CONFIG_DLM is not set | 1004 | # CONFIG_DLM is not set |
1033 | CONFIG_INSTRUMENTATION=y | ||
1034 | CONFIG_PROFILING=y | ||
1035 | CONFIG_OPROFILE=m | ||
1036 | CONFIG_KPROBES=y | ||
1037 | # CONFIG_MARKERS is not set | ||
1038 | 1005 | ||
1039 | # | 1006 | # |
1040 | # Kernel hacking | 1007 | # Kernel hacking |
@@ -1042,6 +1009,7 @@ CONFIG_KPROBES=y | |||
1042 | # CONFIG_PRINTK_TIME is not set | 1009 | # CONFIG_PRINTK_TIME is not set |
1043 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1010 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1044 | CONFIG_ENABLE_MUST_CHECK=y | 1011 | CONFIG_ENABLE_MUST_CHECK=y |
1012 | CONFIG_FRAME_WARN=1024 | ||
1045 | CONFIG_MAGIC_SYSRQ=y | 1013 | CONFIG_MAGIC_SYSRQ=y |
1046 | # CONFIG_UNUSED_SYMBOLS is not set | 1014 | # CONFIG_UNUSED_SYMBOLS is not set |
1047 | # CONFIG_DEBUG_FS is not set | 1015 | # CONFIG_DEBUG_FS is not set |
@@ -1052,7 +1020,9 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1052 | CONFIG_SCHED_DEBUG=y | 1020 | CONFIG_SCHED_DEBUG=y |
1053 | # CONFIG_SCHEDSTATS is not set | 1021 | # CONFIG_SCHEDSTATS is not set |
1054 | # CONFIG_TIMER_STATS is not set | 1022 | # CONFIG_TIMER_STATS is not set |
1023 | # CONFIG_DEBUG_OBJECTS is not set | ||
1055 | # CONFIG_SLUB_DEBUG_ON is not set | 1024 | # CONFIG_SLUB_DEBUG_ON is not set |
1025 | # CONFIG_SLUB_STATS is not set | ||
1056 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1026 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1057 | # CONFIG_RT_MUTEX_TESTER is not set | 1027 | # CONFIG_RT_MUTEX_TESTER is not set |
1058 | # CONFIG_DEBUG_SPINLOCK is not set | 1028 | # CONFIG_DEBUG_SPINLOCK is not set |
@@ -1066,12 +1036,14 @@ CONFIG_SCHED_DEBUG=y | |||
1066 | CONFIG_DEBUG_BUGVERBOSE=y | 1036 | CONFIG_DEBUG_BUGVERBOSE=y |
1067 | # CONFIG_DEBUG_INFO is not set | 1037 | # CONFIG_DEBUG_INFO is not set |
1068 | # CONFIG_DEBUG_VM is not set | 1038 | # CONFIG_DEBUG_VM is not set |
1039 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1069 | # CONFIG_DEBUG_LIST is not set | 1040 | # CONFIG_DEBUG_LIST is not set |
1070 | # CONFIG_DEBUG_SG is not set | 1041 | # CONFIG_DEBUG_SG is not set |
1071 | CONFIG_FRAME_POINTER=y | 1042 | CONFIG_FRAME_POINTER=y |
1072 | # CONFIG_FORCED_INLINING is not set | ||
1073 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1043 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1074 | # CONFIG_RCU_TORTURE_TEST is not set | 1044 | # CONFIG_RCU_TORTURE_TEST is not set |
1045 | # CONFIG_KPROBES_SANITY_TEST is not set | ||
1046 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1075 | # CONFIG_LKDTM is not set | 1047 | # CONFIG_LKDTM is not set |
1076 | # CONFIG_FAULT_INJECTION is not set | 1048 | # CONFIG_FAULT_INJECTION is not set |
1077 | # CONFIG_SAMPLES is not set | 1049 | # CONFIG_SAMPLES is not set |
@@ -1083,52 +1055,90 @@ CONFIG_FRAME_POINTER=y | |||
1083 | # CONFIG_SECURITY is not set | 1055 | # CONFIG_SECURITY is not set |
1084 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1056 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1085 | CONFIG_CRYPTO=y | 1057 | CONFIG_CRYPTO=y |
1058 | |||
1059 | # | ||
1060 | # Crypto core or helper | ||
1061 | # | ||
1086 | CONFIG_CRYPTO_ALGAPI=y | 1062 | CONFIG_CRYPTO_ALGAPI=y |
1063 | CONFIG_CRYPTO_AEAD=y | ||
1087 | CONFIG_CRYPTO_BLKCIPHER=y | 1064 | CONFIG_CRYPTO_BLKCIPHER=y |
1088 | CONFIG_CRYPTO_HASH=y | 1065 | CONFIG_CRYPTO_HASH=y |
1089 | CONFIG_CRYPTO_MANAGER=y | 1066 | CONFIG_CRYPTO_MANAGER=y |
1067 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1068 | # CONFIG_CRYPTO_NULL is not set | ||
1069 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1070 | CONFIG_CRYPTO_AUTHENC=y | ||
1071 | # CONFIG_CRYPTO_TEST is not set | ||
1072 | |||
1073 | # | ||
1074 | # Authenticated Encryption with Associated Data | ||
1075 | # | ||
1076 | # CONFIG_CRYPTO_CCM is not set | ||
1077 | # CONFIG_CRYPTO_GCM is not set | ||
1078 | # CONFIG_CRYPTO_SEQIV is not set | ||
1079 | |||
1080 | # | ||
1081 | # Block modes | ||
1082 | # | ||
1083 | CONFIG_CRYPTO_CBC=y | ||
1084 | # CONFIG_CRYPTO_CTR is not set | ||
1085 | # CONFIG_CRYPTO_CTS is not set | ||
1086 | CONFIG_CRYPTO_ECB=m | ||
1087 | # CONFIG_CRYPTO_LRW is not set | ||
1088 | CONFIG_CRYPTO_PCBC=m | ||
1089 | # CONFIG_CRYPTO_XTS is not set | ||
1090 | |||
1091 | # | ||
1092 | # Hash modes | ||
1093 | # | ||
1090 | CONFIG_CRYPTO_HMAC=y | 1094 | CONFIG_CRYPTO_HMAC=y |
1091 | # CONFIG_CRYPTO_XCBC is not set | 1095 | # CONFIG_CRYPTO_XCBC is not set |
1092 | # CONFIG_CRYPTO_NULL is not set | 1096 | |
1097 | # | ||
1098 | # Digest | ||
1099 | # | ||
1100 | # CONFIG_CRYPTO_CRC32C is not set | ||
1093 | # CONFIG_CRYPTO_MD4 is not set | 1101 | # CONFIG_CRYPTO_MD4 is not set |
1094 | CONFIG_CRYPTO_MD5=y | 1102 | CONFIG_CRYPTO_MD5=y |
1103 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1095 | CONFIG_CRYPTO_SHA1=y | 1104 | CONFIG_CRYPTO_SHA1=y |
1096 | # CONFIG_CRYPTO_SHA256 is not set | 1105 | # CONFIG_CRYPTO_SHA256 is not set |
1097 | # CONFIG_CRYPTO_SHA512 is not set | 1106 | # CONFIG_CRYPTO_SHA512 is not set |
1098 | # CONFIG_CRYPTO_WP512 is not set | ||
1099 | # CONFIG_CRYPTO_TGR192 is not set | 1107 | # CONFIG_CRYPTO_TGR192 is not set |
1100 | # CONFIG_CRYPTO_GF128MUL is not set | 1108 | # CONFIG_CRYPTO_WP512 is not set |
1101 | CONFIG_CRYPTO_ECB=m | 1109 | |
1102 | CONFIG_CRYPTO_CBC=y | 1110 | # |
1103 | CONFIG_CRYPTO_PCBC=m | 1111 | # Ciphers |
1104 | # CONFIG_CRYPTO_LRW is not set | 1112 | # |
1105 | # CONFIG_CRYPTO_XTS is not set | ||
1106 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1107 | CONFIG_CRYPTO_DES=y | ||
1108 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1109 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1110 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1111 | # CONFIG_CRYPTO_SERPENT is not set | ||
1112 | # CONFIG_CRYPTO_AES is not set | 1113 | # CONFIG_CRYPTO_AES is not set |
1114 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1115 | CONFIG_CRYPTO_ARC4=m | ||
1116 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1117 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1113 | # CONFIG_CRYPTO_CAST5 is not set | 1118 | # CONFIG_CRYPTO_CAST5 is not set |
1114 | # CONFIG_CRYPTO_CAST6 is not set | 1119 | # CONFIG_CRYPTO_CAST6 is not set |
1115 | # CONFIG_CRYPTO_TEA is not set | 1120 | CONFIG_CRYPTO_DES=y |
1116 | CONFIG_CRYPTO_ARC4=m | 1121 | # CONFIG_CRYPTO_FCRYPT is not set |
1117 | # CONFIG_CRYPTO_KHAZAD is not set | 1122 | # CONFIG_CRYPTO_KHAZAD is not set |
1118 | # CONFIG_CRYPTO_ANUBIS is not set | 1123 | # CONFIG_CRYPTO_SALSA20 is not set |
1119 | # CONFIG_CRYPTO_SEED is not set | 1124 | # CONFIG_CRYPTO_SEED is not set |
1125 | # CONFIG_CRYPTO_SERPENT is not set | ||
1126 | # CONFIG_CRYPTO_TEA is not set | ||
1127 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1128 | |||
1129 | # | ||
1130 | # Compression | ||
1131 | # | ||
1120 | CONFIG_CRYPTO_DEFLATE=y | 1132 | CONFIG_CRYPTO_DEFLATE=y |
1121 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1133 | # CONFIG_CRYPTO_LZO is not set |
1122 | # CONFIG_CRYPTO_CRC32C is not set | ||
1123 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1124 | # CONFIG_CRYPTO_TEST is not set | ||
1125 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1126 | CONFIG_CRYPTO_HW=y | 1134 | CONFIG_CRYPTO_HW=y |
1127 | 1135 | ||
1128 | # | 1136 | # |
1129 | # Library routines | 1137 | # Library routines |
1130 | # | 1138 | # |
1131 | CONFIG_BITREVERSE=y | 1139 | CONFIG_BITREVERSE=y |
1140 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1141 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1132 | CONFIG_CRC_CCITT=m | 1142 | CONFIG_CRC_CCITT=m |
1133 | # CONFIG_CRC16 is not set | 1143 | # CONFIG_CRC16 is not set |
1134 | CONFIG_CRC_ITU_T=m | 1144 | CONFIG_CRC_ITU_T=m |
@@ -1137,10 +1147,6 @@ CONFIG_CRC7=m | |||
1137 | # CONFIG_LIBCRC32C is not set | 1147 | # CONFIG_LIBCRC32C is not set |
1138 | CONFIG_ZLIB_INFLATE=y | 1148 | CONFIG_ZLIB_INFLATE=y |
1139 | CONFIG_ZLIB_DEFLATE=y | 1149 | CONFIG_ZLIB_DEFLATE=y |
1140 | CONFIG_TEXTSEARCH=y | ||
1141 | CONFIG_TEXTSEARCH_KMP=m | ||
1142 | CONFIG_TEXTSEARCH_BM=m | ||
1143 | CONFIG_TEXTSEARCH_FSM=m | ||
1144 | CONFIG_PLIST=y | 1150 | CONFIG_PLIST=y |
1145 | CONFIG_HAS_IOMEM=y | 1151 | CONFIG_HAS_IOMEM=y |
1146 | CONFIG_HAS_IOPORT=y | 1152 | CONFIG_HAS_IOPORT=y |
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index 2fb2ede5f2b4..c6d02eac8791 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24-rc7 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Wed Jan 9 23:07:43 2008 | 4 | # Mon May 26 13:30:20 2008 |
5 | # | 5 | # |
6 | CONFIG_AVR32=y | 6 | CONFIG_AVR32=y |
7 | CONFIG_GENERIC_GPIO=y | 7 | CONFIG_GENERIC_GPIO=y |
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y | |||
13 | CONFIG_GENERIC_IRQ_PROBE=y | 13 | CONFIG_GENERIC_IRQ_PROBE=y |
14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
15 | CONFIG_GENERIC_TIME=y | 15 | CONFIG_GENERIC_TIME=y |
16 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
16 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 17 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
17 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
18 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
19 | CONFIG_ARCH_SUPPORTS_OPROFILE=y | ||
20 | CONFIG_GENERIC_HWEIGHT=y | 20 | CONFIG_GENERIC_HWEIGHT=y |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 21 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
22 | CONFIG_GENERIC_BUG=y | 22 | CONFIG_GENERIC_BUG=y |
@@ -36,15 +36,15 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
36 | CONFIG_POSIX_MQUEUE=y | 36 | CONFIG_POSIX_MQUEUE=y |
37 | # CONFIG_BSD_PROCESS_ACCT is not set | 37 | # CONFIG_BSD_PROCESS_ACCT is not set |
38 | # CONFIG_TASKSTATS is not set | 38 | # CONFIG_TASKSTATS is not set |
39 | # CONFIG_USER_NS is not set | ||
40 | # CONFIG_PID_NS is not set | ||
41 | # CONFIG_AUDIT is not set | 39 | # CONFIG_AUDIT is not set |
42 | # CONFIG_IKCONFIG is not set | 40 | # CONFIG_IKCONFIG is not set |
43 | CONFIG_LOG_BUF_SHIFT=14 | 41 | CONFIG_LOG_BUF_SHIFT=14 |
44 | # CONFIG_CGROUPS is not set | 42 | # CONFIG_CGROUPS is not set |
45 | # CONFIG_FAIR_GROUP_SCHED is not set | 43 | # CONFIG_GROUP_SCHED is not set |
46 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
45 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
47 | CONFIG_RELAY=y | 46 | CONFIG_RELAY=y |
47 | # CONFIG_NAMESPACES is not set | ||
48 | CONFIG_BLK_DEV_INITRD=y | 48 | CONFIG_BLK_DEV_INITRD=y |
49 | CONFIG_INITRAMFS_SOURCE="" | 49 | CONFIG_INITRAMFS_SOURCE="" |
50 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 50 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -58,11 +58,13 @@ CONFIG_HOTPLUG=y | |||
58 | CONFIG_PRINTK=y | 58 | CONFIG_PRINTK=y |
59 | CONFIG_BUG=y | 59 | CONFIG_BUG=y |
60 | CONFIG_ELF_CORE=y | 60 | CONFIG_ELF_CORE=y |
61 | # CONFIG_COMPAT_BRK is not set | ||
61 | # CONFIG_BASE_FULL is not set | 62 | # CONFIG_BASE_FULL is not set |
62 | CONFIG_FUTEX=y | 63 | CONFIG_FUTEX=y |
63 | CONFIG_ANON_INODES=y | 64 | CONFIG_ANON_INODES=y |
64 | CONFIG_EPOLL=y | 65 | CONFIG_EPOLL=y |
65 | CONFIG_SIGNALFD=y | 66 | CONFIG_SIGNALFD=y |
67 | CONFIG_TIMERFD=y | ||
66 | CONFIG_EVENTFD=y | 68 | CONFIG_EVENTFD=y |
67 | CONFIG_SHMEM=y | 69 | CONFIG_SHMEM=y |
68 | CONFIG_VM_EVENT_COUNTERS=y | 70 | CONFIG_VM_EVENT_COUNTERS=y |
@@ -70,11 +72,21 @@ CONFIG_SLUB_DEBUG=y | |||
70 | # CONFIG_SLAB is not set | 72 | # CONFIG_SLAB is not set |
71 | CONFIG_SLUB=y | 73 | CONFIG_SLUB=y |
72 | # CONFIG_SLOB is not set | 74 | # CONFIG_SLOB is not set |
75 | CONFIG_PROFILING=y | ||
76 | # CONFIG_MARKERS is not set | ||
77 | CONFIG_OPROFILE=m | ||
78 | CONFIG_HAVE_OPROFILE=y | ||
79 | CONFIG_KPROBES=y | ||
80 | CONFIG_HAVE_KPROBES=y | ||
81 | # CONFIG_HAVE_KRETPROBES is not set | ||
82 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
83 | CONFIG_PROC_PAGE_MONITOR=y | ||
73 | CONFIG_SLABINFO=y | 84 | CONFIG_SLABINFO=y |
74 | CONFIG_RT_MUTEXES=y | 85 | CONFIG_RT_MUTEXES=y |
75 | # CONFIG_TINY_SHMEM is not set | 86 | # CONFIG_TINY_SHMEM is not set |
76 | CONFIG_BASE_SMALL=1 | 87 | CONFIG_BASE_SMALL=1 |
77 | CONFIG_MODULES=y | 88 | CONFIG_MODULES=y |
89 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
78 | CONFIG_MODULE_UNLOAD=y | 90 | CONFIG_MODULE_UNLOAD=y |
79 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 91 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
80 | # CONFIG_MODVERSIONS is not set | 92 | # CONFIG_MODVERSIONS is not set |
@@ -98,10 +110,15 @@ CONFIG_IOSCHED_CFQ=y | |||
98 | CONFIG_DEFAULT_CFQ=y | 110 | CONFIG_DEFAULT_CFQ=y |
99 | # CONFIG_DEFAULT_NOOP is not set | 111 | # CONFIG_DEFAULT_NOOP is not set |
100 | CONFIG_DEFAULT_IOSCHED="cfq" | 112 | CONFIG_DEFAULT_IOSCHED="cfq" |
113 | CONFIG_CLASSIC_RCU=y | ||
101 | 114 | ||
102 | # | 115 | # |
103 | # System Type and features | 116 | # System Type and features |
104 | # | 117 | # |
118 | CONFIG_TICK_ONESHOT=y | ||
119 | CONFIG_NO_HZ=y | ||
120 | CONFIG_HIGH_RES_TIMERS=y | ||
121 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
105 | CONFIG_SUBARCH_AVR32B=y | 122 | CONFIG_SUBARCH_AVR32B=y |
106 | CONFIG_MMU=y | 123 | CONFIG_MMU=y |
107 | CONFIG_PERFORMANCE_COUNTERS=y | 124 | CONFIG_PERFORMANCE_COUNTERS=y |
@@ -147,16 +164,19 @@ CONFIG_FLATMEM=y | |||
147 | CONFIG_FLAT_NODE_MEM_MAP=y | 164 | CONFIG_FLAT_NODE_MEM_MAP=y |
148 | # CONFIG_SPARSEMEM_STATIC is not set | 165 | # CONFIG_SPARSEMEM_STATIC is not set |
149 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 166 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
167 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
150 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 168 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
151 | # CONFIG_RESOURCES_64BIT is not set | 169 | # CONFIG_RESOURCES_64BIT is not set |
152 | CONFIG_ZONE_DMA_FLAG=0 | 170 | CONFIG_ZONE_DMA_FLAG=0 |
153 | CONFIG_VIRT_TO_BUS=y | 171 | CONFIG_VIRT_TO_BUS=y |
154 | # CONFIG_OWNERSHIP_TRACE is not set | 172 | # CONFIG_OWNERSHIP_TRACE is not set |
173 | CONFIG_NMI_DEBUGGING=y | ||
155 | # CONFIG_HZ_100 is not set | 174 | # CONFIG_HZ_100 is not set |
156 | CONFIG_HZ_250=y | 175 | CONFIG_HZ_250=y |
157 | # CONFIG_HZ_300 is not set | 176 | # CONFIG_HZ_300 is not set |
158 | # CONFIG_HZ_1000 is not set | 177 | # CONFIG_HZ_1000 is not set |
159 | CONFIG_HZ=250 | 178 | CONFIG_HZ=250 |
179 | # CONFIG_SCHED_HRTICK is not set | ||
160 | CONFIG_CMDLINE="" | 180 | CONFIG_CMDLINE="" |
161 | 181 | ||
162 | # | 182 | # |
@@ -170,9 +190,10 @@ CONFIG_CPU_FREQ=y | |||
170 | CONFIG_CPU_FREQ_TABLE=y | 190 | CONFIG_CPU_FREQ_TABLE=y |
171 | # CONFIG_CPU_FREQ_DEBUG is not set | 191 | # CONFIG_CPU_FREQ_DEBUG is not set |
172 | # CONFIG_CPU_FREQ_STAT is not set | 192 | # CONFIG_CPU_FREQ_STAT is not set |
173 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 193 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
194 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
174 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
175 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 196 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
176 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 197 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
177 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 198 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
178 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 199 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
@@ -208,6 +229,7 @@ CONFIG_XFRM=y | |||
208 | CONFIG_XFRM_USER=m | 229 | CONFIG_XFRM_USER=m |
209 | # CONFIG_XFRM_SUB_POLICY is not set | 230 | # CONFIG_XFRM_SUB_POLICY is not set |
210 | # CONFIG_XFRM_MIGRATE is not set | 231 | # CONFIG_XFRM_MIGRATE is not set |
232 | # CONFIG_XFRM_STATISTICS is not set | ||
211 | CONFIG_NET_KEY=m | 233 | CONFIG_NET_KEY=m |
212 | # CONFIG_NET_KEY_MIGRATE is not set | 234 | # CONFIG_NET_KEY_MIGRATE is not set |
213 | CONFIG_INET=y | 235 | CONFIG_INET=y |
@@ -252,8 +274,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m | |||
252 | CONFIG_INET6_XFRM_MODE_BEET=m | 274 | CONFIG_INET6_XFRM_MODE_BEET=m |
253 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 275 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
254 | CONFIG_IPV6_SIT=m | 276 | CONFIG_IPV6_SIT=m |
277 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
255 | CONFIG_IPV6_TUNNEL=m | 278 | CONFIG_IPV6_TUNNEL=m |
256 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 279 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
280 | # CONFIG_IPV6_MROUTE is not set | ||
257 | # CONFIG_NETWORK_SECMARK is not set | 281 | # CONFIG_NETWORK_SECMARK is not set |
258 | # CONFIG_NETFILTER is not set | 282 | # CONFIG_NETFILTER is not set |
259 | # CONFIG_IP_DCCP is not set | 283 | # CONFIG_IP_DCCP is not set |
@@ -279,6 +303,7 @@ CONFIG_LLC=m | |||
279 | # CONFIG_NET_PKTGEN is not set | 303 | # CONFIG_NET_PKTGEN is not set |
280 | # CONFIG_NET_TCPPROBE is not set | 304 | # CONFIG_NET_TCPPROBE is not set |
281 | # CONFIG_HAMRADIO is not set | 305 | # CONFIG_HAMRADIO is not set |
306 | # CONFIG_CAN is not set | ||
282 | # CONFIG_IRDA is not set | 307 | # CONFIG_IRDA is not set |
283 | # CONFIG_BT is not set | 308 | # CONFIG_BT is not set |
284 | # CONFIG_AF_RXRPC is not set | 309 | # CONFIG_AF_RXRPC is not set |
@@ -314,6 +339,7 @@ CONFIG_MTD=y | |||
314 | CONFIG_MTD_PARTITIONS=y | 339 | CONFIG_MTD_PARTITIONS=y |
315 | # CONFIG_MTD_REDBOOT_PARTS is not set | 340 | # CONFIG_MTD_REDBOOT_PARTS is not set |
316 | CONFIG_MTD_CMDLINE_PARTS=y | 341 | CONFIG_MTD_CMDLINE_PARTS=y |
342 | # CONFIG_MTD_AR7_PARTS is not set | ||
317 | 343 | ||
318 | # | 344 | # |
319 | # User Modules And Translation Layers | 345 | # User Modules And Translation Layers |
@@ -368,6 +394,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
368 | # | 394 | # |
369 | CONFIG_MTD_DATAFLASH=m | 395 | CONFIG_MTD_DATAFLASH=m |
370 | CONFIG_MTD_M25P80=m | 396 | CONFIG_MTD_M25P80=m |
397 | CONFIG_M25PXX_USE_FAST_READ=y | ||
371 | # CONFIG_MTD_SLRAM is not set | 398 | # CONFIG_MTD_SLRAM is not set |
372 | # CONFIG_MTD_PHRAM is not set | 399 | # CONFIG_MTD_PHRAM is not set |
373 | # CONFIG_MTD_MTDRAM is not set | 400 | # CONFIG_MTD_MTDRAM is not set |
@@ -395,13 +422,18 @@ CONFIG_BLK_DEV_NBD=m | |||
395 | CONFIG_BLK_DEV_RAM=m | 422 | CONFIG_BLK_DEV_RAM=m |
396 | CONFIG_BLK_DEV_RAM_COUNT=16 | 423 | CONFIG_BLK_DEV_RAM_COUNT=16 |
397 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 424 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
398 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 425 | # CONFIG_BLK_DEV_XIP is not set |
399 | # CONFIG_CDROM_PKTCDVD is not set | 426 | # CONFIG_CDROM_PKTCDVD is not set |
400 | # CONFIG_ATA_OVER_ETH is not set | 427 | # CONFIG_ATA_OVER_ETH is not set |
401 | CONFIG_MISC_DEVICES=y | 428 | CONFIG_MISC_DEVICES=y |
429 | CONFIG_ATMEL_PWM=m | ||
430 | CONFIG_ATMEL_TCLIB=y | ||
431 | CONFIG_ATMEL_TCB_CLKSRC=y | ||
432 | CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 | ||
402 | # CONFIG_EEPROM_93CX6 is not set | 433 | # CONFIG_EEPROM_93CX6 is not set |
403 | CONFIG_ATMEL_SSC=m | 434 | CONFIG_ATMEL_SSC=m |
404 | # CONFIG_IDE is not set | 435 | # CONFIG_ENCLOSURE_SERVICES is not set |
436 | # CONFIG_HAVE_IDE is not set | ||
405 | 437 | ||
406 | # | 438 | # |
407 | # SCSI device support | 439 | # SCSI device support |
@@ -444,6 +476,9 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
444 | # CONFIG_SCSI_LOWLEVEL is not set | 476 | # CONFIG_SCSI_LOWLEVEL is not set |
445 | CONFIG_ATA=m | 477 | CONFIG_ATA=m |
446 | # CONFIG_ATA_NONSTANDARD is not set | 478 | # CONFIG_ATA_NONSTANDARD is not set |
479 | # CONFIG_SATA_PMP is not set | ||
480 | CONFIG_ATA_SFF=y | ||
481 | # CONFIG_SATA_MV is not set | ||
447 | CONFIG_PATA_AT32=m | 482 | CONFIG_PATA_AT32=m |
448 | # CONFIG_PATA_PLATFORM is not set | 483 | # CONFIG_PATA_PLATFORM is not set |
449 | # CONFIG_MD is not set | 484 | # CONFIG_MD is not set |
@@ -469,11 +504,13 @@ CONFIG_PHYLIB=y | |||
469 | # CONFIG_SMSC_PHY is not set | 504 | # CONFIG_SMSC_PHY is not set |
470 | # CONFIG_BROADCOM_PHY is not set | 505 | # CONFIG_BROADCOM_PHY is not set |
471 | # CONFIG_ICPLUS_PHY is not set | 506 | # CONFIG_ICPLUS_PHY is not set |
507 | # CONFIG_REALTEK_PHY is not set | ||
472 | # CONFIG_FIXED_PHY is not set | 508 | # CONFIG_FIXED_PHY is not set |
473 | # CONFIG_MDIO_BITBANG is not set | 509 | # CONFIG_MDIO_BITBANG is not set |
474 | CONFIG_NET_ETHERNET=y | 510 | CONFIG_NET_ETHERNET=y |
475 | # CONFIG_MII is not set | 511 | # CONFIG_MII is not set |
476 | CONFIG_MACB=y | 512 | CONFIG_MACB=y |
513 | # CONFIG_ENC28J60 is not set | ||
477 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 514 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
478 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 515 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
479 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 516 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
@@ -487,6 +524,7 @@ CONFIG_MACB=y | |||
487 | # | 524 | # |
488 | # CONFIG_WLAN_PRE80211 is not set | 525 | # CONFIG_WLAN_PRE80211 is not set |
489 | # CONFIG_WLAN_80211 is not set | 526 | # CONFIG_WLAN_80211 is not set |
527 | # CONFIG_IWLWIFI_LEDS is not set | ||
490 | # CONFIG_WAN is not set | 528 | # CONFIG_WAN is not set |
491 | CONFIG_PPP=m | 529 | CONFIG_PPP=m |
492 | # CONFIG_PPP_MULTILINK is not set | 530 | # CONFIG_PPP_MULTILINK is not set |
@@ -500,7 +538,6 @@ CONFIG_PPP_BSDCOMP=m | |||
500 | # CONFIG_PPPOL2TP is not set | 538 | # CONFIG_PPPOL2TP is not set |
501 | # CONFIG_SLIP is not set | 539 | # CONFIG_SLIP is not set |
502 | CONFIG_SLHC=m | 540 | CONFIG_SLHC=m |
503 | # CONFIG_SHAPER is not set | ||
504 | # CONFIG_NETCONSOLE is not set | 541 | # CONFIG_NETCONSOLE is not set |
505 | # CONFIG_NETPOLL is not set | 542 | # CONFIG_NETPOLL is not set |
506 | # CONFIG_NET_POLL_CONTROLLER is not set | 543 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -556,6 +593,7 @@ CONFIG_MOUSE_GPIO=m | |||
556 | # Character devices | 593 | # Character devices |
557 | # | 594 | # |
558 | # CONFIG_VT is not set | 595 | # CONFIG_VT is not set |
596 | # CONFIG_DEVKMEM is not set | ||
559 | # CONFIG_SERIAL_NONSTANDARD is not set | 597 | # CONFIG_SERIAL_NONSTANDARD is not set |
560 | 598 | ||
561 | # | 599 | # |
@@ -568,6 +606,7 @@ CONFIG_MOUSE_GPIO=m | |||
568 | # | 606 | # |
569 | CONFIG_SERIAL_ATMEL=y | 607 | CONFIG_SERIAL_ATMEL=y |
570 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 608 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
609 | CONFIG_SERIAL_ATMEL_PDC=y | ||
571 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | 610 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
572 | CONFIG_SERIAL_CORE=y | 611 | CONFIG_SERIAL_CORE=y |
573 | CONFIG_SERIAL_CORE_CONSOLE=y | 612 | CONFIG_SERIAL_CORE_CONSOLE=y |
@@ -575,21 +614,13 @@ CONFIG_UNIX98_PTYS=y | |||
575 | # CONFIG_LEGACY_PTYS is not set | 614 | # CONFIG_LEGACY_PTYS is not set |
576 | # CONFIG_IPMI_HANDLER is not set | 615 | # CONFIG_IPMI_HANDLER is not set |
577 | # CONFIG_HW_RANDOM is not set | 616 | # CONFIG_HW_RANDOM is not set |
578 | # CONFIG_RTC is not set | ||
579 | # CONFIG_GEN_RTC is not set | ||
580 | # CONFIG_R3964 is not set | 617 | # CONFIG_R3964 is not set |
581 | # CONFIG_RAW_DRIVER is not set | 618 | # CONFIG_RAW_DRIVER is not set |
582 | # CONFIG_TCG_TPM is not set | 619 | # CONFIG_TCG_TPM is not set |
583 | CONFIG_I2C=m | 620 | CONFIG_I2C=m |
584 | CONFIG_I2C_BOARDINFO=y | 621 | CONFIG_I2C_BOARDINFO=y |
585 | CONFIG_I2C_CHARDEV=m | 622 | CONFIG_I2C_CHARDEV=m |
586 | |||
587 | # | ||
588 | # I2C Algorithms | ||
589 | # | ||
590 | CONFIG_I2C_ALGOBIT=m | 623 | CONFIG_I2C_ALGOBIT=m |
591 | # CONFIG_I2C_ALGOPCF is not set | ||
592 | # CONFIG_I2C_ALGOPCA is not set | ||
593 | 624 | ||
594 | # | 625 | # |
595 | # I2C Hardware Bus support | 626 | # I2C Hardware Bus support |
@@ -600,27 +631,23 @@ CONFIG_I2C_GPIO=m | |||
600 | # CONFIG_I2C_SIMTEC is not set | 631 | # CONFIG_I2C_SIMTEC is not set |
601 | # CONFIG_I2C_TAOS_EVM is not set | 632 | # CONFIG_I2C_TAOS_EVM is not set |
602 | # CONFIG_I2C_STUB is not set | 633 | # CONFIG_I2C_STUB is not set |
634 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
603 | 635 | ||
604 | # | 636 | # |
605 | # Miscellaneous I2C Chip support | 637 | # Miscellaneous I2C Chip support |
606 | # | 638 | # |
607 | # CONFIG_SENSORS_DS1337 is not set | ||
608 | # CONFIG_SENSORS_DS1374 is not set | ||
609 | # CONFIG_DS1682 is not set | 639 | # CONFIG_DS1682 is not set |
610 | # CONFIG_SENSORS_EEPROM is not set | 640 | # CONFIG_SENSORS_EEPROM is not set |
611 | # CONFIG_SENSORS_PCF8574 is not set | 641 | # CONFIG_SENSORS_PCF8574 is not set |
612 | # CONFIG_SENSORS_PCA9539 is not set | 642 | # CONFIG_PCF8575 is not set |
613 | # CONFIG_SENSORS_PCF8591 is not set | 643 | # CONFIG_SENSORS_PCF8591 is not set |
644 | # CONFIG_TPS65010 is not set | ||
614 | # CONFIG_SENSORS_MAX6875 is not set | 645 | # CONFIG_SENSORS_MAX6875 is not set |
615 | # CONFIG_SENSORS_TSL2550 is not set | 646 | # CONFIG_SENSORS_TSL2550 is not set |
616 | # CONFIG_I2C_DEBUG_CORE is not set | 647 | # CONFIG_I2C_DEBUG_CORE is not set |
617 | # CONFIG_I2C_DEBUG_ALGO is not set | 648 | # CONFIG_I2C_DEBUG_ALGO is not set |
618 | # CONFIG_I2C_DEBUG_BUS is not set | 649 | # CONFIG_I2C_DEBUG_BUS is not set |
619 | # CONFIG_I2C_DEBUG_CHIP is not set | 650 | # CONFIG_I2C_DEBUG_CHIP is not set |
620 | |||
621 | # | ||
622 | # SPI support | ||
623 | # | ||
624 | CONFIG_SPI=y | 651 | CONFIG_SPI=y |
625 | # CONFIG_SPI_DEBUG is not set | 652 | # CONFIG_SPI_DEBUG is not set |
626 | CONFIG_SPI_MASTER=y | 653 | CONFIG_SPI_MASTER=y |
@@ -637,9 +664,27 @@ CONFIG_SPI_ATMEL=y | |||
637 | # CONFIG_SPI_AT25 is not set | 664 | # CONFIG_SPI_AT25 is not set |
638 | CONFIG_SPI_SPIDEV=m | 665 | CONFIG_SPI_SPIDEV=m |
639 | # CONFIG_SPI_TLE62X0 is not set | 666 | # CONFIG_SPI_TLE62X0 is not set |
667 | CONFIG_HAVE_GPIO_LIB=y | ||
668 | |||
669 | # | ||
670 | # GPIO Support | ||
671 | # | ||
672 | # CONFIG_DEBUG_GPIO is not set | ||
673 | |||
674 | # | ||
675 | # I2C GPIO expanders: | ||
676 | # | ||
677 | # CONFIG_GPIO_PCA953X is not set | ||
678 | # CONFIG_GPIO_PCF857X is not set | ||
679 | |||
680 | # | ||
681 | # SPI GPIO expanders: | ||
682 | # | ||
683 | # CONFIG_GPIO_MCP23S08 is not set | ||
640 | # CONFIG_W1 is not set | 684 | # CONFIG_W1 is not set |
641 | # CONFIG_POWER_SUPPLY is not set | 685 | # CONFIG_POWER_SUPPLY is not set |
642 | # CONFIG_HWMON is not set | 686 | # CONFIG_HWMON is not set |
687 | # CONFIG_THERMAL is not set | ||
643 | CONFIG_WATCHDOG=y | 688 | CONFIG_WATCHDOG=y |
644 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 689 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
645 | 690 | ||
@@ -659,12 +704,22 @@ CONFIG_SSB_POSSIBLE=y | |||
659 | # Multifunction device drivers | 704 | # Multifunction device drivers |
660 | # | 705 | # |
661 | # CONFIG_MFD_SM501 is not set | 706 | # CONFIG_MFD_SM501 is not set |
707 | # CONFIG_HTC_PASIC3 is not set | ||
662 | 708 | ||
663 | # | 709 | # |
664 | # Multimedia devices | 710 | # Multimedia devices |
665 | # | 711 | # |
712 | |||
713 | # | ||
714 | # Multimedia core support | ||
715 | # | ||
666 | # CONFIG_VIDEO_DEV is not set | 716 | # CONFIG_VIDEO_DEV is not set |
667 | # CONFIG_DVB_CORE is not set | 717 | # CONFIG_DVB_CORE is not set |
718 | # CONFIG_VIDEO_MEDIA is not set | ||
719 | |||
720 | # | ||
721 | # Multimedia drivers | ||
722 | # | ||
668 | # CONFIG_DAB is not set | 723 | # CONFIG_DAB is not set |
669 | 724 | ||
670 | # | 725 | # |
@@ -682,8 +737,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
682 | # CONFIG_FB_SYS_FILLRECT is not set | 737 | # CONFIG_FB_SYS_FILLRECT is not set |
683 | # CONFIG_FB_SYS_COPYAREA is not set | 738 | # CONFIG_FB_SYS_COPYAREA is not set |
684 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 739 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
740 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
685 | # CONFIG_FB_SYS_FOPS is not set | 741 | # CONFIG_FB_SYS_FOPS is not set |
686 | CONFIG_FB_DEFERRED_IO=y | ||
687 | # CONFIG_FB_SVGALIB is not set | 742 | # CONFIG_FB_SVGALIB is not set |
688 | # CONFIG_FB_MACMODES is not set | 743 | # CONFIG_FB_MACMODES is not set |
689 | # CONFIG_FB_BACKLIGHT is not set | 744 | # CONFIG_FB_BACKLIGHT is not set |
@@ -749,7 +804,11 @@ CONFIG_SND_AT73C213_TARGET_BITRATE=48000 | |||
749 | # CONFIG_SND_SOC is not set | 804 | # CONFIG_SND_SOC is not set |
750 | 805 | ||
751 | # | 806 | # |
752 | # SoC Audio support for SuperH | 807 | # ALSA SoC audio for Freescale SOCs |
808 | # | ||
809 | |||
810 | # | ||
811 | # SoC Audio for the Texas Instruments OMAP | ||
753 | # | 812 | # |
754 | 813 | ||
755 | # | 814 | # |
@@ -761,14 +820,12 @@ CONFIG_USB_SUPPORT=y | |||
761 | # CONFIG_USB_ARCH_HAS_HCD is not set | 820 | # CONFIG_USB_ARCH_HAS_HCD is not set |
762 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 821 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
763 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 822 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
823 | # CONFIG_USB_OTG_WHITELIST is not set | ||
824 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
764 | 825 | ||
765 | # | 826 | # |
766 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 827 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
767 | # | 828 | # |
768 | |||
769 | # | ||
770 | # USB Gadget Support | ||
771 | # | ||
772 | CONFIG_USB_GADGET=y | 829 | CONFIG_USB_GADGET=y |
773 | # CONFIG_USB_GADGET_DEBUG is not set | 830 | # CONFIG_USB_GADGET_DEBUG is not set |
774 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 831 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
@@ -781,6 +838,7 @@ CONFIG_USB_ATMEL_USBA=y | |||
781 | # CONFIG_USB_GADGET_NET2280 is not set | 838 | # CONFIG_USB_GADGET_NET2280 is not set |
782 | # CONFIG_USB_GADGET_PXA2XX is not set | 839 | # CONFIG_USB_GADGET_PXA2XX is not set |
783 | # CONFIG_USB_GADGET_M66592 is not set | 840 | # CONFIG_USB_GADGET_M66592 is not set |
841 | # CONFIG_USB_GADGET_PXA27X is not set | ||
784 | # CONFIG_USB_GADGET_GOKU is not set | 842 | # CONFIG_USB_GADGET_GOKU is not set |
785 | # CONFIG_USB_GADGET_LH7A40X is not set | 843 | # CONFIG_USB_GADGET_LH7A40X is not set |
786 | # CONFIG_USB_GADGET_OMAP is not set | 844 | # CONFIG_USB_GADGET_OMAP is not set |
@@ -796,6 +854,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
796 | # CONFIG_USB_FILE_STORAGE_TEST is not set | 854 | # CONFIG_USB_FILE_STORAGE_TEST is not set |
797 | CONFIG_USB_G_SERIAL=m | 855 | CONFIG_USB_G_SERIAL=m |
798 | # CONFIG_USB_MIDI_GADGET is not set | 856 | # CONFIG_USB_MIDI_GADGET is not set |
857 | # CONFIG_USB_G_PRINTER is not set | ||
799 | CONFIG_MMC=m | 858 | CONFIG_MMC=m |
800 | # CONFIG_MMC_DEBUG is not set | 859 | # CONFIG_MMC_DEBUG is not set |
801 | # CONFIG_MMC_UNSAFE_RESUME is not set | 860 | # CONFIG_MMC_UNSAFE_RESUME is not set |
@@ -806,17 +865,20 @@ CONFIG_MMC=m | |||
806 | CONFIG_MMC_BLOCK=m | 865 | CONFIG_MMC_BLOCK=m |
807 | CONFIG_MMC_BLOCK_BOUNCE=y | 866 | CONFIG_MMC_BLOCK_BOUNCE=y |
808 | # CONFIG_SDIO_UART is not set | 867 | # CONFIG_SDIO_UART is not set |
868 | CONFIG_MMC_TEST=m | ||
809 | 869 | ||
810 | # | 870 | # |
811 | # MMC/SD Host Controller Drivers | 871 | # MMC/SD Host Controller Drivers |
812 | # | 872 | # |
813 | CONFIG_MMC_SPI=m | 873 | CONFIG_MMC_SPI=m |
874 | # CONFIG_MEMSTICK is not set | ||
814 | CONFIG_NEW_LEDS=y | 875 | CONFIG_NEW_LEDS=y |
815 | CONFIG_LEDS_CLASS=m | 876 | CONFIG_LEDS_CLASS=m |
816 | 877 | ||
817 | # | 878 | # |
818 | # LED drivers | 879 | # LED drivers |
819 | # | 880 | # |
881 | CONFIG_LEDS_ATMEL_PWM=m | ||
820 | CONFIG_LEDS_GPIO=m | 882 | CONFIG_LEDS_GPIO=m |
821 | 883 | ||
822 | # | 884 | # |
@@ -825,6 +887,8 @@ CONFIG_LEDS_GPIO=m | |||
825 | CONFIG_LEDS_TRIGGERS=y | 887 | CONFIG_LEDS_TRIGGERS=y |
826 | CONFIG_LEDS_TRIGGER_TIMER=m | 888 | CONFIG_LEDS_TRIGGER_TIMER=m |
827 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | 889 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
890 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | ||
891 | # CONFIG_ACCESSIBILITY is not set | ||
828 | CONFIG_RTC_LIB=y | 892 | CONFIG_RTC_LIB=y |
829 | CONFIG_RTC_CLASS=y | 893 | CONFIG_RTC_CLASS=y |
830 | CONFIG_RTC_HCTOSYS=y | 894 | CONFIG_RTC_HCTOSYS=y |
@@ -853,19 +917,22 @@ CONFIG_RTC_INTF_DEV=y | |||
853 | # CONFIG_RTC_DRV_PCF8563 is not set | 917 | # CONFIG_RTC_DRV_PCF8563 is not set |
854 | # CONFIG_RTC_DRV_PCF8583 is not set | 918 | # CONFIG_RTC_DRV_PCF8583 is not set |
855 | # CONFIG_RTC_DRV_M41T80 is not set | 919 | # CONFIG_RTC_DRV_M41T80 is not set |
920 | # CONFIG_RTC_DRV_S35390A is not set | ||
856 | 921 | ||
857 | # | 922 | # |
858 | # SPI RTC drivers | 923 | # SPI RTC drivers |
859 | # | 924 | # |
860 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
861 | # CONFIG_RTC_DRV_MAX6902 is not set | 925 | # CONFIG_RTC_DRV_MAX6902 is not set |
926 | # CONFIG_RTC_DRV_R9701 is not set | ||
927 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
862 | 928 | ||
863 | # | 929 | # |
864 | # Platform RTC drivers | 930 | # Platform RTC drivers |
865 | # | 931 | # |
932 | # CONFIG_RTC_DRV_DS1511 is not set | ||
866 | # CONFIG_RTC_DRV_DS1553 is not set | 933 | # CONFIG_RTC_DRV_DS1553 is not set |
867 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
868 | # CONFIG_RTC_DRV_DS1742 is not set | 934 | # CONFIG_RTC_DRV_DS1742 is not set |
935 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
869 | # CONFIG_RTC_DRV_M48T86 is not set | 936 | # CONFIG_RTC_DRV_M48T86 is not set |
870 | # CONFIG_RTC_DRV_M48T59 is not set | 937 | # CONFIG_RTC_DRV_M48T59 is not set |
871 | # CONFIG_RTC_DRV_V3020 is not set | 938 | # CONFIG_RTC_DRV_V3020 is not set |
@@ -874,10 +941,6 @@ CONFIG_RTC_INTF_DEV=y | |||
874 | # on-CPU RTC drivers | 941 | # on-CPU RTC drivers |
875 | # | 942 | # |
876 | CONFIG_RTC_DRV_AT32AP700X=y | 943 | CONFIG_RTC_DRV_AT32AP700X=y |
877 | |||
878 | # | ||
879 | # Userspace I/O | ||
880 | # | ||
881 | # CONFIG_UIO is not set | 944 | # CONFIG_UIO is not set |
882 | 945 | ||
883 | # | 946 | # |
@@ -895,14 +958,11 @@ CONFIG_JBD=m | |||
895 | # CONFIG_JFS_FS is not set | 958 | # CONFIG_JFS_FS is not set |
896 | # CONFIG_FS_POSIX_ACL is not set | 959 | # CONFIG_FS_POSIX_ACL is not set |
897 | # CONFIG_XFS_FS is not set | 960 | # CONFIG_XFS_FS is not set |
898 | # CONFIG_GFS2_FS is not set | ||
899 | # CONFIG_OCFS2_FS is not set | 961 | # CONFIG_OCFS2_FS is not set |
900 | CONFIG_MINIX_FS=m | 962 | # CONFIG_DNOTIFY is not set |
901 | # CONFIG_ROMFS_FS is not set | ||
902 | CONFIG_INOTIFY=y | 963 | CONFIG_INOTIFY=y |
903 | CONFIG_INOTIFY_USER=y | 964 | CONFIG_INOTIFY_USER=y |
904 | # CONFIG_QUOTA is not set | 965 | # CONFIG_QUOTA is not set |
905 | # CONFIG_DNOTIFY is not set | ||
906 | # CONFIG_AUTOFS_FS is not set | 966 | # CONFIG_AUTOFS_FS is not set |
907 | # CONFIG_AUTOFS4_FS is not set | 967 | # CONFIG_AUTOFS4_FS is not set |
908 | CONFIG_FUSE_FS=m | 968 | CONFIG_FUSE_FS=m |
@@ -957,8 +1017,10 @@ CONFIG_JFFS2_RTIME=y | |||
957 | # CONFIG_JFFS2_RUBIN is not set | 1017 | # CONFIG_JFFS2_RUBIN is not set |
958 | # CONFIG_CRAMFS is not set | 1018 | # CONFIG_CRAMFS is not set |
959 | # CONFIG_VXFS_FS is not set | 1019 | # CONFIG_VXFS_FS is not set |
1020 | CONFIG_MINIX_FS=m | ||
960 | # CONFIG_HPFS_FS is not set | 1021 | # CONFIG_HPFS_FS is not set |
961 | # CONFIG_QNX4FS_FS is not set | 1022 | # CONFIG_QNX4FS_FS is not set |
1023 | # CONFIG_ROMFS_FS is not set | ||
962 | # CONFIG_SYSV_FS is not set | 1024 | # CONFIG_SYSV_FS is not set |
963 | # CONFIG_UFS_FS is not set | 1025 | # CONFIG_UFS_FS is not set |
964 | CONFIG_NETWORK_FILESYSTEMS=y | 1026 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -966,7 +1028,6 @@ CONFIG_NFS_FS=y | |||
966 | CONFIG_NFS_V3=y | 1028 | CONFIG_NFS_V3=y |
967 | # CONFIG_NFS_V3_ACL is not set | 1029 | # CONFIG_NFS_V3_ACL is not set |
968 | # CONFIG_NFS_V4 is not set | 1030 | # CONFIG_NFS_V4 is not set |
969 | # CONFIG_NFS_DIRECTIO is not set | ||
970 | # CONFIG_NFSD is not set | 1031 | # CONFIG_NFSD is not set |
971 | CONFIG_ROOT_NFS=y | 1032 | CONFIG_ROOT_NFS=y |
972 | CONFIG_LOCKD=y | 1033 | CONFIG_LOCKD=y |
@@ -1028,11 +1089,6 @@ CONFIG_NLS_ISO8859_1=m | |||
1028 | # CONFIG_NLS_KOI8_U is not set | 1089 | # CONFIG_NLS_KOI8_U is not set |
1029 | CONFIG_NLS_UTF8=m | 1090 | CONFIG_NLS_UTF8=m |
1030 | # CONFIG_DLM is not set | 1091 | # CONFIG_DLM is not set |
1031 | CONFIG_INSTRUMENTATION=y | ||
1032 | CONFIG_PROFILING=y | ||
1033 | CONFIG_OPROFILE=m | ||
1034 | CONFIG_KPROBES=y | ||
1035 | # CONFIG_MARKERS is not set | ||
1036 | 1092 | ||
1037 | # | 1093 | # |
1038 | # Kernel hacking | 1094 | # Kernel hacking |
@@ -1040,6 +1096,7 @@ CONFIG_KPROBES=y | |||
1040 | # CONFIG_PRINTK_TIME is not set | 1096 | # CONFIG_PRINTK_TIME is not set |
1041 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1097 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1042 | CONFIG_ENABLE_MUST_CHECK=y | 1098 | CONFIG_ENABLE_MUST_CHECK=y |
1099 | CONFIG_FRAME_WARN=1024 | ||
1043 | CONFIG_MAGIC_SYSRQ=y | 1100 | CONFIG_MAGIC_SYSRQ=y |
1044 | # CONFIG_UNUSED_SYMBOLS is not set | 1101 | # CONFIG_UNUSED_SYMBOLS is not set |
1045 | CONFIG_DEBUG_FS=y | 1102 | CONFIG_DEBUG_FS=y |
@@ -1050,7 +1107,9 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1050 | CONFIG_SCHED_DEBUG=y | 1107 | CONFIG_SCHED_DEBUG=y |
1051 | # CONFIG_SCHEDSTATS is not set | 1108 | # CONFIG_SCHEDSTATS is not set |
1052 | # CONFIG_TIMER_STATS is not set | 1109 | # CONFIG_TIMER_STATS is not set |
1110 | # CONFIG_DEBUG_OBJECTS is not set | ||
1053 | # CONFIG_SLUB_DEBUG_ON is not set | 1111 | # CONFIG_SLUB_DEBUG_ON is not set |
1112 | # CONFIG_SLUB_STATS is not set | ||
1054 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1113 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1055 | # CONFIG_RT_MUTEX_TESTER is not set | 1114 | # CONFIG_RT_MUTEX_TESTER is not set |
1056 | # CONFIG_DEBUG_SPINLOCK is not set | 1115 | # CONFIG_DEBUG_SPINLOCK is not set |
@@ -1064,12 +1123,14 @@ CONFIG_SCHED_DEBUG=y | |||
1064 | CONFIG_DEBUG_BUGVERBOSE=y | 1123 | CONFIG_DEBUG_BUGVERBOSE=y |
1065 | # CONFIG_DEBUG_INFO is not set | 1124 | # CONFIG_DEBUG_INFO is not set |
1066 | # CONFIG_DEBUG_VM is not set | 1125 | # CONFIG_DEBUG_VM is not set |
1126 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1067 | # CONFIG_DEBUG_LIST is not set | 1127 | # CONFIG_DEBUG_LIST is not set |
1068 | # CONFIG_DEBUG_SG is not set | 1128 | # CONFIG_DEBUG_SG is not set |
1069 | CONFIG_FRAME_POINTER=y | 1129 | CONFIG_FRAME_POINTER=y |
1070 | CONFIG_FORCED_INLINING=y | ||
1071 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1130 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1072 | # CONFIG_RCU_TORTURE_TEST is not set | 1131 | # CONFIG_RCU_TORTURE_TEST is not set |
1132 | # CONFIG_KPROBES_SANITY_TEST is not set | ||
1133 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1073 | # CONFIG_LKDTM is not set | 1134 | # CONFIG_LKDTM is not set |
1074 | # CONFIG_FAULT_INJECTION is not set | 1135 | # CONFIG_FAULT_INJECTION is not set |
1075 | # CONFIG_SAMPLES is not set | 1136 | # CONFIG_SAMPLES is not set |
@@ -1081,52 +1142,90 @@ CONFIG_FORCED_INLINING=y | |||
1081 | # CONFIG_SECURITY is not set | 1142 | # CONFIG_SECURITY is not set |
1082 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1143 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1083 | CONFIG_CRYPTO=y | 1144 | CONFIG_CRYPTO=y |
1145 | |||
1146 | # | ||
1147 | # Crypto core or helper | ||
1148 | # | ||
1084 | CONFIG_CRYPTO_ALGAPI=m | 1149 | CONFIG_CRYPTO_ALGAPI=m |
1150 | CONFIG_CRYPTO_AEAD=m | ||
1085 | CONFIG_CRYPTO_BLKCIPHER=m | 1151 | CONFIG_CRYPTO_BLKCIPHER=m |
1086 | CONFIG_CRYPTO_HASH=m | 1152 | CONFIG_CRYPTO_HASH=m |
1087 | CONFIG_CRYPTO_MANAGER=m | 1153 | CONFIG_CRYPTO_MANAGER=m |
1154 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1155 | # CONFIG_CRYPTO_NULL is not set | ||
1156 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1157 | CONFIG_CRYPTO_AUTHENC=m | ||
1158 | # CONFIG_CRYPTO_TEST is not set | ||
1159 | |||
1160 | # | ||
1161 | # Authenticated Encryption with Associated Data | ||
1162 | # | ||
1163 | # CONFIG_CRYPTO_CCM is not set | ||
1164 | # CONFIG_CRYPTO_GCM is not set | ||
1165 | # CONFIG_CRYPTO_SEQIV is not set | ||
1166 | |||
1167 | # | ||
1168 | # Block modes | ||
1169 | # | ||
1170 | CONFIG_CRYPTO_CBC=m | ||
1171 | # CONFIG_CRYPTO_CTR is not set | ||
1172 | # CONFIG_CRYPTO_CTS is not set | ||
1173 | # CONFIG_CRYPTO_ECB is not set | ||
1174 | # CONFIG_CRYPTO_LRW is not set | ||
1175 | # CONFIG_CRYPTO_PCBC is not set | ||
1176 | # CONFIG_CRYPTO_XTS is not set | ||
1177 | |||
1178 | # | ||
1179 | # Hash modes | ||
1180 | # | ||
1088 | CONFIG_CRYPTO_HMAC=m | 1181 | CONFIG_CRYPTO_HMAC=m |
1089 | # CONFIG_CRYPTO_XCBC is not set | 1182 | # CONFIG_CRYPTO_XCBC is not set |
1090 | # CONFIG_CRYPTO_NULL is not set | 1183 | |
1184 | # | ||
1185 | # Digest | ||
1186 | # | ||
1187 | # CONFIG_CRYPTO_CRC32C is not set | ||
1091 | # CONFIG_CRYPTO_MD4 is not set | 1188 | # CONFIG_CRYPTO_MD4 is not set |
1092 | CONFIG_CRYPTO_MD5=m | 1189 | CONFIG_CRYPTO_MD5=m |
1190 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1093 | CONFIG_CRYPTO_SHA1=m | 1191 | CONFIG_CRYPTO_SHA1=m |
1094 | # CONFIG_CRYPTO_SHA256 is not set | 1192 | # CONFIG_CRYPTO_SHA256 is not set |
1095 | # CONFIG_CRYPTO_SHA512 is not set | 1193 | # CONFIG_CRYPTO_SHA512 is not set |
1096 | # CONFIG_CRYPTO_WP512 is not set | ||
1097 | # CONFIG_CRYPTO_TGR192 is not set | 1194 | # CONFIG_CRYPTO_TGR192 is not set |
1098 | # CONFIG_CRYPTO_GF128MUL is not set | 1195 | # CONFIG_CRYPTO_WP512 is not set |
1099 | # CONFIG_CRYPTO_ECB is not set | 1196 | |
1100 | CONFIG_CRYPTO_CBC=m | 1197 | # |
1101 | # CONFIG_CRYPTO_PCBC is not set | 1198 | # Ciphers |
1102 | # CONFIG_CRYPTO_LRW is not set | 1199 | # |
1103 | # CONFIG_CRYPTO_XTS is not set | ||
1104 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1105 | CONFIG_CRYPTO_DES=m | ||
1106 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1107 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1108 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1109 | # CONFIG_CRYPTO_SERPENT is not set | ||
1110 | # CONFIG_CRYPTO_AES is not set | 1200 | # CONFIG_CRYPTO_AES is not set |
1201 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1202 | # CONFIG_CRYPTO_ARC4 is not set | ||
1203 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1204 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1111 | # CONFIG_CRYPTO_CAST5 is not set | 1205 | # CONFIG_CRYPTO_CAST5 is not set |
1112 | # CONFIG_CRYPTO_CAST6 is not set | 1206 | # CONFIG_CRYPTO_CAST6 is not set |
1113 | # CONFIG_CRYPTO_TEA is not set | 1207 | CONFIG_CRYPTO_DES=m |
1114 | # CONFIG_CRYPTO_ARC4 is not set | 1208 | # CONFIG_CRYPTO_FCRYPT is not set |
1115 | # CONFIG_CRYPTO_KHAZAD is not set | 1209 | # CONFIG_CRYPTO_KHAZAD is not set |
1116 | # CONFIG_CRYPTO_ANUBIS is not set | 1210 | # CONFIG_CRYPTO_SALSA20 is not set |
1117 | # CONFIG_CRYPTO_SEED is not set | 1211 | # CONFIG_CRYPTO_SEED is not set |
1212 | # CONFIG_CRYPTO_SERPENT is not set | ||
1213 | # CONFIG_CRYPTO_TEA is not set | ||
1214 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1215 | |||
1216 | # | ||
1217 | # Compression | ||
1218 | # | ||
1118 | CONFIG_CRYPTO_DEFLATE=m | 1219 | CONFIG_CRYPTO_DEFLATE=m |
1119 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1220 | # CONFIG_CRYPTO_LZO is not set |
1120 | # CONFIG_CRYPTO_CRC32C is not set | ||
1121 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1122 | # CONFIG_CRYPTO_TEST is not set | ||
1123 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1124 | # CONFIG_CRYPTO_HW is not set | 1221 | # CONFIG_CRYPTO_HW is not set |
1125 | 1222 | ||
1126 | # | 1223 | # |
1127 | # Library routines | 1224 | # Library routines |
1128 | # | 1225 | # |
1129 | CONFIG_BITREVERSE=y | 1226 | CONFIG_BITREVERSE=y |
1227 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1228 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1130 | CONFIG_CRC_CCITT=m | 1229 | CONFIG_CRC_CCITT=m |
1131 | # CONFIG_CRC16 is not set | 1230 | # CONFIG_CRC16 is not set |
1132 | CONFIG_CRC_ITU_T=m | 1231 | CONFIG_CRC_ITU_T=m |
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig index 45e23e03f074..5a4ae6b5d28f 100644 --- a/arch/avr32/configs/atstk1003_defconfig +++ b/arch/avr32/configs/atstk1003_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24-rc7 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Wed Jan 9 22:54:34 2008 | 4 | # Mon May 26 13:33:05 2008 |
5 | # | 5 | # |
6 | CONFIG_AVR32=y | 6 | CONFIG_AVR32=y |
7 | CONFIG_GENERIC_GPIO=y | 7 | CONFIG_GENERIC_GPIO=y |
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y | |||
13 | CONFIG_GENERIC_IRQ_PROBE=y | 13 | CONFIG_GENERIC_IRQ_PROBE=y |
14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
15 | CONFIG_GENERIC_TIME=y | 15 | CONFIG_GENERIC_TIME=y |
16 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
16 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 17 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
17 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
18 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
19 | CONFIG_ARCH_SUPPORTS_OPROFILE=y | ||
20 | CONFIG_GENERIC_HWEIGHT=y | 20 | CONFIG_GENERIC_HWEIGHT=y |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 21 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
22 | CONFIG_GENERIC_BUG=y | 22 | CONFIG_GENERIC_BUG=y |
@@ -39,17 +39,15 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
39 | CONFIG_TASKSTATS=y | 39 | CONFIG_TASKSTATS=y |
40 | CONFIG_TASK_DELAY_ACCT=y | 40 | CONFIG_TASK_DELAY_ACCT=y |
41 | # CONFIG_TASK_XACCT is not set | 41 | # CONFIG_TASK_XACCT is not set |
42 | # CONFIG_USER_NS is not set | ||
43 | # CONFIG_PID_NS is not set | ||
44 | CONFIG_AUDIT=y | 42 | CONFIG_AUDIT=y |
45 | # CONFIG_IKCONFIG is not set | 43 | # CONFIG_IKCONFIG is not set |
46 | CONFIG_LOG_BUF_SHIFT=14 | 44 | CONFIG_LOG_BUF_SHIFT=14 |
47 | # CONFIG_CGROUPS is not set | 45 | # CONFIG_CGROUPS is not set |
48 | CONFIG_FAIR_GROUP_SCHED=y | 46 | # CONFIG_GROUP_SCHED is not set |
49 | CONFIG_FAIR_USER_SCHED=y | ||
50 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
51 | CONFIG_SYSFS_DEPRECATED=y | 47 | CONFIG_SYSFS_DEPRECATED=y |
48 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
52 | CONFIG_RELAY=y | 49 | CONFIG_RELAY=y |
50 | # CONFIG_NAMESPACES is not set | ||
53 | CONFIG_BLK_DEV_INITRD=y | 51 | CONFIG_BLK_DEV_INITRD=y |
54 | CONFIG_INITRAMFS_SOURCE="" | 52 | CONFIG_INITRAMFS_SOURCE="" |
55 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -63,11 +61,13 @@ CONFIG_HOTPLUG=y | |||
63 | CONFIG_PRINTK=y | 61 | CONFIG_PRINTK=y |
64 | CONFIG_BUG=y | 62 | CONFIG_BUG=y |
65 | CONFIG_ELF_CORE=y | 63 | CONFIG_ELF_CORE=y |
64 | # CONFIG_COMPAT_BRK is not set | ||
66 | # CONFIG_BASE_FULL is not set | 65 | # CONFIG_BASE_FULL is not set |
67 | CONFIG_FUTEX=y | 66 | CONFIG_FUTEX=y |
68 | CONFIG_ANON_INODES=y | 67 | CONFIG_ANON_INODES=y |
69 | CONFIG_EPOLL=y | 68 | CONFIG_EPOLL=y |
70 | CONFIG_SIGNALFD=y | 69 | CONFIG_SIGNALFD=y |
70 | CONFIG_TIMERFD=y | ||
71 | CONFIG_EVENTFD=y | 71 | CONFIG_EVENTFD=y |
72 | CONFIG_SHMEM=y | 72 | CONFIG_SHMEM=y |
73 | CONFIG_VM_EVENT_COUNTERS=y | 73 | CONFIG_VM_EVENT_COUNTERS=y |
@@ -75,11 +75,20 @@ CONFIG_VM_EVENT_COUNTERS=y | |||
75 | # CONFIG_SLAB is not set | 75 | # CONFIG_SLAB is not set |
76 | CONFIG_SLUB=y | 76 | CONFIG_SLUB=y |
77 | # CONFIG_SLOB is not set | 77 | # CONFIG_SLOB is not set |
78 | CONFIG_SLABINFO=y | 78 | CONFIG_PROFILING=y |
79 | # CONFIG_MARKERS is not set | ||
80 | CONFIG_OPROFILE=m | ||
81 | CONFIG_HAVE_OPROFILE=y | ||
82 | CONFIG_KPROBES=y | ||
83 | CONFIG_HAVE_KPROBES=y | ||
84 | # CONFIG_HAVE_KRETPROBES is not set | ||
85 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
86 | CONFIG_PROC_PAGE_MONITOR=y | ||
79 | CONFIG_RT_MUTEXES=y | 87 | CONFIG_RT_MUTEXES=y |
80 | # CONFIG_TINY_SHMEM is not set | 88 | # CONFIG_TINY_SHMEM is not set |
81 | CONFIG_BASE_SMALL=1 | 89 | CONFIG_BASE_SMALL=1 |
82 | CONFIG_MODULES=y | 90 | CONFIG_MODULES=y |
91 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
83 | CONFIG_MODULE_UNLOAD=y | 92 | CONFIG_MODULE_UNLOAD=y |
84 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 93 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
85 | # CONFIG_MODVERSIONS is not set | 94 | # CONFIG_MODVERSIONS is not set |
@@ -103,10 +112,15 @@ CONFIG_IOSCHED_CFQ=y | |||
103 | CONFIG_DEFAULT_CFQ=y | 112 | CONFIG_DEFAULT_CFQ=y |
104 | # CONFIG_DEFAULT_NOOP is not set | 113 | # CONFIG_DEFAULT_NOOP is not set |
105 | CONFIG_DEFAULT_IOSCHED="cfq" | 114 | CONFIG_DEFAULT_IOSCHED="cfq" |
115 | CONFIG_CLASSIC_RCU=y | ||
106 | 116 | ||
107 | # | 117 | # |
108 | # System Type and features | 118 | # System Type and features |
109 | # | 119 | # |
120 | CONFIG_TICK_ONESHOT=y | ||
121 | CONFIG_NO_HZ=y | ||
122 | CONFIG_HIGH_RES_TIMERS=y | ||
123 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
110 | CONFIG_SUBARCH_AVR32B=y | 124 | CONFIG_SUBARCH_AVR32B=y |
111 | CONFIG_MMU=y | 125 | CONFIG_MMU=y |
112 | CONFIG_PERFORMANCE_COUNTERS=y | 126 | CONFIG_PERFORMANCE_COUNTERS=y |
@@ -152,16 +166,19 @@ CONFIG_FLATMEM=y | |||
152 | CONFIG_FLAT_NODE_MEM_MAP=y | 166 | CONFIG_FLAT_NODE_MEM_MAP=y |
153 | # CONFIG_SPARSEMEM_STATIC is not set | 167 | # CONFIG_SPARSEMEM_STATIC is not set |
154 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 168 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
169 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
155 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 170 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
156 | # CONFIG_RESOURCES_64BIT is not set | 171 | # CONFIG_RESOURCES_64BIT is not set |
157 | CONFIG_ZONE_DMA_FLAG=0 | 172 | CONFIG_ZONE_DMA_FLAG=0 |
158 | CONFIG_VIRT_TO_BUS=y | 173 | CONFIG_VIRT_TO_BUS=y |
159 | # CONFIG_OWNERSHIP_TRACE is not set | 174 | # CONFIG_OWNERSHIP_TRACE is not set |
175 | CONFIG_NMI_DEBUGGING=y | ||
160 | # CONFIG_HZ_100 is not set | 176 | # CONFIG_HZ_100 is not set |
161 | CONFIG_HZ_250=y | 177 | CONFIG_HZ_250=y |
162 | # CONFIG_HZ_300 is not set | 178 | # CONFIG_HZ_300 is not set |
163 | # CONFIG_HZ_1000 is not set | 179 | # CONFIG_HZ_1000 is not set |
164 | CONFIG_HZ=250 | 180 | CONFIG_HZ=250 |
181 | # CONFIG_SCHED_HRTICK is not set | ||
165 | CONFIG_CMDLINE="" | 182 | CONFIG_CMDLINE="" |
166 | 183 | ||
167 | # | 184 | # |
@@ -175,9 +192,10 @@ CONFIG_CPU_FREQ=y | |||
175 | CONFIG_CPU_FREQ_TABLE=y | 192 | CONFIG_CPU_FREQ_TABLE=y |
176 | # CONFIG_CPU_FREQ_DEBUG is not set | 193 | # CONFIG_CPU_FREQ_DEBUG is not set |
177 | # CONFIG_CPU_FREQ_STAT is not set | 194 | # CONFIG_CPU_FREQ_STAT is not set |
178 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
196 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
179 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 197 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
180 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 198 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
181 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 199 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
182 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 200 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
183 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 201 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
@@ -234,8 +252,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
234 | CONFIG_DEFAULT_TCP_CONG="cubic" | 252 | CONFIG_DEFAULT_TCP_CONG="cubic" |
235 | # CONFIG_TCP_MD5SIG is not set | 253 | # CONFIG_TCP_MD5SIG is not set |
236 | # CONFIG_IPV6 is not set | 254 | # CONFIG_IPV6 is not set |
237 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
238 | # CONFIG_INET6_TUNNEL is not set | ||
239 | # CONFIG_NETWORK_SECMARK is not set | 255 | # CONFIG_NETWORK_SECMARK is not set |
240 | # CONFIG_NETFILTER is not set | 256 | # CONFIG_NETFILTER is not set |
241 | # CONFIG_IP_DCCP is not set | 257 | # CONFIG_IP_DCCP is not set |
@@ -260,6 +276,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
260 | # CONFIG_NET_PKTGEN is not set | 276 | # CONFIG_NET_PKTGEN is not set |
261 | # CONFIG_NET_TCPPROBE is not set | 277 | # CONFIG_NET_TCPPROBE is not set |
262 | # CONFIG_HAMRADIO is not set | 278 | # CONFIG_HAMRADIO is not set |
279 | # CONFIG_CAN is not set | ||
263 | # CONFIG_IRDA is not set | 280 | # CONFIG_IRDA is not set |
264 | # CONFIG_BT is not set | 281 | # CONFIG_BT is not set |
265 | # CONFIG_AF_RXRPC is not set | 282 | # CONFIG_AF_RXRPC is not set |
@@ -295,6 +312,7 @@ CONFIG_MTD=y | |||
295 | CONFIG_MTD_PARTITIONS=y | 312 | CONFIG_MTD_PARTITIONS=y |
296 | # CONFIG_MTD_REDBOOT_PARTS is not set | 313 | # CONFIG_MTD_REDBOOT_PARTS is not set |
297 | CONFIG_MTD_CMDLINE_PARTS=y | 314 | CONFIG_MTD_CMDLINE_PARTS=y |
315 | # CONFIG_MTD_AR7_PARTS is not set | ||
298 | 316 | ||
299 | # | 317 | # |
300 | # User Modules And Translation Layers | 318 | # User Modules And Translation Layers |
@@ -349,6 +367,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
349 | # | 367 | # |
350 | CONFIG_MTD_DATAFLASH=m | 368 | CONFIG_MTD_DATAFLASH=m |
351 | CONFIG_MTD_M25P80=m | 369 | CONFIG_MTD_M25P80=m |
370 | CONFIG_M25PXX_USE_FAST_READ=y | ||
352 | # CONFIG_MTD_SLRAM is not set | 371 | # CONFIG_MTD_SLRAM is not set |
353 | # CONFIG_MTD_PHRAM is not set | 372 | # CONFIG_MTD_PHRAM is not set |
354 | # CONFIG_MTD_MTDRAM is not set | 373 | # CONFIG_MTD_MTDRAM is not set |
@@ -376,13 +395,18 @@ CONFIG_BLK_DEV_NBD=m | |||
376 | CONFIG_BLK_DEV_RAM=m | 395 | CONFIG_BLK_DEV_RAM=m |
377 | CONFIG_BLK_DEV_RAM_COUNT=16 | 396 | CONFIG_BLK_DEV_RAM_COUNT=16 |
378 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 397 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
379 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 398 | # CONFIG_BLK_DEV_XIP is not set |
380 | # CONFIG_CDROM_PKTCDVD is not set | 399 | # CONFIG_CDROM_PKTCDVD is not set |
381 | # CONFIG_ATA_OVER_ETH is not set | 400 | # CONFIG_ATA_OVER_ETH is not set |
382 | CONFIG_MISC_DEVICES=y | 401 | CONFIG_MISC_DEVICES=y |
402 | CONFIG_ATMEL_PWM=m | ||
403 | CONFIG_ATMEL_TCLIB=y | ||
404 | CONFIG_ATMEL_TCB_CLKSRC=y | ||
405 | CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 | ||
383 | # CONFIG_EEPROM_93CX6 is not set | 406 | # CONFIG_EEPROM_93CX6 is not set |
384 | CONFIG_ATMEL_SSC=m | 407 | CONFIG_ATMEL_SSC=m |
385 | # CONFIG_IDE is not set | 408 | # CONFIG_ENCLOSURE_SERVICES is not set |
409 | # CONFIG_HAVE_IDE is not set | ||
386 | 410 | ||
387 | # | 411 | # |
388 | # SCSI device support | 412 | # SCSI device support |
@@ -427,6 +451,9 @@ CONFIG_SCSI_LOWLEVEL=y | |||
427 | # CONFIG_SCSI_DEBUG is not set | 451 | # CONFIG_SCSI_DEBUG is not set |
428 | CONFIG_ATA=m | 452 | CONFIG_ATA=m |
429 | # CONFIG_ATA_NONSTANDARD is not set | 453 | # CONFIG_ATA_NONSTANDARD is not set |
454 | # CONFIG_SATA_PMP is not set | ||
455 | CONFIG_ATA_SFF=y | ||
456 | # CONFIG_SATA_MV is not set | ||
430 | CONFIG_PATA_AT32=m | 457 | CONFIG_PATA_AT32=m |
431 | # CONFIG_PATA_PLATFORM is not set | 458 | # CONFIG_PATA_PLATFORM is not set |
432 | # CONFIG_MD is not set | 459 | # CONFIG_MD is not set |
@@ -447,6 +474,7 @@ CONFIG_NETDEVICES=y | |||
447 | # | 474 | # |
448 | # CONFIG_WLAN_PRE80211 is not set | 475 | # CONFIG_WLAN_PRE80211 is not set |
449 | # CONFIG_WLAN_80211 is not set | 476 | # CONFIG_WLAN_80211 is not set |
477 | # CONFIG_IWLWIFI_LEDS is not set | ||
450 | # CONFIG_WAN is not set | 478 | # CONFIG_WAN is not set |
451 | CONFIG_PPP=m | 479 | CONFIG_PPP=m |
452 | # CONFIG_PPP_MULTILINK is not set | 480 | # CONFIG_PPP_MULTILINK is not set |
@@ -460,7 +488,6 @@ CONFIG_PPP_BSDCOMP=m | |||
460 | # CONFIG_PPPOL2TP is not set | 488 | # CONFIG_PPPOL2TP is not set |
461 | # CONFIG_SLIP is not set | 489 | # CONFIG_SLIP is not set |
462 | CONFIG_SLHC=m | 490 | CONFIG_SLHC=m |
463 | # CONFIG_SHAPER is not set | ||
464 | # CONFIG_NETCONSOLE is not set | 491 | # CONFIG_NETCONSOLE is not set |
465 | # CONFIG_NETPOLL is not set | 492 | # CONFIG_NETPOLL is not set |
466 | # CONFIG_NET_POLL_CONTROLLER is not set | 493 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -516,6 +543,7 @@ CONFIG_MOUSE_GPIO=m | |||
516 | # Character devices | 543 | # Character devices |
517 | # | 544 | # |
518 | # CONFIG_VT is not set | 545 | # CONFIG_VT is not set |
546 | # CONFIG_DEVKMEM is not set | ||
519 | # CONFIG_SERIAL_NONSTANDARD is not set | 547 | # CONFIG_SERIAL_NONSTANDARD is not set |
520 | 548 | ||
521 | # | 549 | # |
@@ -528,6 +556,7 @@ CONFIG_MOUSE_GPIO=m | |||
528 | # | 556 | # |
529 | CONFIG_SERIAL_ATMEL=y | 557 | CONFIG_SERIAL_ATMEL=y |
530 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 558 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
559 | CONFIG_SERIAL_ATMEL_PDC=y | ||
531 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | 560 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
532 | CONFIG_SERIAL_CORE=y | 561 | CONFIG_SERIAL_CORE=y |
533 | CONFIG_SERIAL_CORE_CONSOLE=y | 562 | CONFIG_SERIAL_CORE_CONSOLE=y |
@@ -535,21 +564,13 @@ CONFIG_UNIX98_PTYS=y | |||
535 | # CONFIG_LEGACY_PTYS is not set | 564 | # CONFIG_LEGACY_PTYS is not set |
536 | # CONFIG_IPMI_HANDLER is not set | 565 | # CONFIG_IPMI_HANDLER is not set |
537 | # CONFIG_HW_RANDOM is not set | 566 | # CONFIG_HW_RANDOM is not set |
538 | # CONFIG_RTC is not set | ||
539 | # CONFIG_GEN_RTC is not set | ||
540 | # CONFIG_R3964 is not set | 567 | # CONFIG_R3964 is not set |
541 | # CONFIG_RAW_DRIVER is not set | 568 | # CONFIG_RAW_DRIVER is not set |
542 | # CONFIG_TCG_TPM is not set | 569 | # CONFIG_TCG_TPM is not set |
543 | CONFIG_I2C=m | 570 | CONFIG_I2C=m |
544 | CONFIG_I2C_BOARDINFO=y | 571 | CONFIG_I2C_BOARDINFO=y |
545 | CONFIG_I2C_CHARDEV=m | 572 | CONFIG_I2C_CHARDEV=m |
546 | |||
547 | # | ||
548 | # I2C Algorithms | ||
549 | # | ||
550 | CONFIG_I2C_ALGOBIT=m | 573 | CONFIG_I2C_ALGOBIT=m |
551 | # CONFIG_I2C_ALGOPCF is not set | ||
552 | # CONFIG_I2C_ALGOPCA is not set | ||
553 | 574 | ||
554 | # | 575 | # |
555 | # I2C Hardware Bus support | 576 | # I2C Hardware Bus support |
@@ -560,27 +581,23 @@ CONFIG_I2C_GPIO=m | |||
560 | # CONFIG_I2C_SIMTEC is not set | 581 | # CONFIG_I2C_SIMTEC is not set |
561 | # CONFIG_I2C_TAOS_EVM is not set | 582 | # CONFIG_I2C_TAOS_EVM is not set |
562 | # CONFIG_I2C_STUB is not set | 583 | # CONFIG_I2C_STUB is not set |
584 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
563 | 585 | ||
564 | # | 586 | # |
565 | # Miscellaneous I2C Chip support | 587 | # Miscellaneous I2C Chip support |
566 | # | 588 | # |
567 | # CONFIG_SENSORS_DS1337 is not set | ||
568 | # CONFIG_SENSORS_DS1374 is not set | ||
569 | # CONFIG_DS1682 is not set | 589 | # CONFIG_DS1682 is not set |
570 | # CONFIG_SENSORS_EEPROM is not set | 590 | # CONFIG_SENSORS_EEPROM is not set |
571 | # CONFIG_SENSORS_PCF8574 is not set | 591 | # CONFIG_SENSORS_PCF8574 is not set |
572 | # CONFIG_SENSORS_PCA9539 is not set | 592 | # CONFIG_PCF8575 is not set |
573 | # CONFIG_SENSORS_PCF8591 is not set | 593 | # CONFIG_SENSORS_PCF8591 is not set |
594 | # CONFIG_TPS65010 is not set | ||
574 | # CONFIG_SENSORS_MAX6875 is not set | 595 | # CONFIG_SENSORS_MAX6875 is not set |
575 | # CONFIG_SENSORS_TSL2550 is not set | 596 | # CONFIG_SENSORS_TSL2550 is not set |
576 | # CONFIG_I2C_DEBUG_CORE is not set | 597 | # CONFIG_I2C_DEBUG_CORE is not set |
577 | # CONFIG_I2C_DEBUG_ALGO is not set | 598 | # CONFIG_I2C_DEBUG_ALGO is not set |
578 | # CONFIG_I2C_DEBUG_BUS is not set | 599 | # CONFIG_I2C_DEBUG_BUS is not set |
579 | # CONFIG_I2C_DEBUG_CHIP is not set | 600 | # CONFIG_I2C_DEBUG_CHIP is not set |
580 | |||
581 | # | ||
582 | # SPI support | ||
583 | # | ||
584 | CONFIG_SPI=y | 601 | CONFIG_SPI=y |
585 | # CONFIG_SPI_DEBUG is not set | 602 | # CONFIG_SPI_DEBUG is not set |
586 | CONFIG_SPI_MASTER=y | 603 | CONFIG_SPI_MASTER=y |
@@ -597,9 +614,27 @@ CONFIG_SPI_ATMEL=y | |||
597 | # CONFIG_SPI_AT25 is not set | 614 | # CONFIG_SPI_AT25 is not set |
598 | CONFIG_SPI_SPIDEV=m | 615 | CONFIG_SPI_SPIDEV=m |
599 | # CONFIG_SPI_TLE62X0 is not set | 616 | # CONFIG_SPI_TLE62X0 is not set |
617 | CONFIG_HAVE_GPIO_LIB=y | ||
618 | |||
619 | # | ||
620 | # GPIO Support | ||
621 | # | ||
622 | # CONFIG_DEBUG_GPIO is not set | ||
623 | |||
624 | # | ||
625 | # I2C GPIO expanders: | ||
626 | # | ||
627 | # CONFIG_GPIO_PCA953X is not set | ||
628 | # CONFIG_GPIO_PCF857X is not set | ||
629 | |||
630 | # | ||
631 | # SPI GPIO expanders: | ||
632 | # | ||
633 | # CONFIG_GPIO_MCP23S08 is not set | ||
600 | # CONFIG_W1 is not set | 634 | # CONFIG_W1 is not set |
601 | # CONFIG_POWER_SUPPLY is not set | 635 | # CONFIG_POWER_SUPPLY is not set |
602 | # CONFIG_HWMON is not set | 636 | # CONFIG_HWMON is not set |
637 | # CONFIG_THERMAL is not set | ||
603 | CONFIG_WATCHDOG=y | 638 | CONFIG_WATCHDOG=y |
604 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 639 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
605 | 640 | ||
@@ -619,12 +654,22 @@ CONFIG_SSB_POSSIBLE=y | |||
619 | # Multifunction device drivers | 654 | # Multifunction device drivers |
620 | # | 655 | # |
621 | # CONFIG_MFD_SM501 is not set | 656 | # CONFIG_MFD_SM501 is not set |
657 | # CONFIG_HTC_PASIC3 is not set | ||
622 | 658 | ||
623 | # | 659 | # |
624 | # Multimedia devices | 660 | # Multimedia devices |
625 | # | 661 | # |
662 | |||
663 | # | ||
664 | # Multimedia core support | ||
665 | # | ||
626 | # CONFIG_VIDEO_DEV is not set | 666 | # CONFIG_VIDEO_DEV is not set |
627 | # CONFIG_DVB_CORE is not set | 667 | # CONFIG_DVB_CORE is not set |
668 | # CONFIG_VIDEO_MEDIA is not set | ||
669 | |||
670 | # | ||
671 | # Multimedia drivers | ||
672 | # | ||
628 | # CONFIG_DAB is not set | 673 | # CONFIG_DAB is not set |
629 | 674 | ||
630 | # | 675 | # |
@@ -682,7 +727,11 @@ CONFIG_SND_AT73C213_TARGET_BITRATE=48000 | |||
682 | # CONFIG_SND_SOC is not set | 727 | # CONFIG_SND_SOC is not set |
683 | 728 | ||
684 | # | 729 | # |
685 | # SoC Audio support for SuperH | 730 | # ALSA SoC audio for Freescale SOCs |
731 | # | ||
732 | |||
733 | # | ||
734 | # SoC Audio for the Texas Instruments OMAP | ||
686 | # | 735 | # |
687 | 736 | ||
688 | # | 737 | # |
@@ -694,14 +743,12 @@ CONFIG_USB_SUPPORT=y | |||
694 | # CONFIG_USB_ARCH_HAS_HCD is not set | 743 | # CONFIG_USB_ARCH_HAS_HCD is not set |
695 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 744 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
696 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 745 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
746 | # CONFIG_USB_OTG_WHITELIST is not set | ||
747 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
697 | 748 | ||
698 | # | 749 | # |
699 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 750 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
700 | # | 751 | # |
701 | |||
702 | # | ||
703 | # USB Gadget Support | ||
704 | # | ||
705 | CONFIG_USB_GADGET=y | 752 | CONFIG_USB_GADGET=y |
706 | # CONFIG_USB_GADGET_DEBUG is not set | 753 | # CONFIG_USB_GADGET_DEBUG is not set |
707 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 754 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
@@ -714,6 +761,7 @@ CONFIG_USB_ATMEL_USBA=y | |||
714 | # CONFIG_USB_GADGET_NET2280 is not set | 761 | # CONFIG_USB_GADGET_NET2280 is not set |
715 | # CONFIG_USB_GADGET_PXA2XX is not set | 762 | # CONFIG_USB_GADGET_PXA2XX is not set |
716 | # CONFIG_USB_GADGET_M66592 is not set | 763 | # CONFIG_USB_GADGET_M66592 is not set |
764 | # CONFIG_USB_GADGET_PXA27X is not set | ||
717 | # CONFIG_USB_GADGET_GOKU is not set | 765 | # CONFIG_USB_GADGET_GOKU is not set |
718 | # CONFIG_USB_GADGET_LH7A40X is not set | 766 | # CONFIG_USB_GADGET_LH7A40X is not set |
719 | # CONFIG_USB_GADGET_OMAP is not set | 767 | # CONFIG_USB_GADGET_OMAP is not set |
@@ -729,6 +777,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
729 | # CONFIG_USB_FILE_STORAGE_TEST is not set | 777 | # CONFIG_USB_FILE_STORAGE_TEST is not set |
730 | CONFIG_USB_G_SERIAL=m | 778 | CONFIG_USB_G_SERIAL=m |
731 | # CONFIG_USB_MIDI_GADGET is not set | 779 | # CONFIG_USB_MIDI_GADGET is not set |
780 | # CONFIG_USB_G_PRINTER is not set | ||
732 | CONFIG_MMC=m | 781 | CONFIG_MMC=m |
733 | # CONFIG_MMC_DEBUG is not set | 782 | # CONFIG_MMC_DEBUG is not set |
734 | # CONFIG_MMC_UNSAFE_RESUME is not set | 783 | # CONFIG_MMC_UNSAFE_RESUME is not set |
@@ -739,17 +788,20 @@ CONFIG_MMC=m | |||
739 | CONFIG_MMC_BLOCK=m | 788 | CONFIG_MMC_BLOCK=m |
740 | # CONFIG_MMC_BLOCK_BOUNCE is not set | 789 | # CONFIG_MMC_BLOCK_BOUNCE is not set |
741 | # CONFIG_SDIO_UART is not set | 790 | # CONFIG_SDIO_UART is not set |
791 | # CONFIG_MMC_TEST is not set | ||
742 | 792 | ||
743 | # | 793 | # |
744 | # MMC/SD Host Controller Drivers | 794 | # MMC/SD Host Controller Drivers |
745 | # | 795 | # |
746 | CONFIG_MMC_SPI=m | 796 | CONFIG_MMC_SPI=m |
797 | # CONFIG_MEMSTICK is not set | ||
747 | CONFIG_NEW_LEDS=y | 798 | CONFIG_NEW_LEDS=y |
748 | CONFIG_LEDS_CLASS=y | 799 | CONFIG_LEDS_CLASS=y |
749 | 800 | ||
750 | # | 801 | # |
751 | # LED drivers | 802 | # LED drivers |
752 | # | 803 | # |
804 | CONFIG_LEDS_ATMEL_PWM=m | ||
753 | CONFIG_LEDS_GPIO=y | 805 | CONFIG_LEDS_GPIO=y |
754 | 806 | ||
755 | # | 807 | # |
@@ -758,6 +810,8 @@ CONFIG_LEDS_GPIO=y | |||
758 | CONFIG_LEDS_TRIGGERS=y | 810 | CONFIG_LEDS_TRIGGERS=y |
759 | CONFIG_LEDS_TRIGGER_TIMER=y | 811 | CONFIG_LEDS_TRIGGER_TIMER=y |
760 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 812 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
813 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
814 | # CONFIG_ACCESSIBILITY is not set | ||
761 | CONFIG_RTC_LIB=y | 815 | CONFIG_RTC_LIB=y |
762 | CONFIG_RTC_CLASS=y | 816 | CONFIG_RTC_CLASS=y |
763 | CONFIG_RTC_HCTOSYS=y | 817 | CONFIG_RTC_HCTOSYS=y |
@@ -786,19 +840,22 @@ CONFIG_RTC_INTF_DEV=y | |||
786 | # CONFIG_RTC_DRV_PCF8563 is not set | 840 | # CONFIG_RTC_DRV_PCF8563 is not set |
787 | # CONFIG_RTC_DRV_PCF8583 is not set | 841 | # CONFIG_RTC_DRV_PCF8583 is not set |
788 | # CONFIG_RTC_DRV_M41T80 is not set | 842 | # CONFIG_RTC_DRV_M41T80 is not set |
843 | # CONFIG_RTC_DRV_S35390A is not set | ||
789 | 844 | ||
790 | # | 845 | # |
791 | # SPI RTC drivers | 846 | # SPI RTC drivers |
792 | # | 847 | # |
793 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
794 | # CONFIG_RTC_DRV_MAX6902 is not set | 848 | # CONFIG_RTC_DRV_MAX6902 is not set |
849 | # CONFIG_RTC_DRV_R9701 is not set | ||
850 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
795 | 851 | ||
796 | # | 852 | # |
797 | # Platform RTC drivers | 853 | # Platform RTC drivers |
798 | # | 854 | # |
855 | # CONFIG_RTC_DRV_DS1511 is not set | ||
799 | # CONFIG_RTC_DRV_DS1553 is not set | 856 | # CONFIG_RTC_DRV_DS1553 is not set |
800 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
801 | # CONFIG_RTC_DRV_DS1742 is not set | 857 | # CONFIG_RTC_DRV_DS1742 is not set |
858 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
802 | # CONFIG_RTC_DRV_M48T86 is not set | 859 | # CONFIG_RTC_DRV_M48T86 is not set |
803 | # CONFIG_RTC_DRV_M48T59 is not set | 860 | # CONFIG_RTC_DRV_M48T59 is not set |
804 | # CONFIG_RTC_DRV_V3020 is not set | 861 | # CONFIG_RTC_DRV_V3020 is not set |
@@ -807,11 +864,8 @@ CONFIG_RTC_INTF_DEV=y | |||
807 | # on-CPU RTC drivers | 864 | # on-CPU RTC drivers |
808 | # | 865 | # |
809 | CONFIG_RTC_DRV_AT32AP700X=y | 866 | CONFIG_RTC_DRV_AT32AP700X=y |
810 | |||
811 | # | ||
812 | # Userspace I/O | ||
813 | # | ||
814 | CONFIG_UIO=m | 867 | CONFIG_UIO=m |
868 | # CONFIG_UIO_SMX is not set | ||
815 | 869 | ||
816 | # | 870 | # |
817 | # File systems | 871 | # File systems |
@@ -828,14 +882,11 @@ CONFIG_JBD=m | |||
828 | # CONFIG_JFS_FS is not set | 882 | # CONFIG_JFS_FS is not set |
829 | # CONFIG_FS_POSIX_ACL is not set | 883 | # CONFIG_FS_POSIX_ACL is not set |
830 | # CONFIG_XFS_FS is not set | 884 | # CONFIG_XFS_FS is not set |
831 | # CONFIG_GFS2_FS is not set | ||
832 | # CONFIG_OCFS2_FS is not set | 885 | # CONFIG_OCFS2_FS is not set |
833 | # CONFIG_MINIX_FS is not set | 886 | # CONFIG_DNOTIFY is not set |
834 | # CONFIG_ROMFS_FS is not set | ||
835 | CONFIG_INOTIFY=y | 887 | CONFIG_INOTIFY=y |
836 | CONFIG_INOTIFY_USER=y | 888 | CONFIG_INOTIFY_USER=y |
837 | # CONFIG_QUOTA is not set | 889 | # CONFIG_QUOTA is not set |
838 | # CONFIG_DNOTIFY is not set | ||
839 | # CONFIG_AUTOFS_FS is not set | 890 | # CONFIG_AUTOFS_FS is not set |
840 | # CONFIG_AUTOFS4_FS is not set | 891 | # CONFIG_AUTOFS4_FS is not set |
841 | CONFIG_FUSE_FS=m | 892 | CONFIG_FUSE_FS=m |
@@ -891,8 +942,10 @@ CONFIG_JFFS2_RTIME=y | |||
891 | # CONFIG_JFFS2_RUBIN is not set | 942 | # CONFIG_JFFS2_RUBIN is not set |
892 | # CONFIG_CRAMFS is not set | 943 | # CONFIG_CRAMFS is not set |
893 | # CONFIG_VXFS_FS is not set | 944 | # CONFIG_VXFS_FS is not set |
945 | # CONFIG_MINIX_FS is not set | ||
894 | # CONFIG_HPFS_FS is not set | 946 | # CONFIG_HPFS_FS is not set |
895 | # CONFIG_QNX4FS_FS is not set | 947 | # CONFIG_QNX4FS_FS is not set |
948 | # CONFIG_ROMFS_FS is not set | ||
896 | # CONFIG_SYSV_FS is not set | 949 | # CONFIG_SYSV_FS is not set |
897 | # CONFIG_UFS_FS is not set | 950 | # CONFIG_UFS_FS is not set |
898 | # CONFIG_NETWORK_FILESYSTEMS is not set | 951 | # CONFIG_NETWORK_FILESYSTEMS is not set |
@@ -943,11 +996,6 @@ CONFIG_NLS_ISO8859_1=m | |||
943 | # CONFIG_NLS_KOI8_U is not set | 996 | # CONFIG_NLS_KOI8_U is not set |
944 | CONFIG_NLS_UTF8=m | 997 | CONFIG_NLS_UTF8=m |
945 | # CONFIG_DLM is not set | 998 | # CONFIG_DLM is not set |
946 | CONFIG_INSTRUMENTATION=y | ||
947 | CONFIG_PROFILING=y | ||
948 | CONFIG_OPROFILE=m | ||
949 | CONFIG_KPROBES=y | ||
950 | # CONFIG_MARKERS is not set | ||
951 | 999 | ||
952 | # | 1000 | # |
953 | # Kernel hacking | 1001 | # Kernel hacking |
@@ -955,6 +1003,7 @@ CONFIG_KPROBES=y | |||
955 | # CONFIG_PRINTK_TIME is not set | 1003 | # CONFIG_PRINTK_TIME is not set |
956 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1004 | CONFIG_ENABLE_WARN_DEPRECATED=y |
957 | CONFIG_ENABLE_MUST_CHECK=y | 1005 | CONFIG_ENABLE_MUST_CHECK=y |
1006 | CONFIG_FRAME_WARN=1024 | ||
958 | CONFIG_MAGIC_SYSRQ=y | 1007 | CONFIG_MAGIC_SYSRQ=y |
959 | # CONFIG_UNUSED_SYMBOLS is not set | 1008 | # CONFIG_UNUSED_SYMBOLS is not set |
960 | CONFIG_DEBUG_FS=y | 1009 | CONFIG_DEBUG_FS=y |
@@ -965,6 +1014,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
965 | CONFIG_SCHED_DEBUG=y | 1014 | CONFIG_SCHED_DEBUG=y |
966 | # CONFIG_SCHEDSTATS is not set | 1015 | # CONFIG_SCHEDSTATS is not set |
967 | # CONFIG_TIMER_STATS is not set | 1016 | # CONFIG_TIMER_STATS is not set |
1017 | # CONFIG_DEBUG_OBJECTS is not set | ||
968 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1018 | # CONFIG_DEBUG_RT_MUTEXES is not set |
969 | # CONFIG_RT_MUTEX_TESTER is not set | 1019 | # CONFIG_RT_MUTEX_TESTER is not set |
970 | # CONFIG_DEBUG_SPINLOCK is not set | 1020 | # CONFIG_DEBUG_SPINLOCK is not set |
@@ -978,12 +1028,14 @@ CONFIG_SCHED_DEBUG=y | |||
978 | CONFIG_DEBUG_BUGVERBOSE=y | 1028 | CONFIG_DEBUG_BUGVERBOSE=y |
979 | # CONFIG_DEBUG_INFO is not set | 1029 | # CONFIG_DEBUG_INFO is not set |
980 | # CONFIG_DEBUG_VM is not set | 1030 | # CONFIG_DEBUG_VM is not set |
1031 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
981 | # CONFIG_DEBUG_LIST is not set | 1032 | # CONFIG_DEBUG_LIST is not set |
982 | # CONFIG_DEBUG_SG is not set | 1033 | # CONFIG_DEBUG_SG is not set |
983 | CONFIG_FRAME_POINTER=y | 1034 | CONFIG_FRAME_POINTER=y |
984 | CONFIG_FORCED_INLINING=y | ||
985 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1035 | # CONFIG_BOOT_PRINTK_DELAY is not set |
986 | # CONFIG_RCU_TORTURE_TEST is not set | 1036 | # CONFIG_RCU_TORTURE_TEST is not set |
1037 | # CONFIG_KPROBES_SANITY_TEST is not set | ||
1038 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
987 | # CONFIG_LKDTM is not set | 1039 | # CONFIG_LKDTM is not set |
988 | # CONFIG_FAULT_INJECTION is not set | 1040 | # CONFIG_FAULT_INJECTION is not set |
989 | # CONFIG_SAMPLES is not set | 1041 | # CONFIG_SAMPLES is not set |
@@ -1000,6 +1052,8 @@ CONFIG_FORCED_INLINING=y | |||
1000 | # Library routines | 1052 | # Library routines |
1001 | # | 1053 | # |
1002 | CONFIG_BITREVERSE=y | 1054 | CONFIG_BITREVERSE=y |
1055 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1056 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1003 | CONFIG_CRC_CCITT=m | 1057 | CONFIG_CRC_CCITT=m |
1004 | # CONFIG_CRC16 is not set | 1058 | # CONFIG_CRC16 is not set |
1005 | CONFIG_CRC_ITU_T=m | 1059 | CONFIG_CRC_ITU_T=m |
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig index 634c52760349..a0912fb7c92e 100644 --- a/arch/avr32/configs/atstk1004_defconfig +++ b/arch/avr32/configs/atstk1004_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24-rc7 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Wed Jan 9 23:04:20 2008 | 4 | # Mon May 26 13:34:57 2008 |
5 | # | 5 | # |
6 | CONFIG_AVR32=y | 6 | CONFIG_AVR32=y |
7 | CONFIG_GENERIC_GPIO=y | 7 | CONFIG_GENERIC_GPIO=y |
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y | |||
13 | CONFIG_GENERIC_IRQ_PROBE=y | 13 | CONFIG_GENERIC_IRQ_PROBE=y |
14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 14 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
15 | CONFIG_GENERIC_TIME=y | 15 | CONFIG_GENERIC_TIME=y |
16 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
16 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 17 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
17 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
18 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
19 | CONFIG_ARCH_SUPPORTS_OPROFILE=y | ||
20 | CONFIG_GENERIC_HWEIGHT=y | 20 | CONFIG_GENERIC_HWEIGHT=y |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 21 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
22 | CONFIG_GENERIC_BUG=y | 22 | CONFIG_GENERIC_BUG=y |
@@ -34,15 +34,15 @@ CONFIG_LOCALVERSION="" | |||
34 | # CONFIG_POSIX_MQUEUE is not set | 34 | # CONFIG_POSIX_MQUEUE is not set |
35 | # CONFIG_BSD_PROCESS_ACCT is not set | 35 | # CONFIG_BSD_PROCESS_ACCT is not set |
36 | # CONFIG_TASKSTATS is not set | 36 | # CONFIG_TASKSTATS is not set |
37 | # CONFIG_USER_NS is not set | ||
38 | # CONFIG_PID_NS is not set | ||
39 | # CONFIG_AUDIT is not set | 37 | # CONFIG_AUDIT is not set |
40 | # CONFIG_IKCONFIG is not set | 38 | # CONFIG_IKCONFIG is not set |
41 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
42 | # CONFIG_CGROUPS is not set | 40 | # CONFIG_CGROUPS is not set |
43 | # CONFIG_FAIR_GROUP_SCHED is not set | 41 | # CONFIG_GROUP_SCHED is not set |
44 | CONFIG_SYSFS_DEPRECATED=y | 42 | CONFIG_SYSFS_DEPRECATED=y |
43 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
45 | # CONFIG_RELAY is not set | 44 | # CONFIG_RELAY is not set |
45 | # CONFIG_NAMESPACES is not set | ||
46 | # CONFIG_BLK_DEV_INITRD is not set | 46 | # CONFIG_BLK_DEV_INITRD is not set |
47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
48 | CONFIG_SYSCTL=y | 48 | CONFIG_SYSCTL=y |
@@ -54,24 +54,38 @@ CONFIG_HOTPLUG=y | |||
54 | CONFIG_PRINTK=y | 54 | CONFIG_PRINTK=y |
55 | CONFIG_BUG=y | 55 | CONFIG_BUG=y |
56 | CONFIG_ELF_CORE=y | 56 | CONFIG_ELF_CORE=y |
57 | # CONFIG_COMPAT_BRK is not set | ||
57 | # CONFIG_BASE_FULL is not set | 58 | # CONFIG_BASE_FULL is not set |
58 | # CONFIG_FUTEX is not set | 59 | # CONFIG_FUTEX is not set |
59 | # CONFIG_EPOLL is not set | 60 | # CONFIG_EPOLL is not set |
60 | # CONFIG_SIGNALFD is not set | 61 | # CONFIG_SIGNALFD is not set |
62 | # CONFIG_TIMERFD is not set | ||
61 | # CONFIG_EVENTFD is not set | 63 | # CONFIG_EVENTFD is not set |
62 | CONFIG_SHMEM=y | 64 | CONFIG_SHMEM=y |
63 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
64 | # CONFIG_SLAB is not set | 66 | # CONFIG_SLAB is not set |
65 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
66 | CONFIG_SLOB=y | 68 | CONFIG_SLOB=y |
69 | # CONFIG_PROFILING is not set | ||
70 | # CONFIG_MARKERS is not set | ||
71 | CONFIG_HAVE_OPROFILE=y | ||
72 | CONFIG_HAVE_KPROBES=y | ||
73 | # CONFIG_HAVE_KRETPROBES is not set | ||
74 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
75 | # CONFIG_PROC_PAGE_MONITOR is not set | ||
67 | # CONFIG_TINY_SHMEM is not set | 76 | # CONFIG_TINY_SHMEM is not set |
68 | CONFIG_BASE_SMALL=1 | 77 | CONFIG_BASE_SMALL=1 |
69 | # CONFIG_MODULES is not set | 78 | # CONFIG_MODULES is not set |
70 | # CONFIG_BLOCK is not set | 79 | # CONFIG_BLOCK is not set |
80 | CONFIG_CLASSIC_RCU=y | ||
71 | 81 | ||
72 | # | 82 | # |
73 | # System Type and features | 83 | # System Type and features |
74 | # | 84 | # |
85 | # CONFIG_TICK_ONESHOT is not set | ||
86 | # CONFIG_NO_HZ is not set | ||
87 | # CONFIG_HIGH_RES_TIMERS is not set | ||
88 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
75 | CONFIG_SUBARCH_AVR32B=y | 89 | CONFIG_SUBARCH_AVR32B=y |
76 | CONFIG_MMU=y | 90 | CONFIG_MMU=y |
77 | CONFIG_PERFORMANCE_COUNTERS=y | 91 | CONFIG_PERFORMANCE_COUNTERS=y |
@@ -115,16 +129,19 @@ CONFIG_FLATMEM=y | |||
115 | CONFIG_FLAT_NODE_MEM_MAP=y | 129 | CONFIG_FLAT_NODE_MEM_MAP=y |
116 | # CONFIG_SPARSEMEM_STATIC is not set | 130 | # CONFIG_SPARSEMEM_STATIC is not set |
117 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 131 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
132 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
118 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 133 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
119 | # CONFIG_RESOURCES_64BIT is not set | 134 | # CONFIG_RESOURCES_64BIT is not set |
120 | CONFIG_ZONE_DMA_FLAG=0 | 135 | CONFIG_ZONE_DMA_FLAG=0 |
121 | CONFIG_VIRT_TO_BUS=y | 136 | CONFIG_VIRT_TO_BUS=y |
122 | # CONFIG_OWNERSHIP_TRACE is not set | 137 | # CONFIG_OWNERSHIP_TRACE is not set |
138 | # CONFIG_NMI_DEBUGGING is not set | ||
123 | # CONFIG_HZ_100 is not set | 139 | # CONFIG_HZ_100 is not set |
124 | CONFIG_HZ_250=y | 140 | CONFIG_HZ_250=y |
125 | # CONFIG_HZ_300 is not set | 141 | # CONFIG_HZ_300 is not set |
126 | # CONFIG_HZ_1000 is not set | 142 | # CONFIG_HZ_1000 is not set |
127 | CONFIG_HZ=250 | 143 | CONFIG_HZ=250 |
144 | # CONFIG_SCHED_HRTICK is not set | ||
128 | CONFIG_CMDLINE="" | 145 | CONFIG_CMDLINE="" |
129 | 146 | ||
130 | # | 147 | # |
@@ -134,20 +151,7 @@ CONFIG_CMDLINE="" | |||
134 | # | 151 | # |
135 | # CPU Frequency scaling | 152 | # CPU Frequency scaling |
136 | # | 153 | # |
137 | CONFIG_CPU_FREQ=y | 154 | # CONFIG_CPU_FREQ is not set |
138 | CONFIG_CPU_FREQ_TABLE=y | ||
139 | # CONFIG_CPU_FREQ_DEBUG is not set | ||
140 | # CONFIG_CPU_FREQ_STAT is not set | ||
141 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | ||
142 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | ||
143 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | ||
144 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | ||
145 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | ||
146 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | ||
147 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
148 | CONFIG_CPU_FREQ_GOV_ONDEMAND=y | ||
149 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | ||
150 | CONFIG_CPU_FREQ_AT32AP=y | ||
151 | 155 | ||
152 | # | 156 | # |
153 | # Bus options | 157 | # Bus options |
@@ -197,8 +201,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
197 | CONFIG_DEFAULT_TCP_CONG="cubic" | 201 | CONFIG_DEFAULT_TCP_CONG="cubic" |
198 | # CONFIG_TCP_MD5SIG is not set | 202 | # CONFIG_TCP_MD5SIG is not set |
199 | # CONFIG_IPV6 is not set | 203 | # CONFIG_IPV6 is not set |
200 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
201 | # CONFIG_INET6_TUNNEL is not set | ||
202 | # CONFIG_NETWORK_SECMARK is not set | 204 | # CONFIG_NETWORK_SECMARK is not set |
203 | # CONFIG_NETFILTER is not set | 205 | # CONFIG_NETFILTER is not set |
204 | # CONFIG_IP_DCCP is not set | 206 | # CONFIG_IP_DCCP is not set |
@@ -222,6 +224,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
222 | # | 224 | # |
223 | # CONFIG_NET_PKTGEN is not set | 225 | # CONFIG_NET_PKTGEN is not set |
224 | # CONFIG_HAMRADIO is not set | 226 | # CONFIG_HAMRADIO is not set |
227 | # CONFIG_CAN is not set | ||
225 | # CONFIG_IRDA is not set | 228 | # CONFIG_IRDA is not set |
226 | # CONFIG_BT is not set | 229 | # CONFIG_BT is not set |
227 | # CONFIG_AF_RXRPC is not set | 230 | # CONFIG_AF_RXRPC is not set |
@@ -255,6 +258,7 @@ CONFIG_MTD=y | |||
255 | CONFIG_MTD_PARTITIONS=y | 258 | CONFIG_MTD_PARTITIONS=y |
256 | # CONFIG_MTD_REDBOOT_PARTS is not set | 259 | # CONFIG_MTD_REDBOOT_PARTS is not set |
257 | CONFIG_MTD_CMDLINE_PARTS=y | 260 | CONFIG_MTD_CMDLINE_PARTS=y |
261 | # CONFIG_MTD_AR7_PARTS is not set | ||
258 | 262 | ||
259 | # | 263 | # |
260 | # User Modules And Translation Layers | 264 | # User Modules And Translation Layers |
@@ -321,6 +325,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
321 | # CONFIG_MTD_UBI is not set | 325 | # CONFIG_MTD_UBI is not set |
322 | # CONFIG_PARPORT is not set | 326 | # CONFIG_PARPORT is not set |
323 | # CONFIG_MISC_DEVICES is not set | 327 | # CONFIG_MISC_DEVICES is not set |
328 | # CONFIG_HAVE_IDE is not set | ||
324 | 329 | ||
325 | # | 330 | # |
326 | # SCSI device support | 331 | # SCSI device support |
@@ -346,6 +351,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
346 | # Character devices | 351 | # Character devices |
347 | # | 352 | # |
348 | # CONFIG_VT is not set | 353 | # CONFIG_VT is not set |
354 | # CONFIG_DEVKMEM is not set | ||
349 | # CONFIG_SERIAL_NONSTANDARD is not set | 355 | # CONFIG_SERIAL_NONSTANDARD is not set |
350 | 356 | ||
351 | # | 357 | # |
@@ -358,6 +364,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | |||
358 | # | 364 | # |
359 | CONFIG_SERIAL_ATMEL=y | 365 | CONFIG_SERIAL_ATMEL=y |
360 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 366 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
367 | # CONFIG_SERIAL_ATMEL_PDC is not set | ||
361 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | 368 | # CONFIG_SERIAL_ATMEL_TTYAT is not set |
362 | CONFIG_SERIAL_CORE=y | 369 | CONFIG_SERIAL_CORE=y |
363 | CONFIG_SERIAL_CORE_CONSOLE=y | 370 | CONFIG_SERIAL_CORE_CONSOLE=y |
@@ -365,15 +372,9 @@ CONFIG_UNIX98_PTYS=y | |||
365 | # CONFIG_LEGACY_PTYS is not set | 372 | # CONFIG_LEGACY_PTYS is not set |
366 | # CONFIG_IPMI_HANDLER is not set | 373 | # CONFIG_IPMI_HANDLER is not set |
367 | # CONFIG_HW_RANDOM is not set | 374 | # CONFIG_HW_RANDOM is not set |
368 | # CONFIG_RTC is not set | ||
369 | # CONFIG_GEN_RTC is not set | ||
370 | # CONFIG_R3964 is not set | 375 | # CONFIG_R3964 is not set |
371 | # CONFIG_TCG_TPM is not set | 376 | # CONFIG_TCG_TPM is not set |
372 | # CONFIG_I2C is not set | 377 | # CONFIG_I2C is not set |
373 | |||
374 | # | ||
375 | # SPI support | ||
376 | # | ||
377 | CONFIG_SPI=y | 378 | CONFIG_SPI=y |
378 | CONFIG_SPI_MASTER=y | 379 | CONFIG_SPI_MASTER=y |
379 | 380 | ||
@@ -389,9 +390,24 @@ CONFIG_SPI_ATMEL=y | |||
389 | # CONFIG_SPI_AT25 is not set | 390 | # CONFIG_SPI_AT25 is not set |
390 | # CONFIG_SPI_SPIDEV is not set | 391 | # CONFIG_SPI_SPIDEV is not set |
391 | # CONFIG_SPI_TLE62X0 is not set | 392 | # CONFIG_SPI_TLE62X0 is not set |
393 | CONFIG_HAVE_GPIO_LIB=y | ||
394 | |||
395 | # | ||
396 | # GPIO Support | ||
397 | # | ||
398 | |||
399 | # | ||
400 | # I2C GPIO expanders: | ||
401 | # | ||
402 | |||
403 | # | ||
404 | # SPI GPIO expanders: | ||
405 | # | ||
406 | # CONFIG_GPIO_MCP23S08 is not set | ||
392 | # CONFIG_W1 is not set | 407 | # CONFIG_W1 is not set |
393 | # CONFIG_POWER_SUPPLY is not set | 408 | # CONFIG_POWER_SUPPLY is not set |
394 | # CONFIG_HWMON is not set | 409 | # CONFIG_HWMON is not set |
410 | # CONFIG_THERMAL is not set | ||
395 | CONFIG_WATCHDOG=y | 411 | CONFIG_WATCHDOG=y |
396 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 412 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
397 | 413 | ||
@@ -411,12 +427,22 @@ CONFIG_SSB_POSSIBLE=y | |||
411 | # Multifunction device drivers | 427 | # Multifunction device drivers |
412 | # | 428 | # |
413 | # CONFIG_MFD_SM501 is not set | 429 | # CONFIG_MFD_SM501 is not set |
430 | # CONFIG_HTC_PASIC3 is not set | ||
414 | 431 | ||
415 | # | 432 | # |
416 | # Multimedia devices | 433 | # Multimedia devices |
417 | # | 434 | # |
435 | |||
436 | # | ||
437 | # Multimedia core support | ||
438 | # | ||
418 | # CONFIG_VIDEO_DEV is not set | 439 | # CONFIG_VIDEO_DEV is not set |
419 | # CONFIG_DVB_CORE is not set | 440 | # CONFIG_DVB_CORE is not set |
441 | # CONFIG_VIDEO_MEDIA is not set | ||
442 | |||
443 | # | ||
444 | # Multimedia drivers | ||
445 | # | ||
420 | # CONFIG_DAB is not set | 446 | # CONFIG_DAB is not set |
421 | 447 | ||
422 | # | 448 | # |
@@ -434,8 +460,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
434 | # CONFIG_FB_SYS_FILLRECT is not set | 460 | # CONFIG_FB_SYS_FILLRECT is not set |
435 | # CONFIG_FB_SYS_COPYAREA is not set | 461 | # CONFIG_FB_SYS_COPYAREA is not set |
436 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 462 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
463 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
437 | # CONFIG_FB_SYS_FOPS is not set | 464 | # CONFIG_FB_SYS_FOPS is not set |
438 | CONFIG_FB_DEFERRED_IO=y | ||
439 | # CONFIG_FB_SVGALIB is not set | 465 | # CONFIG_FB_SVGALIB is not set |
440 | # CONFIG_FB_MACMODES is not set | 466 | # CONFIG_FB_MACMODES is not set |
441 | # CONFIG_FB_BACKLIGHT is not set | 467 | # CONFIG_FB_BACKLIGHT is not set |
@@ -467,14 +493,12 @@ CONFIG_USB_SUPPORT=y | |||
467 | # CONFIG_USB_ARCH_HAS_HCD is not set | 493 | # CONFIG_USB_ARCH_HAS_HCD is not set |
468 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 494 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
469 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 495 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
496 | # CONFIG_USB_OTG_WHITELIST is not set | ||
497 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
470 | 498 | ||
471 | # | 499 | # |
472 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 500 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
473 | # | 501 | # |
474 | |||
475 | # | ||
476 | # USB Gadget Support | ||
477 | # | ||
478 | CONFIG_USB_GADGET=y | 502 | CONFIG_USB_GADGET=y |
479 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | 503 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
480 | CONFIG_USB_GADGET_SELECTED=y | 504 | CONFIG_USB_GADGET_SELECTED=y |
@@ -485,6 +509,7 @@ CONFIG_USB_ATMEL_USBA=y | |||
485 | # CONFIG_USB_GADGET_NET2280 is not set | 509 | # CONFIG_USB_GADGET_NET2280 is not set |
486 | # CONFIG_USB_GADGET_PXA2XX is not set | 510 | # CONFIG_USB_GADGET_PXA2XX is not set |
487 | # CONFIG_USB_GADGET_M66592 is not set | 511 | # CONFIG_USB_GADGET_M66592 is not set |
512 | # CONFIG_USB_GADGET_PXA27X is not set | ||
488 | # CONFIG_USB_GADGET_GOKU is not set | 513 | # CONFIG_USB_GADGET_GOKU is not set |
489 | # CONFIG_USB_GADGET_LH7A40X is not set | 514 | # CONFIG_USB_GADGET_LH7A40X is not set |
490 | # CONFIG_USB_GADGET_OMAP is not set | 515 | # CONFIG_USB_GADGET_OMAP is not set |
@@ -499,8 +524,11 @@ CONFIG_USB_ETH=y | |||
499 | # CONFIG_USB_FILE_STORAGE is not set | 524 | # CONFIG_USB_FILE_STORAGE is not set |
500 | # CONFIG_USB_G_SERIAL is not set | 525 | # CONFIG_USB_G_SERIAL is not set |
501 | # CONFIG_USB_MIDI_GADGET is not set | 526 | # CONFIG_USB_MIDI_GADGET is not set |
527 | # CONFIG_USB_G_PRINTER is not set | ||
502 | # CONFIG_MMC is not set | 528 | # CONFIG_MMC is not set |
529 | # CONFIG_MEMSTICK is not set | ||
503 | # CONFIG_NEW_LEDS is not set | 530 | # CONFIG_NEW_LEDS is not set |
531 | # CONFIG_ACCESSIBILITY is not set | ||
504 | CONFIG_RTC_LIB=y | 532 | CONFIG_RTC_LIB=y |
505 | CONFIG_RTC_CLASS=y | 533 | CONFIG_RTC_CLASS=y |
506 | CONFIG_RTC_HCTOSYS=y | 534 | CONFIG_RTC_HCTOSYS=y |
@@ -519,15 +547,17 @@ CONFIG_RTC_INTF_DEV=y | |||
519 | # | 547 | # |
520 | # SPI RTC drivers | 548 | # SPI RTC drivers |
521 | # | 549 | # |
522 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
523 | # CONFIG_RTC_DRV_MAX6902 is not set | 550 | # CONFIG_RTC_DRV_MAX6902 is not set |
551 | # CONFIG_RTC_DRV_R9701 is not set | ||
552 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
524 | 553 | ||
525 | # | 554 | # |
526 | # Platform RTC drivers | 555 | # Platform RTC drivers |
527 | # | 556 | # |
557 | # CONFIG_RTC_DRV_DS1511 is not set | ||
528 | # CONFIG_RTC_DRV_DS1553 is not set | 558 | # CONFIG_RTC_DRV_DS1553 is not set |
529 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
530 | # CONFIG_RTC_DRV_DS1742 is not set | 559 | # CONFIG_RTC_DRV_DS1742 is not set |
560 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
531 | # CONFIG_RTC_DRV_M48T86 is not set | 561 | # CONFIG_RTC_DRV_M48T86 is not set |
532 | # CONFIG_RTC_DRV_M48T59 is not set | 562 | # CONFIG_RTC_DRV_M48T59 is not set |
533 | # CONFIG_RTC_DRV_V3020 is not set | 563 | # CONFIG_RTC_DRV_V3020 is not set |
@@ -536,18 +566,14 @@ CONFIG_RTC_INTF_DEV=y | |||
536 | # on-CPU RTC drivers | 566 | # on-CPU RTC drivers |
537 | # | 567 | # |
538 | CONFIG_RTC_DRV_AT32AP700X=y | 568 | CONFIG_RTC_DRV_AT32AP700X=y |
539 | |||
540 | # | ||
541 | # Userspace I/O | ||
542 | # | ||
543 | # CONFIG_UIO is not set | 569 | # CONFIG_UIO is not set |
544 | 570 | ||
545 | # | 571 | # |
546 | # File systems | 572 | # File systems |
547 | # | 573 | # |
574 | # CONFIG_DNOTIFY is not set | ||
548 | # CONFIG_INOTIFY is not set | 575 | # CONFIG_INOTIFY is not set |
549 | # CONFIG_QUOTA is not set | 576 | # CONFIG_QUOTA is not set |
550 | # CONFIG_DNOTIFY is not set | ||
551 | # CONFIG_AUTOFS_FS is not set | 577 | # CONFIG_AUTOFS_FS is not set |
552 | # CONFIG_AUTOFS4_FS is not set | 578 | # CONFIG_AUTOFS4_FS is not set |
553 | # CONFIG_FUSE_FS is not set | 579 | # CONFIG_FUSE_FS is not set |
@@ -580,7 +606,6 @@ CONFIG_JFFS2_RTIME=y | |||
580 | # CONFIG_NETWORK_FILESYSTEMS is not set | 606 | # CONFIG_NETWORK_FILESYSTEMS is not set |
581 | # CONFIG_NLS is not set | 607 | # CONFIG_NLS is not set |
582 | # CONFIG_DLM is not set | 608 | # CONFIG_DLM is not set |
583 | # CONFIG_INSTRUMENTATION is not set | ||
584 | 609 | ||
585 | # | 610 | # |
586 | # Kernel hacking | 611 | # Kernel hacking |
@@ -588,6 +613,7 @@ CONFIG_JFFS2_RTIME=y | |||
588 | # CONFIG_PRINTK_TIME is not set | 613 | # CONFIG_PRINTK_TIME is not set |
589 | CONFIG_ENABLE_WARN_DEPRECATED=y | 614 | CONFIG_ENABLE_WARN_DEPRECATED=y |
590 | CONFIG_ENABLE_MUST_CHECK=y | 615 | CONFIG_ENABLE_MUST_CHECK=y |
616 | CONFIG_FRAME_WARN=1024 | ||
591 | CONFIG_MAGIC_SYSRQ=y | 617 | CONFIG_MAGIC_SYSRQ=y |
592 | # CONFIG_UNUSED_SYMBOLS is not set | 618 | # CONFIG_UNUSED_SYMBOLS is not set |
593 | # CONFIG_DEBUG_FS is not set | 619 | # CONFIG_DEBUG_FS is not set |
@@ -608,6 +634,8 @@ CONFIG_MAGIC_SYSRQ=y | |||
608 | # Library routines | 634 | # Library routines |
609 | # | 635 | # |
610 | CONFIG_BITREVERSE=y | 636 | CONFIG_BITREVERSE=y |
637 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
638 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
611 | # CONFIG_CRC_CCITT is not set | 639 | # CONFIG_CRC_CCITT is not set |
612 | # CONFIG_CRC16 is not set | 640 | # CONFIG_CRC16 is not set |
613 | # CONFIG_CRC_ITU_T is not set | 641 | # CONFIG_CRC_ITU_T is not set |
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c index 80f55f8dbf1c..84a7d44edc67 100644 --- a/arch/avr32/kernel/avr32_ksyms.c +++ b/arch/avr32/kernel/avr32_ksyms.c | |||
@@ -29,7 +29,9 @@ EXPORT_SYMBOL(__avr32_asr64); | |||
29 | */ | 29 | */ |
30 | EXPORT_SYMBOL(memset); | 30 | EXPORT_SYMBOL(memset); |
31 | EXPORT_SYMBOL(memcpy); | 31 | EXPORT_SYMBOL(memcpy); |
32 | |||
32 | EXPORT_SYMBOL(clear_page); | 33 | EXPORT_SYMBOL(clear_page); |
34 | EXPORT_SYMBOL(copy_page); | ||
33 | 35 | ||
34 | /* | 36 | /* |
35 | * Userspace access stuff. | 37 | * Userspace access stuff. |
@@ -41,6 +43,8 @@ EXPORT_SYMBOL(strncpy_from_user); | |||
41 | EXPORT_SYMBOL(__strncpy_from_user); | 43 | EXPORT_SYMBOL(__strncpy_from_user); |
42 | EXPORT_SYMBOL(clear_user); | 44 | EXPORT_SYMBOL(clear_user); |
43 | EXPORT_SYMBOL(__clear_user); | 45 | EXPORT_SYMBOL(__clear_user); |
46 | EXPORT_SYMBOL(strnlen_user); | ||
47 | |||
44 | EXPORT_SYMBOL(csum_partial); | 48 | EXPORT_SYMBOL(csum_partial); |
45 | EXPORT_SYMBOL(csum_partial_copy_generic); | 49 | EXPORT_SYMBOL(csum_partial_copy_generic); |
46 | 50 | ||
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c index effcacf9d1a2..44058469c6ec 100644 --- a/arch/avr32/kernel/init_task.c +++ b/arch/avr32/kernel/init_task.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
15 | 15 | ||
16 | static struct fs_struct init_fs = INIT_FS; | 16 | static struct fs_struct init_fs = INIT_FS; |
17 | static struct files_struct init_files = INIT_FILES; | ||
18 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 17 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
19 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 18 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
20 | struct mm_struct init_mm = INIT_MM(init_mm); | 19 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c index 235524b79193..5dd8d25428bf 100644 --- a/arch/avr32/mach-at32ap/cpufreq.c +++ b/arch/avr32/mach-at32ap/cpufreq.c | |||
@@ -108,5 +108,4 @@ static int __init at32_cpufreq_init(void) | |||
108 | { | 108 | { |
109 | return cpufreq_register_driver(&at32_driver); | 109 | return cpufreq_register_driver(&at32_driver); |
110 | } | 110 | } |
111 | 111 | late_initcall(at32_cpufreq_init); | |
112 | arch_initcall(at32_cpufreq_init); | ||
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index fd5708523f2e..b87634e75f20 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -479,16 +479,6 @@ comment "Memory Setup" | |||
479 | 479 | ||
480 | comment "Misc" | 480 | comment "Misc" |
481 | 481 | ||
482 | config ENET_FLASH_PIN | ||
483 | int "PF port/pin used for flash and ethernet sharing" | ||
484 | depends on (BFIN533_STAMP) | ||
485 | default 0 | ||
486 | help | ||
487 | PF port/pin used for flash and ethernet sharing to allow other PF | ||
488 | pins to be used on other platforms without having to touch common | ||
489 | code. | ||
490 | For example: PF0 --> 0,PF1 --> 1,PF2 --> 2, etc. | ||
491 | |||
492 | choice | 482 | choice |
493 | prompt "Blackfin Exception Scratch Register" | 483 | prompt "Blackfin Exception Scratch Register" |
494 | default BFIN_SCRATCH_REG_RETN | 484 | default BFIN_SCRATCH_REG_RETN |
@@ -695,6 +685,8 @@ choice | |||
695 | prompt "Uncached SDRAM region" | 685 | prompt "Uncached SDRAM region" |
696 | default DMA_UNCACHED_1M | 686 | default DMA_UNCACHED_1M |
697 | depends on BFIN_DMA_5XX | 687 | depends on BFIN_DMA_5XX |
688 | config DMA_UNCACHED_4M | ||
689 | bool "Enable 4M DMA region" | ||
698 | config DMA_UNCACHED_2M | 690 | config DMA_UNCACHED_2M |
699 | bool "Enable 2M DMA region" | 691 | bool "Enable 2M DMA region" |
700 | config DMA_UNCACHED_1M | 692 | config DMA_UNCACHED_1M |
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig index 64876dfc2e55..5e6fb9d8e50f 100644 --- a/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
4 | # Fri May 16 10:02:29 2008 | ||
4 | # | 5 | # |
5 | # CONFIG_MMU is not set | 6 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 7 | # CONFIG_FPU is not set |
@@ -13,35 +14,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
13 | CONFIG_GENERIC_HWEIGHT=y | 14 | CONFIG_GENERIC_HWEIGHT=y |
14 | CONFIG_GENERIC_HARDIRQS=y | 15 | CONFIG_GENERIC_HARDIRQS=y |
15 | CONFIG_GENERIC_IRQ_PROBE=y | 16 | CONFIG_GENERIC_IRQ_PROBE=y |
16 | CONFIG_GENERIC_TIME=y | ||
17 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
21 | 21 | ||
22 | # | 22 | # |
23 | # Code maturity level options | 23 | # General setup |
24 | # | 24 | # |
25 | CONFIG_EXPERIMENTAL=y | 25 | CONFIG_EXPERIMENTAL=y |
26 | CONFIG_BROKEN_ON_SMP=y | 26 | CONFIG_BROKEN_ON_SMP=y |
27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_LOCALVERSION="" | 28 | CONFIG_LOCALVERSION="" |
33 | CONFIG_LOCALVERSION_AUTO=y | 29 | CONFIG_LOCALVERSION_AUTO=y |
34 | CONFIG_SYSVIPC=y | 30 | CONFIG_SYSVIPC=y |
35 | # CONFIG_IPC_NS is not set | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | 31 | CONFIG_SYSVIPC_SYSCTL=y |
37 | # CONFIG_POSIX_MQUEUE is not set | 32 | # CONFIG_POSIX_MQUEUE is not set |
38 | # CONFIG_BSD_PROCESS_ACCT is not set | 33 | # CONFIG_BSD_PROCESS_ACCT is not set |
39 | # CONFIG_TASKSTATS is not set | 34 | # CONFIG_TASKSTATS is not set |
40 | # CONFIG_UTS_NS is not set | 35 | # CONFIG_USER_NS is not set |
36 | # CONFIG_PID_NS is not set | ||
41 | # CONFIG_AUDIT is not set | 37 | # CONFIG_AUDIT is not set |
42 | CONFIG_IKCONFIG=y | 38 | CONFIG_IKCONFIG=y |
43 | CONFIG_IKCONFIG_PROC=y | 39 | CONFIG_IKCONFIG_PROC=y |
44 | CONFIG_LOG_BUF_SHIFT=14 | 40 | CONFIG_LOG_BUF_SHIFT=14 |
41 | # CONFIG_CGROUPS is not set | ||
42 | CONFIG_FAIR_GROUP_SCHED=y | ||
43 | CONFIG_FAIR_USER_SCHED=y | ||
44 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
45 | CONFIG_SYSFS_DEPRECATED=y | 45 | CONFIG_SYSFS_DEPRECATED=y |
46 | # CONFIG_RELAY is not set | 46 | # CONFIG_RELAY is not set |
47 | CONFIG_BLK_DEV_INITRD=y | 47 | CONFIG_BLK_DEV_INITRD=y |
@@ -64,32 +64,24 @@ CONFIG_EPOLL=y | |||
64 | CONFIG_SIGNALFD=y | 64 | CONFIG_SIGNALFD=y |
65 | CONFIG_EVENTFD=y | 65 | CONFIG_EVENTFD=y |
66 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
68 | # CONFIG_NP2 is not set | ||
69 | CONFIG_SLAB=y | 67 | CONFIG_SLAB=y |
70 | # CONFIG_SLUB is not set | 68 | # CONFIG_SLUB is not set |
71 | # CONFIG_SLOB is not set | 69 | # CONFIG_SLOB is not set |
70 | CONFIG_SLABINFO=y | ||
72 | CONFIG_RT_MUTEXES=y | 71 | CONFIG_RT_MUTEXES=y |
73 | CONFIG_TINY_SHMEM=y | 72 | CONFIG_TINY_SHMEM=y |
74 | CONFIG_BASE_SMALL=0 | 73 | CONFIG_BASE_SMALL=0 |
75 | |||
76 | # | ||
77 | # Loadable module support | ||
78 | # | ||
79 | CONFIG_MODULES=y | 74 | CONFIG_MODULES=y |
80 | CONFIG_MODULE_UNLOAD=y | 75 | CONFIG_MODULE_UNLOAD=y |
81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 76 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
82 | # CONFIG_MODVERSIONS is not set | 77 | # CONFIG_MODVERSIONS is not set |
83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 78 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
84 | CONFIG_KMOD=y | 79 | CONFIG_KMOD=y |
85 | |||
86 | # | ||
87 | # Block layer | ||
88 | # | ||
89 | CONFIG_BLOCK=y | 80 | CONFIG_BLOCK=y |
90 | # CONFIG_LBD is not set | 81 | # CONFIG_LBD is not set |
91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 82 | # CONFIG_BLK_DEV_IO_TRACE is not set |
92 | # CONFIG_LSF is not set | 83 | # CONFIG_LSF is not set |
84 | # CONFIG_BLK_DEV_BSG is not set | ||
93 | 85 | ||
94 | # | 86 | # |
95 | # IO Schedulers | 87 | # IO Schedulers |
@@ -141,7 +133,6 @@ CONFIG_BF_REV_0_0=y | |||
141 | # CONFIG_BF_REV_ANY is not set | 133 | # CONFIG_BF_REV_ANY is not set |
142 | # CONFIG_BF_REV_NONE is not set | 134 | # CONFIG_BF_REV_NONE is not set |
143 | CONFIG_BF52x=y | 135 | CONFIG_BF52x=y |
144 | CONFIG_BFIN_SINGLE_CORE=y | ||
145 | CONFIG_MEM_MT48LC32M16A2TG_75=y | 136 | CONFIG_MEM_MT48LC32M16A2TG_75=y |
146 | CONFIG_BFIN527_EZKIT=y | 137 | CONFIG_BFIN527_EZKIT=y |
147 | 138 | ||
@@ -227,12 +218,14 @@ CONFIG_IRQ_USB_DMA=11 | |||
227 | # Board customizations | 218 | # Board customizations |
228 | # | 219 | # |
229 | # CONFIG_CMDLINE_BOOL is not set | 220 | # CONFIG_CMDLINE_BOOL is not set |
221 | CONFIG_BOOT_LOAD=0x1000 | ||
230 | 222 | ||
231 | # | 223 | # |
232 | # Clock/PLL Setup | 224 | # Clock/PLL Setup |
233 | # | 225 | # |
234 | CONFIG_CLKIN_HZ=25000000 | 226 | CONFIG_CLKIN_HZ=25000000 |
235 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 227 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
228 | CONFIG_MAX_MEM_SIZE=512 | ||
236 | CONFIG_MAX_VCO_HZ=600000000 | 229 | CONFIG_MAX_VCO_HZ=600000000 |
237 | CONFIG_MIN_VCO_HZ=50000000 | 230 | CONFIG_MIN_VCO_HZ=50000000 |
238 | CONFIG_MAX_SCLK_HZ=133333333 | 231 | CONFIG_MAX_SCLK_HZ=133333333 |
@@ -246,13 +239,17 @@ CONFIG_HZ_250=y | |||
246 | # CONFIG_HZ_300 is not set | 239 | # CONFIG_HZ_300 is not set |
247 | # CONFIG_HZ_1000 is not set | 240 | # CONFIG_HZ_1000 is not set |
248 | CONFIG_HZ=250 | 241 | CONFIG_HZ=250 |
242 | CONFIG_GENERIC_TIME=y | ||
243 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
244 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
245 | # CONFIG_TICK_ONESHOT is not set | ||
246 | # CONFIG_NO_HZ is not set | ||
247 | # CONFIG_HIGH_RES_TIMERS is not set | ||
248 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
249 | 249 | ||
250 | # | 250 | # |
251 | # Memory Setup | 251 | # Misc |
252 | # | 252 | # |
253 | CONFIG_MAX_MEM_SIZE=512 | ||
254 | CONFIG_MEM_ADD_WIDTH=10 | ||
255 | CONFIG_BOOT_LOAD=0x1000 | ||
256 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 253 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
257 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 254 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
258 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 255 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
@@ -288,12 +285,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
288 | CONFIG_FLATMEM=y | 285 | CONFIG_FLATMEM=y |
289 | CONFIG_FLAT_NODE_MEM_MAP=y | 286 | CONFIG_FLAT_NODE_MEM_MAP=y |
290 | # CONFIG_SPARSEMEM_STATIC is not set | 287 | # CONFIG_SPARSEMEM_STATIC is not set |
288 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
291 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 289 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
292 | # CONFIG_RESOURCES_64BIT is not set | 290 | # CONFIG_RESOURCES_64BIT is not set |
293 | CONFIG_ZONE_DMA_FLAG=1 | 291 | CONFIG_ZONE_DMA_FLAG=1 |
294 | CONFIG_LARGE_ALLOCS=y | 292 | CONFIG_VIRT_TO_BUS=y |
295 | # CONFIG_BFIN_GPTIMERS is not set | 293 | # CONFIG_BFIN_GPTIMERS is not set |
296 | CONFIG_BFIN_DMA_5XX=y | 294 | CONFIG_BFIN_DMA_5XX=y |
295 | # CONFIG_DMA_UNCACHED_4M is not set | ||
297 | # CONFIG_DMA_UNCACHED_2M is not set | 296 | # CONFIG_DMA_UNCACHED_2M is not set |
298 | CONFIG_DMA_UNCACHED_1M=y | 297 | CONFIG_DMA_UNCACHED_1M=y |
299 | # CONFIG_DMA_UNCACHED_NONE is not set | 298 | # CONFIG_DMA_UNCACHED_NONE is not set |
@@ -338,10 +337,6 @@ CONFIG_BANK_3=0xFFC0 | |||
338 | # | 337 | # |
339 | # CONFIG_PCI is not set | 338 | # CONFIG_PCI is not set |
340 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 339 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
341 | |||
342 | # | ||
343 | # PCCARD (PCMCIA/CardBus) support | ||
344 | # | ||
345 | # CONFIG_PCCARD is not set | 340 | # CONFIG_PCCARD is not set |
346 | 341 | ||
347 | # | 342 | # |
@@ -357,9 +352,15 @@ CONFIG_BINFMT_ZFLAT=y | |||
357 | # Power management options | 352 | # Power management options |
358 | # | 353 | # |
359 | # CONFIG_PM is not set | 354 | # CONFIG_PM is not set |
355 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
360 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 356 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
361 | 357 | ||
362 | # | 358 | # |
359 | # CPU Frequency scaling | ||
360 | # | ||
361 | # CONFIG_CPU_FREQ is not set | ||
362 | |||
363 | # | ||
363 | # Networking | 364 | # Networking |
364 | # | 365 | # |
365 | CONFIG_NET=y | 366 | CONFIG_NET=y |
@@ -395,6 +396,7 @@ CONFIG_SYN_COOKIES=y | |||
395 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 396 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
396 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 397 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
397 | CONFIG_INET_XFRM_MODE_BEET=y | 398 | CONFIG_INET_XFRM_MODE_BEET=y |
399 | # CONFIG_INET_LRO is not set | ||
398 | CONFIG_INET_DIAG=y | 400 | CONFIG_INET_DIAG=y |
399 | CONFIG_INET_TCP_DIAG=y | 401 | CONFIG_INET_TCP_DIAG=y |
400 | # CONFIG_TCP_CONG_ADVANCED is not set | 402 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -421,10 +423,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
421 | # CONFIG_LAPB is not set | 423 | # CONFIG_LAPB is not set |
422 | # CONFIG_ECONET is not set | 424 | # CONFIG_ECONET is not set |
423 | # CONFIG_WAN_ROUTER is not set | 425 | # CONFIG_WAN_ROUTER is not set |
424 | |||
425 | # | ||
426 | # QoS and/or fair queueing | ||
427 | # | ||
428 | # CONFIG_NET_SCHED is not set | 426 | # CONFIG_NET_SCHED is not set |
429 | 427 | ||
430 | # | 428 | # |
@@ -444,6 +442,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
444 | # CONFIG_MAC80211 is not set | 442 | # CONFIG_MAC80211 is not set |
445 | # CONFIG_IEEE80211 is not set | 443 | # CONFIG_IEEE80211 is not set |
446 | # CONFIG_RFKILL is not set | 444 | # CONFIG_RFKILL is not set |
445 | # CONFIG_NET_9P is not set | ||
447 | 446 | ||
448 | # | 447 | # |
449 | # Device Drivers | 448 | # Device Drivers |
@@ -452,14 +451,11 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
452 | # | 451 | # |
453 | # Generic Driver Options | 452 | # Generic Driver Options |
454 | # | 453 | # |
454 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
455 | CONFIG_STANDALONE=y | 455 | CONFIG_STANDALONE=y |
456 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 456 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
457 | # CONFIG_FW_LOADER is not set | 457 | # CONFIG_FW_LOADER is not set |
458 | # CONFIG_SYS_HYPERVISOR is not set | 458 | # CONFIG_SYS_HYPERVISOR is not set |
459 | |||
460 | # | ||
461 | # Connector - unified userspace <-> kernelspace linker | ||
462 | # | ||
463 | # CONFIG_CONNECTOR is not set | 459 | # CONFIG_CONNECTOR is not set |
464 | CONFIG_MTD=y | 460 | CONFIG_MTD=y |
465 | # CONFIG_MTD_DEBUG is not set | 461 | # CONFIG_MTD_DEBUG is not set |
@@ -479,6 +475,7 @@ CONFIG_MTD_BLOCK=y | |||
479 | # CONFIG_INFTL is not set | 475 | # CONFIG_INFTL is not set |
480 | # CONFIG_RFD_FTL is not set | 476 | # CONFIG_RFD_FTL is not set |
481 | # CONFIG_SSFDC is not set | 477 | # CONFIG_SSFDC is not set |
478 | # CONFIG_MTD_OOPS is not set | ||
482 | 479 | ||
483 | # | 480 | # |
484 | # RAM/ROM/Flash chip drivers | 481 | # RAM/ROM/Flash chip drivers |
@@ -542,39 +539,27 @@ CONFIG_MTD_NAND_IDS=m | |||
542 | # CONFIG_MTD_NAND_DISKONCHIP is not set | 539 | # CONFIG_MTD_NAND_DISKONCHIP is not set |
543 | # CONFIG_MTD_NAND_NANDSIM is not set | 540 | # CONFIG_MTD_NAND_NANDSIM is not set |
544 | # CONFIG_MTD_NAND_PLATFORM is not set | 541 | # CONFIG_MTD_NAND_PLATFORM is not set |
542 | # CONFIG_MTD_ALAUDA is not set | ||
545 | # CONFIG_MTD_ONENAND is not set | 543 | # CONFIG_MTD_ONENAND is not set |
546 | 544 | ||
547 | # | 545 | # |
548 | # UBI - Unsorted block images | 546 | # UBI - Unsorted block images |
549 | # | 547 | # |
550 | # CONFIG_MTD_UBI is not set | 548 | # CONFIG_MTD_UBI is not set |
551 | |||
552 | # | ||
553 | # Parallel port support | ||
554 | # | ||
555 | # CONFIG_PARPORT is not set | 549 | # CONFIG_PARPORT is not set |
556 | 550 | CONFIG_BLK_DEV=y | |
557 | # | ||
558 | # Plug and Play support | ||
559 | # | ||
560 | # CONFIG_PNPACPI is not set | ||
561 | |||
562 | # | ||
563 | # Block devices | ||
564 | # | ||
565 | # CONFIG_BLK_DEV_COW_COMMON is not set | 551 | # CONFIG_BLK_DEV_COW_COMMON is not set |
566 | # CONFIG_BLK_DEV_LOOP is not set | 552 | # CONFIG_BLK_DEV_LOOP is not set |
567 | # CONFIG_BLK_DEV_NBD is not set | 553 | # CONFIG_BLK_DEV_NBD is not set |
554 | # CONFIG_BLK_DEV_UB is not set | ||
568 | CONFIG_BLK_DEV_RAM=y | 555 | CONFIG_BLK_DEV_RAM=y |
569 | CONFIG_BLK_DEV_RAM_COUNT=16 | 556 | CONFIG_BLK_DEV_RAM_COUNT=16 |
570 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 557 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
571 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 558 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
572 | # CONFIG_CDROM_PKTCDVD is not set | 559 | # CONFIG_CDROM_PKTCDVD is not set |
573 | # CONFIG_ATA_OVER_ETH is not set | 560 | # CONFIG_ATA_OVER_ETH is not set |
574 | 561 | CONFIG_MISC_DEVICES=y | |
575 | # | 562 | # CONFIG_EEPROM_93CX6 is not set |
576 | # Misc devices | ||
577 | # | ||
578 | # CONFIG_IDE is not set | 563 | # CONFIG_IDE is not set |
579 | 564 | ||
580 | # | 565 | # |
@@ -582,22 +567,18 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
582 | # | 567 | # |
583 | # CONFIG_RAID_ATTRS is not set | 568 | # CONFIG_RAID_ATTRS is not set |
584 | # CONFIG_SCSI is not set | 569 | # CONFIG_SCSI is not set |
570 | # CONFIG_SCSI_DMA is not set | ||
585 | # CONFIG_SCSI_NETLINK is not set | 571 | # CONFIG_SCSI_NETLINK is not set |
586 | # CONFIG_ATA is not set | 572 | # CONFIG_ATA is not set |
587 | |||
588 | # | ||
589 | # Multi-device support (RAID and LVM) | ||
590 | # | ||
591 | # CONFIG_MD is not set | 573 | # CONFIG_MD is not set |
592 | |||
593 | # | ||
594 | # Network device support | ||
595 | # | ||
596 | CONFIG_NETDEVICES=y | 574 | CONFIG_NETDEVICES=y |
575 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
597 | # CONFIG_DUMMY is not set | 576 | # CONFIG_DUMMY is not set |
598 | # CONFIG_BONDING is not set | 577 | # CONFIG_BONDING is not set |
578 | # CONFIG_MACVLAN is not set | ||
599 | # CONFIG_EQUALIZER is not set | 579 | # CONFIG_EQUALIZER is not set |
600 | # CONFIG_TUN is not set | 580 | # CONFIG_TUN is not set |
581 | # CONFIG_VETH is not set | ||
601 | CONFIG_PHYLIB=y | 582 | CONFIG_PHYLIB=y |
602 | 583 | ||
603 | # | 584 | # |
@@ -611,21 +592,24 @@ CONFIG_PHYLIB=y | |||
611 | # CONFIG_VITESSE_PHY is not set | 592 | # CONFIG_VITESSE_PHY is not set |
612 | # CONFIG_SMSC_PHY is not set | 593 | # CONFIG_SMSC_PHY is not set |
613 | # CONFIG_BROADCOM_PHY is not set | 594 | # CONFIG_BROADCOM_PHY is not set |
595 | # CONFIG_ICPLUS_PHY is not set | ||
614 | # CONFIG_FIXED_PHY is not set | 596 | # CONFIG_FIXED_PHY is not set |
615 | 597 | # CONFIG_MDIO_BITBANG is not set | |
616 | # | ||
617 | # Ethernet (10 or 100Mbit) | ||
618 | # | ||
619 | CONFIG_NET_ETHERNET=y | 598 | CONFIG_NET_ETHERNET=y |
620 | CONFIG_MII=y | 599 | CONFIG_MII=y |
621 | # CONFIG_SMC91X is not set | ||
622 | CONFIG_BFIN_MAC=y | 600 | CONFIG_BFIN_MAC=y |
623 | CONFIG_BFIN_MAC_USE_L1=y | 601 | CONFIG_BFIN_MAC_USE_L1=y |
624 | CONFIG_BFIN_TX_DESC_NUM=10 | 602 | CONFIG_BFIN_TX_DESC_NUM=10 |
625 | CONFIG_BFIN_RX_DESC_NUM=20 | 603 | CONFIG_BFIN_RX_DESC_NUM=20 |
626 | CONFIG_BFIN_MAC_RMII=y | 604 | CONFIG_BFIN_MAC_RMII=y |
605 | # CONFIG_SMC91X is not set | ||
627 | # CONFIG_SMSC911X is not set | 606 | # CONFIG_SMSC911X is not set |
628 | # CONFIG_DM9000 is not set | 607 | # CONFIG_DM9000 is not set |
608 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
609 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
610 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
611 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
612 | # CONFIG_B44 is not set | ||
629 | CONFIG_NETDEV_1000=y | 613 | CONFIG_NETDEV_1000=y |
630 | # CONFIG_AX88180 is not set | 614 | # CONFIG_AX88180 is not set |
631 | CONFIG_NETDEV_10000=y | 615 | CONFIG_NETDEV_10000=y |
@@ -635,6 +619,15 @@ CONFIG_NETDEV_10000=y | |||
635 | # | 619 | # |
636 | # CONFIG_WLAN_PRE80211 is not set | 620 | # CONFIG_WLAN_PRE80211 is not set |
637 | # CONFIG_WLAN_80211 is not set | 621 | # CONFIG_WLAN_80211 is not set |
622 | |||
623 | # | ||
624 | # USB Network Adapters | ||
625 | # | ||
626 | # CONFIG_USB_CATC is not set | ||
627 | # CONFIG_USB_KAWETH is not set | ||
628 | # CONFIG_USB_PEGASUS is not set | ||
629 | # CONFIG_USB_RTL8150 is not set | ||
630 | # CONFIG_USB_USBNET is not set | ||
638 | # CONFIG_WAN is not set | 631 | # CONFIG_WAN is not set |
639 | # CONFIG_PPP is not set | 632 | # CONFIG_PPP is not set |
640 | # CONFIG_SLIP is not set | 633 | # CONFIG_SLIP is not set |
@@ -642,15 +635,7 @@ CONFIG_NETDEV_10000=y | |||
642 | # CONFIG_NETCONSOLE is not set | 635 | # CONFIG_NETCONSOLE is not set |
643 | # CONFIG_NETPOLL is not set | 636 | # CONFIG_NETPOLL is not set |
644 | # CONFIG_NET_POLL_CONTROLLER is not set | 637 | # CONFIG_NET_POLL_CONTROLLER is not set |
645 | |||
646 | # | ||
647 | # ISDN subsystem | ||
648 | # | ||
649 | # CONFIG_ISDN is not set | 638 | # CONFIG_ISDN is not set |
650 | |||
651 | # | ||
652 | # Telephony Support | ||
653 | # | ||
654 | # CONFIG_PHONE is not set | 639 | # CONFIG_PHONE is not set |
655 | 640 | ||
656 | # | 641 | # |
@@ -665,7 +650,6 @@ CONFIG_INPUT=y | |||
665 | # | 650 | # |
666 | # CONFIG_INPUT_MOUSEDEV is not set | 651 | # CONFIG_INPUT_MOUSEDEV is not set |
667 | # CONFIG_INPUT_JOYDEV is not set | 652 | # CONFIG_INPUT_JOYDEV is not set |
668 | # CONFIG_INPUT_TSDEV is not set | ||
669 | # CONFIG_INPUT_EVDEV is not set | 653 | # CONFIG_INPUT_EVDEV is not set |
670 | # CONFIG_INPUT_EVBUG is not set | 654 | # CONFIG_INPUT_EVBUG is not set |
671 | 655 | ||
@@ -697,7 +681,6 @@ CONFIG_INPUT_MISC=y | |||
697 | # | 681 | # |
698 | # CONFIG_AD9960 is not set | 682 | # CONFIG_AD9960 is not set |
699 | # CONFIG_SPI_ADC_BF533 is not set | 683 | # CONFIG_SPI_ADC_BF533 is not set |
700 | # CONFIG_BF5xx_PFLAGS is not set | ||
701 | # CONFIG_BF5xx_PPIFCD is not set | 684 | # CONFIG_BF5xx_PPIFCD is not set |
702 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 685 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
703 | # CONFIG_BF5xx_PPI is not set | 686 | # CONFIG_BF5xx_PPI is not set |
@@ -706,7 +689,7 @@ CONFIG_BFIN_OTP=y | |||
706 | # CONFIG_BFIN_SPORT is not set | 689 | # CONFIG_BFIN_SPORT is not set |
707 | # CONFIG_BFIN_TIMER_LATENCY is not set | 690 | # CONFIG_BFIN_TIMER_LATENCY is not set |
708 | # CONFIG_TWI_LCD is not set | 691 | # CONFIG_TWI_LCD is not set |
709 | # CONFIG_AD5304 is not set | 692 | # CONFIG_SIMPLE_GPIO is not set |
710 | # CONFIG_VT is not set | 693 | # CONFIG_VT is not set |
711 | # CONFIG_SERIAL_NONSTANDARD is not set | 694 | # CONFIG_SERIAL_NONSTANDARD is not set |
712 | 695 | ||
@@ -735,27 +718,11 @@ CONFIG_UNIX98_PTYS=y | |||
735 | # CAN, the car bus and industrial fieldbus | 718 | # CAN, the car bus and industrial fieldbus |
736 | # | 719 | # |
737 | # CONFIG_CAN4LINUX is not set | 720 | # CONFIG_CAN4LINUX is not set |
738 | |||
739 | # | ||
740 | # IPMI | ||
741 | # | ||
742 | # CONFIG_IPMI_HANDLER is not set | 721 | # CONFIG_IPMI_HANDLER is not set |
743 | CONFIG_WATCHDOG=y | ||
744 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
745 | |||
746 | # | ||
747 | # Watchdog Device Drivers | ||
748 | # | ||
749 | # CONFIG_SOFT_WATCHDOG is not set | ||
750 | CONFIG_BFIN_WDT=y | ||
751 | CONFIG_HW_RANDOM=y | 722 | CONFIG_HW_RANDOM=y |
752 | # CONFIG_GEN_RTC is not set | 723 | # CONFIG_GEN_RTC is not set |
753 | # CONFIG_R3964 is not set | 724 | # CONFIG_R3964 is not set |
754 | # CONFIG_RAW_DRIVER is not set | 725 | # CONFIG_RAW_DRIVER is not set |
755 | |||
756 | # | ||
757 | # TPM devices | ||
758 | # | ||
759 | # CONFIG_TCG_TPM is not set | 726 | # CONFIG_TCG_TPM is not set |
760 | CONFIG_I2C=y | 727 | CONFIG_I2C=y |
761 | CONFIG_I2C_BOARDINFO=y | 728 | CONFIG_I2C_BOARDINFO=y |
@@ -777,21 +744,24 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | |||
777 | # CONFIG_I2C_OCORES is not set | 744 | # CONFIG_I2C_OCORES is not set |
778 | # CONFIG_I2C_PARPORT_LIGHT is not set | 745 | # CONFIG_I2C_PARPORT_LIGHT is not set |
779 | # CONFIG_I2C_SIMTEC is not set | 746 | # CONFIG_I2C_SIMTEC is not set |
747 | # CONFIG_I2C_TAOS_EVM is not set | ||
780 | # CONFIG_I2C_STUB is not set | 748 | # CONFIG_I2C_STUB is not set |
749 | # CONFIG_I2C_TINY_USB is not set | ||
781 | 750 | ||
782 | # | 751 | # |
783 | # Miscellaneous I2C Chip support | 752 | # Miscellaneous I2C Chip support |
784 | # | 753 | # |
785 | # CONFIG_SENSORS_DS1337 is not set | 754 | # CONFIG_SENSORS_DS1337 is not set |
786 | # CONFIG_SENSORS_DS1374 is not set | 755 | # CONFIG_SENSORS_DS1374 is not set |
756 | # CONFIG_DS1682 is not set | ||
787 | # CONFIG_SENSORS_AD5252 is not set | 757 | # CONFIG_SENSORS_AD5252 is not set |
788 | # CONFIG_SENSORS_EEPROM is not set | 758 | # CONFIG_SENSORS_EEPROM is not set |
789 | # CONFIG_SENSORS_PCF8574 is not set | 759 | # CONFIG_SENSORS_PCF8574 is not set |
790 | # CONFIG_SENSORS_PCF8575 is not set | 760 | # CONFIG_SENSORS_PCF8575 is not set |
791 | # CONFIG_SENSORS_PCA9543 is not set | ||
792 | # CONFIG_SENSORS_PCA9539 is not set | 761 | # CONFIG_SENSORS_PCA9539 is not set |
793 | # CONFIG_SENSORS_PCF8591 is not set | 762 | # CONFIG_SENSORS_PCF8591 is not set |
794 | # CONFIG_SENSORS_MAX6875 is not set | 763 | # CONFIG_SENSORS_MAX6875 is not set |
764 | # CONFIG_SENSORS_TSL2550 is not set | ||
795 | # CONFIG_I2C_DEBUG_CORE is not set | 765 | # CONFIG_I2C_DEBUG_CORE is not set |
796 | # CONFIG_I2C_DEBUG_ALGO is not set | 766 | # CONFIG_I2C_DEBUG_ALGO is not set |
797 | # CONFIG_I2C_DEBUG_BUS is not set | 767 | # CONFIG_I2C_DEBUG_BUS is not set |
@@ -814,14 +784,11 @@ CONFIG_SPI_BFIN=y | |||
814 | # | 784 | # |
815 | # CONFIG_SPI_AT25 is not set | 785 | # CONFIG_SPI_AT25 is not set |
816 | # CONFIG_SPI_SPIDEV is not set | 786 | # CONFIG_SPI_SPIDEV is not set |
817 | 787 | # CONFIG_SPI_TLE62X0 is not set | |
818 | # | ||
819 | # Dallas's 1-wire bus | ||
820 | # | ||
821 | # CONFIG_W1 is not set | 788 | # CONFIG_W1 is not set |
789 | # CONFIG_POWER_SUPPLY is not set | ||
822 | CONFIG_HWMON=y | 790 | CONFIG_HWMON=y |
823 | # CONFIG_HWMON_VID is not set | 791 | # CONFIG_HWMON_VID is not set |
824 | # CONFIG_SENSORS_ABITUGURU is not set | ||
825 | # CONFIG_SENSORS_AD7418 is not set | 792 | # CONFIG_SENSORS_AD7418 is not set |
826 | # CONFIG_SENSORS_ADM1021 is not set | 793 | # CONFIG_SENSORS_ADM1021 is not set |
827 | # CONFIG_SENSORS_ADM1025 is not set | 794 | # CONFIG_SENSORS_ADM1025 is not set |
@@ -829,12 +796,12 @@ CONFIG_HWMON=y | |||
829 | # CONFIG_SENSORS_ADM1029 is not set | 796 | # CONFIG_SENSORS_ADM1029 is not set |
830 | # CONFIG_SENSORS_ADM1031 is not set | 797 | # CONFIG_SENSORS_ADM1031 is not set |
831 | # CONFIG_SENSORS_ADM9240 is not set | 798 | # CONFIG_SENSORS_ADM9240 is not set |
832 | # CONFIG_SENSORS_ASB100 is not set | 799 | # CONFIG_SENSORS_ADT7470 is not set |
833 | # CONFIG_SENSORS_ATXP1 is not set | 800 | # CONFIG_SENSORS_ATXP1 is not set |
834 | # CONFIG_SENSORS_DS1621 is not set | 801 | # CONFIG_SENSORS_DS1621 is not set |
835 | # CONFIG_SENSORS_F71805F is not set | 802 | # CONFIG_SENSORS_F71805F is not set |
836 | # CONFIG_SENSORS_FSCHER is not set | 803 | # CONFIG_SENSORS_F71882FG is not set |
837 | # CONFIG_SENSORS_FSCPOS is not set | 804 | # CONFIG_SENSORS_F75375S is not set |
838 | # CONFIG_SENSORS_GL518SM is not set | 805 | # CONFIG_SENSORS_GL518SM is not set |
839 | # CONFIG_SENSORS_GL520SM is not set | 806 | # CONFIG_SENSORS_GL520SM is not set |
840 | # CONFIG_SENSORS_IT87 is not set | 807 | # CONFIG_SENSORS_IT87 is not set |
@@ -849,13 +816,16 @@ CONFIG_HWMON=y | |||
849 | # CONFIG_SENSORS_LM87 is not set | 816 | # CONFIG_SENSORS_LM87 is not set |
850 | # CONFIG_SENSORS_LM90 is not set | 817 | # CONFIG_SENSORS_LM90 is not set |
851 | # CONFIG_SENSORS_LM92 is not set | 818 | # CONFIG_SENSORS_LM92 is not set |
819 | # CONFIG_SENSORS_LM93 is not set | ||
852 | # CONFIG_SENSORS_MAX1619 is not set | 820 | # CONFIG_SENSORS_MAX1619 is not set |
853 | # CONFIG_SENSORS_MAX6650 is not set | 821 | # CONFIG_SENSORS_MAX6650 is not set |
854 | # CONFIG_SENSORS_PC87360 is not set | 822 | # CONFIG_SENSORS_PC87360 is not set |
855 | # CONFIG_SENSORS_PC87427 is not set | 823 | # CONFIG_SENSORS_PC87427 is not set |
824 | # CONFIG_SENSORS_DME1737 is not set | ||
856 | # CONFIG_SENSORS_SMSC47M1 is not set | 825 | # CONFIG_SENSORS_SMSC47M1 is not set |
857 | # CONFIG_SENSORS_SMSC47M192 is not set | 826 | # CONFIG_SENSORS_SMSC47M192 is not set |
858 | # CONFIG_SENSORS_SMSC47B397 is not set | 827 | # CONFIG_SENSORS_SMSC47B397 is not set |
828 | # CONFIG_SENSORS_THMC50 is not set | ||
859 | # CONFIG_SENSORS_VT1211 is not set | 829 | # CONFIG_SENSORS_VT1211 is not set |
860 | # CONFIG_SENSORS_W83781D is not set | 830 | # CONFIG_SENSORS_W83781D is not set |
861 | # CONFIG_SENSORS_W83791D is not set | 831 | # CONFIG_SENSORS_W83791D is not set |
@@ -865,6 +835,25 @@ CONFIG_HWMON=y | |||
865 | # CONFIG_SENSORS_W83627HF is not set | 835 | # CONFIG_SENSORS_W83627HF is not set |
866 | # CONFIG_SENSORS_W83627EHF is not set | 836 | # CONFIG_SENSORS_W83627EHF is not set |
867 | # CONFIG_HWMON_DEBUG_CHIP is not set | 837 | # CONFIG_HWMON_DEBUG_CHIP is not set |
838 | CONFIG_WATCHDOG=y | ||
839 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
840 | |||
841 | # | ||
842 | # Watchdog Device Drivers | ||
843 | # | ||
844 | # CONFIG_SOFT_WATCHDOG is not set | ||
845 | CONFIG_BFIN_WDT=y | ||
846 | |||
847 | # | ||
848 | # USB-based Watchdog Cards | ||
849 | # | ||
850 | # CONFIG_USBPCWATCHDOG is not set | ||
851 | |||
852 | # | ||
853 | # Sonics Silicon Backplane | ||
854 | # | ||
855 | CONFIG_SSB_POSSIBLE=y | ||
856 | # CONFIG_SSB is not set | ||
868 | 857 | ||
869 | # | 858 | # |
870 | # Multifunction device drivers | 859 | # Multifunction device drivers |
@@ -881,72 +870,133 @@ CONFIG_HWMON=y | |||
881 | # | 870 | # |
882 | # Graphics support | 871 | # Graphics support |
883 | # | 872 | # |
873 | # CONFIG_VGASTATE is not set | ||
874 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
875 | # CONFIG_FB is not set | ||
884 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 876 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
885 | 877 | ||
886 | # | 878 | # |
887 | # Display device support | 879 | # Display device support |
888 | # | 880 | # |
889 | # CONFIG_DISPLAY_SUPPORT is not set | 881 | # CONFIG_DISPLAY_SUPPORT is not set |
890 | # CONFIG_VGASTATE is not set | ||
891 | # CONFIG_FB is not set | ||
892 | 882 | ||
893 | # | 883 | # |
894 | # Sound | 884 | # Sound |
895 | # | 885 | # |
896 | # CONFIG_SOUND is not set | 886 | # CONFIG_SOUND is not set |
897 | 887 | CONFIG_HID_SUPPORT=y | |
898 | # | ||
899 | # HID Devices | ||
900 | # | ||
901 | CONFIG_HID=y | 888 | CONFIG_HID=y |
902 | # CONFIG_HID_DEBUG is not set | 889 | # CONFIG_HID_DEBUG is not set |
890 | # CONFIG_HIDRAW is not set | ||
903 | 891 | ||
904 | # | 892 | # |
905 | # USB support | 893 | # USB Input Devices |
906 | # | 894 | # |
895 | CONFIG_USB_HID=y | ||
896 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
897 | # CONFIG_HID_FF is not set | ||
898 | # CONFIG_USB_HIDDEV is not set | ||
899 | CONFIG_USB_SUPPORT=y | ||
907 | CONFIG_USB_ARCH_HAS_HCD=y | 900 | CONFIG_USB_ARCH_HAS_HCD=y |
908 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 901 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
909 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 902 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
910 | # CONFIG_USB is not set | 903 | CONFIG_USB=y |
904 | # CONFIG_USB_DEBUG is not set | ||
905 | |||
906 | # | ||
907 | # Miscellaneous USB options | ||
908 | # | ||
909 | # CONFIG_USB_DEVICEFS is not set | ||
910 | CONFIG_USB_DEVICE_CLASS=y | ||
911 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
912 | # CONFIG_USB_OTG is not set | ||
913 | # CONFIG_USB_OTG_WHITELIST is not set | ||
914 | CONFIG_USB_OTG_BLACKLIST_HUB=y | ||
915 | |||
916 | # | ||
917 | # USB Host Controller Drivers | ||
918 | # | ||
919 | # CONFIG_USB_ISP116X_HCD is not set | ||
920 | # CONFIG_USB_ISP1362_HCD is not set | ||
921 | # CONFIG_USB_ISP1760_HCD is not set | ||
922 | # CONFIG_USB_SL811_HCD is not set | ||
923 | # CONFIG_USB_R8A66597_HCD is not set | ||
924 | CONFIG_USB_MUSB_HDRC=y | ||
925 | CONFIG_USB_MUSB_SOC=y | ||
911 | 926 | ||
912 | # | 927 | # |
913 | # Enable Host or Gadget support to see Inventra options | 928 | # Blackfin high speed USB support |
914 | # | 929 | # |
930 | CONFIG_USB_MUSB_HOST=y | ||
931 | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
932 | # CONFIG_USB_MUSB_OTG is not set | ||
933 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
934 | CONFIG_MUSB_PIO_ONLY=y | ||
935 | CONFIG_USB_MUSB_LOGLEVEL=0 | ||
936 | |||
937 | # | ||
938 | # USB Device Class drivers | ||
939 | # | ||
940 | # CONFIG_USB_ACM is not set | ||
941 | # CONFIG_USB_PRINTER is not set | ||
915 | 942 | ||
916 | # | 943 | # |
917 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 944 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
918 | # | 945 | # |
919 | 946 | ||
920 | # | 947 | # |
921 | # USB Gadget Support | 948 | # may also be needed; see USB_STORAGE Help for more information |
922 | # | 949 | # |
923 | # CONFIG_USB_GADGET is not set | 950 | # CONFIG_USB_LIBUSUAL is not set |
924 | # CONFIG_MMC is not set | ||
925 | 951 | ||
926 | # | 952 | # |
927 | # LED devices | 953 | # USB Imaging devices |
928 | # | 954 | # |
929 | # CONFIG_NEW_LEDS is not set | 955 | # CONFIG_USB_MDC800 is not set |
956 | CONFIG_USB_MON=y | ||
930 | 957 | ||
931 | # | 958 | # |
932 | # LED drivers | 959 | # USB port drivers |
933 | # | 960 | # |
934 | 961 | ||
935 | # | 962 | # |
936 | # LED Triggers | 963 | # USB Serial Converter support |
937 | # | 964 | # |
965 | # CONFIG_USB_SERIAL is not set | ||
938 | 966 | ||
939 | # | 967 | # |
940 | # InfiniBand support | 968 | # USB Miscellaneous drivers |
941 | # | 969 | # |
970 | # CONFIG_USB_EMI62 is not set | ||
971 | # CONFIG_USB_EMI26 is not set | ||
972 | # CONFIG_USB_ADUTUX is not set | ||
973 | # CONFIG_USB_AUERSWALD is not set | ||
974 | # CONFIG_USB_RIO500 is not set | ||
975 | # CONFIG_USB_LEGOTOWER is not set | ||
976 | # CONFIG_USB_LCD is not set | ||
977 | # CONFIG_USB_BERRY_CHARGE is not set | ||
978 | # CONFIG_USB_LED is not set | ||
979 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
980 | # CONFIG_USB_CYTHERM is not set | ||
981 | # CONFIG_USB_PHIDGET is not set | ||
982 | # CONFIG_USB_IDMOUSE is not set | ||
983 | # CONFIG_USB_FTDI_ELAN is not set | ||
984 | # CONFIG_USB_APPLEDISPLAY is not set | ||
985 | # CONFIG_USB_SISUSBVGA is not set | ||
986 | # CONFIG_USB_LD is not set | ||
987 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
988 | # CONFIG_USB_IOWARRIOR is not set | ||
942 | 989 | ||
943 | # | 990 | # |
944 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | 991 | # USB DSL modem support |
945 | # | 992 | # |
946 | 993 | ||
947 | # | 994 | # |
948 | # Real Time Clock | 995 | # USB Gadget Support |
949 | # | 996 | # |
997 | # CONFIG_USB_GADGET is not set | ||
998 | # CONFIG_MMC is not set | ||
999 | # CONFIG_NEW_LEDS is not set | ||
950 | CONFIG_RTC_LIB=y | 1000 | CONFIG_RTC_LIB=y |
951 | CONFIG_RTC_CLASS=y | 1001 | CONFIG_RTC_CLASS=y |
952 | CONFIG_RTC_HCTOSYS=y | 1002 | CONFIG_RTC_HCTOSYS=y |
@@ -966,6 +1016,7 @@ CONFIG_RTC_INTF_DEV=y | |||
966 | # I2C RTC drivers | 1016 | # I2C RTC drivers |
967 | # | 1017 | # |
968 | # CONFIG_RTC_DRV_DS1307 is not set | 1018 | # CONFIG_RTC_DRV_DS1307 is not set |
1019 | # CONFIG_RTC_DRV_DS1374 is not set | ||
969 | # CONFIG_RTC_DRV_DS1672 is not set | 1020 | # CONFIG_RTC_DRV_DS1672 is not set |
970 | # CONFIG_RTC_DRV_MAX6900 is not set | 1021 | # CONFIG_RTC_DRV_MAX6900 is not set |
971 | # CONFIG_RTC_DRV_RS5C372 is not set | 1022 | # CONFIG_RTC_DRV_RS5C372 is not set |
@@ -973,6 +1024,7 @@ CONFIG_RTC_INTF_DEV=y | |||
973 | # CONFIG_RTC_DRV_X1205 is not set | 1024 | # CONFIG_RTC_DRV_X1205 is not set |
974 | # CONFIG_RTC_DRV_PCF8563 is not set | 1025 | # CONFIG_RTC_DRV_PCF8563 is not set |
975 | # CONFIG_RTC_DRV_PCF8583 is not set | 1026 | # CONFIG_RTC_DRV_PCF8583 is not set |
1027 | # CONFIG_RTC_DRV_M41T80 is not set | ||
976 | 1028 | ||
977 | # | 1029 | # |
978 | # SPI RTC drivers | 1030 | # SPI RTC drivers |
@@ -984,8 +1036,10 @@ CONFIG_RTC_INTF_DEV=y | |||
984 | # Platform RTC drivers | 1036 | # Platform RTC drivers |
985 | # | 1037 | # |
986 | # CONFIG_RTC_DRV_DS1553 is not set | 1038 | # CONFIG_RTC_DRV_DS1553 is not set |
1039 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
987 | # CONFIG_RTC_DRV_DS1742 is not set | 1040 | # CONFIG_RTC_DRV_DS1742 is not set |
988 | # CONFIG_RTC_DRV_M48T86 is not set | 1041 | # CONFIG_RTC_DRV_M48T86 is not set |
1042 | # CONFIG_RTC_DRV_M48T59 is not set | ||
989 | # CONFIG_RTC_DRV_V3020 is not set | 1043 | # CONFIG_RTC_DRV_V3020 is not set |
990 | 1044 | ||
991 | # | 1045 | # |
@@ -994,22 +1048,9 @@ CONFIG_RTC_INTF_DEV=y | |||
994 | CONFIG_RTC_DRV_BFIN=y | 1048 | CONFIG_RTC_DRV_BFIN=y |
995 | 1049 | ||
996 | # | 1050 | # |
997 | # DMA Engine support | 1051 | # Userspace I/O |
998 | # | ||
999 | # CONFIG_DMA_ENGINE is not set | ||
1000 | |||
1001 | # | ||
1002 | # DMA Clients | ||
1003 | # | 1052 | # |
1004 | 1053 | # CONFIG_UIO is not set | |
1005 | # | ||
1006 | # DMA Devices | ||
1007 | # | ||
1008 | |||
1009 | # | ||
1010 | # PBX support | ||
1011 | # | ||
1012 | # CONFIG_PBX is not set | ||
1013 | 1054 | ||
1014 | # | 1055 | # |
1015 | # File systems | 1056 | # File systems |
@@ -1054,7 +1095,6 @@ CONFIG_PROC_SYSCTL=y | |||
1054 | CONFIG_SYSFS=y | 1095 | CONFIG_SYSFS=y |
1055 | # CONFIG_TMPFS is not set | 1096 | # CONFIG_TMPFS is not set |
1056 | # CONFIG_HUGETLB_PAGE is not set | 1097 | # CONFIG_HUGETLB_PAGE is not set |
1057 | CONFIG_RAMFS=y | ||
1058 | # CONFIG_CONFIGFS_FS is not set | 1098 | # CONFIG_CONFIGFS_FS is not set |
1059 | 1099 | ||
1060 | # | 1100 | # |
@@ -1080,10 +1120,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
1080 | CONFIG_JFFS2_FS=m | 1120 | CONFIG_JFFS2_FS=m |
1081 | CONFIG_JFFS2_FS_DEBUG=0 | 1121 | CONFIG_JFFS2_FS_DEBUG=0 |
1082 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 1122 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
1123 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1083 | # CONFIG_JFFS2_SUMMARY is not set | 1124 | # CONFIG_JFFS2_SUMMARY is not set |
1084 | # CONFIG_JFFS2_FS_XATTR is not set | 1125 | # CONFIG_JFFS2_FS_XATTR is not set |
1085 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 1126 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
1086 | CONFIG_JFFS2_ZLIB=y | 1127 | CONFIG_JFFS2_ZLIB=y |
1128 | # CONFIG_JFFS2_LZO is not set | ||
1087 | CONFIG_JFFS2_RTIME=y | 1129 | CONFIG_JFFS2_RTIME=y |
1088 | # CONFIG_JFFS2_RUBIN is not set | 1130 | # CONFIG_JFFS2_RUBIN is not set |
1089 | # CONFIG_CRAMFS is not set | 1131 | # CONFIG_CRAMFS is not set |
@@ -1092,10 +1134,7 @@ CONFIG_JFFS2_RTIME=y | |||
1092 | # CONFIG_QNX4FS_FS is not set | 1134 | # CONFIG_QNX4FS_FS is not set |
1093 | # CONFIG_SYSV_FS is not set | 1135 | # CONFIG_SYSV_FS is not set |
1094 | # CONFIG_UFS_FS is not set | 1136 | # CONFIG_UFS_FS is not set |
1095 | 1137 | CONFIG_NETWORK_FILESYSTEMS=y | |
1096 | # | ||
1097 | # Network File Systems | ||
1098 | # | ||
1099 | CONFIG_NFS_FS=m | 1138 | CONFIG_NFS_FS=m |
1100 | CONFIG_NFS_V3=y | 1139 | CONFIG_NFS_V3=y |
1101 | # CONFIG_NFS_V3_ACL is not set | 1140 | # CONFIG_NFS_V3_ACL is not set |
@@ -1115,17 +1154,12 @@ CONFIG_SMB_FS=m | |||
1115 | # CONFIG_NCP_FS is not set | 1154 | # CONFIG_NCP_FS is not set |
1116 | # CONFIG_CODA_FS is not set | 1155 | # CONFIG_CODA_FS is not set |
1117 | # CONFIG_AFS_FS is not set | 1156 | # CONFIG_AFS_FS is not set |
1118 | # CONFIG_9P_FS is not set | ||
1119 | 1157 | ||
1120 | # | 1158 | # |
1121 | # Partition Types | 1159 | # Partition Types |
1122 | # | 1160 | # |
1123 | # CONFIG_PARTITION_ADVANCED is not set | 1161 | # CONFIG_PARTITION_ADVANCED is not set |
1124 | CONFIG_MSDOS_PARTITION=y | 1162 | CONFIG_MSDOS_PARTITION=y |
1125 | |||
1126 | # | ||
1127 | # Native Language Support | ||
1128 | # | ||
1129 | CONFIG_NLS=m | 1163 | CONFIG_NLS=m |
1130 | CONFIG_NLS_DEFAULT="iso8859-1" | 1164 | CONFIG_NLS_DEFAULT="iso8859-1" |
1131 | # CONFIG_NLS_CODEPAGE_437 is not set | 1165 | # CONFIG_NLS_CODEPAGE_437 is not set |
@@ -1166,21 +1200,16 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1166 | # CONFIG_NLS_KOI8_R is not set | 1200 | # CONFIG_NLS_KOI8_R is not set |
1167 | # CONFIG_NLS_KOI8_U is not set | 1201 | # CONFIG_NLS_KOI8_U is not set |
1168 | # CONFIG_NLS_UTF8 is not set | 1202 | # CONFIG_NLS_UTF8 is not set |
1169 | |||
1170 | # | ||
1171 | # Distributed Lock Manager | ||
1172 | # | ||
1173 | # CONFIG_DLM is not set | 1203 | # CONFIG_DLM is not set |
1174 | 1204 | CONFIG_INSTRUMENTATION=y | |
1175 | # | ||
1176 | # Profiling support | ||
1177 | # | ||
1178 | # CONFIG_PROFILING is not set | 1205 | # CONFIG_PROFILING is not set |
1206 | # CONFIG_MARKERS is not set | ||
1179 | 1207 | ||
1180 | # | 1208 | # |
1181 | # Kernel hacking | 1209 | # Kernel hacking |
1182 | # | 1210 | # |
1183 | # CONFIG_PRINTK_TIME is not set | 1211 | # CONFIG_PRINTK_TIME is not set |
1212 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1184 | CONFIG_ENABLE_MUST_CHECK=y | 1213 | CONFIG_ENABLE_MUST_CHECK=y |
1185 | # CONFIG_MAGIC_SYSRQ is not set | 1214 | # CONFIG_MAGIC_SYSRQ is not set |
1186 | # CONFIG_UNUSED_SYMBOLS is not set | 1215 | # CONFIG_UNUSED_SYMBOLS is not set |
@@ -1188,6 +1217,7 @@ CONFIG_DEBUG_FS=y | |||
1188 | # CONFIG_HEADERS_CHECK is not set | 1217 | # CONFIG_HEADERS_CHECK is not set |
1189 | # CONFIG_DEBUG_KERNEL is not set | 1218 | # CONFIG_DEBUG_KERNEL is not set |
1190 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1219 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1220 | # CONFIG_SAMPLES is not set | ||
1191 | CONFIG_DEBUG_MMRS=y | 1221 | CONFIG_DEBUG_MMRS=y |
1192 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1222 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
1193 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1223 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
@@ -1207,11 +1237,8 @@ CONFIG_ACCESS_CHECK=y | |||
1207 | # CONFIG_KEYS is not set | 1237 | # CONFIG_KEYS is not set |
1208 | CONFIG_SECURITY=y | 1238 | CONFIG_SECURITY=y |
1209 | # CONFIG_SECURITY_NETWORK is not set | 1239 | # CONFIG_SECURITY_NETWORK is not set |
1210 | CONFIG_SECURITY_CAPABILITIES=m | 1240 | # CONFIG_SECURITY_CAPABILITIES is not set |
1211 | 1241 | # CONFIG_SECURITY_ROOTPLUG is not set | |
1212 | # | ||
1213 | # Cryptographic options | ||
1214 | # | ||
1215 | # CONFIG_CRYPTO is not set | 1242 | # CONFIG_CRYPTO is not set |
1216 | 1243 | ||
1217 | # | 1244 | # |
@@ -1222,6 +1249,7 @@ CONFIG_CRC_CCITT=m | |||
1222 | # CONFIG_CRC16 is not set | 1249 | # CONFIG_CRC16 is not set |
1223 | # CONFIG_CRC_ITU_T is not set | 1250 | # CONFIG_CRC_ITU_T is not set |
1224 | CONFIG_CRC32=y | 1251 | CONFIG_CRC32=y |
1252 | # CONFIG_CRC7 is not set | ||
1225 | # CONFIG_LIBCRC32C is not set | 1253 | # CONFIG_LIBCRC32C is not set |
1226 | CONFIG_ZLIB_INFLATE=y | 1254 | CONFIG_ZLIB_INFLATE=y |
1227 | CONFIG_ZLIB_DEFLATE=m | 1255 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index 5bfdfb287d13..1ff2ff4b49aa 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.16 | 3 | # Linux kernel version: 2.6.24.7 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -13,35 +13,34 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
15 | CONFIG_GENERIC_IRQ_PROBE=y | 15 | CONFIG_GENERIC_IRQ_PROBE=y |
16 | CONFIG_GENERIC_TIME=y | ||
17 | CONFIG_GENERIC_GPIO=y | 16 | CONFIG_GENERIC_GPIO=y |
18 | CONFIG_FORCE_MAX_ZONEORDER=14 | 17 | CONFIG_FORCE_MAX_ZONEORDER=14 |
19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 18 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 19 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
21 | 20 | ||
22 | # | 21 | # |
23 | # Code maturity level options | 22 | # General setup |
24 | # | 23 | # |
25 | CONFIG_EXPERIMENTAL=y | 24 | CONFIG_EXPERIMENTAL=y |
26 | CONFIG_BROKEN_ON_SMP=y | 25 | CONFIG_BROKEN_ON_SMP=y |
27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 26 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
33 | CONFIG_LOCALVERSION_AUTO=y | 28 | CONFIG_LOCALVERSION_AUTO=y |
34 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
35 | # CONFIG_IPC_NS is not set | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | 30 | CONFIG_SYSVIPC_SYSCTL=y |
37 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
38 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
39 | # CONFIG_TASKSTATS is not set | 33 | # CONFIG_TASKSTATS is not set |
40 | # CONFIG_UTS_NS is not set | 34 | # CONFIG_USER_NS is not set |
35 | # CONFIG_PID_NS is not set | ||
41 | # CONFIG_AUDIT is not set | 36 | # CONFIG_AUDIT is not set |
42 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
43 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
44 | CONFIG_LOG_BUF_SHIFT=14 | 39 | CONFIG_LOG_BUF_SHIFT=14 |
40 | # CONFIG_CGROUPS is not set | ||
41 | CONFIG_FAIR_GROUP_SCHED=y | ||
42 | CONFIG_FAIR_USER_SCHED=y | ||
43 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
45 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_SYSFS_DEPRECATED=y |
46 | # CONFIG_RELAY is not set | 45 | # CONFIG_RELAY is not set |
47 | CONFIG_BLK_DEV_INITRD=y | 46 | CONFIG_BLK_DEV_INITRD=y |
@@ -64,32 +63,24 @@ CONFIG_EPOLL=y | |||
64 | CONFIG_SIGNALFD=y | 63 | CONFIG_SIGNALFD=y |
65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
66 | CONFIG_VM_EVENT_COUNTERS=y | 65 | CONFIG_VM_EVENT_COUNTERS=y |
67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
68 | # CONFIG_NP2 is not set | ||
69 | CONFIG_SLAB=y | 66 | CONFIG_SLAB=y |
70 | # CONFIG_SLUB is not set | 67 | # CONFIG_SLUB is not set |
71 | # CONFIG_SLOB is not set | 68 | # CONFIG_SLOB is not set |
69 | CONFIG_SLABINFO=y | ||
72 | CONFIG_RT_MUTEXES=y | 70 | CONFIG_RT_MUTEXES=y |
73 | CONFIG_TINY_SHMEM=y | 71 | CONFIG_TINY_SHMEM=y |
74 | CONFIG_BASE_SMALL=0 | 72 | CONFIG_BASE_SMALL=0 |
75 | |||
76 | # | ||
77 | # Loadable module support | ||
78 | # | ||
79 | CONFIG_MODULES=y | 73 | CONFIG_MODULES=y |
80 | CONFIG_MODULE_UNLOAD=y | 74 | CONFIG_MODULE_UNLOAD=y |
81 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 75 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
82 | # CONFIG_MODVERSIONS is not set | 76 | # CONFIG_MODVERSIONS is not set |
83 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 77 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
84 | CONFIG_KMOD=y | 78 | CONFIG_KMOD=y |
85 | |||
86 | # | ||
87 | # Block layer | ||
88 | # | ||
89 | CONFIG_BLOCK=y | 79 | CONFIG_BLOCK=y |
90 | # CONFIG_LBD is not set | 80 | # CONFIG_LBD is not set |
91 | # CONFIG_BLK_DEV_IO_TRACE is not set | 81 | # CONFIG_BLK_DEV_IO_TRACE is not set |
92 | # CONFIG_LSF is not set | 82 | # CONFIG_LSF is not set |
83 | # CONFIG_BLK_DEV_BSG is not set | ||
93 | 84 | ||
94 | # | 85 | # |
95 | # IO Schedulers | 86 | # IO Schedulers |
@@ -141,7 +132,6 @@ CONFIG_BF_REV_0_0=y | |||
141 | # CONFIG_BF_REV_ANY is not set | 132 | # CONFIG_BF_REV_ANY is not set |
142 | # CONFIG_BF_REV_NONE is not set | 133 | # CONFIG_BF_REV_NONE is not set |
143 | CONFIG_BF54x=y | 134 | CONFIG_BF54x=y |
144 | CONFIG_BFIN_SINGLE_CORE=y | ||
145 | CONFIG_IRQ_PLL_WAKEUP=7 | 135 | CONFIG_IRQ_PLL_WAKEUP=7 |
146 | CONFIG_IRQ_RTC=8 | 136 | CONFIG_IRQ_RTC=8 |
147 | CONFIG_IRQ_SPORT0_RX=9 | 137 | CONFIG_IRQ_SPORT0_RX=9 |
@@ -169,6 +159,7 @@ CONFIG_IRQ_TIMER8=11 | |||
169 | CONFIG_IRQ_TIMER9=11 | 159 | CONFIG_IRQ_TIMER9=11 |
170 | CONFIG_IRQ_TIMER10=11 | 160 | CONFIG_IRQ_TIMER10=11 |
171 | CONFIG_BFIN548_EZKIT=y | 161 | CONFIG_BFIN548_EZKIT=y |
162 | # CONFIG_BFIN548_BLUETECHNIX_CM is not set | ||
172 | 163 | ||
173 | # | 164 | # |
174 | # BF548 Specific Configuration | 165 | # BF548 Specific Configuration |
@@ -262,12 +253,14 @@ CONFIG_PINT3_ASSIGN=0x02020303 | |||
262 | # Board customizations | 253 | # Board customizations |
263 | # | 254 | # |
264 | # CONFIG_CMDLINE_BOOL is not set | 255 | # CONFIG_CMDLINE_BOOL is not set |
256 | CONFIG_BOOT_LOAD=0x1000 | ||
265 | 257 | ||
266 | # | 258 | # |
267 | # Clock/PLL Setup | 259 | # Clock/PLL Setup |
268 | # | 260 | # |
269 | CONFIG_CLKIN_HZ=25000000 | 261 | CONFIG_CLKIN_HZ=25000000 |
270 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 262 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
263 | CONFIG_MAX_MEM_SIZE=512 | ||
271 | CONFIG_MAX_VCO_HZ=600000000 | 264 | CONFIG_MAX_VCO_HZ=600000000 |
272 | CONFIG_MIN_VCO_HZ=50000000 | 265 | CONFIG_MIN_VCO_HZ=50000000 |
273 | CONFIG_MAX_SCLK_HZ=133333333 | 266 | CONFIG_MAX_SCLK_HZ=133333333 |
@@ -281,14 +274,17 @@ CONFIG_HZ_250=y | |||
281 | # CONFIG_HZ_300 is not set | 274 | # CONFIG_HZ_300 is not set |
282 | # CONFIG_HZ_1000 is not set | 275 | # CONFIG_HZ_1000 is not set |
283 | CONFIG_HZ=250 | 276 | CONFIG_HZ=250 |
277 | CONFIG_GENERIC_TIME=y | ||
278 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
279 | # CONFIG_CYCLES_CLOCKSOURCE is not set | ||
280 | # CONFIG_TICK_ONESHOT is not set | ||
281 | # CONFIG_NO_HZ is not set | ||
282 | # CONFIG_HIGH_RES_TIMERS is not set | ||
283 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
284 | 284 | ||
285 | # | 285 | # |
286 | # Memory Setup | 286 | # Misc |
287 | # | 287 | # |
288 | CONFIG_MAX_MEM_SIZE=512 | ||
289 | # CONFIG_MEM_MT46V32M16_6T is not set | ||
290 | CONFIG_MEM_MT46V32M16_5B=y | ||
291 | CONFIG_BOOT_LOAD=0x1000 | ||
292 | CONFIG_BFIN_SCRATCH_REG_RETN=y | 288 | CONFIG_BFIN_SCRATCH_REG_RETN=y |
293 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | 289 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set |
294 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | 290 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set |
@@ -324,12 +320,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
324 | CONFIG_FLATMEM=y | 320 | CONFIG_FLATMEM=y |
325 | CONFIG_FLAT_NODE_MEM_MAP=y | 321 | CONFIG_FLAT_NODE_MEM_MAP=y |
326 | # CONFIG_SPARSEMEM_STATIC is not set | 322 | # CONFIG_SPARSEMEM_STATIC is not set |
323 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
327 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 324 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
328 | # CONFIG_RESOURCES_64BIT is not set | 325 | # CONFIG_RESOURCES_64BIT is not set |
329 | CONFIG_ZONE_DMA_FLAG=1 | 326 | CONFIG_ZONE_DMA_FLAG=1 |
330 | CONFIG_LARGE_ALLOCS=y | 327 | CONFIG_VIRT_TO_BUS=y |
331 | # CONFIG_BFIN_GPTIMERS is not set | 328 | # CONFIG_BFIN_GPTIMERS is not set |
332 | CONFIG_BFIN_DMA_5XX=y | 329 | CONFIG_BFIN_DMA_5XX=y |
330 | # CONFIG_DMA_UNCACHED_4M is not set | ||
333 | CONFIG_DMA_UNCACHED_2M=y | 331 | CONFIG_DMA_UNCACHED_2M=y |
334 | # CONFIG_DMA_UNCACHED_1M is not set | 332 | # CONFIG_DMA_UNCACHED_1M is not set |
335 | # CONFIG_DMA_UNCACHED_NONE is not set | 333 | # CONFIG_DMA_UNCACHED_NONE is not set |
@@ -377,10 +375,6 @@ CONFIG_EBIU_FCTLVAL=0x6 | |||
377 | # | 375 | # |
378 | # CONFIG_PCI is not set | 376 | # CONFIG_PCI is not set |
379 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 377 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
380 | |||
381 | # | ||
382 | # PCCARD (PCMCIA/CardBus) support | ||
383 | # | ||
384 | # CONFIG_PCCARD is not set | 378 | # CONFIG_PCCARD is not set |
385 | 379 | ||
386 | # | 380 | # |
@@ -396,6 +390,7 @@ CONFIG_BINFMT_ZFLAT=y | |||
396 | # Power management options | 390 | # Power management options |
397 | # | 391 | # |
398 | # CONFIG_PM is not set | 392 | # CONFIG_PM is not set |
393 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
399 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 394 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
400 | 395 | ||
401 | # | 396 | # |
@@ -439,6 +434,7 @@ CONFIG_SYN_COOKIES=y | |||
439 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 434 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
440 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 435 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
441 | CONFIG_INET_XFRM_MODE_BEET=y | 436 | CONFIG_INET_XFRM_MODE_BEET=y |
437 | # CONFIG_INET_LRO is not set | ||
442 | CONFIG_INET_DIAG=y | 438 | CONFIG_INET_DIAG=y |
443 | CONFIG_INET_TCP_DIAG=y | 439 | CONFIG_INET_TCP_DIAG=y |
444 | # CONFIG_TCP_CONG_ADVANCED is not set | 440 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -465,10 +461,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
465 | # CONFIG_LAPB is not set | 461 | # CONFIG_LAPB is not set |
466 | # CONFIG_ECONET is not set | 462 | # CONFIG_ECONET is not set |
467 | # CONFIG_WAN_ROUTER is not set | 463 | # CONFIG_WAN_ROUTER is not set |
468 | |||
469 | # | ||
470 | # QoS and/or fair queueing | ||
471 | # | ||
472 | # CONFIG_NET_SCHED is not set | 464 | # CONFIG_NET_SCHED is not set |
473 | 465 | ||
474 | # | 466 | # |
@@ -488,6 +480,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
488 | # CONFIG_MAC80211 is not set | 480 | # CONFIG_MAC80211 is not set |
489 | # CONFIG_IEEE80211 is not set | 481 | # CONFIG_IEEE80211 is not set |
490 | # CONFIG_RFKILL is not set | 482 | # CONFIG_RFKILL is not set |
483 | # CONFIG_NET_9P is not set | ||
491 | 484 | ||
492 | # | 485 | # |
493 | # Device Drivers | 486 | # Device Drivers |
@@ -496,14 +489,11 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
496 | # | 489 | # |
497 | # Generic Driver Options | 490 | # Generic Driver Options |
498 | # | 491 | # |
492 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
499 | CONFIG_STANDALONE=y | 493 | CONFIG_STANDALONE=y |
500 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 494 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
501 | # CONFIG_FW_LOADER is not set | 495 | # CONFIG_FW_LOADER is not set |
502 | # CONFIG_SYS_HYPERVISOR is not set | 496 | # CONFIG_SYS_HYPERVISOR is not set |
503 | |||
504 | # | ||
505 | # Connector - unified userspace <-> kernelspace linker | ||
506 | # | ||
507 | # CONFIG_CONNECTOR is not set | 497 | # CONFIG_CONNECTOR is not set |
508 | CONFIG_MTD=y | 498 | CONFIG_MTD=y |
509 | # CONFIG_MTD_DEBUG is not set | 499 | # CONFIG_MTD_DEBUG is not set |
@@ -523,6 +513,7 @@ CONFIG_MTD_BLOCK=y | |||
523 | # CONFIG_INFTL is not set | 513 | # CONFIG_INFTL is not set |
524 | # CONFIG_RFD_FTL is not set | 514 | # CONFIG_RFD_FTL is not set |
525 | # CONFIG_SSFDC is not set | 515 | # CONFIG_SSFDC is not set |
516 | # CONFIG_MTD_OOPS is not set | ||
526 | 517 | ||
527 | # | 518 | # |
528 | # RAM/ROM/Flash chip drivers | 519 | # RAM/ROM/Flash chip drivers |
@@ -587,39 +578,27 @@ CONFIG_MTD_NAND_BF5XX_HWECC=y | |||
587 | # CONFIG_MTD_NAND_DISKONCHIP is not set | 578 | # CONFIG_MTD_NAND_DISKONCHIP is not set |
588 | # CONFIG_MTD_NAND_NANDSIM is not set | 579 | # CONFIG_MTD_NAND_NANDSIM is not set |
589 | # CONFIG_MTD_NAND_PLATFORM is not set | 580 | # CONFIG_MTD_NAND_PLATFORM is not set |
581 | # CONFIG_MTD_ALAUDA is not set | ||
590 | # CONFIG_MTD_ONENAND is not set | 582 | # CONFIG_MTD_ONENAND is not set |
591 | 583 | ||
592 | # | 584 | # |
593 | # UBI - Unsorted block images | 585 | # UBI - Unsorted block images |
594 | # | 586 | # |
595 | # CONFIG_MTD_UBI is not set | 587 | # CONFIG_MTD_UBI is not set |
596 | |||
597 | # | ||
598 | # Parallel port support | ||
599 | # | ||
600 | # CONFIG_PARPORT is not set | 588 | # CONFIG_PARPORT is not set |
601 | 589 | CONFIG_BLK_DEV=y | |
602 | # | ||
603 | # Plug and Play support | ||
604 | # | ||
605 | # CONFIG_PNPACPI is not set | ||
606 | |||
607 | # | ||
608 | # Block devices | ||
609 | # | ||
610 | # CONFIG_BLK_DEV_COW_COMMON is not set | 590 | # CONFIG_BLK_DEV_COW_COMMON is not set |
611 | # CONFIG_BLK_DEV_LOOP is not set | 591 | # CONFIG_BLK_DEV_LOOP is not set |
612 | # CONFIG_BLK_DEV_NBD is not set | 592 | # CONFIG_BLK_DEV_NBD is not set |
593 | # CONFIG_BLK_DEV_UB is not set | ||
613 | CONFIG_BLK_DEV_RAM=y | 594 | CONFIG_BLK_DEV_RAM=y |
614 | CONFIG_BLK_DEV_RAM_COUNT=16 | 595 | CONFIG_BLK_DEV_RAM_COUNT=16 |
615 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 596 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
616 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 597 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
617 | # CONFIG_CDROM_PKTCDVD is not set | 598 | # CONFIG_CDROM_PKTCDVD is not set |
618 | # CONFIG_ATA_OVER_ETH is not set | 599 | # CONFIG_ATA_OVER_ETH is not set |
619 | 600 | CONFIG_MISC_DEVICES=y | |
620 | # | 601 | # CONFIG_EEPROM_93CX6 is not set |
621 | # Misc devices | ||
622 | # | ||
623 | # CONFIG_IDE is not set | 602 | # CONFIG_IDE is not set |
624 | 603 | ||
625 | # | 604 | # |
@@ -627,6 +606,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
627 | # | 606 | # |
628 | # CONFIG_RAID_ATTRS is not set | 607 | # CONFIG_RAID_ATTRS is not set |
629 | CONFIG_SCSI=y | 608 | CONFIG_SCSI=y |
609 | CONFIG_SCSI_DMA=y | ||
630 | # CONFIG_SCSI_TGT is not set | 610 | # CONFIG_SCSI_TGT is not set |
631 | # CONFIG_SCSI_NETLINK is not set | 611 | # CONFIG_SCSI_NETLINK is not set |
632 | CONFIG_SCSI_PROC_FS=y | 612 | CONFIG_SCSI_PROC_FS=y |
@@ -657,43 +637,35 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
657 | # CONFIG_SCSI_SPI_ATTRS is not set | 637 | # CONFIG_SCSI_SPI_ATTRS is not set |
658 | # CONFIG_SCSI_FC_ATTRS is not set | 638 | # CONFIG_SCSI_FC_ATTRS is not set |
659 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 639 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
660 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
661 | # CONFIG_SCSI_SAS_LIBSAS is not set | 640 | # CONFIG_SCSI_SAS_LIBSAS is not set |
662 | 641 | # CONFIG_SCSI_SRP_ATTRS is not set | |
663 | # | 642 | CONFIG_SCSI_LOWLEVEL=y |
664 | # SCSI low-level drivers | ||
665 | # | ||
666 | # CONFIG_ISCSI_TCP is not set | 643 | # CONFIG_ISCSI_TCP is not set |
667 | # CONFIG_SCSI_DEBUG is not set | 644 | # CONFIG_SCSI_DEBUG is not set |
668 | CONFIG_ATA=y | 645 | CONFIG_ATA=y |
669 | # CONFIG_ATA_NONSTANDARD is not set | 646 | # CONFIG_ATA_NONSTANDARD is not set |
670 | # CONFIG_PATA_PLATFORM is not set | 647 | # CONFIG_PATA_PLATFORM is not set |
671 | CONFIG_PATA_BF54X=y | 648 | CONFIG_PATA_BF54X=y |
672 | CONFIG_PATA_BF54X_DMA=y | ||
673 | |||
674 | # | ||
675 | # Multi-device support (RAID and LVM) | ||
676 | # | ||
677 | # CONFIG_MD is not set | 649 | # CONFIG_MD is not set |
678 | |||
679 | # | ||
680 | # Network device support | ||
681 | # | ||
682 | CONFIG_NETDEVICES=y | 650 | CONFIG_NETDEVICES=y |
651 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
683 | # CONFIG_DUMMY is not set | 652 | # CONFIG_DUMMY is not set |
684 | # CONFIG_BONDING is not set | 653 | # CONFIG_BONDING is not set |
654 | # CONFIG_MACVLAN is not set | ||
685 | # CONFIG_EQUALIZER is not set | 655 | # CONFIG_EQUALIZER is not set |
686 | # CONFIG_TUN is not set | 656 | # CONFIG_TUN is not set |
657 | # CONFIG_VETH is not set | ||
687 | # CONFIG_PHYLIB is not set | 658 | # CONFIG_PHYLIB is not set |
688 | |||
689 | # | ||
690 | # Ethernet (10 or 100Mbit) | ||
691 | # | ||
692 | CONFIG_NET_ETHERNET=y | 659 | CONFIG_NET_ETHERNET=y |
693 | CONFIG_MII=y | 660 | CONFIG_MII=y |
694 | # CONFIG_SMC91X is not set | 661 | # CONFIG_SMC91X is not set |
695 | CONFIG_SMSC911X=y | 662 | CONFIG_SMSC911X=y |
696 | # CONFIG_DM9000 is not set | 663 | # CONFIG_DM9000 is not set |
664 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
665 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
666 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
667 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
668 | # CONFIG_B44 is not set | ||
697 | CONFIG_NETDEV_1000=y | 669 | CONFIG_NETDEV_1000=y |
698 | # CONFIG_AX88180 is not set | 670 | # CONFIG_AX88180 is not set |
699 | CONFIG_NETDEV_10000=y | 671 | CONFIG_NETDEV_10000=y |
@@ -703,6 +675,15 @@ CONFIG_NETDEV_10000=y | |||
703 | # | 675 | # |
704 | # CONFIG_WLAN_PRE80211 is not set | 676 | # CONFIG_WLAN_PRE80211 is not set |
705 | # CONFIG_WLAN_80211 is not set | 677 | # CONFIG_WLAN_80211 is not set |
678 | |||
679 | # | ||
680 | # USB Network Adapters | ||
681 | # | ||
682 | # CONFIG_USB_CATC is not set | ||
683 | # CONFIG_USB_KAWETH is not set | ||
684 | # CONFIG_USB_PEGASUS is not set | ||
685 | # CONFIG_USB_RTL8150 is not set | ||
686 | # CONFIG_USB_USBNET is not set | ||
706 | # CONFIG_WAN is not set | 687 | # CONFIG_WAN is not set |
707 | # CONFIG_PPP is not set | 688 | # CONFIG_PPP is not set |
708 | # CONFIG_SLIP is not set | 689 | # CONFIG_SLIP is not set |
@@ -710,15 +691,7 @@ CONFIG_NETDEV_10000=y | |||
710 | # CONFIG_NETCONSOLE is not set | 691 | # CONFIG_NETCONSOLE is not set |
711 | # CONFIG_NETPOLL is not set | 692 | # CONFIG_NETPOLL is not set |
712 | # CONFIG_NET_POLL_CONTROLLER is not set | 693 | # CONFIG_NET_POLL_CONTROLLER is not set |
713 | |||
714 | # | ||
715 | # ISDN subsystem | ||
716 | # | ||
717 | # CONFIG_ISDN is not set | 694 | # CONFIG_ISDN is not set |
718 | |||
719 | # | ||
720 | # Telephony Support | ||
721 | # | ||
722 | # CONFIG_PHONE is not set | 695 | # CONFIG_PHONE is not set |
723 | 696 | ||
724 | # | 697 | # |
@@ -733,9 +706,6 @@ CONFIG_INPUT=y | |||
733 | # | 706 | # |
734 | # CONFIG_INPUT_MOUSEDEV is not set | 707 | # CONFIG_INPUT_MOUSEDEV is not set |
735 | # CONFIG_INPUT_JOYDEV is not set | 708 | # CONFIG_INPUT_JOYDEV is not set |
736 | CONFIG_INPUT_TSDEV=m | ||
737 | CONFIG_INPUT_TSDEV_SCREEN_X=240 | ||
738 | CONFIG_INPUT_TSDEV_SCREEN_Y=320 | ||
739 | CONFIG_INPUT_EVDEV=m | 709 | CONFIG_INPUT_EVDEV=m |
740 | CONFIG_INPUT_EVBUG=m | 710 | CONFIG_INPUT_EVBUG=m |
741 | 711 | ||
@@ -758,6 +728,7 @@ CONFIG_KEYBOARD_BFIN=y | |||
758 | CONFIG_INPUT_TOUCHSCREEN=y | 728 | CONFIG_INPUT_TOUCHSCREEN=y |
759 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | 729 | # CONFIG_TOUCHSCREEN_ADS7846 is not set |
760 | CONFIG_TOUCHSCREEN_AD7877=m | 730 | CONFIG_TOUCHSCREEN_AD7877=m |
731 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
761 | # CONFIG_TOUCHSCREEN_GUNZE is not set | 732 | # CONFIG_TOUCHSCREEN_GUNZE is not set |
762 | # CONFIG_TOUCHSCREEN_ELO is not set | 733 | # CONFIG_TOUCHSCREEN_ELO is not set |
763 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | 734 | # CONFIG_TOUCHSCREEN_MTOUCH is not set |
@@ -787,7 +758,6 @@ CONFIG_INPUT_MISC=y | |||
787 | # | 758 | # |
788 | # CONFIG_AD9960 is not set | 759 | # CONFIG_AD9960 is not set |
789 | # CONFIG_SPI_ADC_BF533 is not set | 760 | # CONFIG_SPI_ADC_BF533 is not set |
790 | # CONFIG_BF5xx_PFLAGS is not set | ||
791 | # CONFIG_BF5xx_PPIFCD is not set | 761 | # CONFIG_BF5xx_PPIFCD is not set |
792 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 762 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
793 | # CONFIG_BF5xx_PPI is not set | 763 | # CONFIG_BF5xx_PPI is not set |
@@ -796,7 +766,7 @@ CONFIG_BFIN_OTP=y | |||
796 | # CONFIG_BFIN_SPORT is not set | 766 | # CONFIG_BFIN_SPORT is not set |
797 | # CONFIG_BFIN_TIMER_LATENCY is not set | 767 | # CONFIG_BFIN_TIMER_LATENCY is not set |
798 | # CONFIG_TWI_LCD is not set | 768 | # CONFIG_TWI_LCD is not set |
799 | # CONFIG_AD5304 is not set | 769 | # CONFIG_SIMPLE_GPIO is not set |
800 | CONFIG_VT=y | 770 | CONFIG_VT=y |
801 | CONFIG_VT_CONSOLE=y | 771 | CONFIG_VT_CONSOLE=y |
802 | CONFIG_HW_CONSOLE=y | 772 | CONFIG_HW_CONSOLE=y |
@@ -830,27 +800,11 @@ CONFIG_UNIX98_PTYS=y | |||
830 | # CAN, the car bus and industrial fieldbus | 800 | # CAN, the car bus and industrial fieldbus |
831 | # | 801 | # |
832 | # CONFIG_CAN4LINUX is not set | 802 | # CONFIG_CAN4LINUX is not set |
833 | |||
834 | # | ||
835 | # IPMI | ||
836 | # | ||
837 | # CONFIG_IPMI_HANDLER is not set | 803 | # CONFIG_IPMI_HANDLER is not set |
838 | CONFIG_WATCHDOG=y | ||
839 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
840 | |||
841 | # | ||
842 | # Watchdog Device Drivers | ||
843 | # | ||
844 | # CONFIG_SOFT_WATCHDOG is not set | ||
845 | CONFIG_BFIN_WDT=y | ||
846 | CONFIG_HW_RANDOM=y | 804 | CONFIG_HW_RANDOM=y |
847 | # CONFIG_GEN_RTC is not set | 805 | # CONFIG_GEN_RTC is not set |
848 | # CONFIG_R3964 is not set | 806 | # CONFIG_R3964 is not set |
849 | # CONFIG_RAW_DRIVER is not set | 807 | # CONFIG_RAW_DRIVER is not set |
850 | |||
851 | # | ||
852 | # TPM devices | ||
853 | # | ||
854 | # CONFIG_TCG_TPM is not set | 808 | # CONFIG_TCG_TPM is not set |
855 | CONFIG_I2C=y | 809 | CONFIG_I2C=y |
856 | CONFIG_I2C_BOARDINFO=y | 810 | CONFIG_I2C_BOARDINFO=y |
@@ -872,21 +826,24 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50 | |||
872 | # CONFIG_I2C_OCORES is not set | 826 | # CONFIG_I2C_OCORES is not set |
873 | # CONFIG_I2C_PARPORT_LIGHT is not set | 827 | # CONFIG_I2C_PARPORT_LIGHT is not set |
874 | # CONFIG_I2C_SIMTEC is not set | 828 | # CONFIG_I2C_SIMTEC is not set |
829 | # CONFIG_I2C_TAOS_EVM is not set | ||
875 | # CONFIG_I2C_STUB is not set | 830 | # CONFIG_I2C_STUB is not set |
831 | # CONFIG_I2C_TINY_USB is not set | ||
876 | 832 | ||
877 | # | 833 | # |
878 | # Miscellaneous I2C Chip support | 834 | # Miscellaneous I2C Chip support |
879 | # | 835 | # |
880 | # CONFIG_SENSORS_DS1337 is not set | 836 | # CONFIG_SENSORS_DS1337 is not set |
881 | # CONFIG_SENSORS_DS1374 is not set | 837 | # CONFIG_SENSORS_DS1374 is not set |
838 | # CONFIG_DS1682 is not set | ||
882 | # CONFIG_SENSORS_AD5252 is not set | 839 | # CONFIG_SENSORS_AD5252 is not set |
883 | # CONFIG_SENSORS_EEPROM is not set | 840 | # CONFIG_SENSORS_EEPROM is not set |
884 | # CONFIG_SENSORS_PCF8574 is not set | 841 | # CONFIG_SENSORS_PCF8574 is not set |
885 | # CONFIG_SENSORS_PCF8575 is not set | 842 | # CONFIG_SENSORS_PCF8575 is not set |
886 | # CONFIG_SENSORS_PCA9543 is not set | ||
887 | # CONFIG_SENSORS_PCA9539 is not set | 843 | # CONFIG_SENSORS_PCA9539 is not set |
888 | # CONFIG_SENSORS_PCF8591 is not set | 844 | # CONFIG_SENSORS_PCF8591 is not set |
889 | # CONFIG_SENSORS_MAX6875 is not set | 845 | # CONFIG_SENSORS_MAX6875 is not set |
846 | # CONFIG_SENSORS_TSL2550 is not set | ||
890 | # CONFIG_I2C_DEBUG_CORE is not set | 847 | # CONFIG_I2C_DEBUG_CORE is not set |
891 | # CONFIG_I2C_DEBUG_ALGO is not set | 848 | # CONFIG_I2C_DEBUG_ALGO is not set |
892 | # CONFIG_I2C_DEBUG_BUS is not set | 849 | # CONFIG_I2C_DEBUG_BUS is not set |
@@ -909,14 +866,11 @@ CONFIG_SPI_BFIN=y | |||
909 | # | 866 | # |
910 | # CONFIG_SPI_AT25 is not set | 867 | # CONFIG_SPI_AT25 is not set |
911 | # CONFIG_SPI_SPIDEV is not set | 868 | # CONFIG_SPI_SPIDEV is not set |
912 | 869 | # CONFIG_SPI_TLE62X0 is not set | |
913 | # | ||
914 | # Dallas's 1-wire bus | ||
915 | # | ||
916 | # CONFIG_W1 is not set | 870 | # CONFIG_W1 is not set |
871 | # CONFIG_POWER_SUPPLY is not set | ||
917 | CONFIG_HWMON=y | 872 | CONFIG_HWMON=y |
918 | # CONFIG_HWMON_VID is not set | 873 | # CONFIG_HWMON_VID is not set |
919 | # CONFIG_SENSORS_ABITUGURU is not set | ||
920 | # CONFIG_SENSORS_AD7418 is not set | 874 | # CONFIG_SENSORS_AD7418 is not set |
921 | # CONFIG_SENSORS_ADM1021 is not set | 875 | # CONFIG_SENSORS_ADM1021 is not set |
922 | # CONFIG_SENSORS_ADM1025 is not set | 876 | # CONFIG_SENSORS_ADM1025 is not set |
@@ -924,12 +878,12 @@ CONFIG_HWMON=y | |||
924 | # CONFIG_SENSORS_ADM1029 is not set | 878 | # CONFIG_SENSORS_ADM1029 is not set |
925 | # CONFIG_SENSORS_ADM1031 is not set | 879 | # CONFIG_SENSORS_ADM1031 is not set |
926 | # CONFIG_SENSORS_ADM9240 is not set | 880 | # CONFIG_SENSORS_ADM9240 is not set |
927 | # CONFIG_SENSORS_ASB100 is not set | 881 | # CONFIG_SENSORS_ADT7470 is not set |
928 | # CONFIG_SENSORS_ATXP1 is not set | 882 | # CONFIG_SENSORS_ATXP1 is not set |
929 | # CONFIG_SENSORS_DS1621 is not set | 883 | # CONFIG_SENSORS_DS1621 is not set |
930 | # CONFIG_SENSORS_F71805F is not set | 884 | # CONFIG_SENSORS_F71805F is not set |
931 | # CONFIG_SENSORS_FSCHER is not set | 885 | # CONFIG_SENSORS_F71882FG is not set |
932 | # CONFIG_SENSORS_FSCPOS is not set | 886 | # CONFIG_SENSORS_F75375S is not set |
933 | # CONFIG_SENSORS_GL518SM is not set | 887 | # CONFIG_SENSORS_GL518SM is not set |
934 | # CONFIG_SENSORS_GL520SM is not set | 888 | # CONFIG_SENSORS_GL520SM is not set |
935 | # CONFIG_SENSORS_IT87 is not set | 889 | # CONFIG_SENSORS_IT87 is not set |
@@ -944,13 +898,16 @@ CONFIG_HWMON=y | |||
944 | # CONFIG_SENSORS_LM87 is not set | 898 | # CONFIG_SENSORS_LM87 is not set |
945 | # CONFIG_SENSORS_LM90 is not set | 899 | # CONFIG_SENSORS_LM90 is not set |
946 | # CONFIG_SENSORS_LM92 is not set | 900 | # CONFIG_SENSORS_LM92 is not set |
901 | # CONFIG_SENSORS_LM93 is not set | ||
947 | # CONFIG_SENSORS_MAX1619 is not set | 902 | # CONFIG_SENSORS_MAX1619 is not set |
948 | # CONFIG_SENSORS_MAX6650 is not set | 903 | # CONFIG_SENSORS_MAX6650 is not set |
949 | # CONFIG_SENSORS_PC87360 is not set | 904 | # CONFIG_SENSORS_PC87360 is not set |
950 | # CONFIG_SENSORS_PC87427 is not set | 905 | # CONFIG_SENSORS_PC87427 is not set |
906 | # CONFIG_SENSORS_DME1737 is not set | ||
951 | # CONFIG_SENSORS_SMSC47M1 is not set | 907 | # CONFIG_SENSORS_SMSC47M1 is not set |
952 | # CONFIG_SENSORS_SMSC47M192 is not set | 908 | # CONFIG_SENSORS_SMSC47M192 is not set |
953 | # CONFIG_SENSORS_SMSC47B397 is not set | 909 | # CONFIG_SENSORS_SMSC47B397 is not set |
910 | # CONFIG_SENSORS_THMC50 is not set | ||
954 | # CONFIG_SENSORS_VT1211 is not set | 911 | # CONFIG_SENSORS_VT1211 is not set |
955 | # CONFIG_SENSORS_W83781D is not set | 912 | # CONFIG_SENSORS_W83781D is not set |
956 | # CONFIG_SENSORS_W83791D is not set | 913 | # CONFIG_SENSORS_W83791D is not set |
@@ -960,6 +917,25 @@ CONFIG_HWMON=y | |||
960 | # CONFIG_SENSORS_W83627HF is not set | 917 | # CONFIG_SENSORS_W83627HF is not set |
961 | # CONFIG_SENSORS_W83627EHF is not set | 918 | # CONFIG_SENSORS_W83627EHF is not set |
962 | # CONFIG_HWMON_DEBUG_CHIP is not set | 919 | # CONFIG_HWMON_DEBUG_CHIP is not set |
920 | CONFIG_WATCHDOG=y | ||
921 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
922 | |||
923 | # | ||
924 | # Watchdog Device Drivers | ||
925 | # | ||
926 | # CONFIG_SOFT_WATCHDOG is not set | ||
927 | CONFIG_BFIN_WDT=y | ||
928 | |||
929 | # | ||
930 | # USB-based Watchdog Cards | ||
931 | # | ||
932 | # CONFIG_USBPCWATCHDOG is not set | ||
933 | |||
934 | # | ||
935 | # Sonics Silicon Backplane | ||
936 | # | ||
937 | CONFIG_SSB_POSSIBLE=y | ||
938 | # CONFIG_SSB is not set | ||
963 | 939 | ||
964 | # | 940 | # |
965 | # Multifunction device drivers | 941 | # Multifunction device drivers |
@@ -972,23 +948,20 @@ CONFIG_HWMON=y | |||
972 | # CONFIG_VIDEO_DEV is not set | 948 | # CONFIG_VIDEO_DEV is not set |
973 | # CONFIG_DVB_CORE is not set | 949 | # CONFIG_DVB_CORE is not set |
974 | CONFIG_DAB=y | 950 | CONFIG_DAB=y |
951 | # CONFIG_USB_DABUSB is not set | ||
975 | 952 | ||
976 | # | 953 | # |
977 | # Graphics support | 954 | # Graphics support |
978 | # | 955 | # |
979 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
980 | |||
981 | # | ||
982 | # Display device support | ||
983 | # | ||
984 | # CONFIG_DISPLAY_SUPPORT is not set | ||
985 | # CONFIG_VGASTATE is not set | 956 | # CONFIG_VGASTATE is not set |
957 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
986 | CONFIG_FB=y | 958 | CONFIG_FB=y |
987 | CONFIG_FIRMWARE_EDID=y | 959 | CONFIG_FIRMWARE_EDID=y |
988 | # CONFIG_FB_DDC is not set | 960 | # CONFIG_FB_DDC is not set |
989 | CONFIG_FB_CFB_FILLRECT=y | 961 | CONFIG_FB_CFB_FILLRECT=y |
990 | CONFIG_FB_CFB_COPYAREA=y | 962 | CONFIG_FB_CFB_COPYAREA=y |
991 | CONFIG_FB_CFB_IMAGEBLIT=y | 963 | CONFIG_FB_CFB_IMAGEBLIT=y |
964 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
992 | # CONFIG_FB_SYS_FILLRECT is not set | 965 | # CONFIG_FB_SYS_FILLRECT is not set |
993 | # CONFIG_FB_SYS_COPYAREA is not set | 966 | # CONFIG_FB_SYS_COPYAREA is not set |
994 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 967 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
@@ -1003,18 +976,24 @@ CONFIG_FB_DEFERRED_IO=y | |||
1003 | # | 976 | # |
1004 | # Frame buffer hardware drivers | 977 | # Frame buffer hardware drivers |
1005 | # | 978 | # |
1006 | # CONFIG_FB_BFIN_7171 is not set | ||
1007 | # CONFIG_FB_BFIN_7393 is not set | ||
1008 | CONFIG_FB_BF54X_LQ043=y | 979 | CONFIG_FB_BF54X_LQ043=y |
1009 | # CONFIG_FB_BFIN_T350MCQB is not set | 980 | # CONFIG_FB_BFIN_T350MCQB is not set |
981 | # CONFIG_FB_BFIN_7393 is not set | ||
1010 | # CONFIG_FB_S1D13XXX is not set | 982 | # CONFIG_FB_S1D13XXX is not set |
1011 | # CONFIG_FB_VIRTUAL is not set | 983 | # CONFIG_FB_VIRTUAL is not set |
984 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
985 | |||
986 | # | ||
987 | # Display device support | ||
988 | # | ||
989 | # CONFIG_DISPLAY_SUPPORT is not set | ||
1012 | 990 | ||
1013 | # | 991 | # |
1014 | # Console display driver support | 992 | # Console display driver support |
1015 | # | 993 | # |
1016 | CONFIG_DUMMY_CONSOLE=y | 994 | CONFIG_DUMMY_CONSOLE=y |
1017 | CONFIG_FRAMEBUFFER_CONSOLE=y | 995 | CONFIG_FRAMEBUFFER_CONSOLE=y |
996 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
1018 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | 997 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set |
1019 | CONFIG_FONTS=y | 998 | CONFIG_FONTS=y |
1020 | # CONFIG_FONT_8x8 is not set | 999 | # CONFIG_FONT_8x8 is not set |
@@ -1065,10 +1044,21 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1065 | # CONFIG_SND_MPU401 is not set | 1044 | # CONFIG_SND_MPU401 is not set |
1066 | 1045 | ||
1067 | # | 1046 | # |
1047 | # SPI devices | ||
1048 | # | ||
1049 | |||
1050 | # | ||
1068 | # ALSA Blackfin devices | 1051 | # ALSA Blackfin devices |
1069 | # | 1052 | # |
1070 | # CONFIG_SND_BLACKFIN_AD1836 is not set | 1053 | # CONFIG_SND_BLACKFIN_AD1836 is not set |
1071 | # CONFIG_SND_BFIN_AD73311 is not set | 1054 | # CONFIG_SND_BFIN_AD73311 is not set |
1055 | # CONFIG_SND_BFIN_AD73322 is not set | ||
1056 | |||
1057 | # | ||
1058 | # USB devices | ||
1059 | # | ||
1060 | # CONFIG_SND_USB_AUDIO is not set | ||
1061 | # CONFIG_SND_USB_CAIAQ is not set | ||
1072 | 1062 | ||
1073 | # | 1063 | # |
1074 | # System on Chip audio support | 1064 | # System on Chip audio support |
@@ -1084,6 +1074,10 @@ CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y | |||
1084 | CONFIG_SND_BF5XX_SPORT_NUM=0 | 1074 | CONFIG_SND_BF5XX_SPORT_NUM=0 |
1085 | CONFIG_SND_BF5XX_HAVE_COLD_RESET=y | 1075 | CONFIG_SND_BF5XX_HAVE_COLD_RESET=y |
1086 | CONFIG_SND_BF5XX_RESET_GPIO_NUM=19 | 1076 | CONFIG_SND_BF5XX_RESET_GPIO_NUM=19 |
1077 | |||
1078 | # | ||
1079 | # SoC Audio support for SuperH | ||
1080 | # | ||
1087 | CONFIG_SND_SOC_AD1980=y | 1081 | CONFIG_SND_SOC_AD1980=y |
1088 | 1082 | ||
1089 | # | 1083 | # |
@@ -1091,72 +1085,152 @@ CONFIG_SND_SOC_AD1980=y | |||
1091 | # | 1085 | # |
1092 | # CONFIG_SOUND_PRIME is not set | 1086 | # CONFIG_SOUND_PRIME is not set |
1093 | CONFIG_AC97_BUS=y | 1087 | CONFIG_AC97_BUS=y |
1094 | 1088 | CONFIG_HID_SUPPORT=y | |
1095 | # | 1089 | CONFIG_HID=y |
1096 | # HID Devices | ||
1097 | # | ||
1098 | CONFIG_HID=m | ||
1099 | # CONFIG_HID_DEBUG is not set | 1090 | # CONFIG_HID_DEBUG is not set |
1091 | # CONFIG_HIDRAW is not set | ||
1100 | 1092 | ||
1101 | # | 1093 | # |
1102 | # USB support | 1094 | # USB Input Devices |
1103 | # | 1095 | # |
1096 | CONFIG_USB_HID=y | ||
1097 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
1098 | # CONFIG_HID_FF is not set | ||
1099 | # CONFIG_USB_HIDDEV is not set | ||
1100 | CONFIG_USB_SUPPORT=y | ||
1104 | CONFIG_USB_ARCH_HAS_HCD=y | 1101 | CONFIG_USB_ARCH_HAS_HCD=y |
1105 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 1102 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
1106 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 1103 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
1107 | # CONFIG_USB is not set | 1104 | CONFIG_USB=y |
1105 | # CONFIG_USB_DEBUG is not set | ||
1106 | |||
1107 | # | ||
1108 | # Miscellaneous USB options | ||
1109 | # | ||
1110 | # CONFIG_USB_DEVICEFS is not set | ||
1111 | CONFIG_USB_DEVICE_CLASS=y | ||
1112 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
1113 | # CONFIG_USB_OTG is not set | ||
1114 | # CONFIG_USB_OTG_WHITELIST is not set | ||
1115 | CONFIG_USB_OTG_BLACKLIST_HUB=y | ||
1108 | 1116 | ||
1109 | # | 1117 | # |
1110 | # Enable Host or Gadget support to see Inventra options | 1118 | # USB Host Controller Drivers |
1111 | # | 1119 | # |
1120 | # CONFIG_USB_ISP116X_HCD is not set | ||
1121 | # CONFIG_USB_ISP1362_HCD is not set | ||
1122 | # CONFIG_USB_ISP1760_HCD is not set | ||
1123 | # CONFIG_USB_SL811_HCD is not set | ||
1124 | # CONFIG_USB_R8A66597_HCD is not set | ||
1125 | CONFIG_USB_MUSB_HDRC=y | ||
1126 | CONFIG_USB_MUSB_SOC=y | ||
1127 | |||
1128 | # | ||
1129 | # Blackfin high speed USB support | ||
1130 | # | ||
1131 | CONFIG_USB_MUSB_HOST=y | ||
1132 | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
1133 | # CONFIG_USB_MUSB_OTG is not set | ||
1134 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
1135 | # CONFIG_MUSB_PIO_ONLY is not set | ||
1136 | # CONFIG_USB_INVENTRA_DMA is not set | ||
1137 | # CONFIG_USB_TI_CPPI_DMA is not set | ||
1138 | CONFIG_USB_MUSB_LOGLEVEL=0 | ||
1139 | |||
1140 | # | ||
1141 | # USB Device Class drivers | ||
1142 | # | ||
1143 | # CONFIG_USB_ACM is not set | ||
1144 | # CONFIG_USB_PRINTER is not set | ||
1112 | 1145 | ||
1113 | # | 1146 | # |
1114 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1147 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
1115 | # | 1148 | # |
1116 | 1149 | ||
1117 | # | 1150 | # |
1118 | # USB Gadget Support | 1151 | # may also be needed; see USB_STORAGE Help for more information |
1119 | # | 1152 | # |
1120 | # CONFIG_USB_GADGET is not set | 1153 | CONFIG_USB_STORAGE=m |
1121 | CONFIG_MMC=m | 1154 | # CONFIG_USB_STORAGE_DEBUG is not set |
1122 | # CONFIG_MMC_DEBUG is not set | 1155 | # CONFIG_USB_STORAGE_DATAFAB is not set |
1123 | # CONFIG_MMC_UNSAFE_RESUME is not set | 1156 | # CONFIG_USB_STORAGE_FREECOM is not set |
1157 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1158 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1159 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1160 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1161 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1162 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1163 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1164 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
1165 | # CONFIG_USB_STORAGE_KARMA is not set | ||
1166 | # CONFIG_USB_LIBUSUAL is not set | ||
1124 | 1167 | ||
1125 | # | 1168 | # |
1126 | # MMC/SD Card Drivers | 1169 | # USB Imaging devices |
1127 | # | 1170 | # |
1128 | CONFIG_MMC_BLOCK=m | 1171 | # CONFIG_USB_MDC800 is not set |
1172 | # CONFIG_USB_MICROTEK is not set | ||
1173 | CONFIG_USB_MON=y | ||
1129 | 1174 | ||
1130 | # | 1175 | # |
1131 | # MMC/SD Host Controller Drivers | 1176 | # USB port drivers |
1132 | # | 1177 | # |
1133 | CONFIG_SDH_BFIN=m | ||
1134 | # CONFIG_SPI_MMC is not set | ||
1135 | 1178 | ||
1136 | # | 1179 | # |
1137 | # LED devices | 1180 | # USB Serial Converter support |
1138 | # | 1181 | # |
1139 | # CONFIG_NEW_LEDS is not set | 1182 | # CONFIG_USB_SERIAL is not set |
1140 | 1183 | ||
1141 | # | 1184 | # |
1142 | # LED drivers | 1185 | # USB Miscellaneous drivers |
1143 | # | 1186 | # |
1187 | # CONFIG_USB_EMI62 is not set | ||
1188 | # CONFIG_USB_EMI26 is not set | ||
1189 | # CONFIG_USB_ADUTUX is not set | ||
1190 | # CONFIG_USB_AUERSWALD is not set | ||
1191 | # CONFIG_USB_RIO500 is not set | ||
1192 | # CONFIG_USB_LEGOTOWER is not set | ||
1193 | # CONFIG_USB_LCD is not set | ||
1194 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1195 | # CONFIG_USB_LED is not set | ||
1196 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1197 | # CONFIG_USB_CYTHERM is not set | ||
1198 | # CONFIG_USB_PHIDGET is not set | ||
1199 | # CONFIG_USB_IDMOUSE is not set | ||
1200 | # CONFIG_USB_FTDI_ELAN is not set | ||
1201 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1202 | # CONFIG_USB_SISUSBVGA is not set | ||
1203 | # CONFIG_USB_LD is not set | ||
1204 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1205 | # CONFIG_USB_IOWARRIOR is not set | ||
1144 | 1206 | ||
1145 | # | 1207 | # |
1146 | # LED Triggers | 1208 | # USB DSL modem support |
1147 | # | 1209 | # |
1148 | 1210 | ||
1149 | # | 1211 | # |
1150 | # InfiniBand support | 1212 | # USB Gadget Support |
1151 | # | 1213 | # |
1214 | # CONFIG_USB_GADGET is not set | ||
1215 | CONFIG_MMC=m | ||
1216 | # CONFIG_MMC_DEBUG is not set | ||
1217 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
1152 | 1218 | ||
1153 | # | 1219 | # |
1154 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | 1220 | # MMC/SD Card Drivers |
1155 | # | 1221 | # |
1222 | CONFIG_MMC_BLOCK=m | ||
1223 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
1224 | # CONFIG_SDIO_UART is not set | ||
1156 | 1225 | ||
1157 | # | 1226 | # |
1158 | # Real Time Clock | 1227 | # MMC/SD Host Controller Drivers |
1159 | # | 1228 | # |
1229 | CONFIG_SDH_BFIN=m | ||
1230 | # CONFIG_SDH_BFIN_MISSING_CMD_PULLUP_WORKAROUND is not set | ||
1231 | # CONFIG_MMC_SPI is not set | ||
1232 | # CONFIG_SPI_MMC is not set | ||
1233 | # CONFIG_NEW_LEDS is not set | ||
1160 | CONFIG_RTC_LIB=y | 1234 | CONFIG_RTC_LIB=y |
1161 | CONFIG_RTC_CLASS=y | 1235 | CONFIG_RTC_CLASS=y |
1162 | CONFIG_RTC_HCTOSYS=y | 1236 | CONFIG_RTC_HCTOSYS=y |
@@ -1176,6 +1250,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1176 | # I2C RTC drivers | 1250 | # I2C RTC drivers |
1177 | # | 1251 | # |
1178 | # CONFIG_RTC_DRV_DS1307 is not set | 1252 | # CONFIG_RTC_DRV_DS1307 is not set |
1253 | # CONFIG_RTC_DRV_DS1374 is not set | ||
1179 | # CONFIG_RTC_DRV_DS1672 is not set | 1254 | # CONFIG_RTC_DRV_DS1672 is not set |
1180 | # CONFIG_RTC_DRV_MAX6900 is not set | 1255 | # CONFIG_RTC_DRV_MAX6900 is not set |
1181 | # CONFIG_RTC_DRV_RS5C372 is not set | 1256 | # CONFIG_RTC_DRV_RS5C372 is not set |
@@ -1183,6 +1258,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1183 | # CONFIG_RTC_DRV_X1205 is not set | 1258 | # CONFIG_RTC_DRV_X1205 is not set |
1184 | # CONFIG_RTC_DRV_PCF8563 is not set | 1259 | # CONFIG_RTC_DRV_PCF8563 is not set |
1185 | # CONFIG_RTC_DRV_PCF8583 is not set | 1260 | # CONFIG_RTC_DRV_PCF8583 is not set |
1261 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1186 | 1262 | ||
1187 | # | 1263 | # |
1188 | # SPI RTC drivers | 1264 | # SPI RTC drivers |
@@ -1194,8 +1270,10 @@ CONFIG_RTC_INTF_DEV=y | |||
1194 | # Platform RTC drivers | 1270 | # Platform RTC drivers |
1195 | # | 1271 | # |
1196 | # CONFIG_RTC_DRV_DS1553 is not set | 1272 | # CONFIG_RTC_DRV_DS1553 is not set |
1273 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1197 | # CONFIG_RTC_DRV_DS1742 is not set | 1274 | # CONFIG_RTC_DRV_DS1742 is not set |
1198 | # CONFIG_RTC_DRV_M48T86 is not set | 1275 | # CONFIG_RTC_DRV_M48T86 is not set |
1276 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1199 | # CONFIG_RTC_DRV_V3020 is not set | 1277 | # CONFIG_RTC_DRV_V3020 is not set |
1200 | 1278 | ||
1201 | # | 1279 | # |
@@ -1204,22 +1282,9 @@ CONFIG_RTC_INTF_DEV=y | |||
1204 | CONFIG_RTC_DRV_BFIN=y | 1282 | CONFIG_RTC_DRV_BFIN=y |
1205 | 1283 | ||
1206 | # | 1284 | # |
1207 | # DMA Engine support | 1285 | # Userspace I/O |
1208 | # | ||
1209 | # CONFIG_DMA_ENGINE is not set | ||
1210 | |||
1211 | # | ||
1212 | # DMA Clients | ||
1213 | # | 1286 | # |
1214 | 1287 | # CONFIG_UIO is not set | |
1215 | # | ||
1216 | # DMA Devices | ||
1217 | # | ||
1218 | |||
1219 | # | ||
1220 | # PBX support | ||
1221 | # | ||
1222 | # CONFIG_PBX is not set | ||
1223 | 1288 | ||
1224 | # | 1289 | # |
1225 | # File systems | 1290 | # File systems |
@@ -1280,7 +1345,6 @@ CONFIG_PROC_SYSCTL=y | |||
1280 | CONFIG_SYSFS=y | 1345 | CONFIG_SYSFS=y |
1281 | # CONFIG_TMPFS is not set | 1346 | # CONFIG_TMPFS is not set |
1282 | # CONFIG_HUGETLB_PAGE is not set | 1347 | # CONFIG_HUGETLB_PAGE is not set |
1283 | CONFIG_RAMFS=y | ||
1284 | # CONFIG_CONFIGFS_FS is not set | 1348 | # CONFIG_CONFIGFS_FS is not set |
1285 | 1349 | ||
1286 | # | 1350 | # |
@@ -1306,10 +1370,12 @@ CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y | |||
1306 | CONFIG_JFFS2_FS=m | 1370 | CONFIG_JFFS2_FS=m |
1307 | CONFIG_JFFS2_FS_DEBUG=0 | 1371 | CONFIG_JFFS2_FS_DEBUG=0 |
1308 | CONFIG_JFFS2_FS_WRITEBUFFER=y | 1372 | CONFIG_JFFS2_FS_WRITEBUFFER=y |
1373 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1309 | # CONFIG_JFFS2_SUMMARY is not set | 1374 | # CONFIG_JFFS2_SUMMARY is not set |
1310 | # CONFIG_JFFS2_FS_XATTR is not set | 1375 | # CONFIG_JFFS2_FS_XATTR is not set |
1311 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | 1376 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set |
1312 | CONFIG_JFFS2_ZLIB=y | 1377 | CONFIG_JFFS2_ZLIB=y |
1378 | # CONFIG_JFFS2_LZO is not set | ||
1313 | CONFIG_JFFS2_RTIME=y | 1379 | CONFIG_JFFS2_RTIME=y |
1314 | # CONFIG_JFFS2_RUBIN is not set | 1380 | # CONFIG_JFFS2_RUBIN is not set |
1315 | # CONFIG_CRAMFS is not set | 1381 | # CONFIG_CRAMFS is not set |
@@ -1318,10 +1384,7 @@ CONFIG_JFFS2_RTIME=y | |||
1318 | # CONFIG_QNX4FS_FS is not set | 1384 | # CONFIG_QNX4FS_FS is not set |
1319 | # CONFIG_SYSV_FS is not set | 1385 | # CONFIG_SYSV_FS is not set |
1320 | # CONFIG_UFS_FS is not set | 1386 | # CONFIG_UFS_FS is not set |
1321 | 1387 | CONFIG_NETWORK_FILESYSTEMS=y | |
1322 | # | ||
1323 | # Network File Systems | ||
1324 | # | ||
1325 | CONFIG_NFS_FS=m | 1388 | CONFIG_NFS_FS=m |
1326 | CONFIG_NFS_V3=y | 1389 | CONFIG_NFS_V3=y |
1327 | # CONFIG_NFS_V3_ACL is not set | 1390 | # CONFIG_NFS_V3_ACL is not set |
@@ -1352,7 +1415,6 @@ CONFIG_CIFS=y | |||
1352 | # CONFIG_NCP_FS is not set | 1415 | # CONFIG_NCP_FS is not set |
1353 | # CONFIG_CODA_FS is not set | 1416 | # CONFIG_CODA_FS is not set |
1354 | # CONFIG_AFS_FS is not set | 1417 | # CONFIG_AFS_FS is not set |
1355 | # CONFIG_9P_FS is not set | ||
1356 | 1418 | ||
1357 | # | 1419 | # |
1358 | # Partition Types | 1420 | # Partition Types |
@@ -1375,10 +1437,6 @@ CONFIG_MSDOS_PARTITION=y | |||
1375 | # CONFIG_KARMA_PARTITION is not set | 1437 | # CONFIG_KARMA_PARTITION is not set |
1376 | # CONFIG_EFI_PARTITION is not set | 1438 | # CONFIG_EFI_PARTITION is not set |
1377 | # CONFIG_SYSV68_PARTITION is not set | 1439 | # CONFIG_SYSV68_PARTITION is not set |
1378 | |||
1379 | # | ||
1380 | # Native Language Support | ||
1381 | # | ||
1382 | CONFIG_NLS=y | 1440 | CONFIG_NLS=y |
1383 | CONFIG_NLS_DEFAULT="iso8859-1" | 1441 | CONFIG_NLS_DEFAULT="iso8859-1" |
1384 | CONFIG_NLS_CODEPAGE_437=m | 1442 | CONFIG_NLS_CODEPAGE_437=m |
@@ -1419,21 +1477,16 @@ CONFIG_NLS_ISO8859_15=m | |||
1419 | CONFIG_NLS_KOI8_R=m | 1477 | CONFIG_NLS_KOI8_R=m |
1420 | CONFIG_NLS_KOI8_U=m | 1478 | CONFIG_NLS_KOI8_U=m |
1421 | CONFIG_NLS_UTF8=m | 1479 | CONFIG_NLS_UTF8=m |
1422 | |||
1423 | # | ||
1424 | # Distributed Lock Manager | ||
1425 | # | ||
1426 | # CONFIG_DLM is not set | 1480 | # CONFIG_DLM is not set |
1427 | 1481 | CONFIG_INSTRUMENTATION=y | |
1428 | # | ||
1429 | # Profiling support | ||
1430 | # | ||
1431 | # CONFIG_PROFILING is not set | 1482 | # CONFIG_PROFILING is not set |
1483 | # CONFIG_MARKERS is not set | ||
1432 | 1484 | ||
1433 | # | 1485 | # |
1434 | # Kernel hacking | 1486 | # Kernel hacking |
1435 | # | 1487 | # |
1436 | # CONFIG_PRINTK_TIME is not set | 1488 | # CONFIG_PRINTK_TIME is not set |
1489 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1437 | CONFIG_ENABLE_MUST_CHECK=y | 1490 | CONFIG_ENABLE_MUST_CHECK=y |
1438 | # CONFIG_MAGIC_SYSRQ is not set | 1491 | # CONFIG_MAGIC_SYSRQ is not set |
1439 | # CONFIG_UNUSED_SYMBOLS is not set | 1492 | # CONFIG_UNUSED_SYMBOLS is not set |
@@ -1441,6 +1494,7 @@ CONFIG_DEBUG_FS=y | |||
1441 | # CONFIG_HEADERS_CHECK is not set | 1494 | # CONFIG_HEADERS_CHECK is not set |
1442 | # CONFIG_DEBUG_KERNEL is not set | 1495 | # CONFIG_DEBUG_KERNEL is not set |
1443 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1496 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1497 | # CONFIG_SAMPLES is not set | ||
1444 | CONFIG_DEBUG_MMRS=y | 1498 | CONFIG_DEBUG_MMRS=y |
1445 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1499 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
1446 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1500 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
@@ -1460,11 +1514,8 @@ CONFIG_ACCESS_CHECK=y | |||
1460 | # CONFIG_KEYS is not set | 1514 | # CONFIG_KEYS is not set |
1461 | CONFIG_SECURITY=y | 1515 | CONFIG_SECURITY=y |
1462 | # CONFIG_SECURITY_NETWORK is not set | 1516 | # CONFIG_SECURITY_NETWORK is not set |
1463 | CONFIG_SECURITY_CAPABILITIES=m | 1517 | # CONFIG_SECURITY_CAPABILITIES is not set |
1464 | 1518 | # CONFIG_SECURITY_ROOTPLUG is not set | |
1465 | # | ||
1466 | # Cryptographic options | ||
1467 | # | ||
1468 | # CONFIG_CRYPTO is not set | 1519 | # CONFIG_CRYPTO is not set |
1469 | 1520 | ||
1470 | # | 1521 | # |
@@ -1475,6 +1526,7 @@ CONFIG_CRC_CCITT=m | |||
1475 | # CONFIG_CRC16 is not set | 1526 | # CONFIG_CRC16 is not set |
1476 | # CONFIG_CRC_ITU_T is not set | 1527 | # CONFIG_CRC_ITU_T is not set |
1477 | CONFIG_CRC32=y | 1528 | CONFIG_CRC32=y |
1529 | # CONFIG_CRC7 is not set | ||
1478 | # CONFIG_LIBCRC32C is not set | 1530 | # CONFIG_LIBCRC32C is not set |
1479 | CONFIG_ZLIB_INFLATE=y | 1531 | CONFIG_ZLIB_INFLATE=y |
1480 | CONFIG_ZLIB_DEFLATE=m | 1532 | CONFIG_ZLIB_DEFLATE=m |
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig index 5f6ff04a86c3..4384a670a8b8 100644 --- a/arch/blackfin/configs/IP0X_defconfig +++ b/arch/blackfin/configs/IP0X_defconfig | |||
@@ -212,7 +212,7 @@ CONFIG_HZ=250 | |||
212 | # | 212 | # |
213 | # Memory Setup | 213 | # Memory Setup |
214 | # | 214 | # |
215 | CONFIG_MEM_SIZE=64 | 215 | CONFIG_MAX_MEM_SIZE=64 |
216 | CONFIG_MEM_ADD_WIDTH=10 | 216 | CONFIG_MEM_ADD_WIDTH=10 |
217 | 217 | ||
218 | # | 218 | # |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index fd5448d6107c..d54f19085f37 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -90,6 +90,17 @@ int request_dma(unsigned int channel, char *device_id) | |||
90 | { | 90 | { |
91 | 91 | ||
92 | pr_debug("request_dma() : BEGIN \n"); | 92 | pr_debug("request_dma() : BEGIN \n"); |
93 | |||
94 | #if defined(CONFIG_BF561) && ANOMALY_05000182 | ||
95 | if (channel >= CH_IMEM_STREAM0_DEST && channel <= CH_IMEM_STREAM1_DEST) { | ||
96 | if (get_cclk() > 500000000) { | ||
97 | printk(KERN_WARNING | ||
98 | "Request IMDMA failed due to ANOMALY 05000182\n"); | ||
99 | return -EFAULT; | ||
100 | } | ||
101 | } | ||
102 | #endif | ||
103 | |||
93 | mutex_lock(&(dma_ch[channel].dmalock)); | 104 | mutex_lock(&(dma_ch[channel].dmalock)); |
94 | 105 | ||
95 | if ((dma_ch[channel].chan_status == DMA_CHANNEL_REQUESTED) | 106 | if ((dma_ch[channel].chan_status == DMA_CHANNEL_REQUESTED) |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 7e8eaf4a31bb..b6d89d1644cc 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -1130,6 +1130,25 @@ void bfin_gpio_irq_prepare(unsigned gpio) | |||
1130 | 1130 | ||
1131 | #else | 1131 | #else |
1132 | 1132 | ||
1133 | int gpio_get_value(unsigned gpio) | ||
1134 | { | ||
1135 | unsigned long flags; | ||
1136 | int ret; | ||
1137 | |||
1138 | if (unlikely(get_gpio_edge(gpio))) { | ||
1139 | local_irq_save(flags); | ||
1140 | set_gpio_edge(gpio, 0); | ||
1141 | ret = get_gpio_data(gpio); | ||
1142 | set_gpio_edge(gpio, 1); | ||
1143 | local_irq_restore(flags); | ||
1144 | |||
1145 | return ret; | ||
1146 | } else | ||
1147 | return get_gpio_data(gpio); | ||
1148 | } | ||
1149 | EXPORT_SYMBOL(gpio_get_value); | ||
1150 | |||
1151 | |||
1133 | int gpio_direction_input(unsigned gpio) | 1152 | int gpio_direction_input(unsigned gpio) |
1134 | { | 1153 | { |
1135 | unsigned long flags; | 1154 | unsigned long flags; |
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index 053edff6c0d8..4367330909b2 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c | |||
@@ -90,7 +90,9 @@ EXPORT_SYMBOL(__umodsi3); | |||
90 | EXPORT_SYMBOL(outsb); | 90 | EXPORT_SYMBOL(outsb); |
91 | EXPORT_SYMBOL(insb); | 91 | EXPORT_SYMBOL(insb); |
92 | EXPORT_SYMBOL(outsw); | 92 | EXPORT_SYMBOL(outsw); |
93 | EXPORT_SYMBOL(outsw_8); | ||
93 | EXPORT_SYMBOL(insw); | 94 | EXPORT_SYMBOL(insw); |
95 | EXPORT_SYMBOL(insw_8); | ||
94 | EXPORT_SYMBOL(outsl); | 96 | EXPORT_SYMBOL(outsl); |
95 | EXPORT_SYMBOL(insl); | 97 | EXPORT_SYMBOL(insl); |
96 | EXPORT_SYMBOL(insl_16); | 98 | EXPORT_SYMBOL(insl_16); |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index e698554895a7..3a3e9615b002 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c | |||
@@ -10,8 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/io.h> | ||
13 | 14 | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/blackfin.h> | 15 | #include <asm/blackfin.h> |
16 | #include <asm/gptimers.h> | 16 | #include <asm/gptimers.h> |
17 | 17 | ||
diff --git a/arch/blackfin/kernel/init_task.c b/arch/blackfin/kernel/init_task.c index c640154030e2..6bdba7b21109 100644 --- a/arch/blackfin/kernel/init_task.c +++ b/arch/blackfin/kernel/init_task.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | 35 | ||
36 | static struct fs_struct init_fs = INIT_FS; | 36 | static struct fs_struct init_fs = INIT_FS; |
37 | static struct files_struct init_files = INIT_FILES; | ||
38 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 37 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
39 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 38 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
40 | 39 | ||
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 5b847070dae5..f061f5181623 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -67,7 +67,7 @@ void __init trap_init(void) | |||
67 | CSYNC(); | 67 | CSYNC(); |
68 | } | 68 | } |
69 | 69 | ||
70 | void *saved_icplb_fault_addr, *saved_dcplb_fault_addr; | 70 | unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr; |
71 | 71 | ||
72 | int kstack_depth_to_print = 48; | 72 | int kstack_depth_to_print = 48; |
73 | 73 | ||
@@ -364,13 +364,13 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
364 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ | 364 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ |
365 | case VEC_CPLB_MHIT: | 365 | case VEC_CPLB_MHIT: |
366 | info.si_code = ILL_CPLB_MULHIT; | 366 | info.si_code = ILL_CPLB_MULHIT; |
367 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO | ||
368 | sig = SIGSEGV; | 367 | sig = SIGSEGV; |
369 | printk(KERN_NOTICE "NULL pointer access (probably)\n"); | 368 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO |
370 | #else | 369 | if (saved_dcplb_fault_addr < FIXED_CODE_START) |
371 | sig = SIGILL; | 370 | printk(KERN_NOTICE "NULL pointer access\n"); |
372 | printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); | 371 | else |
373 | #endif | 372 | #endif |
373 | printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); | ||
374 | CHK_DEBUGGER_TRAP(); | 374 | CHK_DEBUGGER_TRAP(); |
375 | break; | 375 | break; |
376 | /* 0x28 - Emulation Watchpoint, handled here */ | 376 | /* 0x28 - Emulation Watchpoint, handled here */ |
@@ -419,13 +419,13 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
419 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ | 419 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ |
420 | case VEC_CPLB_I_MHIT: | 420 | case VEC_CPLB_I_MHIT: |
421 | info.si_code = ILL_CPLB_MULHIT; | 421 | info.si_code = ILL_CPLB_MULHIT; |
422 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO | ||
423 | sig = SIGSEGV; | 422 | sig = SIGSEGV; |
424 | printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); | 423 | #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO |
425 | #else | 424 | if (saved_icplb_fault_addr < FIXED_CODE_START) |
426 | sig = SIGILL; | 425 | printk(KERN_NOTICE "Jump to NULL address\n"); |
427 | printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); | 426 | else |
428 | #endif | 427 | #endif |
428 | printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); | ||
429 | CHK_DEBUGGER_TRAP(); | 429 | CHK_DEBUGGER_TRAP(); |
430 | break; | 430 | break; |
431 | /* 0x2E - Illegal use of Supervisor Resource, handled here */ | 431 | /* 0x2E - Illegal use of Supervisor Resource, handled here */ |
@@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) | |||
939 | 939 | ||
940 | oops_in_progress = 1; | 940 | oops_in_progress = 1; |
941 | 941 | ||
942 | printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr); | ||
943 | printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr); | ||
944 | dump_bfin_process(fp); | 942 | dump_bfin_process(fp); |
945 | dump_bfin_mem(fp); | 943 | dump_bfin_mem(fp); |
946 | show_regs(fp); | 944 | show_regs(fp); |
diff --git a/arch/blackfin/lib/checksum.c b/arch/blackfin/lib/checksum.c index 42768e0c80ca..5c87505165d3 100644 --- a/arch/blackfin/lib/checksum.c +++ b/arch/blackfin/lib/checksum.c | |||
@@ -72,9 +72,9 @@ static unsigned short do_csum(const unsigned char *buff, int len) | |||
72 | * This is a version of ip_compute_csum() optimized for IP headers, | 72 | * This is a version of ip_compute_csum() optimized for IP headers, |
73 | * which always checksum on 4 octet boundaries. | 73 | * which always checksum on 4 octet boundaries. |
74 | */ | 74 | */ |
75 | unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) | 75 | __sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl) |
76 | { | 76 | { |
77 | return ~do_csum(iph, ihl * 4); | 77 | return (__force __sum16)~do_csum(iph, ihl * 4); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* | 80 | /* |
@@ -89,7 +89,7 @@ unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) | |||
89 | * | 89 | * |
90 | * it's best to have buff aligned on a 32-bit boundary | 90 | * it's best to have buff aligned on a 32-bit boundary |
91 | */ | 91 | */ |
92 | unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum) | 92 | __wsum csum_partial(const void *buff, int len, __wsum sum) |
93 | { | 93 | { |
94 | /* | 94 | /* |
95 | * Just in case we get nasty checksum data... | 95 | * Just in case we get nasty checksum data... |
@@ -109,22 +109,22 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum) | |||
109 | * this routine is used for miscellaneous IP-like checksums, mainly | 109 | * this routine is used for miscellaneous IP-like checksums, mainly |
110 | * in icmp.c | 110 | * in icmp.c |
111 | */ | 111 | */ |
112 | unsigned short ip_compute_csum(const unsigned char *buff, int len) | 112 | __sum16 ip_compute_csum(const void *buff, int len) |
113 | { | 113 | { |
114 | return ~do_csum(buff, len); | 114 | return (__force __sum16)~do_csum(buff, len); |
115 | } | 115 | } |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * copy from fs while checksumming, otherwise like csum_partial | 118 | * copy from fs while checksumming, otherwise like csum_partial |
119 | */ | 119 | */ |
120 | 120 | ||
121 | unsigned int | 121 | __wsum |
122 | csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, | 122 | csum_partial_copy_from_user(const void __user *src, void *dst, |
123 | int len, int sum, int *csum_err) | 123 | int len, __wsum sum, int *csum_err) |
124 | { | 124 | { |
125 | if (csum_err) | 125 | if (csum_err) |
126 | *csum_err = 0; | 126 | *csum_err = 0; |
127 | memcpy(dst, src, len); | 127 | memcpy(dst, (__force void *)src, len); |
128 | return csum_partial(dst, len, sum); | 128 | return csum_partial(dst, len, sum); |
129 | } | 129 | } |
130 | 130 | ||
@@ -132,8 +132,7 @@ csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, | |||
132 | * copy from ds while checksumming, otherwise like csum_partial | 132 | * copy from ds while checksumming, otherwise like csum_partial |
133 | */ | 133 | */ |
134 | 134 | ||
135 | unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, | 135 | __wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum) |
136 | int len, int sum) | ||
137 | { | 136 | { |
138 | memcpy(dst, src, len); | 137 | memcpy(dst, src, len); |
139 | return csum_partial(dst, len, sum); | 138 | return csum_partial(dst, len, sum); |
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index df7b8833a0c5..eba2343b1b59 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Description: Implementation of ins{bwl} for BlackFin processors using zero overhead loops. | 7 | * Description: Implementation of ins{bwl} for BlackFin processors using zero overhead loops. |
8 | * | 8 | * |
9 | * Modified: | 9 | * Modified: |
10 | * Copyright 2004-2006 Analog Devices Inc. | 10 | * Copyright 2004-2008 Analog Devices Inc. |
11 | * Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl> | 11 | * Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl> |
12 | * | 12 | * |
13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
@@ -63,6 +63,23 @@ ENTRY(_insw) | |||
63 | RTS; | 63 | RTS; |
64 | ENDPROC(_insw) | 64 | ENDPROC(_insw) |
65 | 65 | ||
66 | ENTRY(_insw_8) | ||
67 | P0 = R0; /* P0 = port */ | ||
68 | cli R3; | ||
69 | P1 = R1; /* P1 = address */ | ||
70 | P2 = R2; /* P2 = count */ | ||
71 | SSYNC; | ||
72 | LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2; | ||
73 | .Lword8_loop_s: R0 = W[P0]; | ||
74 | B[P1++] = R0; | ||
75 | R0 = R0 >> 8; | ||
76 | B[P1++] = R0; | ||
77 | NOP; | ||
78 | .Lword8_loop_e: NOP; | ||
79 | sti R3; | ||
80 | RTS; | ||
81 | ENDPROC(_insw_8) | ||
82 | |||
66 | ENTRY(_insb) | 83 | ENTRY(_insb) |
67 | P0 = R0; /* P0 = port */ | 84 | P0 = R0; /* P0 = port */ |
68 | cli R3; | 85 | cli R3; |
@@ -78,8 +95,6 @@ ENTRY(_insb) | |||
78 | RTS; | 95 | RTS; |
79 | ENDPROC(_insb) | 96 | ENDPROC(_insb) |
80 | 97 | ||
81 | |||
82 | |||
83 | ENTRY(_insl_16) | 98 | ENTRY(_insl_16) |
84 | P0 = R0; /* P0 = port */ | 99 | P0 = R0; /* P0 = port */ |
85 | cli R3; | 100 | cli R3; |
diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S index 4c3da8ae094e..4685b7aa0080 100644 --- a/arch/blackfin/lib/outs.S +++ b/arch/blackfin/lib/outs.S | |||
@@ -7,7 +7,7 @@ | |||
7 | * Description: Implementation of outs{bwl} for BlackFin processors using zero overhead loops. | 7 | * Description: Implementation of outs{bwl} for BlackFin processors using zero overhead loops. |
8 | * | 8 | * |
9 | * Modified: Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl> | 9 | * Modified: Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl> |
10 | * Copyright 2004-2006 Analog Devices Inc. | 10 | * Copyright 2004-2008 Analog Devices Inc. |
11 | * | 11 | * |
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
13 | * | 13 | * |
@@ -63,3 +63,17 @@ ENTRY(_outsb) | |||
63 | .Lbyte_loop_e: B[P0] = R0; | 63 | .Lbyte_loop_e: B[P0] = R0; |
64 | RTS; | 64 | RTS; |
65 | ENDPROC(_outsb) | 65 | ENDPROC(_outsb) |
66 | |||
67 | ENTRY(_outsw_8) | ||
68 | P0 = R0; /* P0 = port */ | ||
69 | P1 = R1; /* P1 = address */ | ||
70 | P2 = R2; /* P2 = count */ | ||
71 | |||
72 | LSETUP( .Lword8_loop_s, .Lword8_loop_e) LC0 = P2; | ||
73 | .Lword8_loop_s: R1 = B[P1++]; | ||
74 | R0 = B[P1++]; | ||
75 | R0 = R0 << 8; | ||
76 | R0 = R0 + R1; | ||
77 | .Lword8_loop_e: W[P0] = R0; | ||
78 | RTS; | ||
79 | ENDPROC(_outsw_8) | ||
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index bb6d58c931de..5958eecefcf1 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = { | |||
451 | }; | 451 | }; |
452 | #endif | 452 | #endif |
453 | 453 | ||
454 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
455 | /* all SPI peripherals info goes here */ | ||
456 | |||
457 | #if defined(CONFIG_MTD_M25P80) \ | 454 | #if defined(CONFIG_MTD_M25P80) \ |
458 | || defined(CONFIG_MTD_M25P80_MODULE) | 455 | || defined(CONFIG_MTD_M25P80_MODULE) |
459 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 456 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
@@ -647,10 +644,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
647 | { | 644 | { |
648 | .modalias = "ad7877", | 645 | .modalias = "ad7877", |
649 | .platform_data = &bfin_ad7877_ts_info, | 646 | .platform_data = &bfin_ad7877_ts_info, |
650 | .irq = IRQ_PF6, | 647 | .irq = IRQ_PF8, |
651 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 648 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
652 | .bus_num = 0, | 649 | .bus_num = 0, |
653 | .chip_select = 1, | 650 | .chip_select = 2, |
654 | .controller_data = &spi_ad7877_chip_info, | 651 | .controller_data = &spi_ad7877_chip_info, |
655 | }, | 652 | }, |
656 | #endif | 653 | #endif |
@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
676 | #endif | 673 | #endif |
677 | }; | 674 | }; |
678 | 675 | ||
676 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
679 | /* SPI controller data */ | 677 | /* SPI controller data */ |
680 | static struct bfin5xx_spi_master bfin_spi0_info = { | 678 | static struct bfin5xx_spi_master bfin_spi0_info = { |
681 | .num_chipselect = 8, | 679 | .num_chipselect = 8, |
@@ -1018,10 +1016,7 @@ static int __init stamp_init(void) | |||
1018 | #endif | 1016 | #endif |
1019 | 1017 | ||
1020 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 1018 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
1021 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 1019 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
1022 | spi_register_board_info(bfin_spi_board_info, | ||
1023 | ARRAY_SIZE(bfin_spi_board_info)); | ||
1024 | #endif | ||
1025 | 1020 | ||
1026 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 1021 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
1027 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 1022 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 9d28415163ea..079389cbd859 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = { | |||
87 | }; | 87 | }; |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
91 | /* all SPI peripherals info goes here */ | ||
92 | |||
93 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 90 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
94 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 91 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
95 | { | 92 | { |
@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
189 | #endif | 186 | #endif |
190 | }; | 187 | }; |
191 | 188 | ||
189 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
192 | /* SPI (0) */ | 190 | /* SPI (0) */ |
193 | static struct resource bfin_spi0_resource[] = { | 191 | static struct resource bfin_spi0_resource[] = { |
194 | [0] = { | 192 | [0] = { |
@@ -425,9 +423,7 @@ static int __init ezkit_init(void) | |||
425 | { | 423 | { |
426 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 424 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
427 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 425 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
428 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
429 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 426 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
430 | #endif | ||
431 | 427 | ||
432 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 428 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
433 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 429 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 7fd35fb32fd5..13ae49515f73 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -111,7 +111,7 @@ static struct platform_device net2272_bfin_device = { | |||
111 | }; | 111 | }; |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) | 114 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) |
115 | static struct mtd_partition stamp_partitions[] = { | 115 | static struct mtd_partition stamp_partitions[] = { |
116 | { | 116 | { |
117 | .name = "Bootloader", | 117 | .name = "Bootloader", |
@@ -141,13 +141,17 @@ static struct resource stamp_flash_resource[] = { | |||
141 | .end = 0x203fffff, | 141 | .end = 0x203fffff, |
142 | .flags = IORESOURCE_MEM, | 142 | .flags = IORESOURCE_MEM, |
143 | }, { | 143 | }, { |
144 | .start = CONFIG_ENET_FLASH_PIN, | 144 | .start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */ |
145 | .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */ | ||
146 | .flags = IORESOURCE_MEM, | ||
147 | }, { | ||
148 | .start = GPIO_PF0, | ||
145 | .flags = IORESOURCE_IRQ, | 149 | .flags = IORESOURCE_IRQ, |
146 | } | 150 | } |
147 | }; | 151 | }; |
148 | 152 | ||
149 | static struct platform_device stamp_flash_device = { | 153 | static struct platform_device stamp_flash_device = { |
150 | .name = "BF5xx-Flash", | 154 | .name = "bfin-async-flash", |
151 | .id = 0, | 155 | .id = 0, |
152 | .dev = { | 156 | .dev = { |
153 | .platform_data = &stamp_flash_data, | 157 | .platform_data = &stamp_flash_data, |
@@ -157,9 +161,6 @@ static struct platform_device stamp_flash_device = { | |||
157 | }; | 161 | }; |
158 | #endif | 162 | #endif |
159 | 163 | ||
160 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
161 | /* all SPI peripherals info goes here */ | ||
162 | |||
163 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 164 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
164 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 165 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
165 | { | 166 | { |
@@ -316,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
316 | #endif | 317 | #endif |
317 | }; | 318 | }; |
318 | 319 | ||
320 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
319 | /* SPI (0) */ | 321 | /* SPI (0) */ |
320 | static struct resource bfin_spi0_resource[] = { | 322 | static struct resource bfin_spi0_resource[] = { |
321 | [0] = { | 323 | [0] = { |
@@ -595,7 +597,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
595 | 597 | ||
596 | &bfin_gpios_device, | 598 | &bfin_gpios_device, |
597 | 599 | ||
598 | #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) | 600 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) |
599 | &stamp_flash_device, | 601 | &stamp_flash_device, |
600 | #endif | 602 | #endif |
601 | }; | 603 | }; |
@@ -617,15 +619,13 @@ static int __init stamp_init(void) | |||
617 | 619 | ||
618 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 620 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
619 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ | 621 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ |
620 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); | 622 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0); |
621 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); | 623 | bfin_write_FIO_FLAG_S(PF0); |
622 | SSYNC(); | 624 | SSYNC(); |
623 | #endif | 625 | #endif |
624 | 626 | ||
625 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 627 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
626 | spi_register_board_info(bfin_spi_board_info, | 628 | |
627 | ARRAY_SIZE(bfin_spi_board_info)); | ||
628 | #endif | ||
629 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 629 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
630 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 630 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
631 | #endif | 631 | #endif |
@@ -636,8 +636,8 @@ arch_initcall(stamp_init); | |||
636 | 636 | ||
637 | void native_machine_restart(char *cmd) | 637 | void native_machine_restart(char *cmd) |
638 | { | 638 | { |
639 | #define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) | 639 | /* workaround pull up on cpld / flash pin not being strong enough */ |
640 | bfin_write_FIO_INEN(~BIT_TO_SET); | 640 | bfin_write_FIO_INEN(~PF0); |
641 | bfin_write_FIO_DIR(BIT_TO_SET); | 641 | bfin_write_FIO_DIR(PF0); |
642 | bfin_write_FIO_FLAG_C(BIT_TO_SET); | 642 | bfin_write_FIO_FLAG_C(PF0); |
643 | } | 643 | } |
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile index 87e450f29e37..c94f7a5b8211 100644 --- a/arch/blackfin/mach-bf537/boards/Makefile +++ b/arch/blackfin/mach-bf537/boards/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o | 5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o |
6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o | 6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o |
7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o | 7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o |
8 | obj-$(CONFIG_PNAV10) += pnav10.o | 8 | obj-$(CONFIG_PNAV10) += pnav10.o |
9 | obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o | 9 | obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o |
diff --git a/arch/blackfin/mach-bf537/boards/led.S b/arch/blackfin/mach-bf537/boards/led.S deleted file mode 100644 index 4e9ea4283e5f..000000000000 --- a/arch/blackfin/mach-bf537/boards/led.S +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | /**************************************************** | ||
2 | * LED1 ---- PF6 LED2 ---- PF7 * | ||
3 | * LED3 ---- PF8 LED4 ---- PF9 * | ||
4 | * LED5 ---- PF10 LED6 ---- PF11 * | ||
5 | ****************************************************/ | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <asm/blackfin.h> | ||
9 | |||
10 | /* All functions in this file save the registers they uses. | ||
11 | So there is no need to save any registers before calling them. */ | ||
12 | |||
13 | .text; | ||
14 | |||
15 | /* Initialize LEDs. */ | ||
16 | |||
17 | ENTRY(_led_init) | ||
18 | LINK 12; | ||
19 | [--SP] = P0; | ||
20 | [--SP] = R0; | ||
21 | [--SP] = R1; | ||
22 | [--SP] = R2; | ||
23 | R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z); | ||
24 | R2 = ~R1; | ||
25 | |||
26 | P0.H = hi(PORTF_FER); | ||
27 | P0.L = lo(PORTF_FER); | ||
28 | R0 = W[P0](Z); | ||
29 | SSYNC; | ||
30 | R0 = R0 & R2; | ||
31 | W[P0] = R0.L; | ||
32 | SSYNC; | ||
33 | |||
34 | P0.H = hi(PORTFIO_DIR); | ||
35 | P0.L = lo(PORTFIO_DIR); | ||
36 | R0 = W[P0](Z); | ||
37 | SSYNC; | ||
38 | R0 = R0 | R1; | ||
39 | W[P0] = R0.L; | ||
40 | SSYNC; | ||
41 | |||
42 | P0.H = hi(PORTFIO_INEN); | ||
43 | P0.L = lo(PORTFIO_INEN); | ||
44 | R0 = W[P0](Z); | ||
45 | SSYNC; | ||
46 | R0 = R0 & R2; | ||
47 | W[P0] = R0.L; | ||
48 | SSYNC; | ||
49 | |||
50 | R2 = [SP++]; | ||
51 | R1 = [SP++]; | ||
52 | R0 = [SP++]; | ||
53 | P0 = [SP++]; | ||
54 | UNLINK; | ||
55 | RTS; | ||
56 | .size _led_init, .-_led_init | ||
57 | |||
58 | /* Set one LED on. Leave other LEDs unchanged. | ||
59 | It expects the LED number passed through R0. */ | ||
60 | |||
61 | ENTRY(_led_on) | ||
62 | LINK 12; | ||
63 | [--SP] = P0; | ||
64 | [--SP] = R1; | ||
65 | CALL _led_init; | ||
66 | R1 = 1; | ||
67 | R0 += 5; | ||
68 | R1 <<= R0; | ||
69 | P0.H = hi(PORTFIO); | ||
70 | P0.L = lo(PORTFIO); | ||
71 | R0 = W[P0](Z); | ||
72 | SSYNC; | ||
73 | R0 = R0 | R1; | ||
74 | W[P0] = R0.L; | ||
75 | SSYNC; | ||
76 | R1 = [SP++]; | ||
77 | P0 = [SP++]; | ||
78 | UNLINK; | ||
79 | RTS; | ||
80 | .size _led_on, .-_led_on | ||
81 | |||
82 | /* Set one LED off. Leave other LEDs unchanged. */ | ||
83 | |||
84 | ENTRY(_led_off) | ||
85 | LINK 12; | ||
86 | [--SP] = P0; | ||
87 | [--SP] = R1; | ||
88 | CALL _led_init; | ||
89 | R1 = 1; | ||
90 | R0 += 5; | ||
91 | R1 <<= R0; | ||
92 | R1 = ~R1; | ||
93 | P0.H = hi(PORTFIO); | ||
94 | P0.L = lo(PORTFIO); | ||
95 | R0 = W[P0](Z); | ||
96 | SSYNC; | ||
97 | R0 = R0 & R1; | ||
98 | W[P0] = R0.L; | ||
99 | SSYNC; | ||
100 | R1 = [SP++]; | ||
101 | P0 = [SP++]; | ||
102 | UNLINK; | ||
103 | RTS; | ||
104 | .size _led_off, .-_led_off | ||
105 | |||
106 | /* Toggle one LED. Leave other LEDs unchanged. */ | ||
107 | |||
108 | ENTRY(_led_toggle) | ||
109 | LINK 12; | ||
110 | [--SP] = P0; | ||
111 | [--SP] = R1; | ||
112 | CALL _led_init; | ||
113 | R1 = 1; | ||
114 | R0 += 5; | ||
115 | R1 <<= R0; | ||
116 | P0.H = hi(PORTFIO); | ||
117 | P0.L = lo(PORTFIO); | ||
118 | R0 = W[P0](Z); | ||
119 | SSYNC; | ||
120 | R0 = R0 ^ R1; | ||
121 | W[P0] = R0.L; | ||
122 | SSYNC; | ||
123 | R1 = [SP++]; | ||
124 | P0 = [SP++]; | ||
125 | UNLINK; | ||
126 | RTS; | ||
127 | .size _led_toggle, .-_led_toggle | ||
128 | |||
129 | /* Display the number using LEDs in binary format. */ | ||
130 | |||
131 | ENTRY(_led_disp_num) | ||
132 | LINK 12; | ||
133 | [--SP] = P0; | ||
134 | [--SP] = R1; | ||
135 | [--SP] = R2; | ||
136 | CALL _led_init; | ||
137 | R1 = 0x3f(X); | ||
138 | R0 = R0 & R1; | ||
139 | R2 = 6(X); | ||
140 | R0 <<= R2; | ||
141 | R1 <<= R2; | ||
142 | P0.H = hi(PORTFIO); | ||
143 | P0.L = lo(PORTFIO); | ||
144 | R2 = W[P0](Z); | ||
145 | SSYNC; | ||
146 | R1 = ~R1; | ||
147 | R2 = R2 & R1; | ||
148 | R2 = R2 | R0; | ||
149 | W[P0] = R2.L; | ||
150 | SSYNC; | ||
151 | R2 = [SP++]; | ||
152 | R1 = [SP++]; | ||
153 | P0 = [SP++]; | ||
154 | UNLINK; | ||
155 | RTS; | ||
156 | .size _led_disp_num, .-_led_disp_num | ||
157 | |||
158 | /* Toggle the number using LEDs in binary format. */ | ||
159 | |||
160 | ENTRY(_led_toggle_num) | ||
161 | LINK 12; | ||
162 | [--SP] = P0; | ||
163 | [--SP] = R1; | ||
164 | [--SP] = R2; | ||
165 | CALL _led_init; | ||
166 | R1 = 0x3f(X); | ||
167 | R0 = R0 & R1; | ||
168 | R1 = 6(X); | ||
169 | R0 <<= R1; | ||
170 | P0.H = hi(PORTFIO); | ||
171 | P0.L = lo(PORTFIO); | ||
172 | R1 = W[P0](Z); | ||
173 | SSYNC; | ||
174 | R1 = R1 ^ R0; | ||
175 | W[P0] = R1.L; | ||
176 | SSYNC; | ||
177 | R2 = [SP++]; | ||
178 | R1 = [SP++]; | ||
179 | P0 = [SP++]; | ||
180 | UNLINK; | ||
181 | RTS; | ||
182 | .size _led_toggle_num, .-_led_toggle_num | ||
183 | |||
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 9a756d1f3d73..671f9d67f23a 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = { | |||
400 | }; | 400 | }; |
401 | #endif | 401 | #endif |
402 | 402 | ||
403 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
404 | /* all SPI peripherals info goes here */ | ||
405 | |||
406 | #if defined(CONFIG_MTD_M25P80) \ | 403 | #if defined(CONFIG_MTD_M25P80) \ |
407 | || defined(CONFIG_MTD_M25P80_MODULE) | 404 | || defined(CONFIG_MTD_M25P80_MODULE) |
408 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 405 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
629 | #endif | 626 | #endif |
630 | }; | 627 | }; |
631 | 628 | ||
629 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
632 | /* SPI controller data */ | 630 | /* SPI controller data */ |
633 | static struct bfin5xx_spi_master bfin_spi0_info = { | 631 | static struct bfin5xx_spi_master bfin_spi0_info = { |
634 | .num_chipselect = 8, | 632 | .num_chipselect = 8, |
@@ -939,10 +937,7 @@ static int __init stamp_init(void) | |||
939 | #endif | 937 | #endif |
940 | 938 | ||
941 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 939 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
942 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 940 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
943 | spi_register_board_info(bfin_spi_board_info, | ||
944 | ARRAY_SIZE(bfin_spi_board_info)); | ||
945 | #endif | ||
946 | 941 | ||
947 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 942 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
948 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 943 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile index eed161dd7845..319ef54c4221 100644 --- a/arch/blackfin/mach-bf548/boards/Makefile +++ b/arch/blackfin/mach-bf548/boards/Makefile | |||
@@ -2,5 +2,5 @@ | |||
2 | # arch/blackfin/mach-bf548/boards/Makefile | 2 | # arch/blackfin/mach-bf548/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o | 5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o |
6 | obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o | 6 | obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o |
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 3b74f96d3590..4f4ae8787edf 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { | |||
684 | 684 | ||
685 | static int __init cm_bf548_init(void) | 685 | static int __init cm_bf548_init(void) |
686 | { | 686 | { |
687 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 687 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
688 | platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); | 688 | platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); |
689 | 689 | ||
690 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 690 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index d1682bb37509..af7c211a580e 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = { | |||
412 | }; | 412 | }; |
413 | #endif | 413 | #endif |
414 | 414 | ||
415 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
416 | /* all SPI peripherals info goes here */ | ||
417 | #if defined(CONFIG_MTD_M25P80) \ | 415 | #if defined(CONFIG_MTD_M25P80) \ |
418 | || defined(CONFIG_MTD_M25P80_MODULE) | 416 | || defined(CONFIG_MTD_M25P80_MODULE) |
419 | /* SPI flash chip (m25p16) */ | 417 | /* SPI flash chip (m25p16) */ |
@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
481 | }; | 479 | }; |
482 | #endif | 480 | #endif |
483 | 481 | ||
484 | static struct spi_board_info bf54x_spi_board_info[] __initdata = { | 482 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
485 | #if defined(CONFIG_MTD_M25P80) \ | 483 | #if defined(CONFIG_MTD_M25P80) \ |
486 | || defined(CONFIG_MTD_M25P80_MODULE) | 484 | || defined(CONFIG_MTD_M25P80_MODULE) |
487 | { | 485 | { |
@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { | |||
527 | #endif | 525 | #endif |
528 | }; | 526 | }; |
529 | 527 | ||
528 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
530 | /* SPI (0) */ | 529 | /* SPI (0) */ |
531 | static struct resource bfin_spi0_resource[] = { | 530 | static struct resource bfin_spi0_resource[] = { |
532 | [0] = { | 531 | [0] = { |
@@ -800,10 +799,7 @@ static int __init ezkit_init(void) | |||
800 | 799 | ||
801 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 800 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
802 | 801 | ||
803 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 802 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
804 | spi_register_board_info(bf54x_spi_board_info, | ||
805 | ARRAY_SIZE(bf54x_spi_board_info)); | ||
806 | #endif | ||
807 | 803 | ||
808 | return 0; | 804 | return 0; |
809 | } | 805 | } |
diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S deleted file mode 100644 index f47daf3770d0..000000000000 --- a/arch/blackfin/mach-bf548/boards/led.S +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /**************************************************** | ||
2 | * LED1 ---- PG6 LED2 ---- PG7 * | ||
3 | * LED3 ---- PG8 LED4 ---- PG9 * | ||
4 | * LED5 ---- PG10 LED6 ---- PG11 * | ||
5 | ****************************************************/ | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <asm/blackfin.h> | ||
9 | |||
10 | /* All functions in this file save the registers they uses. | ||
11 | So there is no need to save any registers before calling them. */ | ||
12 | |||
13 | .text; | ||
14 | |||
15 | /* Initialize LEDs. */ | ||
16 | |||
17 | ENTRY(_led_init) | ||
18 | LINK 0; | ||
19 | [--SP] = P0; | ||
20 | [--SP] = R0; | ||
21 | [--SP] = R1; | ||
22 | [--SP] = R2; | ||
23 | R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z); | ||
24 | R2 = ~R1; | ||
25 | |||
26 | P0.H = hi(PORTG_FER); | ||
27 | P0.L = lo(PORTG_FER); | ||
28 | R0 = W[P0](Z); | ||
29 | SSYNC; | ||
30 | R0 = R0 & R2; | ||
31 | W[P0] = R0.L; | ||
32 | SSYNC; | ||
33 | |||
34 | P0.H = hi(PORTG_DIR_SET); | ||
35 | P0.L = lo(PORTG_DIR_SET); | ||
36 | W[P0] = R1.L; | ||
37 | SSYNC; | ||
38 | |||
39 | P0.H = hi(PORTG_INEN); | ||
40 | P0.L = lo(PORTG_INEN); | ||
41 | R0 = W[P0](Z); | ||
42 | SSYNC; | ||
43 | R0 = R0 & R2; | ||
44 | W[P0] = R0.L; | ||
45 | SSYNC; | ||
46 | |||
47 | R2 = [SP++]; | ||
48 | R1 = [SP++]; | ||
49 | R0 = [SP++]; | ||
50 | P0 = [SP++]; | ||
51 | RTS; | ||
52 | .size _led_init, .-_led_init | ||
53 | |||
54 | /* Set one LED on. Leave other LEDs unchanged. | ||
55 | It expects the LED number passed through R0. */ | ||
56 | |||
57 | ENTRY(_led_on) | ||
58 | LINK 0; | ||
59 | [--SP] = P0; | ||
60 | [--SP] = R1; | ||
61 | CALL _led_init; | ||
62 | R1 = 1; | ||
63 | R0 += 5; | ||
64 | R1 <<= R0; | ||
65 | P0.H = hi(PORTG_SET); | ||
66 | P0.L = lo(PORTG_SET); | ||
67 | W[P0] = R1.L; | ||
68 | SSYNC; | ||
69 | R1 = [SP++]; | ||
70 | P0 = [SP++]; | ||
71 | UNLINK; | ||
72 | RTS; | ||
73 | .size _led_on, .-_led_on | ||
74 | |||
75 | /* Set one LED off. Leave other LEDs unchanged. */ | ||
76 | |||
77 | ENTRY(_led_off) | ||
78 | LINK 0; | ||
79 | [--SP] = P0; | ||
80 | [--SP] = R1; | ||
81 | CALL _led_init; | ||
82 | R1 = 1; | ||
83 | R0 += 5; | ||
84 | R1 <<= R0; | ||
85 | P0.H = hi(PORTG_CLEAR); | ||
86 | P0.L = lo(PORTG_CLEAR); | ||
87 | W[P0] = R1.L; | ||
88 | SSYNC; | ||
89 | R1 = [SP++]; | ||
90 | P0 = [SP++]; | ||
91 | UNLINK; | ||
92 | RTS; | ||
93 | .size _led_off, .-_led_off | ||
94 | |||
95 | /* Toggle one LED. Leave other LEDs unchanged. */ | ||
96 | |||
97 | ENTRY(_led_toggle) | ||
98 | LINK 0; | ||
99 | [--SP] = P0; | ||
100 | [--SP] = R1; | ||
101 | CALL _led_init; | ||
102 | R1 = 1; | ||
103 | R0 += 5; | ||
104 | R1 <<= R0; | ||
105 | P0.H = hi(PORTG); | ||
106 | P0.L = lo(PORTG); | ||
107 | R0 = W[P0](Z); | ||
108 | SSYNC; | ||
109 | R0 = R0 ^ R1; | ||
110 | W[P0] = R0.L; | ||
111 | SSYNC; | ||
112 | R1 = [SP++]; | ||
113 | P0 = [SP++]; | ||
114 | UNLINK; | ||
115 | RTS; | ||
116 | .size _led_toggle, .-_led_toggle | ||
117 | |||
118 | /* Display the number using LEDs in binary format. */ | ||
119 | |||
120 | ENTRY(_led_disp_num) | ||
121 | LINK 0; | ||
122 | [--SP] = P0; | ||
123 | [--SP] = R1; | ||
124 | [--SP] = R2; | ||
125 | CALL _led_init; | ||
126 | R1 = 0x3f(X); | ||
127 | R0 = R0 & R1; | ||
128 | R2 = 6(X); | ||
129 | R0 <<= R2; | ||
130 | R1 <<= R2; | ||
131 | P0.H = hi(PORTG); | ||
132 | P0.L = lo(PORTG); | ||
133 | R2 = W[P0](Z); | ||
134 | SSYNC; | ||
135 | R1 = ~R1; | ||
136 | R2 = R2 & R1; | ||
137 | R2 = R2 | R0; | ||
138 | W[P0] = R2.L; | ||
139 | SSYNC; | ||
140 | R2 = [SP++]; | ||
141 | R1 = [SP++]; | ||
142 | P0 = [SP++]; | ||
143 | UNLINK; | ||
144 | RTS; | ||
145 | .size _led_disp_num, .-_led_disp_num | ||
146 | |||
147 | /* Toggle the number using LEDs in binary format. */ | ||
148 | |||
149 | ENTRY(_led_toggle_num) | ||
150 | LINK 0; | ||
151 | [--SP] = P0; | ||
152 | [--SP] = R1; | ||
153 | [--SP] = R2; | ||
154 | CALL _led_init; | ||
155 | R1 = 0x3f(X); | ||
156 | R0 = R0 & R1; | ||
157 | R1 = 6(X); | ||
158 | R0 <<= R1; | ||
159 | P0.H = hi(PORTG); | ||
160 | P0.L = lo(PORTG); | ||
161 | R1 = W[P0](Z); | ||
162 | SSYNC; | ||
163 | R1 = R1 ^ R0; | ||
164 | W[P0] = R1.L; | ||
165 | SSYNC; | ||
166 | R2 = [SP++]; | ||
167 | R1 = [SP++]; | ||
168 | P0 = [SP++]; | ||
169 | UNLINK; | ||
170 | RTS; | ||
171 | .size _led_toggle_num, .-_led_toggle_num | ||
172 | |||
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 61d8f7648b24..bc6feded8569 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = { | |||
280 | }; | 280 | }; |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | #ifdef CONFIG_SPI_BFIN | ||
284 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 283 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
285 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 284 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
286 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | 285 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { |
@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = { | |||
295 | .bits_per_word = 8, | 294 | .bits_per_word = 8, |
296 | }; | 295 | }; |
297 | #endif | 296 | #endif |
298 | #endif | ||
299 | 297 | ||
298 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
300 | /* SPI (0) */ | 299 | /* SPI (0) */ |
301 | static struct resource bfin_spi0_resource[] = { | 300 | static struct resource bfin_spi0_resource[] = { |
302 | [0] = { | 301 | [0] = { |
@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = { | |||
327 | .platform_data = &bfin_spi0_info, /* Passed to driver */ | 326 | .platform_data = &bfin_spi0_info, /* Passed to driver */ |
328 | }, | 327 | }, |
329 | }; | 328 | }; |
329 | #endif | ||
330 | 330 | ||
331 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 331 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
332 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 332 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
@@ -537,10 +537,7 @@ static int __init ezkit_init(void) | |||
537 | SSYNC(); | 537 | SSYNC(); |
538 | #endif | 538 | #endif |
539 | 539 | ||
540 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 540 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
541 | spi_register_board_info(bfin_spi_board_info, | ||
542 | ARRAY_SIZE(bfin_spi_board_info)); | ||
543 | #endif | ||
544 | 541 | ||
545 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 542 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
546 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; | 543 | irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; |
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c index ef2db8fd102a..5933656db5a2 100644 --- a/arch/cris/kernel/process.c +++ b/arch/cris/kernel/process.c | |||
@@ -38,7 +38,6 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | static struct fs_struct init_fs = INIT_FS; | 40 | static struct fs_struct init_fs = INIT_FS; |
41 | static struct files_struct init_files = INIT_FILES; | ||
42 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 41 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
43 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 42 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
44 | struct mm_struct init_mm = INIT_MM(init_mm); | 43 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/frv/kernel/cmode.S b/arch/frv/kernel/cmode.S index 81ba28ad2207..53deeb5d7e87 100644 --- a/arch/frv/kernel/cmode.S +++ b/arch/frv/kernel/cmode.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* cmode.S: clock mode management | 1 | /* cmode.S: clock mode management |
2 | * | 2 | * |
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Woodhouse (dwmw2@redhat.com) | 4 | * Written by David Woodhouse (dwmw2@infradead.org) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c index 22993932b3fc..e2198815b630 100644 --- a/arch/frv/kernel/init_task.c +++ b/arch/frv/kernel/init_task.c | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | static struct fs_struct init_fs = INIT_FS; | 13 | static struct fs_struct init_fs = INIT_FS; |
14 | static struct files_struct init_files = INIT_FILES; | ||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 14 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 15 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
17 | struct mm_struct init_mm = INIT_MM(init_mm); | 16 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/frv/kernel/sleep.S b/arch/frv/kernel/sleep.S index c9b2d51ab9ad..f67bf73cd2cc 100644 --- a/arch/frv/kernel/sleep.S +++ b/arch/frv/kernel/sleep.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* sleep.S: power saving mode entry | 1 | /* sleep.S: power saving mode entry |
2 | * | 2 | * |
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Woodhouse (dwmw2@redhat.com) | 4 | * Written by David Woodhouse (dwmw2@infradead.org) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index 4985466b1a7c..64ee58d748be 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* pci-dma-nommu.c: Dynamic DMA mapping support for the FRV | 1 | /* pci-dma-nommu.c: Dynamic DMA mapping support for the FRV |
2 | * | 2 | * |
3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Woodhouse (dwmw2@redhat.com) | 4 | * Written by David Woodhouse (dwmw2@infradead.org) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index b841ecfd5d5a..9af7740f32fb 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/module.h> | ||
29 | 30 | ||
30 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
31 | #include <asm/segment.h> | 32 | #include <asm/segment.h> |
@@ -56,7 +57,9 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
56 | */ | 57 | */ |
57 | static unsigned long empty_bad_page_table; | 58 | static unsigned long empty_bad_page_table; |
58 | static unsigned long empty_bad_page; | 59 | static unsigned long empty_bad_page; |
60 | |||
59 | unsigned long empty_zero_page; | 61 | unsigned long empty_zero_page; |
62 | EXPORT_SYMBOL(empty_zero_page); | ||
60 | 63 | ||
61 | /*****************************************************************************/ | 64 | /*****************************************************************************/ |
62 | /* | 65 | /* |
diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c index 19272c2ac56a..93a4899e46c2 100644 --- a/arch/h8300/kernel/init_task.c +++ b/arch/h8300/kernel/init_task.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | 14 | ||
15 | static struct fs_struct init_fs = INIT_FS; | 15 | static struct fs_struct init_fs = INIT_FS; |
16 | static struct files_struct init_files = INIT_FILES; | ||
17 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
18 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
19 | struct mm_struct init_mm = INIT_MM(init_mm); | 18 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 853d1f11be00..43687cc60dfb 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -465,7 +465,6 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) | |||
465 | printk(KERN_ERR | 465 | printk(KERN_ERR |
466 | "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", | 466 | "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", |
467 | len, slit->header.length); | 467 | len, slit->header.length); |
468 | memset(numa_slit, 10, sizeof(numa_slit)); | ||
469 | return; | 468 | return; |
470 | } | 469 | } |
471 | slit_table = slit; | 470 | slit_table = slit; |
@@ -574,8 +573,14 @@ void __init acpi_numa_arch_fixup(void) | |||
574 | printk(KERN_INFO "Number of memory chunks in system = %d\n", | 573 | printk(KERN_INFO "Number of memory chunks in system = %d\n", |
575 | num_node_memblks); | 574 | num_node_memblks); |
576 | 575 | ||
577 | if (!slit_table) | 576 | if (!slit_table) { |
577 | for (i = 0; i < MAX_NUMNODES; i++) | ||
578 | for (j = 0; j < MAX_NUMNODES; j++) | ||
579 | node_distance(i, j) = i == j ? LOCAL_DISTANCE : | ||
580 | REMOTE_DISTANCE; | ||
578 | return; | 581 | return; |
582 | } | ||
583 | |||
579 | memset(numa_slit, -1, sizeof(numa_slit)); | 584 | memset(numa_slit, -1, sizeof(numa_slit)); |
580 | for (i = 0; i < slit_table->locality_count; i++) { | 585 | for (i = 0; i < slit_table->locality_count; i++) { |
581 | if (!pxm_bit_test(i)) | 586 | if (!pxm_bit_test(i)) |
diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c index bc8efcad28b8..9d7e1c66faf4 100644 --- a/arch/ia64/kernel/init_task.c +++ b/arch/ia64/kernel/init_task.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | 19 | ||
20 | static struct fs_struct init_fs = INIT_FS; | 20 | static struct fs_struct init_fs = INIT_FS; |
21 | static struct files_struct init_files = INIT_FILES; | ||
22 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 21 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
23 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 22 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
24 | struct mm_struct init_mm = INIT_MM(init_mm); | 23 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 6678c49daba3..80b44ea052d7 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -1076,48 +1076,6 @@ END(ia64_syscall_setup) | |||
1076 | DBG_FAULT(15) | 1076 | DBG_FAULT(15) |
1077 | FAULT(15) | 1077 | FAULT(15) |
1078 | 1078 | ||
1079 | /* | ||
1080 | * Squatting in this space ... | ||
1081 | * | ||
1082 | * This special case dispatcher for illegal operation faults allows preserved | ||
1083 | * registers to be modified through a callback function (asm only) that is handed | ||
1084 | * back from the fault handler in r8. Up to three arguments can be passed to the | ||
1085 | * callback function by returning an aggregate with the callback as its first | ||
1086 | * element, followed by the arguments. | ||
1087 | */ | ||
1088 | ENTRY(dispatch_illegal_op_fault) | ||
1089 | .prologue | ||
1090 | .body | ||
1091 | SAVE_MIN_WITH_COVER | ||
1092 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1093 | ;; | ||
1094 | srlz.i // guarantee that interruption collection is on | ||
1095 | ;; | ||
1096 | (p15) ssm psr.i // restore psr.i | ||
1097 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1098 | ;; | ||
1099 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group | ||
1100 | mov out0=ar.ec | ||
1101 | ;; | ||
1102 | SAVE_REST | ||
1103 | PT_REGS_UNWIND_INFO(0) | ||
1104 | ;; | ||
1105 | br.call.sptk.many rp=ia64_illegal_op_fault | ||
1106 | .ret0: ;; | ||
1107 | alloc r14=ar.pfs,0,0,3,0 // must be first in insn group | ||
1108 | mov out0=r9 | ||
1109 | mov out1=r10 | ||
1110 | mov out2=r11 | ||
1111 | movl r15=ia64_leave_kernel | ||
1112 | ;; | ||
1113 | mov rp=r15 | ||
1114 | mov b6=r8 | ||
1115 | ;; | ||
1116 | cmp.ne p6,p0=0,r8 | ||
1117 | (p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel | ||
1118 | br.sptk.many ia64_leave_kernel | ||
1119 | END(dispatch_illegal_op_fault) | ||
1120 | |||
1121 | .org ia64_ivt+0x4000 | 1079 | .org ia64_ivt+0x4000 |
1122 | ///////////////////////////////////////////////////////////////////////////////////////// | 1080 | ///////////////////////////////////////////////////////////////////////////////////////// |
1123 | // 0x4000 Entry 16 (size 64 bundles) Reserved | 1081 | // 0x4000 Entry 16 (size 64 bundles) Reserved |
@@ -1715,6 +1673,48 @@ END(ia32_interrupt) | |||
1715 | DBG_FAULT(67) | 1673 | DBG_FAULT(67) |
1716 | FAULT(67) | 1674 | FAULT(67) |
1717 | 1675 | ||
1676 | /* | ||
1677 | * Squatting in this space ... | ||
1678 | * | ||
1679 | * This special case dispatcher for illegal operation faults allows preserved | ||
1680 | * registers to be modified through a callback function (asm only) that is handed | ||
1681 | * back from the fault handler in r8. Up to three arguments can be passed to the | ||
1682 | * callback function by returning an aggregate with the callback as its first | ||
1683 | * element, followed by the arguments. | ||
1684 | */ | ||
1685 | ENTRY(dispatch_illegal_op_fault) | ||
1686 | .prologue | ||
1687 | .body | ||
1688 | SAVE_MIN_WITH_COVER | ||
1689 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1690 | ;; | ||
1691 | srlz.i // guarantee that interruption collection is on | ||
1692 | ;; | ||
1693 | (p15) ssm psr.i // restore psr.i | ||
1694 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1695 | ;; | ||
1696 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group | ||
1697 | mov out0=ar.ec | ||
1698 | ;; | ||
1699 | SAVE_REST | ||
1700 | PT_REGS_UNWIND_INFO(0) | ||
1701 | ;; | ||
1702 | br.call.sptk.many rp=ia64_illegal_op_fault | ||
1703 | .ret0: ;; | ||
1704 | alloc r14=ar.pfs,0,0,3,0 // must be first in insn group | ||
1705 | mov out0=r9 | ||
1706 | mov out1=r10 | ||
1707 | mov out2=r11 | ||
1708 | movl r15=ia64_leave_kernel | ||
1709 | ;; | ||
1710 | mov rp=r15 | ||
1711 | mov b6=r8 | ||
1712 | ;; | ||
1713 | cmp.ne p6,p0=0,r8 | ||
1714 | (p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel | ||
1715 | br.sptk.many ia64_leave_kernel | ||
1716 | END(dispatch_illegal_op_fault) | ||
1717 | |||
1718 | #ifdef CONFIG_IA32_SUPPORT | 1718 | #ifdef CONFIG_IA32_SUPPORT |
1719 | 1719 | ||
1720 | /* | 1720 | /* |
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index 7c548ac52bbc..74b6d670aaef 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h | |||
@@ -15,6 +15,9 @@ | |||
15 | #define ACCOUNT_SYS_ENTER | 15 | #define ACCOUNT_SYS_ENTER |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | .section ".data.patch.rse", "a" | ||
19 | .previous | ||
20 | |||
18 | /* | 21 | /* |
19 | * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves | 22 | * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves |
20 | * the minimum state necessary that allows us to turn psr.ic back | 23 | * the minimum state necessary that allows us to turn psr.ic back |
@@ -40,7 +43,7 @@ | |||
40 | * Note that psr.ic is NOT turned on by this macro. This is so that | 43 | * Note that psr.ic is NOT turned on by this macro. This is so that |
41 | * we can pass interruption state as arguments to a handler. | 44 | * we can pass interruption state as arguments to a handler. |
42 | */ | 45 | */ |
43 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ | 46 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \ |
44 | mov r16=IA64_KR(CURRENT); /* M */ \ | 47 | mov r16=IA64_KR(CURRENT); /* M */ \ |
45 | mov r27=ar.rsc; /* M */ \ | 48 | mov r27=ar.rsc; /* M */ \ |
46 | mov r20=r1; /* A */ \ | 49 | mov r20=r1; /* A */ \ |
@@ -87,6 +90,7 @@ | |||
87 | tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ | 90 | tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ |
88 | mov r29=b0 \ | 91 | mov r29=b0 \ |
89 | ;; \ | 92 | ;; \ |
93 | WORKAROUND; \ | ||
90 | adds r16=PT(R8),r1; /* initialize first base pointer */ \ | 94 | adds r16=PT(R8),r1; /* initialize first base pointer */ \ |
91 | adds r17=PT(R9),r1; /* initialize second base pointer */ \ | 95 | adds r17=PT(R9),r1; /* initialize second base pointer */ \ |
92 | (pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ | 96 | (pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ |
@@ -206,6 +210,40 @@ | |||
206 | st8 [r25]=r10; /* ar.ssd */ \ | 210 | st8 [r25]=r10; /* ar.ssd */ \ |
207 | ;; | 211 | ;; |
208 | 212 | ||
209 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) | 213 | #define RSE_WORKAROUND \ |
210 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) | 214 | (pUStk) extr.u r17=r18,3,6; \ |
211 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) | 215 | (pUStk) sub r16=r18,r22; \ |
216 | [1:](pKStk) br.cond.sptk.many 1f; \ | ||
217 | .xdata4 ".data.patch.rse",1b-. \ | ||
218 | ;; \ | ||
219 | cmp.ge p6,p7 = 33,r17; \ | ||
220 | ;; \ | ||
221 | (p6) mov r17=0x310; \ | ||
222 | (p7) mov r17=0x308; \ | ||
223 | ;; \ | ||
224 | cmp.leu p1,p0=r16,r17; \ | ||
225 | (p1) br.cond.sptk.many 1f; \ | ||
226 | dep.z r17=r26,0,62; \ | ||
227 | movl r16=2f; \ | ||
228 | ;; \ | ||
229 | mov ar.pfs=r17; \ | ||
230 | dep r27=r0,r27,16,14; \ | ||
231 | mov b0=r16; \ | ||
232 | ;; \ | ||
233 | br.ret.sptk b0; \ | ||
234 | ;; \ | ||
235 | 2: \ | ||
236 | mov ar.rsc=r0 \ | ||
237 | ;; \ | ||
238 | flushrs; \ | ||
239 | ;; \ | ||
240 | mov ar.bspstore=r22 \ | ||
241 | ;; \ | ||
242 | mov r18=ar.bsp; \ | ||
243 | ;; \ | ||
244 | 1: \ | ||
245 | .pred.rel "mutex", pKStk, pUStk | ||
246 | |||
247 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND) | ||
248 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) | ||
249 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) | ||
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index e0dca8743dbb..b83b2c516008 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c | |||
@@ -115,6 +115,29 @@ ia64_patch_vtop (unsigned long start, unsigned long end) | |||
115 | ia64_srlz_i(); | 115 | ia64_srlz_i(); |
116 | } | 116 | } |
117 | 117 | ||
118 | /* | ||
119 | * Disable the RSE workaround by turning the conditional branch | ||
120 | * that we tagged in each place the workaround was used into an | ||
121 | * unconditional branch. | ||
122 | */ | ||
123 | void __init | ||
124 | ia64_patch_rse (unsigned long start, unsigned long end) | ||
125 | { | ||
126 | s32 *offp = (s32 *) start; | ||
127 | u64 ip, *b; | ||
128 | |||
129 | while (offp < (s32 *) end) { | ||
130 | ip = (u64) offp + *offp; | ||
131 | |||
132 | b = (u64 *)(ip & -16); | ||
133 | b[1] &= ~0xf800000L; | ||
134 | ia64_fc((void *) ip); | ||
135 | ++offp; | ||
136 | } | ||
137 | ia64_sync_i(); | ||
138 | ia64_srlz_i(); | ||
139 | } | ||
140 | |||
118 | void __init | 141 | void __init |
119 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | 142 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) |
120 | { | 143 | { |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index e9596cd0cdab..f48a809c686d 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -560,6 +560,17 @@ setup_arch (char **cmdline_p) | |||
560 | /* process SAL system table: */ | 560 | /* process SAL system table: */ |
561 | ia64_sal_init(__va(efi.sal_systab)); | 561 | ia64_sal_init(__va(efi.sal_systab)); |
562 | 562 | ||
563 | #ifdef CONFIG_ITANIUM | ||
564 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
565 | #else | ||
566 | { | ||
567 | u64 num_phys_stacked; | ||
568 | |||
569 | if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96) | ||
570 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
571 | } | ||
572 | #endif | ||
573 | |||
563 | #ifdef CONFIG_SMP | 574 | #ifdef CONFIG_SMP |
564 | cpu_physical_id(0) = hard_smp_processor_id(); | 575 | cpu_physical_id(0) = hard_smp_processor_id(); |
565 | #endif | 576 | #endif |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 80622acc95de..5929ab10a289 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -156,6 +156,13 @@ SECTIONS | |||
156 | __end___vtop_patchlist = .; | 156 | __end___vtop_patchlist = .; |
157 | } | 157 | } |
158 | 158 | ||
159 | .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET) | ||
160 | { | ||
161 | __start___rse_patchlist = .; | ||
162 | *(.data.patch.rse) | ||
163 | __end___rse_patchlist = .; | ||
164 | } | ||
165 | |||
159 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) | 166 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) |
160 | { | 167 | { |
161 | __start___mckinley_e9_bundles = .; | 168 | __start___mckinley_e9_bundles = .; |
diff --git a/arch/ia64/kvm/Makefile b/arch/ia64/kvm/Makefile index 52353397a1a4..112791dd2542 100644 --- a/arch/ia64/kvm/Makefile +++ b/arch/ia64/kvm/Makefile | |||
@@ -7,7 +7,6 @@ offsets-file := asm-offsets.h | |||
7 | always := $(offsets-file) | 7 | always := $(offsets-file) |
8 | targets := $(offsets-file) | 8 | targets := $(offsets-file) |
9 | targets += arch/ia64/kvm/asm-offsets.s | 9 | targets += arch/ia64/kvm/asm-offsets.s |
10 | clean-files := $(addprefix $(objtree)/,$(targets) $(obj)/memcpy.S $(obj)/memset.S) | ||
11 | 10 | ||
12 | # Default sed regexp - multiline due to syntax constraints | 11 | # Default sed regexp - multiline due to syntax constraints |
13 | define sed-y | 12 | define sed-y |
@@ -54,5 +53,5 @@ EXTRA_CFLAGS_vcpu.o += -mfixed-range=f2-f5,f12-f127 | |||
54 | kvm-intel-objs = vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ | 53 | kvm-intel-objs = vmm.o vmm_ivt.o trampoline.o vcpu.o optvfault.o mmio.o \ |
55 | vtlb.o process.o | 54 | vtlb.o process.o |
56 | #Add link memcpy and memset to avoid possible structure assignment error | 55 | #Add link memcpy and memset to avoid possible structure assignment error |
57 | kvm-intel-objs += ../lib/memset.o ../lib/memcpy.o | 56 | kvm-intel-objs += memcpy.o memset.o |
58 | obj-$(CONFIG_KVM_INTEL) += kvm-intel.o | 57 | obj-$(CONFIG_KVM_INTEL) += kvm-intel.o |
diff --git a/arch/ia64/kvm/memcpy.S b/arch/ia64/kvm/memcpy.S new file mode 100644 index 000000000000..c04cdbe9f80f --- /dev/null +++ b/arch/ia64/kvm/memcpy.S | |||
@@ -0,0 +1 @@ | |||
#include "../lib/memcpy.S" | |||
diff --git a/arch/ia64/kvm/memset.S b/arch/ia64/kvm/memset.S new file mode 100644 index 000000000000..83c3066d844a --- /dev/null +++ b/arch/ia64/kvm/memset.S | |||
@@ -0,0 +1 @@ | |||
#include "../lib/memset.S" | |||
diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c index 351bf70da463..7f1a858bc69f 100644 --- a/arch/ia64/kvm/mmio.c +++ b/arch/ia64/kvm/mmio.c | |||
@@ -159,7 +159,8 @@ static void mmio_access(struct kvm_vcpu *vcpu, u64 src_pa, u64 *dest, | |||
159 | 159 | ||
160 | if (p->u.ioreq.state == STATE_IORESP_READY) { | 160 | if (p->u.ioreq.state == STATE_IORESP_READY) { |
161 | if (dir == IOREQ_READ) | 161 | if (dir == IOREQ_READ) |
162 | *dest = p->u.ioreq.data; | 162 | /* it's necessary to ensure zero extending */ |
163 | *dest = p->u.ioreq.data & (~0UL >> (64-(s*8))); | ||
163 | } else | 164 | } else |
164 | panic_vm(vcpu); | 165 | panic_vm(vcpu); |
165 | out: | 166 | out: |
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c index 9e508fd9d970..0d658dbb6766 100644 --- a/arch/m32r/kernel/init_task.c +++ b/arch/m32r/kernel/init_task.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/pgtable.h> | 12 | #include <asm/pgtable.h> |
13 | 13 | ||
14 | static struct fs_struct init_fs = INIT_FS; | 14 | static struct fs_struct init_fs = INIT_FS; |
15 | static struct files_struct init_files = INIT_FILES; | ||
16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
18 | struct mm_struct init_mm = INIT_MM(init_mm); | 17 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index dca50da9ffd0..8e2a0f5faf53 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:41 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index c3cd5b749d2c..e2d511e2a1d1 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:42 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index 073ae4bbe264..6e20d656adaf 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:43 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index 0789ede2e9ee..a0a9b30bb502 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:45 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 3e140bf49b22..6778041de262 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:46 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index ba3a91792cbf..7cd375740348 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:47 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig index 4d23f99227f9..0747fa3984df 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:42:31 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index 188847fed824..e7a8246840b5 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:49 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index 983e53d990c8..ab536eb172bb 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:50 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 7707f3fb0a70..e05be687b500 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:51 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index a765f6f15d2c..296340d2b315 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:53 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 431513937498..8d3a416c92bf 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Sun May 18 14:44:54 2008 | 4 | # Wed May 28 22:47:35 2008 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y | |||
59 | CONFIG_PRINTK=y | 59 | CONFIG_PRINTK=y |
60 | CONFIG_BUG=y | 60 | CONFIG_BUG=y |
61 | CONFIG_ELF_CORE=y | 61 | CONFIG_ELF_CORE=y |
62 | # CONFIG_COMPAT_BRK is not set | 62 | CONFIG_COMPAT_BRK=y |
63 | CONFIG_BASE_FULL=y | 63 | CONFIG_BASE_FULL=y |
64 | CONFIG_FUTEX=y | 64 | CONFIG_FUTEX=y |
65 | CONFIG_ANON_INODES=y | 65 | CONFIG_ANON_INODES=y |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 5de4e4ed76ab..7888cdf91f5d 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -41,7 +41,6 @@ | |||
41 | * setup. | 41 | * setup. |
42 | */ | 42 | */ |
43 | static struct fs_struct init_fs = INIT_FS; | 43 | static struct fs_struct init_fs = INIT_FS; |
44 | static struct files_struct init_files = INIT_FILES; | ||
45 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 44 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
46 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 45 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
47 | struct mm_struct init_mm = INIT_MM(init_mm); | 46 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c index 891e1347bc4e..4253f870e54f 100644 --- a/arch/m68k/lib/string.c +++ b/arch/m68k/lib/string.c | |||
@@ -15,6 +15,12 @@ char *strcpy(char *dest, const char *src) | |||
15 | } | 15 | } |
16 | EXPORT_SYMBOL(strcpy); | 16 | EXPORT_SYMBOL(strcpy); |
17 | 17 | ||
18 | char *strcat(char *dest, const char *src) | ||
19 | { | ||
20 | return __kernel_strcpy(dest + __kernel_strlen(dest), src); | ||
21 | } | ||
22 | EXPORT_SYMBOL(strcat); | ||
23 | |||
18 | void *memset(void *s, int c, size_t count) | 24 | void *memset(void *s, int c, size_t count) |
19 | { | 25 | { |
20 | void *xs = s; | 26 | void *xs = s; |
diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c index 3897043a126a..344c01aede08 100644 --- a/arch/m68knommu/kernel/init_task.c +++ b/arch/m68knommu/kernel/init_task.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | 14 | ||
15 | static struct fs_struct init_fs = INIT_FS; | 15 | static struct fs_struct init_fs = INIT_FS; |
16 | static struct files_struct init_files = INIT_FILES; | ||
17 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
18 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
19 | struct mm_struct init_mm = INIT_MM(init_mm); | 18 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c index ba5a9f32ebd4..454f25493491 100644 --- a/arch/m68knommu/platform/coldfire/timers.c +++ b/arch/m68knommu/platform/coldfire/timers.c | |||
@@ -111,7 +111,13 @@ void hw_timer_init(void) | |||
111 | 111 | ||
112 | __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); | 112 | __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); |
113 | mcftmr_cycles_per_jiffy = FREQ / HZ; | 113 | mcftmr_cycles_per_jiffy = FREQ / HZ; |
114 | __raw_writetrr(mcftmr_cycles_per_jiffy, TA(MCFTIMER_TRR)); | 114 | /* |
115 | * The coldfire timer runs from 0 to TRR included, then 0 | ||
116 | * again and so on. It counts thus actually TRR + 1 steps | ||
117 | * for 1 tick, not TRR. So if you want n cycles, | ||
118 | * initialize TRR with n - 1. | ||
119 | */ | ||
120 | __raw_writetrr(mcftmr_cycles_per_jiffy - 1, TA(MCFTIMER_TRR)); | ||
115 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | | 121 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | |
116 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); | 122 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); |
117 | 123 | ||
diff --git a/arch/mips/au1000/common/clocks.c b/arch/mips/au1000/common/clocks.c index 46f8ee0e2657..043429d17c5f 100644 --- a/arch/mips/au1000/common/clocks.c +++ b/arch/mips/au1000/common/clocks.c | |||
@@ -45,6 +45,7 @@ unsigned int get_au1x00_speed(void) | |||
45 | { | 45 | { |
46 | return au1x00_clock; | 46 | return au1x00_clock; |
47 | } | 47 | } |
48 | EXPORT_SYMBOL(get_au1x00_speed); | ||
48 | 49 | ||
49 | /* | 50 | /* |
50 | * The UART baud base is not known at compile time ... if | 51 | * The UART baud base is not known at compile time ... if |
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index 42d555236de1..601ee9180ee4 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c | |||
@@ -216,6 +216,17 @@ u32 au1xxx_ddma_add_device(dbdev_tab_t *dev) | |||
216 | } | 216 | } |
217 | EXPORT_SYMBOL(au1xxx_ddma_add_device); | 217 | EXPORT_SYMBOL(au1xxx_ddma_add_device); |
218 | 218 | ||
219 | void au1xxx_ddma_del_device(u32 devid) | ||
220 | { | ||
221 | dbdev_tab_t *p = find_dbdev_id(devid); | ||
222 | |||
223 | if (p != NULL) { | ||
224 | memset(p, 0, sizeof(dbdev_tab_t)); | ||
225 | p->dev_id = ~0; | ||
226 | } | ||
227 | } | ||
228 | EXPORT_SYMBOL(au1xxx_ddma_del_device); | ||
229 | |||
219 | /* Allocate a channel and return a non-zero descriptor if successful. */ | 230 | /* Allocate a channel and return a non-zero descriptor if successful. */ |
220 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, | 231 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, |
221 | void (*callback)(int, void *), void *callparam) | 232 | void (*callback)(int, void *), void *callparam) |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index cc0244036aec..65e46a6d4178 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -30,7 +30,6 @@ obj-$(CONFIG_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o | |||
30 | obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o | 30 | obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o |
31 | obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o | 31 | obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o |
32 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o | 32 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o |
33 | obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o | ||
34 | obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o | 33 | obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o |
35 | obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o | 34 | obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o |
36 | obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o | 35 | obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o |
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c index aeda7f58391b..d72487ad7c15 100644 --- a/arch/mips/kernel/init_task.c +++ b/arch/mips/kernel/init_task.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <asm/pgtable.h> | 10 | #include <asm/pgtable.h> |
11 | 11 | ||
12 | static struct fs_struct init_fs = INIT_FS; | 12 | static struct fs_struct init_fs = INIT_FS; |
13 | static struct files_struct init_files = INIT_FILES; | ||
14 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 13 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
15 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 14 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
16 | struct mm_struct init_mm = INIT_MM(init_mm); | 15 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cb8b0e2c7954..f9165d1a17bf 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -88,15 +88,17 @@ static void show_raw_backtrace(unsigned long reg29) | |||
88 | #ifdef CONFIG_KALLSYMS | 88 | #ifdef CONFIG_KALLSYMS |
89 | printk("\n"); | 89 | printk("\n"); |
90 | #endif | 90 | #endif |
91 | #define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000) | 91 | while (!kstack_end(sp)) { |
92 | if (IS_KVA01(sp)) { | 92 | unsigned long __user *p = |
93 | while (!kstack_end(sp)) { | 93 | (unsigned long __user *)(unsigned long)sp++; |
94 | addr = *sp++; | 94 | if (__get_user(addr, p)) { |
95 | if (__kernel_text_address(addr)) | 95 | printk(" (Bad stack address)"); |
96 | print_ip_sym(addr); | 96 | break; |
97 | } | 97 | } |
98 | printk("\n"); | 98 | if (__kernel_text_address(addr)) |
99 | print_ip_sym(addr); | ||
99 | } | 100 | } |
101 | printk("\n"); | ||
100 | } | 102 | } |
101 | 103 | ||
102 | #ifdef CONFIG_KALLSYMS | 104 | #ifdef CONFIG_KALLSYMS |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 008fd82b5840..fe2cac1b4514 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -58,27 +58,8 @@ static int mips_cpu_timer_irq; | |||
58 | static int mips_cpu_perf_irq; | 58 | static int mips_cpu_perf_irq; |
59 | extern int cp0_perfcount_irq; | 59 | extern int cp0_perfcount_irq; |
60 | 60 | ||
61 | DEFINE_PER_CPU(unsigned int, tickcount); | ||
62 | #define tickcount_this_cpu __get_cpu_var(tickcount) | ||
63 | static unsigned long ledbitmask; | ||
64 | |||
65 | static void mips_timer_dispatch(void) | 61 | static void mips_timer_dispatch(void) |
66 | { | 62 | { |
67 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_ATLAS) | ||
68 | /* | ||
69 | * Yes, this is very tacky, won't work as expected with SMTC and | ||
70 | * dyntick will break it, | ||
71 | * but it gives me a nice warm feeling during debug | ||
72 | */ | ||
73 | #define LEDBAR 0xbf000408 | ||
74 | if (tickcount_this_cpu++ >= HZ) { | ||
75 | tickcount_this_cpu = 0; | ||
76 | change_bit(smp_processor_id(), &ledbitmask); | ||
77 | smp_wmb(); /* Make sure every one else sees the change */ | ||
78 | /* This will pick up any recent changes made by other CPU's */ | ||
79 | *(unsigned int *)LEDBAR = ledbitmask; | ||
80 | } | ||
81 | #endif | ||
82 | do_IRQ(mips_cpu_timer_irq); | 63 | do_IRQ(mips_cpu_timer_irq); |
83 | } | 64 | } |
84 | 65 | ||
diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c index d827d6144369..cab81f42eee5 100644 --- a/arch/mips/mm/page.c +++ b/arch/mips/mm/page.c | |||
@@ -310,8 +310,8 @@ void __cpuinit build_clear_page(void) | |||
310 | if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) | 310 | if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) |
311 | uasm_i_lui(&buf, AT, 0xa000); | 311 | uasm_i_lui(&buf, AT, 0xa000); |
312 | 312 | ||
313 | off = min(8, pref_bias_clear_store / cache_line_size) * | 313 | off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size) |
314 | cache_line_size; | 314 | * cache_line_size : 0; |
315 | while (off) { | 315 | while (off) { |
316 | build_clear_pref(&buf, -off); | 316 | build_clear_pref(&buf, -off); |
317 | off -= cache_line_size; | 317 | off -= cache_line_size; |
@@ -454,12 +454,14 @@ void __cpuinit build_copy_page(void) | |||
454 | if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) | 454 | if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) |
455 | uasm_i_lui(&buf, AT, 0xa000); | 455 | uasm_i_lui(&buf, AT, 0xa000); |
456 | 456 | ||
457 | off = min(8, pref_bias_copy_load / cache_line_size) * cache_line_size; | 457 | off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * |
458 | cache_line_size : 0; | ||
458 | while (off) { | 459 | while (off) { |
459 | build_copy_load_pref(&buf, -off); | 460 | build_copy_load_pref(&buf, -off); |
460 | off -= cache_line_size; | 461 | off -= cache_line_size; |
461 | } | 462 | } |
462 | off = min(8, pref_bias_copy_store / cache_line_size) * cache_line_size; | 463 | off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) * |
464 | cache_line_size : 0; | ||
463 | while (off) { | 465 | while (off) { |
464 | build_copy_store_pref(&buf, -off); | 466 | build_copy_store_pref(&buf, -off); |
465 | off -= cache_line_size; | 467 | off -= cache_line_size; |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 382738ca8a0b..76da73a5ab3c 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -224,8 +224,9 @@ static u32 final_handler[64] __cpuinitdata; | |||
224 | static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) | 224 | static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) |
225 | { | 225 | { |
226 | switch (current_cpu_type()) { | 226 | switch (current_cpu_type()) { |
227 | /* Found by experiment: R4600 v2.0 needs this, too. */ | 227 | /* Found by experiment: R4600 v2.0/R4700 needs this, too. */ |
228 | case CPU_R4600: | 228 | case CPU_R4600: |
229 | case CPU_R4700: | ||
229 | case CPU_R5000: | 230 | case CPU_R5000: |
230 | case CPU_R5000A: | 231 | case CPU_R5000A: |
231 | case CPU_NEVADA: | 232 | case CPU_NEVADA: |
diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c index 1fa09929cd7a..b46b3e211775 100644 --- a/arch/mips/pci/ops-bridge.c +++ b/arch/mips/pci/ops-bridge.c | |||
@@ -14,6 +14,22 @@ | |||
14 | #include <asm/sn/sn0/hub.h> | 14 | #include <asm/sn/sn0/hub.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Most of the IOC3 PCI config register aren't present | ||
18 | * we emulate what is needed for a normal PCI enumeration | ||
19 | */ | ||
20 | static u32 emulate_ioc3_cfg(int where, int size) | ||
21 | { | ||
22 | if (size == 1 && where == 0x3d) | ||
23 | return 0x01; | ||
24 | else if (size == 2 && where == 0x3c) | ||
25 | return 0x0100; | ||
26 | else if (size == 4 && where == 0x3c) | ||
27 | return 0x00000100; | ||
28 | |||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | /* | ||
17 | * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is | 33 | * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is |
18 | * not really documented, so right now I can't write code which uses it. | 34 | * not really documented, so right now I can't write code which uses it. |
19 | * Therefore we use type 0 accesses for now even though they won't work | 35 | * Therefore we use type 0 accesses for now even though they won't work |
@@ -64,7 +80,7 @@ oh_my_gawd: | |||
64 | * generic PCI code a chance to look at the wrong register. | 80 | * generic PCI code a chance to look at the wrong register. |
65 | */ | 81 | */ |
66 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { | 82 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { |
67 | *value = 0; | 83 | *value = emulate_ioc3_cfg(where, size); |
68 | return PCIBIOS_SUCCESSFUL; | 84 | return PCIBIOS_SUCCESSFUL; |
69 | } | 85 | } |
70 | 86 | ||
@@ -127,7 +143,7 @@ oh_my_gawd: | |||
127 | * generic PCI code a chance to look at the wrong register. | 143 | * generic PCI code a chance to look at the wrong register. |
128 | */ | 144 | */ |
129 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { | 145 | if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { |
130 | *value = 0; | 146 | *value = emulate_ioc3_cfg(where, size); |
131 | return PCIBIOS_SUCCESSFUL; | 147 | return PCIBIOS_SUCCESSFUL; |
132 | } | 148 | } |
133 | 149 | ||
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index bb64828a92fe..a18516925cdd 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c | |||
@@ -47,6 +47,9 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) | |||
47 | static int num_bridges = 0; | 47 | static int num_bridges = 0; |
48 | bridge_t *bridge; | 48 | bridge_t *bridge; |
49 | int slot; | 49 | int slot; |
50 | extern int pci_probe_only; | ||
51 | |||
52 | pci_probe_only = 1; | ||
50 | 53 | ||
51 | printk("a bridge\n"); | 54 | printk("a bridge\n"); |
52 | 55 | ||
@@ -100,6 +103,11 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) | |||
100 | */ | 103 | */ |
101 | bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP | | 104 | bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP | |
102 | BRIDGE_CTRL_MEM_SWAP; | 105 | BRIDGE_CTRL_MEM_SWAP; |
106 | #ifdef CONFIG_PAGE_SIZE_4KB | ||
107 | bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE; | ||
108 | #else /* 16kB or larger */ | ||
109 | bridge->b_wid_control |= BRIDGE_CTRL_PAGE_SIZE; | ||
110 | #endif | ||
103 | 111 | ||
104 | /* | 112 | /* |
105 | * Hmm... IRIX sets additional bits in the address which | 113 | * Hmm... IRIX sets additional bits in the address which |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index 7093e7c573a4..4a500e8cd3cc 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -161,27 +161,6 @@ cnodeid_t get_compact_nodeid(void) | |||
161 | return NASID_TO_COMPACT_NODEID(get_nasid()); | 161 | return NASID_TO_COMPACT_NODEID(get_nasid()); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* Extracted from the IOC3 meta driver. FIXME. */ | ||
165 | static inline void ioc3_sio_init(void) | ||
166 | { | ||
167 | struct ioc3 *ioc3; | ||
168 | nasid_t nid; | ||
169 | long loops; | ||
170 | |||
171 | nid = get_nasid(); | ||
172 | ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base; | ||
173 | |||
174 | ioc3->sscr_a = 0; /* PIO mode for uarta. */ | ||
175 | ioc3->sscr_b = 0; /* PIO mode for uartb. */ | ||
176 | ioc3->sio_iec = ~0; | ||
177 | ioc3->sio_ies = (SIO_IR_SA_INT | SIO_IR_SB_INT); | ||
178 | |||
179 | loops=1000000; while(loops--); | ||
180 | ioc3->sregs.uarta.iu_fcr = 0; | ||
181 | ioc3->sregs.uartb.iu_fcr = 0; | ||
182 | loops=1000000; while(loops--); | ||
183 | } | ||
184 | |||
185 | static inline void ioc3_eth_init(void) | 164 | static inline void ioc3_eth_init(void) |
186 | { | 165 | { |
187 | struct ioc3 *ioc3; | 166 | struct ioc3 *ioc3; |
@@ -234,7 +213,6 @@ void __init plat_mem_setup(void) | |||
234 | panic("Kernel compiled for N mode."); | 213 | panic("Kernel compiled for N mode."); |
235 | #endif | 214 | #endif |
236 | 215 | ||
237 | ioc3_sio_init(); | ||
238 | ioc3_eth_init(); | 216 | ioc3_eth_init(); |
239 | per_cpu_init(); | 217 | per_cpu_init(); |
240 | 218 | ||
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index bf438d02366e..42cd10956306 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -33,10 +33,6 @@ | |||
33 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) | 33 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) |
34 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) | 34 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) |
35 | 35 | ||
36 | #define SLOT_IGNORED 0xffff | ||
37 | |||
38 | static short __initdata slot_lastfilled_cache[MAX_COMPACT_NODES]; | ||
39 | static unsigned short __initdata slot_psize_cache[MAX_COMPACT_NODES][MAX_MEM_SLOTS]; | ||
40 | static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES]; | 36 | static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES]; |
41 | 37 | ||
42 | struct node_data *__node_data[MAX_COMPACT_NODES]; | 38 | struct node_data *__node_data[MAX_COMPACT_NODES]; |
@@ -267,51 +263,6 @@ static pfn_t __init slot_getbasepfn(cnodeid_t cnode, int slot) | |||
267 | return ((pfn_t)nasid << PFN_NASIDSHFT) | (slot << SLOT_PFNSHIFT); | 263 | return ((pfn_t)nasid << PFN_NASIDSHFT) | (slot << SLOT_PFNSHIFT); |
268 | } | 264 | } |
269 | 265 | ||
270 | /* | ||
271 | * Return the number of pages of memory provided by the given slot | ||
272 | * on the specified node. | ||
273 | */ | ||
274 | static pfn_t __init slot_getsize(cnodeid_t node, int slot) | ||
275 | { | ||
276 | return (pfn_t) slot_psize_cache[node][slot]; | ||
277 | } | ||
278 | |||
279 | /* | ||
280 | * Return highest slot filled | ||
281 | */ | ||
282 | static int __init node_getlastslot(cnodeid_t node) | ||
283 | { | ||
284 | return (int) slot_lastfilled_cache[node]; | ||
285 | } | ||
286 | |||
287 | /* | ||
288 | * Return the pfn of the last free page of memory on a node. | ||
289 | */ | ||
290 | static pfn_t __init node_getmaxclick(cnodeid_t node) | ||
291 | { | ||
292 | pfn_t slot_psize; | ||
293 | int slot; | ||
294 | |||
295 | /* | ||
296 | * Start at the top slot. When we find a slot with memory in it, | ||
297 | * that's the winner. | ||
298 | */ | ||
299 | for (slot = (MAX_MEM_SLOTS - 1); slot >= 0; slot--) { | ||
300 | if ((slot_psize = slot_getsize(node, slot))) { | ||
301 | if (slot_psize == SLOT_IGNORED) | ||
302 | continue; | ||
303 | /* Return the basepfn + the slot size, minus 1. */ | ||
304 | return slot_getbasepfn(node, slot) + slot_psize - 1; | ||
305 | } | ||
306 | } | ||
307 | |||
308 | /* | ||
309 | * If there's no memory on the node, return 0. This is likely | ||
310 | * to cause problems. | ||
311 | */ | ||
312 | return 0; | ||
313 | } | ||
314 | |||
315 | static pfn_t __init slot_psize_compute(cnodeid_t node, int slot) | 266 | static pfn_t __init slot_psize_compute(cnodeid_t node, int slot) |
316 | { | 267 | { |
317 | nasid_t nasid; | 268 | nasid_t nasid; |
@@ -404,13 +355,13 @@ static void __init mlreset(void) | |||
404 | static void __init szmem(void) | 355 | static void __init szmem(void) |
405 | { | 356 | { |
406 | pfn_t slot_psize, slot0sz = 0, nodebytes; /* Hack to detect problem configs */ | 357 | pfn_t slot_psize, slot0sz = 0, nodebytes; /* Hack to detect problem configs */ |
407 | int slot, ignore; | 358 | int slot; |
408 | cnodeid_t node; | 359 | cnodeid_t node; |
409 | 360 | ||
410 | num_physpages = 0; | 361 | num_physpages = 0; |
411 | 362 | ||
412 | for_each_online_node(node) { | 363 | for_each_online_node(node) { |
413 | ignore = nodebytes = 0; | 364 | nodebytes = 0; |
414 | for (slot = 0; slot < MAX_MEM_SLOTS; slot++) { | 365 | for (slot = 0; slot < MAX_MEM_SLOTS; slot++) { |
415 | slot_psize = slot_psize_compute(node, slot); | 366 | slot_psize = slot_psize_compute(node, slot); |
416 | if (slot == 0) | 367 | if (slot == 0) |
@@ -420,21 +371,20 @@ static void __init szmem(void) | |||
420 | * kernel text. | 371 | * kernel text. |
421 | */ | 372 | */ |
422 | nodebytes += (1LL << SLOT_SHIFT); | 373 | nodebytes += (1LL << SLOT_SHIFT); |
374 | |||
375 | if (!slot_psize) | ||
376 | continue; | ||
377 | |||
423 | if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) > | 378 | if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) > |
424 | (slot0sz << PAGE_SHIFT)) | 379 | (slot0sz << PAGE_SHIFT)) { |
425 | ignore = 1; | ||
426 | if (ignore && slot_psize) { | ||
427 | printk("Ignoring slot %d onwards on node %d\n", | 380 | printk("Ignoring slot %d onwards on node %d\n", |
428 | slot, node); | 381 | slot, node); |
429 | slot_psize_cache[node][slot] = SLOT_IGNORED; | ||
430 | slot = MAX_MEM_SLOTS; | 382 | slot = MAX_MEM_SLOTS; |
431 | continue; | 383 | continue; |
432 | } | 384 | } |
433 | num_physpages += slot_psize; | 385 | num_physpages += slot_psize; |
434 | slot_psize_cache[node][slot] = | 386 | add_active_range(node, slot_getbasepfn(node, slot), |
435 | (unsigned short) slot_psize; | 387 | slot_getbasepfn(node, slot) + slot_psize); |
436 | if (slot_psize) | ||
437 | slot_lastfilled_cache[node] = slot; | ||
438 | } | 388 | } |
439 | } | 389 | } |
440 | } | 390 | } |
@@ -442,18 +392,20 @@ static void __init szmem(void) | |||
442 | static void __init node_mem_init(cnodeid_t node) | 392 | static void __init node_mem_init(cnodeid_t node) |
443 | { | 393 | { |
444 | pfn_t slot_firstpfn = slot_getbasepfn(node, 0); | 394 | pfn_t slot_firstpfn = slot_getbasepfn(node, 0); |
445 | pfn_t slot_lastpfn = slot_firstpfn + slot_getsize(node, 0); | ||
446 | pfn_t slot_freepfn = node_getfirstfree(node); | 395 | pfn_t slot_freepfn = node_getfirstfree(node); |
447 | struct pglist_data *pd; | ||
448 | unsigned long bootmap_size; | 396 | unsigned long bootmap_size; |
397 | pfn_t start_pfn, end_pfn; | ||
398 | |||
399 | get_pfn_range_for_nid(node, &start_pfn, &end_pfn); | ||
449 | 400 | ||
450 | /* | 401 | /* |
451 | * Allocate the node data structures on the node first. | 402 | * Allocate the node data structures on the node first. |
452 | */ | 403 | */ |
453 | __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); | 404 | __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); |
454 | 405 | ||
455 | pd = NODE_DATA(node); | 406 | NODE_DATA(node)->bdata = &plat_node_bdata[node]; |
456 | pd->bdata = &plat_node_bdata[node]; | 407 | NODE_DATA(node)->node_start_pfn = start_pfn; |
408 | NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; | ||
457 | 409 | ||
458 | cpus_clear(hub_data(node)->h_cpus); | 410 | cpus_clear(hub_data(node)->h_cpus); |
459 | 411 | ||
@@ -461,12 +413,12 @@ static void __init node_mem_init(cnodeid_t node) | |||
461 | sizeof(struct hub_data)); | 413 | sizeof(struct hub_data)); |
462 | 414 | ||
463 | bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, | 415 | bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, |
464 | slot_firstpfn, slot_lastpfn); | 416 | start_pfn, end_pfn); |
465 | free_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, | 417 | free_bootmem_with_active_regions(node, end_pfn); |
466 | (slot_lastpfn - slot_firstpfn) << PAGE_SHIFT); | ||
467 | reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, | 418 | reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, |
468 | ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size, | 419 | ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size, |
469 | BOOTMEM_DEFAULT); | 420 | BOOTMEM_DEFAULT); |
421 | sparse_memory_present_with_active_regions(node); | ||
470 | } | 422 | } |
471 | 423 | ||
472 | /* | 424 | /* |
@@ -515,16 +467,15 @@ void __init paging_init(void) | |||
515 | pagetable_init(); | 467 | pagetable_init(); |
516 | 468 | ||
517 | for_each_online_node(node) { | 469 | for_each_online_node(node) { |
518 | pfn_t start_pfn = slot_getbasepfn(node, 0); | 470 | pfn_t start_pfn, end_pfn; |
519 | pfn_t end_pfn = node_getmaxclick(node) + 1; | ||
520 | 471 | ||
521 | zones_size[ZONE_NORMAL] = end_pfn - start_pfn; | 472 | get_pfn_range_for_nid(node, &start_pfn, &end_pfn); |
522 | free_area_init_node(node, NODE_DATA(node), | ||
523 | zones_size, start_pfn, NULL); | ||
524 | 473 | ||
525 | if (end_pfn > max_low_pfn) | 474 | if (end_pfn > max_low_pfn) |
526 | max_low_pfn = end_pfn; | 475 | max_low_pfn = end_pfn; |
527 | } | 476 | } |
477 | zones_size[ZONE_NORMAL] = max_low_pfn; | ||
478 | free_area_init_nodes(zones_size); | ||
528 | } | 479 | } |
529 | 480 | ||
530 | void __init mem_init(void) | 481 | void __init mem_init(void) |
@@ -535,34 +486,10 @@ void __init mem_init(void) | |||
535 | high_memory = (void *) __va(num_physpages << PAGE_SHIFT); | 486 | high_memory = (void *) __va(num_physpages << PAGE_SHIFT); |
536 | 487 | ||
537 | for_each_online_node(node) { | 488 | for_each_online_node(node) { |
538 | unsigned slot, numslots; | ||
539 | struct page *end, *p; | ||
540 | |||
541 | /* | 489 | /* |
542 | * This will free up the bootmem, ie, slot 0 memory. | 490 | * This will free up the bootmem, ie, slot 0 memory. |
543 | */ | 491 | */ |
544 | totalram_pages += free_all_bootmem_node(NODE_DATA(node)); | 492 | totalram_pages += free_all_bootmem_node(NODE_DATA(node)); |
545 | |||
546 | /* | ||
547 | * We need to manually do the other slots. | ||
548 | */ | ||
549 | numslots = node_getlastslot(node); | ||
550 | for (slot = 1; slot <= numslots; slot++) { | ||
551 | p = nid_page_nr(node, slot_getbasepfn(node, slot) - | ||
552 | slot_getbasepfn(node, 0)); | ||
553 | |||
554 | /* | ||
555 | * Free valid memory in current slot. | ||
556 | */ | ||
557 | for (end = p + slot_getsize(node, slot); p < end; p++) { | ||
558 | /* if (!page_is_ram(pgnr)) continue; */ | ||
559 | /* commented out until page_is_ram works */ | ||
560 | ClearPageReserved(p); | ||
561 | init_page_count(p); | ||
562 | __free_page(p); | ||
563 | totalram_pages++; | ||
564 | } | ||
565 | } | ||
566 | } | 493 | } |
567 | 494 | ||
568 | totalram_pages -= setup_zero_pages(); /* This comes from node 0 */ | 495 | totalram_pages -= setup_zero_pages(); /* This comes from node 0 */ |
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index f15fc93d6b35..ba5cdebeaf0d 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c | |||
@@ -176,11 +176,14 @@ static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action) | |||
176 | static void __cpuinit ip27_init_secondary(void) | 176 | static void __cpuinit ip27_init_secondary(void) |
177 | { | 177 | { |
178 | per_cpu_init(); | 178 | per_cpu_init(); |
179 | local_irq_enable(); | ||
180 | } | 179 | } |
181 | 180 | ||
182 | static void __cpuinit ip27_smp_finish(void) | 181 | static void __cpuinit ip27_smp_finish(void) |
183 | { | 182 | { |
183 | extern void hub_rt_clock_event_init(void); | ||
184 | |||
185 | hub_rt_clock_event_init(); | ||
186 | local_irq_enable(); | ||
184 | } | 187 | } |
185 | 188 | ||
186 | static void __init ip27_cpus_done(void) | 189 | static void __init ip27_cpus_done(void) |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 9cebc9e7da63..8b4e854af925 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -160,10 +160,13 @@ static void rt_set_mode(enum clock_event_mode mode, | |||
160 | 160 | ||
161 | int rt_timer_irq; | 161 | int rt_timer_irq; |
162 | 162 | ||
163 | static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent); | ||
164 | static DEFINE_PER_CPU(char [11], hub_rt_name); | ||
165 | |||
163 | static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id) | 166 | static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id) |
164 | { | 167 | { |
165 | struct clock_event_device *cd = dev_id; | ||
166 | unsigned int cpu = smp_processor_id(); | 168 | unsigned int cpu = smp_processor_id(); |
169 | struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); | ||
167 | int slice = cputoslice(cpu); | 170 | int slice = cputoslice(cpu); |
168 | 171 | ||
169 | /* | 172 | /* |
@@ -192,10 +195,7 @@ struct irqaction hub_rt_irqaction = { | |||
192 | #define NSEC_PER_CYCLE 800 | 195 | #define NSEC_PER_CYCLE 800 |
193 | #define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE) | 196 | #define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE) |
194 | 197 | ||
195 | static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent); | 198 | void __cpuinit hub_rt_clock_event_init(void) |
196 | static DEFINE_PER_CPU(char [11], hub_rt_name); | ||
197 | |||
198 | static void __cpuinit hub_rt_clock_event_init(void) | ||
199 | { | 199 | { |
200 | unsigned int cpu = smp_processor_id(); | 200 | unsigned int cpu = smp_processor_id(); |
201 | struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); | 201 | struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); |
@@ -203,17 +203,16 @@ static void __cpuinit hub_rt_clock_event_init(void) | |||
203 | int irq = rt_timer_irq; | 203 | int irq = rt_timer_irq; |
204 | 204 | ||
205 | sprintf(name, "hub-rt %d", cpu); | 205 | sprintf(name, "hub-rt %d", cpu); |
206 | cd->name = "HUB-RT", | 206 | cd->name = name; |
207 | cd->features = CLOCK_EVT_FEAT_ONESHOT, | 207 | cd->features = CLOCK_EVT_FEAT_ONESHOT; |
208 | clockevent_set_clock(cd, CYCLES_PER_SEC); | 208 | clockevent_set_clock(cd, CYCLES_PER_SEC); |
209 | cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); | 209 | cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); |
210 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); | 210 | cd->min_delta_ns = clockevent_delta2ns(0x300, cd); |
211 | cd->rating = 200, | 211 | cd->rating = 200; |
212 | cd->irq = irq, | 212 | cd->irq = irq; |
213 | cd->cpumask = cpumask_of_cpu(cpu), | 213 | cd->cpumask = cpumask_of_cpu(cpu); |
214 | cd->rating = 300, | 214 | cd->set_next_event = rt_next_event; |
215 | cd->set_next_event = rt_next_event, | 215 | cd->set_mode = rt_set_mode; |
216 | cd->set_mode = rt_set_mode, | ||
217 | clockevents_register_device(cd); | 216 | clockevents_register_device(cd); |
218 | } | 217 | } |
219 | 218 | ||
@@ -261,6 +260,7 @@ void __init plat_time_init(void) | |||
261 | { | 260 | { |
262 | hub_rt_clocksource_init(); | 261 | hub_rt_clocksource_init(); |
263 | hub_rt_clock_event_global_init(); | 262 | hub_rt_clock_event_global_init(); |
263 | hub_rt_clock_event_init(); | ||
264 | } | 264 | } |
265 | 265 | ||
266 | void __cpuinit cpu_time_init(void) | 266 | void __cpuinit cpu_time_init(void) |
@@ -281,7 +281,6 @@ void __cpuinit cpu_time_init(void) | |||
281 | 281 | ||
282 | printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed); | 282 | printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed); |
283 | 283 | ||
284 | hub_rt_clock_event_init(); | ||
285 | set_c0_status(SRB_TIMOCLK); | 284 | set_c0_status(SRB_TIMOCLK); |
286 | } | 285 | } |
287 | 286 | ||
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c index 39fe6882dd1d..af16f6e5c918 100644 --- a/arch/mn10300/kernel/init_task.c +++ b/arch/mn10300/kernel/init_task.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
20 | 20 | ||
21 | static struct fs_struct init_fs = INIT_FS; | 21 | static struct fs_struct init_fs = INIT_FS; |
22 | static struct files_struct init_files = INIT_FILES; | ||
23 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 22 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
24 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 23 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
25 | struct mm_struct init_mm = INIT_MM(init_mm); | 24 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S index f0b18ce89842..38a1c1b8d4e8 100644 --- a/arch/parisc/hpux/gate.S +++ b/arch/parisc/hpux/gate.S | |||
@@ -13,10 +13,9 @@ | |||
13 | #include <asm/unistd.h> | 13 | #include <asm/unistd.h> |
14 | #include <asm/errno.h> | 14 | #include <asm/errno.h> |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | ||
17 | 16 | ||
18 | .level LEVEL | 17 | .level LEVEL |
19 | __HEAD | 18 | .text |
20 | 19 | ||
21 | .import hpux_call_table | 20 | .import hpux_call_table |
22 | .import hpux_syscall_exit,code | 21 | .import hpux_syscall_exit,code |
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S index ccd3a50c0995..58c53c879c02 100644 --- a/arch/parisc/hpux/wrappers.S +++ b/arch/parisc/hpux/wrappers.S | |||
@@ -28,10 +28,9 @@ | |||
28 | #include <asm/assembly.h> | 28 | #include <asm/assembly.h> |
29 | #include <asm/signal.h> | 29 | #include <asm/signal.h> |
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | ||
32 | 31 | ||
33 | .level LEVEL | 32 | .level LEVEL |
34 | __HEAD | 33 | .text |
35 | 34 | ||
36 | /* These should probably go in a header file somewhere. | 35 | /* These should probably go in a header file somewhere. |
37 | * They are duplicated in kernel/wrappers.S | 36 | * They are duplicated in kernel/wrappers.S |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 5d0837458c19..d1fa4edd2d80 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <asm/thread_info.h> | 38 | #include <asm/thread_info.h> |
39 | 39 | ||
40 | #include <linux/linkage.h> | 40 | #include <linux/linkage.h> |
41 | #include <linux/init.h> | ||
42 | 41 | ||
43 | #ifdef CONFIG_64BIT | 42 | #ifdef CONFIG_64BIT |
44 | .level 2.0w | 43 | .level 2.0w |
@@ -622,7 +621,7 @@ | |||
622 | * the static part of the kernel address space. | 621 | * the static part of the kernel address space. |
623 | */ | 622 | */ |
624 | 623 | ||
625 | __HEAD | 624 | .text |
626 | 625 | ||
627 | .align PAGE_SIZE | 626 | .align PAGE_SIZE |
628 | 627 | ||
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index 5680a2c3b13d..a84e31e82876 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -33,6 +33,7 @@ ENTRY(boot_args) | |||
33 | END(boot_args) | 33 | END(boot_args) |
34 | 34 | ||
35 | __HEAD | 35 | __HEAD |
36 | |||
36 | .align 4 | 37 | .align 4 |
37 | .import init_thread_union,data | 38 | .import init_thread_union,data |
38 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ | 39 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ |
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S index 068322eb8c9b..2cbf13b3ef11 100644 --- a/arch/parisc/kernel/hpmc.S +++ b/arch/parisc/kernel/hpmc.S | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <asm/pdc.h> | 47 | #include <asm/pdc.h> |
48 | 48 | ||
49 | #include <linux/linkage.h> | 49 | #include <linux/linkage.h> |
50 | #include <linux/init.h> | ||
51 | 50 | ||
52 | /* | 51 | /* |
53 | * stack for os_hpmc, the HPMC handler. | 52 | * stack for os_hpmc, the HPMC handler. |
@@ -77,7 +76,7 @@ ENTRY(hpmc_pim_data) | |||
77 | .block HPMC_PIM_DATA_SIZE | 76 | .block HPMC_PIM_DATA_SIZE |
78 | END(hpmc_pim_data) | 77 | END(hpmc_pim_data) |
79 | 78 | ||
80 | __HEAD | 79 | .text |
81 | 80 | ||
82 | .import intr_save, code | 81 | .import intr_save, code |
83 | ENTRY(os_hpmc) | 82 | ENTRY(os_hpmc) |
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c index 26198a074d67..f5941c086551 100644 --- a/arch/parisc/kernel/init_task.c +++ b/arch/parisc/kernel/init_task.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/pgalloc.h> | 35 | #include <asm/pgalloc.h> |
36 | 36 | ||
37 | static struct fs_struct init_fs = INIT_FS; | 37 | static struct fs_struct init_fs = INIT_FS; |
38 | static struct files_struct init_files = INIT_FILES; | ||
39 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 38 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
40 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 39 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
41 | struct mm_struct init_mm = INIT_MM(init_mm); | 40 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index e3246a5ca74f..09b77b2553c6 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -37,9 +37,8 @@ | |||
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/cache.h> | 38 | #include <asm/cache.h> |
39 | #include <linux/linkage.h> | 39 | #include <linux/linkage.h> |
40 | #include <linux/init.h> | ||
41 | 40 | ||
42 | __HEAD | 41 | .text |
43 | .align 128 | 42 | .align 128 |
44 | 43 | ||
45 | ENTRY(flush_tlb_all_local) | 44 | ENTRY(flush_tlb_all_local) |
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 5b7fc4aa044d..0eecfbbc59cd 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c | |||
@@ -152,3 +152,6 @@ EXPORT_SYMBOL($$dyncall); | |||
152 | EXPORT_SYMBOL(node_data); | 152 | EXPORT_SYMBOL(node_data); |
153 | EXPORT_SYMBOL(pfnnid_map); | 153 | EXPORT_SYMBOL(pfnnid_map); |
154 | #endif | 154 | #endif |
155 | |||
156 | /* from pacache.S -- needed for copy_page */ | ||
157 | EXPORT_SYMBOL(copy_user_page_asm); | ||
diff --git a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S index d411dfb5b6d1..fa6ea99bb324 100644 --- a/arch/parisc/kernel/perf_asm.S +++ b/arch/parisc/kernel/perf_asm.S | |||
@@ -43,7 +43,7 @@ | |||
43 | ; The coprocessor only needs to be enabled when | 43 | ; The coprocessor only needs to be enabled when |
44 | ; starting/stopping the coprocessor with the pmenb/pmdis. | 44 | ; starting/stopping the coprocessor with the pmenb/pmdis. |
45 | ; | 45 | ; |
46 | __HEAD | 46 | .text |
47 | 47 | ||
48 | ENTRY(perf_intrigue_enable_perf_counters) | 48 | ENTRY(perf_intrigue_enable_perf_counters) |
49 | .proc | 49 | .proc |
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S index 47fbdae6efd5..7a92695d95a6 100644 --- a/arch/parisc/kernel/real2.S +++ b/arch/parisc/kernel/real2.S | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/assembly.h> | 12 | #include <asm/assembly.h> |
13 | 13 | ||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/init.h> | ||
16 | 15 | ||
17 | .section .bss | 16 | .section .bss |
18 | .export real_stack | 17 | .export real_stack |
@@ -40,7 +39,7 @@ save_cr_end: | |||
40 | /************************ 32-bit real-mode calls ***********************/ | 39 | /************************ 32-bit real-mode calls ***********************/ |
41 | /* This can be called in both narrow and wide kernels */ | 40 | /* This can be called in both narrow and wide kernels */ |
42 | 41 | ||
43 | __HEAD | 42 | .text |
44 | 43 | ||
45 | /* unsigned long real32_call_asm(unsigned int *sp, | 44 | /* unsigned long real32_call_asm(unsigned int *sp, |
46 | * unsigned int *arg0p, | 45 | * unsigned int *arg0p, |
@@ -114,7 +113,7 @@ ENDPROC(real32_call_asm) | |||
114 | # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) | 113 | # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) |
115 | # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r | 114 | # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r |
116 | 115 | ||
117 | __HEAD | 116 | .text |
118 | save_control_regs: | 117 | save_control_regs: |
119 | load32 PA(save_cr_space), %r28 | 118 | load32 PA(save_cr_space), %r28 |
120 | PUSH_CR(%cr24, %r28) | 119 | PUSH_CR(%cr24, %r28) |
@@ -146,7 +145,7 @@ restore_control_regs: | |||
146 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for | 145 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for |
147 | * more general-purpose use by the several places which need RFIs | 146 | * more general-purpose use by the several places which need RFIs |
148 | */ | 147 | */ |
149 | __HEAD | 148 | .text |
150 | .align 128 | 149 | .align 128 |
151 | rfi_virt2real: | 150 | rfi_virt2real: |
152 | /* switch to real mode... */ | 151 | /* switch to real mode... */ |
@@ -181,7 +180,7 @@ rfi_v2r_1: | |||
181 | bv 0(%r2) | 180 | bv 0(%r2) |
182 | nop | 181 | nop |
183 | 182 | ||
184 | __HEAD | 183 | .text |
185 | .align 128 | 184 | .align 128 |
186 | rfi_real2virt: | 185 | rfi_real2virt: |
187 | rsm PSW_SM_I,%r0 | 186 | rsm PSW_SM_I,%r0 |
@@ -219,7 +218,7 @@ rfi_r2v_1: | |||
219 | 218 | ||
220 | /************************ 64-bit real-mode calls ***********************/ | 219 | /************************ 64-bit real-mode calls ***********************/ |
221 | /* This is only usable in wide kernels right now and will probably stay so */ | 220 | /* This is only usable in wide kernels right now and will probably stay so */ |
222 | __HEAD | 221 | .text |
223 | /* unsigned long real64_call_asm(unsigned long *sp, | 222 | /* unsigned long real64_call_asm(unsigned long *sp, |
224 | * unsigned long *arg0p, | 223 | * unsigned long *arg0p, |
225 | * unsigned long fn) | 224 | * unsigned long fn) |
@@ -277,7 +276,7 @@ ENDPROC(real64_call_asm) | |||
277 | 276 | ||
278 | #endif | 277 | #endif |
279 | 278 | ||
280 | __HEAD | 279 | .text |
281 | /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html | 280 | /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html |
282 | ** GCC 3.3 and later has a new function in libgcc.a for | 281 | ** GCC 3.3 and later has a new function in libgcc.a for |
283 | ** comparing function pointers. | 282 | ** comparing function pointers. |
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index db94affe5c71..fb59852006de 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -289,7 +289,7 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __ | |||
289 | &sc->sc_iaoq[0], compat_reg); | 289 | &sc->sc_iaoq[0], compat_reg); |
290 | 290 | ||
291 | /* Store upper half */ | 291 | /* Store upper half */ |
292 | compat_reg = (compat_uint_t)(regs->gr[32] >> 32); | 292 | compat_reg = (compat_uint_t)(regs->gr[31] >> 32); |
293 | err |= __put_user(compat_reg, &rf->rf_iaoq[0]); | 293 | err |= __put_user(compat_reg, &rf->rf_iaoq[0]); |
294 | DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg); | 294 | DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg); |
295 | 295 | ||
@@ -299,7 +299,7 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __ | |||
299 | DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n", | 299 | DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n", |
300 | &sc->sc_iaoq[1], compat_reg); | 300 | &sc->sc_iaoq[1], compat_reg); |
301 | /* Store upper half */ | 301 | /* Store upper half */ |
302 | compat_reg = (compat_uint_t)((regs->gr[32]+4) >> 32); | 302 | compat_reg = (compat_uint_t)((regs->gr[31]+4) >> 32); |
303 | err |= __put_user(compat_reg, &rf->rf_iaoq[1]); | 303 | err |= __put_user(compat_reg, &rf->rf_iaoq[1]); |
304 | DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg); | 304 | DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg); |
305 | 305 | ||
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index ae509d8cd03f..69b6eebc466e 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | 18 | ||
19 | #include <linux/linkage.h> | 19 | #include <linux/linkage.h> |
20 | #include <linux/init.h> | ||
21 | 20 | ||
22 | /* We fill the empty parts of the gateway page with | 21 | /* We fill the empty parts of the gateway page with |
23 | * something that will kill the kernel or a | 22 | * something that will kill the kernel or a |
@@ -27,7 +26,7 @@ | |||
27 | 26 | ||
28 | .level LEVEL | 27 | .level LEVEL |
29 | 28 | ||
30 | __HEAD | 29 | .text |
31 | 30 | ||
32 | .import syscall_exit,code | 31 | .import syscall_exit,code |
33 | .import syscall_exit_rfi,code | 32 | .import syscall_exit_rfi,code |
@@ -637,7 +636,7 @@ END(sys_call_table64) | |||
637 | All light-weight-syscall atomic operations | 636 | All light-weight-syscall atomic operations |
638 | will use this set of locks | 637 | will use this set of locks |
639 | */ | 638 | */ |
640 | .section .data, "aw" | 639 | .section .data |
641 | .align PAGE_SIZE | 640 | .align PAGE_SIZE |
642 | ENTRY(lws_lock_start) | 641 | ENTRY(lws_lock_start) |
643 | /* lws locks */ | 642 | /* lws locks */ |
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 50b4a3a25d0a..2e516b871752 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S | |||
@@ -50,6 +50,7 @@ SECTIONS | |||
50 | 50 | ||
51 | _text = .; /* Text and read-only data */ | 51 | _text = .; /* Text and read-only data */ |
52 | .text ALIGN(16) : { | 52 | .text ALIGN(16) : { |
53 | HEAD_TEXT | ||
53 | TEXT_TEXT | 54 | TEXT_TEXT |
54 | SCHED_TEXT | 55 | SCHED_TEXT |
55 | LOCK_TEXT | 56 | LOCK_TEXT |
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S index 4821ad6d5269..d172d4245cdc 100644 --- a/arch/parisc/lib/fixup.S +++ b/arch/parisc/lib/fixup.S | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/assembly.h> | 23 | #include <asm/assembly.h> |
24 | #include <asm/errno.h> | 24 | #include <asm/errno.h> |
25 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
26 | #include <linux/init.h> | ||
27 | 26 | ||
28 | #ifdef CONFIG_SMP | 27 | #ifdef CONFIG_SMP |
29 | .macro get_fault_ip t1 t2 | 28 | .macro get_fault_ip t1 t2 |
@@ -56,7 +55,7 @@ | |||
56 | 55 | ||
57 | .level LEVEL | 56 | .level LEVEL |
58 | 57 | ||
59 | __HEAD | 58 | .text |
60 | .section .fixup, "ax" | 59 | .section .fixup, "ax" |
61 | 60 | ||
62 | /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ | 61 | /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ |
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S index b0d885350846..1bd23ccec17b 100644 --- a/arch/parisc/lib/lusercopy.S +++ b/arch/parisc/lib/lusercopy.S | |||
@@ -33,12 +33,11 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | 35 | ||
36 | .text | ||
37 | |||
36 | #include <asm/assembly.h> | 38 | #include <asm/assembly.h> |
37 | #include <asm/errno.h> | 39 | #include <asm/errno.h> |
38 | #include <linux/linkage.h> | 40 | #include <linux/linkage.h> |
39 | #include <linux/init.h> | ||
40 | |||
41 | __HEAD | ||
42 | 41 | ||
43 | /* | 42 | /* |
44 | * get_sr gets the appropriate space value into | 43 | * get_sr gets the appropriate space value into |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 78fe252b92c3..ce0da689a89d 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -547,6 +547,7 @@ void __init mem_init(void) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | unsigned long *empty_zero_page __read_mostly; | 549 | unsigned long *empty_zero_page __read_mostly; |
550 | EXPORT_SYMBOL(empty_zero_page); | ||
550 | 551 | ||
551 | void show_mem(void) | 552 | void show_mem(void) |
552 | { | 553 | { |
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index 2347294ff35b..2f50acd11a60 100644 --- a/arch/powerpc/boot/.gitignore +++ b/arch/powerpc/boot/.gitignore | |||
@@ -20,21 +20,19 @@ kernel-vmlinux.strip.gz | |||
20 | mktree | 20 | mktree |
21 | uImage | 21 | uImage |
22 | cuImage.* | 22 | cuImage.* |
23 | dtbImage.* | ||
23 | treeImage.* | 24 | treeImage.* |
24 | zImage | 25 | zImage |
26 | zImage.initrd | ||
25 | zImage.bin.* | 27 | zImage.bin.* |
26 | zImage.chrp | 28 | zImage.chrp |
27 | zImage.coff | 29 | zImage.coff |
28 | zImage.coff.lds | 30 | zImage.holly |
29 | zImage.ep* | ||
30 | zImage.iseries | 31 | zImage.iseries |
31 | zImage.*lds | 32 | zImage.*lds |
32 | zImage.miboot | 33 | zImage.miboot |
33 | zImage.pmac | 34 | zImage.pmac |
34 | zImage.pseries | 35 | zImage.pseries |
35 | zImage.redboot* | ||
36 | zImage.sandpoint | ||
37 | zImage.vmode | ||
38 | zconf.h | 36 | zconf.h |
39 | zlib.h | 37 | zlib.h |
40 | zutil.h | 38 | zutil.h |
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c index 758edf1c5815..5c878436f348 100644 --- a/arch/powerpc/boot/4xx.c +++ b/arch/powerpc/boot/4xx.c | |||
@@ -21,6 +21,25 @@ | |||
21 | #include "reg.h" | 21 | #include "reg.h" |
22 | #include "dcr.h" | 22 | #include "dcr.h" |
23 | 23 | ||
24 | static unsigned long chip_11_errata(unsigned long memsize) | ||
25 | { | ||
26 | unsigned long pvr; | ||
27 | |||
28 | pvr = mfpvr(); | ||
29 | |||
30 | switch (pvr & 0xf0000ff0) { | ||
31 | case 0x40000850: | ||
32 | case 0x400008d0: | ||
33 | case 0x200008d0: | ||
34 | memsize -= 4096; | ||
35 | break; | ||
36 | default: | ||
37 | break; | ||
38 | } | ||
39 | |||
40 | return memsize; | ||
41 | } | ||
42 | |||
24 | /* Read the 4xx SDRAM controller to get size of system memory. */ | 43 | /* Read the 4xx SDRAM controller to get size of system memory. */ |
25 | void ibm4xx_sdram_fixup_memsize(void) | 44 | void ibm4xx_sdram_fixup_memsize(void) |
26 | { | 45 | { |
@@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void) | |||
34 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); | 53 | memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); |
35 | } | 54 | } |
36 | 55 | ||
56 | memsize = chip_11_errata(memsize); | ||
37 | dt_fixup_memory(0, memsize); | 57 | dt_fixup_memory(0, memsize); |
38 | } | 58 | } |
39 | 59 | ||
@@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void) | |||
199 | bank = 4; /* 4 banks */ | 219 | bank = 4; /* 4 banks */ |
200 | 220 | ||
201 | memsize = cs * (1 << (col+row)) * bank * dpath; | 221 | memsize = cs * (1 << (col+row)) * bank * dpath; |
222 | memsize = chip_11_errata(memsize); | ||
202 | dt_fixup_memory(0, memsize); | 223 | dt_fixup_memory(0, memsize); |
203 | } | 224 | } |
204 | 225 | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 7822d25c9d31..d53b84e761a9 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -99,7 +99,7 @@ $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srct | |||
99 | @cp $< $@ | 99 | @cp $< $@ |
100 | 100 | ||
101 | clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ | 101 | clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ |
102 | empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds | 102 | empty.c zImage.coff.lds zImage.ps3.lds zImage.lds |
103 | 103 | ||
104 | quiet_cmd_bootcc = BOOTCC $@ | 104 | quiet_cmd_bootcc = BOOTCC $@ |
105 | cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< | 105 | cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< |
@@ -221,8 +221,8 @@ image-$(CONFIG_WARP) += cuImage.warp | |||
221 | image-$(CONFIG_YOSEMITE) += cuImage.yosemite | 221 | image-$(CONFIG_YOSEMITE) += cuImage.yosemite |
222 | 222 | ||
223 | # Board ports in arch/powerpc/platform/8xx/Kconfig | 223 | # Board ports in arch/powerpc/platform/8xx/Kconfig |
224 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads | 224 | image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads |
225 | image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads | 225 | image-$(CONFIG_MPC885ADS) += cuImage.mpc885ads |
226 | image-$(CONFIG_PPC_EP88XC) += dtbImage.ep88xc | 226 | image-$(CONFIG_PPC_EP88XC) += dtbImage.ep88xc |
227 | image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ | 227 | image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ |
228 | dtbImage.adder875-redboot | 228 | dtbImage.adder875-redboot |
@@ -339,7 +339,9 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) | |||
339 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< | 339 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< |
340 | 340 | ||
341 | # anything not in $(targets) | 341 | # anything not in $(targets) |
342 | clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ | 342 | clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ |
343 | zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \ | ||
344 | zImage.iseries zImage.miboot zImage.pmac zImage.pseries \ | ||
343 | otheros.bld *.dtb | 345 | otheros.bld *.dtb |
344 | 346 | ||
345 | # clean up files cached by wrapper | 347 | # clean up files cached by wrapper |
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts index 1e7802cc31ae..fea592574004 100644 --- a/arch/powerpc/boot/dts/mpc8377_mds.dts +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts | |||
@@ -271,27 +271,35 @@ | |||
271 | dma@82a8 { | 271 | dma@82a8 { |
272 | #address-cells = <1>; | 272 | #address-cells = <1>; |
273 | #size-cells = <1>; | 273 | #size-cells = <1>; |
274 | compatible = "fsl,mpc8349-dma"; | 274 | compatible = "fsl,mpc8377-dma", "fsl,elo-dma"; |
275 | reg = <0x82a8 4>; | 275 | reg = <0x82a8 4>; |
276 | ranges = <0 0x8100 0x1a8>; | 276 | ranges = <0 0x8100 0x1a8>; |
277 | interrupt-parent = <&ipic>; | 277 | interrupt-parent = <&ipic>; |
278 | interrupts = <0x47 8>; | 278 | interrupts = <0x47 8>; |
279 | cell-index = <0>; | 279 | cell-index = <0>; |
280 | dma-channel@0 { | 280 | dma-channel@0 { |
281 | compatible = "fsl,mpc8349-dma-channel"; | 281 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; |
282 | reg = <0 0x80>; | 282 | reg = <0 0x80>; |
283 | interrupt-parent = <&ipic>; | ||
284 | interrupts = <0x47 8>; | ||
283 | }; | 285 | }; |
284 | dma-channel@80 { | 286 | dma-channel@80 { |
285 | compatible = "fsl,mpc8349-dma-channel"; | 287 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; |
286 | reg = <0x80 0x80>; | 288 | reg = <0x80 0x80>; |
289 | interrupt-parent = <&ipic>; | ||
290 | interrupts = <0x47 8>; | ||
287 | }; | 291 | }; |
288 | dma-channel@100 { | 292 | dma-channel@100 { |
289 | compatible = "fsl,mpc8349-dma-channel"; | 293 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; |
290 | reg = <0x100 0x80>; | 294 | reg = <0x100 0x80>; |
295 | interrupt-parent = <&ipic>; | ||
296 | interrupts = <0x47 8>; | ||
291 | }; | 297 | }; |
292 | dma-channel@180 { | 298 | dma-channel@180 { |
293 | compatible = "fsl,mpc8349-dma-channel"; | 299 | compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel"; |
294 | reg = <0x180 0x28>; | 300 | reg = <0x180 0x28>; |
301 | interrupt-parent = <&ipic>; | ||
302 | interrupts = <0x47 8>; | ||
295 | }; | 303 | }; |
296 | }; | 304 | }; |
297 | 305 | ||
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 08a780d89807..fa9b6bbeb5af 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts | |||
@@ -251,14 +251,14 @@ | |||
251 | dma@c300 { | 251 | dma@c300 { |
252 | #address-cells = <1>; | 252 | #address-cells = <1>; |
253 | #size-cells = <1>; | 253 | #size-cells = <1>; |
254 | compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma"; | 254 | compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma"; |
255 | cell-index = <1>; | 255 | cell-index = <1>; |
256 | reg = <0xc300 0x4>; /* DMA general status register */ | 256 | reg = <0xc300 0x4>; /* DMA general status register */ |
257 | ranges = <0x0 0xc100 0x200>; | 257 | ranges = <0x0 0xc100 0x200>; |
258 | 258 | ||
259 | dma-channel@0 { | 259 | dma-channel@0 { |
260 | compatible = "fsl,mpc8610-dma-channel", | 260 | compatible = "fsl,mpc8610-dma-channel", |
261 | "fsl,mpc8540-dma-channel"; | 261 | "fsl,eloplus-dma-channel"; |
262 | cell-index = <0>; | 262 | cell-index = <0>; |
263 | reg = <0x0 0x80>; | 263 | reg = <0x0 0x80>; |
264 | interrupt-parent = <&mpic>; | 264 | interrupt-parent = <&mpic>; |
@@ -266,7 +266,7 @@ | |||
266 | }; | 266 | }; |
267 | dma-channel@1 { | 267 | dma-channel@1 { |
268 | compatible = "fsl,mpc8610-dma-channel", | 268 | compatible = "fsl,mpc8610-dma-channel", |
269 | "fsl,mpc8540-dma-channel"; | 269 | "fsl,eloplus-dma-channel"; |
270 | cell-index = <1>; | 270 | cell-index = <1>; |
271 | reg = <0x80 0x80>; | 271 | reg = <0x80 0x80>; |
272 | interrupt-parent = <&mpic>; | 272 | interrupt-parent = <&mpic>; |
@@ -274,7 +274,7 @@ | |||
274 | }; | 274 | }; |
275 | dma-channel@2 { | 275 | dma-channel@2 { |
276 | compatible = "fsl,mpc8610-dma-channel", | 276 | compatible = "fsl,mpc8610-dma-channel", |
277 | "fsl,mpc8540-dma-channel"; | 277 | "fsl,eloplus-dma-channel"; |
278 | cell-index = <2>; | 278 | cell-index = <2>; |
279 | reg = <0x100 0x80>; | 279 | reg = <0x100 0x80>; |
280 | interrupt-parent = <&mpic>; | 280 | interrupt-parent = <&mpic>; |
@@ -282,7 +282,7 @@ | |||
282 | }; | 282 | }; |
283 | dma-channel@3 { | 283 | dma-channel@3 { |
284 | compatible = "fsl,mpc8610-dma-channel", | 284 | compatible = "fsl,mpc8610-dma-channel", |
285 | "fsl,mpc8540-dma-channel"; | 285 | "fsl,eloplus-dma-channel"; |
286 | cell-index = <3>; | 286 | cell-index = <3>; |
287 | reg = <0x180 0x80>; | 287 | reg = <0x180 0x80>; |
288 | interrupt-parent = <&mpic>; | 288 | interrupt-parent = <&mpic>; |
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig index d7fd298bd234..05360d4ef1b1 100644 --- a/arch/powerpc/configs/chrp32_defconfig +++ b/arch/powerpc/configs/chrp32_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:55:37 2008 | 4 | # Tue May 20 20:00:44 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
32 | CONFIG_GENERIC_HARDIRQS=y | 32 | CONFIG_GENERIC_HARDIRQS=y |
33 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | 33 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set |
34 | CONFIG_IRQ_PER_CPU=y | 34 | CONFIG_IRQ_PER_CPU=y |
35 | CONFIG_STACKTRACE_SUPPORT=y | ||
36 | CONFIG_LOCKDEP_SUPPORT=y | ||
35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 37 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
36 | CONFIG_ARCH_HAS_ILOG2_U32=y | 38 | CONFIG_ARCH_HAS_ILOG2_U32=y |
37 | CONFIG_GENERIC_HWEIGHT=y | 39 | CONFIG_GENERIC_HWEIGHT=y |
@@ -88,6 +90,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
88 | CONFIG_SYSCTL=y | 90 | CONFIG_SYSCTL=y |
89 | # CONFIG_EMBEDDED is not set | 91 | # CONFIG_EMBEDDED is not set |
90 | CONFIG_SYSCTL_SYSCALL=y | 92 | CONFIG_SYSCTL_SYSCALL=y |
93 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
91 | CONFIG_KALLSYMS=y | 94 | CONFIG_KALLSYMS=y |
92 | # CONFIG_KALLSYMS_ALL is not set | 95 | # CONFIG_KALLSYMS_ALL is not set |
93 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -95,6 +98,7 @@ CONFIG_HOTPLUG=y | |||
95 | CONFIG_PRINTK=y | 98 | CONFIG_PRINTK=y |
96 | CONFIG_BUG=y | 99 | CONFIG_BUG=y |
97 | CONFIG_ELF_CORE=y | 100 | CONFIG_ELF_CORE=y |
101 | CONFIG_PCSPKR_PLATFORM=y | ||
98 | # CONFIG_COMPAT_BRK is not set | 102 | # CONFIG_COMPAT_BRK is not set |
99 | CONFIG_BASE_FULL=y | 103 | CONFIG_BASE_FULL=y |
100 | CONFIG_FUTEX=y | 104 | CONFIG_FUTEX=y |
@@ -115,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y | |||
115 | # CONFIG_KPROBES is not set | 119 | # CONFIG_KPROBES is not set |
116 | CONFIG_HAVE_KPROBES=y | 120 | CONFIG_HAVE_KPROBES=y |
117 | CONFIG_HAVE_KRETPROBES=y | 121 | CONFIG_HAVE_KRETPROBES=y |
122 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
118 | CONFIG_PROC_PAGE_MONITOR=y | 123 | CONFIG_PROC_PAGE_MONITOR=y |
119 | CONFIG_SLABINFO=y | 124 | CONFIG_SLABINFO=y |
120 | CONFIG_RT_MUTEXES=y | 125 | CONFIG_RT_MUTEXES=y |
121 | # CONFIG_TINY_SHMEM is not set | 126 | # CONFIG_TINY_SHMEM is not set |
122 | CONFIG_BASE_SMALL=0 | 127 | CONFIG_BASE_SMALL=0 |
123 | CONFIG_MODULES=y | 128 | CONFIG_MODULES=y |
129 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
124 | CONFIG_MODULE_UNLOAD=y | 130 | CONFIG_MODULE_UNLOAD=y |
125 | CONFIG_MODULE_FORCE_UNLOAD=y | 131 | CONFIG_MODULE_FORCE_UNLOAD=y |
126 | # CONFIG_MODVERSIONS is not set | 132 | # CONFIG_MODVERSIONS is not set |
@@ -217,11 +223,13 @@ CONFIG_FLATMEM=y | |||
217 | CONFIG_FLAT_NODE_MEM_MAP=y | 223 | CONFIG_FLAT_NODE_MEM_MAP=y |
218 | # CONFIG_SPARSEMEM_STATIC is not set | 224 | # CONFIG_SPARSEMEM_STATIC is not set |
219 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 225 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
226 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
220 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 227 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
221 | # CONFIG_RESOURCES_64BIT is not set | 228 | # CONFIG_RESOURCES_64BIT is not set |
222 | CONFIG_ZONE_DMA_FLAG=1 | 229 | CONFIG_ZONE_DMA_FLAG=1 |
223 | CONFIG_BOUNCE=y | 230 | CONFIG_BOUNCE=y |
224 | CONFIG_VIRT_TO_BUS=y | 231 | CONFIG_VIRT_TO_BUS=y |
232 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
225 | CONFIG_PROC_DEVICETREE=y | 233 | CONFIG_PROC_DEVICETREE=y |
226 | # CONFIG_CMDLINE_BOOL is not set | 234 | # CONFIG_CMDLINE_BOOL is not set |
227 | # CONFIG_PM is not set | 235 | # CONFIG_PM is not set |
@@ -245,6 +253,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
245 | # CONFIG_PCI_DEBUG is not set | 253 | # CONFIG_PCI_DEBUG is not set |
246 | # CONFIG_PCCARD is not set | 254 | # CONFIG_PCCARD is not set |
247 | # CONFIG_HOTPLUG_PCI is not set | 255 | # CONFIG_HOTPLUG_PCI is not set |
256 | # CONFIG_HAS_RAPIDIO is not set | ||
248 | 257 | ||
249 | # | 258 | # |
250 | # Advanced setup | 259 | # Advanced setup |
@@ -254,11 +263,11 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
254 | # | 263 | # |
255 | # Default settings for advanced configuration options are used | 264 | # Default settings for advanced configuration options are used |
256 | # | 265 | # |
257 | CONFIG_HIGHMEM_START=0xfe000000 | ||
258 | CONFIG_LOWMEM_SIZE=0x30000000 | 266 | CONFIG_LOWMEM_SIZE=0x30000000 |
267 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
259 | CONFIG_KERNEL_START=0xc0000000 | 268 | CONFIG_KERNEL_START=0xc0000000 |
269 | CONFIG_PHYSICAL_START=0x00000000 | ||
260 | CONFIG_TASK_SIZE=0xc0000000 | 270 | CONFIG_TASK_SIZE=0xc0000000 |
261 | CONFIG_BOOT_LOAD=0x00800000 | ||
262 | 271 | ||
263 | # | 272 | # |
264 | # Networking | 273 | # Networking |
@@ -299,8 +308,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
299 | # CONFIG_TCP_MD5SIG is not set | 308 | # CONFIG_TCP_MD5SIG is not set |
300 | # CONFIG_IP_VS is not set | 309 | # CONFIG_IP_VS is not set |
301 | # CONFIG_IPV6 is not set | 310 | # CONFIG_IPV6 is not set |
302 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
303 | # CONFIG_INET6_TUNNEL is not set | ||
304 | # CONFIG_NETWORK_SECMARK is not set | 311 | # CONFIG_NETWORK_SECMARK is not set |
305 | CONFIG_NETFILTER=y | 312 | CONFIG_NETFILTER=y |
306 | # CONFIG_NETFILTER_DEBUG is not set | 313 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -398,6 +405,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
398 | # CONFIG_CONNECTOR is not set | 405 | # CONFIG_CONNECTOR is not set |
399 | # CONFIG_MTD is not set | 406 | # CONFIG_MTD is not set |
400 | CONFIG_OF_DEVICE=y | 407 | CONFIG_OF_DEVICE=y |
408 | CONFIG_OF_I2C=y | ||
401 | # CONFIG_PARPORT is not set | 409 | # CONFIG_PARPORT is not set |
402 | # CONFIG_PNP is not set | 410 | # CONFIG_PNP is not set |
403 | CONFIG_BLK_DEV=y | 411 | CONFIG_BLK_DEV=y |
@@ -484,22 +492,8 @@ CONFIG_BLK_DEV_SL82C105=y | |||
484 | # CONFIG_BLK_DEV_TRM290 is not set | 492 | # CONFIG_BLK_DEV_TRM290 is not set |
485 | CONFIG_BLK_DEV_VIA82CXXX=y | 493 | CONFIG_BLK_DEV_VIA82CXXX=y |
486 | # CONFIG_BLK_DEV_TC86C001 is not set | 494 | # CONFIG_BLK_DEV_TC86C001 is not set |
487 | |||
488 | # | ||
489 | # Other IDE chipsets support | ||
490 | # | ||
491 | |||
492 | # | ||
493 | # Note: most of these also require special kernel boot parameters | ||
494 | # | ||
495 | # CONFIG_BLK_DEV_4DRIVES is not set | ||
496 | # CONFIG_BLK_DEV_ALI14XX is not set | ||
497 | # CONFIG_BLK_DEV_DTC2278 is not set | ||
498 | # CONFIG_BLK_DEV_HT6560B is not set | ||
499 | # CONFIG_BLK_DEV_QD65XX is not set | ||
500 | # CONFIG_BLK_DEV_UMC8672 is not set | ||
501 | CONFIG_BLK_DEV_IDEDMA=y | 495 | CONFIG_BLK_DEV_IDEDMA=y |
502 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 496 | # CONFIG_BLK_DEV_HD_ONLY is not set |
503 | # CONFIG_BLK_DEV_HD is not set | 497 | # CONFIG_BLK_DEV_HD is not set |
504 | 498 | ||
505 | # | 499 | # |
@@ -641,7 +635,6 @@ CONFIG_DE4X5=y | |||
641 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 635 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
642 | CONFIG_NET_PCI=y | 636 | CONFIG_NET_PCI=y |
643 | CONFIG_PCNET32=y | 637 | CONFIG_PCNET32=y |
644 | # CONFIG_PCNET32_NAPI is not set | ||
645 | # CONFIG_AMD8111_ETH is not set | 638 | # CONFIG_AMD8111_ETH is not set |
646 | # CONFIG_ADAPTEC_STARFIRE is not set | 639 | # CONFIG_ADAPTEC_STARFIRE is not set |
647 | # CONFIG_AC3200 is not set | 640 | # CONFIG_AC3200 is not set |
@@ -684,7 +677,6 @@ CONFIG_NETDEV_1000=y | |||
684 | # CONFIG_SIS190 is not set | 677 | # CONFIG_SIS190 is not set |
685 | # CONFIG_SKGE is not set | 678 | # CONFIG_SKGE is not set |
686 | # CONFIG_SKY2 is not set | 679 | # CONFIG_SKY2 is not set |
687 | # CONFIG_SK98LIN is not set | ||
688 | # CONFIG_VIA_VELOCITY is not set | 680 | # CONFIG_VIA_VELOCITY is not set |
689 | # CONFIG_TIGON3 is not set | 681 | # CONFIG_TIGON3 is not set |
690 | # CONFIG_BNX2 is not set | 682 | # CONFIG_BNX2 is not set |
@@ -703,6 +695,7 @@ CONFIG_NETDEV_10000=y | |||
703 | # CONFIG_MLX4_CORE is not set | 695 | # CONFIG_MLX4_CORE is not set |
704 | # CONFIG_TEHUTI is not set | 696 | # CONFIG_TEHUTI is not set |
705 | # CONFIG_BNX2X is not set | 697 | # CONFIG_BNX2X is not set |
698 | # CONFIG_SFC is not set | ||
706 | # CONFIG_TR is not set | 699 | # CONFIG_TR is not set |
707 | 700 | ||
708 | # | 701 | # |
@@ -710,6 +703,7 @@ CONFIG_NETDEV_10000=y | |||
710 | # | 703 | # |
711 | # CONFIG_WLAN_PRE80211 is not set | 704 | # CONFIG_WLAN_PRE80211 is not set |
712 | # CONFIG_WLAN_80211 is not set | 705 | # CONFIG_WLAN_80211 is not set |
706 | # CONFIG_IWLWIFI_LEDS is not set | ||
713 | 707 | ||
714 | # | 708 | # |
715 | # USB Network Adapters | 709 | # USB Network Adapters |
@@ -813,6 +807,7 @@ CONFIG_VT=y | |||
813 | CONFIG_VT_CONSOLE=y | 807 | CONFIG_VT_CONSOLE=y |
814 | CONFIG_HW_CONSOLE=y | 808 | CONFIG_HW_CONSOLE=y |
815 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 809 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
810 | CONFIG_DEVKMEM=y | ||
816 | # CONFIG_SERIAL_NONSTANDARD is not set | 811 | # CONFIG_SERIAL_NONSTANDARD is not set |
817 | # CONFIG_NOZOMI is not set | 812 | # CONFIG_NOZOMI is not set |
818 | 813 | ||
@@ -853,13 +848,7 @@ CONFIG_DEVPORT=y | |||
853 | CONFIG_I2C=y | 848 | CONFIG_I2C=y |
854 | CONFIG_I2C_BOARDINFO=y | 849 | CONFIG_I2C_BOARDINFO=y |
855 | # CONFIG_I2C_CHARDEV is not set | 850 | # CONFIG_I2C_CHARDEV is not set |
856 | |||
857 | # | ||
858 | # I2C Algorithms | ||
859 | # | ||
860 | CONFIG_I2C_ALGOBIT=y | 851 | CONFIG_I2C_ALGOBIT=y |
861 | # CONFIG_I2C_ALGOPCF is not set | ||
862 | # CONFIG_I2C_ALGOPCA is not set | ||
863 | 852 | ||
864 | # | 853 | # |
865 | # I2C Hardware Bus support | 854 | # I2C Hardware Bus support |
@@ -890,6 +879,7 @@ CONFIG_I2C_ALGOBIT=y | |||
890 | # CONFIG_I2C_VIAPRO is not set | 879 | # CONFIG_I2C_VIAPRO is not set |
891 | # CONFIG_I2C_VOODOO3 is not set | 880 | # CONFIG_I2C_VOODOO3 is not set |
892 | # CONFIG_I2C_PCA_ISA is not set | 881 | # CONFIG_I2C_PCA_ISA is not set |
882 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
893 | 883 | ||
894 | # | 884 | # |
895 | # Miscellaneous I2C Chip support | 885 | # Miscellaneous I2C Chip support |
@@ -899,19 +889,13 @@ CONFIG_I2C_ALGOBIT=y | |||
899 | # CONFIG_SENSORS_PCF8574 is not set | 889 | # CONFIG_SENSORS_PCF8574 is not set |
900 | # CONFIG_PCF8575 is not set | 890 | # CONFIG_PCF8575 is not set |
901 | # CONFIG_SENSORS_PCF8591 is not set | 891 | # CONFIG_SENSORS_PCF8591 is not set |
902 | # CONFIG_TPS65010 is not set | ||
903 | # CONFIG_SENSORS_MAX6875 is not set | 892 | # CONFIG_SENSORS_MAX6875 is not set |
904 | # CONFIG_SENSORS_TSL2550 is not set | 893 | # CONFIG_SENSORS_TSL2550 is not set |
905 | # CONFIG_I2C_DEBUG_CORE is not set | 894 | # CONFIG_I2C_DEBUG_CORE is not set |
906 | # CONFIG_I2C_DEBUG_ALGO is not set | 895 | # CONFIG_I2C_DEBUG_ALGO is not set |
907 | # CONFIG_I2C_DEBUG_BUS is not set | 896 | # CONFIG_I2C_DEBUG_BUS is not set |
908 | # CONFIG_I2C_DEBUG_CHIP is not set | 897 | # CONFIG_I2C_DEBUG_CHIP is not set |
909 | |||
910 | # | ||
911 | # SPI support | ||
912 | # | ||
913 | # CONFIG_SPI is not set | 898 | # CONFIG_SPI is not set |
914 | # CONFIG_SPI_MASTER is not set | ||
915 | # CONFIG_W1 is not set | 899 | # CONFIG_W1 is not set |
916 | # CONFIG_POWER_SUPPLY is not set | 900 | # CONFIG_POWER_SUPPLY is not set |
917 | # CONFIG_HWMON is not set | 901 | # CONFIG_HWMON is not set |
@@ -928,12 +912,22 @@ CONFIG_SSB_POSSIBLE=y | |||
928 | # Multifunction device drivers | 912 | # Multifunction device drivers |
929 | # | 913 | # |
930 | # CONFIG_MFD_SM501 is not set | 914 | # CONFIG_MFD_SM501 is not set |
915 | # CONFIG_HTC_PASIC3 is not set | ||
931 | 916 | ||
932 | # | 917 | # |
933 | # Multimedia devices | 918 | # Multimedia devices |
934 | # | 919 | # |
920 | |||
921 | # | ||
922 | # Multimedia core support | ||
923 | # | ||
935 | # CONFIG_VIDEO_DEV is not set | 924 | # CONFIG_VIDEO_DEV is not set |
936 | # CONFIG_DVB_CORE is not set | 925 | # CONFIG_DVB_CORE is not set |
926 | # CONFIG_VIDEO_MEDIA is not set | ||
927 | |||
928 | # | ||
929 | # Multimedia drivers | ||
930 | # | ||
937 | # CONFIG_DAB is not set | 931 | # CONFIG_DAB is not set |
938 | 932 | ||
939 | # | 933 | # |
@@ -953,8 +947,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
953 | # CONFIG_FB_SYS_FILLRECT is not set | 947 | # CONFIG_FB_SYS_FILLRECT is not set |
954 | # CONFIG_FB_SYS_COPYAREA is not set | 948 | # CONFIG_FB_SYS_COPYAREA is not set |
955 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 949 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
950 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
956 | # CONFIG_FB_SYS_FOPS is not set | 951 | # CONFIG_FB_SYS_FOPS is not set |
957 | CONFIG_FB_DEFERRED_IO=y | ||
958 | # CONFIG_FB_SVGALIB is not set | 952 | # CONFIG_FB_SVGALIB is not set |
959 | CONFIG_FB_MACMODES=y | 953 | CONFIG_FB_MACMODES=y |
960 | CONFIG_FB_BACKLIGHT=y | 954 | CONFIG_FB_BACKLIGHT=y |
@@ -1072,11 +1066,13 @@ CONFIG_USB_DEVICE_CLASS=y | |||
1072 | # | 1066 | # |
1073 | # USB Host Controller Drivers | 1067 | # USB Host Controller Drivers |
1074 | # | 1068 | # |
1069 | # CONFIG_USB_C67X00_HCD is not set | ||
1075 | CONFIG_USB_EHCI_HCD=m | 1070 | CONFIG_USB_EHCI_HCD=m |
1076 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1071 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1077 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1072 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1078 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 1073 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
1079 | # CONFIG_USB_ISP116X_HCD is not set | 1074 | # CONFIG_USB_ISP116X_HCD is not set |
1075 | # CONFIG_USB_ISP1760_HCD is not set | ||
1080 | CONFIG_USB_OHCI_HCD=y | 1076 | CONFIG_USB_OHCI_HCD=y |
1081 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1077 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1082 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1078 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1112,6 +1108,7 @@ CONFIG_USB_STORAGE=m | |||
1112 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1108 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1113 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1109 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1114 | # CONFIG_USB_STORAGE_KARMA is not set | 1110 | # CONFIG_USB_STORAGE_KARMA is not set |
1111 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1115 | # CONFIG_USB_LIBUSUAL is not set | 1112 | # CONFIG_USB_LIBUSUAL is not set |
1116 | 1113 | ||
1117 | # | 1114 | # |
@@ -1153,14 +1150,11 @@ CONFIG_USB_MON=y | |||
1153 | # CONFIG_MMC is not set | 1150 | # CONFIG_MMC is not set |
1154 | # CONFIG_MEMSTICK is not set | 1151 | # CONFIG_MEMSTICK is not set |
1155 | # CONFIG_NEW_LEDS is not set | 1152 | # CONFIG_NEW_LEDS is not set |
1153 | # CONFIG_ACCESSIBILITY is not set | ||
1156 | # CONFIG_INFINIBAND is not set | 1154 | # CONFIG_INFINIBAND is not set |
1157 | # CONFIG_EDAC is not set | 1155 | # CONFIG_EDAC is not set |
1158 | # CONFIG_RTC_CLASS is not set | 1156 | # CONFIG_RTC_CLASS is not set |
1159 | # CONFIG_DMADEVICES is not set | 1157 | # CONFIG_DMADEVICES is not set |
1160 | |||
1161 | # | ||
1162 | # Userspace I/O | ||
1163 | # | ||
1164 | # CONFIG_UIO is not set | 1158 | # CONFIG_UIO is not set |
1165 | 1159 | ||
1166 | # | 1160 | # |
@@ -1180,7 +1174,6 @@ CONFIG_FS_MBCACHE=y | |||
1180 | # CONFIG_JFS_FS is not set | 1174 | # CONFIG_JFS_FS is not set |
1181 | # CONFIG_FS_POSIX_ACL is not set | 1175 | # CONFIG_FS_POSIX_ACL is not set |
1182 | # CONFIG_XFS_FS is not set | 1176 | # CONFIG_XFS_FS is not set |
1183 | # CONFIG_GFS2_FS is not set | ||
1184 | # CONFIG_OCFS2_FS is not set | 1177 | # CONFIG_OCFS2_FS is not set |
1185 | CONFIG_DNOTIFY=y | 1178 | CONFIG_DNOTIFY=y |
1186 | CONFIG_INOTIFY=y | 1179 | CONFIG_INOTIFY=y |
@@ -1314,6 +1307,7 @@ CONFIG_NLS_ISO8859_1=m | |||
1314 | # Library routines | 1307 | # Library routines |
1315 | # | 1308 | # |
1316 | CONFIG_BITREVERSE=y | 1309 | CONFIG_BITREVERSE=y |
1310 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1317 | CONFIG_CRC_CCITT=m | 1311 | CONFIG_CRC_CCITT=m |
1318 | # CONFIG_CRC16 is not set | 1312 | # CONFIG_CRC16 is not set |
1319 | # CONFIG_CRC_ITU_T is not set | 1313 | # CONFIG_CRC_ITU_T is not set |
@@ -1334,6 +1328,7 @@ CONFIG_HAVE_LMB=y | |||
1334 | # CONFIG_PRINTK_TIME is not set | 1328 | # CONFIG_PRINTK_TIME is not set |
1335 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1329 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1336 | CONFIG_ENABLE_MUST_CHECK=y | 1330 | CONFIG_ENABLE_MUST_CHECK=y |
1331 | CONFIG_FRAME_WARN=1024 | ||
1337 | CONFIG_MAGIC_SYSRQ=y | 1332 | CONFIG_MAGIC_SYSRQ=y |
1338 | # CONFIG_UNUSED_SYMBOLS is not set | 1333 | # CONFIG_UNUSED_SYMBOLS is not set |
1339 | # CONFIG_DEBUG_FS is not set | 1334 | # CONFIG_DEBUG_FS is not set |
@@ -1344,6 +1339,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1344 | CONFIG_SCHED_DEBUG=y | 1339 | CONFIG_SCHED_DEBUG=y |
1345 | # CONFIG_SCHEDSTATS is not set | 1340 | # CONFIG_SCHEDSTATS is not set |
1346 | # CONFIG_TIMER_STATS is not set | 1341 | # CONFIG_TIMER_STATS is not set |
1342 | # CONFIG_DEBUG_OBJECTS is not set | ||
1347 | # CONFIG_SLUB_DEBUG_ON is not set | 1343 | # CONFIG_SLUB_DEBUG_ON is not set |
1348 | # CONFIG_SLUB_STATS is not set | 1344 | # CONFIG_SLUB_STATS is not set |
1349 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1345 | # CONFIG_DEBUG_RT_MUTEXES is not set |
@@ -1357,6 +1353,7 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y | |||
1357 | CONFIG_DEBUG_BUGVERBOSE=y | 1353 | CONFIG_DEBUG_BUGVERBOSE=y |
1358 | # CONFIG_DEBUG_INFO is not set | 1354 | # CONFIG_DEBUG_INFO is not set |
1359 | # CONFIG_DEBUG_VM is not set | 1355 | # CONFIG_DEBUG_VM is not set |
1356 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1360 | # CONFIG_DEBUG_LIST is not set | 1357 | # CONFIG_DEBUG_LIST is not set |
1361 | # CONFIG_DEBUG_SG is not set | 1358 | # CONFIG_DEBUG_SG is not set |
1362 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1359 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1371,6 +1368,7 @@ CONFIG_DEBUGGER=y | |||
1371 | CONFIG_XMON=y | 1368 | CONFIG_XMON=y |
1372 | CONFIG_XMON_DEFAULT=y | 1369 | CONFIG_XMON_DEFAULT=y |
1373 | CONFIG_XMON_DISASSEMBLY=y | 1370 | CONFIG_XMON_DISASSEMBLY=y |
1371 | CONFIG_IRQSTACKS=y | ||
1374 | # CONFIG_BDI_SWITCH is not set | 1372 | # CONFIG_BDI_SWITCH is not set |
1375 | # CONFIG_BOOTX_TEXT is not set | 1373 | # CONFIG_BOOTX_TEXT is not set |
1376 | # CONFIG_PPC_EARLY_DEBUG is not set | 1374 | # CONFIG_PPC_EARLY_DEBUG is not set |
@@ -1382,50 +1380,80 @@ CONFIG_XMON_DISASSEMBLY=y | |||
1382 | # CONFIG_SECURITY is not set | 1380 | # CONFIG_SECURITY is not set |
1383 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1381 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1384 | CONFIG_CRYPTO=y | 1382 | CONFIG_CRYPTO=y |
1383 | |||
1384 | # | ||
1385 | # Crypto core or helper | ||
1386 | # | ||
1385 | CONFIG_CRYPTO_ALGAPI=m | 1387 | CONFIG_CRYPTO_ALGAPI=m |
1386 | CONFIG_CRYPTO_BLKCIPHER=m | 1388 | CONFIG_CRYPTO_BLKCIPHER=m |
1387 | # CONFIG_CRYPTO_SEQIV is not set | ||
1388 | CONFIG_CRYPTO_MANAGER=m | 1389 | CONFIG_CRYPTO_MANAGER=m |
1390 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1391 | # CONFIG_CRYPTO_NULL is not set | ||
1392 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1393 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1394 | # CONFIG_CRYPTO_TEST is not set | ||
1395 | |||
1396 | # | ||
1397 | # Authenticated Encryption with Associated Data | ||
1398 | # | ||
1399 | # CONFIG_CRYPTO_CCM is not set | ||
1400 | # CONFIG_CRYPTO_GCM is not set | ||
1401 | # CONFIG_CRYPTO_SEQIV is not set | ||
1402 | |||
1403 | # | ||
1404 | # Block modes | ||
1405 | # | ||
1406 | CONFIG_CRYPTO_CBC=m | ||
1407 | # CONFIG_CRYPTO_CTR is not set | ||
1408 | # CONFIG_CRYPTO_CTS is not set | ||
1409 | CONFIG_CRYPTO_ECB=m | ||
1410 | # CONFIG_CRYPTO_LRW is not set | ||
1411 | CONFIG_CRYPTO_PCBC=m | ||
1412 | # CONFIG_CRYPTO_XTS is not set | ||
1413 | |||
1414 | # | ||
1415 | # Hash modes | ||
1416 | # | ||
1389 | # CONFIG_CRYPTO_HMAC is not set | 1417 | # CONFIG_CRYPTO_HMAC is not set |
1390 | # CONFIG_CRYPTO_XCBC is not set | 1418 | # CONFIG_CRYPTO_XCBC is not set |
1391 | # CONFIG_CRYPTO_NULL is not set | 1419 | |
1420 | # | ||
1421 | # Digest | ||
1422 | # | ||
1423 | # CONFIG_CRYPTO_CRC32C is not set | ||
1392 | # CONFIG_CRYPTO_MD4 is not set | 1424 | # CONFIG_CRYPTO_MD4 is not set |
1393 | # CONFIG_CRYPTO_MD5 is not set | 1425 | # CONFIG_CRYPTO_MD5 is not set |
1426 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1394 | CONFIG_CRYPTO_SHA1=m | 1427 | CONFIG_CRYPTO_SHA1=m |
1395 | # CONFIG_CRYPTO_SHA256 is not set | 1428 | # CONFIG_CRYPTO_SHA256 is not set |
1396 | # CONFIG_CRYPTO_SHA512 is not set | 1429 | # CONFIG_CRYPTO_SHA512 is not set |
1397 | # CONFIG_CRYPTO_WP512 is not set | ||
1398 | # CONFIG_CRYPTO_TGR192 is not set | 1430 | # CONFIG_CRYPTO_TGR192 is not set |
1399 | # CONFIG_CRYPTO_GF128MUL is not set | 1431 | # CONFIG_CRYPTO_WP512 is not set |
1400 | CONFIG_CRYPTO_ECB=m | 1432 | |
1401 | CONFIG_CRYPTO_CBC=m | 1433 | # |
1402 | CONFIG_CRYPTO_PCBC=m | 1434 | # Ciphers |
1403 | # CONFIG_CRYPTO_LRW is not set | 1435 | # |
1404 | # CONFIG_CRYPTO_XTS is not set | ||
1405 | # CONFIG_CRYPTO_CTR is not set | ||
1406 | # CONFIG_CRYPTO_GCM is not set | ||
1407 | # CONFIG_CRYPTO_CCM is not set | ||
1408 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1409 | # CONFIG_CRYPTO_DES is not set | ||
1410 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1411 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1412 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1413 | # CONFIG_CRYPTO_SERPENT is not set | ||
1414 | # CONFIG_CRYPTO_AES is not set | 1436 | # CONFIG_CRYPTO_AES is not set |
1437 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1438 | CONFIG_CRYPTO_ARC4=m | ||
1439 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1440 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1415 | # CONFIG_CRYPTO_CAST5 is not set | 1441 | # CONFIG_CRYPTO_CAST5 is not set |
1416 | # CONFIG_CRYPTO_CAST6 is not set | 1442 | # CONFIG_CRYPTO_CAST6 is not set |
1417 | # CONFIG_CRYPTO_TEA is not set | 1443 | # CONFIG_CRYPTO_DES is not set |
1418 | CONFIG_CRYPTO_ARC4=m | 1444 | # CONFIG_CRYPTO_FCRYPT is not set |
1419 | # CONFIG_CRYPTO_KHAZAD is not set | 1445 | # CONFIG_CRYPTO_KHAZAD is not set |
1420 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1421 | # CONFIG_CRYPTO_SEED is not set | ||
1422 | # CONFIG_CRYPTO_SALSA20 is not set | 1446 | # CONFIG_CRYPTO_SALSA20 is not set |
1447 | # CONFIG_CRYPTO_SEED is not set | ||
1448 | # CONFIG_CRYPTO_SERPENT is not set | ||
1449 | # CONFIG_CRYPTO_TEA is not set | ||
1450 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1451 | |||
1452 | # | ||
1453 | # Compression | ||
1454 | # | ||
1423 | # CONFIG_CRYPTO_DEFLATE is not set | 1455 | # CONFIG_CRYPTO_DEFLATE is not set |
1424 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1425 | # CONFIG_CRYPTO_CRC32C is not set | ||
1426 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1427 | # CONFIG_CRYPTO_TEST is not set | ||
1428 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1429 | # CONFIG_CRYPTO_LZO is not set | 1456 | # CONFIG_CRYPTO_LZO is not set |
1430 | # CONFIG_CRYPTO_HW is not set | 1457 | # CONFIG_CRYPTO_HW is not set |
1431 | # CONFIG_PPC_CLOCK is not set | 1458 | # CONFIG_PPC_CLOCK is not set |
1459 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index 88338a9f5e95..db34909831a2 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:55:43 2008 | 4 | # Tue May 20 20:01:18 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -29,6 +29,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
29 | CONFIG_GENERIC_HARDIRQS=y | 29 | CONFIG_GENERIC_HARDIRQS=y |
30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
31 | CONFIG_IRQ_PER_CPU=y | 31 | CONFIG_IRQ_PER_CPU=y |
32 | CONFIG_STACKTRACE_SUPPORT=y | ||
33 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
34 | CONFIG_LOCKDEP_SUPPORT=y | ||
32 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
33 | CONFIG_ARCH_HAS_ILOG2_U32=y | 36 | CONFIG_ARCH_HAS_ILOG2_U32=y |
34 | CONFIG_ARCH_HAS_ILOG2_U64=y | 37 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -91,6 +94,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
91 | CONFIG_SYSCTL=y | 94 | CONFIG_SYSCTL=y |
92 | # CONFIG_EMBEDDED is not set | 95 | # CONFIG_EMBEDDED is not set |
93 | CONFIG_SYSCTL_SYSCALL=y | 96 | CONFIG_SYSCTL_SYSCALL=y |
97 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
94 | CONFIG_KALLSYMS=y | 98 | CONFIG_KALLSYMS=y |
95 | # CONFIG_KALLSYMS_ALL is not set | 99 | # CONFIG_KALLSYMS_ALL is not set |
96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 100 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -119,12 +123,14 @@ CONFIG_HAVE_OPROFILE=y | |||
119 | # CONFIG_KPROBES is not set | 123 | # CONFIG_KPROBES is not set |
120 | CONFIG_HAVE_KPROBES=y | 124 | CONFIG_HAVE_KPROBES=y |
121 | CONFIG_HAVE_KRETPROBES=y | 125 | CONFIG_HAVE_KRETPROBES=y |
126 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
122 | CONFIG_PROC_PAGE_MONITOR=y | 127 | CONFIG_PROC_PAGE_MONITOR=y |
123 | CONFIG_SLABINFO=y | 128 | CONFIG_SLABINFO=y |
124 | CONFIG_RT_MUTEXES=y | 129 | CONFIG_RT_MUTEXES=y |
125 | # CONFIG_TINY_SHMEM is not set | 130 | # CONFIG_TINY_SHMEM is not set |
126 | CONFIG_BASE_SMALL=0 | 131 | CONFIG_BASE_SMALL=0 |
127 | CONFIG_MODULES=y | 132 | CONFIG_MODULES=y |
133 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
128 | CONFIG_MODULE_UNLOAD=y | 134 | CONFIG_MODULE_UNLOAD=y |
129 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 135 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
130 | CONFIG_MODVERSIONS=y | 136 | CONFIG_MODVERSIONS=y |
@@ -165,11 +171,11 @@ CONFIG_PPC_PMAC=y | |||
165 | CONFIG_PPC_PMAC64=y | 171 | CONFIG_PPC_PMAC64=y |
166 | # CONFIG_PPC_MAPLE is not set | 172 | # CONFIG_PPC_MAPLE is not set |
167 | # CONFIG_PPC_PASEMI is not set | 173 | # CONFIG_PPC_PASEMI is not set |
168 | # CONFIG_PPC_CELLEB is not set | ||
169 | # CONFIG_PPC_PS3 is not set | 174 | # CONFIG_PPC_PS3 is not set |
170 | # CONFIG_PPC_CELL is not set | 175 | # CONFIG_PPC_CELL is not set |
171 | # CONFIG_PPC_CELL_NATIVE is not set | 176 | # CONFIG_PPC_CELL_NATIVE is not set |
172 | # CONFIG_PPC_IBM_CELL_BLADE is not set | 177 | # CONFIG_PPC_IBM_CELL_BLADE is not set |
178 | # CONFIG_PPC_CELLEB is not set | ||
173 | # CONFIG_PQ2ADS is not set | 179 | # CONFIG_PQ2ADS is not set |
174 | CONFIG_PPC_NATIVE=y | 180 | CONFIG_PPC_NATIVE=y |
175 | # CONFIG_IPIC is not set | 181 | # CONFIG_IPIC is not set |
@@ -190,6 +196,7 @@ CONFIG_CPU_FREQ_TABLE=y | |||
190 | CONFIG_CPU_FREQ_STAT=y | 196 | CONFIG_CPU_FREQ_STAT=y |
191 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 197 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
192 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 198 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
199 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
193 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 200 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
194 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 201 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set |
195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 202 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
@@ -224,7 +231,6 @@ CONFIG_PREEMPT_NONE=y | |||
224 | CONFIG_BINFMT_ELF=y | 231 | CONFIG_BINFMT_ELF=y |
225 | CONFIG_COMPAT_BINFMT_ELF=y | 232 | CONFIG_COMPAT_BINFMT_ELF=y |
226 | # CONFIG_BINFMT_MISC is not set | 233 | # CONFIG_BINFMT_MISC is not set |
227 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
228 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 234 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
229 | CONFIG_IOMMU_VMERGE=y | 235 | CONFIG_IOMMU_VMERGE=y |
230 | CONFIG_IOMMU_HELPER=y | 236 | CONFIG_IOMMU_HELPER=y |
@@ -248,12 +254,14 @@ CONFIG_FLATMEM=y | |||
248 | CONFIG_FLAT_NODE_MEM_MAP=y | 254 | CONFIG_FLAT_NODE_MEM_MAP=y |
249 | # CONFIG_SPARSEMEM_STATIC is not set | 255 | # CONFIG_SPARSEMEM_STATIC is not set |
250 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 256 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
257 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
251 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 258 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
252 | CONFIG_RESOURCES_64BIT=y | 259 | CONFIG_RESOURCES_64BIT=y |
253 | CONFIG_ZONE_DMA_FLAG=1 | 260 | CONFIG_ZONE_DMA_FLAG=1 |
254 | CONFIG_BOUNCE=y | 261 | CONFIG_BOUNCE=y |
255 | # CONFIG_PPC_HAS_HASH_64K is not set | 262 | # CONFIG_PPC_HAS_HASH_64K is not set |
256 | # CONFIG_PPC_64K_PAGES is not set | 263 | # CONFIG_PPC_64K_PAGES is not set |
264 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
257 | # CONFIG_SCHED_SMT is not set | 265 | # CONFIG_SCHED_SMT is not set |
258 | CONFIG_PROC_DEVICETREE=y | 266 | CONFIG_PROC_DEVICETREE=y |
259 | # CONFIG_CMDLINE_BOOL is not set | 267 | # CONFIG_CMDLINE_BOOL is not set |
@@ -278,7 +286,10 @@ CONFIG_PCI_MSI=y | |||
278 | # CONFIG_PCI_DEBUG is not set | 286 | # CONFIG_PCI_DEBUG is not set |
279 | # CONFIG_PCCARD is not set | 287 | # CONFIG_PCCARD is not set |
280 | # CONFIG_HOTPLUG_PCI is not set | 288 | # CONFIG_HOTPLUG_PCI is not set |
289 | # CONFIG_HAS_RAPIDIO is not set | ||
290 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
281 | CONFIG_KERNEL_START=0xc000000000000000 | 291 | CONFIG_KERNEL_START=0xc000000000000000 |
292 | CONFIG_PHYSICAL_START=0x00000000 | ||
282 | 293 | ||
283 | # | 294 | # |
284 | # Networking | 295 | # Networking |
@@ -325,8 +336,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
325 | # CONFIG_TCP_MD5SIG is not set | 336 | # CONFIG_TCP_MD5SIG is not set |
326 | # CONFIG_IP_VS is not set | 337 | # CONFIG_IP_VS is not set |
327 | # CONFIG_IPV6 is not set | 338 | # CONFIG_IPV6 is not set |
328 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
329 | # CONFIG_INET6_TUNNEL is not set | ||
330 | # CONFIG_NETWORK_SECMARK is not set | 339 | # CONFIG_NETWORK_SECMARK is not set |
331 | CONFIG_NETFILTER=y | 340 | CONFIG_NETFILTER=y |
332 | # CONFIG_NETFILTER_DEBUG is not set | 341 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -342,6 +351,7 @@ CONFIG_NF_CONNTRACK=m | |||
342 | # CONFIG_NF_CT_ACCT is not set | 351 | # CONFIG_NF_CT_ACCT is not set |
343 | CONFIG_NF_CONNTRACK_MARK=y | 352 | CONFIG_NF_CONNTRACK_MARK=y |
344 | CONFIG_NF_CONNTRACK_EVENTS=y | 353 | CONFIG_NF_CONNTRACK_EVENTS=y |
354 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
345 | # CONFIG_NF_CT_PROTO_SCTP is not set | 355 | # CONFIG_NF_CT_PROTO_SCTP is not set |
346 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | 356 | # CONFIG_NF_CT_PROTO_UDPLITE is not set |
347 | # CONFIG_NF_CONNTRACK_AMANDA is not set | 357 | # CONFIG_NF_CONNTRACK_AMANDA is not set |
@@ -418,6 +428,7 @@ CONFIG_FW_LOADER=y | |||
418 | # CONFIG_CONNECTOR is not set | 428 | # CONFIG_CONNECTOR is not set |
419 | # CONFIG_MTD is not set | 429 | # CONFIG_MTD is not set |
420 | CONFIG_OF_DEVICE=y | 430 | CONFIG_OF_DEVICE=y |
431 | CONFIG_OF_I2C=y | ||
421 | # CONFIG_PARPORT is not set | 432 | # CONFIG_PARPORT is not set |
422 | CONFIG_BLK_DEV=y | 433 | CONFIG_BLK_DEV=y |
423 | # CONFIG_BLK_DEV_FD is not set | 434 | # CONFIG_BLK_DEV_FD is not set |
@@ -465,7 +476,6 @@ CONFIG_IDE_PROC_FS=y | |||
465 | # | 476 | # |
466 | # IDE chipset support/bugfixes | 477 | # IDE chipset support/bugfixes |
467 | # | 478 | # |
468 | CONFIG_IDE_GENERIC=y | ||
469 | # CONFIG_BLK_DEV_PLATFORM is not set | 479 | # CONFIG_BLK_DEV_PLATFORM is not set |
470 | CONFIG_BLK_DEV_IDEDMA_SFF=y | 480 | CONFIG_BLK_DEV_IDEDMA_SFF=y |
471 | 481 | ||
@@ -506,7 +516,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y | |||
506 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | 516 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y |
507 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | 517 | CONFIG_BLK_DEV_IDEDMA_PMAC=y |
508 | CONFIG_BLK_DEV_IDEDMA=y | 518 | CONFIG_BLK_DEV_IDEDMA=y |
509 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 519 | # CONFIG_BLK_DEV_HD_ONLY is not set |
510 | # CONFIG_BLK_DEV_HD is not set | 520 | # CONFIG_BLK_DEV_HD is not set |
511 | 521 | ||
512 | # | 522 | # |
@@ -584,61 +594,10 @@ CONFIG_SCSI_LOWLEVEL=y | |||
584 | # CONFIG_SCSI_SRP is not set | 594 | # CONFIG_SCSI_SRP is not set |
585 | CONFIG_ATA=y | 595 | CONFIG_ATA=y |
586 | # CONFIG_ATA_NONSTANDARD is not set | 596 | # CONFIG_ATA_NONSTANDARD is not set |
597 | CONFIG_SATA_PMP=y | ||
587 | # CONFIG_SATA_AHCI is not set | 598 | # CONFIG_SATA_AHCI is not set |
588 | CONFIG_SATA_SVW=y | ||
589 | # CONFIG_ATA_PIIX is not set | ||
590 | # CONFIG_SATA_MV is not set | ||
591 | # CONFIG_SATA_NV is not set | ||
592 | # CONFIG_PDC_ADMA is not set | ||
593 | # CONFIG_SATA_QSTOR is not set | ||
594 | # CONFIG_SATA_PROMISE is not set | ||
595 | # CONFIG_SATA_SX4 is not set | ||
596 | # CONFIG_SATA_SIL is not set | ||
597 | # CONFIG_SATA_SIL24 is not set | 599 | # CONFIG_SATA_SIL24 is not set |
598 | # CONFIG_SATA_SIS is not set | 600 | # CONFIG_ATA_SFF is not set |
599 | # CONFIG_SATA_ULI is not set | ||
600 | # CONFIG_SATA_VIA is not set | ||
601 | # CONFIG_SATA_VITESSE is not set | ||
602 | # CONFIG_SATA_INIC162X is not set | ||
603 | # CONFIG_PATA_ALI is not set | ||
604 | # CONFIG_PATA_AMD is not set | ||
605 | # CONFIG_PATA_ARTOP is not set | ||
606 | # CONFIG_PATA_ATIIXP is not set | ||
607 | # CONFIG_PATA_CMD640_PCI is not set | ||
608 | # CONFIG_PATA_CMD64X is not set | ||
609 | # CONFIG_PATA_CS5520 is not set | ||
610 | # CONFIG_PATA_CS5530 is not set | ||
611 | # CONFIG_PATA_CYPRESS is not set | ||
612 | # CONFIG_PATA_EFAR is not set | ||
613 | # CONFIG_ATA_GENERIC is not set | ||
614 | # CONFIG_PATA_HPT366 is not set | ||
615 | # CONFIG_PATA_HPT37X is not set | ||
616 | # CONFIG_PATA_HPT3X2N is not set | ||
617 | # CONFIG_PATA_HPT3X3 is not set | ||
618 | # CONFIG_PATA_IT821X is not set | ||
619 | # CONFIG_PATA_IT8213 is not set | ||
620 | # CONFIG_PATA_JMICRON is not set | ||
621 | # CONFIG_PATA_TRIFLEX is not set | ||
622 | # CONFIG_PATA_MARVELL is not set | ||
623 | # CONFIG_PATA_MPIIX is not set | ||
624 | # CONFIG_PATA_OLDPIIX is not set | ||
625 | # CONFIG_PATA_NETCELL is not set | ||
626 | # CONFIG_PATA_NINJA32 is not set | ||
627 | # CONFIG_PATA_NS87410 is not set | ||
628 | # CONFIG_PATA_NS87415 is not set | ||
629 | # CONFIG_PATA_OPTI is not set | ||
630 | # CONFIG_PATA_OPTIDMA is not set | ||
631 | # CONFIG_PATA_PDC_OLD is not set | ||
632 | # CONFIG_PATA_RADISYS is not set | ||
633 | # CONFIG_PATA_RZ1000 is not set | ||
634 | # CONFIG_PATA_SC1200 is not set | ||
635 | # CONFIG_PATA_SERVERWORKS is not set | ||
636 | # CONFIG_PATA_PDC2027X is not set | ||
637 | # CONFIG_PATA_SIL680 is not set | ||
638 | # CONFIG_PATA_SIS is not set | ||
639 | # CONFIG_PATA_VIA is not set | ||
640 | # CONFIG_PATA_WINBOND is not set | ||
641 | # CONFIG_PATA_PLATFORM is not set | ||
642 | CONFIG_MD=y | 601 | CONFIG_MD=y |
643 | CONFIG_BLK_DEV_MD=y | 602 | CONFIG_BLK_DEV_MD=y |
644 | CONFIG_MD_LINEAR=y | 603 | CONFIG_MD_LINEAR=y |
@@ -740,7 +699,6 @@ CONFIG_E1000=y | |||
740 | # CONFIG_SIS190 is not set | 699 | # CONFIG_SIS190 is not set |
741 | # CONFIG_SKGE is not set | 700 | # CONFIG_SKGE is not set |
742 | # CONFIG_SKY2 is not set | 701 | # CONFIG_SKY2 is not set |
743 | # CONFIG_SK98LIN is not set | ||
744 | # CONFIG_VIA_VELOCITY is not set | 702 | # CONFIG_VIA_VELOCITY is not set |
745 | CONFIG_TIGON3=y | 703 | CONFIG_TIGON3=y |
746 | # CONFIG_BNX2 is not set | 704 | # CONFIG_BNX2 is not set |
@@ -755,10 +713,10 @@ CONFIG_NETDEV_10000=y | |||
755 | # CONFIG_MYRI10GE is not set | 713 | # CONFIG_MYRI10GE is not set |
756 | # CONFIG_NETXEN_NIC is not set | 714 | # CONFIG_NETXEN_NIC is not set |
757 | # CONFIG_NIU is not set | 715 | # CONFIG_NIU is not set |
758 | # CONFIG_PASEMI_MAC is not set | ||
759 | # CONFIG_MLX4_CORE is not set | 716 | # CONFIG_MLX4_CORE is not set |
760 | # CONFIG_TEHUTI is not set | 717 | # CONFIG_TEHUTI is not set |
761 | # CONFIG_BNX2X is not set | 718 | # CONFIG_BNX2X is not set |
719 | # CONFIG_SFC is not set | ||
762 | CONFIG_TR=y | 720 | CONFIG_TR=y |
763 | CONFIG_IBMOL=y | 721 | CONFIG_IBMOL=y |
764 | # CONFIG_3C359 is not set | 722 | # CONFIG_3C359 is not set |
@@ -769,6 +727,7 @@ CONFIG_IBMOL=y | |||
769 | # | 727 | # |
770 | # CONFIG_WLAN_PRE80211 is not set | 728 | # CONFIG_WLAN_PRE80211 is not set |
771 | # CONFIG_WLAN_80211 is not set | 729 | # CONFIG_WLAN_80211 is not set |
730 | # CONFIG_IWLWIFI_LEDS is not set | ||
772 | 731 | ||
773 | # | 732 | # |
774 | # USB Network Adapters | 733 | # USB Network Adapters |
@@ -865,6 +824,7 @@ CONFIG_VT=y | |||
865 | CONFIG_VT_CONSOLE=y | 824 | CONFIG_VT_CONSOLE=y |
866 | CONFIG_HW_CONSOLE=y | 825 | CONFIG_HW_CONSOLE=y |
867 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 826 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
827 | CONFIG_DEVKMEM=y | ||
868 | # CONFIG_SERIAL_NONSTANDARD is not set | 828 | # CONFIG_SERIAL_NONSTANDARD is not set |
869 | # CONFIG_NOZOMI is not set | 829 | # CONFIG_NOZOMI is not set |
870 | 830 | ||
@@ -895,13 +855,7 @@ CONFIG_DEVPORT=y | |||
895 | CONFIG_I2C=y | 855 | CONFIG_I2C=y |
896 | CONFIG_I2C_BOARDINFO=y | 856 | CONFIG_I2C_BOARDINFO=y |
897 | CONFIG_I2C_CHARDEV=y | 857 | CONFIG_I2C_CHARDEV=y |
898 | |||
899 | # | ||
900 | # I2C Algorithms | ||
901 | # | ||
902 | CONFIG_I2C_ALGOBIT=y | 858 | CONFIG_I2C_ALGOBIT=y |
903 | # CONFIG_I2C_ALGOPCF is not set | ||
904 | # CONFIG_I2C_ALGOPCA is not set | ||
905 | 859 | ||
906 | # | 860 | # |
907 | # I2C Hardware Bus support | 861 | # I2C Hardware Bus support |
@@ -930,6 +884,7 @@ CONFIG_I2C_POWERMAC=y | |||
930 | # CONFIG_I2C_VIA is not set | 884 | # CONFIG_I2C_VIA is not set |
931 | # CONFIG_I2C_VIAPRO is not set | 885 | # CONFIG_I2C_VIAPRO is not set |
932 | # CONFIG_I2C_VOODOO3 is not set | 886 | # CONFIG_I2C_VOODOO3 is not set |
887 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
933 | 888 | ||
934 | # | 889 | # |
935 | # Miscellaneous I2C Chip support | 890 | # Miscellaneous I2C Chip support |
@@ -939,19 +894,13 @@ CONFIG_I2C_POWERMAC=y | |||
939 | # CONFIG_SENSORS_PCF8574 is not set | 894 | # CONFIG_SENSORS_PCF8574 is not set |
940 | # CONFIG_PCF8575 is not set | 895 | # CONFIG_PCF8575 is not set |
941 | # CONFIG_SENSORS_PCF8591 is not set | 896 | # CONFIG_SENSORS_PCF8591 is not set |
942 | # CONFIG_TPS65010 is not set | ||
943 | # CONFIG_SENSORS_MAX6875 is not set | 897 | # CONFIG_SENSORS_MAX6875 is not set |
944 | # CONFIG_SENSORS_TSL2550 is not set | 898 | # CONFIG_SENSORS_TSL2550 is not set |
945 | # CONFIG_I2C_DEBUG_CORE is not set | 899 | # CONFIG_I2C_DEBUG_CORE is not set |
946 | # CONFIG_I2C_DEBUG_ALGO is not set | 900 | # CONFIG_I2C_DEBUG_ALGO is not set |
947 | # CONFIG_I2C_DEBUG_BUS is not set | 901 | # CONFIG_I2C_DEBUG_BUS is not set |
948 | # CONFIG_I2C_DEBUG_CHIP is not set | 902 | # CONFIG_I2C_DEBUG_CHIP is not set |
949 | |||
950 | # | ||
951 | # SPI support | ||
952 | # | ||
953 | # CONFIG_SPI is not set | 903 | # CONFIG_SPI is not set |
954 | # CONFIG_SPI_MASTER is not set | ||
955 | # CONFIG_W1 is not set | 904 | # CONFIG_W1 is not set |
956 | # CONFIG_POWER_SUPPLY is not set | 905 | # CONFIG_POWER_SUPPLY is not set |
957 | # CONFIG_HWMON is not set | 906 | # CONFIG_HWMON is not set |
@@ -968,12 +917,22 @@ CONFIG_SSB_POSSIBLE=y | |||
968 | # Multifunction device drivers | 917 | # Multifunction device drivers |
969 | # | 918 | # |
970 | # CONFIG_MFD_SM501 is not set | 919 | # CONFIG_MFD_SM501 is not set |
920 | # CONFIG_HTC_PASIC3 is not set | ||
971 | 921 | ||
972 | # | 922 | # |
973 | # Multimedia devices | 923 | # Multimedia devices |
974 | # | 924 | # |
925 | |||
926 | # | ||
927 | # Multimedia core support | ||
928 | # | ||
975 | # CONFIG_VIDEO_DEV is not set | 929 | # CONFIG_VIDEO_DEV is not set |
976 | # CONFIG_DVB_CORE is not set | 930 | # CONFIG_DVB_CORE is not set |
931 | # CONFIG_VIDEO_MEDIA is not set | ||
932 | |||
933 | # | ||
934 | # Multimedia drivers | ||
935 | # | ||
977 | CONFIG_DAB=y | 936 | CONFIG_DAB=y |
978 | # CONFIG_USB_DABUSB is not set | 937 | # CONFIG_USB_DABUSB is not set |
979 | 938 | ||
@@ -995,8 +954,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
995 | # CONFIG_FB_SYS_FILLRECT is not set | 954 | # CONFIG_FB_SYS_FILLRECT is not set |
996 | # CONFIG_FB_SYS_COPYAREA is not set | 955 | # CONFIG_FB_SYS_COPYAREA is not set |
997 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 956 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
957 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
998 | # CONFIG_FB_SYS_FOPS is not set | 958 | # CONFIG_FB_SYS_FOPS is not set |
999 | CONFIG_FB_DEFERRED_IO=y | ||
1000 | # CONFIG_FB_SVGALIB is not set | 959 | # CONFIG_FB_SVGALIB is not set |
1001 | CONFIG_FB_MACMODES=y | 960 | CONFIG_FB_MACMODES=y |
1002 | CONFIG_FB_BACKLIGHT=y | 961 | CONFIG_FB_BACKLIGHT=y |
@@ -1112,6 +1071,7 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1112 | # CONFIG_SND_AU8810 is not set | 1071 | # CONFIG_SND_AU8810 is not set |
1113 | # CONFIG_SND_AU8820 is not set | 1072 | # CONFIG_SND_AU8820 is not set |
1114 | # CONFIG_SND_AU8830 is not set | 1073 | # CONFIG_SND_AU8830 is not set |
1074 | # CONFIG_SND_AW2 is not set | ||
1115 | # CONFIG_SND_AZT3328 is not set | 1075 | # CONFIG_SND_AZT3328 is not set |
1116 | # CONFIG_SND_BT87X is not set | 1076 | # CONFIG_SND_BT87X is not set |
1117 | # CONFIG_SND_CA0106 is not set | 1077 | # CONFIG_SND_CA0106 is not set |
@@ -1198,11 +1158,11 @@ CONFIG_SND_USB_AUDIO=m | |||
1198 | # CONFIG_SND_SOC is not set | 1158 | # CONFIG_SND_SOC is not set |
1199 | 1159 | ||
1200 | # | 1160 | # |
1201 | # SoC Audio support for SuperH | 1161 | # ALSA SoC audio for Freescale SOCs |
1202 | # | 1162 | # |
1203 | 1163 | ||
1204 | # | 1164 | # |
1205 | # ALSA SoC audio for Freescale SOCs | 1165 | # SoC Audio for the Texas Instruments OMAP |
1206 | # | 1166 | # |
1207 | 1167 | ||
1208 | # | 1168 | # |
@@ -1222,6 +1182,7 @@ CONFIG_USB_HID=y | |||
1222 | CONFIG_HID_FF=y | 1182 | CONFIG_HID_FF=y |
1223 | CONFIG_HID_PID=y | 1183 | CONFIG_HID_PID=y |
1224 | CONFIG_LOGITECH_FF=y | 1184 | CONFIG_LOGITECH_FF=y |
1185 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
1225 | # CONFIG_PANTHERLORD_FF is not set | 1186 | # CONFIG_PANTHERLORD_FF is not set |
1226 | CONFIG_THRUSTMASTER_FF=y | 1187 | CONFIG_THRUSTMASTER_FF=y |
1227 | # CONFIG_ZEROPLUS_FF is not set | 1188 | # CONFIG_ZEROPLUS_FF is not set |
@@ -1245,11 +1206,13 @@ CONFIG_USB_DEVICE_CLASS=y | |||
1245 | # | 1206 | # |
1246 | # USB Host Controller Drivers | 1207 | # USB Host Controller Drivers |
1247 | # | 1208 | # |
1209 | # CONFIG_USB_C67X00_HCD is not set | ||
1248 | CONFIG_USB_EHCI_HCD=y | 1210 | CONFIG_USB_EHCI_HCD=y |
1249 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1211 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1250 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1212 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1251 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 1213 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
1252 | # CONFIG_USB_ISP116X_HCD is not set | 1214 | # CONFIG_USB_ISP116X_HCD is not set |
1215 | # CONFIG_USB_ISP1760_HCD is not set | ||
1253 | CONFIG_USB_OHCI_HCD=y | 1216 | CONFIG_USB_OHCI_HCD=y |
1254 | CONFIG_USB_OHCI_HCD_PPC_OF=y | 1217 | CONFIG_USB_OHCI_HCD_PPC_OF=y |
1255 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | 1218 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y |
@@ -1288,6 +1251,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y | |||
1288 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1251 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1289 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1252 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1290 | # CONFIG_USB_STORAGE_KARMA is not set | 1253 | # CONFIG_USB_STORAGE_KARMA is not set |
1254 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1291 | # CONFIG_USB_LIBUSUAL is not set | 1255 | # CONFIG_USB_LIBUSUAL is not set |
1292 | 1256 | ||
1293 | # | 1257 | # |
@@ -1342,9 +1306,11 @@ CONFIG_USB_SERIAL_KOBIL_SCT=m | |||
1342 | CONFIG_USB_SERIAL_MCT_U232=m | 1306 | CONFIG_USB_SERIAL_MCT_U232=m |
1343 | # CONFIG_USB_SERIAL_MOS7720 is not set | 1307 | # CONFIG_USB_SERIAL_MOS7720 is not set |
1344 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1308 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1309 | # CONFIG_USB_SERIAL_MOTOROLA is not set | ||
1345 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1310 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1346 | CONFIG_USB_SERIAL_PL2303=m | 1311 | CONFIG_USB_SERIAL_PL2303=m |
1347 | # CONFIG_USB_SERIAL_OTI6858 is not set | 1312 | # CONFIG_USB_SERIAL_OTI6858 is not set |
1313 | # CONFIG_USB_SERIAL_SPCP8X5 is not set | ||
1348 | # CONFIG_USB_SERIAL_HP4X is not set | 1314 | # CONFIG_USB_SERIAL_HP4X is not set |
1349 | CONFIG_USB_SERIAL_SAFE=m | 1315 | CONFIG_USB_SERIAL_SAFE=m |
1350 | CONFIG_USB_SERIAL_SAFE_PADDED=y | 1316 | CONFIG_USB_SERIAL_SAFE_PADDED=y |
@@ -1383,14 +1349,11 @@ CONFIG_USB_APPLEDISPLAY=m | |||
1383 | # CONFIG_MMC is not set | 1349 | # CONFIG_MMC is not set |
1384 | # CONFIG_MEMSTICK is not set | 1350 | # CONFIG_MEMSTICK is not set |
1385 | # CONFIG_NEW_LEDS is not set | 1351 | # CONFIG_NEW_LEDS is not set |
1352 | # CONFIG_ACCESSIBILITY is not set | ||
1386 | # CONFIG_INFINIBAND is not set | 1353 | # CONFIG_INFINIBAND is not set |
1387 | # CONFIG_EDAC is not set | 1354 | # CONFIG_EDAC is not set |
1388 | # CONFIG_RTC_CLASS is not set | 1355 | # CONFIG_RTC_CLASS is not set |
1389 | # CONFIG_DMADEVICES is not set | 1356 | # CONFIG_DMADEVICES is not set |
1390 | |||
1391 | # | ||
1392 | # Userspace I/O | ||
1393 | # | ||
1394 | # CONFIG_UIO is not set | 1357 | # CONFIG_UIO is not set |
1395 | 1358 | ||
1396 | # | 1359 | # |
@@ -1420,9 +1383,9 @@ CONFIG_REISERFS_FS_SECURITY=y | |||
1420 | CONFIG_FS_POSIX_ACL=y | 1383 | CONFIG_FS_POSIX_ACL=y |
1421 | CONFIG_XFS_FS=m | 1384 | CONFIG_XFS_FS=m |
1422 | # CONFIG_XFS_QUOTA is not set | 1385 | # CONFIG_XFS_QUOTA is not set |
1423 | CONFIG_XFS_SECURITY=y | ||
1424 | CONFIG_XFS_POSIX_ACL=y | 1386 | CONFIG_XFS_POSIX_ACL=y |
1425 | # CONFIG_XFS_RT is not set | 1387 | # CONFIG_XFS_RT is not set |
1388 | # CONFIG_XFS_DEBUG is not set | ||
1426 | # CONFIG_GFS2_FS is not set | 1389 | # CONFIG_GFS2_FS is not set |
1427 | # CONFIG_OCFS2_FS is not set | 1390 | # CONFIG_OCFS2_FS is not set |
1428 | CONFIG_DNOTIFY=y | 1391 | CONFIG_DNOTIFY=y |
@@ -1488,13 +1451,11 @@ CONFIG_NFS_FS=y | |||
1488 | CONFIG_NFS_V3=y | 1451 | CONFIG_NFS_V3=y |
1489 | CONFIG_NFS_V3_ACL=y | 1452 | CONFIG_NFS_V3_ACL=y |
1490 | CONFIG_NFS_V4=y | 1453 | CONFIG_NFS_V4=y |
1491 | # CONFIG_NFS_DIRECTIO is not set | ||
1492 | CONFIG_NFSD=y | 1454 | CONFIG_NFSD=y |
1493 | CONFIG_NFSD_V2_ACL=y | 1455 | CONFIG_NFSD_V2_ACL=y |
1494 | CONFIG_NFSD_V3=y | 1456 | CONFIG_NFSD_V3=y |
1495 | CONFIG_NFSD_V3_ACL=y | 1457 | CONFIG_NFSD_V3_ACL=y |
1496 | CONFIG_NFSD_V4=y | 1458 | CONFIG_NFSD_V4=y |
1497 | CONFIG_NFSD_TCP=y | ||
1498 | CONFIG_LOCKD=y | 1459 | CONFIG_LOCKD=y |
1499 | CONFIG_LOCKD_V4=y | 1460 | CONFIG_LOCKD_V4=y |
1500 | CONFIG_EXPORTFS=y | 1461 | CONFIG_EXPORTFS=y |
@@ -1583,9 +1544,10 @@ CONFIG_NLS_UTF8=y | |||
1583 | # Library routines | 1544 | # Library routines |
1584 | # | 1545 | # |
1585 | CONFIG_BITREVERSE=y | 1546 | CONFIG_BITREVERSE=y |
1547 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1586 | CONFIG_CRC_CCITT=m | 1548 | CONFIG_CRC_CCITT=m |
1587 | # CONFIG_CRC16 is not set | 1549 | # CONFIG_CRC16 is not set |
1588 | # CONFIG_CRC_ITU_T is not set | 1550 | CONFIG_CRC_ITU_T=m |
1589 | CONFIG_CRC32=y | 1551 | CONFIG_CRC32=y |
1590 | # CONFIG_CRC7 is not set | 1552 | # CONFIG_CRC7 is not set |
1591 | CONFIG_LIBCRC32C=m | 1553 | CONFIG_LIBCRC32C=m |
@@ -1603,6 +1565,7 @@ CONFIG_HAVE_LMB=y | |||
1603 | # CONFIG_PRINTK_TIME is not set | 1565 | # CONFIG_PRINTK_TIME is not set |
1604 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1566 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1605 | CONFIG_ENABLE_MUST_CHECK=y | 1567 | CONFIG_ENABLE_MUST_CHECK=y |
1568 | CONFIG_FRAME_WARN=2048 | ||
1606 | CONFIG_MAGIC_SYSRQ=y | 1569 | CONFIG_MAGIC_SYSRQ=y |
1607 | # CONFIG_UNUSED_SYMBOLS is not set | 1570 | # CONFIG_UNUSED_SYMBOLS is not set |
1608 | CONFIG_DEBUG_FS=y | 1571 | CONFIG_DEBUG_FS=y |
@@ -1613,18 +1576,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1613 | CONFIG_SCHED_DEBUG=y | 1576 | CONFIG_SCHED_DEBUG=y |
1614 | # CONFIG_SCHEDSTATS is not set | 1577 | # CONFIG_SCHEDSTATS is not set |
1615 | # CONFIG_TIMER_STATS is not set | 1578 | # CONFIG_TIMER_STATS is not set |
1579 | # CONFIG_DEBUG_OBJECTS is not set | ||
1616 | # CONFIG_SLUB_DEBUG_ON is not set | 1580 | # CONFIG_SLUB_DEBUG_ON is not set |
1617 | # CONFIG_SLUB_STATS is not set | 1581 | # CONFIG_SLUB_STATS is not set |
1618 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1582 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1619 | # CONFIG_RT_MUTEX_TESTER is not set | 1583 | # CONFIG_RT_MUTEX_TESTER is not set |
1620 | # CONFIG_DEBUG_SPINLOCK is not set | 1584 | # CONFIG_DEBUG_SPINLOCK is not set |
1621 | CONFIG_DEBUG_MUTEXES=y | 1585 | CONFIG_DEBUG_MUTEXES=y |
1586 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1587 | # CONFIG_PROVE_LOCKING is not set | ||
1588 | # CONFIG_LOCK_STAT is not set | ||
1622 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1589 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1623 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1590 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1624 | # CONFIG_DEBUG_KOBJECT is not set | 1591 | # CONFIG_DEBUG_KOBJECT is not set |
1625 | CONFIG_DEBUG_BUGVERBOSE=y | 1592 | CONFIG_DEBUG_BUGVERBOSE=y |
1626 | # CONFIG_DEBUG_INFO is not set | 1593 | # CONFIG_DEBUG_INFO is not set |
1627 | # CONFIG_DEBUG_VM is not set | 1594 | # CONFIG_DEBUG_VM is not set |
1595 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1628 | # CONFIG_DEBUG_LIST is not set | 1596 | # CONFIG_DEBUG_LIST is not set |
1629 | # CONFIG_DEBUG_SG is not set | 1597 | # CONFIG_DEBUG_SG is not set |
1630 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1598 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1648,53 +1616,83 @@ CONFIG_BOOTX_TEXT=y | |||
1648 | # CONFIG_SECURITY is not set | 1616 | # CONFIG_SECURITY is not set |
1649 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1617 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1650 | CONFIG_CRYPTO=y | 1618 | CONFIG_CRYPTO=y |
1619 | |||
1620 | # | ||
1621 | # Crypto core or helper | ||
1622 | # | ||
1651 | CONFIG_CRYPTO_ALGAPI=y | 1623 | CONFIG_CRYPTO_ALGAPI=y |
1652 | CONFIG_CRYPTO_AEAD=m | 1624 | CONFIG_CRYPTO_AEAD=m |
1653 | CONFIG_CRYPTO_BLKCIPHER=y | 1625 | CONFIG_CRYPTO_BLKCIPHER=y |
1654 | # CONFIG_CRYPTO_SEQIV is not set | ||
1655 | CONFIG_CRYPTO_HASH=y | 1626 | CONFIG_CRYPTO_HASH=y |
1656 | CONFIG_CRYPTO_MANAGER=y | 1627 | CONFIG_CRYPTO_MANAGER=y |
1628 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1629 | CONFIG_CRYPTO_NULL=m | ||
1630 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1631 | CONFIG_CRYPTO_AUTHENC=m | ||
1632 | CONFIG_CRYPTO_TEST=m | ||
1633 | |||
1634 | # | ||
1635 | # Authenticated Encryption with Associated Data | ||
1636 | # | ||
1637 | # CONFIG_CRYPTO_CCM is not set | ||
1638 | # CONFIG_CRYPTO_GCM is not set | ||
1639 | # CONFIG_CRYPTO_SEQIV is not set | ||
1640 | |||
1641 | # | ||
1642 | # Block modes | ||
1643 | # | ||
1644 | CONFIG_CRYPTO_CBC=y | ||
1645 | # CONFIG_CRYPTO_CTR is not set | ||
1646 | # CONFIG_CRYPTO_CTS is not set | ||
1647 | CONFIG_CRYPTO_ECB=m | ||
1648 | # CONFIG_CRYPTO_LRW is not set | ||
1649 | CONFIG_CRYPTO_PCBC=m | ||
1650 | # CONFIG_CRYPTO_XTS is not set | ||
1651 | |||
1652 | # | ||
1653 | # Hash modes | ||
1654 | # | ||
1657 | CONFIG_CRYPTO_HMAC=y | 1655 | CONFIG_CRYPTO_HMAC=y |
1658 | # CONFIG_CRYPTO_XCBC is not set | 1656 | # CONFIG_CRYPTO_XCBC is not set |
1659 | CONFIG_CRYPTO_NULL=m | 1657 | |
1658 | # | ||
1659 | # Digest | ||
1660 | # | ||
1661 | CONFIG_CRYPTO_CRC32C=m | ||
1660 | CONFIG_CRYPTO_MD4=m | 1662 | CONFIG_CRYPTO_MD4=m |
1661 | CONFIG_CRYPTO_MD5=y | 1663 | CONFIG_CRYPTO_MD5=y |
1664 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1662 | CONFIG_CRYPTO_SHA1=m | 1665 | CONFIG_CRYPTO_SHA1=m |
1663 | CONFIG_CRYPTO_SHA256=m | 1666 | CONFIG_CRYPTO_SHA256=m |
1664 | CONFIG_CRYPTO_SHA512=m | 1667 | CONFIG_CRYPTO_SHA512=m |
1665 | CONFIG_CRYPTO_WP512=m | ||
1666 | # CONFIG_CRYPTO_TGR192 is not set | 1668 | # CONFIG_CRYPTO_TGR192 is not set |
1667 | # CONFIG_CRYPTO_GF128MUL is not set | 1669 | CONFIG_CRYPTO_WP512=m |
1668 | CONFIG_CRYPTO_ECB=m | 1670 | |
1669 | CONFIG_CRYPTO_CBC=y | 1671 | # |
1670 | CONFIG_CRYPTO_PCBC=m | 1672 | # Ciphers |
1671 | # CONFIG_CRYPTO_LRW is not set | 1673 | # |
1672 | # CONFIG_CRYPTO_XTS is not set | ||
1673 | # CONFIG_CRYPTO_CTR is not set | ||
1674 | # CONFIG_CRYPTO_GCM is not set | ||
1675 | # CONFIG_CRYPTO_CCM is not set | ||
1676 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1677 | CONFIG_CRYPTO_DES=y | ||
1678 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1679 | CONFIG_CRYPTO_BLOWFISH=m | ||
1680 | CONFIG_CRYPTO_TWOFISH=m | ||
1681 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1682 | CONFIG_CRYPTO_SERPENT=m | ||
1683 | CONFIG_CRYPTO_AES=m | 1674 | CONFIG_CRYPTO_AES=m |
1675 | CONFIG_CRYPTO_ANUBIS=m | ||
1676 | CONFIG_CRYPTO_ARC4=m | ||
1677 | CONFIG_CRYPTO_BLOWFISH=m | ||
1678 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1684 | CONFIG_CRYPTO_CAST5=m | 1679 | CONFIG_CRYPTO_CAST5=m |
1685 | CONFIG_CRYPTO_CAST6=m | 1680 | CONFIG_CRYPTO_CAST6=m |
1686 | CONFIG_CRYPTO_TEA=m | 1681 | CONFIG_CRYPTO_DES=y |
1687 | CONFIG_CRYPTO_ARC4=m | 1682 | # CONFIG_CRYPTO_FCRYPT is not set |
1688 | CONFIG_CRYPTO_KHAZAD=m | 1683 | CONFIG_CRYPTO_KHAZAD=m |
1689 | CONFIG_CRYPTO_ANUBIS=m | ||
1690 | # CONFIG_CRYPTO_SEED is not set | ||
1691 | # CONFIG_CRYPTO_SALSA20 is not set | 1684 | # CONFIG_CRYPTO_SALSA20 is not set |
1685 | # CONFIG_CRYPTO_SEED is not set | ||
1686 | CONFIG_CRYPTO_SERPENT=m | ||
1687 | CONFIG_CRYPTO_TEA=m | ||
1688 | CONFIG_CRYPTO_TWOFISH=m | ||
1689 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1690 | |||
1691 | # | ||
1692 | # Compression | ||
1693 | # | ||
1692 | CONFIG_CRYPTO_DEFLATE=m | 1694 | CONFIG_CRYPTO_DEFLATE=m |
1693 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1694 | CONFIG_CRYPTO_CRC32C=m | ||
1695 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1696 | CONFIG_CRYPTO_TEST=m | ||
1697 | CONFIG_CRYPTO_AUTHENC=m | ||
1698 | # CONFIG_CRYPTO_LZO is not set | 1695 | # CONFIG_CRYPTO_LZO is not set |
1699 | # CONFIG_CRYPTO_HW is not set | 1696 | # CONFIG_CRYPTO_HW is not set |
1700 | # CONFIG_PPC_CLOCK is not set | 1697 | # CONFIG_PPC_CLOCK is not set |
1698 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig index b3128fb7ce7e..63f0bdb6340d 100644 --- a/arch/powerpc/configs/iseries_defconfig +++ b/arch/powerpc/configs/iseries_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:55:45 2008 | 4 | # Tue May 20 20:01:36 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
30 | CONFIG_GENERIC_HARDIRQS=y | 30 | CONFIG_GENERIC_HARDIRQS=y |
31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
32 | CONFIG_IRQ_PER_CPU=y | 32 | CONFIG_IRQ_PER_CPU=y |
33 | CONFIG_STACKTRACE_SUPPORT=y | ||
34 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
33 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
34 | CONFIG_ARCH_HAS_ILOG2_U32=y | 37 | CONFIG_ARCH_HAS_ILOG2_U32=y |
35 | CONFIG_ARCH_HAS_ILOG2_U64=y | 38 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -91,6 +94,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
91 | CONFIG_SYSCTL=y | 94 | CONFIG_SYSCTL=y |
92 | # CONFIG_EMBEDDED is not set | 95 | # CONFIG_EMBEDDED is not set |
93 | CONFIG_SYSCTL_SYSCALL=y | 96 | CONFIG_SYSCTL_SYSCALL=y |
97 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
94 | CONFIG_KALLSYMS=y | 98 | CONFIG_KALLSYMS=y |
95 | # CONFIG_KALLSYMS_ALL is not set | 99 | # CONFIG_KALLSYMS_ALL is not set |
96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 100 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -118,12 +122,14 @@ CONFIG_HAVE_OPROFILE=y | |||
118 | # CONFIG_KPROBES is not set | 122 | # CONFIG_KPROBES is not set |
119 | CONFIG_HAVE_KPROBES=y | 123 | CONFIG_HAVE_KPROBES=y |
120 | CONFIG_HAVE_KRETPROBES=y | 124 | CONFIG_HAVE_KRETPROBES=y |
125 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
121 | CONFIG_PROC_PAGE_MONITOR=y | 126 | CONFIG_PROC_PAGE_MONITOR=y |
122 | CONFIG_SLABINFO=y | 127 | CONFIG_SLABINFO=y |
123 | CONFIG_RT_MUTEXES=y | 128 | CONFIG_RT_MUTEXES=y |
124 | # CONFIG_TINY_SHMEM is not set | 129 | # CONFIG_TINY_SHMEM is not set |
125 | CONFIG_BASE_SMALL=0 | 130 | CONFIG_BASE_SMALL=0 |
126 | CONFIG_MODULES=y | 131 | CONFIG_MODULES=y |
132 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
127 | CONFIG_MODULE_UNLOAD=y | 133 | CONFIG_MODULE_UNLOAD=y |
128 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 134 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
129 | CONFIG_MODVERSIONS=y | 135 | CONFIG_MODVERSIONS=y |
@@ -172,11 +178,11 @@ CONFIG_VIOPATH=y | |||
172 | # CONFIG_PPC_PMAC is not set | 178 | # CONFIG_PPC_PMAC is not set |
173 | # CONFIG_PPC_MAPLE is not set | 179 | # CONFIG_PPC_MAPLE is not set |
174 | # CONFIG_PPC_PASEMI is not set | 180 | # CONFIG_PPC_PASEMI is not set |
175 | # CONFIG_PPC_CELLEB is not set | ||
176 | # CONFIG_PPC_PS3 is not set | 181 | # CONFIG_PPC_PS3 is not set |
177 | # CONFIG_PPC_CELL is not set | 182 | # CONFIG_PPC_CELL is not set |
178 | # CONFIG_PPC_CELL_NATIVE is not set | 183 | # CONFIG_PPC_CELL_NATIVE is not set |
179 | # CONFIG_PPC_IBM_CELL_BLADE is not set | 184 | # CONFIG_PPC_IBM_CELL_BLADE is not set |
185 | # CONFIG_PPC_CELLEB is not set | ||
180 | # CONFIG_PQ2ADS is not set | 186 | # CONFIG_PQ2ADS is not set |
181 | # CONFIG_IPIC is not set | 187 | # CONFIG_IPIC is not set |
182 | # CONFIG_MPIC is not set | 188 | # CONFIG_MPIC is not set |
@@ -212,7 +218,6 @@ CONFIG_PREEMPT_NONE=y | |||
212 | CONFIG_BINFMT_ELF=y | 218 | CONFIG_BINFMT_ELF=y |
213 | CONFIG_COMPAT_BINFMT_ELF=y | 219 | CONFIG_COMPAT_BINFMT_ELF=y |
214 | # CONFIG_BINFMT_MISC is not set | 220 | # CONFIG_BINFMT_MISC is not set |
215 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
216 | CONFIG_IOMMU_VMERGE=y | 221 | CONFIG_IOMMU_VMERGE=y |
217 | CONFIG_IOMMU_HELPER=y | 222 | CONFIG_IOMMU_HELPER=y |
218 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 223 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
@@ -234,12 +239,14 @@ CONFIG_FLATMEM=y | |||
234 | CONFIG_FLAT_NODE_MEM_MAP=y | 239 | CONFIG_FLAT_NODE_MEM_MAP=y |
235 | # CONFIG_SPARSEMEM_STATIC is not set | 240 | # CONFIG_SPARSEMEM_STATIC is not set |
236 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 241 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
242 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
237 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 243 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
238 | CONFIG_RESOURCES_64BIT=y | 244 | CONFIG_RESOURCES_64BIT=y |
239 | CONFIG_ZONE_DMA_FLAG=1 | 245 | CONFIG_ZONE_DMA_FLAG=1 |
240 | CONFIG_BOUNCE=y | 246 | CONFIG_BOUNCE=y |
241 | # CONFIG_PPC_HAS_HASH_64K is not set | 247 | # CONFIG_PPC_HAS_HASH_64K is not set |
242 | # CONFIG_PPC_64K_PAGES is not set | 248 | # CONFIG_PPC_64K_PAGES is not set |
249 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
243 | # CONFIG_SCHED_SMT is not set | 250 | # CONFIG_SCHED_SMT is not set |
244 | CONFIG_PROC_DEVICETREE=y | 251 | CONFIG_PROC_DEVICETREE=y |
245 | # CONFIG_CMDLINE_BOOL is not set | 252 | # CONFIG_CMDLINE_BOOL is not set |
@@ -263,7 +270,10 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
263 | # CONFIG_PCI_DEBUG is not set | 270 | # CONFIG_PCI_DEBUG is not set |
264 | # CONFIG_PCCARD is not set | 271 | # CONFIG_PCCARD is not set |
265 | # CONFIG_HOTPLUG_PCI is not set | 272 | # CONFIG_HOTPLUG_PCI is not set |
273 | # CONFIG_HAS_RAPIDIO is not set | ||
274 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
266 | CONFIG_KERNEL_START=0xc000000000000000 | 275 | CONFIG_KERNEL_START=0xc000000000000000 |
276 | CONFIG_PHYSICAL_START=0x00000000 | ||
267 | 277 | ||
268 | # | 278 | # |
269 | # Networking | 279 | # Networking |
@@ -310,8 +320,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
310 | # CONFIG_TCP_MD5SIG is not set | 320 | # CONFIG_TCP_MD5SIG is not set |
311 | # CONFIG_IP_VS is not set | 321 | # CONFIG_IP_VS is not set |
312 | # CONFIG_IPV6 is not set | 322 | # CONFIG_IPV6 is not set |
313 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
314 | # CONFIG_INET6_TUNNEL is not set | ||
315 | # CONFIG_NETWORK_SECMARK is not set | 323 | # CONFIG_NETWORK_SECMARK is not set |
316 | CONFIG_NETFILTER=y | 324 | CONFIG_NETFILTER=y |
317 | # CONFIG_NETFILTER_DEBUG is not set | 325 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -327,6 +335,7 @@ CONFIG_NF_CONNTRACK=m | |||
327 | # CONFIG_NF_CT_ACCT is not set | 335 | # CONFIG_NF_CT_ACCT is not set |
328 | CONFIG_NF_CONNTRACK_MARK=y | 336 | CONFIG_NF_CONNTRACK_MARK=y |
329 | CONFIG_NF_CONNTRACK_EVENTS=y | 337 | CONFIG_NF_CONNTRACK_EVENTS=y |
338 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
330 | # CONFIG_NF_CT_PROTO_SCTP is not set | 339 | # CONFIG_NF_CT_PROTO_SCTP is not set |
331 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | 340 | # CONFIG_NF_CT_PROTO_UDPLITE is not set |
332 | # CONFIG_NF_CONNTRACK_AMANDA is not set | 341 | # CONFIG_NF_CONNTRACK_AMANDA is not set |
@@ -631,7 +640,6 @@ CONFIG_MII=y | |||
631 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 640 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
632 | CONFIG_NET_PCI=y | 641 | CONFIG_NET_PCI=y |
633 | CONFIG_PCNET32=y | 642 | CONFIG_PCNET32=y |
634 | CONFIG_PCNET32_NAPI=y | ||
635 | # CONFIG_AMD8111_ETH is not set | 643 | # CONFIG_AMD8111_ETH is not set |
636 | # CONFIG_ADAPTEC_STARFIRE is not set | 644 | # CONFIG_ADAPTEC_STARFIRE is not set |
637 | # CONFIG_B44 is not set | 645 | # CONFIG_B44 is not set |
@@ -667,7 +675,6 @@ CONFIG_E1000=m | |||
667 | # CONFIG_SIS190 is not set | 675 | # CONFIG_SIS190 is not set |
668 | # CONFIG_SKGE is not set | 676 | # CONFIG_SKGE is not set |
669 | # CONFIG_SKY2 is not set | 677 | # CONFIG_SKY2 is not set |
670 | # CONFIG_SK98LIN is not set | ||
671 | # CONFIG_VIA_VELOCITY is not set | 678 | # CONFIG_VIA_VELOCITY is not set |
672 | # CONFIG_TIGON3 is not set | 679 | # CONFIG_TIGON3 is not set |
673 | # CONFIG_BNX2 is not set | 680 | # CONFIG_BNX2 is not set |
@@ -682,10 +689,10 @@ CONFIG_NETDEV_10000=y | |||
682 | # CONFIG_MYRI10GE is not set | 689 | # CONFIG_MYRI10GE is not set |
683 | # CONFIG_NETXEN_NIC is not set | 690 | # CONFIG_NETXEN_NIC is not set |
684 | # CONFIG_NIU is not set | 691 | # CONFIG_NIU is not set |
685 | # CONFIG_PASEMI_MAC is not set | ||
686 | # CONFIG_MLX4_CORE is not set | 692 | # CONFIG_MLX4_CORE is not set |
687 | # CONFIG_TEHUTI is not set | 693 | # CONFIG_TEHUTI is not set |
688 | # CONFIG_BNX2X is not set | 694 | # CONFIG_BNX2X is not set |
695 | # CONFIG_SFC is not set | ||
689 | CONFIG_TR=y | 696 | CONFIG_TR=y |
690 | CONFIG_IBMOL=y | 697 | CONFIG_IBMOL=y |
691 | # CONFIG_3C359 is not set | 698 | # CONFIG_3C359 is not set |
@@ -696,6 +703,7 @@ CONFIG_IBMOL=y | |||
696 | # | 703 | # |
697 | # CONFIG_WLAN_PRE80211 is not set | 704 | # CONFIG_WLAN_PRE80211 is not set |
698 | # CONFIG_WLAN_80211 is not set | 705 | # CONFIG_WLAN_80211 is not set |
706 | # CONFIG_IWLWIFI_LEDS is not set | ||
699 | # CONFIG_WAN is not set | 707 | # CONFIG_WAN is not set |
700 | CONFIG_ISERIES_VETH=y | 708 | CONFIG_ISERIES_VETH=y |
701 | # CONFIG_FDDI is not set | 709 | # CONFIG_FDDI is not set |
@@ -762,6 +770,7 @@ CONFIG_VT=y | |||
762 | CONFIG_VT_CONSOLE=y | 770 | CONFIG_VT_CONSOLE=y |
763 | CONFIG_HW_CONSOLE=y | 771 | CONFIG_HW_CONSOLE=y |
764 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 772 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
773 | CONFIG_DEVKMEM=y | ||
765 | # CONFIG_SERIAL_NONSTANDARD is not set | 774 | # CONFIG_SERIAL_NONSTANDARD is not set |
766 | # CONFIG_NOZOMI is not set | 775 | # CONFIG_NOZOMI is not set |
767 | 776 | ||
@@ -793,12 +802,7 @@ CONFIG_MAX_RAW_DEVS=256 | |||
793 | # CONFIG_TCG_TPM is not set | 802 | # CONFIG_TCG_TPM is not set |
794 | CONFIG_DEVPORT=y | 803 | CONFIG_DEVPORT=y |
795 | # CONFIG_I2C is not set | 804 | # CONFIG_I2C is not set |
796 | |||
797 | # | ||
798 | # SPI support | ||
799 | # | ||
800 | # CONFIG_SPI is not set | 805 | # CONFIG_SPI is not set |
801 | # CONFIG_SPI_MASTER is not set | ||
802 | # CONFIG_W1 is not set | 806 | # CONFIG_W1 is not set |
803 | # CONFIG_POWER_SUPPLY is not set | 807 | # CONFIG_POWER_SUPPLY is not set |
804 | # CONFIG_HWMON is not set | 808 | # CONFIG_HWMON is not set |
@@ -815,12 +819,22 @@ CONFIG_SSB_POSSIBLE=y | |||
815 | # Multifunction device drivers | 819 | # Multifunction device drivers |
816 | # | 820 | # |
817 | # CONFIG_MFD_SM501 is not set | 821 | # CONFIG_MFD_SM501 is not set |
822 | # CONFIG_HTC_PASIC3 is not set | ||
818 | 823 | ||
819 | # | 824 | # |
820 | # Multimedia devices | 825 | # Multimedia devices |
821 | # | 826 | # |
827 | |||
828 | # | ||
829 | # Multimedia core support | ||
830 | # | ||
822 | # CONFIG_VIDEO_DEV is not set | 831 | # CONFIG_VIDEO_DEV is not set |
823 | # CONFIG_DVB_CORE is not set | 832 | # CONFIG_DVB_CORE is not set |
833 | # CONFIG_VIDEO_MEDIA is not set | ||
834 | |||
835 | # | ||
836 | # Multimedia drivers | ||
837 | # | ||
824 | # CONFIG_DAB is not set | 838 | # CONFIG_DAB is not set |
825 | 839 | ||
826 | # | 840 | # |
@@ -854,14 +868,11 @@ CONFIG_DUMMY_CONSOLE=y | |||
854 | # CONFIG_MMC is not set | 868 | # CONFIG_MMC is not set |
855 | # CONFIG_MEMSTICK is not set | 869 | # CONFIG_MEMSTICK is not set |
856 | # CONFIG_NEW_LEDS is not set | 870 | # CONFIG_NEW_LEDS is not set |
871 | # CONFIG_ACCESSIBILITY is not set | ||
857 | # CONFIG_INFINIBAND is not set | 872 | # CONFIG_INFINIBAND is not set |
858 | # CONFIG_EDAC is not set | 873 | # CONFIG_EDAC is not set |
859 | # CONFIG_RTC_CLASS is not set | 874 | # CONFIG_RTC_CLASS is not set |
860 | # CONFIG_DMADEVICES is not set | 875 | # CONFIG_DMADEVICES is not set |
861 | |||
862 | # | ||
863 | # Userspace I/O | ||
864 | # | ||
865 | # CONFIG_UIO is not set | 876 | # CONFIG_UIO is not set |
866 | 877 | ||
867 | # | 878 | # |
@@ -895,9 +906,9 @@ CONFIG_JFS_SECURITY=y | |||
895 | CONFIG_FS_POSIX_ACL=y | 906 | CONFIG_FS_POSIX_ACL=y |
896 | CONFIG_XFS_FS=m | 907 | CONFIG_XFS_FS=m |
897 | # CONFIG_XFS_QUOTA is not set | 908 | # CONFIG_XFS_QUOTA is not set |
898 | CONFIG_XFS_SECURITY=y | ||
899 | CONFIG_XFS_POSIX_ACL=y | 909 | CONFIG_XFS_POSIX_ACL=y |
900 | # CONFIG_XFS_RT is not set | 910 | # CONFIG_XFS_RT is not set |
911 | # CONFIG_XFS_DEBUG is not set | ||
901 | CONFIG_GFS2_FS=m | 912 | CONFIG_GFS2_FS=m |
902 | CONFIG_GFS2_FS_LOCKING_NOLOCK=m | 913 | CONFIG_GFS2_FS_LOCKING_NOLOCK=m |
903 | CONFIG_GFS2_FS_LOCKING_DLM=m | 914 | CONFIG_GFS2_FS_LOCKING_DLM=m |
@@ -966,13 +977,11 @@ CONFIG_NFS_FS=y | |||
966 | CONFIG_NFS_V3=y | 977 | CONFIG_NFS_V3=y |
967 | CONFIG_NFS_V3_ACL=y | 978 | CONFIG_NFS_V3_ACL=y |
968 | CONFIG_NFS_V4=y | 979 | CONFIG_NFS_V4=y |
969 | # CONFIG_NFS_DIRECTIO is not set | ||
970 | CONFIG_NFSD=m | 980 | CONFIG_NFSD=m |
971 | CONFIG_NFSD_V2_ACL=y | 981 | CONFIG_NFSD_V2_ACL=y |
972 | CONFIG_NFSD_V3=y | 982 | CONFIG_NFSD_V3=y |
973 | CONFIG_NFSD_V3_ACL=y | 983 | CONFIG_NFSD_V3_ACL=y |
974 | CONFIG_NFSD_V4=y | 984 | CONFIG_NFSD_V4=y |
975 | CONFIG_NFSD_TCP=y | ||
976 | CONFIG_LOCKD=y | 985 | CONFIG_LOCKD=y |
977 | CONFIG_LOCKD_V4=y | 986 | CONFIG_LOCKD_V4=y |
978 | CONFIG_EXPORTFS=m | 987 | CONFIG_EXPORTFS=m |
@@ -1047,9 +1056,10 @@ CONFIG_DLM=m | |||
1047 | # Library routines | 1056 | # Library routines |
1048 | # | 1057 | # |
1049 | CONFIG_BITREVERSE=y | 1058 | CONFIG_BITREVERSE=y |
1059 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1050 | CONFIG_CRC_CCITT=m | 1060 | CONFIG_CRC_CCITT=m |
1051 | # CONFIG_CRC16 is not set | 1061 | # CONFIG_CRC16 is not set |
1052 | # CONFIG_CRC_ITU_T is not set | 1062 | CONFIG_CRC_ITU_T=m |
1053 | CONFIG_CRC32=y | 1063 | CONFIG_CRC32=y |
1054 | # CONFIG_CRC7 is not set | 1064 | # CONFIG_CRC7 is not set |
1055 | CONFIG_LIBCRC32C=m | 1065 | CONFIG_LIBCRC32C=m |
@@ -1071,6 +1081,7 @@ CONFIG_HAVE_LMB=y | |||
1071 | # CONFIG_PRINTK_TIME is not set | 1081 | # CONFIG_PRINTK_TIME is not set |
1072 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1082 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1073 | CONFIG_ENABLE_MUST_CHECK=y | 1083 | CONFIG_ENABLE_MUST_CHECK=y |
1084 | CONFIG_FRAME_WARN=2048 | ||
1074 | CONFIG_MAGIC_SYSRQ=y | 1085 | CONFIG_MAGIC_SYSRQ=y |
1075 | # CONFIG_UNUSED_SYMBOLS is not set | 1086 | # CONFIG_UNUSED_SYMBOLS is not set |
1076 | CONFIG_DEBUG_FS=y | 1087 | CONFIG_DEBUG_FS=y |
@@ -1081,18 +1092,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1081 | CONFIG_SCHED_DEBUG=y | 1092 | CONFIG_SCHED_DEBUG=y |
1082 | # CONFIG_SCHEDSTATS is not set | 1093 | # CONFIG_SCHEDSTATS is not set |
1083 | # CONFIG_TIMER_STATS is not set | 1094 | # CONFIG_TIMER_STATS is not set |
1095 | # CONFIG_DEBUG_OBJECTS is not set | ||
1084 | # CONFIG_SLUB_DEBUG_ON is not set | 1096 | # CONFIG_SLUB_DEBUG_ON is not set |
1085 | # CONFIG_SLUB_STATS is not set | 1097 | # CONFIG_SLUB_STATS is not set |
1086 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1098 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1087 | # CONFIG_RT_MUTEX_TESTER is not set | 1099 | # CONFIG_RT_MUTEX_TESTER is not set |
1088 | # CONFIG_DEBUG_SPINLOCK is not set | 1100 | # CONFIG_DEBUG_SPINLOCK is not set |
1089 | # CONFIG_DEBUG_MUTEXES is not set | 1101 | # CONFIG_DEBUG_MUTEXES is not set |
1102 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1103 | # CONFIG_PROVE_LOCKING is not set | ||
1104 | # CONFIG_LOCK_STAT is not set | ||
1090 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1105 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1091 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1106 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1092 | # CONFIG_DEBUG_KOBJECT is not set | 1107 | # CONFIG_DEBUG_KOBJECT is not set |
1093 | CONFIG_DEBUG_BUGVERBOSE=y | 1108 | CONFIG_DEBUG_BUGVERBOSE=y |
1094 | # CONFIG_DEBUG_INFO is not set | 1109 | # CONFIG_DEBUG_INFO is not set |
1095 | # CONFIG_DEBUG_VM is not set | 1110 | # CONFIG_DEBUG_VM is not set |
1111 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1096 | # CONFIG_DEBUG_LIST is not set | 1112 | # CONFIG_DEBUG_LIST is not set |
1097 | # CONFIG_DEBUG_SG is not set | 1113 | # CONFIG_DEBUG_SG is not set |
1098 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1114 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1116,53 +1132,83 @@ CONFIG_IRQSTACKS=y | |||
1116 | # CONFIG_SECURITY is not set | 1132 | # CONFIG_SECURITY is not set |
1117 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1133 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1118 | CONFIG_CRYPTO=y | 1134 | CONFIG_CRYPTO=y |
1135 | |||
1136 | # | ||
1137 | # Crypto core or helper | ||
1138 | # | ||
1119 | CONFIG_CRYPTO_ALGAPI=y | 1139 | CONFIG_CRYPTO_ALGAPI=y |
1120 | CONFIG_CRYPTO_AEAD=m | 1140 | CONFIG_CRYPTO_AEAD=m |
1121 | CONFIG_CRYPTO_BLKCIPHER=y | 1141 | CONFIG_CRYPTO_BLKCIPHER=y |
1122 | # CONFIG_CRYPTO_SEQIV is not set | ||
1123 | CONFIG_CRYPTO_HASH=y | 1142 | CONFIG_CRYPTO_HASH=y |
1124 | CONFIG_CRYPTO_MANAGER=y | 1143 | CONFIG_CRYPTO_MANAGER=y |
1144 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1145 | CONFIG_CRYPTO_NULL=m | ||
1146 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1147 | CONFIG_CRYPTO_AUTHENC=m | ||
1148 | CONFIG_CRYPTO_TEST=m | ||
1149 | |||
1150 | # | ||
1151 | # Authenticated Encryption with Associated Data | ||
1152 | # | ||
1153 | # CONFIG_CRYPTO_CCM is not set | ||
1154 | # CONFIG_CRYPTO_GCM is not set | ||
1155 | # CONFIG_CRYPTO_SEQIV is not set | ||
1156 | |||
1157 | # | ||
1158 | # Block modes | ||
1159 | # | ||
1160 | CONFIG_CRYPTO_CBC=y | ||
1161 | # CONFIG_CRYPTO_CTR is not set | ||
1162 | # CONFIG_CRYPTO_CTS is not set | ||
1163 | CONFIG_CRYPTO_ECB=m | ||
1164 | # CONFIG_CRYPTO_LRW is not set | ||
1165 | CONFIG_CRYPTO_PCBC=m | ||
1166 | # CONFIG_CRYPTO_XTS is not set | ||
1167 | |||
1168 | # | ||
1169 | # Hash modes | ||
1170 | # | ||
1125 | CONFIG_CRYPTO_HMAC=y | 1171 | CONFIG_CRYPTO_HMAC=y |
1126 | # CONFIG_CRYPTO_XCBC is not set | 1172 | # CONFIG_CRYPTO_XCBC is not set |
1127 | CONFIG_CRYPTO_NULL=m | 1173 | |
1174 | # | ||
1175 | # Digest | ||
1176 | # | ||
1177 | CONFIG_CRYPTO_CRC32C=m | ||
1128 | CONFIG_CRYPTO_MD4=m | 1178 | CONFIG_CRYPTO_MD4=m |
1129 | CONFIG_CRYPTO_MD5=y | 1179 | CONFIG_CRYPTO_MD5=y |
1180 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1130 | CONFIG_CRYPTO_SHA1=m | 1181 | CONFIG_CRYPTO_SHA1=m |
1131 | CONFIG_CRYPTO_SHA256=m | 1182 | CONFIG_CRYPTO_SHA256=m |
1132 | CONFIG_CRYPTO_SHA512=m | 1183 | CONFIG_CRYPTO_SHA512=m |
1133 | CONFIG_CRYPTO_WP512=m | ||
1134 | CONFIG_CRYPTO_TGR192=m | 1184 | CONFIG_CRYPTO_TGR192=m |
1135 | # CONFIG_CRYPTO_GF128MUL is not set | 1185 | CONFIG_CRYPTO_WP512=m |
1136 | CONFIG_CRYPTO_ECB=m | 1186 | |
1137 | CONFIG_CRYPTO_CBC=y | 1187 | # |
1138 | CONFIG_CRYPTO_PCBC=m | 1188 | # Ciphers |
1139 | # CONFIG_CRYPTO_LRW is not set | 1189 | # |
1140 | # CONFIG_CRYPTO_XTS is not set | ||
1141 | # CONFIG_CRYPTO_CTR is not set | ||
1142 | # CONFIG_CRYPTO_GCM is not set | ||
1143 | # CONFIG_CRYPTO_CCM is not set | ||
1144 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1145 | CONFIG_CRYPTO_DES=y | ||
1146 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1147 | CONFIG_CRYPTO_BLOWFISH=m | ||
1148 | CONFIG_CRYPTO_TWOFISH=m | ||
1149 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1150 | CONFIG_CRYPTO_SERPENT=m | ||
1151 | CONFIG_CRYPTO_AES=m | 1190 | CONFIG_CRYPTO_AES=m |
1191 | CONFIG_CRYPTO_ANUBIS=m | ||
1192 | CONFIG_CRYPTO_ARC4=m | ||
1193 | CONFIG_CRYPTO_BLOWFISH=m | ||
1194 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1152 | CONFIG_CRYPTO_CAST5=m | 1195 | CONFIG_CRYPTO_CAST5=m |
1153 | CONFIG_CRYPTO_CAST6=m | 1196 | CONFIG_CRYPTO_CAST6=m |
1154 | CONFIG_CRYPTO_TEA=m | 1197 | CONFIG_CRYPTO_DES=y |
1155 | CONFIG_CRYPTO_ARC4=m | 1198 | # CONFIG_CRYPTO_FCRYPT is not set |
1156 | CONFIG_CRYPTO_KHAZAD=m | 1199 | CONFIG_CRYPTO_KHAZAD=m |
1157 | CONFIG_CRYPTO_ANUBIS=m | ||
1158 | CONFIG_CRYPTO_SEED=m | ||
1159 | # CONFIG_CRYPTO_SALSA20 is not set | 1200 | # CONFIG_CRYPTO_SALSA20 is not set |
1201 | CONFIG_CRYPTO_SEED=m | ||
1202 | CONFIG_CRYPTO_SERPENT=m | ||
1203 | CONFIG_CRYPTO_TEA=m | ||
1204 | CONFIG_CRYPTO_TWOFISH=m | ||
1205 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1206 | |||
1207 | # | ||
1208 | # Compression | ||
1209 | # | ||
1160 | CONFIG_CRYPTO_DEFLATE=m | 1210 | CONFIG_CRYPTO_DEFLATE=m |
1161 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1162 | CONFIG_CRYPTO_CRC32C=m | ||
1163 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1164 | CONFIG_CRYPTO_TEST=m | ||
1165 | CONFIG_CRYPTO_AUTHENC=m | ||
1166 | # CONFIG_CRYPTO_LZO is not set | 1211 | # CONFIG_CRYPTO_LZO is not set |
1167 | # CONFIG_CRYPTO_HW is not set | 1212 | # CONFIG_CRYPTO_HW is not set |
1168 | # CONFIG_PPC_CLOCK is not set | 1213 | # CONFIG_PPC_CLOCK is not set |
1214 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index 09f306248f2e..199e5f59d7a6 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Tue Mar 25 10:25:48 2008 | 4 | # Tue May 27 16:08:06 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -29,6 +29,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
29 | CONFIG_GENERIC_HARDIRQS=y | 29 | CONFIG_GENERIC_HARDIRQS=y |
30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
31 | CONFIG_IRQ_PER_CPU=y | 31 | CONFIG_IRQ_PER_CPU=y |
32 | CONFIG_STACKTRACE_SUPPORT=y | ||
33 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
34 | CONFIG_LOCKDEP_SUPPORT=y | ||
32 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
33 | CONFIG_ARCH_HAS_ILOG2_U32=y | 36 | CONFIG_ARCH_HAS_ILOG2_U32=y |
34 | CONFIG_ARCH_HAS_ILOG2_U64=y | 37 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -87,6 +90,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
87 | CONFIG_SYSCTL=y | 90 | CONFIG_SYSCTL=y |
88 | # CONFIG_EMBEDDED is not set | 91 | # CONFIG_EMBEDDED is not set |
89 | CONFIG_SYSCTL_SYSCALL=y | 92 | CONFIG_SYSCTL_SYSCALL=y |
93 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
90 | CONFIG_KALLSYMS=y | 94 | CONFIG_KALLSYMS=y |
91 | # CONFIG_KALLSYMS_ALL is not set | 95 | # CONFIG_KALLSYMS_ALL is not set |
92 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -115,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y | |||
115 | # CONFIG_KPROBES is not set | 119 | # CONFIG_KPROBES is not set |
116 | CONFIG_HAVE_KPROBES=y | 120 | CONFIG_HAVE_KPROBES=y |
117 | CONFIG_HAVE_KRETPROBES=y | 121 | CONFIG_HAVE_KRETPROBES=y |
122 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
118 | CONFIG_PROC_PAGE_MONITOR=y | 123 | CONFIG_PROC_PAGE_MONITOR=y |
119 | CONFIG_SLABINFO=y | 124 | CONFIG_SLABINFO=y |
120 | CONFIG_RT_MUTEXES=y | 125 | CONFIG_RT_MUTEXES=y |
121 | # CONFIG_TINY_SHMEM is not set | 126 | # CONFIG_TINY_SHMEM is not set |
122 | CONFIG_BASE_SMALL=0 | 127 | CONFIG_BASE_SMALL=0 |
123 | CONFIG_MODULES=y | 128 | CONFIG_MODULES=y |
129 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
124 | CONFIG_MODULE_UNLOAD=y | 130 | CONFIG_MODULE_UNLOAD=y |
125 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 131 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
126 | # CONFIG_MODVERSIONS is not set | 132 | # CONFIG_MODVERSIONS is not set |
@@ -167,11 +173,11 @@ CONFIG_PPC_PASEMI=y | |||
167 | CONFIG_PPC_PASEMI_IOMMU=y | 173 | CONFIG_PPC_PASEMI_IOMMU=y |
168 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set | 174 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set |
169 | CONFIG_PPC_PASEMI_MDIO=y | 175 | CONFIG_PPC_PASEMI_MDIO=y |
170 | # CONFIG_PPC_CELLEB is not set | ||
171 | # CONFIG_PPC_PS3 is not set | 176 | # CONFIG_PPC_PS3 is not set |
172 | # CONFIG_PPC_CELL is not set | 177 | # CONFIG_PPC_CELL is not set |
173 | # CONFIG_PPC_CELL_NATIVE is not set | 178 | # CONFIG_PPC_CELL_NATIVE is not set |
174 | # CONFIG_PPC_IBM_CELL_BLADE is not set | 179 | # CONFIG_PPC_IBM_CELL_BLADE is not set |
180 | # CONFIG_PPC_CELLEB is not set | ||
175 | # CONFIG_PQ2ADS is not set | 181 | # CONFIG_PQ2ADS is not set |
176 | CONFIG_PPC_NATIVE=y | 182 | CONFIG_PPC_NATIVE=y |
177 | # CONFIG_IPIC is not set | 183 | # CONFIG_IPIC is not set |
@@ -192,6 +198,7 @@ CONFIG_CPU_FREQ_DEBUG=y | |||
192 | CONFIG_CPU_FREQ_STAT=y | 198 | CONFIG_CPU_FREQ_STAT=y |
193 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 199 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
194 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 200 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
201 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 202 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
196 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 203 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set |
197 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 204 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
@@ -226,7 +233,6 @@ CONFIG_PREEMPT_NONE=y | |||
226 | CONFIG_BINFMT_ELF=y | 233 | CONFIG_BINFMT_ELF=y |
227 | CONFIG_COMPAT_BINFMT_ELF=y | 234 | CONFIG_COMPAT_BINFMT_ELF=y |
228 | # CONFIG_BINFMT_MISC is not set | 235 | # CONFIG_BINFMT_MISC is not set |
229 | CONFIG_FORCE_MAX_ZONEORDER=9 | ||
230 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 236 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
231 | CONFIG_IOMMU_VMERGE=y | 237 | CONFIG_IOMMU_VMERGE=y |
232 | CONFIG_IOMMU_HELPER=y | 238 | CONFIG_IOMMU_HELPER=y |
@@ -249,12 +255,14 @@ CONFIG_FLATMEM=y | |||
249 | CONFIG_FLAT_NODE_MEM_MAP=y | 255 | CONFIG_FLAT_NODE_MEM_MAP=y |
250 | # CONFIG_SPARSEMEM_STATIC is not set | 256 | # CONFIG_SPARSEMEM_STATIC is not set |
251 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 257 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
258 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
252 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 259 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
253 | CONFIG_RESOURCES_64BIT=y | 260 | CONFIG_RESOURCES_64BIT=y |
254 | CONFIG_ZONE_DMA_FLAG=1 | 261 | CONFIG_ZONE_DMA_FLAG=1 |
255 | CONFIG_BOUNCE=y | 262 | CONFIG_BOUNCE=y |
256 | CONFIG_PPC_HAS_HASH_64K=y | 263 | CONFIG_PPC_HAS_HASH_64K=y |
257 | CONFIG_PPC_64K_PAGES=y | 264 | CONFIG_PPC_64K_PAGES=y |
265 | CONFIG_FORCE_MAX_ZONEORDER=9 | ||
258 | # CONFIG_PPC_SUBPAGE_PROT is not set | 266 | # CONFIG_PPC_SUBPAGE_PROT is not set |
259 | # CONFIG_SCHED_SMT is not set | 267 | # CONFIG_SCHED_SMT is not set |
260 | CONFIG_PROC_DEVICETREE=y | 268 | CONFIG_PROC_DEVICETREE=y |
@@ -290,9 +298,12 @@ CONFIG_CARDBUS=y | |||
290 | # CONFIG_YENTA is not set | 298 | # CONFIG_YENTA is not set |
291 | # CONFIG_PD6729 is not set | 299 | # CONFIG_PD6729 is not set |
292 | # CONFIG_I82092 is not set | 300 | # CONFIG_I82092 is not set |
293 | # CONFIG_ELECTRA_CF is not set | 301 | CONFIG_ELECTRA_CF=y |
294 | # CONFIG_HOTPLUG_PCI is not set | 302 | # CONFIG_HOTPLUG_PCI is not set |
303 | # CONFIG_HAS_RAPIDIO is not set | ||
304 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
295 | CONFIG_KERNEL_START=0xc000000000000000 | 305 | CONFIG_KERNEL_START=0xc000000000000000 |
306 | CONFIG_PHYSICAL_START=0x00000000 | ||
296 | 307 | ||
297 | # | 308 | # |
298 | # Networking | 309 | # Networking |
@@ -341,8 +352,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
341 | CONFIG_DEFAULT_TCP_CONG="cubic" | 352 | CONFIG_DEFAULT_TCP_CONG="cubic" |
342 | # CONFIG_TCP_MD5SIG is not set | 353 | # CONFIG_TCP_MD5SIG is not set |
343 | # CONFIG_IPV6 is not set | 354 | # CONFIG_IPV6 is not set |
344 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
345 | # CONFIG_INET6_TUNNEL is not set | ||
346 | # CONFIG_NETWORK_SECMARK is not set | 355 | # CONFIG_NETWORK_SECMARK is not set |
347 | # CONFIG_NETFILTER is not set | 356 | # CONFIG_NETFILTER is not set |
348 | # CONFIG_IP_DCCP is not set | 357 | # CONFIG_IP_DCCP is not set |
@@ -473,6 +482,7 @@ CONFIG_MTD_NAND_PASEMI=y | |||
473 | # | 482 | # |
474 | # CONFIG_MTD_UBI is not set | 483 | # CONFIG_MTD_UBI is not set |
475 | CONFIG_OF_DEVICE=y | 484 | CONFIG_OF_DEVICE=y |
485 | CONFIG_OF_I2C=y | ||
476 | # CONFIG_PARPORT is not set | 486 | # CONFIG_PARPORT is not set |
477 | CONFIG_BLK_DEV=y | 487 | CONFIG_BLK_DEV=y |
478 | # CONFIG_BLK_DEV_FD is not set | 488 | # CONFIG_BLK_DEV_FD is not set |
@@ -520,7 +530,6 @@ CONFIG_IDE_PROC_FS=y | |||
520 | # | 530 | # |
521 | # IDE chipset support/bugfixes | 531 | # IDE chipset support/bugfixes |
522 | # | 532 | # |
523 | # CONFIG_IDE_GENERIC is not set | ||
524 | # CONFIG_BLK_DEV_PLATFORM is not set | 533 | # CONFIG_BLK_DEV_PLATFORM is not set |
525 | 534 | ||
526 | # | 535 | # |
@@ -554,7 +563,7 @@ CONFIG_IDE_PROC_FS=y | |||
554 | # CONFIG_BLK_DEV_VIA82CXXX is not set | 563 | # CONFIG_BLK_DEV_VIA82CXXX is not set |
555 | # CONFIG_BLK_DEV_TC86C001 is not set | 564 | # CONFIG_BLK_DEV_TC86C001 is not set |
556 | # CONFIG_BLK_DEV_IDEDMA is not set | 565 | # CONFIG_BLK_DEV_IDEDMA is not set |
557 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 566 | # CONFIG_BLK_DEV_HD_ONLY is not set |
558 | # CONFIG_BLK_DEV_HD is not set | 567 | # CONFIG_BLK_DEV_HD is not set |
559 | 568 | ||
560 | # | 569 | # |
@@ -632,7 +641,10 @@ CONFIG_SCSI_LOWLEVEL=y | |||
632 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set | 641 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set |
633 | CONFIG_ATA=y | 642 | CONFIG_ATA=y |
634 | # CONFIG_ATA_NONSTANDARD is not set | 643 | # CONFIG_ATA_NONSTANDARD is not set |
644 | CONFIG_SATA_PMP=y | ||
635 | # CONFIG_SATA_AHCI is not set | 645 | # CONFIG_SATA_AHCI is not set |
646 | CONFIG_SATA_SIL24=y | ||
647 | CONFIG_ATA_SFF=y | ||
636 | # CONFIG_SATA_SVW is not set | 648 | # CONFIG_SATA_SVW is not set |
637 | # CONFIG_ATA_PIIX is not set | 649 | # CONFIG_ATA_PIIX is not set |
638 | CONFIG_SATA_MV=y | 650 | CONFIG_SATA_MV=y |
@@ -642,7 +654,6 @@ CONFIG_SATA_MV=y | |||
642 | # CONFIG_SATA_PROMISE is not set | 654 | # CONFIG_SATA_PROMISE is not set |
643 | # CONFIG_SATA_SX4 is not set | 655 | # CONFIG_SATA_SX4 is not set |
644 | # CONFIG_SATA_SIL is not set | 656 | # CONFIG_SATA_SIL is not set |
645 | CONFIG_SATA_SIL24=y | ||
646 | # CONFIG_SATA_SIS is not set | 657 | # CONFIG_SATA_SIS is not set |
647 | # CONFIG_SATA_ULI is not set | 658 | # CONFIG_SATA_ULI is not set |
648 | # CONFIG_SATA_VIA is not set | 659 | # CONFIG_SATA_VIA is not set |
@@ -689,6 +700,7 @@ CONFIG_PATA_PCMCIA=y | |||
689 | # CONFIG_PATA_WINBOND is not set | 700 | # CONFIG_PATA_WINBOND is not set |
690 | CONFIG_PATA_PLATFORM=y | 701 | CONFIG_PATA_PLATFORM=y |
691 | CONFIG_PATA_OF_PLATFORM=y | 702 | CONFIG_PATA_OF_PLATFORM=y |
703 | # CONFIG_PATA_SCH is not set | ||
692 | CONFIG_MD=y | 704 | CONFIG_MD=y |
693 | CONFIG_BLK_DEV_MD=y | 705 | CONFIG_BLK_DEV_MD=y |
694 | CONFIG_MD_LINEAR=y | 706 | CONFIG_MD_LINEAR=y |
@@ -791,7 +803,6 @@ CONFIG_E1000_NAPI=y | |||
791 | # CONFIG_SIS190 is not set | 803 | # CONFIG_SIS190 is not set |
792 | # CONFIG_SKGE is not set | 804 | # CONFIG_SKGE is not set |
793 | # CONFIG_SKY2 is not set | 805 | # CONFIG_SKY2 is not set |
794 | # CONFIG_SK98LIN is not set | ||
795 | # CONFIG_VIA_VELOCITY is not set | 806 | # CONFIG_VIA_VELOCITY is not set |
796 | CONFIG_TIGON3=y | 807 | CONFIG_TIGON3=y |
797 | # CONFIG_BNX2 is not set | 808 | # CONFIG_BNX2 is not set |
@@ -810,6 +821,7 @@ CONFIG_PASEMI_MAC=y | |||
810 | # CONFIG_MLX4_CORE is not set | 821 | # CONFIG_MLX4_CORE is not set |
811 | # CONFIG_TEHUTI is not set | 822 | # CONFIG_TEHUTI is not set |
812 | # CONFIG_BNX2X is not set | 823 | # CONFIG_BNX2X is not set |
824 | # CONFIG_SFC is not set | ||
813 | # CONFIG_TR is not set | 825 | # CONFIG_TR is not set |
814 | 826 | ||
815 | # | 827 | # |
@@ -817,6 +829,7 @@ CONFIG_PASEMI_MAC=y | |||
817 | # | 829 | # |
818 | # CONFIG_WLAN_PRE80211 is not set | 830 | # CONFIG_WLAN_PRE80211 is not set |
819 | # CONFIG_WLAN_80211 is not set | 831 | # CONFIG_WLAN_80211 is not set |
832 | # CONFIG_IWLWIFI_LEDS is not set | ||
820 | 833 | ||
821 | # | 834 | # |
822 | # USB Network Adapters | 835 | # USB Network Adapters |
@@ -890,6 +903,7 @@ CONFIG_VT=y | |||
890 | CONFIG_VT_CONSOLE=y | 903 | CONFIG_VT_CONSOLE=y |
891 | CONFIG_HW_CONSOLE=y | 904 | CONFIG_HW_CONSOLE=y |
892 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 905 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
906 | CONFIG_DEVKMEM=y | ||
893 | # CONFIG_SERIAL_NONSTANDARD is not set | 907 | # CONFIG_SERIAL_NONSTANDARD is not set |
894 | # CONFIG_NOZOMI is not set | 908 | # CONFIG_NOZOMI is not set |
895 | 909 | ||
@@ -917,7 +931,6 @@ CONFIG_LEGACY_PTY_COUNT=4 | |||
917 | # CONFIG_IPMI_HANDLER is not set | 931 | # CONFIG_IPMI_HANDLER is not set |
918 | CONFIG_HW_RANDOM=y | 932 | CONFIG_HW_RANDOM=y |
919 | CONFIG_HW_RANDOM_PASEMI=y | 933 | CONFIG_HW_RANDOM_PASEMI=y |
920 | # CONFIG_GEN_RTC is not set | ||
921 | # CONFIG_R3964 is not set | 934 | # CONFIG_R3964 is not set |
922 | # CONFIG_APPLICOM is not set | 935 | # CONFIG_APPLICOM is not set |
923 | 936 | ||
@@ -936,13 +949,7 @@ CONFIG_DEVPORT=y | |||
936 | CONFIG_I2C=y | 949 | CONFIG_I2C=y |
937 | CONFIG_I2C_BOARDINFO=y | 950 | CONFIG_I2C_BOARDINFO=y |
938 | CONFIG_I2C_CHARDEV=y | 951 | CONFIG_I2C_CHARDEV=y |
939 | |||
940 | # | ||
941 | # I2C Algorithms | ||
942 | # | ||
943 | CONFIG_I2C_ALGOBIT=y | 952 | CONFIG_I2C_ALGOBIT=y |
944 | CONFIG_I2C_ALGOPCF=y | ||
945 | CONFIG_I2C_ALGOPCA=y | ||
946 | 953 | ||
947 | # | 954 | # |
948 | # I2C Hardware Bus support | 955 | # I2C Hardware Bus support |
@@ -971,6 +978,7 @@ CONFIG_I2C_PASEMI=y | |||
971 | # CONFIG_I2C_VIA is not set | 978 | # CONFIG_I2C_VIA is not set |
972 | # CONFIG_I2C_VIAPRO is not set | 979 | # CONFIG_I2C_VIAPRO is not set |
973 | # CONFIG_I2C_VOODOO3 is not set | 980 | # CONFIG_I2C_VOODOO3 is not set |
981 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
974 | 982 | ||
975 | # | 983 | # |
976 | # Miscellaneous I2C Chip support | 984 | # Miscellaneous I2C Chip support |
@@ -980,19 +988,13 @@ CONFIG_SENSORS_EEPROM=y | |||
980 | # CONFIG_SENSORS_PCF8574 is not set | 988 | # CONFIG_SENSORS_PCF8574 is not set |
981 | # CONFIG_PCF8575 is not set | 989 | # CONFIG_PCF8575 is not set |
982 | # CONFIG_SENSORS_PCF8591 is not set | 990 | # CONFIG_SENSORS_PCF8591 is not set |
983 | # CONFIG_TPS65010 is not set | ||
984 | # CONFIG_SENSORS_MAX6875 is not set | 991 | # CONFIG_SENSORS_MAX6875 is not set |
985 | # CONFIG_SENSORS_TSL2550 is not set | 992 | # CONFIG_SENSORS_TSL2550 is not set |
986 | # CONFIG_I2C_DEBUG_CORE is not set | 993 | # CONFIG_I2C_DEBUG_CORE is not set |
987 | # CONFIG_I2C_DEBUG_ALGO is not set | 994 | # CONFIG_I2C_DEBUG_ALGO is not set |
988 | # CONFIG_I2C_DEBUG_BUS is not set | 995 | # CONFIG_I2C_DEBUG_BUS is not set |
989 | # CONFIG_I2C_DEBUG_CHIP is not set | 996 | # CONFIG_I2C_DEBUG_CHIP is not set |
990 | |||
991 | # | ||
992 | # SPI support | ||
993 | # | ||
994 | # CONFIG_SPI is not set | 997 | # CONFIG_SPI is not set |
995 | # CONFIG_SPI_MASTER is not set | ||
996 | # CONFIG_W1 is not set | 998 | # CONFIG_W1 is not set |
997 | # CONFIG_POWER_SUPPLY is not set | 999 | # CONFIG_POWER_SUPPLY is not set |
998 | CONFIG_HWMON=y | 1000 | CONFIG_HWMON=y |
@@ -1062,12 +1064,22 @@ CONFIG_SSB_POSSIBLE=y | |||
1062 | # Multifunction device drivers | 1064 | # Multifunction device drivers |
1063 | # | 1065 | # |
1064 | # CONFIG_MFD_SM501 is not set | 1066 | # CONFIG_MFD_SM501 is not set |
1067 | # CONFIG_HTC_PASIC3 is not set | ||
1065 | 1068 | ||
1066 | # | 1069 | # |
1067 | # Multimedia devices | 1070 | # Multimedia devices |
1068 | # | 1071 | # |
1072 | |||
1073 | # | ||
1074 | # Multimedia core support | ||
1075 | # | ||
1069 | # CONFIG_VIDEO_DEV is not set | 1076 | # CONFIG_VIDEO_DEV is not set |
1070 | # CONFIG_DVB_CORE is not set | 1077 | # CONFIG_DVB_CORE is not set |
1078 | # CONFIG_VIDEO_MEDIA is not set | ||
1079 | |||
1080 | # | ||
1081 | # Multimedia drivers | ||
1082 | # | ||
1071 | CONFIG_DAB=y | 1083 | CONFIG_DAB=y |
1072 | # CONFIG_USB_DABUSB is not set | 1084 | # CONFIG_USB_DABUSB is not set |
1073 | 1085 | ||
@@ -1094,8 +1106,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
1094 | # CONFIG_FB_SYS_FILLRECT is not set | 1106 | # CONFIG_FB_SYS_FILLRECT is not set |
1095 | # CONFIG_FB_SYS_COPYAREA is not set | 1107 | # CONFIG_FB_SYS_COPYAREA is not set |
1096 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 1108 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
1109 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
1097 | # CONFIG_FB_SYS_FOPS is not set | 1110 | # CONFIG_FB_SYS_FOPS is not set |
1098 | CONFIG_FB_DEFERRED_IO=y | ||
1099 | # CONFIG_FB_SVGALIB is not set | 1111 | # CONFIG_FB_SVGALIB is not set |
1100 | CONFIG_FB_MACMODES=y | 1112 | CONFIG_FB_MACMODES=y |
1101 | CONFIG_FB_BACKLIGHT=y | 1113 | CONFIG_FB_BACKLIGHT=y |
@@ -1213,6 +1225,7 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1213 | # CONFIG_SND_AU8810 is not set | 1225 | # CONFIG_SND_AU8810 is not set |
1214 | # CONFIG_SND_AU8820 is not set | 1226 | # CONFIG_SND_AU8820 is not set |
1215 | # CONFIG_SND_AU8830 is not set | 1227 | # CONFIG_SND_AU8830 is not set |
1228 | # CONFIG_SND_AW2 is not set | ||
1216 | # CONFIG_SND_AZT3328 is not set | 1229 | # CONFIG_SND_AZT3328 is not set |
1217 | # CONFIG_SND_BT87X is not set | 1230 | # CONFIG_SND_BT87X is not set |
1218 | # CONFIG_SND_CA0106 is not set | 1231 | # CONFIG_SND_CA0106 is not set |
@@ -1292,11 +1305,11 @@ CONFIG_SND_USB_USX2Y=y | |||
1292 | # CONFIG_SND_SOC is not set | 1305 | # CONFIG_SND_SOC is not set |
1293 | 1306 | ||
1294 | # | 1307 | # |
1295 | # SoC Audio support for SuperH | 1308 | # ALSA SoC audio for Freescale SOCs |
1296 | # | 1309 | # |
1297 | 1310 | ||
1298 | # | 1311 | # |
1299 | # ALSA SoC audio for Freescale SOCs | 1312 | # SoC Audio for the Texas Instruments OMAP |
1300 | # | 1313 | # |
1301 | 1314 | ||
1302 | # | 1315 | # |
@@ -1334,11 +1347,13 @@ CONFIG_USB_DEVICEFS=y | |||
1334 | # | 1347 | # |
1335 | # USB Host Controller Drivers | 1348 | # USB Host Controller Drivers |
1336 | # | 1349 | # |
1350 | # CONFIG_USB_C67X00_HCD is not set | ||
1337 | CONFIG_USB_EHCI_HCD=y | 1351 | CONFIG_USB_EHCI_HCD=y |
1338 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1352 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1339 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1353 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1340 | CONFIG_USB_EHCI_HCD_PPC_OF=y | 1354 | CONFIG_USB_EHCI_HCD_PPC_OF=y |
1341 | # CONFIG_USB_ISP116X_HCD is not set | 1355 | # CONFIG_USB_ISP116X_HCD is not set |
1356 | # CONFIG_USB_ISP1760_HCD is not set | ||
1342 | CONFIG_USB_OHCI_HCD=y | 1357 | CONFIG_USB_OHCI_HCD=y |
1343 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1358 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1344 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1359 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1354,6 +1369,7 @@ CONFIG_USB_SL811_HCD=y | |||
1354 | # | 1369 | # |
1355 | # CONFIG_USB_ACM is not set | 1370 | # CONFIG_USB_ACM is not set |
1356 | # CONFIG_USB_PRINTER is not set | 1371 | # CONFIG_USB_PRINTER is not set |
1372 | # CONFIG_USB_WDM is not set | ||
1357 | 1373 | ||
1358 | # | 1374 | # |
1359 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1375 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -1375,6 +1391,7 @@ CONFIG_USB_STORAGE=y | |||
1375 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1391 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1376 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1392 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1377 | # CONFIG_USB_STORAGE_KARMA is not set | 1393 | # CONFIG_USB_STORAGE_KARMA is not set |
1394 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1378 | CONFIG_USB_LIBUSUAL=y | 1395 | CONFIG_USB_LIBUSUAL=y |
1379 | 1396 | ||
1380 | # | 1397 | # |
@@ -1416,6 +1433,7 @@ CONFIG_USB_LIBUSUAL=y | |||
1416 | # CONFIG_MMC is not set | 1433 | # CONFIG_MMC is not set |
1417 | # CONFIG_MEMSTICK is not set | 1434 | # CONFIG_MEMSTICK is not set |
1418 | # CONFIG_NEW_LEDS is not set | 1435 | # CONFIG_NEW_LEDS is not set |
1436 | # CONFIG_ACCESSIBILITY is not set | ||
1419 | # CONFIG_INFINIBAND is not set | 1437 | # CONFIG_INFINIBAND is not set |
1420 | CONFIG_EDAC=y | 1438 | CONFIG_EDAC=y |
1421 | 1439 | ||
@@ -1475,10 +1493,6 @@ CONFIG_RTC_DRV_DS1307=y | |||
1475 | # on-CPU RTC drivers | 1493 | # on-CPU RTC drivers |
1476 | # | 1494 | # |
1477 | # CONFIG_DMADEVICES is not set | 1495 | # CONFIG_DMADEVICES is not set |
1478 | |||
1479 | # | ||
1480 | # Userspace I/O | ||
1481 | # | ||
1482 | # CONFIG_UIO is not set | 1496 | # CONFIG_UIO is not set |
1483 | 1497 | ||
1484 | # | 1498 | # |
@@ -1576,12 +1590,10 @@ CONFIG_NFS_FS=y | |||
1576 | CONFIG_NFS_V3=y | 1590 | CONFIG_NFS_V3=y |
1577 | # CONFIG_NFS_V3_ACL is not set | 1591 | # CONFIG_NFS_V3_ACL is not set |
1578 | # CONFIG_NFS_V4 is not set | 1592 | # CONFIG_NFS_V4 is not set |
1579 | # CONFIG_NFS_DIRECTIO is not set | ||
1580 | CONFIG_NFSD=y | 1593 | CONFIG_NFSD=y |
1581 | CONFIG_NFSD_V3=y | 1594 | CONFIG_NFSD_V3=y |
1582 | # CONFIG_NFSD_V3_ACL is not set | 1595 | # CONFIG_NFSD_V3_ACL is not set |
1583 | CONFIG_NFSD_V4=y | 1596 | CONFIG_NFSD_V4=y |
1584 | CONFIG_NFSD_TCP=y | ||
1585 | CONFIG_ROOT_NFS=y | 1597 | CONFIG_ROOT_NFS=y |
1586 | CONFIG_LOCKD=y | 1598 | CONFIG_LOCKD=y |
1587 | CONFIG_LOCKD_V4=y | 1599 | CONFIG_LOCKD_V4=y |
@@ -1665,9 +1677,10 @@ CONFIG_NLS_ISO8859_1=y | |||
1665 | # Library routines | 1677 | # Library routines |
1666 | # | 1678 | # |
1667 | CONFIG_BITREVERSE=y | 1679 | CONFIG_BITREVERSE=y |
1680 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1668 | CONFIG_CRC_CCITT=y | 1681 | CONFIG_CRC_CCITT=y |
1669 | # CONFIG_CRC16 is not set | 1682 | # CONFIG_CRC16 is not set |
1670 | # CONFIG_CRC_ITU_T is not set | 1683 | CONFIG_CRC_ITU_T=y |
1671 | CONFIG_CRC32=y | 1684 | CONFIG_CRC32=y |
1672 | # CONFIG_CRC7 is not set | 1685 | # CONFIG_CRC7 is not set |
1673 | CONFIG_LIBCRC32C=m | 1686 | CONFIG_LIBCRC32C=m |
@@ -1677,6 +1690,7 @@ CONFIG_PLIST=y | |||
1677 | CONFIG_HAS_IOMEM=y | 1690 | CONFIG_HAS_IOMEM=y |
1678 | CONFIG_HAS_IOPORT=y | 1691 | CONFIG_HAS_IOPORT=y |
1679 | CONFIG_HAS_DMA=y | 1692 | CONFIG_HAS_DMA=y |
1693 | CONFIG_HAVE_LMB=y | ||
1680 | 1694 | ||
1681 | # | 1695 | # |
1682 | # Kernel hacking | 1696 | # Kernel hacking |
@@ -1684,6 +1698,7 @@ CONFIG_HAS_DMA=y | |||
1684 | # CONFIG_PRINTK_TIME is not set | 1698 | # CONFIG_PRINTK_TIME is not set |
1685 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1699 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1686 | CONFIG_ENABLE_MUST_CHECK=y | 1700 | CONFIG_ENABLE_MUST_CHECK=y |
1701 | CONFIG_FRAME_WARN=2048 | ||
1687 | CONFIG_MAGIC_SYSRQ=y | 1702 | CONFIG_MAGIC_SYSRQ=y |
1688 | # CONFIG_UNUSED_SYMBOLS is not set | 1703 | # CONFIG_UNUSED_SYMBOLS is not set |
1689 | # CONFIG_DEBUG_FS is not set | 1704 | # CONFIG_DEBUG_FS is not set |
@@ -1694,18 +1709,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1694 | # CONFIG_SCHED_DEBUG is not set | 1709 | # CONFIG_SCHED_DEBUG is not set |
1695 | # CONFIG_SCHEDSTATS is not set | 1710 | # CONFIG_SCHEDSTATS is not set |
1696 | # CONFIG_TIMER_STATS is not set | 1711 | # CONFIG_TIMER_STATS is not set |
1712 | # CONFIG_DEBUG_OBJECTS is not set | ||
1697 | # CONFIG_SLUB_DEBUG_ON is not set | 1713 | # CONFIG_SLUB_DEBUG_ON is not set |
1698 | # CONFIG_SLUB_STATS is not set | 1714 | # CONFIG_SLUB_STATS is not set |
1699 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1715 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1700 | # CONFIG_RT_MUTEX_TESTER is not set | 1716 | # CONFIG_RT_MUTEX_TESTER is not set |
1701 | # CONFIG_DEBUG_SPINLOCK is not set | 1717 | # CONFIG_DEBUG_SPINLOCK is not set |
1702 | # CONFIG_DEBUG_MUTEXES is not set | 1718 | # CONFIG_DEBUG_MUTEXES is not set |
1719 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1720 | # CONFIG_PROVE_LOCKING is not set | ||
1721 | # CONFIG_LOCK_STAT is not set | ||
1703 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1722 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1704 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1723 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1705 | # CONFIG_DEBUG_KOBJECT is not set | 1724 | # CONFIG_DEBUG_KOBJECT is not set |
1706 | CONFIG_DEBUG_BUGVERBOSE=y | 1725 | CONFIG_DEBUG_BUGVERBOSE=y |
1707 | # CONFIG_DEBUG_INFO is not set | 1726 | # CONFIG_DEBUG_INFO is not set |
1708 | # CONFIG_DEBUG_VM is not set | 1727 | # CONFIG_DEBUG_VM is not set |
1728 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1709 | # CONFIG_DEBUG_LIST is not set | 1729 | # CONFIG_DEBUG_LIST is not set |
1710 | # CONFIG_DEBUG_SG is not set | 1730 | # CONFIG_DEBUG_SG is not set |
1711 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1731 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1735,53 +1755,83 @@ CONFIG_ASYNC_CORE=y | |||
1735 | CONFIG_ASYNC_MEMCPY=y | 1755 | CONFIG_ASYNC_MEMCPY=y |
1736 | CONFIG_ASYNC_XOR=y | 1756 | CONFIG_ASYNC_XOR=y |
1737 | CONFIG_CRYPTO=y | 1757 | CONFIG_CRYPTO=y |
1758 | |||
1759 | # | ||
1760 | # Crypto core or helper | ||
1761 | # | ||
1738 | CONFIG_CRYPTO_ALGAPI=y | 1762 | CONFIG_CRYPTO_ALGAPI=y |
1739 | CONFIG_CRYPTO_AEAD=y | 1763 | CONFIG_CRYPTO_AEAD=y |
1740 | CONFIG_CRYPTO_BLKCIPHER=y | 1764 | CONFIG_CRYPTO_BLKCIPHER=y |
1741 | # CONFIG_CRYPTO_SEQIV is not set | ||
1742 | CONFIG_CRYPTO_HASH=y | 1765 | CONFIG_CRYPTO_HASH=y |
1743 | CONFIG_CRYPTO_MANAGER=y | 1766 | CONFIG_CRYPTO_MANAGER=y |
1767 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1768 | # CONFIG_CRYPTO_NULL is not set | ||
1769 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1770 | CONFIG_CRYPTO_AUTHENC=y | ||
1771 | # CONFIG_CRYPTO_TEST is not set | ||
1772 | |||
1773 | # | ||
1774 | # Authenticated Encryption with Associated Data | ||
1775 | # | ||
1776 | # CONFIG_CRYPTO_CCM is not set | ||
1777 | # CONFIG_CRYPTO_GCM is not set | ||
1778 | # CONFIG_CRYPTO_SEQIV is not set | ||
1779 | |||
1780 | # | ||
1781 | # Block modes | ||
1782 | # | ||
1783 | CONFIG_CRYPTO_CBC=y | ||
1784 | # CONFIG_CRYPTO_CTR is not set | ||
1785 | # CONFIG_CRYPTO_CTS is not set | ||
1786 | # CONFIG_CRYPTO_ECB is not set | ||
1787 | # CONFIG_CRYPTO_LRW is not set | ||
1788 | # CONFIG_CRYPTO_PCBC is not set | ||
1789 | # CONFIG_CRYPTO_XTS is not set | ||
1790 | |||
1791 | # | ||
1792 | # Hash modes | ||
1793 | # | ||
1744 | CONFIG_CRYPTO_HMAC=y | 1794 | CONFIG_CRYPTO_HMAC=y |
1745 | # CONFIG_CRYPTO_XCBC is not set | 1795 | # CONFIG_CRYPTO_XCBC is not set |
1746 | # CONFIG_CRYPTO_NULL is not set | 1796 | |
1797 | # | ||
1798 | # Digest | ||
1799 | # | ||
1800 | # CONFIG_CRYPTO_CRC32C is not set | ||
1747 | CONFIG_CRYPTO_MD4=y | 1801 | CONFIG_CRYPTO_MD4=y |
1748 | CONFIG_CRYPTO_MD5=y | 1802 | CONFIG_CRYPTO_MD5=y |
1803 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1749 | CONFIG_CRYPTO_SHA1=y | 1804 | CONFIG_CRYPTO_SHA1=y |
1750 | CONFIG_CRYPTO_SHA256=y | 1805 | CONFIG_CRYPTO_SHA256=y |
1751 | CONFIG_CRYPTO_SHA512=y | 1806 | CONFIG_CRYPTO_SHA512=y |
1752 | # CONFIG_CRYPTO_WP512 is not set | ||
1753 | # CONFIG_CRYPTO_TGR192 is not set | 1807 | # CONFIG_CRYPTO_TGR192 is not set |
1754 | # CONFIG_CRYPTO_GF128MUL is not set | 1808 | # CONFIG_CRYPTO_WP512 is not set |
1755 | # CONFIG_CRYPTO_ECB is not set | 1809 | |
1756 | CONFIG_CRYPTO_CBC=y | 1810 | # |
1757 | # CONFIG_CRYPTO_PCBC is not set | 1811 | # Ciphers |
1758 | # CONFIG_CRYPTO_LRW is not set | 1812 | # |
1759 | # CONFIG_CRYPTO_XTS is not set | ||
1760 | # CONFIG_CRYPTO_CTR is not set | ||
1761 | # CONFIG_CRYPTO_GCM is not set | ||
1762 | # CONFIG_CRYPTO_CCM is not set | ||
1763 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1764 | CONFIG_CRYPTO_DES=y | ||
1765 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1766 | CONFIG_CRYPTO_BLOWFISH=y | ||
1767 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1768 | # CONFIG_CRYPTO_SERPENT is not set | ||
1769 | CONFIG_CRYPTO_AES=y | 1813 | CONFIG_CRYPTO_AES=y |
1814 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1815 | # CONFIG_CRYPTO_ARC4 is not set | ||
1816 | CONFIG_CRYPTO_BLOWFISH=y | ||
1817 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1770 | # CONFIG_CRYPTO_CAST5 is not set | 1818 | # CONFIG_CRYPTO_CAST5 is not set |
1771 | # CONFIG_CRYPTO_CAST6 is not set | 1819 | # CONFIG_CRYPTO_CAST6 is not set |
1772 | # CONFIG_CRYPTO_TEA is not set | 1820 | CONFIG_CRYPTO_DES=y |
1773 | # CONFIG_CRYPTO_ARC4 is not set | 1821 | # CONFIG_CRYPTO_FCRYPT is not set |
1774 | # CONFIG_CRYPTO_KHAZAD is not set | 1822 | # CONFIG_CRYPTO_KHAZAD is not set |
1775 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1776 | # CONFIG_CRYPTO_SEED is not set | ||
1777 | # CONFIG_CRYPTO_SALSA20 is not set | 1823 | # CONFIG_CRYPTO_SALSA20 is not set |
1824 | # CONFIG_CRYPTO_SEED is not set | ||
1825 | # CONFIG_CRYPTO_SERPENT is not set | ||
1826 | # CONFIG_CRYPTO_TEA is not set | ||
1827 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1828 | |||
1829 | # | ||
1830 | # Compression | ||
1831 | # | ||
1778 | # CONFIG_CRYPTO_DEFLATE is not set | 1832 | # CONFIG_CRYPTO_DEFLATE is not set |
1779 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1780 | # CONFIG_CRYPTO_CRC32C is not set | ||
1781 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1782 | # CONFIG_CRYPTO_TEST is not set | ||
1783 | CONFIG_CRYPTO_AUTHENC=y | ||
1784 | # CONFIG_CRYPTO_LZO is not set | 1833 | # CONFIG_CRYPTO_LZO is not set |
1785 | CONFIG_CRYPTO_HW=y | 1834 | CONFIG_CRYPTO_HW=y |
1786 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 1835 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
1787 | # CONFIG_PPC_CLOCK is not set | 1836 | # CONFIG_PPC_CLOCK is not set |
1837 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index fca114252ac7..3688e4bb6fc2 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:56:21 2008 | 4 | # Tue May 20 20:02:24 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
31 | CONFIG_GENERIC_HARDIRQS=y | 31 | CONFIG_GENERIC_HARDIRQS=y |
32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | 32 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set |
33 | CONFIG_IRQ_PER_CPU=y | 33 | CONFIG_IRQ_PER_CPU=y |
34 | CONFIG_STACKTRACE_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
34 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
35 | CONFIG_ARCH_HAS_ILOG2_U32=y | 37 | CONFIG_ARCH_HAS_ILOG2_U32=y |
36 | CONFIG_GENERIC_HWEIGHT=y | 38 | CONFIG_GENERIC_HWEIGHT=y |
@@ -91,6 +93,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
91 | CONFIG_SYSCTL=y | 93 | CONFIG_SYSCTL=y |
92 | # CONFIG_EMBEDDED is not set | 94 | # CONFIG_EMBEDDED is not set |
93 | CONFIG_SYSCTL_SYSCALL=y | 95 | CONFIG_SYSCTL_SYSCALL=y |
96 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
94 | CONFIG_KALLSYMS=y | 97 | CONFIG_KALLSYMS=y |
95 | # CONFIG_KALLSYMS_ALL is not set | 98 | # CONFIG_KALLSYMS_ALL is not set |
96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 99 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -119,12 +122,14 @@ CONFIG_HAVE_OPROFILE=y | |||
119 | # CONFIG_KPROBES is not set | 122 | # CONFIG_KPROBES is not set |
120 | CONFIG_HAVE_KPROBES=y | 123 | CONFIG_HAVE_KPROBES=y |
121 | CONFIG_HAVE_KRETPROBES=y | 124 | CONFIG_HAVE_KRETPROBES=y |
125 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
122 | CONFIG_PROC_PAGE_MONITOR=y | 126 | CONFIG_PROC_PAGE_MONITOR=y |
123 | CONFIG_SLABINFO=y | 127 | CONFIG_SLABINFO=y |
124 | CONFIG_RT_MUTEXES=y | 128 | CONFIG_RT_MUTEXES=y |
125 | # CONFIG_TINY_SHMEM is not set | 129 | # CONFIG_TINY_SHMEM is not set |
126 | CONFIG_BASE_SMALL=0 | 130 | CONFIG_BASE_SMALL=0 |
127 | CONFIG_MODULES=y | 131 | CONFIG_MODULES=y |
132 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
128 | CONFIG_MODULE_UNLOAD=y | 133 | CONFIG_MODULE_UNLOAD=y |
129 | CONFIG_MODULE_FORCE_UNLOAD=y | 134 | CONFIG_MODULE_FORCE_UNLOAD=y |
130 | # CONFIG_MODVERSIONS is not set | 135 | # CONFIG_MODVERSIONS is not set |
@@ -185,6 +190,7 @@ CONFIG_CPU_FREQ_TABLE=y | |||
185 | CONFIG_CPU_FREQ_STAT=y | 190 | CONFIG_CPU_FREQ_STAT=y |
186 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 191 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
187 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 192 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
193 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
188 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 194 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
189 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set |
190 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 196 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
@@ -236,16 +242,17 @@ CONFIG_FLATMEM=y | |||
236 | CONFIG_FLAT_NODE_MEM_MAP=y | 242 | CONFIG_FLAT_NODE_MEM_MAP=y |
237 | # CONFIG_SPARSEMEM_STATIC is not set | 243 | # CONFIG_SPARSEMEM_STATIC is not set |
238 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | 244 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set |
245 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
239 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 246 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
240 | # CONFIG_RESOURCES_64BIT is not set | 247 | # CONFIG_RESOURCES_64BIT is not set |
241 | CONFIG_ZONE_DMA_FLAG=1 | 248 | CONFIG_ZONE_DMA_FLAG=1 |
242 | CONFIG_BOUNCE=y | 249 | CONFIG_BOUNCE=y |
243 | CONFIG_VIRT_TO_BUS=y | 250 | CONFIG_VIRT_TO_BUS=y |
251 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
244 | CONFIG_PROC_DEVICETREE=y | 252 | CONFIG_PROC_DEVICETREE=y |
245 | # CONFIG_CMDLINE_BOOL is not set | 253 | # CONFIG_CMDLINE_BOOL is not set |
246 | CONFIG_ARCH_WANTS_FREEZER_CONTROL=y | 254 | CONFIG_ARCH_WANTS_FREEZER_CONTROL=y |
247 | CONFIG_PM=y | 255 | CONFIG_PM=y |
248 | # CONFIG_PM_LEGACY is not set | ||
249 | CONFIG_PM_DEBUG=y | 256 | CONFIG_PM_DEBUG=y |
250 | # CONFIG_PM_VERBOSE is not set | 257 | # CONFIG_PM_VERBOSE is not set |
251 | CONFIG_CAN_PM_TRACE=y | 258 | CONFIG_CAN_PM_TRACE=y |
@@ -292,6 +299,7 @@ CONFIG_YENTA_TOSHIBA=y | |||
292 | # CONFIG_I82092 is not set | 299 | # CONFIG_I82092 is not set |
293 | CONFIG_PCCARD_NONSTATIC=m | 300 | CONFIG_PCCARD_NONSTATIC=m |
294 | # CONFIG_HOTPLUG_PCI is not set | 301 | # CONFIG_HOTPLUG_PCI is not set |
302 | # CONFIG_HAS_RAPIDIO is not set | ||
295 | 303 | ||
296 | # | 304 | # |
297 | # Advanced setup | 305 | # Advanced setup |
@@ -301,11 +309,11 @@ CONFIG_PCCARD_NONSTATIC=m | |||
301 | # | 309 | # |
302 | # Default settings for advanced configuration options are used | 310 | # Default settings for advanced configuration options are used |
303 | # | 311 | # |
304 | CONFIG_HIGHMEM_START=0xfe000000 | ||
305 | CONFIG_LOWMEM_SIZE=0x30000000 | 312 | CONFIG_LOWMEM_SIZE=0x30000000 |
313 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
306 | CONFIG_KERNEL_START=0xc0000000 | 314 | CONFIG_KERNEL_START=0xc0000000 |
315 | CONFIG_PHYSICAL_START=0x00000000 | ||
307 | CONFIG_TASK_SIZE=0xc0000000 | 316 | CONFIG_TASK_SIZE=0xc0000000 |
308 | CONFIG_BOOT_LOAD=0x00800000 | ||
309 | 317 | ||
310 | # | 318 | # |
311 | # Networking | 319 | # Networking |
@@ -352,8 +360,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
352 | # CONFIG_TCP_MD5SIG is not set | 360 | # CONFIG_TCP_MD5SIG is not set |
353 | # CONFIG_IP_VS is not set | 361 | # CONFIG_IP_VS is not set |
354 | # CONFIG_IPV6 is not set | 362 | # CONFIG_IPV6 is not set |
355 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
356 | # CONFIG_INET6_TUNNEL is not set | ||
357 | # CONFIG_NETWORK_SECMARK is not set | 363 | # CONFIG_NETWORK_SECMARK is not set |
358 | CONFIG_NETFILTER=y | 364 | CONFIG_NETFILTER=y |
359 | # CONFIG_NETFILTER_DEBUG is not set | 365 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -369,6 +375,7 @@ CONFIG_NF_CONNTRACK=m | |||
369 | # CONFIG_NF_CT_ACCT is not set | 375 | # CONFIG_NF_CT_ACCT is not set |
370 | # CONFIG_NF_CONNTRACK_MARK is not set | 376 | # CONFIG_NF_CONNTRACK_MARK is not set |
371 | # CONFIG_NF_CONNTRACK_EVENTS is not set | 377 | # CONFIG_NF_CONNTRACK_EVENTS is not set |
378 | CONFIG_NF_CT_PROTO_DCCP=m | ||
372 | # CONFIG_NF_CT_PROTO_SCTP is not set | 379 | # CONFIG_NF_CT_PROTO_SCTP is not set |
373 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | 380 | # CONFIG_NF_CT_PROTO_UDPLITE is not set |
374 | # CONFIG_NF_CONNTRACK_AMANDA is not set | 381 | # CONFIG_NF_CONNTRACK_AMANDA is not set |
@@ -445,6 +452,7 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m | |||
445 | CONFIG_IP_NF_TARGET_REDIRECT=m | 452 | CONFIG_IP_NF_TARGET_REDIRECT=m |
446 | CONFIG_IP_NF_TARGET_NETMAP=m | 453 | CONFIG_IP_NF_TARGET_NETMAP=m |
447 | # CONFIG_NF_NAT_SNMP_BASIC is not set | 454 | # CONFIG_NF_NAT_SNMP_BASIC is not set |
455 | CONFIG_NF_NAT_PROTO_DCCP=m | ||
448 | CONFIG_NF_NAT_FTP=m | 456 | CONFIG_NF_NAT_FTP=m |
449 | CONFIG_NF_NAT_IRC=m | 457 | CONFIG_NF_NAT_IRC=m |
450 | CONFIG_NF_NAT_TFTP=m | 458 | CONFIG_NF_NAT_TFTP=m |
@@ -586,7 +594,6 @@ CONFIG_MAC80211=m | |||
586 | # Rate control algorithm selection | 594 | # Rate control algorithm selection |
587 | # | 595 | # |
588 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 596 | CONFIG_MAC80211_RC_DEFAULT_PID=y |
589 | # CONFIG_MAC80211_RC_DEFAULT_SIMPLE is not set | ||
590 | # CONFIG_MAC80211_RC_DEFAULT_NONE is not set | 597 | # CONFIG_MAC80211_RC_DEFAULT_NONE is not set |
591 | 598 | ||
592 | # | 599 | # |
@@ -598,7 +605,7 @@ CONFIG_MAC80211_RC_DEFAULT_PID=y | |||
598 | # | 605 | # |
599 | CONFIG_MAC80211_RC_DEFAULT="pid" | 606 | CONFIG_MAC80211_RC_DEFAULT="pid" |
600 | CONFIG_MAC80211_RC_PID=y | 607 | CONFIG_MAC80211_RC_PID=y |
601 | # CONFIG_MAC80211_RC_SIMPLE is not set | 608 | # CONFIG_MAC80211_MESH is not set |
602 | CONFIG_MAC80211_LEDS=y | 609 | CONFIG_MAC80211_LEDS=y |
603 | # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set | 610 | # CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set |
604 | # CONFIG_MAC80211_DEBUG is not set | 611 | # CONFIG_MAC80211_DEBUG is not set |
@@ -607,7 +614,6 @@ CONFIG_IEEE80211=m | |||
607 | CONFIG_IEEE80211_CRYPT_WEP=m | 614 | CONFIG_IEEE80211_CRYPT_WEP=m |
608 | CONFIG_IEEE80211_CRYPT_CCMP=m | 615 | CONFIG_IEEE80211_CRYPT_CCMP=m |
609 | CONFIG_IEEE80211_CRYPT_TKIP=m | 616 | CONFIG_IEEE80211_CRYPT_TKIP=m |
610 | # CONFIG_IEEE80211_SOFTMAC is not set | ||
611 | # CONFIG_RFKILL is not set | 617 | # CONFIG_RFKILL is not set |
612 | # CONFIG_NET_9P is not set | 618 | # CONFIG_NET_9P is not set |
613 | 619 | ||
@@ -629,6 +635,7 @@ CONFIG_CONNECTOR=y | |||
629 | CONFIG_PROC_EVENTS=y | 635 | CONFIG_PROC_EVENTS=y |
630 | # CONFIG_MTD is not set | 636 | # CONFIG_MTD is not set |
631 | CONFIG_OF_DEVICE=y | 637 | CONFIG_OF_DEVICE=y |
638 | CONFIG_OF_I2C=y | ||
632 | # CONFIG_PARPORT is not set | 639 | # CONFIG_PARPORT is not set |
633 | CONFIG_BLK_DEV=y | 640 | CONFIG_BLK_DEV=y |
634 | # CONFIG_BLK_DEV_FD is not set | 641 | # CONFIG_BLK_DEV_FD is not set |
@@ -720,7 +727,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y | |||
720 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | 727 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y |
721 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | 728 | CONFIG_BLK_DEV_IDEDMA_PMAC=y |
722 | CONFIG_BLK_DEV_IDEDMA=y | 729 | CONFIG_BLK_DEV_IDEDMA=y |
723 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 730 | # CONFIG_BLK_DEV_HD_ONLY is not set |
724 | # CONFIG_BLK_DEV_HD is not set | 731 | # CONFIG_BLK_DEV_HD is not set |
725 | 732 | ||
726 | # | 733 | # |
@@ -906,7 +913,6 @@ CONFIG_SUNGEM=y | |||
906 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 913 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
907 | CONFIG_NET_PCI=y | 914 | CONFIG_NET_PCI=y |
908 | CONFIG_PCNET32=y | 915 | CONFIG_PCNET32=y |
909 | # CONFIG_PCNET32_NAPI is not set | ||
910 | # CONFIG_AMD8111_ETH is not set | 916 | # CONFIG_AMD8111_ETH is not set |
911 | # CONFIG_ADAPTEC_STARFIRE is not set | 917 | # CONFIG_ADAPTEC_STARFIRE is not set |
912 | # CONFIG_B44 is not set | 918 | # CONFIG_B44 is not set |
@@ -940,7 +946,6 @@ CONFIG_NETDEV_1000=y | |||
940 | # CONFIG_SIS190 is not set | 946 | # CONFIG_SIS190 is not set |
941 | # CONFIG_SKGE is not set | 947 | # CONFIG_SKGE is not set |
942 | # CONFIG_SKY2 is not set | 948 | # CONFIG_SKY2 is not set |
943 | # CONFIG_SK98LIN is not set | ||
944 | # CONFIG_VIA_VELOCITY is not set | 949 | # CONFIG_VIA_VELOCITY is not set |
945 | # CONFIG_TIGON3 is not set | 950 | # CONFIG_TIGON3 is not set |
946 | # CONFIG_BNX2 is not set | 951 | # CONFIG_BNX2 is not set |
@@ -959,6 +964,7 @@ CONFIG_NETDEV_10000=y | |||
959 | # CONFIG_MLX4_CORE is not set | 964 | # CONFIG_MLX4_CORE is not set |
960 | # CONFIG_TEHUTI is not set | 965 | # CONFIG_TEHUTI is not set |
961 | # CONFIG_BNX2X is not set | 966 | # CONFIG_BNX2X is not set |
967 | # CONFIG_SFC is not set | ||
962 | # CONFIG_TR is not set | 968 | # CONFIG_TR is not set |
963 | 969 | ||
964 | # | 970 | # |
@@ -992,6 +998,8 @@ CONFIG_P54_COMMON=m | |||
992 | # CONFIG_P54_USB is not set | 998 | # CONFIG_P54_USB is not set |
993 | # CONFIG_P54_PCI is not set | 999 | # CONFIG_P54_PCI is not set |
994 | # CONFIG_ATH5K is not set | 1000 | # CONFIG_ATH5K is not set |
1001 | # CONFIG_IWLCORE is not set | ||
1002 | # CONFIG_IWLWIFI_LEDS is not set | ||
995 | # CONFIG_IWL4965 is not set | 1003 | # CONFIG_IWL4965 is not set |
996 | # CONFIG_IWL3945 is not set | 1004 | # CONFIG_IWL3945 is not set |
997 | # CONFIG_HOSTAP is not set | 1005 | # CONFIG_HOSTAP is not set |
@@ -1110,6 +1118,7 @@ CONFIG_VT=y | |||
1110 | CONFIG_VT_CONSOLE=y | 1118 | CONFIG_VT_CONSOLE=y |
1111 | CONFIG_HW_CONSOLE=y | 1119 | CONFIG_HW_CONSOLE=y |
1112 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 1120 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
1121 | CONFIG_DEVKMEM=y | ||
1113 | # CONFIG_SERIAL_NONSTANDARD is not set | 1122 | # CONFIG_SERIAL_NONSTANDARD is not set |
1114 | # CONFIG_NOZOMI is not set | 1123 | # CONFIG_NOZOMI is not set |
1115 | 1124 | ||
@@ -1156,13 +1165,7 @@ CONFIG_DEVPORT=y | |||
1156 | CONFIG_I2C=y | 1165 | CONFIG_I2C=y |
1157 | CONFIG_I2C_BOARDINFO=y | 1166 | CONFIG_I2C_BOARDINFO=y |
1158 | CONFIG_I2C_CHARDEV=m | 1167 | CONFIG_I2C_CHARDEV=m |
1159 | |||
1160 | # | ||
1161 | # I2C Algorithms | ||
1162 | # | ||
1163 | CONFIG_I2C_ALGOBIT=y | 1168 | CONFIG_I2C_ALGOBIT=y |
1164 | # CONFIG_I2C_ALGOPCF is not set | ||
1165 | # CONFIG_I2C_ALGOPCA is not set | ||
1166 | 1169 | ||
1167 | # | 1170 | # |
1168 | # I2C Hardware Bus support | 1171 | # I2C Hardware Bus support |
@@ -1192,6 +1195,7 @@ CONFIG_I2C_POWERMAC=y | |||
1192 | # CONFIG_I2C_VIA is not set | 1195 | # CONFIG_I2C_VIA is not set |
1193 | # CONFIG_I2C_VIAPRO is not set | 1196 | # CONFIG_I2C_VIAPRO is not set |
1194 | # CONFIG_I2C_VOODOO3 is not set | 1197 | # CONFIG_I2C_VOODOO3 is not set |
1198 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
1195 | 1199 | ||
1196 | # | 1200 | # |
1197 | # Miscellaneous I2C Chip support | 1201 | # Miscellaneous I2C Chip support |
@@ -1201,19 +1205,13 @@ CONFIG_I2C_POWERMAC=y | |||
1201 | # CONFIG_SENSORS_PCF8574 is not set | 1205 | # CONFIG_SENSORS_PCF8574 is not set |
1202 | # CONFIG_PCF8575 is not set | 1206 | # CONFIG_PCF8575 is not set |
1203 | # CONFIG_SENSORS_PCF8591 is not set | 1207 | # CONFIG_SENSORS_PCF8591 is not set |
1204 | # CONFIG_TPS65010 is not set | ||
1205 | # CONFIG_SENSORS_MAX6875 is not set | 1208 | # CONFIG_SENSORS_MAX6875 is not set |
1206 | # CONFIG_SENSORS_TSL2550 is not set | 1209 | # CONFIG_SENSORS_TSL2550 is not set |
1207 | # CONFIG_I2C_DEBUG_CORE is not set | 1210 | # CONFIG_I2C_DEBUG_CORE is not set |
1208 | # CONFIG_I2C_DEBUG_ALGO is not set | 1211 | # CONFIG_I2C_DEBUG_ALGO is not set |
1209 | # CONFIG_I2C_DEBUG_BUS is not set | 1212 | # CONFIG_I2C_DEBUG_BUS is not set |
1210 | # CONFIG_I2C_DEBUG_CHIP is not set | 1213 | # CONFIG_I2C_DEBUG_CHIP is not set |
1211 | |||
1212 | # | ||
1213 | # SPI support | ||
1214 | # | ||
1215 | # CONFIG_SPI is not set | 1214 | # CONFIG_SPI is not set |
1216 | # CONFIG_SPI_MASTER is not set | ||
1217 | # CONFIG_W1 is not set | 1215 | # CONFIG_W1 is not set |
1218 | CONFIG_POWER_SUPPLY=y | 1216 | CONFIG_POWER_SUPPLY=y |
1219 | # CONFIG_POWER_SUPPLY_DEBUG is not set | 1217 | # CONFIG_POWER_SUPPLY_DEBUG is not set |
@@ -1230,6 +1228,7 @@ CONFIG_BATTERY_PMU=y | |||
1230 | # | 1228 | # |
1231 | CONFIG_SSB_POSSIBLE=y | 1229 | CONFIG_SSB_POSSIBLE=y |
1232 | CONFIG_SSB=m | 1230 | CONFIG_SSB=m |
1231 | CONFIG_SSB_SPROM=y | ||
1233 | CONFIG_SSB_PCIHOST_POSSIBLE=y | 1232 | CONFIG_SSB_PCIHOST_POSSIBLE=y |
1234 | CONFIG_SSB_PCIHOST=y | 1233 | CONFIG_SSB_PCIHOST=y |
1235 | CONFIG_SSB_B43_PCI_BRIDGE=y | 1234 | CONFIG_SSB_B43_PCI_BRIDGE=y |
@@ -1243,12 +1242,22 @@ CONFIG_SSB_DRIVER_PCICORE=y | |||
1243 | # Multifunction device drivers | 1242 | # Multifunction device drivers |
1244 | # | 1243 | # |
1245 | # CONFIG_MFD_SM501 is not set | 1244 | # CONFIG_MFD_SM501 is not set |
1245 | # CONFIG_HTC_PASIC3 is not set | ||
1246 | 1246 | ||
1247 | # | 1247 | # |
1248 | # Multimedia devices | 1248 | # Multimedia devices |
1249 | # | 1249 | # |
1250 | |||
1251 | # | ||
1252 | # Multimedia core support | ||
1253 | # | ||
1250 | # CONFIG_VIDEO_DEV is not set | 1254 | # CONFIG_VIDEO_DEV is not set |
1251 | # CONFIG_DVB_CORE is not set | 1255 | # CONFIG_DVB_CORE is not set |
1256 | # CONFIG_VIDEO_MEDIA is not set | ||
1257 | |||
1258 | # | ||
1259 | # Multimedia drivers | ||
1260 | # | ||
1252 | # CONFIG_DAB is not set | 1261 | # CONFIG_DAB is not set |
1253 | 1262 | ||
1254 | # | 1263 | # |
@@ -1276,8 +1285,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
1276 | # CONFIG_FB_SYS_FILLRECT is not set | 1285 | # CONFIG_FB_SYS_FILLRECT is not set |
1277 | # CONFIG_FB_SYS_COPYAREA is not set | 1286 | # CONFIG_FB_SYS_COPYAREA is not set |
1278 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 1287 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
1288 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
1279 | # CONFIG_FB_SYS_FOPS is not set | 1289 | # CONFIG_FB_SYS_FOPS is not set |
1280 | CONFIG_FB_DEFERRED_IO=y | ||
1281 | # CONFIG_FB_SVGALIB is not set | 1290 | # CONFIG_FB_SVGALIB is not set |
1282 | CONFIG_FB_MACMODES=y | 1291 | CONFIG_FB_MACMODES=y |
1283 | CONFIG_FB_BACKLIGHT=y | 1292 | CONFIG_FB_BACKLIGHT=y |
@@ -1413,6 +1422,7 @@ CONFIG_SND_DUMMY=m | |||
1413 | # CONFIG_SND_AU8810 is not set | 1422 | # CONFIG_SND_AU8810 is not set |
1414 | # CONFIG_SND_AU8820 is not set | 1423 | # CONFIG_SND_AU8820 is not set |
1415 | # CONFIG_SND_AU8830 is not set | 1424 | # CONFIG_SND_AU8830 is not set |
1425 | # CONFIG_SND_AW2 is not set | ||
1416 | # CONFIG_SND_AZT3328 is not set | 1426 | # CONFIG_SND_AZT3328 is not set |
1417 | # CONFIG_SND_BT87X is not set | 1427 | # CONFIG_SND_BT87X is not set |
1418 | # CONFIG_SND_CA0106 is not set | 1428 | # CONFIG_SND_CA0106 is not set |
@@ -1505,11 +1515,11 @@ CONFIG_SND_USB_AUDIO=m | |||
1505 | # CONFIG_SND_SOC is not set | 1515 | # CONFIG_SND_SOC is not set |
1506 | 1516 | ||
1507 | # | 1517 | # |
1508 | # SoC Audio support for SuperH | 1518 | # ALSA SoC audio for Freescale SOCs |
1509 | # | 1519 | # |
1510 | 1520 | ||
1511 | # | 1521 | # |
1512 | # ALSA SoC audio for Freescale SOCs | 1522 | # SoC Audio for the Texas Instruments OMAP |
1513 | # | 1523 | # |
1514 | 1524 | ||
1515 | # | 1525 | # |
@@ -1543,17 +1553,18 @@ CONFIG_USB_DEVICEFS=y | |||
1543 | CONFIG_USB_DEVICE_CLASS=y | 1553 | CONFIG_USB_DEVICE_CLASS=y |
1544 | CONFIG_USB_DYNAMIC_MINORS=y | 1554 | CONFIG_USB_DYNAMIC_MINORS=y |
1545 | # CONFIG_USB_SUSPEND is not set | 1555 | # CONFIG_USB_SUSPEND is not set |
1546 | # CONFIG_USB_PERSIST is not set | ||
1547 | # CONFIG_USB_OTG is not set | 1556 | # CONFIG_USB_OTG is not set |
1548 | 1557 | ||
1549 | # | 1558 | # |
1550 | # USB Host Controller Drivers | 1559 | # USB Host Controller Drivers |
1551 | # | 1560 | # |
1561 | # CONFIG_USB_C67X00_HCD is not set | ||
1552 | CONFIG_USB_EHCI_HCD=m | 1562 | CONFIG_USB_EHCI_HCD=m |
1553 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 1563 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
1554 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1564 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1555 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 1565 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
1556 | # CONFIG_USB_ISP116X_HCD is not set | 1566 | # CONFIG_USB_ISP116X_HCD is not set |
1567 | # CONFIG_USB_ISP1760_HCD is not set | ||
1557 | CONFIG_USB_OHCI_HCD=y | 1568 | CONFIG_USB_OHCI_HCD=y |
1558 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1569 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1559 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1570 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1587,7 +1598,9 @@ CONFIG_USB_STORAGE=m | |||
1587 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1598 | # CONFIG_USB_STORAGE_SDDR55 is not set |
1588 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | 1599 | # CONFIG_USB_STORAGE_JUMPSHOT is not set |
1589 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1600 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1601 | CONFIG_USB_STORAGE_ONETOUCH=y | ||
1590 | # CONFIG_USB_STORAGE_KARMA is not set | 1602 | # CONFIG_USB_STORAGE_KARMA is not set |
1603 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1591 | # CONFIG_USB_LIBUSUAL is not set | 1604 | # CONFIG_USB_LIBUSUAL is not set |
1592 | 1605 | ||
1593 | # | 1606 | # |
@@ -1642,9 +1655,11 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | |||
1642 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 1655 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
1643 | # CONFIG_USB_SERIAL_MOS7720 is not set | 1656 | # CONFIG_USB_SERIAL_MOS7720 is not set |
1644 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1657 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1658 | # CONFIG_USB_SERIAL_MOTOROLA is not set | ||
1645 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1659 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1646 | # CONFIG_USB_SERIAL_PL2303 is not set | 1660 | # CONFIG_USB_SERIAL_PL2303 is not set |
1647 | # CONFIG_USB_SERIAL_OTI6858 is not set | 1661 | # CONFIG_USB_SERIAL_OTI6858 is not set |
1662 | # CONFIG_USB_SERIAL_SPCP8X5 is not set | ||
1648 | # CONFIG_USB_SERIAL_HP4X is not set | 1663 | # CONFIG_USB_SERIAL_HP4X is not set |
1649 | # CONFIG_USB_SERIAL_SAFE is not set | 1664 | # CONFIG_USB_SERIAL_SAFE is not set |
1650 | # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set | 1665 | # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set |
@@ -1695,14 +1710,12 @@ CONFIG_LEDS_TRIGGERS=y | |||
1695 | # CONFIG_LEDS_TRIGGER_TIMER is not set | 1710 | # CONFIG_LEDS_TRIGGER_TIMER is not set |
1696 | CONFIG_LEDS_TRIGGER_IDE_DISK=y | 1711 | CONFIG_LEDS_TRIGGER_IDE_DISK=y |
1697 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | 1712 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set |
1713 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
1714 | # CONFIG_ACCESSIBILITY is not set | ||
1698 | # CONFIG_INFINIBAND is not set | 1715 | # CONFIG_INFINIBAND is not set |
1699 | # CONFIG_EDAC is not set | 1716 | # CONFIG_EDAC is not set |
1700 | # CONFIG_RTC_CLASS is not set | 1717 | # CONFIG_RTC_CLASS is not set |
1701 | # CONFIG_DMADEVICES is not set | 1718 | # CONFIG_DMADEVICES is not set |
1702 | |||
1703 | # | ||
1704 | # Userspace I/O | ||
1705 | # | ||
1706 | # CONFIG_UIO is not set | 1719 | # CONFIG_UIO is not set |
1707 | 1720 | ||
1708 | # | 1721 | # |
@@ -1786,13 +1799,11 @@ CONFIG_NFS_FS=y | |||
1786 | CONFIG_NFS_V3=y | 1799 | CONFIG_NFS_V3=y |
1787 | CONFIG_NFS_V3_ACL=y | 1800 | CONFIG_NFS_V3_ACL=y |
1788 | CONFIG_NFS_V4=y | 1801 | CONFIG_NFS_V4=y |
1789 | # CONFIG_NFS_DIRECTIO is not set | ||
1790 | CONFIG_NFSD=m | 1802 | CONFIG_NFSD=m |
1791 | CONFIG_NFSD_V2_ACL=y | 1803 | CONFIG_NFSD_V2_ACL=y |
1792 | CONFIG_NFSD_V3=y | 1804 | CONFIG_NFSD_V3=y |
1793 | CONFIG_NFSD_V3_ACL=y | 1805 | CONFIG_NFSD_V3_ACL=y |
1794 | CONFIG_NFSD_V4=y | 1806 | CONFIG_NFSD_V4=y |
1795 | CONFIG_NFSD_TCP=y | ||
1796 | CONFIG_LOCKD=y | 1807 | CONFIG_LOCKD=y |
1797 | CONFIG_LOCKD_V4=y | 1808 | CONFIG_LOCKD_V4=y |
1798 | CONFIG_EXPORTFS=m | 1809 | CONFIG_EXPORTFS=m |
@@ -1877,9 +1888,10 @@ CONFIG_NLS_UTF8=m | |||
1877 | # Library routines | 1888 | # Library routines |
1878 | # | 1889 | # |
1879 | CONFIG_BITREVERSE=y | 1890 | CONFIG_BITREVERSE=y |
1891 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1880 | CONFIG_CRC_CCITT=y | 1892 | CONFIG_CRC_CCITT=y |
1881 | CONFIG_CRC16=y | 1893 | CONFIG_CRC16=y |
1882 | # CONFIG_CRC_ITU_T is not set | 1894 | CONFIG_CRC_ITU_T=m |
1883 | CONFIG_CRC32=y | 1895 | CONFIG_CRC32=y |
1884 | # CONFIG_CRC7 is not set | 1896 | # CONFIG_CRC7 is not set |
1885 | CONFIG_LIBCRC32C=m | 1897 | CONFIG_LIBCRC32C=m |
@@ -1901,6 +1913,7 @@ CONFIG_HAVE_LMB=y | |||
1901 | # CONFIG_PRINTK_TIME is not set | 1913 | # CONFIG_PRINTK_TIME is not set |
1902 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1914 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1903 | CONFIG_ENABLE_MUST_CHECK=y | 1915 | CONFIG_ENABLE_MUST_CHECK=y |
1916 | CONFIG_FRAME_WARN=1024 | ||
1904 | CONFIG_MAGIC_SYSRQ=y | 1917 | CONFIG_MAGIC_SYSRQ=y |
1905 | # CONFIG_UNUSED_SYMBOLS is not set | 1918 | # CONFIG_UNUSED_SYMBOLS is not set |
1906 | # CONFIG_DEBUG_FS is not set | 1919 | # CONFIG_DEBUG_FS is not set |
@@ -1911,6 +1924,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1911 | CONFIG_SCHED_DEBUG=y | 1924 | CONFIG_SCHED_DEBUG=y |
1912 | # CONFIG_SCHEDSTATS is not set | 1925 | # CONFIG_SCHEDSTATS is not set |
1913 | # CONFIG_TIMER_STATS is not set | 1926 | # CONFIG_TIMER_STATS is not set |
1927 | # CONFIG_DEBUG_OBJECTS is not set | ||
1914 | # CONFIG_SLUB_DEBUG_ON is not set | 1928 | # CONFIG_SLUB_DEBUG_ON is not set |
1915 | # CONFIG_SLUB_STATS is not set | 1929 | # CONFIG_SLUB_STATS is not set |
1916 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1930 | # CONFIG_DEBUG_RT_MUTEXES is not set |
@@ -1923,6 +1937,7 @@ CONFIG_SCHED_DEBUG=y | |||
1923 | CONFIG_DEBUG_BUGVERBOSE=y | 1937 | CONFIG_DEBUG_BUGVERBOSE=y |
1924 | # CONFIG_DEBUG_INFO is not set | 1938 | # CONFIG_DEBUG_INFO is not set |
1925 | # CONFIG_DEBUG_VM is not set | 1939 | # CONFIG_DEBUG_VM is not set |
1940 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1926 | # CONFIG_DEBUG_LIST is not set | 1941 | # CONFIG_DEBUG_LIST is not set |
1927 | # CONFIG_DEBUG_SG is not set | 1942 | # CONFIG_DEBUG_SG is not set |
1928 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1943 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1936,6 +1951,7 @@ CONFIG_DEBUGGER=y | |||
1936 | CONFIG_XMON=y | 1951 | CONFIG_XMON=y |
1937 | CONFIG_XMON_DEFAULT=y | 1952 | CONFIG_XMON_DEFAULT=y |
1938 | CONFIG_XMON_DISASSEMBLY=y | 1953 | CONFIG_XMON_DISASSEMBLY=y |
1954 | CONFIG_IRQSTACKS=y | ||
1939 | # CONFIG_BDI_SWITCH is not set | 1955 | # CONFIG_BDI_SWITCH is not set |
1940 | CONFIG_BOOTX_TEXT=y | 1956 | CONFIG_BOOTX_TEXT=y |
1941 | # CONFIG_PPC_EARLY_DEBUG is not set | 1957 | # CONFIG_PPC_EARLY_DEBUG is not set |
@@ -1947,54 +1963,84 @@ CONFIG_BOOTX_TEXT=y | |||
1947 | # CONFIG_SECURITY is not set | 1963 | # CONFIG_SECURITY is not set |
1948 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1964 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1949 | CONFIG_CRYPTO=y | 1965 | CONFIG_CRYPTO=y |
1966 | |||
1967 | # | ||
1968 | # Crypto core or helper | ||
1969 | # | ||
1950 | CONFIG_CRYPTO_ALGAPI=y | 1970 | CONFIG_CRYPTO_ALGAPI=y |
1951 | CONFIG_CRYPTO_AEAD=y | 1971 | CONFIG_CRYPTO_AEAD=y |
1952 | CONFIG_CRYPTO_BLKCIPHER=y | 1972 | CONFIG_CRYPTO_BLKCIPHER=y |
1953 | # CONFIG_CRYPTO_SEQIV is not set | ||
1954 | CONFIG_CRYPTO_HASH=y | 1973 | CONFIG_CRYPTO_HASH=y |
1955 | CONFIG_CRYPTO_MANAGER=y | 1974 | CONFIG_CRYPTO_MANAGER=y |
1975 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1976 | CONFIG_CRYPTO_NULL=m | ||
1977 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1978 | CONFIG_CRYPTO_AUTHENC=y | ||
1979 | # CONFIG_CRYPTO_TEST is not set | ||
1980 | |||
1981 | # | ||
1982 | # Authenticated Encryption with Associated Data | ||
1983 | # | ||
1984 | # CONFIG_CRYPTO_CCM is not set | ||
1985 | # CONFIG_CRYPTO_GCM is not set | ||
1986 | # CONFIG_CRYPTO_SEQIV is not set | ||
1987 | |||
1988 | # | ||
1989 | # Block modes | ||
1990 | # | ||
1991 | CONFIG_CRYPTO_CBC=y | ||
1992 | # CONFIG_CRYPTO_CTR is not set | ||
1993 | # CONFIG_CRYPTO_CTS is not set | ||
1994 | CONFIG_CRYPTO_ECB=m | ||
1995 | # CONFIG_CRYPTO_LRW is not set | ||
1996 | CONFIG_CRYPTO_PCBC=m | ||
1997 | # CONFIG_CRYPTO_XTS is not set | ||
1998 | |||
1999 | # | ||
2000 | # Hash modes | ||
2001 | # | ||
1956 | CONFIG_CRYPTO_HMAC=y | 2002 | CONFIG_CRYPTO_HMAC=y |
1957 | # CONFIG_CRYPTO_XCBC is not set | 2003 | # CONFIG_CRYPTO_XCBC is not set |
1958 | CONFIG_CRYPTO_NULL=m | 2004 | |
2005 | # | ||
2006 | # Digest | ||
2007 | # | ||
2008 | CONFIG_CRYPTO_CRC32C=m | ||
1959 | CONFIG_CRYPTO_MD4=m | 2009 | CONFIG_CRYPTO_MD4=m |
1960 | CONFIG_CRYPTO_MD5=y | 2010 | CONFIG_CRYPTO_MD5=y |
2011 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1961 | CONFIG_CRYPTO_SHA1=y | 2012 | CONFIG_CRYPTO_SHA1=y |
1962 | CONFIG_CRYPTO_SHA256=m | 2013 | CONFIG_CRYPTO_SHA256=m |
1963 | CONFIG_CRYPTO_SHA512=m | 2014 | CONFIG_CRYPTO_SHA512=m |
1964 | CONFIG_CRYPTO_WP512=m | ||
1965 | CONFIG_CRYPTO_TGR192=m | 2015 | CONFIG_CRYPTO_TGR192=m |
1966 | # CONFIG_CRYPTO_GF128MUL is not set | 2016 | CONFIG_CRYPTO_WP512=m |
1967 | CONFIG_CRYPTO_ECB=m | 2017 | |
1968 | CONFIG_CRYPTO_CBC=y | 2018 | # |
1969 | CONFIG_CRYPTO_PCBC=m | 2019 | # Ciphers |
1970 | # CONFIG_CRYPTO_LRW is not set | 2020 | # |
1971 | # CONFIG_CRYPTO_XTS is not set | ||
1972 | # CONFIG_CRYPTO_CTR is not set | ||
1973 | # CONFIG_CRYPTO_GCM is not set | ||
1974 | # CONFIG_CRYPTO_CCM is not set | ||
1975 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1976 | CONFIG_CRYPTO_DES=y | ||
1977 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1978 | CONFIG_CRYPTO_BLOWFISH=m | ||
1979 | CONFIG_CRYPTO_TWOFISH=m | ||
1980 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1981 | CONFIG_CRYPTO_SERPENT=m | ||
1982 | CONFIG_CRYPTO_AES=m | 2021 | CONFIG_CRYPTO_AES=m |
2022 | CONFIG_CRYPTO_ANUBIS=m | ||
2023 | CONFIG_CRYPTO_ARC4=m | ||
2024 | CONFIG_CRYPTO_BLOWFISH=m | ||
2025 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1983 | CONFIG_CRYPTO_CAST5=m | 2026 | CONFIG_CRYPTO_CAST5=m |
1984 | CONFIG_CRYPTO_CAST6=m | 2027 | CONFIG_CRYPTO_CAST6=m |
1985 | CONFIG_CRYPTO_TEA=m | 2028 | CONFIG_CRYPTO_DES=y |
1986 | CONFIG_CRYPTO_ARC4=m | 2029 | # CONFIG_CRYPTO_FCRYPT is not set |
1987 | CONFIG_CRYPTO_KHAZAD=m | 2030 | CONFIG_CRYPTO_KHAZAD=m |
1988 | CONFIG_CRYPTO_ANUBIS=m | ||
1989 | # CONFIG_CRYPTO_SEED is not set | ||
1990 | # CONFIG_CRYPTO_SALSA20 is not set | 2031 | # CONFIG_CRYPTO_SALSA20 is not set |
2032 | # CONFIG_CRYPTO_SEED is not set | ||
2033 | CONFIG_CRYPTO_SERPENT=m | ||
2034 | CONFIG_CRYPTO_TEA=m | ||
2035 | CONFIG_CRYPTO_TWOFISH=m | ||
2036 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
2037 | |||
2038 | # | ||
2039 | # Compression | ||
2040 | # | ||
1991 | CONFIG_CRYPTO_DEFLATE=m | 2041 | CONFIG_CRYPTO_DEFLATE=m |
1992 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1993 | CONFIG_CRYPTO_CRC32C=m | ||
1994 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1995 | # CONFIG_CRYPTO_TEST is not set | ||
1996 | CONFIG_CRYPTO_AUTHENC=y | ||
1997 | # CONFIG_CRYPTO_LZO is not set | 2042 | # CONFIG_CRYPTO_LZO is not set |
1998 | CONFIG_CRYPTO_HW=y | 2043 | CONFIG_CRYPTO_HW=y |
1999 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 2044 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
2000 | # CONFIG_PPC_CLOCK is not set | 2045 | # CONFIG_PPC_CLOCK is not set |
2046 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 970282b1a004..40f84fa2bd29 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:56:24 2008 | 4 | # Tue May 20 20:03:02 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
30 | CONFIG_GENERIC_HARDIRQS=y | 30 | CONFIG_GENERIC_HARDIRQS=y |
31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
32 | CONFIG_IRQ_PER_CPU=y | 32 | CONFIG_IRQ_PER_CPU=y |
33 | CONFIG_STACKTRACE_SUPPORT=y | ||
34 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
33 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
34 | CONFIG_ARCH_HAS_ILOG2_U32=y | 37 | CONFIG_ARCH_HAS_ILOG2_U32=y |
35 | CONFIG_ARCH_HAS_ILOG2_U64=y | 38 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -82,6 +85,7 @@ CONFIG_LOG_BUF_SHIFT=17 | |||
82 | CONFIG_CGROUPS=y | 85 | CONFIG_CGROUPS=y |
83 | # CONFIG_CGROUP_DEBUG is not set | 86 | # CONFIG_CGROUP_DEBUG is not set |
84 | # CONFIG_CGROUP_NS is not set | 87 | # CONFIG_CGROUP_NS is not set |
88 | # CONFIG_CGROUP_DEVICE is not set | ||
85 | CONFIG_CPUSETS=y | 89 | CONFIG_CPUSETS=y |
86 | # CONFIG_GROUP_SCHED is not set | 90 | # CONFIG_GROUP_SCHED is not set |
87 | # CONFIG_CGROUP_CPUACCT is not set | 91 | # CONFIG_CGROUP_CPUACCT is not set |
@@ -101,6 +105,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
101 | CONFIG_SYSCTL=y | 105 | CONFIG_SYSCTL=y |
102 | # CONFIG_EMBEDDED is not set | 106 | # CONFIG_EMBEDDED is not set |
103 | CONFIG_SYSCTL_SYSCALL=y | 107 | CONFIG_SYSCTL_SYSCALL=y |
108 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
104 | CONFIG_KALLSYMS=y | 109 | CONFIG_KALLSYMS=y |
105 | CONFIG_KALLSYMS_ALL=y | 110 | CONFIG_KALLSYMS_ALL=y |
106 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 111 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -108,6 +113,7 @@ CONFIG_HOTPLUG=y | |||
108 | CONFIG_PRINTK=y | 113 | CONFIG_PRINTK=y |
109 | CONFIG_BUG=y | 114 | CONFIG_BUG=y |
110 | CONFIG_ELF_CORE=y | 115 | CONFIG_ELF_CORE=y |
116 | CONFIG_PCSPKR_PLATFORM=y | ||
111 | # CONFIG_COMPAT_BRK is not set | 117 | # CONFIG_COMPAT_BRK is not set |
112 | CONFIG_BASE_FULL=y | 118 | CONFIG_BASE_FULL=y |
113 | CONFIG_FUTEX=y | 119 | CONFIG_FUTEX=y |
@@ -129,12 +135,14 @@ CONFIG_HAVE_OPROFILE=y | |||
129 | # CONFIG_KPROBES is not set | 135 | # CONFIG_KPROBES is not set |
130 | CONFIG_HAVE_KPROBES=y | 136 | CONFIG_HAVE_KPROBES=y |
131 | CONFIG_HAVE_KRETPROBES=y | 137 | CONFIG_HAVE_KRETPROBES=y |
138 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
132 | CONFIG_PROC_PAGE_MONITOR=y | 139 | CONFIG_PROC_PAGE_MONITOR=y |
133 | CONFIG_SLABINFO=y | 140 | CONFIG_SLABINFO=y |
134 | CONFIG_RT_MUTEXES=y | 141 | CONFIG_RT_MUTEXES=y |
135 | # CONFIG_TINY_SHMEM is not set | 142 | # CONFIG_TINY_SHMEM is not set |
136 | CONFIG_BASE_SMALL=0 | 143 | CONFIG_BASE_SMALL=0 |
137 | CONFIG_MODULES=y | 144 | CONFIG_MODULES=y |
145 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
138 | CONFIG_MODULE_UNLOAD=y | 146 | CONFIG_MODULE_UNLOAD=y |
139 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 147 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
140 | CONFIG_MODVERSIONS=y | 148 | CONFIG_MODVERSIONS=y |
@@ -194,11 +202,11 @@ CONFIG_PPC_PASEMI=y | |||
194 | CONFIG_PPC_PASEMI_IOMMU=y | 202 | CONFIG_PPC_PASEMI_IOMMU=y |
195 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set | 203 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set |
196 | CONFIG_PPC_PASEMI_MDIO=y | 204 | CONFIG_PPC_PASEMI_MDIO=y |
197 | CONFIG_PPC_CELLEB=y | ||
198 | # CONFIG_PPC_PS3 is not set | 205 | # CONFIG_PPC_PS3 is not set |
199 | CONFIG_PPC_CELL=y | 206 | CONFIG_PPC_CELL=y |
200 | CONFIG_PPC_CELL_NATIVE=y | 207 | CONFIG_PPC_CELL_NATIVE=y |
201 | CONFIG_PPC_IBM_CELL_BLADE=y | 208 | CONFIG_PPC_IBM_CELL_BLADE=y |
209 | CONFIG_PPC_CELLEB=y | ||
202 | 210 | ||
203 | # | 211 | # |
204 | # Cell Broadband Engine options | 212 | # Cell Broadband Engine options |
@@ -241,6 +249,7 @@ CONFIG_CPU_FREQ_TABLE=y | |||
241 | CONFIG_CPU_FREQ_STAT=y | 249 | CONFIG_CPU_FREQ_STAT=y |
242 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 250 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
243 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 251 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
252 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
244 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 253 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
245 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 254 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set |
246 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 255 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
@@ -277,7 +286,6 @@ CONFIG_PREEMPT_NONE=y | |||
277 | CONFIG_BINFMT_ELF=y | 286 | CONFIG_BINFMT_ELF=y |
278 | CONFIG_COMPAT_BINFMT_ELF=y | 287 | CONFIG_COMPAT_BINFMT_ELF=y |
279 | CONFIG_BINFMT_MISC=m | 288 | CONFIG_BINFMT_MISC=m |
280 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
281 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 289 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
282 | CONFIG_IOMMU_VMERGE=y | 290 | CONFIG_IOMMU_VMERGE=y |
283 | CONFIG_IOMMU_HELPER=y | 291 | CONFIG_IOMMU_HELPER=y |
@@ -307,6 +315,7 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | |||
307 | CONFIG_SPARSEMEM_VMEMMAP=y | 315 | CONFIG_SPARSEMEM_VMEMMAP=y |
308 | CONFIG_MEMORY_HOTPLUG=y | 316 | CONFIG_MEMORY_HOTPLUG=y |
309 | CONFIG_MEMORY_HOTPLUG_SPARSE=y | 317 | CONFIG_MEMORY_HOTPLUG_SPARSE=y |
318 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
310 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 319 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
311 | CONFIG_RESOURCES_64BIT=y | 320 | CONFIG_RESOURCES_64BIT=y |
312 | CONFIG_ZONE_DMA_FLAG=1 | 321 | CONFIG_ZONE_DMA_FLAG=1 |
@@ -314,6 +323,7 @@ CONFIG_BOUNCE=y | |||
314 | CONFIG_ARCH_MEMORY_PROBE=y | 323 | CONFIG_ARCH_MEMORY_PROBE=y |
315 | CONFIG_PPC_HAS_HASH_64K=y | 324 | CONFIG_PPC_HAS_HASH_64K=y |
316 | # CONFIG_PPC_64K_PAGES is not set | 325 | # CONFIG_PPC_64K_PAGES is not set |
326 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
317 | # CONFIG_SCHED_SMT is not set | 327 | # CONFIG_SCHED_SMT is not set |
318 | CONFIG_PROC_DEVICETREE=y | 328 | CONFIG_PROC_DEVICETREE=y |
319 | # CONFIG_CMDLINE_BOOL is not set | 329 | # CONFIG_CMDLINE_BOOL is not set |
@@ -356,7 +366,10 @@ CONFIG_HOTPLUG_PCI=m | |||
356 | # CONFIG_HOTPLUG_PCI_SHPC is not set | 366 | # CONFIG_HOTPLUG_PCI_SHPC is not set |
357 | CONFIG_HOTPLUG_PCI_RPA=m | 367 | CONFIG_HOTPLUG_PCI_RPA=m |
358 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 368 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
369 | # CONFIG_HAS_RAPIDIO is not set | ||
370 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
359 | CONFIG_KERNEL_START=0xc000000000000000 | 371 | CONFIG_KERNEL_START=0xc000000000000000 |
372 | CONFIG_PHYSICAL_START=0x00000000 | ||
360 | 373 | ||
361 | # | 374 | # |
362 | # Networking | 375 | # Networking |
@@ -406,8 +419,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
406 | # CONFIG_TCP_MD5SIG is not set | 419 | # CONFIG_TCP_MD5SIG is not set |
407 | # CONFIG_IP_VS is not set | 420 | # CONFIG_IP_VS is not set |
408 | # CONFIG_IPV6 is not set | 421 | # CONFIG_IPV6 is not set |
409 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
410 | # CONFIG_INET6_TUNNEL is not set | ||
411 | # CONFIG_NETWORK_SECMARK is not set | 422 | # CONFIG_NETWORK_SECMARK is not set |
412 | CONFIG_NETFILTER=y | 423 | CONFIG_NETFILTER=y |
413 | # CONFIG_NETFILTER_DEBUG is not set | 424 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -423,6 +434,7 @@ CONFIG_NF_CONNTRACK=m | |||
423 | CONFIG_NF_CT_ACCT=y | 434 | CONFIG_NF_CT_ACCT=y |
424 | CONFIG_NF_CONNTRACK_MARK=y | 435 | CONFIG_NF_CONNTRACK_MARK=y |
425 | CONFIG_NF_CONNTRACK_EVENTS=y | 436 | CONFIG_NF_CONNTRACK_EVENTS=y |
437 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
426 | CONFIG_NF_CT_PROTO_GRE=m | 438 | CONFIG_NF_CT_PROTO_GRE=m |
427 | CONFIG_NF_CT_PROTO_SCTP=m | 439 | CONFIG_NF_CT_PROTO_SCTP=m |
428 | # CONFIG_NF_CT_PROTO_UDPLITE is not set | 440 | # CONFIG_NF_CT_PROTO_UDPLITE is not set |
@@ -501,6 +513,7 @@ CONFIG_IP_NF_TARGET_REDIRECT=m | |||
501 | CONFIG_IP_NF_TARGET_NETMAP=m | 513 | CONFIG_IP_NF_TARGET_NETMAP=m |
502 | CONFIG_NF_NAT_SNMP_BASIC=m | 514 | CONFIG_NF_NAT_SNMP_BASIC=m |
503 | CONFIG_NF_NAT_PROTO_GRE=m | 515 | CONFIG_NF_NAT_PROTO_GRE=m |
516 | CONFIG_NF_NAT_PROTO_SCTP=m | ||
504 | CONFIG_NF_NAT_FTP=m | 517 | CONFIG_NF_NAT_FTP=m |
505 | CONFIG_NF_NAT_IRC=m | 518 | CONFIG_NF_NAT_IRC=m |
506 | CONFIG_NF_NAT_TFTP=m | 519 | CONFIG_NF_NAT_TFTP=m |
@@ -571,6 +584,7 @@ CONFIG_FW_LOADER=y | |||
571 | # CONFIG_CONNECTOR is not set | 584 | # CONFIG_CONNECTOR is not set |
572 | # CONFIG_MTD is not set | 585 | # CONFIG_MTD is not set |
573 | CONFIG_OF_DEVICE=y | 586 | CONFIG_OF_DEVICE=y |
587 | CONFIG_OF_I2C=y | ||
574 | # CONFIG_PARPORT is not set | 588 | # CONFIG_PARPORT is not set |
575 | CONFIG_BLK_DEV=y | 589 | CONFIG_BLK_DEV=y |
576 | CONFIG_BLK_DEV_FD=y | 590 | CONFIG_BLK_DEV_FD=y |
@@ -618,7 +632,6 @@ CONFIG_IDE_PROC_FS=y | |||
618 | # | 632 | # |
619 | # IDE chipset support/bugfixes | 633 | # IDE chipset support/bugfixes |
620 | # | 634 | # |
621 | CONFIG_IDE_GENERIC=y | ||
622 | # CONFIG_BLK_DEV_PLATFORM is not set | 635 | # CONFIG_BLK_DEV_PLATFORM is not set |
623 | CONFIG_BLK_DEV_IDEDMA_SFF=y | 636 | CONFIG_BLK_DEV_IDEDMA_SFF=y |
624 | 637 | ||
@@ -661,7 +674,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y | |||
661 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | 674 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y |
662 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | 675 | CONFIG_BLK_DEV_IDEDMA_PMAC=y |
663 | CONFIG_BLK_DEV_IDEDMA=y | 676 | CONFIG_BLK_DEV_IDEDMA=y |
664 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 677 | # CONFIG_BLK_DEV_HD_ONLY is not set |
665 | # CONFIG_BLK_DEV_HD is not set | 678 | # CONFIG_BLK_DEV_HD is not set |
666 | 679 | ||
667 | # | 680 | # |
@@ -747,64 +760,10 @@ CONFIG_SCSI_DEBUG=m | |||
747 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set | 760 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set |
748 | CONFIG_ATA=y | 761 | CONFIG_ATA=y |
749 | CONFIG_ATA_NONSTANDARD=y | 762 | CONFIG_ATA_NONSTANDARD=y |
763 | CONFIG_SATA_PMP=y | ||
750 | # CONFIG_SATA_AHCI is not set | 764 | # CONFIG_SATA_AHCI is not set |
751 | CONFIG_SATA_SVW=y | ||
752 | # CONFIG_ATA_PIIX is not set | ||
753 | CONFIG_SATA_MV=y | ||
754 | # CONFIG_SATA_NV is not set | ||
755 | # CONFIG_PDC_ADMA is not set | ||
756 | # CONFIG_SATA_QSTOR is not set | ||
757 | # CONFIG_SATA_PROMISE is not set | ||
758 | # CONFIG_SATA_SX4 is not set | ||
759 | # CONFIG_SATA_SIL is not set | ||
760 | CONFIG_SATA_SIL24=y | 765 | CONFIG_SATA_SIL24=y |
761 | # CONFIG_SATA_SIS is not set | 766 | # CONFIG_ATA_SFF is not set |
762 | # CONFIG_SATA_ULI is not set | ||
763 | # CONFIG_SATA_VIA is not set | ||
764 | # CONFIG_SATA_VITESSE is not set | ||
765 | # CONFIG_SATA_INIC162X is not set | ||
766 | # CONFIG_PATA_ALI is not set | ||
767 | # CONFIG_PATA_AMD is not set | ||
768 | # CONFIG_PATA_ARTOP is not set | ||
769 | # CONFIG_PATA_ATIIXP is not set | ||
770 | # CONFIG_PATA_CMD640_PCI is not set | ||
771 | # CONFIG_PATA_CMD64X is not set | ||
772 | # CONFIG_PATA_CS5520 is not set | ||
773 | # CONFIG_PATA_CS5530 is not set | ||
774 | # CONFIG_PATA_CYPRESS is not set | ||
775 | # CONFIG_PATA_EFAR is not set | ||
776 | # CONFIG_ATA_GENERIC is not set | ||
777 | # CONFIG_PATA_HPT366 is not set | ||
778 | # CONFIG_PATA_HPT37X is not set | ||
779 | # CONFIG_PATA_HPT3X2N is not set | ||
780 | # CONFIG_PATA_HPT3X3 is not set | ||
781 | # CONFIG_PATA_IT821X is not set | ||
782 | # CONFIG_PATA_IT8213 is not set | ||
783 | # CONFIG_PATA_JMICRON is not set | ||
784 | # CONFIG_PATA_TRIFLEX is not set | ||
785 | # CONFIG_PATA_MARVELL is not set | ||
786 | # CONFIG_PATA_MPIIX is not set | ||
787 | # CONFIG_PATA_OLDPIIX is not set | ||
788 | # CONFIG_PATA_NETCELL is not set | ||
789 | # CONFIG_PATA_NINJA32 is not set | ||
790 | # CONFIG_PATA_NS87410 is not set | ||
791 | # CONFIG_PATA_NS87415 is not set | ||
792 | # CONFIG_PATA_OPTI is not set | ||
793 | # CONFIG_PATA_OPTIDMA is not set | ||
794 | CONFIG_PATA_PCMCIA=y | ||
795 | # CONFIG_PATA_PDC_OLD is not set | ||
796 | # CONFIG_PATA_RADISYS is not set | ||
797 | # CONFIG_PATA_RZ1000 is not set | ||
798 | # CONFIG_PATA_SC1200 is not set | ||
799 | # CONFIG_PATA_SERVERWORKS is not set | ||
800 | # CONFIG_PATA_PDC2027X is not set | ||
801 | # CONFIG_PATA_SIL680 is not set | ||
802 | # CONFIG_PATA_SIS is not set | ||
803 | # CONFIG_PATA_VIA is not set | ||
804 | CONFIG_PATA_WINBOND=y | ||
805 | CONFIG_PATA_PLATFORM=y | ||
806 | # CONFIG_PATA_OF_PLATFORM is not set | ||
807 | CONFIG_PATA_SCC=y | ||
808 | CONFIG_MD=y | 767 | CONFIG_MD=y |
809 | CONFIG_BLK_DEV_MD=y | 768 | CONFIG_BLK_DEV_MD=y |
810 | CONFIG_MD_LINEAR=y | 769 | CONFIG_MD_LINEAR=y |
@@ -866,6 +825,7 @@ CONFIG_WINDFARM=y | |||
866 | CONFIG_WINDFARM_PM81=y | 825 | CONFIG_WINDFARM_PM81=y |
867 | CONFIG_WINDFARM_PM91=y | 826 | CONFIG_WINDFARM_PM91=y |
868 | CONFIG_WINDFARM_PM112=y | 827 | CONFIG_WINDFARM_PM112=y |
828 | CONFIG_WINDFARM_PM121=y | ||
869 | # CONFIG_PMAC_RACKMETER is not set | 829 | # CONFIG_PMAC_RACKMETER is not set |
870 | CONFIG_NETDEVICES=y | 830 | CONFIG_NETDEVICES=y |
871 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | 831 | # CONFIG_NETDEVICES_MULTIQUEUE is not set |
@@ -911,7 +871,6 @@ CONFIG_IBM_NEW_EMAC_TAH=y | |||
911 | CONFIG_IBM_NEW_EMAC_EMAC4=y | 871 | CONFIG_IBM_NEW_EMAC_EMAC4=y |
912 | CONFIG_NET_PCI=y | 872 | CONFIG_NET_PCI=y |
913 | CONFIG_PCNET32=y | 873 | CONFIG_PCNET32=y |
914 | # CONFIG_PCNET32_NAPI is not set | ||
915 | # CONFIG_AMD8111_ETH is not set | 874 | # CONFIG_AMD8111_ETH is not set |
916 | # CONFIG_ADAPTEC_STARFIRE is not set | 875 | # CONFIG_ADAPTEC_STARFIRE is not set |
917 | # CONFIG_B44 is not set | 876 | # CONFIG_B44 is not set |
@@ -947,7 +906,6 @@ CONFIG_E1000=y | |||
947 | # CONFIG_SIS190 is not set | 906 | # CONFIG_SIS190 is not set |
948 | # CONFIG_SKGE is not set | 907 | # CONFIG_SKGE is not set |
949 | # CONFIG_SKY2 is not set | 908 | # CONFIG_SKY2 is not set |
950 | # CONFIG_SK98LIN is not set | ||
951 | # CONFIG_VIA_VELOCITY is not set | 909 | # CONFIG_VIA_VELOCITY is not set |
952 | CONFIG_TIGON3=y | 910 | CONFIG_TIGON3=y |
953 | # CONFIG_BNX2 is not set | 911 | # CONFIG_BNX2 is not set |
@@ -969,6 +927,7 @@ CONFIG_PASEMI_MAC=y | |||
969 | # CONFIG_MLX4_CORE is not set | 927 | # CONFIG_MLX4_CORE is not set |
970 | # CONFIG_TEHUTI is not set | 928 | # CONFIG_TEHUTI is not set |
971 | # CONFIG_BNX2X is not set | 929 | # CONFIG_BNX2X is not set |
930 | # CONFIG_SFC is not set | ||
972 | CONFIG_TR=y | 931 | CONFIG_TR=y |
973 | CONFIG_IBMOL=y | 932 | CONFIG_IBMOL=y |
974 | # CONFIG_3C359 is not set | 933 | # CONFIG_3C359 is not set |
@@ -979,6 +938,7 @@ CONFIG_IBMOL=y | |||
979 | # | 938 | # |
980 | # CONFIG_WLAN_PRE80211 is not set | 939 | # CONFIG_WLAN_PRE80211 is not set |
981 | # CONFIG_WLAN_80211 is not set | 940 | # CONFIG_WLAN_80211 is not set |
941 | # CONFIG_IWLWIFI_LEDS is not set | ||
982 | 942 | ||
983 | # | 943 | # |
984 | # USB Network Adapters | 944 | # USB Network Adapters |
@@ -1083,6 +1043,7 @@ CONFIG_VT=y | |||
1083 | CONFIG_VT_CONSOLE=y | 1043 | CONFIG_VT_CONSOLE=y |
1084 | CONFIG_HW_CONSOLE=y | 1044 | CONFIG_HW_CONSOLE=y |
1085 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 1045 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
1046 | CONFIG_DEVKMEM=y | ||
1086 | # CONFIG_SERIAL_NONSTANDARD is not set | 1047 | # CONFIG_SERIAL_NONSTANDARD is not set |
1087 | # CONFIG_NOZOMI is not set | 1048 | # CONFIG_NOZOMI is not set |
1088 | 1049 | ||
@@ -1121,8 +1082,6 @@ CONFIG_HVC_BEAT=y | |||
1121 | CONFIG_HVCS=m | 1082 | CONFIG_HVCS=m |
1122 | # CONFIG_IPMI_HANDLER is not set | 1083 | # CONFIG_IPMI_HANDLER is not set |
1123 | # CONFIG_HW_RANDOM is not set | 1084 | # CONFIG_HW_RANDOM is not set |
1124 | CONFIG_GEN_RTC=y | ||
1125 | # CONFIG_GEN_RTC_X is not set | ||
1126 | # CONFIG_R3964 is not set | 1085 | # CONFIG_R3964 is not set |
1127 | # CONFIG_APPLICOM is not set | 1086 | # CONFIG_APPLICOM is not set |
1128 | 1087 | ||
@@ -1141,13 +1100,7 @@ CONFIG_DEVPORT=y | |||
1141 | CONFIG_I2C=y | 1100 | CONFIG_I2C=y |
1142 | CONFIG_I2C_BOARDINFO=y | 1101 | CONFIG_I2C_BOARDINFO=y |
1143 | CONFIG_I2C_CHARDEV=y | 1102 | CONFIG_I2C_CHARDEV=y |
1144 | |||
1145 | # | ||
1146 | # I2C Algorithms | ||
1147 | # | ||
1148 | CONFIG_I2C_ALGOBIT=y | 1103 | CONFIG_I2C_ALGOBIT=y |
1149 | # CONFIG_I2C_ALGOPCF is not set | ||
1150 | # CONFIG_I2C_ALGOPCA is not set | ||
1151 | 1104 | ||
1152 | # | 1105 | # |
1153 | # I2C Hardware Bus support | 1106 | # I2C Hardware Bus support |
@@ -1177,6 +1130,7 @@ CONFIG_I2C_PASEMI=y | |||
1177 | # CONFIG_I2C_VIA is not set | 1130 | # CONFIG_I2C_VIA is not set |
1178 | # CONFIG_I2C_VIAPRO is not set | 1131 | # CONFIG_I2C_VIAPRO is not set |
1179 | # CONFIG_I2C_VOODOO3 is not set | 1132 | # CONFIG_I2C_VOODOO3 is not set |
1133 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
1180 | 1134 | ||
1181 | # | 1135 | # |
1182 | # Miscellaneous I2C Chip support | 1136 | # Miscellaneous I2C Chip support |
@@ -1186,19 +1140,13 @@ CONFIG_I2C_PASEMI=y | |||
1186 | # CONFIG_SENSORS_PCF8574 is not set | 1140 | # CONFIG_SENSORS_PCF8574 is not set |
1187 | # CONFIG_PCF8575 is not set | 1141 | # CONFIG_PCF8575 is not set |
1188 | # CONFIG_SENSORS_PCF8591 is not set | 1142 | # CONFIG_SENSORS_PCF8591 is not set |
1189 | # CONFIG_TPS65010 is not set | ||
1190 | # CONFIG_SENSORS_MAX6875 is not set | 1143 | # CONFIG_SENSORS_MAX6875 is not set |
1191 | # CONFIG_SENSORS_TSL2550 is not set | 1144 | # CONFIG_SENSORS_TSL2550 is not set |
1192 | # CONFIG_I2C_DEBUG_CORE is not set | 1145 | # CONFIG_I2C_DEBUG_CORE is not set |
1193 | # CONFIG_I2C_DEBUG_ALGO is not set | 1146 | # CONFIG_I2C_DEBUG_ALGO is not set |
1194 | # CONFIG_I2C_DEBUG_BUS is not set | 1147 | # CONFIG_I2C_DEBUG_BUS is not set |
1195 | # CONFIG_I2C_DEBUG_CHIP is not set | 1148 | # CONFIG_I2C_DEBUG_CHIP is not set |
1196 | |||
1197 | # | ||
1198 | # SPI support | ||
1199 | # | ||
1200 | # CONFIG_SPI is not set | 1149 | # CONFIG_SPI is not set |
1201 | # CONFIG_SPI_MASTER is not set | ||
1202 | # CONFIG_W1 is not set | 1150 | # CONFIG_W1 is not set |
1203 | # CONFIG_POWER_SUPPLY is not set | 1151 | # CONFIG_POWER_SUPPLY is not set |
1204 | # CONFIG_HWMON is not set | 1152 | # CONFIG_HWMON is not set |
@@ -1215,12 +1163,22 @@ CONFIG_SSB_POSSIBLE=y | |||
1215 | # Multifunction device drivers | 1163 | # Multifunction device drivers |
1216 | # | 1164 | # |
1217 | # CONFIG_MFD_SM501 is not set | 1165 | # CONFIG_MFD_SM501 is not set |
1166 | # CONFIG_HTC_PASIC3 is not set | ||
1218 | 1167 | ||
1219 | # | 1168 | # |
1220 | # Multimedia devices | 1169 | # Multimedia devices |
1221 | # | 1170 | # |
1171 | |||
1172 | # | ||
1173 | # Multimedia core support | ||
1174 | # | ||
1222 | # CONFIG_VIDEO_DEV is not set | 1175 | # CONFIG_VIDEO_DEV is not set |
1223 | # CONFIG_DVB_CORE is not set | 1176 | # CONFIG_DVB_CORE is not set |
1177 | # CONFIG_VIDEO_MEDIA is not set | ||
1178 | |||
1179 | # | ||
1180 | # Multimedia drivers | ||
1181 | # | ||
1224 | # CONFIG_DAB is not set | 1182 | # CONFIG_DAB is not set |
1225 | 1183 | ||
1226 | # | 1184 | # |
@@ -1240,8 +1198,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
1240 | # CONFIG_FB_SYS_FILLRECT is not set | 1198 | # CONFIG_FB_SYS_FILLRECT is not set |
1241 | # CONFIG_FB_SYS_COPYAREA is not set | 1199 | # CONFIG_FB_SYS_COPYAREA is not set |
1242 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 1200 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
1201 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
1243 | # CONFIG_FB_SYS_FOPS is not set | 1202 | # CONFIG_FB_SYS_FOPS is not set |
1244 | CONFIG_FB_DEFERRED_IO=y | ||
1245 | # CONFIG_FB_SVGALIB is not set | 1203 | # CONFIG_FB_SVGALIB is not set |
1246 | CONFIG_FB_MACMODES=y | 1204 | CONFIG_FB_MACMODES=y |
1247 | CONFIG_FB_BACKLIGHT=y | 1205 | CONFIG_FB_BACKLIGHT=y |
@@ -1363,6 +1321,7 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1363 | # CONFIG_SND_AU8810 is not set | 1321 | # CONFIG_SND_AU8810 is not set |
1364 | # CONFIG_SND_AU8820 is not set | 1322 | # CONFIG_SND_AU8820 is not set |
1365 | # CONFIG_SND_AU8830 is not set | 1323 | # CONFIG_SND_AU8830 is not set |
1324 | # CONFIG_SND_AW2 is not set | ||
1366 | # CONFIG_SND_AZT3328 is not set | 1325 | # CONFIG_SND_AZT3328 is not set |
1367 | # CONFIG_SND_BT87X is not set | 1326 | # CONFIG_SND_BT87X is not set |
1368 | # CONFIG_SND_CA0106 is not set | 1327 | # CONFIG_SND_CA0106 is not set |
@@ -1455,11 +1414,11 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m | |||
1455 | # CONFIG_SND_SOC is not set | 1414 | # CONFIG_SND_SOC is not set |
1456 | 1415 | ||
1457 | # | 1416 | # |
1458 | # SoC Audio support for SuperH | 1417 | # ALSA SoC audio for Freescale SOCs |
1459 | # | 1418 | # |
1460 | 1419 | ||
1461 | # | 1420 | # |
1462 | # ALSA SoC audio for Freescale SOCs | 1421 | # SoC Audio for the Texas Instruments OMAP |
1463 | # | 1422 | # |
1464 | 1423 | ||
1465 | # | 1424 | # |
@@ -1497,12 +1456,14 @@ CONFIG_USB_DEVICE_CLASS=y | |||
1497 | # | 1456 | # |
1498 | # USB Host Controller Drivers | 1457 | # USB Host Controller Drivers |
1499 | # | 1458 | # |
1459 | # CONFIG_USB_C67X00_HCD is not set | ||
1500 | CONFIG_USB_EHCI_HCD=y | 1460 | CONFIG_USB_EHCI_HCD=y |
1501 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1461 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1502 | CONFIG_USB_EHCI_TT_NEWSCHED=y | 1462 | CONFIG_USB_EHCI_TT_NEWSCHED=y |
1503 | CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y | 1463 | CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y |
1504 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 1464 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
1505 | # CONFIG_USB_ISP116X_HCD is not set | 1465 | # CONFIG_USB_ISP116X_HCD is not set |
1466 | # CONFIG_USB_ISP1760_HCD is not set | ||
1506 | CONFIG_USB_OHCI_HCD=y | 1467 | CONFIG_USB_OHCI_HCD=y |
1507 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1468 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1508 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1469 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1538,6 +1499,7 @@ CONFIG_USB_STORAGE=m | |||
1538 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1499 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1539 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1500 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1540 | # CONFIG_USB_STORAGE_KARMA is not set | 1501 | # CONFIG_USB_STORAGE_KARMA is not set |
1502 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1541 | # CONFIG_USB_LIBUSUAL is not set | 1503 | # CONFIG_USB_LIBUSUAL is not set |
1542 | 1504 | ||
1543 | # | 1505 | # |
@@ -1579,6 +1541,7 @@ CONFIG_USB_APPLEDISPLAY=m | |||
1579 | # CONFIG_MMC is not set | 1541 | # CONFIG_MMC is not set |
1580 | # CONFIG_MEMSTICK is not set | 1542 | # CONFIG_MEMSTICK is not set |
1581 | # CONFIG_NEW_LEDS is not set | 1543 | # CONFIG_NEW_LEDS is not set |
1544 | # CONFIG_ACCESSIBILITY is not set | ||
1582 | CONFIG_INFINIBAND=m | 1545 | CONFIG_INFINIBAND=m |
1583 | # CONFIG_INFINIBAND_USER_MAD is not set | 1546 | # CONFIG_INFINIBAND_USER_MAD is not set |
1584 | # CONFIG_INFINIBAND_USER_ACCESS is not set | 1547 | # CONFIG_INFINIBAND_USER_ACCESS is not set |
@@ -1607,10 +1570,6 @@ CONFIG_EDAC_PASEMI=y | |||
1607 | # CONFIG_EDAC_CELL is not set | 1570 | # CONFIG_EDAC_CELL is not set |
1608 | CONFIG_RTC_LIB=y | 1571 | CONFIG_RTC_LIB=y |
1609 | CONFIG_RTC_CLASS=y | 1572 | CONFIG_RTC_CLASS=y |
1610 | |||
1611 | # | ||
1612 | # Conflicting RTC option has been selected, check GEN_RTC and RTC | ||
1613 | # | ||
1614 | CONFIG_RTC_HCTOSYS=y | 1573 | CONFIG_RTC_HCTOSYS=y |
1615 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | 1574 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" |
1616 | # CONFIG_RTC_DEBUG is not set | 1575 | # CONFIG_RTC_DEBUG is not set |
@@ -1659,10 +1618,6 @@ CONFIG_RTC_DRV_DS1307=y | |||
1659 | # on-CPU RTC drivers | 1618 | # on-CPU RTC drivers |
1660 | # | 1619 | # |
1661 | # CONFIG_DMADEVICES is not set | 1620 | # CONFIG_DMADEVICES is not set |
1662 | |||
1663 | # | ||
1664 | # Userspace I/O | ||
1665 | # | ||
1666 | # CONFIG_UIO is not set | 1621 | # CONFIG_UIO is not set |
1667 | 1622 | ||
1668 | # | 1623 | # |
@@ -1696,9 +1651,9 @@ CONFIG_JFS_SECURITY=y | |||
1696 | CONFIG_FS_POSIX_ACL=y | 1651 | CONFIG_FS_POSIX_ACL=y |
1697 | CONFIG_XFS_FS=m | 1652 | CONFIG_XFS_FS=m |
1698 | # CONFIG_XFS_QUOTA is not set | 1653 | # CONFIG_XFS_QUOTA is not set |
1699 | CONFIG_XFS_SECURITY=y | ||
1700 | CONFIG_XFS_POSIX_ACL=y | 1654 | CONFIG_XFS_POSIX_ACL=y |
1701 | # CONFIG_XFS_RT is not set | 1655 | # CONFIG_XFS_RT is not set |
1656 | # CONFIG_XFS_DEBUG is not set | ||
1702 | # CONFIG_GFS2_FS is not set | 1657 | # CONFIG_GFS2_FS is not set |
1703 | # CONFIG_OCFS2_FS is not set | 1658 | # CONFIG_OCFS2_FS is not set |
1704 | CONFIG_DNOTIFY=y | 1659 | CONFIG_DNOTIFY=y |
@@ -1764,13 +1719,11 @@ CONFIG_NFS_FS=y | |||
1764 | CONFIG_NFS_V3=y | 1719 | CONFIG_NFS_V3=y |
1765 | CONFIG_NFS_V3_ACL=y | 1720 | CONFIG_NFS_V3_ACL=y |
1766 | CONFIG_NFS_V4=y | 1721 | CONFIG_NFS_V4=y |
1767 | # CONFIG_NFS_DIRECTIO is not set | ||
1768 | CONFIG_NFSD=m | 1722 | CONFIG_NFSD=m |
1769 | CONFIG_NFSD_V2_ACL=y | 1723 | CONFIG_NFSD_V2_ACL=y |
1770 | CONFIG_NFSD_V3=y | 1724 | CONFIG_NFSD_V3=y |
1771 | CONFIG_NFSD_V3_ACL=y | 1725 | CONFIG_NFSD_V3_ACL=y |
1772 | CONFIG_NFSD_V4=y | 1726 | CONFIG_NFSD_V4=y |
1773 | CONFIG_NFSD_TCP=y | ||
1774 | CONFIG_ROOT_NFS=y | 1727 | CONFIG_ROOT_NFS=y |
1775 | CONFIG_LOCKD=y | 1728 | CONFIG_LOCKD=y |
1776 | CONFIG_LOCKD_V4=y | 1729 | CONFIG_LOCKD_V4=y |
@@ -1862,9 +1815,10 @@ CONFIG_NLS_UTF8=m | |||
1862 | # Library routines | 1815 | # Library routines |
1863 | # | 1816 | # |
1864 | CONFIG_BITREVERSE=y | 1817 | CONFIG_BITREVERSE=y |
1818 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1865 | CONFIG_CRC_CCITT=m | 1819 | CONFIG_CRC_CCITT=m |
1866 | # CONFIG_CRC16 is not set | 1820 | # CONFIG_CRC16 is not set |
1867 | # CONFIG_CRC_ITU_T is not set | 1821 | CONFIG_CRC_ITU_T=m |
1868 | CONFIG_CRC32=y | 1822 | CONFIG_CRC32=y |
1869 | # CONFIG_CRC7 is not set | 1823 | # CONFIG_CRC7 is not set |
1870 | CONFIG_LIBCRC32C=m | 1824 | CONFIG_LIBCRC32C=m |
@@ -1888,6 +1842,7 @@ CONFIG_HAVE_LMB=y | |||
1888 | # CONFIG_PRINTK_TIME is not set | 1842 | # CONFIG_PRINTK_TIME is not set |
1889 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1843 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1890 | CONFIG_ENABLE_MUST_CHECK=y | 1844 | CONFIG_ENABLE_MUST_CHECK=y |
1845 | CONFIG_FRAME_WARN=2048 | ||
1891 | CONFIG_MAGIC_SYSRQ=y | 1846 | CONFIG_MAGIC_SYSRQ=y |
1892 | # CONFIG_UNUSED_SYMBOLS is not set | 1847 | # CONFIG_UNUSED_SYMBOLS is not set |
1893 | CONFIG_DEBUG_FS=y | 1848 | CONFIG_DEBUG_FS=y |
@@ -1898,18 +1853,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1898 | CONFIG_SCHED_DEBUG=y | 1853 | CONFIG_SCHED_DEBUG=y |
1899 | # CONFIG_SCHEDSTATS is not set | 1854 | # CONFIG_SCHEDSTATS is not set |
1900 | # CONFIG_TIMER_STATS is not set | 1855 | # CONFIG_TIMER_STATS is not set |
1856 | # CONFIG_DEBUG_OBJECTS is not set | ||
1901 | # CONFIG_SLUB_DEBUG_ON is not set | 1857 | # CONFIG_SLUB_DEBUG_ON is not set |
1902 | # CONFIG_SLUB_STATS is not set | 1858 | # CONFIG_SLUB_STATS is not set |
1903 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1859 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1904 | # CONFIG_RT_MUTEX_TESTER is not set | 1860 | # CONFIG_RT_MUTEX_TESTER is not set |
1905 | # CONFIG_DEBUG_SPINLOCK is not set | 1861 | # CONFIG_DEBUG_SPINLOCK is not set |
1906 | CONFIG_DEBUG_MUTEXES=y | 1862 | CONFIG_DEBUG_MUTEXES=y |
1863 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1864 | # CONFIG_PROVE_LOCKING is not set | ||
1865 | # CONFIG_LOCK_STAT is not set | ||
1907 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1866 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1908 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1867 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1909 | # CONFIG_DEBUG_KOBJECT is not set | 1868 | # CONFIG_DEBUG_KOBJECT is not set |
1910 | CONFIG_DEBUG_BUGVERBOSE=y | 1869 | CONFIG_DEBUG_BUGVERBOSE=y |
1911 | # CONFIG_DEBUG_INFO is not set | 1870 | # CONFIG_DEBUG_INFO is not set |
1912 | # CONFIG_DEBUG_VM is not set | 1871 | # CONFIG_DEBUG_VM is not set |
1872 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1913 | # CONFIG_DEBUG_LIST is not set | 1873 | # CONFIG_DEBUG_LIST is not set |
1914 | # CONFIG_DEBUG_SG is not set | 1874 | # CONFIG_DEBUG_SG is not set |
1915 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1875 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1941,53 +1901,83 @@ CONFIG_ASYNC_CORE=y | |||
1941 | CONFIG_ASYNC_MEMCPY=y | 1901 | CONFIG_ASYNC_MEMCPY=y |
1942 | CONFIG_ASYNC_XOR=y | 1902 | CONFIG_ASYNC_XOR=y |
1943 | CONFIG_CRYPTO=y | 1903 | CONFIG_CRYPTO=y |
1904 | |||
1905 | # | ||
1906 | # Crypto core or helper | ||
1907 | # | ||
1944 | CONFIG_CRYPTO_ALGAPI=y | 1908 | CONFIG_CRYPTO_ALGAPI=y |
1945 | CONFIG_CRYPTO_AEAD=m | 1909 | CONFIG_CRYPTO_AEAD=m |
1946 | CONFIG_CRYPTO_BLKCIPHER=y | 1910 | CONFIG_CRYPTO_BLKCIPHER=y |
1947 | CONFIG_CRYPTO_SEQIV=m | ||
1948 | CONFIG_CRYPTO_HASH=y | 1911 | CONFIG_CRYPTO_HASH=y |
1949 | CONFIG_CRYPTO_MANAGER=y | 1912 | CONFIG_CRYPTO_MANAGER=y |
1913 | CONFIG_CRYPTO_GF128MUL=m | ||
1914 | CONFIG_CRYPTO_NULL=m | ||
1915 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1916 | CONFIG_CRYPTO_AUTHENC=m | ||
1917 | CONFIG_CRYPTO_TEST=m | ||
1918 | |||
1919 | # | ||
1920 | # Authenticated Encryption with Associated Data | ||
1921 | # | ||
1922 | CONFIG_CRYPTO_CCM=m | ||
1923 | CONFIG_CRYPTO_GCM=m | ||
1924 | CONFIG_CRYPTO_SEQIV=m | ||
1925 | |||
1926 | # | ||
1927 | # Block modes | ||
1928 | # | ||
1929 | CONFIG_CRYPTO_CBC=y | ||
1930 | CONFIG_CRYPTO_CTR=m | ||
1931 | # CONFIG_CRYPTO_CTS is not set | ||
1932 | CONFIG_CRYPTO_ECB=m | ||
1933 | # CONFIG_CRYPTO_LRW is not set | ||
1934 | CONFIG_CRYPTO_PCBC=m | ||
1935 | # CONFIG_CRYPTO_XTS is not set | ||
1936 | |||
1937 | # | ||
1938 | # Hash modes | ||
1939 | # | ||
1950 | CONFIG_CRYPTO_HMAC=y | 1940 | CONFIG_CRYPTO_HMAC=y |
1951 | # CONFIG_CRYPTO_XCBC is not set | 1941 | # CONFIG_CRYPTO_XCBC is not set |
1952 | CONFIG_CRYPTO_NULL=m | 1942 | |
1943 | # | ||
1944 | # Digest | ||
1945 | # | ||
1946 | CONFIG_CRYPTO_CRC32C=m | ||
1953 | CONFIG_CRYPTO_MD4=m | 1947 | CONFIG_CRYPTO_MD4=m |
1954 | CONFIG_CRYPTO_MD5=y | 1948 | CONFIG_CRYPTO_MD5=y |
1949 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1955 | CONFIG_CRYPTO_SHA1=m | 1950 | CONFIG_CRYPTO_SHA1=m |
1956 | CONFIG_CRYPTO_SHA256=m | 1951 | CONFIG_CRYPTO_SHA256=m |
1957 | CONFIG_CRYPTO_SHA512=m | 1952 | CONFIG_CRYPTO_SHA512=m |
1958 | CONFIG_CRYPTO_WP512=m | ||
1959 | CONFIG_CRYPTO_TGR192=m | 1953 | CONFIG_CRYPTO_TGR192=m |
1960 | CONFIG_CRYPTO_GF128MUL=m | 1954 | CONFIG_CRYPTO_WP512=m |
1961 | CONFIG_CRYPTO_ECB=m | 1955 | |
1962 | CONFIG_CRYPTO_CBC=y | 1956 | # |
1963 | CONFIG_CRYPTO_PCBC=m | 1957 | # Ciphers |
1964 | # CONFIG_CRYPTO_LRW is not set | 1958 | # |
1965 | # CONFIG_CRYPTO_XTS is not set | ||
1966 | CONFIG_CRYPTO_CTR=m | ||
1967 | CONFIG_CRYPTO_GCM=m | ||
1968 | CONFIG_CRYPTO_CCM=m | ||
1969 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1970 | CONFIG_CRYPTO_DES=y | ||
1971 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1972 | CONFIG_CRYPTO_BLOWFISH=m | ||
1973 | CONFIG_CRYPTO_TWOFISH=m | ||
1974 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1975 | CONFIG_CRYPTO_SERPENT=m | ||
1976 | CONFIG_CRYPTO_AES=m | 1959 | CONFIG_CRYPTO_AES=m |
1960 | CONFIG_CRYPTO_ANUBIS=m | ||
1961 | CONFIG_CRYPTO_ARC4=m | ||
1962 | CONFIG_CRYPTO_BLOWFISH=m | ||
1963 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1977 | CONFIG_CRYPTO_CAST5=m | 1964 | CONFIG_CRYPTO_CAST5=m |
1978 | CONFIG_CRYPTO_CAST6=m | 1965 | CONFIG_CRYPTO_CAST6=m |
1979 | CONFIG_CRYPTO_TEA=m | 1966 | CONFIG_CRYPTO_DES=y |
1980 | CONFIG_CRYPTO_ARC4=m | 1967 | # CONFIG_CRYPTO_FCRYPT is not set |
1981 | CONFIG_CRYPTO_KHAZAD=m | 1968 | CONFIG_CRYPTO_KHAZAD=m |
1982 | CONFIG_CRYPTO_ANUBIS=m | ||
1983 | # CONFIG_CRYPTO_SEED is not set | ||
1984 | CONFIG_CRYPTO_SALSA20=m | 1969 | CONFIG_CRYPTO_SALSA20=m |
1970 | # CONFIG_CRYPTO_SEED is not set | ||
1971 | CONFIG_CRYPTO_SERPENT=m | ||
1972 | CONFIG_CRYPTO_TEA=m | ||
1973 | CONFIG_CRYPTO_TWOFISH=m | ||
1974 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1975 | |||
1976 | # | ||
1977 | # Compression | ||
1978 | # | ||
1985 | CONFIG_CRYPTO_DEFLATE=m | 1979 | CONFIG_CRYPTO_DEFLATE=m |
1986 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1987 | CONFIG_CRYPTO_CRC32C=m | ||
1988 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1989 | CONFIG_CRYPTO_TEST=m | ||
1990 | CONFIG_CRYPTO_AUTHENC=m | ||
1991 | CONFIG_CRYPTO_LZO=m | 1980 | CONFIG_CRYPTO_LZO=m |
1992 | # CONFIG_CRYPTO_HW is not set | 1981 | # CONFIG_CRYPTO_HW is not set |
1993 | # CONFIG_PPC_CLOCK is not set | 1982 | # CONFIG_PPC_CLOCK is not set |
1983 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 3e2593c60b12..adaa05fb0478 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Thu Mar 27 13:56:28 2008 | 4 | # Tue May 20 20:03:28 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
30 | CONFIG_GENERIC_HARDIRQS=y | 30 | CONFIG_GENERIC_HARDIRQS=y |
31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
32 | CONFIG_IRQ_PER_CPU=y | 32 | CONFIG_IRQ_PER_CPU=y |
33 | CONFIG_STACKTRACE_SUPPORT=y | ||
34 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
35 | CONFIG_LOCKDEP_SUPPORT=y | ||
33 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
34 | CONFIG_ARCH_HAS_ILOG2_U32=y | 37 | CONFIG_ARCH_HAS_ILOG2_U32=y |
35 | CONFIG_ARCH_HAS_ILOG2_U64=y | 38 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -81,6 +84,7 @@ CONFIG_LOG_BUF_SHIFT=17 | |||
81 | CONFIG_CGROUPS=y | 84 | CONFIG_CGROUPS=y |
82 | # CONFIG_CGROUP_DEBUG is not set | 85 | # CONFIG_CGROUP_DEBUG is not set |
83 | CONFIG_CGROUP_NS=y | 86 | CONFIG_CGROUP_NS=y |
87 | CONFIG_CGROUP_DEVICE=y | ||
84 | CONFIG_CPUSETS=y | 88 | CONFIG_CPUSETS=y |
85 | # CONFIG_GROUP_SCHED is not set | 89 | # CONFIG_GROUP_SCHED is not set |
86 | CONFIG_CGROUP_CPUACCT=y | 90 | CONFIG_CGROUP_CPUACCT=y |
@@ -100,6 +104,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
100 | CONFIG_SYSCTL=y | 104 | CONFIG_SYSCTL=y |
101 | # CONFIG_EMBEDDED is not set | 105 | # CONFIG_EMBEDDED is not set |
102 | CONFIG_SYSCTL_SYSCALL=y | 106 | CONFIG_SYSCTL_SYSCALL=y |
107 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
103 | CONFIG_KALLSYMS=y | 108 | CONFIG_KALLSYMS=y |
104 | CONFIG_KALLSYMS_ALL=y | 109 | CONFIG_KALLSYMS_ALL=y |
105 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 110 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -107,6 +112,7 @@ CONFIG_HOTPLUG=y | |||
107 | CONFIG_PRINTK=y | 112 | CONFIG_PRINTK=y |
108 | CONFIG_BUG=y | 113 | CONFIG_BUG=y |
109 | CONFIG_ELF_CORE=y | 114 | CONFIG_ELF_CORE=y |
115 | CONFIG_PCSPKR_PLATFORM=y | ||
110 | # CONFIG_COMPAT_BRK is not set | 116 | # CONFIG_COMPAT_BRK is not set |
111 | CONFIG_BASE_FULL=y | 117 | CONFIG_BASE_FULL=y |
112 | CONFIG_FUTEX=y | 118 | CONFIG_FUTEX=y |
@@ -129,12 +135,14 @@ CONFIG_KPROBES=y | |||
129 | CONFIG_KRETPROBES=y | 135 | CONFIG_KRETPROBES=y |
130 | CONFIG_HAVE_KPROBES=y | 136 | CONFIG_HAVE_KPROBES=y |
131 | CONFIG_HAVE_KRETPROBES=y | 137 | CONFIG_HAVE_KRETPROBES=y |
138 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
132 | CONFIG_PROC_PAGE_MONITOR=y | 139 | CONFIG_PROC_PAGE_MONITOR=y |
133 | CONFIG_SLABINFO=y | 140 | CONFIG_SLABINFO=y |
134 | CONFIG_RT_MUTEXES=y | 141 | CONFIG_RT_MUTEXES=y |
135 | # CONFIG_TINY_SHMEM is not set | 142 | # CONFIG_TINY_SHMEM is not set |
136 | CONFIG_BASE_SMALL=0 | 143 | CONFIG_BASE_SMALL=0 |
137 | CONFIG_MODULES=y | 144 | CONFIG_MODULES=y |
145 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
138 | CONFIG_MODULE_UNLOAD=y | 146 | CONFIG_MODULE_UNLOAD=y |
139 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 147 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
140 | CONFIG_MODVERSIONS=y | 148 | CONFIG_MODVERSIONS=y |
@@ -178,11 +186,11 @@ CONFIG_LPARCFG=y | |||
178 | # CONFIG_PPC_PMAC is not set | 186 | # CONFIG_PPC_PMAC is not set |
179 | # CONFIG_PPC_MAPLE is not set | 187 | # CONFIG_PPC_MAPLE is not set |
180 | # CONFIG_PPC_PASEMI is not set | 188 | # CONFIG_PPC_PASEMI is not set |
181 | # CONFIG_PPC_CELLEB is not set | ||
182 | # CONFIG_PPC_PS3 is not set | 189 | # CONFIG_PPC_PS3 is not set |
183 | # CONFIG_PPC_CELL is not set | 190 | # CONFIG_PPC_CELL is not set |
184 | # CONFIG_PPC_CELL_NATIVE is not set | 191 | # CONFIG_PPC_CELL_NATIVE is not set |
185 | # CONFIG_PPC_IBM_CELL_BLADE is not set | 192 | # CONFIG_PPC_IBM_CELL_BLADE is not set |
193 | # CONFIG_PPC_CELLEB is not set | ||
186 | # CONFIG_PQ2ADS is not set | 194 | # CONFIG_PQ2ADS is not set |
187 | CONFIG_PPC_NATIVE=y | 195 | CONFIG_PPC_NATIVE=y |
188 | # CONFIG_UDBG_RTAS_CONSOLE is not set | 196 | # CONFIG_UDBG_RTAS_CONSOLE is not set |
@@ -225,7 +233,6 @@ CONFIG_PREEMPT_NONE=y | |||
225 | CONFIG_BINFMT_ELF=y | 233 | CONFIG_BINFMT_ELF=y |
226 | CONFIG_COMPAT_BINFMT_ELF=y | 234 | CONFIG_COMPAT_BINFMT_ELF=y |
227 | CONFIG_BINFMT_MISC=m | 235 | CONFIG_BINFMT_MISC=m |
228 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
229 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 236 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
230 | CONFIG_IOMMU_VMERGE=y | 237 | CONFIG_IOMMU_VMERGE=y |
231 | CONFIG_IOMMU_HELPER=y | 238 | CONFIG_IOMMU_HELPER=y |
@@ -255,6 +262,7 @@ CONFIG_SPARSEMEM_EXTREME=y | |||
255 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 262 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
256 | CONFIG_SPARSEMEM_VMEMMAP=y | 263 | CONFIG_SPARSEMEM_VMEMMAP=y |
257 | # CONFIG_MEMORY_HOTPLUG is not set | 264 | # CONFIG_MEMORY_HOTPLUG is not set |
265 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
258 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 266 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
259 | CONFIG_MIGRATION=y | 267 | CONFIG_MIGRATION=y |
260 | CONFIG_RESOURCES_64BIT=y | 268 | CONFIG_RESOURCES_64BIT=y |
@@ -263,6 +271,7 @@ CONFIG_BOUNCE=y | |||
263 | CONFIG_NODES_SPAN_OTHER_NODES=y | 271 | CONFIG_NODES_SPAN_OTHER_NODES=y |
264 | # CONFIG_PPC_HAS_HASH_64K is not set | 272 | # CONFIG_PPC_HAS_HASH_64K is not set |
265 | # CONFIG_PPC_64K_PAGES is not set | 273 | # CONFIG_PPC_64K_PAGES is not set |
274 | CONFIG_FORCE_MAX_ZONEORDER=13 | ||
266 | CONFIG_SCHED_SMT=y | 275 | CONFIG_SCHED_SMT=y |
267 | CONFIG_PROC_DEVICETREE=y | 276 | CONFIG_PROC_DEVICETREE=y |
268 | # CONFIG_CMDLINE_BOOL is not set | 277 | # CONFIG_CMDLINE_BOOL is not set |
@@ -291,7 +300,10 @@ CONFIG_HOTPLUG_PCI=m | |||
291 | # CONFIG_HOTPLUG_PCI_SHPC is not set | 300 | # CONFIG_HOTPLUG_PCI_SHPC is not set |
292 | CONFIG_HOTPLUG_PCI_RPA=m | 301 | CONFIG_HOTPLUG_PCI_RPA=m |
293 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m | 302 | CONFIG_HOTPLUG_PCI_RPA_DLPAR=m |
303 | # CONFIG_HAS_RAPIDIO is not set | ||
304 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
294 | CONFIG_KERNEL_START=0xc000000000000000 | 305 | CONFIG_KERNEL_START=0xc000000000000000 |
306 | CONFIG_PHYSICAL_START=0x00000000 | ||
295 | 307 | ||
296 | # | 308 | # |
297 | # Networking | 309 | # Networking |
@@ -338,8 +350,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
338 | # CONFIG_TCP_MD5SIG is not set | 350 | # CONFIG_TCP_MD5SIG is not set |
339 | # CONFIG_IP_VS is not set | 351 | # CONFIG_IP_VS is not set |
340 | # CONFIG_IPV6 is not set | 352 | # CONFIG_IPV6 is not set |
341 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
342 | # CONFIG_INET6_TUNNEL is not set | ||
343 | # CONFIG_NETWORK_SECMARK is not set | 353 | # CONFIG_NETWORK_SECMARK is not set |
344 | CONFIG_NETFILTER=y | 354 | CONFIG_NETFILTER=y |
345 | # CONFIG_NETFILTER_DEBUG is not set | 355 | # CONFIG_NETFILTER_DEBUG is not set |
@@ -355,6 +365,7 @@ CONFIG_NF_CONNTRACK=m | |||
355 | CONFIG_NF_CT_ACCT=y | 365 | CONFIG_NF_CT_ACCT=y |
356 | CONFIG_NF_CONNTRACK_MARK=y | 366 | CONFIG_NF_CONNTRACK_MARK=y |
357 | CONFIG_NF_CONNTRACK_EVENTS=y | 367 | CONFIG_NF_CONNTRACK_EVENTS=y |
368 | # CONFIG_NF_CT_PROTO_DCCP is not set | ||
358 | # CONFIG_NF_CT_PROTO_SCTP is not set | 369 | # CONFIG_NF_CT_PROTO_SCTP is not set |
359 | CONFIG_NF_CT_PROTO_UDPLITE=m | 370 | CONFIG_NF_CT_PROTO_UDPLITE=m |
360 | # CONFIG_NF_CONNTRACK_AMANDA is not set | 371 | # CONFIG_NF_CONNTRACK_AMANDA is not set |
@@ -426,6 +437,7 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m | |||
426 | CONFIG_IP_NF_TARGET_REDIRECT=m | 437 | CONFIG_IP_NF_TARGET_REDIRECT=m |
427 | CONFIG_IP_NF_TARGET_NETMAP=m | 438 | CONFIG_IP_NF_TARGET_NETMAP=m |
428 | CONFIG_NF_NAT_SNMP_BASIC=m | 439 | CONFIG_NF_NAT_SNMP_BASIC=m |
440 | CONFIG_NF_NAT_PROTO_UDPLITE=m | ||
429 | CONFIG_NF_NAT_FTP=m | 441 | CONFIG_NF_NAT_FTP=m |
430 | CONFIG_NF_NAT_IRC=m | 442 | CONFIG_NF_NAT_IRC=m |
431 | CONFIG_NF_NAT_TFTP=m | 443 | CONFIG_NF_NAT_TFTP=m |
@@ -492,6 +504,7 @@ CONFIG_FW_LOADER=y | |||
492 | # CONFIG_CONNECTOR is not set | 504 | # CONFIG_CONNECTOR is not set |
493 | # CONFIG_MTD is not set | 505 | # CONFIG_MTD is not set |
494 | CONFIG_OF_DEVICE=y | 506 | CONFIG_OF_DEVICE=y |
507 | CONFIG_OF_I2C=y | ||
495 | CONFIG_PARPORT=m | 508 | CONFIG_PARPORT=m |
496 | CONFIG_PARPORT_PC=m | 509 | CONFIG_PARPORT_PC=m |
497 | # CONFIG_PARPORT_SERIAL is not set | 510 | # CONFIG_PARPORT_SERIAL is not set |
@@ -545,7 +558,6 @@ CONFIG_IDE_PROC_FS=y | |||
545 | # | 558 | # |
546 | # IDE chipset support/bugfixes | 559 | # IDE chipset support/bugfixes |
547 | # | 560 | # |
548 | CONFIG_IDE_GENERIC=y | ||
549 | # CONFIG_BLK_DEV_PLATFORM is not set | 561 | # CONFIG_BLK_DEV_PLATFORM is not set |
550 | CONFIG_BLK_DEV_IDEDMA_SFF=y | 562 | CONFIG_BLK_DEV_IDEDMA_SFF=y |
551 | 563 | ||
@@ -584,7 +596,7 @@ CONFIG_BLK_DEV_AMD74XX=y | |||
584 | # CONFIG_BLK_DEV_VIA82CXXX is not set | 596 | # CONFIG_BLK_DEV_VIA82CXXX is not set |
585 | # CONFIG_BLK_DEV_TC86C001 is not set | 597 | # CONFIG_BLK_DEV_TC86C001 is not set |
586 | CONFIG_BLK_DEV_IDEDMA=y | 598 | CONFIG_BLK_DEV_IDEDMA=y |
587 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 599 | # CONFIG_BLK_DEV_HD_ONLY is not set |
588 | # CONFIG_BLK_DEV_HD is not set | 600 | # CONFIG_BLK_DEV_HD is not set |
589 | 601 | ||
590 | # | 602 | # |
@@ -671,61 +683,10 @@ CONFIG_SCSI_LPFC=m | |||
671 | # CONFIG_SCSI_SRP is not set | 683 | # CONFIG_SCSI_SRP is not set |
672 | CONFIG_ATA=y | 684 | CONFIG_ATA=y |
673 | # CONFIG_ATA_NONSTANDARD is not set | 685 | # CONFIG_ATA_NONSTANDARD is not set |
686 | CONFIG_SATA_PMP=y | ||
674 | # CONFIG_SATA_AHCI is not set | 687 | # CONFIG_SATA_AHCI is not set |
675 | # CONFIG_SATA_SVW is not set | ||
676 | # CONFIG_ATA_PIIX is not set | ||
677 | # CONFIG_SATA_MV is not set | ||
678 | # CONFIG_SATA_NV is not set | ||
679 | # CONFIG_PDC_ADMA is not set | ||
680 | # CONFIG_SATA_QSTOR is not set | ||
681 | # CONFIG_SATA_PROMISE is not set | ||
682 | # CONFIG_SATA_SX4 is not set | ||
683 | # CONFIG_SATA_SIL is not set | ||
684 | # CONFIG_SATA_SIL24 is not set | 688 | # CONFIG_SATA_SIL24 is not set |
685 | # CONFIG_SATA_SIS is not set | 689 | # CONFIG_ATA_SFF is not set |
686 | # CONFIG_SATA_ULI is not set | ||
687 | # CONFIG_SATA_VIA is not set | ||
688 | # CONFIG_SATA_VITESSE is not set | ||
689 | # CONFIG_SATA_INIC162X is not set | ||
690 | # CONFIG_PATA_ALI is not set | ||
691 | # CONFIG_PATA_AMD is not set | ||
692 | # CONFIG_PATA_ARTOP is not set | ||
693 | # CONFIG_PATA_ATIIXP is not set | ||
694 | # CONFIG_PATA_CMD640_PCI is not set | ||
695 | # CONFIG_PATA_CMD64X is not set | ||
696 | # CONFIG_PATA_CS5520 is not set | ||
697 | # CONFIG_PATA_CS5530 is not set | ||
698 | # CONFIG_PATA_CYPRESS is not set | ||
699 | # CONFIG_PATA_EFAR is not set | ||
700 | # CONFIG_ATA_GENERIC is not set | ||
701 | # CONFIG_PATA_HPT366 is not set | ||
702 | # CONFIG_PATA_HPT37X is not set | ||
703 | # CONFIG_PATA_HPT3X2N is not set | ||
704 | # CONFIG_PATA_HPT3X3 is not set | ||
705 | # CONFIG_PATA_IT821X is not set | ||
706 | # CONFIG_PATA_IT8213 is not set | ||
707 | # CONFIG_PATA_JMICRON is not set | ||
708 | # CONFIG_PATA_TRIFLEX is not set | ||
709 | # CONFIG_PATA_MARVELL is not set | ||
710 | # CONFIG_PATA_MPIIX is not set | ||
711 | # CONFIG_PATA_OLDPIIX is not set | ||
712 | # CONFIG_PATA_NETCELL is not set | ||
713 | # CONFIG_PATA_NINJA32 is not set | ||
714 | # CONFIG_PATA_NS87410 is not set | ||
715 | # CONFIG_PATA_NS87415 is not set | ||
716 | # CONFIG_PATA_OPTI is not set | ||
717 | # CONFIG_PATA_OPTIDMA is not set | ||
718 | # CONFIG_PATA_PDC_OLD is not set | ||
719 | # CONFIG_PATA_RADISYS is not set | ||
720 | # CONFIG_PATA_RZ1000 is not set | ||
721 | # CONFIG_PATA_SC1200 is not set | ||
722 | # CONFIG_PATA_SERVERWORKS is not set | ||
723 | # CONFIG_PATA_PDC2027X is not set | ||
724 | # CONFIG_PATA_SIL680 is not set | ||
725 | # CONFIG_PATA_SIS is not set | ||
726 | # CONFIG_PATA_VIA is not set | ||
727 | CONFIG_PATA_WINBOND=y | ||
728 | # CONFIG_PATA_PLATFORM is not set | ||
729 | CONFIG_MD=y | 690 | CONFIG_MD=y |
730 | CONFIG_BLK_DEV_MD=y | 691 | CONFIG_BLK_DEV_MD=y |
731 | CONFIG_MD_LINEAR=y | 692 | CONFIG_MD_LINEAR=y |
@@ -783,7 +744,6 @@ CONFIG_IBMVETH=y | |||
783 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 744 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
784 | CONFIG_NET_PCI=y | 745 | CONFIG_NET_PCI=y |
785 | CONFIG_PCNET32=y | 746 | CONFIG_PCNET32=y |
786 | # CONFIG_PCNET32_NAPI is not set | ||
787 | # CONFIG_AMD8111_ETH is not set | 747 | # CONFIG_AMD8111_ETH is not set |
788 | # CONFIG_ADAPTEC_STARFIRE is not set | 748 | # CONFIG_ADAPTEC_STARFIRE is not set |
789 | # CONFIG_B44 is not set | 749 | # CONFIG_B44 is not set |
@@ -820,7 +780,6 @@ CONFIG_E1000=y | |||
820 | # CONFIG_SIS190 is not set | 780 | # CONFIG_SIS190 is not set |
821 | # CONFIG_SKGE is not set | 781 | # CONFIG_SKGE is not set |
822 | # CONFIG_SKY2 is not set | 782 | # CONFIG_SKY2 is not set |
823 | # CONFIG_SK98LIN is not set | ||
824 | # CONFIG_VIA_VELOCITY is not set | 783 | # CONFIG_VIA_VELOCITY is not set |
825 | CONFIG_TIGON3=y | 784 | CONFIG_TIGON3=y |
826 | # CONFIG_BNX2 is not set | 785 | # CONFIG_BNX2 is not set |
@@ -829,7 +788,6 @@ CONFIG_TIGON3=y | |||
829 | CONFIG_NETDEV_10000=y | 788 | CONFIG_NETDEV_10000=y |
830 | # CONFIG_CHELSIO_T1 is not set | 789 | # CONFIG_CHELSIO_T1 is not set |
831 | # CONFIG_CHELSIO_T3 is not set | 790 | # CONFIG_CHELSIO_T3 is not set |
832 | CONFIG_EHEA=m | ||
833 | # CONFIG_IXGBE is not set | 791 | # CONFIG_IXGBE is not set |
834 | CONFIG_IXGB=m | 792 | CONFIG_IXGB=m |
835 | # CONFIG_IXGB_NAPI is not set | 793 | # CONFIG_IXGB_NAPI is not set |
@@ -838,10 +796,10 @@ CONFIG_S2IO=m | |||
838 | # CONFIG_MYRI10GE is not set | 796 | # CONFIG_MYRI10GE is not set |
839 | # CONFIG_NETXEN_NIC is not set | 797 | # CONFIG_NETXEN_NIC is not set |
840 | # CONFIG_NIU is not set | 798 | # CONFIG_NIU is not set |
841 | # CONFIG_PASEMI_MAC is not set | ||
842 | # CONFIG_MLX4_CORE is not set | 799 | # CONFIG_MLX4_CORE is not set |
843 | # CONFIG_TEHUTI is not set | 800 | # CONFIG_TEHUTI is not set |
844 | # CONFIG_BNX2X is not set | 801 | # CONFIG_BNX2X is not set |
802 | # CONFIG_SFC is not set | ||
845 | CONFIG_TR=y | 803 | CONFIG_TR=y |
846 | CONFIG_IBMOL=y | 804 | CONFIG_IBMOL=y |
847 | # CONFIG_3C359 is not set | 805 | # CONFIG_3C359 is not set |
@@ -852,6 +810,7 @@ CONFIG_IBMOL=y | |||
852 | # | 810 | # |
853 | # CONFIG_WLAN_PRE80211 is not set | 811 | # CONFIG_WLAN_PRE80211 is not set |
854 | # CONFIG_WLAN_80211 is not set | 812 | # CONFIG_WLAN_80211 is not set |
813 | # CONFIG_IWLWIFI_LEDS is not set | ||
855 | 814 | ||
856 | # | 815 | # |
857 | # USB Network Adapters | 816 | # USB Network Adapters |
@@ -956,6 +915,7 @@ CONFIG_VT=y | |||
956 | CONFIG_VT_CONSOLE=y | 915 | CONFIG_VT_CONSOLE=y |
957 | CONFIG_HW_CONSOLE=y | 916 | CONFIG_HW_CONSOLE=y |
958 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 917 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
918 | CONFIG_DEVKMEM=y | ||
959 | # CONFIG_SERIAL_NONSTANDARD is not set | 919 | # CONFIG_SERIAL_NONSTANDARD is not set |
960 | # CONFIG_NOZOMI is not set | 920 | # CONFIG_NOZOMI is not set |
961 | 921 | ||
@@ -1000,13 +960,7 @@ CONFIG_DEVPORT=y | |||
1000 | CONFIG_I2C=y | 960 | CONFIG_I2C=y |
1001 | CONFIG_I2C_BOARDINFO=y | 961 | CONFIG_I2C_BOARDINFO=y |
1002 | # CONFIG_I2C_CHARDEV is not set | 962 | # CONFIG_I2C_CHARDEV is not set |
1003 | |||
1004 | # | ||
1005 | # I2C Algorithms | ||
1006 | # | ||
1007 | CONFIG_I2C_ALGOBIT=y | 963 | CONFIG_I2C_ALGOBIT=y |
1008 | # CONFIG_I2C_ALGOPCF is not set | ||
1009 | # CONFIG_I2C_ALGOPCA is not set | ||
1010 | 964 | ||
1011 | # | 965 | # |
1012 | # I2C Hardware Bus support | 966 | # I2C Hardware Bus support |
@@ -1035,6 +989,7 @@ CONFIG_I2C_ALGOBIT=y | |||
1035 | # CONFIG_I2C_VIA is not set | 989 | # CONFIG_I2C_VIA is not set |
1036 | # CONFIG_I2C_VIAPRO is not set | 990 | # CONFIG_I2C_VIAPRO is not set |
1037 | # CONFIG_I2C_VOODOO3 is not set | 991 | # CONFIG_I2C_VOODOO3 is not set |
992 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
1038 | 993 | ||
1039 | # | 994 | # |
1040 | # Miscellaneous I2C Chip support | 995 | # Miscellaneous I2C Chip support |
@@ -1044,19 +999,13 @@ CONFIG_I2C_ALGOBIT=y | |||
1044 | # CONFIG_SENSORS_PCF8574 is not set | 999 | # CONFIG_SENSORS_PCF8574 is not set |
1045 | # CONFIG_PCF8575 is not set | 1000 | # CONFIG_PCF8575 is not set |
1046 | # CONFIG_SENSORS_PCF8591 is not set | 1001 | # CONFIG_SENSORS_PCF8591 is not set |
1047 | # CONFIG_TPS65010 is not set | ||
1048 | # CONFIG_SENSORS_MAX6875 is not set | 1002 | # CONFIG_SENSORS_MAX6875 is not set |
1049 | # CONFIG_SENSORS_TSL2550 is not set | 1003 | # CONFIG_SENSORS_TSL2550 is not set |
1050 | # CONFIG_I2C_DEBUG_CORE is not set | 1004 | # CONFIG_I2C_DEBUG_CORE is not set |
1051 | # CONFIG_I2C_DEBUG_ALGO is not set | 1005 | # CONFIG_I2C_DEBUG_ALGO is not set |
1052 | # CONFIG_I2C_DEBUG_BUS is not set | 1006 | # CONFIG_I2C_DEBUG_BUS is not set |
1053 | # CONFIG_I2C_DEBUG_CHIP is not set | 1007 | # CONFIG_I2C_DEBUG_CHIP is not set |
1054 | |||
1055 | # | ||
1056 | # SPI support | ||
1057 | # | ||
1058 | # CONFIG_SPI is not set | 1008 | # CONFIG_SPI is not set |
1059 | # CONFIG_SPI_MASTER is not set | ||
1060 | # CONFIG_W1 is not set | 1009 | # CONFIG_W1 is not set |
1061 | # CONFIG_POWER_SUPPLY is not set | 1010 | # CONFIG_POWER_SUPPLY is not set |
1062 | # CONFIG_HWMON is not set | 1011 | # CONFIG_HWMON is not set |
@@ -1073,12 +1022,22 @@ CONFIG_SSB_POSSIBLE=y | |||
1073 | # Multifunction device drivers | 1022 | # Multifunction device drivers |
1074 | # | 1023 | # |
1075 | # CONFIG_MFD_SM501 is not set | 1024 | # CONFIG_MFD_SM501 is not set |
1025 | # CONFIG_HTC_PASIC3 is not set | ||
1076 | 1026 | ||
1077 | # | 1027 | # |
1078 | # Multimedia devices | 1028 | # Multimedia devices |
1079 | # | 1029 | # |
1030 | |||
1031 | # | ||
1032 | # Multimedia core support | ||
1033 | # | ||
1080 | # CONFIG_VIDEO_DEV is not set | 1034 | # CONFIG_VIDEO_DEV is not set |
1081 | # CONFIG_DVB_CORE is not set | 1035 | # CONFIG_DVB_CORE is not set |
1036 | # CONFIG_VIDEO_MEDIA is not set | ||
1037 | |||
1038 | # | ||
1039 | # Multimedia drivers | ||
1040 | # | ||
1082 | # CONFIG_DAB is not set | 1041 | # CONFIG_DAB is not set |
1083 | 1042 | ||
1084 | # | 1043 | # |
@@ -1098,8 +1057,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
1098 | # CONFIG_FB_SYS_FILLRECT is not set | 1057 | # CONFIG_FB_SYS_FILLRECT is not set |
1099 | # CONFIG_FB_SYS_COPYAREA is not set | 1058 | # CONFIG_FB_SYS_COPYAREA is not set |
1100 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 1059 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
1060 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
1101 | # CONFIG_FB_SYS_FOPS is not set | 1061 | # CONFIG_FB_SYS_FOPS is not set |
1102 | CONFIG_FB_DEFERRED_IO=y | ||
1103 | # CONFIG_FB_SVGALIB is not set | 1062 | # CONFIG_FB_SVGALIB is not set |
1104 | CONFIG_FB_MACMODES=y | 1063 | CONFIG_FB_MACMODES=y |
1105 | CONFIG_FB_BACKLIGHT=y | 1064 | CONFIG_FB_BACKLIGHT=y |
@@ -1209,11 +1168,13 @@ CONFIG_USB_DEVICE_CLASS=y | |||
1209 | # | 1168 | # |
1210 | # USB Host Controller Drivers | 1169 | # USB Host Controller Drivers |
1211 | # | 1170 | # |
1171 | # CONFIG_USB_C67X00_HCD is not set | ||
1212 | CONFIG_USB_EHCI_HCD=y | 1172 | CONFIG_USB_EHCI_HCD=y |
1213 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1173 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1214 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1174 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1215 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 1175 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
1216 | # CONFIG_USB_ISP116X_HCD is not set | 1176 | # CONFIG_USB_ISP116X_HCD is not set |
1177 | # CONFIG_USB_ISP1760_HCD is not set | ||
1217 | CONFIG_USB_OHCI_HCD=y | 1178 | CONFIG_USB_OHCI_HCD=y |
1218 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1179 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1219 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1180 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1247,7 +1208,9 @@ CONFIG_USB_STORAGE=y | |||
1247 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1208 | # CONFIG_USB_STORAGE_SDDR55 is not set |
1248 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | 1209 | # CONFIG_USB_STORAGE_JUMPSHOT is not set |
1249 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1210 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1211 | CONFIG_USB_STORAGE_ONETOUCH=y | ||
1250 | # CONFIG_USB_STORAGE_KARMA is not set | 1212 | # CONFIG_USB_STORAGE_KARMA is not set |
1213 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1251 | # CONFIG_USB_LIBUSUAL is not set | 1214 | # CONFIG_USB_LIBUSUAL is not set |
1252 | 1215 | ||
1253 | # | 1216 | # |
@@ -1290,6 +1253,7 @@ CONFIG_USB_MON=y | |||
1290 | # CONFIG_MMC is not set | 1253 | # CONFIG_MMC is not set |
1291 | # CONFIG_MEMSTICK is not set | 1254 | # CONFIG_MEMSTICK is not set |
1292 | # CONFIG_NEW_LEDS is not set | 1255 | # CONFIG_NEW_LEDS is not set |
1256 | # CONFIG_ACCESSIBILITY is not set | ||
1293 | CONFIG_INFINIBAND=m | 1257 | CONFIG_INFINIBAND=m |
1294 | CONFIG_INFINIBAND_USER_MAD=m | 1258 | CONFIG_INFINIBAND_USER_MAD=m |
1295 | CONFIG_INFINIBAND_USER_ACCESS=m | 1259 | CONFIG_INFINIBAND_USER_ACCESS=m |
@@ -1312,10 +1276,6 @@ CONFIG_INFINIBAND_SRP=m | |||
1312 | # CONFIG_RTC_CLASS is not set | 1276 | # CONFIG_RTC_CLASS is not set |
1313 | # CONFIG_DMADEVICES is not set | 1277 | # CONFIG_DMADEVICES is not set |
1314 | # CONFIG_AUXDISPLAY is not set | 1278 | # CONFIG_AUXDISPLAY is not set |
1315 | |||
1316 | # | ||
1317 | # Userspace I/O | ||
1318 | # | ||
1319 | # CONFIG_UIO is not set | 1279 | # CONFIG_UIO is not set |
1320 | 1280 | ||
1321 | # | 1281 | # |
@@ -1349,11 +1309,12 @@ CONFIG_JFS_SECURITY=y | |||
1349 | CONFIG_FS_POSIX_ACL=y | 1309 | CONFIG_FS_POSIX_ACL=y |
1350 | CONFIG_XFS_FS=m | 1310 | CONFIG_XFS_FS=m |
1351 | # CONFIG_XFS_QUOTA is not set | 1311 | # CONFIG_XFS_QUOTA is not set |
1352 | CONFIG_XFS_SECURITY=y | ||
1353 | CONFIG_XFS_POSIX_ACL=y | 1312 | CONFIG_XFS_POSIX_ACL=y |
1354 | # CONFIG_XFS_RT is not set | 1313 | # CONFIG_XFS_RT is not set |
1314 | # CONFIG_XFS_DEBUG is not set | ||
1355 | # CONFIG_GFS2_FS is not set | 1315 | # CONFIG_GFS2_FS is not set |
1356 | CONFIG_OCFS2_FS=m | 1316 | CONFIG_OCFS2_FS=m |
1317 | CONFIG_OCFS2_FS_O2CB=m | ||
1357 | CONFIG_OCFS2_DEBUG_MASKLOG=y | 1318 | CONFIG_OCFS2_DEBUG_MASKLOG=y |
1358 | # CONFIG_OCFS2_DEBUG_FS is not set | 1319 | # CONFIG_OCFS2_DEBUG_FS is not set |
1359 | CONFIG_DNOTIFY=y | 1320 | CONFIG_DNOTIFY=y |
@@ -1419,13 +1380,11 @@ CONFIG_NFS_FS=y | |||
1419 | CONFIG_NFS_V3=y | 1380 | CONFIG_NFS_V3=y |
1420 | CONFIG_NFS_V3_ACL=y | 1381 | CONFIG_NFS_V3_ACL=y |
1421 | CONFIG_NFS_V4=y | 1382 | CONFIG_NFS_V4=y |
1422 | # CONFIG_NFS_DIRECTIO is not set | ||
1423 | CONFIG_NFSD=y | 1383 | CONFIG_NFSD=y |
1424 | CONFIG_NFSD_V2_ACL=y | 1384 | CONFIG_NFSD_V2_ACL=y |
1425 | CONFIG_NFSD_V3=y | 1385 | CONFIG_NFSD_V3=y |
1426 | CONFIG_NFSD_V3_ACL=y | 1386 | CONFIG_NFSD_V3_ACL=y |
1427 | CONFIG_NFSD_V4=y | 1387 | CONFIG_NFSD_V4=y |
1428 | CONFIG_NFSD_TCP=y | ||
1429 | CONFIG_LOCKD=y | 1388 | CONFIG_LOCKD=y |
1430 | CONFIG_LOCKD_V4=y | 1389 | CONFIG_LOCKD_V4=y |
1431 | CONFIG_EXPORTFS=y | 1390 | CONFIG_EXPORTFS=y |
@@ -1500,9 +1459,10 @@ CONFIG_NLS_ISO8859_1=y | |||
1500 | # Library routines | 1459 | # Library routines |
1501 | # | 1460 | # |
1502 | CONFIG_BITREVERSE=y | 1461 | CONFIG_BITREVERSE=y |
1462 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1503 | CONFIG_CRC_CCITT=m | 1463 | CONFIG_CRC_CCITT=m |
1504 | # CONFIG_CRC16 is not set | 1464 | # CONFIG_CRC16 is not set |
1505 | # CONFIG_CRC_ITU_T is not set | 1465 | CONFIG_CRC_ITU_T=m |
1506 | CONFIG_CRC32=y | 1466 | CONFIG_CRC32=y |
1507 | # CONFIG_CRC7 is not set | 1467 | # CONFIG_CRC7 is not set |
1508 | CONFIG_LIBCRC32C=m | 1468 | CONFIG_LIBCRC32C=m |
@@ -1526,6 +1486,7 @@ CONFIG_HAVE_LMB=y | |||
1526 | # CONFIG_PRINTK_TIME is not set | 1486 | # CONFIG_PRINTK_TIME is not set |
1527 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1487 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1528 | CONFIG_ENABLE_MUST_CHECK=y | 1488 | CONFIG_ENABLE_MUST_CHECK=y |
1489 | CONFIG_FRAME_WARN=2048 | ||
1529 | CONFIG_MAGIC_SYSRQ=y | 1490 | CONFIG_MAGIC_SYSRQ=y |
1530 | # CONFIG_UNUSED_SYMBOLS is not set | 1491 | # CONFIG_UNUSED_SYMBOLS is not set |
1531 | CONFIG_DEBUG_FS=y | 1492 | CONFIG_DEBUG_FS=y |
@@ -1536,18 +1497,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1536 | CONFIG_SCHED_DEBUG=y | 1497 | CONFIG_SCHED_DEBUG=y |
1537 | # CONFIG_SCHEDSTATS is not set | 1498 | # CONFIG_SCHEDSTATS is not set |
1538 | # CONFIG_TIMER_STATS is not set | 1499 | # CONFIG_TIMER_STATS is not set |
1500 | # CONFIG_DEBUG_OBJECTS is not set | ||
1539 | # CONFIG_SLUB_DEBUG_ON is not set | 1501 | # CONFIG_SLUB_DEBUG_ON is not set |
1540 | # CONFIG_SLUB_STATS is not set | 1502 | # CONFIG_SLUB_STATS is not set |
1541 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1503 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1542 | # CONFIG_RT_MUTEX_TESTER is not set | 1504 | # CONFIG_RT_MUTEX_TESTER is not set |
1543 | # CONFIG_DEBUG_SPINLOCK is not set | 1505 | # CONFIG_DEBUG_SPINLOCK is not set |
1544 | # CONFIG_DEBUG_MUTEXES is not set | 1506 | # CONFIG_DEBUG_MUTEXES is not set |
1507 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1508 | # CONFIG_PROVE_LOCKING is not set | ||
1509 | # CONFIG_LOCK_STAT is not set | ||
1545 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1510 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1546 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1511 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1547 | # CONFIG_DEBUG_KOBJECT is not set | 1512 | # CONFIG_DEBUG_KOBJECT is not set |
1548 | CONFIG_DEBUG_BUGVERBOSE=y | 1513 | CONFIG_DEBUG_BUGVERBOSE=y |
1549 | # CONFIG_DEBUG_INFO is not set | 1514 | # CONFIG_DEBUG_INFO is not set |
1550 | # CONFIG_DEBUG_VM is not set | 1515 | # CONFIG_DEBUG_VM is not set |
1516 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1551 | # CONFIG_DEBUG_LIST is not set | 1517 | # CONFIG_DEBUG_LIST is not set |
1552 | # CONFIG_DEBUG_SG is not set | 1518 | # CONFIG_DEBUG_SG is not set |
1553 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1519 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1577,53 +1543,83 @@ CONFIG_VIRQ_DEBUG=y | |||
1577 | # CONFIG_SECURITY is not set | 1543 | # CONFIG_SECURITY is not set |
1578 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1544 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1579 | CONFIG_CRYPTO=y | 1545 | CONFIG_CRYPTO=y |
1546 | |||
1547 | # | ||
1548 | # Crypto core or helper | ||
1549 | # | ||
1580 | CONFIG_CRYPTO_ALGAPI=y | 1550 | CONFIG_CRYPTO_ALGAPI=y |
1581 | CONFIG_CRYPTO_AEAD=m | 1551 | CONFIG_CRYPTO_AEAD=m |
1582 | CONFIG_CRYPTO_BLKCIPHER=y | 1552 | CONFIG_CRYPTO_BLKCIPHER=y |
1583 | CONFIG_CRYPTO_SEQIV=m | ||
1584 | CONFIG_CRYPTO_HASH=y | 1553 | CONFIG_CRYPTO_HASH=y |
1585 | CONFIG_CRYPTO_MANAGER=y | 1554 | CONFIG_CRYPTO_MANAGER=y |
1555 | CONFIG_CRYPTO_GF128MUL=m | ||
1556 | CONFIG_CRYPTO_NULL=m | ||
1557 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1558 | CONFIG_CRYPTO_AUTHENC=m | ||
1559 | CONFIG_CRYPTO_TEST=m | ||
1560 | |||
1561 | # | ||
1562 | # Authenticated Encryption with Associated Data | ||
1563 | # | ||
1564 | CONFIG_CRYPTO_CCM=m | ||
1565 | CONFIG_CRYPTO_GCM=m | ||
1566 | CONFIG_CRYPTO_SEQIV=m | ||
1567 | |||
1568 | # | ||
1569 | # Block modes | ||
1570 | # | ||
1571 | CONFIG_CRYPTO_CBC=y | ||
1572 | CONFIG_CRYPTO_CTR=m | ||
1573 | # CONFIG_CRYPTO_CTS is not set | ||
1574 | CONFIG_CRYPTO_ECB=m | ||
1575 | # CONFIG_CRYPTO_LRW is not set | ||
1576 | CONFIG_CRYPTO_PCBC=m | ||
1577 | # CONFIG_CRYPTO_XTS is not set | ||
1578 | |||
1579 | # | ||
1580 | # Hash modes | ||
1581 | # | ||
1586 | CONFIG_CRYPTO_HMAC=y | 1582 | CONFIG_CRYPTO_HMAC=y |
1587 | # CONFIG_CRYPTO_XCBC is not set | 1583 | # CONFIG_CRYPTO_XCBC is not set |
1588 | CONFIG_CRYPTO_NULL=m | 1584 | |
1585 | # | ||
1586 | # Digest | ||
1587 | # | ||
1588 | CONFIG_CRYPTO_CRC32C=m | ||
1589 | CONFIG_CRYPTO_MD4=m | 1589 | CONFIG_CRYPTO_MD4=m |
1590 | CONFIG_CRYPTO_MD5=y | 1590 | CONFIG_CRYPTO_MD5=y |
1591 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1591 | CONFIG_CRYPTO_SHA1=m | 1592 | CONFIG_CRYPTO_SHA1=m |
1592 | CONFIG_CRYPTO_SHA256=m | 1593 | CONFIG_CRYPTO_SHA256=m |
1593 | CONFIG_CRYPTO_SHA512=m | 1594 | CONFIG_CRYPTO_SHA512=m |
1594 | CONFIG_CRYPTO_WP512=m | ||
1595 | CONFIG_CRYPTO_TGR192=m | 1595 | CONFIG_CRYPTO_TGR192=m |
1596 | CONFIG_CRYPTO_GF128MUL=m | 1596 | CONFIG_CRYPTO_WP512=m |
1597 | CONFIG_CRYPTO_ECB=m | 1597 | |
1598 | CONFIG_CRYPTO_CBC=y | 1598 | # |
1599 | CONFIG_CRYPTO_PCBC=m | 1599 | # Ciphers |
1600 | # CONFIG_CRYPTO_LRW is not set | 1600 | # |
1601 | # CONFIG_CRYPTO_XTS is not set | ||
1602 | CONFIG_CRYPTO_CTR=m | ||
1603 | CONFIG_CRYPTO_GCM=m | ||
1604 | CONFIG_CRYPTO_CCM=m | ||
1605 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1606 | CONFIG_CRYPTO_DES=y | ||
1607 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1608 | CONFIG_CRYPTO_BLOWFISH=m | ||
1609 | CONFIG_CRYPTO_TWOFISH=m | ||
1610 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1611 | CONFIG_CRYPTO_SERPENT=m | ||
1612 | CONFIG_CRYPTO_AES=m | 1601 | CONFIG_CRYPTO_AES=m |
1602 | CONFIG_CRYPTO_ANUBIS=m | ||
1603 | CONFIG_CRYPTO_ARC4=m | ||
1604 | CONFIG_CRYPTO_BLOWFISH=m | ||
1605 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1613 | CONFIG_CRYPTO_CAST5=m | 1606 | CONFIG_CRYPTO_CAST5=m |
1614 | CONFIG_CRYPTO_CAST6=m | 1607 | CONFIG_CRYPTO_CAST6=m |
1615 | CONFIG_CRYPTO_TEA=m | 1608 | CONFIG_CRYPTO_DES=y |
1616 | CONFIG_CRYPTO_ARC4=m | 1609 | # CONFIG_CRYPTO_FCRYPT is not set |
1617 | CONFIG_CRYPTO_KHAZAD=m | 1610 | CONFIG_CRYPTO_KHAZAD=m |
1618 | CONFIG_CRYPTO_ANUBIS=m | ||
1619 | # CONFIG_CRYPTO_SEED is not set | ||
1620 | CONFIG_CRYPTO_SALSA20=m | 1611 | CONFIG_CRYPTO_SALSA20=m |
1612 | # CONFIG_CRYPTO_SEED is not set | ||
1613 | CONFIG_CRYPTO_SERPENT=m | ||
1614 | CONFIG_CRYPTO_TEA=m | ||
1615 | CONFIG_CRYPTO_TWOFISH=m | ||
1616 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1617 | |||
1618 | # | ||
1619 | # Compression | ||
1620 | # | ||
1621 | CONFIG_CRYPTO_DEFLATE=m | 1621 | CONFIG_CRYPTO_DEFLATE=m |
1622 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1623 | CONFIG_CRYPTO_CRC32C=m | ||
1624 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1625 | CONFIG_CRYPTO_TEST=m | ||
1626 | CONFIG_CRYPTO_AUTHENC=m | ||
1627 | CONFIG_CRYPTO_LZO=m | 1622 | CONFIG_CRYPTO_LZO=m |
1628 | # CONFIG_CRYPTO_HW is not set | 1623 | # CONFIG_CRYPTO_HW is not set |
1629 | # CONFIG_PPC_CLOCK is not set | 1624 | # CONFIG_PPC_CLOCK is not set |
1625 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c index 941043ae040f..4c85b8d56478 100644 --- a/arch/powerpc/kernel/init_task.c +++ b/arch/powerpc/kernel/init_task.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <asm/uaccess.h> | 8 | #include <asm/uaccess.h> |
9 | 9 | ||
10 | static struct fs_struct init_fs = INIT_FS; | 10 | static struct fs_struct init_fs = INIT_FS; |
11 | static struct files_struct init_files = INIT_FILES; | ||
12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 11 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 12 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
14 | struct mm_struct init_mm = INIT_MM(init_mm); | 13 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 52750745edfd..30eedfc5a566 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -189,7 +189,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
189 | 189 | ||
190 | dev->cfg_size = pci_cfg_space_size(dev); | 190 | dev->cfg_size = pci_cfg_space_size(dev); |
191 | 191 | ||
192 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 192 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
193 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 193 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
194 | dev->class = get_int_prop(node, "class-code", 0); | 194 | dev->class = get_int_prop(node, "class-code", 0); |
195 | dev->revision = get_int_prop(node, "revision-id", 0); | 195 | dev->revision = get_int_prop(node, "revision-id", 0); |
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 8e24fc1821e8..31729a9387df 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh | |||
@@ -20,7 +20,7 @@ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush | |||
20 | _end enter_prom memcpy memset reloc_offset __secondary_hold | 20 | _end enter_prom memcpy memset reloc_offset __secondary_hold |
21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start | 21 | __secondary_hold_acknowledge __secondary_hold_spinloop __start |
22 | strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 | 22 | strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 |
23 | reloc_got2" | 23 | reloc_got2 kernstart_addr" |
24 | 24 | ||
25 | NM="$1" | 25 | NM="$1" |
26 | OBJ="$2" | 26 | OBJ="$2" |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index faeb8f207ea4..da7c058e3731 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -87,6 +87,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
87 | #ifdef CONFIG_ALTIVEC | 87 | #ifdef CONFIG_ALTIVEC |
88 | elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 15) & ~0xful); | 88 | elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 15) & ~0xful); |
89 | #endif | 89 | #endif |
90 | unsigned long msr = regs->msr; | ||
90 | long err = 0; | 91 | long err = 0; |
91 | 92 | ||
92 | flush_fp_to_thread(current); | 93 | flush_fp_to_thread(current); |
@@ -102,7 +103,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
102 | /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg) | 103 | /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg) |
103 | * contains valid data. | 104 | * contains valid data. |
104 | */ | 105 | */ |
105 | regs->msr |= MSR_VEC; | 106 | msr |= MSR_VEC; |
106 | } | 107 | } |
107 | /* We always copy to/from vrsave, it's 0 if we don't have or don't | 108 | /* We always copy to/from vrsave, it's 0 if we don't have or don't |
108 | * use altivec. | 109 | * use altivec. |
@@ -114,6 +115,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, | |||
114 | err |= __put_user(&sc->gp_regs, &sc->regs); | 115 | err |= __put_user(&sc->gp_regs, &sc->regs); |
115 | WARN_ON(!FULL_REGS(regs)); | 116 | WARN_ON(!FULL_REGS(regs)); |
116 | err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); | 117 | err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); |
118 | err |= __put_user(msr, &sc->gp_regs[PT_MSR]); | ||
117 | err |= __copy_to_user(&sc->fp_regs, ¤t->thread.fpr, FP_REGS_SIZE); | 119 | err |= __copy_to_user(&sc->fp_regs, ¤t->thread.fpr, FP_REGS_SIZE); |
118 | err |= __put_user(signr, &sc->signal); | 120 | err |= __put_user(signr, &sc->signal); |
119 | err |= __put_user(handler, &sc->handler); | 121 | err |= __put_user(handler, &sc->handler); |
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c index f5d7a5eab96e..75dff7cfa814 100644 --- a/arch/powerpc/kvm/44x_tlb.c +++ b/arch/powerpc/kvm/44x_tlb.c | |||
@@ -116,8 +116,6 @@ static void kvmppc_44x_shadow_release(struct kvm_vcpu *vcpu, | |||
116 | struct tlbe *stlbe = &vcpu->arch.shadow_tlb[index]; | 116 | struct tlbe *stlbe = &vcpu->arch.shadow_tlb[index]; |
117 | struct page *page = vcpu->arch.shadow_pages[index]; | 117 | struct page *page = vcpu->arch.shadow_pages[index]; |
118 | 118 | ||
119 | kunmap(vcpu->arch.shadow_pages[index]); | ||
120 | |||
121 | if (get_tlb_v(stlbe)) { | 119 | if (get_tlb_v(stlbe)) { |
122 | if (kvmppc_44x_tlbe_is_writable(stlbe)) | 120 | if (kvmppc_44x_tlbe_is_writable(stlbe)) |
123 | kvm_release_page_dirty(page); | 121 | kvm_release_page_dirty(page); |
@@ -144,18 +142,19 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, u64 asid, | |||
144 | stlbe = &vcpu->arch.shadow_tlb[victim]; | 142 | stlbe = &vcpu->arch.shadow_tlb[victim]; |
145 | 143 | ||
146 | /* Get reference to new page. */ | 144 | /* Get reference to new page. */ |
147 | down_write(¤t->mm->mmap_sem); | 145 | down_read(¤t->mm->mmap_sem); |
148 | new_page = gfn_to_page(vcpu->kvm, gfn); | 146 | new_page = gfn_to_page(vcpu->kvm, gfn); |
149 | if (is_error_page(new_page)) { | 147 | if (is_error_page(new_page)) { |
150 | printk(KERN_ERR "Couldn't get guest page!\n"); | 148 | printk(KERN_ERR "Couldn't get guest page for gfn %lx!\n", gfn); |
151 | kvm_release_page_clean(new_page); | 149 | kvm_release_page_clean(new_page); |
150 | up_read(¤t->mm->mmap_sem); | ||
152 | return; | 151 | return; |
153 | } | 152 | } |
154 | hpaddr = page_to_phys(new_page); | 153 | hpaddr = page_to_phys(new_page); |
155 | 154 | ||
156 | /* Drop reference to old page. */ | 155 | /* Drop reference to old page. */ |
157 | kvmppc_44x_shadow_release(vcpu, victim); | 156 | kvmppc_44x_shadow_release(vcpu, victim); |
158 | up_write(¤t->mm->mmap_sem); | 157 | up_read(¤t->mm->mmap_sem); |
159 | 158 | ||
160 | vcpu->arch.shadow_pages[victim] = new_page; | 159 | vcpu->arch.shadow_pages[victim] = new_page; |
161 | 160 | ||
diff --git a/arch/powerpc/kvm/booke_guest.c b/arch/powerpc/kvm/booke_guest.c index 712d89a28c46..9c8ad850c6e3 100644 --- a/arch/powerpc/kvm/booke_guest.c +++ b/arch/powerpc/kvm/booke_guest.c | |||
@@ -227,39 +227,6 @@ void kvmppc_check_and_deliver_interrupts(struct kvm_vcpu *vcpu) | |||
227 | } | 227 | } |
228 | } | 228 | } |
229 | 229 | ||
230 | static int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu) | ||
231 | { | ||
232 | enum emulation_result er; | ||
233 | int r; | ||
234 | |||
235 | er = kvmppc_emulate_instruction(run, vcpu); | ||
236 | switch (er) { | ||
237 | case EMULATE_DONE: | ||
238 | /* Future optimization: only reload non-volatiles if they were | ||
239 | * actually modified. */ | ||
240 | r = RESUME_GUEST_NV; | ||
241 | break; | ||
242 | case EMULATE_DO_MMIO: | ||
243 | run->exit_reason = KVM_EXIT_MMIO; | ||
244 | /* We must reload nonvolatiles because "update" load/store | ||
245 | * instructions modify register state. */ | ||
246 | /* Future optimization: only reload non-volatiles if they were | ||
247 | * actually modified. */ | ||
248 | r = RESUME_HOST_NV; | ||
249 | break; | ||
250 | case EMULATE_FAIL: | ||
251 | /* XXX Deliver Program interrupt to guest. */ | ||
252 | printk(KERN_EMERG "%s: emulation failed (%08x)\n", __func__, | ||
253 | vcpu->arch.last_inst); | ||
254 | r = RESUME_HOST; | ||
255 | break; | ||
256 | default: | ||
257 | BUG(); | ||
258 | } | ||
259 | |||
260 | return r; | ||
261 | } | ||
262 | |||
263 | /** | 230 | /** |
264 | * kvmppc_handle_exit | 231 | * kvmppc_handle_exit |
265 | * | 232 | * |
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index a03fe0c80698..000097461283 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
246 | case 31: | 246 | case 31: |
247 | switch (get_xop(inst)) { | 247 | switch (get_xop(inst)) { |
248 | 248 | ||
249 | case 23: /* lwzx */ | ||
250 | rt = get_rt(inst); | ||
251 | emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1); | ||
252 | break; | ||
253 | |||
249 | case 83: /* mfmsr */ | 254 | case 83: /* mfmsr */ |
250 | rt = get_rt(inst); | 255 | rt = get_rt(inst); |
251 | vcpu->arch.gpr[rt] = vcpu->arch.msr; | 256 | vcpu->arch.gpr[rt] = vcpu->arch.msr; |
@@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
267 | kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); | 272 | kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); |
268 | break; | 273 | break; |
269 | 274 | ||
275 | case 151: /* stwx */ | ||
276 | rs = get_rs(inst); | ||
277 | emulated = kvmppc_handle_store(run, vcpu, | ||
278 | vcpu->arch.gpr[rs], | ||
279 | 4, 1); | ||
280 | break; | ||
281 | |||
270 | case 163: /* wrteei */ | 282 | case 163: /* wrteei */ |
271 | vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) | 283 | vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) |
272 | | (inst & MSR_EE); | 284 | | (inst & MSR_EE); |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index ddeaf9e38ad5..b9ba7d930801 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $ | ||
3 | * | ||
4 | * PowerPC version | 2 | * PowerPC version |
5 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) | 3 | * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) |
6 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP | 4 | * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index f67e118116fa..51f82d83bf14 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -151,6 +151,7 @@ out: | |||
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 153 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
154 | #endif /* CONFIG_MEMORY_HOTPLUG */ | ||
154 | 155 | ||
155 | /* | 156 | /* |
156 | * walk_memory_resource() needs to make sure there is no holes in a given | 157 | * walk_memory_resource() needs to make sure there is no holes in a given |
@@ -184,8 +185,6 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg, | |||
184 | } | 185 | } |
185 | EXPORT_SYMBOL_GPL(walk_memory_resource); | 186 | EXPORT_SYMBOL_GPL(walk_memory_resource); |
186 | 187 | ||
187 | #endif /* CONFIG_MEMORY_HOTPLUG */ | ||
188 | |||
189 | void show_mem(void) | 188 | void show_mem(void) |
190 | { | 189 | { |
191 | unsigned long total = 0, reserved = 0; | 190 | unsigned long total = 0, reserved = 0; |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 80d1babb230d..e0ff59f21135 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -402,7 +402,7 @@ void __set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) | |||
402 | return; | 402 | return; |
403 | } | 403 | } |
404 | 404 | ||
405 | map_page(address, phys, flags); | 405 | map_page(address, phys, pgprot_val(flags)); |
406 | fixmaps++; | 406 | fixmaps++; |
407 | } | 407 | } |
408 | 408 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index 48da5dfe4856..8a455ebce98d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -100,7 +100,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | |||
100 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 100 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
101 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 101 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
102 | struct mpc52xx_gpiochip, mmchip); | 102 | struct mpc52xx_gpiochip, mmchip); |
103 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | 103 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; |
104 | unsigned long flags; | 104 | unsigned long flags; |
105 | 105 | ||
106 | spin_lock_irqsave(&gpio_lock, flags); | 106 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -122,7 +122,7 @@ static int | |||
122 | mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | 122 | mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) |
123 | { | 123 | { |
124 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 124 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
125 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | 125 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; |
126 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 126 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
127 | struct mpc52xx_gpiochip, mmchip); | 127 | struct mpc52xx_gpiochip, mmchip); |
128 | unsigned long flags; | 128 | unsigned long flags; |
@@ -150,7 +150,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev, | |||
150 | const struct of_device_id *match) | 150 | const struct of_device_id *match) |
151 | { | 151 | { |
152 | struct mpc52xx_gpiochip *chip; | 152 | struct mpc52xx_gpiochip *chip; |
153 | struct mpc52xx_gpio_wkup *regs; | 153 | struct mpc52xx_gpio_wkup __iomem *regs; |
154 | struct of_gpio_chip *ofchip; | 154 | struct of_gpio_chip *ofchip; |
155 | int ret; | 155 | int ret; |
156 | 156 | ||
@@ -260,7 +260,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | |||
260 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 260 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
261 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 261 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
262 | struct mpc52xx_gpiochip, mmchip); | 262 | struct mpc52xx_gpiochip, mmchip); |
263 | struct mpc52xx_gpio *regs = mm_gc->regs; | 263 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; |
264 | unsigned long flags; | 264 | unsigned long flags; |
265 | 265 | ||
266 | spin_lock_irqsave(&gpio_lock, flags); | 266 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -284,7 +284,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | |||
284 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 284 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
285 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 285 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
286 | struct mpc52xx_gpiochip, mmchip); | 286 | struct mpc52xx_gpiochip, mmchip); |
287 | struct mpc52xx_gpio *regs = mm_gc->regs; | 287 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; |
288 | unsigned long flags; | 288 | unsigned long flags; |
289 | 289 | ||
290 | spin_lock_irqsave(&gpio_lock, flags); | 290 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -312,7 +312,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev, | |||
312 | { | 312 | { |
313 | struct mpc52xx_gpiochip *chip; | 313 | struct mpc52xx_gpiochip *chip; |
314 | struct of_gpio_chip *ofchip; | 314 | struct of_gpio_chip *ofchip; |
315 | struct mpc52xx_gpio *regs; | 315 | struct mpc52xx_gpio __iomem *regs; |
316 | int ret; | 316 | int ret; |
317 | 317 | ||
318 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 318 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
@@ -387,7 +387,7 @@ mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | |||
387 | static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | 387 | static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) |
388 | { | 388 | { |
389 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 389 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
390 | struct mpc52xx_gpt *regs = mm_gc->regs; | 390 | struct mpc52xx_gpt __iomem *regs = mm_gc->regs; |
391 | 391 | ||
392 | out_be32(®s->mode, 0x04); | 392 | out_be32(®s->mode, 0x04); |
393 | 393 | ||
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 31da84c458d2..0e04f8fb152a 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -217,7 +217,7 @@ static u##size scc_pciex_in##name(unsigned long port) \ | |||
217 | static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ | 217 | static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ |
218 | { \ | 218 | { \ |
219 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ | 219 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ |
220 | u##size *dst = b; \ | 220 | __le##size *dst = b; \ |
221 | for (; c != 0; c--, dst++) \ | 221 | for (; c != 0; c--, dst++) \ |
222 | *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ | 222 | *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ |
223 | scc_pciex_io_flush(bus); \ | 223 | scc_pciex_io_flush(bus); \ |
@@ -231,10 +231,11 @@ static void scc_pciex_outs##name(unsigned long p, const void *b, \ | |||
231 | unsigned long c) \ | 231 | unsigned long c) \ |
232 | { \ | 232 | { \ |
233 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ | 233 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ |
234 | const u##size *src = b; \ | 234 | const __le##size *src = b; \ |
235 | for (; c != 0; c--, src++) \ | 235 | for (; c != 0; c--, src++) \ |
236 | __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ | 236 | __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ |
237 | } | 237 | } |
238 | #define __le8 u8 | ||
238 | #define cpu_to_le8(x) (x) | 239 | #define cpu_to_le8(x) (x) |
239 | #define le8_to_cpu(x) (x) | 240 | #define le8_to_cpu(x) (x) |
240 | PCIEX_PIO_FUNC(8, b) | 241 | PCIEX_PIO_FUNC(8, b) |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 5b3fb2b321ab..3a58ffabccd9 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -317,6 +317,9 @@ static int __init ps3_mm_add_memory(void) | |||
317 | return result; | 317 | return result; |
318 | } | 318 | } |
319 | 319 | ||
320 | lmb_add(start_addr, map.r1.size); | ||
321 | lmb_analyze(); | ||
322 | |||
320 | result = online_pages(start_pfn, nr_pages); | 323 | result = online_pages(start_pfn, nr_pages); |
321 | 324 | ||
322 | if (result) | 325 | if (result) |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 3a7054e2bb75..019657c110b6 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -432,7 +432,7 @@ static struct i2c_driver_device i2c_devices[] __initdata = { | |||
432 | {"dallas,ds1339", "ds1339"}, | 432 | {"dallas,ds1339", "ds1339"}, |
433 | {"dallas,ds1340", "ds1340"}, | 433 | {"dallas,ds1340", "ds1340"}, |
434 | {"stm,m41t00", "m41t00"}, | 434 | {"stm,m41t00", "m41t00"}, |
435 | {"dallas,ds1374", "rtc-ds1374"}, | 435 | {"dallas,ds1374", "ds1374"}, |
436 | }; | 436 | }; |
437 | 437 | ||
438 | static int __init of_find_i2c_driver(struct device_node *node, | 438 | static int __init of_find_i2c_driver(struct device_node *node, |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 8619f2a3f1f6..7680001676a6 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1331,6 +1331,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | |||
1331 | unsigned long flags; | 1331 | unsigned long flags; |
1332 | u32 reg; | 1332 | u32 reg; |
1333 | 1333 | ||
1334 | if (!mpic) | ||
1335 | return; | ||
1336 | |||
1334 | spin_lock_irqsave(&mpic_lock, flags); | 1337 | spin_lock_irqsave(&mpic_lock, flags); |
1335 | if (is_ipi) { | 1338 | if (is_ipi) { |
1336 | reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & | 1339 | reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & |
@@ -1346,23 +1349,6 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri) | |||
1346 | spin_unlock_irqrestore(&mpic_lock, flags); | 1349 | spin_unlock_irqrestore(&mpic_lock, flags); |
1347 | } | 1350 | } |
1348 | 1351 | ||
1349 | unsigned int mpic_irq_get_priority(unsigned int irq) | ||
1350 | { | ||
1351 | unsigned int is_ipi; | ||
1352 | struct mpic *mpic = mpic_find(irq, &is_ipi); | ||
1353 | unsigned int src = mpic_irq_to_hw(irq); | ||
1354 | unsigned long flags; | ||
1355 | u32 reg; | ||
1356 | |||
1357 | spin_lock_irqsave(&mpic_lock, flags); | ||
1358 | if (is_ipi) | ||
1359 | reg = mpic_ipi_read(src = mpic->ipi_vecs[0]); | ||
1360 | else | ||
1361 | reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); | ||
1362 | spin_unlock_irqrestore(&mpic_lock, flags); | ||
1363 | return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT; | ||
1364 | } | ||
1365 | |||
1366 | void mpic_setup_this_cpu(void) | 1352 | void mpic_setup_this_cpu(void) |
1367 | { | 1353 | { |
1368 | #ifdef CONFIG_SMP | 1354 | #ifdef CONFIG_SMP |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 602c268fc8a2..5d529bcbeee9 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -60,8 +60,10 @@ long long __ashrdi3(long long, int); | |||
60 | long long __ashldi3(long long, int); | 60 | long long __ashldi3(long long, int); |
61 | long long __lshrdi3(long long, int); | 61 | long long __lshrdi3(long long, int); |
62 | 62 | ||
63 | EXPORT_SYMBOL(empty_zero_page); | ||
63 | EXPORT_SYMBOL(clear_pages); | 64 | EXPORT_SYMBOL(clear_pages); |
64 | EXPORT_SYMBOL(clear_user_page); | 65 | EXPORT_SYMBOL(clear_user_page); |
66 | EXPORT_SYMBOL(copy_page); | ||
65 | EXPORT_SYMBOL(transfer_to_handler); | 67 | EXPORT_SYMBOL(transfer_to_handler); |
66 | EXPORT_SYMBOL(do_IRQ); | 68 | EXPORT_SYMBOL(do_IRQ); |
67 | EXPORT_SYMBOL(machine_check_exception); | 69 | EXPORT_SYMBOL(machine_check_exception); |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 1d035082e78e..107e492cb47e 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -304,10 +304,14 @@ config ARCH_SPARSEMEM_ENABLE | |||
304 | def_bool y | 304 | def_bool y |
305 | select SPARSEMEM_VMEMMAP_ENABLE | 305 | select SPARSEMEM_VMEMMAP_ENABLE |
306 | select SPARSEMEM_VMEMMAP | 306 | select SPARSEMEM_VMEMMAP |
307 | select SPARSEMEM_STATIC if !64BIT | ||
307 | 308 | ||
308 | config ARCH_SPARSEMEM_DEFAULT | 309 | config ARCH_SPARSEMEM_DEFAULT |
309 | def_bool y | 310 | def_bool y |
310 | 311 | ||
312 | config ARCH_SELECT_MEMORY_MODEL | ||
313 | def_bool y | ||
314 | |||
311 | source "mm/Kconfig" | 315 | source "mm/Kconfig" |
312 | 316 | ||
313 | comment "I/O subsystem configuration" | 317 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 655d52543e2d..ad40729bec3d 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -130,6 +130,7 @@ static void appldata_work_fn(struct work_struct *work) | |||
130 | 130 | ||
131 | P_DEBUG(" -= Work Queue =-\n"); | 131 | P_DEBUG(" -= Work Queue =-\n"); |
132 | i = 0; | 132 | i = 0; |
133 | get_online_cpus(); | ||
133 | spin_lock(&appldata_ops_lock); | 134 | spin_lock(&appldata_ops_lock); |
134 | list_for_each(lh, &appldata_ops_list) { | 135 | list_for_each(lh, &appldata_ops_list) { |
135 | ops = list_entry(lh, struct appldata_ops, list); | 136 | ops = list_entry(lh, struct appldata_ops, list); |
@@ -140,6 +141,7 @@ static void appldata_work_fn(struct work_struct *work) | |||
140 | } | 141 | } |
141 | } | 142 | } |
142 | spin_unlock(&appldata_ops_lock); | 143 | spin_unlock(&appldata_ops_lock); |
144 | put_online_cpus(); | ||
143 | } | 145 | } |
144 | 146 | ||
145 | /* | 147 | /* |
@@ -266,12 +268,14 @@ appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, | |||
266 | len = *lenp; | 268 | len = *lenp; |
267 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) | 269 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) |
268 | return -EFAULT; | 270 | return -EFAULT; |
271 | get_online_cpus(); | ||
269 | spin_lock(&appldata_timer_lock); | 272 | spin_lock(&appldata_timer_lock); |
270 | if (buf[0] == '1') | 273 | if (buf[0] == '1') |
271 | __appldata_vtimer_setup(APPLDATA_ADD_TIMER); | 274 | __appldata_vtimer_setup(APPLDATA_ADD_TIMER); |
272 | else if (buf[0] == '0') | 275 | else if (buf[0] == '0') |
273 | __appldata_vtimer_setup(APPLDATA_DEL_TIMER); | 276 | __appldata_vtimer_setup(APPLDATA_DEL_TIMER); |
274 | spin_unlock(&appldata_timer_lock); | 277 | spin_unlock(&appldata_timer_lock); |
278 | put_online_cpus(); | ||
275 | out: | 279 | out: |
276 | *lenp = len; | 280 | *lenp = len; |
277 | *ppos += len; | 281 | *ppos += len; |
@@ -314,10 +318,12 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | |||
314 | return -EINVAL; | 318 | return -EINVAL; |
315 | } | 319 | } |
316 | 320 | ||
321 | get_online_cpus(); | ||
317 | spin_lock(&appldata_timer_lock); | 322 | spin_lock(&appldata_timer_lock); |
318 | appldata_interval = interval; | 323 | appldata_interval = interval; |
319 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); | 324 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); |
320 | spin_unlock(&appldata_timer_lock); | 325 | spin_unlock(&appldata_timer_lock); |
326 | put_online_cpus(); | ||
321 | 327 | ||
322 | P_INFO("Monitoring CPU interval set to %u milliseconds.\n", | 328 | P_INFO("Monitoring CPU interval set to %u milliseconds.\n", |
323 | interval); | 329 | interval); |
@@ -556,8 +562,10 @@ static int __init appldata_init(void) | |||
556 | return -ENOMEM; | 562 | return -ENOMEM; |
557 | } | 563 | } |
558 | 564 | ||
565 | get_online_cpus(); | ||
559 | for_each_online_cpu(i) | 566 | for_each_online_cpu(i) |
560 | appldata_online_cpu(i); | 567 | appldata_online_cpu(i); |
568 | put_online_cpus(); | ||
561 | 569 | ||
562 | /* Register cpu hotplug notifier */ | 570 | /* Register cpu hotplug notifier */ |
563 | register_hotcpu_notifier(&appldata_nb); | 571 | register_hotcpu_notifier(&appldata_nb); |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index aa341d0ea1e6..c5cdb975d590 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Wed Apr 30 11:07:45 2008 | 4 | # Fri May 30 09:49:33 2008 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -103,6 +103,7 @@ CONFIG_RT_MUTEXES=y | |||
103 | # CONFIG_TINY_SHMEM is not set | 103 | # CONFIG_TINY_SHMEM is not set |
104 | CONFIG_BASE_SMALL=0 | 104 | CONFIG_BASE_SMALL=0 |
105 | CONFIG_MODULES=y | 105 | CONFIG_MODULES=y |
106 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
106 | CONFIG_MODULE_UNLOAD=y | 107 | CONFIG_MODULE_UNLOAD=y |
107 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 108 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
108 | CONFIG_MODVERSIONS=y | 109 | CONFIG_MODVERSIONS=y |
@@ -173,6 +174,7 @@ CONFIG_PREEMPT=y | |||
173 | # CONFIG_PREEMPT_RCU is not set | 174 | # CONFIG_PREEMPT_RCU is not set |
174 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 175 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
175 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | 176 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y |
177 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
176 | CONFIG_SELECT_MEMORY_MODEL=y | 178 | CONFIG_SELECT_MEMORY_MODEL=y |
177 | # CONFIG_FLATMEM_MANUAL is not set | 179 | # CONFIG_FLATMEM_MANUAL is not set |
178 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 180 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -210,6 +212,7 @@ CONFIG_FORCE_MAX_ZONEORDER=9 | |||
210 | CONFIG_PFAULT=y | 212 | CONFIG_PFAULT=y |
211 | # CONFIG_SHARED_KERNEL is not set | 213 | # CONFIG_SHARED_KERNEL is not set |
212 | # CONFIG_CMM is not set | 214 | # CONFIG_CMM is not set |
215 | # CONFIG_PAGE_STATES is not set | ||
213 | CONFIG_VIRT_TIMER=y | 216 | CONFIG_VIRT_TIMER=y |
214 | CONFIG_VIRT_CPU_ACCOUNTING=y | 217 | CONFIG_VIRT_CPU_ACCOUNTING=y |
215 | # CONFIG_APPLDATA_BASE is not set | 218 | # CONFIG_APPLDATA_BASE is not set |
@@ -620,6 +623,7 @@ CONFIG_S390_VMUR=m | |||
620 | # | 623 | # |
621 | # CONFIG_MEMSTICK is not set | 624 | # CONFIG_MEMSTICK is not set |
622 | # CONFIG_NEW_LEDS is not set | 625 | # CONFIG_NEW_LEDS is not set |
626 | CONFIG_ACCESSIBILITY=y | ||
623 | 627 | ||
624 | # | 628 | # |
625 | # File systems | 629 | # File systems |
@@ -754,11 +758,12 @@ CONFIG_FRAME_WARN=2048 | |||
754 | CONFIG_MAGIC_SYSRQ=y | 758 | CONFIG_MAGIC_SYSRQ=y |
755 | # CONFIG_UNUSED_SYMBOLS is not set | 759 | # CONFIG_UNUSED_SYMBOLS is not set |
756 | CONFIG_DEBUG_FS=y | 760 | CONFIG_DEBUG_FS=y |
757 | CONFIG_HEADERS_CHECK=y | 761 | # CONFIG_HEADERS_CHECK is not set |
758 | CONFIG_DEBUG_KERNEL=y | 762 | CONFIG_DEBUG_KERNEL=y |
759 | # CONFIG_SCHED_DEBUG is not set | 763 | # CONFIG_SCHED_DEBUG is not set |
760 | # CONFIG_SCHEDSTATS is not set | 764 | # CONFIG_SCHEDSTATS is not set |
761 | # CONFIG_TIMER_STATS is not set | 765 | # CONFIG_TIMER_STATS is not set |
766 | # CONFIG_DEBUG_OBJECTS is not set | ||
762 | # CONFIG_DEBUG_SLAB is not set | 767 | # CONFIG_DEBUG_SLAB is not set |
763 | CONFIG_DEBUG_PREEMPT=y | 768 | CONFIG_DEBUG_PREEMPT=y |
764 | # CONFIG_DEBUG_RT_MUTEXES is not set | 769 | # CONFIG_DEBUG_RT_MUTEXES is not set |
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index c14a336f6300..d2f270c995d9 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -208,7 +208,7 @@ static const unsigned char formats[][7] = { | |||
208 | [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ | 208 | [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ |
209 | [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ | 209 | [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ |
210 | [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ | 210 | [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ |
211 | [INSTR_RRF_R0RR] = { 0xff, R_24,R_28,R_16,0,0,0 }, /* e.g. idte */ | 211 | [INSTR_RRF_R0RR] = { 0xff, R_24,R_16,R_28,0,0,0 }, /* e.g. idte */ |
212 | [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ | 212 | [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ |
213 | [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ | 213 | [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ |
214 | [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ | 214 | [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ |
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c index d494161b05b4..7ad003969251 100644 --- a/arch/s390/kernel/init_task.c +++ b/arch/s390/kernel/init_task.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
18 | 18 | ||
19 | static struct fs_struct init_fs = INIT_FS; | 19 | static struct fs_struct init_fs = INIT_FS; |
20 | static struct files_struct init_files = INIT_FILES; | ||
21 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 20 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
22 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 21 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
23 | struct mm_struct init_mm = INIT_MM(init_mm); | 22 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 1f4228948dc4..5d4fa4b1c74c 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -711,7 +711,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
711 | memset(sf, 0, sizeof(struct stack_frame)); | 711 | memset(sf, 0, sizeof(struct stack_frame)); |
712 | sf->gprs[9] = (unsigned long) sf; | 712 | sf->gprs[9] = (unsigned long) sf; |
713 | cpu_lowcore->save_area[15] = (unsigned long) sf; | 713 | cpu_lowcore->save_area[15] = (unsigned long) sf; |
714 | __ctl_store(cpu_lowcore->cregs_save_area[0], 0, 15); | 714 | __ctl_store(cpu_lowcore->cregs_save_area, 0, 15); |
715 | asm volatile( | 715 | asm volatile( |
716 | " stam 0,15,0(%0)" | 716 | " stam 0,15,0(%0)" |
717 | : : "a" (&cpu_lowcore->access_regs_save_area) : "memory"); | 717 | : : "a" (&cpu_lowcore->access_regs_save_area) : "memory"); |
@@ -1089,7 +1089,7 @@ out: | |||
1089 | 1089 | ||
1090 | #ifdef CONFIG_HOTPLUG_CPU | 1090 | #ifdef CONFIG_HOTPLUG_CPU |
1091 | 1091 | ||
1092 | int smp_rescan_cpus(void) | 1092 | int __ref smp_rescan_cpus(void) |
1093 | { | 1093 | { |
1094 | cpumask_t newcpus; | 1094 | cpumask_t newcpus; |
1095 | int cpu; | 1095 | int cpu; |
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index f639a152869f..a0775e1f08df 100644 --- a/arch/s390/kvm/diag.c +++ b/arch/s390/kvm/diag.c | |||
@@ -20,7 +20,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu) | |||
20 | VCPU_EVENT(vcpu, 5, "%s", "diag time slice end"); | 20 | VCPU_EVENT(vcpu, 5, "%s", "diag time slice end"); |
21 | vcpu->stat.diagnose_44++; | 21 | vcpu->stat.diagnose_44++; |
22 | vcpu_put(vcpu); | 22 | vcpu_put(vcpu); |
23 | schedule(); | 23 | yield(); |
24 | vcpu_load(vcpu); | 24 | vcpu_load(vcpu); |
25 | return 0; | 25 | return 0; |
26 | } | 26 | } |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index fcd1ed8015c1..84a7fed4cd4e 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -339,6 +339,11 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
339 | if (kvm_cpu_has_interrupt(vcpu)) | 339 | if (kvm_cpu_has_interrupt(vcpu)) |
340 | return 0; | 340 | return 0; |
341 | 341 | ||
342 | __set_cpu_idle(vcpu); | ||
343 | spin_lock_bh(&vcpu->arch.local_int.lock); | ||
344 | vcpu->arch.local_int.timer_due = 0; | ||
345 | spin_unlock_bh(&vcpu->arch.local_int.lock); | ||
346 | |||
342 | if (psw_interrupts_disabled(vcpu)) { | 347 | if (psw_interrupts_disabled(vcpu)) { |
343 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); | 348 | VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); |
344 | __unset_cpu_idle(vcpu); | 349 | __unset_cpu_idle(vcpu); |
@@ -366,8 +371,6 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
366 | no_timer: | 371 | no_timer: |
367 | spin_lock_bh(&vcpu->arch.local_int.float_int->lock); | 372 | spin_lock_bh(&vcpu->arch.local_int.float_int->lock); |
368 | spin_lock_bh(&vcpu->arch.local_int.lock); | 373 | spin_lock_bh(&vcpu->arch.local_int.lock); |
369 | __set_cpu_idle(vcpu); | ||
370 | vcpu->arch.local_int.timer_due = 0; | ||
371 | add_wait_queue(&vcpu->arch.local_int.wq, &wait); | 374 | add_wait_queue(&vcpu->arch.local_int.wq, &wait); |
372 | while (list_empty(&vcpu->arch.local_int.list) && | 375 | while (list_empty(&vcpu->arch.local_int.list) && |
373 | list_empty(&vcpu->arch.local_int.float_int->list) && | 376 | list_empty(&vcpu->arch.local_int.float_int->list) && |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0ac36a649eba..6558b09ff579 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -423,6 +423,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, | |||
423 | return -EINVAL; /* not implemented yet */ | 423 | return -EINVAL; /* not implemented yet */ |
424 | } | 424 | } |
425 | 425 | ||
426 | extern void s390_handle_mcck(void); | ||
427 | |||
426 | static void __vcpu_run(struct kvm_vcpu *vcpu) | 428 | static void __vcpu_run(struct kvm_vcpu *vcpu) |
427 | { | 429 | { |
428 | memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16); | 430 | memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16); |
@@ -430,13 +432,21 @@ static void __vcpu_run(struct kvm_vcpu *vcpu) | |||
430 | if (need_resched()) | 432 | if (need_resched()) |
431 | schedule(); | 433 | schedule(); |
432 | 434 | ||
435 | if (test_thread_flag(TIF_MCCK_PENDING)) | ||
436 | s390_handle_mcck(); | ||
437 | |||
438 | kvm_s390_deliver_pending_interrupts(vcpu); | ||
439 | |||
433 | vcpu->arch.sie_block->icptcode = 0; | 440 | vcpu->arch.sie_block->icptcode = 0; |
434 | local_irq_disable(); | 441 | local_irq_disable(); |
435 | kvm_guest_enter(); | 442 | kvm_guest_enter(); |
436 | local_irq_enable(); | 443 | local_irq_enable(); |
437 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", | 444 | VCPU_EVENT(vcpu, 6, "entering sie flags %x", |
438 | atomic_read(&vcpu->arch.sie_block->cpuflags)); | 445 | atomic_read(&vcpu->arch.sie_block->cpuflags)); |
439 | sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs); | 446 | if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) { |
447 | VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction"); | ||
448 | kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | ||
449 | } | ||
440 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", | 450 | VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", |
441 | vcpu->arch.sie_block->icptcode); | 451 | vcpu->arch.sie_block->icptcode); |
442 | local_irq_disable(); | 452 | local_irq_disable(); |
@@ -475,7 +485,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
475 | might_sleep(); | 485 | might_sleep(); |
476 | 486 | ||
477 | do { | 487 | do { |
478 | kvm_s390_deliver_pending_interrupts(vcpu); | ||
479 | __vcpu_run(vcpu); | 488 | __vcpu_run(vcpu); |
480 | rc = kvm_handle_sie_intercept(vcpu); | 489 | rc = kvm_handle_sie_intercept(vcpu); |
481 | } while (!signal_pending(current) && !rc); | 490 | } while (!signal_pending(current) && !rc); |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 29f3a63806b9..05598649b326 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -44,37 +44,34 @@ char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); | |||
44 | 44 | ||
45 | void show_mem(void) | 45 | void show_mem(void) |
46 | { | 46 | { |
47 | int i, total = 0, reserved = 0; | 47 | unsigned long i, total = 0, reserved = 0; |
48 | int shared = 0, cached = 0; | 48 | unsigned long shared = 0, cached = 0; |
49 | unsigned long flags; | ||
49 | struct page *page; | 50 | struct page *page; |
51 | pg_data_t *pgdat; | ||
50 | 52 | ||
51 | printk("Mem-info:\n"); | 53 | printk("Mem-info:\n"); |
52 | show_free_areas(); | 54 | show_free_areas(); |
53 | i = max_mapnr; | 55 | for_each_online_pgdat(pgdat) { |
54 | while (i-- > 0) { | 56 | pgdat_resize_lock(pgdat, &flags); |
55 | if (!pfn_valid(i)) | 57 | for (i = 0; i < pgdat->node_spanned_pages; i++) { |
56 | continue; | 58 | if (!pfn_valid(pgdat->node_start_pfn + i)) |
57 | page = pfn_to_page(i); | 59 | continue; |
58 | total++; | 60 | page = pfn_to_page(pgdat->node_start_pfn + i); |
59 | if (PageReserved(page)) | 61 | total++; |
60 | reserved++; | 62 | if (PageReserved(page)) |
61 | else if (PageSwapCache(page)) | 63 | reserved++; |
62 | cached++; | 64 | else if (PageSwapCache(page)) |
63 | else if (page_count(page)) | 65 | cached++; |
64 | shared += page_count(page) - 1; | 66 | else if (page_count(page)) |
67 | shared += page_count(page) - 1; | ||
68 | } | ||
69 | pgdat_resize_unlock(pgdat, &flags); | ||
65 | } | 70 | } |
66 | printk("%d pages of RAM\n", total); | 71 | printk("%ld pages of RAM\n", total); |
67 | printk("%d reserved pages\n", reserved); | 72 | printk("%ld reserved pages\n", reserved); |
68 | printk("%d pages shared\n", shared); | 73 | printk("%ld pages shared\n", shared); |
69 | printk("%d pages swap cached\n", cached); | 74 | printk("%ld pages swap cached\n", cached); |
70 | |||
71 | printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); | ||
72 | printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK)); | ||
73 | printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); | ||
74 | printk("%lu pages slab\n", | ||
75 | global_page_state(NR_SLAB_RECLAIMABLE) + | ||
76 | global_page_state(NR_SLAB_UNRECLAIMABLE)); | ||
77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); | ||
78 | } | 75 | } |
79 | 76 | ||
80 | /* | 77 | /* |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 5c1aea97cd12..3d98ba82ea67 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -254,36 +254,46 @@ void disable_noexec(struct mm_struct *mm, struct task_struct *tsk) | |||
254 | int s390_enable_sie(void) | 254 | int s390_enable_sie(void) |
255 | { | 255 | { |
256 | struct task_struct *tsk = current; | 256 | struct task_struct *tsk = current; |
257 | struct mm_struct *mm; | 257 | struct mm_struct *mm, *old_mm; |
258 | int rc; | ||
259 | 258 | ||
260 | task_lock(tsk); | 259 | /* Do we have pgstes? if yes, we are done */ |
261 | |||
262 | rc = 0; | ||
263 | if (tsk->mm->context.pgstes) | 260 | if (tsk->mm->context.pgstes) |
264 | goto unlock; | 261 | return 0; |
265 | 262 | ||
266 | rc = -EINVAL; | 263 | /* lets check if we are allowed to replace the mm */ |
264 | task_lock(tsk); | ||
267 | if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 || | 265 | if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 || |
268 | tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) | 266 | tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) { |
269 | goto unlock; | 267 | task_unlock(tsk); |
268 | return -EINVAL; | ||
269 | } | ||
270 | task_unlock(tsk); | ||
270 | 271 | ||
271 | tsk->mm->context.pgstes = 1; /* dirty little tricks .. */ | 272 | /* we copy the mm with pgstes enabled */ |
273 | tsk->mm->context.pgstes = 1; | ||
272 | mm = dup_mm(tsk); | 274 | mm = dup_mm(tsk); |
273 | tsk->mm->context.pgstes = 0; | 275 | tsk->mm->context.pgstes = 0; |
274 | |||
275 | rc = -ENOMEM; | ||
276 | if (!mm) | 276 | if (!mm) |
277 | goto unlock; | 277 | return -ENOMEM; |
278 | mmput(tsk->mm); | 278 | |
279 | /* Now lets check again if somebody attached ptrace etc */ | ||
280 | task_lock(tsk); | ||
281 | if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 || | ||
282 | tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) { | ||
283 | mmput(mm); | ||
284 | task_unlock(tsk); | ||
285 | return -EINVAL; | ||
286 | } | ||
287 | |||
288 | /* ok, we are alone. No ptrace, no threads, etc. */ | ||
289 | old_mm = tsk->mm; | ||
279 | tsk->mm = tsk->active_mm = mm; | 290 | tsk->mm = tsk->active_mm = mm; |
280 | preempt_disable(); | 291 | preempt_disable(); |
281 | update_mm(mm, tsk); | 292 | update_mm(mm, tsk); |
282 | cpu_set(smp_processor_id(), mm->cpu_vm_mask); | 293 | cpu_set(smp_processor_id(), mm->cpu_vm_mask); |
283 | preempt_enable(); | 294 | preempt_enable(); |
284 | rc = 0; | ||
285 | unlock: | ||
286 | task_unlock(tsk); | 295 | task_unlock(tsk); |
287 | return rc; | 296 | mmput(old_mm); |
297 | return 0; | ||
288 | } | 298 | } |
289 | EXPORT_SYMBOL_GPL(s390_enable_sie); | 299 | EXPORT_SYMBOL_GPL(s390_enable_sie); |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index ea2804808f39..e4868bfc672f 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -27,12 +27,19 @@ struct memory_segment { | |||
27 | 27 | ||
28 | static LIST_HEAD(mem_segs); | 28 | static LIST_HEAD(mem_segs); |
29 | 29 | ||
30 | static pud_t *vmem_pud_alloc(void) | 30 | static void __ref *vmem_alloc_pages(unsigned int order) |
31 | { | ||
32 | if (slab_is_available()) | ||
33 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
34 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
35 | } | ||
36 | |||
37 | static inline pud_t *vmem_pud_alloc(void) | ||
31 | { | 38 | { |
32 | pud_t *pud = NULL; | 39 | pud_t *pud = NULL; |
33 | 40 | ||
34 | #ifdef CONFIG_64BIT | 41 | #ifdef CONFIG_64BIT |
35 | pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); | 42 | pud = vmem_alloc_pages(2); |
36 | if (!pud) | 43 | if (!pud) |
37 | return NULL; | 44 | return NULL; |
38 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); | 45 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -40,12 +47,12 @@ static pud_t *vmem_pud_alloc(void) | |||
40 | return pud; | 47 | return pud; |
41 | } | 48 | } |
42 | 49 | ||
43 | static pmd_t *vmem_pmd_alloc(void) | 50 | static inline pmd_t *vmem_pmd_alloc(void) |
44 | { | 51 | { |
45 | pmd_t *pmd = NULL; | 52 | pmd_t *pmd = NULL; |
46 | 53 | ||
47 | #ifdef CONFIG_64BIT | 54 | #ifdef CONFIG_64BIT |
48 | pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); | 55 | pmd = vmem_alloc_pages(2); |
49 | if (!pmd) | 56 | if (!pmd) |
50 | return NULL; | 57 | return NULL; |
51 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); | 58 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -207,13 +214,14 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) | |||
207 | if (pte_none(*pt_dir)) { | 214 | if (pte_none(*pt_dir)) { |
208 | unsigned long new_page; | 215 | unsigned long new_page; |
209 | 216 | ||
210 | new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); | 217 | new_page =__pa(vmem_alloc_pages(0)); |
211 | if (!new_page) | 218 | if (!new_page) |
212 | goto out; | 219 | goto out; |
213 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | 220 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); |
214 | *pt_dir = pte; | 221 | *pt_dir = pte; |
215 | } | 222 | } |
216 | } | 223 | } |
224 | memset(start, 0, nr * sizeof(struct page)); | ||
217 | ret = 0; | 225 | ret = 0; |
218 | out: | 226 | out: |
219 | flush_tlb_kernel_range(start_addr, end_addr); | 227 | flush_tlb_kernel_range(start_addr, end_addr); |
@@ -228,7 +236,7 @@ static int insert_memory_segment(struct memory_segment *seg) | |||
228 | { | 236 | { |
229 | struct memory_segment *tmp; | 237 | struct memory_segment *tmp; |
230 | 238 | ||
231 | if (seg->start + seg->size >= VMEM_MAX_PHYS || | 239 | if (seg->start + seg->size > VMEM_MAX_PHYS || |
232 | seg->start + seg->size < seg->start) | 240 | seg->start + seg->size < seg->start) |
233 | return -ERANGE; | 241 | return -ERANGE; |
234 | 242 | ||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 8a68160079a9..9a854c8e5274 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -281,7 +281,6 @@ config CPU_SUBTYPE_SH7723 | |||
281 | select CPU_SH4A | 281 | select CPU_SH4A |
282 | select CPU_SHX2 | 282 | select CPU_SHX2 |
283 | select ARCH_SPARSEMEM_ENABLE | 283 | select ARCH_SPARSEMEM_ENABLE |
284 | select SYS_SUPPORTS_NUMA | ||
285 | help | 284 | help |
286 | Select SH7723 if you have an SH-MobileR2 CPU. | 285 | Select SH7723 if you have an SH-MobileR2 CPU. |
287 | 286 | ||
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 0d2ef1e9a6fd..0f4549860226 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -81,7 +81,7 @@ config DEBUG_STACK_USAGE | |||
81 | 81 | ||
82 | config 4KSTACKS | 82 | config 4KSTACKS |
83 | bool "Use 4Kb for kernel stacks instead of 8Kb" | 83 | bool "Use 4Kb for kernel stacks instead of 8Kb" |
84 | depends on DEBUG_KERNEL | 84 | depends on DEBUG_KERNEL && (MMU || BROKEN) |
85 | help | 85 | help |
86 | If you say Y here the kernel will use a 4Kb stacksize for the | 86 | If you say Y here the kernel will use a 4Kb stacksize for the |
87 | kernel stack attached to each process/thread. This facilitates | 87 | kernel stack attached to each process/thread. This facilitates |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 8050b03d51fc..fb7b1b15e392 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -41,6 +41,8 @@ cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,) | |||
41 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | 41 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb |
42 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | 42 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml |
43 | 43 | ||
44 | cflags-y += $(call cc-option,-mno-fdpic) | ||
45 | |||
44 | # | 46 | # |
45 | # -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that | 47 | # -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that |
46 | # support it, while -Wa,-dsp by itself limits the range of usable opcodes | 48 | # support it, while -Wa,-dsp by itself limits the range of usable opcodes |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 452d0d6459a4..2308e8753bcd 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/ata_platform.h> | 13 | #include <linux/ata_platform.h> |
14 | #include <linux/serial_8250.h> | ||
15 | #include <linux/sm501.h> | 14 | #include <linux/sm501.h> |
16 | #include <linux/sm501-regs.h> | 15 | #include <linux/sm501-regs.h> |
17 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
@@ -109,27 +108,6 @@ static struct platform_device heartbeat_device = { | |||
109 | .resource = heartbeat_resources, | 108 | .resource = heartbeat_resources, |
110 | }; | 109 | }; |
111 | 110 | ||
112 | static struct plat_serial8250_port uart_platform_data[] = { | ||
113 | { | ||
114 | .membase = (void __iomem *)0xb3e30000, | ||
115 | .mapbase = 0xb3e30000, | ||
116 | .iotype = UPIO_MEM, | ||
117 | .irq = IRQ_VOYAGER, | ||
118 | .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ, | ||
119 | .regshift = 2, | ||
120 | .uartclk = (9600 * 16), | ||
121 | }, | ||
122 | { 0 }, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device uart_device = { | ||
126 | .name = "serial8250", | ||
127 | .id = PLAT8250_DEV_PLATFORM, | ||
128 | .dev = { | ||
129 | .platform_data = uart_platform_data, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct resource sm501_resources[] = { | 111 | static struct resource sm501_resources[] = { |
134 | [0] = { | 112 | [0] = { |
135 | .start = 0x10000000, | 113 | .start = 0x10000000, |
@@ -185,11 +163,7 @@ static struct sm501_platdata_fb sm501_fb_pdata = { | |||
185 | }; | 163 | }; |
186 | 164 | ||
187 | static struct sm501_initdata sm501_initdata = { | 165 | static struct sm501_initdata sm501_initdata = { |
188 | .gpio_high = { | 166 | .devices = SM501_USE_USB_HOST | SM501_USE_UART0, |
189 | .set = 0x00001fe0, | ||
190 | .mask = 0x0, | ||
191 | }, | ||
192 | .devices = SM501_USE_USB_HOST, | ||
193 | }; | 167 | }; |
194 | 168 | ||
195 | static struct sm501_platdata sm501_platform_data = { | 169 | static struct sm501_platdata sm501_platform_data = { |
@@ -208,7 +182,6 @@ static struct platform_device sm501_device = { | |||
208 | }; | 182 | }; |
209 | 183 | ||
210 | static struct platform_device *rts7751r2d_devices[] __initdata = { | 184 | static struct platform_device *rts7751r2d_devices[] __initdata = { |
211 | &uart_device, | ||
212 | &sm501_device, | 185 | &sm501_device, |
213 | &heartbeat_device, | 186 | &heartbeat_device, |
214 | &spi_sh_sci_device, | 187 | &spi_sh_sci_device, |
@@ -272,16 +245,6 @@ static void __init rts7751r2d_setup(char **cmdline_p) | |||
272 | 245 | ||
273 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; | 246 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; |
274 | writel(readl(sm501_reg) | 0x00f107c0, sm501_reg); | 247 | writel(readl(sm501_reg) | 0x00f107c0, sm501_reg); |
275 | |||
276 | /* | ||
277 | * Power Mode Gate - Enable UART0 | ||
278 | */ | ||
279 | |||
280 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_0_GATE; | ||
281 | writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg); | ||
282 | |||
283 | sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_1_GATE; | ||
284 | writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg); | ||
285 | } | 248 | } |
286 | 249 | ||
287 | /* | 250 | /* |
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig index ee5900817f8f..287408b2ace6 100644 --- a/arch/sh/configs/migor_defconfig +++ b/arch/sh/configs/migor_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Wed Feb 6 21:52:20 2008 | 4 | # Thu May 22 14:30:07 2008 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -20,6 +20,7 @@ CONFIG_LOCKDEP_SUPPORT=y | |||
20 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 20 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
22 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 22 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
23 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
24 | 25 | ||
25 | # | 26 | # |
@@ -36,18 +37,16 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
36 | # CONFIG_POSIX_MQUEUE is not set | 37 | # CONFIG_POSIX_MQUEUE is not set |
37 | # CONFIG_BSD_PROCESS_ACCT is not set | 38 | # CONFIG_BSD_PROCESS_ACCT is not set |
38 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
39 | # CONFIG_USER_NS is not set | ||
40 | # CONFIG_PID_NS is not set | ||
41 | # CONFIG_AUDIT is not set | 40 | # CONFIG_AUDIT is not set |
42 | CONFIG_IKCONFIG=y | 41 | CONFIG_IKCONFIG=y |
43 | CONFIG_IKCONFIG_PROC=y | 42 | CONFIG_IKCONFIG_PROC=y |
44 | CONFIG_LOG_BUF_SHIFT=14 | 43 | CONFIG_LOG_BUF_SHIFT=14 |
45 | # CONFIG_CGROUPS is not set | 44 | # CONFIG_CGROUPS is not set |
46 | CONFIG_FAIR_GROUP_SCHED=y | 45 | # CONFIG_GROUP_SCHED is not set |
47 | CONFIG_FAIR_USER_SCHED=y | ||
48 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
49 | CONFIG_SYSFS_DEPRECATED=y | 46 | CONFIG_SYSFS_DEPRECATED=y |
47 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
50 | # CONFIG_RELAY is not set | 48 | # CONFIG_RELAY is not set |
49 | # CONFIG_NAMESPACES is not set | ||
51 | CONFIG_BLK_DEV_INITRD=y | 50 | CONFIG_BLK_DEV_INITRD=y |
52 | CONFIG_INITRAMFS_SOURCE="" | 51 | CONFIG_INITRAMFS_SOURCE="" |
53 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 52 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -61,11 +60,13 @@ CONFIG_HOTPLUG=y | |||
61 | CONFIG_PRINTK=y | 60 | CONFIG_PRINTK=y |
62 | CONFIG_BUG=y | 61 | CONFIG_BUG=y |
63 | CONFIG_ELF_CORE=y | 62 | CONFIG_ELF_CORE=y |
63 | CONFIG_COMPAT_BRK=y | ||
64 | CONFIG_BASE_FULL=y | 64 | CONFIG_BASE_FULL=y |
65 | CONFIG_FUTEX=y | 65 | CONFIG_FUTEX=y |
66 | CONFIG_ANON_INODES=y | 66 | CONFIG_ANON_INODES=y |
67 | CONFIG_EPOLL=y | 67 | CONFIG_EPOLL=y |
68 | CONFIG_SIGNALFD=y | 68 | CONFIG_SIGNALFD=y |
69 | CONFIG_TIMERFD=y | ||
69 | CONFIG_EVENTFD=y | 70 | CONFIG_EVENTFD=y |
70 | CONFIG_SHMEM=y | 71 | CONFIG_SHMEM=y |
71 | CONFIG_VM_EVENT_COUNTERS=y | 72 | CONFIG_VM_EVENT_COUNTERS=y |
@@ -77,11 +78,15 @@ CONFIG_PROFILING=y | |||
77 | CONFIG_OPROFILE=y | 78 | CONFIG_OPROFILE=y |
78 | CONFIG_HAVE_OPROFILE=y | 79 | CONFIG_HAVE_OPROFILE=y |
79 | # CONFIG_HAVE_KPROBES is not set | 80 | # CONFIG_HAVE_KPROBES is not set |
81 | # CONFIG_HAVE_KRETPROBES is not set | ||
82 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
83 | CONFIG_PROC_PAGE_MONITOR=y | ||
80 | CONFIG_SLABINFO=y | 84 | CONFIG_SLABINFO=y |
81 | CONFIG_RT_MUTEXES=y | 85 | CONFIG_RT_MUTEXES=y |
82 | # CONFIG_TINY_SHMEM is not set | 86 | # CONFIG_TINY_SHMEM is not set |
83 | CONFIG_BASE_SMALL=0 | 87 | CONFIG_BASE_SMALL=0 |
84 | CONFIG_MODULES=y | 88 | CONFIG_MODULES=y |
89 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
85 | # CONFIG_MODULE_UNLOAD is not set | 90 | # CONFIG_MODULE_UNLOAD is not set |
86 | # CONFIG_MODVERSIONS is not set | 91 | # CONFIG_MODVERSIONS is not set |
87 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 92 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
@@ -105,7 +110,6 @@ CONFIG_DEFAULT_AS=y | |||
105 | # CONFIG_DEFAULT_NOOP is not set | 110 | # CONFIG_DEFAULT_NOOP is not set |
106 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 111 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
107 | CONFIG_CLASSIC_RCU=y | 112 | CONFIG_CLASSIC_RCU=y |
108 | # CONFIG_PREEMPT_RCU is not set | ||
109 | 113 | ||
110 | # | 114 | # |
111 | # System type | 115 | # System type |
@@ -118,6 +122,7 @@ CONFIG_CPU_SHX2=y | |||
118 | # CONFIG_CPU_SUBTYPE_SH7203 is not set | 122 | # CONFIG_CPU_SUBTYPE_SH7203 is not set |
119 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | 123 | # CONFIG_CPU_SUBTYPE_SH7206 is not set |
120 | # CONFIG_CPU_SUBTYPE_SH7263 is not set | 124 | # CONFIG_CPU_SUBTYPE_SH7263 is not set |
125 | # CONFIG_CPU_SUBTYPE_MXG is not set | ||
121 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | 126 | # CONFIG_CPU_SUBTYPE_SH7705 is not set |
122 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | 127 | # CONFIG_CPU_SUBTYPE_SH7706 is not set |
123 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | 128 | # CONFIG_CPU_SUBTYPE_SH7707 is not set |
@@ -135,6 +140,7 @@ CONFIG_CPU_SHX2=y | |||
135 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | 140 | # CONFIG_CPU_SUBTYPE_SH7751R is not set |
136 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | 141 | # CONFIG_CPU_SUBTYPE_SH7760 is not set |
137 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | 142 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set |
143 | # CONFIG_CPU_SUBTYPE_SH7723 is not set | ||
138 | # CONFIG_CPU_SUBTYPE_SH7763 is not set | 144 | # CONFIG_CPU_SUBTYPE_SH7763 is not set |
139 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 145 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
140 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 146 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
@@ -142,6 +148,7 @@ CONFIG_CPU_SHX2=y | |||
142 | # CONFIG_CPU_SUBTYPE_SHX3 is not set | 148 | # CONFIG_CPU_SUBTYPE_SHX3 is not set |
143 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | 149 | # CONFIG_CPU_SUBTYPE_SH7343 is not set |
144 | CONFIG_CPU_SUBTYPE_SH7722=y | 150 | CONFIG_CPU_SUBTYPE_SH7722=y |
151 | # CONFIG_CPU_SUBTYPE_SH7366 is not set | ||
145 | # CONFIG_CPU_SUBTYPE_SH5_101 is not set | 152 | # CONFIG_CPU_SUBTYPE_SH5_101 is not set |
146 | # CONFIG_CPU_SUBTYPE_SH5_103 is not set | 153 | # CONFIG_CPU_SUBTYPE_SH5_103 is not set |
147 | 154 | ||
@@ -255,7 +262,6 @@ CONFIG_HZ=250 | |||
255 | CONFIG_PREEMPT_NONE=y | 262 | CONFIG_PREEMPT_NONE=y |
256 | # CONFIG_PREEMPT_VOLUNTARY is not set | 263 | # CONFIG_PREEMPT_VOLUNTARY is not set |
257 | # CONFIG_PREEMPT is not set | 264 | # CONFIG_PREEMPT is not set |
258 | CONFIG_RCU_TRACE=y | ||
259 | CONFIG_GUSA=y | 265 | CONFIG_GUSA=y |
260 | 266 | ||
261 | # | 267 | # |
@@ -323,8 +329,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
323 | CONFIG_DEFAULT_TCP_CONG="cubic" | 329 | CONFIG_DEFAULT_TCP_CONG="cubic" |
324 | # CONFIG_TCP_MD5SIG is not set | 330 | # CONFIG_TCP_MD5SIG is not set |
325 | # CONFIG_IPV6 is not set | 331 | # CONFIG_IPV6 is not set |
326 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
327 | # CONFIG_INET6_TUNNEL is not set | ||
328 | # CONFIG_NETWORK_SECMARK is not set | 332 | # CONFIG_NETWORK_SECMARK is not set |
329 | # CONFIG_NETFILTER is not set | 333 | # CONFIG_NETFILTER is not set |
330 | # CONFIG_IP_DCCP is not set | 334 | # CONFIG_IP_DCCP is not set |
@@ -376,7 +380,90 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
376 | CONFIG_FW_LOADER=m | 380 | CONFIG_FW_LOADER=m |
377 | # CONFIG_SYS_HYPERVISOR is not set | 381 | # CONFIG_SYS_HYPERVISOR is not set |
378 | # CONFIG_CONNECTOR is not set | 382 | # CONFIG_CONNECTOR is not set |
379 | # CONFIG_MTD is not set | 383 | CONFIG_MTD=y |
384 | # CONFIG_MTD_DEBUG is not set | ||
385 | CONFIG_MTD_CONCAT=y | ||
386 | CONFIG_MTD_PARTITIONS=y | ||
387 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
388 | CONFIG_MTD_CMDLINE_PARTS=y | ||
389 | # CONFIG_MTD_AR7_PARTS is not set | ||
390 | |||
391 | # | ||
392 | # User Modules And Translation Layers | ||
393 | # | ||
394 | CONFIG_MTD_CHAR=y | ||
395 | CONFIG_MTD_BLKDEVS=y | ||
396 | CONFIG_MTD_BLOCK=y | ||
397 | # CONFIG_FTL is not set | ||
398 | # CONFIG_NFTL is not set | ||
399 | # CONFIG_INFTL is not set | ||
400 | # CONFIG_RFD_FTL is not set | ||
401 | # CONFIG_SSFDC is not set | ||
402 | # CONFIG_MTD_OOPS is not set | ||
403 | |||
404 | # | ||
405 | # RAM/ROM/Flash chip drivers | ||
406 | # | ||
407 | CONFIG_MTD_CFI=y | ||
408 | # CONFIG_MTD_JEDECPROBE is not set | ||
409 | CONFIG_MTD_GEN_PROBE=y | ||
410 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
411 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
412 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
413 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
414 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
415 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
416 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
417 | CONFIG_MTD_CFI_I1=y | ||
418 | CONFIG_MTD_CFI_I2=y | ||
419 | # CONFIG_MTD_CFI_I4 is not set | ||
420 | # CONFIG_MTD_CFI_I8 is not set | ||
421 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
422 | CONFIG_MTD_CFI_AMDSTD=y | ||
423 | # CONFIG_MTD_CFI_STAA is not set | ||
424 | CONFIG_MTD_CFI_UTIL=y | ||
425 | # CONFIG_MTD_RAM is not set | ||
426 | # CONFIG_MTD_ROM is not set | ||
427 | # CONFIG_MTD_ABSENT is not set | ||
428 | |||
429 | # | ||
430 | # Mapping drivers for chip access | ||
431 | # | ||
432 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
433 | CONFIG_MTD_PHYSMAP=y | ||
434 | CONFIG_MTD_PHYSMAP_START=0xffffffff | ||
435 | CONFIG_MTD_PHYSMAP_LEN=0 | ||
436 | CONFIG_MTD_PHYSMAP_BANKWIDTH=0 | ||
437 | # CONFIG_MTD_PLATRAM is not set | ||
438 | |||
439 | # | ||
440 | # Self-contained MTD device drivers | ||
441 | # | ||
442 | # CONFIG_MTD_SLRAM is not set | ||
443 | # CONFIG_MTD_PHRAM is not set | ||
444 | # CONFIG_MTD_MTDRAM is not set | ||
445 | # CONFIG_MTD_BLOCK2MTD is not set | ||
446 | |||
447 | # | ||
448 | # Disk-On-Chip Device Drivers | ||
449 | # | ||
450 | # CONFIG_MTD_DOC2000 is not set | ||
451 | # CONFIG_MTD_DOC2001 is not set | ||
452 | # CONFIG_MTD_DOC2001PLUS is not set | ||
453 | CONFIG_MTD_NAND=y | ||
454 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
455 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
456 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
457 | CONFIG_MTD_NAND_IDS=y | ||
458 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
459 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
460 | CONFIG_MTD_NAND_PLATFORM=y | ||
461 | # CONFIG_MTD_ONENAND is not set | ||
462 | |||
463 | # | ||
464 | # UBI - Unsorted block images | ||
465 | # | ||
466 | # CONFIG_MTD_UBI is not set | ||
380 | # CONFIG_PARPORT is not set | 467 | # CONFIG_PARPORT is not set |
381 | CONFIG_BLK_DEV=y | 468 | CONFIG_BLK_DEV=y |
382 | # CONFIG_BLK_DEV_COW_COMMON is not set | 469 | # CONFIG_BLK_DEV_COW_COMMON is not set |
@@ -385,11 +472,13 @@ CONFIG_BLK_DEV=y | |||
385 | CONFIG_BLK_DEV_RAM=y | 472 | CONFIG_BLK_DEV_RAM=y |
386 | CONFIG_BLK_DEV_RAM_COUNT=16 | 473 | CONFIG_BLK_DEV_RAM_COUNT=16 |
387 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 474 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
388 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 475 | # CONFIG_BLK_DEV_XIP is not set |
389 | # CONFIG_CDROM_PKTCDVD is not set | 476 | # CONFIG_CDROM_PKTCDVD is not set |
390 | # CONFIG_ATA_OVER_ETH is not set | 477 | # CONFIG_ATA_OVER_ETH is not set |
391 | CONFIG_MISC_DEVICES=y | 478 | CONFIG_MISC_DEVICES=y |
392 | # CONFIG_EEPROM_93CX6 is not set | 479 | # CONFIG_EEPROM_93CX6 is not set |
480 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
481 | CONFIG_HAVE_IDE=y | ||
393 | # CONFIG_IDE is not set | 482 | # CONFIG_IDE is not set |
394 | 483 | ||
395 | # | 484 | # |
@@ -461,6 +550,7 @@ CONFIG_SMC91X=y | |||
461 | # | 550 | # |
462 | # CONFIG_WLAN_PRE80211 is not set | 551 | # CONFIG_WLAN_PRE80211 is not set |
463 | # CONFIG_WLAN_80211 is not set | 552 | # CONFIG_WLAN_80211 is not set |
553 | # CONFIG_IWLWIFI_LEDS is not set | ||
464 | # CONFIG_WAN is not set | 554 | # CONFIG_WAN is not set |
465 | # CONFIG_PPP is not set | 555 | # CONFIG_PPP is not set |
466 | # CONFIG_SLIP is not set | 556 | # CONFIG_SLIP is not set |
@@ -482,13 +572,20 @@ CONFIG_INPUT=y | |||
482 | # | 572 | # |
483 | # CONFIG_INPUT_MOUSEDEV is not set | 573 | # CONFIG_INPUT_MOUSEDEV is not set |
484 | # CONFIG_INPUT_JOYDEV is not set | 574 | # CONFIG_INPUT_JOYDEV is not set |
485 | # CONFIG_INPUT_EVDEV is not set | 575 | CONFIG_INPUT_EVDEV=y |
486 | # CONFIG_INPUT_EVBUG is not set | 576 | # CONFIG_INPUT_EVBUG is not set |
487 | 577 | ||
488 | # | 578 | # |
489 | # Input Device Drivers | 579 | # Input Device Drivers |
490 | # | 580 | # |
491 | # CONFIG_INPUT_KEYBOARD is not set | 581 | CONFIG_INPUT_KEYBOARD=y |
582 | # CONFIG_KEYBOARD_ATKBD is not set | ||
583 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
584 | # CONFIG_KEYBOARD_LKKBD is not set | ||
585 | # CONFIG_KEYBOARD_XTKBD is not set | ||
586 | # CONFIG_KEYBOARD_NEWTON is not set | ||
587 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
588 | CONFIG_KEYBOARD_SH_KEYSC=y | ||
492 | # CONFIG_INPUT_MOUSE is not set | 589 | # CONFIG_INPUT_MOUSE is not set |
493 | # CONFIG_INPUT_JOYSTICK is not set | 590 | # CONFIG_INPUT_JOYSTICK is not set |
494 | # CONFIG_INPUT_TABLET is not set | 591 | # CONFIG_INPUT_TABLET is not set |
@@ -508,6 +605,7 @@ CONFIG_VT=y | |||
508 | CONFIG_VT_CONSOLE=y | 605 | CONFIG_VT_CONSOLE=y |
509 | CONFIG_HW_CONSOLE=y | 606 | CONFIG_HW_CONSOLE=y |
510 | CONFIG_VT_HW_CONSOLE_BINDING=y | 607 | CONFIG_VT_HW_CONSOLE_BINDING=y |
608 | CONFIG_DEVKMEM=y | ||
511 | # CONFIG_SERIAL_NONSTANDARD is not set | 609 | # CONFIG_SERIAL_NONSTANDARD is not set |
512 | 610 | ||
513 | # | 611 | # |
@@ -531,16 +629,40 @@ CONFIG_HW_RANDOM=y | |||
531 | # CONFIG_R3964 is not set | 629 | # CONFIG_R3964 is not set |
532 | # CONFIG_RAW_DRIVER is not set | 630 | # CONFIG_RAW_DRIVER is not set |
533 | # CONFIG_TCG_TPM is not set | 631 | # CONFIG_TCG_TPM is not set |
534 | # CONFIG_I2C is not set | 632 | CONFIG_I2C=y |
535 | 633 | CONFIG_I2C_BOARDINFO=y | |
536 | # | 634 | # CONFIG_I2C_CHARDEV is not set |
537 | # SPI support | 635 | |
538 | # | 636 | # |
637 | # I2C Hardware Bus support | ||
638 | # | ||
639 | # CONFIG_I2C_OCORES is not set | ||
640 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
641 | # CONFIG_I2C_SIMTEC is not set | ||
642 | # CONFIG_I2C_TAOS_EVM is not set | ||
643 | # CONFIG_I2C_STUB is not set | ||
644 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
645 | CONFIG_I2C_SH_MOBILE=y | ||
646 | |||
647 | # | ||
648 | # Miscellaneous I2C Chip support | ||
649 | # | ||
650 | # CONFIG_DS1682 is not set | ||
651 | # CONFIG_SENSORS_EEPROM is not set | ||
652 | # CONFIG_SENSORS_PCF8574 is not set | ||
653 | # CONFIG_PCF8575 is not set | ||
654 | # CONFIG_SENSORS_PCF8591 is not set | ||
655 | # CONFIG_SENSORS_MAX6875 is not set | ||
656 | # CONFIG_SENSORS_TSL2550 is not set | ||
657 | # CONFIG_I2C_DEBUG_CORE is not set | ||
658 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
659 | # CONFIG_I2C_DEBUG_BUS is not set | ||
660 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
539 | # CONFIG_SPI is not set | 661 | # CONFIG_SPI is not set |
540 | # CONFIG_SPI_MASTER is not set | ||
541 | # CONFIG_W1 is not set | 662 | # CONFIG_W1 is not set |
542 | # CONFIG_POWER_SUPPLY is not set | 663 | # CONFIG_POWER_SUPPLY is not set |
543 | # CONFIG_HWMON is not set | 664 | # CONFIG_HWMON is not set |
665 | # CONFIG_THERMAL is not set | ||
544 | # CONFIG_WATCHDOG is not set | 666 | # CONFIG_WATCHDOG is not set |
545 | 667 | ||
546 | # | 668 | # |
@@ -553,12 +675,22 @@ CONFIG_SSB_POSSIBLE=y | |||
553 | # Multifunction device drivers | 675 | # Multifunction device drivers |
554 | # | 676 | # |
555 | # CONFIG_MFD_SM501 is not set | 677 | # CONFIG_MFD_SM501 is not set |
678 | # CONFIG_HTC_PASIC3 is not set | ||
556 | 679 | ||
557 | # | 680 | # |
558 | # Multimedia devices | 681 | # Multimedia devices |
559 | # | 682 | # |
683 | |||
684 | # | ||
685 | # Multimedia core support | ||
686 | # | ||
560 | # CONFIG_VIDEO_DEV is not set | 687 | # CONFIG_VIDEO_DEV is not set |
561 | # CONFIG_DVB_CORE is not set | 688 | # CONFIG_DVB_CORE is not set |
689 | # CONFIG_VIDEO_MEDIA is not set | ||
690 | |||
691 | # | ||
692 | # Multimedia drivers | ||
693 | # | ||
562 | # CONFIG_DAB is not set | 694 | # CONFIG_DAB is not set |
563 | 695 | ||
564 | # | 696 | # |
@@ -592,6 +724,8 @@ CONFIG_USB_ARCH_HAS_HCD=y | |||
592 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 724 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
593 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 725 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
594 | # CONFIG_USB is not set | 726 | # CONFIG_USB is not set |
727 | # CONFIG_USB_OTG_WHITELIST is not set | ||
728 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
595 | 729 | ||
596 | # | 730 | # |
597 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 731 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -608,6 +742,7 @@ CONFIG_USB_GADGET_SELECTED=y | |||
608 | CONFIG_USB_GADGET_M66592=y | 742 | CONFIG_USB_GADGET_M66592=y |
609 | CONFIG_USB_M66592=y | 743 | CONFIG_USB_M66592=y |
610 | CONFIG_SUPERH_BUILT_IN_M66592=y | 744 | CONFIG_SUPERH_BUILT_IN_M66592=y |
745 | # CONFIG_USB_GADGET_PXA27X is not set | ||
611 | # CONFIG_USB_GADGET_GOKU is not set | 746 | # CONFIG_USB_GADGET_GOKU is not set |
612 | # CONFIG_USB_GADGET_LH7A40X is not set | 747 | # CONFIG_USB_GADGET_LH7A40X is not set |
613 | # CONFIG_USB_GADGET_OMAP is not set | 748 | # CONFIG_USB_GADGET_OMAP is not set |
@@ -623,7 +758,9 @@ CONFIG_USB_G_SERIAL=y | |||
623 | # CONFIG_USB_MIDI_GADGET is not set | 758 | # CONFIG_USB_MIDI_GADGET is not set |
624 | # CONFIG_USB_G_PRINTER is not set | 759 | # CONFIG_USB_G_PRINTER is not set |
625 | # CONFIG_MMC is not set | 760 | # CONFIG_MMC is not set |
761 | # CONFIG_MEMSTICK is not set | ||
626 | # CONFIG_NEW_LEDS is not set | 762 | # CONFIG_NEW_LEDS is not set |
763 | # CONFIG_ACCESSIBILITY is not set | ||
627 | CONFIG_RTC_LIB=y | 764 | CONFIG_RTC_LIB=y |
628 | CONFIG_RTC_CLASS=y | 765 | CONFIG_RTC_CLASS=y |
629 | CONFIG_RTC_HCTOSYS=y | 766 | CONFIG_RTC_HCTOSYS=y |
@@ -640,15 +777,31 @@ CONFIG_RTC_INTF_DEV=y | |||
640 | # CONFIG_RTC_DRV_TEST is not set | 777 | # CONFIG_RTC_DRV_TEST is not set |
641 | 778 | ||
642 | # | 779 | # |
780 | # I2C RTC drivers | ||
781 | # | ||
782 | # CONFIG_RTC_DRV_DS1307 is not set | ||
783 | # CONFIG_RTC_DRV_DS1374 is not set | ||
784 | # CONFIG_RTC_DRV_DS1672 is not set | ||
785 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
786 | CONFIG_RTC_DRV_RS5C372=y | ||
787 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
788 | # CONFIG_RTC_DRV_X1205 is not set | ||
789 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
790 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
791 | # CONFIG_RTC_DRV_M41T80 is not set | ||
792 | # CONFIG_RTC_DRV_S35390A is not set | ||
793 | |||
794 | # | ||
643 | # SPI RTC drivers | 795 | # SPI RTC drivers |
644 | # | 796 | # |
645 | 797 | ||
646 | # | 798 | # |
647 | # Platform RTC drivers | 799 | # Platform RTC drivers |
648 | # | 800 | # |
801 | # CONFIG_RTC_DRV_DS1511 is not set | ||
649 | # CONFIG_RTC_DRV_DS1553 is not set | 802 | # CONFIG_RTC_DRV_DS1553 is not set |
650 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
651 | # CONFIG_RTC_DRV_DS1742 is not set | 803 | # CONFIG_RTC_DRV_DS1742 is not set |
804 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
652 | # CONFIG_RTC_DRV_M48T86 is not set | 805 | # CONFIG_RTC_DRV_M48T86 is not set |
653 | # CONFIG_RTC_DRV_M48T59 is not set | 806 | # CONFIG_RTC_DRV_M48T59 is not set |
654 | # CONFIG_RTC_DRV_V3020 is not set | 807 | # CONFIG_RTC_DRV_V3020 is not set |
@@ -657,10 +810,6 @@ CONFIG_RTC_INTF_DEV=y | |||
657 | # on-CPU RTC drivers | 810 | # on-CPU RTC drivers |
658 | # | 811 | # |
659 | CONFIG_RTC_DRV_SH=y | 812 | CONFIG_RTC_DRV_SH=y |
660 | |||
661 | # | ||
662 | # Userspace I/O | ||
663 | # | ||
664 | # CONFIG_UIO is not set | 813 | # CONFIG_UIO is not set |
665 | 814 | ||
666 | # | 815 | # |
@@ -673,13 +822,10 @@ CONFIG_RTC_DRV_SH=y | |||
673 | # CONFIG_JFS_FS is not set | 822 | # CONFIG_JFS_FS is not set |
674 | # CONFIG_FS_POSIX_ACL is not set | 823 | # CONFIG_FS_POSIX_ACL is not set |
675 | # CONFIG_XFS_FS is not set | 824 | # CONFIG_XFS_FS is not set |
676 | # CONFIG_GFS2_FS is not set | ||
677 | # CONFIG_OCFS2_FS is not set | 825 | # CONFIG_OCFS2_FS is not set |
678 | # CONFIG_MINIX_FS is not set | 826 | # CONFIG_DNOTIFY is not set |
679 | # CONFIG_ROMFS_FS is not set | ||
680 | # CONFIG_INOTIFY is not set | 827 | # CONFIG_INOTIFY is not set |
681 | # CONFIG_QUOTA is not set | 828 | # CONFIG_QUOTA is not set |
682 | # CONFIG_DNOTIFY is not set | ||
683 | # CONFIG_AUTOFS_FS is not set | 829 | # CONFIG_AUTOFS_FS is not set |
684 | # CONFIG_AUTOFS4_FS is not set | 830 | # CONFIG_AUTOFS4_FS is not set |
685 | # CONFIG_FUSE_FS is not set | 831 | # CONFIG_FUSE_FS is not set |
@@ -720,10 +866,13 @@ CONFIG_TMPFS=y | |||
720 | # CONFIG_BEFS_FS is not set | 866 | # CONFIG_BEFS_FS is not set |
721 | # CONFIG_BFS_FS is not set | 867 | # CONFIG_BFS_FS is not set |
722 | # CONFIG_EFS_FS is not set | 868 | # CONFIG_EFS_FS is not set |
869 | # CONFIG_JFFS2_FS is not set | ||
723 | # CONFIG_CRAMFS is not set | 870 | # CONFIG_CRAMFS is not set |
724 | # CONFIG_VXFS_FS is not set | 871 | # CONFIG_VXFS_FS is not set |
872 | # CONFIG_MINIX_FS is not set | ||
725 | # CONFIG_HPFS_FS is not set | 873 | # CONFIG_HPFS_FS is not set |
726 | # CONFIG_QNX4FS_FS is not set | 874 | # CONFIG_QNX4FS_FS is not set |
875 | # CONFIG_ROMFS_FS is not set | ||
727 | # CONFIG_SYSV_FS is not set | 876 | # CONFIG_SYSV_FS is not set |
728 | # CONFIG_UFS_FS is not set | 877 | # CONFIG_UFS_FS is not set |
729 | # CONFIG_NETWORK_FILESYSTEMS is not set | 878 | # CONFIG_NETWORK_FILESYSTEMS is not set |
@@ -743,6 +892,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y | |||
743 | # CONFIG_PRINTK_TIME is not set | 892 | # CONFIG_PRINTK_TIME is not set |
744 | CONFIG_ENABLE_WARN_DEPRECATED=y | 893 | CONFIG_ENABLE_WARN_DEPRECATED=y |
745 | CONFIG_ENABLE_MUST_CHECK=y | 894 | CONFIG_ENABLE_MUST_CHECK=y |
895 | CONFIG_FRAME_WARN=1024 | ||
746 | # CONFIG_MAGIC_SYSRQ is not set | 896 | # CONFIG_MAGIC_SYSRQ is not set |
747 | # CONFIG_UNUSED_SYMBOLS is not set | 897 | # CONFIG_UNUSED_SYMBOLS is not set |
748 | CONFIG_DEBUG_FS=y | 898 | CONFIG_DEBUG_FS=y |
@@ -763,48 +913,77 @@ CONFIG_EARLY_PRINTK=y | |||
763 | # CONFIG_SECURITY is not set | 913 | # CONFIG_SECURITY is not set |
764 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 914 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
765 | CONFIG_CRYPTO=y | 915 | CONFIG_CRYPTO=y |
766 | # CONFIG_CRYPTO_SEQIV is not set | 916 | |
917 | # | ||
918 | # Crypto core or helper | ||
919 | # | ||
767 | # CONFIG_CRYPTO_MANAGER is not set | 920 | # CONFIG_CRYPTO_MANAGER is not set |
921 | # CONFIG_CRYPTO_GF128MUL is not set | ||
922 | # CONFIG_CRYPTO_NULL is not set | ||
923 | # CONFIG_CRYPTO_CRYPTD is not set | ||
924 | # CONFIG_CRYPTO_AUTHENC is not set | ||
925 | # CONFIG_CRYPTO_TEST is not set | ||
926 | |||
927 | # | ||
928 | # Authenticated Encryption with Associated Data | ||
929 | # | ||
930 | # CONFIG_CRYPTO_CCM is not set | ||
931 | # CONFIG_CRYPTO_GCM is not set | ||
932 | # CONFIG_CRYPTO_SEQIV is not set | ||
933 | |||
934 | # | ||
935 | # Block modes | ||
936 | # | ||
937 | # CONFIG_CRYPTO_CBC is not set | ||
938 | # CONFIG_CRYPTO_CTR is not set | ||
939 | # CONFIG_CRYPTO_CTS is not set | ||
940 | # CONFIG_CRYPTO_ECB is not set | ||
941 | # CONFIG_CRYPTO_LRW is not set | ||
942 | # CONFIG_CRYPTO_PCBC is not set | ||
943 | # CONFIG_CRYPTO_XTS is not set | ||
944 | |||
945 | # | ||
946 | # Hash modes | ||
947 | # | ||
768 | # CONFIG_CRYPTO_HMAC is not set | 948 | # CONFIG_CRYPTO_HMAC is not set |
769 | # CONFIG_CRYPTO_XCBC is not set | 949 | # CONFIG_CRYPTO_XCBC is not set |
770 | # CONFIG_CRYPTO_NULL is not set | 950 | |
951 | # | ||
952 | # Digest | ||
953 | # | ||
954 | # CONFIG_CRYPTO_CRC32C is not set | ||
771 | # CONFIG_CRYPTO_MD4 is not set | 955 | # CONFIG_CRYPTO_MD4 is not set |
772 | # CONFIG_CRYPTO_MD5 is not set | 956 | # CONFIG_CRYPTO_MD5 is not set |
957 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
773 | # CONFIG_CRYPTO_SHA1 is not set | 958 | # CONFIG_CRYPTO_SHA1 is not set |
774 | # CONFIG_CRYPTO_SHA256 is not set | 959 | # CONFIG_CRYPTO_SHA256 is not set |
775 | # CONFIG_CRYPTO_SHA512 is not set | 960 | # CONFIG_CRYPTO_SHA512 is not set |
776 | # CONFIG_CRYPTO_WP512 is not set | ||
777 | # CONFIG_CRYPTO_TGR192 is not set | 961 | # CONFIG_CRYPTO_TGR192 is not set |
778 | # CONFIG_CRYPTO_GF128MUL is not set | 962 | # CONFIG_CRYPTO_WP512 is not set |
779 | # CONFIG_CRYPTO_ECB is not set | 963 | |
780 | # CONFIG_CRYPTO_CBC is not set | 964 | # |
781 | # CONFIG_CRYPTO_PCBC is not set | 965 | # Ciphers |
782 | # CONFIG_CRYPTO_LRW is not set | 966 | # |
783 | # CONFIG_CRYPTO_XTS is not set | ||
784 | # CONFIG_CRYPTO_CTR is not set | ||
785 | # CONFIG_CRYPTO_GCM is not set | ||
786 | # CONFIG_CRYPTO_CCM is not set | ||
787 | # CONFIG_CRYPTO_CRYPTD is not set | ||
788 | # CONFIG_CRYPTO_DES is not set | ||
789 | # CONFIG_CRYPTO_FCRYPT is not set | ||
790 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
791 | # CONFIG_CRYPTO_TWOFISH is not set | ||
792 | # CONFIG_CRYPTO_SERPENT is not set | ||
793 | # CONFIG_CRYPTO_AES is not set | 967 | # CONFIG_CRYPTO_AES is not set |
968 | # CONFIG_CRYPTO_ANUBIS is not set | ||
969 | # CONFIG_CRYPTO_ARC4 is not set | ||
970 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
971 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
794 | # CONFIG_CRYPTO_CAST5 is not set | 972 | # CONFIG_CRYPTO_CAST5 is not set |
795 | # CONFIG_CRYPTO_CAST6 is not set | 973 | # CONFIG_CRYPTO_CAST6 is not set |
796 | # CONFIG_CRYPTO_TEA is not set | 974 | # CONFIG_CRYPTO_DES is not set |
797 | # CONFIG_CRYPTO_ARC4 is not set | 975 | # CONFIG_CRYPTO_FCRYPT is not set |
798 | # CONFIG_CRYPTO_KHAZAD is not set | 976 | # CONFIG_CRYPTO_KHAZAD is not set |
799 | # CONFIG_CRYPTO_ANUBIS is not set | ||
800 | # CONFIG_CRYPTO_SEED is not set | ||
801 | # CONFIG_CRYPTO_SALSA20 is not set | 977 | # CONFIG_CRYPTO_SALSA20 is not set |
978 | # CONFIG_CRYPTO_SEED is not set | ||
979 | # CONFIG_CRYPTO_SERPENT is not set | ||
980 | # CONFIG_CRYPTO_TEA is not set | ||
981 | # CONFIG_CRYPTO_TWOFISH is not set | ||
982 | |||
983 | # | ||
984 | # Compression | ||
985 | # | ||
802 | # CONFIG_CRYPTO_DEFLATE is not set | 986 | # CONFIG_CRYPTO_DEFLATE is not set |
803 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
804 | # CONFIG_CRYPTO_CRC32C is not set | ||
805 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
806 | # CONFIG_CRYPTO_TEST is not set | ||
807 | # CONFIG_CRYPTO_AUTHENC is not set | ||
808 | # CONFIG_CRYPTO_LZO is not set | 987 | # CONFIG_CRYPTO_LZO is not set |
809 | CONFIG_CRYPTO_HW=y | 988 | CONFIG_CRYPTO_HW=y |
810 | 989 | ||
@@ -812,6 +991,7 @@ CONFIG_CRYPTO_HW=y | |||
812 | # Library routines | 991 | # Library routines |
813 | # | 992 | # |
814 | CONFIG_BITREVERSE=y | 993 | CONFIG_BITREVERSE=y |
994 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
815 | # CONFIG_CRC_CCITT is not set | 995 | # CONFIG_CRC_CCITT is not set |
816 | # CONFIG_CRC16 is not set | 996 | # CONFIG_CRC16 is not set |
817 | # CONFIG_CRC_ITU_T is not set | 997 | # CONFIG_CRC_ITU_T is not set |
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig new file mode 100644 index 000000000000..a0ebd439cbd2 --- /dev/null +++ b/arch/sh/configs/rsk7203_defconfig | |||
@@ -0,0 +1,841 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.26-rc4 | ||
4 | # Tue Jun 3 13:02:42 2008 | ||
5 | # | ||
6 | CONFIG_SUPERH=y | ||
7 | CONFIG_SUPERH32=y | ||
8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
9 | CONFIG_GENERIC_BUG=y | ||
10 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
11 | CONFIG_GENERIC_HWEIGHT=y | ||
12 | CONFIG_GENERIC_HARDIRQS=y | ||
13 | CONFIG_GENERIC_IRQ_PROBE=y | ||
14 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
15 | # CONFIG_GENERIC_TIME is not set | ||
16 | # CONFIG_GENERIC_CLOCKEVENTS is not set | ||
17 | CONFIG_STACKTRACE_SUPPORT=y | ||
18 | CONFIG_LOCKDEP_SUPPORT=y | ||
19 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
20 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
21 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | ||
22 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_EXPERIMENTAL=y | ||
29 | CONFIG_BROKEN_ON_SMP=y | ||
30 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
31 | CONFIG_LOCALVERSION="" | ||
32 | # CONFIG_LOCALVERSION_AUTO is not set | ||
33 | CONFIG_SYSVIPC=y | ||
34 | CONFIG_SYSVIPC_SYSCTL=y | ||
35 | CONFIG_POSIX_MQUEUE=y | ||
36 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
37 | # CONFIG_TASKSTATS is not set | ||
38 | # CONFIG_AUDIT is not set | ||
39 | # CONFIG_IKCONFIG is not set | ||
40 | CONFIG_LOG_BUF_SHIFT=14 | ||
41 | # CONFIG_CGROUPS is not set | ||
42 | CONFIG_GROUP_SCHED=y | ||
43 | CONFIG_FAIR_GROUP_SCHED=y | ||
44 | # CONFIG_RT_GROUP_SCHED is not set | ||
45 | CONFIG_USER_SCHED=y | ||
46 | # CONFIG_CGROUP_SCHED is not set | ||
47 | CONFIG_SYSFS_DEPRECATED=y | ||
48 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
49 | # CONFIG_RELAY is not set | ||
50 | # CONFIG_NAMESPACES is not set | ||
51 | CONFIG_BLK_DEV_INITRD=y | ||
52 | CONFIG_INITRAMFS_SOURCE="" | ||
53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
54 | CONFIG_SYSCTL=y | ||
55 | CONFIG_EMBEDDED=y | ||
56 | CONFIG_UID16=y | ||
57 | CONFIG_SYSCTL_SYSCALL=y | ||
58 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
59 | CONFIG_KALLSYMS=y | ||
60 | CONFIG_KALLSYMS_ALL=y | ||
61 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
62 | CONFIG_HOTPLUG=y | ||
63 | CONFIG_PRINTK=y | ||
64 | CONFIG_BUG=y | ||
65 | CONFIG_ELF_CORE=y | ||
66 | CONFIG_COMPAT_BRK=y | ||
67 | CONFIG_BASE_FULL=y | ||
68 | CONFIG_FUTEX=y | ||
69 | CONFIG_ANON_INODES=y | ||
70 | CONFIG_EPOLL=y | ||
71 | CONFIG_SIGNALFD=y | ||
72 | CONFIG_TIMERFD=y | ||
73 | CONFIG_EVENTFD=y | ||
74 | CONFIG_VM_EVENT_COUNTERS=y | ||
75 | CONFIG_SLAB=y | ||
76 | # CONFIG_SLUB is not set | ||
77 | # CONFIG_SLOB is not set | ||
78 | CONFIG_PROFILING=y | ||
79 | # CONFIG_MARKERS is not set | ||
80 | CONFIG_OPROFILE=y | ||
81 | CONFIG_HAVE_OPROFILE=y | ||
82 | # CONFIG_HAVE_KPROBES is not set | ||
83 | # CONFIG_HAVE_KRETPROBES is not set | ||
84 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
85 | CONFIG_SLABINFO=y | ||
86 | CONFIG_RT_MUTEXES=y | ||
87 | CONFIG_TINY_SHMEM=y | ||
88 | CONFIG_BASE_SMALL=0 | ||
89 | # CONFIG_MODULES is not set | ||
90 | CONFIG_BLOCK=y | ||
91 | # CONFIG_LBD is not set | ||
92 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
93 | # CONFIG_LSF is not set | ||
94 | # CONFIG_BLK_DEV_BSG is not set | ||
95 | |||
96 | # | ||
97 | # IO Schedulers | ||
98 | # | ||
99 | CONFIG_IOSCHED_NOOP=y | ||
100 | # CONFIG_IOSCHED_AS is not set | ||
101 | # CONFIG_IOSCHED_DEADLINE is not set | ||
102 | # CONFIG_IOSCHED_CFQ is not set | ||
103 | # CONFIG_DEFAULT_AS is not set | ||
104 | # CONFIG_DEFAULT_DEADLINE is not set | ||
105 | # CONFIG_DEFAULT_CFQ is not set | ||
106 | CONFIG_DEFAULT_NOOP=y | ||
107 | CONFIG_DEFAULT_IOSCHED="noop" | ||
108 | CONFIG_CLASSIC_RCU=y | ||
109 | |||
110 | # | ||
111 | # System type | ||
112 | # | ||
113 | CONFIG_CPU_SH2=y | ||
114 | CONFIG_CPU_SH2A=y | ||
115 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | ||
116 | CONFIG_CPU_SUBTYPE_SH7203=y | ||
117 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
118 | # CONFIG_CPU_SUBTYPE_SH7263 is not set | ||
119 | # CONFIG_CPU_SUBTYPE_MXG is not set | ||
120 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | ||
121 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | ||
122 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | ||
123 | # CONFIG_CPU_SUBTYPE_SH7708 is not set | ||
124 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | ||
125 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | ||
126 | # CONFIG_CPU_SUBTYPE_SH7712 is not set | ||
127 | # CONFIG_CPU_SUBTYPE_SH7720 is not set | ||
128 | # CONFIG_CPU_SUBTYPE_SH7721 is not set | ||
129 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | ||
130 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | ||
131 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | ||
132 | # CONFIG_CPU_SUBTYPE_SH7750S is not set | ||
133 | # CONFIG_CPU_SUBTYPE_SH7751 is not set | ||
134 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | ||
135 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | ||
136 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | ||
137 | # CONFIG_CPU_SUBTYPE_SH7723 is not set | ||
138 | # CONFIG_CPU_SUBTYPE_SH7763 is not set | ||
139 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | ||
140 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | ||
141 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
142 | # CONFIG_CPU_SUBTYPE_SHX3 is not set | ||
143 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | ||
144 | # CONFIG_CPU_SUBTYPE_SH7722 is not set | ||
145 | # CONFIG_CPU_SUBTYPE_SH7366 is not set | ||
146 | # CONFIG_CPU_SUBTYPE_SH5_101 is not set | ||
147 | # CONFIG_CPU_SUBTYPE_SH5_103 is not set | ||
148 | |||
149 | # | ||
150 | # Memory management options | ||
151 | # | ||
152 | CONFIG_QUICKLIST=y | ||
153 | CONFIG_PAGE_OFFSET=0x00000000 | ||
154 | CONFIG_MEMORY_START=0x0c000000 | ||
155 | CONFIG_MEMORY_SIZE=0x01000000 | ||
156 | CONFIG_29BIT=y | ||
157 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
158 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
159 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | ||
160 | CONFIG_MAX_ACTIVE_REGIONS=1 | ||
161 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
162 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
163 | CONFIG_PAGE_SIZE_4KB=y | ||
164 | # CONFIG_PAGE_SIZE_8KB is not set | ||
165 | # CONFIG_PAGE_SIZE_64KB is not set | ||
166 | CONFIG_SELECT_MEMORY_MODEL=y | ||
167 | CONFIG_FLATMEM_MANUAL=y | ||
168 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
169 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
170 | CONFIG_FLATMEM=y | ||
171 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
172 | CONFIG_SPARSEMEM_STATIC=y | ||
173 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
174 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
175 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
176 | # CONFIG_RESOURCES_64BIT is not set | ||
177 | CONFIG_ZONE_DMA_FLAG=0 | ||
178 | CONFIG_NR_QUICK=2 | ||
179 | |||
180 | # | ||
181 | # Cache configuration | ||
182 | # | ||
183 | # CONFIG_SH_DIRECT_MAPPED is not set | ||
184 | CONFIG_CACHE_WRITEBACK=y | ||
185 | # CONFIG_CACHE_WRITETHROUGH is not set | ||
186 | # CONFIG_CACHE_OFF is not set | ||
187 | |||
188 | # | ||
189 | # Processor features | ||
190 | # | ||
191 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
192 | CONFIG_CPU_BIG_ENDIAN=y | ||
193 | CONFIG_SH_FPU=y | ||
194 | CONFIG_CPU_HAS_FPU=y | ||
195 | |||
196 | # | ||
197 | # Board support | ||
198 | # | ||
199 | |||
200 | # | ||
201 | # Timer and clock configuration | ||
202 | # | ||
203 | CONFIG_SH_CMT=y | ||
204 | # CONFIG_SH_MTU2 is not set | ||
205 | CONFIG_SH_TIMER_IRQ=142 | ||
206 | CONFIG_SH_PCLK_FREQ=16670800 | ||
207 | CONFIG_SH_CLK_MD=0 | ||
208 | # CONFIG_TICK_ONESHOT is not set | ||
209 | |||
210 | # | ||
211 | # CPU Frequency scaling | ||
212 | # | ||
213 | CONFIG_CPU_FREQ=y | ||
214 | CONFIG_CPU_FREQ_TABLE=y | ||
215 | # CONFIG_CPU_FREQ_DEBUG is not set | ||
216 | CONFIG_CPU_FREQ_STAT=y | ||
217 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | ||
218 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | ||
219 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
220 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | ||
221 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | ||
222 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | ||
223 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | ||
224 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | ||
225 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set | ||
226 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | ||
227 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | ||
228 | CONFIG_SH_CPU_FREQ=y | ||
229 | |||
230 | # | ||
231 | # DMA support | ||
232 | # | ||
233 | |||
234 | # | ||
235 | # Companion Chips | ||
236 | # | ||
237 | |||
238 | # | ||
239 | # Additional SuperH Device Drivers | ||
240 | # | ||
241 | CONFIG_HEARTBEAT=y | ||
242 | # CONFIG_PUSH_SWITCH is not set | ||
243 | |||
244 | # | ||
245 | # Kernel features | ||
246 | # | ||
247 | # CONFIG_HZ_100 is not set | ||
248 | # CONFIG_HZ_250 is not set | ||
249 | # CONFIG_HZ_300 is not set | ||
250 | CONFIG_HZ_1000=y | ||
251 | CONFIG_HZ=1000 | ||
252 | # CONFIG_SCHED_HRTICK is not set | ||
253 | # CONFIG_KEXEC is not set | ||
254 | # CONFIG_CRASH_DUMP is not set | ||
255 | CONFIG_PREEMPT_NONE=y | ||
256 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
257 | # CONFIG_PREEMPT is not set | ||
258 | CONFIG_GUSA=y | ||
259 | |||
260 | # | ||
261 | # Boot options | ||
262 | # | ||
263 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | ||
264 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
265 | CONFIG_CMDLINE_BOOL=y | ||
266 | CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel" | ||
267 | |||
268 | # | ||
269 | # Bus options | ||
270 | # | ||
271 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
272 | # CONFIG_PCCARD is not set | ||
273 | |||
274 | # | ||
275 | # Executable file formats | ||
276 | # | ||
277 | CONFIG_BINFMT_FLAT=y | ||
278 | CONFIG_BINFMT_ZFLAT=y | ||
279 | CONFIG_BINFMT_SHARED_FLAT=y | ||
280 | # CONFIG_BINFMT_MISC is not set | ||
281 | |||
282 | # | ||
283 | # Networking | ||
284 | # | ||
285 | CONFIG_NET=y | ||
286 | |||
287 | # | ||
288 | # Networking options | ||
289 | # | ||
290 | # CONFIG_PACKET is not set | ||
291 | # CONFIG_UNIX is not set | ||
292 | # CONFIG_NET_KEY is not set | ||
293 | CONFIG_INET=y | ||
294 | # CONFIG_IP_MULTICAST is not set | ||
295 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
296 | CONFIG_IP_FIB_HASH=y | ||
297 | CONFIG_IP_PNP=y | ||
298 | CONFIG_IP_PNP_DHCP=y | ||
299 | # CONFIG_IP_PNP_BOOTP is not set | ||
300 | # CONFIG_IP_PNP_RARP is not set | ||
301 | # CONFIG_NET_IPIP is not set | ||
302 | # CONFIG_NET_IPGRE is not set | ||
303 | # CONFIG_ARPD is not set | ||
304 | # CONFIG_SYN_COOKIES is not set | ||
305 | # CONFIG_INET_AH is not set | ||
306 | # CONFIG_INET_ESP is not set | ||
307 | # CONFIG_INET_IPCOMP is not set | ||
308 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
309 | # CONFIG_INET_TUNNEL is not set | ||
310 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
311 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
312 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
313 | # CONFIG_INET_LRO is not set | ||
314 | # CONFIG_INET_DIAG is not set | ||
315 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
316 | CONFIG_TCP_CONG_CUBIC=y | ||
317 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
318 | # CONFIG_TCP_MD5SIG is not set | ||
319 | # CONFIG_IPV6 is not set | ||
320 | # CONFIG_NETWORK_SECMARK is not set | ||
321 | # CONFIG_NETFILTER is not set | ||
322 | # CONFIG_IP_DCCP is not set | ||
323 | # CONFIG_IP_SCTP is not set | ||
324 | # CONFIG_TIPC is not set | ||
325 | # CONFIG_ATM is not set | ||
326 | # CONFIG_BRIDGE is not set | ||
327 | # CONFIG_VLAN_8021Q is not set | ||
328 | # CONFIG_DECNET is not set | ||
329 | # CONFIG_LLC2 is not set | ||
330 | # CONFIG_IPX is not set | ||
331 | # CONFIG_ATALK is not set | ||
332 | # CONFIG_X25 is not set | ||
333 | # CONFIG_LAPB is not set | ||
334 | # CONFIG_ECONET is not set | ||
335 | # CONFIG_WAN_ROUTER is not set | ||
336 | # CONFIG_NET_SCHED is not set | ||
337 | |||
338 | # | ||
339 | # Network testing | ||
340 | # | ||
341 | # CONFIG_NET_PKTGEN is not set | ||
342 | # CONFIG_HAMRADIO is not set | ||
343 | # CONFIG_CAN is not set | ||
344 | # CONFIG_IRDA is not set | ||
345 | # CONFIG_BT is not set | ||
346 | # CONFIG_AF_RXRPC is not set | ||
347 | |||
348 | # | ||
349 | # Wireless | ||
350 | # | ||
351 | # CONFIG_CFG80211 is not set | ||
352 | # CONFIG_WIRELESS_EXT is not set | ||
353 | # CONFIG_MAC80211 is not set | ||
354 | # CONFIG_IEEE80211 is not set | ||
355 | # CONFIG_RFKILL is not set | ||
356 | # CONFIG_NET_9P is not set | ||
357 | |||
358 | # | ||
359 | # Device Drivers | ||
360 | # | ||
361 | |||
362 | # | ||
363 | # Generic Driver Options | ||
364 | # | ||
365 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
366 | # CONFIG_STANDALONE is not set | ||
367 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
368 | # CONFIG_FW_LOADER is not set | ||
369 | # CONFIG_DEBUG_DRIVER is not set | ||
370 | # CONFIG_DEBUG_DEVRES is not set | ||
371 | # CONFIG_SYS_HYPERVISOR is not set | ||
372 | # CONFIG_CONNECTOR is not set | ||
373 | CONFIG_MTD=y | ||
374 | # CONFIG_MTD_DEBUG is not set | ||
375 | CONFIG_MTD_CONCAT=y | ||
376 | CONFIG_MTD_PARTITIONS=y | ||
377 | CONFIG_MTD_REDBOOT_PARTS=y | ||
378 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
379 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
380 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
381 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
382 | # CONFIG_MTD_AR7_PARTS is not set | ||
383 | |||
384 | # | ||
385 | # User Modules And Translation Layers | ||
386 | # | ||
387 | CONFIG_MTD_CHAR=y | ||
388 | CONFIG_MTD_BLKDEVS=y | ||
389 | CONFIG_MTD_BLOCK=y | ||
390 | # CONFIG_FTL is not set | ||
391 | # CONFIG_NFTL is not set | ||
392 | # CONFIG_INFTL is not set | ||
393 | # CONFIG_RFD_FTL is not set | ||
394 | # CONFIG_SSFDC is not set | ||
395 | # CONFIG_MTD_OOPS is not set | ||
396 | |||
397 | # | ||
398 | # RAM/ROM/Flash chip drivers | ||
399 | # | ||
400 | CONFIG_MTD_CFI=y | ||
401 | # CONFIG_MTD_JEDECPROBE is not set | ||
402 | CONFIG_MTD_GEN_PROBE=y | ||
403 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
404 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
405 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
406 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
407 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
408 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
409 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
410 | CONFIG_MTD_CFI_I1=y | ||
411 | CONFIG_MTD_CFI_I2=y | ||
412 | # CONFIG_MTD_CFI_I4 is not set | ||
413 | # CONFIG_MTD_CFI_I8 is not set | ||
414 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
415 | CONFIG_MTD_CFI_AMDSTD=y | ||
416 | # CONFIG_MTD_CFI_STAA is not set | ||
417 | CONFIG_MTD_CFI_UTIL=y | ||
418 | # CONFIG_MTD_RAM is not set | ||
419 | # CONFIG_MTD_ROM is not set | ||
420 | # CONFIG_MTD_ABSENT is not set | ||
421 | |||
422 | # | ||
423 | # Mapping drivers for chip access | ||
424 | # | ||
425 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
426 | CONFIG_MTD_PHYSMAP=y | ||
427 | CONFIG_MTD_PHYSMAP_START=0x20000000 | ||
428 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | ||
429 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | ||
430 | # CONFIG_MTD_UCLINUX is not set | ||
431 | # CONFIG_MTD_PLATRAM is not set | ||
432 | |||
433 | # | ||
434 | # Self-contained MTD device drivers | ||
435 | # | ||
436 | # CONFIG_MTD_SLRAM is not set | ||
437 | # CONFIG_MTD_PHRAM is not set | ||
438 | # CONFIG_MTD_MTDRAM is not set | ||
439 | # CONFIG_MTD_BLOCK2MTD is not set | ||
440 | |||
441 | # | ||
442 | # Disk-On-Chip Device Drivers | ||
443 | # | ||
444 | # CONFIG_MTD_DOC2000 is not set | ||
445 | # CONFIG_MTD_DOC2001 is not set | ||
446 | # CONFIG_MTD_DOC2001PLUS is not set | ||
447 | # CONFIG_MTD_NAND is not set | ||
448 | # CONFIG_MTD_ONENAND is not set | ||
449 | |||
450 | # | ||
451 | # UBI - Unsorted block images | ||
452 | # | ||
453 | # CONFIG_MTD_UBI is not set | ||
454 | # CONFIG_PARPORT is not set | ||
455 | CONFIG_BLK_DEV=y | ||
456 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
457 | # CONFIG_BLK_DEV_LOOP is not set | ||
458 | # CONFIG_BLK_DEV_NBD is not set | ||
459 | # CONFIG_BLK_DEV_RAM is not set | ||
460 | # CONFIG_CDROM_PKTCDVD is not set | ||
461 | # CONFIG_ATA_OVER_ETH is not set | ||
462 | CONFIG_MISC_DEVICES=y | ||
463 | # CONFIG_EEPROM_93CX6 is not set | ||
464 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
465 | CONFIG_HAVE_IDE=y | ||
466 | # CONFIG_IDE is not set | ||
467 | |||
468 | # | ||
469 | # SCSI device support | ||
470 | # | ||
471 | # CONFIG_RAID_ATTRS is not set | ||
472 | # CONFIG_SCSI is not set | ||
473 | # CONFIG_SCSI_DMA is not set | ||
474 | # CONFIG_SCSI_NETLINK is not set | ||
475 | # CONFIG_ATA is not set | ||
476 | # CONFIG_MD is not set | ||
477 | CONFIG_NETDEVICES=y | ||
478 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
479 | # CONFIG_DUMMY is not set | ||
480 | # CONFIG_BONDING is not set | ||
481 | # CONFIG_MACVLAN is not set | ||
482 | # CONFIG_EQUALIZER is not set | ||
483 | # CONFIG_TUN is not set | ||
484 | # CONFIG_VETH is not set | ||
485 | # CONFIG_PHYLIB is not set | ||
486 | CONFIG_NET_ETHERNET=y | ||
487 | CONFIG_MII=y | ||
488 | # CONFIG_AX88796 is not set | ||
489 | # CONFIG_STNIC is not set | ||
490 | CONFIG_SMC91X=y | ||
491 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
492 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
493 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
494 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
495 | # CONFIG_B44 is not set | ||
496 | CONFIG_NETDEV_1000=y | ||
497 | # CONFIG_E1000E_ENABLED is not set | ||
498 | CONFIG_NETDEV_10000=y | ||
499 | |||
500 | # | ||
501 | # Wireless LAN | ||
502 | # | ||
503 | # CONFIG_WLAN_PRE80211 is not set | ||
504 | # CONFIG_WLAN_80211 is not set | ||
505 | # CONFIG_IWLWIFI_LEDS is not set | ||
506 | # CONFIG_WAN is not set | ||
507 | # CONFIG_PPP is not set | ||
508 | # CONFIG_SLIP is not set | ||
509 | # CONFIG_NETCONSOLE is not set | ||
510 | # CONFIG_NETPOLL is not set | ||
511 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
512 | # CONFIG_ISDN is not set | ||
513 | # CONFIG_PHONE is not set | ||
514 | |||
515 | # | ||
516 | # Input device support | ||
517 | # | ||
518 | CONFIG_INPUT=y | ||
519 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
520 | # CONFIG_INPUT_POLLDEV is not set | ||
521 | |||
522 | # | ||
523 | # Userland interfaces | ||
524 | # | ||
525 | # CONFIG_INPUT_MOUSEDEV is not set | ||
526 | # CONFIG_INPUT_JOYDEV is not set | ||
527 | # CONFIG_INPUT_EVDEV is not set | ||
528 | # CONFIG_INPUT_EVBUG is not set | ||
529 | |||
530 | # | ||
531 | # Input Device Drivers | ||
532 | # | ||
533 | # CONFIG_INPUT_KEYBOARD is not set | ||
534 | # CONFIG_INPUT_MOUSE is not set | ||
535 | # CONFIG_INPUT_JOYSTICK is not set | ||
536 | # CONFIG_INPUT_TABLET is not set | ||
537 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
538 | # CONFIG_INPUT_MISC is not set | ||
539 | |||
540 | # | ||
541 | # Hardware I/O ports | ||
542 | # | ||
543 | # CONFIG_SERIO is not set | ||
544 | # CONFIG_GAMEPORT is not set | ||
545 | |||
546 | # | ||
547 | # Character devices | ||
548 | # | ||
549 | # CONFIG_VT is not set | ||
550 | CONFIG_DEVKMEM=y | ||
551 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
552 | |||
553 | # | ||
554 | # Serial drivers | ||
555 | # | ||
556 | # CONFIG_SERIAL_8250 is not set | ||
557 | |||
558 | # | ||
559 | # Non-8250 serial port support | ||
560 | # | ||
561 | CONFIG_SERIAL_SH_SCI=y | ||
562 | CONFIG_SERIAL_SH_SCI_NR_UARTS=4 | ||
563 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
564 | CONFIG_SERIAL_CORE=y | ||
565 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
566 | # CONFIG_UNIX98_PTYS is not set | ||
567 | # CONFIG_LEGACY_PTYS is not set | ||
568 | # CONFIG_IPMI_HANDLER is not set | ||
569 | # CONFIG_HW_RANDOM is not set | ||
570 | # CONFIG_R3964 is not set | ||
571 | # CONFIG_RAW_DRIVER is not set | ||
572 | # CONFIG_TCG_TPM is not set | ||
573 | # CONFIG_I2C is not set | ||
574 | # CONFIG_SPI is not set | ||
575 | # CONFIG_W1 is not set | ||
576 | # CONFIG_POWER_SUPPLY is not set | ||
577 | # CONFIG_HWMON is not set | ||
578 | CONFIG_THERMAL=y | ||
579 | # CONFIG_WATCHDOG is not set | ||
580 | |||
581 | # | ||
582 | # Sonics Silicon Backplane | ||
583 | # | ||
584 | CONFIG_SSB_POSSIBLE=y | ||
585 | # CONFIG_SSB is not set | ||
586 | |||
587 | # | ||
588 | # Multifunction device drivers | ||
589 | # | ||
590 | # CONFIG_MFD_SM501 is not set | ||
591 | # CONFIG_HTC_PASIC3 is not set | ||
592 | |||
593 | # | ||
594 | # Multimedia devices | ||
595 | # | ||
596 | |||
597 | # | ||
598 | # Multimedia core support | ||
599 | # | ||
600 | # CONFIG_VIDEO_DEV is not set | ||
601 | # CONFIG_DVB_CORE is not set | ||
602 | # CONFIG_VIDEO_MEDIA is not set | ||
603 | |||
604 | # | ||
605 | # Multimedia drivers | ||
606 | # | ||
607 | CONFIG_DAB=y | ||
608 | |||
609 | # | ||
610 | # Graphics support | ||
611 | # | ||
612 | # CONFIG_VGASTATE is not set | ||
613 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
614 | # CONFIG_FB is not set | ||
615 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
616 | |||
617 | # | ||
618 | # Display device support | ||
619 | # | ||
620 | # CONFIG_DISPLAY_SUPPORT is not set | ||
621 | |||
622 | # | ||
623 | # Sound | ||
624 | # | ||
625 | # CONFIG_SOUND is not set | ||
626 | CONFIG_HID_SUPPORT=y | ||
627 | CONFIG_HID=y | ||
628 | # CONFIG_HID_DEBUG is not set | ||
629 | # CONFIG_HIDRAW is not set | ||
630 | CONFIG_USB_SUPPORT=y | ||
631 | CONFIG_USB_ARCH_HAS_HCD=y | ||
632 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
633 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
634 | # CONFIG_USB is not set | ||
635 | # CONFIG_USB_OTG_WHITELIST is not set | ||
636 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
637 | |||
638 | # | ||
639 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
640 | # | ||
641 | # CONFIG_USB_GADGET is not set | ||
642 | # CONFIG_MMC is not set | ||
643 | # CONFIG_MEMSTICK is not set | ||
644 | # CONFIG_NEW_LEDS is not set | ||
645 | # CONFIG_ACCESSIBILITY is not set | ||
646 | CONFIG_RTC_LIB=y | ||
647 | CONFIG_RTC_CLASS=y | ||
648 | CONFIG_RTC_HCTOSYS=y | ||
649 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
650 | # CONFIG_RTC_DEBUG is not set | ||
651 | |||
652 | # | ||
653 | # RTC interfaces | ||
654 | # | ||
655 | CONFIG_RTC_INTF_SYSFS=y | ||
656 | CONFIG_RTC_INTF_PROC=y | ||
657 | CONFIG_RTC_INTF_DEV=y | ||
658 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
659 | # CONFIG_RTC_DRV_TEST is not set | ||
660 | |||
661 | # | ||
662 | # SPI RTC drivers | ||
663 | # | ||
664 | |||
665 | # | ||
666 | # Platform RTC drivers | ||
667 | # | ||
668 | # CONFIG_RTC_DRV_DS1511 is not set | ||
669 | # CONFIG_RTC_DRV_DS1553 is not set | ||
670 | # CONFIG_RTC_DRV_DS1742 is not set | ||
671 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
672 | # CONFIG_RTC_DRV_M48T86 is not set | ||
673 | # CONFIG_RTC_DRV_M48T59 is not set | ||
674 | # CONFIG_RTC_DRV_V3020 is not set | ||
675 | |||
676 | # | ||
677 | # on-CPU RTC drivers | ||
678 | # | ||
679 | CONFIG_RTC_DRV_SH=y | ||
680 | # CONFIG_UIO is not set | ||
681 | |||
682 | # | ||
683 | # File systems | ||
684 | # | ||
685 | # CONFIG_EXT2_FS is not set | ||
686 | # CONFIG_EXT3_FS is not set | ||
687 | # CONFIG_EXT4DEV_FS is not set | ||
688 | # CONFIG_REISERFS_FS is not set | ||
689 | # CONFIG_JFS_FS is not set | ||
690 | # CONFIG_FS_POSIX_ACL is not set | ||
691 | # CONFIG_XFS_FS is not set | ||
692 | # CONFIG_OCFS2_FS is not set | ||
693 | # CONFIG_DNOTIFY is not set | ||
694 | # CONFIG_INOTIFY is not set | ||
695 | # CONFIG_QUOTA is not set | ||
696 | # CONFIG_AUTOFS_FS is not set | ||
697 | # CONFIG_AUTOFS4_FS is not set | ||
698 | # CONFIG_FUSE_FS is not set | ||
699 | |||
700 | # | ||
701 | # CD-ROM/DVD Filesystems | ||
702 | # | ||
703 | # CONFIG_ISO9660_FS is not set | ||
704 | # CONFIG_UDF_FS is not set | ||
705 | |||
706 | # | ||
707 | # DOS/FAT/NT Filesystems | ||
708 | # | ||
709 | # CONFIG_MSDOS_FS is not set | ||
710 | # CONFIG_VFAT_FS is not set | ||
711 | # CONFIG_NTFS_FS is not set | ||
712 | |||
713 | # | ||
714 | # Pseudo filesystems | ||
715 | # | ||
716 | CONFIG_PROC_FS=y | ||
717 | CONFIG_PROC_SYSCTL=y | ||
718 | CONFIG_SYSFS=y | ||
719 | # CONFIG_TMPFS is not set | ||
720 | # CONFIG_HUGETLB_PAGE is not set | ||
721 | # CONFIG_CONFIGFS_FS is not set | ||
722 | |||
723 | # | ||
724 | # Miscellaneous filesystems | ||
725 | # | ||
726 | # CONFIG_ADFS_FS is not set | ||
727 | # CONFIG_AFFS_FS is not set | ||
728 | # CONFIG_HFS_FS is not set | ||
729 | # CONFIG_HFSPLUS_FS is not set | ||
730 | # CONFIG_BEFS_FS is not set | ||
731 | # CONFIG_BFS_FS is not set | ||
732 | # CONFIG_EFS_FS is not set | ||
733 | # CONFIG_JFFS2_FS is not set | ||
734 | # CONFIG_CRAMFS is not set | ||
735 | # CONFIG_VXFS_FS is not set | ||
736 | # CONFIG_MINIX_FS is not set | ||
737 | # CONFIG_HPFS_FS is not set | ||
738 | # CONFIG_QNX4FS_FS is not set | ||
739 | CONFIG_ROMFS_FS=y | ||
740 | # CONFIG_SYSV_FS is not set | ||
741 | # CONFIG_UFS_FS is not set | ||
742 | CONFIG_NETWORK_FILESYSTEMS=y | ||
743 | CONFIG_NFS_FS=y | ||
744 | # CONFIG_NFS_V3 is not set | ||
745 | # CONFIG_NFS_V4 is not set | ||
746 | # CONFIG_NFSD is not set | ||
747 | CONFIG_ROOT_NFS=y | ||
748 | CONFIG_LOCKD=y | ||
749 | CONFIG_NFS_COMMON=y | ||
750 | CONFIG_SUNRPC=y | ||
751 | # CONFIG_SUNRPC_BIND34 is not set | ||
752 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
753 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
754 | # CONFIG_SMB_FS is not set | ||
755 | # CONFIG_CIFS is not set | ||
756 | # CONFIG_NCP_FS is not set | ||
757 | # CONFIG_CODA_FS is not set | ||
758 | # CONFIG_AFS_FS is not set | ||
759 | |||
760 | # | ||
761 | # Partition Types | ||
762 | # | ||
763 | # CONFIG_PARTITION_ADVANCED is not set | ||
764 | CONFIG_MSDOS_PARTITION=y | ||
765 | # CONFIG_NLS is not set | ||
766 | # CONFIG_DLM is not set | ||
767 | |||
768 | # | ||
769 | # Kernel hacking | ||
770 | # | ||
771 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
772 | # CONFIG_PRINTK_TIME is not set | ||
773 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
774 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
775 | CONFIG_FRAME_WARN=1024 | ||
776 | CONFIG_MAGIC_SYSRQ=y | ||
777 | # CONFIG_UNUSED_SYMBOLS is not set | ||
778 | # CONFIG_DEBUG_FS is not set | ||
779 | # CONFIG_HEADERS_CHECK is not set | ||
780 | CONFIG_DEBUG_KERNEL=y | ||
781 | CONFIG_DEBUG_SHIRQ=y | ||
782 | CONFIG_DETECT_SOFTLOCKUP=y | ||
783 | CONFIG_SCHED_DEBUG=y | ||
784 | # CONFIG_SCHEDSTATS is not set | ||
785 | # CONFIG_TIMER_STATS is not set | ||
786 | # CONFIG_DEBUG_OBJECTS is not set | ||
787 | # CONFIG_DEBUG_SLAB is not set | ||
788 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
789 | # CONFIG_RT_MUTEX_TESTER is not set | ||
790 | # CONFIG_DEBUG_SPINLOCK is not set | ||
791 | CONFIG_DEBUG_MUTEXES=y | ||
792 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
793 | # CONFIG_PROVE_LOCKING is not set | ||
794 | # CONFIG_LOCK_STAT is not set | ||
795 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
796 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
797 | # CONFIG_DEBUG_KOBJECT is not set | ||
798 | CONFIG_DEBUG_BUGVERBOSE=y | ||
799 | CONFIG_DEBUG_INFO=y | ||
800 | # CONFIG_DEBUG_VM is not set | ||
801 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
802 | # CONFIG_DEBUG_LIST is not set | ||
803 | # CONFIG_DEBUG_SG is not set | ||
804 | CONFIG_FRAME_POINTER=y | ||
805 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
806 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
807 | # CONFIG_FAULT_INJECTION is not set | ||
808 | # CONFIG_SAMPLES is not set | ||
809 | # CONFIG_SH_STANDARD_BIOS is not set | ||
810 | CONFIG_EARLY_SCIF_CONSOLE=y | ||
811 | CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe8000 | ||
812 | CONFIG_EARLY_PRINTK=y | ||
813 | CONFIG_DEBUG_BOOTMEM=y | ||
814 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
815 | CONFIG_DEBUG_STACK_USAGE=y | ||
816 | # CONFIG_IRQSTACKS is not set | ||
817 | |||
818 | # | ||
819 | # Security options | ||
820 | # | ||
821 | # CONFIG_KEYS is not set | ||
822 | # CONFIG_SECURITY is not set | ||
823 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
824 | # CONFIG_CRYPTO is not set | ||
825 | |||
826 | # | ||
827 | # Library routines | ||
828 | # | ||
829 | CONFIG_BITREVERSE=y | ||
830 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
831 | # CONFIG_CRC_CCITT is not set | ||
832 | # CONFIG_CRC16 is not set | ||
833 | # CONFIG_CRC_ITU_T is not set | ||
834 | CONFIG_CRC32=y | ||
835 | # CONFIG_CRC7 is not set | ||
836 | # CONFIG_LIBCRC32C is not set | ||
837 | CONFIG_ZLIB_INFLATE=y | ||
838 | CONFIG_PLIST=y | ||
839 | CONFIG_HAS_IOMEM=y | ||
840 | CONFIG_HAS_IOPORT=y | ||
841 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig index 0d0cda908270..6b34baa26eae 100644 --- a/arch/sh/configs/se7206_defconfig +++ b/arch/sh/configs/se7206_defconfig | |||
@@ -1,9 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.23-rc4 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Thu Sep 13 16:40:16 2007 | 4 | # Tue Jun 3 20:27:08 2008 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | ||
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
8 | CONFIG_GENERIC_BUG=y | 9 | CONFIG_GENERIC_BUG=y |
9 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 10 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
@@ -18,6 +19,7 @@ CONFIG_LOCKDEP_SUPPORT=y | |||
18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 20 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
20 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 21 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
22 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
21 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
22 | 24 | ||
23 | # | 25 | # |
@@ -25,47 +27,82 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | |||
25 | # | 27 | # |
26 | CONFIG_EXPERIMENTAL=y | 28 | CONFIG_EXPERIMENTAL=y |
27 | CONFIG_BROKEN_ON_SMP=y | 29 | CONFIG_BROKEN_ON_SMP=y |
30 | CONFIG_LOCK_KERNEL=y | ||
28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 31 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
29 | CONFIG_LOCALVERSION="" | 32 | CONFIG_LOCALVERSION="" |
30 | # CONFIG_LOCALVERSION_AUTO is not set | 33 | CONFIG_LOCALVERSION_AUTO=y |
31 | # CONFIG_SYSVIPC is not set | 34 | CONFIG_SYSVIPC=y |
32 | # CONFIG_POSIX_MQUEUE is not set | 35 | CONFIG_SYSVIPC_SYSCTL=y |
33 | # CONFIG_BSD_PROCESS_ACCT is not set | 36 | CONFIG_POSIX_MQUEUE=y |
37 | CONFIG_BSD_PROCESS_ACCT=y | ||
38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
34 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
35 | # CONFIG_USER_NS is not set | 40 | CONFIG_AUDIT=y |
36 | # CONFIG_AUDIT is not set | 41 | CONFIG_AUDITSYSCALL=y |
37 | # CONFIG_IKCONFIG is not set | 42 | # CONFIG_IKCONFIG is not set |
38 | CONFIG_LOG_BUF_SHIFT=14 | 43 | CONFIG_LOG_BUF_SHIFT=14 |
39 | CONFIG_SYSFS_DEPRECATED=y | 44 | CONFIG_CGROUPS=y |
40 | # CONFIG_RELAY is not set | 45 | CONFIG_CGROUP_DEBUG=y |
41 | # CONFIG_BLK_DEV_INITRD is not set | 46 | CONFIG_CGROUP_NS=y |
47 | CONFIG_CGROUP_DEVICE=y | ||
48 | # CONFIG_GROUP_SCHED is not set | ||
49 | CONFIG_CGROUP_CPUACCT=y | ||
50 | CONFIG_RESOURCE_COUNTERS=y | ||
51 | CONFIG_MM_OWNER=y | ||
52 | CONFIG_CGROUP_MEM_RES_CTLR=y | ||
53 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
54 | CONFIG_RELAY=y | ||
55 | CONFIG_NAMESPACES=y | ||
56 | CONFIG_UTS_NS=y | ||
57 | CONFIG_IPC_NS=y | ||
58 | CONFIG_USER_NS=y | ||
59 | CONFIG_PID_NS=y | ||
60 | CONFIG_BLK_DEV_INITRD=y | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
42 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 62 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
43 | CONFIG_SYSCTL=y | 63 | CONFIG_SYSCTL=y |
44 | CONFIG_EMBEDDED=y | 64 | CONFIG_EMBEDDED=y |
45 | # CONFIG_UID16 is not set | 65 | # CONFIG_UID16 is not set |
46 | # CONFIG_SYSCTL_SYSCALL is not set | 66 | # CONFIG_SYSCTL_SYSCALL is not set |
47 | # CONFIG_KALLSYMS is not set | 67 | CONFIG_KALLSYMS=y |
48 | # CONFIG_HOTPLUG is not set | 68 | CONFIG_KALLSYMS_ALL=y |
69 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
70 | CONFIG_HOTPLUG=y | ||
49 | CONFIG_PRINTK=y | 71 | CONFIG_PRINTK=y |
50 | CONFIG_BUG=y | 72 | CONFIG_BUG=y |
51 | # CONFIG_ELF_CORE is not set | 73 | # CONFIG_ELF_CORE is not set |
52 | # CONFIG_BASE_FULL is not set | 74 | # CONFIG_COMPAT_BRK is not set |
53 | # CONFIG_FUTEX is not set | 75 | CONFIG_BASE_FULL=y |
76 | CONFIG_FUTEX=y | ||
54 | CONFIG_ANON_INODES=y | 77 | CONFIG_ANON_INODES=y |
55 | # CONFIG_EPOLL is not set | 78 | CONFIG_EPOLL=y |
56 | CONFIG_SIGNALFD=y | 79 | CONFIG_SIGNALFD=y |
57 | CONFIG_TIMERFD=y | 80 | CONFIG_TIMERFD=y |
58 | CONFIG_EVENTFD=y | 81 | CONFIG_EVENTFD=y |
59 | # CONFIG_VM_EVENT_COUNTERS is not set | 82 | CONFIG_VM_EVENT_COUNTERS=y |
60 | CONFIG_SLUB_DEBUG=y | ||
61 | # CONFIG_SLAB is not set | 83 | # CONFIG_SLAB is not set |
62 | CONFIG_SLUB=y | 84 | # CONFIG_SLUB is not set |
63 | # CONFIG_SLOB is not set | 85 | CONFIG_SLOB=y |
86 | CONFIG_PROFILING=y | ||
87 | # CONFIG_MARKERS is not set | ||
88 | CONFIG_OPROFILE=y | ||
89 | CONFIG_HAVE_OPROFILE=y | ||
90 | # CONFIG_HAVE_KPROBES is not set | ||
91 | # CONFIG_HAVE_KRETPROBES is not set | ||
92 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
93 | CONFIG_RT_MUTEXES=y | ||
64 | CONFIG_TINY_SHMEM=y | 94 | CONFIG_TINY_SHMEM=y |
65 | CONFIG_BASE_SMALL=1 | 95 | CONFIG_BASE_SMALL=0 |
66 | # CONFIG_MODULES is not set | 96 | CONFIG_MODULES=y |
97 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
98 | CONFIG_MODULE_UNLOAD=y | ||
99 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
100 | # CONFIG_MODVERSIONS is not set | ||
101 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
102 | # CONFIG_KMOD is not set | ||
67 | CONFIG_BLOCK=y | 103 | CONFIG_BLOCK=y |
68 | # CONFIG_LBD is not set | 104 | # CONFIG_LBD is not set |
105 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
69 | # CONFIG_LSF is not set | 106 | # CONFIG_LSF is not set |
70 | # CONFIG_BLK_DEV_BSG is not set | 107 | # CONFIG_BLK_DEV_BSG is not set |
71 | 108 | ||
@@ -81,6 +118,7 @@ CONFIG_IOSCHED_NOOP=y | |||
81 | # CONFIG_DEFAULT_CFQ is not set | 118 | # CONFIG_DEFAULT_CFQ is not set |
82 | CONFIG_DEFAULT_NOOP=y | 119 | CONFIG_DEFAULT_NOOP=y |
83 | CONFIG_DEFAULT_IOSCHED="noop" | 120 | CONFIG_DEFAULT_IOSCHED="noop" |
121 | # CONFIG_CLASSIC_RCU is not set | ||
84 | 122 | ||
85 | # | 123 | # |
86 | # System type | 124 | # System type |
@@ -88,7 +126,10 @@ CONFIG_DEFAULT_IOSCHED="noop" | |||
88 | CONFIG_CPU_SH2=y | 126 | CONFIG_CPU_SH2=y |
89 | CONFIG_CPU_SH2A=y | 127 | CONFIG_CPU_SH2A=y |
90 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | 128 | # CONFIG_CPU_SUBTYPE_SH7619 is not set |
129 | # CONFIG_CPU_SUBTYPE_SH7203 is not set | ||
91 | CONFIG_CPU_SUBTYPE_SH7206=y | 130 | CONFIG_CPU_SUBTYPE_SH7206=y |
131 | # CONFIG_CPU_SUBTYPE_SH7263 is not set | ||
132 | # CONFIG_CPU_SUBTYPE_MXG is not set | ||
92 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | 133 | # CONFIG_CPU_SUBTYPE_SH7705 is not set |
93 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | 134 | # CONFIG_CPU_SUBTYPE_SH7706 is not set |
94 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | 135 | # CONFIG_CPU_SUBTYPE_SH7707 is not set |
@@ -97,6 +138,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y | |||
97 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | 138 | # CONFIG_CPU_SUBTYPE_SH7710 is not set |
98 | # CONFIG_CPU_SUBTYPE_SH7712 is not set | 139 | # CONFIG_CPU_SUBTYPE_SH7712 is not set |
99 | # CONFIG_CPU_SUBTYPE_SH7720 is not set | 140 | # CONFIG_CPU_SUBTYPE_SH7720 is not set |
141 | # CONFIG_CPU_SUBTYPE_SH7721 is not set | ||
100 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | 142 | # CONFIG_CPU_SUBTYPE_SH7750 is not set |
101 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | 143 | # CONFIG_CPU_SUBTYPE_SH7091 is not set |
102 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | 144 | # CONFIG_CPU_SUBTYPE_SH7750R is not set |
@@ -105,14 +147,17 @@ CONFIG_CPU_SUBTYPE_SH7206=y | |||
105 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | 147 | # CONFIG_CPU_SUBTYPE_SH7751R is not set |
106 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | 148 | # CONFIG_CPU_SUBTYPE_SH7760 is not set |
107 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | 149 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set |
108 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | 150 | # CONFIG_CPU_SUBTYPE_SH7723 is not set |
109 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | 151 | # CONFIG_CPU_SUBTYPE_SH7763 is not set |
110 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 152 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
111 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 153 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
112 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | 154 | # CONFIG_CPU_SUBTYPE_SH7785 is not set |
113 | # CONFIG_CPU_SUBTYPE_SHX3 is not set | 155 | # CONFIG_CPU_SUBTYPE_SHX3 is not set |
114 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | 156 | # CONFIG_CPU_SUBTYPE_SH7343 is not set |
115 | # CONFIG_CPU_SUBTYPE_SH7722 is not set | 157 | # CONFIG_CPU_SUBTYPE_SH7722 is not set |
158 | # CONFIG_CPU_SUBTYPE_SH7366 is not set | ||
159 | # CONFIG_CPU_SUBTYPE_SH5_101 is not set | ||
160 | # CONFIG_CPU_SUBTYPE_SH5_103 is not set | ||
116 | 161 | ||
117 | # | 162 | # |
118 | # Memory management options | 163 | # Memory management options |
@@ -121,23 +166,25 @@ CONFIG_QUICKLIST=y | |||
121 | CONFIG_PAGE_OFFSET=0x00000000 | 166 | CONFIG_PAGE_OFFSET=0x00000000 |
122 | CONFIG_MEMORY_START=0x0c000000 | 167 | CONFIG_MEMORY_START=0x0c000000 |
123 | CONFIG_MEMORY_SIZE=0x04000000 | 168 | CONFIG_MEMORY_SIZE=0x04000000 |
169 | CONFIG_29BIT=y | ||
124 | CONFIG_ARCH_FLATMEM_ENABLE=y | 170 | CONFIG_ARCH_FLATMEM_ENABLE=y |
125 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 171 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
126 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | 172 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y |
127 | CONFIG_MAX_ACTIVE_REGIONS=1 | 173 | CONFIG_MAX_ACTIVE_REGIONS=1 |
128 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 174 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
129 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 175 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
130 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
131 | CONFIG_PAGE_SIZE_4KB=y | 176 | CONFIG_PAGE_SIZE_4KB=y |
132 | # CONFIG_PAGE_SIZE_8KB is not set | 177 | # CONFIG_PAGE_SIZE_8KB is not set |
133 | # CONFIG_PAGE_SIZE_64KB is not set | 178 | # CONFIG_PAGE_SIZE_64KB is not set |
134 | CONFIG_SELECT_MEMORY_MODEL=y | 179 | CONFIG_SELECT_MEMORY_MODEL=y |
135 | # CONFIG_FLATMEM_MANUAL is not set | 180 | CONFIG_FLATMEM_MANUAL=y |
136 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 181 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
137 | CONFIG_SPARSEMEM_MANUAL=y | 182 | # CONFIG_SPARSEMEM_MANUAL is not set |
138 | CONFIG_SPARSEMEM=y | 183 | CONFIG_FLATMEM=y |
139 | CONFIG_HAVE_MEMORY_PRESENT=y | 184 | CONFIG_FLAT_NODE_MEM_MAP=y |
140 | CONFIG_SPARSEMEM_STATIC=y | 185 | CONFIG_SPARSEMEM_STATIC=y |
186 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
187 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
141 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 188 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
142 | # CONFIG_RESOURCES_64BIT is not set | 189 | # CONFIG_RESOURCES_64BIT is not set |
143 | CONFIG_ZONE_DMA_FLAG=0 | 190 | CONFIG_ZONE_DMA_FLAG=0 |
@@ -183,13 +230,16 @@ CONFIG_CPU_FREQ_TABLE=y | |||
183 | CONFIG_CPU_FREQ_STAT=y | 230 | CONFIG_CPU_FREQ_STAT=y |
184 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 231 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
185 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 232 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
233 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
186 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 234 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
235 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | ||
236 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | ||
187 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 237 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
188 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 238 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
189 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set | 239 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set |
190 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | 240 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set |
191 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | 241 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set |
192 | # CONFIG_SH_CPU_FREQ is not set | 242 | CONFIG_SH_CPU_FREQ=y |
193 | 243 | ||
194 | # | 244 | # |
195 | # DMA support | 245 | # DMA support |
@@ -213,11 +263,15 @@ CONFIG_HEARTBEAT=y | |||
213 | # CONFIG_HZ_300 is not set | 263 | # CONFIG_HZ_300 is not set |
214 | CONFIG_HZ_1000=y | 264 | CONFIG_HZ_1000=y |
215 | CONFIG_HZ=1000 | 265 | CONFIG_HZ=1000 |
216 | # CONFIG_KEXEC is not set | 266 | # CONFIG_SCHED_HRTICK is not set |
267 | CONFIG_KEXEC=y | ||
217 | # CONFIG_CRASH_DUMP is not set | 268 | # CONFIG_CRASH_DUMP is not set |
218 | CONFIG_PREEMPT_NONE=y | 269 | # CONFIG_PREEMPT_NONE is not set |
219 | # CONFIG_PREEMPT_VOLUNTARY is not set | 270 | # CONFIG_PREEMPT_VOLUNTARY is not set |
220 | # CONFIG_PREEMPT is not set | 271 | CONFIG_PREEMPT=y |
272 | CONFIG_PREEMPT_RCU=y | ||
273 | CONFIG_RCU_TRACE=y | ||
274 | CONFIG_GUSA=y | ||
221 | 275 | ||
222 | # | 276 | # |
223 | # Boot options | 277 | # Boot options |
@@ -225,25 +279,25 @@ CONFIG_PREEMPT_NONE=y | |||
225 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | 279 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 |
226 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 280 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
227 | CONFIG_CMDLINE_BOOL=y | 281 | CONFIG_CMDLINE_BOOL=y |
228 | CONFIG_CMDLINE="console=ttySC3,115200 earlyprintk=serial ignore_loglevel" | 282 | CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial" |
229 | 283 | ||
230 | # | 284 | # |
231 | # Bus options | 285 | # Bus options |
232 | # | 286 | # |
233 | # CONFIG_CF_ENABLER is not set | 287 | CONFIG_CF_ENABLER=y |
288 | # CONFIG_CF_AREA5 is not set | ||
289 | CONFIG_CF_AREA6=y | ||
290 | CONFIG_CF_BASE_ADDR=0xb8000000 | ||
234 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 291 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
235 | 292 | # CONFIG_PCCARD is not set | |
236 | # | ||
237 | # PCCARD (PCMCIA/CardBus) support | ||
238 | # | ||
239 | 293 | ||
240 | # | 294 | # |
241 | # Executable file formats | 295 | # Executable file formats |
242 | # | 296 | # |
243 | CONFIG_BINFMT_FLAT=y | 297 | CONFIG_BINFMT_FLAT=y |
244 | CONFIG_BINFMT_ZFLAT=y | 298 | CONFIG_BINFMT_ZFLAT=y |
245 | # CONFIG_BINFMT_SHARED_FLAT is not set | 299 | CONFIG_BINFMT_SHARED_FLAT=y |
246 | # CONFIG_BINFMT_MISC is not set | 300 | CONFIG_BINFMT_MISC=y |
247 | 301 | ||
248 | # | 302 | # |
249 | # Networking | 303 | # Networking |
@@ -253,14 +307,24 @@ CONFIG_NET=y | |||
253 | # | 307 | # |
254 | # Networking options | 308 | # Networking options |
255 | # | 309 | # |
256 | # CONFIG_PACKET is not set | 310 | CONFIG_PACKET=y |
257 | # CONFIG_UNIX is not set | 311 | # CONFIG_PACKET_MMAP is not set |
258 | # CONFIG_NET_KEY is not set | 312 | CONFIG_UNIX=y |
313 | CONFIG_XFRM=y | ||
314 | # CONFIG_XFRM_USER is not set | ||
315 | # CONFIG_XFRM_SUB_POLICY is not set | ||
316 | # CONFIG_XFRM_MIGRATE is not set | ||
317 | # CONFIG_XFRM_STATISTICS is not set | ||
318 | CONFIG_NET_KEY=y | ||
319 | # CONFIG_NET_KEY_MIGRATE is not set | ||
259 | CONFIG_INET=y | 320 | CONFIG_INET=y |
260 | # CONFIG_IP_MULTICAST is not set | 321 | # CONFIG_IP_MULTICAST is not set |
261 | # CONFIG_IP_ADVANCED_ROUTER is not set | 322 | # CONFIG_IP_ADVANCED_ROUTER is not set |
262 | CONFIG_IP_FIB_HASH=y | 323 | CONFIG_IP_FIB_HASH=y |
263 | # CONFIG_IP_PNP is not set | 324 | CONFIG_IP_PNP=y |
325 | CONFIG_IP_PNP_DHCP=y | ||
326 | # CONFIG_IP_PNP_BOOTP is not set | ||
327 | # CONFIG_IP_PNP_RARP is not set | ||
264 | # CONFIG_NET_IPIP is not set | 328 | # CONFIG_NET_IPIP is not set |
265 | # CONFIG_NET_IPGRE is not set | 329 | # CONFIG_NET_IPGRE is not set |
266 | # CONFIG_ARPD is not set | 330 | # CONFIG_ARPD is not set |
@@ -273,14 +337,13 @@ CONFIG_IP_FIB_HASH=y | |||
273 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 337 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set |
274 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 338 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set |
275 | # CONFIG_INET_XFRM_MODE_BEET is not set | 339 | # CONFIG_INET_XFRM_MODE_BEET is not set |
340 | # CONFIG_INET_LRO is not set | ||
276 | # CONFIG_INET_DIAG is not set | 341 | # CONFIG_INET_DIAG is not set |
277 | # CONFIG_TCP_CONG_ADVANCED is not set | 342 | # CONFIG_TCP_CONG_ADVANCED is not set |
278 | CONFIG_TCP_CONG_CUBIC=y | 343 | CONFIG_TCP_CONG_CUBIC=y |
279 | CONFIG_DEFAULT_TCP_CONG="cubic" | 344 | CONFIG_DEFAULT_TCP_CONG="cubic" |
280 | # CONFIG_TCP_MD5SIG is not set | 345 | # CONFIG_TCP_MD5SIG is not set |
281 | # CONFIG_IPV6 is not set | 346 | # CONFIG_IPV6 is not set |
282 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
283 | # CONFIG_INET6_TUNNEL is not set | ||
284 | # CONFIG_NETWORK_SECMARK is not set | 347 | # CONFIG_NETWORK_SECMARK is not set |
285 | # CONFIG_NETFILTER is not set | 348 | # CONFIG_NETFILTER is not set |
286 | # CONFIG_IP_DCCP is not set | 349 | # CONFIG_IP_DCCP is not set |
@@ -297,10 +360,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
297 | # CONFIG_LAPB is not set | 360 | # CONFIG_LAPB is not set |
298 | # CONFIG_ECONET is not set | 361 | # CONFIG_ECONET is not set |
299 | # CONFIG_WAN_ROUTER is not set | 362 | # CONFIG_WAN_ROUTER is not set |
300 | |||
301 | # | ||
302 | # QoS and/or fair queueing | ||
303 | # | ||
304 | # CONFIG_NET_SCHED is not set | 363 | # CONFIG_NET_SCHED is not set |
305 | 364 | ||
306 | # | 365 | # |
@@ -308,6 +367,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
308 | # | 367 | # |
309 | # CONFIG_NET_PKTGEN is not set | 368 | # CONFIG_NET_PKTGEN is not set |
310 | # CONFIG_HAMRADIO is not set | 369 | # CONFIG_HAMRADIO is not set |
370 | # CONFIG_CAN is not set | ||
311 | # CONFIG_IRDA is not set | 371 | # CONFIG_IRDA is not set |
312 | # CONFIG_BT is not set | 372 | # CONFIG_BT is not set |
313 | # CONFIG_AF_RXRPC is not set | 373 | # CONFIG_AF_RXRPC is not set |
@@ -329,8 +389,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
329 | # | 389 | # |
330 | # Generic Driver Options | 390 | # Generic Driver Options |
331 | # | 391 | # |
392 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
332 | # CONFIG_STANDALONE is not set | 393 | # CONFIG_STANDALONE is not set |
333 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 394 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
395 | # CONFIG_FW_LOADER is not set | ||
334 | # CONFIG_DEBUG_DRIVER is not set | 396 | # CONFIG_DEBUG_DRIVER is not set |
335 | # CONFIG_DEBUG_DEVRES is not set | 397 | # CONFIG_DEBUG_DEVRES is not set |
336 | # CONFIG_SYS_HYPERVISOR is not set | 398 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -339,11 +401,9 @@ CONFIG_MTD=y | |||
339 | # CONFIG_MTD_DEBUG is not set | 401 | # CONFIG_MTD_DEBUG is not set |
340 | CONFIG_MTD_CONCAT=y | 402 | CONFIG_MTD_CONCAT=y |
341 | CONFIG_MTD_PARTITIONS=y | 403 | CONFIG_MTD_PARTITIONS=y |
342 | CONFIG_MTD_REDBOOT_PARTS=y | 404 | # CONFIG_MTD_REDBOOT_PARTS is not set |
343 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
344 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
345 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
346 | # CONFIG_MTD_CMDLINE_PARTS is not set | 405 | # CONFIG_MTD_CMDLINE_PARTS is not set |
406 | # CONFIG_MTD_AR7_PARTS is not set | ||
347 | 407 | ||
348 | # | 408 | # |
349 | # User Modules And Translation Layers | 409 | # User Modules And Translation Layers |
@@ -356,6 +416,7 @@ CONFIG_MTD_BLOCK=y | |||
356 | # CONFIG_INFTL is not set | 416 | # CONFIG_INFTL is not set |
357 | # CONFIG_RFD_FTL is not set | 417 | # CONFIG_RFD_FTL is not set |
358 | # CONFIG_SSFDC is not set | 418 | # CONFIG_SSFDC is not set |
419 | # CONFIG_MTD_OOPS is not set | ||
359 | 420 | ||
360 | # | 421 | # |
361 | # RAM/ROM/Flash chip drivers | 422 | # RAM/ROM/Flash chip drivers |
@@ -390,7 +451,6 @@ CONFIG_MTD_PHYSMAP=y | |||
390 | CONFIG_MTD_PHYSMAP_START=0x20000000 | 451 | CONFIG_MTD_PHYSMAP_START=0x20000000 |
391 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | 452 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 |
392 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | 453 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 |
393 | # CONFIG_MTD_SOLUTIONENGINE is not set | ||
394 | # CONFIG_MTD_UCLINUX is not set | 454 | # CONFIG_MTD_UCLINUX is not set |
395 | # CONFIG_MTD_PLATRAM is not set | 455 | # CONFIG_MTD_PLATRAM is not set |
396 | 456 | ||
@@ -418,13 +478,19 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | |||
418 | # CONFIG_PARPORT is not set | 478 | # CONFIG_PARPORT is not set |
419 | CONFIG_BLK_DEV=y | 479 | CONFIG_BLK_DEV=y |
420 | # CONFIG_BLK_DEV_COW_COMMON is not set | 480 | # CONFIG_BLK_DEV_COW_COMMON is not set |
421 | # CONFIG_BLK_DEV_LOOP is not set | 481 | CONFIG_BLK_DEV_LOOP=y |
482 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
422 | # CONFIG_BLK_DEV_NBD is not set | 483 | # CONFIG_BLK_DEV_NBD is not set |
423 | # CONFIG_BLK_DEV_RAM is not set | 484 | CONFIG_BLK_DEV_RAM=y |
485 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
486 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
487 | # CONFIG_BLK_DEV_XIP is not set | ||
424 | # CONFIG_CDROM_PKTCDVD is not set | 488 | # CONFIG_CDROM_PKTCDVD is not set |
425 | # CONFIG_ATA_OVER_ETH is not set | 489 | # CONFIG_ATA_OVER_ETH is not set |
426 | CONFIG_MISC_DEVICES=y | 490 | CONFIG_MISC_DEVICES=y |
427 | # CONFIG_EEPROM_93CX6 is not set | 491 | CONFIG_EEPROM_93CX6=y |
492 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
493 | CONFIG_HAVE_IDE=y | ||
428 | # CONFIG_IDE is not set | 494 | # CONFIG_IDE is not set |
429 | 495 | ||
430 | # | 496 | # |
@@ -443,23 +509,30 @@ CONFIG_NETDEVICES=y | |||
443 | # CONFIG_MACVLAN is not set | 509 | # CONFIG_MACVLAN is not set |
444 | # CONFIG_EQUALIZER is not set | 510 | # CONFIG_EQUALIZER is not set |
445 | # CONFIG_TUN is not set | 511 | # CONFIG_TUN is not set |
512 | # CONFIG_VETH is not set | ||
446 | # CONFIG_PHYLIB is not set | 513 | # CONFIG_PHYLIB is not set |
447 | CONFIG_NET_ETHERNET=y | 514 | CONFIG_NET_ETHERNET=y |
448 | CONFIG_MII=y | 515 | CONFIG_MII=y |
516 | # CONFIG_AX88796 is not set | ||
449 | # CONFIG_STNIC is not set | 517 | # CONFIG_STNIC is not set |
450 | CONFIG_SMC91X=y | 518 | CONFIG_SMC91X=y |
451 | CONFIG_NETDEV_1000=y | 519 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
452 | CONFIG_NETDEV_10000=y | 520 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
521 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
522 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
523 | # CONFIG_B44 is not set | ||
524 | # CONFIG_NETDEV_1000 is not set | ||
525 | # CONFIG_NETDEV_10000 is not set | ||
453 | 526 | ||
454 | # | 527 | # |
455 | # Wireless LAN | 528 | # Wireless LAN |
456 | # | 529 | # |
457 | # CONFIG_WLAN_PRE80211 is not set | 530 | # CONFIG_WLAN_PRE80211 is not set |
458 | # CONFIG_WLAN_80211 is not set | 531 | # CONFIG_WLAN_80211 is not set |
532 | # CONFIG_IWLWIFI_LEDS is not set | ||
459 | # CONFIG_WAN is not set | 533 | # CONFIG_WAN is not set |
460 | # CONFIG_PPP is not set | 534 | # CONFIG_PPP is not set |
461 | # CONFIG_SLIP is not set | 535 | # CONFIG_SLIP is not set |
462 | # CONFIG_SHAPER is not set | ||
463 | # CONFIG_NETCONSOLE is not set | 536 | # CONFIG_NETCONSOLE is not set |
464 | # CONFIG_NETPOLL is not set | 537 | # CONFIG_NETPOLL is not set |
465 | # CONFIG_NET_POLL_CONTROLLER is not set | 538 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -469,28 +542,7 @@ CONFIG_NETDEV_10000=y | |||
469 | # | 542 | # |
470 | # Input device support | 543 | # Input device support |
471 | # | 544 | # |
472 | CONFIG_INPUT=y | 545 | # CONFIG_INPUT is not set |
473 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
474 | # CONFIG_INPUT_POLLDEV is not set | ||
475 | |||
476 | # | ||
477 | # Userland interfaces | ||
478 | # | ||
479 | # CONFIG_INPUT_MOUSEDEV is not set | ||
480 | # CONFIG_INPUT_JOYDEV is not set | ||
481 | # CONFIG_INPUT_TSDEV is not set | ||
482 | # CONFIG_INPUT_EVDEV is not set | ||
483 | # CONFIG_INPUT_EVBUG is not set | ||
484 | |||
485 | # | ||
486 | # Input Device Drivers | ||
487 | # | ||
488 | # CONFIG_INPUT_KEYBOARD is not set | ||
489 | # CONFIG_INPUT_MOUSE is not set | ||
490 | # CONFIG_INPUT_JOYSTICK is not set | ||
491 | # CONFIG_INPUT_TABLET is not set | ||
492 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
493 | # CONFIG_INPUT_MISC is not set | ||
494 | 546 | ||
495 | # | 547 | # |
496 | # Hardware I/O ports | 548 | # Hardware I/O ports |
@@ -502,6 +554,7 @@ CONFIG_INPUT=y | |||
502 | # Character devices | 554 | # Character devices |
503 | # | 555 | # |
504 | # CONFIG_VT is not set | 556 | # CONFIG_VT is not set |
557 | # CONFIG_DEVKMEM is not set | ||
505 | # CONFIG_SERIAL_NONSTANDARD is not set | 558 | # CONFIG_SERIAL_NONSTANDARD is not set |
506 | 559 | ||
507 | # | 560 | # |
@@ -520,106 +573,119 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
520 | # CONFIG_UNIX98_PTYS is not set | 573 | # CONFIG_UNIX98_PTYS is not set |
521 | # CONFIG_LEGACY_PTYS is not set | 574 | # CONFIG_LEGACY_PTYS is not set |
522 | # CONFIG_IPMI_HANDLER is not set | 575 | # CONFIG_IPMI_HANDLER is not set |
523 | # CONFIG_WATCHDOG is not set | ||
524 | # CONFIG_HW_RANDOM is not set | 576 | # CONFIG_HW_RANDOM is not set |
525 | # CONFIG_R3964 is not set | 577 | # CONFIG_R3964 is not set |
526 | # CONFIG_RAW_DRIVER is not set | 578 | # CONFIG_RAW_DRIVER is not set |
527 | # CONFIG_TCG_TPM is not set | 579 | # CONFIG_TCG_TPM is not set |
528 | # CONFIG_I2C is not set | 580 | # CONFIG_I2C is not set |
529 | |||
530 | # | ||
531 | # SPI support | ||
532 | # | ||
533 | # CONFIG_SPI is not set | 581 | # CONFIG_SPI is not set |
534 | # CONFIG_SPI_MASTER is not set | ||
535 | # CONFIG_W1 is not set | 582 | # CONFIG_W1 is not set |
536 | # CONFIG_POWER_SUPPLY is not set | 583 | # CONFIG_POWER_SUPPLY is not set |
537 | # CONFIG_HWMON is not set | 584 | # CONFIG_HWMON is not set |
585 | # CONFIG_THERMAL is not set | ||
586 | # CONFIG_WATCHDOG is not set | ||
587 | |||
588 | # | ||
589 | # Sonics Silicon Backplane | ||
590 | # | ||
591 | CONFIG_SSB_POSSIBLE=y | ||
592 | # CONFIG_SSB is not set | ||
538 | 593 | ||
539 | # | 594 | # |
540 | # Multifunction device drivers | 595 | # Multifunction device drivers |
541 | # | 596 | # |
542 | # CONFIG_MFD_SM501 is not set | 597 | # CONFIG_MFD_SM501 is not set |
598 | # CONFIG_HTC_PASIC3 is not set | ||
543 | 599 | ||
544 | # | 600 | # |
545 | # Multimedia devices | 601 | # Multimedia devices |
546 | # | 602 | # |
603 | |||
604 | # | ||
605 | # Multimedia core support | ||
606 | # | ||
547 | # CONFIG_VIDEO_DEV is not set | 607 | # CONFIG_VIDEO_DEV is not set |
548 | # CONFIG_DVB_CORE is not set | 608 | # CONFIG_DVB_CORE is not set |
549 | CONFIG_DAB=y | 609 | # CONFIG_VIDEO_MEDIA is not set |
610 | |||
611 | # | ||
612 | # Multimedia drivers | ||
613 | # | ||
614 | # CONFIG_DAB is not set | ||
550 | 615 | ||
551 | # | 616 | # |
552 | # Graphics support | 617 | # Graphics support |
553 | # | 618 | # |
619 | # CONFIG_VGASTATE is not set | ||
620 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
621 | # CONFIG_FB is not set | ||
554 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 622 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
555 | 623 | ||
556 | # | 624 | # |
557 | # Display device support | 625 | # Display device support |
558 | # | 626 | # |
559 | # CONFIG_DISPLAY_SUPPORT is not set | 627 | # CONFIG_DISPLAY_SUPPORT is not set |
560 | # CONFIG_VGASTATE is not set | ||
561 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
562 | # CONFIG_FB is not set | ||
563 | 628 | ||
564 | # | 629 | # |
565 | # Sound | 630 | # Sound |
566 | # | 631 | # |
567 | # CONFIG_SOUND is not set | 632 | # CONFIG_SOUND is not set |
568 | CONFIG_HID_SUPPORT=y | 633 | # CONFIG_USB_SUPPORT is not set |
569 | CONFIG_HID=y | ||
570 | # CONFIG_HID_DEBUG is not set | ||
571 | CONFIG_USB_SUPPORT=y | ||
572 | CONFIG_USB_ARCH_HAS_HCD=y | ||
573 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
574 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
575 | # CONFIG_USB is not set | ||
576 | |||
577 | # | ||
578 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
579 | # | ||
580 | |||
581 | # | ||
582 | # USB Gadget Support | ||
583 | # | ||
584 | # CONFIG_USB_GADGET is not set | ||
585 | # CONFIG_MMC is not set | 634 | # CONFIG_MMC is not set |
635 | # CONFIG_MEMSTICK is not set | ||
586 | # CONFIG_NEW_LEDS is not set | 636 | # CONFIG_NEW_LEDS is not set |
587 | # CONFIG_RTC_CLASS is not set | 637 | # CONFIG_ACCESSIBILITY is not set |
638 | CONFIG_RTC_LIB=y | ||
639 | CONFIG_RTC_CLASS=y | ||
640 | CONFIG_RTC_HCTOSYS=y | ||
641 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
642 | # CONFIG_RTC_DEBUG is not set | ||
588 | 643 | ||
589 | # | 644 | # |
590 | # DMA Engine support | 645 | # RTC interfaces |
591 | # | 646 | # |
592 | # CONFIG_DMA_ENGINE is not set | 647 | CONFIG_RTC_INTF_SYSFS=y |
648 | CONFIG_RTC_INTF_PROC=y | ||
649 | CONFIG_RTC_INTF_DEV=y | ||
650 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
651 | # CONFIG_RTC_DRV_TEST is not set | ||
593 | 652 | ||
594 | # | 653 | # |
595 | # DMA Clients | 654 | # SPI RTC drivers |
596 | # | 655 | # |
597 | 656 | ||
598 | # | 657 | # |
599 | # DMA Devices | 658 | # Platform RTC drivers |
600 | # | 659 | # |
660 | # CONFIG_RTC_DRV_DS1511 is not set | ||
661 | # CONFIG_RTC_DRV_DS1553 is not set | ||
662 | # CONFIG_RTC_DRV_DS1742 is not set | ||
663 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
664 | # CONFIG_RTC_DRV_M48T86 is not set | ||
665 | # CONFIG_RTC_DRV_M48T59 is not set | ||
666 | # CONFIG_RTC_DRV_V3020 is not set | ||
601 | 667 | ||
602 | # | 668 | # |
603 | # Userspace I/O | 669 | # on-CPU RTC drivers |
604 | # | 670 | # |
671 | CONFIG_RTC_DRV_SH=y | ||
605 | # CONFIG_UIO is not set | 672 | # CONFIG_UIO is not set |
606 | 673 | ||
607 | # | 674 | # |
608 | # File systems | 675 | # File systems |
609 | # | 676 | # |
610 | # CONFIG_EXT2_FS is not set | 677 | CONFIG_EXT2_FS=y |
678 | # CONFIG_EXT2_FS_XATTR is not set | ||
611 | # CONFIG_EXT3_FS is not set | 679 | # CONFIG_EXT3_FS is not set |
612 | # CONFIG_EXT4DEV_FS is not set | 680 | # CONFIG_EXT4DEV_FS is not set |
613 | # CONFIG_REISERFS_FS is not set | 681 | # CONFIG_REISERFS_FS is not set |
614 | # CONFIG_JFS_FS is not set | 682 | # CONFIG_JFS_FS is not set |
615 | # CONFIG_FS_POSIX_ACL is not set | 683 | # CONFIG_FS_POSIX_ACL is not set |
616 | # CONFIG_XFS_FS is not set | 684 | # CONFIG_XFS_FS is not set |
617 | # CONFIG_GFS2_FS is not set | 685 | # CONFIG_OCFS2_FS is not set |
618 | # CONFIG_MINIX_FS is not set | 686 | # CONFIG_DNOTIFY is not set |
619 | CONFIG_ROMFS_FS=y | ||
620 | # CONFIG_INOTIFY is not set | 687 | # CONFIG_INOTIFY is not set |
621 | # CONFIG_QUOTA is not set | 688 | # CONFIG_QUOTA is not set |
622 | # CONFIG_DNOTIFY is not set | ||
623 | # CONFIG_AUTOFS_FS is not set | 689 | # CONFIG_AUTOFS_FS is not set |
624 | # CONFIG_AUTOFS4_FS is not set | 690 | # CONFIG_AUTOFS4_FS is not set |
625 | # CONFIG_FUSE_FS is not set | 691 | # CONFIG_FUSE_FS is not set |
@@ -642,10 +708,11 @@ CONFIG_ROMFS_FS=y | |||
642 | # | 708 | # |
643 | CONFIG_PROC_FS=y | 709 | CONFIG_PROC_FS=y |
644 | CONFIG_PROC_SYSCTL=y | 710 | CONFIG_PROC_SYSCTL=y |
645 | # CONFIG_SYSFS is not set | 711 | CONFIG_SYSFS=y |
646 | # CONFIG_TMPFS is not set | 712 | CONFIG_TMPFS=y |
713 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
647 | # CONFIG_HUGETLB_PAGE is not set | 714 | # CONFIG_HUGETLB_PAGE is not set |
648 | CONFIG_RAMFS=y | 715 | CONFIG_CONFIGFS_FS=y |
649 | 716 | ||
650 | # | 717 | # |
651 | # Miscellaneous filesystems | 718 | # Miscellaneous filesystems |
@@ -658,18 +725,28 @@ CONFIG_RAMFS=y | |||
658 | # CONFIG_BFS_FS is not set | 725 | # CONFIG_BFS_FS is not set |
659 | # CONFIG_EFS_FS is not set | 726 | # CONFIG_EFS_FS is not set |
660 | # CONFIG_JFFS2_FS is not set | 727 | # CONFIG_JFFS2_FS is not set |
661 | # CONFIG_CRAMFS is not set | 728 | CONFIG_CRAMFS=y |
662 | # CONFIG_VXFS_FS is not set | 729 | # CONFIG_VXFS_FS is not set |
730 | # CONFIG_MINIX_FS is not set | ||
663 | # CONFIG_HPFS_FS is not set | 731 | # CONFIG_HPFS_FS is not set |
664 | # CONFIG_QNX4FS_FS is not set | 732 | # CONFIG_QNX4FS_FS is not set |
733 | CONFIG_ROMFS_FS=y | ||
665 | # CONFIG_SYSV_FS is not set | 734 | # CONFIG_SYSV_FS is not set |
666 | # CONFIG_UFS_FS is not set | 735 | # CONFIG_UFS_FS is not set |
667 | 736 | CONFIG_NETWORK_FILESYSTEMS=y | |
668 | # | 737 | CONFIG_NFS_FS=y |
669 | # Network File Systems | 738 | CONFIG_NFS_V3=y |
670 | # | 739 | # CONFIG_NFS_V3_ACL is not set |
671 | # CONFIG_NFS_FS is not set | 740 | # CONFIG_NFS_V4 is not set |
672 | # CONFIG_NFSD is not set | 741 | # CONFIG_NFSD is not set |
742 | CONFIG_ROOT_NFS=y | ||
743 | CONFIG_LOCKD=y | ||
744 | CONFIG_LOCKD_V4=y | ||
745 | CONFIG_NFS_COMMON=y | ||
746 | CONFIG_SUNRPC=y | ||
747 | # CONFIG_SUNRPC_BIND34 is not set | ||
748 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
749 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
673 | # CONFIG_SMB_FS is not set | 750 | # CONFIG_SMB_FS is not set |
674 | # CONFIG_CIFS is not set | 751 | # CONFIG_CIFS is not set |
675 | # CONFIG_NCP_FS is not set | 752 | # CONFIG_NCP_FS is not set |
@@ -681,30 +758,20 @@ CONFIG_RAMFS=y | |||
681 | # | 758 | # |
682 | # CONFIG_PARTITION_ADVANCED is not set | 759 | # CONFIG_PARTITION_ADVANCED is not set |
683 | CONFIG_MSDOS_PARTITION=y | 760 | CONFIG_MSDOS_PARTITION=y |
684 | |||
685 | # | ||
686 | # Native Language Support | ||
687 | # | ||
688 | # CONFIG_NLS is not set | 761 | # CONFIG_NLS is not set |
689 | 762 | # CONFIG_DLM is not set | |
690 | # | ||
691 | # Distributed Lock Manager | ||
692 | # | ||
693 | |||
694 | # | ||
695 | # Profiling support | ||
696 | # | ||
697 | CONFIG_PROFILING=y | ||
698 | # CONFIG_OPROFILE is not set | ||
699 | 763 | ||
700 | # | 764 | # |
701 | # Kernel hacking | 765 | # Kernel hacking |
702 | # | 766 | # |
703 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 767 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
704 | # CONFIG_PRINTK_TIME is not set | 768 | # CONFIG_PRINTK_TIME is not set |
769 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
705 | # CONFIG_ENABLE_MUST_CHECK is not set | 770 | # CONFIG_ENABLE_MUST_CHECK is not set |
771 | CONFIG_FRAME_WARN=1024 | ||
706 | # CONFIG_MAGIC_SYSRQ is not set | 772 | # CONFIG_MAGIC_SYSRQ is not set |
707 | # CONFIG_UNUSED_SYMBOLS is not set | 773 | # CONFIG_UNUSED_SYMBOLS is not set |
774 | CONFIG_DEBUG_FS=y | ||
708 | # CONFIG_HEADERS_CHECK is not set | 775 | # CONFIG_HEADERS_CHECK is not set |
709 | CONFIG_DEBUG_KERNEL=y | 776 | CONFIG_DEBUG_KERNEL=y |
710 | # CONFIG_DEBUG_SHIRQ is not set | 777 | # CONFIG_DEBUG_SHIRQ is not set |
@@ -712,7 +779,10 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
712 | CONFIG_SCHED_DEBUG=y | 779 | CONFIG_SCHED_DEBUG=y |
713 | # CONFIG_SCHEDSTATS is not set | 780 | # CONFIG_SCHEDSTATS is not set |
714 | # CONFIG_TIMER_STATS is not set | 781 | # CONFIG_TIMER_STATS is not set |
715 | CONFIG_SLUB_DEBUG_ON=y | 782 | # CONFIG_DEBUG_OBJECTS is not set |
783 | CONFIG_DEBUG_PREEMPT=y | ||
784 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
785 | # CONFIG_RT_MUTEX_TESTER is not set | ||
716 | # CONFIG_DEBUG_SPINLOCK is not set | 786 | # CONFIG_DEBUG_SPINLOCK is not set |
717 | # CONFIG_DEBUG_MUTEXES is not set | 787 | # CONFIG_DEBUG_MUTEXES is not set |
718 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 788 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
@@ -722,38 +792,123 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y | |||
722 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 792 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
723 | # CONFIG_DEBUG_KOBJECT is not set | 793 | # CONFIG_DEBUG_KOBJECT is not set |
724 | CONFIG_DEBUG_BUGVERBOSE=y | 794 | CONFIG_DEBUG_BUGVERBOSE=y |
725 | CONFIG_DEBUG_INFO=y | 795 | # CONFIG_DEBUG_INFO is not set |
726 | # CONFIG_DEBUG_VM is not set | 796 | CONFIG_DEBUG_VM=y |
727 | # CONFIG_DEBUG_LIST is not set | 797 | # CONFIG_DEBUG_WRITECOUNT is not set |
798 | CONFIG_DEBUG_LIST=y | ||
799 | # CONFIG_DEBUG_SG is not set | ||
728 | CONFIG_FRAME_POINTER=y | 800 | CONFIG_FRAME_POINTER=y |
729 | CONFIG_FORCED_INLINING=y | 801 | # CONFIG_BOOT_PRINTK_DELAY is not set |
802 | # CONFIG_RCU_TORTURE_TEST is not set | ||
803 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
730 | # CONFIG_FAULT_INJECTION is not set | 804 | # CONFIG_FAULT_INJECTION is not set |
805 | # CONFIG_SAMPLES is not set | ||
731 | # CONFIG_SH_STANDARD_BIOS is not set | 806 | # CONFIG_SH_STANDARD_BIOS is not set |
732 | CONFIG_EARLY_SCIF_CONSOLE=y | 807 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
733 | CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe9800 | ||
734 | CONFIG_EARLY_PRINTK=y | ||
735 | # CONFIG_DEBUG_BOOTMEM is not set | 808 | # CONFIG_DEBUG_BOOTMEM is not set |
736 | CONFIG_DEBUG_STACKOVERFLOW=y | 809 | CONFIG_DEBUG_STACKOVERFLOW=y |
737 | CONFIG_DEBUG_STACK_USAGE=y | 810 | CONFIG_DEBUG_STACK_USAGE=y |
738 | # CONFIG_4KSTACKS is not set | 811 | # CONFIG_IRQSTACKS is not set |
739 | 812 | ||
740 | # | 813 | # |
741 | # Security options | 814 | # Security options |
742 | # | 815 | # |
743 | # CONFIG_KEYS is not set | 816 | # CONFIG_KEYS is not set |
744 | # CONFIG_CRYPTO is not set | 817 | # CONFIG_SECURITY is not set |
818 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
819 | CONFIG_CRYPTO=y | ||
820 | |||
821 | # | ||
822 | # Crypto core or helper | ||
823 | # | ||
824 | CONFIG_CRYPTO_ALGAPI=y | ||
825 | # CONFIG_CRYPTO_MANAGER is not set | ||
826 | # CONFIG_CRYPTO_GF128MUL is not set | ||
827 | # CONFIG_CRYPTO_NULL is not set | ||
828 | # CONFIG_CRYPTO_CRYPTD is not set | ||
829 | # CONFIG_CRYPTO_AUTHENC is not set | ||
830 | # CONFIG_CRYPTO_TEST is not set | ||
831 | |||
832 | # | ||
833 | # Authenticated Encryption with Associated Data | ||
834 | # | ||
835 | # CONFIG_CRYPTO_CCM is not set | ||
836 | # CONFIG_CRYPTO_GCM is not set | ||
837 | # CONFIG_CRYPTO_SEQIV is not set | ||
838 | |||
839 | # | ||
840 | # Block modes | ||
841 | # | ||
842 | # CONFIG_CRYPTO_CBC is not set | ||
843 | # CONFIG_CRYPTO_CTR is not set | ||
844 | # CONFIG_CRYPTO_CTS is not set | ||
845 | # CONFIG_CRYPTO_ECB is not set | ||
846 | # CONFIG_CRYPTO_LRW is not set | ||
847 | # CONFIG_CRYPTO_PCBC is not set | ||
848 | # CONFIG_CRYPTO_XTS is not set | ||
849 | |||
850 | # | ||
851 | # Hash modes | ||
852 | # | ||
853 | # CONFIG_CRYPTO_HMAC is not set | ||
854 | # CONFIG_CRYPTO_XCBC is not set | ||
855 | |||
856 | # | ||
857 | # Digest | ||
858 | # | ||
859 | # CONFIG_CRYPTO_CRC32C is not set | ||
860 | # CONFIG_CRYPTO_MD4 is not set | ||
861 | # CONFIG_CRYPTO_MD5 is not set | ||
862 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
863 | # CONFIG_CRYPTO_SHA1 is not set | ||
864 | # CONFIG_CRYPTO_SHA256 is not set | ||
865 | # CONFIG_CRYPTO_SHA512 is not set | ||
866 | # CONFIG_CRYPTO_TGR192 is not set | ||
867 | # CONFIG_CRYPTO_WP512 is not set | ||
868 | |||
869 | # | ||
870 | # Ciphers | ||
871 | # | ||
872 | # CONFIG_CRYPTO_AES is not set | ||
873 | # CONFIG_CRYPTO_ANUBIS is not set | ||
874 | # CONFIG_CRYPTO_ARC4 is not set | ||
875 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
876 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
877 | # CONFIG_CRYPTO_CAST5 is not set | ||
878 | # CONFIG_CRYPTO_CAST6 is not set | ||
879 | # CONFIG_CRYPTO_DES is not set | ||
880 | # CONFIG_CRYPTO_FCRYPT is not set | ||
881 | # CONFIG_CRYPTO_KHAZAD is not set | ||
882 | # CONFIG_CRYPTO_SALSA20 is not set | ||
883 | # CONFIG_CRYPTO_SEED is not set | ||
884 | # CONFIG_CRYPTO_SERPENT is not set | ||
885 | # CONFIG_CRYPTO_TEA is not set | ||
886 | # CONFIG_CRYPTO_TWOFISH is not set | ||
887 | |||
888 | # | ||
889 | # Compression | ||
890 | # | ||
891 | CONFIG_CRYPTO_DEFLATE=y | ||
892 | CONFIG_CRYPTO_LZO=y | ||
893 | # CONFIG_CRYPTO_HW is not set | ||
745 | 894 | ||
746 | # | 895 | # |
747 | # Library routines | 896 | # Library routines |
748 | # | 897 | # |
749 | CONFIG_BITREVERSE=y | 898 | CONFIG_BITREVERSE=y |
750 | # CONFIG_CRC_CCITT is not set | 899 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set |
751 | # CONFIG_CRC16 is not set | 900 | CONFIG_CRC_CCITT=y |
752 | # CONFIG_CRC_ITU_T is not set | 901 | CONFIG_CRC16=y |
902 | CONFIG_CRC_ITU_T=y | ||
753 | CONFIG_CRC32=y | 903 | CONFIG_CRC32=y |
754 | # CONFIG_CRC7 is not set | 904 | CONFIG_CRC7=y |
755 | # CONFIG_LIBCRC32C is not set | 905 | CONFIG_LIBCRC32C=y |
906 | CONFIG_AUDIT_GENERIC=y | ||
756 | CONFIG_ZLIB_INFLATE=y | 907 | CONFIG_ZLIB_INFLATE=y |
908 | CONFIG_ZLIB_DEFLATE=y | ||
909 | CONFIG_LZO_COMPRESS=y | ||
910 | CONFIG_LZO_DECOMPRESS=y | ||
911 | CONFIG_PLIST=y | ||
757 | CONFIG_HAS_IOMEM=y | 912 | CONFIG_HAS_IOMEM=y |
758 | CONFIG_HAS_IOPORT=y | 913 | CONFIG_HAS_IOPORT=y |
759 | CONFIG_HAS_DMA=y | 914 | CONFIG_HAS_DMA=y |
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index ab77b0e0fa0e..938817e34e2b 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c | |||
@@ -154,4 +154,4 @@ module_exit(heartbeat_exit); | |||
154 | 154 | ||
155 | MODULE_VERSION(DRV_VERSION); | 155 | MODULE_VERSION(DRV_VERSION); |
156 | MODULE_AUTHOR("Paul Mundt"); | 156 | MODULE_AUTHOR("Paul Mundt"); |
157 | MODULE_LICENSE("GPLv2"); | 157 | MODULE_LICENSE("GPL v2"); |
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c index de45c6a3e33b..79baa47af977 100644 --- a/arch/sh/kernel/cpu/irq/intc-sh5.c +++ b/arch/sh/kernel/cpu/irq/intc-sh5.c | |||
@@ -242,6 +242,7 @@ void __init plat_irq_setup(void) | |||
242 | reg += 8; | 242 | reg += 8; |
243 | } | 243 | } |
244 | } | 244 | } |
245 | } | ||
245 | #endif | 246 | #endif |
246 | 247 | ||
247 | /* | 248 | /* |
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index ebceb0dadff5..be4926969181 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -132,6 +132,7 @@ int __init detect_cpu_and_cache_system(void) | |||
132 | 132 | ||
133 | switch (prr) { | 133 | switch (prr) { |
134 | case 0x50: | 134 | case 0x50: |
135 | case 0x51: | ||
135 | boot_cpu_data.type = CPU_SH7723; | 136 | boot_cpu_data.type = CPU_SH7723; |
136 | boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE; | 137 | boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE; |
137 | break; | 138 | break; |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c index 805535aa505e..27fa81bef6a0 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c | |||
@@ -26,7 +26,7 @@ static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18, | |||
26 | 26 | ||
27 | static void master_clk_init(struct clk *clk) | 27 | static void master_clk_init(struct clk *clk) |
28 | { | 28 | { |
29 | clk->rate *= 36; | 29 | clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f]; |
30 | } | 30 | } |
31 | 31 | ||
32 | static struct clk_ops sh7785_master_clk_ops = { | 32 | static struct clk_ops sh7785_master_clk_ops = { |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 069314037049..62ebccf18b3c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | static struct resource usbf_resources[] = { | 17 | static struct resource usbf_resources[] = { |
18 | [0] = { | 18 | [0] = { |
19 | .name = "USBF", | 19 | .name = "m66592_udc", |
20 | .start = 0x04480000, | 20 | .start = 0x04480000, |
21 | .end = 0x044800FF, | 21 | .end = 0x044800FF, |
22 | .flags = IORESOURCE_MEM, | 22 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 16925cf28db8..a0470f2f5479 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -16,6 +16,21 @@ | |||
16 | 16 | ||
17 | static struct plat_sci_port sci_platform_data[] = { | 17 | static struct plat_sci_port sci_platform_data[] = { |
18 | { | 18 | { |
19 | .mapbase = 0xffe00000, | ||
20 | .flags = UPF_BOOT_AUTOCONF, | ||
21 | .type = PORT_SCIF, | ||
22 | .irqs = { 80, 80, 80, 80 }, | ||
23 | },{ | ||
24 | .mapbase = 0xffe10000, | ||
25 | .flags = UPF_BOOT_AUTOCONF, | ||
26 | .type = PORT_SCIF, | ||
27 | .irqs = { 81, 81, 81, 81 }, | ||
28 | },{ | ||
29 | .mapbase = 0xffe20000, | ||
30 | .flags = UPF_BOOT_AUTOCONF, | ||
31 | .type = PORT_SCIF, | ||
32 | .irqs = { 82, 82, 82, 82 }, | ||
33 | },{ | ||
19 | .mapbase = 0xa4e30000, | 34 | .mapbase = 0xa4e30000, |
20 | .flags = UPF_BOOT_AUTOCONF, | 35 | .flags = UPF_BOOT_AUTOCONF, |
21 | .type = PORT_SCI, | 36 | .type = PORT_SCI, |
@@ -73,9 +88,35 @@ static struct platform_device rtc_device = { | |||
73 | .resource = rtc_resources, | 88 | .resource = rtc_resources, |
74 | }; | 89 | }; |
75 | 90 | ||
91 | static struct resource sh7723_usb_host_resources[] = { | ||
92 | [0] = { | ||
93 | .name = "r8a66597_hcd", | ||
94 | .start = 0xa4d80000, | ||
95 | .end = 0xa4d800ff, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }, | ||
98 | [1] = { | ||
99 | .start = 65, | ||
100 | .end = 65, | ||
101 | .flags = IORESOURCE_IRQ, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static struct platform_device sh7723_usb_host_device = { | ||
106 | .name = "r8a66597_hcd", | ||
107 | .id = 0, | ||
108 | .dev = { | ||
109 | .dma_mask = NULL, /* not use dma */ | ||
110 | .coherent_dma_mask = 0xffffffff, | ||
111 | }, | ||
112 | .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), | ||
113 | .resource = sh7723_usb_host_resources, | ||
114 | }; | ||
115 | |||
76 | static struct platform_device *sh7723_devices[] __initdata = { | 116 | static struct platform_device *sh7723_devices[] __initdata = { |
77 | &sci_device, | 117 | &sci_device, |
78 | &rtc_device, | 118 | &rtc_device, |
119 | &sh7723_usb_host_device, | ||
79 | }; | 120 | }; |
80 | 121 | ||
81 | static int __init sh7723_devices_setup(void) | 122 | static int __init sh7723_devices_setup(void) |
@@ -153,7 +194,7 @@ static struct intc_vect vectors[] __initdata = { | |||
153 | INTC_VECT(VIO_VOUI,0x8E0), | 194 | INTC_VECT(VIO_VOUI,0x8E0), |
154 | 195 | ||
155 | INTC_VECT(SCIFA_SCIFA0,0x900), | 196 | INTC_VECT(SCIFA_SCIFA0,0x900), |
156 | INTC_VECT(VPU_VPUI,0x920), | 197 | INTC_VECT(VPU_VPUI,0x980), |
157 | INTC_VECT(TPU_TPUI,0x9A0), | 198 | INTC_VECT(TPU_TPUI,0x9A0), |
158 | INTC_VECT(ADC_ADI,0x9E0), | 199 | INTC_VECT(ADC_ADI,0x9E0), |
159 | INTC_VECT(USB_USI0,0xA20), | 200 | INTC_VECT(USB_USI0,0xA20), |
@@ -292,9 +333,3 @@ void __init plat_irq_setup(void) | |||
292 | { | 333 | { |
293 | register_intc_controller(&intc_desc); | 334 | register_intc_controller(&intc_desc); |
294 | } | 335 | } |
295 | |||
296 | void __init plat_mem_setup(void) | ||
297 | { | ||
298 | /* Register the URAM space as Node 1 */ | ||
299 | setup_bootmem_node(1, 0x055f0000, 0x05610000); | ||
300 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index ae2b22219f02..f189a559462b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c | |||
@@ -291,8 +291,9 @@ static struct intc_sense_reg irq_sense_registers[] __initdata = { | |||
291 | }; | 291 | }; |
292 | 292 | ||
293 | static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors, | 293 | static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors, |
294 | NULL, NULL, irq_mask_registers, irq_prio_registers, | 294 | NULL, irq_mask_registers, irq_prio_registers, |
295 | irq_sense_registers); | 295 | irq_sense_registers); |
296 | |||
296 | 297 | ||
297 | /* External interrupt pins in IRL mode */ | 298 | /* External interrupt pins in IRL mode */ |
298 | static struct intc_vect irl_vectors[] __initdata = { | 299 | static struct intc_vect irl_vectors[] __initdata = { |
@@ -324,10 +325,10 @@ static struct intc_mask_reg irl7654_mask_registers[] __initdata = { | |||
324 | }; | 325 | }; |
325 | 326 | ||
326 | static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7763-irl7654", irl_vectors, | 327 | static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7763-irl7654", irl_vectors, |
327 | NULL, NULL, irl7654_mask_registers, NULL, NULL); | 328 | NULL, irl7654_mask_registers, NULL, NULL); |
328 | 329 | ||
329 | static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors, | 330 | static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors, |
330 | NULL, NULL, irl3210_mask_registers, NULL, NULL); | 331 | NULL, irl3210_mask_registers, NULL, NULL); |
331 | 332 | ||
332 | #define INTC_ICR0 0xffd00000 | 333 | #define INTC_ICR0 0xffd00000 |
333 | #define INTC_INTMSK0 0xffd00044 | 334 | #define INTC_INTMSK0 0xffd00044 |
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 926b2e7b11c1..718bd2356b34 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S | |||
@@ -1,9 +1,6 @@ | |||
1 | /* $Id: entry.S,v 1.37 2004/06/11 13:02:46 doyu Exp $ | 1 | /* |
2 | * | ||
3 | * linux/arch/sh/entry.S | ||
4 | * | ||
5 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka | 2 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka |
6 | * Copyright (C) 2003 Paul Mundt | 3 | * Copyright (C) 2003 - 2008 Paul Mundt |
7 | * | 4 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 5 | * This file is subject to the terms and conditions of the GNU General Public |
9 | * License. See the file "COPYING" in the main directory of this archive | 6 | * License. See the file "COPYING" in the main directory of this archive |
@@ -262,6 +259,7 @@ __restore_all: | |||
262 | 259 | ||
263 | .align 2 | 260 | .align 2 |
264 | syscall_badsys: ! Bad syscall number | 261 | syscall_badsys: ! Bad syscall number |
262 | get_current_thread_info r8, r0 | ||
265 | mov #-ENOSYS, r0 | 263 | mov #-ENOSYS, r0 |
266 | bra resume_userspace | 264 | bra resume_userspace |
267 | mov.l r0, @(OFF_R0,r15) ! Return value | 265 | mov.l r0, @(OFF_R0,r15) ! Return value |
@@ -281,7 +279,9 @@ debug_trap: | |||
281 | mov.l 1f, r8 | 279 | mov.l 1f, r8 |
282 | add r0, r8 | 280 | add r0, r8 |
283 | mov.l @r8, r8 | 281 | mov.l @r8, r8 |
284 | jmp @r8 | 282 | jsr @r8 |
283 | nop | ||
284 | bra __restore_all | ||
285 | nop | 285 | nop |
286 | 286 | ||
287 | .align 2 | 287 | .align 2 |
diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S index d67d7ed09f22..ae0a382a82eb 100644 --- a/arch/sh/kernel/head_32.S +++ b/arch/sh/kernel/head_32.S | |||
@@ -30,8 +30,8 @@ ENTRY(empty_zero_page) | |||
30 | .long 0 /* RAMDISK_FLAGS */ | 30 | .long 0 /* RAMDISK_FLAGS */ |
31 | .long 0x0200 /* ORIG_ROOT_DEV */ | 31 | .long 0x0200 /* ORIG_ROOT_DEV */ |
32 | .long 1 /* LOADER_TYPE */ | 32 | .long 1 /* LOADER_TYPE */ |
33 | .long 0x00360000 /* INITRD_START */ | 33 | .long 0x00000000 /* INITRD_START */ |
34 | .long 0x000a0000 /* INITRD_SIZE */ | 34 | .long 0x00000000 /* INITRD_SIZE */ |
35 | #ifdef CONFIG_32BIT | 35 | #ifdef CONFIG_32BIT |
36 | .long 0x53453f00 + 32 /* "SE?" = 32 bit */ | 36 | .long 0x53453f00 + 32 /* "SE?" = 32 bit */ |
37 | #else | 37 | #else |
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c index f9bcc606127e..b151a25cb14d 100644 --- a/arch/sh/kernel/init_task.c +++ b/arch/sh/kernel/init_task.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <asm/pgtable.h> | 8 | #include <asm/pgtable.h> |
9 | 9 | ||
10 | static struct fs_struct init_fs = INIT_FS; | 10 | static struct fs_struct init_fs = INIT_FS; |
11 | static struct files_struct init_files = INIT_FILES; | ||
12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 11 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 12 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
14 | struct pt_regs fake_swapper_regs; | 13 | struct pt_regs fake_swapper_regs; |
diff --git a/arch/sh/kernel/kgdb_stub.c b/arch/sh/kernel/kgdb_stub.c index 832641bbd47d..bf8ac4c71640 100644 --- a/arch/sh/kernel/kgdb_stub.c +++ b/arch/sh/kernel/kgdb_stub.c | |||
@@ -274,8 +274,7 @@ static char *mem_to_hex(const char *mem, char *buf, const int count) | |||
274 | } | 274 | } |
275 | for (i = 0; i < count; i++) { | 275 | for (i = 0; i < count; i++) { |
276 | ch = *mem++; | 276 | ch = *mem++; |
277 | *buf++ = highhex(ch); | 277 | buf = pack_hex_byte(buf, ch); |
278 | *buf++ = lowhex(ch); | ||
279 | } | 278 | } |
280 | *buf = 0; | 279 | *buf = 0; |
281 | return (buf); | 280 | return (buf); |
@@ -427,8 +426,8 @@ static void put_packet(char *buffer) | |||
427 | 426 | ||
428 | /* '#' Separator, put high and low components of checksum */ | 427 | /* '#' Separator, put high and low components of checksum */ |
429 | put_debug_char('#'); | 428 | put_debug_char('#'); |
430 | put_debug_char(highhex(checksum)); | 429 | put_debug_char(hex_asc_hi(checksum)); |
431 | put_debug_char(lowhex(checksum)); | 430 | put_debug_char(hex_asc_lo(checksum)); |
432 | } | 431 | } |
433 | while ((get_debug_char()) != '+'); /* While no ack */ | 432 | while ((get_debug_char()) != '+'); /* While no ack */ |
434 | } | 433 | } |
@@ -650,8 +649,8 @@ static void undo_single_step(void) | |||
650 | static void send_signal_msg(const int signum) | 649 | static void send_signal_msg(const int signum) |
651 | { | 650 | { |
652 | out_buffer[0] = 'S'; | 651 | out_buffer[0] = 'S'; |
653 | out_buffer[1] = highhex(signum); | 652 | out_buffer[1] = hex_asc_hi(signum); |
654 | out_buffer[2] = lowhex(signum); | 653 | out_buffer[2] = hex_asc_lo(signum); |
655 | out_buffer[3] = 0; | 654 | out_buffer[3] = 0; |
656 | put_packet(out_buffer); | 655 | put_packet(out_buffer); |
657 | } | 656 | } |
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index b3d0a03b4c76..5482e65375a9 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <asm/unaligned.h> | ||
33 | 34 | ||
34 | void *module_alloc(unsigned long size) | 35 | void *module_alloc(unsigned long size) |
35 | { | 36 | { |
@@ -56,34 +57,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | 59 | ||
59 | #ifdef CONFIG_SUPERH32 | ||
60 | #define COPY_UNALIGNED_WORD(sw, tw, align) \ | ||
61 | { \ | ||
62 | void *__s = &(sw), *__t = &(tw); \ | ||
63 | unsigned short *__s2 = __s, *__t2 = __t; \ | ||
64 | unsigned char *__s1 = __s, *__t1 = __t; \ | ||
65 | switch ((align)) \ | ||
66 | { \ | ||
67 | case 0: \ | ||
68 | *(unsigned long *) __t = *(unsigned long *) __s; \ | ||
69 | break; \ | ||
70 | case 2: \ | ||
71 | *__t2++ = *__s2++; \ | ||
72 | *__t2 = *__s2; \ | ||
73 | break; \ | ||
74 | default: \ | ||
75 | *__t1++ = *__s1++; \ | ||
76 | *__t1++ = *__s1++; \ | ||
77 | *__t1++ = *__s1++; \ | ||
78 | *__t1 = *__s1; \ | ||
79 | break; \ | ||
80 | } \ | ||
81 | } | ||
82 | #else | ||
83 | /* One thing SHmedia doesn't screw up! */ | ||
84 | #define COPY_UNALIGNED_WORD(sw, tw, align) { (tw) = (sw); } | ||
85 | #endif | ||
86 | |||
87 | int apply_relocate_add(Elf32_Shdr *sechdrs, | 60 | int apply_relocate_add(Elf32_Shdr *sechdrs, |
88 | const char *strtab, | 61 | const char *strtab, |
89 | unsigned int symindex, | 62 | unsigned int symindex, |
@@ -96,7 +69,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
96 | Elf32_Addr relocation; | 69 | Elf32_Addr relocation; |
97 | uint32_t *location; | 70 | uint32_t *location; |
98 | uint32_t value; | 71 | uint32_t value; |
99 | int align; | ||
100 | 72 | ||
101 | pr_debug("Applying relocate section %u to %u\n", relsec, | 73 | pr_debug("Applying relocate section %u to %u\n", relsec, |
102 | sechdrs[relsec].sh_info); | 74 | sechdrs[relsec].sh_info); |
@@ -109,7 +81,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
109 | sym = (Elf32_Sym *)sechdrs[symindex].sh_addr | 81 | sym = (Elf32_Sym *)sechdrs[symindex].sh_addr |
110 | + ELF32_R_SYM(rel[i].r_info); | 82 | + ELF32_R_SYM(rel[i].r_info); |
111 | relocation = sym->st_value + rel[i].r_addend; | 83 | relocation = sym->st_value + rel[i].r_addend; |
112 | align = (int)location & 3; | ||
113 | 84 | ||
114 | #ifdef CONFIG_SUPERH64 | 85 | #ifdef CONFIG_SUPERH64 |
115 | /* For text addresses, bit2 of the st_other field indicates | 86 | /* For text addresses, bit2 of the st_other field indicates |
@@ -122,15 +93,15 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
122 | 93 | ||
123 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 94 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
124 | case R_SH_DIR32: | 95 | case R_SH_DIR32: |
125 | COPY_UNALIGNED_WORD (*location, value, align); | 96 | value = get_unaligned(location); |
126 | value += relocation; | 97 | value += relocation; |
127 | COPY_UNALIGNED_WORD (value, *location, align); | 98 | put_unaligned(value, location); |
128 | break; | 99 | break; |
129 | case R_SH_REL32: | 100 | case R_SH_REL32: |
130 | relocation = (relocation - (Elf32_Addr) location); | 101 | relocation = (relocation - (Elf32_Addr) location); |
131 | COPY_UNALIGNED_WORD (*location, value, align); | 102 | value = get_unaligned(location); |
132 | value += relocation; | 103 | value += relocation; |
133 | COPY_UNALIGNED_WORD (value, *location, align); | 104 | put_unaligned(value, location); |
134 | break; | 105 | break; |
135 | case R_SH_IMM_LOW16: | 106 | case R_SH_IMM_LOW16: |
136 | *location = (*location & ~0x3fffc00) | | 107 | *location = (*location & ~0x3fffc00) | |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 516bde9c50fa..bca2bbc575db 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -292,6 +292,17 @@ void __init setup_arch(char **cmdline_p) | |||
292 | 292 | ||
293 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 293 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); |
294 | 294 | ||
295 | printk(KERN_NOTICE "Boot params:\n" | ||
296 | "... MOUNT_ROOT_RDONLY - %08lx\n" | ||
297 | "... RAMDISK_FLAGS - %08lx\n" | ||
298 | "... ORIG_ROOT_DEV - %08lx\n" | ||
299 | "... LOADER_TYPE - %08lx\n" | ||
300 | "... INITRD_START - %08lx\n" | ||
301 | "... INITRD_SIZE - %08lx\n", | ||
302 | MOUNT_ROOT_RDONLY, RAMDISK_FLAGS, | ||
303 | ORIG_ROOT_DEV, LOADER_TYPE, | ||
304 | INITRD_START, INITRD_SIZE); | ||
305 | |||
295 | #ifdef CONFIG_BLK_DEV_RAM | 306 | #ifdef CONFIG_BLK_DEV_RAM |
296 | rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; | 307 | rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; |
297 | rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); | 308 | rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); |
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index a3bdc68ef02c..438f1ebcc453 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/kdebug.h> | 4 | #include <linux/kdebug.h> |
5 | #include <linux/signal.h> | 5 | #include <linux/signal.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/uaccess.h> | ||
7 | #include <asm/system.h> | 8 | #include <asm/system.h> |
8 | 9 | ||
9 | #ifdef CONFIG_BUG | 10 | #ifdef CONFIG_BUG |
@@ -21,7 +22,14 @@ static void handle_BUG(struct pt_regs *regs) | |||
21 | 22 | ||
22 | int is_valid_bugaddr(unsigned long addr) | 23 | int is_valid_bugaddr(unsigned long addr) |
23 | { | 24 | { |
24 | return addr >= PAGE_OFFSET; | 25 | unsigned short opcode; |
26 | |||
27 | if (addr < PAGE_OFFSET) | ||
28 | return 0; | ||
29 | if (probe_kernel_address((u16 *)addr, opcode)) | ||
30 | return 0; | ||
31 | |||
32 | return opcode == TRAPA_BUG_OPCODE; | ||
25 | } | 33 | } |
26 | #endif | 34 | #endif |
27 | 35 | ||
diff --git a/arch/sh/lib/memcpy-sh4.S b/arch/sh/lib/memcpy-sh4.S index 560bc17eebdd..459fa92a7c53 100644 --- a/arch/sh/lib/memcpy-sh4.S +++ b/arch/sh/lib/memcpy-sh4.S | |||
@@ -126,10 +126,10 @@ | |||
126 | 126 | ||
127 | mov.l r3,@-r0 ! 30 LS | 127 | mov.l r3,@-r0 ! 30 LS |
128 | #else | 128 | #else |
129 | 3: mov r1,r3 ! OPQR | 129 | 3: mov r7,r3 ! OPQR |
130 | shlr8 r3 ! xOPQ | 130 | shlr8 r3 ! xOPQ |
131 | mov.l @(r0,r5),r1 ! KLMN | 131 | mov.l @(r0,r5),r7 ! KLMN |
132 | mov r1,r6 | 132 | mov r7,r6 |
133 | shll16 r6 | 133 | shll16 r6 |
134 | shll8 r6 ! Nxxx | 134 | shll8 r6 ! Nxxx |
135 | or r6,r3 ! NOPQ | 135 | or r6,r3 ! NOPQ |
@@ -733,24 +733,24 @@ ENTRY(memcpy) | |||
733 | movca.l r0,@r1 ! 40 LS (latency=3-7) | 733 | movca.l r0,@r1 ! 40 LS (latency=3-7) |
734 | add #-0x1c, r1 ! 50 EX | 734 | add #-0x1c, r1 ! 50 EX |
735 | 735 | ||
736 | mov.l r3, @(0x1c,r1) ! 33 LS | 736 | mov.l r3, @(0x18,r1) ! 33 LS |
737 | xtrct r11, r10 ! 48 EX | 737 | xtrct r11, r10 ! 48 EX |
738 | 738 | ||
739 | mov.l r6, @(0x18,r1) ! 33 LS | 739 | mov.l r6, @(0x14,r1) ! 33 LS |
740 | xtrct r12, r11 ! 48 EX | 740 | xtrct r12, r11 ! 48 EX |
741 | 741 | ||
742 | mov.l r7, @(0x14,r1) ! 33 LS | 742 | mov.l r7, @(0x10,r1) ! 33 LS |
743 | 743 | ||
744 | mov.l r8, @(0x10,r1) ! 33 LS | 744 | mov.l r8, @(0x0c,r1) ! 33 LS |
745 | add #-0x3e, r5 ! 50 EX | 745 | add #-0x1e, r5 ! 50 EX |
746 | 746 | ||
747 | mov.l r9, @(0x0c,r1) ! 33 LS | 747 | mov.l r9, @(0x08,r1) ! 33 LS |
748 | cmp/eq r2,r1 ! 54 MT | 748 | cmp/eq r2,r1 ! 54 MT |
749 | 749 | ||
750 | mov.l r10, @(0x08,r1) ! 33 LS | 750 | mov.l r10, @(0x04,r1) ! 33 LS |
751 | bf/s 2b ! 109 BR | 751 | bf/s 2b ! 109 BR |
752 | 752 | ||
753 | mov.l r11, @(0x04,r1) ! 33 LS | 753 | mov.l r11, @(0x00,r1) ! 33 LS |
754 | #endif | 754 | #endif |
755 | 755 | ||
756 | mov.l @r15+, r12 | 756 | mov.l @r15+, r12 |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index d211fdb24584..789724e61e83 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: config.in,v 1.113 2002/01/24 22:14:44 davem Exp $ | ||
2 | # For a description of the syntax of this configuration file, | 1 | # For a description of the syntax of this configuration file, |
3 | # see Documentation/kbuild/kconfig-language.txt. | 2 | # see Documentation/kbuild/kconfig-language.txt. |
4 | # | 3 | # |
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile index b365084316ac..22d331e1e941 100644 --- a/arch/sparc/boot/Makefile +++ b/arch/sparc/boot/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.10 2000/02/23 08:17:46 jj Exp $ | ||
2 | # Makefile for the Sparc boot stuff. | 1 | # Makefile for the Sparc boot stuff. |
3 | # | 2 | # |
4 | # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/boot/btfixupprep.c b/arch/sparc/boot/btfixupprep.c index dc7b0546e3bb..52a4208fe4f0 100644 --- a/arch/sparc/boot/btfixupprep.c +++ b/arch/sparc/boot/btfixupprep.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: btfixupprep.c,v 1.6 2001/08/22 15:27:47 davem Exp $ | 1 | /* |
2 | Simple utility to prepare vmlinux image for sparc. | 2 | Simple utility to prepare vmlinux image for sparc. |
3 | Resolves all BTFIXUP uses and settings and creates | 3 | Resolves all BTFIXUP uses and settings and creates |
4 | a special .s object to link to the image. | 4 | a special .s object to link to the image. |
diff --git a/arch/sparc/boot/piggyback.c b/arch/sparc/boot/piggyback.c index 6962cc68ed5b..c9f500c1a8b2 100644 --- a/arch/sparc/boot/piggyback.c +++ b/arch/sparc/boot/piggyback.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: piggyback.c,v 1.4 2000/12/05 00:48:57 anton Exp $ | 1 | /* |
2 | Simple utility to make a single-image install kernel with initial ramdisk | 2 | Simple utility to make a single-image install kernel with initial ramdisk |
3 | for Sparc tftpbooting without need to set up nfs. | 3 | for Sparc tftpbooting without need to set up nfs. |
4 | 4 | ||
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index 96344ff2bbe1..92c6fc07e59c 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.c,v 1.20 2002/01/05 01:13:43 davem Exp $ | 1 | /* |
2 | * ebus.c: PCI to EBus bridge device. | 2 | * ebus.c: PCI to EBus bridge device. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S index a8b35bed12a2..f37d961d67a6 100644 --- a/arch/sparc/kernel/etrap.S +++ b/arch/sparc/kernel/etrap.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: etrap.S,v 1.31 2000/01/08 16:38:18 anton Exp $ | 1 | /* |
2 | * etrap.S: Sparc trap window preparation for entry into the | 2 | * etrap.S: Sparc trap window preparation for entry into the |
3 | * Linux kernel. | 3 | * Linux kernel. |
4 | * | 4 | * |
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 8bec05fa5795..3bfd6085a91d 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: head.S,v 1.105 2001/08/12 09:08:56 davem Exp $ | 1 | /* |
2 | * head.S: The initial boot code for the Sparc port of Linux. | 2 | * head.S: The initial boot code for the Sparc port of Linux. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c index 3a5bad525394..7220562cdb34 100644 --- a/arch/sparc/kernel/idprom.c +++ b/arch/sparc/kernel/idprom.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.c,v 1.24 1999/08/31 06:54:20 davem Exp $ | 1 | /* |
2 | * idprom.c: Routines to load the idprom into kernel addresses and | 2 | * idprom.c: Routines to load the idprom into kernel addresses and |
3 | * interpret the data contained within. | 3 | * interpret the data contained within. |
4 | * | 4 | * |
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index d9d4f96360c7..8e64ebc445ef 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
10 | 10 | ||
11 | static struct fs_struct init_fs = INIT_FS; | 11 | static struct fs_struct init_fs = INIT_FS; |
12 | static struct files_struct init_files = INIT_FILES; | ||
13 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
14 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
15 | struct mm_struct init_mm = INIT_MM(init_mm); | 14 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index ad0ede24ca1d..7b17522f59bf 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ioport.c,v 1.45 2001/10/30 04:54:21 davem Exp $ | 1 | /* |
2 | * ioport.c: Simple io mapping allocator. | 2 | * ioport.c: Simple io mapping allocator. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 01a6756ba371..087390b092b0 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: irq.c,v 1.114 2001/12/11 04:55:51 davem Exp $ | 1 | /* |
2 | * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the | 2 | * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the |
3 | * Sparc the IRQs are basically 'cast in stone' | 3 | * Sparc the IRQs are basically 'cast in stone' |
4 | * and you are supposed to probe the prom's device | 4 | * and you are supposed to probe the prom's device |
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c index 59e9344e7a0d..adaaed4ea2fb 100644 --- a/arch/sparc/kernel/led.c +++ b/arch/sparc/kernel/led.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/proc_fs.h> | 4 | #include <linux/proc_fs.h> |
5 | #include <linux/seq_file.h> | ||
5 | #include <linux/string.h> | 6 | #include <linux/string.h> |
6 | #include <linux/jiffies.h> | 7 | #include <linux/jiffies.h> |
7 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
@@ -45,21 +46,22 @@ static void led_blink(unsigned long timeout) | |||
45 | add_timer(&led_blink_timer); | 46 | add_timer(&led_blink_timer); |
46 | } | 47 | } |
47 | 48 | ||
48 | static int led_read_proc(char *buf, char **start, off_t offset, int count, | 49 | static int led_proc_show(struct seq_file *m, void *v) |
49 | int *eof, void *data) | ||
50 | { | 50 | { |
51 | int len = 0; | ||
52 | |||
53 | if (get_auxio() & AUXIO_LED) | 51 | if (get_auxio() & AUXIO_LED) |
54 | len = sprintf(buf, "on\n"); | 52 | seq_puts(m, "on\n"); |
55 | else | 53 | else |
56 | len = sprintf(buf, "off\n"); | 54 | seq_puts(m, "off\n"); |
55 | return 0; | ||
56 | } | ||
57 | 57 | ||
58 | return len; | 58 | static int led_proc_open(struct inode *inode, struct file *file) |
59 | { | ||
60 | return single_open(file, led_proc_show, NULL); | ||
59 | } | 61 | } |
60 | 62 | ||
61 | static int led_write_proc(struct file *file, const char __user *buffer, | 63 | static ssize_t led_proc_write(struct file *file, const char __user *buffer, |
62 | unsigned long count, void *data) | 64 | size_t count, loff_t *ppos) |
63 | { | 65 | { |
64 | char *buf = NULL; | 66 | char *buf = NULL; |
65 | 67 | ||
@@ -103,6 +105,15 @@ static int led_write_proc(struct file *file, const char __user *buffer, | |||
103 | return count; | 105 | return count; |
104 | } | 106 | } |
105 | 107 | ||
108 | static const struct file_operations led_proc_fops = { | ||
109 | .owner = THIS_MODULE, | ||
110 | .open = led_proc_open, | ||
111 | .read = seq_read, | ||
112 | .llseek = seq_lseek, | ||
113 | .release = single_release, | ||
114 | .write = led_proc_write, | ||
115 | }; | ||
116 | |||
106 | static struct proc_dir_entry *led; | 117 | static struct proc_dir_entry *led; |
107 | 118 | ||
108 | #define LED_VERSION "0.1" | 119 | #define LED_VERSION "0.1" |
@@ -112,12 +123,9 @@ static int __init led_init(void) | |||
112 | init_timer(&led_blink_timer); | 123 | init_timer(&led_blink_timer); |
113 | led_blink_timer.function = led_blink; | 124 | led_blink_timer.function = led_blink; |
114 | 125 | ||
115 | led = create_proc_entry("led", 0, NULL); | 126 | led = proc_create("led", 0, NULL, &led_proc_fops); |
116 | if (!led) | 127 | if (!led) |
117 | return -ENOMEM; | 128 | return -ENOMEM; |
118 | |||
119 | led->read_proc = led_read_proc; /* reader function */ | ||
120 | led->write_proc = led_write_proc; /* writer function */ | ||
121 | led->owner = THIS_MODULE; | 129 | led->owner = THIS_MODULE; |
122 | 130 | ||
123 | printk(KERN_INFO | 131 | printk(KERN_INFO |
diff --git a/arch/sparc/kernel/muldiv.c b/arch/sparc/kernel/muldiv.c index 37b9a4942232..e352239e72c8 100644 --- a/arch/sparc/kernel/muldiv.c +++ b/arch/sparc/kernel/muldiv.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: muldiv.c,v 1.5 1997/12/15 20:07:20 ecd Exp $ | 1 | /* |
2 | * muldiv.c: Hardware multiply/division illegal instruction trap | 2 | * muldiv.c: Hardware multiply/division illegal instruction trap |
3 | * for sun4c/sun4 (which do not have those instructions) | 3 | * for sun4c/sun4 (which do not have those instructions) |
4 | * | 4 | * |
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S index ab818cdc4cc0..ce30082ab266 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rtrap.S,v 1.58 2002/01/31 03:30:05 davem Exp $ | 1 | /* |
2 | * rtrap.S: Return from Sparc trap low-level code. | 2 | * rtrap.S: Return from Sparc trap low-level code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 8a55c4f0df84..a0ea0bc6f471 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: setup.c,v 1.126 2001/11/13 00:49:27 davem Exp $ | 1 | /* |
2 | * linux/arch/sparc/kernel/setup.c | 2 | * linux/arch/sparc/kernel/setup.c |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index aa8ee06cf488..b23cea5ca5d1 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sparc_ksyms.c,v 1.107 2001/07/17 16:17:33 anton Exp $ | 1 | /* |
2 | * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. | 2 | * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index e0efab2a6bef..8ac5661cafff 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sun4d_irq.c,v 1.29 2001/12/11 04:55:51 davem Exp $ | 1 | /* |
2 | * arch/sparc/kernel/sun4d_irq.c: | 2 | * arch/sparc/kernel/sun4d_irq.c: |
3 | * SS1000/SC2000 interrupt handling. | 3 | * SS1000/SC2000 interrupt handling. |
4 | * | 4 | * |
diff --git a/arch/sparc/kernel/trampoline.S b/arch/sparc/kernel/trampoline.S index 2dcdaa1fd8cd..356c56aebc62 100644 --- a/arch/sparc/kernel/trampoline.S +++ b/arch/sparc/kernel/trampoline.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: trampoline.S,v 1.14 2002/01/11 08:45:38 davem Exp $ | 1 | /* |
2 | * trampoline.S: SMP cpu boot-up trampoline code. | 2 | * trampoline.S: SMP cpu boot-up trampoline code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index d404e7994527..978e9d85949e 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: traps.c,v 1.64 2000/09/03 15:00:49 anton Exp $ | 1 | /* |
2 | * arch/sparc/kernel/traps.c | 2 | * arch/sparc/kernel/traps.c |
3 | * | 3 | * |
4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/unaligned.c b/arch/sparc/kernel/unaligned.c index 33857be16661..c2a28c5ad650 100644 --- a/arch/sparc/kernel/unaligned.c +++ b/arch/sparc/kernel/unaligned.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: unaligned.c,v 1.23 2001/12/21 00:54:31 davem Exp $ | 1 | /* |
2 | * unaligned.c: Unaligned load/store trap handling with special | 2 | * unaligned.c: Unaligned load/store trap handling with special |
3 | * cases for the kernel to do them more quickly. | 3 | * cases for the kernel to do them more quickly. |
4 | * | 4 | * |
diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S index 083b1215d515..4bce38dfe3c5 100644 --- a/arch/sparc/kernel/wof.S +++ b/arch/sparc/kernel/wof.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: wof.S,v 1.40 2000/01/08 16:38:18 anton Exp $ | 1 | /* |
2 | * wof.S: Sparc window overflow handler. | 2 | * wof.S: Sparc window overflow handler. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S index d1a266bf103a..82e5145b0f77 100644 --- a/arch/sparc/kernel/wuf.S +++ b/arch/sparc/kernel/wuf.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: wuf.S,v 1.39 2000/01/08 16:38:18 anton Exp $ | 1 | /* |
2 | * wuf.S: Window underflow trap handler for the Sparc. | 2 | * wuf.S: Window underflow trap handler for the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller | 4 | * Copyright (C) 1995 David S. Miller |
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile index 76effdbea075..6e303e10c3b9 100644 --- a/arch/sparc/lib/Makefile +++ b/arch/sparc/lib/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.35 2000/12/15 00:41:18 davem Exp $ | ||
2 | # Makefile for Sparc library files.. | 1 | # Makefile for Sparc library files.. |
3 | # | 2 | # |
4 | 3 | ||
diff --git a/arch/sparc/lib/ashldi3.S b/arch/sparc/lib/ashldi3.S index 52418a0cb3dd..17912e608716 100644 --- a/arch/sparc/lib/ashldi3.S +++ b/arch/sparc/lib/ashldi3.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ashldi3.S,v 1.2 1999/11/19 04:11:46 davem Exp $ | 1 | /* |
2 | * ashldi3.S: GCC emits these for certain drivers playing | 2 | * ashldi3.S: GCC emits these for certain drivers playing |
3 | * with long longs. | 3 | * with long longs. |
4 | * | 4 | * |
diff --git a/arch/sparc/lib/ashrdi3.S b/arch/sparc/lib/ashrdi3.S index 2848237598a4..85398fd6dcc9 100644 --- a/arch/sparc/lib/ashrdi3.S +++ b/arch/sparc/lib/ashrdi3.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ashrdi3.S,v 1.4 1999/11/19 04:11:49 davem Exp $ | 1 | /* |
2 | * ashrdi3.S: The filesystem code creates all kinds of references to | 2 | * ashrdi3.S: The filesystem code creates all kinds of references to |
3 | * this little routine on the sparc with gcc. | 3 | * this little routine on the sparc with gcc. |
4 | * | 4 | * |
diff --git a/arch/sparc/lib/blockops.S b/arch/sparc/lib/blockops.S index a7c7ffaa4a94..804be87f9a42 100644 --- a/arch/sparc/lib/blockops.S +++ b/arch/sparc/lib/blockops.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: blockops.S,v 1.8 1998/01/30 10:58:44 jj Exp $ | 1 | /* |
2 | * blockops.S: Common block zero optimized routines. | 2 | * blockops.S: Common block zero optimized routines. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/lib/locks.S b/arch/sparc/lib/locks.S index b1df55cb2215..64f53f2b673d 100644 --- a/arch/sparc/lib/locks.S +++ b/arch/sparc/lib/locks.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: locks.S,v 1.16 2000/02/26 11:02:47 anton Exp $ | 1 | /* |
2 | * locks.S: SMP low-level lock primitives on Sparc. | 2 | * locks.S: SMP low-level lock primitives on Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/lib/lshrdi3.S b/arch/sparc/lib/lshrdi3.S index 35abf5b2bd15..47a1354c1602 100644 --- a/arch/sparc/lib/lshrdi3.S +++ b/arch/sparc/lib/lshrdi3.S | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */ | ||
2 | 1 | ||
3 | .globl __lshrdi3 | 2 | .globl __lshrdi3 |
4 | __lshrdi3: | 3 | __lshrdi3: |
diff --git a/arch/sparc/lib/memscan.S b/arch/sparc/lib/memscan.S index 28e78ff090ac..4ff1657dfc24 100644 --- a/arch/sparc/lib/memscan.S +++ b/arch/sparc/lib/memscan.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: memscan.S,v 1.4 1996/09/08 02:01:20 davem Exp $ | 1 | /* |
2 | * memscan.S: Optimized memscan for the Sparc. | 2 | * memscan.S: Optimized memscan for the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/lib/mul.S b/arch/sparc/lib/mul.S index da693560d878..c45470d0b0ce 100644 --- a/arch/sparc/lib/mul.S +++ b/arch/sparc/lib/mul.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mul.S,v 1.4 1996/09/30 02:22:32 davem Exp $ | 1 | /* |
2 | * mul.S: This routine was taken from glibc-1.09 and is covered | 2 | * mul.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/rem.S b/arch/sparc/lib/rem.S index bf015a90d07e..42fb86252815 100644 --- a/arch/sparc/lib/rem.S +++ b/arch/sparc/lib/rem.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rem.S,v 1.7 1996/09/30 02:22:34 davem Exp $ | 1 | /* |
2 | * rem.S: This routine was taken from glibc-1.09 and is covered | 2 | * rem.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/rwsem.S b/arch/sparc/lib/rwsem.S index f406b1f22791..9675268e7fde 100644 --- a/arch/sparc/lib/rwsem.S +++ b/arch/sparc/lib/rwsem.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rwsem.S,v 1.5 2000/05/09 17:40:13 davem Exp $ | 1 | /* |
2 | * Assembly part of rw semaphores. | 2 | * Assembly part of rw semaphores. |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) |
diff --git a/arch/sparc/lib/sdiv.S b/arch/sparc/lib/sdiv.S index af9451629d0b..f0a0d4e4db78 100644 --- a/arch/sparc/lib/sdiv.S +++ b/arch/sparc/lib/sdiv.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sdiv.S,v 1.6 1996/10/02 17:37:00 davem Exp $ | 1 | /* |
2 | * sdiv.S: This routine was taken from glibc-1.09 and is covered | 2 | * sdiv.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/strncmp.S b/arch/sparc/lib/strncmp.S index 615626805d4b..494ec664537a 100644 --- a/arch/sparc/lib/strncmp.S +++ b/arch/sparc/lib/strncmp.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: strncmp.S,v 1.2 1996/09/09 02:47:20 davem Exp $ | 1 | /* |
2 | * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc | 2 | * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc |
3 | * generic strncmp routine. | 3 | * generic strncmp routine. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/udiv.S b/arch/sparc/lib/udiv.S index 169e01da6715..2101405bdfcb 100644 --- a/arch/sparc/lib/udiv.S +++ b/arch/sparc/lib/udiv.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: udiv.S,v 1.4 1996/09/30 02:22:38 davem Exp $ | 1 | /* |
2 | * udiv.S: This routine was taken from glibc-1.09 and is covered | 2 | * udiv.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/umul.S b/arch/sparc/lib/umul.S index f0e5b20a2536..1f36ae682529 100644 --- a/arch/sparc/lib/umul.S +++ b/arch/sparc/lib/umul.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: umul.S,v 1.4 1996/09/30 02:22:39 davem Exp $ | 1 | /* |
2 | * umul.S: This routine was taken from glibc-1.09 and is covered | 2 | * umul.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/lib/urem.S b/arch/sparc/lib/urem.S index 6b92bdc8b04c..77123eb83c44 100644 --- a/arch/sparc/lib/urem.S +++ b/arch/sparc/lib/urem.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: urem.S,v 1.4 1996/09/30 02:22:42 davem Exp $ | 1 | /* |
2 | * urem.S: This routine was taken from glibc-1.09 and is covered | 2 | * urem.S: This routine was taken from glibc-1.09 and is covered |
3 | * by the GNU Library General Public License Version 2. | 3 | * by the GNU Library General Public License Version 2. |
4 | */ | 4 | */ |
diff --git a/arch/sparc/math-emu/ashldi3.S b/arch/sparc/math-emu/ashldi3.S index eab1d097296a..7230ff5c7aa1 100644 --- a/arch/sparc/math-emu/ashldi3.S +++ b/arch/sparc/math-emu/ashldi3.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ashldi3.S,v 1.1 1998/04/06 16:09:28 jj Exp $ | 1 | /* |
2 | * ashldi3.S: Math-emu code creates all kinds of references to | 2 | * ashldi3.S: Math-emu code creates all kinds of references to |
3 | * this little routine on the sparc with gcc. | 3 | * this little routine on the sparc with gcc. |
4 | * | 4 | * |
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile index 16eeba4b991a..109c8b22cb38 100644 --- a/arch/sparc/mm/Makefile +++ b/arch/sparc/mm/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.38 2000/12/15 00:41:22 davem Exp $ | ||
2 | # Makefile for the linux Sparc-specific parts of the memory manager. | 1 | # Makefile for the linux Sparc-specific parts of the memory manager. |
3 | # | 2 | # |
4 | 3 | ||
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c index abd50795a7b6..0a3cd8f6cfe4 100644 --- a/arch/sparc/mm/fault.c +++ b/arch/sparc/mm/fault.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: fault.c,v 1.122 2001/11/17 07:19:26 davem Exp $ | 1 | /* |
2 | * fault.c: Page fault handlers for the Sparc. | 2 | * fault.c: Page fault handlers for the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index 1ef7fa03fefe..a289261da9fd 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: generic.c,v 1.14 2001/12/21 04:56:15 davem Exp $ | 1 | /* |
2 | * generic.c: Generic Sparc mm routines that are not dependent upon | 2 | * generic.c: Generic Sparc mm routines that are not dependent upon |
3 | * MMU type but are Sparc specific. | 3 | * MMU type but are Sparc specific. |
4 | * | 4 | * |
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S index d29cc24c5bba..44aad32eeb4e 100644 --- a/arch/sparc/mm/hypersparc.S +++ b/arch/sparc/mm/hypersparc.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: hypersparc.S,v 1.18 2001/12/21 04:56:15 davem Exp $ | 1 | /* |
2 | * hypersparc.S: High speed Hypersparc mmu/cache operations. | 2 | * hypersparc.S: High speed Hypersparc mmu/cache operations. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index b89837accc88..7794ecb896e3 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: init.c,v 1.103 2001/11/19 19:03:08 davem Exp $ | 1 | /* |
2 | * linux/arch/sparc/mm/init.c | 2 | * linux/arch/sparc/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index b86dfce8eee4..f167835db3df 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: io-unit.c,v 1.24 2001/12/17 07:05:09 davem Exp $ | 1 | /* |
2 | * io-unit.c: IO-UNIT specific routines for memory management. | 2 | * io-unit.c: IO-UNIT specific routines for memory management. |
3 | * | 3 | * |
4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/arch/sparc/mm/loadmmu.c b/arch/sparc/mm/loadmmu.c index 2d9cd65160a4..652be05acbea 100644 --- a/arch/sparc/mm/loadmmu.c +++ b/arch/sparc/mm/loadmmu.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: loadmmu.c,v 1.56 2000/02/08 20:24:21 davem Exp $ | 1 | /* |
2 | * loadmmu.c: This code loads up all the mm function pointers once the | 2 | * loadmmu.c: This code loads up all the mm function pointers once the |
3 | * machine type has been determined. It also sets the static | 3 | * machine type has been determined. It also sets the static |
4 | * mmu values such as PAGE_NONE, etc. | 4 | * mmu values such as PAGE_NONE, etc. |
diff --git a/arch/sparc/mm/nosrmmu.c b/arch/sparc/mm/nosrmmu.c index 9e215659697e..3701f70fc30a 100644 --- a/arch/sparc/mm/nosrmmu.c +++ b/arch/sparc/mm/nosrmmu.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: nosrmmu.c,v 1.5 1999/11/19 04:11:54 davem Exp $ | 1 | /* |
2 | * nosrmmu.c: This file is a bunch of dummies for sun4 compiles, | 2 | * nosrmmu.c: This file is a bunch of dummies for sun4 compiles, |
3 | * so that it does not need srmmu and avoid ifdefs. | 3 | * so that it does not need srmmu and avoid ifdefs. |
4 | * | 4 | * |
diff --git a/arch/sparc/mm/nosun4c.c b/arch/sparc/mm/nosun4c.c index ea2e2105341d..196263f895b7 100644 --- a/arch/sparc/mm/nosun4c.c +++ b/arch/sparc/mm/nosun4c.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: nosun4c.c,v 1.3 2000/02/14 04:52:36 jj Exp $ | 1 | /* |
2 | * nosun4c.c: This file is a bunch of dummies for SMP compiles, | 2 | * nosun4c.c: This file is a bunch of dummies for SMP compiles, |
3 | * so that it does not need sun4c and avoid ifdefs. | 3 | * so that it does not need sun4c and avoid ifdefs. |
4 | * | 4 | * |
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S index 9f4cd396a0fa..c801c3953a00 100644 --- a/arch/sparc/mm/swift.S +++ b/arch/sparc/mm/swift.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: swift.S,v 1.9 2002/01/08 11:11:59 davem Exp $ | 1 | /* |
2 | * swift.S: MicroSparc-II mmu/cache operations. | 2 | * swift.S: MicroSparc-II mmu/cache operations. |
3 | * | 3 | * |
4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) |
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S index 4988e6a310bb..db0d6de33a87 100644 --- a/arch/sparc/mm/tsunami.S +++ b/arch/sparc/mm/tsunami.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: tsunami.S,v 1.7 2001/12/21 04:56:15 davem Exp $ | 1 | /* |
2 | * tsunami.S: High speed MicroSparc-I mmu/cache operations. | 2 | * tsunami.S: High speed MicroSparc-I mmu/cache operations. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S index 754c622548a5..6dfcc13d3100 100644 --- a/arch/sparc/mm/viking.S +++ b/arch/sparc/mm/viking.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: viking.S,v 1.19 2001/12/21 04:56:15 davem Exp $ | 1 | /* |
2 | * viking.S: High speed Viking cache/mmu operations | 2 | * viking.S: High speed Viking cache/mmu operations |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile index 2b217ee40703..7f5eacfcfbcf 100644 --- a/arch/sparc/prom/Makefile +++ b/arch/sparc/prom/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.8 2000/12/15 00:41:22 davem Exp $ | ||
2 | # Makefile for the Sun Boot PROM interface library under | 1 | # Makefile for the Sun Boot PROM interface library under |
3 | # Linux. | 2 | # Linux. |
4 | # | 3 | # |
diff --git a/arch/sparc/prom/bootstr.c b/arch/sparc/prom/bootstr.c index cfdeac2788d1..5a35c768ff7c 100644 --- a/arch/sparc/prom/bootstr.c +++ b/arch/sparc/prom/bootstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bootstr.c,v 1.20 2000/02/08 20:24:23 davem Exp $ | 1 | /* |
2 | * bootstr.c: Boot string/argument acquisition from the PROM. | 2 | * bootstr.c: Boot string/argument acquisition from the PROM. |
3 | * | 3 | * |
4 | * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c index 2a007a784415..790057a34616 100644 --- a/arch/sparc/prom/console.c +++ b/arch/sparc/prom/console.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: console.c,v 1.25 2001/10/30 04:54:22 davem Exp $ | 1 | /* |
2 | * console.c: Routines that deal with sending and receiving IO | 2 | * console.c: Routines that deal with sending and receiving IO |
3 | * to/from the current console device using the PROM. | 3 | * to/from the current console device using the PROM. |
4 | * | 4 | * |
diff --git a/arch/sparc/prom/devmap.c b/arch/sparc/prom/devmap.c index eb12073578ad..1e517915b0df 100644 --- a/arch/sparc/prom/devmap.c +++ b/arch/sparc/prom/devmap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: devmap.c,v 1.7 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * promdevmap.c: Map device/IO areas to virtual addresses. | 2 | * promdevmap.c: Map device/IO areas to virtual addresses. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/prom/devops.c b/arch/sparc/prom/devops.c index 61919b54f6cc..9f1a95c91ad1 100644 --- a/arch/sparc/prom/devops.c +++ b/arch/sparc/prom/devops.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: devops.c,v 1.13 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * devops.c: Device operations using the PROM. | 2 | * devops.c: Device operations using the PROM. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/prom/init.c b/arch/sparc/prom/init.c index 2fa3a474e3a2..729f87066945 100644 --- a/arch/sparc/prom/init.c +++ b/arch/sparc/prom/init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: init.c,v 1.14 2000/01/29 01:09:12 anton Exp $ | 1 | /* |
2 | * init.c: Initialize internal variables used by the PROM | 2 | * init.c: Initialize internal variables used by the PROM |
3 | * library functions. | 3 | * library functions. |
4 | * | 4 | * |
diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c index d9fb3af41c1f..49b5057b9601 100644 --- a/arch/sparc/prom/misc.c +++ b/arch/sparc/prom/misc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: misc.c,v 1.18 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * misc.c: Miscellaneous prom functions that don't belong | 2 | * misc.c: Miscellaneous prom functions that don't belong |
3 | * anywhere else. | 3 | * anywhere else. |
4 | * | 4 | * |
diff --git a/arch/sparc/prom/mp.c b/arch/sparc/prom/mp.c index 92fe3739fdb8..4c4dc79f65af 100644 --- a/arch/sparc/prom/mp.c +++ b/arch/sparc/prom/mp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mp.c,v 1.12 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * mp.c: OpenBoot Prom Multiprocessor support routines. Don't call | 2 | * mp.c: OpenBoot Prom Multiprocessor support routines. Don't call |
3 | * these on a UP or else you will halt and catch fire. ;) | 3 | * these on a UP or else you will halt and catch fire. ;) |
4 | * | 4 | * |
diff --git a/arch/sparc/prom/palloc.c b/arch/sparc/prom/palloc.c index 84ce8bc54473..20be339cc2ce 100644 --- a/arch/sparc/prom/palloc.c +++ b/arch/sparc/prom/palloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: palloc.c,v 1.4 1996/04/25 06:09:48 davem Exp $ | 1 | /* |
2 | * palloc.c: Memory allocation from the Sun PROM. | 2 | * palloc.c: Memory allocation from the Sun PROM. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c index a2920323c900..f9b7def35f6e 100644 --- a/arch/sparc/prom/ranges.c +++ b/arch/sparc/prom/ranges.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ranges.c,v 1.15 2001/12/19 00:29:51 davem Exp $ | 1 | /* |
2 | * ranges.c: Handle ranges in newer proms for obio/sbus. | 2 | * ranges.c: Handle ranges in newer proms for obio/sbus. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc/prom/segment.c b/arch/sparc/prom/segment.c index 09d6460165ab..04fd03a7f926 100644 --- a/arch/sparc/prom/segment.c +++ b/arch/sparc/prom/segment.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: segment.c,v 1.7 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * segment.c: Prom routine to map segments in other contexts before | 2 | * segment.c: Prom routine to map segments in other contexts before |
3 | * a standalone is completely mapped. This is for sun4 and | 3 | * a standalone is completely mapped. This is for sun4 and |
4 | * sun4c architectures only. | 4 | * sun4c architectures only. |
diff --git a/arch/sparc/prom/tree.c b/arch/sparc/prom/tree.c index 5ec246573a98..f228fe057b24 100644 --- a/arch/sparc/prom/tree.c +++ b/arch/sparc/prom/tree.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: tree.c,v 1.26 2000/08/26 02:38:03 anton Exp $ | 1 | /* |
2 | * tree.c: Basic device tree traversal/scanning for the Linux | 2 | * tree.c: Basic device tree traversal/scanning for the Linux |
3 | * prom library. | 3 | * prom library. |
4 | * | 4 | * |
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 9cb75c852b45..4b8f2b084c21 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.52 2002/02/09 19:49:31 davem Exp $ | ||
2 | # sparc64/Makefile | 1 | # sparc64/Makefile |
3 | # | 2 | # |
4 | # Makefile for the architecture dependent flags and dependencies on the | 3 | # Makefile for the architecture dependent flags and dependencies on the |
diff --git a/arch/sparc64/boot/Makefile b/arch/sparc64/boot/Makefile index 6968a6da57da..0458b5244f09 100644 --- a/arch/sparc64/boot/Makefile +++ b/arch/sparc64/boot/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.4 1997/12/15 20:08:56 ecd Exp $ | ||
2 | # Makefile for the Sparc64 boot stuff. | 1 | # Makefile for the Sparc64 boot stuff. |
3 | # | 2 | # |
4 | # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/boot/piggyback.c b/arch/sparc64/boot/piggyback.c index 36f907408c60..de364bfed0bb 100644 --- a/arch/sparc64/boot/piggyback.c +++ b/arch/sparc64/boot/piggyback.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: piggyback.c,v 1.2 2000/09/19 14:34:39 anton Exp $ | 1 | /* |
2 | Simple utility to make a single-image install kernel with initial ramdisk | 2 | Simple utility to make a single-image install kernel with initial ramdisk |
3 | for Sparc64 tftpbooting without need to set up nfs. | 3 | for Sparc64 tftpbooting without need to set up nfs. |
4 | 4 | ||
diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S index e0a920162604..b2c2c5be281c 100644 --- a/arch/sparc64/kernel/dtlb_prot.S +++ b/arch/sparc64/kernel/dtlb_prot.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: dtlb_prot.S,v 1.22 2001/04/11 23:40:32 davem Exp $ | 1 | /* |
2 | * dtlb_prot.S: DTLB protection trap strategy. | 2 | * dtlb_prot.S: DTLB protection trap strategy. |
3 | * This is included directly into the trap table. | 3 | * This is included directly into the trap table. |
4 | * | 4 | * |
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index bc2632274840..c49d0388b793 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.c,v 1.64 2001/11/08 04:41:33 davem Exp $ | 1 | /* |
2 | * ebus.c: PCI to EBus bridge device. | 2 | * ebus.c: PCI to EBus bridge device. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S index f25e1da3fd03..29ce489bc188 100644 --- a/arch/sparc64/kernel/etrap.S +++ b/arch/sparc64/kernel/etrap.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: etrap.S,v 1.46 2002/02/09 19:49:30 davem Exp $ | 1 | /* |
2 | * etrap.S: Preparing for entry into the kernel on Sparc V9. | 2 | * etrap.S: Preparing for entry into the kernel on Sparc V9. |
3 | * | 3 | * |
4 | * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/kernel/idprom.c b/arch/sparc64/kernel/idprom.c index 3b6789e09a72..5b45a808c621 100644 --- a/arch/sparc64/kernel/idprom.c +++ b/arch/sparc64/kernel/idprom.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.c,v 1.3 1999/08/31 06:54:53 davem Exp $ | 1 | /* |
2 | * idprom.c: Routines to load the idprom into kernel addresses and | 2 | * idprom.c: Routines to load the idprom into kernel addresses and |
3 | * interpret the data contained within. | 3 | * interpret the data contained within. |
4 | * | 4 | * |
diff --git a/arch/sparc64/kernel/init_task.c b/arch/sparc64/kernel/init_task.c index 90007cf88bac..d2b312381c19 100644 --- a/arch/sparc64/kernel/init_task.c +++ b/arch/sparc64/kernel/init_task.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | 11 | ||
12 | static struct fs_struct init_fs = INIT_FS; | 12 | static struct fs_struct init_fs = INIT_FS; |
13 | static struct files_struct init_files = INIT_FILES; | ||
14 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 13 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
15 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 14 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
16 | struct mm_struct init_mm = INIT_MM(init_mm); | 15 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 4129c0449856..2084f81a76e1 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* arch/sparc64/kernel/process.c | 1 | /* arch/sparc64/kernel/process.c |
2 | * | 2 | * |
3 | * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995, 1996, 2008 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
5 | * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 5 | * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
6 | */ | 6 | */ |
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/cpu.h> | 31 | #include <linux/cpu.h> |
32 | #include <linux/elfcore.h> | 32 | #include <linux/elfcore.h> |
33 | #include <linux/sysrq.h> | ||
33 | 34 | ||
34 | #include <asm/oplib.h> | 35 | #include <asm/oplib.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
@@ -49,6 +50,8 @@ | |||
49 | #include <asm/sstate.h> | 50 | #include <asm/sstate.h> |
50 | #include <asm/reboot.h> | 51 | #include <asm/reboot.h> |
51 | #include <asm/syscalls.h> | 52 | #include <asm/syscalls.h> |
53 | #include <asm/irq_regs.h> | ||
54 | #include <asm/smp.h> | ||
52 | 55 | ||
53 | /* #define VERBOSE_SHOWREGS */ | 56 | /* #define VERBOSE_SHOWREGS */ |
54 | 57 | ||
@@ -298,6 +301,118 @@ void show_regs(struct pt_regs *regs) | |||
298 | #endif | 301 | #endif |
299 | } | 302 | } |
300 | 303 | ||
304 | #ifdef CONFIG_MAGIC_SYSRQ | ||
305 | struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | ||
306 | static DEFINE_SPINLOCK(global_reg_snapshot_lock); | ||
307 | |||
308 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | ||
309 | int this_cpu) | ||
310 | { | ||
311 | flushw_all(); | ||
312 | |||
313 | global_reg_snapshot[this_cpu].tstate = regs->tstate; | ||
314 | global_reg_snapshot[this_cpu].tpc = regs->tpc; | ||
315 | global_reg_snapshot[this_cpu].tnpc = regs->tnpc; | ||
316 | global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; | ||
317 | |||
318 | if (regs->tstate & TSTATE_PRIV) { | ||
319 | struct reg_window *rw; | ||
320 | |||
321 | rw = (struct reg_window *) | ||
322 | (regs->u_regs[UREG_FP] + STACK_BIAS); | ||
323 | global_reg_snapshot[this_cpu].i7 = rw->ins[6]; | ||
324 | } else | ||
325 | global_reg_snapshot[this_cpu].i7 = 0; | ||
326 | |||
327 | global_reg_snapshot[this_cpu].thread = tp; | ||
328 | } | ||
329 | |||
330 | /* In order to avoid hangs we do not try to synchronize with the | ||
331 | * global register dump client cpus. The last store they make is to | ||
332 | * the thread pointer, so do a short poll waiting for that to become | ||
333 | * non-NULL. | ||
334 | */ | ||
335 | static void __global_reg_poll(struct global_reg_snapshot *gp) | ||
336 | { | ||
337 | int limit = 0; | ||
338 | |||
339 | while (!gp->thread && ++limit < 100) { | ||
340 | barrier(); | ||
341 | udelay(1); | ||
342 | } | ||
343 | } | ||
344 | |||
345 | static void sysrq_handle_globreg(int key, struct tty_struct *tty) | ||
346 | { | ||
347 | struct thread_info *tp = current_thread_info(); | ||
348 | struct pt_regs *regs = get_irq_regs(); | ||
349 | #ifdef CONFIG_KALLSYMS | ||
350 | char buffer[KSYM_SYMBOL_LEN]; | ||
351 | #endif | ||
352 | unsigned long flags; | ||
353 | int this_cpu, cpu; | ||
354 | |||
355 | if (!regs) | ||
356 | regs = tp->kregs; | ||
357 | |||
358 | spin_lock_irqsave(&global_reg_snapshot_lock, flags); | ||
359 | |||
360 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | ||
361 | |||
362 | this_cpu = raw_smp_processor_id(); | ||
363 | |||
364 | __global_reg_self(tp, regs, this_cpu); | ||
365 | |||
366 | smp_fetch_global_regs(); | ||
367 | |||
368 | for_each_online_cpu(cpu) { | ||
369 | struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; | ||
370 | struct thread_info *tp; | ||
371 | |||
372 | __global_reg_poll(gp); | ||
373 | |||
374 | tp = gp->thread; | ||
375 | printk("%c CPU[%3d]: TSTATE[%016lx] TPC[%016lx] TNPC[%016lx] TASK[%s:%d]\n", | ||
376 | (cpu == this_cpu ? '*' : ' '), cpu, | ||
377 | gp->tstate, gp->tpc, gp->tnpc, | ||
378 | ((tp && tp->task) ? tp->task->comm : "NULL"), | ||
379 | ((tp && tp->task) ? tp->task->pid : -1)); | ||
380 | #ifdef CONFIG_KALLSYMS | ||
381 | if (gp->tstate & TSTATE_PRIV) { | ||
382 | sprint_symbol(buffer, gp->tpc); | ||
383 | printk(" TPC[%s] ", buffer); | ||
384 | sprint_symbol(buffer, gp->o7); | ||
385 | printk("O7[%s] ", buffer); | ||
386 | sprint_symbol(buffer, gp->i7); | ||
387 | printk("I7[%s]\n", buffer); | ||
388 | } else | ||
389 | #endif | ||
390 | { | ||
391 | printk(" TPC[%lx] O7[%lx] I7[%lx]\n", | ||
392 | gp->tpc, gp->o7, gp->i7); | ||
393 | } | ||
394 | } | ||
395 | |||
396 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | ||
397 | |||
398 | spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); | ||
399 | } | ||
400 | |||
401 | static struct sysrq_key_op sparc_globalreg_op = { | ||
402 | .handler = sysrq_handle_globreg, | ||
403 | .help_msg = "Globalregs", | ||
404 | .action_msg = "Show Global CPU Regs", | ||
405 | }; | ||
406 | |||
407 | static int __init sparc_globreg_init(void) | ||
408 | { | ||
409 | return register_sysrq_key('y', &sparc_globalreg_op); | ||
410 | } | ||
411 | |||
412 | core_initcall(sparc_globreg_init); | ||
413 | |||
414 | #endif | ||
415 | |||
301 | unsigned long thread_saved_pc(struct task_struct *tsk) | 416 | unsigned long thread_saved_pc(struct task_struct *tsk) |
302 | { | 417 | { |
303 | struct thread_info *ti = task_thread_info(tsk); | 418 | struct thread_info *ti = task_thread_info(tsk); |
@@ -542,20 +657,39 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
542 | struct task_struct *p, struct pt_regs *regs) | 657 | struct task_struct *p, struct pt_regs *regs) |
543 | { | 658 | { |
544 | struct thread_info *t = task_thread_info(p); | 659 | struct thread_info *t = task_thread_info(p); |
660 | struct sparc_stackf *parent_sf; | ||
661 | unsigned long child_stack_sz; | ||
545 | char *child_trap_frame; | 662 | char *child_trap_frame; |
663 | int kernel_thread; | ||
546 | 664 | ||
547 | /* Calculate offset to stack_frame & pt_regs */ | 665 | kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0; |
548 | child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); | 666 | parent_sf = ((struct sparc_stackf *) regs) - 1; |
549 | memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ)); | ||
550 | 667 | ||
551 | t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | | 668 | /* Calculate offset to stack_frame & pt_regs */ |
669 | child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) + | ||
670 | (kernel_thread ? STACKFRAME_SZ : 0)); | ||
671 | child_trap_frame = (task_stack_page(p) + | ||
672 | (THREAD_SIZE - child_stack_sz)); | ||
673 | memcpy(child_trap_frame, parent_sf, child_stack_sz); | ||
674 | |||
675 | t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | | ||
676 | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | | ||
552 | (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); | 677 | (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); |
553 | t->new_child = 1; | 678 | t->new_child = 1; |
554 | t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; | 679 | t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; |
555 | t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf)); | 680 | t->kregs = (struct pt_regs *) (child_trap_frame + |
681 | sizeof(struct sparc_stackf)); | ||
556 | t->fpsaved[0] = 0; | 682 | t->fpsaved[0] = 0; |
557 | 683 | ||
558 | if (regs->tstate & TSTATE_PRIV) { | 684 | if (kernel_thread) { |
685 | struct sparc_stackf *child_sf = (struct sparc_stackf *) | ||
686 | (child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ)); | ||
687 | |||
688 | /* Zero terminate the stack backtrace. */ | ||
689 | child_sf->fp = NULL; | ||
690 | t->kregs->u_regs[UREG_FP] = | ||
691 | ((unsigned long) child_sf) - STACK_BIAS; | ||
692 | |||
559 | /* Special case, if we are spawning a kernel thread from | 693 | /* Special case, if we are spawning a kernel thread from |
560 | * a userspace task (via KMOD, NFS, or similar) we must | 694 | * a userspace task (via KMOD, NFS, or similar) we must |
561 | * disable performance counters in the child because the | 695 | * disable performance counters in the child because the |
@@ -566,12 +700,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
566 | t->pcr_reg = 0; | 700 | t->pcr_reg = 0; |
567 | t->flags &= ~_TIF_PERFCTR; | 701 | t->flags &= ~_TIF_PERFCTR; |
568 | } | 702 | } |
569 | t->kregs->u_regs[UREG_FP] = t->ksp; | ||
570 | t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); | 703 | t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); |
571 | flush_register_windows(); | ||
572 | memcpy((void *)(t->ksp + STACK_BIAS), | ||
573 | (void *)(regs->u_regs[UREG_FP] + STACK_BIAS), | ||
574 | sizeof(struct sparc_stackf)); | ||
575 | t->kregs->u_regs[UREG_G6] = (unsigned long) t; | 704 | t->kregs->u_regs[UREG_G6] = (unsigned long) t; |
576 | t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; | 705 | t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; |
577 | } else { | 706 | } else { |
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 16689b2930db..c6fc695fe1fe 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rtrap.S,v 1.61 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * rtrap.S: Preparing for return from trap on Sparc V9. | 2 | * rtrap.S: Preparing for return from trap on Sparc V9. |
3 | * | 3 | * |
4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
@@ -363,6 +363,7 @@ kern_rtt: rdpr %canrestore, %g1 | |||
363 | brz,pn %g1, kern_rtt_fill | 363 | brz,pn %g1, kern_rtt_fill |
364 | nop | 364 | nop |
365 | kern_rtt_restore: | 365 | kern_rtt_restore: |
366 | stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC] | ||
366 | restore | 367 | restore |
367 | retry | 368 | retry |
368 | 369 | ||
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index fa2827c4a3ad..e33a8a660e9e 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sbus.c,v 1.19 2002/01/23 11:27:32 davem Exp $ | 1 | /* |
2 | * sbus.c: UltraSparc SBUS controller support. | 2 | * sbus.c: UltraSparc SBUS controller support. |
3 | * | 3 | * |
4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index da5e6ee0c661..c8b03a4f68bf 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: setup.c,v 1.72 2002/02/09 19:49:30 davem Exp $ | 1 | /* |
2 | * linux/arch/sparc64/kernel/setup.c | 2 | * linux/arch/sparc64/kernel/setup.c |
3 | * | 3 | * |
4 | * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c index 6e4dc67d16af..9667e96fd513 100644 --- a/arch/sparc64/kernel/signal.c +++ b/arch/sparc64/kernel/signal.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: signal.c,v 1.60 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * arch/sparc64/kernel/signal.c | 2 | * arch/sparc64/kernel/signal.c |
3 | * | 3 | * |
4 | * Copyright (C) 1991, 1992 Linus Torvalds | 4 | * Copyright (C) 1991, 1992 Linus Torvalds |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 0d6403a630ac..fa63c68a1819 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -900,6 +900,9 @@ extern unsigned long xcall_flush_tlb_mm; | |||
900 | extern unsigned long xcall_flush_tlb_pending; | 900 | extern unsigned long xcall_flush_tlb_pending; |
901 | extern unsigned long xcall_flush_tlb_kernel_range; | 901 | extern unsigned long xcall_flush_tlb_kernel_range; |
902 | extern unsigned long xcall_report_regs; | 902 | extern unsigned long xcall_report_regs; |
903 | #ifdef CONFIG_MAGIC_SYSRQ | ||
904 | extern unsigned long xcall_fetch_glob_regs; | ||
905 | #endif | ||
903 | extern unsigned long xcall_receive_signal; | 906 | extern unsigned long xcall_receive_signal; |
904 | extern unsigned long xcall_new_mmu_context_version; | 907 | extern unsigned long xcall_new_mmu_context_version; |
905 | #ifdef CONFIG_KGDB | 908 | #ifdef CONFIG_KGDB |
@@ -1080,6 +1083,13 @@ void smp_report_regs(void) | |||
1080 | smp_cross_call(&xcall_report_regs, 0, 0, 0); | 1083 | smp_cross_call(&xcall_report_regs, 0, 0, 0); |
1081 | } | 1084 | } |
1082 | 1085 | ||
1086 | #ifdef CONFIG_MAGIC_SYSRQ | ||
1087 | void smp_fetch_global_regs(void) | ||
1088 | { | ||
1089 | smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); | ||
1090 | } | ||
1091 | #endif | ||
1092 | |||
1083 | /* We know that the window frames of the user have been flushed | 1093 | /* We know that the window frames of the user have been flushed |
1084 | * to the stack before we get here because all callers of us | 1094 | * to the stack before we get here because all callers of us |
1085 | * are flush_tlb_*() routines, and these run after flush_cache_*() | 1095 | * are flush_tlb_*() routines, and these run after flush_cache_*() |
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c index 01b52f561af4..c73ce3f4197e 100644 --- a/arch/sparc64/kernel/stacktrace.c +++ b/arch/sparc64/kernel/stacktrace.c | |||
@@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace) | |||
19 | fp = ksp + STACK_BIAS; | 19 | fp = ksp + STACK_BIAS; |
20 | thread_base = (unsigned long) tp; | 20 | thread_base = (unsigned long) tp; |
21 | do { | 21 | do { |
22 | struct reg_window *rw; | 22 | struct sparc_stackf *sf; |
23 | struct pt_regs *regs; | 23 | struct pt_regs *regs; |
24 | unsigned long pc; | 24 | unsigned long pc; |
25 | 25 | ||
@@ -28,15 +28,17 @@ void save_stack_trace(struct stack_trace *trace) | |||
28 | fp >= (thread_base + THREAD_SIZE)) | 28 | fp >= (thread_base + THREAD_SIZE)) |
29 | break; | 29 | break; |
30 | 30 | ||
31 | rw = (struct reg_window *) fp; | 31 | sf = (struct sparc_stackf *) fp; |
32 | regs = (struct pt_regs *) (rw + 1); | 32 | regs = (struct pt_regs *) (sf + 1); |
33 | 33 | ||
34 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | 34 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { |
35 | if (!(regs->tstate & TSTATE_PRIV)) | ||
36 | break; | ||
35 | pc = regs->tpc; | 37 | pc = regs->tpc; |
36 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | 38 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; |
37 | } else { | 39 | } else { |
38 | pc = rw->ins[7]; | 40 | pc = sf->callers_pc; |
39 | fp = rw->ins[6] + STACK_BIAS; | 41 | fp = (unsigned long)sf->fp + STACK_BIAS; |
40 | } | 42 | } |
41 | 43 | ||
42 | if (trace->skip > 0) | 44 | if (trace->skip > 0) |
diff --git a/arch/sparc64/kernel/starfire.c b/arch/sparc64/kernel/starfire.c index b930fee7708a..7461581b3bb9 100644 --- a/arch/sparc64/kernel/starfire.c +++ b/arch/sparc64/kernel/starfire.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: starfire.c,v 1.10 2001/04/14 21:13:45 davem Exp $ | 1 | /* |
2 | * starfire.c: Starfire/E10000 support. | 2 | * starfire.c: Starfire/E10000 support. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1998 David S. Miller (davem@redhat.com) |
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S index 010a737908ee..ade18ba0c686 100644 --- a/arch/sparc64/kernel/sys32.S +++ b/arch/sparc64/kernel/sys32.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sys32.S,v 1.12 2000/03/24 04:17:37 davem Exp $ | 1 | /* |
2 | * sys32.S: I-cache tricks for 32-bit compatibility layer simple | 2 | * sys32.S: I-cache tricks for 32-bit compatibility layer simple |
3 | * conversions. | 3 | * conversions. |
4 | * | 4 | * |
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S index 56ff55211341..704a3afcfd06 100644 --- a/arch/sparc64/kernel/trampoline.S +++ b/arch/sparc64/kernel/trampoline.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: trampoline.S,v 1.26 2002/02/09 19:49:30 davem Exp $ | 1 | /* |
2 | * trampoline.S: Jump start slave processors on sparc64. | 2 | * trampoline.S: Jump start slave processors on sparc64. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index d9b8d46707d1..369749262653 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -2116,7 +2116,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2116 | printk("\n"); | 2116 | printk("\n"); |
2117 | #endif | 2117 | #endif |
2118 | do { | 2118 | do { |
2119 | struct reg_window *rw; | 2119 | struct sparc_stackf *sf; |
2120 | struct pt_regs *regs; | 2120 | struct pt_regs *regs; |
2121 | unsigned long pc; | 2121 | unsigned long pc; |
2122 | 2122 | ||
@@ -2124,15 +2124,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2124 | if (fp < (thread_base + sizeof(struct thread_info)) || | 2124 | if (fp < (thread_base + sizeof(struct thread_info)) || |
2125 | fp >= (thread_base + THREAD_SIZE)) | 2125 | fp >= (thread_base + THREAD_SIZE)) |
2126 | break; | 2126 | break; |
2127 | rw = (struct reg_window *)fp; | 2127 | sf = (struct sparc_stackf *) fp; |
2128 | regs = (struct pt_regs *) (rw + 1); | 2128 | regs = (struct pt_regs *) (sf + 1); |
2129 | 2129 | ||
2130 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { | 2130 | if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { |
2131 | if (!(regs->tstate & TSTATE_PRIV)) | ||
2132 | break; | ||
2131 | pc = regs->tpc; | 2133 | pc = regs->tpc; |
2132 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; | 2134 | fp = regs->u_regs[UREG_I6] + STACK_BIAS; |
2133 | } else { | 2135 | } else { |
2134 | pc = rw->ins[7]; | 2136 | pc = sf->callers_pc; |
2135 | fp = rw->ins[6] + STACK_BIAS; | 2137 | fp = (unsigned long)sf->fp + STACK_BIAS; |
2136 | } | 2138 | } |
2137 | 2139 | ||
2138 | printk(" [%016lx] ", pc); | 2140 | printk(" [%016lx] ", pc); |
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index 1a511e9f0d3e..afa7fc4f5193 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: unaligned.c,v 1.24 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * unaligned.c: Unaligned load/store trap handling with special | 2 | * unaligned.c: Unaligned load/store trap handling with special |
3 | * cases for the kernel to do them more quickly. | 3 | * cases for the kernel to do them more quickly. |
4 | * | 4 | * |
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c index 3c6cfbb20360..8b313f11bc8d 100644 --- a/arch/sparc64/lib/PeeCeeI.c +++ b/arch/sparc64/lib/PeeCeeI.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: PeeCeeI.c,v 1.4 1999/09/06 01:17:35 davem Exp $ | 1 | /* |
2 | * PeeCeeI.c: The emerging standard... | 2 | * PeeCeeI.c: The emerging standard... |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/lib/VISsave.S b/arch/sparc64/lib/VISsave.S index a0ded5c5aa5c..b320ae9e2e2e 100644 --- a/arch/sparc64/lib/VISsave.S +++ b/arch/sparc64/lib/VISsave.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: VISsave.S,v 1.6 2002/02/09 19:49:30 davem Exp $ | 1 | /* |
2 | * VISsave.S: Code for saving FPU register state for | 2 | * VISsave.S: Code for saving FPU register state for |
3 | * VIS routines. One should not call this directly, | 3 | * VIS routines. One should not call this directly, |
4 | * but use macros provided in <asm/visasm.h>. | 4 | * but use macros provided in <asm/visasm.h>. |
diff --git a/arch/sparc64/lib/memcmp.S b/arch/sparc64/lib/memcmp.S index c90ad96c51b9..d3fdaa898566 100644 --- a/arch/sparc64/lib/memcmp.S +++ b/arch/sparc64/lib/memcmp.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: memcmp.S,v 1.3 2000/03/23 07:51:08 davem Exp $ | 1 | /* |
2 | * Sparc64 optimized memcmp code. | 2 | * Sparc64 optimized memcmp code. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/arch/sparc64/lib/memscan.S b/arch/sparc64/lib/memscan.S index 5e72d4911417..5686dfa5dc15 100644 --- a/arch/sparc64/lib/memscan.S +++ b/arch/sparc64/lib/memscan.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: memscan.S,v 1.3 2000/01/31 04:59:10 davem Exp $ | 1 | /* |
2 | * memscan.S: Optimized memscan for Sparc64. | 2 | * memscan.S: Optimized memscan for Sparc64. |
3 | * | 3 | * |
4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) |
diff --git a/arch/sparc64/lib/strncmp.S b/arch/sparc64/lib/strncmp.S index 6f14f53dbabe..980e83751556 100644 --- a/arch/sparc64/lib/strncmp.S +++ b/arch/sparc64/lib/strncmp.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: strncmp.S,v 1.2 1997/03/11 17:51:44 jj Exp $ | 1 | /* |
2 | * Sparc64 optimized strncmp code. | 2 | * Sparc64 optimized strncmp code. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/arch/sparc64/lib/strncpy_from_user.S b/arch/sparc64/lib/strncpy_from_user.S index b2f499f79427..511c8f136f95 100644 --- a/arch/sparc64/lib/strncpy_from_user.S +++ b/arch/sparc64/lib/strncpy_from_user.S | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: strncpy_from_user.S,v 1.6 1999/05/25 16:53:05 jj Exp $ | 1 | /* |
2 | * strncpy_from_user.S: Sparc64 strncpy from userspace. | 2 | * strncpy_from_user.S: Sparc64 strncpy from userspace. |
3 | * | 3 | * |
4 | * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) |
diff --git a/arch/sparc64/math-emu/math.c b/arch/sparc64/math-emu/math.c index 6ee496c2864a..add053e0f3b3 100644 --- a/arch/sparc64/math-emu/math.c +++ b/arch/sparc64/math-emu/math.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: math.c,v 1.11 1999/12/20 05:02:25 davem Exp $ | 1 | /* |
2 | * arch/sparc64/math-emu/math.c | 2 | * arch/sparc64/math-emu/math.c |
3 | * | 3 | * |
4 | * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz) |
diff --git a/arch/sparc64/math-emu/sfp-util.h b/arch/sparc64/math-emu/sfp-util.h index 31e474738cf6..425d3cf01af4 100644 --- a/arch/sparc64/math-emu/sfp-util.h +++ b/arch/sparc64/math-emu/sfp-util.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sfp-util.h,v 1.5 2001/06/10 06:48:46 davem Exp $ | 1 | /* |
2 | * arch/sparc64/math-emu/sfp-util.h | 2 | * arch/sparc64/math-emu/sfp-util.h |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) | 4 | * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) |
diff --git a/arch/sparc64/mm/Makefile b/arch/sparc64/mm/Makefile index e415bf942bcd..68d04c0370f4 100644 --- a/arch/sparc64/mm/Makefile +++ b/arch/sparc64/mm/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.8 2000/12/14 22:57:25 davem Exp $ | ||
2 | # Makefile for the linux Sparc64-specific parts of the memory manager. | 1 | # Makefile for the linux Sparc64-specific parts of the memory manager. |
3 | # | 2 | # |
4 | 3 | ||
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 2650d0d33ac2..236f4d228d2b 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: fault.c,v 1.59 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. | 2 | * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index af9d81db0b38..f362c2037013 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: generic.c,v 1.18 2001/12/21 04:56:15 davem Exp $ | 1 | /* |
2 | * generic.c: Generic Sparc mm routines that are not dependent upon | 2 | * generic.c: Generic Sparc mm routines that are not dependent upon |
3 | * MMU type but are Sparc specific. | 3 | * MMU type but are Sparc specific. |
4 | * | 4 | * |
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 3c7b9471eafb..84898c44dd4d 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: init.c,v 1.209 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * arch/sparc64/mm/init.c | 2 | * arch/sparc64/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 796e005dad8b..9bb2d90a9df6 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* $Id: ultra.S,v 1.72 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * ultra.S: Don't expand these all over the place... | 2 | * ultra.S: Don't expand these all over the place... |
3 | * | 3 | * |
4 | * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1997, 2000, 2008 David S. Miller (davem@davemloft.net) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <asm/asi.h> | 7 | #include <asm/asi.h> |
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/thread_info.h> | 15 | #include <asm/thread_info.h> |
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/hypervisor.h> | 17 | #include <asm/hypervisor.h> |
18 | #include <asm/cpudata.h> | ||
18 | 19 | ||
19 | /* Basically, most of the Spitfire vs. Cheetah madness | 20 | /* Basically, most of the Spitfire vs. Cheetah madness |
20 | * has to do with the fact that Cheetah does not support | 21 | * has to do with the fact that Cheetah does not support |
@@ -514,6 +515,32 @@ xcall_report_regs: | |||
514 | b rtrap_xcall | 515 | b rtrap_xcall |
515 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | 516 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 |
516 | 517 | ||
518 | #ifdef CONFIG_MAGIC_SYSRQ | ||
519 | .globl xcall_fetch_glob_regs | ||
520 | xcall_fetch_glob_regs: | ||
521 | sethi %hi(global_reg_snapshot), %g1 | ||
522 | or %g1, %lo(global_reg_snapshot), %g1 | ||
523 | __GET_CPUID(%g2) | ||
524 | sllx %g2, 6, %g3 | ||
525 | add %g1, %g3, %g1 | ||
526 | rdpr %tstate, %g7 | ||
527 | stx %g7, [%g1 + GR_SNAP_TSTATE] | ||
528 | rdpr %tpc, %g7 | ||
529 | stx %g7, [%g1 + GR_SNAP_TPC] | ||
530 | rdpr %tnpc, %g7 | ||
531 | stx %g7, [%g1 + GR_SNAP_TNPC] | ||
532 | stx %o7, [%g1 + GR_SNAP_O7] | ||
533 | stx %i7, [%g1 + GR_SNAP_I7] | ||
534 | sethi %hi(trap_block), %g7 | ||
535 | or %g7, %lo(trap_block), %g7 | ||
536 | sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2 | ||
537 | add %g7, %g2, %g7 | ||
538 | ldx [%g7 + TRAP_PER_CPU_THREAD], %g3 | ||
539 | membar #StoreStore | ||
540 | stx %g3, [%g1 + GR_SNAP_THREAD] | ||
541 | retry | ||
542 | #endif /* CONFIG_MAGIC_SYSRQ */ | ||
543 | |||
517 | #ifdef DCACHE_ALIASING_POSSIBLE | 544 | #ifdef DCACHE_ALIASING_POSSIBLE |
518 | .align 32 | 545 | .align 32 |
519 | .globl xcall_flush_dcache_page_cheetah | 546 | .globl xcall_flush_dcache_page_cheetah |
diff --git a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile index 3d33ed27bc27..8c94483ca54d 100644 --- a/arch/sparc64/prom/Makefile +++ b/arch/sparc64/prom/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | # $Id: Makefile,v 1.7 2000/12/14 22:57:25 davem Exp $ | ||
2 | # Makefile for the Sun Boot PROM interface library under | 1 | # Makefile for the Sun Boot PROM interface library under |
3 | # Linux. | 2 | # Linux. |
4 | # | 3 | # |
diff --git a/arch/sparc64/prom/bootstr.c b/arch/sparc64/prom/bootstr.c index a7278614e99d..ab9ccc63b388 100644 --- a/arch/sparc64/prom/bootstr.c +++ b/arch/sparc64/prom/bootstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bootstr.c,v 1.6 1999/08/31 06:55:01 davem Exp $ | 1 | /* |
2 | * bootstr.c: Boot string/argument acquisition from the PROM. | 2 | * bootstr.c: Boot string/argument acquisition from the PROM. |
3 | * | 3 | * |
4 | * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/prom/devops.c b/arch/sparc64/prom/devops.c index 4641839eb39a..9dbd803e46e1 100644 --- a/arch/sparc64/prom/devops.c +++ b/arch/sparc64/prom/devops.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: devops.c,v 1.3 1997/10/29 07:43:28 ecd Exp $ | 1 | /* |
2 | * devops.c: Device operations using the PROM. | 2 | * devops.c: Device operations using the PROM. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/arch/sparc64/prom/init.c b/arch/sparc64/prom/init.c index 87e7c7ea0ee6..7b00f89490a4 100644 --- a/arch/sparc64/prom/init.c +++ b/arch/sparc64/prom/init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: init.c,v 1.10 1999/09/21 14:35:59 davem Exp $ | 1 | /* |
2 | * init.c: Initialize internal variables used by the PROM | 2 | * init.c: Initialize internal variables used by the PROM |
3 | * library functions. | 3 | * library functions. |
4 | * | 4 | * |
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index 47a877a15abd..9b0c0760901e 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: misc.c,v 1.20 2001/09/21 03:17:07 kanoj Exp $ | 1 | /* |
2 | * misc.c: Miscellaneous prom functions that don't belong | 2 | * misc.c: Miscellaneous prom functions that don't belong |
3 | * anywhere else. | 3 | * anywhere else. |
4 | * | 4 | * |
diff --git a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c index 7fcccc0e19cf..4b7c937bba61 100644 --- a/arch/sparc64/prom/p1275.c +++ b/arch/sparc64/prom/p1275.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: p1275.c,v 1.22 2001/10/18 09:40:00 davem Exp $ | 1 | /* |
2 | * p1275.c: Sun IEEE 1275 PROM low level interface routines | 2 | * p1275.c: Sun IEEE 1275 PROM low level interface routines |
3 | * | 3 | * |
4 | * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c index a99ccd7fb1b0..281aea44790b 100644 --- a/arch/sparc64/prom/tree.c +++ b/arch/sparc64/prom/tree.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: tree.c,v 1.10 1998/01/10 22:39:00 ecd Exp $ | 1 | /* |
2 | * tree.c: Basic device tree traversal/scanning for the Linux | 2 | * tree.c: Basic device tree traversal/scanning for the Linux |
3 | * prom library. | 3 | * prom library. |
4 | * | 4 | * |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index dba8e05f0287..6976812cfb18 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -259,6 +259,8 @@ if BROKEN | |||
259 | source "drivers/mtd/Kconfig" | 259 | source "drivers/mtd/Kconfig" |
260 | endif | 260 | endif |
261 | 261 | ||
262 | source "drivers/leds/Kconfig" | ||
263 | |||
262 | #This is just to shut up some Kconfig warnings, so no prompt. | 264 | #This is just to shut up some Kconfig warnings, so no prompt. |
263 | config INPUT | 265 | config INPUT |
264 | bool | 266 | bool |
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c index e9809356c530..5f903587d69e 100644 --- a/arch/um/drivers/pcap_user.c +++ b/arch/um/drivers/pcap_user.c | |||
@@ -50,7 +50,7 @@ static int pcap_open(void *data) | |||
50 | return -EIO; | 50 | return -EIO; |
51 | } | 51 | } |
52 | 52 | ||
53 | pri->compiled = kmalloc(sizeof(struct bpf_program), | 53 | pri->compiled = uml_kmalloc(sizeof(struct bpf_program), |
54 | UM_GFP_KERNEL); | 54 | UM_GFP_KERNEL); |
55 | if (pri->compiled == NULL) { | 55 | if (pri->compiled == NULL) { |
56 | printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); | 56 | printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 44ad1607be2d..b58fb8941d8d 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include "irq_user.h" | 49 | #include "irq_user.h" |
50 | #include "irq_kern.h" | 50 | #include "irq_kern.h" |
51 | #include "ubd_user.h" | 51 | #include "ubd_user.h" |
52 | #include "kern_util.h" | ||
53 | #include "os.h" | 52 | #include "os.h" |
54 | #include "mem.h" | 53 | #include "mem.h" |
55 | #include "mem_kern.h" | 54 | #include "mem_kern.h" |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index e2716ac8889a..db5be46e3e18 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -299,6 +299,6 @@ extern int os_arch_prctl(int pid, int code, unsigned long *addr); | |||
299 | extern int get_pty(void); | 299 | extern int get_pty(void); |
300 | 300 | ||
301 | /* sys-$ARCH/task_size.c */ | 301 | /* sys-$ARCH/task_size.c */ |
302 | extern unsigned long os_get_task_size(void); | 302 | extern unsigned long os_get_top_address(void); |
303 | 303 | ||
304 | #endif | 304 | #endif |
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c index dcfceca95052..910eda8fca18 100644 --- a/arch/um/kernel/init_task.c +++ b/arch/um/kernel/init_task.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | static struct fs_struct init_fs = INIT_FS; | 13 | static struct fs_struct init_fs = INIT_FS; |
14 | struct mm_struct init_mm = INIT_MM(init_mm); | 14 | struct mm_struct init_mm = INIT_MM(init_mm); |
15 | static struct files_struct init_files = INIT_FILES; | ||
16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
18 | EXPORT_SYMBOL(init_mm); | 17 | EXPORT_SYMBOL(init_mm); |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 66e2a305a8d6..ccc02a616c22 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -60,6 +60,11 @@ EXPORT_SYMBOL(os_rcv_fd); | |||
60 | EXPORT_SYMBOL(run_helper); | 60 | EXPORT_SYMBOL(run_helper); |
61 | EXPORT_SYMBOL(start_thread); | 61 | EXPORT_SYMBOL(start_thread); |
62 | 62 | ||
63 | EXPORT_SYMBOL(add_sigio_fd); | ||
64 | EXPORT_SYMBOL(ignore_sigio_fd); | ||
65 | EXPORT_SYMBOL(deactivate_fd); | ||
66 | EXPORT_SYMBOL(sigio_broken); | ||
67 | |||
63 | #ifdef CONFIG_SMP | 68 | #ifdef CONFIG_SMP |
64 | 69 | ||
65 | /* required for SMP */ | 70 | /* required for SMP */ |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 9db85b2ce698..8d84250324b3 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -274,7 +274,7 @@ int __init linux_main(int argc, char **argv) | |||
274 | if (have_root == 0) | 274 | if (have_root == 0) |
275 | add_arg(DEFAULT_COMMAND_LINE); | 275 | add_arg(DEFAULT_COMMAND_LINE); |
276 | 276 | ||
277 | host_task_size = os_get_task_size(); | 277 | host_task_size = os_get_top_address(); |
278 | /* | 278 | /* |
279 | * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps | 279 | * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps |
280 | * out | 280 | * out |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index 74ca7aabf4e1..30860b89ec58 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <unistd.h> | 7 | #include <unistd.h> |
8 | #include <errno.h> | 8 | #include <errno.h> |
9 | #include <sched.h> | 9 | #include <sched.h> |
10 | #include <linux/limits.h> | ||
10 | #include <sys/socket.h> | 11 | #include <sys/socket.h> |
11 | #include <sys/wait.h> | 12 | #include <sys/wait.h> |
12 | #include "kern_constants.h" | 13 | #include "kern_constants.h" |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index 6be028ca1817..172ad8f72e12 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -55,7 +55,7 @@ static int ptrace_dump_regs(int pid) | |||
55 | * Signals that are OK to receive in the stub - we'll just continue it. | 55 | * Signals that are OK to receive in the stub - we'll just continue it. |
56 | * SIGWINCH will happen when UML is inside a detached screen. | 56 | * SIGWINCH will happen when UML is inside a detached screen. |
57 | */ | 57 | */ |
58 | #define STUB_SIG_MASK (1 << SIGVTALRM) | 58 | #define STUB_SIG_MASK ((1 << SIGVTALRM) | (1 << SIGWINCH)) |
59 | 59 | ||
60 | /* Signals that the stub will finish with - anything else is an error */ | 60 | /* Signals that the stub will finish with - anything else is an error */ |
61 | #define STUB_DONE_MASK (1 << SIGTRAP) | 61 | #define STUB_DONE_MASK (1 << SIGTRAP) |
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index b4b36e0f2e89..183db26d01bf 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -121,8 +121,10 @@ static int stop_ptraced_child(int pid, int exitcode, int mustexit) | |||
121 | { | 121 | { |
122 | int status, n, ret = 0; | 122 | int status, n, ret = 0; |
123 | 123 | ||
124 | if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) | 124 | if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) { |
125 | fatal_perror("stop_ptraced_child : ptrace failed"); | 125 | perror("stop_ptraced_child : ptrace failed"); |
126 | return -1; | ||
127 | } | ||
126 | CATCH_EINTR(n = waitpid(pid, &status, 0)); | 128 | CATCH_EINTR(n = waitpid(pid, &status, 0)); |
127 | if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { | 129 | if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { |
128 | int exit_with = WEXITSTATUS(status); | 130 | int exit_with = WEXITSTATUS(status); |
@@ -212,7 +214,7 @@ static void __init check_sysemu(void) | |||
212 | if (n < 0) | 214 | if (n < 0) |
213 | fatal_perror("check_sysemu : wait failed"); | 215 | fatal_perror("check_sysemu : wait failed"); |
214 | if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) | 216 | if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) |
215 | fatal("check_sysemu : expected SIGTRAP, got status = %d", | 217 | fatal("check_sysemu : expected SIGTRAP, got status = %d\n", |
216 | status); | 218 | status); |
217 | 219 | ||
218 | if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) | 220 | if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) |
@@ -254,9 +256,11 @@ static void __init check_sysemu(void) | |||
254 | 256 | ||
255 | if (WIFSTOPPED(status) && | 257 | if (WIFSTOPPED(status) && |
256 | (WSTOPSIG(status) == (SIGTRAP|0x80))) { | 258 | (WSTOPSIG(status) == (SIGTRAP|0x80))) { |
257 | if (!count) | 259 | if (!count) { |
258 | fatal("check_ptrace : SYSEMU_SINGLESTEP " | 260 | non_fatal("check_ptrace : SYSEMU_SINGLESTEP " |
259 | "doesn't singlestep"); | 261 | "doesn't singlestep"); |
262 | goto fail; | ||
263 | } | ||
260 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, | 264 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, |
261 | os_getpid()); | 265 | os_getpid()); |
262 | if (n < 0) | 266 | if (n < 0) |
@@ -266,9 +270,12 @@ static void __init check_sysemu(void) | |||
266 | } | 270 | } |
267 | else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) | 271 | else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) |
268 | count++; | 272 | count++; |
269 | else | 273 | else { |
270 | fatal("check_ptrace : expected SIGTRAP or " | 274 | non_fatal("check_ptrace : expected SIGTRAP or " |
271 | "(SIGTRAP | 0x80), got status = %d", status); | 275 | "(SIGTRAP | 0x80), got status = %d\n", |
276 | status); | ||
277 | goto fail; | ||
278 | } | ||
272 | } | 279 | } |
273 | if (stop_ptraced_child(pid, 0, 0) < 0) | 280 | if (stop_ptraced_child(pid, 0, 0) < 0) |
274 | goto fail_stopped; | 281 | goto fail_stopped; |
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index c6183e7aec3d..229f7a53d8da 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -5,7 +5,8 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <errno.h> | 7 | #include <errno.h> |
8 | #include <asm/user.h> | 8 | #include <sys/ptrace.h> |
9 | #include <sys/user.h> | ||
9 | #include "kern_constants.h" | 10 | #include "kern_constants.h" |
10 | #include "longjmp.h" | 11 | #include "longjmp.h" |
11 | #include "user.h" | 12 | #include "user.h" |
@@ -75,7 +76,7 @@ int put_fp_registers(int pid, unsigned long *regs) | |||
75 | 76 | ||
76 | void arch_init_registers(int pid) | 77 | void arch_init_registers(int pid) |
77 | { | 78 | { |
78 | struct user_fxsr_struct fpx_regs; | 79 | struct user_fpxregs_struct fpx_regs; |
79 | int err; | 80 | int err; |
80 | 81 | ||
81 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); | 82 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); |
diff --git a/arch/um/os-Linux/sys-i386/task_size.c b/arch/um/os-Linux/sys-i386/task_size.c index ccb49b0aff59..be04c1e183bf 100644 --- a/arch/um/os-Linux/sys-i386/task_size.c +++ b/arch/um/os-Linux/sys-i386/task_size.c | |||
@@ -63,7 +63,7 @@ static int page_ok(unsigned long page) | |||
63 | return ok; | 63 | return ok; |
64 | } | 64 | } |
65 | 65 | ||
66 | unsigned long os_get_task_size(void) | 66 | unsigned long os_get_top_address(void) |
67 | { | 67 | { |
68 | struct sigaction sa, old; | 68 | struct sigaction sa, old; |
69 | unsigned long bottom = 0; | 69 | unsigned long bottom = 0; |
@@ -76,9 +76,9 @@ unsigned long os_get_task_size(void) | |||
76 | * hosts, but shouldn't hurt otherwise. | 76 | * hosts, but shouldn't hurt otherwise. |
77 | */ | 77 | */ |
78 | unsigned long top = 0xffffd000 >> UM_KERN_PAGE_SHIFT; | 78 | unsigned long top = 0xffffd000 >> UM_KERN_PAGE_SHIFT; |
79 | unsigned long test; | 79 | unsigned long test, original; |
80 | 80 | ||
81 | printf("Locating the top of the address space ... "); | 81 | printf("Locating the bottom of the address space ... "); |
82 | fflush(stdout); | 82 | fflush(stdout); |
83 | 83 | ||
84 | /* | 84 | /* |
@@ -89,16 +89,31 @@ unsigned long os_get_task_size(void) | |||
89 | sigemptyset(&sa.sa_mask); | 89 | sigemptyset(&sa.sa_mask); |
90 | sa.sa_flags = SA_NODEFER; | 90 | sa.sa_flags = SA_NODEFER; |
91 | if (sigaction(SIGSEGV, &sa, &old)) { | 91 | if (sigaction(SIGSEGV, &sa, &old)) { |
92 | perror("os_get_task_size"); | 92 | perror("os_get_top_address"); |
93 | exit(1); | 93 | exit(1); |
94 | } | 94 | } |
95 | 95 | ||
96 | if (!page_ok(bottom)) { | 96 | /* Manually scan the address space, bottom-up, until we find |
97 | fprintf(stderr, "Address 0x%x no good?\n", | 97 | * the first valid page (or run out of them). |
98 | bottom << UM_KERN_PAGE_SHIFT); | 98 | */ |
99 | for (bottom = 0; bottom < top; bottom++) { | ||
100 | if (page_ok(bottom)) | ||
101 | break; | ||
102 | } | ||
103 | |||
104 | /* If we've got this far, we ran out of pages. */ | ||
105 | if (bottom == top) { | ||
106 | fprintf(stderr, "Unable to determine bottom of address " | ||
107 | "space.\n"); | ||
99 | exit(1); | 108 | exit(1); |
100 | } | 109 | } |
101 | 110 | ||
111 | printf("0x%x\n", bottom << UM_KERN_PAGE_SHIFT); | ||
112 | printf("Locating the top of the address space ... "); | ||
113 | fflush(stdout); | ||
114 | |||
115 | original = bottom; | ||
116 | |||
102 | /* This could happen with a 4G/4G split */ | 117 | /* This could happen with a 4G/4G split */ |
103 | if (page_ok(top)) | 118 | if (page_ok(top)) |
104 | goto out; | 119 | goto out; |
@@ -114,7 +129,7 @@ unsigned long os_get_task_size(void) | |||
114 | out: | 129 | out: |
115 | /* Restore the old SIGSEGV handling */ | 130 | /* Restore the old SIGSEGV handling */ |
116 | if (sigaction(SIGSEGV, &old, NULL)) { | 131 | if (sigaction(SIGSEGV, &old, NULL)) { |
117 | perror("os_get_task_size"); | 132 | perror("os_get_top_address"); |
118 | exit(1); | 133 | exit(1); |
119 | } | 134 | } |
120 | top <<= UM_KERN_PAGE_SHIFT; | 135 | top <<= UM_KERN_PAGE_SHIFT; |
diff --git a/arch/um/os-Linux/sys-x86_64/task_size.c b/arch/um/os-Linux/sys-x86_64/task_size.c index fad6f57f8ee3..26a0dd1f349c 100644 --- a/arch/um/os-Linux/sys-x86_64/task_size.c +++ b/arch/um/os-Linux/sys-x86_64/task_size.c | |||
@@ -1,4 +1,4 @@ | |||
1 | unsigned long os_get_task_size(unsigned long shift) | 1 | unsigned long os_get_top_address(unsigned long shift) |
2 | { | 2 | { |
3 | /* The old value of CONFIG_TOP_ADDR */ | 3 | /* The old value of CONFIG_TOP_ADDR */ |
4 | return 0x7fc0000000; | 4 | return 0x7fc0000000; |
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index bee98f466d66..dec5678fc17f 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c | |||
@@ -106,6 +106,10 @@ static void deliver_alarm(void) | |||
106 | unsigned long long this_tick = os_nsecs(); | 106 | unsigned long long this_tick = os_nsecs(); |
107 | int one_tick = UM_NSEC_PER_SEC / UM_HZ; | 107 | int one_tick = UM_NSEC_PER_SEC / UM_HZ; |
108 | 108 | ||
109 | /* Protection against the host's time going backwards */ | ||
110 | if ((last_tick != 0) && (this_tick < last_tick)) | ||
111 | this_tick = last_tick; | ||
112 | |||
109 | if (last_tick == 0) | 113 | if (last_tick == 0) |
110 | last_tick = this_tick - one_tick; | 114 | last_tick = this_tick - one_tick; |
111 | 115 | ||
@@ -148,6 +152,9 @@ static int after_sleep_interval(struct timespec *ts) | |||
148 | start_usecs = usec; | 152 | start_usecs = usec; |
149 | 153 | ||
150 | start_usecs -= skew / UM_NSEC_PER_USEC; | 154 | start_usecs -= skew / UM_NSEC_PER_USEC; |
155 | if (start_usecs < 0) | ||
156 | start_usecs = 0; | ||
157 | |||
151 | tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC, | 158 | tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC, |
152 | .tv_usec = start_usecs % UM_USEC_PER_SEC }); | 159 | .tv_usec = start_usecs % UM_USEC_PER_SEC }); |
153 | interval = ((struct itimerval) { { 0, usec }, tv }); | 160 | interval = ((struct itimerval) { { 0, usec }, tv }); |
diff --git a/arch/um/sys-x86_64/ksyms.c b/arch/um/sys-x86_64/ksyms.c index 4d7d1a812d8f..1db2fce00948 100644 --- a/arch/um/sys-x86_64/ksyms.c +++ b/arch/um/sys-x86_64/ksyms.c | |||
@@ -1,5 +1,11 @@ | |||
1 | #include "linux/module.h" | 1 | #include <linux/module.h> |
2 | #include "asm/string.h" | 2 | #include <asm/string.h> |
3 | #include <asm/checksum.h> | ||
3 | 4 | ||
4 | /*XXX: we need them because they would be exported by x86_64 */ | 5 | /*XXX: we need them because they would be exported by x86_64 */ |
6 | #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 | ||
7 | EXPORT_SYMBOL(memcpy); | ||
8 | #else | ||
5 | EXPORT_SYMBOL(__memcpy); | 9 | EXPORT_SYMBOL(__memcpy); |
10 | #endif | ||
11 | EXPORT_SYMBOL(csum_partial); | ||
diff --git a/arch/v850/kernel/init_task.c b/arch/v850/kernel/init_task.c index ed2f93cf7c66..44b274dff33f 100644 --- a/arch/v850/kernel/init_task.c +++ b/arch/v850/kernel/init_task.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
22 | 22 | ||
23 | static struct fs_struct init_fs = INIT_FS; | 23 | static struct fs_struct init_fs = INIT_FS; |
24 | static struct files_struct init_files = INIT_FILES; | ||
25 | static struct signal_struct init_signals = INIT_SIGNALS (init_signals); | 24 | static struct signal_struct init_signals = INIT_SIGNALS (init_signals); |
26 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 25 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
27 | struct mm_struct init_mm = INIT_MM (init_mm); | 26 | struct mm_struct init_mm = INIT_MM (init_mm); |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe361ae7ef2f..52e18e6d2ba0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -26,17 +26,10 @@ config X86 | |||
26 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 26 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) |
27 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 27 | select HAVE_ARCH_KGDB if !X86_VOYAGER |
28 | 28 | ||
29 | config DEFCONFIG_LIST | 29 | config ARCH_DEFCONFIG |
30 | string | 30 | string |
31 | depends on X86_32 | 31 | default "arch/x86/configs/i386_defconfig" if X86_32 |
32 | option defconfig_list | 32 | default "arch/x86/configs/x86_64_defconfig" if X86_64 |
33 | default "arch/x86/configs/i386_defconfig" | ||
34 | |||
35 | config DEFCONFIG_LIST | ||
36 | string | ||
37 | depends on X86_64 | ||
38 | option defconfig_list | ||
39 | default "arch/x86/configs/x86_64_defconfig" | ||
40 | 33 | ||
41 | 34 | ||
42 | config GENERIC_LOCKBREAK | 35 | config GENERIC_LOCKBREAK |
@@ -1515,13 +1508,13 @@ config PCI_GOMMCONFIG | |||
1515 | config PCI_GODIRECT | 1508 | config PCI_GODIRECT |
1516 | bool "Direct" | 1509 | bool "Direct" |
1517 | 1510 | ||
1518 | config PCI_GOANY | ||
1519 | bool "Any" | ||
1520 | |||
1521 | config PCI_GOOLPC | 1511 | config PCI_GOOLPC |
1522 | bool "OLPC" | 1512 | bool "OLPC" |
1523 | depends on OLPC | 1513 | depends on OLPC |
1524 | 1514 | ||
1515 | config PCI_GOANY | ||
1516 | bool "Any" | ||
1517 | |||
1525 | endchoice | 1518 | endchoice |
1526 | 1519 | ||
1527 | config PCI_BIOS | 1520 | config PCI_BIOS |
@@ -1538,9 +1531,8 @@ config PCI_MMCONFIG | |||
1538 | depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) | 1531 | depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) |
1539 | 1532 | ||
1540 | config PCI_OLPC | 1533 | config PCI_OLPC |
1541 | bool | 1534 | def_bool y |
1542 | depends on PCI && PCI_GOOLPC | 1535 | depends on PCI && OLPC && (PCI_GOOLPC || PCI_GOANY) |
1543 | default y | ||
1544 | 1536 | ||
1545 | config PCI_DOMAINS | 1537 | config PCI_DOMAINS |
1546 | def_bool y | 1538 | def_bool y |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index ac1e31ba4795..18363374d51a 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -6,15 +6,19 @@ config TRACE_IRQFLAGS_SUPPORT | |||
6 | source "lib/Kconfig.debug" | 6 | source "lib/Kconfig.debug" |
7 | 7 | ||
8 | config NONPROMISC_DEVMEM | 8 | config NONPROMISC_DEVMEM |
9 | bool "Disable promiscuous /dev/mem" | 9 | bool "Filter access to /dev/mem" |
10 | help | 10 | help |
11 | The /dev/mem file by default only allows userspace access to PCI | 11 | If this option is left off, you allow userspace access to all |
12 | space and the BIOS code and data regions. This is sufficient for | 12 | of memory, including kernel and userspace memory. Accidental |
13 | dosemu and X and all common users of /dev/mem. With this config | 13 | access to this is obviously disastrous, but specific access can |
14 | option, you allow userspace access to all of memory, including | 14 | be used by people debugging the kernel. |
15 | kernel and userspace memory. Accidental access to this is | 15 | |
16 | obviously disasterous, but specific access can be used by people | 16 | If this option is switched on, the /dev/mem file only allows |
17 | debugging the kernel. | 17 | userspace access to PCI space and the BIOS code and data regions. |
18 | This is sufficient for dosemu and X and all common users of | ||
19 | /dev/mem. | ||
20 | |||
21 | If in doubt, say Y. | ||
18 | 22 | ||
19 | config EARLY_PRINTK | 23 | config EARLY_PRINTK |
20 | bool "Early printk" if EMBEDDED | 24 | bool "Early printk" if EMBEDDED |
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c index 90943f83e84d..e01aafd03bde 100644 --- a/arch/x86/boot/a20.c +++ b/arch/x86/boot/a20.c | |||
@@ -115,8 +115,6 @@ static void enable_a20_fast(void) | |||
115 | 115 | ||
116 | int enable_a20(void) | 116 | int enable_a20(void) |
117 | { | 117 | { |
118 | int loops = A20_ENABLE_LOOPS; | ||
119 | |||
120 | #if defined(CONFIG_X86_ELAN) | 118 | #if defined(CONFIG_X86_ELAN) |
121 | /* Elan croaks if we try to touch the KBC */ | 119 | /* Elan croaks if we try to touch the KBC */ |
122 | enable_a20_fast(); | 120 | enable_a20_fast(); |
@@ -128,6 +126,7 @@ int enable_a20(void) | |||
128 | enable_a20_kbc(); | 126 | enable_a20_kbc(); |
129 | return 0; | 127 | return 0; |
130 | #else | 128 | #else |
129 | int loops = A20_ENABLE_LOOPS; | ||
131 | while (loops--) { | 130 | while (loops--) { |
132 | /* First, check to see if A20 is already enabled | 131 | /* First, check to see if A20 is already enabled |
133 | (legacy free, etc.) */ | 132 | (legacy free, etc.) */ |
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c index c1d00c0274c4..50e47cdbdddd 100644 --- a/arch/x86/boot/printf.c +++ b/arch/x86/boot/printf.c | |||
@@ -56,7 +56,7 @@ static char *number(char *str, long num, int base, int size, int precision, | |||
56 | if (type & LEFT) | 56 | if (type & LEFT) |
57 | type &= ~ZEROPAD; | 57 | type &= ~ZEROPAD; |
58 | if (base < 2 || base > 36) | 58 | if (base < 2 || base > 36) |
59 | return 0; | 59 | return NULL; |
60 | c = (type & ZEROPAD) ? '0' : ' '; | 60 | c = (type & ZEROPAD) ? '0' : ' '; |
61 | sign = 0; | 61 | sign = 0; |
62 | if (type & SIGN) { | 62 | if (type & SIGN) { |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index c49ebcc6c41e..33c5216fd3e1 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -242,12 +242,19 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) | |||
242 | 242 | ||
243 | static void __cpuinit acpi_register_lapic(int id, u8 enabled) | 243 | static void __cpuinit acpi_register_lapic(int id, u8 enabled) |
244 | { | 244 | { |
245 | unsigned int ver = 0; | ||
246 | |||
245 | if (!enabled) { | 247 | if (!enabled) { |
246 | ++disabled_cpus; | 248 | ++disabled_cpus; |
247 | return; | 249 | return; |
248 | } | 250 | } |
249 | 251 | ||
250 | generic_processor_info(id, 0); | 252 | #ifdef CONFIG_X86_32 |
253 | if (boot_cpu_physical_apicid != -1U) | ||
254 | ver = apic_version[boot_cpu_physical_apicid]; | ||
255 | #endif | ||
256 | |||
257 | generic_processor_info(id, ver); | ||
251 | } | 258 | } |
252 | 259 | ||
253 | static int __init | 260 | static int __init |
@@ -767,8 +774,13 @@ static void __init acpi_register_lapic_address(unsigned long address) | |||
767 | mp_lapic_addr = address; | 774 | mp_lapic_addr = address; |
768 | 775 | ||
769 | set_fixmap_nocache(FIX_APIC_BASE, address); | 776 | set_fixmap_nocache(FIX_APIC_BASE, address); |
770 | if (boot_cpu_physical_apicid == -1U) | 777 | if (boot_cpu_physical_apicid == -1U) { |
771 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); | 778 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); |
779 | #ifdef CONFIG_X86_32 | ||
780 | apic_version[boot_cpu_physical_apicid] = | ||
781 | GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
782 | #endif | ||
783 | } | ||
772 | } | 784 | } |
773 | 785 | ||
774 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | 786 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) |
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 5910020c3f24..0633cfd0dc29 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -534,7 +534,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
534 | */ | 534 | */ |
535 | void clear_local_APIC(void) | 535 | void clear_local_APIC(void) |
536 | { | 536 | { |
537 | int maxlvt = lapic_get_maxlvt(); | 537 | int maxlvt; |
538 | u32 v; | 538 | u32 v; |
539 | 539 | ||
540 | /* APIC hasn't been mapped yet */ | 540 | /* APIC hasn't been mapped yet */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index af4a867a097c..777a7ff075de 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
245 | if ((ecx > 95) || (ecx == 0) || (eax < ebx)) | 245 | if ((ecx > 95) || (ecx == 0) || (eax < ebx)) |
246 | return -EIO; | 246 | return -EIO; |
247 | 247 | ||
248 | edx = (eax - ebx) / (100 - ecx); | 248 | edx = ((eax - ebx) * 100) / (100 - ecx); |
249 | *low_freq = edx * 1000; /* back to kHz */ | 249 | *low_freq = edx * 1000; /* back to kHz */ |
250 | 250 | ||
251 | dprintk("low frequency is %u kHz\n", *low_freq); | 251 | dprintk("low frequency is %u kHz\n", *low_freq); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 46d4034d9f37..206791eb46e3 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1127,12 +1127,23 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1127 | * an UP version, and is deprecated by AMD. | 1127 | * an UP version, and is deprecated by AMD. |
1128 | */ | 1128 | */ |
1129 | if (num_online_cpus() != 1) { | 1129 | if (num_online_cpus() != 1) { |
1130 | printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); | 1130 | #ifndef CONFIG_ACPI_PROCESSOR |
1131 | printk(KERN_ERR PFX "ACPI Processor support is required " | ||
1132 | "for SMP systems but is absent. Please load the " | ||
1133 | "ACPI Processor module before starting this " | ||
1134 | "driver.\n"); | ||
1135 | #else | ||
1136 | printk(KERN_ERR PFX "Your BIOS does not provide ACPI " | ||
1137 | "_PSS objects in a way that Linux understands. " | ||
1138 | "Please report this to the Linux ACPI maintainers" | ||
1139 | " and complain to your BIOS vendor.\n"); | ||
1140 | #endif | ||
1131 | kfree(data); | 1141 | kfree(data); |
1132 | return -ENODEV; | 1142 | return -ENODEV; |
1133 | } | 1143 | } |
1134 | if (pol->cpu != 0) { | 1144 | if (pol->cpu != 0) { |
1135 | printk(KERN_ERR PFX "No _PSS objects for CPU other than CPU0\n"); | 1145 | printk(KERN_ERR PFX "No ACPI _PSS objects for CPU other than " |
1146 | "CPU0. Complain to your BIOS vendor.\n"); | ||
1136 | kfree(data); | 1147 | kfree(data); |
1137 | return -ENODEV; | 1148 | return -ENODEV; |
1138 | } | 1149 | } |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 2a609dc3271c..c778e4fa55a2 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -248,6 +248,7 @@ ENTRY(resume_userspace) | |||
248 | DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt | 248 | DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt |
249 | # setting need_resched or sigpending | 249 | # setting need_resched or sigpending |
250 | # between sampling and the iret | 250 | # between sampling and the iret |
251 | TRACE_IRQS_OFF | ||
251 | movl TI_flags(%ebp), %ecx | 252 | movl TI_flags(%ebp), %ecx |
252 | andl $_TIF_WORK_MASK, %ecx # is there any work to be done on | 253 | andl $_TIF_WORK_MASK, %ecx # is there any work to be done on |
253 | # int/exception return? | 254 | # int/exception return? |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index b2cc73768a9d..f7357cc0162c 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -189,7 +189,7 @@ default_entry: | |||
189 | * this stage. | 189 | * this stage. |
190 | */ | 190 | */ |
191 | 191 | ||
192 | #define KPMDS ((0x100000000-__PAGE_OFFSET) >> 30) /* Number of kernel PMDs */ | 192 | #define KPMDS (((-__PAGE_OFFSET) >> 30) & 3) /* Number of kernel PMDs */ |
193 | 193 | ||
194 | xorl %ebx,%ebx /* %ebx is kept at zero */ | 194 | xorl %ebx,%ebx /* %ebx is kept at zero */ |
195 | 195 | ||
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index e03cc952f233..eb9ddd8efb82 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -56,6 +56,11 @@ void __cpuinit mxcsr_feature_mask_init(void) | |||
56 | 56 | ||
57 | void __init init_thread_xstate(void) | 57 | void __init init_thread_xstate(void) |
58 | { | 58 | { |
59 | if (!HAVE_HWFP) { | ||
60 | xstate_size = sizeof(struct i387_soft_struct); | ||
61 | return; | ||
62 | } | ||
63 | |||
59 | if (cpu_has_fxsr) | 64 | if (cpu_has_fxsr) |
60 | xstate_size = sizeof(struct i387_fxsave_struct); | 65 | xstate_size = sizeof(struct i387_fxsave_struct); |
61 | #ifdef CONFIG_X86_32 | 66 | #ifdef CONFIG_X86_32 |
@@ -94,7 +99,7 @@ void __cpuinit fpu_init(void) | |||
94 | int init_fpu(struct task_struct *tsk) | 99 | int init_fpu(struct task_struct *tsk) |
95 | { | 100 | { |
96 | if (tsk_used_math(tsk)) { | 101 | if (tsk_used_math(tsk)) { |
97 | if (tsk == current) | 102 | if (HAVE_HWFP && tsk == current) |
98 | unlazy_fpu(tsk); | 103 | unlazy_fpu(tsk); |
99 | return 0; | 104 | return 0; |
100 | } | 105 | } |
@@ -109,6 +114,15 @@ int init_fpu(struct task_struct *tsk) | |||
109 | return -ENOMEM; | 114 | return -ENOMEM; |
110 | } | 115 | } |
111 | 116 | ||
117 | #ifdef CONFIG_X86_32 | ||
118 | if (!HAVE_HWFP) { | ||
119 | memset(tsk->thread.xstate, 0, xstate_size); | ||
120 | finit(); | ||
121 | set_stopped_child_used_math(tsk); | ||
122 | return 0; | ||
123 | } | ||
124 | #endif | ||
125 | |||
112 | if (cpu_has_fxsr) { | 126 | if (cpu_has_fxsr) { |
113 | struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave; | 127 | struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave; |
114 | 128 | ||
@@ -330,13 +344,13 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset, | |||
330 | struct user_i387_ia32_struct env; | 344 | struct user_i387_ia32_struct env; |
331 | int ret; | 345 | int ret; |
332 | 346 | ||
333 | if (!HAVE_HWFP) | ||
334 | return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); | ||
335 | |||
336 | ret = init_fpu(target); | 347 | ret = init_fpu(target); |
337 | if (ret) | 348 | if (ret) |
338 | return ret; | 349 | return ret; |
339 | 350 | ||
351 | if (!HAVE_HWFP) | ||
352 | return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf); | ||
353 | |||
340 | if (!cpu_has_fxsr) { | 354 | if (!cpu_has_fxsr) { |
341 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 355 | return user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
342 | &target->thread.xstate->fsave, 0, | 356 | &target->thread.xstate->fsave, 0, |
@@ -360,15 +374,15 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset, | |||
360 | struct user_i387_ia32_struct env; | 374 | struct user_i387_ia32_struct env; |
361 | int ret; | 375 | int ret; |
362 | 376 | ||
363 | if (!HAVE_HWFP) | ||
364 | return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); | ||
365 | |||
366 | ret = init_fpu(target); | 377 | ret = init_fpu(target); |
367 | if (ret) | 378 | if (ret) |
368 | return ret; | 379 | return ret; |
369 | 380 | ||
370 | set_stopped_child_used_math(target); | 381 | set_stopped_child_used_math(target); |
371 | 382 | ||
383 | if (!HAVE_HWFP) | ||
384 | return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf); | ||
385 | |||
372 | if (!cpu_has_fxsr) { | 386 | if (!cpu_has_fxsr) { |
373 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 387 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
374 | &target->thread.xstate->fsave, 0, -1); | 388 | &target->thread.xstate->fsave, 0, -1); |
@@ -474,18 +488,18 @@ static int restore_i387_fxsave(struct _fpstate_ia32 __user *buf) | |||
474 | int restore_i387_ia32(struct _fpstate_ia32 __user *buf) | 488 | int restore_i387_ia32(struct _fpstate_ia32 __user *buf) |
475 | { | 489 | { |
476 | int err; | 490 | int err; |
491 | struct task_struct *tsk = current; | ||
477 | 492 | ||
478 | if (HAVE_HWFP) { | 493 | if (HAVE_HWFP) |
479 | struct task_struct *tsk = current; | ||
480 | |||
481 | clear_fpu(tsk); | 494 | clear_fpu(tsk); |
482 | 495 | ||
483 | if (!used_math()) { | 496 | if (!used_math()) { |
484 | err = init_fpu(tsk); | 497 | err = init_fpu(tsk); |
485 | if (err) | 498 | if (err) |
486 | return err; | 499 | return err; |
487 | } | 500 | } |
488 | 501 | ||
502 | if (HAVE_HWFP) { | ||
489 | if (cpu_has_fxsr) | 503 | if (cpu_has_fxsr) |
490 | err = restore_i387_fxsave(buf); | 504 | err = restore_i387_fxsave(buf); |
491 | else | 505 | else |
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c index 3d01e47777db..a4f93b4120c1 100644 --- a/arch/x86/kernel/init_task.c +++ b/arch/x86/kernel/init_task.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <asm/desc.h> | 11 | #include <asm/desc.h> |
12 | 12 | ||
13 | static struct fs_struct init_fs = INIT_FS; | 13 | static struct fs_struct init_fs = INIT_FS; |
14 | static struct files_struct init_files = INIT_FILES; | ||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 14 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 15 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
17 | struct mm_struct init_mm = INIT_MM(init_mm); | 16 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index a40d54fc1fdd..4dc8600d9d20 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2130,14 +2130,10 @@ static inline void __init check_timer(void) | |||
2130 | { | 2130 | { |
2131 | int apic1, pin1, apic2, pin2; | 2131 | int apic1, pin1, apic2, pin2; |
2132 | int vector; | 2132 | int vector; |
2133 | unsigned int ver; | ||
2134 | unsigned long flags; | 2133 | unsigned long flags; |
2135 | 2134 | ||
2136 | local_irq_save(flags); | 2135 | local_irq_save(flags); |
2137 | 2136 | ||
2138 | ver = apic_read(APIC_LVR); | ||
2139 | ver = GET_APIC_VERSION(ver); | ||
2140 | |||
2141 | /* | 2137 | /* |
2142 | * get/set the timer IRQ vector: | 2138 | * get/set the timer IRQ vector: |
2143 | */ | 2139 | */ |
@@ -2150,15 +2146,11 @@ static inline void __init check_timer(void) | |||
2150 | * mode for the 8259A whenever interrupts are routed | 2146 | * mode for the 8259A whenever interrupts are routed |
2151 | * through I/O APICs. Also IRQ0 has to be enabled in | 2147 | * through I/O APICs. Also IRQ0 has to be enabled in |
2152 | * the 8259A which implies the virtual wire has to be | 2148 | * the 8259A which implies the virtual wire has to be |
2153 | * disabled in the local APIC. Finally timer interrupts | 2149 | * disabled in the local APIC. |
2154 | * need to be acknowledged manually in the 8259A for | ||
2155 | * timer_interrupt() and for the i82489DX when using | ||
2156 | * the NMI watchdog. | ||
2157 | */ | 2150 | */ |
2158 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2151 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2159 | init_8259A(1); | 2152 | init_8259A(1); |
2160 | timer_ack = !cpu_has_tsc; | 2153 | timer_ack = 1; |
2161 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2162 | if (timer_over_8254 > 0) | 2154 | if (timer_over_8254 > 0) |
2163 | enable_8259A_irq(0); | 2155 | enable_8259A_irq(0); |
2164 | 2156 | ||
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 4bc1be5d5472..08a30986d472 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -53,7 +53,7 @@ static cycle_t kvm_clock_read(void); | |||
53 | * have elapsed since the hypervisor wrote the data. So we try to account for | 53 | * have elapsed since the hypervisor wrote the data. So we try to account for |
54 | * that with system time | 54 | * that with system time |
55 | */ | 55 | */ |
56 | unsigned long kvm_get_wallclock(void) | 56 | static unsigned long kvm_get_wallclock(void) |
57 | { | 57 | { |
58 | u32 wc_sec, wc_nsec; | 58 | u32 wc_sec, wc_nsec; |
59 | u64 delta; | 59 | u64 delta; |
@@ -86,7 +86,7 @@ unsigned long kvm_get_wallclock(void) | |||
86 | return ts.tv_sec + 1; | 86 | return ts.tv_sec + 1; |
87 | } | 87 | } |
88 | 88 | ||
89 | int kvm_set_wallclock(unsigned long now) | 89 | static int kvm_set_wallclock(unsigned long now) |
90 | { | 90 | { |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 3cad17fe026b..07c0f828f488 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c | |||
@@ -155,6 +155,7 @@ int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable) | |||
155 | wrmsr(msr, value, dummy); | 155 | wrmsr(msr, value, dummy); |
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | EXPORT_SYMBOL_GPL(geode_mfgpt_toggle_event); | ||
158 | 159 | ||
159 | int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable) | 160 | int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable) |
160 | { | 161 | { |
@@ -222,6 +223,7 @@ int geode_mfgpt_alloc_timer(int timer, int domain) | |||
222 | /* No timers available - too bad */ | 223 | /* No timers available - too bad */ |
223 | return -1; | 224 | return -1; |
224 | } | 225 | } |
226 | EXPORT_SYMBOL_GPL(geode_mfgpt_alloc_timer); | ||
225 | 227 | ||
226 | 228 | ||
227 | #ifdef CONFIG_GEODE_MFGPT_TIMER | 229 | #ifdef CONFIG_GEODE_MFGPT_TIMER |
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index 11b14bbaa61e..84160f74eeb0 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <asm/smp.h> | 27 | #include <asm/smp.h> |
28 | #include <asm/nmi.h> | 28 | #include <asm/nmi.h> |
29 | #include <asm/timer.h> | ||
30 | 29 | ||
31 | #include "mach_traps.h" | 30 | #include "mach_traps.h" |
32 | 31 | ||
@@ -82,7 +81,7 @@ int __init check_nmi_watchdog(void) | |||
82 | 81 | ||
83 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); | 82 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); |
84 | if (!prev_nmi_count) | 83 | if (!prev_nmi_count) |
85 | goto error; | 84 | return -1; |
86 | 85 | ||
87 | printk(KERN_INFO "Testing NMI watchdog ... "); | 86 | printk(KERN_INFO "Testing NMI watchdog ... "); |
88 | 87 | ||
@@ -119,7 +118,7 @@ int __init check_nmi_watchdog(void) | |||
119 | if (!atomic_read(&nmi_active)) { | 118 | if (!atomic_read(&nmi_active)) { |
120 | kfree(prev_nmi_count); | 119 | kfree(prev_nmi_count); |
121 | atomic_set(&nmi_active, -1); | 120 | atomic_set(&nmi_active, -1); |
122 | goto error; | 121 | return -1; |
123 | } | 122 | } |
124 | printk("OK.\n"); | 123 | printk("OK.\n"); |
125 | 124 | ||
@@ -130,10 +129,6 @@ int __init check_nmi_watchdog(void) | |||
130 | 129 | ||
131 | kfree(prev_nmi_count); | 130 | kfree(prev_nmi_count); |
132 | return 0; | 131 | return 0; |
133 | error: | ||
134 | timer_ack = !cpu_has_tsc; | ||
135 | |||
136 | return -1; | ||
137 | } | 132 | } |
138 | 133 | ||
139 | static int __init setup_nmi_watchdog(char *str) | 134 | static int __init setup_nmi_watchdog(char *str) |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index c5ef1af8e79d..dc00a1331ace 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -378,6 +378,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
378 | struct page *page; | 378 | struct page *page; |
379 | unsigned long dma_mask = 0; | 379 | unsigned long dma_mask = 0; |
380 | dma_addr_t bus; | 380 | dma_addr_t bus; |
381 | int noretry = 0; | ||
381 | 382 | ||
382 | /* ignore region specifiers */ | 383 | /* ignore region specifiers */ |
383 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); | 384 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); |
@@ -397,20 +398,25 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | |||
397 | if (dev->dma_mask == NULL) | 398 | if (dev->dma_mask == NULL) |
398 | return NULL; | 399 | return NULL; |
399 | 400 | ||
400 | /* Don't invoke OOM killer */ | 401 | /* Don't invoke OOM killer or retry in lower 16MB DMA zone */ |
401 | gfp |= __GFP_NORETRY; | 402 | if (gfp & __GFP_DMA) |
403 | noretry = 1; | ||
402 | 404 | ||
403 | #ifdef CONFIG_X86_64 | 405 | #ifdef CONFIG_X86_64 |
404 | /* Why <=? Even when the mask is smaller than 4GB it is often | 406 | /* Why <=? Even when the mask is smaller than 4GB it is often |
405 | larger than 16MB and in this case we have a chance of | 407 | larger than 16MB and in this case we have a chance of |
406 | finding fitting memory in the next higher zone first. If | 408 | finding fitting memory in the next higher zone first. If |
407 | not retry with true GFP_DMA. -AK */ | 409 | not retry with true GFP_DMA. -AK */ |
408 | if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) | 410 | if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) { |
409 | gfp |= GFP_DMA32; | 411 | gfp |= GFP_DMA32; |
412 | if (dma_mask < DMA_32BIT_MASK) | ||
413 | noretry = 1; | ||
414 | } | ||
410 | #endif | 415 | #endif |
411 | 416 | ||
412 | again: | 417 | again: |
413 | page = dma_alloc_pages(dev, gfp, get_order(size)); | 418 | page = dma_alloc_pages(dev, |
419 | noretry ? gfp | __GFP_NORETRY : gfp, get_order(size)); | ||
414 | if (page == NULL) | 420 | if (page == NULL) |
415 | return NULL; | 421 | return NULL; |
416 | 422 | ||
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index c07455d1695f..aa8ec928caa8 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kdebug.h> | 26 | #include <linux/kdebug.h> |
27 | #include <linux/scatterlist.h> | 27 | #include <linux/scatterlist.h> |
28 | #include <linux/iommu-helper.h> | 28 | #include <linux/iommu-helper.h> |
29 | #include <linux/sysdev.h> | ||
29 | #include <asm/atomic.h> | 30 | #include <asm/atomic.h> |
30 | #include <asm/io.h> | 31 | #include <asm/io.h> |
31 | #include <asm/mtrr.h> | 32 | #include <asm/mtrr.h> |
@@ -548,6 +549,28 @@ static __init unsigned read_aperture(struct pci_dev *dev, u32 *size) | |||
548 | return aper_base; | 549 | return aper_base; |
549 | } | 550 | } |
550 | 551 | ||
552 | static int gart_resume(struct sys_device *dev) | ||
553 | { | ||
554 | return 0; | ||
555 | } | ||
556 | |||
557 | static int gart_suspend(struct sys_device *dev, pm_message_t state) | ||
558 | { | ||
559 | return -EINVAL; | ||
560 | } | ||
561 | |||
562 | static struct sysdev_class gart_sysdev_class = { | ||
563 | .name = "gart", | ||
564 | .suspend = gart_suspend, | ||
565 | .resume = gart_resume, | ||
566 | |||
567 | }; | ||
568 | |||
569 | static struct sys_device device_gart = { | ||
570 | .id = 0, | ||
571 | .cls = &gart_sysdev_class, | ||
572 | }; | ||
573 | |||
551 | /* | 574 | /* |
552 | * Private Northbridge GATT initialization in case we cannot use the | 575 | * Private Northbridge GATT initialization in case we cannot use the |
553 | * AGP driver for some reason. | 576 | * AGP driver for some reason. |
@@ -558,7 +581,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
558 | unsigned aper_base, new_aper_base; | 581 | unsigned aper_base, new_aper_base; |
559 | struct pci_dev *dev; | 582 | struct pci_dev *dev; |
560 | void *gatt; | 583 | void *gatt; |
561 | int i; | 584 | int i, error; |
562 | 585 | ||
563 | printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); | 586 | printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); |
564 | aper_size = aper_base = info->aper_size = 0; | 587 | aper_size = aper_base = info->aper_size = 0; |
@@ -606,6 +629,12 @@ static __init int init_k8_gatt(struct agp_kern_info *info) | |||
606 | 629 | ||
607 | pci_write_config_dword(dev, 0x90, ctl); | 630 | pci_write_config_dword(dev, 0x90, ctl); |
608 | } | 631 | } |
632 | |||
633 | error = sysdev_class_register(&gart_sysdev_class); | ||
634 | if (!error) | ||
635 | error = sysdev_register(&device_gart); | ||
636 | if (error) | ||
637 | panic("Could not register gart_sysdev -- would corrupt data on next suspend"); | ||
609 | flush_gart(); | 638 | flush_gart(); |
610 | 639 | ||
611 | printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n", | 640 | printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n", |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index f8476dfbb60d..6d5483356e74 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -649,8 +649,11 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct | |||
649 | /* If the task has used fpu the last 5 timeslices, just do a full | 649 | /* If the task has used fpu the last 5 timeslices, just do a full |
650 | * restore of the math state immediately to avoid the trap; the | 650 | * restore of the math state immediately to avoid the trap; the |
651 | * chances of needing FPU soon are obviously high now | 651 | * chances of needing FPU soon are obviously high now |
652 | * | ||
653 | * tsk_used_math() checks prevent calling math_state_restore(), | ||
654 | * which can sleep in the case of !tsk_used_math() | ||
652 | */ | 655 | */ |
653 | if (next_p->fpu_counter > 5) | 656 | if (tsk_used_math(next_p) && next_p->fpu_counter > 5) |
654 | math_state_restore(); | 657 | math_state_restore(); |
655 | 658 | ||
656 | /* | 659 | /* |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index e2319f39988b..ac54ff56df80 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -658,8 +658,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
658 | /* If the task has used fpu the last 5 timeslices, just do a full | 658 | /* If the task has used fpu the last 5 timeslices, just do a full |
659 | * restore of the math state immediately to avoid the trap; the | 659 | * restore of the math state immediately to avoid the trap; the |
660 | * chances of needing FPU soon are obviously high now | 660 | * chances of needing FPU soon are obviously high now |
661 | * | ||
662 | * tsk_used_math() checks prevent calling math_state_restore(), | ||
663 | * which can sleep in the case of !tsk_used_math() | ||
661 | */ | 664 | */ |
662 | if (next_p->fpu_counter>5) | 665 | if (tsk_used_math(next_p) && next_p->fpu_counter > 5) |
663 | math_state_restore(); | 666 | math_state_restore(); |
664 | return prev_p; | 667 | return prev_p; |
665 | } | 668 | } |
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 9615eee9b775..05191bbc68b8 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <linux/acpi.h> | 4 | #include <linux/acpi.h> |
5 | #include <linux/bcd.h> | 5 | #include <linux/bcd.h> |
6 | #include <linux/mc146818rtc.h> | 6 | #include <linux/mc146818rtc.h> |
7 | #include <linux/platform_device.h> | ||
8 | #include <linux/pnp.h> | ||
7 | 9 | ||
8 | #include <asm/time.h> | 10 | #include <asm/time.h> |
9 | #include <asm/vsyscall.h> | 11 | #include <asm/vsyscall.h> |
@@ -197,3 +199,35 @@ unsigned long long native_read_tsc(void) | |||
197 | } | 199 | } |
198 | EXPORT_SYMBOL(native_read_tsc); | 200 | EXPORT_SYMBOL(native_read_tsc); |
199 | 201 | ||
202 | |||
203 | static struct resource rtc_resources[] = { | ||
204 | [0] = { | ||
205 | .start = RTC_PORT(0), | ||
206 | .end = RTC_PORT(1), | ||
207 | .flags = IORESOURCE_IO, | ||
208 | }, | ||
209 | [1] = { | ||
210 | .start = RTC_IRQ, | ||
211 | .end = RTC_IRQ, | ||
212 | .flags = IORESOURCE_IRQ, | ||
213 | } | ||
214 | }; | ||
215 | |||
216 | static struct platform_device rtc_device = { | ||
217 | .name = "rtc_cmos", | ||
218 | .id = -1, | ||
219 | .resource = rtc_resources, | ||
220 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
221 | }; | ||
222 | |||
223 | static __init int add_rtc_cmos(void) | ||
224 | { | ||
225 | #ifdef CONFIG_PNP | ||
226 | if (!pnp_platform_devices) | ||
227 | platform_device_register(&rtc_device); | ||
228 | #else | ||
229 | platform_device_register(&rtc_device); | ||
230 | #endif /* CONFIG_PNP */ | ||
231 | return 0; | ||
232 | } | ||
233 | device_initcall(add_rtc_cmos); | ||
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 38988491c622..56078d61c793 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1190,6 +1190,7 @@ static void __init smp_cpu_index_default(void) | |||
1190 | */ | 1190 | */ |
1191 | void __init native_smp_prepare_cpus(unsigned int max_cpus) | 1191 | void __init native_smp_prepare_cpus(unsigned int max_cpus) |
1192 | { | 1192 | { |
1193 | preempt_disable(); | ||
1193 | nmi_watchdog_default(); | 1194 | nmi_watchdog_default(); |
1194 | smp_cpu_index_default(); | 1195 | smp_cpu_index_default(); |
1195 | current_cpu_data = boot_cpu_data; | 1196 | current_cpu_data = boot_cpu_data; |
@@ -1206,7 +1207,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1206 | if (smp_sanity_check(max_cpus) < 0) { | 1207 | if (smp_sanity_check(max_cpus) < 0) { |
1207 | printk(KERN_INFO "SMP disabled\n"); | 1208 | printk(KERN_INFO "SMP disabled\n"); |
1208 | disable_smp(); | 1209 | disable_smp(); |
1209 | return; | 1210 | goto out; |
1210 | } | 1211 | } |
1211 | 1212 | ||
1212 | preempt_disable(); | 1213 | preempt_disable(); |
@@ -1246,6 +1247,8 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1246 | printk(KERN_INFO "CPU%d: ", 0); | 1247 | printk(KERN_INFO "CPU%d: ", 0); |
1247 | print_cpu_info(&cpu_data(0)); | 1248 | print_cpu_info(&cpu_data(0)); |
1248 | setup_boot_clock(); | 1249 | setup_boot_clock(); |
1250 | out: | ||
1251 | preempt_enable(); | ||
1249 | } | 1252 | } |
1250 | /* | 1253 | /* |
1251 | * Early setup to make printk work. | 1254 | * Early setup to make printk work. |
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index bde6f63e15d5..08d752de4eee 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -544,6 +544,7 @@ vm86_trap: | |||
544 | #define DO_ERROR(trapnr, signr, str, name) \ | 544 | #define DO_ERROR(trapnr, signr, str, name) \ |
545 | void do_##name(struct pt_regs *regs, long error_code) \ | 545 | void do_##name(struct pt_regs *regs, long error_code) \ |
546 | { \ | 546 | { \ |
547 | trace_hardirqs_fixup(); \ | ||
547 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ | 548 | if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ |
548 | == NOTIFY_STOP) \ | 549 | == NOTIFY_STOP) \ |
549 | return; \ | 550 | return; \ |
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index e4790728b224..068759db63dd 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include "mach_timer.h" | 15 | #include "mach_timer.h" |
16 | 16 | ||
17 | static int tsc_enabled; | 17 | static int tsc_disabled; |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * On some systems the TSC frequency does not | 20 | * On some systems the TSC frequency does not |
@@ -28,8 +28,8 @@ EXPORT_SYMBOL_GPL(tsc_khz); | |||
28 | static int __init tsc_setup(char *str) | 28 | static int __init tsc_setup(char *str) |
29 | { | 29 | { |
30 | printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " | 30 | printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " |
31 | "cannot disable TSC completely.\n"); | 31 | "cannot disable TSC completely.\n"); |
32 | mark_tsc_unstable("user disabled TSC"); | 32 | tsc_disabled = 1; |
33 | return 1; | 33 | return 1; |
34 | } | 34 | } |
35 | #else | 35 | #else |
@@ -120,7 +120,7 @@ unsigned long long native_sched_clock(void) | |||
120 | * very important for it to be as fast as the platform | 120 | * very important for it to be as fast as the platform |
121 | * can achive it. ) | 121 | * can achive it. ) |
122 | */ | 122 | */ |
123 | if (unlikely(!tsc_enabled && !tsc_unstable)) | 123 | if (unlikely(tsc_disabled)) |
124 | /* No locking but a rare wrong value is not a big deal: */ | 124 | /* No locking but a rare wrong value is not a big deal: */ |
125 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); | 125 | return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); |
126 | 126 | ||
@@ -322,7 +322,6 @@ void mark_tsc_unstable(char *reason) | |||
322 | { | 322 | { |
323 | if (!tsc_unstable) { | 323 | if (!tsc_unstable) { |
324 | tsc_unstable = 1; | 324 | tsc_unstable = 1; |
325 | tsc_enabled = 0; | ||
326 | printk("Marking TSC unstable due to: %s.\n", reason); | 325 | printk("Marking TSC unstable due to: %s.\n", reason); |
327 | /* Can be called before registration */ | 326 | /* Can be called before registration */ |
328 | if (clocksource_tsc.mult) | 327 | if (clocksource_tsc.mult) |
@@ -336,7 +335,7 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable); | |||
336 | static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) | 335 | static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) |
337 | { | 336 | { |
338 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", | 337 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", |
339 | d->ident); | 338 | d->ident); |
340 | tsc_unstable = 1; | 339 | tsc_unstable = 1; |
341 | return 0; | 340 | return 0; |
342 | } | 341 | } |
@@ -403,14 +402,22 @@ void __init tsc_init(void) | |||
403 | { | 402 | { |
404 | int cpu; | 403 | int cpu; |
405 | 404 | ||
406 | if (!cpu_has_tsc) | 405 | if (!cpu_has_tsc || tsc_disabled) { |
406 | /* Disable the TSC in case of !cpu_has_tsc */ | ||
407 | tsc_disabled = 1; | ||
407 | return; | 408 | return; |
409 | } | ||
408 | 410 | ||
409 | cpu_khz = calculate_cpu_khz(); | 411 | cpu_khz = calculate_cpu_khz(); |
410 | tsc_khz = cpu_khz; | 412 | tsc_khz = cpu_khz; |
411 | 413 | ||
412 | if (!cpu_khz) { | 414 | if (!cpu_khz) { |
413 | mark_tsc_unstable("could not calculate TSC khz"); | 415 | mark_tsc_unstable("could not calculate TSC khz"); |
416 | /* | ||
417 | * We need to disable the TSC completely in this case | ||
418 | * to prevent sched_clock() from using it. | ||
419 | */ | ||
420 | tsc_disabled = 1; | ||
414 | return; | 421 | return; |
415 | } | 422 | } |
416 | 423 | ||
@@ -441,8 +448,6 @@ void __init tsc_init(void) | |||
441 | if (check_tsc_unstable()) { | 448 | if (check_tsc_unstable()) { |
442 | clocksource_tsc.rating = 0; | 449 | clocksource_tsc.rating = 0; |
443 | clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; | 450 | clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; |
444 | } else | 451 | } |
445 | tsc_enabled = 1; | ||
446 | |||
447 | clocksource_register(&clocksource_tsc); | 452 | clocksource_register(&clocksource_tsc); |
448 | } | 453 | } |
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c index fcc16e58609e..1784b8077a12 100644 --- a/arch/x86/kernel/tsc_64.c +++ b/arch/x86/kernel/tsc_64.c | |||
@@ -227,14 +227,14 @@ void __init tsc_calibrate(void) | |||
227 | /* hpet or pmtimer available ? */ | 227 | /* hpet or pmtimer available ? */ |
228 | if (!hpet && !pm1 && !pm2) { | 228 | if (!hpet && !pm1 && !pm2) { |
229 | printk(KERN_INFO "TSC calibrated against PIT\n"); | 229 | printk(KERN_INFO "TSC calibrated against PIT\n"); |
230 | return; | 230 | goto out; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* Check, whether the sampling was disturbed by an SMI */ | 233 | /* Check, whether the sampling was disturbed by an SMI */ |
234 | if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { | 234 | if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { |
235 | printk(KERN_WARNING "TSC calibration disturbed by SMI, " | 235 | printk(KERN_WARNING "TSC calibration disturbed by SMI, " |
236 | "using PIT calibration result\n"); | 236 | "using PIT calibration result\n"); |
237 | return; | 237 | goto out; |
238 | } | 238 | } |
239 | 239 | ||
240 | tsc2 = (tsc2 - tsc1) * 1000000L; | 240 | tsc2 = (tsc2 - tsc1) * 1000000L; |
@@ -255,6 +255,7 @@ void __init tsc_calibrate(void) | |||
255 | 255 | ||
256 | tsc_khz = tsc2 / tsc1; | 256 | tsc_khz = tsc2 / tsc1; |
257 | 257 | ||
258 | out: | ||
258 | for_each_possible_cpu(cpu) | 259 | for_each_possible_cpu(cpu) |
259 | set_cyc2ns_scale(tsc_khz, cpu); | 260 | set_cyc2ns_scale(tsc_khz, cpu); |
260 | } | 261 | } |
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 3324d90038e4..f2f5d260874e 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -200,7 +200,6 @@ int __pit_timer_fn(struct kvm_kpit_state *ps) | |||
200 | 200 | ||
201 | atomic_inc(&pt->pending); | 201 | atomic_inc(&pt->pending); |
202 | smp_mb__after_atomic_inc(); | 202 | smp_mb__after_atomic_inc(); |
203 | /* FIXME: handle case where the guest is in guest mode */ | ||
204 | if (vcpu0 && waitqueue_active(&vcpu0->wq)) { | 203 | if (vcpu0 && waitqueue_active(&vcpu0->wq)) { |
205 | vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE; | 204 | vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE; |
206 | wake_up_interruptible(&vcpu0->wq); | 205 | wake_up_interruptible(&vcpu0->wq); |
@@ -216,7 +215,7 @@ int pit_has_pending_timer(struct kvm_vcpu *vcpu) | |||
216 | { | 215 | { |
217 | struct kvm_pit *pit = vcpu->kvm->arch.vpit; | 216 | struct kvm_pit *pit = vcpu->kvm->arch.vpit; |
218 | 217 | ||
219 | if (pit && vcpu->vcpu_id == 0) | 218 | if (pit && vcpu->vcpu_id == 0 && pit->pit_state.inject_pending) |
220 | return atomic_read(&pit->pit_state.pit_timer.pending); | 219 | return atomic_read(&pit->pit_state.pit_timer.pending); |
221 | 220 | ||
222 | return 0; | 221 | return 0; |
@@ -237,6 +236,19 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data) | |||
237 | return HRTIMER_NORESTART; | 236 | return HRTIMER_NORESTART; |
238 | } | 237 | } |
239 | 238 | ||
239 | void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu) | ||
240 | { | ||
241 | struct kvm_pit *pit = vcpu->kvm->arch.vpit; | ||
242 | struct hrtimer *timer; | ||
243 | |||
244 | if (vcpu->vcpu_id != 0 || !pit) | ||
245 | return; | ||
246 | |||
247 | timer = &pit->pit_state.pit_timer.timer; | ||
248 | if (hrtimer_cancel(timer)) | ||
249 | hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS); | ||
250 | } | ||
251 | |||
240 | static void destroy_pit_timer(struct kvm_kpit_timer *pt) | 252 | static void destroy_pit_timer(struct kvm_kpit_timer *pt) |
241 | { | 253 | { |
242 | pr_debug("pit: execute del timer!\n"); | 254 | pr_debug("pit: execute del timer!\n"); |
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c index ce1f583459b1..76d736b5f664 100644 --- a/arch/x86/kvm/irq.c +++ b/arch/x86/kvm/irq.c | |||
@@ -94,3 +94,9 @@ void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec) | |||
94 | /* TODO: PIT, RTC etc. */ | 94 | /* TODO: PIT, RTC etc. */ |
95 | } | 95 | } |
96 | EXPORT_SYMBOL_GPL(kvm_timer_intr_post); | 96 | EXPORT_SYMBOL_GPL(kvm_timer_intr_post); |
97 | |||
98 | void __kvm_migrate_timers(struct kvm_vcpu *vcpu) | ||
99 | { | ||
100 | __kvm_migrate_apic_timer(vcpu); | ||
101 | __kvm_migrate_pit_timer(vcpu); | ||
102 | } | ||
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h index 1802134b836f..2a15be2275c0 100644 --- a/arch/x86/kvm/irq.h +++ b/arch/x86/kvm/irq.h | |||
@@ -84,6 +84,8 @@ void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec); | |||
84 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); | 84 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); |
85 | void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); | 85 | void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); |
86 | void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu); | 86 | void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu); |
87 | void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu); | ||
88 | void __kvm_migrate_timers(struct kvm_vcpu *vcpu); | ||
87 | 89 | ||
88 | int pit_has_pending_timer(struct kvm_vcpu *vcpu); | 90 | int pit_has_pending_timer(struct kvm_vcpu *vcpu); |
89 | int apic_has_pending_timer(struct kvm_vcpu *vcpu); | 91 | int apic_has_pending_timer(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 36809d79788b..c297c50eba63 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -957,7 +957,7 @@ int apic_has_pending_timer(struct kvm_vcpu *vcpu) | |||
957 | { | 957 | { |
958 | struct kvm_lapic *lapic = vcpu->arch.apic; | 958 | struct kvm_lapic *lapic = vcpu->arch.apic; |
959 | 959 | ||
960 | if (lapic) | 960 | if (lapic && apic_enabled(lapic) && apic_lvt_enabled(lapic, APIC_LVTT)) |
961 | return atomic_read(&lapic->timer.pending); | 961 | return atomic_read(&lapic->timer.pending); |
962 | 962 | ||
963 | return 0; | 963 | return 0; |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 36c5406b1813..ee3f53098f0c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -658,7 +658,7 @@ static int is_empty_shadow_page(u64 *spt) | |||
658 | u64 *end; | 658 | u64 *end; |
659 | 659 | ||
660 | for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++) | 660 | for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++) |
661 | if (*pos != shadow_trap_nonpresent_pte) { | 661 | if (is_shadow_present_pte(*pos)) { |
662 | printk(KERN_ERR "%s: %p %llx\n", __func__, | 662 | printk(KERN_ERR "%s: %p %llx\n", __func__, |
663 | pos, *pos); | 663 | pos, *pos); |
664 | return 0; | 664 | return 0; |
@@ -1858,6 +1858,7 @@ static void free_mmu_pages(struct kvm_vcpu *vcpu) | |||
1858 | sp = container_of(vcpu->kvm->arch.active_mmu_pages.next, | 1858 | sp = container_of(vcpu->kvm->arch.active_mmu_pages.next, |
1859 | struct kvm_mmu_page, link); | 1859 | struct kvm_mmu_page, link); |
1860 | kvm_mmu_zap_page(vcpu->kvm, sp); | 1860 | kvm_mmu_zap_page(vcpu->kvm, sp); |
1861 | cond_resched(); | ||
1861 | } | 1862 | } |
1862 | free_page((unsigned long)vcpu->arch.mmu.pae_root); | 1863 | free_page((unsigned long)vcpu->arch.mmu.pae_root); |
1863 | } | 1864 | } |
@@ -1996,7 +1997,7 @@ static struct shrinker mmu_shrinker = { | |||
1996 | .seeks = DEFAULT_SEEKS * 10, | 1997 | .seeks = DEFAULT_SEEKS * 10, |
1997 | }; | 1998 | }; |
1998 | 1999 | ||
1999 | void mmu_destroy_caches(void) | 2000 | static void mmu_destroy_caches(void) |
2000 | { | 2001 | { |
2001 | if (pte_chain_cache) | 2002 | if (pte_chain_cache) |
2002 | kmem_cache_destroy(pte_chain_cache); | 2003 | kmem_cache_destroy(pte_chain_cache); |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 156fe10288ae..934c7b619396 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -418,7 +418,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, | |||
418 | 418 | ||
419 | /* mmio */ | 419 | /* mmio */ |
420 | if (is_error_pfn(pfn)) { | 420 | if (is_error_pfn(pfn)) { |
421 | pgprintk("gfn %x is mmio\n", walker.gfn); | 421 | pgprintk("gfn %lx is mmio\n", walker.gfn); |
422 | kvm_release_pfn_clean(pfn); | 422 | kvm_release_pfn_clean(pfn); |
423 | return 1; | 423 | return 1; |
424 | } | 424 | } |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ab22615eee89..6b0d5fa5bab3 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -688,7 +688,7 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
688 | delta = vcpu->arch.host_tsc - tsc_this; | 688 | delta = vcpu->arch.host_tsc - tsc_this; |
689 | svm->vmcb->control.tsc_offset += delta; | 689 | svm->vmcb->control.tsc_offset += delta; |
690 | vcpu->cpu = cpu; | 690 | vcpu->cpu = cpu; |
691 | kvm_migrate_apic_timer(vcpu); | 691 | kvm_migrate_timers(vcpu); |
692 | } | 692 | } |
693 | 693 | ||
694 | for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) | 694 | for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index bfe4db11989c..02efbe75f317 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -608,7 +608,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | |||
608 | 608 | ||
609 | if (vcpu->cpu != cpu) { | 609 | if (vcpu->cpu != cpu) { |
610 | vcpu_clear(vmx); | 610 | vcpu_clear(vmx); |
611 | kvm_migrate_apic_timer(vcpu); | 611 | kvm_migrate_timers(vcpu); |
612 | vpid_sync_vcpu_all(vmx); | 612 | vpid_sync_vcpu_all(vmx); |
613 | } | 613 | } |
614 | 614 | ||
@@ -1036,6 +1036,7 @@ static void hardware_enable(void *garbage) | |||
1036 | static void hardware_disable(void *garbage) | 1036 | static void hardware_disable(void *garbage) |
1037 | { | 1037 | { |
1038 | asm volatile (ASM_VMX_VMXOFF : : : "cc"); | 1038 | asm volatile (ASM_VMX_VMXOFF : : : "cc"); |
1039 | write_cr4(read_cr4() & ~X86_CR4_VMXE); | ||
1039 | } | 1040 | } |
1040 | 1041 | ||
1041 | static __init int adjust_vmx_controls(u32 ctl_min, u32 ctl_opt, | 1042 | static __init int adjust_vmx_controls(u32 ctl_min, u32 ctl_opt, |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 21338bdb28ff..00acf1301a15 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2758,7 +2758,7 @@ again: | |||
2758 | 2758 | ||
2759 | if (vcpu->requests) { | 2759 | if (vcpu->requests) { |
2760 | if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests)) | 2760 | if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests)) |
2761 | __kvm_migrate_apic_timer(vcpu); | 2761 | __kvm_migrate_timers(vcpu); |
2762 | if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS, | 2762 | if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS, |
2763 | &vcpu->requests)) { | 2763 | &vcpu->requests)) { |
2764 | kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS; | 2764 | kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS; |
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index f2a696d6a243..932f216d890c 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c | |||
@@ -677,8 +677,9 @@ static int decode_modrm(struct x86_emulate_ctxt *ctxt, | |||
677 | c->use_modrm_ea = 1; | 677 | c->use_modrm_ea = 1; |
678 | 678 | ||
679 | if (c->modrm_mod == 3) { | 679 | if (c->modrm_mod == 3) { |
680 | c->modrm_val = *(unsigned long *) | 680 | c->modrm_ptr = decode_register(c->modrm_rm, |
681 | decode_register(c->modrm_rm, c->regs, c->d & ByteOp); | 681 | c->regs, c->d & ByteOp); |
682 | c->modrm_val = *(unsigned long *)c->modrm_ptr; | ||
682 | return rc; | 683 | return rc; |
683 | } | 684 | } |
684 | 685 | ||
@@ -1005,6 +1006,7 @@ done_prefixes: | |||
1005 | if ((c->d & ModRM) && c->modrm_mod == 3) { | 1006 | if ((c->d & ModRM) && c->modrm_mod == 3) { |
1006 | c->src.type = OP_REG; | 1007 | c->src.type = OP_REG; |
1007 | c->src.val = c->modrm_val; | 1008 | c->src.val = c->modrm_val; |
1009 | c->src.ptr = c->modrm_ptr; | ||
1008 | break; | 1010 | break; |
1009 | } | 1011 | } |
1010 | c->src.type = OP_MEM; | 1012 | c->src.type = OP_MEM; |
@@ -1049,6 +1051,7 @@ done_prefixes: | |||
1049 | if ((c->d & ModRM) && c->modrm_mod == 3) { | 1051 | if ((c->d & ModRM) && c->modrm_mod == 3) { |
1050 | c->dst.type = OP_REG; | 1052 | c->dst.type = OP_REG; |
1051 | c->dst.val = c->dst.orig_val = c->modrm_val; | 1053 | c->dst.val = c->dst.orig_val = c->modrm_val; |
1054 | c->dst.ptr = c->modrm_ptr; | ||
1052 | break; | 1055 | break; |
1053 | } | 1056 | } |
1054 | c->dst.type = OP_MEM; | 1057 | c->dst.type = OP_MEM; |
@@ -1724,7 +1727,8 @@ twobyte_insn: | |||
1724 | if (rc) | 1727 | if (rc) |
1725 | goto done; | 1728 | goto done; |
1726 | 1729 | ||
1727 | kvm_emulate_hypercall(ctxt->vcpu); | 1730 | /* Let the processor re-execute the fixed hypercall */ |
1731 | c->eip = ctxt->vcpu->arch.rip; | ||
1728 | /* Disable writeback. */ | 1732 | /* Disable writeback. */ |
1729 | c->dst.type = OP_NONE; | 1733 | c->dst.type = OP_NONE; |
1730 | break; | 1734 | break; |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index af65b2da3ba0..5c7e2fd52075 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -582,8 +582,9 @@ static void __init lguest_init_IRQ(void) | |||
582 | int vector = FIRST_EXTERNAL_VECTOR + i; | 582 | int vector = FIRST_EXTERNAL_VECTOR + i; |
583 | if (vector != SYSCALL_VECTOR) { | 583 | if (vector != SYSCALL_VECTOR) { |
584 | set_intr_gate(vector, interrupt[i]); | 584 | set_intr_gate(vector, interrupt[i]); |
585 | set_irq_chip_and_handler(i, &lguest_irq_controller, | 585 | set_irq_chip_and_handler_name(i, &lguest_irq_controller, |
586 | handle_level_irq); | 586 | handle_level_irq, |
587 | "level"); | ||
587 | } | 588 | } |
588 | } | 589 | } |
589 | /* This call is required to set up for 4k stacks, where we have | 590 | /* This call is required to set up for 4k stacks, where we have |
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c index 4535e6d147ad..d710f2d167bb 100644 --- a/arch/x86/lib/delay_32.c +++ b/arch/x86/lib/delay_32.c | |||
@@ -44,13 +44,36 @@ static void delay_loop(unsigned long loops) | |||
44 | static void delay_tsc(unsigned long loops) | 44 | static void delay_tsc(unsigned long loops) |
45 | { | 45 | { |
46 | unsigned long bclock, now; | 46 | unsigned long bclock, now; |
47 | int cpu; | ||
47 | 48 | ||
48 | preempt_disable(); /* TSC's are per-cpu */ | 49 | preempt_disable(); |
50 | cpu = smp_processor_id(); | ||
49 | rdtscl(bclock); | 51 | rdtscl(bclock); |
50 | do { | 52 | for (;;) { |
51 | rep_nop(); | ||
52 | rdtscl(now); | 53 | rdtscl(now); |
53 | } while ((now-bclock) < loops); | 54 | if ((now - bclock) >= loops) |
55 | break; | ||
56 | |||
57 | /* Allow RT tasks to run */ | ||
58 | preempt_enable(); | ||
59 | rep_nop(); | ||
60 | preempt_disable(); | ||
61 | |||
62 | /* | ||
63 | * It is possible that we moved to another CPU, and | ||
64 | * since TSC's are per-cpu we need to calculate | ||
65 | * that. The delay must guarantee that we wait "at | ||
66 | * least" the amount of time. Being moved to another | ||
67 | * CPU could make the wait longer but we just need to | ||
68 | * make sure we waited long enough. Rebalance the | ||
69 | * counter for this CPU. | ||
70 | */ | ||
71 | if (unlikely(cpu != smp_processor_id())) { | ||
72 | loops -= (now - bclock); | ||
73 | cpu = smp_processor_id(); | ||
74 | rdtscl(bclock); | ||
75 | } | ||
76 | } | ||
54 | preempt_enable(); | 77 | preempt_enable(); |
55 | } | 78 | } |
56 | 79 | ||
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c index bbc610518516..4c441be92641 100644 --- a/arch/x86/lib/delay_64.c +++ b/arch/x86/lib/delay_64.c | |||
@@ -31,14 +31,36 @@ int __devinit read_current_timer(unsigned long *timer_value) | |||
31 | void __delay(unsigned long loops) | 31 | void __delay(unsigned long loops) |
32 | { | 32 | { |
33 | unsigned bclock, now; | 33 | unsigned bclock, now; |
34 | int cpu; | ||
34 | 35 | ||
35 | preempt_disable(); /* TSC's are pre-cpu */ | 36 | preempt_disable(); |
37 | cpu = smp_processor_id(); | ||
36 | rdtscl(bclock); | 38 | rdtscl(bclock); |
37 | do { | 39 | for (;;) { |
38 | rep_nop(); | ||
39 | rdtscl(now); | 40 | rdtscl(now); |
41 | if ((now - bclock) >= loops) | ||
42 | break; | ||
43 | |||
44 | /* Allow RT tasks to run */ | ||
45 | preempt_enable(); | ||
46 | rep_nop(); | ||
47 | preempt_disable(); | ||
48 | |||
49 | /* | ||
50 | * It is possible that we moved to another CPU, and | ||
51 | * since TSC's are per-cpu we need to calculate | ||
52 | * that. The delay must guarantee that we wait "at | ||
53 | * least" the amount of time. Being moved to another | ||
54 | * CPU could make the wait longer but we just need to | ||
55 | * make sure we waited long enough. Rebalance the | ||
56 | * counter for this CPU. | ||
57 | */ | ||
58 | if (unlikely(cpu != smp_processor_id())) { | ||
59 | loops -= (now - bclock); | ||
60 | cpu = smp_processor_id(); | ||
61 | rdtscl(bclock); | ||
62 | } | ||
40 | } | 63 | } |
41 | while ((now-bclock) < loops); | ||
42 | preempt_enable(); | 64 | preempt_enable(); |
43 | } | 65 | } |
44 | EXPORT_SYMBOL(__delay); | 66 | EXPORT_SYMBOL(__delay); |
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c index 6e38d877ea77..c7b06feb139b 100644 --- a/arch/x86/math-emu/fpu_entry.c +++ b/arch/x86/math-emu/fpu_entry.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
31 | #include <asm/desc.h> | 31 | #include <asm/desc.h> |
32 | #include <asm/user.h> | 32 | #include <asm/user.h> |
33 | #include <asm/i387.h> | ||
33 | 34 | ||
34 | #include "fpu_system.h" | 35 | #include "fpu_system.h" |
35 | #include "fpu_emu.h" | 36 | #include "fpu_emu.h" |
@@ -146,6 +147,13 @@ asmlinkage void math_emulate(long arg) | |||
146 | unsigned long code_limit = 0; /* Initialized to stop compiler warnings */ | 147 | unsigned long code_limit = 0; /* Initialized to stop compiler warnings */ |
147 | struct desc_struct code_descriptor; | 148 | struct desc_struct code_descriptor; |
148 | 149 | ||
150 | if (!used_math()) { | ||
151 | if (init_fpu(current)) { | ||
152 | do_group_exit(SIGKILL); | ||
153 | return; | ||
154 | } | ||
155 | } | ||
156 | |||
149 | #ifdef RE_ENTRANT_CHECKING | 157 | #ifdef RE_ENTRANT_CHECKING |
150 | if (emulating) { | 158 | if (emulating) { |
151 | printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n"); | 159 | printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n"); |
@@ -153,11 +161,6 @@ asmlinkage void math_emulate(long arg) | |||
153 | RE_ENTRANT_CHECK_ON; | 161 | RE_ENTRANT_CHECK_ON; |
154 | #endif /* RE_ENTRANT_CHECKING */ | 162 | #endif /* RE_ENTRANT_CHECKING */ |
155 | 163 | ||
156 | if (!used_math()) { | ||
157 | finit(); | ||
158 | set_used_math(); | ||
159 | } | ||
160 | |||
161 | SETUP_DATA_AREA(arg); | 164 | SETUP_DATA_AREA(arg); |
162 | 165 | ||
163 | FPU_ORIG_EIP = FPU_EIP; | 166 | FPU_ORIG_EIP = FPU_EIP; |
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index fd7e1798c75a..8bcb6f40ccb6 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -497,6 +497,11 @@ static int vmalloc_fault(unsigned long address) | |||
497 | unsigned long pgd_paddr; | 497 | unsigned long pgd_paddr; |
498 | pmd_t *pmd_k; | 498 | pmd_t *pmd_k; |
499 | pte_t *pte_k; | 499 | pte_t *pte_k; |
500 | |||
501 | /* Make sure we are in vmalloc area */ | ||
502 | if (!(address >= VMALLOC_START && address < VMALLOC_END)) | ||
503 | return -1; | ||
504 | |||
500 | /* | 505 | /* |
501 | * Synchronize this task's top level page-table | 506 | * Synchronize this task's top level page-table |
502 | * with the 'reference' page table. | 507 | * with the 'reference' page table. |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 32ba13b0f818..156e6d7b0e32 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -206,7 +206,7 @@ void __init cleanup_highmap(void) | |||
206 | pmd_t *last_pmd = pmd + PTRS_PER_PMD; | 206 | pmd_t *last_pmd = pmd + PTRS_PER_PMD; |
207 | 207 | ||
208 | for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { | 208 | for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { |
209 | if (!pmd_present(*pmd)) | 209 | if (pmd_none(*pmd)) |
210 | continue; | 210 | continue; |
211 | if (vaddr < (unsigned long) _text || vaddr > end) | 211 | if (vaddr < (unsigned long) _text || vaddr > end) |
212 | set_pmd(pmd, __pmd(0)); | 212 | set_pmd(pmd, __pmd(0)); |
@@ -506,7 +506,7 @@ early_param("memtest", parse_memtest); | |||
506 | 506 | ||
507 | static void __init early_memtest(unsigned long start, unsigned long end) | 507 | static void __init early_memtest(unsigned long start, unsigned long end) |
508 | { | 508 | { |
509 | unsigned long t_start, t_size; | 509 | u64 t_start, t_size; |
510 | unsigned pattern; | 510 | unsigned pattern; |
511 | 511 | ||
512 | if (!memtest_pattern) | 512 | if (!memtest_pattern) |
@@ -525,7 +525,7 @@ static void __init early_memtest(unsigned long start, unsigned long end) | |||
525 | if (t_start + t_size > end) | 525 | if (t_start + t_size > end) |
526 | t_size = end - t_start; | 526 | t_size = end - t_start; |
527 | 527 | ||
528 | printk(KERN_CONT "\n %016lx - %016lx pattern %d", | 528 | printk(KERN_CONT "\n %016llx - %016llx pattern %d", |
529 | t_start, t_start + t_size, pattern); | 529 | t_start, t_start + t_size, pattern); |
530 | 530 | ||
531 | memtest(t_start, t_size, pattern); | 531 | memtest(t_start, t_size, pattern); |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 71bb3159031a..2b2bb3f9b683 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -593,10 +593,11 @@ void __init early_iounmap(void *addr, unsigned long size) | |||
593 | unsigned long offset; | 593 | unsigned long offset; |
594 | unsigned int nrpages; | 594 | unsigned int nrpages; |
595 | enum fixed_addresses idx; | 595 | enum fixed_addresses idx; |
596 | unsigned int nesting; | 596 | int nesting; |
597 | 597 | ||
598 | nesting = --early_ioremap_nested; | 598 | nesting = --early_ioremap_nested; |
599 | WARN_ON(nesting < 0); | 599 | if (WARN_ON(nesting < 0)) |
600 | return; | ||
600 | 601 | ||
601 | if (early_ioremap_debug) { | 602 | if (early_ioremap_debug) { |
602 | printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr, | 603 | printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr, |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index de3a99812450..06b7a1c90fb8 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -34,7 +34,7 @@ void __cpuinit pat_disable(char *reason) | |||
34 | printk(KERN_INFO "%s\n", reason); | 34 | printk(KERN_INFO "%s\n", reason); |
35 | } | 35 | } |
36 | 36 | ||
37 | static int nopat(char *str) | 37 | static int __init nopat(char *str) |
38 | { | 38 | { |
39 | pat_disable("PAT support disabled."); | 39 | pat_disable("PAT support disabled."); |
40 | return 0; | 40 | return 0; |
@@ -151,32 +151,33 @@ static int pat_x_mtrr_type(u64 start, u64 end, unsigned long prot, | |||
151 | unsigned long pat_type; | 151 | unsigned long pat_type; |
152 | u8 mtrr_type; | 152 | u8 mtrr_type; |
153 | 153 | ||
154 | mtrr_type = mtrr_type_lookup(start, end); | ||
155 | if (mtrr_type == 0xFF) { /* MTRR not enabled */ | ||
156 | *ret_prot = prot; | ||
157 | return 0; | ||
158 | } | ||
159 | if (mtrr_type == 0xFE) { /* MTRR match error */ | ||
160 | *ret_prot = _PAGE_CACHE_UC; | ||
161 | return -1; | ||
162 | } | ||
163 | if (mtrr_type != MTRR_TYPE_UNCACHABLE && | ||
164 | mtrr_type != MTRR_TYPE_WRBACK && | ||
165 | mtrr_type != MTRR_TYPE_WRCOMB) { /* MTRR type unhandled */ | ||
166 | *ret_prot = _PAGE_CACHE_UC; | ||
167 | return -1; | ||
168 | } | ||
169 | |||
170 | pat_type = prot & _PAGE_CACHE_MASK; | 154 | pat_type = prot & _PAGE_CACHE_MASK; |
171 | prot &= (~_PAGE_CACHE_MASK); | 155 | prot &= (~_PAGE_CACHE_MASK); |
172 | 156 | ||
173 | /* Currently doing intersection by hand. Optimize it later. */ | 157 | /* |
158 | * We return the PAT request directly for types where PAT takes | ||
159 | * precedence with respect to MTRR and for UC_MINUS. | ||
160 | * Consistency checks with other PAT requests is done later | ||
161 | * while going through memtype list. | ||
162 | */ | ||
174 | if (pat_type == _PAGE_CACHE_WC) { | 163 | if (pat_type == _PAGE_CACHE_WC) { |
175 | *ret_prot = prot | _PAGE_CACHE_WC; | 164 | *ret_prot = prot | _PAGE_CACHE_WC; |
165 | return 0; | ||
176 | } else if (pat_type == _PAGE_CACHE_UC_MINUS) { | 166 | } else if (pat_type == _PAGE_CACHE_UC_MINUS) { |
177 | *ret_prot = prot | _PAGE_CACHE_UC_MINUS; | 167 | *ret_prot = prot | _PAGE_CACHE_UC_MINUS; |
178 | } else if (pat_type == _PAGE_CACHE_UC || | 168 | return 0; |
179 | mtrr_type == MTRR_TYPE_UNCACHABLE) { | 169 | } else if (pat_type == _PAGE_CACHE_UC) { |
170 | *ret_prot = prot | _PAGE_CACHE_UC; | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * Look for MTRR hint to get the effective type in case where PAT | ||
176 | * request is for WB. | ||
177 | */ | ||
178 | mtrr_type = mtrr_type_lookup(start, end); | ||
179 | |||
180 | if (mtrr_type == MTRR_TYPE_UNCACHABLE) { | ||
180 | *ret_prot = prot | _PAGE_CACHE_UC; | 181 | *ret_prot = prot | _PAGE_CACHE_UC; |
181 | } else if (mtrr_type == MTRR_TYPE_WRCOMB) { | 182 | } else if (mtrr_type == MTRR_TYPE_WRCOMB) { |
182 | *ret_prot = prot | _PAGE_CACHE_WC; | 183 | *ret_prot = prot | _PAGE_CACHE_WC; |
@@ -233,14 +234,12 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type, | |||
233 | 234 | ||
234 | if (req_type == -1) { | 235 | if (req_type == -1) { |
235 | /* | 236 | /* |
236 | * Special case where caller wants to inherit from mtrr or | 237 | * Call mtrr_lookup to get the type hint. This is an |
237 | * existing pat mapping, defaulting to UC_MINUS in case of | 238 | * optimization for /dev/mem mmap'ers into WB memory (BIOS |
238 | * no match. | 239 | * tools and ACPI tools). Use WB request for WB memory and use |
240 | * UC_MINUS otherwise. | ||
239 | */ | 241 | */ |
240 | u8 mtrr_type = mtrr_type_lookup(start, end); | 242 | u8 mtrr_type = mtrr_type_lookup(start, end); |
241 | if (mtrr_type == 0xFE) { /* MTRR match error */ | ||
242 | err = -1; | ||
243 | } | ||
244 | 243 | ||
245 | if (mtrr_type == MTRR_TYPE_WRBACK) { | 244 | if (mtrr_type == MTRR_TYPE_WRBACK) { |
246 | req_type = _PAGE_CACHE_WB; | 245 | req_type = _PAGE_CACHE_WB; |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 3890234e5b26..99649dccad28 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -97,36 +97,9 @@ static __init inline int srat_disabled(void) | |||
97 | return numa_off || acpi_numa < 0; | 97 | return numa_off || acpi_numa < 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | /* | ||
101 | * A lot of BIOS fill in 10 (= no distance) everywhere. This messes | ||
102 | * up the NUMA heuristics which wants the local node to have a smaller | ||
103 | * distance than the others. | ||
104 | * Do some quick checks here and only use the SLIT if it passes. | ||
105 | */ | ||
106 | static __init int slit_valid(struct acpi_table_slit *slit) | ||
107 | { | ||
108 | int i, j; | ||
109 | int d = slit->locality_count; | ||
110 | for (i = 0; i < d; i++) { | ||
111 | for (j = 0; j < d; j++) { | ||
112 | u8 val = slit->entry[d*i + j]; | ||
113 | if (i == j) { | ||
114 | if (val != LOCAL_DISTANCE) | ||
115 | return 0; | ||
116 | } else if (val <= LOCAL_DISTANCE) | ||
117 | return 0; | ||
118 | } | ||
119 | } | ||
120 | return 1; | ||
121 | } | ||
122 | |||
123 | /* Callback for SLIT parsing */ | 100 | /* Callback for SLIT parsing */ |
124 | void __init acpi_numa_slit_init(struct acpi_table_slit *slit) | 101 | void __init acpi_numa_slit_init(struct acpi_table_slit *slit) |
125 | { | 102 | { |
126 | if (!slit_valid(slit)) { | ||
127 | printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); | ||
128 | return; | ||
129 | } | ||
130 | acpi_slit = slit; | 103 | acpi_slit = slit; |
131 | } | 104 | } |
132 | 105 | ||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 8545c8a9d107..940185ecaeda 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -302,18 +302,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | |||
302 | }, | 302 | }, |
303 | { | 303 | { |
304 | .callback = set_bf_sort, | 304 | .callback = set_bf_sort, |
305 | .ident = "HP ProLiant DL385 G2", | 305 | .ident = "HP ProLiant DL360", |
306 | .matches = { | 306 | .matches = { |
307 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | 307 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), |
308 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), | 308 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"), |
309 | }, | 309 | }, |
310 | }, | 310 | }, |
311 | { | 311 | { |
312 | .callback = set_bf_sort, | 312 | .callback = set_bf_sort, |
313 | .ident = "HP ProLiant DL585 G2", | 313 | .ident = "HP ProLiant DL380", |
314 | .matches = { | 314 | .matches = { |
315 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | 315 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), |
316 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), | 316 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"), |
317 | }, | 317 | }, |
318 | }, | 318 | }, |
319 | #ifdef __i386__ | 319 | #ifdef __i386__ |
@@ -328,18 +328,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | |||
328 | #endif | 328 | #endif |
329 | { | 329 | { |
330 | .callback = set_bf_sort, | 330 | .callback = set_bf_sort, |
331 | .ident = "HP ProLiant DL385 G2", | 331 | .ident = "HP ProLiant DL360", |
332 | .matches = { | 332 | .matches = { |
333 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | 333 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), |
334 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), | 334 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"), |
335 | }, | 335 | }, |
336 | }, | 336 | }, |
337 | { | 337 | { |
338 | .callback = set_bf_sort, | 338 | .callback = set_bf_sort, |
339 | .ident = "HP ProLiant DL585 G2", | 339 | .ident = "HP ProLiant DL380", |
340 | .matches = { | 340 | .matches = { |
341 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | 341 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), |
342 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), | 342 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"), |
343 | }, | 343 | }, |
344 | }, | 344 | }, |
345 | {} | 345 | {} |
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c index e70b9c57b88e..b821f4462d99 100644 --- a/arch/x86/pci/init.c +++ b/arch/x86/pci/init.c | |||
@@ -15,7 +15,8 @@ static __init int pci_access_init(void) | |||
15 | pci_mmcfg_early_init(); | 15 | pci_mmcfg_early_init(); |
16 | 16 | ||
17 | #ifdef CONFIG_PCI_OLPC | 17 | #ifdef CONFIG_PCI_OLPC |
18 | pci_olpc_init(); | 18 | if (!pci_olpc_init()) |
19 | return 0; /* skip additional checks if it's an XO */ | ||
19 | #endif | 20 | #endif |
20 | #ifdef CONFIG_PCI_BIOS | 21 | #ifdef CONFIG_PCI_BIOS |
21 | pci_pcbios_init(); | 22 | pci_pcbios_init(); |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 0908fca901bf..ca8df9c260bc 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -621,6 +621,13 @@ static __init int via_router_probe(struct irq_router *r, | |||
621 | */ | 621 | */ |
622 | device = PCI_DEVICE_ID_VIA_8235; | 622 | device = PCI_DEVICE_ID_VIA_8235; |
623 | break; | 623 | break; |
624 | case PCI_DEVICE_ID_VIA_8237: | ||
625 | /** | ||
626 | * Asus a7v600 bios wrongly reports 8237 | ||
627 | * as 586-compatible | ||
628 | */ | ||
629 | device = PCI_DEVICE_ID_VIA_8237; | ||
630 | break; | ||
624 | } | 631 | } |
625 | } | 632 | } |
626 | 633 | ||
diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c index 5e7636558c02..e11e9e803d5f 100644 --- a/arch/x86/pci/olpc.c +++ b/arch/x86/pci/olpc.c | |||
@@ -302,12 +302,13 @@ static struct pci_raw_ops pci_olpc_conf = { | |||
302 | .write = pci_olpc_write, | 302 | .write = pci_olpc_write, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | void __init pci_olpc_init(void) | 305 | int __init pci_olpc_init(void) |
306 | { | 306 | { |
307 | if (!machine_is_olpc() || olpc_has_vsa()) | 307 | if (!machine_is_olpc() || olpc_has_vsa()) |
308 | return; | 308 | return -ENODEV; |
309 | 309 | ||
310 | printk(KERN_INFO "PCI: Using configuration type OLPC\n"); | 310 | printk(KERN_INFO "PCI: Using configuration type OLPC\n"); |
311 | raw_pci_ops = &pci_olpc_conf; | 311 | raw_pci_ops = &pci_olpc_conf; |
312 | is_lx = is_geode_lx(); | 312 | is_lx = is_geode_lx(); |
313 | return 0; | ||
313 | } | 314 | } |
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index f3972b12c60a..720c4c554534 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -101,7 +101,7 @@ extern struct pci_raw_ops pci_direct_conf1; | |||
101 | extern int pci_direct_probe(void); | 101 | extern int pci_direct_probe(void); |
102 | extern void pci_direct_init(int type); | 102 | extern void pci_direct_init(int type); |
103 | extern void pci_pcbios_init(void); | 103 | extern void pci_pcbios_init(void); |
104 | extern void pci_olpc_init(void); | 104 | extern int pci_olpc_init(void); |
105 | 105 | ||
106 | /* pci-mmconfig.c */ | 106 | /* pci-mmconfig.c */ |
107 | 107 | ||
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 23476c2ebfc4..efa2ba7c6005 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c | |||
@@ -106,9 +106,9 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) | |||
106 | do_realtime((struct timespec *)tv); | 106 | do_realtime((struct timespec *)tv); |
107 | tv->tv_usec /= 1000; | 107 | tv->tv_usec /= 1000; |
108 | if (unlikely(tz != NULL)) { | 108 | if (unlikely(tz != NULL)) { |
109 | /* This relies on gcc inlining the memcpy. We'll notice | 109 | /* Avoid memcpy. Some old compilers fail to inline it */ |
110 | if it ever fails to do so. */ | 110 | tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest; |
111 | memcpy(tz, >od->sys_tz, sizeof(struct timezone)); | 111 | tz->tz_dsttime = gtod->sys_tz.tz_dsttime; |
112 | } | 112 | } |
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 126766d43aea..3525ef523a74 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -60,7 +60,7 @@ xmaddr_t arbitrary_virt_to_machine(unsigned long address) | |||
60 | { | 60 | { |
61 | unsigned int level; | 61 | unsigned int level; |
62 | pte_t *pte = lookup_address(address, &level); | 62 | pte_t *pte = lookup_address(address, &level); |
63 | unsigned offset = address & PAGE_MASK; | 63 | unsigned offset = address & ~PAGE_MASK; |
64 | 64 | ||
65 | BUG_ON(pte == NULL); | 65 | BUG_ON(pte == NULL); |
66 | 66 | ||
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index c39e1a5aa241..52b2e3856980 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/clocksource.h> | 12 | #include <linux/clocksource.h> |
13 | #include <linux/clockchips.h> | 13 | #include <linux/clockchips.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/math64.h> | ||
15 | 16 | ||
16 | #include <asm/xen/hypervisor.h> | 17 | #include <asm/xen/hypervisor.h> |
17 | #include <asm/xen/hypercall.h> | 18 | #include <asm/xen/hypercall.h> |
@@ -150,11 +151,7 @@ static void do_stolen_accounting(void) | |||
150 | if (stolen < 0) | 151 | if (stolen < 0) |
151 | stolen = 0; | 152 | stolen = 0; |
152 | 153 | ||
153 | ticks = 0; | 154 | ticks = iter_div_u64_rem(stolen, NS_PER_TICK, &stolen); |
154 | while (stolen >= NS_PER_TICK) { | ||
155 | ticks++; | ||
156 | stolen -= NS_PER_TICK; | ||
157 | } | ||
158 | __get_cpu_var(residual_stolen) = stolen; | 155 | __get_cpu_var(residual_stolen) = stolen; |
159 | account_steal_time(NULL, ticks); | 156 | account_steal_time(NULL, ticks); |
160 | 157 | ||
@@ -166,11 +163,7 @@ static void do_stolen_accounting(void) | |||
166 | if (blocked < 0) | 163 | if (blocked < 0) |
167 | blocked = 0; | 164 | blocked = 0; |
168 | 165 | ||
169 | ticks = 0; | 166 | ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked); |
170 | while (blocked >= NS_PER_TICK) { | ||
171 | ticks++; | ||
172 | blocked -= NS_PER_TICK; | ||
173 | } | ||
174 | __get_cpu_var(residual_blocked) = blocked; | 167 | __get_cpu_var(residual_blocked) = blocked; |
175 | account_steal_time(idle_task(smp_processor_id()), ticks); | 168 | account_steal_time(idle_task(smp_processor_id()), ticks); |
176 | } | 169 | } |
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c index 021b4f46ff94..3df469dbe814 100644 --- a/arch/xtensa/kernel/init_task.c +++ b/arch/xtensa/kernel/init_task.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | 23 | ||
24 | static struct fs_struct init_fs = INIT_FS; | 24 | static struct fs_struct init_fs = INIT_FS; |
25 | static struct files_struct init_files = INIT_FILES; | ||
26 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 25 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
27 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 26 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
28 | struct mm_struct init_mm = INIT_MM(init_mm); | 27 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/block/blk-core.c b/block/blk-core.c index 6a9cc0d22a61..1905aaba49fb 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -806,35 +806,32 @@ static struct request *get_request_wait(struct request_queue *q, int rw_flags, | |||
806 | rq = get_request(q, rw_flags, bio, GFP_NOIO); | 806 | rq = get_request(q, rw_flags, bio, GFP_NOIO); |
807 | while (!rq) { | 807 | while (!rq) { |
808 | DEFINE_WAIT(wait); | 808 | DEFINE_WAIT(wait); |
809 | struct io_context *ioc; | ||
809 | struct request_list *rl = &q->rq; | 810 | struct request_list *rl = &q->rq; |
810 | 811 | ||
811 | prepare_to_wait_exclusive(&rl->wait[rw], &wait, | 812 | prepare_to_wait_exclusive(&rl->wait[rw], &wait, |
812 | TASK_UNINTERRUPTIBLE); | 813 | TASK_UNINTERRUPTIBLE); |
813 | 814 | ||
814 | rq = get_request(q, rw_flags, bio, GFP_NOIO); | 815 | blk_add_trace_generic(q, bio, rw, BLK_TA_SLEEPRQ); |
815 | |||
816 | if (!rq) { | ||
817 | struct io_context *ioc; | ||
818 | 816 | ||
819 | blk_add_trace_generic(q, bio, rw, BLK_TA_SLEEPRQ); | 817 | __generic_unplug_device(q); |
820 | 818 | spin_unlock_irq(q->queue_lock); | |
821 | __generic_unplug_device(q); | 819 | io_schedule(); |
822 | spin_unlock_irq(q->queue_lock); | ||
823 | io_schedule(); | ||
824 | 820 | ||
825 | /* | 821 | /* |
826 | * After sleeping, we become a "batching" process and | 822 | * After sleeping, we become a "batching" process and |
827 | * will be able to allocate at least one request, and | 823 | * will be able to allocate at least one request, and |
828 | * up to a big batch of them for a small period time. | 824 | * up to a big batch of them for a small period time. |
829 | * See ioc_batching, ioc_set_batching | 825 | * See ioc_batching, ioc_set_batching |
830 | */ | 826 | */ |
831 | ioc = current_io_context(GFP_NOIO, q->node); | 827 | ioc = current_io_context(GFP_NOIO, q->node); |
832 | ioc_set_batching(q, ioc); | 828 | ioc_set_batching(q, ioc); |
833 | 829 | ||
834 | spin_lock_irq(q->queue_lock); | 830 | spin_lock_irq(q->queue_lock); |
835 | } | ||
836 | finish_wait(&rl->wait[rw], &wait); | 831 | finish_wait(&rl->wait[rw], &wait); |
837 | } | 832 | |
833 | rq = get_request(q, rw_flags, bio, GFP_NOIO); | ||
834 | }; | ||
838 | 835 | ||
839 | return rq; | 836 | return rq; |
840 | } | 837 | } |
diff --git a/block/blktrace.c b/block/blktrace.c index b2cbb4e5d767..8d3a27780260 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -75,6 +75,24 @@ static void trace_note_time(struct blk_trace *bt) | |||
75 | local_irq_restore(flags); | 75 | local_irq_restore(flags); |
76 | } | 76 | } |
77 | 77 | ||
78 | void __trace_note_message(struct blk_trace *bt, const char *fmt, ...) | ||
79 | { | ||
80 | int n; | ||
81 | va_list args; | ||
82 | unsigned long flags; | ||
83 | char *buf; | ||
84 | |||
85 | local_irq_save(flags); | ||
86 | buf = per_cpu_ptr(bt->msg_data, smp_processor_id()); | ||
87 | va_start(args, fmt); | ||
88 | n = vscnprintf(buf, BLK_TN_MAX_MSG, fmt, args); | ||
89 | va_end(args); | ||
90 | |||
91 | trace_note(bt, 0, BLK_TN_MESSAGE, buf, n); | ||
92 | local_irq_restore(flags); | ||
93 | } | ||
94 | EXPORT_SYMBOL_GPL(__trace_note_message); | ||
95 | |||
78 | static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, | 96 | static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, |
79 | pid_t pid) | 97 | pid_t pid) |
80 | { | 98 | { |
@@ -141,10 +159,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, | |||
141 | /* | 159 | /* |
142 | * A word about the locking here - we disable interrupts to reserve | 160 | * A word about the locking here - we disable interrupts to reserve |
143 | * some space in the relay per-cpu buffer, to prevent an irq | 161 | * some space in the relay per-cpu buffer, to prevent an irq |
144 | * from coming in and stepping on our toes. Once reserved, it's | 162 | * from coming in and stepping on our toes. |
145 | * enough to get preemption disabled to prevent read of this data | ||
146 | * before we are through filling it. get_cpu()/put_cpu() does this | ||
147 | * for us | ||
148 | */ | 163 | */ |
149 | local_irq_save(flags); | 164 | local_irq_save(flags); |
150 | 165 | ||
@@ -232,6 +247,7 @@ static void blk_trace_cleanup(struct blk_trace *bt) | |||
232 | debugfs_remove(bt->dropped_file); | 247 | debugfs_remove(bt->dropped_file); |
233 | blk_remove_tree(bt->dir); | 248 | blk_remove_tree(bt->dir); |
234 | free_percpu(bt->sequence); | 249 | free_percpu(bt->sequence); |
250 | free_percpu(bt->msg_data); | ||
235 | kfree(bt); | 251 | kfree(bt); |
236 | } | 252 | } |
237 | 253 | ||
@@ -346,6 +362,10 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
346 | if (!bt->sequence) | 362 | if (!bt->sequence) |
347 | goto err; | 363 | goto err; |
348 | 364 | ||
365 | bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG); | ||
366 | if (!bt->msg_data) | ||
367 | goto err; | ||
368 | |||
349 | ret = -ENOENT; | 369 | ret = -ENOENT; |
350 | dir = blk_create_tree(buts->name); | 370 | dir = blk_create_tree(buts->name); |
351 | if (!dir) | 371 | if (!dir) |
@@ -392,6 +412,7 @@ err: | |||
392 | if (bt->dropped_file) | 412 | if (bt->dropped_file) |
393 | debugfs_remove(bt->dropped_file); | 413 | debugfs_remove(bt->dropped_file); |
394 | free_percpu(bt->sequence); | 414 | free_percpu(bt->sequence); |
415 | free_percpu(bt->msg_data); | ||
395 | if (bt->rchan) | 416 | if (bt->rchan) |
396 | relay_close(bt->rchan); | 417 | relay_close(bt->rchan); |
397 | kfree(bt); | 418 | kfree(bt); |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index b399c62936e0..d01b411c72f0 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -124,6 +124,8 @@ struct cfq_data { | |||
124 | struct cfq_queue { | 124 | struct cfq_queue { |
125 | /* reference count */ | 125 | /* reference count */ |
126 | atomic_t ref; | 126 | atomic_t ref; |
127 | /* various state flags, see below */ | ||
128 | unsigned int flags; | ||
127 | /* parent cfq_data */ | 129 | /* parent cfq_data */ |
128 | struct cfq_data *cfqd; | 130 | struct cfq_data *cfqd; |
129 | /* service_tree member */ | 131 | /* service_tree member */ |
@@ -138,14 +140,14 @@ struct cfq_queue { | |||
138 | int queued[2]; | 140 | int queued[2]; |
139 | /* currently allocated requests */ | 141 | /* currently allocated requests */ |
140 | int allocated[2]; | 142 | int allocated[2]; |
141 | /* pending metadata requests */ | ||
142 | int meta_pending; | ||
143 | /* fifo list of requests in sort_list */ | 143 | /* fifo list of requests in sort_list */ |
144 | struct list_head fifo; | 144 | struct list_head fifo; |
145 | 145 | ||
146 | unsigned long slice_end; | 146 | unsigned long slice_end; |
147 | long slice_resid; | 147 | long slice_resid; |
148 | 148 | ||
149 | /* pending metadata requests */ | ||
150 | int meta_pending; | ||
149 | /* number of requests that are on the dispatch list or inside driver */ | 151 | /* number of requests that are on the dispatch list or inside driver */ |
150 | int dispatched; | 152 | int dispatched; |
151 | 153 | ||
@@ -153,8 +155,6 @@ struct cfq_queue { | |||
153 | unsigned short ioprio, org_ioprio; | 155 | unsigned short ioprio, org_ioprio; |
154 | unsigned short ioprio_class, org_ioprio_class; | 156 | unsigned short ioprio_class, org_ioprio_class; |
155 | 157 | ||
156 | /* various state flags, see below */ | ||
157 | unsigned int flags; | ||
158 | }; | 158 | }; |
159 | 159 | ||
160 | enum cfqq_state_flags { | 160 | enum cfqq_state_flags { |
@@ -1142,6 +1142,9 @@ static void cfq_put_queue(struct cfq_queue *cfqq) | |||
1142 | kmem_cache_free(cfq_pool, cfqq); | 1142 | kmem_cache_free(cfq_pool, cfqq); |
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | /* | ||
1146 | * Must always be called with the rcu_read_lock() held | ||
1147 | */ | ||
1145 | static void | 1148 | static void |
1146 | __call_for_each_cic(struct io_context *ioc, | 1149 | __call_for_each_cic(struct io_context *ioc, |
1147 | void (*func)(struct io_context *, struct cfq_io_context *)) | 1150 | void (*func)(struct io_context *, struct cfq_io_context *)) |
@@ -1197,6 +1200,11 @@ static void cic_free_func(struct io_context *ioc, struct cfq_io_context *cic) | |||
1197 | cfq_cic_free(cic); | 1200 | cfq_cic_free(cic); |
1198 | } | 1201 | } |
1199 | 1202 | ||
1203 | /* | ||
1204 | * Must be called with rcu_read_lock() held or preemption otherwise disabled. | ||
1205 | * Only two callers of this - ->dtor() which is called with the rcu_read_lock(), | ||
1206 | * and ->trim() which is called with the task lock held | ||
1207 | */ | ||
1200 | static void cfq_free_io_context(struct io_context *ioc) | 1208 | static void cfq_free_io_context(struct io_context *ioc) |
1201 | { | 1209 | { |
1202 | /* | 1210 | /* |
@@ -1502,20 +1510,24 @@ static struct cfq_io_context * | |||
1502 | cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc) | 1510 | cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc) |
1503 | { | 1511 | { |
1504 | struct cfq_io_context *cic; | 1512 | struct cfq_io_context *cic; |
1513 | unsigned long flags; | ||
1505 | void *k; | 1514 | void *k; |
1506 | 1515 | ||
1507 | if (unlikely(!ioc)) | 1516 | if (unlikely(!ioc)) |
1508 | return NULL; | 1517 | return NULL; |
1509 | 1518 | ||
1519 | rcu_read_lock(); | ||
1520 | |||
1510 | /* | 1521 | /* |
1511 | * we maintain a last-hit cache, to avoid browsing over the tree | 1522 | * we maintain a last-hit cache, to avoid browsing over the tree |
1512 | */ | 1523 | */ |
1513 | cic = rcu_dereference(ioc->ioc_data); | 1524 | cic = rcu_dereference(ioc->ioc_data); |
1514 | if (cic && cic->key == cfqd) | 1525 | if (cic && cic->key == cfqd) { |
1526 | rcu_read_unlock(); | ||
1515 | return cic; | 1527 | return cic; |
1528 | } | ||
1516 | 1529 | ||
1517 | do { | 1530 | do { |
1518 | rcu_read_lock(); | ||
1519 | cic = radix_tree_lookup(&ioc->radix_root, (unsigned long) cfqd); | 1531 | cic = radix_tree_lookup(&ioc->radix_root, (unsigned long) cfqd); |
1520 | rcu_read_unlock(); | 1532 | rcu_read_unlock(); |
1521 | if (!cic) | 1533 | if (!cic) |
@@ -1524,10 +1536,13 @@ cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc) | |||
1524 | k = cic->key; | 1536 | k = cic->key; |
1525 | if (unlikely(!k)) { | 1537 | if (unlikely(!k)) { |
1526 | cfq_drop_dead_cic(cfqd, ioc, cic); | 1538 | cfq_drop_dead_cic(cfqd, ioc, cic); |
1539 | rcu_read_lock(); | ||
1527 | continue; | 1540 | continue; |
1528 | } | 1541 | } |
1529 | 1542 | ||
1543 | spin_lock_irqsave(&ioc->lock, flags); | ||
1530 | rcu_assign_pointer(ioc->ioc_data, cic); | 1544 | rcu_assign_pointer(ioc->ioc_data, cic); |
1545 | spin_unlock_irqrestore(&ioc->lock, flags); | ||
1531 | break; | 1546 | break; |
1532 | } while (1); | 1547 | } while (1); |
1533 | 1548 | ||
@@ -2134,6 +2149,10 @@ static void *cfq_init_queue(struct request_queue *q) | |||
2134 | 2149 | ||
2135 | static void cfq_slab_kill(void) | 2150 | static void cfq_slab_kill(void) |
2136 | { | 2151 | { |
2152 | /* | ||
2153 | * Caller already ensured that pending RCU callbacks are completed, | ||
2154 | * so we should have no busy allocations at this point. | ||
2155 | */ | ||
2137 | if (cfq_pool) | 2156 | if (cfq_pool) |
2138 | kmem_cache_destroy(cfq_pool); | 2157 | kmem_cache_destroy(cfq_pool); |
2139 | if (cfq_ioc_pool) | 2158 | if (cfq_ioc_pool) |
@@ -2292,6 +2311,11 @@ static void __exit cfq_exit(void) | |||
2292 | ioc_gone = &all_gone; | 2311 | ioc_gone = &all_gone; |
2293 | /* ioc_gone's update must be visible before reading ioc_count */ | 2312 | /* ioc_gone's update must be visible before reading ioc_count */ |
2294 | smp_wmb(); | 2313 | smp_wmb(); |
2314 | |||
2315 | /* | ||
2316 | * this also protects us from entering cfq_slab_kill() with | ||
2317 | * pending RCU callbacks | ||
2318 | */ | ||
2295 | if (elv_ioc_count_read(ioc_count)) | 2319 | if (elv_ioc_count_read(ioc_count)) |
2296 | wait_for_completion(ioc_gone); | 2320 | wait_for_completion(ioc_gone); |
2297 | cfq_slab_kill(); | 2321 | cfq_slab_kill(); |
diff --git a/block/elevator.c b/block/elevator.c index 980f8ae147b4..902dd1344d56 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -1110,6 +1110,8 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) | |||
1110 | queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); | 1110 | queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); |
1111 | spin_unlock_irq(q->queue_lock); | 1111 | spin_unlock_irq(q->queue_lock); |
1112 | 1112 | ||
1113 | blk_add_trace_msg(q, "elv switch: %s", e->elevator_type->elevator_name); | ||
1114 | |||
1113 | return 1; | 1115 | return 1; |
1114 | 1116 | ||
1115 | fail_register: | 1117 | fail_register: |
diff --git a/block/genhd.c b/block/genhd.c index 129ad939f9dd..b922d4801c87 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -660,6 +660,8 @@ dev_t blk_lookup_devt(const char *name, int part) | |||
660 | 660 | ||
661 | mutex_lock(&block_class_lock); | 661 | mutex_lock(&block_class_lock); |
662 | list_for_each_entry(dev, &block_class.devices, node) { | 662 | list_for_each_entry(dev, &block_class.devices, node) { |
663 | if (dev->type != &disk_type) | ||
664 | continue; | ||
663 | if (strcmp(dev->bus_id, name) == 0) { | 665 | if (strcmp(dev->bus_id, name) == 0) { |
664 | struct gendisk *disk = dev_to_disk(dev); | 666 | struct gendisk *disk = dev_to_disk(dev); |
665 | 667 | ||
diff --git a/crypto/cts.c b/crypto/cts.c index c4e70bfb4970..ccf9c5de3958 100644 --- a/crypto/cts.c +++ b/crypto/cts.c | |||
@@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx, | |||
89 | if (lastn < 0) | 89 | if (lastn < 0) |
90 | return -EINVAL; | 90 | return -EINVAL; |
91 | 91 | ||
92 | sg_init_table(sgsrc, 1); | ||
93 | sg_init_table(sgdst, 1); | ||
94 | |||
92 | memset(s, 0, sizeof(s)); | 95 | memset(s, 0, sizeof(s)); |
93 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); | 96 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); |
94 | 97 | ||
@@ -172,6 +175,9 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx, | |||
172 | if (lastn < 0) | 175 | if (lastn < 0) |
173 | return -EINVAL; | 176 | return -EINVAL; |
174 | 177 | ||
178 | sg_init_table(sgsrc, 1); | ||
179 | sg_init_table(sgdst, 1); | ||
180 | |||
175 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); | 181 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); |
176 | 182 | ||
177 | lcldesc.tfm = ctx->child; | 183 | lcldesc.tfm = ctx->child; |
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index d2fc94161848..26038c2a2a71 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
@@ -301,16 +301,20 @@ static int bay_add(acpi_handle handle, int id) | |||
301 | */ | 301 | */ |
302 | pdev->dev.uevent_suppress = 0; | 302 | pdev->dev.uevent_suppress = 0; |
303 | 303 | ||
304 | if (acpi_bay_add_fs(new_bay)) { | ||
305 | platform_device_unregister(new_bay->pdev); | ||
306 | goto bay_add_err; | ||
307 | } | ||
308 | |||
309 | /* register for events on this device */ | 304 | /* register for events on this device */ |
310 | status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | 305 | status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, |
311 | bay_notify, new_bay); | 306 | bay_notify, new_bay); |
312 | if (ACPI_FAILURE(status)) { | 307 | if (ACPI_FAILURE(status)) { |
313 | printk(KERN_ERR PREFIX "Error installing bay notify handler\n"); | 308 | printk(KERN_INFO PREFIX "Error installing bay notify handler\n"); |
309 | platform_device_unregister(new_bay->pdev); | ||
310 | goto bay_add_err; | ||
311 | } | ||
312 | |||
313 | if (acpi_bay_add_fs(new_bay)) { | ||
314 | acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY, | ||
315 | bay_notify); | ||
316 | platform_device_unregister(new_bay->pdev); | ||
317 | goto bay_add_err; | ||
314 | } | 318 | } |
315 | 319 | ||
316 | /* if we are on a dock station, we should register for dock | 320 | /* if we are on a dock station, we should register for dock |
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c index c78078315be9..f988a5e7d2b4 100644 --- a/drivers/acpi/dispatcher/dsfield.c +++ b/drivers/acpi/dispatcher/dsfield.c | |||
@@ -450,10 +450,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
450 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 450 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
451 | } | 451 | } |
452 | 452 | ||
453 | if (!arg) { | ||
454 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | ||
455 | } | ||
456 | |||
457 | /* Creating new namespace node(s), should not already exist */ | 453 | /* Creating new namespace node(s), should not already exist */ |
458 | 454 | ||
459 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | | 455 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | |
@@ -467,6 +463,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, | |||
467 | 463 | ||
468 | /* | 464 | /* |
469 | * Walk the list of entries in the field_list | 465 | * Walk the list of entries in the field_list |
466 | * Note: field_list can be of zero length. In this case, Arg will be NULL. | ||
470 | */ | 467 | */ |
471 | while (arg) { | 468 | while (arg) { |
472 | /* | 469 | /* |
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index e48a3ea03117..2509809a36cf 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -565,7 +565,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
565 | 565 | ||
566 | acpi_os_release_mutex(method_desc->method. | 566 | acpi_os_release_mutex(method_desc->method. |
567 | mutex->mutex.os_mutex); | 567 | mutex->mutex.os_mutex); |
568 | method_desc->method.mutex->mutex.thread_id = 0; | 568 | method_desc->method.mutex->mutex.thread_id = NULL; |
569 | } | 569 | } |
570 | } | 570 | } |
571 | 571 | ||
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index fa44fb96fc34..96c542f7fded 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -834,7 +834,7 @@ static int dock_add(acpi_handle handle) | |||
834 | goto dock_add_err; | 834 | goto dock_add_err; |
835 | } | 835 | } |
836 | 836 | ||
837 | printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_DESCRIPTION); | 837 | printk(KERN_INFO PREFIX "%s\n", ACPI_DOCK_DRIVER_DESCRIPTION); |
838 | 838 | ||
839 | return 0; | 839 | return 0; |
840 | 840 | ||
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 0924992187e8..5622aee996b2 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -194,7 +194,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
194 | while (time_before(jiffies, delay)) { | 194 | while (time_before(jiffies, delay)) { |
195 | if (acpi_ec_check_status(ec, event)) | 195 | if (acpi_ec_check_status(ec, event)) |
196 | return 0; | 196 | return 0; |
197 | udelay(ACPI_EC_UDELAY); | 197 | msleep(1); |
198 | } | 198 | } |
199 | } | 199 | } |
200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", | 200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", |
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 24da921d13e3..39d742190584 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -375,9 +375,15 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
375 | goto cleanup; | 375 | goto cleanup; |
376 | } | 376 | } |
377 | 377 | ||
378 | /* | ||
379 | * Add the table to the namespace. | ||
380 | * | ||
381 | * Note: We load the table objects relative to the root of the namespace. | ||
382 | * This appears to go against the ACPI specification, but we do it for | ||
383 | * compatibility with other ACPI implementations. | ||
384 | */ | ||
378 | status = | 385 | status = |
379 | acpi_ex_add_table(table_index, walk_state->scope_info->scope.node, | 386 | acpi_ex_add_table(table_index, acpi_gbl_root_node, &ddb_handle); |
380 | &ddb_handle); | ||
381 | if (ACPI_FAILURE(status)) { | 387 | if (ACPI_FAILURE(status)) { |
382 | 388 | ||
383 | /* On error, table_ptr was deallocated above */ | 389 | /* On error, table_ptr was deallocated above */ |
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index c873ab40cd0e..a8bf3d713e28 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.c | |||
@@ -326,7 +326,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc) | |||
326 | 326 | ||
327 | /* Clear mutex info */ | 327 | /* Clear mutex info */ |
328 | 328 | ||
329 | obj_desc->mutex.thread_id = 0; | 329 | obj_desc->mutex.thread_id = NULL; |
330 | return_ACPI_STATUS(status); | 330 | return_ACPI_STATUS(status); |
331 | } | 331 | } |
332 | 332 | ||
@@ -463,7 +463,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread) | |||
463 | /* Mark mutex unowned */ | 463 | /* Mark mutex unowned */ |
464 | 464 | ||
465 | obj_desc->mutex.owner_thread = NULL; | 465 | obj_desc->mutex.owner_thread = NULL; |
466 | obj_desc->mutex.thread_id = 0; | 466 | obj_desc->mutex.thread_id = NULL; |
467 | 467 | ||
468 | /* Update Thread sync_level (Last mutex is the important one) */ | 468 | /* Update Thread sync_level (Last mutex is the important one) */ |
469 | 469 | ||
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 06f8634fe58b..2808dc60fd67 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -272,6 +272,12 @@ static u32 rtc_handler(void *context) | |||
272 | static inline void rtc_wake_setup(void) | 272 | static inline void rtc_wake_setup(void) |
273 | { | 273 | { |
274 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 274 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
275 | /* | ||
276 | * After the RTC handler is installed, the Fixed_RTC event should | ||
277 | * be disabled. Only when the RTC alarm is set will it be enabled. | ||
278 | */ | ||
279 | acpi_clear_event(ACPI_EVENT_RTC); | ||
280 | acpi_disable_event(ACPI_EVENT_RTC, 0); | ||
275 | } | 281 | } |
276 | 282 | ||
277 | static void rtc_wake_on(struct device *dev) | 283 | static void rtc_wake_on(struct device *dev) |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index d9937e05ec6a..dba3cfbe8cba 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -223,15 +223,17 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
223 | break; | 223 | break; |
224 | } | 224 | } |
225 | 225 | ||
226 | /* Set the system indicators to show the desired sleep state. */ | 226 | /* |
227 | 227 | * Set the system indicators to show the desired sleep state. | |
228 | * _SST is an optional method (return no error if not found) | ||
229 | */ | ||
228 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); | 230 | status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); |
229 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 231 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
230 | ACPI_EXCEPTION((AE_INFO, status, | 232 | ACPI_EXCEPTION((AE_INFO, status, |
231 | "While executing method _SST")); | 233 | "While executing method _SST")); |
232 | } | 234 | } |
233 | 235 | ||
234 | return_ACPI_STATUS(status); | 236 | return_ACPI_STATUS(AE_OK); |
235 | } | 237 | } |
236 | 238 | ||
237 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | 239 | ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 5d59cb33b1a5..658e5f3abae0 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -140,19 +140,42 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) | |||
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
143 | /* | ||
144 | * A lot of BIOS fill in 10 (= no distance) everywhere. This messes | ||
145 | * up the NUMA heuristics which wants the local node to have a smaller | ||
146 | * distance than the others. | ||
147 | * Do some quick checks here and only use the SLIT if it passes. | ||
148 | */ | ||
149 | static __init int slit_valid(struct acpi_table_slit *slit) | ||
150 | { | ||
151 | int i, j; | ||
152 | int d = slit->locality_count; | ||
153 | for (i = 0; i < d; i++) { | ||
154 | for (j = 0; j < d; j++) { | ||
155 | u8 val = slit->entry[d*i + j]; | ||
156 | if (i == j) { | ||
157 | if (val != LOCAL_DISTANCE) | ||
158 | return 0; | ||
159 | } else if (val <= LOCAL_DISTANCE) | ||
160 | return 0; | ||
161 | } | ||
162 | } | ||
163 | return 1; | ||
164 | } | ||
165 | |||
143 | static int __init acpi_parse_slit(struct acpi_table_header *table) | 166 | static int __init acpi_parse_slit(struct acpi_table_header *table) |
144 | { | 167 | { |
145 | struct acpi_table_slit *slit; | 168 | struct acpi_table_slit *slit; |
146 | u32 localities; | ||
147 | 169 | ||
148 | if (!table) | 170 | if (!table) |
149 | return -EINVAL; | 171 | return -EINVAL; |
150 | 172 | ||
151 | slit = (struct acpi_table_slit *)table; | 173 | slit = (struct acpi_table_slit *)table; |
152 | 174 | ||
153 | /* downcast just for %llu vs %lu for i386/ia64 */ | 175 | if (!slit_valid(slit)) { |
154 | localities = (u32) slit->locality_count; | 176 | printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n"); |
155 | 177 | return -EINVAL; | |
178 | } | ||
156 | acpi_numa_slit_init(slit); | 179 | acpi_numa_slit_init(slit); |
157 | 180 | ||
158 | return 0; | 181 | return 0; |
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index f1e8bf65e24e..e94463778845 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
@@ -268,7 +268,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
268 | */ | 268 | */ |
269 | if (ACPI_SUCCESS(status) && | 269 | if (ACPI_SUCCESS(status) && |
270 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { | 270 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { |
271 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { | 271 | if (walk_state->opcode == AML_UNLOAD_OP) { |
272 | /* | 272 | /* |
273 | * acpi_ps_get_next_namestring has increased the AML pointer, | 273 | * acpi_ps_get_next_namestring has increased the AML pointer, |
274 | * so we need to restore the saved AML pointer for method call. | 274 | * so we need to restore the saved AML pointer for method call. |
@@ -691,7 +691,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
691 | 691 | ||
692 | /* To support super_name arg of Unload */ | 692 | /* To support super_name arg of Unload */ |
693 | 693 | ||
694 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { | 694 | if (walk_state->opcode == AML_UNLOAD_OP) { |
695 | status = | 695 | status = |
696 | acpi_ps_get_next_namepath(walk_state, | 696 | acpi_ps_get_next_namepath(walk_state, |
697 | parser_state, arg, | 697 | parser_state, arg, |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 386e5aa48834..9dd0fa93b9e1 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -86,7 +86,6 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file); | |||
86 | static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); | 86 | static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); |
87 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); | 87 | static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); |
88 | static int acpi_processor_handle_eject(struct acpi_processor *pr); | 88 | static int acpi_processor_handle_eject(struct acpi_processor *pr); |
89 | extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | ||
90 | 89 | ||
91 | 90 | ||
92 | static const struct acpi_device_id processor_device_ids[] = { | 91 | static const struct acpi_device_id processor_device_ids[] = { |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 2dd2c1f3a01c..556ee1585192 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1669,6 +1669,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1669 | return -EINVAL; | 1669 | return -EINVAL; |
1670 | } | 1670 | } |
1671 | 1671 | ||
1672 | dev->cpu = pr->id; | ||
1672 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | 1673 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { |
1673 | dev->states[i].name[0] = '\0'; | 1674 | dev->states[i].name[0] = '\0'; |
1674 | dev->states[i].desc[0] = '\0'; | 1675 | dev->states[i].desc[0] = '\0'; |
@@ -1738,7 +1739,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1738 | 1739 | ||
1739 | int acpi_processor_cst_has_changed(struct acpi_processor *pr) | 1740 | int acpi_processor_cst_has_changed(struct acpi_processor *pr) |
1740 | { | 1741 | { |
1741 | int ret; | 1742 | int ret = 0; |
1742 | 1743 | ||
1743 | if (boot_option_idle_override) | 1744 | if (boot_option_idle_override) |
1744 | return 0; | 1745 | return 0; |
@@ -1756,8 +1757,10 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) | |||
1756 | cpuidle_pause_and_lock(); | 1757 | cpuidle_pause_and_lock(); |
1757 | cpuidle_disable_device(&pr->power.dev); | 1758 | cpuidle_disable_device(&pr->power.dev); |
1758 | acpi_processor_get_power_info(pr); | 1759 | acpi_processor_get_power_info(pr); |
1759 | acpi_processor_setup_cpuidle(pr); | 1760 | if (pr->flags.power) { |
1760 | ret = cpuidle_enable_device(&pr->power.dev); | 1761 | acpi_processor_setup_cpuidle(pr); |
1762 | ret = cpuidle_enable_device(&pr->power.dev); | ||
1763 | } | ||
1761 | cpuidle_resume_and_unlock(); | 1764 | cpuidle_resume_and_unlock(); |
1762 | 1765 | ||
1763 | return ret; | 1766 | return ret; |
@@ -1813,7 +1816,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr, | |||
1813 | if (pr->flags.power) { | 1816 | if (pr->flags.power) { |
1814 | #ifdef CONFIG_CPU_IDLE | 1817 | #ifdef CONFIG_CPU_IDLE |
1815 | acpi_processor_setup_cpuidle(pr); | 1818 | acpi_processor_setup_cpuidle(pr); |
1816 | pr->power.dev.cpu = pr->id; | ||
1817 | if (cpuidle_register_device(&pr->power.dev)) | 1819 | if (cpuidle_register_device(&pr->power.dev)) |
1818 | return -EIO; | 1820 | return -EIO; |
1819 | #endif | 1821 | #endif |
@@ -1850,8 +1852,7 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
1850 | return 0; | 1852 | return 0; |
1851 | 1853 | ||
1852 | #ifdef CONFIG_CPU_IDLE | 1854 | #ifdef CONFIG_CPU_IDLE |
1853 | if (pr->flags.power) | 1855 | cpuidle_unregister_device(&pr->power.dev); |
1854 | cpuidle_unregister_device(&pr->power.dev); | ||
1855 | #endif | 1856 | #endif |
1856 | pr->flags.power_setup_done = 0; | 1857 | pr->flags.power_setup_done = 0; |
1857 | 1858 | ||
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c index 8a5fe8710513..224c57c03381 100644 --- a/drivers/acpi/sleep/proc.c +++ b/drivers/acpi/sleep/proc.c | |||
@@ -495,6 +495,12 @@ static int __init acpi_sleep_proc_init(void) | |||
495 | acpi_root_dir, &acpi_system_alarm_fops); | 495 | acpi_root_dir, &acpi_system_alarm_fops); |
496 | 496 | ||
497 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); | 497 | acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); |
498 | /* | ||
499 | * Disable the RTC event after installing RTC handler. | ||
500 | * Only when RTC alarm is set will it be enabled. | ||
501 | */ | ||
502 | acpi_clear_event(ACPI_EVENT_RTC); | ||
503 | acpi_disable_event(ACPI_EVENT_RTC, 0); | ||
498 | #endif /* HAVE_ACPI_LEGACY_ALARM */ | 504 | #endif /* HAVE_ACPI_LEGACY_ALARM */ |
499 | 505 | ||
500 | /* 'wakeup device' [R/W] */ | 506 | /* 'wakeup device' [R/W] */ |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 769f24855eb6..5bd2dec9a7ac 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -77,7 +77,6 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
77 | container_of(bin_attr, struct acpi_table_attr, attr); | 77 | container_of(bin_attr, struct acpi_table_attr, attr); |
78 | struct acpi_table_header *table_header = NULL; | 78 | struct acpi_table_header *table_header = NULL; |
79 | acpi_status status; | 79 | acpi_status status; |
80 | ssize_t ret_count = count; | ||
81 | 80 | ||
82 | status = | 81 | status = |
83 | acpi_get_table(table_attr->name, table_attr->instance, | 82 | acpi_get_table(table_attr->name, table_attr->instance, |
@@ -85,18 +84,8 @@ static ssize_t acpi_table_show(struct kobject *kobj, | |||
85 | if (ACPI_FAILURE(status)) | 84 | if (ACPI_FAILURE(status)) |
86 | return -ENODEV; | 85 | return -ENODEV; |
87 | 86 | ||
88 | if (offset >= table_header->length) { | 87 | return memory_read_from_buffer(buf, count, &offset, |
89 | ret_count = 0; | 88 | table_header, table_header->length); |
90 | goto end; | ||
91 | } | ||
92 | |||
93 | if (offset + ret_count > table_header->length) | ||
94 | ret_count = table_header->length - offset; | ||
95 | |||
96 | memcpy(buf, ((char *)table_header) + offset, ret_count); | ||
97 | |||
98 | end: | ||
99 | return ret_count; | ||
100 | } | 89 | } |
101 | 90 | ||
102 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, | 91 | static void acpi_table_attr_init(struct acpi_table_attr *table_attr, |
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 402f93e1ff20..5336ce88f89f 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -123,24 +123,13 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | /* The table must be either an SSDT or a PSDT or an OEMx */ | 126 | /* |
127 | 127 | * Originally, we checked the table signature for "SSDT" or "PSDT" here. | |
128 | if (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)&& | 128 | * Next, we added support for OEMx tables, signature "OEM". |
129 | !ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)&& | 129 | * Valid tables were encountered with a null signature, so we've just |
130 | strncmp(table_desc->pointer->signature, "OEM", 3)) { | 130 | * given up on validating the signature, since it seems to be a waste |
131 | /* Check for a printable name */ | 131 | * of code. The original code was removed (05/2008). |
132 | if (acpi_ut_valid_acpi_name( | 132 | */ |
133 | *(u32 *) table_desc->pointer->signature)) { | ||
134 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
135 | "[%4.4s], must be SSDT or PSDT", | ||
136 | table_desc->pointer->signature)); | ||
137 | } else { | ||
138 | ACPI_ERROR((AE_INFO, "Table has invalid signature " | ||
139 | "(0x%8.8X), must be SSDT or PSDT", | ||
140 | *(u32 *) table_desc->pointer->signature)); | ||
141 | } | ||
142 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | ||
143 | } | ||
144 | 133 | ||
145 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 134 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
146 | 135 | ||
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index fb57b93c2495..0e319604d3e7 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -540,7 +540,7 @@ static acpi_status acpi_tb_load_namespace(void) | |||
540 | acpi_tb_print_table_header(0, table); | 540 | acpi_tb_print_table_header(0, table); |
541 | 541 | ||
542 | if (no_auto_ssdt == 0) { | 542 | if (no_auto_ssdt == 0) { |
543 | printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\""); | 543 | printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\"\n"); |
544 | } | 544 | } |
545 | } | 545 | } |
546 | 546 | ||
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 504385b1f211..84c795fb9b1e 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -364,10 +364,17 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | |||
364 | if (flag & ACPI_TRIPS_CRITICAL) { | 364 | if (flag & ACPI_TRIPS_CRITICAL) { |
365 | status = acpi_evaluate_integer(tz->device->handle, | 365 | status = acpi_evaluate_integer(tz->device->handle, |
366 | "_CRT", NULL, &tz->trips.critical.temperature); | 366 | "_CRT", NULL, &tz->trips.critical.temperature); |
367 | if (ACPI_FAILURE(status)) { | 367 | /* |
368 | * Treat freezing temperatures as invalid as well; some | ||
369 | * BIOSes return really low values and cause reboots at startup. | ||
370 | * Below zero (Celcius) values clearly aren't right for sure.. | ||
371 | * ... so lets discard those as invalid. | ||
372 | */ | ||
373 | if (ACPI_FAILURE(status) || | ||
374 | tz->trips.critical.temperature <= 2732) { | ||
368 | tz->trips.critical.flags.valid = 0; | 375 | tz->trips.critical.flags.valid = 0; |
369 | ACPI_EXCEPTION((AE_INFO, status, | 376 | ACPI_EXCEPTION((AE_INFO, status, |
370 | "No critical threshold")); | 377 | "No or invalid critical threshold")); |
371 | return -ENODEV; | 378 | return -ENODEV; |
372 | } else { | 379 | } else { |
373 | tz->trips.critical.flags.valid = 1; | 380 | tz->trips.critical.flags.valid = 1; |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index e4ba7192cd15..1f057b71db1a 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -1048,6 +1048,7 @@ acpi_ut_exception(char *module_name, | |||
1048 | va_start(args, format); | 1048 | va_start(args, format); |
1049 | acpi_os_vprintf(format, args); | 1049 | acpi_os_vprintf(format, args); |
1050 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | 1050 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); |
1051 | va_end(args); | ||
1051 | } | 1052 | } |
1052 | 1053 | ||
1053 | EXPORT_SYMBOL(acpi_ut_exception); | 1054 | EXPORT_SYMBOL(acpi_ut_exception); |
@@ -1063,7 +1064,6 @@ acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) | |||
1063 | acpi_os_vprintf(format, args); | 1064 | acpi_os_vprintf(format, args); |
1064 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); | 1065 | acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); |
1065 | va_end(args); | 1066 | va_end(args); |
1066 | va_end(args); | ||
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | void ACPI_INTERNAL_VAR_XFACE | 1069 | void ACPI_INTERNAL_VAR_XFACE |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 97f83fb2ee2e..966ab401e523 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -89,6 +89,7 @@ enum { | |||
89 | board_ahci_sb600 = 3, | 89 | board_ahci_sb600 = 3, |
90 | board_ahci_mv = 4, | 90 | board_ahci_mv = 4, |
91 | board_ahci_sb700 = 5, | 91 | board_ahci_sb700 = 5, |
92 | board_ahci_mcp65 = 6, | ||
92 | 93 | ||
93 | /* global controller registers */ | 94 | /* global controller registers */ |
94 | HOST_CAP = 0x00, /* host capabilities */ | 95 | HOST_CAP = 0x00, /* host capabilities */ |
@@ -190,6 +191,7 @@ enum { | |||
190 | AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */ | 191 | AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */ |
191 | AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */ | 192 | AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */ |
192 | AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ | 193 | AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ |
194 | AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */ | ||
193 | 195 | ||
194 | /* ap->flags bits */ | 196 | /* ap->flags bits */ |
195 | 197 | ||
@@ -253,6 +255,8 @@ static void ahci_pmp_attach(struct ata_port *ap); | |||
253 | static void ahci_pmp_detach(struct ata_port *ap); | 255 | static void ahci_pmp_detach(struct ata_port *ap); |
254 | static int ahci_softreset(struct ata_link *link, unsigned int *class, | 256 | static int ahci_softreset(struct ata_link *link, unsigned int *class, |
255 | unsigned long deadline); | 257 | unsigned long deadline); |
258 | static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class, | ||
259 | unsigned long deadline); | ||
256 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, | 260 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, |
257 | unsigned long deadline); | 261 | unsigned long deadline); |
258 | static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, | 262 | static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, |
@@ -329,6 +333,12 @@ static struct ata_port_operations ahci_p5wdh_ops = { | |||
329 | .hardreset = ahci_p5wdh_hardreset, | 333 | .hardreset = ahci_p5wdh_hardreset, |
330 | }; | 334 | }; |
331 | 335 | ||
336 | static struct ata_port_operations ahci_sb600_ops = { | ||
337 | .inherits = &ahci_ops, | ||
338 | .softreset = ahci_sb600_softreset, | ||
339 | .pmp_softreset = ahci_sb600_softreset, | ||
340 | }; | ||
341 | |||
332 | #define AHCI_HFLAGS(flags) .private_data = (void *)(flags) | 342 | #define AHCI_HFLAGS(flags) .private_data = (void *)(flags) |
333 | 343 | ||
334 | static const struct ata_port_info ahci_port_info[] = { | 344 | static const struct ata_port_info ahci_port_info[] = { |
@@ -359,11 +369,11 @@ static const struct ata_port_info ahci_port_info[] = { | |||
359 | { | 369 | { |
360 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | | 370 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | |
361 | AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | | 371 | AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | |
362 | AHCI_HFLAG_SECT255 | AHCI_HFLAG_NO_PMP), | 372 | AHCI_HFLAG_SECT255), |
363 | .flags = AHCI_FLAG_COMMON, | 373 | .flags = AHCI_FLAG_COMMON, |
364 | .pio_mask = 0x1f, /* pio0-4 */ | 374 | .pio_mask = 0x1f, /* pio0-4 */ |
365 | .udma_mask = ATA_UDMA6, | 375 | .udma_mask = ATA_UDMA6, |
366 | .port_ops = &ahci_ops, | 376 | .port_ops = &ahci_sb600_ops, |
367 | }, | 377 | }, |
368 | /* board_ahci_mv */ | 378 | /* board_ahci_mv */ |
369 | { | 379 | { |
@@ -377,8 +387,15 @@ static const struct ata_port_info ahci_port_info[] = { | |||
377 | }, | 387 | }, |
378 | /* board_ahci_sb700 */ | 388 | /* board_ahci_sb700 */ |
379 | { | 389 | { |
380 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | | 390 | AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), |
381 | AHCI_HFLAG_NO_PMP), | 391 | .flags = AHCI_FLAG_COMMON, |
392 | .pio_mask = 0x1f, /* pio0-4 */ | ||
393 | .udma_mask = ATA_UDMA6, | ||
394 | .port_ops = &ahci_sb600_ops, | ||
395 | }, | ||
396 | /* board_ahci_mcp65 */ | ||
397 | { | ||
398 | AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ), | ||
382 | .flags = AHCI_FLAG_COMMON, | 399 | .flags = AHCI_FLAG_COMMON, |
383 | .pio_mask = 0x1f, /* pio0-4 */ | 400 | .pio_mask = 0x1f, /* pio0-4 */ |
384 | .udma_mask = ATA_UDMA6, | 401 | .udma_mask = ATA_UDMA6, |
@@ -438,14 +455,14 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
438 | { PCI_VDEVICE(VIA, 0x6287), board_ahci_vt8251 }, /* VIA VT8251 */ | 455 | { PCI_VDEVICE(VIA, 0x6287), board_ahci_vt8251 }, /* VIA VT8251 */ |
439 | 456 | ||
440 | /* NVIDIA */ | 457 | /* NVIDIA */ |
441 | { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci }, /* MCP65 */ | 458 | { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci_mcp65 }, /* MCP65 */ |
442 | { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci }, /* MCP65 */ | 459 | { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci_mcp65 }, /* MCP65 */ |
443 | { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci }, /* MCP65 */ | 460 | { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci_mcp65 }, /* MCP65 */ |
444 | { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci }, /* MCP65 */ | 461 | { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci_mcp65 }, /* MCP65 */ |
445 | { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci }, /* MCP65 */ | 462 | { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci_mcp65 }, /* MCP65 */ |
446 | { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci }, /* MCP65 */ | 463 | { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci_mcp65 }, /* MCP65 */ |
447 | { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci }, /* MCP65 */ | 464 | { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci_mcp65 }, /* MCP65 */ |
448 | { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci }, /* MCP65 */ | 465 | { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci_mcp65 }, /* MCP65 */ |
449 | { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */ | 466 | { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */ |
450 | { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */ | 467 | { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */ |
451 | { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */ | 468 | { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */ |
@@ -502,10 +519,10 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
502 | { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ | 519 | { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ |
503 | { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ | 520 | { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ |
504 | { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ | 521 | { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ |
505 | { PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci }, /* MCP7B */ | 522 | { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci }, /* MCP7B */ |
506 | { PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci }, /* MCP7B */ | 523 | { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci }, /* MCP7B */ |
507 | { PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci }, /* MCP7B */ | 524 | { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci }, /* MCP7B */ |
508 | { PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci }, /* MCP7B */ | 525 | { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */ |
509 | 526 | ||
510 | /* SiS */ | 527 | /* SiS */ |
511 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ | 528 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ |
@@ -624,6 +641,12 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
624 | cap &= ~HOST_CAP_NCQ; | 641 | cap &= ~HOST_CAP_NCQ; |
625 | } | 642 | } |
626 | 643 | ||
644 | if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) { | ||
645 | dev_printk(KERN_INFO, &pdev->dev, | ||
646 | "controller can do NCQ, turning on CAP_NCQ\n"); | ||
647 | cap |= HOST_CAP_NCQ; | ||
648 | } | ||
649 | |||
627 | if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { | 650 | if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { |
628 | dev_printk(KERN_INFO, &pdev->dev, | 651 | dev_printk(KERN_INFO, &pdev->dev, |
629 | "controller can't do PMP, turning off CAP_PMP\n"); | 652 | "controller can't do PMP, turning off CAP_PMP\n"); |
@@ -1262,19 +1285,11 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, | |||
1262 | return 0; | 1285 | return 0; |
1263 | } | 1286 | } |
1264 | 1287 | ||
1265 | static int ahci_check_ready(struct ata_link *link) | 1288 | static int ahci_do_softreset(struct ata_link *link, unsigned int *class, |
1266 | { | 1289 | int pmp, unsigned long deadline, |
1267 | void __iomem *port_mmio = ahci_port_base(link->ap); | 1290 | int (*check_ready)(struct ata_link *link)) |
1268 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; | ||
1269 | |||
1270 | return ata_check_ready(status); | ||
1271 | } | ||
1272 | |||
1273 | static int ahci_softreset(struct ata_link *link, unsigned int *class, | ||
1274 | unsigned long deadline) | ||
1275 | { | 1291 | { |
1276 | struct ata_port *ap = link->ap; | 1292 | struct ata_port *ap = link->ap; |
1277 | int pmp = sata_srst_pmp(link); | ||
1278 | const char *reason = NULL; | 1293 | const char *reason = NULL; |
1279 | unsigned long now, msecs; | 1294 | unsigned long now, msecs; |
1280 | struct ata_taskfile tf; | 1295 | struct ata_taskfile tf; |
@@ -1312,7 +1327,7 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class, | |||
1312 | ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0); | 1327 | ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0); |
1313 | 1328 | ||
1314 | /* wait for link to become ready */ | 1329 | /* wait for link to become ready */ |
1315 | rc = ata_wait_after_reset(link, deadline, ahci_check_ready); | 1330 | rc = ata_wait_after_reset(link, deadline, check_ready); |
1316 | /* link occupied, -ENODEV too is an error */ | 1331 | /* link occupied, -ENODEV too is an error */ |
1317 | if (rc) { | 1332 | if (rc) { |
1318 | reason = "device not ready"; | 1333 | reason = "device not ready"; |
@@ -1328,6 +1343,72 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class, | |||
1328 | return rc; | 1343 | return rc; |
1329 | } | 1344 | } |
1330 | 1345 | ||
1346 | static int ahci_check_ready(struct ata_link *link) | ||
1347 | { | ||
1348 | void __iomem *port_mmio = ahci_port_base(link->ap); | ||
1349 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; | ||
1350 | |||
1351 | return ata_check_ready(status); | ||
1352 | } | ||
1353 | |||
1354 | static int ahci_softreset(struct ata_link *link, unsigned int *class, | ||
1355 | unsigned long deadline) | ||
1356 | { | ||
1357 | int pmp = sata_srst_pmp(link); | ||
1358 | |||
1359 | DPRINTK("ENTER\n"); | ||
1360 | |||
1361 | return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready); | ||
1362 | } | ||
1363 | |||
1364 | static int ahci_sb600_check_ready(struct ata_link *link) | ||
1365 | { | ||
1366 | void __iomem *port_mmio = ahci_port_base(link->ap); | ||
1367 | u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF; | ||
1368 | u32 irq_status = readl(port_mmio + PORT_IRQ_STAT); | ||
1369 | |||
1370 | /* | ||
1371 | * There is no need to check TFDATA if BAD PMP is found due to HW bug, | ||
1372 | * which can save timeout delay. | ||
1373 | */ | ||
1374 | if (irq_status & PORT_IRQ_BAD_PMP) | ||
1375 | return -EIO; | ||
1376 | |||
1377 | return ata_check_ready(status); | ||
1378 | } | ||
1379 | |||
1380 | static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class, | ||
1381 | unsigned long deadline) | ||
1382 | { | ||
1383 | struct ata_port *ap = link->ap; | ||
1384 | void __iomem *port_mmio = ahci_port_base(ap); | ||
1385 | int pmp = sata_srst_pmp(link); | ||
1386 | int rc; | ||
1387 | u32 irq_sts; | ||
1388 | |||
1389 | DPRINTK("ENTER\n"); | ||
1390 | |||
1391 | rc = ahci_do_softreset(link, class, pmp, deadline, | ||
1392 | ahci_sb600_check_ready); | ||
1393 | |||
1394 | /* | ||
1395 | * Soft reset fails on some ATI chips with IPMS set when PMP | ||
1396 | * is enabled but SATA HDD/ODD is connected to SATA port, | ||
1397 | * do soft reset again to port 0. | ||
1398 | */ | ||
1399 | if (rc == -EIO) { | ||
1400 | irq_sts = readl(port_mmio + PORT_IRQ_STAT); | ||
1401 | if (irq_sts & PORT_IRQ_BAD_PMP) { | ||
1402 | ata_link_printk(link, KERN_WARNING, | ||
1403 | "failed due to HW bug, retry pmp=0\n"); | ||
1404 | rc = ahci_do_softreset(link, class, 0, deadline, | ||
1405 | ahci_check_ready); | ||
1406 | } | ||
1407 | } | ||
1408 | |||
1409 | return rc; | ||
1410 | } | ||
1411 | |||
1331 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, | 1412 | static int ahci_hardreset(struct ata_link *link, unsigned int *class, |
1332 | unsigned long deadline) | 1413 | unsigned long deadline) |
1333 | { | 1414 | { |
@@ -2118,7 +2199,8 @@ static void ahci_p5wdh_workaround(struct ata_host *host) | |||
2118 | static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 2199 | static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
2119 | { | 2200 | { |
2120 | static int printed_version; | 2201 | static int printed_version; |
2121 | struct ata_port_info pi = ahci_port_info[ent->driver_data]; | 2202 | unsigned int board_id = ent->driver_data; |
2203 | struct ata_port_info pi = ahci_port_info[board_id]; | ||
2122 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 2204 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
2123 | struct device *dev = &pdev->dev; | 2205 | struct device *dev = &pdev->dev; |
2124 | struct ahci_host_priv *hpriv; | 2206 | struct ahci_host_priv *hpriv; |
@@ -2167,6 +2249,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2167 | return -ENOMEM; | 2249 | return -ENOMEM; |
2168 | hpriv->flags |= (unsigned long)pi.private_data; | 2250 | hpriv->flags |= (unsigned long)pi.private_data; |
2169 | 2251 | ||
2252 | /* MCP65 revision A1 and A2 can't do MSI */ | ||
2253 | if (board_id == board_ahci_mcp65 && | ||
2254 | (pdev->revision == 0xa1 || pdev->revision == 0xa2)) | ||
2255 | hpriv->flags |= AHCI_HFLAG_NO_MSI; | ||
2256 | |||
2170 | if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev)) | 2257 | if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev)) |
2171 | pci_intx(pdev, 1); | 2258 | pci_intx(pdev, 1); |
2172 | 2259 | ||
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index a9027b8fbdd5..81b7ae376951 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -247,10 +247,11 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
247 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | 247 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, |
248 | /* SATA Controller 2 IDE (ICH8) */ | 248 | /* SATA Controller 2 IDE (ICH8) */ |
249 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 249 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
250 | /* Mobile SATA Controller IDE (ICH8M) */ | ||
251 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | ||
252 | /* Mobile SATA Controller IDE (ICH8M), Apple */ | 250 | /* Mobile SATA Controller IDE (ICH8M), Apple */ |
253 | { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, | 251 | { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, |
252 | { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata }, | ||
253 | /* Mobile SATA Controller IDE (ICH8M) */ | ||
254 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | ||
254 | /* SATA Controller IDE (ICH9) */ | 255 | /* SATA Controller IDE (ICH9) */ |
255 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | 256 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, |
256 | /* SATA Controller IDE (ICH9) */ | 257 | /* SATA Controller IDE (ICH9) */ |
@@ -526,7 +527,7 @@ static struct ata_port_info piix_port_info[] = { | |||
526 | 527 | ||
527 | [ich8m_apple_sata] = | 528 | [ich8m_apple_sata] = |
528 | { | 529 | { |
529 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, | 530 | .flags = PIIX_SATA_FLAGS, |
530 | .pio_mask = 0x1f, /* pio0-4 */ | 531 | .pio_mask = 0x1f, /* pio0-4 */ |
531 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 532 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
532 | .udma_mask = ATA_UDMA6, | 533 | .udma_mask = ATA_UDMA6, |
@@ -573,6 +574,8 @@ static const struct ich_laptop ich_laptop[] = { | |||
573 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ | 574 | { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ |
574 | { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ | 575 | { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ |
575 | { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ | 576 | { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ |
577 | { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ | ||
578 | { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ | ||
576 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ | 579 | { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ |
577 | /* end marker */ | 580 | /* end marker */ |
578 | { 0, } | 581 | { 0, } |
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 70b77e0899a8..3ff8b14420d9 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -118,19 +118,82 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap) | |||
118 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; | 118 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; |
119 | } | 119 | } |
120 | 120 | ||
121 | static void ata_acpi_eject_device(acpi_handle handle) | ||
122 | { | ||
123 | struct acpi_object_list arg_list; | ||
124 | union acpi_object arg; | ||
125 | |||
126 | arg_list.count = 1; | ||
127 | arg_list.pointer = &arg; | ||
128 | arg.type = ACPI_TYPE_INTEGER; | ||
129 | arg.integer.value = 1; | ||
130 | |||
131 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_EJ0", | ||
132 | &arg_list, NULL))) | ||
133 | printk(KERN_ERR "Failed to evaluate _EJ0!\n"); | ||
134 | } | ||
135 | |||
136 | /* @ap and @dev are the same as ata_acpi_handle_hotplug() */ | ||
137 | static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev) | ||
138 | { | ||
139 | if (dev) | ||
140 | dev->flags |= ATA_DFLAG_DETACH; | ||
141 | else { | ||
142 | struct ata_link *tlink; | ||
143 | struct ata_device *tdev; | ||
144 | |||
145 | ata_port_for_each_link(tlink, ap) | ||
146 | ata_link_for_each_dev(tdev, tlink) | ||
147 | tdev->flags |= ATA_DFLAG_DETACH; | ||
148 | } | ||
149 | |||
150 | ata_port_schedule_eh(ap); | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * ata_acpi_handle_hotplug - ACPI event handler backend | ||
155 | * @ap: ATA port ACPI event occurred | ||
156 | * @dev: ATA device ACPI event occurred (can be NULL) | ||
157 | * @event: ACPI event which occurred | ||
158 | * @is_dock_event: boolean indicating whether the event was a dock one | ||
159 | * | ||
160 | * All ACPI bay / device realted events end up in this function. If | ||
161 | * the event is port-wide @dev is NULL. If the event is specific to a | ||
162 | * device, @dev points to it. | ||
163 | * | ||
164 | * Hotplug (as opposed to unplug) notification is always handled as | ||
165 | * port-wide while unplug only kills the target device on device-wide | ||
166 | * event. | ||
167 | * | ||
168 | * LOCKING: | ||
169 | * ACPI notify handler context. May sleep. | ||
170 | */ | ||
121 | static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, | 171 | static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, |
122 | u32 event) | 172 | u32 event, int is_dock_event) |
123 | { | 173 | { |
124 | char event_string[12]; | 174 | char event_string[12]; |
125 | char *envp[] = { event_string, NULL }; | 175 | char *envp[] = { event_string, NULL }; |
126 | struct ata_eh_info *ehi; | 176 | struct ata_eh_info *ehi = &ap->link.eh_info; |
127 | struct kobject *kobj = NULL; | 177 | struct kobject *kobj = NULL; |
128 | int wait = 0; | 178 | int wait = 0; |
129 | unsigned long flags; | 179 | unsigned long flags; |
180 | acpi_handle handle, tmphandle; | ||
181 | unsigned long sta; | ||
182 | acpi_status status; | ||
183 | |||
184 | if (dev) { | ||
185 | if (dev->sdev) | ||
186 | kobj = &dev->sdev->sdev_gendev.kobj; | ||
187 | handle = dev->acpi_handle; | ||
188 | } else { | ||
189 | kobj = &ap->dev->kobj; | ||
190 | handle = ap->acpi_handle; | ||
191 | } | ||
130 | 192 | ||
131 | if (!ap) | 193 | status = acpi_get_handle(handle, "_EJ0", &tmphandle); |
132 | ap = dev->link->ap; | 194 | if (ACPI_FAILURE(status)) |
133 | ehi = &ap->link.eh_info; | 195 | /* This device does not support hotplug */ |
196 | return; | ||
134 | 197 | ||
135 | spin_lock_irqsave(ap->lock, flags); | 198 | spin_lock_irqsave(ap->lock, flags); |
136 | 199 | ||
@@ -138,57 +201,80 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, | |||
138 | case ACPI_NOTIFY_BUS_CHECK: | 201 | case ACPI_NOTIFY_BUS_CHECK: |
139 | case ACPI_NOTIFY_DEVICE_CHECK: | 202 | case ACPI_NOTIFY_DEVICE_CHECK: |
140 | ata_ehi_push_desc(ehi, "ACPI event"); | 203 | ata_ehi_push_desc(ehi, "ACPI event"); |
141 | ata_ehi_hotplugged(ehi); | ||
142 | ata_port_freeze(ap); | ||
143 | break; | ||
144 | 204 | ||
205 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | ||
206 | if (ACPI_FAILURE(status)) { | ||
207 | ata_port_printk(ap, KERN_ERR, | ||
208 | "acpi: failed to determine bay status (0x%x)\n", | ||
209 | status); | ||
210 | break; | ||
211 | } | ||
212 | |||
213 | if (sta) { | ||
214 | ata_ehi_hotplugged(ehi); | ||
215 | ata_port_freeze(ap); | ||
216 | } else { | ||
217 | /* The device has gone - unplug it */ | ||
218 | ata_acpi_detach_device(ap, dev); | ||
219 | wait = 1; | ||
220 | } | ||
221 | break; | ||
145 | case ACPI_NOTIFY_EJECT_REQUEST: | 222 | case ACPI_NOTIFY_EJECT_REQUEST: |
146 | ata_ehi_push_desc(ehi, "ACPI event"); | 223 | ata_ehi_push_desc(ehi, "ACPI event"); |
147 | if (dev) | ||
148 | dev->flags |= ATA_DFLAG_DETACH; | ||
149 | else { | ||
150 | struct ata_link *tlink; | ||
151 | struct ata_device *tdev; | ||
152 | |||
153 | ata_port_for_each_link(tlink, ap) | ||
154 | ata_link_for_each_dev(tdev, tlink) | ||
155 | tdev->flags |= ATA_DFLAG_DETACH; | ||
156 | } | ||
157 | 224 | ||
158 | ata_port_schedule_eh(ap); | 225 | if (!is_dock_event) |
226 | break; | ||
227 | |||
228 | /* undock event - immediate unplug */ | ||
229 | ata_acpi_detach_device(ap, dev); | ||
159 | wait = 1; | 230 | wait = 1; |
160 | break; | 231 | break; |
161 | } | 232 | } |
162 | 233 | ||
163 | if (dev) { | 234 | /* make sure kobj doesn't go away while ap->lock is released */ |
164 | if (dev->sdev) | 235 | kobject_get(kobj); |
165 | kobj = &dev->sdev->sdev_gendev.kobj; | 236 | |
166 | } else | 237 | spin_unlock_irqrestore(ap->lock, flags); |
167 | kobj = &ap->dev->kobj; | 238 | |
239 | if (wait) { | ||
240 | ata_port_wait_eh(ap); | ||
241 | ata_acpi_eject_device(handle); | ||
242 | } | ||
168 | 243 | ||
169 | if (kobj) { | 244 | if (kobj && !is_dock_event) { |
170 | sprintf(event_string, "BAY_EVENT=%d", event); | 245 | sprintf(event_string, "BAY_EVENT=%d", event); |
171 | kobject_uevent_env(kobj, KOBJ_CHANGE, envp); | 246 | kobject_uevent_env(kobj, KOBJ_CHANGE, envp); |
172 | } | 247 | } |
173 | 248 | ||
174 | spin_unlock_irqrestore(ap->lock, flags); | 249 | kobject_put(kobj); |
250 | } | ||
175 | 251 | ||
176 | if (wait) | 252 | static void ata_acpi_dev_notify_dock(acpi_handle handle, u32 event, void *data) |
177 | ata_port_wait_eh(ap); | 253 | { |
254 | struct ata_device *dev = data; | ||
255 | |||
256 | ata_acpi_handle_hotplug(dev->link->ap, dev, event, 1); | ||
257 | } | ||
258 | |||
259 | static void ata_acpi_ap_notify_dock(acpi_handle handle, u32 event, void *data) | ||
260 | { | ||
261 | struct ata_port *ap = data; | ||
262 | |||
263 | ata_acpi_handle_hotplug(ap, NULL, event, 1); | ||
178 | } | 264 | } |
179 | 265 | ||
180 | static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data) | 266 | static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data) |
181 | { | 267 | { |
182 | struct ata_device *dev = data; | 268 | struct ata_device *dev = data; |
183 | 269 | ||
184 | ata_acpi_handle_hotplug(NULL, dev, event); | 270 | ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0); |
185 | } | 271 | } |
186 | 272 | ||
187 | static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data) | 273 | static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data) |
188 | { | 274 | { |
189 | struct ata_port *ap = data; | 275 | struct ata_port *ap = data; |
190 | 276 | ||
191 | ata_acpi_handle_hotplug(ap, NULL, event); | 277 | ata_acpi_handle_hotplug(ap, NULL, event, 0); |
192 | } | 278 | } |
193 | 279 | ||
194 | /** | 280 | /** |
@@ -229,7 +315,7 @@ void ata_acpi_associate(struct ata_host *host) | |||
229 | ata_acpi_ap_notify, ap); | 315 | ata_acpi_ap_notify, ap); |
230 | /* we might be on a docking station */ | 316 | /* we might be on a docking station */ |
231 | register_hotplug_dock_device(ap->acpi_handle, | 317 | register_hotplug_dock_device(ap->acpi_handle, |
232 | ata_acpi_ap_notify, ap); | 318 | ata_acpi_ap_notify_dock, ap); |
233 | } | 319 | } |
234 | 320 | ||
235 | for (j = 0; j < ata_link_max_devices(&ap->link); j++) { | 321 | for (j = 0; j < ata_link_max_devices(&ap->link); j++) { |
@@ -241,7 +327,7 @@ void ata_acpi_associate(struct ata_host *host) | |||
241 | ata_acpi_dev_notify, dev); | 327 | ata_acpi_dev_notify, dev); |
242 | /* we might be on a docking station */ | 328 | /* we might be on a docking station */ |
243 | register_hotplug_dock_device(dev->acpi_handle, | 329 | register_hotplug_dock_device(dev->acpi_handle, |
244 | ata_acpi_dev_notify, dev); | 330 | ata_acpi_dev_notify_dock, dev); |
245 | } | 331 | } |
246 | } | 332 | } |
247 | } | 333 | } |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 927b692d723c..cc816ca623d3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2126,6 +2126,13 @@ int ata_dev_configure(struct ata_device *dev) | |||
2126 | dev->horkage |= ata_dev_blacklisted(dev); | 2126 | dev->horkage |= ata_dev_blacklisted(dev); |
2127 | ata_force_horkage(dev); | 2127 | ata_force_horkage(dev); |
2128 | 2128 | ||
2129 | if (dev->horkage & ATA_HORKAGE_DISABLE) { | ||
2130 | ata_dev_printk(dev, KERN_INFO, | ||
2131 | "unsupported device, disabling\n"); | ||
2132 | ata_dev_disable(dev); | ||
2133 | return 0; | ||
2134 | } | ||
2135 | |||
2129 | /* let ACPI work its magic */ | 2136 | /* let ACPI work its magic */ |
2130 | rc = ata_acpi_on_devcfg(dev); | 2137 | rc = ata_acpi_on_devcfg(dev); |
2131 | if (rc) | 2138 | if (rc) |
@@ -3490,22 +3497,11 @@ int sata_link_resume(struct ata_link *link, const unsigned long *params, | |||
3490 | if ((rc = sata_link_debounce(link, params, deadline))) | 3497 | if ((rc = sata_link_debounce(link, params, deadline))) |
3491 | return rc; | 3498 | return rc; |
3492 | 3499 | ||
3493 | /* Clear SError. PMP and some host PHYs require this to | 3500 | /* clear SError, some PHYs require this even for SRST to work */ |
3494 | * operate and clearing should be done before checking PHY | ||
3495 | * online status to avoid race condition (hotplugging between | ||
3496 | * link resume and status check). | ||
3497 | */ | ||
3498 | if (!(rc = sata_scr_read(link, SCR_ERROR, &serror))) | 3501 | if (!(rc = sata_scr_read(link, SCR_ERROR, &serror))) |
3499 | rc = sata_scr_write(link, SCR_ERROR, serror); | 3502 | rc = sata_scr_write(link, SCR_ERROR, serror); |
3500 | if (rc == 0 || rc == -EINVAL) { | ||
3501 | unsigned long flags; | ||
3502 | 3503 | ||
3503 | spin_lock_irqsave(link->ap->lock, flags); | 3504 | return rc != -EINVAL ? rc : 0; |
3504 | link->eh_info.serror = 0; | ||
3505 | spin_unlock_irqrestore(link->ap->lock, flags); | ||
3506 | rc = 0; | ||
3507 | } | ||
3508 | return rc; | ||
3509 | } | 3505 | } |
3510 | 3506 | ||
3511 | /** | 3507 | /** |
@@ -3653,9 +3649,13 @@ int sata_link_hardreset(struct ata_link *link, const unsigned long *timing, | |||
3653 | if (check_ready) | 3649 | if (check_ready) |
3654 | rc = ata_wait_ready(link, deadline, check_ready); | 3650 | rc = ata_wait_ready(link, deadline, check_ready); |
3655 | out: | 3651 | out: |
3656 | if (rc && rc != -EAGAIN) | 3652 | if (rc && rc != -EAGAIN) { |
3653 | /* online is set iff link is online && reset succeeded */ | ||
3654 | if (online) | ||
3655 | *online = false; | ||
3657 | ata_link_printk(link, KERN_ERR, | 3656 | ata_link_printk(link, KERN_ERR, |
3658 | "COMRESET failed (errno=%d)\n", rc); | 3657 | "COMRESET failed (errno=%d)\n", rc); |
3658 | } | ||
3659 | DPRINTK("EXIT, rc=%d\n", rc); | 3659 | DPRINTK("EXIT, rc=%d\n", rc); |
3660 | return rc; | 3660 | return rc; |
3661 | } | 3661 | } |
@@ -3700,8 +3700,14 @@ int sata_std_hardreset(struct ata_link *link, unsigned int *class, | |||
3700 | */ | 3700 | */ |
3701 | void ata_std_postreset(struct ata_link *link, unsigned int *classes) | 3701 | void ata_std_postreset(struct ata_link *link, unsigned int *classes) |
3702 | { | 3702 | { |
3703 | u32 serror; | ||
3704 | |||
3703 | DPRINTK("ENTER\n"); | 3705 | DPRINTK("ENTER\n"); |
3704 | 3706 | ||
3707 | /* reset complete, clear SError */ | ||
3708 | if (!sata_scr_read(link, SCR_ERROR, &serror)) | ||
3709 | sata_scr_write(link, SCR_ERROR, serror); | ||
3710 | |||
3705 | /* print link status */ | 3711 | /* print link status */ |
3706 | sata_print_link_status(link); | 3712 | sata_print_link_status(link); |
3707 | 3713 | ||
@@ -3894,8 +3900,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
3894 | { "SAMSUNG CD-ROM SN-124", "N001", ATA_HORKAGE_NODMA }, | 3900 | { "SAMSUNG CD-ROM SN-124", "N001", ATA_HORKAGE_NODMA }, |
3895 | { "Seagate STT20000A", NULL, ATA_HORKAGE_NODMA }, | 3901 | { "Seagate STT20000A", NULL, ATA_HORKAGE_NODMA }, |
3896 | /* Odd clown on sil3726/4726 PMPs */ | 3902 | /* Odd clown on sil3726/4726 PMPs */ |
3897 | { "Config Disk", NULL, ATA_HORKAGE_NODMA | | 3903 | { "Config Disk", NULL, ATA_HORKAGE_DISABLE }, |
3898 | ATA_HORKAGE_SKIP_PM }, | ||
3899 | 3904 | ||
3900 | /* Weird ATAPI devices */ | 3905 | /* Weird ATAPI devices */ |
3901 | { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, | 3906 | { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, |
@@ -5398,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res) | |||
5398 | */ | 5403 | */ |
5399 | static void ata_finalize_port_ops(struct ata_port_operations *ops) | 5404 | static void ata_finalize_port_ops(struct ata_port_operations *ops) |
5400 | { | 5405 | { |
5401 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | 5406 | static DEFINE_SPINLOCK(lock); |
5402 | const struct ata_port_operations *cur; | 5407 | const struct ata_port_operations *cur; |
5403 | void **begin = (void **)ops; | 5408 | void **begin = (void **)ops; |
5404 | void **end = (void **)&ops->inherits; | 5409 | void **end = (void **)&ops->inherits; |
@@ -5616,7 +5621,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) | |||
5616 | spin_lock_irqsave(ap->lock, flags); | 5621 | spin_lock_irqsave(ap->lock, flags); |
5617 | 5622 | ||
5618 | ehi->probe_mask |= ATA_ALL_DEVICES; | 5623 | ehi->probe_mask |= ATA_ALL_DEVICES; |
5619 | ehi->action |= ATA_EH_RESET; | 5624 | ehi->action |= ATA_EH_RESET | ATA_EH_LPM; |
5620 | ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; | 5625 | ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; |
5621 | 5626 | ||
5622 | ap->pflags &= ~ATA_PFLAG_INITIALIZING; | 5627 | ap->pflags &= ~ATA_PFLAG_INITIALIZING; |
@@ -5649,7 +5654,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) | |||
5649 | struct ata_port *ap = host->ports[i]; | 5654 | struct ata_port *ap = host->ports[i]; |
5650 | 5655 | ||
5651 | ata_scsi_scan_host(ap, 1); | 5656 | ata_scsi_scan_host(ap, 1); |
5652 | ata_lpm_schedule(ap, ap->pm_policy); | ||
5653 | } | 5657 | } |
5654 | 5658 | ||
5655 | return 0; | 5659 | return 0; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 62e033146bed..7894d83ea1eb 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1308,12 +1308,7 @@ static void ata_eh_analyze_serror(struct ata_link *link) | |||
1308 | unsigned int err_mask = 0, action = 0; | 1308 | unsigned int err_mask = 0, action = 0; |
1309 | u32 hotplug_mask; | 1309 | u32 hotplug_mask; |
1310 | 1310 | ||
1311 | if (serror & SERR_PERSISTENT) { | 1311 | if (serror & (SERR_PERSISTENT | SERR_DATA)) { |
1312 | err_mask |= AC_ERR_ATA_BUS; | ||
1313 | action |= ATA_EH_RESET; | ||
1314 | } | ||
1315 | if (serror & | ||
1316 | (SERR_DATA_RECOVERED | SERR_COMM_RECOVERED | SERR_DATA)) { | ||
1317 | err_mask |= AC_ERR_ATA_BUS; | 1312 | err_mask |= AC_ERR_ATA_BUS; |
1318 | action |= ATA_EH_RESET; | 1313 | action |= ATA_EH_RESET; |
1319 | } | 1314 | } |
@@ -2047,19 +2042,11 @@ static int ata_do_reset(struct ata_link *link, ata_reset_fn_t reset, | |||
2047 | unsigned int *classes, unsigned long deadline) | 2042 | unsigned int *classes, unsigned long deadline) |
2048 | { | 2043 | { |
2049 | struct ata_device *dev; | 2044 | struct ata_device *dev; |
2050 | int rc; | ||
2051 | 2045 | ||
2052 | ata_link_for_each_dev(dev, link) | 2046 | ata_link_for_each_dev(dev, link) |
2053 | classes[dev->devno] = ATA_DEV_UNKNOWN; | 2047 | classes[dev->devno] = ATA_DEV_UNKNOWN; |
2054 | 2048 | ||
2055 | rc = reset(link, classes, deadline); | 2049 | return reset(link, classes, deadline); |
2056 | |||
2057 | /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */ | ||
2058 | ata_link_for_each_dev(dev, link) | ||
2059 | if (classes[dev->devno] == ATA_DEV_UNKNOWN) | ||
2060 | classes[dev->devno] = ATA_DEV_NONE; | ||
2061 | |||
2062 | return rc; | ||
2063 | } | 2050 | } |
2064 | 2051 | ||
2065 | static int ata_eh_followup_srst_needed(struct ata_link *link, | 2052 | static int ata_eh_followup_srst_needed(struct ata_link *link, |
@@ -2096,9 +2083,11 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2096 | ata_reset_fn_t reset; | 2083 | ata_reset_fn_t reset; |
2097 | unsigned long flags; | 2084 | unsigned long flags; |
2098 | u32 sstatus; | 2085 | u32 sstatus; |
2099 | int rc; | 2086 | int nr_known, rc; |
2100 | 2087 | ||
2101 | /* about to reset */ | 2088 | /* |
2089 | * Prepare to reset | ||
2090 | */ | ||
2102 | spin_lock_irqsave(ap->lock, flags); | 2091 | spin_lock_irqsave(ap->lock, flags); |
2103 | ap->pflags |= ATA_PFLAG_RESETTING; | 2092 | ap->pflags |= ATA_PFLAG_RESETTING; |
2104 | spin_unlock_irqrestore(ap->lock, flags); | 2093 | spin_unlock_irqrestore(ap->lock, flags); |
@@ -2124,16 +2113,8 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2124 | ap->ops->set_piomode(ap, dev); | 2113 | ap->ops->set_piomode(ap, dev); |
2125 | } | 2114 | } |
2126 | 2115 | ||
2127 | if (!softreset && !hardreset) { | ||
2128 | if (verbose) | ||
2129 | ata_link_printk(link, KERN_INFO, "no reset method " | ||
2130 | "available, skipping reset\n"); | ||
2131 | if (!(lflags & ATA_LFLAG_ASSUME_CLASS)) | ||
2132 | lflags |= ATA_LFLAG_ASSUME_ATA; | ||
2133 | goto done; | ||
2134 | } | ||
2135 | |||
2136 | /* prefer hardreset */ | 2116 | /* prefer hardreset */ |
2117 | reset = NULL; | ||
2137 | ehc->i.action &= ~ATA_EH_RESET; | 2118 | ehc->i.action &= ~ATA_EH_RESET; |
2138 | if (hardreset) { | 2119 | if (hardreset) { |
2139 | reset = hardreset; | 2120 | reset = hardreset; |
@@ -2141,11 +2122,6 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2141 | } else if (softreset) { | 2122 | } else if (softreset) { |
2142 | reset = softreset; | 2123 | reset = softreset; |
2143 | ehc->i.action = ATA_EH_SOFTRESET; | 2124 | ehc->i.action = ATA_EH_SOFTRESET; |
2144 | } else { | ||
2145 | ata_link_printk(link, KERN_ERR, "BUG: no reset method, " | ||
2146 | "please report to linux-ide@vger.kernel.org\n"); | ||
2147 | dump_stack(); | ||
2148 | return -EINVAL; | ||
2149 | } | 2125 | } |
2150 | 2126 | ||
2151 | if (prereset) { | 2127 | if (prereset) { |
@@ -2165,55 +2141,71 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2165 | "prereset failed (errno=%d)\n", rc); | 2141 | "prereset failed (errno=%d)\n", rc); |
2166 | goto out; | 2142 | goto out; |
2167 | } | 2143 | } |
2168 | } | ||
2169 | 2144 | ||
2170 | /* prereset() might have cleared ATA_EH_RESET */ | 2145 | /* prereset() might have cleared ATA_EH_RESET. If so, |
2171 | if (!(ehc->i.action & ATA_EH_RESET)) { | 2146 | * bang classes and return. |
2172 | /* prereset told us not to reset, bang classes and return */ | 2147 | */ |
2173 | ata_link_for_each_dev(dev, link) | 2148 | if (reset && !(ehc->i.action & ATA_EH_RESET)) { |
2174 | classes[dev->devno] = ATA_DEV_NONE; | 2149 | ata_link_for_each_dev(dev, link) |
2175 | rc = 0; | 2150 | classes[dev->devno] = ATA_DEV_NONE; |
2176 | goto out; | 2151 | rc = 0; |
2152 | goto out; | ||
2153 | } | ||
2177 | } | 2154 | } |
2178 | 2155 | ||
2179 | retry: | 2156 | retry: |
2157 | /* | ||
2158 | * Perform reset | ||
2159 | */ | ||
2160 | if (ata_is_host_link(link)) | ||
2161 | ata_eh_freeze_port(ap); | ||
2162 | |||
2180 | deadline = jiffies + ata_eh_reset_timeouts[try++]; | 2163 | deadline = jiffies + ata_eh_reset_timeouts[try++]; |
2181 | 2164 | ||
2182 | /* shut up during boot probing */ | 2165 | if (reset) { |
2183 | if (verbose) | 2166 | if (verbose) |
2184 | ata_link_printk(link, KERN_INFO, "%s resetting link\n", | 2167 | ata_link_printk(link, KERN_INFO, "%s resetting link\n", |
2185 | reset == softreset ? "soft" : "hard"); | 2168 | reset == softreset ? "soft" : "hard"); |
2186 | 2169 | ||
2187 | /* mark that this EH session started with reset */ | 2170 | /* mark that this EH session started with reset */ |
2188 | if (reset == hardreset) | 2171 | if (reset == hardreset) |
2189 | ehc->i.flags |= ATA_EHI_DID_HARDRESET; | 2172 | ehc->i.flags |= ATA_EHI_DID_HARDRESET; |
2190 | else | 2173 | else |
2191 | ehc->i.flags |= ATA_EHI_DID_SOFTRESET; | 2174 | ehc->i.flags |= ATA_EHI_DID_SOFTRESET; |
2192 | 2175 | ||
2193 | rc = ata_do_reset(link, reset, classes, deadline); | 2176 | rc = ata_do_reset(link, reset, classes, deadline); |
2194 | 2177 | ||
2195 | if (reset == hardreset && | 2178 | if (reset == hardreset && |
2196 | ata_eh_followup_srst_needed(link, rc, classify, classes)) { | 2179 | ata_eh_followup_srst_needed(link, rc, classify, classes)) { |
2197 | /* okay, let's do follow-up softreset */ | 2180 | /* okay, let's do follow-up softreset */ |
2198 | reset = softreset; | 2181 | reset = softreset; |
2199 | 2182 | ||
2200 | if (!reset) { | 2183 | if (!reset) { |
2201 | ata_link_printk(link, KERN_ERR, | 2184 | ata_link_printk(link, KERN_ERR, |
2202 | "follow-up softreset required " | 2185 | "follow-up softreset required " |
2203 | "but no softreset avaliable\n"); | 2186 | "but no softreset avaliable\n"); |
2204 | rc = -EINVAL; | 2187 | rc = -EINVAL; |
2205 | goto fail; | 2188 | goto fail; |
2189 | } | ||
2190 | |||
2191 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | ||
2192 | rc = ata_do_reset(link, reset, classes, deadline); | ||
2206 | } | 2193 | } |
2207 | 2194 | ||
2208 | ata_eh_about_to_do(link, NULL, ATA_EH_RESET); | 2195 | /* -EAGAIN can happen if we skipped followup SRST */ |
2209 | rc = ata_do_reset(link, reset, classes, deadline); | 2196 | if (rc && rc != -EAGAIN) |
2197 | goto fail; | ||
2198 | } else { | ||
2199 | if (verbose) | ||
2200 | ata_link_printk(link, KERN_INFO, "no reset method " | ||
2201 | "available, skipping reset\n"); | ||
2202 | if (!(lflags & ATA_LFLAG_ASSUME_CLASS)) | ||
2203 | lflags |= ATA_LFLAG_ASSUME_ATA; | ||
2210 | } | 2204 | } |
2211 | 2205 | ||
2212 | /* -EAGAIN can happen if we skipped followup SRST */ | 2206 | /* |
2213 | if (rc && rc != -EAGAIN) | 2207 | * Post-reset processing |
2214 | goto fail; | 2208 | */ |
2215 | |||
2216 | done: | ||
2217 | ata_link_for_each_dev(dev, link) { | 2209 | ata_link_for_each_dev(dev, link) { |
2218 | /* After the reset, the device state is PIO 0 and the | 2210 | /* After the reset, the device state is PIO 0 and the |
2219 | * controller state is undefined. Reset also wakes up | 2211 | * controller state is undefined. Reset also wakes up |
@@ -2236,9 +2228,53 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2236 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) | 2228 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) |
2237 | link->sata_spd = (sstatus >> 4) & 0xf; | 2229 | link->sata_spd = (sstatus >> 4) & 0xf; |
2238 | 2230 | ||
2231 | /* thaw the port */ | ||
2232 | if (ata_is_host_link(link)) | ||
2233 | ata_eh_thaw_port(ap); | ||
2234 | |||
2235 | /* postreset() should clear hardware SError. Although SError | ||
2236 | * is cleared during link resume, clearing SError here is | ||
2237 | * necessary as some PHYs raise hotplug events after SRST. | ||
2238 | * This introduces race condition where hotplug occurs between | ||
2239 | * reset and here. This race is mediated by cross checking | ||
2240 | * link onlineness and classification result later. | ||
2241 | */ | ||
2239 | if (postreset) | 2242 | if (postreset) |
2240 | postreset(link, classes); | 2243 | postreset(link, classes); |
2241 | 2244 | ||
2245 | /* clear cached SError */ | ||
2246 | spin_lock_irqsave(link->ap->lock, flags); | ||
2247 | link->eh_info.serror = 0; | ||
2248 | spin_unlock_irqrestore(link->ap->lock, flags); | ||
2249 | |||
2250 | /* Make sure onlineness and classification result correspond. | ||
2251 | * Hotplug could have happened during reset and some | ||
2252 | * controllers fail to wait while a drive is spinning up after | ||
2253 | * being hotplugged causing misdetection. By cross checking | ||
2254 | * link onlineness and classification result, those conditions | ||
2255 | * can be reliably detected and retried. | ||
2256 | */ | ||
2257 | nr_known = 0; | ||
2258 | ata_link_for_each_dev(dev, link) { | ||
2259 | /* convert all ATA_DEV_UNKNOWN to ATA_DEV_NONE */ | ||
2260 | if (classes[dev->devno] == ATA_DEV_UNKNOWN) | ||
2261 | classes[dev->devno] = ATA_DEV_NONE; | ||
2262 | else | ||
2263 | nr_known++; | ||
2264 | } | ||
2265 | |||
2266 | if (classify && !nr_known && ata_link_online(link)) { | ||
2267 | if (try < max_tries) { | ||
2268 | ata_link_printk(link, KERN_WARNING, "link online but " | ||
2269 | "device misclassified, retrying\n"); | ||
2270 | rc = -EAGAIN; | ||
2271 | goto fail; | ||
2272 | } | ||
2273 | ata_link_printk(link, KERN_WARNING, | ||
2274 | "link online but device misclassified, " | ||
2275 | "device detection might fail\n"); | ||
2276 | } | ||
2277 | |||
2242 | /* reset successful, schedule revalidation */ | 2278 | /* reset successful, schedule revalidation */ |
2243 | ata_eh_done(link, NULL, ATA_EH_RESET); | 2279 | ata_eh_done(link, NULL, ATA_EH_RESET); |
2244 | ehc->i.action |= ATA_EH_REVALIDATE; | 2280 | ehc->i.action |= ATA_EH_REVALIDATE; |
@@ -2587,7 +2623,7 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
2587 | struct ata_link *link; | 2623 | struct ata_link *link; |
2588 | struct ata_device *dev; | 2624 | struct ata_device *dev; |
2589 | int nr_failed_devs, nr_disabled_devs; | 2625 | int nr_failed_devs, nr_disabled_devs; |
2590 | int reset, rc; | 2626 | int rc; |
2591 | unsigned long flags; | 2627 | unsigned long flags; |
2592 | 2628 | ||
2593 | DPRINTK("ENTER\n"); | 2629 | DPRINTK("ENTER\n"); |
@@ -2630,7 +2666,6 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
2630 | rc = 0; | 2666 | rc = 0; |
2631 | nr_failed_devs = 0; | 2667 | nr_failed_devs = 0; |
2632 | nr_disabled_devs = 0; | 2668 | nr_disabled_devs = 0; |
2633 | reset = 0; | ||
2634 | 2669 | ||
2635 | /* if UNLOADING, finish immediately */ | 2670 | /* if UNLOADING, finish immediately */ |
2636 | if (ap->pflags & ATA_PFLAG_UNLOADING) | 2671 | if (ap->pflags & ATA_PFLAG_UNLOADING) |
@@ -2644,40 +2679,24 @@ int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
2644 | if (ata_eh_skip_recovery(link)) | 2679 | if (ata_eh_skip_recovery(link)) |
2645 | ehc->i.action = 0; | 2680 | ehc->i.action = 0; |
2646 | 2681 | ||
2647 | /* do we need to reset? */ | ||
2648 | if (ehc->i.action & ATA_EH_RESET) | ||
2649 | reset = 1; | ||
2650 | |||
2651 | ata_link_for_each_dev(dev, link) | 2682 | ata_link_for_each_dev(dev, link) |
2652 | ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; | 2683 | ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; |
2653 | } | 2684 | } |
2654 | 2685 | ||
2655 | /* reset */ | 2686 | /* reset */ |
2656 | if (reset) { | 2687 | ata_port_for_each_link(link, ap) { |
2657 | /* if PMP is attached, this function only deals with | 2688 | struct ata_eh_context *ehc = &link->eh_context; |
2658 | * downstream links, port should stay thawed. | ||
2659 | */ | ||
2660 | if (!sata_pmp_attached(ap)) | ||
2661 | ata_eh_freeze_port(ap); | ||
2662 | |||
2663 | ata_port_for_each_link(link, ap) { | ||
2664 | struct ata_eh_context *ehc = &link->eh_context; | ||
2665 | 2689 | ||
2666 | if (!(ehc->i.action & ATA_EH_RESET)) | 2690 | if (!(ehc->i.action & ATA_EH_RESET)) |
2667 | continue; | 2691 | continue; |
2668 | 2692 | ||
2669 | rc = ata_eh_reset(link, ata_link_nr_vacant(link), | 2693 | rc = ata_eh_reset(link, ata_link_nr_vacant(link), |
2670 | prereset, softreset, hardreset, | 2694 | prereset, softreset, hardreset, postreset); |
2671 | postreset); | 2695 | if (rc) { |
2672 | if (rc) { | 2696 | ata_link_printk(link, KERN_ERR, |
2673 | ata_link_printk(link, KERN_ERR, | 2697 | "reset failed, giving up\n"); |
2674 | "reset failed, giving up\n"); | 2698 | goto out; |
2675 | goto out; | ||
2676 | } | ||
2677 | } | 2699 | } |
2678 | |||
2679 | if (!sata_pmp_attached(ap)) | ||
2680 | ata_eh_thaw_port(ap); | ||
2681 | } | 2700 | } |
2682 | 2701 | ||
2683 | /* the rest */ | 2702 | /* the rest */ |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index ff1822a7da38..7daf4c0f6216 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -48,7 +48,7 @@ static unsigned int sata_pmp_read(struct ata_link *link, int reg, u32 *r_val) | |||
48 | tf.device = link->pmp; | 48 | tf.device = link->pmp; |
49 | 49 | ||
50 | err_mask = ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, | 50 | err_mask = ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, |
51 | SATA_PMP_SCR_TIMEOUT); | 51 | SATA_PMP_RW_TIMEOUT); |
52 | if (err_mask) | 52 | if (err_mask) |
53 | return err_mask; | 53 | return err_mask; |
54 | 54 | ||
@@ -88,7 +88,7 @@ static unsigned int sata_pmp_write(struct ata_link *link, int reg, u32 val) | |||
88 | tf.lbah = (val >> 24) & 0xff; | 88 | tf.lbah = (val >> 24) & 0xff; |
89 | 89 | ||
90 | return ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, | 90 | return ata_exec_internal(pmp_dev, &tf, NULL, DMA_NONE, NULL, 0, |
91 | SATA_PMP_SCR_TIMEOUT); | 91 | SATA_PMP_RW_TIMEOUT); |
92 | } | 92 | } |
93 | 93 | ||
94 | /** | 94 | /** |
@@ -257,19 +257,6 @@ static int sata_pmp_configure(struct ata_device *dev, int print_info) | |||
257 | goto fail; | 257 | goto fail; |
258 | } | 258 | } |
259 | 259 | ||
260 | /* turn off notification till fan-out ports are reset and configured */ | ||
261 | if (gscr[SATA_PMP_GSCR_FEAT_EN] & SATA_PMP_FEAT_NOTIFY) { | ||
262 | gscr[SATA_PMP_GSCR_FEAT_EN] &= ~SATA_PMP_FEAT_NOTIFY; | ||
263 | |||
264 | err_mask = sata_pmp_write(dev->link, SATA_PMP_GSCR_FEAT_EN, | ||
265 | gscr[SATA_PMP_GSCR_FEAT_EN]); | ||
266 | if (err_mask) { | ||
267 | rc = -EIO; | ||
268 | reason = "failed to write GSCR_FEAT_EN"; | ||
269 | goto fail; | ||
270 | } | ||
271 | } | ||
272 | |||
273 | if (print_info) { | 260 | if (print_info) { |
274 | ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, " | 261 | ata_dev_printk(dev, KERN_INFO, "Port Multiplier %s, " |
275 | "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n", | 262 | "0x%04x:0x%04x r%d, %d ports, feat 0x%x/0x%x\n", |
@@ -335,9 +322,12 @@ static void sata_pmp_quirks(struct ata_port *ap) | |||
335 | if (vendor == 0x1095 && devid == 0x3726) { | 322 | if (vendor == 0x1095 && devid == 0x3726) { |
336 | /* sil3726 quirks */ | 323 | /* sil3726 quirks */ |
337 | ata_port_for_each_link(link, ap) { | 324 | ata_port_for_each_link(link, ap) { |
338 | /* class code report is unreliable */ | 325 | /* Class code report is unreliable and SRST |
326 | * times out under certain configurations. | ||
327 | */ | ||
339 | if (link->pmp < 5) | 328 | if (link->pmp < 5) |
340 | link->flags |= ATA_LFLAG_ASSUME_ATA; | 329 | link->flags |= ATA_LFLAG_NO_SRST | |
330 | ATA_LFLAG_ASSUME_ATA; | ||
341 | 331 | ||
342 | /* port 5 is for SEMB device and it doesn't like SRST */ | 332 | /* port 5 is for SEMB device and it doesn't like SRST */ |
343 | if (link->pmp == 5) | 333 | if (link->pmp == 5) |
@@ -700,8 +690,6 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap, | |||
700 | if (ehc->i.action & ATA_EH_RESET) { | 690 | if (ehc->i.action & ATA_EH_RESET) { |
701 | struct ata_link *tlink; | 691 | struct ata_link *tlink; |
702 | 692 | ||
703 | ata_eh_freeze_port(ap); | ||
704 | |||
705 | /* reset */ | 693 | /* reset */ |
706 | rc = ata_eh_reset(link, 0, prereset, softreset, hardreset, | 694 | rc = ata_eh_reset(link, 0, prereset, softreset, hardreset, |
707 | postreset); | 695 | postreset); |
@@ -711,8 +699,6 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap, | |||
711 | goto fail; | 699 | goto fail; |
712 | } | 700 | } |
713 | 701 | ||
714 | ata_eh_thaw_port(ap); | ||
715 | |||
716 | /* PMP is reset, SErrors cannot be trusted, scan all */ | 702 | /* PMP is reset, SErrors cannot be trusted, scan all */ |
717 | ata_port_for_each_link(tlink, ap) { | 703 | ata_port_for_each_link(tlink, ap) { |
718 | struct ata_eh_context *ehc = &tlink->eh_context; | 704 | struct ata_eh_context *ehc = &tlink->eh_context; |
@@ -864,6 +850,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap) | |||
864 | struct ata_link *pmp_link = &ap->link; | 850 | struct ata_link *pmp_link = &ap->link; |
865 | struct ata_device *pmp_dev = pmp_link->device; | 851 | struct ata_device *pmp_dev = pmp_link->device; |
866 | struct ata_eh_context *pmp_ehc = &pmp_link->eh_context; | 852 | struct ata_eh_context *pmp_ehc = &pmp_link->eh_context; |
853 | u32 *gscr = pmp_dev->gscr; | ||
867 | struct ata_link *link; | 854 | struct ata_link *link; |
868 | struct ata_device *dev; | 855 | struct ata_device *dev; |
869 | unsigned int err_mask; | 856 | unsigned int err_mask; |
@@ -901,6 +888,22 @@ static int sata_pmp_eh_recover(struct ata_port *ap) | |||
901 | if (rc) | 888 | if (rc) |
902 | goto pmp_fail; | 889 | goto pmp_fail; |
903 | 890 | ||
891 | /* PHY event notification can disturb reset and other recovery | ||
892 | * operations. Turn it off. | ||
893 | */ | ||
894 | if (gscr[SATA_PMP_GSCR_FEAT_EN] & SATA_PMP_FEAT_NOTIFY) { | ||
895 | gscr[SATA_PMP_GSCR_FEAT_EN] &= ~SATA_PMP_FEAT_NOTIFY; | ||
896 | |||
897 | err_mask = sata_pmp_write(pmp_link, SATA_PMP_GSCR_FEAT_EN, | ||
898 | gscr[SATA_PMP_GSCR_FEAT_EN]); | ||
899 | if (err_mask) { | ||
900 | ata_link_printk(pmp_link, KERN_WARNING, | ||
901 | "failed to disable NOTIFY (err_mask=0x%x)\n", | ||
902 | err_mask); | ||
903 | goto pmp_fail; | ||
904 | } | ||
905 | } | ||
906 | |||
904 | /* handle disabled links */ | 907 | /* handle disabled links */ |
905 | rc = sata_pmp_eh_handle_disabled_links(ap); | 908 | rc = sata_pmp_eh_handle_disabled_links(ap); |
906 | if (rc) | 909 | if (rc) |
@@ -923,10 +926,10 @@ static int sata_pmp_eh_recover(struct ata_port *ap) | |||
923 | 926 | ||
924 | /* enable notification */ | 927 | /* enable notification */ |
925 | if (pmp_dev->flags & ATA_DFLAG_AN) { | 928 | if (pmp_dev->flags & ATA_DFLAG_AN) { |
926 | pmp_dev->gscr[SATA_PMP_GSCR_FEAT_EN] |= SATA_PMP_FEAT_NOTIFY; | 929 | gscr[SATA_PMP_GSCR_FEAT_EN] |= SATA_PMP_FEAT_NOTIFY; |
927 | 930 | ||
928 | err_mask = sata_pmp_write(pmp_dev->link, SATA_PMP_GSCR_FEAT_EN, | 931 | err_mask = sata_pmp_write(pmp_link, SATA_PMP_GSCR_FEAT_EN, |
929 | pmp_dev->gscr[SATA_PMP_GSCR_FEAT_EN]); | 932 | gscr[SATA_PMP_GSCR_FEAT_EN]); |
930 | if (err_mask) { | 933 | if (err_mask) { |
931 | ata_dev_printk(pmp_dev, KERN_ERR, "failed to write " | 934 | ata_dev_printk(pmp_dev, KERN_ERR, "failed to write " |
932 | "PMP_FEAT_EN (Emask=0x%x)\n", err_mask); | 935 | "PMP_FEAT_EN (Emask=0x%x)\n", err_mask); |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3ce43920e459..2e6e1622dc6d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1082,12 +1082,6 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) | |||
1082 | if (((cdb[4] >> 4) & 0xf) != 0) | 1082 | if (((cdb[4] >> 4) & 0xf) != 0) |
1083 | goto invalid_fld; /* power conditions not supported */ | 1083 | goto invalid_fld; /* power conditions not supported */ |
1084 | 1084 | ||
1085 | if (qc->dev->horkage & ATA_HORKAGE_SKIP_PM) { | ||
1086 | /* the device lacks PM support, finish without doing anything */ | ||
1087 | scmd->result = SAM_STAT_GOOD; | ||
1088 | return 1; | ||
1089 | } | ||
1090 | |||
1091 | if (cdb[4] & 0x1) { | 1085 | if (cdb[4] & 0x1) { |
1092 | tf->nsect = 1; /* 1 sector, lba=0 */ | 1086 | tf->nsect = 1; /* 1 sector, lba=0 */ |
1093 | 1087 | ||
@@ -1643,6 +1637,7 @@ defer: | |||
1643 | 1637 | ||
1644 | /** | 1638 | /** |
1645 | * ata_scsi_rbuf_get - Map response buffer. | 1639 | * ata_scsi_rbuf_get - Map response buffer. |
1640 | * @cmd: SCSI command containing buffer to be mapped. | ||
1646 | * @flags: unsigned long variable to store irq enable status | 1641 | * @flags: unsigned long variable to store irq enable status |
1647 | * @copy_in: copy in from user buffer | 1642 | * @copy_in: copy in from user buffer |
1648 | * | 1643 | * |
@@ -1960,7 +1955,7 @@ static unsigned int ata_msense_ctl_mode(u8 *buf) | |||
1960 | 1955 | ||
1961 | /** | 1956 | /** |
1962 | * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page | 1957 | * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page |
1963 | * @bufp: output buffer | 1958 | * @buf: output buffer |
1964 | * | 1959 | * |
1965 | * Generate a generic MODE SENSE r/w error recovery page. | 1960 | * Generate a generic MODE SENSE r/w error recovery page. |
1966 | * | 1961 | * |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 3c2d2289f85e..215d18672a5a 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -247,7 +247,7 @@ u8 ata_sff_check_status(struct ata_port *ap) | |||
247 | * LOCKING: | 247 | * LOCKING: |
248 | * Inherited from caller. | 248 | * Inherited from caller. |
249 | */ | 249 | */ |
250 | u8 ata_sff_altstatus(struct ata_port *ap) | 250 | static u8 ata_sff_altstatus(struct ata_port *ap) |
251 | { | 251 | { |
252 | if (ap->ops->sff_check_altstatus) | 252 | if (ap->ops->sff_check_altstatus) |
253 | return ap->ops->sff_check_altstatus(ap); | 253 | return ap->ops->sff_check_altstatus(ap); |
@@ -256,6 +256,93 @@ u8 ata_sff_altstatus(struct ata_port *ap) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | /** | 258 | /** |
259 | * ata_sff_irq_status - Check if the device is busy | ||
260 | * @ap: port where the device is | ||
261 | * | ||
262 | * Determine if the port is currently busy. Uses altstatus | ||
263 | * if available in order to avoid clearing shared IRQ status | ||
264 | * when finding an IRQ source. Non ctl capable devices don't | ||
265 | * share interrupt lines fortunately for us. | ||
266 | * | ||
267 | * LOCKING: | ||
268 | * Inherited from caller. | ||
269 | */ | ||
270 | static u8 ata_sff_irq_status(struct ata_port *ap) | ||
271 | { | ||
272 | u8 status; | ||
273 | |||
274 | if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) { | ||
275 | status = ata_sff_altstatus(ap); | ||
276 | /* Not us: We are busy */ | ||
277 | if (status & ATA_BUSY) | ||
278 | return status; | ||
279 | } | ||
280 | /* Clear INTRQ latch */ | ||
281 | status = ap->ops->sff_check_status(ap); | ||
282 | return status; | ||
283 | } | ||
284 | |||
285 | /** | ||
286 | * ata_sff_sync - Flush writes | ||
287 | * @ap: Port to wait for. | ||
288 | * | ||
289 | * CAUTION: | ||
290 | * If we have an mmio device with no ctl and no altstatus | ||
291 | * method this will fail. No such devices are known to exist. | ||
292 | * | ||
293 | * LOCKING: | ||
294 | * Inherited from caller. | ||
295 | */ | ||
296 | |||
297 | static void ata_sff_sync(struct ata_port *ap) | ||
298 | { | ||
299 | if (ap->ops->sff_check_altstatus) | ||
300 | ap->ops->sff_check_altstatus(ap); | ||
301 | else if (ap->ioaddr.altstatus_addr) | ||
302 | ioread8(ap->ioaddr.altstatus_addr); | ||
303 | } | ||
304 | |||
305 | /** | ||
306 | * ata_sff_pause - Flush writes and wait 400nS | ||
307 | * @ap: Port to pause for. | ||
308 | * | ||
309 | * CAUTION: | ||
310 | * If we have an mmio device with no ctl and no altstatus | ||
311 | * method this will fail. No such devices are known to exist. | ||
312 | * | ||
313 | * LOCKING: | ||
314 | * Inherited from caller. | ||
315 | */ | ||
316 | |||
317 | void ata_sff_pause(struct ata_port *ap) | ||
318 | { | ||
319 | ata_sff_sync(ap); | ||
320 | ndelay(400); | ||
321 | } | ||
322 | |||
323 | /** | ||
324 | * ata_sff_dma_pause - Pause before commencing DMA | ||
325 | * @ap: Port to pause for. | ||
326 | * | ||
327 | * Perform I/O fencing and ensure sufficient cycle delays occur | ||
328 | * for the HDMA1:0 transition | ||
329 | */ | ||
330 | |||
331 | void ata_sff_dma_pause(struct ata_port *ap) | ||
332 | { | ||
333 | if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) { | ||
334 | /* An altstatus read will cause the needed delay without | ||
335 | messing up the IRQ status */ | ||
336 | ata_sff_altstatus(ap); | ||
337 | return; | ||
338 | } | ||
339 | /* There are no DMA controllers without ctl. BUG here to ensure | ||
340 | we never violate the HDMA1:0 transition timing and risk | ||
341 | corruption. */ | ||
342 | BUG(); | ||
343 | } | ||
344 | |||
345 | /** | ||
259 | * ata_sff_busy_sleep - sleep until BSY clears, or timeout | 346 | * ata_sff_busy_sleep - sleep until BSY clears, or timeout |
260 | * @ap: port containing status register to be polled | 347 | * @ap: port containing status register to be polled |
261 | * @tmout_pat: impatience timeout | 348 | * @tmout_pat: impatience timeout |
@@ -742,7 +829,7 @@ static void ata_pio_sectors(struct ata_queued_cmd *qc) | |||
742 | } else | 829 | } else |
743 | ata_pio_sector(qc); | 830 | ata_pio_sector(qc); |
744 | 831 | ||
745 | ata_sff_altstatus(qc->ap); /* flush */ | 832 | ata_sff_sync(qc->ap); /* flush */ |
746 | } | 833 | } |
747 | 834 | ||
748 | /** | 835 | /** |
@@ -763,8 +850,9 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc) | |||
763 | WARN_ON(qc->dev->cdb_len < 12); | 850 | WARN_ON(qc->dev->cdb_len < 12); |
764 | 851 | ||
765 | ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1); | 852 | ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1); |
766 | ata_sff_altstatus(ap); /* flush */ | 853 | ata_sff_sync(ap); |
767 | 854 | /* FIXME: If the CDB is for DMA do we need to do the transition delay | |
855 | or is bmdma_start guaranteed to do it ? */ | ||
768 | switch (qc->tf.protocol) { | 856 | switch (qc->tf.protocol) { |
769 | case ATAPI_PROT_PIO: | 857 | case ATAPI_PROT_PIO: |
770 | ap->hsm_task_state = HSM_ST; | 858 | ap->hsm_task_state = HSM_ST; |
@@ -905,7 +993,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc) | |||
905 | 993 | ||
906 | if (unlikely(__atapi_pio_bytes(qc, bytes))) | 994 | if (unlikely(__atapi_pio_bytes(qc, bytes))) |
907 | goto err_out; | 995 | goto err_out; |
908 | ata_sff_altstatus(ap); /* flush */ | 996 | ata_sff_sync(ap); /* flush */ |
909 | 997 | ||
910 | return; | 998 | return; |
911 | 999 | ||
@@ -1489,14 +1577,10 @@ inline unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1489 | goto idle_irq; | 1577 | goto idle_irq; |
1490 | } | 1578 | } |
1491 | 1579 | ||
1492 | /* check altstatus */ | ||
1493 | status = ata_sff_altstatus(ap); | ||
1494 | if (status & ATA_BUSY) | ||
1495 | goto idle_irq; | ||
1496 | 1580 | ||
1497 | /* check main status, clearing INTRQ */ | 1581 | /* check main status, clearing INTRQ if needed */ |
1498 | status = ap->ops->sff_check_status(ap); | 1582 | status = ata_sff_irq_status(ap); |
1499 | if (unlikely(status & ATA_BUSY)) | 1583 | if (status & ATA_BUSY) |
1500 | goto idle_irq; | 1584 | goto idle_irq; |
1501 | 1585 | ||
1502 | /* ack bmdma irq events */ | 1586 | /* ack bmdma irq events */ |
@@ -2030,7 +2114,7 @@ void ata_sff_error_handler(struct ata_port *ap) | |||
2030 | ap->ops->bmdma_stop(qc); | 2114 | ap->ops->bmdma_stop(qc); |
2031 | } | 2115 | } |
2032 | 2116 | ||
2033 | ata_sff_altstatus(ap); | 2117 | ata_sff_sync(ap); /* FIXME: We don't need this */ |
2034 | ap->ops->sff_check_status(ap); | 2118 | ap->ops->sff_check_status(ap); |
2035 | ap->ops->sff_irq_clear(ap); | 2119 | ap->ops->sff_irq_clear(ap); |
2036 | 2120 | ||
@@ -2203,7 +2287,7 @@ void ata_bmdma_stop(struct ata_queued_cmd *qc) | |||
2203 | mmio + ATA_DMA_CMD); | 2287 | mmio + ATA_DMA_CMD); |
2204 | 2288 | ||
2205 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ | 2289 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ |
2206 | ata_sff_altstatus(ap); /* dummy read */ | 2290 | ata_sff_dma_pause(ap); |
2207 | } | 2291 | } |
2208 | 2292 | ||
2209 | /** | 2293 | /** |
@@ -2722,7 +2806,8 @@ EXPORT_SYMBOL_GPL(ata_sff_qc_prep); | |||
2722 | EXPORT_SYMBOL_GPL(ata_sff_dumb_qc_prep); | 2806 | EXPORT_SYMBOL_GPL(ata_sff_dumb_qc_prep); |
2723 | EXPORT_SYMBOL_GPL(ata_sff_dev_select); | 2807 | EXPORT_SYMBOL_GPL(ata_sff_dev_select); |
2724 | EXPORT_SYMBOL_GPL(ata_sff_check_status); | 2808 | EXPORT_SYMBOL_GPL(ata_sff_check_status); |
2725 | EXPORT_SYMBOL_GPL(ata_sff_altstatus); | 2809 | EXPORT_SYMBOL_GPL(ata_sff_dma_pause); |
2810 | EXPORT_SYMBOL_GPL(ata_sff_pause); | ||
2726 | EXPORT_SYMBOL_GPL(ata_sff_busy_sleep); | 2811 | EXPORT_SYMBOL_GPL(ata_sff_busy_sleep); |
2727 | EXPORT_SYMBOL_GPL(ata_sff_wait_ready); | 2812 | EXPORT_SYMBOL_GPL(ata_sff_wait_ready); |
2728 | EXPORT_SYMBOL_GPL(ata_sff_tf_load); | 2813 | EXPORT_SYMBOL_GPL(ata_sff_tf_load); |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index fcabe46f262b..0f3e659db99a 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -177,11 +177,11 @@ static void ali_program_modes(struct ata_port *ap, struct ata_device *adev, stru | |||
177 | u8 udma; | 177 | u8 udma; |
178 | 178 | ||
179 | if (t != NULL) { | 179 | if (t != NULL) { |
180 | t->setup = FIT(t->setup, 1, 8) & 7; | 180 | t->setup = clamp_val(t->setup, 1, 8) & 7; |
181 | t->act8b = FIT(t->act8b, 1, 8) & 7; | 181 | t->act8b = clamp_val(t->act8b, 1, 8) & 7; |
182 | t->rec8b = FIT(t->rec8b, 1, 16) & 15; | 182 | t->rec8b = clamp_val(t->rec8b, 1, 16) & 15; |
183 | t->active = FIT(t->active, 1, 8) & 7; | 183 | t->active = clamp_val(t->active, 1, 8) & 7; |
184 | t->recover = FIT(t->recover, 1, 16) & 15; | 184 | t->recover = clamp_val(t->recover, 1, 16) & 15; |
185 | 185 | ||
186 | pci_write_config_byte(pdev, cas, t->setup); | 186 | pci_write_config_byte(pdev, cas, t->setup); |
187 | pci_write_config_byte(pdev, cbt, (t->act8b << 4) | t->rec8b); | 187 | pci_write_config_byte(pdev, cbt, (t->act8b << 4) | t->rec8b); |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 26665c396485..57dd00f463d3 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
@@ -84,32 +84,32 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse | |||
84 | 84 | ||
85 | /* Configure the address set up timing */ | 85 | /* Configure the address set up timing */ |
86 | pci_read_config_byte(pdev, offset + 0x0C, &t); | 86 | pci_read_config_byte(pdev, offset + 0x0C, &t); |
87 | t = (t & ~(3 << ((3 - dn) << 1))) | ((FIT(at.setup, 1, 4) - 1) << ((3 - dn) << 1)); | 87 | t = (t & ~(3 << ((3 - dn) << 1))) | ((clamp_val(at.setup, 1, 4) - 1) << ((3 - dn) << 1)); |
88 | pci_write_config_byte(pdev, offset + 0x0C , t); | 88 | pci_write_config_byte(pdev, offset + 0x0C , t); |
89 | 89 | ||
90 | /* Configure the 8bit I/O timing */ | 90 | /* Configure the 8bit I/O timing */ |
91 | pci_write_config_byte(pdev, offset + 0x0E + (1 - (dn >> 1)), | 91 | pci_write_config_byte(pdev, offset + 0x0E + (1 - (dn >> 1)), |
92 | ((FIT(at.act8b, 1, 16) - 1) << 4) | (FIT(at.rec8b, 1, 16) - 1)); | 92 | ((clamp_val(at.act8b, 1, 16) - 1) << 4) | (clamp_val(at.rec8b, 1, 16) - 1)); |
93 | 93 | ||
94 | /* Drive timing */ | 94 | /* Drive timing */ |
95 | pci_write_config_byte(pdev, offset + 0x08 + (3 - dn), | 95 | pci_write_config_byte(pdev, offset + 0x08 + (3 - dn), |
96 | ((FIT(at.active, 1, 16) - 1) << 4) | (FIT(at.recover, 1, 16) - 1)); | 96 | ((clamp_val(at.active, 1, 16) - 1) << 4) | (clamp_val(at.recover, 1, 16) - 1)); |
97 | 97 | ||
98 | switch (clock) { | 98 | switch (clock) { |
99 | case 1: | 99 | case 1: |
100 | t = at.udma ? (0xc0 | (FIT(at.udma, 2, 5) - 2)) : 0x03; | 100 | t = at.udma ? (0xc0 | (clamp_val(at.udma, 2, 5) - 2)) : 0x03; |
101 | break; | 101 | break; |
102 | 102 | ||
103 | case 2: | 103 | case 2: |
104 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 2, 10)]) : 0x03; | 104 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 2, 10)]) : 0x03; |
105 | break; | 105 | break; |
106 | 106 | ||
107 | case 3: | 107 | case 3: |
108 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 10)]) : 0x03; | 108 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 1, 10)]) : 0x03; |
109 | break; | 109 | break; |
110 | 110 | ||
111 | case 4: | 111 | case 4: |
112 | t = at.udma ? (0xc0 | amd_cyc2udma[FIT(at.udma, 1, 15)]) : 0x03; | 112 | t = at.udma ? (0xc0 | amd_cyc2udma[clamp_val(at.udma, 1, 15)]) : 0x03; |
113 | break; | 113 | break; |
114 | 114 | ||
115 | default: | 115 | default: |
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c index 5e104385d6a3..82fb6e273169 100644 --- a/drivers/ata/pata_at32.c +++ b/drivers/ata/pata_at32.c | |||
@@ -291,8 +291,6 @@ static int __init pata_at32_probe(struct platform_device *pdev) | |||
291 | if (!info) | 291 | if (!info) |
292 | return -ENOMEM; | 292 | return -ENOMEM; |
293 | 293 | ||
294 | memset(info, 0, sizeof(struct at32_ide_info)); | ||
295 | |||
296 | info->irq = irq; | 294 | info->irq = irq; |
297 | info->cs = board->cs; | 295 | info->cs = board->cs; |
298 | 296 | ||
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index 9ab89732cf94..55516103626a 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -911,7 +911,10 @@ static void bfin_bmdma_start(struct ata_queued_cmd *qc) | |||
911 | /* Reset all transfer count */ | 911 | /* Reset all transfer count */ |
912 | ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | TFRCNT_RST); | 912 | ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | TFRCNT_RST); |
913 | 913 | ||
914 | /* Set transfer length to buffer len */ | 914 | /* Set ATAPI state machine contorl in terminate sequence */ |
915 | ATAPI_SET_CONTROL(base, ATAPI_GET_CONTROL(base) | END_ON_TERM); | ||
916 | |||
917 | /* Set transfer length to buffer len */ | ||
915 | for_each_sg(qc->sg, sg, qc->n_elem, si) { | 918 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
916 | ATAPI_SET_XFER_LEN(base, (sg_dma_len(sg) >> 1)); | 919 | ATAPI_SET_XFER_LEN(base, (sg_dma_len(sg) >> 1)); |
917 | } | 920 | } |
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index a9c3218e22fd..2ff62608ae37 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
@@ -62,14 +62,14 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
62 | return; | 62 | return; |
63 | } | 63 | } |
64 | 64 | ||
65 | time_16 = FIT(t.recover, 0, 15) | (FIT(t.active, 0, 15) << 4); | 65 | time_16 = clamp_val(t.recover, 0, 15) | (clamp_val(t.active, 0, 15) << 4); |
66 | time_8 = FIT(t.act8b, 0, 15) | (FIT(t.rec8b, 0, 15) << 4); | 66 | time_8 = clamp_val(t.act8b, 0, 15) | (clamp_val(t.rec8b, 0, 15) << 4); |
67 | 67 | ||
68 | if (adev->devno == 0) { | 68 | if (adev->devno == 0) { |
69 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); | 69 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); |
70 | 70 | ||
71 | addr &= ~0x0F; /* Mask bits */ | 71 | addr &= ~0x0F; /* Mask bits */ |
72 | addr |= FIT(t.setup, 0, 15); | 72 | addr |= clamp_val(t.setup, 0, 15); |
73 | 73 | ||
74 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); | 74 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); |
75 | pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16); | 75 | pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16); |
@@ -79,7 +79,7 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
79 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); | 79 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); |
80 | 80 | ||
81 | addr &= ~0xF0; /* Mask bits */ | 81 | addr &= ~0xF0; /* Mask bits */ |
82 | addr |= (FIT(t.setup, 0, 15) << 4); | 82 | addr |= (clamp_val(t.setup, 0, 15) << 4); |
83 | 83 | ||
84 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); | 84 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); |
85 | pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16); | 85 | pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16); |
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index 17138436423d..cf9e9848f8b5 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -270,7 +270,7 @@ static void pata_icside_bmdma_stop(struct ata_queued_cmd *qc) | |||
270 | disable_dma(state->dma); | 270 | disable_dma(state->dma); |
271 | 271 | ||
272 | /* see ata_bmdma_stop */ | 272 | /* see ata_bmdma_stop */ |
273 | ata_sff_altstatus(ap); | 273 | ata_sff_dma_pause(ap); |
274 | } | 274 | } |
275 | 275 | ||
276 | static u8 pata_icside_bmdma_status(struct ata_port *ap) | 276 | static u8 pata_icside_bmdma_status(struct ata_port *ap) |
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 7af4b29cc422..fe7cc8ed4ea4 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c | |||
@@ -343,8 +343,8 @@ static void ht6560a_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
343 | /* Get the timing data in cycles. For now play safe at 50Mhz */ | 343 | /* Get the timing data in cycles. For now play safe at 50Mhz */ |
344 | ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); | 344 | ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); |
345 | 345 | ||
346 | active = FIT(t.active, 2, 15); | 346 | active = clamp_val(t.active, 2, 15); |
347 | recover = FIT(t.recover, 4, 15); | 347 | recover = clamp_val(t.recover, 4, 15); |
348 | 348 | ||
349 | inb(0x3E6); | 349 | inb(0x3E6); |
350 | inb(0x3E6); | 350 | inb(0x3E6); |
@@ -377,8 +377,8 @@ static void ht6560b_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
377 | /* Get the timing data in cycles. For now play safe at 50Mhz */ | 377 | /* Get the timing data in cycles. For now play safe at 50Mhz */ |
378 | ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); | 378 | ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000); |
379 | 379 | ||
380 | active = FIT(t.active, 2, 15); | 380 | active = clamp_val(t.active, 2, 15); |
381 | recover = FIT(t.recover, 2, 16); | 381 | recover = clamp_val(t.recover, 2, 16); |
382 | recover &= 0x15; | 382 | recover &= 0x15; |
383 | 383 | ||
384 | inb(0x3E6); | 384 | inb(0x3E6); |
@@ -462,9 +462,9 @@ static void opti82c611a_set_piomode(struct ata_port *ap, | |||
462 | ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); | 462 | ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); |
463 | } | 463 | } |
464 | 464 | ||
465 | active = FIT(t.active, 2, 17) - 2; | 465 | active = clamp_val(t.active, 2, 17) - 2; |
466 | recover = FIT(t.recover, 1, 16) - 1; | 466 | recover = clamp_val(t.recover, 1, 16) - 1; |
467 | setup = FIT(t.setup, 1, 4) - 1; | 467 | setup = clamp_val(t.setup, 1, 4) - 1; |
468 | 468 | ||
469 | /* Select the right timing bank for write timing */ | 469 | /* Select the right timing bank for write timing */ |
470 | rc = ioread8(ap->ioaddr.lbal_addr); | 470 | rc = ioread8(ap->ioaddr.lbal_addr); |
@@ -541,9 +541,9 @@ static void opti82c46x_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
541 | ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); | 541 | ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP); |
542 | } | 542 | } |
543 | 543 | ||
544 | active = FIT(t.active, 2, 17) - 2; | 544 | active = clamp_val(t.active, 2, 17) - 2; |
545 | recover = FIT(t.recover, 1, 16) - 1; | 545 | recover = clamp_val(t.recover, 1, 16) - 1; |
546 | setup = FIT(t.setup, 1, 4) - 1; | 546 | setup = clamp_val(t.setup, 1, 4) - 1; |
547 | 547 | ||
548 | /* Select the right timing bank for write timing */ | 548 | /* Select the right timing bank for write timing */ |
549 | rc = ioread8(ap->ioaddr.lbal_addr); | 549 | rc = ioread8(ap->ioaddr.lbal_addr); |
@@ -624,11 +624,11 @@ static void qdi6500_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
624 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 624 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
625 | 625 | ||
626 | if (ld_qdi->fast) { | 626 | if (ld_qdi->fast) { |
627 | active = 8 - FIT(t.active, 1, 8); | 627 | active = 8 - clamp_val(t.active, 1, 8); |
628 | recovery = 18 - FIT(t.recover, 3, 18); | 628 | recovery = 18 - clamp_val(t.recover, 3, 18); |
629 | } else { | 629 | } else { |
630 | active = 9 - FIT(t.active, 2, 9); | 630 | active = 9 - clamp_val(t.active, 2, 9); |
631 | recovery = 15 - FIT(t.recover, 0, 15); | 631 | recovery = 15 - clamp_val(t.recover, 0, 15); |
632 | } | 632 | } |
633 | timing = (recovery << 4) | active | 0x08; | 633 | timing = (recovery << 4) | active | 0x08; |
634 | 634 | ||
@@ -658,11 +658,11 @@ static void qdi6580dp_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
658 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 658 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
659 | 659 | ||
660 | if (ld_qdi->fast) { | 660 | if (ld_qdi->fast) { |
661 | active = 8 - FIT(t.active, 1, 8); | 661 | active = 8 - clamp_val(t.active, 1, 8); |
662 | recovery = 18 - FIT(t.recover, 3, 18); | 662 | recovery = 18 - clamp_val(t.recover, 3, 18); |
663 | } else { | 663 | } else { |
664 | active = 9 - FIT(t.active, 2, 9); | 664 | active = 9 - clamp_val(t.active, 2, 9); |
665 | recovery = 15 - FIT(t.recover, 0, 15); | 665 | recovery = 15 - clamp_val(t.recover, 0, 15); |
666 | } | 666 | } |
667 | timing = (recovery << 4) | active | 0x08; | 667 | timing = (recovery << 4) | active | 0x08; |
668 | 668 | ||
@@ -695,11 +695,11 @@ static void qdi6580_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
695 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 695 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
696 | 696 | ||
697 | if (ld_qdi->fast) { | 697 | if (ld_qdi->fast) { |
698 | active = 8 - FIT(t.active, 1, 8); | 698 | active = 8 - clamp_val(t.active, 1, 8); |
699 | recovery = 18 - FIT(t.recover, 3, 18); | 699 | recovery = 18 - clamp_val(t.recover, 3, 18); |
700 | } else { | 700 | } else { |
701 | active = 9 - FIT(t.active, 2, 9); | 701 | active = 9 - clamp_val(t.active, 2, 9); |
702 | recovery = 15 - FIT(t.recover, 0, 15); | 702 | recovery = 15 - clamp_val(t.recover, 0, 15); |
703 | } | 703 | } |
704 | timing = (recovery << 4) | active | 0x08; | 704 | timing = (recovery << 4) | active | 0x08; |
705 | ld_qdi->clock[adev->devno] = timing; | 705 | ld_qdi->clock[adev->devno] = timing; |
@@ -830,8 +830,8 @@ static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
830 | else | 830 | else |
831 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 831 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
832 | 832 | ||
833 | active = (FIT(t.active, 3, 17) - 1) & 0x0F; | 833 | active = (clamp_val(t.active, 3, 17) - 1) & 0x0F; |
834 | recovery = (FIT(t.recover, 1, 15) + 1) & 0x0F; | 834 | recovery = (clamp_val(t.recover, 1, 15) + 1) & 0x0F; |
835 | timing = (active << 4) | recovery; | 835 | timing = (active << 4) | recovery; |
836 | winbond_writecfg(ld_winbond->timing, timing, reg); | 836 | winbond_writecfg(ld_winbond->timing, timing, reg); |
837 | 837 | ||
@@ -842,7 +842,7 @@ static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
842 | reg |= 0x08; /* FIFO off */ | 842 | reg |= 0x08; /* FIFO off */ |
843 | if (!ata_pio_need_iordy(adev)) | 843 | if (!ata_pio_need_iordy(adev)) |
844 | reg |= 0x02; /* IORDY off */ | 844 | reg |= 0x02; /* IORDY off */ |
845 | reg |= (FIT(t.setup, 0, 3) << 6); | 845 | reg |= (clamp_val(t.setup, 0, 3) << 6); |
846 | winbond_writecfg(ld_winbond->timing, timing + 1, reg); | 846 | winbond_writecfg(ld_winbond->timing, timing + 1, reg); |
847 | } | 847 | } |
848 | 848 | ||
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index 76d2455bc453..be756b7ef07e 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
@@ -91,9 +91,9 @@ static void ns87410_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
91 | return; | 91 | return; |
92 | } | 92 | } |
93 | 93 | ||
94 | at.active = FIT(at.active, 2, 16) - 2; | 94 | at.active = clamp_val(at.active, 2, 16) - 2; |
95 | at.setup = FIT(at.setup, 1, 4) - 1; | 95 | at.setup = clamp_val(at.setup, 1, 4) - 1; |
96 | at.recover = FIT(at.recover, 1, 12) - 1; | 96 | at.recover = clamp_val(at.recover, 1, 12) - 1; |
97 | 97 | ||
98 | idetcr = (at.setup << 6) | (recoverbits[at.recover] << 3) | activebits[at.active]; | 98 | idetcr = (at.setup << 6) | (recoverbits[at.recover] << 3) | activebits[at.active]; |
99 | 99 | ||
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index ae92b0049bd5..e0aa7eaaee0a 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c | |||
@@ -66,8 +66,8 @@ static void ns87415_set_mode(struct ata_port *ap, struct ata_device *adev, u8 mo | |||
66 | 66 | ||
67 | ata_timing_compute(adev, adev->pio_mode, &t, T, 0); | 67 | ata_timing_compute(adev, adev->pio_mode, &t, T, 0); |
68 | 68 | ||
69 | clocking = 17 - FIT(t.active, 2, 17); | 69 | clocking = 17 - clamp_val(t.active, 2, 17); |
70 | clocking |= (16 - FIT(t.recover, 1, 16)) << 4; | 70 | clocking |= (16 - clamp_val(t.recover, 1, 16)) << 4; |
71 | /* Use the same timing for read and write bytes */ | 71 | /* Use the same timing for read and write bytes */ |
72 | clocking |= (clocking << 8); | 72 | clocking |= (clocking << 8); |
73 | pci_write_config_word(dev, timing, clocking); | 73 | pci_write_config_word(dev, timing, clocking); |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index bf45cf017753..97e5b090d7c2 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -60,11 +60,11 @@ static void qdi6500_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
60 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 60 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
61 | 61 | ||
62 | if (qdi->fast) { | 62 | if (qdi->fast) { |
63 | active = 8 - FIT(t.active, 1, 8); | 63 | active = 8 - clamp_val(t.active, 1, 8); |
64 | recovery = 18 - FIT(t.recover, 3, 18); | 64 | recovery = 18 - clamp_val(t.recover, 3, 18); |
65 | } else { | 65 | } else { |
66 | active = 9 - FIT(t.active, 2, 9); | 66 | active = 9 - clamp_val(t.active, 2, 9); |
67 | recovery = 15 - FIT(t.recover, 0, 15); | 67 | recovery = 15 - clamp_val(t.recover, 0, 15); |
68 | } | 68 | } |
69 | timing = (recovery << 4) | active | 0x08; | 69 | timing = (recovery << 4) | active | 0x08; |
70 | 70 | ||
@@ -84,11 +84,11 @@ static void qdi6580_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
84 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 84 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
85 | 85 | ||
86 | if (qdi->fast) { | 86 | if (qdi->fast) { |
87 | active = 8 - FIT(t.active, 1, 8); | 87 | active = 8 - clamp_val(t.active, 1, 8); |
88 | recovery = 18 - FIT(t.recover, 3, 18); | 88 | recovery = 18 - clamp_val(t.recover, 3, 18); |
89 | } else { | 89 | } else { |
90 | active = 9 - FIT(t.active, 2, 9); | 90 | active = 9 - clamp_val(t.active, 2, 9); |
91 | recovery = 15 - FIT(t.recover, 0, 15); | 91 | recovery = 15 - clamp_val(t.recover, 0, 15); |
92 | } | 92 | } |
93 | timing = (recovery << 4) | active | 0x08; | 93 | timing = (recovery << 4) | active | 0x08; |
94 | 94 | ||
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index a108d259f19d..f8b3ffc8ae9e 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c | |||
@@ -57,7 +57,9 @@ static inline void rb532_pata_finish_io(struct ata_port *ap) | |||
57 | struct ata_host *ah = ap->host; | 57 | struct ata_host *ah = ap->host; |
58 | struct rb532_cf_info *info = ah->private_data; | 58 | struct rb532_cf_info *info = ah->private_data; |
59 | 59 | ||
60 | ata_sff_altstatus(ap); | 60 | /* FIXME: Keep previous delay. If this is merely a fence then |
61 | ata_sff_sync might be sufficient. */ | ||
62 | ata_sff_dma_pause(ap); | ||
61 | ndelay(RB500_CF_IO_DELAY); | 63 | ndelay(RB500_CF_IO_DELAY); |
62 | 64 | ||
63 | set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); | 65 | set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); |
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index e965b251ca24..bbf5aa345e68 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -726,7 +726,7 @@ static void scc_bmdma_stop (struct ata_queued_cmd *qc) | |||
726 | in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START); | 726 | in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START); |
727 | 727 | ||
728 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ | 728 | /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ |
729 | ata_sff_altstatus(ap); /* dummy read */ | 729 | ata_sff_dma_pause(ap); /* dummy read */ |
730 | } | 730 | } |
731 | 731 | ||
732 | /** | 732 | /** |
@@ -747,7 +747,8 @@ static u8 scc_bmdma_status (struct ata_port *ap) | |||
747 | return host_stat; | 747 | return host_stat; |
748 | 748 | ||
749 | /* errata A252,A308 workaround: Step4 */ | 749 | /* errata A252,A308 workaround: Step4 */ |
750 | if ((ata_sff_altstatus(ap) & ATA_ERR) && (int_status & INTSTS_INTRQ)) | 750 | if ((scc_check_altstatus(ap) & ATA_ERR) |
751 | && (int_status & INTSTS_INTRQ)) | ||
751 | return (host_stat | ATA_DMA_INTR); | 752 | return (host_stat | ATA_DMA_INTR); |
752 | 753 | ||
753 | /* errata A308 workaround Step5 */ | 754 | /* errata A308 workaround Step5 */ |
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 70d94fb28a5f..69877bd81815 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c | |||
@@ -216,7 +216,7 @@ static int sl82c105_qc_defer(struct ata_queued_cmd *qc) | |||
216 | struct ata_port *alt = host->ports[1 ^ qc->ap->port_no]; | 216 | struct ata_port *alt = host->ports[1 ^ qc->ap->port_no]; |
217 | int rc; | 217 | int rc; |
218 | 218 | ||
219 | /* First apply the usual rules */ | 219 | /* First apply the usual rules */ |
220 | rc = ata_std_qc_defer(qc); | 220 | rc = ata_std_qc_defer(qc); |
221 | if (rc != 0) | 221 | if (rc != 0) |
222 | return rc; | 222 | return rc; |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 2fea6cbe7755..708ed144ede9 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -259,15 +259,15 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo | |||
259 | 259 | ||
260 | pci_read_config_byte(pdev, 0x4C, &setup); | 260 | pci_read_config_byte(pdev, 0x4C, &setup); |
261 | setup &= ~(3 << shift); | 261 | setup &= ~(3 << shift); |
262 | setup |= FIT(t.setup, 1, 4) << shift; /* 1,4 or 1,4 - 1 FIXME */ | 262 | setup |= clamp_val(t.setup, 1, 4) << shift; /* 1,4 or 1,4 - 1 FIXME */ |
263 | pci_write_config_byte(pdev, 0x4C, setup); | 263 | pci_write_config_byte(pdev, 0x4C, setup); |
264 | } | 264 | } |
265 | 265 | ||
266 | /* Load the PIO mode bits */ | 266 | /* Load the PIO mode bits */ |
267 | pci_write_config_byte(pdev, 0x4F - ap->port_no, | 267 | pci_write_config_byte(pdev, 0x4F - ap->port_no, |
268 | ((FIT(t.act8b, 1, 16) - 1) << 4) | (FIT(t.rec8b, 1, 16) - 1)); | 268 | ((clamp_val(t.act8b, 1, 16) - 1) << 4) | (clamp_val(t.rec8b, 1, 16) - 1)); |
269 | pci_write_config_byte(pdev, 0x48 + offset, | 269 | pci_write_config_byte(pdev, 0x48 + offset, |
270 | ((FIT(t.active, 1, 16) - 1) << 4) | (FIT(t.recover, 1, 16) - 1)); | 270 | ((clamp_val(t.active, 1, 16) - 1) << 4) | (clamp_val(t.recover, 1, 16) - 1)); |
271 | 271 | ||
272 | /* Load the UDMA bits according to type */ | 272 | /* Load the UDMA bits according to type */ |
273 | switch(udma_type) { | 273 | switch(udma_type) { |
@@ -275,16 +275,16 @@ static void via_do_set_mode(struct ata_port *ap, struct ata_device *adev, int mo | |||
275 | /* BUG() ? */ | 275 | /* BUG() ? */ |
276 | /* fall through */ | 276 | /* fall through */ |
277 | case 33: | 277 | case 33: |
278 | ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 5) - 2)) : 0x03; | 278 | ut = t.udma ? (0xe0 | (clamp_val(t.udma, 2, 5) - 2)) : 0x03; |
279 | break; | 279 | break; |
280 | case 66: | 280 | case 66: |
281 | ut = t.udma ? (0xe8 | (FIT(t.udma, 2, 9) - 2)) : 0x0f; | 281 | ut = t.udma ? (0xe8 | (clamp_val(t.udma, 2, 9) - 2)) : 0x0f; |
282 | break; | 282 | break; |
283 | case 100: | 283 | case 100: |
284 | ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; | 284 | ut = t.udma ? (0xe0 | (clamp_val(t.udma, 2, 9) - 2)) : 0x07; |
285 | break; | 285 | break; |
286 | case 133: | 286 | case 133: |
287 | ut = t.udma ? (0xe0 | (FIT(t.udma, 2, 9) - 2)) : 0x07; | 287 | ut = t.udma ? (0xe0 | (clamp_val(t.udma, 2, 9) - 2)) : 0x07; |
288 | break; | 288 | break; |
289 | } | 289 | } |
290 | 290 | ||
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c index 6e52a3573fbf..474528f8fe3d 100644 --- a/drivers/ata/pata_winbond.c +++ b/drivers/ata/pata_winbond.c | |||
@@ -75,8 +75,8 @@ static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
75 | else | 75 | else |
76 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); | 76 | ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000); |
77 | 77 | ||
78 | active = (FIT(t.active, 3, 17) - 1) & 0x0F; | 78 | active = (clamp_val(t.active, 3, 17) - 1) & 0x0F; |
79 | recovery = (FIT(t.recover, 1, 15) + 1) & 0x0F; | 79 | recovery = (clamp_val(t.recover, 1, 15) + 1) & 0x0F; |
80 | timing = (active << 4) | recovery; | 80 | timing = (active << 4) | recovery; |
81 | winbond_writecfg(winbond->config, timing, reg); | 81 | winbond_writecfg(winbond->config, timing, reg); |
82 | 82 | ||
@@ -87,7 +87,7 @@ static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
87 | reg |= 0x08; /* FIFO off */ | 87 | reg |= 0x08; /* FIFO off */ |
88 | if (!ata_pio_need_iordy(adev)) | 88 | if (!ata_pio_need_iordy(adev)) |
89 | reg |= 0x02; /* IORDY off */ | 89 | reg |= 0x02; /* IORDY off */ |
90 | reg |= (FIT(t.setup, 0, 3) << 6); | 90 | reg |= (clamp_val(t.setup, 0, 3) << 6); |
91 | winbond_writecfg(winbond->config, timing + 1, reg); | 91 | winbond_writecfg(winbond->config, timing + 1, reg); |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 853559e32315..3924e7209a44 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -34,7 +34,7 @@ enum { | |||
34 | 34 | ||
35 | SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 35 | SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
36 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | | 36 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | |
37 | ATA_FLAG_NCQ), | 37 | ATA_FLAG_PMP | ATA_FLAG_NCQ), |
38 | 38 | ||
39 | SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, | 39 | SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, |
40 | SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ | 40 | SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ |
@@ -395,7 +395,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc) | |||
395 | cd = (struct command_desc *)pp->cmdentry + tag; | 395 | cd = (struct command_desc *)pp->cmdentry + tag; |
396 | cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; | 396 | cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; |
397 | 397 | ||
398 | ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); | 398 | ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis); |
399 | 399 | ||
400 | VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", | 400 | VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", |
401 | cd->cfis[0], cd->cfis[1], cd->cfis[2]); | 401 | cd->cfis[0], cd->cfis[1], cd->cfis[2]); |
@@ -438,6 +438,8 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc) | |||
438 | ioread32(CA + hcr_base), | 438 | ioread32(CA + hcr_base), |
439 | ioread32(CE + hcr_base), ioread32(CC + hcr_base)); | 439 | ioread32(CE + hcr_base), ioread32(CC + hcr_base)); |
440 | 440 | ||
441 | iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); | ||
442 | |||
441 | /* Simply queue command to the controller/device */ | 443 | /* Simply queue command to the controller/device */ |
442 | iowrite32(1 << tag, CQ + hcr_base); | 444 | iowrite32(1 << tag, CQ + hcr_base); |
443 | 445 | ||
@@ -558,11 +560,36 @@ static void sata_fsl_thaw(struct ata_port *ap) | |||
558 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); | 560 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); |
559 | } | 561 | } |
560 | 562 | ||
563 | static void sata_fsl_pmp_attach(struct ata_port *ap) | ||
564 | { | ||
565 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | ||
566 | void __iomem *hcr_base = host_priv->hcr_base; | ||
567 | u32 temp; | ||
568 | |||
569 | temp = ioread32(hcr_base + HCONTROL); | ||
570 | iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); | ||
571 | } | ||
572 | |||
573 | static void sata_fsl_pmp_detach(struct ata_port *ap) | ||
574 | { | ||
575 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | ||
576 | void __iomem *hcr_base = host_priv->hcr_base; | ||
577 | u32 temp; | ||
578 | |||
579 | temp = ioread32(hcr_base + HCONTROL); | ||
580 | temp &= ~HCONTROL_PMP_ATTACHED; | ||
581 | iowrite32(temp, hcr_base + HCONTROL); | ||
582 | |||
583 | /* enable interrupts on the controller/port */ | ||
584 | temp = ioread32(hcr_base + HCONTROL); | ||
585 | iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); | ||
586 | |||
587 | } | ||
588 | |||
561 | static int sata_fsl_port_start(struct ata_port *ap) | 589 | static int sata_fsl_port_start(struct ata_port *ap) |
562 | { | 590 | { |
563 | struct device *dev = ap->host->dev; | 591 | struct device *dev = ap->host->dev; |
564 | struct sata_fsl_port_priv *pp; | 592 | struct sata_fsl_port_priv *pp; |
565 | int retval; | ||
566 | void *mem; | 593 | void *mem; |
567 | dma_addr_t mem_dma; | 594 | dma_addr_t mem_dma; |
568 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 595 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
@@ -688,12 +715,13 @@ static int sata_fsl_prereset(struct ata_link *link, unsigned long deadline) | |||
688 | } | 715 | } |
689 | 716 | ||
690 | static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, | 717 | static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, |
691 | unsigned long deadline) | 718 | unsigned long deadline) |
692 | { | 719 | { |
693 | struct ata_port *ap = link->ap; | 720 | struct ata_port *ap = link->ap; |
694 | struct sata_fsl_port_priv *pp = ap->private_data; | 721 | struct sata_fsl_port_priv *pp = ap->private_data; |
695 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 722 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
696 | void __iomem *hcr_base = host_priv->hcr_base; | 723 | void __iomem *hcr_base = host_priv->hcr_base; |
724 | int pmp = sata_srst_pmp(link); | ||
697 | u32 temp; | 725 | u32 temp; |
698 | struct ata_taskfile tf; | 726 | struct ata_taskfile tf; |
699 | u8 *cfis; | 727 | u8 *cfis; |
@@ -703,6 +731,9 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, | |||
703 | 731 | ||
704 | DPRINTK("in xx_softreset\n"); | 732 | DPRINTK("in xx_softreset\n"); |
705 | 733 | ||
734 | if (pmp != SATA_PMP_CTRL_PORT) | ||
735 | goto issue_srst; | ||
736 | |||
706 | try_offline_again: | 737 | try_offline_again: |
707 | /* | 738 | /* |
708 | * Force host controller to go off-line, aborting current operations | 739 | * Force host controller to go off-line, aborting current operations |
@@ -746,6 +777,7 @@ try_offline_again: | |||
746 | 777 | ||
747 | temp = ioread32(hcr_base + HCONTROL); | 778 | temp = ioread32(hcr_base + HCONTROL); |
748 | temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); | 779 | temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); |
780 | temp |= HCONTROL_PMP_ATTACHED; | ||
749 | iowrite32(temp, hcr_base + HCONTROL); | 781 | iowrite32(temp, hcr_base + HCONTROL); |
750 | 782 | ||
751 | temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); | 783 | temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); |
@@ -771,7 +803,8 @@ try_offline_again: | |||
771 | ata_port_printk(ap, KERN_WARNING, | 803 | ata_port_printk(ap, KERN_WARNING, |
772 | "No Device OR PHYRDY change,Hstatus = 0x%x\n", | 804 | "No Device OR PHYRDY change,Hstatus = 0x%x\n", |
773 | ioread32(hcr_base + HSTATUS)); | 805 | ioread32(hcr_base + HSTATUS)); |
774 | goto err; | 806 | *class = ATA_DEV_NONE; |
807 | goto out; | ||
775 | } | 808 | } |
776 | 809 | ||
777 | /* | 810 | /* |
@@ -783,7 +816,8 @@ try_offline_again: | |||
783 | 816 | ||
784 | if ((temp & 0xFF) != 0x18) { | 817 | if ((temp & 0xFF) != 0x18) { |
785 | ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); | 818 | ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); |
786 | goto err; | 819 | *class = ATA_DEV_NONE; |
820 | goto out; | ||
787 | } else { | 821 | } else { |
788 | ata_port_printk(ap, KERN_INFO, | 822 | ata_port_printk(ap, KERN_INFO, |
789 | "Signature Update detected @ %d msecs\n", | 823 | "Signature Update detected @ %d msecs\n", |
@@ -798,6 +832,7 @@ try_offline_again: | |||
798 | * reached here, we can send a command to the target device | 832 | * reached here, we can send a command to the target device |
799 | */ | 833 | */ |
800 | 834 | ||
835 | issue_srst: | ||
801 | DPRINTK("Sending SRST/device reset\n"); | 836 | DPRINTK("Sending SRST/device reset\n"); |
802 | 837 | ||
803 | ata_tf_init(link->device, &tf); | 838 | ata_tf_init(link->device, &tf); |
@@ -808,7 +843,7 @@ try_offline_again: | |||
808 | SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); | 843 | SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); |
809 | 844 | ||
810 | tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ | 845 | tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ |
811 | ata_tf_to_fis(&tf, 0, 0, cfis); | 846 | ata_tf_to_fis(&tf, pmp, 0, cfis); |
812 | 847 | ||
813 | DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", | 848 | DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", |
814 | cfis[0], cfis[1], cfis[2], cfis[3]); | 849 | cfis[0], cfis[1], cfis[2], cfis[3]); |
@@ -854,8 +889,10 @@ try_offline_again: | |||
854 | sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); | 889 | sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); |
855 | 890 | ||
856 | tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ | 891 | tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ |
857 | ata_tf_to_fis(&tf, 0, 0, cfis); | 892 | ata_tf_to_fis(&tf, pmp, 0, cfis); |
858 | 893 | ||
894 | if (pmp != SATA_PMP_CTRL_PORT) | ||
895 | iowrite32(pmp, CQPMP + hcr_base); | ||
859 | iowrite32(1, CQ + hcr_base); | 896 | iowrite32(1, CQ + hcr_base); |
860 | msleep(150); /* ?? */ | 897 | msleep(150); /* ?? */ |
861 | 898 | ||
@@ -886,12 +923,21 @@ try_offline_again: | |||
886 | VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); | 923 | VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); |
887 | } | 924 | } |
888 | 925 | ||
926 | out: | ||
889 | return 0; | 927 | return 0; |
890 | 928 | ||
891 | err: | 929 | err: |
892 | return -EIO; | 930 | return -EIO; |
893 | } | 931 | } |
894 | 932 | ||
933 | static void sata_fsl_error_handler(struct ata_port *ap) | ||
934 | { | ||
935 | |||
936 | DPRINTK("in xx_error_handler\n"); | ||
937 | sata_pmp_error_handler(ap); | ||
938 | |||
939 | } | ||
940 | |||
895 | static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) | 941 | static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) |
896 | { | 942 | { |
897 | if (qc->flags & ATA_QCFLAG_FAILED) | 943 | if (qc->flags & ATA_QCFLAG_FAILED) |
@@ -905,18 +951,21 @@ static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) | |||
905 | 951 | ||
906 | static void sata_fsl_error_intr(struct ata_port *ap) | 952 | static void sata_fsl_error_intr(struct ata_port *ap) |
907 | { | 953 | { |
908 | struct ata_link *link = &ap->link; | ||
909 | struct ata_eh_info *ehi = &link->eh_info; | ||
910 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 954 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
911 | void __iomem *hcr_base = host_priv->hcr_base; | 955 | void __iomem *hcr_base = host_priv->hcr_base; |
912 | u32 hstatus, dereg, cereg = 0, SError = 0; | 956 | u32 hstatus, dereg=0, cereg = 0, SError = 0; |
913 | unsigned int err_mask = 0, action = 0; | 957 | unsigned int err_mask = 0, action = 0; |
914 | struct ata_queued_cmd *qc; | 958 | int freeze = 0, abort=0; |
915 | int freeze = 0; | 959 | struct ata_link *link = NULL; |
960 | struct ata_queued_cmd *qc = NULL; | ||
961 | struct ata_eh_info *ehi; | ||
916 | 962 | ||
917 | hstatus = ioread32(hcr_base + HSTATUS); | 963 | hstatus = ioread32(hcr_base + HSTATUS); |
918 | cereg = ioread32(hcr_base + CE); | 964 | cereg = ioread32(hcr_base + CE); |
919 | 965 | ||
966 | /* first, analyze and record host port events */ | ||
967 | link = &ap->link; | ||
968 | ehi = &link->eh_info; | ||
920 | ata_ehi_clear_desc(ehi); | 969 | ata_ehi_clear_desc(ehi); |
921 | 970 | ||
922 | /* | 971 | /* |
@@ -926,42 +975,28 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
926 | sata_fsl_scr_read(ap, SCR_ERROR, &SError); | 975 | sata_fsl_scr_read(ap, SCR_ERROR, &SError); |
927 | if (unlikely(SError & 0xFFFF0000)) { | 976 | if (unlikely(SError & 0xFFFF0000)) { |
928 | sata_fsl_scr_write(ap, SCR_ERROR, SError); | 977 | sata_fsl_scr_write(ap, SCR_ERROR, SError); |
929 | err_mask |= AC_ERR_ATA_BUS; | ||
930 | } | 978 | } |
931 | 979 | ||
932 | DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", | 980 | DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", |
933 | hstatus, cereg, ioread32(hcr_base + DE), SError); | 981 | hstatus, cereg, ioread32(hcr_base + DE), SError); |
934 | 982 | ||
935 | /* handle single device errors */ | 983 | /* handle fatal errors */ |
936 | if (cereg) { | 984 | if (hstatus & FATAL_ERROR_DECODE) { |
937 | /* | 985 | ehi->err_mask |= AC_ERR_ATA_BUS; |
938 | * clear the command error, also clears queue to the device | 986 | ehi->action |= ATA_EH_SOFTRESET; |
939 | * in error, and we can (re)issue commands to this device. | ||
940 | * When a device is in error all commands queued into the | ||
941 | * host controller and at the device are considered aborted | ||
942 | * and the queue for that device is stopped. Now, after | ||
943 | * clearing the device error, we can issue commands to the | ||
944 | * device to interrogate it to find the source of the error. | ||
945 | */ | ||
946 | dereg = ioread32(hcr_base + DE); | ||
947 | iowrite32(dereg, hcr_base + DE); | ||
948 | iowrite32(cereg, hcr_base + CE); | ||
949 | 987 | ||
950 | DPRINTK("single device error, CE=0x%x, DE=0x%x\n", | ||
951 | ioread32(hcr_base + CE), ioread32(hcr_base + DE)); | ||
952 | /* | 988 | /* |
953 | * We should consider this as non fatal error, and TF must | 989 | * Ignore serror in case of fatal errors as we always want |
954 | * be updated as done below. | 990 | * to do a soft-reset of the FSL SATA controller. Analyzing |
991 | * serror may cause libata to schedule a hard-reset action, | ||
992 | * and hard-reset currently does not do controller | ||
993 | * offline/online, causing command timeouts and leads to an | ||
994 | * un-recoverable state, hence make libATA ignore | ||
995 | * autopsy in case of fatal errors. | ||
955 | */ | 996 | */ |
956 | 997 | ||
957 | err_mask |= AC_ERR_DEV; | 998 | ehi->flags |= ATA_EHI_NO_AUTOPSY; |
958 | } | ||
959 | 999 | ||
960 | /* handle fatal errors */ | ||
961 | if (hstatus & FATAL_ERROR_DECODE) { | ||
962 | err_mask |= AC_ERR_ATA_BUS; | ||
963 | action |= ATA_EH_RESET; | ||
964 | /* how will fatal error interrupts be completed ?? */ | ||
965 | freeze = 1; | 1000 | freeze = 1; |
966 | } | 1001 | } |
967 | 1002 | ||
@@ -971,30 +1006,83 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
971 | 1006 | ||
972 | /* Setup a soft-reset EH action */ | 1007 | /* Setup a soft-reset EH action */ |
973 | ata_ehi_hotplugged(ehi); | 1008 | ata_ehi_hotplugged(ehi); |
1009 | ata_ehi_push_desc(ehi, "%s", "PHY RDY changed"); | ||
974 | freeze = 1; | 1010 | freeze = 1; |
975 | } | 1011 | } |
976 | 1012 | ||
977 | /* record error info */ | 1013 | /* handle single device errors */ |
978 | qc = ata_qc_from_tag(ap, link->active_tag); | 1014 | if (cereg) { |
1015 | /* | ||
1016 | * clear the command error, also clears queue to the device | ||
1017 | * in error, and we can (re)issue commands to this device. | ||
1018 | * When a device is in error all commands queued into the | ||
1019 | * host controller and at the device are considered aborted | ||
1020 | * and the queue for that device is stopped. Now, after | ||
1021 | * clearing the device error, we can issue commands to the | ||
1022 | * device to interrogate it to find the source of the error. | ||
1023 | */ | ||
1024 | abort = 1; | ||
1025 | |||
1026 | DPRINTK("single device error, CE=0x%x, DE=0x%x\n", | ||
1027 | ioread32(hcr_base + CE), ioread32(hcr_base + DE)); | ||
979 | 1028 | ||
980 | if (qc) | 1029 | /* find out the offending link and qc */ |
1030 | if (ap->nr_pmp_links) { | ||
1031 | dereg = ioread32(hcr_base + DE); | ||
1032 | iowrite32(dereg, hcr_base + DE); | ||
1033 | iowrite32(cereg, hcr_base + CE); | ||
1034 | |||
1035 | if (dereg < ap->nr_pmp_links) { | ||
1036 | link = &ap->pmp_link[dereg]; | ||
1037 | ehi = &link->eh_info; | ||
1038 | qc = ata_qc_from_tag(ap, link->active_tag); | ||
1039 | /* | ||
1040 | * We should consider this as non fatal error, | ||
1041 | * and TF must be updated as done below. | ||
1042 | */ | ||
1043 | |||
1044 | err_mask |= AC_ERR_DEV; | ||
1045 | |||
1046 | } else { | ||
1047 | err_mask |= AC_ERR_HSM; | ||
1048 | action |= ATA_EH_HARDRESET; | ||
1049 | freeze = 1; | ||
1050 | } | ||
1051 | } else { | ||
1052 | dereg = ioread32(hcr_base + DE); | ||
1053 | iowrite32(dereg, hcr_base + DE); | ||
1054 | iowrite32(cereg, hcr_base + CE); | ||
1055 | |||
1056 | qc = ata_qc_from_tag(ap, link->active_tag); | ||
1057 | /* | ||
1058 | * We should consider this as non fatal error, | ||
1059 | * and TF must be updated as done below. | ||
1060 | */ | ||
1061 | err_mask |= AC_ERR_DEV; | ||
1062 | } | ||
1063 | } | ||
1064 | |||
1065 | /* record error info */ | ||
1066 | if (qc) { | ||
981 | qc->err_mask |= err_mask; | 1067 | qc->err_mask |= err_mask; |
982 | else | 1068 | } else |
983 | ehi->err_mask |= err_mask; | 1069 | ehi->err_mask |= err_mask; |
984 | 1070 | ||
985 | ehi->action |= action; | 1071 | ehi->action |= action; |
986 | ehi->serror |= SError; | ||
987 | 1072 | ||
988 | /* freeze or abort */ | 1073 | /* freeze or abort */ |
989 | if (freeze) | 1074 | if (freeze) |
990 | ata_port_freeze(ap); | 1075 | ata_port_freeze(ap); |
991 | else | 1076 | else if (abort) { |
992 | ata_port_abort(ap); | 1077 | if (qc) |
1078 | ata_link_abort(qc->dev->link); | ||
1079 | else | ||
1080 | ata_port_abort(ap); | ||
1081 | } | ||
993 | } | 1082 | } |
994 | 1083 | ||
995 | static void sata_fsl_host_intr(struct ata_port *ap) | 1084 | static void sata_fsl_host_intr(struct ata_port *ap) |
996 | { | 1085 | { |
997 | struct ata_link *link = &ap->link; | ||
998 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 1086 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
999 | void __iomem *hcr_base = host_priv->hcr_base; | 1087 | void __iomem *hcr_base = host_priv->hcr_base; |
1000 | u32 hstatus, qc_active = 0; | 1088 | u32 hstatus, qc_active = 0; |
@@ -1017,10 +1105,19 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1017 | return; | 1105 | return; |
1018 | } | 1106 | } |
1019 | 1107 | ||
1020 | if (link->sactive) { /* only true for NCQ commands */ | 1108 | /* Read command completed register */ |
1109 | qc_active = ioread32(hcr_base + CC); | ||
1110 | |||
1111 | VPRINTK("Status of all queues :\n"); | ||
1112 | VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", | ||
1113 | qc_active, | ||
1114 | ioread32(hcr_base + CA), | ||
1115 | ioread32(hcr_base + CE), | ||
1116 | ioread32(hcr_base + CQ), | ||
1117 | ap->qc_active); | ||
1118 | |||
1119 | if (qc_active & ap->qc_active) { | ||
1021 | int i; | 1120 | int i; |
1022 | /* Read command completed register */ | ||
1023 | qc_active = ioread32(hcr_base + CC); | ||
1024 | /* clear CC bit, this will also complete the interrupt */ | 1121 | /* clear CC bit, this will also complete the interrupt */ |
1025 | iowrite32(qc_active, hcr_base + CC); | 1122 | iowrite32(qc_active, hcr_base + CC); |
1026 | 1123 | ||
@@ -1032,8 +1129,9 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1032 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { | 1129 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { |
1033 | if (qc_active & (1 << i)) { | 1130 | if (qc_active & (1 << i)) { |
1034 | qc = ata_qc_from_tag(ap, i); | 1131 | qc = ata_qc_from_tag(ap, i); |
1035 | if (qc) | 1132 | if (qc) { |
1036 | ata_qc_complete(qc); | 1133 | ata_qc_complete(qc); |
1134 | } | ||
1037 | DPRINTK | 1135 | DPRINTK |
1038 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", | 1136 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", |
1039 | i, ioread32(hcr_base + CC), | 1137 | i, ioread32(hcr_base + CC), |
@@ -1042,19 +1140,21 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1042 | } | 1140 | } |
1043 | return; | 1141 | return; |
1044 | 1142 | ||
1045 | } else if (ap->qc_active) { | 1143 | } else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) { |
1046 | iowrite32(1, hcr_base + CC); | 1144 | iowrite32(1, hcr_base + CC); |
1047 | qc = ata_qc_from_tag(ap, link->active_tag); | 1145 | qc = ata_qc_from_tag(ap, ATA_TAG_INTERNAL); |
1048 | 1146 | ||
1049 | DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", | 1147 | DPRINTK("completing non-ncq cmd, CC=0x%x\n", |
1050 | link->active_tag, ioread32(hcr_base + CC)); | 1148 | ioread32(hcr_base + CC)); |
1051 | 1149 | ||
1052 | if (qc) | 1150 | if (qc) { |
1053 | ata_qc_complete(qc); | 1151 | ata_qc_complete(qc); |
1152 | } | ||
1054 | } else { | 1153 | } else { |
1055 | /* Spurious Interrupt!! */ | 1154 | /* Spurious Interrupt!! */ |
1056 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", | 1155 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", |
1057 | ioread32(hcr_base + CC)); | 1156 | ioread32(hcr_base + CC)); |
1157 | iowrite32(qc_active, hcr_base + CC); | ||
1058 | return; | 1158 | return; |
1059 | } | 1159 | } |
1060 | } | 1160 | } |
@@ -1130,9 +1230,6 @@ static int sata_fsl_init_controller(struct ata_host *host) | |||
1130 | iowrite32(0x00000FFFF, hcr_base + CE); | 1230 | iowrite32(0x00000FFFF, hcr_base + CE); |
1131 | iowrite32(0x00000FFFF, hcr_base + DE); | 1231 | iowrite32(0x00000FFFF, hcr_base + DE); |
1132 | 1232 | ||
1133 | /* initially assuming no Port multiplier, set CQPMP to 0 */ | ||
1134 | iowrite32(0x0, hcr_base + CQPMP); | ||
1135 | |||
1136 | /* | 1233 | /* |
1137 | * host controller will be brought on-line, during xx_port_start() | 1234 | * host controller will be brought on-line, during xx_port_start() |
1138 | * callback, that should also initiate the OOB, COMINIT sequence | 1235 | * callback, that should also initiate the OOB, COMINIT sequence |
@@ -1154,8 +1251,8 @@ static struct scsi_host_template sata_fsl_sht = { | |||
1154 | .dma_boundary = ATA_DMA_BOUNDARY, | 1251 | .dma_boundary = ATA_DMA_BOUNDARY, |
1155 | }; | 1252 | }; |
1156 | 1253 | ||
1157 | static const struct ata_port_operations sata_fsl_ops = { | 1254 | static struct ata_port_operations sata_fsl_ops = { |
1158 | .inherits = &sata_port_ops, | 1255 | .inherits = &sata_pmp_port_ops, |
1159 | 1256 | ||
1160 | .qc_prep = sata_fsl_qc_prep, | 1257 | .qc_prep = sata_fsl_qc_prep, |
1161 | .qc_issue = sata_fsl_qc_issue, | 1258 | .qc_issue = sata_fsl_qc_issue, |
@@ -1168,10 +1265,15 @@ static const struct ata_port_operations sata_fsl_ops = { | |||
1168 | .thaw = sata_fsl_thaw, | 1265 | .thaw = sata_fsl_thaw, |
1169 | .prereset = sata_fsl_prereset, | 1266 | .prereset = sata_fsl_prereset, |
1170 | .softreset = sata_fsl_softreset, | 1267 | .softreset = sata_fsl_softreset, |
1268 | .pmp_softreset = sata_fsl_softreset, | ||
1269 | .error_handler = sata_fsl_error_handler, | ||
1171 | .post_internal_cmd = sata_fsl_post_internal_cmd, | 1270 | .post_internal_cmd = sata_fsl_post_internal_cmd, |
1172 | 1271 | ||
1173 | .port_start = sata_fsl_port_start, | 1272 | .port_start = sata_fsl_port_start, |
1174 | .port_stop = sata_fsl_port_stop, | 1273 | .port_stop = sata_fsl_port_stop, |
1274 | |||
1275 | .pmp_attach = sata_fsl_pmp_attach, | ||
1276 | .pmp_detach = sata_fsl_pmp_detach, | ||
1175 | }; | 1277 | }; |
1176 | 1278 | ||
1177 | static const struct ata_port_info sata_fsl_port_info[] = { | 1279 | static const struct ata_port_info sata_fsl_port_info[] = { |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index bb73b2222627..60391e9a84db 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -72,7 +72,7 @@ | |||
72 | #include <linux/libata.h> | 72 | #include <linux/libata.h> |
73 | 73 | ||
74 | #define DRV_NAME "sata_mv" | 74 | #define DRV_NAME "sata_mv" |
75 | #define DRV_VERSION "1.20" | 75 | #define DRV_VERSION "1.24" |
76 | 76 | ||
77 | enum { | 77 | enum { |
78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ | 78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ |
@@ -122,14 +122,17 @@ enum { | |||
122 | /* Host Flags */ | 122 | /* Host Flags */ |
123 | MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ | 123 | MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ |
124 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ | 124 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ |
125 | /* SoC integrated controllers, no PCI interface */ | ||
126 | MV_FLAG_SOC = (1 << 28), | ||
127 | 125 | ||
128 | MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 126 | MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
129 | ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | | 127 | ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | |
130 | ATA_FLAG_PIO_POLLING, | 128 | ATA_FLAG_PIO_POLLING, |
129 | |||
131 | MV_6XXX_FLAGS = MV_FLAG_IRQ_COALESCE, | 130 | MV_6XXX_FLAGS = MV_FLAG_IRQ_COALESCE, |
132 | 131 | ||
132 | MV_GENIIE_FLAGS = MV_COMMON_FLAGS | MV_6XXX_FLAGS | | ||
133 | ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA | | ||
134 | ATA_FLAG_NCQ | ATA_FLAG_AN, | ||
135 | |||
133 | CRQB_FLAG_READ = (1 << 0), | 136 | CRQB_FLAG_READ = (1 << 0), |
134 | CRQB_TAG_SHIFT = 1, | 137 | CRQB_TAG_SHIFT = 1, |
135 | CRQB_IOID_SHIFT = 6, /* CRQB Gen-II/IIE IO Id shift */ | 138 | CRQB_IOID_SHIFT = 6, /* CRQB Gen-II/IIE IO Id shift */ |
@@ -197,13 +200,6 @@ enum { | |||
197 | HC_MAIN_RSVD = (0x7f << 25), /* bits 31-25 */ | 200 | HC_MAIN_RSVD = (0x7f << 25), /* bits 31-25 */ |
198 | HC_MAIN_RSVD_5 = (0x1fff << 19), /* bits 31-19 */ | 201 | HC_MAIN_RSVD_5 = (0x1fff << 19), /* bits 31-19 */ |
199 | HC_MAIN_RSVD_SOC = (0x3fffffb << 6), /* bits 31-9, 7-6 */ | 202 | HC_MAIN_RSVD_SOC = (0x3fffffb << 6), /* bits 31-9, 7-6 */ |
200 | HC_MAIN_MASKED_IRQS = (TRAN_LO_DONE | TRAN_HI_DONE | | ||
201 | PORTS_0_3_COAL_DONE | PORTS_4_7_COAL_DONE | | ||
202 | PORTS_0_7_COAL_DONE | GPIO_INT | TWSI_INT | | ||
203 | HC_MAIN_RSVD), | ||
204 | HC_MAIN_MASKED_IRQS_5 = (PORTS_0_3_COAL_DONE | PORTS_4_7_COAL_DONE | | ||
205 | HC_MAIN_RSVD_5), | ||
206 | HC_MAIN_MASKED_IRQS_SOC = (PORTS_0_3_COAL_DONE | HC_MAIN_RSVD_SOC), | ||
207 | 203 | ||
208 | /* SATAHC registers */ | 204 | /* SATAHC registers */ |
209 | HC_CFG_OFS = 0, | 205 | HC_CFG_OFS = 0, |
@@ -221,12 +217,18 @@ enum { | |||
221 | SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */ | 217 | SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */ |
222 | SATA_ACTIVE_OFS = 0x350, | 218 | SATA_ACTIVE_OFS = 0x350, |
223 | SATA_FIS_IRQ_CAUSE_OFS = 0x364, | 219 | SATA_FIS_IRQ_CAUSE_OFS = 0x364, |
220 | SATA_FIS_IRQ_AN = (1 << 9), /* async notification */ | ||
224 | 221 | ||
225 | LTMODE_OFS = 0x30c, | 222 | LTMODE_OFS = 0x30c, |
226 | LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */ | 223 | LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */ |
227 | 224 | ||
228 | PHY_MODE3 = 0x310, | 225 | PHY_MODE3 = 0x310, |
229 | PHY_MODE4 = 0x314, | 226 | PHY_MODE4 = 0x314, |
227 | PHY_MODE4_CFG_MASK = 0x00000003, /* phy internal config field */ | ||
228 | PHY_MODE4_CFG_VALUE = 0x00000001, /* phy internal config field */ | ||
229 | PHY_MODE4_RSVD_ZEROS = 0x5de3fffa, /* Gen2e always write zeros */ | ||
230 | PHY_MODE4_RSVD_ONES = 0x00000005, /* Gen2e always write ones */ | ||
231 | |||
230 | PHY_MODE2 = 0x330, | 232 | PHY_MODE2 = 0x330, |
231 | SATA_IFCTL_OFS = 0x344, | 233 | SATA_IFCTL_OFS = 0x344, |
232 | SATA_TESTCTL_OFS = 0x348, | 234 | SATA_TESTCTL_OFS = 0x348, |
@@ -357,12 +359,12 @@ enum { | |||
357 | MV_HP_ERRATA_50XXB2 = (1 << 2), | 359 | MV_HP_ERRATA_50XXB2 = (1 << 2), |
358 | MV_HP_ERRATA_60X1B2 = (1 << 3), | 360 | MV_HP_ERRATA_60X1B2 = (1 << 3), |
359 | MV_HP_ERRATA_60X1C0 = (1 << 4), | 361 | MV_HP_ERRATA_60X1C0 = (1 << 4), |
360 | MV_HP_ERRATA_XX42A0 = (1 << 5), | ||
361 | MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ | 362 | MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ |
362 | MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ | 363 | MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ |
363 | MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ | 364 | MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ |
364 | MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ | 365 | MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ |
365 | MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ | 366 | MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ |
367 | MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */ | ||
366 | 368 | ||
367 | /* Port private flags (pp_flags) */ | 369 | /* Port private flags (pp_flags) */ |
368 | MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ | 370 | MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ |
@@ -375,7 +377,7 @@ enum { | |||
375 | #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) | 377 | #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) |
376 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) | 378 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) |
377 | #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) | 379 | #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) |
378 | #define HAS_PCI(host) (!((host)->ports[0]->flags & MV_FLAG_SOC)) | 380 | #define IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC) |
379 | 381 | ||
380 | #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) | 382 | #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) |
381 | #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) | 383 | #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) |
@@ -459,6 +461,7 @@ struct mv_port_signal { | |||
459 | 461 | ||
460 | struct mv_host_priv { | 462 | struct mv_host_priv { |
461 | u32 hp_flags; | 463 | u32 hp_flags; |
464 | u32 main_irq_mask; | ||
462 | struct mv_port_signal signal[8]; | 465 | struct mv_port_signal signal[8]; |
463 | const struct mv_hw_ops *ops; | 466 | const struct mv_hw_ops *ops; |
464 | int n_ports; | 467 | int n_ports; |
@@ -640,25 +643,19 @@ static const struct ata_port_info mv_port_info[] = { | |||
640 | .port_ops = &mv6_ops, | 643 | .port_ops = &mv6_ops, |
641 | }, | 644 | }, |
642 | { /* chip_6042 */ | 645 | { /* chip_6042 */ |
643 | .flags = MV_COMMON_FLAGS | MV_6XXX_FLAGS | | 646 | .flags = MV_GENIIE_FLAGS, |
644 | ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA | | ||
645 | ATA_FLAG_NCQ, | ||
646 | .pio_mask = 0x1f, /* pio0-4 */ | 647 | .pio_mask = 0x1f, /* pio0-4 */ |
647 | .udma_mask = ATA_UDMA6, | 648 | .udma_mask = ATA_UDMA6, |
648 | .port_ops = &mv_iie_ops, | 649 | .port_ops = &mv_iie_ops, |
649 | }, | 650 | }, |
650 | { /* chip_7042 */ | 651 | { /* chip_7042 */ |
651 | .flags = MV_COMMON_FLAGS | MV_6XXX_FLAGS | | 652 | .flags = MV_GENIIE_FLAGS, |
652 | ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA | | ||
653 | ATA_FLAG_NCQ, | ||
654 | .pio_mask = 0x1f, /* pio0-4 */ | 653 | .pio_mask = 0x1f, /* pio0-4 */ |
655 | .udma_mask = ATA_UDMA6, | 654 | .udma_mask = ATA_UDMA6, |
656 | .port_ops = &mv_iie_ops, | 655 | .port_ops = &mv_iie_ops, |
657 | }, | 656 | }, |
658 | { /* chip_soc */ | 657 | { /* chip_soc */ |
659 | .flags = MV_COMMON_FLAGS | MV_6XXX_FLAGS | | 658 | .flags = MV_GENIIE_FLAGS, |
660 | ATA_FLAG_PMP | ATA_FLAG_ACPI_SATA | | ||
661 | ATA_FLAG_NCQ | MV_FLAG_SOC, | ||
662 | .pio_mask = 0x1f, /* pio0-4 */ | 659 | .pio_mask = 0x1f, /* pio0-4 */ |
663 | .udma_mask = ATA_UDMA6, | 660 | .udma_mask = ATA_UDMA6, |
664 | .port_ops = &mv_iie_ops, | 661 | .port_ops = &mv_iie_ops, |
@@ -818,12 +815,7 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, | |||
818 | writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); | 815 | writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); |
819 | writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, | 816 | writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, |
820 | port_mmio + EDMA_REQ_Q_IN_PTR_OFS); | 817 | port_mmio + EDMA_REQ_Q_IN_PTR_OFS); |
821 | 818 | writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | |
822 | if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) | ||
823 | writelfl((pp->crqb_dma & 0xffffffff) | index, | ||
824 | port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | ||
825 | else | ||
826 | writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | ||
827 | 819 | ||
828 | /* | 820 | /* |
829 | * initialize response queue | 821 | * initialize response queue |
@@ -833,17 +825,38 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, | |||
833 | 825 | ||
834 | WARN_ON(pp->crpb_dma & 0xff); | 826 | WARN_ON(pp->crpb_dma & 0xff); |
835 | writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); | 827 | writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); |
836 | 828 | writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | |
837 | if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) | ||
838 | writelfl((pp->crpb_dma & 0xffffffff) | index, | ||
839 | port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | ||
840 | else | ||
841 | writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | ||
842 | |||
843 | writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, | 829 | writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, |
844 | port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); | 830 | port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); |
845 | } | 831 | } |
846 | 832 | ||
833 | static void mv_set_main_irq_mask(struct ata_host *host, | ||
834 | u32 disable_bits, u32 enable_bits) | ||
835 | { | ||
836 | struct mv_host_priv *hpriv = host->private_data; | ||
837 | u32 old_mask, new_mask; | ||
838 | |||
839 | old_mask = hpriv->main_irq_mask; | ||
840 | new_mask = (old_mask & ~disable_bits) | enable_bits; | ||
841 | if (new_mask != old_mask) { | ||
842 | hpriv->main_irq_mask = new_mask; | ||
843 | writelfl(new_mask, hpriv->main_irq_mask_addr); | ||
844 | } | ||
845 | } | ||
846 | |||
847 | static void mv_enable_port_irqs(struct ata_port *ap, | ||
848 | unsigned int port_bits) | ||
849 | { | ||
850 | unsigned int shift, hardport, port = ap->port_no; | ||
851 | u32 disable_bits, enable_bits; | ||
852 | |||
853 | MV_PORT_TO_SHIFT_AND_HARDPORT(port, shift, hardport); | ||
854 | |||
855 | disable_bits = (DONE_IRQ | ERR_IRQ) << shift; | ||
856 | enable_bits = port_bits << shift; | ||
857 | mv_set_main_irq_mask(ap->host, disable_bits, enable_bits); | ||
858 | } | ||
859 | |||
847 | /** | 860 | /** |
848 | * mv_start_dma - Enable eDMA engine | 861 | * mv_start_dma - Enable eDMA engine |
849 | * @base: port base address | 862 | * @base: port base address |
@@ -886,9 +899,11 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio, | |||
886 | mv_edma_cfg(ap, want_ncq); | 899 | mv_edma_cfg(ap, want_ncq); |
887 | 900 | ||
888 | /* clear FIS IRQ Cause */ | 901 | /* clear FIS IRQ Cause */ |
889 | writelfl(0, port_mmio + SATA_FIS_IRQ_CAUSE_OFS); | 902 | if (IS_GEN_IIE(hpriv)) |
903 | writelfl(0, port_mmio + SATA_FIS_IRQ_CAUSE_OFS); | ||
890 | 904 | ||
891 | mv_set_edma_ptrs(port_mmio, hpriv, pp); | 905 | mv_set_edma_ptrs(port_mmio, hpriv, pp); |
906 | mv_enable_port_irqs(ap, DONE_IRQ|ERR_IRQ); | ||
892 | 907 | ||
893 | writelfl(EDMA_EN, port_mmio + EDMA_CMD_OFS); | 908 | writelfl(EDMA_EN, port_mmio + EDMA_CMD_OFS); |
894 | pp->pp_flags |= MV_PP_FLAG_EDMA_EN; | 909 | pp->pp_flags |= MV_PP_FLAG_EDMA_EN; |
@@ -1231,7 +1246,7 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq) | |||
1231 | 1246 | ||
1232 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ | 1247 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ |
1233 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ | 1248 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ |
1234 | if (HAS_PCI(ap->host)) | 1249 | if (!IS_SOC(hpriv)) |
1235 | cfg |= (1 << 18); /* enab early completion */ | 1250 | cfg |= (1 << 18); /* enab early completion */ |
1236 | if (hpriv->hp_flags & MV_HP_CUT_THROUGH) | 1251 | if (hpriv->hp_flags & MV_HP_CUT_THROUGH) |
1237 | cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ | 1252 | cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ |
@@ -1341,6 +1356,7 @@ out_port_free_dma_mem: | |||
1341 | static void mv_port_stop(struct ata_port *ap) | 1356 | static void mv_port_stop(struct ata_port *ap) |
1342 | { | 1357 | { |
1343 | mv_stop_edma(ap); | 1358 | mv_stop_edma(ap); |
1359 | mv_enable_port_irqs(ap, 0); | ||
1344 | mv_port_free_dma_mem(ap); | 1360 | mv_port_free_dma_mem(ap); |
1345 | } | 1361 | } |
1346 | 1362 | ||
@@ -1582,6 +1598,7 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc) | |||
1582 | * shadow block, etc registers. | 1598 | * shadow block, etc registers. |
1583 | */ | 1599 | */ |
1584 | mv_stop_edma(ap); | 1600 | mv_stop_edma(ap); |
1601 | mv_enable_port_irqs(ap, ERR_IRQ); | ||
1585 | mv_pmp_select(ap, qc->dev->link->pmp); | 1602 | mv_pmp_select(ap, qc->dev->link->pmp); |
1586 | return ata_sff_qc_issue(qc); | 1603 | return ata_sff_qc_issue(qc); |
1587 | } | 1604 | } |
@@ -1670,6 +1687,18 @@ static void mv_pmp_eh_prep(struct ata_port *ap, unsigned int pmp_map) | |||
1670 | } | 1687 | } |
1671 | } | 1688 | } |
1672 | 1689 | ||
1690 | static int mv_req_q_empty(struct ata_port *ap) | ||
1691 | { | ||
1692 | void __iomem *port_mmio = mv_ap_base(ap); | ||
1693 | u32 in_ptr, out_ptr; | ||
1694 | |||
1695 | in_ptr = (readl(port_mmio + EDMA_REQ_Q_IN_PTR_OFS) | ||
1696 | >> EDMA_REQ_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK; | ||
1697 | out_ptr = (readl(port_mmio + EDMA_REQ_Q_OUT_PTR_OFS) | ||
1698 | >> EDMA_REQ_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK; | ||
1699 | return (in_ptr == out_ptr); /* 1 == queue_is_empty */ | ||
1700 | } | ||
1701 | |||
1673 | static int mv_handle_fbs_ncq_dev_err(struct ata_port *ap) | 1702 | static int mv_handle_fbs_ncq_dev_err(struct ata_port *ap) |
1674 | { | 1703 | { |
1675 | struct mv_port_priv *pp = ap->private_data; | 1704 | struct mv_port_priv *pp = ap->private_data; |
@@ -1703,7 +1732,7 @@ static int mv_handle_fbs_ncq_dev_err(struct ata_port *ap) | |||
1703 | ap->qc_active, failed_links, | 1732 | ap->qc_active, failed_links, |
1704 | ap->nr_active_links); | 1733 | ap->nr_active_links); |
1705 | 1734 | ||
1706 | if (ap->nr_active_links <= failed_links) { | 1735 | if (ap->nr_active_links <= failed_links && mv_req_q_empty(ap)) { |
1707 | mv_process_crpb_entries(ap, pp); | 1736 | mv_process_crpb_entries(ap, pp); |
1708 | mv_stop_edma(ap); | 1737 | mv_stop_edma(ap); |
1709 | mv_eh_freeze(ap); | 1738 | mv_eh_freeze(ap); |
@@ -1812,6 +1841,7 @@ static void mv_err_intr(struct ata_port *ap) | |||
1812 | { | 1841 | { |
1813 | void __iomem *port_mmio = mv_ap_base(ap); | 1842 | void __iomem *port_mmio = mv_ap_base(ap); |
1814 | u32 edma_err_cause, eh_freeze_mask, serr = 0; | 1843 | u32 edma_err_cause, eh_freeze_mask, serr = 0; |
1844 | u32 fis_cause = 0; | ||
1815 | struct mv_port_priv *pp = ap->private_data; | 1845 | struct mv_port_priv *pp = ap->private_data; |
1816 | struct mv_host_priv *hpriv = ap->host->private_data; | 1846 | struct mv_host_priv *hpriv = ap->host->private_data; |
1817 | unsigned int action = 0, err_mask = 0; | 1847 | unsigned int action = 0, err_mask = 0; |
@@ -1821,16 +1851,19 @@ static void mv_err_intr(struct ata_port *ap) | |||
1821 | 1851 | ||
1822 | /* | 1852 | /* |
1823 | * Read and clear the SError and err_cause bits. | 1853 | * Read and clear the SError and err_cause bits. |
1854 | * For GenIIe, if EDMA_ERR_TRANS_IRQ_7 is set, we also must read/clear | ||
1855 | * the FIS_IRQ_CAUSE register before clearing edma_err_cause. | ||
1824 | */ | 1856 | */ |
1825 | sata_scr_read(&ap->link, SCR_ERROR, &serr); | 1857 | sata_scr_read(&ap->link, SCR_ERROR, &serr); |
1826 | sata_scr_write_flush(&ap->link, SCR_ERROR, serr); | 1858 | sata_scr_write_flush(&ap->link, SCR_ERROR, serr); |
1827 | 1859 | ||
1828 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 1860 | edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
1861 | if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) { | ||
1862 | fis_cause = readl(port_mmio + SATA_FIS_IRQ_CAUSE_OFS); | ||
1863 | writelfl(~fis_cause, port_mmio + SATA_FIS_IRQ_CAUSE_OFS); | ||
1864 | } | ||
1829 | writelfl(~edma_err_cause, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 1865 | writelfl(~edma_err_cause, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
1830 | 1866 | ||
1831 | ata_port_printk(ap, KERN_INFO, "%s: err_cause=%08x pp_flags=0x%x\n", | ||
1832 | __func__, edma_err_cause, pp->pp_flags); | ||
1833 | |||
1834 | if (edma_err_cause & EDMA_ERR_DEV) { | 1867 | if (edma_err_cause & EDMA_ERR_DEV) { |
1835 | /* | 1868 | /* |
1836 | * Device errors during FIS-based switching operation | 1869 | * Device errors during FIS-based switching operation |
@@ -1844,6 +1877,18 @@ static void mv_err_intr(struct ata_port *ap) | |||
1844 | ata_ehi_clear_desc(ehi); | 1877 | ata_ehi_clear_desc(ehi); |
1845 | ata_ehi_push_desc(ehi, "edma_err_cause=%08x pp_flags=%08x", | 1878 | ata_ehi_push_desc(ehi, "edma_err_cause=%08x pp_flags=%08x", |
1846 | edma_err_cause, pp->pp_flags); | 1879 | edma_err_cause, pp->pp_flags); |
1880 | |||
1881 | if (IS_GEN_IIE(hpriv) && (edma_err_cause & EDMA_ERR_TRANS_IRQ_7)) { | ||
1882 | ata_ehi_push_desc(ehi, "fis_cause=%08x", fis_cause); | ||
1883 | if (fis_cause & SATA_FIS_IRQ_AN) { | ||
1884 | u32 ec = edma_err_cause & | ||
1885 | ~(EDMA_ERR_TRANS_IRQ_7 | EDMA_ERR_IRQ_TRANSIENT); | ||
1886 | sata_async_notification(ap); | ||
1887 | if (!ec) | ||
1888 | return; /* Just an AN; no need for the nukes */ | ||
1889 | ata_ehi_push_desc(ehi, "SDB notify"); | ||
1890 | } | ||
1891 | } | ||
1847 | /* | 1892 | /* |
1848 | * All generations share these EDMA error cause bits: | 1893 | * All generations share these EDMA error cause bits: |
1849 | */ | 1894 | */ |
@@ -2162,20 +2207,20 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance) | |||
2162 | struct ata_host *host = dev_instance; | 2207 | struct ata_host *host = dev_instance; |
2163 | struct mv_host_priv *hpriv = host->private_data; | 2208 | struct mv_host_priv *hpriv = host->private_data; |
2164 | unsigned int handled = 0; | 2209 | unsigned int handled = 0; |
2165 | u32 main_irq_cause, main_irq_mask; | 2210 | u32 main_irq_cause, pending_irqs; |
2166 | 2211 | ||
2167 | spin_lock(&host->lock); | 2212 | spin_lock(&host->lock); |
2168 | main_irq_cause = readl(hpriv->main_irq_cause_addr); | 2213 | main_irq_cause = readl(hpriv->main_irq_cause_addr); |
2169 | main_irq_mask = readl(hpriv->main_irq_mask_addr); | 2214 | pending_irqs = main_irq_cause & hpriv->main_irq_mask; |
2170 | /* | 2215 | /* |
2171 | * Deal with cases where we either have nothing pending, or have read | 2216 | * Deal with cases where we either have nothing pending, or have read |
2172 | * a bogus register value which can indicate HW removal or PCI fault. | 2217 | * a bogus register value which can indicate HW removal or PCI fault. |
2173 | */ | 2218 | */ |
2174 | if ((main_irq_cause & main_irq_mask) && (main_irq_cause != 0xffffffffU)) { | 2219 | if (pending_irqs && main_irq_cause != 0xffffffffU) { |
2175 | if (unlikely((main_irq_cause & PCI_ERR) && HAS_PCI(host))) | 2220 | if (unlikely((pending_irqs & PCI_ERR) && !IS_SOC(hpriv))) |
2176 | handled = mv_pci_error(host, hpriv->base); | 2221 | handled = mv_pci_error(host, hpriv->base); |
2177 | else | 2222 | else |
2178 | handled = mv_host_intr(host, main_irq_cause); | 2223 | handled = mv_host_intr(host, pending_irqs); |
2179 | } | 2224 | } |
2180 | spin_unlock(&host->lock); | 2225 | spin_unlock(&host->lock); |
2181 | return IRQ_RETVAL(handled); | 2226 | return IRQ_RETVAL(handled); |
@@ -2373,7 +2418,6 @@ static void mv_reset_pci_bus(struct ata_host *host, void __iomem *mmio) | |||
2373 | ZERO(MV_PCI_DISC_TIMER); | 2418 | ZERO(MV_PCI_DISC_TIMER); |
2374 | ZERO(MV_PCI_MSI_TRIGGER); | 2419 | ZERO(MV_PCI_MSI_TRIGGER); |
2375 | writel(0x000100ff, mmio + MV_PCI_XBAR_TMOUT_OFS); | 2420 | writel(0x000100ff, mmio + MV_PCI_XBAR_TMOUT_OFS); |
2376 | ZERO(PCI_HC_MAIN_IRQ_MASK_OFS); | ||
2377 | ZERO(MV_PCI_SERR_MASK); | 2421 | ZERO(MV_PCI_SERR_MASK); |
2378 | ZERO(hpriv->irq_cause_ofs); | 2422 | ZERO(hpriv->irq_cause_ofs); |
2379 | ZERO(hpriv->irq_mask_ofs); | 2423 | ZERO(hpriv->irq_mask_ofs); |
@@ -2495,7 +2539,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2495 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2539 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2496 | int fix_phy_mode4 = | 2540 | int fix_phy_mode4 = |
2497 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2541 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2498 | u32 m2, tmp; | 2542 | u32 m2, m3; |
2499 | 2543 | ||
2500 | if (fix_phy_mode2) { | 2544 | if (fix_phy_mode2) { |
2501 | m2 = readl(port_mmio + PHY_MODE2); | 2545 | m2 = readl(port_mmio + PHY_MODE2); |
@@ -2512,28 +2556,36 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2512 | udelay(200); | 2556 | udelay(200); |
2513 | } | 2557 | } |
2514 | 2558 | ||
2515 | /* who knows what this magic does */ | 2559 | /* |
2516 | tmp = readl(port_mmio + PHY_MODE3); | 2560 | * Gen-II/IIe PHY_MODE3 errata RM#2: |
2517 | tmp &= ~0x7F800000; | 2561 | * Achieves better receiver noise performance than the h/w default: |
2518 | tmp |= 0x2A800000; | 2562 | */ |
2519 | writel(tmp, port_mmio + PHY_MODE3); | 2563 | m3 = readl(port_mmio + PHY_MODE3); |
2520 | 2564 | m3 = (m3 & 0x1f) | (0x5555601 << 5); | |
2521 | if (fix_phy_mode4) { | ||
2522 | u32 m4; | ||
2523 | |||
2524 | m4 = readl(port_mmio + PHY_MODE4); | ||
2525 | |||
2526 | if (hp_flags & MV_HP_ERRATA_60X1B2) | ||
2527 | tmp = readl(port_mmio + PHY_MODE3); | ||
2528 | 2565 | ||
2529 | /* workaround for errata FEr SATA#10 (part 1) */ | 2566 | /* Guideline 88F5182 (GL# SATA-S11) */ |
2530 | m4 = (m4 & ~(1 << 1)) | (1 << 0); | 2567 | if (IS_SOC(hpriv)) |
2568 | m3 &= ~0x1c; | ||
2531 | 2569 | ||
2570 | if (fix_phy_mode4) { | ||
2571 | u32 m4 = readl(port_mmio + PHY_MODE4); | ||
2572 | /* | ||
2573 | * Enforce reserved-bit restrictions on GenIIe devices only. | ||
2574 | * For earlier chipsets, force only the internal config field | ||
2575 | * (workaround for errata FEr SATA#10 part 1). | ||
2576 | */ | ||
2577 | if (IS_GEN_IIE(hpriv)) | ||
2578 | m4 = (m4 & ~PHY_MODE4_RSVD_ZEROS) | PHY_MODE4_RSVD_ONES; | ||
2579 | else | ||
2580 | m4 = (m4 & ~PHY_MODE4_CFG_MASK) | PHY_MODE4_CFG_VALUE; | ||
2532 | writel(m4, port_mmio + PHY_MODE4); | 2581 | writel(m4, port_mmio + PHY_MODE4); |
2533 | |||
2534 | if (hp_flags & MV_HP_ERRATA_60X1B2) | ||
2535 | writel(tmp, port_mmio + PHY_MODE3); | ||
2536 | } | 2582 | } |
2583 | /* | ||
2584 | * Workaround for 60x1-B2 errata SATA#13: | ||
2585 | * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3, | ||
2586 | * so we must always rewrite PHY_MODE3 after PHY_MODE4. | ||
2587 | */ | ||
2588 | writel(m3, port_mmio + PHY_MODE3); | ||
2537 | 2589 | ||
2538 | /* Revert values of pre-emphasis and signal amps to the saved ones */ | 2590 | /* Revert values of pre-emphasis and signal amps to the saved ones */ |
2539 | m2 = readl(port_mmio + PHY_MODE2); | 2591 | m2 = readl(port_mmio + PHY_MODE2); |
@@ -2728,6 +2780,7 @@ static int mv_hardreset(struct ata_link *link, unsigned int *class, | |||
2728 | 2780 | ||
2729 | rc = sata_link_hardreset(link, timing, deadline + extra, | 2781 | rc = sata_link_hardreset(link, timing, deadline + extra, |
2730 | &online, NULL); | 2782 | &online, NULL); |
2783 | rc = online ? -EAGAIN : rc; | ||
2731 | if (rc) | 2784 | if (rc) |
2732 | return rc; | 2785 | return rc; |
2733 | sata_scr_read(link, SCR_STATUS, &sstatus); | 2786 | sata_scr_read(link, SCR_STATUS, &sstatus); |
@@ -2744,32 +2797,18 @@ static int mv_hardreset(struct ata_link *link, unsigned int *class, | |||
2744 | 2797 | ||
2745 | static void mv_eh_freeze(struct ata_port *ap) | 2798 | static void mv_eh_freeze(struct ata_port *ap) |
2746 | { | 2799 | { |
2747 | struct mv_host_priv *hpriv = ap->host->private_data; | ||
2748 | unsigned int shift, hardport, port = ap->port_no; | ||
2749 | u32 main_irq_mask; | ||
2750 | |||
2751 | /* FIXME: handle coalescing completion events properly */ | ||
2752 | |||
2753 | mv_stop_edma(ap); | 2800 | mv_stop_edma(ap); |
2754 | MV_PORT_TO_SHIFT_AND_HARDPORT(port, shift, hardport); | 2801 | mv_enable_port_irqs(ap, 0); |
2755 | |||
2756 | /* disable assertion of portN err, done events */ | ||
2757 | main_irq_mask = readl(hpriv->main_irq_mask_addr); | ||
2758 | main_irq_mask &= ~((DONE_IRQ | ERR_IRQ) << shift); | ||
2759 | writelfl(main_irq_mask, hpriv->main_irq_mask_addr); | ||
2760 | } | 2802 | } |
2761 | 2803 | ||
2762 | static void mv_eh_thaw(struct ata_port *ap) | 2804 | static void mv_eh_thaw(struct ata_port *ap) |
2763 | { | 2805 | { |
2764 | struct mv_host_priv *hpriv = ap->host->private_data; | 2806 | struct mv_host_priv *hpriv = ap->host->private_data; |
2765 | unsigned int shift, hardport, port = ap->port_no; | 2807 | unsigned int port = ap->port_no; |
2808 | unsigned int hardport = mv_hardport_from_port(port); | ||
2766 | void __iomem *hc_mmio = mv_hc_base_from_port(hpriv->base, port); | 2809 | void __iomem *hc_mmio = mv_hc_base_from_port(hpriv->base, port); |
2767 | void __iomem *port_mmio = mv_ap_base(ap); | 2810 | void __iomem *port_mmio = mv_ap_base(ap); |
2768 | u32 main_irq_mask, hc_irq_cause; | 2811 | u32 hc_irq_cause; |
2769 | |||
2770 | /* FIXME: handle coalescing completion events properly */ | ||
2771 | |||
2772 | MV_PORT_TO_SHIFT_AND_HARDPORT(port, shift, hardport); | ||
2773 | 2812 | ||
2774 | /* clear EDMA errors on this port */ | 2813 | /* clear EDMA errors on this port */ |
2775 | writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); | 2814 | writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS); |
@@ -2779,10 +2818,7 @@ static void mv_eh_thaw(struct ata_port *ap) | |||
2779 | hc_irq_cause &= ~((DEV_IRQ | DMA_IRQ) << hardport); | 2818 | hc_irq_cause &= ~((DEV_IRQ | DMA_IRQ) << hardport); |
2780 | writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS); | 2819 | writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS); |
2781 | 2820 | ||
2782 | /* enable assertion of portN err, done events */ | 2821 | mv_enable_port_irqs(ap, ERR_IRQ); |
2783 | main_irq_mask = readl(hpriv->main_irq_mask_addr); | ||
2784 | main_irq_mask |= ((DONE_IRQ | ERR_IRQ) << shift); | ||
2785 | writelfl(main_irq_mask, hpriv->main_irq_mask_addr); | ||
2786 | } | 2822 | } |
2787 | 2823 | ||
2788 | /** | 2824 | /** |
@@ -2840,7 +2876,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host) | |||
2840 | void __iomem *mmio = hpriv->base; | 2876 | void __iomem *mmio = hpriv->base; |
2841 | u32 reg; | 2877 | u32 reg; |
2842 | 2878 | ||
2843 | if (!HAS_PCI(host) || !IS_PCIE(hpriv)) | 2879 | if (IS_SOC(hpriv) || !IS_PCIE(hpriv)) |
2844 | return 0; /* not PCI-X capable */ | 2880 | return 0; /* not PCI-X capable */ |
2845 | reg = readl(mmio + MV_PCI_MODE_OFS); | 2881 | reg = readl(mmio + MV_PCI_MODE_OFS); |
2846 | if ((reg & MV_PCI_MODE_MASK) == 0) | 2882 | if ((reg & MV_PCI_MODE_MASK) == 0) |
@@ -2967,10 +3003,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) | |||
2967 | hp_flags |= MV_HP_CUT_THROUGH; | 3003 | hp_flags |= MV_HP_CUT_THROUGH; |
2968 | 3004 | ||
2969 | switch (pdev->revision) { | 3005 | switch (pdev->revision) { |
2970 | case 0x0: | 3006 | case 0x2: /* Rev.B0: the first/only public release */ |
2971 | hp_flags |= MV_HP_ERRATA_XX42A0; | ||
2972 | break; | ||
2973 | case 0x1: | ||
2974 | hp_flags |= MV_HP_ERRATA_60X1C0; | 3007 | hp_flags |= MV_HP_ERRATA_60X1C0; |
2975 | break; | 3008 | break; |
2976 | default: | 3009 | default: |
@@ -2982,7 +3015,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) | |||
2982 | break; | 3015 | break; |
2983 | case chip_soc: | 3016 | case chip_soc: |
2984 | hpriv->ops = &mv_soc_ops; | 3017 | hpriv->ops = &mv_soc_ops; |
2985 | hp_flags |= MV_HP_ERRATA_60X1C0; | 3018 | hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0; |
2986 | break; | 3019 | break; |
2987 | 3020 | ||
2988 | default: | 3021 | default: |
@@ -3026,16 +3059,16 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3026 | if (rc) | 3059 | if (rc) |
3027 | goto done; | 3060 | goto done; |
3028 | 3061 | ||
3029 | if (HAS_PCI(host)) { | 3062 | if (IS_SOC(hpriv)) { |
3030 | hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; | ||
3031 | hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; | ||
3032 | } else { | ||
3033 | hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; | 3063 | hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; |
3034 | hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; | 3064 | hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; |
3065 | } else { | ||
3066 | hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; | ||
3067 | hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; | ||
3035 | } | 3068 | } |
3036 | 3069 | ||
3037 | /* global interrupt mask: 0 == mask everything */ | 3070 | /* global interrupt mask: 0 == mask everything */ |
3038 | writel(0, hpriv->main_irq_mask_addr); | 3071 | mv_set_main_irq_mask(host, ~0, 0); |
3039 | 3072 | ||
3040 | n_hc = mv_get_hc_count(host->ports[0]->flags); | 3073 | n_hc = mv_get_hc_count(host->ports[0]->flags); |
3041 | 3074 | ||
@@ -3057,7 +3090,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3057 | mv_port_init(&ap->ioaddr, port_mmio); | 3090 | mv_port_init(&ap->ioaddr, port_mmio); |
3058 | 3091 | ||
3059 | #ifdef CONFIG_PCI | 3092 | #ifdef CONFIG_PCI |
3060 | if (HAS_PCI(host)) { | 3093 | if (!IS_SOC(hpriv)) { |
3061 | unsigned int offset = port_mmio - mmio; | 3094 | unsigned int offset = port_mmio - mmio; |
3062 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); | 3095 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); |
3063 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); | 3096 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); |
@@ -3077,31 +3110,18 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3077 | writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); | 3110 | writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); |
3078 | } | 3111 | } |
3079 | 3112 | ||
3080 | if (HAS_PCI(host)) { | 3113 | if (!IS_SOC(hpriv)) { |
3081 | /* Clear any currently outstanding host interrupt conditions */ | 3114 | /* Clear any currently outstanding host interrupt conditions */ |
3082 | writelfl(0, mmio + hpriv->irq_cause_ofs); | 3115 | writelfl(0, mmio + hpriv->irq_cause_ofs); |
3083 | 3116 | ||
3084 | /* and unmask interrupt generation for host regs */ | 3117 | /* and unmask interrupt generation for host regs */ |
3085 | writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs); | 3118 | writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs); |
3086 | if (IS_GEN_I(hpriv)) | 3119 | |
3087 | writelfl(~HC_MAIN_MASKED_IRQS_5, | 3120 | /* |
3088 | hpriv->main_irq_mask_addr); | 3121 | * enable only global host interrupts for now. |
3089 | else | 3122 | * The per-port interrupts get done later as ports are set up. |
3090 | writelfl(~HC_MAIN_MASKED_IRQS, | 3123 | */ |
3091 | hpriv->main_irq_mask_addr); | 3124 | mv_set_main_irq_mask(host, 0, PCI_ERR); |
3092 | |||
3093 | VPRINTK("HC MAIN IRQ cause/mask=0x%08x/0x%08x " | ||
3094 | "PCI int cause/mask=0x%08x/0x%08x\n", | ||
3095 | readl(hpriv->main_irq_cause_addr), | ||
3096 | readl(hpriv->main_irq_mask_addr), | ||
3097 | readl(mmio + hpriv->irq_cause_ofs), | ||
3098 | readl(mmio + hpriv->irq_mask_ofs)); | ||
3099 | } else { | ||
3100 | writelfl(~HC_MAIN_MASKED_IRQS_SOC, | ||
3101 | hpriv->main_irq_mask_addr); | ||
3102 | VPRINTK("HC MAIN IRQ cause/mask=0x%08x/0x%08x\n", | ||
3103 | readl(hpriv->main_irq_cause_addr), | ||
3104 | readl(hpriv->main_irq_mask_addr)); | ||
3105 | } | 3125 | } |
3106 | done: | 3126 | done: |
3107 | return rc; | 3127 | return rc; |
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 5a10dc5048ad..030665ba76b7 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -53,7 +53,15 @@ enum { | |||
53 | PDC_MMIO_BAR = 3, | 53 | PDC_MMIO_BAR = 3, |
54 | PDC_MAX_PRD = LIBATA_MAX_PRD - 1, /* -1 for ASIC PRD bug workaround */ | 54 | PDC_MAX_PRD = LIBATA_MAX_PRD - 1, /* -1 for ASIC PRD bug workaround */ |
55 | 55 | ||
56 | /* register offsets */ | 56 | /* host register offsets (from host->iomap[PDC_MMIO_BAR]) */ |
57 | PDC_INT_SEQMASK = 0x40, /* Mask of asserted SEQ INTs */ | ||
58 | PDC_FLASH_CTL = 0x44, /* Flash control register */ | ||
59 | PDC_SATA_PLUG_CSR = 0x6C, /* SATA Plug control/status reg */ | ||
60 | PDC2_SATA_PLUG_CSR = 0x60, /* SATAII Plug control/status reg */ | ||
61 | PDC_TBG_MODE = 0x41C, /* TBG mode (not SATAII) */ | ||
62 | PDC_SLEW_CTL = 0x470, /* slew rate control reg (not SATAII) */ | ||
63 | |||
64 | /* per-port ATA register offsets (from ap->ioaddr.cmd_addr) */ | ||
57 | PDC_FEATURE = 0x04, /* Feature/Error reg (per port) */ | 65 | PDC_FEATURE = 0x04, /* Feature/Error reg (per port) */ |
58 | PDC_SECTOR_COUNT = 0x08, /* Sector count reg (per port) */ | 66 | PDC_SECTOR_COUNT = 0x08, /* Sector count reg (per port) */ |
59 | PDC_SECTOR_NUMBER = 0x0C, /* Sector number reg (per port) */ | 67 | PDC_SECTOR_NUMBER = 0x0C, /* Sector number reg (per port) */ |
@@ -63,14 +71,11 @@ enum { | |||
63 | PDC_COMMAND = 0x1C, /* Command/status reg (per port) */ | 71 | PDC_COMMAND = 0x1C, /* Command/status reg (per port) */ |
64 | PDC_ALTSTATUS = 0x38, /* Alternate-status/device-control reg (per port) */ | 72 | PDC_ALTSTATUS = 0x38, /* Alternate-status/device-control reg (per port) */ |
65 | PDC_PKT_SUBMIT = 0x40, /* Command packet pointer addr */ | 73 | PDC_PKT_SUBMIT = 0x40, /* Command packet pointer addr */ |
66 | PDC_INT_SEQMASK = 0x40, /* Mask of asserted SEQ INTs */ | ||
67 | PDC_FLASH_CTL = 0x44, /* Flash control register */ | ||
68 | PDC_GLOBAL_CTL = 0x48, /* Global control/status (per port) */ | 74 | PDC_GLOBAL_CTL = 0x48, /* Global control/status (per port) */ |
69 | PDC_CTLSTAT = 0x60, /* IDE control and status (per port) */ | 75 | PDC_CTLSTAT = 0x60, /* IDE control and status (per port) */ |
70 | PDC_SATA_PLUG_CSR = 0x6C, /* SATA Plug control/status reg */ | 76 | |
71 | PDC2_SATA_PLUG_CSR = 0x60, /* SATAII Plug control/status reg */ | 77 | /* per-port SATA register offsets (from ap->ioaddr.scr_addr) */ |
72 | PDC_TBG_MODE = 0x41C, /* TBG mode (not SATAII) */ | 78 | PDC_PHYMODE4 = 0x14, |
73 | PDC_SLEW_CTL = 0x470, /* slew rate control reg (not SATAII) */ | ||
74 | 79 | ||
75 | /* PDC_GLOBAL_CTL bit definitions */ | 80 | /* PDC_GLOBAL_CTL bit definitions */ |
76 | PDC_PH_ERR = (1 << 8), /* PCI error while loading packet */ | 81 | PDC_PH_ERR = (1 << 8), /* PCI error while loading packet */ |
@@ -134,7 +139,7 @@ struct pdc_port_priv { | |||
134 | 139 | ||
135 | static int pdc_sata_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); | 140 | static int pdc_sata_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); |
136 | static int pdc_sata_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); | 141 | static int pdc_sata_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); |
137 | static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); | 142 | static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
138 | static int pdc_common_port_start(struct ata_port *ap); | 143 | static int pdc_common_port_start(struct ata_port *ap); |
139 | static int pdc_sata_port_start(struct ata_port *ap); | 144 | static int pdc_sata_port_start(struct ata_port *ap); |
140 | static void pdc_qc_prep(struct ata_queued_cmd *qc); | 145 | static void pdc_qc_prep(struct ata_queued_cmd *qc); |
@@ -332,12 +337,12 @@ static int pdc_sata_port_start(struct ata_port *ap) | |||
332 | 337 | ||
333 | /* fix up PHYMODE4 align timing */ | 338 | /* fix up PHYMODE4 align timing */ |
334 | if (ap->flags & PDC_FLAG_GEN_II) { | 339 | if (ap->flags & PDC_FLAG_GEN_II) { |
335 | void __iomem *mmio = ap->ioaddr.scr_addr; | 340 | void __iomem *sata_mmio = ap->ioaddr.scr_addr; |
336 | unsigned int tmp; | 341 | unsigned int tmp; |
337 | 342 | ||
338 | tmp = readl(mmio + 0x014); | 343 | tmp = readl(sata_mmio + PDC_PHYMODE4); |
339 | tmp = (tmp & ~3) | 1; /* set bits 1:0 = 0:1 */ | 344 | tmp = (tmp & ~3) | 1; /* set bits 1:0 = 0:1 */ |
340 | writel(tmp, mmio + 0x014); | 345 | writel(tmp, sata_mmio + PDC_PHYMODE4); |
341 | } | 346 | } |
342 | 347 | ||
343 | return 0; | 348 | return 0; |
@@ -345,32 +350,32 @@ static int pdc_sata_port_start(struct ata_port *ap) | |||
345 | 350 | ||
346 | static void pdc_reset_port(struct ata_port *ap) | 351 | static void pdc_reset_port(struct ata_port *ap) |
347 | { | 352 | { |
348 | void __iomem *mmio = ap->ioaddr.cmd_addr + PDC_CTLSTAT; | 353 | void __iomem *ata_ctlstat_mmio = ap->ioaddr.cmd_addr + PDC_CTLSTAT; |
349 | unsigned int i; | 354 | unsigned int i; |
350 | u32 tmp; | 355 | u32 tmp; |
351 | 356 | ||
352 | for (i = 11; i > 0; i--) { | 357 | for (i = 11; i > 0; i--) { |
353 | tmp = readl(mmio); | 358 | tmp = readl(ata_ctlstat_mmio); |
354 | if (tmp & PDC_RESET) | 359 | if (tmp & PDC_RESET) |
355 | break; | 360 | break; |
356 | 361 | ||
357 | udelay(100); | 362 | udelay(100); |
358 | 363 | ||
359 | tmp |= PDC_RESET; | 364 | tmp |= PDC_RESET; |
360 | writel(tmp, mmio); | 365 | writel(tmp, ata_ctlstat_mmio); |
361 | } | 366 | } |
362 | 367 | ||
363 | tmp &= ~PDC_RESET; | 368 | tmp &= ~PDC_RESET; |
364 | writel(tmp, mmio); | 369 | writel(tmp, ata_ctlstat_mmio); |
365 | readl(mmio); /* flush */ | 370 | readl(ata_ctlstat_mmio); /* flush */ |
366 | } | 371 | } |
367 | 372 | ||
368 | static int pdc_pata_cable_detect(struct ata_port *ap) | 373 | static int pdc_pata_cable_detect(struct ata_port *ap) |
369 | { | 374 | { |
370 | u8 tmp; | 375 | u8 tmp; |
371 | void __iomem *mmio = ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03; | 376 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; |
372 | 377 | ||
373 | tmp = readb(mmio); | 378 | tmp = readb(ata_mmio + PDC_CTLSTAT + 3); |
374 | if (tmp & 0x01) | 379 | if (tmp & 0x01) |
375 | return ATA_CBL_PATA40; | 380 | return ATA_CBL_PATA40; |
376 | return ATA_CBL_PATA80; | 381 | return ATA_CBL_PATA80; |
@@ -557,31 +562,25 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc) | |||
557 | switch (qc->tf.protocol) { | 562 | switch (qc->tf.protocol) { |
558 | case ATA_PROT_DMA: | 563 | case ATA_PROT_DMA: |
559 | pdc_fill_sg(qc); | 564 | pdc_fill_sg(qc); |
560 | /* fall through */ | 565 | /*FALLTHROUGH*/ |
561 | |||
562 | case ATA_PROT_NODATA: | 566 | case ATA_PROT_NODATA: |
563 | i = pdc_pkt_header(&qc->tf, qc->ap->prd_dma, | 567 | i = pdc_pkt_header(&qc->tf, qc->ap->prd_dma, |
564 | qc->dev->devno, pp->pkt); | 568 | qc->dev->devno, pp->pkt); |
565 | |||
566 | if (qc->tf.flags & ATA_TFLAG_LBA48) | 569 | if (qc->tf.flags & ATA_TFLAG_LBA48) |
567 | i = pdc_prep_lba48(&qc->tf, pp->pkt, i); | 570 | i = pdc_prep_lba48(&qc->tf, pp->pkt, i); |
568 | else | 571 | else |
569 | i = pdc_prep_lba28(&qc->tf, pp->pkt, i); | 572 | i = pdc_prep_lba28(&qc->tf, pp->pkt, i); |
570 | |||
571 | pdc_pkt_footer(&qc->tf, pp->pkt, i); | 573 | pdc_pkt_footer(&qc->tf, pp->pkt, i); |
572 | break; | 574 | break; |
573 | |||
574 | case ATAPI_PROT_PIO: | 575 | case ATAPI_PROT_PIO: |
575 | pdc_fill_sg(qc); | 576 | pdc_fill_sg(qc); |
576 | break; | 577 | break; |
577 | |||
578 | case ATAPI_PROT_DMA: | 578 | case ATAPI_PROT_DMA: |
579 | pdc_fill_sg(qc); | 579 | pdc_fill_sg(qc); |
580 | /*FALLTHROUGH*/ | 580 | /*FALLTHROUGH*/ |
581 | case ATAPI_PROT_NODATA: | 581 | case ATAPI_PROT_NODATA: |
582 | pdc_atapi_pkt(qc); | 582 | pdc_atapi_pkt(qc); |
583 | break; | 583 | break; |
584 | |||
585 | default: | 584 | default: |
586 | break; | 585 | break; |
587 | } | 586 | } |
@@ -611,7 +610,7 @@ static unsigned int pdc_sata_ata_port_to_ata_no(const struct ata_port *ap) | |||
611 | unsigned int nr_ports = pdc_sata_nr_ports(ap); | 610 | unsigned int nr_ports = pdc_sata_nr_ports(ap); |
612 | unsigned int i; | 611 | unsigned int i; |
613 | 612 | ||
614 | for(i = 0; i < nr_ports && host->ports[i] != ap; ++i) | 613 | for (i = 0; i < nr_ports && host->ports[i] != ap; ++i) |
615 | ; | 614 | ; |
616 | BUG_ON(i >= nr_ports); | 615 | BUG_ON(i >= nr_ports); |
617 | return pdc_port_no_to_ata_no(i, pdc_is_sataii_tx4(ap->flags)); | 616 | return pdc_port_no_to_ata_no(i, pdc_is_sataii_tx4(ap->flags)); |
@@ -624,14 +623,14 @@ static unsigned int pdc_sata_hotplug_offset(const struct ata_port *ap) | |||
624 | 623 | ||
625 | static void pdc_freeze(struct ata_port *ap) | 624 | static void pdc_freeze(struct ata_port *ap) |
626 | { | 625 | { |
627 | void __iomem *mmio = ap->ioaddr.cmd_addr; | 626 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; |
628 | u32 tmp; | 627 | u32 tmp; |
629 | 628 | ||
630 | tmp = readl(mmio + PDC_CTLSTAT); | 629 | tmp = readl(ata_mmio + PDC_CTLSTAT); |
631 | tmp |= PDC_IRQ_DISABLE; | 630 | tmp |= PDC_IRQ_DISABLE; |
632 | tmp &= ~PDC_DMA_ENABLE; | 631 | tmp &= ~PDC_DMA_ENABLE; |
633 | writel(tmp, mmio + PDC_CTLSTAT); | 632 | writel(tmp, ata_mmio + PDC_CTLSTAT); |
634 | readl(mmio + PDC_CTLSTAT); /* flush */ | 633 | readl(ata_mmio + PDC_CTLSTAT); /* flush */ |
635 | } | 634 | } |
636 | 635 | ||
637 | static void pdc_sata_freeze(struct ata_port *ap) | 636 | static void pdc_sata_freeze(struct ata_port *ap) |
@@ -659,17 +658,17 @@ static void pdc_sata_freeze(struct ata_port *ap) | |||
659 | 658 | ||
660 | static void pdc_thaw(struct ata_port *ap) | 659 | static void pdc_thaw(struct ata_port *ap) |
661 | { | 660 | { |
662 | void __iomem *mmio = ap->ioaddr.cmd_addr; | 661 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; |
663 | u32 tmp; | 662 | u32 tmp; |
664 | 663 | ||
665 | /* clear IRQ */ | 664 | /* clear IRQ */ |
666 | readl(mmio + PDC_INT_SEQMASK); | 665 | readl(ata_mmio + PDC_COMMAND); |
667 | 666 | ||
668 | /* turn IRQ back on */ | 667 | /* turn IRQ back on */ |
669 | tmp = readl(mmio + PDC_CTLSTAT); | 668 | tmp = readl(ata_mmio + PDC_CTLSTAT); |
670 | tmp &= ~PDC_IRQ_DISABLE; | 669 | tmp &= ~PDC_IRQ_DISABLE; |
671 | writel(tmp, mmio + PDC_CTLSTAT); | 670 | writel(tmp, ata_mmio + PDC_CTLSTAT); |
672 | readl(mmio + PDC_CTLSTAT); /* flush */ | 671 | readl(ata_mmio + PDC_CTLSTAT); /* flush */ |
673 | } | 672 | } |
674 | 673 | ||
675 | static void pdc_sata_thaw(struct ata_port *ap) | 674 | static void pdc_sata_thaw(struct ata_port *ap) |
@@ -743,11 +742,11 @@ static void pdc_error_intr(struct ata_port *ap, struct ata_queued_cmd *qc, | |||
743 | ata_port_abort(ap); | 742 | ata_port_abort(ap); |
744 | } | 743 | } |
745 | 744 | ||
746 | static inline unsigned int pdc_host_intr(struct ata_port *ap, | 745 | static unsigned int pdc_host_intr(struct ata_port *ap, |
747 | struct ata_queued_cmd *qc) | 746 | struct ata_queued_cmd *qc) |
748 | { | 747 | { |
749 | unsigned int handled = 0; | 748 | unsigned int handled = 0; |
750 | void __iomem *port_mmio = ap->ioaddr.cmd_addr; | 749 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; |
751 | u32 port_status, err_mask; | 750 | u32 port_status, err_mask; |
752 | 751 | ||
753 | err_mask = PDC_ERR_MASK; | 752 | err_mask = PDC_ERR_MASK; |
@@ -755,7 +754,7 @@ static inline unsigned int pdc_host_intr(struct ata_port *ap, | |||
755 | err_mask &= ~PDC1_ERR_MASK; | 754 | err_mask &= ~PDC1_ERR_MASK; |
756 | else | 755 | else |
757 | err_mask &= ~PDC2_ERR_MASK; | 756 | err_mask &= ~PDC2_ERR_MASK; |
758 | port_status = readl(port_mmio + PDC_GLOBAL_CTL); | 757 | port_status = readl(ata_mmio + PDC_GLOBAL_CTL); |
759 | if (unlikely(port_status & err_mask)) { | 758 | if (unlikely(port_status & err_mask)) { |
760 | pdc_error_intr(ap, qc, port_status, err_mask); | 759 | pdc_error_intr(ap, qc, port_status, err_mask); |
761 | return 1; | 760 | return 1; |
@@ -770,7 +769,6 @@ static inline unsigned int pdc_host_intr(struct ata_port *ap, | |||
770 | ata_qc_complete(qc); | 769 | ata_qc_complete(qc); |
771 | handled = 1; | 770 | handled = 1; |
772 | break; | 771 | break; |
773 | |||
774 | default: | 772 | default: |
775 | ap->stats.idle_irq++; | 773 | ap->stats.idle_irq++; |
776 | break; | 774 | break; |
@@ -781,10 +779,9 @@ static inline unsigned int pdc_host_intr(struct ata_port *ap, | |||
781 | 779 | ||
782 | static void pdc_irq_clear(struct ata_port *ap) | 780 | static void pdc_irq_clear(struct ata_port *ap) |
783 | { | 781 | { |
784 | struct ata_host *host = ap->host; | 782 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; |
785 | void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; | ||
786 | 783 | ||
787 | readl(mmio + PDC_INT_SEQMASK); | 784 | readl(ata_mmio + PDC_COMMAND); |
788 | } | 785 | } |
789 | 786 | ||
790 | static irqreturn_t pdc_interrupt(int irq, void *dev_instance) | 787 | static irqreturn_t pdc_interrupt(int irq, void *dev_instance) |
@@ -794,7 +791,7 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance) | |||
794 | u32 mask = 0; | 791 | u32 mask = 0; |
795 | unsigned int i, tmp; | 792 | unsigned int i, tmp; |
796 | unsigned int handled = 0; | 793 | unsigned int handled = 0; |
797 | void __iomem *mmio_base; | 794 | void __iomem *host_mmio; |
798 | unsigned int hotplug_offset, ata_no; | 795 | unsigned int hotplug_offset, ata_no; |
799 | u32 hotplug_status; | 796 | u32 hotplug_status; |
800 | int is_sataii_tx4; | 797 | int is_sataii_tx4; |
@@ -806,7 +803,7 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance) | |||
806 | return IRQ_NONE; | 803 | return IRQ_NONE; |
807 | } | 804 | } |
808 | 805 | ||
809 | mmio_base = host->iomap[PDC_MMIO_BAR]; | 806 | host_mmio = host->iomap[PDC_MMIO_BAR]; |
810 | 807 | ||
811 | spin_lock(&host->lock); | 808 | spin_lock(&host->lock); |
812 | 809 | ||
@@ -815,26 +812,26 @@ static irqreturn_t pdc_interrupt(int irq, void *dev_instance) | |||
815 | hotplug_offset = PDC2_SATA_PLUG_CSR; | 812 | hotplug_offset = PDC2_SATA_PLUG_CSR; |
816 | else | 813 | else |
817 | hotplug_offset = PDC_SATA_PLUG_CSR; | 814 | hotplug_offset = PDC_SATA_PLUG_CSR; |
818 | hotplug_status = readl(mmio_base + hotplug_offset); | 815 | hotplug_status = readl(host_mmio + hotplug_offset); |
819 | if (hotplug_status & 0xff) | 816 | if (hotplug_status & 0xff) |
820 | writel(hotplug_status | 0xff, mmio_base + hotplug_offset); | 817 | writel(hotplug_status | 0xff, host_mmio + hotplug_offset); |
821 | hotplug_status &= 0xff; /* clear uninteresting bits */ | 818 | hotplug_status &= 0xff; /* clear uninteresting bits */ |
822 | 819 | ||
823 | /* reading should also clear interrupts */ | 820 | /* reading should also clear interrupts */ |
824 | mask = readl(mmio_base + PDC_INT_SEQMASK); | 821 | mask = readl(host_mmio + PDC_INT_SEQMASK); |
825 | 822 | ||
826 | if (mask == 0xffffffff && hotplug_status == 0) { | 823 | if (mask == 0xffffffff && hotplug_status == 0) { |
827 | VPRINTK("QUICK EXIT 2\n"); | 824 | VPRINTK("QUICK EXIT 2\n"); |
828 | goto done_irq; | 825 | goto done_irq; |
829 | } | 826 | } |
830 | 827 | ||
831 | mask &= 0xffff; /* only 16 tags possible */ | 828 | mask &= 0xffff; /* only 16 SEQIDs possible */ |
832 | if (mask == 0 && hotplug_status == 0) { | 829 | if (mask == 0 && hotplug_status == 0) { |
833 | VPRINTK("QUICK EXIT 3\n"); | 830 | VPRINTK("QUICK EXIT 3\n"); |
834 | goto done_irq; | 831 | goto done_irq; |
835 | } | 832 | } |
836 | 833 | ||
837 | writel(mask, mmio_base + PDC_INT_SEQMASK); | 834 | writel(mask, host_mmio + PDC_INT_SEQMASK); |
838 | 835 | ||
839 | is_sataii_tx4 = pdc_is_sataii_tx4(host->ports[0]->flags); | 836 | is_sataii_tx4 = pdc_is_sataii_tx4(host->ports[0]->flags); |
840 | 837 | ||
@@ -875,23 +872,24 @@ done_irq: | |||
875 | return IRQ_RETVAL(handled); | 872 | return IRQ_RETVAL(handled); |
876 | } | 873 | } |
877 | 874 | ||
878 | static inline void pdc_packet_start(struct ata_queued_cmd *qc) | 875 | static void pdc_packet_start(struct ata_queued_cmd *qc) |
879 | { | 876 | { |
880 | struct ata_port *ap = qc->ap; | 877 | struct ata_port *ap = qc->ap; |
881 | struct pdc_port_priv *pp = ap->private_data; | 878 | struct pdc_port_priv *pp = ap->private_data; |
882 | void __iomem *mmio = ap->host->iomap[PDC_MMIO_BAR]; | 879 | void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR]; |
880 | void __iomem *ata_mmio = ap->ioaddr.cmd_addr; | ||
883 | unsigned int port_no = ap->port_no; | 881 | unsigned int port_no = ap->port_no; |
884 | u8 seq = (u8) (port_no + 1); | 882 | u8 seq = (u8) (port_no + 1); |
885 | 883 | ||
886 | VPRINTK("ENTER, ap %p\n", ap); | 884 | VPRINTK("ENTER, ap %p\n", ap); |
887 | 885 | ||
888 | writel(0x00000001, mmio + (seq * 4)); | 886 | writel(0x00000001, host_mmio + (seq * 4)); |
889 | readl(mmio + (seq * 4)); /* flush */ | 887 | readl(host_mmio + (seq * 4)); /* flush */ |
890 | 888 | ||
891 | pp->pkt[2] = seq; | 889 | pp->pkt[2] = seq; |
892 | wmb(); /* flush PRD, pkt writes */ | 890 | wmb(); /* flush PRD, pkt writes */ |
893 | writel(pp->pkt_dma, ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); | 891 | writel(pp->pkt_dma, ata_mmio + PDC_PKT_SUBMIT); |
894 | readl(ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */ | 892 | readl(ata_mmio + PDC_PKT_SUBMIT); /* flush */ |
895 | } | 893 | } |
896 | 894 | ||
897 | static unsigned int pdc_qc_issue(struct ata_queued_cmd *qc) | 895 | static unsigned int pdc_qc_issue(struct ata_queued_cmd *qc) |
@@ -909,11 +907,9 @@ static unsigned int pdc_qc_issue(struct ata_queued_cmd *qc) | |||
909 | case ATA_PROT_DMA: | 907 | case ATA_PROT_DMA: |
910 | pdc_packet_start(qc); | 908 | pdc_packet_start(qc); |
911 | return 0; | 909 | return 0; |
912 | |||
913 | default: | 910 | default: |
914 | break; | 911 | break; |
915 | } | 912 | } |
916 | |||
917 | return ata_sff_qc_issue(qc); | 913 | return ata_sff_qc_issue(qc); |
918 | } | 914 | } |
919 | 915 | ||
@@ -987,7 +983,7 @@ static void pdc_ata_setup_port(struct ata_port *ap, | |||
987 | 983 | ||
988 | static void pdc_host_init(struct ata_host *host) | 984 | static void pdc_host_init(struct ata_host *host) |
989 | { | 985 | { |
990 | void __iomem *mmio = host->iomap[PDC_MMIO_BAR]; | 986 | void __iomem *host_mmio = host->iomap[PDC_MMIO_BAR]; |
991 | int is_gen2 = host->ports[0]->flags & PDC_FLAG_GEN_II; | 987 | int is_gen2 = host->ports[0]->flags & PDC_FLAG_GEN_II; |
992 | int hotplug_offset; | 988 | int hotplug_offset; |
993 | u32 tmp; | 989 | u32 tmp; |
@@ -1004,38 +1000,38 @@ static void pdc_host_init(struct ata_host *host) | |||
1004 | */ | 1000 | */ |
1005 | 1001 | ||
1006 | /* enable BMR_BURST, maybe change FIFO_SHD to 8 dwords */ | 1002 | /* enable BMR_BURST, maybe change FIFO_SHD to 8 dwords */ |
1007 | tmp = readl(mmio + PDC_FLASH_CTL); | 1003 | tmp = readl(host_mmio + PDC_FLASH_CTL); |
1008 | tmp |= 0x02000; /* bit 13 (enable bmr burst) */ | 1004 | tmp |= 0x02000; /* bit 13 (enable bmr burst) */ |
1009 | if (!is_gen2) | 1005 | if (!is_gen2) |
1010 | tmp |= 0x10000; /* bit 16 (fifo threshold at 8 dw) */ | 1006 | tmp |= 0x10000; /* bit 16 (fifo threshold at 8 dw) */ |
1011 | writel(tmp, mmio + PDC_FLASH_CTL); | 1007 | writel(tmp, host_mmio + PDC_FLASH_CTL); |
1012 | 1008 | ||
1013 | /* clear plug/unplug flags for all ports */ | 1009 | /* clear plug/unplug flags for all ports */ |
1014 | tmp = readl(mmio + hotplug_offset); | 1010 | tmp = readl(host_mmio + hotplug_offset); |
1015 | writel(tmp | 0xff, mmio + hotplug_offset); | 1011 | writel(tmp | 0xff, host_mmio + hotplug_offset); |
1016 | 1012 | ||
1017 | /* unmask plug/unplug ints */ | 1013 | /* unmask plug/unplug ints */ |
1018 | tmp = readl(mmio + hotplug_offset); | 1014 | tmp = readl(host_mmio + hotplug_offset); |
1019 | writel(tmp & ~0xff0000, mmio + hotplug_offset); | 1015 | writel(tmp & ~0xff0000, host_mmio + hotplug_offset); |
1020 | 1016 | ||
1021 | /* don't initialise TBG or SLEW on 2nd generation chips */ | 1017 | /* don't initialise TBG or SLEW on 2nd generation chips */ |
1022 | if (is_gen2) | 1018 | if (is_gen2) |
1023 | return; | 1019 | return; |
1024 | 1020 | ||
1025 | /* reduce TBG clock to 133 Mhz. */ | 1021 | /* reduce TBG clock to 133 Mhz. */ |
1026 | tmp = readl(mmio + PDC_TBG_MODE); | 1022 | tmp = readl(host_mmio + PDC_TBG_MODE); |
1027 | tmp &= ~0x30000; /* clear bit 17, 16*/ | 1023 | tmp &= ~0x30000; /* clear bit 17, 16*/ |
1028 | tmp |= 0x10000; /* set bit 17:16 = 0:1 */ | 1024 | tmp |= 0x10000; /* set bit 17:16 = 0:1 */ |
1029 | writel(tmp, mmio + PDC_TBG_MODE); | 1025 | writel(tmp, host_mmio + PDC_TBG_MODE); |
1030 | 1026 | ||
1031 | readl(mmio + PDC_TBG_MODE); /* flush */ | 1027 | readl(host_mmio + PDC_TBG_MODE); /* flush */ |
1032 | msleep(10); | 1028 | msleep(10); |
1033 | 1029 | ||
1034 | /* adjust slew rate control register. */ | 1030 | /* adjust slew rate control register. */ |
1035 | tmp = readl(mmio + PDC_SLEW_CTL); | 1031 | tmp = readl(host_mmio + PDC_SLEW_CTL); |
1036 | tmp &= 0xFFFFF03F; /* clear bit 11 ~ 6 */ | 1032 | tmp &= 0xFFFFF03F; /* clear bit 11 ~ 6 */ |
1037 | tmp |= 0x00000900; /* set bit 11-9 = 100b , bit 8-6 = 100 */ | 1033 | tmp |= 0x00000900; /* set bit 11-9 = 100b , bit 8-6 = 100 */ |
1038 | writel(tmp, mmio + PDC_SLEW_CTL); | 1034 | writel(tmp, host_mmio + PDC_SLEW_CTL); |
1039 | } | 1035 | } |
1040 | 1036 | ||
1041 | static int pdc_ata_init_one(struct pci_dev *pdev, | 1037 | static int pdc_ata_init_one(struct pci_dev *pdev, |
@@ -1045,7 +1041,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev, | |||
1045 | const struct ata_port_info *pi = &pdc_port_info[ent->driver_data]; | 1041 | const struct ata_port_info *pi = &pdc_port_info[ent->driver_data]; |
1046 | const struct ata_port_info *ppi[PDC_MAX_PORTS]; | 1042 | const struct ata_port_info *ppi[PDC_MAX_PORTS]; |
1047 | struct ata_host *host; | 1043 | struct ata_host *host; |
1048 | void __iomem *base; | 1044 | void __iomem *host_mmio; |
1049 | int n_ports, i, rc; | 1045 | int n_ports, i, rc; |
1050 | int is_sataii_tx4; | 1046 | int is_sataii_tx4; |
1051 | 1047 | ||
@@ -1062,7 +1058,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev, | |||
1062 | pcim_pin_device(pdev); | 1058 | pcim_pin_device(pdev); |
1063 | if (rc) | 1059 | if (rc) |
1064 | return rc; | 1060 | return rc; |
1065 | base = pcim_iomap_table(pdev)[PDC_MMIO_BAR]; | 1061 | host_mmio = pcim_iomap_table(pdev)[PDC_MMIO_BAR]; |
1066 | 1062 | ||
1067 | /* determine port configuration and setup host */ | 1063 | /* determine port configuration and setup host */ |
1068 | n_ports = 2; | 1064 | n_ports = 2; |
@@ -1072,7 +1068,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev, | |||
1072 | ppi[i] = pi; | 1068 | ppi[i] = pi; |
1073 | 1069 | ||
1074 | if (pi->flags & PDC_FLAG_SATA_PATA) { | 1070 | if (pi->flags & PDC_FLAG_SATA_PATA) { |
1075 | u8 tmp = readb(base + PDC_FLASH_CTL+1); | 1071 | u8 tmp = readb(host_mmio + PDC_FLASH_CTL + 1); |
1076 | if (!(tmp & 0x80)) | 1072 | if (!(tmp & 0x80)) |
1077 | ppi[n_ports++] = pi + 1; | 1073 | ppi[n_ports++] = pi + 1; |
1078 | } | 1074 | } |
@@ -1088,13 +1084,13 @@ static int pdc_ata_init_one(struct pci_dev *pdev, | |||
1088 | for (i = 0; i < host->n_ports; i++) { | 1084 | for (i = 0; i < host->n_ports; i++) { |
1089 | struct ata_port *ap = host->ports[i]; | 1085 | struct ata_port *ap = host->ports[i]; |
1090 | unsigned int ata_no = pdc_port_no_to_ata_no(i, is_sataii_tx4); | 1086 | unsigned int ata_no = pdc_port_no_to_ata_no(i, is_sataii_tx4); |
1091 | unsigned int port_offset = 0x200 + ata_no * 0x80; | 1087 | unsigned int ata_offset = 0x200 + ata_no * 0x80; |
1092 | unsigned int scr_offset = 0x400 + ata_no * 0x100; | 1088 | unsigned int scr_offset = 0x400 + ata_no * 0x100; |
1093 | 1089 | ||
1094 | pdc_ata_setup_port(ap, base + port_offset, base + scr_offset); | 1090 | pdc_ata_setup_port(ap, host_mmio + ata_offset, host_mmio + scr_offset); |
1095 | 1091 | ||
1096 | ata_port_pbar_desc(ap, PDC_MMIO_BAR, -1, "mmio"); | 1092 | ata_port_pbar_desc(ap, PDC_MMIO_BAR, -1, "mmio"); |
1097 | ata_port_pbar_desc(ap, PDC_MMIO_BAR, port_offset, "port"); | 1093 | ata_port_pbar_desc(ap, PDC_MMIO_BAR, ata_offset, "ata"); |
1098 | } | 1094 | } |
1099 | 1095 | ||
1100 | /* initialize adapter */ | 1096 | /* initialize adapter */ |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 27a110110077..8ee6b5b4ede7 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -899,14 +899,25 @@ static bool sil24_qc_fill_rtf(struct ata_queued_cmd *qc) | |||
899 | 899 | ||
900 | static void sil24_pmp_attach(struct ata_port *ap) | 900 | static void sil24_pmp_attach(struct ata_port *ap) |
901 | { | 901 | { |
902 | u32 *gscr = ap->link.device->gscr; | ||
903 | |||
902 | sil24_config_pmp(ap, 1); | 904 | sil24_config_pmp(ap, 1); |
903 | sil24_init_port(ap); | 905 | sil24_init_port(ap); |
906 | |||
907 | if (sata_pmp_gscr_vendor(gscr) == 0x11ab && | ||
908 | sata_pmp_gscr_devid(gscr) == 0x4140) { | ||
909 | ata_port_printk(ap, KERN_INFO, | ||
910 | "disabling NCQ support due to sil24-mv4140 quirk\n"); | ||
911 | ap->flags &= ~ATA_FLAG_NCQ; | ||
912 | } | ||
904 | } | 913 | } |
905 | 914 | ||
906 | static void sil24_pmp_detach(struct ata_port *ap) | 915 | static void sil24_pmp_detach(struct ata_port *ap) |
907 | { | 916 | { |
908 | sil24_init_port(ap); | 917 | sil24_init_port(ap); |
909 | sil24_config_pmp(ap, 0); | 918 | sil24_config_pmp(ap, 0); |
919 | |||
920 | ap->flags |= ATA_FLAG_NCQ; | ||
910 | } | 921 | } |
911 | 922 | ||
912 | static int sil24_pmp_hardreset(struct ata_link *link, unsigned int *class, | 923 | static int sil24_pmp_hardreset(struct ata_link *link, unsigned int *class, |
diff --git a/drivers/atm/eni.h b/drivers/atm/eni.h index d04fefb0841f..e4c9525e60b3 100644 --- a/drivers/atm/eni.h +++ b/drivers/atm/eni.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #include "midway.h" | 18 | #include "midway.h" |
19 | 19 | ||
20 | 20 | ||
21 | #define KERNEL_OFFSET 0xC0000000 /* kernel 0x0 is at phys 0xC0000000 */ | ||
22 | #define DEV_LABEL "eni" | 21 | #define DEV_LABEL "eni" |
23 | 22 | ||
24 | #define UBR_BUFFER (128*1024) /* UBR buffer size */ | 23 | #define UBR_BUFFER (128*1024) /* UBR buffer size */ |
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h index 183841cc8fdf..8dd4aa76c3bd 100644 --- a/drivers/atm/fore200e.h +++ b/drivers/atm/fore200e.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: fore200e.h,v 1.4 2000/04/14 10:10:34 davem Exp $ */ | ||
2 | #ifndef _FORE200E_H | 1 | #ifndef _FORE200E_H |
3 | #define _FORE200E_H | 2 | #define _FORE200E_H |
4 | 3 | ||
diff --git a/drivers/atm/fore200e_mkfirm.c b/drivers/atm/fore200e_mkfirm.c index 2ebe1a1e6f8b..520e14b488ff 100644 --- a/drivers/atm/fore200e_mkfirm.c +++ b/drivers/atm/fore200e_mkfirm.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | $Id: fore200e_mkfirm.c,v 1.1 2000/02/21 16:04:32 davem Exp $ | ||
3 | |||
4 | mkfirm.c: generates a C readable file from a binary firmware image | 2 | mkfirm.c: generates a C readable file from a binary firmware image |
5 | 3 | ||
6 | Christophe Lizzi (lizzi@{csti.fr, cnam.fr}), June 1999. | 4 | Christophe Lizzi (lizzi@{csti.fr, cnam.fr}), June 1999. |
diff --git a/drivers/atm/he.h b/drivers/atm/he.h index 1dc277547a73..fe6cd15a78a4 100644 --- a/drivers/atm/he.h +++ b/drivers/atm/he.h | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $Id: he.h,v 1.4 2003/05/06 22:48:00 chas Exp $ */ | ||
2 | |||
3 | /* | 1 | /* |
4 | 2 | ||
5 | he.h | 3 | he.h |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 28d77b5195de..3a504e94a4d9 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -1,8 +1,4 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * ident "$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $" | ||
3 | * | ||
4 | * $Author: ecd $ | ||
5 | * $Date: 2001/11/11 08:13:54 $ | ||
6 | * | 2 | * |
7 | * Copyright (c) 2000 ATecoM GmbH | 3 | * Copyright (c) 2000 ATecoM GmbH |
8 | * | 4 | * |
@@ -29,9 +25,6 @@ | |||
29 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 25 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
30 | * | 26 | * |
31 | *******************************************************************/ | 27 | *******************************************************************/ |
32 | static char const rcsid[] = | ||
33 | "$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $"; | ||
34 | |||
35 | 28 | ||
36 | #include <linux/module.h> | 29 | #include <linux/module.h> |
37 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h index 6f2b4a5875fb..e83eaf120da0 100644 --- a/drivers/atm/idt77252.h +++ b/drivers/atm/idt77252.h | |||
@@ -1,8 +1,4 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * ident "$Id: idt77252.h,v 1.2 2001/11/11 08:13:54 ecd Exp $" | ||
3 | * | ||
4 | * $Author: ecd $ | ||
5 | * $Date: 2001/11/11 08:13:54 $ | ||
6 | * | 2 | * |
7 | * Copyright (c) 2000 ATecoM GmbH | 3 | * Copyright (c) 2000 ATecoM GmbH |
8 | * | 4 | * |
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h index 133eefcc0475..b2cd20f549cb 100644 --- a/drivers/atm/iphase.h +++ b/drivers/atm/iphase.h | |||
@@ -1025,7 +1025,8 @@ typedef struct iadev_t { | |||
1025 | spinlock_t rx_lock, misc_lock; | 1025 | spinlock_t rx_lock, misc_lock; |
1026 | struct atm_vcc **rx_open; /* list of all open VCs */ | 1026 | struct atm_vcc **rx_open; /* list of all open VCs */ |
1027 | u16 num_rx_desc, rx_buf_sz, rxing; | 1027 | u16 num_rx_desc, rx_buf_sz, rxing; |
1028 | u32 rx_pkt_ram, rx_tmp_cnt, rx_tmp_jif; | 1028 | u32 rx_pkt_ram, rx_tmp_cnt; |
1029 | unsigned long rx_tmp_jif; | ||
1029 | void __iomem *RX_DESC_BASE_ADDR; | 1030 | void __iomem *RX_DESC_BASE_ADDR; |
1030 | u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt; | 1031 | u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt; |
1031 | struct atm_dev *next_board; /* other iphase devices */ | 1032 | struct atm_dev *next_board; /* other iphase devices */ |
diff --git a/drivers/atm/nicstarmac.copyright b/drivers/atm/nicstarmac.copyright index 2e15b39fac4f..180531a83c62 100644 --- a/drivers/atm/nicstarmac.copyright +++ b/drivers/atm/nicstarmac.copyright | |||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only. | 14 | * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only. |
15 | * | 15 | * |
16 | * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997 $Revision: 1.1 $ $Date: 1999/08/20 11:00:11 $ | 16 | * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997 |
17 | * | 17 | * |
18 | * Linux driver for the IDT77201 NICStAR PCI ATM controller. | 18 | * Linux driver for the IDT77201 NICStAR PCI ATM controller. |
19 | * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155; | 19 | * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155; |
diff --git a/drivers/base/core.c b/drivers/base/core.c index be288b5e4180..ee0a51a3a41d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -760,6 +760,22 @@ static void device_remove_class_symlinks(struct device *dev) | |||
760 | } | 760 | } |
761 | 761 | ||
762 | /** | 762 | /** |
763 | * dev_set_name - set a device name | ||
764 | * @dev: device | ||
765 | * @fmt: format string for the device's name | ||
766 | */ | ||
767 | int dev_set_name(struct device *dev, const char *fmt, ...) | ||
768 | { | ||
769 | va_list vargs; | ||
770 | |||
771 | va_start(vargs, fmt); | ||
772 | vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs); | ||
773 | va_end(vargs); | ||
774 | return 0; | ||
775 | } | ||
776 | EXPORT_SYMBOL_GPL(dev_set_name); | ||
777 | |||
778 | /** | ||
763 | * device_add - add device to device hierarchy. | 779 | * device_add - add device to device hierarchy. |
764 | * @dev: device. | 780 | * @dev: device. |
765 | * | 781 | * |
@@ -1084,11 +1100,13 @@ static void device_create_release(struct device *dev) | |||
1084 | } | 1100 | } |
1085 | 1101 | ||
1086 | /** | 1102 | /** |
1087 | * device_create - creates a device and registers it with sysfs | 1103 | * device_create_vargs - creates a device and registers it with sysfs |
1088 | * @class: pointer to the struct class that this device should be registered to | 1104 | * @class: pointer to the struct class that this device should be registered to |
1089 | * @parent: pointer to the parent struct device of this new device, if any | 1105 | * @parent: pointer to the parent struct device of this new device, if any |
1090 | * @devt: the dev_t for the char device to be added | 1106 | * @devt: the dev_t for the char device to be added |
1107 | * @drvdata: the data to be added to the device for callbacks | ||
1091 | * @fmt: string for the device's name | 1108 | * @fmt: string for the device's name |
1109 | * @args: va_list for the device's name | ||
1092 | * | 1110 | * |
1093 | * This function can be used by char device classes. A struct device | 1111 | * This function can be used by char device classes. A struct device |
1094 | * will be created in sysfs, registered to the specified class. | 1112 | * will be created in sysfs, registered to the specified class. |
@@ -1104,10 +1122,10 @@ static void device_create_release(struct device *dev) | |||
1104 | * Note: the struct class passed to this function must have previously | 1122 | * Note: the struct class passed to this function must have previously |
1105 | * been created with a call to class_create(). | 1123 | * been created with a call to class_create(). |
1106 | */ | 1124 | */ |
1107 | struct device *device_create(struct class *class, struct device *parent, | 1125 | struct device *device_create_vargs(struct class *class, struct device *parent, |
1108 | dev_t devt, const char *fmt, ...) | 1126 | dev_t devt, void *drvdata, const char *fmt, |
1127 | va_list args) | ||
1109 | { | 1128 | { |
1110 | va_list args; | ||
1111 | struct device *dev = NULL; | 1129 | struct device *dev = NULL; |
1112 | int retval = -ENODEV; | 1130 | int retval = -ENODEV; |
1113 | 1131 | ||
@@ -1124,10 +1142,9 @@ struct device *device_create(struct class *class, struct device *parent, | |||
1124 | dev->class = class; | 1142 | dev->class = class; |
1125 | dev->parent = parent; | 1143 | dev->parent = parent; |
1126 | dev->release = device_create_release; | 1144 | dev->release = device_create_release; |
1145 | dev_set_drvdata(dev, drvdata); | ||
1127 | 1146 | ||
1128 | va_start(args, fmt); | ||
1129 | vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args); | 1147 | vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args); |
1130 | va_end(args); | ||
1131 | retval = device_register(dev); | 1148 | retval = device_register(dev); |
1132 | if (retval) | 1149 | if (retval) |
1133 | goto error; | 1150 | goto error; |
@@ -1138,6 +1155,78 @@ error: | |||
1138 | kfree(dev); | 1155 | kfree(dev); |
1139 | return ERR_PTR(retval); | 1156 | return ERR_PTR(retval); |
1140 | } | 1157 | } |
1158 | EXPORT_SYMBOL_GPL(device_create_vargs); | ||
1159 | |||
1160 | /** | ||
1161 | * device_create_drvdata - creates a device and registers it with sysfs | ||
1162 | * @class: pointer to the struct class that this device should be registered to | ||
1163 | * @parent: pointer to the parent struct device of this new device, if any | ||
1164 | * @devt: the dev_t for the char device to be added | ||
1165 | * @drvdata: the data to be added to the device for callbacks | ||
1166 | * @fmt: string for the device's name | ||
1167 | * | ||
1168 | * This function can be used by char device classes. A struct device | ||
1169 | * will be created in sysfs, registered to the specified class. | ||
1170 | * | ||
1171 | * A "dev" file will be created, showing the dev_t for the device, if | ||
1172 | * the dev_t is not 0,0. | ||
1173 | * If a pointer to a parent struct device is passed in, the newly created | ||
1174 | * struct device will be a child of that device in sysfs. | ||
1175 | * The pointer to the struct device will be returned from the call. | ||
1176 | * Any further sysfs files that might be required can be created using this | ||
1177 | * pointer. | ||
1178 | * | ||
1179 | * Note: the struct class passed to this function must have previously | ||
1180 | * been created with a call to class_create(). | ||
1181 | */ | ||
1182 | struct device *device_create_drvdata(struct class *class, | ||
1183 | struct device *parent, | ||
1184 | dev_t devt, | ||
1185 | void *drvdata, | ||
1186 | const char *fmt, ...) | ||
1187 | { | ||
1188 | va_list vargs; | ||
1189 | struct device *dev; | ||
1190 | |||
1191 | va_start(vargs, fmt); | ||
1192 | dev = device_create_vargs(class, parent, devt, drvdata, fmt, vargs); | ||
1193 | va_end(vargs); | ||
1194 | return dev; | ||
1195 | } | ||
1196 | EXPORT_SYMBOL_GPL(device_create_drvdata); | ||
1197 | |||
1198 | /** | ||
1199 | * device_create - creates a device and registers it with sysfs | ||
1200 | * @class: pointer to the struct class that this device should be registered to | ||
1201 | * @parent: pointer to the parent struct device of this new device, if any | ||
1202 | * @devt: the dev_t for the char device to be added | ||
1203 | * @fmt: string for the device's name | ||
1204 | * | ||
1205 | * This function can be used by char device classes. A struct device | ||
1206 | * will be created in sysfs, registered to the specified class. | ||
1207 | * | ||
1208 | * A "dev" file will be created, showing the dev_t for the device, if | ||
1209 | * the dev_t is not 0,0. | ||
1210 | * If a pointer to a parent struct device is passed in, the newly created | ||
1211 | * struct device will be a child of that device in sysfs. | ||
1212 | * The pointer to the struct device will be returned from the call. | ||
1213 | * Any further sysfs files that might be required can be created using this | ||
1214 | * pointer. | ||
1215 | * | ||
1216 | * Note: the struct class passed to this function must have previously | ||
1217 | * been created with a call to class_create(). | ||
1218 | */ | ||
1219 | struct device *device_create(struct class *class, struct device *parent, | ||
1220 | dev_t devt, const char *fmt, ...) | ||
1221 | { | ||
1222 | va_list vargs; | ||
1223 | struct device *dev; | ||
1224 | |||
1225 | va_start(vargs, fmt); | ||
1226 | dev = device_create_vargs(class, parent, devt, NULL, fmt, vargs); | ||
1227 | va_end(vargs); | ||
1228 | return dev; | ||
1229 | } | ||
1141 | EXPORT_SYMBOL_GPL(device_create); | 1230 | EXPORT_SYMBOL_GPL(device_create); |
1142 | 1231 | ||
1143 | static int __match_devt(struct device *dev, void *data) | 1232 | static int __match_devt(struct device *dev, void *data) |
@@ -1218,13 +1307,11 @@ int device_rename(struct device *dev, char *new_name) | |||
1218 | } | 1307 | } |
1219 | #else | 1308 | #else |
1220 | if (dev->class) { | 1309 | if (dev->class) { |
1221 | sysfs_remove_link(&dev->class->subsys.kobj, old_device_name); | ||
1222 | error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj, | 1310 | error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj, |
1223 | dev->bus_id); | 1311 | dev->bus_id); |
1224 | if (error) { | 1312 | if (error) |
1225 | dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n", | 1313 | goto out; |
1226 | __func__, error); | 1314 | sysfs_remove_link(&dev->class->subsys.kobj, old_device_name); |
1227 | } | ||
1228 | } | 1315 | } |
1229 | #endif | 1316 | #endif |
1230 | 1317 | ||
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index a196ef7f147f..24b97b0bef99 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -397,6 +397,7 @@ module_param(max_part, int, 0); | |||
397 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); | 397 | MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); |
398 | MODULE_LICENSE("GPL"); | 398 | MODULE_LICENSE("GPL"); |
399 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); | 399 | MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); |
400 | MODULE_ALIAS("rd"); | ||
400 | 401 | ||
401 | #ifndef MODULE | 402 | #ifndef MODULE |
402 | /* Legacy boot options - nonmodular */ | 403 | /* Legacy boot options - nonmodular */ |
@@ -447,6 +448,7 @@ static struct brd_device *brd_alloc(int i) | |||
447 | disk->fops = &brd_fops; | 448 | disk->fops = &brd_fops; |
448 | disk->private_data = brd; | 449 | disk->private_data = brd; |
449 | disk->queue = brd->brd_queue; | 450 | disk->queue = brd->brd_queue; |
451 | disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; | ||
450 | sprintf(disk->disk_name, "ram%d", i); | 452 | sprintf(disk->disk_name, "ram%d", i); |
451 | set_capacity(disk, rd_size * 2); | 453 | set_capacity(disk, rd_size * 2); |
452 | 454 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index e336b05fe4a7..5f1e1cc6165a 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -53,15 +53,16 @@ | |||
53 | #include <linux/scatterlist.h> | 53 | #include <linux/scatterlist.h> |
54 | 54 | ||
55 | #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) | 55 | #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) |
56 | #define DRIVER_NAME "HP CISS Driver (v 3.6.14)" | 56 | #define DRIVER_NAME "HP CISS Driver (v 3.6.20)" |
57 | #define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,14) | 57 | #define DRIVER_VERSION CCISS_DRIVER_VERSION(3, 6, 20) |
58 | 58 | ||
59 | /* Embedded module documentation macros - see modules.h */ | 59 | /* Embedded module documentation macros - see modules.h */ |
60 | MODULE_AUTHOR("Hewlett-Packard Company"); | 60 | MODULE_AUTHOR("Hewlett-Packard Company"); |
61 | MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.14"); | 61 | MODULE_DESCRIPTION("Driver for HP Smart Array Controllers"); |
62 | MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" | 62 | MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" |
63 | " SA6i P600 P800 P400 P400i E200 E200i E500"); | 63 | " SA6i P600 P800 P400 P400i E200 E200i E500 P700m" |
64 | MODULE_VERSION("3.6.14"); | 64 | " Smart Array G2 Series SAS/SATA Controllers"); |
65 | MODULE_VERSION("3.6.20"); | ||
65 | MODULE_LICENSE("GPL"); | 66 | MODULE_LICENSE("GPL"); |
66 | 67 | ||
67 | #include "cciss_cmd.h" | 68 | #include "cciss_cmd.h" |
@@ -90,6 +91,11 @@ static const struct pci_device_id cciss_pci_device_id[] = { | |||
90 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, | 91 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, |
91 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237}, | 92 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237}, |
92 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D}, | 93 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D}, |
94 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3241}, | ||
95 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3243}, | ||
96 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245}, | ||
97 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247}, | ||
98 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249}, | ||
93 | {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 99 | {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
94 | PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, | 100 | PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, |
95 | {0,} | 101 | {0,} |
@@ -123,6 +129,11 @@ static struct board_type products[] = { | |||
123 | {0x3215103C, "Smart Array E200i", &SA5_access, 120}, | 129 | {0x3215103C, "Smart Array E200i", &SA5_access, 120}, |
124 | {0x3237103C, "Smart Array E500", &SA5_access, 512}, | 130 | {0x3237103C, "Smart Array E500", &SA5_access, 512}, |
125 | {0x323D103C, "Smart Array P700m", &SA5_access, 512}, | 131 | {0x323D103C, "Smart Array P700m", &SA5_access, 512}, |
132 | {0x3241103C, "Smart Array P212", &SA5_access, 384}, | ||
133 | {0x3243103C, "Smart Array P410", &SA5_access, 384}, | ||
134 | {0x3245103C, "Smart Array P410i", &SA5_access, 384}, | ||
135 | {0x3247103C, "Smart Array P411", &SA5_access, 384}, | ||
136 | {0x3249103C, "Smart Array P812", &SA5_access, 384}, | ||
126 | {0xFFFF103C, "Unknown Smart Array", &SA5_access, 120}, | 137 | {0xFFFF103C, "Unknown Smart Array", &SA5_access, 120}, |
127 | }; | 138 | }; |
128 | 139 | ||
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index ebfe038d859e..f1c8feb5510b 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | 3 | * Authors: Dave Boutcher <boutcher@us.ibm.com> |
4 | * Ryan Arnold <ryanarn@us.ibm.com> | 4 | * Ryan Arnold <ryanarn@us.ibm.com> |
5 | * Colin Devilbiss <devilbis@us.ibm.com> | 5 | * Colin Devilbiss <devilbis@us.ibm.com> |
6 | * Stephen Rothwell <sfr@au1.ibm.com> | 6 | * Stephen Rothwell |
7 | * | 7 | * |
8 | * (C) Copyright 2000-2004 IBM Corporation | 8 | * (C) Copyright 2000-2004 IBM Corporation |
9 | * | 9 | * |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 84e064ffee52..dd7ea203f940 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -260,6 +260,10 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) | 260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) |
261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); | 261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); |
262 | 262 | ||
263 | /* If disk is read-only in the host, the guest should obey */ | ||
264 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) | ||
265 | set_disk_ro(vblk->disk, 1); | ||
266 | |||
263 | /* Host must always specify the capacity. */ | 267 | /* Host must always specify the capacity. */ |
264 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), | 268 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), |
265 | &cap, sizeof(cap)); | 269 | &cap, sizeof(cap)); |
@@ -311,6 +315,7 @@ static void virtblk_remove(struct virtio_device *vdev) | |||
311 | /* Stop all the virtqueues. */ | 315 | /* Stop all the virtqueues. */ |
312 | vdev->config->reset(vdev); | 316 | vdev->config->reset(vdev); |
313 | 317 | ||
318 | del_gendisk(vblk->disk); | ||
314 | blk_cleanup_queue(vblk->disk->queue); | 319 | blk_cleanup_queue(vblk->disk->queue); |
315 | put_disk(vblk->disk); | 320 | put_disk(vblk->disk); |
316 | mempool_destroy(vblk->pool); | 321 | mempool_destroy(vblk->pool); |
@@ -325,7 +330,7 @@ static struct virtio_device_id id_table[] = { | |||
325 | 330 | ||
326 | static unsigned int features[] = { | 331 | static unsigned int features[] = { |
327 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | 332 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, |
328 | VIRTIO_BLK_F_GEOMETRY, | 333 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, |
329 | }; | 334 | }; |
330 | 335 | ||
331 | static struct virtio_driver virtio_blk = { | 336 | static struct virtio_driver virtio_blk = { |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 5245a4a0ba74..9d0dfe6e0d63 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | 6 | * Authors: Dave Boutcher <boutcher@us.ibm.com> |
7 | * Ryan Arnold <ryanarn@us.ibm.com> | 7 | * Ryan Arnold <ryanarn@us.ibm.com> |
8 | * Colin Devilbiss <devilbis@us.ibm.com> | 8 | * Colin Devilbiss <devilbis@us.ibm.com> |
9 | * Stephen Rothwell <sfr@au1.ibm.com> | 9 | * Stephen Rothwell |
10 | * | 10 | * |
11 | * (C) Copyright 2000-2004 IBM Corporation | 11 | * (C) Copyright 2000-2004 IBM Corporation |
12 | * | 12 | * |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 595a925c62a9..2d854bb9373e 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -118,8 +118,8 @@ config COMPUTONE | |||
118 | order to become a dial-in server. If you have a card like that, say | 118 | order to become a dial-in server. If you have a card like that, say |
119 | Y here and read <file:Documentation/computone.txt>. | 119 | Y here and read <file:Documentation/computone.txt>. |
120 | 120 | ||
121 | To compile this driver as modules, choose M here: the | 121 | To compile this driver as module, choose M here: the |
122 | modules will be called ip2 and ip2main. | 122 | module will be called ip2. |
123 | 123 | ||
124 | config ROCKETPORT | 124 | config ROCKETPORT |
125 | tristate "Comtrol RocketPort support" | 125 | tristate "Comtrol RocketPort support" |
@@ -749,7 +749,7 @@ config NVRAM | |||
749 | if RTC_LIB=n | 749 | if RTC_LIB=n |
750 | 750 | ||
751 | config RTC | 751 | config RTC |
752 | tristate "Enhanced Real Time Clock Support" | 752 | tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)" |
753 | depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ | 753 | depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ |
754 | && !ARM && !SUPERH && !S390 && !AVR32 | 754 | && !ARM && !SUPERH && !S390 && !AVR32 |
755 | ---help--- | 755 | ---help--- |
@@ -1036,9 +1036,9 @@ config HPET | |||
1036 | non-periodic and/or periodic. | 1036 | non-periodic and/or periodic. |
1037 | 1037 | ||
1038 | config HPET_RTC_IRQ | 1038 | config HPET_RTC_IRQ |
1039 | bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC | 1039 | bool |
1040 | default n | 1040 | default HPET_EMULATE_RTC |
1041 | depends on HPET | 1041 | depends on RTC && HPET |
1042 | help | 1042 | help |
1043 | If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It | 1043 | If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It |
1044 | is assumed the platform called hpet_alloc with the RTC IRQ values for | 1044 | is assumed the platform called hpet_alloc with the RTC IRQ values for |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index 55c97f623242..07b4d8ff56e5 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
@@ -458,6 +458,10 @@ static struct agp_device_ids ati_agp_device_ids[] __devinitdata = | |||
458 | .chipset_name = "IGP9100/M", | 458 | .chipset_name = "IGP9100/M", |
459 | }, | 459 | }, |
460 | { | 460 | { |
461 | .device_id = PCI_DEVICE_ID_ATI_RS350_133, | ||
462 | .chipset_name = "IGP9000/M", | ||
463 | }, | ||
464 | { | ||
461 | .device_id = PCI_DEVICE_ID_ATI_RS350_200, | 465 | .device_id = PCI_DEVICE_ID_ATI_RS350_200, |
462 | .chipset_name = "IGP9100/M", | 466 | .chipset_name = "IGP9100/M", |
463 | }, | 467 | }, |
diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h index 6874f31ca8ca..3a05c6d5ebe1 100644 --- a/drivers/char/drm/drm.h +++ b/drivers/char/drm/drm.h | |||
@@ -471,7 +471,6 @@ struct drm_irq_busid { | |||
471 | enum drm_vblank_seq_type { | 471 | enum drm_vblank_seq_type { |
472 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ | 472 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ |
473 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ | 473 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ |
474 | _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ | ||
475 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ | 474 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ |
476 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ | 475 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ |
477 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ | 476 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ |
@@ -504,21 +503,6 @@ union drm_wait_vblank { | |||
504 | struct drm_wait_vblank_reply reply; | 503 | struct drm_wait_vblank_reply reply; |
505 | }; | 504 | }; |
506 | 505 | ||
507 | enum drm_modeset_ctl_cmd { | ||
508 | _DRM_PRE_MODESET = 1, | ||
509 | _DRM_POST_MODESET = 2, | ||
510 | }; | ||
511 | |||
512 | /** | ||
513 | * DRM_IOCTL_MODESET_CTL ioctl argument type | ||
514 | * | ||
515 | * \sa drmModesetCtl(). | ||
516 | */ | ||
517 | struct drm_modeset_ctl { | ||
518 | unsigned long arg; | ||
519 | enum drm_modeset_ctl_cmd cmd; | ||
520 | }; | ||
521 | |||
522 | /** | 506 | /** |
523 | * DRM_IOCTL_AGP_ENABLE ioctl argument type. | 507 | * DRM_IOCTL_AGP_ENABLE ioctl argument type. |
524 | * | 508 | * |
@@ -603,7 +587,6 @@ struct drm_set_version { | |||
603 | #define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) | 587 | #define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) |
604 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) | 588 | #define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) |
605 | #define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) | 589 | #define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) |
606 | #define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) | ||
607 | 590 | ||
608 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) | 591 | #define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) |
609 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) | 592 | #define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) |
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 213b3ca3468e..0764b662b339 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -100,8 +100,10 @@ struct drm_device; | |||
100 | #define DRIVER_HAVE_DMA 0x20 | 100 | #define DRIVER_HAVE_DMA 0x20 |
101 | #define DRIVER_HAVE_IRQ 0x40 | 101 | #define DRIVER_HAVE_IRQ 0x40 |
102 | #define DRIVER_IRQ_SHARED 0x80 | 102 | #define DRIVER_IRQ_SHARED 0x80 |
103 | #define DRIVER_IRQ_VBL 0x100 | ||
103 | #define DRIVER_DMA_QUEUE 0x200 | 104 | #define DRIVER_DMA_QUEUE 0x200 |
104 | #define DRIVER_FB_DMA 0x400 | 105 | #define DRIVER_FB_DMA 0x400 |
106 | #define DRIVER_IRQ_VBL2 0x800 | ||
105 | 107 | ||
106 | /***********************************************************************/ | 108 | /***********************************************************************/ |
107 | /** \name Begin the DRM... */ | 109 | /** \name Begin the DRM... */ |
@@ -577,52 +579,10 @@ struct drm_driver { | |||
577 | int (*context_dtor) (struct drm_device *dev, int context); | 579 | int (*context_dtor) (struct drm_device *dev, int context); |
578 | int (*kernel_context_switch) (struct drm_device *dev, int old, | 580 | int (*kernel_context_switch) (struct drm_device *dev, int old, |
579 | int new); | 581 | int new); |
580 | void (*kernel_context_switch_unlock) (struct drm_device * dev); | 582 | void (*kernel_context_switch_unlock) (struct drm_device *dev); |
581 | /** | 583 | int (*vblank_wait) (struct drm_device *dev, unsigned int *sequence); |
582 | * get_vblank_counter - get raw hardware vblank counter | 584 | int (*vblank_wait2) (struct drm_device *dev, unsigned int *sequence); |
583 | * @dev: DRM device | 585 | int (*dri_library_name) (struct drm_device *dev, char *buf); |
584 | * @crtc: counter to fetch | ||
585 | * | ||
586 | * Driver callback for fetching a raw hardware vblank counter | ||
587 | * for @crtc. If a device doesn't have a hardware counter, the | ||
588 | * driver can simply return the value of drm_vblank_count and | ||
589 | * make the enable_vblank() and disable_vblank() hooks into no-ops, | ||
590 | * leaving interrupts enabled at all times. | ||
591 | * | ||
592 | * Wraparound handling and loss of events due to modesetting is dealt | ||
593 | * with in the DRM core code. | ||
594 | * | ||
595 | * RETURNS | ||
596 | * Raw vblank counter value. | ||
597 | */ | ||
598 | u32 (*get_vblank_counter) (struct drm_device *dev, int crtc); | ||
599 | |||
600 | /** | ||
601 | * enable_vblank - enable vblank interrupt events | ||
602 | * @dev: DRM device | ||
603 | * @crtc: which irq to enable | ||
604 | * | ||
605 | * Enable vblank interrupts for @crtc. If the device doesn't have | ||
606 | * a hardware vblank counter, this routine should be a no-op, since | ||
607 | * interrupts will have to stay on to keep the count accurate. | ||
608 | * | ||
609 | * RETURNS | ||
610 | * Zero on success, appropriate errno if the given @crtc's vblank | ||
611 | * interrupt cannot be enabled. | ||
612 | */ | ||
613 | int (*enable_vblank) (struct drm_device *dev, int crtc); | ||
614 | |||
615 | /** | ||
616 | * disable_vblank - disable vblank interrupt events | ||
617 | * @dev: DRM device | ||
618 | * @crtc: which irq to enable | ||
619 | * | ||
620 | * Disable vblank interrupts for @crtc. If the device doesn't have | ||
621 | * a hardware vblank counter, this routine should be a no-op, since | ||
622 | * interrupts will have to stay on to keep the count accurate. | ||
623 | */ | ||
624 | void (*disable_vblank) (struct drm_device *dev, int crtc); | ||
625 | int (*dri_library_name) (struct drm_device *dev, char * buf); | ||
626 | 586 | ||
627 | /** | 587 | /** |
628 | * Called by \c drm_device_is_agp. Typically used to determine if a | 588 | * Called by \c drm_device_is_agp. Typically used to determine if a |
@@ -641,7 +601,7 @@ struct drm_driver { | |||
641 | 601 | ||
642 | irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); | 602 | irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); |
643 | void (*irq_preinstall) (struct drm_device *dev); | 603 | void (*irq_preinstall) (struct drm_device *dev); |
644 | int (*irq_postinstall) (struct drm_device *dev); | 604 | void (*irq_postinstall) (struct drm_device *dev); |
645 | void (*irq_uninstall) (struct drm_device *dev); | 605 | void (*irq_uninstall) (struct drm_device *dev); |
646 | void (*reclaim_buffers) (struct drm_device *dev, | 606 | void (*reclaim_buffers) (struct drm_device *dev, |
647 | struct drm_file * file_priv); | 607 | struct drm_file * file_priv); |
@@ -770,21 +730,13 @@ struct drm_device { | |||
770 | /** \name VBLANK IRQ support */ | 730 | /** \name VBLANK IRQ support */ |
771 | /*@{ */ | 731 | /*@{ */ |
772 | 732 | ||
773 | wait_queue_head_t *vbl_queue; /**< VBLANK wait queue */ | 733 | wait_queue_head_t vbl_queue; /**< VBLANK wait queue */ |
774 | atomic_t *_vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */ | 734 | atomic_t vbl_received; |
735 | atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */ | ||
775 | spinlock_t vbl_lock; | 736 | spinlock_t vbl_lock; |
776 | struct list_head *vbl_sigs; /**< signal list to send on VBLANK */ | 737 | struct list_head vbl_sigs; /**< signal list to send on VBLANK */ |
777 | atomic_t vbl_signal_pending; /* number of signals pending on all crtcs*/ | 738 | struct list_head vbl_sigs2; /**< signals to send on secondary VBLANK */ |
778 | atomic_t *vblank_refcount; /* number of users of vblank interrupts per crtc */ | 739 | unsigned int vbl_pending; |
779 | u32 *last_vblank; /* protected by dev->vbl_lock, used */ | ||
780 | /* for wraparound handling */ | ||
781 | u32 *vblank_offset; /* used to track how many vblanks */ | ||
782 | int *vblank_enabled; /* so we don't call enable more than | ||
783 | once per disable */ | ||
784 | u32 *vblank_premodeset; /* were lost during modeset */ | ||
785 | struct timer_list vblank_disable_timer; | ||
786 | |||
787 | unsigned long max_vblank_count; /**< size of vblank counter register */ | ||
788 | spinlock_t tasklet_lock; /**< For drm_locked_tasklet */ | 740 | spinlock_t tasklet_lock; /**< For drm_locked_tasklet */ |
789 | void (*locked_tasklet_func)(struct drm_device *dev); | 741 | void (*locked_tasklet_func)(struct drm_device *dev); |
790 | 742 | ||
@@ -804,7 +756,6 @@ struct drm_device { | |||
804 | #ifdef __alpha__ | 756 | #ifdef __alpha__ |
805 | struct pci_controller *hose; | 757 | struct pci_controller *hose; |
806 | #endif | 758 | #endif |
807 | int num_crtcs; /**< Number of CRTCs on this device */ | ||
808 | struct drm_sg_mem *sg; /**< Scatter gather memory */ | 759 | struct drm_sg_mem *sg; /**< Scatter gather memory */ |
809 | void *dev_private; /**< device private data */ | 760 | void *dev_private; /**< device private data */ |
810 | struct drm_sigdata sigdata; /**< For block_all_signals */ | 761 | struct drm_sigdata sigdata; /**< For block_all_signals */ |
@@ -1039,19 +990,11 @@ extern void drm_driver_irq_preinstall(struct drm_device *dev); | |||
1039 | extern void drm_driver_irq_postinstall(struct drm_device *dev); | 990 | extern void drm_driver_irq_postinstall(struct drm_device *dev); |
1040 | extern void drm_driver_irq_uninstall(struct drm_device *dev); | 991 | extern void drm_driver_irq_uninstall(struct drm_device *dev); |
1041 | 992 | ||
1042 | extern int drm_vblank_init(struct drm_device *dev, int num_crtcs); | 993 | extern int drm_wait_vblank(struct drm_device *dev, void *data, |
1043 | extern int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *filp); | ||
1044 | extern int drm_vblank_wait(struct drm_device * dev, unsigned int *vbl_seq); | ||
1045 | extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); | ||
1046 | extern u32 drm_vblank_count(struct drm_device *dev, int crtc); | ||
1047 | extern void drm_update_vblank_count(struct drm_device *dev, int crtc); | ||
1048 | extern void drm_handle_vblank(struct drm_device *dev, int crtc); | ||
1049 | extern int drm_vblank_get(struct drm_device *dev, int crtc); | ||
1050 | extern void drm_vblank_put(struct drm_device *dev, int crtc); | ||
1051 | |||
1052 | /* Modesetting support */ | ||
1053 | extern int drm_modeset_ctl(struct drm_device *dev, void *data, | ||
1054 | struct drm_file *file_priv); | 994 | struct drm_file *file_priv); |
995 | extern int drm_vblank_wait(struct drm_device *dev, unsigned int *vbl_seq); | ||
996 | extern void drm_vbl_send_signals(struct drm_device *dev); | ||
997 | extern void drm_locked_tasklet(struct drm_device *dev, void(*func)(struct drm_device*)); | ||
1055 | 998 | ||
1056 | /* AGP/GART support (drm_agpsupport.h) */ | 999 | /* AGP/GART support (drm_agpsupport.h) */ |
1057 | extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); | 1000 | extern struct drm_agp_head *drm_agp_init(struct drm_device *dev); |
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index 68f0da801ed8..d2e6da85f58a 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c | |||
@@ -323,7 +323,6 @@ int drm_release(struct inode *inode, struct file *filp) | |||
323 | struct drm_file *file_priv = filp->private_data; | 323 | struct drm_file *file_priv = filp->private_data; |
324 | struct drm_device *dev = file_priv->minor->dev; | 324 | struct drm_device *dev = file_priv->minor->dev; |
325 | int retcode = 0; | 325 | int retcode = 0; |
326 | unsigned long irqflags; | ||
327 | 326 | ||
328 | lock_kernel(); | 327 | lock_kernel(); |
329 | 328 | ||
@@ -355,11 +354,9 @@ int drm_release(struct inode *inode, struct file *filp) | |||
355 | */ | 354 | */ |
356 | 355 | ||
357 | do{ | 356 | do{ |
358 | spin_lock_irqsave(&dev->lock.spinlock, | 357 | spin_lock_bh(&dev->lock.spinlock); |
359 | irqflags); | ||
360 | locked = dev->lock.idle_has_lock; | 358 | locked = dev->lock.idle_has_lock; |
361 | spin_unlock_irqrestore(&dev->lock.spinlock, | 359 | spin_unlock_bh(&dev->lock.spinlock); |
362 | irqflags); | ||
363 | if (locked) | 360 | if (locked) |
364 | break; | 361 | break; |
365 | schedule(); | 362 | schedule(); |
diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c index 286f9d61e7d5..089c015c01d1 100644 --- a/drivers/char/drm/drm_irq.c +++ b/drivers/char/drm/drm_irq.c | |||
@@ -71,117 +71,6 @@ int drm_irq_by_busid(struct drm_device *dev, void *data, | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | static void vblank_disable_fn(unsigned long arg) | ||
75 | { | ||
76 | struct drm_device *dev = (struct drm_device *)arg; | ||
77 | unsigned long irqflags; | ||
78 | int i; | ||
79 | |||
80 | for (i = 0; i < dev->num_crtcs; i++) { | ||
81 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | ||
82 | if (atomic_read(&dev->vblank_refcount[i]) == 0 && | ||
83 | dev->vblank_enabled[i]) { | ||
84 | dev->driver->disable_vblank(dev, i); | ||
85 | dev->vblank_enabled[i] = 0; | ||
86 | } | ||
87 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | static void drm_vblank_cleanup(struct drm_device *dev) | ||
92 | { | ||
93 | /* Bail if the driver didn't call drm_vblank_init() */ | ||
94 | if (dev->num_crtcs == 0) | ||
95 | return; | ||
96 | |||
97 | del_timer(&dev->vblank_disable_timer); | ||
98 | |||
99 | vblank_disable_fn((unsigned long)dev); | ||
100 | |||
101 | drm_free(dev->vbl_queue, sizeof(*dev->vbl_queue) * dev->num_crtcs, | ||
102 | DRM_MEM_DRIVER); | ||
103 | drm_free(dev->vbl_sigs, sizeof(*dev->vbl_sigs) * dev->num_crtcs, | ||
104 | DRM_MEM_DRIVER); | ||
105 | drm_free(dev->_vblank_count, sizeof(*dev->_vblank_count) * | ||
106 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
107 | drm_free(dev->vblank_refcount, sizeof(*dev->vblank_refcount) * | ||
108 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
109 | drm_free(dev->vblank_enabled, sizeof(*dev->vblank_enabled) * | ||
110 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
111 | drm_free(dev->last_vblank, sizeof(*dev->last_vblank) * dev->num_crtcs, | ||
112 | DRM_MEM_DRIVER); | ||
113 | drm_free(dev->vblank_premodeset, sizeof(*dev->vblank_premodeset) * | ||
114 | dev->num_crtcs, DRM_MEM_DRIVER); | ||
115 | drm_free(dev->vblank_offset, sizeof(*dev->vblank_offset) * dev->num_crtcs, | ||
116 | DRM_MEM_DRIVER); | ||
117 | |||
118 | dev->num_crtcs = 0; | ||
119 | } | ||
120 | |||
121 | int drm_vblank_init(struct drm_device *dev, int num_crtcs) | ||
122 | { | ||
123 | int i, ret = -ENOMEM; | ||
124 | |||
125 | setup_timer(&dev->vblank_disable_timer, vblank_disable_fn, | ||
126 | (unsigned long)dev); | ||
127 | spin_lock_init(&dev->vbl_lock); | ||
128 | atomic_set(&dev->vbl_signal_pending, 0); | ||
129 | dev->num_crtcs = num_crtcs; | ||
130 | |||
131 | dev->vbl_queue = drm_alloc(sizeof(wait_queue_head_t) * num_crtcs, | ||
132 | DRM_MEM_DRIVER); | ||
133 | if (!dev->vbl_queue) | ||
134 | goto err; | ||
135 | |||
136 | dev->vbl_sigs = drm_alloc(sizeof(struct list_head) * num_crtcs, | ||
137 | DRM_MEM_DRIVER); | ||
138 | if (!dev->vbl_sigs) | ||
139 | goto err; | ||
140 | |||
141 | dev->_vblank_count = drm_alloc(sizeof(atomic_t) * num_crtcs, | ||
142 | DRM_MEM_DRIVER); | ||
143 | if (!dev->_vblank_count) | ||
144 | goto err; | ||
145 | |||
146 | dev->vblank_refcount = drm_alloc(sizeof(atomic_t) * num_crtcs, | ||
147 | DRM_MEM_DRIVER); | ||
148 | if (!dev->vblank_refcount) | ||
149 | goto err; | ||
150 | |||
151 | dev->vblank_enabled = drm_calloc(num_crtcs, sizeof(int), | ||
152 | DRM_MEM_DRIVER); | ||
153 | if (!dev->vblank_enabled) | ||
154 | goto err; | ||
155 | |||
156 | dev->last_vblank = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER); | ||
157 | if (!dev->last_vblank) | ||
158 | goto err; | ||
159 | |||
160 | dev->vblank_premodeset = drm_calloc(num_crtcs, sizeof(u32), | ||
161 | DRM_MEM_DRIVER); | ||
162 | if (!dev->vblank_premodeset) | ||
163 | goto err; | ||
164 | |||
165 | dev->vblank_offset = drm_calloc(num_crtcs, sizeof(u32), DRM_MEM_DRIVER); | ||
166 | if (!dev->vblank_offset) | ||
167 | goto err; | ||
168 | |||
169 | /* Zero per-crtc vblank stuff */ | ||
170 | for (i = 0; i < num_crtcs; i++) { | ||
171 | init_waitqueue_head(&dev->vbl_queue[i]); | ||
172 | INIT_LIST_HEAD(&dev->vbl_sigs[i]); | ||
173 | atomic_set(&dev->_vblank_count[i], 0); | ||
174 | atomic_set(&dev->vblank_refcount[i], 0); | ||
175 | } | ||
176 | |||
177 | return 0; | ||
178 | |||
179 | err: | ||
180 | drm_vblank_cleanup(dev); | ||
181 | return ret; | ||
182 | } | ||
183 | EXPORT_SYMBOL(drm_vblank_init); | ||
184 | |||
185 | /** | 74 | /** |
186 | * Install IRQ handler. | 75 | * Install IRQ handler. |
187 | * | 76 | * |
@@ -220,6 +109,17 @@ static int drm_irq_install(struct drm_device * dev) | |||
220 | 109 | ||
221 | DRM_DEBUG("irq=%d\n", dev->irq); | 110 | DRM_DEBUG("irq=%d\n", dev->irq); |
222 | 111 | ||
112 | if (drm_core_check_feature(dev, DRIVER_IRQ_VBL)) { | ||
113 | init_waitqueue_head(&dev->vbl_queue); | ||
114 | |||
115 | spin_lock_init(&dev->vbl_lock); | ||
116 | |||
117 | INIT_LIST_HEAD(&dev->vbl_sigs); | ||
118 | INIT_LIST_HEAD(&dev->vbl_sigs2); | ||
119 | |||
120 | dev->vbl_pending = 0; | ||
121 | } | ||
122 | |||
223 | /* Before installing handler */ | 123 | /* Before installing handler */ |
224 | dev->driver->irq_preinstall(dev); | 124 | dev->driver->irq_preinstall(dev); |
225 | 125 | ||
@@ -237,14 +137,9 @@ static int drm_irq_install(struct drm_device * dev) | |||
237 | } | 137 | } |
238 | 138 | ||
239 | /* After installing handler */ | 139 | /* After installing handler */ |
240 | ret = dev->driver->irq_postinstall(dev); | 140 | dev->driver->irq_postinstall(dev); |
241 | if (ret < 0) { | ||
242 | mutex_lock(&dev->struct_mutex); | ||
243 | dev->irq_enabled = 0; | ||
244 | mutex_unlock(&dev->struct_mutex); | ||
245 | } | ||
246 | 141 | ||
247 | return ret; | 142 | return 0; |
248 | } | 143 | } |
249 | 144 | ||
250 | /** | 145 | /** |
@@ -275,8 +170,6 @@ int drm_irq_uninstall(struct drm_device * dev) | |||
275 | 170 | ||
276 | free_irq(dev->irq, dev); | 171 | free_irq(dev->irq, dev); |
277 | 172 | ||
278 | drm_vblank_cleanup(dev); | ||
279 | |||
280 | dev->locked_tasklet_func = NULL; | 173 | dev->locked_tasklet_func = NULL; |
281 | 174 | ||
282 | return 0; | 175 | return 0; |
@@ -321,148 +214,6 @@ int drm_control(struct drm_device *dev, void *data, | |||
321 | } | 214 | } |
322 | 215 | ||
323 | /** | 216 | /** |
324 | * drm_vblank_count - retrieve "cooked" vblank counter value | ||
325 | * @dev: DRM device | ||
326 | * @crtc: which counter to retrieve | ||
327 | * | ||
328 | * Fetches the "cooked" vblank count value that represents the number of | ||
329 | * vblank events since the system was booted, including lost events due to | ||
330 | * modesetting activity. | ||
331 | */ | ||
332 | u32 drm_vblank_count(struct drm_device *dev, int crtc) | ||
333 | { | ||
334 | return atomic_read(&dev->_vblank_count[crtc]) + | ||
335 | dev->vblank_offset[crtc]; | ||
336 | } | ||
337 | EXPORT_SYMBOL(drm_vblank_count); | ||
338 | |||
339 | /** | ||
340 | * drm_update_vblank_count - update the master vblank counter | ||
341 | * @dev: DRM device | ||
342 | * @crtc: counter to update | ||
343 | * | ||
344 | * Call back into the driver to update the appropriate vblank counter | ||
345 | * (specified by @crtc). Deal with wraparound, if it occurred, and | ||
346 | * update the last read value so we can deal with wraparound on the next | ||
347 | * call if necessary. | ||
348 | */ | ||
349 | void drm_update_vblank_count(struct drm_device *dev, int crtc) | ||
350 | { | ||
351 | unsigned long irqflags; | ||
352 | u32 cur_vblank, diff; | ||
353 | |||
354 | /* | ||
355 | * Interrupts were disabled prior to this call, so deal with counter | ||
356 | * wrap if needed. | ||
357 | * NOTE! It's possible we lost a full dev->max_vblank_count events | ||
358 | * here if the register is small or we had vblank interrupts off for | ||
359 | * a long time. | ||
360 | */ | ||
361 | cur_vblank = dev->driver->get_vblank_counter(dev, crtc); | ||
362 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | ||
363 | if (cur_vblank < dev->last_vblank[crtc]) { | ||
364 | diff = dev->max_vblank_count - | ||
365 | dev->last_vblank[crtc]; | ||
366 | diff += cur_vblank; | ||
367 | } else { | ||
368 | diff = cur_vblank - dev->last_vblank[crtc]; | ||
369 | } | ||
370 | dev->last_vblank[crtc] = cur_vblank; | ||
371 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | ||
372 | |||
373 | atomic_add(diff, &dev->_vblank_count[crtc]); | ||
374 | } | ||
375 | EXPORT_SYMBOL(drm_update_vblank_count); | ||
376 | |||
377 | /** | ||
378 | * drm_vblank_get - get a reference count on vblank events | ||
379 | * @dev: DRM device | ||
380 | * @crtc: which CRTC to own | ||
381 | * | ||
382 | * Acquire a reference count on vblank events to avoid having them disabled | ||
383 | * while in use. Note callers will probably want to update the master counter | ||
384 | * using drm_update_vblank_count() above before calling this routine so that | ||
385 | * wakeups occur on the right vblank event. | ||
386 | * | ||
387 | * RETURNS | ||
388 | * Zero on success, nonzero on failure. | ||
389 | */ | ||
390 | int drm_vblank_get(struct drm_device *dev, int crtc) | ||
391 | { | ||
392 | unsigned long irqflags; | ||
393 | int ret = 0; | ||
394 | |||
395 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | ||
396 | /* Going from 0->1 means we have to enable interrupts again */ | ||
397 | if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1 && | ||
398 | !dev->vblank_enabled[crtc]) { | ||
399 | ret = dev->driver->enable_vblank(dev, crtc); | ||
400 | if (ret) | ||
401 | atomic_dec(&dev->vblank_refcount[crtc]); | ||
402 | else | ||
403 | dev->vblank_enabled[crtc] = 1; | ||
404 | } | ||
405 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | ||
406 | |||
407 | return ret; | ||
408 | } | ||
409 | EXPORT_SYMBOL(drm_vblank_get); | ||
410 | |||
411 | /** | ||
412 | * drm_vblank_put - give up ownership of vblank events | ||
413 | * @dev: DRM device | ||
414 | * @crtc: which counter to give up | ||
415 | * | ||
416 | * Release ownership of a given vblank counter, turning off interrupts | ||
417 | * if possible. | ||
418 | */ | ||
419 | void drm_vblank_put(struct drm_device *dev, int crtc) | ||
420 | { | ||
421 | /* Last user schedules interrupt disable */ | ||
422 | if (atomic_dec_and_test(&dev->vblank_refcount[crtc])) | ||
423 | mod_timer(&dev->vblank_disable_timer, jiffies + 5*DRM_HZ); | ||
424 | } | ||
425 | EXPORT_SYMBOL(drm_vblank_put); | ||
426 | |||
427 | /** | ||
428 | * drm_modeset_ctl - handle vblank event counter changes across mode switch | ||
429 | * @DRM_IOCTL_ARGS: standard ioctl arguments | ||
430 | * | ||
431 | * Applications should call the %_DRM_PRE_MODESET and %_DRM_POST_MODESET | ||
432 | * ioctls around modesetting so that any lost vblank events are accounted for. | ||
433 | */ | ||
434 | int drm_modeset_ctl(struct drm_device *dev, void *data, | ||
435 | struct drm_file *file_priv) | ||
436 | { | ||
437 | struct drm_modeset_ctl *modeset = data; | ||
438 | int crtc, ret = 0; | ||
439 | u32 new; | ||
440 | |||
441 | crtc = modeset->arg; | ||
442 | if (crtc >= dev->num_crtcs) { | ||
443 | ret = -EINVAL; | ||
444 | goto out; | ||
445 | } | ||
446 | |||
447 | switch (modeset->cmd) { | ||
448 | case _DRM_PRE_MODESET: | ||
449 | dev->vblank_premodeset[crtc] = | ||
450 | dev->driver->get_vblank_counter(dev, crtc); | ||
451 | break; | ||
452 | case _DRM_POST_MODESET: | ||
453 | new = dev->driver->get_vblank_counter(dev, crtc); | ||
454 | dev->vblank_offset[crtc] = dev->vblank_premodeset[crtc] - new; | ||
455 | break; | ||
456 | default: | ||
457 | ret = -EINVAL; | ||
458 | break; | ||
459 | } | ||
460 | |||
461 | out: | ||
462 | return ret; | ||
463 | } | ||
464 | |||
465 | /** | ||
466 | * Wait for VBLANK. | 217 | * Wait for VBLANK. |
467 | * | 218 | * |
468 | * \param inode device inode. | 219 | * \param inode device inode. |
@@ -481,13 +232,12 @@ out: | |||
481 | * | 232 | * |
482 | * If a signal is not requested, then calls vblank_wait(). | 233 | * If a signal is not requested, then calls vblank_wait(). |
483 | */ | 234 | */ |
484 | int drm_wait_vblank(struct drm_device *dev, void *data, | 235 | int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *file_priv) |
485 | struct drm_file *file_priv) | ||
486 | { | 236 | { |
487 | union drm_wait_vblank *vblwait = data; | 237 | union drm_wait_vblank *vblwait = data; |
488 | struct timeval now; | 238 | struct timeval now; |
489 | int ret = 0; | 239 | int ret = 0; |
490 | unsigned int flags, seq, crtc; | 240 | unsigned int flags, seq; |
491 | 241 | ||
492 | if ((!dev->irq) || (!dev->irq_enabled)) | 242 | if ((!dev->irq) || (!dev->irq_enabled)) |
493 | return -EINVAL; | 243 | return -EINVAL; |
@@ -501,13 +251,13 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
501 | } | 251 | } |
502 | 252 | ||
503 | flags = vblwait->request.type & _DRM_VBLANK_FLAGS_MASK; | 253 | flags = vblwait->request.type & _DRM_VBLANK_FLAGS_MASK; |
504 | crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0; | ||
505 | 254 | ||
506 | if (crtc >= dev->num_crtcs) | 255 | if (!drm_core_check_feature(dev, (flags & _DRM_VBLANK_SECONDARY) ? |
256 | DRIVER_IRQ_VBL2 : DRIVER_IRQ_VBL)) | ||
507 | return -EINVAL; | 257 | return -EINVAL; |
508 | 258 | ||
509 | drm_update_vblank_count(dev, crtc); | 259 | seq = atomic_read((flags & _DRM_VBLANK_SECONDARY) ? &dev->vbl_received2 |
510 | seq = drm_vblank_count(dev, crtc); | 260 | : &dev->vbl_received); |
511 | 261 | ||
512 | switch (vblwait->request.type & _DRM_VBLANK_TYPES_MASK) { | 262 | switch (vblwait->request.type & _DRM_VBLANK_TYPES_MASK) { |
513 | case _DRM_VBLANK_RELATIVE: | 263 | case _DRM_VBLANK_RELATIVE: |
@@ -526,7 +276,8 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
526 | 276 | ||
527 | if (flags & _DRM_VBLANK_SIGNAL) { | 277 | if (flags & _DRM_VBLANK_SIGNAL) { |
528 | unsigned long irqflags; | 278 | unsigned long irqflags; |
529 | struct list_head *vbl_sigs = &dev->vbl_sigs[crtc]; | 279 | struct list_head *vbl_sigs = (flags & _DRM_VBLANK_SECONDARY) |
280 | ? &dev->vbl_sigs2 : &dev->vbl_sigs; | ||
530 | struct drm_vbl_sig *vbl_sig; | 281 | struct drm_vbl_sig *vbl_sig; |
531 | 282 | ||
532 | spin_lock_irqsave(&dev->vbl_lock, irqflags); | 283 | spin_lock_irqsave(&dev->vbl_lock, irqflags); |
@@ -547,26 +298,22 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
547 | } | 298 | } |
548 | } | 299 | } |
549 | 300 | ||
550 | if (atomic_read(&dev->vbl_signal_pending) >= 100) { | 301 | if (dev->vbl_pending >= 100) { |
551 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | 302 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
552 | return -EBUSY; | 303 | return -EBUSY; |
553 | } | 304 | } |
554 | 305 | ||
306 | dev->vbl_pending++; | ||
307 | |||
555 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); | 308 | spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
556 | 309 | ||
557 | vbl_sig = drm_calloc(1, sizeof(struct drm_vbl_sig), | 310 | if (! |
558 | DRM_MEM_DRIVER); | 311 | (vbl_sig = |
559 | if (!vbl_sig) | 312 | drm_alloc(sizeof(struct drm_vbl_sig), DRM_MEM_DRIVER))) { |
560 | return -ENOMEM; | 313 | return -ENOMEM; |
561 | |||
562 | ret = drm_vblank_get(dev, crtc); | ||
563 | if (ret) { | ||
564 | drm_free(vbl_sig, sizeof(struct drm_vbl_sig), | ||
565 | DRM_MEM_DRIVER); | ||
566 | return ret; | ||
567 | } | 314 | } |
568 | 315 | ||
569 | atomic_inc(&dev->vbl_signal_pending); | 316 | memset((void *)vbl_sig, 0, sizeof(*vbl_sig)); |
570 | 317 | ||
571 | vbl_sig->sequence = vblwait->request.sequence; | 318 | vbl_sig->sequence = vblwait->request.sequence; |
572 | vbl_sig->info.si_signo = vblwait->request.signal; | 319 | vbl_sig->info.si_signo = vblwait->request.signal; |
@@ -580,20 +327,17 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
580 | 327 | ||
581 | vblwait->reply.sequence = seq; | 328 | vblwait->reply.sequence = seq; |
582 | } else { | 329 | } else { |
583 | unsigned long cur_vblank; | 330 | if (flags & _DRM_VBLANK_SECONDARY) { |
584 | 331 | if (dev->driver->vblank_wait2) | |
585 | ret = drm_vblank_get(dev, crtc); | 332 | ret = dev->driver->vblank_wait2(dev, &vblwait->request.sequence); |
586 | if (ret) | 333 | } else if (dev->driver->vblank_wait) |
587 | return ret; | 334 | ret = |
588 | DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, | 335 | dev->driver->vblank_wait(dev, |
589 | (((cur_vblank = drm_vblank_count(dev, crtc)) | 336 | &vblwait->request.sequence); |
590 | - vblwait->request.sequence) <= (1 << 23))); | ||
591 | drm_vblank_put(dev, crtc); | ||
592 | do_gettimeofday(&now); | ||
593 | 337 | ||
338 | do_gettimeofday(&now); | ||
594 | vblwait->reply.tval_sec = now.tv_sec; | 339 | vblwait->reply.tval_sec = now.tv_sec; |
595 | vblwait->reply.tval_usec = now.tv_usec; | 340 | vblwait->reply.tval_usec = now.tv_usec; |
596 | vblwait->reply.sequence = cur_vblank; | ||
597 | } | 341 | } |
598 | 342 | ||
599 | done: | 343 | done: |
@@ -604,57 +348,44 @@ int drm_wait_vblank(struct drm_device *dev, void *data, | |||
604 | * Send the VBLANK signals. | 348 | * Send the VBLANK signals. |
605 | * | 349 | * |
606 | * \param dev DRM device. | 350 | * \param dev DRM device. |
607 | * \param crtc CRTC where the vblank event occurred | ||
608 | * | 351 | * |
609 | * Sends a signal for each task in drm_device::vbl_sigs and empties the list. | 352 | * Sends a signal for each task in drm_device::vbl_sigs and empties the list. |
610 | * | 353 | * |
611 | * If a signal is not requested, then calls vblank_wait(). | 354 | * If a signal is not requested, then calls vblank_wait(). |
612 | */ | 355 | */ |
613 | static void drm_vbl_send_signals(struct drm_device * dev, int crtc) | 356 | void drm_vbl_send_signals(struct drm_device * dev) |
614 | { | 357 | { |
615 | struct drm_vbl_sig *vbl_sig, *tmp; | ||
616 | struct list_head *vbl_sigs; | ||
617 | unsigned int vbl_seq; | ||
618 | unsigned long flags; | 358 | unsigned long flags; |
359 | int i; | ||
619 | 360 | ||
620 | spin_lock_irqsave(&dev->vbl_lock, flags); | 361 | spin_lock_irqsave(&dev->vbl_lock, flags); |
621 | 362 | ||
622 | vbl_sigs = &dev->vbl_sigs[crtc]; | 363 | for (i = 0; i < 2; i++) { |
623 | vbl_seq = drm_vblank_count(dev, crtc); | 364 | struct drm_vbl_sig *vbl_sig, *tmp; |
365 | struct list_head *vbl_sigs = i ? &dev->vbl_sigs2 : &dev->vbl_sigs; | ||
366 | unsigned int vbl_seq = atomic_read(i ? &dev->vbl_received2 : | ||
367 | &dev->vbl_received); | ||
624 | 368 | ||
625 | list_for_each_entry_safe(vbl_sig, tmp, vbl_sigs, head) { | 369 | list_for_each_entry_safe(vbl_sig, tmp, vbl_sigs, head) { |
626 | if ((vbl_seq - vbl_sig->sequence) <= (1 << 23)) { | 370 | if ((vbl_seq - vbl_sig->sequence) <= (1 << 23)) { |
627 | vbl_sig->info.si_code = vbl_seq; | 371 | vbl_sig->info.si_code = vbl_seq; |
628 | send_sig_info(vbl_sig->info.si_signo, | 372 | send_sig_info(vbl_sig->info.si_signo, |
629 | &vbl_sig->info, vbl_sig->task); | 373 | &vbl_sig->info, vbl_sig->task); |
630 | 374 | ||
631 | list_del(&vbl_sig->head); | 375 | list_del(&vbl_sig->head); |
632 | 376 | ||
633 | drm_free(vbl_sig, sizeof(*vbl_sig), | 377 | drm_free(vbl_sig, sizeof(*vbl_sig), |
634 | DRM_MEM_DRIVER); | 378 | DRM_MEM_DRIVER); |
635 | atomic_dec(&dev->vbl_signal_pending); | 379 | |
636 | drm_vblank_put(dev, crtc); | 380 | dev->vbl_pending--; |
637 | } | 381 | } |
382 | } | ||
638 | } | 383 | } |
639 | 384 | ||
640 | spin_unlock_irqrestore(&dev->vbl_lock, flags); | 385 | spin_unlock_irqrestore(&dev->vbl_lock, flags); |
641 | } | 386 | } |
642 | 387 | ||
643 | /** | 388 | EXPORT_SYMBOL(drm_vbl_send_signals); |
644 | * drm_handle_vblank - handle a vblank event | ||
645 | * @dev: DRM device | ||
646 | * @crtc: where this event occurred | ||
647 | * | ||
648 | * Drivers should call this routine in their vblank interrupt handlers to | ||
649 | * update the vblank counter and send any signals that may be pending. | ||
650 | */ | ||
651 | void drm_handle_vblank(struct drm_device *dev, int crtc) | ||
652 | { | ||
653 | drm_update_vblank_count(dev, crtc); | ||
654 | DRM_WAKEUP(&dev->vbl_queue[crtc]); | ||
655 | drm_vbl_send_signals(dev, crtc); | ||
656 | } | ||
657 | EXPORT_SYMBOL(drm_handle_vblank); | ||
658 | 389 | ||
659 | /** | 390 | /** |
660 | * Tasklet wrapper function. | 391 | * Tasklet wrapper function. |
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index 12dcdd1832f0..0998723cde79 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -53,7 +53,6 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
53 | DECLARE_WAITQUEUE(entry, current); | 53 | DECLARE_WAITQUEUE(entry, current); |
54 | struct drm_lock *lock = data; | 54 | struct drm_lock *lock = data; |
55 | int ret = 0; | 55 | int ret = 0; |
56 | unsigned long irqflags; | ||
57 | 56 | ||
58 | ++file_priv->lock_count; | 57 | ++file_priv->lock_count; |
59 | 58 | ||
@@ -72,9 +71,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
72 | return -EINVAL; | 71 | return -EINVAL; |
73 | 72 | ||
74 | add_wait_queue(&dev->lock.lock_queue, &entry); | 73 | add_wait_queue(&dev->lock.lock_queue, &entry); |
75 | spin_lock_irqsave(&dev->lock.spinlock, irqflags); | 74 | spin_lock_bh(&dev->lock.spinlock); |
76 | dev->lock.user_waiters++; | 75 | dev->lock.user_waiters++; |
77 | spin_unlock_irqrestore(&dev->lock.spinlock, irqflags); | 76 | spin_unlock_bh(&dev->lock.spinlock); |
78 | for (;;) { | 77 | for (;;) { |
79 | __set_current_state(TASK_INTERRUPTIBLE); | 78 | __set_current_state(TASK_INTERRUPTIBLE); |
80 | if (!dev->lock.hw_lock) { | 79 | if (!dev->lock.hw_lock) { |
@@ -96,9 +95,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
96 | break; | 95 | break; |
97 | } | 96 | } |
98 | } | 97 | } |
99 | spin_lock_irqsave(&dev->lock.spinlock, irqflags); | 98 | spin_lock_bh(&dev->lock.spinlock); |
100 | dev->lock.user_waiters--; | 99 | dev->lock.user_waiters--; |
101 | spin_unlock_irqrestore(&dev->lock.spinlock, irqflags); | 100 | spin_unlock_bh(&dev->lock.spinlock); |
102 | __set_current_state(TASK_RUNNING); | 101 | __set_current_state(TASK_RUNNING); |
103 | remove_wait_queue(&dev->lock.lock_queue, &entry); | 102 | remove_wait_queue(&dev->lock.lock_queue, &entry); |
104 | 103 | ||
@@ -199,9 +198,8 @@ int drm_lock_take(struct drm_lock_data *lock_data, | |||
199 | { | 198 | { |
200 | unsigned int old, new, prev; | 199 | unsigned int old, new, prev; |
201 | volatile unsigned int *lock = &lock_data->hw_lock->lock; | 200 | volatile unsigned int *lock = &lock_data->hw_lock->lock; |
202 | unsigned long irqflags; | ||
203 | 201 | ||
204 | spin_lock_irqsave(&lock_data->spinlock, irqflags); | 202 | spin_lock_bh(&lock_data->spinlock); |
205 | do { | 203 | do { |
206 | old = *lock; | 204 | old = *lock; |
207 | if (old & _DRM_LOCK_HELD) | 205 | if (old & _DRM_LOCK_HELD) |
@@ -213,7 +211,7 @@ int drm_lock_take(struct drm_lock_data *lock_data, | |||
213 | } | 211 | } |
214 | prev = cmpxchg(lock, old, new); | 212 | prev = cmpxchg(lock, old, new); |
215 | } while (prev != old); | 213 | } while (prev != old); |
216 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 214 | spin_unlock_bh(&lock_data->spinlock); |
217 | 215 | ||
218 | if (_DRM_LOCKING_CONTEXT(old) == context) { | 216 | if (_DRM_LOCKING_CONTEXT(old) == context) { |
219 | if (old & _DRM_LOCK_HELD) { | 217 | if (old & _DRM_LOCK_HELD) { |
@@ -274,16 +272,15 @@ int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context) | |||
274 | { | 272 | { |
275 | unsigned int old, new, prev; | 273 | unsigned int old, new, prev; |
276 | volatile unsigned int *lock = &lock_data->hw_lock->lock; | 274 | volatile unsigned int *lock = &lock_data->hw_lock->lock; |
277 | unsigned long irqflags; | ||
278 | 275 | ||
279 | spin_lock_irqsave(&lock_data->spinlock, irqflags); | 276 | spin_lock_bh(&lock_data->spinlock); |
280 | if (lock_data->kernel_waiters != 0) { | 277 | if (lock_data->kernel_waiters != 0) { |
281 | drm_lock_transfer(lock_data, 0); | 278 | drm_lock_transfer(lock_data, 0); |
282 | lock_data->idle_has_lock = 1; | 279 | lock_data->idle_has_lock = 1; |
283 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 280 | spin_unlock_bh(&lock_data->spinlock); |
284 | return 1; | 281 | return 1; |
285 | } | 282 | } |
286 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 283 | spin_unlock_bh(&lock_data->spinlock); |
287 | 284 | ||
288 | do { | 285 | do { |
289 | old = *lock; | 286 | old = *lock; |
@@ -347,20 +344,19 @@ static int drm_notifier(void *priv) | |||
347 | void drm_idlelock_take(struct drm_lock_data *lock_data) | 344 | void drm_idlelock_take(struct drm_lock_data *lock_data) |
348 | { | 345 | { |
349 | int ret = 0; | 346 | int ret = 0; |
350 | unsigned long irqflags; | ||
351 | 347 | ||
352 | spin_lock_irqsave(&lock_data->spinlock, irqflags); | 348 | spin_lock_bh(&lock_data->spinlock); |
353 | lock_data->kernel_waiters++; | 349 | lock_data->kernel_waiters++; |
354 | if (!lock_data->idle_has_lock) { | 350 | if (!lock_data->idle_has_lock) { |
355 | 351 | ||
356 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 352 | spin_unlock_bh(&lock_data->spinlock); |
357 | ret = drm_lock_take(lock_data, DRM_KERNEL_CONTEXT); | 353 | ret = drm_lock_take(lock_data, DRM_KERNEL_CONTEXT); |
358 | spin_lock_irqsave(&lock_data->spinlock, irqflags); | 354 | spin_lock_bh(&lock_data->spinlock); |
359 | 355 | ||
360 | if (ret == 1) | 356 | if (ret == 1) |
361 | lock_data->idle_has_lock = 1; | 357 | lock_data->idle_has_lock = 1; |
362 | } | 358 | } |
363 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 359 | spin_unlock_bh(&lock_data->spinlock); |
364 | } | 360 | } |
365 | EXPORT_SYMBOL(drm_idlelock_take); | 361 | EXPORT_SYMBOL(drm_idlelock_take); |
366 | 362 | ||
@@ -368,9 +364,8 @@ void drm_idlelock_release(struct drm_lock_data *lock_data) | |||
368 | { | 364 | { |
369 | unsigned int old, prev; | 365 | unsigned int old, prev; |
370 | volatile unsigned int *lock = &lock_data->hw_lock->lock; | 366 | volatile unsigned int *lock = &lock_data->hw_lock->lock; |
371 | unsigned long irqflags; | ||
372 | 367 | ||
373 | spin_lock_irqsave(&lock_data->spinlock, irqflags); | 368 | spin_lock_bh(&lock_data->spinlock); |
374 | if (--lock_data->kernel_waiters == 0) { | 369 | if (--lock_data->kernel_waiters == 0) { |
375 | if (lock_data->idle_has_lock) { | 370 | if (lock_data->idle_has_lock) { |
376 | do { | 371 | do { |
@@ -381,7 +376,7 @@ void drm_idlelock_release(struct drm_lock_data *lock_data) | |||
381 | lock_data->idle_has_lock = 0; | 376 | lock_data->idle_has_lock = 0; |
382 | } | 377 | } |
383 | } | 378 | } |
384 | spin_unlock_irqrestore(&lock_data->spinlock, irqflags); | 379 | spin_unlock_bh(&lock_data->spinlock); |
385 | } | 380 | } |
386 | EXPORT_SYMBOL(drm_idlelock_release); | 381 | EXPORT_SYMBOL(drm_idlelock_release); |
387 | 382 | ||
diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c index 9a32169e88fb..af211a0ef179 100644 --- a/drivers/char/drm/drm_sysfs.c +++ b/drivers/char/drm/drm_sysfs.c | |||
@@ -34,8 +34,6 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state) | |||
34 | struct drm_minor *drm_minor = to_drm_minor(dev); | 34 | struct drm_minor *drm_minor = to_drm_minor(dev); |
35 | struct drm_device *drm_dev = drm_minor->dev; | 35 | struct drm_device *drm_dev = drm_minor->dev; |
36 | 36 | ||
37 | printk(KERN_ERR "%s\n", __func__); | ||
38 | |||
39 | if (drm_dev->driver->suspend) | 37 | if (drm_dev->driver->suspend) |
40 | return drm_dev->driver->suspend(drm_dev, state); | 38 | return drm_dev->driver->suspend(drm_dev, state); |
41 | 39 | ||
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index f47e46e3529f..88974342933c 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -415,13 +415,10 @@ static void i915_emit_breadcrumb(struct drm_device *dev) | |||
415 | drm_i915_private_t *dev_priv = dev->dev_private; | 415 | drm_i915_private_t *dev_priv = dev->dev_private; |
416 | RING_LOCALS; | 416 | RING_LOCALS; |
417 | 417 | ||
418 | if (++dev_priv->counter > BREADCRUMB_MASK) { | 418 | dev_priv->sarea_priv->last_enqueue = ++dev_priv->counter; |
419 | dev_priv->counter = 1; | ||
420 | DRM_DEBUG("Breadcrumb counter wrapped around\n"); | ||
421 | } | ||
422 | 419 | ||
423 | if (dev_priv->sarea_priv) | 420 | if (dev_priv->counter > 0x7FFFFFFFUL) |
424 | dev_priv->sarea_priv->last_enqueue = dev_priv->counter; | 421 | dev_priv->sarea_priv->last_enqueue = dev_priv->counter = 1; |
425 | 422 | ||
426 | BEGIN_LP_RING(4); | 423 | BEGIN_LP_RING(4); |
427 | OUT_RING(CMD_STORE_DWORD_IDX); | 424 | OUT_RING(CMD_STORE_DWORD_IDX); |
@@ -431,26 +428,6 @@ static void i915_emit_breadcrumb(struct drm_device *dev) | |||
431 | ADVANCE_LP_RING(); | 428 | ADVANCE_LP_RING(); |
432 | } | 429 | } |
433 | 430 | ||
434 | int i915_emit_mi_flush(struct drm_device *dev, uint32_t flush) | ||
435 | { | ||
436 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
437 | uint32_t flush_cmd = CMD_MI_FLUSH; | ||
438 | RING_LOCALS; | ||
439 | |||
440 | flush_cmd |= flush; | ||
441 | |||
442 | i915_kernel_lost_context(dev); | ||
443 | |||
444 | BEGIN_LP_RING(4); | ||
445 | OUT_RING(flush_cmd); | ||
446 | OUT_RING(0); | ||
447 | OUT_RING(0); | ||
448 | OUT_RING(0); | ||
449 | ADVANCE_LP_RING(); | ||
450 | |||
451 | return 0; | ||
452 | } | ||
453 | |||
454 | static int i915_dispatch_cmdbuffer(struct drm_device * dev, | 431 | static int i915_dispatch_cmdbuffer(struct drm_device * dev, |
455 | drm_i915_cmdbuffer_t * cmd) | 432 | drm_i915_cmdbuffer_t * cmd) |
456 | { | 433 | { |
@@ -534,74 +511,52 @@ static int i915_dispatch_batchbuffer(struct drm_device * dev, | |||
534 | return 0; | 511 | return 0; |
535 | } | 512 | } |
536 | 513 | ||
537 | static void i915_do_dispatch_flip(struct drm_device * dev, int plane, int sync) | 514 | static int i915_dispatch_flip(struct drm_device * dev) |
538 | { | 515 | { |
539 | drm_i915_private_t *dev_priv = dev->dev_private; | 516 | drm_i915_private_t *dev_priv = dev->dev_private; |
540 | u32 num_pages, current_page, next_page, dspbase; | ||
541 | int shift = 2 * plane, x, y; | ||
542 | RING_LOCALS; | 517 | RING_LOCALS; |
543 | 518 | ||
544 | /* Calculate display base offset */ | 519 | DRM_DEBUG("%s: page=%d pfCurrentPage=%d\n", |
545 | num_pages = dev_priv->sarea_priv->third_handle ? 3 : 2; | 520 | __FUNCTION__, |
546 | current_page = (dev_priv->sarea_priv->pf_current_page >> shift) & 0x3; | 521 | dev_priv->current_page, |
547 | next_page = (current_page + 1) % num_pages; | 522 | dev_priv->sarea_priv->pf_current_page); |
548 | 523 | ||
549 | switch (next_page) { | 524 | i915_kernel_lost_context(dev); |
550 | default: | 525 | |
551 | case 0: | 526 | BEGIN_LP_RING(2); |
552 | dspbase = dev_priv->sarea_priv->front_offset; | 527 | OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); |
553 | break; | 528 | OUT_RING(0); |
554 | case 1: | 529 | ADVANCE_LP_RING(); |
555 | dspbase = dev_priv->sarea_priv->back_offset; | ||
556 | break; | ||
557 | case 2: | ||
558 | dspbase = dev_priv->sarea_priv->third_offset; | ||
559 | break; | ||
560 | } | ||
561 | 530 | ||
562 | if (plane == 0) { | 531 | BEGIN_LP_RING(6); |
563 | x = dev_priv->sarea_priv->planeA_x; | 532 | OUT_RING(CMD_OP_DISPLAYBUFFER_INFO | ASYNC_FLIP); |
564 | y = dev_priv->sarea_priv->planeA_y; | 533 | OUT_RING(0); |
534 | if (dev_priv->current_page == 0) { | ||
535 | OUT_RING(dev_priv->back_offset); | ||
536 | dev_priv->current_page = 1; | ||
565 | } else { | 537 | } else { |
566 | x = dev_priv->sarea_priv->planeB_x; | 538 | OUT_RING(dev_priv->front_offset); |
567 | y = dev_priv->sarea_priv->planeB_y; | 539 | dev_priv->current_page = 0; |
568 | } | 540 | } |
541 | OUT_RING(0); | ||
542 | ADVANCE_LP_RING(); | ||
569 | 543 | ||
570 | dspbase += (y * dev_priv->sarea_priv->pitch + x) * dev_priv->cpp; | 544 | BEGIN_LP_RING(2); |
545 | OUT_RING(MI_WAIT_FOR_EVENT | MI_WAIT_FOR_PLANE_A_FLIP); | ||
546 | OUT_RING(0); | ||
547 | ADVANCE_LP_RING(); | ||
571 | 548 | ||
572 | DRM_DEBUG("plane=%d current_page=%d dspbase=0x%x\n", plane, current_page, | 549 | dev_priv->sarea_priv->last_enqueue = dev_priv->counter++; |
573 | dspbase); | ||
574 | 550 | ||
575 | BEGIN_LP_RING(4); | 551 | BEGIN_LP_RING(4); |
576 | OUT_RING(sync ? 0 : | 552 | OUT_RING(CMD_STORE_DWORD_IDX); |
577 | (MI_WAIT_FOR_EVENT | (plane ? MI_WAIT_FOR_PLANE_B_FLIP : | 553 | OUT_RING(20); |
578 | MI_WAIT_FOR_PLANE_A_FLIP))); | 554 | OUT_RING(dev_priv->counter); |
579 | OUT_RING(CMD_OP_DISPLAYBUFFER_INFO | (sync ? 0 : ASYNC_FLIP) | | 555 | OUT_RING(0); |
580 | (plane ? DISPLAY_PLANE_B : DISPLAY_PLANE_A)); | ||
581 | OUT_RING(dev_priv->sarea_priv->pitch * dev_priv->cpp); | ||
582 | OUT_RING(dspbase); | ||
583 | ADVANCE_LP_RING(); | 556 | ADVANCE_LP_RING(); |
584 | 557 | ||
585 | dev_priv->sarea_priv->pf_current_page &= ~(0x3 << shift); | 558 | dev_priv->sarea_priv->pf_current_page = dev_priv->current_page; |
586 | dev_priv->sarea_priv->pf_current_page |= next_page << shift; | 559 | return 0; |
587 | } | ||
588 | |||
589 | void i915_dispatch_flip(struct drm_device * dev, int planes, int sync) | ||
590 | { | ||
591 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
592 | int i; | ||
593 | |||
594 | DRM_DEBUG("planes=0x%x pfCurrentPage=%d\n", | ||
595 | planes, dev_priv->sarea_priv->pf_current_page); | ||
596 | |||
597 | i915_emit_mi_flush(dev, MI_READ_FLUSH | MI_EXE_FLUSH); | ||
598 | |||
599 | for (i = 0; i < 2; i++) | ||
600 | if (planes & (1 << i)) | ||
601 | i915_do_dispatch_flip(dev, i, sync); | ||
602 | |||
603 | i915_emit_breadcrumb(dev); | ||
604 | |||
605 | } | 560 | } |
606 | 561 | ||
607 | static int i915_quiescent(struct drm_device * dev) | 562 | static int i915_quiescent(struct drm_device * dev) |
@@ -624,6 +579,7 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, | |||
624 | struct drm_file *file_priv) | 579 | struct drm_file *file_priv) |
625 | { | 580 | { |
626 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 581 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
582 | u32 *hw_status = dev_priv->hw_status_page; | ||
627 | drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) | 583 | drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) |
628 | dev_priv->sarea_priv; | 584 | dev_priv->sarea_priv; |
629 | drm_i915_batchbuffer_t *batch = data; | 585 | drm_i915_batchbuffer_t *batch = data; |
@@ -646,7 +602,7 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, | |||
646 | 602 | ||
647 | ret = i915_dispatch_batchbuffer(dev, batch); | 603 | ret = i915_dispatch_batchbuffer(dev, batch); |
648 | 604 | ||
649 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 605 | sarea_priv->last_dispatch = (int)hw_status[5]; |
650 | return ret; | 606 | return ret; |
651 | } | 607 | } |
652 | 608 | ||
@@ -654,6 +610,7 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, | |||
654 | struct drm_file *file_priv) | 610 | struct drm_file *file_priv) |
655 | { | 611 | { |
656 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 612 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
613 | u32 *hw_status = dev_priv->hw_status_page; | ||
657 | drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) | 614 | drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *) |
658 | dev_priv->sarea_priv; | 615 | dev_priv->sarea_priv; |
659 | drm_i915_cmdbuffer_t *cmdbuf = data; | 616 | drm_i915_cmdbuffer_t *cmdbuf = data; |
@@ -678,51 +635,18 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, | |||
678 | return ret; | 635 | return ret; |
679 | } | 636 | } |
680 | 637 | ||
681 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 638 | sarea_priv->last_dispatch = (int)hw_status[5]; |
682 | return 0; | ||
683 | } | ||
684 | |||
685 | static int i915_do_cleanup_pageflip(struct drm_device * dev) | ||
686 | { | ||
687 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
688 | int i, planes, num_pages = dev_priv->sarea_priv->third_handle ? 3 : 2; | ||
689 | |||
690 | DRM_DEBUG("\n"); | ||
691 | |||
692 | for (i = 0, planes = 0; i < 2; i++) | ||
693 | if (dev_priv->sarea_priv->pf_current_page & (0x3 << (2 * i))) { | ||
694 | dev_priv->sarea_priv->pf_current_page = | ||
695 | (dev_priv->sarea_priv->pf_current_page & | ||
696 | ~(0x3 << (2 * i))) | ((num_pages - 1) << (2 * i)); | ||
697 | |||
698 | planes |= 1 << i; | ||
699 | } | ||
700 | |||
701 | if (planes) | ||
702 | i915_dispatch_flip(dev, planes, 0); | ||
703 | |||
704 | return 0; | 639 | return 0; |
705 | } | 640 | } |
706 | 641 | ||
707 | static int i915_flip_bufs(struct drm_device *dev, void *data, | 642 | static int i915_flip_bufs(struct drm_device *dev, void *data, |
708 | struct drm_file *file_priv) | 643 | struct drm_file *file_priv) |
709 | { | 644 | { |
710 | drm_i915_flip_t *param = data; | 645 | DRM_DEBUG("%s\n", __FUNCTION__); |
711 | |||
712 | DRM_DEBUG("\n"); | ||
713 | 646 | ||
714 | LOCK_TEST_WITH_RETURN(dev, file_priv); | 647 | LOCK_TEST_WITH_RETURN(dev, file_priv); |
715 | 648 | ||
716 | /* This is really planes */ | 649 | return i915_dispatch_flip(dev); |
717 | if (param->pipes & ~0x3) { | ||
718 | DRM_ERROR("Invalid planes 0x%x, only <= 0x3 is valid\n", | ||
719 | param->pipes); | ||
720 | return -EINVAL; | ||
721 | } | ||
722 | |||
723 | i915_dispatch_flip(dev, param->pipes, 0); | ||
724 | |||
725 | return 0; | ||
726 | } | 650 | } |
727 | 651 | ||
728 | static int i915_getparam(struct drm_device *dev, void *data, | 652 | static int i915_getparam(struct drm_device *dev, void *data, |
@@ -883,8 +807,6 @@ void i915_driver_lastclose(struct drm_device * dev) | |||
883 | if (!dev_priv) | 807 | if (!dev_priv) |
884 | return; | 808 | return; |
885 | 809 | ||
886 | if (drm_getsarea(dev) && dev_priv->sarea_priv) | ||
887 | i915_do_cleanup_pageflip(dev); | ||
888 | if (dev_priv->agp_heap) | 810 | if (dev_priv->agp_heap) |
889 | i915_mem_takedown(&(dev_priv->agp_heap)); | 811 | i915_mem_takedown(&(dev_priv->agp_heap)); |
890 | 812 | ||
diff --git a/drivers/char/drm/i915_drm.h b/drivers/char/drm/i915_drm.h index 0431c00e2289..05c66cf03a9e 100644 --- a/drivers/char/drm/i915_drm.h +++ b/drivers/char/drm/i915_drm.h | |||
@@ -105,29 +105,14 @@ typedef struct _drm_i915_sarea { | |||
105 | unsigned int rotated_tiled; | 105 | unsigned int rotated_tiled; |
106 | unsigned int rotated2_tiled; | 106 | unsigned int rotated2_tiled; |
107 | 107 | ||
108 | int planeA_x; | 108 | int pipeA_x; |
109 | int planeA_y; | 109 | int pipeA_y; |
110 | int planeA_w; | 110 | int pipeA_w; |
111 | int planeA_h; | 111 | int pipeA_h; |
112 | int planeB_x; | 112 | int pipeB_x; |
113 | int planeB_y; | 113 | int pipeB_y; |
114 | int planeB_w; | 114 | int pipeB_w; |
115 | int planeB_h; | 115 | int pipeB_h; |
116 | |||
117 | /* Triple buffering */ | ||
118 | drm_handle_t third_handle; | ||
119 | int third_offset; | ||
120 | int third_size; | ||
121 | unsigned int third_tiled; | ||
122 | |||
123 | /* buffer object handles for the static buffers. May change | ||
124 | * over the lifetime of the client, though it doesn't in our current | ||
125 | * implementation. | ||
126 | */ | ||
127 | unsigned int front_bo_handle; | ||
128 | unsigned int back_bo_handle; | ||
129 | unsigned int third_bo_handle; | ||
130 | unsigned int depth_bo_handle; | ||
131 | } drm_i915_sarea_t; | 116 | } drm_i915_sarea_t; |
132 | 117 | ||
133 | /* Flags for perf_boxes | 118 | /* Flags for perf_boxes |
@@ -161,7 +146,7 @@ typedef struct _drm_i915_sarea { | |||
161 | 146 | ||
162 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 147 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
163 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 148 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
164 | #define DRM_IOCTL_I915_FLIP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_FLIP, drm_i915_flip_t) | 149 | #define DRM_IOCTL_I915_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLIP) |
165 | #define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) | 150 | #define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) |
166 | #define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) | 151 | #define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) |
167 | #define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) | 152 | #define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) |
@@ -176,18 +161,6 @@ typedef struct _drm_i915_sarea { | |||
176 | #define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) | 161 | #define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) |
177 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) | 162 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) |
178 | 163 | ||
179 | /* Asynchronous page flipping: | ||
180 | */ | ||
181 | typedef struct drm_i915_flip { | ||
182 | /* | ||
183 | * This is really talking about planes, and we could rename it | ||
184 | * except for the fact that some of the duplicated i915_drm.h files | ||
185 | * out there check for HAVE_I915_FLIP and so might pick up this | ||
186 | * version. | ||
187 | */ | ||
188 | int pipes; | ||
189 | } drm_i915_flip_t; | ||
190 | |||
191 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 164 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
192 | * on the security mechanisms provided by hardware. | 165 | * on the security mechanisms provided by hardware. |
193 | */ | 166 | */ |
diff --git a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c index bb8f1b2fb383..e8f3d682e3b1 100644 --- a/drivers/char/drm/i915_drv.c +++ b/drivers/char/drm/i915_drv.c | |||
@@ -147,7 +147,7 @@ static void i915_save_vga(struct drm_device *dev) | |||
147 | i915_write_indexed(cr_index, cr_data, 0x11, | 147 | i915_write_indexed(cr_index, cr_data, 0x11, |
148 | i915_read_indexed(cr_index, cr_data, 0x11) & | 148 | i915_read_indexed(cr_index, cr_data, 0x11) & |
149 | (~0x80)); | 149 | (~0x80)); |
150 | for (i = 0; i < 0x24; i++) | 150 | for (i = 0; i <= 0x24; i++) |
151 | dev_priv->saveCR[i] = | 151 | dev_priv->saveCR[i] = |
152 | i915_read_indexed(cr_index, cr_data, i); | 152 | i915_read_indexed(cr_index, cr_data, i); |
153 | /* Make sure we don't turn off CR group 0 writes */ | 153 | /* Make sure we don't turn off CR group 0 writes */ |
@@ -156,7 +156,7 @@ static void i915_save_vga(struct drm_device *dev) | |||
156 | /* Attribute controller registers */ | 156 | /* Attribute controller registers */ |
157 | inb(st01); | 157 | inb(st01); |
158 | dev_priv->saveAR_INDEX = inb(VGA_AR_INDEX); | 158 | dev_priv->saveAR_INDEX = inb(VGA_AR_INDEX); |
159 | for (i = 0; i < 20; i++) | 159 | for (i = 0; i <= 0x14; i++) |
160 | dev_priv->saveAR[i] = i915_read_ar(st01, i, 0); | 160 | dev_priv->saveAR[i] = i915_read_ar(st01, i, 0); |
161 | inb(st01); | 161 | inb(st01); |
162 | outb(dev_priv->saveAR_INDEX, VGA_AR_INDEX); | 162 | outb(dev_priv->saveAR_INDEX, VGA_AR_INDEX); |
@@ -206,7 +206,7 @@ static void i915_restore_vga(struct drm_device *dev) | |||
206 | /* CRT controller regs */ | 206 | /* CRT controller regs */ |
207 | /* Enable CR group 0 writes */ | 207 | /* Enable CR group 0 writes */ |
208 | i915_write_indexed(cr_index, cr_data, 0x11, dev_priv->saveCR[0x11]); | 208 | i915_write_indexed(cr_index, cr_data, 0x11, dev_priv->saveCR[0x11]); |
209 | for (i = 0; i < 0x24; i++) | 209 | for (i = 0; i <= 0x24; i++) |
210 | i915_write_indexed(cr_index, cr_data, i, dev_priv->saveCR[i]); | 210 | i915_write_indexed(cr_index, cr_data, i, dev_priv->saveCR[i]); |
211 | 211 | ||
212 | /* Graphics controller regs */ | 212 | /* Graphics controller regs */ |
@@ -223,7 +223,7 @@ static void i915_restore_vga(struct drm_device *dev) | |||
223 | 223 | ||
224 | /* Attribute controller registers */ | 224 | /* Attribute controller registers */ |
225 | inb(st01); | 225 | inb(st01); |
226 | for (i = 0; i < 20; i++) | 226 | for (i = 0; i <= 0x14; i++) |
227 | i915_write_ar(st01, i, dev_priv->saveAR[i], 0); | 227 | i915_write_ar(st01, i, dev_priv->saveAR[i], 0); |
228 | inb(st01); /* switch back to index mode */ | 228 | inb(st01); /* switch back to index mode */ |
229 | outb(dev_priv->saveAR_INDEX | 0x20, VGA_AR_INDEX); | 229 | outb(dev_priv->saveAR_INDEX | 0x20, VGA_AR_INDEX); |
@@ -256,6 +256,9 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state) | |||
256 | pci_save_state(dev->pdev); | 256 | pci_save_state(dev->pdev); |
257 | pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB); | 257 | pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB); |
258 | 258 | ||
259 | /* Display arbitration control */ | ||
260 | dev_priv->saveDSPARB = I915_READ(DSPARB); | ||
261 | |||
259 | /* Pipe & plane A info */ | 262 | /* Pipe & plane A info */ |
260 | dev_priv->savePIPEACONF = I915_READ(PIPEACONF); | 263 | dev_priv->savePIPEACONF = I915_READ(PIPEACONF); |
261 | dev_priv->savePIPEASRC = I915_READ(PIPEASRC); | 264 | dev_priv->savePIPEASRC = I915_READ(PIPEASRC); |
@@ -349,6 +352,7 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state) | |||
349 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); | 352 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); |
350 | 353 | ||
351 | /* Clock gating state */ | 354 | /* Clock gating state */ |
355 | dev_priv->saveD_STATE = I915_READ(D_STATE); | ||
352 | dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D); | 356 | dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D); |
353 | 357 | ||
354 | /* Cache mode state */ | 358 | /* Cache mode state */ |
@@ -388,6 +392,8 @@ static int i915_resume(struct drm_device *dev) | |||
388 | 392 | ||
389 | pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB); | 393 | pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB); |
390 | 394 | ||
395 | I915_WRITE(DSPARB, dev_priv->saveDSPARB); | ||
396 | |||
391 | /* Pipe & plane A info */ | 397 | /* Pipe & plane A info */ |
392 | /* Prime the clock */ | 398 | /* Prime the clock */ |
393 | if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) { | 399 | if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) { |
@@ -507,6 +513,7 @@ static int i915_resume(struct drm_device *dev) | |||
507 | udelay(150); | 513 | udelay(150); |
508 | 514 | ||
509 | /* Clock gating state */ | 515 | /* Clock gating state */ |
516 | I915_WRITE (D_STATE, dev_priv->saveD_STATE); | ||
510 | I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D); | 517 | I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D); |
511 | 518 | ||
512 | /* Cache mode state */ | 519 | /* Cache mode state */ |
@@ -533,7 +540,8 @@ static struct drm_driver driver = { | |||
533 | */ | 540 | */ |
534 | .driver_features = | 541 | .driver_features = |
535 | DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ | 542 | DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/ |
536 | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, | 543 | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL | |
544 | DRIVER_IRQ_VBL2, | ||
537 | .load = i915_driver_load, | 545 | .load = i915_driver_load, |
538 | .unload = i915_driver_unload, | 546 | .unload = i915_driver_unload, |
539 | .lastclose = i915_driver_lastclose, | 547 | .lastclose = i915_driver_lastclose, |
@@ -541,9 +549,8 @@ static struct drm_driver driver = { | |||
541 | .suspend = i915_suspend, | 549 | .suspend = i915_suspend, |
542 | .resume = i915_resume, | 550 | .resume = i915_resume, |
543 | .device_is_agp = i915_driver_device_is_agp, | 551 | .device_is_agp = i915_driver_device_is_agp, |
544 | .get_vblank_counter = i915_get_vblank_counter, | 552 | .vblank_wait = i915_driver_vblank_wait, |
545 | .enable_vblank = i915_enable_vblank, | 553 | .vblank_wait2 = i915_driver_vblank_wait2, |
546 | .disable_vblank = i915_disable_vblank, | ||
547 | .irq_preinstall = i915_driver_irq_preinstall, | 554 | .irq_preinstall = i915_driver_irq_preinstall, |
548 | .irq_postinstall = i915_driver_irq_postinstall, | 555 | .irq_postinstall = i915_driver_irq_postinstall, |
549 | .irq_uninstall = i915_driver_irq_uninstall, | 556 | .irq_uninstall = i915_driver_irq_uninstall, |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index db7001f22561..1b20f7c0639c 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -76,9 +76,8 @@ struct mem_block { | |||
76 | typedef struct _drm_i915_vbl_swap { | 76 | typedef struct _drm_i915_vbl_swap { |
77 | struct list_head head; | 77 | struct list_head head; |
78 | drm_drawable_t drw_id; | 78 | drm_drawable_t drw_id; |
79 | unsigned int plane; | 79 | unsigned int pipe; |
80 | unsigned int sequence; | 80 | unsigned int sequence; |
81 | int flip; | ||
82 | } drm_i915_vbl_swap_t; | 81 | } drm_i915_vbl_swap_t; |
83 | 82 | ||
84 | typedef struct drm_i915_private { | 83 | typedef struct drm_i915_private { |
@@ -91,7 +90,7 @@ typedef struct drm_i915_private { | |||
91 | drm_dma_handle_t *status_page_dmah; | 90 | drm_dma_handle_t *status_page_dmah; |
92 | void *hw_status_page; | 91 | void *hw_status_page; |
93 | dma_addr_t dma_status_page; | 92 | dma_addr_t dma_status_page; |
94 | uint32_t counter; | 93 | unsigned long counter; |
95 | unsigned int status_gfx_addr; | 94 | unsigned int status_gfx_addr; |
96 | drm_local_map_t hws_map; | 95 | drm_local_map_t hws_map; |
97 | 96 | ||
@@ -104,18 +103,13 @@ typedef struct drm_i915_private { | |||
104 | 103 | ||
105 | wait_queue_head_t irq_queue; | 104 | wait_queue_head_t irq_queue; |
106 | atomic_t irq_received; | 105 | atomic_t irq_received; |
107 | atomic_t irq_emited; | 106 | atomic_t irq_emitted; |
108 | 107 | ||
109 | int tex_lru_log_granularity; | 108 | int tex_lru_log_granularity; |
110 | int allow_batchbuffer; | 109 | int allow_batchbuffer; |
111 | struct mem_block *agp_heap; | 110 | struct mem_block *agp_heap; |
112 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; | 111 | unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; |
113 | int vblank_pipe; | 112 | int vblank_pipe; |
114 | spinlock_t user_irq_lock; | ||
115 | int user_irq_refcount; | ||
116 | int fence_irq_on; | ||
117 | uint32_t irq_enable_reg; | ||
118 | int irq_enabled; | ||
119 | 113 | ||
120 | spinlock_t swaps_lock; | 114 | spinlock_t swaps_lock; |
121 | drm_i915_vbl_swap_t vbl_swaps; | 115 | drm_i915_vbl_swap_t vbl_swaps; |
@@ -125,6 +119,7 @@ typedef struct drm_i915_private { | |||
125 | u8 saveLBB; | 119 | u8 saveLBB; |
126 | u32 saveDSPACNTR; | 120 | u32 saveDSPACNTR; |
127 | u32 saveDSPBCNTR; | 121 | u32 saveDSPBCNTR; |
122 | u32 saveDSPARB; | ||
128 | u32 savePIPEACONF; | 123 | u32 savePIPEACONF; |
129 | u32 savePIPEBCONF; | 124 | u32 savePIPEBCONF; |
130 | u32 savePIPEASRC; | 125 | u32 savePIPEASRC; |
@@ -194,6 +189,7 @@ typedef struct drm_i915_private { | |||
194 | u32 saveIIR; | 189 | u32 saveIIR; |
195 | u32 saveIMR; | 190 | u32 saveIMR; |
196 | u32 saveCACHE_MODE_0; | 191 | u32 saveCACHE_MODE_0; |
192 | u32 saveD_STATE; | ||
197 | u32 saveDSPCLK_GATE_D; | 193 | u32 saveDSPCLK_GATE_D; |
198 | u32 saveMI_ARB_STATE; | 194 | u32 saveMI_ARB_STATE; |
199 | u32 saveSWF0[16]; | 195 | u32 saveSWF0[16]; |
@@ -203,10 +199,10 @@ typedef struct drm_i915_private { | |||
203 | u8 saveSR[8]; | 199 | u8 saveSR[8]; |
204 | u8 saveGR[25]; | 200 | u8 saveGR[25]; |
205 | u8 saveAR_INDEX; | 201 | u8 saveAR_INDEX; |
206 | u8 saveAR[20]; | 202 | u8 saveAR[21]; |
207 | u8 saveDACMASK; | 203 | u8 saveDACMASK; |
208 | u8 saveDACDATA[256*3]; /* 256 3-byte colors */ | 204 | u8 saveDACDATA[256*3]; /* 256 3-byte colors */ |
209 | u8 saveCR[36]; | 205 | u8 saveCR[37]; |
210 | } drm_i915_private_t; | 206 | } drm_i915_private_t; |
211 | 207 | ||
212 | extern struct drm_ioctl_desc i915_ioctls[]; | 208 | extern struct drm_ioctl_desc i915_ioctls[]; |
@@ -222,7 +218,7 @@ extern void i915_driver_preclose(struct drm_device *dev, | |||
222 | extern int i915_driver_device_is_agp(struct drm_device * dev); | 218 | extern int i915_driver_device_is_agp(struct drm_device * dev); |
223 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, | 219 | extern long i915_compat_ioctl(struct file *filp, unsigned int cmd, |
224 | unsigned long arg); | 220 | unsigned long arg); |
225 | extern void i915_dispatch_flip(struct drm_device * dev, int pipes, int sync); | 221 | |
226 | /* i915_irq.c */ | 222 | /* i915_irq.c */ |
227 | extern int i915_irq_emit(struct drm_device *dev, void *data, | 223 | extern int i915_irq_emit(struct drm_device *dev, void *data, |
228 | struct drm_file *file_priv); | 224 | struct drm_file *file_priv); |
@@ -233,7 +229,7 @@ extern int i915_driver_vblank_wait(struct drm_device *dev, unsigned int *sequenc | |||
233 | extern int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence); | 229 | extern int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence); |
234 | extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); | 230 | extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); |
235 | extern void i915_driver_irq_preinstall(struct drm_device * dev); | 231 | extern void i915_driver_irq_preinstall(struct drm_device * dev); |
236 | extern int i915_driver_irq_postinstall(struct drm_device * dev); | 232 | extern void i915_driver_irq_postinstall(struct drm_device * dev); |
237 | extern void i915_driver_irq_uninstall(struct drm_device * dev); | 233 | extern void i915_driver_irq_uninstall(struct drm_device * dev); |
238 | extern int i915_vblank_pipe_set(struct drm_device *dev, void *data, | 234 | extern int i915_vblank_pipe_set(struct drm_device *dev, void *data, |
239 | struct drm_file *file_priv); | 235 | struct drm_file *file_priv); |
@@ -241,9 +237,6 @@ extern int i915_vblank_pipe_get(struct drm_device *dev, void *data, | |||
241 | struct drm_file *file_priv); | 237 | struct drm_file *file_priv); |
242 | extern int i915_vblank_swap(struct drm_device *dev, void *data, | 238 | extern int i915_vblank_swap(struct drm_device *dev, void *data, |
243 | struct drm_file *file_priv); | 239 | struct drm_file *file_priv); |
244 | extern int i915_enable_vblank(struct drm_device *dev, int crtc); | ||
245 | extern void i915_disable_vblank(struct drm_device *dev, int crtc); | ||
246 | extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc); | ||
247 | 240 | ||
248 | /* i915_mem.c */ | 241 | /* i915_mem.c */ |
249 | extern int i915_mem_alloc(struct drm_device *dev, void *data, | 242 | extern int i915_mem_alloc(struct drm_device *dev, void *data, |
@@ -388,91 +381,21 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
388 | 381 | ||
389 | /* Interrupt bits: | 382 | /* Interrupt bits: |
390 | */ | 383 | */ |
391 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) | 384 | #define USER_INT_FLAG (1<<1) |
392 | #define I915_DISPLAY_PORT_INTERRUPT (1<<17) | 385 | #define VSYNC_PIPEB_FLAG (1<<5) |
393 | #define I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT (1<<15) | 386 | #define VSYNC_PIPEA_FLAG (1<<7) |
394 | #define I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT (1<<14) | 387 | #define HWB_OOM_FLAG (1<<13) /* binner out of memory */ |
395 | #define I915_HWB_OOM_INTERRUPT (1<<13) /* binner out of memory */ | ||
396 | #define I915_SYNC_STATUS_INTERRUPT (1<<12) | ||
397 | #define I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT (1<<11) | ||
398 | #define I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT (1<<10) | ||
399 | #define I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT (1<<9) | ||
400 | #define I915_DISPLAY_PLANE_C_FLIP_PENDING_INTERRUPT (1<<8) | ||
401 | #define I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT (1<<7) | ||
402 | #define I915_DISPLAY_PIPE_A_EVENT_INTERRUPT (1<<6) | ||
403 | #define I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT (1<<5) | ||
404 | #define I915_DISPLAY_PIPE_B_EVENT_INTERRUPT (1<<4) | ||
405 | #define I915_DEBUG_INTERRUPT (1<<2) | ||
406 | #define I915_USER_INTERRUPT (1<<1) | ||
407 | |||
408 | 388 | ||
409 | #define I915REG_HWSTAM 0x02098 | 389 | #define I915REG_HWSTAM 0x02098 |
410 | #define I915REG_INT_IDENTITY_R 0x020a4 | 390 | #define I915REG_INT_IDENTITY_R 0x020a4 |
411 | #define I915REG_INT_MASK_R 0x020a8 | 391 | #define I915REG_INT_MASK_R 0x020a8 |
412 | #define I915REG_INT_ENABLE_R 0x020a0 | 392 | #define I915REG_INT_ENABLE_R 0x020a0 |
413 | #define I915REG_INSTPM 0x020c0 | ||
414 | |||
415 | #define PIPEADSL 0x70000 | ||
416 | #define PIPEBDSL 0x71000 | ||
417 | 393 | ||
418 | #define I915REG_PIPEASTAT 0x70024 | 394 | #define I915REG_PIPEASTAT 0x70024 |
419 | #define I915REG_PIPEBSTAT 0x71024 | 395 | #define I915REG_PIPEBSTAT 0x71024 |
420 | /* | ||
421 | * The two pipe frame counter registers are not synchronized, so | ||
422 | * reading a stable value is somewhat tricky. The following code | ||
423 | * should work: | ||
424 | * | ||
425 | * do { | ||
426 | * high1 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> | ||
427 | * PIPE_FRAME_HIGH_SHIFT; | ||
428 | * low1 = ((INREG(PIPEAFRAMEPIXEL) & PIPE_FRAME_LOW_MASK) >> | ||
429 | * PIPE_FRAME_LOW_SHIFT); | ||
430 | * high2 = ((INREG(PIPEAFRAMEHIGH) & PIPE_FRAME_HIGH_MASK) >> | ||
431 | * PIPE_FRAME_HIGH_SHIFT); | ||
432 | * } while (high1 != high2); | ||
433 | * frame = (high1 << 8) | low1; | ||
434 | */ | ||
435 | #define PIPEAFRAMEHIGH 0x70040 | ||
436 | #define PIPEBFRAMEHIGH 0x71040 | ||
437 | #define PIPE_FRAME_HIGH_MASK 0x0000ffff | ||
438 | #define PIPE_FRAME_HIGH_SHIFT 0 | ||
439 | #define PIPEAFRAMEPIXEL 0x70044 | ||
440 | #define PIPEBFRAMEPIXEL 0x71044 | ||
441 | 396 | ||
442 | #define PIPE_FRAME_LOW_MASK 0xff000000 | 397 | #define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17) |
443 | #define PIPE_FRAME_LOW_SHIFT 24 | 398 | #define I915_VBLANK_CLEAR (1UL<<1) |
444 | /* | ||
445 | * Pixel within the current frame is counted in the PIPEAFRAMEPIXEL register | ||
446 | * and is 24 bits wide. | ||
447 | */ | ||
448 | #define PIPE_PIXEL_MASK 0x00ffffff | ||
449 | #define PIPE_PIXEL_SHIFT 0 | ||
450 | |||
451 | #define I915_FIFO_UNDERRUN_STATUS (1UL<<31) | ||
452 | #define I915_CRC_ERROR_ENABLE (1UL<<29) | ||
453 | #define I915_CRC_DONE_ENABLE (1UL<<28) | ||
454 | #define I915_GMBUS_EVENT_ENABLE (1UL<<27) | ||
455 | #define I915_VSYNC_INTERRUPT_ENABLE (1UL<<25) | ||
456 | #define I915_DISPLAY_LINE_COMPARE_ENABLE (1UL<<24) | ||
457 | #define I915_DPST_EVENT_ENABLE (1UL<<23) | ||
458 | #define I915_LEGACY_BLC_EVENT_ENABLE (1UL<<22) | ||
459 | #define I915_ODD_FIELD_INTERRUPT_ENABLE (1UL<<21) | ||
460 | #define I915_EVEN_FIELD_INTERRUPT_ENABLE (1UL<<20) | ||
461 | #define I915_START_VBLANK_INTERRUPT_ENABLE (1UL<<18) /* 965 or later */ | ||
462 | #define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17) | ||
463 | #define I915_OVERLAY_UPDATED_ENABLE (1UL<<16) | ||
464 | #define I915_CRC_ERROR_INTERRUPT_STATUS (1UL<<13) | ||
465 | #define I915_CRC_DONE_INTERRUPT_STATUS (1UL<<12) | ||
466 | #define I915_GMBUS_INTERRUPT_STATUS (1UL<<11) | ||
467 | #define I915_VSYNC_INTERRUPT_STATUS (1UL<<9) | ||
468 | #define I915_DISPLAY_LINE_COMPARE_STATUS (1UL<<8) | ||
469 | #define I915_DPST_EVENT_STATUS (1UL<<7) | ||
470 | #define I915_LEGACY_BLC_EVENT_STATUS (1UL<<6) | ||
471 | #define I915_ODD_FIELD_INTERRUPT_STATUS (1UL<<5) | ||
472 | #define I915_EVEN_FIELD_INTERRUPT_STATUS (1UL<<4) | ||
473 | #define I915_START_VBLANK_INTERRUPT_STATUS (1UL<<2) /* 965 or later */ | ||
474 | #define I915_VBLANK_INTERRUPT_STATUS (1UL<<1) | ||
475 | #define I915_OVERLAY_UPDATED_STATUS (1UL<<0) | ||
476 | 399 | ||
477 | #define SRX_INDEX 0x3c4 | 400 | #define SRX_INDEX 0x3c4 |
478 | #define SRX_DATA 0x3c5 | 401 | #define SRX_DATA 0x3c5 |
@@ -749,6 +672,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
749 | /** P1 value is 2 greater than this field */ | 672 | /** P1 value is 2 greater than this field */ |
750 | # define VGA0_PD_P1_MASK (0x1f << 0) | 673 | # define VGA0_PD_P1_MASK (0x1f << 0) |
751 | 674 | ||
675 | /* PCI D state control register */ | ||
676 | #define D_STATE 0x6104 | ||
752 | #define DSPCLK_GATE_D 0x6200 | 677 | #define DSPCLK_GATE_D 0x6200 |
753 | 678 | ||
754 | /* I830 CRTC registers */ | 679 | /* I830 CRTC registers */ |
@@ -1059,6 +984,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1059 | #define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21) | 984 | #define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21) |
1060 | #define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21) | 985 | #define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21) |
1061 | 986 | ||
987 | #define DSPARB 0x70030 | ||
988 | #define DSPARB_CSTART_MASK (0x7f << 7) | ||
989 | #define DSPARB_CSTART_SHIFT 7 | ||
990 | #define DSPARB_BSTART_MASK (0x7f) | ||
991 | #define DSPARB_BSTART_SHIFT 0 | ||
992 | |||
1062 | #define PIPEBCONF 0x71008 | 993 | #define PIPEBCONF 0x71008 |
1063 | #define PIPEBCONF_ENABLE (1<<31) | 994 | #define PIPEBCONF_ENABLE (1<<31) |
1064 | #define PIPEBCONF_DISABLE 0 | 995 | #define PIPEBCONF_DISABLE 0 |
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c index 023ce66ef3ab..f7f16e7a8bf3 100644 --- a/drivers/char/drm/i915_irq.c +++ b/drivers/char/drm/i915_irq.c | |||
@@ -38,109 +38,6 @@ | |||
38 | #define MAX_NOPID ((u32)~0) | 38 | #define MAX_NOPID ((u32)~0) |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * i915_get_pipe - return the the pipe associated with a given plane | ||
42 | * @dev: DRM device | ||
43 | * @plane: plane to look for | ||
44 | * | ||
45 | * The Intel Mesa & 2D drivers call the vblank routines with a plane number | ||
46 | * rather than a pipe number, since they may not always be equal. This routine | ||
47 | * maps the given @plane back to a pipe number. | ||
48 | */ | ||
49 | static int | ||
50 | i915_get_pipe(struct drm_device *dev, int plane) | ||
51 | { | ||
52 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
53 | u32 dspcntr; | ||
54 | |||
55 | dspcntr = plane ? I915_READ(DSPBCNTR) : I915_READ(DSPACNTR); | ||
56 | |||
57 | return dspcntr & DISPPLANE_SEL_PIPE_MASK ? 1 : 0; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * i915_get_plane - return the the plane associated with a given pipe | ||
62 | * @dev: DRM device | ||
63 | * @pipe: pipe to look for | ||
64 | * | ||
65 | * The Intel Mesa & 2D drivers call the vblank routines with a plane number | ||
66 | * rather than a plane number, since they may not always be equal. This routine | ||
67 | * maps the given @pipe back to a plane number. | ||
68 | */ | ||
69 | static int | ||
70 | i915_get_plane(struct drm_device *dev, int pipe) | ||
71 | { | ||
72 | if (i915_get_pipe(dev, 0) == pipe) | ||
73 | return 0; | ||
74 | return 1; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * i915_pipe_enabled - check if a pipe is enabled | ||
79 | * @dev: DRM device | ||
80 | * @pipe: pipe to check | ||
81 | * | ||
82 | * Reading certain registers when the pipe is disabled can hang the chip. | ||
83 | * Use this routine to make sure the PLL is running and the pipe is active | ||
84 | * before reading such registers if unsure. | ||
85 | */ | ||
86 | static int | ||
87 | i915_pipe_enabled(struct drm_device *dev, int pipe) | ||
88 | { | ||
89 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
90 | unsigned long pipeconf = pipe ? PIPEBCONF : PIPEACONF; | ||
91 | |||
92 | if (I915_READ(pipeconf) & PIPEACONF_ENABLE) | ||
93 | return 1; | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * Emit a synchronous flip. | ||
100 | * | ||
101 | * This function must be called with the drawable spinlock held. | ||
102 | */ | ||
103 | static void | ||
104 | i915_dispatch_vsync_flip(struct drm_device *dev, struct drm_drawable_info *drw, | ||
105 | int plane) | ||
106 | { | ||
107 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
108 | drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv; | ||
109 | u16 x1, y1, x2, y2; | ||
110 | int pf_planes = 1 << plane; | ||
111 | |||
112 | /* If the window is visible on the other plane, we have to flip on that | ||
113 | * plane as well. | ||
114 | */ | ||
115 | if (plane == 1) { | ||
116 | x1 = sarea_priv->planeA_x; | ||
117 | y1 = sarea_priv->planeA_y; | ||
118 | x2 = x1 + sarea_priv->planeA_w; | ||
119 | y2 = y1 + sarea_priv->planeA_h; | ||
120 | } else { | ||
121 | x1 = sarea_priv->planeB_x; | ||
122 | y1 = sarea_priv->planeB_y; | ||
123 | x2 = x1 + sarea_priv->planeB_w; | ||
124 | y2 = y1 + sarea_priv->planeB_h; | ||
125 | } | ||
126 | |||
127 | if (x2 > 0 && y2 > 0) { | ||
128 | int i, num_rects = drw->num_rects; | ||
129 | struct drm_clip_rect *rect = drw->rects; | ||
130 | |||
131 | for (i = 0; i < num_rects; i++) | ||
132 | if (!(rect[i].x1 >= x2 || rect[i].y1 >= y2 || | ||
133 | rect[i].x2 <= x1 || rect[i].y2 <= y1)) { | ||
134 | pf_planes = 0x3; | ||
135 | |||
136 | break; | ||
137 | } | ||
138 | } | ||
139 | |||
140 | i915_dispatch_flip(dev, pf_planes, 1); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * Emit blits for scheduled buffer swaps. | 41 | * Emit blits for scheduled buffer swaps. |
145 | * | 42 | * |
146 | * This function will be called with the HW lock held. | 43 | * This function will be called with the HW lock held. |
@@ -148,19 +45,20 @@ i915_dispatch_vsync_flip(struct drm_device *dev, struct drm_drawable_info *drw, | |||
148 | static void i915_vblank_tasklet(struct drm_device *dev) | 45 | static void i915_vblank_tasklet(struct drm_device *dev) |
149 | { | 46 | { |
150 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 47 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
48 | unsigned long irqflags; | ||
151 | struct list_head *list, *tmp, hits, *hit; | 49 | struct list_head *list, *tmp, hits, *hit; |
152 | int nhits, nrects, slice[2], upper[2], lower[2], i, num_pages; | 50 | int nhits, nrects, slice[2], upper[2], lower[2], i; |
153 | unsigned counter[2]; | 51 | unsigned counter[2] = { atomic_read(&dev->vbl_received), |
52 | atomic_read(&dev->vbl_received2) }; | ||
154 | struct drm_drawable_info *drw; | 53 | struct drm_drawable_info *drw; |
155 | drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv; | 54 | drm_i915_sarea_t *sarea_priv = dev_priv->sarea_priv; |
156 | u32 cpp = dev_priv->cpp, offsets[3]; | 55 | u32 cpp = dev_priv->cpp; |
157 | u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD | | 56 | u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD | |
158 | XY_SRC_COPY_BLT_WRITE_ALPHA | | 57 | XY_SRC_COPY_BLT_WRITE_ALPHA | |
159 | XY_SRC_COPY_BLT_WRITE_RGB) | 58 | XY_SRC_COPY_BLT_WRITE_RGB) |
160 | : XY_SRC_COPY_BLT_CMD; | 59 | : XY_SRC_COPY_BLT_CMD; |
161 | u32 src_pitch = sarea_priv->pitch * cpp; | 60 | u32 src_pitch = sarea_priv->pitch * cpp; |
162 | u32 dst_pitch = sarea_priv->pitch * cpp; | 61 | u32 dst_pitch = sarea_priv->pitch * cpp; |
163 | /* COPY rop (0xcc), map cpp to magic color depth constants */ | ||
164 | u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24); | 62 | u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24); |
165 | RING_LOCALS; | 63 | RING_LOCALS; |
166 | 64 | ||
@@ -173,34 +71,24 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
173 | src_pitch >>= 2; | 71 | src_pitch >>= 2; |
174 | } | 72 | } |
175 | 73 | ||
176 | counter[0] = drm_vblank_count(dev, 0); | ||
177 | counter[1] = drm_vblank_count(dev, 1); | ||
178 | |||
179 | DRM_DEBUG("\n"); | 74 | DRM_DEBUG("\n"); |
180 | 75 | ||
181 | INIT_LIST_HEAD(&hits); | 76 | INIT_LIST_HEAD(&hits); |
182 | 77 | ||
183 | nhits = nrects = 0; | 78 | nhits = nrects = 0; |
184 | 79 | ||
185 | /* No irqsave/restore necessary. This tasklet may be run in an | 80 | spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); |
186 | * interrupt context or normal context, but we don't have to worry | ||
187 | * about getting interrupted by something acquiring the lock, because | ||
188 | * we are the interrupt context thing that acquires the lock. | ||
189 | */ | ||
190 | spin_lock(&dev_priv->swaps_lock); | ||
191 | 81 | ||
192 | /* Find buffer swaps scheduled for this vertical blank */ | 82 | /* Find buffer swaps scheduled for this vertical blank */ |
193 | list_for_each_safe(list, tmp, &dev_priv->vbl_swaps.head) { | 83 | list_for_each_safe(list, tmp, &dev_priv->vbl_swaps.head) { |
194 | drm_i915_vbl_swap_t *vbl_swap = | 84 | drm_i915_vbl_swap_t *vbl_swap = |
195 | list_entry(list, drm_i915_vbl_swap_t, head); | 85 | list_entry(list, drm_i915_vbl_swap_t, head); |
196 | int pipe = i915_get_pipe(dev, vbl_swap->plane); | ||
197 | 86 | ||
198 | if ((counter[pipe] - vbl_swap->sequence) > (1<<23)) | 87 | if ((counter[vbl_swap->pipe] - vbl_swap->sequence) > (1<<23)) |
199 | continue; | 88 | continue; |
200 | 89 | ||
201 | list_del(list); | 90 | list_del(list); |
202 | dev_priv->swaps_pending--; | 91 | dev_priv->swaps_pending--; |
203 | drm_vblank_put(dev, pipe); | ||
204 | 92 | ||
205 | spin_unlock(&dev_priv->swaps_lock); | 93 | spin_unlock(&dev_priv->swaps_lock); |
206 | spin_lock(&dev->drw_lock); | 94 | spin_lock(&dev->drw_lock); |
@@ -238,23 +126,43 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
238 | spin_lock(&dev_priv->swaps_lock); | 126 | spin_lock(&dev_priv->swaps_lock); |
239 | } | 127 | } |
240 | 128 | ||
241 | spin_unlock(&dev_priv->swaps_lock); | 129 | if (nhits == 0) { |
242 | 130 | spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); | |
243 | if (nhits == 0) | ||
244 | return; | 131 | return; |
132 | } | ||
133 | |||
134 | spin_unlock(&dev_priv->swaps_lock); | ||
245 | 135 | ||
246 | i915_kernel_lost_context(dev); | 136 | i915_kernel_lost_context(dev); |
247 | 137 | ||
248 | upper[0] = upper[1] = 0; | 138 | if (IS_I965G(dev)) { |
249 | slice[0] = max(sarea_priv->planeA_h / nhits, 1); | 139 | BEGIN_LP_RING(4); |
250 | slice[1] = max(sarea_priv->planeB_h / nhits, 1); | 140 | |
251 | lower[0] = sarea_priv->planeA_y + slice[0]; | 141 | OUT_RING(GFX_OP_DRAWRECT_INFO_I965); |
252 | lower[1] = sarea_priv->planeB_y + slice[0]; | 142 | OUT_RING(0); |
143 | OUT_RING(((sarea_priv->width - 1) & 0xffff) | ((sarea_priv->height - 1) << 16)); | ||
144 | OUT_RING(0); | ||
145 | ADVANCE_LP_RING(); | ||
146 | } else { | ||
147 | BEGIN_LP_RING(6); | ||
253 | 148 | ||
254 | offsets[0] = sarea_priv->front_offset; | 149 | OUT_RING(GFX_OP_DRAWRECT_INFO); |
255 | offsets[1] = sarea_priv->back_offset; | 150 | OUT_RING(0); |
256 | offsets[2] = sarea_priv->third_offset; | 151 | OUT_RING(0); |
257 | num_pages = sarea_priv->third_handle ? 3 : 2; | 152 | OUT_RING(sarea_priv->width | sarea_priv->height << 16); |
153 | OUT_RING(sarea_priv->width | sarea_priv->height << 16); | ||
154 | OUT_RING(0); | ||
155 | |||
156 | ADVANCE_LP_RING(); | ||
157 | } | ||
158 | |||
159 | sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT; | ||
160 | |||
161 | upper[0] = upper[1] = 0; | ||
162 | slice[0] = max(sarea_priv->pipeA_h / nhits, 1); | ||
163 | slice[1] = max(sarea_priv->pipeB_h / nhits, 1); | ||
164 | lower[0] = sarea_priv->pipeA_y + slice[0]; | ||
165 | lower[1] = sarea_priv->pipeB_y + slice[0]; | ||
258 | 166 | ||
259 | spin_lock(&dev->drw_lock); | 167 | spin_lock(&dev->drw_lock); |
260 | 168 | ||
@@ -266,8 +174,6 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
266 | for (i = 0; i++ < nhits; | 174 | for (i = 0; i++ < nhits; |
267 | upper[0] = lower[0], lower[0] += slice[0], | 175 | upper[0] = lower[0], lower[0] += slice[0], |
268 | upper[1] = lower[1], lower[1] += slice[1]) { | 176 | upper[1] = lower[1], lower[1] += slice[1]) { |
269 | int init_drawrect = 1; | ||
270 | |||
271 | if (i == nhits) | 177 | if (i == nhits) |
272 | lower[0] = lower[1] = sarea_priv->height; | 178 | lower[0] = lower[1] = sarea_priv->height; |
273 | 179 | ||
@@ -275,7 +181,7 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
275 | drm_i915_vbl_swap_t *swap_hit = | 181 | drm_i915_vbl_swap_t *swap_hit = |
276 | list_entry(hit, drm_i915_vbl_swap_t, head); | 182 | list_entry(hit, drm_i915_vbl_swap_t, head); |
277 | struct drm_clip_rect *rect; | 183 | struct drm_clip_rect *rect; |
278 | int num_rects, plane, front, back; | 184 | int num_rects, pipe; |
279 | unsigned short top, bottom; | 185 | unsigned short top, bottom; |
280 | 186 | ||
281 | drw = drm_get_drawable_info(dev, swap_hit->drw_id); | 187 | drw = drm_get_drawable_info(dev, swap_hit->drw_id); |
@@ -283,50 +189,10 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
283 | if (!drw) | 189 | if (!drw) |
284 | continue; | 190 | continue; |
285 | 191 | ||
286 | plane = swap_hit->plane; | ||
287 | |||
288 | if (swap_hit->flip) { | ||
289 | i915_dispatch_vsync_flip(dev, drw, plane); | ||
290 | continue; | ||
291 | } | ||
292 | |||
293 | if (init_drawrect) { | ||
294 | int width = sarea_priv->width; | ||
295 | int height = sarea_priv->height; | ||
296 | if (IS_I965G(dev)) { | ||
297 | BEGIN_LP_RING(4); | ||
298 | |||
299 | OUT_RING(GFX_OP_DRAWRECT_INFO_I965); | ||
300 | OUT_RING(0); | ||
301 | OUT_RING(((width - 1) & 0xffff) | ((height - 1) << 16)); | ||
302 | OUT_RING(0); | ||
303 | |||
304 | ADVANCE_LP_RING(); | ||
305 | } else { | ||
306 | BEGIN_LP_RING(6); | ||
307 | |||
308 | OUT_RING(GFX_OP_DRAWRECT_INFO); | ||
309 | OUT_RING(0); | ||
310 | OUT_RING(0); | ||
311 | OUT_RING(((width - 1) & 0xffff) | ((height - 1) << 16)); | ||
312 | OUT_RING(0); | ||
313 | OUT_RING(0); | ||
314 | |||
315 | ADVANCE_LP_RING(); | ||
316 | } | ||
317 | |||
318 | sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT; | ||
319 | |||
320 | init_drawrect = 0; | ||
321 | } | ||
322 | |||
323 | rect = drw->rects; | 192 | rect = drw->rects; |
324 | top = upper[plane]; | 193 | pipe = swap_hit->pipe; |
325 | bottom = lower[plane]; | 194 | top = upper[pipe]; |
326 | 195 | bottom = lower[pipe]; | |
327 | front = (dev_priv->sarea_priv->pf_current_page >> | ||
328 | (2 * plane)) & 0x3; | ||
329 | back = (front + 1) % num_pages; | ||
330 | 196 | ||
331 | for (num_rects = drw->num_rects; num_rects--; rect++) { | 197 | for (num_rects = drw->num_rects; num_rects--; rect++) { |
332 | int y1 = max(rect->y1, top); | 198 | int y1 = max(rect->y1, top); |
@@ -341,17 +207,17 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
341 | OUT_RING(ropcpp | dst_pitch); | 207 | OUT_RING(ropcpp | dst_pitch); |
342 | OUT_RING((y1 << 16) | rect->x1); | 208 | OUT_RING((y1 << 16) | rect->x1); |
343 | OUT_RING((y2 << 16) | rect->x2); | 209 | OUT_RING((y2 << 16) | rect->x2); |
344 | OUT_RING(offsets[front]); | 210 | OUT_RING(sarea_priv->front_offset); |
345 | OUT_RING((y1 << 16) | rect->x1); | 211 | OUT_RING((y1 << 16) | rect->x1); |
346 | OUT_RING(src_pitch); | 212 | OUT_RING(src_pitch); |
347 | OUT_RING(offsets[back]); | 213 | OUT_RING(sarea_priv->back_offset); |
348 | 214 | ||
349 | ADVANCE_LP_RING(); | 215 | ADVANCE_LP_RING(); |
350 | } | 216 | } |
351 | } | 217 | } |
352 | } | 218 | } |
353 | 219 | ||
354 | spin_unlock(&dev->drw_lock); | 220 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); |
355 | 221 | ||
356 | list_for_each_safe(hit, tmp, &hits) { | 222 | list_for_each_safe(hit, tmp, &hits) { |
357 | drm_i915_vbl_swap_t *swap_hit = | 223 | drm_i915_vbl_swap_t *swap_hit = |
@@ -363,112 +229,67 @@ static void i915_vblank_tasklet(struct drm_device *dev) | |||
363 | } | 229 | } |
364 | } | 230 | } |
365 | 231 | ||
366 | u32 i915_get_vblank_counter(struct drm_device *dev, int plane) | ||
367 | { | ||
368 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
369 | unsigned long high_frame; | ||
370 | unsigned long low_frame; | ||
371 | u32 high1, high2, low, count; | ||
372 | int pipe; | ||
373 | |||
374 | pipe = i915_get_pipe(dev, plane); | ||
375 | high_frame = pipe ? PIPEBFRAMEHIGH : PIPEAFRAMEHIGH; | ||
376 | low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL; | ||
377 | |||
378 | if (!i915_pipe_enabled(dev, pipe)) { | ||
379 | printk(KERN_ERR "trying to get vblank count for disabled " | ||
380 | "pipe %d\n", pipe); | ||
381 | return 0; | ||
382 | } | ||
383 | |||
384 | /* | ||
385 | * High & low register fields aren't synchronized, so make sure | ||
386 | * we get a low value that's stable across two reads of the high | ||
387 | * register. | ||
388 | */ | ||
389 | do { | ||
390 | high1 = ((I915_READ(high_frame) & PIPE_FRAME_HIGH_MASK) >> | ||
391 | PIPE_FRAME_HIGH_SHIFT); | ||
392 | low = ((I915_READ(low_frame) & PIPE_FRAME_LOW_MASK) >> | ||
393 | PIPE_FRAME_LOW_SHIFT); | ||
394 | high2 = ((I915_READ(high_frame) & PIPE_FRAME_HIGH_MASK) >> | ||
395 | PIPE_FRAME_HIGH_SHIFT); | ||
396 | } while (high1 != high2); | ||
397 | |||
398 | count = (high1 << 8) | low; | ||
399 | |||
400 | /* count may be reset by other driver(e.g. 2D driver), | ||
401 | we have no way to know if it is wrapped or resetted | ||
402 | when count is zero. do a rough guess. | ||
403 | */ | ||
404 | if (count == 0 && dev->last_vblank[pipe] < dev->max_vblank_count/2) | ||
405 | dev->last_vblank[pipe] = 0; | ||
406 | |||
407 | return count; | ||
408 | } | ||
409 | |||
410 | irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) | 232 | irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) |
411 | { | 233 | { |
412 | struct drm_device *dev = (struct drm_device *) arg; | 234 | struct drm_device *dev = (struct drm_device *) arg; |
413 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 235 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
414 | u32 iir; | 236 | u16 temp; |
415 | u32 pipea_stats, pipeb_stats; | 237 | u32 pipea_stats, pipeb_stats; |
416 | int vblank = 0; | ||
417 | |||
418 | iir = I915_READ(I915REG_INT_IDENTITY_R); | ||
419 | if (iir == 0) { | ||
420 | DRM_DEBUG ("iir 0x%08x im 0x%08x ie 0x%08x pipea 0x%08x pipeb 0x%08x\n", | ||
421 | iir, | ||
422 | I915_READ(I915REG_INT_MASK_R), | ||
423 | I915_READ(I915REG_INT_ENABLE_R), | ||
424 | I915_READ(I915REG_PIPEASTAT), | ||
425 | I915_READ(I915REG_PIPEBSTAT)); | ||
426 | return IRQ_NONE; | ||
427 | } | ||
428 | 238 | ||
429 | /* | 239 | pipea_stats = I915_READ(I915REG_PIPEASTAT); |
430 | * Clear the PIPE(A|B)STAT regs before the IIR otherwise | 240 | pipeb_stats = I915_READ(I915REG_PIPEBSTAT); |
431 | * we may get extra interrupts. | ||
432 | */ | ||
433 | if (iir & I915_DISPLAY_PIPE_A_EVENT_INTERRUPT) { | ||
434 | pipea_stats = I915_READ(I915REG_PIPEASTAT); | ||
435 | if (pipea_stats & (I915_START_VBLANK_INTERRUPT_STATUS| | ||
436 | I915_VBLANK_INTERRUPT_STATUS)) | ||
437 | { | ||
438 | vblank++; | ||
439 | drm_handle_vblank(dev, i915_get_plane(dev, 0)); | ||
440 | } | ||
441 | I915_WRITE(I915REG_PIPEASTAT, pipea_stats); | ||
442 | } | ||
443 | if (iir & I915_DISPLAY_PIPE_B_EVENT_INTERRUPT) { | ||
444 | pipeb_stats = I915_READ(I915REG_PIPEBSTAT); | ||
445 | if (pipeb_stats & (I915_START_VBLANK_INTERRUPT_STATUS| | ||
446 | I915_VBLANK_INTERRUPT_STATUS)) | ||
447 | { | ||
448 | vblank++; | ||
449 | drm_handle_vblank(dev, i915_get_plane(dev, 1)); | ||
450 | } | ||
451 | I915_WRITE(I915REG_PIPEBSTAT, pipeb_stats); | ||
452 | } | ||
453 | 241 | ||
454 | if (dev_priv->sarea_priv) | 242 | temp = I915_READ16(I915REG_INT_IDENTITY_R); |
455 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | ||
456 | 243 | ||
457 | I915_WRITE(I915REG_INT_IDENTITY_R, iir); | 244 | temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG); |
458 | (void) I915_READ(I915REG_INT_IDENTITY_R); /* Flush posted write */ | ||
459 | 245 | ||
460 | if (iir & I915_USER_INTERRUPT) { | 246 | DRM_DEBUG("%s flag=%08x\n", __FUNCTION__, temp); |
247 | |||
248 | if (temp == 0) | ||
249 | return IRQ_NONE; | ||
250 | |||
251 | I915_WRITE16(I915REG_INT_IDENTITY_R, temp); | ||
252 | (void) I915_READ16(I915REG_INT_IDENTITY_R); | ||
253 | DRM_READMEMORYBARRIER(); | ||
254 | |||
255 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | ||
256 | |||
257 | if (temp & USER_INT_FLAG) | ||
461 | DRM_WAKEUP(&dev_priv->irq_queue); | 258 | DRM_WAKEUP(&dev_priv->irq_queue); |
462 | } | 259 | |
463 | if (vblank) { | 260 | if (temp & (VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG)) { |
261 | int vblank_pipe = dev_priv->vblank_pipe; | ||
262 | |||
263 | if ((vblank_pipe & | ||
264 | (DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B)) | ||
265 | == (DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B)) { | ||
266 | if (temp & VSYNC_PIPEA_FLAG) | ||
267 | atomic_inc(&dev->vbl_received); | ||
268 | if (temp & VSYNC_PIPEB_FLAG) | ||
269 | atomic_inc(&dev->vbl_received2); | ||
270 | } else if (((temp & VSYNC_PIPEA_FLAG) && | ||
271 | (vblank_pipe & DRM_I915_VBLANK_PIPE_A)) || | ||
272 | ((temp & VSYNC_PIPEB_FLAG) && | ||
273 | (vblank_pipe & DRM_I915_VBLANK_PIPE_B))) | ||
274 | atomic_inc(&dev->vbl_received); | ||
275 | |||
276 | DRM_WAKEUP(&dev->vbl_queue); | ||
277 | drm_vbl_send_signals(dev); | ||
278 | |||
464 | if (dev_priv->swaps_pending > 0) | 279 | if (dev_priv->swaps_pending > 0) |
465 | drm_locked_tasklet(dev, i915_vblank_tasklet); | 280 | drm_locked_tasklet(dev, i915_vblank_tasklet); |
281 | I915_WRITE(I915REG_PIPEASTAT, | ||
282 | pipea_stats|I915_VBLANK_INTERRUPT_ENABLE| | ||
283 | I915_VBLANK_CLEAR); | ||
284 | I915_WRITE(I915REG_PIPEBSTAT, | ||
285 | pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE| | ||
286 | I915_VBLANK_CLEAR); | ||
466 | } | 287 | } |
467 | 288 | ||
468 | return IRQ_HANDLED; | 289 | return IRQ_HANDLED; |
469 | } | 290 | } |
470 | 291 | ||
471 | static int i915_emit_irq(struct drm_device *dev) | 292 | static int i915_emit_irq(struct drm_device * dev) |
472 | { | 293 | { |
473 | drm_i915_private_t *dev_priv = dev->dev_private; | 294 | drm_i915_private_t *dev_priv = dev->dev_private; |
474 | RING_LOCALS; | 295 | RING_LOCALS; |
@@ -515,12 +336,42 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr) | |||
515 | READ_BREADCRUMB(dev_priv), (int)dev_priv->counter); | 336 | READ_BREADCRUMB(dev_priv), (int)dev_priv->counter); |
516 | } | 337 | } |
517 | 338 | ||
518 | if (dev_priv->sarea_priv) | 339 | dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); |
519 | dev_priv->sarea_priv->last_dispatch = | ||
520 | READ_BREADCRUMB(dev_priv); | ||
521 | return ret; | 340 | return ret; |
522 | } | 341 | } |
523 | 342 | ||
343 | static int i915_driver_vblank_do_wait(struct drm_device *dev, unsigned int *sequence, | ||
344 | atomic_t *counter) | ||
345 | { | ||
346 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
347 | unsigned int cur_vblank; | ||
348 | int ret = 0; | ||
349 | |||
350 | if (!dev_priv) { | ||
351 | DRM_ERROR("called with no initialization\n"); | ||
352 | return -EINVAL; | ||
353 | } | ||
354 | |||
355 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, | ||
356 | (((cur_vblank = atomic_read(counter)) | ||
357 | - *sequence) <= (1<<23))); | ||
358 | |||
359 | *sequence = cur_vblank; | ||
360 | |||
361 | return ret; | ||
362 | } | ||
363 | |||
364 | |||
365 | int i915_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence) | ||
366 | { | ||
367 | return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received); | ||
368 | } | ||
369 | |||
370 | int i915_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence) | ||
371 | { | ||
372 | return i915_driver_vblank_do_wait(dev, sequence, &dev->vbl_received2); | ||
373 | } | ||
374 | |||
524 | /* Needs the lock as it touches the ring. | 375 | /* Needs the lock as it touches the ring. |
525 | */ | 376 | */ |
526 | int i915_irq_emit(struct drm_device *dev, void *data, | 377 | int i915_irq_emit(struct drm_device *dev, void *data, |
@@ -563,96 +414,18 @@ int i915_irq_wait(struct drm_device *dev, void *data, | |||
563 | return i915_wait_irq(dev, irqwait->irq_seq); | 414 | return i915_wait_irq(dev, irqwait->irq_seq); |
564 | } | 415 | } |
565 | 416 | ||
566 | int i915_enable_vblank(struct drm_device *dev, int plane) | ||
567 | { | ||
568 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
569 | int pipe = i915_get_pipe(dev, plane); | ||
570 | u32 pipestat_reg = 0; | ||
571 | u32 pipestat; | ||
572 | |||
573 | switch (pipe) { | ||
574 | case 0: | ||
575 | pipestat_reg = I915REG_PIPEASTAT; | ||
576 | dev_priv->irq_enable_reg |= I915_DISPLAY_PIPE_A_EVENT_INTERRUPT; | ||
577 | break; | ||
578 | case 1: | ||
579 | pipestat_reg = I915REG_PIPEBSTAT; | ||
580 | dev_priv->irq_enable_reg |= I915_DISPLAY_PIPE_B_EVENT_INTERRUPT; | ||
581 | break; | ||
582 | default: | ||
583 | DRM_ERROR("tried to enable vblank on non-existent pipe %d\n", | ||
584 | pipe); | ||
585 | break; | ||
586 | } | ||
587 | |||
588 | if (pipestat_reg) | ||
589 | { | ||
590 | pipestat = I915_READ (pipestat_reg); | ||
591 | /* | ||
592 | * Older chips didn't have the start vblank interrupt, | ||
593 | * but | ||
594 | */ | ||
595 | if (IS_I965G (dev)) | ||
596 | pipestat |= I915_START_VBLANK_INTERRUPT_ENABLE; | ||
597 | else | ||
598 | pipestat |= I915_VBLANK_INTERRUPT_ENABLE; | ||
599 | /* | ||
600 | * Clear any pending status | ||
601 | */ | ||
602 | pipestat |= (I915_START_VBLANK_INTERRUPT_STATUS | | ||
603 | I915_VBLANK_INTERRUPT_STATUS); | ||
604 | I915_WRITE(pipestat_reg, pipestat); | ||
605 | } | ||
606 | I915_WRITE(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg); | ||
607 | |||
608 | return 0; | ||
609 | } | ||
610 | |||
611 | void i915_disable_vblank(struct drm_device *dev, int plane) | ||
612 | { | ||
613 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | ||
614 | int pipe = i915_get_pipe(dev, plane); | ||
615 | u32 pipestat_reg = 0; | ||
616 | u32 pipestat; | ||
617 | |||
618 | switch (pipe) { | ||
619 | case 0: | ||
620 | pipestat_reg = I915REG_PIPEASTAT; | ||
621 | dev_priv->irq_enable_reg &= ~I915_DISPLAY_PIPE_A_EVENT_INTERRUPT; | ||
622 | break; | ||
623 | case 1: | ||
624 | pipestat_reg = I915REG_PIPEBSTAT; | ||
625 | dev_priv->irq_enable_reg &= ~I915_DISPLAY_PIPE_B_EVENT_INTERRUPT; | ||
626 | break; | ||
627 | default: | ||
628 | DRM_ERROR("tried to disable vblank on non-existent pipe %d\n", | ||
629 | pipe); | ||
630 | break; | ||
631 | } | ||
632 | |||
633 | I915_WRITE(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg); | ||
634 | if (pipestat_reg) | ||
635 | { | ||
636 | pipestat = I915_READ (pipestat_reg); | ||
637 | pipestat &= ~(I915_START_VBLANK_INTERRUPT_ENABLE | | ||
638 | I915_VBLANK_INTERRUPT_ENABLE); | ||
639 | /* | ||
640 | * Clear any pending status | ||
641 | */ | ||
642 | pipestat |= (I915_START_VBLANK_INTERRUPT_STATUS | | ||
643 | I915_VBLANK_INTERRUPT_STATUS); | ||
644 | I915_WRITE(pipestat_reg, pipestat); | ||
645 | } | ||
646 | } | ||
647 | |||
648 | static void i915_enable_interrupt (struct drm_device *dev) | 417 | static void i915_enable_interrupt (struct drm_device *dev) |
649 | { | 418 | { |
650 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 419 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
420 | u16 flag; | ||
651 | 421 | ||
652 | dev_priv->irq_enable_reg |= I915_USER_INTERRUPT; | 422 | flag = 0; |
423 | if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_A) | ||
424 | flag |= VSYNC_PIPEA_FLAG; | ||
425 | if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_B) | ||
426 | flag |= VSYNC_PIPEB_FLAG; | ||
653 | 427 | ||
654 | I915_WRITE(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg); | 428 | I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | flag); |
655 | dev_priv->irq_enabled = 1; | ||
656 | } | 429 | } |
657 | 430 | ||
658 | /* Set the vblank monitor pipe | 431 | /* Set the vblank monitor pipe |
@@ -675,6 +448,8 @@ int i915_vblank_pipe_set(struct drm_device *dev, void *data, | |||
675 | 448 | ||
676 | dev_priv->vblank_pipe = pipe->pipe; | 449 | dev_priv->vblank_pipe = pipe->pipe; |
677 | 450 | ||
451 | i915_enable_interrupt (dev); | ||
452 | |||
678 | return 0; | 453 | return 0; |
679 | } | 454 | } |
680 | 455 | ||
@@ -692,9 +467,9 @@ int i915_vblank_pipe_get(struct drm_device *dev, void *data, | |||
692 | 467 | ||
693 | flag = I915_READ(I915REG_INT_ENABLE_R); | 468 | flag = I915_READ(I915REG_INT_ENABLE_R); |
694 | pipe->pipe = 0; | 469 | pipe->pipe = 0; |
695 | if (flag & I915_DISPLAY_PIPE_A_EVENT_INTERRUPT) | 470 | if (flag & VSYNC_PIPEA_FLAG) |
696 | pipe->pipe |= DRM_I915_VBLANK_PIPE_A; | 471 | pipe->pipe |= DRM_I915_VBLANK_PIPE_A; |
697 | if (flag & I915_DISPLAY_PIPE_B_EVENT_INTERRUPT) | 472 | if (flag & VSYNC_PIPEB_FLAG) |
698 | pipe->pipe |= DRM_I915_VBLANK_PIPE_B; | 473 | pipe->pipe |= DRM_I915_VBLANK_PIPE_B; |
699 | 474 | ||
700 | return 0; | 475 | return 0; |
@@ -709,30 +484,27 @@ int i915_vblank_swap(struct drm_device *dev, void *data, | |||
709 | drm_i915_private_t *dev_priv = dev->dev_private; | 484 | drm_i915_private_t *dev_priv = dev->dev_private; |
710 | drm_i915_vblank_swap_t *swap = data; | 485 | drm_i915_vblank_swap_t *swap = data; |
711 | drm_i915_vbl_swap_t *vbl_swap; | 486 | drm_i915_vbl_swap_t *vbl_swap; |
712 | unsigned int pipe, seqtype, curseq, plane; | 487 | unsigned int pipe, seqtype, curseq; |
713 | unsigned long irqflags; | 488 | unsigned long irqflags; |
714 | struct list_head *list; | 489 | struct list_head *list; |
715 | int ret; | ||
716 | 490 | ||
717 | if (!dev_priv) { | 491 | if (!dev_priv) { |
718 | DRM_ERROR("%s called with no initialization\n", __func__); | 492 | DRM_ERROR("%s called with no initialization\n", __func__); |
719 | return -EINVAL; | 493 | return -EINVAL; |
720 | } | 494 | } |
721 | 495 | ||
722 | if (!dev_priv->sarea_priv || dev_priv->sarea_priv->rotation) { | 496 | if (dev_priv->sarea_priv->rotation) { |
723 | DRM_DEBUG("Rotation not supported\n"); | 497 | DRM_DEBUG("Rotation not supported\n"); |
724 | return -EINVAL; | 498 | return -EINVAL; |
725 | } | 499 | } |
726 | 500 | ||
727 | if (swap->seqtype & ~(_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE | | 501 | if (swap->seqtype & ~(_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE | |
728 | _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS | | 502 | _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)) { |
729 | _DRM_VBLANK_FLIP)) { | ||
730 | DRM_ERROR("Invalid sequence type 0x%x\n", swap->seqtype); | 503 | DRM_ERROR("Invalid sequence type 0x%x\n", swap->seqtype); |
731 | return -EINVAL; | 504 | return -EINVAL; |
732 | } | 505 | } |
733 | 506 | ||
734 | plane = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0; | 507 | pipe = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0; |
735 | pipe = i915_get_pipe(dev, plane); | ||
736 | 508 | ||
737 | seqtype = swap->seqtype & (_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE); | 509 | seqtype = swap->seqtype & (_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE); |
738 | 510 | ||
@@ -743,11 +515,6 @@ int i915_vblank_swap(struct drm_device *dev, void *data, | |||
743 | 515 | ||
744 | spin_lock_irqsave(&dev->drw_lock, irqflags); | 516 | spin_lock_irqsave(&dev->drw_lock, irqflags); |
745 | 517 | ||
746 | /* It makes no sense to schedule a swap for a drawable that doesn't have | ||
747 | * valid information at this point. E.g. this could mean that the X | ||
748 | * server is too old to push drawable information to the DRM, in which | ||
749 | * case all such swaps would become ineffective. | ||
750 | */ | ||
751 | if (!drm_get_drawable_info(dev, swap->drawable)) { | 518 | if (!drm_get_drawable_info(dev, swap->drawable)) { |
752 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); | 519 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); |
753 | DRM_DEBUG("Invalid drawable ID %d\n", swap->drawable); | 520 | DRM_DEBUG("Invalid drawable ID %d\n", swap->drawable); |
@@ -756,8 +523,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data, | |||
756 | 523 | ||
757 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); | 524 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); |
758 | 525 | ||
759 | drm_update_vblank_count(dev, pipe); | 526 | curseq = atomic_read(pipe ? &dev->vbl_received2 : &dev->vbl_received); |
760 | curseq = drm_vblank_count(dev, pipe); | ||
761 | 527 | ||
762 | if (seqtype == _DRM_VBLANK_RELATIVE) | 528 | if (seqtype == _DRM_VBLANK_RELATIVE) |
763 | swap->sequence += curseq; | 529 | swap->sequence += curseq; |
@@ -771,43 +537,14 @@ int i915_vblank_swap(struct drm_device *dev, void *data, | |||
771 | } | 537 | } |
772 | } | 538 | } |
773 | 539 | ||
774 | if (swap->seqtype & _DRM_VBLANK_FLIP) { | ||
775 | swap->sequence--; | ||
776 | |||
777 | if ((curseq - swap->sequence) <= (1<<23)) { | ||
778 | struct drm_drawable_info *drw; | ||
779 | |||
780 | LOCK_TEST_WITH_RETURN(dev, file_priv); | ||
781 | |||
782 | spin_lock_irqsave(&dev->drw_lock, irqflags); | ||
783 | |||
784 | drw = drm_get_drawable_info(dev, swap->drawable); | ||
785 | |||
786 | if (!drw) { | ||
787 | spin_unlock_irqrestore(&dev->drw_lock, | ||
788 | irqflags); | ||
789 | DRM_DEBUG("Invalid drawable ID %d\n", | ||
790 | swap->drawable); | ||
791 | return -EINVAL; | ||
792 | } | ||
793 | |||
794 | i915_dispatch_vsync_flip(dev, drw, plane); | ||
795 | |||
796 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); | ||
797 | |||
798 | return 0; | ||
799 | } | ||
800 | } | ||
801 | |||
802 | spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); | 540 | spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); |
803 | 541 | ||
804 | list_for_each(list, &dev_priv->vbl_swaps.head) { | 542 | list_for_each(list, &dev_priv->vbl_swaps.head) { |
805 | vbl_swap = list_entry(list, drm_i915_vbl_swap_t, head); | 543 | vbl_swap = list_entry(list, drm_i915_vbl_swap_t, head); |
806 | 544 | ||
807 | if (vbl_swap->drw_id == swap->drawable && | 545 | if (vbl_swap->drw_id == swap->drawable && |
808 | vbl_swap->plane == plane && | 546 | vbl_swap->pipe == pipe && |
809 | vbl_swap->sequence == swap->sequence) { | 547 | vbl_swap->sequence == swap->sequence) { |
810 | vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP); | ||
811 | spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); | 548 | spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags); |
812 | DRM_DEBUG("Already scheduled\n"); | 549 | DRM_DEBUG("Already scheduled\n"); |
813 | return 0; | 550 | return 0; |
@@ -830,19 +567,9 @@ int i915_vblank_swap(struct drm_device *dev, void *data, | |||
830 | 567 | ||
831 | DRM_DEBUG("\n"); | 568 | DRM_DEBUG("\n"); |
832 | 569 | ||
833 | ret = drm_vblank_get(dev, pipe); | ||
834 | if (ret) { | ||
835 | drm_free(vbl_swap, sizeof(*vbl_swap), DRM_MEM_DRIVER); | ||
836 | return ret; | ||
837 | } | ||
838 | |||
839 | vbl_swap->drw_id = swap->drawable; | 570 | vbl_swap->drw_id = swap->drawable; |
840 | vbl_swap->plane = plane; | 571 | vbl_swap->pipe = pipe; |
841 | vbl_swap->sequence = swap->sequence; | 572 | vbl_swap->sequence = swap->sequence; |
842 | vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP); | ||
843 | |||
844 | if (vbl_swap->flip) | ||
845 | swap->sequence++; | ||
846 | 573 | ||
847 | spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); | 574 | spin_lock_irqsave(&dev_priv->swaps_lock, irqflags); |
848 | 575 | ||
@@ -860,57 +587,37 @@ void i915_driver_irq_preinstall(struct drm_device * dev) | |||
860 | { | 587 | { |
861 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 588 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
862 | 589 | ||
863 | I915_WRITE16(I915REG_HWSTAM, 0xeffe); | 590 | I915_WRITE16(I915REG_HWSTAM, 0xfffe); |
864 | I915_WRITE16(I915REG_INT_MASK_R, 0x0); | 591 | I915_WRITE16(I915REG_INT_MASK_R, 0x0); |
865 | I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); | 592 | I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); |
866 | } | 593 | } |
867 | 594 | ||
868 | int i915_driver_irq_postinstall(struct drm_device * dev) | 595 | void i915_driver_irq_postinstall(struct drm_device * dev) |
869 | { | 596 | { |
870 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 597 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
871 | int ret, num_pipes = 2; | ||
872 | 598 | ||
873 | spin_lock_init(&dev_priv->swaps_lock); | 599 | spin_lock_init(&dev_priv->swaps_lock); |
874 | INIT_LIST_HEAD(&dev_priv->vbl_swaps.head); | 600 | INIT_LIST_HEAD(&dev_priv->vbl_swaps.head); |
875 | dev_priv->swaps_pending = 0; | 601 | dev_priv->swaps_pending = 0; |
876 | 602 | ||
877 | dev_priv->user_irq_refcount = 0; | 603 | if (!dev_priv->vblank_pipe) |
878 | dev_priv->irq_enable_reg = 0; | 604 | dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A; |
879 | |||
880 | ret = drm_vblank_init(dev, num_pipes); | ||
881 | if (ret) | ||
882 | return ret; | ||
883 | |||
884 | dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ | ||
885 | |||
886 | i915_enable_interrupt(dev); | 605 | i915_enable_interrupt(dev); |
887 | DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); | 606 | DRM_INIT_WAITQUEUE(&dev_priv->irq_queue); |
888 | |||
889 | /* | ||
890 | * Initialize the hardware status page IRQ location. | ||
891 | */ | ||
892 | |||
893 | I915_WRITE(I915REG_INSTPM, (1 << 5) | (1 << 21)); | ||
894 | return 0; | ||
895 | } | 607 | } |
896 | 608 | ||
897 | void i915_driver_irq_uninstall(struct drm_device * dev) | 609 | void i915_driver_irq_uninstall(struct drm_device * dev) |
898 | { | 610 | { |
899 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 611 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
900 | u32 temp; | 612 | u16 temp; |
901 | 613 | ||
902 | if (!dev_priv) | 614 | if (!dev_priv) |
903 | return; | 615 | return; |
904 | 616 | ||
905 | dev_priv->irq_enabled = 0; | 617 | I915_WRITE16(I915REG_HWSTAM, 0xffff); |
906 | I915_WRITE(I915REG_HWSTAM, 0xffffffff); | 618 | I915_WRITE16(I915REG_INT_MASK_R, 0xffff); |
907 | I915_WRITE(I915REG_INT_MASK_R, 0xffffffff); | 619 | I915_WRITE16(I915REG_INT_ENABLE_R, 0x0); |
908 | I915_WRITE(I915REG_INT_ENABLE_R, 0x0); | 620 | |
909 | 621 | temp = I915_READ16(I915REG_INT_IDENTITY_R); | |
910 | temp = I915_READ(I915REG_PIPEASTAT); | 622 | I915_WRITE16(I915REG_INT_IDENTITY_R, temp); |
911 | I915_WRITE(I915REG_PIPEASTAT, temp); | ||
912 | temp = I915_READ(I915REG_PIPEBSTAT); | ||
913 | I915_WRITE(I915REG_PIPEBSTAT, temp); | ||
914 | temp = I915_READ(I915REG_INT_IDENTITY_R); | ||
915 | I915_WRITE(I915REG_INT_IDENTITY_R, temp); | ||
916 | } | 623 | } |
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c index 6b3790939e76..5572939fc7d1 100644 --- a/drivers/char/drm/mga_drv.c +++ b/drivers/char/drm/mga_drv.c | |||
@@ -45,16 +45,15 @@ static struct pci_device_id pciidlist[] = { | |||
45 | static struct drm_driver driver = { | 45 | static struct drm_driver driver = { |
46 | .driver_features = | 46 | .driver_features = |
47 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | | 47 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | |
48 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, | 48 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | |
49 | DRIVER_IRQ_VBL, | ||
49 | .dev_priv_size = sizeof(drm_mga_buf_priv_t), | 50 | .dev_priv_size = sizeof(drm_mga_buf_priv_t), |
50 | .load = mga_driver_load, | 51 | .load = mga_driver_load, |
51 | .unload = mga_driver_unload, | 52 | .unload = mga_driver_unload, |
52 | .lastclose = mga_driver_lastclose, | 53 | .lastclose = mga_driver_lastclose, |
53 | .dma_quiescent = mga_driver_dma_quiescent, | 54 | .dma_quiescent = mga_driver_dma_quiescent, |
54 | .device_is_agp = mga_driver_device_is_agp, | 55 | .device_is_agp = mga_driver_device_is_agp, |
55 | .get_vblank_counter = mga_get_vblank_counter, | 56 | .vblank_wait = mga_driver_vblank_wait, |
56 | .enable_vblank = mga_enable_vblank, | ||
57 | .disable_vblank = mga_disable_vblank, | ||
58 | .irq_preinstall = mga_driver_irq_preinstall, | 57 | .irq_preinstall = mga_driver_irq_preinstall, |
59 | .irq_postinstall = mga_driver_irq_postinstall, | 58 | .irq_postinstall = mga_driver_irq_postinstall, |
60 | .irq_uninstall = mga_driver_irq_uninstall, | 59 | .irq_uninstall = mga_driver_irq_uninstall, |
diff --git a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h index 8f7291f36363..f6ebd24bd587 100644 --- a/drivers/char/drm/mga_drv.h +++ b/drivers/char/drm/mga_drv.h | |||
@@ -120,7 +120,6 @@ typedef struct drm_mga_private { | |||
120 | u32 clear_cmd; | 120 | u32 clear_cmd; |
121 | u32 maccess; | 121 | u32 maccess; |
122 | 122 | ||
123 | atomic_t vbl_received; /**< Number of vblanks received. */ | ||
124 | wait_queue_head_t fence_queue; | 123 | wait_queue_head_t fence_queue; |
125 | atomic_t last_fence_retired; | 124 | atomic_t last_fence_retired; |
126 | u32 next_fence_to_post; | 125 | u32 next_fence_to_post; |
@@ -182,14 +181,11 @@ extern int mga_warp_install_microcode(drm_mga_private_t * dev_priv); | |||
182 | extern int mga_warp_init(drm_mga_private_t * dev_priv); | 181 | extern int mga_warp_init(drm_mga_private_t * dev_priv); |
183 | 182 | ||
184 | /* mga_irq.c */ | 183 | /* mga_irq.c */ |
185 | extern int mga_enable_vblank(struct drm_device *dev, int crtc); | ||
186 | extern void mga_disable_vblank(struct drm_device *dev, int crtc); | ||
187 | extern u32 mga_get_vblank_counter(struct drm_device *dev, int crtc); | ||
188 | extern int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence); | 184 | extern int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence); |
189 | extern int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence); | 185 | extern int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence); |
190 | extern irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS); | 186 | extern irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS); |
191 | extern void mga_driver_irq_preinstall(struct drm_device * dev); | 187 | extern void mga_driver_irq_preinstall(struct drm_device * dev); |
192 | extern int mga_driver_irq_postinstall(struct drm_device * dev); | 188 | extern void mga_driver_irq_postinstall(struct drm_device * dev); |
193 | extern void mga_driver_irq_uninstall(struct drm_device * dev); | 189 | extern void mga_driver_irq_uninstall(struct drm_device * dev); |
194 | extern long mga_compat_ioctl(struct file *filp, unsigned int cmd, | 190 | extern long mga_compat_ioctl(struct file *filp, unsigned int cmd, |
195 | unsigned long arg); | 191 | unsigned long arg); |
diff --git a/drivers/char/drm/mga_irq.c b/drivers/char/drm/mga_irq.c index 06852fb4b278..9302cb8f0f83 100644 --- a/drivers/char/drm/mga_irq.c +++ b/drivers/char/drm/mga_irq.c | |||
@@ -35,20 +35,6 @@ | |||
35 | #include "mga_drm.h" | 35 | #include "mga_drm.h" |
36 | #include "mga_drv.h" | 36 | #include "mga_drv.h" |
37 | 37 | ||
38 | u32 mga_get_vblank_counter(struct drm_device *dev, int crtc) | ||
39 | { | ||
40 | const drm_mga_private_t *const dev_priv = | ||
41 | (drm_mga_private_t *) dev->dev_private; | ||
42 | |||
43 | if (crtc != 0) { | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | |||
48 | return atomic_read(&dev_priv->vbl_received); | ||
49 | } | ||
50 | |||
51 | |||
52 | irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) | 38 | irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) |
53 | { | 39 | { |
54 | struct drm_device *dev = (struct drm_device *) arg; | 40 | struct drm_device *dev = (struct drm_device *) arg; |
@@ -61,8 +47,9 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) | |||
61 | /* VBLANK interrupt */ | 47 | /* VBLANK interrupt */ |
62 | if (status & MGA_VLINEPEN) { | 48 | if (status & MGA_VLINEPEN) { |
63 | MGA_WRITE(MGA_ICLEAR, MGA_VLINEICLR); | 49 | MGA_WRITE(MGA_ICLEAR, MGA_VLINEICLR); |
64 | atomic_inc(&dev_priv->vbl_received); | 50 | atomic_inc(&dev->vbl_received); |
65 | drm_handle_vblank(dev, 0); | 51 | DRM_WAKEUP(&dev->vbl_queue); |
52 | drm_vbl_send_signals(dev); | ||
66 | handled = 1; | 53 | handled = 1; |
67 | } | 54 | } |
68 | 55 | ||
@@ -91,34 +78,22 @@ irqreturn_t mga_driver_irq_handler(DRM_IRQ_ARGS) | |||
91 | return IRQ_NONE; | 78 | return IRQ_NONE; |
92 | } | 79 | } |
93 | 80 | ||
94 | int mga_enable_vblank(struct drm_device *dev, int crtc) | 81 | int mga_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence) |
95 | { | 82 | { |
96 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; | 83 | unsigned int cur_vblank; |
97 | 84 | int ret = 0; | |
98 | if (crtc != 0) { | ||
99 | DRM_ERROR("tried to enable vblank on non-existent crtc %d\n", | ||
100 | crtc); | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); | ||
105 | return 0; | ||
106 | } | ||
107 | 85 | ||
86 | /* Assume that the user has missed the current sequence number | ||
87 | * by about a day rather than she wants to wait for years | ||
88 | * using vertical blanks... | ||
89 | */ | ||
90 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, | ||
91 | (((cur_vblank = atomic_read(&dev->vbl_received)) | ||
92 | - *sequence) <= (1 << 23))); | ||
108 | 93 | ||
109 | void mga_disable_vblank(struct drm_device *dev, int crtc) | 94 | *sequence = cur_vblank; |
110 | { | ||
111 | if (crtc != 0) { | ||
112 | DRM_ERROR("tried to disable vblank on non-existent crtc %d\n", | ||
113 | crtc); | ||
114 | } | ||
115 | 95 | ||
116 | /* Do *NOT* disable the vertical refresh interrupt. MGA doesn't have | 96 | return ret; |
117 | * a nice hardware counter that tracks the number of refreshes when | ||
118 | * the interrupt is disabled, and the kernel doesn't know the refresh | ||
119 | * rate to calculate an estimate. | ||
120 | */ | ||
121 | /* MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); */ | ||
122 | } | 97 | } |
123 | 98 | ||
124 | int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence) | 99 | int mga_driver_fence_wait(struct drm_device * dev, unsigned int *sequence) |
@@ -150,22 +125,14 @@ void mga_driver_irq_preinstall(struct drm_device * dev) | |||
150 | MGA_WRITE(MGA_ICLEAR, ~0); | 125 | MGA_WRITE(MGA_ICLEAR, ~0); |
151 | } | 126 | } |
152 | 127 | ||
153 | int mga_driver_irq_postinstall(struct drm_device * dev) | 128 | void mga_driver_irq_postinstall(struct drm_device * dev) |
154 | { | 129 | { |
155 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; | 130 | drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; |
156 | int ret; | ||
157 | |||
158 | ret = drm_vblank_init(dev, 1); | ||
159 | if (ret) | ||
160 | return ret; | ||
161 | 131 | ||
162 | DRM_INIT_WAITQUEUE(&dev_priv->fence_queue); | 132 | DRM_INIT_WAITQUEUE(&dev_priv->fence_queue); |
163 | 133 | ||
164 | /* Turn on soft trap interrupt. Vertical blank interrupts are enabled | 134 | /* Turn on vertical blank interrupt and soft trap interrupt. */ |
165 | * in mga_enable_vblank. | 135 | MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); |
166 | */ | ||
167 | MGA_WRITE(MGA_IEN, MGA_SOFTRAPEN); | ||
168 | return 0; | ||
169 | } | 136 | } |
170 | 137 | ||
171 | void mga_driver_irq_uninstall(struct drm_device * dev) | 138 | void mga_driver_irq_uninstall(struct drm_device * dev) |
diff --git a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c index 2888aa01ebc7..6108e7587e12 100644 --- a/drivers/char/drm/r128_drv.c +++ b/drivers/char/drm/r128_drv.c | |||
@@ -43,13 +43,12 @@ static struct pci_device_id pciidlist[] = { | |||
43 | static struct drm_driver driver = { | 43 | static struct drm_driver driver = { |
44 | .driver_features = | 44 | .driver_features = |
45 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | | 45 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | |
46 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED, | 46 | DRIVER_HAVE_DMA | DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | |
47 | DRIVER_IRQ_VBL, | ||
47 | .dev_priv_size = sizeof(drm_r128_buf_priv_t), | 48 | .dev_priv_size = sizeof(drm_r128_buf_priv_t), |
48 | .preclose = r128_driver_preclose, | 49 | .preclose = r128_driver_preclose, |
49 | .lastclose = r128_driver_lastclose, | 50 | .lastclose = r128_driver_lastclose, |
50 | .get_vblank_counter = r128_get_vblank_counter, | 51 | .vblank_wait = r128_driver_vblank_wait, |
51 | .enable_vblank = r128_enable_vblank, | ||
52 | .disable_vblank = r128_disable_vblank, | ||
53 | .irq_preinstall = r128_driver_irq_preinstall, | 52 | .irq_preinstall = r128_driver_irq_preinstall, |
54 | .irq_postinstall = r128_driver_irq_postinstall, | 53 | .irq_postinstall = r128_driver_irq_postinstall, |
55 | .irq_uninstall = r128_driver_irq_uninstall, | 54 | .irq_uninstall = r128_driver_irq_uninstall, |
diff --git a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h index 80af9e09e75d..011105e51ac6 100644 --- a/drivers/char/drm/r128_drv.h +++ b/drivers/char/drm/r128_drv.h | |||
@@ -97,8 +97,6 @@ typedef struct drm_r128_private { | |||
97 | u32 crtc_offset; | 97 | u32 crtc_offset; |
98 | u32 crtc_offset_cntl; | 98 | u32 crtc_offset_cntl; |
99 | 99 | ||
100 | atomic_t vbl_received; | ||
101 | |||
102 | u32 color_fmt; | 100 | u32 color_fmt; |
103 | unsigned int front_offset; | 101 | unsigned int front_offset; |
104 | unsigned int front_pitch; | 102 | unsigned int front_pitch; |
@@ -151,12 +149,11 @@ extern int r128_wait_ring(drm_r128_private_t * dev_priv, int n); | |||
151 | extern int r128_do_cce_idle(drm_r128_private_t * dev_priv); | 149 | extern int r128_do_cce_idle(drm_r128_private_t * dev_priv); |
152 | extern int r128_do_cleanup_cce(struct drm_device * dev); | 150 | extern int r128_do_cleanup_cce(struct drm_device * dev); |
153 | 151 | ||
154 | extern int r128_enable_vblank(struct drm_device *dev, int crtc); | 152 | extern int r128_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence); |
155 | extern void r128_disable_vblank(struct drm_device *dev, int crtc); | 153 | |
156 | extern u32 r128_get_vblank_counter(struct drm_device *dev, int crtc); | ||
157 | extern irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS); | 154 | extern irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS); |
158 | extern void r128_driver_irq_preinstall(struct drm_device * dev); | 155 | extern void r128_driver_irq_preinstall(struct drm_device * dev); |
159 | extern int r128_driver_irq_postinstall(struct drm_device * dev); | 156 | extern void r128_driver_irq_postinstall(struct drm_device * dev); |
160 | extern void r128_driver_irq_uninstall(struct drm_device * dev); | 157 | extern void r128_driver_irq_uninstall(struct drm_device * dev); |
161 | extern void r128_driver_lastclose(struct drm_device * dev); | 158 | extern void r128_driver_lastclose(struct drm_device * dev); |
162 | extern void r128_driver_preclose(struct drm_device * dev, | 159 | extern void r128_driver_preclose(struct drm_device * dev, |
diff --git a/drivers/char/drm/r128_irq.c b/drivers/char/drm/r128_irq.c index 5b95bd898f95..c76fdca7662d 100644 --- a/drivers/char/drm/r128_irq.c +++ b/drivers/char/drm/r128_irq.c | |||
@@ -35,16 +35,6 @@ | |||
35 | #include "r128_drm.h" | 35 | #include "r128_drm.h" |
36 | #include "r128_drv.h" | 36 | #include "r128_drv.h" |
37 | 37 | ||
38 | u32 r128_get_vblank_counter(struct drm_device *dev, int crtc) | ||
39 | { | ||
40 | const drm_r128_private_t *dev_priv = dev->dev_private; | ||
41 | |||
42 | if (crtc != 0) | ||
43 | return 0; | ||
44 | |||
45 | return atomic_read(&dev_priv->vbl_received); | ||
46 | } | ||
47 | |||
48 | irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS) | 38 | irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS) |
49 | { | 39 | { |
50 | struct drm_device *dev = (struct drm_device *) arg; | 40 | struct drm_device *dev = (struct drm_device *) arg; |
@@ -56,38 +46,30 @@ irqreturn_t r128_driver_irq_handler(DRM_IRQ_ARGS) | |||
56 | /* VBLANK interrupt */ | 46 | /* VBLANK interrupt */ |
57 | if (status & R128_CRTC_VBLANK_INT) { | 47 | if (status & R128_CRTC_VBLANK_INT) { |
58 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); | 48 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); |
59 | atomic_inc(&dev_priv->vbl_received); | 49 | atomic_inc(&dev->vbl_received); |
60 | drm_handle_vblank(dev, 0); | 50 | DRM_WAKEUP(&dev->vbl_queue); |
51 | drm_vbl_send_signals(dev); | ||
61 | return IRQ_HANDLED; | 52 | return IRQ_HANDLED; |
62 | } | 53 | } |
63 | return IRQ_NONE; | 54 | return IRQ_NONE; |
64 | } | 55 | } |
65 | 56 | ||
66 | int r128_enable_vblank(struct drm_device *dev, int crtc) | 57 | int r128_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence) |
67 | { | 58 | { |
68 | drm_r128_private_t *dev_priv = dev->dev_private; | 59 | unsigned int cur_vblank; |
69 | 60 | int ret = 0; | |
70 | if (crtc != 0) { | ||
71 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); | ||
72 | return -EINVAL; | ||
73 | } | ||
74 | 61 | ||
75 | R128_WRITE(R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN); | 62 | /* Assume that the user has missed the current sequence number |
76 | return 0; | 63 | * by about a day rather than she wants to wait for years |
77 | } | 64 | * using vertical blanks... |
65 | */ | ||
66 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, | ||
67 | (((cur_vblank = atomic_read(&dev->vbl_received)) | ||
68 | - *sequence) <= (1 << 23))); | ||
78 | 69 | ||
79 | void r128_disable_vblank(struct drm_device *dev, int crtc) | 70 | *sequence = cur_vblank; |
80 | { | ||
81 | if (crtc != 0) | ||
82 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); | ||
83 | 71 | ||
84 | /* | 72 | return ret; |
85 | * FIXME: implement proper interrupt disable by using the vblank | ||
86 | * counter register (if available) | ||
87 | * | ||
88 | * R128_WRITE(R128_GEN_INT_CNTL, | ||
89 | * R128_READ(R128_GEN_INT_CNTL) & ~R128_CRTC_VBLANK_INT_EN); | ||
90 | */ | ||
91 | } | 73 | } |
92 | 74 | ||
93 | void r128_driver_irq_preinstall(struct drm_device * dev) | 75 | void r128_driver_irq_preinstall(struct drm_device * dev) |
@@ -100,9 +82,12 @@ void r128_driver_irq_preinstall(struct drm_device * dev) | |||
100 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); | 82 | R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); |
101 | } | 83 | } |
102 | 84 | ||
103 | int r128_driver_irq_postinstall(struct drm_device * dev) | 85 | void r128_driver_irq_postinstall(struct drm_device * dev) |
104 | { | 86 | { |
105 | return drm_vblank_init(dev, 1); | 87 | drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; |
88 | |||
89 | /* Turn on VBL interrupt */ | ||
90 | R128_WRITE(R128_GEN_INT_CNTL, R128_CRTC_VBLANK_INT_EN); | ||
106 | } | 91 | } |
107 | 92 | ||
108 | void r128_driver_irq_uninstall(struct drm_device * dev) | 93 | void r128_driver_irq_uninstall(struct drm_device * dev) |
diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c index a2610319624d..349ac3d3b848 100644 --- a/drivers/char/drm/radeon_drv.c +++ b/drivers/char/drm/radeon_drv.c | |||
@@ -59,7 +59,8 @@ static struct pci_device_id pciidlist[] = { | |||
59 | static struct drm_driver driver = { | 59 | static struct drm_driver driver = { |
60 | .driver_features = | 60 | .driver_features = |
61 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | | 61 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG | |
62 | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED, | 62 | DRIVER_HAVE_IRQ | DRIVER_HAVE_DMA | DRIVER_IRQ_SHARED | |
63 | DRIVER_IRQ_VBL | DRIVER_IRQ_VBL2, | ||
63 | .dev_priv_size = sizeof(drm_radeon_buf_priv_t), | 64 | .dev_priv_size = sizeof(drm_radeon_buf_priv_t), |
64 | .load = radeon_driver_load, | 65 | .load = radeon_driver_load, |
65 | .firstopen = radeon_driver_firstopen, | 66 | .firstopen = radeon_driver_firstopen, |
@@ -68,9 +69,8 @@ static struct drm_driver driver = { | |||
68 | .postclose = radeon_driver_postclose, | 69 | .postclose = radeon_driver_postclose, |
69 | .lastclose = radeon_driver_lastclose, | 70 | .lastclose = radeon_driver_lastclose, |
70 | .unload = radeon_driver_unload, | 71 | .unload = radeon_driver_unload, |
71 | .get_vblank_counter = radeon_get_vblank_counter, | 72 | .vblank_wait = radeon_driver_vblank_wait, |
72 | .enable_vblank = radeon_enable_vblank, | 73 | .vblank_wait2 = radeon_driver_vblank_wait2, |
73 | .disable_vblank = radeon_disable_vblank, | ||
74 | .dri_library_name = dri_library_name, | 74 | .dri_library_name = dri_library_name, |
75 | .irq_preinstall = radeon_driver_irq_preinstall, | 75 | .irq_preinstall = radeon_driver_irq_preinstall, |
76 | .irq_postinstall = radeon_driver_irq_postinstall, | 76 | .irq_postinstall = radeon_driver_irq_postinstall, |
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h index b791420bd3d9..173ae620223a 100644 --- a/drivers/char/drm/radeon_drv.h +++ b/drivers/char/drm/radeon_drv.h | |||
@@ -304,9 +304,6 @@ typedef struct drm_radeon_private { | |||
304 | 304 | ||
305 | u32 scratch_ages[5]; | 305 | u32 scratch_ages[5]; |
306 | 306 | ||
307 | unsigned int crtc_last_cnt; | ||
308 | unsigned int crtc2_last_cnt; | ||
309 | |||
310 | /* starting from here on, data is preserved accross an open */ | 307 | /* starting from here on, data is preserved accross an open */ |
311 | uint32_t flags; /* see radeon_chip_flags */ | 308 | uint32_t flags; /* see radeon_chip_flags */ |
312 | unsigned long fb_aper_offset; | 309 | unsigned long fb_aper_offset; |
@@ -377,13 +374,13 @@ extern int radeon_irq_emit(struct drm_device *dev, void *data, struct drm_file * | |||
377 | extern int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_priv); | 374 | extern int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_priv); |
378 | 375 | ||
379 | extern void radeon_do_release(struct drm_device * dev); | 376 | extern void radeon_do_release(struct drm_device * dev); |
380 | extern u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc); | 377 | extern int radeon_driver_vblank_wait(struct drm_device * dev, |
381 | extern int radeon_enable_vblank(struct drm_device *dev, int crtc); | 378 | unsigned int *sequence); |
382 | extern void radeon_disable_vblank(struct drm_device *dev, int crtc); | 379 | extern int radeon_driver_vblank_wait2(struct drm_device * dev, |
383 | extern void radeon_do_release(struct drm_device * dev); | 380 | unsigned int *sequence); |
384 | extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS); | 381 | extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS); |
385 | extern void radeon_driver_irq_preinstall(struct drm_device * dev); | 382 | extern void radeon_driver_irq_preinstall(struct drm_device * dev); |
386 | extern int radeon_driver_irq_postinstall(struct drm_device * dev); | 383 | extern void radeon_driver_irq_postinstall(struct drm_device * dev); |
387 | extern void radeon_driver_irq_uninstall(struct drm_device * dev); | 384 | extern void radeon_driver_irq_uninstall(struct drm_device * dev); |
388 | extern int radeon_vblank_crtc_get(struct drm_device *dev); | 385 | extern int radeon_vblank_crtc_get(struct drm_device *dev); |
389 | extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value); | 386 | extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value); |
@@ -561,12 +558,6 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev, | |||
561 | ? DRM_READ32( dev_priv->ring_rptr, RADEON_SCRATCHOFF(x) ) \ | 558 | ? DRM_READ32( dev_priv->ring_rptr, RADEON_SCRATCHOFF(x) ) \ |
562 | : RADEON_READ( RADEON_SCRATCH_REG0 + 4*(x) ) ) | 559 | : RADEON_READ( RADEON_SCRATCH_REG0 + 4*(x) ) ) |
563 | 560 | ||
564 | #define RADEON_CRTC_CRNT_FRAME 0x0214 | ||
565 | #define RADEON_CRTC2_CRNT_FRAME 0x0314 | ||
566 | |||
567 | #define RADEON_CRTC_STATUS 0x005c | ||
568 | #define RADEON_CRTC2_STATUS 0x03fc | ||
569 | |||
570 | #define RADEON_GEN_INT_CNTL 0x0040 | 561 | #define RADEON_GEN_INT_CNTL 0x0040 |
571 | # define RADEON_CRTC_VBLANK_MASK (1 << 0) | 562 | # define RADEON_CRTC_VBLANK_MASK (1 << 0) |
572 | # define RADEON_CRTC2_VBLANK_MASK (1 << 9) | 563 | # define RADEON_CRTC2_VBLANK_MASK (1 << 9) |
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c index 507d6b747a13..009af3814b6f 100644 --- a/drivers/char/drm/radeon_irq.c +++ b/drivers/char/drm/radeon_irq.c | |||
@@ -35,61 +35,12 @@ | |||
35 | #include "radeon_drm.h" | 35 | #include "radeon_drm.h" |
36 | #include "radeon_drv.h" | 36 | #include "radeon_drv.h" |
37 | 37 | ||
38 | static void radeon_irq_set_state(struct drm_device *dev, u32 mask, int state) | 38 | static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv, |
39 | u32 mask) | ||
39 | { | 40 | { |
40 | drm_radeon_private_t *dev_priv = dev->dev_private; | 41 | u32 irqs = RADEON_READ(RADEON_GEN_INT_STATUS) & mask; |
41 | |||
42 | if (state) | ||
43 | dev_priv->irq_enable_reg |= mask; | ||
44 | else | ||
45 | dev_priv->irq_enable_reg &= ~mask; | ||
46 | |||
47 | RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); | ||
48 | } | ||
49 | |||
50 | int radeon_enable_vblank(struct drm_device *dev, int crtc) | ||
51 | { | ||
52 | switch (crtc) { | ||
53 | case 0: | ||
54 | radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 1); | ||
55 | break; | ||
56 | case 1: | ||
57 | radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 1); | ||
58 | break; | ||
59 | default: | ||
60 | DRM_ERROR("tried to enable vblank on non-existent crtc %d\n", | ||
61 | crtc); | ||
62 | return EINVAL; | ||
63 | } | ||
64 | |||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | void radeon_disable_vblank(struct drm_device *dev, int crtc) | ||
69 | { | ||
70 | switch (crtc) { | ||
71 | case 0: | ||
72 | radeon_irq_set_state(dev, RADEON_CRTC_VBLANK_MASK, 0); | ||
73 | break; | ||
74 | case 1: | ||
75 | radeon_irq_set_state(dev, RADEON_CRTC2_VBLANK_MASK, 0); | ||
76 | break; | ||
77 | default: | ||
78 | DRM_ERROR("tried to enable vblank on non-existent crtc %d\n", | ||
79 | crtc); | ||
80 | break; | ||
81 | } | ||
82 | } | ||
83 | |||
84 | static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t * dev_priv) | ||
85 | { | ||
86 | u32 irqs = RADEON_READ(RADEON_GEN_INT_STATUS) & | ||
87 | (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT | | ||
88 | RADEON_CRTC2_VBLANK_STAT); | ||
89 | |||
90 | if (irqs) | 42 | if (irqs) |
91 | RADEON_WRITE(RADEON_GEN_INT_STATUS, irqs); | 43 | RADEON_WRITE(RADEON_GEN_INT_STATUS, irqs); |
92 | |||
93 | return irqs; | 44 | return irqs; |
94 | } | 45 | } |
95 | 46 | ||
@@ -121,21 +72,39 @@ irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS) | |||
121 | /* Only consider the bits we're interested in - others could be used | 72 | /* Only consider the bits we're interested in - others could be used |
122 | * outside the DRM | 73 | * outside the DRM |
123 | */ | 74 | */ |
124 | stat = radeon_acknowledge_irqs(dev_priv); | 75 | stat = radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | |
76 | RADEON_CRTC_VBLANK_STAT | | ||
77 | RADEON_CRTC2_VBLANK_STAT)); | ||
125 | if (!stat) | 78 | if (!stat) |
126 | return IRQ_NONE; | 79 | return IRQ_NONE; |
127 | 80 | ||
128 | stat &= dev_priv->irq_enable_reg; | 81 | stat &= dev_priv->irq_enable_reg; |
129 | 82 | ||
130 | /* SW interrupt */ | 83 | /* SW interrupt */ |
131 | if (stat & RADEON_SW_INT_TEST) | 84 | if (stat & RADEON_SW_INT_TEST) { |
132 | DRM_WAKEUP(&dev_priv->swi_queue); | 85 | DRM_WAKEUP(&dev_priv->swi_queue); |
86 | } | ||
133 | 87 | ||
134 | /* VBLANK interrupt */ | 88 | /* VBLANK interrupt */ |
135 | if (stat & RADEON_CRTC_VBLANK_STAT) | 89 | if (stat & (RADEON_CRTC_VBLANK_STAT|RADEON_CRTC2_VBLANK_STAT)) { |
136 | drm_handle_vblank(dev, 0); | 90 | int vblank_crtc = dev_priv->vblank_crtc; |
137 | if (stat & RADEON_CRTC2_VBLANK_STAT) | 91 | |
138 | drm_handle_vblank(dev, 1); | 92 | if ((vblank_crtc & |
93 | (DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) == | ||
94 | (DRM_RADEON_VBLANK_CRTC1 | DRM_RADEON_VBLANK_CRTC2)) { | ||
95 | if (stat & RADEON_CRTC_VBLANK_STAT) | ||
96 | atomic_inc(&dev->vbl_received); | ||
97 | if (stat & RADEON_CRTC2_VBLANK_STAT) | ||
98 | atomic_inc(&dev->vbl_received2); | ||
99 | } else if (((stat & RADEON_CRTC_VBLANK_STAT) && | ||
100 | (vblank_crtc & DRM_RADEON_VBLANK_CRTC1)) || | ||
101 | ((stat & RADEON_CRTC2_VBLANK_STAT) && | ||
102 | (vblank_crtc & DRM_RADEON_VBLANK_CRTC2))) | ||
103 | atomic_inc(&dev->vbl_received); | ||
104 | |||
105 | DRM_WAKEUP(&dev->vbl_queue); | ||
106 | drm_vbl_send_signals(dev); | ||
107 | } | ||
139 | 108 | ||
140 | return IRQ_HANDLED; | 109 | return IRQ_HANDLED; |
141 | } | 110 | } |
@@ -175,27 +144,54 @@ static int radeon_wait_irq(struct drm_device * dev, int swi_nr) | |||
175 | return ret; | 144 | return ret; |
176 | } | 145 | } |
177 | 146 | ||
178 | u32 radeon_get_vblank_counter(struct drm_device *dev, int crtc) | 147 | static int radeon_driver_vblank_do_wait(struct drm_device * dev, |
148 | unsigned int *sequence, int crtc) | ||
179 | { | 149 | { |
180 | drm_radeon_private_t *dev_priv = dev->dev_private; | 150 | drm_radeon_private_t *dev_priv = |
181 | u32 crtc_cnt_reg, crtc_status_reg; | 151 | (drm_radeon_private_t *) dev->dev_private; |
182 | 152 | unsigned int cur_vblank; | |
153 | int ret = 0; | ||
154 | int ack = 0; | ||
155 | atomic_t *counter; | ||
183 | if (!dev_priv) { | 156 | if (!dev_priv) { |
184 | DRM_ERROR("called with no initialization\n"); | 157 | DRM_ERROR("called with no initialization\n"); |
185 | return -EINVAL; | 158 | return -EINVAL; |
186 | } | 159 | } |
187 | 160 | ||
188 | if (crtc == 0) { | 161 | if (crtc == DRM_RADEON_VBLANK_CRTC1) { |
189 | crtc_cnt_reg = RADEON_CRTC_CRNT_FRAME; | 162 | counter = &dev->vbl_received; |
190 | crtc_status_reg = RADEON_CRTC_STATUS; | 163 | ack |= RADEON_CRTC_VBLANK_STAT; |
191 | } else if (crtc == 1) { | 164 | } else if (crtc == DRM_RADEON_VBLANK_CRTC2) { |
192 | crtc_cnt_reg = RADEON_CRTC2_CRNT_FRAME; | 165 | counter = &dev->vbl_received2; |
193 | crtc_status_reg = RADEON_CRTC2_STATUS; | 166 | ack |= RADEON_CRTC2_VBLANK_STAT; |
194 | } else { | 167 | } else |
195 | return -EINVAL; | 168 | return -EINVAL; |
196 | } | ||
197 | 169 | ||
198 | return RADEON_READ(crtc_cnt_reg) + (RADEON_READ(crtc_status_reg) & 1); | 170 | radeon_acknowledge_irqs(dev_priv, ack); |
171 | |||
172 | dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; | ||
173 | |||
174 | /* Assume that the user has missed the current sequence number | ||
175 | * by about a day rather than she wants to wait for years | ||
176 | * using vertical blanks... | ||
177 | */ | ||
178 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, | ||
179 | (((cur_vblank = atomic_read(counter)) | ||
180 | - *sequence) <= (1 << 23))); | ||
181 | |||
182 | *sequence = cur_vblank; | ||
183 | |||
184 | return ret; | ||
185 | } | ||
186 | |||
187 | int radeon_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence) | ||
188 | { | ||
189 | return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC1); | ||
190 | } | ||
191 | |||
192 | int radeon_driver_vblank_wait2(struct drm_device *dev, unsigned int *sequence) | ||
193 | { | ||
194 | return radeon_driver_vblank_do_wait(dev, sequence, DRM_RADEON_VBLANK_CRTC2); | ||
199 | } | 195 | } |
200 | 196 | ||
201 | /* Needs the lock as it touches the ring. | 197 | /* Needs the lock as it touches the ring. |
@@ -238,6 +234,21 @@ int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_pr | |||
238 | return radeon_wait_irq(dev, irqwait->irq_seq); | 234 | return radeon_wait_irq(dev, irqwait->irq_seq); |
239 | } | 235 | } |
240 | 236 | ||
237 | static void radeon_enable_interrupt(struct drm_device *dev) | ||
238 | { | ||
239 | drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; | ||
240 | |||
241 | dev_priv->irq_enable_reg = RADEON_SW_INT_ENABLE; | ||
242 | if (dev_priv->vblank_crtc & DRM_RADEON_VBLANK_CRTC1) | ||
243 | dev_priv->irq_enable_reg |= RADEON_CRTC_VBLANK_MASK; | ||
244 | |||
245 | if (dev_priv->vblank_crtc & DRM_RADEON_VBLANK_CRTC2) | ||
246 | dev_priv->irq_enable_reg |= RADEON_CRTC2_VBLANK_MASK; | ||
247 | |||
248 | RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); | ||
249 | dev_priv->irq_enabled = 1; | ||
250 | } | ||
251 | |||
241 | /* drm_dma.h hooks | 252 | /* drm_dma.h hooks |
242 | */ | 253 | */ |
243 | void radeon_driver_irq_preinstall(struct drm_device * dev) | 254 | void radeon_driver_irq_preinstall(struct drm_device * dev) |
@@ -249,27 +260,20 @@ void radeon_driver_irq_preinstall(struct drm_device * dev) | |||
249 | RADEON_WRITE(RADEON_GEN_INT_CNTL, 0); | 260 | RADEON_WRITE(RADEON_GEN_INT_CNTL, 0); |
250 | 261 | ||
251 | /* Clear bits if they're already high */ | 262 | /* Clear bits if they're already high */ |
252 | radeon_acknowledge_irqs(dev_priv); | 263 | radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | |
264 | RADEON_CRTC_VBLANK_STAT | | ||
265 | RADEON_CRTC2_VBLANK_STAT)); | ||
253 | } | 266 | } |
254 | 267 | ||
255 | int radeon_driver_irq_postinstall(struct drm_device * dev) | 268 | void radeon_driver_irq_postinstall(struct drm_device * dev) |
256 | { | 269 | { |
257 | drm_radeon_private_t *dev_priv = | 270 | drm_radeon_private_t *dev_priv = |
258 | (drm_radeon_private_t *) dev->dev_private; | 271 | (drm_radeon_private_t *) dev->dev_private; |
259 | int ret; | ||
260 | 272 | ||
261 | atomic_set(&dev_priv->swi_emitted, 0); | 273 | atomic_set(&dev_priv->swi_emitted, 0); |
262 | DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); | 274 | DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); |
263 | 275 | ||
264 | ret = drm_vblank_init(dev, 2); | 276 | radeon_enable_interrupt(dev); |
265 | if (ret) | ||
266 | return ret; | ||
267 | |||
268 | dev->max_vblank_count = 0x001fffff; | ||
269 | |||
270 | radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); | ||
271 | |||
272 | return 0; | ||
273 | } | 277 | } |
274 | 278 | ||
275 | void radeon_driver_irq_uninstall(struct drm_device * dev) | 279 | void radeon_driver_irq_uninstall(struct drm_device * dev) |
@@ -311,5 +315,6 @@ int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value) | |||
311 | return -EINVAL; | 315 | return -EINVAL; |
312 | } | 316 | } |
313 | dev_priv->vblank_crtc = (unsigned int)value; | 317 | dev_priv->vblank_crtc = (unsigned int)value; |
318 | radeon_enable_interrupt(dev); | ||
314 | return 0; | 319 | return 0; |
315 | } | 320 | } |
diff --git a/drivers/char/drm/via_drv.c b/drivers/char/drm/via_drv.c index 37870a4a3dc7..80c01cdfa37d 100644 --- a/drivers/char/drm/via_drv.c +++ b/drivers/char/drm/via_drv.c | |||
@@ -40,13 +40,11 @@ static struct pci_device_id pciidlist[] = { | |||
40 | static struct drm_driver driver = { | 40 | static struct drm_driver driver = { |
41 | .driver_features = | 41 | .driver_features = |
42 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | | 42 | DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ | |
43 | DRIVER_IRQ_SHARED, | 43 | DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL, |
44 | .load = via_driver_load, | 44 | .load = via_driver_load, |
45 | .unload = via_driver_unload, | 45 | .unload = via_driver_unload, |
46 | .context_dtor = via_final_context, | 46 | .context_dtor = via_final_context, |
47 | .get_vblank_counter = via_get_vblank_counter, | 47 | .vblank_wait = via_driver_vblank_wait, |
48 | .enable_vblank = via_enable_vblank, | ||
49 | .disable_vblank = via_disable_vblank, | ||
50 | .irq_preinstall = via_driver_irq_preinstall, | 48 | .irq_preinstall = via_driver_irq_preinstall, |
51 | .irq_postinstall = via_driver_irq_postinstall, | 49 | .irq_postinstall = via_driver_irq_postinstall, |
52 | .irq_uninstall = via_driver_irq_uninstall, | 50 | .irq_uninstall = via_driver_irq_uninstall, |
diff --git a/drivers/char/drm/via_drv.h b/drivers/char/drm/via_drv.h index fe67030e39ac..2daae81874cd 100644 --- a/drivers/char/drm/via_drv.h +++ b/drivers/char/drm/via_drv.h | |||
@@ -75,7 +75,6 @@ typedef struct drm_via_private { | |||
75 | struct timeval last_vblank; | 75 | struct timeval last_vblank; |
76 | int last_vblank_valid; | 76 | int last_vblank_valid; |
77 | unsigned usec_per_vblank; | 77 | unsigned usec_per_vblank; |
78 | atomic_t vbl_received; | ||
79 | drm_via_state_t hc_state; | 78 | drm_via_state_t hc_state; |
80 | char pci_buf[VIA_PCI_BUF_SIZE]; | 79 | char pci_buf[VIA_PCI_BUF_SIZE]; |
81 | const uint32_t *fire_offsets[VIA_FIRE_BUF_SIZE]; | 80 | const uint32_t *fire_offsets[VIA_FIRE_BUF_SIZE]; |
@@ -131,13 +130,11 @@ extern int via_init_context(struct drm_device * dev, int context); | |||
131 | extern int via_final_context(struct drm_device * dev, int context); | 130 | extern int via_final_context(struct drm_device * dev, int context); |
132 | 131 | ||
133 | extern int via_do_cleanup_map(struct drm_device * dev); | 132 | extern int via_do_cleanup_map(struct drm_device * dev); |
134 | extern u32 via_get_vblank_counter(struct drm_device *dev, int crtc); | 133 | extern int via_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence); |
135 | extern int via_enable_vblank(struct drm_device *dev, int crtc); | ||
136 | extern void via_disable_vblank(struct drm_device *dev, int crtc); | ||
137 | 134 | ||
138 | extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS); | 135 | extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS); |
139 | extern void via_driver_irq_preinstall(struct drm_device * dev); | 136 | extern void via_driver_irq_preinstall(struct drm_device * dev); |
140 | extern int via_driver_irq_postinstall(struct drm_device * dev); | 137 | extern void via_driver_irq_postinstall(struct drm_device * dev); |
141 | extern void via_driver_irq_uninstall(struct drm_device * dev); | 138 | extern void via_driver_irq_uninstall(struct drm_device * dev); |
142 | 139 | ||
143 | extern int via_dma_cleanup(struct drm_device * dev); | 140 | extern int via_dma_cleanup(struct drm_device * dev); |
diff --git a/drivers/char/drm/via_irq.c b/drivers/char/drm/via_irq.c index f1ab6fc7c07e..c6bb978a1106 100644 --- a/drivers/char/drm/via_irq.c +++ b/drivers/char/drm/via_irq.c | |||
@@ -92,17 +92,8 @@ static int via_irqmap_unichrome[] = {-1, -1, -1, 0, -1, 1}; | |||
92 | static unsigned time_diff(struct timeval *now, struct timeval *then) | 92 | static unsigned time_diff(struct timeval *now, struct timeval *then) |
93 | { | 93 | { |
94 | return (now->tv_usec >= then->tv_usec) ? | 94 | return (now->tv_usec >= then->tv_usec) ? |
95 | now->tv_usec - then->tv_usec : | 95 | now->tv_usec - then->tv_usec : |
96 | 1000000 - (then->tv_usec - now->tv_usec); | 96 | 1000000 - (then->tv_usec - now->tv_usec); |
97 | } | ||
98 | |||
99 | u32 via_get_vblank_counter(struct drm_device *dev, int crtc) | ||
100 | { | ||
101 | drm_via_private_t *dev_priv = dev->dev_private; | ||
102 | if (crtc != 0) | ||
103 | return 0; | ||
104 | |||
105 | return atomic_read(&dev_priv->vbl_received); | ||
106 | } | 97 | } |
107 | 98 | ||
108 | irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS) | 99 | irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS) |
@@ -117,8 +108,8 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS) | |||
117 | 108 | ||
118 | status = VIA_READ(VIA_REG_INTERRUPT); | 109 | status = VIA_READ(VIA_REG_INTERRUPT); |
119 | if (status & VIA_IRQ_VBLANK_PENDING) { | 110 | if (status & VIA_IRQ_VBLANK_PENDING) { |
120 | atomic_inc(&dev_priv->vbl_received); | 111 | atomic_inc(&dev->vbl_received); |
121 | if (!(atomic_read(&dev_priv->vbl_received) & 0x0F)) { | 112 | if (!(atomic_read(&dev->vbl_received) & 0x0F)) { |
122 | do_gettimeofday(&cur_vblank); | 113 | do_gettimeofday(&cur_vblank); |
123 | if (dev_priv->last_vblank_valid) { | 114 | if (dev_priv->last_vblank_valid) { |
124 | dev_priv->usec_per_vblank = | 115 | dev_priv->usec_per_vblank = |
@@ -128,11 +119,12 @@ irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS) | |||
128 | dev_priv->last_vblank = cur_vblank; | 119 | dev_priv->last_vblank = cur_vblank; |
129 | dev_priv->last_vblank_valid = 1; | 120 | dev_priv->last_vblank_valid = 1; |
130 | } | 121 | } |
131 | if (!(atomic_read(&dev_priv->vbl_received) & 0xFF)) { | 122 | if (!(atomic_read(&dev->vbl_received) & 0xFF)) { |
132 | DRM_DEBUG("US per vblank is: %u\n", | 123 | DRM_DEBUG("US per vblank is: %u\n", |
133 | dev_priv->usec_per_vblank); | 124 | dev_priv->usec_per_vblank); |
134 | } | 125 | } |
135 | drm_handle_vblank(dev, 0); | 126 | DRM_WAKEUP(&dev->vbl_queue); |
127 | drm_vbl_send_signals(dev); | ||
136 | handled = 1; | 128 | handled = 1; |
137 | } | 129 | } |
138 | 130 | ||
@@ -171,34 +163,31 @@ static __inline__ void viadrv_acknowledge_irqs(drm_via_private_t * dev_priv) | |||
171 | } | 163 | } |
172 | } | 164 | } |
173 | 165 | ||
174 | int via_enable_vblank(struct drm_device *dev, int crtc) | 166 | int via_driver_vblank_wait(struct drm_device * dev, unsigned int *sequence) |
175 | { | 167 | { |
176 | drm_via_private_t *dev_priv = dev->dev_private; | 168 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; |
177 | u32 status; | 169 | unsigned int cur_vblank; |
170 | int ret = 0; | ||
178 | 171 | ||
179 | if (crtc != 0) { | 172 | DRM_DEBUG("\n"); |
180 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); | 173 | if (!dev_priv) { |
174 | DRM_ERROR("called with no initialization\n"); | ||
181 | return -EINVAL; | 175 | return -EINVAL; |
182 | } | 176 | } |
183 | 177 | ||
184 | status = VIA_READ(VIA_REG_INTERRUPT); | 178 | viadrv_acknowledge_irqs(dev_priv); |
185 | VIA_WRITE(VIA_REG_INTERRUPT, status & VIA_IRQ_VBLANK_ENABLE); | ||
186 | 179 | ||
187 | VIA_WRITE8(0x83d4, 0x11); | 180 | /* Assume that the user has missed the current sequence number |
188 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30); | 181 | * by about a day rather than she wants to wait for years |
182 | * using vertical blanks... | ||
183 | */ | ||
189 | 184 | ||
190 | return 0; | 185 | DRM_WAIT_ON(ret, dev->vbl_queue, 3 * DRM_HZ, |
191 | } | 186 | (((cur_vblank = atomic_read(&dev->vbl_received)) - |
187 | *sequence) <= (1 << 23))); | ||
192 | 188 | ||
193 | void via_disable_vblank(struct drm_device *dev, int crtc) | 189 | *sequence = cur_vblank; |
194 | { | 190 | return ret; |
195 | drm_via_private_t *dev_priv = dev->dev_private; | ||
196 | |||
197 | VIA_WRITE8(0x83d4, 0x11); | ||
198 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30); | ||
199 | |||
200 | if (crtc != 0) | ||
201 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); | ||
202 | } | 191 | } |
203 | 192 | ||
204 | static int | 193 | static int |
@@ -303,25 +292,23 @@ void via_driver_irq_preinstall(struct drm_device * dev) | |||
303 | } | 292 | } |
304 | } | 293 | } |
305 | 294 | ||
306 | int via_driver_irq_postinstall(struct drm_device * dev) | 295 | void via_driver_irq_postinstall(struct drm_device * dev) |
307 | { | 296 | { |
308 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; | 297 | drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; |
309 | u32 status; | 298 | u32 status; |
310 | 299 | ||
311 | DRM_DEBUG("via_driver_irq_postinstall\n"); | 300 | DRM_DEBUG("\n"); |
312 | if (!dev_priv) | 301 | if (dev_priv) { |
313 | return -EINVAL; | 302 | status = VIA_READ(VIA_REG_INTERRUPT); |
303 | VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL | ||
304 | | dev_priv->irq_enable_mask); | ||
314 | 305 | ||
315 | drm_vblank_init(dev, 1); | 306 | /* Some magic, oh for some data sheets ! */ |
316 | status = VIA_READ(VIA_REG_INTERRUPT); | ||
317 | VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL | ||
318 | | dev_priv->irq_enable_mask); | ||
319 | 307 | ||
320 | /* Some magic, oh for some data sheets ! */ | 308 | VIA_WRITE8(0x83d4, 0x11); |
321 | VIA_WRITE8(0x83d4, 0x11); | 309 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30); |
322 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30); | ||
323 | 310 | ||
324 | return 0; | 311 | } |
325 | } | 312 | } |
326 | 313 | ||
327 | void via_driver_irq_uninstall(struct drm_device * dev) | 314 | void via_driver_irq_uninstall(struct drm_device * dev) |
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c index 2398e864c28d..a00869c650d5 100644 --- a/drivers/char/generic_nvram.c +++ b/drivers/char/generic_nvram.c | |||
@@ -133,7 +133,7 @@ static struct miscdevice nvram_dev = { | |||
133 | 133 | ||
134 | int __init nvram_init(void) | 134 | int __init nvram_init(void) |
135 | { | 135 | { |
136 | printk(KERN_INFO "Macintosh non-volatile memory driver v%s\n", | 136 | printk(KERN_INFO "Generic non-volatile memory driver v%s\n", |
137 | NVRAM_VERSION); | 137 | NVRAM_VERSION); |
138 | return misc_register(&nvram_dev); | 138 | return misc_register(&nvram_dev); |
139 | } | 139 | } |
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 8d6c2089d2a8..efd0b4db7c8e 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -112,3 +112,12 @@ config HW_RANDOM_PASEMI | |||
112 | 112 | ||
113 | If unsure, say Y. | 113 | If unsure, say Y. |
114 | 114 | ||
115 | config HW_RANDOM_VIRTIO | ||
116 | tristate "VirtIO Random Number Generator support" | ||
117 | depends on HW_RANDOM && VIRTIO | ||
118 | ---help--- | ||
119 | This driver provides kernel-side support for the virtual Random Number | ||
120 | Generator hardware. | ||
121 | |||
122 | To compile this driver as a module, choose M here: the | ||
123 | module will be called virtio-rng. If unsure, say N. | ||
diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index c8b7300e2fb1..b4940ddbb35f 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile | |||
@@ -11,3 +11,4 @@ obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o | |||
11 | obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o | 11 | obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o |
12 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o | 12 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o |
13 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o | 13 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o |
14 | obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o | ||
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c index 5cc651ef75eb..27fdc0866496 100644 --- a/drivers/char/hw_random/intel-rng.c +++ b/drivers/char/hw_random/intel-rng.c | |||
@@ -273,7 +273,7 @@ static int __init intel_rng_hw_init(void *_intel_rng_hw) | |||
273 | if (mfc != INTEL_FWH_MANUFACTURER_CODE || | 273 | if (mfc != INTEL_FWH_MANUFACTURER_CODE || |
274 | (dvc != INTEL_FWH_DEVICE_CODE_8M && | 274 | (dvc != INTEL_FWH_DEVICE_CODE_8M && |
275 | dvc != INTEL_FWH_DEVICE_CODE_4M)) { | 275 | dvc != INTEL_FWH_DEVICE_CODE_4M)) { |
276 | printk(KERN_ERR PFX "FWH not detected\n"); | 276 | printk(KERN_NOTICE PFX "FWH not detected\n"); |
277 | return -ENODEV; | 277 | return -ENODEV; |
278 | } | 278 | } |
279 | 279 | ||
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c new file mode 100644 index 000000000000..d0e563e4fc39 --- /dev/null +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * Randomness driver for virtio | ||
3 | * Copyright (C) 2007, 2008 Rusty Russell IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/err.h> | ||
20 | #include <linux/hw_random.h> | ||
21 | #include <linux/scatterlist.h> | ||
22 | #include <linux/spinlock.h> | ||
23 | #include <linux/virtio.h> | ||
24 | #include <linux/virtio_rng.h> | ||
25 | |||
26 | /* The host will fill any buffer we give it with sweet, sweet randomness. We | ||
27 | * give it 64 bytes at a time, and the hwrng framework takes it 4 bytes at a | ||
28 | * time. */ | ||
29 | #define RANDOM_DATA_SIZE 64 | ||
30 | |||
31 | static struct virtqueue *vq; | ||
32 | static u32 *random_data; | ||
33 | static unsigned int data_left; | ||
34 | static DECLARE_COMPLETION(have_data); | ||
35 | |||
36 | static void random_recv_done(struct virtqueue *vq) | ||
37 | { | ||
38 | int len; | ||
39 | |||
40 | /* We never get spurious callbacks. */ | ||
41 | if (!vq->vq_ops->get_buf(vq, &len)) | ||
42 | BUG(); | ||
43 | |||
44 | data_left = len / sizeof(random_data[0]); | ||
45 | complete(&have_data); | ||
46 | } | ||
47 | |||
48 | static void register_buffer(void) | ||
49 | { | ||
50 | struct scatterlist sg; | ||
51 | |||
52 | sg_init_one(&sg, random_data, RANDOM_DATA_SIZE); | ||
53 | /* There should always be room for one buffer. */ | ||
54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0) | ||
55 | BUG(); | ||
56 | vq->vq_ops->kick(vq); | ||
57 | } | ||
58 | |||
59 | /* At least we don't udelay() in a loop like some other drivers. */ | ||
60 | static int virtio_data_present(struct hwrng *rng, int wait) | ||
61 | { | ||
62 | if (data_left) | ||
63 | return 1; | ||
64 | |||
65 | if (!wait) | ||
66 | return 0; | ||
67 | |||
68 | wait_for_completion(&have_data); | ||
69 | return 1; | ||
70 | } | ||
71 | |||
72 | /* virtio_data_present() must have succeeded before this is called. */ | ||
73 | static int virtio_data_read(struct hwrng *rng, u32 *data) | ||
74 | { | ||
75 | BUG_ON(!data_left); | ||
76 | |||
77 | *data = random_data[--data_left]; | ||
78 | |||
79 | if (!data_left) { | ||
80 | init_completion(&have_data); | ||
81 | register_buffer(); | ||
82 | } | ||
83 | return sizeof(*data); | ||
84 | } | ||
85 | |||
86 | static struct hwrng virtio_hwrng = { | ||
87 | .name = "virtio", | ||
88 | .data_present = virtio_data_present, | ||
89 | .data_read = virtio_data_read, | ||
90 | }; | ||
91 | |||
92 | static int virtrng_probe(struct virtio_device *vdev) | ||
93 | { | ||
94 | int err; | ||
95 | |||
96 | /* We expect a single virtqueue. */ | ||
97 | vq = vdev->config->find_vq(vdev, 0, random_recv_done); | ||
98 | if (IS_ERR(vq)) | ||
99 | return PTR_ERR(vq); | ||
100 | |||
101 | err = hwrng_register(&virtio_hwrng); | ||
102 | if (err) { | ||
103 | vdev->config->del_vq(vq); | ||
104 | return err; | ||
105 | } | ||
106 | |||
107 | register_buffer(); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static void virtrng_remove(struct virtio_device *vdev) | ||
112 | { | ||
113 | vdev->config->reset(vdev); | ||
114 | hwrng_unregister(&virtio_hwrng); | ||
115 | vdev->config->del_vq(vq); | ||
116 | } | ||
117 | |||
118 | static struct virtio_device_id id_table[] = { | ||
119 | { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, | ||
120 | { 0 }, | ||
121 | }; | ||
122 | |||
123 | static struct virtio_driver virtio_rng = { | ||
124 | .driver.name = KBUILD_MODNAME, | ||
125 | .driver.owner = THIS_MODULE, | ||
126 | .id_table = id_table, | ||
127 | .probe = virtrng_probe, | ||
128 | .remove = __devexit_p(virtrng_remove), | ||
129 | }; | ||
130 | |||
131 | static int __init init(void) | ||
132 | { | ||
133 | int err; | ||
134 | |||
135 | random_data = kmalloc(RANDOM_DATA_SIZE, GFP_KERNEL); | ||
136 | if (!random_data) | ||
137 | return -ENOMEM; | ||
138 | |||
139 | err = register_virtio_driver(&virtio_rng); | ||
140 | if (err) | ||
141 | kfree(random_data); | ||
142 | return err; | ||
143 | } | ||
144 | |||
145 | static void __exit fini(void) | ||
146 | { | ||
147 | kfree(random_data); | ||
148 | unregister_virtio_driver(&virtio_rng); | ||
149 | } | ||
150 | module_init(init); | ||
151 | module_exit(fini); | ||
152 | |||
153 | MODULE_DEVICE_TABLE(virtio, id_table); | ||
154 | MODULE_DESCRIPTION("Virtio random number driver"); | ||
155 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/char/ip2/Makefile b/drivers/char/ip2/Makefile index 6bfe2543ddc2..939618f62fe1 100644 --- a/drivers/char/ip2/Makefile +++ b/drivers/char/ip2/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Computone IntelliPort Plus Driver | 2 | # Makefile for the Computone IntelliPort Plus Driver |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o | 5 | obj-$(CONFIG_COMPUTONE) += ip2.o |
6 | 6 | ||
7 | ip2-objs := ip2base.o | 7 | ip2-objs := ip2base.o ip2main.o |
8 | 8 | ||
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 70957acaa960..c12cf8fc4be0 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -346,27 +346,6 @@ have_requested_irq( char irq ) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | /******************************************************************************/ | 348 | /******************************************************************************/ |
349 | /* Function: init_module() */ | ||
350 | /* Parameters: None */ | ||
351 | /* Returns: Success (0) */ | ||
352 | /* */ | ||
353 | /* Description: */ | ||
354 | /* This is a required entry point for an installable module. It simply calls */ | ||
355 | /* the driver initialisation function and returns what it returns. */ | ||
356 | /******************************************************************************/ | ||
357 | #ifdef MODULE | ||
358 | static int __init | ||
359 | ip2_init_module(void) | ||
360 | { | ||
361 | #ifdef IP2DEBUG_INIT | ||
362 | printk (KERN_DEBUG "Loading module ...\n" ); | ||
363 | #endif | ||
364 | return 0; | ||
365 | } | ||
366 | module_init(ip2_init_module); | ||
367 | #endif /* MODULE */ | ||
368 | |||
369 | /******************************************************************************/ | ||
370 | /* Function: cleanup_module() */ | 349 | /* Function: cleanup_module() */ |
371 | /* Parameters: None */ | 350 | /* Parameters: None */ |
372 | /* Returns: Nothing */ | 351 | /* Returns: Nothing */ |
@@ -779,8 +758,6 @@ out: | |||
779 | return err; | 758 | return err; |
780 | } | 759 | } |
781 | 760 | ||
782 | EXPORT_SYMBOL(ip2_loadmain); | ||
783 | |||
784 | /******************************************************************************/ | 761 | /******************************************************************************/ |
785 | /* Function: ip2_init_board() */ | 762 | /* Function: ip2_init_board() */ |
786 | /* Parameters: Index of board in configuration structure */ | 763 | /* Parameters: Index of board in configuration structure */ |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 7f7e798c1384..d9a0a53c842d 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -677,12 +677,7 @@ static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag) | |||
677 | 677 | ||
678 | static void k_self(struct vc_data *vc, unsigned char value, char up_flag) | 678 | static void k_self(struct vc_data *vc, unsigned char value, char up_flag) |
679 | { | 679 | { |
680 | unsigned int uni; | 680 | k_unicode(vc, conv_8bit_to_uni(value), up_flag); |
681 | if (kbd->kbdmode == VC_UNICODE) | ||
682 | uni = value; | ||
683 | else | ||
684 | uni = conv_8bit_to_uni(value); | ||
685 | k_unicode(vc, uni, up_flag); | ||
686 | } | 681 | } |
687 | 682 | ||
688 | static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) | 683 | static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) |
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c index fa9d3c945f31..ba6340ae98af 100644 --- a/drivers/char/pcmcia/ipwireless/hardware.c +++ b/drivers/char/pcmcia/ipwireless/hardware.c | |||
@@ -251,10 +251,11 @@ struct ipw_hardware { | |||
251 | int init_loops; | 251 | int init_loops; |
252 | struct timer_list setup_timer; | 252 | struct timer_list setup_timer; |
253 | 253 | ||
254 | /* Flag if hw is ready to send next packet */ | ||
254 | int tx_ready; | 255 | int tx_ready; |
255 | struct list_head tx_queue[NL_NUM_OF_PRIORITIES]; | 256 | /* Count of pending packets to be sent */ |
256 | /* True if any packets are queued for transmission */ | ||
257 | int tx_queued; | 257 | int tx_queued; |
258 | struct list_head tx_queue[NL_NUM_OF_PRIORITIES]; | ||
258 | 259 | ||
259 | int rx_bytes_queued; | 260 | int rx_bytes_queued; |
260 | struct list_head rx_queue; | 261 | struct list_head rx_queue; |
@@ -404,6 +405,8 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data, | |||
404 | 405 | ||
405 | spin_lock_irqsave(&hw->spinlock, flags); | 406 | spin_lock_irqsave(&hw->spinlock, flags); |
406 | 407 | ||
408 | hw->tx_ready = 0; | ||
409 | |||
407 | if (hw->hw_version == HW_VERSION_1) { | 410 | if (hw->hw_version == HW_VERSION_1) { |
408 | outw((unsigned short) length, hw->base_port + IODWR); | 411 | outw((unsigned short) length, hw->base_port + IODWR); |
409 | 412 | ||
@@ -492,6 +495,7 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) | |||
492 | 495 | ||
493 | spin_lock_irqsave(&hw->spinlock, flags); | 496 | spin_lock_irqsave(&hw->spinlock, flags); |
494 | list_add(&packet->queue, &hw->tx_queue[0]); | 497 | list_add(&packet->queue, &hw->tx_queue[0]); |
498 | hw->tx_queued++; | ||
495 | spin_unlock_irqrestore(&hw->spinlock, flags); | 499 | spin_unlock_irqrestore(&hw->spinlock, flags); |
496 | } else { | 500 | } else { |
497 | if (packet->packet_callback) | 501 | if (packet->packet_callback) |
@@ -949,12 +953,10 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit) | |||
949 | unsigned long flags; | 953 | unsigned long flags; |
950 | 954 | ||
951 | spin_lock_irqsave(&hw->spinlock, flags); | 955 | spin_lock_irqsave(&hw->spinlock, flags); |
952 | if (hw->tx_queued && hw->tx_ready != 0) { | 956 | if (hw->tx_queued && hw->tx_ready) { |
953 | int priority; | 957 | int priority; |
954 | struct ipw_tx_packet *packet = NULL; | 958 | struct ipw_tx_packet *packet = NULL; |
955 | 959 | ||
956 | hw->tx_ready--; | ||
957 | |||
958 | /* Pick a packet */ | 960 | /* Pick a packet */ |
959 | for (priority = 0; priority < priority_limit; priority++) { | 961 | for (priority = 0; priority < priority_limit; priority++) { |
960 | if (!list_empty(&hw->tx_queue[priority])) { | 962 | if (!list_empty(&hw->tx_queue[priority])) { |
@@ -963,6 +965,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit) | |||
963 | struct ipw_tx_packet, | 965 | struct ipw_tx_packet, |
964 | queue); | 966 | queue); |
965 | 967 | ||
968 | hw->tx_queued--; | ||
966 | list_del(&packet->queue); | 969 | list_del(&packet->queue); |
967 | 970 | ||
968 | break; | 971 | break; |
@@ -973,6 +976,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit) | |||
973 | spin_unlock_irqrestore(&hw->spinlock, flags); | 976 | spin_unlock_irqrestore(&hw->spinlock, flags); |
974 | return 0; | 977 | return 0; |
975 | } | 978 | } |
979 | |||
976 | spin_unlock_irqrestore(&hw->spinlock, flags); | 980 | spin_unlock_irqrestore(&hw->spinlock, flags); |
977 | 981 | ||
978 | /* Send */ | 982 | /* Send */ |
@@ -1063,7 +1067,7 @@ static irqreturn_t ipwireless_handle_v1_interrupt(int irq, | |||
1063 | if (irqn & IR_TXINTR) { | 1067 | if (irqn & IR_TXINTR) { |
1064 | ack |= IR_TXINTR; | 1068 | ack |= IR_TXINTR; |
1065 | spin_lock_irqsave(&hw->spinlock, flags); | 1069 | spin_lock_irqsave(&hw->spinlock, flags); |
1066 | hw->tx_ready++; | 1070 | hw->tx_ready = 1; |
1067 | spin_unlock_irqrestore(&hw->spinlock, flags); | 1071 | spin_unlock_irqrestore(&hw->spinlock, flags); |
1068 | } | 1072 | } |
1069 | /* Received data */ | 1073 | /* Received data */ |
@@ -1170,7 +1174,7 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq, | |||
1170 | if (memrxdone & MEMRX_RX_DONE) { | 1174 | if (memrxdone & MEMRX_RX_DONE) { |
1171 | writew(0, &hw->memory_info_regs->memreg_rx_done); | 1175 | writew(0, &hw->memory_info_regs->memreg_rx_done); |
1172 | spin_lock_irqsave(&hw->spinlock, flags); | 1176 | spin_lock_irqsave(&hw->spinlock, flags); |
1173 | hw->tx_ready++; | 1177 | hw->tx_ready = 1; |
1174 | spin_unlock_irqrestore(&hw->spinlock, flags); | 1178 | spin_unlock_irqrestore(&hw->spinlock, flags); |
1175 | tx = 1; | 1179 | tx = 1; |
1176 | } | 1180 | } |
@@ -1234,7 +1238,7 @@ static void send_packet(struct ipw_hardware *hw, int priority, | |||
1234 | 1238 | ||
1235 | spin_lock_irqsave(&hw->spinlock, flags); | 1239 | spin_lock_irqsave(&hw->spinlock, flags); |
1236 | list_add_tail(&packet->queue, &hw->tx_queue[priority]); | 1240 | list_add_tail(&packet->queue, &hw->tx_queue[priority]); |
1237 | hw->tx_queued = 1; | 1241 | hw->tx_queued++; |
1238 | spin_unlock_irqrestore(&hw->spinlock, flags); | 1242 | spin_unlock_irqrestore(&hw->spinlock, flags); |
1239 | 1243 | ||
1240 | flush_packets_to_hw(hw); | 1244 | flush_packets_to_hw(hw); |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 9e9bad8bdcf4..dbce1263bdff 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -402,6 +402,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
402 | &sysrq_showstate_blocked_op, /* w */ | 402 | &sysrq_showstate_blocked_op, /* w */ |
403 | /* x: May be registered on ppc/powerpc for xmon */ | 403 | /* x: May be registered on ppc/powerpc for xmon */ |
404 | NULL, /* x */ | 404 | NULL, /* x */ |
405 | /* y: May be registered on sparc64 for global register dump */ | ||
405 | NULL, /* y */ | 406 | NULL, /* y */ |
406 | NULL /* z */ | 407 | NULL /* z */ |
407 | }; | 408 | }; |
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 3d3e1c2b310f..65fb848e1cce 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | 7 | * Authors: Dave Boutcher <boutcher@us.ibm.com> |
8 | * Ryan Arnold <ryanarn@us.ibm.com> | 8 | * Ryan Arnold <ryanarn@us.ibm.com> |
9 | * Colin Devilbiss <devilbis@us.ibm.com> | 9 | * Colin Devilbiss <devilbis@us.ibm.com> |
10 | * Stephen Rothwell <sfr@au1.ibm.com> | 10 | * Stephen Rothwell |
11 | * | 11 | * |
12 | * (C) Copyright 2000, 2001, 2002, 2003, 2004 IBM Corporation | 12 | * (C) Copyright 2000, 2001, 2002, 2003, 2004 IBM Corporation |
13 | * | 13 | * |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 58aad63831f4..c39ddaff5e8f 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | 6 | * Authors: Dave Boutcher <boutcher@us.ibm.com> |
7 | * Ryan Arnold <ryanarn@us.ibm.com> | 7 | * Ryan Arnold <ryanarn@us.ibm.com> |
8 | * Colin Devilbiss <devilbis@us.ibm.com> | 8 | * Colin Devilbiss <devilbis@us.ibm.com> |
9 | * Stephen Rothwell <sfr@au1.ibm.com> | 9 | * Stephen Rothwell |
10 | * | 10 | * |
11 | * (C) Copyright 2000-2004 IBM Corporation | 11 | * (C) Copyright 2000-2004 IBM Corporation |
12 | * | 12 | * |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index fa1ffbf2c621..935f1c207a1f 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -434,7 +434,7 @@ static void update_attr(struct vc_data *vc) | |||
434 | vc->vc_blink, vc->vc_underline, | 434 | vc->vc_blink, vc->vc_underline, |
435 | vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); | 435 | vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); |
436 | vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; | 436 | vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; |
437 | vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, false, false) << 8) | ' '; | 437 | vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' '; |
438 | } | 438 | } |
439 | 439 | ||
440 | /* Note: inverting the screen twice should revert to the original state */ | 440 | /* Note: inverting the screen twice should revert to the original state */ |
@@ -909,7 +909,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
909 | 909 | ||
910 | if (vc->vc_tty) { | 910 | if (vc->vc_tty) { |
911 | struct winsize ws, *cws = &vc->vc_tty->winsize; | 911 | struct winsize ws, *cws = &vc->vc_tty->winsize; |
912 | unsigned long flags; | 912 | struct pid *pgrp = NULL; |
913 | 913 | ||
914 | memset(&ws, 0, sizeof(ws)); | 914 | memset(&ws, 0, sizeof(ws)); |
915 | ws.ws_row = vc->vc_rows; | 915 | ws.ws_row = vc->vc_rows; |
@@ -917,11 +917,14 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
917 | ws.ws_ypixel = vc->vc_scan_lines; | 917 | ws.ws_ypixel = vc->vc_scan_lines; |
918 | 918 | ||
919 | mutex_lock(&vc->vc_tty->termios_mutex); | 919 | mutex_lock(&vc->vc_tty->termios_mutex); |
920 | spin_lock_irqsave(&vc->vc_tty->ctrl_lock, flags); | 920 | spin_lock_irq(&vc->vc_tty->ctrl_lock); |
921 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) && | 921 | if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col)) |
922 | vc->vc_tty->pgrp) | 922 | pgrp = get_pid(vc->vc_tty->pgrp); |
923 | spin_unlock_irq(&vc->vc_tty->ctrl_lock); | ||
924 | if (pgrp) { | ||
923 | kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); | 925 | kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); |
924 | spin_unlock_irqrestore(&vc->vc_tty->ctrl_lock, flags); | 926 | put_pid(pgrp); |
927 | } | ||
925 | *cws = ws; | 928 | *cws = ws; |
926 | mutex_unlock(&vc->vc_tty->termios_mutex); | 929 | mutex_unlock(&vc->vc_tty->termios_mutex); |
927 | } | 930 | } |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7fce038fa57e..1d41496ed2f8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -412,7 +412,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy, | |||
412 | int ret; | 412 | int ret; |
413 | 413 | ||
414 | mutex_unlock(&cpufreq_governor_mutex); | 414 | mutex_unlock(&cpufreq_governor_mutex); |
415 | ret = request_module(name); | 415 | ret = request_module("%s", name); |
416 | mutex_lock(&cpufreq_governor_mutex); | 416 | mutex_lock(&cpufreq_governor_mutex); |
417 | 417 | ||
418 | if (ret == 0) | 418 | if (ret == 0) |
@@ -625,7 +625,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy, | |||
625 | unsigned int freq = 0; | 625 | unsigned int freq = 0; |
626 | unsigned int ret; | 626 | unsigned int ret; |
627 | 627 | ||
628 | if (!policy->governor->store_setspeed) | 628 | if (!policy->governor || !policy->governor->store_setspeed) |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | 630 | ||
631 | ret = sscanf(buf, "%u", &freq); | 631 | ret = sscanf(buf, "%u", &freq); |
@@ -639,7 +639,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy, | |||
639 | 639 | ||
640 | static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) | 640 | static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) |
641 | { | 641 | { |
642 | if (!policy->governor->show_setspeed) | 642 | if (!policy->governor || !policy->governor->show_setspeed) |
643 | return sprintf(buf, "<unsupported>\n"); | 643 | return sprintf(buf, "<unsupported>\n"); |
644 | 644 | ||
645 | return policy->governor->show_setspeed(policy, buf); | 645 | return policy->governor->show_setspeed(policy, buf); |
@@ -928,13 +928,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
928 | policy->user_policy.policy = policy->policy; | 928 | policy->user_policy.policy = policy->policy; |
929 | policy->user_policy.governor = policy->governor; | 929 | policy->user_policy.governor = policy->governor; |
930 | 930 | ||
931 | unlock_policy_rwsem_write(cpu); | ||
932 | |||
933 | if (ret) { | 931 | if (ret) { |
934 | dprintk("setting policy failed\n"); | 932 | dprintk("setting policy failed\n"); |
935 | goto err_out_unregister; | 933 | goto err_out_unregister; |
936 | } | 934 | } |
937 | 935 | ||
936 | unlock_policy_rwsem_write(cpu); | ||
937 | |||
938 | kobject_uevent(&policy->kobj, KOBJ_ADD); | 938 | kobject_uevent(&policy->kobj, KOBJ_ADD); |
939 | module_put(cpufreq_driver->owner); | 939 | module_put(cpufreq_driver->owner); |
940 | dprintk("initialization complete\n"); | 940 | dprintk("initialization complete\n"); |
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index ae6cd60d5c14..b64c6bc445e3 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c | |||
@@ -2,6 +2,11 @@ | |||
2 | * linux/drivers/cpufreq/freq_table.c | 2 | * linux/drivers/cpufreq/freq_table.c |
3 | * | 3 | * |
4 | * Copyright (C) 2002 - 2003 Dominik Brodowski | 4 | * Copyright (C) 2002 - 2003 Dominik Brodowski |
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
5 | */ | 10 | */ |
6 | 11 | ||
7 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index fc555a90bb21..23554b676d6e 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -38,6 +38,8 @@ static void cpuidle_kick_cpus(void) | |||
38 | static void cpuidle_kick_cpus(void) {} | 38 | static void cpuidle_kick_cpus(void) {} |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | static int __cpuidle_register_device(struct cpuidle_device *dev); | ||
42 | |||
41 | /** | 43 | /** |
42 | * cpuidle_idle_call - the main idle loop | 44 | * cpuidle_idle_call - the main idle loop |
43 | * | 45 | * |
@@ -138,6 +140,12 @@ int cpuidle_enable_device(struct cpuidle_device *dev) | |||
138 | if (!dev->state_count) | 140 | if (!dev->state_count) |
139 | return -EINVAL; | 141 | return -EINVAL; |
140 | 142 | ||
143 | if (dev->registered == 0) { | ||
144 | ret = __cpuidle_register_device(dev); | ||
145 | if (ret) | ||
146 | return ret; | ||
147 | } | ||
148 | |||
141 | if ((ret = cpuidle_add_state_sysfs(dev))) | 149 | if ((ret = cpuidle_add_state_sysfs(dev))) |
142 | return ret; | 150 | return ret; |
143 | 151 | ||
@@ -232,10 +240,13 @@ static void poll_idle_init(struct cpuidle_device *dev) {} | |||
232 | #endif /* CONFIG_ARCH_HAS_CPU_RELAX */ | 240 | #endif /* CONFIG_ARCH_HAS_CPU_RELAX */ |
233 | 241 | ||
234 | /** | 242 | /** |
235 | * cpuidle_register_device - registers a CPU's idle PM feature | 243 | * __cpuidle_register_device - internal register function called before register |
244 | * and enable routines | ||
236 | * @dev: the cpu | 245 | * @dev: the cpu |
246 | * | ||
247 | * cpuidle_lock mutex must be held before this is called | ||
237 | */ | 248 | */ |
238 | int cpuidle_register_device(struct cpuidle_device *dev) | 249 | static int __cpuidle_register_device(struct cpuidle_device *dev) |
239 | { | 250 | { |
240 | int ret; | 251 | int ret; |
241 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); | 252 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); |
@@ -247,18 +258,34 @@ int cpuidle_register_device(struct cpuidle_device *dev) | |||
247 | 258 | ||
248 | init_completion(&dev->kobj_unregister); | 259 | init_completion(&dev->kobj_unregister); |
249 | 260 | ||
250 | mutex_lock(&cpuidle_lock); | ||
251 | |||
252 | poll_idle_init(dev); | 261 | poll_idle_init(dev); |
253 | 262 | ||
254 | per_cpu(cpuidle_devices, dev->cpu) = dev; | 263 | per_cpu(cpuidle_devices, dev->cpu) = dev; |
255 | list_add(&dev->device_list, &cpuidle_detected_devices); | 264 | list_add(&dev->device_list, &cpuidle_detected_devices); |
256 | if ((ret = cpuidle_add_sysfs(sys_dev))) { | 265 | if ((ret = cpuidle_add_sysfs(sys_dev))) { |
257 | mutex_unlock(&cpuidle_lock); | ||
258 | module_put(cpuidle_curr_driver->owner); | 266 | module_put(cpuidle_curr_driver->owner); |
259 | return ret; | 267 | return ret; |
260 | } | 268 | } |
261 | 269 | ||
270 | dev->registered = 1; | ||
271 | return 0; | ||
272 | } | ||
273 | |||
274 | /** | ||
275 | * cpuidle_register_device - registers a CPU's idle PM feature | ||
276 | * @dev: the cpu | ||
277 | */ | ||
278 | int cpuidle_register_device(struct cpuidle_device *dev) | ||
279 | { | ||
280 | int ret; | ||
281 | |||
282 | mutex_lock(&cpuidle_lock); | ||
283 | |||
284 | if ((ret = __cpuidle_register_device(dev))) { | ||
285 | mutex_unlock(&cpuidle_lock); | ||
286 | return ret; | ||
287 | } | ||
288 | |||
262 | cpuidle_enable_device(dev); | 289 | cpuidle_enable_device(dev); |
263 | cpuidle_install_idle_handler(); | 290 | cpuidle_install_idle_handler(); |
264 | 291 | ||
@@ -278,6 +305,9 @@ void cpuidle_unregister_device(struct cpuidle_device *dev) | |||
278 | { | 305 | { |
279 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); | 306 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); |
280 | 307 | ||
308 | if (dev->registered == 0) | ||
309 | return; | ||
310 | |||
281 | cpuidle_pause_and_lock(); | 311 | cpuidle_pause_and_lock(); |
282 | 312 | ||
283 | cpuidle_disable_device(dev); | 313 | cpuidle_disable_device(dev); |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 762b729672e0..0ec0f431e6a1 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -821,10 +821,10 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device) | |||
821 | 821 | ||
822 | dev_dbg(device->common.dev, "%s\n", __func__); | 822 | dev_dbg(device->common.dev, "%s\n", __func__); |
823 | 823 | ||
824 | src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); | 824 | src = kmalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL); |
825 | if (!src) | 825 | if (!src) |
826 | return -ENOMEM; | 826 | return -ENOMEM; |
827 | dest = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); | 827 | dest = kzalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL); |
828 | if (!dest) { | 828 | if (!dest) { |
829 | kfree(src); | 829 | kfree(src); |
830 | return -ENOMEM; | 830 | return -ENOMEM; |
@@ -834,8 +834,6 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device) | |||
834 | for (i = 0; i < IOP_ADMA_TEST_SIZE; i++) | 834 | for (i = 0; i < IOP_ADMA_TEST_SIZE; i++) |
835 | ((u8 *) src)[i] = (u8)i; | 835 | ((u8 *) src)[i] = (u8)i; |
836 | 836 | ||
837 | memset(dest, 0, IOP_ADMA_TEST_SIZE); | ||
838 | |||
839 | /* Start copy, using first DMA channel */ | 837 | /* Start copy, using first DMA channel */ |
840 | dma_chan = container_of(device->common.channels.next, | 838 | dma_chan = container_of(device->common.channels.next, |
841 | struct dma_chan, | 839 | struct dma_chan, |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 065732ddf40c..d49361bfe670 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/of_device.h> | 22 | #include <linux/of_device.h> |
23 | #include <asm/mpc85xx.h> | ||
24 | #include "edac_module.h" | 23 | #include "edac_module.h" |
25 | #include "edac_core.h" | 24 | #include "edac_core.h" |
26 | #include "mpc85xx_edac.h" | 25 | #include "mpc85xx_edac.h" |
@@ -43,8 +42,6 @@ static u32 orig_pci_err_en; | |||
43 | static u32 orig_l2_err_disable; | 42 | static u32 orig_l2_err_disable; |
44 | static u32 orig_hid1; | 43 | static u32 orig_hid1; |
45 | 44 | ||
46 | static const char *mpc85xx_ctl_name = "MPC85xx"; | ||
47 | |||
48 | /************************ MC SYSFS parts ***********************************/ | 45 | /************************ MC SYSFS parts ***********************************/ |
49 | 46 | ||
50 | static ssize_t mpc85xx_mc_inject_data_hi_show(struct mem_ctl_info *mci, | 47 | static ssize_t mpc85xx_mc_inject_data_hi_show(struct mem_ctl_info *mci, |
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 4a541921a14a..dda14015e873 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c | |||
@@ -113,6 +113,11 @@ static int fw_device_op_open(struct inode *inode, struct file *file) | |||
113 | if (device == NULL) | 113 | if (device == NULL) |
114 | return -ENODEV; | 114 | return -ENODEV; |
115 | 115 | ||
116 | if (fw_device_is_shutdown(device)) { | ||
117 | fw_device_put(device); | ||
118 | return -ENODEV; | ||
119 | } | ||
120 | |||
116 | client = kzalloc(sizeof(*client), GFP_KERNEL); | 121 | client = kzalloc(sizeof(*client), GFP_KERNEL); |
117 | if (client == NULL) { | 122 | if (client == NULL) { |
118 | fw_device_put(device); | 123 | fw_device_put(device); |
@@ -901,6 +906,9 @@ fw_device_op_ioctl(struct file *file, | |||
901 | { | 906 | { |
902 | struct client *client = file->private_data; | 907 | struct client *client = file->private_data; |
903 | 908 | ||
909 | if (fw_device_is_shutdown(client->device)) | ||
910 | return -ENODEV; | ||
911 | |||
904 | return dispatch_ioctl(client, cmd, (void __user *) arg); | 912 | return dispatch_ioctl(client, cmd, (void __user *) arg); |
905 | } | 913 | } |
906 | 914 | ||
@@ -911,6 +919,9 @@ fw_device_op_compat_ioctl(struct file *file, | |||
911 | { | 919 | { |
912 | struct client *client = file->private_data; | 920 | struct client *client = file->private_data; |
913 | 921 | ||
922 | if (fw_device_is_shutdown(client->device)) | ||
923 | return -ENODEV; | ||
924 | |||
914 | return dispatch_ioctl(client, cmd, compat_ptr(arg)); | 925 | return dispatch_ioctl(client, cmd, compat_ptr(arg)); |
915 | } | 926 | } |
916 | #endif | 927 | #endif |
@@ -922,6 +933,9 @@ static int fw_device_op_mmap(struct file *file, struct vm_area_struct *vma) | |||
922 | unsigned long size; | 933 | unsigned long size; |
923 | int page_count, retval; | 934 | int page_count, retval; |
924 | 935 | ||
936 | if (fw_device_is_shutdown(client->device)) | ||
937 | return -ENODEV; | ||
938 | |||
925 | /* FIXME: We could support multiple buffers, but we don't. */ | 939 | /* FIXME: We could support multiple buffers, but we don't. */ |
926 | if (client->buffer.pages != NULL) | 940 | if (client->buffer.pages != NULL) |
927 | return -EBUSY; | 941 | return -EBUSY; |
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 744011989044..9e4f59dc7f1e 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c | |||
@@ -753,7 +753,7 @@ edd_init(void) | |||
753 | 753 | ||
754 | if (!edd_num_devices()) { | 754 | if (!edd_num_devices()) { |
755 | printk(KERN_INFO "EDD information not available.\n"); | 755 | printk(KERN_INFO "EDD information not available.\n"); |
756 | return 1; | 756 | return -ENODEV; |
757 | } | 757 | } |
758 | 758 | ||
759 | edd_kset = kset_create_and_add("edd", NULL, firmware_kobj); | 759 | edd_kset = kset_create_and_add("edd", NULL, firmware_kobj); |
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 7f138c6195ff..beaf6b3a37dc 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -127,7 +127,7 @@ int __init gpiochip_reserve(int start, int ngpio) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int i; | 128 | int i; |
129 | 129 | ||
130 | if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio)) | 130 | if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio - 1)) |
131 | return -EINVAL; | 131 | return -EINVAL; |
132 | 132 | ||
133 | spin_lock_irqsave(&gpio_lock, flags); | 133 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -170,7 +170,7 @@ int gpiochip_add(struct gpio_chip *chip) | |||
170 | unsigned id; | 170 | unsigned id; |
171 | int base = chip->base; | 171 | int base = chip->base; |
172 | 172 | ||
173 | if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio)) | 173 | if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio - 1)) |
174 | && base >= 0) { | 174 | && base >= 0) { |
175 | status = -EINVAL; | 175 | status = -EINVAL; |
176 | goto fail; | 176 | goto fail; |
@@ -207,7 +207,7 @@ fail: | |||
207 | /* failures here can mean systems won't boot... */ | 207 | /* failures here can mean systems won't boot... */ |
208 | if (status) | 208 | if (status) |
209 | pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", | 209 | pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", |
210 | chip->base, chip->base + chip->ngpio, | 210 | chip->base, chip->base + chip->ngpio - 1, |
211 | chip->label ? : "generic"); | 211 | chip->label ? : "generic"); |
212 | return status; | 212 | return status; |
213 | } | 213 | } |
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index 7fb5b9d009d4..7f92fdd5f0e2 100644 --- a/drivers/gpio/mcp23s08.c +++ b/drivers/gpio/mcp23s08.c | |||
@@ -168,7 +168,7 @@ static void mcp23s08_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
168 | { | 168 | { |
169 | struct mcp23s08 *mcp; | 169 | struct mcp23s08 *mcp; |
170 | char bank; | 170 | char bank; |
171 | unsigned t; | 171 | int t; |
172 | unsigned mask; | 172 | unsigned mask; |
173 | 173 | ||
174 | mcp = container_of(chip, struct mcp23s08, chip); | 174 | mcp = container_of(chip, struct mcp23s08, chip); |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 93f916720b13..7e40e8a55edf 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -30,6 +30,7 @@ static const struct i2c_device_id pca953x_id[] = { | |||
30 | { "pca9537", 4, }, | 30 | { "pca9537", 4, }, |
31 | { "pca9538", 8, }, | 31 | { "pca9538", 8, }, |
32 | { "pca9539", 16, }, | 32 | { "pca9539", 16, }, |
33 | { "pca9554", 8, }, | ||
33 | { "pca9555", 16, }, | 34 | { "pca9555", 16, }, |
34 | { "pca9557", 8, }, | 35 | { "pca9557", 8, }, |
35 | /* REVISIT several pca955x parts should work here too */ | 36 | /* REVISIT several pca955x parts should work here too */ |
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index f88714b06000..47ac1a7d66e1 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: hid-debug.h,v 1.8 2001/09/25 09:37:57 vojtech Exp $ | ||
3 | * | ||
4 | * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de> | 2 | * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de> |
5 | * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz> | 3 | * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz> |
6 | * (c) 2007 Jiri Kosina | 4 | * (c) 2007 Jiri Kosina |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index c3eb3f13e2ca..5c52a20ad344 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $ | ||
3 | * | ||
4 | * Copyright (c) 2000-2001 Vojtech Pavlik | 2 | * Copyright (c) 2000-2001 Vojtech Pavlik |
5 | * Copyright (c) 2006-2007 Jiri Kosina | 3 | * Copyright (c) 2006-2007 Jiri Kosina |
6 | * | 4 | * |
@@ -218,8 +216,9 @@ int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, | |||
218 | } | 216 | } |
219 | } | 217 | } |
220 | 218 | ||
221 | if (test_bit(usage->code, hid->pb_pressed_numlock) || | 219 | if (hid->quirks & HID_QUIRK_APPLE_NUMLOCK_EMULATION && ( |
222 | test_bit(LED_NUML, input->led)) { | 220 | test_bit(usage->code, hid->pb_pressed_numlock) || |
221 | test_bit(LED_NUML, input->led))) { | ||
223 | trans = find_translation(powerbook_numlock_keys, usage->code); | 222 | trans = find_translation(powerbook_numlock_keys, usage->code); |
224 | 223 | ||
225 | if (trans) { | 224 | if (trans) { |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index d3f8d9194f30..1df832a8fcbc 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -325,6 +325,10 @@ | |||
325 | #define USB_DEVICE_ID_MGE_UPS 0xffff | 325 | #define USB_DEVICE_ID_MGE_UPS 0xffff |
326 | #define USB_DEVICE_ID_MGE_UPS1 0x0001 | 326 | #define USB_DEVICE_ID_MGE_UPS1 0x0001 |
327 | 327 | ||
328 | #define USB_VENDOR_ID_MICROCHIP 0x04d8 | ||
329 | #define USB_DEVICE_ID_PICKIT1 0x0032 | ||
330 | #define USB_DEVICE_ID_PICKIT2 0x0033 | ||
331 | |||
328 | #define USB_VENDOR_ID_MICROSOFT 0x045e | 332 | #define USB_VENDOR_ID_MICROSOFT 0x045e |
329 | #define USB_DEVICE_ID_SIDEWINDER_GV 0x003b | 333 | #define USB_DEVICE_ID_SIDEWINDER_GV 0x003b |
330 | #define USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0 0x009d | 334 | #define USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0 0x009d |
@@ -371,6 +375,9 @@ | |||
371 | #define USB_VENDOR_ID_SONY 0x054c | 375 | #define USB_VENDOR_ID_SONY 0x054c |
372 | #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 | 376 | #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 |
373 | 377 | ||
378 | #define USB_VENDOR_ID_SOUNDGRAPH 0x15c2 | ||
379 | #define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD 0x0038 | ||
380 | |||
374 | #define USB_VENDOR_ID_SUN 0x0430 | 381 | #define USB_VENDOR_ID_SUN 0x0430 |
375 | #define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab | 382 | #define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab |
376 | 383 | ||
@@ -567,6 +574,7 @@ static const struct hid_blacklist { | |||
567 | { USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE }, | 574 | { USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE }, |
568 | { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE }, | 575 | { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE }, |
569 | { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, | 576 | { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, |
577 | { USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD, HID_QUIRK_IGNORE }, | ||
570 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO, HID_QUIRK_IGNORE }, | 578 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO, HID_QUIRK_IGNORE }, |
571 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, | 579 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, |
572 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, | 580 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, |
@@ -580,6 +588,9 @@ static const struct hid_blacklist { | |||
580 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, | 588 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, |
581 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, | 589 | { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, |
582 | 590 | ||
591 | { USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1, HID_QUIRK_IGNORE }, | ||
592 | { USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT2, HID_QUIRK_IGNORE }, | ||
593 | |||
583 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, | 594 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, |
584 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, | 595 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, |
585 | 596 | ||
@@ -611,28 +622,28 @@ static const struct hid_blacklist { | |||
611 | 622 | ||
612 | { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, | 623 | { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, |
613 | 624 | ||
614 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 625 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
615 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 626 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
616 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 627 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
617 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, | 628 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, |
618 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 629 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
619 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 630 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
620 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, | 631 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, |
621 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 632 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
622 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 633 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
623 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, | 634 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, |
624 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 635 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
625 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI, HID_QUIRK_APPLE_HAS_FN }, | 636 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI, HID_QUIRK_APPLE_HAS_FN }, |
626 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, | 637 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, |
627 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, | 638 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, |
628 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 639 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
629 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 640 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
630 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 641 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
631 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_HAS_FN }, | 642 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN }, |
632 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, | 643 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, |
633 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_HAS_FN }, | 644 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN }, |
634 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 645 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
635 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, | 646 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, |
636 | 647 | ||
637 | { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, | 648 | { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, |
638 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, | 649 | { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, |
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index 5d9dbb47e4a8..3cd46d2e53c1 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: usbkbd.c,v 1.27 2001/12/27 10:37:41 vojtech Exp $ | ||
3 | * | ||
4 | * Copyright (c) 1999-2001 Vojtech Pavlik | 2 | * Copyright (c) 1999-2001 Vojtech Pavlik |
5 | * | 3 | * |
6 | * USB HIDBP Keyboard support | 4 | * USB HIDBP Keyboard support |
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c index df0d96d989de..703e9d0e8714 100644 --- a/drivers/hid/usbhid/usbmouse.c +++ b/drivers/hid/usbhid/usbmouse.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: usbmouse.c,v 1.15 2001/12/27 10:37:41 vojtech Exp $ | ||
3 | * | ||
4 | * Copyright (c) 1999-2001 Vojtech Pavlik | 2 | * Copyright (c) 1999-2001 Vojtech Pavlik |
5 | * | 3 | * |
6 | * USB HIDBP Mouse support | 4 | * USB HIDBP Mouse support |
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 4dc76bc45c9d..00ff53348491 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -330,6 +330,20 @@ config SENSORS_CORETEMP | |||
330 | sensor inside your CPU. Supported all are all known variants | 330 | sensor inside your CPU. Supported all are all known variants |
331 | of Intel Core family. | 331 | of Intel Core family. |
332 | 332 | ||
333 | config SENSORS_IBMAEM | ||
334 | tristate "IBM Active Energy Manager temperature/power sensors and control" | ||
335 | select IPMI_SI | ||
336 | depends on IPMI_HANDLER | ||
337 | help | ||
338 | If you say yes here you get support for the temperature and | ||
339 | power sensors and capping hardware in various IBM System X | ||
340 | servers that support Active Energy Manager. This includes | ||
341 | the x3350, x3550, x3650, x3655, x3755, x3850 M2, x3950 M2, | ||
342 | and certain HS2x/LS2x/QS2x blades. | ||
343 | |||
344 | This driver can also be built as a module. If so, the module | ||
345 | will be called ibmaem. | ||
346 | |||
333 | config SENSORS_IBMPEX | 347 | config SENSORS_IBMPEX |
334 | tristate "IBM PowerExecutive temperature/power sensors" | 348 | tristate "IBM PowerExecutive temperature/power sensors" |
335 | select IPMI_SI | 349 | select IPMI_SI |
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 3bdb05a5cbd7..d098677e08de 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile | |||
@@ -41,6 +41,7 @@ obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o | |||
41 | obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o | 41 | obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o |
42 | obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o | 42 | obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o |
43 | obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o | 43 | obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o |
44 | obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o | ||
44 | obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o | 45 | obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o |
45 | obj-$(CONFIG_SENSORS_IT87) += it87.o | 46 | obj-$(CONFIG_SENSORS_IT87) += it87.o |
46 | obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o | 47 | obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o |
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index bab5fd2e4dfd..26df06f840eb 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -515,12 +515,14 @@ static struct dmi_system_id __initdata hdaps_whitelist[] = { | |||
515 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"), | 515 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"), |
516 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"), | 516 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"), |
517 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"), | 517 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"), |
518 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61i"), | ||
518 | HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"), | 519 | HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"), |
519 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"), | 520 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"), |
520 | HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"), | 521 | HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"), |
521 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"), | 522 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"), |
522 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"), | 523 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"), |
523 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"), | 524 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"), |
525 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61"), | ||
524 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"), | 526 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"), |
525 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"), | 527 | HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"), |
526 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"), | 528 | HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"), |
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index 6ac5c6f53585..f9e2ed621f7b 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c | |||
@@ -111,6 +111,7 @@ struct i5k_amb_data { | |||
111 | void __iomem *amb_mmio; | 111 | void __iomem *amb_mmio; |
112 | struct i5k_device_attribute *attrs; | 112 | struct i5k_device_attribute *attrs; |
113 | unsigned int num_attrs; | 113 | unsigned int num_attrs; |
114 | unsigned long chipset_id; | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | static ssize_t show_name(struct device *dev, struct device_attribute *devattr, | 117 | static ssize_t show_name(struct device *dev, struct device_attribute *devattr, |
@@ -382,7 +383,8 @@ err: | |||
382 | return res; | 383 | return res; |
383 | } | 384 | } |
384 | 385 | ||
385 | static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data) | 386 | static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data, |
387 | unsigned long devid) | ||
386 | { | 388 | { |
387 | struct pci_dev *pcidev; | 389 | struct pci_dev *pcidev; |
388 | u32 val32; | 390 | u32 val32; |
@@ -390,7 +392,7 @@ static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data) | |||
390 | 392 | ||
391 | /* Find AMB register memory space */ | 393 | /* Find AMB register memory space */ |
392 | pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, | 394 | pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, |
393 | PCI_DEVICE_ID_INTEL_5000_ERR, | 395 | devid, |
394 | NULL); | 396 | NULL); |
395 | if (!pcidev) | 397 | if (!pcidev) |
396 | return -ENODEV; | 398 | return -ENODEV; |
@@ -409,6 +411,8 @@ static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data) | |||
409 | goto out; | 411 | goto out; |
410 | } | 412 | } |
411 | 413 | ||
414 | data->chipset_id = devid; | ||
415 | |||
412 | res = 0; | 416 | res = 0; |
413 | out: | 417 | out: |
414 | pci_dev_put(pcidev); | 418 | pci_dev_put(pcidev); |
@@ -441,10 +445,30 @@ out: | |||
441 | return res; | 445 | return res; |
442 | } | 446 | } |
443 | 447 | ||
448 | static unsigned long i5k_channel_pci_id(struct i5k_amb_data *data, | ||
449 | unsigned long channel) | ||
450 | { | ||
451 | switch (data->chipset_id) { | ||
452 | case PCI_DEVICE_ID_INTEL_5000_ERR: | ||
453 | return PCI_DEVICE_ID_INTEL_5000_FBD0 + channel; | ||
454 | case PCI_DEVICE_ID_INTEL_5400_ERR: | ||
455 | return PCI_DEVICE_ID_INTEL_5400_FBD0 + channel; | ||
456 | default: | ||
457 | BUG(); | ||
458 | } | ||
459 | } | ||
460 | |||
461 | static unsigned long chipset_ids[] = { | ||
462 | PCI_DEVICE_ID_INTEL_5000_ERR, | ||
463 | PCI_DEVICE_ID_INTEL_5400_ERR, | ||
464 | 0 | ||
465 | }; | ||
466 | |||
444 | static int __devinit i5k_amb_probe(struct platform_device *pdev) | 467 | static int __devinit i5k_amb_probe(struct platform_device *pdev) |
445 | { | 468 | { |
446 | struct i5k_amb_data *data; | 469 | struct i5k_amb_data *data; |
447 | struct resource *reso; | 470 | struct resource *reso; |
471 | int i; | ||
448 | int res = -ENODEV; | 472 | int res = -ENODEV; |
449 | 473 | ||
450 | data = kzalloc(sizeof(*data), GFP_KERNEL); | 474 | data = kzalloc(sizeof(*data), GFP_KERNEL); |
@@ -452,19 +476,24 @@ static int __devinit i5k_amb_probe(struct platform_device *pdev) | |||
452 | return -ENOMEM; | 476 | return -ENOMEM; |
453 | 477 | ||
454 | /* Figure out where the AMB registers live */ | 478 | /* Figure out where the AMB registers live */ |
455 | res = i5k_find_amb_registers(data); | 479 | i = 0; |
480 | do { | ||
481 | res = i5k_find_amb_registers(data, chipset_ids[i]); | ||
482 | i++; | ||
483 | } while (res && chipset_ids[i]); | ||
484 | |||
456 | if (res) | 485 | if (res) |
457 | goto err; | 486 | goto err; |
458 | 487 | ||
459 | /* Copy the DIMM presence map for the first two channels */ | 488 | /* Copy the DIMM presence map for the first two channels */ |
460 | res = i5k_channel_probe(&data->amb_present[0], | 489 | res = i5k_channel_probe(&data->amb_present[0], |
461 | PCI_DEVICE_ID_INTEL_5000_FBD0); | 490 | i5k_channel_pci_id(data, 0)); |
462 | if (res) | 491 | if (res) |
463 | goto err; | 492 | goto err; |
464 | 493 | ||
465 | /* Copy the DIMM presence map for the optional second two channels */ | 494 | /* Copy the DIMM presence map for the optional second two channels */ |
466 | i5k_channel_probe(&data->amb_present[2], | 495 | i5k_channel_probe(&data->amb_present[2], |
467 | PCI_DEVICE_ID_INTEL_5000_FBD1); | 496 | i5k_channel_pci_id(data, 1)); |
468 | 497 | ||
469 | /* Set up resource regions */ | 498 | /* Set up resource regions */ |
470 | reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME); | 499 | reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME); |
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c new file mode 100644 index 000000000000..c9416e657487 --- /dev/null +++ b/drivers/hwmon/ibmaem.c | |||
@@ -0,0 +1,1111 @@ | |||
1 | /* | ||
2 | * A hwmon driver for the IBM Active Energy Manager temperature/power sensors | ||
3 | * and capping functionality. | ||
4 | * Copyright (C) 2008 IBM | ||
5 | * | ||
6 | * Author: Darrick J. Wong <djwong@us.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #include <linux/ipmi.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/hwmon.h> | ||
26 | #include <linux/hwmon-sysfs.h> | ||
27 | #include <linux/jiffies.h> | ||
28 | #include <linux/mutex.h> | ||
29 | #include <linux/kdev_t.h> | ||
30 | #include <linux/spinlock.h> | ||
31 | #include <linux/idr.h> | ||
32 | #include <linux/sched.h> | ||
33 | #include <linux/platform_device.h> | ||
34 | #include <linux/math64.h> | ||
35 | #include <linux/time.h> | ||
36 | |||
37 | #define REFRESH_INTERVAL (HZ) | ||
38 | #define IPMI_TIMEOUT (30 * HZ) | ||
39 | #define DRVNAME "aem" | ||
40 | |||
41 | #define AEM_NETFN 0x2E | ||
42 | |||
43 | #define AEM_FIND_FW_CMD 0x80 | ||
44 | #define AEM_ELEMENT_CMD 0x81 | ||
45 | #define AEM_FW_INSTANCE_CMD 0x82 | ||
46 | |||
47 | #define AEM_READ_ELEMENT_CFG 0x80 | ||
48 | #define AEM_READ_BUFFER 0x81 | ||
49 | #define AEM_READ_REGISTER 0x82 | ||
50 | #define AEM_WRITE_REGISTER 0x83 | ||
51 | #define AEM_SET_REG_MASK 0x84 | ||
52 | #define AEM_CLEAR_REG_MASK 0x85 | ||
53 | #define AEM_READ_ELEMENT_CFG2 0x86 | ||
54 | |||
55 | #define AEM_CONTROL_ELEMENT 0 | ||
56 | #define AEM_ENERGY_ELEMENT 1 | ||
57 | #define AEM_CLOCK_ELEMENT 4 | ||
58 | #define AEM_POWER_CAP_ELEMENT 7 | ||
59 | #define AEM_EXHAUST_ELEMENT 9 | ||
60 | #define AEM_POWER_ELEMENT 10 | ||
61 | |||
62 | #define AEM_MODULE_TYPE_ID 0x0001 | ||
63 | |||
64 | #define AEM2_NUM_ENERGY_REGS 2 | ||
65 | #define AEM2_NUM_PCAP_REGS 6 | ||
66 | #define AEM2_NUM_TEMP_REGS 2 | ||
67 | #define AEM2_NUM_SENSORS 14 | ||
68 | |||
69 | #define AEM1_NUM_ENERGY_REGS 1 | ||
70 | #define AEM1_NUM_SENSORS 3 | ||
71 | |||
72 | /* AEM 2.x has more energy registers */ | ||
73 | #define AEM_NUM_ENERGY_REGS AEM2_NUM_ENERGY_REGS | ||
74 | /* AEM 2.x needs more sensor files */ | ||
75 | #define AEM_NUM_SENSORS AEM2_NUM_SENSORS | ||
76 | |||
77 | #define POWER_CAP 0 | ||
78 | #define POWER_CAP_MAX_HOTPLUG 1 | ||
79 | #define POWER_CAP_MAX 2 | ||
80 | #define POWER_CAP_MIN_WARNING 3 | ||
81 | #define POWER_CAP_MIN 4 | ||
82 | #define POWER_AUX 5 | ||
83 | |||
84 | #define AEM_DEFAULT_POWER_INTERVAL 1000 | ||
85 | #define AEM_MIN_POWER_INTERVAL 200 | ||
86 | #define UJ_PER_MJ 1000L | ||
87 | |||
88 | static DEFINE_IDR(aem_idr); | ||
89 | static DEFINE_SPINLOCK(aem_idr_lock); | ||
90 | |||
91 | static struct device_driver aem_driver = { | ||
92 | .name = DRVNAME, | ||
93 | .bus = &platform_bus_type, | ||
94 | }; | ||
95 | |||
96 | struct aem_ipmi_data { | ||
97 | struct completion read_complete; | ||
98 | struct ipmi_addr address; | ||
99 | ipmi_user_t user; | ||
100 | int interface; | ||
101 | |||
102 | struct kernel_ipmi_msg tx_message; | ||
103 | long tx_msgid; | ||
104 | |||
105 | void *rx_msg_data; | ||
106 | unsigned short rx_msg_len; | ||
107 | unsigned char rx_result; | ||
108 | int rx_recv_type; | ||
109 | |||
110 | struct device *bmc_device; | ||
111 | }; | ||
112 | |||
113 | struct aem_ro_sensor_template { | ||
114 | char *label; | ||
115 | ssize_t (*show)(struct device *dev, | ||
116 | struct device_attribute *devattr, | ||
117 | char *buf); | ||
118 | int index; | ||
119 | }; | ||
120 | |||
121 | struct aem_rw_sensor_template { | ||
122 | char *label; | ||
123 | ssize_t (*show)(struct device *dev, | ||
124 | struct device_attribute *devattr, | ||
125 | char *buf); | ||
126 | ssize_t (*set)(struct device *dev, | ||
127 | struct device_attribute *devattr, | ||
128 | const char *buf, size_t count); | ||
129 | int index; | ||
130 | }; | ||
131 | |||
132 | struct aem_data { | ||
133 | struct list_head list; | ||
134 | |||
135 | struct device *hwmon_dev; | ||
136 | struct platform_device *pdev; | ||
137 | struct mutex lock; | ||
138 | char valid; | ||
139 | unsigned long last_updated; /* In jiffies */ | ||
140 | u8 ver_major; | ||
141 | u8 ver_minor; | ||
142 | u8 module_handle; | ||
143 | int id; | ||
144 | struct aem_ipmi_data ipmi; | ||
145 | |||
146 | /* Function to update sensors */ | ||
147 | void (*update)(struct aem_data *data); | ||
148 | |||
149 | /* | ||
150 | * AEM 1.x sensors: | ||
151 | * Available sensors: | ||
152 | * Energy meter | ||
153 | * Power meter | ||
154 | * | ||
155 | * AEM 2.x sensors: | ||
156 | * Two energy meters | ||
157 | * Two power meters | ||
158 | * Two temperature sensors | ||
159 | * Six power cap registers | ||
160 | */ | ||
161 | |||
162 | /* sysfs attrs */ | ||
163 | struct sensor_device_attribute sensors[AEM_NUM_SENSORS]; | ||
164 | |||
165 | /* energy use in mJ */ | ||
166 | u64 energy[AEM_NUM_ENERGY_REGS]; | ||
167 | |||
168 | /* power sampling interval in ms */ | ||
169 | unsigned long power_period[AEM_NUM_ENERGY_REGS]; | ||
170 | |||
171 | /* Everything past here is for AEM2 only */ | ||
172 | |||
173 | /* power caps in dW */ | ||
174 | u16 pcap[AEM2_NUM_PCAP_REGS]; | ||
175 | |||
176 | /* exhaust temperature in C */ | ||
177 | u8 temp[AEM2_NUM_TEMP_REGS]; | ||
178 | }; | ||
179 | |||
180 | /* Data structures returned by the AEM firmware */ | ||
181 | struct aem_iana_id { | ||
182 | u8 bytes[3]; | ||
183 | }; | ||
184 | static struct aem_iana_id system_x_id = { | ||
185 | .bytes = {0x4D, 0x4F, 0x00} | ||
186 | }; | ||
187 | |||
188 | /* These are used to find AEM1 instances */ | ||
189 | struct aem_find_firmware_req { | ||
190 | struct aem_iana_id id; | ||
191 | u8 rsvd; | ||
192 | __be16 index; | ||
193 | __be16 module_type_id; | ||
194 | } __packed; | ||
195 | |||
196 | struct aem_find_firmware_resp { | ||
197 | struct aem_iana_id id; | ||
198 | u8 num_instances; | ||
199 | } __packed; | ||
200 | |||
201 | /* These are used to find AEM2 instances */ | ||
202 | struct aem_find_instance_req { | ||
203 | struct aem_iana_id id; | ||
204 | u8 instance_number; | ||
205 | __be16 module_type_id; | ||
206 | } __packed; | ||
207 | |||
208 | struct aem_find_instance_resp { | ||
209 | struct aem_iana_id id; | ||
210 | u8 num_instances; | ||
211 | u8 major; | ||
212 | u8 minor; | ||
213 | u8 module_handle; | ||
214 | u16 record_id; | ||
215 | } __packed; | ||
216 | |||
217 | /* These are used to query sensors */ | ||
218 | struct aem_read_sensor_req { | ||
219 | struct aem_iana_id id; | ||
220 | u8 module_handle; | ||
221 | u8 element; | ||
222 | u8 subcommand; | ||
223 | u8 reg; | ||
224 | u8 rx_buf_size; | ||
225 | } __packed; | ||
226 | |||
227 | struct aem_read_sensor_resp { | ||
228 | struct aem_iana_id id; | ||
229 | u8 bytes[0]; | ||
230 | } __packed; | ||
231 | |||
232 | /* Data structures to talk to the IPMI layer */ | ||
233 | struct aem_driver_data { | ||
234 | struct list_head aem_devices; | ||
235 | struct ipmi_smi_watcher bmc_events; | ||
236 | struct ipmi_user_hndl ipmi_hndlrs; | ||
237 | }; | ||
238 | |||
239 | static void aem_register_bmc(int iface, struct device *dev); | ||
240 | static void aem_bmc_gone(int iface); | ||
241 | static void aem_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data); | ||
242 | |||
243 | static void aem_remove_sensors(struct aem_data *data); | ||
244 | static int aem_init_aem1(struct aem_ipmi_data *probe); | ||
245 | static int aem_init_aem2(struct aem_ipmi_data *probe); | ||
246 | static int aem1_find_sensors(struct aem_data *data); | ||
247 | static int aem2_find_sensors(struct aem_data *data); | ||
248 | static void update_aem1_sensors(struct aem_data *data); | ||
249 | static void update_aem2_sensors(struct aem_data *data); | ||
250 | |||
251 | static struct aem_driver_data driver_data = { | ||
252 | .aem_devices = LIST_HEAD_INIT(driver_data.aem_devices), | ||
253 | .bmc_events = { | ||
254 | .owner = THIS_MODULE, | ||
255 | .new_smi = aem_register_bmc, | ||
256 | .smi_gone = aem_bmc_gone, | ||
257 | }, | ||
258 | .ipmi_hndlrs = { | ||
259 | .ipmi_recv_hndl = aem_msg_handler, | ||
260 | }, | ||
261 | }; | ||
262 | |||
263 | /* Functions to talk to the IPMI layer */ | ||
264 | |||
265 | /* Initialize IPMI address, message buffers and user data */ | ||
266 | static int aem_init_ipmi_data(struct aem_ipmi_data *data, int iface, | ||
267 | struct device *bmc) | ||
268 | { | ||
269 | int err; | ||
270 | |||
271 | init_completion(&data->read_complete); | ||
272 | data->bmc_device = bmc; | ||
273 | |||
274 | /* Initialize IPMI address */ | ||
275 | data->address.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE; | ||
276 | data->address.channel = IPMI_BMC_CHANNEL; | ||
277 | data->address.data[0] = 0; | ||
278 | data->interface = iface; | ||
279 | |||
280 | /* Initialize message buffers */ | ||
281 | data->tx_msgid = 0; | ||
282 | data->tx_message.netfn = AEM_NETFN; | ||
283 | |||
284 | /* Create IPMI messaging interface user */ | ||
285 | err = ipmi_create_user(data->interface, &driver_data.ipmi_hndlrs, | ||
286 | data, &data->user); | ||
287 | if (err < 0) { | ||
288 | dev_err(bmc, "Unable to register user with IPMI " | ||
289 | "interface %d\n", data->interface); | ||
290 | return -EACCES; | ||
291 | } | ||
292 | |||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | /* Send an IPMI command */ | ||
297 | static int aem_send_message(struct aem_ipmi_data *data) | ||
298 | { | ||
299 | int err; | ||
300 | |||
301 | err = ipmi_validate_addr(&data->address, sizeof(data->address)); | ||
302 | if (err) | ||
303 | goto out; | ||
304 | |||
305 | data->tx_msgid++; | ||
306 | err = ipmi_request_settime(data->user, &data->address, data->tx_msgid, | ||
307 | &data->tx_message, data, 0, 0, 0); | ||
308 | if (err) | ||
309 | goto out1; | ||
310 | |||
311 | return 0; | ||
312 | out1: | ||
313 | dev_err(data->bmc_device, "request_settime=%x\n", err); | ||
314 | return err; | ||
315 | out: | ||
316 | dev_err(data->bmc_device, "validate_addr=%x\n", err); | ||
317 | return err; | ||
318 | } | ||
319 | |||
320 | /* Dispatch IPMI messages to callers */ | ||
321 | static void aem_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data) | ||
322 | { | ||
323 | unsigned short rx_len; | ||
324 | struct aem_ipmi_data *data = user_msg_data; | ||
325 | |||
326 | if (msg->msgid != data->tx_msgid) { | ||
327 | dev_err(data->bmc_device, "Mismatch between received msgid " | ||
328 | "(%02x) and transmitted msgid (%02x)!\n", | ||
329 | (int)msg->msgid, | ||
330 | (int)data->tx_msgid); | ||
331 | ipmi_free_recv_msg(msg); | ||
332 | return; | ||
333 | } | ||
334 | |||
335 | data->rx_recv_type = msg->recv_type; | ||
336 | if (msg->msg.data_len > 0) | ||
337 | data->rx_result = msg->msg.data[0]; | ||
338 | else | ||
339 | data->rx_result = IPMI_UNKNOWN_ERR_COMPLETION_CODE; | ||
340 | |||
341 | if (msg->msg.data_len > 1) { | ||
342 | rx_len = msg->msg.data_len - 1; | ||
343 | if (data->rx_msg_len < rx_len) | ||
344 | rx_len = data->rx_msg_len; | ||
345 | data->rx_msg_len = rx_len; | ||
346 | memcpy(data->rx_msg_data, msg->msg.data + 1, data->rx_msg_len); | ||
347 | } else | ||
348 | data->rx_msg_len = 0; | ||
349 | |||
350 | ipmi_free_recv_msg(msg); | ||
351 | complete(&data->read_complete); | ||
352 | } | ||
353 | |||
354 | /* ID functions */ | ||
355 | |||
356 | /* Obtain an id */ | ||
357 | static int aem_idr_get(int *id) | ||
358 | { | ||
359 | int i, err; | ||
360 | |||
361 | again: | ||
362 | if (unlikely(!idr_pre_get(&aem_idr, GFP_KERNEL))) | ||
363 | return -ENOMEM; | ||
364 | |||
365 | spin_lock(&aem_idr_lock); | ||
366 | err = idr_get_new(&aem_idr, NULL, &i); | ||
367 | spin_unlock(&aem_idr_lock); | ||
368 | |||
369 | if (unlikely(err == -EAGAIN)) | ||
370 | goto again; | ||
371 | else if (unlikely(err)) | ||
372 | return err; | ||
373 | |||
374 | *id = i & MAX_ID_MASK; | ||
375 | return 0; | ||
376 | } | ||
377 | |||
378 | /* Release an object ID */ | ||
379 | static void aem_idr_put(int id) | ||
380 | { | ||
381 | spin_lock(&aem_idr_lock); | ||
382 | idr_remove(&aem_idr, id); | ||
383 | spin_unlock(&aem_idr_lock); | ||
384 | } | ||
385 | |||
386 | /* Sensor support functions */ | ||
387 | |||
388 | /* Read a sensor value */ | ||
389 | static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg, | ||
390 | void *buf, size_t size) | ||
391 | { | ||
392 | int rs_size, res; | ||
393 | struct aem_read_sensor_req rs_req; | ||
394 | struct aem_read_sensor_resp *rs_resp; | ||
395 | struct aem_ipmi_data *ipmi = &data->ipmi; | ||
396 | |||
397 | /* AEM registers are 1, 2, 4 or 8 bytes */ | ||
398 | switch (size) { | ||
399 | case 1: | ||
400 | case 2: | ||
401 | case 4: | ||
402 | case 8: | ||
403 | break; | ||
404 | default: | ||
405 | return -EINVAL; | ||
406 | } | ||
407 | |||
408 | rs_req.id = system_x_id; | ||
409 | rs_req.module_handle = data->module_handle; | ||
410 | rs_req.element = elt; | ||
411 | rs_req.subcommand = AEM_READ_REGISTER; | ||
412 | rs_req.reg = reg; | ||
413 | rs_req.rx_buf_size = size; | ||
414 | |||
415 | ipmi->tx_message.cmd = AEM_ELEMENT_CMD; | ||
416 | ipmi->tx_message.data = (char *)&rs_req; | ||
417 | ipmi->tx_message.data_len = sizeof(rs_req); | ||
418 | |||
419 | rs_size = sizeof(*rs_resp) + size; | ||
420 | rs_resp = kzalloc(rs_size, GFP_KERNEL); | ||
421 | if (!rs_resp) | ||
422 | return -ENOMEM; | ||
423 | |||
424 | ipmi->rx_msg_data = rs_resp; | ||
425 | ipmi->rx_msg_len = rs_size; | ||
426 | |||
427 | aem_send_message(ipmi); | ||
428 | |||
429 | res = wait_for_completion_timeout(&ipmi->read_complete, IPMI_TIMEOUT); | ||
430 | if (!res) | ||
431 | return -ETIMEDOUT; | ||
432 | |||
433 | if (ipmi->rx_result || ipmi->rx_msg_len != rs_size || | ||
434 | memcmp(&rs_resp->id, &system_x_id, sizeof(system_x_id))) { | ||
435 | kfree(rs_resp); | ||
436 | return -ENOENT; | ||
437 | } | ||
438 | |||
439 | switch (size) { | ||
440 | case 1: { | ||
441 | u8 *x = buf; | ||
442 | *x = rs_resp->bytes[0]; | ||
443 | break; | ||
444 | } | ||
445 | case 2: { | ||
446 | u16 *x = buf; | ||
447 | *x = be16_to_cpup((__be16 *)rs_resp->bytes); | ||
448 | break; | ||
449 | } | ||
450 | case 4: { | ||
451 | u32 *x = buf; | ||
452 | *x = be32_to_cpup((__be32 *)rs_resp->bytes); | ||
453 | break; | ||
454 | } | ||
455 | case 8: { | ||
456 | u64 *x = buf; | ||
457 | *x = be64_to_cpup((__be64 *)rs_resp->bytes); | ||
458 | break; | ||
459 | } | ||
460 | } | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
465 | /* Update AEM energy registers */ | ||
466 | static void update_aem_energy(struct aem_data *data) | ||
467 | { | ||
468 | aem_read_sensor(data, AEM_ENERGY_ELEMENT, 0, &data->energy[0], 8); | ||
469 | if (data->ver_major < 2) | ||
470 | return; | ||
471 | aem_read_sensor(data, AEM_ENERGY_ELEMENT, 1, &data->energy[1], 8); | ||
472 | } | ||
473 | |||
474 | /* Update all AEM1 sensors */ | ||
475 | static void update_aem1_sensors(struct aem_data *data) | ||
476 | { | ||
477 | mutex_lock(&data->lock); | ||
478 | if (time_before(jiffies, data->last_updated + REFRESH_INTERVAL) && | ||
479 | data->valid) | ||
480 | goto out; | ||
481 | |||
482 | update_aem_energy(data); | ||
483 | out: | ||
484 | mutex_unlock(&data->lock); | ||
485 | } | ||
486 | |||
487 | /* Update all AEM2 sensors */ | ||
488 | static void update_aem2_sensors(struct aem_data *data) | ||
489 | { | ||
490 | int i; | ||
491 | |||
492 | mutex_lock(&data->lock); | ||
493 | if (time_before(jiffies, data->last_updated + REFRESH_INTERVAL) && | ||
494 | data->valid) | ||
495 | goto out; | ||
496 | |||
497 | update_aem_energy(data); | ||
498 | aem_read_sensor(data, AEM_EXHAUST_ELEMENT, 0, &data->temp[0], 1); | ||
499 | aem_read_sensor(data, AEM_EXHAUST_ELEMENT, 1, &data->temp[1], 1); | ||
500 | |||
501 | for (i = POWER_CAP; i <= POWER_AUX; i++) | ||
502 | aem_read_sensor(data, AEM_POWER_CAP_ELEMENT, i, | ||
503 | &data->pcap[i], 2); | ||
504 | out: | ||
505 | mutex_unlock(&data->lock); | ||
506 | } | ||
507 | |||
508 | /* Delete an AEM instance */ | ||
509 | static void aem_delete(struct aem_data *data) | ||
510 | { | ||
511 | list_del(&data->list); | ||
512 | aem_remove_sensors(data); | ||
513 | hwmon_device_unregister(data->hwmon_dev); | ||
514 | ipmi_destroy_user(data->ipmi.user); | ||
515 | dev_set_drvdata(&data->pdev->dev, NULL); | ||
516 | platform_device_unregister(data->pdev); | ||
517 | aem_idr_put(data->id); | ||
518 | kfree(data); | ||
519 | } | ||
520 | |||
521 | /* Probe functions for AEM1 devices */ | ||
522 | |||
523 | /* Retrieve version and module handle for an AEM1 instance */ | ||
524 | static int aem_find_aem1_count(struct aem_ipmi_data *data) | ||
525 | { | ||
526 | int res; | ||
527 | struct aem_find_firmware_req ff_req; | ||
528 | struct aem_find_firmware_resp ff_resp; | ||
529 | |||
530 | ff_req.id = system_x_id; | ||
531 | ff_req.index = 0; | ||
532 | ff_req.module_type_id = cpu_to_be16(AEM_MODULE_TYPE_ID); | ||
533 | |||
534 | data->tx_message.cmd = AEM_FIND_FW_CMD; | ||
535 | data->tx_message.data = (char *)&ff_req; | ||
536 | data->tx_message.data_len = sizeof(ff_req); | ||
537 | |||
538 | data->rx_msg_data = &ff_resp; | ||
539 | data->rx_msg_len = sizeof(ff_resp); | ||
540 | |||
541 | aem_send_message(data); | ||
542 | |||
543 | res = wait_for_completion_timeout(&data->read_complete, IPMI_TIMEOUT); | ||
544 | if (!res) | ||
545 | return -ETIMEDOUT; | ||
546 | |||
547 | if (data->rx_result || data->rx_msg_len != sizeof(ff_resp) || | ||
548 | memcmp(&ff_resp.id, &system_x_id, sizeof(system_x_id))) | ||
549 | return -ENOENT; | ||
550 | |||
551 | return ff_resp.num_instances; | ||
552 | } | ||
553 | |||
554 | /* Find and initialize one AEM1 instance */ | ||
555 | static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle) | ||
556 | { | ||
557 | struct aem_data *data; | ||
558 | int i; | ||
559 | int res = -ENOMEM; | ||
560 | |||
561 | data = kzalloc(sizeof(*data), GFP_KERNEL); | ||
562 | if (!data) | ||
563 | return res; | ||
564 | mutex_init(&data->lock); | ||
565 | |||
566 | /* Copy instance data */ | ||
567 | data->ver_major = 1; | ||
568 | data->ver_minor = 0; | ||
569 | data->module_handle = module_handle; | ||
570 | for (i = 0; i < AEM1_NUM_ENERGY_REGS; i++) | ||
571 | data->power_period[i] = AEM_DEFAULT_POWER_INTERVAL; | ||
572 | |||
573 | /* Create sub-device for this fw instance */ | ||
574 | if (aem_idr_get(&data->id)) | ||
575 | goto id_err; | ||
576 | |||
577 | data->pdev = platform_device_alloc(DRVNAME, data->id); | ||
578 | if (!data->pdev) | ||
579 | goto dev_err; | ||
580 | data->pdev->dev.driver = &aem_driver; | ||
581 | |||
582 | res = platform_device_add(data->pdev); | ||
583 | if (res) | ||
584 | goto ipmi_err; | ||
585 | |||
586 | dev_set_drvdata(&data->pdev->dev, data); | ||
587 | |||
588 | /* Set up IPMI interface */ | ||
589 | if (aem_init_ipmi_data(&data->ipmi, probe->interface, | ||
590 | probe->bmc_device)) | ||
591 | goto ipmi_err; | ||
592 | |||
593 | /* Register with hwmon */ | ||
594 | data->hwmon_dev = hwmon_device_register(&data->pdev->dev); | ||
595 | |||
596 | if (IS_ERR(data->hwmon_dev)) { | ||
597 | dev_err(&data->pdev->dev, "Unable to register hwmon " | ||
598 | "device for IPMI interface %d\n", | ||
599 | probe->interface); | ||
600 | goto hwmon_reg_err; | ||
601 | } | ||
602 | |||
603 | data->update = update_aem1_sensors; | ||
604 | |||
605 | /* Find sensors */ | ||
606 | if (aem1_find_sensors(data)) | ||
607 | goto sensor_err; | ||
608 | |||
609 | /* Add to our list of AEM devices */ | ||
610 | list_add_tail(&data->list, &driver_data.aem_devices); | ||
611 | |||
612 | dev_info(data->ipmi.bmc_device, "Found AEM v%d.%d at 0x%X\n", | ||
613 | data->ver_major, data->ver_minor, | ||
614 | data->module_handle); | ||
615 | return 0; | ||
616 | |||
617 | sensor_err: | ||
618 | hwmon_device_unregister(data->hwmon_dev); | ||
619 | hwmon_reg_err: | ||
620 | ipmi_destroy_user(data->ipmi.user); | ||
621 | ipmi_err: | ||
622 | dev_set_drvdata(&data->pdev->dev, NULL); | ||
623 | platform_device_unregister(data->pdev); | ||
624 | dev_err: | ||
625 | aem_idr_put(data->id); | ||
626 | id_err: | ||
627 | kfree(data); | ||
628 | |||
629 | return res; | ||
630 | } | ||
631 | |||
632 | /* Find and initialize all AEM1 instances */ | ||
633 | static int aem_init_aem1(struct aem_ipmi_data *probe) | ||
634 | { | ||
635 | int num, i, err; | ||
636 | |||
637 | num = aem_find_aem1_count(probe); | ||
638 | for (i = 0; i < num; i++) { | ||
639 | err = aem_init_aem1_inst(probe, i); | ||
640 | if (err) { | ||
641 | dev_err(probe->bmc_device, | ||
642 | "Error %d initializing AEM1 0x%X\n", | ||
643 | err, i); | ||
644 | return err; | ||
645 | } | ||
646 | } | ||
647 | |||
648 | return 0; | ||
649 | } | ||
650 | |||
651 | /* Probe functions for AEM2 devices */ | ||
652 | |||
653 | /* Retrieve version and module handle for an AEM2 instance */ | ||
654 | static int aem_find_aem2(struct aem_ipmi_data *data, | ||
655 | struct aem_find_instance_resp *fi_resp, | ||
656 | int instance_num) | ||
657 | { | ||
658 | int res; | ||
659 | struct aem_find_instance_req fi_req; | ||
660 | |||
661 | fi_req.id = system_x_id; | ||
662 | fi_req.instance_number = instance_num; | ||
663 | fi_req.module_type_id = cpu_to_be16(AEM_MODULE_TYPE_ID); | ||
664 | |||
665 | data->tx_message.cmd = AEM_FW_INSTANCE_CMD; | ||
666 | data->tx_message.data = (char *)&fi_req; | ||
667 | data->tx_message.data_len = sizeof(fi_req); | ||
668 | |||
669 | data->rx_msg_data = fi_resp; | ||
670 | data->rx_msg_len = sizeof(*fi_resp); | ||
671 | |||
672 | aem_send_message(data); | ||
673 | |||
674 | res = wait_for_completion_timeout(&data->read_complete, IPMI_TIMEOUT); | ||
675 | if (!res) | ||
676 | return -ETIMEDOUT; | ||
677 | |||
678 | if (data->rx_result || data->rx_msg_len != sizeof(*fi_resp) || | ||
679 | memcmp(&fi_resp->id, &system_x_id, sizeof(system_x_id))) | ||
680 | return -ENOENT; | ||
681 | |||
682 | return 0; | ||
683 | } | ||
684 | |||
685 | /* Find and initialize one AEM2 instance */ | ||
686 | static int aem_init_aem2_inst(struct aem_ipmi_data *probe, | ||
687 | struct aem_find_instance_resp *fi_resp) | ||
688 | { | ||
689 | struct aem_data *data; | ||
690 | int i; | ||
691 | int res = -ENOMEM; | ||
692 | |||
693 | data = kzalloc(sizeof(*data), GFP_KERNEL); | ||
694 | if (!data) | ||
695 | return res; | ||
696 | mutex_init(&data->lock); | ||
697 | |||
698 | /* Copy instance data */ | ||
699 | data->ver_major = fi_resp->major; | ||
700 | data->ver_minor = fi_resp->minor; | ||
701 | data->module_handle = fi_resp->module_handle; | ||
702 | for (i = 0; i < AEM2_NUM_ENERGY_REGS; i++) | ||
703 | data->power_period[i] = AEM_DEFAULT_POWER_INTERVAL; | ||
704 | |||
705 | /* Create sub-device for this fw instance */ | ||
706 | if (aem_idr_get(&data->id)) | ||
707 | goto id_err; | ||
708 | |||
709 | data->pdev = platform_device_alloc(DRVNAME, data->id); | ||
710 | if (!data->pdev) | ||
711 | goto dev_err; | ||
712 | data->pdev->dev.driver = &aem_driver; | ||
713 | |||
714 | res = platform_device_add(data->pdev); | ||
715 | if (res) | ||
716 | goto ipmi_err; | ||
717 | |||
718 | dev_set_drvdata(&data->pdev->dev, data); | ||
719 | |||
720 | /* Set up IPMI interface */ | ||
721 | if (aem_init_ipmi_data(&data->ipmi, probe->interface, | ||
722 | probe->bmc_device)) | ||
723 | goto ipmi_err; | ||
724 | |||
725 | /* Register with hwmon */ | ||
726 | data->hwmon_dev = hwmon_device_register(&data->pdev->dev); | ||
727 | |||
728 | if (IS_ERR(data->hwmon_dev)) { | ||
729 | dev_err(&data->pdev->dev, "Unable to register hwmon " | ||
730 | "device for IPMI interface %d\n", | ||
731 | probe->interface); | ||
732 | goto hwmon_reg_err; | ||
733 | } | ||
734 | |||
735 | data->update = update_aem2_sensors; | ||
736 | |||
737 | /* Find sensors */ | ||
738 | if (aem2_find_sensors(data)) | ||
739 | goto sensor_err; | ||
740 | |||
741 | /* Add to our list of AEM devices */ | ||
742 | list_add_tail(&data->list, &driver_data.aem_devices); | ||
743 | |||
744 | dev_info(data->ipmi.bmc_device, "Found AEM v%d.%d at 0x%X\n", | ||
745 | data->ver_major, data->ver_minor, | ||
746 | data->module_handle); | ||
747 | return 0; | ||
748 | |||
749 | sensor_err: | ||
750 | hwmon_device_unregister(data->hwmon_dev); | ||
751 | hwmon_reg_err: | ||
752 | ipmi_destroy_user(data->ipmi.user); | ||
753 | ipmi_err: | ||
754 | dev_set_drvdata(&data->pdev->dev, NULL); | ||
755 | platform_device_unregister(data->pdev); | ||
756 | dev_err: | ||
757 | aem_idr_put(data->id); | ||
758 | id_err: | ||
759 | kfree(data); | ||
760 | |||
761 | return res; | ||
762 | } | ||
763 | |||
764 | /* Find and initialize all AEM2 instances */ | ||
765 | static int aem_init_aem2(struct aem_ipmi_data *probe) | ||
766 | { | ||
767 | struct aem_find_instance_resp fi_resp; | ||
768 | int err; | ||
769 | int i = 0; | ||
770 | |||
771 | while (!aem_find_aem2(probe, &fi_resp, i)) { | ||
772 | if (fi_resp.major != 2) { | ||
773 | dev_err(probe->bmc_device, "Unknown AEM v%d; please " | ||
774 | "report this to the maintainer.\n", | ||
775 | fi_resp.major); | ||
776 | i++; | ||
777 | continue; | ||
778 | } | ||
779 | err = aem_init_aem2_inst(probe, &fi_resp); | ||
780 | if (err) { | ||
781 | dev_err(probe->bmc_device, | ||
782 | "Error %d initializing AEM2 0x%X\n", | ||
783 | err, fi_resp.module_handle); | ||
784 | return err; | ||
785 | } | ||
786 | i++; | ||
787 | } | ||
788 | |||
789 | return 0; | ||
790 | } | ||
791 | |||
792 | /* Probe a BMC for AEM firmware instances */ | ||
793 | static void aem_register_bmc(int iface, struct device *dev) | ||
794 | { | ||
795 | struct aem_ipmi_data probe; | ||
796 | |||
797 | if (aem_init_ipmi_data(&probe, iface, dev)) | ||
798 | return; | ||
799 | |||
800 | /* Ignore probe errors; they won't cause problems */ | ||
801 | aem_init_aem1(&probe); | ||
802 | aem_init_aem2(&probe); | ||
803 | |||
804 | ipmi_destroy_user(probe.user); | ||
805 | } | ||
806 | |||
807 | /* Handle BMC deletion */ | ||
808 | static void aem_bmc_gone(int iface) | ||
809 | { | ||
810 | struct aem_data *p1, *next1; | ||
811 | |||
812 | list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list) | ||
813 | if (p1->ipmi.interface == iface) | ||
814 | aem_delete(p1); | ||
815 | } | ||
816 | |||
817 | /* sysfs support functions */ | ||
818 | |||
819 | /* AEM device name */ | ||
820 | static ssize_t show_name(struct device *dev, struct device_attribute *devattr, | ||
821 | char *buf) | ||
822 | { | ||
823 | struct aem_data *data = dev_get_drvdata(dev); | ||
824 | |||
825 | return sprintf(buf, "%s%d\n", DRVNAME, data->ver_major); | ||
826 | } | ||
827 | static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0); | ||
828 | |||
829 | /* AEM device version */ | ||
830 | static ssize_t show_version(struct device *dev, | ||
831 | struct device_attribute *devattr, | ||
832 | char *buf) | ||
833 | { | ||
834 | struct aem_data *data = dev_get_drvdata(dev); | ||
835 | |||
836 | return sprintf(buf, "%d.%d\n", data->ver_major, data->ver_minor); | ||
837 | } | ||
838 | static SENSOR_DEVICE_ATTR(version, S_IRUGO, show_version, NULL, 0); | ||
839 | |||
840 | /* Display power use */ | ||
841 | static ssize_t aem_show_power(struct device *dev, | ||
842 | struct device_attribute *devattr, | ||
843 | char *buf) | ||
844 | { | ||
845 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
846 | struct aem_data *data = dev_get_drvdata(dev); | ||
847 | u64 before, after, delta, time; | ||
848 | signed long leftover; | ||
849 | struct timespec b, a; | ||
850 | |||
851 | mutex_lock(&data->lock); | ||
852 | update_aem_energy(data); | ||
853 | getnstimeofday(&b); | ||
854 | before = data->energy[attr->index]; | ||
855 | |||
856 | leftover = schedule_timeout_interruptible( | ||
857 | msecs_to_jiffies(data->power_period[attr->index]) | ||
858 | ); | ||
859 | if (leftover) { | ||
860 | mutex_unlock(&data->lock); | ||
861 | return 0; | ||
862 | } | ||
863 | |||
864 | update_aem_energy(data); | ||
865 | getnstimeofday(&a); | ||
866 | after = data->energy[attr->index]; | ||
867 | mutex_unlock(&data->lock); | ||
868 | |||
869 | time = timespec_to_ns(&a) - timespec_to_ns(&b); | ||
870 | delta = (after - before) * UJ_PER_MJ; | ||
871 | |||
872 | return sprintf(buf, "%llu\n", | ||
873 | (unsigned long long)div64_u64(delta * NSEC_PER_SEC, time)); | ||
874 | } | ||
875 | |||
876 | /* Display energy use */ | ||
877 | static ssize_t aem_show_energy(struct device *dev, | ||
878 | struct device_attribute *devattr, | ||
879 | char *buf) | ||
880 | { | ||
881 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
882 | struct aem_data *a = dev_get_drvdata(dev); | ||
883 | a->update(a); | ||
884 | |||
885 | return sprintf(buf, "%llu\n", | ||
886 | (unsigned long long)a->energy[attr->index] * 1000); | ||
887 | } | ||
888 | |||
889 | /* Display power interval registers */ | ||
890 | static ssize_t aem_show_power_period(struct device *dev, | ||
891 | struct device_attribute *devattr, | ||
892 | char *buf) | ||
893 | { | ||
894 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
895 | struct aem_data *a = dev_get_drvdata(dev); | ||
896 | a->update(a); | ||
897 | |||
898 | return sprintf(buf, "%lu\n", a->power_period[attr->index]); | ||
899 | } | ||
900 | |||
901 | /* Set power interval registers */ | ||
902 | static ssize_t aem_set_power_period(struct device *dev, | ||
903 | struct device_attribute *devattr, | ||
904 | const char *buf, size_t count) | ||
905 | { | ||
906 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
907 | struct aem_data *a = dev_get_drvdata(dev); | ||
908 | unsigned long temp; | ||
909 | int res; | ||
910 | |||
911 | res = strict_strtoul(buf, 10, &temp); | ||
912 | if (res) | ||
913 | return res; | ||
914 | |||
915 | if (temp < AEM_MIN_POWER_INTERVAL) | ||
916 | return -EINVAL; | ||
917 | |||
918 | mutex_lock(&a->lock); | ||
919 | a->power_period[attr->index] = temp; | ||
920 | mutex_unlock(&a->lock); | ||
921 | |||
922 | return count; | ||
923 | } | ||
924 | |||
925 | /* Discover sensors on an AEM device */ | ||
926 | static int aem_register_sensors(struct aem_data *data, | ||
927 | struct aem_ro_sensor_template *ro, | ||
928 | struct aem_rw_sensor_template *rw) | ||
929 | { | ||
930 | struct device *dev = &data->pdev->dev; | ||
931 | struct sensor_device_attribute *sensors = data->sensors; | ||
932 | int err; | ||
933 | |||
934 | /* Set up read-only sensors */ | ||
935 | while (ro->label) { | ||
936 | sensors->dev_attr.attr.name = ro->label; | ||
937 | sensors->dev_attr.attr.mode = S_IRUGO; | ||
938 | sensors->dev_attr.show = ro->show; | ||
939 | sensors->index = ro->index; | ||
940 | |||
941 | err = device_create_file(dev, &sensors->dev_attr); | ||
942 | if (err) { | ||
943 | sensors->dev_attr.attr.name = NULL; | ||
944 | goto error; | ||
945 | } | ||
946 | sensors++; | ||
947 | ro++; | ||
948 | } | ||
949 | |||
950 | /* Set up read-write sensors */ | ||
951 | while (rw->label) { | ||
952 | sensors->dev_attr.attr.name = rw->label; | ||
953 | sensors->dev_attr.attr.mode = S_IRUGO | S_IWUSR; | ||
954 | sensors->dev_attr.show = rw->show; | ||
955 | sensors->dev_attr.store = rw->set; | ||
956 | sensors->index = rw->index; | ||
957 | |||
958 | err = device_create_file(dev, &sensors->dev_attr); | ||
959 | if (err) { | ||
960 | sensors->dev_attr.attr.name = NULL; | ||
961 | goto error; | ||
962 | } | ||
963 | sensors++; | ||
964 | rw++; | ||
965 | } | ||
966 | |||
967 | err = device_create_file(dev, &sensor_dev_attr_name.dev_attr); | ||
968 | if (err) | ||
969 | goto error; | ||
970 | err = device_create_file(dev, &sensor_dev_attr_version.dev_attr); | ||
971 | return err; | ||
972 | |||
973 | error: | ||
974 | aem_remove_sensors(data); | ||
975 | return err; | ||
976 | } | ||
977 | |||
978 | /* sysfs support functions for AEM2 sensors */ | ||
979 | |||
980 | /* Display temperature use */ | ||
981 | static ssize_t aem2_show_temp(struct device *dev, | ||
982 | struct device_attribute *devattr, | ||
983 | char *buf) | ||
984 | { | ||
985 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
986 | struct aem_data *a = dev_get_drvdata(dev); | ||
987 | a->update(a); | ||
988 | |||
989 | return sprintf(buf, "%u\n", a->temp[attr->index] * 1000); | ||
990 | } | ||
991 | |||
992 | /* Display power-capping registers */ | ||
993 | static ssize_t aem2_show_pcap_value(struct device *dev, | ||
994 | struct device_attribute *devattr, | ||
995 | char *buf) | ||
996 | { | ||
997 | struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); | ||
998 | struct aem_data *a = dev_get_drvdata(dev); | ||
999 | a->update(a); | ||
1000 | |||
1001 | return sprintf(buf, "%u\n", a->pcap[attr->index] * 100000); | ||
1002 | } | ||
1003 | |||
1004 | /* Remove sensors attached to an AEM device */ | ||
1005 | static void aem_remove_sensors(struct aem_data *data) | ||
1006 | { | ||
1007 | int i; | ||
1008 | |||
1009 | for (i = 0; i < AEM_NUM_SENSORS; i++) { | ||
1010 | if (!data->sensors[i].dev_attr.attr.name) | ||
1011 | continue; | ||
1012 | device_remove_file(&data->pdev->dev, | ||
1013 | &data->sensors[i].dev_attr); | ||
1014 | } | ||
1015 | |||
1016 | device_remove_file(&data->pdev->dev, | ||
1017 | &sensor_dev_attr_name.dev_attr); | ||
1018 | device_remove_file(&data->pdev->dev, | ||
1019 | &sensor_dev_attr_version.dev_attr); | ||
1020 | } | ||
1021 | |||
1022 | /* Sensor probe functions */ | ||
1023 | |||
1024 | /* Description of AEM1 sensors */ | ||
1025 | static struct aem_ro_sensor_template aem1_ro_sensors[] = { | ||
1026 | {"energy1_input", aem_show_energy, 0}, | ||
1027 | {"power1_average", aem_show_power, 0}, | ||
1028 | {NULL, NULL, 0}, | ||
1029 | }; | ||
1030 | |||
1031 | static struct aem_rw_sensor_template aem1_rw_sensors[] = { | ||
1032 | {"power1_average_interval", aem_show_power_period, aem_set_power_period, 0}, | ||
1033 | {NULL, NULL, NULL, 0}, | ||
1034 | }; | ||
1035 | |||
1036 | /* Description of AEM2 sensors */ | ||
1037 | static struct aem_ro_sensor_template aem2_ro_sensors[] = { | ||
1038 | {"energy1_input", aem_show_energy, 0}, | ||
1039 | {"energy2_input", aem_show_energy, 1}, | ||
1040 | {"power1_average", aem_show_power, 0}, | ||
1041 | {"power2_average", aem_show_power, 1}, | ||
1042 | {"temp1_input", aem2_show_temp, 0}, | ||
1043 | {"temp2_input", aem2_show_temp, 1}, | ||
1044 | |||
1045 | {"power4_average", aem2_show_pcap_value, POWER_CAP_MAX_HOTPLUG}, | ||
1046 | {"power5_average", aem2_show_pcap_value, POWER_CAP_MAX}, | ||
1047 | {"power6_average", aem2_show_pcap_value, POWER_CAP_MIN_WARNING}, | ||
1048 | {"power7_average", aem2_show_pcap_value, POWER_CAP_MIN}, | ||
1049 | |||
1050 | {"power3_average", aem2_show_pcap_value, POWER_AUX}, | ||
1051 | {"power_cap", aem2_show_pcap_value, POWER_CAP}, | ||
1052 | {NULL, NULL, 0}, | ||
1053 | }; | ||
1054 | |||
1055 | static struct aem_rw_sensor_template aem2_rw_sensors[] = { | ||
1056 | {"power1_average_interval", aem_show_power_period, aem_set_power_period, 0}, | ||
1057 | {"power2_average_interval", aem_show_power_period, aem_set_power_period, 1}, | ||
1058 | {NULL, NULL, NULL, 0}, | ||
1059 | }; | ||
1060 | |||
1061 | /* Set up AEM1 sensor attrs */ | ||
1062 | static int aem1_find_sensors(struct aem_data *data) | ||
1063 | { | ||
1064 | return aem_register_sensors(data, aem1_ro_sensors, aem1_rw_sensors); | ||
1065 | } | ||
1066 | |||
1067 | /* Set up AEM2 sensor attrs */ | ||
1068 | static int aem2_find_sensors(struct aem_data *data) | ||
1069 | { | ||
1070 | return aem_register_sensors(data, aem2_ro_sensors, aem2_rw_sensors); | ||
1071 | } | ||
1072 | |||
1073 | /* Module init/exit routines */ | ||
1074 | |||
1075 | static int __init aem_init(void) | ||
1076 | { | ||
1077 | int res; | ||
1078 | |||
1079 | res = driver_register(&aem_driver); | ||
1080 | if (res) { | ||
1081 | printk(KERN_ERR "Can't register aem driver\n"); | ||
1082 | return res; | ||
1083 | } | ||
1084 | |||
1085 | res = ipmi_smi_watcher_register(&driver_data.bmc_events); | ||
1086 | if (res) | ||
1087 | goto ipmi_reg_err; | ||
1088 | return 0; | ||
1089 | |||
1090 | ipmi_reg_err: | ||
1091 | driver_unregister(&aem_driver); | ||
1092 | return res; | ||
1093 | |||
1094 | } | ||
1095 | |||
1096 | static void __exit aem_exit(void) | ||
1097 | { | ||
1098 | struct aem_data *p1, *next1; | ||
1099 | |||
1100 | ipmi_smi_watcher_unregister(&driver_data.bmc_events); | ||
1101 | driver_unregister(&aem_driver); | ||
1102 | list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list) | ||
1103 | aem_delete(p1); | ||
1104 | } | ||
1105 | |||
1106 | MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>"); | ||
1107 | MODULE_DESCRIPTION("IBM Active Energy Manager power/temp sensor driver"); | ||
1108 | MODULE_LICENSE("GPL"); | ||
1109 | |||
1110 | module_init(aem_init); | ||
1111 | module_exit(aem_exit); | ||
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index b4f3aefa12b6..1607536ff5fb 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -1028,6 +1028,7 @@ endif | |||
1028 | 1028 | ||
1029 | config BLK_DEV_HD_ONLY | 1029 | config BLK_DEV_HD_ONLY |
1030 | bool "Old hard disk (MFM/RLL/IDE) driver" | 1030 | bool "Old hard disk (MFM/RLL/IDE) driver" |
1031 | depends on !ARM || ARCH_RPC || ARCH_SHARK || BROKEN | ||
1031 | help | 1032 | help |
1032 | There are two drivers for MFM/RLL/IDE hard disks. Most people use | 1033 | There are two drivers for MFM/RLL/IDE hard disks. Most people use |
1033 | the newer enhanced driver, but this old one is still around for two | 1034 | the newer enhanced driver, but this old one is still around for two |
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 713cef20622e..8e8c28104b45 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c | |||
@@ -42,6 +42,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq) | |||
42 | 42 | ||
43 | hw.io_ports.ctl_addr = aux + (6 * 0x20); | 43 | hw.io_ports.ctl_addr = aux + (6 * 0x20); |
44 | hw.irq = irq; | 44 | hw.irq = irq; |
45 | hw.chipset = ide_generic; | ||
45 | 46 | ||
46 | hwif = ide_find_port(); | 47 | hwif = ide_find_port(); |
47 | if (hwif == NULL) | 48 | if (hwif == NULL) |
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c index 4263ffd4ab20..2f311da4c963 100644 --- a/drivers/ide/arm/ide_arm.c +++ b/drivers/ide/arm/ide_arm.c | |||
@@ -49,6 +49,7 @@ static int __init ide_arm_init(void) | |||
49 | memset(&hw, 0, sizeof(hw)); | 49 | memset(&hw, 0, sizeof(hw)); |
50 | ide_std_init_ports(&hw, base, ctl); | 50 | ide_std_init_ports(&hw, base, ctl); |
51 | hw.irq = IDE_ARM_IRQ; | 51 | hw.irq = IDE_ARM_IRQ; |
52 | hw.chipset = ide_generic; | ||
52 | 53 | ||
53 | hwif = ide_find_port(); | 54 | hwif = ide_find_port(); |
54 | if (hwif) { | 55 | if (hwif) { |
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 96378ebfb31f..d024ac8fad14 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -409,9 +409,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) | |||
409 | 409 | ||
410 | ide_device_add(idx, &palm_bk3710_port_info); | 410 | ide_device_add(idx, &palm_bk3710_port_info); |
411 | 411 | ||
412 | if (!hwif->present) | ||
413 | goto out; | ||
414 | |||
415 | return 0; | 412 | return 0; |
416 | out: | 413 | out: |
417 | printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n"); | 414 | printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n"); |
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index a6073e248f45..2d92214096ab 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c | |||
@@ -22,6 +22,10 @@ | |||
22 | 22 | ||
23 | #define DRV_NAME "ide_generic" | 23 | #define DRV_NAME "ide_generic" |
24 | 24 | ||
25 | static int probe_mask = 0x03; | ||
26 | module_param(probe_mask, int, 0); | ||
27 | MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports"); | ||
28 | |||
25 | static ssize_t store_add(struct class *cls, const char *buf, size_t n) | 29 | static ssize_t store_add(struct class *cls, const char *buf, size_t n) |
26 | { | 30 | { |
27 | ide_hwif_t *hwif; | 31 | ide_hwif_t *hwif; |
@@ -89,6 +93,9 @@ static int __init ide_generic_init(void) | |||
89 | u8 idx[MAX_HWIFS]; | 93 | u8 idx[MAX_HWIFS]; |
90 | int i; | 94 | int i; |
91 | 95 | ||
96 | printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module " | ||
97 | "parameter for probing all legacy ISA IDE ports\n"); | ||
98 | |||
92 | for (i = 0; i < MAX_HWIFS; i++) { | 99 | for (i = 0; i < MAX_HWIFS; i++) { |
93 | ide_hwif_t *hwif; | 100 | ide_hwif_t *hwif; |
94 | unsigned long io_addr = ide_default_io_base(i); | 101 | unsigned long io_addr = ide_default_io_base(i); |
@@ -96,7 +103,7 @@ static int __init ide_generic_init(void) | |||
96 | 103 | ||
97 | idx[i] = 0xff; | 104 | idx[i] = 0xff; |
98 | 105 | ||
99 | if (io_addr) { | 106 | if ((probe_mask & (1 << i)) && io_addr) { |
100 | if (!request_region(io_addr, 8, DRV_NAME)) { | 107 | if (!request_region(io_addr, 8, DRV_NAME)) { |
101 | printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX " | 108 | printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX " |
102 | "not free.\n", | 109 | "not free.\n", |
@@ -125,6 +132,7 @@ static int __init ide_generic_init(void) | |||
125 | memset(&hw, 0, sizeof(hw)); | 132 | memset(&hw, 0, sizeof(hw)); |
126 | ide_std_init_ports(&hw, io_addr, io_addr + 0x206); | 133 | ide_std_init_ports(&hw, io_addr, io_addr + 0x206); |
127 | hw.irq = ide_default_irq(io_addr); | 134 | hw.irq = ide_default_irq(io_addr); |
135 | hw.chipset = ide_generic; | ||
128 | ide_init_port_hw(hwif, &hw); | 136 | ide_init_port_hw(hwif, &hw); |
129 | 137 | ||
130 | idx[i] = i; | 138 | idx[i] = i; |
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index 6a8953f68e9f..adbd01784162 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c | |||
@@ -55,6 +55,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) | |||
55 | memset(&hw, 0, sizeof(hw)); | 55 | memset(&hw, 0, sizeof(hw)); |
56 | ide_std_init_ports(&hw, base, ctl); | 56 | ide_std_init_ports(&hw, base, ctl); |
57 | hw.irq = pnp_irq(dev, 0); | 57 | hw.irq = pnp_irq(dev, 0); |
58 | hw.chipset = ide_generic; | ||
58 | 59 | ||
59 | hwif = ide_find_port(); | 60 | hwif = ide_find_port(); |
60 | if (hwif) { | 61 | if (hwif) { |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 34b0d4f26b58..380fa0c8cc84 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -648,13 +648,12 @@ static int ide_register_port(ide_hwif_t *hwif) | |||
648 | 648 | ||
649 | get_device(&hwif->gendev); | 649 | get_device(&hwif->gendev); |
650 | 650 | ||
651 | hwif->portdev = device_create(ide_port_class, &hwif->gendev, | 651 | hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev, |
652 | MKDEV(0, 0), hwif->name); | 652 | MKDEV(0, 0), hwif, hwif->name); |
653 | if (IS_ERR(hwif->portdev)) { | 653 | if (IS_ERR(hwif->portdev)) { |
654 | ret = PTR_ERR(hwif->portdev); | 654 | ret = PTR_ERR(hwif->portdev); |
655 | device_unregister(&hwif->gendev); | 655 | device_unregister(&hwif->gendev); |
656 | } | 656 | } |
657 | dev_set_drvdata(hwif->portdev, hwif); | ||
658 | out: | 657 | out: |
659 | return ret; | 658 | return ret; |
660 | } | 659 | } |
@@ -1334,8 +1333,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif) | |||
1334 | static void ide_init_port(ide_hwif_t *hwif, unsigned int port, | 1333 | static void ide_init_port(ide_hwif_t *hwif, unsigned int port, |
1335 | const struct ide_port_info *d) | 1334 | const struct ide_port_info *d) |
1336 | { | 1335 | { |
1337 | if (d->chipset != ide_etrax100) | 1336 | hwif->channel = port; |
1338 | hwif->channel = port; | ||
1339 | 1337 | ||
1340 | if (d->chipset) | 1338 | if (d->chipset) |
1341 | hwif->chipset = d->chipset; | 1339 | hwif->chipset = d->chipset; |
@@ -1520,7 +1518,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) | |||
1520 | continue; | 1518 | continue; |
1521 | } | 1519 | } |
1522 | 1520 | ||
1523 | if (d->chipset != ide_etrax100 && (i & 1) && mate) { | 1521 | if ((i & 1) && mate) { |
1524 | hwif->mate = mate; | 1522 | hwif->mate = mate; |
1525 | mate->mate = hwif; | 1523 | mate->mate = hwif; |
1526 | } | 1524 | } |
@@ -1666,6 +1664,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no, | |||
1666 | 1664 | ||
1667 | ide_std_init_ports(hw, base, ctl); | 1665 | ide_std_init_ports(hw, base, ctl); |
1668 | hw->irq = irq; | 1666 | hw->irq = irq; |
1667 | hw->chipset = d->chipset; | ||
1669 | 1668 | ||
1670 | hwif = ide_find_port_slot(d); | 1669 | hwif = ide_find_port_slot(d); |
1671 | if (hwif) { | 1670 | if (hwif) { |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 8d6ad812a014..55ec7f798772 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -63,7 +63,6 @@ static int proc_ide_read_imodel | |||
63 | case ide_pmac: name = "mac-io"; break; | 63 | case ide_pmac: name = "mac-io"; break; |
64 | case ide_au1xxx: name = "au1xxx"; break; | 64 | case ide_au1xxx: name = "au1xxx"; break; |
65 | case ide_palm3710: name = "palm3710"; break; | 65 | case ide_palm3710: name = "palm3710"; break; |
66 | case ide_etrax100: name = "etrax100"; break; | ||
67 | case ide_acorn: name = "acorn"; break; | 66 | case ide_acorn: name = "acorn"; break; |
68 | default: name = "(unknown)"; break; | 67 | default: name = "(unknown)"; break; |
69 | } | 68 | } |
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c index 5c730e4dd735..9a1d27ef3f8a 100644 --- a/drivers/ide/legacy/buddha.c +++ b/drivers/ide/legacy/buddha.c | |||
@@ -138,6 +138,8 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base, | |||
138 | 138 | ||
139 | hw->irq = IRQ_AMIGA_PORTS; | 139 | hw->irq = IRQ_AMIGA_PORTS; |
140 | hw->ack_intr = ack_intr; | 140 | hw->ack_intr = ack_intr; |
141 | |||
142 | hw->chipset = ide_generic; | ||
141 | } | 143 | } |
142 | 144 | ||
143 | /* | 145 | /* |
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index 9e449a0c623f..af11028b4794 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
@@ -81,6 +81,8 @@ static void __init falconide_setup_ports(hw_regs_t *hw) | |||
81 | 81 | ||
82 | hw->irq = IRQ_MFP_IDE; | 82 | hw->irq = IRQ_MFP_IDE; |
83 | hw->ack_intr = NULL; | 83 | hw->ack_intr = NULL; |
84 | |||
85 | hw->chipset = ide_generic; | ||
84 | } | 86 | } |
85 | 87 | ||
86 | /* | 88 | /* |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index a9c2593a898c..fed7d812761c 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/ide.h> | 16 | #include <linux/ide.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/zorro.h> | 18 | #include <linux/zorro.h> |
19 | #include <linux/module.h> | ||
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <asm/amigahw.h> | 22 | #include <asm/amigahw.h> |
@@ -62,7 +63,10 @@ | |||
62 | GAYLE_NUM_HWIFS-1) | 63 | GAYLE_NUM_HWIFS-1) |
63 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) | 64 | #define GAYLE_HAS_CONTROL_REG (!ide_doubler) |
64 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) | 65 | #define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) |
66 | |||
65 | int ide_doubler = 0; /* support IDE doublers? */ | 67 | int ide_doubler = 0; /* support IDE doublers? */ |
68 | EXPORT_SYMBOL_GPL(ide_doubler); | ||
69 | |||
66 | module_param_named(doubler, ide_doubler, bool, 0); | 70 | module_param_named(doubler, ide_doubler, bool, 0); |
67 | MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); | 71 | MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); |
68 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ | 72 | #endif /* CONFIG_BLK_DEV_IDEDOUBLER */ |
@@ -112,6 +116,8 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base, | |||
112 | 116 | ||
113 | hw->irq = IRQ_AMIGA_PORTS; | 117 | hw->irq = IRQ_AMIGA_PORTS; |
114 | hw->ack_intr = ack_intr; | 118 | hw->ack_intr = ack_intr; |
119 | |||
120 | hw->chipset = ide_generic; | ||
115 | } | 121 | } |
116 | 122 | ||
117 | /* | 123 | /* |
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index aa2ea3deac85..f633b6b3c7f3 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -135,13 +135,17 @@ static void ide_detach(struct pcmcia_device *link) | |||
135 | { | 135 | { |
136 | ide_info_t *info = link->priv; | 136 | ide_info_t *info = link->priv; |
137 | ide_hwif_t *hwif = info->hwif; | 137 | ide_hwif_t *hwif = info->hwif; |
138 | unsigned long data_addr, ctl_addr; | ||
138 | 139 | ||
139 | DEBUG(0, "ide_detach(0x%p)\n", link); | 140 | DEBUG(0, "ide_detach(0x%p)\n", link); |
140 | 141 | ||
142 | data_addr = hwif->io_ports.data_addr; | ||
143 | ctl_addr = hwif->io_ports.ctl_addr; | ||
144 | |||
141 | ide_release(link); | 145 | ide_release(link); |
142 | 146 | ||
143 | release_region(hwif->io_ports.ctl_addr, 1); | 147 | release_region(ctl_addr, 1); |
144 | release_region(hwif->io_ports.data_addr, 8); | 148 | release_region(data_addr, 8); |
145 | 149 | ||
146 | kfree(info); | 150 | kfree(info); |
147 | } /* ide_detach */ | 151 | } /* ide_detach */ |
@@ -194,6 +198,16 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl, | |||
194 | if (hwif->present) | 198 | if (hwif->present) |
195 | return hwif; | 199 | return hwif; |
196 | 200 | ||
201 | /* retry registration in case device is still spinning up */ | ||
202 | for (i = 0; i < 10; i++) { | ||
203 | msleep(100); | ||
204 | ide_port_scan(hwif); | ||
205 | if (hwif->present) | ||
206 | return hwif; | ||
207 | } | ||
208 | |||
209 | return hwif; | ||
210 | |||
197 | out_release: | 211 | out_release: |
198 | release_region(ctl, 1); | 212 | release_region(ctl, 1); |
199 | release_region(io, 8); | 213 | release_region(io, 8); |
@@ -222,7 +236,7 @@ static int ide_config(struct pcmcia_device *link) | |||
222 | cistpl_cftable_entry_t dflt; | 236 | cistpl_cftable_entry_t dflt; |
223 | } *stk = NULL; | 237 | } *stk = NULL; |
224 | cistpl_cftable_entry_t *cfg; | 238 | cistpl_cftable_entry_t *cfg; |
225 | int i, pass, last_ret = 0, last_fn = 0, is_kme = 0; | 239 | int pass, last_ret = 0, last_fn = 0, is_kme = 0; |
226 | unsigned long io_base, ctl_base; | 240 | unsigned long io_base, ctl_base; |
227 | ide_hwif_t *hwif; | 241 | ide_hwif_t *hwif; |
228 | 242 | ||
@@ -319,30 +333,15 @@ static int ide_config(struct pcmcia_device *link) | |||
319 | if (is_kme) | 333 | if (is_kme) |
320 | outb(0x81, ctl_base+1); | 334 | outb(0x81, ctl_base+1); |
321 | 335 | ||
322 | /* retry registration in case device is still spinning up */ | 336 | hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); |
323 | for (i = 0; i < 10; i++) { | 337 | if (hwif == NULL && link->io.NumPorts1 == 0x20) { |
324 | hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); | ||
325 | if (hwif) | ||
326 | break; | ||
327 | if (link->io.NumPorts1 == 0x20) { | ||
328 | outb(0x02, ctl_base + 0x10); | 338 | outb(0x02, ctl_base + 0x10); |
329 | hwif = idecs_register(io_base + 0x10, ctl_base + 0x10, | 339 | hwif = idecs_register(io_base + 0x10, ctl_base + 0x10, |
330 | link->irq.AssignedIRQ, link); | 340 | link->irq.AssignedIRQ, link); |
331 | if (hwif) { | ||
332 | io_base += 0x10; | ||
333 | ctl_base += 0x10; | ||
334 | break; | ||
335 | } | ||
336 | } | ||
337 | msleep(100); | ||
338 | } | 341 | } |
339 | 342 | ||
340 | if (hwif == NULL) { | 343 | if (hwif == NULL) |
341 | printk(KERN_NOTICE "ide-cs: ide_register() at 0x%3lx & 0x%3lx" | ||
342 | ", irq %u failed\n", io_base, ctl_base, | ||
343 | link->irq.AssignedIRQ); | ||
344 | goto failed; | 344 | goto failed; |
345 | } | ||
346 | 345 | ||
347 | info->ndev = 1; | 346 | info->ndev = 1; |
348 | sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2); | 347 | sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2); |
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index caa2632dd08e..2e84290d0bcc 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
@@ -78,6 +78,8 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
78 | 78 | ||
79 | hw->irq = irq; | 79 | hw->irq = irq; |
80 | hw->ack_intr = ack_intr; | 80 | hw->ack_intr = ack_intr; |
81 | |||
82 | hw->chipset = ide_generic; | ||
81 | } | 83 | } |
82 | 84 | ||
83 | static const char *mac_ide_name[] = | 85 | static const char *mac_ide_name[] = |
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index 6f535d00e638..8ff6e2d20834 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
@@ -70,6 +70,8 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
70 | 70 | ||
71 | hw->irq = irq; | 71 | hw->irq = irq; |
72 | hw->ack_intr = ack_intr; | 72 | hw->ack_intr = ack_intr; |
73 | |||
74 | hw->chipset = ide_generic; | ||
73 | } | 75 | } |
74 | 76 | ||
75 | static void q40ide_input_data(ide_drive_t *drive, struct request *rq, | 77 | static void q40ide_input_data(ide_drive_t *drive, struct request *rq, |
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index aaf38109eaec..b38a1980dcd5 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -747,9 +747,11 @@ static int __init cmd640x_init(void) | |||
747 | 747 | ||
748 | ide_std_init_ports(&hw[0], 0x1f0, 0x3f6); | 748 | ide_std_init_ports(&hw[0], 0x1f0, 0x3f6); |
749 | hw[0].irq = 14; | 749 | hw[0].irq = 14; |
750 | hw[0].chipset = ide_cmd640; | ||
750 | 751 | ||
751 | ide_std_init_ports(&hw[1], 0x170, 0x376); | 752 | ide_std_init_ports(&hw[1], 0x170, 0x376); |
752 | hw[1].irq = 15; | 753 | hw[1].irq = 15; |
754 | hw[1].chipset = ide_cmd640; | ||
753 | 755 | ||
754 | printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" | 756 | printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" |
755 | "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr); | 757 | "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr); |
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c index b9e457996d0e..af0f30051d5a 100644 --- a/drivers/ide/pci/delkin_cb.c +++ b/drivers/ide/pci/delkin_cb.c | |||
@@ -47,13 +47,18 @@ static const struct ide_port_ops delkin_cb_port_ops = { | |||
47 | .quirkproc = ide_undecoded_slave, | 47 | .quirkproc = ide_undecoded_slave, |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static const struct ide_port_info delkin_cb_port_info = { | ||
51 | .port_ops = &delkin_cb_port_ops, | ||
52 | .host_flags = IDE_HFLAG_IO_32BIT | IDE_HFLAG_UNMASK_IRQS | | ||
53 | IDE_HFLAG_NO_DMA, | ||
54 | }; | ||
55 | |||
50 | static int __devinit | 56 | static int __devinit |
51 | delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) | 57 | delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) |
52 | { | 58 | { |
53 | unsigned long base; | 59 | unsigned long base; |
54 | hw_regs_t hw; | 60 | hw_regs_t hw; |
55 | ide_hwif_t *hwif = NULL; | 61 | ide_hwif_t *hwif = NULL; |
56 | ide_drive_t *drive; | ||
57 | int i, rc; | 62 | int i, rc; |
58 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 63 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
59 | 64 | ||
@@ -79,6 +84,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
79 | memset(&hw, 0, sizeof(hw)); | 84 | memset(&hw, 0, sizeof(hw)); |
80 | ide_std_init_ports(&hw, base + 0x10, base + 0x1e); | 85 | ide_std_init_ports(&hw, base + 0x10, base + 0x1e); |
81 | hw.irq = dev->irq; | 86 | hw.irq = dev->irq; |
87 | hw.dev = &dev->dev; | ||
82 | hw.chipset = ide_pci; /* this enables IRQ sharing */ | 88 | hw.chipset = ide_pci; /* this enables IRQ sharing */ |
83 | 89 | ||
84 | hwif = ide_find_port(); | 90 | hwif = ide_find_port(); |
@@ -89,26 +95,16 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
89 | 95 | ||
90 | ide_init_port_data(hwif, i); | 96 | ide_init_port_data(hwif, i); |
91 | ide_init_port_hw(hwif, &hw); | 97 | ide_init_port_hw(hwif, &hw); |
92 | hwif->port_ops = &delkin_cb_port_ops; | ||
93 | 98 | ||
94 | idx[0] = i; | 99 | idx[0] = i; |
95 | 100 | ||
96 | ide_device_add(idx, NULL); | 101 | ide_device_add(idx, &delkin_cb_port_info); |
97 | |||
98 | if (!hwif->present) | ||
99 | goto out_disable; | ||
100 | 102 | ||
101 | pci_set_drvdata(dev, hwif); | 103 | pci_set_drvdata(dev, hwif); |
102 | hwif->dev = &dev->dev; | 104 | |
103 | drive = &hwif->drives[0]; | ||
104 | if (drive->present) { | ||
105 | drive->io_32bit = 1; | ||
106 | drive->unmask = 1; | ||
107 | } | ||
108 | return 0; | 105 | return 0; |
109 | 106 | ||
110 | out_disable: | 107 | out_disable: |
111 | printk(KERN_ERR "delkin_cb: no IDE devices found\n"); | ||
112 | pci_release_regions(dev); | 108 | pci_release_regions(dev); |
113 | pci_disable_device(dev); | 109 | pci_disable_device(dev); |
114 | return -ENODEV; | 110 | return -ENODEV; |
@@ -139,14 +135,12 @@ static struct pci_driver driver = { | |||
139 | .remove = delkin_cb_remove, | 135 | .remove = delkin_cb_remove, |
140 | }; | 136 | }; |
141 | 137 | ||
142 | static int | 138 | static int __init delkin_cb_init(void) |
143 | delkin_cb_init (void) | ||
144 | { | 139 | { |
145 | return pci_register_driver(&driver); | 140 | return pci_register_driver(&driver); |
146 | } | 141 | } |
147 | 142 | ||
148 | static void | 143 | static void __exit delkin_cb_exit(void) |
149 | delkin_cb_exit (void) | ||
150 | { | 144 | { |
151 | pci_unregister_driver(&driver); | 145 | pci_unregister_driver(&driver); |
152 | } | 146 | } |
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 6e99080497bf..725c80508d90 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -81,8 +81,6 @@ | |||
81 | * 0.5 doesn't work. | 81 | * 0.5 doesn't work. |
82 | */ | 82 | */ |
83 | 83 | ||
84 | #define OPTI621_DEBUG /* define for debug messages */ | ||
85 | |||
86 | #include <linux/types.h> | 84 | #include <linux/types.h> |
87 | #include <linux/module.h> | 85 | #include <linux/module.h> |
88 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
@@ -92,28 +90,6 @@ | |||
92 | 90 | ||
93 | #include <asm/io.h> | 91 | #include <asm/io.h> |
94 | 92 | ||
95 | //#define OPTI621_MAX_PIO 3 | ||
96 | /* In fact, I do not have any PIO 4 drive | ||
97 | * (address: 25 ns, data: 70 ns, recovery: 35 ns), | ||
98 | * but OPTi 82C621 is programmable and it can do (minimal values): | ||
99 | * on 40MHz PCI bus (pulse 25 ns): | ||
100 | * address: 25 ns, data: 25 ns, recovery: 50 ns; | ||
101 | * on 20MHz PCI bus (pulse 50 ns): | ||
102 | * address: 50 ns, data: 50 ns, recovery: 100 ns. | ||
103 | */ | ||
104 | |||
105 | /* #define READ_PREFETCH 0 */ | ||
106 | /* Uncomment for disable read prefetch. | ||
107 | * There is some readprefetch capatibility in hdparm, | ||
108 | * but when I type hdparm -P 1 /dev/hda, I got errors | ||
109 | * and till reset drive is inaccessible. | ||
110 | * This (hw) read prefetch is safe on my drive. | ||
111 | */ | ||
112 | |||
113 | #ifndef READ_PREFETCH | ||
114 | #define READ_PREFETCH 0x40 /* read prefetch is enabled */ | ||
115 | #endif /* else read prefetch is disabled */ | ||
116 | |||
117 | #define READ_REG 0 /* index of Read cycle timing register */ | 93 | #define READ_REG 0 /* index of Read cycle timing register */ |
118 | #define WRITE_REG 1 /* index of Write cycle timing register */ | 94 | #define WRITE_REG 1 /* index of Write cycle timing register */ |
119 | #define CNTRL_REG 3 /* index of Control register */ | 95 | #define CNTRL_REG 3 /* index of Control register */ |
@@ -122,51 +98,8 @@ | |||
122 | 98 | ||
123 | static int reg_base; | 99 | static int reg_base; |
124 | 100 | ||
125 | #define PIO_NOT_EXIST 254 | ||
126 | #define PIO_DONT_KNOW 255 | ||
127 | |||
128 | static DEFINE_SPINLOCK(opti621_lock); | 101 | static DEFINE_SPINLOCK(opti621_lock); |
129 | 102 | ||
130 | /* there are stored pio numbers from other calls of opti621_set_pio_mode */ | ||
131 | static void compute_pios(ide_drive_t *drive, const u8 pio) | ||
132 | /* Store values into drive->drive_data | ||
133 | * second_contr - 0 for primary controller, 1 for secondary | ||
134 | * slave_drive - 0 -> pio is for master, 1 -> pio is for slave | ||
135 | * pio - PIO mode for selected drive (for other we don't know) | ||
136 | */ | ||
137 | { | ||
138 | int d; | ||
139 | ide_hwif_t *hwif = HWIF(drive); | ||
140 | |||
141 | drive->drive_data = pio; | ||
142 | |||
143 | for (d = 0; d < 2; ++d) { | ||
144 | drive = &hwif->drives[d]; | ||
145 | if (drive->present) { | ||
146 | if (drive->drive_data == PIO_DONT_KNOW) | ||
147 | drive->drive_data = ide_get_best_pio_mode(drive, 255, 3); | ||
148 | #ifdef OPTI621_DEBUG | ||
149 | printk("%s: Selected PIO mode %d\n", | ||
150 | drive->name, drive->drive_data); | ||
151 | #endif | ||
152 | } else { | ||
153 | drive->drive_data = PIO_NOT_EXIST; | ||
154 | } | ||
155 | } | ||
156 | } | ||
157 | |||
158 | static int cmpt_clk(int time, int bus_speed) | ||
159 | /* Returns (rounded up) time in clocks for time in ns, | ||
160 | * with bus_speed in MHz. | ||
161 | * Example: bus_speed = 40 MHz, time = 80 ns | ||
162 | * 1000/40 = 25 ns (clk value), | ||
163 | * 80/25 = 3.2, rounded up to 4 (I hope ;-)). | ||
164 | * Use idebus=xx to select right frequency. | ||
165 | */ | ||
166 | { | ||
167 | return ((time*bus_speed+999)/1000); | ||
168 | } | ||
169 | |||
170 | /* Write value to register reg, base of register | 103 | /* Write value to register reg, base of register |
171 | * is at reg_base (0x1f0 primary, 0x170 secondary, | 104 | * is at reg_base (0x1f0 primary, 0x170 secondary, |
172 | * if not changed by PCI configuration). | 105 | * if not changed by PCI configuration). |
@@ -199,83 +132,29 @@ static u8 read_reg(int reg) | |||
199 | return ret; | 132 | return ret; |
200 | } | 133 | } |
201 | 134 | ||
202 | typedef struct pio_clocks_s { | ||
203 | int address_time; /* Address setup (clocks) */ | ||
204 | int data_time; /* Active/data pulse (clocks) */ | ||
205 | int recovery_time; /* Recovery time (clocks) */ | ||
206 | } pio_clocks_t; | ||
207 | |||
208 | static void compute_clocks(int pio, pio_clocks_t *clks) | ||
209 | { | ||
210 | if (pio != PIO_NOT_EXIST) { | ||
211 | int adr_setup, data_pls; | ||
212 | int bus_speed = ide_pci_clk ? ide_pci_clk : system_bus_clock(); | ||
213 | |||
214 | adr_setup = ide_pio_timings[pio].setup_time; | ||
215 | data_pls = ide_pio_timings[pio].active_time; | ||
216 | clks->address_time = cmpt_clk(adr_setup, bus_speed); | ||
217 | clks->data_time = cmpt_clk(data_pls, bus_speed); | ||
218 | clks->recovery_time = cmpt_clk(ide_pio_timings[pio].cycle_time | ||
219 | - adr_setup-data_pls, bus_speed); | ||
220 | if (clks->address_time < 1) | ||
221 | clks->address_time = 1; | ||
222 | if (clks->address_time > 4) | ||
223 | clks->address_time = 4; | ||
224 | if (clks->data_time < 1) | ||
225 | clks->data_time = 1; | ||
226 | if (clks->data_time > 16) | ||
227 | clks->data_time = 16; | ||
228 | if (clks->recovery_time < 2) | ||
229 | clks->recovery_time = 2; | ||
230 | if (clks->recovery_time > 17) | ||
231 | clks->recovery_time = 17; | ||
232 | } else { | ||
233 | clks->address_time = 1; | ||
234 | clks->data_time = 1; | ||
235 | clks->recovery_time = 2; | ||
236 | /* minimal values */ | ||
237 | } | ||
238 | } | ||
239 | |||
240 | static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | 135 | static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) |
241 | { | 136 | { |
242 | /* primary and secondary drives share some registers, | 137 | ide_hwif_t *hwif = drive->hwif; |
243 | * so we have to program both drives | 138 | ide_drive_t *pair = ide_get_paired_drive(drive); |
244 | */ | ||
245 | unsigned long flags; | 139 | unsigned long flags; |
246 | u8 pio1 = 0, pio2 = 0; | 140 | u8 tim, misc, addr_pio = pio, clk; |
247 | pio_clocks_t first, second; | 141 | |
248 | int ax, drdy; | 142 | /* DRDY is default 2 (by OPTi Databook) */ |
249 | u8 cycle1, cycle2, misc; | 143 | static const u8 addr_timings[2][5] = { |
250 | ide_hwif_t *hwif = HWIF(drive); | 144 | { 0x20, 0x10, 0x00, 0x00, 0x00 }, /* 33 MHz */ |
251 | 145 | { 0x10, 0x10, 0x00, 0x00, 0x00 }, /* 25 MHz */ | |
252 | /* sets drive->drive_data for both drives */ | 146 | }; |
253 | compute_pios(drive, pio); | 147 | static const u8 data_rec_timings[2][5] = { |
254 | pio1 = hwif->drives[0].drive_data; | 148 | { 0x5b, 0x45, 0x32, 0x21, 0x20 }, /* 33 MHz */ |
255 | pio2 = hwif->drives[1].drive_data; | 149 | { 0x48, 0x34, 0x21, 0x10, 0x10 } /* 25 MHz */ |
256 | 150 | }; | |
257 | compute_clocks(pio1, &first); | 151 | |
258 | compute_clocks(pio2, &second); | 152 | drive->drive_data = XFER_PIO_0 + pio; |
259 | 153 | ||
260 | /* ax = max(a1,a2) */ | 154 | if (pair->present) { |
261 | ax = (first.address_time < second.address_time) ? second.address_time : first.address_time; | 155 | if (pair->drive_data && pair->drive_data < drive->drive_data) |
262 | 156 | addr_pio = pair->drive_data - XFER_PIO_0; | |
263 | drdy = 2; /* DRDY is default 2 (by OPTi Databook) */ | 157 | } |
264 | |||
265 | cycle1 = ((first.data_time-1)<<4) | (first.recovery_time-2); | ||
266 | cycle2 = ((second.data_time-1)<<4) | (second.recovery_time-2); | ||
267 | misc = READ_PREFETCH | ((ax-1)<<4) | ((drdy-2)<<1); | ||
268 | |||
269 | #ifdef OPTI621_DEBUG | ||
270 | printk("%s: master: address: %d, data: %d, " | ||
271 | "recovery: %d, drdy: %d [clk]\n", | ||
272 | hwif->name, ax, first.data_time, | ||
273 | first.recovery_time, drdy); | ||
274 | printk("%s: slave: address: %d, data: %d, " | ||
275 | "recovery: %d, drdy: %d [clk]\n", | ||
276 | hwif->name, ax, second.data_time, | ||
277 | second.recovery_time, drdy); | ||
278 | #endif | ||
279 | 158 | ||
280 | spin_lock_irqsave(&opti621_lock, flags); | 159 | spin_lock_irqsave(&opti621_lock, flags); |
281 | 160 | ||
@@ -289,24 +168,21 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
289 | (void)inb(reg_base + CNTRL_REG); | 168 | (void)inb(reg_base + CNTRL_REG); |
290 | /* if reads 0xc0, no interface exist? */ | 169 | /* if reads 0xc0, no interface exist? */ |
291 | read_reg(CNTRL_REG); | 170 | read_reg(CNTRL_REG); |
292 | /* read version, probably 0 */ | ||
293 | read_reg(STRAP_REG); | ||
294 | 171 | ||
295 | /* program primary drive */ | 172 | /* check CLK speed */ |
296 | /* select Index-0 for Register-A */ | 173 | clk = read_reg(STRAP_REG) & 1; |
297 | write_reg(0, MISC_REG); | 174 | |
298 | /* set read cycle timings */ | 175 | printk(KERN_INFO "%s: CLK = %d MHz\n", hwif->name, clk ? 25 : 33); |
299 | write_reg(cycle1, READ_REG); | ||
300 | /* set write cycle timings */ | ||
301 | write_reg(cycle1, WRITE_REG); | ||
302 | 176 | ||
303 | /* program secondary drive */ | 177 | tim = data_rec_timings[clk][pio]; |
304 | /* select Index-1 for Register-B */ | 178 | misc = addr_timings[clk][addr_pio]; |
305 | write_reg(1, MISC_REG); | 179 | |
180 | /* select Index-0/1 for Register-A/B */ | ||
181 | write_reg(drive->select.b.unit, MISC_REG); | ||
306 | /* set read cycle timings */ | 182 | /* set read cycle timings */ |
307 | write_reg(cycle2, READ_REG); | 183 | write_reg(tim, READ_REG); |
308 | /* set write cycle timings */ | 184 | /* set write cycle timings */ |
309 | write_reg(cycle2, WRITE_REG); | 185 | write_reg(tim, WRITE_REG); |
310 | 186 | ||
311 | /* use Register-A for drive 0 */ | 187 | /* use Register-A for drive 0 */ |
312 | /* use Register-B for drive 1 */ | 188 | /* use Register-B for drive 1 */ |
@@ -319,45 +195,26 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
319 | spin_unlock_irqrestore(&opti621_lock, flags); | 195 | spin_unlock_irqrestore(&opti621_lock, flags); |
320 | } | 196 | } |
321 | 197 | ||
322 | static void __devinit opti621_port_init_devs(ide_hwif_t *hwif) | ||
323 | { | ||
324 | hwif->drives[0].drive_data = PIO_DONT_KNOW; | ||
325 | hwif->drives[1].drive_data = PIO_DONT_KNOW; | ||
326 | } | ||
327 | |||
328 | static const struct ide_port_ops opti621_port_ops = { | 198 | static const struct ide_port_ops opti621_port_ops = { |
329 | .port_init_devs = opti621_port_init_devs, | ||
330 | .set_pio_mode = opti621_set_pio_mode, | 199 | .set_pio_mode = opti621_set_pio_mode, |
331 | }; | 200 | }; |
332 | 201 | ||
333 | static const struct ide_port_info opti621_chipsets[] __devinitdata = { | 202 | static const struct ide_port_info opti621_chipset __devinitdata = { |
334 | { /* 0 */ | 203 | .name = "OPTI621/X", |
335 | .name = "OPTI621", | 204 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, |
336 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, | 205 | .port_ops = &opti621_port_ops, |
337 | .port_ops = &opti621_port_ops, | 206 | .host_flags = IDE_HFLAG_NO_DMA, |
338 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 207 | .pio_mask = ATA_PIO4, |
339 | .pio_mask = ATA_PIO3, | ||
340 | .swdma_mask = ATA_SWDMA2, | ||
341 | .mwdma_mask = ATA_MWDMA2, | ||
342 | }, { /* 1 */ | ||
343 | .name = "OPTI621X", | ||
344 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, | ||
345 | .port_ops = &opti621_port_ops, | ||
346 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
347 | .pio_mask = ATA_PIO3, | ||
348 | .swdma_mask = ATA_SWDMA2, | ||
349 | .mwdma_mask = ATA_MWDMA2, | ||
350 | } | ||
351 | }; | 208 | }; |
352 | 209 | ||
353 | static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 210 | static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
354 | { | 211 | { |
355 | return ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]); | 212 | return ide_setup_pci_device(dev, &opti621_chipset); |
356 | } | 213 | } |
357 | 214 | ||
358 | static const struct pci_device_id opti621_pci_tbl[] = { | 215 | static const struct pci_device_id opti621_pci_tbl[] = { |
359 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 }, | 216 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 }, |
360 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 1 }, | 217 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 0 }, |
361 | { 0, }, | 218 | { 0, }, |
362 | }; | 219 | }; |
363 | MODULE_DEVICE_TABLE(pci, opti621_pci_tbl); | 220 | MODULE_DEVICE_TABLE(pci, opti621_pci_tbl); |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 4b0b85d8faf5..e127eb25ab63 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -569,6 +569,11 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi | |||
569 | { | 569 | { |
570 | struct ide_port_info d = sis5513_chipset; | 570 | struct ide_port_info d = sis5513_chipset; |
571 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; | 571 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; |
572 | int rc; | ||
573 | |||
574 | rc = pci_enable_device(dev); | ||
575 | if (rc) | ||
576 | return rc; | ||
572 | 577 | ||
573 | if (sis_find_family(dev) == 0) | 578 | if (sis_find_family(dev) == 0) |
574 | return -ENOTSUPP; | 579 | return -ENOTSUPP; |
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index f0e638dcc3ab..236f9c38e519 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c | |||
@@ -303,6 +303,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port) | |||
303 | pcmp->pcmc_per = 0x100000 >> (16 * _slot_); | 303 | pcmp->pcmc_per = 0x100000 >> (16 * _slot_); |
304 | #endif /* CONFIG_IDE_8xx_PCCARD */ | 304 | #endif /* CONFIG_IDE_8xx_PCCARD */ |
305 | 305 | ||
306 | hw->chipset = ide_generic; | ||
307 | |||
306 | return 0; | 308 | return 0; |
307 | } | 309 | } |
308 | #endif /* CONFIG_IDE_8xx_PCCARD || CONFIG_IDE_8xx_DIRECT */ | 310 | #endif /* CONFIG_IDE_8xx_PCCARD || CONFIG_IDE_8xx_DIRECT */ |
@@ -377,6 +379,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port) | |||
377 | ((immap_t *) IMAP_ADDR)->im_siu_conf.sc_siel |= | 379 | ((immap_t *) IMAP_ADDR)->im_siu_conf.sc_siel |= |
378 | (0x80000000 >> ioport_dsc[data_port].irq); | 380 | (0x80000000 >> ioport_dsc[data_port].irq); |
379 | 381 | ||
382 | hw->chipset = ide_generic; | ||
383 | |||
380 | return 0; | 384 | return 0; |
381 | } | 385 | } |
382 | #endif /* CONFIG_IDE_8xx_DIRECT */ | 386 | #endif /* CONFIG_IDE_8xx_DIRECT */ |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 48aa019127bc..ba2d58727964 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -59,7 +59,6 @@ typedef struct pmac_ide_hwif { | |||
59 | int irq; | 59 | int irq; |
60 | int kind; | 60 | int kind; |
61 | int aapl_bus_id; | 61 | int aapl_bus_id; |
62 | unsigned cable_80 : 1; | ||
63 | unsigned mediabay : 1; | 62 | unsigned mediabay : 1; |
64 | unsigned broken_dma : 1; | 63 | unsigned broken_dma : 1; |
65 | unsigned broken_dma_warn : 1; | 64 | unsigned broken_dma_warn : 1; |
@@ -918,10 +917,40 @@ pmac_ide_do_resume(ide_hwif_t *hwif) | |||
918 | return 0; | 917 | return 0; |
919 | } | 918 | } |
920 | 919 | ||
920 | static u8 pmac_ide_cable_detect(ide_hwif_t *hwif) | ||
921 | { | ||
922 | pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)ide_get_hwifdata(hwif); | ||
923 | struct device_node *np = pmif->node; | ||
924 | const char *cable = of_get_property(np, "cable-type", NULL); | ||
925 | |||
926 | /* Get cable type from device-tree. */ | ||
927 | if (cable && !strncmp(cable, "80-", 3)) | ||
928 | return ATA_CBL_PATA80; | ||
929 | |||
930 | /* | ||
931 | * G5's seem to have incorrect cable type in device-tree. | ||
932 | * Let's assume they have a 80 conductor cable, this seem | ||
933 | * to be always the case unless the user mucked around. | ||
934 | */ | ||
935 | if (of_device_is_compatible(np, "K2-UATA") || | ||
936 | of_device_is_compatible(np, "shasta-ata")) | ||
937 | return ATA_CBL_PATA80; | ||
938 | |||
939 | return ATA_CBL_PATA40; | ||
940 | } | ||
941 | |||
921 | static const struct ide_port_ops pmac_ide_ata6_port_ops = { | 942 | static const struct ide_port_ops pmac_ide_ata6_port_ops = { |
922 | .set_pio_mode = pmac_ide_set_pio_mode, | 943 | .set_pio_mode = pmac_ide_set_pio_mode, |
923 | .set_dma_mode = pmac_ide_set_dma_mode, | 944 | .set_dma_mode = pmac_ide_set_dma_mode, |
924 | .selectproc = pmac_ide_kauai_selectproc, | 945 | .selectproc = pmac_ide_kauai_selectproc, |
946 | .cable_detect = pmac_ide_cable_detect, | ||
947 | }; | ||
948 | |||
949 | static const struct ide_port_ops pmac_ide_ata4_port_ops = { | ||
950 | .set_pio_mode = pmac_ide_set_pio_mode, | ||
951 | .set_dma_mode = pmac_ide_set_dma_mode, | ||
952 | .selectproc = pmac_ide_selectproc, | ||
953 | .cable_detect = pmac_ide_cable_detect, | ||
925 | }; | 954 | }; |
926 | 955 | ||
927 | static const struct ide_port_ops pmac_ide_port_ops = { | 956 | static const struct ide_port_ops pmac_ide_port_ops = { |
@@ -949,10 +978,7 @@ static const struct ide_port_info pmac_port_info = { | |||
949 | 978 | ||
950 | /* | 979 | /* |
951 | * Setup, register & probe an IDE channel driven by this driver, this is | 980 | * Setup, register & probe an IDE channel driven by this driver, this is |
952 | * called by one of the 2 probe functions (macio or PCI). Note that a channel | 981 | * called by one of the 2 probe functions (macio or PCI). |
953 | * that ends up beeing free of any device is not kept around by this driver | ||
954 | * (it is kept in 2.4). This introduce an interface numbering change on some | ||
955 | * rare machines unfortunately, but it's better this way. | ||
956 | */ | 982 | */ |
957 | static int __devinit | 983 | static int __devinit |
958 | pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | 984 | pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) |
@@ -962,7 +988,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | |||
962 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 988 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
963 | struct ide_port_info d = pmac_port_info; | 989 | struct ide_port_info d = pmac_port_info; |
964 | 990 | ||
965 | pmif->cable_80 = 0; | ||
966 | pmif->broken_dma = pmif->broken_dma_warn = 0; | 991 | pmif->broken_dma = pmif->broken_dma_warn = 0; |
967 | if (of_device_is_compatible(np, "shasta-ata")) { | 992 | if (of_device_is_compatible(np, "shasta-ata")) { |
968 | pmif->kind = controller_sh_ata6; | 993 | pmif->kind = controller_sh_ata6; |
@@ -979,6 +1004,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | |||
979 | } else if (of_device_is_compatible(np, "keylargo-ata")) { | 1004 | } else if (of_device_is_compatible(np, "keylargo-ata")) { |
980 | if (strcmp(np->name, "ata-4") == 0) { | 1005 | if (strcmp(np->name, "ata-4") == 0) { |
981 | pmif->kind = controller_kl_ata4; | 1006 | pmif->kind = controller_kl_ata4; |
1007 | d.port_ops = &pmac_ide_ata4_port_ops; | ||
982 | d.udma_mask = ATA_UDMA4; | 1008 | d.udma_mask = ATA_UDMA4; |
983 | } else | 1009 | } else |
984 | pmif->kind = controller_kl_ata3; | 1010 | pmif->kind = controller_kl_ata3; |
@@ -992,22 +1018,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | |||
992 | bidp = of_get_property(np, "AAPL,bus-id", NULL); | 1018 | bidp = of_get_property(np, "AAPL,bus-id", NULL); |
993 | pmif->aapl_bus_id = bidp ? *bidp : 0; | 1019 | pmif->aapl_bus_id = bidp ? *bidp : 0; |
994 | 1020 | ||
995 | /* Get cable type from device-tree */ | ||
996 | if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6 | ||
997 | || pmif->kind == controller_k2_ata6 | ||
998 | || pmif->kind == controller_sh_ata6) { | ||
999 | const char* cable = of_get_property(np, "cable-type", NULL); | ||
1000 | if (cable && !strncmp(cable, "80-", 3)) | ||
1001 | pmif->cable_80 = 1; | ||
1002 | } | ||
1003 | /* G5's seem to have incorrect cable type in device-tree. Let's assume | ||
1004 | * they have a 80 conductor cable, this seem to be always the case unless | ||
1005 | * the user mucked around | ||
1006 | */ | ||
1007 | if (of_device_is_compatible(np, "K2-UATA") || | ||
1008 | of_device_is_compatible(np, "shasta-ata")) | ||
1009 | pmif->cable_80 = 1; | ||
1010 | |||
1011 | /* On Kauai-type controllers, we make sure the FCR is correct */ | 1021 | /* On Kauai-type controllers, we make sure the FCR is correct */ |
1012 | if (pmif->kauai_fcr) | 1022 | if (pmif->kauai_fcr) |
1013 | writel(KAUAI_FCR_UATA_MAGIC | | 1023 | writel(KAUAI_FCR_UATA_MAGIC | |
@@ -1053,7 +1063,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | |||
1053 | 1063 | ||
1054 | hwif->hwif_data = pmif; | 1064 | hwif->hwif_data = pmif; |
1055 | ide_init_port_hw(hwif, hw); | 1065 | ide_init_port_hw(hwif, hw); |
1056 | hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40; | ||
1057 | 1066 | ||
1058 | printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", | 1067 | printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", |
1059 | hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, | 1068 | hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, |
@@ -1070,11 +1079,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) | |||
1070 | } | 1079 | } |
1071 | } | 1080 | } |
1072 | 1081 | ||
1073 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1074 | if (pmif->cable_80 == 0) | ||
1075 | d.udma_mask &= ATA_UDMA2; | ||
1076 | #endif | ||
1077 | |||
1078 | idx[0] = hwif->index; | 1082 | idx[0] = hwif->index; |
1079 | 1083 | ||
1080 | ide_device_add(idx, &d); | 1084 | ide_device_add(idx, &d); |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 16b9d0ad154e..a5ceff287a28 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -1539,15 +1539,13 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb, | |||
1539 | 1539 | ||
1540 | static void sbp2_create_command_orb(struct sbp2_lu *lu, | 1540 | static void sbp2_create_command_orb(struct sbp2_lu *lu, |
1541 | struct sbp2_command_info *cmd, | 1541 | struct sbp2_command_info *cmd, |
1542 | unchar *scsi_cmd, | 1542 | struct scsi_cmnd *SCpnt) |
1543 | unsigned int scsi_use_sg, | ||
1544 | unsigned int scsi_request_bufflen, | ||
1545 | struct scatterlist *sg, | ||
1546 | enum dma_data_direction dma_dir) | ||
1547 | { | 1543 | { |
1548 | struct sbp2_fwhost_info *hi = lu->hi; | 1544 | struct sbp2_fwhost_info *hi = lu->hi; |
1549 | struct sbp2_command_orb *orb = &cmd->command_orb; | 1545 | struct sbp2_command_orb *orb = &cmd->command_orb; |
1550 | u32 orb_direction; | 1546 | u32 orb_direction; |
1547 | unsigned int scsi_request_bufflen = scsi_bufflen(SCpnt); | ||
1548 | enum dma_data_direction dma_dir = SCpnt->sc_data_direction; | ||
1551 | 1549 | ||
1552 | /* | 1550 | /* |
1553 | * Set-up our command ORB. | 1551 | * Set-up our command ORB. |
@@ -1580,13 +1578,14 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu, | |||
1580 | orb->data_descriptor_lo = 0x0; | 1578 | orb->data_descriptor_lo = 0x0; |
1581 | orb->misc |= ORB_SET_DIRECTION(1); | 1579 | orb->misc |= ORB_SET_DIRECTION(1); |
1582 | } else | 1580 | } else |
1583 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sg, | 1581 | sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_sg_count(SCpnt), |
1582 | scsi_sglist(SCpnt), | ||
1584 | orb_direction, dma_dir); | 1583 | orb_direction, dma_dir); |
1585 | 1584 | ||
1586 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); | 1585 | sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); |
1587 | 1586 | ||
1588 | memset(orb->cdb, 0, 12); | 1587 | memset(orb->cdb, 0, sizeof(orb->cdb)); |
1589 | memcpy(orb->cdb, scsi_cmd, COMMAND_SIZE(*scsi_cmd)); | 1588 | memcpy(orb->cdb, SCpnt->cmnd, SCpnt->cmd_len); |
1590 | } | 1589 | } |
1591 | 1590 | ||
1592 | static void sbp2_link_orb_command(struct sbp2_lu *lu, | 1591 | static void sbp2_link_orb_command(struct sbp2_lu *lu, |
@@ -1669,16 +1668,13 @@ static void sbp2_link_orb_command(struct sbp2_lu *lu, | |||
1669 | static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, | 1668 | static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, |
1670 | void (*done)(struct scsi_cmnd *)) | 1669 | void (*done)(struct scsi_cmnd *)) |
1671 | { | 1670 | { |
1672 | unchar *scsi_cmd = (unchar *)SCpnt->cmnd; | ||
1673 | struct sbp2_command_info *cmd; | 1671 | struct sbp2_command_info *cmd; |
1674 | 1672 | ||
1675 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); | 1673 | cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); |
1676 | if (!cmd) | 1674 | if (!cmd) |
1677 | return -EIO; | 1675 | return -EIO; |
1678 | 1676 | ||
1679 | sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt), | 1677 | sbp2_create_command_orb(lu, cmd, SCpnt); |
1680 | scsi_bufflen(SCpnt), scsi_sglist(SCpnt), | ||
1681 | SCpnt->sc_data_direction); | ||
1682 | sbp2_link_orb_command(lu, cmd); | 1678 | sbp2_link_orb_command(lu, cmd); |
1683 | 1679 | ||
1684 | return 0; | 1680 | return 0; |
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index fbe16d5250a4..1adf2efd3cb3 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -747,7 +747,9 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv, | |||
747 | break; | 747 | break; |
748 | case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED: | 748 | case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED: |
749 | kmem_cache_free(ib_mad_cache, mad_priv); | 749 | kmem_cache_free(ib_mad_cache, mad_priv); |
750 | break; | 750 | kfree(local); |
751 | ret = 1; | ||
752 | goto out; | ||
751 | case IB_MAD_RESULT_SUCCESS: | 753 | case IB_MAD_RESULT_SUCCESS: |
752 | /* Treat like an incoming receive MAD */ | 754 | /* Treat like an incoming receive MAD */ |
753 | port_priv = ib_get_mad_port(mad_agent_priv->agent.device, | 755 | port_priv = ib_get_mad_port(mad_agent_priv->agent.device, |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index fe78f7d25099..a1768dbb0720 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -150,7 +150,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, | |||
150 | ret = 0; | 150 | ret = 0; |
151 | while (npages) { | 151 | while (npages) { |
152 | ret = get_user_pages(current, current->mm, cur_base, | 152 | ret = get_user_pages(current, current->mm, cur_base, |
153 | min_t(int, npages, | 153 | min_t(unsigned long, npages, |
154 | PAGE_SIZE / sizeof (struct page *)), | 154 | PAGE_SIZE / sizeof (struct page *)), |
155 | 1, !umem->writable, page_list, vma_list); | 155 | 1, !umem->writable, page_list, vma_list); |
156 | 156 | ||
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 3aa2db54eae4..840ede9ae965 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c | |||
@@ -1005,8 +1005,9 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, | |||
1005 | if (cdev_add(port->cdev, base_dev + port->dev_num, 1)) | 1005 | if (cdev_add(port->cdev, base_dev + port->dev_num, 1)) |
1006 | goto err_cdev; | 1006 | goto err_cdev; |
1007 | 1007 | ||
1008 | port->dev = device_create(umad_class, device->dma_device, | 1008 | port->dev = device_create_drvdata(umad_class, device->dma_device, |
1009 | port->cdev->dev, "umad%d", port->dev_num); | 1009 | port->cdev->dev, port, |
1010 | "umad%d", port->dev_num); | ||
1010 | if (IS_ERR(port->dev)) | 1011 | if (IS_ERR(port->dev)) |
1011 | goto err_cdev; | 1012 | goto err_cdev; |
1012 | 1013 | ||
@@ -1024,15 +1025,12 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, | |||
1024 | if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) | 1025 | if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) |
1025 | goto err_sm_cdev; | 1026 | goto err_sm_cdev; |
1026 | 1027 | ||
1027 | port->sm_dev = device_create(umad_class, device->dma_device, | 1028 | port->sm_dev = device_create_drvdata(umad_class, device->dma_device, |
1028 | port->sm_cdev->dev, | 1029 | port->sm_cdev->dev, port, |
1029 | "issm%d", port->dev_num); | 1030 | "issm%d", port->dev_num); |
1030 | if (IS_ERR(port->sm_dev)) | 1031 | if (IS_ERR(port->sm_dev)) |
1031 | goto err_sm_cdev; | 1032 | goto err_sm_cdev; |
1032 | 1033 | ||
1033 | dev_set_drvdata(port->dev, port); | ||
1034 | dev_set_drvdata(port->sm_dev, port); | ||
1035 | |||
1036 | if (device_create_file(port->sm_dev, &dev_attr_ibdev)) | 1034 | if (device_create_file(port->sm_dev, &dev_attr_ibdev)) |
1037 | goto err_sm_dev; | 1035 | goto err_sm_dev; |
1038 | if (device_create_file(port->sm_dev, &dev_attr_port)) | 1036 | if (device_create_file(port->sm_dev, &dev_attr_port)) |
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index cc1afa28c181..f806da184b51 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -755,14 +755,15 @@ static void ib_uverbs_add_one(struct ib_device *device) | |||
755 | if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1)) | 755 | if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1)) |
756 | goto err_cdev; | 756 | goto err_cdev; |
757 | 757 | ||
758 | uverbs_dev->dev = device_create(uverbs_class, device->dma_device, | 758 | uverbs_dev->dev = device_create_drvdata(uverbs_class, |
759 | uverbs_dev->cdev->dev, | 759 | device->dma_device, |
760 | "uverbs%d", uverbs_dev->devnum); | 760 | uverbs_dev->cdev->dev, |
761 | uverbs_dev, | ||
762 | "uverbs%d", | ||
763 | uverbs_dev->devnum); | ||
761 | if (IS_ERR(uverbs_dev->dev)) | 764 | if (IS_ERR(uverbs_dev->dev)) |
762 | goto err_cdev; | 765 | goto err_cdev; |
763 | 766 | ||
764 | dev_set_drvdata(uverbs_dev->dev, uverbs_dev); | ||
765 | |||
766 | if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev)) | 767 | if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev)) |
767 | goto err_class; | 768 | goto err_class; |
768 | if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version)) | 769 | if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version)) |
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index 9a054c6941a4..b1441aeb60c2 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
@@ -455,8 +455,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) | |||
455 | IB_DEVICE_CURR_QP_STATE_MOD | | 455 | IB_DEVICE_CURR_QP_STATE_MOD | |
456 | IB_DEVICE_SYS_IMAGE_GUID | | 456 | IB_DEVICE_SYS_IMAGE_GUID | |
457 | IB_DEVICE_ZERO_STAG | | 457 | IB_DEVICE_ZERO_STAG | |
458 | IB_DEVICE_MEM_WINDOW | | 458 | IB_DEVICE_MEM_WINDOW); |
459 | IB_DEVICE_SEND_W_INV); | ||
460 | 459 | ||
461 | /* Allocate the qptr_array */ | 460 | /* Allocate the qptr_array */ |
462 | c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); | 461 | c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index 79dbe5beae52..992613799228 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -229,7 +229,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
229 | struct ib_send_wr **bad_wr) | 229 | struct ib_send_wr **bad_wr) |
230 | { | 230 | { |
231 | int err = 0; | 231 | int err = 0; |
232 | u8 t3_wr_flit_cnt; | 232 | u8 uninitialized_var(t3_wr_flit_cnt); |
233 | enum t3_wr_opcode t3_wr_opcode = 0; | 233 | enum t3_wr_opcode t3_wr_opcode = 0; |
234 | enum t3_wr_flags t3_wr_flags; | 234 | enum t3_wr_flags t3_wr_flags; |
235 | struct iwch_qp *qhp; | 235 | struct iwch_qp *qhp; |
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index bbe0436f4f75..f093b0033daf 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c | |||
@@ -421,8 +421,10 @@ int ehca_post_send(struct ib_qp *qp, | |||
421 | int ret = 0; | 421 | int ret = 0; |
422 | unsigned long flags; | 422 | unsigned long flags; |
423 | 423 | ||
424 | if (unlikely(my_qp->state != IB_QPS_RTS)) { | 424 | /* Reject WR if QP is in RESET, INIT or RTR state */ |
425 | ehca_err(qp->device, "QP not in RTS state qpn=%x", qp->qp_num); | 425 | if (unlikely(my_qp->state < IB_QPS_RTS)) { |
426 | ehca_err(qp->device, "Invalid QP state qp_state=%d qpn=%x", | ||
427 | my_qp->state, qp->qp_num); | ||
426 | return -EINVAL; | 428 | return -EINVAL; |
427 | } | 429 | } |
428 | 430 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 59a8b254b97f..0bd8bcb184a1 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -232,6 +232,11 @@ struct ipath_sdma_desc { | |||
232 | #define IPATH_SDMA_TXREQ_S_ABORTED 2 | 232 | #define IPATH_SDMA_TXREQ_S_ABORTED 2 |
233 | #define IPATH_SDMA_TXREQ_S_SHUTDOWN 3 | 233 | #define IPATH_SDMA_TXREQ_S_SHUTDOWN 3 |
234 | 234 | ||
235 | #define IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG (1ull << 63) | ||
236 | #define IPATH_SDMA_STATUS_ABORT_IN_PROG (1ull << 62) | ||
237 | #define IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE (1ull << 61) | ||
238 | #define IPATH_SDMA_STATUS_SCB_EMPTY (1ull << 30) | ||
239 | |||
235 | /* max dwords in small buffer packet */ | 240 | /* max dwords in small buffer packet */ |
236 | #define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2) | 241 | #define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2) |
237 | 242 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index 1ff46ae7dd99..5f9315d77a43 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
@@ -1492,6 +1492,10 @@ static int process_subn(struct ib_device *ibdev, int mad_flags, | |||
1492 | goto bail; | 1492 | goto bail; |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | case IB_MGMT_METHOD_TRAP: | ||
1496 | case IB_MGMT_METHOD_REPORT: | ||
1497 | case IB_MGMT_METHOD_REPORT_RESP: | ||
1498 | case IB_MGMT_METHOD_TRAP_REPRESS: | ||
1495 | case IB_MGMT_METHOD_GET_RESP: | 1499 | case IB_MGMT_METHOD_GET_RESP: |
1496 | /* | 1500 | /* |
1497 | * The ib_mad module will call us to process responses | 1501 | * The ib_mad module will call us to process responses |
diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c index 3697449c1ba4..eaba03273e4f 100644 --- a/drivers/infiniband/hw/ipath/ipath_sdma.c +++ b/drivers/infiniband/hw/ipath/ipath_sdma.c | |||
@@ -263,14 +263,10 @@ static void sdma_abort_task(unsigned long opaque) | |||
263 | hwstatus = ipath_read_kreg64(dd, | 263 | hwstatus = ipath_read_kreg64(dd, |
264 | dd->ipath_kregs->kr_senddmastatus); | 264 | dd->ipath_kregs->kr_senddmastatus); |
265 | 265 | ||
266 | if (/* ScoreBoardDrainInProg */ | 266 | if ((hwstatus & (IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG | |
267 | test_bit(63, &hwstatus) || | 267 | IPATH_SDMA_STATUS_ABORT_IN_PROG | |
268 | /* AbortInProg */ | 268 | IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE)) || |
269 | test_bit(62, &hwstatus) || | 269 | !(hwstatus & IPATH_SDMA_STATUS_SCB_EMPTY)) { |
270 | /* InternalSDmaEnable */ | ||
271 | test_bit(61, &hwstatus) || | ||
272 | /* ScbEmpty */ | ||
273 | !test_bit(30, &hwstatus)) { | ||
274 | if (dd->ipath_sdma_reset_wait > 0) { | 270 | if (dd->ipath_sdma_reset_wait > 0) { |
275 | /* not done shutting down sdma */ | 271 | /* not done shutting down sdma */ |
276 | --dd->ipath_sdma_reset_wait; | 272 | --dd->ipath_sdma_reset_wait; |
@@ -345,7 +341,7 @@ resched: | |||
345 | * state change | 341 | * state change |
346 | */ | 342 | */ |
347 | if (jiffies > dd->ipath_sdma_abort_jiffies) { | 343 | if (jiffies > dd->ipath_sdma_abort_jiffies) { |
348 | ipath_dbg("looping with status 0x%016llx\n", | 344 | ipath_dbg("looping with status 0x%08lx\n", |
349 | dd->ipath_sdma_status); | 345 | dd->ipath_sdma_status); |
350 | dd->ipath_sdma_abort_jiffies = jiffies + 5 * HZ; | 346 | dd->ipath_sdma_abort_jiffies = jiffies + 5 * HZ; |
351 | } | 347 | } |
@@ -615,7 +611,7 @@ void ipath_restart_sdma(struct ipath_devdata *dd) | |||
615 | } | 611 | } |
616 | spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags); | 612 | spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags); |
617 | if (!needed) { | 613 | if (!needed) { |
618 | ipath_dbg("invalid attempt to restart SDMA, status 0x%016llx\n", | 614 | ipath_dbg("invalid attempt to restart SDMA, status 0x%08lx\n", |
619 | dd->ipath_sdma_status); | 615 | dd->ipath_sdma_status); |
620 | goto bail; | 616 | goto bail; |
621 | } | 617 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c index 7fd18e833907..0596ec16fcbd 100644 --- a/drivers/infiniband/hw/ipath/ipath_uc.c +++ b/drivers/infiniband/hw/ipath/ipath_uc.c | |||
@@ -407,12 +407,11 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
407 | dev->n_pkt_drops++; | 407 | dev->n_pkt_drops++; |
408 | goto done; | 408 | goto done; |
409 | } | 409 | } |
410 | /* XXX Need to free SGEs */ | 410 | wc.opcode = IB_WC_RECV; |
411 | last_imm: | 411 | last_imm: |
412 | ipath_copy_sge(&qp->r_sge, data, tlen); | 412 | ipath_copy_sge(&qp->r_sge, data, tlen); |
413 | wc.wr_id = qp->r_wr_id; | 413 | wc.wr_id = qp->r_wr_id; |
414 | wc.status = IB_WC_SUCCESS; | 414 | wc.status = IB_WC_SUCCESS; |
415 | wc.opcode = IB_WC_RECV; | ||
416 | wc.qp = &qp->ibqp; | 415 | wc.qp = &qp->ibqp; |
417 | wc.src_qp = qp->remote_qpn; | 416 | wc.src_qp = qp->remote_qpn; |
418 | wc.slid = qp->remote_ah_attr.dlid; | 417 | wc.slid = qp->remote_ah_attr.dlid; |
@@ -514,6 +513,7 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
514 | goto done; | 513 | goto done; |
515 | } | 514 | } |
516 | wc.byte_len = qp->r_len; | 515 | wc.byte_len = qp->r_len; |
516 | wc.opcode = IB_WC_RECV_RDMA_WITH_IMM; | ||
517 | goto last_imm; | 517 | goto last_imm; |
518 | 518 | ||
519 | case OP(RDMA_WRITE_LAST): | 519 | case OP(RDMA_WRITE_LAST): |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 5d830d87ebca..38c44dec51ca 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -1495,7 +1495,8 @@ static int ipath_query_device(struct ib_device *ibdev, | |||
1495 | 1495 | ||
1496 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | | 1496 | props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | |
1497 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | | 1497 | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | |
1498 | IB_DEVICE_SYS_IMAGE_GUID; | 1498 | IB_DEVICE_SYS_IMAGE_GUID | IB_DEVICE_RC_RNR_NAK_GEN | |
1499 | IB_DEVICE_PORT_ACTIVE_EVENT | IB_DEVICE_SRQ_RESIZE; | ||
1499 | props->page_size_cap = PAGE_SIZE; | 1500 | props->page_size_cap = PAGE_SIZE; |
1500 | props->vendor_id = dev->dd->ipath_vendorid; | 1501 | props->vendor_id = dev->dd->ipath_vendorid; |
1501 | props->vendor_part_id = dev->dd->ipath_deviceid; | 1502 | props->vendor_part_id = dev->dd->ipath_deviceid; |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 8e02ecfec188..a80df22deae8 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -333,6 +333,9 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, | |||
333 | cap->max_inline_data + sizeof (struct mlx4_wqe_inline_seg)) + | 333 | cap->max_inline_data + sizeof (struct mlx4_wqe_inline_seg)) + |
334 | send_wqe_overhead(type, qp->flags); | 334 | send_wqe_overhead(type, qp->flags); |
335 | 335 | ||
336 | if (s > dev->dev->caps.max_sq_desc_sz) | ||
337 | return -EINVAL; | ||
338 | |||
336 | /* | 339 | /* |
337 | * Hermon supports shrinking WQEs, such that a single work | 340 | * Hermon supports shrinking WQEs, such that a single work |
338 | * request can include multiple units of 1 << wqe_shift. This | 341 | * request can include multiple units of 1 << wqe_shift. This |
@@ -372,9 +375,6 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, | |||
372 | qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s)); | 375 | qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s)); |
373 | 376 | ||
374 | for (;;) { | 377 | for (;;) { |
375 | if (1 << qp->sq.wqe_shift > dev->dev->caps.max_sq_desc_sz) | ||
376 | return -EINVAL; | ||
377 | |||
378 | qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift); | 378 | qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift); |
379 | 379 | ||
380 | /* | 380 | /* |
@@ -395,7 +395,8 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, | |||
395 | ++qp->sq.wqe_shift; | 395 | ++qp->sq.wqe_shift; |
396 | } | 396 | } |
397 | 397 | ||
398 | qp->sq.max_gs = ((qp->sq_max_wqes_per_wr << qp->sq.wqe_shift) - | 398 | qp->sq.max_gs = (min(dev->dev->caps.max_sq_desc_sz, |
399 | (qp->sq_max_wqes_per_wr << qp->sq.wqe_shift)) - | ||
399 | send_wqe_overhead(type, qp->flags)) / | 400 | send_wqe_overhead(type, qp->flags)) / |
400 | sizeof (struct mlx4_wqe_data_seg); | 401 | sizeof (struct mlx4_wqe_data_seg); |
401 | 402 | ||
@@ -411,7 +412,9 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, | |||
411 | 412 | ||
412 | cap->max_send_wr = qp->sq.max_post = | 413 | cap->max_send_wr = qp->sq.max_post = |
413 | (qp->sq.wqe_cnt - qp->sq_spare_wqes) / qp->sq_max_wqes_per_wr; | 414 | (qp->sq.wqe_cnt - qp->sq_spare_wqes) / qp->sq_max_wqes_per_wr; |
414 | cap->max_send_sge = qp->sq.max_gs; | 415 | cap->max_send_sge = min(qp->sq.max_gs, |
416 | min(dev->dev->caps.max_sq_sg, | ||
417 | dev->dev->caps.max_rq_sg)); | ||
415 | /* We don't support inline sends for kernel QPs (yet) */ | 418 | /* We don't support inline sends for kernel QPs (yet) */ |
416 | cap->max_inline_data = 0; | 419 | cap->max_inline_data = 0; |
417 | 420 | ||
@@ -1457,7 +1460,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
1457 | unsigned ind; | 1460 | unsigned ind; |
1458 | int uninitialized_var(stamp); | 1461 | int uninitialized_var(stamp); |
1459 | int uninitialized_var(size); | 1462 | int uninitialized_var(size); |
1460 | unsigned seglen; | 1463 | unsigned uninitialized_var(seglen); |
1461 | int i; | 1464 | int i; |
1462 | 1465 | ||
1463 | spin_lock_irqsave(&qp->sq.lock, flags); | 1466 | spin_lock_irqsave(&qp->sq.lock, flags); |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 9ebadd6e0cfb..200cf13fc9bb 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "mthca_cmd.h" | 45 | #include "mthca_cmd.h" |
46 | #include "mthca_profile.h" | 46 | #include "mthca_profile.h" |
47 | #include "mthca_memfree.h" | 47 | #include "mthca_memfree.h" |
48 | #include "mthca_wqe.h" | ||
48 | 49 | ||
49 | MODULE_AUTHOR("Roland Dreier"); | 50 | MODULE_AUTHOR("Roland Dreier"); |
50 | MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver"); | 51 | MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver"); |
@@ -200,7 +201,18 @@ static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim) | |||
200 | mdev->limits.gid_table_len = dev_lim->max_gids; | 201 | mdev->limits.gid_table_len = dev_lim->max_gids; |
201 | mdev->limits.pkey_table_len = dev_lim->max_pkeys; | 202 | mdev->limits.pkey_table_len = dev_lim->max_pkeys; |
202 | mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay; | 203 | mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay; |
203 | mdev->limits.max_sg = dev_lim->max_sg; | 204 | /* |
205 | * Need to allow for worst case send WQE overhead and check | ||
206 | * whether max_desc_sz imposes a lower limit than max_sg; UD | ||
207 | * send has the biggest overhead. | ||
208 | */ | ||
209 | mdev->limits.max_sg = min_t(int, dev_lim->max_sg, | ||
210 | (dev_lim->max_desc_sz - | ||
211 | sizeof (struct mthca_next_seg) - | ||
212 | (mthca_is_memfree(mdev) ? | ||
213 | sizeof (struct mthca_arbel_ud_seg) : | ||
214 | sizeof (struct mthca_tavor_ud_seg))) / | ||
215 | sizeof (struct mthca_data_seg)); | ||
204 | mdev->limits.max_wqes = dev_lim->max_qp_sz; | 216 | mdev->limits.max_wqes = dev_lim->max_qp_sz; |
205 | mdev->limits.max_qp_init_rdma = dev_lim->max_requester_per_qp; | 217 | mdev->limits.max_qp_init_rdma = dev_lim->max_requester_per_qp; |
206 | mdev->limits.reserved_qps = dev_lim->reserved_qps; | 218 | mdev->limits.reserved_qps = dev_lim->reserved_qps; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index d00a2c174aee..3f663fb852c1 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -194,7 +194,13 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
194 | /* Set the cached Q_Key before we attach if it's the broadcast group */ | 194 | /* Set the cached Q_Key before we attach if it's the broadcast group */ |
195 | if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4, | 195 | if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4, |
196 | sizeof (union ib_gid))) { | 196 | sizeof (union ib_gid))) { |
197 | spin_lock_irq(&priv->lock); | ||
198 | if (!priv->broadcast) { | ||
199 | spin_unlock_irq(&priv->lock); | ||
200 | return -EAGAIN; | ||
201 | } | ||
197 | priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); | 202 | priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); |
203 | spin_unlock_irq(&priv->lock); | ||
198 | priv->tx_wr.wr.ud.remote_qkey = priv->qkey; | 204 | priv->tx_wr.wr.ud.remote_qkey = priv->qkey; |
199 | } | 205 | } |
200 | 206 | ||
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c index a293e8b3f508..8a77bfcd05bc 100644 --- a/drivers/input/keyboard/aaed2000_kbd.c +++ b/drivers/input/keyboard/aaed2000_kbd.c | |||
@@ -183,4 +183,4 @@ module_exit(aaedkbd_exit); | |||
183 | 183 | ||
184 | MODULE_AUTHOR("Nicolas Bellido Y Ortega"); | 184 | MODULE_AUTHOR("Nicolas Bellido Y Ortega"); |
185 | MODULE_DESCRIPTION("AAED-2000 Keyboard Driver"); | 185 | MODULE_DESCRIPTION("AAED-2000 Keyboard Driver"); |
186 | MODULE_LICENSE("GPLv2"); | 186 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4a95adc4cc78..af58a6f1e898 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd) | |||
807 | static void atkbd_cleanup(struct serio *serio) | 807 | static void atkbd_cleanup(struct serio *serio) |
808 | { | 808 | { |
809 | struct atkbd *atkbd = serio_get_drvdata(serio); | 809 | struct atkbd *atkbd = serio_get_drvdata(serio); |
810 | |||
811 | atkbd_disable(atkbd); | ||
810 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); | 812 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); |
811 | } | 813 | } |
812 | 814 | ||
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c index 29fbec6218b9..1aa46ae12630 100644 --- a/drivers/input/keyboard/corgikbd.c +++ b/drivers/input/keyboard/corgikbd.c | |||
@@ -412,5 +412,5 @@ module_exit(corgikbd_exit); | |||
412 | 412 | ||
413 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); | 413 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); |
414 | MODULE_DESCRIPTION("Corgi Keyboard Driver"); | 414 | MODULE_DESCRIPTION("Corgi Keyboard Driver"); |
415 | MODULE_LICENSE("GPLv2"); | 415 | MODULE_LICENSE("GPL v2"); |
416 | MODULE_ALIAS("platform:corgi-keyboard"); | 416 | MODULE_ALIAS("platform:corgi-keyboard"); |
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index 9387da343f97..781fc6102860 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c | |||
@@ -275,5 +275,5 @@ module_exit(jornada680kbd_exit); | |||
275 | 275 | ||
276 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 276 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
277 | MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver"); | 277 | MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver"); |
278 | MODULE_LICENSE("GPLv2"); | 278 | MODULE_LICENSE("GPL v2"); |
279 | MODULE_ALIAS("platform:jornada680_kbd"); | 279 | MODULE_ALIAS("platform:jornada680_kbd"); |
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index a1164a0c7736..ce650af6d649 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); | 30 | MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); |
31 | MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); | 31 | MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); |
32 | MODULE_LICENSE("GPLv2"); | 32 | MODULE_LICENSE("GPL v2"); |
33 | 33 | ||
34 | static unsigned short jornada_std_keymap[128] = { /* ROW */ | 34 | static unsigned short jornada_std_keymap[128] = { /* ROW */ |
35 | 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */ | 35 | 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */ |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 3dea0c5077a9..45767e73f071 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -136,6 +136,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
136 | set_bit(code, input_dev->keybit); | 136 | set_bit(code, input_dev->keybit); |
137 | } | 137 | } |
138 | 138 | ||
139 | for (i = 0; i < pdata->direct_key_num; i++) | ||
140 | set_bit(pdata->direct_key_map[i], input_dev->keybit); | ||
141 | |||
139 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; | 142 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; |
140 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; | 143 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; |
141 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; | 144 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; |
@@ -143,17 +146,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
143 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; | 146 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; |
144 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; | 147 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; |
145 | 148 | ||
146 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { | 149 | if (pdata->enable_rotary0) { |
147 | set_bit(pdata->rotary0_up_key, input_dev->keybit); | 150 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { |
148 | set_bit(pdata->rotary0_down_key, input_dev->keybit); | 151 | set_bit(pdata->rotary0_up_key, input_dev->keybit); |
149 | } else | 152 | set_bit(pdata->rotary0_down_key, input_dev->keybit); |
150 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | 153 | } else |
151 | 154 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | |
152 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { | 155 | } |
153 | set_bit(pdata->rotary1_up_key, input_dev->keybit); | 156 | |
154 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | 157 | if (pdata->enable_rotary1) { |
155 | } else | 158 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { |
156 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | 159 | set_bit(pdata->rotary1_up_key, input_dev->keybit); |
160 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | ||
161 | } else | ||
162 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | ||
163 | } | ||
157 | } | 164 | } |
158 | 165 | ||
159 | static inline unsigned int lookup_matrix_keycode( | 166 | static inline unsigned int lookup_matrix_keycode( |
@@ -484,8 +491,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
484 | keypad->input_dev = input_dev; | 491 | keypad->input_dev = input_dev; |
485 | input_set_drvdata(input_dev, keypad); | 492 | input_set_drvdata(input_dev, keypad); |
486 | 493 | ||
487 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | | 494 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
488 | BIT_MASK(EV_REL); | 495 | if ((keypad->pdata->enable_rotary0 && |
496 | keypad->pdata->rotary0_rel_code) || | ||
497 | (keypad->pdata->enable_rotary1 && | ||
498 | keypad->pdata->rotary1_rel_code)) { | ||
499 | input_dev->evbit[0] |= BIT_MASK(EV_REL); | ||
500 | } | ||
489 | 501 | ||
490 | pxa27x_keypad_build_keycode(keypad); | 502 | pxa27x_keypad_build_keycode(keypad); |
491 | platform_set_drvdata(pdev, keypad); | 503 | platform_set_drvdata(pdev, keypad); |
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c index 61e401bc9109..1aa37181c40f 100644 --- a/drivers/input/keyboard/spitzkbd.c +++ b/drivers/input/keyboard/spitzkbd.c | |||
@@ -494,5 +494,5 @@ module_exit(spitzkbd_exit); | |||
494 | 494 | ||
495 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); | 495 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); |
496 | MODULE_DESCRIPTION("Spitz Keyboard Driver"); | 496 | MODULE_DESCRIPTION("Spitz Keyboard Driver"); |
497 | MODULE_LICENSE("GPLv2"); | 497 | MODULE_LICENSE("GPL v2"); |
498 | MODULE_ALIAS("platform:spitz-keyboard"); | 498 | MODULE_ALIAS("platform:spitz-keyboard"); |
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index 9531d8c7444f..d82f7f727f7a 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/module.h> | ||
24 | #include <linux/input-polldev.h> | 23 | #include <linux/input-polldev.h> |
25 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
26 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 5ece9f56babc..9aafa96cb746 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -331,6 +331,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { | |||
331 | }, | 331 | }, |
332 | }, | 332 | }, |
333 | { | 333 | { |
334 | .ident = "Acer TravelMate 660", | ||
335 | .matches = { | ||
336 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
337 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), | ||
338 | }, | ||
339 | }, | ||
340 | { | ||
334 | .ident = "Acer TravelMate 2490", | 341 | .ident = "Acer TravelMate 2490", |
335 | .matches = { | 342 | .matches = { |
336 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 343 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 65a74cfc187b..592ff55b62d0 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -885,6 +885,20 @@ static long i8042_panic_blink(long count) | |||
885 | 885 | ||
886 | #undef DELAY | 886 | #undef DELAY |
887 | 887 | ||
888 | #ifdef CONFIG_X86 | ||
889 | static void i8042_dritek_enable(void) | ||
890 | { | ||
891 | char param = 0x90; | ||
892 | int error; | ||
893 | |||
894 | error = i8042_command(¶m, 0x1059); | ||
895 | if (error) | ||
896 | printk(KERN_WARNING | ||
897 | "Failed to enable DRITEK extension: %d\n", | ||
898 | error); | ||
899 | } | ||
900 | #endif | ||
901 | |||
888 | #ifdef CONFIG_PM | 902 | #ifdef CONFIG_PM |
889 | /* | 903 | /* |
890 | * Here we try to restore the original BIOS settings. We only want to | 904 | * Here we try to restore the original BIOS settings. We only want to |
@@ -942,6 +956,12 @@ static int i8042_resume(struct platform_device *dev) | |||
942 | return -EIO; | 956 | return -EIO; |
943 | } | 957 | } |
944 | 958 | ||
959 | |||
960 | #ifdef CONFIG_X86 | ||
961 | if (i8042_dritek) | ||
962 | i8042_dritek_enable(); | ||
963 | #endif | ||
964 | |||
945 | if (i8042_mux_present) { | 965 | if (i8042_mux_present) { |
946 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) | 966 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) |
947 | printk(KERN_WARNING | 967 | printk(KERN_WARNING |
@@ -1160,6 +1180,11 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1160 | if (error) | 1180 | if (error) |
1161 | return error; | 1181 | return error; |
1162 | 1182 | ||
1183 | #ifdef CONFIG_X86 | ||
1184 | if (i8042_dritek) | ||
1185 | i8042_dritek_enable(); | ||
1186 | #endif | ||
1187 | |||
1163 | if (!i8042_noaux) { | 1188 | if (!i8042_noaux) { |
1164 | error = i8042_setup_aux(); | 1189 | error = i8042_setup_aux(); |
1165 | if (error && error != -ENODEV && error != -EBUSY) | 1190 | if (error && error != -ENODEV && error != -EBUSY) |
@@ -1171,14 +1196,6 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1171 | if (error) | 1196 | if (error) |
1172 | goto out_fail; | 1197 | goto out_fail; |
1173 | } | 1198 | } |
1174 | #ifdef CONFIG_X86 | ||
1175 | if (i8042_dritek) { | ||
1176 | char param = 0x90; | ||
1177 | error = i8042_command(¶m, 0x1059); | ||
1178 | if (error) | ||
1179 | goto out_fail; | ||
1180 | } | ||
1181 | #endif | ||
1182 | /* | 1199 | /* |
1183 | * Ok, everything is ready, let's register all serio ports | 1200 | * Ok, everything is ready, let's register all serio ports |
1184 | */ | 1201 | */ |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index c5a8661a1baa..1e748e46d12e 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
830 | struct gtco *gtco; | 830 | struct gtco *gtco; |
831 | struct input_dev *input_dev; | 831 | struct input_dev *input_dev; |
832 | struct hid_descriptor *hid_desc; | 832 | struct hid_descriptor *hid_desc; |
833 | char *report = NULL; | 833 | char *report; |
834 | int result = 0, retry; | 834 | int result = 0, retry; |
835 | int error; | 835 | int error; |
836 | struct usb_endpoint_descriptor *endpoint; | 836 | struct usb_endpoint_descriptor *endpoint; |
@@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
916 | le16_to_cpu(hid_desc->wDescriptorLength), | 916 | le16_to_cpu(hid_desc->wDescriptorLength), |
917 | 5000); /* 5 secs */ | 917 | 5000); /* 5 secs */ |
918 | 918 | ||
919 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) | 919 | dbg("usb_control_msg result: %d", result); |
920 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { | ||
921 | parse_hid_report_descriptor(gtco, report, result); | ||
920 | break; | 922 | break; |
923 | } | ||
921 | } | 924 | } |
922 | 925 | ||
926 | kfree(report); | ||
927 | |||
923 | /* If we didn't get the report, fail */ | 928 | /* If we didn't get the report, fail */ |
924 | dbg("usb_control_msg result: :%d", result); | ||
925 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { | 929 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { |
926 | err("Failed to get HID Report Descriptor of size: %d", | 930 | err("Failed to get HID Report Descriptor of size: %d", |
927 | hid_desc->wDescriptorLength); | 931 | hid_desc->wDescriptorLength); |
@@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
929 | goto err_free_urb; | 933 | goto err_free_urb; |
930 | } | 934 | } |
931 | 935 | ||
932 | /* Now we parse the report */ | ||
933 | parse_hid_report_descriptor(gtco, report, result); | ||
934 | |||
935 | /* Now we delete it */ | ||
936 | kfree(report); | ||
937 | |||
938 | /* Create a device file node */ | 936 | /* Create a device file node */ |
939 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); | 937 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); |
940 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); | 938 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); |
@@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
988 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, | 986 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, |
989 | gtco->buffer, gtco->buf_dma); | 987 | gtco->buffer, gtco->buf_dma); |
990 | err_free_devs: | 988 | err_free_devs: |
991 | kfree(report); | ||
992 | input_free_device(input_dev); | 989 | input_free_device(input_dev); |
993 | kfree(gtco); | 990 | kfree(gtco); |
994 | return error; | 991 | return error; |
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index 742242111bf1..1aca108b1031 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); | 26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); |
27 | MODULE_LICENSE("GPLv2"); | 27 | MODULE_LICENSE("GPL v2"); |
28 | 28 | ||
29 | struct jornada_ts { | 29 | struct jornada_ts { |
30 | struct input_dev *dev; | 30 | struct input_dev *dev; |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 01278bd7e65c..838458792ea0 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -85,6 +85,15 @@ module_param(delay, int, 0); | |||
85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); | 85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Set five_wire = 1 to use a 5 wire touchscreen. | ||
89 | * | ||
90 | * NOTE: Five wire mode does not allow for readback of pressure. | ||
91 | */ | ||
92 | static int five_wire; | ||
93 | module_param(five_wire, int, 0); | ||
94 | MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); | ||
95 | |||
96 | /* | ||
88 | * Set adc mask function. | 97 | * Set adc mask function. |
89 | * | 98 | * |
90 | * Sources of glitch noise, such as signals driving an LCD display, may feed | 99 | * Sources of glitch noise, such as signals driving an LCD display, may feed |
@@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm) | |||
162 | 64000 / rpu); | 171 | 64000 / rpu); |
163 | } | 172 | } |
164 | 173 | ||
174 | /* Five wire panel? */ | ||
175 | if (five_wire) { | ||
176 | dig3 |= WM9713_45W; | ||
177 | dev_info(wm->dev, "setting 5-wire touchscreen mode."); | ||
178 | |||
179 | if (pil) { | ||
180 | dev_warn(wm->dev, | ||
181 | "Pressure measurement not supported in 5 " | ||
182 | "wire mode, disabling\n"); | ||
183 | pil = 0; | ||
184 | } | ||
185 | } | ||
186 | |||
165 | /* touchpanel pressure */ | 187 | /* touchpanel pressure */ |
166 | if (pil == 2) { | 188 | if (pil == 2) { |
167 | dig3 |= WM9712_PIL; | 189 | dig3 |= WM9712_PIL; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index e9c7ea46b6e3..cdc24ad314e0 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev) | |||
608 | goto alloc_err; | 608 | goto alloc_err; |
609 | } | 609 | } |
610 | 610 | ||
611 | /* set up physical characteristics */ | ||
612 | wm->codec->phy_init(wm); | ||
613 | |||
614 | /* load gpio cache */ | ||
615 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
616 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
617 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
618 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
619 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
620 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
621 | |||
611 | wm->input_dev = input_allocate_device(); | 622 | wm->input_dev = input_allocate_device(); |
612 | if (wm->input_dev == NULL) { | 623 | if (wm->input_dev == NULL) { |
613 | ret = -ENOMEM; | 624 | ret = -ENOMEM; |
@@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev) | |||
616 | 627 | ||
617 | /* set up touch configuration */ | 628 | /* set up touch configuration */ |
618 | wm->input_dev->name = "wm97xx touchscreen"; | 629 | wm->input_dev->name = "wm97xx touchscreen"; |
630 | wm->input_dev->phys = "wm97xx"; | ||
619 | wm->input_dev->open = wm97xx_ts_input_open; | 631 | wm->input_dev->open = wm97xx_ts_input_open; |
620 | wm->input_dev->close = wm97xx_ts_input_close; | 632 | wm->input_dev->close = wm97xx_ts_input_close; |
621 | set_bit(EV_ABS, wm->input_dev->evbit); | 633 | set_bit(EV_ABS, wm->input_dev->evbit); |
@@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev) | |||
634 | if (ret < 0) | 646 | if (ret < 0) |
635 | goto dev_alloc_err; | 647 | goto dev_alloc_err; |
636 | 648 | ||
637 | /* set up physical characteristics */ | ||
638 | wm->codec->phy_init(wm); | ||
639 | |||
640 | /* load gpio cache */ | ||
641 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
642 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
643 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
644 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
645 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
646 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
647 | |||
648 | /* register our battery device */ | 649 | /* register our battery device */ |
649 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); | 650 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); |
650 | if (!wm->battery_dev) { | 651 | if (!wm->battery_dev) { |
@@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm) | |||
801 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); | 802 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); |
802 | 803 | ||
803 | static struct device_driver wm97xx_driver = { | 804 | static struct device_driver wm97xx_driver = { |
804 | .name = "ac97", | 805 | .name = "wm97xx-ts", |
805 | .bus = &ac97_bus_type, | 806 | .bus = &ac97_bus_type, |
806 | .owner = THIS_MODULE, | 807 | .owner = THIS_MODULE, |
807 | .probe = wm97xx_probe, | 808 | .probe = wm97xx_probe, |
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index ebef4ce1b00c..29419a8d31dc 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c | |||
@@ -948,17 +948,17 @@ int __init cdebug_init(void) | |||
948 | { | 948 | { |
949 | g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); | 949 | g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); |
950 | if (!g_cmsg) | 950 | if (!g_cmsg) |
951 | return ENOMEM; | 951 | return -ENOMEM; |
952 | g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); | 952 | g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); |
953 | if (!g_debbuf) { | 953 | if (!g_debbuf) { |
954 | kfree(g_cmsg); | 954 | kfree(g_cmsg); |
955 | return ENOMEM; | 955 | return -ENOMEM; |
956 | } | 956 | } |
957 | g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); | 957 | g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); |
958 | if (!g_debbuf->buf) { | 958 | if (!g_debbuf->buf) { |
959 | kfree(g_cmsg); | 959 | kfree(g_cmsg); |
960 | kfree(g_debbuf); | 960 | kfree(g_debbuf); |
961 | return ENOMEM;; | 961 | return -ENOMEM;; |
962 | } | 962 | } |
963 | g_debbuf->size = CDEBUG_GSIZE; | 963 | g_debbuf->size = CDEBUG_GSIZE; |
964 | g_debbuf->buf[0] = 0; | 964 | g_debbuf->buf[0] = 0; |
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c index 5fcbdccd7a53..16a874bb1561 100644 --- a/drivers/isdn/hardware/eicon/divasmain.c +++ b/drivers/isdn/hardware/eicon/divasmain.c | |||
@@ -806,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void) | |||
806 | 806 | ||
807 | if (!create_divas_proc()) { | 807 | if (!create_divas_proc()) { |
808 | #ifdef MODULE | 808 | #ifdef MODULE |
809 | remove_divas_proc(); | ||
810 | divas_unregister_chrdev(); | 809 | divas_unregister_chrdev(); |
811 | divasfunc_exit(); | 810 | divasfunc_exit(); |
812 | #endif | 811 | #endif |
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c index fae895828a17..040827288ec9 100644 --- a/drivers/isdn/hardware/eicon/divasproc.c +++ b/drivers/isdn/hardware/eicon/divasproc.c | |||
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = { | |||
125 | 125 | ||
126 | int create_divas_proc(void) | 126 | int create_divas_proc(void) |
127 | { | 127 | { |
128 | proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon, | 128 | divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO, |
129 | &divas_fops); | 129 | proc_net_eicon, &divas_fops); |
130 | if (!divas_proc_entry) | 130 | if (!divas_proc_entry) |
131 | return (0); | 131 | return (0); |
132 | 132 | ||
diff --git a/drivers/isdn/hysdn/Kconfig b/drivers/isdn/hysdn/Kconfig index c6d8a7042988..c9e4231968ef 100644 --- a/drivers/isdn/hysdn/Kconfig +++ b/drivers/isdn/hysdn/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | config HYSDN | 4 | config HYSDN |
5 | tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" | 5 | tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" |
6 | depends on m && PROC_FS && PCI && BROKEN_ON_SMP | 6 | depends on m && PROC_FS && PCI |
7 | help | 7 | help |
8 | Say Y here if you have one of Hypercope's active PCI ISDN cards | 8 | Say Y here if you have one of Hypercope's active PCI ISDN cards |
9 | Champ, Ergo and Metro. You will then get a module called hysdn. | 9 | Champ, Ergo and Metro. You will then get a module called hysdn. |
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c index 6cdbad3a9926..3eb096f0ae1b 100644 --- a/drivers/isdn/hysdn/boardergo.c +++ b/drivers/isdn/hysdn/boardergo.c | |||
@@ -64,10 +64,11 @@ ergo_interrupt(int intno, void *dev_id) | |||
64 | } /* ergo_interrupt */ | 64 | } /* ergo_interrupt */ |
65 | 65 | ||
66 | /******************************************************************************/ | 66 | /******************************************************************************/ |
67 | /* ergo_irq_bh is the function called by the immediate kernel task list after */ | 67 | /* ergo_irq_bh will be called as part of the kernel clearing its shared work */ |
68 | /* being activated with queue_task and no interrupts active. This task is the */ | 68 | /* queue sometime after a call to schedule_work has been made passing our */ |
69 | /* only one handling data transfer from or to the card after booting. The task */ | 69 | /* work_struct. This task is the only one handling data transfer from or to */ |
70 | /* may be queued from everywhere (interrupts included). */ | 70 | /* the card after booting. The task may be queued from everywhere */ |
71 | /* (interrupts included). */ | ||
71 | /******************************************************************************/ | 72 | /******************************************************************************/ |
72 | static void | 73 | static void |
73 | ergo_irq_bh(struct work_struct *ugli_api) | 74 | ergo_irq_bh(struct work_struct *ugli_api) |
@@ -90,7 +91,6 @@ ergo_irq_bh(struct work_struct *ugli_api) | |||
90 | card->hw_lock = 1; /* we now lock the hardware */ | 91 | card->hw_lock = 1; /* we now lock the hardware */ |
91 | 92 | ||
92 | do { | 93 | do { |
93 | sti(); /* reenable other ints */ | ||
94 | again = 0; /* assume loop not to be repeated */ | 94 | again = 0; /* assume loop not to be repeated */ |
95 | 95 | ||
96 | if (!dpr->ToHyFlag) { | 96 | if (!dpr->ToHyFlag) { |
@@ -110,7 +110,6 @@ ergo_irq_bh(struct work_struct *ugli_api) | |||
110 | again = 1; /* restart loop */ | 110 | again = 1; /* restart loop */ |
111 | } | 111 | } |
112 | } /* a message has arrived for us */ | 112 | } /* a message has arrived for us */ |
113 | cli(); /* no further ints */ | ||
114 | if (again) { | 113 | if (again) { |
115 | dpr->ToHyInt = 1; | 114 | dpr->ToHyInt = 1; |
116 | dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ | 115 | dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ |
@@ -242,7 +241,6 @@ ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf, | |||
242 | byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ | 241 | byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ |
243 | /* the interrupts are still masked */ | 242 | /* the interrupts are still masked */ |
244 | 243 | ||
245 | sti(); | ||
246 | msleep_interruptible(20); /* Timeout 20ms */ | 244 | msleep_interruptible(20); /* Timeout 20ms */ |
247 | 245 | ||
248 | if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { | 246 | if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { |
@@ -276,7 +274,6 @@ ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len) | |||
276 | dst = sp->Data; /* point to data in spool structure */ | 274 | dst = sp->Data; /* point to data in spool structure */ |
277 | buflen = sp->Len; /* maximum len of spooled data */ | 275 | buflen = sp->Len; /* maximum len of spooled data */ |
278 | wr_mirror = sp->WrPtr; /* only once read */ | 276 | wr_mirror = sp->WrPtr; /* only once read */ |
279 | sti(); | ||
280 | 277 | ||
281 | /* try until all bytes written or error */ | 278 | /* try until all bytes written or error */ |
282 | i = 0x1000; /* timeout value */ | 279 | i = 0x1000; /* timeout value */ |
@@ -380,7 +377,6 @@ ergo_waitpofready(struct HYSDN_CARD *card) | |||
380 | #endif /* CONFIG_HYSDN_CAPI */ | 377 | #endif /* CONFIG_HYSDN_CAPI */ |
381 | return (0); /* success */ | 378 | return (0); /* success */ |
382 | } /* data has arrived */ | 379 | } /* data has arrived */ |
383 | sti(); | ||
384 | msleep_interruptible(50); /* Timeout 50ms */ | 380 | msleep_interruptible(50); /* Timeout 50ms */ |
385 | } /* wait until timeout */ | 381 | } /* wait until timeout */ |
386 | 382 | ||
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c index d3999a8e9f88..53f6ad1235db 100644 --- a/drivers/isdn/hysdn/hycapi.c +++ b/drivers/isdn/hysdn/hycapi.c | |||
@@ -462,11 +462,11 @@ static int hycapi_read_proc(char *page, char **start, off_t off, | |||
462 | default: s = "???"; break; | 462 | default: s = "???"; break; |
463 | } | 463 | } |
464 | len += sprintf(page+len, "%-16s %s\n", "type", s); | 464 | len += sprintf(page+len, "%-16s %s\n", "type", s); |
465 | if ((s = cinfo->version[VER_DRIVER]) != 0) | 465 | if ((s = cinfo->version[VER_DRIVER]) != NULL) |
466 | len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); | 466 | len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); |
467 | if ((s = cinfo->version[VER_CARDTYPE]) != 0) | 467 | if ((s = cinfo->version[VER_CARDTYPE]) != NULL) |
468 | len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); | 468 | len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); |
469 | if ((s = cinfo->version[VER_SERIAL]) != 0) | 469 | if ((s = cinfo->version[VER_SERIAL]) != NULL) |
470 | len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); | 470 | len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); |
471 | 471 | ||
472 | len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname); | 472 | len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname); |
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 15906d005b05..484299b031f8 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c | |||
@@ -207,30 +207,17 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t | |||
207 | /* read conf file -> output card info data */ | 207 | /* read conf file -> output card info data */ |
208 | /*******************************************/ | 208 | /*******************************************/ |
209 | static ssize_t | 209 | static ssize_t |
210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) | 210 | hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t *off) |
211 | { | 211 | { |
212 | char *cp; | 212 | char *cp; |
213 | int i; | ||
214 | 213 | ||
215 | if (file->f_mode & FMODE_READ) { | 214 | if (!(file->f_mode & FMODE_READ)) |
216 | if (!(cp = file->private_data)) | 215 | return -EPERM; /* no permission to read */ |
217 | return (-EFAULT); /* should never happen */ | 216 | |
218 | i = strlen(cp); /* get total string length */ | 217 | if (!(cp = file->private_data)) |
219 | if (*off < i) { | 218 | return -EFAULT; /* should never happen */ |
220 | /* still bytes to transfer */ | 219 | |
221 | cp += *off; /* point to desired data offset */ | 220 | return simple_read_from_buffer(buf, count, off, cp, strlen(cp)); |
222 | i -= *off; /* remaining length */ | ||
223 | if (i > count) | ||
224 | i = count; /* limit length to transfer */ | ||
225 | if (copy_to_user(buf, cp, i)) | ||
226 | return (-EFAULT); /* copy error */ | ||
227 | *off += i; /* adjust offset */ | ||
228 | } else | ||
229 | return (0); | ||
230 | } else | ||
231 | return (-EPERM); /* no permission to read */ | ||
232 | |||
233 | return (i); | ||
234 | } /* hysdn_conf_read */ | 221 | } /* hysdn_conf_read */ |
235 | 222 | ||
236 | /******************/ | 223 | /******************/ |
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index 7817d2244921..1081091bbfaf 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c | |||
@@ -226,6 +226,7 @@ int sc_ioctl(int card, scs_ioctl *data) | |||
226 | */ | 226 | */ |
227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { | 227 | if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { |
228 | kfree(rcvmsg); | 228 | kfree(rcvmsg); |
229 | kfree(spid); | ||
229 | return -EFAULT; | 230 | return -EFAULT; |
230 | } | 231 | } |
231 | 232 | ||
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c index b3c54be74556..559a40861c39 100644 --- a/drivers/leds/led-class.c +++ b/drivers/leds/led-class.c | |||
@@ -103,13 +103,11 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev) | |||
103 | { | 103 | { |
104 | int rc; | 104 | int rc; |
105 | 105 | ||
106 | led_cdev->dev = device_create(leds_class, parent, 0, "%s", | 106 | led_cdev->dev = device_create_drvdata(leds_class, parent, 0, led_cdev, |
107 | led_cdev->name); | 107 | "%s", led_cdev->name); |
108 | if (IS_ERR(led_cdev->dev)) | 108 | if (IS_ERR(led_cdev->dev)) |
109 | return PTR_ERR(led_cdev->dev); | 109 | return PTR_ERR(led_cdev->dev); |
110 | 110 | ||
111 | dev_set_drvdata(led_cdev->dev, led_cdev); | ||
112 | |||
113 | /* register the attributes */ | 111 | /* register the attributes */ |
114 | rc = device_create_file(led_cdev->dev, &dev_attr_brightness); | 112 | rc = device_create_file(led_cdev->dev, &dev_attr_brightness); |
115 | if (rc) | 113 | if (rc) |
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 8080249957af..1a8de57289eb 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -20,14 +20,11 @@ | |||
20 | /* The pointer to our (page) of device descriptions. */ | 20 | /* The pointer to our (page) of device descriptions. */ |
21 | static void *lguest_devices; | 21 | static void *lguest_devices; |
22 | 22 | ||
23 | /* Unique numbering for lguest devices. */ | ||
24 | static unsigned int dev_index; | ||
25 | |||
26 | /* For Guests, device memory can be used as normal memory, so we cast away the | 23 | /* For Guests, device memory can be used as normal memory, so we cast away the |
27 | * __iomem to quieten sparse. */ | 24 | * __iomem to quieten sparse. */ |
28 | static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) | 25 | static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) |
29 | { | 26 | { |
30 | return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages); | 27 | return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages); |
31 | } | 28 | } |
32 | 29 | ||
33 | static inline void lguest_unmap(void *addr) | 30 | static inline void lguest_unmap(void *addr) |
@@ -325,8 +322,10 @@ static struct device lguest_root = { | |||
325 | * As Andrew Tridgell says, "Untested code is buggy code". | 322 | * As Andrew Tridgell says, "Untested code is buggy code". |
326 | * | 323 | * |
327 | * It's worth reading this carefully: we start with a pointer to the new device | 324 | * It's worth reading this carefully: we start with a pointer to the new device |
328 | * descriptor in the "lguest_devices" page. */ | 325 | * descriptor in the "lguest_devices" page, and the offset into the device |
329 | static void add_lguest_device(struct lguest_device_desc *d) | 326 | * descriptor page so we can uniquely identify it if things go badly wrong. */ |
327 | static void add_lguest_device(struct lguest_device_desc *d, | ||
328 | unsigned int offset) | ||
330 | { | 329 | { |
331 | struct lguest_device *ldev; | 330 | struct lguest_device *ldev; |
332 | 331 | ||
@@ -334,18 +333,14 @@ static void add_lguest_device(struct lguest_device_desc *d) | |||
334 | * it. */ | 333 | * it. */ |
335 | ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); | 334 | ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); |
336 | if (!ldev) { | 335 | if (!ldev) { |
337 | printk(KERN_EMERG "Cannot allocate lguest dev %u\n", | 336 | printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n", |
338 | dev_index++); | 337 | offset, d->type); |
339 | return; | 338 | return; |
340 | } | 339 | } |
341 | 340 | ||
342 | /* This devices' parent is the lguest/ dir. */ | 341 | /* This devices' parent is the lguest/ dir. */ |
343 | ldev->vdev.dev.parent = &lguest_root; | 342 | ldev->vdev.dev.parent = &lguest_root; |
344 | /* We have a unique device index thanks to the dev_index counter. */ | 343 | /* We have a unique device index thanks to the dev_index counter. */ |
345 | ldev->vdev.index = dev_index++; | ||
346 | /* The device type comes straight from the descriptor. There's also a | ||
347 | * device vendor field in the virtio_device struct, which we leave as | ||
348 | * 0. */ | ||
349 | ldev->vdev.id.device = d->type; | 344 | ldev->vdev.id.device = d->type; |
350 | /* We have a simple set of routines for querying the device's | 345 | /* We have a simple set of routines for querying the device's |
351 | * configuration information and setting its status. */ | 346 | * configuration information and setting its status. */ |
@@ -357,8 +352,8 @@ static void add_lguest_device(struct lguest_device_desc *d) | |||
357 | * virtio_device and calls device_register(). This makes the bus | 352 | * virtio_device and calls device_register(). This makes the bus |
358 | * infrastructure look for a matching driver. */ | 353 | * infrastructure look for a matching driver. */ |
359 | if (register_virtio_device(&ldev->vdev) != 0) { | 354 | if (register_virtio_device(&ldev->vdev) != 0) { |
360 | printk(KERN_ERR "Failed to register lguest device %u\n", | 355 | printk(KERN_ERR "Failed to register lguest dev %u type %u\n", |
361 | ldev->vdev.index); | 356 | offset, d->type); |
362 | kfree(ldev); | 357 | kfree(ldev); |
363 | } | 358 | } |
364 | } | 359 | } |
@@ -379,7 +374,7 @@ static void scan_devices(void) | |||
379 | break; | 374 | break; |
380 | 375 | ||
381 | printk("Device at %i has size %u\n", i, desc_size(d)); | 376 | printk("Device at %i has size %u\n", i, desc_size(d)); |
382 | add_lguest_device(d); | 377 | add_lguest_device(d, i); |
383 | } | 378 | } |
384 | } | 379 | } |
385 | 380 | ||
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 82add26cc665..c34bdf852e32 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -556,7 +556,8 @@ static void media_bay_step(int i) | |||
556 | printk("mediabay %d, registering IDE...\n", i); | 556 | printk("mediabay %d, registering IDE...\n", i); |
557 | pmu_suspend(); | 557 | pmu_suspend(); |
558 | ide_port_scan(bay->cd_port); | 558 | ide_port_scan(bay->cd_port); |
559 | bay->cd_index = bay->cd_port->index; | 559 | if (bay->cd_port->present) |
560 | bay->cd_index = bay->cd_port->index; | ||
560 | pmu_resume(); | 561 | pmu_resume(); |
561 | } | 562 | } |
562 | if (bay->cd_index == -1) { | 563 | if (bay->cd_index == -1) { |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index c14dacdacfac..b26927ce889c 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -203,17 +203,6 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page) | |||
203 | * bitmap file handling - read and write the bitmap file and its superblock | 203 | * bitmap file handling - read and write the bitmap file and its superblock |
204 | */ | 204 | */ |
205 | 205 | ||
206 | /* copy the pathname of a file to a buffer */ | ||
207 | char *file_path(struct file *file, char *buf, int count) | ||
208 | { | ||
209 | if (!buf) | ||
210 | return NULL; | ||
211 | |||
212 | buf = d_path(&file->f_path, buf, count); | ||
213 | |||
214 | return IS_ERR(buf) ? NULL : buf; | ||
215 | } | ||
216 | |||
217 | /* | 206 | /* |
218 | * basic page I/O operations | 207 | * basic page I/O operations |
219 | */ | 208 | */ |
@@ -721,11 +710,13 @@ static void bitmap_file_kick(struct bitmap *bitmap) | |||
721 | if (bitmap->file) { | 710 | if (bitmap->file) { |
722 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); | 711 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); |
723 | if (path) | 712 | if (path) |
724 | ptr = file_path(bitmap->file, path, PAGE_SIZE); | 713 | ptr = d_path(&bitmap->file->f_path, path, |
714 | PAGE_SIZE); | ||
715 | |||
725 | 716 | ||
726 | printk(KERN_ALERT | 717 | printk(KERN_ALERT |
727 | "%s: kicking failed bitmap file %s from array!\n", | 718 | "%s: kicking failed bitmap file %s from array!\n", |
728 | bmname(bitmap), ptr ? ptr : ""); | 719 | bmname(bitmap), IS_ERR(ptr) ? "" : ptr); |
729 | 720 | ||
730 | kfree(path); | 721 | kfree(path); |
731 | } else | 722 | } else |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 83eb78b00137..7cf512a34ccf 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -74,6 +74,8 @@ static DEFINE_SPINLOCK(pers_lock); | |||
74 | 74 | ||
75 | static void md_print_devices(void); | 75 | static void md_print_devices(void); |
76 | 76 | ||
77 | static DECLARE_WAIT_QUEUE_HEAD(resync_wait); | ||
78 | |||
77 | #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } | 79 | #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } |
78 | 80 | ||
79 | /* | 81 | /* |
@@ -274,6 +276,7 @@ static mddev_t * mddev_find(dev_t unit) | |||
274 | atomic_set(&new->active, 1); | 276 | atomic_set(&new->active, 1); |
275 | spin_lock_init(&new->write_lock); | 277 | spin_lock_init(&new->write_lock); |
276 | init_waitqueue_head(&new->sb_wait); | 278 | init_waitqueue_head(&new->sb_wait); |
279 | init_waitqueue_head(&new->recovery_wait); | ||
277 | new->reshape_position = MaxSector; | 280 | new->reshape_position = MaxSector; |
278 | new->resync_max = MaxSector; | 281 | new->resync_max = MaxSector; |
279 | new->level = LEVEL_NONE; | 282 | new->level = LEVEL_NONE; |
@@ -3013,6 +3016,36 @@ degraded_show(mddev_t *mddev, char *page) | |||
3013 | static struct md_sysfs_entry md_degraded = __ATTR_RO(degraded); | 3016 | static struct md_sysfs_entry md_degraded = __ATTR_RO(degraded); |
3014 | 3017 | ||
3015 | static ssize_t | 3018 | static ssize_t |
3019 | sync_force_parallel_show(mddev_t *mddev, char *page) | ||
3020 | { | ||
3021 | return sprintf(page, "%d\n", mddev->parallel_resync); | ||
3022 | } | ||
3023 | |||
3024 | static ssize_t | ||
3025 | sync_force_parallel_store(mddev_t *mddev, const char *buf, size_t len) | ||
3026 | { | ||
3027 | long n; | ||
3028 | |||
3029 | if (strict_strtol(buf, 10, &n)) | ||
3030 | return -EINVAL; | ||
3031 | |||
3032 | if (n != 0 && n != 1) | ||
3033 | return -EINVAL; | ||
3034 | |||
3035 | mddev->parallel_resync = n; | ||
3036 | |||
3037 | if (mddev->sync_thread) | ||
3038 | wake_up(&resync_wait); | ||
3039 | |||
3040 | return len; | ||
3041 | } | ||
3042 | |||
3043 | /* force parallel resync, even with shared block devices */ | ||
3044 | static struct md_sysfs_entry md_sync_force_parallel = | ||
3045 | __ATTR(sync_force_parallel, S_IRUGO|S_IWUSR, | ||
3046 | sync_force_parallel_show, sync_force_parallel_store); | ||
3047 | |||
3048 | static ssize_t | ||
3016 | sync_speed_show(mddev_t *mddev, char *page) | 3049 | sync_speed_show(mddev_t *mddev, char *page) |
3017 | { | 3050 | { |
3018 | unsigned long resync, dt, db; | 3051 | unsigned long resync, dt, db; |
@@ -3187,6 +3220,7 @@ static struct attribute *md_redundancy_attrs[] = { | |||
3187 | &md_sync_min.attr, | 3220 | &md_sync_min.attr, |
3188 | &md_sync_max.attr, | 3221 | &md_sync_max.attr, |
3189 | &md_sync_speed.attr, | 3222 | &md_sync_speed.attr, |
3223 | &md_sync_force_parallel.attr, | ||
3190 | &md_sync_completed.attr, | 3224 | &md_sync_completed.attr, |
3191 | &md_max_sync.attr, | 3225 | &md_max_sync.attr, |
3192 | &md_suspend_lo.attr, | 3226 | &md_suspend_lo.attr, |
@@ -3691,6 +3725,8 @@ static int do_md_stop(mddev_t * mddev, int mode) | |||
3691 | 3725 | ||
3692 | module_put(mddev->pers->owner); | 3726 | module_put(mddev->pers->owner); |
3693 | mddev->pers = NULL; | 3727 | mddev->pers = NULL; |
3728 | /* tell userspace to handle 'inactive' */ | ||
3729 | sysfs_notify(&mddev->kobj, NULL, "array_state"); | ||
3694 | 3730 | ||
3695 | set_capacity(disk, 0); | 3731 | set_capacity(disk, 0); |
3696 | mddev->changed = 1; | 3732 | mddev->changed = 1; |
@@ -3987,8 +4023,8 @@ static int get_bitmap_file(mddev_t * mddev, void __user * arg) | |||
3987 | if (!buf) | 4023 | if (!buf) |
3988 | goto out; | 4024 | goto out; |
3989 | 4025 | ||
3990 | ptr = file_path(mddev->bitmap->file, buf, sizeof(file->pathname)); | 4026 | ptr = d_path(&mddev->bitmap->file->f_path, buf, sizeof(file->pathname)); |
3991 | if (!ptr) | 4027 | if (IS_ERR(ptr)) |
3992 | goto out; | 4028 | goto out; |
3993 | 4029 | ||
3994 | strcpy(file->pathname, ptr); | 4030 | strcpy(file->pathname, ptr); |
@@ -5399,7 +5435,7 @@ void md_done_sync(mddev_t *mddev, int blocks, int ok) | |||
5399 | atomic_sub(blocks, &mddev->recovery_active); | 5435 | atomic_sub(blocks, &mddev->recovery_active); |
5400 | wake_up(&mddev->recovery_wait); | 5436 | wake_up(&mddev->recovery_wait); |
5401 | if (!ok) { | 5437 | if (!ok) { |
5402 | set_bit(MD_RECOVERY_ERR, &mddev->recovery); | 5438 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
5403 | md_wakeup_thread(mddev->thread); | 5439 | md_wakeup_thread(mddev->thread); |
5404 | // stop recovery, signal do_sync .... | 5440 | // stop recovery, signal do_sync .... |
5405 | } | 5441 | } |
@@ -5435,8 +5471,11 @@ void md_write_start(mddev_t *mddev, struct bio *bi) | |||
5435 | md_wakeup_thread(mddev->thread); | 5471 | md_wakeup_thread(mddev->thread); |
5436 | } | 5472 | } |
5437 | spin_unlock_irq(&mddev->write_lock); | 5473 | spin_unlock_irq(&mddev->write_lock); |
5474 | sysfs_notify(&mddev->kobj, NULL, "array_state"); | ||
5438 | } | 5475 | } |
5439 | wait_event(mddev->sb_wait, mddev->flags==0); | 5476 | wait_event(mddev->sb_wait, |
5477 | !test_bit(MD_CHANGE_CLEAN, &mddev->flags) && | ||
5478 | !test_bit(MD_CHANGE_PENDING, &mddev->flags)); | ||
5440 | } | 5479 | } |
5441 | 5480 | ||
5442 | void md_write_end(mddev_t *mddev) | 5481 | void md_write_end(mddev_t *mddev) |
@@ -5471,13 +5510,17 @@ void md_allow_write(mddev_t *mddev) | |||
5471 | mddev->safemode = 1; | 5510 | mddev->safemode = 1; |
5472 | spin_unlock_irq(&mddev->write_lock); | 5511 | spin_unlock_irq(&mddev->write_lock); |
5473 | md_update_sb(mddev, 0); | 5512 | md_update_sb(mddev, 0); |
5513 | |||
5514 | sysfs_notify(&mddev->kobj, NULL, "array_state"); | ||
5515 | /* wait for the dirty state to be recorded in the metadata */ | ||
5516 | wait_event(mddev->sb_wait, | ||
5517 | !test_bit(MD_CHANGE_CLEAN, &mddev->flags) && | ||
5518 | !test_bit(MD_CHANGE_PENDING, &mddev->flags)); | ||
5474 | } else | 5519 | } else |
5475 | spin_unlock_irq(&mddev->write_lock); | 5520 | spin_unlock_irq(&mddev->write_lock); |
5476 | } | 5521 | } |
5477 | EXPORT_SYMBOL_GPL(md_allow_write); | 5522 | EXPORT_SYMBOL_GPL(md_allow_write); |
5478 | 5523 | ||
5479 | static DECLARE_WAIT_QUEUE_HEAD(resync_wait); | ||
5480 | |||
5481 | #define SYNC_MARKS 10 | 5524 | #define SYNC_MARKS 10 |
5482 | #define SYNC_MARK_STEP (3*HZ) | 5525 | #define SYNC_MARK_STEP (3*HZ) |
5483 | void md_do_sync(mddev_t *mddev) | 5526 | void md_do_sync(mddev_t *mddev) |
@@ -5541,8 +5584,9 @@ void md_do_sync(mddev_t *mddev) | |||
5541 | for_each_mddev(mddev2, tmp) { | 5584 | for_each_mddev(mddev2, tmp) { |
5542 | if (mddev2 == mddev) | 5585 | if (mddev2 == mddev) |
5543 | continue; | 5586 | continue; |
5544 | if (mddev2->curr_resync && | 5587 | if (!mddev->parallel_resync |
5545 | match_mddev_units(mddev,mddev2)) { | 5588 | && mddev2->curr_resync |
5589 | && match_mddev_units(mddev, mddev2)) { | ||
5546 | DEFINE_WAIT(wq); | 5590 | DEFINE_WAIT(wq); |
5547 | if (mddev < mddev2 && mddev->curr_resync == 2) { | 5591 | if (mddev < mddev2 && mddev->curr_resync == 2) { |
5548 | /* arbitrarily yield */ | 5592 | /* arbitrarily yield */ |
@@ -5622,7 +5666,6 @@ void md_do_sync(mddev_t *mddev) | |||
5622 | window/2,(unsigned long long) max_sectors/2); | 5666 | window/2,(unsigned long long) max_sectors/2); |
5623 | 5667 | ||
5624 | atomic_set(&mddev->recovery_active, 0); | 5668 | atomic_set(&mddev->recovery_active, 0); |
5625 | init_waitqueue_head(&mddev->recovery_wait); | ||
5626 | last_check = 0; | 5669 | last_check = 0; |
5627 | 5670 | ||
5628 | if (j>2) { | 5671 | if (j>2) { |
@@ -5647,7 +5690,7 @@ void md_do_sync(mddev_t *mddev) | |||
5647 | sectors = mddev->pers->sync_request(mddev, j, &skipped, | 5690 | sectors = mddev->pers->sync_request(mddev, j, &skipped, |
5648 | currspeed < speed_min(mddev)); | 5691 | currspeed < speed_min(mddev)); |
5649 | if (sectors == 0) { | 5692 | if (sectors == 0) { |
5650 | set_bit(MD_RECOVERY_ERR, &mddev->recovery); | 5693 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
5651 | goto out; | 5694 | goto out; |
5652 | } | 5695 | } |
5653 | 5696 | ||
@@ -5670,8 +5713,7 @@ void md_do_sync(mddev_t *mddev) | |||
5670 | 5713 | ||
5671 | last_check = io_sectors; | 5714 | last_check = io_sectors; |
5672 | 5715 | ||
5673 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery) || | 5716 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) |
5674 | test_bit(MD_RECOVERY_ERR, &mddev->recovery)) | ||
5675 | break; | 5717 | break; |
5676 | 5718 | ||
5677 | repeat: | 5719 | repeat: |
@@ -5725,8 +5767,7 @@ void md_do_sync(mddev_t *mddev) | |||
5725 | /* tell personality that we are finished */ | 5767 | /* tell personality that we are finished */ |
5726 | mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); | 5768 | mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); |
5727 | 5769 | ||
5728 | if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && | 5770 | if (!test_bit(MD_RECOVERY_CHECK, &mddev->recovery) && |
5729 | !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) && | ||
5730 | mddev->curr_resync > 2) { | 5771 | mddev->curr_resync > 2) { |
5731 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | 5772 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { |
5732 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { | 5773 | if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { |
@@ -5795,7 +5836,10 @@ static int remove_and_add_spares(mddev_t *mddev) | |||
5795 | } | 5836 | } |
5796 | 5837 | ||
5797 | if (mddev->degraded) { | 5838 | if (mddev->degraded) { |
5798 | rdev_for_each(rdev, rtmp, mddev) | 5839 | rdev_for_each(rdev, rtmp, mddev) { |
5840 | if (rdev->raid_disk >= 0 && | ||
5841 | !test_bit(In_sync, &rdev->flags)) | ||
5842 | spares++; | ||
5799 | if (rdev->raid_disk < 0 | 5843 | if (rdev->raid_disk < 0 |
5800 | && !test_bit(Faulty, &rdev->flags)) { | 5844 | && !test_bit(Faulty, &rdev->flags)) { |
5801 | rdev->recovery_offset = 0; | 5845 | rdev->recovery_offset = 0; |
@@ -5813,6 +5857,7 @@ static int remove_and_add_spares(mddev_t *mddev) | |||
5813 | } else | 5857 | } else |
5814 | break; | 5858 | break; |
5815 | } | 5859 | } |
5860 | } | ||
5816 | } | 5861 | } |
5817 | return spares; | 5862 | return spares; |
5818 | } | 5863 | } |
@@ -5826,7 +5871,7 @@ static int remove_and_add_spares(mddev_t *mddev) | |||
5826 | * to do that as needed. | 5871 | * to do that as needed. |
5827 | * When it is determined that resync is needed, we set MD_RECOVERY_RUNNING in | 5872 | * When it is determined that resync is needed, we set MD_RECOVERY_RUNNING in |
5828 | * "->recovery" and create a thread at ->sync_thread. | 5873 | * "->recovery" and create a thread at ->sync_thread. |
5829 | * When the thread finishes it sets MD_RECOVERY_DONE (and might set MD_RECOVERY_ERR) | 5874 | * When the thread finishes it sets MD_RECOVERY_DONE |
5830 | * and wakeups up this thread which will reap the thread and finish up. | 5875 | * and wakeups up this thread which will reap the thread and finish up. |
5831 | * This thread also removes any faulty devices (with nr_pending == 0). | 5876 | * This thread also removes any faulty devices (with nr_pending == 0). |
5832 | * | 5877 | * |
@@ -5901,8 +5946,7 @@ void md_check_recovery(mddev_t *mddev) | |||
5901 | /* resync has finished, collect result */ | 5946 | /* resync has finished, collect result */ |
5902 | md_unregister_thread(mddev->sync_thread); | 5947 | md_unregister_thread(mddev->sync_thread); |
5903 | mddev->sync_thread = NULL; | 5948 | mddev->sync_thread = NULL; |
5904 | if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && | 5949 | if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { |
5905 | !test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { | ||
5906 | /* success...*/ | 5950 | /* success...*/ |
5907 | /* activate any spares */ | 5951 | /* activate any spares */ |
5908 | mddev->pers->spare_active(mddev); | 5952 | mddev->pers->spare_active(mddev); |
@@ -5926,7 +5970,6 @@ void md_check_recovery(mddev_t *mddev) | |||
5926 | * might be left set | 5970 | * might be left set |
5927 | */ | 5971 | */ |
5928 | clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 5972 | clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
5929 | clear_bit(MD_RECOVERY_ERR, &mddev->recovery); | ||
5930 | clear_bit(MD_RECOVERY_INTR, &mddev->recovery); | 5973 | clear_bit(MD_RECOVERY_INTR, &mddev->recovery); |
5931 | clear_bit(MD_RECOVERY_DONE, &mddev->recovery); | 5974 | clear_bit(MD_RECOVERY_DONE, &mddev->recovery); |
5932 | 5975 | ||
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 4f4d1f383842..e968116e0de9 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -327,7 +327,8 @@ static int multipath_remove_disk(mddev_t *mddev, int number) | |||
327 | if (rdev) { | 327 | if (rdev) { |
328 | if (test_bit(In_sync, &rdev->flags) || | 328 | if (test_bit(In_sync, &rdev->flags) || |
329 | atomic_read(&rdev->nr_pending)) { | 329 | atomic_read(&rdev->nr_pending)) { |
330 | printk(KERN_ERR "hot-remove-disk, slot %d is identified" " but is still operational!\n", number); | 330 | printk(KERN_ERR "hot-remove-disk, slot %d is identified" |
331 | " but is still operational!\n", number); | ||
331 | err = -EBUSY; | 332 | err = -EBUSY; |
332 | goto abort; | 333 | goto abort; |
333 | } | 334 | } |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index ac409b7d83f5..c610b947218a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -773,7 +773,7 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
773 | r1bio_t *r1_bio; | 773 | r1bio_t *r1_bio; |
774 | struct bio *read_bio; | 774 | struct bio *read_bio; |
775 | int i, targets = 0, disks; | 775 | int i, targets = 0, disks; |
776 | struct bitmap *bitmap = mddev->bitmap; | 776 | struct bitmap *bitmap; |
777 | unsigned long flags; | 777 | unsigned long flags; |
778 | struct bio_list bl; | 778 | struct bio_list bl; |
779 | struct page **behind_pages = NULL; | 779 | struct page **behind_pages = NULL; |
@@ -802,6 +802,8 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
802 | 802 | ||
803 | wait_barrier(conf); | 803 | wait_barrier(conf); |
804 | 804 | ||
805 | bitmap = mddev->bitmap; | ||
806 | |||
805 | disk_stat_inc(mddev->gendisk, ios[rw]); | 807 | disk_stat_inc(mddev->gendisk, ios[rw]); |
806 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); | 808 | disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); |
807 | 809 | ||
@@ -1025,7 +1027,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1025 | /* | 1027 | /* |
1026 | * if recovery is running, make sure it aborts. | 1028 | * if recovery is running, make sure it aborts. |
1027 | */ | 1029 | */ |
1028 | set_bit(MD_RECOVERY_ERR, &mddev->recovery); | 1030 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
1029 | } else | 1031 | } else |
1030 | set_bit(Faulty, &rdev->flags); | 1032 | set_bit(Faulty, &rdev->flags); |
1031 | set_bit(MD_CHANGE_DEVS, &mddev->flags); | 1033 | set_bit(MD_CHANGE_DEVS, &mddev->flags); |
@@ -1146,6 +1148,14 @@ static int raid1_remove_disk(mddev_t *mddev, int number) | |||
1146 | err = -EBUSY; | 1148 | err = -EBUSY; |
1147 | goto abort; | 1149 | goto abort; |
1148 | } | 1150 | } |
1151 | /* Only remove non-faulty devices is recovery | ||
1152 | * is not possible. | ||
1153 | */ | ||
1154 | if (!test_bit(Faulty, &rdev->flags) && | ||
1155 | mddev->degraded < conf->raid_disks) { | ||
1156 | err = -EBUSY; | ||
1157 | goto abort; | ||
1158 | } | ||
1149 | p->rdev = NULL; | 1159 | p->rdev = NULL; |
1150 | synchronize_rcu(); | 1160 | synchronize_rcu(); |
1151 | if (atomic_read(&rdev->nr_pending)) { | 1161 | if (atomic_read(&rdev->nr_pending)) { |
@@ -1282,6 +1292,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) | |||
1282 | rdev_dec_pending(conf->mirrors[i].rdev, mddev); | 1292 | rdev_dec_pending(conf->mirrors[i].rdev, mddev); |
1283 | } else { | 1293 | } else { |
1284 | /* fixup the bio for reuse */ | 1294 | /* fixup the bio for reuse */ |
1295 | int size; | ||
1285 | sbio->bi_vcnt = vcnt; | 1296 | sbio->bi_vcnt = vcnt; |
1286 | sbio->bi_size = r1_bio->sectors << 9; | 1297 | sbio->bi_size = r1_bio->sectors << 9; |
1287 | sbio->bi_idx = 0; | 1298 | sbio->bi_idx = 0; |
@@ -1295,10 +1306,20 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio) | |||
1295 | sbio->bi_sector = r1_bio->sector + | 1306 | sbio->bi_sector = r1_bio->sector + |
1296 | conf->mirrors[i].rdev->data_offset; | 1307 | conf->mirrors[i].rdev->data_offset; |
1297 | sbio->bi_bdev = conf->mirrors[i].rdev->bdev; | 1308 | sbio->bi_bdev = conf->mirrors[i].rdev->bdev; |
1298 | for (j = 0; j < vcnt ; j++) | 1309 | size = sbio->bi_size; |
1299 | memcpy(page_address(sbio->bi_io_vec[j].bv_page), | 1310 | for (j = 0; j < vcnt ; j++) { |
1311 | struct bio_vec *bi; | ||
1312 | bi = &sbio->bi_io_vec[j]; | ||
1313 | bi->bv_offset = 0; | ||
1314 | if (size > PAGE_SIZE) | ||
1315 | bi->bv_len = PAGE_SIZE; | ||
1316 | else | ||
1317 | bi->bv_len = size; | ||
1318 | size -= PAGE_SIZE; | ||
1319 | memcpy(page_address(bi->bv_page), | ||
1300 | page_address(pbio->bi_io_vec[j].bv_page), | 1320 | page_address(pbio->bi_io_vec[j].bv_page), |
1301 | PAGE_SIZE); | 1321 | PAGE_SIZE); |
1322 | } | ||
1302 | 1323 | ||
1303 | } | 1324 | } |
1304 | } | 1325 | } |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 8536ede1e712..1de17da34a95 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1020,7 +1020,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1020 | /* | 1020 | /* |
1021 | * if recovery is running, make sure it aborts. | 1021 | * if recovery is running, make sure it aborts. |
1022 | */ | 1022 | */ |
1023 | set_bit(MD_RECOVERY_ERR, &mddev->recovery); | 1023 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
1024 | } | 1024 | } |
1025 | set_bit(Faulty, &rdev->flags); | 1025 | set_bit(Faulty, &rdev->flags); |
1026 | set_bit(MD_CHANGE_DEVS, &mddev->flags); | 1026 | set_bit(MD_CHANGE_DEVS, &mddev->flags); |
@@ -1171,6 +1171,14 @@ static int raid10_remove_disk(mddev_t *mddev, int number) | |||
1171 | err = -EBUSY; | 1171 | err = -EBUSY; |
1172 | goto abort; | 1172 | goto abort; |
1173 | } | 1173 | } |
1174 | /* Only remove faulty devices in recovery | ||
1175 | * is not possible. | ||
1176 | */ | ||
1177 | if (!test_bit(Faulty, &rdev->flags) && | ||
1178 | enough(conf)) { | ||
1179 | err = -EBUSY; | ||
1180 | goto abort; | ||
1181 | } | ||
1174 | p->rdev = NULL; | 1182 | p->rdev = NULL; |
1175 | synchronize_rcu(); | 1183 | synchronize_rcu(); |
1176 | if (atomic_read(&rdev->nr_pending)) { | 1184 | if (atomic_read(&rdev->nr_pending)) { |
@@ -1237,6 +1245,7 @@ static void end_sync_write(struct bio *bio, int error) | |||
1237 | 1245 | ||
1238 | if (!uptodate) | 1246 | if (!uptodate) |
1239 | md_error(mddev, conf->mirrors[d].rdev); | 1247 | md_error(mddev, conf->mirrors[d].rdev); |
1248 | |||
1240 | update_head_pos(i, r10_bio); | 1249 | update_head_pos(i, r10_bio); |
1241 | 1250 | ||
1242 | while (atomic_dec_and_test(&r10_bio->remaining)) { | 1251 | while (atomic_dec_and_test(&r10_bio->remaining)) { |
@@ -1844,7 +1853,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i | |||
1844 | if (rb2) | 1853 | if (rb2) |
1845 | atomic_dec(&rb2->remaining); | 1854 | atomic_dec(&rb2->remaining); |
1846 | r10_bio = rb2; | 1855 | r10_bio = rb2; |
1847 | if (!test_and_set_bit(MD_RECOVERY_ERR, &mddev->recovery)) | 1856 | if (!test_and_set_bit(MD_RECOVERY_INTR, |
1857 | &mddev->recovery)) | ||
1848 | printk(KERN_INFO "raid10: %s: insufficient working devices for recovery.\n", | 1858 | printk(KERN_INFO "raid10: %s: insufficient working devices for recovery.\n", |
1849 | mdname(mddev)); | 1859 | mdname(mddev)); |
1850 | break; | 1860 | break; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 93fde48c0f42..c37e256b1176 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -94,6 +94,8 @@ | |||
94 | #define __inline__ | 94 | #define __inline__ |
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | #define printk_rl(args...) ((void) (printk_ratelimit() && printk(args))) | ||
98 | |||
97 | #if !RAID6_USE_EMPTY_ZERO_PAGE | 99 | #if !RAID6_USE_EMPTY_ZERO_PAGE |
98 | /* In .bss so it's zeroed */ | 100 | /* In .bss so it's zeroed */ |
99 | const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); | 101 | const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); |
@@ -1143,10 +1145,12 @@ static void raid5_end_read_request(struct bio * bi, int error) | |||
1143 | set_bit(R5_UPTODATE, &sh->dev[i].flags); | 1145 | set_bit(R5_UPTODATE, &sh->dev[i].flags); |
1144 | if (test_bit(R5_ReadError, &sh->dev[i].flags)) { | 1146 | if (test_bit(R5_ReadError, &sh->dev[i].flags)) { |
1145 | rdev = conf->disks[i].rdev; | 1147 | rdev = conf->disks[i].rdev; |
1146 | printk(KERN_INFO "raid5:%s: read error corrected (%lu sectors at %llu on %s)\n", | 1148 | printk_rl(KERN_INFO "raid5:%s: read error corrected" |
1147 | mdname(conf->mddev), STRIPE_SECTORS, | 1149 | " (%lu sectors at %llu on %s)\n", |
1148 | (unsigned long long)(sh->sector + rdev->data_offset), | 1150 | mdname(conf->mddev), STRIPE_SECTORS, |
1149 | bdevname(rdev->bdev, b)); | 1151 | (unsigned long long)(sh->sector |
1152 | + rdev->data_offset), | ||
1153 | bdevname(rdev->bdev, b)); | ||
1150 | clear_bit(R5_ReadError, &sh->dev[i].flags); | 1154 | clear_bit(R5_ReadError, &sh->dev[i].flags); |
1151 | clear_bit(R5_ReWrite, &sh->dev[i].flags); | 1155 | clear_bit(R5_ReWrite, &sh->dev[i].flags); |
1152 | } | 1156 | } |
@@ -1160,16 +1164,22 @@ static void raid5_end_read_request(struct bio * bi, int error) | |||
1160 | clear_bit(R5_UPTODATE, &sh->dev[i].flags); | 1164 | clear_bit(R5_UPTODATE, &sh->dev[i].flags); |
1161 | atomic_inc(&rdev->read_errors); | 1165 | atomic_inc(&rdev->read_errors); |
1162 | if (conf->mddev->degraded) | 1166 | if (conf->mddev->degraded) |
1163 | printk(KERN_WARNING "raid5:%s: read error not correctable (sector %llu on %s).\n", | 1167 | printk_rl(KERN_WARNING |
1164 | mdname(conf->mddev), | 1168 | "raid5:%s: read error not correctable " |
1165 | (unsigned long long)(sh->sector + rdev->data_offset), | 1169 | "(sector %llu on %s).\n", |
1166 | bdn); | 1170 | mdname(conf->mddev), |
1171 | (unsigned long long)(sh->sector | ||
1172 | + rdev->data_offset), | ||
1173 | bdn); | ||
1167 | else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) | 1174 | else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) |
1168 | /* Oh, no!!! */ | 1175 | /* Oh, no!!! */ |
1169 | printk(KERN_WARNING "raid5:%s: read error NOT corrected!! (sector %llu on %s).\n", | 1176 | printk_rl(KERN_WARNING |
1170 | mdname(conf->mddev), | 1177 | "raid5:%s: read error NOT corrected!! " |
1171 | (unsigned long long)(sh->sector + rdev->data_offset), | 1178 | "(sector %llu on %s).\n", |
1172 | bdn); | 1179 | mdname(conf->mddev), |
1180 | (unsigned long long)(sh->sector | ||
1181 | + rdev->data_offset), | ||
1182 | bdn); | ||
1173 | else if (atomic_read(&rdev->read_errors) | 1183 | else if (atomic_read(&rdev->read_errors) |
1174 | > conf->max_nr_stripes) | 1184 | > conf->max_nr_stripes) |
1175 | printk(KERN_WARNING | 1185 | printk(KERN_WARNING |
@@ -1258,7 +1268,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1258 | /* | 1268 | /* |
1259 | * if recovery was running, make sure it aborts. | 1269 | * if recovery was running, make sure it aborts. |
1260 | */ | 1270 | */ |
1261 | set_bit(MD_RECOVERY_ERR, &mddev->recovery); | 1271 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
1262 | } | 1272 | } |
1263 | set_bit(Faulty, &rdev->flags); | 1273 | set_bit(Faulty, &rdev->flags); |
1264 | printk (KERN_ALERT | 1274 | printk (KERN_ALERT |
@@ -1992,6 +2002,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh, | |||
1992 | * have quiesced. | 2002 | * have quiesced. |
1993 | */ | 2003 | */ |
1994 | if ((s->uptodate == disks - 1) && | 2004 | if ((s->uptodate == disks - 1) && |
2005 | (s->failed && disk_idx == s->failed_num) && | ||
1995 | !test_bit(STRIPE_OP_CHECK, &sh->ops.pending)) { | 2006 | !test_bit(STRIPE_OP_CHECK, &sh->ops.pending)) { |
1996 | set_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); | 2007 | set_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); |
1997 | set_bit(R5_Wantcompute, &dev->flags); | 2008 | set_bit(R5_Wantcompute, &dev->flags); |
@@ -2077,7 +2088,9 @@ static void handle_issuing_new_read_requests6(struct stripe_head *sh, | |||
2077 | /* we would like to get this block, possibly | 2088 | /* we would like to get this block, possibly |
2078 | * by computing it, but we might not be able to | 2089 | * by computing it, but we might not be able to |
2079 | */ | 2090 | */ |
2080 | if (s->uptodate == disks-1) { | 2091 | if ((s->uptodate == disks - 1) && |
2092 | (s->failed && (i == r6s->failed_num[0] || | ||
2093 | i == r6s->failed_num[1]))) { | ||
2081 | pr_debug("Computing stripe %llu block %d\n", | 2094 | pr_debug("Computing stripe %llu block %d\n", |
2082 | (unsigned long long)sh->sector, i); | 2095 | (unsigned long long)sh->sector, i); |
2083 | compute_block_1(sh, i, 0); | 2096 | compute_block_1(sh, i, 0); |
@@ -2635,6 +2648,7 @@ static void handle_stripe5(struct stripe_head *sh) | |||
2635 | struct r5dev *dev; | 2648 | struct r5dev *dev; |
2636 | unsigned long pending = 0; | 2649 | unsigned long pending = 0; |
2637 | mdk_rdev_t *blocked_rdev = NULL; | 2650 | mdk_rdev_t *blocked_rdev = NULL; |
2651 | int prexor; | ||
2638 | 2652 | ||
2639 | memset(&s, 0, sizeof(s)); | 2653 | memset(&s, 0, sizeof(s)); |
2640 | pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d " | 2654 | pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d " |
@@ -2764,9 +2778,11 @@ static void handle_stripe5(struct stripe_head *sh) | |||
2764 | /* leave prexor set until postxor is done, allows us to distinguish | 2778 | /* leave prexor set until postxor is done, allows us to distinguish |
2765 | * a rmw from a rcw during biodrain | 2779 | * a rmw from a rcw during biodrain |
2766 | */ | 2780 | */ |
2781 | prexor = 0; | ||
2767 | if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) && | 2782 | if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) && |
2768 | test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) { | 2783 | test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) { |
2769 | 2784 | ||
2785 | prexor = 1; | ||
2770 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete); | 2786 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete); |
2771 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack); | 2787 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack); |
2772 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending); | 2788 | clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending); |
@@ -2800,6 +2816,8 @@ static void handle_stripe5(struct stripe_head *sh) | |||
2800 | if (!test_and_set_bit( | 2816 | if (!test_and_set_bit( |
2801 | STRIPE_OP_IO, &sh->ops.pending)) | 2817 | STRIPE_OP_IO, &sh->ops.pending)) |
2802 | sh->ops.count++; | 2818 | sh->ops.count++; |
2819 | if (prexor) | ||
2820 | continue; | ||
2803 | if (!test_bit(R5_Insync, &dev->flags) || | 2821 | if (!test_bit(R5_Insync, &dev->flags) || |
2804 | (i == sh->pd_idx && s.failed == 0)) | 2822 | (i == sh->pd_idx && s.failed == 0)) |
2805 | set_bit(STRIPE_INSYNC, &sh->state); | 2823 | set_bit(STRIPE_INSYNC, &sh->state); |
@@ -4564,6 +4582,14 @@ static int raid5_remove_disk(mddev_t *mddev, int number) | |||
4564 | err = -EBUSY; | 4582 | err = -EBUSY; |
4565 | goto abort; | 4583 | goto abort; |
4566 | } | 4584 | } |
4585 | /* Only remove non-faulty devices if recovery | ||
4586 | * isn't possible. | ||
4587 | */ | ||
4588 | if (!test_bit(Faulty, &rdev->flags) && | ||
4589 | mddev->degraded <= conf->max_degraded) { | ||
4590 | err = -EBUSY; | ||
4591 | goto abort; | ||
4592 | } | ||
4567 | p->rdev = NULL; | 4593 | p->rdev = NULL; |
4568 | synchronize_rcu(); | 4594 | synchronize_rcu(); |
4569 | if (atomic_read(&rdev->nr_pending)) { | 4595 | if (atomic_read(&rdev->nr_pending)) { |
diff --git a/drivers/media/Makefile b/drivers/media/Makefile index cc11c4c0e7e7..09a829d8a7e7 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile | |||
@@ -2,12 +2,7 @@ | |||
2 | # Makefile for the kernel multimedia device drivers. | 2 | # Makefile for the kernel multimedia device drivers. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := common/ | 5 | obj-y += common/ video/ |
6 | |||
7 | obj-$(CONFIG_VIDEO_MEDIA) += common/ | ||
8 | |||
9 | # Since hybrid devices are here, should be compiled if DVB and/or V4L | ||
10 | obj-$(CONFIG_VIDEO_MEDIA) += video/ | ||
11 | 6 | ||
12 | obj-$(CONFIG_VIDEO_DEV) += radio/ | 7 | obj-$(CONFIG_VIDEO_DEV) += radio/ |
13 | obj-$(CONFIG_DVB_CORE) += dvb/ | 8 | obj-$(CONFIG_DVB_CORE) += dvb/ |
diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig index d6206540476b..85482960d012 100644 --- a/drivers/media/common/tuners/Kconfig +++ b/drivers/media/common/tuners/Kconfig | |||
@@ -21,6 +21,7 @@ config MEDIA_TUNER | |||
21 | tristate | 21 | tristate |
22 | default VIDEO_MEDIA && I2C | 22 | default VIDEO_MEDIA && I2C |
23 | depends on VIDEO_MEDIA && I2C | 23 | depends on VIDEO_MEDIA && I2C |
24 | select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG | ||
24 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG | 25 | select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG |
25 | select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG | 26 | select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG |
26 | select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE | 27 | select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE |
diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c index 5d05b5390f66..0dc2bef9f6a3 100644 --- a/drivers/media/common/tuners/mxl5005s.c +++ b/drivers/media/common/tuners/mxl5005s.c | |||
@@ -101,7 +101,7 @@ enum { | |||
101 | MXL_QAM, | 101 | MXL_QAM, |
102 | MXL_ANALOG_CABLE, | 102 | MXL_ANALOG_CABLE, |
103 | MXL_ANALOG_OTA | 103 | MXL_ANALOG_OTA |
104 | } tuner_modu_type; | 104 | }; |
105 | 105 | ||
106 | /* MXL5005 Tuner Register Struct */ | 106 | /* MXL5005 Tuner Register Struct */ |
107 | struct TunerReg { | 107 | struct TunerReg { |
@@ -194,7 +194,7 @@ enum { | |||
194 | RFSYN_DIVM, /* 88 */ | 194 | RFSYN_DIVM, /* 88 */ |
195 | DN_BYPASS_AGC_I2C /* 89 */ | 195 | DN_BYPASS_AGC_I2C /* 89 */ |
196 | #endif | 196 | #endif |
197 | } MXL5005_ControlName; | 197 | }; |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * The following context is source code provided by MaxLinear. | 200 | * The following context is source code provided by MaxLinear. |
diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c index 42b5f5d4bfe6..f1894fec32b9 100644 --- a/drivers/media/common/tuners/tda18271-common.c +++ b/drivers/media/common/tuners/tda18271-common.c | |||
@@ -648,11 +648,11 @@ int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq) | |||
648 | unsigned char *regs = priv->tda18271_regs; | 648 | unsigned char *regs = priv->tda18271_regs; |
649 | u8 val; | 649 | u8 val; |
650 | 650 | ||
651 | tda18271_lookup_map(fe, RF_CAL, freq, &val); | 651 | int ret = tda18271_lookup_map(fe, RF_CAL, freq, &val); |
652 | 652 | ||
653 | regs[R_EB14] = val; | 653 | regs[R_EB14] = val; |
654 | 654 | ||
655 | return 0; | 655 | return ret; |
656 | } | 656 | } |
657 | 657 | ||
658 | /* | 658 | /* |
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c index d30d2c9094d9..8555d9cf9051 100644 --- a/drivers/media/common/tuners/tda827x.c +++ b/drivers/media/common/tuners/tda827x.c | |||
@@ -418,13 +418,13 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high, | |||
418 | unsigned char buf[] = {0x22, 0x01}; | 418 | unsigned char buf[] = {0x22, 0x01}; |
419 | int arg; | 419 | int arg; |
420 | int gp_func; | 420 | int gp_func; |
421 | struct i2c_msg msg = { .addr = priv->cfg->switch_addr, .flags = 0, | 421 | struct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) }; |
422 | .buf = buf, .len = sizeof(buf) }; | ||
423 | 422 | ||
424 | if (NULL == priv->cfg) { | 423 | if (NULL == priv->cfg) { |
425 | dprintk("tda827x_config not defined, cannot set LNA gain!\n"); | 424 | dprintk("tda827x_config not defined, cannot set LNA gain!\n"); |
426 | return; | 425 | return; |
427 | } | 426 | } |
427 | msg.addr = priv->cfg->switch_addr; | ||
428 | if (priv->cfg->config) { | 428 | if (priv->cfg->config) { |
429 | if (high) | 429 | if (high) |
430 | dprintk("setting LNA to high gain\n"); | 430 | dprintk("setting LNA to high gain\n"); |
diff --git a/drivers/media/common/tuners/tea5761.c b/drivers/media/common/tuners/tea5761.c index b93cdef9ac73..b23dadeecd05 100644 --- a/drivers/media/common/tuners/tea5761.c +++ b/drivers/media/common/tuners/tea5761.c | |||
@@ -295,7 +295,7 @@ struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe, | |||
295 | { | 295 | { |
296 | struct tea5761_priv *priv = NULL; | 296 | struct tea5761_priv *priv = NULL; |
297 | 297 | ||
298 | if (tea5761_autodetection(i2c_adap, i2c_addr) == EINVAL) | 298 | if (tea5761_autodetection(i2c_adap, i2c_addr) != 0) |
299 | return NULL; | 299 | return NULL; |
300 | 300 | ||
301 | priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL); | 301 | priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL); |
diff --git a/drivers/media/common/tuners/tuner-i2c.h b/drivers/media/common/tuners/tuner-i2c.h index 3ad6c8e0b04c..cb1c7141f0c6 100644 --- a/drivers/media/common/tuners/tuner-i2c.h +++ b/drivers/media/common/tuners/tuner-i2c.h | |||
@@ -170,4 +170,12 @@ __fail: \ | |||
170 | __ret; \ | 170 | __ret; \ |
171 | }) | 171 | }) |
172 | 172 | ||
173 | #define hybrid_tuner_report_instance_count(state) \ | ||
174 | ({ \ | ||
175 | int __ret = 0; \ | ||
176 | if (state) \ | ||
177 | __ret = state->i2c_props.count; \ | ||
178 | __ret; \ | ||
179 | }) | ||
180 | |||
173 | #endif /* __TUNER_I2C_H__ */ | 181 | #endif /* __TUNER_I2C_H__ */ |
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c index be8d903171b7..266c255cf0d8 100644 --- a/drivers/media/common/tuners/tuner-simple.c +++ b/drivers/media/common/tuners/tuner-simple.c | |||
@@ -1018,8 +1018,10 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, | |||
1018 | fe->ops.i2c_gate_ctrl(fe, 1); | 1018 | fe->ops.i2c_gate_ctrl(fe, 1); |
1019 | 1019 | ||
1020 | if (1 != i2c_transfer(i2c_adap, &msg, 1)) | 1020 | if (1 != i2c_transfer(i2c_adap, &msg, 1)) |
1021 | tuner_warn("unable to probe %s, proceeding anyway.", | 1021 | printk(KERN_WARNING "tuner-simple %d-%04x: " |
1022 | tuners[type].name); | 1022 | "unable to probe %s, proceeding anyway.", |
1023 | i2c_adapter_id(i2c_adap), i2c_addr, | ||
1024 | tuners[type].name); | ||
1023 | 1025 | ||
1024 | if (fe->ops.i2c_gate_ctrl) | 1026 | if (fe->ops.i2c_gate_ctrl) |
1025 | fe->ops.i2c_gate_ctrl(fe, 0); | 1027 | fe->ops.i2c_gate_ctrl(fe, 0); |
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 9e9003cffc7f..0cbde17bfbb7 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -46,7 +46,7 @@ module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0); | |||
46 | MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " | 46 | MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " |
47 | "default firmware name\n"); | 47 | "default firmware name\n"); |
48 | 48 | ||
49 | static LIST_HEAD(xc2028_list); | 49 | static LIST_HEAD(hybrid_tuner_instance_list); |
50 | static DEFINE_MUTEX(xc2028_list_mutex); | 50 | static DEFINE_MUTEX(xc2028_list_mutex); |
51 | 51 | ||
52 | /* struct for storing firmware table */ | 52 | /* struct for storing firmware table */ |
@@ -68,12 +68,11 @@ struct firmware_properties { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | struct xc2028_data { | 70 | struct xc2028_data { |
71 | struct list_head xc2028_list; | 71 | struct list_head hybrid_tuner_instance_list; |
72 | struct tuner_i2c_props i2c_props; | 72 | struct tuner_i2c_props i2c_props; |
73 | int (*tuner_callback) (void *dev, | 73 | int (*tuner_callback) (void *dev, |
74 | int command, int arg); | 74 | int command, int arg); |
75 | void *video_dev; | 75 | void *video_dev; |
76 | int count; | ||
77 | __u32 frequency; | 76 | __u32 frequency; |
78 | 77 | ||
79 | struct firmware_description *firm; | 78 | struct firmware_description *firm; |
@@ -1072,20 +1071,19 @@ static int xc2028_dvb_release(struct dvb_frontend *fe) | |||
1072 | 1071 | ||
1073 | mutex_lock(&xc2028_list_mutex); | 1072 | mutex_lock(&xc2028_list_mutex); |
1074 | 1073 | ||
1075 | priv->count--; | 1074 | /* only perform final cleanup if this is the last instance */ |
1076 | 1075 | if (hybrid_tuner_report_instance_count(priv) == 1) { | |
1077 | if (!priv->count) { | ||
1078 | list_del(&priv->xc2028_list); | ||
1079 | |||
1080 | kfree(priv->ctrl.fname); | 1076 | kfree(priv->ctrl.fname); |
1081 | |||
1082 | free_firmware(priv); | 1077 | free_firmware(priv); |
1083 | kfree(priv); | ||
1084 | fe->tuner_priv = NULL; | ||
1085 | } | 1078 | } |
1086 | 1079 | ||
1080 | if (priv) | ||
1081 | hybrid_tuner_release_state(priv); | ||
1082 | |||
1087 | mutex_unlock(&xc2028_list_mutex); | 1083 | mutex_unlock(&xc2028_list_mutex); |
1088 | 1084 | ||
1085 | fe->tuner_priv = NULL; | ||
1086 | |||
1089 | return 0; | 1087 | return 0; |
1090 | } | 1088 | } |
1091 | 1089 | ||
@@ -1150,7 +1148,7 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, | |||
1150 | struct xc2028_config *cfg) | 1148 | struct xc2028_config *cfg) |
1151 | { | 1149 | { |
1152 | struct xc2028_data *priv; | 1150 | struct xc2028_data *priv; |
1153 | void *video_dev; | 1151 | int instance; |
1154 | 1152 | ||
1155 | if (debug) | 1153 | if (debug) |
1156 | printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n"); | 1154 | printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n"); |
@@ -1163,48 +1161,40 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, | |||
1163 | return NULL; | 1161 | return NULL; |
1164 | } | 1162 | } |
1165 | 1163 | ||
1166 | video_dev = cfg->i2c_adap->algo_data; | ||
1167 | |||
1168 | if (debug) | ||
1169 | printk(KERN_DEBUG "xc2028: video_dev =%p\n", video_dev); | ||
1170 | |||
1171 | mutex_lock(&xc2028_list_mutex); | 1164 | mutex_lock(&xc2028_list_mutex); |
1172 | 1165 | ||
1173 | list_for_each_entry(priv, &xc2028_list, xc2028_list) { | 1166 | instance = hybrid_tuner_request_state(struct xc2028_data, priv, |
1174 | if (&priv->i2c_props.adap->dev == &cfg->i2c_adap->dev) { | 1167 | hybrid_tuner_instance_list, |
1175 | video_dev = NULL; | 1168 | cfg->i2c_adap, cfg->i2c_addr, |
1176 | if (debug) | 1169 | "xc2028"); |
1177 | printk(KERN_DEBUG "xc2028: reusing device\n"); | 1170 | switch (instance) { |
1178 | 1171 | case 0: | |
1179 | break; | 1172 | /* memory allocation failure */ |
1180 | } | 1173 | goto fail; |
1181 | } | 1174 | break; |
1182 | 1175 | case 1: | |
1183 | if (video_dev) { | 1176 | /* new tuner instance */ |
1184 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | ||
1185 | if (priv == NULL) { | ||
1186 | mutex_unlock(&xc2028_list_mutex); | ||
1187 | return NULL; | ||
1188 | } | ||
1189 | |||
1190 | priv->i2c_props.addr = cfg->i2c_addr; | ||
1191 | priv->i2c_props.adap = cfg->i2c_adap; | ||
1192 | priv->i2c_props.name = "xc2028"; | ||
1193 | |||
1194 | priv->video_dev = video_dev; | ||
1195 | priv->tuner_callback = cfg->callback; | 1177 | priv->tuner_callback = cfg->callback; |
1196 | priv->ctrl.max_len = 13; | 1178 | priv->ctrl.max_len = 13; |
1197 | 1179 | ||
1198 | mutex_init(&priv->lock); | 1180 | mutex_init(&priv->lock); |
1199 | 1181 | ||
1200 | list_add_tail(&priv->xc2028_list, &xc2028_list); | 1182 | /* analog side (tuner-core) uses i2c_adap->algo_data. |
1201 | } | 1183 | * digital side is not guaranteed to have algo_data defined. |
1202 | 1184 | * | |
1203 | fe->tuner_priv = priv; | 1185 | * digital side will always have fe->dvb defined. |
1204 | priv->count++; | 1186 | * analog side (tuner-core) doesn't (yet) define fe->dvb. |
1187 | */ | ||
1188 | priv->video_dev = ((fe->dvb) && (fe->dvb->priv)) ? | ||
1189 | fe->dvb->priv : cfg->i2c_adap->algo_data; | ||
1205 | 1190 | ||
1206 | if (debug) | 1191 | fe->tuner_priv = priv; |
1207 | printk(KERN_DEBUG "xc2028: usage count is %i\n", priv->count); | 1192 | break; |
1193 | case 2: | ||
1194 | /* existing tuner instance */ | ||
1195 | fe->tuner_priv = priv; | ||
1196 | break; | ||
1197 | } | ||
1208 | 1198 | ||
1209 | memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, | 1199 | memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, |
1210 | sizeof(xc2028_dvb_tuner_ops)); | 1200 | sizeof(xc2028_dvb_tuner_ops)); |
@@ -1217,6 +1207,11 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, | |||
1217 | mutex_unlock(&xc2028_list_mutex); | 1207 | mutex_unlock(&xc2028_list_mutex); |
1218 | 1208 | ||
1219 | return fe; | 1209 | return fe; |
1210 | fail: | ||
1211 | mutex_unlock(&xc2028_list_mutex); | ||
1212 | |||
1213 | xc2028_dvb_release(fe); | ||
1214 | return NULL; | ||
1220 | } | 1215 | } |
1221 | 1216 | ||
1222 | EXPORT_SYMBOL(xc2028_attach); | 1217 | EXPORT_SYMBOL(xc2028_attach); |
diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c index 449fb5c3d0b1..ae0d76a5d51d 100644 --- a/drivers/media/dvb/b2c2/flexcop-usb.c +++ b/drivers/media/dvb/b2c2/flexcop-usb.c | |||
@@ -379,7 +379,7 @@ static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb) | |||
379 | 379 | ||
380 | static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) | 380 | static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) |
381 | { | 381 | { |
382 | u16 frame_size = fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize; | 382 | u16 frame_size = le16_to_cpu(fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize); |
383 | int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret; | 383 | int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret; |
384 | int buffer_offset = 0; | 384 | int buffer_offset = 0; |
385 | 385 | ||
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index f5010e8671b8..a824f3719f81 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -82,22 +82,22 @@ enum cinergyt2_ep1_cmd { | |||
82 | 82 | ||
83 | struct dvbt_set_parameters_msg { | 83 | struct dvbt_set_parameters_msg { |
84 | uint8_t cmd; | 84 | uint8_t cmd; |
85 | uint32_t freq; | 85 | __le32 freq; |
86 | uint8_t bandwidth; | 86 | uint8_t bandwidth; |
87 | uint16_t tps; | 87 | __le16 tps; |
88 | uint8_t flags; | 88 | uint8_t flags; |
89 | } __attribute__((packed)); | 89 | } __attribute__((packed)); |
90 | 90 | ||
91 | struct dvbt_get_status_msg { | 91 | struct dvbt_get_status_msg { |
92 | uint32_t freq; | 92 | __le32 freq; |
93 | uint8_t bandwidth; | 93 | uint8_t bandwidth; |
94 | uint16_t tps; | 94 | __le16 tps; |
95 | uint8_t flags; | 95 | uint8_t flags; |
96 | uint16_t gain; | 96 | __le16 gain; |
97 | uint8_t snr; | 97 | uint8_t snr; |
98 | uint32_t viterbi_error_rate; | 98 | __le32 viterbi_error_rate; |
99 | uint32_t rs_error_rate; | 99 | __le32 rs_error_rate; |
100 | uint32_t uncorrected_block_count; | 100 | __le32 uncorrected_block_count; |
101 | uint8_t lock_bits; | 101 | uint8_t lock_bits; |
102 | uint8_t prev_lock_bits; | 102 | uint8_t prev_lock_bits; |
103 | } __attribute__((packed)); | 103 | } __attribute__((packed)); |
@@ -136,6 +136,7 @@ struct cinergyt2 { | |||
136 | wait_queue_head_t poll_wq; | 136 | wait_queue_head_t poll_wq; |
137 | int pending_fe_events; | 137 | int pending_fe_events; |
138 | int disconnect_pending; | 138 | int disconnect_pending; |
139 | unsigned int uncorrected_block_count; | ||
139 | atomic_t inuse; | 140 | atomic_t inuse; |
140 | 141 | ||
141 | void *streambuf; | 142 | void *streambuf; |
@@ -147,7 +148,7 @@ struct cinergyt2 { | |||
147 | char phys[64]; | 148 | char phys[64]; |
148 | struct delayed_work rc_query_work; | 149 | struct delayed_work rc_query_work; |
149 | int rc_input_event; | 150 | int rc_input_event; |
150 | u32 rc_last_code; | 151 | __le32 rc_last_code; |
151 | unsigned long last_event_jiffies; | 152 | unsigned long last_event_jiffies; |
152 | #endif | 153 | #endif |
153 | }; | 154 | }; |
@@ -160,7 +161,7 @@ enum { | |||
160 | 161 | ||
161 | struct cinergyt2_rc_event { | 162 | struct cinergyt2_rc_event { |
162 | char type; | 163 | char type; |
163 | uint32_t value; | 164 | __le32 value; |
164 | } __attribute__((packed)); | 165 | } __attribute__((packed)); |
165 | 166 | ||
166 | static const uint32_t rc_keys[] = { | 167 | static const uint32_t rc_keys[] = { |
@@ -619,8 +620,11 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file, | |||
619 | { | 620 | { |
620 | uint32_t unc_count; | 621 | uint32_t unc_count; |
621 | 622 | ||
622 | unc_count = stat->uncorrected_block_count; | 623 | if (mutex_lock_interruptible(&cinergyt2->sem)) |
623 | stat->uncorrected_block_count = 0; | 624 | return -ERESTARTSYS; |
625 | unc_count = cinergyt2->uncorrected_block_count; | ||
626 | cinergyt2->uncorrected_block_count = 0; | ||
627 | mutex_unlock(&cinergyt2->sem); | ||
624 | 628 | ||
625 | /* UNC are already converted to host byte order... */ | 629 | /* UNC are already converted to host byte order... */ |
626 | return put_user(unc_count,(__u32 __user *) arg); | 630 | return put_user(unc_count,(__u32 __user *) arg); |
@@ -769,7 +773,7 @@ static void cinergyt2_query_rc (struct work_struct *work) | |||
769 | input_sync(cinergyt2->rc_input_dev); | 773 | input_sync(cinergyt2->rc_input_dev); |
770 | cinergyt2->rc_input_event = KEY_MAX; | 774 | cinergyt2->rc_input_event = KEY_MAX; |
771 | } | 775 | } |
772 | cinergyt2->rc_last_code = ~0; | 776 | cinergyt2->rc_last_code = cpu_to_le32(~0); |
773 | } | 777 | } |
774 | goto out; | 778 | goto out; |
775 | } | 779 | } |
@@ -780,7 +784,7 @@ static void cinergyt2_query_rc (struct work_struct *work) | |||
780 | n, le32_to_cpu(rc_events[n].value), rc_events[n].type); | 784 | n, le32_to_cpu(rc_events[n].value), rc_events[n].type); |
781 | 785 | ||
782 | if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && | 786 | if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && |
783 | rc_events[n].value == ~0) { | 787 | rc_events[n].value == cpu_to_le32(~0)) { |
784 | /* keyrepeat bit -> just repeat last rc_input_event */ | 788 | /* keyrepeat bit -> just repeat last rc_input_event */ |
785 | } else { | 789 | } else { |
786 | cinergyt2->rc_input_event = KEY_MAX; | 790 | cinergyt2->rc_input_event = KEY_MAX; |
@@ -795,7 +799,7 @@ static void cinergyt2_query_rc (struct work_struct *work) | |||
795 | 799 | ||
796 | if (cinergyt2->rc_input_event != KEY_MAX) { | 800 | if (cinergyt2->rc_input_event != KEY_MAX) { |
797 | if (rc_events[n].value == cinergyt2->rc_last_code && | 801 | if (rc_events[n].value == cinergyt2->rc_last_code && |
798 | cinergyt2->rc_last_code != ~0) { | 802 | cinergyt2->rc_last_code != cpu_to_le32(~0)) { |
799 | /* emit a key-up so the double event is recognized */ | 803 | /* emit a key-up so the double event is recognized */ |
800 | dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event); | 804 | dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event); |
801 | input_report_key(cinergyt2->rc_input_dev, | 805 | input_report_key(cinergyt2->rc_input_dev, |
@@ -829,7 +833,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2) | |||
829 | usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys)); | 833 | usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys)); |
830 | strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); | 834 | strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); |
831 | cinergyt2->rc_input_event = KEY_MAX; | 835 | cinergyt2->rc_input_event = KEY_MAX; |
832 | cinergyt2->rc_last_code = ~0; | 836 | cinergyt2->rc_last_code = cpu_to_le32(~0); |
833 | INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc); | 837 | INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc); |
834 | 838 | ||
835 | input_dev->name = DRIVER_NAME " remote control"; | 839 | input_dev->name = DRIVER_NAME " remote control"; |
@@ -840,8 +844,8 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2) | |||
840 | input_dev->keycodesize = 0; | 844 | input_dev->keycodesize = 0; |
841 | input_dev->keycodemax = 0; | 845 | input_dev->keycodemax = 0; |
842 | input_dev->id.bustype = BUS_USB; | 846 | input_dev->id.bustype = BUS_USB; |
843 | input_dev->id.vendor = cinergyt2->udev->descriptor.idVendor; | 847 | input_dev->id.vendor = le16_to_cpu(cinergyt2->udev->descriptor.idVendor); |
844 | input_dev->id.product = cinergyt2->udev->descriptor.idProduct; | 848 | input_dev->id.product = le16_to_cpu(cinergyt2->udev->descriptor.idProduct); |
845 | input_dev->id.version = 1; | 849 | input_dev->id.version = 1; |
846 | input_dev->dev.parent = &cinergyt2->udev->dev; | 850 | input_dev->dev.parent = &cinergyt2->udev->dev; |
847 | 851 | ||
@@ -889,18 +893,16 @@ static void cinergyt2_query (struct work_struct *work) | |||
889 | char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; | 893 | char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; |
890 | struct dvbt_get_status_msg *s = &cinergyt2->status; | 894 | struct dvbt_get_status_msg *s = &cinergyt2->status; |
891 | uint8_t lock_bits; | 895 | uint8_t lock_bits; |
892 | uint32_t unc; | ||
893 | 896 | ||
894 | if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) | 897 | if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) |
895 | return; | 898 | return; |
896 | 899 | ||
897 | unc = s->uncorrected_block_count; | ||
898 | lock_bits = s->lock_bits; | 900 | lock_bits = s->lock_bits; |
899 | 901 | ||
900 | cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s)); | 902 | cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s)); |
901 | 903 | ||
902 | unc += le32_to_cpu(s->uncorrected_block_count); | 904 | cinergyt2->uncorrected_block_count += |
903 | s->uncorrected_block_count = unc; | 905 | le32_to_cpu(s->uncorrected_block_count); |
904 | 906 | ||
905 | if (lock_bits != s->lock_bits) { | 907 | if (lock_bits != s->lock_bits) { |
906 | wake_up_interruptible(&cinergyt2->poll_wq); | 908 | wake_up_interruptible(&cinergyt2->poll_wq); |
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c index 56d871cfd7fc..c2334aef4143 100644 --- a/drivers/media/dvb/dvb-core/dvb_net.c +++ b/drivers/media/dvb/dvb-core/dvb_net.c | |||
@@ -168,7 +168,7 @@ struct dvb_net_priv { | |||
168 | * stolen from eth.c out of the linux kernel, hacked for dvb-device | 168 | * stolen from eth.c out of the linux kernel, hacked for dvb-device |
169 | * by Michael Holzt <kju@debian.org> | 169 | * by Michael Holzt <kju@debian.org> |
170 | */ | 170 | */ |
171 | static unsigned short dvb_net_eth_type_trans(struct sk_buff *skb, | 171 | static __be16 dvb_net_eth_type_trans(struct sk_buff *skb, |
172 | struct net_device *dev) | 172 | struct net_device *dev) |
173 | { | 173 | { |
174 | struct ethhdr *eth; | 174 | struct ethhdr *eth; |
@@ -277,10 +277,10 @@ static int handle_one_ule_extension( struct dvb_net_priv *p ) | |||
277 | if(ext_len >= 0) { | 277 | if(ext_len >= 0) { |
278 | p->ule_next_hdr += ext_len; | 278 | p->ule_next_hdr += ext_len; |
279 | if (!p->ule_bridged) { | 279 | if (!p->ule_bridged) { |
280 | p->ule_sndu_type = ntohs(*(unsigned short *)p->ule_next_hdr); | 280 | p->ule_sndu_type = ntohs(*(__be16 *)p->ule_next_hdr); |
281 | p->ule_next_hdr += 2; | 281 | p->ule_next_hdr += 2; |
282 | } else { | 282 | } else { |
283 | p->ule_sndu_type = ntohs(*(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); | 283 | p->ule_sndu_type = ntohs(*(__be16 *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); |
284 | /* This assures the extension handling loop will terminate. */ | 284 | /* This assures the extension handling loop will terminate. */ |
285 | } | 285 | } |
286 | } | 286 | } |
@@ -294,7 +294,7 @@ static int handle_one_ule_extension( struct dvb_net_priv *p ) | |||
294 | if (ule_optional_ext_handlers[htype]) | 294 | if (ule_optional_ext_handlers[htype]) |
295 | (void)ule_optional_ext_handlers[htype]( p ); | 295 | (void)ule_optional_ext_handlers[htype]( p ); |
296 | p->ule_next_hdr += ext_len; | 296 | p->ule_next_hdr += ext_len; |
297 | p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr-2) ); | 297 | p->ule_sndu_type = ntohs( *(__be16 *)(p->ule_next_hdr-2) ); |
298 | /* | 298 | /* |
299 | * note: the length of the next header type is included in the | 299 | * note: the length of the next header type is included in the |
300 | * length of THIS optional extension header | 300 | * length of THIS optional extension header |
@@ -594,8 +594,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len ) | |||
594 | /* Check for complete payload. */ | 594 | /* Check for complete payload. */ |
595 | if (priv->ule_sndu_remain <= 0) { | 595 | if (priv->ule_sndu_remain <= 0) { |
596 | /* Check CRC32, we've got it in our skb already. */ | 596 | /* Check CRC32, we've got it in our skb already. */ |
597 | unsigned short ulen = htons(priv->ule_sndu_len); | 597 | __be16 ulen = htons(priv->ule_sndu_len); |
598 | unsigned short utype = htons(priv->ule_sndu_type); | 598 | __be16 utype = htons(priv->ule_sndu_type); |
599 | const u8 *tail; | 599 | const u8 *tail; |
600 | struct kvec iov[3] = { | 600 | struct kvec iov[3] = { |
601 | { &ulen, sizeof ulen }, | 601 | { &ulen, sizeof ulen }, |
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index cf4584e48b6d..f00a0eb40420 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_USB | 1 | config DVB_USB |
2 | tristate "Support for various USB DVB devices" | 2 | tristate "Support for various USB DVB devices" |
3 | depends on DVB_CORE && USB && I2C | 3 | depends on DVB_CORE && USB && I2C && INPUT |
4 | depends on HOTPLUG # due to FW_LOADER | 4 | depends on HOTPLUG # due to FW_LOADER |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | help | 6 | help |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 346223856f59..c4d40fe01d57 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -111,8 +111,8 @@ static int bristol_tuner_attach(struct dvb_usb_adapter *adap) | |||
111 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); | 111 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); |
112 | s8 a; | 112 | s8 a; |
113 | int if1=1220; | 113 | int if1=1220; |
114 | if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && | 114 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
115 | adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_500_2) { | 115 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { |
116 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; | 116 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; |
117 | } | 117 | } |
118 | return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], | 118 | return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], |
@@ -402,8 +402,8 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) | |||
402 | { | 402 | { |
403 | struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; | 403 | struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; |
404 | 404 | ||
405 | if (desc->idVendor == USB_VID_PINNACLE && | 405 | if (desc->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
406 | desc->idProduct == USB_PID_PINNACLE_EXPRESSCARD_320CX) | 406 | desc->idProduct == cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX)) |
407 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | 407 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
408 | else | 408 | else |
409 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | 409 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
@@ -845,8 +845,8 @@ static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) | |||
845 | struct i2c_adapter *tun_i2c; | 845 | struct i2c_adapter *tun_i2c; |
846 | s8 a; | 846 | s8 a; |
847 | int if1=1220; | 847 | int if1=1220; |
848 | if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && | 848 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
849 | adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_STICK) { | 849 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { |
850 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; | 850 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; |
851 | } | 851 | } |
852 | if (st->is_dib7000pc) | 852 | if (st->is_dib7000pc) |
@@ -990,11 +990,12 @@ static struct dib7000p_config dib7070p_dib7000p_config = { | |||
990 | /* STK7070P */ | 990 | /* STK7070P */ |
991 | static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) | 991 | static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) |
992 | { | 992 | { |
993 | if (adap->dev->udev->descriptor.idVendor == USB_VID_PINNACLE && | 993 | struct usb_device_descriptor *p = &adap->dev->udev->descriptor; |
994 | adap->dev->udev->descriptor.idProduct == USB_PID_PINNACLE_PCTV72E) | 994 | if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
995 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | 995 | p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) |
996 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | ||
996 | else | 997 | else |
997 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | 998 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
998 | msleep(10); | 999 | msleep(10); |
999 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); | 1000 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
1000 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); | 1001 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c index e1112e39fb63..733a7ff7b207 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | |||
@@ -127,7 +127,7 @@ int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, | |||
127 | if ((*pos + hx->len + 4) >= fw->size) | 127 | if ((*pos + hx->len + 4) >= fw->size) |
128 | return -EINVAL; | 128 | return -EINVAL; |
129 | 129 | ||
130 | hx->addr = le16_to_cpu( *((u16 *) &b[1]) ); | 130 | hx->addr = b[1] | (b[2] << 8); |
131 | hx->type = b[3]; | 131 | hx->type = b[3]; |
132 | 132 | ||
133 | if (hx->type == 0x04) { | 133 | if (hx->type == 0x04) { |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index 9a942afaf0af..2653120673b7 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c | |||
@@ -146,24 +146,24 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
146 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) | 146 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
147 | if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ | 147 | if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ |
148 | if(gp8psk_load_bcm4500fw(d)) | 148 | if(gp8psk_load_bcm4500fw(d)) |
149 | return EINVAL; | 149 | return -EINVAL; |
150 | 150 | ||
151 | if (! (status & bmIntersilOn)) /* LNB Power */ | 151 | if (! (status & bmIntersilOn)) /* LNB Power */ |
152 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, | 152 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, |
153 | &buf, 1)) | 153 | &buf, 1)) |
154 | return EINVAL; | 154 | return -EINVAL; |
155 | 155 | ||
156 | /* Set DVB mode to 1 */ | 156 | /* Set DVB mode to 1 */ |
157 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) | 157 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
158 | if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) | 158 | if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) |
159 | return EINVAL; | 159 | return -EINVAL; |
160 | /* Abort possible TS (if previous tune crashed) */ | 160 | /* Abort possible TS (if previous tune crashed) */ |
161 | if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) | 161 | if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) |
162 | return EINVAL; | 162 | return -EINVAL; |
163 | } else { | 163 | } else { |
164 | /* Turn off LNB power */ | 164 | /* Turn off LNB power */ |
165 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) | 165 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) |
166 | return EINVAL; | 166 | return -EINVAL; |
167 | /* Turn off 8psk power */ | 167 | /* Turn off 8psk power */ |
168 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) | 168 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) |
169 | return -EINVAL; | 169 | return -EINVAL; |
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index a12e6f784fda..54626a0dbf68 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "qt1010.h" | 16 | #include "qt1010.h" |
17 | #include "tda1004x.h" | 17 | #include "tda1004x.h" |
18 | #include "tda827x.h" | 18 | #include "tda827x.h" |
19 | #include <asm/unaligned.h> | ||
19 | 20 | ||
20 | /* debug */ | 21 | /* debug */ |
21 | static int dvb_usb_m920x_debug; | 22 | static int dvb_usb_m920x_debug; |
@@ -347,13 +348,13 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar | |||
347 | 348 | ||
348 | for (pass = 0; pass < 2; pass++) { | 349 | for (pass = 0; pass < 2; pass++) { |
349 | for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { | 350 | for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { |
350 | value = le16_to_cpu(*(u16 *)(fw->data + i)); | 351 | value = get_unaligned_le16(fw->data + i); |
351 | i += sizeof(u16); | 352 | i += sizeof(u16); |
352 | 353 | ||
353 | index = le16_to_cpu(*(u16 *)(fw->data + i)); | 354 | index = get_unaligned_le16(fw->data + i); |
354 | i += sizeof(u16); | 355 | i += sizeof(u16); |
355 | 356 | ||
356 | size = le16_to_cpu(*(u16 *)(fw->data + i)); | 357 | size = get_unaligned_le16(fw->data + i); |
357 | i += sizeof(u16); | 358 | i += sizeof(u16); |
358 | 359 | ||
359 | if (pass == 1) { | 360 | if (pass == 1) { |
diff --git a/drivers/media/dvb/frontends/dib0070.h b/drivers/media/dvb/frontends/dib0070.h index 786e37d33889..3eedfdf505bc 100644 --- a/drivers/media/dvb/frontends/dib0070.h +++ b/drivers/media/dvb/frontends/dib0070.h | |||
@@ -37,7 +37,20 @@ struct dib0070_config { | |||
37 | u8 flip_chip; | 37 | u8 flip_chip; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | extern struct dvb_frontend * dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg); | 40 | #if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE)) |
41 | extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, | ||
42 | struct i2c_adapter *i2c, | ||
43 | struct dib0070_config *cfg); | ||
44 | #else | ||
45 | static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, | ||
46 | struct i2c_adapter *i2c, | ||
47 | struct dib0070_config *cfg) | ||
48 | { | ||
49 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
50 | return NULL; | ||
51 | } | ||
52 | #endif | ||
53 | |||
41 | extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, uint8_t open); | 54 | extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, uint8_t open); |
42 | extern u16 dib0070_wbd_offset(struct dvb_frontend *); | 55 | extern u16 dib0070_wbd_offset(struct dvb_frontend *); |
43 | 56 | ||
diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h index 081bd81f3da2..07c4d12ed5b7 100644 --- a/drivers/media/dvb/frontends/dib7000p.h +++ b/drivers/media/dvb/frontends/dib7000p.h | |||
@@ -37,7 +37,20 @@ struct dib7000p_config { | |||
37 | 37 | ||
38 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 | 38 | #define DEFAULT_DIB7000P_I2C_ADDRESS 18 |
39 | 39 | ||
40 | extern struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg); | 40 | #if defined(CONFIG_DVB_DIB7000P) || (defined(CONFIG_DVB_DIB7000P_MODULE) && defined(MODULE)) |
41 | extern struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, | ||
42 | u8 i2c_addr, | ||
43 | struct dib7000p_config *cfg); | ||
44 | #else | ||
45 | static inline struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap, | ||
46 | u8 i2c_addr, | ||
47 | struct dib7000p_config *cfg) | ||
48 | { | ||
49 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
50 | return NULL; | ||
51 | } | ||
52 | #endif | ||
53 | |||
41 | extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]); | 54 | extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]); |
42 | 55 | ||
43 | extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int); | 56 | extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int); |
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c index c7b5785f81f2..5ed32544de39 100644 --- a/drivers/media/dvb/frontends/or51132.c +++ b/drivers/media/dvb/frontends/or51132.c | |||
@@ -126,7 +126,7 @@ static int or51132_readreg(struct or51132_state *state, u8 reg) | |||
126 | reg, err); | 126 | reg, err); |
127 | return -EREMOTEIO; | 127 | return -EREMOTEIO; |
128 | } | 128 | } |
129 | return le16_to_cpup((u16*)buf); | 129 | return buf[0] | (buf[1] << 8); |
130 | } | 130 | } |
131 | 131 | ||
132 | static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) | 132 | static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) |
@@ -140,9 +140,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware | |||
140 | dprintk("Firmware is %Zd bytes\n",fw->size); | 140 | dprintk("Firmware is %Zd bytes\n",fw->size); |
141 | 141 | ||
142 | /* Get size of firmware A and B */ | 142 | /* Get size of firmware A and B */ |
143 | firmwareAsize = le32_to_cpu(*((u32*)fw->data)); | 143 | firmwareAsize = le32_to_cpu(*((__le32*)fw->data)); |
144 | dprintk("FirmwareA is %i bytes\n",firmwareAsize); | 144 | dprintk("FirmwareA is %i bytes\n",firmwareAsize); |
145 | firmwareBsize = le32_to_cpu(*((u32*)(fw->data+4))); | 145 | firmwareBsize = le32_to_cpu(*((__le32*)(fw->data+4))); |
146 | dprintk("FirmwareB is %i bytes\n",firmwareBsize); | 146 | dprintk("FirmwareB is %i bytes\n",firmwareBsize); |
147 | 147 | ||
148 | /* Upload firmware */ | 148 | /* Upload firmware */ |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 747e7f1a6267..f05d43d8b5cf 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/crc32.h> | 51 | #include <linux/crc32.h> |
52 | #include <linux/i2c.h> | 52 | #include <linux/i2c.h> |
53 | #include <linux/kthread.h> | 53 | #include <linux/kthread.h> |
54 | #include <asm/unaligned.h> | ||
54 | 55 | ||
55 | #include <asm/system.h> | 56 | #include <asm/system.h> |
56 | 57 | ||
@@ -1461,9 +1462,9 @@ static int check_firmware(struct av7110* av7110) | |||
1461 | ptr += 4; | 1462 | ptr += 4; |
1462 | 1463 | ||
1463 | /* check dpram file */ | 1464 | /* check dpram file */ |
1464 | crc = ntohl(*(u32*) ptr); | 1465 | crc = get_unaligned_be32(ptr); |
1465 | ptr += 4; | 1466 | ptr += 4; |
1466 | len = ntohl(*(u32*) ptr); | 1467 | len = get_unaligned_be32(ptr); |
1467 | ptr += 4; | 1468 | ptr += 4; |
1468 | if (len >= 512) { | 1469 | if (len >= 512) { |
1469 | printk("dvb-ttpci: dpram file is way too big.\n"); | 1470 | printk("dvb-ttpci: dpram file is way too big.\n"); |
@@ -1478,9 +1479,9 @@ static int check_firmware(struct av7110* av7110) | |||
1478 | ptr += len; | 1479 | ptr += len; |
1479 | 1480 | ||
1480 | /* check root file */ | 1481 | /* check root file */ |
1481 | crc = ntohl(*(u32*) ptr); | 1482 | crc = get_unaligned_be32(ptr); |
1482 | ptr += 4; | 1483 | ptr += 4; |
1483 | len = ntohl(*(u32*) ptr); | 1484 | len = get_unaligned_be32(ptr); |
1484 | ptr += 4; | 1485 | ptr += 4; |
1485 | 1486 | ||
1486 | if (len <= 200000 || len >= 300000 || | 1487 | if (len <= 200000 || len >= 300000 || |
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c index 3e6b650fbb81..ec55a968f204 100644 --- a/drivers/media/dvb/ttpci/av7110_av.c +++ b/drivers/media/dvb/ttpci/av7110_av.c | |||
@@ -965,8 +965,9 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x | |||
965 | 965 | ||
966 | static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) | 966 | static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) |
967 | { | 967 | { |
968 | int i, n; | 968 | unsigned i, n; |
969 | int progressive = 0; | 969 | int progressive = 0; |
970 | int match = 0; | ||
970 | 971 | ||
971 | dprintk(2, "av7110:%p, \n", av7110); | 972 | dprintk(2, "av7110:%p, \n", av7110); |
972 | 973 | ||
@@ -975,12 +976,31 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len | |||
975 | return -EBUSY; | 976 | return -EBUSY; |
976 | } | 977 | } |
977 | 978 | ||
978 | for (i = 0; i < len - 5; i++) { | 979 | /* search in buf for instances of 00 00 01 b5 1? */ |
979 | /* get progressive flag from picture extension */ | 980 | for (i = 0; i < len; i++) { |
980 | if (buf[i] == 0x00 && buf[i+1] == 0x00 && | 981 | unsigned char c; |
981 | buf[i+2] == 0x01 && (unsigned char)buf[i+3] == 0xb5 && | 982 | if (get_user(c, buf + i)) |
982 | (buf[i+4] & 0xf0) == 0x10) | 983 | return -EFAULT; |
983 | progressive = buf[i+5] & 0x08; | 984 | if (match == 5) { |
985 | progressive = c & 0x08; | ||
986 | match = 0; | ||
987 | } | ||
988 | if (c == 0x00) { | ||
989 | match = (match == 1 || match == 2) ? 2 : 1; | ||
990 | continue; | ||
991 | } | ||
992 | switch (match++) { | ||
993 | case 2: if (c == 0x01) | ||
994 | continue; | ||
995 | break; | ||
996 | case 3: if (c == 0xb5) | ||
997 | continue; | ||
998 | break; | ||
999 | case 4: if ((c & 0xf0) == 0x10) | ||
1000 | continue; | ||
1001 | break; | ||
1002 | } | ||
1003 | match = 0; | ||
984 | } | 1004 | } |
985 | 1005 | ||
986 | /* setting n always > 1, fixes problems when playing stillframes | 1006 | /* setting n always > 1, fixes problems when playing stillframes |
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 732ce4de512e..5d2d81ab2371 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -552,7 +552,7 @@ static void ttusb_process_muxpack(struct ttusb *ttusb, const u8 * muxpack, | |||
552 | u16 csum = 0, cc; | 552 | u16 csum = 0, cc; |
553 | int i; | 553 | int i; |
554 | for (i = 0; i < len; i += 2) | 554 | for (i = 0; i < len; i += 2) |
555 | csum ^= le16_to_cpup((u16 *) (muxpack + i)); | 555 | csum ^= le16_to_cpup((__le16 *) (muxpack + i)); |
556 | if (csum) { | 556 | if (csum) { |
557 | printk("%s: muxpack with incorrect checksum, ignoring\n", | 557 | printk("%s: muxpack with incorrect checksum, ignoring\n", |
558 | __func__); | 558 | __func__); |
diff --git a/drivers/media/dvb/ttusb-dec/Kconfig b/drivers/media/dvb/ttusb-dec/Kconfig index 0712899e39a4..a23cc0aa17d3 100644 --- a/drivers/media/dvb/ttusb-dec/Kconfig +++ b/drivers/media/dvb/ttusb-dec/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_TTUSB_DEC | 1 | config DVB_TTUSB_DEC |
2 | tristate "Technotrend/Hauppauge USB DEC devices" | 2 | tristate "Technotrend/Hauppauge USB DEC devices" |
3 | depends on DVB_CORE && USB | 3 | depends on DVB_CORE && USB && INPUT |
4 | depends on HOTPLUG # due to FW_LOADER | 4 | depends on HOTPLUG # due to FW_LOADER |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | select CRC32 | 6 | select CRC32 |
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 42eee04daa5d..fefdc05e84ac 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -343,7 +343,7 @@ static int ttusb_dec_get_stb_state (struct ttusb_dec *dec, unsigned int *mode, | |||
343 | u8 c[COMMAND_PACKET_SIZE]; | 343 | u8 c[COMMAND_PACKET_SIZE]; |
344 | int c_length; | 344 | int c_length; |
345 | int result; | 345 | int result; |
346 | unsigned int tmp; | 346 | __be32 tmp; |
347 | 347 | ||
348 | dprintk("%s\n", __func__); | 348 | dprintk("%s\n", __func__); |
349 | 349 | ||
@@ -398,9 +398,9 @@ static void ttusb_dec_set_pids(struct ttusb_dec *dec) | |||
398 | 0x00, 0x00, 0xff, 0xff, | 398 | 0x00, 0x00, 0xff, 0xff, |
399 | 0xff, 0xff, 0xff, 0xff }; | 399 | 0xff, 0xff, 0xff, 0xff }; |
400 | 400 | ||
401 | u16 pcr = htons(dec->pid[DMX_PES_PCR]); | 401 | __be16 pcr = htons(dec->pid[DMX_PES_PCR]); |
402 | u16 audio = htons(dec->pid[DMX_PES_AUDIO]); | 402 | __be16 audio = htons(dec->pid[DMX_PES_AUDIO]); |
403 | u16 video = htons(dec->pid[DMX_PES_VIDEO]); | 403 | __be16 video = htons(dec->pid[DMX_PES_VIDEO]); |
404 | 404 | ||
405 | dprintk("%s\n", __func__); | 405 | dprintk("%s\n", __func__); |
406 | 406 | ||
@@ -435,7 +435,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length) | |||
435 | case 0x01: { /* VideoStream */ | 435 | case 0x01: { /* VideoStream */ |
436 | int prebytes = pva[5] & 0x03; | 436 | int prebytes = pva[5] & 0x03; |
437 | int postbytes = (pva[5] & 0x0c) >> 2; | 437 | int postbytes = (pva[5] & 0x0c) >> 2; |
438 | u16 v_pes_payload_length; | 438 | __be16 v_pes_payload_length; |
439 | 439 | ||
440 | if (output_pva) { | 440 | if (output_pva) { |
441 | dec->video_filter->feed->cb.ts(pva, length, NULL, 0, | 441 | dec->video_filter->feed->cb.ts(pva, length, NULL, 0, |
@@ -1006,7 +1006,7 @@ static int ttusb_dec_start_sec_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
1006 | 0x00, 0x00, 0x00, 0x00, | 1006 | 0x00, 0x00, 0x00, 0x00, |
1007 | 0x00, 0x00, 0x00, 0x00, | 1007 | 0x00, 0x00, 0x00, 0x00, |
1008 | 0x00 }; | 1008 | 0x00 }; |
1009 | u16 pid; | 1009 | __be16 pid; |
1010 | u8 c[COMMAND_PACKET_SIZE]; | 1010 | u8 c[COMMAND_PACKET_SIZE]; |
1011 | int c_length; | 1011 | int c_length; |
1012 | int result; | 1012 | int result; |
@@ -1278,9 +1278,10 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) | |||
1278 | u8 *firmware = NULL; | 1278 | u8 *firmware = NULL; |
1279 | size_t firmware_size = 0; | 1279 | size_t firmware_size = 0; |
1280 | u16 firmware_csum = 0; | 1280 | u16 firmware_csum = 0; |
1281 | u16 firmware_csum_ns; | 1281 | __be16 firmware_csum_ns; |
1282 | u32 firmware_size_nl; | 1282 | __be32 firmware_size_nl; |
1283 | u32 crc32_csum, crc32_check, tmp; | 1283 | u32 crc32_csum, crc32_check; |
1284 | __be32 tmp; | ||
1284 | const struct firmware *fw_entry = NULL; | 1285 | const struct firmware *fw_entry = NULL; |
1285 | 1286 | ||
1286 | dprintk("%s\n", __func__); | 1287 | dprintk("%s\n", __func__); |
@@ -1306,7 +1307,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) | |||
1306 | valid. */ | 1307 | valid. */ |
1307 | crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; | 1308 | crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; |
1308 | memcpy(&tmp, &firmware[56], 4); | 1309 | memcpy(&tmp, &firmware[56], 4); |
1309 | crc32_check = htonl(tmp); | 1310 | crc32_check = ntohl(tmp); |
1310 | if (crc32_csum != crc32_check) { | 1311 | if (crc32_csum != crc32_check) { |
1311 | printk("%s: crc32 check of DSP code failed (calculated " | 1312 | printk("%s: crc32 check of DSP code failed (calculated " |
1312 | "0x%08x != 0x%08x in file), file invalid.\n", | 1313 | "0x%08x != 0x%08x in file), file invalid.\n", |
@@ -1627,7 +1628,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, | |||
1627 | 1628 | ||
1628 | usb_set_intfdata(intf, (void *)dec); | 1629 | usb_set_intfdata(intf, (void *)dec); |
1629 | 1630 | ||
1630 | switch (le16_to_cpu(id->idProduct)) { | 1631 | switch (id->idProduct) { |
1631 | case 0x1006: | 1632 | case 0x1006: |
1632 | ttusb_dec_set_model(dec, TTUSB_DEC3000S); | 1633 | ttusb_dec_set_model(dec, TTUSB_DEC3000S); |
1633 | break; | 1634 | break; |
@@ -1652,7 +1653,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, | |||
1652 | ttusb_dec_init_dvb(dec); | 1653 | ttusb_dec_init_dvb(dec); |
1653 | 1654 | ||
1654 | dec->adapter.priv = dec; | 1655 | dec->adapter.priv = dec; |
1655 | switch (le16_to_cpu(id->idProduct)) { | 1656 | switch (id->idProduct) { |
1656 | case 0x1006: | 1657 | case 0x1006: |
1657 | dec->fe = ttusbdecfe_dvbs_attach(&fe_config); | 1658 | dec->fe = ttusbdecfe_dvbs_attach(&fe_config); |
1658 | break; | 1659 | break; |
diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c index eb5eaeccd7c4..443af24097f3 100644 --- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c +++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c | |||
@@ -86,7 +86,7 @@ static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend* fe, struct dvb_fron | |||
86 | 0x00, 0x00, 0x00, 0xff, | 86 | 0x00, 0x00, 0x00, 0xff, |
87 | 0x00, 0x00, 0x00, 0xff }; | 87 | 0x00, 0x00, 0x00, 0xff }; |
88 | 88 | ||
89 | u32 freq = htonl(p->frequency / 1000); | 89 | __be32 freq = htonl(p->frequency / 1000); |
90 | memcpy(&b[4], &freq, sizeof (u32)); | 90 | memcpy(&b[4], &freq, sizeof (u32)); |
91 | state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); | 91 | state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); |
92 | 92 | ||
@@ -117,10 +117,10 @@ static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend* fe, struct dvb_fron | |||
117 | 0x00, 0x00, 0x00, 0x00, | 117 | 0x00, 0x00, 0x00, 0x00, |
118 | 0x00, 0x00, 0x00, 0x00, | 118 | 0x00, 0x00, 0x00, 0x00, |
119 | 0x00, 0x00, 0x00, 0x00 }; | 119 | 0x00, 0x00, 0x00, 0x00 }; |
120 | u32 freq; | 120 | __be32 freq; |
121 | u32 sym_rate; | 121 | __be32 sym_rate; |
122 | u32 band; | 122 | __be32 band; |
123 | u32 lnb_voltage; | 123 | __be32 lnb_voltage; |
124 | 124 | ||
125 | freq = htonl(p->frequency + | 125 | freq = htonl(p->frequency + |
126 | (state->hi_band ? LOF_HI : LOF_LO)); | 126 | (state->hi_band ? LOF_HI : LOF_LO)); |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 89d8d37838a3..3b26fbd3e558 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -901,7 +901,7 @@ endif # V4L_USB_DRIVERS | |||
901 | 901 | ||
902 | config SOC_CAMERA | 902 | config SOC_CAMERA |
903 | tristate "SoC camera support" | 903 | tristate "SoC camera support" |
904 | depends on VIDEO_V4L2 | 904 | depends on VIDEO_V4L2 && HAS_DMA |
905 | select VIDEOBUF_DMA_SG | 905 | select VIDEOBUF_DMA_SG |
906 | help | 906 | help |
907 | SoC Camera is a common API to several cameras, not connecting | 907 | SoC Camera is a common API to several cameras, not connecting |
diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/video/au0828/Kconfig index def10d086373..52b2491581a8 100644 --- a/drivers/media/video/au0828/Kconfig +++ b/drivers/media/video/au0828/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | config VIDEO_AU0828 | 2 | config VIDEO_AU0828 |
3 | tristate "Auvitek AU0828 support" | 3 | tristate "Auvitek AU0828 support" |
4 | depends on VIDEO_DEV && I2C && INPUT && DVB_CORE && USB | 4 | depends on I2C && INPUT && DVB_CORE && USB |
5 | select I2C_ALGOBIT | 5 | select I2C_ALGOBIT |
6 | select VIDEO_TVEEPROM | 6 | select VIDEO_TVEEPROM |
7 | select DVB_AU8522 if !DVB_FE_CUSTOMIZE | 7 | select DVB_AU8522 if !DVB_FE_CUSTOMIZE |
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index c86a5f17eca8..c6d470590380 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c | |||
@@ -353,12 +353,6 @@ int au0828_dvb_register(struct au0828_dev *dev) | |||
353 | return -1; | 353 | return -1; |
354 | } | 354 | } |
355 | 355 | ||
356 | /* Put the analog decoder in standby to keep it quiet */ | ||
357 | au0828_call_i2c_clients(dev, TUNER_SET_STANDBY, NULL); | ||
358 | |||
359 | if (dvb->frontend->ops.analog_ops.standby) | ||
360 | dvb->frontend->ops.analog_ops.standby(dvb->frontend); | ||
361 | |||
362 | /* register everything */ | 356 | /* register everything */ |
363 | ret = dvb_register(dev); | 357 | ret = dvb_register(dev); |
364 | if (ret < 0) { | 358 | if (ret < 0) { |
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index f20a01cfc73e..8ef0424c26c4 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/firmware.h> | 34 | #include <linux/firmware.h> |
35 | #include <net/checksum.h> | 35 | #include <net/checksum.h> |
36 | 36 | ||
37 | #include <asm/unaligned.h> | ||
37 | #include <asm/io.h> | 38 | #include <asm/io.h> |
38 | 39 | ||
39 | #include "bttvp.h" | 40 | #include "bttvp.h" |
@@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) | |||
3858 | ee += i; | 3859 | ee += i; |
3859 | 3860 | ||
3860 | /* found a valid descriptor */ | 3861 | /* found a valid descriptor */ |
3861 | type = be16_to_cpup((u16*)(ee+4)); | 3862 | type = get_unaligned_be16((__be16 *)(ee+4)); |
3862 | 3863 | ||
3863 | switch(type) { | 3864 | switch(type) { |
3864 | /* 848 based */ | 3865 | /* 848 based */ |
@@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) | |||
3918 | btv->c.nr, type); | 3919 | btv->c.nr, type); |
3919 | break; | 3920 | break; |
3920 | } | 3921 | } |
3921 | serial = be32_to_cpup((u32*)(ee+6)); | 3922 | serial = get_unaligned_be32((__be32 *)(ee+6)); |
3922 | } | 3923 | } |
3923 | 3924 | ||
3924 | printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n", | 3925 | printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n", |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 2ca3e9cfb2bb..0165aac533bf 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -2613,7 +2613,7 @@ static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf) | |||
2613 | struct bttv_fh *fh = priv; | 2613 | struct bttv_fh *fh = priv; |
2614 | 2614 | ||
2615 | mutex_lock(&fh->cap.vb_lock); | 2615 | mutex_lock(&fh->cap.vb_lock); |
2616 | retval = videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, | 2616 | retval = __videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, |
2617 | V4L2_MEMORY_MMAP); | 2617 | V4L2_MEMORY_MMAP); |
2618 | if (retval < 0) { | 2618 | if (retval < 0) { |
2619 | mutex_unlock(&fh->cap.vb_lock); | 2619 | mutex_unlock(&fh->cap.vb_lock); |
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c index e5979f77504c..0af586876e72 100644 --- a/drivers/media/video/bt8xx/bttv-risc.c +++ b/drivers/media/video/bt8xx/bttv-risc.c | |||
@@ -48,7 +48,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc, | |||
48 | { | 48 | { |
49 | u32 instructions,line,todo; | 49 | u32 instructions,line,todo; |
50 | struct scatterlist *sg; | 50 | struct scatterlist *sg; |
51 | u32 *rp; | 51 | __le32 *rp; |
52 | int rc; | 52 | int rc; |
53 | 53 | ||
54 | /* estimate risc mem: worst case is one write per page border + | 54 | /* estimate risc mem: worst case is one write per page border + |
@@ -128,7 +128,8 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc, | |||
128 | unsigned int cpadding) | 128 | unsigned int cpadding) |
129 | { | 129 | { |
130 | unsigned int instructions,line,todo,ylen,chroma; | 130 | unsigned int instructions,line,todo,ylen,chroma; |
131 | u32 *rp,ri; | 131 | __le32 *rp; |
132 | u32 ri; | ||
132 | struct scatterlist *ysg; | 133 | struct scatterlist *ysg; |
133 | struct scatterlist *usg; | 134 | struct scatterlist *usg; |
134 | struct scatterlist *vsg; | 135 | struct scatterlist *vsg; |
@@ -244,7 +245,8 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc, | |||
244 | { | 245 | { |
245 | int dwords,rc,line,maxy,start,end,skip,nskips; | 246 | int dwords,rc,line,maxy,start,end,skip,nskips; |
246 | struct btcx_skiplist *skips; | 247 | struct btcx_skiplist *skips; |
247 | u32 *rp,ri,ra; | 248 | __le32 *rp; |
249 | u32 ri,ra; | ||
248 | u32 addr; | 250 | u32 addr; |
249 | 251 | ||
250 | /* skip list for window clipping */ | 252 | /* skip list for window clipping */ |
diff --git a/drivers/media/video/btcx-risc.c b/drivers/media/video/btcx-risc.c index ce0840ccd594..f42701f82e7f 100644 --- a/drivers/media/video/btcx-risc.c +++ b/drivers/media/video/btcx-risc.c | |||
@@ -63,7 +63,7 @@ int btcx_riscmem_alloc(struct pci_dev *pci, | |||
63 | struct btcx_riscmem *risc, | 63 | struct btcx_riscmem *risc, |
64 | unsigned int size) | 64 | unsigned int size) |
65 | { | 65 | { |
66 | u32 *cpu; | 66 | __le32 *cpu; |
67 | dma_addr_t dma; | 67 | dma_addr_t dma; |
68 | 68 | ||
69 | if (NULL != risc->cpu && risc->size < size) | 69 | if (NULL != risc->cpu && risc->size < size) |
diff --git a/drivers/media/video/btcx-risc.h b/drivers/media/video/btcx-risc.h index 503e6c6d7b69..861bc8112824 100644 --- a/drivers/media/video/btcx-risc.h +++ b/drivers/media/video/btcx-risc.h | |||
@@ -2,8 +2,8 @@ | |||
2 | */ | 2 | */ |
3 | struct btcx_riscmem { | 3 | struct btcx_riscmem { |
4 | unsigned int size; | 4 | unsigned int size; |
5 | u32 *cpu; | 5 | __le32 *cpu; |
6 | u32 *jmp; | 6 | __le32 *jmp; |
7 | dma_addr_t dma; | 7 | dma_addr_t dma; |
8 | }; | 8 | }; |
9 | 9 | ||
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c index 66864904c99b..9a26751615c6 100644 --- a/drivers/media/video/cx18/cx18-av-core.c +++ b/drivers/media/video/cx18/cx18-av-core.c | |||
@@ -182,14 +182,16 @@ static void input_change(struct cx18 *cx) | |||
182 | if (std == V4L2_STD_NTSC_M_JP) { | 182 | if (std == V4L2_STD_NTSC_M_JP) { |
183 | /* Japan uses EIAJ audio standard */ | 183 | /* Japan uses EIAJ audio standard */ |
184 | cx18_av_write(cx, 0x808, 0xf7); | 184 | cx18_av_write(cx, 0x808, 0xf7); |
185 | cx18_av_write(cx, 0x80b, 0x02); | ||
185 | } else if (std == V4L2_STD_NTSC_M_KR) { | 186 | } else if (std == V4L2_STD_NTSC_M_KR) { |
186 | /* South Korea uses A2 audio standard */ | 187 | /* South Korea uses A2 audio standard */ |
187 | cx18_av_write(cx, 0x808, 0xf8); | 188 | cx18_av_write(cx, 0x808, 0xf8); |
189 | cx18_av_write(cx, 0x80b, 0x03); | ||
188 | } else { | 190 | } else { |
189 | /* Others use the BTSC audio standard */ | 191 | /* Others use the BTSC audio standard */ |
190 | cx18_av_write(cx, 0x808, 0xf6); | 192 | cx18_av_write(cx, 0x808, 0xf6); |
193 | cx18_av_write(cx, 0x80b, 0x01); | ||
191 | } | 194 | } |
192 | cx18_av_write(cx, 0x80b, 0x00); | ||
193 | } else if (std & V4L2_STD_PAL) { | 195 | } else if (std & V4L2_STD_PAL) { |
194 | /* Follow tuner change procedure for PAL */ | 196 | /* Follow tuner change procedure for PAL */ |
195 | cx18_av_write(cx, 0x808, 0xff); | 197 | cx18_av_write(cx, 0x808, 0xff); |
@@ -741,8 +743,8 @@ static void log_audio_status(struct cx18 *cx) | |||
741 | { | 743 | { |
742 | struct cx18_av_state *state = &cx->av_state; | 744 | struct cx18_av_state *state = &cx->av_state; |
743 | u8 download_ctl = cx18_av_read(cx, 0x803); | 745 | u8 download_ctl = cx18_av_read(cx, 0x803); |
744 | u8 mod_det_stat0 = cx18_av_read(cx, 0x805); | 746 | u8 mod_det_stat0 = cx18_av_read(cx, 0x804); |
745 | u8 mod_det_stat1 = cx18_av_read(cx, 0x804); | 747 | u8 mod_det_stat1 = cx18_av_read(cx, 0x805); |
746 | u8 audio_config = cx18_av_read(cx, 0x808); | 748 | u8 audio_config = cx18_av_read(cx, 0x808); |
747 | u8 pref_mode = cx18_av_read(cx, 0x809); | 749 | u8 pref_mode = cx18_av_read(cx, 0x809); |
748 | u8 afc0 = cx18_av_read(cx, 0x80b); | 750 | u8 afc0 = cx18_av_read(cx, 0x80b); |
@@ -760,12 +762,12 @@ static void log_audio_status(struct cx18 *cx) | |||
760 | case 0x12: p = "dual with SAP"; break; | 762 | case 0x12: p = "dual with SAP"; break; |
761 | case 0x14: p = "tri with SAP"; break; | 763 | case 0x14: p = "tri with SAP"; break; |
762 | case 0xfe: p = "forced mode"; break; | 764 | case 0xfe: p = "forced mode"; break; |
763 | default: p = "not defined"; | 765 | default: p = "not defined"; break; |
764 | } | 766 | } |
765 | CX18_INFO("Detected audio mode: %s\n", p); | 767 | CX18_INFO("Detected audio mode: %s\n", p); |
766 | 768 | ||
767 | switch (mod_det_stat1) { | 769 | switch (mod_det_stat1) { |
768 | case 0x00: p = "BTSC"; break; | 770 | case 0x00: p = "not defined"; break; |
769 | case 0x01: p = "EIAJ"; break; | 771 | case 0x01: p = "EIAJ"; break; |
770 | case 0x02: p = "A2-M"; break; | 772 | case 0x02: p = "A2-M"; break; |
771 | case 0x03: p = "A2-BG"; break; | 773 | case 0x03: p = "A2-BG"; break; |
@@ -779,8 +781,13 @@ static void log_audio_status(struct cx18 *cx) | |||
779 | case 0x0b: p = "NICAM-I"; break; | 781 | case 0x0b: p = "NICAM-I"; break; |
780 | case 0x0c: p = "NICAM-L"; break; | 782 | case 0x0c: p = "NICAM-L"; break; |
781 | case 0x0d: p = "BTSC/EIAJ/A2-M Mono (4.5 MHz FMMono)"; break; | 783 | case 0x0d: p = "BTSC/EIAJ/A2-M Mono (4.5 MHz FMMono)"; break; |
784 | case 0x0e: p = "IF FM Radio"; break; | ||
785 | case 0x0f: p = "BTSC"; break; | ||
786 | case 0x10: p = "detected chrominance"; break; | ||
787 | case 0xfd: p = "unknown audio standard"; break; | ||
788 | case 0xfe: p = "forced audio standard"; break; | ||
782 | case 0xff: p = "no detected audio standard"; break; | 789 | case 0xff: p = "no detected audio standard"; break; |
783 | default: p = "not defined"; | 790 | default: p = "not defined"; break; |
784 | } | 791 | } |
785 | CX18_INFO("Detected audio standard: %s\n", p); | 792 | CX18_INFO("Detected audio standard: %s\n", p); |
786 | CX18_INFO("Audio muted: %s\n", | 793 | CX18_INFO("Audio muted: %s\n", |
@@ -789,22 +796,23 @@ static void log_audio_status(struct cx18 *cx) | |||
789 | (download_ctl & 0x10) ? "running" : "stopped"); | 796 | (download_ctl & 0x10) ? "running" : "stopped"); |
790 | 797 | ||
791 | switch (audio_config >> 4) { | 798 | switch (audio_config >> 4) { |
792 | case 0x00: p = "BTSC"; break; | 799 | case 0x00: p = "undefined"; break; |
793 | case 0x01: p = "EIAJ"; break; | 800 | case 0x01: p = "BTSC"; break; |
794 | case 0x02: p = "A2-M"; break; | 801 | case 0x02: p = "EIAJ"; break; |
795 | case 0x03: p = "A2-BG"; break; | 802 | case 0x03: p = "A2-M"; break; |
796 | case 0x04: p = "A2-DK1"; break; | 803 | case 0x04: p = "A2-BG"; break; |
797 | case 0x05: p = "A2-DK2"; break; | 804 | case 0x05: p = "A2-DK1"; break; |
798 | case 0x06: p = "A2-DK3"; break; | 805 | case 0x06: p = "A2-DK2"; break; |
799 | case 0x07: p = "A1 (6.0 MHz FM Mono)"; break; | 806 | case 0x07: p = "A2-DK3"; break; |
800 | case 0x08: p = "AM-L"; break; | 807 | case 0x08: p = "A1 (6.0 MHz FM Mono)"; break; |
801 | case 0x09: p = "NICAM-BG"; break; | 808 | case 0x09: p = "AM-L"; break; |
802 | case 0x0a: p = "NICAM-DK"; break; | 809 | case 0x0a: p = "NICAM-BG"; break; |
803 | case 0x0b: p = "NICAM-I"; break; | 810 | case 0x0b: p = "NICAM-DK"; break; |
804 | case 0x0c: p = "NICAM-L"; break; | 811 | case 0x0c: p = "NICAM-I"; break; |
805 | case 0x0d: p = "FM radio"; break; | 812 | case 0x0d: p = "NICAM-L"; break; |
813 | case 0x0e: p = "FM radio"; break; | ||
806 | case 0x0f: p = "automatic detection"; break; | 814 | case 0x0f: p = "automatic detection"; break; |
807 | default: p = "undefined"; | 815 | default: p = "undefined"; break; |
808 | } | 816 | } |
809 | CX18_INFO("Configured audio standard: %s\n", p); | 817 | CX18_INFO("Configured audio standard: %s\n", p); |
810 | 818 | ||
@@ -815,12 +823,9 @@ static void log_audio_status(struct cx18 *cx) | |||
815 | case 0x02: p = "MONO3 (STEREO forced MONO)"; break; | 823 | case 0x02: p = "MONO3 (STEREO forced MONO)"; break; |
816 | case 0x03: p = "MONO4 (NICAM ANALOG-Language C/Analog Fallback)"; break; | 824 | case 0x03: p = "MONO4 (NICAM ANALOG-Language C/Analog Fallback)"; break; |
817 | case 0x04: p = "STEREO"; break; | 825 | case 0x04: p = "STEREO"; break; |
818 | case 0x05: p = "DUAL1 (AB)"; break; | 826 | case 0x05: p = "DUAL1 (AC)"; break; |
819 | case 0x06: p = "DUAL2 (AC) (FM)"; break; | 827 | case 0x06: p = "DUAL2 (BC)"; break; |
820 | case 0x07: p = "DUAL3 (BC) (FM)"; break; | 828 | case 0x07: p = "DUAL3 (AB)"; break; |
821 | case 0x08: p = "DUAL4 (AC) (AM)"; break; | ||
822 | case 0x09: p = "DUAL5 (BC) (AM)"; break; | ||
823 | case 0x0a: p = "SAP"; break; | ||
824 | default: p = "undefined"; | 829 | default: p = "undefined"; |
825 | } | 830 | } |
826 | CX18_INFO("Configured audio mode: %s\n", p); | 831 | CX18_INFO("Configured audio mode: %s\n", p); |
@@ -835,9 +840,11 @@ static void log_audio_status(struct cx18 *cx) | |||
835 | case 0x06: p = "BTSC"; break; | 840 | case 0x06: p = "BTSC"; break; |
836 | case 0x07: p = "EIAJ"; break; | 841 | case 0x07: p = "EIAJ"; break; |
837 | case 0x08: p = "A2-M"; break; | 842 | case 0x08: p = "A2-M"; break; |
838 | case 0x09: p = "FM Radio"; break; | 843 | case 0x09: p = "FM Radio (4.5 MHz)"; break; |
844 | case 0x0a: p = "FM Radio (5.5 MHz)"; break; | ||
845 | case 0x0b: p = "S-Video"; break; | ||
839 | case 0x0f: p = "automatic standard and mode detection"; break; | 846 | case 0x0f: p = "automatic standard and mode detection"; break; |
840 | default: p = "undefined"; | 847 | default: p = "undefined"; break; |
841 | } | 848 | } |
842 | CX18_INFO("Configured audio system: %s\n", p); | 849 | CX18_INFO("Configured audio system: %s\n", p); |
843 | } | 850 | } |
@@ -857,22 +864,24 @@ static void log_audio_status(struct cx18 *cx) | |||
857 | case 5: p = "language AC"; break; | 864 | case 5: p = "language AC"; break; |
858 | case 6: p = "language BC"; break; | 865 | case 6: p = "language BC"; break; |
859 | case 7: p = "language AB"; break; | 866 | case 7: p = "language AB"; break; |
860 | default: p = "undefined"; | 867 | default: p = "undefined"; break; |
861 | } | 868 | } |
862 | CX18_INFO("Preferred audio mode: %s\n", p); | 869 | CX18_INFO("Preferred audio mode: %s\n", p); |
863 | 870 | ||
864 | if ((audio_config & 0xf) == 0xf) { | 871 | if ((audio_config & 0xf) == 0xf) { |
865 | switch ((afc0 >> 2) & 0x1) { | 872 | switch ((afc0 >> 3) & 0x1) { |
866 | case 0: p = "system DK"; break; | 873 | case 0: p = "system DK"; break; |
867 | case 1: p = "system L"; break; | 874 | case 1: p = "system L"; break; |
868 | } | 875 | } |
869 | CX18_INFO("Selected 65 MHz format: %s\n", p); | 876 | CX18_INFO("Selected 65 MHz format: %s\n", p); |
870 | 877 | ||
871 | switch (afc0 & 0x3) { | 878 | switch (afc0 & 0x7) { |
872 | case 0: p = "BTSC"; break; | 879 | case 0: p = "Chroma"; break; |
873 | case 1: p = "EIAJ"; break; | 880 | case 1: p = "BTSC"; break; |
874 | case 2: p = "A2-M"; break; | 881 | case 2: p = "EIAJ"; break; |
875 | default: p = "undefined"; | 882 | case 3: p = "A2-M"; break; |
883 | case 4: p = "autodetect"; break; | ||
884 | default: p = "undefined"; break; | ||
876 | } | 885 | } |
877 | CX18_INFO("Selected 45 MHz format: %s\n", p); | 886 | CX18_INFO("Selected 45 MHz format: %s\n", p); |
878 | } | 887 | } |
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c index 553adbf2cd44..baccd079243d 100644 --- a/drivers/media/video/cx18/cx18-cards.c +++ b/drivers/media/video/cx18/cx18-cards.c | |||
@@ -126,7 +126,7 @@ static const struct cx18_card cx18_card_hvr1600_samsung = { | |||
126 | 126 | ||
127 | /* ------------------------------------------------------------------------- */ | 127 | /* ------------------------------------------------------------------------- */ |
128 | 128 | ||
129 | /* Compro VideoMate H900: not working at the moment! */ | 129 | /* Compro VideoMate H900: note that this card is analog only! */ |
130 | 130 | ||
131 | static const struct cx18_card_pci_info cx18_pci_h900[] = { | 131 | static const struct cx18_card_pci_info cx18_pci_h900[] = { |
132 | { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_COMPRO, 0xe100 }, | 132 | { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_COMPRO, 0xe100 }, |
@@ -136,7 +136,7 @@ static const struct cx18_card_pci_info cx18_pci_h900[] = { | |||
136 | static const struct cx18_card cx18_card_h900 = { | 136 | static const struct cx18_card cx18_card_h900 = { |
137 | .type = CX18_CARD_COMPRO_H900, | 137 | .type = CX18_CARD_COMPRO_H900, |
138 | .name = "Compro VideoMate H900", | 138 | .name = "Compro VideoMate H900", |
139 | .comment = "DVB & VBI are not yet supported\n", | 139 | .comment = "VBI is not yet supported\n", |
140 | .v4l2_capabilities = CX18_CAP_ENCODER, | 140 | .v4l2_capabilities = CX18_CAP_ENCODER, |
141 | .hw_audio_ctrl = CX18_HW_CX23418, | 141 | .hw_audio_ctrl = CX18_HW_CX23418, |
142 | .hw_all = CX18_HW_TUNER, | 142 | .hw_all = CX18_HW_TUNER, |
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c index 2bdac5ebbb0d..87cf41021665 100644 --- a/drivers/media/video/cx18/cx18-controls.c +++ b/drivers/media/video/cx18/cx18-controls.c | |||
@@ -159,7 +159,7 @@ static int cx18_setup_vbi_fmt(struct cx18 *cx, enum v4l2_mpeg_stream_vbi_fmt fmt | |||
159 | { | 159 | { |
160 | if (!(cx->v4l2_cap & V4L2_CAP_SLICED_VBI_CAPTURE)) | 160 | if (!(cx->v4l2_cap & V4L2_CAP_SLICED_VBI_CAPTURE)) |
161 | return -EINVAL; | 161 | return -EINVAL; |
162 | if (atomic_read(&cx->capturing) > 0) | 162 | if (atomic_read(&cx->ana_capturing) > 0) |
163 | return -EBUSY; | 163 | return -EBUSY; |
164 | 164 | ||
165 | /* First try to allocate sliced VBI buffers if needed. */ | 165 | /* First try to allocate sliced VBI buffers if needed. */ |
@@ -235,7 +235,7 @@ int cx18_control_ioctls(struct cx18 *cx, unsigned int cmd, void *arg) | |||
235 | CX18_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); | 235 | CX18_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); |
236 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { | 236 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { |
237 | struct cx2341x_mpeg_params p = cx->params; | 237 | struct cx2341x_mpeg_params p = cx->params; |
238 | int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->capturing), arg, cmd); | 238 | int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing), arg, cmd); |
239 | 239 | ||
240 | if (err) | 240 | if (err) |
241 | return err; | 241 | return err; |
@@ -295,7 +295,7 @@ int cx18_control_ioctls(struct cx18 *cx, unsigned int cmd, void *arg) | |||
295 | CX18_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); | 295 | CX18_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); |
296 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) | 296 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) |
297 | return cx2341x_ext_ctrls(&cx->params, | 297 | return cx2341x_ext_ctrls(&cx->params, |
298 | atomic_read(&cx->capturing), arg, cmd); | 298 | atomic_read(&cx->ana_capturing), arg, cmd); |
299 | return -EINVAL; | 299 | return -EINVAL; |
300 | } | 300 | } |
301 | 301 | ||
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 0dd4e0529970..2b810bb2a4c7 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -670,7 +670,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
670 | cx18_init_power(cx, 1); | 670 | cx18_init_power(cx, 1); |
671 | cx18_init_memory(cx); | 671 | cx18_init_memory(cx); |
672 | 672 | ||
673 | cx->scb = (struct cx18_scb *)(cx->enc_mem + SCB_OFFSET); | 673 | cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET); |
674 | cx18_init_scb(cx); | 674 | cx18_init_scb(cx); |
675 | 675 | ||
676 | cx18_gpio_init(cx); | 676 | cx18_gpio_init(cx); |
@@ -751,17 +751,6 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
751 | if (cx->options.radio > 0) | 751 | if (cx->options.radio > 0) |
752 | cx->v4l2_cap |= V4L2_CAP_RADIO; | 752 | cx->v4l2_cap |= V4L2_CAP_RADIO; |
753 | 753 | ||
754 | retval = cx18_streams_setup(cx); | ||
755 | if (retval) { | ||
756 | CX18_ERR("Error %d setting up streams\n", retval); | ||
757 | goto free_irq; | ||
758 | } | ||
759 | retval = cx18_streams_register(cx); | ||
760 | if (retval) { | ||
761 | CX18_ERR("Error %d registering devices\n", retval); | ||
762 | goto free_streams; | ||
763 | } | ||
764 | |||
765 | if (cx->options.tuner > -1) { | 754 | if (cx->options.tuner > -1) { |
766 | struct tuner_setup setup; | 755 | struct tuner_setup setup; |
767 | 756 | ||
@@ -788,7 +777,16 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
788 | are not. */ | 777 | are not. */ |
789 | cx->tuner_std = cx->std; | 778 | cx->tuner_std = cx->std; |
790 | 779 | ||
791 | cx18_init_on_first_open(cx); | 780 | retval = cx18_streams_setup(cx); |
781 | if (retval) { | ||
782 | CX18_ERR("Error %d setting up streams\n", retval); | ||
783 | goto free_irq; | ||
784 | } | ||
785 | retval = cx18_streams_register(cx); | ||
786 | if (retval) { | ||
787 | CX18_ERR("Error %d registering devices\n", retval); | ||
788 | goto free_streams; | ||
789 | } | ||
792 | 790 | ||
793 | CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); | 791 | CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); |
794 | 792 | ||
@@ -889,7 +887,7 @@ static void cx18_remove(struct pci_dev *pci_dev) | |||
889 | 887 | ||
890 | /* Stop all captures */ | 888 | /* Stop all captures */ |
891 | CX18_DEBUG_INFO("Stopping all streams\n"); | 889 | CX18_DEBUG_INFO("Stopping all streams\n"); |
892 | if (atomic_read(&cx->capturing) > 0) | 890 | if (atomic_read(&cx->tot_capturing) > 0) |
893 | cx18_stop_all_captures(cx); | 891 | cx18_stop_all_captures(cx); |
894 | 892 | ||
895 | /* Interrupts */ | 893 | /* Interrupts */ |
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index a2a6c58d12fe..de14ab59a206 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h | |||
@@ -358,7 +358,7 @@ struct cx18 { | |||
358 | u32 v4l2_cap; /* V4L2 capabilities of card */ | 358 | u32 v4l2_cap; /* V4L2 capabilities of card */ |
359 | u32 hw_flags; /* Hardware description of the board */ | 359 | u32 hw_flags; /* Hardware description of the board */ |
360 | unsigned mdl_offset; | 360 | unsigned mdl_offset; |
361 | struct cx18_scb *scb; /* pointer to SCB */ | 361 | struct cx18_scb __iomem *scb; /* pointer to SCB */ |
362 | 362 | ||
363 | struct cx18_av_state av_state; | 363 | struct cx18_av_state av_state; |
364 | 364 | ||
@@ -380,7 +380,8 @@ struct cx18 { | |||
380 | int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */ | 380 | int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */ |
381 | struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */ | 381 | struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */ |
382 | unsigned long i_flags; /* global cx18 flags */ | 382 | unsigned long i_flags; /* global cx18 flags */ |
383 | atomic_t capturing; /* count number of active capture streams */ | 383 | atomic_t ana_capturing; /* count number of active analog capture streams */ |
384 | atomic_t tot_capturing; /* total count number of active capture streams */ | ||
384 | spinlock_t lock; /* lock access to this struct */ | 385 | spinlock_t lock; /* lock access to this struct */ |
385 | int search_pack_header; | 386 | int search_pack_header; |
386 | 387 | ||
@@ -423,6 +424,10 @@ struct cx18 { | |||
423 | struct mutex i2c_bus_lock[2]; | 424 | struct mutex i2c_bus_lock[2]; |
424 | struct i2c_client *i2c_clients[I2C_CLIENTS_MAX]; | 425 | struct i2c_client *i2c_clients[I2C_CLIENTS_MAX]; |
425 | 426 | ||
427 | /* gpio */ | ||
428 | u32 gpio_dir; | ||
429 | u32 gpio_val; | ||
430 | |||
426 | /* v4l2 and User settings */ | 431 | /* v4l2 and User settings */ |
427 | 432 | ||
428 | /* codec settings */ | 433 | /* codec settings */ |
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c index 0b3141db174b..1e537fe04a23 100644 --- a/drivers/media/video/cx18/cx18-fileops.c +++ b/drivers/media/video/cx18/cx18-fileops.c | |||
@@ -318,7 +318,7 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf, | |||
318 | size_t tot_written = 0; | 318 | size_t tot_written = 0; |
319 | int single_frame = 0; | 319 | int single_frame = 0; |
320 | 320 | ||
321 | if (atomic_read(&cx->capturing) == 0 && s->id == -1) { | 321 | if (atomic_read(&cx->ana_capturing) == 0 && s->id == -1) { |
322 | /* shouldn't happen */ | 322 | /* shouldn't happen */ |
323 | CX18_DEBUG_WARN("Stream %s not initialized before read\n", | 323 | CX18_DEBUG_WARN("Stream %s not initialized before read\n", |
324 | s->name); | 324 | s->name); |
@@ -361,7 +361,8 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf, | |||
361 | cx18_enqueue(s, buf, &s->q_free); | 361 | cx18_enqueue(s, buf, &s->q_free); |
362 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, | 362 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, |
363 | s->handle, | 363 | s->handle, |
364 | (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, | 364 | (void __iomem *)&cx->scb->cpu_mdl[buf->id] - |
365 | cx->enc_mem, | ||
365 | 1, buf->id, s->buf_size); | 366 | 1, buf->id, s->buf_size); |
366 | } else | 367 | } else |
367 | cx18_enqueue(s, buf, &s->q_io); | 368 | cx18_enqueue(s, buf, &s->q_io); |
@@ -581,7 +582,7 @@ int cx18_v4l2_close(struct inode *inode, struct file *filp) | |||
581 | cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); | 582 | cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); |
582 | /* Select correct audio input (i.e. TV tuner or Line in) */ | 583 | /* Select correct audio input (i.e. TV tuner or Line in) */ |
583 | cx18_audio_set_io(cx); | 584 | cx18_audio_set_io(cx); |
584 | if (atomic_read(&cx->capturing) > 0) { | 585 | if (atomic_read(&cx->ana_capturing) > 0) { |
585 | /* Undo video mute */ | 586 | /* Undo video mute */ |
586 | cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, | 587 | cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, |
587 | cx->params.video_mute | | 588 | cx->params.video_mute | |
@@ -627,7 +628,7 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp) | |||
627 | } | 628 | } |
628 | 629 | ||
629 | if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { | 630 | if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { |
630 | if (atomic_read(&cx->capturing) > 0) { | 631 | if (atomic_read(&cx->ana_capturing) > 0) { |
631 | /* switching to radio while capture is | 632 | /* switching to radio while capture is |
632 | in progress is not polite */ | 633 | in progress is not polite */ |
633 | cx18_release_stream(s); | 634 | cx18_release_stream(s); |
@@ -694,7 +695,7 @@ int cx18_v4l2_open(struct inode *inode, struct file *filp) | |||
694 | 695 | ||
695 | void cx18_mute(struct cx18 *cx) | 696 | void cx18_mute(struct cx18 *cx) |
696 | { | 697 | { |
697 | if (atomic_read(&cx->capturing)) | 698 | if (atomic_read(&cx->ana_capturing)) |
698 | cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, | 699 | cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, |
699 | cx18_find_handle(cx), 1); | 700 | cx18_find_handle(cx), 1); |
700 | CX18_DEBUG_INFO("Mute\n"); | 701 | CX18_DEBUG_INFO("Mute\n"); |
@@ -702,7 +703,7 @@ void cx18_mute(struct cx18 *cx) | |||
702 | 703 | ||
703 | void cx18_unmute(struct cx18 *cx) | 704 | void cx18_unmute(struct cx18 *cx) |
704 | { | 705 | { |
705 | if (atomic_read(&cx->capturing)) { | 706 | if (atomic_read(&cx->ana_capturing)) { |
706 | cx18_msleep_timeout(100, 0); | 707 | cx18_msleep_timeout(100, 0); |
707 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, | 708 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, |
708 | cx18_find_handle(cx), 12); | 709 | cx18_find_handle(cx), 12); |
diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/video/cx18/cx18-gpio.c index bb8bc86086d0..ceb63653c926 100644 --- a/drivers/media/video/cx18/cx18-gpio.c +++ b/drivers/media/video/cx18/cx18-gpio.c | |||
@@ -35,9 +35,6 @@ | |||
35 | #define CX18_REG_GPIO_OUT2 0xc78104 | 35 | #define CX18_REG_GPIO_OUT2 0xc78104 |
36 | #define CX18_REG_GPIO_DIR2 0xc7810c | 36 | #define CX18_REG_GPIO_DIR2 0xc7810c |
37 | 37 | ||
38 | static u32 gpio_dir; | ||
39 | static u32 gpio_val; | ||
40 | |||
41 | /* | 38 | /* |
42 | * HVR-1600 GPIO pins, courtesy of Hauppauge: | 39 | * HVR-1600 GPIO pins, courtesy of Hauppauge: |
43 | * | 40 | * |
@@ -49,24 +46,29 @@ static u32 gpio_val; | |||
49 | 46 | ||
50 | static void gpio_write(struct cx18 *cx) | 47 | static void gpio_write(struct cx18 *cx) |
51 | { | 48 | { |
52 | write_reg((gpio_dir & 0xffff) << 16, CX18_REG_GPIO_DIR1); | 49 | u32 dir = cx->gpio_dir; |
53 | write_reg(((gpio_dir & 0xffff) << 16) | (gpio_val & 0xffff), | 50 | u32 val = cx->gpio_val; |
51 | |||
52 | write_reg((dir & 0xffff) << 16, CX18_REG_GPIO_DIR1); | ||
53 | write_reg(((dir & 0xffff) << 16) | (val & 0xffff), | ||
54 | CX18_REG_GPIO_OUT1); | 54 | CX18_REG_GPIO_OUT1); |
55 | write_reg(gpio_dir & 0xffff0000, CX18_REG_GPIO_DIR2); | 55 | write_reg(dir & 0xffff0000, CX18_REG_GPIO_DIR2); |
56 | write_reg((gpio_dir & 0xffff0000) | ((gpio_val & 0xffff0000) >> 16), | 56 | write_reg((dir & 0xffff0000) | ((val & 0xffff0000) >> 16), |
57 | CX18_REG_GPIO_OUT2); | 57 | CX18_REG_GPIO_OUT2); |
58 | } | 58 | } |
59 | 59 | ||
60 | void cx18_gpio_init(struct cx18 *cx) | 60 | void cx18_gpio_init(struct cx18 *cx) |
61 | { | 61 | { |
62 | gpio_dir = cx->card->gpio_init.direction; | 62 | cx->gpio_dir = cx->card->gpio_init.direction; |
63 | gpio_val = cx->card->gpio_init.initial_value; | 63 | cx->gpio_val = cx->card->gpio_init.initial_value; |
64 | 64 | ||
65 | if (gpio_dir == 0) | 65 | if (cx->card->tuners[0].tuner == TUNER_XC2028) { |
66 | return; | 66 | cx->gpio_dir |= 1 << cx->card->xceive_pin; |
67 | cx->gpio_val |= 1 << cx->card->xceive_pin; | ||
68 | } | ||
67 | 69 | ||
68 | gpio_dir |= 1 << cx->card->xceive_pin; | 70 | if (cx->gpio_dir == 0) |
69 | gpio_val |= 1 << cx->card->xceive_pin; | 71 | return; |
70 | 72 | ||
71 | CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n", | 73 | CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n", |
72 | read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2), | 74 | read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2), |
@@ -86,13 +88,12 @@ int cx18_reset_tuner_gpio(void *dev, int cmd, int value) | |||
86 | return 0; | 88 | return 0; |
87 | CX18_DEBUG_INFO("Resetting tuner\n"); | 89 | CX18_DEBUG_INFO("Resetting tuner\n"); |
88 | 90 | ||
89 | gpio_dir |= 1 << cx->card->xceive_pin; | 91 | cx->gpio_val &= ~(1 << cx->card->xceive_pin); |
90 | gpio_val &= ~(1 << cx->card->xceive_pin); | ||
91 | 92 | ||
92 | gpio_write(cx); | 93 | gpio_write(cx); |
93 | schedule_timeout_interruptible(msecs_to_jiffies(1)); | 94 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
94 | 95 | ||
95 | gpio_val |= 1 << cx->card->xceive_pin; | 96 | cx->gpio_val |= 1 << cx->card->xceive_pin; |
96 | gpio_write(cx); | 97 | gpio_write(cx); |
97 | schedule_timeout_interruptible(msecs_to_jiffies(1)); | 98 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
98 | return 0; | 99 | return 0; |
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c index dbdcb86ec5aa..4151f1e5493f 100644 --- a/drivers/media/video/cx18/cx18-ioctl.c +++ b/drivers/media/video/cx18/cx18-ioctl.c | |||
@@ -247,7 +247,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype, | |||
247 | 247 | ||
248 | if (!set_fmt || (cx->params.width == w && cx->params.height == h)) | 248 | if (!set_fmt || (cx->params.width == w && cx->params.height == h)) |
249 | return 0; | 249 | return 0; |
250 | if (atomic_read(&cx->capturing) > 0) | 250 | if (atomic_read(&cx->ana_capturing) > 0) |
251 | return -EBUSY; | 251 | return -EBUSY; |
252 | 252 | ||
253 | cx->params.width = w; | 253 | cx->params.width = w; |
@@ -264,7 +264,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype, | |||
264 | if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { | 264 | if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { |
265 | if (set_fmt && streamtype == CX18_ENC_STREAM_TYPE_VBI && | 265 | if (set_fmt && streamtype == CX18_ENC_STREAM_TYPE_VBI && |
266 | cx->vbi.sliced_in->service_set && | 266 | cx->vbi.sliced_in->service_set && |
267 | atomic_read(&cx->capturing) > 0) | 267 | atomic_read(&cx->ana_capturing) > 0) |
268 | return -EBUSY; | 268 | return -EBUSY; |
269 | if (set_fmt) { | 269 | if (set_fmt) { |
270 | cx->vbi.sliced_in->service_set = 0; | 270 | cx->vbi.sliced_in->service_set = 0; |
@@ -293,7 +293,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype, | |||
293 | return 0; | 293 | return 0; |
294 | if (set == 0) | 294 | if (set == 0) |
295 | return -EINVAL; | 295 | return -EINVAL; |
296 | if (atomic_read(&cx->capturing) > 0 && cx->vbi.sliced_in->service_set == 0) | 296 | if (atomic_read(&cx->ana_capturing) > 0 && cx->vbi.sliced_in->service_set == 0) |
297 | return -EBUSY; | 297 | return -EBUSY; |
298 | cx18_av_cmd(cx, VIDIOC_S_FMT, fmt); | 298 | cx18_av_cmd(cx, VIDIOC_S_FMT, fmt); |
299 | memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in)); | 299 | memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in)); |
@@ -581,7 +581,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg | |||
581 | break; | 581 | break; |
582 | 582 | ||
583 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || | 583 | if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || |
584 | atomic_read(&cx->capturing) > 0) { | 584 | atomic_read(&cx->ana_capturing) > 0) { |
585 | /* Switching standard would turn off the radio or mess | 585 | /* Switching standard would turn off the radio or mess |
586 | with already running streams, prevent that by | 586 | with already running streams, prevent that by |
587 | returning EBUSY. */ | 587 | returning EBUSY. */ |
@@ -677,7 +677,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg | |||
677 | enc->flags = 0; | 677 | enc->flags = 0; |
678 | if (try) | 678 | if (try) |
679 | return 0; | 679 | return 0; |
680 | if (!atomic_read(&cx->capturing)) | 680 | if (!atomic_read(&cx->ana_capturing)) |
681 | return -EPERM; | 681 | return -EPERM; |
682 | if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) | 682 | if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) |
683 | return 0; | 683 | return 0; |
@@ -689,7 +689,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg | |||
689 | enc->flags = 0; | 689 | enc->flags = 0; |
690 | if (try) | 690 | if (try) |
691 | return 0; | 691 | return 0; |
692 | if (!atomic_read(&cx->capturing)) | 692 | if (!atomic_read(&cx->ana_capturing)) |
693 | return -EPERM; | 693 | return -EPERM; |
694 | if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) | 694 | if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) |
695 | return 0; | 695 | return 0; |
diff --git a/drivers/media/video/cx18/cx18-irq.c b/drivers/media/video/cx18/cx18-irq.c index 6e14f8bda559..25114a5cbd57 100644 --- a/drivers/media/video/cx18/cx18-irq.c +++ b/drivers/media/video/cx18/cx18-irq.c | |||
@@ -75,7 +75,7 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_mailbox *mb) | |||
75 | 75 | ||
76 | cx18_buf_sync_for_device(s, buf); | 76 | cx18_buf_sync_for_device(s, buf); |
77 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, | 77 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, |
78 | (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, | 78 | (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, |
79 | 1, buf->id, s->buf_size); | 79 | 1, buf->id, s->buf_size); |
80 | } else | 80 | } else |
81 | set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags); | 81 | set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags); |
@@ -161,13 +161,15 @@ irqreturn_t cx18_irq_handler(int irq, void *dev_id) | |||
161 | */ | 161 | */ |
162 | 162 | ||
163 | if (sw2) { | 163 | if (sw2) { |
164 | if (sw2 & (cx->scb->cpu2hpu_irq_ack | cx->scb->cpu2epu_irq_ack)) | 164 | if (sw2 & (readl(&cx->scb->cpu2hpu_irq_ack) | |
165 | readl(&cx->scb->cpu2epu_irq_ack))) | ||
165 | wake_up(&cx->mb_cpu_waitq); | 166 | wake_up(&cx->mb_cpu_waitq); |
166 | if (sw2 & (cx->scb->apu2hpu_irq_ack | cx->scb->apu2epu_irq_ack)) | 167 | if (sw2 & (readl(&cx->scb->apu2hpu_irq_ack) | |
168 | readl(&cx->scb->apu2epu_irq_ack))) | ||
167 | wake_up(&cx->mb_apu_waitq); | 169 | wake_up(&cx->mb_apu_waitq); |
168 | if (sw2 & cx->scb->epu2hpu_irq_ack) | 170 | if (sw2 & readl(&cx->scb->epu2hpu_irq_ack)) |
169 | wake_up(&cx->mb_epu_waitq); | 171 | wake_up(&cx->mb_epu_waitq); |
170 | if (sw2 & cx->scb->hpu2epu_irq_ack) | 172 | if (sw2 & readl(&cx->scb->hpu2epu_irq_ack)) |
171 | wake_up(&cx->mb_hpu_waitq); | 173 | wake_up(&cx->mb_hpu_waitq); |
172 | } | 174 | } |
173 | 175 | ||
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c index 0c5f328bca54..2a5ccef9185b 100644 --- a/drivers/media/video/cx18/cx18-mailbox.c +++ b/drivers/media/video/cx18/cx18-mailbox.c | |||
@@ -94,10 +94,10 @@ static const struct cx18_api_info *find_api_info(u32 cmd) | |||
94 | return NULL; | 94 | return NULL; |
95 | } | 95 | } |
96 | 96 | ||
97 | static struct cx18_mailbox *cx18_mb_is_complete(struct cx18 *cx, int rpu, | 97 | static struct cx18_mailbox __iomem *cx18_mb_is_complete(struct cx18 *cx, int rpu, |
98 | u32 *state, u32 *irq, u32 *req) | 98 | u32 *state, u32 *irq, u32 *req) |
99 | { | 99 | { |
100 | struct cx18_mailbox *mb = NULL; | 100 | struct cx18_mailbox __iomem *mb = NULL; |
101 | int wait_count = 0; | 101 | int wait_count = 0; |
102 | u32 ack; | 102 | u32 ack; |
103 | 103 | ||
@@ -142,7 +142,7 @@ static struct cx18_mailbox *cx18_mb_is_complete(struct cx18 *cx, int rpu, | |||
142 | long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb) | 142 | long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb) |
143 | { | 143 | { |
144 | const struct cx18_api_info *info = find_api_info(mb->cmd); | 144 | const struct cx18_api_info *info = find_api_info(mb->cmd); |
145 | struct cx18_mailbox *ack_mb; | 145 | struct cx18_mailbox __iomem *ack_mb; |
146 | u32 ack_irq; | 146 | u32 ack_irq; |
147 | u8 rpu = CPU; | 147 | u8 rpu = CPU; |
148 | 148 | ||
@@ -182,7 +182,7 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[]) | |||
182 | { | 182 | { |
183 | const struct cx18_api_info *info = find_api_info(cmd); | 183 | const struct cx18_api_info *info = find_api_info(cmd); |
184 | u32 state = 0, irq = 0, req, oldreq, err; | 184 | u32 state = 0, irq = 0, req, oldreq, err; |
185 | struct cx18_mailbox *mb; | 185 | struct cx18_mailbox __iomem *mb; |
186 | wait_queue_head_t *waitq; | 186 | wait_queue_head_t *waitq; |
187 | int timeout = 100; | 187 | int timeout = 100; |
188 | int cnt = 0; | 188 | int cnt = 0; |
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c index 4ca9d847f1b1..1b921a336092 100644 --- a/drivers/media/video/cx18/cx18-streams.c +++ b/drivers/media/video/cx18/cx18-streams.c | |||
@@ -36,12 +36,13 @@ | |||
36 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C | 36 | #define CX18_DSP0_INTERRUPT_MASK 0xd0004C |
37 | 37 | ||
38 | static struct file_operations cx18_v4l2_enc_fops = { | 38 | static struct file_operations cx18_v4l2_enc_fops = { |
39 | .owner = THIS_MODULE, | 39 | .owner = THIS_MODULE, |
40 | .read = cx18_v4l2_read, | 40 | .read = cx18_v4l2_read, |
41 | .open = cx18_v4l2_open, | 41 | .open = cx18_v4l2_open, |
42 | .ioctl = cx18_v4l2_ioctl, | 42 | .ioctl = cx18_v4l2_ioctl, |
43 | .release = cx18_v4l2_close, | 43 | .compat_ioctl = v4l_compat_ioctl32, |
44 | .poll = cx18_v4l2_enc_poll, | 44 | .release = cx18_v4l2_close, |
45 | .poll = cx18_v4l2_enc_poll, | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | /* offset from 0 to register ts v4l2 minors on */ | 48 | /* offset from 0 to register ts v4l2 minors on */ |
@@ -443,7 +444,7 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s) | |||
443 | s->handle = data[0]; | 444 | s->handle = data[0]; |
444 | cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype); | 445 | cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype); |
445 | 446 | ||
446 | if (atomic_read(&cx->capturing) == 0 && !ts) { | 447 | if (atomic_read(&cx->ana_capturing) == 0 && !ts) { |
447 | /* Stuff from Windows, we don't know what it is */ | 448 | /* Stuff from Windows, we don't know what it is */ |
448 | cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0); | 449 | cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0); |
449 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1); | 450 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1); |
@@ -466,14 +467,14 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s) | |||
466 | cx2341x_update(cx, cx18_api_func, NULL, &cx->params); | 467 | cx2341x_update(cx, cx18_api_func, NULL, &cx->params); |
467 | } | 468 | } |
468 | 469 | ||
469 | if (atomic_read(&cx->capturing) == 0) { | 470 | if (atomic_read(&cx->tot_capturing) == 0) { |
470 | clear_bit(CX18_F_I_EOS, &cx->i_flags); | 471 | clear_bit(CX18_F_I_EOS, &cx->i_flags); |
471 | write_reg(7, CX18_DSP0_INTERRUPT_MASK); | 472 | write_reg(7, CX18_DSP0_INTERRUPT_MASK); |
472 | } | 473 | } |
473 | 474 | ||
474 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle, | 475 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle, |
475 | (void *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem, | 476 | (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem, |
476 | (void *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem); | 477 | (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem); |
477 | 478 | ||
478 | list_for_each(p, &s->q_free.list) { | 479 | list_for_each(p, &s->q_free.list) { |
479 | struct cx18_buffer *buf = list_entry(p, struct cx18_buffer, list); | 480 | struct cx18_buffer *buf = list_entry(p, struct cx18_buffer, list); |
@@ -481,8 +482,8 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s) | |||
481 | writel(buf->dma_handle, &cx->scb->cpu_mdl[buf->id].paddr); | 482 | writel(buf->dma_handle, &cx->scb->cpu_mdl[buf->id].paddr); |
482 | writel(s->buf_size, &cx->scb->cpu_mdl[buf->id].length); | 483 | writel(s->buf_size, &cx->scb->cpu_mdl[buf->id].length); |
483 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, | 484 | cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, |
484 | (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 1, | 485 | (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, |
485 | buf->id, s->buf_size); | 486 | 1, buf->id, s->buf_size); |
486 | } | 487 | } |
487 | /* begin_capture */ | 488 | /* begin_capture */ |
488 | if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) { | 489 | if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) { |
@@ -492,7 +493,9 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s) | |||
492 | } | 493 | } |
493 | 494 | ||
494 | /* you're live! sit back and await interrupts :) */ | 495 | /* you're live! sit back and await interrupts :) */ |
495 | atomic_inc(&cx->capturing); | 496 | if (!ts) |
497 | atomic_inc(&cx->ana_capturing); | ||
498 | atomic_inc(&cx->tot_capturing); | ||
496 | return 0; | 499 | return 0; |
497 | } | 500 | } |
498 | 501 | ||
@@ -523,7 +526,7 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end) | |||
523 | 526 | ||
524 | CX18_DEBUG_INFO("Stop Capture\n"); | 527 | CX18_DEBUG_INFO("Stop Capture\n"); |
525 | 528 | ||
526 | if (atomic_read(&cx->capturing) == 0) | 529 | if (atomic_read(&cx->tot_capturing) == 0) |
527 | return 0; | 530 | return 0; |
528 | 531 | ||
529 | if (s->type == CX18_ENC_STREAM_TYPE_MPG) | 532 | if (s->type == CX18_ENC_STREAM_TYPE_MPG) |
@@ -537,7 +540,9 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end) | |||
537 | CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n"); | 540 | CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n"); |
538 | } | 541 | } |
539 | 542 | ||
540 | atomic_dec(&cx->capturing); | 543 | if (s->type != CX18_ENC_STREAM_TYPE_TS) |
544 | atomic_dec(&cx->ana_capturing); | ||
545 | atomic_dec(&cx->tot_capturing); | ||
541 | 546 | ||
542 | /* Clear capture and no-read bits */ | 547 | /* Clear capture and no-read bits */ |
543 | clear_bit(CX18_F_S_STREAMING, &s->s_flags); | 548 | clear_bit(CX18_F_S_STREAMING, &s->s_flags); |
@@ -545,7 +550,7 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end) | |||
545 | cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle); | 550 | cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle); |
546 | s->handle = 0xffffffff; | 551 | s->handle = 0xffffffff; |
547 | 552 | ||
548 | if (atomic_read(&cx->capturing) > 0) | 553 | if (atomic_read(&cx->tot_capturing) > 0) |
549 | return 0; | 554 | return 0; |
550 | 555 | ||
551 | write_reg(5, CX18_DSP0_INTERRUPT_MASK); | 556 | write_reg(5, CX18_DSP0_INTERRUPT_MASK); |
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index f24abcd06dea..c4cc2f3b8876 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c | |||
@@ -823,7 +823,7 @@ static void cx23885_dev_unregister(struct cx23885_dev *dev) | |||
823 | iounmap(dev->lmmio); | 823 | iounmap(dev->lmmio); |
824 | } | 824 | } |
825 | 825 | ||
826 | static u32* cx23885_risc_field(u32 *rp, struct scatterlist *sglist, | 826 | static __le32* cx23885_risc_field(__le32 *rp, struct scatterlist *sglist, |
827 | unsigned int offset, u32 sync_line, | 827 | unsigned int offset, u32 sync_line, |
828 | unsigned int bpl, unsigned int padding, | 828 | unsigned int bpl, unsigned int padding, |
829 | unsigned int lines) | 829 | unsigned int lines) |
@@ -883,7 +883,7 @@ int cx23885_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
883 | unsigned int padding, unsigned int lines) | 883 | unsigned int padding, unsigned int lines) |
884 | { | 884 | { |
885 | u32 instructions, fields; | 885 | u32 instructions, fields; |
886 | u32 *rp; | 886 | __le32 *rp; |
887 | int rc; | 887 | int rc; |
888 | 888 | ||
889 | fields = 0; | 889 | fields = 0; |
@@ -924,7 +924,7 @@ static int cx23885_risc_databuffer(struct pci_dev *pci, | |||
924 | unsigned int lines) | 924 | unsigned int lines) |
925 | { | 925 | { |
926 | u32 instructions; | 926 | u32 instructions; |
927 | u32 *rp; | 927 | __le32 *rp; |
928 | int rc; | 928 | int rc; |
929 | 929 | ||
930 | /* estimate risc mem: worst case is one write per page border + | 930 | /* estimate risc mem: worst case is one write per page border + |
@@ -951,7 +951,7 @@ static int cx23885_risc_databuffer(struct pci_dev *pci, | |||
951 | int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, | 951 | int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, |
952 | u32 reg, u32 mask, u32 value) | 952 | u32 reg, u32 mask, u32 value) |
953 | { | 953 | { |
954 | u32 *rp; | 954 | __le32 *rp; |
955 | int rc; | 955 | int rc; |
956 | 956 | ||
957 | if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) | 957 | if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index aeba26dc0a37..fa6d398e97b9 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1493,10 +1493,16 @@ static const struct cx88_board cx88_boards[] = { | |||
1493 | }, | 1493 | }, |
1494 | }, | 1494 | }, |
1495 | [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { | 1495 | [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { |
1496 | .name = "PowerColor Real Angel 330", | 1496 | .name = "PowerColor RA330", /* Long names may confuse LIRC. */ |
1497 | .tuner_type = TUNER_XC2028, | 1497 | .tuner_type = TUNER_XC2028, |
1498 | .tuner_addr = 0x61, | 1498 | .tuner_addr = 0x61, |
1499 | .input = { { | 1499 | .input = { { |
1500 | .type = CX88_VMUX_DEBUG, | ||
1501 | .vmux = 3, /* Due to the way the cx88 driver is written, */ | ||
1502 | .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */ | ||
1503 | .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */ | ||
1504 | .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */ | ||
1505 | }, { /* from the tuner on boot for a little while. */ | ||
1500 | .type = CX88_VMUX_TELEVISION, | 1506 | .type = CX88_VMUX_TELEVISION, |
1501 | .vmux = 0, | 1507 | .vmux = 0, |
1502 | .gpio0 = 0x00ff, | 1508 | .gpio0 = 0x00ff, |
@@ -2424,8 +2430,9 @@ void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl) | |||
2424 | 2430 | ||
2425 | switch (core->boardnr) { | 2431 | switch (core->boardnr) { |
2426 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: | 2432 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: |
2427 | /* Doesn't work with firmware version 2.7 */ | 2433 | /* Now works with firmware version 2.7 */ |
2428 | ctl->fname = "xc3028-v25.fw"; | 2434 | if (core->i2c_algo.udelay < 16) |
2435 | core->i2c_algo.udelay = 16; | ||
2429 | break; | 2436 | break; |
2430 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | 2437 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: |
2431 | ctl->scode_table = XC3028_FE_ZARLINK456; | 2438 | ctl->scode_table = XC3028_FE_ZARLINK456; |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index c4d1aff1fdb4..60eeda3057e9 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -70,7 +70,7 @@ static DEFINE_MUTEX(devlist); | |||
70 | 70 | ||
71 | /* @lpi: lines per IRQ, or 0 to not generate irqs. Note: IRQ to be | 71 | /* @lpi: lines per IRQ, or 0 to not generate irqs. Note: IRQ to be |
72 | generated _after_ lpi lines are transferred. */ | 72 | generated _after_ lpi lines are transferred. */ |
73 | static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist, | 73 | static __le32* cx88_risc_field(__le32 *rp, struct scatterlist *sglist, |
74 | unsigned int offset, u32 sync_line, | 74 | unsigned int offset, u32 sync_line, |
75 | unsigned int bpl, unsigned int padding, | 75 | unsigned int bpl, unsigned int padding, |
76 | unsigned int lines, unsigned int lpi) | 76 | unsigned int lines, unsigned int lpi) |
@@ -130,7 +130,7 @@ int cx88_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
130 | unsigned int bpl, unsigned int padding, unsigned int lines) | 130 | unsigned int bpl, unsigned int padding, unsigned int lines) |
131 | { | 131 | { |
132 | u32 instructions,fields; | 132 | u32 instructions,fields; |
133 | u32 *rp; | 133 | __le32 *rp; |
134 | int rc; | 134 | int rc; |
135 | 135 | ||
136 | fields = 0; | 136 | fields = 0; |
@@ -168,7 +168,7 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
168 | unsigned int lines, unsigned int lpi) | 168 | unsigned int lines, unsigned int lpi) |
169 | { | 169 | { |
170 | u32 instructions; | 170 | u32 instructions; |
171 | u32 *rp; | 171 | __le32 *rp; |
172 | int rc; | 172 | int rc; |
173 | 173 | ||
174 | /* estimate risc mem: worst case is one write per page border + | 174 | /* estimate risc mem: worst case is one write per page border + |
@@ -193,7 +193,7 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, | |||
193 | int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, | 193 | int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, |
194 | u32 reg, u32 mask, u32 value) | 194 | u32 reg, u32 mask, u32 value) |
195 | { | 195 | { |
196 | u32 *rp; | 196 | __le32 *rp; |
197 | int rc; | 197 | int rc; |
198 | 198 | ||
199 | if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) | 199 | if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 8996175cc950..fb163ecd9216 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1166,13 +1166,13 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
1166 | 1166 | ||
1167 | reg->val = ret; | 1167 | reg->val = ret; |
1168 | } else { | 1168 | } else { |
1169 | u64 val = 0; | 1169 | __le64 val = 0; |
1170 | ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS, | 1170 | ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS, |
1171 | reg->reg, (char *)&val, 2); | 1171 | reg->reg, (char *)&val, 2); |
1172 | if (ret < 0) | 1172 | if (ret < 0) |
1173 | return ret; | 1173 | return ret; |
1174 | 1174 | ||
1175 | reg->val = cpu_to_le64((__u64)val); | 1175 | reg->val = le64_to_cpu(val); |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | return 0; | 1178 | return 0; |
@@ -1183,9 +1183,9 @@ static int vidioc_s_register(struct file *file, void *priv, | |||
1183 | { | 1183 | { |
1184 | struct em28xx_fh *fh = priv; | 1184 | struct em28xx_fh *fh = priv; |
1185 | struct em28xx *dev = fh->dev; | 1185 | struct em28xx *dev = fh->dev; |
1186 | u64 buf; | 1186 | __le64 buf; |
1187 | 1187 | ||
1188 | buf = le64_to_cpu((__u64)reg->val); | 1188 | buf = cpu_to_le64(reg->val); |
1189 | 1189 | ||
1190 | return em28xx_write_regs(dev, reg->reg, (char *)&buf, | 1190 | return em28xx_write_regs(dev, reg->reg, (char *)&buf, |
1191 | em28xx_reg_len(reg->reg)); | 1191 | em28xx_reg_len(reg->reg)); |
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index ba06e813c58c..9d23b1efd36d 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -259,6 +259,12 @@ struct ivtv_mailbox_data { | |||
259 | 259 | ||
260 | /* Scatter-Gather array element, used in DMA transfers */ | 260 | /* Scatter-Gather array element, used in DMA transfers */ |
261 | struct ivtv_sg_element { | 261 | struct ivtv_sg_element { |
262 | __le32 src; | ||
263 | __le32 dst; | ||
264 | __le32 size; | ||
265 | }; | ||
266 | |||
267 | struct ivtv_sg_host_element { | ||
262 | u32 src; | 268 | u32 src; |
263 | u32 dst; | 269 | u32 dst; |
264 | u32 size; | 270 | u32 size; |
@@ -349,8 +355,8 @@ struct ivtv_stream { | |||
349 | u16 dma_xfer_cnt; | 355 | u16 dma_xfer_cnt; |
350 | 356 | ||
351 | /* Base Dev SG Array for cx23415/6 */ | 357 | /* Base Dev SG Array for cx23415/6 */ |
352 | struct ivtv_sg_element *sg_pending; | 358 | struct ivtv_sg_host_element *sg_pending; |
353 | struct ivtv_sg_element *sg_processing; | 359 | struct ivtv_sg_host_element *sg_processing; |
354 | struct ivtv_sg_element *sg_dma; | 360 | struct ivtv_sg_element *sg_dma; |
355 | dma_addr_t sg_handle; | 361 | dma_addr_t sg_handle; |
356 | int sg_pending_size; | 362 | int sg_pending_size; |
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index f2fa434b677b..db813e071ce6 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -587,7 +587,7 @@ retry: | |||
587 | since we may get here before the stream has been fully set-up */ | 587 | since we may get here before the stream has been fully set-up */ |
588 | if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { | 588 | if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { |
589 | while (count >= itv->dma_data_req_size) { | 589 | while (count >= itv->dma_data_req_size) { |
590 | if (!ivtv_yuv_udma_stream_frame (itv, (void *)user_buf)) { | 590 | if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) { |
591 | bytes_written += itv->dma_data_req_size; | 591 | bytes_written += itv->dma_data_req_size; |
592 | user_buf += itv->dma_data_req_size; | 592 | user_buf += itv->dma_data_req_size; |
593 | count -= itv->dma_data_req_size; | 593 | count -= itv->dma_data_req_size; |
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c index d8ba3a4a8761..fba150a6cd23 100644 --- a/drivers/media/video/ivtv/ivtv-irq.c +++ b/drivers/media/video/ivtv/ivtv-irq.c | |||
@@ -231,14 +231,14 @@ static void dma_post(struct ivtv_stream *s) | |||
231 | struct ivtv_buffer *buf = NULL; | 231 | struct ivtv_buffer *buf = NULL; |
232 | struct list_head *p; | 232 | struct list_head *p; |
233 | u32 offset; | 233 | u32 offset; |
234 | u32 *u32buf; | 234 | __le32 *u32buf; |
235 | int x = 0; | 235 | int x = 0; |
236 | 236 | ||
237 | IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", | 237 | IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", |
238 | s->name, s->dma_offset); | 238 | s->name, s->dma_offset); |
239 | list_for_each(p, &s->q_dma.list) { | 239 | list_for_each(p, &s->q_dma.list) { |
240 | buf = list_entry(p, struct ivtv_buffer, list); | 240 | buf = list_entry(p, struct ivtv_buffer, list); |
241 | u32buf = (u32 *)buf->buf; | 241 | u32buf = (__le32 *)buf->buf; |
242 | 242 | ||
243 | /* Sync Buffer */ | 243 | /* Sync Buffer */ |
244 | ivtv_buf_sync_for_cpu(s, buf); | 244 | ivtv_buf_sync_for_cpu(s, buf); |
@@ -444,7 +444,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s) | |||
444 | } | 444 | } |
445 | 445 | ||
446 | s->dma_xfer_cnt++; | 446 | s->dma_xfer_cnt++; |
447 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); | 447 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); |
448 | s->sg_processing_size = s->sg_pending_size; | 448 | s->sg_processing_size = s->sg_pending_size; |
449 | s->sg_pending_size = 0; | 449 | s->sg_pending_size = 0; |
450 | s->sg_processed = 0; | 450 | s->sg_processed = 0; |
@@ -473,7 +473,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s) | |||
473 | if (s->q_predma.bytesused) | 473 | if (s->q_predma.bytesused) |
474 | ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); | 474 | ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); |
475 | s->dma_xfer_cnt++; | 475 | s->dma_xfer_cnt++; |
476 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); | 476 | memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size); |
477 | s->sg_processing_size = s->sg_pending_size; | 477 | s->sg_processing_size = s->sg_pending_size; |
478 | s->sg_pending_size = 0; | 478 | s->sg_pending_size = 0; |
479 | s->sg_processed = 0; | 479 | s->sg_processed = 0; |
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c index fc8b1eaa333b..71bd13e22e2e 100644 --- a/drivers/media/video/ivtv/ivtv-queue.c +++ b/drivers/media/video/ivtv/ivtv-queue.c | |||
@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s) | |||
193 | int ivtv_stream_alloc(struct ivtv_stream *s) | 193 | int ivtv_stream_alloc(struct ivtv_stream *s) |
194 | { | 194 | { |
195 | struct ivtv *itv = s->itv; | 195 | struct ivtv *itv = s->itv; |
196 | int SGsize = sizeof(struct ivtv_sg_element) * s->buffers; | 196 | int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers; |
197 | int i; | 197 | int i; |
198 | 198 | ||
199 | if (s->buffers == 0) | 199 | if (s->buffers == 0) |
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index c47c2b945147..c854285a4371 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -44,23 +44,25 @@ | |||
44 | #include "ivtv-streams.h" | 44 | #include "ivtv-streams.h" |
45 | 45 | ||
46 | static const struct file_operations ivtv_v4l2_enc_fops = { | 46 | static const struct file_operations ivtv_v4l2_enc_fops = { |
47 | .owner = THIS_MODULE, | 47 | .owner = THIS_MODULE, |
48 | .read = ivtv_v4l2_read, | 48 | .read = ivtv_v4l2_read, |
49 | .write = ivtv_v4l2_write, | 49 | .write = ivtv_v4l2_write, |
50 | .open = ivtv_v4l2_open, | 50 | .open = ivtv_v4l2_open, |
51 | .ioctl = ivtv_v4l2_ioctl, | 51 | .ioctl = ivtv_v4l2_ioctl, |
52 | .release = ivtv_v4l2_close, | 52 | .compat_ioctl = v4l_compat_ioctl32, |
53 | .poll = ivtv_v4l2_enc_poll, | 53 | .release = ivtv_v4l2_close, |
54 | .poll = ivtv_v4l2_enc_poll, | ||
54 | }; | 55 | }; |
55 | 56 | ||
56 | static const struct file_operations ivtv_v4l2_dec_fops = { | 57 | static const struct file_operations ivtv_v4l2_dec_fops = { |
57 | .owner = THIS_MODULE, | 58 | .owner = THIS_MODULE, |
58 | .read = ivtv_v4l2_read, | 59 | .read = ivtv_v4l2_read, |
59 | .write = ivtv_v4l2_write, | 60 | .write = ivtv_v4l2_write, |
60 | .open = ivtv_v4l2_open, | 61 | .open = ivtv_v4l2_open, |
61 | .ioctl = ivtv_v4l2_ioctl, | 62 | .ioctl = ivtv_v4l2_ioctl, |
62 | .release = ivtv_v4l2_close, | 63 | .compat_ioctl = v4l_compat_ioctl32, |
63 | .poll = ivtv_v4l2_dec_poll, | 64 | .release = ivtv_v4l2_close, |
65 | .poll = ivtv_v4l2_dec_poll, | ||
64 | }; | 66 | }; |
65 | 67 | ||
66 | #define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */ | 68 | #define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */ |
diff --git a/drivers/media/video/ivtv/ivtv-version.h b/drivers/media/video/ivtv/ivtv-version.h index 02c5ab071d1b..442f43f11b73 100644 --- a/drivers/media/video/ivtv/ivtv-version.h +++ b/drivers/media/video/ivtv/ivtv-version.h | |||
@@ -22,8 +22,8 @@ | |||
22 | 22 | ||
23 | #define IVTV_DRIVER_NAME "ivtv" | 23 | #define IVTV_DRIVER_NAME "ivtv" |
24 | #define IVTV_DRIVER_VERSION_MAJOR 1 | 24 | #define IVTV_DRIVER_VERSION_MAJOR 1 |
25 | #define IVTV_DRIVER_VERSION_MINOR 2 | 25 | #define IVTV_DRIVER_VERSION_MINOR 3 |
26 | #define IVTV_DRIVER_VERSION_PATCHLEVEL 1 | 26 | #define IVTV_DRIVER_VERSION_PATCHLEVEL 0 |
27 | 27 | ||
28 | #define IVTV_VERSION __stringify(IVTV_DRIVER_VERSION_MAJOR) "." __stringify(IVTV_DRIVER_VERSION_MINOR) "." __stringify(IVTV_DRIVER_VERSION_PATCHLEVEL) | 28 | #define IVTV_VERSION __stringify(IVTV_DRIVER_VERSION_MAJOR) "." __stringify(IVTV_DRIVER_VERSION_MINOR) "." __stringify(IVTV_DRIVER_VERSION_PATCHLEVEL) |
29 | #define IVTV_DRIVER_VERSION KERNEL_VERSION(IVTV_DRIVER_VERSION_MAJOR,IVTV_DRIVER_VERSION_MINOR,IVTV_DRIVER_VERSION_PATCHLEVEL) | 29 | #define IVTV_DRIVER_VERSION KERNEL_VERSION(IVTV_DRIVER_VERSION_MAJOR,IVTV_DRIVER_VERSION_MINOR,IVTV_DRIVER_VERSION_PATCHLEVEL) |
diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/video/ivtv/ivtv-yuv.c index a9417f6e4087..3092ff1d00a0 100644 --- a/drivers/media/video/ivtv/ivtv-yuv.c +++ b/drivers/media/video/ivtv/ivtv-yuv.c | |||
@@ -1116,7 +1116,7 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv) | |||
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* Attempt to dma a frame from a user buffer */ | 1118 | /* Attempt to dma a frame from a user buffer */ |
1119 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src) | 1119 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src) |
1120 | { | 1120 | { |
1121 | struct yuv_playback_info *yi = &itv->yuv_info; | 1121 | struct yuv_playback_info *yi = &itv->yuv_info; |
1122 | struct ivtv_dma_frame dma_args; | 1122 | struct ivtv_dma_frame dma_args; |
diff --git a/drivers/media/video/ivtv/ivtv-yuv.h b/drivers/media/video/ivtv/ivtv-yuv.h index 2fe5f1250762..ca5173fbf006 100644 --- a/drivers/media/video/ivtv/ivtv-yuv.h +++ b/drivers/media/video/ivtv/ivtv-yuv.h | |||
@@ -35,7 +35,7 @@ extern const u32 yuv_offset[IVTV_YUV_BUFFERS]; | |||
35 | 35 | ||
36 | int ivtv_yuv_filter_check(struct ivtv *itv); | 36 | int ivtv_yuv_filter_check(struct ivtv *itv); |
37 | void ivtv_yuv_setup_stream_frame(struct ivtv *itv); | 37 | void ivtv_yuv_setup_stream_frame(struct ivtv *itv); |
38 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src); | 38 | int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src); |
39 | void ivtv_yuv_frame_complete(struct ivtv *itv); | 39 | void ivtv_yuv_frame_complete(struct ivtv *itv); |
40 | int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); | 40 | int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); |
41 | void ivtv_yuv_close(struct ivtv *itv); | 41 | void ivtv_yuv_close(struct ivtv *itv); |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 1314522a8130..81431ee41842 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -163,8 +163,7 @@ ts_mmap(struct file *file, struct vm_area_struct * vma) | |||
163 | static int empress_querycap(struct file *file, void *priv, | 163 | static int empress_querycap(struct file *file, void *priv, |
164 | struct v4l2_capability *cap) | 164 | struct v4l2_capability *cap) |
165 | { | 165 | { |
166 | struct saa7134_fh *fh = priv; | 166 | struct saa7134_dev *dev = file->private_data; |
167 | struct saa7134_dev *dev = fh->dev; | ||
168 | 167 | ||
169 | strcpy(cap->driver, "saa7134"); | 168 | strcpy(cap->driver, "saa7134"); |
170 | strlcpy(cap->card, saa7134_boards[dev->board].name, | 169 | strlcpy(cap->card, saa7134_boards[dev->board].name, |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 198f0afb812e..0d12ace61665 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -92,6 +92,7 @@ struct tuner { | |||
92 | unsigned int type; /* chip type id */ | 92 | unsigned int type; /* chip type id */ |
93 | unsigned int config; | 93 | unsigned int config; |
94 | int (*tuner_callback) (void *dev, int command, int arg); | 94 | int (*tuner_callback) (void *dev, int command, int arg); |
95 | const char *name; | ||
95 | }; | 96 | }; |
96 | 97 | ||
97 | /* standard i2c insmod options */ | 98 | /* standard i2c insmod options */ |
@@ -330,13 +331,13 @@ static void tuner_i2c_address_check(struct tuner *t) | |||
330 | tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n"); | 331 | tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n"); |
331 | tuner_warn("will soon be dropped. This message indicates that your\n"); | 332 | tuner_warn("will soon be dropped. This message indicates that your\n"); |
332 | tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n", | 333 | tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n", |
333 | t->i2c->name, t->i2c->addr); | 334 | t->name, t->i2c->addr); |
334 | tuner_warn("To ensure continued support for your device, please\n"); | 335 | tuner_warn("To ensure continued support for your device, please\n"); |
335 | tuner_warn("send a copy of this message, along with full dmesg\n"); | 336 | tuner_warn("send a copy of this message, along with full dmesg\n"); |
336 | tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n"); | 337 | tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n"); |
337 | tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n"); | 338 | tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n"); |
338 | tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n", | 339 | tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n", |
339 | t->i2c->adapter->name, t->i2c->addr, t->type, t->i2c->name); | 340 | t->i2c->adapter->name, t->i2c->addr, t->type, t->name); |
340 | tuner_warn("====================== WARNING! ======================\n"); | 341 | tuner_warn("====================== WARNING! ======================\n"); |
341 | } | 342 | } |
342 | 343 | ||
@@ -470,19 +471,17 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
470 | if ((NULL == analog_ops->set_params) && | 471 | if ((NULL == analog_ops->set_params) && |
471 | (fe_tuner_ops->set_analog_params)) { | 472 | (fe_tuner_ops->set_analog_params)) { |
472 | 473 | ||
473 | strlcpy(t->i2c->name, fe_tuner_ops->info.name, | 474 | t->name = fe_tuner_ops->info.name; |
474 | sizeof(t->i2c->name)); | ||
475 | 475 | ||
476 | t->fe.analog_demod_priv = t; | 476 | t->fe.analog_demod_priv = t; |
477 | memcpy(analog_ops, &tuner_core_ops, | 477 | memcpy(analog_ops, &tuner_core_ops, |
478 | sizeof(struct analog_demod_ops)); | 478 | sizeof(struct analog_demod_ops)); |
479 | 479 | ||
480 | } else { | 480 | } else { |
481 | strlcpy(t->i2c->name, analog_ops->info.name, | 481 | t->name = analog_ops->info.name; |
482 | sizeof(t->i2c->name)); | ||
483 | } | 482 | } |
484 | 483 | ||
485 | tuner_dbg("type set to %s\n", t->i2c->name); | 484 | tuner_dbg("type set to %s\n", t->name); |
486 | 485 | ||
487 | if (t->mode_mask == T_UNINITIALIZED) | 486 | if (t->mode_mask == T_UNINITIALIZED) |
488 | t->mode_mask = new_mode_mask; | 487 | t->mode_mask = new_mode_mask; |
@@ -537,7 +536,7 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup) | |||
537 | static inline int check_mode(struct tuner *t, char *cmd) | 536 | static inline int check_mode(struct tuner *t, char *cmd) |
538 | { | 537 | { |
539 | if ((1 << t->mode & t->mode_mask) == 0) { | 538 | if ((1 << t->mode & t->mode_mask) == 0) { |
540 | return EINVAL; | 539 | return -EINVAL; |
541 | } | 540 | } |
542 | 541 | ||
543 | switch (t->mode) { | 542 | switch (t->mode) { |
@@ -731,11 +730,11 @@ static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode, | |||
731 | 730 | ||
732 | t->mode = mode; | 731 | t->mode = mode; |
733 | 732 | ||
734 | if (check_mode(t, cmd) == EINVAL) { | 733 | if (check_mode(t, cmd) == -EINVAL) { |
735 | t->mode = T_STANDBY; | 734 | t->mode = T_STANDBY; |
736 | if (analog_ops->standby) | 735 | if (analog_ops->standby) |
737 | analog_ops->standby(&t->fe); | 736 | analog_ops->standby(&t->fe); |
738 | return EINVAL; | 737 | return -EINVAL; |
739 | } | 738 | } |
740 | return 0; | 739 | return 0; |
741 | } | 740 | } |
@@ -777,13 +776,13 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
777 | break; | 776 | break; |
778 | case AUDC_SET_RADIO: | 777 | case AUDC_SET_RADIO: |
779 | if (set_mode(client, t, V4L2_TUNER_RADIO, "AUDC_SET_RADIO") | 778 | if (set_mode(client, t, V4L2_TUNER_RADIO, "AUDC_SET_RADIO") |
780 | == EINVAL) | 779 | == -EINVAL) |
781 | return 0; | 780 | return 0; |
782 | if (t->radio_freq) | 781 | if (t->radio_freq) |
783 | set_freq(client, t->radio_freq); | 782 | set_freq(client, t->radio_freq); |
784 | break; | 783 | break; |
785 | case TUNER_SET_STANDBY: | 784 | case TUNER_SET_STANDBY: |
786 | if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL) | 785 | if (check_mode(t, "TUNER_SET_STANDBY") == -EINVAL) |
787 | return 0; | 786 | return 0; |
788 | t->mode = T_STANDBY; | 787 | t->mode = T_STANDBY; |
789 | if (analog_ops->standby) | 788 | if (analog_ops->standby) |
@@ -791,9 +790,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
791 | break; | 790 | break; |
792 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 | 791 | #ifdef CONFIG_VIDEO_ALLOW_V4L1 |
793 | case VIDIOCSAUDIO: | 792 | case VIDIOCSAUDIO: |
794 | if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) | 793 | if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL) |
795 | return 0; | 794 | return 0; |
796 | if (check_v4l2(t) == EINVAL) | 795 | if (check_v4l2(t) == -EINVAL) |
797 | return 0; | 796 | return 0; |
798 | 797 | ||
799 | /* Should be implemented, since bttv calls it */ | 798 | /* Should be implemented, since bttv calls it */ |
@@ -811,10 +810,10 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
811 | }; | 810 | }; |
812 | struct video_channel *vc = arg; | 811 | struct video_channel *vc = arg; |
813 | 812 | ||
814 | if (check_v4l2(t) == EINVAL) | 813 | if (check_v4l2(t) == -EINVAL) |
815 | return 0; | 814 | return 0; |
816 | 815 | ||
817 | if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==EINVAL) | 816 | if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL) |
818 | return 0; | 817 | return 0; |
819 | 818 | ||
820 | if (vc->norm < ARRAY_SIZE(map)) | 819 | if (vc->norm < ARRAY_SIZE(map)) |
@@ -828,9 +827,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
828 | { | 827 | { |
829 | unsigned long *v = arg; | 828 | unsigned long *v = arg; |
830 | 829 | ||
831 | if (check_mode(t, "VIDIOCSFREQ") == EINVAL) | 830 | if (check_mode(t, "VIDIOCSFREQ") == -EINVAL) |
832 | return 0; | 831 | return 0; |
833 | if (check_v4l2(t) == EINVAL) | 832 | if (check_v4l2(t) == -EINVAL) |
834 | return 0; | 833 | return 0; |
835 | 834 | ||
836 | set_freq(client, *v); | 835 | set_freq(client, *v); |
@@ -840,9 +839,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
840 | { | 839 | { |
841 | struct video_tuner *vt = arg; | 840 | struct video_tuner *vt = arg; |
842 | 841 | ||
843 | if (check_mode(t, "VIDIOCGTUNER") == EINVAL) | 842 | if (check_mode(t, "VIDIOCGTUNER") == -EINVAL) |
844 | return 0; | 843 | return 0; |
845 | if (check_v4l2(t) == EINVAL) | 844 | if (check_v4l2(t) == -EINVAL) |
846 | return 0; | 845 | return 0; |
847 | 846 | ||
848 | if (V4L2_TUNER_RADIO == t->mode) { | 847 | if (V4L2_TUNER_RADIO == t->mode) { |
@@ -884,9 +883,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
884 | { | 883 | { |
885 | struct video_audio *va = arg; | 884 | struct video_audio *va = arg; |
886 | 885 | ||
887 | if (check_mode(t, "VIDIOCGAUDIO") == EINVAL) | 886 | if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL) |
888 | return 0; | 887 | return 0; |
889 | if (check_v4l2(t) == EINVAL) | 888 | if (check_v4l2(t) == -EINVAL) |
890 | return 0; | 889 | return 0; |
891 | 890 | ||
892 | if (V4L2_TUNER_RADIO == t->mode) { | 891 | if (V4L2_TUNER_RADIO == t->mode) { |
@@ -926,7 +925,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
926 | v4l2_std_id *id = arg; | 925 | v4l2_std_id *id = arg; |
927 | 926 | ||
928 | if (set_mode (client, t, V4L2_TUNER_ANALOG_TV, "VIDIOC_S_STD") | 927 | if (set_mode (client, t, V4L2_TUNER_ANALOG_TV, "VIDIOC_S_STD") |
929 | == EINVAL) | 928 | == -EINVAL) |
930 | return 0; | 929 | return 0; |
931 | 930 | ||
932 | switch_v4l2(); | 931 | switch_v4l2(); |
@@ -942,7 +941,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
942 | struct v4l2_frequency *f = arg; | 941 | struct v4l2_frequency *f = arg; |
943 | 942 | ||
944 | if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") | 943 | if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") |
945 | == EINVAL) | 944 | == -EINVAL) |
946 | return 0; | 945 | return 0; |
947 | switch_v4l2(); | 946 | switch_v4l2(); |
948 | set_freq(client,f->frequency); | 947 | set_freq(client,f->frequency); |
@@ -953,7 +952,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
953 | { | 952 | { |
954 | struct v4l2_frequency *f = arg; | 953 | struct v4l2_frequency *f = arg; |
955 | 954 | ||
956 | if (check_mode(t, "VIDIOC_G_FREQUENCY") == EINVAL) | 955 | if (check_mode(t, "VIDIOC_G_FREQUENCY") == -EINVAL) |
957 | return 0; | 956 | return 0; |
958 | switch_v4l2(); | 957 | switch_v4l2(); |
959 | f->type = t->mode; | 958 | f->type = t->mode; |
@@ -974,7 +973,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
974 | { | 973 | { |
975 | struct v4l2_tuner *tuner = arg; | 974 | struct v4l2_tuner *tuner = arg; |
976 | 975 | ||
977 | if (check_mode(t, "VIDIOC_G_TUNER") == EINVAL) | 976 | if (check_mode(t, "VIDIOC_G_TUNER") == -EINVAL) |
978 | return 0; | 977 | return 0; |
979 | switch_v4l2(); | 978 | switch_v4l2(); |
980 | 979 | ||
@@ -1021,7 +1020,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
1021 | { | 1020 | { |
1022 | struct v4l2_tuner *tuner = arg; | 1021 | struct v4l2_tuner *tuner = arg; |
1023 | 1022 | ||
1024 | if (check_mode(t, "VIDIOC_S_TUNER") == EINVAL) | 1023 | if (check_mode(t, "VIDIOC_S_TUNER") == -EINVAL) |
1025 | return 0; | 1024 | return 0; |
1026 | 1025 | ||
1027 | switch_v4l2(); | 1026 | switch_v4l2(); |
@@ -1115,6 +1114,7 @@ static int tuner_probe(struct i2c_client *client, | |||
1115 | if (NULL == t) | 1114 | if (NULL == t) |
1116 | return -ENOMEM; | 1115 | return -ENOMEM; |
1117 | t->i2c = client; | 1116 | t->i2c = client; |
1117 | t->name = "(tuner unset)"; | ||
1118 | i2c_set_clientdata(client, t); | 1118 | i2c_set_clientdata(client, t); |
1119 | t->type = UNSET; | 1119 | t->type = UNSET; |
1120 | t->audmode = V4L2_TUNER_MODE_STEREO; | 1120 | t->audmode = V4L2_TUNER_MODE_STEREO; |
@@ -1272,12 +1272,6 @@ static int tuner_remove(struct i2c_client *client) | |||
1272 | 1272 | ||
1273 | list_del(&t->list); | 1273 | list_del(&t->list); |
1274 | kfree(t); | 1274 | kfree(t); |
1275 | |||
1276 | /* The probing code has overwritten the device name, restore it so | ||
1277 | that reloading the driver will work. Ideally the device name | ||
1278 | should not be overwritten in the first place, but for now that | ||
1279 | will do. */ | ||
1280 | strlcpy(client->name, "tuner", I2C_NAME_SIZE); | ||
1281 | return 0; | 1275 | return 0; |
1282 | } | 1276 | } |
1283 | 1277 | ||
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c index 32e536edf09d..3d26a30abe1e 100644 --- a/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/drivers/media/video/usbvideo/quickcam_messenger.c | |||
@@ -210,7 +210,7 @@ static int qcm_stv_setb(struct usb_device *dev, u16 reg, u8 val) | |||
210 | return ret; | 210 | return ret; |
211 | } | 211 | } |
212 | 212 | ||
213 | static int qcm_stv_setw(struct usb_device *dev, u16 reg, u16 val) | 213 | static int qcm_stv_setw(struct usb_device *dev, u16 reg, __le16 val) |
214 | { | 214 | { |
215 | int ret; | 215 | int ret; |
216 | 216 | ||
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 982f4463896c..0a88c44ace00 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c | |||
@@ -331,7 +331,7 @@ int videobuf_mmap_free(struct videobuf_queue *q) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | /* Locking: Caller holds q->vb_lock */ | 333 | /* Locking: Caller holds q->vb_lock */ |
334 | static int __videobuf_mmap_setup(struct videobuf_queue *q, | 334 | int __videobuf_mmap_setup(struct videobuf_queue *q, |
335 | unsigned int bcount, unsigned int bsize, | 335 | unsigned int bcount, unsigned int bsize, |
336 | enum v4l2_memory memory) | 336 | enum v4l2_memory memory) |
337 | { | 337 | { |
@@ -1129,6 +1129,7 @@ EXPORT_SYMBOL_GPL(videobuf_read_stream); | |||
1129 | EXPORT_SYMBOL_GPL(videobuf_read_one); | 1129 | EXPORT_SYMBOL_GPL(videobuf_read_one); |
1130 | EXPORT_SYMBOL_GPL(videobuf_poll_stream); | 1130 | EXPORT_SYMBOL_GPL(videobuf_poll_stream); |
1131 | 1131 | ||
1132 | EXPORT_SYMBOL_GPL(__videobuf_mmap_setup); | ||
1132 | EXPORT_SYMBOL_GPL(videobuf_mmap_setup); | 1133 | EXPORT_SYMBOL_GPL(videobuf_mmap_setup); |
1133 | EXPORT_SYMBOL_GPL(videobuf_mmap_free); | 1134 | EXPORT_SYMBOL_GPL(videobuf_mmap_free); |
1134 | EXPORT_SYMBOL_GPL(videobuf_mmap_mapper); | 1135 | EXPORT_SYMBOL_GPL(videobuf_mmap_mapper); |
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h index 81cc3b00a079..46b7ad477ceb 100644 --- a/drivers/media/video/zoran.h +++ b/drivers/media/video/zoran.h | |||
@@ -285,7 +285,7 @@ struct zoran_mapping { | |||
285 | 285 | ||
286 | struct zoran_jpg_buffer { | 286 | struct zoran_jpg_buffer { |
287 | struct zoran_mapping *map; | 287 | struct zoran_mapping *map; |
288 | u32 *frag_tab; /* addresses of frag table */ | 288 | __le32 *frag_tab; /* addresses of frag table */ |
289 | u32 frag_tab_bus; /* same value cached to save time in ISR */ | 289 | u32 frag_tab_bus; /* same value cached to save time in ISR */ |
290 | enum zoran_buffer_state state; /* non-zero if corresponding buffer is in use in grab queue */ | 290 | enum zoran_buffer_state state; /* non-zero if corresponding buffer is in use in grab queue */ |
291 | struct zoran_sync bs; /* DONE: info to return to application */ | 291 | struct zoran_sync bs; /* DONE: info to return to application */ |
@@ -450,7 +450,7 @@ struct zoran { | |||
450 | unsigned long jpg_queued_num; /* count of frames queued since grab/play started */ | 450 | unsigned long jpg_queued_num; /* count of frames queued since grab/play started */ |
451 | 451 | ||
452 | /* zr36057's code buffer table */ | 452 | /* zr36057's code buffer table */ |
453 | u32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ | 453 | __le32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ |
454 | 454 | ||
455 | /* (value & BUZ_MASK_FRAME) corresponds to index in pend[] queue */ | 455 | /* (value & BUZ_MASK_FRAME) corresponds to index in pend[] queue */ |
456 | int jpg_pend[BUZ_MAX_FRAME]; | 456 | int jpg_pend[BUZ_MAX_FRAME]; |
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index 37629ffd34c3..88d369708e4c 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -1320,7 +1320,7 @@ error_handler (struct zoran *zr, | |||
1320 | if (i) { | 1320 | if (i) { |
1321 | /* Rotate stat_comm entries to make current entry first */ | 1321 | /* Rotate stat_comm entries to make current entry first */ |
1322 | int j; | 1322 | int j; |
1323 | u32 bus_addr[BUZ_NUM_STAT_COM]; | 1323 | __le32 bus_addr[BUZ_NUM_STAT_COM]; |
1324 | 1324 | ||
1325 | /* Here we are copying the stat_com array, which | 1325 | /* Here we are copying the stat_com array, which |
1326 | * is already in little endian format, so | 1326 | * is already in little endian format, so |
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index 345c77e46837..5394d7a5cfee 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -495,7 +495,7 @@ jpg_fbuffer_alloc (struct file *file) | |||
495 | jpg_fbuffer_free(file); | 495 | jpg_fbuffer_free(file); |
496 | return -ENOBUFS; | 496 | return -ENOBUFS; |
497 | } | 497 | } |
498 | fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; | 498 | fh->jpg_buffers.buffer[i].frag_tab = (__le32 *) mem; |
499 | fh->jpg_buffers.buffer[i].frag_tab_bus = | 499 | fh->jpg_buffers.buffer[i].frag_tab_bus = |
500 | virt_to_bus((void *) mem); | 500 | virt_to_bus((void *) mem); |
501 | 501 | ||
@@ -1167,7 +1167,7 @@ zoran_close_end_session (struct file *file) | |||
1167 | 1167 | ||
1168 | /* v4l capture */ | 1168 | /* v4l capture */ |
1169 | if (fh->v4l_buffers.active != ZORAN_FREE) { | 1169 | if (fh->v4l_buffers.active != ZORAN_FREE) { |
1170 | long flags; | 1170 | unsigned long flags; |
1171 | 1171 | ||
1172 | spin_lock_irqsave(&zr->spinlock, flags); | 1172 | spin_lock_irqsave(&zr->spinlock, flags); |
1173 | zr36057_set_memgrab(zr, 0); | 1173 | zr36057_set_memgrab(zr, 0); |
@@ -3436,7 +3436,7 @@ zoran_do_ioctl (struct inode *inode, | |||
3436 | 3436 | ||
3437 | /* unload capture */ | 3437 | /* unload capture */ |
3438 | if (zr->v4l_memgrab_active) { | 3438 | if (zr->v4l_memgrab_active) { |
3439 | long flags; | 3439 | unsigned long flags; |
3440 | 3440 | ||
3441 | spin_lock_irqsave(&zr->spinlock, flags); | 3441 | spin_lock_irqsave(&zr->spinlock, flags); |
3442 | zr36057_set_memgrab(zr, 0); | 3442 | zr36057_set_memgrab(zr, 0); |
@@ -4375,7 +4375,7 @@ zoran_vm_close (struct vm_area_struct *vma) | |||
4375 | mutex_lock(&zr->resource_lock); | 4375 | mutex_lock(&zr->resource_lock); |
4376 | 4376 | ||
4377 | if (fh->v4l_buffers.active != ZORAN_FREE) { | 4377 | if (fh->v4l_buffers.active != ZORAN_FREE) { |
4378 | long flags; | 4378 | unsigned long flags; |
4379 | 4379 | ||
4380 | spin_lock_irqsave(&zr->spinlock, flags); | 4380 | spin_lock_irqsave(&zr->spinlock, flags); |
4381 | zr36057_set_memgrab(zr, 0); | 4381 | zr36057_set_memgrab(zr, 0); |
@@ -4506,7 +4506,7 @@ zoran_mmap (struct file *file, | |||
4506 | if (todo > fraglen) | 4506 | if (todo > fraglen) |
4507 | todo = fraglen; | 4507 | todo = fraglen; |
4508 | pos = | 4508 | pos = |
4509 | le32_to_cpu((unsigned long) fh->jpg_buffers. | 4509 | le32_to_cpu(fh->jpg_buffers. |
4510 | buffer[i].frag_tab[2 * j]); | 4510 | buffer[i].frag_tab[2 * j]); |
4511 | /* should just be pos on i386 */ | 4511 | /* should just be pos on i386 */ |
4512 | page = virt_to_phys(bus_to_virt(pos)) | 4512 | page = virt_to_phys(bus_to_virt(pos)) |
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 3cdd4e962115..1e24ab4ac38c 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -1238,8 +1238,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1238 | sh->max_id = ioc->pfacts->MaxDevices; | 1238 | sh->max_id = ioc->pfacts->MaxDevices; |
1239 | sh->max_lun = max_lun; | 1239 | sh->max_lun = max_lun; |
1240 | 1240 | ||
1241 | sh->this_id = ioc->pfacts[0].PortSCSIID; | ||
1242 | |||
1243 | /* Required entry. | 1241 | /* Required entry. |
1244 | */ | 1242 | */ |
1245 | sh->unique_id = ioc->id; | 1243 | sh->unique_id = ioc->id; |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 468480771f13..4d492ba232b0 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -3193,8 +3193,6 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
3193 | 3193 | ||
3194 | sh->transportt = mptsas_transport_template; | 3194 | sh->transportt = mptsas_transport_template; |
3195 | 3195 | ||
3196 | sh->this_id = ioc->pfacts[0].PortSCSIID; | ||
3197 | |||
3198 | /* Required entry. | 3196 | /* Required entry. |
3199 | */ | 3197 | */ |
3200 | sh->unique_id = ioc->id; | 3198 | sh->unique_id = ioc->id; |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index b109bd8a4d19..c68ef00c2f92 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -2451,12 +2451,6 @@ mptscsih_slave_configure(struct scsi_device *sdev) | |||
2451 | ioc->name, sdev->sdtr, sdev->wdtr, | 2451 | ioc->name, sdev->sdtr, sdev->wdtr, |
2452 | sdev->ppr, sdev->inquiry_len)); | 2452 | sdev->ppr, sdev->inquiry_len)); |
2453 | 2453 | ||
2454 | if (sdev->id > sh->max_id) { | ||
2455 | /* error case, should never happen */ | ||
2456 | scsi_adjust_queue_depth(sdev, 0, 1); | ||
2457 | goto slave_configure_exit; | ||
2458 | } | ||
2459 | |||
2460 | vdevice->configured_lun = 1; | 2454 | vdevice->configured_lun = 1; |
2461 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); | 2455 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); |
2462 | 2456 | ||
@@ -2470,8 +2464,6 @@ mptscsih_slave_configure(struct scsi_device *sdev) | |||
2470 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, | 2464 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, |
2471 | vtarget->minSyncFactor)); | 2465 | vtarget->minSyncFactor)); |
2472 | 2466 | ||
2473 | slave_configure_exit: | ||
2474 | |||
2475 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2467 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2476 | "tagged %d, simple %d, ordered %d\n", | 2468 | "tagged %d, simple %d, ordered %d\n", |
2477 | ioc->name,sdev->tagged_supported, sdev->simple_tags, | 2469 | ioc->name,sdev->tagged_supported, sdev->simple_tags, |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 2566479937c9..ae96bd6242f2 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -24,7 +24,7 @@ config MFD_ASIC3 | |||
24 | 24 | ||
25 | config HTC_EGPIO | 25 | config HTC_EGPIO |
26 | bool "HTC EGPIO support" | 26 | bool "HTC EGPIO support" |
27 | depends on GENERIC_HARDIRQS && HAVE_GPIO_LIB | 27 | depends on GENERIC_HARDIRQS && HAVE_GPIO_LIB && ARM |
28 | help | 28 | help |
29 | This driver supports the CPLD egpio chip present on | 29 | This driver supports the CPLD egpio chip present on |
30 | several HTC phones. It provides basic support for input | 30 | several HTC phones. It provides basic support for input |
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c index e2e7c05a147b..6d14e8fe1537 100644 --- a/drivers/misc/fujitsu-laptop.c +++ b/drivers/misc/fujitsu-laptop.c | |||
@@ -352,3 +352,9 @@ MODULE_AUTHOR("Jonathan Woithe"); | |||
352 | MODULE_DESCRIPTION("Fujitsu laptop extras support"); | 352 | MODULE_DESCRIPTION("Fujitsu laptop extras support"); |
353 | MODULE_VERSION(FUJITSU_DRIVER_VERSION); | 353 | MODULE_VERSION(FUJITSU_DRIVER_VERSION); |
354 | MODULE_LICENSE("GPL"); | 354 | MODULE_LICENSE("GPL"); |
355 | |||
356 | static struct pnp_device_id pnp_ids[] = { | ||
357 | { .id = "FUJ02bf" }, | ||
358 | { .id = "" } | ||
359 | }; | ||
360 | MODULE_DEVICE_TABLE(pnp, pnp_ids); | ||
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index fa394104339c..e4ff50b95a5e 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -102,7 +102,6 @@ | |||
102 | #include <linux/nmi.h> | 102 | #include <linux/nmi.h> |
103 | #include <linux/delay.h> | 103 | #include <linux/delay.h> |
104 | #include <linux/kthread.h> | 104 | #include <linux/kthread.h> |
105 | #include <linux/delay.h> | ||
106 | 105 | ||
107 | #define v1printk(a...) do { \ | 106 | #define v1printk(a...) do { \ |
108 | if (verbose) \ | 107 | if (verbose) \ |
@@ -119,7 +118,6 @@ | |||
119 | } while (0) | 118 | } while (0) |
120 | #define MAX_CONFIG_LEN 40 | 119 | #define MAX_CONFIG_LEN 40 |
121 | 120 | ||
122 | static const char hexchars[] = "0123456789abcdef"; | ||
123 | static struct kgdb_io kgdbts_io_ops; | 121 | static struct kgdb_io kgdbts_io_ops; |
124 | static char get_buf[BUFMAX]; | 122 | static char get_buf[BUFMAX]; |
125 | static int get_buf_cnt; | 123 | static int get_buf_cnt; |
@@ -131,6 +129,8 @@ static int repeat_test; | |||
131 | static int test_complete; | 129 | static int test_complete; |
132 | static int send_ack; | 130 | static int send_ack; |
133 | static int final_ack; | 131 | static int final_ack; |
132 | static int force_hwbrks; | ||
133 | static int hwbreaks_ok; | ||
134 | static int hw_break_val; | 134 | static int hw_break_val; |
135 | static int hw_break_val2; | 135 | static int hw_break_val2; |
136 | #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_SPARC) | 136 | #if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_SPARC) |
@@ -234,12 +234,12 @@ static void break_helper(char *bp_type, char *arg, unsigned long vaddr) | |||
234 | 234 | ||
235 | static void sw_break(char *arg) | 235 | static void sw_break(char *arg) |
236 | { | 236 | { |
237 | break_helper("Z0", arg, 0); | 237 | break_helper(force_hwbrks ? "Z1" : "Z0", arg, 0); |
238 | } | 238 | } |
239 | 239 | ||
240 | static void sw_rem_break(char *arg) | 240 | static void sw_rem_break(char *arg) |
241 | { | 241 | { |
242 | break_helper("z0", arg, 0); | 242 | break_helper(force_hwbrks ? "z1" : "z0", arg, 0); |
243 | } | 243 | } |
244 | 244 | ||
245 | static void hw_break(char *arg) | 245 | static void hw_break(char *arg) |
@@ -619,8 +619,8 @@ static void fill_get_buf(char *buf) | |||
619 | count++; | 619 | count++; |
620 | } | 620 | } |
621 | strcat(get_buf, "#"); | 621 | strcat(get_buf, "#"); |
622 | get_buf[count + 2] = hexchars[checksum >> 4]; | 622 | get_buf[count + 2] = hex_asc_hi(checksum); |
623 | get_buf[count + 3] = hexchars[checksum & 0xf]; | 623 | get_buf[count + 3] = hex_asc_lo(checksum); |
624 | get_buf[count + 4] = '\0'; | 624 | get_buf[count + 4] = '\0'; |
625 | v2printk("get%i: %s\n", ts.idx, get_buf); | 625 | v2printk("get%i: %s\n", ts.idx, get_buf); |
626 | } | 626 | } |
@@ -781,6 +781,8 @@ static void run_breakpoint_test(int is_hw_breakpoint) | |||
781 | return; | 781 | return; |
782 | 782 | ||
783 | eprintk("kgdbts: ERROR %s test failed\n", ts.name); | 783 | eprintk("kgdbts: ERROR %s test failed\n", ts.name); |
784 | if (is_hw_breakpoint) | ||
785 | hwbreaks_ok = 0; | ||
784 | } | 786 | } |
785 | 787 | ||
786 | static void run_hw_break_test(int is_write_test) | 788 | static void run_hw_break_test(int is_write_test) |
@@ -798,9 +800,11 @@ static void run_hw_break_test(int is_write_test) | |||
798 | kgdb_breakpoint(); | 800 | kgdb_breakpoint(); |
799 | hw_break_val_access(); | 801 | hw_break_val_access(); |
800 | if (is_write_test) { | 802 | if (is_write_test) { |
801 | if (test_complete == 2) | 803 | if (test_complete == 2) { |
802 | eprintk("kgdbts: ERROR %s broke on access\n", | 804 | eprintk("kgdbts: ERROR %s broke on access\n", |
803 | ts.name); | 805 | ts.name); |
806 | hwbreaks_ok = 0; | ||
807 | } | ||
804 | hw_break_val_write(); | 808 | hw_break_val_write(); |
805 | } | 809 | } |
806 | kgdb_breakpoint(); | 810 | kgdb_breakpoint(); |
@@ -809,6 +813,7 @@ static void run_hw_break_test(int is_write_test) | |||
809 | return; | 813 | return; |
810 | 814 | ||
811 | eprintk("kgdbts: ERROR %s test failed\n", ts.name); | 815 | eprintk("kgdbts: ERROR %s test failed\n", ts.name); |
816 | hwbreaks_ok = 0; | ||
812 | } | 817 | } |
813 | 818 | ||
814 | static void run_nmi_sleep_test(int nmi_sleep) | 819 | static void run_nmi_sleep_test(int nmi_sleep) |
@@ -912,6 +917,7 @@ static void kgdbts_run_tests(void) | |||
912 | 917 | ||
913 | /* All HW break point tests */ | 918 | /* All HW break point tests */ |
914 | if (arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT) { | 919 | if (arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT) { |
920 | hwbreaks_ok = 1; | ||
915 | v1printk("kgdbts:RUN hw breakpoint test\n"); | 921 | v1printk("kgdbts:RUN hw breakpoint test\n"); |
916 | run_breakpoint_test(1); | 922 | run_breakpoint_test(1); |
917 | v1printk("kgdbts:RUN hw write breakpoint test\n"); | 923 | v1printk("kgdbts:RUN hw write breakpoint test\n"); |
@@ -925,6 +931,19 @@ static void kgdbts_run_tests(void) | |||
925 | run_nmi_sleep_test(nmi_sleep); | 931 | run_nmi_sleep_test(nmi_sleep); |
926 | } | 932 | } |
927 | 933 | ||
934 | #ifdef CONFIG_DEBUG_RODATA | ||
935 | /* Until there is an api to write to read-only text segments, use | ||
936 | * HW breakpoints for the remainder of any tests, else print a | ||
937 | * failure message if hw breakpoints do not work. | ||
938 | */ | ||
939 | if (!(arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT && hwbreaks_ok)) { | ||
940 | eprintk("kgdbts: HW breakpoints do not work," | ||
941 | "skipping remaining tests\n"); | ||
942 | return; | ||
943 | } | ||
944 | force_hwbrks = 1; | ||
945 | #endif /* CONFIG_DEBUG_RODATA */ | ||
946 | |||
928 | /* If the do_fork test is run it will be the last test that is | 947 | /* If the do_fork test is run it will be the last test that is |
929 | * executed because a kernel thread will be spawned at the very | 948 | * executed because a kernel thread will be spawned at the very |
930 | * end to unregister the debug hooks. | 949 | * end to unregister the debug hooks. |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 3f28f6eabdbf..b5969298f3d3 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1293,7 +1293,7 @@ static void tpacpi_input_send_radiosw(void) | |||
1293 | mutex_lock(&tpacpi_inputdev_send_mutex); | 1293 | mutex_lock(&tpacpi_inputdev_send_mutex); |
1294 | 1294 | ||
1295 | input_report_switch(tpacpi_inputdev, | 1295 | input_report_switch(tpacpi_inputdev, |
1296 | SW_RADIO, !!wlsw); | 1296 | SW_RFKILL_ALL, !!wlsw); |
1297 | input_sync(tpacpi_inputdev); | 1297 | input_sync(tpacpi_inputdev); |
1298 | 1298 | ||
1299 | mutex_unlock(&tpacpi_inputdev_send_mutex); | 1299 | mutex_unlock(&tpacpi_inputdev_send_mutex); |
@@ -1921,6 +1921,29 @@ static struct attribute *hotkey_mask_attributes[] __initdata = { | |||
1921 | &dev_attr_hotkey_wakeup_hotunplug_complete.attr, | 1921 | &dev_attr_hotkey_wakeup_hotunplug_complete.attr, |
1922 | }; | 1922 | }; |
1923 | 1923 | ||
1924 | static void hotkey_exit(void) | ||
1925 | { | ||
1926 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | ||
1927 | hotkey_poll_stop_sync(); | ||
1928 | #endif | ||
1929 | |||
1930 | if (hotkey_dev_attributes) | ||
1931 | delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj); | ||
1932 | |||
1933 | kfree(hotkey_keycode_map); | ||
1934 | |||
1935 | if (tp_features.hotkey) { | ||
1936 | dbg_printk(TPACPI_DBG_EXIT, | ||
1937 | "restoring original hot key mask\n"); | ||
1938 | /* no short-circuit boolean operator below! */ | ||
1939 | if ((hotkey_mask_set(hotkey_orig_mask) | | ||
1940 | hotkey_status_set(hotkey_orig_status)) != 0) | ||
1941 | printk(TPACPI_ERR | ||
1942 | "failed to restore hot key mask " | ||
1943 | "to BIOS defaults\n"); | ||
1944 | } | ||
1945 | } | ||
1946 | |||
1924 | static int __init hotkey_init(struct ibm_init_struct *iibm) | 1947 | static int __init hotkey_init(struct ibm_init_struct *iibm) |
1925 | { | 1948 | { |
1926 | /* Requirements for changing the default keymaps: | 1949 | /* Requirements for changing the default keymaps: |
@@ -2060,226 +2083,220 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
2060 | vdbg_printk(TPACPI_DBG_INIT, "hotkeys are %s\n", | 2083 | vdbg_printk(TPACPI_DBG_INIT, "hotkeys are %s\n", |
2061 | str_supported(tp_features.hotkey)); | 2084 | str_supported(tp_features.hotkey)); |
2062 | 2085 | ||
2063 | if (tp_features.hotkey) { | 2086 | if (!tp_features.hotkey) |
2064 | hotkey_dev_attributes = create_attr_set(13, NULL); | 2087 | return 1; |
2065 | if (!hotkey_dev_attributes) | ||
2066 | return -ENOMEM; | ||
2067 | res = add_many_to_attr_set(hotkey_dev_attributes, | ||
2068 | hotkey_attributes, | ||
2069 | ARRAY_SIZE(hotkey_attributes)); | ||
2070 | if (res) | ||
2071 | return res; | ||
2072 | 2088 | ||
2073 | /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, | 2089 | hotkey_dev_attributes = create_attr_set(13, NULL); |
2074 | A30, R30, R31, T20-22, X20-21, X22-24. Detected by checking | 2090 | if (!hotkey_dev_attributes) |
2075 | for HKEY interface version 0x100 */ | 2091 | return -ENOMEM; |
2076 | if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { | 2092 | res = add_many_to_attr_set(hotkey_dev_attributes, |
2077 | if ((hkeyv >> 8) != 1) { | 2093 | hotkey_attributes, |
2078 | printk(TPACPI_ERR "unknown version of the " | 2094 | ARRAY_SIZE(hotkey_attributes)); |
2079 | "HKEY interface: 0x%x\n", hkeyv); | 2095 | if (res) |
2080 | printk(TPACPI_ERR "please report this to %s\n", | 2096 | goto err_exit; |
2081 | TPACPI_MAIL); | 2097 | |
2082 | } else { | 2098 | /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, |
2083 | /* | 2099 | A30, R30, R31, T20-22, X20-21, X22-24. Detected by checking |
2084 | * MHKV 0x100 in A31, R40, R40e, | 2100 | for HKEY interface version 0x100 */ |
2085 | * T4x, X31, and later | 2101 | if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { |
2086 | */ | 2102 | if ((hkeyv >> 8) != 1) { |
2087 | tp_features.hotkey_mask = 1; | 2103 | printk(TPACPI_ERR "unknown version of the " |
2088 | } | 2104 | "HKEY interface: 0x%x\n", hkeyv); |
2105 | printk(TPACPI_ERR "please report this to %s\n", | ||
2106 | TPACPI_MAIL); | ||
2107 | } else { | ||
2108 | /* | ||
2109 | * MHKV 0x100 in A31, R40, R40e, | ||
2110 | * T4x, X31, and later | ||
2111 | */ | ||
2112 | tp_features.hotkey_mask = 1; | ||
2089 | } | 2113 | } |
2114 | } | ||
2090 | 2115 | ||
2091 | vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n", | 2116 | vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n", |
2092 | str_supported(tp_features.hotkey_mask)); | 2117 | str_supported(tp_features.hotkey_mask)); |
2093 | 2118 | ||
2094 | if (tp_features.hotkey_mask) { | 2119 | if (tp_features.hotkey_mask) { |
2095 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, | 2120 | if (!acpi_evalf(hkey_handle, &hotkey_all_mask, |
2096 | "MHKA", "qd")) { | 2121 | "MHKA", "qd")) { |
2097 | printk(TPACPI_ERR | 2122 | printk(TPACPI_ERR |
2098 | "missing MHKA handler, " | 2123 | "missing MHKA handler, " |
2099 | "please report this to %s\n", | 2124 | "please report this to %s\n", |
2100 | TPACPI_MAIL); | 2125 | TPACPI_MAIL); |
2101 | /* FN+F12, FN+F4, FN+F3 */ | 2126 | /* FN+F12, FN+F4, FN+F3 */ |
2102 | hotkey_all_mask = 0x080cU; | 2127 | hotkey_all_mask = 0x080cU; |
2103 | } | ||
2104 | } | 2128 | } |
2129 | } | ||
2105 | 2130 | ||
2106 | /* hotkey_source_mask *must* be zero for | 2131 | /* hotkey_source_mask *must* be zero for |
2107 | * the first hotkey_mask_get */ | 2132 | * the first hotkey_mask_get */ |
2108 | res = hotkey_status_get(&hotkey_orig_status); | 2133 | res = hotkey_status_get(&hotkey_orig_status); |
2109 | if (!res && tp_features.hotkey_mask) { | 2134 | if (res) |
2110 | res = hotkey_mask_get(); | 2135 | goto err_exit; |
2111 | hotkey_orig_mask = hotkey_mask; | 2136 | |
2112 | if (!res) { | 2137 | if (tp_features.hotkey_mask) { |
2113 | res = add_many_to_attr_set( | 2138 | res = hotkey_mask_get(); |
2114 | hotkey_dev_attributes, | 2139 | if (res) |
2115 | hotkey_mask_attributes, | 2140 | goto err_exit; |
2116 | ARRAY_SIZE(hotkey_mask_attributes)); | 2141 | |
2117 | } | 2142 | hotkey_orig_mask = hotkey_mask; |
2118 | } | 2143 | res = add_many_to_attr_set( |
2144 | hotkey_dev_attributes, | ||
2145 | hotkey_mask_attributes, | ||
2146 | ARRAY_SIZE(hotkey_mask_attributes)); | ||
2147 | if (res) | ||
2148 | goto err_exit; | ||
2149 | } | ||
2119 | 2150 | ||
2120 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | 2151 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL |
2121 | if (tp_features.hotkey_mask) { | 2152 | if (tp_features.hotkey_mask) { |
2122 | hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK | 2153 | hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK |
2123 | & ~hotkey_all_mask; | 2154 | & ~hotkey_all_mask; |
2124 | } else { | 2155 | } else { |
2125 | hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK; | 2156 | hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK; |
2126 | } | 2157 | } |
2127 | 2158 | ||
2128 | vdbg_printk(TPACPI_DBG_INIT, | 2159 | vdbg_printk(TPACPI_DBG_INIT, |
2129 | "hotkey source mask 0x%08x, polling freq %d\n", | 2160 | "hotkey source mask 0x%08x, polling freq %d\n", |
2130 | hotkey_source_mask, hotkey_poll_freq); | 2161 | hotkey_source_mask, hotkey_poll_freq); |
2131 | #endif | 2162 | #endif |
2132 | 2163 | ||
2133 | /* Not all thinkpads have a hardware radio switch */ | 2164 | /* Not all thinkpads have a hardware radio switch */ |
2134 | if (!res && acpi_evalf(hkey_handle, &status, "WLSW", "qd")) { | 2165 | if (acpi_evalf(hkey_handle, &status, "WLSW", "qd")) { |
2135 | tp_features.hotkey_wlsw = 1; | 2166 | tp_features.hotkey_wlsw = 1; |
2136 | printk(TPACPI_INFO | 2167 | printk(TPACPI_INFO |
2137 | "radio switch found; radios are %s\n", | 2168 | "radio switch found; radios are %s\n", |
2138 | enabled(status, 0)); | 2169 | enabled(status, 0)); |
2139 | res = add_to_attr_set(hotkey_dev_attributes, | 2170 | res = add_to_attr_set(hotkey_dev_attributes, |
2140 | &dev_attr_hotkey_radio_sw.attr); | 2171 | &dev_attr_hotkey_radio_sw.attr); |
2141 | } | 2172 | } |
2142 | 2173 | ||
2143 | /* For X41t, X60t, X61t Tablets... */ | 2174 | /* For X41t, X60t, X61t Tablets... */ |
2144 | if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) { | 2175 | if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) { |
2145 | tp_features.hotkey_tablet = 1; | 2176 | tp_features.hotkey_tablet = 1; |
2146 | printk(TPACPI_INFO | 2177 | printk(TPACPI_INFO |
2147 | "possible tablet mode switch found; " | 2178 | "possible tablet mode switch found; " |
2148 | "ThinkPad in %s mode\n", | 2179 | "ThinkPad in %s mode\n", |
2149 | (status & TP_HOTKEY_TABLET_MASK)? | 2180 | (status & TP_HOTKEY_TABLET_MASK)? |
2150 | "tablet" : "laptop"); | 2181 | "tablet" : "laptop"); |
2151 | res = add_to_attr_set(hotkey_dev_attributes, | 2182 | res = add_to_attr_set(hotkey_dev_attributes, |
2152 | &dev_attr_hotkey_tablet_mode.attr); | 2183 | &dev_attr_hotkey_tablet_mode.attr); |
2153 | } | 2184 | } |
2154 | 2185 | ||
2155 | if (!res) | 2186 | if (!res) |
2156 | res = register_attr_set_with_sysfs( | 2187 | res = register_attr_set_with_sysfs( |
2157 | hotkey_dev_attributes, | 2188 | hotkey_dev_attributes, |
2158 | &tpacpi_pdev->dev.kobj); | 2189 | &tpacpi_pdev->dev.kobj); |
2159 | if (res) | 2190 | if (res) |
2160 | return res; | 2191 | goto err_exit; |
2161 | 2192 | ||
2162 | /* Set up key map */ | 2193 | /* Set up key map */ |
2163 | 2194 | ||
2164 | hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE, | 2195 | hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE, |
2165 | GFP_KERNEL); | 2196 | GFP_KERNEL); |
2166 | if (!hotkey_keycode_map) { | 2197 | if (!hotkey_keycode_map) { |
2167 | printk(TPACPI_ERR | 2198 | printk(TPACPI_ERR |
2168 | "failed to allocate memory for key map\n"); | 2199 | "failed to allocate memory for key map\n"); |
2169 | return -ENOMEM; | 2200 | res = -ENOMEM; |
2170 | } | 2201 | goto err_exit; |
2202 | } | ||
2171 | 2203 | ||
2172 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) { | 2204 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) { |
2173 | dbg_printk(TPACPI_DBG_INIT, | 2205 | dbg_printk(TPACPI_DBG_INIT, |
2174 | "using Lenovo default hot key map\n"); | 2206 | "using Lenovo default hot key map\n"); |
2175 | memcpy(hotkey_keycode_map, &lenovo_keycode_map, | 2207 | memcpy(hotkey_keycode_map, &lenovo_keycode_map, |
2176 | TPACPI_HOTKEY_MAP_SIZE); | 2208 | TPACPI_HOTKEY_MAP_SIZE); |
2209 | } else { | ||
2210 | dbg_printk(TPACPI_DBG_INIT, | ||
2211 | "using IBM default hot key map\n"); | ||
2212 | memcpy(hotkey_keycode_map, &ibm_keycode_map, | ||
2213 | TPACPI_HOTKEY_MAP_SIZE); | ||
2214 | } | ||
2215 | |||
2216 | set_bit(EV_KEY, tpacpi_inputdev->evbit); | ||
2217 | set_bit(EV_MSC, tpacpi_inputdev->evbit); | ||
2218 | set_bit(MSC_SCAN, tpacpi_inputdev->mscbit); | ||
2219 | tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE; | ||
2220 | tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN; | ||
2221 | tpacpi_inputdev->keycode = hotkey_keycode_map; | ||
2222 | for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) { | ||
2223 | if (hotkey_keycode_map[i] != KEY_RESERVED) { | ||
2224 | set_bit(hotkey_keycode_map[i], | ||
2225 | tpacpi_inputdev->keybit); | ||
2177 | } else { | 2226 | } else { |
2178 | dbg_printk(TPACPI_DBG_INIT, | 2227 | if (i < sizeof(hotkey_reserved_mask)*8) |
2179 | "using IBM default hot key map\n"); | 2228 | hotkey_reserved_mask |= 1 << i; |
2180 | memcpy(hotkey_keycode_map, &ibm_keycode_map, | ||
2181 | TPACPI_HOTKEY_MAP_SIZE); | ||
2182 | } | ||
2183 | |||
2184 | set_bit(EV_KEY, tpacpi_inputdev->evbit); | ||
2185 | set_bit(EV_MSC, tpacpi_inputdev->evbit); | ||
2186 | set_bit(MSC_SCAN, tpacpi_inputdev->mscbit); | ||
2187 | tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE; | ||
2188 | tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN; | ||
2189 | tpacpi_inputdev->keycode = hotkey_keycode_map; | ||
2190 | for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) { | ||
2191 | if (hotkey_keycode_map[i] != KEY_RESERVED) { | ||
2192 | set_bit(hotkey_keycode_map[i], | ||
2193 | tpacpi_inputdev->keybit); | ||
2194 | } else { | ||
2195 | if (i < sizeof(hotkey_reserved_mask)*8) | ||
2196 | hotkey_reserved_mask |= 1 << i; | ||
2197 | } | ||
2198 | } | ||
2199 | |||
2200 | if (tp_features.hotkey_wlsw) { | ||
2201 | set_bit(EV_SW, tpacpi_inputdev->evbit); | ||
2202 | set_bit(SW_RADIO, tpacpi_inputdev->swbit); | ||
2203 | } | ||
2204 | if (tp_features.hotkey_tablet) { | ||
2205 | set_bit(EV_SW, tpacpi_inputdev->evbit); | ||
2206 | set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit); | ||
2207 | } | 2229 | } |
2230 | } | ||
2208 | 2231 | ||
2209 | /* Do not issue duplicate brightness change events to | 2232 | if (tp_features.hotkey_wlsw) { |
2210 | * userspace */ | 2233 | set_bit(EV_SW, tpacpi_inputdev->evbit); |
2211 | if (!tp_features.bright_acpimode) | 2234 | set_bit(SW_RFKILL_ALL, tpacpi_inputdev->swbit); |
2212 | /* update bright_acpimode... */ | 2235 | } |
2213 | tpacpi_check_std_acpi_brightness_support(); | 2236 | if (tp_features.hotkey_tablet) { |
2214 | 2237 | set_bit(EV_SW, tpacpi_inputdev->evbit); | |
2215 | if (tp_features.bright_acpimode) { | 2238 | set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit); |
2216 | printk(TPACPI_INFO | 2239 | } |
2217 | "This ThinkPad has standard ACPI backlight " | ||
2218 | "brightness control, supported by the ACPI " | ||
2219 | "video driver\n"); | ||
2220 | printk(TPACPI_NOTICE | ||
2221 | "Disabling thinkpad-acpi brightness events " | ||
2222 | "by default...\n"); | ||
2223 | |||
2224 | /* The hotkey_reserved_mask change below is not | ||
2225 | * necessary while the keys are at KEY_RESERVED in the | ||
2226 | * default map, but better safe than sorry, leave it | ||
2227 | * here as a marker of what we have to do, especially | ||
2228 | * when we finally become able to set this at runtime | ||
2229 | * on response to X.org requests */ | ||
2230 | hotkey_reserved_mask |= | ||
2231 | (1 << TP_ACPI_HOTKEYSCAN_FNHOME) | ||
2232 | | (1 << TP_ACPI_HOTKEYSCAN_FNEND); | ||
2233 | } | ||
2234 | 2240 | ||
2235 | dbg_printk(TPACPI_DBG_INIT, | 2241 | /* Do not issue duplicate brightness change events to |
2236 | "enabling hot key handling\n"); | 2242 | * userspace */ |
2237 | res = hotkey_status_set(1); | 2243 | if (!tp_features.bright_acpimode) |
2238 | if (res) | 2244 | /* update bright_acpimode... */ |
2239 | return res; | 2245 | tpacpi_check_std_acpi_brightness_support(); |
2240 | res = hotkey_mask_set(((hotkey_all_mask | hotkey_source_mask) | ||
2241 | & ~hotkey_reserved_mask) | ||
2242 | | hotkey_orig_mask); | ||
2243 | if (res < 0 && res != -ENXIO) | ||
2244 | return res; | ||
2245 | 2246 | ||
2246 | dbg_printk(TPACPI_DBG_INIT, | 2247 | if (tp_features.bright_acpimode) { |
2247 | "legacy hot key reporting over procfs %s\n", | 2248 | printk(TPACPI_INFO |
2248 | (hotkey_report_mode < 2) ? | 2249 | "This ThinkPad has standard ACPI backlight " |
2249 | "enabled" : "disabled"); | 2250 | "brightness control, supported by the ACPI " |
2251 | "video driver\n"); | ||
2252 | printk(TPACPI_NOTICE | ||
2253 | "Disabling thinkpad-acpi brightness events " | ||
2254 | "by default...\n"); | ||
2255 | |||
2256 | /* The hotkey_reserved_mask change below is not | ||
2257 | * necessary while the keys are at KEY_RESERVED in the | ||
2258 | * default map, but better safe than sorry, leave it | ||
2259 | * here as a marker of what we have to do, especially | ||
2260 | * when we finally become able to set this at runtime | ||
2261 | * on response to X.org requests */ | ||
2262 | hotkey_reserved_mask |= | ||
2263 | (1 << TP_ACPI_HOTKEYSCAN_FNHOME) | ||
2264 | | (1 << TP_ACPI_HOTKEYSCAN_FNEND); | ||
2265 | } | ||
2266 | |||
2267 | dbg_printk(TPACPI_DBG_INIT, "enabling hot key handling\n"); | ||
2268 | res = hotkey_status_set(1); | ||
2269 | if (res) { | ||
2270 | hotkey_exit(); | ||
2271 | return res; | ||
2272 | } | ||
2273 | res = hotkey_mask_set(((hotkey_all_mask | hotkey_source_mask) | ||
2274 | & ~hotkey_reserved_mask) | ||
2275 | | hotkey_orig_mask); | ||
2276 | if (res < 0 && res != -ENXIO) { | ||
2277 | hotkey_exit(); | ||
2278 | return res; | ||
2279 | } | ||
2250 | 2280 | ||
2251 | tpacpi_inputdev->open = &hotkey_inputdev_open; | 2281 | dbg_printk(TPACPI_DBG_INIT, |
2252 | tpacpi_inputdev->close = &hotkey_inputdev_close; | 2282 | "legacy hot key reporting over procfs %s\n", |
2283 | (hotkey_report_mode < 2) ? | ||
2284 | "enabled" : "disabled"); | ||
2253 | 2285 | ||
2254 | hotkey_poll_setup_safe(1); | 2286 | tpacpi_inputdev->open = &hotkey_inputdev_open; |
2255 | tpacpi_input_send_radiosw(); | 2287 | tpacpi_inputdev->close = &hotkey_inputdev_close; |
2256 | tpacpi_input_send_tabletsw(); | ||
2257 | } | ||
2258 | 2288 | ||
2259 | return (tp_features.hotkey)? 0 : 1; | 2289 | hotkey_poll_setup_safe(1); |
2260 | } | 2290 | tpacpi_input_send_radiosw(); |
2291 | tpacpi_input_send_tabletsw(); | ||
2261 | 2292 | ||
2262 | static void hotkey_exit(void) | 2293 | return 0; |
2263 | { | ||
2264 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | ||
2265 | hotkey_poll_stop_sync(); | ||
2266 | #endif | ||
2267 | 2294 | ||
2268 | if (tp_features.hotkey) { | 2295 | err_exit: |
2269 | dbg_printk(TPACPI_DBG_EXIT, | 2296 | delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj); |
2270 | "restoring original hot key mask\n"); | 2297 | hotkey_dev_attributes = NULL; |
2271 | /* no short-circuit boolean operator below! */ | ||
2272 | if ((hotkey_mask_set(hotkey_orig_mask) | | ||
2273 | hotkey_status_set(hotkey_orig_status)) != 0) | ||
2274 | printk(TPACPI_ERR | ||
2275 | "failed to restore hot key mask " | ||
2276 | "to BIOS defaults\n"); | ||
2277 | } | ||
2278 | 2298 | ||
2279 | if (hotkey_dev_attributes) { | 2299 | return (res < 0)? res : 1; |
2280 | delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj); | ||
2281 | hotkey_dev_attributes = NULL; | ||
2282 | } | ||
2283 | } | 2300 | } |
2284 | 2301 | ||
2285 | static void hotkey_notify(struct ibm_struct *ibm, u32 event) | 2302 | static void hotkey_notify(struct ibm_struct *ibm, u32 event) |
@@ -3319,7 +3336,7 @@ static struct tpacpi_led_classdev tpacpi_led_thinklight = { | |||
3319 | 3336 | ||
3320 | static int __init light_init(struct ibm_init_struct *iibm) | 3337 | static int __init light_init(struct ibm_init_struct *iibm) |
3321 | { | 3338 | { |
3322 | int rc = 0; | 3339 | int rc; |
3323 | 3340 | ||
3324 | vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n"); | 3341 | vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n"); |
3325 | 3342 | ||
@@ -3337,20 +3354,23 @@ static int __init light_init(struct ibm_init_struct *iibm) | |||
3337 | tp_features.light_status = | 3354 | tp_features.light_status = |
3338 | acpi_evalf(ec_handle, NULL, "KBLT", "qv"); | 3355 | acpi_evalf(ec_handle, NULL, "KBLT", "qv"); |
3339 | 3356 | ||
3340 | vdbg_printk(TPACPI_DBG_INIT, "light is %s\n", | 3357 | vdbg_printk(TPACPI_DBG_INIT, "light is %s, light status is %s\n", |
3341 | str_supported(tp_features.light)); | 3358 | str_supported(tp_features.light), |
3359 | str_supported(tp_features.light_status)); | ||
3342 | 3360 | ||
3343 | if (tp_features.light) { | 3361 | if (!tp_features.light) |
3344 | rc = led_classdev_register(&tpacpi_pdev->dev, | 3362 | return 1; |
3345 | &tpacpi_led_thinklight.led_classdev); | 3363 | |
3346 | } | 3364 | rc = led_classdev_register(&tpacpi_pdev->dev, |
3365 | &tpacpi_led_thinklight.led_classdev); | ||
3347 | 3366 | ||
3348 | if (rc < 0) { | 3367 | if (rc < 0) { |
3349 | tp_features.light = 0; | 3368 | tp_features.light = 0; |
3350 | tp_features.light_status = 0; | 3369 | tp_features.light_status = 0; |
3351 | } else { | 3370 | } else { |
3352 | rc = (tp_features.light)? 0 : 1; | 3371 | rc = 0; |
3353 | } | 3372 | } |
3373 | |||
3354 | return rc; | 3374 | return rc; |
3355 | } | 3375 | } |
3356 | 3376 | ||
@@ -3821,7 +3841,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */ | |||
3821 | #define TPACPI_LED_NUMLEDS 8 | 3841 | #define TPACPI_LED_NUMLEDS 8 |
3822 | static struct tpacpi_led_classdev *tpacpi_leds; | 3842 | static struct tpacpi_led_classdev *tpacpi_leds; |
3823 | static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; | 3843 | static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; |
3824 | static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { | 3844 | static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = { |
3825 | /* there's a limit of 19 chars + NULL before 2.6.26 */ | 3845 | /* there's a limit of 19 chars + NULL before 2.6.26 */ |
3826 | "tpacpi::power", | 3846 | "tpacpi::power", |
3827 | "tpacpi:orange:batt", | 3847 | "tpacpi:orange:batt", |
@@ -3833,7 +3853,7 @@ static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { | |||
3833 | "tpacpi::standby", | 3853 | "tpacpi::standby", |
3834 | }; | 3854 | }; |
3835 | 3855 | ||
3836 | static int led_get_status(unsigned int led) | 3856 | static int led_get_status(const unsigned int led) |
3837 | { | 3857 | { |
3838 | int status; | 3858 | int status; |
3839 | enum led_status_t led_s; | 3859 | enum led_status_t led_s; |
@@ -3857,41 +3877,42 @@ static int led_get_status(unsigned int led) | |||
3857 | /* not reached */ | 3877 | /* not reached */ |
3858 | } | 3878 | } |
3859 | 3879 | ||
3860 | static int led_set_status(unsigned int led, enum led_status_t ledstatus) | 3880 | static int led_set_status(const unsigned int led, |
3881 | const enum led_status_t ledstatus) | ||
3861 | { | 3882 | { |
3862 | /* off, on, blink. Index is led_status_t */ | 3883 | /* off, on, blink. Index is led_status_t */ |
3863 | static const int const led_sled_arg1[] = { 0, 1, 3 }; | 3884 | static const unsigned int led_sled_arg1[] = { 0, 1, 3 }; |
3864 | static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ | 3885 | static const unsigned int led_led_arg1[] = { 0, 0x80, 0xc0 }; |
3865 | static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ | ||
3866 | static const int const led_led_arg1[] = { 0, 0x80, 0xc0 }; | ||
3867 | 3886 | ||
3868 | int rc = 0; | 3887 | int rc = 0; |
3869 | 3888 | ||
3870 | switch (led_supported) { | 3889 | switch (led_supported) { |
3871 | case TPACPI_LED_570: | 3890 | case TPACPI_LED_570: |
3872 | /* 570 */ | 3891 | /* 570 */ |
3873 | led = 1 << led; | 3892 | if (led > 7) |
3874 | if (!acpi_evalf(led_handle, NULL, NULL, "vdd", | 3893 | return -EINVAL; |
3875 | led, led_sled_arg1[ledstatus])) | 3894 | if (!acpi_evalf(led_handle, NULL, NULL, "vdd", |
3876 | rc = -EIO; | 3895 | (1 << led), led_sled_arg1[ledstatus])) |
3877 | break; | 3896 | rc = -EIO; |
3897 | break; | ||
3878 | case TPACPI_LED_OLD: | 3898 | case TPACPI_LED_OLD: |
3879 | /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */ | 3899 | /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */ |
3880 | led = 1 << led; | 3900 | if (led > 7) |
3881 | rc = ec_write(TPACPI_LED_EC_HLMS, led); | 3901 | return -EINVAL; |
3882 | if (rc >= 0) | 3902 | rc = ec_write(TPACPI_LED_EC_HLMS, (1 << led)); |
3883 | rc = ec_write(TPACPI_LED_EC_HLBL, | 3903 | if (rc >= 0) |
3884 | led * led_exp_hlbl[ledstatus]); | 3904 | rc = ec_write(TPACPI_LED_EC_HLBL, |
3885 | if (rc >= 0) | 3905 | (ledstatus == TPACPI_LED_BLINK) << led); |
3886 | rc = ec_write(TPACPI_LED_EC_HLCL, | 3906 | if (rc >= 0) |
3887 | led * led_exp_hlcl[ledstatus]); | 3907 | rc = ec_write(TPACPI_LED_EC_HLCL, |
3888 | break; | 3908 | (ledstatus != TPACPI_LED_OFF) << led); |
3909 | break; | ||
3889 | case TPACPI_LED_NEW: | 3910 | case TPACPI_LED_NEW: |
3890 | /* all others */ | 3911 | /* all others */ |
3891 | if (!acpi_evalf(led_handle, NULL, NULL, "vdd", | 3912 | if (!acpi_evalf(led_handle, NULL, NULL, "vdd", |
3892 | led, led_led_arg1[ledstatus])) | 3913 | led, led_led_arg1[ledstatus])) |
3893 | rc = -EIO; | 3914 | rc = -EIO; |
3894 | break; | 3915 | break; |
3895 | default: | 3916 | default: |
3896 | rc = -ENXIO; | 3917 | rc = -ENXIO; |
3897 | } | 3918 | } |
@@ -3978,7 +3999,6 @@ static void led_exit(void) | |||
3978 | } | 3999 | } |
3979 | 4000 | ||
3980 | kfree(tpacpi_leds); | 4001 | kfree(tpacpi_leds); |
3981 | tpacpi_leds = NULL; | ||
3982 | } | 4002 | } |
3983 | 4003 | ||
3984 | static int __init led_init(struct ibm_init_struct *iibm) | 4004 | static int __init led_init(struct ibm_init_struct *iibm) |
@@ -4802,7 +4822,6 @@ static void brightness_exit(void) | |||
4802 | vdbg_printk(TPACPI_DBG_EXIT, | 4822 | vdbg_printk(TPACPI_DBG_EXIT, |
4803 | "calling backlight_device_unregister()\n"); | 4823 | "calling backlight_device_unregister()\n"); |
4804 | backlight_device_unregister(ibm_backlight_device); | 4824 | backlight_device_unregister(ibm_backlight_device); |
4805 | ibm_backlight_device = NULL; | ||
4806 | } | 4825 | } |
4807 | } | 4826 | } |
4808 | 4827 | ||
@@ -5764,11 +5783,16 @@ static int __init fan_init(struct ibm_init_struct *iibm) | |||
5764 | fan_control_access_mode != TPACPI_FAN_WR_NONE) { | 5783 | fan_control_access_mode != TPACPI_FAN_WR_NONE) { |
5765 | rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj, | 5784 | rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj, |
5766 | &fan_attr_group); | 5785 | &fan_attr_group); |
5767 | if (!(rc < 0)) | ||
5768 | rc = driver_create_file(&tpacpi_hwmon_pdriver.driver, | ||
5769 | &driver_attr_fan_watchdog); | ||
5770 | if (rc < 0) | 5786 | if (rc < 0) |
5771 | return rc; | 5787 | return rc; |
5788 | |||
5789 | rc = driver_create_file(&tpacpi_hwmon_pdriver.driver, | ||
5790 | &driver_attr_fan_watchdog); | ||
5791 | if (rc < 0) { | ||
5792 | sysfs_remove_group(&tpacpi_sensors_pdev->dev.kobj, | ||
5793 | &fan_attr_group); | ||
5794 | return rc; | ||
5795 | } | ||
5772 | return 0; | 5796 | return 0; |
5773 | } else | 5797 | } else |
5774 | return 1; | 5798 | return 1; |
diff --git a/drivers/mmc/card/Kconfig b/drivers/mmc/card/Kconfig index aa8a4e461942..dd0f398ee2f5 100644 --- a/drivers/mmc/card/Kconfig +++ b/drivers/mmc/card/Kconfig | |||
@@ -39,3 +39,15 @@ config SDIO_UART | |||
39 | SDIO function driver for SDIO cards that implements the UART | 39 | SDIO function driver for SDIO cards that implements the UART |
40 | class, as well as the GPS class which appears like a UART. | 40 | class, as well as the GPS class which appears like a UART. |
41 | 41 | ||
42 | config MMC_TEST | ||
43 | tristate "MMC host test driver" | ||
44 | default n | ||
45 | help | ||
46 | Development driver that performs a series of reads and writes | ||
47 | to a memory card in order to expose certain well known bugs | ||
48 | in host controllers. The tests are executed by writing to the | ||
49 | "test" file in sysfs under each card. Note that whatever is | ||
50 | on your card will be overwritten by these tests. | ||
51 | |||
52 | This driver is only of interest to those developing or | ||
53 | testing a host driver. Most people should say N here. | ||
diff --git a/drivers/mmc/card/Makefile b/drivers/mmc/card/Makefile index fc5a784cfa1a..0d407514f67d 100644 --- a/drivers/mmc/card/Makefile +++ b/drivers/mmc/card/Makefile | |||
@@ -8,6 +8,7 @@ endif | |||
8 | 8 | ||
9 | obj-$(CONFIG_MMC_BLOCK) += mmc_block.o | 9 | obj-$(CONFIG_MMC_BLOCK) += mmc_block.o |
10 | mmc_block-objs := block.o queue.o | 10 | mmc_block-objs := block.o queue.o |
11 | obj-$(CONFIG_MMC_TEST) += mmc_test.o | ||
11 | 12 | ||
12 | obj-$(CONFIG_SDIO_UART) += sdio_uart.o | 13 | obj-$(CONFIG_SDIO_UART) += sdio_uart.o |
13 | 14 | ||
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 91ded3e82401..f9ad960d7c1a 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #define MMC_SHIFT 3 | 46 | #define MMC_SHIFT 3 |
47 | #define MMC_NUM_MINORS (256 >> MMC_SHIFT) | 47 | #define MMC_NUM_MINORS (256 >> MMC_SHIFT) |
48 | 48 | ||
49 | static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; | 49 | static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS); |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * There is one mmc_blk_data per slot. | 52 | * There is one mmc_blk_data per slot. |
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c new file mode 100644 index 000000000000..ffadee549a41 --- /dev/null +++ b/drivers/mmc/card/mmc_test.c | |||
@@ -0,0 +1,892 @@ | |||
1 | /* | ||
2 | * linux/drivers/mmc/card/mmc_test.c | ||
3 | * | ||
4 | * Copyright 2007 Pierre Ossman | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/mmc/core.h> | ||
13 | #include <linux/mmc/card.h> | ||
14 | #include <linux/mmc/host.h> | ||
15 | #include <linux/mmc/mmc.h> | ||
16 | |||
17 | #include <linux/scatterlist.h> | ||
18 | |||
19 | #define RESULT_OK 0 | ||
20 | #define RESULT_FAIL 1 | ||
21 | #define RESULT_UNSUP_HOST 2 | ||
22 | #define RESULT_UNSUP_CARD 3 | ||
23 | |||
24 | #define BUFFER_SIZE (PAGE_SIZE * 4) | ||
25 | |||
26 | struct mmc_test_card { | ||
27 | struct mmc_card *card; | ||
28 | |||
29 | u8 *buffer; | ||
30 | }; | ||
31 | |||
32 | /*******************************************************************/ | ||
33 | /* Helper functions */ | ||
34 | /*******************************************************************/ | ||
35 | |||
36 | static int mmc_test_set_blksize(struct mmc_test_card *test, unsigned size) | ||
37 | { | ||
38 | struct mmc_command cmd; | ||
39 | int ret; | ||
40 | |||
41 | cmd.opcode = MMC_SET_BLOCKLEN; | ||
42 | cmd.arg = size; | ||
43 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; | ||
44 | ret = mmc_wait_for_cmd(test->card->host, &cmd, 0); | ||
45 | if (ret) | ||
46 | return ret; | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static int __mmc_test_transfer(struct mmc_test_card *test, int write, | ||
52 | unsigned broken_xfer, u8 *buffer, unsigned addr, | ||
53 | unsigned blocks, unsigned blksz) | ||
54 | { | ||
55 | int ret, busy; | ||
56 | |||
57 | struct mmc_request mrq; | ||
58 | struct mmc_command cmd; | ||
59 | struct mmc_command stop; | ||
60 | struct mmc_data data; | ||
61 | |||
62 | struct scatterlist sg; | ||
63 | |||
64 | memset(&mrq, 0, sizeof(struct mmc_request)); | ||
65 | |||
66 | mrq.cmd = &cmd; | ||
67 | mrq.data = &data; | ||
68 | |||
69 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
70 | |||
71 | if (broken_xfer) { | ||
72 | if (blocks > 1) { | ||
73 | cmd.opcode = write ? | ||
74 | MMC_WRITE_BLOCK : MMC_READ_SINGLE_BLOCK; | ||
75 | } else { | ||
76 | cmd.opcode = MMC_SEND_STATUS; | ||
77 | } | ||
78 | } else { | ||
79 | if (blocks > 1) { | ||
80 | cmd.opcode = write ? | ||
81 | MMC_WRITE_MULTIPLE_BLOCK : MMC_READ_MULTIPLE_BLOCK; | ||
82 | } else { | ||
83 | cmd.opcode = write ? | ||
84 | MMC_WRITE_BLOCK : MMC_READ_SINGLE_BLOCK; | ||
85 | } | ||
86 | } | ||
87 | |||
88 | if (broken_xfer && blocks == 1) | ||
89 | cmd.arg = test->card->rca << 16; | ||
90 | else | ||
91 | cmd.arg = addr; | ||
92 | cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; | ||
93 | |||
94 | memset(&stop, 0, sizeof(struct mmc_command)); | ||
95 | |||
96 | if (!broken_xfer && (blocks > 1)) { | ||
97 | stop.opcode = MMC_STOP_TRANSMISSION; | ||
98 | stop.arg = 0; | ||
99 | stop.flags = MMC_RSP_R1B | MMC_CMD_AC; | ||
100 | |||
101 | mrq.stop = &stop; | ||
102 | } | ||
103 | |||
104 | memset(&data, 0, sizeof(struct mmc_data)); | ||
105 | |||
106 | data.blksz = blksz; | ||
107 | data.blocks = blocks; | ||
108 | data.flags = write ? MMC_DATA_WRITE : MMC_DATA_READ; | ||
109 | data.sg = &sg; | ||
110 | data.sg_len = 1; | ||
111 | |||
112 | sg_init_one(&sg, buffer, blocks * blksz); | ||
113 | |||
114 | mmc_set_data_timeout(&data, test->card); | ||
115 | |||
116 | mmc_wait_for_req(test->card->host, &mrq); | ||
117 | |||
118 | ret = 0; | ||
119 | |||
120 | if (broken_xfer) { | ||
121 | if (!ret && cmd.error) | ||
122 | ret = cmd.error; | ||
123 | if (!ret && data.error == 0) | ||
124 | ret = RESULT_FAIL; | ||
125 | if (!ret && data.error != -ETIMEDOUT) | ||
126 | ret = data.error; | ||
127 | if (!ret && stop.error) | ||
128 | ret = stop.error; | ||
129 | if (blocks > 1) { | ||
130 | if (!ret && data.bytes_xfered > blksz) | ||
131 | ret = RESULT_FAIL; | ||
132 | } else { | ||
133 | if (!ret && data.bytes_xfered > 0) | ||
134 | ret = RESULT_FAIL; | ||
135 | } | ||
136 | } else { | ||
137 | if (!ret && cmd.error) | ||
138 | ret = cmd.error; | ||
139 | if (!ret && data.error) | ||
140 | ret = data.error; | ||
141 | if (!ret && stop.error) | ||
142 | ret = stop.error; | ||
143 | if (!ret && data.bytes_xfered != blocks * blksz) | ||
144 | ret = RESULT_FAIL; | ||
145 | } | ||
146 | |||
147 | if (ret == -EINVAL) | ||
148 | ret = RESULT_UNSUP_HOST; | ||
149 | |||
150 | busy = 0; | ||
151 | do { | ||
152 | int ret2; | ||
153 | |||
154 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
155 | |||
156 | cmd.opcode = MMC_SEND_STATUS; | ||
157 | cmd.arg = test->card->rca << 16; | ||
158 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; | ||
159 | |||
160 | ret2 = mmc_wait_for_cmd(test->card->host, &cmd, 0); | ||
161 | if (ret2) | ||
162 | break; | ||
163 | |||
164 | if (!busy && !(cmd.resp[0] & R1_READY_FOR_DATA)) { | ||
165 | busy = 1; | ||
166 | printk(KERN_INFO "%s: Warning: Host did not " | ||
167 | "wait for busy state to end.\n", | ||
168 | mmc_hostname(test->card->host)); | ||
169 | } | ||
170 | } while (!(cmd.resp[0] & R1_READY_FOR_DATA)); | ||
171 | |||
172 | return ret; | ||
173 | } | ||
174 | |||
175 | static int mmc_test_transfer(struct mmc_test_card *test, int write, | ||
176 | u8 *buffer, unsigned addr, unsigned blocks, unsigned blksz) | ||
177 | { | ||
178 | return __mmc_test_transfer(test, write, 0, buffer, | ||
179 | addr, blocks, blksz); | ||
180 | } | ||
181 | |||
182 | static int mmc_test_prepare_verify(struct mmc_test_card *test, int write) | ||
183 | { | ||
184 | int ret, i; | ||
185 | |||
186 | ret = mmc_test_set_blksize(test, 512); | ||
187 | if (ret) | ||
188 | return ret; | ||
189 | |||
190 | if (write) | ||
191 | memset(test->buffer, 0xDF, BUFFER_SIZE); | ||
192 | else { | ||
193 | for (i = 0;i < BUFFER_SIZE;i++) | ||
194 | test->buffer[i] = i; | ||
195 | } | ||
196 | |||
197 | for (i = 0;i < BUFFER_SIZE / 512;i++) { | ||
198 | ret = mmc_test_transfer(test, 1, test->buffer + i * 512, | ||
199 | i * 512, 1, 512); | ||
200 | if (ret) | ||
201 | return ret; | ||
202 | } | ||
203 | |||
204 | return 0; | ||
205 | } | ||
206 | |||
207 | static int mmc_test_prepare_verify_write(struct mmc_test_card *test) | ||
208 | { | ||
209 | return mmc_test_prepare_verify(test, 1); | ||
210 | } | ||
211 | |||
212 | static int mmc_test_prepare_verify_read(struct mmc_test_card *test) | ||
213 | { | ||
214 | return mmc_test_prepare_verify(test, 0); | ||
215 | } | ||
216 | |||
217 | static int mmc_test_verified_transfer(struct mmc_test_card *test, int write, | ||
218 | u8 *buffer, unsigned addr, unsigned blocks, unsigned blksz) | ||
219 | { | ||
220 | int ret, i, sectors; | ||
221 | |||
222 | /* | ||
223 | * It is assumed that the above preparation has been done. | ||
224 | */ | ||
225 | |||
226 | memset(test->buffer, 0, BUFFER_SIZE); | ||
227 | |||
228 | if (write) { | ||
229 | for (i = 0;i < blocks * blksz;i++) | ||
230 | buffer[i] = i; | ||
231 | } | ||
232 | |||
233 | ret = mmc_test_set_blksize(test, blksz); | ||
234 | if (ret) | ||
235 | return ret; | ||
236 | |||
237 | ret = mmc_test_transfer(test, write, buffer, addr, blocks, blksz); | ||
238 | if (ret) | ||
239 | return ret; | ||
240 | |||
241 | if (write) { | ||
242 | ret = mmc_test_set_blksize(test, 512); | ||
243 | if (ret) | ||
244 | return ret; | ||
245 | |||
246 | sectors = (blocks * blksz + 511) / 512; | ||
247 | if ((sectors * 512) == (blocks * blksz)) | ||
248 | sectors++; | ||
249 | |||
250 | if ((sectors * 512) > BUFFER_SIZE) | ||
251 | return -EINVAL; | ||
252 | |||
253 | memset(test->buffer, 0, sectors * 512); | ||
254 | |||
255 | for (i = 0;i < sectors;i++) { | ||
256 | ret = mmc_test_transfer(test, 0, | ||
257 | test->buffer + i * 512, | ||
258 | addr + i * 512, 1, 512); | ||
259 | if (ret) | ||
260 | return ret; | ||
261 | } | ||
262 | |||
263 | for (i = 0;i < blocks * blksz;i++) { | ||
264 | if (test->buffer[i] != (u8)i) | ||
265 | return RESULT_FAIL; | ||
266 | } | ||
267 | |||
268 | for (;i < sectors * 512;i++) { | ||
269 | if (test->buffer[i] != 0xDF) | ||
270 | return RESULT_FAIL; | ||
271 | } | ||
272 | } else { | ||
273 | for (i = 0;i < blocks * blksz;i++) { | ||
274 | if (buffer[i] != (u8)i) | ||
275 | return RESULT_FAIL; | ||
276 | } | ||
277 | } | ||
278 | |||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | static int mmc_test_cleanup_verify(struct mmc_test_card *test) | ||
283 | { | ||
284 | int ret, i; | ||
285 | |||
286 | ret = mmc_test_set_blksize(test, 512); | ||
287 | if (ret) | ||
288 | return ret; | ||
289 | |||
290 | memset(test->buffer, 0, BUFFER_SIZE); | ||
291 | |||
292 | for (i = 0;i < BUFFER_SIZE / 512;i++) { | ||
293 | ret = mmc_test_transfer(test, 1, test->buffer + i * 512, | ||
294 | i * 512, 1, 512); | ||
295 | if (ret) | ||
296 | return ret; | ||
297 | } | ||
298 | |||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | /*******************************************************************/ | ||
303 | /* Tests */ | ||
304 | /*******************************************************************/ | ||
305 | |||
306 | struct mmc_test_case { | ||
307 | const char *name; | ||
308 | |||
309 | int (*prepare)(struct mmc_test_card *); | ||
310 | int (*run)(struct mmc_test_card *); | ||
311 | int (*cleanup)(struct mmc_test_card *); | ||
312 | }; | ||
313 | |||
314 | static int mmc_test_basic_write(struct mmc_test_card *test) | ||
315 | { | ||
316 | int ret; | ||
317 | |||
318 | ret = mmc_test_set_blksize(test, 512); | ||
319 | if (ret) | ||
320 | return ret; | ||
321 | |||
322 | ret = mmc_test_transfer(test, 1, test->buffer, 0, 1, 512); | ||
323 | if (ret) | ||
324 | return ret; | ||
325 | |||
326 | return 0; | ||
327 | } | ||
328 | |||
329 | static int mmc_test_basic_read(struct mmc_test_card *test) | ||
330 | { | ||
331 | int ret; | ||
332 | |||
333 | ret = mmc_test_set_blksize(test, 512); | ||
334 | if (ret) | ||
335 | return ret; | ||
336 | |||
337 | ret = mmc_test_transfer(test, 0, test->buffer, 0, 1, 512); | ||
338 | if (ret) | ||
339 | return ret; | ||
340 | |||
341 | return 0; | ||
342 | } | ||
343 | |||
344 | static int mmc_test_verify_write(struct mmc_test_card *test) | ||
345 | { | ||
346 | int ret; | ||
347 | |||
348 | ret = mmc_test_verified_transfer(test, 1, test->buffer, 0, 1, 512); | ||
349 | if (ret) | ||
350 | return ret; | ||
351 | |||
352 | return 0; | ||
353 | } | ||
354 | |||
355 | static int mmc_test_verify_read(struct mmc_test_card *test) | ||
356 | { | ||
357 | int ret; | ||
358 | |||
359 | ret = mmc_test_verified_transfer(test, 0, test->buffer, 0, 1, 512); | ||
360 | if (ret) | ||
361 | return ret; | ||
362 | |||
363 | return 0; | ||
364 | } | ||
365 | |||
366 | static int mmc_test_multi_write(struct mmc_test_card *test) | ||
367 | { | ||
368 | int ret; | ||
369 | unsigned int size; | ||
370 | |||
371 | if (test->card->host->max_blk_count == 1) | ||
372 | return RESULT_UNSUP_HOST; | ||
373 | |||
374 | size = PAGE_SIZE * 2; | ||
375 | size = min(size, test->card->host->max_req_size); | ||
376 | size = min(size, test->card->host->max_seg_size); | ||
377 | size = min(size, test->card->host->max_blk_count * 512); | ||
378 | |||
379 | if (size < 1024) | ||
380 | return RESULT_UNSUP_HOST; | ||
381 | |||
382 | ret = mmc_test_verified_transfer(test, 1, test->buffer, 0, | ||
383 | size / 512, 512); | ||
384 | if (ret) | ||
385 | return ret; | ||
386 | |||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | static int mmc_test_multi_read(struct mmc_test_card *test) | ||
391 | { | ||
392 | int ret; | ||
393 | unsigned int size; | ||
394 | |||
395 | if (test->card->host->max_blk_count == 1) | ||
396 | return RESULT_UNSUP_HOST; | ||
397 | |||
398 | size = PAGE_SIZE * 2; | ||
399 | size = min(size, test->card->host->max_req_size); | ||
400 | size = min(size, test->card->host->max_seg_size); | ||
401 | size = min(size, test->card->host->max_blk_count * 512); | ||
402 | |||
403 | if (size < 1024) | ||
404 | return RESULT_UNSUP_HOST; | ||
405 | |||
406 | ret = mmc_test_verified_transfer(test, 0, test->buffer, 0, | ||
407 | size / 512, 512); | ||
408 | if (ret) | ||
409 | return ret; | ||
410 | |||
411 | return 0; | ||
412 | } | ||
413 | |||
414 | static int mmc_test_pow2_write(struct mmc_test_card *test) | ||
415 | { | ||
416 | int ret, i; | ||
417 | |||
418 | if (!test->card->csd.write_partial) | ||
419 | return RESULT_UNSUP_CARD; | ||
420 | |||
421 | for (i = 1; i < 512;i <<= 1) { | ||
422 | ret = mmc_test_verified_transfer(test, 1, | ||
423 | test->buffer, 0, 1, i); | ||
424 | if (ret) | ||
425 | return ret; | ||
426 | } | ||
427 | |||
428 | return 0; | ||
429 | } | ||
430 | |||
431 | static int mmc_test_pow2_read(struct mmc_test_card *test) | ||
432 | { | ||
433 | int ret, i; | ||
434 | |||
435 | if (!test->card->csd.read_partial) | ||
436 | return RESULT_UNSUP_CARD; | ||
437 | |||
438 | for (i = 1; i < 512;i <<= 1) { | ||
439 | ret = mmc_test_verified_transfer(test, 0, | ||
440 | test->buffer, 0, 1, i); | ||
441 | if (ret) | ||
442 | return ret; | ||
443 | } | ||
444 | |||
445 | return 0; | ||
446 | } | ||
447 | |||
448 | static int mmc_test_weird_write(struct mmc_test_card *test) | ||
449 | { | ||
450 | int ret, i; | ||
451 | |||
452 | if (!test->card->csd.write_partial) | ||
453 | return RESULT_UNSUP_CARD; | ||
454 | |||
455 | for (i = 3; i < 512;i += 7) { | ||
456 | ret = mmc_test_verified_transfer(test, 1, | ||
457 | test->buffer, 0, 1, i); | ||
458 | if (ret) | ||
459 | return ret; | ||
460 | } | ||
461 | |||
462 | return 0; | ||
463 | } | ||
464 | |||
465 | static int mmc_test_weird_read(struct mmc_test_card *test) | ||
466 | { | ||
467 | int ret, i; | ||
468 | |||
469 | if (!test->card->csd.read_partial) | ||
470 | return RESULT_UNSUP_CARD; | ||
471 | |||
472 | for (i = 3; i < 512;i += 7) { | ||
473 | ret = mmc_test_verified_transfer(test, 0, | ||
474 | test->buffer, 0, 1, i); | ||
475 | if (ret) | ||
476 | return ret; | ||
477 | } | ||
478 | |||
479 | return 0; | ||
480 | } | ||
481 | |||
482 | static int mmc_test_align_write(struct mmc_test_card *test) | ||
483 | { | ||
484 | int ret, i; | ||
485 | |||
486 | for (i = 1;i < 4;i++) { | ||
487 | ret = mmc_test_verified_transfer(test, 1, test->buffer + i, | ||
488 | 0, 1, 512); | ||
489 | if (ret) | ||
490 | return ret; | ||
491 | } | ||
492 | |||
493 | return 0; | ||
494 | } | ||
495 | |||
496 | static int mmc_test_align_read(struct mmc_test_card *test) | ||
497 | { | ||
498 | int ret, i; | ||
499 | |||
500 | for (i = 1;i < 4;i++) { | ||
501 | ret = mmc_test_verified_transfer(test, 0, test->buffer + i, | ||
502 | 0, 1, 512); | ||
503 | if (ret) | ||
504 | return ret; | ||
505 | } | ||
506 | |||
507 | return 0; | ||
508 | } | ||
509 | |||
510 | static int mmc_test_align_multi_write(struct mmc_test_card *test) | ||
511 | { | ||
512 | int ret, i; | ||
513 | unsigned int size; | ||
514 | |||
515 | if (test->card->host->max_blk_count == 1) | ||
516 | return RESULT_UNSUP_HOST; | ||
517 | |||
518 | size = PAGE_SIZE * 2; | ||
519 | size = min(size, test->card->host->max_req_size); | ||
520 | size = min(size, test->card->host->max_seg_size); | ||
521 | size = min(size, test->card->host->max_blk_count * 512); | ||
522 | |||
523 | if (size < 1024) | ||
524 | return RESULT_UNSUP_HOST; | ||
525 | |||
526 | for (i = 1;i < 4;i++) { | ||
527 | ret = mmc_test_verified_transfer(test, 1, test->buffer + i, | ||
528 | 0, size / 512, 512); | ||
529 | if (ret) | ||
530 | return ret; | ||
531 | } | ||
532 | |||
533 | return 0; | ||
534 | } | ||
535 | |||
536 | static int mmc_test_align_multi_read(struct mmc_test_card *test) | ||
537 | { | ||
538 | int ret, i; | ||
539 | unsigned int size; | ||
540 | |||
541 | if (test->card->host->max_blk_count == 1) | ||
542 | return RESULT_UNSUP_HOST; | ||
543 | |||
544 | size = PAGE_SIZE * 2; | ||
545 | size = min(size, test->card->host->max_req_size); | ||
546 | size = min(size, test->card->host->max_seg_size); | ||
547 | size = min(size, test->card->host->max_blk_count * 512); | ||
548 | |||
549 | if (size < 1024) | ||
550 | return RESULT_UNSUP_HOST; | ||
551 | |||
552 | for (i = 1;i < 4;i++) { | ||
553 | ret = mmc_test_verified_transfer(test, 0, test->buffer + i, | ||
554 | 0, size / 512, 512); | ||
555 | if (ret) | ||
556 | return ret; | ||
557 | } | ||
558 | |||
559 | return 0; | ||
560 | } | ||
561 | |||
562 | static int mmc_test_xfersize_write(struct mmc_test_card *test) | ||
563 | { | ||
564 | int ret; | ||
565 | |||
566 | ret = mmc_test_set_blksize(test, 512); | ||
567 | if (ret) | ||
568 | return ret; | ||
569 | |||
570 | ret = __mmc_test_transfer(test, 1, 1, test->buffer, 0, 1, 512); | ||
571 | if (ret) | ||
572 | return ret; | ||
573 | |||
574 | return 0; | ||
575 | } | ||
576 | |||
577 | static int mmc_test_xfersize_read(struct mmc_test_card *test) | ||
578 | { | ||
579 | int ret; | ||
580 | |||
581 | ret = mmc_test_set_blksize(test, 512); | ||
582 | if (ret) | ||
583 | return ret; | ||
584 | |||
585 | ret = __mmc_test_transfer(test, 0, 1, test->buffer, 0, 1, 512); | ||
586 | if (ret) | ||
587 | return ret; | ||
588 | |||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | static int mmc_test_multi_xfersize_write(struct mmc_test_card *test) | ||
593 | { | ||
594 | int ret; | ||
595 | |||
596 | if (test->card->host->max_blk_count == 1) | ||
597 | return RESULT_UNSUP_HOST; | ||
598 | |||
599 | ret = mmc_test_set_blksize(test, 512); | ||
600 | if (ret) | ||
601 | return ret; | ||
602 | |||
603 | ret = __mmc_test_transfer(test, 1, 1, test->buffer, 0, 2, 512); | ||
604 | if (ret) | ||
605 | return ret; | ||
606 | |||
607 | return 0; | ||
608 | } | ||
609 | |||
610 | static int mmc_test_multi_xfersize_read(struct mmc_test_card *test) | ||
611 | { | ||
612 | int ret; | ||
613 | |||
614 | if (test->card->host->max_blk_count == 1) | ||
615 | return RESULT_UNSUP_HOST; | ||
616 | |||
617 | ret = mmc_test_set_blksize(test, 512); | ||
618 | if (ret) | ||
619 | return ret; | ||
620 | |||
621 | ret = __mmc_test_transfer(test, 0, 1, test->buffer, 0, 2, 512); | ||
622 | if (ret) | ||
623 | return ret; | ||
624 | |||
625 | return 0; | ||
626 | } | ||
627 | |||
628 | static const struct mmc_test_case mmc_test_cases[] = { | ||
629 | { | ||
630 | .name = "Basic write (no data verification)", | ||
631 | .run = mmc_test_basic_write, | ||
632 | }, | ||
633 | |||
634 | { | ||
635 | .name = "Basic read (no data verification)", | ||
636 | .run = mmc_test_basic_read, | ||
637 | }, | ||
638 | |||
639 | { | ||
640 | .name = "Basic write (with data verification)", | ||
641 | .prepare = mmc_test_prepare_verify_write, | ||
642 | .run = mmc_test_verify_write, | ||
643 | .cleanup = mmc_test_cleanup_verify, | ||
644 | }, | ||
645 | |||
646 | { | ||
647 | .name = "Basic read (with data verification)", | ||
648 | .prepare = mmc_test_prepare_verify_read, | ||
649 | .run = mmc_test_verify_read, | ||
650 | .cleanup = mmc_test_cleanup_verify, | ||
651 | }, | ||
652 | |||
653 | { | ||
654 | .name = "Multi-block write", | ||
655 | .prepare = mmc_test_prepare_verify_write, | ||
656 | .run = mmc_test_multi_write, | ||
657 | .cleanup = mmc_test_cleanup_verify, | ||
658 | }, | ||
659 | |||
660 | { | ||
661 | .name = "Multi-block read", | ||
662 | .prepare = mmc_test_prepare_verify_read, | ||
663 | .run = mmc_test_multi_read, | ||
664 | .cleanup = mmc_test_cleanup_verify, | ||
665 | }, | ||
666 | |||
667 | { | ||
668 | .name = "Power of two block writes", | ||
669 | .prepare = mmc_test_prepare_verify_write, | ||
670 | .run = mmc_test_pow2_write, | ||
671 | .cleanup = mmc_test_cleanup_verify, | ||
672 | }, | ||
673 | |||
674 | { | ||
675 | .name = "Power of two block reads", | ||
676 | .prepare = mmc_test_prepare_verify_read, | ||
677 | .run = mmc_test_pow2_read, | ||
678 | .cleanup = mmc_test_cleanup_verify, | ||
679 | }, | ||
680 | |||
681 | { | ||
682 | .name = "Weird sized block writes", | ||
683 | .prepare = mmc_test_prepare_verify_write, | ||
684 | .run = mmc_test_weird_write, | ||
685 | .cleanup = mmc_test_cleanup_verify, | ||
686 | }, | ||
687 | |||
688 | { | ||
689 | .name = "Weird sized block reads", | ||
690 | .prepare = mmc_test_prepare_verify_read, | ||
691 | .run = mmc_test_weird_read, | ||
692 | .cleanup = mmc_test_cleanup_verify, | ||
693 | }, | ||
694 | |||
695 | { | ||
696 | .name = "Badly aligned write", | ||
697 | .prepare = mmc_test_prepare_verify_write, | ||
698 | .run = mmc_test_align_write, | ||
699 | .cleanup = mmc_test_cleanup_verify, | ||
700 | }, | ||
701 | |||
702 | { | ||
703 | .name = "Badly aligned read", | ||
704 | .prepare = mmc_test_prepare_verify_read, | ||
705 | .run = mmc_test_align_read, | ||
706 | .cleanup = mmc_test_cleanup_verify, | ||
707 | }, | ||
708 | |||
709 | { | ||
710 | .name = "Badly aligned multi-block write", | ||
711 | .prepare = mmc_test_prepare_verify_write, | ||
712 | .run = mmc_test_align_multi_write, | ||
713 | .cleanup = mmc_test_cleanup_verify, | ||
714 | }, | ||
715 | |||
716 | { | ||
717 | .name = "Badly aligned multi-block read", | ||
718 | .prepare = mmc_test_prepare_verify_read, | ||
719 | .run = mmc_test_align_multi_read, | ||
720 | .cleanup = mmc_test_cleanup_verify, | ||
721 | }, | ||
722 | |||
723 | { | ||
724 | .name = "Correct xfer_size at write (start failure)", | ||
725 | .run = mmc_test_xfersize_write, | ||
726 | }, | ||
727 | |||
728 | { | ||
729 | .name = "Correct xfer_size at read (start failure)", | ||
730 | .run = mmc_test_xfersize_read, | ||
731 | }, | ||
732 | |||
733 | { | ||
734 | .name = "Correct xfer_size at write (midway failure)", | ||
735 | .run = mmc_test_multi_xfersize_write, | ||
736 | }, | ||
737 | |||
738 | { | ||
739 | .name = "Correct xfer_size at read (midway failure)", | ||
740 | .run = mmc_test_multi_xfersize_read, | ||
741 | }, | ||
742 | }; | ||
743 | |||
744 | static struct mutex mmc_test_lock; | ||
745 | |||
746 | static void mmc_test_run(struct mmc_test_card *test) | ||
747 | { | ||
748 | int i, ret; | ||
749 | |||
750 | printk(KERN_INFO "%s: Starting tests of card %s...\n", | ||
751 | mmc_hostname(test->card->host), mmc_card_id(test->card)); | ||
752 | |||
753 | mmc_claim_host(test->card->host); | ||
754 | |||
755 | for (i = 0;i < ARRAY_SIZE(mmc_test_cases);i++) { | ||
756 | printk(KERN_INFO "%s: Test case %d. %s...\n", | ||
757 | mmc_hostname(test->card->host), i + 1, | ||
758 | mmc_test_cases[i].name); | ||
759 | |||
760 | if (mmc_test_cases[i].prepare) { | ||
761 | ret = mmc_test_cases[i].prepare(test); | ||
762 | if (ret) { | ||
763 | printk(KERN_INFO "%s: Result: Prepare " | ||
764 | "stage failed! (%d)\n", | ||
765 | mmc_hostname(test->card->host), | ||
766 | ret); | ||
767 | continue; | ||
768 | } | ||
769 | } | ||
770 | |||
771 | ret = mmc_test_cases[i].run(test); | ||
772 | switch (ret) { | ||
773 | case RESULT_OK: | ||
774 | printk(KERN_INFO "%s: Result: OK\n", | ||
775 | mmc_hostname(test->card->host)); | ||
776 | break; | ||
777 | case RESULT_FAIL: | ||
778 | printk(KERN_INFO "%s: Result: FAILED\n", | ||
779 | mmc_hostname(test->card->host)); | ||
780 | break; | ||
781 | case RESULT_UNSUP_HOST: | ||
782 | printk(KERN_INFO "%s: Result: UNSUPPORTED " | ||
783 | "(by host)\n", | ||
784 | mmc_hostname(test->card->host)); | ||
785 | break; | ||
786 | case RESULT_UNSUP_CARD: | ||
787 | printk(KERN_INFO "%s: Result: UNSUPPORTED " | ||
788 | "(by card)\n", | ||
789 | mmc_hostname(test->card->host)); | ||
790 | break; | ||
791 | default: | ||
792 | printk(KERN_INFO "%s: Result: ERROR (%d)\n", | ||
793 | mmc_hostname(test->card->host), ret); | ||
794 | } | ||
795 | |||
796 | if (mmc_test_cases[i].cleanup) { | ||
797 | ret = mmc_test_cases[i].cleanup(test); | ||
798 | if (ret) { | ||
799 | printk(KERN_INFO "%s: Warning: Cleanup " | ||
800 | "stage failed! (%d)\n", | ||
801 | mmc_hostname(test->card->host), | ||
802 | ret); | ||
803 | } | ||
804 | } | ||
805 | } | ||
806 | |||
807 | mmc_release_host(test->card->host); | ||
808 | |||
809 | printk(KERN_INFO "%s: Tests completed.\n", | ||
810 | mmc_hostname(test->card->host)); | ||
811 | } | ||
812 | |||
813 | static ssize_t mmc_test_show(struct device *dev, | ||
814 | struct device_attribute *attr, char *buf) | ||
815 | { | ||
816 | mutex_lock(&mmc_test_lock); | ||
817 | mutex_unlock(&mmc_test_lock); | ||
818 | |||
819 | return 0; | ||
820 | } | ||
821 | |||
822 | static ssize_t mmc_test_store(struct device *dev, | ||
823 | struct device_attribute *attr, const char *buf, size_t count) | ||
824 | { | ||
825 | struct mmc_card *card; | ||
826 | struct mmc_test_card *test; | ||
827 | |||
828 | card = container_of(dev, struct mmc_card, dev); | ||
829 | |||
830 | test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL); | ||
831 | if (!test) | ||
832 | return -ENOMEM; | ||
833 | |||
834 | test->card = card; | ||
835 | |||
836 | test->buffer = kzalloc(BUFFER_SIZE, GFP_KERNEL); | ||
837 | if (test->buffer) { | ||
838 | mutex_lock(&mmc_test_lock); | ||
839 | mmc_test_run(test); | ||
840 | mutex_unlock(&mmc_test_lock); | ||
841 | } | ||
842 | |||
843 | kfree(test->buffer); | ||
844 | kfree(test); | ||
845 | |||
846 | return count; | ||
847 | } | ||
848 | |||
849 | static DEVICE_ATTR(test, S_IWUSR | S_IRUGO, mmc_test_show, mmc_test_store); | ||
850 | |||
851 | static int mmc_test_probe(struct mmc_card *card) | ||
852 | { | ||
853 | int ret; | ||
854 | |||
855 | mutex_init(&mmc_test_lock); | ||
856 | |||
857 | ret = device_create_file(&card->dev, &dev_attr_test); | ||
858 | if (ret) | ||
859 | return ret; | ||
860 | |||
861 | return 0; | ||
862 | } | ||
863 | |||
864 | static void mmc_test_remove(struct mmc_card *card) | ||
865 | { | ||
866 | device_remove_file(&card->dev, &dev_attr_test); | ||
867 | } | ||
868 | |||
869 | static struct mmc_driver mmc_driver = { | ||
870 | .drv = { | ||
871 | .name = "mmc_test", | ||
872 | }, | ||
873 | .probe = mmc_test_probe, | ||
874 | .remove = mmc_test_remove, | ||
875 | }; | ||
876 | |||
877 | static int __init mmc_test_init(void) | ||
878 | { | ||
879 | return mmc_register_driver(&mmc_driver); | ||
880 | } | ||
881 | |||
882 | static void __exit mmc_test_exit(void) | ||
883 | { | ||
884 | mmc_unregister_driver(&mmc_driver); | ||
885 | } | ||
886 | |||
887 | module_init(mmc_test_init); | ||
888 | module_exit(mmc_test_exit); | ||
889 | |||
890 | MODULE_LICENSE("GPL"); | ||
891 | MODULE_DESCRIPTION("Multimedia Card (MMC) host test driver"); | ||
892 | MODULE_AUTHOR("Pierre Ossman"); | ||
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 3b3cd0e74715..dead61754ad7 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig | |||
@@ -119,7 +119,7 @@ config MMC_TIFM_SD | |||
119 | 119 | ||
120 | config MMC_SPI | 120 | config MMC_SPI |
121 | tristate "MMC/SD over SPI" | 121 | tristate "MMC/SD over SPI" |
122 | depends on MMC && SPI_MASTER && !HIGHMEM | 122 | depends on MMC && SPI_MASTER && !HIGHMEM && HAS_DMA |
123 | select CRC7 | 123 | select CRC7 |
124 | select CRC_ITU_T | 124 | select CRC_ITU_T |
125 | help | 125 | help |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index a28fc2f68ce2..8979ad330a4d 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -663,9 +663,12 @@ static void at91_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
663 | gpio_set_value(host->board->vcc_pin, 0); | 663 | gpio_set_value(host->board->vcc_pin, 0); |
664 | break; | 664 | break; |
665 | case MMC_POWER_UP: | 665 | case MMC_POWER_UP: |
666 | case MMC_POWER_ON: | ||
667 | gpio_set_value(host->board->vcc_pin, 1); | 666 | gpio_set_value(host->board->vcc_pin, 1); |
668 | break; | 667 | break; |
668 | case MMC_POWER_ON: | ||
669 | break; | ||
670 | default: | ||
671 | WARN_ON(1); | ||
669 | } | 672 | } |
670 | } | 673 | } |
671 | } | 674 | } |
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 14759e9f42ad..549517c35675 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1003,7 +1003,7 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data) | |||
1003 | 1003 | ||
1004 | static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data *data) | 1004 | static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data *data) |
1005 | { | 1005 | { |
1006 | const char *dev_name; | 1006 | const char *dma_dev_name; |
1007 | int sync_dev, dma_ch, is_read, r; | 1007 | int sync_dev, dma_ch, is_read, r; |
1008 | 1008 | ||
1009 | is_read = !(data->flags & MMC_DATA_WRITE); | 1009 | is_read = !(data->flags & MMC_DATA_WRITE); |
@@ -1018,21 +1018,21 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data | |||
1018 | if (is_read) { | 1018 | if (is_read) { |
1019 | if (host->id == 1) { | 1019 | if (host->id == 1) { |
1020 | sync_dev = OMAP_DMA_MMC_RX; | 1020 | sync_dev = OMAP_DMA_MMC_RX; |
1021 | dev_name = "MMC1 read"; | 1021 | dma_dev_name = "MMC1 read"; |
1022 | } else { | 1022 | } else { |
1023 | sync_dev = OMAP_DMA_MMC2_RX; | 1023 | sync_dev = OMAP_DMA_MMC2_RX; |
1024 | dev_name = "MMC2 read"; | 1024 | dma_dev_name = "MMC2 read"; |
1025 | } | 1025 | } |
1026 | } else { | 1026 | } else { |
1027 | if (host->id == 1) { | 1027 | if (host->id == 1) { |
1028 | sync_dev = OMAP_DMA_MMC_TX; | 1028 | sync_dev = OMAP_DMA_MMC_TX; |
1029 | dev_name = "MMC1 write"; | 1029 | dma_dev_name = "MMC1 write"; |
1030 | } else { | 1030 | } else { |
1031 | sync_dev = OMAP_DMA_MMC2_TX; | 1031 | sync_dev = OMAP_DMA_MMC2_TX; |
1032 | dev_name = "MMC2 write"; | 1032 | dma_dev_name = "MMC2 write"; |
1033 | } | 1033 | } |
1034 | } | 1034 | } |
1035 | r = omap_request_dma(sync_dev, dev_name, mmc_omap_dma_cb, | 1035 | r = omap_request_dma(sync_dev, dma_dev_name, mmc_omap_dma_cb, |
1036 | host, &dma_ch); | 1036 | host, &dma_ch); |
1037 | if (r != 0) { | 1037 | if (r != 0) { |
1038 | dev_dbg(mmc_dev(host->mmc), "omap_request_dma() failed with %d\n", r); | 1038 | dev_dbg(mmc_dev(host->mmc), "omap_request_dma() failed with %d\n", r); |
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index be624a049c67..c303e7f57ab4 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
@@ -1457,17 +1457,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
1457 | int ret; | 1457 | int ret; |
1458 | 1458 | ||
1459 | /* | 1459 | /* |
1460 | * Allocate interrupt. | 1460 | * Set up tasklets. Must be done before requesting interrupt. |
1461 | */ | ||
1462 | |||
1463 | ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); | ||
1464 | if (ret) | ||
1465 | return ret; | ||
1466 | |||
1467 | host->irq = irq; | ||
1468 | |||
1469 | /* | ||
1470 | * Set up tasklets. | ||
1471 | */ | 1461 | */ |
1472 | tasklet_init(&host->card_tasklet, wbsd_tasklet_card, | 1462 | tasklet_init(&host->card_tasklet, wbsd_tasklet_card, |
1473 | (unsigned long)host); | 1463 | (unsigned long)host); |
@@ -1480,6 +1470,15 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq) | |||
1480 | tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, | 1470 | tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, |
1481 | (unsigned long)host); | 1471 | (unsigned long)host); |
1482 | 1472 | ||
1473 | /* | ||
1474 | * Allocate interrupt. | ||
1475 | */ | ||
1476 | ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host); | ||
1477 | if (ret) | ||
1478 | return ret; | ||
1479 | |||
1480 | host->irq = irq; | ||
1481 | |||
1483 | return 0; | 1482 | return 0; |
1484 | } | 1483 | } |
1485 | 1484 | ||
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 25efd331ef28..b402269301f6 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -346,8 +346,10 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len, | |||
346 | mutex_lock(&flash->lock); | 346 | mutex_lock(&flash->lock); |
347 | 347 | ||
348 | /* Wait until finished previous write command. */ | 348 | /* Wait until finished previous write command. */ |
349 | if (wait_till_ready(flash)) | 349 | if (wait_till_ready(flash)) { |
350 | mutex_unlock(&flash->lock); | ||
350 | return 1; | 351 | return 1; |
352 | } | ||
351 | 353 | ||
352 | write_enable(flash); | 354 | write_enable(flash); |
353 | 355 | ||
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c index 59d8fb49270a..effaf7cdefab 100644 --- a/drivers/mtd/maps/ck804xrom.c +++ b/drivers/mtd/maps/ck804xrom.c | |||
@@ -331,15 +331,15 @@ static void __devexit ck804xrom_remove_one (struct pci_dev *pdev) | |||
331 | } | 331 | } |
332 | 332 | ||
333 | static struct pci_device_id ck804xrom_pci_tbl[] = { | 333 | static struct pci_device_id ck804xrom_pci_tbl[] = { |
334 | { PCI_VENDOR_ID_NVIDIA, 0x0051, PCI_ANY_ID, PCI_ANY_ID, DEV_CK804 }, | 334 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0051), .driver_data = DEV_CK804 }, |
335 | { PCI_VENDOR_ID_NVIDIA, 0x0360, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 335 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0360), .driver_data = DEV_MCP55 }, |
336 | { PCI_VENDOR_ID_NVIDIA, 0x0361, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 336 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0361), .driver_data = DEV_MCP55 }, |
337 | { PCI_VENDOR_ID_NVIDIA, 0x0362, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 337 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0362), .driver_data = DEV_MCP55 }, |
338 | { PCI_VENDOR_ID_NVIDIA, 0x0363, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 338 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0363), .driver_data = DEV_MCP55 }, |
339 | { PCI_VENDOR_ID_NVIDIA, 0x0364, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 339 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0364), .driver_data = DEV_MCP55 }, |
340 | { PCI_VENDOR_ID_NVIDIA, 0x0365, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 340 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0365), .driver_data = DEV_MCP55 }, |
341 | { PCI_VENDOR_ID_NVIDIA, 0x0366, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 341 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0366), .driver_data = DEV_MCP55 }, |
342 | { PCI_VENDOR_ID_NVIDIA, 0x0367, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, | 342 | { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0367), .driver_data = DEV_MCP55 }, |
343 | { 0, } | 343 | { 0, } |
344 | }; | 344 | }; |
345 | 345 | ||
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index 240b0e2d095d..c12d8056bebd 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c | |||
@@ -110,7 +110,7 @@ static int __init omapflash_probe(struct platform_device *pdev) | |||
110 | err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); | 110 | err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); |
111 | if (err > 0) | 111 | if (err > 0) |
112 | add_mtd_partitions(info->mtd, info->parts, err); | 112 | add_mtd_partitions(info->mtd, info->parts, err); |
113 | else if (err < 0 && pdata->parts) | 113 | else if (err <= 0 && pdata->parts) |
114 | add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); | 114 | add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); |
115 | else | 115 | else |
116 | #endif | 116 | #endif |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index fceb468ccdec..fe2bc7e42119 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1216,7 +1216,7 @@ static int pxa3xx_nand_resume(struct platform_device *pdev) | |||
1216 | 1216 | ||
1217 | clk_enable(info->clk); | 1217 | clk_enable(info->clk); |
1218 | 1218 | ||
1219 | return pxa3xx_nand_config_flash(info); | 1219 | return pxa3xx_nand_config_flash(info, info->flash_info); |
1220 | } | 1220 | } |
1221 | #else | 1221 | #else |
1222 | #define pxa3xx_nand_suspend NULL | 1222 | #define pxa3xx_nand_suspend NULL |
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 3d44d040a47d..ad81ab8e95e2 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c | |||
@@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev) | |||
76 | err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); | 76 | err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); |
77 | if (err > 0) | 77 | if (err > 0) |
78 | add_mtd_partitions(&info->mtd, info->parts, err); | 78 | add_mtd_partitions(&info->mtd, info->parts, err); |
79 | else if (err < 0 && pdata->parts) | 79 | else if (err <= 0 && pdata->parts) |
80 | add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); | 80 | add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); |
81 | else | 81 | else |
82 | #endif | 82 | #endif |
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 47474903263c..c5030f94f04e 100644 --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c | |||
@@ -295,5 +295,5 @@ module_init(redboot_parser_init); | |||
295 | module_exit(redboot_parser_exit); | 295 | module_exit(redboot_parser_exit); |
296 | 296 | ||
297 | MODULE_LICENSE("GPL"); | 297 | MODULE_LICENSE("GPL"); |
298 | MODULE_AUTHOR("Red Hat, Inc. - David Woodhouse <dwmw2@cambridge.redhat.com>"); | 298 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); |
299 | MODULE_DESCRIPTION("Parsing code for RedBoot Flash Image System (FIS) tables"); | 299 | MODULE_DESCRIPTION("Parsing code for RedBoot Flash Image System (FIS) tables"); |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index e6c545fe5f58..b9d097c9f6bb 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -413,7 +413,7 @@ static int __devinit el3_pnp_probe(struct pnp_dev *pdev, | |||
413 | { | 413 | { |
414 | short i; | 414 | short i; |
415 | int ioaddr, irq, if_port; | 415 | int ioaddr, irq, if_port; |
416 | u16 phys_addr[3]; | 416 | __be16 phys_addr[3]; |
417 | struct net_device *dev = NULL; | 417 | struct net_device *dev = NULL; |
418 | int err; | 418 | int err; |
419 | 419 | ||
@@ -605,7 +605,7 @@ static int __init el3_mca_probe(struct device *device) | |||
605 | 605 | ||
606 | short i; | 606 | short i; |
607 | int ioaddr, irq, if_port; | 607 | int ioaddr, irq, if_port; |
608 | u16 phys_addr[3]; | 608 | __be16 phys_addr[3]; |
609 | struct net_device *dev = NULL; | 609 | struct net_device *dev = NULL; |
610 | u_char pos4, pos5; | 610 | u_char pos4, pos5; |
611 | struct mca_device *mdev = to_mca_device(device); | 611 | struct mca_device *mdev = to_mca_device(device); |
@@ -635,14 +635,13 @@ static int __init el3_mca_probe(struct device *device) | |||
635 | printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); | 635 | printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); |
636 | } | 636 | } |
637 | EL3WINDOW(0); | 637 | EL3WINDOW(0); |
638 | for (i = 0; i < 3; i++) { | 638 | for (i = 0; i < 3; i++) |
639 | phys_addr[i] = htons(read_eeprom(ioaddr, i)); | 639 | phys_addr[i] = htons(read_eeprom(ioaddr, i)); |
640 | } | ||
641 | 640 | ||
642 | dev = alloc_etherdev(sizeof (struct el3_private)); | 641 | dev = alloc_etherdev(sizeof (struct el3_private)); |
643 | if (dev == NULL) { | 642 | if (dev == NULL) { |
644 | release_region(ioaddr, EL3_IO_EXTENT); | 643 | release_region(ioaddr, EL3_IO_EXTENT); |
645 | return -ENOMEM; | 644 | return -ENOMEM; |
646 | } | 645 | } |
647 | 646 | ||
648 | netdev_boot_setup_check(dev); | 647 | netdev_boot_setup_check(dev); |
@@ -668,7 +667,7 @@ static int __init el3_eisa_probe (struct device *device) | |||
668 | { | 667 | { |
669 | short i; | 668 | short i; |
670 | int ioaddr, irq, if_port; | 669 | int ioaddr, irq, if_port; |
671 | u16 phys_addr[3]; | 670 | __be16 phys_addr[3]; |
672 | struct net_device *dev = NULL; | 671 | struct net_device *dev = NULL; |
673 | struct eisa_device *edev; | 672 | struct eisa_device *edev; |
674 | int err; | 673 | int err; |
@@ -1063,7 +1062,6 @@ el3_rx(struct net_device *dev) | |||
1063 | struct sk_buff *skb; | 1062 | struct sk_buff *skb; |
1064 | 1063 | ||
1065 | skb = dev_alloc_skb(pkt_len+5); | 1064 | skb = dev_alloc_skb(pkt_len+5); |
1066 | dev->stats.rx_bytes += pkt_len; | ||
1067 | if (el3_debug > 4) | 1065 | if (el3_debug > 4) |
1068 | printk("Receiving packet size %d status %4.4x.\n", | 1066 | printk("Receiving packet size %d status %4.4x.\n", |
1069 | pkt_len, rx_status); | 1067 | pkt_len, rx_status); |
@@ -1078,6 +1076,7 @@ el3_rx(struct net_device *dev) | |||
1078 | skb->protocol = eth_type_trans(skb,dev); | 1076 | skb->protocol = eth_type_trans(skb,dev); |
1079 | netif_rx(skb); | 1077 | netif_rx(skb); |
1080 | dev->last_rx = jiffies; | 1078 | dev->last_rx = jiffies; |
1079 | dev->stats.rx_bytes += pkt_len; | ||
1081 | dev->stats.rx_packets++; | 1080 | dev->stats.rx_packets++; |
1082 | continue; | 1081 | continue; |
1083 | } | 1082 | } |
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index 750a46f4bc58..ad6b8a5b6574 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -506,6 +506,7 @@ int lance_open (struct net_device *dev) | |||
506 | 506 | ||
507 | return res; | 507 | return res; |
508 | } | 508 | } |
509 | EXPORT_SYMBOL_GPL(lance_open); | ||
509 | 510 | ||
510 | int lance_close (struct net_device *dev) | 511 | int lance_close (struct net_device *dev) |
511 | { | 512 | { |
@@ -521,6 +522,7 @@ int lance_close (struct net_device *dev) | |||
521 | 522 | ||
522 | return 0; | 523 | return 0; |
523 | } | 524 | } |
525 | EXPORT_SYMBOL_GPL(lance_close); | ||
524 | 526 | ||
525 | void lance_tx_timeout(struct net_device *dev) | 527 | void lance_tx_timeout(struct net_device *dev) |
526 | { | 528 | { |
@@ -529,7 +531,7 @@ void lance_tx_timeout(struct net_device *dev) | |||
529 | dev->trans_start = jiffies; | 531 | dev->trans_start = jiffies; |
530 | netif_wake_queue (dev); | 532 | netif_wake_queue (dev); |
531 | } | 533 | } |
532 | 534 | EXPORT_SYMBOL_GPL(lance_tx_timeout); | |
533 | 535 | ||
534 | int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | 536 | int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) |
535 | { | 537 | { |
@@ -586,6 +588,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
586 | 588 | ||
587 | return 0; | 589 | return 0; |
588 | } | 590 | } |
591 | EXPORT_SYMBOL_GPL(lance_start_xmit); | ||
589 | 592 | ||
590 | /* taken from the depca driver via a2065.c */ | 593 | /* taken from the depca driver via a2065.c */ |
591 | static void lance_load_multicast (struct net_device *dev) | 594 | static void lance_load_multicast (struct net_device *dev) |
@@ -654,6 +657,7 @@ void lance_set_multicast (struct net_device *dev) | |||
654 | if (!stopped) | 657 | if (!stopped) |
655 | netif_start_queue (dev); | 658 | netif_start_queue (dev); |
656 | } | 659 | } |
660 | EXPORT_SYMBOL_GPL(lance_set_multicast); | ||
657 | 661 | ||
658 | #ifdef CONFIG_NET_POLL_CONTROLLER | 662 | #ifdef CONFIG_NET_POLL_CONTROLLER |
659 | void lance_poll(struct net_device *dev) | 663 | void lance_poll(struct net_device *dev) |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9f6cc8a56073..f4182cfffe9d 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1353,7 +1353,7 @@ config APRICOT | |||
1353 | 1353 | ||
1354 | config B44 | 1354 | config B44 |
1355 | tristate "Broadcom 440x/47xx ethernet support" | 1355 | tristate "Broadcom 440x/47xx ethernet support" |
1356 | depends on SSB_POSSIBLE | 1356 | depends on SSB_POSSIBLE && HAS_DMA |
1357 | select SSB | 1357 | select SSB |
1358 | select MII | 1358 | select MII |
1359 | help | 1359 | help |
@@ -2426,7 +2426,7 @@ config CHELSIO_T3 | |||
2426 | 2426 | ||
2427 | config EHEA | 2427 | config EHEA |
2428 | tristate "eHEA Ethernet support" | 2428 | tristate "eHEA Ethernet support" |
2429 | depends on IBMEBUS && INET && SPARSEMEM && MEMORY_HOTPLUG | 2429 | depends on IBMEBUS && INET && SPARSEMEM |
2430 | select INET_LRO | 2430 | select INET_LRO |
2431 | ---help--- | 2431 | ---help--- |
2432 | This driver supports the IBM pSeries eHEA ethernet adapter. | 2432 | This driver supports the IBM pSeries eHEA ethernet adapter. |
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 9c2394d49428..99e0b4cdc56f 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -637,22 +637,6 @@ static s32 atl1_phy_leave_power_saving(struct atl1_hw *hw) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | /* | 639 | /* |
640 | * Force the PHY into power saving mode using vendor magic. | ||
641 | */ | ||
642 | #ifdef CONFIG_PM | ||
643 | static void atl1_phy_enter_power_saving(struct atl1_hw *hw) | ||
644 | { | ||
645 | atl1_write_phy_reg(hw, MII_DBG_ADDR, 0); | ||
646 | atl1_write_phy_reg(hw, MII_DBG_DATA, 0x124E); | ||
647 | atl1_write_phy_reg(hw, MII_DBG_ADDR, 2); | ||
648 | atl1_write_phy_reg(hw, MII_DBG_DATA, 0x3000); | ||
649 | atl1_write_phy_reg(hw, MII_DBG_ADDR, 3); | ||
650 | atl1_write_phy_reg(hw, MII_DBG_DATA, 0); | ||
651 | |||
652 | } | ||
653 | #endif | ||
654 | |||
655 | /* | ||
656 | * Resets the PHY and make all config validate | 640 | * Resets the PHY and make all config validate |
657 | * hw - Struct containing variables accessed by shared code | 641 | * hw - Struct containing variables accessed by shared code |
658 | * | 642 | * |
@@ -2023,6 +2007,7 @@ rrd_ok: | |||
2023 | /* Good Receive */ | 2007 | /* Good Receive */ |
2024 | pci_unmap_page(adapter->pdev, buffer_info->dma, | 2008 | pci_unmap_page(adapter->pdev, buffer_info->dma, |
2025 | buffer_info->length, PCI_DMA_FROMDEVICE); | 2009 | buffer_info->length, PCI_DMA_FROMDEVICE); |
2010 | buffer_info->dma = 0; | ||
2026 | skb = buffer_info->skb; | 2011 | skb = buffer_info->skb; |
2027 | length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); | 2012 | length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); |
2028 | 2013 | ||
@@ -2135,7 +2120,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
2135 | return -1; | 2120 | return -1; |
2136 | } | 2121 | } |
2137 | 2122 | ||
2138 | if (skb->protocol == ntohs(ETH_P_IP)) { | 2123 | if (skb->protocol == htons(ETH_P_IP)) { |
2139 | struct iphdr *iph = ip_hdr(skb); | 2124 | struct iphdr *iph = ip_hdr(skb); |
2140 | 2125 | ||
2141 | real_len = (((unsigned char *)iph - skb->data) + | 2126 | real_len = (((unsigned char *)iph - skb->data) + |
@@ -2859,7 +2844,6 @@ disable_wol: | |||
2859 | ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; | 2844 | ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; |
2860 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); | 2845 | iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); |
2861 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); | 2846 | ioread32(hw->hw_addr + REG_PCIE_PHYMISC); |
2862 | atl1_phy_enter_power_saving(hw); | ||
2863 | hw->phy_configured = false; | 2847 | hw->phy_configured = false; |
2864 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); | 2848 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); |
2865 | exit: | 2849 | exit: |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 3634b5fd7919..7023d77bf380 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -1239,12 +1239,7 @@ static int au1000_rx(struct net_device *dev) | |||
1239 | */ | 1239 | */ |
1240 | static irqreturn_t au1000_interrupt(int irq, void *dev_id) | 1240 | static irqreturn_t au1000_interrupt(int irq, void *dev_id) |
1241 | { | 1241 | { |
1242 | struct net_device *dev = (struct net_device *) dev_id; | 1242 | struct net_device *dev = dev_id; |
1243 | |||
1244 | if (dev == NULL) { | ||
1245 | printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name); | ||
1246 | return IRQ_RETVAL(1); | ||
1247 | } | ||
1248 | 1243 | ||
1249 | /* Handle RX interrupts first to minimize chance of overrun */ | 1244 | /* Handle RX interrupts first to minimize chance of overrun */ |
1250 | 1245 | ||
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 89c0018132ec..41443435ab1c 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/ethtool.h> | ||
26 | #include <linux/mii.h> | 25 | #include <linux/mii.h> |
27 | #include <linux/phy.h> | 26 | #include <linux/phy.h> |
28 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4b46e68183e0..367b6d462708 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -5724,14 +5724,12 @@ bnx2_reset_task(struct work_struct *work) | |||
5724 | if (!netif_running(bp->dev)) | 5724 | if (!netif_running(bp->dev)) |
5725 | return; | 5725 | return; |
5726 | 5726 | ||
5727 | bp->in_reset_task = 1; | ||
5728 | bnx2_netif_stop(bp); | 5727 | bnx2_netif_stop(bp); |
5729 | 5728 | ||
5730 | bnx2_init_nic(bp); | 5729 | bnx2_init_nic(bp); |
5731 | 5730 | ||
5732 | atomic_set(&bp->intr_sem, 1); | 5731 | atomic_set(&bp->intr_sem, 1); |
5733 | bnx2_netif_start(bp); | 5732 | bnx2_netif_start(bp); |
5734 | bp->in_reset_task = 0; | ||
5735 | } | 5733 | } |
5736 | 5734 | ||
5737 | static void | 5735 | static void |
@@ -5907,12 +5905,7 @@ bnx2_close(struct net_device *dev) | |||
5907 | struct bnx2 *bp = netdev_priv(dev); | 5905 | struct bnx2 *bp = netdev_priv(dev); |
5908 | u32 reset_code; | 5906 | u32 reset_code; |
5909 | 5907 | ||
5910 | /* Calling flush_scheduled_work() may deadlock because | 5908 | cancel_work_sync(&bp->reset_task); |
5911 | * linkwatch_event() may be on the workqueue and it will try to get | ||
5912 | * the rtnl_lock which we are holding. | ||
5913 | */ | ||
5914 | while (bp->in_reset_task) | ||
5915 | msleep(1); | ||
5916 | 5909 | ||
5917 | bnx2_disable_int_sync(bp); | 5910 | bnx2_disable_int_sync(bp); |
5918 | bnx2_napi_disable(bp); | 5911 | bnx2_napi_disable(bp); |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 1eaf5bb3d9c2..2377cc13bf61 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -6656,7 +6656,6 @@ struct bnx2 { | |||
6656 | int current_interval; | 6656 | int current_interval; |
6657 | struct timer_list timer; | 6657 | struct timer_list timer; |
6658 | struct work_struct reset_task; | 6658 | struct work_struct reset_task; |
6659 | int in_reset_task; | ||
6660 | 6659 | ||
6661 | /* Used to synchronize phy accesses. */ | 6660 | /* Used to synchronize phy accesses. */ |
6662 | spinlock_t phy_lock; | 6661 | spinlock_t phy_lock; |
diff --git a/drivers/net/bnx2x.c b/drivers/net/bnx2x.c index 7bdb5af35951..70cba64732ca 100644 --- a/drivers/net/bnx2x.c +++ b/drivers/net/bnx2x.c | |||
@@ -6,7 +6,8 @@ | |||
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | * | 8 | * |
9 | * Written by: Eliezer Tamir <eliezert@broadcom.com> | 9 | * Maintained by: Eilon Greenstein <eilong@broadcom.com> |
10 | * Written by: Eliezer Tamir | ||
10 | * Based on code from Michael Chan's bnx2 driver | 11 | * Based on code from Michael Chan's bnx2 driver |
11 | * UDP CSUM errata workaround by Arik Gendelman | 12 | * UDP CSUM errata workaround by Arik Gendelman |
12 | * Slowpath rework by Vladislav Zolotarov | 13 | * Slowpath rework by Vladislav Zolotarov |
@@ -74,7 +75,7 @@ static char version[] __devinitdata = | |||
74 | "Broadcom NetXtreme II 5771X 10Gigabit Ethernet Driver " | 75 | "Broadcom NetXtreme II 5771X 10Gigabit Ethernet Driver " |
75 | DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 76 | DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
76 | 77 | ||
77 | MODULE_AUTHOR("Eliezer Tamir <eliezert@broadcom.com>"); | 78 | MODULE_AUTHOR("Eliezer Tamir"); |
78 | MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710 Driver"); | 79 | MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710 Driver"); |
79 | MODULE_LICENSE("GPL"); | 80 | MODULE_LICENSE("GPL"); |
80 | MODULE_VERSION(DRV_MODULE_VERSION); | 81 | MODULE_VERSION(DRV_MODULE_VERSION); |
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 4f0c0d31e7c1..8e68d06510a6 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | * | 8 | * |
9 | * Written by: Eliezer Tamir <eliezert@broadcom.com> | 9 | * Maintained by: Eilon Greenstein <eilong@broadcom.com> |
10 | * Written by: Eliezer Tamir | ||
10 | * Based on code from Michael Chan's bnx2 driver | 11 | * Based on code from Michael Chan's bnx2 driver |
11 | */ | 12 | */ |
12 | 13 | ||
diff --git a/drivers/net/bnx2x_init.h b/drivers/net/bnx2x_init.h index dcaecc53bdb1..370686eef97c 100644 --- a/drivers/net/bnx2x_init.h +++ b/drivers/net/bnx2x_init.h | |||
@@ -6,7 +6,8 @@ | |||
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | * | 8 | * |
9 | * Written by: Eliezer Tamir <eliezert@broadcom.com> | 9 | * Maintained by: Eilon Greenstein <eilong@broadcom.com> |
10 | * Written by: Eliezer Tamir | ||
10 | */ | 11 | */ |
11 | 12 | ||
12 | #ifndef BNX2X_INIT_H | 13 | #ifndef BNX2X_INIT_H |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 68c41a00d93d..08f3d396bcd6 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1437,8 +1437,16 @@ int bond_create_sysfs(void) | |||
1437 | * configure multiple bonding devices. | 1437 | * configure multiple bonding devices. |
1438 | */ | 1438 | */ |
1439 | if (ret == -EEXIST) { | 1439 | if (ret == -EEXIST) { |
1440 | netdev_class = NULL; | 1440 | /* Is someone being kinky and naming a device bonding_master? */ |
1441 | return 0; | 1441 | if (__dev_get_by_name(&init_net, |
1442 | class_attr_bonding_masters.attr.name)) | ||
1443 | printk(KERN_ERR | ||
1444 | "network device named %s already exists in sysfs", | ||
1445 | class_attr_bonding_masters.attr.name); | ||
1446 | else { | ||
1447 | netdev_class = NULL; | ||
1448 | return 0; | ||
1449 | } | ||
1442 | } | 1450 | } |
1443 | 1451 | ||
1444 | return ret; | 1452 | return ret; |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 93e13636f8dd..83768df27806 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -142,8 +142,8 @@ | |||
142 | 142 | ||
143 | #define DRV_MODULE_NAME "cassini" | 143 | #define DRV_MODULE_NAME "cassini" |
144 | #define PFX DRV_MODULE_NAME ": " | 144 | #define PFX DRV_MODULE_NAME ": " |
145 | #define DRV_MODULE_VERSION "1.5" | 145 | #define DRV_MODULE_VERSION "1.6" |
146 | #define DRV_MODULE_RELDATE "4 Jan 2008" | 146 | #define DRV_MODULE_RELDATE "21 May 2008" |
147 | 147 | ||
148 | #define CAS_DEF_MSG_ENABLE \ | 148 | #define CAS_DEF_MSG_ENABLE \ |
149 | (NETIF_MSG_DRV | \ | 149 | (NETIF_MSG_DRV | \ |
@@ -2136,9 +2136,12 @@ end_copy_pkt: | |||
2136 | if (addr) | 2136 | if (addr) |
2137 | cas_page_unmap(addr); | 2137 | cas_page_unmap(addr); |
2138 | } | 2138 | } |
2139 | skb->csum = csum_unfold(~csum); | ||
2140 | skb->ip_summed = CHECKSUM_COMPLETE; | ||
2141 | skb->protocol = eth_type_trans(skb, cp->dev); | 2139 | skb->protocol = eth_type_trans(skb, cp->dev); |
2140 | if (skb->protocol == htons(ETH_P_IP)) { | ||
2141 | skb->csum = csum_unfold(~csum); | ||
2142 | skb->ip_summed = CHECKSUM_COMPLETE; | ||
2143 | } else | ||
2144 | skb->ip_summed = CHECKSUM_NONE; | ||
2142 | return len; | 2145 | return len; |
2143 | } | 2146 | } |
2144 | 2147 | ||
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 2b5740b3d182..7f3f62e1b113 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/platform_device.h> | 38 | #include <linux/platform_device.h> |
39 | #include <linux/dma-mapping.h> | 39 | #include <linux/dma-mapping.h> |
40 | #include <asm/gpio.h> | 40 | #include <asm/gpio.h> |
41 | #include <asm/atomic.h> | ||
41 | 42 | ||
42 | MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>"); | 43 | MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>"); |
43 | MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)"); | 44 | MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)"); |
@@ -187,6 +188,7 @@ struct cpmac_desc { | |||
187 | #define CPMAC_EOQ 0x1000 | 188 | #define CPMAC_EOQ 0x1000 |
188 | struct sk_buff *skb; | 189 | struct sk_buff *skb; |
189 | struct cpmac_desc *next; | 190 | struct cpmac_desc *next; |
191 | struct cpmac_desc *prev; | ||
190 | dma_addr_t mapping; | 192 | dma_addr_t mapping; |
191 | dma_addr_t data_mapping; | 193 | dma_addr_t data_mapping; |
192 | }; | 194 | }; |
@@ -208,6 +210,7 @@ struct cpmac_priv { | |||
208 | struct work_struct reset_work; | 210 | struct work_struct reset_work; |
209 | struct platform_device *pdev; | 211 | struct platform_device *pdev; |
210 | struct napi_struct napi; | 212 | struct napi_struct napi; |
213 | atomic_t reset_pending; | ||
211 | }; | 214 | }; |
212 | 215 | ||
213 | static irqreturn_t cpmac_irq(int, void *); | 216 | static irqreturn_t cpmac_irq(int, void *); |
@@ -241,6 +244,16 @@ static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc) | |||
241 | printk("\n"); | 244 | printk("\n"); |
242 | } | 245 | } |
243 | 246 | ||
247 | static void cpmac_dump_all_desc(struct net_device *dev) | ||
248 | { | ||
249 | struct cpmac_priv *priv = netdev_priv(dev); | ||
250 | struct cpmac_desc *dump = priv->rx_head; | ||
251 | do { | ||
252 | cpmac_dump_desc(dev, dump); | ||
253 | dump = dump->next; | ||
254 | } while (dump != priv->rx_head); | ||
255 | } | ||
256 | |||
244 | static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb) | 257 | static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb) |
245 | { | 258 | { |
246 | int i; | 259 | int i; |
@@ -412,21 +425,42 @@ static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv, | |||
412 | static int cpmac_poll(struct napi_struct *napi, int budget) | 425 | static int cpmac_poll(struct napi_struct *napi, int budget) |
413 | { | 426 | { |
414 | struct sk_buff *skb; | 427 | struct sk_buff *skb; |
415 | struct cpmac_desc *desc; | 428 | struct cpmac_desc *desc, *restart; |
416 | int received = 0; | ||
417 | struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi); | 429 | struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi); |
430 | int received = 0, processed = 0; | ||
418 | 431 | ||
419 | spin_lock(&priv->rx_lock); | 432 | spin_lock(&priv->rx_lock); |
420 | if (unlikely(!priv->rx_head)) { | 433 | if (unlikely(!priv->rx_head)) { |
421 | if (netif_msg_rx_err(priv) && net_ratelimit()) | 434 | if (netif_msg_rx_err(priv) && net_ratelimit()) |
422 | printk(KERN_WARNING "%s: rx: polling, but no queue\n", | 435 | printk(KERN_WARNING "%s: rx: polling, but no queue\n", |
423 | priv->dev->name); | 436 | priv->dev->name); |
437 | spin_unlock(&priv->rx_lock); | ||
424 | netif_rx_complete(priv->dev, napi); | 438 | netif_rx_complete(priv->dev, napi); |
425 | return 0; | 439 | return 0; |
426 | } | 440 | } |
427 | 441 | ||
428 | desc = priv->rx_head; | 442 | desc = priv->rx_head; |
443 | restart = NULL; | ||
429 | while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) { | 444 | while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) { |
445 | processed++; | ||
446 | |||
447 | if ((desc->dataflags & CPMAC_EOQ) != 0) { | ||
448 | /* The last update to eoq->hw_next didn't happen | ||
449 | * soon enough, and the receiver stopped here. | ||
450 | *Remember this descriptor so we can restart | ||
451 | * the receiver after freeing some space. | ||
452 | */ | ||
453 | if (unlikely(restart)) { | ||
454 | if (netif_msg_rx_err(priv)) | ||
455 | printk(KERN_ERR "%s: poll found a" | ||
456 | " duplicate EOQ: %p and %p\n", | ||
457 | priv->dev->name, restart, desc); | ||
458 | goto fatal_error; | ||
459 | } | ||
460 | |||
461 | restart = desc->next; | ||
462 | } | ||
463 | |||
430 | skb = cpmac_rx_one(priv, desc); | 464 | skb = cpmac_rx_one(priv, desc); |
431 | if (likely(skb)) { | 465 | if (likely(skb)) { |
432 | netif_receive_skb(skb); | 466 | netif_receive_skb(skb); |
@@ -435,19 +469,90 @@ static int cpmac_poll(struct napi_struct *napi, int budget) | |||
435 | desc = desc->next; | 469 | desc = desc->next; |
436 | } | 470 | } |
437 | 471 | ||
472 | if (desc != priv->rx_head) { | ||
473 | /* We freed some buffers, but not the whole ring, | ||
474 | * add what we did free to the rx list */ | ||
475 | desc->prev->hw_next = (u32)0; | ||
476 | priv->rx_head->prev->hw_next = priv->rx_head->mapping; | ||
477 | } | ||
478 | |||
479 | /* Optimization: If we did not actually process an EOQ (perhaps because | ||
480 | * of quota limits), check to see if the tail of the queue has EOQ set. | ||
481 | * We should immediately restart in that case so that the receiver can | ||
482 | * restart and run in parallel with more packet processing. | ||
483 | * This lets us handle slightly larger bursts before running | ||
484 | * out of ring space (assuming dev->weight < ring_size) */ | ||
485 | |||
486 | if (!restart && | ||
487 | (priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ)) | ||
488 | == CPMAC_EOQ && | ||
489 | (priv->rx_head->dataflags & CPMAC_OWN) != 0) { | ||
490 | /* reset EOQ so the poll loop (above) doesn't try to | ||
491 | * restart this when it eventually gets to this descriptor. | ||
492 | */ | ||
493 | priv->rx_head->prev->dataflags &= ~CPMAC_EOQ; | ||
494 | restart = priv->rx_head; | ||
495 | } | ||
496 | |||
497 | if (restart) { | ||
498 | priv->dev->stats.rx_errors++; | ||
499 | priv->dev->stats.rx_fifo_errors++; | ||
500 | if (netif_msg_rx_err(priv) && net_ratelimit()) | ||
501 | printk(KERN_WARNING "%s: rx dma ring overrun\n", | ||
502 | priv->dev->name); | ||
503 | |||
504 | if (unlikely((restart->dataflags & CPMAC_OWN) == 0)) { | ||
505 | if (netif_msg_drv(priv)) | ||
506 | printk(KERN_ERR "%s: cpmac_poll is trying to " | ||
507 | "restart rx from a descriptor that's " | ||
508 | "not free: %p\n", | ||
509 | priv->dev->name, restart); | ||
510 | goto fatal_error; | ||
511 | } | ||
512 | |||
513 | cpmac_write(priv->regs, CPMAC_RX_PTR(0), restart->mapping); | ||
514 | } | ||
515 | |||
438 | priv->rx_head = desc; | 516 | priv->rx_head = desc; |
439 | spin_unlock(&priv->rx_lock); | 517 | spin_unlock(&priv->rx_lock); |
440 | if (unlikely(netif_msg_rx_status(priv))) | 518 | if (unlikely(netif_msg_rx_status(priv))) |
441 | printk(KERN_DEBUG "%s: poll processed %d packets\n", | 519 | printk(KERN_DEBUG "%s: poll processed %d packets\n", |
442 | priv->dev->name, received); | 520 | priv->dev->name, received); |
443 | if (desc->dataflags & CPMAC_OWN) { | 521 | if (processed == 0) { |
522 | /* we ran out of packets to read, | ||
523 | * revert to interrupt-driven mode */ | ||
444 | netif_rx_complete(priv->dev, napi); | 524 | netif_rx_complete(priv->dev, napi); |
445 | cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping); | ||
446 | cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1); | 525 | cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1); |
447 | return 0; | 526 | return 0; |
448 | } | 527 | } |
449 | 528 | ||
450 | return 1; | 529 | return 1; |
530 | |||
531 | fatal_error: | ||
532 | /* Something went horribly wrong. | ||
533 | * Reset hardware to try to recover rather than wedging. */ | ||
534 | |||
535 | if (netif_msg_drv(priv)) { | ||
536 | printk(KERN_ERR "%s: cpmac_poll is confused. " | ||
537 | "Resetting hardware\n", priv->dev->name); | ||
538 | cpmac_dump_all_desc(priv->dev); | ||
539 | printk(KERN_DEBUG "%s: RX_PTR(0)=0x%08x RX_ACK(0)=0x%08x\n", | ||
540 | priv->dev->name, | ||
541 | cpmac_read(priv->regs, CPMAC_RX_PTR(0)), | ||
542 | cpmac_read(priv->regs, CPMAC_RX_ACK(0))); | ||
543 | } | ||
544 | |||
545 | spin_unlock(&priv->rx_lock); | ||
546 | netif_rx_complete(priv->dev, napi); | ||
547 | netif_stop_queue(priv->dev); | ||
548 | napi_disable(&priv->napi); | ||
549 | |||
550 | atomic_inc(&priv->reset_pending); | ||
551 | cpmac_hw_stop(priv->dev); | ||
552 | if (!schedule_work(&priv->reset_work)) | ||
553 | atomic_dec(&priv->reset_pending); | ||
554 | return 0; | ||
555 | |||
451 | } | 556 | } |
452 | 557 | ||
453 | static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | 558 | static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) |
@@ -456,6 +561,9 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
456 | struct cpmac_desc *desc; | 561 | struct cpmac_desc *desc; |
457 | struct cpmac_priv *priv = netdev_priv(dev); | 562 | struct cpmac_priv *priv = netdev_priv(dev); |
458 | 563 | ||
564 | if (unlikely(atomic_read(&priv->reset_pending))) | ||
565 | return NETDEV_TX_BUSY; | ||
566 | |||
459 | if (unlikely(skb_padto(skb, ETH_ZLEN))) | 567 | if (unlikely(skb_padto(skb, ETH_ZLEN))) |
460 | return NETDEV_TX_OK; | 568 | return NETDEV_TX_OK; |
461 | 569 | ||
@@ -621,8 +729,10 @@ static void cpmac_clear_rx(struct net_device *dev) | |||
621 | desc->dataflags = CPMAC_OWN; | 729 | desc->dataflags = CPMAC_OWN; |
622 | dev->stats.rx_dropped++; | 730 | dev->stats.rx_dropped++; |
623 | } | 731 | } |
732 | desc->hw_next = desc->next->mapping; | ||
624 | desc = desc->next; | 733 | desc = desc->next; |
625 | } | 734 | } |
735 | priv->rx_head->prev->hw_next = 0; | ||
626 | } | 736 | } |
627 | 737 | ||
628 | static void cpmac_clear_tx(struct net_device *dev) | 738 | static void cpmac_clear_tx(struct net_device *dev) |
@@ -635,14 +745,14 @@ static void cpmac_clear_tx(struct net_device *dev) | |||
635 | priv->desc_ring[i].dataflags = 0; | 745 | priv->desc_ring[i].dataflags = 0; |
636 | if (priv->desc_ring[i].skb) { | 746 | if (priv->desc_ring[i].skb) { |
637 | dev_kfree_skb_any(priv->desc_ring[i].skb); | 747 | dev_kfree_skb_any(priv->desc_ring[i].skb); |
638 | if (netif_subqueue_stopped(dev, i)) | 748 | priv->desc_ring[i].skb = NULL; |
639 | netif_wake_subqueue(dev, i); | ||
640 | } | 749 | } |
641 | } | 750 | } |
642 | } | 751 | } |
643 | 752 | ||
644 | static void cpmac_hw_error(struct work_struct *work) | 753 | static void cpmac_hw_error(struct work_struct *work) |
645 | { | 754 | { |
755 | int i; | ||
646 | struct cpmac_priv *priv = | 756 | struct cpmac_priv *priv = |
647 | container_of(work, struct cpmac_priv, reset_work); | 757 | container_of(work, struct cpmac_priv, reset_work); |
648 | 758 | ||
@@ -651,8 +761,48 @@ static void cpmac_hw_error(struct work_struct *work) | |||
651 | spin_unlock(&priv->rx_lock); | 761 | spin_unlock(&priv->rx_lock); |
652 | cpmac_clear_tx(priv->dev); | 762 | cpmac_clear_tx(priv->dev); |
653 | cpmac_hw_start(priv->dev); | 763 | cpmac_hw_start(priv->dev); |
654 | napi_enable(&priv->napi); | 764 | barrier(); |
655 | netif_start_queue(priv->dev); | 765 | atomic_dec(&priv->reset_pending); |
766 | |||
767 | for (i = 0; i < CPMAC_QUEUES; i++) | ||
768 | netif_wake_subqueue(priv->dev, i); | ||
769 | netif_wake_queue(priv->dev); | ||
770 | cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3); | ||
771 | } | ||
772 | |||
773 | static void cpmac_check_status(struct net_device *dev) | ||
774 | { | ||
775 | struct cpmac_priv *priv = netdev_priv(dev); | ||
776 | |||
777 | u32 macstatus = cpmac_read(priv->regs, CPMAC_MAC_STATUS); | ||
778 | int rx_channel = (macstatus >> 8) & 7; | ||
779 | int rx_code = (macstatus >> 12) & 15; | ||
780 | int tx_channel = (macstatus >> 16) & 7; | ||
781 | int tx_code = (macstatus >> 20) & 15; | ||
782 | |||
783 | if (rx_code || tx_code) { | ||
784 | if (netif_msg_drv(priv) && net_ratelimit()) { | ||
785 | /* Can't find any documentation on what these | ||
786 | *error codes actually are. So just log them and hope.. | ||
787 | */ | ||
788 | if (rx_code) | ||
789 | printk(KERN_WARNING "%s: host error %d on rx " | ||
790 | "channel %d (macstatus %08x), resetting\n", | ||
791 | dev->name, rx_code, rx_channel, macstatus); | ||
792 | if (tx_code) | ||
793 | printk(KERN_WARNING "%s: host error %d on tx " | ||
794 | "channel %d (macstatus %08x), resetting\n", | ||
795 | dev->name, tx_code, tx_channel, macstatus); | ||
796 | } | ||
797 | |||
798 | netif_stop_queue(dev); | ||
799 | cpmac_hw_stop(dev); | ||
800 | if (schedule_work(&priv->reset_work)) | ||
801 | atomic_inc(&priv->reset_pending); | ||
802 | if (unlikely(netif_msg_hw(priv))) | ||
803 | cpmac_dump_regs(dev); | ||
804 | } | ||
805 | cpmac_write(priv->regs, CPMAC_MAC_INT_CLEAR, 0xff); | ||
656 | } | 806 | } |
657 | 807 | ||
658 | static irqreturn_t cpmac_irq(int irq, void *dev_id) | 808 | static irqreturn_t cpmac_irq(int irq, void *dev_id) |
@@ -683,49 +833,32 @@ static irqreturn_t cpmac_irq(int irq, void *dev_id) | |||
683 | 833 | ||
684 | cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0); | 834 | cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0); |
685 | 835 | ||
686 | if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS))) { | 836 | if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS))) |
687 | if (netif_msg_drv(priv) && net_ratelimit()) | 837 | cpmac_check_status(dev); |
688 | printk(KERN_ERR "%s: hw error, resetting...\n", | ||
689 | dev->name); | ||
690 | netif_stop_queue(dev); | ||
691 | napi_disable(&priv->napi); | ||
692 | cpmac_hw_stop(dev); | ||
693 | schedule_work(&priv->reset_work); | ||
694 | if (unlikely(netif_msg_hw(priv))) | ||
695 | cpmac_dump_regs(dev); | ||
696 | } | ||
697 | 838 | ||
698 | return IRQ_HANDLED; | 839 | return IRQ_HANDLED; |
699 | } | 840 | } |
700 | 841 | ||
701 | static void cpmac_tx_timeout(struct net_device *dev) | 842 | static void cpmac_tx_timeout(struct net_device *dev) |
702 | { | 843 | { |
703 | struct cpmac_priv *priv = netdev_priv(dev); | ||
704 | int i; | 844 | int i; |
845 | struct cpmac_priv *priv = netdev_priv(dev); | ||
705 | 846 | ||
706 | spin_lock(&priv->lock); | 847 | spin_lock(&priv->lock); |
707 | dev->stats.tx_errors++; | 848 | dev->stats.tx_errors++; |
708 | spin_unlock(&priv->lock); | 849 | spin_unlock(&priv->lock); |
709 | if (netif_msg_tx_err(priv) && net_ratelimit()) | 850 | if (netif_msg_tx_err(priv) && net_ratelimit()) |
710 | printk(KERN_WARNING "%s: transmit timeout\n", dev->name); | 851 | printk(KERN_WARNING "%s: transmit timeout\n", dev->name); |
711 | /* | 852 | |
712 | * FIXME: waking up random queue is not the best thing to | 853 | atomic_inc(&priv->reset_pending); |
713 | * do... on the other hand why we got here at all? | 854 | barrier(); |
714 | */ | 855 | cpmac_clear_tx(dev); |
715 | #ifdef CONFIG_NETDEVICES_MULTIQUEUE | 856 | barrier(); |
857 | atomic_dec(&priv->reset_pending); | ||
858 | |||
859 | netif_wake_queue(priv->dev); | ||
716 | for (i = 0; i < CPMAC_QUEUES; i++) | 860 | for (i = 0; i < CPMAC_QUEUES; i++) |
717 | if (priv->desc_ring[i].skb) { | 861 | netif_wake_subqueue(dev, i); |
718 | priv->desc_ring[i].dataflags = 0; | ||
719 | dev_kfree_skb_any(priv->desc_ring[i].skb); | ||
720 | netif_wake_subqueue(dev, i); | ||
721 | break; | ||
722 | } | ||
723 | #else | ||
724 | priv->desc_ring[0].dataflags = 0; | ||
725 | if (priv->desc_ring[0].skb) | ||
726 | dev_kfree_skb_any(priv->desc_ring[0].skb); | ||
727 | netif_wake_queue(dev); | ||
728 | #endif | ||
729 | } | 862 | } |
730 | 863 | ||
731 | static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 864 | static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
@@ -901,9 +1034,12 @@ static int cpmac_open(struct net_device *dev) | |||
901 | desc->buflen = CPMAC_SKB_SIZE; | 1034 | desc->buflen = CPMAC_SKB_SIZE; |
902 | desc->dataflags = CPMAC_OWN; | 1035 | desc->dataflags = CPMAC_OWN; |
903 | desc->next = &priv->rx_head[(i + 1) % priv->ring_size]; | 1036 | desc->next = &priv->rx_head[(i + 1) % priv->ring_size]; |
1037 | desc->next->prev = desc; | ||
904 | desc->hw_next = (u32)desc->next->mapping; | 1038 | desc->hw_next = (u32)desc->next->mapping; |
905 | } | 1039 | } |
906 | 1040 | ||
1041 | priv->rx_head->prev->hw_next = (u32)0; | ||
1042 | |||
907 | if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, | 1043 | if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, |
908 | dev->name, dev))) { | 1044 | dev->name, dev))) { |
909 | if (netif_msg_drv(priv)) | 1045 | if (netif_msg_drv(priv)) |
@@ -912,6 +1048,7 @@ static int cpmac_open(struct net_device *dev) | |||
912 | goto fail_irq; | 1048 | goto fail_irq; |
913 | } | 1049 | } |
914 | 1050 | ||
1051 | atomic_set(&priv->reset_pending, 0); | ||
915 | INIT_WORK(&priv->reset_work, cpmac_hw_error); | 1052 | INIT_WORK(&priv->reset_work, cpmac_hw_error); |
916 | cpmac_hw_start(dev); | 1053 | cpmac_hw_start(dev); |
917 | 1054 | ||
@@ -1007,21 +1144,10 @@ static int __devinit cpmac_probe(struct platform_device *pdev) | |||
1007 | 1144 | ||
1008 | if (phy_id == PHY_MAX_ADDR) { | 1145 | if (phy_id == PHY_MAX_ADDR) { |
1009 | if (external_switch || dumb_switch) { | 1146 | if (external_switch || dumb_switch) { |
1010 | struct fixed_phy_status status = {}; | 1147 | mdio_bus_id = 0; /* fixed phys bus */ |
1011 | 1148 | phy_id = pdev->id; | |
1012 | /* | ||
1013 | * FIXME: this should be in the platform code! | ||
1014 | * Since there is not platform code at all (that is, | ||
1015 | * no mainline users of that driver), place it here | ||
1016 | * for now. | ||
1017 | */ | ||
1018 | phy_id = 0; | ||
1019 | status.link = 1; | ||
1020 | status.duplex = 1; | ||
1021 | status.speed = 100; | ||
1022 | fixed_phy_add(PHY_POLL, phy_id, &status); | ||
1023 | } else { | 1149 | } else { |
1024 | printk(KERN_ERR "cpmac: no PHY present\n"); | 1150 | dev_err(&pdev->dev, "no PHY present\n"); |
1025 | return -ENODEV; | 1151 | return -ENODEV; |
1026 | } | 1152 | } |
1027 | } | 1153 | } |
@@ -1064,10 +1190,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev) | |||
1064 | priv->msg_enable = netif_msg_init(debug_level, 0xff); | 1190 | priv->msg_enable = netif_msg_init(debug_level, 0xff); |
1065 | memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr)); | 1191 | memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr)); |
1066 | 1192 | ||
1067 | snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id); | 1193 | priv->phy = phy_connect(dev, cpmac_mii.phy_map[phy_id]->dev.bus_id, |
1068 | 1194 | &cpmac_adjust_link, 0, PHY_INTERFACE_MODE_MII); | |
1069 | priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0, | ||
1070 | PHY_INTERFACE_MODE_MII); | ||
1071 | if (IS_ERR(priv->phy)) { | 1195 | if (IS_ERR(priv->phy)) { |
1072 | if (netif_msg_drv(priv)) | 1196 | if (netif_msg_drv(priv)) |
1073 | printk(KERN_ERR "%s: Could not attach to PHY\n", | 1197 | printk(KERN_ERR "%s: Could not attach to PHY\n", |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 348371fda597..fba87abe78ee 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1394,7 +1394,11 @@ net_open(struct net_device *dev) | |||
1394 | #endif | 1394 | #endif |
1395 | if (!result) { | 1395 | if (!result) { |
1396 | printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); | 1396 | printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); |
1397 | release_irq: | 1397 | release_dma: |
1398 | #if ALLOW_DMA | ||
1399 | free_dma(dev->dma); | ||
1400 | #endif | ||
1401 | release_irq: | ||
1398 | #if ALLOW_DMA | 1402 | #if ALLOW_DMA |
1399 | release_dma_buff(lp); | 1403 | release_dma_buff(lp); |
1400 | #endif | 1404 | #endif |
@@ -1442,12 +1446,12 @@ net_open(struct net_device *dev) | |||
1442 | if ((result = detect_bnc(dev)) != DETECTED_NONE) | 1446 | if ((result = detect_bnc(dev)) != DETECTED_NONE) |
1443 | break; | 1447 | break; |
1444 | printk(KERN_ERR "%s: no media detected\n", dev->name); | 1448 | printk(KERN_ERR "%s: no media detected\n", dev->name); |
1445 | goto release_irq; | 1449 | goto release_dma; |
1446 | } | 1450 | } |
1447 | switch(result) { | 1451 | switch(result) { |
1448 | case DETECTED_NONE: | 1452 | case DETECTED_NONE: |
1449 | printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); | 1453 | printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); |
1450 | goto release_irq; | 1454 | goto release_dma; |
1451 | case DETECTED_RJ45H: | 1455 | case DETECTED_RJ45H: |
1452 | printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); | 1456 | printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); |
1453 | break; | 1457 | break; |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index d45bcd2660af..864295e081b6 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -903,7 +903,7 @@ dm9000_stop(struct net_device *ndev) | |||
903 | if (netif_msg_ifdown(db)) | 903 | if (netif_msg_ifdown(db)) |
904 | dev_dbg(db->dev, "shutting down %s\n", ndev->name); | 904 | dev_dbg(db->dev, "shutting down %s\n", ndev->name); |
905 | 905 | ||
906 | cancel_delayed_work(&db->phy_poll); | 906 | cancel_delayed_work_sync(&db->phy_poll); |
907 | 907 | ||
908 | netif_stop_queue(ndev); | 908 | netif_stop_queue(ndev); |
909 | netif_carrier_off(ndev); | 909 | netif_carrier_off(ndev); |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 8cbb40f3a506..cab1835173cd 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -4201,8 +4201,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4201 | struct e1000_adapter *adapter; | 4201 | struct e1000_adapter *adapter; |
4202 | struct e1000_hw *hw; | 4202 | struct e1000_hw *hw; |
4203 | const struct e1000_info *ei = e1000_info_tbl[ent->driver_data]; | 4203 | const struct e1000_info *ei = e1000_info_tbl[ent->driver_data]; |
4204 | unsigned long mmio_start, mmio_len; | 4204 | resource_size_t mmio_start, mmio_len; |
4205 | unsigned long flash_start, flash_len; | 4205 | resource_size_t flash_start, flash_len; |
4206 | 4206 | ||
4207 | static int cards_found; | 4207 | static int cards_found; |
4208 | int i, err, pci_using_dac; | 4208 | int i, err, pci_using_dac; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index d1b6d4e7495d..075fd547421e 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1766,16 +1766,20 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa) | |||
1766 | mutex_lock(&ehea_bcmc_regs.lock); | 1766 | mutex_lock(&ehea_bcmc_regs.lock); |
1767 | 1767 | ||
1768 | /* Deregister old MAC in pHYP */ | 1768 | /* Deregister old MAC in pHYP */ |
1769 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); | 1769 | if (port->state == EHEA_PORT_UP) { |
1770 | if (ret) | 1770 | ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); |
1771 | goto out_upregs; | 1771 | if (ret) |
1772 | goto out_upregs; | ||
1773 | } | ||
1772 | 1774 | ||
1773 | port->mac_addr = cb0->port_mac_addr << 16; | 1775 | port->mac_addr = cb0->port_mac_addr << 16; |
1774 | 1776 | ||
1775 | /* Register new MAC in pHYP */ | 1777 | /* Register new MAC in pHYP */ |
1776 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); | 1778 | if (port->state == EHEA_PORT_UP) { |
1777 | if (ret) | 1779 | ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); |
1778 | goto out_upregs; | 1780 | if (ret) |
1781 | goto out_upregs; | ||
1782 | } | ||
1779 | 1783 | ||
1780 | ret = 0; | 1784 | ret = 0; |
1781 | 1785 | ||
@@ -2213,8 +2217,6 @@ static void ehea_vlan_rx_register(struct net_device *dev, | |||
2213 | goto out; | 2217 | goto out; |
2214 | } | 2218 | } |
2215 | 2219 | ||
2216 | memset(cb1->vlan_filter, 0, sizeof(cb1->vlan_filter)); | ||
2217 | |||
2218 | hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, | 2220 | hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, |
2219 | H_PORT_CB1, H_PORT_CB1_ALL, cb1); | 2221 | H_PORT_CB1, H_PORT_CB1_ALL, cb1); |
2220 | if (hret != H_SUCCESS) | 2222 | if (hret != H_SUCCESS) |
@@ -2603,7 +2605,8 @@ static int ehea_stop(struct net_device *dev) | |||
2603 | if (netif_msg_ifdown(port)) | 2605 | if (netif_msg_ifdown(port)) |
2604 | ehea_info("disabling port %s", dev->name); | 2606 | ehea_info("disabling port %s", dev->name); |
2605 | 2607 | ||
2606 | flush_scheduled_work(); | 2608 | cancel_work_sync(&port->reset_task); |
2609 | |||
2607 | mutex_lock(&port->port_lock); | 2610 | mutex_lock(&port->port_lock); |
2608 | netif_stop_queue(dev); | 2611 | netif_stop_queue(dev); |
2609 | port_napi_disable(port); | 2612 | port_napi_disable(port); |
@@ -3178,11 +3181,12 @@ out_err: | |||
3178 | 3181 | ||
3179 | static void ehea_shutdown_single_port(struct ehea_port *port) | 3182 | static void ehea_shutdown_single_port(struct ehea_port *port) |
3180 | { | 3183 | { |
3184 | struct ehea_adapter *adapter = port->adapter; | ||
3181 | unregister_netdev(port->netdev); | 3185 | unregister_netdev(port->netdev); |
3182 | ehea_unregister_port(port); | 3186 | ehea_unregister_port(port); |
3183 | kfree(port->mc_list); | 3187 | kfree(port->mc_list); |
3184 | free_netdev(port->netdev); | 3188 | free_netdev(port->netdev); |
3185 | port->adapter->active_ports--; | 3189 | adapter->active_ports--; |
3186 | } | 3190 | } |
3187 | 3191 | ||
3188 | static int ehea_setup_ports(struct ehea_adapter *adapter) | 3192 | static int ehea_setup_ports(struct ehea_adapter *adapter) |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 5f9c42e7a7f1..329edd9c08fc 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -78,7 +78,7 @@ module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0); | |||
78 | MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe"); | 78 | MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe"); |
79 | 79 | ||
80 | #define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \ | 80 | #define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \ |
81 | NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFDOWN ) | 81 | NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP) |
82 | static int debug = -1; /* the above default */ | 82 | static int debug = -1; /* the above default */ |
83 | module_param(debug, int, 0); | 83 | module_param(debug, int, 0); |
84 | MODULE_PARM_DESC(debug, "debugging messages level"); | 84 | MODULE_PARM_DESC(debug, "debugging messages level"); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 35f66d4a4595..2cb244763292 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -3273,6 +3273,20 @@ static void nv_link_irq(struct net_device *dev) | |||
3273 | dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); | 3273 | dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); |
3274 | } | 3274 | } |
3275 | 3275 | ||
3276 | static void nv_msi_workaround(struct fe_priv *np) | ||
3277 | { | ||
3278 | |||
3279 | /* Need to toggle the msi irq mask within the ethernet device, | ||
3280 | * otherwise, future interrupts will not be detected. | ||
3281 | */ | ||
3282 | if (np->msi_flags & NV_MSI_ENABLED) { | ||
3283 | u8 __iomem *base = np->base; | ||
3284 | |||
3285 | writel(0, base + NvRegMSIIrqMask); | ||
3286 | writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask); | ||
3287 | } | ||
3288 | } | ||
3289 | |||
3276 | static irqreturn_t nv_nic_irq(int foo, void *data) | 3290 | static irqreturn_t nv_nic_irq(int foo, void *data) |
3277 | { | 3291 | { |
3278 | struct net_device *dev = (struct net_device *) data; | 3292 | struct net_device *dev = (struct net_device *) data; |
@@ -3295,6 +3309,8 @@ static irqreturn_t nv_nic_irq(int foo, void *data) | |||
3295 | if (!(events & np->irqmask)) | 3309 | if (!(events & np->irqmask)) |
3296 | break; | 3310 | break; |
3297 | 3311 | ||
3312 | nv_msi_workaround(np); | ||
3313 | |||
3298 | spin_lock(&np->lock); | 3314 | spin_lock(&np->lock); |
3299 | nv_tx_done(dev); | 3315 | nv_tx_done(dev); |
3300 | spin_unlock(&np->lock); | 3316 | spin_unlock(&np->lock); |
@@ -3410,6 +3426,8 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data) | |||
3410 | if (!(events & np->irqmask)) | 3426 | if (!(events & np->irqmask)) |
3411 | break; | 3427 | break; |
3412 | 3428 | ||
3429 | nv_msi_workaround(np); | ||
3430 | |||
3413 | spin_lock(&np->lock); | 3431 | spin_lock(&np->lock); |
3414 | nv_tx_done_optimized(dev, TX_WORK_PER_LOOP); | 3432 | nv_tx_done_optimized(dev, TX_WORK_PER_LOOP); |
3415 | spin_unlock(&np->lock); | 3433 | spin_unlock(&np->lock); |
@@ -3750,6 +3768,8 @@ static irqreturn_t nv_nic_irq_test(int foo, void *data) | |||
3750 | if (!(events & NVREG_IRQ_TIMER)) | 3768 | if (!(events & NVREG_IRQ_TIMER)) |
3751 | return IRQ_RETVAL(0); | 3769 | return IRQ_RETVAL(0); |
3752 | 3770 | ||
3771 | nv_msi_workaround(np); | ||
3772 | |||
3753 | spin_lock(&np->lock); | 3773 | spin_lock(&np->lock); |
3754 | np->intr_test = 1; | 3774 | np->intr_test = 1; |
3755 | spin_unlock(&np->lock); | 3775 | spin_unlock(&np->lock); |
@@ -5823,6 +5843,7 @@ static int nv_resume(struct pci_dev *pdev) | |||
5823 | writel(txreg, base + NvRegTransmitPoll); | 5843 | writel(txreg, base + NvRegTransmitPoll); |
5824 | 5844 | ||
5825 | rc = nv_open(dev); | 5845 | rc = nv_open(dev); |
5846 | nv_set_multicast(dev); | ||
5826 | out: | 5847 | out: |
5827 | return rc; | 5848 | return rc; |
5828 | } | 5849 | } |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 67b4b0728fce..a5baaf59ff66 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -1093,7 +1093,7 @@ err: | |||
1093 | if (registered) | 1093 | if (registered) |
1094 | unregister_netdev(ndev); | 1094 | unregister_netdev(ndev); |
1095 | 1095 | ||
1096 | if (fep != NULL) { | 1096 | if (fep && fep->ops) { |
1097 | (*fep->ops->free_bd)(ndev); | 1097 | (*fep->ops->free_bd)(ndev); |
1098 | (*fep->ops->cleanup_data)(ndev); | 1098 | (*fep->ops->cleanup_data)(ndev); |
1099 | } | 1099 | } |
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c index dde9c7e6408a..00bc7fbb6b37 100644 --- a/drivers/net/hamradio/baycom_epp.c +++ b/drivers/net/hamradio/baycom_epp.c | |||
@@ -959,7 +959,7 @@ static int epp_close(struct net_device *dev) | |||
959 | unsigned char tmp[1]; | 959 | unsigned char tmp[1]; |
960 | 960 | ||
961 | bc->work_running = 0; | 961 | bc->work_running = 0; |
962 | flush_scheduled_work(); | 962 | cancel_delayed_work_sync(&bc->run_work); |
963 | bc->stat = EPP_DCDBIT; | 963 | bc->stat = EPP_DCDBIT; |
964 | tmp[0] = 0; | 964 | tmp[0] = 0; |
965 | pp->ops->epp_write_addr(pp, tmp, 1, 0); | 965 | pp->ops->epp_write_addr(pp, tmp, 1, 0); |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index f90515935833..45ae9d1191d7 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -1340,9 +1340,10 @@ static unsigned int scc_set_param(struct scc_channel *scc, unsigned int cmd, uns | |||
1340 | case PARAM_RTS: | 1340 | case PARAM_RTS: |
1341 | if ( !(scc->wreg[R5] & RTS) ) | 1341 | if ( !(scc->wreg[R5] & RTS) ) |
1342 | { | 1342 | { |
1343 | if (arg != TX_OFF) | 1343 | if (arg != TX_OFF) { |
1344 | scc_key_trx(scc, TX_ON); | 1344 | scc_key_trx(scc, TX_ON); |
1345 | scc_start_tx_timer(scc, t_txdelay, scc->kiss.txdelay); | 1345 | scc_start_tx_timer(scc, t_txdelay, scc->kiss.txdelay); |
1346 | } | ||
1346 | } else { | 1347 | } else { |
1347 | if (arg == TX_OFF) | 1348 | if (arg == TX_OFF) |
1348 | { | 1349 | { |
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index 9b358f61ed7f..679a0826780e 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
@@ -577,12 +577,12 @@ static void ipg_nic_set_multicast_list(struct net_device *dev) | |||
577 | /* NIC to be configured in promiscuous mode. */ | 577 | /* NIC to be configured in promiscuous mode. */ |
578 | receivemode = IPG_RM_RECEIVEALLFRAMES; | 578 | receivemode = IPG_RM_RECEIVEALLFRAMES; |
579 | } else if ((dev->flags & IFF_ALLMULTI) || | 579 | } else if ((dev->flags & IFF_ALLMULTI) || |
580 | (dev->flags & IFF_MULTICAST & | 580 | ((dev->flags & IFF_MULTICAST) && |
581 | (dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) { | 581 | (dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) { |
582 | /* NIC to be configured to receive all multicast | 582 | /* NIC to be configured to receive all multicast |
583 | * frames. */ | 583 | * frames. */ |
584 | receivemode |= IPG_RM_RECEIVEMULTICAST; | 584 | receivemode |= IPG_RM_RECEIVEMULTICAST; |
585 | } else if (dev->flags & IFF_MULTICAST & (dev->mc_count > 0)) { | 585 | } else if ((dev->flags & IFF_MULTICAST) && (dev->mc_count > 0)) { |
586 | /* NIC to be configured to receive selected | 586 | /* NIC to be configured to receive selected |
587 | * multicast addresses. */ | 587 | * multicast addresses. */ |
588 | receivemode |= IPG_RM_RECEIVEMULTICASTHASH; | 588 | receivemode |= IPG_RM_RECEIVEMULTICASTHASH; |
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index ce816ba9c40d..e6317557a531 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig | |||
@@ -329,6 +329,7 @@ config PXA_FICP | |||
329 | config MCS_FIR | 329 | config MCS_FIR |
330 | tristate "MosChip MCS7780 IrDA-USB dongle" | 330 | tristate "MosChip MCS7780 IrDA-USB dongle" |
331 | depends on IRDA && USB && EXPERIMENTAL | 331 | depends on IRDA && USB && EXPERIMENTAL |
332 | select CRC32 | ||
332 | help | 333 | help |
333 | Say Y or M here if you want to build support for the MosChip | 334 | Say Y or M here if you want to build support for the MosChip |
334 | MCS7780 IrDA-USB bridge device driver. | 335 | MCS7780 IrDA-USB bridge device driver. |
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 9081234ab458..6f50ed7b183f 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -1120,7 +1120,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self) | |||
1120 | } | 1120 | } |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | if (self->usbdev->descriptor.bcdDevice == fw_version) { | 1123 | if (self->usbdev->descriptor.bcdDevice == cpu_to_le16(fw_version)) { |
1124 | /* | 1124 | /* |
1125 | * If we're here, we've found a correct patch | 1125 | * If we're here, we've found a correct patch |
1126 | * The actual image starts after the "STMP" keyword | 1126 | * The actual image starts after the "STMP" keyword |
diff --git a/drivers/net/irda/irda-usb.h b/drivers/net/irda/irda-usb.h index e846c38224a3..a0ca9c1fe196 100644 --- a/drivers/net/irda/irda-usb.h +++ b/drivers/net/irda/irda-usb.h | |||
@@ -117,11 +117,11 @@ | |||
117 | struct irda_class_desc { | 117 | struct irda_class_desc { |
118 | __u8 bLength; | 118 | __u8 bLength; |
119 | __u8 bDescriptorType; | 119 | __u8 bDescriptorType; |
120 | __u16 bcdSpecRevision; | 120 | __le16 bcdSpecRevision; |
121 | __u8 bmDataSize; | 121 | __u8 bmDataSize; |
122 | __u8 bmWindowSize; | 122 | __u8 bmWindowSize; |
123 | __u8 bmMinTurnaroundTime; | 123 | __u8 bmMinTurnaroundTime; |
124 | __u16 wBaudRate; | 124 | __le16 wBaudRate; |
125 | __u8 bmAdditionalBOFs; | 125 | __u8 bmAdditionalBOFs; |
126 | __u8 bIrdaRateSniff; | 126 | __u8 bIrdaRateSniff; |
127 | __u8 bMaxUnicastList; | 127 | __u8 bMaxUnicastList; |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 6321b059ce13..2f38e847e2cd 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -58,8 +58,8 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw); | |||
58 | 58 | ||
59 | static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) | 59 | static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) |
60 | { | 60 | { |
61 | hw->mac.num_rx_queues = IXGBE_82598_MAX_TX_QUEUES; | 61 | hw->mac.num_rx_queues = IXGBE_82598_MAX_RX_QUEUES; |
62 | hw->mac.num_tx_queues = IXGBE_82598_MAX_RX_QUEUES; | 62 | hw->mac.num_tx_queues = IXGBE_82598_MAX_TX_QUEUES; |
63 | hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES; | 63 | hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES; |
64 | 64 | ||
65 | /* PHY ops are filled in by default properly for Fiber only */ | 65 | /* PHY ops are filled in by default properly for Fiber only */ |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index c91b12ea26ad..e0d76c75aea0 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -75,7 +75,7 @@ | |||
75 | #include "myri10ge_mcp.h" | 75 | #include "myri10ge_mcp.h" |
76 | #include "myri10ge_mcp_gen_header.h" | 76 | #include "myri10ge_mcp_gen_header.h" |
77 | 77 | ||
78 | #define MYRI10GE_VERSION_STR "1.3.2-1.287" | 78 | #define MYRI10GE_VERSION_STR "1.3.99-1.347" |
79 | 79 | ||
80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
81 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 81 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
@@ -631,7 +631,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp) | |||
631 | return status; | 631 | return status; |
632 | } | 632 | } |
633 | 633 | ||
634 | int myri10ge_get_firmware_capabilities(struct myri10ge_priv *mgp) | 634 | static int myri10ge_get_firmware_capabilities(struct myri10ge_priv *mgp) |
635 | { | 635 | { |
636 | struct myri10ge_cmd cmd; | 636 | struct myri10ge_cmd cmd; |
637 | int status; | 637 | int status; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 8f328a03847b..a550c9bd126f 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -391,7 +391,9 @@ static int fmvj18x_config(struct pcmcia_device *link) | |||
391 | cardtype = CONTEC; | 391 | cardtype = CONTEC; |
392 | break; | 392 | break; |
393 | case MANFID_FUJITSU: | 393 | case MANFID_FUJITSU: |
394 | if (link->card_id == PRODID_FUJITSU_MBH10302) | 394 | if (link->conf.ConfigBase == 0x0fe0) |
395 | cardtype = MBH10302; | ||
396 | else if (link->card_id == PRODID_FUJITSU_MBH10302) | ||
395 | /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), | 397 | /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), |
396 | but these are MBH10304 based card. */ | 398 | but these are MBH10304 based card. */ |
397 | cardtype = MBH10304; | 399 | cardtype = MBH10304; |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index d041f831a18d..f6c4698ce738 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1461,22 +1461,25 @@ static void | |||
1461 | set_multicast_list(struct net_device *dev) | 1461 | set_multicast_list(struct net_device *dev) |
1462 | { | 1462 | { |
1463 | unsigned int ioaddr = dev->base_addr; | 1463 | unsigned int ioaddr = dev->base_addr; |
1464 | unsigned value; | ||
1464 | 1465 | ||
1465 | SelectPage(0x42); | 1466 | SelectPage(0x42); |
1467 | value = GetByte(XIRCREG42_SWC1) & 0xC0; | ||
1468 | |||
1466 | if (dev->flags & IFF_PROMISC) { /* snoop */ | 1469 | if (dev->flags & IFF_PROMISC) { /* snoop */ |
1467 | PutByte(XIRCREG42_SWC1, 0x06); /* set MPE and PME */ | 1470 | PutByte(XIRCREG42_SWC1, value | 0x06); /* set MPE and PME */ |
1468 | } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) { | 1471 | } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) { |
1469 | PutByte(XIRCREG42_SWC1, 0x02); /* set MPE */ | 1472 | PutByte(XIRCREG42_SWC1, value | 0x02); /* set MPE */ |
1470 | } else if (dev->mc_count) { | 1473 | } else if (dev->mc_count) { |
1471 | /* the chip can filter 9 addresses perfectly */ | 1474 | /* the chip can filter 9 addresses perfectly */ |
1472 | PutByte(XIRCREG42_SWC1, 0x01); | 1475 | PutByte(XIRCREG42_SWC1, value | 0x01); |
1473 | SelectPage(0x40); | 1476 | SelectPage(0x40); |
1474 | PutByte(XIRCREG40_CMD0, Offline); | 1477 | PutByte(XIRCREG40_CMD0, Offline); |
1475 | set_addresses(dev); | 1478 | set_addresses(dev); |
1476 | SelectPage(0x40); | 1479 | SelectPage(0x40); |
1477 | PutByte(XIRCREG40_CMD0, EnableRecv | Online); | 1480 | PutByte(XIRCREG40_CMD0, EnableRecv | Online); |
1478 | } else { /* standard usage */ | 1481 | } else { /* standard usage */ |
1479 | PutByte(XIRCREG42_SWC1, 0x00); | 1482 | PutByte(XIRCREG42_SWC1, value | 0x00); |
1480 | } | 1483 | } |
1481 | SelectPage(0); | 1484 | SelectPage(0); |
1482 | } | 1485 | } |
@@ -1722,6 +1725,7 @@ do_reset(struct net_device *dev, int full) | |||
1722 | 1725 | ||
1723 | /* enable receiver and put the mac online */ | 1726 | /* enable receiver and put the mac online */ |
1724 | if (full) { | 1727 | if (full) { |
1728 | set_multicast_list(dev); | ||
1725 | SelectPage(0x40); | 1729 | SelectPage(0x40); |
1726 | PutByte(XIRCREG40_CMD0, EnableRecv | Online); | 1730 | PutByte(XIRCREG40_CMD0, EnableRecv | Online); |
1727 | } | 1731 | } |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index a1c454dbc164..1c89b97f4e09 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -325,7 +325,7 @@ static int pcnet32_get_regs_len(struct net_device *dev); | |||
325 | static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs, | 325 | static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs, |
326 | void *ptr); | 326 | void *ptr); |
327 | static void pcnet32_purge_tx_ring(struct net_device *dev); | 327 | static void pcnet32_purge_tx_ring(struct net_device *dev); |
328 | static int pcnet32_alloc_ring(struct net_device *dev, char *name); | 328 | static int pcnet32_alloc_ring(struct net_device *dev, const char *name); |
329 | static void pcnet32_free_ring(struct net_device *dev); | 329 | static void pcnet32_free_ring(struct net_device *dev); |
330 | static void pcnet32_check_media(struct net_device *dev, int verbose); | 330 | static void pcnet32_check_media(struct net_device *dev, int verbose); |
331 | 331 | ||
@@ -1983,7 +1983,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) | |||
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | /* if any allocation fails, caller must also call pcnet32_free_ring */ | 1985 | /* if any allocation fails, caller must also call pcnet32_free_ring */ |
1986 | static int pcnet32_alloc_ring(struct net_device *dev, char *name) | 1986 | static int pcnet32_alloc_ring(struct net_device *dev, const char *name) |
1987 | { | 1987 | { |
1988 | struct pcnet32_private *lp = netdev_priv(dev); | 1988 | struct pcnet32_private *lp = netdev_priv(dev); |
1989 | 1989 | ||
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 6bf9e76b0a00..6eb2d31d1e34 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
@@ -5,7 +5,7 @@ | |||
5 | menuconfig PHYLIB | 5 | menuconfig PHYLIB |
6 | tristate "PHY Device support and infrastructure" | 6 | tristate "PHY Device support and infrastructure" |
7 | depends on !S390 | 7 | depends on !S390 |
8 | depends on NET_ETHERNET && (BROKEN || !S390) | 8 | depends on NET_ETHERNET |
9 | help | 9 | help |
10 | Ethernet controllers are usually attached to PHY | 10 | Ethernet controllers are usually attached to PHY |
11 | devices. This option provides infrastructure for | 11 | devices. This option provides infrastructure for |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index ac3c01d28fdf..16a0e7de5888 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -207,6 +207,7 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id) | |||
207 | 207 | ||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | EXPORT_SYMBOL(get_phy_id); | ||
210 | 211 | ||
211 | /** | 212 | /** |
212 | * get_phy_device - reads the specified PHY device and returns its @phy_device struct | 213 | * get_phy_device - reads the specified PHY device and returns its @phy_device struct |
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 58a26a47af29..bafb69b6f7cb 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -341,12 +341,6 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb) | |||
341 | struct pppox_sock *relay_po; | 341 | struct pppox_sock *relay_po; |
342 | 342 | ||
343 | if (sk->sk_state & PPPOX_BOUND) { | 343 | if (sk->sk_state & PPPOX_BOUND) { |
344 | struct pppoe_hdr *ph = pppoe_hdr(skb); | ||
345 | int len = ntohs(ph->length); | ||
346 | skb_pull_rcsum(skb, sizeof(struct pppoe_hdr)); | ||
347 | if (pskb_trim_rcsum(skb, len)) | ||
348 | goto abort_kfree; | ||
349 | |||
350 | ppp_input(&po->chan, skb); | 344 | ppp_input(&po->chan, skb); |
351 | } else if (sk->sk_state & PPPOX_RELAY) { | 345 | } else if (sk->sk_state & PPPOX_RELAY) { |
352 | relay_po = get_item_by_addr(&po->pppoe_relay); | 346 | relay_po = get_item_by_addr(&po->pppoe_relay); |
@@ -357,7 +351,6 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb) | |||
357 | if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0) | 351 | if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0) |
358 | goto abort_put; | 352 | goto abort_put; |
359 | 353 | ||
360 | skb_pull(skb, sizeof(struct pppoe_hdr)); | ||
361 | if (!__pppoe_xmit(sk_pppox(relay_po), skb)) | 354 | if (!__pppoe_xmit(sk_pppox(relay_po), skb)) |
362 | goto abort_put; | 355 | goto abort_put; |
363 | } else { | 356 | } else { |
@@ -388,6 +381,7 @@ static int pppoe_rcv(struct sk_buff *skb, | |||
388 | { | 381 | { |
389 | struct pppoe_hdr *ph; | 382 | struct pppoe_hdr *ph; |
390 | struct pppox_sock *po; | 383 | struct pppox_sock *po; |
384 | int len; | ||
391 | 385 | ||
392 | if (!(skb = skb_share_check(skb, GFP_ATOMIC))) | 386 | if (!(skb = skb_share_check(skb, GFP_ATOMIC))) |
393 | goto out; | 387 | goto out; |
@@ -399,10 +393,21 @@ static int pppoe_rcv(struct sk_buff *skb, | |||
399 | goto drop; | 393 | goto drop; |
400 | 394 | ||
401 | ph = pppoe_hdr(skb); | 395 | ph = pppoe_hdr(skb); |
396 | len = ntohs(ph->length); | ||
397 | |||
398 | skb_pull_rcsum(skb, sizeof(*ph)); | ||
399 | if (skb->len < len) | ||
400 | goto drop; | ||
402 | 401 | ||
403 | po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); | 402 | po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); |
404 | if (po != NULL) | 403 | if (!po) |
405 | return sk_receive_skb(sk_pppox(po), skb, 0); | 404 | goto drop; |
405 | |||
406 | if (pskb_trim_rcsum(skb, len)) | ||
407 | goto drop; | ||
408 | |||
409 | return sk_receive_skb(sk_pppox(po), skb, 0); | ||
410 | |||
406 | drop: | 411 | drop: |
407 | kfree_skb(skb); | 412 | kfree_skb(skb); |
408 | out: | 413 | out: |
@@ -427,12 +432,12 @@ static int pppoe_disc_rcv(struct sk_buff *skb, | |||
427 | if (dev_net(dev) != &init_net) | 432 | if (dev_net(dev) != &init_net) |
428 | goto abort; | 433 | goto abort; |
429 | 434 | ||
430 | if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) | ||
431 | goto abort; | ||
432 | |||
433 | if (!(skb = skb_share_check(skb, GFP_ATOMIC))) | 435 | if (!(skb = skb_share_check(skb, GFP_ATOMIC))) |
434 | goto out; | 436 | goto out; |
435 | 437 | ||
438 | if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) | ||
439 | goto abort; | ||
440 | |||
436 | ph = pppoe_hdr(skb); | 441 | ph = pppoe_hdr(skb); |
437 | if (ph->code != PADT_CODE) | 442 | if (ph->code != PADT_CODE) |
438 | goto abort; | 443 | goto abort; |
@@ -937,12 +942,10 @@ static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
937 | m->msg_namelen = 0; | 942 | m->msg_namelen = 0; |
938 | 943 | ||
939 | if (skb) { | 944 | if (skb) { |
940 | struct pppoe_hdr *ph = pppoe_hdr(skb); | 945 | total_len = min(total_len, skb->len); |
941 | const int len = ntohs(ph->length); | 946 | error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len); |
942 | |||
943 | error = memcpy_toiovec(m->msg_iov, (unsigned char *) &ph->tag[0], len); | ||
944 | if (error == 0) | 947 | if (error == 0) |
945 | error = len; | 948 | error = total_len; |
946 | } | 949 | } |
947 | 950 | ||
948 | kfree_skb(skb); | 951 | kfree_skb(skb); |
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 79359919335b..f9298827a76c 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -240,12 +240,15 @@ static inline struct pppol2tp_session *pppol2tp_sock_to_session(struct sock *sk) | |||
240 | if (sk == NULL) | 240 | if (sk == NULL) |
241 | return NULL; | 241 | return NULL; |
242 | 242 | ||
243 | sock_hold(sk); | ||
243 | session = (struct pppol2tp_session *)(sk->sk_user_data); | 244 | session = (struct pppol2tp_session *)(sk->sk_user_data); |
244 | if (session == NULL) | 245 | if (session == NULL) { |
245 | return NULL; | 246 | sock_put(sk); |
247 | goto out; | ||
248 | } | ||
246 | 249 | ||
247 | BUG_ON(session->magic != L2TP_SESSION_MAGIC); | 250 | BUG_ON(session->magic != L2TP_SESSION_MAGIC); |
248 | 251 | out: | |
249 | return session; | 252 | return session; |
250 | } | 253 | } |
251 | 254 | ||
@@ -256,12 +259,15 @@ static inline struct pppol2tp_tunnel *pppol2tp_sock_to_tunnel(struct sock *sk) | |||
256 | if (sk == NULL) | 259 | if (sk == NULL) |
257 | return NULL; | 260 | return NULL; |
258 | 261 | ||
262 | sock_hold(sk); | ||
259 | tunnel = (struct pppol2tp_tunnel *)(sk->sk_user_data); | 263 | tunnel = (struct pppol2tp_tunnel *)(sk->sk_user_data); |
260 | if (tunnel == NULL) | 264 | if (tunnel == NULL) { |
261 | return NULL; | 265 | sock_put(sk); |
266 | goto out; | ||
267 | } | ||
262 | 268 | ||
263 | BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC); | 269 | BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC); |
264 | 270 | out: | |
265 | return tunnel; | 271 | return tunnel; |
266 | } | 272 | } |
267 | 273 | ||
@@ -716,12 +722,14 @@ discard: | |||
716 | session->stats.rx_errors++; | 722 | session->stats.rx_errors++; |
717 | kfree_skb(skb); | 723 | kfree_skb(skb); |
718 | sock_put(session->sock); | 724 | sock_put(session->sock); |
725 | sock_put(sock); | ||
719 | 726 | ||
720 | return 0; | 727 | return 0; |
721 | 728 | ||
722 | error: | 729 | error: |
723 | /* Put UDP header back */ | 730 | /* Put UDP header back */ |
724 | __skb_push(skb, sizeof(struct udphdr)); | 731 | __skb_push(skb, sizeof(struct udphdr)); |
732 | sock_put(sock); | ||
725 | 733 | ||
726 | no_tunnel: | 734 | no_tunnel: |
727 | return 1; | 735 | return 1; |
@@ -745,10 +753,13 @@ static int pppol2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb) | |||
745 | "%s: received %d bytes\n", tunnel->name, skb->len); | 753 | "%s: received %d bytes\n", tunnel->name, skb->len); |
746 | 754 | ||
747 | if (pppol2tp_recv_core(sk, skb)) | 755 | if (pppol2tp_recv_core(sk, skb)) |
748 | goto pass_up; | 756 | goto pass_up_put; |
749 | 757 | ||
758 | sock_put(sk); | ||
750 | return 0; | 759 | return 0; |
751 | 760 | ||
761 | pass_up_put: | ||
762 | sock_put(sk); | ||
752 | pass_up: | 763 | pass_up: |
753 | return 1; | 764 | return 1; |
754 | } | 765 | } |
@@ -772,14 +783,18 @@ static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
772 | err = 0; | 783 | err = 0; |
773 | skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, | 784 | skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, |
774 | flags & MSG_DONTWAIT, &err); | 785 | flags & MSG_DONTWAIT, &err); |
775 | if (skb) { | 786 | if (!skb) |
776 | err = memcpy_toiovec(msg->msg_iov, (unsigned char *) skb->data, | 787 | goto end; |
777 | skb->len); | 788 | |
778 | if (err < 0) | 789 | if (len > skb->len) |
779 | goto do_skb_free; | 790 | len = skb->len; |
780 | err = skb->len; | 791 | else if (len < skb->len) |
781 | } | 792 | msg->msg_flags |= MSG_TRUNC; |
782 | do_skb_free: | 793 | |
794 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, len); | ||
795 | if (likely(err == 0)) | ||
796 | err = len; | ||
797 | |||
783 | kfree_skb(skb); | 798 | kfree_skb(skb); |
784 | end: | 799 | end: |
785 | return err; | 800 | return err; |
@@ -858,7 +873,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh | |||
858 | 873 | ||
859 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); | 874 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); |
860 | if (tunnel == NULL) | 875 | if (tunnel == NULL) |
861 | goto error; | 876 | goto error_put_sess; |
862 | 877 | ||
863 | /* What header length is configured for this session? */ | 878 | /* What header length is configured for this session? */ |
864 | hdr_len = pppol2tp_l2tp_header_len(session); | 879 | hdr_len = pppol2tp_l2tp_header_len(session); |
@@ -870,7 +885,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh | |||
870 | sizeof(ppph) + total_len, | 885 | sizeof(ppph) + total_len, |
871 | 0, GFP_KERNEL); | 886 | 0, GFP_KERNEL); |
872 | if (!skb) | 887 | if (!skb) |
873 | goto error; | 888 | goto error_put_sess_tun; |
874 | 889 | ||
875 | /* Reserve space for headers. */ | 890 | /* Reserve space for headers. */ |
876 | skb_reserve(skb, NET_SKB_PAD); | 891 | skb_reserve(skb, NET_SKB_PAD); |
@@ -900,7 +915,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh | |||
900 | error = memcpy_fromiovec(skb->data, m->msg_iov, total_len); | 915 | error = memcpy_fromiovec(skb->data, m->msg_iov, total_len); |
901 | if (error < 0) { | 916 | if (error < 0) { |
902 | kfree_skb(skb); | 917 | kfree_skb(skb); |
903 | goto error; | 918 | goto error_put_sess_tun; |
904 | } | 919 | } |
905 | skb_put(skb, total_len); | 920 | skb_put(skb, total_len); |
906 | 921 | ||
@@ -947,10 +962,33 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh | |||
947 | session->stats.tx_errors++; | 962 | session->stats.tx_errors++; |
948 | } | 963 | } |
949 | 964 | ||
965 | return error; | ||
966 | |||
967 | error_put_sess_tun: | ||
968 | sock_put(session->tunnel_sock); | ||
969 | error_put_sess: | ||
970 | sock_put(sk); | ||
950 | error: | 971 | error: |
951 | return error; | 972 | return error; |
952 | } | 973 | } |
953 | 974 | ||
975 | /* Automatically called when the skb is freed. | ||
976 | */ | ||
977 | static void pppol2tp_sock_wfree(struct sk_buff *skb) | ||
978 | { | ||
979 | sock_put(skb->sk); | ||
980 | } | ||
981 | |||
982 | /* For data skbs that we transmit, we associate with the tunnel socket | ||
983 | * but don't do accounting. | ||
984 | */ | ||
985 | static inline void pppol2tp_skb_set_owner_w(struct sk_buff *skb, struct sock *sk) | ||
986 | { | ||
987 | sock_hold(sk); | ||
988 | skb->sk = sk; | ||
989 | skb->destructor = pppol2tp_sock_wfree; | ||
990 | } | ||
991 | |||
954 | /* Transmit function called by generic PPP driver. Sends PPP frame | 992 | /* Transmit function called by generic PPP driver. Sends PPP frame |
955 | * over PPPoL2TP socket. | 993 | * over PPPoL2TP socket. |
956 | * | 994 | * |
@@ -980,6 +1018,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
980 | __wsum csum = 0; | 1018 | __wsum csum = 0; |
981 | struct udphdr *uh; | 1019 | struct udphdr *uh; |
982 | unsigned int len; | 1020 | unsigned int len; |
1021 | int old_headroom; | ||
1022 | int new_headroom; | ||
983 | 1023 | ||
984 | if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) | 1024 | if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) |
985 | goto abort; | 1025 | goto abort; |
@@ -991,25 +1031,27 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
991 | 1031 | ||
992 | sk_tun = session->tunnel_sock; | 1032 | sk_tun = session->tunnel_sock; |
993 | if (sk_tun == NULL) | 1033 | if (sk_tun == NULL) |
994 | goto abort; | 1034 | goto abort_put_sess; |
995 | tunnel = pppol2tp_sock_to_tunnel(sk_tun); | 1035 | tunnel = pppol2tp_sock_to_tunnel(sk_tun); |
996 | if (tunnel == NULL) | 1036 | if (tunnel == NULL) |
997 | goto abort; | 1037 | goto abort_put_sess; |
998 | 1038 | ||
999 | /* What header length is configured for this session? */ | 1039 | /* What header length is configured for this session? */ |
1000 | hdr_len = pppol2tp_l2tp_header_len(session); | 1040 | hdr_len = pppol2tp_l2tp_header_len(session); |
1001 | 1041 | ||
1002 | /* Check that there's enough headroom in the skb to insert IP, | 1042 | /* Check that there's enough headroom in the skb to insert IP, |
1003 | * UDP and L2TP and PPP headers. If not enough, expand it to | 1043 | * UDP and L2TP and PPP headers. If not enough, expand it to |
1004 | * make room. Note that a new skb (or a clone) is | 1044 | * make room. Adjust truesize. |
1005 | * allocated. If we return an error from this point on, make | ||
1006 | * sure we free the new skb but do not free the original skb | ||
1007 | * since that is done by the caller for the error case. | ||
1008 | */ | 1045 | */ |
1009 | headroom = NET_SKB_PAD + sizeof(struct iphdr) + | 1046 | headroom = NET_SKB_PAD + sizeof(struct iphdr) + |
1010 | sizeof(struct udphdr) + hdr_len + sizeof(ppph); | 1047 | sizeof(struct udphdr) + hdr_len + sizeof(ppph); |
1048 | old_headroom = skb_headroom(skb); | ||
1011 | if (skb_cow_head(skb, headroom)) | 1049 | if (skb_cow_head(skb, headroom)) |
1012 | goto abort; | 1050 | goto abort_put_sess_tun; |
1051 | |||
1052 | new_headroom = skb_headroom(skb); | ||
1053 | skb_orphan(skb); | ||
1054 | skb->truesize += new_headroom - old_headroom; | ||
1013 | 1055 | ||
1014 | /* Setup PPP header */ | 1056 | /* Setup PPP header */ |
1015 | __skb_push(skb, sizeof(ppph)); | 1057 | __skb_push(skb, sizeof(ppph)); |
@@ -1065,8 +1107,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
1065 | /* Get routing info from the tunnel socket */ | 1107 | /* Get routing info from the tunnel socket */ |
1066 | dst_release(skb->dst); | 1108 | dst_release(skb->dst); |
1067 | skb->dst = dst_clone(__sk_dst_get(sk_tun)); | 1109 | skb->dst = dst_clone(__sk_dst_get(sk_tun)); |
1068 | skb_orphan(skb); | 1110 | pppol2tp_skb_set_owner_w(skb, sk_tun); |
1069 | skb->sk = sk_tun; | ||
1070 | 1111 | ||
1071 | /* Queue the packet to IP for output */ | 1112 | /* Queue the packet to IP for output */ |
1072 | len = skb->len; | 1113 | len = skb->len; |
@@ -1083,8 +1124,14 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
1083 | session->stats.tx_errors++; | 1124 | session->stats.tx_errors++; |
1084 | } | 1125 | } |
1085 | 1126 | ||
1127 | sock_put(sk_tun); | ||
1128 | sock_put(sk); | ||
1086 | return 1; | 1129 | return 1; |
1087 | 1130 | ||
1131 | abort_put_sess_tun: | ||
1132 | sock_put(sk_tun); | ||
1133 | abort_put_sess: | ||
1134 | sock_put(sk); | ||
1088 | abort: | 1135 | abort: |
1089 | /* Free the original skb */ | 1136 | /* Free the original skb */ |
1090 | kfree_skb(skb); | 1137 | kfree_skb(skb); |
@@ -1188,7 +1235,7 @@ static void pppol2tp_tunnel_destruct(struct sock *sk) | |||
1188 | { | 1235 | { |
1189 | struct pppol2tp_tunnel *tunnel; | 1236 | struct pppol2tp_tunnel *tunnel; |
1190 | 1237 | ||
1191 | tunnel = pppol2tp_sock_to_tunnel(sk); | 1238 | tunnel = sk->sk_user_data; |
1192 | if (tunnel == NULL) | 1239 | if (tunnel == NULL) |
1193 | goto end; | 1240 | goto end; |
1194 | 1241 | ||
@@ -1227,10 +1274,12 @@ static void pppol2tp_session_destruct(struct sock *sk) | |||
1227 | if (sk->sk_user_data != NULL) { | 1274 | if (sk->sk_user_data != NULL) { |
1228 | struct pppol2tp_tunnel *tunnel; | 1275 | struct pppol2tp_tunnel *tunnel; |
1229 | 1276 | ||
1230 | session = pppol2tp_sock_to_session(sk); | 1277 | session = sk->sk_user_data; |
1231 | if (session == NULL) | 1278 | if (session == NULL) |
1232 | goto out; | 1279 | goto out; |
1233 | 1280 | ||
1281 | BUG_ON(session->magic != L2TP_SESSION_MAGIC); | ||
1282 | |||
1234 | /* Don't use pppol2tp_sock_to_tunnel() here to | 1283 | /* Don't use pppol2tp_sock_to_tunnel() here to |
1235 | * get the tunnel context because the tunnel | 1284 | * get the tunnel context because the tunnel |
1236 | * socket might have already been closed (its | 1285 | * socket might have already been closed (its |
@@ -1276,6 +1325,7 @@ out: | |||
1276 | static int pppol2tp_release(struct socket *sock) | 1325 | static int pppol2tp_release(struct socket *sock) |
1277 | { | 1326 | { |
1278 | struct sock *sk = sock->sk; | 1327 | struct sock *sk = sock->sk; |
1328 | struct pppol2tp_session *session; | ||
1279 | int error; | 1329 | int error; |
1280 | 1330 | ||
1281 | if (!sk) | 1331 | if (!sk) |
@@ -1293,9 +1343,18 @@ static int pppol2tp_release(struct socket *sock) | |||
1293 | sock_orphan(sk); | 1343 | sock_orphan(sk); |
1294 | sock->sk = NULL; | 1344 | sock->sk = NULL; |
1295 | 1345 | ||
1346 | session = pppol2tp_sock_to_session(sk); | ||
1347 | |||
1296 | /* Purge any queued data */ | 1348 | /* Purge any queued data */ |
1297 | skb_queue_purge(&sk->sk_receive_queue); | 1349 | skb_queue_purge(&sk->sk_receive_queue); |
1298 | skb_queue_purge(&sk->sk_write_queue); | 1350 | skb_queue_purge(&sk->sk_write_queue); |
1351 | if (session != NULL) { | ||
1352 | struct sk_buff *skb; | ||
1353 | while ((skb = skb_dequeue(&session->reorder_q))) { | ||
1354 | kfree_skb(skb); | ||
1355 | sock_put(sk); | ||
1356 | } | ||
1357 | } | ||
1299 | 1358 | ||
1300 | release_sock(sk); | 1359 | release_sock(sk); |
1301 | 1360 | ||
@@ -1598,7 +1657,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
1598 | 1657 | ||
1599 | error = ppp_register_channel(&po->chan); | 1658 | error = ppp_register_channel(&po->chan); |
1600 | if (error) | 1659 | if (error) |
1601 | goto end; | 1660 | goto end_put_tun; |
1602 | 1661 | ||
1603 | /* This is how we get the session context from the socket. */ | 1662 | /* This is how we get the session context from the socket. */ |
1604 | sk->sk_user_data = session; | 1663 | sk->sk_user_data = session; |
@@ -1618,6 +1677,8 @@ out_no_ppp: | |||
1618 | PRINTK(session->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, | 1677 | PRINTK(session->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, |
1619 | "%s: created\n", session->name); | 1678 | "%s: created\n", session->name); |
1620 | 1679 | ||
1680 | end_put_tun: | ||
1681 | sock_put(tunnel_sock); | ||
1621 | end: | 1682 | end: |
1622 | release_sock(sk); | 1683 | release_sock(sk); |
1623 | 1684 | ||
@@ -1665,6 +1726,7 @@ static int pppol2tp_getname(struct socket *sock, struct sockaddr *uaddr, | |||
1665 | *usockaddr_len = len; | 1726 | *usockaddr_len = len; |
1666 | 1727 | ||
1667 | error = 0; | 1728 | error = 0; |
1729 | sock_put(sock->sk); | ||
1668 | 1730 | ||
1669 | end: | 1731 | end: |
1670 | return error; | 1732 | return error; |
@@ -1903,14 +1965,17 @@ static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd, | |||
1903 | err = -EBADF; | 1965 | err = -EBADF; |
1904 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); | 1966 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); |
1905 | if (tunnel == NULL) | 1967 | if (tunnel == NULL) |
1906 | goto end; | 1968 | goto end_put_sess; |
1907 | 1969 | ||
1908 | err = pppol2tp_tunnel_ioctl(tunnel, cmd, arg); | 1970 | err = pppol2tp_tunnel_ioctl(tunnel, cmd, arg); |
1909 | goto end; | 1971 | sock_put(session->tunnel_sock); |
1972 | goto end_put_sess; | ||
1910 | } | 1973 | } |
1911 | 1974 | ||
1912 | err = pppol2tp_session_ioctl(session, cmd, arg); | 1975 | err = pppol2tp_session_ioctl(session, cmd, arg); |
1913 | 1976 | ||
1977 | end_put_sess: | ||
1978 | sock_put(sk); | ||
1914 | end: | 1979 | end: |
1915 | return err; | 1980 | return err; |
1916 | } | 1981 | } |
@@ -2056,14 +2121,17 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname, | |||
2056 | err = -EBADF; | 2121 | err = -EBADF; |
2057 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); | 2122 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); |
2058 | if (tunnel == NULL) | 2123 | if (tunnel == NULL) |
2059 | goto end; | 2124 | goto end_put_sess; |
2060 | 2125 | ||
2061 | err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val); | 2126 | err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val); |
2127 | sock_put(session->tunnel_sock); | ||
2062 | } else | 2128 | } else |
2063 | err = pppol2tp_session_setsockopt(sk, session, optname, val); | 2129 | err = pppol2tp_session_setsockopt(sk, session, optname, val); |
2064 | 2130 | ||
2065 | err = 0; | 2131 | err = 0; |
2066 | 2132 | ||
2133 | end_put_sess: | ||
2134 | sock_put(sk); | ||
2067 | end: | 2135 | end: |
2068 | return err; | 2136 | return err; |
2069 | } | 2137 | } |
@@ -2178,20 +2246,24 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, | |||
2178 | err = -EBADF; | 2246 | err = -EBADF; |
2179 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); | 2247 | tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); |
2180 | if (tunnel == NULL) | 2248 | if (tunnel == NULL) |
2181 | goto end; | 2249 | goto end_put_sess; |
2182 | 2250 | ||
2183 | err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val); | 2251 | err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val); |
2252 | sock_put(session->tunnel_sock); | ||
2184 | } else | 2253 | } else |
2185 | err = pppol2tp_session_getsockopt(sk, session, optname, &val); | 2254 | err = pppol2tp_session_getsockopt(sk, session, optname, &val); |
2186 | 2255 | ||
2187 | err = -EFAULT; | 2256 | err = -EFAULT; |
2188 | if (put_user(len, (int __user *) optlen)) | 2257 | if (put_user(len, (int __user *) optlen)) |
2189 | goto end; | 2258 | goto end_put_sess; |
2190 | 2259 | ||
2191 | if (copy_to_user((void __user *) optval, &val, len)) | 2260 | if (copy_to_user((void __user *) optval, &val, len)) |
2192 | goto end; | 2261 | goto end_put_sess; |
2193 | 2262 | ||
2194 | err = 0; | 2263 | err = 0; |
2264 | |||
2265 | end_put_sess: | ||
2266 | sock_put(sk); | ||
2195 | end: | 2267 | end: |
2196 | return err; | 2268 | return err; |
2197 | } | 2269 | } |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 169edc154928..858b191517b3 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -733,7 +733,7 @@ static void r6040_timer(unsigned long data) | |||
733 | } | 733 | } |
734 | 734 | ||
735 | /* Timer active again */ | 735 | /* Timer active again */ |
736 | mod_timer(&lp->timer, jiffies + round_jiffies(HZ)); | 736 | mod_timer(&lp->timer, round_jiffies(jiffies + HZ)); |
737 | } | 737 | } |
738 | 738 | ||
739 | /* Read/set MAC address routines */ | 739 | /* Read/set MAC address routines */ |
diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h index 2109508c047a..f8274f8941ea 100644 --- a/drivers/net/s2io-regs.h +++ b/drivers/net/s2io-regs.h | |||
@@ -250,7 +250,7 @@ struct XENA_dev_config { | |||
250 | u64 tx_mat0_n[0x8]; | 250 | u64 tx_mat0_n[0x8]; |
251 | #define TX_MAT_SET(fifo, msi) vBIT(msi, (8 * fifo), 8) | 251 | #define TX_MAT_SET(fifo, msi) vBIT(msi, (8 * fifo), 8) |
252 | 252 | ||
253 | u8 unused_1[0x8]; | 253 | u64 xmsi_mask_reg; |
254 | u64 stat_byte_cnt; | 254 | u64 stat_byte_cnt; |
255 | #define STAT_BC(n) vBIT(n,4,12) | 255 | #define STAT_BC(n) vBIT(n,4,12) |
256 | 256 | ||
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 523478ebfd69..b5c1e663417d 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -86,7 +86,7 @@ | |||
86 | #include "s2io.h" | 86 | #include "s2io.h" |
87 | #include "s2io-regs.h" | 87 | #include "s2io-regs.h" |
88 | 88 | ||
89 | #define DRV_VERSION "2.0.26.23" | 89 | #define DRV_VERSION "2.0.26.24" |
90 | 90 | ||
91 | /* S2io Driver name & version. */ | 91 | /* S2io Driver name & version. */ |
92 | static char s2io_driver_name[] = "Neterion"; | 92 | static char s2io_driver_name[] = "Neterion"; |
@@ -1113,9 +1113,10 @@ static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev) | |||
1113 | struct pci_dev *tdev = NULL; | 1113 | struct pci_dev *tdev = NULL; |
1114 | while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { | 1114 | while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { |
1115 | if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { | 1115 | if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { |
1116 | if (tdev->bus == s2io_pdev->bus->parent) | 1116 | if (tdev->bus == s2io_pdev->bus->parent) { |
1117 | pci_dev_put(tdev); | 1117 | pci_dev_put(tdev); |
1118 | return 1; | 1118 | return 1; |
1119 | } | ||
1119 | } | 1120 | } |
1120 | } | 1121 | } |
1121 | return 0; | 1122 | return 0; |
@@ -1219,15 +1220,33 @@ static int init_tti(struct s2io_nic *nic, int link) | |||
1219 | TTI_DATA1_MEM_TX_URNG_B(0x10) | | 1220 | TTI_DATA1_MEM_TX_URNG_B(0x10) | |
1220 | TTI_DATA1_MEM_TX_URNG_C(0x30) | | 1221 | TTI_DATA1_MEM_TX_URNG_C(0x30) | |
1221 | TTI_DATA1_MEM_TX_TIMER_AC_EN; | 1222 | TTI_DATA1_MEM_TX_TIMER_AC_EN; |
1222 | 1223 | if (i == 0) | |
1223 | if (use_continuous_tx_intrs && (link == LINK_UP)) | 1224 | if (use_continuous_tx_intrs && (link == LINK_UP)) |
1224 | val64 |= TTI_DATA1_MEM_TX_TIMER_CI_EN; | 1225 | val64 |= TTI_DATA1_MEM_TX_TIMER_CI_EN; |
1225 | writeq(val64, &bar0->tti_data1_mem); | 1226 | writeq(val64, &bar0->tti_data1_mem); |
1226 | 1227 | ||
1227 | val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | | 1228 | if (nic->config.intr_type == MSI_X) { |
1228 | TTI_DATA2_MEM_TX_UFC_B(0x20) | | 1229 | val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | |
1229 | TTI_DATA2_MEM_TX_UFC_C(0x40) | | 1230 | TTI_DATA2_MEM_TX_UFC_B(0x100) | |
1230 | TTI_DATA2_MEM_TX_UFC_D(0x80); | 1231 | TTI_DATA2_MEM_TX_UFC_C(0x200) | |
1232 | TTI_DATA2_MEM_TX_UFC_D(0x300); | ||
1233 | } else { | ||
1234 | if ((nic->config.tx_steering_type == | ||
1235 | TX_DEFAULT_STEERING) && | ||
1236 | (config->tx_fifo_num > 1) && | ||
1237 | (i >= nic->udp_fifo_idx) && | ||
1238 | (i < (nic->udp_fifo_idx + | ||
1239 | nic->total_udp_fifos))) | ||
1240 | val64 = TTI_DATA2_MEM_TX_UFC_A(0x50) | | ||
1241 | TTI_DATA2_MEM_TX_UFC_B(0x80) | | ||
1242 | TTI_DATA2_MEM_TX_UFC_C(0x100) | | ||
1243 | TTI_DATA2_MEM_TX_UFC_D(0x120); | ||
1244 | else | ||
1245 | val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | | ||
1246 | TTI_DATA2_MEM_TX_UFC_B(0x20) | | ||
1247 | TTI_DATA2_MEM_TX_UFC_C(0x40) | | ||
1248 | TTI_DATA2_MEM_TX_UFC_D(0x80); | ||
1249 | } | ||
1231 | 1250 | ||
1232 | writeq(val64, &bar0->tti_data2_mem); | 1251 | writeq(val64, &bar0->tti_data2_mem); |
1233 | 1252 | ||
@@ -2813,6 +2832,15 @@ static void free_rx_buffers(struct s2io_nic *sp) | |||
2813 | } | 2832 | } |
2814 | } | 2833 | } |
2815 | 2834 | ||
2835 | static int s2io_chk_rx_buffers(struct ring_info *ring) | ||
2836 | { | ||
2837 | if (fill_rx_buffers(ring) == -ENOMEM) { | ||
2838 | DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name); | ||
2839 | DBG_PRINT(INFO_DBG, " in Rx Intr!!\n"); | ||
2840 | } | ||
2841 | return 0; | ||
2842 | } | ||
2843 | |||
2816 | /** | 2844 | /** |
2817 | * s2io_poll - Rx interrupt handler for NAPI support | 2845 | * s2io_poll - Rx interrupt handler for NAPI support |
2818 | * @napi : pointer to the napi structure. | 2846 | * @napi : pointer to the napi structure. |
@@ -2826,57 +2854,73 @@ static void free_rx_buffers(struct s2io_nic *sp) | |||
2826 | * 0 on success and 1 if there are No Rx packets to be processed. | 2854 | * 0 on success and 1 if there are No Rx packets to be processed. |
2827 | */ | 2855 | */ |
2828 | 2856 | ||
2829 | static int s2io_poll(struct napi_struct *napi, int budget) | 2857 | static int s2io_poll_msix(struct napi_struct *napi, int budget) |
2830 | { | 2858 | { |
2831 | struct s2io_nic *nic = container_of(napi, struct s2io_nic, napi); | 2859 | struct ring_info *ring = container_of(napi, struct ring_info, napi); |
2832 | struct net_device *dev = nic->dev; | 2860 | struct net_device *dev = ring->dev; |
2833 | int pkt_cnt = 0, org_pkts_to_process; | ||
2834 | struct mac_info *mac_control; | ||
2835 | struct config_param *config; | 2861 | struct config_param *config; |
2862 | struct mac_info *mac_control; | ||
2863 | int pkts_processed = 0; | ||
2864 | u8 __iomem *addr = NULL; | ||
2865 | u8 val8 = 0; | ||
2866 | struct s2io_nic *nic = dev->priv; | ||
2836 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 2867 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
2837 | int i; | 2868 | int budget_org = budget; |
2838 | 2869 | ||
2839 | mac_control = &nic->mac_control; | ||
2840 | config = &nic->config; | 2870 | config = &nic->config; |
2871 | mac_control = &nic->mac_control; | ||
2841 | 2872 | ||
2842 | nic->pkts_to_process = budget; | 2873 | if (unlikely(!is_s2io_card_up(nic))) |
2843 | org_pkts_to_process = nic->pkts_to_process; | 2874 | return 0; |
2844 | 2875 | ||
2845 | writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); | 2876 | pkts_processed = rx_intr_handler(ring, budget); |
2846 | readl(&bar0->rx_traffic_int); | 2877 | s2io_chk_rx_buffers(ring); |
2847 | 2878 | ||
2848 | for (i = 0; i < config->rx_ring_num; i++) { | 2879 | if (pkts_processed < budget_org) { |
2849 | rx_intr_handler(&mac_control->rings[i]); | 2880 | netif_rx_complete(dev, napi); |
2850 | pkt_cnt = org_pkts_to_process - nic->pkts_to_process; | 2881 | /*Re Enable MSI-Rx Vector*/ |
2851 | if (!nic->pkts_to_process) { | 2882 | addr = (u8 __iomem *)&bar0->xmsi_mask_reg; |
2852 | /* Quota for the current iteration has been met */ | 2883 | addr += 7 - ring->ring_no; |
2853 | goto no_rx; | 2884 | val8 = (ring->ring_no == 0) ? 0x3f : 0xbf; |
2854 | } | 2885 | writeb(val8, addr); |
2886 | val8 = readb(addr); | ||
2855 | } | 2887 | } |
2888 | return pkts_processed; | ||
2889 | } | ||
2890 | static int s2io_poll_inta(struct napi_struct *napi, int budget) | ||
2891 | { | ||
2892 | struct s2io_nic *nic = container_of(napi, struct s2io_nic, napi); | ||
2893 | struct ring_info *ring; | ||
2894 | struct net_device *dev = nic->dev; | ||
2895 | struct config_param *config; | ||
2896 | struct mac_info *mac_control; | ||
2897 | int pkts_processed = 0; | ||
2898 | int ring_pkts_processed, i; | ||
2899 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | ||
2900 | int budget_org = budget; | ||
2856 | 2901 | ||
2857 | netif_rx_complete(dev, napi); | 2902 | config = &nic->config; |
2903 | mac_control = &nic->mac_control; | ||
2858 | 2904 | ||
2859 | for (i = 0; i < config->rx_ring_num; i++) { | 2905 | if (unlikely(!is_s2io_card_up(nic))) |
2860 | if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { | 2906 | return 0; |
2861 | DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name); | ||
2862 | DBG_PRINT(INFO_DBG, " in Rx Poll!!\n"); | ||
2863 | break; | ||
2864 | } | ||
2865 | } | ||
2866 | /* Re enable the Rx interrupts. */ | ||
2867 | writeq(0x0, &bar0->rx_traffic_mask); | ||
2868 | readl(&bar0->rx_traffic_mask); | ||
2869 | return pkt_cnt; | ||
2870 | 2907 | ||
2871 | no_rx: | ||
2872 | for (i = 0; i < config->rx_ring_num; i++) { | 2908 | for (i = 0; i < config->rx_ring_num; i++) { |
2873 | if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { | 2909 | ring = &mac_control->rings[i]; |
2874 | DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name); | 2910 | ring_pkts_processed = rx_intr_handler(ring, budget); |
2875 | DBG_PRINT(INFO_DBG, " in Rx Poll!!\n"); | 2911 | s2io_chk_rx_buffers(ring); |
2912 | pkts_processed += ring_pkts_processed; | ||
2913 | budget -= ring_pkts_processed; | ||
2914 | if (budget <= 0) | ||
2876 | break; | 2915 | break; |
2877 | } | ||
2878 | } | 2916 | } |
2879 | return pkt_cnt; | 2917 | if (pkts_processed < budget_org) { |
2918 | netif_rx_complete(dev, napi); | ||
2919 | /* Re enable the Rx interrupts for the ring */ | ||
2920 | writeq(0, &bar0->rx_traffic_mask); | ||
2921 | readl(&bar0->rx_traffic_mask); | ||
2922 | } | ||
2923 | return pkts_processed; | ||
2880 | } | 2924 | } |
2881 | 2925 | ||
2882 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2926 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -2918,7 +2962,7 @@ static void s2io_netpoll(struct net_device *dev) | |||
2918 | 2962 | ||
2919 | /* check for received packet and indicate up to network */ | 2963 | /* check for received packet and indicate up to network */ |
2920 | for (i = 0; i < config->rx_ring_num; i++) | 2964 | for (i = 0; i < config->rx_ring_num; i++) |
2921 | rx_intr_handler(&mac_control->rings[i]); | 2965 | rx_intr_handler(&mac_control->rings[i], 0); |
2922 | 2966 | ||
2923 | for (i = 0; i < config->rx_ring_num; i++) { | 2967 | for (i = 0; i < config->rx_ring_num; i++) { |
2924 | if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { | 2968 | if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { |
@@ -2934,7 +2978,8 @@ static void s2io_netpoll(struct net_device *dev) | |||
2934 | 2978 | ||
2935 | /** | 2979 | /** |
2936 | * rx_intr_handler - Rx interrupt handler | 2980 | * rx_intr_handler - Rx interrupt handler |
2937 | * @nic: device private variable. | 2981 | * @ring_info: per ring structure. |
2982 | * @budget: budget for napi processing. | ||
2938 | * Description: | 2983 | * Description: |
2939 | * If the interrupt is because of a received frame or if the | 2984 | * If the interrupt is because of a received frame or if the |
2940 | * receive ring contains fresh as yet un-processed frames,this function is | 2985 | * receive ring contains fresh as yet un-processed frames,this function is |
@@ -2942,15 +2987,15 @@ static void s2io_netpoll(struct net_device *dev) | |||
2942 | * stopped and sends the skb to the OSM's Rx handler and then increments | 2987 | * stopped and sends the skb to the OSM's Rx handler and then increments |
2943 | * the offset. | 2988 | * the offset. |
2944 | * Return Value: | 2989 | * Return Value: |
2945 | * NONE. | 2990 | * No. of napi packets processed. |
2946 | */ | 2991 | */ |
2947 | static void rx_intr_handler(struct ring_info *ring_data) | 2992 | static int rx_intr_handler(struct ring_info *ring_data, int budget) |
2948 | { | 2993 | { |
2949 | int get_block, put_block; | 2994 | int get_block, put_block; |
2950 | struct rx_curr_get_info get_info, put_info; | 2995 | struct rx_curr_get_info get_info, put_info; |
2951 | struct RxD_t *rxdp; | 2996 | struct RxD_t *rxdp; |
2952 | struct sk_buff *skb; | 2997 | struct sk_buff *skb; |
2953 | int pkt_cnt = 0; | 2998 | int pkt_cnt = 0, napi_pkts = 0; |
2954 | int i; | 2999 | int i; |
2955 | struct RxD1* rxdp1; | 3000 | struct RxD1* rxdp1; |
2956 | struct RxD3* rxdp3; | 3001 | struct RxD3* rxdp3; |
@@ -2977,7 +3022,7 @@ static void rx_intr_handler(struct ring_info *ring_data) | |||
2977 | DBG_PRINT(ERR_DBG, "%s: The skb is ", | 3022 | DBG_PRINT(ERR_DBG, "%s: The skb is ", |
2978 | ring_data->dev->name); | 3023 | ring_data->dev->name); |
2979 | DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); | 3024 | DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); |
2980 | return; | 3025 | return 0; |
2981 | } | 3026 | } |
2982 | if (ring_data->rxd_mode == RXD_MODE_1) { | 3027 | if (ring_data->rxd_mode == RXD_MODE_1) { |
2983 | rxdp1 = (struct RxD1*)rxdp; | 3028 | rxdp1 = (struct RxD1*)rxdp; |
@@ -3014,9 +3059,10 @@ static void rx_intr_handler(struct ring_info *ring_data) | |||
3014 | rxdp = ring_data->rx_blocks[get_block].block_virt_addr; | 3059 | rxdp = ring_data->rx_blocks[get_block].block_virt_addr; |
3015 | } | 3060 | } |
3016 | 3061 | ||
3017 | if(ring_data->nic->config.napi){ | 3062 | if (ring_data->nic->config.napi) { |
3018 | ring_data->nic->pkts_to_process -= 1; | 3063 | budget--; |
3019 | if (!ring_data->nic->pkts_to_process) | 3064 | napi_pkts++; |
3065 | if (!budget) | ||
3020 | break; | 3066 | break; |
3021 | } | 3067 | } |
3022 | pkt_cnt++; | 3068 | pkt_cnt++; |
@@ -3034,6 +3080,7 @@ static void rx_intr_handler(struct ring_info *ring_data) | |||
3034 | } | 3080 | } |
3035 | } | 3081 | } |
3036 | } | 3082 | } |
3083 | return(napi_pkts); | ||
3037 | } | 3084 | } |
3038 | 3085 | ||
3039 | /** | 3086 | /** |
@@ -3730,14 +3777,19 @@ static void restore_xmsi_data(struct s2io_nic *nic) | |||
3730 | { | 3777 | { |
3731 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 3778 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
3732 | u64 val64; | 3779 | u64 val64; |
3733 | int i; | 3780 | int i, msix_index; |
3781 | |||
3782 | |||
3783 | if (nic->device_type == XFRAME_I_DEVICE) | ||
3784 | return; | ||
3734 | 3785 | ||
3735 | for (i=0; i < MAX_REQUESTED_MSI_X; i++) { | 3786 | for (i=0; i < MAX_REQUESTED_MSI_X; i++) { |
3787 | msix_index = (i) ? ((i-1) * 8 + 1): 0; | ||
3736 | writeq(nic->msix_info[i].addr, &bar0->xmsi_address); | 3788 | writeq(nic->msix_info[i].addr, &bar0->xmsi_address); |
3737 | writeq(nic->msix_info[i].data, &bar0->xmsi_data); | 3789 | writeq(nic->msix_info[i].data, &bar0->xmsi_data); |
3738 | val64 = (s2BIT(7) | s2BIT(15) | vBIT(i, 26, 6)); | 3790 | val64 = (s2BIT(7) | s2BIT(15) | vBIT(msix_index, 26, 6)); |
3739 | writeq(val64, &bar0->xmsi_access); | 3791 | writeq(val64, &bar0->xmsi_access); |
3740 | if (wait_for_msix_trans(nic, i)) { | 3792 | if (wait_for_msix_trans(nic, msix_index)) { |
3741 | DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); | 3793 | DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); |
3742 | continue; | 3794 | continue; |
3743 | } | 3795 | } |
@@ -3748,13 +3800,17 @@ static void store_xmsi_data(struct s2io_nic *nic) | |||
3748 | { | 3800 | { |
3749 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 3801 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
3750 | u64 val64, addr, data; | 3802 | u64 val64, addr, data; |
3751 | int i; | 3803 | int i, msix_index; |
3804 | |||
3805 | if (nic->device_type == XFRAME_I_DEVICE) | ||
3806 | return; | ||
3752 | 3807 | ||
3753 | /* Store and display */ | 3808 | /* Store and display */ |
3754 | for (i=0; i < MAX_REQUESTED_MSI_X; i++) { | 3809 | for (i=0; i < MAX_REQUESTED_MSI_X; i++) { |
3755 | val64 = (s2BIT(15) | vBIT(i, 26, 6)); | 3810 | msix_index = (i) ? ((i-1) * 8 + 1): 0; |
3811 | val64 = (s2BIT(15) | vBIT(msix_index, 26, 6)); | ||
3756 | writeq(val64, &bar0->xmsi_access); | 3812 | writeq(val64, &bar0->xmsi_access); |
3757 | if (wait_for_msix_trans(nic, i)) { | 3813 | if (wait_for_msix_trans(nic, msix_index)) { |
3758 | DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); | 3814 | DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); |
3759 | continue; | 3815 | continue; |
3760 | } | 3816 | } |
@@ -3770,11 +3826,11 @@ static void store_xmsi_data(struct s2io_nic *nic) | |||
3770 | static int s2io_enable_msi_x(struct s2io_nic *nic) | 3826 | static int s2io_enable_msi_x(struct s2io_nic *nic) |
3771 | { | 3827 | { |
3772 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 3828 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
3773 | u64 tx_mat, rx_mat; | 3829 | u64 rx_mat; |
3774 | u16 msi_control; /* Temp variable */ | 3830 | u16 msi_control; /* Temp variable */ |
3775 | int ret, i, j, msix_indx = 1; | 3831 | int ret, i, j, msix_indx = 1; |
3776 | 3832 | ||
3777 | nic->entries = kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct msix_entry), | 3833 | nic->entries = kmalloc(nic->num_entries * sizeof(struct msix_entry), |
3778 | GFP_KERNEL); | 3834 | GFP_KERNEL); |
3779 | if (!nic->entries) { | 3835 | if (!nic->entries) { |
3780 | DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \ | 3836 | DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \ |
@@ -3783,10 +3839,12 @@ static int s2io_enable_msi_x(struct s2io_nic *nic) | |||
3783 | return -ENOMEM; | 3839 | return -ENOMEM; |
3784 | } | 3840 | } |
3785 | nic->mac_control.stats_info->sw_stat.mem_allocated | 3841 | nic->mac_control.stats_info->sw_stat.mem_allocated |
3786 | += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); | 3842 | += (nic->num_entries * sizeof(struct msix_entry)); |
3843 | |||
3844 | memset(nic->entries, 0, nic->num_entries * sizeof(struct msix_entry)); | ||
3787 | 3845 | ||
3788 | nic->s2io_entries = | 3846 | nic->s2io_entries = |
3789 | kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct s2io_msix_entry), | 3847 | kmalloc(nic->num_entries * sizeof(struct s2io_msix_entry), |
3790 | GFP_KERNEL); | 3848 | GFP_KERNEL); |
3791 | if (!nic->s2io_entries) { | 3849 | if (!nic->s2io_entries) { |
3792 | DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", | 3850 | DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", |
@@ -3794,60 +3852,52 @@ static int s2io_enable_msi_x(struct s2io_nic *nic) | |||
3794 | nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++; | 3852 | nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++; |
3795 | kfree(nic->entries); | 3853 | kfree(nic->entries); |
3796 | nic->mac_control.stats_info->sw_stat.mem_freed | 3854 | nic->mac_control.stats_info->sw_stat.mem_freed |
3797 | += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); | 3855 | += (nic->num_entries * sizeof(struct msix_entry)); |
3798 | return -ENOMEM; | 3856 | return -ENOMEM; |
3799 | } | 3857 | } |
3800 | nic->mac_control.stats_info->sw_stat.mem_allocated | 3858 | nic->mac_control.stats_info->sw_stat.mem_allocated |
3801 | += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); | 3859 | += (nic->num_entries * sizeof(struct s2io_msix_entry)); |
3802 | 3860 | memset(nic->s2io_entries, 0, | |
3803 | for (i=0; i< MAX_REQUESTED_MSI_X; i++) { | 3861 | nic->num_entries * sizeof(struct s2io_msix_entry)); |
3804 | nic->entries[i].entry = i; | 3862 | |
3805 | nic->s2io_entries[i].entry = i; | 3863 | nic->entries[0].entry = 0; |
3864 | nic->s2io_entries[0].entry = 0; | ||
3865 | nic->s2io_entries[0].in_use = MSIX_FLG; | ||
3866 | nic->s2io_entries[0].type = MSIX_ALARM_TYPE; | ||
3867 | nic->s2io_entries[0].arg = &nic->mac_control.fifos; | ||
3868 | |||
3869 | for (i = 1; i < nic->num_entries; i++) { | ||
3870 | nic->entries[i].entry = ((i - 1) * 8) + 1; | ||
3871 | nic->s2io_entries[i].entry = ((i - 1) * 8) + 1; | ||
3806 | nic->s2io_entries[i].arg = NULL; | 3872 | nic->s2io_entries[i].arg = NULL; |
3807 | nic->s2io_entries[i].in_use = 0; | 3873 | nic->s2io_entries[i].in_use = 0; |
3808 | } | 3874 | } |
3809 | 3875 | ||
3810 | tx_mat = readq(&bar0->tx_mat0_n[0]); | ||
3811 | for (i=0; i<nic->config.tx_fifo_num; i++, msix_indx++) { | ||
3812 | tx_mat |= TX_MAT_SET(i, msix_indx); | ||
3813 | nic->s2io_entries[msix_indx].arg = &nic->mac_control.fifos[i]; | ||
3814 | nic->s2io_entries[msix_indx].type = MSIX_FIFO_TYPE; | ||
3815 | nic->s2io_entries[msix_indx].in_use = MSIX_FLG; | ||
3816 | } | ||
3817 | writeq(tx_mat, &bar0->tx_mat0_n[0]); | ||
3818 | |||
3819 | rx_mat = readq(&bar0->rx_mat); | 3876 | rx_mat = readq(&bar0->rx_mat); |
3820 | for (j = 0; j < nic->config.rx_ring_num; j++, msix_indx++) { | 3877 | for (j = 0; j < nic->config.rx_ring_num; j++) { |
3821 | rx_mat |= RX_MAT_SET(j, msix_indx); | 3878 | rx_mat |= RX_MAT_SET(j, msix_indx); |
3822 | nic->s2io_entries[msix_indx].arg | 3879 | nic->s2io_entries[j+1].arg = &nic->mac_control.rings[j]; |
3823 | = &nic->mac_control.rings[j]; | 3880 | nic->s2io_entries[j+1].type = MSIX_RING_TYPE; |
3824 | nic->s2io_entries[msix_indx].type = MSIX_RING_TYPE; | 3881 | nic->s2io_entries[j+1].in_use = MSIX_FLG; |
3825 | nic->s2io_entries[msix_indx].in_use = MSIX_FLG; | 3882 | msix_indx += 8; |
3826 | } | 3883 | } |
3827 | writeq(rx_mat, &bar0->rx_mat); | 3884 | writeq(rx_mat, &bar0->rx_mat); |
3885 | readq(&bar0->rx_mat); | ||
3828 | 3886 | ||
3829 | nic->avail_msix_vectors = 0; | 3887 | ret = pci_enable_msix(nic->pdev, nic->entries, nic->num_entries); |
3830 | ret = pci_enable_msix(nic->pdev, nic->entries, MAX_REQUESTED_MSI_X); | ||
3831 | /* We fail init if error or we get less vectors than min required */ | 3888 | /* We fail init if error or we get less vectors than min required */ |
3832 | if (ret >= (nic->config.tx_fifo_num + nic->config.rx_ring_num + 1)) { | ||
3833 | nic->avail_msix_vectors = ret; | ||
3834 | ret = pci_enable_msix(nic->pdev, nic->entries, ret); | ||
3835 | } | ||
3836 | if (ret) { | 3889 | if (ret) { |
3837 | DBG_PRINT(ERR_DBG, "%s: Enabling MSIX failed\n", nic->dev->name); | 3890 | DBG_PRINT(ERR_DBG, "%s: Enabling MSIX failed\n", nic->dev->name); |
3838 | kfree(nic->entries); | 3891 | kfree(nic->entries); |
3839 | nic->mac_control.stats_info->sw_stat.mem_freed | 3892 | nic->mac_control.stats_info->sw_stat.mem_freed |
3840 | += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); | 3893 | += (nic->num_entries * sizeof(struct msix_entry)); |
3841 | kfree(nic->s2io_entries); | 3894 | kfree(nic->s2io_entries); |
3842 | nic->mac_control.stats_info->sw_stat.mem_freed | 3895 | nic->mac_control.stats_info->sw_stat.mem_freed |
3843 | += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); | 3896 | += (nic->num_entries * sizeof(struct s2io_msix_entry)); |
3844 | nic->entries = NULL; | 3897 | nic->entries = NULL; |
3845 | nic->s2io_entries = NULL; | 3898 | nic->s2io_entries = NULL; |
3846 | nic->avail_msix_vectors = 0; | ||
3847 | return -ENOMEM; | 3899 | return -ENOMEM; |
3848 | } | 3900 | } |
3849 | if (!nic->avail_msix_vectors) | ||
3850 | nic->avail_msix_vectors = MAX_REQUESTED_MSI_X; | ||
3851 | 3901 | ||
3852 | /* | 3902 | /* |
3853 | * To enable MSI-X, MSI also needs to be enabled, due to a bug | 3903 | * To enable MSI-X, MSI also needs to be enabled, due to a bug |
@@ -3919,7 +3969,7 @@ static void remove_msix_isr(struct s2io_nic *sp) | |||
3919 | int i; | 3969 | int i; |
3920 | u16 msi_control; | 3970 | u16 msi_control; |
3921 | 3971 | ||
3922 | for (i = 0; i < MAX_REQUESTED_MSI_X; i++) { | 3972 | for (i = 0; i < sp->num_entries; i++) { |
3923 | if (sp->s2io_entries[i].in_use == | 3973 | if (sp->s2io_entries[i].in_use == |
3924 | MSIX_REGISTERED_SUCCESS) { | 3974 | MSIX_REGISTERED_SUCCESS) { |
3925 | int vector = sp->entries[i].vector; | 3975 | int vector = sp->entries[i].vector; |
@@ -3975,29 +4025,6 @@ static int s2io_open(struct net_device *dev) | |||
3975 | netif_carrier_off(dev); | 4025 | netif_carrier_off(dev); |
3976 | sp->last_link_state = 0; | 4026 | sp->last_link_state = 0; |
3977 | 4027 | ||
3978 | if (sp->config.intr_type == MSI_X) { | ||
3979 | int ret = s2io_enable_msi_x(sp); | ||
3980 | |||
3981 | if (!ret) { | ||
3982 | ret = s2io_test_msi(sp); | ||
3983 | /* rollback MSI-X, will re-enable during add_isr() */ | ||
3984 | remove_msix_isr(sp); | ||
3985 | } | ||
3986 | if (ret) { | ||
3987 | |||
3988 | DBG_PRINT(ERR_DBG, | ||
3989 | "%s: MSI-X requested but failed to enable\n", | ||
3990 | dev->name); | ||
3991 | sp->config.intr_type = INTA; | ||
3992 | } | ||
3993 | } | ||
3994 | |||
3995 | /* NAPI doesn't work well with MSI(X) */ | ||
3996 | if (sp->config.intr_type != INTA) { | ||
3997 | if(sp->config.napi) | ||
3998 | sp->config.napi = 0; | ||
3999 | } | ||
4000 | |||
4001 | /* Initialize H/W and enable interrupts */ | 4028 | /* Initialize H/W and enable interrupts */ |
4002 | err = s2io_card_up(sp); | 4029 | err = s2io_card_up(sp); |
4003 | if (err) { | 4030 | if (err) { |
@@ -4020,12 +4047,12 @@ hw_init_failed: | |||
4020 | if (sp->entries) { | 4047 | if (sp->entries) { |
4021 | kfree(sp->entries); | 4048 | kfree(sp->entries); |
4022 | sp->mac_control.stats_info->sw_stat.mem_freed | 4049 | sp->mac_control.stats_info->sw_stat.mem_freed |
4023 | += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); | 4050 | += (sp->num_entries * sizeof(struct msix_entry)); |
4024 | } | 4051 | } |
4025 | if (sp->s2io_entries) { | 4052 | if (sp->s2io_entries) { |
4026 | kfree(sp->s2io_entries); | 4053 | kfree(sp->s2io_entries); |
4027 | sp->mac_control.stats_info->sw_stat.mem_freed | 4054 | sp->mac_control.stats_info->sw_stat.mem_freed |
4028 | += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); | 4055 | += (sp->num_entries * sizeof(struct s2io_msix_entry)); |
4029 | } | 4056 | } |
4030 | } | 4057 | } |
4031 | return err; | 4058 | return err; |
@@ -4327,40 +4354,65 @@ s2io_alarm_handle(unsigned long data) | |||
4327 | mod_timer(&sp->alarm_timer, jiffies + HZ / 2); | 4354 | mod_timer(&sp->alarm_timer, jiffies + HZ / 2); |
4328 | } | 4355 | } |
4329 | 4356 | ||
4330 | static int s2io_chk_rx_buffers(struct ring_info *ring) | ||
4331 | { | ||
4332 | if (fill_rx_buffers(ring) == -ENOMEM) { | ||
4333 | DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name); | ||
4334 | DBG_PRINT(INFO_DBG, " in Rx Intr!!\n"); | ||
4335 | } | ||
4336 | return 0; | ||
4337 | } | ||
4338 | |||
4339 | static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id) | 4357 | static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id) |
4340 | { | 4358 | { |
4341 | struct ring_info *ring = (struct ring_info *)dev_id; | 4359 | struct ring_info *ring = (struct ring_info *)dev_id; |
4342 | struct s2io_nic *sp = ring->nic; | 4360 | struct s2io_nic *sp = ring->nic; |
4361 | struct XENA_dev_config __iomem *bar0 = sp->bar0; | ||
4362 | struct net_device *dev = sp->dev; | ||
4343 | 4363 | ||
4344 | if (!is_s2io_card_up(sp)) | 4364 | if (unlikely(!is_s2io_card_up(sp))) |
4345 | return IRQ_HANDLED; | 4365 | return IRQ_HANDLED; |
4346 | 4366 | ||
4347 | rx_intr_handler(ring); | 4367 | if (sp->config.napi) { |
4348 | s2io_chk_rx_buffers(ring); | 4368 | u8 __iomem *addr = NULL; |
4369 | u8 val8 = 0; | ||
4370 | |||
4371 | addr = (u8 __iomem *)&bar0->xmsi_mask_reg; | ||
4372 | addr += (7 - ring->ring_no); | ||
4373 | val8 = (ring->ring_no == 0) ? 0x7f : 0xff; | ||
4374 | writeb(val8, addr); | ||
4375 | val8 = readb(addr); | ||
4376 | netif_rx_schedule(dev, &ring->napi); | ||
4377 | } else { | ||
4378 | rx_intr_handler(ring, 0); | ||
4379 | s2io_chk_rx_buffers(ring); | ||
4380 | } | ||
4349 | 4381 | ||
4350 | return IRQ_HANDLED; | 4382 | return IRQ_HANDLED; |
4351 | } | 4383 | } |
4352 | 4384 | ||
4353 | static irqreturn_t s2io_msix_fifo_handle(int irq, void *dev_id) | 4385 | static irqreturn_t s2io_msix_fifo_handle(int irq, void *dev_id) |
4354 | { | 4386 | { |
4355 | struct fifo_info *fifo = (struct fifo_info *)dev_id; | 4387 | int i; |
4356 | struct s2io_nic *sp = fifo->nic; | 4388 | struct fifo_info *fifos = (struct fifo_info *)dev_id; |
4389 | struct s2io_nic *sp = fifos->nic; | ||
4390 | struct XENA_dev_config __iomem *bar0 = sp->bar0; | ||
4391 | struct config_param *config = &sp->config; | ||
4392 | u64 reason; | ||
4357 | 4393 | ||
4358 | if (!is_s2io_card_up(sp)) | 4394 | if (unlikely(!is_s2io_card_up(sp))) |
4395 | return IRQ_NONE; | ||
4396 | |||
4397 | reason = readq(&bar0->general_int_status); | ||
4398 | if (unlikely(reason == S2IO_MINUS_ONE)) | ||
4399 | /* Nothing much can be done. Get out */ | ||
4359 | return IRQ_HANDLED; | 4400 | return IRQ_HANDLED; |
4360 | 4401 | ||
4361 | tx_intr_handler(fifo); | 4402 | writeq(S2IO_MINUS_ONE, &bar0->general_int_mask); |
4403 | |||
4404 | if (reason & GEN_INTR_TXTRAFFIC) | ||
4405 | writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int); | ||
4406 | |||
4407 | for (i = 0; i < config->tx_fifo_num; i++) | ||
4408 | tx_intr_handler(&fifos[i]); | ||
4409 | |||
4410 | writeq(sp->general_int_mask, &bar0->general_int_mask); | ||
4411 | readl(&bar0->general_int_status); | ||
4412 | |||
4362 | return IRQ_HANDLED; | 4413 | return IRQ_HANDLED; |
4363 | } | 4414 | } |
4415 | |||
4364 | static void s2io_txpic_intr_handle(struct s2io_nic *sp) | 4416 | static void s2io_txpic_intr_handle(struct s2io_nic *sp) |
4365 | { | 4417 | { |
4366 | struct XENA_dev_config __iomem *bar0 = sp->bar0; | 4418 | struct XENA_dev_config __iomem *bar0 = sp->bar0; |
@@ -4762,14 +4814,10 @@ static irqreturn_t s2io_isr(int irq, void *dev_id) | |||
4762 | 4814 | ||
4763 | if (config->napi) { | 4815 | if (config->napi) { |
4764 | if (reason & GEN_INTR_RXTRAFFIC) { | 4816 | if (reason & GEN_INTR_RXTRAFFIC) { |
4765 | if (likely(netif_rx_schedule_prep(dev, | 4817 | netif_rx_schedule(dev, &sp->napi); |
4766 | &sp->napi))) { | 4818 | writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_mask); |
4767 | __netif_rx_schedule(dev, &sp->napi); | 4819 | writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); |
4768 | writeq(S2IO_MINUS_ONE, | 4820 | readl(&bar0->rx_traffic_int); |
4769 | &bar0->rx_traffic_mask); | ||
4770 | } else | ||
4771 | writeq(S2IO_MINUS_ONE, | ||
4772 | &bar0->rx_traffic_int); | ||
4773 | } | 4821 | } |
4774 | } else { | 4822 | } else { |
4775 | /* | 4823 | /* |
@@ -4781,7 +4829,7 @@ static irqreturn_t s2io_isr(int irq, void *dev_id) | |||
4781 | writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); | 4829 | writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); |
4782 | 4830 | ||
4783 | for (i = 0; i < config->rx_ring_num; i++) | 4831 | for (i = 0; i < config->rx_ring_num; i++) |
4784 | rx_intr_handler(&mac_control->rings[i]); | 4832 | rx_intr_handler(&mac_control->rings[i], 0); |
4785 | } | 4833 | } |
4786 | 4834 | ||
4787 | /* | 4835 | /* |
@@ -6984,62 +7032,62 @@ static int s2io_add_isr(struct s2io_nic * sp) | |||
6984 | 7032 | ||
6985 | /* After proper initialization of H/W, register ISR */ | 7033 | /* After proper initialization of H/W, register ISR */ |
6986 | if (sp->config.intr_type == MSI_X) { | 7034 | if (sp->config.intr_type == MSI_X) { |
6987 | int i, msix_tx_cnt=0,msix_rx_cnt=0; | 7035 | int i, msix_rx_cnt = 0; |
6988 | 7036 | ||
6989 | for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { | 7037 | for (i = 0; i < sp->num_entries; i++) { |
6990 | if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) { | 7038 | if (sp->s2io_entries[i].in_use == MSIX_FLG) { |
6991 | sprintf(sp->desc[i], "%s:MSI-X-%d-TX", | 7039 | if (sp->s2io_entries[i].type == |
7040 | MSIX_RING_TYPE) { | ||
7041 | sprintf(sp->desc[i], "%s:MSI-X-%d-RX", | ||
7042 | dev->name, i); | ||
7043 | err = request_irq(sp->entries[i].vector, | ||
7044 | s2io_msix_ring_handle, 0, | ||
7045 | sp->desc[i], | ||
7046 | sp->s2io_entries[i].arg); | ||
7047 | } else if (sp->s2io_entries[i].type == | ||
7048 | MSIX_ALARM_TYPE) { | ||
7049 | sprintf(sp->desc[i], "%s:MSI-X-%d-TX", | ||
6992 | dev->name, i); | 7050 | dev->name, i); |
6993 | err = request_irq(sp->entries[i].vector, | 7051 | err = request_irq(sp->entries[i].vector, |
6994 | s2io_msix_fifo_handle, 0, sp->desc[i], | 7052 | s2io_msix_fifo_handle, 0, |
6995 | sp->s2io_entries[i].arg); | 7053 | sp->desc[i], |
6996 | /* If either data or addr is zero print it */ | 7054 | sp->s2io_entries[i].arg); |
6997 | if(!(sp->msix_info[i].addr && | 7055 | |
6998 | sp->msix_info[i].data)) { | ||
6999 | DBG_PRINT(ERR_DBG, "%s @ Addr:0x%llx " | ||
7000 | "Data:0x%llx\n",sp->desc[i], | ||
7001 | (unsigned long long) | ||
7002 | sp->msix_info[i].addr, | ||
7003 | (unsigned long long) | ||
7004 | sp->msix_info[i].data); | ||
7005 | } else { | ||
7006 | msix_tx_cnt++; | ||
7007 | } | 7056 | } |
7008 | } else { | 7057 | /* if either data or addr is zero print it. */ |
7009 | sprintf(sp->desc[i], "%s:MSI-X-%d-RX", | 7058 | if (!(sp->msix_info[i].addr && |
7010 | dev->name, i); | ||
7011 | err = request_irq(sp->entries[i].vector, | ||
7012 | s2io_msix_ring_handle, 0, sp->desc[i], | ||
7013 | sp->s2io_entries[i].arg); | ||
7014 | /* If either data or addr is zero print it */ | ||
7015 | if(!(sp->msix_info[i].addr && | ||
7016 | sp->msix_info[i].data)) { | 7059 | sp->msix_info[i].data)) { |
7017 | DBG_PRINT(ERR_DBG, "%s @ Addr:0x%llx " | 7060 | DBG_PRINT(ERR_DBG, |
7018 | "Data:0x%llx\n",sp->desc[i], | 7061 | "%s @Addr:0x%llx Data:0x%llx\n", |
7062 | sp->desc[i], | ||
7019 | (unsigned long long) | 7063 | (unsigned long long) |
7020 | sp->msix_info[i].addr, | 7064 | sp->msix_info[i].addr, |
7021 | (unsigned long long) | 7065 | (unsigned long long) |
7022 | sp->msix_info[i].data); | 7066 | ntohl(sp->msix_info[i].data)); |
7023 | } else { | 7067 | } else |
7024 | msix_rx_cnt++; | 7068 | msix_rx_cnt++; |
7069 | if (err) { | ||
7070 | remove_msix_isr(sp); | ||
7071 | |||
7072 | DBG_PRINT(ERR_DBG, | ||
7073 | "%s:MSI-X-%d registration " | ||
7074 | "failed\n", dev->name, i); | ||
7075 | |||
7076 | DBG_PRINT(ERR_DBG, | ||
7077 | "%s: Defaulting to INTA\n", | ||
7078 | dev->name); | ||
7079 | sp->config.intr_type = INTA; | ||
7080 | break; | ||
7025 | } | 7081 | } |
7082 | sp->s2io_entries[i].in_use = | ||
7083 | MSIX_REGISTERED_SUCCESS; | ||
7026 | } | 7084 | } |
7027 | if (err) { | ||
7028 | remove_msix_isr(sp); | ||
7029 | DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration " | ||
7030 | "failed\n", dev->name, i); | ||
7031 | DBG_PRINT(ERR_DBG, "%s: defaulting to INTA\n", | ||
7032 | dev->name); | ||
7033 | sp->config.intr_type = INTA; | ||
7034 | break; | ||
7035 | } | ||
7036 | sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS; | ||
7037 | } | 7085 | } |
7038 | if (!err) { | 7086 | if (!err) { |
7039 | printk(KERN_INFO "MSI-X-TX %d entries enabled\n", | ||
7040 | msix_tx_cnt); | ||
7041 | printk(KERN_INFO "MSI-X-RX %d entries enabled\n", | 7087 | printk(KERN_INFO "MSI-X-RX %d entries enabled\n", |
7042 | msix_rx_cnt); | 7088 | --msix_rx_cnt); |
7089 | DBG_PRINT(INFO_DBG, "MSI-X-TX entries enabled" | ||
7090 | " through alarm vector\n"); | ||
7043 | } | 7091 | } |
7044 | } | 7092 | } |
7045 | if (sp->config.intr_type == INTA) { | 7093 | if (sp->config.intr_type == INTA) { |
@@ -7080,8 +7128,15 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io) | |||
7080 | clear_bit(__S2IO_STATE_CARD_UP, &sp->state); | 7128 | clear_bit(__S2IO_STATE_CARD_UP, &sp->state); |
7081 | 7129 | ||
7082 | /* Disable napi */ | 7130 | /* Disable napi */ |
7083 | if (config->napi) | 7131 | if (sp->config.napi) { |
7084 | napi_disable(&sp->napi); | 7132 | int off = 0; |
7133 | if (config->intr_type == MSI_X) { | ||
7134 | for (; off < sp->config.rx_ring_num; off++) | ||
7135 | napi_disable(&sp->mac_control.rings[off].napi); | ||
7136 | } | ||
7137 | else | ||
7138 | napi_disable(&sp->napi); | ||
7139 | } | ||
7085 | 7140 | ||
7086 | /* disable Tx and Rx traffic on the NIC */ | 7141 | /* disable Tx and Rx traffic on the NIC */ |
7087 | if (do_io) | 7142 | if (do_io) |
@@ -7173,8 +7228,15 @@ static int s2io_card_up(struct s2io_nic * sp) | |||
7173 | } | 7228 | } |
7174 | 7229 | ||
7175 | /* Initialise napi */ | 7230 | /* Initialise napi */ |
7176 | if (config->napi) | 7231 | if (config->napi) { |
7177 | napi_enable(&sp->napi); | 7232 | int i; |
7233 | if (config->intr_type == MSI_X) { | ||
7234 | for (i = 0; i < sp->config.rx_ring_num; i++) | ||
7235 | napi_enable(&sp->mac_control.rings[i].napi); | ||
7236 | } else { | ||
7237 | napi_enable(&sp->napi); | ||
7238 | } | ||
7239 | } | ||
7178 | 7240 | ||
7179 | /* Maintain the state prior to the open */ | 7241 | /* Maintain the state prior to the open */ |
7180 | if (sp->promisc_flg) | 7242 | if (sp->promisc_flg) |
@@ -7217,7 +7279,7 @@ static int s2io_card_up(struct s2io_nic * sp) | |||
7217 | /* Enable select interrupts */ | 7279 | /* Enable select interrupts */ |
7218 | en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); | 7280 | en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); |
7219 | if (sp->config.intr_type != INTA) | 7281 | if (sp->config.intr_type != INTA) |
7220 | en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS); | 7282 | en_dis_able_nic_intrs(sp, TX_TRAFFIC_INTR, ENABLE_INTRS); |
7221 | else { | 7283 | else { |
7222 | interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; | 7284 | interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; |
7223 | interruptible |= TX_PIC_INTR; | 7285 | interruptible |= TX_PIC_INTR; |
@@ -7615,9 +7677,6 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type, | |||
7615 | rx_ring_num = MAX_RX_RINGS; | 7677 | rx_ring_num = MAX_RX_RINGS; |
7616 | } | 7678 | } |
7617 | 7679 | ||
7618 | if (*dev_intr_type != INTA) | ||
7619 | napi = 0; | ||
7620 | |||
7621 | if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) { | 7680 | if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) { |
7622 | DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. " | 7681 | DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. " |
7623 | "Defaulting to INTA\n"); | 7682 | "Defaulting to INTA\n"); |
@@ -7918,8 +7977,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7918 | * will use eth_mac_addr() for dev->set_mac_address | 7977 | * will use eth_mac_addr() for dev->set_mac_address |
7919 | * mac address will be set every time dev->open() is called | 7978 | * mac address will be set every time dev->open() is called |
7920 | */ | 7979 | */ |
7921 | netif_napi_add(dev, &sp->napi, s2io_poll, 32); | ||
7922 | |||
7923 | #ifdef CONFIG_NET_POLL_CONTROLLER | 7980 | #ifdef CONFIG_NET_POLL_CONTROLLER |
7924 | dev->poll_controller = s2io_netpoll; | 7981 | dev->poll_controller = s2io_netpoll; |
7925 | #endif | 7982 | #endif |
@@ -7963,6 +8020,32 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7963 | } | 8020 | } |
7964 | } | 8021 | } |
7965 | 8022 | ||
8023 | if (sp->config.intr_type == MSI_X) { | ||
8024 | sp->num_entries = config->rx_ring_num + 1; | ||
8025 | ret = s2io_enable_msi_x(sp); | ||
8026 | |||
8027 | if (!ret) { | ||
8028 | ret = s2io_test_msi(sp); | ||
8029 | /* rollback MSI-X, will re-enable during add_isr() */ | ||
8030 | remove_msix_isr(sp); | ||
8031 | } | ||
8032 | if (ret) { | ||
8033 | |||
8034 | DBG_PRINT(ERR_DBG, | ||
8035 | "%s: MSI-X requested but failed to enable\n", | ||
8036 | dev->name); | ||
8037 | sp->config.intr_type = INTA; | ||
8038 | } | ||
8039 | } | ||
8040 | |||
8041 | if (config->intr_type == MSI_X) { | ||
8042 | for (i = 0; i < config->rx_ring_num ; i++) | ||
8043 | netif_napi_add(dev, &mac_control->rings[i].napi, | ||
8044 | s2io_poll_msix, 64); | ||
8045 | } else { | ||
8046 | netif_napi_add(dev, &sp->napi, s2io_poll_inta, 64); | ||
8047 | } | ||
8048 | |||
7966 | /* Not needed for Herc */ | 8049 | /* Not needed for Herc */ |
7967 | if (sp->device_type & XFRAME_I_DEVICE) { | 8050 | if (sp->device_type & XFRAME_I_DEVICE) { |
7968 | /* | 8051 | /* |
@@ -8013,6 +8096,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
8013 | /* store mac addresses from CAM to s2io_nic structure */ | 8096 | /* store mac addresses from CAM to s2io_nic structure */ |
8014 | do_s2io_store_unicast_mc(sp); | 8097 | do_s2io_store_unicast_mc(sp); |
8015 | 8098 | ||
8099 | /* Configure MSIX vector for number of rings configured plus one */ | ||
8100 | if ((sp->device_type == XFRAME_II_DEVICE) && | ||
8101 | (config->intr_type == MSI_X)) | ||
8102 | sp->num_entries = config->rx_ring_num + 1; | ||
8103 | |||
8016 | /* Store the values of the MSIX table in the s2io_nic structure */ | 8104 | /* Store the values of the MSIX table in the s2io_nic structure */ |
8017 | store_xmsi_data(sp); | 8105 | store_xmsi_data(sp); |
8018 | /* reset Nic and bring it to known state */ | 8106 | /* reset Nic and bring it to known state */ |
@@ -8078,8 +8166,14 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
8078 | break; | 8166 | break; |
8079 | } | 8167 | } |
8080 | 8168 | ||
8081 | if (napi) | 8169 | switch (sp->config.napi) { |
8170 | case 0: | ||
8171 | DBG_PRINT(ERR_DBG, "%s: NAPI disabled\n", dev->name); | ||
8172 | break; | ||
8173 | case 1: | ||
8082 | DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); | 8174 | DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); |
8175 | break; | ||
8176 | } | ||
8083 | 8177 | ||
8084 | DBG_PRINT(ERR_DBG, "%s: Using %d Tx fifo(s)\n", dev->name, | 8178 | DBG_PRINT(ERR_DBG, "%s: Using %d Tx fifo(s)\n", dev->name, |
8085 | sp->config.tx_fifo_num); | 8179 | sp->config.tx_fifo_num); |
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h index 0709ebae9139..4706f7f9acb6 100644 --- a/drivers/net/s2io.h +++ b/drivers/net/s2io.h | |||
@@ -706,7 +706,7 @@ struct ring_info { | |||
706 | /* per-ring buffer counter */ | 706 | /* per-ring buffer counter */ |
707 | u32 rx_bufs_left; | 707 | u32 rx_bufs_left; |
708 | 708 | ||
709 | #define MAX_LRO_SESSIONS 32 | 709 | #define MAX_LRO_SESSIONS 32 |
710 | struct lro lro0_n[MAX_LRO_SESSIONS]; | 710 | struct lro lro0_n[MAX_LRO_SESSIONS]; |
711 | u8 lro; | 711 | u8 lro; |
712 | 712 | ||
@@ -725,6 +725,11 @@ struct ring_info { | |||
725 | /* copy of sp->pdev pointer */ | 725 | /* copy of sp->pdev pointer */ |
726 | struct pci_dev *pdev; | 726 | struct pci_dev *pdev; |
727 | 727 | ||
728 | /* Per ring napi struct */ | ||
729 | struct napi_struct napi; | ||
730 | |||
731 | unsigned long interrupt_count; | ||
732 | |||
728 | /* | 733 | /* |
729 | * Place holders for the virtual and physical addresses of | 734 | * Place holders for the virtual and physical addresses of |
730 | * all the Rx Blocks | 735 | * all the Rx Blocks |
@@ -841,7 +846,7 @@ struct usr_addr { | |||
841 | * Structure to keep track of the MSI-X vectors and the corresponding | 846 | * Structure to keep track of the MSI-X vectors and the corresponding |
842 | * argument registered against each vector | 847 | * argument registered against each vector |
843 | */ | 848 | */ |
844 | #define MAX_REQUESTED_MSI_X 17 | 849 | #define MAX_REQUESTED_MSI_X 9 |
845 | struct s2io_msix_entry | 850 | struct s2io_msix_entry |
846 | { | 851 | { |
847 | u16 vector; | 852 | u16 vector; |
@@ -849,8 +854,8 @@ struct s2io_msix_entry | |||
849 | void *arg; | 854 | void *arg; |
850 | 855 | ||
851 | u8 type; | 856 | u8 type; |
852 | #define MSIX_FIFO_TYPE 1 | 857 | #define MSIX_ALARM_TYPE 1 |
853 | #define MSIX_RING_TYPE 2 | 858 | #define MSIX_RING_TYPE 2 |
854 | 859 | ||
855 | u8 in_use; | 860 | u8 in_use; |
856 | #define MSIX_REGISTERED_SUCCESS 0xAA | 861 | #define MSIX_REGISTERED_SUCCESS 0xAA |
@@ -877,7 +882,6 @@ struct s2io_nic { | |||
877 | */ | 882 | */ |
878 | int pkts_to_process; | 883 | int pkts_to_process; |
879 | struct net_device *dev; | 884 | struct net_device *dev; |
880 | struct napi_struct napi; | ||
881 | struct mac_info mac_control; | 885 | struct mac_info mac_control; |
882 | struct config_param config; | 886 | struct config_param config; |
883 | struct pci_dev *pdev; | 887 | struct pci_dev *pdev; |
@@ -948,6 +952,7 @@ struct s2io_nic { | |||
948 | */ | 952 | */ |
949 | u8 other_fifo_idx; | 953 | u8 other_fifo_idx; |
950 | 954 | ||
955 | struct napi_struct napi; | ||
951 | /* after blink, the adapter must be restored with original | 956 | /* after blink, the adapter must be restored with original |
952 | * values. | 957 | * values. |
953 | */ | 958 | */ |
@@ -962,6 +967,7 @@ struct s2io_nic { | |||
962 | unsigned long long start_time; | 967 | unsigned long long start_time; |
963 | struct vlan_group *vlgrp; | 968 | struct vlan_group *vlgrp; |
964 | #define MSIX_FLG 0xA5 | 969 | #define MSIX_FLG 0xA5 |
970 | int num_entries; | ||
965 | struct msix_entry *entries; | 971 | struct msix_entry *entries; |
966 | int msi_detected; | 972 | int msi_detected; |
967 | wait_queue_head_t msi_wait; | 973 | wait_queue_head_t msi_wait; |
@@ -982,6 +988,7 @@ struct s2io_nic { | |||
982 | u16 lro_max_aggr_per_sess; | 988 | u16 lro_max_aggr_per_sess; |
983 | volatile unsigned long state; | 989 | volatile unsigned long state; |
984 | u64 general_int_mask; | 990 | u64 general_int_mask; |
991 | |||
985 | #define VPD_STRING_LEN 80 | 992 | #define VPD_STRING_LEN 80 |
986 | u8 product_name[VPD_STRING_LEN]; | 993 | u8 product_name[VPD_STRING_LEN]; |
987 | u8 serial_num[VPD_STRING_LEN]; | 994 | u8 serial_num[VPD_STRING_LEN]; |
@@ -1103,7 +1110,7 @@ static void __devexit s2io_rem_nic(struct pci_dev *pdev); | |||
1103 | static int init_shared_mem(struct s2io_nic *sp); | 1110 | static int init_shared_mem(struct s2io_nic *sp); |
1104 | static void free_shared_mem(struct s2io_nic *sp); | 1111 | static void free_shared_mem(struct s2io_nic *sp); |
1105 | static int init_nic(struct s2io_nic *nic); | 1112 | static int init_nic(struct s2io_nic *nic); |
1106 | static void rx_intr_handler(struct ring_info *ring_data); | 1113 | static int rx_intr_handler(struct ring_info *ring_data, int budget); |
1107 | static void tx_intr_handler(struct fifo_info *fifo_data); | 1114 | static void tx_intr_handler(struct fifo_info *fifo_data); |
1108 | static void s2io_handle_errors(void * dev_id); | 1115 | static void s2io_handle_errors(void * dev_id); |
1109 | 1116 | ||
@@ -1114,7 +1121,8 @@ static void s2io_set_multicast(struct net_device *dev); | |||
1114 | static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp); | 1121 | static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp); |
1115 | static void s2io_link(struct s2io_nic * sp, int link); | 1122 | static void s2io_link(struct s2io_nic * sp, int link); |
1116 | static void s2io_reset(struct s2io_nic * sp); | 1123 | static void s2io_reset(struct s2io_nic * sp); |
1117 | static int s2io_poll(struct napi_struct *napi, int budget); | 1124 | static int s2io_poll_msix(struct napi_struct *napi, int budget); |
1125 | static int s2io_poll_inta(struct napi_struct *napi, int budget); | ||
1118 | static void s2io_init_pci(struct s2io_nic * sp); | 1126 | static void s2io_init_pci(struct s2io_nic * sp); |
1119 | static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr); | 1127 | static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr); |
1120 | static void s2io_alarm_handle(unsigned long data); | 1128 | static void s2io_alarm_handle(unsigned long data); |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 888b7dec9866..33bb18f810fb 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -179,8 +179,7 @@ enum sbmac_state { | |||
179 | #define SBMAC_MAX_TXDESCR 256 | 179 | #define SBMAC_MAX_TXDESCR 256 |
180 | #define SBMAC_MAX_RXDESCR 256 | 180 | #define SBMAC_MAX_RXDESCR 256 |
181 | 181 | ||
182 | #define ETHER_ALIGN 2 | 182 | #define ETHER_ADDR_LEN 6 |
183 | #define ETHER_ADDR_LEN 6 | ||
184 | #define ENET_PACKET_SIZE 1518 | 183 | #define ENET_PACKET_SIZE 1518 |
185 | /*#define ENET_PACKET_SIZE 9216 */ | 184 | /*#define ENET_PACKET_SIZE 9216 */ |
186 | 185 | ||
@@ -262,8 +261,6 @@ struct sbmac_softc { | |||
262 | spinlock_t sbm_lock; /* spin lock */ | 261 | spinlock_t sbm_lock; /* spin lock */ |
263 | int sbm_devflags; /* current device flags */ | 262 | int sbm_devflags; /* current device flags */ |
264 | 263 | ||
265 | int sbm_buffersize; | ||
266 | |||
267 | /* | 264 | /* |
268 | * Controller-specific things | 265 | * Controller-specific things |
269 | */ | 266 | */ |
@@ -305,10 +302,11 @@ struct sbmac_softc { | |||
305 | static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan, | 302 | static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan, |
306 | int txrx, int maxdescr); | 303 | int txrx, int maxdescr); |
307 | static void sbdma_channel_start(struct sbmacdma *d, int rxtx); | 304 | static void sbdma_channel_start(struct sbmacdma *d, int rxtx); |
308 | static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *m); | 305 | static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d, |
306 | struct sk_buff *m); | ||
309 | static int sbdma_add_txbuffer(struct sbmacdma *d, struct sk_buff *m); | 307 | static int sbdma_add_txbuffer(struct sbmacdma *d, struct sk_buff *m); |
310 | static void sbdma_emptyring(struct sbmacdma *d); | 308 | static void sbdma_emptyring(struct sbmacdma *d); |
311 | static void sbdma_fillring(struct sbmacdma *d); | 309 | static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d); |
312 | static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d, | 310 | static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d, |
313 | int work_to_do, int poll); | 311 | int work_to_do, int poll); |
314 | static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d, | 312 | static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d, |
@@ -777,16 +775,13 @@ static void sbdma_channel_stop(struct sbmacdma *d) | |||
777 | d->sbdma_remptr = NULL; | 775 | d->sbdma_remptr = NULL; |
778 | } | 776 | } |
779 | 777 | ||
780 | static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset) | 778 | static inline void sbdma_align_skb(struct sk_buff *skb, |
779 | unsigned int power2, unsigned int offset) | ||
781 | { | 780 | { |
782 | unsigned long addr; | 781 | unsigned char *addr = skb->data; |
783 | unsigned long newaddr; | 782 | unsigned char *newaddr = PTR_ALIGN(addr, power2); |
784 | |||
785 | addr = (unsigned long) skb->data; | ||
786 | |||
787 | newaddr = (addr + power2 - 1) & ~(power2 - 1); | ||
788 | 783 | ||
789 | skb_reserve(skb,newaddr-addr+offset); | 784 | skb_reserve(skb, newaddr - addr + offset); |
790 | } | 785 | } |
791 | 786 | ||
792 | 787 | ||
@@ -797,7 +792,8 @@ static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset) | |||
797 | * this queues a buffer for inbound packets. | 792 | * this queues a buffer for inbound packets. |
798 | * | 793 | * |
799 | * Input parameters: | 794 | * Input parameters: |
800 | * d - DMA channel descriptor | 795 | * sc - softc structure |
796 | * d - DMA channel descriptor | ||
801 | * sb - sk_buff to add, or NULL if we should allocate one | 797 | * sb - sk_buff to add, or NULL if we should allocate one |
802 | * | 798 | * |
803 | * Return value: | 799 | * Return value: |
@@ -806,8 +802,10 @@ static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset) | |||
806 | ********************************************************************* */ | 802 | ********************************************************************* */ |
807 | 803 | ||
808 | 804 | ||
809 | static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb) | 805 | static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d, |
806 | struct sk_buff *sb) | ||
810 | { | 807 | { |
808 | struct net_device *dev = sc->sbm_dev; | ||
811 | struct sbdmadscr *dsc; | 809 | struct sbdmadscr *dsc; |
812 | struct sbdmadscr *nextdsc; | 810 | struct sbdmadscr *nextdsc; |
813 | struct sk_buff *sb_new = NULL; | 811 | struct sk_buff *sb_new = NULL; |
@@ -848,14 +846,16 @@ static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb) | |||
848 | */ | 846 | */ |
849 | 847 | ||
850 | if (sb == NULL) { | 848 | if (sb == NULL) { |
851 | sb_new = dev_alloc_skb(ENET_PACKET_SIZE + SMP_CACHE_BYTES * 2 + ETHER_ALIGN); | 849 | sb_new = netdev_alloc_skb(dev, ENET_PACKET_SIZE + |
850 | SMP_CACHE_BYTES * 2 + | ||
851 | NET_IP_ALIGN); | ||
852 | if (sb_new == NULL) { | 852 | if (sb_new == NULL) { |
853 | pr_info("%s: sk_buff allocation failed\n", | 853 | pr_info("%s: sk_buff allocation failed\n", |
854 | d->sbdma_eth->sbm_dev->name); | 854 | d->sbdma_eth->sbm_dev->name); |
855 | return -ENOBUFS; | 855 | return -ENOBUFS; |
856 | } | 856 | } |
857 | 857 | ||
858 | sbdma_align_skb(sb_new, SMP_CACHE_BYTES, ETHER_ALIGN); | 858 | sbdma_align_skb(sb_new, SMP_CACHE_BYTES, NET_IP_ALIGN); |
859 | } | 859 | } |
860 | else { | 860 | else { |
861 | sb_new = sb; | 861 | sb_new = sb; |
@@ -874,10 +874,10 @@ static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb) | |||
874 | * Do not interrupt per DMA transfer. | 874 | * Do not interrupt per DMA transfer. |
875 | */ | 875 | */ |
876 | dsc->dscr_a = virt_to_phys(sb_new->data) | | 876 | dsc->dscr_a = virt_to_phys(sb_new->data) | |
877 | V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) | 0; | 877 | V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize + NET_IP_ALIGN)) | 0; |
878 | #else | 878 | #else |
879 | dsc->dscr_a = virt_to_phys(sb_new->data) | | 879 | dsc->dscr_a = virt_to_phys(sb_new->data) | |
880 | V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) | | 880 | V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize + NET_IP_ALIGN)) | |
881 | M_DMA_DSCRA_INTERRUPT; | 881 | M_DMA_DSCRA_INTERRUPT; |
882 | #endif | 882 | #endif |
883 | 883 | ||
@@ -1032,18 +1032,19 @@ static void sbdma_emptyring(struct sbmacdma *d) | |||
1032 | * with sk_buffs | 1032 | * with sk_buffs |
1033 | * | 1033 | * |
1034 | * Input parameters: | 1034 | * Input parameters: |
1035 | * d - DMA channel | 1035 | * sc - softc structure |
1036 | * d - DMA channel | ||
1036 | * | 1037 | * |
1037 | * Return value: | 1038 | * Return value: |
1038 | * nothing | 1039 | * nothing |
1039 | ********************************************************************* */ | 1040 | ********************************************************************* */ |
1040 | 1041 | ||
1041 | static void sbdma_fillring(struct sbmacdma *d) | 1042 | static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d) |
1042 | { | 1043 | { |
1043 | int idx; | 1044 | int idx; |
1044 | 1045 | ||
1045 | for (idx = 0; idx < SBMAC_MAX_RXDESCR-1; idx++) { | 1046 | for (idx = 0; idx < SBMAC_MAX_RXDESCR - 1; idx++) { |
1046 | if (sbdma_add_rcvbuffer(d,NULL) != 0) | 1047 | if (sbdma_add_rcvbuffer(sc, d, NULL) != 0) |
1047 | break; | 1048 | break; |
1048 | } | 1049 | } |
1049 | } | 1050 | } |
@@ -1159,10 +1160,11 @@ again: | |||
1159 | * packet and put it right back on the receive ring. | 1160 | * packet and put it right back on the receive ring. |
1160 | */ | 1161 | */ |
1161 | 1162 | ||
1162 | if (unlikely (sbdma_add_rcvbuffer(d,NULL) == | 1163 | if (unlikely(sbdma_add_rcvbuffer(sc, d, NULL) == |
1163 | -ENOBUFS)) { | 1164 | -ENOBUFS)) { |
1164 | dev->stats.rx_dropped++; | 1165 | dev->stats.rx_dropped++; |
1165 | sbdma_add_rcvbuffer(d,sb); /* re-add old buffer */ | 1166 | /* Re-add old buffer */ |
1167 | sbdma_add_rcvbuffer(sc, d, sb); | ||
1166 | /* No point in continuing at the moment */ | 1168 | /* No point in continuing at the moment */ |
1167 | printk(KERN_ERR "dropped packet (1)\n"); | 1169 | printk(KERN_ERR "dropped packet (1)\n"); |
1168 | d->sbdma_remptr = SBDMA_NEXTBUF(d,sbdma_remptr); | 1170 | d->sbdma_remptr = SBDMA_NEXTBUF(d,sbdma_remptr); |
@@ -1212,7 +1214,7 @@ again: | |||
1212 | * put it back on the receive ring. | 1214 | * put it back on the receive ring. |
1213 | */ | 1215 | */ |
1214 | dev->stats.rx_errors++; | 1216 | dev->stats.rx_errors++; |
1215 | sbdma_add_rcvbuffer(d,sb); | 1217 | sbdma_add_rcvbuffer(sc, d, sb); |
1216 | } | 1218 | } |
1217 | 1219 | ||
1218 | 1220 | ||
@@ -1570,7 +1572,7 @@ static void sbmac_channel_start(struct sbmac_softc *s) | |||
1570 | * Fill the receive ring | 1572 | * Fill the receive ring |
1571 | */ | 1573 | */ |
1572 | 1574 | ||
1573 | sbdma_fillring(&(s->sbm_rxdma)); | 1575 | sbdma_fillring(s, &(s->sbm_rxdma)); |
1574 | 1576 | ||
1575 | /* | 1577 | /* |
1576 | * Turn on the rest of the bits in the enable register | 1578 | * Turn on the rest of the bits in the enable register |
@@ -2312,13 +2314,6 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
2312 | dev->dev_addr[i] = eaddr[i]; | 2314 | dev->dev_addr[i] = eaddr[i]; |
2313 | } | 2315 | } |
2314 | 2316 | ||
2315 | |||
2316 | /* | ||
2317 | * Init packet size | ||
2318 | */ | ||
2319 | |||
2320 | sc->sbm_buffersize = ENET_PACKET_SIZE + SMP_CACHE_BYTES * 2 + ETHER_ALIGN; | ||
2321 | |||
2322 | /* | 2317 | /* |
2323 | * Initialize context (get pointers to registers and stuff), then | 2318 | * Initialize context (get pointers to registers and stuff), then |
2324 | * allocate the memory for the descriptor tables. | 2319 | * allocate the memory for the descriptor tables. |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index f64a860029b7..61955f8d8011 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -953,9 +953,6 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
953 | unsigned entry; | 953 | unsigned entry; |
954 | u32 tx_status; | 954 | u32 tx_status; |
955 | 955 | ||
956 | if (skb_padto(skb, ETH_ZLEN)) | ||
957 | return NETDEV_TX_OK; | ||
958 | |||
959 | if (unlikely(skb->len > TX_BUF_SIZE)) { | 956 | if (unlikely(skb->len > TX_BUF_SIZE)) { |
960 | dev->stats.tx_dropped++; | 957 | dev->stats.tx_dropped++; |
961 | goto out; | 958 | goto out; |
@@ -975,6 +972,11 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
975 | skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE); | 972 | skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE); |
976 | 973 | ||
977 | len = skb->len; | 974 | len = skb->len; |
975 | if (len < ETH_ZLEN) { | ||
976 | memset(priv->tx_bufs + entry * TX_BUF_SIZE + len, | ||
977 | 0, ETH_ZLEN - len); | ||
978 | len = ETH_ZLEN; | ||
979 | } | ||
978 | 980 | ||
979 | wmb(); | 981 | wmb(); |
980 | 982 | ||
diff --git a/drivers/net/sfc/bitfield.h b/drivers/net/sfc/bitfield.h index 2806201644cc..2c79d27404e0 100644 --- a/drivers/net/sfc/bitfield.h +++ b/drivers/net/sfc/bitfield.h | |||
@@ -483,7 +483,7 @@ typedef union efx_oword { | |||
483 | #endif | 483 | #endif |
484 | 484 | ||
485 | #define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \ | 485 | #define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \ |
486 | if (FALCON_REV(efx) >= FALCON_REV_B0) { \ | 486 | if (falcon_rev(efx) >= FALCON_REV_B0) { \ |
487 | EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \ | 487 | EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \ |
488 | } else { \ | 488 | } else { \ |
489 | EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \ | 489 | EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \ |
@@ -491,7 +491,7 @@ typedef union efx_oword { | |||
491 | } while (0) | 491 | } while (0) |
492 | 492 | ||
493 | #define EFX_QWORD_FIELD_VER(efx, qword, field) \ | 493 | #define EFX_QWORD_FIELD_VER(efx, qword, field) \ |
494 | (FALCON_REV(efx) >= FALCON_REV_B0 ? \ | 494 | (falcon_rev(efx) >= FALCON_REV_B0 ? \ |
495 | EFX_QWORD_FIELD((qword), field##_B0) : \ | 495 | EFX_QWORD_FIELD((qword), field##_B0) : \ |
496 | EFX_QWORD_FIELD((qword), field##_A1)) | 496 | EFX_QWORD_FIELD((qword), field##_A1)) |
497 | 497 | ||
@@ -501,8 +501,5 @@ typedef union efx_oword { | |||
501 | #define DMA_ADDR_T_WIDTH (8 * sizeof(dma_addr_t)) | 501 | #define DMA_ADDR_T_WIDTH (8 * sizeof(dma_addr_t)) |
502 | #define EFX_DMA_TYPE_WIDTH(width) \ | 502 | #define EFX_DMA_TYPE_WIDTH(width) \ |
503 | (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH) | 503 | (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH) |
504 | #define EFX_DMA_MAX_MASK ((DMA_ADDR_T_WIDTH == 64) ? \ | ||
505 | ~((u64) 0) : ~((u32) 0)) | ||
506 | #define EFX_DMA_MASK(mask) ((mask) & EFX_DMA_MAX_MASK) | ||
507 | 504 | ||
508 | #endif /* EFX_BITFIELD_H */ | 505 | #endif /* EFX_BITFIELD_H */ |
diff --git a/drivers/net/sfc/boards.c b/drivers/net/sfc/boards.c index eecaa6d58584..7fc0328dc055 100644 --- a/drivers/net/sfc/boards.c +++ b/drivers/net/sfc/boards.c | |||
@@ -27,10 +27,8 @@ static void blink_led_timer(unsigned long context) | |||
27 | struct efx_blinker *bl = &efx->board_info.blinker; | 27 | struct efx_blinker *bl = &efx->board_info.blinker; |
28 | efx->board_info.set_fault_led(efx, bl->state); | 28 | efx->board_info.set_fault_led(efx, bl->state); |
29 | bl->state = !bl->state; | 29 | bl->state = !bl->state; |
30 | if (bl->resubmit) { | 30 | if (bl->resubmit) |
31 | bl->timer.expires = jiffies + BLINK_INTERVAL; | 31 | mod_timer(&bl->timer, jiffies + BLINK_INTERVAL); |
32 | add_timer(&bl->timer); | ||
33 | } | ||
34 | } | 32 | } |
35 | 33 | ||
36 | static void board_blink(struct efx_nic *efx, int blink) | 34 | static void board_blink(struct efx_nic *efx, int blink) |
@@ -44,8 +42,7 @@ static void board_blink(struct efx_nic *efx, int blink) | |||
44 | blinker->state = 0; | 42 | blinker->state = 0; |
45 | setup_timer(&blinker->timer, blink_led_timer, | 43 | setup_timer(&blinker->timer, blink_led_timer, |
46 | (unsigned long)efx); | 44 | (unsigned long)efx); |
47 | blinker->timer.expires = jiffies + BLINK_INTERVAL; | 45 | mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL); |
48 | add_timer(&blinker->timer); | ||
49 | } else { | 46 | } else { |
50 | blinker->resubmit = 0; | 47 | blinker->resubmit = 0; |
51 | if (blinker->timer.function) | 48 | if (blinker->timer.function) |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 418f2e53a95b..449760642e31 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -199,11 +199,12 @@ static inline int efx_process_channel(struct efx_channel *channel, int rx_quota) | |||
199 | */ | 199 | */ |
200 | static inline void efx_channel_processed(struct efx_channel *channel) | 200 | static inline void efx_channel_processed(struct efx_channel *channel) |
201 | { | 201 | { |
202 | /* Write to EVQ_RPTR_REG. If a new event arrived in a race | 202 | /* The interrupt handler for this channel may set work_pending |
203 | * with finishing processing, a new interrupt will be raised. | 203 | * as soon as we acknowledge the events we've seen. Make sure |
204 | */ | 204 | * it's cleared before then. */ |
205 | channel->work_pending = 0; | 205 | channel->work_pending = 0; |
206 | smp_wmb(); /* Ensure channel updated before any new interrupt. */ | 206 | smp_wmb(); |
207 | |||
207 | falcon_eventq_read_ack(channel); | 208 | falcon_eventq_read_ack(channel); |
208 | } | 209 | } |
209 | 210 | ||
@@ -265,7 +266,7 @@ void efx_process_channel_now(struct efx_channel *channel) | |||
265 | napi_disable(&channel->napi_str); | 266 | napi_disable(&channel->napi_str); |
266 | 267 | ||
267 | /* Poll the channel */ | 268 | /* Poll the channel */ |
268 | (void) efx_process_channel(channel, efx->type->evq_size); | 269 | efx_process_channel(channel, efx->type->evq_size); |
269 | 270 | ||
270 | /* Ack the eventq. This may cause an interrupt to be generated | 271 | /* Ack the eventq. This may cause an interrupt to be generated |
271 | * when they are reenabled */ | 272 | * when they are reenabled */ |
@@ -317,26 +318,6 @@ static void efx_remove_eventq(struct efx_channel *channel) | |||
317 | * | 318 | * |
318 | *************************************************************************/ | 319 | *************************************************************************/ |
319 | 320 | ||
320 | /* Setup per-NIC RX buffer parameters. | ||
321 | * Calculate the rx buffer allocation parameters required to support | ||
322 | * the current MTU, including padding for header alignment and overruns. | ||
323 | */ | ||
324 | static void efx_calc_rx_buffer_params(struct efx_nic *efx) | ||
325 | { | ||
326 | unsigned int order, len; | ||
327 | |||
328 | len = (max(EFX_PAGE_IP_ALIGN, NET_IP_ALIGN) + | ||
329 | EFX_MAX_FRAME_LEN(efx->net_dev->mtu) + | ||
330 | efx->type->rx_buffer_padding); | ||
331 | |||
332 | /* Calculate page-order */ | ||
333 | for (order = 0; ((1u << order) * PAGE_SIZE) < len; ++order) | ||
334 | ; | ||
335 | |||
336 | efx->rx_buffer_len = len; | ||
337 | efx->rx_buffer_order = order; | ||
338 | } | ||
339 | |||
340 | static int efx_probe_channel(struct efx_channel *channel) | 321 | static int efx_probe_channel(struct efx_channel *channel) |
341 | { | 322 | { |
342 | struct efx_tx_queue *tx_queue; | 323 | struct efx_tx_queue *tx_queue; |
@@ -387,7 +368,14 @@ static int efx_init_channels(struct efx_nic *efx) | |||
387 | struct efx_channel *channel; | 368 | struct efx_channel *channel; |
388 | int rc = 0; | 369 | int rc = 0; |
389 | 370 | ||
390 | efx_calc_rx_buffer_params(efx); | 371 | /* Calculate the rx buffer allocation parameters required to |
372 | * support the current MTU, including padding for header | ||
373 | * alignment and overruns. | ||
374 | */ | ||
375 | efx->rx_buffer_len = (max(EFX_PAGE_IP_ALIGN, NET_IP_ALIGN) + | ||
376 | EFX_MAX_FRAME_LEN(efx->net_dev->mtu) + | ||
377 | efx->type->rx_buffer_padding); | ||
378 | efx->rx_buffer_order = get_order(efx->rx_buffer_len); | ||
391 | 379 | ||
392 | /* Initialise the channels */ | 380 | /* Initialise the channels */ |
393 | efx_for_each_channel(channel, efx) { | 381 | efx_for_each_channel(channel, efx) { |
@@ -440,9 +428,12 @@ static void efx_start_channel(struct efx_channel *channel) | |||
440 | netif_napi_add(channel->napi_dev, &channel->napi_str, | 428 | netif_napi_add(channel->napi_dev, &channel->napi_str, |
441 | efx_poll, napi_weight); | 429 | efx_poll, napi_weight); |
442 | 430 | ||
431 | /* The interrupt handler for this channel may set work_pending | ||
432 | * as soon as we enable it. Make sure it's cleared before | ||
433 | * then. Similarly, make sure it sees the enabled flag set. */ | ||
443 | channel->work_pending = 0; | 434 | channel->work_pending = 0; |
444 | channel->enabled = 1; | 435 | channel->enabled = 1; |
445 | smp_wmb(); /* ensure channel updated before first interrupt */ | 436 | smp_wmb(); |
446 | 437 | ||
447 | napi_enable(&channel->napi_str); | 438 | napi_enable(&channel->napi_str); |
448 | 439 | ||
@@ -704,7 +695,7 @@ static void efx_stop_port(struct efx_nic *efx) | |||
704 | mutex_unlock(&efx->mac_lock); | 695 | mutex_unlock(&efx->mac_lock); |
705 | 696 | ||
706 | /* Serialise against efx_set_multicast_list() */ | 697 | /* Serialise against efx_set_multicast_list() */ |
707 | if (NET_DEV_REGISTERED(efx)) { | 698 | if (efx_dev_registered(efx)) { |
708 | netif_tx_lock_bh(efx->net_dev); | 699 | netif_tx_lock_bh(efx->net_dev); |
709 | netif_tx_unlock_bh(efx->net_dev); | 700 | netif_tx_unlock_bh(efx->net_dev); |
710 | } | 701 | } |
@@ -791,22 +782,23 @@ static int efx_init_io(struct efx_nic *efx) | |||
791 | efx->membase = ioremap_nocache(efx->membase_phys, | 782 | efx->membase = ioremap_nocache(efx->membase_phys, |
792 | efx->type->mem_map_size); | 783 | efx->type->mem_map_size); |
793 | if (!efx->membase) { | 784 | if (!efx->membase) { |
794 | EFX_ERR(efx, "could not map memory BAR %d at %lx+%x\n", | 785 | EFX_ERR(efx, "could not map memory BAR %d at %llx+%x\n", |
795 | efx->type->mem_bar, efx->membase_phys, | 786 | efx->type->mem_bar, |
787 | (unsigned long long)efx->membase_phys, | ||
796 | efx->type->mem_map_size); | 788 | efx->type->mem_map_size); |
797 | rc = -ENOMEM; | 789 | rc = -ENOMEM; |
798 | goto fail4; | 790 | goto fail4; |
799 | } | 791 | } |
800 | EFX_LOG(efx, "memory BAR %u at %lx+%x (virtual %p)\n", | 792 | EFX_LOG(efx, "memory BAR %u at %llx+%x (virtual %p)\n", |
801 | efx->type->mem_bar, efx->membase_phys, efx->type->mem_map_size, | 793 | efx->type->mem_bar, (unsigned long long)efx->membase_phys, |
802 | efx->membase); | 794 | efx->type->mem_map_size, efx->membase); |
803 | 795 | ||
804 | return 0; | 796 | return 0; |
805 | 797 | ||
806 | fail4: | 798 | fail4: |
807 | release_mem_region(efx->membase_phys, efx->type->mem_map_size); | 799 | release_mem_region(efx->membase_phys, efx->type->mem_map_size); |
808 | fail3: | 800 | fail3: |
809 | efx->membase_phys = 0UL; | 801 | efx->membase_phys = 0; |
810 | fail2: | 802 | fail2: |
811 | pci_disable_device(efx->pci_dev); | 803 | pci_disable_device(efx->pci_dev); |
812 | fail1: | 804 | fail1: |
@@ -824,7 +816,7 @@ static void efx_fini_io(struct efx_nic *efx) | |||
824 | 816 | ||
825 | if (efx->membase_phys) { | 817 | if (efx->membase_phys) { |
826 | pci_release_region(efx->pci_dev, efx->type->mem_bar); | 818 | pci_release_region(efx->pci_dev, efx->type->mem_bar); |
827 | efx->membase_phys = 0UL; | 819 | efx->membase_phys = 0; |
828 | } | 820 | } |
829 | 821 | ||
830 | pci_disable_device(efx->pci_dev); | 822 | pci_disable_device(efx->pci_dev); |
@@ -1043,7 +1035,7 @@ static void efx_start_all(struct efx_nic *efx) | |||
1043 | return; | 1035 | return; |
1044 | if ((efx->state != STATE_RUNNING) && (efx->state != STATE_INIT)) | 1036 | if ((efx->state != STATE_RUNNING) && (efx->state != STATE_INIT)) |
1045 | return; | 1037 | return; |
1046 | if (NET_DEV_REGISTERED(efx) && !netif_running(efx->net_dev)) | 1038 | if (efx_dev_registered(efx) && !netif_running(efx->net_dev)) |
1047 | return; | 1039 | return; |
1048 | 1040 | ||
1049 | /* Mark the port as enabled so port reconfigurations can start, then | 1041 | /* Mark the port as enabled so port reconfigurations can start, then |
@@ -1073,9 +1065,8 @@ static void efx_flush_all(struct efx_nic *efx) | |||
1073 | cancel_delayed_work_sync(&efx->monitor_work); | 1065 | cancel_delayed_work_sync(&efx->monitor_work); |
1074 | 1066 | ||
1075 | /* Ensure that all RX slow refills are complete. */ | 1067 | /* Ensure that all RX slow refills are complete. */ |
1076 | efx_for_each_rx_queue(rx_queue, efx) { | 1068 | efx_for_each_rx_queue(rx_queue, efx) |
1077 | cancel_delayed_work_sync(&rx_queue->work); | 1069 | cancel_delayed_work_sync(&rx_queue->work); |
1078 | } | ||
1079 | 1070 | ||
1080 | /* Stop scheduled port reconfigurations */ | 1071 | /* Stop scheduled port reconfigurations */ |
1081 | cancel_work_sync(&efx->reconfigure_work); | 1072 | cancel_work_sync(&efx->reconfigure_work); |
@@ -1101,9 +1092,10 @@ static void efx_stop_all(struct efx_nic *efx) | |||
1101 | falcon_disable_interrupts(efx); | 1092 | falcon_disable_interrupts(efx); |
1102 | if (efx->legacy_irq) | 1093 | if (efx->legacy_irq) |
1103 | synchronize_irq(efx->legacy_irq); | 1094 | synchronize_irq(efx->legacy_irq); |
1104 | efx_for_each_channel_with_interrupt(channel, efx) | 1095 | efx_for_each_channel_with_interrupt(channel, efx) { |
1105 | if (channel->irq) | 1096 | if (channel->irq) |
1106 | synchronize_irq(channel->irq); | 1097 | synchronize_irq(channel->irq); |
1098 | } | ||
1107 | 1099 | ||
1108 | /* Stop all NAPI processing and synchronous rx refills */ | 1100 | /* Stop all NAPI processing and synchronous rx refills */ |
1109 | efx_for_each_channel(channel, efx) | 1101 | efx_for_each_channel(channel, efx) |
@@ -1125,7 +1117,7 @@ static void efx_stop_all(struct efx_nic *efx) | |||
1125 | /* Stop the kernel transmit interface late, so the watchdog | 1117 | /* Stop the kernel transmit interface late, so the watchdog |
1126 | * timer isn't ticking over the flush */ | 1118 | * timer isn't ticking over the flush */ |
1127 | efx_stop_queue(efx); | 1119 | efx_stop_queue(efx); |
1128 | if (NET_DEV_REGISTERED(efx)) { | 1120 | if (efx_dev_registered(efx)) { |
1129 | netif_tx_lock_bh(efx->net_dev); | 1121 | netif_tx_lock_bh(efx->net_dev); |
1130 | netif_tx_unlock_bh(efx->net_dev); | 1122 | netif_tx_unlock_bh(efx->net_dev); |
1131 | } | 1123 | } |
@@ -1344,13 +1336,17 @@ static int efx_net_stop(struct net_device *net_dev) | |||
1344 | return 0; | 1336 | return 0; |
1345 | } | 1337 | } |
1346 | 1338 | ||
1347 | /* Context: process, dev_base_lock held, non-blocking. */ | 1339 | /* Context: process, dev_base_lock or RTNL held, non-blocking. */ |
1348 | static struct net_device_stats *efx_net_stats(struct net_device *net_dev) | 1340 | static struct net_device_stats *efx_net_stats(struct net_device *net_dev) |
1349 | { | 1341 | { |
1350 | struct efx_nic *efx = net_dev->priv; | 1342 | struct efx_nic *efx = net_dev->priv; |
1351 | struct efx_mac_stats *mac_stats = &efx->mac_stats; | 1343 | struct efx_mac_stats *mac_stats = &efx->mac_stats; |
1352 | struct net_device_stats *stats = &net_dev->stats; | 1344 | struct net_device_stats *stats = &net_dev->stats; |
1353 | 1345 | ||
1346 | /* Update stats if possible, but do not wait if another thread | ||
1347 | * is updating them (or resetting the NIC); slightly stale | ||
1348 | * stats are acceptable. | ||
1349 | */ | ||
1354 | if (!spin_trylock(&efx->stats_lock)) | 1350 | if (!spin_trylock(&efx->stats_lock)) |
1355 | return stats; | 1351 | return stats; |
1356 | if (efx->state == STATE_RUNNING) { | 1352 | if (efx->state == STATE_RUNNING) { |
@@ -1494,7 +1490,7 @@ static void efx_set_multicast_list(struct net_device *net_dev) | |||
1494 | static int efx_netdev_event(struct notifier_block *this, | 1490 | static int efx_netdev_event(struct notifier_block *this, |
1495 | unsigned long event, void *ptr) | 1491 | unsigned long event, void *ptr) |
1496 | { | 1492 | { |
1497 | struct net_device *net_dev = (struct net_device *)ptr; | 1493 | struct net_device *net_dev = ptr; |
1498 | 1494 | ||
1499 | if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) { | 1495 | if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) { |
1500 | struct efx_nic *efx = net_dev->priv; | 1496 | struct efx_nic *efx = net_dev->priv; |
@@ -1563,7 +1559,7 @@ static void efx_unregister_netdev(struct efx_nic *efx) | |||
1563 | efx_for_each_tx_queue(tx_queue, efx) | 1559 | efx_for_each_tx_queue(tx_queue, efx) |
1564 | efx_release_tx_buffers(tx_queue); | 1560 | efx_release_tx_buffers(tx_queue); |
1565 | 1561 | ||
1566 | if (NET_DEV_REGISTERED(efx)) { | 1562 | if (efx_dev_registered(efx)) { |
1567 | strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name)); | 1563 | strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name)); |
1568 | unregister_netdev(efx->net_dev); | 1564 | unregister_netdev(efx->net_dev); |
1569 | } | 1565 | } |
@@ -1688,7 +1684,7 @@ static int efx_reset(struct efx_nic *efx) | |||
1688 | if (method == RESET_TYPE_DISABLE) { | 1684 | if (method == RESET_TYPE_DISABLE) { |
1689 | /* Reinitialise the device anyway so the driver unload sequence | 1685 | /* Reinitialise the device anyway so the driver unload sequence |
1690 | * can talk to the external SRAM */ | 1686 | * can talk to the external SRAM */ |
1691 | (void) falcon_init_nic(efx); | 1687 | falcon_init_nic(efx); |
1692 | rc = -EIO; | 1688 | rc = -EIO; |
1693 | goto fail4; | 1689 | goto fail4; |
1694 | } | 1690 | } |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index b57cc68058c0..790db89db345 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -116,17 +116,8 @@ MODULE_PARM_DESC(rx_xon_thresh_bytes, "RX fifo XON threshold"); | |||
116 | ************************************************************************** | 116 | ************************************************************************** |
117 | */ | 117 | */ |
118 | 118 | ||
119 | /* DMA address mask (up to 46-bit, avoiding compiler warnings) | 119 | /* DMA address mask */ |
120 | * | 120 | #define FALCON_DMA_MASK DMA_BIT_MASK(46) |
121 | * Note that it is possible to have a platform with 64-bit longs and | ||
122 | * 32-bit DMA addresses, or vice versa. EFX_DMA_MASK takes care of the | ||
123 | * platform DMA mask. | ||
124 | */ | ||
125 | #if BITS_PER_LONG == 64 | ||
126 | #define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffUL) | ||
127 | #else | ||
128 | #define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffULL) | ||
129 | #endif | ||
130 | 121 | ||
131 | /* TX DMA length mask (13-bit) */ | 122 | /* TX DMA length mask (13-bit) */ |
132 | #define FALCON_TX_DMA_MASK (4096 - 1) | 123 | #define FALCON_TX_DMA_MASK (4096 - 1) |
@@ -145,7 +136,7 @@ MODULE_PARM_DESC(rx_xon_thresh_bytes, "RX fifo XON threshold"); | |||
145 | #define PCI_EXP_LNKSTA_LNK_WID_LBN 4 | 136 | #define PCI_EXP_LNKSTA_LNK_WID_LBN 4 |
146 | 137 | ||
147 | #define FALCON_IS_DUAL_FUNC(efx) \ | 138 | #define FALCON_IS_DUAL_FUNC(efx) \ |
148 | (FALCON_REV(efx) < FALCON_REV_B0) | 139 | (falcon_rev(efx) < FALCON_REV_B0) |
149 | 140 | ||
150 | /************************************************************************** | 141 | /************************************************************************** |
151 | * | 142 | * |
@@ -465,7 +456,7 @@ int falcon_init_tx(struct efx_tx_queue *tx_queue) | |||
465 | TX_DESCQ_TYPE, 0, | 456 | TX_DESCQ_TYPE, 0, |
466 | TX_NON_IP_DROP_DIS_B0, 1); | 457 | TX_NON_IP_DROP_DIS_B0, 1); |
467 | 458 | ||
468 | if (FALCON_REV(efx) >= FALCON_REV_B0) { | 459 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
469 | int csum = !(efx->net_dev->features & NETIF_F_IP_CSUM); | 460 | int csum = !(efx->net_dev->features & NETIF_F_IP_CSUM); |
470 | EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_IP_CHKSM_DIS_B0, csum); | 461 | EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_IP_CHKSM_DIS_B0, csum); |
471 | EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_TCP_CHKSM_DIS_B0, csum); | 462 | EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_TCP_CHKSM_DIS_B0, csum); |
@@ -474,7 +465,7 @@ int falcon_init_tx(struct efx_tx_queue *tx_queue) | |||
474 | falcon_write_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base, | 465 | falcon_write_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base, |
475 | tx_queue->queue); | 466 | tx_queue->queue); |
476 | 467 | ||
477 | if (FALCON_REV(efx) < FALCON_REV_B0) { | 468 | if (falcon_rev(efx) < FALCON_REV_B0) { |
478 | efx_oword_t reg; | 469 | efx_oword_t reg; |
479 | 470 | ||
480 | BUG_ON(tx_queue->queue >= 128); /* HW limit */ | 471 | BUG_ON(tx_queue->queue >= 128); /* HW limit */ |
@@ -635,7 +626,7 @@ int falcon_init_rx(struct efx_rx_queue *rx_queue) | |||
635 | efx_oword_t rx_desc_ptr; | 626 | efx_oword_t rx_desc_ptr; |
636 | struct efx_nic *efx = rx_queue->efx; | 627 | struct efx_nic *efx = rx_queue->efx; |
637 | int rc; | 628 | int rc; |
638 | int is_b0 = FALCON_REV(efx) >= FALCON_REV_B0; | 629 | int is_b0 = falcon_rev(efx) >= FALCON_REV_B0; |
639 | int iscsi_digest_en = is_b0; | 630 | int iscsi_digest_en = is_b0; |
640 | 631 | ||
641 | EFX_LOG(efx, "RX queue %d ring in special buffers %d-%d\n", | 632 | EFX_LOG(efx, "RX queue %d ring in special buffers %d-%d\n", |
@@ -742,8 +733,10 @@ void falcon_fini_rx(struct efx_rx_queue *rx_queue) | |||
742 | continue; | 733 | continue; |
743 | break; | 734 | break; |
744 | } | 735 | } |
745 | if (rc) | 736 | if (rc) { |
746 | EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue); | 737 | EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue); |
738 | efx_schedule_reset(efx, RESET_TYPE_INVISIBLE); | ||
739 | } | ||
747 | 740 | ||
748 | /* Remove RX descriptor ring from card */ | 741 | /* Remove RX descriptor ring from card */ |
749 | EFX_ZERO_OWORD(rx_desc_ptr); | 742 | EFX_ZERO_OWORD(rx_desc_ptr); |
@@ -822,10 +815,10 @@ static inline void falcon_handle_tx_event(struct efx_channel *channel, | |||
822 | tx_ev_q_label = EFX_QWORD_FIELD(*event, TX_EV_Q_LABEL); | 815 | tx_ev_q_label = EFX_QWORD_FIELD(*event, TX_EV_Q_LABEL); |
823 | tx_queue = &efx->tx_queue[tx_ev_q_label]; | 816 | tx_queue = &efx->tx_queue[tx_ev_q_label]; |
824 | 817 | ||
825 | if (NET_DEV_REGISTERED(efx)) | 818 | if (efx_dev_registered(efx)) |
826 | netif_tx_lock(efx->net_dev); | 819 | netif_tx_lock(efx->net_dev); |
827 | falcon_notify_tx_desc(tx_queue); | 820 | falcon_notify_tx_desc(tx_queue); |
828 | if (NET_DEV_REGISTERED(efx)) | 821 | if (efx_dev_registered(efx)) |
829 | netif_tx_unlock(efx->net_dev); | 822 | netif_tx_unlock(efx->net_dev); |
830 | } else if (EFX_QWORD_FIELD(*event, TX_EV_PKT_ERR) && | 823 | } else if (EFX_QWORD_FIELD(*event, TX_EV_PKT_ERR) && |
831 | EFX_WORKAROUND_10727(efx)) { | 824 | EFX_WORKAROUND_10727(efx)) { |
@@ -884,7 +877,7 @@ static void falcon_handle_rx_not_ok(struct efx_rx_queue *rx_queue, | |||
884 | RX_EV_TCP_UDP_CHKSUM_ERR); | 877 | RX_EV_TCP_UDP_CHKSUM_ERR); |
885 | rx_ev_eth_crc_err = EFX_QWORD_FIELD(*event, RX_EV_ETH_CRC_ERR); | 878 | rx_ev_eth_crc_err = EFX_QWORD_FIELD(*event, RX_EV_ETH_CRC_ERR); |
886 | rx_ev_frm_trunc = EFX_QWORD_FIELD(*event, RX_EV_FRM_TRUNC); | 879 | rx_ev_frm_trunc = EFX_QWORD_FIELD(*event, RX_EV_FRM_TRUNC); |
887 | rx_ev_drib_nib = ((FALCON_REV(efx) >= FALCON_REV_B0) ? | 880 | rx_ev_drib_nib = ((falcon_rev(efx) >= FALCON_REV_B0) ? |
888 | 0 : EFX_QWORD_FIELD(*event, RX_EV_DRIB_NIB)); | 881 | 0 : EFX_QWORD_FIELD(*event, RX_EV_DRIB_NIB)); |
889 | rx_ev_pause_frm = EFX_QWORD_FIELD(*event, RX_EV_PAUSE_FRM_ERR); | 882 | rx_ev_pause_frm = EFX_QWORD_FIELD(*event, RX_EV_PAUSE_FRM_ERR); |
890 | 883 | ||
@@ -1065,7 +1058,7 @@ static void falcon_handle_global_event(struct efx_channel *channel, | |||
1065 | EFX_QWORD_FIELD(*event, XG_PHY_INTR)) | 1058 | EFX_QWORD_FIELD(*event, XG_PHY_INTR)) |
1066 | is_phy_event = 1; | 1059 | is_phy_event = 1; |
1067 | 1060 | ||
1068 | if ((FALCON_REV(efx) >= FALCON_REV_B0) && | 1061 | if ((falcon_rev(efx) >= FALCON_REV_B0) && |
1069 | EFX_OWORD_FIELD(*event, XG_MNT_INTR_B0)) | 1062 | EFX_OWORD_FIELD(*event, XG_MNT_INTR_B0)) |
1070 | is_phy_event = 1; | 1063 | is_phy_event = 1; |
1071 | 1064 | ||
@@ -1405,7 +1398,7 @@ static inline void falcon_irq_ack_a1(struct efx_nic *efx) | |||
1405 | static irqreturn_t falcon_fatal_interrupt(struct efx_nic *efx) | 1398 | static irqreturn_t falcon_fatal_interrupt(struct efx_nic *efx) |
1406 | { | 1399 | { |
1407 | struct falcon_nic_data *nic_data = efx->nic_data; | 1400 | struct falcon_nic_data *nic_data = efx->nic_data; |
1408 | efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; | 1401 | efx_oword_t *int_ker = efx->irq_status.addr; |
1409 | efx_oword_t fatal_intr; | 1402 | efx_oword_t fatal_intr; |
1410 | int error, mem_perr; | 1403 | int error, mem_perr; |
1411 | static int n_int_errors; | 1404 | static int n_int_errors; |
@@ -1451,8 +1444,8 @@ out: | |||
1451 | */ | 1444 | */ |
1452 | static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id) | 1445 | static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id) |
1453 | { | 1446 | { |
1454 | struct efx_nic *efx = (struct efx_nic *)dev_id; | 1447 | struct efx_nic *efx = dev_id; |
1455 | efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; | 1448 | efx_oword_t *int_ker = efx->irq_status.addr; |
1456 | struct efx_channel *channel; | 1449 | struct efx_channel *channel; |
1457 | efx_dword_t reg; | 1450 | efx_dword_t reg; |
1458 | u32 queues; | 1451 | u32 queues; |
@@ -1489,8 +1482,8 @@ static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id) | |||
1489 | 1482 | ||
1490 | static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id) | 1483 | static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id) |
1491 | { | 1484 | { |
1492 | struct efx_nic *efx = (struct efx_nic *)dev_id; | 1485 | struct efx_nic *efx = dev_id; |
1493 | efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; | 1486 | efx_oword_t *int_ker = efx->irq_status.addr; |
1494 | struct efx_channel *channel; | 1487 | struct efx_channel *channel; |
1495 | int syserr; | 1488 | int syserr; |
1496 | int queues; | 1489 | int queues; |
@@ -1542,9 +1535,9 @@ static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id) | |||
1542 | */ | 1535 | */ |
1543 | static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id) | 1536 | static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id) |
1544 | { | 1537 | { |
1545 | struct efx_channel *channel = (struct efx_channel *)dev_id; | 1538 | struct efx_channel *channel = dev_id; |
1546 | struct efx_nic *efx = channel->efx; | 1539 | struct efx_nic *efx = channel->efx; |
1547 | efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; | 1540 | efx_oword_t *int_ker = efx->irq_status.addr; |
1548 | int syserr; | 1541 | int syserr; |
1549 | 1542 | ||
1550 | efx->last_irq_cpu = raw_smp_processor_id(); | 1543 | efx->last_irq_cpu = raw_smp_processor_id(); |
@@ -1572,7 +1565,7 @@ static void falcon_setup_rss_indir_table(struct efx_nic *efx) | |||
1572 | unsigned long offset; | 1565 | unsigned long offset; |
1573 | efx_dword_t dword; | 1566 | efx_dword_t dword; |
1574 | 1567 | ||
1575 | if (FALCON_REV(efx) < FALCON_REV_B0) | 1568 | if (falcon_rev(efx) < FALCON_REV_B0) |
1576 | return; | 1569 | return; |
1577 | 1570 | ||
1578 | for (offset = RX_RSS_INDIR_TBL_B0; | 1571 | for (offset = RX_RSS_INDIR_TBL_B0; |
@@ -1595,7 +1588,7 @@ int falcon_init_interrupt(struct efx_nic *efx) | |||
1595 | 1588 | ||
1596 | if (!EFX_INT_MODE_USE_MSI(efx)) { | 1589 | if (!EFX_INT_MODE_USE_MSI(efx)) { |
1597 | irq_handler_t handler; | 1590 | irq_handler_t handler; |
1598 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 1591 | if (falcon_rev(efx) >= FALCON_REV_B0) |
1599 | handler = falcon_legacy_interrupt_b0; | 1592 | handler = falcon_legacy_interrupt_b0; |
1600 | else | 1593 | else |
1601 | handler = falcon_legacy_interrupt_a1; | 1594 | handler = falcon_legacy_interrupt_a1; |
@@ -1636,12 +1629,13 @@ void falcon_fini_interrupt(struct efx_nic *efx) | |||
1636 | efx_oword_t reg; | 1629 | efx_oword_t reg; |
1637 | 1630 | ||
1638 | /* Disable MSI/MSI-X interrupts */ | 1631 | /* Disable MSI/MSI-X interrupts */ |
1639 | efx_for_each_channel_with_interrupt(channel, efx) | 1632 | efx_for_each_channel_with_interrupt(channel, efx) { |
1640 | if (channel->irq) | 1633 | if (channel->irq) |
1641 | free_irq(channel->irq, channel); | 1634 | free_irq(channel->irq, channel); |
1635 | } | ||
1642 | 1636 | ||
1643 | /* ACK legacy interrupt */ | 1637 | /* ACK legacy interrupt */ |
1644 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 1638 | if (falcon_rev(efx) >= FALCON_REV_B0) |
1645 | falcon_read(efx, ®, INT_ISR0_B0); | 1639 | falcon_read(efx, ®, INT_ISR0_B0); |
1646 | else | 1640 | else |
1647 | falcon_irq_ack_a1(efx); | 1641 | falcon_irq_ack_a1(efx); |
@@ -1732,7 +1726,7 @@ void falcon_drain_tx_fifo(struct efx_nic *efx) | |||
1732 | efx_oword_t temp; | 1726 | efx_oword_t temp; |
1733 | int count; | 1727 | int count; |
1734 | 1728 | ||
1735 | if ((FALCON_REV(efx) < FALCON_REV_B0) || | 1729 | if ((falcon_rev(efx) < FALCON_REV_B0) || |
1736 | (efx->loopback_mode != LOOPBACK_NONE)) | 1730 | (efx->loopback_mode != LOOPBACK_NONE)) |
1737 | return; | 1731 | return; |
1738 | 1732 | ||
@@ -1785,7 +1779,7 @@ void falcon_deconfigure_mac_wrapper(struct efx_nic *efx) | |||
1785 | { | 1779 | { |
1786 | efx_oword_t temp; | 1780 | efx_oword_t temp; |
1787 | 1781 | ||
1788 | if (FALCON_REV(efx) < FALCON_REV_B0) | 1782 | if (falcon_rev(efx) < FALCON_REV_B0) |
1789 | return; | 1783 | return; |
1790 | 1784 | ||
1791 | /* Isolate the MAC -> RX */ | 1785 | /* Isolate the MAC -> RX */ |
@@ -1823,7 +1817,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx) | |||
1823 | MAC_SPEED, link_speed); | 1817 | MAC_SPEED, link_speed); |
1824 | /* On B0, MAC backpressure can be disabled and packets get | 1818 | /* On B0, MAC backpressure can be disabled and packets get |
1825 | * discarded. */ | 1819 | * discarded. */ |
1826 | if (FALCON_REV(efx) >= FALCON_REV_B0) { | 1820 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
1827 | EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, | 1821 | EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, |
1828 | !efx->link_up); | 1822 | !efx->link_up); |
1829 | } | 1823 | } |
@@ -1841,7 +1835,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx) | |||
1841 | EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc); | 1835 | EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc); |
1842 | 1836 | ||
1843 | /* Unisolate the MAC -> RX */ | 1837 | /* Unisolate the MAC -> RX */ |
1844 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 1838 | if (falcon_rev(efx) >= FALCON_REV_B0) |
1845 | EFX_SET_OWORD_FIELD(reg, RX_INGR_EN_B0, 1); | 1839 | EFX_SET_OWORD_FIELD(reg, RX_INGR_EN_B0, 1); |
1846 | falcon_write(efx, ®, RX_CFG_REG_KER); | 1840 | falcon_write(efx, ®, RX_CFG_REG_KER); |
1847 | } | 1841 | } |
@@ -1856,7 +1850,7 @@ int falcon_dma_stats(struct efx_nic *efx, unsigned int done_offset) | |||
1856 | return 0; | 1850 | return 0; |
1857 | 1851 | ||
1858 | /* Statistics fetch will fail if the MAC is in TX drain */ | 1852 | /* Statistics fetch will fail if the MAC is in TX drain */ |
1859 | if (FALCON_REV(efx) >= FALCON_REV_B0) { | 1853 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
1860 | efx_oword_t temp; | 1854 | efx_oword_t temp; |
1861 | falcon_read(efx, &temp, MAC0_CTRL_REG_KER); | 1855 | falcon_read(efx, &temp, MAC0_CTRL_REG_KER); |
1862 | if (EFX_OWORD_FIELD(temp, TXFIFO_DRAIN_EN_B0)) | 1856 | if (EFX_OWORD_FIELD(temp, TXFIFO_DRAIN_EN_B0)) |
@@ -1940,7 +1934,7 @@ static int falcon_gmii_wait(struct efx_nic *efx) | |||
1940 | static void falcon_mdio_write(struct net_device *net_dev, int phy_id, | 1934 | static void falcon_mdio_write(struct net_device *net_dev, int phy_id, |
1941 | int addr, int value) | 1935 | int addr, int value) |
1942 | { | 1936 | { |
1943 | struct efx_nic *efx = (struct efx_nic *)net_dev->priv; | 1937 | struct efx_nic *efx = net_dev->priv; |
1944 | unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK; | 1938 | unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK; |
1945 | efx_oword_t reg; | 1939 | efx_oword_t reg; |
1946 | 1940 | ||
@@ -2008,7 +2002,7 @@ static void falcon_mdio_write(struct net_device *net_dev, int phy_id, | |||
2008 | * could be read, -1 will be returned. */ | 2002 | * could be read, -1 will be returned. */ |
2009 | static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr) | 2003 | static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr) |
2010 | { | 2004 | { |
2011 | struct efx_nic *efx = (struct efx_nic *)net_dev->priv; | 2005 | struct efx_nic *efx = net_dev->priv; |
2012 | unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK; | 2006 | unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK; |
2013 | efx_oword_t reg; | 2007 | efx_oword_t reg; |
2014 | int value = -1; | 2008 | int value = -1; |
@@ -2113,7 +2107,7 @@ int falcon_probe_port(struct efx_nic *efx) | |||
2113 | falcon_init_mdio(&efx->mii); | 2107 | falcon_init_mdio(&efx->mii); |
2114 | 2108 | ||
2115 | /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ | 2109 | /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ |
2116 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 2110 | if (falcon_rev(efx) >= FALCON_REV_B0) |
2117 | efx->flow_control = EFX_FC_RX | EFX_FC_TX; | 2111 | efx->flow_control = EFX_FC_RX | EFX_FC_TX; |
2118 | else | 2112 | else |
2119 | efx->flow_control = EFX_FC_RX; | 2113 | efx->flow_control = EFX_FC_RX; |
@@ -2373,7 +2367,7 @@ static int falcon_probe_nic_variant(struct efx_nic *efx) | |||
2373 | return -ENODEV; | 2367 | return -ENODEV; |
2374 | } | 2368 | } |
2375 | 2369 | ||
2376 | switch (FALCON_REV(efx)) { | 2370 | switch (falcon_rev(efx)) { |
2377 | case FALCON_REV_A0: | 2371 | case FALCON_REV_A0: |
2378 | case 0xff: | 2372 | case 0xff: |
2379 | EFX_ERR(efx, "Falcon rev A0 not supported\n"); | 2373 | EFX_ERR(efx, "Falcon rev A0 not supported\n"); |
@@ -2399,7 +2393,7 @@ static int falcon_probe_nic_variant(struct efx_nic *efx) | |||
2399 | break; | 2393 | break; |
2400 | 2394 | ||
2401 | default: | 2395 | default: |
2402 | EFX_ERR(efx, "Unknown Falcon rev %d\n", FALCON_REV(efx)); | 2396 | EFX_ERR(efx, "Unknown Falcon rev %d\n", falcon_rev(efx)); |
2403 | return -ENODEV; | 2397 | return -ENODEV; |
2404 | } | 2398 | } |
2405 | 2399 | ||
@@ -2419,7 +2413,7 @@ int falcon_probe_nic(struct efx_nic *efx) | |||
2419 | 2413 | ||
2420 | /* Allocate storage for hardware specific data */ | 2414 | /* Allocate storage for hardware specific data */ |
2421 | nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); | 2415 | nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); |
2422 | efx->nic_data = (void *) nic_data; | 2416 | efx->nic_data = nic_data; |
2423 | 2417 | ||
2424 | /* Determine number of ports etc. */ | 2418 | /* Determine number of ports etc. */ |
2425 | rc = falcon_probe_nic_variant(efx); | 2419 | rc = falcon_probe_nic_variant(efx); |
@@ -2489,13 +2483,10 @@ int falcon_probe_nic(struct efx_nic *efx) | |||
2489 | */ | 2483 | */ |
2490 | int falcon_init_nic(struct efx_nic *efx) | 2484 | int falcon_init_nic(struct efx_nic *efx) |
2491 | { | 2485 | { |
2492 | struct falcon_nic_data *data; | ||
2493 | efx_oword_t temp; | 2486 | efx_oword_t temp; |
2494 | unsigned thresh; | 2487 | unsigned thresh; |
2495 | int rc; | 2488 | int rc; |
2496 | 2489 | ||
2497 | data = (struct falcon_nic_data *)efx->nic_data; | ||
2498 | |||
2499 | /* Set up the address region register. This is only needed | 2490 | /* Set up the address region register. This is only needed |
2500 | * for the B0 FPGA, but since we are just pushing in the | 2491 | * for the B0 FPGA, but since we are just pushing in the |
2501 | * reset defaults this may as well be unconditional. */ | 2492 | * reset defaults this may as well be unconditional. */ |
@@ -2562,7 +2553,7 @@ int falcon_init_nic(struct efx_nic *efx) | |||
2562 | 2553 | ||
2563 | /* Set number of RSS queues for receive path. */ | 2554 | /* Set number of RSS queues for receive path. */ |
2564 | falcon_read(efx, &temp, RX_FILTER_CTL_REG); | 2555 | falcon_read(efx, &temp, RX_FILTER_CTL_REG); |
2565 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 2556 | if (falcon_rev(efx) >= FALCON_REV_B0) |
2566 | EFX_SET_OWORD_FIELD(temp, NUM_KER, 0); | 2557 | EFX_SET_OWORD_FIELD(temp, NUM_KER, 0); |
2567 | else | 2558 | else |
2568 | EFX_SET_OWORD_FIELD(temp, NUM_KER, efx->rss_queues - 1); | 2559 | EFX_SET_OWORD_FIELD(temp, NUM_KER, efx->rss_queues - 1); |
@@ -2600,7 +2591,7 @@ int falcon_init_nic(struct efx_nic *efx) | |||
2600 | /* Prefetch threshold 2 => fetch when descriptor cache half empty */ | 2591 | /* Prefetch threshold 2 => fetch when descriptor cache half empty */ |
2601 | EFX_SET_OWORD_FIELD(temp, TX_PREF_THRESHOLD, 2); | 2592 | EFX_SET_OWORD_FIELD(temp, TX_PREF_THRESHOLD, 2); |
2602 | /* Squash TX of packets of 16 bytes or less */ | 2593 | /* Squash TX of packets of 16 bytes or less */ |
2603 | if (FALCON_REV(efx) >= FALCON_REV_B0 && EFX_WORKAROUND_9141(efx)) | 2594 | if (falcon_rev(efx) >= FALCON_REV_B0 && EFX_WORKAROUND_9141(efx)) |
2604 | EFX_SET_OWORD_FIELD(temp, TX_FLUSH_MIN_LEN_EN_B0, 1); | 2595 | EFX_SET_OWORD_FIELD(temp, TX_FLUSH_MIN_LEN_EN_B0, 1); |
2605 | falcon_write(efx, &temp, TX_CFG2_REG_KER); | 2596 | falcon_write(efx, &temp, TX_CFG2_REG_KER); |
2606 | 2597 | ||
@@ -2617,7 +2608,7 @@ int falcon_init_nic(struct efx_nic *efx) | |||
2617 | if (EFX_WORKAROUND_7575(efx)) | 2608 | if (EFX_WORKAROUND_7575(efx)) |
2618 | EFX_SET_OWORD_FIELD_VER(efx, temp, RX_USR_BUF_SIZE, | 2609 | EFX_SET_OWORD_FIELD_VER(efx, temp, RX_USR_BUF_SIZE, |
2619 | (3 * 4096) / 32); | 2610 | (3 * 4096) / 32); |
2620 | if (FALCON_REV(efx) >= FALCON_REV_B0) | 2611 | if (falcon_rev(efx) >= FALCON_REV_B0) |
2621 | EFX_SET_OWORD_FIELD(temp, RX_INGR_EN_B0, 1); | 2612 | EFX_SET_OWORD_FIELD(temp, RX_INGR_EN_B0, 1); |
2622 | 2613 | ||
2623 | /* RX FIFO flow control thresholds */ | 2614 | /* RX FIFO flow control thresholds */ |
@@ -2633,7 +2624,7 @@ int falcon_init_nic(struct efx_nic *efx) | |||
2633 | falcon_write(efx, &temp, RX_CFG_REG_KER); | 2624 | falcon_write(efx, &temp, RX_CFG_REG_KER); |
2634 | 2625 | ||
2635 | /* Set destination of both TX and RX Flush events */ | 2626 | /* Set destination of both TX and RX Flush events */ |
2636 | if (FALCON_REV(efx) >= FALCON_REV_B0) { | 2627 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
2637 | EFX_POPULATE_OWORD_1(temp, FLS_EVQ_ID, 0); | 2628 | EFX_POPULATE_OWORD_1(temp, FLS_EVQ_ID, 0); |
2638 | falcon_write(efx, &temp, DP_CTRL_REG); | 2629 | falcon_write(efx, &temp, DP_CTRL_REG); |
2639 | } | 2630 | } |
@@ -2647,7 +2638,7 @@ void falcon_remove_nic(struct efx_nic *efx) | |||
2647 | 2638 | ||
2648 | falcon_free_buffer(efx, &efx->irq_status); | 2639 | falcon_free_buffer(efx, &efx->irq_status); |
2649 | 2640 | ||
2650 | (void) falcon_reset_hw(efx, RESET_TYPE_ALL); | 2641 | falcon_reset_hw(efx, RESET_TYPE_ALL); |
2651 | 2642 | ||
2652 | /* Release the second function after the reset */ | 2643 | /* Release the second function after the reset */ |
2653 | if (nic_data->pci_dev2) { | 2644 | if (nic_data->pci_dev2) { |
diff --git a/drivers/net/sfc/falcon.h b/drivers/net/sfc/falcon.h index 6117403b0c03..492f9bc28840 100644 --- a/drivers/net/sfc/falcon.h +++ b/drivers/net/sfc/falcon.h | |||
@@ -23,7 +23,10 @@ enum falcon_revision { | |||
23 | FALCON_REV_B0 = 2, | 23 | FALCON_REV_B0 = 2, |
24 | }; | 24 | }; |
25 | 25 | ||
26 | #define FALCON_REV(efx) ((efx)->pci_dev->revision) | 26 | static inline int falcon_rev(struct efx_nic *efx) |
27 | { | ||
28 | return efx->pci_dev->revision; | ||
29 | } | ||
27 | 30 | ||
28 | extern struct efx_nic_type falcon_a_nic_type; | 31 | extern struct efx_nic_type falcon_a_nic_type; |
29 | extern struct efx_nic_type falcon_b_nic_type; | 32 | extern struct efx_nic_type falcon_b_nic_type; |
diff --git a/drivers/net/sfc/falcon_hwdefs.h b/drivers/net/sfc/falcon_hwdefs.h index 06e2d68fc3d1..6d003114eeab 100644 --- a/drivers/net/sfc/falcon_hwdefs.h +++ b/drivers/net/sfc/falcon_hwdefs.h | |||
@@ -1125,7 +1125,7 @@ struct falcon_nvconfig_board_v2 { | |||
1125 | u8 port1_phy_type; | 1125 | u8 port1_phy_type; |
1126 | __le16 asic_sub_revision; | 1126 | __le16 asic_sub_revision; |
1127 | __le16 board_revision; | 1127 | __le16 board_revision; |
1128 | } __attribute__ ((packed)); | 1128 | } __packed; |
1129 | 1129 | ||
1130 | #define NVCONFIG_BASE 0x300 | 1130 | #define NVCONFIG_BASE 0x300 |
1131 | #define NVCONFIG_BOARD_MAGIC_NUM 0xFA1C | 1131 | #define NVCONFIG_BOARD_MAGIC_NUM 0xFA1C |
@@ -1144,6 +1144,6 @@ struct falcon_nvconfig { | |||
1144 | __le16 board_struct_ver; | 1144 | __le16 board_struct_ver; |
1145 | __le16 board_checksum; | 1145 | __le16 board_checksum; |
1146 | struct falcon_nvconfig_board_v2 board_v2; | 1146 | struct falcon_nvconfig_board_v2 board_v2; |
1147 | } __attribute__ ((packed)); | 1147 | } __packed; |
1148 | 1148 | ||
1149 | #endif /* EFX_FALCON_HWDEFS_H */ | 1149 | #endif /* EFX_FALCON_HWDEFS_H */ |
diff --git a/drivers/net/sfc/falcon_io.h b/drivers/net/sfc/falcon_io.h index ea08184ddfa9..6670cdfc41ab 100644 --- a/drivers/net/sfc/falcon_io.h +++ b/drivers/net/sfc/falcon_io.h | |||
@@ -56,14 +56,27 @@ | |||
56 | #define FALCON_USE_QWORD_IO 1 | 56 | #define FALCON_USE_QWORD_IO 1 |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #define _falcon_writeq(efx, value, reg) \ | 59 | #ifdef FALCON_USE_QWORD_IO |
60 | __raw_writeq((__force u64) (value), (efx)->membase + (reg)) | 60 | static inline void _falcon_writeq(struct efx_nic *efx, __le64 value, |
61 | #define _falcon_writel(efx, value, reg) \ | 61 | unsigned int reg) |
62 | __raw_writel((__force u32) (value), (efx)->membase + (reg)) | 62 | { |
63 | #define _falcon_readq(efx, reg) \ | 63 | __raw_writeq((__force u64)value, efx->membase + reg); |
64 | ((__force __le64) __raw_readq((efx)->membase + (reg))) | 64 | } |
65 | #define _falcon_readl(efx, reg) \ | 65 | static inline __le64 _falcon_readq(struct efx_nic *efx, unsigned int reg) |
66 | ((__force __le32) __raw_readl((efx)->membase + (reg))) | 66 | { |
67 | return (__force __le64)__raw_readq(efx->membase + reg); | ||
68 | } | ||
69 | #endif | ||
70 | |||
71 | static inline void _falcon_writel(struct efx_nic *efx, __le32 value, | ||
72 | unsigned int reg) | ||
73 | { | ||
74 | __raw_writel((__force u32)value, efx->membase + reg); | ||
75 | } | ||
76 | static inline __le32 _falcon_readl(struct efx_nic *efx, unsigned int reg) | ||
77 | { | ||
78 | return (__force __le32)__raw_readl(efx->membase + reg); | ||
79 | } | ||
67 | 80 | ||
68 | /* Writes to a normal 16-byte Falcon register, locking as appropriate. */ | 81 | /* Writes to a normal 16-byte Falcon register, locking as appropriate. */ |
69 | static inline void falcon_write(struct efx_nic *efx, efx_oword_t *value, | 82 | static inline void falcon_write(struct efx_nic *efx, efx_oword_t *value, |
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index a74b7931a3c4..55c0d9760be8 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c | |||
@@ -221,7 +221,7 @@ static int falcon_xgmii_status(struct efx_nic *efx) | |||
221 | { | 221 | { |
222 | efx_dword_t reg; | 222 | efx_dword_t reg; |
223 | 223 | ||
224 | if (FALCON_REV(efx) < FALCON_REV_B0) | 224 | if (falcon_rev(efx) < FALCON_REV_B0) |
225 | return 1; | 225 | return 1; |
226 | 226 | ||
227 | /* The ISR latches, so clear it and re-read */ | 227 | /* The ISR latches, so clear it and re-read */ |
@@ -241,7 +241,7 @@ static void falcon_mask_status_intr(struct efx_nic *efx, int enable) | |||
241 | { | 241 | { |
242 | efx_dword_t reg; | 242 | efx_dword_t reg; |
243 | 243 | ||
244 | if ((FALCON_REV(efx) < FALCON_REV_B0) || LOOPBACK_INTERNAL(efx)) | 244 | if ((falcon_rev(efx) < FALCON_REV_B0) || LOOPBACK_INTERNAL(efx)) |
245 | return; | 245 | return; |
246 | 246 | ||
247 | /* Flush the ISR */ | 247 | /* Flush the ISR */ |
@@ -454,12 +454,12 @@ static int falcon_check_xaui_link_up(struct efx_nic *efx) | |||
454 | 454 | ||
455 | EFX_LOG(efx, "%s Clobbering XAUI (%d tries left).\n", | 455 | EFX_LOG(efx, "%s Clobbering XAUI (%d tries left).\n", |
456 | __func__, tries); | 456 | __func__, tries); |
457 | (void) falcon_reset_xaui(efx); | 457 | falcon_reset_xaui(efx); |
458 | udelay(200); | 458 | udelay(200); |
459 | tries--; | 459 | tries--; |
460 | } | 460 | } |
461 | 461 | ||
462 | EFX_ERR(efx, "Failed to bring XAUI link back up in %d tries!\n", | 462 | EFX_LOG(efx, "Failed to bring XAUI link back up in %d tries!\n", |
463 | max_tries); | 463 | max_tries); |
464 | return 0; | 464 | return 0; |
465 | } | 465 | } |
@@ -572,7 +572,7 @@ int falcon_check_xmac(struct efx_nic *efx) | |||
572 | xaui_link_ok = falcon_xaui_link_ok(efx); | 572 | xaui_link_ok = falcon_xaui_link_ok(efx); |
573 | 573 | ||
574 | if (EFX_WORKAROUND_5147(efx) && !xaui_link_ok) | 574 | if (EFX_WORKAROUND_5147(efx) && !xaui_link_ok) |
575 | (void) falcon_reset_xaui(efx); | 575 | falcon_reset_xaui(efx); |
576 | 576 | ||
577 | /* Call the PHY check_hw routine */ | 577 | /* Call the PHY check_hw routine */ |
578 | rc = efx->phy_op->check_hw(efx); | 578 | rc = efx->phy_op->check_hw(efx); |
@@ -639,7 +639,7 @@ int falcon_xmac_set_pause(struct efx_nic *efx, enum efx_fc_type flow_control) | |||
639 | reset = ((flow_control & EFX_FC_TX) && | 639 | reset = ((flow_control & EFX_FC_TX) && |
640 | !(efx->flow_control & EFX_FC_TX)); | 640 | !(efx->flow_control & EFX_FC_TX)); |
641 | if (EFX_WORKAROUND_11482(efx) && reset) { | 641 | if (EFX_WORKAROUND_11482(efx) && reset) { |
642 | if (FALCON_REV(efx) >= FALCON_REV_B0) { | 642 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
643 | /* Recover by resetting the EM block */ | 643 | /* Recover by resetting the EM block */ |
644 | if (efx->link_up) | 644 | if (efx->link_up) |
645 | falcon_drain_tx_fifo(efx); | 645 | falcon_drain_tx_fifo(efx); |
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 59f261b4171f..5e20e7551dae 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -42,7 +42,7 @@ | |||
42 | #ifndef EFX_DRIVER_NAME | 42 | #ifndef EFX_DRIVER_NAME |
43 | #define EFX_DRIVER_NAME "sfc" | 43 | #define EFX_DRIVER_NAME "sfc" |
44 | #endif | 44 | #endif |
45 | #define EFX_DRIVER_VERSION "2.2.0136" | 45 | #define EFX_DRIVER_VERSION "2.2" |
46 | 46 | ||
47 | #ifdef EFX_ENABLE_DEBUG | 47 | #ifdef EFX_ENABLE_DEBUG |
48 | #define EFX_BUG_ON_PARANOID(x) BUG_ON(x) | 48 | #define EFX_BUG_ON_PARANOID(x) BUG_ON(x) |
@@ -52,28 +52,19 @@ | |||
52 | #define EFX_WARN_ON_PARANOID(x) do {} while (0) | 52 | #define EFX_WARN_ON_PARANOID(x) do {} while (0) |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #define NET_DEV_REGISTERED(efx) \ | ||
56 | ((efx)->net_dev->reg_state == NETREG_REGISTERED) | ||
57 | |||
58 | /* Include net device name in log messages if it has been registered. | ||
59 | * Use efx->name not efx->net_dev->name so that races with (un)registration | ||
60 | * are harmless. | ||
61 | */ | ||
62 | #define NET_DEV_NAME(efx) (NET_DEV_REGISTERED(efx) ? (efx)->name : "") | ||
63 | |||
64 | /* Un-rate-limited logging */ | 55 | /* Un-rate-limited logging */ |
65 | #define EFX_ERR(efx, fmt, args...) \ | 56 | #define EFX_ERR(efx, fmt, args...) \ |
66 | dev_err(&((efx)->pci_dev->dev), "ERR: %s " fmt, NET_DEV_NAME(efx), ##args) | 57 | dev_err(&((efx)->pci_dev->dev), "ERR: %s " fmt, efx_dev_name(efx), ##args) |
67 | 58 | ||
68 | #define EFX_INFO(efx, fmt, args...) \ | 59 | #define EFX_INFO(efx, fmt, args...) \ |
69 | dev_info(&((efx)->pci_dev->dev), "INFO: %s " fmt, NET_DEV_NAME(efx), ##args) | 60 | dev_info(&((efx)->pci_dev->dev), "INFO: %s " fmt, efx_dev_name(efx), ##args) |
70 | 61 | ||
71 | #ifdef EFX_ENABLE_DEBUG | 62 | #ifdef EFX_ENABLE_DEBUG |
72 | #define EFX_LOG(efx, fmt, args...) \ | 63 | #define EFX_LOG(efx, fmt, args...) \ |
73 | dev_info(&((efx)->pci_dev->dev), "DBG: %s " fmt, NET_DEV_NAME(efx), ##args) | 64 | dev_info(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args) |
74 | #else | 65 | #else |
75 | #define EFX_LOG(efx, fmt, args...) \ | 66 | #define EFX_LOG(efx, fmt, args...) \ |
76 | dev_dbg(&((efx)->pci_dev->dev), "DBG: %s " fmt, NET_DEV_NAME(efx), ##args) | 67 | dev_dbg(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args) |
77 | #endif | 68 | #endif |
78 | 69 | ||
79 | #define EFX_TRACE(efx, fmt, args...) do {} while (0) | 70 | #define EFX_TRACE(efx, fmt, args...) do {} while (0) |
@@ -90,11 +81,6 @@ do {if (net_ratelimit()) EFX_INFO(efx, fmt, ##args); } while (0) | |||
90 | #define EFX_LOG_RL(efx, fmt, args...) \ | 81 | #define EFX_LOG_RL(efx, fmt, args...) \ |
91 | do {if (net_ratelimit()) EFX_LOG(efx, fmt, ##args); } while (0) | 82 | do {if (net_ratelimit()) EFX_LOG(efx, fmt, ##args); } while (0) |
92 | 83 | ||
93 | /* Kernel headers may redefine inline anyway */ | ||
94 | #ifndef inline | ||
95 | #define inline inline __attribute__ ((always_inline)) | ||
96 | #endif | ||
97 | |||
98 | /************************************************************************** | 84 | /************************************************************************** |
99 | * | 85 | * |
100 | * Efx data structures | 86 | * Efx data structures |
@@ -695,7 +681,7 @@ struct efx_nic { | |||
695 | struct workqueue_struct *workqueue; | 681 | struct workqueue_struct *workqueue; |
696 | struct work_struct reset_work; | 682 | struct work_struct reset_work; |
697 | struct delayed_work monitor_work; | 683 | struct delayed_work monitor_work; |
698 | unsigned long membase_phys; | 684 | resource_size_t membase_phys; |
699 | void __iomem *membase; | 685 | void __iomem *membase; |
700 | spinlock_t biu_lock; | 686 | spinlock_t biu_lock; |
701 | enum efx_int_mode interrupt_mode; | 687 | enum efx_int_mode interrupt_mode; |
@@ -719,7 +705,7 @@ struct efx_nic { | |||
719 | 705 | ||
720 | unsigned n_rx_nodesc_drop_cnt; | 706 | unsigned n_rx_nodesc_drop_cnt; |
721 | 707 | ||
722 | void *nic_data; | 708 | struct falcon_nic_data *nic_data; |
723 | 709 | ||
724 | struct mutex mac_lock; | 710 | struct mutex mac_lock; |
725 | int port_enabled; | 711 | int port_enabled; |
@@ -760,6 +746,20 @@ struct efx_nic { | |||
760 | void *loopback_selftest; | 746 | void *loopback_selftest; |
761 | }; | 747 | }; |
762 | 748 | ||
749 | static inline int efx_dev_registered(struct efx_nic *efx) | ||
750 | { | ||
751 | return efx->net_dev->reg_state == NETREG_REGISTERED; | ||
752 | } | ||
753 | |||
754 | /* Net device name, for inclusion in log messages if it has been registered. | ||
755 | * Use efx->name not efx->net_dev->name so that races with (un)registration | ||
756 | * are harmless. | ||
757 | */ | ||
758 | static inline const char *efx_dev_name(struct efx_nic *efx) | ||
759 | { | ||
760 | return efx_dev_registered(efx) ? efx->name : ""; | ||
761 | } | ||
762 | |||
763 | /** | 763 | /** |
764 | * struct efx_nic_type - Efx device type definition | 764 | * struct efx_nic_type - Efx device type definition |
765 | * @mem_bar: Memory BAR number | 765 | * @mem_bar: Memory BAR number |
@@ -795,7 +795,7 @@ struct efx_nic_type { | |||
795 | unsigned int txd_ring_mask; | 795 | unsigned int txd_ring_mask; |
796 | unsigned int rxd_ring_mask; | 796 | unsigned int rxd_ring_mask; |
797 | unsigned int evq_size; | 797 | unsigned int evq_size; |
798 | dma_addr_t max_dma_mask; | 798 | u64 max_dma_mask; |
799 | unsigned int tx_dma_mask; | 799 | unsigned int tx_dma_mask; |
800 | unsigned bug5391_mask; | 800 | unsigned bug5391_mask; |
801 | 801 | ||
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index 670622373ddf..601b001437c0 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -86,14 +86,17 @@ static unsigned int rx_refill_limit = 95; | |||
86 | */ | 86 | */ |
87 | #define EFX_RXD_HEAD_ROOM 2 | 87 | #define EFX_RXD_HEAD_ROOM 2 |
88 | 88 | ||
89 | /* Macros for zero-order pages (potentially) containing multiple RX buffers */ | 89 | static inline unsigned int efx_rx_buf_offset(struct efx_rx_buffer *buf) |
90 | #define RX_DATA_OFFSET(_data) \ | 90 | { |
91 | (((unsigned long) (_data)) & (PAGE_SIZE-1)) | 91 | /* Offset is always within one page, so we don't need to consider |
92 | #define RX_BUF_OFFSET(_rx_buf) \ | 92 | * the page order. |
93 | RX_DATA_OFFSET((_rx_buf)->data) | 93 | */ |
94 | 94 | return (__force unsigned long) buf->data & (PAGE_SIZE - 1); | |
95 | #define RX_PAGE_SIZE(_efx) \ | 95 | } |
96 | (PAGE_SIZE * (1u << (_efx)->rx_buffer_order)) | 96 | static inline unsigned int efx_rx_buf_size(struct efx_nic *efx) |
97 | { | ||
98 | return PAGE_SIZE << efx->rx_buffer_order; | ||
99 | } | ||
97 | 100 | ||
98 | 101 | ||
99 | /************************************************************************** | 102 | /************************************************************************** |
@@ -106,7 +109,7 @@ static unsigned int rx_refill_limit = 95; | |||
106 | static int efx_lro_get_skb_hdr(struct sk_buff *skb, void **ip_hdr, | 109 | static int efx_lro_get_skb_hdr(struct sk_buff *skb, void **ip_hdr, |
107 | void **tcpudp_hdr, u64 *hdr_flags, void *priv) | 110 | void **tcpudp_hdr, u64 *hdr_flags, void *priv) |
108 | { | 111 | { |
109 | struct efx_channel *channel = (struct efx_channel *)priv; | 112 | struct efx_channel *channel = priv; |
110 | struct iphdr *iph; | 113 | struct iphdr *iph; |
111 | struct tcphdr *th; | 114 | struct tcphdr *th; |
112 | 115 | ||
@@ -131,12 +134,12 @@ static int efx_get_frag_hdr(struct skb_frag_struct *frag, void **mac_hdr, | |||
131 | void **ip_hdr, void **tcpudp_hdr, u64 *hdr_flags, | 134 | void **ip_hdr, void **tcpudp_hdr, u64 *hdr_flags, |
132 | void *priv) | 135 | void *priv) |
133 | { | 136 | { |
134 | struct efx_channel *channel = (struct efx_channel *)priv; | 137 | struct efx_channel *channel = priv; |
135 | struct ethhdr *eh; | 138 | struct ethhdr *eh; |
136 | struct iphdr *iph; | 139 | struct iphdr *iph; |
137 | 140 | ||
138 | /* We support EtherII and VLAN encapsulated IPv4 */ | 141 | /* We support EtherII and VLAN encapsulated IPv4 */ |
139 | eh = (struct ethhdr *)(page_address(frag->page) + frag->page_offset); | 142 | eh = page_address(frag->page) + frag->page_offset; |
140 | *mac_hdr = eh; | 143 | *mac_hdr = eh; |
141 | 144 | ||
142 | if (eh->h_proto == htons(ETH_P_IP)) { | 145 | if (eh->h_proto == htons(ETH_P_IP)) { |
@@ -269,7 +272,7 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue, | |||
269 | return -ENOMEM; | 272 | return -ENOMEM; |
270 | 273 | ||
271 | dma_addr = pci_map_page(efx->pci_dev, rx_buf->page, | 274 | dma_addr = pci_map_page(efx->pci_dev, rx_buf->page, |
272 | 0, RX_PAGE_SIZE(efx), | 275 | 0, efx_rx_buf_size(efx), |
273 | PCI_DMA_FROMDEVICE); | 276 | PCI_DMA_FROMDEVICE); |
274 | 277 | ||
275 | if (unlikely(pci_dma_mapping_error(dma_addr))) { | 278 | if (unlikely(pci_dma_mapping_error(dma_addr))) { |
@@ -280,14 +283,14 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue, | |||
280 | 283 | ||
281 | rx_queue->buf_page = rx_buf->page; | 284 | rx_queue->buf_page = rx_buf->page; |
282 | rx_queue->buf_dma_addr = dma_addr; | 285 | rx_queue->buf_dma_addr = dma_addr; |
283 | rx_queue->buf_data = ((char *) page_address(rx_buf->page) + | 286 | rx_queue->buf_data = (page_address(rx_buf->page) + |
284 | EFX_PAGE_IP_ALIGN); | 287 | EFX_PAGE_IP_ALIGN); |
285 | } | 288 | } |
286 | 289 | ||
287 | offset = RX_DATA_OFFSET(rx_queue->buf_data); | ||
288 | rx_buf->len = bytes; | 290 | rx_buf->len = bytes; |
289 | rx_buf->dma_addr = rx_queue->buf_dma_addr + offset; | ||
290 | rx_buf->data = rx_queue->buf_data; | 291 | rx_buf->data = rx_queue->buf_data; |
292 | offset = efx_rx_buf_offset(rx_buf); | ||
293 | rx_buf->dma_addr = rx_queue->buf_dma_addr + offset; | ||
291 | 294 | ||
292 | /* Try to pack multiple buffers per page */ | 295 | /* Try to pack multiple buffers per page */ |
293 | if (efx->rx_buffer_order == 0) { | 296 | if (efx->rx_buffer_order == 0) { |
@@ -295,7 +298,7 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue, | |||
295 | rx_queue->buf_data += ((bytes + 0x1ff) & ~0x1ff); | 298 | rx_queue->buf_data += ((bytes + 0x1ff) & ~0x1ff); |
296 | offset += ((bytes + 0x1ff) & ~0x1ff); | 299 | offset += ((bytes + 0x1ff) & ~0x1ff); |
297 | 300 | ||
298 | space = RX_PAGE_SIZE(efx) - offset; | 301 | space = efx_rx_buf_size(efx) - offset; |
299 | if (space >= bytes) { | 302 | if (space >= bytes) { |
300 | /* Refs dropped on kernel releasing each skb */ | 303 | /* Refs dropped on kernel releasing each skb */ |
301 | get_page(rx_queue->buf_page); | 304 | get_page(rx_queue->buf_page); |
@@ -344,7 +347,8 @@ static inline void efx_unmap_rx_buffer(struct efx_nic *efx, | |||
344 | EFX_BUG_ON_PARANOID(rx_buf->skb); | 347 | EFX_BUG_ON_PARANOID(rx_buf->skb); |
345 | if (rx_buf->unmap_addr) { | 348 | if (rx_buf->unmap_addr) { |
346 | pci_unmap_page(efx->pci_dev, rx_buf->unmap_addr, | 349 | pci_unmap_page(efx->pci_dev, rx_buf->unmap_addr, |
347 | RX_PAGE_SIZE(efx), PCI_DMA_FROMDEVICE); | 350 | efx_rx_buf_size(efx), |
351 | PCI_DMA_FROMDEVICE); | ||
348 | rx_buf->unmap_addr = 0; | 352 | rx_buf->unmap_addr = 0; |
349 | } | 353 | } |
350 | } else if (likely(rx_buf->skb)) { | 354 | } else if (likely(rx_buf->skb)) { |
@@ -400,9 +404,10 @@ static int __efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue, | |||
400 | return 0; | 404 | return 0; |
401 | 405 | ||
402 | /* Record minimum fill level */ | 406 | /* Record minimum fill level */ |
403 | if (unlikely(fill_level < rx_queue->min_fill)) | 407 | if (unlikely(fill_level < rx_queue->min_fill)) { |
404 | if (fill_level) | 408 | if (fill_level) |
405 | rx_queue->min_fill = fill_level; | 409 | rx_queue->min_fill = fill_level; |
410 | } | ||
406 | 411 | ||
407 | /* Acquire RX add lock. If this lock is contended, then a fast | 412 | /* Acquire RX add lock. If this lock is contended, then a fast |
408 | * fill must already be in progress (e.g. in the refill | 413 | * fill must already be in progress (e.g. in the refill |
@@ -552,7 +557,7 @@ static inline void efx_rx_packet_lro(struct efx_channel *channel, | |||
552 | struct skb_frag_struct frags; | 557 | struct skb_frag_struct frags; |
553 | 558 | ||
554 | frags.page = rx_buf->page; | 559 | frags.page = rx_buf->page; |
555 | frags.page_offset = RX_BUF_OFFSET(rx_buf); | 560 | frags.page_offset = efx_rx_buf_offset(rx_buf); |
556 | frags.size = rx_buf->len; | 561 | frags.size = rx_buf->len; |
557 | 562 | ||
558 | lro_receive_frags(lro_mgr, &frags, rx_buf->len, | 563 | lro_receive_frags(lro_mgr, &frags, rx_buf->len, |
@@ -597,7 +602,7 @@ static inline struct sk_buff *efx_rx_mk_skb(struct efx_rx_buffer *rx_buf, | |||
597 | if (unlikely(rx_buf->len > hdr_len)) { | 602 | if (unlikely(rx_buf->len > hdr_len)) { |
598 | struct skb_frag_struct *frag = skb_shinfo(skb)->frags; | 603 | struct skb_frag_struct *frag = skb_shinfo(skb)->frags; |
599 | frag->page = rx_buf->page; | 604 | frag->page = rx_buf->page; |
600 | frag->page_offset = RX_BUF_OFFSET(rx_buf) + hdr_len; | 605 | frag->page_offset = efx_rx_buf_offset(rx_buf) + hdr_len; |
601 | frag->size = skb->len - hdr_len; | 606 | frag->size = skb->len - hdr_len; |
602 | skb_shinfo(skb)->nr_frags = 1; | 607 | skb_shinfo(skb)->nr_frags = 1; |
603 | skb->data_len = frag->size; | 608 | skb->data_len = frag->size; |
@@ -851,7 +856,8 @@ void efx_fini_rx_queue(struct efx_rx_queue *rx_queue) | |||
851 | /* For a page that is part-way through splitting into RX buffers */ | 856 | /* For a page that is part-way through splitting into RX buffers */ |
852 | if (rx_queue->buf_page != NULL) { | 857 | if (rx_queue->buf_page != NULL) { |
853 | pci_unmap_page(rx_queue->efx->pci_dev, rx_queue->buf_dma_addr, | 858 | pci_unmap_page(rx_queue->efx->pci_dev, rx_queue->buf_dma_addr, |
854 | RX_PAGE_SIZE(rx_queue->efx), PCI_DMA_FROMDEVICE); | 859 | efx_rx_buf_size(rx_queue->efx), |
860 | PCI_DMA_FROMDEVICE); | ||
855 | __free_pages(rx_queue->buf_page, | 861 | __free_pages(rx_queue->buf_page, |
856 | rx_queue->efx->rx_buffer_order); | 862 | rx_queue->efx->rx_buffer_order); |
857 | rx_queue->buf_page = NULL; | 863 | rx_queue->buf_page = NULL; |
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index cbda15946e8f..3b2de9fe7f27 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -290,7 +290,7 @@ void efx_loopback_rx_packet(struct efx_nic *efx, | |||
290 | 290 | ||
291 | payload = &state->payload; | 291 | payload = &state->payload; |
292 | 292 | ||
293 | received = (struct efx_loopback_payload *)(char *) buf_ptr; | 293 | received = (struct efx_loopback_payload *) buf_ptr; |
294 | received->ip.saddr = payload->ip.saddr; | 294 | received->ip.saddr = payload->ip.saddr; |
295 | received->ip.check = payload->ip.check; | 295 | received->ip.check = payload->ip.check; |
296 | 296 | ||
@@ -424,10 +424,10 @@ static int efx_tx_loopback(struct efx_tx_queue *tx_queue) | |||
424 | * interrupt handler. */ | 424 | * interrupt handler. */ |
425 | smp_wmb(); | 425 | smp_wmb(); |
426 | 426 | ||
427 | if (NET_DEV_REGISTERED(efx)) | 427 | if (efx_dev_registered(efx)) |
428 | netif_tx_lock_bh(efx->net_dev); | 428 | netif_tx_lock_bh(efx->net_dev); |
429 | rc = efx_xmit(efx, tx_queue, skb); | 429 | rc = efx_xmit(efx, tx_queue, skb); |
430 | if (NET_DEV_REGISTERED(efx)) | 430 | if (efx_dev_registered(efx)) |
431 | netif_tx_unlock_bh(efx->net_dev); | 431 | netif_tx_unlock_bh(efx->net_dev); |
432 | 432 | ||
433 | if (rc != NETDEV_TX_OK) { | 433 | if (rc != NETDEV_TX_OK) { |
@@ -453,7 +453,7 @@ static int efx_rx_loopback(struct efx_tx_queue *tx_queue, | |||
453 | int tx_done = 0, rx_good, rx_bad; | 453 | int tx_done = 0, rx_good, rx_bad; |
454 | int i, rc = 0; | 454 | int i, rc = 0; |
455 | 455 | ||
456 | if (NET_DEV_REGISTERED(efx)) | 456 | if (efx_dev_registered(efx)) |
457 | netif_tx_lock_bh(efx->net_dev); | 457 | netif_tx_lock_bh(efx->net_dev); |
458 | 458 | ||
459 | /* Count the number of tx completions, and decrement the refcnt. Any | 459 | /* Count the number of tx completions, and decrement the refcnt. Any |
@@ -465,7 +465,7 @@ static int efx_rx_loopback(struct efx_tx_queue *tx_queue, | |||
465 | dev_kfree_skb_any(skb); | 465 | dev_kfree_skb_any(skb); |
466 | } | 466 | } |
467 | 467 | ||
468 | if (NET_DEV_REGISTERED(efx)) | 468 | if (efx_dev_registered(efx)) |
469 | netif_tx_unlock_bh(efx->net_dev); | 469 | netif_tx_unlock_bh(efx->net_dev); |
470 | 470 | ||
471 | /* Check TX completion and received packet counts */ | 471 | /* Check TX completion and received packet counts */ |
@@ -517,6 +517,8 @@ efx_test_loopback(struct efx_tx_queue *tx_queue, | |||
517 | state->packet_count = min(1 << (i << 2), state->packet_count); | 517 | state->packet_count = min(1 << (i << 2), state->packet_count); |
518 | state->skbs = kzalloc(sizeof(state->skbs[0]) * | 518 | state->skbs = kzalloc(sizeof(state->skbs[0]) * |
519 | state->packet_count, GFP_KERNEL); | 519 | state->packet_count, GFP_KERNEL); |
520 | if (!state->skbs) | ||
521 | return -ENOMEM; | ||
520 | state->flush = 0; | 522 | state->flush = 0; |
521 | 523 | ||
522 | EFX_LOG(efx, "TX queue %d testing %s loopback with %d " | 524 | EFX_LOG(efx, "TX queue %d testing %s loopback with %d " |
@@ -700,7 +702,7 @@ int efx_offline_test(struct efx_nic *efx, | |||
700 | * "flushing" so all inflight packets are dropped */ | 702 | * "flushing" so all inflight packets are dropped */ |
701 | BUG_ON(efx->loopback_selftest); | 703 | BUG_ON(efx->loopback_selftest); |
702 | state->flush = 1; | 704 | state->flush = 1; |
703 | efx->loopback_selftest = (void *)state; | 705 | efx->loopback_selftest = state; |
704 | 706 | ||
705 | rc = efx_test_loopbacks(efx, tests, loopback_modes); | 707 | rc = efx_test_loopbacks(efx, tests, loopback_modes); |
706 | 708 | ||
diff --git a/drivers/net/sfc/sfe4001.c b/drivers/net/sfc/sfe4001.c index 725d1a539c49..66a0d1442aba 100644 --- a/drivers/net/sfc/sfe4001.c +++ b/drivers/net/sfc/sfe4001.c | |||
@@ -116,18 +116,18 @@ void sfe4001_poweroff(struct efx_nic *efx) | |||
116 | 116 | ||
117 | /* Turn off all power rails */ | 117 | /* Turn off all power rails */ |
118 | out = 0xff; | 118 | out = 0xff; |
119 | (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); | 119 | efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); |
120 | 120 | ||
121 | /* Disable port 1 outputs on IO expander */ | 121 | /* Disable port 1 outputs on IO expander */ |
122 | cfg = 0xff; | 122 | cfg = 0xff; |
123 | (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1); | 123 | efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1); |
124 | 124 | ||
125 | /* Disable port 0 outputs on IO expander */ | 125 | /* Disable port 0 outputs on IO expander */ |
126 | cfg = 0xff; | 126 | cfg = 0xff; |
127 | (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1); | 127 | efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1); |
128 | 128 | ||
129 | /* Clear any over-temperature alert */ | 129 | /* Clear any over-temperature alert */ |
130 | (void) efx_i2c_read(i2c, MAX6647, RSL, &in, 1); | 130 | efx_i2c_read(i2c, MAX6647, RSL, &in, 1); |
131 | } | 131 | } |
132 | 132 | ||
133 | /* The P0_EN_3V3X line on SFE4001 boards (from A2 onward) is connected | 133 | /* The P0_EN_3V3X line on SFE4001 boards (from A2 onward) is connected |
@@ -253,14 +253,14 @@ done: | |||
253 | fail3: | 253 | fail3: |
254 | /* Turn off all power rails */ | 254 | /* Turn off all power rails */ |
255 | out = 0xff; | 255 | out = 0xff; |
256 | (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); | 256 | efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); |
257 | /* Disable port 1 outputs on IO expander */ | 257 | /* Disable port 1 outputs on IO expander */ |
258 | out = 0xff; | 258 | out = 0xff; |
259 | (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, 1); | 259 | efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, 1); |
260 | fail2: | 260 | fail2: |
261 | /* Disable port 0 outputs on IO expander */ | 261 | /* Disable port 0 outputs on IO expander */ |
262 | out = 0xff; | 262 | out = 0xff; |
263 | (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &out, 1); | 263 | efx_i2c_write(i2c, PCA9539, P0_CONFIG, &out, 1); |
264 | fail1: | 264 | fail1: |
265 | return rc; | 265 | return rc; |
266 | } | 266 | } |
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index b1cd6deec01f..c0146061c326 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -211,6 +211,8 @@ static int tenxpress_phy_init(struct efx_nic *efx) | |||
211 | int rc = 0; | 211 | int rc = 0; |
212 | 212 | ||
213 | phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL); | 213 | phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL); |
214 | if (!phy_data) | ||
215 | return -ENOMEM; | ||
214 | efx->phy_data = phy_data; | 216 | efx->phy_data = phy_data; |
215 | 217 | ||
216 | tenxpress_set_state(efx, TENXPRESS_STATUS_NORMAL); | 218 | tenxpress_set_state(efx, TENXPRESS_STATUS_NORMAL); |
@@ -376,7 +378,7 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx) | |||
376 | * perform a special software reset */ | 378 | * perform a special software reset */ |
377 | if ((phy_data->tx_disabled && !efx->tx_disabled) || | 379 | if ((phy_data->tx_disabled && !efx->tx_disabled) || |
378 | loop_change) { | 380 | loop_change) { |
379 | (void) tenxpress_special_reset(efx); | 381 | tenxpress_special_reset(efx); |
380 | falcon_reset_xaui(efx); | 382 | falcon_reset_xaui(efx); |
381 | } | 383 | } |
382 | 384 | ||
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c index 9b436f5b4888..5cdd082ab8f6 100644 --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c | |||
@@ -387,7 +387,7 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index) | |||
387 | if (unlikely(tx_queue->stopped)) { | 387 | if (unlikely(tx_queue->stopped)) { |
388 | fill_level = tx_queue->insert_count - tx_queue->read_count; | 388 | fill_level = tx_queue->insert_count - tx_queue->read_count; |
389 | if (fill_level < EFX_NETDEV_TX_THRESHOLD(tx_queue)) { | 389 | if (fill_level < EFX_NETDEV_TX_THRESHOLD(tx_queue)) { |
390 | EFX_BUG_ON_PARANOID(!NET_DEV_REGISTERED(efx)); | 390 | EFX_BUG_ON_PARANOID(!efx_dev_registered(efx)); |
391 | 391 | ||
392 | /* Do this under netif_tx_lock(), to avoid racing | 392 | /* Do this under netif_tx_lock(), to avoid racing |
393 | * with efx_xmit(). */ | 393 | * with efx_xmit(). */ |
@@ -639,11 +639,12 @@ static void efx_tsoh_block_free(struct efx_tx_queue *tx_queue, | |||
639 | base_dma = tsoh->dma_addr & PAGE_MASK; | 639 | base_dma = tsoh->dma_addr & PAGE_MASK; |
640 | 640 | ||
641 | p = &tx_queue->tso_headers_free; | 641 | p = &tx_queue->tso_headers_free; |
642 | while (*p != NULL) | 642 | while (*p != NULL) { |
643 | if (((unsigned long)*p & PAGE_MASK) == base_kva) | 643 | if (((unsigned long)*p & PAGE_MASK) == base_kva) |
644 | *p = (*p)->next; | 644 | *p = (*p)->next; |
645 | else | 645 | else |
646 | p = &(*p)->next; | 646 | p = &(*p)->next; |
647 | } | ||
647 | 648 | ||
648 | pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma); | 649 | pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma); |
649 | } | 650 | } |
@@ -939,9 +940,10 @@ static inline int tso_start_new_packet(struct efx_tx_queue *tx_queue, | |||
939 | 940 | ||
940 | /* Allocate a DMA-mapped header buffer. */ | 941 | /* Allocate a DMA-mapped header buffer. */ |
941 | if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) { | 942 | if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) { |
942 | if (tx_queue->tso_headers_free == NULL) | 943 | if (tx_queue->tso_headers_free == NULL) { |
943 | if (efx_tsoh_block_alloc(tx_queue)) | 944 | if (efx_tsoh_block_alloc(tx_queue)) |
944 | return -1; | 945 | return -1; |
946 | } | ||
945 | EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free); | 947 | EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free); |
946 | tsoh = tx_queue->tso_headers_free; | 948 | tsoh = tx_queue->tso_headers_free; |
947 | tx_queue->tso_headers_free = tsoh->next; | 949 | tx_queue->tso_headers_free = tsoh->next; |
@@ -1106,9 +1108,10 @@ static void efx_fini_tso(struct efx_tx_queue *tx_queue) | |||
1106 | { | 1108 | { |
1107 | unsigned i; | 1109 | unsigned i; |
1108 | 1110 | ||
1109 | if (tx_queue->buffer) | 1111 | if (tx_queue->buffer) { |
1110 | for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i) | 1112 | for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i) |
1111 | efx_tsoh_free(tx_queue, &tx_queue->buffer[i]); | 1113 | efx_tsoh_free(tx_queue, &tx_queue->buffer[i]); |
1114 | } | ||
1112 | 1115 | ||
1113 | while (tx_queue->tso_headers_free != NULL) | 1116 | while (tx_queue->tso_headers_free != NULL) |
1114 | efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free, | 1117 | efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free, |
diff --git a/drivers/net/sfc/workarounds.h b/drivers/net/sfc/workarounds.h index dca62f190198..35ab19c27f8d 100644 --- a/drivers/net/sfc/workarounds.h +++ b/drivers/net/sfc/workarounds.h | |||
@@ -16,7 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #define EFX_WORKAROUND_ALWAYS(efx) 1 | 18 | #define EFX_WORKAROUND_ALWAYS(efx) 1 |
19 | #define EFX_WORKAROUND_FALCON_A(efx) (FALCON_REV(efx) <= FALCON_REV_A1) | 19 | #define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) |
20 | 20 | ||
21 | /* XAUI resets if link not detected */ | 21 | /* XAUI resets if link not detected */ |
22 | #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS | 22 | #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS |
diff --git a/drivers/net/sfc/xfp_phy.c b/drivers/net/sfc/xfp_phy.c index 3b9f9ddbc372..f3684ad28887 100644 --- a/drivers/net/sfc/xfp_phy.c +++ b/drivers/net/sfc/xfp_phy.c | |||
@@ -85,7 +85,9 @@ static int xfp_phy_init(struct efx_nic *efx) | |||
85 | int rc; | 85 | int rc; |
86 | 86 | ||
87 | phy_data = kzalloc(sizeof(struct xfp_phy_data), GFP_KERNEL); | 87 | phy_data = kzalloc(sizeof(struct xfp_phy_data), GFP_KERNEL); |
88 | efx->phy_data = (void *) phy_data; | 88 | if (!phy_data) |
89 | return -ENOMEM; | ||
90 | efx->phy_data = phy_data; | ||
89 | 91 | ||
90 | EFX_INFO(efx, "XFP: PHY ID reg %x (OUI %x model %x revision" | 92 | EFX_INFO(efx, "XFP: PHY ID reg %x (OUI %x model %x revision" |
91 | " %x)\n", devid, MDIO_ID_OUI(devid), MDIO_ID_MODEL(devid), | 93 | " %x)\n", devid, MDIO_ID_OUI(devid), MDIO_ID_MODEL(devid), |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index f226bcac7d17..62436b3a18c6 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1159,17 +1159,9 @@ static int sky2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | #ifdef SKY2_VLAN_TAG_USED | 1161 | #ifdef SKY2_VLAN_TAG_USED |
1162 | static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | 1162 | static void sky2_set_vlan_mode(struct sky2_hw *hw, u16 port, bool onoff) |
1163 | { | 1163 | { |
1164 | struct sky2_port *sky2 = netdev_priv(dev); | 1164 | if (onoff) { |
1165 | struct sky2_hw *hw = sky2->hw; | ||
1166 | u16 port = sky2->port; | ||
1167 | |||
1168 | netif_tx_lock_bh(dev); | ||
1169 | napi_disable(&hw->napi); | ||
1170 | |||
1171 | sky2->vlgrp = grp; | ||
1172 | if (grp) { | ||
1173 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), | 1165 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), |
1174 | RX_VLAN_STRIP_ON); | 1166 | RX_VLAN_STRIP_ON); |
1175 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | 1167 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), |
@@ -1180,6 +1172,19 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp | |||
1180 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), | 1172 | sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), |
1181 | TX_VLAN_TAG_OFF); | 1173 | TX_VLAN_TAG_OFF); |
1182 | } | 1174 | } |
1175 | } | ||
1176 | |||
1177 | static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | ||
1178 | { | ||
1179 | struct sky2_port *sky2 = netdev_priv(dev); | ||
1180 | struct sky2_hw *hw = sky2->hw; | ||
1181 | u16 port = sky2->port; | ||
1182 | |||
1183 | netif_tx_lock_bh(dev); | ||
1184 | napi_disable(&hw->napi); | ||
1185 | |||
1186 | sky2->vlgrp = grp; | ||
1187 | sky2_set_vlan_mode(hw, port, grp != NULL); | ||
1183 | 1188 | ||
1184 | sky2_read32(hw, B0_Y2_SP_LISR); | 1189 | sky2_read32(hw, B0_Y2_SP_LISR); |
1185 | napi_enable(&hw->napi); | 1190 | napi_enable(&hw->napi); |
@@ -1418,6 +1423,10 @@ static int sky2_up(struct net_device *dev) | |||
1418 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, | 1423 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, |
1419 | TX_RING_SIZE - 1); | 1424 | TX_RING_SIZE - 1); |
1420 | 1425 | ||
1426 | #ifdef SKY2_VLAN_TAG_USED | ||
1427 | sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL); | ||
1428 | #endif | ||
1429 | |||
1421 | err = sky2_rx_start(sky2); | 1430 | err = sky2_rx_start(sky2); |
1422 | if (err) | 1431 | if (err) |
1423 | goto err_out; | 1432 | goto err_out; |
@@ -4395,7 +4404,9 @@ static int sky2_resume(struct pci_dev *pdev) | |||
4395 | if (err) { | 4404 | if (err) { |
4396 | printk(KERN_ERR PFX "%s: could not up: %d\n", | 4405 | printk(KERN_ERR PFX "%s: could not up: %d\n", |
4397 | dev->name, err); | 4406 | dev->name, err); |
4407 | rtnl_lock(); | ||
4398 | dev_close(dev); | 4408 | dev_close(dev); |
4409 | rtnl_unlock(); | ||
4399 | goto out; | 4410 | goto out; |
4400 | } | 4411 | } |
4401 | } | 4412 | } |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 4e2800205189..e2ee91a6ae7e 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -136,7 +136,6 @@ struct smc911x_local { | |||
136 | 136 | ||
137 | /* work queue */ | 137 | /* work queue */ |
138 | struct work_struct phy_configure; | 138 | struct work_struct phy_configure; |
139 | int work_pending; | ||
140 | 139 | ||
141 | int tx_throttle; | 140 | int tx_throttle; |
142 | spinlock_t lock; | 141 | spinlock_t lock; |
@@ -960,11 +959,11 @@ static void smc911x_phy_configure(struct work_struct *work) | |||
960 | * We should not be called if phy_type is zero. | 959 | * We should not be called if phy_type is zero. |
961 | */ | 960 | */ |
962 | if (lp->phy_type == 0) | 961 | if (lp->phy_type == 0) |
963 | goto smc911x_phy_configure_exit_nolock; | 962 | return; |
964 | 963 | ||
965 | if (smc911x_phy_reset(dev, phyaddr)) { | 964 | if (smc911x_phy_reset(dev, phyaddr)) { |
966 | printk("%s: PHY reset timed out\n", dev->name); | 965 | printk("%s: PHY reset timed out\n", dev->name); |
967 | goto smc911x_phy_configure_exit_nolock; | 966 | return; |
968 | } | 967 | } |
969 | spin_lock_irqsave(&lp->lock, flags); | 968 | spin_lock_irqsave(&lp->lock, flags); |
970 | 969 | ||
@@ -1033,8 +1032,6 @@ static void smc911x_phy_configure(struct work_struct *work) | |||
1033 | 1032 | ||
1034 | smc911x_phy_configure_exit: | 1033 | smc911x_phy_configure_exit: |
1035 | spin_unlock_irqrestore(&lp->lock, flags); | 1034 | spin_unlock_irqrestore(&lp->lock, flags); |
1036 | smc911x_phy_configure_exit_nolock: | ||
1037 | lp->work_pending = 0; | ||
1038 | } | 1035 | } |
1039 | 1036 | ||
1040 | /* | 1037 | /* |
@@ -1356,11 +1353,8 @@ static void smc911x_timeout(struct net_device *dev) | |||
1356 | * smc911x_phy_configure() calls msleep() which calls schedule_timeout() | 1353 | * smc911x_phy_configure() calls msleep() which calls schedule_timeout() |
1357 | * which calls schedule(). Hence we use a work queue. | 1354 | * which calls schedule(). Hence we use a work queue. |
1358 | */ | 1355 | */ |
1359 | if (lp->phy_type != 0) { | 1356 | if (lp->phy_type != 0) |
1360 | if (schedule_work(&lp->phy_configure)) { | 1357 | schedule_work(&lp->phy_configure); |
1361 | lp->work_pending = 1; | ||
1362 | } | ||
1363 | } | ||
1364 | 1358 | ||
1365 | /* We can accept TX packets again */ | 1359 | /* We can accept TX packets again */ |
1366 | dev->trans_start = jiffies; | 1360 | dev->trans_start = jiffies; |
@@ -1531,16 +1525,8 @@ static int smc911x_close(struct net_device *dev) | |||
1531 | if (lp->phy_type != 0) { | 1525 | if (lp->phy_type != 0) { |
1532 | /* We need to ensure that no calls to | 1526 | /* We need to ensure that no calls to |
1533 | * smc911x_phy_configure are pending. | 1527 | * smc911x_phy_configure are pending. |
1534 | |||
1535 | * flush_scheduled_work() cannot be called because we | ||
1536 | * are running with the netlink semaphore held (from | ||
1537 | * devinet_ioctl()) and the pending work queue | ||
1538 | * contains linkwatch_event() (scheduled by | ||
1539 | * netif_carrier_off() above). linkwatch_event() also | ||
1540 | * wants the netlink semaphore. | ||
1541 | */ | 1528 | */ |
1542 | while (lp->work_pending) | 1529 | cancel_work_sync(&lp->phy_configure); |
1543 | schedule(); | ||
1544 | smc911x_phy_powerdown(dev, lp->mii.phy_id); | 1530 | smc911x_phy_powerdown(dev, lp->mii.phy_id); |
1545 | } | 1531 | } |
1546 | 1532 | ||
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index a188e33484e6..f2051b209da2 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1016,15 +1016,8 @@ static void smc_phy_powerdown(struct net_device *dev) | |||
1016 | 1016 | ||
1017 | /* We need to ensure that no calls to smc_phy_configure are | 1017 | /* We need to ensure that no calls to smc_phy_configure are |
1018 | pending. | 1018 | pending. |
1019 | |||
1020 | flush_scheduled_work() cannot be called because we are | ||
1021 | running with the netlink semaphore held (from | ||
1022 | devinet_ioctl()) and the pending work queue contains | ||
1023 | linkwatch_event() (scheduled by netif_carrier_off() | ||
1024 | above). linkwatch_event() also wants the netlink semaphore. | ||
1025 | */ | 1019 | */ |
1026 | while(lp->work_pending) | 1020 | cancel_work_sync(&lp->phy_configure); |
1027 | yield(); | ||
1028 | 1021 | ||
1029 | bmcr = smc_phy_read(dev, phy, MII_BMCR); | 1022 | bmcr = smc_phy_read(dev, phy, MII_BMCR); |
1030 | smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN); | 1023 | smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN); |
@@ -1161,7 +1154,6 @@ static void smc_phy_configure(struct work_struct *work) | |||
1161 | smc_phy_configure_exit: | 1154 | smc_phy_configure_exit: |
1162 | SMC_SELECT_BANK(lp, 2); | 1155 | SMC_SELECT_BANK(lp, 2); |
1163 | spin_unlock_irq(&lp->lock); | 1156 | spin_unlock_irq(&lp->lock); |
1164 | lp->work_pending = 0; | ||
1165 | } | 1157 | } |
1166 | 1158 | ||
1167 | /* | 1159 | /* |
@@ -1389,11 +1381,8 @@ static void smc_timeout(struct net_device *dev) | |||
1389 | * smc_phy_configure() calls msleep() which calls schedule_timeout() | 1381 | * smc_phy_configure() calls msleep() which calls schedule_timeout() |
1390 | * which calls schedule(). Hence we use a work queue. | 1382 | * which calls schedule(). Hence we use a work queue. |
1391 | */ | 1383 | */ |
1392 | if (lp->phy_type != 0) { | 1384 | if (lp->phy_type != 0) |
1393 | if (schedule_work(&lp->phy_configure)) { | 1385 | schedule_work(&lp->phy_configure); |
1394 | lp->work_pending = 1; | ||
1395 | } | ||
1396 | } | ||
1397 | 1386 | ||
1398 | /* We can accept TX packets again */ | 1387 | /* We can accept TX packets again */ |
1399 | dev->trans_start = jiffies; | 1388 | dev->trans_start = jiffies; |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 69e97a1cb1c4..8606818653f8 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -93,14 +93,14 @@ | |||
93 | #define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l) | 93 | #define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l) |
94 | # endif | 94 | # endif |
95 | /* check if the mac in reg is valid */ | 95 | /* check if the mac in reg is valid */ |
96 | #define SMC_GET_MAC_ADDR(addr) \ | 96 | #define SMC_GET_MAC_ADDR(lp, addr) \ |
97 | do { \ | 97 | do { \ |
98 | unsigned int __v; \ | 98 | unsigned int __v; \ |
99 | __v = SMC_inw(ioaddr, ADDR0_REG); \ | 99 | __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \ |
100 | addr[0] = __v; addr[1] = __v >> 8; \ | 100 | addr[0] = __v; addr[1] = __v >> 8; \ |
101 | __v = SMC_inw(ioaddr, ADDR1_REG); \ | 101 | __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \ |
102 | addr[2] = __v; addr[3] = __v >> 8; \ | 102 | addr[2] = __v; addr[3] = __v >> 8; \ |
103 | __v = SMC_inw(ioaddr, ADDR2_REG); \ | 103 | __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \ |
104 | addr[4] = __v; addr[5] = __v >> 8; \ | 104 | addr[4] = __v; addr[5] = __v >> 8; \ |
105 | if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \ | 105 | if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \ |
106 | random_ether_addr(addr); \ | 106 | random_ether_addr(addr); \ |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index b4e7f30ea4e8..1aa425be3067 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -111,7 +111,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne | |||
111 | struct hme_tx_logent *tlp; | 111 | struct hme_tx_logent *tlp; |
112 | unsigned long flags; | 112 | unsigned long flags; |
113 | 113 | ||
114 | save_and_cli(flags); | 114 | local_irq_save(flags); |
115 | tlp = &tx_log[txlog_cur_entry]; | 115 | tlp = &tx_log[txlog_cur_entry]; |
116 | tlp->tstamp = (unsigned int)jiffies; | 116 | tlp->tstamp = (unsigned int)jiffies; |
117 | tlp->tx_new = hp->tx_new; | 117 | tlp->tx_new = hp->tx_new; |
@@ -119,7 +119,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne | |||
119 | tlp->action = a; | 119 | tlp->action = a; |
120 | tlp->status = s; | 120 | tlp->status = s; |
121 | txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1); | 121 | txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1); |
122 | restore_flags(flags); | 122 | local_irq_restore(flags); |
123 | } | 123 | } |
124 | static __inline__ void tx_dump_log(void) | 124 | static __inline__ void tx_dump_log(void) |
125 | { | 125 | { |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 07b3f77e7626..cc4bde852542 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.92" | 67 | #define DRV_MODULE_VERSION "3.92.1" |
68 | #define DRV_MODULE_RELDATE "May 2, 2008" | 68 | #define DRV_MODULE_RELDATE "June 9, 2008" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -1295,6 +1295,21 @@ static void tg3_frob_aux_power(struct tg3 *tp) | |||
1295 | GRC_LCLCTRL_GPIO_OUTPUT0 | | 1295 | GRC_LCLCTRL_GPIO_OUTPUT0 | |
1296 | GRC_LCLCTRL_GPIO_OUTPUT1), | 1296 | GRC_LCLCTRL_GPIO_OUTPUT1), |
1297 | 100); | 1297 | 100); |
1298 | } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { | ||
1299 | /* The 5761 non-e device swaps GPIO 0 and GPIO 2. */ | ||
1300 | u32 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | | ||
1301 | GRC_LCLCTRL_GPIO_OE1 | | ||
1302 | GRC_LCLCTRL_GPIO_OE2 | | ||
1303 | GRC_LCLCTRL_GPIO_OUTPUT0 | | ||
1304 | GRC_LCLCTRL_GPIO_OUTPUT1 | | ||
1305 | tp->grc_local_ctrl; | ||
1306 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1307 | |||
1308 | grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT2; | ||
1309 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1310 | |||
1311 | grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT0; | ||
1312 | tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100); | ||
1298 | } else { | 1313 | } else { |
1299 | u32 no_gpio2; | 1314 | u32 no_gpio2; |
1300 | u32 grc_local_ctrl = 0; | 1315 | u32 grc_local_ctrl = 0; |
@@ -3168,8 +3183,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset) | |||
3168 | err |= tg3_readphy(tp, MII_BMCR, &bmcr); | 3183 | err |= tg3_readphy(tp, MII_BMCR, &bmcr); |
3169 | 3184 | ||
3170 | if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && | 3185 | if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && |
3171 | (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT) && | 3186 | (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT)) { |
3172 | tp->link_config.flowctrl == tp->link_config.active_flowctrl) { | ||
3173 | /* do nothing, just check for link up at the end */ | 3187 | /* do nothing, just check for link up at the end */ |
3174 | } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { | 3188 | } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { |
3175 | u32 adv, new_adv; | 3189 | u32 adv, new_adv; |
@@ -8599,7 +8613,7 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
8599 | (cmd->speed == SPEED_1000)) | 8613 | (cmd->speed == SPEED_1000)) |
8600 | return -EINVAL; | 8614 | return -EINVAL; |
8601 | else if ((cmd->speed == SPEED_1000) && | 8615 | else if ((cmd->speed == SPEED_1000) && |
8602 | (tp->tg3_flags2 & TG3_FLAG_10_100_ONLY)) | 8616 | (tp->tg3_flags & TG3_FLAG_10_100_ONLY)) |
8603 | return -EINVAL; | 8617 | return -EINVAL; |
8604 | 8618 | ||
8605 | tg3_full_lock(tp, 0); | 8619 | tg3_full_lock(tp, 0); |
@@ -11768,6 +11782,15 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
11768 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) | 11782 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) |
11769 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; | 11783 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; |
11770 | 11784 | ||
11785 | if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) { | ||
11786 | /* Turn off the debug UART. */ | ||
11787 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; | ||
11788 | if (tp->tg3_flags2 & TG3_FLG2_IS_NIC) | ||
11789 | /* Keep VMain power. */ | ||
11790 | tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | | ||
11791 | GRC_LCLCTRL_GPIO_OUTPUT0; | ||
11792 | } | ||
11793 | |||
11771 | /* Force the chip into D0. */ | 11794 | /* Force the chip into D0. */ |
11772 | err = tg3_set_power_state(tp, PCI_D0); | 11795 | err = tg3_set_power_state(tp, PCI_D0); |
11773 | if (err) { | 11796 | if (err) { |
diff --git a/drivers/net/tokenring/3c359.h b/drivers/net/tokenring/3c359.h index b880cba0f6fd..74cf8e1a181b 100644 --- a/drivers/net/tokenring/3c359.h +++ b/drivers/net/tokenring/3c359.h | |||
@@ -264,7 +264,7 @@ struct xl_private { | |||
264 | u16 asb; | 264 | u16 asb; |
265 | 265 | ||
266 | u8 __iomem *xl_mmio; | 266 | u8 __iomem *xl_mmio; |
267 | char *xl_card_name; | 267 | const char *xl_card_name; |
268 | struct pci_dev *pdev ; | 268 | struct pci_dev *pdev ; |
269 | 269 | ||
270 | spinlock_t xl_lock ; | 270 | spinlock_t xl_lock ; |
diff --git a/drivers/net/tokenring/olympic.h b/drivers/net/tokenring/olympic.h index c91956310fb2..10fbba08978f 100644 --- a/drivers/net/tokenring/olympic.h +++ b/drivers/net/tokenring/olympic.h | |||
@@ -254,7 +254,7 @@ struct olympic_private { | |||
254 | u8 __iomem *olympic_mmio; | 254 | u8 __iomem *olympic_mmio; |
255 | u8 __iomem *olympic_lap; | 255 | u8 __iomem *olympic_lap; |
256 | struct pci_dev *pdev ; | 256 | struct pci_dev *pdev ; |
257 | char *olympic_card_name ; | 257 | const char *olympic_card_name; |
258 | 258 | ||
259 | spinlock_t olympic_lock ; | 259 | spinlock_t olympic_lock ; |
260 | 260 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index f9d13fa05d64..af8d2c436efd 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -731,7 +731,7 @@ static void tulip_down (struct net_device *dev) | |||
731 | void __iomem *ioaddr = tp->base_addr; | 731 | void __iomem *ioaddr = tp->base_addr; |
732 | unsigned long flags; | 732 | unsigned long flags; |
733 | 733 | ||
734 | flush_scheduled_work(); | 734 | cancel_work_sync(&tp->media_work); |
735 | 735 | ||
736 | #ifdef CONFIG_TULIP_NAPI | 736 | #ifdef CONFIG_TULIP_NAPI |
737 | napi_disable(&tp->napi); | 737 | napi_disable(&tp->napi); |
@@ -1729,12 +1729,15 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state) | |||
1729 | if (!dev) | 1729 | if (!dev) |
1730 | return -EINVAL; | 1730 | return -EINVAL; |
1731 | 1731 | ||
1732 | if (netif_running(dev)) | 1732 | if (!netif_running(dev)) |
1733 | tulip_down(dev); | 1733 | goto save_state; |
1734 | |||
1735 | tulip_down(dev); | ||
1734 | 1736 | ||
1735 | netif_device_detach(dev); | 1737 | netif_device_detach(dev); |
1736 | free_irq(dev->irq, dev); | 1738 | free_irq(dev->irq, dev); |
1737 | 1739 | ||
1740 | save_state: | ||
1738 | pci_save_state(pdev); | 1741 | pci_save_state(pdev); |
1739 | pci_disable_device(pdev); | 1742 | pci_disable_device(pdev); |
1740 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 1743 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
@@ -1754,6 +1757,9 @@ static int tulip_resume(struct pci_dev *pdev) | |||
1754 | pci_set_power_state(pdev, PCI_D0); | 1757 | pci_set_power_state(pdev, PCI_D0); |
1755 | pci_restore_state(pdev); | 1758 | pci_restore_state(pdev); |
1756 | 1759 | ||
1760 | if (!netif_running(dev)) | ||
1761 | return 0; | ||
1762 | |||
1757 | if ((retval = pci_enable_device(pdev))) { | 1763 | if ((retval = pci_enable_device(pdev))) { |
1758 | printk (KERN_ERR "tulip: pci_enable_device failed in resume\n"); | 1764 | printk (KERN_ERR "tulip: pci_enable_device failed in resume\n"); |
1759 | return retval; | 1765 | return retval; |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 2511ca7a12aa..e9e628621639 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -225,6 +225,9 @@ static void uli526x_set_filter_mode(struct net_device *); | |||
225 | static const struct ethtool_ops netdev_ethtool_ops; | 225 | static const struct ethtool_ops netdev_ethtool_ops; |
226 | static u16 read_srom_word(long, int); | 226 | static u16 read_srom_word(long, int); |
227 | static irqreturn_t uli526x_interrupt(int, void *); | 227 | static irqreturn_t uli526x_interrupt(int, void *); |
228 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
229 | static void uli526x_poll(struct net_device *dev); | ||
230 | #endif | ||
228 | static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); | 231 | static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); |
229 | static void allocate_rx_buffer(struct uli526x_board_info *); | 232 | static void allocate_rx_buffer(struct uli526x_board_info *); |
230 | static void update_cr6(u32, unsigned long); | 233 | static void update_cr6(u32, unsigned long); |
@@ -339,6 +342,9 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev, | |||
339 | dev->get_stats = &uli526x_get_stats; | 342 | dev->get_stats = &uli526x_get_stats; |
340 | dev->set_multicast_list = &uli526x_set_filter_mode; | 343 | dev->set_multicast_list = &uli526x_set_filter_mode; |
341 | dev->ethtool_ops = &netdev_ethtool_ops; | 344 | dev->ethtool_ops = &netdev_ethtool_ops; |
345 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
346 | dev->poll_controller = &uli526x_poll; | ||
347 | #endif | ||
342 | spin_lock_init(&db->lock); | 348 | spin_lock_init(&db->lock); |
343 | 349 | ||
344 | 350 | ||
@@ -681,8 +687,9 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id) | |||
681 | db->cr5_data = inl(ioaddr + DCR5); | 687 | db->cr5_data = inl(ioaddr + DCR5); |
682 | outl(db->cr5_data, ioaddr + DCR5); | 688 | outl(db->cr5_data, ioaddr + DCR5); |
683 | if ( !(db->cr5_data & 0x180c1) ) { | 689 | if ( !(db->cr5_data & 0x180c1) ) { |
684 | spin_unlock_irqrestore(&db->lock, flags); | 690 | /* Restore CR7 to enable interrupt mask */ |
685 | outl(db->cr7_data, ioaddr + DCR7); | 691 | outl(db->cr7_data, ioaddr + DCR7); |
692 | spin_unlock_irqrestore(&db->lock, flags); | ||
686 | return IRQ_HANDLED; | 693 | return IRQ_HANDLED; |
687 | } | 694 | } |
688 | 695 | ||
@@ -715,6 +722,13 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id) | |||
715 | return IRQ_HANDLED; | 722 | return IRQ_HANDLED; |
716 | } | 723 | } |
717 | 724 | ||
725 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
726 | static void uli526x_poll(struct net_device *dev) | ||
727 | { | ||
728 | /* ISR grabs the irqsave lock, so this should be safe */ | ||
729 | uli526x_interrupt(dev->irq, dev); | ||
730 | } | ||
731 | #endif | ||
718 | 732 | ||
719 | /* | 733 | /* |
720 | * Free TX resource after TX complete | 734 | * Free TX resource after TX complete |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index ca0bdac07a78..fb0b918e5ccb 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -237,7 +237,7 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth, | |||
237 | skb->dev = ugeth->dev; | 237 | skb->dev = ugeth->dev; |
238 | 238 | ||
239 | out_be32(&((struct qe_bd __iomem *)bd)->buf, | 239 | out_be32(&((struct qe_bd __iomem *)bd)->buf, |
240 | dma_map_single(NULL, | 240 | dma_map_single(&ugeth->dev->dev, |
241 | skb->data, | 241 | skb->data, |
242 | ugeth->ug_info->uf_info.max_rx_buf_length + | 242 | ugeth->ug_info->uf_info.max_rx_buf_length + |
243 | UCC_GETH_RX_DATA_BUF_ALIGNMENT, | 243 | UCC_GETH_RX_DATA_BUF_ALIGNMENT, |
@@ -2158,7 +2158,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
2158 | continue; | 2158 | continue; |
2159 | for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { | 2159 | for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { |
2160 | if (ugeth->tx_skbuff[i][j]) { | 2160 | if (ugeth->tx_skbuff[i][j]) { |
2161 | dma_unmap_single(NULL, | 2161 | dma_unmap_single(&ugeth->dev->dev, |
2162 | in_be32(&((struct qe_bd __iomem *)bd)->buf), | 2162 | in_be32(&((struct qe_bd __iomem *)bd)->buf), |
2163 | (in_be32((u32 __iomem *)bd) & | 2163 | (in_be32((u32 __iomem *)bd) & |
2164 | BD_LENGTH_MASK), | 2164 | BD_LENGTH_MASK), |
@@ -2186,7 +2186,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth) | |||
2186 | bd = ugeth->p_rx_bd_ring[i]; | 2186 | bd = ugeth->p_rx_bd_ring[i]; |
2187 | for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { | 2187 | for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { |
2188 | if (ugeth->rx_skbuff[i][j]) { | 2188 | if (ugeth->rx_skbuff[i][j]) { |
2189 | dma_unmap_single(NULL, | 2189 | dma_unmap_single(&ugeth->dev->dev, |
2190 | in_be32(&((struct qe_bd __iomem *)bd)->buf), | 2190 | in_be32(&((struct qe_bd __iomem *)bd)->buf), |
2191 | ugeth->ug_info-> | 2191 | ugeth->ug_info-> |
2192 | uf_info.max_rx_buf_length + | 2192 | uf_info.max_rx_buf_length + |
@@ -3406,7 +3406,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3406 | 3406 | ||
3407 | /* set up the buffer descriptor */ | 3407 | /* set up the buffer descriptor */ |
3408 | out_be32(&((struct qe_bd __iomem *)bd)->buf, | 3408 | out_be32(&((struct qe_bd __iomem *)bd)->buf, |
3409 | dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE)); | 3409 | dma_map_single(&ugeth->dev->dev, skb->data, |
3410 | skb->len, DMA_TO_DEVICE)); | ||
3410 | 3411 | ||
3411 | /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ | 3412 | /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ |
3412 | 3413 | ||
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c index 299b7f176950..f5839c4a5cbd 100644 --- a/drivers/net/ucc_geth_ethtool.c +++ b/drivers/net/ucc_geth_ethtool.c | |||
@@ -73,6 +73,7 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { | |||
73 | "tx-frames-ok", | 73 | "tx-frames-ok", |
74 | "tx-excessive-differ-frames", | 74 | "tx-excessive-differ-frames", |
75 | "tx-256-511-frames", | 75 | "tx-256-511-frames", |
76 | "tx-512-1023-frames", | ||
76 | "tx-1024-1518-frames", | 77 | "tx-1024-1518-frames", |
77 | "tx-jumbo-frames", | 78 | "tx-jumbo-frames", |
78 | }; | 79 | }; |
@@ -308,7 +309,7 @@ static void uec_get_strings(struct net_device *netdev, u32 stringset, u8 *buf) | |||
308 | buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN; | 309 | buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN; |
309 | } | 310 | } |
310 | if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) | 311 | if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) |
311 | memcpy(buf, tx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN * | 312 | memcpy(buf, rx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN * |
312 | ETH_GSTRING_LEN); | 313 | ETH_GSTRING_LEN); |
313 | } | 314 | } |
314 | 315 | ||
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index dc6f097062df..37ecf845edfe 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1440,6 +1440,10 @@ static const struct usb_device_id products [] = { | |||
1440 | // Belkin F5D5055 | 1440 | // Belkin F5D5055 |
1441 | USB_DEVICE(0x050d, 0x5055), | 1441 | USB_DEVICE(0x050d, 0x5055), |
1442 | .driver_info = (unsigned long) &ax88178_info, | 1442 | .driver_info = (unsigned long) &ax88178_info, |
1443 | }, { | ||
1444 | // Apple USB Ethernet Adapter | ||
1445 | USB_DEVICE(0x05ac, 0x1402), | ||
1446 | .driver_info = (unsigned long) &ax88772_info, | ||
1443 | }, | 1447 | }, |
1444 | { }, // END | 1448 | { }, // END |
1445 | }; | 1449 | }; |
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 76752d84a30f..22c17bbacb69 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -423,7 +423,10 @@ static int catc_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
423 | 423 | ||
424 | catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6; | 424 | catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6; |
425 | tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr; | 425 | tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr; |
426 | *((u16*)tx_buf) = (catc->is_f5u011) ? cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len); | 426 | if (catc->is_f5u011) |
427 | *(__be16 *)tx_buf = cpu_to_be16(skb->len); | ||
428 | else | ||
429 | *(__le16 *)tx_buf = cpu_to_le16(skb->len); | ||
427 | skb_copy_from_linear_data(skb, tx_buf + 2, skb->len); | 430 | skb_copy_from_linear_data(skb, tx_buf + 2, skb->len); |
428 | catc->tx_ptr += skb->len + 2; | 431 | catc->tx_ptr += skb->len + 2; |
429 | 432 | ||
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index 0ec7936cbe21..c66b9c324f54 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
@@ -218,7 +218,7 @@ static const struct driver_info blob_info = { | |||
218 | /*-------------------------------------------------------------------------*/ | 218 | /*-------------------------------------------------------------------------*/ |
219 | 219 | ||
220 | #ifndef HAVE_HARDWARE | 220 | #ifndef HAVE_HARDWARE |
221 | #error You need to configure some hardware for this driver | 221 | #warning You need to configure some hardware for this driver |
222 | #endif | 222 | #endif |
223 | 223 | ||
224 | /* | 224 | /* |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 0dcfc0310264..7c66b052f55a 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -706,7 +706,7 @@ static void kaweth_kill_urbs(struct kaweth_device *kaweth) | |||
706 | usb_kill_urb(kaweth->rx_urb); | 706 | usb_kill_urb(kaweth->rx_urb); |
707 | usb_kill_urb(kaweth->tx_urb); | 707 | usb_kill_urb(kaweth->tx_urb); |
708 | 708 | ||
709 | flush_scheduled_work(); | 709 | cancel_delayed_work_sync(&kaweth->lowmem_work); |
710 | 710 | ||
711 | /* a scheduled work may have resubmitted, | 711 | /* a scheduled work may have resubmitted, |
712 | we hit them again */ | 712 | we hit them again */ |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 21a7785cb8b6..ae467f182c40 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -194,7 +194,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf) | |||
194 | dev_dbg(&info->control->dev, | 194 | dev_dbg(&info->control->dev, |
195 | "rndis response error, code %d\n", retval); | 195 | "rndis response error, code %d\n", retval); |
196 | } | 196 | } |
197 | msleep(2); | 197 | msleep(20); |
198 | } | 198 | } |
199 | dev_dbg(&info->control->dev, "rndis response timeout\n"); | 199 | dev_dbg(&info->control->dev, "rndis response timeout\n"); |
200 | return -ETIMEDOUT; | 200 | return -ETIMEDOUT; |
@@ -283,8 +283,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags) | |||
283 | struct rndis_set_c *set_c; | 283 | struct rndis_set_c *set_c; |
284 | struct rndis_halt *halt; | 284 | struct rndis_halt *halt; |
285 | } u; | 285 | } u; |
286 | u32 tmp, phym_unspec; | 286 | u32 tmp; |
287 | __le32 *phym; | 287 | __le32 phym_unspec, *phym; |
288 | int reply_len; | 288 | int reply_len; |
289 | unsigned char *bp; | 289 | unsigned char *bp; |
290 | 290 | ||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f926b5ab3d09..4452306d5328 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -44,9 +44,16 @@ struct virtnet_info | |||
44 | /* The skb we couldn't send because buffers were full. */ | 44 | /* The skb we couldn't send because buffers were full. */ |
45 | struct sk_buff *last_xmit_skb; | 45 | struct sk_buff *last_xmit_skb; |
46 | 46 | ||
47 | /* If we need to free in a timer, this is it. */ | ||
48 | struct timer_list xmit_free_timer; | ||
49 | |||
47 | /* Number of input buffers, and max we've ever had. */ | 50 | /* Number of input buffers, and max we've ever had. */ |
48 | unsigned int num, max; | 51 | unsigned int num, max; |
49 | 52 | ||
53 | /* For cleaning up after transmission. */ | ||
54 | struct tasklet_struct tasklet; | ||
55 | bool free_in_tasklet; | ||
56 | |||
50 | /* Receive & send queues. */ | 57 | /* Receive & send queues. */ |
51 | struct sk_buff_head recv; | 58 | struct sk_buff_head recv; |
52 | struct sk_buff_head send; | 59 | struct sk_buff_head send; |
@@ -68,8 +75,13 @@ static void skb_xmit_done(struct virtqueue *svq) | |||
68 | 75 | ||
69 | /* Suppress further interrupts. */ | 76 | /* Suppress further interrupts. */ |
70 | svq->vq_ops->disable_cb(svq); | 77 | svq->vq_ops->disable_cb(svq); |
71 | /* We were waiting for more output buffers. */ | 78 | |
79 | /* We were probably waiting for more output buffers. */ | ||
72 | netif_wake_queue(vi->dev); | 80 | netif_wake_queue(vi->dev); |
81 | |||
82 | /* Make sure we re-xmit last_xmit_skb: if there are no more packets | ||
83 | * queued, start_xmit won't be called. */ | ||
84 | tasklet_schedule(&vi->tasklet); | ||
73 | } | 85 | } |
74 | 86 | ||
75 | static void receive_skb(struct net_device *dev, struct sk_buff *skb, | 87 | static void receive_skb(struct net_device *dev, struct sk_buff *skb, |
@@ -86,9 +98,7 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb, | |||
86 | BUG_ON(len > MAX_PACKET_LEN); | 98 | BUG_ON(len > MAX_PACKET_LEN); |
87 | 99 | ||
88 | skb_trim(skb, len); | 100 | skb_trim(skb, len); |
89 | skb->protocol = eth_type_trans(skb, dev); | 101 | |
90 | pr_debug("Receiving skb proto 0x%04x len %i type %i\n", | ||
91 | ntohs(skb->protocol), skb->len, skb->pkt_type); | ||
92 | dev->stats.rx_bytes += skb->len; | 102 | dev->stats.rx_bytes += skb->len; |
93 | dev->stats.rx_packets++; | 103 | dev->stats.rx_packets++; |
94 | 104 | ||
@@ -98,6 +108,10 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb, | |||
98 | goto frame_err; | 108 | goto frame_err; |
99 | } | 109 | } |
100 | 110 | ||
111 | skb->protocol = eth_type_trans(skb, dev); | ||
112 | pr_debug("Receiving skb proto 0x%04x len %i type %i\n", | ||
113 | ntohs(skb->protocol), skb->len, skb->pkt_type); | ||
114 | |||
101 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { | 115 | if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { |
102 | pr_debug("GSO!\n"); | 116 | pr_debug("GSO!\n"); |
103 | switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { | 117 | switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { |
@@ -230,9 +244,25 @@ static void free_old_xmit_skbs(struct virtnet_info *vi) | |||
230 | } | 244 | } |
231 | } | 245 | } |
232 | 246 | ||
247 | /* If the virtio transport doesn't always notify us when all in-flight packets | ||
248 | * are consumed, we fall back to using this function on a timer to free them. */ | ||
249 | static void xmit_free(unsigned long data) | ||
250 | { | ||
251 | struct virtnet_info *vi = (void *)data; | ||
252 | |||
253 | netif_tx_lock(vi->dev); | ||
254 | |||
255 | free_old_xmit_skbs(vi); | ||
256 | |||
257 | if (!skb_queue_empty(&vi->send)) | ||
258 | mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10)); | ||
259 | |||
260 | netif_tx_unlock(vi->dev); | ||
261 | } | ||
262 | |||
233 | static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | 263 | static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) |
234 | { | 264 | { |
235 | int num; | 265 | int num, err; |
236 | struct scatterlist sg[2+MAX_SKB_FRAGS]; | 266 | struct scatterlist sg[2+MAX_SKB_FRAGS]; |
237 | struct virtio_net_hdr *hdr; | 267 | struct virtio_net_hdr *hdr; |
238 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; | 268 | const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; |
@@ -275,7 +305,25 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
275 | vnet_hdr_to_sg(sg, skb); | 305 | vnet_hdr_to_sg(sg, skb); |
276 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; | 306 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; |
277 | 307 | ||
278 | return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); | 308 | err = vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); |
309 | if (!err && !vi->free_in_tasklet) | ||
310 | mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10)); | ||
311 | |||
312 | return err; | ||
313 | } | ||
314 | |||
315 | static void xmit_tasklet(unsigned long data) | ||
316 | { | ||
317 | struct virtnet_info *vi = (void *)data; | ||
318 | |||
319 | netif_tx_lock_bh(vi->dev); | ||
320 | if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) { | ||
321 | vi->svq->vq_ops->kick(vi->svq); | ||
322 | vi->last_xmit_skb = NULL; | ||
323 | } | ||
324 | if (vi->free_in_tasklet) | ||
325 | free_old_xmit_skbs(vi); | ||
326 | netif_tx_unlock_bh(vi->dev); | ||
279 | } | 327 | } |
280 | 328 | ||
281 | static int start_xmit(struct sk_buff *skb, struct net_device *dev) | 329 | static int start_xmit(struct sk_buff *skb, struct net_device *dev) |
@@ -287,21 +335,25 @@ again: | |||
287 | free_old_xmit_skbs(vi); | 335 | free_old_xmit_skbs(vi); |
288 | 336 | ||
289 | /* If we has a buffer left over from last time, send it now. */ | 337 | /* If we has a buffer left over from last time, send it now. */ |
290 | if (vi->last_xmit_skb) { | 338 | if (unlikely(vi->last_xmit_skb)) { |
291 | if (xmit_skb(vi, vi->last_xmit_skb) != 0) { | 339 | if (xmit_skb(vi, vi->last_xmit_skb) != 0) { |
292 | /* Drop this skb: we only queue one. */ | 340 | /* Drop this skb: we only queue one. */ |
293 | vi->dev->stats.tx_dropped++; | 341 | vi->dev->stats.tx_dropped++; |
294 | kfree_skb(skb); | 342 | kfree_skb(skb); |
343 | skb = NULL; | ||
295 | goto stop_queue; | 344 | goto stop_queue; |
296 | } | 345 | } |
297 | vi->last_xmit_skb = NULL; | 346 | vi->last_xmit_skb = NULL; |
298 | } | 347 | } |
299 | 348 | ||
300 | /* Put new one in send queue and do transmit */ | 349 | /* Put new one in send queue and do transmit */ |
301 | __skb_queue_head(&vi->send, skb); | 350 | if (likely(skb)) { |
302 | if (xmit_skb(vi, skb) != 0) { | 351 | __skb_queue_head(&vi->send, skb); |
303 | vi->last_xmit_skb = skb; | 352 | if (xmit_skb(vi, skb) != 0) { |
304 | goto stop_queue; | 353 | vi->last_xmit_skb = skb; |
354 | skb = NULL; | ||
355 | goto stop_queue; | ||
356 | } | ||
305 | } | 357 | } |
306 | done: | 358 | done: |
307 | vi->svq->vq_ops->kick(vi->svq); | 359 | vi->svq->vq_ops->kick(vi->svq); |
@@ -411,6 +463,10 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
411 | vi->vdev = vdev; | 463 | vi->vdev = vdev; |
412 | vdev->priv = vi; | 464 | vdev->priv = vi; |
413 | 465 | ||
466 | /* If they give us a callback when all buffers are done, we don't need | ||
467 | * the timer. */ | ||
468 | vi->free_in_tasklet = virtio_has_feature(vdev,VIRTIO_F_NOTIFY_ON_EMPTY); | ||
469 | |||
414 | /* We expect two virtqueues, receive then send. */ | 470 | /* We expect two virtqueues, receive then send. */ |
415 | vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done); | 471 | vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done); |
416 | if (IS_ERR(vi->rvq)) { | 472 | if (IS_ERR(vi->rvq)) { |
@@ -428,6 +484,11 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
428 | skb_queue_head_init(&vi->recv); | 484 | skb_queue_head_init(&vi->recv); |
429 | skb_queue_head_init(&vi->send); | 485 | skb_queue_head_init(&vi->send); |
430 | 486 | ||
487 | tasklet_init(&vi->tasklet, xmit_tasklet, (unsigned long)vi); | ||
488 | |||
489 | if (!vi->free_in_tasklet) | ||
490 | setup_timer(&vi->xmit_free_timer, xmit_free, (unsigned long)vi); | ||
491 | |||
431 | err = register_netdev(dev); | 492 | err = register_netdev(dev); |
432 | if (err) { | 493 | if (err) { |
433 | pr_debug("virtio_net: registering device failed\n"); | 494 | pr_debug("virtio_net: registering device failed\n"); |
@@ -465,13 +526,15 @@ static void virtnet_remove(struct virtio_device *vdev) | |||
465 | /* Stop all the virtqueues. */ | 526 | /* Stop all the virtqueues. */ |
466 | vdev->config->reset(vdev); | 527 | vdev->config->reset(vdev); |
467 | 528 | ||
529 | if (!vi->free_in_tasklet) | ||
530 | del_timer_sync(&vi->xmit_free_timer); | ||
531 | |||
468 | /* Free our skbs in send and recv queues, if any. */ | 532 | /* Free our skbs in send and recv queues, if any. */ |
469 | while ((skb = __skb_dequeue(&vi->recv)) != NULL) { | 533 | while ((skb = __skb_dequeue(&vi->recv)) != NULL) { |
470 | kfree_skb(skb); | 534 | kfree_skb(skb); |
471 | vi->num--; | 535 | vi->num--; |
472 | } | 536 | } |
473 | while ((skb = __skb_dequeue(&vi->send)) != NULL) | 537 | __skb_queue_purge(&vi->send); |
474 | kfree_skb(skb); | ||
475 | 538 | ||
476 | BUG_ON(vi->num != 0); | 539 | BUG_ON(vi->num != 0); |
477 | 540 | ||
@@ -489,7 +552,7 @@ static struct virtio_device_id id_table[] = { | |||
489 | static unsigned int features[] = { | 552 | static unsigned int features[] = { |
490 | VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, | 553 | VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, |
491 | VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, | 554 | VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, |
492 | VIRTIO_NET_F_HOST_ECN, | 555 | VIRTIO_NET_F_HOST_ECN, VIRTIO_F_NOTIFY_ON_EMPTY, |
493 | }; | 556 | }; |
494 | 557 | ||
495 | static struct virtio_driver virtio_net = { | 558 | static struct virtio_driver virtio_net = { |
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index 9a83c9d5b8cf..7f984895b0d5 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c | |||
@@ -43,8 +43,7 @@ static const char* version = "HDLC support module revision 1.22"; | |||
43 | 43 | ||
44 | #undef DEBUG_LINK | 44 | #undef DEBUG_LINK |
45 | 45 | ||
46 | static struct hdlc_proto *first_proto = NULL; | 46 | static struct hdlc_proto *first_proto; |
47 | |||
48 | 47 | ||
49 | static int hdlc_change_mtu(struct net_device *dev, int new_mtu) | 48 | static int hdlc_change_mtu(struct net_device *dev, int new_mtu) |
50 | { | 49 | { |
@@ -314,21 +313,25 @@ void detach_hdlc_protocol(struct net_device *dev) | |||
314 | 313 | ||
315 | void register_hdlc_protocol(struct hdlc_proto *proto) | 314 | void register_hdlc_protocol(struct hdlc_proto *proto) |
316 | { | 315 | { |
316 | rtnl_lock(); | ||
317 | proto->next = first_proto; | 317 | proto->next = first_proto; |
318 | first_proto = proto; | 318 | first_proto = proto; |
319 | rtnl_unlock(); | ||
319 | } | 320 | } |
320 | 321 | ||
321 | 322 | ||
322 | void unregister_hdlc_protocol(struct hdlc_proto *proto) | 323 | void unregister_hdlc_protocol(struct hdlc_proto *proto) |
323 | { | 324 | { |
324 | struct hdlc_proto **p = &first_proto; | 325 | struct hdlc_proto **p; |
325 | while (*p) { | 326 | |
326 | if (*p == proto) { | 327 | rtnl_lock(); |
327 | *p = proto->next; | 328 | p = &first_proto; |
328 | return; | 329 | while (*p != proto) { |
329 | } | 330 | BUG_ON(!*p); |
330 | p = &((*p)->next); | 331 | p = &((*p)->next); |
331 | } | 332 | } |
333 | *p = proto->next; | ||
334 | rtnl_unlock(); | ||
332 | } | 335 | } |
333 | 336 | ||
334 | 337 | ||
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 7133c688cf20..762d21c1c703 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -56,6 +56,7 @@ struct cisco_state { | |||
56 | cisco_proto settings; | 56 | cisco_proto settings; |
57 | 57 | ||
58 | struct timer_list timer; | 58 | struct timer_list timer; |
59 | spinlock_t lock; | ||
59 | unsigned long last_poll; | 60 | unsigned long last_poll; |
60 | int up; | 61 | int up; |
61 | int request_sent; | 62 | int request_sent; |
@@ -158,6 +159,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
158 | { | 159 | { |
159 | struct net_device *dev = skb->dev; | 160 | struct net_device *dev = skb->dev; |
160 | hdlc_device *hdlc = dev_to_hdlc(dev); | 161 | hdlc_device *hdlc = dev_to_hdlc(dev); |
162 | struct cisco_state *st = state(hdlc); | ||
161 | struct hdlc_header *data = (struct hdlc_header*)skb->data; | 163 | struct hdlc_header *data = (struct hdlc_header*)skb->data; |
162 | struct cisco_packet *cisco_data; | 164 | struct cisco_packet *cisco_data; |
163 | struct in_device *in_dev; | 165 | struct in_device *in_dev; |
@@ -220,11 +222,12 @@ static int cisco_rx(struct sk_buff *skb) | |||
220 | goto rx_error; | 222 | goto rx_error; |
221 | 223 | ||
222 | case CISCO_KEEPALIVE_REQ: | 224 | case CISCO_KEEPALIVE_REQ: |
223 | state(hdlc)->rxseq = ntohl(cisco_data->par1); | 225 | spin_lock(&st->lock); |
224 | if (state(hdlc)->request_sent && | 226 | st->rxseq = ntohl(cisco_data->par1); |
225 | ntohl(cisco_data->par2) == state(hdlc)->txseq) { | 227 | if (st->request_sent && |
226 | state(hdlc)->last_poll = jiffies; | 228 | ntohl(cisco_data->par2) == st->txseq) { |
227 | if (!state(hdlc)->up) { | 229 | st->last_poll = jiffies; |
230 | if (!st->up) { | ||
228 | u32 sec, min, hrs, days; | 231 | u32 sec, min, hrs, days; |
229 | sec = ntohl(cisco_data->time) / 1000; | 232 | sec = ntohl(cisco_data->time) / 1000; |
230 | min = sec / 60; sec -= min * 60; | 233 | min = sec / 60; sec -= min * 60; |
@@ -232,12 +235,12 @@ static int cisco_rx(struct sk_buff *skb) | |||
232 | days = hrs / 24; hrs -= days * 24; | 235 | days = hrs / 24; hrs -= days * 24; |
233 | printk(KERN_INFO "%s: Link up (peer " | 236 | printk(KERN_INFO "%s: Link up (peer " |
234 | "uptime %ud%uh%um%us)\n", | 237 | "uptime %ud%uh%um%us)\n", |
235 | dev->name, days, hrs, | 238 | dev->name, days, hrs, min, sec); |
236 | min, sec); | ||
237 | netif_dormant_off(dev); | 239 | netif_dormant_off(dev); |
238 | state(hdlc)->up = 1; | 240 | st->up = 1; |
239 | } | 241 | } |
240 | } | 242 | } |
243 | spin_unlock(&st->lock); | ||
241 | 244 | ||
242 | dev_kfree_skb_any(skb); | 245 | dev_kfree_skb_any(skb); |
243 | return NET_RX_SUCCESS; | 246 | return NET_RX_SUCCESS; |
@@ -261,24 +264,25 @@ static void cisco_timer(unsigned long arg) | |||
261 | { | 264 | { |
262 | struct net_device *dev = (struct net_device *)arg; | 265 | struct net_device *dev = (struct net_device *)arg; |
263 | hdlc_device *hdlc = dev_to_hdlc(dev); | 266 | hdlc_device *hdlc = dev_to_hdlc(dev); |
267 | struct cisco_state *st = state(hdlc); | ||
264 | 268 | ||
265 | if (state(hdlc)->up && | 269 | spin_lock(&st->lock); |
266 | time_after(jiffies, state(hdlc)->last_poll + | 270 | if (st->up && |
267 | state(hdlc)->settings.timeout * HZ)) { | 271 | time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) { |
268 | state(hdlc)->up = 0; | 272 | st->up = 0; |
269 | printk(KERN_INFO "%s: Link down\n", dev->name); | 273 | printk(KERN_INFO "%s: Link down\n", dev->name); |
270 | netif_dormant_on(dev); | 274 | netif_dormant_on(dev); |
271 | } | 275 | } |
272 | 276 | ||
273 | cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, | 277 | cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq), |
274 | htonl(++state(hdlc)->txseq), | 278 | htonl(st->rxseq)); |
275 | htonl(state(hdlc)->rxseq)); | 279 | st->request_sent = 1; |
276 | state(hdlc)->request_sent = 1; | 280 | spin_unlock(&st->lock); |
277 | state(hdlc)->timer.expires = jiffies + | 281 | |
278 | state(hdlc)->settings.interval * HZ; | 282 | st->timer.expires = jiffies + st->settings.interval * HZ; |
279 | state(hdlc)->timer.function = cisco_timer; | 283 | st->timer.function = cisco_timer; |
280 | state(hdlc)->timer.data = arg; | 284 | st->timer.data = arg; |
281 | add_timer(&state(hdlc)->timer); | 285 | add_timer(&st->timer); |
282 | } | 286 | } |
283 | 287 | ||
284 | 288 | ||
@@ -286,15 +290,20 @@ static void cisco_timer(unsigned long arg) | |||
286 | static void cisco_start(struct net_device *dev) | 290 | static void cisco_start(struct net_device *dev) |
287 | { | 291 | { |
288 | hdlc_device *hdlc = dev_to_hdlc(dev); | 292 | hdlc_device *hdlc = dev_to_hdlc(dev); |
289 | state(hdlc)->up = 0; | 293 | struct cisco_state *st = state(hdlc); |
290 | state(hdlc)->request_sent = 0; | 294 | unsigned long flags; |
291 | state(hdlc)->txseq = state(hdlc)->rxseq = 0; | 295 | |
292 | 296 | spin_lock_irqsave(&st->lock, flags); | |
293 | init_timer(&state(hdlc)->timer); | 297 | st->up = 0; |
294 | state(hdlc)->timer.expires = jiffies + HZ; /*First poll after 1s*/ | 298 | st->request_sent = 0; |
295 | state(hdlc)->timer.function = cisco_timer; | 299 | st->txseq = st->rxseq = 0; |
296 | state(hdlc)->timer.data = (unsigned long)dev; | 300 | spin_unlock_irqrestore(&st->lock, flags); |
297 | add_timer(&state(hdlc)->timer); | 301 | |
302 | init_timer(&st->timer); | ||
303 | st->timer.expires = jiffies + HZ; /* First poll after 1 s */ | ||
304 | st->timer.function = cisco_timer; | ||
305 | st->timer.data = (unsigned long)dev; | ||
306 | add_timer(&st->timer); | ||
298 | } | 307 | } |
299 | 308 | ||
300 | 309 | ||
@@ -302,10 +311,16 @@ static void cisco_start(struct net_device *dev) | |||
302 | static void cisco_stop(struct net_device *dev) | 311 | static void cisco_stop(struct net_device *dev) |
303 | { | 312 | { |
304 | hdlc_device *hdlc = dev_to_hdlc(dev); | 313 | hdlc_device *hdlc = dev_to_hdlc(dev); |
305 | del_timer_sync(&state(hdlc)->timer); | 314 | struct cisco_state *st = state(hdlc); |
315 | unsigned long flags; | ||
316 | |||
317 | del_timer_sync(&st->timer); | ||
318 | |||
319 | spin_lock_irqsave(&st->lock, flags); | ||
306 | netif_dormant_on(dev); | 320 | netif_dormant_on(dev); |
307 | state(hdlc)->up = 0; | 321 | st->up = 0; |
308 | state(hdlc)->request_sent = 0; | 322 | st->request_sent = 0; |
323 | spin_unlock_irqrestore(&st->lock, flags); | ||
309 | } | 324 | } |
310 | 325 | ||
311 | 326 | ||
@@ -367,6 +382,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) | |||
367 | return result; | 382 | return result; |
368 | 383 | ||
369 | memcpy(&state(hdlc)->settings, &new_settings, size); | 384 | memcpy(&state(hdlc)->settings, &new_settings, size); |
385 | spin_lock_init(&state(hdlc)->lock); | ||
370 | dev->hard_start_xmit = hdlc->xmit; | 386 | dev->hard_start_xmit = hdlc->xmit; |
371 | dev->header_ops = &cisco_header_ops; | 387 | dev->header_ops = &cisco_header_ops; |
372 | dev->type = ARPHRD_CISCO; | 388 | dev->type = ARPHRD_CISCO; |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 45f47c1c0a35..32019fb878d8 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2668,6 +2668,7 @@ static struct net_device *init_wifidev(struct airo_info *ai, | |||
2668 | dev->irq = ethdev->irq; | 2668 | dev->irq = ethdev->irq; |
2669 | dev->base_addr = ethdev->base_addr; | 2669 | dev->base_addr = ethdev->base_addr; |
2670 | dev->wireless_data = ethdev->wireless_data; | 2670 | dev->wireless_data = ethdev->wireless_data; |
2671 | SET_NETDEV_DEV(dev, ethdev->dev.parent); | ||
2671 | memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); | 2672 | memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); |
2672 | err = register_netdev(dev); | 2673 | err = register_netdev(dev); |
2673 | if (err<0) { | 2674 | if (err<0) { |
@@ -2904,7 +2905,7 @@ EXPORT_SYMBOL(init_airo_card); | |||
2904 | 2905 | ||
2905 | static int waitbusy (struct airo_info *ai) { | 2906 | static int waitbusy (struct airo_info *ai) { |
2906 | int delay = 0; | 2907 | int delay = 0; |
2907 | while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) & (delay < 10000)) { | 2908 | while ((IN4500(ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { |
2908 | udelay (10); | 2909 | udelay (10); |
2909 | if ((++delay % 20) == 0) | 2910 | if ((++delay % 20) == 0) |
2910 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); | 2911 | OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 4e5c8fc35200..635b9ac9aaa1 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1787,6 +1787,8 @@ ath5k_tasklet_rx(unsigned long data) | |||
1787 | 1787 | ||
1788 | spin_lock(&sc->rxbuflock); | 1788 | spin_lock(&sc->rxbuflock); |
1789 | do { | 1789 | do { |
1790 | rxs.flag = 0; | ||
1791 | |||
1790 | if (unlikely(list_empty(&sc->rxbuf))) { | 1792 | if (unlikely(list_empty(&sc->rxbuf))) { |
1791 | ATH5K_WARN(sc, "empty rx buf pool\n"); | 1793 | ATH5K_WARN(sc, "empty rx buf pool\n"); |
1792 | break; | 1794 | break; |
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index 5fb1ae6ad3e2..77990b56860b 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c | |||
@@ -4119,6 +4119,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | |||
4119 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, | 4119 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, |
4120 | AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); | 4120 | AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); |
4121 | rs->rs_status = 0; | 4121 | rs->rs_status = 0; |
4122 | rs->rs_phyerr = 0; | ||
4122 | 4123 | ||
4123 | /* | 4124 | /* |
4124 | * Key table status | 4125 | * Key table status |
@@ -4145,7 +4146,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah, | |||
4145 | if (rx_status->rx_status_1 & | 4146 | if (rx_status->rx_status_1 & |
4146 | AR5K_5210_RX_DESC_STATUS1_PHY_ERROR) { | 4147 | AR5K_5210_RX_DESC_STATUS1_PHY_ERROR) { |
4147 | rs->rs_status |= AR5K_RXERR_PHY; | 4148 | rs->rs_status |= AR5K_RXERR_PHY; |
4148 | rs->rs_phyerr = AR5K_REG_MS(rx_status->rx_status_1, | 4149 | rs->rs_phyerr |= AR5K_REG_MS(rx_status->rx_status_1, |
4149 | AR5K_5210_RX_DESC_STATUS1_PHY_ERROR); | 4150 | AR5K_5210_RX_DESC_STATUS1_PHY_ERROR); |
4150 | } | 4151 | } |
4151 | 4152 | ||
@@ -4193,6 +4194,7 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | |||
4193 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, | 4194 | rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, |
4194 | AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); | 4195 | AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); |
4195 | rs->rs_status = 0; | 4196 | rs->rs_status = 0; |
4197 | rs->rs_phyerr = 0; | ||
4196 | 4198 | ||
4197 | /* | 4199 | /* |
4198 | * Key table status | 4200 | * Key table status |
@@ -4215,7 +4217,7 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah, | |||
4215 | if (rx_status->rx_status_1 & | 4217 | if (rx_status->rx_status_1 & |
4216 | AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) { | 4218 | AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) { |
4217 | rs->rs_status |= AR5K_RXERR_PHY; | 4219 | rs->rs_status |= AR5K_RXERR_PHY; |
4218 | rs->rs_phyerr = AR5K_REG_MS(rx_err->rx_error_1, | 4220 | rs->rs_phyerr |= AR5K_REG_MS(rx_err->rx_error_1, |
4219 | AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE); | 4221 | AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE); |
4220 | } | 4222 | } |
4221 | 4223 | ||
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig index f51b2d9b085b..1fa043d1802c 100644 --- a/drivers/net/wireless/b43/Kconfig +++ b/drivers/net/wireless/b43/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config B43 | 1 | config B43 |
2 | tristate "Broadcom 43xx wireless support (mac80211 stack)" | 2 | tristate "Broadcom 43xx wireless support (mac80211 stack)" |
3 | depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 | 3 | depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA |
4 | select SSB | 4 | select SSB |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | select HW_RANDOM | 6 | select HW_RANDOM |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 37783cdd301a..dfa4bdd5597c 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -737,6 +737,7 @@ struct b43_wl { | |||
737 | struct ieee80211_tx_control beacon_txctl; | 737 | struct ieee80211_tx_control beacon_txctl; |
738 | bool beacon0_uploaded; | 738 | bool beacon0_uploaded; |
739 | bool beacon1_uploaded; | 739 | bool beacon1_uploaded; |
740 | bool beacon_templates_virgin; /* Never wrote the templates? */ | ||
740 | struct work_struct beacon_update_trigger; | 741 | struct work_struct beacon_update_trigger; |
741 | 742 | ||
742 | /* The current QOS parameters for the 4 queues. | 743 | /* The current QOS parameters for the 4 queues. |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 8fdba9415c04..6c3d9ea0a9f8 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1544,6 +1544,30 @@ static void b43_write_probe_resp_template(struct b43_wldev *dev, | |||
1544 | kfree(probe_resp_data); | 1544 | kfree(probe_resp_data); |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | static void b43_upload_beacon0(struct b43_wldev *dev) | ||
1548 | { | ||
1549 | struct b43_wl *wl = dev->wl; | ||
1550 | |||
1551 | if (wl->beacon0_uploaded) | ||
1552 | return; | ||
1553 | b43_write_beacon_template(dev, 0x68, 0x18); | ||
1554 | /* FIXME: Probe resp upload doesn't really belong here, | ||
1555 | * but we don't use that feature anyway. */ | ||
1556 | b43_write_probe_resp_template(dev, 0x268, 0x4A, | ||
1557 | &__b43_ratetable[3]); | ||
1558 | wl->beacon0_uploaded = 1; | ||
1559 | } | ||
1560 | |||
1561 | static void b43_upload_beacon1(struct b43_wldev *dev) | ||
1562 | { | ||
1563 | struct b43_wl *wl = dev->wl; | ||
1564 | |||
1565 | if (wl->beacon1_uploaded) | ||
1566 | return; | ||
1567 | b43_write_beacon_template(dev, 0x468, 0x1A); | ||
1568 | wl->beacon1_uploaded = 1; | ||
1569 | } | ||
1570 | |||
1547 | static void handle_irq_beacon(struct b43_wldev *dev) | 1571 | static void handle_irq_beacon(struct b43_wldev *dev) |
1548 | { | 1572 | { |
1549 | struct b43_wl *wl = dev->wl; | 1573 | struct b43_wl *wl = dev->wl; |
@@ -1568,24 +1592,27 @@ static void handle_irq_beacon(struct b43_wldev *dev) | |||
1568 | return; | 1592 | return; |
1569 | } | 1593 | } |
1570 | 1594 | ||
1571 | if (!beacon0_valid) { | 1595 | if (unlikely(wl->beacon_templates_virgin)) { |
1572 | if (!wl->beacon0_uploaded) { | 1596 | /* We never uploaded a beacon before. |
1573 | b43_write_beacon_template(dev, 0x68, 0x18); | 1597 | * Upload both templates now, but only mark one valid. */ |
1574 | b43_write_probe_resp_template(dev, 0x268, 0x4A, | 1598 | wl->beacon_templates_virgin = 0; |
1575 | &__b43_ratetable[3]); | 1599 | b43_upload_beacon0(dev); |
1576 | wl->beacon0_uploaded = 1; | 1600 | b43_upload_beacon1(dev); |
1577 | } | ||
1578 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | 1601 | cmd = b43_read32(dev, B43_MMIO_MACCMD); |
1579 | cmd |= B43_MACCMD_BEACON0_VALID; | 1602 | cmd |= B43_MACCMD_BEACON0_VALID; |
1580 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | 1603 | b43_write32(dev, B43_MMIO_MACCMD, cmd); |
1581 | } else if (!beacon1_valid) { | 1604 | } else { |
1582 | if (!wl->beacon1_uploaded) { | 1605 | if (!beacon0_valid) { |
1583 | b43_write_beacon_template(dev, 0x468, 0x1A); | 1606 | b43_upload_beacon0(dev); |
1584 | wl->beacon1_uploaded = 1; | 1607 | cmd = b43_read32(dev, B43_MMIO_MACCMD); |
1608 | cmd |= B43_MACCMD_BEACON0_VALID; | ||
1609 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1610 | } else if (!beacon1_valid) { | ||
1611 | b43_upload_beacon1(dev); | ||
1612 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | ||
1613 | cmd |= B43_MACCMD_BEACON1_VALID; | ||
1614 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1585 | } | 1615 | } |
1586 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | ||
1587 | cmd |= B43_MACCMD_BEACON1_VALID; | ||
1588 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1589 | } | 1616 | } |
1590 | } | 1617 | } |
1591 | 1618 | ||
@@ -4073,6 +4100,9 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
4073 | wl->filter_flags = 0; | 4100 | wl->filter_flags = 0; |
4074 | wl->radiotap_enabled = 0; | 4101 | wl->radiotap_enabled = 0; |
4075 | b43_qos_clear(wl); | 4102 | b43_qos_clear(wl); |
4103 | wl->beacon0_uploaded = 0; | ||
4104 | wl->beacon1_uploaded = 0; | ||
4105 | wl->beacon_templates_virgin = 1; | ||
4076 | 4106 | ||
4077 | /* First register RFkill. | 4107 | /* First register RFkill. |
4078 | * LEDs that are registered later depend on it. */ | 4108 | * LEDs that are registered later depend on it. */ |
@@ -4241,7 +4271,9 @@ static void b43_chip_reset(struct work_struct *work) | |||
4241 | goto out; | 4271 | goto out; |
4242 | } | 4272 | } |
4243 | } | 4273 | } |
4244 | out: | 4274 | out: |
4275 | if (err) | ||
4276 | wl->current_dev = NULL; /* Failed to init the dev. */ | ||
4245 | mutex_unlock(&wl->mutex); | 4277 | mutex_unlock(&wl->mutex); |
4246 | if (err) | 4278 | if (err) |
4247 | b43err(wl, "Controller restart FAILED\n"); | 4279 | b43err(wl, "Controller restart FAILED\n"); |
@@ -4382,9 +4414,11 @@ static void b43_one_core_detach(struct ssb_device *dev) | |||
4382 | struct b43_wldev *wldev; | 4414 | struct b43_wldev *wldev; |
4383 | struct b43_wl *wl; | 4415 | struct b43_wl *wl; |
4384 | 4416 | ||
4417 | /* Do not cancel ieee80211-workqueue based work here. | ||
4418 | * See comment in b43_remove(). */ | ||
4419 | |||
4385 | wldev = ssb_get_drvdata(dev); | 4420 | wldev = ssb_get_drvdata(dev); |
4386 | wl = wldev->wl; | 4421 | wl = wldev->wl; |
4387 | cancel_work_sync(&wldev->restart_work); | ||
4388 | b43_debugfs_remove_device(wldev); | 4422 | b43_debugfs_remove_device(wldev); |
4389 | b43_wireless_core_detach(wldev); | 4423 | b43_wireless_core_detach(wldev); |
4390 | list_del(&wldev->list); | 4424 | list_del(&wldev->list); |
@@ -4569,6 +4603,10 @@ static void b43_remove(struct ssb_device *dev) | |||
4569 | struct b43_wl *wl = ssb_get_devtypedata(dev); | 4603 | struct b43_wl *wl = ssb_get_devtypedata(dev); |
4570 | struct b43_wldev *wldev = ssb_get_drvdata(dev); | 4604 | struct b43_wldev *wldev = ssb_get_drvdata(dev); |
4571 | 4605 | ||
4606 | /* We must cancel any work here before unregistering from ieee80211, | ||
4607 | * as the ieee80211 unreg will destroy the workqueue. */ | ||
4608 | cancel_work_sync(&wldev->restart_work); | ||
4609 | |||
4572 | B43_WARN_ON(!wl); | 4610 | B43_WARN_ON(!wl); |
4573 | if (wl->current_dev == wldev) | 4611 | if (wl->current_dev == wldev) |
4574 | ieee80211_unregister_hw(wl->hw); | 4612 | ieee80211_unregister_hw(wl->hw); |
diff --git a/drivers/net/wireless/b43legacy/Kconfig b/drivers/net/wireless/b43legacy/Kconfig index 13c65faf0247..aef2298d37ac 100644 --- a/drivers/net/wireless/b43legacy/Kconfig +++ b/drivers/net/wireless/b43legacy/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config B43LEGACY | 1 | config B43LEGACY |
2 | tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)" | 2 | tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)" |
3 | depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 | 3 | depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA |
4 | select SSB | 4 | select SSB |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | select HW_RANDOM | 6 | select HW_RANDOM |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 14a5eea2573e..204077c13870 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3039,7 +3039,6 @@ static void b43legacy_set_pretbtt(struct b43legacy_wldev *dev) | |||
3039 | /* Locking: wl->mutex */ | 3039 | /* Locking: wl->mutex */ |
3040 | static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev) | 3040 | static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev) |
3041 | { | 3041 | { |
3042 | struct b43legacy_wl *wl = dev->wl; | ||
3043 | struct b43legacy_phy *phy = &dev->phy; | 3042 | struct b43legacy_phy *phy = &dev->phy; |
3044 | u32 macctl; | 3043 | u32 macctl; |
3045 | 3044 | ||
@@ -3054,12 +3053,6 @@ static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev) | |||
3054 | macctl |= B43legacy_MACCTL_PSM_JMP0; | 3053 | macctl |= B43legacy_MACCTL_PSM_JMP0; |
3055 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); | 3054 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); |
3056 | 3055 | ||
3057 | mutex_unlock(&wl->mutex); | ||
3058 | /* Must unlock as it would otherwise deadlock. No races here. | ||
3059 | * Cancel possibly pending workqueues. */ | ||
3060 | cancel_work_sync(&dev->restart_work); | ||
3061 | mutex_lock(&wl->mutex); | ||
3062 | |||
3063 | b43legacy_leds_exit(dev); | 3056 | b43legacy_leds_exit(dev); |
3064 | b43legacy_rng_exit(dev->wl); | 3057 | b43legacy_rng_exit(dev->wl); |
3065 | b43legacy_pio_free(dev); | 3058 | b43legacy_pio_free(dev); |
@@ -3486,6 +3479,8 @@ static void b43legacy_chip_reset(struct work_struct *work) | |||
3486 | } | 3479 | } |
3487 | } | 3480 | } |
3488 | out: | 3481 | out: |
3482 | if (err) | ||
3483 | wl->current_dev = NULL; /* Failed to init the dev. */ | ||
3489 | mutex_unlock(&wl->mutex); | 3484 | mutex_unlock(&wl->mutex); |
3490 | if (err) | 3485 | if (err) |
3491 | b43legacyerr(wl, "Controller restart FAILED\n"); | 3486 | b43legacyerr(wl, "Controller restart FAILED\n"); |
@@ -3618,9 +3613,11 @@ static void b43legacy_one_core_detach(struct ssb_device *dev) | |||
3618 | struct b43legacy_wldev *wldev; | 3613 | struct b43legacy_wldev *wldev; |
3619 | struct b43legacy_wl *wl; | 3614 | struct b43legacy_wl *wl; |
3620 | 3615 | ||
3616 | /* Do not cancel ieee80211-workqueue based work here. | ||
3617 | * See comment in b43legacy_remove(). */ | ||
3618 | |||
3621 | wldev = ssb_get_drvdata(dev); | 3619 | wldev = ssb_get_drvdata(dev); |
3622 | wl = wldev->wl; | 3620 | wl = wldev->wl; |
3623 | cancel_work_sync(&wldev->restart_work); | ||
3624 | b43legacy_debugfs_remove_device(wldev); | 3621 | b43legacy_debugfs_remove_device(wldev); |
3625 | b43legacy_wireless_core_detach(wldev); | 3622 | b43legacy_wireless_core_detach(wldev); |
3626 | list_del(&wldev->list); | 3623 | list_del(&wldev->list); |
@@ -3789,6 +3786,10 @@ static void b43legacy_remove(struct ssb_device *dev) | |||
3789 | struct b43legacy_wl *wl = ssb_get_devtypedata(dev); | 3786 | struct b43legacy_wl *wl = ssb_get_devtypedata(dev); |
3790 | struct b43legacy_wldev *wldev = ssb_get_drvdata(dev); | 3787 | struct b43legacy_wldev *wldev = ssb_get_drvdata(dev); |
3791 | 3788 | ||
3789 | /* We must cancel any work here before unregistering from ieee80211, | ||
3790 | * as the ieee80211 unreg will destroy the workqueue. */ | ||
3791 | cancel_work_sync(&wldev->restart_work); | ||
3792 | |||
3792 | B43legacy_WARN_ON(!wl); | 3793 | B43legacy_WARN_ON(!wl); |
3793 | if (wl->current_dev == wldev) | 3794 | if (wl->current_dev == wldev) |
3794 | ieee80211_unregister_hw(wl->hw); | 3795 | ieee80211_unregister_hw(wl->hw); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index 437a9bcc9bd3..ed4317a17cbb 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -833,6 +833,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = { | |||
833 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), | 833 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), |
834 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), | 834 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), |
835 | /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */ | 835 | /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */ |
836 | PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002), | ||
836 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), | 837 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), |
837 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), | 838 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), |
838 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), | 839 | PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 7be68db6f300..cdf90c40f11b 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -3276,11 +3276,6 @@ while (0) | |||
3276 | } | 3276 | } |
3277 | printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); | 3277 | printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); |
3278 | 3278 | ||
3279 | #ifndef PRISM2_NO_PROCFS_DEBUG | ||
3280 | create_proc_read_entry("registers", 0, local->proc, | ||
3281 | prism2_registers_proc_read, local); | ||
3282 | #endif /* PRISM2_NO_PROCFS_DEBUG */ | ||
3283 | |||
3284 | hostap_init_data(local); | 3279 | hostap_init_data(local); |
3285 | return dev; | 3280 | return dev; |
3286 | 3281 | ||
@@ -3307,6 +3302,10 @@ static int hostap_hw_ready(struct net_device *dev) | |||
3307 | netif_carrier_off(local->ddev); | 3302 | netif_carrier_off(local->ddev); |
3308 | } | 3303 | } |
3309 | hostap_init_proc(local); | 3304 | hostap_init_proc(local); |
3305 | #ifndef PRISM2_NO_PROCFS_DEBUG | ||
3306 | create_proc_read_entry("registers", 0, local->proc, | ||
3307 | prism2_registers_proc_read, local); | ||
3308 | #endif /* PRISM2_NO_PROCFS_DEBUG */ | ||
3310 | hostap_init_ap_proc(local); | 3309 | hostap_init_ap_proc(local); |
3311 | return 0; | 3310 | return 0; |
3312 | } | 3311 | } |
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 20d387f6658c..f7aec9309d04 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -682,7 +682,13 @@ static int prism2_close(struct net_device *dev) | |||
682 | netif_device_detach(dev); | 682 | netif_device_detach(dev); |
683 | } | 683 | } |
684 | 684 | ||
685 | flush_scheduled_work(); | 685 | cancel_work_sync(&local->reset_queue); |
686 | cancel_work_sync(&local->set_multicast_list_queue); | ||
687 | cancel_work_sync(&local->set_tim_queue); | ||
688 | #ifndef PRISM2_NO_STATION_MODES | ||
689 | cancel_work_sync(&local->info_queue); | ||
690 | #endif | ||
691 | cancel_work_sync(&local->comms_qual_update); | ||
686 | 692 | ||
687 | module_put(local->hw_module); | 693 | module_put(local->hw_module); |
688 | 694 | ||
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index fa87c5c2ae0b..6e704608947c 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -1753,6 +1753,8 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) | |||
1753 | 1753 | ||
1754 | if (priv->workqueue) { | 1754 | if (priv->workqueue) { |
1755 | cancel_delayed_work(&priv->request_scan); | 1755 | cancel_delayed_work(&priv->request_scan); |
1756 | cancel_delayed_work(&priv->request_direct_scan); | ||
1757 | cancel_delayed_work(&priv->request_passive_scan); | ||
1756 | cancel_delayed_work(&priv->scan_event); | 1758 | cancel_delayed_work(&priv->scan_event); |
1757 | } | 1759 | } |
1758 | queue_work(priv->workqueue, &priv->down); | 1760 | queue_work(priv->workqueue, &priv->down); |
@@ -2005,6 +2007,8 @@ static void ipw_irq_tasklet(struct ipw_priv *priv) | |||
2005 | wake_up_interruptible(&priv->wait_command_queue); | 2007 | wake_up_interruptible(&priv->wait_command_queue); |
2006 | priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); | 2008 | priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); |
2007 | cancel_delayed_work(&priv->request_scan); | 2009 | cancel_delayed_work(&priv->request_scan); |
2010 | cancel_delayed_work(&priv->request_direct_scan); | ||
2011 | cancel_delayed_work(&priv->request_passive_scan); | ||
2008 | cancel_delayed_work(&priv->scan_event); | 2012 | cancel_delayed_work(&priv->scan_event); |
2009 | schedule_work(&priv->link_down); | 2013 | schedule_work(&priv->link_down); |
2010 | queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); | 2014 | queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); |
@@ -4712,6 +4716,12 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4712 | priv->status &= ~STATUS_SCAN_FORCED; | 4716 | priv->status &= ~STATUS_SCAN_FORCED; |
4713 | #endif /* CONFIG_IPW2200_MONITOR */ | 4717 | #endif /* CONFIG_IPW2200_MONITOR */ |
4714 | 4718 | ||
4719 | /* Do queued direct scans first */ | ||
4720 | if (priv->status & STATUS_DIRECT_SCAN_PENDING) { | ||
4721 | queue_delayed_work(priv->workqueue, | ||
4722 | &priv->request_direct_scan, 0); | ||
4723 | } | ||
4724 | |||
4715 | if (!(priv->status & (STATUS_ASSOCIATED | | 4725 | if (!(priv->status & (STATUS_ASSOCIATED | |
4716 | STATUS_ASSOCIATING | | 4726 | STATUS_ASSOCIATING | |
4717 | STATUS_ROAMING | | 4727 | STATUS_ROAMING | |
@@ -6267,7 +6277,7 @@ static void ipw_add_scan_channels(struct ipw_priv *priv, | |||
6267 | } | 6277 | } |
6268 | } | 6278 | } |
6269 | 6279 | ||
6270 | static int ipw_request_scan_helper(struct ipw_priv *priv, int type) | 6280 | static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) |
6271 | { | 6281 | { |
6272 | struct ipw_scan_request_ext scan; | 6282 | struct ipw_scan_request_ext scan; |
6273 | int err = 0, scan_type; | 6283 | int err = 0, scan_type; |
@@ -6278,22 +6288,31 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type) | |||
6278 | 6288 | ||
6279 | mutex_lock(&priv->mutex); | 6289 | mutex_lock(&priv->mutex); |
6280 | 6290 | ||
6291 | if (direct && (priv->direct_scan_ssid_len == 0)) { | ||
6292 | IPW_DEBUG_HC("Direct scan requested but no SSID to scan for\n"); | ||
6293 | priv->status &= ~STATUS_DIRECT_SCAN_PENDING; | ||
6294 | goto done; | ||
6295 | } | ||
6296 | |||
6281 | if (priv->status & STATUS_SCANNING) { | 6297 | if (priv->status & STATUS_SCANNING) { |
6282 | IPW_DEBUG_HC("Concurrent scan requested. Ignoring.\n"); | 6298 | IPW_DEBUG_HC("Concurrent scan requested. Queuing.\n"); |
6283 | priv->status |= STATUS_SCAN_PENDING; | 6299 | priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : |
6300 | STATUS_SCAN_PENDING; | ||
6284 | goto done; | 6301 | goto done; |
6285 | } | 6302 | } |
6286 | 6303 | ||
6287 | if (!(priv->status & STATUS_SCAN_FORCED) && | 6304 | if (!(priv->status & STATUS_SCAN_FORCED) && |
6288 | priv->status & STATUS_SCAN_ABORTING) { | 6305 | priv->status & STATUS_SCAN_ABORTING) { |
6289 | IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n"); | 6306 | IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n"); |
6290 | priv->status |= STATUS_SCAN_PENDING; | 6307 | priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : |
6308 | STATUS_SCAN_PENDING; | ||
6291 | goto done; | 6309 | goto done; |
6292 | } | 6310 | } |
6293 | 6311 | ||
6294 | if (priv->status & STATUS_RF_KILL_MASK) { | 6312 | if (priv->status & STATUS_RF_KILL_MASK) { |
6295 | IPW_DEBUG_HC("Aborting scan due to RF Kill activation\n"); | 6313 | IPW_DEBUG_HC("Queuing scan due to RF Kill activation\n"); |
6296 | priv->status |= STATUS_SCAN_PENDING; | 6314 | priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : |
6315 | STATUS_SCAN_PENDING; | ||
6297 | goto done; | 6316 | goto done; |
6298 | } | 6317 | } |
6299 | 6318 | ||
@@ -6321,6 +6340,7 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type) | |||
6321 | cpu_to_le16(20); | 6340 | cpu_to_le16(20); |
6322 | 6341 | ||
6323 | scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); | 6342 | scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); |
6343 | scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); | ||
6324 | 6344 | ||
6325 | #ifdef CONFIG_IPW2200_MONITOR | 6345 | #ifdef CONFIG_IPW2200_MONITOR |
6326 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { | 6346 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { |
@@ -6360,13 +6380,23 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type) | |||
6360 | cpu_to_le16(2000); | 6380 | cpu_to_le16(2000); |
6361 | } else { | 6381 | } else { |
6362 | #endif /* CONFIG_IPW2200_MONITOR */ | 6382 | #endif /* CONFIG_IPW2200_MONITOR */ |
6363 | /* If we are roaming, then make this a directed scan for the | 6383 | /* Honor direct scans first, otherwise if we are roaming make |
6364 | * current network. Otherwise, ensure that every other scan | 6384 | * this a direct scan for the current network. Finally, |
6365 | * is a fast channel hop scan */ | 6385 | * ensure that every other scan is a fast channel hop scan */ |
6366 | if ((priv->status & STATUS_ROAMING) | 6386 | if (direct) { |
6367 | || (!(priv->status & STATUS_ASSOCIATED) | 6387 | err = ipw_send_ssid(priv, priv->direct_scan_ssid, |
6368 | && (priv->config & CFG_STATIC_ESSID) | 6388 | priv->direct_scan_ssid_len); |
6369 | && (le32_to_cpu(scan.full_scan_index) % 2))) { | 6389 | if (err) { |
6390 | IPW_DEBUG_HC("Attempt to send SSID command " | ||
6391 | "failed\n"); | ||
6392 | goto done; | ||
6393 | } | ||
6394 | |||
6395 | scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; | ||
6396 | } else if ((priv->status & STATUS_ROAMING) | ||
6397 | || (!(priv->status & STATUS_ASSOCIATED) | ||
6398 | && (priv->config & CFG_STATIC_ESSID) | ||
6399 | && (le32_to_cpu(scan.full_scan_index) % 2))) { | ||
6370 | err = ipw_send_ssid(priv, priv->essid, priv->essid_len); | 6400 | err = ipw_send_ssid(priv, priv->essid, priv->essid_len); |
6371 | if (err) { | 6401 | if (err) { |
6372 | IPW_DEBUG_HC("Attempt to send SSID command " | 6402 | IPW_DEBUG_HC("Attempt to send SSID command " |
@@ -6391,7 +6421,12 @@ send_request: | |||
6391 | } | 6421 | } |
6392 | 6422 | ||
6393 | priv->status |= STATUS_SCANNING; | 6423 | priv->status |= STATUS_SCANNING; |
6394 | priv->status &= ~STATUS_SCAN_PENDING; | 6424 | if (direct) { |
6425 | priv->status &= ~STATUS_DIRECT_SCAN_PENDING; | ||
6426 | priv->direct_scan_ssid_len = 0; | ||
6427 | } else | ||
6428 | priv->status &= ~STATUS_SCAN_PENDING; | ||
6429 | |||
6395 | queue_delayed_work(priv->workqueue, &priv->scan_check, | 6430 | queue_delayed_work(priv->workqueue, &priv->scan_check, |
6396 | IPW_SCAN_CHECK_WATCHDOG); | 6431 | IPW_SCAN_CHECK_WATCHDOG); |
6397 | done: | 6432 | done: |
@@ -6402,15 +6437,22 @@ done: | |||
6402 | static void ipw_request_passive_scan(struct work_struct *work) | 6437 | static void ipw_request_passive_scan(struct work_struct *work) |
6403 | { | 6438 | { |
6404 | struct ipw_priv *priv = | 6439 | struct ipw_priv *priv = |
6405 | container_of(work, struct ipw_priv, request_passive_scan); | 6440 | container_of(work, struct ipw_priv, request_passive_scan.work); |
6406 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE); | 6441 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE, 0); |
6407 | } | 6442 | } |
6408 | 6443 | ||
6409 | static void ipw_request_scan(struct work_struct *work) | 6444 | static void ipw_request_scan(struct work_struct *work) |
6410 | { | 6445 | { |
6411 | struct ipw_priv *priv = | 6446 | struct ipw_priv *priv = |
6412 | container_of(work, struct ipw_priv, request_scan.work); | 6447 | container_of(work, struct ipw_priv, request_scan.work); |
6413 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE); | 6448 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 0); |
6449 | } | ||
6450 | |||
6451 | static void ipw_request_direct_scan(struct work_struct *work) | ||
6452 | { | ||
6453 | struct ipw_priv *priv = | ||
6454 | container_of(work, struct ipw_priv, request_direct_scan.work); | ||
6455 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 1); | ||
6414 | } | 6456 | } |
6415 | 6457 | ||
6416 | static void ipw_bg_abort_scan(struct work_struct *work) | 6458 | static void ipw_bg_abort_scan(struct work_struct *work) |
@@ -7558,8 +7600,31 @@ static int ipw_associate(void *data) | |||
7558 | priv->ieee->iw_mode == IW_MODE_ADHOC && | 7600 | priv->ieee->iw_mode == IW_MODE_ADHOC && |
7559 | priv->config & CFG_ADHOC_CREATE && | 7601 | priv->config & CFG_ADHOC_CREATE && |
7560 | priv->config & CFG_STATIC_ESSID && | 7602 | priv->config & CFG_STATIC_ESSID && |
7561 | priv->config & CFG_STATIC_CHANNEL && | 7603 | priv->config & CFG_STATIC_CHANNEL) { |
7562 | !list_empty(&priv->ieee->network_free_list)) { | 7604 | /* Use oldest network if the free list is empty */ |
7605 | if (list_empty(&priv->ieee->network_free_list)) { | ||
7606 | struct ieee80211_network *oldest = NULL; | ||
7607 | struct ieee80211_network *target; | ||
7608 | DECLARE_MAC_BUF(mac); | ||
7609 | |||
7610 | list_for_each_entry(target, &priv->ieee->network_list, list) { | ||
7611 | if ((oldest == NULL) || | ||
7612 | (target->last_scanned < oldest->last_scanned)) | ||
7613 | oldest = target; | ||
7614 | } | ||
7615 | |||
7616 | /* If there are no more slots, expire the oldest */ | ||
7617 | list_del(&oldest->list); | ||
7618 | target = oldest; | ||
7619 | IPW_DEBUG_ASSOC("Expired '%s' (%s) from " | ||
7620 | "network list.\n", | ||
7621 | escape_essid(target->ssid, | ||
7622 | target->ssid_len), | ||
7623 | print_mac(mac, target->bssid)); | ||
7624 | list_add_tail(&target->list, | ||
7625 | &priv->ieee->network_free_list); | ||
7626 | } | ||
7627 | |||
7563 | element = priv->ieee->network_free_list.next; | 7628 | element = priv->ieee->network_free_list.next; |
7564 | network = list_entry(element, struct ieee80211_network, list); | 7629 | network = list_entry(element, struct ieee80211_network, list); |
7565 | ipw_adhoc_create(priv, network); | 7630 | ipw_adhoc_create(priv, network); |
@@ -9454,99 +9519,38 @@ static int ipw_wx_get_retry(struct net_device *dev, | |||
9454 | return 0; | 9519 | return 0; |
9455 | } | 9520 | } |
9456 | 9521 | ||
9457 | static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid, | ||
9458 | int essid_len) | ||
9459 | { | ||
9460 | struct ipw_scan_request_ext scan; | ||
9461 | int err = 0, scan_type; | ||
9462 | |||
9463 | if (!(priv->status & STATUS_INIT) || | ||
9464 | (priv->status & STATUS_EXIT_PENDING)) | ||
9465 | return 0; | ||
9466 | |||
9467 | mutex_lock(&priv->mutex); | ||
9468 | |||
9469 | if (priv->status & STATUS_RF_KILL_MASK) { | ||
9470 | IPW_DEBUG_HC("Aborting scan due to RF kill activation\n"); | ||
9471 | priv->status |= STATUS_SCAN_PENDING; | ||
9472 | goto done; | ||
9473 | } | ||
9474 | |||
9475 | IPW_DEBUG_HC("starting request direct scan!\n"); | ||
9476 | |||
9477 | if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) { | ||
9478 | /* We should not sleep here; otherwise we will block most | ||
9479 | * of the system (for instance, we hold rtnl_lock when we | ||
9480 | * get here). | ||
9481 | */ | ||
9482 | err = -EAGAIN; | ||
9483 | goto done; | ||
9484 | } | ||
9485 | memset(&scan, 0, sizeof(scan)); | ||
9486 | |||
9487 | if (priv->config & CFG_SPEED_SCAN) | ||
9488 | scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = | ||
9489 | cpu_to_le16(30); | ||
9490 | else | ||
9491 | scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = | ||
9492 | cpu_to_le16(20); | ||
9493 | |||
9494 | scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] = | ||
9495 | cpu_to_le16(20); | ||
9496 | scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); | ||
9497 | scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); | ||
9498 | |||
9499 | scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee)); | ||
9500 | |||
9501 | err = ipw_send_ssid(priv, essid, essid_len); | ||
9502 | if (err) { | ||
9503 | IPW_DEBUG_HC("Attempt to send SSID command failed\n"); | ||
9504 | goto done; | ||
9505 | } | ||
9506 | scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; | ||
9507 | |||
9508 | ipw_add_scan_channels(priv, &scan, scan_type); | ||
9509 | |||
9510 | err = ipw_send_scan_request_ext(priv, &scan); | ||
9511 | if (err) { | ||
9512 | IPW_DEBUG_HC("Sending scan command failed: %08X\n", err); | ||
9513 | goto done; | ||
9514 | } | ||
9515 | |||
9516 | priv->status |= STATUS_SCANNING; | ||
9517 | |||
9518 | done: | ||
9519 | mutex_unlock(&priv->mutex); | ||
9520 | return err; | ||
9521 | } | ||
9522 | |||
9523 | static int ipw_wx_set_scan(struct net_device *dev, | 9522 | static int ipw_wx_set_scan(struct net_device *dev, |
9524 | struct iw_request_info *info, | 9523 | struct iw_request_info *info, |
9525 | union iwreq_data *wrqu, char *extra) | 9524 | union iwreq_data *wrqu, char *extra) |
9526 | { | 9525 | { |
9527 | struct ipw_priv *priv = ieee80211_priv(dev); | 9526 | struct ipw_priv *priv = ieee80211_priv(dev); |
9528 | struct iw_scan_req *req = (struct iw_scan_req *)extra; | 9527 | struct iw_scan_req *req = (struct iw_scan_req *)extra; |
9528 | struct delayed_work *work = NULL; | ||
9529 | 9529 | ||
9530 | mutex_lock(&priv->mutex); | 9530 | mutex_lock(&priv->mutex); |
9531 | |||
9531 | priv->user_requested_scan = 1; | 9532 | priv->user_requested_scan = 1; |
9532 | mutex_unlock(&priv->mutex); | ||
9533 | 9533 | ||
9534 | if (wrqu->data.length == sizeof(struct iw_scan_req)) { | 9534 | if (wrqu->data.length == sizeof(struct iw_scan_req)) { |
9535 | if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { | 9535 | if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { |
9536 | ipw_request_direct_scan(priv, req->essid, | 9536 | int len = min((int)req->essid_len, |
9537 | req->essid_len); | 9537 | (int)sizeof(priv->direct_scan_ssid)); |
9538 | return 0; | 9538 | memcpy(priv->direct_scan_ssid, req->essid, len); |
9539 | } | 9539 | priv->direct_scan_ssid_len = len; |
9540 | if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { | 9540 | work = &priv->request_direct_scan; |
9541 | queue_work(priv->workqueue, | 9541 | } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { |
9542 | &priv->request_passive_scan); | 9542 | work = &priv->request_passive_scan; |
9543 | return 0; | ||
9544 | } | 9543 | } |
9544 | } else { | ||
9545 | /* Normal active broadcast scan */ | ||
9546 | work = &priv->request_scan; | ||
9545 | } | 9547 | } |
9546 | 9548 | ||
9549 | mutex_unlock(&priv->mutex); | ||
9550 | |||
9547 | IPW_DEBUG_WX("Start scan\n"); | 9551 | IPW_DEBUG_WX("Start scan\n"); |
9548 | 9552 | ||
9549 | queue_delayed_work(priv->workqueue, &priv->request_scan, 0); | 9553 | queue_delayed_work(priv->workqueue, work, 0); |
9550 | 9554 | ||
9551 | return 0; | 9555 | return 0; |
9552 | } | 9556 | } |
@@ -10708,6 +10712,8 @@ static void ipw_link_up(struct ipw_priv *priv) | |||
10708 | } | 10712 | } |
10709 | 10713 | ||
10710 | cancel_delayed_work(&priv->request_scan); | 10714 | cancel_delayed_work(&priv->request_scan); |
10715 | cancel_delayed_work(&priv->request_direct_scan); | ||
10716 | cancel_delayed_work(&priv->request_passive_scan); | ||
10711 | cancel_delayed_work(&priv->scan_event); | 10717 | cancel_delayed_work(&priv->scan_event); |
10712 | ipw_reset_stats(priv); | 10718 | ipw_reset_stats(priv); |
10713 | /* Ensure the rate is updated immediately */ | 10719 | /* Ensure the rate is updated immediately */ |
@@ -10738,6 +10744,8 @@ static void ipw_link_down(struct ipw_priv *priv) | |||
10738 | 10744 | ||
10739 | /* Cancel any queued work ... */ | 10745 | /* Cancel any queued work ... */ |
10740 | cancel_delayed_work(&priv->request_scan); | 10746 | cancel_delayed_work(&priv->request_scan); |
10747 | cancel_delayed_work(&priv->request_direct_scan); | ||
10748 | cancel_delayed_work(&priv->request_passive_scan); | ||
10741 | cancel_delayed_work(&priv->adhoc_check); | 10749 | cancel_delayed_work(&priv->adhoc_check); |
10742 | cancel_delayed_work(&priv->gather_stats); | 10750 | cancel_delayed_work(&priv->gather_stats); |
10743 | 10751 | ||
@@ -10777,8 +10785,9 @@ static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv) | |||
10777 | INIT_WORK(&priv->up, ipw_bg_up); | 10785 | INIT_WORK(&priv->up, ipw_bg_up); |
10778 | INIT_WORK(&priv->down, ipw_bg_down); | 10786 | INIT_WORK(&priv->down, ipw_bg_down); |
10779 | INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); | 10787 | INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); |
10788 | INIT_DELAYED_WORK(&priv->request_direct_scan, ipw_request_direct_scan); | ||
10789 | INIT_DELAYED_WORK(&priv->request_passive_scan, ipw_request_passive_scan); | ||
10780 | INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); | 10790 | INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); |
10781 | INIT_WORK(&priv->request_passive_scan, ipw_request_passive_scan); | ||
10782 | INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); | 10791 | INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); |
10783 | INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); | 10792 | INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); |
10784 | INIT_WORK(&priv->roam, ipw_bg_roam); | 10793 | INIT_WORK(&priv->roam, ipw_bg_roam); |
@@ -11584,6 +11593,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11584 | priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; | 11593 | priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; |
11585 | 11594 | ||
11586 | priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; | 11595 | priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; |
11596 | SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); | ||
11587 | 11597 | ||
11588 | rc = register_netdev(priv->prom_net_dev); | 11598 | rc = register_netdev(priv->prom_net_dev); |
11589 | if (rc) { | 11599 | if (rc) { |
@@ -11811,6 +11821,8 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev) | |||
11811 | cancel_delayed_work(&priv->adhoc_check); | 11821 | cancel_delayed_work(&priv->adhoc_check); |
11812 | cancel_delayed_work(&priv->gather_stats); | 11822 | cancel_delayed_work(&priv->gather_stats); |
11813 | cancel_delayed_work(&priv->request_scan); | 11823 | cancel_delayed_work(&priv->request_scan); |
11824 | cancel_delayed_work(&priv->request_direct_scan); | ||
11825 | cancel_delayed_work(&priv->request_passive_scan); | ||
11814 | cancel_delayed_work(&priv->scan_event); | 11826 | cancel_delayed_work(&priv->scan_event); |
11815 | cancel_delayed_work(&priv->rf_kill); | 11827 | cancel_delayed_work(&priv->rf_kill); |
11816 | cancel_delayed_work(&priv->scan_check); | 11828 | cancel_delayed_work(&priv->scan_check); |
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index cd3295b66dd6..d4ab28b73b32 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -1037,6 +1037,7 @@ struct ipw_cmd { /* XXX */ | |||
1037 | #define STATUS_DISASSOC_PENDING (1<<12) | 1037 | #define STATUS_DISASSOC_PENDING (1<<12) |
1038 | #define STATUS_STATE_PENDING (1<<13) | 1038 | #define STATUS_STATE_PENDING (1<<13) |
1039 | 1039 | ||
1040 | #define STATUS_DIRECT_SCAN_PENDING (1<<19) | ||
1040 | #define STATUS_SCAN_PENDING (1<<20) | 1041 | #define STATUS_SCAN_PENDING (1<<20) |
1041 | #define STATUS_SCANNING (1<<21) | 1042 | #define STATUS_SCANNING (1<<21) |
1042 | #define STATUS_SCAN_ABORTING (1<<22) | 1043 | #define STATUS_SCAN_ABORTING (1<<22) |
@@ -1292,6 +1293,8 @@ struct ipw_priv { | |||
1292 | struct iw_public_data wireless_data; | 1293 | struct iw_public_data wireless_data; |
1293 | 1294 | ||
1294 | int user_requested_scan; | 1295 | int user_requested_scan; |
1296 | u8 direct_scan_ssid[IW_ESSID_MAX_SIZE]; | ||
1297 | u8 direct_scan_ssid_len; | ||
1295 | 1298 | ||
1296 | struct workqueue_struct *workqueue; | 1299 | struct workqueue_struct *workqueue; |
1297 | 1300 | ||
@@ -1301,8 +1304,9 @@ struct ipw_priv { | |||
1301 | struct work_struct system_config; | 1304 | struct work_struct system_config; |
1302 | struct work_struct rx_replenish; | 1305 | struct work_struct rx_replenish; |
1303 | struct delayed_work request_scan; | 1306 | struct delayed_work request_scan; |
1307 | struct delayed_work request_direct_scan; | ||
1308 | struct delayed_work request_passive_scan; | ||
1304 | struct delayed_work scan_event; | 1309 | struct delayed_work scan_event; |
1305 | struct work_struct request_passive_scan; | ||
1306 | struct work_struct adapter_restart; | 1310 | struct work_struct adapter_restart; |
1307 | struct delayed_work rf_kill; | 1311 | struct delayed_work rf_kill; |
1308 | struct work_struct up; | 1312 | struct work_struct up; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c index d200d08fb086..8b1528e52d43 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c | |||
@@ -229,14 +229,15 @@ static int iwl3945_led_register_led(struct iwl3945_priv *priv, | |||
229 | led->led_dev.brightness_set = iwl3945_led_brightness_set; | 229 | led->led_dev.brightness_set = iwl3945_led_brightness_set; |
230 | led->led_dev.default_trigger = trigger; | 230 | led->led_dev.default_trigger = trigger; |
231 | 231 | ||
232 | led->priv = priv; | ||
233 | led->type = type; | ||
234 | |||
232 | ret = led_classdev_register(device, &led->led_dev); | 235 | ret = led_classdev_register(device, &led->led_dev); |
233 | if (ret) { | 236 | if (ret) { |
234 | IWL_ERROR("Error: failed to register led handler.\n"); | 237 | IWL_ERROR("Error: failed to register led handler.\n"); |
235 | return ret; | 238 | return ret; |
236 | } | 239 | } |
237 | 240 | ||
238 | led->priv = priv; | ||
239 | led->type = type; | ||
240 | led->registered = 1; | 241 | led->registered = 1; |
241 | 242 | ||
242 | if (set_led && led->led_on) | 243 | if (set_led && led->led_on) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index c9847b1a67f7..3a7f0cb710ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c | |||
@@ -1162,7 +1162,6 @@ static s32 rs_get_best_rate(struct iwl_priv *priv, | |||
1162 | 1162 | ||
1163 | /* Higher rate not available, use the original */ | 1163 | /* Higher rate not available, use the original */ |
1164 | } else { | 1164 | } else { |
1165 | new_rate = rate; | ||
1166 | break; | 1165 | break; |
1167 | } | 1166 | } |
1168 | } | 1167 | } |
@@ -2009,7 +2008,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2009 | * 2) Not just finishing up a search | 2008 | * 2) Not just finishing up a search |
2010 | * 3) Allowing a new search | 2009 | * 3) Allowing a new search |
2011 | */ | 2010 | */ |
2012 | if (!update_lq && !done_search && !lq_sta->stay_in_tbl) { | 2011 | if (!update_lq && !done_search && !lq_sta->stay_in_tbl && window->counter) { |
2013 | /* Save current throughput to compare with "search" throughput*/ | 2012 | /* Save current throughput to compare with "search" throughput*/ |
2014 | lq_sta->last_tpt = current_tpt; | 2013 | lq_sta->last_tpt = current_tpt; |
2015 | 2014 | ||
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 6328b9593877..8124fd9b1353 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1842,6 +1842,9 @@ static void lbs_send_confirmsleep(struct lbs_private *priv) | |||
1842 | 1842 | ||
1843 | spin_lock_irqsave(&priv->driver_lock, flags); | 1843 | spin_lock_irqsave(&priv->driver_lock, flags); |
1844 | 1844 | ||
1845 | /* We don't get a response on the sleep-confirmation */ | ||
1846 | priv->dnld_sent = DNLD_RES_RECEIVED; | ||
1847 | |||
1845 | /* If nothing to do, go back to sleep (?) */ | 1848 | /* If nothing to do, go back to sleep (?) */ |
1846 | if (!__kfifo_len(priv->event_fifo) && !priv->resp_len[priv->resp_idx]) | 1849 | if (!__kfifo_len(priv->event_fifo) && !priv->resp_len[priv->resp_idx]) |
1847 | priv->psstate = PS_STATE_SLEEP; | 1850 | priv->psstate = PS_STATE_SLEEP; |
@@ -1904,12 +1907,12 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv) | |||
1904 | 1907 | ||
1905 | lbs_deb_enter(LBS_DEB_HOST); | 1908 | lbs_deb_enter(LBS_DEB_HOST); |
1906 | 1909 | ||
1910 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
1907 | if (priv->dnld_sent) { | 1911 | if (priv->dnld_sent) { |
1908 | allowed = 0; | 1912 | allowed = 0; |
1909 | lbs_deb_host("dnld_sent was set\n"); | 1913 | lbs_deb_host("dnld_sent was set\n"); |
1910 | } | 1914 | } |
1911 | 1915 | ||
1912 | spin_lock_irqsave(&priv->driver_lock, flags); | ||
1913 | /* In-progress command? */ | 1916 | /* In-progress command? */ |
1914 | if (priv->cur_cmd) { | 1917 | if (priv->cur_cmd) { |
1915 | allowed = 0; | 1918 | allowed = 0; |
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index ad2fabca9116..0aa0ce3b2c42 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -312,8 +312,8 @@ static ssize_t lbs_threshold_write(uint16_t tlv_type, uint16_t event_mask, | |||
312 | if (tlv_type != TLV_TYPE_BCNMISS) | 312 | if (tlv_type != TLV_TYPE_BCNMISS) |
313 | tlv->freq = freq; | 313 | tlv->freq = freq; |
314 | 314 | ||
315 | /* The command header, the event mask, and the one TLV */ | 315 | /* The command header, the action, the event mask, and one TLV */ |
316 | events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 2 + sizeof(*tlv)); | 316 | events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 4 + sizeof(*tlv)); |
317 | 317 | ||
318 | ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events); | 318 | ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events); |
319 | 319 | ||
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index dcfdb404678b..688d60de55cb 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c | |||
@@ -73,8 +73,8 @@ out: | |||
73 | return ret; | 73 | return ret; |
74 | } | 74 | } |
75 | 75 | ||
76 | static void lbs_ethtool_get_stats(struct net_device * dev, | 76 | static void lbs_ethtool_get_stats(struct net_device *dev, |
77 | struct ethtool_stats * stats, u64 * data) | 77 | struct ethtool_stats *stats, uint64_t *data) |
78 | { | 78 | { |
79 | struct lbs_private *priv = dev->priv; | 79 | struct lbs_private *priv = dev->priv; |
80 | struct cmd_ds_mesh_access mesh_access; | 80 | struct cmd_ds_mesh_access mesh_access; |
@@ -83,12 +83,12 @@ static void lbs_ethtool_get_stats(struct net_device * dev, | |||
83 | lbs_deb_enter(LBS_DEB_ETHTOOL); | 83 | lbs_deb_enter(LBS_DEB_ETHTOOL); |
84 | 84 | ||
85 | /* Get Mesh Statistics */ | 85 | /* Get Mesh Statistics */ |
86 | ret = lbs_prepare_and_send_command(priv, | 86 | ret = lbs_mesh_access(priv, CMD_ACT_MESH_GET_STATS, &mesh_access); |
87 | CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS, | ||
88 | CMD_OPTION_WAITFORRSP, 0, &mesh_access); | ||
89 | 87 | ||
90 | if (ret) | 88 | if (ret) { |
89 | memset(data, 0, MESH_STATS_NUM*(sizeof(uint64_t))); | ||
91 | return; | 90 | return; |
91 | } | ||
92 | 92 | ||
93 | priv->mstats.fwd_drop_rbt = le32_to_cpu(mesh_access.data[0]); | 93 | priv->mstats.fwd_drop_rbt = le32_to_cpu(mesh_access.data[0]); |
94 | priv->mstats.fwd_drop_ttl = le32_to_cpu(mesh_access.data[1]); | 94 | priv->mstats.fwd_drop_ttl = le32_to_cpu(mesh_access.data[1]); |
@@ -111,19 +111,18 @@ static void lbs_ethtool_get_stats(struct net_device * dev, | |||
111 | lbs_deb_enter(LBS_DEB_ETHTOOL); | 111 | lbs_deb_enter(LBS_DEB_ETHTOOL); |
112 | } | 112 | } |
113 | 113 | ||
114 | static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset) | 114 | static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset) |
115 | { | 115 | { |
116 | switch (sset) { | 116 | struct lbs_private *priv = dev->priv; |
117 | case ETH_SS_STATS: | 117 | |
118 | if (sset == ETH_SS_STATS && dev == priv->mesh_dev) | ||
118 | return MESH_STATS_NUM; | 119 | return MESH_STATS_NUM; |
119 | default: | 120 | |
120 | return -EOPNOTSUPP; | 121 | return -EOPNOTSUPP; |
121 | } | ||
122 | } | 122 | } |
123 | 123 | ||
124 | static void lbs_ethtool_get_strings(struct net_device *dev, | 124 | static void lbs_ethtool_get_strings(struct net_device *dev, |
125 | u32 stringset, | 125 | uint32_t stringset, uint8_t *s) |
126 | u8 * s) | ||
127 | { | 126 | { |
128 | int i; | 127 | int i; |
129 | 128 | ||
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 406f54d40956..acfc4bfcc262 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -732,8 +732,8 @@ static int lbs_thread(void *data) | |||
732 | lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n", | 732 | lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n", |
733 | priv->currenttxskb, priv->dnld_sent); | 733 | priv->currenttxskb, priv->dnld_sent); |
734 | 734 | ||
735 | spin_lock_irq(&priv->driver_lock); | ||
736 | /* Process any pending command response */ | 735 | /* Process any pending command response */ |
736 | spin_lock_irq(&priv->driver_lock); | ||
737 | resp_idx = priv->resp_idx; | 737 | resp_idx = priv->resp_idx; |
738 | if (priv->resp_len[resp_idx]) { | 738 | if (priv->resp_len[resp_idx]) { |
739 | spin_unlock_irq(&priv->driver_lock); | 739 | spin_unlock_irq(&priv->driver_lock); |
@@ -756,6 +756,7 @@ static int lbs_thread(void *data) | |||
756 | priv->nr_retries = 0; | 756 | priv->nr_retries = 0; |
757 | } else { | 757 | } else { |
758 | priv->cur_cmd = NULL; | 758 | priv->cur_cmd = NULL; |
759 | priv->dnld_sent = DNLD_RES_RECEIVED; | ||
759 | lbs_pr_info("requeueing command %x due to timeout (#%d)\n", | 760 | lbs_pr_info("requeueing command %x due to timeout (#%d)\n", |
760 | le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); | 761 | le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); |
761 | 762 | ||
@@ -1564,6 +1565,7 @@ static int lbs_add_rtap(struct lbs_private *priv) | |||
1564 | rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; | 1565 | rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; |
1565 | rtap_dev->set_multicast_list = lbs_set_multicast_list; | 1566 | rtap_dev->set_multicast_list = lbs_set_multicast_list; |
1566 | rtap_dev->priv = priv; | 1567 | rtap_dev->priv = priv; |
1568 | SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent); | ||
1567 | 1569 | ||
1568 | ret = register_netdev(rtap_dev); | 1570 | ret = register_netdev(rtap_dev); |
1569 | if (ret) { | 1571 | if (ret) { |
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 8b7f5768a103..1c216e015f64 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -461,6 +461,7 @@ static struct pcmcia_device_id orinoco_cs_ids[] = { | |||
461 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */ | 461 | PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */ |
462 | PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */ | 462 | PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */ |
463 | PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */ | 463 | PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */ |
464 | PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x3021), /* SpeedStream Wireless Adapter */ | ||
464 | PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */ | 465 | PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */ |
465 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */ | 466 | PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */ |
466 | PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */ | 467 | PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */ |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 98ddbb3b3273..1610a7308c1d 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -49,6 +49,7 @@ static struct usb_device_id p54u_table[] __devinitdata = { | |||
49 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ | 49 | {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ |
50 | 50 | ||
51 | /* Version 2 devices (3887) */ | 51 | /* Version 2 devices (3887) */ |
52 | {USB_DEVICE(0x0471, 0x1230)}, /* Philips CPWUA054/00 */ | ||
52 | {USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */ | 53 | {USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */ |
53 | {USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */ | 54 | {USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */ |
54 | {USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */ | 55 | {USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */ |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index d0b1fb15c709..18c9931e3267 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -116,6 +116,7 @@ MODULE_PARM_DESC(workaround_interval, | |||
116 | #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) | 116 | #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) |
117 | #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) | 117 | #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) |
118 | #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) | 118 | #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) |
119 | #define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f) | ||
119 | #define OID_802_11_PMKID ccpu2(0x0d010123) | 120 | #define OID_802_11_PMKID ccpu2(0x0d010123) |
120 | #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) | 121 | #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) |
121 | #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) | 122 | #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) |
@@ -271,6 +272,26 @@ struct ndis_config_param { | |||
271 | __le32 value_length; | 272 | __le32 value_length; |
272 | } __attribute__((packed)); | 273 | } __attribute__((packed)); |
273 | 274 | ||
275 | struct ndis_80211_assoc_info { | ||
276 | __le32 length; | ||
277 | __le16 req_ies; | ||
278 | struct req_ie { | ||
279 | __le16 capa; | ||
280 | __le16 listen_interval; | ||
281 | u8 cur_ap_address[6]; | ||
282 | } req_ie; | ||
283 | __le32 req_ie_length; | ||
284 | __le32 offset_req_ies; | ||
285 | __le16 resp_ies; | ||
286 | struct resp_ie { | ||
287 | __le16 capa; | ||
288 | __le16 status_code; | ||
289 | __le16 assoc_id; | ||
290 | } resp_ie; | ||
291 | __le32 resp_ie_length; | ||
292 | __le32 offset_resp_ies; | ||
293 | } __attribute__((packed)); | ||
294 | |||
274 | /* these have to match what is in wpa_supplicant */ | 295 | /* these have to match what is in wpa_supplicant */ |
275 | enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; | 296 | enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; |
276 | enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, | 297 | enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, |
@@ -674,6 +695,12 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | |||
674 | return ret; | 695 | return ret; |
675 | } | 696 | } |
676 | 697 | ||
698 | static int get_association_info(struct usbnet *usbdev, | ||
699 | struct ndis_80211_assoc_info *info, int len) | ||
700 | { | ||
701 | return rndis_query_oid(usbdev, OID_802_11_ASSOCIATION_INFORMATION, | ||
702 | info, &len); | ||
703 | } | ||
677 | 704 | ||
678 | static int is_associated(struct usbnet *usbdev) | 705 | static int is_associated(struct usbnet *usbdev) |
679 | { | 706 | { |
@@ -2182,11 +2209,40 @@ static void rndis_wext_worker(struct work_struct *work) | |||
2182 | struct usbnet *usbdev = priv->usbdev; | 2209 | struct usbnet *usbdev = priv->usbdev; |
2183 | union iwreq_data evt; | 2210 | union iwreq_data evt; |
2184 | unsigned char bssid[ETH_ALEN]; | 2211 | unsigned char bssid[ETH_ALEN]; |
2185 | int ret; | 2212 | struct ndis_80211_assoc_info *info; |
2213 | int assoc_size = sizeof(*info) + IW_CUSTOM_MAX + 32; | ||
2214 | int ret, offset; | ||
2186 | 2215 | ||
2187 | if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { | 2216 | if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { |
2188 | ret = get_bssid(usbdev, bssid); | 2217 | info = kzalloc(assoc_size, GFP_KERNEL); |
2218 | if (!info) | ||
2219 | goto get_bssid; | ||
2220 | |||
2221 | /* Get association info IEs from device and send them back to | ||
2222 | * userspace. */ | ||
2223 | ret = get_association_info(usbdev, info, assoc_size); | ||
2224 | if (!ret) { | ||
2225 | evt.data.length = le32_to_cpu(info->req_ie_length); | ||
2226 | if (evt.data.length > 0) { | ||
2227 | offset = le32_to_cpu(info->offset_req_ies); | ||
2228 | wireless_send_event(usbdev->net, | ||
2229 | IWEVASSOCREQIE, &evt, | ||
2230 | (char *)info + offset); | ||
2231 | } | ||
2232 | |||
2233 | evt.data.length = le32_to_cpu(info->resp_ie_length); | ||
2234 | if (evt.data.length > 0) { | ||
2235 | offset = le32_to_cpu(info->offset_resp_ies); | ||
2236 | wireless_send_event(usbdev->net, | ||
2237 | IWEVASSOCRESPIE, &evt, | ||
2238 | (char *)info + offset); | ||
2239 | } | ||
2240 | } | ||
2241 | |||
2242 | kfree(info); | ||
2189 | 2243 | ||
2244 | get_bssid: | ||
2245 | ret = get_bssid(usbdev, bssid); | ||
2190 | if (!ret) { | 2246 | if (!ret) { |
2191 | evt.data.flags = 0; | 2247 | evt.data.flags = 0; |
2192 | evt.data.length = 0; | 2248 | evt.data.length = 0; |
@@ -2414,6 +2470,11 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2414 | else if (priv->param_power_save > 2) | 2470 | else if (priv->param_power_save > 2) |
2415 | priv->param_power_save = 2; | 2471 | priv->param_power_save = 2; |
2416 | 2472 | ||
2473 | if (priv->param_power_output < 0) | ||
2474 | priv->param_power_output = 0; | ||
2475 | else if (priv->param_power_output > 3) | ||
2476 | priv->param_power_output = 3; | ||
2477 | |||
2417 | if (priv->param_roamtrigger < -80) | 2478 | if (priv->param_roamtrigger < -80) |
2418 | priv->param_roamtrigger = -80; | 2479 | priv->param_roamtrigger = -80; |
2419 | else if (priv->param_roamtrigger > -60) | 2480 | else if (priv->param_roamtrigger > -60) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 57bdc153952f..611d98320593 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -328,6 +328,11 @@ static inline int rt2x00_get_link_ant_rssi(struct link *link) | |||
328 | return DEFAULT_RSSI; | 328 | return DEFAULT_RSSI; |
329 | } | 329 | } |
330 | 330 | ||
331 | static inline void rt2x00_reset_link_ant_rssi(struct link *link) | ||
332 | { | ||
333 | link->ant.rssi_ant = 0; | ||
334 | } | ||
335 | |||
331 | static inline int rt2x00_get_link_ant_rssi_history(struct link *link, | 336 | static inline int rt2x00_get_link_ant_rssi_history(struct link *link, |
332 | enum antenna ant) | 337 | enum antenna ant) |
333 | { | 338 | { |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index a9930a03f450..48608e8cc8b4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -129,6 +129,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
129 | */ | 129 | */ |
130 | rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); | 130 | rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); |
131 | rt2x00lib_reset_link_tuner(rt2x00dev); | 131 | rt2x00lib_reset_link_tuner(rt2x00dev); |
132 | rt2x00_reset_link_ant_rssi(&rt2x00dev->link); | ||
132 | 133 | ||
133 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; | 134 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; |
134 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; | 135 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index b22c02737185..2673d568bcac 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -483,9 +483,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) | |||
483 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) | 483 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) |
484 | return; | 484 | return; |
485 | 485 | ||
486 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, | 486 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, |
487 | rt2x00lib_beacondone_iter, | 487 | rt2x00lib_beacondone_iter, |
488 | rt2x00dev); | 488 | rt2x00dev); |
489 | 489 | ||
490 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); | 490 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); |
491 | } | 491 | } |
@@ -507,7 +507,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
507 | * Update TX statistics. | 507 | * Update TX statistics. |
508 | */ | 508 | */ |
509 | rt2x00dev->link.qual.tx_success += success; | 509 | rt2x00dev->link.qual.tx_success += success; |
510 | rt2x00dev->link.qual.tx_failed += txdesc->retry + fail; | 510 | rt2x00dev->link.qual.tx_failed += fail; |
511 | 511 | ||
512 | /* | 512 | /* |
513 | * Initialize TX status | 513 | * Initialize TX status |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index c206b5092070..87e280a21971 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -93,6 +93,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
93 | */ | 93 | */ |
94 | if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { | 94 | if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { |
95 | ieee80211_stop_queues(hw); | 95 | ieee80211_stop_queues(hw); |
96 | dev_kfree_skb_any(skb); | ||
96 | return NETDEV_TX_OK; | 97 | return NETDEV_TX_OK; |
97 | } | 98 | } |
98 | 99 | ||
diff --git a/drivers/net/wireless/rtl8180_grf5101.c b/drivers/net/wireless/rtl8180_grf5101.c index 5d47935dbac3..947ee55f18b2 100644 --- a/drivers/net/wireless/rtl8180_grf5101.c +++ b/drivers/net/wireless/rtl8180_grf5101.c | |||
@@ -88,7 +88,7 @@ static void grf5101_rf_set_channel(struct ieee80211_hw *dev, | |||
88 | write_grf5101(dev, 0x0B, chan); | 88 | write_grf5101(dev, 0x0B, chan); |
89 | write_grf5101(dev, 0x07, 0x1000); | 89 | write_grf5101(dev, 0x07, 0x1000); |
90 | 90 | ||
91 | grf5101_write_phy_antenna(dev, chan); | 91 | grf5101_write_phy_antenna(dev, channel); |
92 | } | 92 | } |
93 | 93 | ||
94 | static void grf5101_rf_stop(struct ieee80211_hw *dev) | 94 | static void grf5101_rf_stop(struct ieee80211_hw *dev) |
diff --git a/drivers/net/wireless/rtl8180_max2820.c b/drivers/net/wireless/rtl8180_max2820.c index a34dfd382b6d..6c825fd7f3b6 100644 --- a/drivers/net/wireless/rtl8180_max2820.c +++ b/drivers/net/wireless/rtl8180_max2820.c | |||
@@ -78,7 +78,8 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, | |||
78 | struct ieee80211_conf *conf) | 78 | struct ieee80211_conf *conf) |
79 | { | 79 | { |
80 | struct rtl8180_priv *priv = dev->priv; | 80 | struct rtl8180_priv *priv = dev->priv; |
81 | int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); | 81 | int channel = conf ? |
82 | ieee80211_frequency_to_channel(conf->channel->center_freq) : 1; | ||
82 | unsigned int chan_idx = channel - 1; | 83 | unsigned int chan_idx = channel - 1; |
83 | u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; | 84 | u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; |
84 | u32 chan = max2820_chan[chan_idx]; | 85 | u32 chan = max2820_chan[chan_idx]; |
@@ -87,7 +88,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, | |||
87 | * sa2400, for MAXIM we do this directly from BB */ | 88 | * sa2400, for MAXIM we do this directly from BB */ |
88 | rtl8180_write_phy(dev, 3, txpw); | 89 | rtl8180_write_phy(dev, 3, txpw); |
89 | 90 | ||
90 | max2820_write_phy_antenna(dev, chan); | 91 | max2820_write_phy_antenna(dev, channel); |
91 | write_max2820(dev, 3, chan); | 92 | write_max2820(dev, 3, chan); |
92 | } | 93 | } |
93 | 94 | ||
diff --git a/drivers/net/wireless/rtl8180_sa2400.c b/drivers/net/wireless/rtl8180_sa2400.c index 0311b4ea124c..cea4e0ccb92d 100644 --- a/drivers/net/wireless/rtl8180_sa2400.c +++ b/drivers/net/wireless/rtl8180_sa2400.c | |||
@@ -86,7 +86,7 @@ static void sa2400_rf_set_channel(struct ieee80211_hw *dev, | |||
86 | 86 | ||
87 | write_sa2400(dev, 7, txpw); | 87 | write_sa2400(dev, 7, txpw); |
88 | 88 | ||
89 | sa2400_write_phy_antenna(dev, chan); | 89 | sa2400_write_phy_antenna(dev, channel); |
90 | 90 | ||
91 | write_sa2400(dev, 0, chan); | 91 | write_sa2400(dev, 0, chan); |
92 | write_sa2400(dev, 1, 0xbb50); | 92 | write_sa2400(dev, 1, 0xbb50); |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index d5787b37e1fb..9223ada5f00e 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -92,6 +92,7 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr, | |||
92 | u8 data[4]; | 92 | u8 data[4]; |
93 | struct usb_ctrlrequest dr; | 93 | struct usb_ctrlrequest dr; |
94 | } *buf; | 94 | } *buf; |
95 | int rc; | ||
95 | 96 | ||
96 | buf = kmalloc(sizeof(*buf), GFP_ATOMIC); | 97 | buf = kmalloc(sizeof(*buf), GFP_ATOMIC); |
97 | if (!buf) | 98 | if (!buf) |
@@ -116,7 +117,11 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr, | |||
116 | usb_fill_control_urb(urb, priv->udev, usb_sndctrlpipe(priv->udev, 0), | 117 | usb_fill_control_urb(urb, priv->udev, usb_sndctrlpipe(priv->udev, 0), |
117 | (unsigned char *)dr, buf, len, | 118 | (unsigned char *)dr, buf, len, |
118 | rtl8187_iowrite_async_cb, buf); | 119 | rtl8187_iowrite_async_cb, buf); |
119 | usb_submit_urb(urb, GFP_ATOMIC); | 120 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
121 | if (rc < 0) { | ||
122 | kfree(buf); | ||
123 | usb_free_urb(urb); | ||
124 | } | ||
120 | } | 125 | } |
121 | 126 | ||
122 | static inline void rtl818x_iowrite32_async(struct rtl8187_priv *priv, | 127 | static inline void rtl818x_iowrite32_async(struct rtl8187_priv *priv, |
@@ -169,6 +174,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
169 | struct urb *urb; | 174 | struct urb *urb; |
170 | __le16 rts_dur = 0; | 175 | __le16 rts_dur = 0; |
171 | u32 flags; | 176 | u32 flags; |
177 | int rc; | ||
172 | 178 | ||
173 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 179 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
174 | if (!urb) { | 180 | if (!urb) { |
@@ -208,7 +214,11 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
208 | info->dev = dev; | 214 | info->dev = dev; |
209 | usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2), | 215 | usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2), |
210 | hdr, skb->len, rtl8187_tx_cb, skb); | 216 | hdr, skb->len, rtl8187_tx_cb, skb); |
211 | usb_submit_urb(urb, GFP_ATOMIC); | 217 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
218 | if (rc < 0) { | ||
219 | usb_free_urb(urb); | ||
220 | kfree_skb(skb); | ||
221 | } | ||
212 | 222 | ||
213 | return 0; | 223 | return 0; |
214 | } | 224 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 69c45ca99051..418606ac1c3b 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -719,7 +719,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) | |||
719 | fc = le16_to_cpu(*((__le16 *) buffer)); | 719 | fc = le16_to_cpu(*((__le16 *) buffer)); |
720 | 720 | ||
721 | is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && | 721 | is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && |
722 | ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA); | 722 | (fc & IEEE80211_STYPE_QOS_DATA); |
723 | is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == | 723 | is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == |
724 | (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); | 724 | (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); |
725 | need_padding = is_qos ^ is_4addr; | 725 | need_padding = is_qos ^ is_4addr; |
@@ -805,7 +805,7 @@ void zd_process_intr(struct work_struct *work) | |||
805 | u16 int_status; | 805 | u16 int_status; |
806 | struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); | 806 | struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); |
807 | 807 | ||
808 | int_status = le16_to_cpu(*(u16 *)(mac->intr_buffer+4)); | 808 | int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4)); |
809 | if (int_status & INT_CFG_NEXT_BCN) { | 809 | if (int_status & INT_CFG_NEXT_BCN) { |
810 | if (net_ratelimit()) | 810 | if (net_ratelimit()) |
811 | dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); | 811 | dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 12e24f04dddf..8941f5eb96c2 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -342,7 +342,7 @@ static inline void handle_regs_int(struct urb *urb) | |||
342 | ZD_ASSERT(in_interrupt()); | 342 | ZD_ASSERT(in_interrupt()); |
343 | spin_lock(&intr->lock); | 343 | spin_lock(&intr->lock); |
344 | 344 | ||
345 | int_num = le16_to_cpu(*(u16 *)(urb->transfer_buffer+2)); | 345 | int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2)); |
346 | if (int_num == CR_INTERRUPT) { | 346 | if (int_num == CR_INTERRUPT) { |
347 | struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context)); | 347 | struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context)); |
348 | memcpy(&mac->intr_buffer, urb->transfer_buffer, | 348 | memcpy(&mac->intr_buffer, urb->transfer_buffer, |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 8bddff150c70..d26f69b0184f 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -946,8 +946,7 @@ err: | |||
946 | work_done++; | 946 | work_done++; |
947 | } | 947 | } |
948 | 948 | ||
949 | while ((skb = __skb_dequeue(&errq))) | 949 | __skb_queue_purge(&errq); |
950 | kfree_skb(skb); | ||
951 | 950 | ||
952 | work_done -= handle_incoming_queue(dev, &rxq); | 951 | work_done -= handle_incoming_queue(dev, &rxq); |
953 | 952 | ||
@@ -1079,8 +1078,7 @@ static void xennet_release_rx_bufs(struct netfront_info *np) | |||
1079 | } | 1078 | } |
1080 | } | 1079 | } |
1081 | 1080 | ||
1082 | while ((skb = __skb_dequeue(&free_list)) != NULL) | 1081 | __skb_queue_purge(&free_list); |
1083 | dev_kfree_skb(skb); | ||
1084 | 1082 | ||
1085 | spin_unlock_bh(&np->rx_lock); | 1083 | spin_unlock_bh(&np->rx_lock); |
1086 | } | 1084 | } |
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index 715a44471617..b2ccdcbeb896 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c | |||
@@ -21,7 +21,6 @@ struct i2c_driver_device { | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | static struct i2c_driver_device i2c_devices[] = { | 23 | static struct i2c_driver_device i2c_devices[] = { |
24 | { "dallas,ds1374", "rtc-ds1374" }, | ||
25 | }; | 24 | }; |
26 | 25 | ||
27 | static int of_find_i2c_driver(struct device_node *node, | 26 | static int of_find_i2c_driver(struct device_node *node, |
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 925ba16355ce..a11021e8ce37 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -619,6 +619,7 @@ static struct hotplug_slot *get_slot_from_name (const char *name) | |||
619 | int pci_hp_register (struct hotplug_slot *slot) | 619 | int pci_hp_register (struct hotplug_slot *slot) |
620 | { | 620 | { |
621 | int result; | 621 | int result; |
622 | struct hotplug_slot *tmp; | ||
622 | 623 | ||
623 | if (slot == NULL) | 624 | if (slot == NULL) |
624 | return -ENODEV; | 625 | return -ENODEV; |
@@ -630,7 +631,11 @@ int pci_hp_register (struct hotplug_slot *slot) | |||
630 | return -EINVAL; | 631 | return -EINVAL; |
631 | } | 632 | } |
632 | 633 | ||
633 | /* this can fail if we have already registered a slot with the same name */ | 634 | /* Check if we have already registered a slot with the same name. */ |
635 | tmp = get_slot_from_name(slot->name); | ||
636 | if (tmp) | ||
637 | return -EEXIST; | ||
638 | |||
634 | slot->kobj.kset = pci_hotplug_slots_kset; | 639 | slot->kobj.kset = pci_hotplug_slots_kset; |
635 | result = kobject_init_and_add(&slot->kobj, &hotplug_slot_ktype, NULL, | 640 | result = kobject_init_and_add(&slot->kobj, &hotplug_slot_ktype, NULL, |
636 | "%s", slot->name); | 641 | "%s", slot->name); |
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 8264a7680435..79c9ddaad3fb 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -97,6 +97,7 @@ struct controller { | |||
97 | u8 cap_base; | 97 | u8 cap_base; |
98 | struct timer_list poll_timer; | 98 | struct timer_list poll_timer; |
99 | volatile int cmd_busy; | 99 | volatile int cmd_busy; |
100 | unsigned int no_cmd_complete:1; | ||
100 | }; | 101 | }; |
101 | 102 | ||
102 | #define INT_BUTTON_IGNORE 0 | 103 | #define INT_BUTTON_IGNORE 0 |
@@ -135,6 +136,7 @@ struct controller { | |||
135 | #define PWR_LED_PRSN 0x00000010 | 136 | #define PWR_LED_PRSN 0x00000010 |
136 | #define HP_SUPR_RM_SUP 0x00000020 | 137 | #define HP_SUPR_RM_SUP 0x00000020 |
137 | #define EMI_PRSN 0x00020000 | 138 | #define EMI_PRSN 0x00020000 |
139 | #define NO_CMD_CMPL_SUP 0x00040000 | ||
138 | 140 | ||
139 | #define ATTN_BUTTN(ctrl) ((ctrl)->slot_cap & ATTN_BUTTN_PRSN) | 141 | #define ATTN_BUTTN(ctrl) ((ctrl)->slot_cap & ATTN_BUTTN_PRSN) |
140 | #define POWER_CTRL(ctrl) ((ctrl)->slot_cap & PWR_CTRL_PRSN) | 142 | #define POWER_CTRL(ctrl) ((ctrl)->slot_cap & PWR_CTRL_PRSN) |
@@ -143,13 +145,14 @@ struct controller { | |||
143 | #define PWR_LED(ctrl) ((ctrl)->slot_cap & PWR_LED_PRSN) | 145 | #define PWR_LED(ctrl) ((ctrl)->slot_cap & PWR_LED_PRSN) |
144 | #define HP_SUPR_RM(ctrl) ((ctrl)->slot_cap & HP_SUPR_RM_SUP) | 146 | #define HP_SUPR_RM(ctrl) ((ctrl)->slot_cap & HP_SUPR_RM_SUP) |
145 | #define EMI(ctrl) ((ctrl)->slot_cap & EMI_PRSN) | 147 | #define EMI(ctrl) ((ctrl)->slot_cap & EMI_PRSN) |
148 | #define NO_CMD_CMPL(ctrl) ((ctrl)->slot_cap & NO_CMD_CMPL_SUP) | ||
146 | 149 | ||
147 | extern int pciehp_sysfs_enable_slot(struct slot *slot); | 150 | extern int pciehp_sysfs_enable_slot(struct slot *slot); |
148 | extern int pciehp_sysfs_disable_slot(struct slot *slot); | 151 | extern int pciehp_sysfs_disable_slot(struct slot *slot); |
149 | extern u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl); | 152 | extern u8 pciehp_handle_attention_button(struct slot *p_slot); |
150 | extern u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl); | 153 | extern u8 pciehp_handle_switch_change(struct slot *p_slot); |
151 | extern u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl); | 154 | extern u8 pciehp_handle_presence_change(struct slot *p_slot); |
152 | extern u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl); | 155 | extern u8 pciehp_handle_power_fault(struct slot *p_slot); |
153 | extern int pciehp_configure_device(struct slot *p_slot); | 156 | extern int pciehp_configure_device(struct slot *p_slot); |
154 | extern int pciehp_unconfigure_device(struct slot *p_slot); | 157 | extern int pciehp_unconfigure_device(struct slot *p_slot); |
155 | extern void pciehp_queue_pushbutton_work(struct work_struct *work); | 158 | extern void pciehp_queue_pushbutton_work(struct work_struct *work); |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 43d8ddb2d679..48a2ed378914 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -254,7 +254,11 @@ static int init_slots(struct controller *ctrl) | |||
254 | slot->hp_slot, slot->number, ctrl->slot_device_offset); | 254 | slot->hp_slot, slot->number, ctrl->slot_device_offset); |
255 | retval = pci_hp_register(hotplug_slot); | 255 | retval = pci_hp_register(hotplug_slot); |
256 | if (retval) { | 256 | if (retval) { |
257 | err ("pci_hp_register failed with error %d\n", retval); | 257 | err("pci_hp_register failed with error %d\n", retval); |
258 | if (retval == -EEXIST) | ||
259 | err("Failed to register slot because of name " | ||
260 | "collision. Try \'pciehp_slot_with_bus\' " | ||
261 | "module option.\n"); | ||
258 | goto error_info; | 262 | goto error_info; |
259 | } | 263 | } |
260 | /* create additional sysfs entries */ | 264 | /* create additional sysfs entries */ |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 0a7aa628e955..96a5d55a4983 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -55,16 +55,13 @@ static int queue_interrupt_event(struct slot *p_slot, u32 event_type) | |||
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl) | 58 | u8 pciehp_handle_attention_button(struct slot *p_slot) |
59 | { | 59 | { |
60 | struct slot *p_slot; | ||
61 | u32 event_type; | 60 | u32 event_type; |
62 | 61 | ||
63 | /* Attention Button Change */ | 62 | /* Attention Button Change */ |
64 | dbg("pciehp: Attention button interrupt received.\n"); | 63 | dbg("pciehp: Attention button interrupt received.\n"); |
65 | 64 | ||
66 | p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | ||
67 | |||
68 | /* | 65 | /* |
69 | * Button pressed - See if need to TAKE ACTION!!! | 66 | * Button pressed - See if need to TAKE ACTION!!! |
70 | */ | 67 | */ |
@@ -76,18 +73,15 @@ u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl) | |||
76 | return 0; | 73 | return 0; |
77 | } | 74 | } |
78 | 75 | ||
79 | u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl) | 76 | u8 pciehp_handle_switch_change(struct slot *p_slot) |
80 | { | 77 | { |
81 | struct slot *p_slot; | ||
82 | u8 getstatus; | 78 | u8 getstatus; |
83 | u32 event_type; | 79 | u32 event_type; |
84 | 80 | ||
85 | /* Switch Change */ | 81 | /* Switch Change */ |
86 | dbg("pciehp: Switch interrupt received.\n"); | 82 | dbg("pciehp: Switch interrupt received.\n"); |
87 | 83 | ||
88 | p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | ||
89 | p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); | 84 | p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); |
90 | |||
91 | if (getstatus) { | 85 | if (getstatus) { |
92 | /* | 86 | /* |
93 | * Switch opened | 87 | * Switch opened |
@@ -107,17 +101,14 @@ u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl) | |||
107 | return 1; | 101 | return 1; |
108 | } | 102 | } |
109 | 103 | ||
110 | u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl) | 104 | u8 pciehp_handle_presence_change(struct slot *p_slot) |
111 | { | 105 | { |
112 | struct slot *p_slot; | ||
113 | u32 event_type; | 106 | u32 event_type; |
114 | u8 presence_save; | 107 | u8 presence_save; |
115 | 108 | ||
116 | /* Presence Change */ | 109 | /* Presence Change */ |
117 | dbg("pciehp: Presence/Notify input change.\n"); | 110 | dbg("pciehp: Presence/Notify input change.\n"); |
118 | 111 | ||
119 | p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | ||
120 | |||
121 | /* Switch is open, assume a presence change | 112 | /* Switch is open, assume a presence change |
122 | * Save the presence state | 113 | * Save the presence state |
123 | */ | 114 | */ |
@@ -141,16 +132,13 @@ u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl) | |||
141 | return 1; | 132 | return 1; |
142 | } | 133 | } |
143 | 134 | ||
144 | u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl) | 135 | u8 pciehp_handle_power_fault(struct slot *p_slot) |
145 | { | 136 | { |
146 | struct slot *p_slot; | ||
147 | u32 event_type; | 137 | u32 event_type; |
148 | 138 | ||
149 | /* power fault */ | 139 | /* power fault */ |
150 | dbg("pciehp: Power fault interrupt received.\n"); | 140 | dbg("pciehp: Power fault interrupt received.\n"); |
151 | 141 | ||
152 | p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); | ||
153 | |||
154 | if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) { | 142 | if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) { |
155 | /* | 143 | /* |
156 | * power fault Cleared | 144 | * power fault Cleared |
@@ -163,7 +151,7 @@ u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl) | |||
163 | */ | 151 | */ |
164 | info("Power fault on Slot(%s)\n", p_slot->name); | 152 | info("Power fault on Slot(%s)\n", p_slot->name); |
165 | event_type = INT_POWER_FAULT; | 153 | event_type = INT_POWER_FAULT; |
166 | info("power fault bit %x set\n", hp_slot); | 154 | info("power fault bit %x set\n", 0); |
167 | } | 155 | } |
168 | 156 | ||
169 | queue_interrupt_event(p_slot, event_type); | 157 | queue_interrupt_event(p_slot, event_type); |
@@ -186,6 +174,13 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot) | |||
186 | } | 174 | } |
187 | } | 175 | } |
188 | 176 | ||
177 | /* | ||
178 | * After turning power off, we must wait for at least 1 second | ||
179 | * before taking any action that relies on power having been | ||
180 | * removed from the slot/adapter. | ||
181 | */ | ||
182 | msleep(1000); | ||
183 | |||
189 | if (PWR_LED(ctrl)) | 184 | if (PWR_LED(ctrl)) |
190 | pslot->hpc_ops->green_led_off(pslot); | 185 | pslot->hpc_ops->green_led_off(pslot); |
191 | 186 | ||
@@ -289,6 +284,13 @@ static int remove_board(struct slot *p_slot) | |||
289 | } | 284 | } |
290 | } | 285 | } |
291 | 286 | ||
287 | /* | ||
288 | * After turning power off, we must wait for at least 1 second | ||
289 | * before taking any action that relies on power having been | ||
290 | * removed from the slot/adapter. | ||
291 | */ | ||
292 | msleep(1000); | ||
293 | |||
292 | if (PWR_LED(ctrl)) | 294 | if (PWR_LED(ctrl)) |
293 | /* turn off Green LED */ | 295 | /* turn off Green LED */ |
294 | p_slot->hpc_ops->green_led_off(p_slot); | 296 | p_slot->hpc_ops->green_led_off(p_slot); |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 891f81a0400c..79f104963166 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -247,14 +247,38 @@ static inline void pciehp_free_irq(struct controller *ctrl) | |||
247 | free_irq(ctrl->pci_dev->irq, ctrl); | 247 | free_irq(ctrl->pci_dev->irq, ctrl); |
248 | } | 248 | } |
249 | 249 | ||
250 | static inline int pcie_wait_cmd(struct controller *ctrl) | 250 | static inline int pcie_poll_cmd(struct controller *ctrl) |
251 | { | ||
252 | u16 slot_status; | ||
253 | int timeout = 1000; | ||
254 | |||
255 | if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) | ||
256 | if (slot_status & CMD_COMPLETED) | ||
257 | goto completed; | ||
258 | for (timeout = 1000; timeout > 0; timeout -= 100) { | ||
259 | msleep(100); | ||
260 | if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) | ||
261 | if (slot_status & CMD_COMPLETED) | ||
262 | goto completed; | ||
263 | } | ||
264 | return 0; /* timeout */ | ||
265 | |||
266 | completed: | ||
267 | pciehp_writew(ctrl, SLOTSTATUS, CMD_COMPLETED); | ||
268 | return timeout; | ||
269 | } | ||
270 | |||
271 | static inline int pcie_wait_cmd(struct controller *ctrl, int poll) | ||
251 | { | 272 | { |
252 | int retval = 0; | 273 | int retval = 0; |
253 | unsigned int msecs = pciehp_poll_mode ? 2500 : 1000; | 274 | unsigned int msecs = pciehp_poll_mode ? 2500 : 1000; |
254 | unsigned long timeout = msecs_to_jiffies(msecs); | 275 | unsigned long timeout = msecs_to_jiffies(msecs); |
255 | int rc; | 276 | int rc; |
256 | 277 | ||
257 | rc = wait_event_interruptible_timeout(ctrl->queue, | 278 | if (poll) |
279 | rc = pcie_poll_cmd(ctrl); | ||
280 | else | ||
281 | rc = wait_event_interruptible_timeout(ctrl->queue, | ||
258 | !ctrl->cmd_busy, timeout); | 282 | !ctrl->cmd_busy, timeout); |
259 | if (!rc) | 283 | if (!rc) |
260 | dbg("Command not completed in 1000 msec\n"); | 284 | dbg("Command not completed in 1000 msec\n"); |
@@ -286,12 +310,28 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask) | |||
286 | goto out; | 310 | goto out; |
287 | } | 311 | } |
288 | 312 | ||
289 | if ((slot_status & CMD_COMPLETED) == CMD_COMPLETED ) { | 313 | if (slot_status & CMD_COMPLETED) { |
290 | /* After 1 sec and CMD_COMPLETED still not set, just | 314 | if (!ctrl->no_cmd_complete) { |
291 | proceed forward to issue the next command according | 315 | /* |
292 | to spec. Just print out the error message */ | 316 | * After 1 sec and CMD_COMPLETED still not set, just |
293 | dbg("%s: CMD_COMPLETED not clear after 1 sec.\n", | 317 | * proceed forward to issue the next command according |
294 | __func__); | 318 | * to spec. Just print out the error message. |
319 | */ | ||
320 | dbg("%s: CMD_COMPLETED not clear after 1 sec.\n", | ||
321 | __func__); | ||
322 | } else if (!NO_CMD_CMPL(ctrl)) { | ||
323 | /* | ||
324 | * This controller semms to notify of command completed | ||
325 | * event even though it supports none of power | ||
326 | * controller, attention led, power led and EMI. | ||
327 | */ | ||
328 | dbg("%s: Unexpected CMD_COMPLETED. Need to wait for " | ||
329 | "command completed event.\n", __func__); | ||
330 | ctrl->no_cmd_complete = 0; | ||
331 | } else { | ||
332 | dbg("%s: Unexpected CMD_COMPLETED. Maybe the " | ||
333 | "controller is broken.\n", __func__); | ||
334 | } | ||
295 | } | 335 | } |
296 | 336 | ||
297 | retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); | 337 | retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); |
@@ -315,8 +355,18 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask) | |||
315 | /* | 355 | /* |
316 | * Wait for command completion. | 356 | * Wait for command completion. |
317 | */ | 357 | */ |
318 | if (!retval) | 358 | if (!retval && !ctrl->no_cmd_complete) { |
319 | retval = pcie_wait_cmd(ctrl); | 359 | int poll = 0; |
360 | /* | ||
361 | * if hotplug interrupt is not enabled or command | ||
362 | * completed interrupt is not enabled, we need to poll | ||
363 | * command completed event. | ||
364 | */ | ||
365 | if (!(slot_ctrl & HP_INTR_ENABLE) || | ||
366 | !(slot_ctrl & CMD_CMPL_INTR_ENABLE)) | ||
367 | poll = 1; | ||
368 | retval = pcie_wait_cmd(ctrl, poll); | ||
369 | } | ||
320 | out: | 370 | out: |
321 | mutex_unlock(&ctrl->ctrl_lock); | 371 | mutex_unlock(&ctrl->ctrl_lock); |
322 | return retval; | 372 | return retval; |
@@ -704,13 +754,6 @@ static int hpc_power_off_slot(struct slot * slot) | |||
704 | } | 754 | } |
705 | dbg("%s: SLOTCTRL %x write cmd %x\n", | 755 | dbg("%s: SLOTCTRL %x write cmd %x\n", |
706 | __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); | 756 | __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); |
707 | |||
708 | /* | ||
709 | * After turning power off, we must wait for at least 1 second | ||
710 | * before taking any action that relies on power having been | ||
711 | * removed from the slot/adapter. | ||
712 | */ | ||
713 | msleep(1000); | ||
714 | out: | 757 | out: |
715 | if (changed) | 758 | if (changed) |
716 | pcie_unmask_bad_dllp(ctrl); | 759 | pcie_unmask_bad_dllp(ctrl); |
@@ -722,6 +765,7 @@ static irqreturn_t pcie_isr(int irq, void *dev_id) | |||
722 | { | 765 | { |
723 | struct controller *ctrl = (struct controller *)dev_id; | 766 | struct controller *ctrl = (struct controller *)dev_id; |
724 | u16 detected, intr_loc; | 767 | u16 detected, intr_loc; |
768 | struct slot *p_slot; | ||
725 | 769 | ||
726 | /* | 770 | /* |
727 | * In order to guarantee that all interrupt events are | 771 | * In order to guarantee that all interrupt events are |
@@ -756,21 +800,38 @@ static irqreturn_t pcie_isr(int irq, void *dev_id) | |||
756 | wake_up_interruptible(&ctrl->queue); | 800 | wake_up_interruptible(&ctrl->queue); |
757 | } | 801 | } |
758 | 802 | ||
803 | if (!(intr_loc & ~CMD_COMPLETED)) | ||
804 | return IRQ_HANDLED; | ||
805 | |||
806 | /* | ||
807 | * Return without handling events if this handler routine is | ||
808 | * called before controller initialization is done. This may | ||
809 | * happen if hotplug event or another interrupt that shares | ||
810 | * the IRQ with pciehp arrives before slot initialization is | ||
811 | * done after interrupt handler is registered. | ||
812 | * | ||
813 | * FIXME - Need more structural fixes. We need to be ready to | ||
814 | * handle the event before installing interrupt handler. | ||
815 | */ | ||
816 | p_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset); | ||
817 | if (!p_slot || !p_slot->hpc_ops) | ||
818 | return IRQ_HANDLED; | ||
819 | |||
759 | /* Check MRL Sensor Changed */ | 820 | /* Check MRL Sensor Changed */ |
760 | if (intr_loc & MRL_SENS_CHANGED) | 821 | if (intr_loc & MRL_SENS_CHANGED) |
761 | pciehp_handle_switch_change(0, ctrl); | 822 | pciehp_handle_switch_change(p_slot); |
762 | 823 | ||
763 | /* Check Attention Button Pressed */ | 824 | /* Check Attention Button Pressed */ |
764 | if (intr_loc & ATTN_BUTTN_PRESSED) | 825 | if (intr_loc & ATTN_BUTTN_PRESSED) |
765 | pciehp_handle_attention_button(0, ctrl); | 826 | pciehp_handle_attention_button(p_slot); |
766 | 827 | ||
767 | /* Check Presence Detect Changed */ | 828 | /* Check Presence Detect Changed */ |
768 | if (intr_loc & PRSN_DETECT_CHANGED) | 829 | if (intr_loc & PRSN_DETECT_CHANGED) |
769 | pciehp_handle_presence_change(0, ctrl); | 830 | pciehp_handle_presence_change(p_slot); |
770 | 831 | ||
771 | /* Check Power Fault Detected */ | 832 | /* Check Power Fault Detected */ |
772 | if (intr_loc & PWR_FAULT_DETECTED) | 833 | if (intr_loc & PWR_FAULT_DETECTED) |
773 | pciehp_handle_power_fault(0, ctrl); | 834 | pciehp_handle_power_fault(p_slot); |
774 | 835 | ||
775 | return IRQ_HANDLED; | 836 | return IRQ_HANDLED; |
776 | } | 837 | } |
@@ -1028,6 +1089,12 @@ static int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev) | |||
1028 | static int pcie_init_hardware_part1(struct controller *ctrl, | 1089 | static int pcie_init_hardware_part1(struct controller *ctrl, |
1029 | struct pcie_device *dev) | 1090 | struct pcie_device *dev) |
1030 | { | 1091 | { |
1092 | /* Clear all remaining event bits in Slot Status register */ | ||
1093 | if (pciehp_writew(ctrl, SLOTSTATUS, 0x1f)) { | ||
1094 | err("%s: Cannot write to SLOTSTATUS register\n", __func__); | ||
1095 | return -1; | ||
1096 | } | ||
1097 | |||
1031 | /* Mask Hot-plug Interrupt Enable */ | 1098 | /* Mask Hot-plug Interrupt Enable */ |
1032 | if (pcie_write_cmd(ctrl, 0, HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE)) { | 1099 | if (pcie_write_cmd(ctrl, 0, HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE)) { |
1033 | err("%s: Cannot mask hotplug interrupt enable\n", __func__); | 1100 | err("%s: Cannot mask hotplug interrupt enable\n", __func__); |
@@ -1040,16 +1107,6 @@ int pcie_init_hardware_part2(struct controller *ctrl, struct pcie_device *dev) | |||
1040 | { | 1107 | { |
1041 | u16 cmd, mask; | 1108 | u16 cmd, mask; |
1042 | 1109 | ||
1043 | /* | ||
1044 | * We need to clear all events before enabling hotplug interrupt | ||
1045 | * notification mechanism in order for hotplug controler to | ||
1046 | * generate interrupts. | ||
1047 | */ | ||
1048 | if (pciehp_writew(ctrl, SLOTSTATUS, 0x1f)) { | ||
1049 | err("%s: Cannot write to SLOTSTATUS register\n", __FUNCTION__); | ||
1050 | return -1; | ||
1051 | } | ||
1052 | |||
1053 | cmd = PRSN_DETECT_ENABLE; | 1110 | cmd = PRSN_DETECT_ENABLE; |
1054 | if (ATTN_BUTTN(ctrl)) | 1111 | if (ATTN_BUTTN(ctrl)) |
1055 | cmd |= ATTN_BUTTN_ENABLE; | 1112 | cmd |= ATTN_BUTTN_ENABLE; |
@@ -1116,6 +1173,7 @@ static inline void dbg_ctrl(struct controller *ctrl) | |||
1116 | dbg(" Power Indicator : %3s\n", PWR_LED(ctrl) ? "yes" : "no"); | 1173 | dbg(" Power Indicator : %3s\n", PWR_LED(ctrl) ? "yes" : "no"); |
1117 | dbg(" Hot-Plug Surprise : %3s\n", HP_SUPR_RM(ctrl) ? "yes" : "no"); | 1174 | dbg(" Hot-Plug Surprise : %3s\n", HP_SUPR_RM(ctrl) ? "yes" : "no"); |
1118 | dbg(" EMI Present : %3s\n", EMI(ctrl) ? "yes" : "no"); | 1175 | dbg(" EMI Present : %3s\n", EMI(ctrl) ? "yes" : "no"); |
1176 | dbg(" Comamnd Completed : %3s\n", NO_CMD_CMPL(ctrl)? "no" : "yes"); | ||
1119 | pciehp_readw(ctrl, SLOTSTATUS, ®16); | 1177 | pciehp_readw(ctrl, SLOTSTATUS, ®16); |
1120 | dbg("Slot Status : 0x%04x\n", reg16); | 1178 | dbg("Slot Status : 0x%04x\n", reg16); |
1121 | pciehp_readw(ctrl, SLOTSTATUS, ®16); | 1179 | pciehp_readw(ctrl, SLOTSTATUS, ®16); |
@@ -1147,6 +1205,15 @@ int pcie_init(struct controller *ctrl, struct pcie_device *dev) | |||
1147 | mutex_init(&ctrl->ctrl_lock); | 1205 | mutex_init(&ctrl->ctrl_lock); |
1148 | init_waitqueue_head(&ctrl->queue); | 1206 | init_waitqueue_head(&ctrl->queue); |
1149 | dbg_ctrl(ctrl); | 1207 | dbg_ctrl(ctrl); |
1208 | /* | ||
1209 | * Controller doesn't notify of command completion if the "No | ||
1210 | * Command Completed Support" bit is set in Slot Capability | ||
1211 | * register or the controller supports none of power | ||
1212 | * controller, attention led, power led and EMI. | ||
1213 | */ | ||
1214 | if (NO_CMD_CMPL(ctrl) || | ||
1215 | !(POWER_CTRL(ctrl) | ATTN_LED(ctrl) | PWR_LED(ctrl) | EMI(ctrl))) | ||
1216 | ctrl->no_cmd_complete = 1; | ||
1150 | 1217 | ||
1151 | info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", | 1218 | info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", |
1152 | pdev->vendor, pdev->device, | 1219 | pdev->vendor, pdev->device, |
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c index e32148a8fa12..779c5db71be4 100644 --- a/drivers/pci/hotplug/rpadlpar_sysfs.c +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c | |||
@@ -18,8 +18,12 @@ | |||
18 | #include "rpadlpar.h" | 18 | #include "rpadlpar.h" |
19 | 19 | ||
20 | #define DLPAR_KOBJ_NAME "control" | 20 | #define DLPAR_KOBJ_NAME "control" |
21 | #define ADD_SLOT_ATTR_NAME "add_slot" | 21 | |
22 | #define REMOVE_SLOT_ATTR_NAME "remove_slot" | 22 | /* Those two have no quotes because they are passed to __ATTR() which |
23 | * stringifies the argument (yuck !) | ||
24 | */ | ||
25 | #define ADD_SLOT_ATTR_NAME add_slot | ||
26 | #define REMOVE_SLOT_ATTR_NAME remove_slot | ||
23 | 27 | ||
24 | #define MAX_DRC_NAME_LEN 64 | 28 | #define MAX_DRC_NAME_LEN 64 |
25 | 29 | ||
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index 1648076600fc..97848654652a 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -162,6 +162,10 @@ static int init_slots(struct controller *ctrl) | |||
162 | retval = pci_hp_register(slot->hotplug_slot); | 162 | retval = pci_hp_register(slot->hotplug_slot); |
163 | if (retval) { | 163 | if (retval) { |
164 | err("pci_hp_register failed with error %d\n", retval); | 164 | err("pci_hp_register failed with error %d\n", retval); |
165 | if (retval == -EEXIST) | ||
166 | err("Failed to register slot because of name " | ||
167 | "collision. Try \'shpchp_slot_with_bus\' " | ||
168 | "module option.\n"); | ||
165 | goto error_info; | 169 | goto error_info; |
166 | } | 170 | } |
167 | 171 | ||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 72cf61ed8f96..e1637bd82b8e 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -181,7 +181,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, | |||
181 | any need to change it. */ | 181 | any need to change it. */ |
182 | struct mempolicy *oldpol; | 182 | struct mempolicy *oldpol; |
183 | cpumask_t oldmask = current->cpus_allowed; | 183 | cpumask_t oldmask = current->cpus_allowed; |
184 | int node = pcibus_to_node(dev->bus); | 184 | int node = dev_to_node(&dev->dev); |
185 | 185 | ||
186 | if (node >= 0) { | 186 | if (node >= 0) { |
187 | node_to_cpumask_ptr(nodecpumask, node); | 187 | node_to_cpumask_ptr(nodecpumask, node); |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 271d41cc05ab..6f3c7446c329 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -489,13 +489,13 @@ pci_mmap_legacy_mem(struct kobject *kobj, struct bin_attribute *attr, | |||
489 | * @kobj: kobject for mapping | 489 | * @kobj: kobject for mapping |
490 | * @attr: struct bin_attribute for the file being mapped | 490 | * @attr: struct bin_attribute for the file being mapped |
491 | * @vma: struct vm_area_struct passed into the mmap | 491 | * @vma: struct vm_area_struct passed into the mmap |
492 | * @write_combine: 1 for write_combine mapping | ||
492 | * | 493 | * |
493 | * Use the regular PCI mapping routines to map a PCI resource into userspace. | 494 | * Use the regular PCI mapping routines to map a PCI resource into userspace. |
494 | * FIXME: write combining? maybe automatic for prefetchable regions? | ||
495 | */ | 495 | */ |
496 | static int | 496 | static int |
497 | pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, | 497 | pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, |
498 | struct vm_area_struct *vma) | 498 | struct vm_area_struct *vma, int write_combine) |
499 | { | 499 | { |
500 | struct pci_dev *pdev = to_pci_dev(container_of(kobj, | 500 | struct pci_dev *pdev = to_pci_dev(container_of(kobj, |
501 | struct device, kobj)); | 501 | struct device, kobj)); |
@@ -518,7 +518,21 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, | |||
518 | vma->vm_pgoff += start >> PAGE_SHIFT; | 518 | vma->vm_pgoff += start >> PAGE_SHIFT; |
519 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; | 519 | mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; |
520 | 520 | ||
521 | return pci_mmap_page_range(pdev, vma, mmap_type, 0); | 521 | return pci_mmap_page_range(pdev, vma, mmap_type, write_combine); |
522 | } | ||
523 | |||
524 | static int | ||
525 | pci_mmap_resource_uc(struct kobject *kobj, struct bin_attribute *attr, | ||
526 | struct vm_area_struct *vma) | ||
527 | { | ||
528 | return pci_mmap_resource(kobj, attr, vma, 0); | ||
529 | } | ||
530 | |||
531 | static int | ||
532 | pci_mmap_resource_wc(struct kobject *kobj, struct bin_attribute *attr, | ||
533 | struct vm_area_struct *vma) | ||
534 | { | ||
535 | return pci_mmap_resource(kobj, attr, vma, 1); | ||
522 | } | 536 | } |
523 | 537 | ||
524 | /** | 538 | /** |
@@ -541,9 +555,46 @@ pci_remove_resource_files(struct pci_dev *pdev) | |||
541 | sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); | 555 | sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); |
542 | kfree(res_attr); | 556 | kfree(res_attr); |
543 | } | 557 | } |
558 | |||
559 | res_attr = pdev->res_attr_wc[i]; | ||
560 | if (res_attr) { | ||
561 | sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); | ||
562 | kfree(res_attr); | ||
563 | } | ||
544 | } | 564 | } |
545 | } | 565 | } |
546 | 566 | ||
567 | static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine) | ||
568 | { | ||
569 | /* allocate attribute structure, piggyback attribute name */ | ||
570 | int name_len = write_combine ? 13 : 10; | ||
571 | struct bin_attribute *res_attr; | ||
572 | int retval; | ||
573 | |||
574 | res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC); | ||
575 | if (res_attr) { | ||
576 | char *res_attr_name = (char *)(res_attr + 1); | ||
577 | |||
578 | if (write_combine) { | ||
579 | pdev->res_attr_wc[num] = res_attr; | ||
580 | sprintf(res_attr_name, "resource%d_wc", num); | ||
581 | res_attr->mmap = pci_mmap_resource_wc; | ||
582 | } else { | ||
583 | pdev->res_attr[num] = res_attr; | ||
584 | sprintf(res_attr_name, "resource%d", num); | ||
585 | res_attr->mmap = pci_mmap_resource_uc; | ||
586 | } | ||
587 | res_attr->attr.name = res_attr_name; | ||
588 | res_attr->attr.mode = S_IRUSR | S_IWUSR; | ||
589 | res_attr->size = pci_resource_len(pdev, num); | ||
590 | res_attr->private = &pdev->resource[num]; | ||
591 | retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr); | ||
592 | } else | ||
593 | retval = -ENOMEM; | ||
594 | |||
595 | return retval; | ||
596 | } | ||
597 | |||
547 | /** | 598 | /** |
548 | * pci_create_resource_files - create resource files in sysfs for @dev | 599 | * pci_create_resource_files - create resource files in sysfs for @dev |
549 | * @dev: dev in question | 600 | * @dev: dev in question |
@@ -557,31 +608,19 @@ static int pci_create_resource_files(struct pci_dev *pdev) | |||
557 | 608 | ||
558 | /* Expose the PCI resources from this device as files */ | 609 | /* Expose the PCI resources from this device as files */ |
559 | for (i = 0; i < PCI_ROM_RESOURCE; i++) { | 610 | for (i = 0; i < PCI_ROM_RESOURCE; i++) { |
560 | struct bin_attribute *res_attr; | ||
561 | 611 | ||
562 | /* skip empty resources */ | 612 | /* skip empty resources */ |
563 | if (!pci_resource_len(pdev, i)) | 613 | if (!pci_resource_len(pdev, i)) |
564 | continue; | 614 | continue; |
565 | 615 | ||
566 | /* allocate attribute structure, piggyback attribute name */ | 616 | retval = pci_create_attr(pdev, i, 0); |
567 | res_attr = kzalloc(sizeof(*res_attr) + 10, GFP_ATOMIC); | 617 | /* for prefetchable resources, create a WC mappable file */ |
568 | if (res_attr) { | 618 | if (!retval && pdev->resource[i].flags & IORESOURCE_PREFETCH) |
569 | char *res_attr_name = (char *)(res_attr + 1); | 619 | retval = pci_create_attr(pdev, i, 1); |
570 | 620 | ||
571 | pdev->res_attr[i] = res_attr; | 621 | if (retval) { |
572 | sprintf(res_attr_name, "resource%d", i); | 622 | pci_remove_resource_files(pdev); |
573 | res_attr->attr.name = res_attr_name; | 623 | return retval; |
574 | res_attr->attr.mode = S_IRUSR | S_IWUSR; | ||
575 | res_attr->size = pci_resource_len(pdev, i); | ||
576 | res_attr->mmap = pci_mmap_resource; | ||
577 | res_attr->private = &pdev->resource[i]; | ||
578 | retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr); | ||
579 | if (retval) { | ||
580 | pci_remove_resource_files(pdev); | ||
581 | return retval; | ||
582 | } | ||
583 | } else { | ||
584 | return -ENOMEM; | ||
585 | } | 624 | } |
586 | } | 625 | } |
587 | return 0; | 626 | return 0; |
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 61fedb2448b6..f82495583e63 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -506,6 +506,23 @@ static void free_link_state(struct pci_dev *pdev) | |||
506 | pdev->link_state = NULL; | 506 | pdev->link_state = NULL; |
507 | } | 507 | } |
508 | 508 | ||
509 | static int pcie_aspm_sanity_check(struct pci_dev *pdev) | ||
510 | { | ||
511 | struct pci_dev *child_dev; | ||
512 | int child_pos; | ||
513 | |||
514 | /* | ||
515 | * Some functions in a slot might not all be PCIE functions, very | ||
516 | * strange. Disable ASPM for the whole slot | ||
517 | */ | ||
518 | list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) { | ||
519 | child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP); | ||
520 | if (!child_pos) | ||
521 | return -EINVAL; | ||
522 | } | ||
523 | return 0; | ||
524 | } | ||
525 | |||
509 | /* | 526 | /* |
510 | * pcie_aspm_init_link_state: Initiate PCI express link state. | 527 | * pcie_aspm_init_link_state: Initiate PCI express link state. |
511 | * It is called after the pcie and its children devices are scaned. | 528 | * It is called after the pcie and its children devices are scaned. |
@@ -526,6 +543,9 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) | |||
526 | if (list_empty(&pdev->subordinate->devices)) | 543 | if (list_empty(&pdev->subordinate->devices)) |
527 | goto out; | 544 | goto out; |
528 | 545 | ||
546 | if (pcie_aspm_sanity_check(pdev)) | ||
547 | goto out; | ||
548 | |||
529 | mutex_lock(&aspm_lock); | 549 | mutex_lock(&aspm_lock); |
530 | 550 | ||
531 | link_state = kzalloc(sizeof(*link_state), GFP_KERNEL); | 551 | link_state = kzalloc(sizeof(*link_state), GFP_KERNEL); |
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 0a6cea1316b4..52d0aa8c2e7a 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -352,6 +352,7 @@ static struct of_device_id electra_cf_match[] = { | |||
352 | }, | 352 | }, |
353 | {}, | 353 | {}, |
354 | }; | 354 | }; |
355 | MODULE_DEVICE_TABLE(of, electra_cf_match); | ||
355 | 356 | ||
356 | static struct of_platform_driver electra_cf_driver = { | 357 | static struct of_platform_driver electra_cf_driver = { |
357 | .name = (char *)driver_name, | 358 | .name = (char *)driver_name, |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 0201c8adfda7..46c791adb894 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -50,15 +50,17 @@ static int irq_flags(int triggering, int polarity, int shareable) | |||
50 | flags = IORESOURCE_IRQ_HIGHEDGE; | 50 | flags = IORESOURCE_IRQ_HIGHEDGE; |
51 | } | 51 | } |
52 | 52 | ||
53 | if (shareable) | 53 | if (shareable == ACPI_SHARED) |
54 | flags |= IORESOURCE_IRQ_SHAREABLE; | 54 | flags |= IORESOURCE_IRQ_SHAREABLE; |
55 | 55 | ||
56 | return flags; | 56 | return flags; |
57 | } | 57 | } |
58 | 58 | ||
59 | static void decode_irq_flags(int flag, int *triggering, int *polarity) | 59 | static void decode_irq_flags(struct pnp_dev *dev, int flags, int *triggering, |
60 | int *polarity, int *shareable) | ||
60 | { | 61 | { |
61 | switch (flag) { | 62 | switch (flags & (IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_HIGHLEVEL | |
63 | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE)) { | ||
62 | case IORESOURCE_IRQ_LOWLEVEL: | 64 | case IORESOURCE_IRQ_LOWLEVEL: |
63 | *triggering = ACPI_LEVEL_SENSITIVE; | 65 | *triggering = ACPI_LEVEL_SENSITIVE; |
64 | *polarity = ACPI_ACTIVE_LOW; | 66 | *polarity = ACPI_ACTIVE_LOW; |
@@ -75,7 +77,18 @@ static void decode_irq_flags(int flag, int *triggering, int *polarity) | |||
75 | *triggering = ACPI_EDGE_SENSITIVE; | 77 | *triggering = ACPI_EDGE_SENSITIVE; |
76 | *polarity = ACPI_ACTIVE_HIGH; | 78 | *polarity = ACPI_ACTIVE_HIGH; |
77 | break; | 79 | break; |
80 | default: | ||
81 | dev_err(&dev->dev, "can't encode invalid IRQ mode %#x\n", | ||
82 | flags); | ||
83 | *triggering = ACPI_EDGE_SENSITIVE; | ||
84 | *polarity = ACPI_ACTIVE_HIGH; | ||
85 | break; | ||
78 | } | 86 | } |
87 | |||
88 | if (flags & IORESOURCE_IRQ_SHAREABLE) | ||
89 | *shareable = ACPI_SHARED; | ||
90 | else | ||
91 | *shareable = ACPI_EXCLUSIVE; | ||
79 | } | 92 | } |
80 | 93 | ||
81 | static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, | 94 | static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, |
@@ -742,6 +755,9 @@ static acpi_status pnpacpi_type_resources(struct acpi_resource *res, void *data) | |||
742 | if (pnpacpi_supported_resource(res)) { | 755 | if (pnpacpi_supported_resource(res)) { |
743 | (*resource)->type = res->type; | 756 | (*resource)->type = res->type; |
744 | (*resource)->length = sizeof(struct acpi_resource); | 757 | (*resource)->length = sizeof(struct acpi_resource); |
758 | if (res->type == ACPI_RESOURCE_TYPE_IRQ) | ||
759 | (*resource)->data.irq.descriptor_length = | ||
760 | res->data.irq.descriptor_length; | ||
745 | (*resource)++; | 761 | (*resource)++; |
746 | } | 762 | } |
747 | 763 | ||
@@ -788,22 +804,21 @@ static void pnpacpi_encode_irq(struct pnp_dev *dev, | |||
788 | struct resource *p) | 804 | struct resource *p) |
789 | { | 805 | { |
790 | struct acpi_resource_irq *irq = &resource->data.irq; | 806 | struct acpi_resource_irq *irq = &resource->data.irq; |
791 | int triggering, polarity; | 807 | int triggering, polarity, shareable; |
792 | 808 | ||
793 | decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); | 809 | decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable); |
794 | irq->triggering = triggering; | 810 | irq->triggering = triggering; |
795 | irq->polarity = polarity; | 811 | irq->polarity = polarity; |
796 | if (triggering == ACPI_EDGE_SENSITIVE) | 812 | irq->sharable = shareable; |
797 | irq->sharable = ACPI_EXCLUSIVE; | ||
798 | else | ||
799 | irq->sharable = ACPI_SHARED; | ||
800 | irq->interrupt_count = 1; | 813 | irq->interrupt_count = 1; |
801 | irq->interrupts[0] = p->start; | 814 | irq->interrupts[0] = p->start; |
802 | 815 | ||
803 | dev_dbg(&dev->dev, " encode irq %d %s %s %s\n", (int) p->start, | 816 | dev_dbg(&dev->dev, " encode irq %d %s %s %s (%d-byte descriptor)\n", |
817 | (int) p->start, | ||
804 | triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge", | 818 | triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge", |
805 | polarity == ACPI_ACTIVE_LOW ? "low" : "high", | 819 | polarity == ACPI_ACTIVE_LOW ? "low" : "high", |
806 | irq->sharable == ACPI_SHARED ? "shared" : "exclusive"); | 820 | irq->sharable == ACPI_SHARED ? "shared" : "exclusive", |
821 | irq->descriptor_length); | ||
807 | } | 822 | } |
808 | 823 | ||
809 | static void pnpacpi_encode_ext_irq(struct pnp_dev *dev, | 824 | static void pnpacpi_encode_ext_irq(struct pnp_dev *dev, |
@@ -811,16 +826,13 @@ static void pnpacpi_encode_ext_irq(struct pnp_dev *dev, | |||
811 | struct resource *p) | 826 | struct resource *p) |
812 | { | 827 | { |
813 | struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq; | 828 | struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq; |
814 | int triggering, polarity; | 829 | int triggering, polarity, shareable; |
815 | 830 | ||
816 | decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); | 831 | decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable); |
817 | extended_irq->producer_consumer = ACPI_CONSUMER; | 832 | extended_irq->producer_consumer = ACPI_CONSUMER; |
818 | extended_irq->triggering = triggering; | 833 | extended_irq->triggering = triggering; |
819 | extended_irq->polarity = polarity; | 834 | extended_irq->polarity = polarity; |
820 | if (triggering == ACPI_EDGE_SENSITIVE) | 835 | extended_irq->sharable = shareable; |
821 | extended_irq->sharable = ACPI_EXCLUSIVE; | ||
822 | else | ||
823 | extended_irq->sharable = ACPI_SHARED; | ||
824 | extended_irq->interrupt_count = 1; | 836 | extended_irq->interrupt_count = 1; |
825 | extended_irq->interrupts[0] = p->start; | 837 | extended_irq->interrupts[0] = p->start; |
826 | 838 | ||
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index e2b7de4cb05e..1ff3bb585ab2 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -286,7 +286,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) | |||
286 | pci_name(pdev), i, | 286 | pci_name(pdev), i, |
287 | (unsigned long long) pci_start, | 287 | (unsigned long long) pci_start, |
288 | (unsigned long long) pci_end); | 288 | (unsigned long long) pci_end); |
289 | res->flags = 0; | 289 | res->flags |= IORESOURCE_DISABLED; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | } | 292 | } |
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c index 9c2496dbeee4..cf4e07b01d48 100644 --- a/drivers/pnp/system.c +++ b/drivers/pnp/system.c | |||
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { | 83 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { |
84 | if (res->flags & IORESOURCE_UNSET) | 84 | if (res->flags & (IORESOURCE_UNSET | IORESOURCE_DISABLED)) |
85 | continue; | 85 | continue; |
86 | 86 | ||
87 | reserve_range(dev, res->start, res->end, 0); | 87 | reserve_range(dev, res->start, res->end, 0); |
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c index 138dd76ee347..af1633eb3b70 100644 --- a/drivers/power/power_supply_core.c +++ b/drivers/power/power_supply_core.c | |||
@@ -91,15 +91,13 @@ int power_supply_register(struct device *parent, struct power_supply *psy) | |||
91 | { | 91 | { |
92 | int rc = 0; | 92 | int rc = 0; |
93 | 93 | ||
94 | psy->dev = device_create(power_supply_class, parent, 0, | 94 | psy->dev = device_create_drvdata(power_supply_class, parent, 0, |
95 | "%s", psy->name); | 95 | psy, "%s", psy->name); |
96 | if (IS_ERR(psy->dev)) { | 96 | if (IS_ERR(psy->dev)) { |
97 | rc = PTR_ERR(psy->dev); | 97 | rc = PTR_ERR(psy->dev); |
98 | goto dev_create_failed; | 98 | goto dev_create_failed; |
99 | } | 99 | } |
100 | 100 | ||
101 | dev_set_drvdata(psy->dev, psy); | ||
102 | |||
103 | INIT_WORK(&psy->changed_work, power_supply_changed_work); | 101 | INIT_WORK(&psy->changed_work, power_supply_changed_work); |
104 | 102 | ||
105 | rc = power_supply_create_attrs(psy); | 103 | rc = power_supply_create_attrs(psy); |
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index c444d6b10c58..49215da5249b 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -201,7 +201,7 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env) | |||
201 | 201 | ||
202 | dev_dbg(dev, "uevent\n"); | 202 | dev_dbg(dev, "uevent\n"); |
203 | 203 | ||
204 | if (!psy) { | 204 | if (!psy || !psy->dev) { |
205 | dev_dbg(dev, "No power supply yet\n"); | 205 | dev_dbg(dev, "No power supply yet\n"); |
206 | return ret; | 206 | return ret; |
207 | } | 207 | } |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 6cc2c0330230..4949dc4859be 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -256,6 +256,17 @@ config RTC_DRV_S35390A | |||
256 | This driver can also be built as a module. If so the module | 256 | This driver can also be built as a module. If so the module |
257 | will be called rtc-s35390a. | 257 | will be called rtc-s35390a. |
258 | 258 | ||
259 | config RTC_DRV_FM3130 | ||
260 | tristate "Ramtron FM3130" | ||
261 | help | ||
262 | If you say Y here you will get support for the | ||
263 | Ramtron FM3130 RTC chips. | ||
264 | Ramtron FM3130 is a chip with two separate devices inside, | ||
265 | RTC clock and FRAM. This driver provides only RTC functionality. | ||
266 | |||
267 | This driver can also be built as a module. If so the module | ||
268 | will be called rtc-fm3130. | ||
269 | |||
259 | endif # I2C | 270 | endif # I2C |
260 | 271 | ||
261 | comment "SPI RTC drivers" | 272 | comment "SPI RTC drivers" |
@@ -534,4 +545,12 @@ config RTC_DRV_RS5C313 | |||
534 | help | 545 | help |
535 | If you say yes here you get support for the Ricoh RS5C313 RTC chips. | 546 | If you say yes here you get support for the Ricoh RS5C313 RTC chips. |
536 | 547 | ||
548 | config RTC_DRV_PPC | ||
549 | tristate "PowerPC machine dependent RTC support" | ||
550 | depends on PPC_MERGE | ||
551 | help | ||
552 | The PowerPC kernel has machine-specific functions for accessing | ||
553 | the RTC. This exposes that functionality through the generic RTC | ||
554 | class. | ||
555 | |||
537 | endif # RTC_CLASS | 556 | endif # RTC_CLASS |
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 872f1218ff9f..b6e14d51670b 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile | |||
@@ -31,6 +31,7 @@ obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o | |||
31 | obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o | 31 | obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o |
32 | obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o | 32 | obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o |
33 | obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o | 33 | obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o |
34 | obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o | ||
34 | obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o | 35 | obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o |
35 | obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o | 36 | obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o |
36 | obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o | 37 | obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o |
@@ -41,6 +42,7 @@ obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o | |||
41 | obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o | 42 | obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o |
42 | obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o | 43 | obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o |
43 | obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o | 44 | obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o |
45 | obj-$(CONFIG_RTC_DRV_PPC) += rtc-ppc.o | ||
44 | obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o | 46 | obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o |
45 | obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o | 47 | obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o |
46 | obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o | 48 | obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o |
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index 42244f14b41c..2ef8cdfda4a7 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c | |||
@@ -94,8 +94,11 @@ static int at32_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
94 | { | 94 | { |
95 | struct rtc_at32ap700x *rtc = dev_get_drvdata(dev); | 95 | struct rtc_at32ap700x *rtc = dev_get_drvdata(dev); |
96 | 96 | ||
97 | spin_lock_irq(&rtc->lock); | ||
97 | rtc_time_to_tm(rtc->alarm_time, &alrm->time); | 98 | rtc_time_to_tm(rtc->alarm_time, &alrm->time); |
98 | alrm->pending = rtc_readl(rtc, IMR) & RTC_BIT(IMR_TOPI) ? 1 : 0; | 99 | alrm->enabled = rtc_readl(rtc, IMR) & RTC_BIT(IMR_TOPI) ? 1 : 0; |
100 | alrm->pending = rtc_readl(rtc, ISR) & RTC_BIT(ISR_TOPI) ? 1 : 0; | ||
101 | spin_unlock_irq(&rtc->lock); | ||
99 | 102 | ||
100 | return 0; | 103 | return 0; |
101 | } | 104 | } |
@@ -119,7 +122,7 @@ static int at32_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm) | |||
119 | spin_lock_irq(&rtc->lock); | 122 | spin_lock_irq(&rtc->lock); |
120 | rtc->alarm_time = alarm_unix_time; | 123 | rtc->alarm_time = alarm_unix_time; |
121 | rtc_writel(rtc, TOP, rtc->alarm_time); | 124 | rtc_writel(rtc, TOP, rtc->alarm_time); |
122 | if (alrm->pending) | 125 | if (alrm->enabled) |
123 | rtc_writel(rtc, CTRL, rtc_readl(rtc, CTRL) | 126 | rtc_writel(rtc, CTRL, rtc_readl(rtc, CTRL) |
124 | | RTC_BIT(CTRL_TOPEN)); | 127 | | RTC_BIT(CTRL_TOPEN)); |
125 | else | 128 | else |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index d060a06ce05b..d7bb9bac71df 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -905,19 +905,7 @@ static struct pnp_driver cmos_pnp_driver = { | |||
905 | .resume = cmos_pnp_resume, | 905 | .resume = cmos_pnp_resume, |
906 | }; | 906 | }; |
907 | 907 | ||
908 | static int __init cmos_init(void) | 908 | #endif /* CONFIG_PNP */ |
909 | { | ||
910 | return pnp_register_driver(&cmos_pnp_driver); | ||
911 | } | ||
912 | module_init(cmos_init); | ||
913 | |||
914 | static void __exit cmos_exit(void) | ||
915 | { | ||
916 | pnp_unregister_driver(&cmos_pnp_driver); | ||
917 | } | ||
918 | module_exit(cmos_exit); | ||
919 | |||
920 | #else /* no PNP */ | ||
921 | 909 | ||
922 | /*----------------------------------------------------------------*/ | 910 | /*----------------------------------------------------------------*/ |
923 | 911 | ||
@@ -958,20 +946,33 @@ static struct platform_driver cmos_platform_driver = { | |||
958 | 946 | ||
959 | static int __init cmos_init(void) | 947 | static int __init cmos_init(void) |
960 | { | 948 | { |
949 | #ifdef CONFIG_PNP | ||
950 | if (pnp_platform_devices) | ||
951 | return pnp_register_driver(&cmos_pnp_driver); | ||
952 | else | ||
953 | return platform_driver_probe(&cmos_platform_driver, | ||
954 | cmos_platform_probe); | ||
955 | #else | ||
961 | return platform_driver_probe(&cmos_platform_driver, | 956 | return platform_driver_probe(&cmos_platform_driver, |
962 | cmos_platform_probe); | 957 | cmos_platform_probe); |
958 | #endif /* CONFIG_PNP */ | ||
963 | } | 959 | } |
964 | module_init(cmos_init); | 960 | module_init(cmos_init); |
965 | 961 | ||
966 | static void __exit cmos_exit(void) | 962 | static void __exit cmos_exit(void) |
967 | { | 963 | { |
964 | #ifdef CONFIG_PNP | ||
965 | if (pnp_platform_devices) | ||
966 | pnp_unregister_driver(&cmos_pnp_driver); | ||
967 | else | ||
968 | platform_driver_unregister(&cmos_platform_driver); | ||
969 | #else | ||
968 | platform_driver_unregister(&cmos_platform_driver); | 970 | platform_driver_unregister(&cmos_platform_driver); |
971 | #endif /* CONFIG_PNP */ | ||
969 | } | 972 | } |
970 | module_exit(cmos_exit); | 973 | module_exit(cmos_exit); |
971 | 974 | ||
972 | 975 | ||
973 | #endif /* !PNP */ | ||
974 | |||
975 | MODULE_AUTHOR("David Brownell"); | 976 | MODULE_AUTHOR("David Brownell"); |
976 | MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs"); | 977 | MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs"); |
977 | MODULE_LICENSE("GPL"); | 978 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index fa2d2f8b3f4d..640acd20fdde 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #define DS1374_REG_TCR 0x09 /* Trickle Charge */ | 42 | #define DS1374_REG_TCR 0x09 /* Trickle Charge */ |
43 | 43 | ||
44 | static const struct i2c_device_id ds1374_id[] = { | 44 | static const struct i2c_device_id ds1374_id[] = { |
45 | { "rtc-ds1374", 0 }, | 45 | { "ds1374", 0 }, |
46 | { } | 46 | { } |
47 | }; | 47 | }; |
48 | MODULE_DEVICE_TABLE(i2c, ds1374_id); | 48 | MODULE_DEVICE_TABLE(i2c, ds1374_id); |
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c new file mode 100644 index 000000000000..11644c8fca82 --- /dev/null +++ b/drivers/rtc/rtc-fm3130.c | |||
@@ -0,0 +1,501 @@ | |||
1 | /* | ||
2 | * rtc-fm3130.c - RTC driver for Ramtron FM3130 I2C chip. | ||
3 | * | ||
4 | * Copyright (C) 2008 Sergey Lapin | ||
5 | * Based on ds1307 driver by James Chapman and David Brownell | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/rtc.h> | ||
15 | #include <linux/bcd.h> | ||
16 | |||
17 | #define FM3130_RTC_CONTROL (0x0) | ||
18 | #define FM3130_CAL_CONTROL (0x1) | ||
19 | #define FM3130_RTC_SECONDS (0x2) | ||
20 | #define FM3130_RTC_MINUTES (0x3) | ||
21 | #define FM3130_RTC_HOURS (0x4) | ||
22 | #define FM3130_RTC_DAY (0x5) | ||
23 | #define FM3130_RTC_DATE (0x6) | ||
24 | #define FM3130_RTC_MONTHS (0x7) | ||
25 | #define FM3130_RTC_YEARS (0x8) | ||
26 | |||
27 | #define FM3130_ALARM_SECONDS (0x9) | ||
28 | #define FM3130_ALARM_MINUTES (0xa) | ||
29 | #define FM3130_ALARM_HOURS (0xb) | ||
30 | #define FM3130_ALARM_DATE (0xc) | ||
31 | #define FM3130_ALARM_MONTHS (0xd) | ||
32 | #define FM3130_ALARM_WP_CONTROL (0xe) | ||
33 | |||
34 | #define FM3130_CAL_CONTROL_BIT_nOSCEN (1 << 7) /* Osciallator enabled */ | ||
35 | #define FM3130_RTC_CONTROL_BIT_LB (1 << 7) /* Low battery */ | ||
36 | #define FM3130_RTC_CONTROL_BIT_AF (1 << 6) /* Alarm flag */ | ||
37 | #define FM3130_RTC_CONTROL_BIT_CF (1 << 5) /* Century overflow */ | ||
38 | #define FM3130_RTC_CONTROL_BIT_POR (1 << 4) /* Power on reset */ | ||
39 | #define FM3130_RTC_CONTROL_BIT_AEN (1 << 3) /* Alarm enable */ | ||
40 | #define FM3130_RTC_CONTROL_BIT_CAL (1 << 2) /* Calibration mode */ | ||
41 | #define FM3130_RTC_CONTROL_BIT_WRITE (1 << 1) /* W=1 -> write mode W=0 normal */ | ||
42 | #define FM3130_RTC_CONTROL_BIT_READ (1 << 0) /* R=1 -> read mode R=0 normal */ | ||
43 | |||
44 | #define FM3130_CLOCK_REGS 7 | ||
45 | #define FM3130_ALARM_REGS 5 | ||
46 | |||
47 | struct fm3130 { | ||
48 | u8 reg_addr_time; | ||
49 | u8 reg_addr_alarm; | ||
50 | u8 regs[15]; | ||
51 | struct i2c_msg msg[4]; | ||
52 | struct i2c_client *client; | ||
53 | struct rtc_device *rtc; | ||
54 | int data_valid; | ||
55 | int alarm; | ||
56 | }; | ||
57 | static const struct i2c_device_id fm3130_id[] = { | ||
58 | { "fm3130-rtc", 0 }, | ||
59 | { } | ||
60 | }; | ||
61 | MODULE_DEVICE_TABLE(i2c, fm3130_id); | ||
62 | |||
63 | #define FM3130_MODE_NORMAL 0 | ||
64 | #define FM3130_MODE_WRITE 1 | ||
65 | #define FM3130_MODE_READ 2 | ||
66 | |||
67 | static void fm3130_rtc_mode(struct device *dev, int mode) | ||
68 | { | ||
69 | struct fm3130 *fm3130 = dev_get_drvdata(dev); | ||
70 | |||
71 | fm3130->regs[FM3130_RTC_CONTROL] = | ||
72 | i2c_smbus_read_byte_data(fm3130->client, FM3130_RTC_CONTROL); | ||
73 | switch (mode) { | ||
74 | case FM3130_MODE_NORMAL: | ||
75 | fm3130->regs[FM3130_RTC_CONTROL] &= | ||
76 | ~(FM3130_RTC_CONTROL_BIT_WRITE | | ||
77 | FM3130_RTC_CONTROL_BIT_READ); | ||
78 | break; | ||
79 | case FM3130_MODE_WRITE: | ||
80 | fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_WRITE; | ||
81 | break; | ||
82 | case FM3130_MODE_READ: | ||
83 | fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_READ; | ||
84 | break; | ||
85 | default: | ||
86 | dev_dbg(dev, "invalid mode %d\n", mode); | ||
87 | break; | ||
88 | } | ||
89 | /* Checking for alarm */ | ||
90 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) { | ||
91 | fm3130->alarm = 1; | ||
92 | fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF; | ||
93 | } | ||
94 | i2c_smbus_write_byte_data(fm3130->client, | ||
95 | FM3130_RTC_CONTROL, fm3130->regs[FM3130_RTC_CONTROL]); | ||
96 | } | ||
97 | |||
98 | static int fm3130_get_time(struct device *dev, struct rtc_time *t) | ||
99 | { | ||
100 | struct fm3130 *fm3130 = dev_get_drvdata(dev); | ||
101 | int tmp; | ||
102 | |||
103 | if (!fm3130->data_valid) { | ||
104 | /* We have invalid data in RTC, probably due | ||
105 | to battery faults or other problems. Return EIO | ||
106 | for now, it will allow us to set data later insted | ||
107 | of error during probing which disables device */ | ||
108 | return -EIO; | ||
109 | } | ||
110 | fm3130_rtc_mode(dev, FM3130_MODE_READ); | ||
111 | |||
112 | /* read the RTC date and time registers all at once */ | ||
113 | tmp = i2c_transfer(to_i2c_adapter(fm3130->client->dev.parent), | ||
114 | fm3130->msg, 2); | ||
115 | if (tmp != 2) { | ||
116 | dev_err(dev, "%s error %d\n", "read", tmp); | ||
117 | return -EIO; | ||
118 | } | ||
119 | |||
120 | fm3130_rtc_mode(dev, FM3130_MODE_NORMAL); | ||
121 | |||
122 | dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x" | ||
123 | "%02x %02x %02x %02x %02x %02x %02x\n", | ||
124 | "read", | ||
125 | fm3130->regs[0], fm3130->regs[1], | ||
126 | fm3130->regs[2], fm3130->regs[3], | ||
127 | fm3130->regs[4], fm3130->regs[5], | ||
128 | fm3130->regs[6], fm3130->regs[7], | ||
129 | fm3130->regs[8], fm3130->regs[9], | ||
130 | fm3130->regs[0xa], fm3130->regs[0xb], | ||
131 | fm3130->regs[0xc], fm3130->regs[0xd], | ||
132 | fm3130->regs[0xe]); | ||
133 | |||
134 | t->tm_sec = BCD2BIN(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f); | ||
135 | t->tm_min = BCD2BIN(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); | ||
136 | tmp = fm3130->regs[FM3130_RTC_HOURS] & 0x3f; | ||
137 | t->tm_hour = BCD2BIN(tmp); | ||
138 | t->tm_wday = BCD2BIN(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1; | ||
139 | t->tm_mday = BCD2BIN(fm3130->regs[FM3130_RTC_DATE] & 0x3f); | ||
140 | tmp = fm3130->regs[FM3130_RTC_MONTHS] & 0x1f; | ||
141 | t->tm_mon = BCD2BIN(tmp) - 1; | ||
142 | |||
143 | /* assume 20YY not 19YY, and ignore CF bit */ | ||
144 | t->tm_year = BCD2BIN(fm3130->regs[FM3130_RTC_YEARS]) + 100; | ||
145 | |||
146 | dev_dbg(dev, "%s secs=%d, mins=%d, " | ||
147 | "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", | ||
148 | "read", t->tm_sec, t->tm_min, | ||
149 | t->tm_hour, t->tm_mday, | ||
150 | t->tm_mon, t->tm_year, t->tm_wday); | ||
151 | |||
152 | /* initial clock setting can be undefined */ | ||
153 | return rtc_valid_tm(t); | ||
154 | } | ||
155 | |||
156 | |||
157 | static int fm3130_set_time(struct device *dev, struct rtc_time *t) | ||
158 | { | ||
159 | struct fm3130 *fm3130 = dev_get_drvdata(dev); | ||
160 | int tmp, i; | ||
161 | u8 *buf = fm3130->regs; | ||
162 | |||
163 | dev_dbg(dev, "%s secs=%d, mins=%d, " | ||
164 | "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", | ||
165 | "write", t->tm_sec, t->tm_min, | ||
166 | t->tm_hour, t->tm_mday, | ||
167 | t->tm_mon, t->tm_year, t->tm_wday); | ||
168 | |||
169 | /* first register addr */ | ||
170 | buf[FM3130_RTC_SECONDS] = BIN2BCD(t->tm_sec); | ||
171 | buf[FM3130_RTC_MINUTES] = BIN2BCD(t->tm_min); | ||
172 | buf[FM3130_RTC_HOURS] = BIN2BCD(t->tm_hour); | ||
173 | buf[FM3130_RTC_DAY] = BIN2BCD(t->tm_wday + 1); | ||
174 | buf[FM3130_RTC_DATE] = BIN2BCD(t->tm_mday); | ||
175 | buf[FM3130_RTC_MONTHS] = BIN2BCD(t->tm_mon + 1); | ||
176 | |||
177 | /* assume 20YY not 19YY */ | ||
178 | tmp = t->tm_year - 100; | ||
179 | buf[FM3130_RTC_YEARS] = BIN2BCD(tmp); | ||
180 | |||
181 | dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x" | ||
182 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
183 | "write", buf[0], buf[1], buf[2], buf[3], | ||
184 | buf[4], buf[5], buf[6], buf[7], | ||
185 | buf[8], buf[9], buf[0xa], buf[0xb], | ||
186 | buf[0xc], buf[0xd], buf[0xe]); | ||
187 | |||
188 | fm3130_rtc_mode(dev, FM3130_MODE_WRITE); | ||
189 | |||
190 | /* Writing time registers, we don't support multibyte transfers */ | ||
191 | for (i = 0; i < FM3130_CLOCK_REGS; i++) { | ||
192 | i2c_smbus_write_byte_data(fm3130->client, | ||
193 | FM3130_RTC_SECONDS + i, | ||
194 | fm3130->regs[FM3130_RTC_SECONDS + i]); | ||
195 | } | ||
196 | |||
197 | fm3130_rtc_mode(dev, FM3130_MODE_NORMAL); | ||
198 | |||
199 | /* We assume here that data are valid once written */ | ||
200 | if (!fm3130->data_valid) | ||
201 | fm3130->data_valid = 1; | ||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | static int fm3130_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
206 | { | ||
207 | struct fm3130 *fm3130 = dev_get_drvdata(dev); | ||
208 | int tmp; | ||
209 | struct rtc_time *tm = &alrm->time; | ||
210 | /* read the RTC alarm registers all at once */ | ||
211 | tmp = i2c_transfer(to_i2c_adapter(fm3130->client->dev.parent), | ||
212 | &fm3130->msg[2], 2); | ||
213 | if (tmp != 2) { | ||
214 | dev_err(dev, "%s error %d\n", "read", tmp); | ||
215 | return -EIO; | ||
216 | } | ||
217 | dev_dbg(dev, "alarm read %02x %02x %02x %02x %02x\n", | ||
218 | fm3130->regs[FM3130_ALARM_SECONDS], | ||
219 | fm3130->regs[FM3130_ALARM_MINUTES], | ||
220 | fm3130->regs[FM3130_ALARM_HOURS], | ||
221 | fm3130->regs[FM3130_ALARM_DATE], | ||
222 | fm3130->regs[FM3130_ALARM_MONTHS]); | ||
223 | |||
224 | |||
225 | tm->tm_sec = BCD2BIN(fm3130->regs[FM3130_ALARM_SECONDS] & 0x7F); | ||
226 | tm->tm_min = BCD2BIN(fm3130->regs[FM3130_ALARM_MINUTES] & 0x7F); | ||
227 | tm->tm_hour = BCD2BIN(fm3130->regs[FM3130_ALARM_HOURS] & 0x3F); | ||
228 | tm->tm_mday = BCD2BIN(fm3130->regs[FM3130_ALARM_DATE] & 0x3F); | ||
229 | tm->tm_mon = BCD2BIN(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F); | ||
230 | if (tm->tm_mon > 0) | ||
231 | tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ | ||
232 | dev_dbg(dev, "%s secs=%d, mins=%d, " | ||
233 | "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", | ||
234 | "read alarm", tm->tm_sec, tm->tm_min, | ||
235 | tm->tm_hour, tm->tm_mday, | ||
236 | tm->tm_mon, tm->tm_year, tm->tm_wday); | ||
237 | |||
238 | return 0; | ||
239 | } | ||
240 | |||
241 | static int fm3130_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) | ||
242 | { | ||
243 | struct fm3130 *fm3130 = dev_get_drvdata(dev); | ||
244 | struct rtc_time *tm = &alrm->time; | ||
245 | int i; | ||
246 | |||
247 | dev_dbg(dev, "%s secs=%d, mins=%d, " | ||
248 | "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n", | ||
249 | "write alarm", tm->tm_sec, tm->tm_min, | ||
250 | tm->tm_hour, tm->tm_mday, | ||
251 | tm->tm_mon, tm->tm_year, tm->tm_wday); | ||
252 | |||
253 | if (tm->tm_sec != -1) | ||
254 | fm3130->regs[FM3130_ALARM_SECONDS] = | ||
255 | BIN2BCD(tm->tm_sec) | 0x80; | ||
256 | |||
257 | if (tm->tm_min != -1) | ||
258 | fm3130->regs[FM3130_ALARM_MINUTES] = | ||
259 | BIN2BCD(tm->tm_min) | 0x80; | ||
260 | |||
261 | if (tm->tm_hour != -1) | ||
262 | fm3130->regs[FM3130_ALARM_HOURS] = | ||
263 | BIN2BCD(tm->tm_hour) | 0x80; | ||
264 | |||
265 | if (tm->tm_mday != -1) | ||
266 | fm3130->regs[FM3130_ALARM_DATE] = | ||
267 | BIN2BCD(tm->tm_mday) | 0x80; | ||
268 | |||
269 | if (tm->tm_mon != -1) | ||
270 | fm3130->regs[FM3130_ALARM_MONTHS] = | ||
271 | BIN2BCD(tm->tm_mon + 1) | 0x80; | ||
272 | |||
273 | dev_dbg(dev, "alarm write %02x %02x %02x %02x %02x\n", | ||
274 | fm3130->regs[FM3130_ALARM_SECONDS], | ||
275 | fm3130->regs[FM3130_ALARM_MINUTES], | ||
276 | fm3130->regs[FM3130_ALARM_HOURS], | ||
277 | fm3130->regs[FM3130_ALARM_DATE], | ||
278 | fm3130->regs[FM3130_ALARM_MONTHS]); | ||
279 | /* Writing time registers, we don't support multibyte transfers */ | ||
280 | for (i = 0; i < FM3130_ALARM_REGS; i++) { | ||
281 | i2c_smbus_write_byte_data(fm3130->client, | ||
282 | FM3130_ALARM_SECONDS + i, | ||
283 | fm3130->regs[FM3130_ALARM_SECONDS + i]); | ||
284 | } | ||
285 | fm3130->regs[FM3130_RTC_CONTROL] = | ||
286 | i2c_smbus_read_byte_data(fm3130->client, FM3130_RTC_CONTROL); | ||
287 | /* Checking for alarm */ | ||
288 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) { | ||
289 | fm3130->alarm = 1; | ||
290 | fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF; | ||
291 | } | ||
292 | if (alrm->enabled) { | ||
293 | i2c_smbus_write_byte_data(fm3130->client, FM3130_RTC_CONTROL, | ||
294 | (fm3130->regs[FM3130_RTC_CONTROL] & | ||
295 | ~(FM3130_RTC_CONTROL_BIT_CAL)) | | ||
296 | FM3130_RTC_CONTROL_BIT_AEN); | ||
297 | } else { | ||
298 | i2c_smbus_write_byte_data(fm3130->client, FM3130_RTC_CONTROL, | ||
299 | fm3130->regs[FM3130_RTC_CONTROL] & | ||
300 | ~(FM3130_RTC_CONTROL_BIT_AEN)); | ||
301 | } | ||
302 | return 0; | ||
303 | } | ||
304 | |||
305 | static const struct rtc_class_ops fm3130_rtc_ops = { | ||
306 | .read_time = fm3130_get_time, | ||
307 | .set_time = fm3130_set_time, | ||
308 | .read_alarm = fm3130_read_alarm, | ||
309 | .set_alarm = fm3130_set_alarm, | ||
310 | }; | ||
311 | |||
312 | static struct i2c_driver fm3130_driver; | ||
313 | |||
314 | static int __devinit fm3130_probe(struct i2c_client *client, | ||
315 | const struct i2c_device_id *id) | ||
316 | { | ||
317 | struct fm3130 *fm3130; | ||
318 | int err = -ENODEV; | ||
319 | int tmp; | ||
320 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | ||
321 | |||
322 | if (!i2c_check_functionality(adapter, | ||
323 | I2C_FUNC_I2C | I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) | ||
324 | return -EIO; | ||
325 | |||
326 | fm3130 = kzalloc(sizeof(struct fm3130), GFP_KERNEL); | ||
327 | |||
328 | if (!fm3130) | ||
329 | return -ENOMEM; | ||
330 | |||
331 | fm3130->client = client; | ||
332 | i2c_set_clientdata(client, fm3130); | ||
333 | fm3130->reg_addr_time = FM3130_RTC_SECONDS; | ||
334 | fm3130->reg_addr_alarm = FM3130_ALARM_SECONDS; | ||
335 | |||
336 | /* Messages to read time */ | ||
337 | fm3130->msg[0].addr = client->addr; | ||
338 | fm3130->msg[0].flags = 0; | ||
339 | fm3130->msg[0].len = 1; | ||
340 | fm3130->msg[0].buf = &fm3130->reg_addr_time; | ||
341 | |||
342 | fm3130->msg[1].addr = client->addr; | ||
343 | fm3130->msg[1].flags = I2C_M_RD; | ||
344 | fm3130->msg[1].len = FM3130_CLOCK_REGS; | ||
345 | fm3130->msg[1].buf = &fm3130->regs[FM3130_RTC_SECONDS]; | ||
346 | |||
347 | /* Messages to read alarm */ | ||
348 | fm3130->msg[2].addr = client->addr; | ||
349 | fm3130->msg[2].flags = 0; | ||
350 | fm3130->msg[2].len = 1; | ||
351 | fm3130->msg[2].buf = &fm3130->reg_addr_alarm; | ||
352 | |||
353 | fm3130->msg[3].addr = client->addr; | ||
354 | fm3130->msg[3].flags = I2C_M_RD; | ||
355 | fm3130->msg[3].len = FM3130_ALARM_REGS; | ||
356 | fm3130->msg[3].buf = &fm3130->regs[FM3130_ALARM_SECONDS]; | ||
357 | |||
358 | fm3130->data_valid = 0; | ||
359 | |||
360 | tmp = i2c_transfer(adapter, fm3130->msg, 4); | ||
361 | if (tmp != 4) { | ||
362 | pr_debug("read error %d\n", tmp); | ||
363 | err = -EIO; | ||
364 | goto exit_free; | ||
365 | } | ||
366 | |||
367 | fm3130->regs[FM3130_RTC_CONTROL] = | ||
368 | i2c_smbus_read_byte_data(client, FM3130_RTC_CONTROL); | ||
369 | fm3130->regs[FM3130_CAL_CONTROL] = | ||
370 | i2c_smbus_read_byte_data(client, FM3130_CAL_CONTROL); | ||
371 | |||
372 | /* Checking for alarm */ | ||
373 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) { | ||
374 | fm3130->alarm = 1; | ||
375 | fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF; | ||
376 | } | ||
377 | |||
378 | /* Disabling calibration mode */ | ||
379 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL) | ||
380 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, | ||
381 | fm3130->regs[FM3130_RTC_CONTROL] & | ||
382 | ~(FM3130_RTC_CONTROL_BIT_CAL)); | ||
383 | dev_warn(&client->dev, "Disabling calibration mode!\n"); | ||
384 | |||
385 | /* Disabling read and write modes */ | ||
386 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE || | ||
387 | fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ) | ||
388 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, | ||
389 | fm3130->regs[FM3130_RTC_CONTROL] & | ||
390 | ~(FM3130_RTC_CONTROL_BIT_READ | | ||
391 | FM3130_RTC_CONTROL_BIT_WRITE)); | ||
392 | dev_warn(&client->dev, "Disabling READ or WRITE mode!\n"); | ||
393 | |||
394 | /* oscillator off? turn it on, so clock can tick. */ | ||
395 | if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN) | ||
396 | i2c_smbus_write_byte_data(client, FM3130_CAL_CONTROL, | ||
397 | fm3130->regs[FM3130_CAL_CONTROL] & | ||
398 | ~(FM3130_CAL_CONTROL_BIT_nOSCEN)); | ||
399 | |||
400 | /* oscillator fault? clear flag, and warn */ | ||
401 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_LB) | ||
402 | dev_warn(&client->dev, "Low battery!\n"); | ||
403 | |||
404 | /* oscillator fault? clear flag, and warn */ | ||
405 | if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_POR) { | ||
406 | i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL, | ||
407 | fm3130->regs[FM3130_RTC_CONTROL] & | ||
408 | ~FM3130_RTC_CONTROL_BIT_POR); | ||
409 | dev_warn(&client->dev, "SET TIME!\n"); | ||
410 | } | ||
411 | /* ACS is controlled by alarm */ | ||
412 | i2c_smbus_write_byte_data(client, FM3130_ALARM_WP_CONTROL, 0x80); | ||
413 | |||
414 | /* TODO */ | ||
415 | /* TODO need to sanity check alarm */ | ||
416 | tmp = fm3130->regs[FM3130_RTC_SECONDS]; | ||
417 | tmp = BCD2BIN(tmp & 0x7f); | ||
418 | if (tmp > 60) | ||
419 | goto exit_bad; | ||
420 | tmp = BCD2BIN(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f); | ||
421 | if (tmp > 60) | ||
422 | goto exit_bad; | ||
423 | |||
424 | tmp = BCD2BIN(fm3130->regs[FM3130_RTC_DATE] & 0x3f); | ||
425 | if (tmp == 0 || tmp > 31) | ||
426 | goto exit_bad; | ||
427 | |||
428 | tmp = BCD2BIN(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f); | ||
429 | if (tmp == 0 || tmp > 12) | ||
430 | goto exit_bad; | ||
431 | |||
432 | tmp = fm3130->regs[FM3130_RTC_HOURS]; | ||
433 | |||
434 | fm3130->data_valid = 1; | ||
435 | |||
436 | exit_bad: | ||
437 | if (!fm3130->data_valid) | ||
438 | dev_dbg(&client->dev, | ||
439 | "%s: %02x %02x %02x %02x %02x %02x %02x %02x" | ||
440 | "%02x %02x %02x %02x %02x %02x %02x\n", | ||
441 | "bogus registers", | ||
442 | fm3130->regs[0], fm3130->regs[1], | ||
443 | fm3130->regs[2], fm3130->regs[3], | ||
444 | fm3130->regs[4], fm3130->regs[5], | ||
445 | fm3130->regs[6], fm3130->regs[7], | ||
446 | fm3130->regs[8], fm3130->regs[9], | ||
447 | fm3130->regs[0xa], fm3130->regs[0xb], | ||
448 | fm3130->regs[0xc], fm3130->regs[0xd], | ||
449 | fm3130->regs[0xe]); | ||
450 | |||
451 | /* We won't bail out here because we just got invalid data. | ||
452 | Time setting from u-boot doesn't work anyway */ | ||
453 | fm3130->rtc = rtc_device_register(client->name, &client->dev, | ||
454 | &fm3130_rtc_ops, THIS_MODULE); | ||
455 | if (IS_ERR(fm3130->rtc)) { | ||
456 | err = PTR_ERR(fm3130->rtc); | ||
457 | dev_err(&client->dev, | ||
458 | "unable to register the class device\n"); | ||
459 | goto exit_free; | ||
460 | } | ||
461 | return 0; | ||
462 | exit_free: | ||
463 | kfree(fm3130); | ||
464 | return err; | ||
465 | } | ||
466 | |||
467 | static int __devexit fm3130_remove(struct i2c_client *client) | ||
468 | { | ||
469 | struct fm3130 *fm3130 = i2c_get_clientdata(client); | ||
470 | |||
471 | rtc_device_unregister(fm3130->rtc); | ||
472 | kfree(fm3130); | ||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | static struct i2c_driver fm3130_driver = { | ||
477 | .driver = { | ||
478 | .name = "rtc-fm3130", | ||
479 | .owner = THIS_MODULE, | ||
480 | }, | ||
481 | .probe = fm3130_probe, | ||
482 | .remove = __devexit_p(fm3130_remove), | ||
483 | .id_table = fm3130_id, | ||
484 | }; | ||
485 | |||
486 | static int __init fm3130_init(void) | ||
487 | { | ||
488 | return i2c_add_driver(&fm3130_driver); | ||
489 | } | ||
490 | module_init(fm3130_init); | ||
491 | |||
492 | static void __exit fm3130_exit(void) | ||
493 | { | ||
494 | i2c_del_driver(&fm3130_driver); | ||
495 | } | ||
496 | module_exit(fm3130_exit); | ||
497 | |||
498 | MODULE_DESCRIPTION("RTC driver for FM3130"); | ||
499 | MODULE_AUTHOR("Sergey Lapin <slapin@ossfans.org>"); | ||
500 | MODULE_LICENSE("GPL"); | ||
501 | |||
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c new file mode 100644 index 000000000000..c8e97e25ef7e --- /dev/null +++ b/drivers/rtc/rtc-ppc.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * RTC driver for ppc_md RTC functions | ||
3 | * | ||
4 | * © 2007 Red Hat, Inc. | ||
5 | * | ||
6 | * Author: David Woodhouse <dwmw2@infradead.org> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | |||
14 | #include <linux/module.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/rtc.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <asm/machdep.h> | ||
19 | |||
20 | static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm) | ||
21 | { | ||
22 | ppc_md.get_rtc_time(tm); | ||
23 | return 0; | ||
24 | } | ||
25 | |||
26 | static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm) | ||
27 | { | ||
28 | return ppc_md.set_rtc_time(tm); | ||
29 | } | ||
30 | |||
31 | static const struct rtc_class_ops ppc_rtc_ops = { | ||
32 | .set_time = ppc_rtc_set_time, | ||
33 | .read_time = ppc_rtc_read_time, | ||
34 | }; | ||
35 | |||
36 | static struct rtc_device *rtc; | ||
37 | static struct platform_device *ppc_rtc_pdev; | ||
38 | |||
39 | static int __init ppc_rtc_init(void) | ||
40 | { | ||
41 | if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time) | ||
42 | return -ENODEV; | ||
43 | |||
44 | ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0); | ||
45 | if (IS_ERR(ppc_rtc_pdev)) | ||
46 | return PTR_ERR(ppc_rtc_pdev); | ||
47 | |||
48 | rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev, | ||
49 | &ppc_rtc_ops, THIS_MODULE); | ||
50 | if (IS_ERR(rtc)) { | ||
51 | platform_device_unregister(ppc_rtc_pdev); | ||
52 | return PTR_ERR(rtc); | ||
53 | } | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | static void __exit ppc_rtc_exit(void) | ||
59 | { | ||
60 | rtc_device_unregister(rtc); | ||
61 | platform_device_unregister(ppc_rtc_pdev); | ||
62 | } | ||
63 | |||
64 | module_init(ppc_rtc_init); | ||
65 | module_exit(ppc_rtc_exit); | ||
66 | |||
67 | MODULE_LICENSE("GPL"); | ||
68 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); | ||
69 | MODULE_DESCRIPTION("Generic RTC class driver for PowerPC"); | ||
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 8ba3f135da22..1a4025683362 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -63,6 +63,7 @@ static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); | |||
63 | */ | 63 | */ |
64 | static wait_queue_head_t dasd_init_waitq; | 64 | static wait_queue_head_t dasd_init_waitq; |
65 | static wait_queue_head_t dasd_flush_wq; | 65 | static wait_queue_head_t dasd_flush_wq; |
66 | static wait_queue_head_t generic_waitq; | ||
66 | 67 | ||
67 | /* | 68 | /* |
68 | * Allocate memory for a new device structure. | 69 | * Allocate memory for a new device structure. |
@@ -1151,11 +1152,15 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1151 | struct list_head *l, *n; | 1152 | struct list_head *l, *n; |
1152 | struct dasd_ccw_req *cqr; | 1153 | struct dasd_ccw_req *cqr; |
1153 | struct dasd_block *block; | 1154 | struct dasd_block *block; |
1155 | void (*callback)(struct dasd_ccw_req *, void *data); | ||
1156 | void *callback_data; | ||
1154 | 1157 | ||
1155 | list_for_each_safe(l, n, final_queue) { | 1158 | list_for_each_safe(l, n, final_queue) { |
1156 | cqr = list_entry(l, struct dasd_ccw_req, devlist); | 1159 | cqr = list_entry(l, struct dasd_ccw_req, devlist); |
1157 | list_del_init(&cqr->devlist); | 1160 | list_del_init(&cqr->devlist); |
1158 | block = cqr->block; | 1161 | block = cqr->block; |
1162 | callback = cqr->callback; | ||
1163 | callback_data = cqr->callback_data; | ||
1159 | if (block) | 1164 | if (block) |
1160 | spin_lock_bh(&block->queue_lock); | 1165 | spin_lock_bh(&block->queue_lock); |
1161 | switch (cqr->status) { | 1166 | switch (cqr->status) { |
@@ -1176,7 +1181,7 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1176 | BUG(); | 1181 | BUG(); |
1177 | } | 1182 | } |
1178 | if (cqr->callback != NULL) | 1183 | if (cqr->callback != NULL) |
1179 | (cqr->callback)(cqr, cqr->callback_data); | 1184 | (callback)(cqr, callback_data); |
1180 | if (block) | 1185 | if (block) |
1181 | spin_unlock_bh(&block->queue_lock); | 1186 | spin_unlock_bh(&block->queue_lock); |
1182 | } | 1187 | } |
@@ -1406,17 +1411,15 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | |||
1406 | */ | 1411 | */ |
1407 | int dasd_sleep_on(struct dasd_ccw_req *cqr) | 1412 | int dasd_sleep_on(struct dasd_ccw_req *cqr) |
1408 | { | 1413 | { |
1409 | wait_queue_head_t wait_q; | ||
1410 | struct dasd_device *device; | 1414 | struct dasd_device *device; |
1411 | int rc; | 1415 | int rc; |
1412 | 1416 | ||
1413 | device = cqr->startdev; | 1417 | device = cqr->startdev; |
1414 | 1418 | ||
1415 | init_waitqueue_head (&wait_q); | ||
1416 | cqr->callback = dasd_wakeup_cb; | 1419 | cqr->callback = dasd_wakeup_cb; |
1417 | cqr->callback_data = (void *) &wait_q; | 1420 | cqr->callback_data = (void *) &generic_waitq; |
1418 | dasd_add_request_tail(cqr); | 1421 | dasd_add_request_tail(cqr); |
1419 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1422 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1420 | 1423 | ||
1421 | /* Request status is either done or failed. */ | 1424 | /* Request status is either done or failed. */ |
1422 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1425 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
@@ -1429,20 +1432,18 @@ int dasd_sleep_on(struct dasd_ccw_req *cqr) | |||
1429 | */ | 1432 | */ |
1430 | int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) | 1433 | int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) |
1431 | { | 1434 | { |
1432 | wait_queue_head_t wait_q; | ||
1433 | struct dasd_device *device; | 1435 | struct dasd_device *device; |
1434 | int rc; | 1436 | int rc; |
1435 | 1437 | ||
1436 | device = cqr->startdev; | 1438 | device = cqr->startdev; |
1437 | init_waitqueue_head (&wait_q); | ||
1438 | cqr->callback = dasd_wakeup_cb; | 1439 | cqr->callback = dasd_wakeup_cb; |
1439 | cqr->callback_data = (void *) &wait_q; | 1440 | cqr->callback_data = (void *) &generic_waitq; |
1440 | dasd_add_request_tail(cqr); | 1441 | dasd_add_request_tail(cqr); |
1441 | rc = wait_event_interruptible(wait_q, _wait_for_wakeup(cqr)); | 1442 | rc = wait_event_interruptible(generic_waitq, _wait_for_wakeup(cqr)); |
1442 | if (rc == -ERESTARTSYS) { | 1443 | if (rc == -ERESTARTSYS) { |
1443 | dasd_cancel_req(cqr); | 1444 | dasd_cancel_req(cqr); |
1444 | /* wait (non-interruptible) for final status */ | 1445 | /* wait (non-interruptible) for final status */ |
1445 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1446 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1446 | } | 1447 | } |
1447 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1448 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
1448 | return rc; | 1449 | return rc; |
@@ -1466,7 +1467,6 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device) | |||
1466 | 1467 | ||
1467 | int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | 1468 | int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) |
1468 | { | 1469 | { |
1469 | wait_queue_head_t wait_q; | ||
1470 | struct dasd_device *device; | 1470 | struct dasd_device *device; |
1471 | int rc; | 1471 | int rc; |
1472 | 1472 | ||
@@ -1478,9 +1478,8 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1478 | return rc; | 1478 | return rc; |
1479 | } | 1479 | } |
1480 | 1480 | ||
1481 | init_waitqueue_head (&wait_q); | ||
1482 | cqr->callback = dasd_wakeup_cb; | 1481 | cqr->callback = dasd_wakeup_cb; |
1483 | cqr->callback_data = (void *) &wait_q; | 1482 | cqr->callback_data = (void *) &generic_waitq; |
1484 | cqr->status = DASD_CQR_QUEUED; | 1483 | cqr->status = DASD_CQR_QUEUED; |
1485 | list_add(&cqr->devlist, &device->ccw_queue); | 1484 | list_add(&cqr->devlist, &device->ccw_queue); |
1486 | 1485 | ||
@@ -1489,7 +1488,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1489 | 1488 | ||
1490 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1489 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1491 | 1490 | ||
1492 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1491 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1493 | 1492 | ||
1494 | /* Request status is either done or failed. */ | 1493 | /* Request status is either done or failed. */ |
1495 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1494 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
@@ -2430,6 +2429,7 @@ static int __init dasd_init(void) | |||
2430 | 2429 | ||
2431 | init_waitqueue_head(&dasd_init_waitq); | 2430 | init_waitqueue_head(&dasd_init_waitq); |
2432 | init_waitqueue_head(&dasd_flush_wq); | 2431 | init_waitqueue_head(&dasd_flush_wq); |
2432 | init_waitqueue_head(&generic_waitq); | ||
2433 | 2433 | ||
2434 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ | 2434 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ |
2435 | dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); | 2435 | dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 0d98f1ff2edd..848ef7e8523f 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -549,7 +549,6 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, | |||
549 | struct raw3270_request *rq) | 549 | struct raw3270_request *rq) |
550 | { | 550 | { |
551 | unsigned long flags; | 551 | unsigned long flags; |
552 | wait_queue_head_t wq; | ||
553 | int rc; | 552 | int rc; |
554 | 553 | ||
555 | #ifdef CONFIG_TN3270_CONSOLE | 554 | #ifdef CONFIG_TN3270_CONSOLE |
@@ -566,20 +565,20 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, | |||
566 | return rq->rc; | 565 | return rq->rc; |
567 | } | 566 | } |
568 | #endif | 567 | #endif |
569 | init_waitqueue_head(&wq); | ||
570 | rq->callback = raw3270_wake_init; | 568 | rq->callback = raw3270_wake_init; |
571 | rq->callback_data = &wq; | 569 | rq->callback_data = &raw3270_wait_queue; |
572 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); | 570 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); |
573 | rc = __raw3270_start(rp, view, rq); | 571 | rc = __raw3270_start(rp, view, rq); |
574 | spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); | 572 | spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); |
575 | if (rc) | 573 | if (rc) |
576 | return rc; | 574 | return rc; |
577 | /* Now wait for the completion. */ | 575 | /* Now wait for the completion. */ |
578 | rc = wait_event_interruptible(wq, raw3270_request_final(rq)); | 576 | rc = wait_event_interruptible(raw3270_wait_queue, |
577 | raw3270_request_final(rq)); | ||
579 | if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ | 578 | if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ |
580 | raw3270_halt_io(view->dev, rq); | 579 | raw3270_halt_io(view->dev, rq); |
581 | /* No wait for the halt to complete. */ | 580 | /* No wait for the halt to complete. */ |
582 | wait_event(wq, raw3270_request_final(rq)); | 581 | wait_event(raw3270_wait_queue, raw3270_request_final(rq)); |
583 | return -ERESTARTSYS; | 582 | return -ERESTARTSYS; |
584 | } | 583 | } |
585 | return rq->rc; | 584 | return rq->rc; |
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c index 9e784d5f7f57..ad05a87bc480 100644 --- a/drivers/s390/char/sclp_config.c +++ b/drivers/s390/char/sclp_config.c | |||
@@ -40,7 +40,7 @@ static void sclp_cpu_capability_notify(struct work_struct *work) | |||
40 | put_online_cpus(); | 40 | put_online_cpus(); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void sclp_cpu_change_notify(struct work_struct *work) | 43 | static void __ref sclp_cpu_change_notify(struct work_struct *work) |
44 | { | 44 | { |
45 | smp_rescan_cpus(); | 45 | smp_rescan_cpus(); |
46 | } | 46 | } |
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 35707c04e613..3e577f655b18 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c | |||
@@ -71,9 +71,6 @@ static struct list_head sclp_vt220_outqueue; | |||
71 | /* Number of requests in outqueue */ | 71 | /* Number of requests in outqueue */ |
72 | static int sclp_vt220_outqueue_count; | 72 | static int sclp_vt220_outqueue_count; |
73 | 73 | ||
74 | /* Wait queue used to delay write requests while we've run out of buffers */ | ||
75 | static wait_queue_head_t sclp_vt220_waitq; | ||
76 | |||
77 | /* Timer used for delaying write requests to merge subsequent messages into | 74 | /* Timer used for delaying write requests to merge subsequent messages into |
78 | * a single buffer */ | 75 | * a single buffer */ |
79 | static struct timer_list sclp_vt220_timer; | 76 | static struct timer_list sclp_vt220_timer; |
@@ -133,7 +130,6 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request) | |||
133 | } while (request && __sclp_vt220_emit(request)); | 130 | } while (request && __sclp_vt220_emit(request)); |
134 | if (request == NULL && sclp_vt220_flush_later) | 131 | if (request == NULL && sclp_vt220_flush_later) |
135 | sclp_vt220_emit_current(); | 132 | sclp_vt220_emit_current(); |
136 | wake_up(&sclp_vt220_waitq); | ||
137 | /* Check if the tty needs a wake up call */ | 133 | /* Check if the tty needs a wake up call */ |
138 | if (sclp_vt220_tty != NULL) { | 134 | if (sclp_vt220_tty != NULL) { |
139 | tty_wakeup(sclp_vt220_tty); | 135 | tty_wakeup(sclp_vt220_tty); |
@@ -383,7 +379,7 @@ sclp_vt220_timeout(unsigned long data) | |||
383 | */ | 379 | */ |
384 | static int | 380 | static int |
385 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | 381 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, |
386 | int convertlf, int may_schedule) | 382 | int convertlf, int may_fail) |
387 | { | 383 | { |
388 | unsigned long flags; | 384 | unsigned long flags; |
389 | void *page; | 385 | void *page; |
@@ -395,15 +391,14 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
395 | overall_written = 0; | 391 | overall_written = 0; |
396 | spin_lock_irqsave(&sclp_vt220_lock, flags); | 392 | spin_lock_irqsave(&sclp_vt220_lock, flags); |
397 | do { | 393 | do { |
398 | /* Create a sclp output buffer if none exists yet */ | 394 | /* Create an sclp output buffer if none exists yet */ |
399 | if (sclp_vt220_current_request == NULL) { | 395 | if (sclp_vt220_current_request == NULL) { |
400 | while (list_empty(&sclp_vt220_empty)) { | 396 | while (list_empty(&sclp_vt220_empty)) { |
401 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); | 397 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); |
402 | if (in_interrupt() || !may_schedule) | 398 | if (may_fail) |
403 | sclp_sync_wait(); | 399 | goto out; |
404 | else | 400 | else |
405 | wait_event(sclp_vt220_waitq, | 401 | sclp_sync_wait(); |
406 | !list_empty(&sclp_vt220_empty)); | ||
407 | spin_lock_irqsave(&sclp_vt220_lock, flags); | 402 | spin_lock_irqsave(&sclp_vt220_lock, flags); |
408 | } | 403 | } |
409 | page = (void *) sclp_vt220_empty.next; | 404 | page = (void *) sclp_vt220_empty.next; |
@@ -437,6 +432,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
437 | add_timer(&sclp_vt220_timer); | 432 | add_timer(&sclp_vt220_timer); |
438 | } | 433 | } |
439 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); | 434 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); |
435 | out: | ||
440 | return overall_written; | 436 | return overall_written; |
441 | } | 437 | } |
442 | 438 | ||
@@ -520,19 +516,11 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp) | |||
520 | * character to the tty device. If the kernel uses this routine, | 516 | * character to the tty device. If the kernel uses this routine, |
521 | * it must call the flush_chars() routine (if defined) when it is | 517 | * it must call the flush_chars() routine (if defined) when it is |
522 | * done stuffing characters into the driver. | 518 | * done stuffing characters into the driver. |
523 | * | ||
524 | * NOTE: include/linux/tty_driver.h specifies that a character should be | ||
525 | * ignored if there is no room in the queue. This driver implements a different | ||
526 | * semantic in that it will block when there is no more room left. | ||
527 | * | ||
528 | * FIXME: putchar can currently be called from BH and other non blocking | ||
529 | * handlers so this semantic isn't a good idea. | ||
530 | */ | 519 | */ |
531 | static int | 520 | static int |
532 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) | 521 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) |
533 | { | 522 | { |
534 | __sclp_vt220_write(&ch, 1, 0, 0, 1); | 523 | return __sclp_vt220_write(&ch, 1, 0, 0, 1); |
535 | return 1; | ||
536 | } | 524 | } |
537 | 525 | ||
538 | /* | 526 | /* |
@@ -653,7 +641,6 @@ static int __init __sclp_vt220_init(void) | |||
653 | spin_lock_init(&sclp_vt220_lock); | 641 | spin_lock_init(&sclp_vt220_lock); |
654 | INIT_LIST_HEAD(&sclp_vt220_empty); | 642 | INIT_LIST_HEAD(&sclp_vt220_empty); |
655 | INIT_LIST_HEAD(&sclp_vt220_outqueue); | 643 | INIT_LIST_HEAD(&sclp_vt220_outqueue); |
656 | init_waitqueue_head(&sclp_vt220_waitq); | ||
657 | init_timer(&sclp_vt220_timer); | 644 | init_timer(&sclp_vt220_timer); |
658 | sclp_vt220_current_request = NULL; | 645 | sclp_vt220_current_request = NULL; |
659 | sclp_vt220_buffered_chars = 0; | 646 | sclp_vt220_buffered_chars = 0; |
@@ -786,6 +773,7 @@ sclp_vt220_con_init(void) | |||
786 | { | 773 | { |
787 | int rc; | 774 | int rc; |
788 | 775 | ||
776 | INIT_LIST_HEAD(&sclp_vt220_register.list); | ||
789 | if (!CONSOLE_IS_SCLP) | 777 | if (!CONSOLE_IS_SCLP) |
790 | return 0; | 778 | return 0; |
791 | rc = __sclp_vt220_init(); | 779 | rc = __sclp_vt220_init(); |
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index dddf8d62c153..d0d565a05dfe 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h | |||
@@ -231,6 +231,9 @@ struct tape_device { | |||
231 | /* Request queue. */ | 231 | /* Request queue. */ |
232 | struct list_head req_queue; | 232 | struct list_head req_queue; |
233 | 233 | ||
234 | /* Request wait queue. */ | ||
235 | wait_queue_head_t wait_queue; | ||
236 | |||
234 | /* Each tape device has (currently) two minor numbers. */ | 237 | /* Each tape device has (currently) two minor numbers. */ |
235 | int first_minor; | 238 | int first_minor; |
236 | 239 | ||
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 8246ef3ab095..42ce7915fc5d 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -1598,7 +1598,7 @@ tape_3590_setup_device(struct tape_device *device) | |||
1598 | rc = tape_3590_read_dev_chars(device, rdc_data); | 1598 | rc = tape_3590_read_dev_chars(device, rdc_data); |
1599 | if (rc) { | 1599 | if (rc) { |
1600 | DBF_LH(3, "Read device characteristics failed!\n"); | 1600 | DBF_LH(3, "Read device characteristics failed!\n"); |
1601 | goto fail_kmalloc; | 1601 | goto fail_rdc_data; |
1602 | } | 1602 | } |
1603 | rc = tape_std_assign(device); | 1603 | rc = tape_std_assign(device); |
1604 | if (rc) | 1604 | if (rc) |
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index ddc4a114e7f4..95da72bc17e8 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -179,11 +179,11 @@ tapeblock_requeue(struct work_struct *work) { | |||
179 | tapeblock_end_request(req, -EIO); | 179 | tapeblock_end_request(req, -EIO); |
180 | continue; | 180 | continue; |
181 | } | 181 | } |
182 | blkdev_dequeue_request(req); | ||
183 | nr_queued++; | ||
182 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 184 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
183 | rc = tapeblock_start_request(device, req); | 185 | rc = tapeblock_start_request(device, req); |
184 | spin_lock_irq(&device->blk_data.request_queue_lock); | 186 | spin_lock_irq(&device->blk_data.request_queue_lock); |
185 | blkdev_dequeue_request(req); | ||
186 | nr_queued++; | ||
187 | } | 187 | } |
188 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 188 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
189 | atomic_set(&device->blk_data.requeue_scheduled, 0); | 189 | atomic_set(&device->blk_data.requeue_scheduled, 0); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 76e44eb7c47f..c20e3c548343 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -449,6 +449,7 @@ tape_alloc_device(void) | |||
449 | INIT_LIST_HEAD(&device->req_queue); | 449 | INIT_LIST_HEAD(&device->req_queue); |
450 | INIT_LIST_HEAD(&device->node); | 450 | INIT_LIST_HEAD(&device->node); |
451 | init_waitqueue_head(&device->state_change_wq); | 451 | init_waitqueue_head(&device->state_change_wq); |
452 | init_waitqueue_head(&device->wait_queue); | ||
452 | device->tape_state = TS_INIT; | 453 | device->tape_state = TS_INIT; |
453 | device->medium_state = MS_UNKNOWN; | 454 | device->medium_state = MS_UNKNOWN; |
454 | *device->modeset_byte = 0; | 455 | *device->modeset_byte = 0; |
@@ -954,21 +955,19 @@ __tape_wake_up(struct tape_request *request, void *data) | |||
954 | int | 955 | int |
955 | tape_do_io(struct tape_device *device, struct tape_request *request) | 956 | tape_do_io(struct tape_device *device, struct tape_request *request) |
956 | { | 957 | { |
957 | wait_queue_head_t wq; | ||
958 | int rc; | 958 | int rc; |
959 | 959 | ||
960 | init_waitqueue_head(&wq); | ||
961 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 960 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
962 | /* Setup callback */ | 961 | /* Setup callback */ |
963 | request->callback = __tape_wake_up; | 962 | request->callback = __tape_wake_up; |
964 | request->callback_data = &wq; | 963 | request->callback_data = &device->wait_queue; |
965 | /* Add request to request queue and try to start it. */ | 964 | /* Add request to request queue and try to start it. */ |
966 | rc = __tape_start_request(device, request); | 965 | rc = __tape_start_request(device, request); |
967 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 966 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
968 | if (rc) | 967 | if (rc) |
969 | return rc; | 968 | return rc; |
970 | /* Request added to the queue. Wait for its completion. */ | 969 | /* Request added to the queue. Wait for its completion. */ |
971 | wait_event(wq, (request->callback == NULL)); | 970 | wait_event(device->wait_queue, (request->callback == NULL)); |
972 | /* Get rc from request */ | 971 | /* Get rc from request */ |
973 | return request->rc; | 972 | return request->rc; |
974 | } | 973 | } |
@@ -989,20 +988,19 @@ int | |||
989 | tape_do_io_interruptible(struct tape_device *device, | 988 | tape_do_io_interruptible(struct tape_device *device, |
990 | struct tape_request *request) | 989 | struct tape_request *request) |
991 | { | 990 | { |
992 | wait_queue_head_t wq; | ||
993 | int rc; | 991 | int rc; |
994 | 992 | ||
995 | init_waitqueue_head(&wq); | ||
996 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 993 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
997 | /* Setup callback */ | 994 | /* Setup callback */ |
998 | request->callback = __tape_wake_up_interruptible; | 995 | request->callback = __tape_wake_up_interruptible; |
999 | request->callback_data = &wq; | 996 | request->callback_data = &device->wait_queue; |
1000 | rc = __tape_start_request(device, request); | 997 | rc = __tape_start_request(device, request); |
1001 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 998 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1002 | if (rc) | 999 | if (rc) |
1003 | return rc; | 1000 | return rc; |
1004 | /* Request added to the queue. Wait for its completion. */ | 1001 | /* Request added to the queue. Wait for its completion. */ |
1005 | rc = wait_event_interruptible(wq, (request->callback == NULL)); | 1002 | rc = wait_event_interruptible(device->wait_queue, |
1003 | (request->callback == NULL)); | ||
1006 | if (rc != -ERESTARTSYS) | 1004 | if (rc != -ERESTARTSYS) |
1007 | /* Request finished normally. */ | 1005 | /* Request finished normally. */ |
1008 | return request->rc; | 1006 | return request->rc; |
@@ -1015,7 +1013,7 @@ tape_do_io_interruptible(struct tape_device *device, | |||
1015 | /* Wait for the interrupt that acknowledges the halt. */ | 1013 | /* Wait for the interrupt that acknowledges the halt. */ |
1016 | do { | 1014 | do { |
1017 | rc = wait_event_interruptible( | 1015 | rc = wait_event_interruptible( |
1018 | wq, | 1016 | device->wait_queue, |
1019 | (request->callback == NULL) | 1017 | (request->callback == NULL) |
1020 | ); | 1018 | ); |
1021 | } while (rc == -ERESTARTSYS); | 1019 | } while (rc == -ERESTARTSYS); |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index e8487347e4d4..2c2428cc05d8 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -762,10 +762,10 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) | |||
762 | device_unregister(dev); | 762 | device_unregister(dev); |
763 | return ret; | 763 | return ret; |
764 | } | 764 | } |
765 | priv->class_device = device_create(vmlogrdr_class, dev, | 765 | priv->class_device = device_create_drvdata(vmlogrdr_class, dev, |
766 | MKDEV(vmlogrdr_major, | 766 | MKDEV(vmlogrdr_major, |
767 | priv->minor_num), | 767 | priv->minor_num), |
768 | "%s", dev->bus_id); | 768 | priv, "%s", dev->bus_id); |
769 | if (IS_ERR(priv->class_device)) { | 769 | if (IS_ERR(priv->class_device)) { |
770 | ret = PTR_ERR(priv->class_device); | 770 | ret = PTR_ERR(priv->class_device); |
771 | priv->class_device=NULL; | 771 | priv->class_device=NULL; |
@@ -773,7 +773,6 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) | |||
773 | device_unregister(dev); | 773 | device_unregister(dev); |
774 | return ret; | 774 | return ret; |
775 | } | 775 | } |
776 | dev->driver_data = priv; | ||
777 | priv->device = dev; | 776 | priv->device = dev; |
778 | return 0; | 777 | return 0; |
779 | } | 778 | } |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index a4a5f2efea48..0bfcbbe375c4 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -97,8 +97,8 @@ static int pure_hex(char **cp, unsigned int *val, int min_digit, | |||
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | static int parse_busid(char *str, int *cssid, int *ssid, int *devno, | 100 | static int parse_busid(char *str, unsigned int *cssid, unsigned int *ssid, |
101 | int msgtrigger) | 101 | unsigned int *devno, int msgtrigger) |
102 | { | 102 | { |
103 | char *str_work; | 103 | char *str_work; |
104 | int val, rc, ret; | 104 | int val, rc, ret; |
@@ -148,7 +148,7 @@ out: | |||
148 | static int blacklist_parse_parameters(char *str, range_action action, | 148 | static int blacklist_parse_parameters(char *str, range_action action, |
149 | int msgtrigger) | 149 | int msgtrigger) |
150 | { | 150 | { |
151 | int from_cssid, to_cssid, from_ssid, to_ssid, from, to; | 151 | unsigned int from_cssid, to_cssid, from_ssid, to_ssid, from, to; |
152 | int rc, totalrc; | 152 | int rc, totalrc; |
153 | char *parm; | 153 | char *parm; |
154 | range_action ra; | 154 | range_action ra; |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 82c6a2d45128..b32d7eb3d81a 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -576,12 +576,14 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid) | |||
576 | err = -ENODEV; | 576 | err = -ENODEV; |
577 | goto out; | 577 | goto out; |
578 | } | 578 | } |
579 | if (cio_is_console(sch->schid)) | 579 | if (cio_is_console(sch->schid)) { |
580 | sch->opm = 0xff; | 580 | sch->opm = 0xff; |
581 | else | 581 | sch->isc = 1; |
582 | } else { | ||
582 | sch->opm = chp_get_sch_opm(sch); | 583 | sch->opm = chp_get_sch_opm(sch); |
584 | sch->isc = 3; | ||
585 | } | ||
583 | sch->lpm = sch->schib.pmcw.pam & sch->opm; | 586 | sch->lpm = sch->schib.pmcw.pam & sch->opm; |
584 | sch->isc = 3; | ||
585 | 587 | ||
586 | CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X " | 588 | CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X " |
587 | "- PIM = %02X, PAM = %02X, POM = %02X\n", | 589 | "- PIM = %02X, PAM = %02X, POM = %02X\n", |
@@ -704,9 +706,9 @@ void wait_cons_dev(void) | |||
704 | if (!console_subchannel_in_use) | 706 | if (!console_subchannel_in_use) |
705 | return; | 707 | return; |
706 | 708 | ||
707 | /* disable all but isc 7 (console device) */ | 709 | /* disable all but isc 1 (console device) */ |
708 | __ctl_store (save_cr6, 6, 6); | 710 | __ctl_store (save_cr6, 6, 6); |
709 | cr6 = 0x01000000; | 711 | cr6 = 0x40000000; |
710 | __ctl_load (cr6, 6, 6); | 712 | __ctl_load (cr6, 6, 6); |
711 | 713 | ||
712 | do { | 714 | do { |
@@ -788,11 +790,11 @@ cio_probe_console(void) | |||
788 | } | 790 | } |
789 | 791 | ||
790 | /* | 792 | /* |
791 | * enable console I/O-interrupt subclass 7 | 793 | * enable console I/O-interrupt subclass 1 |
792 | */ | 794 | */ |
793 | ctl_set_bit(6, 24); | 795 | ctl_set_bit(6, 30); |
794 | console_subchannel.isc = 7; | 796 | console_subchannel.isc = 1; |
795 | console_subchannel.schib.pmcw.isc = 7; | 797 | console_subchannel.schib.pmcw.isc = 1; |
796 | console_subchannel.schib.pmcw.intparm = | 798 | console_subchannel.schib.pmcw.intparm = |
797 | (u32)(addr_t)&console_subchannel; | 799 | (u32)(addr_t)&console_subchannel; |
798 | ret = cio_modify(&console_subchannel); | 800 | ret = cio_modify(&console_subchannel); |
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 47a7e6200b26..5ab34340919b 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -31,11 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | static void *kvm_devices; | 32 | static void *kvm_devices; |
33 | 33 | ||
34 | /* | ||
35 | * Unique numbering for kvm devices. | ||
36 | */ | ||
37 | static unsigned int dev_index; | ||
38 | |||
39 | struct kvm_device { | 34 | struct kvm_device { |
40 | struct virtio_device vdev; | 35 | struct virtio_device vdev; |
41 | struct kvm_device_desc *desc; | 36 | struct kvm_device_desc *desc; |
@@ -78,27 +73,32 @@ static unsigned desc_size(const struct kvm_device_desc *desc) | |||
78 | + desc->config_len; | 73 | + desc->config_len; |
79 | } | 74 | } |
80 | 75 | ||
81 | /* | 76 | /* This gets the device's feature bits. */ |
82 | * This tests (and acknowleges) a feature bit. | 77 | static u32 kvm_get_features(struct virtio_device *vdev) |
83 | */ | ||
84 | static bool kvm_feature(struct virtio_device *vdev, unsigned fbit) | ||
85 | { | 78 | { |
79 | unsigned int i; | ||
80 | u32 features = 0; | ||
86 | struct kvm_device_desc *desc = to_kvmdev(vdev)->desc; | 81 | struct kvm_device_desc *desc = to_kvmdev(vdev)->desc; |
87 | u8 *features; | 82 | u8 *in_features = kvm_vq_features(desc); |
88 | 83 | ||
89 | if (fbit / 8 > desc->feature_len) | 84 | for (i = 0; i < min(desc->feature_len * 8, 32); i++) |
90 | return false; | 85 | if (in_features[i / 8] & (1 << (i % 8))) |
86 | features |= (1 << i); | ||
87 | return features; | ||
88 | } | ||
91 | 89 | ||
92 | features = kvm_vq_features(desc); | 90 | static void kvm_set_features(struct virtio_device *vdev, u32 features) |
93 | if (!(features[fbit / 8] & (1 << (fbit % 8)))) | 91 | { |
94 | return false; | 92 | unsigned int i; |
93 | struct kvm_device_desc *desc = to_kvmdev(vdev)->desc; | ||
94 | /* Second half of bitmap is features we accept. */ | ||
95 | u8 *out_features = kvm_vq_features(desc) + desc->feature_len; | ||
95 | 96 | ||
96 | /* | 97 | memset(out_features, 0, desc->feature_len); |
97 | * We set the matching bit in the other half of the bitmap to tell the | 98 | for (i = 0; i < min(desc->feature_len * 8, 32); i++) { |
98 | * Host we want to use this feature. | 99 | if (features & (1 << i)) |
99 | */ | 100 | out_features[i / 8] |= (1 << (i % 8)); |
100 | features[desc->feature_len + fbit / 8] |= (1 << (fbit % 8)); | 101 | } |
101 | return true; | ||
102 | } | 102 | } |
103 | 103 | ||
104 | /* | 104 | /* |
@@ -221,7 +221,8 @@ static void kvm_del_vq(struct virtqueue *vq) | |||
221 | * The config ops structure as defined by virtio config | 221 | * The config ops structure as defined by virtio config |
222 | */ | 222 | */ |
223 | static struct virtio_config_ops kvm_vq_configspace_ops = { | 223 | static struct virtio_config_ops kvm_vq_configspace_ops = { |
224 | .feature = kvm_feature, | 224 | .get_features = kvm_get_features, |
225 | .set_features = kvm_set_features, | ||
225 | .get = kvm_get, | 226 | .get = kvm_get, |
226 | .set = kvm_set, | 227 | .set = kvm_set, |
227 | .get_status = kvm_get_status, | 228 | .get_status = kvm_get_status, |
@@ -244,26 +245,25 @@ static struct device kvm_root = { | |||
244 | * adds a new device and register it with virtio | 245 | * adds a new device and register it with virtio |
245 | * appropriate drivers are loaded by the device model | 246 | * appropriate drivers are loaded by the device model |
246 | */ | 247 | */ |
247 | static void add_kvm_device(struct kvm_device_desc *d) | 248 | static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset) |
248 | { | 249 | { |
249 | struct kvm_device *kdev; | 250 | struct kvm_device *kdev; |
250 | 251 | ||
251 | kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); | 252 | kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); |
252 | if (!kdev) { | 253 | if (!kdev) { |
253 | printk(KERN_EMERG "Cannot allocate kvm dev %u\n", | 254 | printk(KERN_EMERG "Cannot allocate kvm dev %u type %u\n", |
254 | dev_index++); | 255 | offset, d->type); |
255 | return; | 256 | return; |
256 | } | 257 | } |
257 | 258 | ||
258 | kdev->vdev.dev.parent = &kvm_root; | 259 | kdev->vdev.dev.parent = &kvm_root; |
259 | kdev->vdev.index = dev_index++; | ||
260 | kdev->vdev.id.device = d->type; | 260 | kdev->vdev.id.device = d->type; |
261 | kdev->vdev.config = &kvm_vq_configspace_ops; | 261 | kdev->vdev.config = &kvm_vq_configspace_ops; |
262 | kdev->desc = d; | 262 | kdev->desc = d; |
263 | 263 | ||
264 | if (register_virtio_device(&kdev->vdev) != 0) { | 264 | if (register_virtio_device(&kdev->vdev) != 0) { |
265 | printk(KERN_ERR "Failed to register kvm device %u\n", | 265 | printk(KERN_ERR "Failed to register kvm device %u type %u\n", |
266 | kdev->vdev.index); | 266 | offset, d->type); |
267 | kfree(kdev); | 267 | kfree(kdev); |
268 | } | 268 | } |
269 | } | 269 | } |
@@ -283,7 +283,7 @@ static void scan_devices(void) | |||
283 | if (d->type == 0) | 283 | if (d->type == 0) |
284 | break; | 284 | break; |
285 | 285 | ||
286 | add_kvm_device(d); | 286 | add_kvm_device(d, i); |
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 436bf1f6d4a6..9a71dae223e8 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -290,9 +290,6 @@ int qeth_set_large_send(struct qeth_card *card, | |||
290 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG | | 290 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG | |
291 | NETIF_F_HW_CSUM; | 291 | NETIF_F_HW_CSUM; |
292 | } else { | 292 | } else { |
293 | PRINT_WARN("TSO not supported on %s. " | ||
294 | "large_send set to 'no'.\n", | ||
295 | card->dev->name); | ||
296 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | | 293 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | |
297 | NETIF_F_HW_CSUM); | 294 | NETIF_F_HW_CSUM); |
298 | card->options.large_send = QETH_LARGE_SEND_NO; | 295 | card->options.large_send = QETH_LARGE_SEND_NO; |
@@ -1407,12 +1404,6 @@ static void qeth_init_func_level(struct qeth_card *card) | |||
1407 | } | 1404 | } |
1408 | } | 1405 | } |
1409 | 1406 | ||
1410 | static inline __u16 qeth_raw_devno_from_bus_id(char *id) | ||
1411 | { | ||
1412 | id += (strlen(id) - 4); | ||
1413 | return (__u16) simple_strtoul(id, &id, 16); | ||
1414 | } | ||
1415 | |||
1416 | static int qeth_idx_activate_get_answer(struct qeth_channel *channel, | 1407 | static int qeth_idx_activate_get_answer(struct qeth_channel *channel, |
1417 | void (*idx_reply_cb)(struct qeth_channel *, | 1408 | void (*idx_reply_cb)(struct qeth_channel *, |
1418 | struct qeth_cmd_buffer *)) | 1409 | struct qeth_cmd_buffer *)) |
@@ -1439,7 +1430,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel, | |||
1439 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 1430 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
1440 | 1431 | ||
1441 | if (rc) { | 1432 | if (rc) { |
1442 | PRINT_ERR("Error2 in activating channel rc=%d\n", rc); | 1433 | QETH_DBF_MESSAGE(2, "Error2 in activating channel rc=%d\n", rc); |
1443 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | 1434 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); |
1444 | atomic_set(&channel->irq_pending, 0); | 1435 | atomic_set(&channel->irq_pending, 0); |
1445 | wake_up(&card->wait_q); | 1436 | wake_up(&card->wait_q); |
@@ -1468,6 +1459,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel, | |||
1468 | __u16 temp; | 1459 | __u16 temp; |
1469 | __u8 tmp; | 1460 | __u8 tmp; |
1470 | int rc; | 1461 | int rc; |
1462 | struct ccw_dev_id temp_devid; | ||
1471 | 1463 | ||
1472 | card = CARD_FROM_CDEV(channel->ccwdev); | 1464 | card = CARD_FROM_CDEV(channel->ccwdev); |
1473 | 1465 | ||
@@ -1494,8 +1486,8 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel, | |||
1494 | &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH); | 1486 | &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH); |
1495 | memcpy(QETH_IDX_ACT_FUNC_LEVEL(iob->data), | 1487 | memcpy(QETH_IDX_ACT_FUNC_LEVEL(iob->data), |
1496 | &card->info.func_level, sizeof(__u16)); | 1488 | &card->info.func_level, sizeof(__u16)); |
1497 | temp = qeth_raw_devno_from_bus_id(CARD_DDEV_ID(card)); | 1489 | ccw_device_get_id(CARD_DDEV(card), &temp_devid); |
1498 | memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp, 2); | 1490 | memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp_devid.devno, 2); |
1499 | temp = (card->info.cula << 8) + card->info.unit_addr2; | 1491 | temp = (card->info.cula << 8) + card->info.unit_addr2; |
1500 | memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(iob->data), &temp, 2); | 1492 | memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(iob->data), &temp, 2); |
1501 | 1493 | ||
@@ -1508,7 +1500,8 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel, | |||
1508 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 1500 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
1509 | 1501 | ||
1510 | if (rc) { | 1502 | if (rc) { |
1511 | PRINT_ERR("Error1 in activating channel. rc=%d\n", rc); | 1503 | QETH_DBF_MESSAGE(2, "Error1 in activating channel. rc=%d\n", |
1504 | rc); | ||
1512 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | 1505 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); |
1513 | atomic_set(&channel->irq_pending, 0); | 1506 | atomic_set(&channel->irq_pending, 0); |
1514 | wake_up(&card->wait_q); | 1507 | wake_up(&card->wait_q); |
@@ -1658,7 +1651,6 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1658 | 1651 | ||
1659 | reply = qeth_alloc_reply(card); | 1652 | reply = qeth_alloc_reply(card); |
1660 | if (!reply) { | 1653 | if (!reply) { |
1661 | PRINT_WARN("Could not alloc qeth_reply!\n"); | ||
1662 | return -ENOMEM; | 1654 | return -ENOMEM; |
1663 | } | 1655 | } |
1664 | reply->callback = reply_cb; | 1656 | reply->callback = reply_cb; |
@@ -2612,15 +2604,9 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index) | |||
2612 | if (newcount < count) { | 2604 | if (newcount < count) { |
2613 | /* we are in memory shortage so we switch back to | 2605 | /* we are in memory shortage so we switch back to |
2614 | traditional skb allocation and drop packages */ | 2606 | traditional skb allocation and drop packages */ |
2615 | if (!atomic_read(&card->force_alloc_skb) && | ||
2616 | net_ratelimit()) | ||
2617 | PRINT_WARN("Switch to alloc skb\n"); | ||
2618 | atomic_set(&card->force_alloc_skb, 3); | 2607 | atomic_set(&card->force_alloc_skb, 3); |
2619 | count = newcount; | 2608 | count = newcount; |
2620 | } else { | 2609 | } else { |
2621 | if ((atomic_read(&card->force_alloc_skb) == 1) && | ||
2622 | net_ratelimit()) | ||
2623 | PRINT_WARN("Switch to sg\n"); | ||
2624 | atomic_add_unless(&card->force_alloc_skb, -1, 0); | 2610 | atomic_add_unless(&card->force_alloc_skb, -1, 0); |
2625 | } | 2611 | } |
2626 | 2612 | ||
@@ -3034,7 +3020,7 @@ int qeth_get_elements_no(struct qeth_card *card, void *hdr, | |||
3034 | elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) | 3020 | elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) |
3035 | + skb->len) >> PAGE_SHIFT); | 3021 | + skb->len) >> PAGE_SHIFT); |
3036 | if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { | 3022 | if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { |
3037 | PRINT_ERR("Invalid size of IP packet " | 3023 | QETH_DBF_MESSAGE(2, "Invalid size of IP packet " |
3038 | "(Number=%d / Length=%d). Discarded.\n", | 3024 | "(Number=%d / Length=%d). Discarded.\n", |
3039 | (elements_needed+elems), skb->len); | 3025 | (elements_needed+elems), skb->len); |
3040 | return 0; | 3026 | return 0; |
@@ -3247,8 +3233,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, | |||
3247 | * free buffers) to handle eddp context */ | 3233 | * free buffers) to handle eddp context */ |
3248 | if (qeth_eddp_check_buffers_for_context(queue, ctx) | 3234 | if (qeth_eddp_check_buffers_for_context(queue, ctx) |
3249 | < 0) { | 3235 | < 0) { |
3250 | if (net_ratelimit()) | ||
3251 | PRINT_WARN("eddp tx_dropped 1\n"); | ||
3252 | rc = -EBUSY; | 3236 | rc = -EBUSY; |
3253 | goto out; | 3237 | goto out; |
3254 | } | 3238 | } |
@@ -3260,7 +3244,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue, | |||
3260 | tmp = qeth_eddp_fill_buffer(queue, ctx, | 3244 | tmp = qeth_eddp_fill_buffer(queue, ctx, |
3261 | queue->next_buf_to_fill); | 3245 | queue->next_buf_to_fill); |
3262 | if (tmp < 0) { | 3246 | if (tmp < 0) { |
3263 | PRINT_ERR("eddp tx_dropped 2\n"); | ||
3264 | rc = -EBUSY; | 3247 | rc = -EBUSY; |
3265 | goto out; | 3248 | goto out; |
3266 | } | 3249 | } |
@@ -3602,8 +3585,6 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
3602 | 3585 | ||
3603 | if ((!qeth_adp_supported(card, IPA_SETADP_SET_SNMP_CONTROL)) && | 3586 | if ((!qeth_adp_supported(card, IPA_SETADP_SET_SNMP_CONTROL)) && |
3604 | (!card->options.layer2)) { | 3587 | (!card->options.layer2)) { |
3605 | PRINT_WARN("SNMP Query MIBS not supported " | ||
3606 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
3607 | return -EOPNOTSUPP; | 3588 | return -EOPNOTSUPP; |
3608 | } | 3589 | } |
3609 | /* skip 4 bytes (data_len struct member) to get req_len */ | 3590 | /* skip 4 bytes (data_len struct member) to get req_len */ |
@@ -3634,7 +3615,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
3634 | rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len, | 3615 | rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len, |
3635 | qeth_snmp_command_cb, (void *)&qinfo); | 3616 | qeth_snmp_command_cb, (void *)&qinfo); |
3636 | if (rc) | 3617 | if (rc) |
3637 | PRINT_WARN("SNMP command failed on %s: (0x%x)\n", | 3618 | QETH_DBF_MESSAGE(2, "SNMP command failed on %s: (0x%x)\n", |
3638 | QETH_CARD_IFNAME(card), rc); | 3619 | QETH_CARD_IFNAME(card), rc); |
3639 | else { | 3620 | else { |
3640 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) | 3621 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) |
@@ -3807,8 +3788,8 @@ retry: | |||
3807 | if (mpno) | 3788 | if (mpno) |
3808 | mpno = min(mpno - 1, QETH_MAX_PORTNO); | 3789 | mpno = min(mpno - 1, QETH_MAX_PORTNO); |
3809 | if (card->info.portno > mpno) { | 3790 | if (card->info.portno > mpno) { |
3810 | PRINT_ERR("Device %s does not offer port number %d \n.", | 3791 | QETH_DBF_MESSAGE(2, "Device %s does not offer port number %d" |
3811 | CARD_BUS_ID(card), card->info.portno); | 3792 | "\n.", CARD_BUS_ID(card), card->info.portno); |
3812 | rc = -ENODEV; | 3793 | rc = -ENODEV; |
3813 | goto out; | 3794 | goto out; |
3814 | } | 3795 | } |
@@ -3985,8 +3966,6 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card, | |||
3985 | return skb; | 3966 | return skb; |
3986 | no_mem: | 3967 | no_mem: |
3987 | if (net_ratelimit()) { | 3968 | if (net_ratelimit()) { |
3988 | PRINT_WARN("No memory for packet received on %s.\n", | ||
3989 | QETH_CARD_IFNAME(card)); | ||
3990 | QETH_DBF_TEXT(TRACE, 2, "noskbmem"); | 3969 | QETH_DBF_TEXT(TRACE, 2, "noskbmem"); |
3991 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); | 3970 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); |
3992 | } | 3971 | } |
@@ -4004,15 +3983,17 @@ static void qeth_unregister_dbf_views(void) | |||
4004 | } | 3983 | } |
4005 | } | 3984 | } |
4006 | 3985 | ||
4007 | void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *text, ...) | 3986 | void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *fmt, ...) |
4008 | { | 3987 | { |
4009 | char dbf_txt_buf[32]; | 3988 | char dbf_txt_buf[32]; |
3989 | va_list args; | ||
4010 | 3990 | ||
4011 | if (level > (qeth_dbf[dbf_nix].id)->level) | 3991 | if (level > (qeth_dbf[dbf_nix].id)->level) |
4012 | return; | 3992 | return; |
4013 | snprintf(dbf_txt_buf, sizeof(dbf_txt_buf), text); | 3993 | va_start(args, fmt); |
3994 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); | ||
3995 | va_end(args); | ||
4014 | debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf); | 3996 | debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf); |
4015 | |||
4016 | } | 3997 | } |
4017 | EXPORT_SYMBOL_GPL(qeth_dbf_longtext); | 3998 | EXPORT_SYMBOL_GPL(qeth_dbf_longtext); |
4018 | 3999 | ||
diff --git a/drivers/s390/net/qeth_core_offl.c b/drivers/s390/net/qeth_core_offl.c index 822df8362856..452874e89740 100644 --- a/drivers/s390/net/qeth_core_offl.c +++ b/drivers/s390/net/qeth_core_offl.c | |||
@@ -122,8 +122,8 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, | |||
122 | if (element == 0) | 122 | if (element == 0) |
123 | return -EBUSY; | 123 | return -EBUSY; |
124 | else { | 124 | else { |
125 | PRINT_WARN("could only partially fill eddp " | 125 | QETH_DBF_MESSAGE(2, "could only partially fill" |
126 | "buffer!\n"); | 126 | "eddp buffer!\n"); |
127 | goto out; | 127 | goto out; |
128 | } | 128 | } |
129 | } | 129 | } |
@@ -143,8 +143,6 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue, | |||
143 | if (must_refcnt) { | 143 | if (must_refcnt) { |
144 | must_refcnt = 0; | 144 | must_refcnt = 0; |
145 | if (qeth_eddp_buf_ref_context(buf, ctx)) { | 145 | if (qeth_eddp_buf_ref_context(buf, ctx)) { |
146 | PRINT_WARN("no memory to create eddp context " | ||
147 | "reference\n"); | ||
148 | goto out_check; | 146 | goto out_check; |
149 | } | 147 | } |
150 | } | 148 | } |
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 08a50f057284..c26e842ad905 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c | |||
@@ -129,7 +129,6 @@ static ssize_t qeth_dev_portno_store(struct device *dev, | |||
129 | 129 | ||
130 | portno = simple_strtoul(buf, &tmp, 16); | 130 | portno = simple_strtoul(buf, &tmp, 16); |
131 | if (portno > QETH_MAX_PORTNO) { | 131 | if (portno > QETH_MAX_PORTNO) { |
132 | PRINT_WARN("portno 0x%X is out of range\n", portno); | ||
133 | return -EINVAL; | 132 | return -EINVAL; |
134 | } | 133 | } |
135 | 134 | ||
@@ -223,8 +222,6 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev, | |||
223 | * if though we have to permit priority queueing | 222 | * if though we have to permit priority queueing |
224 | */ | 223 | */ |
225 | if (card->qdio.no_out_queues == 1) { | 224 | if (card->qdio.no_out_queues == 1) { |
226 | PRINT_WARN("Priority queueing disabled due " | ||
227 | "to hardware limitations!\n"); | ||
228 | card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; | 225 | card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; |
229 | return -EPERM; | 226 | return -EPERM; |
230 | } | 227 | } |
@@ -250,7 +247,6 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev, | |||
250 | card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; | 247 | card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; |
251 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; | 248 | card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; |
252 | } else { | 249 | } else { |
253 | PRINT_WARN("Unknown queueing type '%s'\n", tmp); | ||
254 | return -EINVAL; | 250 | return -EINVAL; |
255 | } | 251 | } |
256 | return count; | 252 | return count; |
@@ -291,9 +287,6 @@ static ssize_t qeth_dev_bufcnt_store(struct device *dev, | |||
291 | ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); | 287 | ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); |
292 | if (old_cnt != cnt) { | 288 | if (old_cnt != cnt) { |
293 | rc = qeth_realloc_buffer_pool(card, cnt); | 289 | rc = qeth_realloc_buffer_pool(card, cnt); |
294 | if (rc) | ||
295 | PRINT_WARN("Error (%d) while setting " | ||
296 | "buffer count.\n", rc); | ||
297 | } | 290 | } |
298 | return count; | 291 | return count; |
299 | } | 292 | } |
@@ -355,7 +348,6 @@ static ssize_t qeth_dev_performance_stats_store(struct device *dev, | |||
355 | card->perf_stats.initial_rx_packets = card->stats.rx_packets; | 348 | card->perf_stats.initial_rx_packets = card->stats.rx_packets; |
356 | card->perf_stats.initial_tx_packets = card->stats.tx_packets; | 349 | card->perf_stats.initial_tx_packets = card->stats.tx_packets; |
357 | } else { | 350 | } else { |
358 | PRINT_WARN("performance_stats: write 0 or 1 to this file!\n"); | ||
359 | return -EINVAL; | 351 | return -EINVAL; |
360 | } | 352 | } |
361 | return count; | 353 | return count; |
@@ -399,7 +391,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, | |||
399 | newdis = QETH_DISCIPLINE_LAYER2; | 391 | newdis = QETH_DISCIPLINE_LAYER2; |
400 | break; | 392 | break; |
401 | default: | 393 | default: |
402 | PRINT_WARN("layer2: write 0 or 1 to this file!\n"); | ||
403 | return -EINVAL; | 394 | return -EINVAL; |
404 | } | 395 | } |
405 | 396 | ||
@@ -463,7 +454,6 @@ static ssize_t qeth_dev_large_send_store(struct device *dev, | |||
463 | } else if (!strcmp(tmp, "TSO")) { | 454 | } else if (!strcmp(tmp, "TSO")) { |
464 | type = QETH_LARGE_SEND_TSO; | 455 | type = QETH_LARGE_SEND_TSO; |
465 | } else { | 456 | } else { |
466 | PRINT_WARN("large_send: invalid mode %s!\n", tmp); | ||
467 | return -EINVAL; | 457 | return -EINVAL; |
468 | } | 458 | } |
469 | if (card->options.large_send == type) | 459 | if (card->options.large_send == type) |
@@ -503,8 +493,6 @@ static ssize_t qeth_dev_blkt_store(struct qeth_card *card, | |||
503 | if (i <= max_value) { | 493 | if (i <= max_value) { |
504 | *value = i; | 494 | *value = i; |
505 | } else { | 495 | } else { |
506 | PRINT_WARN("blkt total time: write values between" | ||
507 | " 0 and %d to this file!\n", max_value); | ||
508 | return -EINVAL; | 496 | return -EINVAL; |
509 | } | 497 | } |
510 | return count; | 498 | return count; |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 86ec50ddae13..f682f7b14480 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -101,19 +101,16 @@ static struct net_device *qeth_l2_netdev_by_devno(unsigned char *read_dev_no) | |||
101 | { | 101 | { |
102 | struct qeth_card *card; | 102 | struct qeth_card *card; |
103 | struct net_device *ndev; | 103 | struct net_device *ndev; |
104 | unsigned char *readno; | 104 | __u16 temp_dev_no; |
105 | __u16 temp_dev_no, card_dev_no; | ||
106 | char *endp; | ||
107 | unsigned long flags; | 105 | unsigned long flags; |
106 | struct ccw_dev_id read_devid; | ||
108 | 107 | ||
109 | ndev = NULL; | 108 | ndev = NULL; |
110 | memcpy(&temp_dev_no, read_dev_no, 2); | 109 | memcpy(&temp_dev_no, read_dev_no, 2); |
111 | read_lock_irqsave(&qeth_core_card_list.rwlock, flags); | 110 | read_lock_irqsave(&qeth_core_card_list.rwlock, flags); |
112 | list_for_each_entry(card, &qeth_core_card_list.list, list) { | 111 | list_for_each_entry(card, &qeth_core_card_list.list, list) { |
113 | readno = CARD_RDEV_ID(card); | 112 | ccw_device_get_id(CARD_RDEV(card), &read_devid); |
114 | readno += (strlen(readno) - 4); | 113 | if (read_devid.devno == temp_dev_no) { |
115 | card_dev_no = simple_strtoul(readno, &endp, 16); | ||
116 | if (card_dev_no == temp_dev_no) { | ||
117 | ndev = card->dev; | 114 | ndev = card->dev; |
118 | break; | 115 | break; |
119 | } | 116 | } |
@@ -134,14 +131,14 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card, | |||
134 | mac = &cmd->data.setdelmac.mac[0]; | 131 | mac = &cmd->data.setdelmac.mac[0]; |
135 | /* MAC already registered, needed in couple/uncouple case */ | 132 | /* MAC already registered, needed in couple/uncouple case */ |
136 | if (cmd->hdr.return_code == 0x2005) { | 133 | if (cmd->hdr.return_code == 0x2005) { |
137 | PRINT_WARN("Group MAC %02x:%02x:%02x:%02x:%02x:%02x " \ | 134 | QETH_DBF_MESSAGE(2, "Group MAC %02x:%02x:%02x:%02x:%02x:%02x " |
138 | "already existing on %s \n", | 135 | "already existing on %s \n", |
139 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], | 136 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], |
140 | QETH_CARD_IFNAME(card)); | 137 | QETH_CARD_IFNAME(card)); |
141 | cmd->hdr.return_code = 0; | 138 | cmd->hdr.return_code = 0; |
142 | } | 139 | } |
143 | if (cmd->hdr.return_code) | 140 | if (cmd->hdr.return_code) |
144 | PRINT_ERR("Could not set group MAC " \ | 141 | QETH_DBF_MESSAGE(2, "Could not set group MAC " |
145 | "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", | 142 | "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", |
146 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], | 143 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], |
147 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 144 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
@@ -166,7 +163,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card, | |||
166 | cmd = (struct qeth_ipa_cmd *) data; | 163 | cmd = (struct qeth_ipa_cmd *) data; |
167 | mac = &cmd->data.setdelmac.mac[0]; | 164 | mac = &cmd->data.setdelmac.mac[0]; |
168 | if (cmd->hdr.return_code) | 165 | if (cmd->hdr.return_code) |
169 | PRINT_ERR("Could not delete group MAC " \ | 166 | QETH_DBF_MESSAGE(2, "Could not delete group MAC " |
170 | "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", | 167 | "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", |
171 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], | 168 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], |
172 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 169 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
@@ -186,10 +183,8 @@ static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac) | |||
186 | 183 | ||
187 | mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC); | 184 | mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC); |
188 | 185 | ||
189 | if (!mc) { | 186 | if (!mc) |
190 | PRINT_ERR("no mem vor mc mac address\n"); | ||
191 | return; | 187 | return; |
192 | } | ||
193 | 188 | ||
194 | memcpy(mc->mc_addr, mac, OSA_ADDR_LEN); | 189 | memcpy(mc->mc_addr, mac, OSA_ADDR_LEN); |
195 | mc->mc_addrlen = OSA_ADDR_LEN; | 190 | mc->mc_addrlen = OSA_ADDR_LEN; |
@@ -280,7 +275,7 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card, | |||
280 | QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); | 275 | QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); |
281 | cmd = (struct qeth_ipa_cmd *) data; | 276 | cmd = (struct qeth_ipa_cmd *) data; |
282 | if (cmd->hdr.return_code) { | 277 | if (cmd->hdr.return_code) { |
283 | PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " | 278 | QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. " |
284 | "Continuing\n", cmd->data.setdelvlan.vlan_id, | 279 | "Continuing\n", cmd->data.setdelvlan.vlan_id, |
285 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 280 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
286 | QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); | 281 | QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); |
@@ -333,8 +328,6 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | |||
333 | spin_lock_bh(&card->vlanlock); | 328 | spin_lock_bh(&card->vlanlock); |
334 | list_add_tail(&id->list, &card->vid_list); | 329 | list_add_tail(&id->list, &card->vid_list); |
335 | spin_unlock_bh(&card->vlanlock); | 330 | spin_unlock_bh(&card->vlanlock); |
336 | } else { | ||
337 | PRINT_ERR("no memory for vid\n"); | ||
338 | } | 331 | } |
339 | } | 332 | } |
340 | 333 | ||
@@ -550,16 +543,15 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card) | |||
550 | 543 | ||
551 | rc = qeth_query_setadapterparms(card); | 544 | rc = qeth_query_setadapterparms(card); |
552 | if (rc) { | 545 | if (rc) { |
553 | PRINT_WARN("could not query adapter parameters on device %s: " | 546 | QETH_DBF_MESSAGE(2, "could not query adapter parameters on " |
554 | "x%x\n", CARD_BUS_ID(card), rc); | 547 | "device %s: x%x\n", CARD_BUS_ID(card), rc); |
555 | } | 548 | } |
556 | 549 | ||
557 | if (card->info.guestlan) { | 550 | if (card->info.guestlan) { |
558 | rc = qeth_setadpparms_change_macaddr(card); | 551 | rc = qeth_setadpparms_change_macaddr(card); |
559 | if (rc) { | 552 | if (rc) { |
560 | PRINT_WARN("couldn't get MAC address on " | 553 | QETH_DBF_MESSAGE(2, "couldn't get MAC address on " |
561 | "device %s: x%x\n", | 554 | "device %s: x%x\n", CARD_BUS_ID(card), rc); |
562 | CARD_BUS_ID(card), rc); | ||
563 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | 555 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); |
564 | return rc; | 556 | return rc; |
565 | } | 557 | } |
@@ -585,8 +577,6 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p) | |||
585 | } | 577 | } |
586 | 578 | ||
587 | if (card->info.type == QETH_CARD_TYPE_OSN) { | 579 | if (card->info.type == QETH_CARD_TYPE_OSN) { |
588 | PRINT_WARN("Setting MAC address on %s is not supported.\n", | ||
589 | dev->name); | ||
590 | QETH_DBF_TEXT(TRACE, 3, "setmcOSN"); | 580 | QETH_DBF_TEXT(TRACE, 3, "setmcOSN"); |
591 | return -EOPNOTSUPP; | 581 | return -EOPNOTSUPP; |
592 | } | 582 | } |
@@ -666,7 +656,7 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
666 | ctx = qeth_eddp_create_context(card, new_skb, hdr, | 656 | ctx = qeth_eddp_create_context(card, new_skb, hdr, |
667 | skb->sk->sk_protocol); | 657 | skb->sk->sk_protocol); |
668 | if (ctx == NULL) { | 658 | if (ctx == NULL) { |
669 | PRINT_WARN("could not create eddp context\n"); | 659 | QETH_DBF_MESSAGE(2, "could not create eddp context\n"); |
670 | goto tx_drop; | 660 | goto tx_drop; |
671 | } | 661 | } |
672 | } else { | 662 | } else { |
@@ -731,6 +721,7 @@ tx_drop: | |||
731 | if ((new_skb != skb) && new_skb) | 721 | if ((new_skb != skb) && new_skb) |
732 | dev_kfree_skb_any(new_skb); | 722 | dev_kfree_skb_any(new_skb); |
733 | dev_kfree_skb_any(skb); | 723 | dev_kfree_skb_any(skb); |
724 | netif_wake_queue(dev); | ||
734 | return NETDEV_TX_OK; | 725 | return NETDEV_TX_OK; |
735 | } | 726 | } |
736 | 727 | ||
@@ -1155,7 +1146,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len, | |||
1155 | (addr_t) iob, 0, 0); | 1146 | (addr_t) iob, 0, 0); |
1156 | spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags); | 1147 | spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags); |
1157 | if (rc) { | 1148 | if (rc) { |
1158 | PRINT_WARN("qeth_osn_send_control_data: " | 1149 | QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: " |
1159 | "ccw_device_start rc = %i\n", rc); | 1150 | "ccw_device_start rc = %i\n", rc); |
1160 | QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); | 1151 | QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); |
1161 | qeth_release_buffer(iob->channel, iob); | 1152 | qeth_release_buffer(iob->channel, iob); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 94a8ead64ed4..999552c83bbe 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -311,7 +311,6 @@ static struct qeth_ipaddr *qeth_l3_get_addr_buffer( | |||
311 | 311 | ||
312 | addr = kzalloc(sizeof(struct qeth_ipaddr), GFP_ATOMIC); | 312 | addr = kzalloc(sizeof(struct qeth_ipaddr), GFP_ATOMIC); |
313 | if (addr == NULL) { | 313 | if (addr == NULL) { |
314 | PRINT_WARN("Not enough memory to add address\n"); | ||
315 | return NULL; | 314 | return NULL; |
316 | } | 315 | } |
317 | addr->type = QETH_IP_TYPE_NORMAL; | 316 | addr->type = QETH_IP_TYPE_NORMAL; |
@@ -649,15 +648,6 @@ static void qeth_l3_correct_routing_type(struct qeth_card *card, | |||
649 | } | 648 | } |
650 | } | 649 | } |
651 | out_inval: | 650 | out_inval: |
652 | PRINT_WARN("Routing type '%s' not supported for interface %s.\n" | ||
653 | "Router status set to 'no router'.\n", | ||
654 | ((*type == PRIMARY_ROUTER)? "primary router" : | ||
655 | (*type == SECONDARY_ROUTER)? "secondary router" : | ||
656 | (*type == PRIMARY_CONNECTOR)? "primary connector" : | ||
657 | (*type == SECONDARY_CONNECTOR)? "secondary connector" : | ||
658 | (*type == MULTICAST_ROUTER)? "multicast router" : | ||
659 | "unknown"), | ||
660 | card->dev->name); | ||
661 | *type = NO_ROUTER; | 651 | *type = NO_ROUTER; |
662 | } | 652 | } |
663 | 653 | ||
@@ -674,9 +664,9 @@ int qeth_l3_setrouting_v4(struct qeth_card *card) | |||
674 | QETH_PROT_IPV4); | 664 | QETH_PROT_IPV4); |
675 | if (rc) { | 665 | if (rc) { |
676 | card->options.route4.type = NO_ROUTER; | 666 | card->options.route4.type = NO_ROUTER; |
677 | PRINT_WARN("Error (0x%04x) while setting routing type on %s. " | 667 | QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type" |
678 | "Type set to 'no router'.\n", | 668 | " on %s. Type set to 'no router'.\n", rc, |
679 | rc, QETH_CARD_IFNAME(card)); | 669 | QETH_CARD_IFNAME(card)); |
680 | } | 670 | } |
681 | return rc; | 671 | return rc; |
682 | } | 672 | } |
@@ -697,9 +687,9 @@ int qeth_l3_setrouting_v6(struct qeth_card *card) | |||
697 | QETH_PROT_IPV6); | 687 | QETH_PROT_IPV6); |
698 | if (rc) { | 688 | if (rc) { |
699 | card->options.route6.type = NO_ROUTER; | 689 | card->options.route6.type = NO_ROUTER; |
700 | PRINT_WARN("Error (0x%04x) while setting routing type on %s. " | 690 | QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type" |
701 | "Type set to 'no router'.\n", | 691 | " on %s. Type set to 'no router'.\n", rc, |
702 | rc, QETH_CARD_IFNAME(card)); | 692 | QETH_CARD_IFNAME(card)); |
703 | } | 693 | } |
704 | #endif | 694 | #endif |
705 | return rc; | 695 | return rc; |
@@ -737,7 +727,6 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, | |||
737 | if (!memcmp(ipatoe->addr, new->addr, | 727 | if (!memcmp(ipatoe->addr, new->addr, |
738 | (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && | 728 | (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && |
739 | (ipatoe->mask_bits == new->mask_bits)) { | 729 | (ipatoe->mask_bits == new->mask_bits)) { |
740 | PRINT_WARN("ipato entry already exists!\n"); | ||
741 | rc = -EEXIST; | 730 | rc = -EEXIST; |
742 | break; | 731 | break; |
743 | } | 732 | } |
@@ -802,7 +791,6 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto, | |||
802 | rc = -EEXIST; | 791 | rc = -EEXIST; |
803 | spin_unlock_irqrestore(&card->ip_lock, flags); | 792 | spin_unlock_irqrestore(&card->ip_lock, flags); |
804 | if (rc) { | 793 | if (rc) { |
805 | PRINT_WARN("Cannot add VIPA. Address already exists!\n"); | ||
806 | return rc; | 794 | return rc; |
807 | } | 795 | } |
808 | if (!qeth_l3_add_ip(card, ipaddr)) | 796 | if (!qeth_l3_add_ip(card, ipaddr)) |
@@ -867,7 +855,6 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto, | |||
867 | rc = -EEXIST; | 855 | rc = -EEXIST; |
868 | spin_unlock_irqrestore(&card->ip_lock, flags); | 856 | spin_unlock_irqrestore(&card->ip_lock, flags); |
869 | if (rc) { | 857 | if (rc) { |
870 | PRINT_WARN("Cannot add RXIP. Address already exists!\n"); | ||
871 | return rc; | 858 | return rc; |
872 | } | 859 | } |
873 | if (!qeth_l3_add_ip(card, ipaddr)) | 860 | if (!qeth_l3_add_ip(card, ipaddr)) |
@@ -1020,23 +1007,23 @@ static int qeth_l3_setadapter_hstr(struct qeth_card *card) | |||
1020 | IPA_SETADP_SET_BROADCAST_MODE, | 1007 | IPA_SETADP_SET_BROADCAST_MODE, |
1021 | card->options.broadcast_mode); | 1008 | card->options.broadcast_mode); |
1022 | if (rc) | 1009 | if (rc) |
1023 | PRINT_WARN("couldn't set broadcast mode on " | 1010 | QETH_DBF_MESSAGE(2, "couldn't set broadcast mode on " |
1024 | "device %s: x%x\n", | 1011 | "device %s: x%x\n", |
1025 | CARD_BUS_ID(card), rc); | 1012 | CARD_BUS_ID(card), rc); |
1026 | rc = qeth_l3_send_setadp_mode(card, | 1013 | rc = qeth_l3_send_setadp_mode(card, |
1027 | IPA_SETADP_ALTER_MAC_ADDRESS, | 1014 | IPA_SETADP_ALTER_MAC_ADDRESS, |
1028 | card->options.macaddr_mode); | 1015 | card->options.macaddr_mode); |
1029 | if (rc) | 1016 | if (rc) |
1030 | PRINT_WARN("couldn't set macaddr mode on " | 1017 | QETH_DBF_MESSAGE(2, "couldn't set macaddr mode on " |
1031 | "device %s: x%x\n", CARD_BUS_ID(card), rc); | 1018 | "device %s: x%x\n", CARD_BUS_ID(card), rc); |
1032 | return rc; | 1019 | return rc; |
1033 | } | 1020 | } |
1034 | if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL) | 1021 | if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL) |
1035 | PRINT_WARN("set adapter parameters not available " | 1022 | QETH_DBF_MESSAGE(2, "set adapter parameters not available " |
1036 | "to set broadcast mode, using ALLRINGS " | 1023 | "to set broadcast mode, using ALLRINGS " |
1037 | "on device %s:\n", CARD_BUS_ID(card)); | 1024 | "on device %s:\n", CARD_BUS_ID(card)); |
1038 | if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL) | 1025 | if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL) |
1039 | PRINT_WARN("set adapter parameters not available " | 1026 | QETH_DBF_MESSAGE(2, "set adapter parameters not available " |
1040 | "to set macaddr mode, using NONCANONICAL " | 1027 | "to set macaddr mode, using NONCANONICAL " |
1041 | "on device %s:\n", CARD_BUS_ID(card)); | 1028 | "on device %s:\n", CARD_BUS_ID(card)); |
1042 | return 0; | 1029 | return 0; |
@@ -2070,7 +2057,7 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev) | |||
2070 | card = netdev_priv(dev); | 2057 | card = netdev_priv(dev); |
2071 | else if (rc == QETH_VLAN_CARD) | 2058 | else if (rc == QETH_VLAN_CARD) |
2072 | card = netdev_priv(vlan_dev_info(dev)->real_dev); | 2059 | card = netdev_priv(vlan_dev_info(dev)->real_dev); |
2073 | if (card->options.layer2) | 2060 | if (card && card->options.layer2) |
2074 | card = NULL; | 2061 | card = NULL; |
2075 | QETH_DBF_TEXT_(TRACE, 4, "%d", rc); | 2062 | QETH_DBF_TEXT_(TRACE, 4, "%d", rc); |
2076 | return card ; | 2063 | return card ; |
@@ -2182,8 +2169,6 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries) | |||
2182 | if (card->info.guestlan) | 2169 | if (card->info.guestlan) |
2183 | return -EOPNOTSUPP; | 2170 | return -EOPNOTSUPP; |
2184 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2171 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2185 | PRINT_WARN("ARP processing not supported " | ||
2186 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
2187 | return -EOPNOTSUPP; | 2172 | return -EOPNOTSUPP; |
2188 | } | 2173 | } |
2189 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, | 2174 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, |
@@ -2191,8 +2176,8 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries) | |||
2191 | no_entries); | 2176 | no_entries); |
2192 | if (rc) { | 2177 | if (rc) { |
2193 | tmp = rc; | 2178 | tmp = rc; |
2194 | PRINT_WARN("Could not set number of ARP entries on %s: " | 2179 | QETH_DBF_MESSAGE(2, "Could not set number of ARP entries on " |
2195 | "%s (0x%x/%d)\n", QETH_CARD_IFNAME(card), | 2180 | "%s: %s (0x%x/%d)\n", QETH_CARD_IFNAME(card), |
2196 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); | 2181 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); |
2197 | } | 2182 | } |
2198 | return rc; | 2183 | return rc; |
@@ -2260,9 +2245,6 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card, | |||
2260 | qdata->no_entries * uentry_size){ | 2245 | qdata->no_entries * uentry_size){ |
2261 | QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM); | 2246 | QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM); |
2262 | cmd->hdr.return_code = -ENOMEM; | 2247 | cmd->hdr.return_code = -ENOMEM; |
2263 | PRINT_WARN("query ARP user space buffer is too small for " | ||
2264 | "the returned number of ARP entries. " | ||
2265 | "Aborting query!\n"); | ||
2266 | goto out_error; | 2248 | goto out_error; |
2267 | } | 2249 | } |
2268 | QETH_DBF_TEXT_(TRACE, 4, "anore%i", | 2250 | QETH_DBF_TEXT_(TRACE, 4, "anore%i", |
@@ -2324,8 +2306,6 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata) | |||
2324 | 2306 | ||
2325 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ | 2307 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ |
2326 | IPA_ARP_PROCESSING)) { | 2308 | IPA_ARP_PROCESSING)) { |
2327 | PRINT_WARN("ARP processing not supported " | ||
2328 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
2329 | return -EOPNOTSUPP; | 2309 | return -EOPNOTSUPP; |
2330 | } | 2310 | } |
2331 | /* get size of userspace buffer and mask_bits -> 6 bytes */ | 2311 | /* get size of userspace buffer and mask_bits -> 6 bytes */ |
@@ -2344,7 +2324,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata) | |||
2344 | qeth_l3_arp_query_cb, (void *)&qinfo); | 2324 | qeth_l3_arp_query_cb, (void *)&qinfo); |
2345 | if (rc) { | 2325 | if (rc) { |
2346 | tmp = rc; | 2326 | tmp = rc; |
2347 | PRINT_WARN("Error while querying ARP cache on %s: %s " | 2327 | QETH_DBF_MESSAGE(2, "Error while querying ARP cache on %s: %s " |
2348 | "(0x%x/%d)\n", QETH_CARD_IFNAME(card), | 2328 | "(0x%x/%d)\n", QETH_CARD_IFNAME(card), |
2349 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); | 2329 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); |
2350 | if (copy_to_user(udata, qinfo.udata, 4)) | 2330 | if (copy_to_user(udata, qinfo.udata, 4)) |
@@ -2375,8 +2355,6 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card, | |||
2375 | if (card->info.guestlan) | 2355 | if (card->info.guestlan) |
2376 | return -EOPNOTSUPP; | 2356 | return -EOPNOTSUPP; |
2377 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2357 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2378 | PRINT_WARN("ARP processing not supported " | ||
2379 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
2380 | return -EOPNOTSUPP; | 2358 | return -EOPNOTSUPP; |
2381 | } | 2359 | } |
2382 | 2360 | ||
@@ -2391,10 +2369,9 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card, | |||
2391 | if (rc) { | 2369 | if (rc) { |
2392 | tmp = rc; | 2370 | tmp = rc; |
2393 | qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); | 2371 | qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); |
2394 | PRINT_WARN("Could not add ARP entry for address %s on %s: " | 2372 | QETH_DBF_MESSAGE(2, "Could not add ARP entry for address %s " |
2395 | "%s (0x%x/%d)\n", | 2373 | "on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card), |
2396 | buf, QETH_CARD_IFNAME(card), | 2374 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); |
2397 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); | ||
2398 | } | 2375 | } |
2399 | return rc; | 2376 | return rc; |
2400 | } | 2377 | } |
@@ -2417,8 +2394,6 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card, | |||
2417 | if (card->info.guestlan) | 2394 | if (card->info.guestlan) |
2418 | return -EOPNOTSUPP; | 2395 | return -EOPNOTSUPP; |
2419 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2396 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2420 | PRINT_WARN("ARP processing not supported " | ||
2421 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
2422 | return -EOPNOTSUPP; | 2397 | return -EOPNOTSUPP; |
2423 | } | 2398 | } |
2424 | memcpy(buf, entry, 12); | 2399 | memcpy(buf, entry, 12); |
@@ -2433,10 +2408,9 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card, | |||
2433 | tmp = rc; | 2408 | tmp = rc; |
2434 | memset(buf, 0, 16); | 2409 | memset(buf, 0, 16); |
2435 | qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); | 2410 | qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); |
2436 | PRINT_WARN("Could not delete ARP entry for address %s on %s: " | 2411 | QETH_DBF_MESSAGE(2, "Could not delete ARP entry for address %s" |
2437 | "%s (0x%x/%d)\n", | 2412 | " on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card), |
2438 | buf, QETH_CARD_IFNAME(card), | 2413 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); |
2439 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); | ||
2440 | } | 2414 | } |
2441 | return rc; | 2415 | return rc; |
2442 | } | 2416 | } |
@@ -2456,16 +2430,14 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card) | |||
2456 | if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) | 2430 | if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) |
2457 | return -EOPNOTSUPP; | 2431 | return -EOPNOTSUPP; |
2458 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 2432 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
2459 | PRINT_WARN("ARP processing not supported " | ||
2460 | "on %s!\n", QETH_CARD_IFNAME(card)); | ||
2461 | return -EOPNOTSUPP; | 2433 | return -EOPNOTSUPP; |
2462 | } | 2434 | } |
2463 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, | 2435 | rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, |
2464 | IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); | 2436 | IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); |
2465 | if (rc) { | 2437 | if (rc) { |
2466 | tmp = rc; | 2438 | tmp = rc; |
2467 | PRINT_WARN("Could not flush ARP cache on %s: %s (0x%x/%d)\n", | 2439 | QETH_DBF_MESSAGE(2, "Could not flush ARP cache on %s: %s " |
2468 | QETH_CARD_IFNAME(card), | 2440 | "(0x%x/%d)\n", QETH_CARD_IFNAME(card), |
2469 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); | 2441 | qeth_l3_arp_get_error_cause(&rc), tmp, tmp); |
2470 | } | 2442 | } |
2471 | return rc; | 2443 | return rc; |
@@ -2724,7 +2696,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2724 | ctx = qeth_eddp_create_context(card, new_skb, hdr, | 2696 | ctx = qeth_eddp_create_context(card, new_skb, hdr, |
2725 | skb->sk->sk_protocol); | 2697 | skb->sk->sk_protocol); |
2726 | if (ctx == NULL) { | 2698 | if (ctx == NULL) { |
2727 | PRINT_WARN("could not create eddp context\n"); | 2699 | QETH_DBF_MESSAGE(2, "could not create eddp context\n"); |
2728 | goto tx_drop; | 2700 | goto tx_drop; |
2729 | } | 2701 | } |
2730 | } else { | 2702 | } else { |
@@ -2792,6 +2764,7 @@ tx_drop: | |||
2792 | if ((new_skb != skb) && new_skb) | 2764 | if ((new_skb != skb) && new_skb) |
2793 | dev_kfree_skb_any(new_skb); | 2765 | dev_kfree_skb_any(new_skb); |
2794 | dev_kfree_skb_any(skb); | 2766 | dev_kfree_skb_any(skb); |
2767 | netif_wake_queue(dev); | ||
2795 | return NETDEV_TX_OK; | 2768 | return NETDEV_TX_OK; |
2796 | } | 2769 | } |
2797 | 2770 | ||
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 08f51fd902c4..ac1993708ae9 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -85,7 +85,6 @@ static ssize_t qeth_l3_dev_route_store(struct qeth_card *card, | |||
85 | } else if (!strcmp(tmp, "multicast_router")) { | 85 | } else if (!strcmp(tmp, "multicast_router")) { |
86 | route->type = MULTICAST_ROUTER; | 86 | route->type = MULTICAST_ROUTER; |
87 | } else { | 87 | } else { |
88 | PRINT_WARN("Invalid routing type '%s'.\n", tmp); | ||
89 | return -EINVAL; | 88 | return -EINVAL; |
90 | } | 89 | } |
91 | if (((card->state == CARD_STATE_SOFTSETUP) || | 90 | if (((card->state == CARD_STATE_SOFTSETUP) || |
@@ -137,9 +136,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev, | |||
137 | return -EINVAL; | 136 | return -EINVAL; |
138 | 137 | ||
139 | if (!qeth_is_supported(card, IPA_IPV6)) { | 138 | if (!qeth_is_supported(card, IPA_IPV6)) { |
140 | PRINT_WARN("IPv6 not supported for interface %s.\n" | ||
141 | "Routing status no changed.\n", | ||
142 | QETH_CARD_IFNAME(card)); | ||
143 | return -ENOTSUPP; | 139 | return -ENOTSUPP; |
144 | } | 140 | } |
145 | 141 | ||
@@ -179,7 +175,6 @@ static ssize_t qeth_l3_dev_fake_broadcast_store(struct device *dev, | |||
179 | if ((i == 0) || (i == 1)) | 175 | if ((i == 0) || (i == 1)) |
180 | card->options.fake_broadcast = i; | 176 | card->options.fake_broadcast = i; |
181 | else { | 177 | else { |
182 | PRINT_WARN("fake_broadcast: write 0 or 1 to this file!\n"); | ||
183 | return -EINVAL; | 178 | return -EINVAL; |
184 | } | 179 | } |
185 | return count; | 180 | return count; |
@@ -220,7 +215,6 @@ static ssize_t qeth_l3_dev_broadcast_mode_store(struct device *dev, | |||
220 | 215 | ||
221 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | 216 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || |
222 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { | 217 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { |
223 | PRINT_WARN("Device is not a tokenring device!\n"); | ||
224 | return -EINVAL; | 218 | return -EINVAL; |
225 | } | 219 | } |
226 | 220 | ||
@@ -233,8 +227,6 @@ static ssize_t qeth_l3_dev_broadcast_mode_store(struct device *dev, | |||
233 | card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; | 227 | card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; |
234 | return count; | 228 | return count; |
235 | } else { | 229 | } else { |
236 | PRINT_WARN("broadcast_mode: invalid mode %s!\n", | ||
237 | tmp); | ||
238 | return -EINVAL; | 230 | return -EINVAL; |
239 | } | 231 | } |
240 | return count; | 232 | return count; |
@@ -275,7 +267,6 @@ static ssize_t qeth_l3_dev_canonical_macaddr_store(struct device *dev, | |||
275 | 267 | ||
276 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | 268 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || |
277 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { | 269 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { |
278 | PRINT_WARN("Device is not a tokenring device!\n"); | ||
279 | return -EINVAL; | 270 | return -EINVAL; |
280 | } | 271 | } |
281 | 272 | ||
@@ -285,7 +276,6 @@ static ssize_t qeth_l3_dev_canonical_macaddr_store(struct device *dev, | |||
285 | QETH_TR_MACADDR_CANONICAL : | 276 | QETH_TR_MACADDR_CANONICAL : |
286 | QETH_TR_MACADDR_NONCANONICAL; | 277 | QETH_TR_MACADDR_NONCANONICAL; |
287 | else { | 278 | else { |
288 | PRINT_WARN("canonical_macaddr: write 0 or 1 to this file!\n"); | ||
289 | return -EINVAL; | 279 | return -EINVAL; |
290 | } | 280 | } |
291 | return count; | 281 | return count; |
@@ -327,7 +317,6 @@ static ssize_t qeth_l3_dev_checksum_store(struct device *dev, | |||
327 | else if (!strcmp(tmp, "no_checksumming")) | 317 | else if (!strcmp(tmp, "no_checksumming")) |
328 | card->options.checksum_type = NO_CHECKSUMMING; | 318 | card->options.checksum_type = NO_CHECKSUMMING; |
329 | else { | 319 | else { |
330 | PRINT_WARN("Unknown checksumming type '%s'\n", tmp); | ||
331 | return -EINVAL; | 320 | return -EINVAL; |
332 | } | 321 | } |
333 | return count; | 322 | return count; |
@@ -382,8 +371,6 @@ static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, | |||
382 | } else if (!strcmp(tmp, "0")) { | 371 | } else if (!strcmp(tmp, "0")) { |
383 | card->ipato.enabled = 0; | 372 | card->ipato.enabled = 0; |
384 | } else { | 373 | } else { |
385 | PRINT_WARN("ipato_enable: write 0, 1 or 'toggle' to " | ||
386 | "this file\n"); | ||
387 | return -EINVAL; | 374 | return -EINVAL; |
388 | } | 375 | } |
389 | return count; | 376 | return count; |
@@ -422,8 +409,6 @@ static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev, | |||
422 | } else if (!strcmp(tmp, "0")) { | 409 | } else if (!strcmp(tmp, "0")) { |
423 | card->ipato.invert4 = 0; | 410 | card->ipato.invert4 = 0; |
424 | } else { | 411 | } else { |
425 | PRINT_WARN("ipato_invert4: write 0, 1 or 'toggle' to " | ||
426 | "this file\n"); | ||
427 | return -EINVAL; | 412 | return -EINVAL; |
428 | } | 413 | } |
429 | return count; | 414 | return count; |
@@ -486,13 +471,10 @@ static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto, | |||
486 | /* get address string */ | 471 | /* get address string */ |
487 | end = strchr(start, '/'); | 472 | end = strchr(start, '/'); |
488 | if (!end || (end - start >= 40)) { | 473 | if (!end || (end - start >= 40)) { |
489 | PRINT_WARN("Invalid format for ipato_addx/delx. " | ||
490 | "Use <ip addr>/<mask bits>\n"); | ||
491 | return -EINVAL; | 474 | return -EINVAL; |
492 | } | 475 | } |
493 | strncpy(buffer, start, end - start); | 476 | strncpy(buffer, start, end - start); |
494 | if (qeth_l3_string_to_ipaddr(buffer, proto, addr)) { | 477 | if (qeth_l3_string_to_ipaddr(buffer, proto, addr)) { |
495 | PRINT_WARN("Invalid IP address format!\n"); | ||
496 | return -EINVAL; | 478 | return -EINVAL; |
497 | } | 479 | } |
498 | start = end + 1; | 480 | start = end + 1; |
@@ -500,7 +482,6 @@ static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto, | |||
500 | if (!strlen(start) || | 482 | if (!strlen(start) || |
501 | (tmp == start) || | 483 | (tmp == start) || |
502 | (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) { | 484 | (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) { |
503 | PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n"); | ||
504 | return -EINVAL; | 485 | return -EINVAL; |
505 | } | 486 | } |
506 | return 0; | 487 | return 0; |
@@ -520,7 +501,6 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count, | |||
520 | 501 | ||
521 | ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL); | 502 | ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL); |
522 | if (!ipatoe) { | 503 | if (!ipatoe) { |
523 | PRINT_WARN("No memory to allocate ipato entry\n"); | ||
524 | return -ENOMEM; | 504 | return -ENOMEM; |
525 | } | 505 | } |
526 | ipatoe->proto = proto; | 506 | ipatoe->proto = proto; |
@@ -609,8 +589,6 @@ static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev, | |||
609 | } else if (!strcmp(tmp, "0")) { | 589 | } else if (!strcmp(tmp, "0")) { |
610 | card->ipato.invert6 = 0; | 590 | card->ipato.invert6 = 0; |
611 | } else { | 591 | } else { |
612 | PRINT_WARN("ipato_invert6: write 0, 1 or 'toggle' to " | ||
613 | "this file\n"); | ||
614 | return -EINVAL; | 592 | return -EINVAL; |
615 | } | 593 | } |
616 | return count; | 594 | return count; |
@@ -724,7 +702,6 @@ static int qeth_l3_parse_vipae(const char *buf, enum qeth_prot_versions proto, | |||
724 | u8 *addr) | 702 | u8 *addr) |
725 | { | 703 | { |
726 | if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { | 704 | if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { |
727 | PRINT_WARN("Invalid IP address format!\n"); | ||
728 | return -EINVAL; | 705 | return -EINVAL; |
729 | } | 706 | } |
730 | return 0; | 707 | return 0; |
@@ -891,7 +868,6 @@ static int qeth_l3_parse_rxipe(const char *buf, enum qeth_prot_versions proto, | |||
891 | u8 *addr) | 868 | u8 *addr) |
892 | { | 869 | { |
893 | if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { | 870 | if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { |
894 | PRINT_WARN("Invalid IP address format!\n"); | ||
895 | return -EINVAL; | 871 | return -EINVAL; |
896 | } | 872 | } |
897 | return 0; | 873 | return 0; |
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 5080f343ad74..5bfbe7659830 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c | |||
@@ -207,6 +207,7 @@ s390_handle_mcck(void) | |||
207 | do_exit(SIGSEGV); | 207 | do_exit(SIGSEGV); |
208 | } | 208 | } |
209 | } | 209 | } |
210 | EXPORT_SYMBOL_GPL(s390_handle_mcck); | ||
210 | 211 | ||
211 | /* | 212 | /* |
212 | * returns 0 if all registers could be validated | 213 | * returns 0 if all registers could be validated |
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c index b87037ec9805..03c966059471 100644 --- a/drivers/sbus/char/bpp.c +++ b/drivers/sbus/char/bpp.c | |||
@@ -869,7 +869,7 @@ static void probeLptPort(unsigned idx) | |||
869 | instances[idx].mode = COMPATIBILITY; | 869 | instances[idx].mode = COMPATIBILITY; |
870 | instances[idx].run_length = 0; | 870 | instances[idx].run_length = 0; |
871 | instances[idx].run_flag = 0; | 871 | instances[idx].run_flag = 0; |
872 | if (!request_region(lpAddr,3, dev_name)) return; | 872 | if (!request_region(lpAddr,3, bpp_dev_name)) return; |
873 | 873 | ||
874 | /* | 874 | /* |
875 | * First, make sure the instance exists. Do this by writing to | 875 | * First, make sure the instance exists. Do this by writing to |
@@ -1021,7 +1021,7 @@ static int __init bpp_init(void) | |||
1021 | if (rc == 0) | 1021 | if (rc == 0) |
1022 | return -ENODEV; | 1022 | return -ENODEV; |
1023 | 1023 | ||
1024 | rc = register_chrdev(BPP_MAJOR, dev_name, &bpp_fops); | 1024 | rc = register_chrdev(BPP_MAJOR, bpp_dev_name, &bpp_fops); |
1025 | if (rc < 0) | 1025 | if (rc < 0) |
1026 | return rc; | 1026 | return rc; |
1027 | 1027 | ||
@@ -1037,7 +1037,7 @@ static void __exit bpp_cleanup(void) | |||
1037 | { | 1037 | { |
1038 | unsigned idx; | 1038 | unsigned idx; |
1039 | 1039 | ||
1040 | unregister_chrdev(BPP_MAJOR, dev_name); | 1040 | unregister_chrdev(BPP_MAJOR, bpp_dev_name); |
1041 | 1041 | ||
1042 | for (idx = 0; idx < BPP_NO; idx++) { | 1042 | for (idx = 0; idx < BPP_NO; idx++) { |
1043 | if (instances[idx].present) | 1043 | if (instances[idx].present) |
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index b31faeccb9cd..867f6fd5c2c0 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -1278,7 +1278,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance) | |||
1278 | error = 0; | 1278 | error = 0; |
1279 | /* Check for command packet errors */ | 1279 | /* Check for command packet errors */ |
1280 | if (full_command_packet->command.newcommand.status != 0) { | 1280 | if (full_command_packet->command.newcommand.status != 0) { |
1281 | if (tw_dev->srb[request_id] != 0) { | 1281 | if (tw_dev->srb[request_id] != NULL) { |
1282 | error = twa_fill_sense(tw_dev, request_id, 1, 1); | 1282 | error = twa_fill_sense(tw_dev, request_id, 1, 1); |
1283 | } else { | 1283 | } else { |
1284 | /* Skip ioctl error prints */ | 1284 | /* Skip ioctl error prints */ |
@@ -1290,7 +1290,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance) | |||
1290 | 1290 | ||
1291 | /* Check for correct state */ | 1291 | /* Check for correct state */ |
1292 | if (tw_dev->state[request_id] != TW_S_POSTED) { | 1292 | if (tw_dev->state[request_id] != TW_S_POSTED) { |
1293 | if (tw_dev->srb[request_id] != 0) { | 1293 | if (tw_dev->srb[request_id] != NULL) { |
1294 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted"); | 1294 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted"); |
1295 | TW_CLEAR_ALL_INTERRUPTS(tw_dev); | 1295 | TW_CLEAR_ALL_INTERRUPTS(tw_dev); |
1296 | goto twa_interrupt_bail; | 1296 | goto twa_interrupt_bail; |
@@ -1298,7 +1298,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance) | |||
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | /* Check for internal command completion */ | 1300 | /* Check for internal command completion */ |
1301 | if (tw_dev->srb[request_id] == 0) { | 1301 | if (tw_dev->srb[request_id] == NULL) { |
1302 | if (request_id != tw_dev->chrdev_request_id) { | 1302 | if (request_id != tw_dev->chrdev_request_id) { |
1303 | if (twa_aen_complete(tw_dev, request_id)) | 1303 | if (twa_aen_complete(tw_dev, request_id)) |
1304 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt"); | 1304 | TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt"); |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 1dca1775f4b1..0899cb61e3dd 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -3582,7 +3582,7 @@ static int checksetup(struct aha152x_setup *setup) | |||
3582 | if (i == ARRAY_SIZE(ports)) | 3582 | if (i == ARRAY_SIZE(ports)) |
3583 | return 0; | 3583 | return 0; |
3584 | 3584 | ||
3585 | if ( request_region(setup->io_port, IO_RANGE, "aha152x")==0 ) { | 3585 | if (!request_region(setup->io_port, IO_RANGE, "aha152x")) { |
3586 | printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); | 3586 | printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); |
3587 | return 0; | 3587 | return 0; |
3588 | } | 3588 | } |
@@ -3842,7 +3842,7 @@ static int __init aha152x_init(void) | |||
3842 | if ((setup_count == 1) && (setup[0].io_port == ports[i])) | 3842 | if ((setup_count == 1) && (setup[0].io_port == ports[i])) |
3843 | continue; | 3843 | continue; |
3844 | 3844 | ||
3845 | if ( request_region(ports[i], IO_RANGE, "aha152x")==0 ) { | 3845 | if (!request_region(ports[i], IO_RANGE, "aha152x")) { |
3846 | printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]); | 3846 | printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]); |
3847 | continue; | 3847 | continue; |
3848 | } | 3848 | } |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index db6de5e6afb3..7d311541c76c 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
@@ -747,7 +747,7 @@ static void send_s870(struct atp_unit *dev,unsigned char c) | |||
747 | dev->quhd[c] = 0; | 747 | dev->quhd[c] = 0; |
748 | } | 748 | } |
749 | workreq = dev->quereq[c][dev->quhd[c]]; | 749 | workreq = dev->quereq[c][dev->quhd[c]]; |
750 | if (dev->id[c][scmd_id(workreq)].curr_req == 0) { | 750 | if (dev->id[c][scmd_id(workreq)].curr_req == NULL) { |
751 | dev->id[c][scmd_id(workreq)].curr_req = workreq; | 751 | dev->id[c][scmd_id(workreq)].curr_req = workreq; |
752 | dev->last_cmd[c] = scmd_id(workreq); | 752 | dev->last_cmd[c] = scmd_id(workreq); |
753 | goto cmd_subp; | 753 | goto cmd_subp; |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index 75c84d7b9ce8..c4b938bc30d3 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -910,9 +910,9 @@ static int ch_probe(struct device *dev) | |||
910 | ch->minor = minor; | 910 | ch->minor = minor; |
911 | sprintf(ch->name,"ch%d",ch->minor); | 911 | sprintf(ch->name,"ch%d",ch->minor); |
912 | 912 | ||
913 | class_dev = device_create(ch_sysfs_class, dev, | 913 | class_dev = device_create_drvdata(ch_sysfs_class, dev, |
914 | MKDEV(SCSI_CHANGER_MAJOR,ch->minor), | 914 | MKDEV(SCSI_CHANGER_MAJOR, ch->minor), |
915 | "s%s", ch->name); | 915 | ch, "s%s", ch->name); |
916 | if (IS_ERR(class_dev)) { | 916 | if (IS_ERR(class_dev)) { |
917 | printk(KERN_WARNING "ch%d: device_create failed\n", | 917 | printk(KERN_WARNING "ch%d: device_create failed\n", |
918 | ch->minor); | 918 | ch->minor); |
@@ -926,7 +926,6 @@ static int ch_probe(struct device *dev) | |||
926 | if (init) | 926 | if (init) |
927 | ch_init_elem(ch); | 927 | ch_init_elem(ch); |
928 | 928 | ||
929 | dev_set_drvdata(dev, ch); | ||
930 | sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); | 929 | sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); |
931 | 930 | ||
932 | return 0; | 931 | return 0; |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index aaa48e0c8ed0..da876d3924be 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -444,7 +444,7 @@ static void __iomem *hptiop_map_pci_bar(struct hptiop_hba *hba, int index) | |||
444 | if (!(pci_resource_flags(pcidev, index) & IORESOURCE_MEM)) { | 444 | if (!(pci_resource_flags(pcidev, index) & IORESOURCE_MEM)) { |
445 | printk(KERN_ERR "scsi%d: pci resource invalid\n", | 445 | printk(KERN_ERR "scsi%d: pci resource invalid\n", |
446 | hba->host->host_no); | 446 | hba->host->host_no); |
447 | return 0; | 447 | return NULL; |
448 | } | 448 | } |
449 | 449 | ||
450 | mem_base_phy = pci_resource_start(pcidev, index); | 450 | mem_base_phy = pci_resource_start(pcidev, index); |
@@ -454,7 +454,7 @@ static void __iomem *hptiop_map_pci_bar(struct hptiop_hba *hba, int index) | |||
454 | if (!mem_base_virt) { | 454 | if (!mem_base_virt) { |
455 | printk(KERN_ERR "scsi%d: Fail to ioremap memory space\n", | 455 | printk(KERN_ERR "scsi%d: Fail to ioremap memory space\n", |
456 | hba->host->host_no); | 456 | hba->host->host_no); |
457 | return 0; | 457 | return NULL; |
458 | } | 458 | } |
459 | return mem_base_virt; | 459 | return mem_base_virt; |
460 | } | 460 | } |
@@ -476,11 +476,11 @@ static void hptiop_unmap_pci_bar_itl(struct hptiop_hba *hba) | |||
476 | static int hptiop_map_pci_bar_mv(struct hptiop_hba *hba) | 476 | static int hptiop_map_pci_bar_mv(struct hptiop_hba *hba) |
477 | { | 477 | { |
478 | hba->u.mv.regs = hptiop_map_pci_bar(hba, 0); | 478 | hba->u.mv.regs = hptiop_map_pci_bar(hba, 0); |
479 | if (hba->u.mv.regs == 0) | 479 | if (hba->u.mv.regs == NULL) |
480 | return -1; | 480 | return -1; |
481 | 481 | ||
482 | hba->u.mv.mu = hptiop_map_pci_bar(hba, 2); | 482 | hba->u.mv.mu = hptiop_map_pci_bar(hba, 2); |
483 | if (hba->u.mv.mu == 0) { | 483 | if (hba->u.mv.mu == NULL) { |
484 | iounmap(hba->u.mv.regs); | 484 | iounmap(hba->u.mv.regs); |
485 | return -1; | 485 | return -1; |
486 | } | 486 | } |
@@ -1210,8 +1210,8 @@ static void hptiop_remove(struct pci_dev *pcidev) | |||
1210 | 1210 | ||
1211 | static struct hptiop_adapter_ops hptiop_itl_ops = { | 1211 | static struct hptiop_adapter_ops hptiop_itl_ops = { |
1212 | .iop_wait_ready = iop_wait_ready_itl, | 1212 | .iop_wait_ready = iop_wait_ready_itl, |
1213 | .internal_memalloc = 0, | 1213 | .internal_memalloc = NULL, |
1214 | .internal_memfree = 0, | 1214 | .internal_memfree = NULL, |
1215 | .map_pci_bar = hptiop_map_pci_bar_itl, | 1215 | .map_pci_bar = hptiop_map_pci_bar_itl, |
1216 | .unmap_pci_bar = hptiop_unmap_pci_bar_itl, | 1216 | .unmap_pci_bar = hptiop_unmap_pci_bar_itl, |
1217 | .enable_intr = hptiop_enable_intr_itl, | 1217 | .enable_intr = hptiop_enable_intr_itl, |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index ccfd8aca3765..5d23368a1bce 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -1348,7 +1348,7 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq, | |||
1348 | 1348 | ||
1349 | del_timer(&evt_struct->timer); | 1349 | del_timer(&evt_struct->timer); |
1350 | 1350 | ||
1351 | if (crq->status != VIOSRP_OK && evt_struct->cmnd) | 1351 | if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd) |
1352 | evt_struct->cmnd->result = DID_ERROR << 16; | 1352 | evt_struct->cmnd->result = DID_ERROR << 16; |
1353 | if (evt_struct->done) | 1353 | if (evt_struct->done) |
1354 | evt_struct->done(evt_struct); | 1354 | evt_struct->done(evt_struct); |
diff --git a/drivers/scsi/ibmvscsi/viosrp.h b/drivers/scsi/ibmvscsi/viosrp.h index 4c4aadb3e405..204604501ad8 100644 --- a/drivers/scsi/ibmvscsi/viosrp.h +++ b/drivers/scsi/ibmvscsi/viosrp.h | |||
@@ -65,7 +65,8 @@ enum viosrp_crq_status { | |||
65 | VIOSRP_VIOLATES_MAX_XFER = 0x2, | 65 | VIOSRP_VIOLATES_MAX_XFER = 0x2, |
66 | VIOSRP_PARTNER_PANIC = 0x3, | 66 | VIOSRP_PARTNER_PANIC = 0x3, |
67 | VIOSRP_DEVICE_BUSY = 0x8, | 67 | VIOSRP_DEVICE_BUSY = 0x8, |
68 | VIOSRP_ADAPTER_FAIL = 0x10 | 68 | VIOSRP_ADAPTER_FAIL = 0x10, |
69 | VIOSRP_OK2 = 0x99, | ||
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct viosrp_crq { | 72 | struct viosrp_crq { |
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c index cd37bd69a115..887682a24e36 100644 --- a/drivers/scsi/mac_esp.c +++ b/drivers/scsi/mac_esp.c | |||
@@ -650,7 +650,7 @@ static void __exit mac_esp_exit(void) | |||
650 | 650 | ||
651 | MODULE_DESCRIPTION("Mac ESP SCSI driver"); | 651 | MODULE_DESCRIPTION("Mac ESP SCSI driver"); |
652 | MODULE_AUTHOR("Finn Thain <fthain@telegraphics.com.au>"); | 652 | MODULE_AUTHOR("Finn Thain <fthain@telegraphics.com.au>"); |
653 | MODULE_LICENSE("GPLv2"); | 653 | MODULE_LICENSE("GPL v2"); |
654 | MODULE_VERSION(DRV_VERSION); | 654 | MODULE_VERSION(DRV_VERSION); |
655 | 655 | ||
656 | module_init(mac_esp_init); | 656 | module_init(mac_esp_init); |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 31f7aec44d90..243d8becd30f 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -5695,13 +5695,12 @@ static int osst_sysfs_add(dev_t dev, struct device *device, struct osst_tape * S | |||
5695 | struct device *osst_member; | 5695 | struct device *osst_member; |
5696 | int err; | 5696 | int err; |
5697 | 5697 | ||
5698 | osst_member = device_create(osst_sysfs_class, device, dev, "%s", name); | 5698 | osst_member = device_create_drvdata(osst_sysfs_class, device, dev, STp, "%s", name); |
5699 | if (IS_ERR(osst_member)) { | 5699 | if (IS_ERR(osst_member)) { |
5700 | printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name); | 5700 | printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name); |
5701 | return PTR_ERR(osst_member); | 5701 | return PTR_ERR(osst_member); |
5702 | } | 5702 | } |
5703 | 5703 | ||
5704 | dev_set_drvdata(osst_member, STp); | ||
5705 | err = device_create_file(osst_member, &dev_attr_ADR_rev); | 5704 | err = device_create_file(osst_member, &dev_attr_ADR_rev); |
5706 | if (err) | 5705 | if (err) |
5707 | goto err_out; | 5706 | goto err_out; |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 51e2f299dbbb..3754ab87f89a 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -2811,7 +2811,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) | |||
2811 | 2811 | ||
2812 | /* Check for room in outstanding command list. */ | 2812 | /* Check for room in outstanding command list. */ |
2813 | for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && | 2813 | for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && |
2814 | ha->outstanding_cmds[cnt] != 0; cnt++); | 2814 | ha->outstanding_cmds[cnt] != NULL; cnt++); |
2815 | 2815 | ||
2816 | if (cnt >= MAX_OUTSTANDING_COMMANDS) { | 2816 | if (cnt >= MAX_OUTSTANDING_COMMANDS) { |
2817 | status = 1; | 2817 | status = 1; |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 287690853caf..8dd88fc1244a 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -70,6 +70,9 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, | |||
70 | case 2: | 70 | case 2: |
71 | qla2x00_alloc_fw_dump(ha); | 71 | qla2x00_alloc_fw_dump(ha); |
72 | break; | 72 | break; |
73 | case 3: | ||
74 | qla2x00_system_error(ha); | ||
75 | break; | ||
73 | } | 76 | } |
74 | return (count); | 77 | return (count); |
75 | } | 78 | } |
@@ -886,9 +889,13 @@ qla2x00_get_host_speed(struct Scsi_Host *shost) | |||
886 | static void | 889 | static void |
887 | qla2x00_get_host_port_type(struct Scsi_Host *shost) | 890 | qla2x00_get_host_port_type(struct Scsi_Host *shost) |
888 | { | 891 | { |
889 | scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost)); | 892 | scsi_qla_host_t *ha = shost_priv(shost); |
890 | uint32_t port_type = FC_PORTTYPE_UNKNOWN; | 893 | uint32_t port_type = FC_PORTTYPE_UNKNOWN; |
891 | 894 | ||
895 | if (ha->parent) { | ||
896 | fc_host_port_type(shost) = FC_PORTTYPE_NPIV; | ||
897 | return; | ||
898 | } | ||
892 | switch (ha->current_topology) { | 899 | switch (ha->current_topology) { |
893 | case ISP_CFG_NL: | 900 | case ISP_CFG_NL: |
894 | port_type = FC_PORTTYPE_LPORT; | 901 | port_type = FC_PORTTYPE_LPORT; |
@@ -1172,10 +1179,10 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
1172 | qla24xx_disable_vp(vha); | 1179 | qla24xx_disable_vp(vha); |
1173 | qla24xx_deallocate_vp_id(vha); | 1180 | qla24xx_deallocate_vp_id(vha); |
1174 | 1181 | ||
1175 | down(&ha->vport_sem); | 1182 | mutex_lock(&ha->vport_lock); |
1176 | ha->cur_vport_count--; | 1183 | ha->cur_vport_count--; |
1177 | clear_bit(vha->vp_idx, ha->vp_idx_map); | 1184 | clear_bit(vha->vp_idx, ha->vp_idx_map); |
1178 | up(&ha->vport_sem); | 1185 | mutex_unlock(&ha->vport_lock); |
1179 | 1186 | ||
1180 | kfree(vha->node_name); | 1187 | kfree(vha->node_name); |
1181 | kfree(vha->port_name); | 1188 | kfree(vha->port_name); |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 299eccf6cabd..8dd600013bd1 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2457,7 +2457,7 @@ typedef struct scsi_qla_host { | |||
2457 | #define MBX_INTR_WAIT 2 | 2457 | #define MBX_INTR_WAIT 2 |
2458 | #define MBX_UPDATE_FLASH_ACTIVE 3 | 2458 | #define MBX_UPDATE_FLASH_ACTIVE 3 |
2459 | 2459 | ||
2460 | struct semaphore vport_sem; /* Virtual port synchronization */ | 2460 | struct mutex vport_lock; /* Virtual port synchronization */ |
2461 | struct completion mbx_cmd_comp; /* Serialize mbx access */ | 2461 | struct completion mbx_cmd_comp; /* Serialize mbx access */ |
2462 | struct completion mbx_intr_comp; /* Used for completion notification */ | 2462 | struct completion mbx_intr_comp; /* Used for completion notification */ |
2463 | 2463 | ||
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f8827068d30f..9b4bebee6879 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -228,6 +228,9 @@ extern int qla24xx_abort_target(struct fc_port *, unsigned int); | |||
228 | extern int qla24xx_lun_reset(struct fc_port *, unsigned int); | 228 | extern int qla24xx_lun_reset(struct fc_port *, unsigned int); |
229 | 229 | ||
230 | extern int | 230 | extern int |
231 | qla2x00_system_error(scsi_qla_host_t *); | ||
232 | |||
233 | extern int | ||
231 | qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); | 234 | qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); |
232 | 235 | ||
233 | extern int | 236 | extern int |
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index e9bae27737d1..92fafbdbbaab 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -34,7 +34,11 @@ qla2x00_debounce_register(volatile uint16_t __iomem *addr) | |||
34 | static inline void | 34 | static inline void |
35 | qla2x00_poll(scsi_qla_host_t *ha) | 35 | qla2x00_poll(scsi_qla_host_t *ha) |
36 | { | 36 | { |
37 | unsigned long flags; | ||
38 | |||
39 | local_irq_save(flags); | ||
37 | ha->isp_ops->intr_handler(0, ha); | 40 | ha->isp_ops->intr_handler(0, ha); |
41 | local_irq_restore(flags); | ||
38 | } | 42 | } |
39 | 43 | ||
40 | static __inline__ scsi_qla_host_t * | 44 | static __inline__ scsi_qla_host_t * |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 5d9a64a7879b..ec63b79f900a 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -272,8 +272,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
272 | uint32_t rscn_entry, host_pid; | 272 | uint32_t rscn_entry, host_pid; |
273 | uint8_t rscn_queue_index; | 273 | uint8_t rscn_queue_index; |
274 | unsigned long flags; | 274 | unsigned long flags; |
275 | scsi_qla_host_t *vha; | ||
276 | int i; | ||
277 | 275 | ||
278 | /* Setup to process RIO completion. */ | 276 | /* Setup to process RIO completion. */ |
279 | handle_cnt = 0; | 277 | handle_cnt = 0; |
@@ -544,18 +542,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
544 | break; | 542 | break; |
545 | 543 | ||
546 | case MBA_PORT_UPDATE: /* Port database update */ | 544 | case MBA_PORT_UPDATE: /* Port database update */ |
547 | if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { | 545 | /* Only handle SCNs for our Vport index. */ |
548 | for_each_mapped_vp_idx(ha, i) { | 546 | if (ha->parent && ha->vp_idx != (mb[3] & 0xff)) |
549 | list_for_each_entry(vha, &ha->vp_list, | 547 | break; |
550 | vp_list) { | 548 | |
551 | if ((mb[3] & 0xff) | ||
552 | == vha->vp_idx) { | ||
553 | ha = vha; | ||
554 | break; | ||
555 | } | ||
556 | } | ||
557 | } | ||
558 | } | ||
559 | /* | 549 | /* |
560 | * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET | 550 | * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET |
561 | * event etc. earlier indicating loop is down) then process | 551 | * event etc. earlier indicating loop is down) then process |
@@ -590,18 +580,12 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
590 | break; | 580 | break; |
591 | 581 | ||
592 | case MBA_RSCN_UPDATE: /* State Change Registration */ | 582 | case MBA_RSCN_UPDATE: /* State Change Registration */ |
593 | if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { | 583 | /* Check if the Vport has issued a SCR */ |
594 | for_each_mapped_vp_idx(ha, i) { | 584 | if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags)) |
595 | list_for_each_entry(vha, &ha->vp_list, | 585 | break; |
596 | vp_list) { | 586 | /* Only handle SCNs for our Vport index. */ |
597 | if ((mb[3] & 0xff) | 587 | if (ha->parent && ha->vp_idx != (mb[3] & 0xff)) |
598 | == vha->vp_idx) { | 588 | break; |
599 | ha = vha; | ||
600 | break; | ||
601 | } | ||
602 | } | ||
603 | } | ||
604 | } | ||
605 | 589 | ||
606 | DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", | 590 | DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", |
607 | ha->host_no)); | 591 | ha->host_no)); |
@@ -1132,25 +1116,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1132 | break; | 1116 | break; |
1133 | 1117 | ||
1134 | qla2x00_handle_sense(sp, sense_data, sense_len); | 1118 | qla2x00_handle_sense(sp, sense_data, sense_len); |
1135 | |||
1136 | /* | ||
1137 | * In case of a Underrun condition, set both the lscsi | ||
1138 | * status and the completion status to appropriate | ||
1139 | * values. | ||
1140 | */ | ||
1141 | if (resid && | ||
1142 | ((unsigned)(scsi_bufflen(cp) - resid) < | ||
1143 | cp->underflow)) { | ||
1144 | DEBUG2(qla_printk(KERN_INFO, ha, | ||
1145 | "scsi(%ld:%d:%d:%d): Mid-layer underflow " | ||
1146 | "detected (%x of %x bytes)...returning " | ||
1147 | "error status.\n", ha->host_no, | ||
1148 | cp->device->channel, cp->device->id, | ||
1149 | cp->device->lun, resid, | ||
1150 | scsi_bufflen(cp))); | ||
1151 | |||
1152 | cp->result = DID_ERROR << 16 | lscsi_status; | ||
1153 | } | ||
1154 | } else { | 1119 | } else { |
1155 | /* | 1120 | /* |
1156 | * If RISC reports underrun and target does not report | 1121 | * If RISC reports underrun and target does not report |
@@ -1639,12 +1604,12 @@ qla24xx_msix_rsp_q(int irq, void *dev_id) | |||
1639 | ha = dev_id; | 1604 | ha = dev_id; |
1640 | reg = &ha->iobase->isp24; | 1605 | reg = &ha->iobase->isp24; |
1641 | 1606 | ||
1642 | spin_lock(&ha->hardware_lock); | 1607 | spin_lock_irq(&ha->hardware_lock); |
1643 | 1608 | ||
1644 | qla24xx_process_response_queue(ha); | 1609 | qla24xx_process_response_queue(ha); |
1645 | WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT); | 1610 | WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT); |
1646 | 1611 | ||
1647 | spin_unlock(&ha->hardware_lock); | 1612 | spin_unlock_irq(&ha->hardware_lock); |
1648 | 1613 | ||
1649 | return IRQ_HANDLED; | 1614 | return IRQ_HANDLED; |
1650 | } | 1615 | } |
@@ -1663,7 +1628,7 @@ qla24xx_msix_default(int irq, void *dev_id) | |||
1663 | reg = &ha->iobase->isp24; | 1628 | reg = &ha->iobase->isp24; |
1664 | status = 0; | 1629 | status = 0; |
1665 | 1630 | ||
1666 | spin_lock(&ha->hardware_lock); | 1631 | spin_lock_irq(&ha->hardware_lock); |
1667 | do { | 1632 | do { |
1668 | stat = RD_REG_DWORD(®->host_status); | 1633 | stat = RD_REG_DWORD(®->host_status); |
1669 | if (stat & HSRX_RISC_PAUSED) { | 1634 | if (stat & HSRX_RISC_PAUSED) { |
@@ -1716,7 +1681,7 @@ qla24xx_msix_default(int irq, void *dev_id) | |||
1716 | } | 1681 | } |
1717 | WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT); | 1682 | WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT); |
1718 | } while (0); | 1683 | } while (0); |
1719 | spin_unlock(&ha->hardware_lock); | 1684 | spin_unlock_irq(&ha->hardware_lock); |
1720 | 1685 | ||
1721 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && | 1686 | if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && |
1722 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { | 1687 | (status & MBX_INTERRUPT) && ha->flags.mbox_int) { |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 210060420809..250d2f604397 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2303,8 +2303,6 @@ qla24xx_lun_reset(struct fc_port *fcport, unsigned int l) | |||
2303 | return __qla24xx_issue_tmf("Lun", TCF_LUN_RESET, fcport, l); | 2303 | return __qla24xx_issue_tmf("Lun", TCF_LUN_RESET, fcport, l); |
2304 | } | 2304 | } |
2305 | 2305 | ||
2306 | #if 0 | ||
2307 | |||
2308 | int | 2306 | int |
2309 | qla2x00_system_error(scsi_qla_host_t *ha) | 2307 | qla2x00_system_error(scsi_qla_host_t *ha) |
2310 | { | 2308 | { |
@@ -2312,7 +2310,7 @@ qla2x00_system_error(scsi_qla_host_t *ha) | |||
2312 | mbx_cmd_t mc; | 2310 | mbx_cmd_t mc; |
2313 | mbx_cmd_t *mcp = &mc; | 2311 | mbx_cmd_t *mcp = &mc; |
2314 | 2312 | ||
2315 | if (!IS_FWI2_CAPABLE(ha)) | 2313 | if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha)) |
2316 | return QLA_FUNCTION_FAILED; | 2314 | return QLA_FUNCTION_FAILED; |
2317 | 2315 | ||
2318 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); | 2316 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); |
@@ -2334,8 +2332,6 @@ qla2x00_system_error(scsi_qla_host_t *ha) | |||
2334 | return rval; | 2332 | return rval; |
2335 | } | 2333 | } |
2336 | 2334 | ||
2337 | #endif /* 0 */ | ||
2338 | |||
2339 | /** | 2335 | /** |
2340 | * qla2x00_set_serdes_params() - | 2336 | * qla2x00_set_serdes_params() - |
2341 | * @ha: HA context | 2337 | * @ha: HA context |
@@ -2508,7 +2504,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *ha, dma_addr_t fce_dma, | |||
2508 | if (mb) | 2504 | if (mb) |
2509 | memcpy(mb, mcp->mb, 8 * sizeof(*mb)); | 2505 | memcpy(mb, mcp->mb, 8 * sizeof(*mb)); |
2510 | if (dwords) | 2506 | if (dwords) |
2511 | *dwords = mcp->mb[6]; | 2507 | *dwords = buffers; |
2512 | } | 2508 | } |
2513 | 2509 | ||
2514 | return rval; | 2510 | return rval; |
@@ -2807,9 +2803,9 @@ qla24xx_control_vp(scsi_qla_host_t *vha, int cmd) | |||
2807 | */ | 2803 | */ |
2808 | map = (vp_index - 1) / 8; | 2804 | map = (vp_index - 1) / 8; |
2809 | pos = (vp_index - 1) & 7; | 2805 | pos = (vp_index - 1) & 7; |
2810 | down(&ha->vport_sem); | 2806 | mutex_lock(&ha->vport_lock); |
2811 | vce->vp_idx_map[map] |= 1 << pos; | 2807 | vce->vp_idx_map[map] |= 1 << pos; |
2812 | up(&ha->vport_sem); | 2808 | mutex_unlock(&ha->vport_lock); |
2813 | 2809 | ||
2814 | rval = qla2x00_issue_iocb(ha, vce, vce_dma, 0); | 2810 | rval = qla2x00_issue_iocb(ha, vce, vce_dma, 0); |
2815 | if (rval != QLA_SUCCESS) { | 2811 | if (rval != QLA_SUCCESS) { |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index f2b04979e5f0..62a3ad6e8ecb 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -32,12 +32,12 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha) | |||
32 | scsi_qla_host_t *ha = vha->parent; | 32 | scsi_qla_host_t *ha = vha->parent; |
33 | 33 | ||
34 | /* Find an empty slot and assign an vp_id */ | 34 | /* Find an empty slot and assign an vp_id */ |
35 | down(&ha->vport_sem); | 35 | mutex_lock(&ha->vport_lock); |
36 | vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); | 36 | vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); |
37 | if (vp_id > ha->max_npiv_vports) { | 37 | if (vp_id > ha->max_npiv_vports) { |
38 | DEBUG15(printk ("vp_id %d is bigger than max-supported %d.\n", | 38 | DEBUG15(printk ("vp_id %d is bigger than max-supported %d.\n", |
39 | vp_id, ha->max_npiv_vports)); | 39 | vp_id, ha->max_npiv_vports)); |
40 | up(&ha->vport_sem); | 40 | mutex_unlock(&ha->vport_lock); |
41 | return vp_id; | 41 | return vp_id; |
42 | } | 42 | } |
43 | 43 | ||
@@ -45,7 +45,7 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha) | |||
45 | ha->num_vhosts++; | 45 | ha->num_vhosts++; |
46 | vha->vp_idx = vp_id; | 46 | vha->vp_idx = vp_id; |
47 | list_add_tail(&vha->vp_list, &ha->vp_list); | 47 | list_add_tail(&vha->vp_list, &ha->vp_list); |
48 | up(&ha->vport_sem); | 48 | mutex_unlock(&ha->vport_lock); |
49 | return vp_id; | 49 | return vp_id; |
50 | } | 50 | } |
51 | 51 | ||
@@ -55,12 +55,12 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha) | |||
55 | uint16_t vp_id; | 55 | uint16_t vp_id; |
56 | scsi_qla_host_t *ha = vha->parent; | 56 | scsi_qla_host_t *ha = vha->parent; |
57 | 57 | ||
58 | down(&ha->vport_sem); | 58 | mutex_lock(&ha->vport_lock); |
59 | vp_id = vha->vp_idx; | 59 | vp_id = vha->vp_idx; |
60 | ha->num_vhosts--; | 60 | ha->num_vhosts--; |
61 | clear_bit(vp_id, ha->vp_idx_map); | 61 | clear_bit(vp_id, ha->vp_idx_map); |
62 | list_del(&vha->vp_list); | 62 | list_del(&vha->vp_list); |
63 | up(&ha->vport_sem); | 63 | mutex_unlock(&ha->vport_lock); |
64 | } | 64 | } |
65 | 65 | ||
66 | static scsi_qla_host_t * | 66 | static scsi_qla_host_t * |
@@ -145,9 +145,9 @@ qla24xx_enable_vp(scsi_qla_host_t *vha) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | /* Initialize the new vport unless it is a persistent port */ | 147 | /* Initialize the new vport unless it is a persistent port */ |
148 | down(&ha->vport_sem); | 148 | mutex_lock(&ha->vport_lock); |
149 | ret = qla24xx_modify_vp_config(vha); | 149 | ret = qla24xx_modify_vp_config(vha); |
150 | up(&ha->vport_sem); | 150 | mutex_unlock(&ha->vport_lock); |
151 | 151 | ||
152 | if (ret != QLA_SUCCESS) { | 152 | if (ret != QLA_SUCCESS) { |
153 | fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED); | 153 | fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED); |
@@ -406,6 +406,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
406 | INIT_LIST_HEAD(&vha->list); | 406 | INIT_LIST_HEAD(&vha->list); |
407 | INIT_LIST_HEAD(&vha->fcports); | 407 | INIT_LIST_HEAD(&vha->fcports); |
408 | INIT_LIST_HEAD(&vha->vp_fcports); | 408 | INIT_LIST_HEAD(&vha->vp_fcports); |
409 | INIT_LIST_HEAD(&vha->work_list); | ||
409 | 410 | ||
410 | vha->dpc_flags = 0L; | 411 | vha->dpc_flags = 0L; |
411 | set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); | 412 | set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); |
@@ -437,10 +438,10 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
437 | vha->flags.init_done = 1; | 438 | vha->flags.init_done = 1; |
438 | num_hosts++; | 439 | num_hosts++; |
439 | 440 | ||
440 | down(&ha->vport_sem); | 441 | mutex_lock(&ha->vport_lock); |
441 | set_bit(vha->vp_idx, ha->vp_idx_map); | 442 | set_bit(vha->vp_idx, ha->vp_idx_map); |
442 | ha->cur_vport_count++; | 443 | ha->cur_vport_count++; |
443 | up(&ha->vport_sem); | 444 | mutex_unlock(&ha->vport_lock); |
444 | 445 | ||
445 | return vha; | 446 | return vha; |
446 | 447 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 3223fd16bcfe..48eaa3bb5433 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/kthread.h> | 12 | #include <linux/kthread.h> |
13 | #include <linux/mutex.h> | ||
13 | 14 | ||
14 | #include <scsi/scsi_tcq.h> | 15 | #include <scsi/scsi_tcq.h> |
15 | #include <scsi/scsicam.h> | 16 | #include <scsi/scsicam.h> |
@@ -1631,7 +1632,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1631 | /* load the F/W, read paramaters, and init the H/W */ | 1632 | /* load the F/W, read paramaters, and init the H/W */ |
1632 | ha->instance = num_hosts; | 1633 | ha->instance = num_hosts; |
1633 | 1634 | ||
1634 | init_MUTEX(&ha->vport_sem); | 1635 | mutex_init(&ha->vport_lock); |
1635 | init_completion(&ha->mbx_cmd_comp); | 1636 | init_completion(&ha->mbx_cmd_comp); |
1636 | complete(&ha->mbx_cmd_comp); | 1637 | complete(&ha->mbx_cmd_comp); |
1637 | init_completion(&ha->mbx_intr_comp); | 1638 | init_completion(&ha->mbx_intr_comp); |
@@ -2156,13 +2157,14 @@ static int | |||
2156 | qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked) | 2157 | qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked) |
2157 | { | 2158 | { |
2158 | unsigned long flags; | 2159 | unsigned long flags; |
2160 | scsi_qla_host_t *pha = to_qla_parent(ha); | ||
2159 | 2161 | ||
2160 | if (!locked) | 2162 | if (!locked) |
2161 | spin_lock_irqsave(&ha->hardware_lock, flags); | 2163 | spin_lock_irqsave(&pha->hardware_lock, flags); |
2162 | list_add_tail(&e->list, &ha->work_list); | 2164 | list_add_tail(&e->list, &ha->work_list); |
2163 | qla2xxx_wake_dpc(ha); | 2165 | qla2xxx_wake_dpc(ha); |
2164 | if (!locked) | 2166 | if (!locked) |
2165 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 2167 | spin_unlock_irqrestore(&pha->hardware_lock, flags); |
2166 | return QLA_SUCCESS; | 2168 | return QLA_SUCCESS; |
2167 | } | 2169 | } |
2168 | 2170 | ||
@@ -2202,12 +2204,13 @@ static void | |||
2202 | qla2x00_do_work(struct scsi_qla_host *ha) | 2204 | qla2x00_do_work(struct scsi_qla_host *ha) |
2203 | { | 2205 | { |
2204 | struct qla_work_evt *e; | 2206 | struct qla_work_evt *e; |
2207 | scsi_qla_host_t *pha = to_qla_parent(ha); | ||
2205 | 2208 | ||
2206 | spin_lock_irq(&ha->hardware_lock); | 2209 | spin_lock_irq(&pha->hardware_lock); |
2207 | while (!list_empty(&ha->work_list)) { | 2210 | while (!list_empty(&ha->work_list)) { |
2208 | e = list_entry(ha->work_list.next, struct qla_work_evt, list); | 2211 | e = list_entry(ha->work_list.next, struct qla_work_evt, list); |
2209 | list_del_init(&e->list); | 2212 | list_del_init(&e->list); |
2210 | spin_unlock_irq(&ha->hardware_lock); | 2213 | spin_unlock_irq(&pha->hardware_lock); |
2211 | 2214 | ||
2212 | switch (e->type) { | 2215 | switch (e->type) { |
2213 | case QLA_EVT_AEN: | 2216 | case QLA_EVT_AEN: |
@@ -2221,9 +2224,9 @@ qla2x00_do_work(struct scsi_qla_host *ha) | |||
2221 | } | 2224 | } |
2222 | if (e->flags & QLA_EVT_FLAG_FREE) | 2225 | if (e->flags & QLA_EVT_FLAG_FREE) |
2223 | kfree(e); | 2226 | kfree(e); |
2224 | spin_lock_irq(&ha->hardware_lock); | 2227 | spin_lock_irq(&pha->hardware_lock); |
2225 | } | 2228 | } |
2226 | spin_unlock_irq(&ha->hardware_lock); | 2229 | spin_unlock_irq(&pha->hardware_lock); |
2227 | } | 2230 | } |
2228 | 2231 | ||
2229 | /************************************************************************** | 2232 | /************************************************************************** |
@@ -2634,7 +2637,7 @@ qla2x00_timer(scsi_qla_host_t *ha) | |||
2634 | #define FW_FILE_ISP24XX "ql2400_fw.bin" | 2637 | #define FW_FILE_ISP24XX "ql2400_fw.bin" |
2635 | #define FW_FILE_ISP25XX "ql2500_fw.bin" | 2638 | #define FW_FILE_ISP25XX "ql2500_fw.bin" |
2636 | 2639 | ||
2637 | static DECLARE_MUTEX(qla_fw_lock); | 2640 | static DEFINE_MUTEX(qla_fw_lock); |
2638 | 2641 | ||
2639 | static struct fw_blob qla_fw_blobs[FW_BLOBS] = { | 2642 | static struct fw_blob qla_fw_blobs[FW_BLOBS] = { |
2640 | { .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, }, | 2643 | { .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, }, |
@@ -2665,7 +2668,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha) | |||
2665 | blob = &qla_fw_blobs[FW_ISP25XX]; | 2668 | blob = &qla_fw_blobs[FW_ISP25XX]; |
2666 | } | 2669 | } |
2667 | 2670 | ||
2668 | down(&qla_fw_lock); | 2671 | mutex_lock(&qla_fw_lock); |
2669 | if (blob->fw) | 2672 | if (blob->fw) |
2670 | goto out; | 2673 | goto out; |
2671 | 2674 | ||
@@ -2678,7 +2681,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha) | |||
2678 | } | 2681 | } |
2679 | 2682 | ||
2680 | out: | 2683 | out: |
2681 | up(&qla_fw_lock); | 2684 | mutex_unlock(&qla_fw_lock); |
2682 | return blob; | 2685 | return blob; |
2683 | } | 2686 | } |
2684 | 2687 | ||
@@ -2687,11 +2690,11 @@ qla2x00_release_firmware(void) | |||
2687 | { | 2690 | { |
2688 | int idx; | 2691 | int idx; |
2689 | 2692 | ||
2690 | down(&qla_fw_lock); | 2693 | mutex_lock(&qla_fw_lock); |
2691 | for (idx = 0; idx < FW_BLOBS; idx++) | 2694 | for (idx = 0; idx < FW_BLOBS; idx++) |
2692 | if (qla_fw_blobs[idx].fw) | 2695 | if (qla_fw_blobs[idx].fw) |
2693 | release_firmware(qla_fw_blobs[idx].fw); | 2696 | release_firmware(qla_fw_blobs[idx].fw); |
2694 | up(&qla_fw_lock); | 2697 | mutex_unlock(&qla_fw_lock); |
2695 | } | 2698 | } |
2696 | 2699 | ||
2697 | static pci_ers_result_t | 2700 | static pci_ers_result_t |
@@ -2864,7 +2867,8 @@ qla2x00_module_init(void) | |||
2864 | return -ENODEV; | 2867 | return -ENODEV; |
2865 | } | 2868 | } |
2866 | 2869 | ||
2867 | printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n"); | 2870 | printk(KERN_INFO "QLogic Fibre Channel HBA Driver: %s\n", |
2871 | qla2x00_version_str); | ||
2868 | ret = pci_register_driver(&qla2xxx_pci_driver); | 2872 | ret = pci_register_driver(&qla2xxx_pci_driver); |
2869 | if (ret) { | 2873 | if (ret) { |
2870 | kmem_cache_destroy(srb_cachep); | 2874 | kmem_cache_destroy(srb_cachep); |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index afeae2bfe7eb..d058c8862b35 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.02.01-k2" | 10 | #define QLA2XXX_VERSION "8.02.01-k4" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 2 | 13 | #define QLA_DRIVER_MINOR_VER 2 |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 049103f1d16f..93d2b6714453 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -359,7 +359,12 @@ static int scsi_bus_match(struct device *dev, struct device_driver *gendrv) | |||
359 | 359 | ||
360 | static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) | 360 | static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) |
361 | { | 361 | { |
362 | struct scsi_device *sdev = to_scsi_device(dev); | 362 | struct scsi_device *sdev; |
363 | |||
364 | if (dev->type != &scsi_dev_type) | ||
365 | return 0; | ||
366 | |||
367 | sdev = to_scsi_device(dev); | ||
363 | 368 | ||
364 | add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type); | 369 | add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type); |
365 | return 0; | 370 | return 0; |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c9d7f721b9e2..ea0edd1b2e76 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1441,17 +1441,18 @@ sg_add(struct device *cl_dev, struct class_interface *cl_intf) | |||
1441 | if (sg_sysfs_valid) { | 1441 | if (sg_sysfs_valid) { |
1442 | struct device *sg_class_member; | 1442 | struct device *sg_class_member; |
1443 | 1443 | ||
1444 | sg_class_member = device_create(sg_sysfs_class, cl_dev->parent, | 1444 | sg_class_member = device_create_drvdata(sg_sysfs_class, |
1445 | MKDEV(SCSI_GENERIC_MAJOR, | 1445 | cl_dev->parent, |
1446 | sdp->index), | 1446 | MKDEV(SCSI_GENERIC_MAJOR, |
1447 | "%s", disk->disk_name); | 1447 | sdp->index), |
1448 | sdp, | ||
1449 | "%s", disk->disk_name); | ||
1448 | if (IS_ERR(sg_class_member)) { | 1450 | if (IS_ERR(sg_class_member)) { |
1449 | printk(KERN_ERR "sg_add: " | 1451 | printk(KERN_ERR "sg_add: " |
1450 | "device_create failed\n"); | 1452 | "device_create failed\n"); |
1451 | error = PTR_ERR(sg_class_member); | 1453 | error = PTR_ERR(sg_class_member); |
1452 | goto cdev_add_err; | 1454 | goto cdev_add_err; |
1453 | } | 1455 | } |
1454 | dev_set_drvdata(sg_class_member, sdp); | ||
1455 | error = sysfs_create_link(&scsidp->sdev_gendev.kobj, | 1456 | error = sysfs_create_link(&scsidp->sdev_gendev.kobj, |
1456 | &sg_class_member->kobj, "generic"); | 1457 | &sg_class_member->kobj, "generic"); |
1457 | if (error) | 1458 | if (error) |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index e8db66ad0bde..6e5a5bb31311 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4424,17 +4424,19 @@ static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode) | |||
4424 | snprintf(name, 10, "%s%s%s", rew ? "n" : "", | 4424 | snprintf(name, 10, "%s%s%s", rew ? "n" : "", |
4425 | STp->disk->disk_name, st_formats[i]); | 4425 | STp->disk->disk_name, st_formats[i]); |
4426 | st_class_member = | 4426 | st_class_member = |
4427 | device_create(st_sysfs_class, &STp->device->sdev_gendev, | 4427 | device_create_drvdata(st_sysfs_class, |
4428 | MKDEV(SCSI_TAPE_MAJOR, | 4428 | &STp->device->sdev_gendev, |
4429 | TAPE_MINOR(dev_num, mode, rew)), | 4429 | MKDEV(SCSI_TAPE_MAJOR, |
4430 | "%s", name); | 4430 | TAPE_MINOR(dev_num, |
4431 | mode, rew)), | ||
4432 | &STp->modes[mode], | ||
4433 | "%s", name); | ||
4431 | if (IS_ERR(st_class_member)) { | 4434 | if (IS_ERR(st_class_member)) { |
4432 | printk(KERN_WARNING "st%d: device_create failed\n", | 4435 | printk(KERN_WARNING "st%d: device_create failed\n", |
4433 | dev_num); | 4436 | dev_num); |
4434 | error = PTR_ERR(st_class_member); | 4437 | error = PTR_ERR(st_class_member); |
4435 | goto out; | 4438 | goto out; |
4436 | } | 4439 | } |
4437 | dev_set_drvdata(st_class_member, &STp->modes[mode]); | ||
4438 | 4440 | ||
4439 | error = device_create_file(st_class_member, | 4441 | error = device_create_file(st_class_member, |
4440 | &dev_attr_defined); | 4442 | &dev_attr_defined); |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index a1ca9b7bf2d5..1bc00b721e9d 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -93,7 +93,6 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS; | |||
93 | #define CONFIG_HUB6 1 | 93 | #define CONFIG_HUB6 1 |
94 | 94 | ||
95 | #include <asm/serial.h> | 95 | #include <asm/serial.h> |
96 | |||
97 | /* | 96 | /* |
98 | * SERIAL_PORT_DFNS tells us about built-in ports that have no | 97 | * SERIAL_PORT_DFNS tells us about built-in ports that have no |
99 | * standard enumeration mechanism. Platforms that can find all | 98 | * standard enumeration mechanism. Platforms that can find all |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 53fa19cf2f06..788c3559522d 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -2602,7 +2602,12 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2602 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, | 2602 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, |
2603 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ | 2603 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ |
2604 | pbn_b2_2_115200 }, | 2604 | pbn_b2_2_115200 }, |
2605 | 2605 | /* | |
2606 | * IntaShield IS-400 | ||
2607 | */ | ||
2608 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400, | ||
2609 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */ | ||
2610 | pbn_b2_4_115200 }, | ||
2606 | /* | 2611 | /* |
2607 | * Perle PCI-RAS cards | 2612 | * Perle PCI-RAS cards |
2608 | */ | 2613 | */ |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 62e6eb136a3c..9bc42763623c 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -1361,7 +1361,7 @@ config SERIAL_SC26XX_CONSOLE | |||
1361 | 1361 | ||
1362 | config SERIAL_BFIN_SPORT | 1362 | config SERIAL_BFIN_SPORT |
1363 | tristate "Blackfin SPORT emulate UART (EXPERIMENTAL)" | 1363 | tristate "Blackfin SPORT emulate UART (EXPERIMENTAL)" |
1364 | depends on BFIN && EXPERIMENTAL | 1364 | depends on BLACKFIN && EXPERIMENTAL |
1365 | select SERIAL_CORE | 1365 | select SERIAL_CORE |
1366 | help | 1366 | help |
1367 | Enble support SPORT emulate UART on Blackfin series. | 1367 | Enble support SPORT emulate UART on Blackfin series. |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index c065a704a93a..42be8b01a40f 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1318,7 +1318,7 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud, | |||
1318 | * If the baud rate generator isn't running, the port wasn't | 1318 | * If the baud rate generator isn't running, the port wasn't |
1319 | * initialized by the boot loader. | 1319 | * initialized by the boot loader. |
1320 | */ | 1320 | */ |
1321 | quot = UART_GET_BRGR(port); | 1321 | quot = UART_GET_BRGR(port) & ATMEL_US_CD; |
1322 | if (!quot) | 1322 | if (!quot) |
1323 | return; | 1323 | return; |
1324 | 1324 | ||
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index d6b4ead693b7..f20952c43cb8 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -530,11 +530,7 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port) | |||
530 | if (uart->cts_pin < 0) | 530 | if (uart->cts_pin < 0) |
531 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; | 531 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; |
532 | 532 | ||
533 | # ifdef BF54x | 533 | if (UART_GET_CTS(uart)) |
534 | if (UART_GET_MSR(uart) & CTS) | ||
535 | # else | ||
536 | if (gpio_get_value(uart->cts_pin)) | ||
537 | # endif | ||
538 | return TIOCM_DSR | TIOCM_CAR; | 534 | return TIOCM_DSR | TIOCM_CAR; |
539 | else | 535 | else |
540 | #endif | 536 | #endif |
@@ -549,17 +545,9 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
549 | return; | 545 | return; |
550 | 546 | ||
551 | if (mctrl & TIOCM_RTS) | 547 | if (mctrl & TIOCM_RTS) |
552 | # ifdef BF54x | 548 | UART_CLEAR_RTS(uart); |
553 | UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS); | ||
554 | # else | ||
555 | gpio_set_value(uart->rts_pin, 0); | ||
556 | # endif | ||
557 | else | 549 | else |
558 | # ifdef BF54x | 550 | UART_SET_RTS(uart); |
559 | UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS); | ||
560 | # else | ||
561 | gpio_set_value(uart->rts_pin, 1); | ||
562 | # endif | ||
563 | #endif | 551 | #endif |
564 | } | 552 | } |
565 | 553 | ||
@@ -752,11 +740,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
752 | 740 | ||
753 | /* Disable UART */ | 741 | /* Disable UART */ |
754 | ier = UART_GET_IER(uart); | 742 | ier = UART_GET_IER(uart); |
755 | #ifdef CONFIG_BF54x | 743 | UART_DISABLE_INTS(uart); |
756 | UART_CLEAR_IER(uart, 0xF); | ||
757 | #else | ||
758 | UART_PUT_IER(uart, 0); | ||
759 | #endif | ||
760 | 744 | ||
761 | /* Set DLAB in LCR to Access DLL and DLH */ | 745 | /* Set DLAB in LCR to Access DLL and DLH */ |
762 | UART_SET_DLAB(uart); | 746 | UART_SET_DLAB(uart); |
@@ -771,11 +755,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
771 | UART_PUT_LCR(uart, lcr); | 755 | UART_PUT_LCR(uart, lcr); |
772 | 756 | ||
773 | /* Enable UART */ | 757 | /* Enable UART */ |
774 | #ifdef CONFIG_BF54x | 758 | UART_ENABLE_INTS(uart, ier); |
775 | UART_SET_IER(uart, ier); | ||
776 | #else | ||
777 | UART_PUT_IER(uart, ier); | ||
778 | #endif | ||
779 | 759 | ||
780 | val = UART_GET_GCTL(uart); | 760 | val = UART_GET_GCTL(uart); |
781 | val |= UCEN; | 761 | val |= UCEN; |
@@ -833,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser) | |||
833 | * Enable the IrDA function if tty->ldisc.num is N_IRDA. | 813 | * Enable the IrDA function if tty->ldisc.num is N_IRDA. |
834 | * In other cases, disable IrDA function. | 814 | * In other cases, disable IrDA function. |
835 | */ | 815 | */ |
836 | static void bfin_set_ldisc(struct tty_struct *tty) | 816 | static void bfin_serial_set_ldisc(struct uart_port *port) |
837 | { | 817 | { |
838 | int line = tty->index; | 818 | int line = port->line; |
839 | unsigned short val; | 819 | unsigned short val; |
840 | 820 | ||
841 | if (line >= tty->driver->num) | 821 | if (line >= port->info->tty->driver->num) |
842 | return; | 822 | return; |
843 | 823 | ||
844 | switch (tty->ldisc.num) { | 824 | switch (port->info->tty->ldisc.num) { |
845 | case N_IRDA: | 825 | case N_IRDA: |
846 | val = UART_GET_GCTL(&bfin_serial_ports[line]); | 826 | val = UART_GET_GCTL(&bfin_serial_ports[line]); |
847 | val |= (IREN | RPOLC); | 827 | val |= (IREN | RPOLC); |
@@ -866,6 +846,7 @@ static struct uart_ops bfin_serial_pops = { | |||
866 | .startup = bfin_serial_startup, | 846 | .startup = bfin_serial_startup, |
867 | .shutdown = bfin_serial_shutdown, | 847 | .shutdown = bfin_serial_shutdown, |
868 | .set_termios = bfin_serial_set_termios, | 848 | .set_termios = bfin_serial_set_termios, |
849 | .set_ldisc = bfin_serial_set_ldisc, | ||
869 | .type = bfin_serial_type, | 850 | .type = bfin_serial_type, |
870 | .release_port = bfin_serial_release_port, | 851 | .release_port = bfin_serial_release_port, |
871 | .request_port = bfin_serial_request_port, | 852 | .request_port = bfin_serial_request_port, |
@@ -1206,7 +1187,6 @@ static int __init bfin_serial_init(void) | |||
1206 | 1187 | ||
1207 | ret = uart_register_driver(&bfin_serial_reg); | 1188 | ret = uart_register_driver(&bfin_serial_reg); |
1208 | if (ret == 0) { | 1189 | if (ret == 0) { |
1209 | bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc; | ||
1210 | ret = platform_driver_register(&bfin_serial_driver); | 1190 | ret = platform_driver_register(&bfin_serial_driver); |
1211 | if (ret) { | 1191 | if (ret) { |
1212 | pr_debug("uart register failed\n"); | 1192 | pr_debug("uart register failed\n"); |
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c index 2d6c08b3dbcf..f8e1447a022a 100644 --- a/drivers/serial/sb1250-duart.c +++ b/drivers/serial/sb1250-duart.c | |||
@@ -924,7 +924,7 @@ console_initcall(sbd_serial_console_init); | |||
924 | 924 | ||
925 | static struct uart_driver sbd_reg = { | 925 | static struct uart_driver sbd_reg = { |
926 | .owner = THIS_MODULE, | 926 | .owner = THIS_MODULE, |
927 | .driver_name = "serial", | 927 | .driver_name = "sb1250_duart", |
928 | .dev_name = "duart", | 928 | .dev_name = "duart", |
929 | .major = TTY_MAJOR, | 929 | .major = TTY_MAJOR, |
930 | .minor = SB1250_DUART_MINOR_BASE, | 930 | .minor = SB1250_DUART_MINOR_BASE, |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index eab032733790..c9b64e73c987 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1165,6 +1165,15 @@ out: | |||
1165 | return ret; | 1165 | return ret; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | static void uart_set_ldisc(struct tty_struct *tty) | ||
1169 | { | ||
1170 | struct uart_state *state = tty->driver_data; | ||
1171 | struct uart_port *port = state->port; | ||
1172 | |||
1173 | if (port->ops->set_ldisc) | ||
1174 | port->ops->set_ldisc(port); | ||
1175 | } | ||
1176 | |||
1168 | static void uart_set_termios(struct tty_struct *tty, | 1177 | static void uart_set_termios(struct tty_struct *tty, |
1169 | struct ktermios *old_termios) | 1178 | struct ktermios *old_termios) |
1170 | { | 1179 | { |
@@ -2054,6 +2063,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) | |||
2054 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | 2063 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) |
2055 | { | 2064 | { |
2056 | struct uart_state *state = drv->state + port->line; | 2065 | struct uart_state *state = drv->state + port->line; |
2066 | struct device *tty_dev; | ||
2067 | struct uart_match match = {port, drv}; | ||
2057 | 2068 | ||
2058 | mutex_lock(&state->mutex); | 2069 | mutex_lock(&state->mutex); |
2059 | 2070 | ||
@@ -2063,7 +2074,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
2063 | return 0; | 2074 | return 0; |
2064 | } | 2075 | } |
2065 | 2076 | ||
2066 | if (!port->suspended) { | 2077 | tty_dev = device_find_child(port->dev, &match, serial_match_port); |
2078 | if (!port->suspended && device_may_wakeup(tty_dev)) { | ||
2067 | disable_irq_wake(port->irq); | 2079 | disable_irq_wake(port->irq); |
2068 | mutex_unlock(&state->mutex); | 2080 | mutex_unlock(&state->mutex); |
2069 | return 0; | 2081 | return 0; |
@@ -2285,6 +2297,7 @@ static const struct tty_operations uart_ops = { | |||
2285 | .unthrottle = uart_unthrottle, | 2297 | .unthrottle = uart_unthrottle, |
2286 | .send_xchar = uart_send_xchar, | 2298 | .send_xchar = uart_send_xchar, |
2287 | .set_termios = uart_set_termios, | 2299 | .set_termios = uart_set_termios, |
2300 | .set_ldisc = uart_set_ldisc, | ||
2288 | .stop = uart_stop, | 2301 | .stop = uart_stop, |
2289 | .start = uart_start, | 2302 | .start = uart_start, |
2290 | .hangup = uart_hangup, | 2303 | .hangup = uart_hangup, |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 8fdafc27fce8..ce6ee92b3a1b 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -184,15 +184,15 @@ static void put_string(struct sci_port *sci_port, const char *buffer, int count) | |||
184 | int h, l; | 184 | int h, l; |
185 | 185 | ||
186 | c = *p++; | 186 | c = *p++; |
187 | h = highhex(c); | 187 | h = hex_asc_hi(c); |
188 | l = lowhex(c); | 188 | l = hex_asc_lo(c); |
189 | put_char(port, h); | 189 | put_char(port, h); |
190 | put_char(port, l); | 190 | put_char(port, l); |
191 | checksum += h + l; | 191 | checksum += h + l; |
192 | } | 192 | } |
193 | put_char(port, '#'); | 193 | put_char(port, '#'); |
194 | put_char(port, highhex(checksum)); | 194 | put_char(port, hex_asc_hi(checksum)); |
195 | put_char(port, lowhex(checksum)); | 195 | put_char(port, hex_asc_lo(checksum)); |
196 | } while (get_char(port) != '+'); | 196 | } while (get_char(port) != '+'); |
197 | } else | 197 | } else |
198 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ | 198 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 145c0281495d..2847336742d7 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -499,7 +499,6 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig | |||
499 | } else | 499 | } else |
500 | spin_lock(&port->lock); | 500 | spin_lock(&port->lock); |
501 | 501 | ||
502 | spin_lock_irqsave(&port->lock, flags); | ||
503 | for (i = 0; i < n; i++) { | 502 | for (i = 0; i < n; i++) { |
504 | if (*s == '\n') | 503 | if (*s == '\n') |
505 | sunhv_console_putchar(port, '\r'); | 504 | sunhv_console_putchar(port, '\r'); |
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 01917c433f17..566a8b42e05a 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -195,7 +195,7 @@ struct uart_qe_port { | |||
195 | 195 | ||
196 | static struct uart_driver ucc_uart_driver = { | 196 | static struct uart_driver ucc_uart_driver = { |
197 | .owner = THIS_MODULE, | 197 | .owner = THIS_MODULE, |
198 | .driver_name = "serial", | 198 | .driver_name = "ucc_uart", |
199 | .dev_name = "ttyQE", | 199 | .dev_name = "ttyQE", |
200 | .major = SERIAL_QE_MAJOR, | 200 | .major = SERIAL_QE_MAJOR, |
201 | .minor = SERIAL_QE_MINOR, | 201 | .minor = SERIAL_QE_MINOR, |
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index b3518ca9f04e..799337f7fde1 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ioctl.h> | 25 | #include <linux/ioctl.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/err.h> | ||
28 | #include <linux/list.h> | 29 | #include <linux/list.h> |
29 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
30 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
@@ -67,10 +68,12 @@ static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG]; | |||
67 | | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP) | 68 | | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP) |
68 | 69 | ||
69 | struct spidev_data { | 70 | struct spidev_data { |
70 | struct device dev; | 71 | dev_t devt; |
72 | spinlock_t spi_lock; | ||
71 | struct spi_device *spi; | 73 | struct spi_device *spi; |
72 | struct list_head device_entry; | 74 | struct list_head device_entry; |
73 | 75 | ||
76 | /* buffer is NULL unless this device is open (users > 0) */ | ||
74 | struct mutex buf_lock; | 77 | struct mutex buf_lock; |
75 | unsigned users; | 78 | unsigned users; |
76 | u8 *buffer; | 79 | u8 *buffer; |
@@ -85,12 +88,75 @@ MODULE_PARM_DESC(bufsiz, "data bytes in biggest supported SPI message"); | |||
85 | 88 | ||
86 | /*-------------------------------------------------------------------------*/ | 89 | /*-------------------------------------------------------------------------*/ |
87 | 90 | ||
91 | /* | ||
92 | * We can't use the standard synchronous wrappers for file I/O; we | ||
93 | * need to protect against async removal of the underlying spi_device. | ||
94 | */ | ||
95 | static void spidev_complete(void *arg) | ||
96 | { | ||
97 | complete(arg); | ||
98 | } | ||
99 | |||
100 | static ssize_t | ||
101 | spidev_sync(struct spidev_data *spidev, struct spi_message *message) | ||
102 | { | ||
103 | DECLARE_COMPLETION_ONSTACK(done); | ||
104 | int status; | ||
105 | |||
106 | message->complete = spidev_complete; | ||
107 | message->context = &done; | ||
108 | |||
109 | spin_lock_irq(&spidev->spi_lock); | ||
110 | if (spidev->spi == NULL) | ||
111 | status = -ESHUTDOWN; | ||
112 | else | ||
113 | status = spi_async(spidev->spi, message); | ||
114 | spin_unlock_irq(&spidev->spi_lock); | ||
115 | |||
116 | if (status == 0) { | ||
117 | wait_for_completion(&done); | ||
118 | status = message->status; | ||
119 | if (status == 0) | ||
120 | status = message->actual_length; | ||
121 | } | ||
122 | return status; | ||
123 | } | ||
124 | |||
125 | static inline ssize_t | ||
126 | spidev_sync_write(struct spidev_data *spidev, size_t len) | ||
127 | { | ||
128 | struct spi_transfer t = { | ||
129 | .tx_buf = spidev->buffer, | ||
130 | .len = len, | ||
131 | }; | ||
132 | struct spi_message m; | ||
133 | |||
134 | spi_message_init(&m); | ||
135 | spi_message_add_tail(&t, &m); | ||
136 | return spidev_sync(spidev, &m); | ||
137 | } | ||
138 | |||
139 | static inline ssize_t | ||
140 | spidev_sync_read(struct spidev_data *spidev, size_t len) | ||
141 | { | ||
142 | struct spi_transfer t = { | ||
143 | .rx_buf = spidev->buffer, | ||
144 | .len = len, | ||
145 | }; | ||
146 | struct spi_message m; | ||
147 | |||
148 | spi_message_init(&m); | ||
149 | spi_message_add_tail(&t, &m); | ||
150 | return spidev_sync(spidev, &m); | ||
151 | } | ||
152 | |||
153 | /*-------------------------------------------------------------------------*/ | ||
154 | |||
88 | /* Read-only message with current device setup */ | 155 | /* Read-only message with current device setup */ |
89 | static ssize_t | 156 | static ssize_t |
90 | spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) | 157 | spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) |
91 | { | 158 | { |
92 | struct spidev_data *spidev; | 159 | struct spidev_data *spidev; |
93 | struct spi_device *spi; | ||
94 | ssize_t status = 0; | 160 | ssize_t status = 0; |
95 | 161 | ||
96 | /* chipselect only toggles at start or end of operation */ | 162 | /* chipselect only toggles at start or end of operation */ |
@@ -98,10 +164,9 @@ spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) | |||
98 | return -EMSGSIZE; | 164 | return -EMSGSIZE; |
99 | 165 | ||
100 | spidev = filp->private_data; | 166 | spidev = filp->private_data; |
101 | spi = spidev->spi; | ||
102 | 167 | ||
103 | mutex_lock(&spidev->buf_lock); | 168 | mutex_lock(&spidev->buf_lock); |
104 | status = spi_read(spi, spidev->buffer, count); | 169 | status = spidev_sync_read(spidev, count); |
105 | if (status == 0) { | 170 | if (status == 0) { |
106 | unsigned long missing; | 171 | unsigned long missing; |
107 | 172 | ||
@@ -122,7 +187,6 @@ spidev_write(struct file *filp, const char __user *buf, | |||
122 | size_t count, loff_t *f_pos) | 187 | size_t count, loff_t *f_pos) |
123 | { | 188 | { |
124 | struct spidev_data *spidev; | 189 | struct spidev_data *spidev; |
125 | struct spi_device *spi; | ||
126 | ssize_t status = 0; | 190 | ssize_t status = 0; |
127 | unsigned long missing; | 191 | unsigned long missing; |
128 | 192 | ||
@@ -131,12 +195,11 @@ spidev_write(struct file *filp, const char __user *buf, | |||
131 | return -EMSGSIZE; | 195 | return -EMSGSIZE; |
132 | 196 | ||
133 | spidev = filp->private_data; | 197 | spidev = filp->private_data; |
134 | spi = spidev->spi; | ||
135 | 198 | ||
136 | mutex_lock(&spidev->buf_lock); | 199 | mutex_lock(&spidev->buf_lock); |
137 | missing = copy_from_user(spidev->buffer, buf, count); | 200 | missing = copy_from_user(spidev->buffer, buf, count); |
138 | if (missing == 0) { | 201 | if (missing == 0) { |
139 | status = spi_write(spi, spidev->buffer, count); | 202 | status = spidev_sync_write(spidev, count); |
140 | if (status == 0) | 203 | if (status == 0) |
141 | status = count; | 204 | status = count; |
142 | } else | 205 | } else |
@@ -153,7 +216,6 @@ static int spidev_message(struct spidev_data *spidev, | |||
153 | struct spi_transfer *k_xfers; | 216 | struct spi_transfer *k_xfers; |
154 | struct spi_transfer *k_tmp; | 217 | struct spi_transfer *k_tmp; |
155 | struct spi_ioc_transfer *u_tmp; | 218 | struct spi_ioc_transfer *u_tmp; |
156 | struct spi_device *spi = spidev->spi; | ||
157 | unsigned n, total; | 219 | unsigned n, total; |
158 | u8 *buf; | 220 | u8 *buf; |
159 | int status = -EFAULT; | 221 | int status = -EFAULT; |
@@ -215,7 +277,7 @@ static int spidev_message(struct spidev_data *spidev, | |||
215 | spi_message_add_tail(k_tmp, &msg); | 277 | spi_message_add_tail(k_tmp, &msg); |
216 | } | 278 | } |
217 | 279 | ||
218 | status = spi_sync(spi, &msg); | 280 | status = spidev_sync(spidev, &msg); |
219 | if (status < 0) | 281 | if (status < 0) |
220 | goto done; | 282 | goto done; |
221 | 283 | ||
@@ -269,8 +331,16 @@ spidev_ioctl(struct inode *inode, struct file *filp, | |||
269 | if (err) | 331 | if (err) |
270 | return -EFAULT; | 332 | return -EFAULT; |
271 | 333 | ||
334 | /* guard against device removal before, or while, | ||
335 | * we issue this ioctl. | ||
336 | */ | ||
272 | spidev = filp->private_data; | 337 | spidev = filp->private_data; |
273 | spi = spidev->spi; | 338 | spin_lock_irq(&spidev->spi_lock); |
339 | spi = spi_dev_get(spidev->spi); | ||
340 | spin_unlock_irq(&spidev->spi_lock); | ||
341 | |||
342 | if (spi == NULL) | ||
343 | return -ESHUTDOWN; | ||
274 | 344 | ||
275 | switch (cmd) { | 345 | switch (cmd) { |
276 | /* read requests */ | 346 | /* read requests */ |
@@ -356,8 +426,10 @@ spidev_ioctl(struct inode *inode, struct file *filp, | |||
356 | default: | 426 | default: |
357 | /* segmented and/or full-duplex I/O request */ | 427 | /* segmented and/or full-duplex I/O request */ |
358 | if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) | 428 | if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) |
359 | || _IOC_DIR(cmd) != _IOC_WRITE) | 429 | || _IOC_DIR(cmd) != _IOC_WRITE) { |
360 | return -ENOTTY; | 430 | retval = -ENOTTY; |
431 | break; | ||
432 | } | ||
361 | 433 | ||
362 | tmp = _IOC_SIZE(cmd); | 434 | tmp = _IOC_SIZE(cmd); |
363 | if ((tmp % sizeof(struct spi_ioc_transfer)) != 0) { | 435 | if ((tmp % sizeof(struct spi_ioc_transfer)) != 0) { |
@@ -385,6 +457,7 @@ spidev_ioctl(struct inode *inode, struct file *filp, | |||
385 | kfree(ioc); | 457 | kfree(ioc); |
386 | break; | 458 | break; |
387 | } | 459 | } |
460 | spi_dev_put(spi); | ||
388 | return retval; | 461 | return retval; |
389 | } | 462 | } |
390 | 463 | ||
@@ -396,7 +469,7 @@ static int spidev_open(struct inode *inode, struct file *filp) | |||
396 | mutex_lock(&device_list_lock); | 469 | mutex_lock(&device_list_lock); |
397 | 470 | ||
398 | list_for_each_entry(spidev, &device_list, device_entry) { | 471 | list_for_each_entry(spidev, &device_list, device_entry) { |
399 | if (spidev->dev.devt == inode->i_rdev) { | 472 | if (spidev->devt == inode->i_rdev) { |
400 | status = 0; | 473 | status = 0; |
401 | break; | 474 | break; |
402 | } | 475 | } |
@@ -429,10 +502,22 @@ static int spidev_release(struct inode *inode, struct file *filp) | |||
429 | mutex_lock(&device_list_lock); | 502 | mutex_lock(&device_list_lock); |
430 | spidev = filp->private_data; | 503 | spidev = filp->private_data; |
431 | filp->private_data = NULL; | 504 | filp->private_data = NULL; |
505 | |||
506 | /* last close? */ | ||
432 | spidev->users--; | 507 | spidev->users--; |
433 | if (!spidev->users) { | 508 | if (!spidev->users) { |
509 | int dofree; | ||
510 | |||
434 | kfree(spidev->buffer); | 511 | kfree(spidev->buffer); |
435 | spidev->buffer = NULL; | 512 | spidev->buffer = NULL; |
513 | |||
514 | /* ... after we unbound from the underlying device? */ | ||
515 | spin_lock_irq(&spidev->spi_lock); | ||
516 | dofree = (spidev->spi == NULL); | ||
517 | spin_unlock_irq(&spidev->spi_lock); | ||
518 | |||
519 | if (dofree) | ||
520 | kfree(spidev); | ||
436 | } | 521 | } |
437 | mutex_unlock(&device_list_lock); | 522 | mutex_unlock(&device_list_lock); |
438 | 523 | ||
@@ -459,19 +544,7 @@ static struct file_operations spidev_fops = { | |||
459 | * It also simplifies memory management. | 544 | * It also simplifies memory management. |
460 | */ | 545 | */ |
461 | 546 | ||
462 | static void spidev_classdev_release(struct device *dev) | 547 | static struct class *spidev_class; |
463 | { | ||
464 | struct spidev_data *spidev; | ||
465 | |||
466 | spidev = container_of(dev, struct spidev_data, dev); | ||
467 | kfree(spidev); | ||
468 | } | ||
469 | |||
470 | static struct class spidev_class = { | ||
471 | .name = "spidev", | ||
472 | .owner = THIS_MODULE, | ||
473 | .dev_release = spidev_classdev_release, | ||
474 | }; | ||
475 | 548 | ||
476 | /*-------------------------------------------------------------------------*/ | 549 | /*-------------------------------------------------------------------------*/ |
477 | 550 | ||
@@ -488,6 +561,7 @@ static int spidev_probe(struct spi_device *spi) | |||
488 | 561 | ||
489 | /* Initialize the driver data */ | 562 | /* Initialize the driver data */ |
490 | spidev->spi = spi; | 563 | spidev->spi = spi; |
564 | spin_lock_init(&spidev->spi_lock); | ||
491 | mutex_init(&spidev->buf_lock); | 565 | mutex_init(&spidev->buf_lock); |
492 | 566 | ||
493 | INIT_LIST_HEAD(&spidev->device_entry); | 567 | INIT_LIST_HEAD(&spidev->device_entry); |
@@ -498,20 +572,20 @@ static int spidev_probe(struct spi_device *spi) | |||
498 | mutex_lock(&device_list_lock); | 572 | mutex_lock(&device_list_lock); |
499 | minor = find_first_zero_bit(minors, N_SPI_MINORS); | 573 | minor = find_first_zero_bit(minors, N_SPI_MINORS); |
500 | if (minor < N_SPI_MINORS) { | 574 | if (minor < N_SPI_MINORS) { |
501 | spidev->dev.parent = &spi->dev; | 575 | struct device *dev; |
502 | spidev->dev.class = &spidev_class; | 576 | |
503 | spidev->dev.devt = MKDEV(SPIDEV_MAJOR, minor); | 577 | spidev->devt = MKDEV(SPIDEV_MAJOR, minor); |
504 | snprintf(spidev->dev.bus_id, sizeof spidev->dev.bus_id, | 578 | dev = device_create(spidev_class, &spi->dev, spidev->devt, |
505 | "spidev%d.%d", | 579 | "spidev%d.%d", |
506 | spi->master->bus_num, spi->chip_select); | 580 | spi->master->bus_num, spi->chip_select); |
507 | status = device_register(&spidev->dev); | 581 | status = IS_ERR(dev) ? PTR_ERR(dev) : 0; |
508 | } else { | 582 | } else { |
509 | dev_dbg(&spi->dev, "no minor number available!\n"); | 583 | dev_dbg(&spi->dev, "no minor number available!\n"); |
510 | status = -ENODEV; | 584 | status = -ENODEV; |
511 | } | 585 | } |
512 | if (status == 0) { | 586 | if (status == 0) { |
513 | set_bit(minor, minors); | 587 | set_bit(minor, minors); |
514 | dev_set_drvdata(&spi->dev, spidev); | 588 | spi_set_drvdata(spi, spidev); |
515 | list_add(&spidev->device_entry, &device_list); | 589 | list_add(&spidev->device_entry, &device_list); |
516 | } | 590 | } |
517 | mutex_unlock(&device_list_lock); | 591 | mutex_unlock(&device_list_lock); |
@@ -524,15 +598,21 @@ static int spidev_probe(struct spi_device *spi) | |||
524 | 598 | ||
525 | static int spidev_remove(struct spi_device *spi) | 599 | static int spidev_remove(struct spi_device *spi) |
526 | { | 600 | { |
527 | struct spidev_data *spidev = dev_get_drvdata(&spi->dev); | 601 | struct spidev_data *spidev = spi_get_drvdata(spi); |
528 | 602 | ||
529 | mutex_lock(&device_list_lock); | 603 | /* make sure ops on existing fds can abort cleanly */ |
604 | spin_lock_irq(&spidev->spi_lock); | ||
605 | spidev->spi = NULL; | ||
606 | spi_set_drvdata(spi, NULL); | ||
607 | spin_unlock_irq(&spidev->spi_lock); | ||
530 | 608 | ||
609 | /* prevent new opens */ | ||
610 | mutex_lock(&device_list_lock); | ||
531 | list_del(&spidev->device_entry); | 611 | list_del(&spidev->device_entry); |
532 | dev_set_drvdata(&spi->dev, NULL); | 612 | device_destroy(spidev_class, spidev->devt); |
533 | clear_bit(MINOR(spidev->dev.devt), minors); | 613 | clear_bit(MINOR(spidev->devt), minors); |
534 | device_unregister(&spidev->dev); | 614 | if (spidev->users == 0) |
535 | 615 | kfree(spidev); | |
536 | mutex_unlock(&device_list_lock); | 616 | mutex_unlock(&device_list_lock); |
537 | 617 | ||
538 | return 0; | 618 | return 0; |
@@ -568,15 +648,15 @@ static int __init spidev_init(void) | |||
568 | if (status < 0) | 648 | if (status < 0) |
569 | return status; | 649 | return status; |
570 | 650 | ||
571 | status = class_register(&spidev_class); | 651 | spidev_class = class_create(THIS_MODULE, "spidev"); |
572 | if (status < 0) { | 652 | if (IS_ERR(spidev_class)) { |
573 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 653 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); |
574 | return status; | 654 | return PTR_ERR(spidev_class); |
575 | } | 655 | } |
576 | 656 | ||
577 | status = spi_register_driver(&spidev_spi); | 657 | status = spi_register_driver(&spidev_spi); |
578 | if (status < 0) { | 658 | if (status < 0) { |
579 | class_unregister(&spidev_class); | 659 | class_destroy(spidev_class); |
580 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 660 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); |
581 | } | 661 | } |
582 | return status; | 662 | return status; |
@@ -586,7 +666,7 @@ module_init(spidev_init); | |||
586 | static void __exit spidev_exit(void) | 666 | static void __exit spidev_exit(void) |
587 | { | 667 | { |
588 | spi_unregister_driver(&spidev_spi); | 668 | spi_unregister_driver(&spidev_spi); |
589 | class_unregister(&spidev_class); | 669 | class_destroy(spidev_class); |
590 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 670 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); |
591 | } | 671 | } |
592 | module_exit(spidev_exit); | 672 | module_exit(spidev_exit); |
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c index 75def13e797d..d28c53868093 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c | |||
@@ -537,12 +537,12 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc, | |||
537 | int err = 0; | 537 | int err = 0; |
538 | u32 tmp; | 538 | u32 tmp; |
539 | 539 | ||
540 | might_sleep(); | ||
541 | |||
542 | if (!pdev) | 540 | if (!pdev) |
543 | goto out; | 541 | goto out; |
544 | bus = pdev->bus; | 542 | bus = pdev->bus; |
545 | 543 | ||
544 | might_sleep_if(pdev->id.coreid != SSB_DEV_PCI); | ||
545 | |||
546 | /* Enable interrupts for this device. */ | 546 | /* Enable interrupts for this device. */ |
547 | if (bus->host_pci && | 547 | if (bus->host_pci && |
548 | ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) { | 548 | ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) { |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 55cc7b80422a..0a12e90ad416 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -649,15 +649,14 @@ int __uio_register_device(struct module *owner, | |||
649 | if (ret) | 649 | if (ret) |
650 | goto err_get_minor; | 650 | goto err_get_minor; |
651 | 651 | ||
652 | idev->dev = device_create(uio_class->class, parent, | 652 | idev->dev = device_create_drvdata(uio_class->class, parent, |
653 | MKDEV(uio_major, idev->minor), | 653 | MKDEV(uio_major, idev->minor), idev, |
654 | "uio%d", idev->minor); | 654 | "uio%d", idev->minor); |
655 | if (IS_ERR(idev->dev)) { | 655 | if (IS_ERR(idev->dev)) { |
656 | printk(KERN_ERR "UIO: device register failed\n"); | 656 | printk(KERN_ERR "UIO: device register failed\n"); |
657 | ret = PTR_ERR(idev->dev); | 657 | ret = PTR_ERR(idev->dev); |
658 | goto err_device_create; | 658 | goto err_device_create; |
659 | } | 659 | } |
660 | dev_set_drvdata(idev->dev, idev); | ||
661 | 660 | ||
662 | ret = uio_dev_add_attributes(idev); | 661 | ret = uio_dev_add_attributes(idev); |
663 | if (ret) | 662 | if (ret) |
diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c index 5100fbbf6cb0..a9636f43bca2 100644 --- a/drivers/usb/c67x00/c67x00-ll-hpi.c +++ b/drivers/usb/c67x00/c67x00-ll-hpi.c | |||
@@ -120,7 +120,7 @@ static void hpi_write_word(struct c67x00_device *dev, u16 reg, u16 value) | |||
120 | * Only data is little endian, addr has cpu endianess | 120 | * Only data is little endian, addr has cpu endianess |
121 | */ | 121 | */ |
122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | 122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, |
123 | u16 *data, u16 count) | 123 | __le16 *data, u16 count) |
124 | { | 124 | { |
125 | unsigned long flags; | 125 | unsigned long flags; |
126 | int i; | 126 | int i; |
@@ -129,7 +129,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
129 | 129 | ||
130 | hpi_write_reg(dev, HPI_ADDR, addr); | 130 | hpi_write_reg(dev, HPI_ADDR, addr); |
131 | for (i = 0; i < count; i++) | 131 | for (i = 0; i < count; i++) |
132 | hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++)); | 132 | hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++)); |
133 | 133 | ||
134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
135 | } | 135 | } |
@@ -138,7 +138,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
138 | * Only data is little endian, addr has cpu endianess | 138 | * Only data is little endian, addr has cpu endianess |
139 | */ | 139 | */ |
140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | 140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, |
141 | u16 *data, u16 count) | 141 | __le16 *data, u16 count) |
142 | { | 142 | { |
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | int i; | 144 | int i; |
@@ -146,7 +146,7 @@ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | |||
146 | spin_lock_irqsave(&dev->hpi.lock, flags); | 146 | spin_lock_irqsave(&dev->hpi.lock, flags); |
147 | hpi_write_reg(dev, HPI_ADDR, addr); | 147 | hpi_write_reg(dev, HPI_ADDR, addr); |
148 | for (i = 0; i < count; i++) | 148 | for (i = 0; i < count; i++) |
149 | *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA)); | 149 | *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA)); |
150 | 150 | ||
151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
152 | } | 152 | } |
@@ -425,7 +425,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr, | |||
425 | len--; | 425 | len--; |
426 | } | 426 | } |
427 | 427 | ||
428 | hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2); | 428 | hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2); |
429 | buf += len & ~0x01; | 429 | buf += len & ~0x01; |
430 | addr += len & ~0x01; | 430 | addr += len & ~0x01; |
431 | len &= 0x01; | 431 | len &= 0x01; |
@@ -456,7 +456,7 @@ void c67x00_ll_read_mem_le16(struct c67x00_device *dev, u16 addr, | |||
456 | len--; | 456 | len--; |
457 | } | 457 | } |
458 | 458 | ||
459 | hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2); | 459 | hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2); |
460 | buf += len & ~0x01; | 460 | buf += len & ~0x01; |
461 | addr += len & ~0x01; | 461 | addr += len & ~0x01; |
462 | len &= 0x01; | 462 | len &= 0x01; |
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig index 3a9102d2591b..66f17ed88cb5 100644 --- a/drivers/usb/class/Kconfig +++ b/drivers/usb/class/Kconfig | |||
@@ -29,3 +29,14 @@ config USB_PRINTER | |||
29 | To compile this driver as a module, choose M here: the | 29 | To compile this driver as a module, choose M here: the |
30 | module will be called usblp. | 30 | module will be called usblp. |
31 | 31 | ||
32 | config USB_WDM | ||
33 | tristate "USB Wireless Device Management support" | ||
34 | depends on USB | ||
35 | ---help--- | ||
36 | This driver supports the WMC Device Management functionality | ||
37 | of cell phones compliant to the CDC WMC specification. You can use | ||
38 | AT commands over this device. | ||
39 | |||
40 | To compile this driver as a module, choose M here: the | ||
41 | module will be called cdc-wdm. | ||
42 | |||
diff --git a/drivers/usb/class/Makefile b/drivers/usb/class/Makefile index cc391e6c2af8..535d59a30600 100644 --- a/drivers/usb/class/Makefile +++ b/drivers/usb/class/Makefile | |||
@@ -5,3 +5,4 @@ | |||
5 | 5 | ||
6 | obj-$(CONFIG_USB_ACM) += cdc-acm.o | 6 | obj-$(CONFIG_USB_ACM) += cdc-acm.o |
7 | obj-$(CONFIG_USB_PRINTER) += usblp.o | 7 | obj-$(CONFIG_USB_PRINTER) += usblp.o |
8 | obj-$(CONFIG_USB_WDM) += cdc-wdm.o | ||
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c new file mode 100644 index 000000000000..731db051070a --- /dev/null +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -0,0 +1,740 @@ | |||
1 | /* | ||
2 | * cdc-wdm.c | ||
3 | * | ||
4 | * This driver supports USB CDC WCM Device Management. | ||
5 | * | ||
6 | * Copyright (c) 2007-2008 Oliver Neukum | ||
7 | * | ||
8 | * Some code taken from cdc-acm.c | ||
9 | * | ||
10 | * Released under the GPLv2. | ||
11 | * | ||
12 | * Many thanks to Carl Nordbeck | ||
13 | */ | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/smp_lock.h> | ||
19 | #include <linux/mutex.h> | ||
20 | #include <linux/uaccess.h> | ||
21 | #include <linux/bitops.h> | ||
22 | #include <linux/poll.h> | ||
23 | #include <linux/usb.h> | ||
24 | #include <linux/usb/cdc.h> | ||
25 | #include <asm/byteorder.h> | ||
26 | #include <asm/unaligned.h> | ||
27 | |||
28 | /* | ||
29 | * Version Information | ||
30 | */ | ||
31 | #define DRIVER_VERSION "v0.02" | ||
32 | #define DRIVER_AUTHOR "Oliver Neukum" | ||
33 | |||
34 | static struct usb_device_id wdm_ids[] = { | ||
35 | { | ||
36 | .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS | | ||
37 | USB_DEVICE_ID_MATCH_INT_SUBCLASS, | ||
38 | .bInterfaceClass = USB_CLASS_COMM, | ||
39 | .bInterfaceSubClass = USB_CDC_SUBCLASS_DMM | ||
40 | }, | ||
41 | { } | ||
42 | }; | ||
43 | |||
44 | #define WDM_MINOR_BASE 176 | ||
45 | |||
46 | |||
47 | #define WDM_IN_USE 1 | ||
48 | #define WDM_DISCONNECTING 2 | ||
49 | #define WDM_RESULT 3 | ||
50 | #define WDM_READ 4 | ||
51 | #define WDM_INT_STALL 5 | ||
52 | #define WDM_POLL_RUNNING 6 | ||
53 | |||
54 | |||
55 | #define WDM_MAX 16 | ||
56 | |||
57 | |||
58 | static DEFINE_MUTEX(wdm_mutex); | ||
59 | |||
60 | /* --- method tables --- */ | ||
61 | |||
62 | struct wdm_device { | ||
63 | u8 *inbuf; /* buffer for response */ | ||
64 | u8 *outbuf; /* buffer for command */ | ||
65 | u8 *sbuf; /* buffer for status */ | ||
66 | u8 *ubuf; /* buffer for copy to user space */ | ||
67 | |||
68 | struct urb *command; | ||
69 | struct urb *response; | ||
70 | struct urb *validity; | ||
71 | struct usb_interface *intf; | ||
72 | struct usb_ctrlrequest *orq; | ||
73 | struct usb_ctrlrequest *irq; | ||
74 | spinlock_t iuspin; | ||
75 | |||
76 | unsigned long flags; | ||
77 | u16 bufsize; | ||
78 | u16 wMaxCommand; | ||
79 | u16 wMaxPacketSize; | ||
80 | u16 bMaxPacketSize0; | ||
81 | __le16 inum; | ||
82 | int reslength; | ||
83 | int length; | ||
84 | int read; | ||
85 | int count; | ||
86 | dma_addr_t shandle; | ||
87 | dma_addr_t ihandle; | ||
88 | struct mutex wlock; | ||
89 | struct mutex rlock; | ||
90 | wait_queue_head_t wait; | ||
91 | struct work_struct rxwork; | ||
92 | int werr; | ||
93 | int rerr; | ||
94 | }; | ||
95 | |||
96 | static struct usb_driver wdm_driver; | ||
97 | |||
98 | /* --- callbacks --- */ | ||
99 | static void wdm_out_callback(struct urb *urb) | ||
100 | { | ||
101 | struct wdm_device *desc; | ||
102 | desc = urb->context; | ||
103 | spin_lock(&desc->iuspin); | ||
104 | desc->werr = urb->status; | ||
105 | spin_unlock(&desc->iuspin); | ||
106 | clear_bit(WDM_IN_USE, &desc->flags); | ||
107 | kfree(desc->outbuf); | ||
108 | wake_up(&desc->wait); | ||
109 | } | ||
110 | |||
111 | static void wdm_in_callback(struct urb *urb) | ||
112 | { | ||
113 | struct wdm_device *desc = urb->context; | ||
114 | int status = urb->status; | ||
115 | |||
116 | spin_lock(&desc->iuspin); | ||
117 | |||
118 | if (status) { | ||
119 | switch (status) { | ||
120 | case -ENOENT: | ||
121 | dev_dbg(&desc->intf->dev, | ||
122 | "nonzero urb status received: -ENOENT"); | ||
123 | break; | ||
124 | case -ECONNRESET: | ||
125 | dev_dbg(&desc->intf->dev, | ||
126 | "nonzero urb status received: -ECONNRESET"); | ||
127 | break; | ||
128 | case -ESHUTDOWN: | ||
129 | dev_dbg(&desc->intf->dev, | ||
130 | "nonzero urb status received: -ESHUTDOWN"); | ||
131 | break; | ||
132 | case -EPIPE: | ||
133 | err("nonzero urb status received: -EPIPE"); | ||
134 | break; | ||
135 | default: | ||
136 | err("Unexpected error %d", status); | ||
137 | break; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | desc->rerr = status; | ||
142 | desc->reslength = urb->actual_length; | ||
143 | memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength); | ||
144 | desc->length += desc->reslength; | ||
145 | wake_up(&desc->wait); | ||
146 | |||
147 | set_bit(WDM_READ, &desc->flags); | ||
148 | spin_unlock(&desc->iuspin); | ||
149 | } | ||
150 | |||
151 | static void wdm_int_callback(struct urb *urb) | ||
152 | { | ||
153 | int rv = 0; | ||
154 | int status = urb->status; | ||
155 | struct wdm_device *desc; | ||
156 | struct usb_ctrlrequest *req; | ||
157 | struct usb_cdc_notification *dr; | ||
158 | |||
159 | desc = urb->context; | ||
160 | req = desc->irq; | ||
161 | dr = (struct usb_cdc_notification *)desc->sbuf; | ||
162 | |||
163 | if (status) { | ||
164 | switch (status) { | ||
165 | case -ESHUTDOWN: | ||
166 | case -ENOENT: | ||
167 | case -ECONNRESET: | ||
168 | return; /* unplug */ | ||
169 | case -EPIPE: | ||
170 | set_bit(WDM_INT_STALL, &desc->flags); | ||
171 | err("Stall on int endpoint"); | ||
172 | goto sw; /* halt is cleared in work */ | ||
173 | default: | ||
174 | err("nonzero urb status received: %d", status); | ||
175 | break; | ||
176 | } | ||
177 | } | ||
178 | |||
179 | if (urb->actual_length < sizeof(struct usb_cdc_notification)) { | ||
180 | err("wdm_int_callback - %d bytes", urb->actual_length); | ||
181 | goto exit; | ||
182 | } | ||
183 | |||
184 | switch (dr->bNotificationType) { | ||
185 | case USB_CDC_NOTIFY_RESPONSE_AVAILABLE: | ||
186 | dev_dbg(&desc->intf->dev, | ||
187 | "NOTIFY_RESPONSE_AVAILABLE received: index %d len %d", | ||
188 | dr->wIndex, dr->wLength); | ||
189 | break; | ||
190 | |||
191 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: | ||
192 | |||
193 | dev_dbg(&desc->intf->dev, | ||
194 | "NOTIFY_NETWORK_CONNECTION %s network", | ||
195 | dr->wValue ? "connected to" : "disconnected from"); | ||
196 | goto exit; | ||
197 | default: | ||
198 | clear_bit(WDM_POLL_RUNNING, &desc->flags); | ||
199 | err("unknown notification %d received: index %d len %d", | ||
200 | dr->bNotificationType, dr->wIndex, dr->wLength); | ||
201 | goto exit; | ||
202 | } | ||
203 | |||
204 | req->bRequestType = (USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE); | ||
205 | req->bRequest = USB_CDC_GET_ENCAPSULATED_RESPONSE; | ||
206 | req->wValue = 0; | ||
207 | req->wIndex = desc->inum; | ||
208 | req->wLength = cpu_to_le16(desc->bMaxPacketSize0); | ||
209 | |||
210 | usb_fill_control_urb( | ||
211 | desc->response, | ||
212 | interface_to_usbdev(desc->intf), | ||
213 | /* using common endpoint 0 */ | ||
214 | usb_rcvctrlpipe(interface_to_usbdev(desc->intf), 0), | ||
215 | (unsigned char *)req, | ||
216 | desc->inbuf, | ||
217 | desc->bMaxPacketSize0, | ||
218 | wdm_in_callback, | ||
219 | desc | ||
220 | ); | ||
221 | desc->response->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | ||
222 | spin_lock(&desc->iuspin); | ||
223 | clear_bit(WDM_READ, &desc->flags); | ||
224 | if (!test_bit(WDM_DISCONNECTING, &desc->flags)) { | ||
225 | rv = usb_submit_urb(desc->response, GFP_ATOMIC); | ||
226 | dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d", | ||
227 | __func__, rv); | ||
228 | } | ||
229 | spin_unlock(&desc->iuspin); | ||
230 | if (rv < 0) { | ||
231 | if (rv == -EPERM) | ||
232 | return; | ||
233 | if (rv == -ENOMEM) { | ||
234 | sw: | ||
235 | rv = schedule_work(&desc->rxwork); | ||
236 | if (rv) | ||
237 | err("Cannot schedule work"); | ||
238 | } | ||
239 | } | ||
240 | exit: | ||
241 | rv = usb_submit_urb(urb, GFP_ATOMIC); | ||
242 | if (rv) | ||
243 | err("%s - usb_submit_urb failed with result %d", | ||
244 | __func__, rv); | ||
245 | |||
246 | } | ||
247 | |||
248 | static void kill_urbs(struct wdm_device *desc) | ||
249 | { | ||
250 | usb_kill_urb(desc->command); | ||
251 | usb_kill_urb(desc->validity); | ||
252 | usb_kill_urb(desc->response); | ||
253 | } | ||
254 | |||
255 | static void free_urbs(struct wdm_device *desc) | ||
256 | { | ||
257 | usb_free_urb(desc->validity); | ||
258 | usb_free_urb(desc->response); | ||
259 | usb_free_urb(desc->command); | ||
260 | } | ||
261 | |||
262 | static void cleanup(struct wdm_device *desc) | ||
263 | { | ||
264 | usb_buffer_free(interface_to_usbdev(desc->intf), | ||
265 | desc->wMaxPacketSize, | ||
266 | desc->sbuf, | ||
267 | desc->validity->transfer_dma); | ||
268 | usb_buffer_free(interface_to_usbdev(desc->intf), | ||
269 | desc->wMaxPacketSize, | ||
270 | desc->inbuf, | ||
271 | desc->response->transfer_dma); | ||
272 | kfree(desc->orq); | ||
273 | kfree(desc->irq); | ||
274 | kfree(desc->ubuf); | ||
275 | free_urbs(desc); | ||
276 | kfree(desc); | ||
277 | } | ||
278 | |||
279 | static ssize_t wdm_write | ||
280 | (struct file *file, const char __user *buffer, size_t count, loff_t *ppos) | ||
281 | { | ||
282 | u8 *buf; | ||
283 | int rv = -EMSGSIZE, r, we; | ||
284 | struct wdm_device *desc = file->private_data; | ||
285 | struct usb_ctrlrequest *req; | ||
286 | |||
287 | if (count > desc->wMaxCommand) | ||
288 | count = desc->wMaxCommand; | ||
289 | |||
290 | spin_lock_irq(&desc->iuspin); | ||
291 | we = desc->werr; | ||
292 | desc->werr = 0; | ||
293 | spin_unlock_irq(&desc->iuspin); | ||
294 | if (we < 0) | ||
295 | return -EIO; | ||
296 | |||
297 | r = mutex_lock_interruptible(&desc->wlock); /* concurrent writes */ | ||
298 | rv = -ERESTARTSYS; | ||
299 | if (r) | ||
300 | goto outnl; | ||
301 | |||
302 | r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE, | ||
303 | &desc->flags)); | ||
304 | if (r < 0) | ||
305 | goto out; | ||
306 | |||
307 | if (test_bit(WDM_DISCONNECTING, &desc->flags)) { | ||
308 | rv = -ENODEV; | ||
309 | goto out; | ||
310 | } | ||
311 | |||
312 | desc->outbuf = buf = kmalloc(count, GFP_KERNEL); | ||
313 | if (!buf) { | ||
314 | rv = -ENOMEM; | ||
315 | goto out; | ||
316 | } | ||
317 | |||
318 | r = copy_from_user(buf, buffer, count); | ||
319 | if (r > 0) { | ||
320 | kfree(buf); | ||
321 | rv = -EFAULT; | ||
322 | goto out; | ||
323 | } | ||
324 | |||
325 | req = desc->orq; | ||
326 | usb_fill_control_urb( | ||
327 | desc->command, | ||
328 | interface_to_usbdev(desc->intf), | ||
329 | /* using common endpoint 0 */ | ||
330 | usb_sndctrlpipe(interface_to_usbdev(desc->intf), 0), | ||
331 | (unsigned char *)req, | ||
332 | buf, | ||
333 | count, | ||
334 | wdm_out_callback, | ||
335 | desc | ||
336 | ); | ||
337 | |||
338 | req->bRequestType = (USB_DIR_OUT | USB_TYPE_CLASS | | ||
339 | USB_RECIP_INTERFACE); | ||
340 | req->bRequest = USB_CDC_SEND_ENCAPSULATED_COMMAND; | ||
341 | req->wValue = 0; | ||
342 | req->wIndex = desc->inum; | ||
343 | req->wLength = cpu_to_le16(count); | ||
344 | set_bit(WDM_IN_USE, &desc->flags); | ||
345 | |||
346 | rv = usb_submit_urb(desc->command, GFP_KERNEL); | ||
347 | if (rv < 0) { | ||
348 | kfree(buf); | ||
349 | clear_bit(WDM_IN_USE, &desc->flags); | ||
350 | } else { | ||
351 | dev_dbg(&desc->intf->dev, "Tx URB has been submitted index=%d", | ||
352 | req->wIndex); | ||
353 | } | ||
354 | out: | ||
355 | mutex_unlock(&desc->wlock); | ||
356 | outnl: | ||
357 | return rv < 0 ? rv : count; | ||
358 | } | ||
359 | |||
360 | static ssize_t wdm_read | ||
361 | (struct file *file, char __user *buffer, size_t count, loff_t *ppos) | ||
362 | { | ||
363 | int rv, cntr; | ||
364 | int i = 0; | ||
365 | struct wdm_device *desc = file->private_data; | ||
366 | |||
367 | |||
368 | rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */ | ||
369 | if (rv < 0) | ||
370 | return -ERESTARTSYS; | ||
371 | |||
372 | if (desc->length == 0) { | ||
373 | desc->read = 0; | ||
374 | retry: | ||
375 | i++; | ||
376 | rv = wait_event_interruptible(desc->wait, | ||
377 | test_bit(WDM_READ, &desc->flags)); | ||
378 | |||
379 | if (rv < 0) { | ||
380 | rv = -ERESTARTSYS; | ||
381 | goto err; | ||
382 | } | ||
383 | |||
384 | spin_lock_irq(&desc->iuspin); | ||
385 | |||
386 | if (desc->rerr) { /* read completed, error happened */ | ||
387 | int t = desc->rerr; | ||
388 | desc->rerr = 0; | ||
389 | spin_unlock_irq(&desc->iuspin); | ||
390 | err("reading had resulted in %d", t); | ||
391 | rv = -EIO; | ||
392 | goto err; | ||
393 | } | ||
394 | /* | ||
395 | * recheck whether we've lost the race | ||
396 | * against the completion handler | ||
397 | */ | ||
398 | if (!test_bit(WDM_READ, &desc->flags)) { /* lost race */ | ||
399 | spin_unlock_irq(&desc->iuspin); | ||
400 | goto retry; | ||
401 | } | ||
402 | if (!desc->reslength) { /* zero length read */ | ||
403 | spin_unlock_irq(&desc->iuspin); | ||
404 | goto retry; | ||
405 | } | ||
406 | clear_bit(WDM_READ, &desc->flags); | ||
407 | spin_unlock_irq(&desc->iuspin); | ||
408 | } | ||
409 | |||
410 | cntr = count > desc->length ? desc->length : count; | ||
411 | rv = copy_to_user(buffer, desc->ubuf, cntr); | ||
412 | if (rv > 0) { | ||
413 | rv = -EFAULT; | ||
414 | goto err; | ||
415 | } | ||
416 | |||
417 | for (i = 0; i < desc->length - cntr; i++) | ||
418 | desc->ubuf[i] = desc->ubuf[i + cntr]; | ||
419 | |||
420 | desc->length -= cntr; | ||
421 | rv = cntr; | ||
422 | |||
423 | err: | ||
424 | mutex_unlock(&desc->rlock); | ||
425 | if (rv < 0) | ||
426 | err("wdm_read: exit error"); | ||
427 | return rv; | ||
428 | } | ||
429 | |||
430 | static int wdm_flush(struct file *file, fl_owner_t id) | ||
431 | { | ||
432 | struct wdm_device *desc = file->private_data; | ||
433 | |||
434 | wait_event(desc->wait, !test_bit(WDM_IN_USE, &desc->flags)); | ||
435 | if (desc->werr < 0) | ||
436 | err("Error in flush path: %d", desc->werr); | ||
437 | |||
438 | return desc->werr; | ||
439 | } | ||
440 | |||
441 | static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait) | ||
442 | { | ||
443 | struct wdm_device *desc = file->private_data; | ||
444 | unsigned long flags; | ||
445 | unsigned int mask = 0; | ||
446 | |||
447 | spin_lock_irqsave(&desc->iuspin, flags); | ||
448 | if (test_bit(WDM_DISCONNECTING, &desc->flags)) { | ||
449 | mask = POLLERR; | ||
450 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
451 | goto desc_out; | ||
452 | } | ||
453 | if (test_bit(WDM_READ, &desc->flags)) | ||
454 | mask = POLLIN | POLLRDNORM; | ||
455 | if (desc->rerr || desc->werr) | ||
456 | mask |= POLLERR; | ||
457 | if (!test_bit(WDM_IN_USE, &desc->flags)) | ||
458 | mask |= POLLOUT | POLLWRNORM; | ||
459 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
460 | |||
461 | poll_wait(file, &desc->wait, wait); | ||
462 | |||
463 | desc_out: | ||
464 | return mask; | ||
465 | } | ||
466 | |||
467 | static int wdm_open(struct inode *inode, struct file *file) | ||
468 | { | ||
469 | int minor = iminor(inode); | ||
470 | int rv = -ENODEV; | ||
471 | struct usb_interface *intf; | ||
472 | struct wdm_device *desc; | ||
473 | |||
474 | mutex_lock(&wdm_mutex); | ||
475 | intf = usb_find_interface(&wdm_driver, minor); | ||
476 | if (!intf) | ||
477 | goto out; | ||
478 | |||
479 | desc = usb_get_intfdata(intf); | ||
480 | if (test_bit(WDM_DISCONNECTING, &desc->flags)) | ||
481 | goto out; | ||
482 | |||
483 | desc->count++; | ||
484 | file->private_data = desc; | ||
485 | |||
486 | rv = usb_submit_urb(desc->validity, GFP_KERNEL); | ||
487 | |||
488 | if (rv < 0) { | ||
489 | desc->count--; | ||
490 | err("Error submitting int urb - %d", rv); | ||
491 | goto out; | ||
492 | } | ||
493 | rv = 0; | ||
494 | |||
495 | out: | ||
496 | mutex_unlock(&wdm_mutex); | ||
497 | return rv; | ||
498 | } | ||
499 | |||
500 | static int wdm_release(struct inode *inode, struct file *file) | ||
501 | { | ||
502 | struct wdm_device *desc = file->private_data; | ||
503 | |||
504 | mutex_lock(&wdm_mutex); | ||
505 | desc->count--; | ||
506 | if (!desc->count) { | ||
507 | dev_dbg(&desc->intf->dev, "wdm_release: cleanup"); | ||
508 | kill_urbs(desc); | ||
509 | } | ||
510 | mutex_unlock(&wdm_mutex); | ||
511 | return 0; | ||
512 | } | ||
513 | |||
514 | static const struct file_operations wdm_fops = { | ||
515 | .owner = THIS_MODULE, | ||
516 | .read = wdm_read, | ||
517 | .write = wdm_write, | ||
518 | .open = wdm_open, | ||
519 | .flush = wdm_flush, | ||
520 | .release = wdm_release, | ||
521 | .poll = wdm_poll | ||
522 | }; | ||
523 | |||
524 | static struct usb_class_driver wdm_class = { | ||
525 | .name = "cdc-wdm%d", | ||
526 | .fops = &wdm_fops, | ||
527 | .minor_base = WDM_MINOR_BASE, | ||
528 | }; | ||
529 | |||
530 | /* --- error handling --- */ | ||
531 | static void wdm_rxwork(struct work_struct *work) | ||
532 | { | ||
533 | struct wdm_device *desc = container_of(work, struct wdm_device, rxwork); | ||
534 | unsigned long flags; | ||
535 | int rv; | ||
536 | |||
537 | spin_lock_irqsave(&desc->iuspin, flags); | ||
538 | if (test_bit(WDM_DISCONNECTING, &desc->flags)) { | ||
539 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
540 | } else { | ||
541 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
542 | rv = usb_submit_urb(desc->response, GFP_KERNEL); | ||
543 | if (rv < 0 && rv != -EPERM) { | ||
544 | spin_lock_irqsave(&desc->iuspin, flags); | ||
545 | if (!test_bit(WDM_DISCONNECTING, &desc->flags)) | ||
546 | schedule_work(&desc->rxwork); | ||
547 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
548 | } | ||
549 | } | ||
550 | } | ||
551 | |||
552 | /* --- hotplug --- */ | ||
553 | |||
554 | static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) | ||
555 | { | ||
556 | int rv = -EINVAL; | ||
557 | struct usb_device *udev = interface_to_usbdev(intf); | ||
558 | struct wdm_device *desc; | ||
559 | struct usb_host_interface *iface; | ||
560 | struct usb_endpoint_descriptor *ep; | ||
561 | struct usb_cdc_dmm_desc *dmhd; | ||
562 | u8 *buffer = intf->altsetting->extra; | ||
563 | int buflen = intf->altsetting->extralen; | ||
564 | u16 maxcom = 0; | ||
565 | |||
566 | if (!buffer) | ||
567 | goto out; | ||
568 | |||
569 | while (buflen > 0) { | ||
570 | if (buffer [1] != USB_DT_CS_INTERFACE) { | ||
571 | err("skipping garbage"); | ||
572 | goto next_desc; | ||
573 | } | ||
574 | |||
575 | switch (buffer [2]) { | ||
576 | case USB_CDC_HEADER_TYPE: | ||
577 | break; | ||
578 | case USB_CDC_DMM_TYPE: | ||
579 | dmhd = (struct usb_cdc_dmm_desc *)buffer; | ||
580 | maxcom = le16_to_cpu(dmhd->wMaxCommand); | ||
581 | dev_dbg(&intf->dev, | ||
582 | "Finding maximum buffer length: %d", maxcom); | ||
583 | break; | ||
584 | default: | ||
585 | err("Ignoring extra header, type %d, length %d", | ||
586 | buffer[2], buffer[0]); | ||
587 | break; | ||
588 | } | ||
589 | next_desc: | ||
590 | buflen -= buffer[0]; | ||
591 | buffer += buffer[0]; | ||
592 | } | ||
593 | |||
594 | rv = -ENOMEM; | ||
595 | desc = kzalloc(sizeof(struct wdm_device), GFP_KERNEL); | ||
596 | if (!desc) | ||
597 | goto out; | ||
598 | mutex_init(&desc->wlock); | ||
599 | mutex_init(&desc->rlock); | ||
600 | spin_lock_init(&desc->iuspin); | ||
601 | init_waitqueue_head(&desc->wait); | ||
602 | desc->wMaxCommand = maxcom; | ||
603 | desc->inum = cpu_to_le16((u16)intf->cur_altsetting->desc.bInterfaceNumber); | ||
604 | desc->intf = intf; | ||
605 | INIT_WORK(&desc->rxwork, wdm_rxwork); | ||
606 | |||
607 | iface = &intf->altsetting[0]; | ||
608 | ep = &iface->endpoint[0].desc; | ||
609 | if (!usb_endpoint_is_int_in(ep)) { | ||
610 | rv = -EINVAL; | ||
611 | goto err; | ||
612 | } | ||
613 | |||
614 | desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize); | ||
615 | desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0; | ||
616 | |||
617 | desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); | ||
618 | if (!desc->orq) | ||
619 | goto err; | ||
620 | desc->irq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); | ||
621 | if (!desc->irq) | ||
622 | goto err; | ||
623 | |||
624 | desc->validity = usb_alloc_urb(0, GFP_KERNEL); | ||
625 | if (!desc->validity) | ||
626 | goto err; | ||
627 | |||
628 | desc->response = usb_alloc_urb(0, GFP_KERNEL); | ||
629 | if (!desc->response) | ||
630 | goto err; | ||
631 | |||
632 | desc->command = usb_alloc_urb(0, GFP_KERNEL); | ||
633 | if (!desc->command) | ||
634 | goto err; | ||
635 | |||
636 | desc->ubuf = kmalloc(desc->wMaxCommand, GFP_KERNEL); | ||
637 | if (!desc->ubuf) | ||
638 | goto err; | ||
639 | |||
640 | desc->sbuf = usb_buffer_alloc(interface_to_usbdev(intf), | ||
641 | desc->wMaxPacketSize, | ||
642 | GFP_KERNEL, | ||
643 | &desc->validity->transfer_dma); | ||
644 | if (!desc->sbuf) | ||
645 | goto err; | ||
646 | |||
647 | desc->inbuf = usb_buffer_alloc(interface_to_usbdev(intf), | ||
648 | desc->bMaxPacketSize0, | ||
649 | GFP_KERNEL, | ||
650 | &desc->response->transfer_dma); | ||
651 | if (!desc->inbuf) | ||
652 | goto err2; | ||
653 | |||
654 | usb_fill_int_urb( | ||
655 | desc->validity, | ||
656 | interface_to_usbdev(intf), | ||
657 | usb_rcvintpipe(interface_to_usbdev(intf), ep->bEndpointAddress), | ||
658 | desc->sbuf, | ||
659 | desc->wMaxPacketSize, | ||
660 | wdm_int_callback, | ||
661 | desc, | ||
662 | ep->bInterval | ||
663 | ); | ||
664 | desc->validity->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | ||
665 | |||
666 | usb_set_intfdata(intf, desc); | ||
667 | rv = usb_register_dev(intf, &wdm_class); | ||
668 | dev_info(&intf->dev, "cdc-wdm%d: USB WDM device\n", | ||
669 | intf->minor - WDM_MINOR_BASE); | ||
670 | if (rv < 0) | ||
671 | goto err; | ||
672 | out: | ||
673 | return rv; | ||
674 | err2: | ||
675 | usb_buffer_free(interface_to_usbdev(desc->intf), | ||
676 | desc->wMaxPacketSize, | ||
677 | desc->sbuf, | ||
678 | desc->validity->transfer_dma); | ||
679 | err: | ||
680 | free_urbs(desc); | ||
681 | kfree(desc->ubuf); | ||
682 | kfree(desc->orq); | ||
683 | kfree(desc->irq); | ||
684 | kfree(desc); | ||
685 | return rv; | ||
686 | } | ||
687 | |||
688 | static void wdm_disconnect(struct usb_interface *intf) | ||
689 | { | ||
690 | struct wdm_device *desc; | ||
691 | unsigned long flags; | ||
692 | |||
693 | usb_deregister_dev(intf, &wdm_class); | ||
694 | mutex_lock(&wdm_mutex); | ||
695 | desc = usb_get_intfdata(intf); | ||
696 | |||
697 | /* the spinlock makes sure no new urbs are generated in the callbacks */ | ||
698 | spin_lock_irqsave(&desc->iuspin, flags); | ||
699 | set_bit(WDM_DISCONNECTING, &desc->flags); | ||
700 | set_bit(WDM_READ, &desc->flags); | ||
701 | clear_bit(WDM_IN_USE, &desc->flags); | ||
702 | spin_unlock_irqrestore(&desc->iuspin, flags); | ||
703 | cancel_work_sync(&desc->rxwork); | ||
704 | kill_urbs(desc); | ||
705 | wake_up_all(&desc->wait); | ||
706 | if (!desc->count) | ||
707 | cleanup(desc); | ||
708 | mutex_unlock(&wdm_mutex); | ||
709 | } | ||
710 | |||
711 | static struct usb_driver wdm_driver = { | ||
712 | .name = "cdc_wdm", | ||
713 | .probe = wdm_probe, | ||
714 | .disconnect = wdm_disconnect, | ||
715 | .id_table = wdm_ids, | ||
716 | }; | ||
717 | |||
718 | /* --- low level module stuff --- */ | ||
719 | |||
720 | static int __init wdm_init(void) | ||
721 | { | ||
722 | int rv; | ||
723 | |||
724 | rv = usb_register(&wdm_driver); | ||
725 | |||
726 | return rv; | ||
727 | } | ||
728 | |||
729 | static void __exit wdm_exit(void) | ||
730 | { | ||
731 | usb_deregister(&wdm_driver); | ||
732 | } | ||
733 | |||
734 | module_init(wdm_init); | ||
735 | module_exit(wdm_exit); | ||
736 | |||
737 | MODULE_AUTHOR(DRIVER_AUTHOR); | ||
738 | MODULE_DESCRIPTION("USB Abstract Control Model driver for " | ||
739 | "USB WCM Device Management"); | ||
740 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index c1cb94e9f242..7e912f21fd36 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c | |||
@@ -155,9 +155,6 @@ static int generic_probe(struct usb_device *udev) | |||
155 | { | 155 | { |
156 | int err, c; | 156 | int err, c; |
157 | 157 | ||
158 | /* put device-specific files into sysfs */ | ||
159 | usb_create_sysfs_dev_files(udev); | ||
160 | |||
161 | /* Choose and set the configuration. This registers the interfaces | 158 | /* Choose and set the configuration. This registers the interfaces |
162 | * with the driver core and lets interface drivers bind to them. | 159 | * with the driver core and lets interface drivers bind to them. |
163 | */ | 160 | */ |
@@ -189,8 +186,6 @@ static void generic_disconnect(struct usb_device *udev) | |||
189 | * unconfigure the device */ | 186 | * unconfigure the device */ |
190 | if (udev->actconfig) | 187 | if (udev->actconfig) |
191 | usb_set_configuration(udev, -1); | 188 | usb_set_configuration(udev, -1); |
192 | |||
193 | usb_remove_sysfs_dev_files(udev); | ||
194 | } | 189 | } |
195 | 190 | ||
196 | #ifdef CONFIG_PM | 191 | #ifdef CONFIG_PM |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index bf10e9c4195e..09a53e7f3327 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -818,12 +818,12 @@ static int usb_register_bus(struct usb_bus *bus) | |||
818 | set_bit (busnum, busmap.busmap); | 818 | set_bit (busnum, busmap.busmap); |
819 | bus->busnum = busnum; | 819 | bus->busnum = busnum; |
820 | 820 | ||
821 | bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0), | 821 | bus->dev = device_create_drvdata(usb_host_class, bus->controller, |
822 | "usb_host%d", busnum); | 822 | MKDEV(0, 0), bus, |
823 | "usb_host%d", busnum); | ||
823 | result = PTR_ERR(bus->dev); | 824 | result = PTR_ERR(bus->dev); |
824 | if (IS_ERR(bus->dev)) | 825 | if (IS_ERR(bus->dev)) |
825 | goto error_create_class_dev; | 826 | goto error_create_class_dev; |
826 | dev_set_drvdata(bus->dev, bus); | ||
827 | 827 | ||
828 | /* Add it to the local list of buses */ | 828 | /* Add it to the local list of buses */ |
829 | list_add (&bus->bus_list, &usb_bus_list); | 829 | list_add (&bus->bus_list, &usb_bus_list); |
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index 1e4b81e9eb50..a0bf5df6cb6f 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h | |||
@@ -213,6 +213,8 @@ struct hc_driver { | |||
213 | 213 | ||
214 | /* force handover of high-speed port to full-speed companion */ | 214 | /* force handover of high-speed port to full-speed companion */ |
215 | void (*relinquish_port)(struct usb_hcd *, int); | 215 | void (*relinquish_port)(struct usb_hcd *, int); |
216 | /* has a port been handed over to a companion? */ | ||
217 | int (*port_handed_over)(struct usb_hcd *, int); | ||
216 | }; | 218 | }; |
217 | 219 | ||
218 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 220 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index eb57fcc701d7..94789be54ca3 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -644,6 +644,48 @@ static void hub_stop(struct usb_hub *hub) | |||
644 | 644 | ||
645 | #ifdef CONFIG_PM | 645 | #ifdef CONFIG_PM |
646 | 646 | ||
647 | /* Try to identify which devices need USB-PERSIST handling */ | ||
648 | static int persistent_device(struct usb_device *udev) | ||
649 | { | ||
650 | int i; | ||
651 | int retval; | ||
652 | struct usb_host_config *actconfig; | ||
653 | |||
654 | /* Explicitly not marked persistent? */ | ||
655 | if (!udev->persist_enabled) | ||
656 | return 0; | ||
657 | |||
658 | /* No active config? */ | ||
659 | actconfig = udev->actconfig; | ||
660 | if (!actconfig) | ||
661 | return 0; | ||
662 | |||
663 | /* FIXME! We should check whether it's open here or not! */ | ||
664 | |||
665 | /* | ||
666 | * Check that all the interface drivers have a | ||
667 | * 'reset_resume' entrypoint | ||
668 | */ | ||
669 | retval = 0; | ||
670 | for (i = 0; i < actconfig->desc.bNumInterfaces; i++) { | ||
671 | struct usb_interface *intf; | ||
672 | struct usb_driver *driver; | ||
673 | |||
674 | intf = actconfig->interface[i]; | ||
675 | if (!intf->dev.driver) | ||
676 | continue; | ||
677 | driver = to_usb_driver(intf->dev.driver); | ||
678 | if (!driver->reset_resume) | ||
679 | return 0; | ||
680 | /* | ||
681 | * We have at least one driver, and that one | ||
682 | * has a reset_resume method. | ||
683 | */ | ||
684 | retval = 1; | ||
685 | } | ||
686 | return retval; | ||
687 | } | ||
688 | |||
647 | static void hub_restart(struct usb_hub *hub, int type) | 689 | static void hub_restart(struct usb_hub *hub, int type) |
648 | { | 690 | { |
649 | struct usb_device *hdev = hub->hdev; | 691 | struct usb_device *hdev = hub->hdev; |
@@ -689,8 +731,8 @@ static void hub_restart(struct usb_hub *hub, int type) | |||
689 | * turn off the various status changes to prevent | 731 | * turn off the various status changes to prevent |
690 | * khubd from disconnecting it later. | 732 | * khubd from disconnecting it later. |
691 | */ | 733 | */ |
692 | if (udev->persist_enabled && status == 0 && | 734 | if (status == 0 && !(portstatus & USB_PORT_STAT_ENABLE) && |
693 | !(portstatus & USB_PORT_STAT_ENABLE)) { | 735 | persistent_device(udev)) { |
694 | if (portchange & USB_PORT_STAT_C_ENABLE) | 736 | if (portchange & USB_PORT_STAT_C_ENABLE) |
695 | clear_port_feature(hub->hdev, port1, | 737 | clear_port_feature(hub->hdev, port1, |
696 | USB_PORT_FEAT_C_ENABLE); | 738 | USB_PORT_FEAT_C_ENABLE); |
@@ -1326,6 +1368,12 @@ void usb_disconnect(struct usb_device **pdev) | |||
1326 | 1368 | ||
1327 | usb_unlock_device(udev); | 1369 | usb_unlock_device(udev); |
1328 | 1370 | ||
1371 | /* Remove the device-specific files from sysfs. This must be | ||
1372 | * done with udev unlocked, because some of the attribute | ||
1373 | * routines try to acquire the device lock. | ||
1374 | */ | ||
1375 | usb_remove_sysfs_dev_files(udev); | ||
1376 | |||
1329 | /* Unregister the device. The device driver is responsible | 1377 | /* Unregister the device. The device driver is responsible |
1330 | * for removing the device files from usbfs and sysfs and for | 1378 | * for removing the device files from usbfs and sysfs and for |
1331 | * de-configuring the device. | 1379 | * de-configuring the device. |
@@ -1541,6 +1589,9 @@ int usb_new_device(struct usb_device *udev) | |||
1541 | goto fail; | 1589 | goto fail; |
1542 | } | 1590 | } |
1543 | 1591 | ||
1592 | /* put device-specific files into sysfs */ | ||
1593 | usb_create_sysfs_dev_files(udev); | ||
1594 | |||
1544 | /* Tell the world! */ | 1595 | /* Tell the world! */ |
1545 | announce_device(udev); | 1596 | announce_device(udev); |
1546 | return err; | 1597 | return err; |
@@ -2744,7 +2795,11 @@ loop: | |||
2744 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) | 2795 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) |
2745 | break; | 2796 | break; |
2746 | } | 2797 | } |
2747 | dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1); | 2798 | if (hub->hdev->parent || |
2799 | !hcd->driver->port_handed_over || | ||
2800 | !(hcd->driver->port_handed_over)(hcd, port1)) | ||
2801 | dev_err(hub_dev, "unable to enumerate USB device on port %d\n", | ||
2802 | port1); | ||
2748 | 2803 | ||
2749 | done: | 2804 | done: |
2750 | hub_port_disable(hub, port1, 1); | 2805 | hub_port_disable(hub, port1, 1); |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 2e2019390290..3da1ab4b389d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
@@ -47,6 +47,10 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
47 | /* Edirol SD-20 */ | 47 | /* Edirol SD-20 */ |
48 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, | 48 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, |
49 | 49 | ||
50 | /* Avision AV600U */ | ||
51 | { USB_DEVICE(0x0638, 0x0a13), .driver_info = | ||
52 | USB_QUIRK_STRING_FETCH_255 }, | ||
53 | |||
50 | /* M-Systems Flash Disk Pioneers */ | 54 | /* M-Systems Flash Disk Pioneers */ |
51 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, | 55 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, |
52 | 56 | ||
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index c783cb111847..5e1f5d55bf04 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -588,35 +588,33 @@ read_descriptors(struct kobject *kobj, struct bin_attribute *attr, | |||
588 | container_of(kobj, struct device, kobj)); | 588 | container_of(kobj, struct device, kobj)); |
589 | size_t nleft = count; | 589 | size_t nleft = count; |
590 | size_t srclen, n; | 590 | size_t srclen, n; |
591 | int cfgno; | ||
592 | void *src; | ||
591 | 593 | ||
592 | usb_lock_device(udev); | 594 | /* The binary attribute begins with the device descriptor. |
593 | 595 | * Following that are the raw descriptor entries for all the | |
594 | /* The binary attribute begins with the device descriptor */ | 596 | * configurations (config plus subsidiary descriptors). |
595 | srclen = sizeof(struct usb_device_descriptor); | ||
596 | if (off < srclen) { | ||
597 | n = min_t(size_t, nleft, srclen - off); | ||
598 | memcpy(buf, off + (char *) &udev->descriptor, n); | ||
599 | nleft -= n; | ||
600 | buf += n; | ||
601 | off = 0; | ||
602 | } else { | ||
603 | off -= srclen; | ||
604 | } | ||
605 | |||
606 | /* Then follows the raw descriptor entry for the current | ||
607 | * configuration (config plus subsidiary descriptors). | ||
608 | */ | 597 | */ |
609 | if (udev->actconfig) { | 598 | for (cfgno = -1; cfgno < udev->descriptor.bNumConfigurations && |
610 | int cfgno = udev->actconfig - udev->config; | 599 | nleft > 0; ++cfgno) { |
611 | 600 | if (cfgno < 0) { | |
612 | srclen = __le16_to_cpu(udev->actconfig->desc.wTotalLength); | 601 | src = &udev->descriptor; |
602 | srclen = sizeof(struct usb_device_descriptor); | ||
603 | } else { | ||
604 | src = udev->rawdescriptors[cfgno]; | ||
605 | srclen = __le16_to_cpu(udev->config[cfgno].desc. | ||
606 | wTotalLength); | ||
607 | } | ||
613 | if (off < srclen) { | 608 | if (off < srclen) { |
614 | n = min_t(size_t, nleft, srclen - off); | 609 | n = min(nleft, srclen - (size_t) off); |
615 | memcpy(buf, off + udev->rawdescriptors[cfgno], n); | 610 | memcpy(buf, src + off, n); |
616 | nleft -= n; | 611 | nleft -= n; |
612 | buf += n; | ||
613 | off = 0; | ||
614 | } else { | ||
615 | off -= srclen; | ||
617 | } | 616 | } |
618 | } | 617 | } |
619 | usb_unlock_device(udev); | ||
620 | return count - nleft; | 618 | return count - nleft; |
621 | } | 619 | } |
622 | 620 | ||
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 651b82701394..18687543d7fa 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c | |||
@@ -1627,7 +1627,9 @@ static int reset_queues(struct fsl_udc *udc) | |||
1627 | udc_reset_ep_queue(udc, pipe); | 1627 | udc_reset_ep_queue(udc, pipe); |
1628 | 1628 | ||
1629 | /* report disconnect; the driver is already quiesced */ | 1629 | /* report disconnect; the driver is already quiesced */ |
1630 | spin_unlock(&udc->lock); | ||
1630 | udc->driver->disconnect(&udc->gadget); | 1631 | udc->driver->disconnect(&udc->gadget); |
1632 | spin_lock(&udc->lock); | ||
1631 | 1633 | ||
1632 | return 0; | 1634 | return 0; |
1633 | } | 1635 | } |
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 499b7a23f351..e02bfd4df3a6 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -1526,7 +1526,8 @@ static void udc_disable(struct pxa_udc *udc) | |||
1526 | 1526 | ||
1527 | ep0_idle(udc); | 1527 | ep0_idle(udc); |
1528 | udc->gadget.speed = USB_SPEED_UNKNOWN; | 1528 | udc->gadget.speed = USB_SPEED_UNKNOWN; |
1529 | udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); | 1529 | if (udc->mach->udc_command) |
1530 | udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); | ||
1530 | } | 1531 | } |
1531 | 1532 | ||
1532 | /** | 1533 | /** |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 1ef6df395e0c..228797e54f9c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -300,8 +300,8 @@ config USB_R8A66597_HCD | |||
300 | module will be called r8a66597-hcd. | 300 | module will be called r8a66597-hcd. |
301 | 301 | ||
302 | config SUPERH_ON_CHIP_R8A66597 | 302 | config SUPERH_ON_CHIP_R8A66597 |
303 | boolean "Enable SuperH on-chip USB like the R8A66597" | 303 | boolean "Enable SuperH on-chip R8A66597 USB" |
304 | depends on USB_R8A66597_HCD && CPU_SUBTYPE_SH7366 | 304 | depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723) |
305 | help | 305 | help |
306 | Renesas SuperH processor has USB like the R8A66597. | 306 | This driver enables support for the on-chip R8A66597 in the |
307 | This driver supported processor is SH7366. | 307 | SH7366 and SH7723 processors. |
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 8b5f991e949c..08a4335401a9 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -223,6 +223,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { | |||
223 | .bus_suspend = ehci_bus_suspend, | 223 | .bus_suspend = ehci_bus_suspend, |
224 | .bus_resume = ehci_bus_resume, | 224 | .bus_resume = ehci_bus_resume, |
225 | .relinquish_port = ehci_relinquish_port, | 225 | .relinquish_port = ehci_relinquish_port, |
226 | .port_handed_over = ehci_port_handed_over, | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | /*-------------------------------------------------------------------------*/ | 229 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 6d9bed6c1f48..7370d6187c64 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) | |||
269 | if (retval) | 269 | if (retval) |
270 | return retval; | 270 | return retval; |
271 | 271 | ||
272 | ehci->is_tdi_rh_tt = 1; | 272 | hcd->has_tt = 1; |
273 | 273 | ||
274 | ehci->sbrn = 0x20; | 274 | ehci->sbrn = 0x20; |
275 | 275 | ||
@@ -295,10 +295,6 @@ static const struct hc_driver ehci_fsl_hc_driver = { | |||
295 | */ | 295 | */ |
296 | .reset = ehci_fsl_setup, | 296 | .reset = ehci_fsl_setup, |
297 | .start = ehci_run, | 297 | .start = ehci_run, |
298 | #ifdef CONFIG_PM | ||
299 | .suspend = ehci_bus_suspend, | ||
300 | .resume = ehci_bus_resume, | ||
301 | #endif | ||
302 | .stop = ehci_stop, | 298 | .stop = ehci_stop, |
303 | .shutdown = ehci_shutdown, | 299 | .shutdown = ehci_shutdown, |
304 | 300 | ||
@@ -322,6 +318,7 @@ static const struct hc_driver ehci_fsl_hc_driver = { | |||
322 | .bus_suspend = ehci_bus_suspend, | 318 | .bus_suspend = ehci_bus_suspend, |
323 | .bus_resume = ehci_bus_resume, | 319 | .bus_resume = ehci_bus_resume, |
324 | .relinquish_port = ehci_relinquish_port, | 320 | .relinquish_port = ehci_relinquish_port, |
321 | .port_handed_over = ehci_port_handed_over, | ||
325 | }; | 322 | }; |
326 | 323 | ||
327 | static int ehci_fsl_drv_probe(struct platform_device *pdev) | 324 | static int ehci_fsl_drv_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 382587c4457c..740835bb8575 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -609,7 +609,7 @@ static int ehci_hub_control ( | |||
609 | } | 609 | } |
610 | break; | 610 | break; |
611 | case USB_PORT_FEAT_C_SUSPEND: | 611 | case USB_PORT_FEAT_C_SUSPEND: |
612 | /* we auto-clear this feature */ | 612 | clear_bit(wIndex, &ehci->port_c_suspend); |
613 | break; | 613 | break; |
614 | case USB_PORT_FEAT_POWER: | 614 | case USB_PORT_FEAT_POWER: |
615 | if (HCS_PPC (ehci->hcs_params)) | 615 | if (HCS_PPC (ehci->hcs_params)) |
@@ -688,7 +688,7 @@ static int ehci_hub_control ( | |||
688 | /* resume completed? */ | 688 | /* resume completed? */ |
689 | else if (time_after_eq(jiffies, | 689 | else if (time_after_eq(jiffies, |
690 | ehci->reset_done[wIndex])) { | 690 | ehci->reset_done[wIndex])) { |
691 | status |= 1 << USB_PORT_FEAT_C_SUSPEND; | 691 | set_bit(wIndex, &ehci->port_c_suspend); |
692 | ehci->reset_done[wIndex] = 0; | 692 | ehci->reset_done[wIndex] = 0; |
693 | 693 | ||
694 | /* stop resume signaling */ | 694 | /* stop resume signaling */ |
@@ -765,6 +765,8 @@ static int ehci_hub_control ( | |||
765 | status |= 1 << USB_PORT_FEAT_RESET; | 765 | status |= 1 << USB_PORT_FEAT_RESET; |
766 | if (temp & PORT_POWER) | 766 | if (temp & PORT_POWER) |
767 | status |= 1 << USB_PORT_FEAT_POWER; | 767 | status |= 1 << USB_PORT_FEAT_POWER; |
768 | if (test_bit(wIndex, &ehci->port_c_suspend)) | ||
769 | status |= 1 << USB_PORT_FEAT_C_SUSPEND; | ||
768 | 770 | ||
769 | #ifndef VERBOSE_DEBUG | 771 | #ifndef VERBOSE_DEBUG |
770 | if (status & ~0xffff) /* only if wPortChange is interesting */ | 772 | if (status & ~0xffff) /* only if wPortChange is interesting */ |
@@ -875,3 +877,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum) | |||
875 | set_owner(ehci, --portnum, PORT_OWNER); | 877 | set_owner(ehci, --portnum, PORT_OWNER); |
876 | } | 878 | } |
877 | 879 | ||
880 | static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) | ||
881 | { | ||
882 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
883 | u32 __iomem *reg; | ||
884 | |||
885 | if (ehci_is_TDI(ehci)) | ||
886 | return 0; | ||
887 | reg = &ehci->regs->port_status[portnum - 1]; | ||
888 | return ehci_readl(ehci, reg) & PORT_OWNER; | ||
889 | } | ||
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c index 601c8795a854..9d042f220097 100644 --- a/drivers/usb/host/ehci-ixp4xx.c +++ b/drivers/usb/host/ehci-ixp4xx.c | |||
@@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd) | |||
26 | + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); | 26 | + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
27 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 27 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
28 | 28 | ||
29 | ehci->is_tdi_rh_tt = 1; | 29 | hcd->has_tt = 1; |
30 | ehci_reset(ehci); | 30 | ehci_reset(ehci); |
31 | 31 | ||
32 | retval = ehci_init(hcd); | 32 | retval = ehci_init(hcd); |
@@ -58,6 +58,8 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = { | |||
58 | .bus_suspend = ehci_bus_suspend, | 58 | .bus_suspend = ehci_bus_suspend, |
59 | .bus_resume = ehci_bus_resume, | 59 | .bus_resume = ehci_bus_resume, |
60 | #endif | 60 | #endif |
61 | .relinquish_port = ehci_relinquish_port, | ||
62 | .port_handed_over = ehci_port_handed_over, | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | static int ixp4xx_ehci_probe(struct platform_device *pdev) | 65 | static int ixp4xx_ehci_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index d187d0313742..ab625f0ba1d9 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -115,6 +115,8 @@ static int ehci_orion_setup(struct usb_hcd *hcd) | |||
115 | if (retval) | 115 | if (retval) |
116 | return retval; | 116 | return retval; |
117 | 117 | ||
118 | hcd->has_tt = 1; | ||
119 | |||
118 | ehci_reset(ehci); | 120 | ehci_reset(ehci); |
119 | ehci_port_power(ehci, 0); | 121 | ehci_port_power(ehci, 0); |
120 | 122 | ||
@@ -137,10 +139,6 @@ static const struct hc_driver ehci_orion_hc_driver = { | |||
137 | */ | 139 | */ |
138 | .reset = ehci_orion_setup, | 140 | .reset = ehci_orion_setup, |
139 | .start = ehci_run, | 141 | .start = ehci_run, |
140 | #ifdef CONFIG_PM | ||
141 | .suspend = ehci_bus_suspend, | ||
142 | .resume = ehci_bus_resume, | ||
143 | #endif | ||
144 | .stop = ehci_stop, | 142 | .stop = ehci_stop, |
145 | .shutdown = ehci_shutdown, | 143 | .shutdown = ehci_shutdown, |
146 | 144 | ||
@@ -163,6 +161,8 @@ static const struct hc_driver ehci_orion_hc_driver = { | |||
163 | .hub_control = ehci_hub_control, | 161 | .hub_control = ehci_hub_control, |
164 | .bus_suspend = ehci_bus_suspend, | 162 | .bus_suspend = ehci_bus_suspend, |
165 | .bus_resume = ehci_bus_resume, | 163 | .bus_resume = ehci_bus_resume, |
164 | .relinquish_port = ehci_relinquish_port, | ||
165 | .port_handed_over = ehci_port_handed_over, | ||
166 | }; | 166 | }; |
167 | 167 | ||
168 | static void __init | 168 | static void __init |
@@ -248,7 +248,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) | |||
248 | ehci->regs = hcd->regs + 0x100 + | 248 | ehci->regs = hcd->regs + 0x100 + |
249 | HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); | 249 | HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
250 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 250 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
251 | ehci->is_tdi_rh_tt = 1; | 251 | hcd->has_tt = 1; |
252 | ehci->sbrn = 0x20; | 252 | ehci->sbrn = 0x20; |
253 | 253 | ||
254 | /* | 254 | /* |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 5bb7f6bb13f3..c46a58f9181d 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -129,7 +129,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
129 | switch (pdev->vendor) { | 129 | switch (pdev->vendor) { |
130 | case PCI_VENDOR_ID_TDI: | 130 | case PCI_VENDOR_ID_TDI: |
131 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | 131 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { |
132 | ehci->is_tdi_rh_tt = 1; | ||
133 | hcd->has_tt = 1; | 132 | hcd->has_tt = 1; |
134 | tdi_reset(ehci); | 133 | tdi_reset(ehci); |
135 | } | 134 | } |
@@ -379,7 +378,8 @@ static const struct hc_driver ehci_pci_hc_driver = { | |||
379 | .hub_control = ehci_hub_control, | 378 | .hub_control = ehci_hub_control, |
380 | .bus_suspend = ehci_bus_suspend, | 379 | .bus_suspend = ehci_bus_suspend, |
381 | .bus_resume = ehci_bus_resume, | 380 | .bus_resume = ehci_bus_resume, |
382 | .relinquish_port = ehci_relinquish_port, | 381 | .relinquish_port = ehci_relinquish_port, |
382 | .port_handed_over = ehci_port_handed_over, | ||
383 | }; | 383 | }; |
384 | 384 | ||
385 | /*-------------------------------------------------------------------------*/ | 385 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index ee305b1f99ff..b018deed2e8f 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
@@ -76,6 +76,8 @@ static const struct hc_driver ehci_ppc_of_hc_driver = { | |||
76 | .bus_suspend = ehci_bus_suspend, | 76 | .bus_suspend = ehci_bus_suspend, |
77 | .bus_resume = ehci_bus_resume, | 77 | .bus_resume = ehci_bus_resume, |
78 | #endif | 78 | #endif |
79 | .relinquish_port = ehci_relinquish_port, | ||
80 | .port_handed_over = ehci_port_handed_over, | ||
79 | }; | 81 | }; |
80 | 82 | ||
81 | 83 | ||
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c index 6c76036783a1..529590eb4037 100644 --- a/drivers/usb/host/ehci-ppc-soc.c +++ b/drivers/usb/host/ehci-ppc-soc.c | |||
@@ -163,6 +163,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = { | |||
163 | .bus_suspend = ehci_bus_suspend, | 163 | .bus_suspend = ehci_bus_suspend, |
164 | .bus_resume = ehci_bus_resume, | 164 | .bus_resume = ehci_bus_resume, |
165 | .relinquish_port = ehci_relinquish_port, | 165 | .relinquish_port = ehci_relinquish_port, |
166 | .port_handed_over = ehci_port_handed_over, | ||
166 | }; | 167 | }; |
167 | 168 | ||
168 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) | 169 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index 69782221bcf3..37e6abeb794c 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c | |||
@@ -73,6 +73,7 @@ static const struct hc_driver ps3_ehci_hc_driver = { | |||
73 | .bus_resume = ehci_bus_resume, | 73 | .bus_resume = ehci_bus_resume, |
74 | #endif | 74 | #endif |
75 | .relinquish_port = ehci_relinquish_port, | 75 | .relinquish_port = ehci_relinquish_port, |
76 | .port_handed_over = ehci_port_handed_over, | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | static int ps3_ehci_probe(struct ps3_system_bus_device *dev) | 79 | static int ps3_ehci_probe(struct ps3_system_bus_device *dev) |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index be575e46eac3..b7853c8bac0f 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1349,18 +1349,27 @@ iso_stream_schedule ( | |||
1349 | /* when's the last uframe this urb could start? */ | 1349 | /* when's the last uframe this urb could start? */ |
1350 | max = now + mod; | 1350 | max = now + mod; |
1351 | 1351 | ||
1352 | /* typical case: reuse current schedule. stream is still active, | 1352 | /* Typical case: reuse current schedule, stream is still active. |
1353 | * and no gaps from host falling behind (irq delays etc) | 1353 | * Hopefully there are no gaps from the host falling behind |
1354 | * (irq delays etc), but if there are we'll take the next | ||
1355 | * slot in the schedule, implicitly assuming URB_ISO_ASAP. | ||
1354 | */ | 1356 | */ |
1355 | if (likely (!list_empty (&stream->td_list))) { | 1357 | if (likely (!list_empty (&stream->td_list))) { |
1356 | start = stream->next_uframe; | 1358 | start = stream->next_uframe; |
1357 | if (start < now) | 1359 | if (start < now) |
1358 | start += mod; | 1360 | start += mod; |
1359 | if (likely ((start + sched->span) < max)) | 1361 | |
1360 | goto ready; | 1362 | /* Fell behind (by up to twice the slop amount)? */ |
1361 | /* else fell behind; someday, try to reschedule */ | 1363 | if (start >= max - 2 * 8 * SCHEDULE_SLOP) |
1362 | status = -EL2NSYNC; | 1364 | start += stream->interval * DIV_ROUND_UP( |
1363 | goto fail; | 1365 | max - start, stream->interval) - mod; |
1366 | |||
1367 | /* Tried to schedule too far into the future? */ | ||
1368 | if (unlikely((start + sched->span) >= max)) { | ||
1369 | status = -EFBIG; | ||
1370 | goto fail; | ||
1371 | } | ||
1372 | goto ready; | ||
1364 | } | 1373 | } |
1365 | 1374 | ||
1366 | /* need to schedule; when's the next (u)frame we could start? | 1375 | /* need to schedule; when's the next (u)frame we could start? |
@@ -1613,6 +1622,9 @@ itd_complete ( | |||
1613 | } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { | 1622 | } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { |
1614 | desc->status = 0; | 1623 | desc->status = 0; |
1615 | desc->actual_length = EHCI_ITD_LENGTH (t); | 1624 | desc->actual_length = EHCI_ITD_LENGTH (t); |
1625 | } else { | ||
1626 | /* URB was too late */ | ||
1627 | desc->status = -EXDEV; | ||
1616 | } | 1628 | } |
1617 | } | 1629 | } |
1618 | 1630 | ||
@@ -2095,7 +2107,7 @@ done: | |||
2095 | static void | 2107 | static void |
2096 | scan_periodic (struct ehci_hcd *ehci) | 2108 | scan_periodic (struct ehci_hcd *ehci) |
2097 | { | 2109 | { |
2098 | unsigned frame, clock, now_uframe, mod; | 2110 | unsigned now_uframe, frame, clock, clock_frame, mod; |
2099 | unsigned modified; | 2111 | unsigned modified; |
2100 | 2112 | ||
2101 | mod = ehci->periodic_size << 3; | 2113 | mod = ehci->periodic_size << 3; |
@@ -2111,6 +2123,7 @@ scan_periodic (struct ehci_hcd *ehci) | |||
2111 | else | 2123 | else |
2112 | clock = now_uframe + mod - 1; | 2124 | clock = now_uframe + mod - 1; |
2113 | clock %= mod; | 2125 | clock %= mod; |
2126 | clock_frame = clock >> 3; | ||
2114 | 2127 | ||
2115 | for (;;) { | 2128 | for (;;) { |
2116 | union ehci_shadow q, *q_p; | 2129 | union ehci_shadow q, *q_p; |
@@ -2157,22 +2170,26 @@ restart: | |||
2157 | case Q_TYPE_ITD: | 2170 | case Q_TYPE_ITD: |
2158 | /* If this ITD is still active, leave it for | 2171 | /* If this ITD is still active, leave it for |
2159 | * later processing ... check the next entry. | 2172 | * later processing ... check the next entry. |
2173 | * No need to check for activity unless the | ||
2174 | * frame is current. | ||
2160 | */ | 2175 | */ |
2161 | rmb (); | 2176 | if (frame == clock_frame && live) { |
2162 | for (uf = 0; uf < 8 && live; uf++) { | 2177 | rmb(); |
2163 | if (0 == (q.itd->hw_transaction [uf] | 2178 | for (uf = 0; uf < 8; uf++) { |
2164 | & ITD_ACTIVE(ehci))) | 2179 | if (q.itd->hw_transaction[uf] & |
2165 | continue; | 2180 | ITD_ACTIVE(ehci)) |
2166 | incomplete = true; | 2181 | break; |
2167 | q_p = &q.itd->itd_next; | 2182 | } |
2168 | hw_p = &q.itd->hw_next; | 2183 | if (uf < 8) { |
2169 | type = Q_NEXT_TYPE(ehci, | 2184 | incomplete = true; |
2185 | q_p = &q.itd->itd_next; | ||
2186 | hw_p = &q.itd->hw_next; | ||
2187 | type = Q_NEXT_TYPE(ehci, | ||
2170 | q.itd->hw_next); | 2188 | q.itd->hw_next); |
2171 | q = *q_p; | 2189 | q = *q_p; |
2172 | break; | 2190 | break; |
2191 | } | ||
2173 | } | 2192 | } |
2174 | if (uf < 8 && live) | ||
2175 | break; | ||
2176 | 2193 | ||
2177 | /* Take finished ITDs out of the schedule | 2194 | /* Take finished ITDs out of the schedule |
2178 | * and process them: recycle, maybe report | 2195 | * and process them: recycle, maybe report |
@@ -2189,9 +2206,12 @@ restart: | |||
2189 | case Q_TYPE_SITD: | 2206 | case Q_TYPE_SITD: |
2190 | /* If this SITD is still active, leave it for | 2207 | /* If this SITD is still active, leave it for |
2191 | * later processing ... check the next entry. | 2208 | * later processing ... check the next entry. |
2209 | * No need to check for activity unless the | ||
2210 | * frame is current. | ||
2192 | */ | 2211 | */ |
2193 | if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) | 2212 | if (frame == clock_frame && live && |
2194 | && live) { | 2213 | (q.sitd->hw_results & |
2214 | SITD_ACTIVE(ehci))) { | ||
2195 | incomplete = true; | 2215 | incomplete = true; |
2196 | q_p = &q.sitd->sitd_next; | 2216 | q_p = &q.sitd->sitd_next; |
2197 | hw_p = &q.sitd->hw_next; | 2217 | hw_p = &q.sitd->hw_next; |
@@ -2260,6 +2280,7 @@ restart: | |||
2260 | 2280 | ||
2261 | /* rescan the rest of this frame, then ... */ | 2281 | /* rescan the rest of this frame, then ... */ |
2262 | clock = now; | 2282 | clock = now; |
2283 | clock_frame = clock >> 3; | ||
2263 | } else { | 2284 | } else { |
2264 | now_uframe++; | 2285 | now_uframe++; |
2265 | now_uframe %= mod; | 2286 | now_uframe %= mod; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index bf92d209a1a9..35a03095757e 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controller */ | |||
97 | dedicated to the companion controller */ | 97 | dedicated to the companion controller */ |
98 | unsigned long owned_ports; /* which ports are | 98 | unsigned long owned_ports; /* which ports are |
99 | owned by the companion during a bus suspend */ | 99 | owned by the companion during a bus suspend */ |
100 | unsigned long port_c_suspend; /* which ports have | ||
101 | the change-suspend feature turned on */ | ||
100 | 102 | ||
101 | /* per-HC memory pools (could be per-bus, but ...) */ | 103 | /* per-HC memory pools (could be per-bus, but ...) */ |
102 | struct dma_pool *qh_pool; /* qh per active urb */ | 104 | struct dma_pool *qh_pool; /* qh per active urb */ |
@@ -112,7 +114,6 @@ struct ehci_hcd { /* one per controller */ | |||
112 | u32 command; | 114 | u32 command; |
113 | 115 | ||
114 | /* SILICON QUIRKS */ | 116 | /* SILICON QUIRKS */ |
115 | unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ | ||
116 | unsigned no_selective_suspend:1; | 117 | unsigned no_selective_suspend:1; |
117 | unsigned has_fsl_port_bug:1; /* FreeScale */ | 118 | unsigned has_fsl_port_bug:1; /* FreeScale */ |
118 | unsigned big_endian_mmio:1; | 119 | unsigned big_endian_mmio:1; |
@@ -678,7 +679,7 @@ struct ehci_fstn { | |||
678 | * needed (mostly in root hub code). | 679 | * needed (mostly in root hub code). |
679 | */ | 680 | */ |
680 | 681 | ||
681 | #define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) | 682 | #define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt) |
682 | 683 | ||
683 | /* Returns the speed of a device attached to a port on the root hub. */ | 684 | /* Returns the speed of a device attached to a port on the root hub. */ |
684 | static inline unsigned int | 685 | static inline unsigned int |
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index c9cec8738261..65aa5ecf569a 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
@@ -2207,14 +2207,14 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq, | |||
2207 | goto err_put; | 2207 | goto err_put; |
2208 | } | 2208 | } |
2209 | 2209 | ||
2210 | ret = usb_add_hcd(hcd, irq, irqflags); | ||
2211 | if (ret) | ||
2212 | goto err_unmap; | ||
2213 | |||
2214 | hcd->irq = irq; | 2210 | hcd->irq = irq; |
2215 | hcd->rsrc_start = res_start; | 2211 | hcd->rsrc_start = res_start; |
2216 | hcd->rsrc_len = res_len; | 2212 | hcd->rsrc_len = res_len; |
2217 | 2213 | ||
2214 | ret = usb_add_hcd(hcd, irq, irqflags); | ||
2215 | if (ret) | ||
2216 | goto err_unmap; | ||
2217 | |||
2218 | return hcd; | 2218 | return hcd; |
2219 | 2219 | ||
2220 | err_unmap: | 2220 | err_unmap: |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 440bf94f0d4c..c9db3fe98726 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -104,8 +104,8 @@ static u32 nxp_pci_io_base; | |||
104 | static u32 iolength; | 104 | static u32 iolength; |
105 | static u32 pci_mem_phy0; | 105 | static u32 pci_mem_phy0; |
106 | static u32 length; | 106 | static u32 length; |
107 | static u8 *chip_addr; | 107 | static u8 __iomem *chip_addr; |
108 | static u8 *iobase; | 108 | static u8 __iomem *iobase; |
109 | 109 | ||
110 | static int __devinit isp1761_pci_probe(struct pci_dev *dev, | 110 | static int __devinit isp1761_pci_probe(struct pci_dev *dev, |
111 | const struct pci_device_id *id) | 111 | const struct pci_device_id *id) |
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index a53db1d4e07a..001789c9a11a 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig | |||
@@ -269,3 +269,15 @@ config USB_TEST | |||
269 | See <http://www.linux-usb.org/usbtest/> for more information, | 269 | See <http://www.linux-usb.org/usbtest/> for more information, |
270 | including sample test device firmware and "how to use it". | 270 | including sample test device firmware and "how to use it". |
271 | 271 | ||
272 | config USB_ISIGHTFW | ||
273 | tristate "iSight firmware loading support" | ||
274 | depends on USB | ||
275 | select FW_LOADER | ||
276 | help | ||
277 | This driver loads firmware for USB Apple iSight cameras, allowing | ||
278 | them to be driven by the USB video class driver available at | ||
279 | http://linux-uvc.berlios.de | ||
280 | |||
281 | The firmware for this driver must be extracted from the MacOS | ||
282 | driver beforehand. Tools for doing so are available at | ||
283 | http://bersace03.free.fr | ||
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index b68e6b774f1a..aba091cb5ec0 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_USB_EMI62) += emi62.o | |||
14 | obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o | 14 | obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o |
15 | obj-$(CONFIG_USB_IDMOUSE) += idmouse.o | 15 | obj-$(CONFIG_USB_IDMOUSE) += idmouse.o |
16 | obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o | 16 | obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o |
17 | obj-$(CONFIG_USB_ISIGHTFW) += isight_firmware.o | ||
17 | obj-$(CONFIG_USB_LCD) += usblcd.o | 18 | obj-$(CONFIG_USB_LCD) += usblcd.o |
18 | obj-$(CONFIG_USB_LD) += ldusb.o | 19 | obj-$(CONFIG_USB_LD) += ldusb.o |
19 | obj-$(CONFIG_USB_LED) += usbled.o | 20 | obj-$(CONFIG_USB_LED) += usbled.o |
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c new file mode 100644 index 000000000000..9f30aa1f8a5d --- /dev/null +++ b/drivers/usb/misc/isight_firmware.c | |||
@@ -0,0 +1,140 @@ | |||
1 | /* | ||
2 | * Driver for loading USB isight firmware | ||
3 | * | ||
4 | * Copyright (C) 2008 Matthew Garrett <mjg@redhat.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation, version 2. | ||
9 | * | ||
10 | * The USB isight cameras in recent Apples are roughly compatible with the USB | ||
11 | * video class specification, and can be driven by uvcvideo. However, they | ||
12 | * need firmware to be loaded beforehand. After firmware loading, the device | ||
13 | * detaches from the USB bus and reattaches with a new device ID. It can then | ||
14 | * be claimed by the uvc driver. | ||
15 | * | ||
16 | * The firmware is non-free and must be extracted by the user. Tools to do this | ||
17 | * are available at http://bersace03.free.fr/ift/ | ||
18 | * | ||
19 | * The isight firmware loading was reverse engineered by Johannes Berg | ||
20 | * <johannes@sipsolutions.de>, and this driver is based on code by Ronald | ||
21 | * Bultje <rbultje@ronald.bitfreak.net> | ||
22 | */ | ||
23 | |||
24 | #include <linux/usb.h> | ||
25 | #include <linux/firmware.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/module.h> | ||
28 | |||
29 | static struct usb_device_id id_table[] = { | ||
30 | {USB_DEVICE(0x05ac, 0x8300)}, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | MODULE_DEVICE_TABLE(usb, id_table); | ||
35 | |||
36 | static int isight_firmware_load(struct usb_interface *intf, | ||
37 | const struct usb_device_id *id) | ||
38 | { | ||
39 | struct usb_device *dev = interface_to_usbdev(intf); | ||
40 | int llen, len, req, ret = 0; | ||
41 | const struct firmware *firmware; | ||
42 | unsigned char *buf = kmalloc(50, GFP_KERNEL); | ||
43 | unsigned char data[4]; | ||
44 | u8 *ptr; | ||
45 | |||
46 | if (!buf) | ||
47 | return -ENOMEM; | ||
48 | |||
49 | if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { | ||
50 | printk(KERN_ERR "Unable to load isight firmware\n"); | ||
51 | return -ENODEV; | ||
52 | } | ||
53 | |||
54 | ptr = firmware->data; | ||
55 | |||
56 | if (usb_control_msg | ||
57 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\1", 1, | ||
58 | 300) != 1) { | ||
59 | printk(KERN_ERR | ||
60 | "Failed to initialise isight firmware loader\n"); | ||
61 | ret = -ENODEV; | ||
62 | goto out; | ||
63 | } | ||
64 | |||
65 | while (ptr+4 <= firmware->data+firmware->size) { | ||
66 | memcpy(data, ptr, 4); | ||
67 | len = (data[0] << 8 | data[1]); | ||
68 | req = (data[2] << 8 | data[3]); | ||
69 | ptr += 4; | ||
70 | |||
71 | if (len == 0x8001) | ||
72 | break; /* success */ | ||
73 | else if (len == 0) | ||
74 | continue; | ||
75 | |||
76 | for (; len > 0; req += 50) { | ||
77 | llen = min(len, 50); | ||
78 | len -= llen; | ||
79 | if (ptr+llen > firmware->data+firmware->size) { | ||
80 | printk(KERN_ERR | ||
81 | "Malformed isight firmware"); | ||
82 | ret = -ENODEV; | ||
83 | goto out; | ||
84 | } | ||
85 | memcpy(buf, ptr, llen); | ||
86 | |||
87 | ptr += llen; | ||
88 | |||
89 | if (usb_control_msg | ||
90 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, req, 0, | ||
91 | buf, llen, 300) != llen) { | ||
92 | printk(KERN_ERR | ||
93 | "Failed to load isight firmware\n"); | ||
94 | kfree(buf); | ||
95 | ret = -ENODEV; | ||
96 | goto out; | ||
97 | } | ||
98 | |||
99 | } | ||
100 | } | ||
101 | |||
102 | if (usb_control_msg | ||
103 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\0", 1, | ||
104 | 300) != 1) { | ||
105 | printk(KERN_ERR "isight firmware loading completion failed\n"); | ||
106 | ret = -ENODEV; | ||
107 | } | ||
108 | |||
109 | out: | ||
110 | kfree(buf); | ||
111 | release_firmware(firmware); | ||
112 | return ret; | ||
113 | } | ||
114 | |||
115 | static void isight_firmware_disconnect(struct usb_interface *intf) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | static struct usb_driver isight_firmware_driver = { | ||
120 | .name = "isight_firmware", | ||
121 | .probe = isight_firmware_load, | ||
122 | .disconnect = isight_firmware_disconnect, | ||
123 | .id_table = id_table, | ||
124 | }; | ||
125 | |||
126 | static int __init isight_firmware_init(void) | ||
127 | { | ||
128 | return usb_register(&isight_firmware_driver); | ||
129 | } | ||
130 | |||
131 | static void __exit isight_firmware_exit(void) | ||
132 | { | ||
133 | usb_deregister(&isight_firmware_driver); | ||
134 | } | ||
135 | |||
136 | module_init(isight_firmware_init); | ||
137 | module_exit(isight_firmware_exit); | ||
138 | |||
139 | MODULE_LICENSE("GPL"); | ||
140 | MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>"); | ||
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index 24230c638b8e..4cfa25b0f44e 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c | |||
@@ -595,14 +595,14 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic | |||
595 | } while(value); | 595 | } while(value); |
596 | kit->dev_no = bit; | 596 | kit->dev_no = bit; |
597 | 597 | ||
598 | kit->dev = device_create(phidget_class, &kit->udev->dev, 0, | 598 | kit->dev = device_create_drvdata(phidget_class, &kit->udev->dev, |
599 | "interfacekit%d", kit->dev_no); | 599 | MKDEV(0, 0), kit, |
600 | "interfacekit%d", kit->dev_no); | ||
600 | if (IS_ERR(kit->dev)) { | 601 | if (IS_ERR(kit->dev)) { |
601 | rc = PTR_ERR(kit->dev); | 602 | rc = PTR_ERR(kit->dev); |
602 | kit->dev = NULL; | 603 | kit->dev = NULL; |
603 | goto out; | 604 | goto out; |
604 | } | 605 | } |
605 | dev_set_drvdata(kit->dev, kit); | ||
606 | 606 | ||
607 | if (usb_submit_urb(kit->irq, GFP_KERNEL)) { | 607 | if (usb_submit_urb(kit->irq, GFP_KERNEL)) { |
608 | rc = -EIO; | 608 | rc = -EIO; |
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c index f0113c17cc5a..9b4696f21b22 100644 --- a/drivers/usb/misc/phidgetmotorcontrol.c +++ b/drivers/usb/misc/phidgetmotorcontrol.c | |||
@@ -365,16 +365,15 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic | |||
365 | } while(value); | 365 | } while(value); |
366 | mc->dev_no = bit; | 366 | mc->dev_no = bit; |
367 | 367 | ||
368 | mc->dev = device_create(phidget_class, &mc->udev->dev, 0, | 368 | mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev, |
369 | "motorcontrol%d", mc->dev_no); | 369 | MKDEV(0, 0), mc, |
370 | "motorcontrol%d", mc->dev_no); | ||
370 | if (IS_ERR(mc->dev)) { | 371 | if (IS_ERR(mc->dev)) { |
371 | rc = PTR_ERR(mc->dev); | 372 | rc = PTR_ERR(mc->dev); |
372 | mc->dev = NULL; | 373 | mc->dev = NULL; |
373 | goto out; | 374 | goto out; |
374 | } | 375 | } |
375 | 376 | ||
376 | dev_set_drvdata(mc->dev, mc); | ||
377 | |||
378 | if (usb_submit_urb(mc->irq, GFP_KERNEL)) { | 377 | if (usb_submit_urb(mc->irq, GFP_KERNEL)) { |
379 | rc = -EIO; | 378 | rc = -EIO; |
380 | goto out; | 379 | goto out; |
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c index 7d590c09434a..1ca7ddb41d4d 100644 --- a/drivers/usb/misc/phidgetservo.c +++ b/drivers/usb/misc/phidgetservo.c | |||
@@ -275,14 +275,14 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id) | |||
275 | } while (value); | 275 | } while (value); |
276 | dev->dev_no = bit; | 276 | dev->dev_no = bit; |
277 | 277 | ||
278 | dev->dev = device_create(phidget_class, &dev->udev->dev, 0, | 278 | dev->dev = device_create_drvdata(phidget_class, &dev->udev->dev, |
279 | "servo%d", dev->dev_no); | 279 | MKDEV(0, 0), dev, |
280 | "servo%d", dev->dev_no); | ||
280 | if (IS_ERR(dev->dev)) { | 281 | if (IS_ERR(dev->dev)) { |
281 | rc = PTR_ERR(dev->dev); | 282 | rc = PTR_ERR(dev->dev); |
282 | dev->dev = NULL; | 283 | dev->dev = NULL; |
283 | goto out; | 284 | goto out; |
284 | } | 285 | } |
285 | dev_set_drvdata(dev->dev, dev); | ||
286 | 286 | ||
287 | servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1; | 287 | servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1; |
288 | 288 | ||
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index ba28fdc9ccd2..1f7c86bd8297 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c | |||
@@ -28,6 +28,7 @@ static int debug; | |||
28 | 28 | ||
29 | static struct usb_device_id id_table [] = { | 29 | static struct usb_device_id id_table [] = { |
30 | { USB_DEVICE(0x4348, 0x5523) }, | 30 | { USB_DEVICE(0x4348, 0x5523) }, |
31 | { USB_DEVICE(0x1a86, 0x7523) }, | ||
31 | { }, | 32 | { }, |
32 | }; | 33 | }; |
33 | MODULE_DEVICE_TABLE(usb, id_table); | 34 | MODULE_DEVICE_TABLE(usb, id_table); |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 5b349ece7247..5234e7a3bd2c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -174,8 +174,270 @@ static struct usb_device_id id_table_combined [] = { | |||
174 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, | 174 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, |
175 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, | 175 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, |
176 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, | 176 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, |
177 | { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), | 177 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0100_PID) }, |
178 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0101_PID) }, | ||
179 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0102_PID) }, | ||
180 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0103_PID) }, | ||
181 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0104_PID) }, | ||
182 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0105_PID) }, | ||
183 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0106_PID) }, | ||
184 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0107_PID) }, | ||
185 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0108_PID) }, | ||
186 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0109_PID) }, | ||
187 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010A_PID) }, | ||
188 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010B_PID) }, | ||
189 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010C_PID) }, | ||
190 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010D_PID) }, | ||
191 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010E_PID) }, | ||
192 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010F_PID) }, | ||
193 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0110_PID) }, | ||
194 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0111_PID) }, | ||
195 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0112_PID) }, | ||
196 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0113_PID) }, | ||
197 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0114_PID) }, | ||
198 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0115_PID) }, | ||
199 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0116_PID) }, | ||
200 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0117_PID) }, | ||
201 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0118_PID) }, | ||
202 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0119_PID) }, | ||
203 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011A_PID) }, | ||
204 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011B_PID) }, | ||
205 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011C_PID) }, | ||
206 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011D_PID) }, | ||
207 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011E_PID) }, | ||
208 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011F_PID) }, | ||
209 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0120_PID) }, | ||
210 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0121_PID) }, | ||
211 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0122_PID) }, | ||
212 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0123_PID) }, | ||
213 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0124_PID) }, | ||
214 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0125_PID) }, | ||
215 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0126_PID) }, | ||
216 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0127_PID), | ||
178 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | 217 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, |
218 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0128_PID) }, | ||
219 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0129_PID) }, | ||
220 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012A_PID) }, | ||
221 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012B_PID) }, | ||
222 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012C_PID), | ||
223 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
224 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012D_PID) }, | ||
225 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012E_PID) }, | ||
226 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012F_PID) }, | ||
227 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0130_PID) }, | ||
228 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0131_PID) }, | ||
229 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0132_PID) }, | ||
230 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0133_PID) }, | ||
231 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0134_PID) }, | ||
232 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0135_PID) }, | ||
233 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0136_PID) }, | ||
234 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0137_PID) }, | ||
235 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0138_PID) }, | ||
236 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0139_PID) }, | ||
237 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013A_PID) }, | ||
238 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013B_PID) }, | ||
239 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013C_PID) }, | ||
240 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013D_PID) }, | ||
241 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013E_PID) }, | ||
242 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013F_PID) }, | ||
243 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0140_PID) }, | ||
244 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0141_PID) }, | ||
245 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0142_PID) }, | ||
246 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0143_PID) }, | ||
247 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0144_PID) }, | ||
248 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0145_PID) }, | ||
249 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0146_PID) }, | ||
250 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0147_PID) }, | ||
251 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0148_PID) }, | ||
252 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0149_PID) }, | ||
253 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014A_PID) }, | ||
254 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014B_PID) }, | ||
255 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014C_PID) }, | ||
256 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014D_PID) }, | ||
257 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014E_PID) }, | ||
258 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014F_PID) }, | ||
259 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0150_PID) }, | ||
260 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0151_PID) }, | ||
261 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0152_PID) }, | ||
262 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0153_PID), | ||
263 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
264 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0154_PID), | ||
265 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
266 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0155_PID), | ||
267 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
268 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0156_PID), | ||
269 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
270 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0157_PID), | ||
271 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
272 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0158_PID), | ||
273 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
274 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0159_PID) }, | ||
275 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015A_PID) }, | ||
276 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015B_PID) }, | ||
277 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015C_PID) }, | ||
278 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015D_PID) }, | ||
279 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015E_PID) }, | ||
280 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015F_PID) }, | ||
281 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0160_PID) }, | ||
282 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0161_PID) }, | ||
283 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0162_PID) }, | ||
284 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0163_PID) }, | ||
285 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0164_PID) }, | ||
286 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0165_PID) }, | ||
287 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0166_PID) }, | ||
288 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0167_PID) }, | ||
289 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0168_PID) }, | ||
290 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0169_PID) }, | ||
291 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016A_PID) }, | ||
292 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016B_PID) }, | ||
293 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016C_PID) }, | ||
294 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016D_PID) }, | ||
295 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016E_PID) }, | ||
296 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016F_PID) }, | ||
297 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0170_PID) }, | ||
298 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0171_PID) }, | ||
299 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0172_PID) }, | ||
300 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0173_PID) }, | ||
301 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0174_PID) }, | ||
302 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0175_PID) }, | ||
303 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0176_PID) }, | ||
304 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0177_PID) }, | ||
305 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0178_PID) }, | ||
306 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0179_PID) }, | ||
307 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017A_PID) }, | ||
308 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017B_PID) }, | ||
309 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017C_PID) }, | ||
310 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017D_PID) }, | ||
311 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017E_PID) }, | ||
312 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017F_PID) }, | ||
313 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0180_PID) }, | ||
314 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0181_PID) }, | ||
315 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0182_PID) }, | ||
316 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0183_PID) }, | ||
317 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0184_PID) }, | ||
318 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0185_PID) }, | ||
319 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0186_PID) }, | ||
320 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0187_PID) }, | ||
321 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0188_PID) }, | ||
322 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0189_PID) }, | ||
323 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018A_PID) }, | ||
324 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018B_PID) }, | ||
325 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018C_PID) }, | ||
326 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018D_PID) }, | ||
327 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018E_PID) }, | ||
328 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018F_PID) }, | ||
329 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0190_PID) }, | ||
330 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0191_PID) }, | ||
331 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0192_PID) }, | ||
332 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0193_PID) }, | ||
333 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0194_PID) }, | ||
334 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0195_PID) }, | ||
335 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0196_PID) }, | ||
336 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0197_PID) }, | ||
337 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0198_PID) }, | ||
338 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0199_PID) }, | ||
339 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019A_PID) }, | ||
340 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019B_PID) }, | ||
341 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019C_PID) }, | ||
342 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019D_PID) }, | ||
343 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019E_PID) }, | ||
344 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019F_PID) }, | ||
345 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A0_PID) }, | ||
346 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A1_PID) }, | ||
347 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A2_PID) }, | ||
348 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A3_PID) }, | ||
349 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A4_PID) }, | ||
350 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A5_PID) }, | ||
351 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A6_PID) }, | ||
352 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A7_PID) }, | ||
353 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A8_PID) }, | ||
354 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A9_PID) }, | ||
355 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AA_PID) }, | ||
356 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AB_PID) }, | ||
357 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AC_PID) }, | ||
358 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AD_PID) }, | ||
359 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AE_PID) }, | ||
360 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AF_PID) }, | ||
361 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B0_PID) }, | ||
362 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B1_PID) }, | ||
363 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B2_PID) }, | ||
364 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B3_PID) }, | ||
365 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B4_PID) }, | ||
366 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B5_PID) }, | ||
367 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B6_PID) }, | ||
368 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B7_PID) }, | ||
369 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B8_PID) }, | ||
370 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B9_PID) }, | ||
371 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BA_PID) }, | ||
372 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BB_PID) }, | ||
373 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BC_PID) }, | ||
374 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BD_PID) }, | ||
375 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BE_PID) }, | ||
376 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BF_PID) }, | ||
377 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C0_PID) }, | ||
378 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C1_PID) }, | ||
379 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C2_PID) }, | ||
380 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C3_PID) }, | ||
381 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C4_PID) }, | ||
382 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C5_PID) }, | ||
383 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C6_PID) }, | ||
384 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C7_PID) }, | ||
385 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C8_PID) }, | ||
386 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C9_PID) }, | ||
387 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CA_PID) }, | ||
388 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CB_PID) }, | ||
389 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CC_PID) }, | ||
390 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CD_PID) }, | ||
391 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CE_PID) }, | ||
392 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CF_PID) }, | ||
393 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D0_PID) }, | ||
394 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D1_PID) }, | ||
395 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D2_PID) }, | ||
396 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D3_PID) }, | ||
397 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D4_PID) }, | ||
398 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D5_PID) }, | ||
399 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D6_PID) }, | ||
400 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D7_PID) }, | ||
401 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D8_PID) }, | ||
402 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D9_PID) }, | ||
403 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DA_PID) }, | ||
404 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DB_PID) }, | ||
405 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DC_PID) }, | ||
406 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DD_PID) }, | ||
407 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DE_PID) }, | ||
408 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DF_PID) }, | ||
409 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E0_PID) }, | ||
410 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E1_PID) }, | ||
411 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E2_PID) }, | ||
412 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E3_PID) }, | ||
413 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E4_PID) }, | ||
414 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E5_PID) }, | ||
415 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E6_PID) }, | ||
416 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E7_PID) }, | ||
417 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E8_PID) }, | ||
418 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E9_PID) }, | ||
419 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EA_PID) }, | ||
420 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EB_PID) }, | ||
421 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EC_PID) }, | ||
422 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01ED_PID) }, | ||
423 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EE_PID) }, | ||
424 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EF_PID) }, | ||
425 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F0_PID) }, | ||
426 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F1_PID) }, | ||
427 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F2_PID) }, | ||
428 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F3_PID) }, | ||
429 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F4_PID) }, | ||
430 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F5_PID) }, | ||
431 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F6_PID) }, | ||
432 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F7_PID) }, | ||
433 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F8_PID) }, | ||
434 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F9_PID) }, | ||
435 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FA_PID) }, | ||
436 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FB_PID) }, | ||
437 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FC_PID) }, | ||
438 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FD_PID) }, | ||
439 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FE_PID) }, | ||
440 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FF_PID) }, | ||
179 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, | 441 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, |
180 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, | 442 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, |
181 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, | 443 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, |
@@ -374,6 +636,7 @@ static struct usb_device_id id_table_combined [] = { | |||
374 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 636 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
375 | { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), | 637 | { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), |
376 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 638 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
639 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | ||
377 | { }, /* Optional parameter entry */ | 640 | { }, /* Optional parameter entry */ |
378 | { } /* Terminating entry */ | 641 | { } /* Terminating entry */ |
379 | }; | 642 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index 504edf8c3a3f..06e0ecabb3eb 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -114,11 +114,268 @@ | |||
114 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | 114 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * The following are the values for the Matrix Orbital VK204-25-USB | 117 | * The following are the values for the Matrix Orbital FTDI Range |
118 | * display, which use the FT232RL. | 118 | * Anything in this range will use an FT232RL. |
119 | */ | 119 | */ |
120 | #define MTXORB_VK_VID 0x1b3d | 120 | #define MTXORB_VID 0x1B3D |
121 | #define MTXORB_VK_PID 0x0158 | 121 | #define MTXORB_FTDI_RANGE_0100_PID 0x0100 |
122 | #define MTXORB_FTDI_RANGE_0101_PID 0x0101 | ||
123 | #define MTXORB_FTDI_RANGE_0102_PID 0x0102 | ||
124 | #define MTXORB_FTDI_RANGE_0103_PID 0x0103 | ||
125 | #define MTXORB_FTDI_RANGE_0104_PID 0x0104 | ||
126 | #define MTXORB_FTDI_RANGE_0105_PID 0x0105 | ||
127 | #define MTXORB_FTDI_RANGE_0106_PID 0x0106 | ||
128 | #define MTXORB_FTDI_RANGE_0107_PID 0x0107 | ||
129 | #define MTXORB_FTDI_RANGE_0108_PID 0x0108 | ||
130 | #define MTXORB_FTDI_RANGE_0109_PID 0x0109 | ||
131 | #define MTXORB_FTDI_RANGE_010A_PID 0x010A | ||
132 | #define MTXORB_FTDI_RANGE_010B_PID 0x010B | ||
133 | #define MTXORB_FTDI_RANGE_010C_PID 0x010C | ||
134 | #define MTXORB_FTDI_RANGE_010D_PID 0x010D | ||
135 | #define MTXORB_FTDI_RANGE_010E_PID 0x010E | ||
136 | #define MTXORB_FTDI_RANGE_010F_PID 0x010F | ||
137 | #define MTXORB_FTDI_RANGE_0110_PID 0x0110 | ||
138 | #define MTXORB_FTDI_RANGE_0111_PID 0x0111 | ||
139 | #define MTXORB_FTDI_RANGE_0112_PID 0x0112 | ||
140 | #define MTXORB_FTDI_RANGE_0113_PID 0x0113 | ||
141 | #define MTXORB_FTDI_RANGE_0114_PID 0x0114 | ||
142 | #define MTXORB_FTDI_RANGE_0115_PID 0x0115 | ||
143 | #define MTXORB_FTDI_RANGE_0116_PID 0x0116 | ||
144 | #define MTXORB_FTDI_RANGE_0117_PID 0x0117 | ||
145 | #define MTXORB_FTDI_RANGE_0118_PID 0x0118 | ||
146 | #define MTXORB_FTDI_RANGE_0119_PID 0x0119 | ||
147 | #define MTXORB_FTDI_RANGE_011A_PID 0x011A | ||
148 | #define MTXORB_FTDI_RANGE_011B_PID 0x011B | ||
149 | #define MTXORB_FTDI_RANGE_011C_PID 0x011C | ||
150 | #define MTXORB_FTDI_RANGE_011D_PID 0x011D | ||
151 | #define MTXORB_FTDI_RANGE_011E_PID 0x011E | ||
152 | #define MTXORB_FTDI_RANGE_011F_PID 0x011F | ||
153 | #define MTXORB_FTDI_RANGE_0120_PID 0x0120 | ||
154 | #define MTXORB_FTDI_RANGE_0121_PID 0x0121 | ||
155 | #define MTXORB_FTDI_RANGE_0122_PID 0x0122 | ||
156 | #define MTXORB_FTDI_RANGE_0123_PID 0x0123 | ||
157 | #define MTXORB_FTDI_RANGE_0124_PID 0x0124 | ||
158 | #define MTXORB_FTDI_RANGE_0125_PID 0x0125 | ||
159 | #define MTXORB_FTDI_RANGE_0126_PID 0x0126 | ||
160 | #define MTXORB_FTDI_RANGE_0127_PID 0x0127 | ||
161 | #define MTXORB_FTDI_RANGE_0128_PID 0x0128 | ||
162 | #define MTXORB_FTDI_RANGE_0129_PID 0x0129 | ||
163 | #define MTXORB_FTDI_RANGE_012A_PID 0x012A | ||
164 | #define MTXORB_FTDI_RANGE_012B_PID 0x012B | ||
165 | #define MTXORB_FTDI_RANGE_012C_PID 0x012C | ||
166 | #define MTXORB_FTDI_RANGE_012D_PID 0x012D | ||
167 | #define MTXORB_FTDI_RANGE_012E_PID 0x012E | ||
168 | #define MTXORB_FTDI_RANGE_012F_PID 0x012F | ||
169 | #define MTXORB_FTDI_RANGE_0130_PID 0x0130 | ||
170 | #define MTXORB_FTDI_RANGE_0131_PID 0x0131 | ||
171 | #define MTXORB_FTDI_RANGE_0132_PID 0x0132 | ||
172 | #define MTXORB_FTDI_RANGE_0133_PID 0x0133 | ||
173 | #define MTXORB_FTDI_RANGE_0134_PID 0x0134 | ||
174 | #define MTXORB_FTDI_RANGE_0135_PID 0x0135 | ||
175 | #define MTXORB_FTDI_RANGE_0136_PID 0x0136 | ||
176 | #define MTXORB_FTDI_RANGE_0137_PID 0x0137 | ||
177 | #define MTXORB_FTDI_RANGE_0138_PID 0x0138 | ||
178 | #define MTXORB_FTDI_RANGE_0139_PID 0x0139 | ||
179 | #define MTXORB_FTDI_RANGE_013A_PID 0x013A | ||
180 | #define MTXORB_FTDI_RANGE_013B_PID 0x013B | ||
181 | #define MTXORB_FTDI_RANGE_013C_PID 0x013C | ||
182 | #define MTXORB_FTDI_RANGE_013D_PID 0x013D | ||
183 | #define MTXORB_FTDI_RANGE_013E_PID 0x013E | ||
184 | #define MTXORB_FTDI_RANGE_013F_PID 0x013F | ||
185 | #define MTXORB_FTDI_RANGE_0140_PID 0x0140 | ||
186 | #define MTXORB_FTDI_RANGE_0141_PID 0x0141 | ||
187 | #define MTXORB_FTDI_RANGE_0142_PID 0x0142 | ||
188 | #define MTXORB_FTDI_RANGE_0143_PID 0x0143 | ||
189 | #define MTXORB_FTDI_RANGE_0144_PID 0x0144 | ||
190 | #define MTXORB_FTDI_RANGE_0145_PID 0x0145 | ||
191 | #define MTXORB_FTDI_RANGE_0146_PID 0x0146 | ||
192 | #define MTXORB_FTDI_RANGE_0147_PID 0x0147 | ||
193 | #define MTXORB_FTDI_RANGE_0148_PID 0x0148 | ||
194 | #define MTXORB_FTDI_RANGE_0149_PID 0x0149 | ||
195 | #define MTXORB_FTDI_RANGE_014A_PID 0x014A | ||
196 | #define MTXORB_FTDI_RANGE_014B_PID 0x014B | ||
197 | #define MTXORB_FTDI_RANGE_014C_PID 0x014C | ||
198 | #define MTXORB_FTDI_RANGE_014D_PID 0x014D | ||
199 | #define MTXORB_FTDI_RANGE_014E_PID 0x014E | ||
200 | #define MTXORB_FTDI_RANGE_014F_PID 0x014F | ||
201 | #define MTXORB_FTDI_RANGE_0150_PID 0x0150 | ||
202 | #define MTXORB_FTDI_RANGE_0151_PID 0x0151 | ||
203 | #define MTXORB_FTDI_RANGE_0152_PID 0x0152 | ||
204 | #define MTXORB_FTDI_RANGE_0153_PID 0x0153 | ||
205 | #define MTXORB_FTDI_RANGE_0154_PID 0x0154 | ||
206 | #define MTXORB_FTDI_RANGE_0155_PID 0x0155 | ||
207 | #define MTXORB_FTDI_RANGE_0156_PID 0x0156 | ||
208 | #define MTXORB_FTDI_RANGE_0157_PID 0x0157 | ||
209 | #define MTXORB_FTDI_RANGE_0158_PID 0x0158 | ||
210 | #define MTXORB_FTDI_RANGE_0159_PID 0x0159 | ||
211 | #define MTXORB_FTDI_RANGE_015A_PID 0x015A | ||
212 | #define MTXORB_FTDI_RANGE_015B_PID 0x015B | ||
213 | #define MTXORB_FTDI_RANGE_015C_PID 0x015C | ||
214 | #define MTXORB_FTDI_RANGE_015D_PID 0x015D | ||
215 | #define MTXORB_FTDI_RANGE_015E_PID 0x015E | ||
216 | #define MTXORB_FTDI_RANGE_015F_PID 0x015F | ||
217 | #define MTXORB_FTDI_RANGE_0160_PID 0x0160 | ||
218 | #define MTXORB_FTDI_RANGE_0161_PID 0x0161 | ||
219 | #define MTXORB_FTDI_RANGE_0162_PID 0x0162 | ||
220 | #define MTXORB_FTDI_RANGE_0163_PID 0x0163 | ||
221 | #define MTXORB_FTDI_RANGE_0164_PID 0x0164 | ||
222 | #define MTXORB_FTDI_RANGE_0165_PID 0x0165 | ||
223 | #define MTXORB_FTDI_RANGE_0166_PID 0x0166 | ||
224 | #define MTXORB_FTDI_RANGE_0167_PID 0x0167 | ||
225 | #define MTXORB_FTDI_RANGE_0168_PID 0x0168 | ||
226 | #define MTXORB_FTDI_RANGE_0169_PID 0x0169 | ||
227 | #define MTXORB_FTDI_RANGE_016A_PID 0x016A | ||
228 | #define MTXORB_FTDI_RANGE_016B_PID 0x016B | ||
229 | #define MTXORB_FTDI_RANGE_016C_PID 0x016C | ||
230 | #define MTXORB_FTDI_RANGE_016D_PID 0x016D | ||
231 | #define MTXORB_FTDI_RANGE_016E_PID 0x016E | ||
232 | #define MTXORB_FTDI_RANGE_016F_PID 0x016F | ||
233 | #define MTXORB_FTDI_RANGE_0170_PID 0x0170 | ||
234 | #define MTXORB_FTDI_RANGE_0171_PID 0x0171 | ||
235 | #define MTXORB_FTDI_RANGE_0172_PID 0x0172 | ||
236 | #define MTXORB_FTDI_RANGE_0173_PID 0x0173 | ||
237 | #define MTXORB_FTDI_RANGE_0174_PID 0x0174 | ||
238 | #define MTXORB_FTDI_RANGE_0175_PID 0x0175 | ||
239 | #define MTXORB_FTDI_RANGE_0176_PID 0x0176 | ||
240 | #define MTXORB_FTDI_RANGE_0177_PID 0x0177 | ||
241 | #define MTXORB_FTDI_RANGE_0178_PID 0x0178 | ||
242 | #define MTXORB_FTDI_RANGE_0179_PID 0x0179 | ||
243 | #define MTXORB_FTDI_RANGE_017A_PID 0x017A | ||
244 | #define MTXORB_FTDI_RANGE_017B_PID 0x017B | ||
245 | #define MTXORB_FTDI_RANGE_017C_PID 0x017C | ||
246 | #define MTXORB_FTDI_RANGE_017D_PID 0x017D | ||
247 | #define MTXORB_FTDI_RANGE_017E_PID 0x017E | ||
248 | #define MTXORB_FTDI_RANGE_017F_PID 0x017F | ||
249 | #define MTXORB_FTDI_RANGE_0180_PID 0x0180 | ||
250 | #define MTXORB_FTDI_RANGE_0181_PID 0x0181 | ||
251 | #define MTXORB_FTDI_RANGE_0182_PID 0x0182 | ||
252 | #define MTXORB_FTDI_RANGE_0183_PID 0x0183 | ||
253 | #define MTXORB_FTDI_RANGE_0184_PID 0x0184 | ||
254 | #define MTXORB_FTDI_RANGE_0185_PID 0x0185 | ||
255 | #define MTXORB_FTDI_RANGE_0186_PID 0x0186 | ||
256 | #define MTXORB_FTDI_RANGE_0187_PID 0x0187 | ||
257 | #define MTXORB_FTDI_RANGE_0188_PID 0x0188 | ||
258 | #define MTXORB_FTDI_RANGE_0189_PID 0x0189 | ||
259 | #define MTXORB_FTDI_RANGE_018A_PID 0x018A | ||
260 | #define MTXORB_FTDI_RANGE_018B_PID 0x018B | ||
261 | #define MTXORB_FTDI_RANGE_018C_PID 0x018C | ||
262 | #define MTXORB_FTDI_RANGE_018D_PID 0x018D | ||
263 | #define MTXORB_FTDI_RANGE_018E_PID 0x018E | ||
264 | #define MTXORB_FTDI_RANGE_018F_PID 0x018F | ||
265 | #define MTXORB_FTDI_RANGE_0190_PID 0x0190 | ||
266 | #define MTXORB_FTDI_RANGE_0191_PID 0x0191 | ||
267 | #define MTXORB_FTDI_RANGE_0192_PID 0x0192 | ||
268 | #define MTXORB_FTDI_RANGE_0193_PID 0x0193 | ||
269 | #define MTXORB_FTDI_RANGE_0194_PID 0x0194 | ||
270 | #define MTXORB_FTDI_RANGE_0195_PID 0x0195 | ||
271 | #define MTXORB_FTDI_RANGE_0196_PID 0x0196 | ||
272 | #define MTXORB_FTDI_RANGE_0197_PID 0x0197 | ||
273 | #define MTXORB_FTDI_RANGE_0198_PID 0x0198 | ||
274 | #define MTXORB_FTDI_RANGE_0199_PID 0x0199 | ||
275 | #define MTXORB_FTDI_RANGE_019A_PID 0x019A | ||
276 | #define MTXORB_FTDI_RANGE_019B_PID 0x019B | ||
277 | #define MTXORB_FTDI_RANGE_019C_PID 0x019C | ||
278 | #define MTXORB_FTDI_RANGE_019D_PID 0x019D | ||
279 | #define MTXORB_FTDI_RANGE_019E_PID 0x019E | ||
280 | #define MTXORB_FTDI_RANGE_019F_PID 0x019F | ||
281 | #define MTXORB_FTDI_RANGE_01A0_PID 0x01A0 | ||
282 | #define MTXORB_FTDI_RANGE_01A1_PID 0x01A1 | ||
283 | #define MTXORB_FTDI_RANGE_01A2_PID 0x01A2 | ||
284 | #define MTXORB_FTDI_RANGE_01A3_PID 0x01A3 | ||
285 | #define MTXORB_FTDI_RANGE_01A4_PID 0x01A4 | ||
286 | #define MTXORB_FTDI_RANGE_01A5_PID 0x01A5 | ||
287 | #define MTXORB_FTDI_RANGE_01A6_PID 0x01A6 | ||
288 | #define MTXORB_FTDI_RANGE_01A7_PID 0x01A7 | ||
289 | #define MTXORB_FTDI_RANGE_01A8_PID 0x01A8 | ||
290 | #define MTXORB_FTDI_RANGE_01A9_PID 0x01A9 | ||
291 | #define MTXORB_FTDI_RANGE_01AA_PID 0x01AA | ||
292 | #define MTXORB_FTDI_RANGE_01AB_PID 0x01AB | ||
293 | #define MTXORB_FTDI_RANGE_01AC_PID 0x01AC | ||
294 | #define MTXORB_FTDI_RANGE_01AD_PID 0x01AD | ||
295 | #define MTXORB_FTDI_RANGE_01AE_PID 0x01AE | ||
296 | #define MTXORB_FTDI_RANGE_01AF_PID 0x01AF | ||
297 | #define MTXORB_FTDI_RANGE_01B0_PID 0x01B0 | ||
298 | #define MTXORB_FTDI_RANGE_01B1_PID 0x01B1 | ||
299 | #define MTXORB_FTDI_RANGE_01B2_PID 0x01B2 | ||
300 | #define MTXORB_FTDI_RANGE_01B3_PID 0x01B3 | ||
301 | #define MTXORB_FTDI_RANGE_01B4_PID 0x01B4 | ||
302 | #define MTXORB_FTDI_RANGE_01B5_PID 0x01B5 | ||
303 | #define MTXORB_FTDI_RANGE_01B6_PID 0x01B6 | ||
304 | #define MTXORB_FTDI_RANGE_01B7_PID 0x01B7 | ||
305 | #define MTXORB_FTDI_RANGE_01B8_PID 0x01B8 | ||
306 | #define MTXORB_FTDI_RANGE_01B9_PID 0x01B9 | ||
307 | #define MTXORB_FTDI_RANGE_01BA_PID 0x01BA | ||
308 | #define MTXORB_FTDI_RANGE_01BB_PID 0x01BB | ||
309 | #define MTXORB_FTDI_RANGE_01BC_PID 0x01BC | ||
310 | #define MTXORB_FTDI_RANGE_01BD_PID 0x01BD | ||
311 | #define MTXORB_FTDI_RANGE_01BE_PID 0x01BE | ||
312 | #define MTXORB_FTDI_RANGE_01BF_PID 0x01BF | ||
313 | #define MTXORB_FTDI_RANGE_01C0_PID 0x01C0 | ||
314 | #define MTXORB_FTDI_RANGE_01C1_PID 0x01C1 | ||
315 | #define MTXORB_FTDI_RANGE_01C2_PID 0x01C2 | ||
316 | #define MTXORB_FTDI_RANGE_01C3_PID 0x01C3 | ||
317 | #define MTXORB_FTDI_RANGE_01C4_PID 0x01C4 | ||
318 | #define MTXORB_FTDI_RANGE_01C5_PID 0x01C5 | ||
319 | #define MTXORB_FTDI_RANGE_01C6_PID 0x01C6 | ||
320 | #define MTXORB_FTDI_RANGE_01C7_PID 0x01C7 | ||
321 | #define MTXORB_FTDI_RANGE_01C8_PID 0x01C8 | ||
322 | #define MTXORB_FTDI_RANGE_01C9_PID 0x01C9 | ||
323 | #define MTXORB_FTDI_RANGE_01CA_PID 0x01CA | ||
324 | #define MTXORB_FTDI_RANGE_01CB_PID 0x01CB | ||
325 | #define MTXORB_FTDI_RANGE_01CC_PID 0x01CC | ||
326 | #define MTXORB_FTDI_RANGE_01CD_PID 0x01CD | ||
327 | #define MTXORB_FTDI_RANGE_01CE_PID 0x01CE | ||
328 | #define MTXORB_FTDI_RANGE_01CF_PID 0x01CF | ||
329 | #define MTXORB_FTDI_RANGE_01D0_PID 0x01D0 | ||
330 | #define MTXORB_FTDI_RANGE_01D1_PID 0x01D1 | ||
331 | #define MTXORB_FTDI_RANGE_01D2_PID 0x01D2 | ||
332 | #define MTXORB_FTDI_RANGE_01D3_PID 0x01D3 | ||
333 | #define MTXORB_FTDI_RANGE_01D4_PID 0x01D4 | ||
334 | #define MTXORB_FTDI_RANGE_01D5_PID 0x01D5 | ||
335 | #define MTXORB_FTDI_RANGE_01D6_PID 0x01D6 | ||
336 | #define MTXORB_FTDI_RANGE_01D7_PID 0x01D7 | ||
337 | #define MTXORB_FTDI_RANGE_01D8_PID 0x01D8 | ||
338 | #define MTXORB_FTDI_RANGE_01D9_PID 0x01D9 | ||
339 | #define MTXORB_FTDI_RANGE_01DA_PID 0x01DA | ||
340 | #define MTXORB_FTDI_RANGE_01DB_PID 0x01DB | ||
341 | #define MTXORB_FTDI_RANGE_01DC_PID 0x01DC | ||
342 | #define MTXORB_FTDI_RANGE_01DD_PID 0x01DD | ||
343 | #define MTXORB_FTDI_RANGE_01DE_PID 0x01DE | ||
344 | #define MTXORB_FTDI_RANGE_01DF_PID 0x01DF | ||
345 | #define MTXORB_FTDI_RANGE_01E0_PID 0x01E0 | ||
346 | #define MTXORB_FTDI_RANGE_01E1_PID 0x01E1 | ||
347 | #define MTXORB_FTDI_RANGE_01E2_PID 0x01E2 | ||
348 | #define MTXORB_FTDI_RANGE_01E3_PID 0x01E3 | ||
349 | #define MTXORB_FTDI_RANGE_01E4_PID 0x01E4 | ||
350 | #define MTXORB_FTDI_RANGE_01E5_PID 0x01E5 | ||
351 | #define MTXORB_FTDI_RANGE_01E6_PID 0x01E6 | ||
352 | #define MTXORB_FTDI_RANGE_01E7_PID 0x01E7 | ||
353 | #define MTXORB_FTDI_RANGE_01E8_PID 0x01E8 | ||
354 | #define MTXORB_FTDI_RANGE_01E9_PID 0x01E9 | ||
355 | #define MTXORB_FTDI_RANGE_01EA_PID 0x01EA | ||
356 | #define MTXORB_FTDI_RANGE_01EB_PID 0x01EB | ||
357 | #define MTXORB_FTDI_RANGE_01EC_PID 0x01EC | ||
358 | #define MTXORB_FTDI_RANGE_01ED_PID 0x01ED | ||
359 | #define MTXORB_FTDI_RANGE_01EE_PID 0x01EE | ||
360 | #define MTXORB_FTDI_RANGE_01EF_PID 0x01EF | ||
361 | #define MTXORB_FTDI_RANGE_01F0_PID 0x01F0 | ||
362 | #define MTXORB_FTDI_RANGE_01F1_PID 0x01F1 | ||
363 | #define MTXORB_FTDI_RANGE_01F2_PID 0x01F2 | ||
364 | #define MTXORB_FTDI_RANGE_01F3_PID 0x01F3 | ||
365 | #define MTXORB_FTDI_RANGE_01F4_PID 0x01F4 | ||
366 | #define MTXORB_FTDI_RANGE_01F5_PID 0x01F5 | ||
367 | #define MTXORB_FTDI_RANGE_01F6_PID 0x01F6 | ||
368 | #define MTXORB_FTDI_RANGE_01F7_PID 0x01F7 | ||
369 | #define MTXORB_FTDI_RANGE_01F8_PID 0x01F8 | ||
370 | #define MTXORB_FTDI_RANGE_01F9_PID 0x01F9 | ||
371 | #define MTXORB_FTDI_RANGE_01FA_PID 0x01FA | ||
372 | #define MTXORB_FTDI_RANGE_01FB_PID 0x01FB | ||
373 | #define MTXORB_FTDI_RANGE_01FC_PID 0x01FC | ||
374 | #define MTXORB_FTDI_RANGE_01FD_PID 0x01FD | ||
375 | #define MTXORB_FTDI_RANGE_01FE_PID 0x01FE | ||
376 | #define MTXORB_FTDI_RANGE_01FF_PID 0x01FF | ||
377 | |||
378 | |||
122 | 379 | ||
123 | /* Interbiometrics USB I/O Board */ | 380 | /* Interbiometrics USB I/O Board */ |
124 | /* Developed for Interbiometrics by Rudolf Gugler */ | 381 | /* Developed for Interbiometrics by Rudolf Gugler */ |
@@ -592,6 +849,12 @@ | |||
592 | #define FIC_NEO1973_DEBUG_PID 0x5118 | 849 | #define FIC_NEO1973_DEBUG_PID 0x5118 |
593 | 850 | ||
594 | /* | 851 | /* |
852 | * RATOC REX-USB60F | ||
853 | */ | ||
854 | #define RATOC_VENDOR_ID 0x0584 | ||
855 | #define RATOC_PRODUCT_ID_USB60F 0xb020 | ||
856 | |||
857 | /* | ||
595 | * BmRequestType: 1100 0000b | 858 | * BmRequestType: 1100 0000b |
596 | * bRequest: FTDI_E2_READ | 859 | * bRequest: FTDI_E2_READ |
597 | * wValue: 0 | 860 | * wValue: 0 |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index e7e016e60333..43cfde83a93b 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -183,6 +183,7 @@ static int option_send_setup(struct usb_serial_port *port); | |||
183 | #define AXESSTEL_PRODUCT_MV110H 0x1000 | 183 | #define AXESSTEL_PRODUCT_MV110H 0x1000 |
184 | 184 | ||
185 | #define ONDA_VENDOR_ID 0x19d2 | 185 | #define ONDA_VENDOR_ID 0x19d2 |
186 | #define ONDA_PRODUCT_MSA501HS 0x0001 | ||
186 | #define ONDA_PRODUCT_ET502HS 0x0002 | 187 | #define ONDA_PRODUCT_ET502HS 0x0002 |
187 | 188 | ||
188 | #define BANDRICH_VENDOR_ID 0x1A8D | 189 | #define BANDRICH_VENDOR_ID 0x1A8D |
@@ -196,6 +197,9 @@ static int option_send_setup(struct usb_serial_port *port); | |||
196 | 197 | ||
197 | #define MAXON_VENDOR_ID 0x16d8 | 198 | #define MAXON_VENDOR_ID 0x16d8 |
198 | 199 | ||
200 | #define TELIT_VENDOR_ID 0x1bc7 | ||
201 | #define TELIT_PRODUCT_UC864E 0x1003 | ||
202 | |||
199 | static struct usb_device_id option_ids[] = { | 203 | static struct usb_device_id option_ids[] = { |
200 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, | 204 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
201 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, | 205 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
@@ -232,25 +236,25 @@ static struct usb_device_id option_ids[] = { | |||
232 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, | 236 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, |
233 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, | 237 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
234 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, | 238 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, |
235 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, | 239 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
236 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, | 240 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
237 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, | 241 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
238 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) }, | 242 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) }, |
239 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) }, | 243 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) }, |
240 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) }, | 244 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) }, |
241 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) }, | 245 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) }, |
242 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) }, | 246 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) }, |
243 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) }, | 247 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) }, |
244 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) }, | 248 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) }, |
245 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) }, | 249 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) }, |
246 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) }, | 250 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) }, |
247 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) }, | 251 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) }, |
248 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) }, | 252 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) }, |
249 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) }, | 253 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) }, |
250 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) }, | 254 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) }, |
251 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) }, | 255 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) }, |
252 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) }, | 256 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) }, |
253 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) }, | 257 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) }, |
254 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, | 258 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, |
255 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ | 259 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ |
256 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ | 260 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ |
@@ -297,13 +301,14 @@ static struct usb_device_id option_ids[] = { | |||
297 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, | 301 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, |
298 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 302 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
299 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | 303 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, |
304 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, | ||
300 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, | 305 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, |
301 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 306 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
302 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 307 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
303 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, | 308 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, |
304 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ | 309 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
305 | { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ | 310 | { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
306 | { USB_DEVICE(0x19d2, 0x0001) }, /* Telstra NextG CDMA */ | 311 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, |
307 | { } /* Terminating entry */ | 312 | { } /* Terminating entry */ |
308 | }; | 313 | }; |
309 | MODULE_DEVICE_TABLE(usb, option_ids); | 314 | MODULE_DEVICE_TABLE(usb, option_ids); |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index c605fb68f807..103195abd417 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -56,6 +56,7 @@ static struct usb_device_id id_table [] = { | |||
56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, | 56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, |
57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, | 57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, |
58 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, | 58 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, |
59 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, | ||
59 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, | 60 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, |
60 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, | 61 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, |
61 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, | 62 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, |
@@ -66,7 +67,6 @@ static struct usb_device_id id_table [] = { | |||
66 | { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) }, | 67 | { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) }, |
67 | { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, | 68 | { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, |
68 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, | 69 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, |
69 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | ||
70 | { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) }, | 70 | { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) }, |
71 | { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) }, | 71 | { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) }, |
72 | { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, | 72 | { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, |
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 10cf872e5ecb..cff160abb130 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 | 14 | #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 |
15 | #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 | 15 | #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 |
16 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 | 16 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 |
17 | #define PL2303_PRODUCT_ID_MMX 0x0612 | ||
17 | 18 | ||
18 | #define ATEN_VENDOR_ID 0x0557 | 19 | #define ATEN_VENDOR_ID 0x0557 |
19 | #define ATEN_VENDOR_ID2 0x0547 | 20 | #define ATEN_VENDOR_ID2 0x0547 |
@@ -36,7 +37,6 @@ | |||
36 | 37 | ||
37 | #define RATOC_VENDOR_ID 0x0584 | 38 | #define RATOC_VENDOR_ID 0x0584 |
38 | #define RATOC_PRODUCT_ID 0xb000 | 39 | #define RATOC_PRODUCT_ID 0xb000 |
39 | #define RATOC_PRODUCT_ID_USB60F 0xb020 | ||
40 | 40 | ||
41 | #define TRIPP_VENDOR_ID 0x2478 | 41 | #define TRIPP_VENDOR_ID 0x2478 |
42 | #define TRIPP_PRODUCT_ID 0x2008 | 42 | #define TRIPP_PRODUCT_ID 0x2008 |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 1b09578cbb10..45fe3663fa7f 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -405,7 +405,7 @@ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, | |||
405 | UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, | 405 | UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, |
406 | "Cypress", | 406 | "Cypress", |
407 | "Cypress AT2LP", | 407 | "Cypress AT2LP", |
408 | US_SC_CYP_ATACB, US_PR_BULK, NULL, | 408 | US_SC_CYP_ATACB, US_PR_DEVICE, NULL, |
409 | 0), | 409 | 0), |
410 | #endif | 410 | #endif |
411 | 411 | ||
@@ -1522,7 +1522,7 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, | |||
1522 | "Sony Ericsson", | 1522 | "Sony Ericsson", |
1523 | "M600i", | 1523 | "M600i", |
1524 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1524 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1525 | US_FL_FIX_CAPACITY ), | 1525 | US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), |
1526 | 1526 | ||
1527 | /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> | 1527 | /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> |
1528 | * Tested on hardware version 1.10. | 1528 | * Tested on hardware version 1.10. |
@@ -1716,10 +1716,12 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, | |||
1716 | /* | 1716 | /* |
1717 | * Patch by Pete Zaitcev <zaitcev@redhat.com> | 1717 | * Patch by Pete Zaitcev <zaitcev@redhat.com> |
1718 | * Report by Mark Patton. Red Hat bz#208928. | 1718 | * Report by Mark Patton. Red Hat bz#208928. |
1719 | * Added support for rev 0x0002 (Motorola ROKR W5) | ||
1720 | * by Javier Smaldone <javier@smaldone.com.ar> | ||
1719 | */ | 1721 | */ |
1720 | UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, | 1722 | UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0002, |
1721 | "Motorola", | 1723 | "Motorola", |
1722 | "RAZR V3i", | 1724 | "RAZR V3i/ROKR W5", |
1723 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1725 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1724 | US_FL_FIX_CAPACITY), | 1726 | US_FL_FIX_CAPACITY), |
1725 | 1727 | ||
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index e4bcf5376a99..bd4ac0bafecb 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i | |||
3356 | 3356 | ||
3357 | info->fix.mmio_start = raddr; | 3357 | info->fix.mmio_start = raddr; |
3358 | par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); | 3358 | par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); |
3359 | if (par->ati_regbase == 0) | 3359 | if (par->ati_regbase == NULL) |
3360 | return -ENOMEM; | 3360 | return -ENOMEM; |
3361 | 3361 | ||
3362 | info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; | 3362 | info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 72cd0d2f14ec..400e9264e456 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -2277,8 +2277,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, | |||
2277 | do { | 2277 | do { |
2278 | rinfo->fb_base = ioremap (rinfo->fb_base_phys, | 2278 | rinfo->fb_base = ioremap (rinfo->fb_base_phys, |
2279 | rinfo->mapped_vram); | 2279 | rinfo->mapped_vram); |
2280 | } while ( rinfo->fb_base == 0 && | 2280 | } while (rinfo->fb_base == NULL && |
2281 | ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); | 2281 | ((rinfo->mapped_vram /= 2) >= MIN_MAPPED_VRAM)); |
2282 | 2282 | ||
2283 | if (rinfo->fb_base == NULL) { | 2283 | if (rinfo->fb_base == NULL) { |
2284 | printk (KERN_ERR "radeonfb (%s): cannot map FB\n", | 2284 | printk (KERN_ERR "radeonfb (%s): cannot map FB\n", |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 35ac9d956b3d..c14b2435d23e 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2432,9 +2432,9 @@ static int cirrusfb_pci_register(struct pci_dev *pdev, | |||
2432 | info->screen_size = board_size; | 2432 | info->screen_size = board_size; |
2433 | cinfo->unmap = cirrusfb_pci_unmap; | 2433 | cinfo->unmap = cirrusfb_pci_unmap; |
2434 | 2434 | ||
2435 | printk(KERN_INFO " RAM (%lu kB) at 0xx%lx, ", | 2435 | printk(KERN_INFO "RAM (%lu kB) at 0x%lx, Cirrus " |
2436 | info->screen_size >> 10, board_addr); | 2436 | "Logic chipset on PCI bus\n", |
2437 | printk(KERN_INFO "Cirrus Logic chipset on PCI bus\n"); | 2437 | info->screen_size >> 10, board_addr); |
2438 | pci_set_drvdata(pdev, info); | 2438 | pci_set_drvdata(pdev, info); |
2439 | 2439 | ||
2440 | ret = cirrusfb_register(info); | 2440 | ret = cirrusfb_register(info); |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 5fa8b76673cb..97aff8db10bf 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -2275,9 +2275,7 @@ static int fbcon_switch(struct vc_data *vc) | |||
2275 | * in fb_set_var() | 2275 | * in fb_set_var() |
2276 | */ | 2276 | */ |
2277 | info->var.activate = var.activate; | 2277 | info->var.activate = var.activate; |
2278 | var.yoffset = info->var.yoffset; | 2278 | var.vmode |= info->var.vmode & ~FB_VMODE_MASK; |
2279 | var.xoffset = info->var.xoffset; | ||
2280 | var.vmode = info->var.vmode; | ||
2281 | fb_set_var(info, &var); | 2279 | fb_set_var(info, &var); |
2282 | ops->var = info->var; | 2280 | ops->var = info->var; |
2283 | 2281 | ||
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c index 35477177bef4..6ef800bdf482 100644 --- a/drivers/video/display/display-sysfs.c +++ b/drivers/video/display/display-sysfs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/idr.h> | 27 | #include <linux/idr.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/kdev_t.h> | ||
29 | 30 | ||
30 | static ssize_t display_show_name(struct device *dev, | 31 | static ssize_t display_show_name(struct device *dev, |
31 | struct device_attribute *attr, char *buf) | 32 | struct device_attribute *attr, char *buf) |
@@ -152,10 +153,13 @@ struct display_device *display_device_register(struct display_driver *driver, | |||
152 | mutex_unlock(&allocated_dsp_lock); | 153 | mutex_unlock(&allocated_dsp_lock); |
153 | 154 | ||
154 | if (!ret) { | 155 | if (!ret) { |
155 | new_dev->dev = device_create(display_class, parent, 0, | 156 | new_dev->dev = device_create_drvdata(display_class, |
156 | "display%d", new_dev->idx); | 157 | parent, |
158 | MKDEV(0,0), | ||
159 | new_dev, | ||
160 | "display%d", | ||
161 | new_dev->idx); | ||
157 | if (!IS_ERR(new_dev->dev)) { | 162 | if (!IS_ERR(new_dev->dev)) { |
158 | dev_set_drvdata(new_dev->dev, new_dev); | ||
159 | new_dev->parent = parent; | 163 | new_dev->parent = parent; |
160 | new_dev->driver = driver; | 164 | new_dev->driver = driver; |
161 | mutex_init(&new_dev->lock); | 165 | mutex_init(&new_dev->lock); |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index b50bb03cb5ab..0a2785361ca3 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1320,7 +1320,7 @@ static void free_irq_local(int irq) | |||
1320 | * Power management hooks. Note that we won't be called from IRQ context, | 1320 | * Power management hooks. Note that we won't be called from IRQ context, |
1321 | * unlike the blank functions above, so we may sleep. | 1321 | * unlike the blank functions above, so we may sleep. |
1322 | */ | 1322 | */ |
1323 | static int fsl_diu_suspend(struct of_device *dev, pm_message_t state) | 1323 | static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state) |
1324 | { | 1324 | { |
1325 | struct fsl_diu_data *machine_data; | 1325 | struct fsl_diu_data *machine_data; |
1326 | 1326 | ||
@@ -1330,7 +1330,7 @@ static int fsl_diu_suspend(struct of_device *dev, pm_message_t state) | |||
1330 | return 0; | 1330 | return 0; |
1331 | } | 1331 | } |
1332 | 1332 | ||
1333 | static int fsl_diu_resume(struct of_device *dev) | 1333 | static int fsl_diu_resume(struct of_device *ofdev) |
1334 | { | 1334 | { |
1335 | struct fsl_diu_data *machine_data; | 1335 | struct fsl_diu_data *machine_data; |
1336 | 1336 | ||
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index fb9e67228543..c18880d9db1f 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c | |||
@@ -279,7 +279,7 @@ static void hga_blank(int blank_mode) | |||
279 | 279 | ||
280 | static int __init hga_card_detect(void) | 280 | static int __init hga_card_detect(void) |
281 | { | 281 | { |
282 | int count=0; | 282 | int count = 0; |
283 | void __iomem *p, *q; | 283 | void __iomem *p, *q; |
284 | unsigned short p_save, q_save; | 284 | unsigned short p_save, q_save; |
285 | 285 | ||
@@ -303,20 +303,18 @@ static int __init hga_card_detect(void) | |||
303 | writew(0x55aa, p); if (readw(p) == 0x55aa) count++; | 303 | writew(0x55aa, p); if (readw(p) == 0x55aa) count++; |
304 | writew(p_save, p); | 304 | writew(p_save, p); |
305 | 305 | ||
306 | if (count != 2) { | 306 | if (count != 2) |
307 | return 0; | 307 | goto error; |
308 | } | ||
309 | 308 | ||
310 | /* Ok, there is definitely a card registering at the correct | 309 | /* Ok, there is definitely a card registering at the correct |
311 | * memory location, so now we do an I/O port test. | 310 | * memory location, so now we do an I/O port test. |
312 | */ | 311 | */ |
313 | 312 | ||
314 | if (!test_hga_b(0x66, 0x0f)) { /* cursor low register */ | 313 | if (!test_hga_b(0x66, 0x0f)) /* cursor low register */ |
315 | return 0; | 314 | goto error; |
316 | } | 315 | |
317 | if (!test_hga_b(0x99, 0x0f)) { /* cursor low register */ | 316 | if (!test_hga_b(0x99, 0x0f)) /* cursor low register */ |
318 | return 0; | 317 | goto error; |
319 | } | ||
320 | 318 | ||
321 | /* See if the card is a Hercules, by checking whether the vsync | 319 | /* See if the card is a Hercules, by checking whether the vsync |
322 | * bit of the status register is changing. This test lasts for | 320 | * bit of the status register is changing. This test lasts for |
@@ -331,7 +329,7 @@ static int __init hga_card_detect(void) | |||
331 | } | 329 | } |
332 | 330 | ||
333 | if (p_save == q_save) | 331 | if (p_save == q_save) |
334 | return 0; | 332 | goto error; |
335 | 333 | ||
336 | switch (inb_p(HGA_STATUS_PORT) & 0x70) { | 334 | switch (inb_p(HGA_STATUS_PORT) & 0x70) { |
337 | case 0x10: | 335 | case 0x10: |
@@ -348,6 +346,12 @@ static int __init hga_card_detect(void) | |||
348 | break; | 346 | break; |
349 | } | 347 | } |
350 | return 1; | 348 | return 1; |
349 | error: | ||
350 | if (release_io_ports) | ||
351 | release_region(0x3b0, 12); | ||
352 | if (release_io_port) | ||
353 | release_region(0x3bf, 1); | ||
354 | return 0; | ||
351 | } | 355 | } |
352 | 356 | ||
353 | /** | 357 | /** |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 8bc46e930340..13fea61d6ae4 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
@@ -17,8 +17,8 @@ | |||
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/io.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | ||
22 | #include <asm/fbio.h> | 22 | #include <asm/fbio.h> |
23 | 23 | ||
24 | #include "sbuslib.h" | 24 | #include "sbuslib.h" |
@@ -33,7 +33,6 @@ static int leo_blank(int, struct fb_info *); | |||
33 | 33 | ||
34 | static int leo_mmap(struct fb_info *, struct vm_area_struct *); | 34 | static int leo_mmap(struct fb_info *, struct vm_area_struct *); |
35 | static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); | 35 | static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); |
36 | static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *); | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * Frame buffer operations | 38 | * Frame buffer operations |
@@ -43,7 +42,6 @@ static struct fb_ops leo_ops = { | |||
43 | .owner = THIS_MODULE, | 42 | .owner = THIS_MODULE, |
44 | .fb_setcolreg = leo_setcolreg, | 43 | .fb_setcolreg = leo_setcolreg, |
45 | .fb_blank = leo_blank, | 44 | .fb_blank = leo_blank, |
46 | .fb_pan_display = leo_pan_display, | ||
47 | .fb_fillrect = cfb_fillrect, | 45 | .fb_fillrect = cfb_fillrect, |
48 | .fb_copyarea = cfb_copyarea, | 46 | .fb_copyarea = cfb_copyarea, |
49 | .fb_imageblit = cfb_imageblit, | 47 | .fb_imageblit = cfb_imageblit, |
@@ -78,7 +76,7 @@ static struct fb_ops leo_ops = { | |||
78 | #define LEO_CUR_TYPE_CMAP 0x00000050 | 76 | #define LEO_CUR_TYPE_CMAP 0x00000050 |
79 | 77 | ||
80 | struct leo_cursor { | 78 | struct leo_cursor { |
81 | u8 xxx0[16]; | 79 | u8 xxx0[16]; |
82 | u32 cur_type; | 80 | u32 cur_type; |
83 | u32 cur_misc; | 81 | u32 cur_misc; |
84 | u32 cur_cursxy; | 82 | u32 cur_cursxy; |
@@ -105,7 +103,7 @@ struct leo_lx_krn { | |||
105 | 103 | ||
106 | struct leo_lc_ss0_krn { | 104 | struct leo_lc_ss0_krn { |
107 | u32 misc; | 105 | u32 misc; |
108 | u8 xxx0[0x800-4]; | 106 | u8 xxx0[0x800-4]; |
109 | u32 rev; | 107 | u32 rev; |
110 | }; | 108 | }; |
111 | 109 | ||
@@ -116,7 +114,7 @@ struct leo_lc_ss0_usr { | |||
116 | u32 fontt; | 114 | u32 fontt; |
117 | u32 extent; | 115 | u32 extent; |
118 | u32 src; | 116 | u32 src; |
119 | u32 dst; | 117 | u32 dst; |
120 | u32 copy; | 118 | u32 copy; |
121 | u32 fill; | 119 | u32 fill; |
122 | }; | 120 | }; |
@@ -129,8 +127,8 @@ struct leo_lc_ss1_usr { | |||
129 | u8 unknown; | 127 | u8 unknown; |
130 | }; | 128 | }; |
131 | 129 | ||
132 | struct leo_ld { | 130 | struct leo_ld_ss0 { |
133 | u8 xxx0[0xe00]; | 131 | u8 xxx0[0xe00]; |
134 | u32 csr; | 132 | u32 csr; |
135 | u32 wid; | 133 | u32 wid; |
136 | u32 wmask; | 134 | u32 wmask; |
@@ -144,13 +142,13 @@ struct leo_ld { | |||
144 | u32 src; /* Copy/Scroll (SS0 only) */ | 142 | u32 src; /* Copy/Scroll (SS0 only) */ |
145 | u32 dst; /* Copy/Scroll/Fill (SS0 only) */ | 143 | u32 dst; /* Copy/Scroll/Fill (SS0 only) */ |
146 | u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ | 144 | u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ |
147 | u32 xxx1[3]; | 145 | u32 xxx1[3]; |
148 | u32 setsem; /* SS1 only */ | 146 | u32 setsem; /* SS1 only */ |
149 | u32 clrsem; /* SS1 only */ | 147 | u32 clrsem; /* SS1 only */ |
150 | u32 clrpick; /* SS1 only */ | 148 | u32 clrpick; /* SS1 only */ |
151 | u32 clrdat; /* SS1 only */ | 149 | u32 clrdat; /* SS1 only */ |
152 | u32 alpha; /* SS1 only */ | 150 | u32 alpha; /* SS1 only */ |
153 | u8 xxx2[0x2c]; | 151 | u8 xxx2[0x2c]; |
154 | u32 winbg; | 152 | u32 winbg; |
155 | u32 planemask; | 153 | u32 planemask; |
156 | u32 rop; | 154 | u32 rop; |
@@ -199,11 +197,12 @@ struct leo_par { | |||
199 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) | 197 | static void leo_wait(struct leo_lx_krn __iomem *lx_krn) |
200 | { | 198 | { |
201 | int i; | 199 | int i; |
202 | 200 | ||
203 | for (i = 0; | 201 | for (i = 0; |
204 | (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) && i < 300000; | 202 | (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) && |
203 | i < 300000; | ||
205 | i++) | 204 | i++) |
206 | udelay (1); /* Busy wait at most 0.3 sec */ | 205 | udelay(1); /* Busy wait at most 0.3 sec */ |
207 | return; | 206 | return; |
208 | } | 207 | } |
209 | 208 | ||
@@ -221,7 +220,7 @@ static int leo_setcolreg(unsigned regno, | |||
221 | unsigned transp, struct fb_info *info) | 220 | unsigned transp, struct fb_info *info) |
222 | { | 221 | { |
223 | struct leo_par *par = (struct leo_par *) info->par; | 222 | struct leo_par *par = (struct leo_par *) info->par; |
224 | struct leo_lx_krn __iomem *lx_krn = par->lx_krn; | 223 | struct leo_lx_krn __iomem *lx_krn = par->lx_krn; |
225 | unsigned long flags; | 224 | unsigned long flags; |
226 | u32 val; | 225 | u32 val; |
227 | int i; | 226 | int i; |
@@ -408,7 +407,7 @@ static void leo_wid_put(struct fb_info *info, struct fb_wid_list *wl) | |||
408 | leo_wait(lx_krn); | 407 | leo_wait(lx_krn); |
409 | 408 | ||
410 | for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) { | 409 | for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) { |
411 | switch(wi->wi_type) { | 410 | switch (wi->wi_type) { |
412 | case FB_WID_DBL_8: | 411 | case FB_WID_DBL_8: |
413 | j = (wi->wi_index & 0xf) + 0x40; | 412 | j = (wi->wi_index & 0xf) + 0x40; |
414 | break; | 413 | break; |
@@ -453,13 +452,12 @@ static void leo_init_wids(struct fb_info *info) | |||
453 | wi.wi_index = 1; | 452 | wi.wi_index = 1; |
454 | wi.wi_values [0] = 0x30; | 453 | wi.wi_values [0] = 0x30; |
455 | leo_wid_put(info, &wl); | 454 | leo_wid_put(info, &wl); |
456 | |||
457 | } | 455 | } |
458 | 456 | ||
459 | static void leo_switch_from_graph(struct fb_info *info) | 457 | static void leo_switch_from_graph(struct fb_info *info) |
460 | { | 458 | { |
461 | struct leo_par *par = (struct leo_par *) info->par; | 459 | struct leo_par *par = (struct leo_par *) info->par; |
462 | struct leo_ld __iomem *ss = (struct leo_ld __iomem *) par->ld_ss0; | 460 | struct leo_ld_ss0 __iomem *ss = par->ld_ss0; |
463 | unsigned long flags; | 461 | unsigned long flags; |
464 | u32 val; | 462 | u32 val; |
465 | 463 | ||
@@ -485,19 +483,13 @@ static void leo_switch_from_graph(struct fb_info *info) | |||
485 | val = sbus_readl(&par->lc_ss0_usr->csr); | 483 | val = sbus_readl(&par->lc_ss0_usr->csr); |
486 | } while (val & 0x20000000); | 484 | } while (val & 0x20000000); |
487 | 485 | ||
488 | spin_unlock_irqrestore(&par->lock, flags); | 486 | /* setup screen buffer for cfb_* functions */ |
489 | } | 487 | sbus_writel(1, &ss->wid); |
490 | 488 | sbus_writel(0x00ffffff, &ss->planemask); | |
491 | static int leo_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | 489 | sbus_writel(0x310b90, &ss->rop); |
492 | { | 490 | sbus_writel(0, &par->lc_ss0_usr->addrspace); |
493 | /* We just use this to catch switches out of | ||
494 | * graphics mode. | ||
495 | */ | ||
496 | leo_switch_from_graph(info); | ||
497 | 491 | ||
498 | if (var->xoffset || var->yoffset || var->vmode) | 492 | spin_unlock_irqrestore(&par->lock, flags); |
499 | return -EINVAL; | ||
500 | return 0; | ||
501 | } | 493 | } |
502 | 494 | ||
503 | static void leo_init_hw(struct fb_info *info) | 495 | static void leo_init_hw(struct fb_info *info) |
@@ -542,7 +534,8 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info, | |||
542 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); | 534 | of_iounmap(&op->resource[0], info->screen_base, 0x800000); |
543 | } | 535 | } |
544 | 536 | ||
545 | static int __devinit leo_probe(struct of_device *op, const struct of_device_id *match) | 537 | static int __devinit leo_probe(struct of_device *op, |
538 | const struct of_device_id *match) | ||
546 | { | 539 | { |
547 | struct device_node *dp = op->node; | 540 | struct device_node *dp = op->node; |
548 | struct fb_info *info; | 541 | struct fb_info *info; |
@@ -594,8 +587,9 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id * | |||
594 | !info->screen_base) | 587 | !info->screen_base) |
595 | goto out_unmap_regs; | 588 | goto out_unmap_regs; |
596 | 589 | ||
597 | info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; | 590 | info->flags = FBINFO_DEFAULT; |
598 | info->fbops = &leo_ops; | 591 | info->fbops = &leo_ops; |
592 | info->pseudo_palette = par->clut_data; | ||
599 | 593 | ||
600 | leo_init_wids(info); | 594 | leo_init_wids(info); |
601 | leo_init_hw(info); | 595 | leo_init_hw(info); |
@@ -649,7 +643,7 @@ static int __devexit leo_remove(struct of_device *op) | |||
649 | 643 | ||
650 | static struct of_device_id leo_match[] = { | 644 | static struct of_device_id leo_match[] = { |
651 | { | 645 | { |
652 | .name = "leo", | 646 | .name = "SUNW,leo", |
653 | }, | 647 | }, |
654 | {}, | 648 | {}, |
655 | }; | 649 | }; |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index f3107ad7e545..95883236c0cd 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags, | |||
200 | virt->vaddr = ioremap_nocache(phys, size); | 200 | virt->vaddr = ioremap_nocache(phys, size); |
201 | else | 201 | else |
202 | virt->vaddr = ioremap(phys, size); | 202 | virt->vaddr = ioremap(phys, size); |
203 | return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */ | 203 | return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */ |
204 | } | 204 | } |
205 | 205 | ||
206 | static inline void mga_iounmap(vaddr_t va) { | 206 | static inline void mga_iounmap(vaddr_t va) { |
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 473562191586..d3c3af53a290 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | const char *fb_mode_option; | 30 | const char *fb_mode_option; |
31 | EXPORT_SYMBOL_GPL(fb_mode_option); | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * Standard video mode definitions (taken from XFree86) | 34 | * Standard video mode definitions (taken from XFree86) |
@@ -590,6 +591,7 @@ done: | |||
590 | "", (margins) ? " with margins" : "", (interlace) ? | 591 | "", (margins) ? " with margins" : "", (interlace) ? |
591 | " interlaced" : ""); | 592 | " interlaced" : ""); |
592 | 593 | ||
594 | memset(&cvt_mode, 0, sizeof(cvt_mode)); | ||
593 | cvt_mode.xres = xres; | 595 | cvt_mode.xres = xres; |
594 | cvt_mode.yres = yres; | 596 | cvt_mode.yres = yres; |
595 | cvt_mode.refresh = (refresh) ? refresh : 60; | 597 | cvt_mode.refresh = (refresh) ? refresh : 60; |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 3ee314beacc1..7dcda187d9ba 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -573,8 +573,8 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | |||
573 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; | 573 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; |
574 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; | 574 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; |
575 | } else { | 575 | } else { |
576 | pal_desc = &fbi->dma_buff->pal_desc[dma]; | 576 | pal_desc = &fbi->dma_buff->pal_desc[pal]; |
577 | pal_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[pal]); | 577 | pal_desc_off = offsetof(struct pxafb_dma_buff, pal_desc[pal]); |
578 | 578 | ||
579 | pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE; | 579 | pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE; |
580 | pal_desc->fidr = 0; | 580 | pal_desc->fidr = 0; |
@@ -1276,6 +1276,8 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi) | |||
1276 | fbi->dma_buff_phys = fbi->map_dma; | 1276 | fbi->dma_buff_phys = fbi->map_dma; |
1277 | fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; | 1277 | fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; |
1278 | 1278 | ||
1279 | pr_debug("pxafb: palette_mem_size = 0x%08lx\n", fbi->palette_size*sizeof(u16)); | ||
1280 | |||
1279 | #ifdef CONFIG_FB_PXA_SMARTPANEL | 1281 | #ifdef CONFIG_FB_PXA_SMARTPANEL |
1280 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; | 1282 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; |
1281 | fbi->n_smart_cmds = 0; | 1283 | fbi->n_smart_cmds = 0; |
@@ -1351,7 +1353,6 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) | |||
1351 | struct pxafb_info *fbi; | 1353 | struct pxafb_info *fbi; |
1352 | void *addr; | 1354 | void *addr; |
1353 | struct pxafb_mach_info *inf = dev->platform_data; | 1355 | struct pxafb_mach_info *inf = dev->platform_data; |
1354 | struct pxafb_mode_info *mode = inf->modes; | ||
1355 | 1356 | ||
1356 | /* Alloc the pxafb_info and pseudo_palette in one step */ | 1357 | /* Alloc the pxafb_info and pseudo_palette in one step */ |
1357 | fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); | 1358 | fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 13b38cbbe4cf..f0598961c6b0 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -1,75 +1,15 @@ | |||
1 | /* | 1 | /* linux/drivers/video/s3c2410fb.c |
2 | * linux/drivers/video/s3c2410fb.c | 2 | * Copyright (c) 2004,2005 Arnaud Patard |
3 | * Copyright (c) Arnaud Patard, Ben Dooks | 3 | * Copyright (c) 2004-2008 Ben Dooks |
4 | * | ||
5 | * S3C2410 LCD Framebuffer Driver | ||
4 | * | 6 | * |
5 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
6 | * License. See the file COPYING in the main directory of this archive for | 8 | * License. See the file COPYING in the main directory of this archive for |
7 | * more details. | 9 | * more details. |
8 | * | 10 | * |
9 | * S3C2410 LCD Controller Frame Buffer Driver | 11 | * Driver based on skeletonfb.c, sa1100fb.c and others. |
10 | * based on skeletonfb.c, sa1100fb.c and others | 12 | */ |
11 | * | ||
12 | * ChangeLog | ||
13 | * 2005-04-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
14 | * - u32 state -> pm_message_t state | ||
15 | * - S3C2410_{VA,SZ}_LCD -> S3C24XX | ||
16 | * | ||
17 | * 2005-03-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
18 | * - Removed the ioctl | ||
19 | * - use readl/writel instead of __raw_writel/__raw_readl | ||
20 | * | ||
21 | * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
22 | * - Added the possibility to set on or off the | ||
23 | * debugging messages | ||
24 | * - Replaced 0 and 1 by on or off when reading the | ||
25 | * /sys files | ||
26 | * | ||
27 | * 2005-03-23: Ben Dooks <ben-linux@fluff.org> | ||
28 | * - added non 16bpp modes | ||
29 | * - updated platform information for range of x/y/bpp | ||
30 | * - add code to ensure palette is written correctly | ||
31 | * - add pixel clock divisor control | ||
32 | * | ||
33 | * 2004-11-11: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
34 | * - Removed the use of currcon as it no more exists | ||
35 | * - Added LCD power sysfs interface | ||
36 | * | ||
37 | * 2004-11-03: Ben Dooks <ben-linux@fluff.org> | ||
38 | * - minor cleanups | ||
39 | * - add suspend/resume support | ||
40 | * - s3c2410fb_setcolreg() not valid in >8bpp modes | ||
41 | * - removed last CONFIG_FB_S3C2410_FIXED | ||
42 | * - ensure lcd controller stopped before cleanup | ||
43 | * - added sysfs interface for backlight power | ||
44 | * - added mask for gpio configuration | ||
45 | * - ensured IRQs disabled during GPIO configuration | ||
46 | * - disable TPAL before enabling video | ||
47 | * | ||
48 | * 2004-09-20: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
49 | * - Suppress command line options | ||
50 | * | ||
51 | * 2004-09-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
52 | * - code cleanup | ||
53 | * | ||
54 | * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
55 | * - Renamed from h1940fb.c to s3c2410fb.c | ||
56 | * - Add support for different devices | ||
57 | * - Backlight support | ||
58 | * | ||
59 | * 2004-09-05: Herbert Pötzl <herbert@13thfloor.at> | ||
60 | * - added clock (de-)allocation code | ||
61 | * - added fixem fbmem option | ||
62 | * | ||
63 | * 2004-07-27: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
64 | * - code cleanup | ||
65 | * - added a forgotten return in h1940fb_init | ||
66 | * | ||
67 | * 2004-07-19: Herbert Pötzl <herbert@13thfloor.at> | ||
68 | * - code cleanup and extended debugging | ||
69 | * | ||
70 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
71 | * - First version | ||
72 | */ | ||
73 | 13 | ||
74 | #include <linux/module.h> | 14 | #include <linux/module.h> |
75 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
@@ -580,6 +520,27 @@ static int s3c2410fb_setcolreg(unsigned regno, | |||
580 | return 0; | 520 | return 0; |
581 | } | 521 | } |
582 | 522 | ||
523 | /* s3c2410fb_lcd_enable | ||
524 | * | ||
525 | * shutdown the lcd controller | ||
526 | */ | ||
527 | static void s3c2410fb_lcd_enable(struct s3c2410fb_info *fbi, int enable) | ||
528 | { | ||
529 | unsigned long flags; | ||
530 | |||
531 | local_irq_save(flags); | ||
532 | |||
533 | if (enable) | ||
534 | fbi->regs.lcdcon1 |= S3C2410_LCDCON1_ENVID; | ||
535 | else | ||
536 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID; | ||
537 | |||
538 | writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1); | ||
539 | |||
540 | local_irq_restore(flags); | ||
541 | } | ||
542 | |||
543 | |||
583 | /* | 544 | /* |
584 | * s3c2410fb_blank | 545 | * s3c2410fb_blank |
585 | * @blank_mode: the blank mode we want. | 546 | * @blank_mode: the blank mode we want. |
@@ -589,9 +550,6 @@ static int s3c2410fb_setcolreg(unsigned regno, | |||
589 | * blanking succeeded, != 0 if un-/blanking failed due to e.g. a | 550 | * blanking succeeded, != 0 if un-/blanking failed due to e.g. a |
590 | * video mode which doesn't support it. Implements VESA suspend | 551 | * video mode which doesn't support it. Implements VESA suspend |
591 | * and powerdown modes on hardware that supports disabling hsync/vsync: | 552 | * and powerdown modes on hardware that supports disabling hsync/vsync: |
592 | * blank_mode == 2: suspend vsync | ||
593 | * blank_mode == 3: suspend hsync | ||
594 | * blank_mode == 4: powerdown | ||
595 | * | 553 | * |
596 | * Returns negative errno on error, or zero on success. | 554 | * Returns negative errno on error, or zero on success. |
597 | * | 555 | * |
@@ -605,6 +563,12 @@ static int s3c2410fb_blank(int blank_mode, struct fb_info *info) | |||
605 | 563 | ||
606 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; | 564 | tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; |
607 | 565 | ||
566 | if (blank_mode == FB_BLANK_POWERDOWN) { | ||
567 | s3c2410fb_lcd_enable(fbi, 0); | ||
568 | } else { | ||
569 | s3c2410fb_lcd_enable(fbi, 1); | ||
570 | } | ||
571 | |||
608 | if (blank_mode == FB_BLANK_UNBLANK) | 572 | if (blank_mode == FB_BLANK_UNBLANK) |
609 | writel(0x0, tpal_reg); | 573 | writel(0x0, tpal_reg); |
610 | else { | 574 | else { |
@@ -948,7 +912,10 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev, | |||
948 | } | 912 | } |
949 | 913 | ||
950 | /* create device files */ | 914 | /* create device files */ |
951 | device_create_file(&pdev->dev, &dev_attr_debug); | 915 | ret = device_create_file(&pdev->dev, &dev_attr_debug); |
916 | if (ret) { | ||
917 | printk(KERN_ERR "failed to add debug attribute\n"); | ||
918 | } | ||
952 | 919 | ||
953 | printk(KERN_INFO "fb%d: %s frame buffer device\n", | 920 | printk(KERN_INFO "fb%d: %s frame buffer device\n", |
954 | fbinfo->node, fbinfo->fix.id); | 921 | fbinfo->node, fbinfo->fix.id); |
@@ -983,21 +950,6 @@ static int __init s3c2412fb_probe(struct platform_device *pdev) | |||
983 | return s3c24xxfb_probe(pdev, DRV_S3C2412); | 950 | return s3c24xxfb_probe(pdev, DRV_S3C2412); |
984 | } | 951 | } |
985 | 952 | ||
986 | /* s3c2410fb_stop_lcd | ||
987 | * | ||
988 | * shutdown the lcd controller | ||
989 | */ | ||
990 | static void s3c2410fb_stop_lcd(struct s3c2410fb_info *fbi) | ||
991 | { | ||
992 | unsigned long flags; | ||
993 | |||
994 | local_irq_save(flags); | ||
995 | |||
996 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID; | ||
997 | writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1); | ||
998 | |||
999 | local_irq_restore(flags); | ||
1000 | } | ||
1001 | 953 | ||
1002 | /* | 954 | /* |
1003 | * Cleanup | 955 | * Cleanup |
@@ -1010,7 +962,7 @@ static int s3c2410fb_remove(struct platform_device *pdev) | |||
1010 | 962 | ||
1011 | unregister_framebuffer(fbinfo); | 963 | unregister_framebuffer(fbinfo); |
1012 | 964 | ||
1013 | s3c2410fb_stop_lcd(info); | 965 | s3c2410fb_lcd_enable(info, 0); |
1014 | msleep(1); | 966 | msleep(1); |
1015 | 967 | ||
1016 | s3c2410fb_unmap_video_memory(fbinfo); | 968 | s3c2410fb_unmap_video_memory(fbinfo); |
@@ -1043,7 +995,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state) | |||
1043 | struct fb_info *fbinfo = platform_get_drvdata(dev); | 995 | struct fb_info *fbinfo = platform_get_drvdata(dev); |
1044 | struct s3c2410fb_info *info = fbinfo->par; | 996 | struct s3c2410fb_info *info = fbinfo->par; |
1045 | 997 | ||
1046 | s3c2410fb_stop_lcd(info); | 998 | s3c2410fb_lcd_enable(info, 0); |
1047 | 999 | ||
1048 | /* sleep before disabling the clock, we need to ensure | 1000 | /* sleep before disabling the clock, we need to ensure |
1049 | * the LCD DMA engine is not going to get back on the bus | 1001 | * the LCD DMA engine is not going to get back on the bus |
@@ -1118,3 +1070,5 @@ MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, " | |||
1118 | "Ben Dooks <ben-linux@fluff.org>"); | 1070 | "Ben Dooks <ben-linux@fluff.org>"); |
1119 | MODULE_DESCRIPTION("Framebuffer driver for the s3c2410"); | 1071 | MODULE_DESCRIPTION("Framebuffer driver for the s3c2410"); |
1120 | MODULE_LICENSE("GPL"); | 1072 | MODULE_LICENSE("GPL"); |
1073 | MODULE_ALIAS("platform:s3c2410-lcd"); | ||
1074 | MODULE_ALIAS("platform:s3c2412-lcd"); | ||
diff --git a/drivers/video/s3c2410fb.h b/drivers/video/s3c2410fb.h index dbb73b95e2ef..9a6ba3e9d1b8 100644 --- a/drivers/video/s3c2410fb.h +++ b/drivers/video/s3c2410fb.h | |||
@@ -1,26 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/s3c2410fb.h | 2 | * linux/drivers/video/s3c2410fb.h |
3 | * Copyright (c) Arnaud Patard | 3 | * Copyright (c) 2004 Arnaud Patard |
4 | * | ||
5 | * S3C2410 LCD Framebuffer Driver | ||
4 | * | 6 | * |
5 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
6 | * License. See the file COPYING in the main directory of this archive for | 8 | * License. See the file COPYING in the main directory of this archive for |
7 | * more details. | 9 | * more details. |
8 | * | 10 | * |
9 | * S3C2410 LCD Controller Frame Buffer Driver | 11 | */ |
10 | * based on skeletonfb.c, sa1100fb.h | ||
11 | * | ||
12 | * ChangeLog | ||
13 | * | ||
14 | * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
15 | * - Moved dprintk to s3c2410fb.c | ||
16 | * | ||
17 | * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
18 | * - Renamed from h1940fb.h to s3c2410fb.h | ||
19 | * - Changed h1940 to s3c2410 | ||
20 | * | ||
21 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> | ||
22 | * - First version | ||
23 | */ | ||
24 | 12 | ||
25 | #ifndef __S3C2410FB_H | 13 | #ifndef __S3C2410FB_H |
26 | #define __S3C2410FB_H | 14 | #define __S3C2410FB_H |
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 73803624c131..b9343844cd1f 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5787 | } else { | 5787 | } else { |
5788 | struct sis_video_info *countvideo = card_list; | 5788 | struct sis_video_info *countvideo = card_list; |
5789 | ivideo->cardnumber = 1; | 5789 | ivideo->cardnumber = 1; |
5790 | while((countvideo = countvideo->next) != 0) | 5790 | while((countvideo = countvideo->next) != NULL) |
5791 | ivideo->cardnumber++; | 5791 | ivideo->cardnumber++; |
5792 | } | 5792 | } |
5793 | 5793 | ||
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 742b5c656d66..15d4a768b1f6 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
663 | sm501fb_sync_regs(fbi); | 663 | sm501fb_sync_regs(fbi); |
664 | mdelay(10); | 664 | mdelay(10); |
665 | 665 | ||
666 | if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { | 666 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
667 | control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ | 667 | control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ |
668 | writel(control, ctrl_reg); | 668 | writel(control, ctrl_reg); |
669 | sm501fb_sync_regs(fbi); | 669 | sm501fb_sync_regs(fbi); |
670 | mdelay(10); | 670 | mdelay(10); |
671 | } | 671 | } |
672 | 672 | ||
673 | if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { | 673 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
674 | control |= SM501_DC_PANEL_CONTROL_FPEN; | 674 | control |= SM501_DC_PANEL_CONTROL_FPEN; |
675 | writel(control, ctrl_reg); | 675 | writel(control, ctrl_reg); |
676 | sm501fb_sync_regs(fbi); | 676 | sm501fb_sync_regs(fbi); |
@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to) | |||
678 | } | 678 | } |
679 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { | 679 | } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { |
680 | /* disable panel power */ | 680 | /* disable panel power */ |
681 | if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { | 681 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { |
682 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; | 682 | control &= ~SM501_DC_PANEL_CONTROL_FPEN; |
683 | writel(control, ctrl_reg); | 683 | writel(control, ctrl_reg); |
684 | sm501fb_sync_regs(fbi); | 684 | sm501fb_sync_regs(fbi); |
685 | mdelay(10); | 685 | mdelay(10); |
686 | } | 686 | } |
687 | 687 | ||
688 | if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { | 688 | if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { |
689 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; | 689 | control &= ~SM501_DC_PANEL_CONTROL_BIAS; |
690 | writel(control, ctrl_reg); | 690 | writel(control, ctrl_reg); |
691 | sm501fb_sync_regs(fbi); | 691 | sm501fb_sync_regs(fbi); |
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 13866789b356..7084e7e146c0 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -2,6 +2,9 @@ | |||
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/virtio_config.h> | 3 | #include <linux/virtio_config.h> |
4 | 4 | ||
5 | /* Unique numbering for virtio devices. */ | ||
6 | static unsigned int dev_index; | ||
7 | |||
5 | static ssize_t device_show(struct device *_d, | 8 | static ssize_t device_show(struct device *_d, |
6 | struct device_attribute *attr, char *buf) | 9 | struct device_attribute *attr, char *buf) |
7 | { | 10 | { |
@@ -121,9 +124,9 @@ static int virtio_dev_probe(struct device *_d) | |||
121 | if (err) | 124 | if (err) |
122 | add_status(dev, VIRTIO_CONFIG_S_FAILED); | 125 | add_status(dev, VIRTIO_CONFIG_S_FAILED); |
123 | else { | 126 | else { |
124 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | ||
125 | /* They should never have set feature bits beyond 32 */ | 127 | /* They should never have set feature bits beyond 32 */ |
126 | dev->config->set_features(dev, dev->features[0]); | 128 | dev->config->set_features(dev, dev->features[0]); |
129 | add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK); | ||
127 | } | 130 | } |
128 | return err; | 131 | return err; |
129 | } | 132 | } |
@@ -166,7 +169,10 @@ int register_virtio_device(struct virtio_device *dev) | |||
166 | int err; | 169 | int err; |
167 | 170 | ||
168 | dev->dev.bus = &virtio_bus; | 171 | dev->dev.bus = &virtio_bus; |
169 | sprintf(dev->dev.bus_id, "%u", dev->index); | 172 | |
173 | /* Assign a unique device index and hence name. */ | ||
174 | dev->index = dev_index++; | ||
175 | sprintf(dev->dev.bus_id, "virtio%u", dev->index); | ||
170 | 176 | ||
171 | /* We always start by resetting the device, in case a previous | 177 | /* We always start by resetting the device, in case a previous |
172 | * driver messed it up. This also tests that code path a little. */ | 178 | * driver messed it up. This also tests that code path a little. */ |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 27e9fc9117cd..eae7236310e4 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -78,9 +78,6 @@ static struct device virtio_pci_root = { | |||
78 | .bus_id = "virtio-pci", | 78 | .bus_id = "virtio-pci", |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* Unique numbering for devices under the kvm root */ | ||
82 | static unsigned int dev_index; | ||
83 | |||
84 | /* Convert a generic virtio device to our structure */ | 81 | /* Convert a generic virtio device to our structure */ |
85 | static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) | 82 | static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) |
86 | { | 83 | { |
@@ -325,10 +322,6 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, | |||
325 | if (vp_dev == NULL) | 322 | if (vp_dev == NULL) |
326 | return -ENOMEM; | 323 | return -ENOMEM; |
327 | 324 | ||
328 | snprintf(vp_dev->vdev.dev.bus_id, BUS_ID_SIZE, "virtio%d", dev_index); | ||
329 | vp_dev->vdev.index = dev_index; | ||
330 | dev_index++; | ||
331 | |||
332 | vp_dev->vdev.dev.parent = &virtio_pci_root; | 325 | vp_dev->vdev.dev.parent = &virtio_pci_root; |
333 | vp_dev->vdev.config = &virtio_pci_config_ops; | 326 | vp_dev->vdev.config = &virtio_pci_config_ops; |
334 | vp_dev->pci_dev = pci_dev; | 327 | vp_dev->pci_dev = pci_dev; |
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 937a49d6772c..72bf8bc09014 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -227,7 +227,6 @@ static bool vring_enable_cb(struct virtqueue *_vq) | |||
227 | struct vring_virtqueue *vq = to_vvq(_vq); | 227 | struct vring_virtqueue *vq = to_vvq(_vq); |
228 | 228 | ||
229 | START_USE(vq); | 229 | START_USE(vq); |
230 | BUG_ON(!(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)); | ||
231 | 230 | ||
232 | /* We optimistically turn back on interrupts, then check if there was | 231 | /* We optimistically turn back on interrupts, then check if there was |
233 | * more to do. */ | 232 | * more to do. */ |
@@ -254,13 +253,6 @@ irqreturn_t vring_interrupt(int irq, void *_vq) | |||
254 | if (unlikely(vq->broken)) | 253 | if (unlikely(vq->broken)) |
255 | return IRQ_HANDLED; | 254 | return IRQ_HANDLED; |
256 | 255 | ||
257 | /* Other side may have missed us turning off the interrupt, | ||
258 | * but we should preserve disable semantic for virtio users. */ | ||
259 | if (unlikely(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { | ||
260 | pr_debug("virtqueue interrupt after disable for %p\n", vq); | ||
261 | return IRQ_HANDLED; | ||
262 | } | ||
263 | |||
264 | pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); | 256 | pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); |
265 | if (vq->vq.callback) | 257 | if (vq->vq.callback) |
266 | vq->vq.callback(&vq->vq); | 258 | vq->vq.callback(&vq->vq); |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 254d115cafab..ccb78f66c2b6 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -295,6 +295,19 @@ config ALIM7101_WDT | |||
295 | 295 | ||
296 | Most people will say N. | 296 | Most people will say N. |
297 | 297 | ||
298 | config GEODE_WDT | ||
299 | tristate "AMD Geode CS5535/CS5536 Watchdog" | ||
300 | depends on MGEODE_LX | ||
301 | help | ||
302 | This driver enables a watchdog capability built into the | ||
303 | CS5535/CS5536 companion chips for the AMD Geode GX and LX | ||
304 | processors. This watchdog watches your kernel to make sure | ||
305 | it doesn't freeze, and if it does, it reboots your computer after | ||
306 | a certain amount of time. | ||
307 | |||
308 | You can compile this driver directly into the kernel, or use | ||
309 | it as a module. The module will be called geodewdt. | ||
310 | |||
298 | config SC520_WDT | 311 | config SC520_WDT |
299 | tristate "AMD Elan SC520 processor Watchdog" | 312 | tristate "AMD Elan SC520 processor Watchdog" |
300 | depends on X86 | 313 | depends on X86 |
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index f3fb170fe5c6..25b352b664d9 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
@@ -59,6 +59,7 @@ obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o | |||
59 | obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o | 59 | obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o |
60 | obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o | 60 | obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o |
61 | obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o | 61 | obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o |
62 | obj-$(CONFIG_GEODE_WDT) += geodewdt.o | ||
62 | obj-$(CONFIG_SC520_WDT) += sc520_wdt.o | 63 | obj-$(CONFIG_SC520_WDT) += sc520_wdt.o |
63 | obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o | 64 | obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o |
64 | obj-$(CONFIG_IB700_WDT) += ib700wdt.o | 65 | obj-$(CONFIG_IB700_WDT) += ib700wdt.o |
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index 1237113dc14a..03b3e3d91e7c 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c | |||
@@ -29,7 +29,8 @@ | |||
29 | 29 | ||
30 | #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) | 30 | #define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) |
31 | #define stampit() stamp("here i am") | 31 | #define stampit() stamp("here i am") |
32 | #define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); }) | 32 | #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) |
33 | #define pr_init(fmt, args...) ({ static const __initconst char __fmt[] = fmt; printk(__fmt, ## args); }) | ||
33 | 34 | ||
34 | #define WATCHDOG_NAME "bfin-wdt" | 35 | #define WATCHDOG_NAME "bfin-wdt" |
35 | #define PFX WATCHDOG_NAME ": " | 36 | #define PFX WATCHDOG_NAME ": " |
@@ -377,20 +378,6 @@ static int bfin_wdt_resume(struct platform_device *pdev) | |||
377 | # define bfin_wdt_resume NULL | 378 | # define bfin_wdt_resume NULL |
378 | #endif | 379 | #endif |
379 | 380 | ||
380 | static struct platform_device bfin_wdt_device = { | ||
381 | .name = WATCHDOG_NAME, | ||
382 | .id = -1, | ||
383 | }; | ||
384 | |||
385 | static struct platform_driver bfin_wdt_driver = { | ||
386 | .driver = { | ||
387 | .name = WATCHDOG_NAME, | ||
388 | .owner = THIS_MODULE, | ||
389 | }, | ||
390 | .suspend = bfin_wdt_suspend, | ||
391 | .resume = bfin_wdt_resume, | ||
392 | }; | ||
393 | |||
394 | static const struct file_operations bfin_wdt_fops = { | 381 | static const struct file_operations bfin_wdt_fops = { |
395 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
396 | .llseek = no_llseek, | 383 | .llseek = no_llseek, |
@@ -418,11 +405,67 @@ static struct notifier_block bfin_wdt_notifier = { | |||
418 | }; | 405 | }; |
419 | 406 | ||
420 | /** | 407 | /** |
421 | * bfin_wdt_init - Initialize module | 408 | * bfin_wdt_probe - Initialize module |
422 | * | 409 | * |
423 | * Registers the device and notifier handler. Actual device | 410 | * Registers the misc device and notifier handler. Actual device |
424 | * initialization is handled by bfin_wdt_open(). | 411 | * initialization is handled by bfin_wdt_open(). |
425 | */ | 412 | */ |
413 | static int __devinit bfin_wdt_probe(struct platform_device *pdev) | ||
414 | { | ||
415 | int ret; | ||
416 | |||
417 | ret = register_reboot_notifier(&bfin_wdt_notifier); | ||
418 | if (ret) { | ||
419 | pr_devinit(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); | ||
420 | return ret; | ||
421 | } | ||
422 | |||
423 | ret = misc_register(&bfin_wdt_miscdev); | ||
424 | if (ret) { | ||
425 | pr_devinit(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | ||
426 | WATCHDOG_MINOR, ret); | ||
427 | unregister_reboot_notifier(&bfin_wdt_notifier); | ||
428 | return ret; | ||
429 | } | ||
430 | |||
431 | pr_devinit(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", | ||
432 | timeout, nowayout); | ||
433 | |||
434 | return 0; | ||
435 | } | ||
436 | |||
437 | /** | ||
438 | * bfin_wdt_remove - Initialize module | ||
439 | * | ||
440 | * Unregisters the misc device and notifier handler. Actual device | ||
441 | * deinitialization is handled by bfin_wdt_close(). | ||
442 | */ | ||
443 | static int __devexit bfin_wdt_remove(struct platform_device *pdev) | ||
444 | { | ||
445 | misc_deregister(&bfin_wdt_miscdev); | ||
446 | unregister_reboot_notifier(&bfin_wdt_notifier); | ||
447 | return 0; | ||
448 | } | ||
449 | |||
450 | static struct platform_device *bfin_wdt_device; | ||
451 | |||
452 | static struct platform_driver bfin_wdt_driver = { | ||
453 | .probe = bfin_wdt_probe, | ||
454 | .remove = __devexit_p(bfin_wdt_remove), | ||
455 | .suspend = bfin_wdt_suspend, | ||
456 | .resume = bfin_wdt_resume, | ||
457 | .driver = { | ||
458 | .name = WATCHDOG_NAME, | ||
459 | .owner = THIS_MODULE, | ||
460 | }, | ||
461 | }; | ||
462 | |||
463 | /** | ||
464 | * bfin_wdt_init - Initialize module | ||
465 | * | ||
466 | * Checks the module params and registers the platform device & driver. | ||
467 | * Real work is in the platform probe function. | ||
468 | */ | ||
426 | static int __init bfin_wdt_init(void) | 469 | static int __init bfin_wdt_init(void) |
427 | { | 470 | { |
428 | int ret; | 471 | int ret; |
@@ -436,44 +479,32 @@ static int __init bfin_wdt_init(void) | |||
436 | /* Since this is an on-chip device and needs no board-specific | 479 | /* Since this is an on-chip device and needs no board-specific |
437 | * resources, we'll handle all the platform device stuff here. | 480 | * resources, we'll handle all the platform device stuff here. |
438 | */ | 481 | */ |
439 | ret = platform_device_register(&bfin_wdt_device); | 482 | ret = platform_driver_register(&bfin_wdt_driver); |
440 | if (ret) | ||
441 | return ret; | ||
442 | |||
443 | ret = platform_driver_probe(&bfin_wdt_driver, NULL); | ||
444 | if (ret) | ||
445 | return ret; | ||
446 | |||
447 | ret = register_reboot_notifier(&bfin_wdt_notifier); | ||
448 | if (ret) { | 483 | if (ret) { |
449 | pr_init(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); | 484 | pr_init(KERN_ERR PFX "unable to register driver\n"); |
450 | return ret; | 485 | return ret; |
451 | } | 486 | } |
452 | 487 | ||
453 | ret = misc_register(&bfin_wdt_miscdev); | 488 | bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME, -1, NULL, 0); |
454 | if (ret) { | 489 | if (IS_ERR(bfin_wdt_device)) { |
455 | pr_init(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 490 | pr_init(KERN_ERR PFX "unable to register device\n"); |
456 | WATCHDOG_MINOR, ret); | 491 | platform_driver_unregister(&bfin_wdt_driver); |
457 | unregister_reboot_notifier(&bfin_wdt_notifier); | 492 | return PTR_ERR(bfin_wdt_device); |
458 | return ret; | ||
459 | } | 493 | } |
460 | 494 | ||
461 | pr_init(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n", | ||
462 | timeout, nowayout); | ||
463 | |||
464 | return 0; | 495 | return 0; |
465 | } | 496 | } |
466 | 497 | ||
467 | /** | 498 | /** |
468 | * bfin_wdt_exit - Deinitialize module | 499 | * bfin_wdt_exit - Deinitialize module |
469 | * | 500 | * |
470 | * Unregisters the device and notifier handler. Actual device | 501 | * Back out the platform device & driver steps. Real work is in the |
471 | * deinitialization is handled by bfin_wdt_close(). | 502 | * platform remove function. |
472 | */ | 503 | */ |
473 | static void __exit bfin_wdt_exit(void) | 504 | static void __exit bfin_wdt_exit(void) |
474 | { | 505 | { |
475 | misc_deregister(&bfin_wdt_miscdev); | 506 | platform_device_unregister(bfin_wdt_device); |
476 | unregister_reboot_notifier(&bfin_wdt_notifier); | 507 | platform_driver_unregister(&bfin_wdt_driver); |
477 | } | 508 | } |
478 | 509 | ||
479 | module_init(bfin_wdt_init); | 510 | module_init(bfin_wdt_init); |
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index d362f5bf658a..c1ba0db48501 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
@@ -1,12 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/char/watchdog/booke_wdt.c | ||
3 | * | ||
4 | * Watchdog timer for PowerPC Book-E systems | 2 | * Watchdog timer for PowerPC Book-E systems |
5 | * | 3 | * |
6 | * Author: Matthew McClintock | 4 | * Author: Matthew McClintock |
7 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | 5 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> |
8 | * | 6 | * |
9 | * Copyright 2005 Freescale Semiconductor Inc. | 7 | * Copyright 2005, 2008 Freescale Semiconductor Inc. |
10 | * | 8 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
@@ -16,6 +14,7 @@ | |||
16 | 14 | ||
17 | #include <linux/module.h> | 15 | #include <linux/module.h> |
18 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/smp.h> | ||
19 | #include <linux/miscdevice.h> | 18 | #include <linux/miscdevice.h> |
20 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
21 | #include <linux/watchdog.h> | 20 | #include <linux/watchdog.h> |
@@ -38,7 +37,7 @@ | |||
38 | #define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */ | 37 | #define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */ |
39 | #endif /* for timing information */ | 38 | #endif /* for timing information */ |
40 | 39 | ||
41 | u32 booke_wdt_enabled = 0; | 40 | u32 booke_wdt_enabled; |
42 | u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | 41 | u32 booke_wdt_period = WDT_PERIOD_DEFAULT; |
43 | 42 | ||
44 | #ifdef CONFIG_FSL_BOOKE | 43 | #ifdef CONFIG_FSL_BOOKE |
@@ -47,33 +46,31 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | |||
47 | #define WDTP(x) (TCR_WP(x)) | 46 | #define WDTP(x) (TCR_WP(x)) |
48 | #endif | 47 | #endif |
49 | 48 | ||
50 | /* | 49 | static DEFINE_SPINLOCK(booke_wdt_lock); |
51 | * booke_wdt_ping: | 50 | |
52 | */ | 51 | static void __booke_wdt_ping(void *data) |
53 | static __inline__ void booke_wdt_ping(void) | ||
54 | { | 52 | { |
55 | mtspr(SPRN_TSR, TSR_ENW|TSR_WIS); | 53 | mtspr(SPRN_TSR, TSR_ENW|TSR_WIS); |
56 | } | 54 | } |
57 | 55 | ||
58 | /* | 56 | static void booke_wdt_ping(void) |
59 | * booke_wdt_enable: | 57 | { |
60 | */ | 58 | on_each_cpu(__booke_wdt_ping, NULL, 0, 0); |
61 | static __inline__ void booke_wdt_enable(void) | 59 | } |
60 | |||
61 | static void __booke_wdt_enable(void *data) | ||
62 | { | 62 | { |
63 | u32 val; | 63 | u32 val; |
64 | 64 | ||
65 | /* clear status before enabling watchdog */ | 65 | /* clear status before enabling watchdog */ |
66 | booke_wdt_ping(); | 66 | __booke_wdt_ping(NULL); |
67 | val = mfspr(SPRN_TCR); | 67 | val = mfspr(SPRN_TCR); |
68 | val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); | 68 | val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); |
69 | 69 | ||
70 | mtspr(SPRN_TCR, val); | 70 | mtspr(SPRN_TCR, val); |
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | static ssize_t booke_wdt_write(struct file *file, const char __user *buf, |
74 | * booke_wdt_write: | ||
75 | */ | ||
76 | static ssize_t booke_wdt_write (struct file *file, const char __user *buf, | ||
77 | size_t count, loff_t *ppos) | 74 | size_t count, loff_t *ppos) |
78 | { | 75 | { |
79 | booke_wdt_ping(); | 76 | booke_wdt_ping(); |
@@ -81,15 +78,11 @@ static ssize_t booke_wdt_write (struct file *file, const char __user *buf, | |||
81 | } | 78 | } |
82 | 79 | ||
83 | static struct watchdog_info ident = { | 80 | static struct watchdog_info ident = { |
84 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | 81 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, |
85 | .firmware_version = 0, | 82 | .identity = "PowerPC Book-E Watchdog", |
86 | .identity = "PowerPC Book-E Watchdog", | ||
87 | }; | 83 | }; |
88 | 84 | ||
89 | /* | 85 | static int booke_wdt_ioctl(struct inode *inode, struct file *file, |
90 | * booke_wdt_ioctl: | ||
91 | */ | ||
92 | static int booke_wdt_ioctl (struct inode *inode, struct file *file, | ||
93 | unsigned int cmd, unsigned long arg) | 86 | unsigned int cmd, unsigned long arg) |
94 | { | 87 | { |
95 | u32 tmp = 0; | 88 | u32 tmp = 0; |
@@ -97,7 +90,7 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file, | |||
97 | 90 | ||
98 | switch (cmd) { | 91 | switch (cmd) { |
99 | case WDIOC_GETSUPPORT: | 92 | case WDIOC_GETSUPPORT: |
100 | if (copy_to_user ((struct watchdog_info __user *) arg, &ident, | 93 | if (copy_to_user((struct watchdog_info __user *)arg, &ident, |
101 | sizeof(struct watchdog_info))) | 94 | sizeof(struct watchdog_info))) |
102 | return -EFAULT; | 95 | return -EFAULT; |
103 | case WDIOC_GETSTATUS: | 96 | case WDIOC_GETSTATUS: |
@@ -132,33 +125,33 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file, | |||
132 | 125 | ||
133 | return 0; | 126 | return 0; |
134 | } | 127 | } |
135 | /* | 128 | |
136 | * booke_wdt_open: | 129 | static int booke_wdt_open(struct inode *inode, struct file *file) |
137 | */ | ||
138 | static int booke_wdt_open (struct inode *inode, struct file *file) | ||
139 | { | 130 | { |
131 | spin_lock(&booke_wdt_lock); | ||
140 | if (booke_wdt_enabled == 0) { | 132 | if (booke_wdt_enabled == 0) { |
141 | booke_wdt_enabled = 1; | 133 | booke_wdt_enabled = 1; |
142 | booke_wdt_enable(); | 134 | on_each_cpu(__booke_wdt_enable, NULL, 0, 0); |
143 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | 135 | printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled " |
144 | booke_wdt_period); | 136 | "(wdt_period=%d)\n", booke_wdt_period); |
145 | } | 137 | } |
138 | spin_unlock(&booke_wdt_lock); | ||
146 | 139 | ||
147 | return nonseekable_open(inode, file); | 140 | return nonseekable_open(inode, file); |
148 | } | 141 | } |
149 | 142 | ||
150 | static const struct file_operations booke_wdt_fops = { | 143 | static const struct file_operations booke_wdt_fops = { |
151 | .owner = THIS_MODULE, | 144 | .owner = THIS_MODULE, |
152 | .llseek = no_llseek, | 145 | .llseek = no_llseek, |
153 | .write = booke_wdt_write, | 146 | .write = booke_wdt_write, |
154 | .ioctl = booke_wdt_ioctl, | 147 | .ioctl = booke_wdt_ioctl, |
155 | .open = booke_wdt_open, | 148 | .open = booke_wdt_open, |
156 | }; | 149 | }; |
157 | 150 | ||
158 | static struct miscdevice booke_wdt_miscdev = { | 151 | static struct miscdevice booke_wdt_miscdev = { |
159 | .minor = WATCHDOG_MINOR, | 152 | .minor = WATCHDOG_MINOR, |
160 | .name = "watchdog", | 153 | .name = "watchdog", |
161 | .fops = &booke_wdt_fops, | 154 | .fops = &booke_wdt_fops, |
162 | }; | 155 | }; |
163 | 156 | ||
164 | static void __exit booke_wdt_exit(void) | 157 | static void __exit booke_wdt_exit(void) |
@@ -166,28 +159,27 @@ static void __exit booke_wdt_exit(void) | |||
166 | misc_deregister(&booke_wdt_miscdev); | 159 | misc_deregister(&booke_wdt_miscdev); |
167 | } | 160 | } |
168 | 161 | ||
169 | /* | ||
170 | * booke_wdt_init: | ||
171 | */ | ||
172 | static int __init booke_wdt_init(void) | 162 | static int __init booke_wdt_init(void) |
173 | { | 163 | { |
174 | int ret = 0; | 164 | int ret = 0; |
175 | 165 | ||
176 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); | 166 | printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); |
177 | ident.firmware_version = cur_cpu_spec->pvr_value; | 167 | ident.firmware_version = cur_cpu_spec->pvr_value; |
178 | 168 | ||
179 | ret = misc_register(&booke_wdt_miscdev); | 169 | ret = misc_register(&booke_wdt_miscdev); |
180 | if (ret) { | 170 | if (ret) { |
181 | printk (KERN_CRIT "Cannot register miscdev on minor=%d (err=%d)\n", | 171 | printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n", |
182 | WATCHDOG_MINOR, ret); | 172 | WATCHDOG_MINOR, ret); |
183 | return ret; | 173 | return ret; |
184 | } | 174 | } |
185 | 175 | ||
176 | spin_lock(&booke_wdt_lock); | ||
186 | if (booke_wdt_enabled == 1) { | 177 | if (booke_wdt_enabled == 1) { |
187 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | 178 | printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled " |
188 | booke_wdt_period); | 179 | "(wdt_period=%d)\n", booke_wdt_period); |
189 | booke_wdt_enable(); | 180 | on_each_cpu(__booke_wdt_enable, NULL, 0, 0); |
190 | } | 181 | } |
182 | spin_unlock(&booke_wdt_lock); | ||
191 | 183 | ||
192 | return ret; | 184 | return ret; |
193 | } | 185 | } |
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c new file mode 100644 index 000000000000..30d09cbbad94 --- /dev/null +++ b/drivers/watchdog/geodewdt.c | |||
@@ -0,0 +1,308 @@ | |||
1 | /* Watchdog timer for the Geode GX/LX with the CS5535/CS5536 companion chip | ||
2 | * | ||
3 | * Copyright (C) 2006-2007, Advanced Micro Devices, Inc. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/miscdevice.h> | ||
16 | #include <linux/watchdog.h> | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/reboot.h> | ||
20 | |||
21 | #include <asm/uaccess.h> | ||
22 | #include <asm/geode.h> | ||
23 | |||
24 | #define GEODEWDT_HZ 500 | ||
25 | #define GEODEWDT_SCALE 6 | ||
26 | #define GEODEWDT_MAX_SECONDS 131 | ||
27 | |||
28 | #define WDT_FLAGS_OPEN 1 | ||
29 | #define WDT_FLAGS_ORPHAN 2 | ||
30 | |||
31 | #define DRV_NAME "geodewdt" | ||
32 | #define WATCHDOG_NAME "Geode GX/LX WDT" | ||
33 | #define WATCHDOG_TIMEOUT 60 | ||
34 | |||
35 | static int timeout = WATCHDOG_TIMEOUT; | ||
36 | module_param(timeout, int, 0); | ||
37 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); | ||
38 | |||
39 | static int nowayout = WATCHDOG_NOWAYOUT; | ||
40 | module_param(nowayout, int, 0); | ||
41 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
42 | |||
43 | static struct platform_device *geodewdt_platform_device; | ||
44 | static unsigned long wdt_flags; | ||
45 | static int wdt_timer; | ||
46 | static int safe_close; | ||
47 | |||
48 | static void geodewdt_ping(void) | ||
49 | { | ||
50 | /* Stop the counter */ | ||
51 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); | ||
52 | |||
53 | /* Reset the counter */ | ||
54 | geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); | ||
55 | |||
56 | /* Enable the counter */ | ||
57 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN); | ||
58 | } | ||
59 | |||
60 | static void geodewdt_disable(void) | ||
61 | { | ||
62 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); | ||
63 | geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); | ||
64 | } | ||
65 | |||
66 | static int geodewdt_set_heartbeat(int val) | ||
67 | { | ||
68 | if (val < 1 || val > GEODEWDT_MAX_SECONDS) | ||
69 | return -EINVAL; | ||
70 | |||
71 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0); | ||
72 | geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ); | ||
73 | geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0); | ||
74 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN); | ||
75 | |||
76 | timeout = val; | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static int | ||
81 | geodewdt_open(struct inode *inode, struct file *file) | ||
82 | { | ||
83 | if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags)) | ||
84 | return -EBUSY; | ||
85 | |||
86 | if (!test_and_clear_bit(WDT_FLAGS_ORPHAN, &wdt_flags)) | ||
87 | __module_get(THIS_MODULE); | ||
88 | |||
89 | geodewdt_ping(); | ||
90 | return nonseekable_open(inode, file); | ||
91 | } | ||
92 | |||
93 | static int | ||
94 | geodewdt_release(struct inode *inode, struct file *file) | ||
95 | { | ||
96 | if (safe_close) { | ||
97 | geodewdt_disable(); | ||
98 | module_put(THIS_MODULE); | ||
99 | } | ||
100 | else { | ||
101 | printk(KERN_CRIT "Unexpected close - watchdog is not stopping.\n"); | ||
102 | geodewdt_ping(); | ||
103 | |||
104 | set_bit(WDT_FLAGS_ORPHAN, &wdt_flags); | ||
105 | } | ||
106 | |||
107 | clear_bit(WDT_FLAGS_OPEN, &wdt_flags); | ||
108 | safe_close = 0; | ||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | static ssize_t | ||
113 | geodewdt_write(struct file *file, const char __user *data, size_t len, | ||
114 | loff_t *ppos) | ||
115 | { | ||
116 | if(len) { | ||
117 | if (!nowayout) { | ||
118 | size_t i; | ||
119 | safe_close = 0; | ||
120 | |||
121 | for (i = 0; i != len; i++) { | ||
122 | char c; | ||
123 | |||
124 | if (get_user(c, data + i)) | ||
125 | return -EFAULT; | ||
126 | |||
127 | if (c == 'V') | ||
128 | safe_close = 1; | ||
129 | } | ||
130 | } | ||
131 | |||
132 | geodewdt_ping(); | ||
133 | } | ||
134 | return len; | ||
135 | } | ||
136 | |||
137 | static int | ||
138 | geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | ||
139 | unsigned long arg) | ||
140 | { | ||
141 | void __user *argp = (void __user *)arg; | ||
142 | int __user *p = argp; | ||
143 | int interval; | ||
144 | |||
145 | static struct watchdog_info ident = { | ||
146 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | ||
147 | | WDIOF_MAGICCLOSE, | ||
148 | .firmware_version = 1, | ||
149 | .identity = WATCHDOG_NAME, | ||
150 | }; | ||
151 | |||
152 | switch(cmd) { | ||
153 | case WDIOC_GETSUPPORT: | ||
154 | return copy_to_user(argp, &ident, | ||
155 | sizeof(ident)) ? -EFAULT : 0; | ||
156 | break; | ||
157 | |||
158 | case WDIOC_GETSTATUS: | ||
159 | case WDIOC_GETBOOTSTATUS: | ||
160 | return put_user(0, p); | ||
161 | |||
162 | case WDIOC_KEEPALIVE: | ||
163 | geodewdt_ping(); | ||
164 | return 0; | ||
165 | |||
166 | case WDIOC_SETTIMEOUT: | ||
167 | if (get_user(interval, p)) | ||
168 | return -EFAULT; | ||
169 | |||
170 | if (geodewdt_set_heartbeat(interval)) | ||
171 | return -EINVAL; | ||
172 | |||
173 | /* Fall through */ | ||
174 | |||
175 | case WDIOC_GETTIMEOUT: | ||
176 | return put_user(timeout, p); | ||
177 | |||
178 | case WDIOC_SETOPTIONS: | ||
179 | { | ||
180 | int options, ret = -EINVAL; | ||
181 | |||
182 | if (get_user(options, p)) | ||
183 | return -EFAULT; | ||
184 | |||
185 | if (options & WDIOS_DISABLECARD) { | ||
186 | geodewdt_disable(); | ||
187 | ret = 0; | ||
188 | } | ||
189 | |||
190 | if (options & WDIOS_ENABLECARD) { | ||
191 | geodewdt_ping(); | ||
192 | ret = 0; | ||
193 | } | ||
194 | |||
195 | return ret; | ||
196 | } | ||
197 | default: | ||
198 | return -ENOTTY; | ||
199 | } | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | static const struct file_operations geodewdt_fops = { | ||
205 | .owner = THIS_MODULE, | ||
206 | .llseek = no_llseek, | ||
207 | .write = geodewdt_write, | ||
208 | .ioctl = geodewdt_ioctl, | ||
209 | .open = geodewdt_open, | ||
210 | .release = geodewdt_release, | ||
211 | }; | ||
212 | |||
213 | static struct miscdevice geodewdt_miscdev = { | ||
214 | .minor = WATCHDOG_MINOR, | ||
215 | .name = "watchdog", | ||
216 | .fops = &geodewdt_fops | ||
217 | }; | ||
218 | |||
219 | static int __devinit | ||
220 | geodewdt_probe(struct platform_device *dev) | ||
221 | { | ||
222 | int ret, timer; | ||
223 | |||
224 | timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING); | ||
225 | |||
226 | if (timer == -1) { | ||
227 | printk(KERN_ERR "geodewdt: No timers were available\n"); | ||
228 | return -ENODEV; | ||
229 | } | ||
230 | |||
231 | wdt_timer = timer; | ||
232 | |||
233 | /* Set up the timer */ | ||
234 | |||
235 | geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, | ||
236 | GEODEWDT_SCALE | (3 << 8)); | ||
237 | |||
238 | /* Set up comparator 2 to reset when the event fires */ | ||
239 | geode_mfgpt_toggle_event(wdt_timer, MFGPT_CMP2, MFGPT_EVENT_RESET, 1); | ||
240 | |||
241 | /* Set up the initial timeout */ | ||
242 | |||
243 | geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, | ||
244 | timeout * GEODEWDT_HZ); | ||
245 | |||
246 | ret = misc_register(&geodewdt_miscdev); | ||
247 | |||
248 | return ret; | ||
249 | } | ||
250 | |||
251 | static int __devexit | ||
252 | geodewdt_remove(struct platform_device *dev) | ||
253 | { | ||
254 | misc_deregister(&geodewdt_miscdev); | ||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | static void | ||
259 | geodewdt_shutdown(struct platform_device *dev) | ||
260 | { | ||
261 | geodewdt_disable(); | ||
262 | } | ||
263 | |||
264 | static struct platform_driver geodewdt_driver = { | ||
265 | .probe = geodewdt_probe, | ||
266 | .remove = __devexit_p(geodewdt_remove), | ||
267 | .shutdown = geodewdt_shutdown, | ||
268 | .driver = { | ||
269 | .owner = THIS_MODULE, | ||
270 | .name = DRV_NAME, | ||
271 | }, | ||
272 | }; | ||
273 | |||
274 | static int __init | ||
275 | geodewdt_init(void) | ||
276 | { | ||
277 | int ret; | ||
278 | |||
279 | ret = platform_driver_register(&geodewdt_driver); | ||
280 | if (ret) | ||
281 | return ret; | ||
282 | |||
283 | geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0); | ||
284 | if (IS_ERR(geodewdt_platform_device)) { | ||
285 | ret = PTR_ERR(geodewdt_platform_device); | ||
286 | goto err; | ||
287 | } | ||
288 | |||
289 | return 0; | ||
290 | err: | ||
291 | platform_driver_unregister(&geodewdt_driver); | ||
292 | return ret; | ||
293 | } | ||
294 | |||
295 | static void __exit | ||
296 | geodewdt_exit(void) | ||
297 | { | ||
298 | platform_device_unregister(geodewdt_platform_device); | ||
299 | platform_driver_unregister(&geodewdt_driver); | ||
300 | } | ||
301 | |||
302 | module_init(geodewdt_init); | ||
303 | module_exit(geodewdt_exit); | ||
304 | |||
305 | MODULE_AUTHOR("Advanced Micro Devices, Inc"); | ||
306 | MODULE_DESCRIPTION("Geode GX/LX Watchdog Driver"); | ||
307 | MODULE_LICENSE("GPL"); | ||
308 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | ||
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 6483d1066b95..6a63535fc04d 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -418,23 +418,20 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, | |||
418 | static unsigned long rom_pl; | 418 | static unsigned long rom_pl; |
419 | static int die_nmi_called; | 419 | static int die_nmi_called; |
420 | 420 | ||
421 | if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) | 421 | if (ulReason == DIE_NMI || ulReason == DIE_NMI_IPI) { |
422 | return NOTIFY_OK; | 422 | spin_lock_irqsave(&rom_lock, rom_pl); |
423 | 423 | if (!die_nmi_called) | |
424 | spin_lock_irqsave(&rom_lock, rom_pl); | 424 | asminline_call(&cmn_regs, cru_rom_addr); |
425 | if (!die_nmi_called) | 425 | die_nmi_called = 1; |
426 | asminline_call(&cmn_regs, cru_rom_addr); | 426 | spin_unlock_irqrestore(&rom_lock, rom_pl); |
427 | die_nmi_called = 1; | 427 | if (cmn_regs.u1.ral != 0) { |
428 | spin_unlock_irqrestore(&rom_lock, rom_pl); | 428 | panic("An NMI occurred, please see the Integrated " |
429 | if (cmn_regs.u1.ral == 0) { | 429 | "Management Log for details.\n"); |
430 | printk(KERN_WARNING "hpwdt: An NMI occurred, " | 430 | } |
431 | "but unable to determine source.\n"); | ||
432 | } else { | ||
433 | panic("An NMI occurred, please see the Integrated " | ||
434 | "Management Log for details.\n"); | ||
435 | } | 431 | } |
436 | 432 | ||
437 | return NOTIFY_STOP; | 433 | die_nmi_called = 0; |
434 | return NOTIFY_DONE; | ||
438 | } | 435 | } |
439 | 436 | ||
440 | /* | 437 | /* |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index a0e6809e369f..95ba985bd341 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
@@ -41,9 +41,10 @@ | |||
41 | * 82801HH (ICH8DH) : document number 313056-003, 313057-009, | 41 | * 82801HH (ICH8DH) : document number 313056-003, 313057-009, |
42 | * 82801HO (ICH8DO) : document number 313056-003, 313057-009, | 42 | * 82801HO (ICH8DO) : document number 313056-003, 313057-009, |
43 | * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009, | 43 | * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009, |
44 | * 82801IB (ICH9) : document number 316972-001, 316973-001, | 44 | * 82801IB (ICH9) : document number 316972-001, 316973-006, |
45 | * 82801IR (ICH9R) : document number 316972-001, 316973-001, | 45 | * 82801IR (ICH9R) : document number 316972-001, 316973-006, |
46 | * 82801IH (ICH9DH) : document number 316972-001, 316973-001, | 46 | * 82801IH (ICH9DH) : document number 316972-001, 316973-006, |
47 | * 82801IO (ICH9DO) : document number 316972-001, 316973-006, | ||
47 | * 6300ESB (6300ESB) : document number 300641-003, 300884-010, | 48 | * 6300ESB (6300ESB) : document number 300641-003, 300884-010, |
48 | * 631xESB (631xESB) : document number 313082-001, 313075-005, | 49 | * 631xESB (631xESB) : document number 313082-001, 313075-005, |
49 | * 632xESB (632xESB) : document number 313082-001, 313075-005 | 50 | * 632xESB (632xESB) : document number 313082-001, 313075-005 |
@@ -55,8 +56,8 @@ | |||
55 | 56 | ||
56 | /* Module and version information */ | 57 | /* Module and version information */ |
57 | #define DRV_NAME "iTCO_wdt" | 58 | #define DRV_NAME "iTCO_wdt" |
58 | #define DRV_VERSION "1.02" | 59 | #define DRV_VERSION "1.03" |
59 | #define DRV_RELDATE "26-Jul-2007" | 60 | #define DRV_RELDATE "30-Apr-2008" |
60 | #define PFX DRV_NAME ": " | 61 | #define PFX DRV_NAME ": " |
61 | 62 | ||
62 | /* Includes */ | 63 | /* Includes */ |
@@ -104,6 +105,7 @@ enum iTCO_chipsets { | |||
104 | TCO_ICH9, /* ICH9 */ | 105 | TCO_ICH9, /* ICH9 */ |
105 | TCO_ICH9R, /* ICH9R */ | 106 | TCO_ICH9R, /* ICH9R */ |
106 | TCO_ICH9DH, /* ICH9DH */ | 107 | TCO_ICH9DH, /* ICH9DH */ |
108 | TCO_ICH9DO, /* ICH9DO */ | ||
107 | TCO_631XESB, /* 631xESB/632xESB */ | 109 | TCO_631XESB, /* 631xESB/632xESB */ |
108 | }; | 110 | }; |
109 | 111 | ||
@@ -136,6 +138,7 @@ static struct { | |||
136 | {"ICH9", 2}, | 138 | {"ICH9", 2}, |
137 | {"ICH9R", 2}, | 139 | {"ICH9R", 2}, |
138 | {"ICH9DH", 2}, | 140 | {"ICH9DH", 2}, |
141 | {"ICH9DO", 2}, | ||
139 | {"631xESB/632xESB", 2}, | 142 | {"631xESB/632xESB", 2}, |
140 | {NULL,0} | 143 | {NULL,0} |
141 | }; | 144 | }; |
@@ -181,6 +184,7 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { | |||
181 | { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )}, | 184 | { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )}, |
182 | { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )}, | 185 | { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )}, |
183 | { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )}, | 186 | { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )}, |
187 | { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_4, TCO_ICH9DO )}, | ||
184 | { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)}, | 188 | { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)}, |
185 | { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)}, | 189 | { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)}, |
186 | { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)}, | 190 | { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)}, |
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index c622a0e6c9ae..528b882420b6 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #define WATCHDOG_NAME "w83697hf/hg WDT" | 44 | #define WATCHDOG_NAME "w83697hf/hg WDT" |
45 | #define PFX WATCHDOG_NAME ": " | 45 | #define PFX WATCHDOG_NAME ": " |
46 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ | 46 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ |
47 | #define WATCHDOG_EARLY_DISABLE 1 /* Disable until userland kicks in */ | ||
47 | 48 | ||
48 | static unsigned long wdt_is_open; | 49 | static unsigned long wdt_is_open; |
49 | static char expect_close; | 50 | static char expect_close; |
@@ -56,12 +57,16 @@ MODULE_PARM_DESC(wdt_io, "w83697hf/hg WDT io port (default 0x2e, 0 = autodetect) | |||
56 | 57 | ||
57 | static int timeout = WATCHDOG_TIMEOUT; /* in seconds */ | 58 | static int timeout = WATCHDOG_TIMEOUT; /* in seconds */ |
58 | module_param(timeout, int, 0); | 59 | module_param(timeout, int, 0); |
59 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); | 60 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255 (default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); |
60 | 61 | ||
61 | static int nowayout = WATCHDOG_NOWAYOUT; | 62 | static int nowayout = WATCHDOG_NOWAYOUT; |
62 | module_param(nowayout, int, 0); | 63 | module_param(nowayout, int, 0); |
63 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 64 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
64 | 65 | ||
66 | static int early_disable = WATCHDOG_EARLY_DISABLE; | ||
67 | module_param(early_disable, int, 0); | ||
68 | MODULE_PARM_DESC(early_disable, "Watchdog gets disabled at boot time (default=" __MODULE_STRING(WATCHDOG_EARLY_DISABLE) ")"); | ||
69 | |||
65 | /* | 70 | /* |
66 | * Kernel methods. | 71 | * Kernel methods. |
67 | */ | 72 | */ |
@@ -140,7 +145,7 @@ w83697hf_init(void) | |||
140 | w83697hf_deselect_wdt(); | 145 | w83697hf_deselect_wdt(); |
141 | } | 146 | } |
142 | 147 | ||
143 | static int | 148 | static void |
144 | wdt_ping(void) | 149 | wdt_ping(void) |
145 | { | 150 | { |
146 | spin_lock(&io_lock); | 151 | spin_lock(&io_lock); |
@@ -150,10 +155,9 @@ wdt_ping(void) | |||
150 | 155 | ||
151 | w83697hf_deselect_wdt(); | 156 | w83697hf_deselect_wdt(); |
152 | spin_unlock(&io_lock); | 157 | spin_unlock(&io_lock); |
153 | return 0; | ||
154 | } | 158 | } |
155 | 159 | ||
156 | static int | 160 | static void |
157 | wdt_enable(void) | 161 | wdt_enable(void) |
158 | { | 162 | { |
159 | spin_lock(&io_lock); | 163 | spin_lock(&io_lock); |
@@ -164,10 +168,9 @@ wdt_enable(void) | |||
164 | 168 | ||
165 | w83697hf_deselect_wdt(); | 169 | w83697hf_deselect_wdt(); |
166 | spin_unlock(&io_lock); | 170 | spin_unlock(&io_lock); |
167 | return 0; | ||
168 | } | 171 | } |
169 | 172 | ||
170 | static int | 173 | static void |
171 | wdt_disable(void) | 174 | wdt_disable(void) |
172 | { | 175 | { |
173 | spin_lock(&io_lock); | 176 | spin_lock(&io_lock); |
@@ -178,7 +181,22 @@ wdt_disable(void) | |||
178 | 181 | ||
179 | w83697hf_deselect_wdt(); | 182 | w83697hf_deselect_wdt(); |
180 | spin_unlock(&io_lock); | 183 | spin_unlock(&io_lock); |
181 | return 0; | 184 | } |
185 | |||
186 | static unsigned char | ||
187 | wdt_running(void) | ||
188 | { | ||
189 | unsigned char t; | ||
190 | |||
191 | spin_lock(&io_lock); | ||
192 | w83697hf_select_wdt(); | ||
193 | |||
194 | t = w83697hf_get_reg(0xF4); /* Read timer */ | ||
195 | |||
196 | w83697hf_deselect_wdt(); | ||
197 | spin_unlock(&io_lock); | ||
198 | |||
199 | return t; | ||
182 | } | 200 | } |
183 | 201 | ||
184 | static int | 202 | static int |
@@ -397,7 +415,11 @@ wdt_init(void) | |||
397 | } | 415 | } |
398 | 416 | ||
399 | w83697hf_init(); | 417 | w83697hf_init(); |
400 | wdt_disable(); /* Disable watchdog until first use */ | 418 | if (early_disable) { |
419 | if (wdt_running()) | ||
420 | printk (KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n"); | ||
421 | wdt_disable(); | ||
422 | } | ||
401 | 423 | ||
402 | if (wdt_set_heartbeat(timeout)) { | 424 | if (wdt_set_heartbeat(timeout)) { |
403 | wdt_set_heartbeat(WATCHDOG_TIMEOUT); | 425 | wdt_set_heartbeat(WATCHDOG_TIMEOUT); |
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt index 55e8ee1900a5..3263084eef9e 100644 --- a/fs/Kconfig.binfmt +++ b/fs/Kconfig.binfmt | |||
@@ -42,7 +42,7 @@ config BINFMT_ELF_FDPIC | |||
42 | 42 | ||
43 | config BINFMT_FLAT | 43 | config BINFMT_FLAT |
44 | bool "Kernel support for flat binaries" | 44 | bool "Kernel support for flat binaries" |
45 | depends on !MMU | 45 | depends on !MMU && (!FRV || BROKEN) |
46 | help | 46 | help |
47 | Support uClinux FLAT format binaries. | 47 | Support uClinux FLAT format binaries. |
48 | 48 | ||
diff --git a/fs/afs/callback.c b/fs/afs/callback.c index a78d5b236bb1..587ef5123cd8 100644 --- a/fs/afs/callback.c +++ b/fs/afs/callback.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * along with this program; if not, write to the Free Software | 8 | * along with this program; if not, write to the Free Software |
9 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 9 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
10 | * | 10 | * |
11 | * Authors: David Woodhouse <dwmw2@cambridge.redhat.com> | 11 | * Authors: David Woodhouse <dwmw2@infradead.org> |
12 | * David Howells <dhowells@redhat.com> | 12 | * David Howells <dhowells@redhat.com> |
13 | * | 13 | * |
14 | */ | 14 | */ |
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 08db82e1343a..bb47217f6a18 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * along with this program; if not, write to the Free Software | 8 | * along with this program; if not, write to the Free Software |
9 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 9 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
10 | * | 10 | * |
11 | * Authors: David Woodhouse <dwmw2@cambridge.redhat.com> | 11 | * Authors: David Woodhouse <dwmw2@infradead.org> |
12 | * David Howells <dhowells@redhat.com> | 12 | * David Howells <dhowells@redhat.com> |
13 | * | 13 | * |
14 | */ | 14 | */ |
diff --git a/fs/afs/super.c b/fs/afs/super.c index 4b572b801d8d..7e3faeef6818 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 10 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
11 | * | 11 | * |
12 | * Authors: David Howells <dhowells@redhat.com> | 12 | * Authors: David Howells <dhowells@redhat.com> |
13 | * David Woodhouse <dwmw2@redhat.com> | 13 | * David Woodhouse <dwmw2@infradead.org> |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | ||
@@ -591,10 +591,6 @@ static void use_mm(struct mm_struct *mm) | |||
591 | atomic_inc(&mm->mm_count); | 591 | atomic_inc(&mm->mm_count); |
592 | tsk->mm = mm; | 592 | tsk->mm = mm; |
593 | tsk->active_mm = mm; | 593 | tsk->active_mm = mm; |
594 | /* | ||
595 | * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise | ||
596 | * it won't work. Update it accordingly if you change it here | ||
597 | */ | ||
598 | switch_mm(active_mm, mm, tsk); | 594 | switch_mm(active_mm, mm, tsk); |
599 | task_unlock(tsk); | 595 | task_unlock(tsk); |
600 | 596 | ||
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index b25707fee2cc..0fa95b198e6e 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -256,7 +256,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, | |||
256 | return -EFAULT; | 256 | return -EFAULT; |
257 | len = strnlen_user((void __user *)p, MAX_ARG_STRLEN); | 257 | len = strnlen_user((void __user *)p, MAX_ARG_STRLEN); |
258 | if (!len || len > MAX_ARG_STRLEN) | 258 | if (!len || len > MAX_ARG_STRLEN) |
259 | return 0; | 259 | return -EINVAL; |
260 | p += len; | 260 | p += len; |
261 | } | 261 | } |
262 | if (__put_user(0, argv)) | 262 | if (__put_user(0, argv)) |
@@ -268,7 +268,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, | |||
268 | return -EFAULT; | 268 | return -EFAULT; |
269 | len = strnlen_user((void __user *)p, MAX_ARG_STRLEN); | 269 | len = strnlen_user((void __user *)p, MAX_ARG_STRLEN); |
270 | if (!len || len > MAX_ARG_STRLEN) | 270 | if (!len || len > MAX_ARG_STRLEN) |
271 | return 0; | 271 | return -EINVAL; |
272 | p += len; | 272 | p += len; |
273 | } | 273 | } |
274 | if (__put_user(0, envp)) | 274 | if (__put_user(0, envp)) |
@@ -1900,7 +1900,7 @@ static int elf_core_dump(long signr, struct pt_regs *regs, struct file *file, un | |||
1900 | /* alloc memory for large data structures: too large to be on stack */ | 1900 | /* alloc memory for large data structures: too large to be on stack */ |
1901 | elf = kmalloc(sizeof(*elf), GFP_KERNEL); | 1901 | elf = kmalloc(sizeof(*elf), GFP_KERNEL); |
1902 | if (!elf) | 1902 | if (!elf) |
1903 | goto cleanup; | 1903 | goto out; |
1904 | 1904 | ||
1905 | segs = current->mm->map_count; | 1905 | segs = current->mm->map_count; |
1906 | #ifdef ELF_CORE_EXTRA_PHDRS | 1906 | #ifdef ELF_CORE_EXTRA_PHDRS |
@@ -2034,8 +2034,9 @@ end_coredump: | |||
2034 | set_fs(fs); | 2034 | set_fs(fs); |
2035 | 2035 | ||
2036 | cleanup: | 2036 | cleanup: |
2037 | kfree(elf); | ||
2038 | free_note_info(&info); | 2037 | free_note_info(&info); |
2038 | kfree(elf); | ||
2039 | out: | ||
2039 | return has_dumped; | 2040 | return has_dumped; |
2040 | } | 2041 | } |
2041 | 2042 | ||
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index ddd35d873391..d051a32e6270 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -390,7 +390,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm, | |||
390 | } | 390 | } |
391 | 391 | ||
392 | /* expand the stack mapping to use up the entire allocation granule */ | 392 | /* expand the stack mapping to use up the entire allocation granule */ |
393 | fullsize = ksize((char *) current->mm->start_brk); | 393 | fullsize = kobjsize((char *) current->mm->start_brk); |
394 | if (!IS_ERR_VALUE(do_mremap(current->mm->start_brk, stack_size, | 394 | if (!IS_ERR_VALUE(do_mremap(current->mm->start_brk, stack_size, |
395 | fullsize, 0, 0))) | 395 | fullsize, 0, 0))) |
396 | stack_size = fullsize; | 396 | stack_size = fullsize; |
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 3b40d45a3a16..2cb1acda3a82 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c | |||
@@ -548,7 +548,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
548 | PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0); | 548 | PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0); |
549 | /* Remap to use all availabe slack region space */ | 549 | /* Remap to use all availabe slack region space */ |
550 | if (realdatastart && (realdatastart < (unsigned long)-4096)) { | 550 | if (realdatastart && (realdatastart < (unsigned long)-4096)) { |
551 | reallen = ksize((void *)realdatastart); | 551 | reallen = kobjsize((void *)realdatastart); |
552 | if (reallen > len) { | 552 | if (reallen > len) { |
553 | realdatastart = do_mremap(realdatastart, len, | 553 | realdatastart = do_mremap(realdatastart, len, |
554 | reallen, MREMAP_FIXED, realdatastart); | 554 | reallen, MREMAP_FIXED, realdatastart); |
@@ -600,7 +600,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
600 | PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0); | 600 | PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0); |
601 | /* Remap to use all availabe slack region space */ | 601 | /* Remap to use all availabe slack region space */ |
602 | if (textpos && (textpos < (unsigned long) -4096)) { | 602 | if (textpos && (textpos < (unsigned long) -4096)) { |
603 | reallen = ksize((void *)textpos); | 603 | reallen = kobjsize((void *)textpos); |
604 | if (reallen > len) { | 604 | if (reallen > len) { |
605 | textpos = do_mremap(textpos, len, reallen, | 605 | textpos = do_mremap(textpos, len, reallen, |
606 | MREMAP_FIXED, textpos); | 606 | MREMAP_FIXED, textpos); |
@@ -683,7 +683,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
683 | */ | 683 | */ |
684 | current->mm->start_brk = datapos + data_len + bss_len; | 684 | current->mm->start_brk = datapos + data_len + bss_len; |
685 | current->mm->brk = (current->mm->start_brk + 3) & ~3; | 685 | current->mm->brk = (current->mm->start_brk + 3) & ~3; |
686 | current->mm->context.end_brk = memp + ksize((void *) memp) - stack_len; | 686 | current->mm->context.end_brk = memp + kobjsize((void *) memp) - stack_len; |
687 | } | 687 | } |
688 | 688 | ||
689 | if (flags & FLAT_FLAG_KTRACE) | 689 | if (flags & FLAT_FLAG_KTRACE) |
@@ -790,7 +790,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
790 | 790 | ||
791 | /* zero the BSS, BRK and stack areas */ | 791 | /* zero the BSS, BRK and stack areas */ |
792 | memset((void*)(datapos + data_len), 0, bss_len + | 792 | memset((void*)(datapos + data_len), 0, bss_len + |
793 | (memp + ksize((void *) memp) - stack_len - /* end brk */ | 793 | (memp + kobjsize((void *) memp) - stack_len - /* end brk */ |
794 | libinfo->lib_list[id].start_brk) + /* start brk */ | 794 | libinfo->lib_list[id].start_brk) + /* start brk */ |
795 | stack_len); | 795 | stack_len); |
796 | 796 | ||
diff --git a/fs/block_dev.c b/fs/block_dev.c index 7d822fae7765..470c10ceb0fb 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kmod.h> | 12 | #include <linux/kmod.h> |
13 | #include <linux/major.h> | 13 | #include <linux/major.h> |
14 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
15 | #include <linux/device_cgroup.h> | ||
15 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
16 | #include <linux/blkdev.h> | 17 | #include <linux/blkdev.h> |
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
@@ -928,9 +929,14 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part) | |||
928 | { | 929 | { |
929 | struct module *owner = NULL; | 930 | struct module *owner = NULL; |
930 | struct gendisk *disk; | 931 | struct gendisk *disk; |
931 | int ret = -ENXIO; | 932 | int ret; |
932 | int part; | 933 | int part; |
933 | 934 | ||
935 | ret = devcgroup_inode_permission(bdev->bd_inode, file->f_mode); | ||
936 | if (ret != 0) | ||
937 | return ret; | ||
938 | |||
939 | ret = -ENXIO; | ||
934 | file->f_mapping = bdev->bd_inode->i_mapping; | 940 | file->f_mapping = bdev->bd_inode->i_mapping; |
935 | lock_kernel(); | 941 | lock_kernel(); |
936 | disk = get_gendisk(bdev->bd_dev, &part); | 942 | disk = get_gendisk(bdev->bd_dev, &part); |
diff --git a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS index 8848e4dfa026..9c136d7803d9 100644 --- a/fs/cifs/AUTHORS +++ b/fs/cifs/AUTHORS | |||
@@ -36,6 +36,7 @@ Miklos Szeredi | |||
36 | Kazeon team for various fixes especially for 2.4 version. | 36 | Kazeon team for various fixes especially for 2.4 version. |
37 | Asser Ferno (Change Notify support) | 37 | Asser Ferno (Change Notify support) |
38 | Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup | 38 | Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup |
39 | Igor Mammedov (DFS support) | ||
39 | 40 | ||
40 | Test case and Bug Report contributors | 41 | Test case and Bug Report contributors |
41 | ------------------------------------- | 42 | ------------------------------------- |
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 8355e918fddf..1f3465201fdf 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -1,5 +1,12 @@ | |||
1 | Version 1.53 | 1 | Version 1.53 |
2 | ------------ | 2 | ------------ |
3 | DFS support added (Microsoft Distributed File System client support needed | ||
4 | for referrals which enable a hierarchical name space among servers). | ||
5 | Disable temporary caching of mode bits to servers which do not support | ||
6 | storing of mode (e.g. Windows servers, when client mounts without cifsacl | ||
7 | mount option) and add new "dynperm" mount option to enable temporary caching | ||
8 | of mode (enable old behavior). Fix hang on mount caused when server crashes | ||
9 | tcp session during negotiate protocol. | ||
3 | 10 | ||
4 | Version 1.52 | 11 | Version 1.52 |
5 | ------------ | 12 | ------------ |
@@ -12,7 +19,8 @@ Add ability to modify cifs acls for handling chmod (when mounted with | |||
12 | cifsacl flag). Fix prefixpath path separator so we can handle mounts | 19 | cifsacl flag). Fix prefixpath path separator so we can handle mounts |
13 | with prefixpaths longer than one directory (one path component) when | 20 | with prefixpaths longer than one directory (one path component) when |
14 | mounted to Windows servers. Fix slow file open when cifsacl | 21 | mounted to Windows servers. Fix slow file open when cifsacl |
15 | enabled. | 22 | enabled. Fix memory leak in FindNext when the SMB call returns -EBADF. |
23 | |||
16 | 24 | ||
17 | Version 1.51 | 25 | Version 1.51 |
18 | ------------ | 26 | ------------ |
diff --git a/fs/cifs/README b/fs/cifs/README index 621aa1a85971..2bd6fe556f88 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -483,6 +483,11 @@ A partial list of the supported mount options follows: | |||
483 | sign Must use packet signing (helps avoid unwanted data modification | 483 | sign Must use packet signing (helps avoid unwanted data modification |
484 | by intermediate systems in the route). Note that signing | 484 | by intermediate systems in the route). Note that signing |
485 | does not work with lanman or plaintext authentication. | 485 | does not work with lanman or plaintext authentication. |
486 | seal Must seal (encrypt) all data on this mounted share before | ||
487 | sending on the network. Requires support for Unix Extensions. | ||
488 | Note that this differs from the sign mount option in that it | ||
489 | causes encryption of data sent over this mounted share but other | ||
490 | shares mounted to the same server are unaffected. | ||
486 | sec Security mode. Allowed values are: | 491 | sec Security mode. Allowed values are: |
487 | none attempt to connection as a null user (no name) | 492 | none attempt to connection as a null user (no name) |
488 | krb5 Use Kerberos version 5 authentication | 493 | krb5 Use Kerberos version 5 authentication |
diff --git a/fs/cifs/TODO b/fs/cifs/TODO index 92c9feac440f..5aff46c61e52 100644 --- a/fs/cifs/TODO +++ b/fs/cifs/TODO | |||
@@ -1,4 +1,4 @@ | |||
1 | Version 1.52 January 3, 2008 | 1 | Version 1.53 May 20, 2008 |
2 | 2 | ||
3 | A Partial List of Missing Features | 3 | A Partial List of Missing Features |
4 | ================================== | 4 | ================================== |
@@ -20,20 +20,21 @@ d) Cleanup now unneeded SessSetup code in | |||
20 | fs/cifs/connect.c and add back in NTLMSSP code if any servers | 20 | fs/cifs/connect.c and add back in NTLMSSP code if any servers |
21 | need it | 21 | need it |
22 | 22 | ||
23 | e) ms-dfs and ms-dfs host name resolution cleanup | 23 | e) fix NTLMv2 signing when two mounts with different users to same |
24 | |||
25 | f) fix NTLMv2 signing when two mounts with different users to same | ||
26 | server. | 24 | server. |
27 | 25 | ||
28 | g) Directory entry caching relies on a 1 second timer, rather than | 26 | f) Directory entry caching relies on a 1 second timer, rather than |
29 | using FindNotify or equivalent. - (started) | 27 | using FindNotify or equivalent. - (started) |
30 | 28 | ||
31 | h) quota support (needs minor kernel change since quota calls | 29 | g) quota support (needs minor kernel change since quota calls |
32 | to make it to network filesystems or deviceless filesystems) | 30 | to make it to network filesystems or deviceless filesystems) |
33 | 31 | ||
34 | i) investigate sync behavior (including syncpage) and check | 32 | h) investigate sync behavior (including syncpage) and check |
35 | for proper behavior of intr/nointr | 33 | for proper behavior of intr/nointr |
36 | 34 | ||
35 | i) improve support for very old servers (OS/2 and Win9x for example) | ||
36 | Including support for changing the time remotely (utimes command). | ||
37 | |||
37 | j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the | 38 | j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the |
38 | extra copy in/out of the socket buffers in some cases. | 39 | extra copy in/out of the socket buffers in some cases. |
39 | 40 | ||
diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c index cb52cbbe45ff..f58e41d3ba48 100644 --- a/fs/cifs/asn1.c +++ b/fs/cifs/asn1.c | |||
@@ -186,6 +186,11 @@ asn1_length_decode(struct asn1_ctx *ctx, unsigned int *def, unsigned int *len) | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | } | 188 | } |
189 | |||
190 | /* don't trust len bigger than ctx buffer */ | ||
191 | if (*len > ctx->end - ctx->pointer) | ||
192 | return 0; | ||
193 | |||
189 | return 1; | 194 | return 1; |
190 | } | 195 | } |
191 | 196 | ||
@@ -203,6 +208,10 @@ asn1_header_decode(struct asn1_ctx *ctx, | |||
203 | if (!asn1_length_decode(ctx, &def, &len)) | 208 | if (!asn1_length_decode(ctx, &def, &len)) |
204 | return 0; | 209 | return 0; |
205 | 210 | ||
211 | /* primitive shall be definite, indefinite shall be constructed */ | ||
212 | if (*con == ASN1_PRI && !def) | ||
213 | return 0; | ||
214 | |||
206 | if (def) | 215 | if (def) |
207 | *eoc = ctx->pointer + len; | 216 | *eoc = ctx->pointer + len; |
208 | else | 217 | else |
@@ -389,6 +398,11 @@ asn1_oid_decode(struct asn1_ctx *ctx, | |||
389 | unsigned long *optr; | 398 | unsigned long *optr; |
390 | 399 | ||
391 | size = eoc - ctx->pointer + 1; | 400 | size = eoc - ctx->pointer + 1; |
401 | |||
402 | /* first subid actually encodes first two subids */ | ||
403 | if (size < 2 || size > ULONG_MAX/sizeof(unsigned long)) | ||
404 | return 0; | ||
405 | |||
392 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); | 406 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); |
393 | if (*oid == NULL) | 407 | if (*oid == NULL) |
394 | return 0; | 408 | return 0; |
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index f6fdecf6598c..d82374c9e329 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -219,53 +219,6 @@ static struct vfsmount *cifs_dfs_do_refmount(const struct vfsmount *mnt_parent, | |||
219 | 219 | ||
220 | } | 220 | } |
221 | 221 | ||
222 | static char *build_full_dfs_path_from_dentry(struct dentry *dentry) | ||
223 | { | ||
224 | char *full_path = NULL; | ||
225 | char *search_path; | ||
226 | char *tmp_path; | ||
227 | size_t l_max_len; | ||
228 | struct cifs_sb_info *cifs_sb; | ||
229 | |||
230 | if (dentry->d_inode == NULL) | ||
231 | return NULL; | ||
232 | |||
233 | cifs_sb = CIFS_SB(dentry->d_inode->i_sb); | ||
234 | |||
235 | if (cifs_sb->tcon == NULL) | ||
236 | return NULL; | ||
237 | |||
238 | search_path = build_path_from_dentry(dentry); | ||
239 | if (search_path == NULL) | ||
240 | return NULL; | ||
241 | |||
242 | if (cifs_sb->tcon->Flags & SMB_SHARE_IS_IN_DFS) { | ||
243 | int i; | ||
244 | /* we should use full path name for correct working with DFS */ | ||
245 | l_max_len = strnlen(cifs_sb->tcon->treeName, MAX_TREE_SIZE+1) + | ||
246 | strnlen(search_path, MAX_PATHCONF) + 1; | ||
247 | tmp_path = kmalloc(l_max_len, GFP_KERNEL); | ||
248 | if (tmp_path == NULL) { | ||
249 | kfree(search_path); | ||
250 | return NULL; | ||
251 | } | ||
252 | strncpy(tmp_path, cifs_sb->tcon->treeName, l_max_len); | ||
253 | tmp_path[l_max_len-1] = 0; | ||
254 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) | ||
255 | for (i = 0; i < l_max_len; i++) { | ||
256 | if (tmp_path[i] == '\\') | ||
257 | tmp_path[i] = '/'; | ||
258 | } | ||
259 | strncat(tmp_path, search_path, l_max_len - strlen(tmp_path)); | ||
260 | |||
261 | full_path = tmp_path; | ||
262 | kfree(search_path); | ||
263 | } else { | ||
264 | full_path = search_path; | ||
265 | } | ||
266 | return full_path; | ||
267 | } | ||
268 | |||
269 | static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, | 222 | static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, |
270 | struct list_head *mntlist) | 223 | struct list_head *mntlist) |
271 | { | 224 | { |
@@ -333,7 +286,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
333 | goto out_err; | 286 | goto out_err; |
334 | } | 287 | } |
335 | 288 | ||
336 | full_path = build_full_dfs_path_from_dentry(dentry); | 289 | full_path = build_path_from_dentry(dentry); |
337 | if (full_path == NULL) { | 290 | if (full_path == NULL) { |
338 | rc = -ENOMEM; | 291 | rc = -ENOMEM; |
339 | goto out_err; | 292 | goto out_err; |
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index 8ad2330ba061..877c85409f1f 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */ | 30 | #define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */ |
31 | #define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */ | 31 | #define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */ |
32 | #define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */ | 32 | #define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */ |
33 | #define CIFS_MOUNT_DYNPERM 0x1000 /* allow in-memory only mode setting */ | ||
33 | 34 | ||
34 | struct cifs_sb_info { | 35 | struct cifs_sb_info { |
35 | struct cifsTconInfo *tcon; /* primary mount */ | 36 | struct cifsTconInfo *tcon; /* primary mount */ |
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 6653e29637a7..7013aaff6aed 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -119,6 +119,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo) | |||
119 | dp = description + strlen(description); | 119 | dp = description + strlen(description); |
120 | sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); | 120 | sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); |
121 | 121 | ||
122 | dp = description + strlen(description); | ||
123 | sprintf(dp, ";user=%s", sesInfo->userName); | ||
124 | |||
122 | cFYI(1, ("key description = %s", description)); | 125 | cFYI(1, ("key description = %s", description)); |
123 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); | 126 | spnego_key = request_key(&cifs_spnego_key_type, description, ""); |
124 | 127 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 427a7c695896..86b4d5f405ae 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/cifsfs.c | 2 | * fs/cifs/cifsfs.c |
3 | * | 3 | * |
4 | * Copyright (C) International Business Machines Corp., 2002,2007 | 4 | * Copyright (C) International Business Machines Corp., 2002,2008 |
5 | * Author(s): Steve French (sfrench@us.ibm.com) | 5 | * Author(s): Steve French (sfrench@us.ibm.com) |
6 | * | 6 | * |
7 | * Common Internet FileSystem (CIFS) client | 7 | * Common Internet FileSystem (CIFS) client |
@@ -97,9 +97,6 @@ cifs_read_super(struct super_block *sb, void *data, | |||
97 | { | 97 | { |
98 | struct inode *inode; | 98 | struct inode *inode; |
99 | struct cifs_sb_info *cifs_sb; | 99 | struct cifs_sb_info *cifs_sb; |
100 | #ifdef CONFIG_CIFS_DFS_UPCALL | ||
101 | int len; | ||
102 | #endif | ||
103 | int rc = 0; | 100 | int rc = 0; |
104 | 101 | ||
105 | /* BB should we make this contingent on mount parm? */ | 102 | /* BB should we make this contingent on mount parm? */ |
@@ -117,15 +114,17 @@ cifs_read_super(struct super_block *sb, void *data, | |||
117 | * complex operation (mount), and in case of fail | 114 | * complex operation (mount), and in case of fail |
118 | * just exit instead of doing mount and attempting | 115 | * just exit instead of doing mount and attempting |
119 | * undo it if this copy fails?*/ | 116 | * undo it if this copy fails?*/ |
120 | len = strlen(data); | 117 | if (data) { |
121 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); | 118 | int len = strlen(data); |
122 | if (cifs_sb->mountdata == NULL) { | 119 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); |
123 | kfree(sb->s_fs_info); | 120 | if (cifs_sb->mountdata == NULL) { |
124 | sb->s_fs_info = NULL; | 121 | kfree(sb->s_fs_info); |
125 | return -ENOMEM; | 122 | sb->s_fs_info = NULL; |
123 | return -ENOMEM; | ||
124 | } | ||
125 | strncpy(cifs_sb->mountdata, data, len + 1); | ||
126 | cifs_sb->mountdata[len] = '\0'; | ||
126 | } | 127 | } |
127 | strncpy(cifs_sb->mountdata, data, len + 1); | ||
128 | cifs_sb->mountdata[len] = '\0'; | ||
129 | #endif | 128 | #endif |
130 | 129 | ||
131 | rc = cifs_mount(sb, cifs_sb, data, devname); | 130 | rc = cifs_mount(sb, cifs_sb, data, devname); |
@@ -353,9 +352,41 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m) | |||
353 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || | 352 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || |
354 | !(cifs_sb->tcon->unix_ext)) | 353 | !(cifs_sb->tcon->unix_ext)) |
355 | seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); | 354 | seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); |
355 | if (!cifs_sb->tcon->unix_ext) { | ||
356 | seq_printf(s, ",file_mode=0%o,dir_mode=0%o", | ||
357 | cifs_sb->mnt_file_mode, | ||
358 | cifs_sb->mnt_dir_mode); | ||
359 | } | ||
360 | if (cifs_sb->tcon->seal) | ||
361 | seq_printf(s, ",seal"); | ||
362 | if (cifs_sb->tcon->nocase) | ||
363 | seq_printf(s, ",nocase"); | ||
364 | if (cifs_sb->tcon->retry) | ||
365 | seq_printf(s, ",hard"); | ||
356 | } | 366 | } |
357 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) | 367 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) |
358 | seq_printf(s, ",posixpaths"); | 368 | seq_printf(s, ",posixpaths"); |
369 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) | ||
370 | seq_printf(s, ",setuids"); | ||
371 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) | ||
372 | seq_printf(s, ",serverino"); | ||
373 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) | ||
374 | seq_printf(s, ",directio"); | ||
375 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | ||
376 | seq_printf(s, ",nouser_xattr"); | ||
377 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR) | ||
378 | seq_printf(s, ",mapchars"); | ||
379 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) | ||
380 | seq_printf(s, ",sfu"); | ||
381 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL) | ||
382 | seq_printf(s, ",nobrl"); | ||
383 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) | ||
384 | seq_printf(s, ",cifsacl"); | ||
385 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) | ||
386 | seq_printf(s, ",dynperm"); | ||
387 | if (m->mnt_sb->s_flags & MS_POSIXACL) | ||
388 | seq_printf(s, ",acl"); | ||
389 | |||
359 | seq_printf(s, ",rsize=%d", cifs_sb->rsize); | 390 | seq_printf(s, ",rsize=%d", cifs_sb->rsize); |
360 | seq_printf(s, ",wsize=%d", cifs_sb->wsize); | 391 | seq_printf(s, ",wsize=%d", cifs_sb->wsize); |
361 | } | 392 | } |
@@ -657,7 +688,7 @@ const struct file_operations cifs_file_ops = { | |||
657 | .splice_read = generic_file_splice_read, | 688 | .splice_read = generic_file_splice_read, |
658 | .llseek = cifs_llseek, | 689 | .llseek = cifs_llseek, |
659 | #ifdef CONFIG_CIFS_POSIX | 690 | #ifdef CONFIG_CIFS_POSIX |
660 | .ioctl = cifs_ioctl, | 691 | .unlocked_ioctl = cifs_ioctl, |
661 | #endif /* CONFIG_CIFS_POSIX */ | 692 | #endif /* CONFIG_CIFS_POSIX */ |
662 | 693 | ||
663 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 694 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -677,7 +708,7 @@ const struct file_operations cifs_file_direct_ops = { | |||
677 | .flush = cifs_flush, | 708 | .flush = cifs_flush, |
678 | .splice_read = generic_file_splice_read, | 709 | .splice_read = generic_file_splice_read, |
679 | #ifdef CONFIG_CIFS_POSIX | 710 | #ifdef CONFIG_CIFS_POSIX |
680 | .ioctl = cifs_ioctl, | 711 | .unlocked_ioctl = cifs_ioctl, |
681 | #endif /* CONFIG_CIFS_POSIX */ | 712 | #endif /* CONFIG_CIFS_POSIX */ |
682 | .llseek = cifs_llseek, | 713 | .llseek = cifs_llseek, |
683 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 714 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -697,7 +728,7 @@ const struct file_operations cifs_file_nobrl_ops = { | |||
697 | .splice_read = generic_file_splice_read, | 728 | .splice_read = generic_file_splice_read, |
698 | .llseek = cifs_llseek, | 729 | .llseek = cifs_llseek, |
699 | #ifdef CONFIG_CIFS_POSIX | 730 | #ifdef CONFIG_CIFS_POSIX |
700 | .ioctl = cifs_ioctl, | 731 | .unlocked_ioctl = cifs_ioctl, |
701 | #endif /* CONFIG_CIFS_POSIX */ | 732 | #endif /* CONFIG_CIFS_POSIX */ |
702 | 733 | ||
703 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 734 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -716,7 +747,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { | |||
716 | .flush = cifs_flush, | 747 | .flush = cifs_flush, |
717 | .splice_read = generic_file_splice_read, | 748 | .splice_read = generic_file_splice_read, |
718 | #ifdef CONFIG_CIFS_POSIX | 749 | #ifdef CONFIG_CIFS_POSIX |
719 | .ioctl = cifs_ioctl, | 750 | .unlocked_ioctl = cifs_ioctl, |
720 | #endif /* CONFIG_CIFS_POSIX */ | 751 | #endif /* CONFIG_CIFS_POSIX */ |
721 | .llseek = cifs_llseek, | 752 | .llseek = cifs_llseek, |
722 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 753 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
@@ -731,7 +762,7 @@ const struct file_operations cifs_dir_ops = { | |||
731 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 762 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
732 | .dir_notify = cifs_dir_notify, | 763 | .dir_notify = cifs_dir_notify, |
733 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ | 764 | #endif /* CONFIG_CIFS_EXPERIMENTAL */ |
734 | .ioctl = cifs_ioctl, | 765 | .unlocked_ioctl = cifs_ioctl, |
735 | }; | 766 | }; |
736 | 767 | ||
737 | static void | 768 | static void |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index cd1301a09b3b..25a6cbd15529 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -95,8 +95,7 @@ extern int cifs_setxattr(struct dentry *, const char *, const void *, | |||
95 | size_t, int); | 95 | size_t, int); |
96 | extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); | 96 | extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); |
97 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); | 97 | extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); |
98 | extern int cifs_ioctl(struct inode *inode, struct file *filep, | 98 | extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); |
99 | unsigned int command, unsigned long arg); | ||
100 | 99 | ||
101 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 100 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
102 | extern const struct export_operations cifs_export_ops; | 101 | extern const struct export_operations cifs_export_ops; |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index b7d9f698e63e..9cfcf326ead3 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -281,6 +281,7 @@ struct cifsTconInfo { | |||
281 | bool ipc:1; /* set if connection to IPC$ eg for RPC/PIPES */ | 281 | bool ipc:1; /* set if connection to IPC$ eg for RPC/PIPES */ |
282 | bool retry:1; | 282 | bool retry:1; |
283 | bool nocase:1; | 283 | bool nocase:1; |
284 | bool seal:1; /* transport encryption for this mounted share */ | ||
284 | bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol | 285 | bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol |
285 | for this mount even if server would support */ | 286 | for this mount even if server would support */ |
286 | /* BB add field for back pointer to sb struct(s)? */ | 287 | /* BB add field for back pointer to sb struct(s)? */ |
@@ -332,7 +333,6 @@ struct cifsFileInfo { | |||
332 | bool messageMode:1; /* for pipes: message vs byte mode */ | 333 | bool messageMode:1; /* for pipes: message vs byte mode */ |
333 | atomic_t wrtPending; /* handle in use - defer close */ | 334 | atomic_t wrtPending; /* handle in use - defer close */ |
334 | struct semaphore fh_sem; /* prevents reopen race after dead ses*/ | 335 | struct semaphore fh_sem; /* prevents reopen race after dead ses*/ |
335 | char *search_resume_name; /* BB removeme BB */ | ||
336 | struct cifs_search_info srch_inf; | 336 | struct cifs_search_info srch_inf; |
337 | }; | 337 | }; |
338 | 338 | ||
@@ -625,7 +625,7 @@ GLOBAL_EXTERN atomic_t tcpSesAllocCount; | |||
625 | GLOBAL_EXTERN atomic_t tcpSesReconnectCount; | 625 | GLOBAL_EXTERN atomic_t tcpSesReconnectCount; |
626 | GLOBAL_EXTERN atomic_t tconInfoReconnectCount; | 626 | GLOBAL_EXTERN atomic_t tconInfoReconnectCount; |
627 | 627 | ||
628 | /* Various Debug counters to remove someday (BB) */ | 628 | /* Various Debug counters */ |
629 | GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */ | 629 | GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */ |
630 | #ifdef CONFIG_CIFS_STATS2 | 630 | #ifdef CONFIG_CIFS_STATS2 |
631 | GLOBAL_EXTERN atomic_t totBufAllocCount; /* total allocated over all time */ | 631 | GLOBAL_EXTERN atomic_t totBufAllocCount; /* total allocated over all time */ |
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index c43bf4b7a556..0f327c224da3 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h | |||
@@ -79,6 +79,19 @@ | |||
79 | #define TRANS2_GET_DFS_REFERRAL 0x10 | 79 | #define TRANS2_GET_DFS_REFERRAL 0x10 |
80 | #define TRANS2_REPORT_DFS_INCOSISTENCY 0x11 | 80 | #define TRANS2_REPORT_DFS_INCOSISTENCY 0x11 |
81 | 81 | ||
82 | /* SMB Transact (Named Pipe) subcommand codes */ | ||
83 | #define TRANS_SET_NMPIPE_STATE 0x0001 | ||
84 | #define TRANS_RAW_READ_NMPIPE 0x0011 | ||
85 | #define TRANS_QUERY_NMPIPE_STATE 0x0021 | ||
86 | #define TRANS_QUERY_NMPIPE_INFO 0x0022 | ||
87 | #define TRANS_PEEK_NMPIPE 0x0023 | ||
88 | #define TRANS_TRANSACT_NMPIPE 0x0026 | ||
89 | #define TRANS_RAW_WRITE_NMPIPE 0x0031 | ||
90 | #define TRANS_READ_NMPIPE 0x0036 | ||
91 | #define TRANS_WRITE_NMPIPE 0x0037 | ||
92 | #define TRANS_WAIT_NMPIPE 0x0053 | ||
93 | #define TRANS_CALL_NMPIPE 0x0054 | ||
94 | |||
82 | /* NT Transact subcommand codes */ | 95 | /* NT Transact subcommand codes */ |
83 | #define NT_TRANSACT_CREATE 0x01 | 96 | #define NT_TRANSACT_CREATE 0x01 |
84 | #define NT_TRANSACT_IOCTL 0x02 | 97 | #define NT_TRANSACT_IOCTL 0x02 |
@@ -328,12 +341,13 @@ | |||
328 | #define CREATE_COMPLETE_IF_OPLK 0x00000100 /* should be zero */ | 341 | #define CREATE_COMPLETE_IF_OPLK 0x00000100 /* should be zero */ |
329 | #define CREATE_NO_EA_KNOWLEDGE 0x00000200 | 342 | #define CREATE_NO_EA_KNOWLEDGE 0x00000200 |
330 | #define CREATE_EIGHT_DOT_THREE 0x00000400 /* doc says this is obsolete | 343 | #define CREATE_EIGHT_DOT_THREE 0x00000400 /* doc says this is obsolete |
331 | open for recovery flag - should | 344 | "open for recovery" flag - should |
332 | be zero */ | 345 | be zero in any case */ |
346 | #define CREATE_OPEN_FOR_RECOVERY 0x00000400 | ||
333 | #define CREATE_RANDOM_ACCESS 0x00000800 | 347 | #define CREATE_RANDOM_ACCESS 0x00000800 |
334 | #define CREATE_DELETE_ON_CLOSE 0x00001000 | 348 | #define CREATE_DELETE_ON_CLOSE 0x00001000 |
335 | #define CREATE_OPEN_BY_ID 0x00002000 | 349 | #define CREATE_OPEN_BY_ID 0x00002000 |
336 | #define CREATE_OPEN_BACKUP_INTN 0x00004000 | 350 | #define CREATE_OPEN_BACKUP_INTENT 0x00004000 |
337 | #define CREATE_NO_COMPRESSION 0x00008000 | 351 | #define CREATE_NO_COMPRESSION 0x00008000 |
338 | #define CREATE_RESERVE_OPFILTER 0x00100000 /* should be zero */ | 352 | #define CREATE_RESERVE_OPFILTER 0x00100000 /* should be zero */ |
339 | #define OPEN_REPARSE_POINT 0x00200000 | 353 | #define OPEN_REPARSE_POINT 0x00200000 |
@@ -722,7 +736,6 @@ typedef struct smb_com_tconx_rsp_ext { | |||
722 | #define SMB_CSC_CACHE_AUTO_REINT 0x0004 | 736 | #define SMB_CSC_CACHE_AUTO_REINT 0x0004 |
723 | #define SMB_CSC_CACHE_VDO 0x0008 | 737 | #define SMB_CSC_CACHE_VDO 0x0008 |
724 | #define SMB_CSC_NO_CACHING 0x000C | 738 | #define SMB_CSC_NO_CACHING 0x000C |
725 | |||
726 | #define SMB_UNIQUE_FILE_NAME 0x0010 | 739 | #define SMB_UNIQUE_FILE_NAME 0x0010 |
727 | #define SMB_EXTENDED_SIGNATURES 0x0020 | 740 | #define SMB_EXTENDED_SIGNATURES 0x0020 |
728 | 741 | ||
@@ -806,7 +819,7 @@ typedef struct smb_com_findclose_req { | |||
806 | #define ICOUNT_MASK 0x00FF | 819 | #define ICOUNT_MASK 0x00FF |
807 | #define PIPE_READ_MODE 0x0100 | 820 | #define PIPE_READ_MODE 0x0100 |
808 | #define NAMED_PIPE_TYPE 0x0400 | 821 | #define NAMED_PIPE_TYPE 0x0400 |
809 | #define PIPE_END_POINT 0x0800 | 822 | #define PIPE_END_POINT 0x4000 |
810 | #define BLOCKING_NAMED_PIPE 0x8000 | 823 | #define BLOCKING_NAMED_PIPE 0x8000 |
811 | 824 | ||
812 | typedef struct smb_com_open_req { /* also handles create */ | 825 | typedef struct smb_com_open_req { /* also handles create */ |
@@ -1904,19 +1917,26 @@ typedef struct smb_com_transaction2_get_dfs_refer_req { | |||
1904 | char RequestFileName[1]; | 1917 | char RequestFileName[1]; |
1905 | } __attribute__((packed)) TRANSACTION2_GET_DFS_REFER_REQ; | 1918 | } __attribute__((packed)) TRANSACTION2_GET_DFS_REFER_REQ; |
1906 | 1919 | ||
1920 | #define DFS_VERSION cpu_to_le16(0x0003) | ||
1921 | |||
1922 | /* DFS server target type */ | ||
1923 | #define DFS_TYPE_LINK 0x0000 /* also for sysvol targets */ | ||
1924 | #define DFS_TYPE_ROOT 0x0001 | ||
1925 | |||
1926 | /* Referral Entry Flags */ | ||
1927 | #define DFS_NAME_LIST_REF 0x0200 | ||
1928 | |||
1907 | typedef struct dfs_referral_level_3 { | 1929 | typedef struct dfs_referral_level_3 { |
1908 | __le16 VersionNumber; | 1930 | __le16 VersionNumber; |
1909 | __le16 ReferralSize; | 1931 | __le16 Size; |
1910 | __le16 ServerType; /* 0x0001 = CIFS server */ | 1932 | __le16 ServerType; /* 0x0001 = root targets; 0x0000 = link targets */ |
1911 | __le16 ReferralFlags; /* or proximity - not clear which since it is | 1933 | __le16 ReferralEntryFlags; /* 0x0200 bit set only for domain |
1912 | always set to zero - SNIA spec says 0x01 | 1934 | or DC referral responce */ |
1913 | means strip off PathConsumed chars before | 1935 | __le32 TimeToLive; |
1914 | submitting RequestFileName to remote node */ | ||
1915 | __le16 TimeToLive; | ||
1916 | __le16 Proximity; | ||
1917 | __le16 DfsPathOffset; | 1936 | __le16 DfsPathOffset; |
1918 | __le16 DfsAlternatePathOffset; | 1937 | __le16 DfsAlternatePathOffset; |
1919 | __le16 NetworkAddressOffset; | 1938 | __le16 NetworkAddressOffset; /* offset of the link target */ |
1939 | __le16 ServiceSiteGuid; | ||
1920 | } __attribute__((packed)) REFERRAL3; | 1940 | } __attribute__((packed)) REFERRAL3; |
1921 | 1941 | ||
1922 | typedef struct smb_com_transaction_get_dfs_refer_rsp { | 1942 | typedef struct smb_com_transaction_get_dfs_refer_rsp { |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index d481f6c5a2be..b9f5e935f821 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -93,7 +93,7 @@ extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time); | |||
93 | 93 | ||
94 | extern int cifs_get_inode_info(struct inode **pinode, | 94 | extern int cifs_get_inode_info(struct inode **pinode, |
95 | const unsigned char *search_path, | 95 | const unsigned char *search_path, |
96 | FILE_ALL_INFO * pfile_info, | 96 | FILE_ALL_INFO *pfile_info, |
97 | struct super_block *sb, int xid, const __u16 *pfid); | 97 | struct super_block *sb, int xid, const __u16 *pfid); |
98 | extern int cifs_get_inode_info_unix(struct inode **pinode, | 98 | extern int cifs_get_inode_info_unix(struct inode **pinode, |
99 | const unsigned char *search_path, | 99 | const unsigned char *search_path, |
@@ -130,7 +130,7 @@ extern int CIFSFindClose(const int, struct cifsTconInfo *tcon, | |||
130 | 130 | ||
131 | extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, | 131 | extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, |
132 | const unsigned char *searchName, | 132 | const unsigned char *searchName, |
133 | FILE_ALL_INFO * findData, | 133 | FILE_ALL_INFO *findData, |
134 | int legacy /* whether to use old info level */, | 134 | int legacy /* whether to use old info level */, |
135 | const struct nls_table *nls_codepage, int remap); | 135 | const struct nls_table *nls_codepage, int remap); |
136 | extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, | 136 | extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, |
@@ -141,18 +141,15 @@ extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, | |||
141 | extern int CIFSSMBUnixQPathInfo(const int xid, | 141 | extern int CIFSSMBUnixQPathInfo(const int xid, |
142 | struct cifsTconInfo *tcon, | 142 | struct cifsTconInfo *tcon, |
143 | const unsigned char *searchName, | 143 | const unsigned char *searchName, |
144 | FILE_UNIX_BASIC_INFO * pFindData, | 144 | FILE_UNIX_BASIC_INFO *pFindData, |
145 | const struct nls_table *nls_codepage, int remap); | 145 | const struct nls_table *nls_codepage, int remap); |
146 | 146 | ||
147 | extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, | 147 | extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, |
148 | const unsigned char *searchName, | 148 | const unsigned char *searchName, |
149 | unsigned char **targetUNCs, | 149 | struct dfs_info3_param **target_nodes, |
150 | unsigned int *number_of_UNC_in_array, | 150 | unsigned int *number_of_nodes_in_array, |
151 | const struct nls_table *nls_codepage, int remap); | 151 | const struct nls_table *nls_codepage, int remap); |
152 | 152 | ||
153 | extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo, | ||
154 | const char *old_path, | ||
155 | const struct nls_table *nls_codepage, int remap); | ||
156 | extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, | 153 | extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, |
157 | const char *old_path, | 154 | const char *old_path, |
158 | const struct nls_table *nls_codepage, | 155 | const struct nls_table *nls_codepage, |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 95fbba4ea7d4..4511b708f0f3 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -81,6 +81,40 @@ static struct { | |||
81 | #endif /* CONFIG_CIFS_WEAK_PW_HASH */ | 81 | #endif /* CONFIG_CIFS_WEAK_PW_HASH */ |
82 | #endif /* CIFS_POSIX */ | 82 | #endif /* CIFS_POSIX */ |
83 | 83 | ||
84 | /* Allocates buffer into dst and copies smb string from src to it. | ||
85 | * caller is responsible for freeing dst if function returned 0. | ||
86 | * returns: | ||
87 | * on success - 0 | ||
88 | * on failure - errno | ||
89 | */ | ||
90 | static int | ||
91 | cifs_strncpy_to_host(char **dst, const char *src, const int maxlen, | ||
92 | const bool is_unicode, const struct nls_table *nls_codepage) | ||
93 | { | ||
94 | int plen; | ||
95 | |||
96 | if (is_unicode) { | ||
97 | plen = UniStrnlen((wchar_t *)src, maxlen); | ||
98 | *dst = kmalloc(plen + 2, GFP_KERNEL); | ||
99 | if (!*dst) | ||
100 | goto cifs_strncpy_to_host_ErrExit; | ||
101 | cifs_strfromUCS_le(*dst, (__le16 *)src, plen, nls_codepage); | ||
102 | } else { | ||
103 | plen = strnlen(src, maxlen); | ||
104 | *dst = kmalloc(plen + 2, GFP_KERNEL); | ||
105 | if (!*dst) | ||
106 | goto cifs_strncpy_to_host_ErrExit; | ||
107 | strncpy(*dst, src, plen); | ||
108 | } | ||
109 | (*dst)[plen] = 0; | ||
110 | (*dst)[plen+1] = 0; /* harmless for ASCII case, needed for Unicode */ | ||
111 | return 0; | ||
112 | |||
113 | cifs_strncpy_to_host_ErrExit: | ||
114 | cERROR(1, ("Failed to allocate buffer for string\n")); | ||
115 | return -ENOMEM; | ||
116 | } | ||
117 | |||
84 | 118 | ||
85 | /* Mark as invalid, all open files on tree connections since they | 119 | /* Mark as invalid, all open files on tree connections since they |
86 | were closed when session to server was lost */ | 120 | were closed when session to server was lost */ |
@@ -1166,6 +1200,20 @@ static __u16 convert_disposition(int disposition) | |||
1166 | return ofun; | 1200 | return ofun; |
1167 | } | 1201 | } |
1168 | 1202 | ||
1203 | static int | ||
1204 | access_flags_to_smbopen_mode(const int access_flags) | ||
1205 | { | ||
1206 | int masked_flags = access_flags & (GENERIC_READ | GENERIC_WRITE); | ||
1207 | |||
1208 | if (masked_flags == GENERIC_READ) | ||
1209 | return SMBOPEN_READ; | ||
1210 | else if (masked_flags == GENERIC_WRITE) | ||
1211 | return SMBOPEN_WRITE; | ||
1212 | |||
1213 | /* just go for read/write */ | ||
1214 | return SMBOPEN_READWRITE; | ||
1215 | } | ||
1216 | |||
1169 | int | 1217 | int |
1170 | SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, | 1218 | SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, |
1171 | const char *fileName, const int openDisposition, | 1219 | const char *fileName, const int openDisposition, |
@@ -1207,13 +1255,7 @@ OldOpenRetry: | |||
1207 | pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); | 1255 | pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); |
1208 | 1256 | ||
1209 | pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); | 1257 | pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); |
1210 | /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ | 1258 | pSMB->Mode = cpu_to_le16(access_flags_to_smbopen_mode(access_flags)); |
1211 | /* 0 = read | ||
1212 | 1 = write | ||
1213 | 2 = rw | ||
1214 | 3 = execute | ||
1215 | */ | ||
1216 | pSMB->Mode = cpu_to_le16(2); | ||
1217 | pSMB->Mode |= cpu_to_le16(0x40); /* deny none */ | 1259 | pSMB->Mode |= cpu_to_le16(0x40); /* deny none */ |
1218 | /* set file as system file if special file such | 1260 | /* set file as system file if special file such |
1219 | as fifo and server expecting SFU style and | 1261 | as fifo and server expecting SFU style and |
@@ -1247,7 +1289,7 @@ OldOpenRetry: | |||
1247 | } else { | 1289 | } else { |
1248 | /* BB verify if wct == 15 */ | 1290 | /* BB verify if wct == 15 */ |
1249 | 1291 | ||
1250 | /* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field BB */ | 1292 | /* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field*/ |
1251 | 1293 | ||
1252 | *netfid = pSMBr->Fid; /* cifs fid stays in le */ | 1294 | *netfid = pSMBr->Fid; /* cifs fid stays in le */ |
1253 | /* Let caller know file was created so we can set the mode. */ | 1295 | /* Let caller know file was created so we can set the mode. */ |
@@ -1686,7 +1728,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1686 | { | 1728 | { |
1687 | int rc = 0; | 1729 | int rc = 0; |
1688 | LOCK_REQ *pSMB = NULL; | 1730 | LOCK_REQ *pSMB = NULL; |
1689 | LOCK_RSP *pSMBr = NULL; | 1731 | /* LOCK_RSP *pSMBr = NULL; */ /* No response data other than rc to parse */ |
1690 | int bytes_returned; | 1732 | int bytes_returned; |
1691 | int timeout = 0; | 1733 | int timeout = 0; |
1692 | __u16 count; | 1734 | __u16 count; |
@@ -1697,8 +1739,6 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1697 | if (rc) | 1739 | if (rc) |
1698 | return rc; | 1740 | return rc; |
1699 | 1741 | ||
1700 | pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */ | ||
1701 | |||
1702 | if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { | 1742 | if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { |
1703 | timeout = CIFS_ASYNC_OP; /* no response expected */ | 1743 | timeout = CIFS_ASYNC_OP; /* no response expected */ |
1704 | pSMB->Timeout = 0; | 1744 | pSMB->Timeout = 0; |
@@ -1732,7 +1772,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1732 | 1772 | ||
1733 | if (waitFlag) { | 1773 | if (waitFlag) { |
1734 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, | 1774 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, |
1735 | (struct smb_hdr *) pSMBr, &bytes_returned); | 1775 | (struct smb_hdr *) pSMB, &bytes_returned); |
1736 | cifs_small_buf_release(pSMB); | 1776 | cifs_small_buf_release(pSMB); |
1737 | } else { | 1777 | } else { |
1738 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB, | 1778 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB, |
@@ -1767,7 +1807,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1767 | cFYI(1, ("Posix Lock")); | 1807 | cFYI(1, ("Posix Lock")); |
1768 | 1808 | ||
1769 | if (pLockData == NULL) | 1809 | if (pLockData == NULL) |
1770 | return EINVAL; | 1810 | return -EINVAL; |
1771 | 1811 | ||
1772 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); | 1812 | rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); |
1773 | 1813 | ||
@@ -1944,7 +1984,7 @@ renameRetry: | |||
1944 | /* protocol requires ASCII signature byte on Unicode string */ | 1984 | /* protocol requires ASCII signature byte on Unicode string */ |
1945 | pSMB->OldFileName[name_len + 1] = 0x00; | 1985 | pSMB->OldFileName[name_len + 1] = 0x00; |
1946 | name_len2 = | 1986 | name_len2 = |
1947 | cifsConvertToUCS((__le16 *) &pSMB->OldFileName[name_len + 2], | 1987 | cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2], |
1948 | toName, PATH_MAX, nls_codepage, remap); | 1988 | toName, PATH_MAX, nls_codepage, remap); |
1949 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; | 1989 | name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; |
1950 | name_len2 *= 2; /* convert to bytes */ | 1990 | name_len2 *= 2; /* convert to bytes */ |
@@ -2117,8 +2157,7 @@ copyRetry: | |||
2117 | cFYI(1, ("Send error in copy = %d with %d files copied", | 2157 | cFYI(1, ("Send error in copy = %d with %d files copied", |
2118 | rc, le16_to_cpu(pSMBr->CopyCount))); | 2158 | rc, le16_to_cpu(pSMBr->CopyCount))); |
2119 | } | 2159 | } |
2120 | if (pSMB) | 2160 | cifs_buf_release(pSMB); |
2121 | cifs_buf_release(pSMB); | ||
2122 | 2161 | ||
2123 | if (rc == -EAGAIN) | 2162 | if (rc == -EAGAIN) |
2124 | goto copyRetry; | 2163 | goto copyRetry; |
@@ -2207,8 +2246,7 @@ createSymLinkRetry: | |||
2207 | if (rc) | 2246 | if (rc) |
2208 | cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc)); | 2247 | cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc)); |
2209 | 2248 | ||
2210 | if (pSMB) | 2249 | cifs_buf_release(pSMB); |
2211 | cifs_buf_release(pSMB); | ||
2212 | 2250 | ||
2213 | if (rc == -EAGAIN) | 2251 | if (rc == -EAGAIN) |
2214 | goto createSymLinkRetry; | 2252 | goto createSymLinkRetry; |
@@ -2925,7 +2963,8 @@ setAclRetry: | |||
2925 | } | 2963 | } |
2926 | params = 6 + name_len; | 2964 | params = 6 + name_len; |
2927 | pSMB->MaxParameterCount = cpu_to_le16(2); | 2965 | pSMB->MaxParameterCount = cpu_to_le16(2); |
2928 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB size from sess */ | 2966 | /* BB find max SMB size from sess */ |
2967 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
2929 | pSMB->MaxSetupCount = 0; | 2968 | pSMB->MaxSetupCount = 0; |
2930 | pSMB->Reserved = 0; | 2969 | pSMB->Reserved = 0; |
2931 | pSMB->Flags = 0; | 2970 | pSMB->Flags = 0; |
@@ -3322,7 +3361,8 @@ QPathInfoRetry: | |||
3322 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; | 3361 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; |
3323 | pSMB->TotalDataCount = 0; | 3362 | pSMB->TotalDataCount = 0; |
3324 | pSMB->MaxParameterCount = cpu_to_le16(2); | 3363 | pSMB->MaxParameterCount = cpu_to_le16(2); |
3325 | pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ | 3364 | /* BB find exact max SMB PDU from sess structure BB */ |
3365 | pSMB->MaxDataCount = cpu_to_le16(4000); | ||
3326 | pSMB->MaxSetupCount = 0; | 3366 | pSMB->MaxSetupCount = 0; |
3327 | pSMB->Reserved = 0; | 3367 | pSMB->Reserved = 0; |
3328 | pSMB->Flags = 0; | 3368 | pSMB->Flags = 0; |
@@ -3388,7 +3428,7 @@ QPathInfoRetry: | |||
3388 | int | 3428 | int |
3389 | CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, | 3429 | CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, |
3390 | const unsigned char *searchName, | 3430 | const unsigned char *searchName, |
3391 | FILE_UNIX_BASIC_INFO * pFindData, | 3431 | FILE_UNIX_BASIC_INFO *pFindData, |
3392 | const struct nls_table *nls_codepage, int remap) | 3432 | const struct nls_table *nls_codepage, int remap) |
3393 | { | 3433 | { |
3394 | /* SMB_QUERY_FILE_UNIX_BASIC */ | 3434 | /* SMB_QUERY_FILE_UNIX_BASIC */ |
@@ -3679,6 +3719,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | |||
3679 | if (rc) { | 3719 | if (rc) { |
3680 | if (rc == -EBADF) { | 3720 | if (rc == -EBADF) { |
3681 | psrch_inf->endOfSearch = true; | 3721 | psrch_inf->endOfSearch = true; |
3722 | cifs_buf_release(pSMB); | ||
3682 | rc = 0; /* search probably was closed at end of search*/ | 3723 | rc = 0; /* search probably was closed at end of search*/ |
3683 | } else | 3724 | } else |
3684 | cFYI(1, ("FindNext returned = %d", rc)); | 3725 | cFYI(1, ("FindNext returned = %d", rc)); |
@@ -3856,25 +3897,112 @@ GetInodeNumOut: | |||
3856 | return rc; | 3897 | return rc; |
3857 | } | 3898 | } |
3858 | 3899 | ||
3900 | /* parses DFS refferal V3 structure | ||
3901 | * caller is responsible for freeing target_nodes | ||
3902 | * returns: | ||
3903 | * on success - 0 | ||
3904 | * on failure - errno | ||
3905 | */ | ||
3906 | static int | ||
3907 | parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | ||
3908 | unsigned int *num_of_nodes, | ||
3909 | struct dfs_info3_param **target_nodes, | ||
3910 | const struct nls_table *nls_codepage) | ||
3911 | { | ||
3912 | int i, rc = 0; | ||
3913 | char *data_end; | ||
3914 | bool is_unicode; | ||
3915 | struct dfs_referral_level_3 *ref; | ||
3916 | |||
3917 | is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE; | ||
3918 | *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals); | ||
3919 | |||
3920 | if (*num_of_nodes < 1) { | ||
3921 | cERROR(1, ("num_referrals: must be at least > 0," | ||
3922 | "but we get num_referrals = %d\n", *num_of_nodes)); | ||
3923 | rc = -EINVAL; | ||
3924 | goto parse_DFS_referrals_exit; | ||
3925 | } | ||
3926 | |||
3927 | ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); | ||
3928 | if (ref->VersionNumber != cpu_to_le16(3)) { | ||
3929 | cERROR(1, ("Referrals of V%d version are not supported," | ||
3930 | "should be V3", le16_to_cpu(ref->VersionNumber))); | ||
3931 | rc = -EINVAL; | ||
3932 | goto parse_DFS_referrals_exit; | ||
3933 | } | ||
3934 | |||
3935 | /* get the upper boundary of the resp buffer */ | ||
3936 | data_end = (char *)(&(pSMBr->PathConsumed)) + | ||
3937 | le16_to_cpu(pSMBr->t2.DataCount); | ||
3938 | |||
3939 | cFYI(1, ("num_referrals: %d dfs flags: 0x%x ... \n", | ||
3940 | *num_of_nodes, | ||
3941 | le16_to_cpu(pSMBr->DFSFlags))); | ||
3942 | |||
3943 | *target_nodes = kzalloc(sizeof(struct dfs_info3_param) * | ||
3944 | *num_of_nodes, GFP_KERNEL); | ||
3945 | if (*target_nodes == NULL) { | ||
3946 | cERROR(1, ("Failed to allocate buffer for target_nodes\n")); | ||
3947 | rc = -ENOMEM; | ||
3948 | goto parse_DFS_referrals_exit; | ||
3949 | } | ||
3950 | |||
3951 | /* collect neccessary data from referrals */ | ||
3952 | for (i = 0; i < *num_of_nodes; i++) { | ||
3953 | char *temp; | ||
3954 | int max_len; | ||
3955 | struct dfs_info3_param *node = (*target_nodes)+i; | ||
3956 | |||
3957 | node->flags = le16_to_cpu(pSMBr->DFSFlags); | ||
3958 | node->path_consumed = le16_to_cpu(pSMBr->PathConsumed); | ||
3959 | node->server_type = le16_to_cpu(ref->ServerType); | ||
3960 | node->ref_flag = le16_to_cpu(ref->ReferralEntryFlags); | ||
3961 | |||
3962 | /* copy DfsPath */ | ||
3963 | temp = (char *)ref + le16_to_cpu(ref->DfsPathOffset); | ||
3964 | max_len = data_end - temp; | ||
3965 | rc = cifs_strncpy_to_host(&(node->path_name), temp, | ||
3966 | max_len, is_unicode, nls_codepage); | ||
3967 | if (rc) | ||
3968 | goto parse_DFS_referrals_exit; | ||
3969 | |||
3970 | /* copy link target UNC */ | ||
3971 | temp = (char *)ref + le16_to_cpu(ref->NetworkAddressOffset); | ||
3972 | max_len = data_end - temp; | ||
3973 | rc = cifs_strncpy_to_host(&(node->node_name), temp, | ||
3974 | max_len, is_unicode, nls_codepage); | ||
3975 | if (rc) | ||
3976 | goto parse_DFS_referrals_exit; | ||
3977 | |||
3978 | ref += le16_to_cpu(ref->Size); | ||
3979 | } | ||
3980 | |||
3981 | parse_DFS_referrals_exit: | ||
3982 | if (rc) { | ||
3983 | free_dfs_info_array(*target_nodes, *num_of_nodes); | ||
3984 | *target_nodes = NULL; | ||
3985 | *num_of_nodes = 0; | ||
3986 | } | ||
3987 | return rc; | ||
3988 | } | ||
3989 | |||
3859 | int | 3990 | int |
3860 | CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, | 3991 | CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, |
3861 | const unsigned char *searchName, | 3992 | const unsigned char *searchName, |
3862 | unsigned char **targetUNCs, | 3993 | struct dfs_info3_param **target_nodes, |
3863 | unsigned int *number_of_UNC_in_array, | 3994 | unsigned int *num_of_nodes, |
3864 | const struct nls_table *nls_codepage, int remap) | 3995 | const struct nls_table *nls_codepage, int remap) |
3865 | { | 3996 | { |
3866 | /* TRANS2_GET_DFS_REFERRAL */ | 3997 | /* TRANS2_GET_DFS_REFERRAL */ |
3867 | TRANSACTION2_GET_DFS_REFER_REQ *pSMB = NULL; | 3998 | TRANSACTION2_GET_DFS_REFER_REQ *pSMB = NULL; |
3868 | TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL; | 3999 | TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL; |
3869 | struct dfs_referral_level_3 *referrals = NULL; | ||
3870 | int rc = 0; | 4000 | int rc = 0; |
3871 | int bytes_returned; | 4001 | int bytes_returned; |
3872 | int name_len; | 4002 | int name_len; |
3873 | unsigned int i; | ||
3874 | char *temp; | ||
3875 | __u16 params, byte_count; | 4003 | __u16 params, byte_count; |
3876 | *number_of_UNC_in_array = 0; | 4004 | *num_of_nodes = 0; |
3877 | *targetUNCs = NULL; | 4005 | *target_nodes = NULL; |
3878 | 4006 | ||
3879 | cFYI(1, ("In GetDFSRefer the path %s", searchName)); | 4007 | cFYI(1, ("In GetDFSRefer the path %s", searchName)); |
3880 | if (ses == NULL) | 4008 | if (ses == NULL) |
@@ -3921,7 +4049,8 @@ getDFSRetry: | |||
3921 | pSMB->DataCount = 0; | 4049 | pSMB->DataCount = 0; |
3922 | pSMB->DataOffset = 0; | 4050 | pSMB->DataOffset = 0; |
3923 | pSMB->MaxParameterCount = 0; | 4051 | pSMB->MaxParameterCount = 0; |
3924 | pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ | 4052 | /* BB find exact max SMB PDU from sess structure BB */ |
4053 | pSMB->MaxDataCount = cpu_to_le16(4000); | ||
3925 | pSMB->MaxSetupCount = 0; | 4054 | pSMB->MaxSetupCount = 0; |
3926 | pSMB->Reserved = 0; | 4055 | pSMB->Reserved = 0; |
3927 | pSMB->Flags = 0; | 4056 | pSMB->Flags = 0; |
@@ -3943,103 +4072,26 @@ getDFSRetry: | |||
3943 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | 4072 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); |
3944 | if (rc) { | 4073 | if (rc) { |
3945 | cFYI(1, ("Send error in GetDFSRefer = %d", rc)); | 4074 | cFYI(1, ("Send error in GetDFSRefer = %d", rc)); |
3946 | } else { /* decode response */ | 4075 | goto GetDFSRefExit; |
3947 | /* BB Add logic to parse referrals here */ | 4076 | } |
3948 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); | 4077 | rc = validate_t2((struct smb_t2_rsp *)pSMBr); |
3949 | 4078 | ||
3950 | /* BB Also check if enough total bytes returned? */ | 4079 | /* BB Also check if enough total bytes returned? */ |
3951 | if (rc || (pSMBr->ByteCount < 17)) | 4080 | if (rc || (pSMBr->ByteCount < 17)) { |
3952 | rc = -EIO; /* bad smb */ | 4081 | rc = -EIO; /* bad smb */ |
3953 | else { | 4082 | goto GetDFSRefExit; |
3954 | __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); | 4083 | } |
3955 | __u16 data_count = le16_to_cpu(pSMBr->t2.DataCount); | ||
3956 | 4084 | ||
3957 | cFYI(1, | 4085 | cFYI(1, ("Decoding GetDFSRefer response BCC: %d Offset %d", |
3958 | ("Decoding GetDFSRefer response BCC: %d Offset %d", | 4086 | pSMBr->ByteCount, |
3959 | pSMBr->ByteCount, data_offset)); | 4087 | le16_to_cpu(pSMBr->t2.DataOffset))); |
3960 | referrals = | ||
3961 | (struct dfs_referral_level_3 *) | ||
3962 | (8 /* sizeof start of data block */ + | ||
3963 | data_offset + | ||
3964 | (char *) &pSMBr->hdr.Protocol); | ||
3965 | cFYI(1, ("num_referrals: %d dfs flags: 0x%x ... \n" | ||
3966 | "for referral one refer size: 0x%x srv " | ||
3967 | "type: 0x%x refer flags: 0x%x ttl: 0x%x", | ||
3968 | le16_to_cpu(pSMBr->NumberOfReferrals), | ||
3969 | le16_to_cpu(pSMBr->DFSFlags), | ||
3970 | le16_to_cpu(referrals->ReferralSize), | ||
3971 | le16_to_cpu(referrals->ServerType), | ||
3972 | le16_to_cpu(referrals->ReferralFlags), | ||
3973 | le16_to_cpu(referrals->TimeToLive))); | ||
3974 | /* BB This field is actually two bytes in from start of | ||
3975 | data block so we could do safety check that DataBlock | ||
3976 | begins at address of pSMBr->NumberOfReferrals */ | ||
3977 | *number_of_UNC_in_array = | ||
3978 | le16_to_cpu(pSMBr->NumberOfReferrals); | ||
3979 | |||
3980 | /* BB Fix below so can return more than one referral */ | ||
3981 | if (*number_of_UNC_in_array > 1) | ||
3982 | *number_of_UNC_in_array = 1; | ||
3983 | |||
3984 | /* get the length of the strings describing refs */ | ||
3985 | name_len = 0; | ||
3986 | for (i = 0; i < *number_of_UNC_in_array; i++) { | ||
3987 | /* make sure that DfsPathOffset not past end */ | ||
3988 | __u16 offset = | ||
3989 | le16_to_cpu(referrals->DfsPathOffset); | ||
3990 | if (offset > data_count) { | ||
3991 | /* if invalid referral, stop here and do | ||
3992 | not try to copy any more */ | ||
3993 | *number_of_UNC_in_array = i; | ||
3994 | break; | ||
3995 | } | ||
3996 | temp = ((char *)referrals) + offset; | ||
3997 | 4088 | ||
3998 | if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) { | 4089 | /* parse returned result into more usable form */ |
3999 | name_len += UniStrnlen((wchar_t *)temp, | 4090 | rc = parse_DFS_referrals(pSMBr, num_of_nodes, |
4000 | data_count); | 4091 | target_nodes, nls_codepage); |
4001 | } else { | ||
4002 | name_len += strnlen(temp, data_count); | ||
4003 | } | ||
4004 | referrals++; | ||
4005 | /* BB add check that referral pointer does | ||
4006 | not fall off end PDU */ | ||
4007 | } | ||
4008 | /* BB add check for name_len bigger than bcc */ | ||
4009 | *targetUNCs = | ||
4010 | kmalloc(name_len+1+(*number_of_UNC_in_array), | ||
4011 | GFP_KERNEL); | ||
4012 | if (*targetUNCs == NULL) { | ||
4013 | rc = -ENOMEM; | ||
4014 | goto GetDFSRefExit; | ||
4015 | } | ||
4016 | /* copy the ref strings */ | ||
4017 | referrals = (struct dfs_referral_level_3 *) | ||
4018 | (8 /* sizeof data hdr */ + data_offset + | ||
4019 | (char *) &pSMBr->hdr.Protocol); | ||
4020 | |||
4021 | for (i = 0; i < *number_of_UNC_in_array; i++) { | ||
4022 | temp = ((char *)referrals) + | ||
4023 | le16_to_cpu(referrals->DfsPathOffset); | ||
4024 | if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) { | ||
4025 | cifs_strfromUCS_le(*targetUNCs, | ||
4026 | (__le16 *) temp, | ||
4027 | name_len, | ||
4028 | nls_codepage); | ||
4029 | } else { | ||
4030 | strncpy(*targetUNCs, temp, name_len); | ||
4031 | } | ||
4032 | /* BB update target_uncs pointers */ | ||
4033 | referrals++; | ||
4034 | } | ||
4035 | temp = *targetUNCs; | ||
4036 | temp[name_len] = 0; | ||
4037 | } | ||
4038 | 4092 | ||
4039 | } | ||
4040 | GetDFSRefExit: | 4093 | GetDFSRefExit: |
4041 | if (pSMB) | 4094 | cifs_buf_release(pSMB); |
4042 | cifs_buf_release(pSMB); | ||
4043 | 4095 | ||
4044 | if (rc == -EAGAIN) | 4096 | if (rc == -EAGAIN) |
4045 | goto getDFSRetry; | 4097 | goto getDFSRetry; |
@@ -4229,7 +4281,8 @@ QFSAttributeRetry: | |||
4229 | params = 2; /* level */ | 4281 | params = 2; /* level */ |
4230 | pSMB->TotalDataCount = 0; | 4282 | pSMB->TotalDataCount = 0; |
4231 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4283 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4232 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 4284 | /* BB find exact max SMB PDU from sess structure BB */ |
4285 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4233 | pSMB->MaxSetupCount = 0; | 4286 | pSMB->MaxSetupCount = 0; |
4234 | pSMB->Reserved = 0; | 4287 | pSMB->Reserved = 0; |
4235 | pSMB->Flags = 0; | 4288 | pSMB->Flags = 0; |
@@ -4298,7 +4351,8 @@ QFSDeviceRetry: | |||
4298 | params = 2; /* level */ | 4351 | params = 2; /* level */ |
4299 | pSMB->TotalDataCount = 0; | 4352 | pSMB->TotalDataCount = 0; |
4300 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4353 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4301 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 4354 | /* BB find exact max SMB PDU from sess structure BB */ |
4355 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4302 | pSMB->MaxSetupCount = 0; | 4356 | pSMB->MaxSetupCount = 0; |
4303 | pSMB->Reserved = 0; | 4357 | pSMB->Reserved = 0; |
4304 | pSMB->Flags = 0; | 4358 | pSMB->Flags = 0; |
@@ -4369,7 +4423,8 @@ QFSUnixRetry: | |||
4369 | pSMB->DataCount = 0; | 4423 | pSMB->DataCount = 0; |
4370 | pSMB->DataOffset = 0; | 4424 | pSMB->DataOffset = 0; |
4371 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4425 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4372 | pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ | 4426 | /* BB find exact max SMB PDU from sess structure BB */ |
4427 | pSMB->MaxDataCount = cpu_to_le16(100); | ||
4373 | pSMB->MaxSetupCount = 0; | 4428 | pSMB->MaxSetupCount = 0; |
4374 | pSMB->Reserved = 0; | 4429 | pSMB->Reserved = 0; |
4375 | pSMB->Flags = 0; | 4430 | pSMB->Flags = 0; |
@@ -4444,7 +4499,8 @@ SETFSUnixRetry: | |||
4444 | offset = param_offset + params; | 4499 | offset = param_offset + params; |
4445 | 4500 | ||
4446 | pSMB->MaxParameterCount = cpu_to_le16(4); | 4501 | pSMB->MaxParameterCount = cpu_to_le16(4); |
4447 | pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ | 4502 | /* BB find exact max SMB PDU from sess structure BB */ |
4503 | pSMB->MaxDataCount = cpu_to_le16(100); | ||
4448 | pSMB->SetupCount = 1; | 4504 | pSMB->SetupCount = 1; |
4449 | pSMB->Reserved3 = 0; | 4505 | pSMB->Reserved3 = 0; |
4450 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FS_INFORMATION); | 4506 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FS_INFORMATION); |
@@ -4512,7 +4568,8 @@ QFSPosixRetry: | |||
4512 | pSMB->DataCount = 0; | 4568 | pSMB->DataCount = 0; |
4513 | pSMB->DataOffset = 0; | 4569 | pSMB->DataOffset = 0; |
4514 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4570 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4515 | pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ | 4571 | /* BB find exact max SMB PDU from sess structure BB */ |
4572 | pSMB->MaxDataCount = cpu_to_le16(100); | ||
4516 | pSMB->MaxSetupCount = 0; | 4573 | pSMB->MaxSetupCount = 0; |
4517 | pSMB->Reserved = 0; | 4574 | pSMB->Reserved = 0; |
4518 | pSMB->Flags = 0; | 4575 | pSMB->Flags = 0; |
@@ -4702,7 +4759,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4702 | 4759 | ||
4703 | count = sizeof(struct file_end_of_file_info); | 4760 | count = sizeof(struct file_end_of_file_info); |
4704 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4761 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4705 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ | 4762 | /* BB find exact max SMB PDU from sess structure BB */ |
4763 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4706 | pSMB->SetupCount = 1; | 4764 | pSMB->SetupCount = 1; |
4707 | pSMB->Reserved3 = 0; | 4765 | pSMB->Reserved3 = 0; |
4708 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); | 4766 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); |
@@ -4789,7 +4847,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4789 | 4847 | ||
4790 | count = sizeof(FILE_BASIC_INFO); | 4848 | count = sizeof(FILE_BASIC_INFO); |
4791 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4849 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4792 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ | 4850 | /* BB find max SMB PDU from sess */ |
4851 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4793 | pSMB->SetupCount = 1; | 4852 | pSMB->SetupCount = 1; |
4794 | pSMB->Reserved3 = 0; | 4853 | pSMB->Reserved3 = 0; |
4795 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); | 4854 | pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); |
@@ -4856,7 +4915,8 @@ SetTimesRetry: | |||
4856 | params = 6 + name_len; | 4915 | params = 6 + name_len; |
4857 | count = sizeof(FILE_BASIC_INFO); | 4916 | count = sizeof(FILE_BASIC_INFO); |
4858 | pSMB->MaxParameterCount = cpu_to_le16(2); | 4917 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4859 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 4918 | /* BB find max SMB PDU from sess structure BB */ |
4919 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4860 | pSMB->MaxSetupCount = 0; | 4920 | pSMB->MaxSetupCount = 0; |
4861 | pSMB->Reserved = 0; | 4921 | pSMB->Reserved = 0; |
4862 | pSMB->Flags = 0; | 4922 | pSMB->Flags = 0; |
@@ -4986,7 +5046,8 @@ setPermsRetry: | |||
4986 | params = 6 + name_len; | 5046 | params = 6 + name_len; |
4987 | count = sizeof(FILE_UNIX_BASIC_INFO); | 5047 | count = sizeof(FILE_UNIX_BASIC_INFO); |
4988 | pSMB->MaxParameterCount = cpu_to_le16(2); | 5048 | pSMB->MaxParameterCount = cpu_to_le16(2); |
4989 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ | 5049 | /* BB find max SMB PDU from sess structure BB */ |
5050 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
4990 | pSMB->MaxSetupCount = 0; | 5051 | pSMB->MaxSetupCount = 0; |
4991 | pSMB->Reserved = 0; | 5052 | pSMB->Reserved = 0; |
4992 | pSMB->Flags = 0; | 5053 | pSMB->Flags = 0; |
@@ -5051,8 +5112,7 @@ setPermsRetry: | |||
5051 | if (rc) | 5112 | if (rc) |
5052 | cFYI(1, ("SetPathInfo (perms) returned %d", rc)); | 5113 | cFYI(1, ("SetPathInfo (perms) returned %d", rc)); |
5053 | 5114 | ||
5054 | if (pSMB) | 5115 | cifs_buf_release(pSMB); |
5055 | cifs_buf_release(pSMB); | ||
5056 | if (rc == -EAGAIN) | 5116 | if (rc == -EAGAIN) |
5057 | goto setPermsRetry; | 5117 | goto setPermsRetry; |
5058 | return rc; | 5118 | return rc; |
@@ -5169,7 +5229,8 @@ QAllEAsRetry: | |||
5169 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; | 5229 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; |
5170 | pSMB->TotalDataCount = 0; | 5230 | pSMB->TotalDataCount = 0; |
5171 | pSMB->MaxParameterCount = cpu_to_le16(2); | 5231 | pSMB->MaxParameterCount = cpu_to_le16(2); |
5172 | pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ | 5232 | /* BB find exact max SMB PDU from sess structure BB */ |
5233 | pSMB->MaxDataCount = cpu_to_le16(4000); | ||
5173 | pSMB->MaxSetupCount = 0; | 5234 | pSMB->MaxSetupCount = 0; |
5174 | pSMB->Reserved = 0; | 5235 | pSMB->Reserved = 0; |
5175 | pSMB->Flags = 0; | 5236 | pSMB->Flags = 0; |
@@ -5273,8 +5334,7 @@ QAllEAsRetry: | |||
5273 | } | 5334 | } |
5274 | } | 5335 | } |
5275 | } | 5336 | } |
5276 | if (pSMB) | 5337 | cifs_buf_release(pSMB); |
5277 | cifs_buf_release(pSMB); | ||
5278 | if (rc == -EAGAIN) | 5338 | if (rc == -EAGAIN) |
5279 | goto QAllEAsRetry; | 5339 | goto QAllEAsRetry; |
5280 | 5340 | ||
@@ -5317,7 +5377,8 @@ QEARetry: | |||
5317 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; | 5377 | params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; |
5318 | pSMB->TotalDataCount = 0; | 5378 | pSMB->TotalDataCount = 0; |
5319 | pSMB->MaxParameterCount = cpu_to_le16(2); | 5379 | pSMB->MaxParameterCount = cpu_to_le16(2); |
5320 | pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ | 5380 | /* BB find exact max SMB PDU from sess structure BB */ |
5381 | pSMB->MaxDataCount = cpu_to_le16(4000); | ||
5321 | pSMB->MaxSetupCount = 0; | 5382 | pSMB->MaxSetupCount = 0; |
5322 | pSMB->Reserved = 0; | 5383 | pSMB->Reserved = 0; |
5323 | pSMB->Flags = 0; | 5384 | pSMB->Flags = 0; |
@@ -5422,8 +5483,7 @@ QEARetry: | |||
5422 | } | 5483 | } |
5423 | } | 5484 | } |
5424 | } | 5485 | } |
5425 | if (pSMB) | 5486 | cifs_buf_release(pSMB); |
5426 | cifs_buf_release(pSMB); | ||
5427 | if (rc == -EAGAIN) | 5487 | if (rc == -EAGAIN) |
5428 | goto QEARetry; | 5488 | goto QEARetry; |
5429 | 5489 | ||
@@ -5475,7 +5535,8 @@ SetEARetry: | |||
5475 | 5535 | ||
5476 | count = sizeof(*parm_data) + ea_value_len + name_len; | 5536 | count = sizeof(*parm_data) + ea_value_len + name_len; |
5477 | pSMB->MaxParameterCount = cpu_to_le16(2); | 5537 | pSMB->MaxParameterCount = cpu_to_le16(2); |
5478 | pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB size from sess */ | 5538 | /* BB find max SMB PDU from sess */ |
5539 | pSMB->MaxDataCount = cpu_to_le16(1000); | ||
5479 | pSMB->MaxSetupCount = 0; | 5540 | pSMB->MaxSetupCount = 0; |
5480 | pSMB->Reserved = 0; | 5541 | pSMB->Reserved = 0; |
5481 | pSMB->Flags = 0; | 5542 | pSMB->Flags = 0; |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f428bf3bf1a9..e8fa46c7cff2 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -60,7 +60,7 @@ struct smb_vol { | |||
60 | char *domainname; | 60 | char *domainname; |
61 | char *UNC; | 61 | char *UNC; |
62 | char *UNCip; | 62 | char *UNCip; |
63 | char *in6_addr; /* ipv6 address as human readable form of in6_addr */ | 63 | char *in6_addr; /* ipv6 address as human readable form of in6_addr */ |
64 | char *iocharset; /* local code page for mapping to and from Unicode */ | 64 | char *iocharset; /* local code page for mapping to and from Unicode */ |
65 | char source_rfc1001_name[16]; /* netbios name of client */ | 65 | char source_rfc1001_name[16]; /* netbios name of client */ |
66 | char target_rfc1001_name[16]; /* netbios name of server for Win9x/ME */ | 66 | char target_rfc1001_name[16]; /* netbios name of server for Win9x/ME */ |
@@ -75,19 +75,21 @@ struct smb_vol { | |||
75 | bool setuids:1; | 75 | bool setuids:1; |
76 | bool override_uid:1; | 76 | bool override_uid:1; |
77 | bool override_gid:1; | 77 | bool override_gid:1; |
78 | bool dynperm:1; | ||
78 | bool noperm:1; | 79 | bool noperm:1; |
79 | bool no_psx_acl:1; /* set if posix acl support should be disabled */ | 80 | bool no_psx_acl:1; /* set if posix acl support should be disabled */ |
80 | bool cifs_acl:1; | 81 | bool cifs_acl:1; |
81 | bool no_xattr:1; /* set if xattr (EA) support should be disabled*/ | 82 | bool no_xattr:1; /* set if xattr (EA) support should be disabled*/ |
82 | bool server_ino:1; /* use inode numbers from server ie UniqueId */ | 83 | bool server_ino:1; /* use inode numbers from server ie UniqueId */ |
83 | bool direct_io:1; | 84 | bool direct_io:1; |
84 | bool remap:1; /* set to remap seven reserved chars in filenames */ | 85 | bool remap:1; /* set to remap seven reserved chars in filenames */ |
85 | bool posix_paths:1; /* unset to not ask for posix pathnames. */ | 86 | bool posix_paths:1; /* unset to not ask for posix pathnames. */ |
86 | bool no_linux_ext:1; | 87 | bool no_linux_ext:1; |
87 | bool sfu_emul:1; | 88 | bool sfu_emul:1; |
88 | bool nullauth:1; /* attempt to authenticate with null user */ | 89 | bool nullauth:1; /* attempt to authenticate with null user */ |
89 | unsigned nocase; /* request case insensitive filenames */ | 90 | bool nocase:1; /* request case insensitive filenames */ |
90 | unsigned nobrl; /* disable sending byte range locks to srv */ | 91 | bool nobrl:1; /* disable sending byte range locks to srv */ |
92 | bool seal:1; /* request transport encryption on share */ | ||
91 | unsigned int rsize; | 93 | unsigned int rsize; |
92 | unsigned int wsize; | 94 | unsigned int wsize; |
93 | unsigned int sockopt; | 95 | unsigned int sockopt; |
@@ -651,6 +653,7 @@ multi_t2_fnd: | |||
651 | spin_lock(&GlobalMid_Lock); | 653 | spin_lock(&GlobalMid_Lock); |
652 | server->tcpStatus = CifsExiting; | 654 | server->tcpStatus = CifsExiting; |
653 | spin_unlock(&GlobalMid_Lock); | 655 | spin_unlock(&GlobalMid_Lock); |
656 | wake_up_all(&server->response_q); | ||
654 | 657 | ||
655 | /* don't exit until kthread_stop is called */ | 658 | /* don't exit until kthread_stop is called */ |
656 | set_current_state(TASK_UNINTERRUPTIBLE); | 659 | set_current_state(TASK_UNINTERRUPTIBLE); |
@@ -1246,6 +1249,10 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1246 | vol->setuids = 1; | 1249 | vol->setuids = 1; |
1247 | } else if (strnicmp(data, "nosetuids", 9) == 0) { | 1250 | } else if (strnicmp(data, "nosetuids", 9) == 0) { |
1248 | vol->setuids = 0; | 1251 | vol->setuids = 0; |
1252 | } else if (strnicmp(data, "dynperm", 7) == 0) { | ||
1253 | vol->dynperm = true; | ||
1254 | } else if (strnicmp(data, "nodynperm", 9) == 0) { | ||
1255 | vol->dynperm = false; | ||
1249 | } else if (strnicmp(data, "nohard", 6) == 0) { | 1256 | } else if (strnicmp(data, "nohard", 6) == 0) { |
1250 | vol->retry = 0; | 1257 | vol->retry = 0; |
1251 | } else if (strnicmp(data, "nosoft", 6) == 0) { | 1258 | } else if (strnicmp(data, "nosoft", 6) == 0) { |
@@ -1268,8 +1275,12 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1268 | vol->no_psx_acl = 1; | 1275 | vol->no_psx_acl = 1; |
1269 | } else if (strnicmp(data, "sign", 4) == 0) { | 1276 | } else if (strnicmp(data, "sign", 4) == 0) { |
1270 | vol->secFlg |= CIFSSEC_MUST_SIGN; | 1277 | vol->secFlg |= CIFSSEC_MUST_SIGN; |
1271 | /* } else if (strnicmp(data, "seal",4) == 0) { | 1278 | } else if (strnicmp(data, "seal", 4) == 0) { |
1272 | vol->secFlg |= CIFSSEC_MUST_SEAL; */ | 1279 | /* we do not do the following in secFlags because seal |
1280 | is a per tree connection (mount) not a per socket | ||
1281 | or per-smb connection option in the protocol */ | ||
1282 | /* vol->secFlg |= CIFSSEC_MUST_SEAL; */ | ||
1283 | vol->seal = 1; | ||
1273 | } else if (strnicmp(data, "direct", 6) == 0) { | 1284 | } else if (strnicmp(data, "direct", 6) == 0) { |
1274 | vol->direct_io = 1; | 1285 | vol->direct_io = 1; |
1275 | } else if (strnicmp(data, "forcedirectio", 13) == 0) { | 1286 | } else if (strnicmp(data, "forcedirectio", 13) == 0) { |
@@ -1414,34 +1425,12 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName) | |||
1414 | } | 1425 | } |
1415 | 1426 | ||
1416 | int | 1427 | int |
1417 | connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo, | ||
1418 | const char *old_path, const struct nls_table *nls_codepage, | ||
1419 | int remap) | ||
1420 | { | ||
1421 | struct dfs_info3_param *referrals = NULL; | ||
1422 | unsigned int num_referrals; | ||
1423 | int rc = 0; | ||
1424 | |||
1425 | rc = get_dfs_path(xid, pSesInfo, old_path, nls_codepage, | ||
1426 | &num_referrals, &referrals, remap); | ||
1427 | |||
1428 | /* BB Add in code to: if valid refrl, if not ip address contact | ||
1429 | the helper that resolves tcp names, mount to it, try to | ||
1430 | tcon to it unmount it if fail */ | ||
1431 | |||
1432 | kfree(referrals); | ||
1433 | |||
1434 | return rc; | ||
1435 | } | ||
1436 | |||
1437 | int | ||
1438 | get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, | 1428 | get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, |
1439 | const struct nls_table *nls_codepage, unsigned int *pnum_referrals, | 1429 | const struct nls_table *nls_codepage, unsigned int *pnum_referrals, |
1440 | struct dfs_info3_param **preferrals, int remap) | 1430 | struct dfs_info3_param **preferrals, int remap) |
1441 | { | 1431 | { |
1442 | char *temp_unc; | 1432 | char *temp_unc; |
1443 | int rc = 0; | 1433 | int rc = 0; |
1444 | unsigned char *targetUNCs; | ||
1445 | 1434 | ||
1446 | *pnum_referrals = 0; | 1435 | *pnum_referrals = 0; |
1447 | *preferrals = NULL; | 1436 | *preferrals = NULL; |
@@ -1464,7 +1453,7 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, | |||
1464 | kfree(temp_unc); | 1453 | kfree(temp_unc); |
1465 | } | 1454 | } |
1466 | if (rc == 0) | 1455 | if (rc == 0) |
1467 | rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, &targetUNCs, | 1456 | rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, preferrals, |
1468 | pnum_referrals, nls_codepage, remap); | 1457 | pnum_referrals, nls_codepage, remap); |
1469 | /* BB map targetUNCs to dfs_info3 structures, here or | 1458 | /* BB map targetUNCs to dfs_info3 structures, here or |
1470 | in CIFSGetDFSRefer BB */ | 1459 | in CIFSGetDFSRefer BB */ |
@@ -1815,7 +1804,7 @@ convert_delimiter(char *path, char delim) | |||
1815 | if (path == NULL) | 1804 | if (path == NULL) |
1816 | return; | 1805 | return; |
1817 | 1806 | ||
1818 | if (delim == '/') | 1807 | if (delim == '/') |
1819 | old_delim = '\\'; | 1808 | old_delim = '\\'; |
1820 | else | 1809 | else |
1821 | old_delim = '/'; | 1810 | old_delim = '/'; |
@@ -2125,11 +2114,17 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2125 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID; | 2114 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID; |
2126 | if (volume_info.override_gid) | 2115 | if (volume_info.override_gid) |
2127 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID; | 2116 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID; |
2117 | if (volume_info.dynperm) | ||
2118 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; | ||
2128 | if (volume_info.direct_io) { | 2119 | if (volume_info.direct_io) { |
2129 | cFYI(1, ("mounting share using direct i/o")); | 2120 | cFYI(1, ("mounting share using direct i/o")); |
2130 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; | 2121 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; |
2131 | } | 2122 | } |
2132 | 2123 | ||
2124 | if ((volume_info.cifs_acl) && (volume_info.dynperm)) | ||
2125 | cERROR(1, ("mount option dynperm ignored if cifsacl " | ||
2126 | "mount option supported")); | ||
2127 | |||
2133 | tcon = | 2128 | tcon = |
2134 | find_unc(sin_server.sin_addr.s_addr, volume_info.UNC, | 2129 | find_unc(sin_server.sin_addr.s_addr, volume_info.UNC, |
2135 | volume_info.username); | 2130 | volume_info.username); |
@@ -2141,6 +2136,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2141 | for the retry flag is used */ | 2136 | for the retry flag is used */ |
2142 | tcon->retry = volume_info.retry; | 2137 | tcon->retry = volume_info.retry; |
2143 | tcon->nocase = volume_info.nocase; | 2138 | tcon->nocase = volume_info.nocase; |
2139 | if (tcon->seal != volume_info.seal) | ||
2140 | cERROR(1, ("transport encryption setting " | ||
2141 | "conflicts with existing tid")); | ||
2144 | } else { | 2142 | } else { |
2145 | tcon = tconInfoAlloc(); | 2143 | tcon = tconInfoAlloc(); |
2146 | if (tcon == NULL) | 2144 | if (tcon == NULL) |
@@ -2154,10 +2152,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2154 | if ((strchr(volume_info.UNC + 3, '\\') == NULL) | 2152 | if ((strchr(volume_info.UNC + 3, '\\') == NULL) |
2155 | && (strchr(volume_info.UNC + 3, '/') == | 2153 | && (strchr(volume_info.UNC + 3, '/') == |
2156 | NULL)) { | 2154 | NULL)) { |
2157 | rc = connect_to_dfs_path(xid, pSesInfo, | 2155 | /* rc = connect_to_dfs_path(xid, pSesInfo, |
2158 | "", cifs_sb->local_nls, | 2156 | "", cifs_sb->local_nls, |
2159 | cifs_sb->mnt_cifs_flags & | 2157 | cifs_sb->mnt_cifs_flags & |
2160 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 2158 | CIFS_MOUNT_MAP_SPECIAL_CHR);*/ |
2159 | cFYI(1, ("DFS root not supported")); | ||
2161 | rc = -ENODEV; | 2160 | rc = -ENODEV; |
2162 | goto out; | 2161 | goto out; |
2163 | } else { | 2162 | } else { |
@@ -2173,6 +2172,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2173 | atomic_inc(&pSesInfo->inUse); | 2172 | atomic_inc(&pSesInfo->inUse); |
2174 | tcon->retry = volume_info.retry; | 2173 | tcon->retry = volume_info.retry; |
2175 | tcon->nocase = volume_info.nocase; | 2174 | tcon->nocase = volume_info.nocase; |
2175 | tcon->seal = volume_info.seal; | ||
2176 | } | 2176 | } |
2177 | } | 2177 | } |
2178 | } | 2178 | } |
@@ -2314,9 +2314,10 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2314 | user = ses->userName; | 2314 | user = ses->userName; |
2315 | domain = ses->domainName; | 2315 | domain = ses->domainName; |
2316 | smb_buffer = cifs_buf_get(); | 2316 | smb_buffer = cifs_buf_get(); |
2317 | if (smb_buffer == NULL) { | 2317 | |
2318 | if (smb_buffer == NULL) | ||
2318 | return -ENOMEM; | 2319 | return -ENOMEM; |
2319 | } | 2320 | |
2320 | smb_buffer_response = smb_buffer; | 2321 | smb_buffer_response = smb_buffer; |
2321 | pSMBr = pSMB = (SESSION_SETUP_ANDX *) smb_buffer; | 2322 | pSMBr = pSMB = (SESSION_SETUP_ANDX *) smb_buffer; |
2322 | 2323 | ||
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index e4e0078a0526..fb69c1fa85c9 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -49,18 +49,25 @@ build_path_from_dentry(struct dentry *direntry) | |||
49 | struct dentry *temp; | 49 | struct dentry *temp; |
50 | int namelen; | 50 | int namelen; |
51 | int pplen; | 51 | int pplen; |
52 | int dfsplen; | ||
52 | char *full_path; | 53 | char *full_path; |
53 | char dirsep; | 54 | char dirsep; |
55 | struct cifs_sb_info *cifs_sb; | ||
54 | 56 | ||
55 | if (direntry == NULL) | 57 | if (direntry == NULL) |
56 | return NULL; /* not much we can do if dentry is freed and | 58 | return NULL; /* not much we can do if dentry is freed and |
57 | we need to reopen the file after it was closed implicitly | 59 | we need to reopen the file after it was closed implicitly |
58 | when the server crashed */ | 60 | when the server crashed */ |
59 | 61 | ||
60 | dirsep = CIFS_DIR_SEP(CIFS_SB(direntry->d_sb)); | 62 | cifs_sb = CIFS_SB(direntry->d_sb); |
61 | pplen = CIFS_SB(direntry->d_sb)->prepathlen; | 63 | dirsep = CIFS_DIR_SEP(cifs_sb); |
64 | pplen = cifs_sb->prepathlen; | ||
65 | if (cifs_sb->tcon && (cifs_sb->tcon->Flags & SMB_SHARE_IS_IN_DFS)) | ||
66 | dfsplen = strnlen(cifs_sb->tcon->treeName, MAX_TREE_SIZE + 1); | ||
67 | else | ||
68 | dfsplen = 0; | ||
62 | cifs_bp_rename_retry: | 69 | cifs_bp_rename_retry: |
63 | namelen = pplen; | 70 | namelen = pplen + dfsplen; |
64 | for (temp = direntry; !IS_ROOT(temp);) { | 71 | for (temp = direntry; !IS_ROOT(temp);) { |
65 | namelen += (1 + temp->d_name.len); | 72 | namelen += (1 + temp->d_name.len); |
66 | temp = temp->d_parent; | 73 | temp = temp->d_parent; |
@@ -91,7 +98,7 @@ cifs_bp_rename_retry: | |||
91 | return NULL; | 98 | return NULL; |
92 | } | 99 | } |
93 | } | 100 | } |
94 | if (namelen != pplen) { | 101 | if (namelen != pplen + dfsplen) { |
95 | cERROR(1, | 102 | cERROR(1, |
96 | ("did not end path lookup where expected namelen is %d", | 103 | ("did not end path lookup where expected namelen is %d", |
97 | namelen)); | 104 | namelen)); |
@@ -107,7 +114,18 @@ cifs_bp_rename_retry: | |||
107 | since the '\' is a valid posix character so we can not switch | 114 | since the '\' is a valid posix character so we can not switch |
108 | those safely to '/' if any are found in the middle of the prepath */ | 115 | those safely to '/' if any are found in the middle of the prepath */ |
109 | /* BB test paths to Windows with '/' in the midst of prepath */ | 116 | /* BB test paths to Windows with '/' in the midst of prepath */ |
110 | strncpy(full_path, CIFS_SB(direntry->d_sb)->prepath, pplen); | 117 | |
118 | if (dfsplen) { | ||
119 | strncpy(full_path, cifs_sb->tcon->treeName, dfsplen); | ||
120 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) { | ||
121 | int i; | ||
122 | for (i = 0; i < dfsplen; i++) { | ||
123 | if (full_path[i] == '\\') | ||
124 | full_path[i] = '/'; | ||
125 | } | ||
126 | } | ||
127 | } | ||
128 | strncpy(full_path + dfsplen, CIFS_SB(direntry->d_sb)->prepath, pplen); | ||
111 | return full_path; | 129 | return full_path; |
112 | } | 130 | } |
113 | 131 | ||
@@ -242,7 +260,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
242 | buf, inode->i_sb, xid, | 260 | buf, inode->i_sb, xid, |
243 | &fileHandle); | 261 | &fileHandle); |
244 | if (newinode) { | 262 | if (newinode) { |
245 | newinode->i_mode = mode; | 263 | if (cifs_sb->mnt_cifs_flags & |
264 | CIFS_MOUNT_DYNPERM) | ||
265 | newinode->i_mode = mode; | ||
246 | if ((oplock & CIFS_CREATE_ACTION) && | 266 | if ((oplock & CIFS_CREATE_ACTION) && |
247 | (cifs_sb->mnt_cifs_flags & | 267 | (cifs_sb->mnt_cifs_flags & |
248 | CIFS_MOUNT_SET_UID)) { | 268 | CIFS_MOUNT_SET_UID)) { |
@@ -590,7 +610,7 @@ static int cifs_ci_compare(struct dentry *dentry, struct qstr *a, | |||
590 | * case take precedence. If a is not a negative dentry, this | 610 | * case take precedence. If a is not a negative dentry, this |
591 | * should have no side effects | 611 | * should have no side effects |
592 | */ | 612 | */ |
593 | memcpy(a->name, b->name, a->len); | 613 | memcpy((void *)a->name, b->name, a->len); |
594 | return 0; | 614 | return 0; |
595 | } | 615 | } |
596 | return 1; | 616 | return 1; |
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 939e256f8497..f730ef35499e 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -134,10 +134,6 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr) | |||
134 | rkey = request_key(&key_type_dns_resolver, name, ""); | 134 | rkey = request_key(&key_type_dns_resolver, name, ""); |
135 | if (!IS_ERR(rkey)) { | 135 | if (!IS_ERR(rkey)) { |
136 | data = rkey->payload.data; | 136 | data = rkey->payload.data; |
137 | cFYI(1, ("%s: resolved: %s to %s", __func__, | ||
138 | rkey->description, | ||
139 | *ip_addr | ||
140 | )); | ||
141 | } else { | 137 | } else { |
142 | cERROR(1, ("%s: unable to resolve: %s", __func__, name)); | 138 | cERROR(1, ("%s: unable to resolve: %s", __func__, name)); |
143 | goto out; | 139 | goto out; |
@@ -150,6 +146,11 @@ skip_upcall: | |||
150 | if (*ip_addr) { | 146 | if (*ip_addr) { |
151 | memcpy(*ip_addr, data, len); | 147 | memcpy(*ip_addr, data, len); |
152 | (*ip_addr)[len] = '\0'; | 148 | (*ip_addr)[len] = '\0'; |
149 | if (!IS_ERR(rkey)) | ||
150 | cFYI(1, ("%s: resolved: %s to %s", __func__, | ||
151 | name, | ||
152 | *ip_addr | ||
153 | )); | ||
153 | rc = 0; | 154 | rc = 0; |
154 | } else { | 155 | } else { |
155 | rc = -ENOMEM; | 156 | rc = -ENOMEM; |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 31a0a33b9d95..0aac824371a5 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -75,7 +75,11 @@ static inline int cifs_convert_flags(unsigned int flags) | |||
75 | return (GENERIC_READ | GENERIC_WRITE); | 75 | return (GENERIC_READ | GENERIC_WRITE); |
76 | } | 76 | } |
77 | 77 | ||
78 | return 0x20197; | 78 | return (READ_CONTROL | FILE_WRITE_ATTRIBUTES | FILE_READ_ATTRIBUTES | |
79 | FILE_WRITE_EA | FILE_APPEND_DATA | FILE_WRITE_DATA | | ||
80 | FILE_READ_DATA); | ||
81 | |||
82 | |||
79 | } | 83 | } |
80 | 84 | ||
81 | static inline int cifs_get_disposition(unsigned int flags) | 85 | static inline int cifs_get_disposition(unsigned int flags) |
@@ -542,7 +546,6 @@ int cifs_close(struct inode *inode, struct file *file) | |||
542 | msleep(timeout); | 546 | msleep(timeout); |
543 | timeout *= 8; | 547 | timeout *= 8; |
544 | } | 548 | } |
545 | kfree(pSMBFile->search_resume_name); | ||
546 | kfree(file->private_data); | 549 | kfree(file->private_data); |
547 | file->private_data = NULL; | 550 | file->private_data = NULL; |
548 | } else | 551 | } else |
@@ -601,12 +604,6 @@ int cifs_closedir(struct inode *inode, struct file *file) | |||
601 | else | 604 | else |
602 | cifs_buf_release(ptmp); | 605 | cifs_buf_release(ptmp); |
603 | } | 606 | } |
604 | ptmp = pCFileStruct->search_resume_name; | ||
605 | if (ptmp) { | ||
606 | cFYI(1, ("closedir free resume name")); | ||
607 | pCFileStruct->search_resume_name = NULL; | ||
608 | kfree(ptmp); | ||
609 | } | ||
610 | kfree(file->private_data); | 607 | kfree(file->private_data); |
611 | file->private_data = NULL; | 608 | file->private_data = NULL; |
612 | } | 609 | } |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index fcbdbb6ad7bf..722be543ceec 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -161,118 +161,115 @@ static void cifs_unix_info_to_inode(struct inode *inode, | |||
161 | spin_unlock(&inode->i_lock); | 161 | spin_unlock(&inode->i_lock); |
162 | } | 162 | } |
163 | 163 | ||
164 | static const unsigned char *cifs_get_search_path(struct cifs_sb_info *cifs_sb, | ||
165 | const char *search_path) | ||
166 | { | ||
167 | int tree_len; | ||
168 | int path_len; | ||
169 | int i; | ||
170 | char *tmp_path; | ||
171 | struct cifsTconInfo *pTcon = cifs_sb->tcon; | ||
172 | |||
173 | if (!(pTcon->Flags & SMB_SHARE_IS_IN_DFS)) | ||
174 | return search_path; | ||
175 | |||
176 | /* use full path name for working with DFS */ | ||
177 | tree_len = strnlen(pTcon->treeName, MAX_TREE_SIZE + 1); | ||
178 | path_len = strnlen(search_path, MAX_PATHCONF); | ||
179 | 164 | ||
180 | tmp_path = kmalloc(tree_len+path_len+1, GFP_KERNEL); | 165 | /* |
181 | if (tmp_path == NULL) | 166 | * Needed to setup inode data for the directory which is the |
182 | return search_path; | 167 | * junction to the new submount (ie to setup the fake directory |
168 | * which represents a DFS referral) | ||
169 | */ | ||
170 | static void fill_fake_finddataunix(FILE_UNIX_BASIC_INFO *pfnd_dat, | ||
171 | struct super_block *sb) | ||
172 | { | ||
173 | struct inode *pinode = NULL; | ||
174 | |||
175 | memset(pfnd_dat, 0, sizeof(FILE_UNIX_BASIC_INFO)); | ||
176 | |||
177 | /* __le64 pfnd_dat->EndOfFile = cpu_to_le64(0); | ||
178 | __le64 pfnd_dat->NumOfBytes = cpu_to_le64(0); | ||
179 | __u64 UniqueId = 0; */ | ||
180 | pfnd_dat->LastStatusChange = | ||
181 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
182 | pfnd_dat->LastAccessTime = | ||
183 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
184 | pfnd_dat->LastModificationTime = | ||
185 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
186 | pfnd_dat->Type = cpu_to_le32(UNIX_DIR); | ||
187 | pfnd_dat->Permissions = cpu_to_le64(S_IXUGO | S_IRWXU); | ||
188 | pfnd_dat->Nlinks = cpu_to_le64(2); | ||
189 | if (sb->s_root) | ||
190 | pinode = sb->s_root->d_inode; | ||
191 | if (pinode == NULL) | ||
192 | return; | ||
183 | 193 | ||
184 | strncpy(tmp_path, pTcon->treeName, tree_len); | 194 | /* fill in default values for the remaining based on root |
185 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) | 195 | inode since we can not query the server for this inode info */ |
186 | for (i = 0; i < tree_len; i++) { | 196 | pfnd_dat->DevMajor = cpu_to_le64(MAJOR(pinode->i_rdev)); |
187 | if (tmp_path[i] == '\\') | 197 | pfnd_dat->DevMinor = cpu_to_le64(MINOR(pinode->i_rdev)); |
188 | tmp_path[i] = '/'; | 198 | pfnd_dat->Uid = cpu_to_le64(pinode->i_uid); |
189 | } | 199 | pfnd_dat->Gid = cpu_to_le64(pinode->i_gid); |
190 | strncpy(tmp_path+tree_len, search_path, path_len); | ||
191 | tmp_path[tree_len+path_len] = 0; | ||
192 | return tmp_path; | ||
193 | } | 200 | } |
194 | 201 | ||
195 | int cifs_get_inode_info_unix(struct inode **pinode, | 202 | int cifs_get_inode_info_unix(struct inode **pinode, |
196 | const unsigned char *search_path, struct super_block *sb, int xid) | 203 | const unsigned char *full_path, struct super_block *sb, int xid) |
197 | { | 204 | { |
198 | int rc = 0; | 205 | int rc = 0; |
199 | FILE_UNIX_BASIC_INFO findData; | 206 | FILE_UNIX_BASIC_INFO find_data; |
200 | struct cifsTconInfo *pTcon; | 207 | struct cifsTconInfo *pTcon; |
201 | struct inode *inode; | 208 | struct inode *inode; |
202 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 209 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
203 | const unsigned char *full_path; | ||
204 | bool is_dfs_referral = false; | 210 | bool is_dfs_referral = false; |
211 | struct cifsInodeInfo *cifsInfo; | ||
212 | __u64 num_of_bytes; | ||
213 | __u64 end_of_file; | ||
205 | 214 | ||
206 | pTcon = cifs_sb->tcon; | 215 | pTcon = cifs_sb->tcon; |
207 | cFYI(1, ("Getting info on %s", search_path)); | 216 | cFYI(1, ("Getting info on %s", full_path)); |
208 | |||
209 | full_path = cifs_get_search_path(cifs_sb, search_path); | ||
210 | 217 | ||
211 | try_again_CIFSSMBUnixQPathInfo: | ||
212 | /* could have done a find first instead but this returns more info */ | 218 | /* could have done a find first instead but this returns more info */ |
213 | rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &findData, | 219 | rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &find_data, |
214 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 220 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
215 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 221 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
216 | /* dump_mem("\nUnixQPathInfo return data", &findData, | ||
217 | sizeof(findData)); */ | ||
218 | if (rc) { | 222 | if (rc) { |
219 | if (rc == -EREMOTE && !is_dfs_referral) { | 223 | if (rc == -EREMOTE && !is_dfs_referral) { |
220 | is_dfs_referral = true; | 224 | is_dfs_referral = true; |
221 | if (full_path != search_path) { | 225 | cFYI(DBG2, ("DFS ref")); |
222 | kfree(full_path); | 226 | /* for DFS, server does not give us real inode data */ |
223 | full_path = search_path; | 227 | fill_fake_finddataunix(&find_data, sb); |
224 | } | 228 | rc = 0; |
225 | goto try_again_CIFSSMBUnixQPathInfo; | ||
226 | } | 229 | } |
227 | goto cgiiu_exit; | 230 | } |
228 | } else { | 231 | num_of_bytes = le64_to_cpu(find_data.NumOfBytes); |
229 | struct cifsInodeInfo *cifsInfo; | 232 | end_of_file = le64_to_cpu(find_data.EndOfFile); |
230 | __u64 num_of_bytes = le64_to_cpu(findData.NumOfBytes); | ||
231 | __u64 end_of_file = le64_to_cpu(findData.EndOfFile); | ||
232 | 233 | ||
233 | /* get new inode */ | 234 | /* get new inode */ |
235 | if (*pinode == NULL) { | ||
236 | *pinode = new_inode(sb); | ||
234 | if (*pinode == NULL) { | 237 | if (*pinode == NULL) { |
235 | *pinode = new_inode(sb); | 238 | rc = -ENOMEM; |
236 | if (*pinode == NULL) { | 239 | goto cgiiu_exit; |
237 | rc = -ENOMEM; | ||
238 | goto cgiiu_exit; | ||
239 | } | ||
240 | /* Is an i_ino of zero legal? */ | ||
241 | /* Are there sanity checks we can use to ensure that | ||
242 | the server is really filling in that field? */ | ||
243 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | ||
244 | (*pinode)->i_ino = | ||
245 | (unsigned long)findData.UniqueId; | ||
246 | } /* note ino incremented to unique num in new_inode */ | ||
247 | if (sb->s_flags & MS_NOATIME) | ||
248 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; | ||
249 | |||
250 | insert_inode_hash(*pinode); | ||
251 | } | 240 | } |
241 | /* Is an i_ino of zero legal? */ | ||
242 | /* note ino incremented to unique num in new_inode */ | ||
243 | /* Are there sanity checks we can use to ensure that | ||
244 | the server is really filling in that field? */ | ||
245 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) | ||
246 | (*pinode)->i_ino = (unsigned long)find_data.UniqueId; | ||
252 | 247 | ||
253 | inode = *pinode; | 248 | if (sb->s_flags & MS_NOATIME) |
254 | cifsInfo = CIFS_I(inode); | 249 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; |
255 | 250 | ||
256 | cFYI(1, ("Old time %ld", cifsInfo->time)); | 251 | insert_inode_hash(*pinode); |
257 | cifsInfo->time = jiffies; | 252 | } |
258 | cFYI(1, ("New time %ld", cifsInfo->time)); | 253 | |
259 | /* this is ok to set on every inode revalidate */ | 254 | inode = *pinode; |
260 | atomic_set(&cifsInfo->inUse, 1); | 255 | cifsInfo = CIFS_I(inode); |
261 | 256 | ||
262 | cifs_unix_info_to_inode(inode, &findData, 0); | 257 | cFYI(1, ("Old time %ld", cifsInfo->time)); |
258 | cifsInfo->time = jiffies; | ||
259 | cFYI(1, ("New time %ld", cifsInfo->time)); | ||
260 | /* this is ok to set on every inode revalidate */ | ||
261 | atomic_set(&cifsInfo->inUse, 1); | ||
263 | 262 | ||
263 | cifs_unix_info_to_inode(inode, &find_data, 0); | ||
264 | 264 | ||
265 | if (num_of_bytes < end_of_file) | 265 | if (num_of_bytes < end_of_file) |
266 | cFYI(1, ("allocation size less than end of file")); | 266 | cFYI(1, ("allocation size less than end of file")); |
267 | cFYI(1, ("Size %ld and blocks %llu", | 267 | cFYI(1, ("Size %ld and blocks %llu", |
268 | (unsigned long) inode->i_size, | 268 | (unsigned long) inode->i_size, |
269 | (unsigned long long)inode->i_blocks)); | 269 | (unsigned long long)inode->i_blocks)); |
270 | 270 | ||
271 | cifs_set_ops(inode, is_dfs_referral); | 271 | cifs_set_ops(inode, is_dfs_referral); |
272 | } | ||
273 | cgiiu_exit: | 272 | cgiiu_exit: |
274 | if (full_path != search_path) | ||
275 | kfree(full_path); | ||
276 | return rc; | 273 | return rc; |
277 | } | 274 | } |
278 | 275 | ||
@@ -379,21 +376,52 @@ static int get_sfu_mode(struct inode *inode, | |||
379 | #endif | 376 | #endif |
380 | } | 377 | } |
381 | 378 | ||
379 | /* | ||
380 | * Needed to setup inode data for the directory which is the | ||
381 | * junction to the new submount (ie to setup the fake directory | ||
382 | * which represents a DFS referral) | ||
383 | */ | ||
384 | static void fill_fake_finddata(FILE_ALL_INFO *pfnd_dat, | ||
385 | struct super_block *sb) | ||
386 | { | ||
387 | memset(pfnd_dat, 0, sizeof(FILE_ALL_INFO)); | ||
388 | |||
389 | /* __le64 pfnd_dat->AllocationSize = cpu_to_le64(0); | ||
390 | __le64 pfnd_dat->EndOfFile = cpu_to_le64(0); | ||
391 | __u8 pfnd_dat->DeletePending = 0; | ||
392 | __u8 pfnd_data->Directory = 0; | ||
393 | __le32 pfnd_dat->EASize = 0; | ||
394 | __u64 pfnd_dat->IndexNumber = 0; | ||
395 | __u64 pfnd_dat->IndexNumber1 = 0; */ | ||
396 | pfnd_dat->CreationTime = | ||
397 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
398 | pfnd_dat->LastAccessTime = | ||
399 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
400 | pfnd_dat->LastWriteTime = | ||
401 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
402 | pfnd_dat->ChangeTime = | ||
403 | cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME)); | ||
404 | pfnd_dat->Attributes = cpu_to_le32(ATTR_DIRECTORY); | ||
405 | pfnd_dat->NumberOfLinks = cpu_to_le32(2); | ||
406 | } | ||
407 | |||
382 | int cifs_get_inode_info(struct inode **pinode, | 408 | int cifs_get_inode_info(struct inode **pinode, |
383 | const unsigned char *search_path, FILE_ALL_INFO *pfindData, | 409 | const unsigned char *full_path, FILE_ALL_INFO *pfindData, |
384 | struct super_block *sb, int xid, const __u16 *pfid) | 410 | struct super_block *sb, int xid, const __u16 *pfid) |
385 | { | 411 | { |
386 | int rc = 0; | 412 | int rc = 0; |
413 | __u32 attr; | ||
414 | struct cifsInodeInfo *cifsInfo; | ||
387 | struct cifsTconInfo *pTcon; | 415 | struct cifsTconInfo *pTcon; |
388 | struct inode *inode; | 416 | struct inode *inode; |
389 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 417 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
390 | const unsigned char *full_path = NULL; | ||
391 | char *buf = NULL; | 418 | char *buf = NULL; |
392 | bool adjustTZ = false; | 419 | bool adjustTZ = false; |
393 | bool is_dfs_referral = false; | 420 | bool is_dfs_referral = false; |
421 | umode_t default_mode; | ||
394 | 422 | ||
395 | pTcon = cifs_sb->tcon; | 423 | pTcon = cifs_sb->tcon; |
396 | cFYI(1, ("Getting info on %s", search_path)); | 424 | cFYI(1, ("Getting info on %s", full_path)); |
397 | 425 | ||
398 | if ((pfindData == NULL) && (*pinode != NULL)) { | 426 | if ((pfindData == NULL) && (*pinode != NULL)) { |
399 | if (CIFS_I(*pinode)->clientCanCacheRead) { | 427 | if (CIFS_I(*pinode)->clientCanCacheRead) { |
@@ -409,9 +437,6 @@ int cifs_get_inode_info(struct inode **pinode, | |||
409 | return -ENOMEM; | 437 | return -ENOMEM; |
410 | pfindData = (FILE_ALL_INFO *)buf; | 438 | pfindData = (FILE_ALL_INFO *)buf; |
411 | 439 | ||
412 | full_path = cifs_get_search_path(cifs_sb, search_path); | ||
413 | |||
414 | try_again_CIFSSMBQPathInfo: | ||
415 | /* could do find first instead but this returns more info */ | 440 | /* could do find first instead but this returns more info */ |
416 | rc = CIFSSMBQPathInfo(xid, pTcon, full_path, pfindData, | 441 | rc = CIFSSMBQPathInfo(xid, pTcon, full_path, pfindData, |
417 | 0 /* not legacy */, | 442 | 0 /* not legacy */, |
@@ -429,178 +454,163 @@ try_again_CIFSSMBQPathInfo: | |||
429 | } | 454 | } |
430 | } | 455 | } |
431 | /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ | 456 | /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ |
432 | if (rc) { | 457 | if (rc == -EREMOTE) { |
433 | if (rc == -EREMOTE && !is_dfs_referral) { | 458 | is_dfs_referral = true; |
434 | is_dfs_referral = true; | 459 | fill_fake_finddata(pfindData, sb); |
435 | if (full_path != search_path) { | 460 | rc = 0; |
436 | kfree(full_path); | 461 | } else if (rc) |
437 | full_path = search_path; | ||
438 | } | ||
439 | goto try_again_CIFSSMBQPathInfo; | ||
440 | } | ||
441 | goto cgii_exit; | 462 | goto cgii_exit; |
442 | } else { | ||
443 | struct cifsInodeInfo *cifsInfo; | ||
444 | __u32 attr = le32_to_cpu(pfindData->Attributes); | ||
445 | |||
446 | /* get new inode */ | ||
447 | if (*pinode == NULL) { | ||
448 | *pinode = new_inode(sb); | ||
449 | if (*pinode == NULL) { | ||
450 | rc = -ENOMEM; | ||
451 | goto cgii_exit; | ||
452 | } | ||
453 | /* Is an i_ino of zero legal? Can we use that to check | ||
454 | if the server supports returning inode numbers? Are | ||
455 | there other sanity checks we can use to ensure that | ||
456 | the server is really filling in that field? */ | ||
457 | |||
458 | /* We can not use the IndexNumber field by default from | ||
459 | Windows or Samba (in ALL_INFO buf) but we can request | ||
460 | it explicitly. It may not be unique presumably if | ||
461 | the server has multiple devices mounted under one | ||
462 | share */ | ||
463 | 463 | ||
464 | /* There may be higher info levels that work but are | 464 | attr = le32_to_cpu(pfindData->Attributes); |
465 | there Windows server or network appliances for which | ||
466 | IndexNumber field is not guaranteed unique? */ | ||
467 | 465 | ||
468 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 466 | /* get new inode */ |
469 | int rc1 = 0; | 467 | if (*pinode == NULL) { |
470 | __u64 inode_num; | 468 | *pinode = new_inode(sb); |
471 | 469 | if (*pinode == NULL) { | |
472 | rc1 = CIFSGetSrvInodeNumber(xid, pTcon, | 470 | rc = -ENOMEM; |
473 | search_path, &inode_num, | 471 | goto cgii_exit; |
472 | } | ||
473 | /* Is an i_ino of zero legal? Can we use that to check | ||
474 | if the server supports returning inode numbers? Are | ||
475 | there other sanity checks we can use to ensure that | ||
476 | the server is really filling in that field? */ | ||
477 | |||
478 | /* We can not use the IndexNumber field by default from | ||
479 | Windows or Samba (in ALL_INFO buf) but we can request | ||
480 | it explicitly. It may not be unique presumably if | ||
481 | the server has multiple devices mounted under one share */ | ||
482 | |||
483 | /* There may be higher info levels that work but are | ||
484 | there Windows server or network appliances for which | ||
485 | IndexNumber field is not guaranteed unique? */ | ||
486 | |||
487 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | ||
488 | int rc1 = 0; | ||
489 | __u64 inode_num; | ||
490 | |||
491 | rc1 = CIFSGetSrvInodeNumber(xid, pTcon, | ||
492 | full_path, &inode_num, | ||
474 | cifs_sb->local_nls, | 493 | cifs_sb->local_nls, |
475 | cifs_sb->mnt_cifs_flags & | 494 | cifs_sb->mnt_cifs_flags & |
476 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 495 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
477 | if (rc1) { | 496 | if (rc1) { |
478 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); | 497 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); |
479 | /* BB EOPNOSUPP disable SERVER_INUM? */ | 498 | /* BB EOPNOSUPP disable SERVER_INUM? */ |
480 | } else /* do we need cast or hash to ino? */ | 499 | } else /* do we need cast or hash to ino? */ |
481 | (*pinode)->i_ino = inode_num; | 500 | (*pinode)->i_ino = inode_num; |
482 | } /* else ino incremented to unique num in new_inode*/ | 501 | } /* else ino incremented to unique num in new_inode*/ |
483 | if (sb->s_flags & MS_NOATIME) | 502 | if (sb->s_flags & MS_NOATIME) |
484 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; | 503 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; |
485 | insert_inode_hash(*pinode); | 504 | insert_inode_hash(*pinode); |
486 | } | 505 | } |
487 | inode = *pinode; | 506 | inode = *pinode; |
488 | cifsInfo = CIFS_I(inode); | 507 | cifsInfo = CIFS_I(inode); |
489 | cifsInfo->cifsAttrs = attr; | 508 | cifsInfo->cifsAttrs = attr; |
490 | cFYI(1, ("Old time %ld", cifsInfo->time)); | 509 | cFYI(1, ("Old time %ld", cifsInfo->time)); |
491 | cifsInfo->time = jiffies; | 510 | cifsInfo->time = jiffies; |
492 | cFYI(1, ("New time %ld", cifsInfo->time)); | 511 | cFYI(1, ("New time %ld", cifsInfo->time)); |
493 | 512 | ||
494 | /* blksize needs to be multiple of two. So safer to default to | 513 | /* blksize needs to be multiple of two. So safer to default to |
495 | blksize and blkbits set in superblock so 2**blkbits and blksize | 514 | blksize and blkbits set in superblock so 2**blkbits and blksize |
496 | will match rather than setting to: | 515 | will match rather than setting to: |
497 | (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ | 516 | (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ |
498 | 517 | ||
499 | /* Linux can not store file creation time so ignore it */ | 518 | /* Linux can not store file creation time so ignore it */ |
500 | if (pfindData->LastAccessTime) | 519 | if (pfindData->LastAccessTime) |
501 | inode->i_atime = cifs_NTtimeToUnix | 520 | inode->i_atime = cifs_NTtimeToUnix |
502 | (le64_to_cpu(pfindData->LastAccessTime)); | 521 | (le64_to_cpu(pfindData->LastAccessTime)); |
503 | else /* do not need to use current_fs_time - time not stored */ | 522 | else /* do not need to use current_fs_time - time not stored */ |
504 | inode->i_atime = CURRENT_TIME; | 523 | inode->i_atime = CURRENT_TIME; |
505 | inode->i_mtime = | 524 | inode->i_mtime = |
506 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); | 525 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); |
507 | inode->i_ctime = | 526 | inode->i_ctime = |
508 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); | 527 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); |
509 | cFYI(0, ("Attributes came in as 0x%x", attr)); | 528 | cFYI(DBG2, ("Attributes came in as 0x%x", attr)); |
510 | if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { | 529 | if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { |
511 | inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; | 530 | inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; |
512 | inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; | 531 | inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; |
513 | } | 532 | } |
514 | 533 | ||
515 | /* set default mode. will override for dirs below */ | 534 | /* get default inode mode */ |
516 | if (atomic_read(&cifsInfo->inUse) == 0) | 535 | if (attr & ATTR_DIRECTORY) |
517 | /* new inode, can safely set these fields */ | 536 | default_mode = cifs_sb->mnt_dir_mode; |
518 | inode->i_mode = cifs_sb->mnt_file_mode; | 537 | else |
519 | else /* since we set the inode type below we need to mask off | 538 | default_mode = cifs_sb->mnt_file_mode; |
520 | to avoid strange results if type changes and both | 539 | |
521 | get orred in */ | 540 | /* set permission bits */ |
541 | if (atomic_read(&cifsInfo->inUse) == 0 || | ||
542 | (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0) | ||
543 | inode->i_mode = default_mode; | ||
544 | else { | ||
545 | /* just reenable write bits if !ATTR_READONLY */ | ||
546 | if ((inode->i_mode & S_IWUGO) == 0 && | ||
547 | (attr & ATTR_READONLY) == 0) | ||
548 | inode->i_mode |= (S_IWUGO & default_mode); | ||
522 | inode->i_mode &= ~S_IFMT; | 549 | inode->i_mode &= ~S_IFMT; |
523 | /* if (attr & ATTR_REPARSE) */ | 550 | } |
524 | /* We no longer handle these as symlinks because we could not | 551 | /* clear write bits if ATTR_READONLY is set */ |
525 | follow them due to the absolute path with drive letter */ | 552 | if (attr & ATTR_READONLY) |
526 | if (attr & ATTR_DIRECTORY) { | 553 | inode->i_mode &= ~S_IWUGO; |
527 | /* override default perms since we do not do byte range locking | 554 | |
528 | on dirs */ | 555 | /* set inode type */ |
529 | inode->i_mode = cifs_sb->mnt_dir_mode; | 556 | if ((attr & ATTR_SYSTEM) && |
530 | inode->i_mode |= S_IFDIR; | 557 | (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL)) { |
531 | } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && | 558 | /* no need to fix endianness on 0 */ |
532 | (cifsInfo->cifsAttrs & ATTR_SYSTEM) && | 559 | if (pfindData->EndOfFile == 0) |
533 | /* No need to le64 convert size of zero */ | ||
534 | (pfindData->EndOfFile == 0)) { | ||
535 | inode->i_mode = cifs_sb->mnt_file_mode; | ||
536 | inode->i_mode |= S_IFIFO; | 560 | inode->i_mode |= S_IFIFO; |
537 | /* BB Finish for SFU style symlinks and devices */ | 561 | else if (decode_sfu_inode(inode, |
538 | } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && | 562 | le64_to_cpu(pfindData->EndOfFile), |
539 | (cifsInfo->cifsAttrs & ATTR_SYSTEM)) { | 563 | full_path, cifs_sb, xid)) |
540 | if (decode_sfu_inode(inode, | 564 | cFYI(1, ("unknown SFU file type\n")); |
541 | le64_to_cpu(pfindData->EndOfFile), | 565 | } else { |
542 | search_path, | 566 | if (attr & ATTR_DIRECTORY) |
543 | cifs_sb, xid)) | 567 | inode->i_mode |= S_IFDIR; |
544 | cFYI(1, ("Unrecognized sfu inode type")); | 568 | else |
545 | |||
546 | cFYI(1, ("sfu mode 0%o", inode->i_mode)); | ||
547 | } else { | ||
548 | inode->i_mode |= S_IFREG; | 569 | inode->i_mode |= S_IFREG; |
549 | /* treat the dos attribute of read-only as read-only | 570 | } |
550 | mode e.g. 555 */ | ||
551 | if (cifsInfo->cifsAttrs & ATTR_READONLY) | ||
552 | inode->i_mode &= ~(S_IWUGO); | ||
553 | else if ((inode->i_mode & S_IWUGO) == 0) | ||
554 | /* the ATTR_READONLY flag may have been */ | ||
555 | /* changed on server -- set any w bits */ | ||
556 | /* allowed by mnt_file_mode */ | ||
557 | inode->i_mode |= (S_IWUGO & | ||
558 | cifs_sb->mnt_file_mode); | ||
559 | /* BB add code here - | ||
560 | validate if device or weird share or device type? */ | ||
561 | } | ||
562 | 571 | ||
563 | spin_lock(&inode->i_lock); | 572 | spin_lock(&inode->i_lock); |
564 | if (is_size_safe_to_change(cifsInfo, | 573 | if (is_size_safe_to_change(cifsInfo, |
565 | le64_to_cpu(pfindData->EndOfFile))) { | 574 | le64_to_cpu(pfindData->EndOfFile))) { |
566 | /* can not safely shrink the file size here if the | 575 | /* can not safely shrink the file size here if the |
567 | client is writing to it due to potential races */ | 576 | client is writing to it due to potential races */ |
568 | i_size_write(inode, le64_to_cpu(pfindData->EndOfFile)); | 577 | i_size_write(inode, le64_to_cpu(pfindData->EndOfFile)); |
569 | 578 | ||
570 | /* 512 bytes (2**9) is the fake blocksize that must be | 579 | /* 512 bytes (2**9) is the fake blocksize that must be |
571 | used for this calculation */ | 580 | used for this calculation */ |
572 | inode->i_blocks = (512 - 1 + le64_to_cpu( | 581 | inode->i_blocks = (512 - 1 + le64_to_cpu( |
573 | pfindData->AllocationSize)) >> 9; | 582 | pfindData->AllocationSize)) >> 9; |
574 | } | 583 | } |
575 | spin_unlock(&inode->i_lock); | 584 | spin_unlock(&inode->i_lock); |
576 | 585 | ||
577 | inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks); | 586 | inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks); |
578 | 587 | ||
579 | /* BB fill in uid and gid here? with help from winbind? | 588 | /* BB fill in uid and gid here? with help from winbind? |
580 | or retrieve from NTFS stream extended attribute */ | 589 | or retrieve from NTFS stream extended attribute */ |
581 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 590 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
582 | /* fill in 0777 bits from ACL */ | 591 | /* fill in 0777 bits from ACL */ |
583 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { | 592 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
584 | cFYI(1, ("Getting mode bits from ACL")); | 593 | cFYI(1, ("Getting mode bits from ACL")); |
585 | acl_to_uid_mode(inode, search_path, pfid); | 594 | acl_to_uid_mode(inode, full_path, pfid); |
586 | } | 595 | } |
587 | #endif | 596 | #endif |
588 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { | 597 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { |
589 | /* fill in remaining high mode bits e.g. SUID, VTX */ | 598 | /* fill in remaining high mode bits e.g. SUID, VTX */ |
590 | get_sfu_mode(inode, search_path, cifs_sb, xid); | 599 | get_sfu_mode(inode, full_path, cifs_sb, xid); |
591 | } else if (atomic_read(&cifsInfo->inUse) == 0) { | 600 | } else if (atomic_read(&cifsInfo->inUse) == 0) { |
592 | inode->i_uid = cifs_sb->mnt_uid; | 601 | inode->i_uid = cifs_sb->mnt_uid; |
593 | inode->i_gid = cifs_sb->mnt_gid; | 602 | inode->i_gid = cifs_sb->mnt_gid; |
594 | /* set so we do not keep refreshing these fields with | 603 | /* set so we do not keep refreshing these fields with |
595 | bad data after user has changed them in memory */ | 604 | bad data after user has changed them in memory */ |
596 | atomic_set(&cifsInfo->inUse, 1); | 605 | atomic_set(&cifsInfo->inUse, 1); |
597 | } | ||
598 | |||
599 | cifs_set_ops(inode, is_dfs_referral); | ||
600 | } | 606 | } |
607 | |||
608 | cifs_set_ops(inode, is_dfs_referral); | ||
609 | |||
610 | |||
611 | |||
612 | |||
601 | cgii_exit: | 613 | cgii_exit: |
602 | if (full_path != search_path) | ||
603 | kfree(full_path); | ||
604 | kfree(buf); | 614 | kfree(buf); |
605 | return rc; | 615 | return rc; |
606 | } | 616 | } |
@@ -1005,8 +1015,11 @@ mkdir_get_info: | |||
1005 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 1015 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
1006 | } | 1016 | } |
1007 | if (direntry->d_inode) { | 1017 | if (direntry->d_inode) { |
1008 | direntry->d_inode->i_mode = mode; | 1018 | if (cifs_sb->mnt_cifs_flags & |
1009 | direntry->d_inode->i_mode |= S_IFDIR; | 1019 | CIFS_MOUNT_DYNPERM) |
1020 | direntry->d_inode->i_mode = | ||
1021 | (mode | S_IFDIR); | ||
1022 | |||
1010 | if (cifs_sb->mnt_cifs_flags & | 1023 | if (cifs_sb->mnt_cifs_flags & |
1011 | CIFS_MOUNT_SET_UID) { | 1024 | CIFS_MOUNT_SET_UID) { |
1012 | direntry->d_inode->i_uid = | 1025 | direntry->d_inode->i_uid = |
@@ -1502,8 +1515,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1502 | int oplock = 0; | 1515 | int oplock = 0; |
1503 | 1516 | ||
1504 | rc = SMBLegacyOpen(xid, pTcon, full_path, | 1517 | rc = SMBLegacyOpen(xid, pTcon, full_path, |
1505 | FILE_OPEN, | 1518 | FILE_OPEN, GENERIC_WRITE, |
1506 | SYNCHRONIZE | FILE_WRITE_ATTRIBUTES, | ||
1507 | CREATE_NOT_DIR, &netfid, &oplock, | 1519 | CREATE_NOT_DIR, &netfid, &oplock, |
1508 | NULL, cifs_sb->local_nls, | 1520 | NULL, cifs_sb->local_nls, |
1509 | cifs_sb->mnt_cifs_flags & | 1521 | cifs_sb->mnt_cifs_flags & |
@@ -1534,13 +1546,26 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1534 | } else | 1546 | } else |
1535 | goto cifs_setattr_exit; | 1547 | goto cifs_setattr_exit; |
1536 | } | 1548 | } |
1537 | if (attrs->ia_valid & ATTR_UID) { | 1549 | |
1538 | cFYI(1, ("UID changed to %d", attrs->ia_uid)); | 1550 | /* |
1539 | uid = attrs->ia_uid; | 1551 | * Without unix extensions we can't send ownership changes to the |
1540 | } | 1552 | * server, so silently ignore them. This is consistent with how |
1541 | if (attrs->ia_valid & ATTR_GID) { | 1553 | * local DOS/Windows filesystems behave (VFAT, NTFS, etc). With |
1542 | cFYI(1, ("GID changed to %d", attrs->ia_gid)); | 1554 | * CIFSACL support + proper Windows to Unix idmapping, we may be |
1543 | gid = attrs->ia_gid; | 1555 | * able to support this in the future. |
1556 | */ | ||
1557 | if (!pTcon->unix_ext && | ||
1558 | !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) { | ||
1559 | attrs->ia_valid &= ~(ATTR_UID | ATTR_GID); | ||
1560 | } else { | ||
1561 | if (attrs->ia_valid & ATTR_UID) { | ||
1562 | cFYI(1, ("UID changed to %d", attrs->ia_uid)); | ||
1563 | uid = attrs->ia_uid; | ||
1564 | } | ||
1565 | if (attrs->ia_valid & ATTR_GID) { | ||
1566 | cFYI(1, ("GID changed to %d", attrs->ia_gid)); | ||
1567 | gid = attrs->ia_gid; | ||
1568 | } | ||
1544 | } | 1569 | } |
1545 | 1570 | ||
1546 | time_buf.Attributes = 0; | 1571 | time_buf.Attributes = 0; |
@@ -1550,7 +1575,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1550 | attrs->ia_valid &= ~ATTR_MODE; | 1575 | attrs->ia_valid &= ~ATTR_MODE; |
1551 | 1576 | ||
1552 | if (attrs->ia_valid & ATTR_MODE) { | 1577 | if (attrs->ia_valid & ATTR_MODE) { |
1553 | cFYI(1, ("Mode changed to 0x%x", attrs->ia_mode)); | 1578 | cFYI(1, ("Mode changed to 0%o", attrs->ia_mode)); |
1554 | mode = attrs->ia_mode; | 1579 | mode = attrs->ia_mode; |
1555 | } | 1580 | } |
1556 | 1581 | ||
@@ -1565,18 +1590,18 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1565 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 1590 | #ifdef CONFIG_CIFS_EXPERIMENTAL |
1566 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) | 1591 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) |
1567 | rc = mode_to_acl(inode, full_path, mode); | 1592 | rc = mode_to_acl(inode, full_path, mode); |
1568 | else if ((mode & S_IWUGO) == 0) { | 1593 | else |
1569 | #else | ||
1570 | if ((mode & S_IWUGO) == 0) { | ||
1571 | #endif | 1594 | #endif |
1572 | /* not writeable */ | 1595 | if (((mode & S_IWUGO) == 0) && |
1573 | if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) { | 1596 | (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { |
1574 | set_dosattr = true; | 1597 | set_dosattr = true; |
1575 | time_buf.Attributes = | 1598 | time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs | |
1576 | cpu_to_le32(cifsInode->cifsAttrs | | 1599 | ATTR_READONLY); |
1577 | ATTR_READONLY); | 1600 | /* fix up mode if we're not using dynperm */ |
1578 | } | 1601 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0) |
1579 | } else if (cifsInode->cifsAttrs & ATTR_READONLY) { | 1602 | attrs->ia_mode = inode->i_mode & ~S_IWUGO; |
1603 | } else if ((mode & S_IWUGO) && | ||
1604 | (cifsInode->cifsAttrs & ATTR_READONLY)) { | ||
1580 | /* If file is readonly on server, we would | 1605 | /* If file is readonly on server, we would |
1581 | not be able to write to it - so if any write | 1606 | not be able to write to it - so if any write |
1582 | bit is enabled for user or group or other we | 1607 | bit is enabled for user or group or other we |
@@ -1587,6 +1612,20 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1587 | /* Windows ignores set to zero */ | 1612 | /* Windows ignores set to zero */ |
1588 | if (time_buf.Attributes == 0) | 1613 | if (time_buf.Attributes == 0) |
1589 | time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL); | 1614 | time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL); |
1615 | |||
1616 | /* reset local inode permissions to normal */ | ||
1617 | if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) { | ||
1618 | attrs->ia_mode &= ~(S_IALLUGO); | ||
1619 | if (S_ISDIR(inode->i_mode)) | ||
1620 | attrs->ia_mode |= | ||
1621 | cifs_sb->mnt_dir_mode; | ||
1622 | else | ||
1623 | attrs->ia_mode |= | ||
1624 | cifs_sb->mnt_file_mode; | ||
1625 | } | ||
1626 | } else if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) { | ||
1627 | /* ignore mode change - ATTR_READONLY hasn't changed */ | ||
1628 | attrs->ia_valid &= ~ATTR_MODE; | ||
1590 | } | 1629 | } |
1591 | } | 1630 | } |
1592 | 1631 | ||
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 5c792df13d62..0088a5b52564 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -30,9 +30,9 @@ | |||
30 | 30 | ||
31 | #define CIFS_IOC_CHECKUMOUNT _IO(0xCF, 2) | 31 | #define CIFS_IOC_CHECKUMOUNT _IO(0xCF, 2) |
32 | 32 | ||
33 | int cifs_ioctl(struct inode *inode, struct file *filep, | 33 | long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) |
34 | unsigned int command, unsigned long arg) | ||
35 | { | 34 | { |
35 | struct inode *inode = filep->f_dentry->d_inode; | ||
36 | int rc = -ENOTTY; /* strange error - but the precedent */ | 36 | int rc = -ENOTTY; /* strange error - but the precedent */ |
37 | int xid; | 37 | int xid; |
38 | struct cifs_sb_info *cifs_sb; | 38 | struct cifs_sb_info *cifs_sb; |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 1c2c3ce5020b..63f644000ce5 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -234,7 +234,6 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
234 | struct cifs_sb_info *cifs_sb; | 234 | struct cifs_sb_info *cifs_sb; |
235 | struct cifsTconInfo *pTcon; | 235 | struct cifsTconInfo *pTcon; |
236 | char *full_path = NULL; | 236 | char *full_path = NULL; |
237 | char *tmp_path = NULL; | ||
238 | char *tmpbuffer; | 237 | char *tmpbuffer; |
239 | int len; | 238 | int len; |
240 | __u16 fid; | 239 | __u16 fid; |
@@ -295,45 +294,9 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen) | |||
295 | cFYI(1, ("Error closing junction point " | 294 | cFYI(1, ("Error closing junction point " |
296 | "(open for ioctl)")); | 295 | "(open for ioctl)")); |
297 | } | 296 | } |
298 | /* BB unwind this long, nested function, or remove BB */ | 297 | /* If it is a DFS junction earlier we would have gotten |
299 | if (rc == -EIO) { | 298 | PATH_NOT_COVERED returned from server so we do |
300 | /* Query if DFS Junction */ | 299 | not need to request the DFS info here */ |
301 | unsigned int num_referrals = 0; | ||
302 | struct dfs_info3_param *refs = NULL; | ||
303 | tmp_path = | ||
304 | kmalloc(MAX_TREE_SIZE + MAX_PATHCONF + 1, | ||
305 | GFP_KERNEL); | ||
306 | if (tmp_path) { | ||
307 | strncpy(tmp_path, pTcon->treeName, | ||
308 | MAX_TREE_SIZE); | ||
309 | strncat(tmp_path, full_path, | ||
310 | MAX_PATHCONF); | ||
311 | rc = get_dfs_path(xid, pTcon->ses, | ||
312 | tmp_path, | ||
313 | cifs_sb->local_nls, | ||
314 | &num_referrals, &refs, | ||
315 | cifs_sb->mnt_cifs_flags & | ||
316 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
317 | cFYI(1, ("Get DFS for %s rc = %d ", | ||
318 | tmp_path, rc)); | ||
319 | if ((num_referrals == 0) && (rc == 0)) | ||
320 | rc = -EACCES; | ||
321 | else { | ||
322 | cFYI(1, ("num referral: %d", | ||
323 | num_referrals)); | ||
324 | if (refs && refs->path_name) { | ||
325 | strncpy(tmpbuffer, | ||
326 | refs->path_name, | ||
327 | len-1); | ||
328 | } | ||
329 | } | ||
330 | kfree(refs); | ||
331 | kfree(tmp_path); | ||
332 | } | ||
333 | /* BB add code like else decode referrals | ||
334 | then memcpy to tmpbuffer and free referrals | ||
335 | string array BB */ | ||
336 | } | ||
337 | } | 300 | } |
338 | } | 301 | } |
339 | /* BB Anything else to do to handle recursive links? */ | 302 | /* BB Anything else to do to handle recursive links? */ |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 1d69b8014e0b..4b17f8fe3157 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -519,8 +519,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
519 | pnotify = (struct file_notify_information *) | 519 | pnotify = (struct file_notify_information *) |
520 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 520 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
521 | cFYI(1, ("dnotify on %s Action: 0x%x", | 521 | cFYI(1, ("dnotify on %s Action: 0x%x", |
522 | pnotify->FileName, | 522 | pnotify->FileName, pnotify->Action)); |
523 | pnotify->Action)); /* BB removeme BB */ | ||
524 | /* cifs_dump_mem("Rcvd notify Data: ",buf, | 523 | /* cifs_dump_mem("Rcvd notify Data: ",buf, |
525 | sizeof(struct smb_hdr)+60); */ | 524 | sizeof(struct smb_hdr)+60); */ |
526 | return true; | 525 | return true; |
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 00f4cff400b3..8703d68f5b20 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
@@ -141,11 +141,11 @@ cifs_inet_pton(const int address_family, const char *cp, void *dst) | |||
141 | int ret = 0; | 141 | int ret = 0; |
142 | 142 | ||
143 | /* calculate length by finding first slash or NULL */ | 143 | /* calculate length by finding first slash or NULL */ |
144 | if (address_family == AF_INET) { | 144 | if (address_family == AF_INET) |
145 | ret = in4_pton(cp, -1 /* len */, dst, '\\', NULL); | 145 | ret = in4_pton(cp, -1 /* len */, dst, '\\', NULL); |
146 | } else if (address_family == AF_INET6) { | 146 | else if (address_family == AF_INET6) |
147 | ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); | 147 | ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); |
148 | } | 148 | |
149 | cFYI(DBG2, ("address conversion returned %d for %s", ret, cp)); | 149 | cFYI(DBG2, ("address conversion returned %d for %s", ret, cp)); |
150 | if (ret > 0) | 150 | if (ret > 0) |
151 | ret = 1; | 151 | ret = 1; |
diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h index 7170a9b70f1e..c377d8065d99 100644 --- a/fs/cifs/ntlmssp.h +++ b/fs/cifs/ntlmssp.h | |||
@@ -64,7 +64,7 @@ typedef struct _SECURITY_BUFFER { | |||
64 | } __attribute__((packed)) SECURITY_BUFFER; | 64 | } __attribute__((packed)) SECURITY_BUFFER; |
65 | 65 | ||
66 | typedef struct _NEGOTIATE_MESSAGE { | 66 | typedef struct _NEGOTIATE_MESSAGE { |
67 | __u8 Signature[sizeof (NTLMSSP_SIGNATURE)]; | 67 | __u8 Signature[sizeof(NTLMSSP_SIGNATURE)]; |
68 | __le32 MessageType; /* 1 */ | 68 | __le32 MessageType; /* 1 */ |
69 | __le32 NegotiateFlags; | 69 | __le32 NegotiateFlags; |
70 | SECURITY_BUFFER DomainName; /* RFC 1001 style and ASCII */ | 70 | SECURITY_BUFFER DomainName; /* RFC 1001 style and ASCII */ |
@@ -74,7 +74,7 @@ typedef struct _NEGOTIATE_MESSAGE { | |||
74 | } __attribute__((packed)) NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE; | 74 | } __attribute__((packed)) NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE; |
75 | 75 | ||
76 | typedef struct _CHALLENGE_MESSAGE { | 76 | typedef struct _CHALLENGE_MESSAGE { |
77 | __u8 Signature[sizeof (NTLMSSP_SIGNATURE)]; | 77 | __u8 Signature[sizeof(NTLMSSP_SIGNATURE)]; |
78 | __le32 MessageType; /* 2 */ | 78 | __le32 MessageType; /* 2 */ |
79 | SECURITY_BUFFER TargetName; | 79 | SECURITY_BUFFER TargetName; |
80 | __le32 NegotiateFlags; | 80 | __le32 NegotiateFlags; |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 34ec32100c72..83f306954883 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -132,6 +132,7 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type, | |||
132 | __u32 attr; | 132 | __u32 attr; |
133 | __u64 allocation_size; | 133 | __u64 allocation_size; |
134 | __u64 end_of_file; | 134 | __u64 end_of_file; |
135 | umode_t default_mode; | ||
135 | 136 | ||
136 | /* save mtime and size */ | 137 | /* save mtime and size */ |
137 | local_mtime = tmp_inode->i_mtime; | 138 | local_mtime = tmp_inode->i_mtime; |
@@ -187,48 +188,54 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type, | |||
187 | if (atomic_read(&cifsInfo->inUse) == 0) { | 188 | if (atomic_read(&cifsInfo->inUse) == 0) { |
188 | tmp_inode->i_uid = cifs_sb->mnt_uid; | 189 | tmp_inode->i_uid = cifs_sb->mnt_uid; |
189 | tmp_inode->i_gid = cifs_sb->mnt_gid; | 190 | tmp_inode->i_gid = cifs_sb->mnt_gid; |
190 | /* set default mode. will override for dirs below */ | 191 | } |
191 | tmp_inode->i_mode = cifs_sb->mnt_file_mode; | 192 | |
192 | } else { | 193 | if (attr & ATTR_DIRECTORY) |
193 | /* mask off the type bits since it gets set | 194 | default_mode = cifs_sb->mnt_dir_mode; |
194 | below and we do not want to get two type | 195 | else |
195 | bits set */ | 196 | default_mode = cifs_sb->mnt_file_mode; |
197 | |||
198 | /* set initial permissions */ | ||
199 | if ((atomic_read(&cifsInfo->inUse) == 0) || | ||
200 | (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0) | ||
201 | tmp_inode->i_mode = default_mode; | ||
202 | else { | ||
203 | /* just reenable write bits if !ATTR_READONLY */ | ||
204 | if ((tmp_inode->i_mode & S_IWUGO) == 0 && | ||
205 | (attr & ATTR_READONLY) == 0) | ||
206 | tmp_inode->i_mode |= (S_IWUGO & default_mode); | ||
207 | |||
196 | tmp_inode->i_mode &= ~S_IFMT; | 208 | tmp_inode->i_mode &= ~S_IFMT; |
197 | } | 209 | } |
198 | 210 | ||
199 | if (attr & ATTR_DIRECTORY) { | 211 | /* clear write bits if ATTR_READONLY is set */ |
200 | *pobject_type = DT_DIR; | 212 | if (attr & ATTR_READONLY) |
201 | /* override default perms since we do not lock dirs */ | 213 | tmp_inode->i_mode &= ~S_IWUGO; |
202 | if (atomic_read(&cifsInfo->inUse) == 0) | 214 | |
203 | tmp_inode->i_mode = cifs_sb->mnt_dir_mode; | 215 | /* set inode type */ |
204 | tmp_inode->i_mode |= S_IFDIR; | 216 | if ((attr & ATTR_SYSTEM) && |
205 | } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && | 217 | (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL)) { |
206 | (attr & ATTR_SYSTEM)) { | ||
207 | if (end_of_file == 0) { | 218 | if (end_of_file == 0) { |
208 | *pobject_type = DT_FIFO; | ||
209 | tmp_inode->i_mode |= S_IFIFO; | 219 | tmp_inode->i_mode |= S_IFIFO; |
220 | *pobject_type = DT_FIFO; | ||
210 | } else { | 221 | } else { |
211 | /* rather than get the type here, we mark the | 222 | /* |
212 | inode as needing revalidate and get the real type | 223 | * trying to get the type can be slow, so just call |
213 | (blk vs chr vs. symlink) later ie in lookup */ | 224 | * this a regular file for now, and mark for reval |
214 | *pobject_type = DT_REG; | 225 | */ |
215 | tmp_inode->i_mode |= S_IFREG; | 226 | tmp_inode->i_mode |= S_IFREG; |
227 | *pobject_type = DT_REG; | ||
216 | cifsInfo->time = 0; | 228 | cifsInfo->time = 0; |
217 | } | 229 | } |
218 | /* we no longer mark these because we could not follow them */ | ||
219 | /* } else if (attr & ATTR_REPARSE) { | ||
220 | *pobject_type = DT_LNK; | ||
221 | tmp_inode->i_mode |= S_IFLNK; */ | ||
222 | } else { | 230 | } else { |
223 | *pobject_type = DT_REG; | 231 | if (attr & ATTR_DIRECTORY) { |
224 | tmp_inode->i_mode |= S_IFREG; | 232 | tmp_inode->i_mode |= S_IFDIR; |
225 | if (attr & ATTR_READONLY) | 233 | *pobject_type = DT_DIR; |
226 | tmp_inode->i_mode &= ~(S_IWUGO); | 234 | } else { |
227 | else if ((tmp_inode->i_mode & S_IWUGO) == 0) | 235 | tmp_inode->i_mode |= S_IFREG; |
228 | /* the ATTR_READONLY flag may have been changed on */ | 236 | *pobject_type = DT_REG; |
229 | /* server -- set any w bits allowed by mnt_file_mode */ | 237 | } |
230 | tmp_inode->i_mode |= (S_IWUGO & cifs_sb->mnt_file_mode); | 238 | } |
231 | } /* could add code here - to validate if device or weird share type? */ | ||
232 | 239 | ||
233 | /* can not fill in nlink here as in qpathinfo version and Unx search */ | 240 | /* can not fill in nlink here as in qpathinfo version and Unx search */ |
234 | if (atomic_read(&cifsInfo->inUse) == 0) | 241 | if (atomic_read(&cifsInfo->inUse) == 0) |
@@ -670,10 +677,11 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
670 | (index_to_find < first_entry_in_buffer)) { | 677 | (index_to_find < first_entry_in_buffer)) { |
671 | /* close and restart search */ | 678 | /* close and restart search */ |
672 | cFYI(1, ("search backing up - close and restart search")); | 679 | cFYI(1, ("search backing up - close and restart search")); |
673 | cifsFile->invalidHandle = true; | 680 | if (!cifsFile->srch_inf.endOfSearch && |
674 | CIFSFindClose(xid, pTcon, cifsFile->netfid); | 681 | !cifsFile->invalidHandle) { |
675 | kfree(cifsFile->search_resume_name); | 682 | cifsFile->invalidHandle = true; |
676 | cifsFile->search_resume_name = NULL; | 683 | CIFSFindClose(xid, pTcon, cifsFile->netfid); |
684 | } | ||
677 | if (cifsFile->srch_inf.ntwrk_buf_start) { | 685 | if (cifsFile->srch_inf.ntwrk_buf_start) { |
678 | cFYI(1, ("freeing SMB ff cache buf on search rewind")); | 686 | cFYI(1, ("freeing SMB ff cache buf on search rewind")); |
679 | if (cifsFile->srch_inf.smallBuf) | 687 | if (cifsFile->srch_inf.smallBuf) |
@@ -1040,9 +1048,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
1040 | } /* else { | 1048 | } /* else { |
1041 | cifsFile->invalidHandle = true; | 1049 | cifsFile->invalidHandle = true; |
1042 | CIFSFindClose(xid, pTcon, cifsFile->netfid); | 1050 | CIFSFindClose(xid, pTcon, cifsFile->netfid); |
1043 | } | 1051 | } */ |
1044 | kfree(cifsFile->search_resume_name); | ||
1045 | cifsFile->search_resume_name = NULL; */ | ||
1046 | 1052 | ||
1047 | rc = find_cifs_entry(xid, pTcon, file, | 1053 | rc = find_cifs_entry(xid, pTcon, file, |
1048 | ¤t_entry, &num_to_fill); | 1054 | ¤t_entry, &num_to_fill); |
diff --git a/fs/compat.c b/fs/compat.c index 332a869d2c53..ed43e17a5dc6 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1405,7 +1405,7 @@ int compat_do_execve(char * filename, | |||
1405 | /* execve success */ | 1405 | /* execve success */ |
1406 | security_bprm_free(bprm); | 1406 | security_bprm_free(bprm); |
1407 | acct_update_integrals(current); | 1407 | acct_update_integrals(current); |
1408 | kfree(bprm); | 1408 | free_bprm(bprm); |
1409 | return retval; | 1409 | return retval; |
1410 | } | 1410 | } |
1411 | 1411 | ||
@@ -1424,7 +1424,7 @@ out_file: | |||
1424 | } | 1424 | } |
1425 | 1425 | ||
1426 | out_kfree: | 1426 | out_kfree: |
1427 | kfree(bprm); | 1427 | free_bprm(bprm); |
1428 | 1428 | ||
1429 | out_ret: | 1429 | out_ret: |
1430 | return retval; | 1430 | return retval; |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 7c1e5e5cccd8..637018c891ef 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/pagemap.h> | 50 | #include <linux/pagemap.h> |
51 | #include <linux/idr.h> | 51 | #include <linux/idr.h> |
52 | #include <linux/file.h> | 52 | #include <linux/file.h> |
53 | #include <linux/mutex.h> | ||
53 | #include <linux/sctp.h> | 54 | #include <linux/sctp.h> |
54 | #include <net/sctp/user.h> | 55 | #include <net/sctp/user.h> |
55 | 56 | ||
@@ -138,7 +139,7 @@ static struct workqueue_struct *recv_workqueue; | |||
138 | static struct workqueue_struct *send_workqueue; | 139 | static struct workqueue_struct *send_workqueue; |
139 | 140 | ||
140 | static DEFINE_IDR(connections_idr); | 141 | static DEFINE_IDR(connections_idr); |
141 | static DECLARE_MUTEX(connections_lock); | 142 | static DEFINE_MUTEX(connections_lock); |
142 | static int max_nodeid; | 143 | static int max_nodeid; |
143 | static struct kmem_cache *con_cache; | 144 | static struct kmem_cache *con_cache; |
144 | 145 | ||
@@ -205,9 +206,9 @@ static struct connection *nodeid2con(int nodeid, gfp_t allocation) | |||
205 | { | 206 | { |
206 | struct connection *con; | 207 | struct connection *con; |
207 | 208 | ||
208 | down(&connections_lock); | 209 | mutex_lock(&connections_lock); |
209 | con = __nodeid2con(nodeid, allocation); | 210 | con = __nodeid2con(nodeid, allocation); |
210 | up(&connections_lock); | 211 | mutex_unlock(&connections_lock); |
211 | 212 | ||
212 | return con; | 213 | return con; |
213 | } | 214 | } |
@@ -218,15 +219,15 @@ static struct connection *assoc2con(int assoc_id) | |||
218 | int i; | 219 | int i; |
219 | struct connection *con; | 220 | struct connection *con; |
220 | 221 | ||
221 | down(&connections_lock); | 222 | mutex_lock(&connections_lock); |
222 | for (i=0; i<=max_nodeid; i++) { | 223 | for (i=0; i<=max_nodeid; i++) { |
223 | con = __nodeid2con(i, 0); | 224 | con = __nodeid2con(i, 0); |
224 | if (con && con->sctp_assoc == assoc_id) { | 225 | if (con && con->sctp_assoc == assoc_id) { |
225 | up(&connections_lock); | 226 | mutex_unlock(&connections_lock); |
226 | return con; | 227 | return con; |
227 | } | 228 | } |
228 | } | 229 | } |
229 | up(&connections_lock); | 230 | mutex_unlock(&connections_lock); |
230 | return NULL; | 231 | return NULL; |
231 | } | 232 | } |
232 | 233 | ||
@@ -381,7 +382,7 @@ static void sctp_init_failed(void) | |||
381 | int i; | 382 | int i; |
382 | struct connection *con; | 383 | struct connection *con; |
383 | 384 | ||
384 | down(&connections_lock); | 385 | mutex_lock(&connections_lock); |
385 | for (i=1; i<=max_nodeid; i++) { | 386 | for (i=1; i<=max_nodeid; i++) { |
386 | con = __nodeid2con(i, 0); | 387 | con = __nodeid2con(i, 0); |
387 | if (!con) | 388 | if (!con) |
@@ -393,7 +394,7 @@ static void sctp_init_failed(void) | |||
393 | } | 394 | } |
394 | } | 395 | } |
395 | } | 396 | } |
396 | up(&connections_lock); | 397 | mutex_unlock(&connections_lock); |
397 | } | 398 | } |
398 | 399 | ||
399 | /* Something happened to an association */ | 400 | /* Something happened to an association */ |
@@ -930,7 +931,7 @@ out_err: | |||
930 | * errors we try again until the max number of retries is reached. | 931 | * errors we try again until the max number of retries is reached. |
931 | */ | 932 | */ |
932 | if (result != -EHOSTUNREACH && result != -ENETUNREACH && | 933 | if (result != -EHOSTUNREACH && result != -ENETUNREACH && |
933 | result != -ENETDOWN && result != EINVAL | 934 | result != -ENETDOWN && result != -EINVAL |
934 | && result != -EPROTONOSUPPORT) { | 935 | && result != -EPROTONOSUPPORT) { |
935 | lowcomms_connect_sock(con); | 936 | lowcomms_connect_sock(con); |
936 | result = 0; | 937 | result = 0; |
@@ -1417,7 +1418,7 @@ void dlm_lowcomms_stop(void) | |||
1417 | /* Set all the flags to prevent any | 1418 | /* Set all the flags to prevent any |
1418 | socket activity. | 1419 | socket activity. |
1419 | */ | 1420 | */ |
1420 | down(&connections_lock); | 1421 | mutex_lock(&connections_lock); |
1421 | for (i = 0; i <= max_nodeid; i++) { | 1422 | for (i = 0; i <= max_nodeid; i++) { |
1422 | con = __nodeid2con(i, 0); | 1423 | con = __nodeid2con(i, 0); |
1423 | if (con) { | 1424 | if (con) { |
@@ -1426,11 +1427,11 @@ void dlm_lowcomms_stop(void) | |||
1426 | con->sock->sk->sk_user_data = NULL; | 1427 | con->sock->sk->sk_user_data = NULL; |
1427 | } | 1428 | } |
1428 | } | 1429 | } |
1429 | up(&connections_lock); | 1430 | mutex_unlock(&connections_lock); |
1430 | 1431 | ||
1431 | work_stop(); | 1432 | work_stop(); |
1432 | 1433 | ||
1433 | down(&connections_lock); | 1434 | mutex_lock(&connections_lock); |
1434 | clean_writequeues(); | 1435 | clean_writequeues(); |
1435 | 1436 | ||
1436 | for (i = 0; i <= max_nodeid; i++) { | 1437 | for (i = 0; i <= max_nodeid; i++) { |
@@ -1443,7 +1444,7 @@ void dlm_lowcomms_stop(void) | |||
1443 | } | 1444 | } |
1444 | } | 1445 | } |
1445 | max_nodeid = 0; | 1446 | max_nodeid = 0; |
1446 | up(&connections_lock); | 1447 | mutex_unlock(&connections_lock); |
1447 | kmem_cache_destroy(con_cache); | 1448 | kmem_cache_destroy(con_cache); |
1448 | idr_init(&connections_idr); | 1449 | idr_init(&connections_idr); |
1449 | } | 1450 | } |
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 714593621f4f..18bda83cc892 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -95,7 +95,7 @@ int __init dlm_netlink_init(void) | |||
95 | return rv; | 95 | return rv; |
96 | } | 96 | } |
97 | 97 | ||
98 | void __exit dlm_netlink_exit(void) | 98 | void dlm_netlink_exit(void) |
99 | { | 99 | { |
100 | genl_unregister_ops(&family, &dlm_nl_ops); | 100 | genl_unregister_ops(&family, &dlm_nl_ops); |
101 | genl_unregister_family(&family); | 101 | genl_unregister_family(&family); |
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index d6d6e370f89c..78878c5781ca 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -379,7 +379,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, | |||
379 | struct plock_xop *xop; | 379 | struct plock_xop *xop; |
380 | xop = (struct plock_xop *)op; | 380 | xop = (struct plock_xop *)op; |
381 | if (xop->callback) | 381 | if (xop->callback) |
382 | count = dlm_plock_callback(op); | 382 | dlm_plock_callback(op); |
383 | else | 383 | else |
384 | wake_up(&recv_wq); | 384 | wake_up(&recv_wq); |
385 | } else | 385 | } else |
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index cd62d75b2cc0..e2832bc7869a 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -1906,9 +1906,9 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, | |||
1906 | goto out; | 1906 | goto out; |
1907 | } | 1907 | } |
1908 | } | 1908 | } |
1909 | mutex_unlock(&key_tfm_list_mutex); | ||
1910 | (*tfm) = key_tfm->key_tfm; | 1909 | (*tfm) = key_tfm->key_tfm; |
1911 | (*tfm_mutex) = &key_tfm->key_tfm_mutex; | 1910 | (*tfm_mutex) = &key_tfm->key_tfm_mutex; |
1912 | out: | 1911 | out: |
1912 | mutex_unlock(&key_tfm_list_mutex); | ||
1913 | return rc; | 1913 | return rc; |
1914 | } | 1914 | } |
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 951ee33a022d..c15c25745e05 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -660,8 +660,6 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm, | |||
660 | int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, | 660 | int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, |
661 | struct ecryptfs_auth_tok **auth_tok, | 661 | struct ecryptfs_auth_tok **auth_tok, |
662 | char *sig); | 662 | char *sig); |
663 | int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start, | ||
664 | int num_zeros); | ||
665 | int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, | 663 | int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, |
666 | loff_t offset, size_t size); | 664 | loff_t offset, size_t size); |
667 | int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, | 665 | int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, |
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 6560da1a58ce..50c994a249a5 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c | |||
@@ -243,7 +243,6 @@ ecryptfs_miscdev_read(struct file *file, char __user *buf, size_t count, | |||
243 | struct ecryptfs_daemon *daemon; | 243 | struct ecryptfs_daemon *daemon; |
244 | struct ecryptfs_msg_ctx *msg_ctx; | 244 | struct ecryptfs_msg_ctx *msg_ctx; |
245 | size_t packet_length_size; | 245 | size_t packet_length_size; |
246 | u32 counter_nbo; | ||
247 | char packet_length[3]; | 246 | char packet_length[3]; |
248 | size_t i; | 247 | size_t i; |
249 | size_t total_length; | 248 | size_t total_length; |
@@ -328,20 +327,18 @@ check_list: | |||
328 | "pending message\n", __func__, count, total_length); | 327 | "pending message\n", __func__, count, total_length); |
329 | goto out_unlock_msg_ctx; | 328 | goto out_unlock_msg_ctx; |
330 | } | 329 | } |
331 | i = 0; | 330 | rc = -EFAULT; |
332 | buf[i++] = msg_ctx->type; | 331 | if (put_user(msg_ctx->type, buf)) |
333 | counter_nbo = cpu_to_be32(msg_ctx->counter); | 332 | goto out_unlock_msg_ctx; |
334 | memcpy(&buf[i], (char *)&counter_nbo, 4); | 333 | if (put_user(cpu_to_be32(msg_ctx->counter), (__be32 __user *)(buf + 1))) |
335 | i += 4; | 334 | goto out_unlock_msg_ctx; |
335 | i = 5; | ||
336 | if (msg_ctx->msg) { | 336 | if (msg_ctx->msg) { |
337 | memcpy(&buf[i], packet_length, packet_length_size); | 337 | if (copy_to_user(&buf[i], packet_length, packet_length_size)) |
338 | goto out_unlock_msg_ctx; | ||
338 | i += packet_length_size; | 339 | i += packet_length_size; |
339 | rc = copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size); | 340 | if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size)) |
340 | if (rc) { | ||
341 | printk(KERN_ERR "%s: copy_to_user returned error " | ||
342 | "[%d]\n", __func__, rc); | ||
343 | goto out_unlock_msg_ctx; | 341 | goto out_unlock_msg_ctx; |
344 | } | ||
345 | i += msg_ctx->msg_size; | 342 | i += msg_ctx->msg_size; |
346 | } | 343 | } |
347 | rc = i; | 344 | rc = i; |
@@ -452,7 +449,8 @@ static ssize_t | |||
452 | ecryptfs_miscdev_write(struct file *file, const char __user *buf, | 449 | ecryptfs_miscdev_write(struct file *file, const char __user *buf, |
453 | size_t count, loff_t *ppos) | 450 | size_t count, loff_t *ppos) |
454 | { | 451 | { |
455 | u32 counter_nbo, seq; | 452 | __be32 counter_nbo; |
453 | u32 seq; | ||
456 | size_t packet_size, packet_size_length, i; | 454 | size_t packet_size, packet_size_length, i; |
457 | ssize_t sz = 0; | 455 | ssize_t sz = 0; |
458 | char *data; | 456 | char *data; |
@@ -485,7 +483,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf, | |||
485 | count); | 483 | count); |
486 | goto out_free; | 484 | goto out_free; |
487 | } | 485 | } |
488 | memcpy((char *)&counter_nbo, &data[i], 4); | 486 | memcpy(&counter_nbo, &data[i], 4); |
489 | seq = be32_to_cpu(counter_nbo); | 487 | seq = be32_to_cpu(counter_nbo); |
490 | i += 4; | 488 | i += 4; |
491 | rc = ecryptfs_parse_packet_length(&data[i], &packet_size, | 489 | rc = ecryptfs_parse_packet_length(&data[i], &packet_size, |
diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c index ebf55150be56..75c2ea9fee35 100644 --- a/fs/ecryptfs/read_write.c +++ b/fs/ecryptfs/read_write.c | |||
@@ -157,20 +157,6 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset, | |||
157 | ecryptfs_page_idx, rc); | 157 | ecryptfs_page_idx, rc); |
158 | goto out; | 158 | goto out; |
159 | } | 159 | } |
160 | if (start_offset_in_page) { | ||
161 | /* Read in the page from the lower | ||
162 | * into the eCryptfs inode page cache, | ||
163 | * decrypting */ | ||
164 | rc = ecryptfs_decrypt_page(ecryptfs_page); | ||
165 | if (rc) { | ||
166 | printk(KERN_ERR "%s: Error decrypting " | ||
167 | "page; rc = [%d]\n", | ||
168 | __func__, rc); | ||
169 | ClearPageUptodate(ecryptfs_page); | ||
170 | page_cache_release(ecryptfs_page); | ||
171 | goto out; | ||
172 | } | ||
173 | } | ||
174 | ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); | 160 | ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); |
175 | 161 | ||
176 | /* | 162 | /* |
@@ -349,14 +335,6 @@ int ecryptfs_read(char *data, loff_t offset, size_t size, | |||
349 | ecryptfs_page_idx, rc); | 335 | ecryptfs_page_idx, rc); |
350 | goto out; | 336 | goto out; |
351 | } | 337 | } |
352 | rc = ecryptfs_decrypt_page(ecryptfs_page); | ||
353 | if (rc) { | ||
354 | printk(KERN_ERR "%s: Error decrypting " | ||
355 | "page; rc = [%d]\n", __func__, rc); | ||
356 | ClearPageUptodate(ecryptfs_page); | ||
357 | page_cache_release(ecryptfs_page); | ||
358 | goto out; | ||
359 | } | ||
360 | ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); | 338 | ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); |
361 | memcpy((data + data_offset), | 339 | memcpy((data + data_offset), |
362 | ((char *)ecryptfs_page_virt + start_offset_in_page), | 340 | ((char *)ecryptfs_page_virt + start_offset_in_page), |
@@ -860,6 +860,7 @@ static int de_thread(struct task_struct *tsk) | |||
860 | 860 | ||
861 | no_thread_group: | 861 | no_thread_group: |
862 | exit_itimers(sig); | 862 | exit_itimers(sig); |
863 | flush_itimer_signals(); | ||
863 | if (leader) | 864 | if (leader) |
864 | release_task(leader); | 865 | release_task(leader); |
865 | 866 | ||
@@ -1251,6 +1252,12 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) | |||
1251 | 1252 | ||
1252 | EXPORT_SYMBOL(search_binary_handler); | 1253 | EXPORT_SYMBOL(search_binary_handler); |
1253 | 1254 | ||
1255 | void free_bprm(struct linux_binprm *bprm) | ||
1256 | { | ||
1257 | free_arg_pages(bprm); | ||
1258 | kfree(bprm); | ||
1259 | } | ||
1260 | |||
1254 | /* | 1261 | /* |
1255 | * sys_execve() executes a new program. | 1262 | * sys_execve() executes a new program. |
1256 | */ | 1263 | */ |
@@ -1320,17 +1327,15 @@ int do_execve(char * filename, | |||
1320 | retval = search_binary_handler(bprm,regs); | 1327 | retval = search_binary_handler(bprm,regs); |
1321 | if (retval >= 0) { | 1328 | if (retval >= 0) { |
1322 | /* execve success */ | 1329 | /* execve success */ |
1323 | free_arg_pages(bprm); | ||
1324 | security_bprm_free(bprm); | 1330 | security_bprm_free(bprm); |
1325 | acct_update_integrals(current); | 1331 | acct_update_integrals(current); |
1326 | kfree(bprm); | 1332 | free_bprm(bprm); |
1327 | if (displaced) | 1333 | if (displaced) |
1328 | put_files_struct(displaced); | 1334 | put_files_struct(displaced); |
1329 | return retval; | 1335 | return retval; |
1330 | } | 1336 | } |
1331 | 1337 | ||
1332 | out: | 1338 | out: |
1333 | free_arg_pages(bprm); | ||
1334 | if (bprm->security) | 1339 | if (bprm->security) |
1335 | security_bprm_free(bprm); | 1340 | security_bprm_free(bprm); |
1336 | 1341 | ||
@@ -1344,7 +1349,7 @@ out_file: | |||
1344 | fput(bprm->file); | 1349 | fput(bprm->file); |
1345 | } | 1350 | } |
1346 | out_kfree: | 1351 | out_kfree: |
1347 | kfree(bprm); | 1352 | free_bprm(bprm); |
1348 | 1353 | ||
1349 | out_files: | 1354 | out_files: |
1350 | if (displaced) | 1355 | if (displaced) |
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c index 28cfd0b40527..77278e947e94 100644 --- a/fs/ext3/resize.c +++ b/fs/ext3/resize.c | |||
@@ -580,7 +580,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
580 | } | 580 | } |
581 | 581 | ||
582 | blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count; | 582 | blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count; |
583 | data = (__le32 *)dind->b_data + EXT3_SB(sb)->s_gdb_count; | 583 | data = (__le32 *)dind->b_data + (EXT3_SB(sb)->s_gdb_count % |
584 | EXT3_ADDR_PER_BLOCK(sb)); | ||
584 | end = (__le32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb); | 585 | end = (__le32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb); |
585 | 586 | ||
586 | /* Get each reserved primary GDT block and verify it holds backups */ | 587 | /* Get each reserved primary GDT block and verify it holds backups */ |
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 30494c5da843..9cc80b9cc8d8 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -43,6 +43,46 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, | |||
43 | 43 | ||
44 | } | 44 | } |
45 | 45 | ||
46 | static int ext4_block_in_group(struct super_block *sb, ext4_fsblk_t block, | ||
47 | ext4_group_t block_group) | ||
48 | { | ||
49 | ext4_group_t actual_group; | ||
50 | ext4_get_group_no_and_offset(sb, block, &actual_group, 0); | ||
51 | if (actual_group == block_group) | ||
52 | return 1; | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | static int ext4_group_used_meta_blocks(struct super_block *sb, | ||
57 | ext4_group_t block_group) | ||
58 | { | ||
59 | ext4_fsblk_t tmp; | ||
60 | struct ext4_sb_info *sbi = EXT4_SB(sb); | ||
61 | /* block bitmap, inode bitmap, and inode table blocks */ | ||
62 | int used_blocks = sbi->s_itb_per_group + 2; | ||
63 | |||
64 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) { | ||
65 | struct ext4_group_desc *gdp; | ||
66 | struct buffer_head *bh; | ||
67 | |||
68 | gdp = ext4_get_group_desc(sb, block_group, &bh); | ||
69 | if (!ext4_block_in_group(sb, ext4_block_bitmap(sb, gdp), | ||
70 | block_group)) | ||
71 | used_blocks--; | ||
72 | |||
73 | if (!ext4_block_in_group(sb, ext4_inode_bitmap(sb, gdp), | ||
74 | block_group)) | ||
75 | used_blocks--; | ||
76 | |||
77 | tmp = ext4_inode_table(sb, gdp); | ||
78 | for (; tmp < ext4_inode_table(sb, gdp) + | ||
79 | sbi->s_itb_per_group; tmp++) { | ||
80 | if (!ext4_block_in_group(sb, tmp, block_group)) | ||
81 | used_blocks -= 1; | ||
82 | } | ||
83 | } | ||
84 | return used_blocks; | ||
85 | } | ||
46 | /* Initializes an uninitialized block bitmap if given, and returns the | 86 | /* Initializes an uninitialized block bitmap if given, and returns the |
47 | * number of blocks free in the group. */ | 87 | * number of blocks free in the group. */ |
48 | unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, | 88 | unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, |
@@ -105,20 +145,34 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, | |||
105 | free_blocks = group_blocks - bit_max; | 145 | free_blocks = group_blocks - bit_max; |
106 | 146 | ||
107 | if (bh) { | 147 | if (bh) { |
108 | ext4_fsblk_t start; | 148 | ext4_fsblk_t start, tmp; |
149 | int flex_bg = 0; | ||
109 | 150 | ||
110 | for (bit = 0; bit < bit_max; bit++) | 151 | for (bit = 0; bit < bit_max; bit++) |
111 | ext4_set_bit(bit, bh->b_data); | 152 | ext4_set_bit(bit, bh->b_data); |
112 | 153 | ||
113 | start = ext4_group_first_block_no(sb, block_group); | 154 | start = ext4_group_first_block_no(sb, block_group); |
114 | 155 | ||
115 | /* Set bits for block and inode bitmaps, and inode table */ | 156 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, |
116 | ext4_set_bit(ext4_block_bitmap(sb, gdp) - start, bh->b_data); | 157 | EXT4_FEATURE_INCOMPAT_FLEX_BG)) |
117 | ext4_set_bit(ext4_inode_bitmap(sb, gdp) - start, bh->b_data); | 158 | flex_bg = 1; |
118 | for (bit = (ext4_inode_table(sb, gdp) - start), | ||
119 | bit_max = bit + sbi->s_itb_per_group; bit < bit_max; bit++) | ||
120 | ext4_set_bit(bit, bh->b_data); | ||
121 | 159 | ||
160 | /* Set bits for block and inode bitmaps, and inode table */ | ||
161 | tmp = ext4_block_bitmap(sb, gdp); | ||
162 | if (!flex_bg || ext4_block_in_group(sb, tmp, block_group)) | ||
163 | ext4_set_bit(tmp - start, bh->b_data); | ||
164 | |||
165 | tmp = ext4_inode_bitmap(sb, gdp); | ||
166 | if (!flex_bg || ext4_block_in_group(sb, tmp, block_group)) | ||
167 | ext4_set_bit(tmp - start, bh->b_data); | ||
168 | |||
169 | tmp = ext4_inode_table(sb, gdp); | ||
170 | for (; tmp < ext4_inode_table(sb, gdp) + | ||
171 | sbi->s_itb_per_group; tmp++) { | ||
172 | if (!flex_bg || | ||
173 | ext4_block_in_group(sb, tmp, block_group)) | ||
174 | ext4_set_bit(tmp - start, bh->b_data); | ||
175 | } | ||
122 | /* | 176 | /* |
123 | * Also if the number of blocks within the group is | 177 | * Also if the number of blocks within the group is |
124 | * less than the blocksize * 8 ( which is the size | 178 | * less than the blocksize * 8 ( which is the size |
@@ -126,8 +180,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, | |||
126 | */ | 180 | */ |
127 | mark_bitmap_end(group_blocks, sb->s_blocksize * 8, bh->b_data); | 181 | mark_bitmap_end(group_blocks, sb->s_blocksize * 8, bh->b_data); |
128 | } | 182 | } |
129 | 183 | return free_blocks - ext4_group_used_meta_blocks(sb, block_group); | |
130 | return free_blocks - sbi->s_itb_per_group - 2; | ||
131 | } | 184 | } |
132 | 185 | ||
133 | 186 | ||
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 873ad9b3418c..c9900aade150 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -2745,8 +2745,6 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
2745 | sbi = EXT4_SB(sb); | 2745 | sbi = EXT4_SB(sb); |
2746 | es = sbi->s_es; | 2746 | es = sbi->s_es; |
2747 | 2747 | ||
2748 | ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group, | ||
2749 | gdp->bg_free_blocks_count); | ||
2750 | 2748 | ||
2751 | err = -EIO; | 2749 | err = -EIO; |
2752 | bitmap_bh = read_block_bitmap(sb, ac->ac_b_ex.fe_group); | 2750 | bitmap_bh = read_block_bitmap(sb, ac->ac_b_ex.fe_group); |
@@ -2762,6 +2760,9 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
2762 | if (!gdp) | 2760 | if (!gdp) |
2763 | goto out_err; | 2761 | goto out_err; |
2764 | 2762 | ||
2763 | ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group, | ||
2764 | gdp->bg_free_blocks_count); | ||
2765 | |||
2765 | err = ext4_journal_get_write_access(handle, gdp_bh); | 2766 | err = ext4_journal_get_write_access(handle, gdp_bh); |
2766 | if (err) | 2767 | if (err) |
2767 | goto out_err; | 2768 | goto out_err; |
@@ -3094,8 +3095,7 @@ static void ext4_mb_use_inode_pa(struct ext4_allocation_context *ac, | |||
3094 | static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, | 3095 | static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, |
3095 | struct ext4_prealloc_space *pa) | 3096 | struct ext4_prealloc_space *pa) |
3096 | { | 3097 | { |
3097 | unsigned len = ac->ac_o_ex.fe_len; | 3098 | unsigned int len = ac->ac_o_ex.fe_len; |
3098 | |||
3099 | ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, | 3099 | ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, |
3100 | &ac->ac_b_ex.fe_group, | 3100 | &ac->ac_b_ex.fe_group, |
3101 | &ac->ac_b_ex.fe_start); | 3101 | &ac->ac_b_ex.fe_start); |
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 9f086a6a472b..9ecb92f68543 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, | |||
563 | } | 563 | } |
564 | 564 | ||
565 | blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; | 565 | blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; |
566 | data = (__le32 *)dind->b_data + EXT4_SB(sb)->s_gdb_count; | 566 | data = (__le32 *)dind->b_data + (EXT4_SB(sb)->s_gdb_count % |
567 | EXT4_ADDR_PER_BLOCK(sb)); | ||
567 | end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); | 568 | end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); |
568 | 569 | ||
569 | /* Get each reserved primary GDT block and verify it holds backups */ | 570 | /* Get each reserved primary GDT block and verify it holds backups */ |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 09d9359c8055..cb96f127c366 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -671,6 +671,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
671 | unsigned long def_mount_opts; | 671 | unsigned long def_mount_opts; |
672 | struct super_block *sb = vfs->mnt_sb; | 672 | struct super_block *sb = vfs->mnt_sb; |
673 | struct ext4_sb_info *sbi = EXT4_SB(sb); | 673 | struct ext4_sb_info *sbi = EXT4_SB(sb); |
674 | journal_t *journal = sbi->s_journal; | ||
674 | struct ext4_super_block *es = sbi->s_es; | 675 | struct ext4_super_block *es = sbi->s_es; |
675 | 676 | ||
676 | def_mount_opts = le32_to_cpu(es->s_default_mount_opts); | 677 | def_mount_opts = le32_to_cpu(es->s_default_mount_opts); |
@@ -729,8 +730,15 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
729 | seq_printf(seq, ",commit=%u", | 730 | seq_printf(seq, ",commit=%u", |
730 | (unsigned) (sbi->s_commit_interval / HZ)); | 731 | (unsigned) (sbi->s_commit_interval / HZ)); |
731 | } | 732 | } |
732 | if (test_opt(sb, BARRIER)) | 733 | /* |
733 | seq_puts(seq, ",barrier=1"); | 734 | * We're changing the default of barrier mount option, so |
735 | * let's always display its mount state so it's clear what its | ||
736 | * status is. | ||
737 | */ | ||
738 | seq_puts(seq, ",barrier="); | ||
739 | seq_puts(seq, test_opt(sb, BARRIER) ? "1" : "0"); | ||
740 | if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) | ||
741 | seq_puts(seq, ",journal_async_commit"); | ||
734 | if (test_opt(sb, NOBH)) | 742 | if (test_opt(sb, NOBH)) |
735 | seq_puts(seq, ",nobh"); | 743 | seq_puts(seq, ",nobh"); |
736 | if (!test_opt(sb, EXTENTS)) | 744 | if (!test_opt(sb, EXTENTS)) |
@@ -1907,6 +1915,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
1907 | sbi->s_resgid = le16_to_cpu(es->s_def_resgid); | 1915 | sbi->s_resgid = le16_to_cpu(es->s_def_resgid); |
1908 | 1916 | ||
1909 | set_opt(sbi->s_mount_opt, RESERVATION); | 1917 | set_opt(sbi->s_mount_opt, RESERVATION); |
1918 | set_opt(sbi->s_mount_opt, BARRIER); | ||
1910 | 1919 | ||
1911 | /* | 1920 | /* |
1912 | * turn on extents feature by default in ext4 filesystem | 1921 | * turn on extents feature by default in ext4 filesystem |
@@ -2189,6 +2198,29 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) | |||
2189 | EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) { | 2198 | EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) { |
2190 | if (ext4_load_journal(sb, es, journal_devnum)) | 2199 | if (ext4_load_journal(sb, es, journal_devnum)) |
2191 | goto failed_mount3; | 2200 | goto failed_mount3; |
2201 | if (!(sb->s_flags & MS_RDONLY) && | ||
2202 | EXT4_SB(sb)->s_journal->j_failed_commit) { | ||
2203 | printk(KERN_CRIT "EXT4-fs error (device %s): " | ||
2204 | "ext4_fill_super: Journal transaction " | ||
2205 | "%u is corrupt\n", sb->s_id, | ||
2206 | EXT4_SB(sb)->s_journal->j_failed_commit); | ||
2207 | if (test_opt (sb, ERRORS_RO)) { | ||
2208 | printk (KERN_CRIT | ||
2209 | "Mounting filesystem read-only\n"); | ||
2210 | sb->s_flags |= MS_RDONLY; | ||
2211 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | ||
2212 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); | ||
2213 | } | ||
2214 | if (test_opt(sb, ERRORS_PANIC)) { | ||
2215 | EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS; | ||
2216 | es->s_state |= cpu_to_le16(EXT4_ERROR_FS); | ||
2217 | ext4_commit_super(sb, es, 1); | ||
2218 | printk(KERN_CRIT | ||
2219 | "EXT4-fs (device %s): mount failed\n", | ||
2220 | sb->s_id); | ||
2221 | goto failed_mount4; | ||
2222 | } | ||
2223 | } | ||
2192 | } else if (journal_inum) { | 2224 | } else if (journal_inum) { |
2193 | if (ext4_create_journal(sb, es, journal_inum)) | 2225 | if (ext4_create_journal(sb, es, journal_inum)) |
2194 | goto failed_mount3; | 2226 | goto failed_mount3; |
diff --git a/fs/fat/file.c b/fs/fat/file.c index 27cc1164ec36..771326b8047e 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c | |||
@@ -257,26 +257,34 @@ int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) | |||
257 | } | 257 | } |
258 | EXPORT_SYMBOL_GPL(fat_getattr); | 258 | EXPORT_SYMBOL_GPL(fat_getattr); |
259 | 259 | ||
260 | static int fat_check_mode(const struct msdos_sb_info *sbi, struct inode *inode, | 260 | static int fat_sanitize_mode(const struct msdos_sb_info *sbi, |
261 | mode_t mode) | 261 | struct inode *inode, umode_t *mode_ptr) |
262 | { | 262 | { |
263 | mode_t mask, req = mode & ~S_IFMT; | 263 | mode_t mask, perm; |
264 | 264 | ||
265 | if (S_ISREG(mode)) | 265 | /* |
266 | * Note, the basic check is already done by a caller of | ||
267 | * (attr->ia_mode & ~MSDOS_VALID_MODE) | ||
268 | */ | ||
269 | |||
270 | if (S_ISREG(inode->i_mode)) | ||
266 | mask = sbi->options.fs_fmask; | 271 | mask = sbi->options.fs_fmask; |
267 | else | 272 | else |
268 | mask = sbi->options.fs_dmask; | 273 | mask = sbi->options.fs_dmask; |
269 | 274 | ||
275 | perm = *mode_ptr & ~(S_IFMT | mask); | ||
276 | |||
270 | /* | 277 | /* |
271 | * Of the r and x bits, all (subject to umask) must be present. Of the | 278 | * Of the r and x bits, all (subject to umask) must be present. Of the |
272 | * w bits, either all (subject to umask) or none must be present. | 279 | * w bits, either all (subject to umask) or none must be present. |
273 | */ | 280 | */ |
274 | req &= ~mask; | 281 | if ((perm & (S_IRUGO | S_IXUGO)) != (inode->i_mode & (S_IRUGO|S_IXUGO))) |
275 | if ((req & (S_IRUGO | S_IXUGO)) != (inode->i_mode & (S_IRUGO|S_IXUGO))) | ||
276 | return -EPERM; | 282 | return -EPERM; |
277 | if ((req & S_IWUGO) && ((req & S_IWUGO) != (S_IWUGO & ~mask))) | 283 | if ((perm & S_IWUGO) && ((perm & S_IWUGO) != (S_IWUGO & ~mask))) |
278 | return -EPERM; | 284 | return -EPERM; |
279 | 285 | ||
286 | *mode_ptr &= S_IFMT | perm; | ||
287 | |||
280 | return 0; | 288 | return 0; |
281 | } | 289 | } |
282 | 290 | ||
@@ -299,7 +307,7 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) | |||
299 | { | 307 | { |
300 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); | 308 | struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); |
301 | struct inode *inode = dentry->d_inode; | 309 | struct inode *inode = dentry->d_inode; |
302 | int mask, error = 0; | 310 | int error = 0; |
303 | unsigned int ia_valid; | 311 | unsigned int ia_valid; |
304 | 312 | ||
305 | lock_kernel(); | 313 | lock_kernel(); |
@@ -332,12 +340,13 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) | |||
332 | error = 0; | 340 | error = 0; |
333 | goto out; | 341 | goto out; |
334 | } | 342 | } |
343 | |||
335 | if (((attr->ia_valid & ATTR_UID) && | 344 | if (((attr->ia_valid & ATTR_UID) && |
336 | (attr->ia_uid != sbi->options.fs_uid)) || | 345 | (attr->ia_uid != sbi->options.fs_uid)) || |
337 | ((attr->ia_valid & ATTR_GID) && | 346 | ((attr->ia_valid & ATTR_GID) && |
338 | (attr->ia_gid != sbi->options.fs_gid)) || | 347 | (attr->ia_gid != sbi->options.fs_gid)) || |
339 | ((attr->ia_valid & ATTR_MODE) && | 348 | ((attr->ia_valid & ATTR_MODE) && |
340 | fat_check_mode(sbi, inode, attr->ia_mode) < 0)) | 349 | (attr->ia_mode & ~MSDOS_VALID_MODE))) |
341 | error = -EPERM; | 350 | error = -EPERM; |
342 | 351 | ||
343 | if (error) { | 352 | if (error) { |
@@ -346,15 +355,16 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) | |||
346 | goto out; | 355 | goto out; |
347 | } | 356 | } |
348 | 357 | ||
349 | error = inode_setattr(inode, attr); | 358 | /* |
350 | if (error) | 359 | * We don't return -EPERM here. Yes, strange, but this is too |
351 | goto out; | 360 | * old behavior. |
361 | */ | ||
362 | if (attr->ia_valid & ATTR_MODE) { | ||
363 | if (fat_sanitize_mode(sbi, inode, &attr->ia_mode) < 0) | ||
364 | attr->ia_valid &= ~ATTR_MODE; | ||
365 | } | ||
352 | 366 | ||
353 | if (S_ISDIR(inode->i_mode)) | 367 | error = inode_setattr(inode, attr); |
354 | mask = sbi->options.fs_dmask; | ||
355 | else | ||
356 | mask = sbi->options.fs_fmask; | ||
357 | inode->i_mode &= S_IFMT | (S_IRWXUGO & ~mask); | ||
358 | out: | 368 | out: |
359 | unlock_kernel(); | 369 | unlock_kernel(); |
360 | return error; | 370 | return error; |
@@ -26,6 +26,8 @@ struct fdtable_defer { | |||
26 | }; | 26 | }; |
27 | 27 | ||
28 | int sysctl_nr_open __read_mostly = 1024*1024; | 28 | int sysctl_nr_open __read_mostly = 1024*1024; |
29 | int sysctl_nr_open_min = BITS_PER_LONG; | ||
30 | int sysctl_nr_open_max = 1024 * 1024; /* raised later */ | ||
29 | 31 | ||
30 | /* | 32 | /* |
31 | * We use this list to defer free fdtables that have vmalloced | 33 | * We use this list to defer free fdtables that have vmalloced |
@@ -119,8 +121,6 @@ static void copy_fdtable(struct fdtable *nfdt, struct fdtable *ofdt) | |||
119 | unsigned int cpy, set; | 121 | unsigned int cpy, set; |
120 | 122 | ||
121 | BUG_ON(nfdt->max_fds < ofdt->max_fds); | 123 | BUG_ON(nfdt->max_fds < ofdt->max_fds); |
122 | if (ofdt->max_fds == 0) | ||
123 | return; | ||
124 | 124 | ||
125 | cpy = ofdt->max_fds * sizeof(struct file *); | 125 | cpy = ofdt->max_fds * sizeof(struct file *); |
126 | set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); | 126 | set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); |
@@ -261,6 +261,139 @@ int expand_files(struct files_struct *files, int nr) | |||
261 | return expand_fdtable(files, nr); | 261 | return expand_fdtable(files, nr); |
262 | } | 262 | } |
263 | 263 | ||
264 | static int count_open_files(struct fdtable *fdt) | ||
265 | { | ||
266 | int size = fdt->max_fds; | ||
267 | int i; | ||
268 | |||
269 | /* Find the last open fd */ | ||
270 | for (i = size/(8*sizeof(long)); i > 0; ) { | ||
271 | if (fdt->open_fds->fds_bits[--i]) | ||
272 | break; | ||
273 | } | ||
274 | i = (i+1) * 8 * sizeof(long); | ||
275 | return i; | ||
276 | } | ||
277 | |||
278 | /* | ||
279 | * Allocate a new files structure and copy contents from the | ||
280 | * passed in files structure. | ||
281 | * errorp will be valid only when the returned files_struct is NULL. | ||
282 | */ | ||
283 | struct files_struct *dup_fd(struct files_struct *oldf, int *errorp) | ||
284 | { | ||
285 | struct files_struct *newf; | ||
286 | struct file **old_fds, **new_fds; | ||
287 | int open_files, size, i; | ||
288 | struct fdtable *old_fdt, *new_fdt; | ||
289 | |||
290 | *errorp = -ENOMEM; | ||
291 | newf = kmem_cache_alloc(files_cachep, GFP_KERNEL); | ||
292 | if (!newf) | ||
293 | goto out; | ||
294 | |||
295 | atomic_set(&newf->count, 1); | ||
296 | |||
297 | spin_lock_init(&newf->file_lock); | ||
298 | newf->next_fd = 0; | ||
299 | new_fdt = &newf->fdtab; | ||
300 | new_fdt->max_fds = NR_OPEN_DEFAULT; | ||
301 | new_fdt->close_on_exec = (fd_set *)&newf->close_on_exec_init; | ||
302 | new_fdt->open_fds = (fd_set *)&newf->open_fds_init; | ||
303 | new_fdt->fd = &newf->fd_array[0]; | ||
304 | INIT_RCU_HEAD(&new_fdt->rcu); | ||
305 | new_fdt->next = NULL; | ||
306 | |||
307 | spin_lock(&oldf->file_lock); | ||
308 | old_fdt = files_fdtable(oldf); | ||
309 | open_files = count_open_files(old_fdt); | ||
310 | |||
311 | /* | ||
312 | * Check whether we need to allocate a larger fd array and fd set. | ||
313 | */ | ||
314 | while (unlikely(open_files > new_fdt->max_fds)) { | ||
315 | spin_unlock(&oldf->file_lock); | ||
316 | |||
317 | if (new_fdt != &newf->fdtab) { | ||
318 | free_fdarr(new_fdt); | ||
319 | free_fdset(new_fdt); | ||
320 | kfree(new_fdt); | ||
321 | } | ||
322 | |||
323 | new_fdt = alloc_fdtable(open_files - 1); | ||
324 | if (!new_fdt) { | ||
325 | *errorp = -ENOMEM; | ||
326 | goto out_release; | ||
327 | } | ||
328 | |||
329 | /* beyond sysctl_nr_open; nothing to do */ | ||
330 | if (unlikely(new_fdt->max_fds < open_files)) { | ||
331 | free_fdarr(new_fdt); | ||
332 | free_fdset(new_fdt); | ||
333 | kfree(new_fdt); | ||
334 | *errorp = -EMFILE; | ||
335 | goto out_release; | ||
336 | } | ||
337 | |||
338 | /* | ||
339 | * Reacquire the oldf lock and a pointer to its fd table | ||
340 | * who knows it may have a new bigger fd table. We need | ||
341 | * the latest pointer. | ||
342 | */ | ||
343 | spin_lock(&oldf->file_lock); | ||
344 | old_fdt = files_fdtable(oldf); | ||
345 | open_files = count_open_files(old_fdt); | ||
346 | } | ||
347 | |||
348 | old_fds = old_fdt->fd; | ||
349 | new_fds = new_fdt->fd; | ||
350 | |||
351 | memcpy(new_fdt->open_fds->fds_bits, | ||
352 | old_fdt->open_fds->fds_bits, open_files/8); | ||
353 | memcpy(new_fdt->close_on_exec->fds_bits, | ||
354 | old_fdt->close_on_exec->fds_bits, open_files/8); | ||
355 | |||
356 | for (i = open_files; i != 0; i--) { | ||
357 | struct file *f = *old_fds++; | ||
358 | if (f) { | ||
359 | get_file(f); | ||
360 | } else { | ||
361 | /* | ||
362 | * The fd may be claimed in the fd bitmap but not yet | ||
363 | * instantiated in the files array if a sibling thread | ||
364 | * is partway through open(). So make sure that this | ||
365 | * fd is available to the new process. | ||
366 | */ | ||
367 | FD_CLR(open_files - i, new_fdt->open_fds); | ||
368 | } | ||
369 | rcu_assign_pointer(*new_fds++, f); | ||
370 | } | ||
371 | spin_unlock(&oldf->file_lock); | ||
372 | |||
373 | /* compute the remainder to be cleared */ | ||
374 | size = (new_fdt->max_fds - open_files) * sizeof(struct file *); | ||
375 | |||
376 | /* This is long word aligned thus could use a optimized version */ | ||
377 | memset(new_fds, 0, size); | ||
378 | |||
379 | if (new_fdt->max_fds > open_files) { | ||
380 | int left = (new_fdt->max_fds-open_files)/8; | ||
381 | int start = open_files / (8 * sizeof(unsigned long)); | ||
382 | |||
383 | memset(&new_fdt->open_fds->fds_bits[start], 0, left); | ||
384 | memset(&new_fdt->close_on_exec->fds_bits[start], 0, left); | ||
385 | } | ||
386 | |||
387 | rcu_assign_pointer(newf->fdt, new_fdt); | ||
388 | |||
389 | return newf; | ||
390 | |||
391 | out_release: | ||
392 | kmem_cache_free(files_cachep, newf); | ||
393 | out: | ||
394 | return NULL; | ||
395 | } | ||
396 | |||
264 | static void __devinit fdtable_defer_list_init(int cpu) | 397 | static void __devinit fdtable_defer_list_init(int cpu) |
265 | { | 398 | { |
266 | struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu); | 399 | struct fdtable_defer *fddef = &per_cpu(fdtable_defer_list, cpu); |
@@ -274,4 +407,19 @@ void __init files_defer_init(void) | |||
274 | int i; | 407 | int i; |
275 | for_each_possible_cpu(i) | 408 | for_each_possible_cpu(i) |
276 | fdtable_defer_list_init(i); | 409 | fdtable_defer_list_init(i); |
410 | sysctl_nr_open_max = min((size_t)INT_MAX, ~(size_t)0/sizeof(void *)) & | ||
411 | -BITS_PER_LONG; | ||
277 | } | 412 | } |
413 | |||
414 | struct files_struct init_files = { | ||
415 | .count = ATOMIC_INIT(1), | ||
416 | .fdt = &init_files.fdtab, | ||
417 | .fdtab = { | ||
418 | .max_fds = NR_OPEN_DEFAULT, | ||
419 | .fd = &init_files.fd_array[0], | ||
420 | .close_on_exec = (fd_set *)&init_files.close_on_exec_init, | ||
421 | .open_fds = (fd_set *)&init_files.open_fds_init, | ||
422 | .rcu = RCU_HEAD_INIT, | ||
423 | }, | ||
424 | .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), | ||
425 | }; | ||
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index fb77e0962132..43e99513334a 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -488,7 +488,12 @@ static struct fuse_conn *new_conn(struct super_block *sb) | |||
488 | err = bdi_init(&fc->bdi); | 488 | err = bdi_init(&fc->bdi); |
489 | if (err) | 489 | if (err) |
490 | goto error_kfree; | 490 | goto error_kfree; |
491 | err = bdi_register_dev(&fc->bdi, fc->dev); | 491 | if (sb->s_bdev) { |
492 | err = bdi_register(&fc->bdi, NULL, "%u:%u-fuseblk", | ||
493 | MAJOR(fc->dev), MINOR(fc->dev)); | ||
494 | } else { | ||
495 | err = bdi_register_dev(&fc->bdi, fc->dev); | ||
496 | } | ||
492 | if (err) | 497 | if (err) |
493 | goto error_bdi_destroy; | 498 | goto error_bdi_destroy; |
494 | /* | 499 | /* |
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index d31badadef8f..07d84d16cda4 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -249,7 +249,7 @@ static int inode_go_lock(struct gfs2_holder *gh) | |||
249 | struct gfs2_inode *ip = gl->gl_object; | 249 | struct gfs2_inode *ip = gl->gl_object; |
250 | int error = 0; | 250 | int error = 0; |
251 | 251 | ||
252 | if (!ip) | 252 | if (!ip || (gh->gh_flags & GL_SKIP)) |
253 | return 0; | 253 | return 0; |
254 | 254 | ||
255 | if (test_bit(GIF_INVALID, &ip->i_flags)) { | 255 | if (test_bit(GIF_INVALID, &ip->i_flags)) { |
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 9c2c0b90b22a..eabe5eac41da 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h | |||
@@ -236,6 +236,7 @@ enum { | |||
236 | GIF_INVALID = 0, | 236 | GIF_INVALID = 0, |
237 | GIF_QD_LOCKED = 1, | 237 | GIF_QD_LOCKED = 1, |
238 | GIF_SW_PAGED = 3, | 238 | GIF_SW_PAGED = 3, |
239 | GIF_USER = 4, /* user inode, not metadata addr space */ | ||
239 | }; | 240 | }; |
240 | 241 | ||
241 | struct gfs2_dinode_host { | 242 | struct gfs2_dinode_host { |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 3a9ef526c308..09453d057e41 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -47,8 +47,7 @@ static int iget_test(struct inode *inode, void *opaque) | |||
47 | struct gfs2_inode *ip = GFS2_I(inode); | 47 | struct gfs2_inode *ip = GFS2_I(inode); |
48 | u64 *no_addr = opaque; | 48 | u64 *no_addr = opaque; |
49 | 49 | ||
50 | if (ip->i_no_addr == *no_addr && | 50 | if (ip->i_no_addr == *no_addr && test_bit(GIF_USER, &ip->i_flags)) |
51 | inode->i_private != NULL) | ||
52 | return 1; | 51 | return 1; |
53 | 52 | ||
54 | return 0; | 53 | return 0; |
@@ -61,6 +60,7 @@ static int iget_set(struct inode *inode, void *opaque) | |||
61 | 60 | ||
62 | inode->i_ino = (unsigned long)*no_addr; | 61 | inode->i_ino = (unsigned long)*no_addr; |
63 | ip->i_no_addr = *no_addr; | 62 | ip->i_no_addr = *no_addr; |
63 | set_bit(GIF_USER, &ip->i_flags); | ||
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
@@ -86,7 +86,7 @@ static int iget_skip_test(struct inode *inode, void *opaque) | |||
86 | struct gfs2_inode *ip = GFS2_I(inode); | 86 | struct gfs2_inode *ip = GFS2_I(inode); |
87 | struct gfs2_skip_data *data = opaque; | 87 | struct gfs2_skip_data *data = opaque; |
88 | 88 | ||
89 | if (ip->i_no_addr == data->no_addr && inode->i_private != NULL){ | 89 | if (ip->i_no_addr == data->no_addr && test_bit(GIF_USER, &ip->i_flags)){ |
90 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ | 90 | if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ |
91 | data->skipped = 1; | 91 | data->skipped = 1; |
92 | return 0; | 92 | return 0; |
@@ -105,6 +105,7 @@ static int iget_skip_set(struct inode *inode, void *opaque) | |||
105 | return 1; | 105 | return 1; |
106 | inode->i_ino = (unsigned long)(data->no_addr); | 106 | inode->i_ino = (unsigned long)(data->no_addr); |
107 | ip->i_no_addr = data->no_addr; | 107 | ip->i_no_addr = data->no_addr; |
108 | set_bit(GIF_USER, &ip->i_flags); | ||
108 | return 0; | 109 | return 0; |
109 | } | 110 | } |
110 | 111 | ||
@@ -166,7 +167,7 @@ void gfs2_set_iop(struct inode *inode) | |||
166 | * Returns: A VFS inode, or an error | 167 | * Returns: A VFS inode, or an error |
167 | */ | 168 | */ |
168 | 169 | ||
169 | struct inode *gfs2_inode_lookup(struct super_block *sb, | 170 | struct inode *gfs2_inode_lookup(struct super_block *sb, |
170 | unsigned int type, | 171 | unsigned int type, |
171 | u64 no_addr, | 172 | u64 no_addr, |
172 | u64 no_formal_ino, int skip_freeing) | 173 | u64 no_formal_ino, int skip_freeing) |
@@ -187,7 +188,6 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, | |||
187 | 188 | ||
188 | if (inode->i_state & I_NEW) { | 189 | if (inode->i_state & I_NEW) { |
189 | struct gfs2_sbd *sdp = GFS2_SB(inode); | 190 | struct gfs2_sbd *sdp = GFS2_SB(inode); |
190 | inode->i_private = ip; | ||
191 | ip->i_no_formal_ino = no_formal_ino; | 191 | ip->i_no_formal_ino = no_formal_ino; |
192 | 192 | ||
193 | error = gfs2_glock_get(sdp, no_addr, &gfs2_inode_glops, CREATE, &ip->i_gl); | 193 | error = gfs2_glock_get(sdp, no_addr, &gfs2_inode_glops, CREATE, &ip->i_gl); |
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 85aea27b4a86..78d75f892f82 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This copyrighted material is made available to anyone wishing to use, | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | * modify, copy, or redistribute it subject to the terms and conditions | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -69,13 +69,15 @@ static const struct address_space_operations aspace_aops = { | |||
69 | struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) | 69 | struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) |
70 | { | 70 | { |
71 | struct inode *aspace; | 71 | struct inode *aspace; |
72 | struct gfs2_inode *ip; | ||
72 | 73 | ||
73 | aspace = new_inode(sdp->sd_vfs); | 74 | aspace = new_inode(sdp->sd_vfs); |
74 | if (aspace) { | 75 | if (aspace) { |
75 | mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS); | 76 | mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS); |
76 | aspace->i_mapping->a_ops = &aspace_aops; | 77 | aspace->i_mapping->a_ops = &aspace_aops; |
77 | aspace->i_size = ~0ULL; | 78 | aspace->i_size = ~0ULL; |
78 | aspace->i_private = NULL; | 79 | ip = GFS2_I(aspace); |
80 | clear_bit(GIF_USER, &ip->i_flags); | ||
79 | insert_inode_hash(aspace); | 81 | insert_inode_hash(aspace); |
80 | } | 82 | } |
81 | return aspace; | 83 | return aspace; |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index ef9c6c4f80f6..b2028c82e8d1 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -142,8 +142,8 @@ static int init_names(struct gfs2_sbd *sdp, int silent) | |||
142 | if (!table[0]) | 142 | if (!table[0]) |
143 | table = sdp->sd_vfs->s_id; | 143 | table = sdp->sd_vfs->s_id; |
144 | 144 | ||
145 | snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto); | 145 | strlcpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN); |
146 | snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table); | 146 | strlcpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN); |
147 | 147 | ||
148 | table = sdp->sd_table_name; | 148 | table = sdp->sd_table_name; |
149 | while ((table = strchr(table, '/'))) | 149 | while ((table = strchr(table, '/'))) |
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 2278c68b7e35..0b7cc920eb89 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | 2 | * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
3 | * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. | 3 | * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. |
4 | * | 4 | * |
5 | * This copyrighted material is made available to anyone wishing to use, | 5 | * This copyrighted material is made available to anyone wishing to use, |
6 | * modify, copy, or redistribute it subject to the terms and conditions | 6 | * modify, copy, or redistribute it subject to the terms and conditions |
@@ -52,7 +52,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) | |||
52 | struct gfs2_inode *ip = GFS2_I(inode); | 52 | struct gfs2_inode *ip = GFS2_I(inode); |
53 | 53 | ||
54 | /* Check this is a "normal" inode */ | 54 | /* Check this is a "normal" inode */ |
55 | if (inode->i_private) { | 55 | if (test_bit(GIF_USER, &ip->i_flags)) { |
56 | if (current->flags & PF_MEMALLOC) | 56 | if (current->flags & PF_MEMALLOC) |
57 | return 0; | 57 | return 0; |
58 | if (sync) | 58 | if (sync) |
@@ -297,8 +297,9 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) | |||
297 | */ | 297 | */ |
298 | static void gfs2_drop_inode(struct inode *inode) | 298 | static void gfs2_drop_inode(struct inode *inode) |
299 | { | 299 | { |
300 | if (inode->i_private && inode->i_nlink) { | 300 | struct gfs2_inode *ip = GFS2_I(inode); |
301 | struct gfs2_inode *ip = GFS2_I(inode); | 301 | |
302 | if (test_bit(GIF_USER, &ip->i_flags) && inode->i_nlink) { | ||
302 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; | 303 | struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; |
303 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) | 304 | if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) |
304 | clear_nlink(inode); | 305 | clear_nlink(inode); |
@@ -314,12 +315,13 @@ static void gfs2_drop_inode(struct inode *inode) | |||
314 | 315 | ||
315 | static void gfs2_clear_inode(struct inode *inode) | 316 | static void gfs2_clear_inode(struct inode *inode) |
316 | { | 317 | { |
318 | struct gfs2_inode *ip = GFS2_I(inode); | ||
319 | |||
317 | /* This tells us its a "real" inode and not one which only | 320 | /* This tells us its a "real" inode and not one which only |
318 | * serves to contain an address space (see rgrp.c, meta_io.c) | 321 | * serves to contain an address space (see rgrp.c, meta_io.c) |
319 | * which therefore doesn't have its own glocks. | 322 | * which therefore doesn't have its own glocks. |
320 | */ | 323 | */ |
321 | if (inode->i_private) { | 324 | if (test_bit(GIF_USER, &ip->i_flags)) { |
322 | struct gfs2_inode *ip = GFS2_I(inode); | ||
323 | ip->i_gl->gl_object = NULL; | 325 | ip->i_gl->gl_object = NULL; |
324 | gfs2_glock_schedule_for_reclaim(ip->i_gl); | 326 | gfs2_glock_schedule_for_reclaim(ip->i_gl); |
325 | gfs2_glock_put(ip->i_gl); | 327 | gfs2_glock_put(ip->i_gl); |
@@ -419,7 +421,7 @@ static void gfs2_delete_inode(struct inode *inode) | |||
419 | struct gfs2_holder gh; | 421 | struct gfs2_holder gh; |
420 | int error; | 422 | int error; |
421 | 423 | ||
422 | if (!inode->i_private) | 424 | if (!test_bit(GIF_USER, &ip->i_flags)) |
423 | goto out; | 425 | goto out; |
424 | 426 | ||
425 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 427 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 7e8f0b1d6c6e..6387523a3153 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -1495,7 +1495,7 @@ u64 gfs2_alloc_block(struct gfs2_inode *ip, unsigned int *n) | |||
1495 | 1495 | ||
1496 | al->al_alloced += *n; | 1496 | al->al_alloced += *n; |
1497 | 1497 | ||
1498 | gfs2_statfs_change(sdp, 0, -*n, 0); | 1498 | gfs2_statfs_change(sdp, 0, -(s64)*n, 0); |
1499 | gfs2_quota_change(ip, *n, ip->i_inode.i_uid, ip->i_inode.i_gid); | 1499 | gfs2_quota_change(ip, *n, ip->i_inode.i_uid, ip->i_inode.i_gid); |
1500 | 1500 | ||
1501 | spin_lock(&sdp->sd_rindex_spin); | 1501 | spin_lock(&sdp->sd_rindex_spin); |
diff --git a/fs/hppfs/Makefile b/fs/hppfs/Makefile index 8a1f50344368..3a982bd975d2 100644 --- a/fs/hppfs/Makefile +++ b/fs/hppfs/Makefile | |||
@@ -3,7 +3,4 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | hppfs-objs := hppfs.o | 6 | obj-$(CONFIG_HPPFS) += hppfs.o |
7 | |||
8 | obj-y = | ||
9 | obj-$(CONFIG_HPPFS) += $(hppfs-objs) | ||
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 4d99685fdce4..a2ed72f7ceee 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
@@ -168,6 +168,7 @@ static int journal_submit_commit_record(journal_t *journal, | |||
168 | spin_unlock(&journal->j_state_lock); | 168 | spin_unlock(&journal->j_state_lock); |
169 | 169 | ||
170 | /* And try again, without the barrier */ | 170 | /* And try again, without the barrier */ |
171 | lock_buffer(bh); | ||
171 | set_buffer_uptodate(bh); | 172 | set_buffer_uptodate(bh); |
172 | set_buffer_dirty(bh); | 173 | set_buffer_dirty(bh); |
173 | ret = submit_bh(WRITE, bh); | 174 | ret = submit_bh(WRITE, bh); |
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 5d0405a9e7ca..058f50f65b76 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c | |||
@@ -344,6 +344,7 @@ static int calc_chksums(journal_t *journal, struct buffer_head *bh, | |||
344 | *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, | 344 | *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, |
345 | obh->b_size); | 345 | obh->b_size); |
346 | } | 346 | } |
347 | put_bh(obh); | ||
347 | } | 348 | } |
348 | return 0; | 349 | return 0; |
349 | } | 350 | } |
@@ -610,9 +611,8 @@ static int do_one_pass(journal_t *journal, | |||
610 | chksum_err = chksum_seen = 0; | 611 | chksum_err = chksum_seen = 0; |
611 | 612 | ||
612 | if (info->end_transaction) { | 613 | if (info->end_transaction) { |
613 | printk(KERN_ERR "JBD: Transaction %u " | 614 | journal->j_failed_commit = |
614 | "found to be corrupt.\n", | 615 | info->end_transaction; |
615 | next_commit_ID - 1); | ||
616 | brelse(bh); | 616 | brelse(bh); |
617 | break; | 617 | break; |
618 | } | 618 | } |
@@ -643,10 +643,8 @@ static int do_one_pass(journal_t *journal, | |||
643 | 643 | ||
644 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, | 644 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, |
645 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){ | 645 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){ |
646 | printk(KERN_ERR | 646 | journal->j_failed_commit = |
647 | "JBD: Transaction %u " | 647 | next_commit_ID; |
648 | "found to be corrupt.\n", | ||
649 | next_commit_ID); | ||
650 | brelse(bh); | 648 | brelse(bh); |
651 | break; | 649 | break; |
652 | } | 650 | } |
diff --git a/fs/libfs.c b/fs/libfs.c index b004dfadd891..892d41cb3382 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -528,6 +528,23 @@ ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos, | |||
528 | return count; | 528 | return count; |
529 | } | 529 | } |
530 | 530 | ||
531 | ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
532 | const void *from, size_t available) | ||
533 | { | ||
534 | loff_t pos = *ppos; | ||
535 | |||
536 | if (pos < 0) | ||
537 | return -EINVAL; | ||
538 | if (pos >= available) | ||
539 | return 0; | ||
540 | if (count > available - pos) | ||
541 | count = available - pos; | ||
542 | memcpy(to, from + pos, count); | ||
543 | *ppos = pos + count; | ||
544 | |||
545 | return count; | ||
546 | } | ||
547 | |||
531 | /* | 548 | /* |
532 | * Transaction based IO. | 549 | * Transaction based IO. |
533 | * The file expects a single write which triggers the transaction, and then | 550 | * The file expects a single write which triggers the transaction, and then |
@@ -800,6 +817,7 @@ EXPORT_SYMBOL(simple_statfs); | |||
800 | EXPORT_SYMBOL(simple_sync_file); | 817 | EXPORT_SYMBOL(simple_sync_file); |
801 | EXPORT_SYMBOL(simple_unlink); | 818 | EXPORT_SYMBOL(simple_unlink); |
802 | EXPORT_SYMBOL(simple_read_from_buffer); | 819 | EXPORT_SYMBOL(simple_read_from_buffer); |
820 | EXPORT_SYMBOL(memory_read_from_buffer); | ||
803 | EXPORT_SYMBOL(simple_transaction_get); | 821 | EXPORT_SYMBOL(simple_transaction_get); |
804 | EXPORT_SYMBOL(simple_transaction_read); | 822 | EXPORT_SYMBOL(simple_transaction_read); |
805 | EXPORT_SYMBOL(simple_transaction_release); | 823 | EXPORT_SYMBOL(simple_transaction_release); |
diff --git a/fs/namei.c b/fs/namei.c index 32fd9655485b..c7e43536c49a 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2003,18 +2003,22 @@ struct dentry *lookup_create(struct nameidata *nd, int is_dir) | |||
2003 | if (IS_ERR(dentry)) | 2003 | if (IS_ERR(dentry)) |
2004 | goto fail; | 2004 | goto fail; |
2005 | 2005 | ||
2006 | if (dentry->d_inode) | ||
2007 | goto eexist; | ||
2006 | /* | 2008 | /* |
2007 | * Special case - lookup gave negative, but... we had foo/bar/ | 2009 | * Special case - lookup gave negative, but... we had foo/bar/ |
2008 | * From the vfs_mknod() POV we just have a negative dentry - | 2010 | * From the vfs_mknod() POV we just have a negative dentry - |
2009 | * all is fine. Let's be bastards - you had / on the end, you've | 2011 | * all is fine. Let's be bastards - you had / on the end, you've |
2010 | * been asking for (non-existent) directory. -ENOENT for you. | 2012 | * been asking for (non-existent) directory. -ENOENT for you. |
2011 | */ | 2013 | */ |
2012 | if (!is_dir && nd->last.name[nd->last.len] && !dentry->d_inode) | 2014 | if (unlikely(!is_dir && nd->last.name[nd->last.len])) { |
2013 | goto enoent; | 2015 | dput(dentry); |
2016 | dentry = ERR_PTR(-ENOENT); | ||
2017 | } | ||
2014 | return dentry; | 2018 | return dentry; |
2015 | enoent: | 2019 | eexist: |
2016 | dput(dentry); | 2020 | dput(dentry); |
2017 | dentry = ERR_PTR(-ENOENT); | 2021 | dentry = ERR_PTR(-EEXIST); |
2018 | fail: | 2022 | fail: |
2019 | return dentry; | 2023 | return dentry; |
2020 | } | 2024 | } |
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 5606ae3d72d3..c1e7c8300629 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c | |||
@@ -182,7 +182,7 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp) | |||
182 | if (clp == NULL) | 182 | if (clp == NULL) |
183 | return SVC_DROP; | 183 | return SVC_DROP; |
184 | 184 | ||
185 | dprintk("%s: %s NFSv4 callback!\n", __FUNCTION__, | 185 | dprintk("%s: %s NFSv4 callback!\n", __func__, |
186 | svc_print_addr(rqstp, buf, sizeof(buf))); | 186 | svc_print_addr(rqstp, buf, sizeof(buf))); |
187 | nfs_put_client(clp); | 187 | nfs_put_client(clp); |
188 | 188 | ||
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 15f7785048d3..f7e83e23cf9f 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -57,7 +57,7 @@ out_iput: | |||
57 | out_putclient: | 57 | out_putclient: |
58 | nfs_put_client(clp); | 58 | nfs_put_client(clp); |
59 | out: | 59 | out: |
60 | dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(res->status)); | 60 | dprintk("%s: exit with status = %d\n", __func__, ntohl(res->status)); |
61 | return res->status; | 61 | return res->status; |
62 | } | 62 | } |
63 | 63 | ||
@@ -98,6 +98,6 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy) | |||
98 | nfs_put_client(prev); | 98 | nfs_put_client(prev); |
99 | } while (clp != NULL); | 99 | } while (clp != NULL); |
100 | out: | 100 | out: |
101 | dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(res)); | 101 | dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); |
102 | return res; | 102 | return res; |
103 | } | 103 | } |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index 13619d24f023..dd0ef34b5845 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -141,7 +141,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound | |||
141 | /* We do not like overly long tags! */ | 141 | /* We do not like overly long tags! */ |
142 | if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) { | 142 | if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) { |
143 | printk("NFSv4 CALLBACK %s: client sent tag of length %u\n", | 143 | printk("NFSv4 CALLBACK %s: client sent tag of length %u\n", |
144 | __FUNCTION__, hdr->taglen); | 144 | __func__, hdr->taglen); |
145 | return htonl(NFS4ERR_RESOURCE); | 145 | return htonl(NFS4ERR_RESOURCE); |
146 | } | 146 | } |
147 | p = read_buf(xdr, 12); | 147 | p = read_buf(xdr, 12); |
@@ -151,7 +151,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound | |||
151 | /* Check minor version is zero. */ | 151 | /* Check minor version is zero. */ |
152 | if (minor_version != 0) { | 152 | if (minor_version != 0) { |
153 | printk(KERN_WARNING "%s: NFSv4 server callback with illegal minor version %u!\n", | 153 | printk(KERN_WARNING "%s: NFSv4 server callback with illegal minor version %u!\n", |
154 | __FUNCTION__, minor_version); | 154 | __func__, minor_version); |
155 | return htonl(NFS4ERR_MINOR_VERS_MISMATCH); | 155 | return htonl(NFS4ERR_MINOR_VERS_MISMATCH); |
156 | } | 156 | } |
157 | hdr->callback_ident = ntohl(*p++); | 157 | hdr->callback_ident = ntohl(*p++); |
@@ -179,7 +179,7 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr | |||
179 | args->addr = svc_addr(rqstp); | 179 | args->addr = svc_addr(rqstp); |
180 | status = decode_bitmap(xdr, args->bitmap); | 180 | status = decode_bitmap(xdr, args->bitmap); |
181 | out: | 181 | out: |
182 | dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(status)); | 182 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
183 | return status; | 183 | return status; |
184 | } | 184 | } |
185 | 185 | ||
@@ -200,7 +200,7 @@ static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, | |||
200 | args->truncate = ntohl(*p); | 200 | args->truncate = ntohl(*p); |
201 | status = decode_fh(xdr, &args->fh); | 201 | status = decode_fh(xdr, &args->fh); |
202 | out: | 202 | out: |
203 | dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(status)); | 203 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
204 | return status; | 204 | return status; |
205 | } | 205 | } |
206 | 206 | ||
@@ -349,7 +349,7 @@ static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, | |||
349 | status = encode_attr_mtime(xdr, res->bitmap, &res->mtime); | 349 | status = encode_attr_mtime(xdr, res->bitmap, &res->mtime); |
350 | *savep = htonl((unsigned int)((char *)xdr->p - (char *)(savep+1))); | 350 | *savep = htonl((unsigned int)((char *)xdr->p - (char *)(savep+1))); |
351 | out: | 351 | out: |
352 | dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(status)); | 352 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); |
353 | return status; | 353 | return status; |
354 | } | 354 | } |
355 | 355 | ||
@@ -363,7 +363,7 @@ static __be32 process_op(struct svc_rqst *rqstp, | |||
363 | long maxlen; | 363 | long maxlen; |
364 | __be32 res; | 364 | __be32 res; |
365 | 365 | ||
366 | dprintk("%s: start\n", __FUNCTION__); | 366 | dprintk("%s: start\n", __func__); |
367 | status = decode_op_hdr(xdr_in, &op_nr); | 367 | status = decode_op_hdr(xdr_in, &op_nr); |
368 | if (likely(status == 0)) { | 368 | if (likely(status == 0)) { |
369 | switch (op_nr) { | 369 | switch (op_nr) { |
@@ -392,7 +392,7 @@ static __be32 process_op(struct svc_rqst *rqstp, | |||
392 | status = res; | 392 | status = res; |
393 | if (op->encode_res != NULL && status == 0) | 393 | if (op->encode_res != NULL && status == 0) |
394 | status = op->encode_res(rqstp, xdr_out, resp); | 394 | status = op->encode_res(rqstp, xdr_out, resp); |
395 | dprintk("%s: done, status = %d\n", __FUNCTION__, ntohl(status)); | 395 | dprintk("%s: done, status = %d\n", __func__, ntohl(status)); |
396 | return status; | 396 | return status; |
397 | } | 397 | } |
398 | 398 | ||
@@ -401,37 +401,37 @@ static __be32 process_op(struct svc_rqst *rqstp, | |||
401 | */ | 401 | */ |
402 | static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *resp) | 402 | static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *resp) |
403 | { | 403 | { |
404 | struct cb_compound_hdr_arg hdr_arg; | 404 | struct cb_compound_hdr_arg hdr_arg = { 0 }; |
405 | struct cb_compound_hdr_res hdr_res; | 405 | struct cb_compound_hdr_res hdr_res = { NULL }; |
406 | struct xdr_stream xdr_in, xdr_out; | 406 | struct xdr_stream xdr_in, xdr_out; |
407 | __be32 *p; | 407 | __be32 *p; |
408 | __be32 status; | 408 | __be32 status; |
409 | unsigned int nops = 1; | 409 | unsigned int nops = 0; |
410 | 410 | ||
411 | dprintk("%s: start\n", __FUNCTION__); | 411 | dprintk("%s: start\n", __func__); |
412 | 412 | ||
413 | xdr_init_decode(&xdr_in, &rqstp->rq_arg, rqstp->rq_arg.head[0].iov_base); | 413 | xdr_init_decode(&xdr_in, &rqstp->rq_arg, rqstp->rq_arg.head[0].iov_base); |
414 | 414 | ||
415 | p = (__be32*)((char *)rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len); | 415 | p = (__be32*)((char *)rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len); |
416 | xdr_init_encode(&xdr_out, &rqstp->rq_res, p); | 416 | xdr_init_encode(&xdr_out, &rqstp->rq_res, p); |
417 | 417 | ||
418 | decode_compound_hdr_arg(&xdr_in, &hdr_arg); | 418 | status = decode_compound_hdr_arg(&xdr_in, &hdr_arg); |
419 | if (status == __constant_htonl(NFS4ERR_RESOURCE)) | ||
420 | return rpc_garbage_args; | ||
421 | |||
419 | hdr_res.taglen = hdr_arg.taglen; | 422 | hdr_res.taglen = hdr_arg.taglen; |
420 | hdr_res.tag = hdr_arg.tag; | 423 | hdr_res.tag = hdr_arg.tag; |
421 | hdr_res.nops = NULL; | 424 | if (encode_compound_hdr_res(&xdr_out, &hdr_res) != 0) |
422 | encode_compound_hdr_res(&xdr_out, &hdr_res); | 425 | return rpc_system_err; |
423 | 426 | ||
424 | for (;;) { | 427 | while (status == 0 && nops != hdr_arg.nops) { |
425 | status = process_op(rqstp, &xdr_in, argp, &xdr_out, resp); | 428 | status = process_op(rqstp, &xdr_in, argp, &xdr_out, resp); |
426 | if (status != 0) | ||
427 | break; | ||
428 | if (nops == hdr_arg.nops) | ||
429 | break; | ||
430 | nops++; | 429 | nops++; |
431 | } | 430 | } |
431 | |||
432 | *hdr_res.status = status; | 432 | *hdr_res.status = status; |
433 | *hdr_res.nops = htonl(nops); | 433 | *hdr_res.nops = htonl(nops); |
434 | dprintk("%s: done, status = %u\n", __FUNCTION__, ntohl(status)); | 434 | dprintk("%s: done, status = %u\n", __func__, ntohl(status)); |
435 | return rpc_success; | 435 | return rpc_success; |
436 | } | 436 | } |
437 | 437 | ||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 89ac5bb0401c..f2a092ca69b5 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -488,7 +488,7 @@ static int nfs_create_rpc_client(struct nfs_client *clp, | |||
488 | clnt = rpc_create(&args); | 488 | clnt = rpc_create(&args); |
489 | if (IS_ERR(clnt)) { | 489 | if (IS_ERR(clnt)) { |
490 | dprintk("%s: cannot create RPC client. Error = %ld\n", | 490 | dprintk("%s: cannot create RPC client. Error = %ld\n", |
491 | __FUNCTION__, PTR_ERR(clnt)); | 491 | __func__, PTR_ERR(clnt)); |
492 | return PTR_ERR(clnt); | 492 | return PTR_ERR(clnt); |
493 | } | 493 | } |
494 | 494 | ||
@@ -576,7 +576,7 @@ static int nfs_init_server_rpcclient(struct nfs_server *server, | |||
576 | 576 | ||
577 | server->client = rpc_clone_client(clp->cl_rpcclient); | 577 | server->client = rpc_clone_client(clp->cl_rpcclient); |
578 | if (IS_ERR(server->client)) { | 578 | if (IS_ERR(server->client)) { |
579 | dprintk("%s: couldn't create rpc_client!\n", __FUNCTION__); | 579 | dprintk("%s: couldn't create rpc_client!\n", __func__); |
580 | return PTR_ERR(server->client); | 580 | return PTR_ERR(server->client); |
581 | } | 581 | } |
582 | 582 | ||
@@ -590,7 +590,7 @@ static int nfs_init_server_rpcclient(struct nfs_server *server, | |||
590 | 590 | ||
591 | auth = rpcauth_create(pseudoflavour, server->client); | 591 | auth = rpcauth_create(pseudoflavour, server->client); |
592 | if (IS_ERR(auth)) { | 592 | if (IS_ERR(auth)) { |
593 | dprintk("%s: couldn't create credcache!\n", __FUNCTION__); | 593 | dprintk("%s: couldn't create credcache!\n", __func__); |
594 | return PTR_ERR(auth); | 594 | return PTR_ERR(auth); |
595 | } | 595 | } |
596 | } | 596 | } |
@@ -985,7 +985,7 @@ static int nfs4_init_client(struct nfs_client *clp, | |||
985 | error = nfs_idmap_new(clp); | 985 | error = nfs_idmap_new(clp); |
986 | if (error < 0) { | 986 | if (error < 0) { |
987 | dprintk("%s: failed to create idmapper. Error = %d\n", | 987 | dprintk("%s: failed to create idmapper. Error = %d\n", |
988 | __FUNCTION__, error); | 988 | __func__, error); |
989 | goto error; | 989 | goto error; |
990 | } | 990 | } |
991 | __set_bit(NFS_CS_IDMAP, &clp->cl_res_state); | 991 | __set_bit(NFS_CS_IDMAP, &clp->cl_res_state); |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 00a5e4405e16..cc563cfa6940 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -60,7 +60,7 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_ | |||
60 | switch (status) { | 60 | switch (status) { |
61 | default: | 61 | default: |
62 | printk(KERN_ERR "%s: unhandled error %d.\n", | 62 | printk(KERN_ERR "%s: unhandled error %d.\n", |
63 | __FUNCTION__, status); | 63 | __func__, status); |
64 | case -NFS4ERR_EXPIRED: | 64 | case -NFS4ERR_EXPIRED: |
65 | /* kill_proc(fl->fl_pid, SIGLOST, 1); */ | 65 | /* kill_proc(fl->fl_pid, SIGLOST, 1); */ |
66 | case -NFS4ERR_STALE_CLIENTID: | 66 | case -NFS4ERR_STALE_CLIENTID: |
@@ -186,7 +186,7 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
186 | */ | 186 | */ |
187 | dfprintk(FILE, "%s: server %s handed out " | 187 | dfprintk(FILE, "%s: server %s handed out " |
188 | "a duplicate delegation!\n", | 188 | "a duplicate delegation!\n", |
189 | __FUNCTION__, clp->cl_hostname); | 189 | __func__, clp->cl_hostname); |
190 | if (delegation->type <= nfsi->delegation->type) { | 190 | if (delegation->type <= nfsi->delegation->type) { |
191 | freeme = delegation; | 191 | freeme = delegation; |
192 | delegation = NULL; | 192 | delegation = NULL; |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index f288b3ecab4a..58d43daec084 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -180,7 +180,7 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page) | |||
180 | int error; | 180 | int error; |
181 | 181 | ||
182 | dfprintk(DIRCACHE, "NFS: %s: reading cookie %Lu into page %lu\n", | 182 | dfprintk(DIRCACHE, "NFS: %s: reading cookie %Lu into page %lu\n", |
183 | __FUNCTION__, (long long)desc->entry->cookie, | 183 | __func__, (long long)desc->entry->cookie, |
184 | page->index); | 184 | page->index); |
185 | 185 | ||
186 | again: | 186 | again: |
@@ -256,7 +256,7 @@ int find_dirent(nfs_readdir_descriptor_t *desc) | |||
256 | 256 | ||
257 | while((status = dir_decode(desc)) == 0) { | 257 | while((status = dir_decode(desc)) == 0) { |
258 | dfprintk(DIRCACHE, "NFS: %s: examining cookie %Lu\n", | 258 | dfprintk(DIRCACHE, "NFS: %s: examining cookie %Lu\n", |
259 | __FUNCTION__, (unsigned long long)entry->cookie); | 259 | __func__, (unsigned long long)entry->cookie); |
260 | if (entry->prev_cookie == *desc->dir_cookie) | 260 | if (entry->prev_cookie == *desc->dir_cookie) |
261 | break; | 261 | break; |
262 | if (loop_count++ > 200) { | 262 | if (loop_count++ > 200) { |
@@ -315,7 +315,7 @@ int find_dirent_page(nfs_readdir_descriptor_t *desc) | |||
315 | int status; | 315 | int status; |
316 | 316 | ||
317 | dfprintk(DIRCACHE, "NFS: %s: searching page %ld for target %Lu\n", | 317 | dfprintk(DIRCACHE, "NFS: %s: searching page %ld for target %Lu\n", |
318 | __FUNCTION__, desc->page_index, | 318 | __func__, desc->page_index, |
319 | (long long) *desc->dir_cookie); | 319 | (long long) *desc->dir_cookie); |
320 | 320 | ||
321 | /* If we find the page in the page_cache, we cannot be sure | 321 | /* If we find the page in the page_cache, we cannot be sure |
@@ -339,7 +339,7 @@ int find_dirent_page(nfs_readdir_descriptor_t *desc) | |||
339 | if (status < 0) | 339 | if (status < 0) |
340 | dir_page_release(desc); | 340 | dir_page_release(desc); |
341 | out: | 341 | out: |
342 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", __FUNCTION__, status); | 342 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", __func__, status); |
343 | return status; | 343 | return status; |
344 | } | 344 | } |
345 | 345 | ||
@@ -380,7 +380,7 @@ int readdir_search_pagecache(nfs_readdir_descriptor_t *desc) | |||
380 | } | 380 | } |
381 | } | 381 | } |
382 | 382 | ||
383 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", __FUNCTION__, res); | 383 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", __func__, res); |
384 | return res; | 384 | return res; |
385 | } | 385 | } |
386 | 386 | ||
@@ -506,7 +506,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
506 | desc->entry->eof = 0; | 506 | desc->entry->eof = 0; |
507 | out: | 507 | out: |
508 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", | 508 | dfprintk(DIRCACHE, "NFS: %s: returns %d\n", |
509 | __FUNCTION__, status); | 509 | __func__, status); |
510 | return status; | 510 | return status; |
511 | out_release: | 511 | out_release: |
512 | dir_page_release(desc); | 512 | dir_page_release(desc); |
@@ -780,7 +780,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
780 | 780 | ||
781 | if (is_bad_inode(inode)) { | 781 | if (is_bad_inode(inode)) { |
782 | dfprintk(LOOKUPCACHE, "%s: %s/%s has dud inode\n", | 782 | dfprintk(LOOKUPCACHE, "%s: %s/%s has dud inode\n", |
783 | __FUNCTION__, dentry->d_parent->d_name.name, | 783 | __func__, dentry->d_parent->d_name.name, |
784 | dentry->d_name.name); | 784 | dentry->d_name.name); |
785 | goto out_bad; | 785 | goto out_bad; |
786 | } | 786 | } |
@@ -808,7 +808,7 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
808 | unlock_kernel(); | 808 | unlock_kernel(); |
809 | dput(parent); | 809 | dput(parent); |
810 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is valid\n", | 810 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is valid\n", |
811 | __FUNCTION__, dentry->d_parent->d_name.name, | 811 | __func__, dentry->d_parent->d_name.name, |
812 | dentry->d_name.name); | 812 | dentry->d_name.name); |
813 | return 1; | 813 | return 1; |
814 | out_zap_parent: | 814 | out_zap_parent: |
@@ -827,7 +827,7 @@ out_zap_parent: | |||
827 | unlock_kernel(); | 827 | unlock_kernel(); |
828 | dput(parent); | 828 | dput(parent); |
829 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", | 829 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", |
830 | __FUNCTION__, dentry->d_parent->d_name.name, | 830 | __func__, dentry->d_parent->d_name.name, |
831 | dentry->d_name.name); | 831 | dentry->d_name.name); |
832 | return 0; | 832 | return 0; |
833 | } | 833 | } |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 3536b01164f9..d84a3d8f32af 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -526,7 +526,7 @@ static int do_vfs_lock(struct file *file, struct file_lock *fl) | |||
526 | if (res < 0) | 526 | if (res < 0) |
527 | dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager" | 527 | dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager" |
528 | " - error %d!\n", | 528 | " - error %d!\n", |
529 | __FUNCTION__, res); | 529 | __func__, res); |
530 | return res; | 530 | return res; |
531 | } | 531 | } |
532 | 532 | ||
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 5cb3345eb694..596c5d8e86f4 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -541,8 +541,7 @@ static void __put_nfs_open_context(struct nfs_open_context *ctx, int wait) | |||
541 | } | 541 | } |
542 | if (ctx->cred != NULL) | 542 | if (ctx->cred != NULL) |
543 | put_rpccred(ctx->cred); | 543 | put_rpccred(ctx->cred); |
544 | dput(ctx->path.dentry); | 544 | path_put(&ctx->path); |
545 | mntput(ctx->path.mnt); | ||
546 | kfree(ctx); | 545 | kfree(ctx); |
547 | } | 546 | } |
548 | 547 | ||
@@ -707,6 +706,13 @@ int nfs_attribute_timeout(struct inode *inode) | |||
707 | 706 | ||
708 | if (nfs_have_delegation(inode, FMODE_READ)) | 707 | if (nfs_have_delegation(inode, FMODE_READ)) |
709 | return 0; | 708 | return 0; |
709 | /* | ||
710 | * Special case: if the attribute timeout is set to 0, then always | ||
711 | * treat the cache as having expired (unless holding | ||
712 | * a delegation). | ||
713 | */ | ||
714 | if (nfsi->attrtimeo == 0) | ||
715 | return 1; | ||
710 | return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); | 716 | return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); |
711 | } | 717 | } |
712 | 718 | ||
@@ -995,7 +1001,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
995 | unsigned long now = jiffies; | 1001 | unsigned long now = jiffies; |
996 | 1002 | ||
997 | dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", | 1003 | dfprintk(VFS, "NFS: %s(%s/%ld ct=%d info=0x%x)\n", |
998 | __FUNCTION__, inode->i_sb->s_id, inode->i_ino, | 1004 | __func__, inode->i_sb->s_id, inode->i_ino, |
999 | atomic_read(&inode->i_count), fattr->valid); | 1005 | atomic_read(&inode->i_count), fattr->valid); |
1000 | 1006 | ||
1001 | if (nfsi->fileid != fattr->fileid) | 1007 | if (nfsi->fileid != fattr->fileid) |
@@ -1119,7 +1125,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1119 | * Big trouble! The inode has become a different object. | 1125 | * Big trouble! The inode has become a different object. |
1120 | */ | 1126 | */ |
1121 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", | 1127 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", |
1122 | __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); | 1128 | __func__, inode->i_ino, inode->i_mode, fattr->mode); |
1123 | out_err: | 1129 | out_err: |
1124 | /* | 1130 | /* |
1125 | * No need to worry about unhashing the dentry, as the | 1131 | * No need to worry about unhashing the dentry, as the |
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index af4d0f1e402c..2f285ef76399 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
@@ -106,7 +106,7 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
106 | dprintk("--> nfs_follow_mountpoint()\n"); | 106 | dprintk("--> nfs_follow_mountpoint()\n"); |
107 | 107 | ||
108 | BUG_ON(IS_ROOT(dentry)); | 108 | BUG_ON(IS_ROOT(dentry)); |
109 | dprintk("%s: enter\n", __FUNCTION__); | 109 | dprintk("%s: enter\n", __func__); |
110 | dput(nd->path.dentry); | 110 | dput(nd->path.dentry); |
111 | nd->path.dentry = dget(dentry); | 111 | nd->path.dentry = dget(dentry); |
112 | 112 | ||
@@ -137,13 +137,12 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
137 | goto out_follow; | 137 | goto out_follow; |
138 | goto out_err; | 138 | goto out_err; |
139 | } | 139 | } |
140 | mntput(nd->path.mnt); | 140 | path_put(&nd->path); |
141 | dput(nd->path.dentry); | ||
142 | nd->path.mnt = mnt; | 141 | nd->path.mnt = mnt; |
143 | nd->path.dentry = dget(mnt->mnt_root); | 142 | nd->path.dentry = dget(mnt->mnt_root); |
144 | schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); | 143 | schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); |
145 | out: | 144 | out: |
146 | dprintk("%s: done, returned %d\n", __FUNCTION__, err); | 145 | dprintk("%s: done, returned %d\n", __func__, err); |
147 | 146 | ||
148 | dprintk("<-- nfs_follow_mountpoint() = %d\n", err); | 147 | dprintk("<-- nfs_follow_mountpoint() = %d\n", err); |
149 | return ERR_PTR(err); | 148 | return ERR_PTR(err); |
@@ -230,7 +229,7 @@ static struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, | |||
230 | 229 | ||
231 | dprintk("--> nfs_do_submount()\n"); | 230 | dprintk("--> nfs_do_submount()\n"); |
232 | 231 | ||
233 | dprintk("%s: submounting on %s/%s\n", __FUNCTION__, | 232 | dprintk("%s: submounting on %s/%s\n", __func__, |
234 | dentry->d_parent->d_name.name, | 233 | dentry->d_parent->d_name.name, |
235 | dentry->d_name.name); | 234 | dentry->d_name.name); |
236 | if (page == NULL) | 235 | if (page == NULL) |
@@ -243,7 +242,7 @@ static struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent, | |||
243 | free_page: | 242 | free_page: |
244 | free_page((unsigned long)page); | 243 | free_page((unsigned long)page); |
245 | out: | 244 | out: |
246 | dprintk("%s: done\n", __FUNCTION__); | 245 | dprintk("%s: done\n", __func__); |
247 | 246 | ||
248 | dprintk("<-- nfs_do_submount() = %p\n", mnt); | 247 | dprintk("<-- nfs_do_submount() = %p\n", mnt); |
249 | return mnt; | 248 | return mnt; |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 549dbce714a4..c3523ad03ed1 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -63,15 +63,15 @@ do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle, | |||
63 | }; | 63 | }; |
64 | int status; | 64 | int status; |
65 | 65 | ||
66 | dprintk("%s: call fsinfo\n", __FUNCTION__); | 66 | dprintk("%s: call fsinfo\n", __func__); |
67 | nfs_fattr_init(info->fattr); | 67 | nfs_fattr_init(info->fattr); |
68 | status = rpc_call_sync(client, &msg, 0); | 68 | status = rpc_call_sync(client, &msg, 0); |
69 | dprintk("%s: reply fsinfo: %d\n", __FUNCTION__, status); | 69 | dprintk("%s: reply fsinfo: %d\n", __func__, status); |
70 | if (!(info->fattr->valid & NFS_ATTR_FATTR)) { | 70 | if (!(info->fattr->valid & NFS_ATTR_FATTR)) { |
71 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; | 71 | msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR]; |
72 | msg.rpc_resp = info->fattr; | 72 | msg.rpc_resp = info->fattr; |
73 | status = rpc_call_sync(client, &msg, 0); | 73 | status = rpc_call_sync(client, &msg, 0); |
74 | dprintk("%s: reply getattr: %d\n", __FUNCTION__, status); | 74 | dprintk("%s: reply getattr: %d\n", __func__, status); |
75 | } | 75 | } |
76 | return status; | 76 | return status; |
77 | } | 77 | } |
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index bd1b9d663fb9..ea790645fda6 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -206,7 +206,6 @@ struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp); | |||
206 | 206 | ||
207 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); | 207 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); |
208 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); | 208 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); |
209 | extern void nfs4_drop_state_owner(struct nfs4_state_owner *); | ||
210 | extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); | 209 | extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); |
211 | extern void nfs4_put_open_state(struct nfs4_state *); | 210 | extern void nfs4_put_open_state(struct nfs4_state *); |
212 | extern void nfs4_close_state(struct path *, struct nfs4_state *, mode_t); | 211 | extern void nfs4_close_state(struct path *, struct nfs4_state *, mode_t); |
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 5f9ba41ed5bf..b112857301f7 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c | |||
@@ -86,7 +86,7 @@ static int nfs4_validate_fspath(const struct vfsmount *mnt_parent, | |||
86 | 86 | ||
87 | if (strncmp(path, fs_path, strlen(fs_path)) != 0) { | 87 | if (strncmp(path, fs_path, strlen(fs_path)) != 0) { |
88 | dprintk("%s: path %s does not begin with fsroot %s\n", | 88 | dprintk("%s: path %s does not begin with fsroot %s\n", |
89 | __FUNCTION__, path, fs_path); | 89 | __func__, path, fs_path); |
90 | return -ENOENT; | 90 | return -ENOENT; |
91 | } | 91 | } |
92 | 92 | ||
@@ -134,7 +134,7 @@ static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent, | |||
134 | if (locations == NULL || locations->nlocations <= 0) | 134 | if (locations == NULL || locations->nlocations <= 0) |
135 | goto out; | 135 | goto out; |
136 | 136 | ||
137 | dprintk("%s: referral at %s/%s\n", __FUNCTION__, | 137 | dprintk("%s: referral at %s/%s\n", __func__, |
138 | dentry->d_parent->d_name.name, dentry->d_name.name); | 138 | dentry->d_parent->d_name.name, dentry->d_name.name); |
139 | 139 | ||
140 | page = (char *) __get_free_page(GFP_USER); | 140 | page = (char *) __get_free_page(GFP_USER); |
@@ -204,7 +204,7 @@ static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent, | |||
204 | out: | 204 | out: |
205 | free_page((unsigned long) page); | 205 | free_page((unsigned long) page); |
206 | free_page((unsigned long) page2); | 206 | free_page((unsigned long) page2); |
207 | dprintk("%s: done\n", __FUNCTION__); | 207 | dprintk("%s: done\n", __func__); |
208 | return mnt; | 208 | return mnt; |
209 | } | 209 | } |
210 | 210 | ||
@@ -223,7 +223,7 @@ struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentr | |||
223 | int err; | 223 | int err; |
224 | 224 | ||
225 | /* BUG_ON(IS_ROOT(dentry)); */ | 225 | /* BUG_ON(IS_ROOT(dentry)); */ |
226 | dprintk("%s: enter\n", __FUNCTION__); | 226 | dprintk("%s: enter\n", __func__); |
227 | 227 | ||
228 | page = alloc_page(GFP_KERNEL); | 228 | page = alloc_page(GFP_KERNEL); |
229 | if (page == NULL) | 229 | if (page == NULL) |
@@ -238,7 +238,7 @@ struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentr | |||
238 | 238 | ||
239 | parent = dget_parent(dentry); | 239 | parent = dget_parent(dentry); |
240 | dprintk("%s: getting locations for %s/%s\n", | 240 | dprintk("%s: getting locations for %s/%s\n", |
241 | __FUNCTION__, parent->d_name.name, dentry->d_name.name); | 241 | __func__, parent->d_name.name, dentry->d_name.name); |
242 | 242 | ||
243 | err = nfs4_proc_fs_locations(parent->d_inode, &dentry->d_name, fs_locations, page); | 243 | err = nfs4_proc_fs_locations(parent->d_inode, &dentry->d_name, fs_locations, page); |
244 | dput(parent); | 244 | dput(parent); |
@@ -252,6 +252,6 @@ out_free: | |||
252 | __free_page(page); | 252 | __free_page(page); |
253 | kfree(fs_locations); | 253 | kfree(fs_locations); |
254 | out: | 254 | out: |
255 | dprintk("%s: done\n", __FUNCTION__); | 255 | dprintk("%s: done\n", __func__); |
256 | return mnt; | 256 | return mnt; |
257 | } | 257 | } |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index dbc09271af02..1293e0acd82b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -73,7 +73,7 @@ int nfs4_map_errors(int err) | |||
73 | { | 73 | { |
74 | if (err < -1000) { | 74 | if (err < -1000) { |
75 | dprintk("%s could not handle NFSv4 error %d\n", | 75 | dprintk("%s could not handle NFSv4 error %d\n", |
76 | __FUNCTION__, -err); | 76 | __func__, -err); |
77 | return -EIO; | 77 | return -EIO; |
78 | } | 78 | } |
79 | return err; | 79 | return err; |
@@ -306,8 +306,7 @@ static void nfs4_opendata_free(struct kref *kref) | |||
306 | nfs4_put_open_state(p->state); | 306 | nfs4_put_open_state(p->state); |
307 | nfs4_put_state_owner(p->owner); | 307 | nfs4_put_state_owner(p->owner); |
308 | dput(p->dir); | 308 | dput(p->dir); |
309 | dput(p->path.dentry); | 309 | path_put(&p->path); |
310 | mntput(p->path.mnt); | ||
311 | kfree(p); | 310 | kfree(p); |
312 | } | 311 | } |
313 | 312 | ||
@@ -1210,8 +1209,7 @@ static void nfs4_free_closedata(void *data) | |||
1210 | nfs4_put_open_state(calldata->state); | 1209 | nfs4_put_open_state(calldata->state); |
1211 | nfs_free_seqid(calldata->arg.seqid); | 1210 | nfs_free_seqid(calldata->arg.seqid); |
1212 | nfs4_put_state_owner(sp); | 1211 | nfs4_put_state_owner(sp); |
1213 | dput(calldata->path.dentry); | 1212 | path_put(&calldata->path); |
1214 | mntput(calldata->path.mnt); | ||
1215 | kfree(calldata); | 1213 | kfree(calldata); |
1216 | } | 1214 | } |
1217 | 1215 | ||
@@ -1578,7 +1576,7 @@ static int nfs4_get_referral(struct inode *dir, const struct qstr *name, struct | |||
1578 | goto out; | 1576 | goto out; |
1579 | /* Make sure server returned a different fsid for the referral */ | 1577 | /* Make sure server returned a different fsid for the referral */ |
1580 | if (nfs_fsid_equal(&NFS_SERVER(dir)->fsid, &locations->fattr.fsid)) { | 1578 | if (nfs_fsid_equal(&NFS_SERVER(dir)->fsid, &locations->fattr.fsid)) { |
1581 | dprintk("%s: server did not return a different fsid for a referral at %s\n", __FUNCTION__, name->name); | 1579 | dprintk("%s: server did not return a different fsid for a referral at %s\n", __func__, name->name); |
1582 | status = -EIO; | 1580 | status = -EIO; |
1583 | goto out; | 1581 | goto out; |
1584 | } | 1582 | } |
@@ -2211,7 +2209,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
2211 | }; | 2209 | }; |
2212 | int status; | 2210 | int status; |
2213 | 2211 | ||
2214 | dprintk("%s: dentry = %s/%s, cookie = %Lu\n", __FUNCTION__, | 2212 | dprintk("%s: dentry = %s/%s, cookie = %Lu\n", __func__, |
2215 | dentry->d_parent->d_name.name, | 2213 | dentry->d_parent->d_name.name, |
2216 | dentry->d_name.name, | 2214 | dentry->d_name.name, |
2217 | (unsigned long long)cookie); | 2215 | (unsigned long long)cookie); |
@@ -2223,7 +2221,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
2223 | 2221 | ||
2224 | nfs_invalidate_atime(dir); | 2222 | nfs_invalidate_atime(dir); |
2225 | 2223 | ||
2226 | dprintk("%s: returns %d\n", __FUNCTION__, status); | 2224 | dprintk("%s: returns %d\n", __func__, status); |
2227 | return status; | 2225 | return status; |
2228 | } | 2226 | } |
2229 | 2227 | ||
@@ -3342,7 +3340,7 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) | |||
3342 | struct nfs4_lockdata *data = calldata; | 3340 | struct nfs4_lockdata *data = calldata; |
3343 | struct nfs4_state *state = data->lsp->ls_state; | 3341 | struct nfs4_state *state = data->lsp->ls_state; |
3344 | 3342 | ||
3345 | dprintk("%s: begin!\n", __FUNCTION__); | 3343 | dprintk("%s: begin!\n", __func__); |
3346 | if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0) | 3344 | if (nfs_wait_on_sequence(data->arg.lock_seqid, task) != 0) |
3347 | return; | 3345 | return; |
3348 | /* Do we need to do an open_to_lock_owner? */ | 3346 | /* Do we need to do an open_to_lock_owner? */ |
@@ -3356,14 +3354,14 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata) | |||
3356 | data->arg.new_lock_owner = 0; | 3354 | data->arg.new_lock_owner = 0; |
3357 | data->timestamp = jiffies; | 3355 | data->timestamp = jiffies; |
3358 | rpc_call_start(task); | 3356 | rpc_call_start(task); |
3359 | dprintk("%s: done!, ret = %d\n", __FUNCTION__, data->rpc_status); | 3357 | dprintk("%s: done!, ret = %d\n", __func__, data->rpc_status); |
3360 | } | 3358 | } |
3361 | 3359 | ||
3362 | static void nfs4_lock_done(struct rpc_task *task, void *calldata) | 3360 | static void nfs4_lock_done(struct rpc_task *task, void *calldata) |
3363 | { | 3361 | { |
3364 | struct nfs4_lockdata *data = calldata; | 3362 | struct nfs4_lockdata *data = calldata; |
3365 | 3363 | ||
3366 | dprintk("%s: begin!\n", __FUNCTION__); | 3364 | dprintk("%s: begin!\n", __func__); |
3367 | 3365 | ||
3368 | data->rpc_status = task->tk_status; | 3366 | data->rpc_status = task->tk_status; |
3369 | if (RPC_ASSASSINATED(task)) | 3367 | if (RPC_ASSASSINATED(task)) |
@@ -3381,14 +3379,14 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) | |||
3381 | renew_lease(NFS_SERVER(data->ctx->path.dentry->d_inode), data->timestamp); | 3379 | renew_lease(NFS_SERVER(data->ctx->path.dentry->d_inode), data->timestamp); |
3382 | } | 3380 | } |
3383 | out: | 3381 | out: |
3384 | dprintk("%s: done, ret = %d!\n", __FUNCTION__, data->rpc_status); | 3382 | dprintk("%s: done, ret = %d!\n", __func__, data->rpc_status); |
3385 | } | 3383 | } |
3386 | 3384 | ||
3387 | static void nfs4_lock_release(void *calldata) | 3385 | static void nfs4_lock_release(void *calldata) |
3388 | { | 3386 | { |
3389 | struct nfs4_lockdata *data = calldata; | 3387 | struct nfs4_lockdata *data = calldata; |
3390 | 3388 | ||
3391 | dprintk("%s: begin!\n", __FUNCTION__); | 3389 | dprintk("%s: begin!\n", __func__); |
3392 | nfs_free_seqid(data->arg.open_seqid); | 3390 | nfs_free_seqid(data->arg.open_seqid); |
3393 | if (data->cancelled != 0) { | 3391 | if (data->cancelled != 0) { |
3394 | struct rpc_task *task; | 3392 | struct rpc_task *task; |
@@ -3396,13 +3394,13 @@ static void nfs4_lock_release(void *calldata) | |||
3396 | data->arg.lock_seqid); | 3394 | data->arg.lock_seqid); |
3397 | if (!IS_ERR(task)) | 3395 | if (!IS_ERR(task)) |
3398 | rpc_put_task(task); | 3396 | rpc_put_task(task); |
3399 | dprintk("%s: cancelling lock!\n", __FUNCTION__); | 3397 | dprintk("%s: cancelling lock!\n", __func__); |
3400 | } else | 3398 | } else |
3401 | nfs_free_seqid(data->arg.lock_seqid); | 3399 | nfs_free_seqid(data->arg.lock_seqid); |
3402 | nfs4_put_lock_state(data->lsp); | 3400 | nfs4_put_lock_state(data->lsp); |
3403 | put_nfs_open_context(data->ctx); | 3401 | put_nfs_open_context(data->ctx); |
3404 | kfree(data); | 3402 | kfree(data); |
3405 | dprintk("%s: done!\n", __FUNCTION__); | 3403 | dprintk("%s: done!\n", __func__); |
3406 | } | 3404 | } |
3407 | 3405 | ||
3408 | static const struct rpc_call_ops nfs4_lock_ops = { | 3406 | static const struct rpc_call_ops nfs4_lock_ops = { |
@@ -3428,7 +3426,7 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f | |||
3428 | }; | 3426 | }; |
3429 | int ret; | 3427 | int ret; |
3430 | 3428 | ||
3431 | dprintk("%s: begin!\n", __FUNCTION__); | 3429 | dprintk("%s: begin!\n", __func__); |
3432 | data = nfs4_alloc_lockdata(fl, nfs_file_open_context(fl->fl_file), | 3430 | data = nfs4_alloc_lockdata(fl, nfs_file_open_context(fl->fl_file), |
3433 | fl->fl_u.nfs4_fl.owner); | 3431 | fl->fl_u.nfs4_fl.owner); |
3434 | if (data == NULL) | 3432 | if (data == NULL) |
@@ -3451,7 +3449,7 @@ static int _nfs4_do_setlk(struct nfs4_state *state, int cmd, struct file_lock *f | |||
3451 | } else | 3449 | } else |
3452 | data->cancelled = 1; | 3450 | data->cancelled = 1; |
3453 | rpc_put_task(task); | 3451 | rpc_put_task(task); |
3454 | dprintk("%s: done, ret = %d!\n", __FUNCTION__, ret); | 3452 | dprintk("%s: done, ret = %d!\n", __func__, ret); |
3455 | return ret; | 3453 | return ret; |
3456 | } | 3454 | } |
3457 | 3455 | ||
@@ -3527,7 +3525,7 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock | |||
3527 | /* Note: we always want to sleep here! */ | 3525 | /* Note: we always want to sleep here! */ |
3528 | request->fl_flags = fl_flags | FL_SLEEP; | 3526 | request->fl_flags = fl_flags | FL_SLEEP; |
3529 | if (do_vfs_lock(request->fl_file, request) < 0) | 3527 | if (do_vfs_lock(request->fl_file, request) < 0) |
3530 | printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __FUNCTION__); | 3528 | printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", __func__); |
3531 | out_unlock: | 3529 | out_unlock: |
3532 | up_read(&clp->cl_sem); | 3530 | up_read(&clp->cl_sem); |
3533 | out: | 3531 | out: |
@@ -3665,12 +3663,12 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, | |||
3665 | }; | 3663 | }; |
3666 | int status; | 3664 | int status; |
3667 | 3665 | ||
3668 | dprintk("%s: start\n", __FUNCTION__); | 3666 | dprintk("%s: start\n", __func__); |
3669 | nfs_fattr_init(&fs_locations->fattr); | 3667 | nfs_fattr_init(&fs_locations->fattr); |
3670 | fs_locations->server = server; | 3668 | fs_locations->server = server; |
3671 | fs_locations->nlocations = 0; | 3669 | fs_locations->nlocations = 0; |
3672 | status = rpc_call_sync(server->client, &msg, 0); | 3670 | status = rpc_call_sync(server->client, &msg, 0); |
3673 | dprintk("%s: returned status = %d\n", __FUNCTION__, status); | 3671 | dprintk("%s: returned status = %d\n", __func__, status); |
3674 | return status; | 3672 | return status; |
3675 | } | 3673 | } |
3676 | 3674 | ||
diff --git a/fs/nfs/nfs4renewd.c b/fs/nfs/nfs4renewd.c index 5e2e4af1a0e6..3305acbbe2ae 100644 --- a/fs/nfs/nfs4renewd.c +++ b/fs/nfs/nfs4renewd.c | |||
@@ -66,7 +66,7 @@ nfs4_renew_state(struct work_struct *work) | |||
66 | unsigned long last, now; | 66 | unsigned long last, now; |
67 | 67 | ||
68 | down_read(&clp->cl_sem); | 68 | down_read(&clp->cl_sem); |
69 | dprintk("%s: start\n", __FUNCTION__); | 69 | dprintk("%s: start\n", __func__); |
70 | /* Are there any active superblocks? */ | 70 | /* Are there any active superblocks? */ |
71 | if (list_empty(&clp->cl_superblocks)) | 71 | if (list_empty(&clp->cl_superblocks)) |
72 | goto out; | 72 | goto out; |
@@ -92,17 +92,17 @@ nfs4_renew_state(struct work_struct *work) | |||
92 | spin_lock(&clp->cl_lock); | 92 | spin_lock(&clp->cl_lock); |
93 | } else | 93 | } else |
94 | dprintk("%s: failed to call renewd. Reason: lease not expired \n", | 94 | dprintk("%s: failed to call renewd. Reason: lease not expired \n", |
95 | __FUNCTION__); | 95 | __func__); |
96 | if (timeout < 5 * HZ) /* safeguard */ | 96 | if (timeout < 5 * HZ) /* safeguard */ |
97 | timeout = 5 * HZ; | 97 | timeout = 5 * HZ; |
98 | dprintk("%s: requeueing work. Lease period = %ld\n", | 98 | dprintk("%s: requeueing work. Lease period = %ld\n", |
99 | __FUNCTION__, (timeout + HZ - 1) / HZ); | 99 | __func__, (timeout + HZ - 1) / HZ); |
100 | cancel_delayed_work(&clp->cl_renewd); | 100 | cancel_delayed_work(&clp->cl_renewd); |
101 | schedule_delayed_work(&clp->cl_renewd, timeout); | 101 | schedule_delayed_work(&clp->cl_renewd, timeout); |
102 | spin_unlock(&clp->cl_lock); | 102 | spin_unlock(&clp->cl_lock); |
103 | out: | 103 | out: |
104 | up_read(&clp->cl_sem); | 104 | up_read(&clp->cl_sem); |
105 | dprintk("%s: done\n", __FUNCTION__); | 105 | dprintk("%s: done\n", __func__); |
106 | } | 106 | } |
107 | 107 | ||
108 | /* Must be called with clp->cl_sem locked for writes */ | 108 | /* Must be called with clp->cl_sem locked for writes */ |
@@ -117,7 +117,7 @@ nfs4_schedule_state_renewal(struct nfs_client *clp) | |||
117 | if (timeout < 5 * HZ) | 117 | if (timeout < 5 * HZ) |
118 | timeout = 5 * HZ; | 118 | timeout = 5 * HZ; |
119 | dprintk("%s: requeueing work. Lease period = %ld\n", | 119 | dprintk("%s: requeueing work. Lease period = %ld\n", |
120 | __FUNCTION__, (timeout + HZ - 1) / HZ); | 120 | __func__, (timeout + HZ - 1) / HZ); |
121 | cancel_delayed_work(&clp->cl_renewd); | 121 | cancel_delayed_work(&clp->cl_renewd); |
122 | schedule_delayed_work(&clp->cl_renewd, timeout); | 122 | schedule_delayed_work(&clp->cl_renewd, timeout); |
123 | set_bit(NFS_CS_RENEWD, &clp->cl_res_state); | 123 | set_bit(NFS_CS_RENEWD, &clp->cl_res_state); |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 46eb624e4f16..856a8934f610 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -282,7 +282,7 @@ nfs4_alloc_state_owner(void) | |||
282 | return sp; | 282 | return sp; |
283 | } | 283 | } |
284 | 284 | ||
285 | void | 285 | static void |
286 | nfs4_drop_state_owner(struct nfs4_state_owner *sp) | 286 | nfs4_drop_state_owner(struct nfs4_state_owner *sp) |
287 | { | 287 | { |
288 | if (!RB_EMPTY_NODE(&sp->so_client_node)) { | 288 | if (!RB_EMPTY_NODE(&sp->so_client_node)) { |
@@ -828,7 +828,7 @@ static int nfs4_reclaim_locks(struct nfs4_state_recovery_ops *ops, struct nfs4_s | |||
828 | switch (status) { | 828 | switch (status) { |
829 | default: | 829 | default: |
830 | printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n", | 830 | printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n", |
831 | __FUNCTION__, status); | 831 | __func__, status); |
832 | case -NFS4ERR_EXPIRED: | 832 | case -NFS4ERR_EXPIRED: |
833 | case -NFS4ERR_NO_GRACE: | 833 | case -NFS4ERR_NO_GRACE: |
834 | case -NFS4ERR_RECLAIM_BAD: | 834 | case -NFS4ERR_RECLAIM_BAD: |
@@ -869,14 +869,14 @@ static int nfs4_reclaim_open_state(struct nfs4_state_recovery_ops *ops, struct n | |||
869 | list_for_each_entry(lock, &state->lock_states, ls_locks) { | 869 | list_for_each_entry(lock, &state->lock_states, ls_locks) { |
870 | if (!(lock->ls_flags & NFS_LOCK_INITIALIZED)) | 870 | if (!(lock->ls_flags & NFS_LOCK_INITIALIZED)) |
871 | printk("%s: Lock reclaim failed!\n", | 871 | printk("%s: Lock reclaim failed!\n", |
872 | __FUNCTION__); | 872 | __func__); |
873 | } | 873 | } |
874 | continue; | 874 | continue; |
875 | } | 875 | } |
876 | switch (status) { | 876 | switch (status) { |
877 | default: | 877 | default: |
878 | printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n", | 878 | printk(KERN_ERR "%s: unhandled error %d. Zeroing state\n", |
879 | __FUNCTION__, status); | 879 | __func__, status); |
880 | case -ENOENT: | 880 | case -ENOENT: |
881 | case -NFS4ERR_RECLAIM_BAD: | 881 | case -NFS4ERR_RECLAIM_BAD: |
882 | case -NFS4ERR_RECLAIM_CONFLICT: | 882 | case -NFS4ERR_RECLAIM_CONFLICT: |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 5a2d64927b35..b916297d2334 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -1831,7 +1831,7 @@ static int nfs4_xdr_enc_readdir(struct rpc_rqst *req, __be32 *p, const struct nf | |||
1831 | xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, | 1831 | xdr_inline_pages(&req->rq_rcv_buf, replen, args->pages, |
1832 | args->pgbase, args->count); | 1832 | args->pgbase, args->count); |
1833 | dprintk("%s: inlined page args = (%u, %p, %u, %u)\n", | 1833 | dprintk("%s: inlined page args = (%u, %p, %u, %u)\n", |
1834 | __FUNCTION__, replen, args->pages, | 1834 | __func__, replen, args->pages, |
1835 | args->pgbase, args->count); | 1835 | args->pgbase, args->count); |
1836 | 1836 | ||
1837 | out: | 1837 | out: |
@@ -2192,9 +2192,9 @@ out: | |||
2192 | p = xdr_inline_decode(xdr, nbytes); \ | 2192 | p = xdr_inline_decode(xdr, nbytes); \ |
2193 | if (unlikely(!p)) { \ | 2193 | if (unlikely(!p)) { \ |
2194 | dprintk("nfs: %s: prematurely hit end of receive" \ | 2194 | dprintk("nfs: %s: prematurely hit end of receive" \ |
2195 | " buffer\n", __FUNCTION__); \ | 2195 | " buffer\n", __func__); \ |
2196 | dprintk("nfs: %s: xdr->p=%p, bytes=%u, xdr->end=%p\n", \ | 2196 | dprintk("nfs: %s: xdr->p=%p, bytes=%u, xdr->end=%p\n", \ |
2197 | __FUNCTION__, xdr->p, nbytes, xdr->end); \ | 2197 | __func__, xdr->p, nbytes, xdr->end); \ |
2198 | return -EIO; \ | 2198 | return -EIO; \ |
2199 | } \ | 2199 | } \ |
2200 | } while (0) | 2200 | } while (0) |
@@ -2306,12 +2306,12 @@ static int decode_attr_type(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t * | |||
2306 | READ_BUF(4); | 2306 | READ_BUF(4); |
2307 | READ32(*type); | 2307 | READ32(*type); |
2308 | if (*type < NF4REG || *type > NF4NAMEDATTR) { | 2308 | if (*type < NF4REG || *type > NF4NAMEDATTR) { |
2309 | dprintk("%s: bad type %d\n", __FUNCTION__, *type); | 2309 | dprintk("%s: bad type %d\n", __func__, *type); |
2310 | return -EIO; | 2310 | return -EIO; |
2311 | } | 2311 | } |
2312 | bitmap[0] &= ~FATTR4_WORD0_TYPE; | 2312 | bitmap[0] &= ~FATTR4_WORD0_TYPE; |
2313 | } | 2313 | } |
2314 | dprintk("%s: type=0%o\n", __FUNCTION__, nfs_type2fmt[*type].nfs2type); | 2314 | dprintk("%s: type=0%o\n", __func__, nfs_type2fmt[*type].nfs2type); |
2315 | return 0; | 2315 | return 0; |
2316 | } | 2316 | } |
2317 | 2317 | ||
@@ -2327,7 +2327,7 @@ static int decode_attr_change(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t | |||
2327 | READ64(*change); | 2327 | READ64(*change); |
2328 | bitmap[0] &= ~FATTR4_WORD0_CHANGE; | 2328 | bitmap[0] &= ~FATTR4_WORD0_CHANGE; |
2329 | } | 2329 | } |
2330 | dprintk("%s: change attribute=%Lu\n", __FUNCTION__, | 2330 | dprintk("%s: change attribute=%Lu\n", __func__, |
2331 | (unsigned long long)*change); | 2331 | (unsigned long long)*change); |
2332 | return 0; | 2332 | return 0; |
2333 | } | 2333 | } |
@@ -2344,7 +2344,7 @@ static int decode_attr_size(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t * | |||
2344 | READ64(*size); | 2344 | READ64(*size); |
2345 | bitmap[0] &= ~FATTR4_WORD0_SIZE; | 2345 | bitmap[0] &= ~FATTR4_WORD0_SIZE; |
2346 | } | 2346 | } |
2347 | dprintk("%s: file size=%Lu\n", __FUNCTION__, (unsigned long long)*size); | 2347 | dprintk("%s: file size=%Lu\n", __func__, (unsigned long long)*size); |
2348 | return 0; | 2348 | return 0; |
2349 | } | 2349 | } |
2350 | 2350 | ||
@@ -2360,7 +2360,7 @@ static int decode_attr_link_support(struct xdr_stream *xdr, uint32_t *bitmap, ui | |||
2360 | READ32(*res); | 2360 | READ32(*res); |
2361 | bitmap[0] &= ~FATTR4_WORD0_LINK_SUPPORT; | 2361 | bitmap[0] &= ~FATTR4_WORD0_LINK_SUPPORT; |
2362 | } | 2362 | } |
2363 | dprintk("%s: link support=%s\n", __FUNCTION__, *res == 0 ? "false" : "true"); | 2363 | dprintk("%s: link support=%s\n", __func__, *res == 0 ? "false" : "true"); |
2364 | return 0; | 2364 | return 0; |
2365 | } | 2365 | } |
2366 | 2366 | ||
@@ -2376,7 +2376,7 @@ static int decode_attr_symlink_support(struct xdr_stream *xdr, uint32_t *bitmap, | |||
2376 | READ32(*res); | 2376 | READ32(*res); |
2377 | bitmap[0] &= ~FATTR4_WORD0_SYMLINK_SUPPORT; | 2377 | bitmap[0] &= ~FATTR4_WORD0_SYMLINK_SUPPORT; |
2378 | } | 2378 | } |
2379 | dprintk("%s: symlink support=%s\n", __FUNCTION__, *res == 0 ? "false" : "true"); | 2379 | dprintk("%s: symlink support=%s\n", __func__, *res == 0 ? "false" : "true"); |
2380 | return 0; | 2380 | return 0; |
2381 | } | 2381 | } |
2382 | 2382 | ||
@@ -2394,7 +2394,7 @@ static int decode_attr_fsid(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs | |||
2394 | READ64(fsid->minor); | 2394 | READ64(fsid->minor); |
2395 | bitmap[0] &= ~FATTR4_WORD0_FSID; | 2395 | bitmap[0] &= ~FATTR4_WORD0_FSID; |
2396 | } | 2396 | } |
2397 | dprintk("%s: fsid=(0x%Lx/0x%Lx)\n", __FUNCTION__, | 2397 | dprintk("%s: fsid=(0x%Lx/0x%Lx)\n", __func__, |
2398 | (unsigned long long)fsid->major, | 2398 | (unsigned long long)fsid->major, |
2399 | (unsigned long long)fsid->minor); | 2399 | (unsigned long long)fsid->minor); |
2400 | return 0; | 2400 | return 0; |
@@ -2412,7 +2412,7 @@ static int decode_attr_lease_time(struct xdr_stream *xdr, uint32_t *bitmap, uint | |||
2412 | READ32(*res); | 2412 | READ32(*res); |
2413 | bitmap[0] &= ~FATTR4_WORD0_LEASE_TIME; | 2413 | bitmap[0] &= ~FATTR4_WORD0_LEASE_TIME; |
2414 | } | 2414 | } |
2415 | dprintk("%s: file size=%u\n", __FUNCTION__, (unsigned int)*res); | 2415 | dprintk("%s: file size=%u\n", __func__, (unsigned int)*res); |
2416 | return 0; | 2416 | return 0; |
2417 | } | 2417 | } |
2418 | 2418 | ||
@@ -2428,7 +2428,7 @@ static int decode_attr_aclsupport(struct xdr_stream *xdr, uint32_t *bitmap, uint | |||
2428 | READ32(*res); | 2428 | READ32(*res); |
2429 | bitmap[0] &= ~FATTR4_WORD0_ACLSUPPORT; | 2429 | bitmap[0] &= ~FATTR4_WORD0_ACLSUPPORT; |
2430 | } | 2430 | } |
2431 | dprintk("%s: ACLs supported=%u\n", __FUNCTION__, (unsigned int)*res); | 2431 | dprintk("%s: ACLs supported=%u\n", __func__, (unsigned int)*res); |
2432 | return 0; | 2432 | return 0; |
2433 | } | 2433 | } |
2434 | 2434 | ||
@@ -2444,7 +2444,7 @@ static int decode_attr_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t | |||
2444 | READ64(*fileid); | 2444 | READ64(*fileid); |
2445 | bitmap[0] &= ~FATTR4_WORD0_FILEID; | 2445 | bitmap[0] &= ~FATTR4_WORD0_FILEID; |
2446 | } | 2446 | } |
2447 | dprintk("%s: fileid=%Lu\n", __FUNCTION__, (unsigned long long)*fileid); | 2447 | dprintk("%s: fileid=%Lu\n", __func__, (unsigned long long)*fileid); |
2448 | return 0; | 2448 | return 0; |
2449 | } | 2449 | } |
2450 | 2450 | ||
@@ -2460,7 +2460,7 @@ static int decode_attr_mounted_on_fileid(struct xdr_stream *xdr, uint32_t *bitma | |||
2460 | READ64(*fileid); | 2460 | READ64(*fileid); |
2461 | bitmap[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID; | 2461 | bitmap[1] &= ~FATTR4_WORD1_MOUNTED_ON_FILEID; |
2462 | } | 2462 | } |
2463 | dprintk("%s: fileid=%Lu\n", __FUNCTION__, (unsigned long long)*fileid); | 2463 | dprintk("%s: fileid=%Lu\n", __func__, (unsigned long long)*fileid); |
2464 | return 0; | 2464 | return 0; |
2465 | } | 2465 | } |
2466 | 2466 | ||
@@ -2477,7 +2477,7 @@ static int decode_attr_files_avail(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2477 | READ64(*res); | 2477 | READ64(*res); |
2478 | bitmap[0] &= ~FATTR4_WORD0_FILES_AVAIL; | 2478 | bitmap[0] &= ~FATTR4_WORD0_FILES_AVAIL; |
2479 | } | 2479 | } |
2480 | dprintk("%s: files avail=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2480 | dprintk("%s: files avail=%Lu\n", __func__, (unsigned long long)*res); |
2481 | return status; | 2481 | return status; |
2482 | } | 2482 | } |
2483 | 2483 | ||
@@ -2494,7 +2494,7 @@ static int decode_attr_files_free(struct xdr_stream *xdr, uint32_t *bitmap, uint | |||
2494 | READ64(*res); | 2494 | READ64(*res); |
2495 | bitmap[0] &= ~FATTR4_WORD0_FILES_FREE; | 2495 | bitmap[0] &= ~FATTR4_WORD0_FILES_FREE; |
2496 | } | 2496 | } |
2497 | dprintk("%s: files free=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2497 | dprintk("%s: files free=%Lu\n", __func__, (unsigned long long)*res); |
2498 | return status; | 2498 | return status; |
2499 | } | 2499 | } |
2500 | 2500 | ||
@@ -2511,7 +2511,7 @@ static int decode_attr_files_total(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2511 | READ64(*res); | 2511 | READ64(*res); |
2512 | bitmap[0] &= ~FATTR4_WORD0_FILES_TOTAL; | 2512 | bitmap[0] &= ~FATTR4_WORD0_FILES_TOTAL; |
2513 | } | 2513 | } |
2514 | dprintk("%s: files total=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2514 | dprintk("%s: files total=%Lu\n", __func__, (unsigned long long)*res); |
2515 | return status; | 2515 | return status; |
2516 | } | 2516 | } |
2517 | 2517 | ||
@@ -2569,7 +2569,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2569 | status = 0; | 2569 | status = 0; |
2570 | if (unlikely(!(bitmap[0] & FATTR4_WORD0_FS_LOCATIONS))) | 2570 | if (unlikely(!(bitmap[0] & FATTR4_WORD0_FS_LOCATIONS))) |
2571 | goto out; | 2571 | goto out; |
2572 | dprintk("%s: fsroot ", __FUNCTION__); | 2572 | dprintk("%s: fsroot ", __func__); |
2573 | status = decode_pathname(xdr, &res->fs_path); | 2573 | status = decode_pathname(xdr, &res->fs_path); |
2574 | if (unlikely(status != 0)) | 2574 | if (unlikely(status != 0)) |
2575 | goto out; | 2575 | goto out; |
@@ -2586,7 +2586,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2586 | READ32(m); | 2586 | READ32(m); |
2587 | 2587 | ||
2588 | loc->nservers = 0; | 2588 | loc->nservers = 0; |
2589 | dprintk("%s: servers ", __FUNCTION__); | 2589 | dprintk("%s: servers ", __func__); |
2590 | while (loc->nservers < m) { | 2590 | while (loc->nservers < m) { |
2591 | struct nfs4_string *server = &loc->servers[loc->nservers]; | 2591 | struct nfs4_string *server = &loc->servers[loc->nservers]; |
2592 | status = decode_opaque_inline(xdr, &server->len, &server->data); | 2592 | status = decode_opaque_inline(xdr, &server->len, &server->data); |
@@ -2599,7 +2599,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2599 | unsigned int i; | 2599 | unsigned int i; |
2600 | dprintk("%s: using first %u of %u servers " | 2600 | dprintk("%s: using first %u of %u servers " |
2601 | "returned for location %u\n", | 2601 | "returned for location %u\n", |
2602 | __FUNCTION__, | 2602 | __func__, |
2603 | NFS4_FS_LOCATION_MAXSERVERS, | 2603 | NFS4_FS_LOCATION_MAXSERVERS, |
2604 | m, res->nlocations); | 2604 | m, res->nlocations); |
2605 | for (i = loc->nservers; i < m; i++) { | 2605 | for (i = loc->nservers; i < m; i++) { |
@@ -2618,7 +2618,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2618 | res->nlocations++; | 2618 | res->nlocations++; |
2619 | } | 2619 | } |
2620 | out: | 2620 | out: |
2621 | dprintk("%s: fs_locations done, error = %d\n", __FUNCTION__, status); | 2621 | dprintk("%s: fs_locations done, error = %d\n", __func__, status); |
2622 | return status; | 2622 | return status; |
2623 | out_eio: | 2623 | out_eio: |
2624 | status = -EIO; | 2624 | status = -EIO; |
@@ -2638,7 +2638,7 @@ static int decode_attr_maxfilesize(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2638 | READ64(*res); | 2638 | READ64(*res); |
2639 | bitmap[0] &= ~FATTR4_WORD0_MAXFILESIZE; | 2639 | bitmap[0] &= ~FATTR4_WORD0_MAXFILESIZE; |
2640 | } | 2640 | } |
2641 | dprintk("%s: maxfilesize=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2641 | dprintk("%s: maxfilesize=%Lu\n", __func__, (unsigned long long)*res); |
2642 | return status; | 2642 | return status; |
2643 | } | 2643 | } |
2644 | 2644 | ||
@@ -2655,7 +2655,7 @@ static int decode_attr_maxlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_ | |||
2655 | READ32(*maxlink); | 2655 | READ32(*maxlink); |
2656 | bitmap[0] &= ~FATTR4_WORD0_MAXLINK; | 2656 | bitmap[0] &= ~FATTR4_WORD0_MAXLINK; |
2657 | } | 2657 | } |
2658 | dprintk("%s: maxlink=%u\n", __FUNCTION__, *maxlink); | 2658 | dprintk("%s: maxlink=%u\n", __func__, *maxlink); |
2659 | return status; | 2659 | return status; |
2660 | } | 2660 | } |
2661 | 2661 | ||
@@ -2672,7 +2672,7 @@ static int decode_attr_maxname(struct xdr_stream *xdr, uint32_t *bitmap, uint32_ | |||
2672 | READ32(*maxname); | 2672 | READ32(*maxname); |
2673 | bitmap[0] &= ~FATTR4_WORD0_MAXNAME; | 2673 | bitmap[0] &= ~FATTR4_WORD0_MAXNAME; |
2674 | } | 2674 | } |
2675 | dprintk("%s: maxname=%u\n", __FUNCTION__, *maxname); | 2675 | dprintk("%s: maxname=%u\n", __func__, *maxname); |
2676 | return status; | 2676 | return status; |
2677 | } | 2677 | } |
2678 | 2678 | ||
@@ -2693,7 +2693,7 @@ static int decode_attr_maxread(struct xdr_stream *xdr, uint32_t *bitmap, uint32_ | |||
2693 | *res = (uint32_t)maxread; | 2693 | *res = (uint32_t)maxread; |
2694 | bitmap[0] &= ~FATTR4_WORD0_MAXREAD; | 2694 | bitmap[0] &= ~FATTR4_WORD0_MAXREAD; |
2695 | } | 2695 | } |
2696 | dprintk("%s: maxread=%lu\n", __FUNCTION__, (unsigned long)*res); | 2696 | dprintk("%s: maxread=%lu\n", __func__, (unsigned long)*res); |
2697 | return status; | 2697 | return status; |
2698 | } | 2698 | } |
2699 | 2699 | ||
@@ -2714,7 +2714,7 @@ static int decode_attr_maxwrite(struct xdr_stream *xdr, uint32_t *bitmap, uint32 | |||
2714 | *res = (uint32_t)maxwrite; | 2714 | *res = (uint32_t)maxwrite; |
2715 | bitmap[0] &= ~FATTR4_WORD0_MAXWRITE; | 2715 | bitmap[0] &= ~FATTR4_WORD0_MAXWRITE; |
2716 | } | 2716 | } |
2717 | dprintk("%s: maxwrite=%lu\n", __FUNCTION__, (unsigned long)*res); | 2717 | dprintk("%s: maxwrite=%lu\n", __func__, (unsigned long)*res); |
2718 | return status; | 2718 | return status; |
2719 | } | 2719 | } |
2720 | 2720 | ||
@@ -2731,7 +2731,7 @@ static int decode_attr_mode(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t * | |||
2731 | *mode &= ~S_IFMT; | 2731 | *mode &= ~S_IFMT; |
2732 | bitmap[1] &= ~FATTR4_WORD1_MODE; | 2732 | bitmap[1] &= ~FATTR4_WORD1_MODE; |
2733 | } | 2733 | } |
2734 | dprintk("%s: file mode=0%o\n", __FUNCTION__, (unsigned int)*mode); | 2734 | dprintk("%s: file mode=0%o\n", __func__, (unsigned int)*mode); |
2735 | return 0; | 2735 | return 0; |
2736 | } | 2736 | } |
2737 | 2737 | ||
@@ -2747,7 +2747,7 @@ static int decode_attr_nlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t | |||
2747 | READ32(*nlink); | 2747 | READ32(*nlink); |
2748 | bitmap[1] &= ~FATTR4_WORD1_NUMLINKS; | 2748 | bitmap[1] &= ~FATTR4_WORD1_NUMLINKS; |
2749 | } | 2749 | } |
2750 | dprintk("%s: nlink=%u\n", __FUNCTION__, (unsigned int)*nlink); | 2750 | dprintk("%s: nlink=%u\n", __func__, (unsigned int)*nlink); |
2751 | return 0; | 2751 | return 0; |
2752 | } | 2752 | } |
2753 | 2753 | ||
@@ -2766,13 +2766,13 @@ static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nf | |||
2766 | if (len < XDR_MAX_NETOBJ) { | 2766 | if (len < XDR_MAX_NETOBJ) { |
2767 | if (nfs_map_name_to_uid(clp, (char *)p, len, uid) != 0) | 2767 | if (nfs_map_name_to_uid(clp, (char *)p, len, uid) != 0) |
2768 | dprintk("%s: nfs_map_name_to_uid failed!\n", | 2768 | dprintk("%s: nfs_map_name_to_uid failed!\n", |
2769 | __FUNCTION__); | 2769 | __func__); |
2770 | } else | 2770 | } else |
2771 | dprintk("%s: name too long (%u)!\n", | 2771 | dprintk("%s: name too long (%u)!\n", |
2772 | __FUNCTION__, len); | 2772 | __func__, len); |
2773 | bitmap[1] &= ~FATTR4_WORD1_OWNER; | 2773 | bitmap[1] &= ~FATTR4_WORD1_OWNER; |
2774 | } | 2774 | } |
2775 | dprintk("%s: uid=%d\n", __FUNCTION__, (int)*uid); | 2775 | dprintk("%s: uid=%d\n", __func__, (int)*uid); |
2776 | return 0; | 2776 | return 0; |
2777 | } | 2777 | } |
2778 | 2778 | ||
@@ -2791,13 +2791,13 @@ static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nf | |||
2791 | if (len < XDR_MAX_NETOBJ) { | 2791 | if (len < XDR_MAX_NETOBJ) { |
2792 | if (nfs_map_group_to_gid(clp, (char *)p, len, gid) != 0) | 2792 | if (nfs_map_group_to_gid(clp, (char *)p, len, gid) != 0) |
2793 | dprintk("%s: nfs_map_group_to_gid failed!\n", | 2793 | dprintk("%s: nfs_map_group_to_gid failed!\n", |
2794 | __FUNCTION__); | 2794 | __func__); |
2795 | } else | 2795 | } else |
2796 | dprintk("%s: name too long (%u)!\n", | 2796 | dprintk("%s: name too long (%u)!\n", |
2797 | __FUNCTION__, len); | 2797 | __func__, len); |
2798 | bitmap[1] &= ~FATTR4_WORD1_OWNER_GROUP; | 2798 | bitmap[1] &= ~FATTR4_WORD1_OWNER_GROUP; |
2799 | } | 2799 | } |
2800 | dprintk("%s: gid=%d\n", __FUNCTION__, (int)*gid); | 2800 | dprintk("%s: gid=%d\n", __func__, (int)*gid); |
2801 | return 0; | 2801 | return 0; |
2802 | } | 2802 | } |
2803 | 2803 | ||
@@ -2820,7 +2820,7 @@ static int decode_attr_rdev(struct xdr_stream *xdr, uint32_t *bitmap, dev_t *rde | |||
2820 | *rdev = tmp; | 2820 | *rdev = tmp; |
2821 | bitmap[1] &= ~ FATTR4_WORD1_RAWDEV; | 2821 | bitmap[1] &= ~ FATTR4_WORD1_RAWDEV; |
2822 | } | 2822 | } |
2823 | dprintk("%s: rdev=(0x%x:0x%x)\n", __FUNCTION__, major, minor); | 2823 | dprintk("%s: rdev=(0x%x:0x%x)\n", __func__, major, minor); |
2824 | return 0; | 2824 | return 0; |
2825 | } | 2825 | } |
2826 | 2826 | ||
@@ -2837,7 +2837,7 @@ static int decode_attr_space_avail(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2837 | READ64(*res); | 2837 | READ64(*res); |
2838 | bitmap[1] &= ~FATTR4_WORD1_SPACE_AVAIL; | 2838 | bitmap[1] &= ~FATTR4_WORD1_SPACE_AVAIL; |
2839 | } | 2839 | } |
2840 | dprintk("%s: space avail=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2840 | dprintk("%s: space avail=%Lu\n", __func__, (unsigned long long)*res); |
2841 | return status; | 2841 | return status; |
2842 | } | 2842 | } |
2843 | 2843 | ||
@@ -2854,7 +2854,7 @@ static int decode_attr_space_free(struct xdr_stream *xdr, uint32_t *bitmap, uint | |||
2854 | READ64(*res); | 2854 | READ64(*res); |
2855 | bitmap[1] &= ~FATTR4_WORD1_SPACE_FREE; | 2855 | bitmap[1] &= ~FATTR4_WORD1_SPACE_FREE; |
2856 | } | 2856 | } |
2857 | dprintk("%s: space free=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2857 | dprintk("%s: space free=%Lu\n", __func__, (unsigned long long)*res); |
2858 | return status; | 2858 | return status; |
2859 | } | 2859 | } |
2860 | 2860 | ||
@@ -2871,7 +2871,7 @@ static int decode_attr_space_total(struct xdr_stream *xdr, uint32_t *bitmap, uin | |||
2871 | READ64(*res); | 2871 | READ64(*res); |
2872 | bitmap[1] &= ~FATTR4_WORD1_SPACE_TOTAL; | 2872 | bitmap[1] &= ~FATTR4_WORD1_SPACE_TOTAL; |
2873 | } | 2873 | } |
2874 | dprintk("%s: space total=%Lu\n", __FUNCTION__, (unsigned long long)*res); | 2874 | dprintk("%s: space total=%Lu\n", __func__, (unsigned long long)*res); |
2875 | return status; | 2875 | return status; |
2876 | } | 2876 | } |
2877 | 2877 | ||
@@ -2887,7 +2887,7 @@ static int decode_attr_space_used(struct xdr_stream *xdr, uint32_t *bitmap, uint | |||
2887 | READ64(*used); | 2887 | READ64(*used); |
2888 | bitmap[1] &= ~FATTR4_WORD1_SPACE_USED; | 2888 | bitmap[1] &= ~FATTR4_WORD1_SPACE_USED; |
2889 | } | 2889 | } |
2890 | dprintk("%s: space used=%Lu\n", __FUNCTION__, | 2890 | dprintk("%s: space used=%Lu\n", __func__, |
2891 | (unsigned long long)*used); | 2891 | (unsigned long long)*used); |
2892 | return 0; | 2892 | return 0; |
2893 | } | 2893 | } |
@@ -2918,7 +2918,7 @@ static int decode_attr_time_access(struct xdr_stream *xdr, uint32_t *bitmap, str | |||
2918 | status = decode_attr_time(xdr, time); | 2918 | status = decode_attr_time(xdr, time); |
2919 | bitmap[1] &= ~FATTR4_WORD1_TIME_ACCESS; | 2919 | bitmap[1] &= ~FATTR4_WORD1_TIME_ACCESS; |
2920 | } | 2920 | } |
2921 | dprintk("%s: atime=%ld\n", __FUNCTION__, (long)time->tv_sec); | 2921 | dprintk("%s: atime=%ld\n", __func__, (long)time->tv_sec); |
2922 | return status; | 2922 | return status; |
2923 | } | 2923 | } |
2924 | 2924 | ||
@@ -2934,7 +2934,7 @@ static int decode_attr_time_metadata(struct xdr_stream *xdr, uint32_t *bitmap, s | |||
2934 | status = decode_attr_time(xdr, time); | 2934 | status = decode_attr_time(xdr, time); |
2935 | bitmap[1] &= ~FATTR4_WORD1_TIME_METADATA; | 2935 | bitmap[1] &= ~FATTR4_WORD1_TIME_METADATA; |
2936 | } | 2936 | } |
2937 | dprintk("%s: ctime=%ld\n", __FUNCTION__, (long)time->tv_sec); | 2937 | dprintk("%s: ctime=%ld\n", __func__, (long)time->tv_sec); |
2938 | return status; | 2938 | return status; |
2939 | } | 2939 | } |
2940 | 2940 | ||
@@ -2950,7 +2950,7 @@ static int decode_attr_time_modify(struct xdr_stream *xdr, uint32_t *bitmap, str | |||
2950 | status = decode_attr_time(xdr, time); | 2950 | status = decode_attr_time(xdr, time); |
2951 | bitmap[1] &= ~FATTR4_WORD1_TIME_MODIFY; | 2951 | bitmap[1] &= ~FATTR4_WORD1_TIME_MODIFY; |
2952 | } | 2952 | } |
2953 | dprintk("%s: mtime=%ld\n", __FUNCTION__, (long)time->tv_sec); | 2953 | dprintk("%s: mtime=%ld\n", __func__, (long)time->tv_sec); |
2954 | return status; | 2954 | return status; |
2955 | } | 2955 | } |
2956 | 2956 | ||
@@ -2962,7 +2962,7 @@ static int verify_attr_len(struct xdr_stream *xdr, __be32 *savep, uint32_t attrl | |||
2962 | if (unlikely(attrwords != nwords)) { | 2962 | if (unlikely(attrwords != nwords)) { |
2963 | dprintk("%s: server returned incorrect attribute length: " | 2963 | dprintk("%s: server returned incorrect attribute length: " |
2964 | "%u %c %u\n", | 2964 | "%u %c %u\n", |
2965 | __FUNCTION__, | 2965 | __func__, |
2966 | attrwords << 2, | 2966 | attrwords << 2, |
2967 | (attrwords < nwords) ? '<' : '>', | 2967 | (attrwords < nwords) ? '<' : '>', |
2968 | nwords << 2); | 2968 | nwords << 2); |
@@ -3067,7 +3067,7 @@ static int decode_server_caps(struct xdr_stream *xdr, struct nfs4_server_caps_re | |||
3067 | goto xdr_error; | 3067 | goto xdr_error; |
3068 | status = verify_attr_len(xdr, savep, attrlen); | 3068 | status = verify_attr_len(xdr, savep, attrlen); |
3069 | xdr_error: | 3069 | xdr_error: |
3070 | dprintk("%s: xdr returned %d!\n", __FUNCTION__, -status); | 3070 | dprintk("%s: xdr returned %d!\n", __func__, -status); |
3071 | return status; | 3071 | return status; |
3072 | } | 3072 | } |
3073 | 3073 | ||
@@ -3100,7 +3100,7 @@ static int decode_statfs(struct xdr_stream *xdr, struct nfs_fsstat *fsstat) | |||
3100 | 3100 | ||
3101 | status = verify_attr_len(xdr, savep, attrlen); | 3101 | status = verify_attr_len(xdr, savep, attrlen); |
3102 | xdr_error: | 3102 | xdr_error: |
3103 | dprintk("%s: xdr returned %d!\n", __FUNCTION__, -status); | 3103 | dprintk("%s: xdr returned %d!\n", __func__, -status); |
3104 | return status; | 3104 | return status; |
3105 | } | 3105 | } |
3106 | 3106 | ||
@@ -3125,7 +3125,7 @@ static int decode_pathconf(struct xdr_stream *xdr, struct nfs_pathconf *pathconf | |||
3125 | 3125 | ||
3126 | status = verify_attr_len(xdr, savep, attrlen); | 3126 | status = verify_attr_len(xdr, savep, attrlen); |
3127 | xdr_error: | 3127 | xdr_error: |
3128 | dprintk("%s: xdr returned %d!\n", __FUNCTION__, -status); | 3128 | dprintk("%s: xdr returned %d!\n", __func__, -status); |
3129 | return status; | 3129 | return status; |
3130 | } | 3130 | } |
3131 | 3131 | ||
@@ -3193,7 +3193,7 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons | |||
3193 | if ((status = verify_attr_len(xdr, savep, attrlen)) == 0) | 3193 | if ((status = verify_attr_len(xdr, savep, attrlen)) == 0) |
3194 | fattr->valid = NFS_ATTR_FATTR | NFS_ATTR_FATTR_V3 | NFS_ATTR_FATTR_V4; | 3194 | fattr->valid = NFS_ATTR_FATTR | NFS_ATTR_FATTR_V3 | NFS_ATTR_FATTR_V4; |
3195 | xdr_error: | 3195 | xdr_error: |
3196 | dprintk("%s: xdr returned %d\n", __FUNCTION__, -status); | 3196 | dprintk("%s: xdr returned %d\n", __func__, -status); |
3197 | return status; | 3197 | return status; |
3198 | } | 3198 | } |
3199 | 3199 | ||
@@ -3226,7 +3226,7 @@ static int decode_fsinfo(struct xdr_stream *xdr, struct nfs_fsinfo *fsinfo) | |||
3226 | 3226 | ||
3227 | status = verify_attr_len(xdr, savep, attrlen); | 3227 | status = verify_attr_len(xdr, savep, attrlen); |
3228 | xdr_error: | 3228 | xdr_error: |
3229 | dprintk("%s: xdr returned %d!\n", __FUNCTION__, -status); | 3229 | dprintk("%s: xdr returned %d!\n", __func__, -status); |
3230 | return status; | 3230 | return status; |
3231 | } | 3231 | } |
3232 | 3232 | ||
@@ -3418,7 +3418,7 @@ static int decode_open(struct xdr_stream *xdr, struct nfs_openres *res) | |||
3418 | 3418 | ||
3419 | return decode_delegation(xdr, res); | 3419 | return decode_delegation(xdr, res); |
3420 | xdr_error: | 3420 | xdr_error: |
3421 | dprintk("%s: Bitmap too large! Length = %u\n", __FUNCTION__, bmlen); | 3421 | dprintk("%s: Bitmap too large! Length = %u\n", __func__, bmlen); |
3422 | return -EIO; | 3422 | return -EIO; |
3423 | } | 3423 | } |
3424 | 3424 | ||
@@ -3575,7 +3575,7 @@ short_pkt: | |||
3575 | * the call was successful, but incomplete. The caller can retry the | 3575 | * the call was successful, but incomplete. The caller can retry the |
3576 | * readdir starting at the last cookie. | 3576 | * readdir starting at the last cookie. |
3577 | */ | 3577 | */ |
3578 | dprintk("%s: short packet at entry %d\n", __FUNCTION__, nr); | 3578 | dprintk("%s: short packet at entry %d\n", __func__, nr); |
3579 | entry[0] = entry[1] = 0; | 3579 | entry[0] = entry[1] = 0; |
3580 | if (nr) | 3580 | if (nr) |
3581 | goto out; | 3581 | goto out; |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 5ccf7faee19c..03599bfe81cf 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -63,17 +63,17 @@ nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, | |||
63 | }; | 63 | }; |
64 | int status; | 64 | int status; |
65 | 65 | ||
66 | dprintk("%s: call getattr\n", __FUNCTION__); | 66 | dprintk("%s: call getattr\n", __func__); |
67 | nfs_fattr_init(fattr); | 67 | nfs_fattr_init(fattr); |
68 | status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); | 68 | status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); |
69 | dprintk("%s: reply getattr: %d\n", __FUNCTION__, status); | 69 | dprintk("%s: reply getattr: %d\n", __func__, status); |
70 | if (status) | 70 | if (status) |
71 | return status; | 71 | return status; |
72 | dprintk("%s: call statfs\n", __FUNCTION__); | 72 | dprintk("%s: call statfs\n", __func__); |
73 | msg.rpc_proc = &nfs_procedures[NFSPROC_STATFS]; | 73 | msg.rpc_proc = &nfs_procedures[NFSPROC_STATFS]; |
74 | msg.rpc_resp = &fsinfo; | 74 | msg.rpc_resp = &fsinfo; |
75 | status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); | 75 | status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0); |
76 | dprintk("%s: reply statfs: %d\n", __FUNCTION__, status); | 76 | dprintk("%s: reply statfs: %d\n", __func__, status); |
77 | if (status) | 77 | if (status) |
78 | return status; | 78 | return status; |
79 | info->rtmax = NFS_MAXDATA; | 79 | info->rtmax = NFS_MAXDATA; |
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 16f57e0af999..40d17987d0e8 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -329,7 +329,7 @@ int nfs_readpage_result(struct rpc_task *task, struct nfs_read_data *data) | |||
329 | { | 329 | { |
330 | int status; | 330 | int status; |
331 | 331 | ||
332 | dprintk("NFS: %s: %5u, (status %d)\n", __FUNCTION__, task->tk_pid, | 332 | dprintk("NFS: %s: %5u, (status %d)\n", __func__, task->tk_pid, |
333 | task->tk_status); | 333 | task->tk_status); |
334 | 334 | ||
335 | status = NFS_PROTO(data->inode)->read_done(task, data); | 335 | status = NFS_PROTO(data->inode)->read_done(task, data); |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 7226a506f3ca..2a4a024a4e7b 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -405,7 +405,7 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
405 | return 0; | 405 | return 0; |
406 | 406 | ||
407 | out_err: | 407 | out_err: |
408 | dprintk("%s: statfs error = %d\n", __FUNCTION__, -error); | 408 | dprintk("%s: statfs error = %d\n", __func__, -error); |
409 | unlock_kernel(); | 409 | unlock_kernel(); |
410 | return error; | 410 | return error; |
411 | } | 411 | } |
@@ -2015,6 +2015,10 @@ static int nfs4_get_sb(struct file_system_type *fs_type, | |||
2015 | goto error_splat_super; | 2015 | goto error_splat_super; |
2016 | } | 2016 | } |
2017 | 2017 | ||
2018 | error = security_sb_set_mnt_opts(s, &data.lsm_opts); | ||
2019 | if (error) | ||
2020 | goto error_splat_root; | ||
2021 | |||
2018 | s->s_flags |= MS_ACTIVE; | 2022 | s->s_flags |= MS_ACTIVE; |
2019 | mnt->mnt_sb = s; | 2023 | mnt->mnt_sb = s; |
2020 | mnt->mnt_root = mntroot; | 2024 | mnt->mnt_root = mntroot; |
@@ -2031,6 +2035,8 @@ out_free: | |||
2031 | nfs_free_server(server); | 2035 | nfs_free_server(server); |
2032 | goto out; | 2036 | goto out; |
2033 | 2037 | ||
2038 | error_splat_root: | ||
2039 | dput(mntroot); | ||
2034 | error_splat_super: | 2040 | error_splat_super: |
2035 | up_write(&s->s_umount); | 2041 | up_write(&s->s_umount); |
2036 | deactivate_super(s); | 2042 | deactivate_super(s); |
@@ -2114,6 +2120,8 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags, | |||
2114 | mnt->mnt_sb = s; | 2120 | mnt->mnt_sb = s; |
2115 | mnt->mnt_root = mntroot; | 2121 | mnt->mnt_root = mntroot; |
2116 | 2122 | ||
2123 | security_sb_clone_mnt_opts(data->sb, s); | ||
2124 | |||
2117 | dprintk("<-- nfs4_xdev_get_sb() = 0\n"); | 2125 | dprintk("<-- nfs4_xdev_get_sb() = 0\n"); |
2118 | return 0; | 2126 | return 0; |
2119 | 2127 | ||
@@ -2197,6 +2205,8 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags, | |||
2197 | mnt->mnt_sb = s; | 2205 | mnt->mnt_sb = s; |
2198 | mnt->mnt_root = mntroot; | 2206 | mnt->mnt_root = mntroot; |
2199 | 2207 | ||
2208 | security_sb_clone_mnt_opts(data->sb, s); | ||
2209 | |||
2200 | dprintk("<-- nfs4_referral_get_sb() = 0\n"); | 2210 | dprintk("<-- nfs4_referral_get_sb() = 0\n"); |
2201 | return 0; | 2211 | return 0; |
2202 | 2212 | ||
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1ade11d1ba07..6d8ace3e3259 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -415,7 +415,7 @@ nfs_dirty_request(struct nfs_page *req) | |||
415 | 415 | ||
416 | if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags)) | 416 | if (page == NULL || test_bit(PG_NEED_COMMIT, &req->wb_flags)) |
417 | return 0; | 417 | return 0; |
418 | return !PageWriteback(req->wb_page); | 418 | return !PageWriteback(page); |
419 | } | 419 | } |
420 | 420 | ||
421 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 421 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 0b3ffa9840c2..4d4760e687c3 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -419,9 +419,9 @@ static int do_probe_callback(void *data) | |||
419 | out_release_client: | 419 | out_release_client: |
420 | rpc_shutdown_client(client); | 420 | rpc_shutdown_client(client); |
421 | out_err: | 421 | out_err: |
422 | put_nfs4_client(clp); | ||
423 | dprintk("NFSD: warning: no callback path to client %.*s\n", | 422 | dprintk("NFSD: warning: no callback path to client %.*s\n", |
424 | (int)clp->cl_name.len, clp->cl_name.data); | 423 | (int)clp->cl_name.len, clp->cl_name.data); |
424 | put_nfs4_client(clp); | ||
425 | return status; | 425 | return status; |
426 | } | 426 | } |
427 | 427 | ||
diff --git a/fs/ntfs/upcase.c b/fs/ntfs/upcase.c index 9101807dc81a..e2f72ca98037 100644 --- a/fs/ntfs/upcase.c +++ b/fs/ntfs/upcase.c | |||
@@ -77,11 +77,10 @@ ntfschar *generate_default_upcase(void) | |||
77 | uc[i] = cpu_to_le16(i); | 77 | uc[i] = cpu_to_le16(i); |
78 | for (r = 0; uc_run_table[r][0]; r++) | 78 | for (r = 0; uc_run_table[r][0]; r++) |
79 | for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) | 79 | for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) |
80 | uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) + | 80 | le16_add_cpu(&uc[i], uc_run_table[r][2]); |
81 | uc_run_table[r][2]); | ||
82 | for (r = 0; uc_dup_table[r][0]; r++) | 81 | for (r = 0; uc_dup_table[r][0]; r++) |
83 | for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) | 82 | for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) |
84 | uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1); | 83 | le16_add_cpu(&uc[i + 1], -1); |
85 | for (r = 0; uc_word_table[r][0]; r++) | 84 | for (r = 0; uc_word_table[r][0]; r++) |
86 | uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]); | 85 | uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]); |
87 | return uc; | 86 | return uc; |
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 41f84c92094f..10bfb466e068 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -2788,7 +2788,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
2788 | BUG_ON(index >= le16_to_cpu(el->l_next_free_rec)); | 2788 | BUG_ON(index >= le16_to_cpu(el->l_next_free_rec)); |
2789 | left_rec = &el->l_recs[index]; | 2789 | left_rec = &el->l_recs[index]; |
2790 | 2790 | ||
2791 | if (index == le16_to_cpu(el->l_next_free_rec - 1) && | 2791 | if (index == le16_to_cpu(el->l_next_free_rec) - 1 && |
2792 | le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) { | 2792 | le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) { |
2793 | /* we meet with a cross extent block merge. */ | 2793 | /* we meet with a cross extent block merge. */ |
2794 | ret = ocfs2_get_right_path(inode, left_path, &right_path); | 2794 | ret = ocfs2_get_right_path(inode, left_path, &right_path); |
@@ -2802,7 +2802,7 @@ static int ocfs2_merge_rec_right(struct inode *inode, | |||
2802 | BUG_ON(next_free <= 0); | 2802 | BUG_ON(next_free <= 0); |
2803 | right_rec = &right_el->l_recs[0]; | 2803 | right_rec = &right_el->l_recs[0]; |
2804 | if (ocfs2_is_empty_extent(right_rec)) { | 2804 | if (ocfs2_is_empty_extent(right_rec)) { |
2805 | BUG_ON(le16_to_cpu(next_free) <= 1); | 2805 | BUG_ON(next_free <= 1); |
2806 | right_rec = &right_el->l_recs[1]; | 2806 | right_rec = &right_el->l_recs[1]; |
2807 | } | 2807 | } |
2808 | 2808 | ||
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 1e44ad14881a..a27d61581bd6 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -142,53 +142,43 @@ static void o2net_idle_timer(unsigned long data); | |||
142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); | 142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); |
143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); | 143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); |
144 | 144 | ||
145 | static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
146 | u32 msgkey, struct task_struct *task, u8 node) | ||
147 | { | ||
148 | #ifdef CONFIG_DEBUG_FS | 145 | #ifdef CONFIG_DEBUG_FS |
146 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
147 | u32 msgkey, struct task_struct *task, u8 node) | ||
148 | { | ||
149 | INIT_LIST_HEAD(&nst->st_net_debug_item); | 149 | INIT_LIST_HEAD(&nst->st_net_debug_item); |
150 | nst->st_task = task; | 150 | nst->st_task = task; |
151 | nst->st_msg_type = msgtype; | 151 | nst->st_msg_type = msgtype; |
152 | nst->st_msg_key = msgkey; | 152 | nst->st_msg_key = msgkey; |
153 | nst->st_node = node; | 153 | nst->st_node = node; |
154 | #endif | ||
155 | } | 154 | } |
156 | 155 | ||
157 | static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | 156 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) |
158 | { | 157 | { |
159 | #ifdef CONFIG_DEBUG_FS | ||
160 | do_gettimeofday(&nst->st_sock_time); | 158 | do_gettimeofday(&nst->st_sock_time); |
161 | #endif | ||
162 | } | 159 | } |
163 | 160 | ||
164 | static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | 161 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst) |
165 | { | 162 | { |
166 | #ifdef CONFIG_DEBUG_FS | ||
167 | do_gettimeofday(&nst->st_send_time); | 163 | do_gettimeofday(&nst->st_send_time); |
168 | #endif | ||
169 | } | 164 | } |
170 | 165 | ||
171 | static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | 166 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst) |
172 | { | 167 | { |
173 | #ifdef CONFIG_DEBUG_FS | ||
174 | do_gettimeofday(&nst->st_status_time); | 168 | do_gettimeofday(&nst->st_status_time); |
175 | #endif | ||
176 | } | 169 | } |
177 | 170 | ||
178 | static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | 171 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, |
179 | struct o2net_sock_container *sc) | 172 | struct o2net_sock_container *sc) |
180 | { | 173 | { |
181 | #ifdef CONFIG_DEBUG_FS | ||
182 | nst->st_sc = sc; | 174 | nst->st_sc = sc; |
183 | #endif | ||
184 | } | 175 | } |
185 | 176 | ||
186 | static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) | 177 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) |
187 | { | 178 | { |
188 | #ifdef CONFIG_DEBUG_FS | ||
189 | nst->st_id = msg_id; | 179 | nst->st_id = msg_id; |
190 | #endif | ||
191 | } | 180 | } |
181 | #endif /* CONFIG_DEBUG_FS */ | ||
192 | 182 | ||
193 | static inline int o2net_reconnect_delay(void) | 183 | static inline int o2net_reconnect_delay(void) |
194 | { | 184 | { |
diff --git a/fs/ocfs2/cluster/tcp.h b/fs/ocfs2/cluster/tcp.h index a705d5d19036..fd6179eb26d4 100644 --- a/fs/ocfs2/cluster/tcp.h +++ b/fs/ocfs2/cluster/tcp.h | |||
@@ -128,23 +128,23 @@ void o2net_debug_del_nst(struct o2net_send_tracking *nst); | |||
128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); | 128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); |
129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); | 129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); |
130 | #else | 130 | #else |
131 | static int o2net_debugfs_init(void) | 131 | static inline int o2net_debugfs_init(void) |
132 | { | 132 | { |
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | static void o2net_debugfs_exit(void) | 135 | static inline void o2net_debugfs_exit(void) |
136 | { | 136 | { |
137 | } | 137 | } |
138 | static void o2net_debug_add_nst(struct o2net_send_tracking *nst) | 138 | static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst) |
139 | { | 139 | { |
140 | } | 140 | } |
141 | static void o2net_debug_del_nst(struct o2net_send_tracking *nst) | 141 | static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst) |
142 | { | 142 | { |
143 | } | 143 | } |
144 | static void o2net_debug_add_sc(struct o2net_sock_container *sc) | 144 | static inline void o2net_debug_add_sc(struct o2net_sock_container *sc) |
145 | { | 145 | { |
146 | } | 146 | } |
147 | static void o2net_debug_del_sc(struct o2net_sock_container *sc) | 147 | static inline void o2net_debug_del_sc(struct o2net_sock_container *sc) |
148 | { | 148 | { |
149 | } | 149 | } |
150 | #endif /* CONFIG_DEBUG_FS */ | 150 | #endif /* CONFIG_DEBUG_FS */ |
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h index 8d58cfe410b1..18307ff81b77 100644 --- a/fs/ocfs2/cluster/tcp_internal.h +++ b/fs/ocfs2/cluster/tcp_internal.h | |||
@@ -224,10 +224,42 @@ struct o2net_send_tracking { | |||
224 | struct timeval st_send_time; | 224 | struct timeval st_send_time; |
225 | struct timeval st_status_time; | 225 | struct timeval st_status_time; |
226 | }; | 226 | }; |
227 | |||
228 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
229 | u32 msgkey, struct task_struct *task, u8 node); | ||
230 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst); | ||
231 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst); | ||
232 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst); | ||
233 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
234 | struct o2net_sock_container *sc); | ||
235 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id); | ||
236 | |||
227 | #else | 237 | #else |
228 | struct o2net_send_tracking { | 238 | struct o2net_send_tracking { |
229 | u32 dummy; | 239 | u32 dummy; |
230 | }; | 240 | }; |
241 | |||
242 | static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
243 | u32 msgkey, struct task_struct *task, u8 node) | ||
244 | { | ||
245 | } | ||
246 | static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | ||
247 | { | ||
248 | } | ||
249 | static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | ||
250 | { | ||
251 | } | ||
252 | static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | ||
253 | { | ||
254 | } | ||
255 | static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
256 | struct o2net_sock_container *sc) | ||
257 | { | ||
258 | } | ||
259 | static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, | ||
260 | u32 msg_id) | ||
261 | { | ||
262 | } | ||
231 | #endif /* CONFIG_DEBUG_FS */ | 263 | #endif /* CONFIG_DEBUG_FS */ |
232 | 264 | ||
233 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ | 265 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ |
diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h index d34a62a3a625..8c686d22f9c7 100644 --- a/fs/ocfs2/dlm/dlmdebug.h +++ b/fs/ocfs2/dlm/dlmdebug.h | |||
@@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void); | |||
60 | 60 | ||
61 | #else | 61 | #else |
62 | 62 | ||
63 | static int dlm_debug_init(struct dlm_ctxt *dlm) | 63 | static inline int dlm_debug_init(struct dlm_ctxt *dlm) |
64 | { | 64 | { |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | static void dlm_debug_shutdown(struct dlm_ctxt *dlm) | 67 | static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm) |
68 | { | 68 | { |
69 | } | 69 | } |
70 | static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) | 70 | static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) |
71 | { | 71 | { |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) | 74 | static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) |
75 | { | 75 | { |
76 | } | 76 | } |
77 | static int dlm_create_debugfs_root(void) | 77 | static inline int dlm_create_debugfs_root(void) |
78 | { | 78 | { |
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | static void dlm_destroy_debugfs_root(void) | 81 | static inline void dlm_destroy_debugfs_root(void) |
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index b503772cd0ec..6b97d11f6bf8 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -61,7 +61,7 @@ | |||
61 | * negotiated by the client. The client negotiates based on the maximum | 61 | * negotiated by the client. The client negotiates based on the maximum |
62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major | 62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major |
63 | * number from the "SETV" message must match | 63 | * number from the "SETV" message must match |
64 | * user_stack.sp_proto->lp_max_version.pv_major, and the minor number | 64 | * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number |
65 | * must be less than or equal to ...->lp_max_version.pv_minor. | 65 | * must be less than or equal to ...->lp_max_version.pv_minor. |
66 | * | 66 | * |
67 | * Once this information has been set, mounts will be allowed. From this | 67 | * Once this information has been set, mounts will be allowed. From this |
@@ -153,7 +153,7 @@ union ocfs2_control_message { | |||
153 | struct ocfs2_control_message_down u_down; | 153 | struct ocfs2_control_message_down u_down; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct ocfs2_stack_plugin user_stack; | 156 | static struct ocfs2_stack_plugin ocfs2_user_plugin; |
157 | 157 | ||
158 | static atomic_t ocfs2_control_opened; | 158 | static atomic_t ocfs2_control_opened; |
159 | static int ocfs2_control_this_node = -1; | 159 | static int ocfs2_control_this_node = -1; |
@@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file, | |||
399 | char *ptr = NULL; | 399 | char *ptr = NULL; |
400 | struct ocfs2_control_private *p = file->private_data; | 400 | struct ocfs2_control_private *p = file->private_data; |
401 | struct ocfs2_protocol_version *max = | 401 | struct ocfs2_protocol_version *max = |
402 | &user_stack.sp_proto->lp_max_version; | 402 | &ocfs2_user_plugin.sp_proto->lp_max_version; |
403 | 403 | ||
404 | if (ocfs2_control_get_handshake_state(file) != | 404 | if (ocfs2_control_get_handshake_state(file) != |
405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) | 405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) |
@@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); | 680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); |
681 | int status = lksb->sb_status; | 681 | int status = lksb->sb_status; |
682 | 682 | ||
683 | BUG_ON(user_stack.sp_proto == NULL); | 683 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
684 | 684 | ||
685 | /* | 685 | /* |
686 | * For now we're punting on the issue of other non-standard errors | 686 | * For now we're punting on the issue of other non-standard errors |
@@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
693 | */ | 693 | */ |
694 | 694 | ||
695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) | 695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) |
696 | user_stack.sp_proto->lp_unlock_ast(astarg, 0); | 696 | ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); |
697 | else | 697 | else |
698 | user_stack.sp_proto->lp_lock_ast(astarg); | 698 | ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); |
699 | } | 699 | } |
700 | 700 | ||
701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | 701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) |
702 | { | 702 | { |
703 | BUG_ON(user_stack.sp_proto == NULL); | 703 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
704 | 704 | ||
705 | user_stack.sp_proto->lp_blocking_ast(astarg, level); | 705 | ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); |
706 | } | 706 | } |
707 | 707 | ||
708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | 708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, |
@@ -838,7 +838,7 @@ static int user_cluster_this_node(unsigned int *this_node) | |||
838 | return 0; | 838 | return 0; |
839 | } | 839 | } |
840 | 840 | ||
841 | static struct ocfs2_stack_operations user_stack_ops = { | 841 | static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { |
842 | .connect = user_cluster_connect, | 842 | .connect = user_cluster_connect, |
843 | .disconnect = user_cluster_disconnect, | 843 | .disconnect = user_cluster_disconnect, |
844 | .this_node = user_cluster_this_node, | 844 | .this_node = user_cluster_this_node, |
@@ -849,20 +849,20 @@ static struct ocfs2_stack_operations user_stack_ops = { | |||
849 | .dump_lksb = user_dlm_dump_lksb, | 849 | .dump_lksb = user_dlm_dump_lksb, |
850 | }; | 850 | }; |
851 | 851 | ||
852 | static struct ocfs2_stack_plugin user_stack = { | 852 | static struct ocfs2_stack_plugin ocfs2_user_plugin = { |
853 | .sp_name = "user", | 853 | .sp_name = "user", |
854 | .sp_ops = &user_stack_ops, | 854 | .sp_ops = &ocfs2_user_plugin_ops, |
855 | .sp_owner = THIS_MODULE, | 855 | .sp_owner = THIS_MODULE, |
856 | }; | 856 | }; |
857 | 857 | ||
858 | 858 | ||
859 | static int __init user_stack_init(void) | 859 | static int __init ocfs2_user_plugin_init(void) |
860 | { | 860 | { |
861 | int rc; | 861 | int rc; |
862 | 862 | ||
863 | rc = ocfs2_control_init(); | 863 | rc = ocfs2_control_init(); |
864 | if (!rc) { | 864 | if (!rc) { |
865 | rc = ocfs2_stack_glue_register(&user_stack); | 865 | rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); |
866 | if (rc) | 866 | if (rc) |
867 | ocfs2_control_exit(); | 867 | ocfs2_control_exit(); |
868 | } | 868 | } |
@@ -870,14 +870,14 @@ static int __init user_stack_init(void) | |||
870 | return rc; | 870 | return rc; |
871 | } | 871 | } |
872 | 872 | ||
873 | static void __exit user_stack_exit(void) | 873 | static void __exit ocfs2_user_plugin_exit(void) |
874 | { | 874 | { |
875 | ocfs2_stack_glue_unregister(&user_stack); | 875 | ocfs2_stack_glue_unregister(&ocfs2_user_plugin); |
876 | ocfs2_control_exit(); | 876 | ocfs2_control_exit(); |
877 | } | 877 | } |
878 | 878 | ||
879 | MODULE_AUTHOR("Oracle"); | 879 | MODULE_AUTHOR("Oracle"); |
880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); | 880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); |
881 | MODULE_LICENSE("GPL"); | 881 | MODULE_LICENSE("GPL"); |
882 | module_init(user_stack_init); | 882 | module_init(ocfs2_user_plugin_init); |
883 | module_exit(user_stack_exit); | 883 | module_exit(ocfs2_user_plugin_exit); |
diff --git a/fs/proc/array.c b/fs/proc/array.c index 9e3b8c33c24b..797d775e0354 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -288,7 +288,7 @@ static void render_cap_t(struct seq_file *m, const char *header, | |||
288 | seq_printf(m, "%s", header); | 288 | seq_printf(m, "%s", header); |
289 | CAP_FOR_EACH_U32(__capi) { | 289 | CAP_FOR_EACH_U32(__capi) { |
290 | seq_printf(m, "%08x", | 290 | seq_printf(m, "%08x", |
291 | a->cap[(_LINUX_CAPABILITY_U32S-1) - __capi]); | 291 | a->cap[(_KERNEL_CAPABILITY_U32S-1) - __capi]); |
292 | } | 292 | } |
293 | seq_printf(m, "\n"); | 293 | seq_printf(m, "\n"); |
294 | } | 294 | } |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 808cbdc193d3..3b455371e7ff 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -127,6 +127,25 @@ struct pid_entry { | |||
127 | NULL, &proc_single_file_operations, \ | 127 | NULL, &proc_single_file_operations, \ |
128 | { .proc_show = &proc_##OTYPE } ) | 128 | { .proc_show = &proc_##OTYPE } ) |
129 | 129 | ||
130 | /* | ||
131 | * Count the number of hardlinks for the pid_entry table, excluding the . | ||
132 | * and .. links. | ||
133 | */ | ||
134 | static unsigned int pid_entry_count_dirs(const struct pid_entry *entries, | ||
135 | unsigned int n) | ||
136 | { | ||
137 | unsigned int i; | ||
138 | unsigned int count; | ||
139 | |||
140 | count = 0; | ||
141 | for (i = 0; i < n; ++i) { | ||
142 | if (S_ISDIR(entries[i].mode)) | ||
143 | ++count; | ||
144 | } | ||
145 | |||
146 | return count; | ||
147 | } | ||
148 | |||
130 | int maps_protect; | 149 | int maps_protect; |
131 | EXPORT_SYMBOL(maps_protect); | 150 | EXPORT_SYMBOL(maps_protect); |
132 | 151 | ||
@@ -2441,7 +2460,7 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2441 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), | 2460 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), |
2442 | #ifdef CONFIG_AUDITSYSCALL | 2461 | #ifdef CONFIG_AUDITSYSCALL |
2443 | REG("loginuid", S_IWUSR|S_IRUGO, loginuid), | 2462 | REG("loginuid", S_IWUSR|S_IRUGO, loginuid), |
2444 | REG("sessionid", S_IRUSR, sessionid), | 2463 | REG("sessionid", S_IRUGO, sessionid), |
2445 | #endif | 2464 | #endif |
2446 | #ifdef CONFIG_FAULT_INJECTION | 2465 | #ifdef CONFIG_FAULT_INJECTION |
2447 | REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject), | 2466 | REG("make-it-fail", S_IRUGO|S_IWUSR, fault_inject), |
@@ -2585,10 +2604,9 @@ static struct dentry *proc_pid_instantiate(struct inode *dir, | |||
2585 | inode->i_op = &proc_tgid_base_inode_operations; | 2604 | inode->i_op = &proc_tgid_base_inode_operations; |
2586 | inode->i_fop = &proc_tgid_base_operations; | 2605 | inode->i_fop = &proc_tgid_base_operations; |
2587 | inode->i_flags|=S_IMMUTABLE; | 2606 | inode->i_flags|=S_IMMUTABLE; |
2588 | inode->i_nlink = 5; | 2607 | |
2589 | #ifdef CONFIG_SECURITY | 2608 | inode->i_nlink = 2 + pid_entry_count_dirs(tgid_base_stuff, |
2590 | inode->i_nlink += 1; | 2609 | ARRAY_SIZE(tgid_base_stuff)); |
2591 | #endif | ||
2592 | 2610 | ||
2593 | dentry->d_op = &pid_dentry_operations; | 2611 | dentry->d_op = &pid_dentry_operations; |
2594 | 2612 | ||
@@ -2816,10 +2834,9 @@ static struct dentry *proc_task_instantiate(struct inode *dir, | |||
2816 | inode->i_op = &proc_tid_base_inode_operations; | 2834 | inode->i_op = &proc_tid_base_inode_operations; |
2817 | inode->i_fop = &proc_tid_base_operations; | 2835 | inode->i_fop = &proc_tid_base_operations; |
2818 | inode->i_flags|=S_IMMUTABLE; | 2836 | inode->i_flags|=S_IMMUTABLE; |
2819 | inode->i_nlink = 4; | 2837 | |
2820 | #ifdef CONFIG_SECURITY | 2838 | inode->i_nlink = 2 + pid_entry_count_dirs(tid_base_stuff, |
2821 | inode->i_nlink += 1; | 2839 | ARRAY_SIZE(tid_base_stuff)); |
2822 | #endif | ||
2823 | 2840 | ||
2824 | dentry->d_op = &pid_dentry_operations; | 2841 | dentry->d_op = &pid_dentry_operations; |
2825 | 2842 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 6f4e8dc97da1..b08d10017911 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -425,7 +425,8 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, | |||
425 | } | 425 | } |
426 | } | 426 | } |
427 | unlock_new_inode(inode); | 427 | unlock_new_inode(inode); |
428 | } | 428 | } else |
429 | module_put(de->owner); | ||
429 | return inode; | 430 | return inode; |
430 | 431 | ||
431 | out_ino: | 432 | out_ino: |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 74a323d2b850..7e277f2ad466 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -139,7 +139,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off, | |||
139 | #define K(x) ((x) << (PAGE_SHIFT - 10)) | 139 | #define K(x) ((x) << (PAGE_SHIFT - 10)) |
140 | si_meminfo(&i); | 140 | si_meminfo(&i); |
141 | si_swapinfo(&i); | 141 | si_swapinfo(&i); |
142 | committed = atomic_read(&vm_committed_space); | 142 | committed = atomic_long_read(&vm_committed_space); |
143 | allowed = ((totalram_pages - hugetlb_total_pages()) | 143 | allowed = ((totalram_pages - hugetlb_total_pages()) |
144 | * sysctl_overcommit_ratio / 100) + total_swap_pages; | 144 | * sysctl_overcommit_ratio / 100) + total_swap_pages; |
145 | 145 | ||
@@ -716,7 +716,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, | |||
716 | pfn = src / KPMSIZE; | 716 | pfn = src / KPMSIZE; |
717 | count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); | 717 | count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); |
718 | if (src & KPMMASK || count & KPMMASK) | 718 | if (src & KPMMASK || count & KPMMASK) |
719 | return -EIO; | 719 | return -EINVAL; |
720 | 720 | ||
721 | while (count > 0) { | 721 | while (count > 0) { |
722 | ppage = NULL; | 722 | ppage = NULL; |
@@ -726,7 +726,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, | |||
726 | if (!ppage) | 726 | if (!ppage) |
727 | pcount = 0; | 727 | pcount = 0; |
728 | else | 728 | else |
729 | pcount = atomic_read(&ppage->_count); | 729 | pcount = page_mapcount(ppage); |
730 | 730 | ||
731 | if (put_user(pcount, out++)) { | 731 | if (put_user(pcount, out++)) { |
732 | ret = -EFAULT; | 732 | ret = -EFAULT; |
@@ -782,7 +782,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf, | |||
782 | pfn = src / KPMSIZE; | 782 | pfn = src / KPMSIZE; |
783 | count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); | 783 | count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); |
784 | if (src & KPMMASK || count & KPMMASK) | 784 | if (src & KPMMASK || count & KPMMASK) |
785 | return -EIO; | 785 | return -EINVAL; |
786 | 786 | ||
787 | while (count > 0) { | 787 | while (count > 0) { |
788 | ppage = NULL; | 788 | ppage = NULL; |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 88717c0f941b..ab8ccc9d14ff 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -315,9 +315,9 @@ struct mem_size_stats { | |||
315 | }; | 315 | }; |
316 | 316 | ||
317 | static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | 317 | static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, |
318 | void *private) | 318 | struct mm_walk *walk) |
319 | { | 319 | { |
320 | struct mem_size_stats *mss = private; | 320 | struct mem_size_stats *mss = walk->private; |
321 | struct vm_area_struct *vma = mss->vma; | 321 | struct vm_area_struct *vma = mss->vma; |
322 | pte_t *pte, ptent; | 322 | pte_t *pte, ptent; |
323 | spinlock_t *ptl; | 323 | spinlock_t *ptl; |
@@ -365,19 +365,21 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | |||
365 | return 0; | 365 | return 0; |
366 | } | 366 | } |
367 | 367 | ||
368 | static struct mm_walk smaps_walk = { .pmd_entry = smaps_pte_range }; | ||
369 | |||
370 | static int show_smap(struct seq_file *m, void *v) | 368 | static int show_smap(struct seq_file *m, void *v) |
371 | { | 369 | { |
372 | struct vm_area_struct *vma = v; | 370 | struct vm_area_struct *vma = v; |
373 | struct mem_size_stats mss; | 371 | struct mem_size_stats mss; |
374 | int ret; | 372 | int ret; |
373 | struct mm_walk smaps_walk = { | ||
374 | .pmd_entry = smaps_pte_range, | ||
375 | .mm = vma->vm_mm, | ||
376 | .private = &mss, | ||
377 | }; | ||
375 | 378 | ||
376 | memset(&mss, 0, sizeof mss); | 379 | memset(&mss, 0, sizeof mss); |
377 | mss.vma = vma; | 380 | mss.vma = vma; |
378 | if (vma->vm_mm && !is_vm_hugetlb_page(vma)) | 381 | if (vma->vm_mm && !is_vm_hugetlb_page(vma)) |
379 | walk_page_range(vma->vm_mm, vma->vm_start, vma->vm_end, | 382 | walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); |
380 | &smaps_walk, &mss); | ||
381 | 383 | ||
382 | ret = show_map(m, v); | 384 | ret = show_map(m, v); |
383 | if (ret) | 385 | if (ret) |
@@ -426,9 +428,9 @@ const struct file_operations proc_smaps_operations = { | |||
426 | }; | 428 | }; |
427 | 429 | ||
428 | static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, | 430 | static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, |
429 | unsigned long end, void *private) | 431 | unsigned long end, struct mm_walk *walk) |
430 | { | 432 | { |
431 | struct vm_area_struct *vma = private; | 433 | struct vm_area_struct *vma = walk->private; |
432 | pte_t *pte, ptent; | 434 | pte_t *pte, ptent; |
433 | spinlock_t *ptl; | 435 | spinlock_t *ptl; |
434 | struct page *page; | 436 | struct page *page; |
@@ -452,8 +454,6 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, | |||
452 | return 0; | 454 | return 0; |
453 | } | 455 | } |
454 | 456 | ||
455 | static struct mm_walk clear_refs_walk = { .pmd_entry = clear_refs_pte_range }; | ||
456 | |||
457 | static ssize_t clear_refs_write(struct file *file, const char __user *buf, | 457 | static ssize_t clear_refs_write(struct file *file, const char __user *buf, |
458 | size_t count, loff_t *ppos) | 458 | size_t count, loff_t *ppos) |
459 | { | 459 | { |
@@ -476,11 +476,17 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, | |||
476 | return -ESRCH; | 476 | return -ESRCH; |
477 | mm = get_task_mm(task); | 477 | mm = get_task_mm(task); |
478 | if (mm) { | 478 | if (mm) { |
479 | static struct mm_walk clear_refs_walk; | ||
480 | memset(&clear_refs_walk, 0, sizeof(clear_refs_walk)); | ||
481 | clear_refs_walk.pmd_entry = clear_refs_pte_range; | ||
482 | clear_refs_walk.mm = mm; | ||
479 | down_read(&mm->mmap_sem); | 483 | down_read(&mm->mmap_sem); |
480 | for (vma = mm->mmap; vma; vma = vma->vm_next) | 484 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
485 | clear_refs_walk.private = vma; | ||
481 | if (!is_vm_hugetlb_page(vma)) | 486 | if (!is_vm_hugetlb_page(vma)) |
482 | walk_page_range(mm, vma->vm_start, vma->vm_end, | 487 | walk_page_range(vma->vm_start, vma->vm_end, |
483 | &clear_refs_walk, vma); | 488 | &clear_refs_walk); |
489 | } | ||
484 | flush_tlb_mm(mm); | 490 | flush_tlb_mm(mm); |
485 | up_read(&mm->mmap_sem); | 491 | up_read(&mm->mmap_sem); |
486 | mmput(mm); | 492 | mmput(mm); |
@@ -496,7 +502,7 @@ const struct file_operations proc_clear_refs_operations = { | |||
496 | }; | 502 | }; |
497 | 503 | ||
498 | struct pagemapread { | 504 | struct pagemapread { |
499 | char __user *out, *end; | 505 | u64 __user *out, *end; |
500 | }; | 506 | }; |
501 | 507 | ||
502 | #define PM_ENTRY_BYTES sizeof(u64) | 508 | #define PM_ENTRY_BYTES sizeof(u64) |
@@ -519,28 +525,18 @@ struct pagemapread { | |||
519 | static int add_to_pagemap(unsigned long addr, u64 pfn, | 525 | static int add_to_pagemap(unsigned long addr, u64 pfn, |
520 | struct pagemapread *pm) | 526 | struct pagemapread *pm) |
521 | { | 527 | { |
522 | /* | ||
523 | * Make sure there's room in the buffer for an | ||
524 | * entire entry. Otherwise, only copy part of | ||
525 | * the pfn. | ||
526 | */ | ||
527 | if (pm->out + PM_ENTRY_BYTES >= pm->end) { | ||
528 | if (copy_to_user(pm->out, &pfn, pm->end - pm->out)) | ||
529 | return -EFAULT; | ||
530 | pm->out = pm->end; | ||
531 | return PM_END_OF_BUFFER; | ||
532 | } | ||
533 | |||
534 | if (put_user(pfn, pm->out)) | 528 | if (put_user(pfn, pm->out)) |
535 | return -EFAULT; | 529 | return -EFAULT; |
536 | pm->out += PM_ENTRY_BYTES; | 530 | pm->out++; |
531 | if (pm->out >= pm->end) | ||
532 | return PM_END_OF_BUFFER; | ||
537 | return 0; | 533 | return 0; |
538 | } | 534 | } |
539 | 535 | ||
540 | static int pagemap_pte_hole(unsigned long start, unsigned long end, | 536 | static int pagemap_pte_hole(unsigned long start, unsigned long end, |
541 | void *private) | 537 | struct mm_walk *walk) |
542 | { | 538 | { |
543 | struct pagemapread *pm = private; | 539 | struct pagemapread *pm = walk->private; |
544 | unsigned long addr; | 540 | unsigned long addr; |
545 | int err = 0; | 541 | int err = 0; |
546 | for (addr = start; addr < end; addr += PAGE_SIZE) { | 542 | for (addr = start; addr < end; addr += PAGE_SIZE) { |
@@ -557,24 +553,45 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte) | |||
557 | return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); | 553 | return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); |
558 | } | 554 | } |
559 | 555 | ||
556 | static unsigned long pte_to_pagemap_entry(pte_t pte) | ||
557 | { | ||
558 | unsigned long pme = 0; | ||
559 | if (is_swap_pte(pte)) | ||
560 | pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte)) | ||
561 | | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; | ||
562 | else if (pte_present(pte)) | ||
563 | pme = PM_PFRAME(pte_pfn(pte)) | ||
564 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT; | ||
565 | return pme; | ||
566 | } | ||
567 | |||
560 | static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | 568 | static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, |
561 | void *private) | 569 | struct mm_walk *walk) |
562 | { | 570 | { |
563 | struct pagemapread *pm = private; | 571 | struct vm_area_struct *vma; |
572 | struct pagemapread *pm = walk->private; | ||
564 | pte_t *pte; | 573 | pte_t *pte; |
565 | int err = 0; | 574 | int err = 0; |
566 | 575 | ||
576 | /* find the first VMA at or above 'addr' */ | ||
577 | vma = find_vma(walk->mm, addr); | ||
567 | for (; addr != end; addr += PAGE_SIZE) { | 578 | for (; addr != end; addr += PAGE_SIZE) { |
568 | u64 pfn = PM_NOT_PRESENT; | 579 | u64 pfn = PM_NOT_PRESENT; |
569 | pte = pte_offset_map(pmd, addr); | 580 | |
570 | if (is_swap_pte(*pte)) | 581 | /* check to see if we've left 'vma' behind |
571 | pfn = PM_PFRAME(swap_pte_to_pagemap_entry(*pte)) | 582 | * and need a new, higher one */ |
572 | | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; | 583 | if (vma && (addr >= vma->vm_end)) |
573 | else if (pte_present(*pte)) | 584 | vma = find_vma(walk->mm, addr); |
574 | pfn = PM_PFRAME(pte_pfn(*pte)) | 585 | |
575 | | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT; | 586 | /* check that 'vma' actually covers this address, |
576 | /* unmap so we're not in atomic when we copy to userspace */ | 587 | * and that it isn't a huge page vma */ |
577 | pte_unmap(pte); | 588 | if (vma && (vma->vm_start <= addr) && |
589 | !is_vm_hugetlb_page(vma)) { | ||
590 | pte = pte_offset_map(pmd, addr); | ||
591 | pfn = pte_to_pagemap_entry(*pte); | ||
592 | /* unmap before userspace copy */ | ||
593 | pte_unmap(pte); | ||
594 | } | ||
578 | err = add_to_pagemap(addr, pfn, pm); | 595 | err = add_to_pagemap(addr, pfn, pm); |
579 | if (err) | 596 | if (err) |
580 | return err; | 597 | return err; |
@@ -634,7 +651,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
634 | 651 | ||
635 | ret = -EINVAL; | 652 | ret = -EINVAL; |
636 | /* file position must be aligned */ | 653 | /* file position must be aligned */ |
637 | if (*ppos % PM_ENTRY_BYTES) | 654 | if ((*ppos % PM_ENTRY_BYTES) || (count % PM_ENTRY_BYTES)) |
638 | goto out_task; | 655 | goto out_task; |
639 | 656 | ||
640 | ret = 0; | 657 | ret = 0; |
@@ -664,8 +681,8 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
664 | goto out_pages; | 681 | goto out_pages; |
665 | } | 682 | } |
666 | 683 | ||
667 | pm.out = buf; | 684 | pm.out = (u64 *)buf; |
668 | pm.end = buf + count; | 685 | pm.end = (u64 *)(buf + count); |
669 | 686 | ||
670 | if (!ptrace_may_attach(task)) { | 687 | if (!ptrace_may_attach(task)) { |
671 | ret = -EIO; | 688 | ret = -EIO; |
@@ -685,14 +702,14 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
685 | * user buffer is tracked in "pm", and the walk | 702 | * user buffer is tracked in "pm", and the walk |
686 | * will stop when we hit the end of the buffer. | 703 | * will stop when we hit the end of the buffer. |
687 | */ | 704 | */ |
688 | ret = walk_page_range(mm, start_vaddr, end_vaddr, | 705 | ret = walk_page_range(start_vaddr, end_vaddr, |
689 | &pagemap_walk, &pm); | 706 | &pagemap_walk); |
690 | if (ret == PM_END_OF_BUFFER) | 707 | if (ret == PM_END_OF_BUFFER) |
691 | ret = 0; | 708 | ret = 0; |
692 | /* don't need mmap_sem for these, but this looks cleaner */ | 709 | /* don't need mmap_sem for these, but this looks cleaner */ |
693 | *ppos += pm.out - buf; | 710 | *ppos += (char *)pm.out - buf; |
694 | if (!ret) | 711 | if (!ret) |
695 | ret = pm.out - buf; | 712 | ret = (char *)pm.out - buf; |
696 | } | 713 | } |
697 | 714 | ||
698 | out_pages: | 715 | out_pages: |
diff --git a/fs/splice.c b/fs/splice.c index 78150038b584..aa5f6f60b305 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, | |||
58 | */ | 58 | */ |
59 | wait_on_page_writeback(page); | 59 | wait_on_page_writeback(page); |
60 | 60 | ||
61 | if (PagePrivate(page)) | 61 | if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL)) |
62 | try_to_release_page(page, GFP_KERNEL); | 62 | goto out_unlock; |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * If we succeeded in removing the mapping, set LRU flag | 65 | * If we succeeded in removing the mapping, set LRU flag |
@@ -75,6 +75,7 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, | |||
75 | * Raced with truncate or failed to remove page from current | 75 | * Raced with truncate or failed to remove page from current |
76 | * address space, unlock and return failure. | 76 | * address space, unlock and return failure. |
77 | */ | 77 | */ |
78 | out_unlock: | ||
78 | unlock_page(page); | 79 | unlock_page(page); |
79 | return 1; | 80 | return 1; |
80 | } | 81 | } |
@@ -983,7 +984,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, | |||
983 | 984 | ||
984 | while (len) { | 985 | while (len) { |
985 | size_t read_len; | 986 | size_t read_len; |
986 | loff_t pos = sd->pos; | 987 | loff_t pos = sd->pos, prev_pos = pos; |
987 | 988 | ||
988 | ret = do_splice_to(in, &pos, pipe, len, flags); | 989 | ret = do_splice_to(in, &pos, pipe, len, flags); |
989 | if (unlikely(ret <= 0)) | 990 | if (unlikely(ret <= 0)) |
@@ -998,15 +999,19 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, | |||
998 | * could get stuck data in the internal pipe: | 999 | * could get stuck data in the internal pipe: |
999 | */ | 1000 | */ |
1000 | ret = actor(pipe, sd); | 1001 | ret = actor(pipe, sd); |
1001 | if (unlikely(ret <= 0)) | 1002 | if (unlikely(ret <= 0)) { |
1003 | sd->pos = prev_pos; | ||
1002 | goto out_release; | 1004 | goto out_release; |
1005 | } | ||
1003 | 1006 | ||
1004 | bytes += ret; | 1007 | bytes += ret; |
1005 | len -= ret; | 1008 | len -= ret; |
1006 | sd->pos = pos; | 1009 | sd->pos = pos; |
1007 | 1010 | ||
1008 | if (ret < read_len) | 1011 | if (ret < read_len) { |
1012 | sd->pos = prev_pos + ret; | ||
1009 | goto out_release; | 1013 | goto out_release; |
1014 | } | ||
1010 | } | 1015 | } |
1011 | 1016 | ||
1012 | done: | 1017 | done: |
@@ -1072,7 +1077,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, | |||
1072 | 1077 | ||
1073 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); | 1078 | ret = splice_direct_to_actor(in, &sd, direct_splice_actor); |
1074 | if (ret > 0) | 1079 | if (ret > 0) |
1075 | *ppos += ret; | 1080 | *ppos = sd.pos; |
1076 | 1081 | ||
1077 | return ret; | 1082 | return ret; |
1078 | } | 1083 | } |
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index a1c3a1fab7f0..8c0e4b92574f 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -419,12 +419,8 @@ void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt, | |||
419 | */ | 419 | */ |
420 | int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd) | 420 | int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd) |
421 | { | 421 | { |
422 | if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) { | 422 | if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) |
423 | printk(KERN_WARNING "sysfs: duplicate filename '%s' " | ||
424 | "can not be created\n", sd->s_name); | ||
425 | WARN_ON(1); | ||
426 | return -EEXIST; | 423 | return -EEXIST; |
427 | } | ||
428 | 424 | ||
429 | sd->s_parent = sysfs_get(acxt->parent_sd); | 425 | sd->s_parent = sysfs_get(acxt->parent_sd); |
430 | 426 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 5105015a75ad..98e0e86093b4 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -387,6 +387,8 @@ _xfs_buf_lookup_pages( | |||
387 | if (unlikely(page == NULL)) { | 387 | if (unlikely(page == NULL)) { |
388 | if (flags & XBF_READ_AHEAD) { | 388 | if (flags & XBF_READ_AHEAD) { |
389 | bp->b_page_count = i; | 389 | bp->b_page_count = i; |
390 | for (i = 0; i < bp->b_page_count; i++) | ||
391 | unlock_page(bp->b_pages[i]); | ||
390 | return -ENOMEM; | 392 | return -ENOMEM; |
391 | } | 393 | } |
392 | 394 | ||
@@ -416,17 +418,24 @@ _xfs_buf_lookup_pages( | |||
416 | ASSERT(!PagePrivate(page)); | 418 | ASSERT(!PagePrivate(page)); |
417 | if (!PageUptodate(page)) { | 419 | if (!PageUptodate(page)) { |
418 | page_count--; | 420 | page_count--; |
419 | if (blocksize < PAGE_CACHE_SIZE && !PagePrivate(page)) { | 421 | if (blocksize >= PAGE_CACHE_SIZE) { |
422 | if (flags & XBF_READ) | ||
423 | bp->b_flags |= _XBF_PAGE_LOCKED; | ||
424 | } else if (!PagePrivate(page)) { | ||
420 | if (test_page_region(page, offset, nbytes)) | 425 | if (test_page_region(page, offset, nbytes)) |
421 | page_count++; | 426 | page_count++; |
422 | } | 427 | } |
423 | } | 428 | } |
424 | 429 | ||
425 | unlock_page(page); | ||
426 | bp->b_pages[i] = page; | 430 | bp->b_pages[i] = page; |
427 | offset = 0; | 431 | offset = 0; |
428 | } | 432 | } |
429 | 433 | ||
434 | if (!(bp->b_flags & _XBF_PAGE_LOCKED)) { | ||
435 | for (i = 0; i < bp->b_page_count; i++) | ||
436 | unlock_page(bp->b_pages[i]); | ||
437 | } | ||
438 | |||
430 | if (page_count == bp->b_page_count) | 439 | if (page_count == bp->b_page_count) |
431 | bp->b_flags |= XBF_DONE; | 440 | bp->b_flags |= XBF_DONE; |
432 | 441 | ||
@@ -746,6 +755,7 @@ xfs_buf_associate_memory( | |||
746 | bp->b_count_desired = len; | 755 | bp->b_count_desired = len; |
747 | bp->b_buffer_length = buflen; | 756 | bp->b_buffer_length = buflen; |
748 | bp->b_flags |= XBF_MAPPED; | 757 | bp->b_flags |= XBF_MAPPED; |
758 | bp->b_flags &= ~_XBF_PAGE_LOCKED; | ||
749 | 759 | ||
750 | return 0; | 760 | return 0; |
751 | } | 761 | } |
@@ -1093,8 +1103,10 @@ _xfs_buf_ioend( | |||
1093 | xfs_buf_t *bp, | 1103 | xfs_buf_t *bp, |
1094 | int schedule) | 1104 | int schedule) |
1095 | { | 1105 | { |
1096 | if (atomic_dec_and_test(&bp->b_io_remaining) == 1) | 1106 | if (atomic_dec_and_test(&bp->b_io_remaining) == 1) { |
1107 | bp->b_flags &= ~_XBF_PAGE_LOCKED; | ||
1097 | xfs_buf_ioend(bp, schedule); | 1108 | xfs_buf_ioend(bp, schedule); |
1109 | } | ||
1098 | } | 1110 | } |
1099 | 1111 | ||
1100 | STATIC void | 1112 | STATIC void |
@@ -1125,6 +1137,9 @@ xfs_buf_bio_end_io( | |||
1125 | 1137 | ||
1126 | if (--bvec >= bio->bi_io_vec) | 1138 | if (--bvec >= bio->bi_io_vec) |
1127 | prefetchw(&bvec->bv_page->flags); | 1139 | prefetchw(&bvec->bv_page->flags); |
1140 | |||
1141 | if (bp->b_flags & _XBF_PAGE_LOCKED) | ||
1142 | unlock_page(page); | ||
1128 | } while (bvec >= bio->bi_io_vec); | 1143 | } while (bvec >= bio->bi_io_vec); |
1129 | 1144 | ||
1130 | _xfs_buf_ioend(bp, 1); | 1145 | _xfs_buf_ioend(bp, 1); |
@@ -1163,7 +1178,8 @@ _xfs_buf_ioapply( | |||
1163 | * filesystem block size is not smaller than the page size. | 1178 | * filesystem block size is not smaller than the page size. |
1164 | */ | 1179 | */ |
1165 | if ((bp->b_buffer_length < PAGE_CACHE_SIZE) && | 1180 | if ((bp->b_buffer_length < PAGE_CACHE_SIZE) && |
1166 | (bp->b_flags & XBF_READ) && | 1181 | ((bp->b_flags & (XBF_READ|_XBF_PAGE_LOCKED)) == |
1182 | (XBF_READ|_XBF_PAGE_LOCKED)) && | ||
1167 | (blocksize >= PAGE_CACHE_SIZE)) { | 1183 | (blocksize >= PAGE_CACHE_SIZE)) { |
1168 | bio = bio_alloc(GFP_NOIO, 1); | 1184 | bio = bio_alloc(GFP_NOIO, 1); |
1169 | 1185 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 841d7883528d..f948ec7ba9a4 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -66,6 +66,25 @@ typedef enum { | |||
66 | _XBF_PAGES = (1 << 18), /* backed by refcounted pages */ | 66 | _XBF_PAGES = (1 << 18), /* backed by refcounted pages */ |
67 | _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */ | 67 | _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */ |
68 | _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ | 68 | _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ |
69 | |||
70 | /* | ||
71 | * Special flag for supporting metadata blocks smaller than a FSB. | ||
72 | * | ||
73 | * In this case we can have multiple xfs_buf_t on a single page and | ||
74 | * need to lock out concurrent xfs_buf_t readers as they only | ||
75 | * serialise access to the buffer. | ||
76 | * | ||
77 | * If the FSB size >= PAGE_CACHE_SIZE case, we have no serialisation | ||
78 | * between reads of the page. Hence we can have one thread read the | ||
79 | * page and modify it, but then race with another thread that thinks | ||
80 | * the page is not up-to-date and hence reads it again. | ||
81 | * | ||
82 | * The result is that the first modifcation to the page is lost. | ||
83 | * This sort of AGF/AGI reading race can happen when unlinking inodes | ||
84 | * that require truncation and results in the AGI unlinked list | ||
85 | * modifications being lost. | ||
86 | */ | ||
87 | _XBF_PAGE_LOCKED = (1 << 22), | ||
69 | } xfs_buf_flags_t; | 88 | } xfs_buf_flags_t; |
70 | 89 | ||
71 | typedef enum { | 90 | typedef enum { |
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 65e78c13d4ae..5f60363b9343 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -184,19 +184,24 @@ xfs_file_release( | |||
184 | return -xfs_release(XFS_I(inode)); | 184 | return -xfs_release(XFS_I(inode)); |
185 | } | 185 | } |
186 | 186 | ||
187 | /* | ||
188 | * We ignore the datasync flag here because a datasync is effectively | ||
189 | * identical to an fsync. That is, datasync implies that we need to write | ||
190 | * only the metadata needed to be able to access the data that is written | ||
191 | * if we crash after the call completes. Hence if we are writing beyond | ||
192 | * EOF we have to log the inode size change as well, which makes it a | ||
193 | * full fsync. If we don't write beyond EOF, the inode core will be | ||
194 | * clean in memory and so we don't need to log the inode, just like | ||
195 | * fsync. | ||
196 | */ | ||
187 | STATIC int | 197 | STATIC int |
188 | xfs_file_fsync( | 198 | xfs_file_fsync( |
189 | struct file *filp, | 199 | struct file *filp, |
190 | struct dentry *dentry, | 200 | struct dentry *dentry, |
191 | int datasync) | 201 | int datasync) |
192 | { | 202 | { |
193 | int flags = FSYNC_WAIT; | ||
194 | |||
195 | if (datasync) | ||
196 | flags |= FSYNC_DATA; | ||
197 | xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED); | 203 | xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED); |
198 | return -xfs_fsync(XFS_I(dentry->d_inode), flags, | 204 | return -xfs_fsync(XFS_I(dentry->d_inode)); |
199 | (xfs_off_t)0, (xfs_off_t)-1); | ||
200 | } | 205 | } |
201 | 206 | ||
202 | /* | 207 | /* |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 9d73cb5c0fc7..25eb2a9e8d9b 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -230,14 +230,6 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) | |||
230 | #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ | 230 | #define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ |
231 | 231 | ||
232 | /* | 232 | /* |
233 | * Flags to vop_fsync/reclaim. | ||
234 | */ | ||
235 | #define FSYNC_NOWAIT 0 /* asynchronous flush */ | ||
236 | #define FSYNC_WAIT 0x1 /* synchronous fsync or forced reclaim */ | ||
237 | #define FSYNC_INVAL 0x2 /* flush and invalidate cached data */ | ||
238 | #define FSYNC_DATA 0x4 /* synchronous fsync of data only */ | ||
239 | |||
240 | /* | ||
241 | * Tracking vnode activity. | 233 | * Tracking vnode activity. |
242 | */ | 234 | */ |
243 | #if defined(XFS_INODE_TRACE) | 235 | #if defined(XFS_INODE_TRACE) |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index cf0bb9c1d621..e569bf5d6cf0 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2974,6 +2974,7 @@ xfs_iflush_cluster( | |||
2974 | xfs_mount_t *mp = ip->i_mount; | 2974 | xfs_mount_t *mp = ip->i_mount; |
2975 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); | 2975 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); |
2976 | unsigned long first_index, mask; | 2976 | unsigned long first_index, mask; |
2977 | unsigned long inodes_per_cluster; | ||
2977 | int ilist_size; | 2978 | int ilist_size; |
2978 | xfs_inode_t **ilist; | 2979 | xfs_inode_t **ilist; |
2979 | xfs_inode_t *iq; | 2980 | xfs_inode_t *iq; |
@@ -2985,8 +2986,9 @@ xfs_iflush_cluster( | |||
2985 | ASSERT(pag->pagi_inodeok); | 2986 | ASSERT(pag->pagi_inodeok); |
2986 | ASSERT(pag->pag_ici_init); | 2987 | ASSERT(pag->pag_ici_init); |
2987 | 2988 | ||
2988 | ilist_size = XFS_INODE_CLUSTER_SIZE(mp) * sizeof(xfs_inode_t *); | 2989 | inodes_per_cluster = XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog; |
2989 | ilist = kmem_alloc(ilist_size, KM_MAYFAIL); | 2990 | ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *); |
2991 | ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS); | ||
2990 | if (!ilist) | 2992 | if (!ilist) |
2991 | return 0; | 2993 | return 0; |
2992 | 2994 | ||
@@ -2995,8 +2997,7 @@ xfs_iflush_cluster( | |||
2995 | read_lock(&pag->pag_ici_lock); | 2997 | read_lock(&pag->pag_ici_lock); |
2996 | /* really need a gang lookup range call here */ | 2998 | /* really need a gang lookup range call here */ |
2997 | nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist, | 2999 | nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist, |
2998 | first_index, | 3000 | first_index, inodes_per_cluster); |
2999 | XFS_INODE_CLUSTER_SIZE(mp)); | ||
3000 | if (nr_found == 0) | 3001 | if (nr_found == 0) |
3001 | goto out_free; | 3002 | goto out_free; |
3002 | 3003 | ||
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 70702a60b4bb..e475e3717eb3 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -856,18 +856,14 @@ xfs_readlink( | |||
856 | /* | 856 | /* |
857 | * xfs_fsync | 857 | * xfs_fsync |
858 | * | 858 | * |
859 | * This is called to sync the inode and its data out to disk. | 859 | * This is called to sync the inode and its data out to disk. We need to hold |
860 | * We need to hold the I/O lock while flushing the data, and | 860 | * the I/O lock while flushing the data, and the inode lock while flushing the |
861 | * the inode lock while flushing the inode. The inode lock CANNOT | 861 | * inode. The inode lock CANNOT be held while flushing the data, so acquire |
862 | * be held while flushing the data, so acquire after we're done | 862 | * after we're done with that. |
863 | * with that. | ||
864 | */ | 863 | */ |
865 | int | 864 | int |
866 | xfs_fsync( | 865 | xfs_fsync( |
867 | xfs_inode_t *ip, | 866 | xfs_inode_t *ip) |
868 | int flag, | ||
869 | xfs_off_t start, | ||
870 | xfs_off_t stop) | ||
871 | { | 867 | { |
872 | xfs_trans_t *tp; | 868 | xfs_trans_t *tp; |
873 | int error; | 869 | int error; |
@@ -875,103 +871,79 @@ xfs_fsync( | |||
875 | 871 | ||
876 | xfs_itrace_entry(ip); | 872 | xfs_itrace_entry(ip); |
877 | 873 | ||
878 | ASSERT(start >= 0 && stop >= -1); | ||
879 | |||
880 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 874 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) |
881 | return XFS_ERROR(EIO); | 875 | return XFS_ERROR(EIO); |
882 | 876 | ||
883 | if (flag & FSYNC_DATA) | 877 | /* capture size updates in I/O completion before writing the inode. */ |
884 | filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping); | 878 | error = filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping); |
879 | if (error) | ||
880 | return XFS_ERROR(error); | ||
885 | 881 | ||
886 | /* | 882 | /* |
887 | * We always need to make sure that the required inode state | 883 | * We always need to make sure that the required inode state is safe on |
888 | * is safe on disk. The vnode might be clean but because | 884 | * disk. The vnode might be clean but we still might need to force the |
889 | * of committed transactions that haven't hit the disk yet. | 885 | * log because of committed transactions that haven't hit the disk yet. |
890 | * Likewise, there could be unflushed non-transactional | 886 | * Likewise, there could be unflushed non-transactional changes to the |
891 | * changes to the inode core that have to go to disk. | 887 | * inode core that have to go to disk and this requires us to issue |
888 | * a synchronous transaction to capture these changes correctly. | ||
892 | * | 889 | * |
893 | * The following code depends on one assumption: that | 890 | * This code relies on the assumption that if the update_* fields |
894 | * any transaction that changes an inode logs the core | 891 | * of the inode are clear and the inode is unpinned then it is clean |
895 | * because it has to change some field in the inode core | 892 | * and no action is required. |
896 | * (typically nextents or nblocks). That assumption | ||
897 | * implies that any transactions against an inode will | ||
898 | * catch any non-transactional updates. If inode-altering | ||
899 | * transactions exist that violate this assumption, the | ||
900 | * code breaks. Right now, it figures that if the involved | ||
901 | * update_* field is clear and the inode is unpinned, the | ||
902 | * inode is clean. Either it's been flushed or it's been | ||
903 | * committed and the commit has hit the disk unpinning the inode. | ||
904 | * (Note that xfs_inode_item_format() called at commit clears | ||
905 | * the update_* fields.) | ||
906 | */ | 893 | */ |
907 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 894 | xfs_ilock(ip, XFS_ILOCK_SHARED); |
908 | 895 | ||
909 | /* If we are flushing data then we care about update_size | 896 | if (!(ip->i_update_size || ip->i_update_core)) { |
910 | * being set, otherwise we care about update_core | ||
911 | */ | ||
912 | if ((flag & FSYNC_DATA) ? | ||
913 | (ip->i_update_size == 0) : | ||
914 | (ip->i_update_core == 0)) { | ||
915 | /* | 897 | /* |
916 | * Timestamps/size haven't changed since last inode | 898 | * Timestamps/size haven't changed since last inode flush or |
917 | * flush or inode transaction commit. That means | 899 | * inode transaction commit. That means either nothing got |
918 | * either nothing got written or a transaction | 900 | * written or a transaction committed which caught the updates. |
919 | * committed which caught the updates. If the | 901 | * If the latter happened and the transaction hasn't hit the |
920 | * latter happened and the transaction hasn't | 902 | * disk yet, the inode will be still be pinned. If it is, |
921 | * hit the disk yet, the inode will be still | 903 | * force the log. |
922 | * be pinned. If it is, force the log. | ||
923 | */ | 904 | */ |
924 | 905 | ||
925 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 906 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
926 | 907 | ||
927 | if (xfs_ipincount(ip)) { | 908 | if (xfs_ipincount(ip)) { |
928 | _xfs_log_force(ip->i_mount, (xfs_lsn_t)0, | 909 | error = _xfs_log_force(ip->i_mount, (xfs_lsn_t)0, |
929 | XFS_LOG_FORCE | | 910 | XFS_LOG_FORCE | XFS_LOG_SYNC, |
930 | ((flag & FSYNC_WAIT) | ||
931 | ? XFS_LOG_SYNC : 0), | ||
932 | &log_flushed); | 911 | &log_flushed); |
933 | } else { | 912 | } else { |
934 | /* | 913 | /* |
935 | * If the inode is not pinned and nothing | 914 | * If the inode is not pinned and nothing has changed |
936 | * has changed we don't need to flush the | 915 | * we don't need to flush the cache. |
937 | * cache. | ||
938 | */ | 916 | */ |
939 | changed = 0; | 917 | changed = 0; |
940 | } | 918 | } |
941 | error = 0; | ||
942 | } else { | 919 | } else { |
943 | /* | 920 | /* |
944 | * Kick off a transaction to log the inode | 921 | * Kick off a transaction to log the inode core to get the |
945 | * core to get the updates. Make it | 922 | * updates. The sync transaction will also force the log. |
946 | * sync if FSYNC_WAIT is passed in (which | ||
947 | * is done by everybody but specfs). The | ||
948 | * sync transaction will also force the log. | ||
949 | */ | 923 | */ |
950 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 924 | xfs_iunlock(ip, XFS_ILOCK_SHARED); |
951 | tp = xfs_trans_alloc(ip->i_mount, XFS_TRANS_FSYNC_TS); | 925 | tp = xfs_trans_alloc(ip->i_mount, XFS_TRANS_FSYNC_TS); |
952 | if ((error = xfs_trans_reserve(tp, 0, | 926 | error = xfs_trans_reserve(tp, 0, |
953 | XFS_FSYNC_TS_LOG_RES(ip->i_mount), | 927 | XFS_FSYNC_TS_LOG_RES(ip->i_mount), 0, 0, 0); |
954 | 0, 0, 0))) { | 928 | if (error) { |
955 | xfs_trans_cancel(tp, 0); | 929 | xfs_trans_cancel(tp, 0); |
956 | return error; | 930 | return error; |
957 | } | 931 | } |
958 | xfs_ilock(ip, XFS_ILOCK_EXCL); | 932 | xfs_ilock(ip, XFS_ILOCK_EXCL); |
959 | 933 | ||
960 | /* | 934 | /* |
961 | * Note - it's possible that we might have pushed | 935 | * Note - it's possible that we might have pushed ourselves out |
962 | * ourselves out of the way during trans_reserve | 936 | * of the way during trans_reserve which would flush the inode. |
963 | * which would flush the inode. But there's no | 937 | * But there's no guarantee that the inode buffer has actually |
964 | * guarantee that the inode buffer has actually | 938 | * gone out yet (it's delwri). Plus the buffer could be pinned |
965 | * gone out yet (it's delwri). Plus the buffer | 939 | * anyway if it's part of an inode in another recent |
966 | * could be pinned anyway if it's part of an | 940 | * transaction. So we play it safe and fire off the |
967 | * inode in another recent transaction. So we | 941 | * transaction anyway. |
968 | * play it safe and fire off the transaction anyway. | ||
969 | */ | 942 | */ |
970 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); | 943 | xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); |
971 | xfs_trans_ihold(tp, ip); | 944 | xfs_trans_ihold(tp, ip); |
972 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 945 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
973 | if (flag & FSYNC_WAIT) | 946 | xfs_trans_set_sync(tp); |
974 | xfs_trans_set_sync(tp); | ||
975 | error = _xfs_trans_commit(tp, 0, &log_flushed); | 947 | error = _xfs_trans_commit(tp, 0, &log_flushed); |
976 | 948 | ||
977 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 949 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
diff --git a/fs/xfs/xfs_vnodeops.h b/fs/xfs/xfs_vnodeops.h index 8abe8f186e20..57335ba4ce53 100644 --- a/fs/xfs/xfs_vnodeops.h +++ b/fs/xfs/xfs_vnodeops.h | |||
@@ -18,8 +18,7 @@ int xfs_open(struct xfs_inode *ip); | |||
18 | int xfs_setattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags, | 18 | int xfs_setattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags, |
19 | struct cred *credp); | 19 | struct cred *credp); |
20 | int xfs_readlink(struct xfs_inode *ip, char *link); | 20 | int xfs_readlink(struct xfs_inode *ip, char *link); |
21 | int xfs_fsync(struct xfs_inode *ip, int flag, xfs_off_t start, | 21 | int xfs_fsync(struct xfs_inode *ip); |
22 | xfs_off_t stop); | ||
23 | int xfs_release(struct xfs_inode *ip); | 22 | int xfs_release(struct xfs_inode *ip); |
24 | int xfs_inactive(struct xfs_inode *ip); | 23 | int xfs_inactive(struct xfs_inode *ip); |
25 | int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name, | 24 | int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name, |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 06480bcabfdc..06ebb6ef72aa 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -319,6 +319,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
319 | #endif /* CONFIG_CPU_FREQ */ | 319 | #endif /* CONFIG_CPU_FREQ */ |
320 | 320 | ||
321 | /* in processor_throttling.c */ | 321 | /* in processor_throttling.c */ |
322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | ||
322 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
323 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
324 | extern struct file_operations acpi_processor_throttling_fops; | 325 | extern struct file_operations acpi_processor_throttling_fops; |
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h index 80073fd36b8e..f8beaa228467 100644 --- a/include/asm-arm/arch-at91/io.h +++ b/include/asm-arm/arch-at91/io.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_IO_H | 21 | #ifndef __ASM_ARCH_IO_H |
22 | #define __ASM_ARCH_IO_H | 22 | #define __ASM_ARCH_IO_H |
23 | 23 | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | #define IO_SPACE_LIMIT 0xFFFFFFFF | 24 | #define IO_SPACE_LIMIT 0xFFFFFFFF |
27 | 25 | ||
28 | #define __io(a) ((void __iomem *)(a)) | 26 | #define __io(a) ((void __iomem *)(a)) |
diff --git a/include/asm-arm/arch-omap/board-palmte.h b/include/asm-arm/arch-omap/board-palmte.h index cd22035a7160..6fac2c8935be 100644 --- a/include/asm-arm/arch-omap/board-palmte.h +++ b/include/asm-arm/arch-omap/board-palmte.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #ifndef __OMAP_BOARD_PALMTE_H | 14 | #ifndef __OMAP_BOARD_PALMTE_H |
15 | #define __OMAP_BOARD_PALMTE_H | 15 | #define __OMAP_BOARD_PALMTE_H |
16 | 16 | ||
17 | #include <asm/arch/gpio.h> | ||
18 | |||
19 | #define PALMTE_USBDETECT_GPIO 0 | 17 | #define PALMTE_USBDETECT_GPIO 0 |
20 | #define PALMTE_USB_OR_DC_GPIO 1 | 18 | #define PALMTE_USB_OR_DC_GPIO 1 |
21 | #define PALMTE_TSC_GPIO 4 | 19 | #define PALMTE_TSC_GPIO 4 |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 57523bdb642b..12a5e4de9518 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -73,6 +73,8 @@ struct clk { | |||
73 | #endif | 73 | #endif |
74 | }; | 74 | }; |
75 | 75 | ||
76 | struct cpufreq_frequency_table; | ||
77 | |||
76 | struct clk_functions { | 78 | struct clk_functions { |
77 | int (*clk_enable)(struct clk *clk); | 79 | int (*clk_enable)(struct clk *clk); |
78 | void (*clk_disable)(struct clk *clk); | 80 | void (*clk_disable)(struct clk *clk); |
@@ -83,6 +85,9 @@ struct clk_functions { | |||
83 | void (*clk_allow_idle)(struct clk *clk); | 85 | void (*clk_allow_idle)(struct clk *clk); |
84 | void (*clk_deny_idle)(struct clk *clk); | 86 | void (*clk_deny_idle)(struct clk *clk); |
85 | void (*clk_disable_unused)(struct clk *clk); | 87 | void (*clk_disable_unused)(struct clk *clk); |
88 | #ifdef CONFIG_CPU_FREQ | ||
89 | void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **); | ||
90 | #endif | ||
86 | }; | 91 | }; |
87 | 92 | ||
88 | extern unsigned int mpurate; | 93 | extern unsigned int mpurate; |
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index 74cd57221c8e..369093a45fcf 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -8,6 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <asm/hardware.h> | 10 | #include <asm/hardware.h> |
11 | #include <asm/arch/io.h> | ||
11 | #include <asm/arch/irqs.h> | 12 | #include <asm/arch/irqs.h> |
12 | 13 | ||
13 | #if defined(CONFIG_ARCH_OMAP1) | 14 | #if defined(CONFIG_ARCH_OMAP1) |
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index 86621a04cd8f..5ee6a49864c3 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #ifndef __ASM_ARCH_OMAP_GPIO_H | 26 | #ifndef __ASM_ARCH_OMAP_GPIO_H |
27 | #define __ASM_ARCH_OMAP_GPIO_H | 27 | #define __ASM_ARCH_OMAP_GPIO_H |
28 | 28 | ||
29 | #include <asm/hardware.h> | ||
30 | #include <asm/arch/irqs.h> | 29 | #include <asm/arch/irqs.h> |
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | 31 | ||
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index da572092e255..91d85b3417b7 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include <asm/arch/cpu.h> | 42 | #include <asm/arch/cpu.h> |
43 | #endif | 43 | #endif |
44 | #include <asm/arch/io.h> | ||
45 | #include <asm/arch/serial.h> | 44 | #include <asm/arch/serial.h> |
46 | 45 | ||
47 | /* | 46 | /* |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h index eb6eaa174f8d..bc73ab84167c 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa27x.h +++ b/include/asm-arm/arch-pxa/mfp-pxa27x.h | |||
@@ -112,6 +112,7 @@ | |||
112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) | 112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) |
113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) | 113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) |
114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) | 114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) |
115 | #define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH) | ||
115 | 116 | ||
116 | /* I2C */ | 117 | /* I2C */ |
117 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) | 118 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) |
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/include/asm-arm/arch-pxa/pxa2xx-gpio.h index 763313c5e6be..b81cd63cb2eb 100644 --- a/include/asm-arm/arch-pxa/pxa2xx-gpio.h +++ b/include/asm-arm/arch-pxa/pxa2xx-gpio.h | |||
@@ -134,7 +134,11 @@ | |||
134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ | 134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ |
135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ | 135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ |
136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ | 136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ |
137 | #define GPIO96_FFRXD 96 /* FFUART recieve */ | ||
138 | #define GPIO98_FFRTS 98 /* FFUART request to send */ | ||
137 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ | 139 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ |
140 | #define GPIO99_FFTXD 99 /* FFUART transmit data */ | ||
141 | #define GPIO100_FFCTS 100 /* FFUART Clear to send */ | ||
138 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | 142 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ |
139 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ | 143 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ |
140 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ | 144 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ |
@@ -316,6 +320,8 @@ | |||
316 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 320 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
317 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) | 321 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) |
318 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) | 322 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) |
323 | #define GPIO88_USBH1_PWR_MD (88 | GPIO_ALT_FN_1_IN) | ||
324 | #define GPIO89_USBH1_PEN_MD (89 | GPIO_ALT_FN_2_OUT) | ||
319 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) | 325 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) |
320 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) | 326 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) |
321 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 327 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
@@ -324,8 +330,11 @@ | |||
324 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) | 330 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) |
325 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) | 331 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) |
326 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) | 332 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) |
333 | #define GPIO96_FFRXD_MD (96 | GPIO_ALT_FN_3_IN) | ||
327 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) | 334 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) |
328 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) | 335 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) |
336 | #define GPIO98_FFRTS_MD (98 | GPIO_ALT_FN_3_OUT) | ||
337 | #define GPIO99_FFTXD_MD (99 | GPIO_ALT_FN_3_OUT) | ||
329 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) | 338 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) |
330 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) | 339 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) |
331 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | 340 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) |
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h index f762493f5141..3ba464c913a5 100644 --- a/include/asm-arm/arch-pxa/regs-lcd.h +++ b/include/asm-arm/arch-pxa/regs-lcd.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_LCD_H | 1 | #ifndef __ASM_ARCH_REGS_LCD_H |
2 | #define __ASM_ARCH_REGS_LCD_H | 2 | #define __ASM_ARCH_REGS_LCD_H |
3 | |||
4 | #include <asm/arch/bitfield.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * LCD Controller Registers and Bits Definitions | 7 | * LCD Controller Registers and Bits Definitions |
5 | */ | 8 | */ |
@@ -69,7 +72,7 @@ | |||
69 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ | 72 | #define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ |
70 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ | 73 | #define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ |
71 | #define LCCR0_PDD_S 12 | 74 | #define LCCR0_PDD_S 12 |
72 | #define LCCR0_BM (1 << 20) /* Branch mask */ | 75 | #define LCCR0_BM (1 << 20) /* Branch mask */ |
73 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ | 76 | #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ |
74 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ | 77 | #define LCCR0_LCDT (1 << 22) /* LCD panel type */ |
75 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ | 78 | #define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ |
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h index 14a344aa3cc7..762eba535813 100644 --- a/include/asm-arm/arch-sa1100/collie.h +++ b/include/asm-arm/arch-sa1100/collie.h | |||
@@ -34,9 +34,12 @@ | |||
34 | 34 | ||
35 | #define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) | 35 | #define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) |
36 | #define COLLIE_GPIO_AC_IN GPIO_GPIO (1) | 36 | #define COLLIE_GPIO_AC_IN GPIO_GPIO (1) |
37 | #define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11) | ||
37 | #define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) | 38 | #define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) |
38 | #define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) | 39 | #define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) |
39 | #define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) | 40 | #define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) |
41 | #define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17) | ||
42 | #define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18) | ||
40 | #define COLLIE_GPIO_CO GPIO_GPIO (20) | 43 | #define COLLIE_GPIO_CO GPIO_GPIO (20) |
41 | #define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) | 44 | #define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) |
42 | #define COLLIE_GPIO_CF_CD GPIO_GPIO (22) | 45 | #define COLLIE_GPIO_CF_CD GPIO_GPIO (22) |
@@ -49,6 +52,7 @@ | |||
49 | 52 | ||
50 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 | 53 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 |
51 | #define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 | 54 | #define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 |
55 | #define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11 | ||
52 | #define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 | 56 | #define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 |
53 | #define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 | 57 | #define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 |
54 | #define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 | 58 | #define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 5c22b0112106..8e05bdb5f12f 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -179,10 +179,10 @@ typedef unsigned long pgprot_t; | |||
179 | 179 | ||
180 | #endif /* STRICT_MM_TYPECHECKS */ | 180 | #endif /* STRICT_MM_TYPECHECKS */ |
181 | 181 | ||
182 | typedef struct page *pgtable_t; | ||
183 | |||
184 | #endif /* CONFIG_MMU */ | 182 | #endif /* CONFIG_MMU */ |
185 | 183 | ||
184 | typedef struct page *pgtable_t; | ||
185 | |||
186 | #include <asm/memory.h> | 186 | #include <asm/memory.h> |
187 | 187 | ||
188 | #endif /* !__ASSEMBLY__ */ | 188 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 2e5868bbe03b..386fcc10a973 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/io.h> | ||
20 | 19 | ||
21 | /* | 20 | /* |
22 | * Trivial page table functions. | 21 | * Trivial page table functions. |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 800ba5254daf..2b41ebbfa7ff 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | /* write_can_lock - would write_trylock() succeed? */ | 144 | /* write_can_lock - would write_trylock() succeed? */ |
145 | #define __raw_write_can_lock(x) ((x)->lock == 0x80000000) | 145 | #define __raw_write_can_lock(x) ((x)->lock == 0) |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Read locks are a bit more hairy: | 148 | * Read locks are a bit more hairy: |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 6335de9a2bb3..514af792a598 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -48,20 +48,6 @@ | |||
48 | #define CPUID_TCM 2 | 48 | #define CPUID_TCM 2 |
49 | #define CPUID_TLBTYPE 3 | 49 | #define CPUID_TLBTYPE 3 |
50 | 50 | ||
51 | #ifdef CONFIG_CPU_CP15 | ||
52 | #define read_cpuid(reg) \ | ||
53 | ({ \ | ||
54 | unsigned int __val; \ | ||
55 | asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \ | ||
56 | : "=r" (__val) \ | ||
57 | : \ | ||
58 | : "cc"); \ | ||
59 | __val; \ | ||
60 | }) | ||
61 | #else | ||
62 | #define read_cpuid(reg) (processor_id) | ||
63 | #endif | ||
64 | |||
65 | /* | 51 | /* |
66 | * This is used to ensure the compiler did actually allocate the register we | 52 | * This is used to ensure the compiler did actually allocate the register we |
67 | * asked it for some inline assembly sequences. Apparently we can't trust | 53 | * asked it for some inline assembly sequences. Apparently we can't trust |
@@ -78,6 +64,21 @@ | |||
78 | #include <linux/stringify.h> | 64 | #include <linux/stringify.h> |
79 | #include <linux/irqflags.h> | 65 | #include <linux/irqflags.h> |
80 | 66 | ||
67 | #ifdef CONFIG_CPU_CP15 | ||
68 | #define read_cpuid(reg) \ | ||
69 | ({ \ | ||
70 | unsigned int __val; \ | ||
71 | asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \ | ||
72 | : "=r" (__val) \ | ||
73 | : \ | ||
74 | : "cc"); \ | ||
75 | __val; \ | ||
76 | }) | ||
77 | #else | ||
78 | extern unsigned int processor_id; | ||
79 | #define read_cpuid(reg) (processor_id) | ||
80 | #endif | ||
81 | |||
81 | /* | 82 | /* |
82 | * The CPU ID never changes at run time, so we might as well tell the | 83 | * The CPU ID never changes at run time, so we might as well tell the |
83 | * compiler that it's constant. Use this function to read the CPU ID | 84 | * compiler that it's constant. Use this function to read the CPU ID |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 716df7c85923..76033831eb35 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -37,7 +37,9 @@ | |||
37 | #include <linux/linkage.h> | 37 | #include <linux/linkage.h> |
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | 39 | ||
40 | #if defined(CONFIG_DMA_UNCACHED_2M) | 40 | #if defined(CONFIG_DMA_UNCACHED_4M) |
41 | # define DMA_UNCACHED_REGION (4 * 1024 * 1024) | ||
42 | #elif defined(CONFIG_DMA_UNCACHED_2M) | ||
41 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) | 43 | # define DMA_UNCACHED_REGION (2 * 1024 * 1024) |
42 | #elif defined(CONFIG_DMA_UNCACHED_1M) | 44 | #elif defined(CONFIG_DMA_UNCACHED_1M) |
43 | # define DMA_UNCACHED_REGION (1024 * 1024) | 45 | # define DMA_UNCACHED_REGION (1024 * 1024) |
@@ -103,13 +105,6 @@ extern int sram_free(const void*); | |||
103 | extern void *sram_alloc_with_lsl(size_t, unsigned long); | 105 | extern void *sram_alloc_with_lsl(size_t, unsigned long); |
104 | extern int sram_free_with_lsl(const void*); | 106 | extern int sram_free_with_lsl(const void*); |
105 | 107 | ||
106 | extern void led_on(int); | ||
107 | extern void led_off(int); | ||
108 | extern void led_toggle(int); | ||
109 | extern void led_disp_num(int); | ||
110 | extern void led_toggle_num(int); | ||
111 | extern void init_leds(void); | ||
112 | |||
113 | extern const char bfin_board_name[]; | 108 | extern const char bfin_board_name[]; |
114 | extern unsigned long wall_jiffies; | 109 | extern unsigned long wall_jiffies; |
115 | 110 | ||
diff --git a/include/asm-blackfin/checksum.h b/include/asm-blackfin/checksum.h index 2638f2586d2f..6f6af2b8e9e0 100644 --- a/include/asm-blackfin/checksum.h +++ b/include/asm-blackfin/checksum.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * | 15 | * |
16 | * it's best to have buff aligned on a 32-bit boundary | 16 | * it's best to have buff aligned on a 32-bit boundary |
17 | */ | 17 | */ |
18 | unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); | 18 | __wsum csum_partial(const void *buff, int len, __wsum sum); |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * the same as csum_partial, but copies from src while it | 21 | * the same as csum_partial, but copies from src while it |
@@ -25,8 +25,8 @@ unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); | |||
25 | * better 64-bit) boundary | 25 | * better 64-bit) boundary |
26 | */ | 26 | */ |
27 | 27 | ||
28 | unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, | 28 | __wsum csum_partial_copy(const void *src, void *dst, |
29 | int len, int sum); | 29 | int len, __wsum sum); |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * the same as csum_partial_copy, but copies from user space. | 32 | * the same as csum_partial_copy, but copies from user space. |
@@ -35,20 +35,19 @@ unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst, | |||
35 | * better 64-bit) boundary | 35 | * better 64-bit) boundary |
36 | */ | 36 | */ |
37 | 37 | ||
38 | extern unsigned int csum_partial_copy_from_user(const unsigned char *src, | 38 | extern __wsum csum_partial_copy_from_user(const void __user *src, void *dst, |
39 | unsigned char *dst, int len, | 39 | int len, __wsum sum, int *csum_err); |
40 | int sum, int *csum_err); | ||
41 | 40 | ||
42 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | 41 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ |
43 | csum_partial_copy((src), (dst), (len), (sum)) | 42 | csum_partial_copy((src), (dst), (len), (sum)) |
44 | 43 | ||
45 | unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl); | 44 | __sum16 ip_fast_csum(unsigned char *iph, unsigned int ihl); |
46 | 45 | ||
47 | /* | 46 | /* |
48 | * Fold a partial checksum | 47 | * Fold a partial checksum |
49 | */ | 48 | */ |
50 | 49 | ||
51 | static inline unsigned int csum_fold(unsigned int sum) | 50 | static inline __sum16 csum_fold(__wsum sum) |
52 | { | 51 | { |
53 | while (sum >> 16) | 52 | while (sum >> 16) |
54 | sum = (sum & 0xffff) + (sum >> 16); | 53 | sum = (sum & 0xffff) + (sum >> 16); |
@@ -60,9 +59,9 @@ static inline unsigned int csum_fold(unsigned int sum) | |||
60 | * returns a 16-bit checksum, already complemented | 59 | * returns a 16-bit checksum, already complemented |
61 | */ | 60 | */ |
62 | 61 | ||
63 | static inline unsigned int | 62 | static inline __wsum |
64 | csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, | 63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
65 | unsigned short proto, unsigned int sum) | 64 | unsigned short proto, __wsum sum) |
66 | { | 65 | { |
67 | 66 | ||
68 | __asm__ ("%0 = %0 + %1;\n\t" | 67 | __asm__ ("%0 = %0 + %1;\n\t" |
@@ -84,9 +83,9 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, | |||
84 | return (sum); | 83 | return (sum); |
85 | } | 84 | } |
86 | 85 | ||
87 | static inline unsigned short int | 86 | static inline __sum16 |
88 | csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, | 87 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, |
89 | unsigned short proto, unsigned int sum) | 88 | unsigned short proto, __wsum sum) |
90 | { | 89 | { |
91 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); | 90 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); |
92 | } | 91 | } |
@@ -96,6 +95,6 @@ csum_tcpudp_magic(unsigned long saddr, unsigned long daddr, unsigned short len, | |||
96 | * in icmp.c | 95 | * in icmp.c |
97 | */ | 96 | */ |
98 | 97 | ||
99 | extern unsigned short ip_compute_csum(const unsigned char *buff, int len); | 98 | extern __sum16 ip_compute_csum(const void *buff, int len); |
100 | 99 | ||
101 | #endif /* _BFIN_CHECKSUM_H */ | 100 | #endif /* _BFIN_CHECKSUM_H */ |
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 27ff532a806c..ff95e9d88342 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -437,7 +437,6 @@ void gpio_set_value(unsigned gpio, int arg); | |||
437 | int gpio_get_value(unsigned gpio); | 437 | int gpio_get_value(unsigned gpio); |
438 | 438 | ||
439 | #ifndef BF548_FAMILY | 439 | #ifndef BF548_FAMILY |
440 | #define gpio_get_value(gpio) get_gpio_data(gpio) | ||
441 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 440 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
442 | #endif | 441 | #endif |
443 | 442 | ||
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 574fe56989d1..cbbf7ffdbbff 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -117,10 +117,12 @@ static inline unsigned int readl(const volatile void __iomem *addr) | |||
117 | 117 | ||
118 | extern void outsb(unsigned long port, const void *addr, unsigned long count); | 118 | extern void outsb(unsigned long port, const void *addr, unsigned long count); |
119 | extern void outsw(unsigned long port, const void *addr, unsigned long count); | 119 | extern void outsw(unsigned long port, const void *addr, unsigned long count); |
120 | extern void outsw_8(unsigned long port, const void *addr, unsigned long count); | ||
120 | extern void outsl(unsigned long port, const void *addr, unsigned long count); | 121 | extern void outsl(unsigned long port, const void *addr, unsigned long count); |
121 | 122 | ||
122 | extern void insb(unsigned long port, void *addr, unsigned long count); | 123 | extern void insb(unsigned long port, void *addr, unsigned long count); |
123 | extern void insw(unsigned long port, void *addr, unsigned long count); | 124 | extern void insw(unsigned long port, void *addr, unsigned long count); |
125 | extern void insw_8(unsigned long port, void *addr, unsigned long count); | ||
124 | extern void insl(unsigned long port, void *addr, unsigned long count); | 126 | extern void insl(unsigned long port, void *addr, unsigned long count); |
125 | extern void insl_16(unsigned long port, void *addr, unsigned long count); | 127 | extern void insl_16(unsigned long port, void *addr, unsigned long count); |
126 | 128 | ||
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h index 735fa02fafb2..4725268a5ada 100644 --- a/include/asm-blackfin/mach-bf527/anomaly.h +++ b/include/asm-blackfin/mach-bf527/anomaly.h | |||
@@ -15,12 +15,16 @@ | |||
15 | 15 | ||
16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ | 16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ |
17 | #define ANOMALY_05000074 (1) | 17 | #define ANOMALY_05000074 (1) |
18 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ | ||
19 | #define ANOMALY_05000119 (1) | ||
18 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 20 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
19 | #define ANOMALY_05000122 (1) | 21 | #define ANOMALY_05000122 (1) |
20 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ | 22 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ |
21 | #define ANOMALY_05000245 (1) | 23 | #define ANOMALY_05000245 (1) |
22 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 24 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
23 | #define ANOMALY_05000265 (1) | 25 | #define ANOMALY_05000265 (1) |
26 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
27 | #define ANOMALY_05000312 (1) | ||
24 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 28 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
25 | #define ANOMALY_05000328 (1) | 29 | #define ANOMALY_05000328 (1) |
26 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 30 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
@@ -92,7 +96,6 @@ | |||
92 | #define ANOMALY_05000266 (0) | 96 | #define ANOMALY_05000266 (0) |
93 | #define ANOMALY_05000273 (0) | 97 | #define ANOMALY_05000273 (0) |
94 | #define ANOMALY_05000311 (0) | 98 | #define ANOMALY_05000311 (0) |
95 | #define ANOMALY_05000312 (0) | ||
96 | #define ANOMALY_05000323 (0) | 99 | #define ANOMALY_05000323 (0) |
97 | #define ANOMALY_05000363 (0) | 100 | #define ANOMALY_05000363 (0) |
98 | 101 | ||
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index 26e3c8076b4e..96bd09e31e36 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | 64 | ||
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h index 2891727b6176..297821e2d79a 100644 --- a/include/asm-blackfin/mach-bf527/blackfin.h +++ b/include/asm-blackfin/mach-bf527/blackfin.h | |||
@@ -39,22 +39,22 @@ | |||
39 | #include "defBF522.h" | 39 | #include "defBF522.h" |
40 | #include "anomaly.h" | 40 | #include "anomaly.h" |
41 | 41 | ||
42 | #if defined(CONFIG_BF527) | 42 | #if defined(CONFIG_BF527) || defined(CONFIG_BF526) |
43 | #include "defBF527.h" | 43 | #include "defBF527.h" |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #if defined(CONFIG_BF525) | 46 | #if defined(CONFIG_BF525) || defined(CONFIG_BF524) |
47 | #include "defBF525.h" | 47 | #include "defBF525.h" |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #if !defined(__ASSEMBLY__) | 50 | #if !defined(__ASSEMBLY__) |
51 | #include "cdefBF522.h" | 51 | #include "cdefBF522.h" |
52 | 52 | ||
53 | #if defined(CONFIG_BF527) | 53 | #if defined(CONFIG_BF527) || defined(CONFIG_BF526) |
54 | #include "cdefBF527.h" | 54 | #include "cdefBF527.h" |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #if defined(CONFIG_BF525) | 57 | #if defined(CONFIG_BF525) || defined(CONFIG_BF524) |
58 | #include "cdefBF525.h" | 58 | #include "cdefBF525.h" |
59 | #endif | 59 | #endif |
60 | #endif | 60 | #endif |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 5a6dcc5fa36c..8f7ea112fd3a 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf533/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf533/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -176,6 +176,21 @@ | |||
176 | #define ANOMALY_05000315 (1) | 176 | #define ANOMALY_05000315 (1) |
177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ | 177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ |
178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) | 178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) |
179 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
180 | #define ANOMALY_05000357 (1) | ||
181 | /* UART Break Signal Issues */ | ||
182 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
183 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
184 | #define ANOMALY_05000366 (1) | ||
185 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
186 | #define ANOMALY_05000371 (1) | ||
187 | /* PPI Does Not Start Properly In Specific Mode */ | ||
188 | #define ANOMALY_05000400 (__SILICON_REVISION__ >= 5) | ||
189 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
190 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) | ||
191 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
192 | #define ANOMALY_05000403 (1) | ||
193 | |||
179 | 194 | ||
180 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are | 195 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are |
181 | * here to show running on older silicon just isn't feasible. | 196 | * here to show running on older silicon just isn't feasible. |
@@ -249,20 +264,6 @@ | |||
249 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) | 264 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) |
250 | /* Internal Voltage Regulator may not start up */ | 265 | /* Internal Voltage Regulator may not start up */ |
251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 266 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
253 | #define ANOMALY_05000357 (1) | ||
254 | /* UART Break Signal Issues */ | ||
255 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
256 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
257 | #define ANOMALY_05000366 (1) | ||
258 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
259 | #define ANOMALY_05000371 (1) | ||
260 | /* PPI Does Not Start Properly In Specific Mode */ | ||
261 | #define ANOMALY_05000400 (__SILICON_REVISION__ == 5) | ||
262 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
263 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 5) | ||
264 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
265 | #define ANOMALY_05000403 (1) | ||
266 | 267 | ||
267 | /* Anomalies that don't exist on this proc */ | 268 | /* Anomalies that don't exist on this proc */ |
268 | #define ANOMALY_05000266 (0) | 269 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index d016603b6615..e924569ad1d8 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index a6b08facb242..8460ab9c324f 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf537/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf537/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -132,8 +132,8 @@ | |||
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | 134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) |
135 | /* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ | 135 | /* New Feature: UART Remains Enabled after UART Boot */ |
136 | #define ANOMALY_05000350 (__SILICON_REVISION__ < 3) | 136 | #define ANOMALY_05000350 (__SILICON_REVISION__ >= 3) |
137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | 137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ |
138 | #define ANOMALY_05000355 (1) | 138 | #define ANOMALY_05000355 (1) |
139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
@@ -145,12 +145,10 @@ | |||
145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
146 | #define ANOMALY_05000371 (1) | 146 | #define ANOMALY_05000371 (1) |
147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | 147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ |
148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) | 148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) |
149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | 149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ |
150 | #define ANOMALY_05000403 (1) | 150 | #define ANOMALY_05000403 (1) |
151 | 151 | ||
152 | |||
153 | |||
154 | /* Anomalies that don't exist on this proc */ | 152 | /* Anomalies that don't exist on this proc */ |
155 | #define ANOMALY_05000125 (0) | 153 | #define ANOMALY_05000125 (0) |
156 | #define ANOMALY_05000158 (0) | 154 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index f79d1a0e9129..41d7b6490bb1 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 62 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | 64 | ||
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index 49d3cebc5293..3ad59655881a 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define ANOMALY_05000365 (1) | 75 | #define ANOMALY_05000365 (1) |
76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | 76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ |
77 | #define ANOMALY_05000369 (1) | 77 | #define ANOMALY_05000369 (1) |
78 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
79 | #define ANOMALY_05000371 (1) | ||
78 | /* Mobile DDR Operation Not Functional */ | 80 | /* Mobile DDR Operation Not Functional */ |
79 | #define ANOMALY_05000377 (1) | 81 | #define ANOMALY_05000377 (1) |
80 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | 82 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ |
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index 5eb46a77d919..59b4ad4e5b4a 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -57,6 +57,12 @@ | |||
57 | #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ | 57 | #define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ |
58 | #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ | 58 | #define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ |
59 | 59 | ||
60 | #define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS) | ||
61 | #define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS)) | ||
62 | #define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS)) | ||
63 | #define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v) | ||
64 | #define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF) | ||
65 | |||
60 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) | 66 | #if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) |
61 | # define CONFIG_SERIAL_BFIN_CTSRTS | 67 | # define CONFIG_SERIAL_BFIN_CTSRTS |
62 | 68 | ||
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index 82157caa96a2..5c5d7d7d695f 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf561/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf561/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 7a9628769296..30d90b580f18 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -53,6 +53,12 @@ | |||
53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) | 53 | #define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) |
54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) | 54 | #define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) |
55 | 55 | ||
56 | #define UART_GET_CTS(x) gpio_get_value(x->cts_pin) | ||
57 | #define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1) | ||
58 | #define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0) | ||
59 | #define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v) | ||
60 | #define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0) | ||
61 | |||
56 | #ifdef CONFIG_BFIN_UART0_CTSRTS | 62 | #ifdef CONFIG_BFIN_UART0_CTSRTS |
57 | # define CONFIG_SERIAL_BFIN_CTSRTS | 63 | # define CONFIG_SERIAL_BFIN_CTSRTS |
58 | # ifndef CONFIG_UART0_CTS_PIN | 64 | # ifndef CONFIG_UART0_CTS_PIN |
diff --git a/include/asm-blackfin/mach-bf561/dma.h b/include/asm-blackfin/mach-bf561/dma.h index 21d982003e75..8bc46cd89a02 100644 --- a/include/asm-blackfin/mach-bf561/dma.h +++ b/include/asm-blackfin/mach-bf561/dma.h | |||
@@ -25,11 +25,11 @@ | |||
25 | #define CH_MEM_STREAM1_SRC 27 /* RX */ | 25 | #define CH_MEM_STREAM1_SRC 27 /* RX */ |
26 | #define CH_MEM_STREAM2_DEST 28 | 26 | #define CH_MEM_STREAM2_DEST 28 |
27 | #define CH_MEM_STREAM2_SRC 29 | 27 | #define CH_MEM_STREAM2_SRC 29 |
28 | #define CH_MEM_STREAM3_SRC 30 | 28 | #define CH_MEM_STREAM3_DEST 30 |
29 | #define CH_MEM_STREAM3_DEST 31 | 29 | #define CH_MEM_STREAM3_SRC 31 |
30 | #define CH_IMEM_STREAM0_DEST 32 | 30 | #define CH_IMEM_STREAM0_DEST 32 |
31 | #define CH_IMEM_STREAM0_SRC 33 | 31 | #define CH_IMEM_STREAM0_SRC 33 |
32 | #define CH_IMEM_STREAM1_SRC 34 | 32 | #define CH_IMEM_STREAM1_DEST 34 |
33 | #define CH_IMEM_STREAM1_DEST 35 | 33 | #define CH_IMEM_STREAM1_SRC 35 |
34 | 34 | ||
35 | #endif | 35 | #endif |
diff --git a/include/asm-blackfin/serial.h b/include/asm-blackfin/serial.h new file mode 100644 index 000000000000..994dd869558c --- /dev/null +++ b/include/asm-blackfin/serial.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * include/asm-blackfin/serial.h | ||
3 | */ | ||
4 | |||
5 | #define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH | ||
diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h index 9b1689850187..269da09ff637 100644 --- a/include/asm-frv/checksum.h +++ b/include/asm-frv/checksum.h | |||
@@ -75,7 +75,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) | 75 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) |
76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), | 76 | : "0" (sum), "1" (iph), "2" (ihl), "3" (4), |
77 | "m"(*(volatile struct { int _[100]; } *)iph) | 77 | "m"(*(volatile struct { int _[100]; } *)iph) |
78 | : "icc0", "icc1" | 78 | : "icc0", "icc1", "memory" |
79 | ); | 79 | ); |
80 | 80 | ||
81 | return (__force __sum16)~sum; | 81 | return (__force __sum16)~sum; |
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h index 734a1d0583b6..2947764fc0e0 100644 --- a/include/asm-frv/mem-layout.h +++ b/include/asm-frv/mem-layout.h | |||
@@ -31,6 +31,13 @@ | |||
31 | 31 | ||
32 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 32 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
33 | 33 | ||
34 | /* | ||
35 | * the slab must be aligned such that load- and store-double instructions don't | ||
36 | * fault if used | ||
37 | */ | ||
38 | #define ARCH_KMALLOC_MINALIGN 8 | ||
39 | #define ARCH_SLAB_MINALIGN 8 | ||
40 | |||
34 | /*****************************************************************************/ | 41 | /*****************************************************************************/ |
35 | /* | 42 | /* |
36 | * virtual memory layout from kernel's point of view | 43 | * virtual memory layout from kernel's point of view |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index ecf675a59d21..6be061d09da9 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -1,8 +1,12 @@ | |||
1 | #ifndef _ASM_GENERIC_GPIO_H | 1 | #ifndef _ASM_GENERIC_GPIO_H |
2 | #define _ASM_GENERIC_GPIO_H | 2 | #define _ASM_GENERIC_GPIO_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #ifdef CONFIG_HAVE_GPIO_LIB | 6 | #ifdef CONFIG_HAVE_GPIO_LIB |
5 | 7 | ||
8 | #include <linux/compiler.h> | ||
9 | |||
6 | /* Platforms may implement their GPIO interface with library code, | 10 | /* Platforms may implement their GPIO interface with library code, |
7 | * at a small performance cost for non-inlined operations and some | 11 | * at a small performance cost for non-inlined operations and some |
8 | * extra memory (for code and for per-GPIO table entries). | 12 | * extra memory (for code and for per-GPIO table entries). |
@@ -74,7 +78,7 @@ struct gpio_chip { | |||
74 | 78 | ||
75 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, | 79 | extern const char *gpiochip_is_requested(struct gpio_chip *chip, |
76 | unsigned offset); | 80 | unsigned offset); |
77 | extern int __init __must_check gpiochip_reserve(int start, int ngpio); | 81 | extern int __must_check gpiochip_reserve(int start, int ngpio); |
78 | 82 | ||
79 | /* add/remove chips */ | 83 | /* add/remove chips */ |
80 | extern int gpiochip_add(struct gpio_chip *chip); | 84 | extern int gpiochip_add(struct gpio_chip *chip); |
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h index 71210d141b64..5ffdca217b95 100644 --- a/include/asm-h8300/cacheflush.h +++ b/include/asm-h8300/cacheflush.h | |||
@@ -3,7 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _ASM_H8300_CACHEFLUSH_H | 5 | #ifndef _ASM_H8300_CACHEFLUSH_H |
6 | #define _AMS_H8300_CACHEFLUSH_H | 6 | #define _ASM_H8300_CACHEFLUSH_H |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Cache handling functions | 9 | * Cache handling functions |
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h index eb2d3559d089..3f6a090cbd9a 100644 --- a/include/asm-ia64/kvm.h +++ b/include/asm-ia64/kvm.h | |||
@@ -22,14 +22,13 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <asm/fpu.h> | ||
26 | 25 | ||
27 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
28 | 27 | ||
29 | /* Architectural interrupt line count. */ | 28 | /* Architectural interrupt line count. */ |
30 | #define KVM_NR_INTERRUPTS 256 | 29 | #define KVM_NR_INTERRUPTS 256 |
31 | 30 | ||
32 | #define KVM_IOAPIC_NUM_PINS 24 | 31 | #define KVM_IOAPIC_NUM_PINS 48 |
33 | 32 | ||
34 | struct kvm_ioapic_state { | 33 | struct kvm_ioapic_state { |
35 | __u64 base_address; | 34 | __u64 base_address; |
@@ -61,6 +60,13 @@ struct kvm_ioapic_state { | |||
61 | 60 | ||
62 | #define KVM_CONTEXT_SIZE 8*1024 | 61 | #define KVM_CONTEXT_SIZE 8*1024 |
63 | 62 | ||
63 | struct kvm_fpreg { | ||
64 | union { | ||
65 | unsigned long bits[2]; | ||
66 | long double __dummy; /* force 16-byte alignment */ | ||
67 | } u; | ||
68 | }; | ||
69 | |||
64 | union context { | 70 | union context { |
65 | /* 8K size */ | 71 | /* 8K size */ |
66 | char dummy[KVM_CONTEXT_SIZE]; | 72 | char dummy[KVM_CONTEXT_SIZE]; |
@@ -77,7 +83,7 @@ union context { | |||
77 | unsigned long ibr[8]; | 83 | unsigned long ibr[8]; |
78 | unsigned long dbr[8]; | 84 | unsigned long dbr[8]; |
79 | unsigned long pkr[8]; | 85 | unsigned long pkr[8]; |
80 | struct ia64_fpreg fr[128]; | 86 | struct kvm_fpreg fr[128]; |
81 | }; | 87 | }; |
82 | }; | 88 | }; |
83 | 89 | ||
diff --git a/include/asm-ia64/patch.h b/include/asm-ia64/patch.h index a71543084fb4..295fe6ab4584 100644 --- a/include/asm-ia64/patch.h +++ b/include/asm-ia64/patch.h | |||
@@ -21,6 +21,7 @@ extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel | |||
21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); | 21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); |
22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); | 22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); |
23 | extern void ia64_patch_phys_stack_reg(unsigned long val); | 23 | extern void ia64_patch_phys_stack_reg(unsigned long val); |
24 | extern void ia64_patch_rse (unsigned long start, unsigned long end); | ||
24 | extern void ia64_patch_gate (void); | 25 | extern void ia64_patch_gate (void); |
25 | 26 | ||
26 | #endif /* _ASM_IA64_PATCH_H */ | 27 | #endif /* _ASM_IA64_PATCH_H */ |
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 4b2a8d40ebc5..15f8dcfe6eee 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -76,7 +76,7 @@ | |||
76 | # define KERNEL_STACK_SIZE_ORDER 0 | 76 | # define KERNEL_STACK_SIZE_ORDER 0 |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15) | 79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31) |
80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) | 80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) |
81 | 81 | ||
82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
diff --git a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h index dc42a359894f..7286e4a9fe84 100644 --- a/include/asm-ia64/sections.h +++ b/include/asm-ia64/sections.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; | 11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; |
12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; | 12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; |
13 | extern char __start___rse_patchlist[], __end___rse_patchlist[]; | ||
13 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; | 14 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; |
14 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; | 15 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; |
15 | extern char __start_gate_section[]; | 16 | extern char __start_gate_section[]; |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index bd8c83765a5c..1c7047bea200 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/setup.h> | ||
17 | 18 | ||
18 | #define VERIFY_READ 0 | 19 | #define VERIFY_READ 0 |
19 | #define VERIFY_WRITE 1 | 20 | #define VERIFY_WRITE 1 |
@@ -106,7 +107,6 @@ static inline void set_fs(mm_segment_t s) | |||
106 | #else | 107 | #else |
107 | static inline int access_ok(int type, const void *addr, unsigned long size) | 108 | static inline int access_ok(int type, const void *addr, unsigned long size) |
108 | { | 109 | { |
109 | extern unsigned long memory_start, memory_end; | ||
110 | unsigned long val = (unsigned long)addr; | 110 | unsigned long val = (unsigned long)addr; |
111 | 111 | ||
112 | return ((val >= memory_start) && ((val + size) < memory_end)); | 112 | return ((val >= memory_start) && ((val + size) < memory_end)); |
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 83d1f286230b..3e8106442d5a 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h | |||
@@ -410,8 +410,49 @@ static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size, | |||
410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); | 410 | res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); |
411 | return (p - addr) * 32 + res; | 411 | return (p - addr) * 32 + res; |
412 | } | 412 | } |
413 | #define ext2_find_next_bit(addr, size, off) \ | 413 | |
414 | generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) | 414 | static inline int ext2_find_first_bit(const void *vaddr, unsigned size) |
415 | { | ||
416 | const unsigned long *p = vaddr, *addr = vaddr; | ||
417 | int res; | ||
418 | |||
419 | if (!size) | ||
420 | return 0; | ||
421 | |||
422 | size = (size >> 5) + ((size & 31) > 0); | ||
423 | while (*p++ == 0UL) { | ||
424 | if (--size == 0) | ||
425 | return (p - addr) << 5; | ||
426 | } | ||
427 | |||
428 | --p; | ||
429 | for (res = 0; res < 32; res++) | ||
430 | if (ext2_test_bit(res, p)) | ||
431 | break; | ||
432 | return (p - addr) * 32 + res; | ||
433 | } | ||
434 | |||
435 | static inline int ext2_find_next_bit(const void *vaddr, unsigned size, | ||
436 | unsigned offset) | ||
437 | { | ||
438 | const unsigned long *addr = vaddr; | ||
439 | const unsigned long *p = addr + (offset >> 5); | ||
440 | int bit = offset & 31UL, res; | ||
441 | |||
442 | if (offset >= size) | ||
443 | return size; | ||
444 | |||
445 | if (bit) { | ||
446 | /* Look for one in first longword */ | ||
447 | for (res = bit; res < 32; res++) | ||
448 | if (ext2_test_bit(res, p)) | ||
449 | return (p - addr) * 32 + res; | ||
450 | p++; | ||
451 | } | ||
452 | /* No set bit yet, search remaining full bytes for a set bit */ | ||
453 | res = ext2_find_first_bit(p, size - 32 * (p - addr)); | ||
454 | return (p - addr) * 32 + res; | ||
455 | } | ||
415 | 456 | ||
416 | #endif /* __KERNEL__ */ | 457 | #endif /* __KERNEL__ */ |
417 | 458 | ||
diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h index 01b2f92dc33d..3a492f225f00 100644 --- a/include/asm-mips/gic.h +++ b/include/asm-mips/gic.h | |||
@@ -330,7 +330,7 @@ | |||
330 | 330 | ||
331 | #define GIC_SH_RMASK_OFS 0x0300 | 331 | #define GIC_SH_RMASK_OFS 0x0300 |
332 | #define GIC_CLR_INTR_MASK(intr, val) \ | 332 | #define GIC_CLR_INTR_MASK(intr, val) \ |
333 | GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32)) | 333 | GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32))) |
334 | 334 | ||
335 | /* Register Map for Local Section */ | 335 | /* Register Map for Local Section */ |
336 | #define GIC_VPE_CTL_OFS 0x0000 | 336 | #define GIC_VPE_CTL_OFS 0x0000 |
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 363a14ee0ae5..1b5064dac007 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -1036,7 +1036,7 @@ enum soc_au1200_ints { | |||
1036 | #define USBD_INTSTAT 0xB020001C | 1036 | #define USBD_INTSTAT 0xB020001C |
1037 | # define USBDEV_INT_SOF (1 << 12) | 1037 | # define USBDEV_INT_SOF (1 << 12) |
1038 | # define USBDEV_INT_HF_BIT 6 | 1038 | # define USBDEV_INT_HF_BIT 6 |
1039 | # define USBDEV_INT_HF_MASK 0x3f << USBDEV_INT_HF_BIT) | 1039 | # define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT) |
1040 | # define USBDEV_INT_CMPLT_BIT 0 | 1040 | # define USBDEV_INT_CMPLT_BIT 0 |
1041 | # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT) | 1041 | # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT) |
1042 | #define USBD_CONFIG 0xB0200020 | 1042 | #define USBD_CONFIG 0xB0200020 |
diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h index ad17d7ce516a..44a67bf05dc1 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h +++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h | |||
@@ -355,6 +355,7 @@ void au1xxx_dbdma_dump(u32 chanid); | |||
355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); | 355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); |
356 | 356 | ||
357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); | 357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); |
358 | extern void au1xxx_ddma_del_device(u32 devid); | ||
358 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); | 359 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); |
359 | 360 | ||
360 | /* | 361 | /* |
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h index aa17f658f73c..a46f8e258e6b 100644 --- a/include/asm-mips/mipsregs.h +++ b/include/asm-mips/mipsregs.h | |||
@@ -765,6 +765,9 @@ do { \ | |||
765 | #define read_c0_index() __read_32bit_c0_register($0, 0) | 765 | #define read_c0_index() __read_32bit_c0_register($0, 0) |
766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) | 766 | #define write_c0_index(val) __write_32bit_c0_register($0, 0, val) |
767 | 767 | ||
768 | #define read_c0_random() __read_32bit_c0_register($1, 0) | ||
769 | #define write_c0_random(val) __write_32bit_c0_register($1, 0, val) | ||
770 | |||
768 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) | 771 | #define read_c0_entrylo0() __read_ulong_c0_register($2, 0) |
769 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) | 772 | #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) |
770 | 773 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 2f597eea4448..6a0edf72ffbc 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte) | |||
239 | static inline pte_t pte_mkyoung(pte_t pte) | 239 | static inline pte_t pte_mkyoung(pte_t pte) |
240 | { | 240 | { |
241 | pte.pte_low |= _PAGE_ACCESSED; | 241 | pte.pte_low |= _PAGE_ACCESSED; |
242 | if (pte.pte_low & _PAGE_READ) | 242 | if (pte.pte_low & _PAGE_READ) { |
243 | pte.pte_low |= _PAGE_SILENT_READ; | 243 | pte.pte_low |= _PAGE_SILENT_READ; |
244 | pte.pte_high |= _PAGE_SILENT_READ; | 244 | pte.pte_high |= _PAGE_SILENT_READ; |
245 | } | ||
245 | return pte; | 246 | return pte; |
246 | } | 247 | } |
247 | #else | 248 | #else |
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h index 20b666022dcb..4ca3063ed2ce 100644 --- a/include/asm-mips/rtlx.h +++ b/include/asm-mips/rtlx.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __ASM_RTLX_H | 6 | #ifndef __ASM_RTLX_H_ |
7 | #define __ASM_RTLX_H_ | 7 | #define __ASM_RTLX_H_ |
8 | 8 | ||
9 | #include <irq.h> | 9 | #include <irq.h> |
diff --git a/include/asm-mn10300/ipcbuf.h b/include/asm-mn10300/ipcbuf.h index efbbef8d1c69..f6f63d448272 100644 --- a/include/asm-mn10300/ipcbuf.h +++ b/include/asm-mn10300/ipcbuf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | #ifndef _ASM_IPCBUF_H_ | 1 | #ifndef _ASM_IPCBUF_H |
2 | #define _ASM_IPCBUF_H | 2 | #define _ASM_IPCBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h index cc3ec1bd8919..e9639ccc3fce 100644 --- a/include/asm-parisc/checksum.h +++ b/include/asm-parisc/checksum.h | |||
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
65 | "2:\n" | 65 | "2:\n" |
66 | : "=r" (sum), "=r" (iph), "=r" (ihl) | 66 | : "=r" (sum), "=r" (iph), "=r" (ihl) |
67 | : "1" (iph), "2" (ihl) | 67 | : "1" (iph), "2" (ihl) |
68 | : "r19", "r20", "r21" ); | 68 | : "r19", "r20", "r21", "memory"); |
69 | 69 | ||
70 | return (__force __sum16)sum; | 70 | return (__force __sum16)sum; |
71 | } | 71 | } |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index e0062d73db1c..89189488e286 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -100,7 +100,7 @@ static inline type name(const volatile type __iomem *addr) \ | |||
100 | { \ | 100 | { \ |
101 | type ret; \ | 101 | type ret; \ |
102 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ | 102 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ |
103 | : "=r" (ret) : "r" (addr), "m" (*addr)); \ | 103 | : "=r" (ret) : "r" (addr), "m" (*addr) : "memory"); \ |
104 | return ret; \ | 104 | return ret; \ |
105 | } | 105 | } |
106 | 106 | ||
@@ -108,8 +108,8 @@ static inline type name(const volatile type __iomem *addr) \ | |||
108 | static inline void name(volatile type __iomem *addr, type val) \ | 108 | static inline void name(volatile type __iomem *addr, type val) \ |
109 | { \ | 109 | { \ |
110 | __asm__ __volatile__("sync;" insn \ | 110 | __asm__ __volatile__("sync;" insn \ |
111 | : "=m" (*addr) : "r" (val), "r" (addr)); \ | 111 | : "=m" (*addr) : "r" (val), "r" (addr) : "memory"); \ |
112 | IO_SET_SYNC_FLAG(); \ | 112 | IO_SET_SYNC_FLAG(); \ |
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||
@@ -333,7 +333,8 @@ static inline unsigned int name(unsigned int port) \ | |||
333 | " .long 3b,5b\n" \ | 333 | " .long 3b,5b\n" \ |
334 | ".previous" \ | 334 | ".previous" \ |
335 | : "=&r" (x) \ | 335 | : "=&r" (x) \ |
336 | : "r" (port + _IO_BASE)); \ | 336 | : "r" (port + _IO_BASE) \ |
337 | : "memory"); \ | ||
337 | return x; \ | 338 | return x; \ |
338 | } | 339 | } |
339 | 340 | ||
@@ -350,7 +351,8 @@ static inline void name(unsigned int val, unsigned int port) \ | |||
350 | " .long 0b,2b\n" \ | 351 | " .long 0b,2b\n" \ |
351 | " .long 1b,2b\n" \ | 352 | " .long 1b,2b\n" \ |
352 | ".previous" \ | 353 | ".previous" \ |
353 | : : "r" (val), "r" (port + _IO_BASE)); \ | 354 | : : "r" (val), "r" (port + _IO_BASE) \ |
355 | : "memory"); \ | ||
354 | } | 356 | } |
355 | 357 | ||
356 | __do_in_asm(_rec_inb, "lbzx") | 358 | __do_in_asm(_rec_inb, "lbzx") |
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h index b35a7e3ef978..5a21115228af 100644 --- a/include/asm-powerpc/kvm_ppc.h +++ b/include/asm-powerpc/kvm_ppc.h | |||
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
57 | 57 | ||
58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, | 58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, |
59 | struct kvm_vcpu *vcpu); | 59 | struct kvm_vcpu *vcpu); |
60 | extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
60 | 61 | ||
61 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, | 62 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, |
62 | u64 asid, u32 flags); | 63 | u64 asid, u32 flags); |
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h index 943c5a3fac8a..a4d0f876b427 100644 --- a/include/asm-powerpc/mpic.h +++ b/include/asm-powerpc/mpic.h | |||
@@ -428,12 +428,11 @@ extern void mpic_init(struct mpic *mpic); | |||
428 | */ | 428 | */ |
429 | 429 | ||
430 | 430 | ||
431 | /* Change/Read the priority of an interrupt. Default is 8 for irqs and | 431 | /* Change the priority of an interrupt. Default is 8 for irqs and |
432 | * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the | 432 | * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the |
433 | * IPI number is then the offset'ed (linux irq number mapped to the IPI) | 433 | * IPI number is then the offset'ed (linux irq number mapped to the IPI) |
434 | */ | 434 | */ |
435 | extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); | 435 | extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); |
436 | extern unsigned int mpic_irq_get_priority(unsigned int irq); | ||
437 | 436 | ||
438 | /* Setup a non-boot CPU */ | 437 | /* Setup a non-boot CPU */ |
439 | extern void mpic_setup_this_cpu(void); | 438 | extern void mpic_setup_this_cpu(void); |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index e0d4500d5f95..819e7d99ca0c 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
315 | asm volatile( \ | 315 | asm volatile( \ |
316 | " lctlg %1,%2,0(%0)\n" \ | 316 | " lctlg %1,%2,0(%0)\n" \ |
317 | : : "a" (&array), "i" (low), "i" (high), \ | 317 | : : "a" (&array), "i" (low), "i" (high), \ |
318 | "m" (*(addrtype *)(array))); \ | 318 | "m" (*(addrtype *)(&array))); \ |
319 | }) | 319 | }) |
320 | 320 | ||
321 | #define __ctl_store(array, low, high) ({ \ | 321 | #define __ctl_store(array, low, high) ({ \ |
322 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 322 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
323 | asm volatile( \ | 323 | asm volatile( \ |
324 | " stctg %2,%3,0(%1)\n" \ | 324 | " stctg %2,%3,0(%1)\n" \ |
325 | : "=m" (*(addrtype *)(array)) \ | 325 | : "=m" (*(addrtype *)(&array)) \ |
326 | : "a" (&array), "i" (low), "i" (high)); \ | 326 | : "a" (&array), "i" (low), "i" (high)); \ |
327 | }) | 327 | }) |
328 | 328 | ||
@@ -333,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
333 | asm volatile( \ | 333 | asm volatile( \ |
334 | " lctl %1,%2,0(%0)\n" \ | 334 | " lctl %1,%2,0(%0)\n" \ |
335 | : : "a" (&array), "i" (low), "i" (high), \ | 335 | : : "a" (&array), "i" (low), "i" (high), \ |
336 | "m" (*(addrtype *)(array))); \ | 336 | "m" (*(addrtype *)(&array))); \ |
337 | }) | 337 | }) |
338 | 338 | ||
339 | #define __ctl_store(array, low, high) ({ \ | 339 | #define __ctl_store(array, low, high) ({ \ |
340 | typedef struct { char _[sizeof(array)]; } addrtype; \ | 340 | typedef struct { char _[sizeof(array)]; } addrtype; \ |
341 | asm volatile( \ | 341 | asm volatile( \ |
342 | " stctl %2,%3,0(%1)\n" \ | 342 | " stctl %2,%3,0(%1)\n" \ |
343 | : "=m" (*(addrtype *)(array)) \ | 343 | : "=m" (*(addrtype *)(&array)) \ |
344 | : "a" (&array), "i" (low), "i" (high)); \ | 344 | : "a" (&array), "i" (low), "i" (high)); \ |
345 | }) | 345 | }) |
346 | 346 | ||
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 0e959e20e9a3..41c547656130 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -40,7 +40,13 @@ typedef __signed__ long saddr_t; | |||
40 | 40 | ||
41 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | 42 | ||
43 | typedef u64 dma64_addr_t; | ||
44 | #ifdef __s390x__ | ||
45 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | ||
46 | typedef u64 dma_addr_t; | ||
47 | #else | ||
43 | typedef u32 dma_addr_t; | 48 | typedef u32 dma_addr_t; |
49 | #endif | ||
44 | 50 | ||
45 | #ifndef __s390x__ | 51 | #ifndef __s390x__ |
46 | typedef union { | 52 | typedef union { |
diff --git a/include/asm-sh/checksum_32.h b/include/asm-sh/checksum_32.h index 4bc8357e8892..14b7ac2f0a07 100644 --- a/include/asm-sh/checksum_32.h +++ b/include/asm-sh/checksum_32.h | |||
@@ -109,7 +109,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
109 | will assume they contain their original values. */ | 109 | will assume they contain their original values. */ |
110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) | 110 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) |
111 | : "1" (iph), "2" (ihl) | 111 | : "1" (iph), "2" (ihl) |
112 | : "t"); | 112 | : "t", "memory"); |
113 | 113 | ||
114 | return csum_fold(sum); | 114 | return csum_fold(sum); |
115 | } | 115 | } |
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 4bc8cb187d11..24e42078f36f 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h | |||
@@ -66,18 +66,4 @@ extern int setjmp(jmp_buf __jmpb); | |||
66 | /* Forced breakpoint */ | 66 | /* Forced breakpoint */ |
67 | #define breakpoint() __asm__ __volatile__("trapa #0x3c") | 67 | #define breakpoint() __asm__ __volatile__("trapa #0x3c") |
68 | 68 | ||
69 | /* Taken from sh-stub.c of GDB 4.18 */ | ||
70 | static const char hexchars[] = "0123456789abcdef"; | ||
71 | |||
72 | /* Get high hex bits */ | ||
73 | static inline char highhex(const int x) | ||
74 | { | ||
75 | return hexchars[(x >> 4) & 0xf]; | ||
76 | } | ||
77 | |||
78 | /* Get low hex bits */ | ||
79 | static inline char lowhex(const int x) | ||
80 | { | ||
81 | return hexchars[x & 0xf]; | ||
82 | } | ||
83 | #endif | 69 | #endif |
diff --git a/include/asm-sparc/asi.h b/include/asm-sparc/asi.h index 58c3754da926..158f9b00d43f 100644 --- a/include/asm-sparc/asi.h +++ b/include/asm-sparc/asi.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: asi.h,v 1.18 1998/03/09 14:04:46 jj Exp $ */ | ||
2 | #ifndef _SPARC_ASI_H | 1 | #ifndef _SPARC_ASI_H |
3 | #define _SPARC_ASI_H | 2 | #define _SPARC_ASI_H |
4 | 3 | ||
diff --git a/include/asm-sparc/auxio.h b/include/asm-sparc/auxio.h index ee83aefb20dc..e552b8d68450 100644 --- a/include/asm-sparc/auxio.h +++ b/include/asm-sparc/auxio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: auxio.h,v 1.18 1997/11/07 15:01:45 jj Exp $ | 1 | /* |
2 | * auxio.h: Definitions and code for the Auxiliary I/O register. | 2 | * auxio.h: Definitions and code for the Auxiliary I/O register. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h index cb3cefab6e09..68b98a7e6454 100644 --- a/include/asm-sparc/bitops.h +++ b/include/asm-sparc/bitops.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bitops.h,v 1.67 2001/11/19 18:36:34 davem Exp $ | 1 | /* |
2 | * bitops.h: Bit string operations on the Sparc. | 2 | * bitops.h: Bit string operations on the Sparc. |
3 | * | 3 | * |
4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h index c2868d0f60b6..08277e6fb4cd 100644 --- a/include/asm-sparc/btfixup.h +++ b/include/asm-sparc/btfixup.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: btfixup.h,v 1.4 1998/03/09 14:04:43 jj Exp $ | 1 | /* |
2 | * asm-sparc/btfixup.h: Macros for boot time linking. | 2 | * asm-sparc/btfixup.h: Macros for boot time linking. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h index 34518ea7bf1b..d044ddb5a3cf 100644 --- a/include/asm-sparc/checksum.h +++ b/include/asm-sparc/checksum.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: checksum.h,v 1.33 2002/02/01 22:01:05 davem Exp $ */ | ||
2 | #ifndef __SPARC_CHECKSUM_H | 1 | #ifndef __SPARC_CHECKSUM_H |
3 | #define __SPARC_CHECKSUM_H | 2 | #define __SPARC_CHECKSUM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/clock.h b/include/asm-sparc/clock.h index e708e6b50d2b..2cf99dadec56 100644 --- a/include/asm-sparc/clock.h +++ b/include/asm-sparc/clock.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: clock.h,v 1.3 1995/11/25 02:31:25 davem Exp $ | 1 | /* |
2 | * clock.h: Definitions for clock operations on the Sparc. | 2 | * clock.h: Definitions for clock operations on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/contregs.h b/include/asm-sparc/contregs.h index 0e05afe02d44..48fa8a4ef357 100644 --- a/include/asm-sparc/contregs.h +++ b/include/asm-sparc/contregs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: contregs.h,v 1.8 2000/12/28 22:49:11 davem Exp $ */ | ||
2 | #ifndef _SPARC_CONTREGS_H | 1 | #ifndef _SPARC_CONTREGS_H |
3 | #define _SPARC_CONTREGS_H | 2 | #define _SPARC_CONTREGS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/cypress.h b/include/asm-sparc/cypress.h index 99599533efbc..95e9772ea394 100644 --- a/include/asm-sparc/cypress.h +++ b/include/asm-sparc/cypress.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: cypress.h,v 1.6 1996/08/29 09:48:09 davem Exp $ | 1 | /* |
2 | * cypress.h: Cypress module specific definitions and defines. | 2 | * cypress.h: Cypress module specific definitions and defines. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/delay.h b/include/asm-sparc/delay.h index 48aa70eef997..bc9aba2bead6 100644 --- a/include/asm-sparc/delay.h +++ b/include/asm-sparc/delay.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: delay.h,v 1.11 2001/01/01 01:46:15 davem Exp $ | 1 | /* |
2 | * delay.h: Linux delay routines on the Sparc. | 2 | * delay.h: Linux delay routines on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). | 4 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). |
diff --git a/include/asm-sparc/ebus.h b/include/asm-sparc/ebus.h index 54652887c127..491f85d662df 100644 --- a/include/asm-sparc/ebus.h +++ b/include/asm-sparc/ebus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.h,v 1.2 1999/09/11 23:05:55 zaitcev Exp $ | 1 | /* |
2 | * ebus.h: PCI to Ebus pseudo driver software state. | 2 | * ebus.h: PCI to Ebus pseudo driver software state. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc/ecc.h b/include/asm-sparc/ecc.h index 8e27ceccb76d..ccb84b66fef1 100644 --- a/include/asm-sparc/ecc.h +++ b/include/asm-sparc/ecc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ecc.h,v 1.3 1996/04/25 06:12:57 davem Exp $ | 1 | /* |
2 | * ecc.h: Definitions and defines for the external cache/memory | 2 | * ecc.h: Definitions and defines for the external cache/memory |
3 | * controller on the sun4m. | 3 | * controller on the sun4m. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/eeprom.h b/include/asm-sparc/eeprom.h index a8ff7496ddf5..e17beeceb405 100644 --- a/include/asm-sparc/eeprom.h +++ b/include/asm-sparc/eeprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: eeprom.h,v 1.3 1995/11/25 02:31:38 davem Exp $ | 1 | /* |
2 | * eeprom.h: Definitions for the Sun eeprom. | 2 | * eeprom.h: Definitions for the Sun eeprom. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h index d2516eed3a38..d043f80bc2fd 100644 --- a/include/asm-sparc/elf.h +++ b/include/asm-sparc/elf.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: elf.h,v 1.22 2000/07/12 01:27:08 davem Exp $ */ | ||
2 | #ifndef __ASMSPARC_ELF_H | 1 | #ifndef __ASMSPARC_ELF_H |
3 | #define __ASMSPARC_ELF_H | 2 | #define __ASMSPARC_ELF_H |
4 | 3 | ||
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index 5ec546349fc8..07bd2d80257f 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: fcntl.h,v 1.16 2001/09/20 00:35:33 davem Exp $ */ | ||
2 | #ifndef _SPARC_FCNTL_H | 1 | #ifndef _SPARC_FCNTL_H |
3 | #define _SPARC_FCNTL_H | 2 | #define _SPARC_FCNTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h index e6532c3e09c9..7c35491a8b53 100644 --- a/include/asm-sparc/head.h +++ b/include/asm-sparc/head.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: head.h,v 1.39 2000/05/26 22:18:45 ecd Exp $ */ | ||
2 | #ifndef __SPARC_HEAD_H | 1 | #ifndef __SPARC_HEAD_H |
3 | #define __SPARC_HEAD_H | 2 | #define __SPARC_HEAD_H |
4 | 3 | ||
diff --git a/include/asm-sparc/idprom.h b/include/asm-sparc/idprom.h index 59083ed85232..41adb417a4e5 100644 --- a/include/asm-sparc/idprom.h +++ b/include/asm-sparc/idprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.h,v 1.6 1996/08/04 10:35:07 ecd Exp $ | 1 | /* |
2 | * idprom.h: Macros and defines for idprom routines | 2 | * idprom.h: Macros and defines for idprom routines |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index 243bf8e9a058..3a3e7bdb06b3 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -1,6 +1,3 @@ | |||
1 | /* | ||
2 | * $Id: io.h,v 1.30 2001/12/21 01:23:21 davem Exp $ | ||
3 | */ | ||
4 | #ifndef __SPARC_IO_H | 1 | #ifndef __SPARC_IO_H |
5 | #define __SPARC_IO_H | 2 | #define __SPARC_IO_H |
6 | 3 | ||
diff --git a/include/asm-sparc/ioctl.h b/include/asm-sparc/ioctl.h index e6fc4de19940..7d6bd51321b9 100644 --- a/include/asm-sparc/ioctl.h +++ b/include/asm-sparc/ioctl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctl.h,v 1.6 1999/12/01 23:58:36 davem Exp $ */ | ||
2 | #ifndef _SPARC_IOCTL_H | 1 | #ifndef _SPARC_IOCTL_H |
3 | #define _SPARC_IOCTL_H | 2 | #define _SPARC_IOCTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h index 631f15ffef73..f69fe7d84b3c 100644 --- a/include/asm-sparc/kdebug.h +++ b/include/asm-sparc/kdebug.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: kdebug.h,v 1.11 2000/06/04 06:23:53 anton Exp $ | 1 | /* |
2 | * kdebug.h: Defines and definitions for debugging the Linux kernel | 2 | * kdebug.h: Defines and definitions for debugging the Linux kernel |
3 | * under various kernel debuggers. | 3 | * under various kernel debuggers. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/machines.h b/include/asm-sparc/machines.h index d831350f5428..d6c6bf836206 100644 --- a/include/asm-sparc/machines.h +++ b/include/asm-sparc/machines.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: machines.h,v 1.4 1995/11/25 02:31:58 davem Exp $ | 1 | /* |
2 | * machines.h: Defines for taking apart the machine type value in the | 2 | * machines.h: Defines for taking apart the machine type value in the |
3 | * idprom and determining the kind of machine we are on. | 3 | * idprom and determining the kind of machine we are on. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h index ecacdf4075d7..bb5ae614b166 100644 --- a/include/asm-sparc/mbus.h +++ b/include/asm-sparc/mbus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mbus.h,v 1.9 1997/06/24 15:48:12 jj Exp $ | 1 | /* |
2 | * mbus.h: Various defines for MBUS modules. | 2 | * mbus.h: Various defines for MBUS modules. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/memreg.h b/include/asm-sparc/memreg.h index 5fb95c828da6..845ad2b39183 100644 --- a/include/asm-sparc/memreg.h +++ b/include/asm-sparc/memreg.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: memreg.h,v 1.8 1996/08/29 09:48:23 davem Exp $ */ | ||
2 | #ifndef _SPARC_MEMREG_H | 1 | #ifndef _SPARC_MEMREG_H |
3 | #define _SPARC_MEMREG_H | 2 | #define _SPARC_MEMREG_H |
4 | /* memreg.h: Definitions of the values found in the synchronous | 3 | /* memreg.h: Definitions of the values found in the synchronous |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 3d16b40bb8ef..fdfbbf0a4736 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mman.h,v 1.9 2000/03/15 02:44:23 davem Exp $ */ | ||
2 | #ifndef __SPARC_MMAN_H__ | 1 | #ifndef __SPARC_MMAN_H__ |
3 | #define __SPARC_MMAN_H__ | 2 | #define __SPARC_MMAN_H__ |
4 | 3 | ||
diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h index 958d0513a6d4..29aad11b8f00 100644 --- a/include/asm-sparc/mostek.h +++ b/include/asm-sparc/mostek.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mostek.h,v 1.13 2001/01/11 15:07:09 davem Exp $ | 1 | /* |
2 | * mostek.h: Describes the various Mostek time of day clock registers. | 2 | * mostek.h: Describes the various Mostek time of day clock registers. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/mpmbox.h b/include/asm-sparc/mpmbox.h index 0e1bc5801d8a..f8423039b242 100644 --- a/include/asm-sparc/mpmbox.h +++ b/include/asm-sparc/mpmbox.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mpmbox.h,v 1.4 1996/04/25 06:13:19 davem Exp $ | 1 | /* |
2 | * mpmbox.h: Interface and defines for the OpenProm mailbox | 2 | * mpmbox.h: Interface and defines for the OpenProm mailbox |
3 | * facilities for MP machines under Linux. | 3 | * facilities for MP machines under Linux. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/msi.h b/include/asm-sparc/msi.h index ff72cbd946a4..724ca5667052 100644 --- a/include/asm-sparc/msi.h +++ b/include/asm-sparc/msi.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: msi.h,v 1.3 1996/08/29 09:48:25 davem Exp $ | 1 | /* |
2 | * msi.h: Defines specific to the MBus - Sbus - Interface. | 2 | * msi.h: Defines specific to the MBus - Sbus - Interface. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/mxcc.h b/include/asm-sparc/mxcc.h index 128fe9708135..c0517bd05bde 100644 --- a/include/asm-sparc/mxcc.h +++ b/include/asm-sparc/mxcc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: mxcc.h,v 1.7 1997/04/20 14:11:46 ecd Exp $ | 1 | /* |
2 | * mxcc.h: Definitions of the Viking MXCC registers | 2 | * mxcc.h: Definitions of the Viking MXCC registers |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/namei.h b/include/asm-sparc/namei.h index 618344d89cc4..0646102fb020 100644 --- a/include/asm-sparc/namei.h +++ b/include/asm-sparc/namei.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: namei.h,v 1.16 2000/04/13 00:55:54 davem Exp $ | 1 | /* |
2 | * linux/include/asm-sparc/namei.h | 2 | * linux/include/asm-sparc/namei.h |
3 | * | 3 | * |
4 | * Routines to handle famous /usr/gnemul/s*. | 4 | * Routines to handle famous /usr/gnemul/s*. |
diff --git a/include/asm-sparc/obio.h b/include/asm-sparc/obio.h index 47854a2a12cf..1a7544ceb574 100644 --- a/include/asm-sparc/obio.h +++ b/include/asm-sparc/obio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: obio.h,v 1.4 1998/03/09 14:04:55 jj Exp $ | 1 | /* |
2 | * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d. | 2 | * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> | 4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> |
diff --git a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h index 12929a20f536..ed4b6bc2b102 100644 --- a/include/asm-sparc/openprom.h +++ b/include/asm-sparc/openprom.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: openprom.h,v 1.24 2000/06/04 06:23:53 anton Exp $ */ | ||
2 | #ifndef __SPARC_OPENPROM_H | 1 | #ifndef __SPARC_OPENPROM_H |
3 | #define __SPARC_OPENPROM_H | 2 | #define __SPARC_OPENPROM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h index 7becc846544a..61c3ca6a8ac3 100644 --- a/include/asm-sparc/oplib.h +++ b/include/asm-sparc/oplib.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: oplib.h,v 1.23 2001/12/21 00:54:31 davem Exp $ | 1 | /* |
2 | * oplib.h: Describes the interface and available routines in the | 2 | * oplib.h: Describes the interface and available routines in the |
3 | * Linux Prom library. | 3 | * Linux Prom library. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 1625a8c3e0d2..6aa9e4c910cf 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: page.h,v 1.55 2000/10/30 21:01:41 davem Exp $ | 1 | /* |
2 | * page.h: Various defines and such for MMU operations on the Sparc for | 2 | * page.h: Various defines and such for MMU operations on the Sparc for |
3 | * the Linux kernel. | 3 | * the Linux kernel. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/param.h b/include/asm-sparc/param.h index 86ba59af9d2c..9836d9a3cb9a 100644 --- a/include/asm-sparc/param.h +++ b/include/asm-sparc/param.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: param.h,v 1.4 2000/10/30 21:01:41 davem Exp $ */ | ||
2 | #ifndef _ASMSPARC_PARAM_H | 1 | #ifndef _ASMSPARC_PARAM_H |
3 | #define _ASMSPARC_PARAM_H | 2 | #define _ASMSPARC_PARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pbm.h b/include/asm-sparc/pbm.h index fedd9c6e875c..458a4916d14d 100644 --- a/include/asm-sparc/pbm.h +++ b/include/asm-sparc/pbm.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pbm.h,v 1.3 1999/12/20 17:06:35 zaitcev Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * pbm.h: PCI bus module pseudo driver software state | 3 | * pbm.h: PCI bus module pseudo driver software state |
4 | * Adopted from sparc64 by V. Roganov and G. Raiko | 4 | * Adopted from sparc64 by V. Roganov and G. Raiko |
diff --git a/include/asm-sparc/pcic.h b/include/asm-sparc/pcic.h index dedea14d87c8..f20ef562b265 100644 --- a/include/asm-sparc/pcic.h +++ b/include/asm-sparc/pcic.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pcic.h,v 1.4 1999/11/17 07:34:20 zaitcev Exp $ | 1 | /* |
2 | * pcic.h: JavaEngine 1 specific PCI definitions. | 2 | * pcic.h: JavaEngine 1 specific PCI definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1998 V. Roganov and G. Raiko | 4 | * Copyright (C) 1998 V. Roganov and G. Raiko |
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h index 6292cd00e5af..681582d26969 100644 --- a/include/asm-sparc/pgalloc.h +++ b/include/asm-sparc/pgalloc.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgalloc.h,v 1.16 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC_PGALLOC_H | 1 | #ifndef _SPARC_PGALLOC_H |
3 | #define _SPARC_PGALLOC_H | 2 | #define _SPARC_PGALLOC_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index d84af6d95f5c..60512296b2ca 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgtable.h,v 1.110 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC_PGTABLE_H | 1 | #ifndef _SPARC_PGTABLE_H |
3 | #define _SPARC_PGTABLE_H | 2 | #define _SPARC_PGTABLE_H |
4 | 3 | ||
diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h index edeb9811e728..808555fc1d58 100644 --- a/include/asm-sparc/pgtsrmmu.h +++ b/include/asm-sparc/pgtsrmmu.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsrmmu.h,v 1.31 2000/07/16 21:48:52 anton Exp $ | 1 | /* |
2 | * pgtsrmmu.h: SRMMU page table defines and code. | 2 | * pgtsrmmu.h: SRMMU page table defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/pgtsun4.h b/include/asm-sparc/pgtsun4.h index 60bda107f206..5a0d661fb82e 100644 --- a/include/asm-sparc/pgtsun4.h +++ b/include/asm-sparc/pgtsun4.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsun4.h,v 1.5 2000/06/05 06:08:46 anton Exp $ | 1 | /* |
2 | * pgtsun4.h: Sun4 specific pgtable.h defines and code. | 2 | * pgtsun4.h: Sun4 specific pgtable.h defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/pgtsun4c.h b/include/asm-sparc/pgtsun4c.h index f53b6dbc5fe3..aeb25e912179 100644 --- a/include/asm-sparc/pgtsun4c.h +++ b/include/asm-sparc/pgtsun4c.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtsun4c.h,v 1.37 2000/06/05 06:08:46 anton Exp $ | 1 | /* |
2 | * pgtsun4c.h: Sun4c specific pgtable.h defines and code. | 2 | * pgtsun4c.h: Sun4c specific pgtable.h defines and code. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/psr.h b/include/asm-sparc/psr.h index 213970477a24..b8c0e5f0a66b 100644 --- a/include/asm-sparc/psr.h +++ b/include/asm-sparc/psr.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: psr.h,v 1.15 1997/10/04 08:54:22 ecd Exp $ | 1 | /* |
2 | * psr.h: This file holds the macros for masking off various parts of | 2 | * psr.h: This file holds the macros for masking off various parts of |
3 | * the processor status register on the Sparc. This is valid | 3 | * the processor status register on the Sparc. This is valid |
4 | * for Version 8. On the V9 this is renamed to the PSTATE | 4 | * for Version 8. On the V9 this is renamed to the PSTATE |
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index 0afb867d6c1b..11f3bc2bb3f5 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ptrace.h,v 1.25 1997/03/04 16:27:25 jj Exp $ */ | ||
2 | #ifndef _SPARC_PTRACE_H | 1 | #ifndef _SPARC_PTRACE_H |
3 | #define _SPARC_PTRACE_H | 2 | #define _SPARC_PTRACE_H |
4 | 3 | ||
diff --git a/include/asm-sparc/resource.h b/include/asm-sparc/resource.h index 0514c304e130..985948a41299 100644 --- a/include/asm-sparc/resource.h +++ b/include/asm-sparc/resource.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: resource.h,v 1.12 2000/09/23 02:09:21 davem Exp $ | 1 | /* |
2 | * resource.h: Resource definitions. | 2 | * resource.h: Resource definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/ross.h b/include/asm-sparc/ross.h index f2c14b5080ed..ecb6e81786a6 100644 --- a/include/asm-sparc/ross.h +++ b/include/asm-sparc/ross.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ross.h,v 1.13 1998/01/07 06:49:11 baccala Exp $ | 1 | /* |
2 | * ross.h: Ross module specific definitions and defines. | 2 | * ross.h: Ross module specific definitions and defines. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/rtc.h b/include/asm-sparc/rtc.h index f4f261dde699..f9ecb1fe2ecd 100644 --- a/include/asm-sparc/rtc.h +++ b/include/asm-sparc/rtc.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: rtc.h,v 1.2 1996/08/21 23:17:39 ecd Exp $ | 1 | /* |
2 | * | ||
3 | * rtc.h: Definitions for access to the Mostek real time clock | 2 | * rtc.h: Definitions for access to the Mostek real time clock |
4 | * | 3 | * |
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) | 4 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) |
diff --git a/include/asm-sparc/sbi.h b/include/asm-sparc/sbi.h index 86a603ac7b20..5eb7f1965d33 100644 --- a/include/asm-sparc/sbi.h +++ b/include/asm-sparc/sbi.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sbi.h,v 1.2 1998/03/09 14:04:48 jj Exp $ | 1 | /* |
2 | * sbi.h: SBI (Sbus Interface on sun4d) definitions | 2 | * sbi.h: SBI (Sbus Interface on sun4d) definitions |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> | 4 | * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> |
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h index 27d076c46964..f1d2fe1c9a30 100644 --- a/include/asm-sparc/sbus.h +++ b/include/asm-sparc/sbus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sbus.h,v 1.22 2000/02/18 13:50:50 davem Exp $ | 1 | /* |
2 | * sbus.h: Defines for the Sun SBus. | 2 | * sbus.h: Defines for the Sun SBus. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/scatterlist.h b/include/asm-sparc/scatterlist.h index e08d3d775b08..c82609ca1d0f 100644 --- a/include/asm-sparc/scatterlist.h +++ b/include/asm-sparc/scatterlist.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: scatterlist.h,v 1.8 2001/12/17 07:05:15 davem Exp $ */ | ||
2 | #ifndef _SPARC_SCATTERLIST_H | 1 | #ifndef _SPARC_SCATTERLIST_H |
3 | #define _SPARC_SCATTERLIST_H | 2 | #define _SPARC_SCATTERLIST_H |
4 | 3 | ||
diff --git a/include/asm-sparc/shmparam.h b/include/asm-sparc/shmparam.h index bb93a6f74a38..59a1243c12f3 100644 --- a/include/asm-sparc/shmparam.h +++ b/include/asm-sparc/shmparam.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: shmparam.h,v 1.6 1999/12/09 10:32:41 davem Exp $ */ | ||
2 | #ifndef _ASMSPARC_SHMPARAM_H | 1 | #ifndef _ASMSPARC_SHMPARAM_H |
3 | #define _ASMSPARC_SHMPARAM_H | 2 | #define _ASMSPARC_SHMPARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc/sigcontext.h b/include/asm-sparc/sigcontext.h index 7fa2c7d01ab4..c5fb60dcbd75 100644 --- a/include/asm-sparc/sigcontext.h +++ b/include/asm-sparc/sigcontext.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: sigcontext.h,v 1.14 1999/09/06 08:22:05 jj Exp $ */ | ||
2 | #ifndef __SPARC_SIGCONTEXT_H | 1 | #ifndef __SPARC_SIGCONTEXT_H |
3 | #define __SPARC_SIGCONTEXT_H | 2 | #define __SPARC_SIGCONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h index 2c3ea8b22448..3c71af135c52 100644 --- a/include/asm-sparc/siginfo.h +++ b/include/asm-sparc/siginfo.h | |||
@@ -1,7 +1,3 @@ | |||
1 | /* $Id: siginfo.h,v 1.9 2002/02/08 03:57:18 davem Exp $ | ||
2 | * siginfo.c: | ||
3 | */ | ||
4 | |||
5 | #ifndef _SPARC_SIGINFO_H | 1 | #ifndef _SPARC_SIGINFO_H |
6 | #define _SPARC_SIGINFO_H | 2 | #define _SPARC_SIGINFO_H |
7 | 3 | ||
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index 94071c75701f..683657d6e685 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: signal.h,v 1.35 1999/09/06 08:22:04 jj Exp $ */ | ||
2 | #ifndef _ASMSPARC_SIGNAL_H | 1 | #ifndef _ASMSPARC_SIGNAL_H |
3 | #define _ASMSPARC_SIGNAL_H | 2 | #define _ASMSPARC_SIGNAL_H |
4 | 3 | ||
diff --git a/include/asm-sparc/smpprim.h b/include/asm-sparc/smpprim.h index e7b6d346ae10..eb849d862c64 100644 --- a/include/asm-sparc/smpprim.h +++ b/include/asm-sparc/smpprim.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: smpprim.h,v 1.5 1996/08/29 09:48:49 davem Exp $ | 1 | /* |
2 | * smpprim.h: SMP locking primitives on the Sparc | 2 | * smpprim.h: SMP locking primitives on the Sparc |
3 | * | 3 | * |
4 | * God knows we won't be actually using this code for some time | 4 | * God knows we won't be actually using this code for some time |
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h index a00e15df227c..bf50d0c2d583 100644 --- a/include/asm-sparc/socket.h +++ b/include/asm-sparc/socket.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: socket.h,v 1.17 2001/06/13 16:25:03 davem Exp $ */ | ||
2 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _ASM_SOCKET_H |
3 | #define _ASM_SOCKET_H | 2 | #define _ASM_SOCKET_H |
4 | 3 | ||
diff --git a/include/asm-sparc/stat.h b/include/asm-sparc/stat.h index a5b4272f2894..2299e1d5d94c 100644 --- a/include/asm-sparc/stat.h +++ b/include/asm-sparc/stat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: stat.h,v 1.12 2000/08/04 05:35:55 davem Exp $ */ | ||
2 | #ifndef _SPARC_STAT_H | 1 | #ifndef _SPARC_STAT_H |
3 | #define _SPARC_STAT_H | 2 | #define _SPARC_STAT_H |
4 | 3 | ||
diff --git a/include/asm-sparc/statfs.h b/include/asm-sparc/statfs.h index d623f144247d..304520fa8863 100644 --- a/include/asm-sparc/statfs.h +++ b/include/asm-sparc/statfs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: statfs.h,v 1.4 1996/06/07 00:41:05 ecd Exp $ */ | ||
2 | #ifndef _SPARC_STATFS_H | 1 | #ifndef _SPARC_STATFS_H |
3 | #define _SPARC_STATFS_H | 2 | #define _SPARC_STATFS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/string.h b/include/asm-sparc/string.h index cb1e923356c6..8d7c0dd4f299 100644 --- a/include/asm-sparc/string.h +++ b/include/asm-sparc/string.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: string.h,v 1.36 2001/12/21 00:54:31 davem Exp $ | 1 | /* |
2 | * string.h: External definitions for optimized assembly string | 2 | * string.h: External definitions for optimized assembly string |
3 | * routines for the Linux Kernel. | 3 | * routines for the Linux Kernel. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/sun4paddr.h b/include/asm-sparc/sun4paddr.h index d863bfd5f09a..d52985f19f42 100644 --- a/include/asm-sparc/sun4paddr.h +++ b/include/asm-sparc/sun4paddr.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sun4paddr.h,v 1.3 1998/07/28 16:53:27 jj Exp $ | 1 | /* |
2 | * sun4paddr.h: Various physical addresses on sun4 machines | 2 | * sun4paddr.h: Various physical addresses on sun4 machines |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) | 4 | * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) |
diff --git a/include/asm-sparc/sunbpp.h b/include/asm-sparc/sunbpp.h index 568db79b730d..92ee1a8ff3a2 100644 --- a/include/asm-sparc/sunbpp.h +++ b/include/asm-sparc/sunbpp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sunbpp.h,v 1.1 1999/08/08 14:09:49 shadow Exp $ | 1 | /* |
2 | * include/asm-sparc/sunbpp.h | 2 | * include/asm-sparc/sunbpp.h |
3 | */ | 3 | */ |
4 | 4 | ||
diff --git a/include/asm-sparc/sysen.h b/include/asm-sparc/sysen.h index 692fa6f2296a..6af34abde6e7 100644 --- a/include/asm-sparc/sysen.h +++ b/include/asm-sparc/sysen.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sysen.h,v 1.3 1995/11/25 02:32:58 davem Exp $ | 1 | /* |
2 | * sysen.h: Bit fields within the "System Enable" register accessed via | 2 | * sysen.h: Bit fields within the "System Enable" register accessed via |
3 | * the ASI_CONTROL address space at address AC_SYSENABLE. | 3 | * the ASI_CONTROL address space at address AC_SYSENABLE. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index 733d40504e1e..f7b4409c35ff 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: termios.h,v 1.32 2001/06/01 08:12:11 davem Exp $ */ | ||
2 | #ifndef _SPARC_TERMIOS_H | 1 | #ifndef _SPARC_TERMIOS_H |
3 | #define _SPARC_TERMIOS_H | 2 | #define _SPARC_TERMIOS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h index cb1fa1d1f184..d909565f9410 100644 --- a/include/asm-sparc/timer.h +++ b/include/asm-sparc/timer.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: timer.h,v 1.21 1999/04/20 13:22:51 anton Exp $ | 1 | /* |
2 | * timer.h: Definitions for the timer chips on the Sparc. | 2 | * timer.h: Definitions for the timer chips on the Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/traps.h b/include/asm-sparc/traps.h index f62c7f878ee1..bebdbf8f43a8 100644 --- a/include/asm-sparc/traps.h +++ b/include/asm-sparc/traps.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: traps.h,v 1.9 1998/03/09 14:04:53 jj Exp $ | 1 | /* |
2 | * traps.h: Format of entries for the Sparc trap table. | 2 | * traps.h: Format of entries for the Sparc trap table. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/tsunami.h b/include/asm-sparc/tsunami.h index 887add5c466b..5bbd1d523baa 100644 --- a/include/asm-sparc/tsunami.h +++ b/include/asm-sparc/tsunami.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: tsunami.h,v 1.5 1996/08/29 09:49:03 davem Exp $ | 1 | /* |
2 | * tsunami.h: Module specific definitions for Tsunami V8 Sparcs | 2 | * tsunami.h: Module specific definitions for Tsunami V8 Sparcs |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/turbosparc.h b/include/asm-sparc/turbosparc.h index 31d2350a5818..17c73282db0a 100644 --- a/include/asm-sparc/turbosparc.h +++ b/include/asm-sparc/turbosparc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: turbosparc.h,v 1.4 1998/08/16 16:02:42 ecd Exp $ | 1 | /* |
2 | * turbosparc.h: Defines specific to the TurboSparc module. | 2 | * turbosparc.h: Defines specific to the TurboSparc module. |
3 | * This is SRMMU stuff. | 3 | * This is SRMMU stuff. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 1b08ef860a66..07734f942405 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: types.h,v 1.13 2001/12/21 01:22:59 davem Exp $ */ | ||
2 | #ifndef _SPARC_TYPES_H | 1 | #ifndef _SPARC_TYPES_H |
3 | #define _SPARC_TYPES_H | 2 | #define _SPARC_TYPES_H |
4 | 3 | ||
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index 366b11696ee3..47d5619d43fa 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: uaccess.h,v 1.24 2001/10/30 04:32:24 davem Exp $ | 1 | /* |
2 | * uaccess.h: User space memore access functions. | 2 | * uaccess.h: User space memore access functions. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc/vac-ops.h b/include/asm-sparc/vac-ops.h index ab6f53b913ea..d10527611f11 100644 --- a/include/asm-sparc/vac-ops.h +++ b/include/asm-sparc/vac-ops.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: vac-ops.h,v 1.13 1998/01/30 10:59:59 jj Exp $ */ | ||
2 | #ifndef _SPARC_VAC_OPS_H | 1 | #ifndef _SPARC_VAC_OPS_H |
3 | #define _SPARC_VAC_OPS_H | 2 | #define _SPARC_VAC_OPS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h index 91097392c8cc..f6ca4779056c 100644 --- a/include/asm-sparc/vaddrs.h +++ b/include/asm-sparc/vaddrs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: vaddrs.h,v 1.27 2001/07/04 00:18:18 davem Exp $ */ | ||
2 | #ifndef _SPARC_VADDRS_H | 1 | #ifndef _SPARC_VADDRS_H |
3 | #define _SPARC_VADDRS_H | 2 | #define _SPARC_VADDRS_H |
4 | 3 | ||
diff --git a/include/asm-sparc/viking.h b/include/asm-sparc/viking.h index 7541da71b9d6..989930aeb093 100644 --- a/include/asm-sparc/viking.h +++ b/include/asm-sparc/viking.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: viking.h,v 1.19 1997/04/20 14:11:48 ecd Exp $ | 1 | /* |
2 | * viking.h: Defines specific to the GNU/Viking MBUS module. | 2 | * viking.h: Defines specific to the GNU/Viking MBUS module. |
3 | * This is SRMMU stuff. | 3 | * This is SRMMU stuff. |
4 | * | 4 | * |
diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h index 096f3d3d90c3..5b0a06dc3bcb 100644 --- a/include/asm-sparc/winmacro.h +++ b/include/asm-sparc/winmacro.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: winmacro.h,v 1.22 2000/05/09 17:40:15 davem Exp $ | 1 | /* |
2 | * winmacro.h: Window loading-unloading macros. | 2 | * winmacro.h: Window loading-unloading macros. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/apb.h b/include/asm-sparc64/apb.h index 80f0df289a66..8f3b57db810f 100644 --- a/include/asm-sparc64/apb.h +++ b/include/asm-sparc64/apb.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: apb.h,v 1.2 1998/04/01 20:41:49 ecd Exp $ | 1 | /* |
2 | * apb.h: Advanced PCI Bridge Configuration Registers and Bits | 2 | * apb.h: Advanced PCI Bridge Configuration Registers and Bits |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc64/asi.h b/include/asm-sparc64/asi.h index 662a21107ae6..bc57c405e7d3 100644 --- a/include/asm-sparc64/asi.h +++ b/include/asm-sparc64/asi.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: asi.h,v 1.5 2001/03/29 11:47:47 davem Exp $ */ | ||
2 | #ifndef _SPARC64_ASI_H | 1 | #ifndef _SPARC64_ASI_H |
3 | #define _SPARC64_ASI_H | 2 | #define _SPARC64_ASI_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/auxio.h b/include/asm-sparc64/auxio.h index 81a590a50a1f..c4100494c7a5 100644 --- a/include/asm-sparc64/auxio.h +++ b/include/asm-sparc64/auxio.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: auxio.h,v 1.3 2001/06/05 08:16:34 davem Exp $ | 1 | /* |
2 | * auxio.h: Definitions and code for the Auxiliary I/O registers. | 2 | * auxio.h: Definitions and code for the Auxiliary I/O registers. |
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/bbc.h b/include/asm-sparc64/bbc.h index 368fce4eedba..423a85800aae 100644 --- a/include/asm-sparc64/bbc.h +++ b/include/asm-sparc64/bbc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bbc.h,v 1.2 2001/03/26 23:47:18 davem Exp $ | 1 | /* |
2 | * bbc.h: Defines for BootBus Controller found on UltraSPARC-III | 2 | * bbc.h: Defines for BootBus Controller found on UltraSPARC-III |
3 | * systems. | 3 | * systems. |
4 | * | 4 | * |
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h index 11f9d8146cdf..bb87b8080220 100644 --- a/include/asm-sparc64/bitops.h +++ b/include/asm-sparc64/bitops.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: bitops.h,v 1.39 2002/01/30 01:40:00 davem Exp $ | 1 | /* |
2 | * bitops.h: Bit string operations on the V9. | 2 | * bitops.h: Bit string operations on the V9. |
3 | * | 3 | * |
4 | * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/chafsr.h b/include/asm-sparc64/chafsr.h index fd1688335ace..85c69b38220b 100644 --- a/include/asm-sparc64/chafsr.h +++ b/include/asm-sparc64/chafsr.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: chafsr.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_CHAFSR_H | 1 | #ifndef _SPARC64_CHAFSR_H |
3 | #define _SPARC64_CHAFSR_H | 2 | #define _SPARC64_CHAFSR_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/checksum.h b/include/asm-sparc64/checksum.h index 70a006da7634..b290564c8ce0 100644 --- a/include/asm-sparc64/checksum.h +++ b/include/asm-sparc64/checksum.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: checksum.h,v 1.19 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __SPARC64_CHECKSUM_H | 1 | #ifndef __SPARC64_CHECKSUM_H |
3 | #define __SPARC64_CHECKSUM_H | 2 | #define __SPARC64_CHECKSUM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/chmctrl.h b/include/asm-sparc64/chmctrl.h index 53047f9f6423..859b4a4b0d30 100644 --- a/include/asm-sparc64/chmctrl.h +++ b/include/asm-sparc64/chmctrl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: chmctrl.h,v 1.1 2001/03/29 11:43:28 davem Exp $ */ | ||
2 | #ifndef _SPARC64_CHMCTRL_H | 1 | #ifndef _SPARC64_CHMCTRL_H |
3 | #define _SPARC64_CHMCTRL_H | 2 | #define _SPARC64_CHMCTRL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/dcr.h b/include/asm-sparc64/dcr.h index e9a3f305815d..620c9ba642e9 100644 --- a/include/asm-sparc64/dcr.h +++ b/include/asm-sparc64/dcr.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: dcr.h,v 1.4 2001/03/09 17:56:37 davem Exp $ */ | ||
2 | #ifndef _SPARC64_DCR_H | 1 | #ifndef _SPARC64_DCR_H |
3 | #define _SPARC64_DCR_H | 2 | #define _SPARC64_DCR_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/display7seg.h b/include/asm-sparc64/display7seg.h index 955a3502218e..c066a8964eab 100644 --- a/include/asm-sparc64/display7seg.h +++ b/include/asm-sparc64/display7seg.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: display7seg.h,v 1.2 2000/08/02 06:22:35 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * display7seg - Driver interface for the 7-segment display | 3 | * display7seg - Driver interface for the 7-segment display |
4 | * present on Sun Microsystems CP1400 and CP1500 | 4 | * present on Sun Microsystems CP1400 and CP1500 |
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index a9fd06183972..9d4c024bd3b3 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: dma.h,v 1.21 2001/12/13 04:16:52 davem Exp $ | 1 | /* |
2 | * include/asm-sparc64/dma.h | 2 | * include/asm-sparc64/dma.h |
3 | * | 3 | * |
4 | * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 9c1c6db2a790..fcc62b97ced5 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ebus.h,v 1.10 2001/03/14 05:00:55 davem Exp $ | 1 | /* |
2 | * ebus.h: PCI to Ebus pseudo driver software state. | 2 | * ebus.h: PCI to Ebus pseudo driver software state. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) |
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h index 11c8e68d712a..0818a1308f4e 100644 --- a/include/asm-sparc64/elf.h +++ b/include/asm-sparc64/elf.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: elf.h,v 1.32 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __ASM_SPARC64_ELF_H | 1 | #ifndef __ASM_SPARC64_ELF_H |
3 | #define __ASM_SPARC64_ELF_H | 2 | #define __ASM_SPARC64_ELF_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/envctrl.h b/include/asm-sparc64/envctrl.h index 53a6653815eb..a5668a082b14 100644 --- a/include/asm-sparc64/envctrl.h +++ b/include/asm-sparc64/envctrl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: envctrl.h,v 1.3 2000/11/03 00:37:40 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * envctrl.h: Definitions for access to the i2c environment | 3 | * envctrl.h: Definitions for access to the i2c environment |
4 | * monitoring on Ultrasparc systems. | 4 | * monitoring on Ultrasparc systems. |
diff --git a/include/asm-sparc64/estate.h b/include/asm-sparc64/estate.h index a719c3d2f6b1..520c08560d1b 100644 --- a/include/asm-sparc64/estate.h +++ b/include/asm-sparc64/estate.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: estate.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_ESTATE_H | 1 | #ifndef _SPARC64_ESTATE_H |
3 | #define _SPARC64_ESTATE_H | 2 | #define _SPARC64_ESTATE_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index 111f6b3b8925..8a09ca7aa2f2 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: fcntl.h,v 1.12 2001/09/20 00:35:34 davem Exp $ */ | ||
2 | #ifndef _SPARC64_FCNTL_H | 1 | #ifndef _SPARC64_FCNTL_H |
3 | #define _SPARC64_FCNTL_H | 2 | #define _SPARC64_FCNTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h index 9e7f1b0d78b9..ddffcdfbc984 100644 --- a/include/asm-sparc64/fhc.h +++ b/include/asm-sparc64/fhc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: fhc.h,v 1.5 1999/09/21 14:39:29 davem Exp $ | 1 | /* |
2 | * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire. | 2 | * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire. |
3 | * | 3 | * |
4 | * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) |
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h index 67960a751f4d..10e9dabc4c41 100644 --- a/include/asm-sparc64/head.h +++ b/include/asm-sparc64/head.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: head.h,v 1.30 1997/08/08 08:34:33 jj Exp $ */ | ||
2 | #ifndef _SPARC64_HEAD_H | 1 | #ifndef _SPARC64_HEAD_H |
3 | #define _SPARC64_HEAD_H | 2 | #define _SPARC64_HEAD_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index c5fdabe0b42d..1282676da1cd 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: ide.h,v 1.21 2001/09/25 20:21:48 kanoj Exp $ | 1 | /* |
2 | * ide.h: Ultra/PCI specific IDE glue. | 2 | * ide.h: Ultra/PCI specific IDE glue. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/idprom.h b/include/asm-sparc64/idprom.h index 77fbf987385f..a363fa0a112a 100644 --- a/include/asm-sparc64/idprom.h +++ b/include/asm-sparc64/idprom.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: idprom.h,v 1.2 1997/04/04 00:50:16 davem Exp $ | 1 | /* |
2 | * idprom.h: Macros and defines for idprom routines | 2 | * idprom.h: Macros and defines for idprom routines |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index c299b853b5ba..3158960f3eb5 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -24,7 +24,8 @@ static inline u8 _inb(unsigned long addr) | |||
24 | 24 | ||
25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" | 25 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" |
26 | : "=r" (ret) | 26 | : "=r" (ret) |
27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 27 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
28 | : "memory"); | ||
28 | 29 | ||
29 | return ret; | 30 | return ret; |
30 | } | 31 | } |
@@ -35,7 +36,8 @@ static inline u16 _inw(unsigned long addr) | |||
35 | 36 | ||
36 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" | 37 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" |
37 | : "=r" (ret) | 38 | : "=r" (ret) |
38 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 39 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
40 | : "memory"); | ||
39 | 41 | ||
40 | return ret; | 42 | return ret; |
41 | } | 43 | } |
@@ -46,7 +48,8 @@ static inline u32 _inl(unsigned long addr) | |||
46 | 48 | ||
47 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" | 49 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" |
48 | : "=r" (ret) | 50 | : "=r" (ret) |
49 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 51 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
52 | : "memory"); | ||
50 | 53 | ||
51 | return ret; | 54 | return ret; |
52 | } | 55 | } |
@@ -55,21 +58,24 @@ static inline void _outb(u8 b, unsigned long addr) | |||
55 | { | 58 | { |
56 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" | 59 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" |
57 | : /* no outputs */ | 60 | : /* no outputs */ |
58 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 61 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
62 | : "memory"); | ||
59 | } | 63 | } |
60 | 64 | ||
61 | static inline void _outw(u16 w, unsigned long addr) | 65 | static inline void _outw(u16 w, unsigned long addr) |
62 | { | 66 | { |
63 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" | 67 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" |
64 | : /* no outputs */ | 68 | : /* no outputs */ |
65 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 69 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
70 | : "memory"); | ||
66 | } | 71 | } |
67 | 72 | ||
68 | static inline void _outl(u32 l, unsigned long addr) | 73 | static inline void _outl(u32 l, unsigned long addr) |
69 | { | 74 | { |
70 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" | 75 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" |
71 | : /* no outputs */ | 76 | : /* no outputs */ |
72 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 77 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
78 | : "memory"); | ||
73 | } | 79 | } |
74 | 80 | ||
75 | #define inb(__addr) (_inb((unsigned long)(__addr))) | 81 | #define inb(__addr) (_inb((unsigned long)(__addr))) |
@@ -128,7 +134,8 @@ static inline u8 _readb(const volatile void __iomem *addr) | |||
128 | 134 | ||
129 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" | 135 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" |
130 | : "=r" (ret) | 136 | : "=r" (ret) |
131 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 137 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
138 | : "memory"); | ||
132 | return ret; | 139 | return ret; |
133 | } | 140 | } |
134 | 141 | ||
@@ -137,7 +144,8 @@ static inline u16 _readw(const volatile void __iomem *addr) | |||
137 | 144 | ||
138 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" | 145 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" |
139 | : "=r" (ret) | 146 | : "=r" (ret) |
140 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 147 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
148 | : "memory"); | ||
141 | 149 | ||
142 | return ret; | 150 | return ret; |
143 | } | 151 | } |
@@ -147,7 +155,8 @@ static inline u32 _readl(const volatile void __iomem *addr) | |||
147 | 155 | ||
148 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" | 156 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" |
149 | : "=r" (ret) | 157 | : "=r" (ret) |
150 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 158 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
159 | : "memory"); | ||
151 | 160 | ||
152 | return ret; | 161 | return ret; |
153 | } | 162 | } |
@@ -157,7 +166,8 @@ static inline u64 _readq(const volatile void __iomem *addr) | |||
157 | 166 | ||
158 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" | 167 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" |
159 | : "=r" (ret) | 168 | : "=r" (ret) |
160 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 169 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
170 | : "memory"); | ||
161 | 171 | ||
162 | return ret; | 172 | return ret; |
163 | } | 173 | } |
@@ -166,28 +176,32 @@ static inline void _writeb(u8 b, volatile void __iomem *addr) | |||
166 | { | 176 | { |
167 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" | 177 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" |
168 | : /* no outputs */ | 178 | : /* no outputs */ |
169 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 179 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
180 | : "memory"); | ||
170 | } | 181 | } |
171 | 182 | ||
172 | static inline void _writew(u16 w, volatile void __iomem *addr) | 183 | static inline void _writew(u16 w, volatile void __iomem *addr) |
173 | { | 184 | { |
174 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" | 185 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" |
175 | : /* no outputs */ | 186 | : /* no outputs */ |
176 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 187 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
188 | : "memory"); | ||
177 | } | 189 | } |
178 | 190 | ||
179 | static inline void _writel(u32 l, volatile void __iomem *addr) | 191 | static inline void _writel(u32 l, volatile void __iomem *addr) |
180 | { | 192 | { |
181 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" | 193 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" |
182 | : /* no outputs */ | 194 | : /* no outputs */ |
183 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 195 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
196 | : "memory"); | ||
184 | } | 197 | } |
185 | 198 | ||
186 | static inline void _writeq(u64 q, volatile void __iomem *addr) | 199 | static inline void _writeq(u64 q, volatile void __iomem *addr) |
187 | { | 200 | { |
188 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" | 201 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" |
189 | : /* no outputs */ | 202 | : /* no outputs */ |
190 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); | 203 | : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L) |
204 | : "memory"); | ||
191 | } | 205 | } |
192 | 206 | ||
193 | #define readb(__addr) _readb(__addr) | 207 | #define readb(__addr) _readb(__addr) |
@@ -299,7 +313,8 @@ static inline u8 _sbus_readb(const volatile void __iomem *addr) | |||
299 | 313 | ||
300 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" | 314 | __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" |
301 | : "=r" (ret) | 315 | : "=r" (ret) |
302 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 316 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
317 | : "memory"); | ||
303 | 318 | ||
304 | return ret; | 319 | return ret; |
305 | } | 320 | } |
@@ -310,7 +325,8 @@ static inline u16 _sbus_readw(const volatile void __iomem *addr) | |||
310 | 325 | ||
311 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" | 326 | __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" |
312 | : "=r" (ret) | 327 | : "=r" (ret) |
313 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 328 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
329 | : "memory"); | ||
314 | 330 | ||
315 | return ret; | 331 | return ret; |
316 | } | 332 | } |
@@ -321,7 +337,8 @@ static inline u32 _sbus_readl(const volatile void __iomem *addr) | |||
321 | 337 | ||
322 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" | 338 | __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" |
323 | : "=r" (ret) | 339 | : "=r" (ret) |
324 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 340 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
341 | : "memory"); | ||
325 | 342 | ||
326 | return ret; | 343 | return ret; |
327 | } | 344 | } |
@@ -332,7 +349,8 @@ static inline u64 _sbus_readq(const volatile void __iomem *addr) | |||
332 | 349 | ||
333 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" | 350 | __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" |
334 | : "=r" (ret) | 351 | : "=r" (ret) |
335 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 352 | : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
353 | : "memory"); | ||
336 | 354 | ||
337 | return ret; | 355 | return ret; |
338 | } | 356 | } |
@@ -341,28 +359,32 @@ static inline void _sbus_writeb(u8 b, volatile void __iomem *addr) | |||
341 | { | 359 | { |
342 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" | 360 | __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" |
343 | : /* no outputs */ | 361 | : /* no outputs */ |
344 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 362 | : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
363 | : "memory"); | ||
345 | } | 364 | } |
346 | 365 | ||
347 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) | 366 | static inline void _sbus_writew(u16 w, volatile void __iomem *addr) |
348 | { | 367 | { |
349 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" | 368 | __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" |
350 | : /* no outputs */ | 369 | : /* no outputs */ |
351 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 370 | : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
371 | : "memory"); | ||
352 | } | 372 | } |
353 | 373 | ||
354 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) | 374 | static inline void _sbus_writel(u32 l, volatile void __iomem *addr) |
355 | { | 375 | { |
356 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" | 376 | __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" |
357 | : /* no outputs */ | 377 | : /* no outputs */ |
358 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 378 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
379 | : "memory"); | ||
359 | } | 380 | } |
360 | 381 | ||
361 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) | 382 | static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) |
362 | { | 383 | { |
363 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" | 384 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" |
364 | : /* no outputs */ | 385 | : /* no outputs */ |
365 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); | 386 | : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E) |
387 | : "memory"); | ||
366 | } | 388 | } |
367 | 389 | ||
368 | #define sbus_readb(__addr) _sbus_readb(__addr) | 390 | #define sbus_readb(__addr) _sbus_readb(__addr) |
diff --git a/include/asm-sparc64/ioctl.h b/include/asm-sparc64/ioctl.h index 253d0b57b316..d634c21b4724 100644 --- a/include/asm-sparc64/ioctl.h +++ b/include/asm-sparc64/ioctl.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctl.h,v 1.2 1998/10/15 05:40:38 jj Exp $ */ | ||
2 | #ifndef _SPARC64_IOCTL_H | 1 | #ifndef _SPARC64_IOCTL_H |
3 | #define _SPARC64_IOCTL_H | 2 | #define _SPARC64_IOCTL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h index c1be40647c99..94d1b75e512b 100644 --- a/include/asm-sparc64/ioctls.h +++ b/include/asm-sparc64/ioctls.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ioctls.h,v 1.7 1998/02/23 02:49:41 davem Exp $ */ | ||
2 | #ifndef _ASM_SPARC64_IOCTLS_H | 1 | #ifndef _ASM_SPARC64_IOCTLS_H |
3 | #define _ASM_SPARC64_IOCTLS_H | 2 | #define _ASM_SPARC64_IOCTLS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/lsu.h b/include/asm-sparc64/lsu.h index 79f109840c39..7190f8de90a0 100644 --- a/include/asm-sparc64/lsu.h +++ b/include/asm-sparc64/lsu.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: lsu.h,v 1.2 1997/04/04 00:50:22 davem Exp $ */ | ||
2 | #ifndef _SPARC64_LSU_H | 1 | #ifndef _SPARC64_LSU_H |
3 | #define _SPARC64_LSU_H | 2 | #define _SPARC64_LSU_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index 625be4d61baf..d2ae67cd1bdc 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mman.h,v 1.2 2000/03/15 02:44:26 davem Exp $ */ | ||
2 | #ifndef __SPARC64_MMAN_H__ | 1 | #ifndef __SPARC64_MMAN_H__ |
3 | #define __SPARC64_MMAN_H__ | 2 | #define __SPARC64_MMAN_H__ |
4 | 3 | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 9fc225ed5500..5693ab482606 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: mmu_context.h,v 1.54 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef __SPARC64_MMU_CONTEXT_H | 1 | #ifndef __SPARC64_MMU_CONTEXT_H |
3 | #define __SPARC64_MMU_CONTEXT_H | 2 | #define __SPARC64_MMU_CONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/namei.h b/include/asm-sparc64/namei.h index 275161f21213..cbc1b4c06891 100644 --- a/include/asm-sparc64/namei.h +++ b/include/asm-sparc64/namei.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: namei.h,v 1.17 2000/04/13 00:55:54 davem Exp $ | 1 | /* |
2 | * linux/include/asm-sparc64/namei.h | 2 | * linux/include/asm-sparc64/namei.h |
3 | * | 3 | * |
4 | * Routines to handle famous /usr/gnemul/s*. | 4 | * Routines to handle famous /usr/gnemul/s*. |
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h index 26ec046715c8..b69e4a8c9170 100644 --- a/include/asm-sparc64/openprom.h +++ b/include/asm-sparc64/openprom.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: openprom.h,v 1.9 2001/03/16 10:22:02 davem Exp $ */ | ||
2 | #ifndef __SPARC64_OPENPROM_H | 1 | #ifndef __SPARC64_OPENPROM_H |
3 | #define __SPARC64_OPENPROM_H | 2 | #define __SPARC64_OPENPROM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index 618117def0dc..93f0881b766e 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $Id: page.h,v 1.39 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | |||
3 | #ifndef _SPARC64_PAGE_H | 1 | #ifndef _SPARC64_PAGE_H |
4 | #define _SPARC64_PAGE_H | 2 | #define _SPARC64_PAGE_H |
5 | 3 | ||
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 3ee2d406373b..326de104d014 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pgalloc.h,v 1.30 2001/12/21 04:56:17 davem Exp $ */ | ||
2 | #ifndef _SPARC64_PGALLOC_H | 1 | #ifndef _SPARC64_PGALLOC_H |
3 | #define _SPARC64_PGALLOC_H | 2 | #define _SPARC64_PGALLOC_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 0e200e7acec7..b87017747b5d 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: pgtable.h,v 1.156 2002/02/09 19:49:31 davem Exp $ | 1 | /* |
2 | * pgtable.h: SpitFire page table operations. | 2 | * pgtable.h: SpitFire page table operations. |
3 | * | 3 | * |
4 | * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h index 2f5d126f7163..eaac842d88c3 100644 --- a/include/asm-sparc64/pil.h +++ b/include/asm-sparc64/pil.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pil.h,v 1.1 2002/01/23 11:27:36 davem Exp $ */ | ||
2 | #ifndef _SPARC64_PIL_H | 1 | #ifndef _SPARC64_PIL_H |
3 | #define _SPARC64_PIL_H | 2 | #define _SPARC64_PIL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h index 885b6a1dcae4..26b4e5255761 100644 --- a/include/asm-sparc64/processor.h +++ b/include/asm-sparc64/processor.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: processor.h,v 1.83 2002/02/10 06:04:33 davem Exp $ | 1 | /* |
2 | * include/asm-sparc64/processor.h | 2 | * include/asm-sparc64/processor.h |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/psrcompat.h b/include/asm-sparc64/psrcompat.h index 3614ca04753f..44b6327dbbf5 100644 --- a/include/asm-sparc64/psrcompat.h +++ b/include/asm-sparc64/psrcompat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: psrcompat.h,v 1.5 1998/10/06 09:28:39 jj Exp $ */ | ||
2 | #ifndef _SPARC64_PSRCOMPAT_H | 1 | #ifndef _SPARC64_PSRCOMPAT_H |
3 | #define _SPARC64_PSRCOMPAT_H | 2 | #define _SPARC64_PSRCOMPAT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/pstate.h b/include/asm-sparc64/pstate.h index 949aebaf991d..a26a53777bb0 100644 --- a/include/asm-sparc64/pstate.h +++ b/include/asm-sparc64/pstate.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: pstate.h,v 1.6 1997/06/25 07:39:45 jj Exp $ */ | ||
2 | #ifndef _SPARC64_PSTATE_H | 1 | #ifndef _SPARC64_PSTATE_H |
3 | #define _SPARC64_PSTATE_H | 2 | #define _SPARC64_PSTATE_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 90972a5ada59..b163da79bb6d 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h | |||
@@ -128,6 +128,17 @@ struct sparc_trapf { | |||
128 | 128 | ||
129 | #ifdef __KERNEL__ | 129 | #ifdef __KERNEL__ |
130 | 130 | ||
131 | struct global_reg_snapshot { | ||
132 | unsigned long tstate; | ||
133 | unsigned long tpc; | ||
134 | unsigned long tnpc; | ||
135 | unsigned long o7; | ||
136 | unsigned long i7; | ||
137 | struct thread_info *thread; | ||
138 | unsigned long pad1; | ||
139 | unsigned long pad2; | ||
140 | }; | ||
141 | |||
131 | #define __ARCH_WANT_COMPAT_SYS_PTRACE | 142 | #define __ARCH_WANT_COMPAT_SYS_PTRACE |
132 | 143 | ||
133 | #define force_successful_syscall_return() \ | 144 | #define force_successful_syscall_return() \ |
@@ -295,6 +306,20 @@ extern void __show_regs(struct pt_regs *); | |||
295 | #define SF_XARG5 0x58 | 306 | #define SF_XARG5 0x58 |
296 | #define SF_XXARG 0x5c | 307 | #define SF_XXARG 0x5c |
297 | 308 | ||
309 | #ifdef __KERNEL__ | ||
310 | |||
311 | /* global_reg_snapshot offsets */ | ||
312 | #define GR_SNAP_TSTATE 0x00 | ||
313 | #define GR_SNAP_TPC 0x08 | ||
314 | #define GR_SNAP_TNPC 0x10 | ||
315 | #define GR_SNAP_O7 0x18 | ||
316 | #define GR_SNAP_I7 0x20 | ||
317 | #define GR_SNAP_THREAD 0x28 | ||
318 | #define GR_SNAP_PAD1 0x30 | ||
319 | #define GR_SNAP_PAD2 0x38 | ||
320 | |||
321 | #endif /* __KERNEL__ */ | ||
322 | |||
298 | /* Stuff for the ptrace system call */ | 323 | /* Stuff for the ptrace system call */ |
299 | #define PTRACE_SPARC_DETACH 11 | 324 | #define PTRACE_SPARC_DETACH 11 |
300 | #define PTRACE_GETREGS 12 | 325 | #define PTRACE_GETREGS 12 |
diff --git a/include/asm-sparc64/reg.h b/include/asm-sparc64/reg.h index fc68f90181b3..77aa4804a60d 100644 --- a/include/asm-sparc64/reg.h +++ b/include/asm-sparc64/reg.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: reg.h,v 1.6 1999/09/06 08:22:10 jj Exp $ | 1 | /* |
2 | * linux/asm-sparc64/reg.h | 2 | * linux/asm-sparc64/reg.h |
3 | * Layout of the registers as expected by gdb on the Sparc | 3 | * Layout of the registers as expected by gdb on the Sparc |
4 | * we should replace the user.h definitions with those in | 4 | * we should replace the user.h definitions with those in |
diff --git a/include/asm-sparc64/resource.h b/include/asm-sparc64/resource.h index aa469795a6b0..4f08fb5e4ca4 100644 --- a/include/asm-sparc64/resource.h +++ b/include/asm-sparc64/resource.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: resource.h,v 1.8 2000/09/23 02:09:21 davem Exp $ | 1 | /* |
2 | * resource.h: Resource definitions. | 2 | * resource.h: Resource definitions. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/rtc.h b/include/asm-sparc64/rtc.h index cb17334595c9..f9ecb1fe2ecd 100644 --- a/include/asm-sparc64/rtc.h +++ b/include/asm-sparc64/rtc.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* $Id: rtc.h,v 1.1 1996/12/26 14:22:35 davem Exp $ | 1 | /* |
2 | * | ||
3 | * rtc.h: Definitions for access to the Mostek real time clock | 2 | * rtc.h: Definitions for access to the Mostek real time clock |
4 | * | 3 | * |
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) | 4 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) |
diff --git a/include/asm-sparc64/rwsem.h b/include/asm-sparc64/rwsem.h index 1294b7ce5d06..1dc129ac2feb 100644 --- a/include/asm-sparc64/rwsem.h +++ b/include/asm-sparc64/rwsem.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: rwsem.h,v 1.5 2001/11/18 00:12:56 davem Exp $ | 1 | /* |
2 | * rwsem.h: R/W semaphores implemented using CAS | 2 | * rwsem.h: R/W semaphores implemented using CAS |
3 | * | 3 | * |
4 | * Written by David S. Miller (davem@redhat.com), 2001. | 4 | * Written by David S. Miller (davem@redhat.com), 2001. |
diff --git a/include/asm-sparc64/scatterlist.h b/include/asm-sparc64/scatterlist.h index 6df23f070b1a..81bd058f9382 100644 --- a/include/asm-sparc64/scatterlist.h +++ b/include/asm-sparc64/scatterlist.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: scatterlist.h,v 1.11 2001/12/17 07:05:15 davem Exp $ */ | ||
2 | #ifndef _SPARC64_SCATTERLIST_H | 1 | #ifndef _SPARC64_SCATTERLIST_H |
3 | #define _SPARC64_SCATTERLIST_H | 2 | #define _SPARC64_SCATTERLIST_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h index 8c66fded8a32..1ed0d6701a9b 100644 --- a/include/asm-sparc64/shmparam.h +++ b/include/asm-sparc64/shmparam.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: shmparam.h,v 1.5 2001/09/24 21:17:57 kanoj Exp $ */ | ||
2 | #ifndef _ASMSPARC64_SHMPARAM_H | 1 | #ifndef _ASMSPARC64_SHMPARAM_H |
3 | #define _ASMSPARC64_SHMPARAM_H | 2 | #define _ASMSPARC64_SHMPARAM_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h index d8073373db8c..1c868d680cfc 100644 --- a/include/asm-sparc64/sigcontext.h +++ b/include/asm-sparc64/sigcontext.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: sigcontext.h,v 1.12 1999/09/06 08:22:09 jj Exp $ */ | ||
2 | #ifndef __SPARC64_SIGCONTEXT_H | 1 | #ifndef __SPARC64_SIGCONTEXT_H |
3 | #define __SPARC64_SIGCONTEXT_H | 2 | #define __SPARC64_SIGCONTEXT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index c49f32d38707..2a7c7934ac0a 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: signal.h,v 1.9 1999/09/06 08:22:11 jj Exp $ */ | ||
2 | #ifndef _ASMSPARC64_SIGNAL_H | 1 | #ifndef _ASMSPARC64_SIGNAL_H |
3 | #define _ASMSPARC64_SIGNAL_H | 2 | #define _ASMSPARC64_SIGNAL_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 1c1c5ea5cea5..cd0311b2e19d 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* smp.h: Sparc64 specific SMP stuff. | 1 | /* smp.h: Sparc64 specific SMP stuff. |
2 | * | 2 | * |
3 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _SPARC64_SMP_H | 6 | #ifndef _SPARC64_SMP_H |
@@ -44,6 +44,8 @@ extern int hard_smp_processor_id(void); | |||
44 | extern void smp_fill_in_sib_core_maps(void); | 44 | extern void smp_fill_in_sib_core_maps(void); |
45 | extern void cpu_play_dead(void); | 45 | extern void cpu_play_dead(void); |
46 | 46 | ||
47 | extern void smp_fetch_global_regs(void); | ||
48 | |||
47 | #ifdef CONFIG_HOTPLUG_CPU | 49 | #ifdef CONFIG_HOTPLUG_CPU |
48 | extern int __cpu_disable(void); | 50 | extern int __cpu_disable(void); |
49 | extern void __cpu_die(unsigned int cpu); | 51 | extern void __cpu_die(unsigned int cpu); |
@@ -55,6 +57,7 @@ extern void __cpu_die(unsigned int cpu); | |||
55 | 57 | ||
56 | #define hard_smp_processor_id() 0 | 58 | #define hard_smp_processor_id() 0 |
57 | #define smp_fill_in_sib_core_maps() do { } while (0) | 59 | #define smp_fill_in_sib_core_maps() do { } while (0) |
60 | #define smp_fetch_global_regs() do { } while (0) | ||
58 | 61 | ||
59 | #endif /* !(CONFIG_SMP) */ | 62 | #endif /* !(CONFIG_SMP) */ |
60 | 63 | ||
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h index 8cf071fae3eb..5af688f56716 100644 --- a/include/asm-sparc64/socket.h +++ b/include/asm-sparc64/socket.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: socket.h,v 1.10 2001/06/13 16:25:03 davem Exp $ */ | ||
2 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _ASM_SOCKET_H |
3 | #define _ASM_SOCKET_H | 2 | #define _ASM_SOCKET_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h index 48b50b5e35b0..07bafd31e33c 100644 --- a/include/asm-sparc64/starfire.h +++ b/include/asm-sparc64/starfire.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: starfire.h,v 1.2 2001/07/04 00:18:18 davem Exp $ | 1 | /* |
2 | * starfire.h: Group all starfire specific code together. | 2 | * starfire.h: Group all starfire specific code together. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Anton Blanchard (anton@samba.org) | 4 | * Copyright (C) 2000 Anton Blanchard (anton@samba.org) |
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h index 128c27e57f0b..9650fdea847f 100644 --- a/include/asm-sparc64/stat.h +++ b/include/asm-sparc64/stat.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: stat.h,v 1.7 2000/08/04 05:35:55 davem Exp $ */ | ||
2 | #ifndef _SPARC64_STAT_H | 1 | #ifndef _SPARC64_STAT_H |
3 | #define _SPARC64_STAT_H | 2 | #define _SPARC64_STAT_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/statfs.h b/include/asm-sparc64/statfs.h index 185b6c481b24..79b3c890a5fa 100644 --- a/include/asm-sparc64/statfs.h +++ b/include/asm-sparc64/statfs.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: statfs.h,v 1.2 1997/04/14 17:05:22 jj Exp $ */ | ||
2 | #ifndef _SPARC64_STATFS_H | 1 | #ifndef _SPARC64_STATFS_H |
3 | #define _SPARC64_STATFS_H | 2 | #define _SPARC64_STATFS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h index c7d88622cb27..43161f2d17eb 100644 --- a/include/asm-sparc64/string.h +++ b/include/asm-sparc64/string.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: string.h,v 1.20 2001/09/27 04:36:24 kanoj Exp $ | 1 | /* |
2 | * string.h: External definitions for optimized assembly string | 2 | * string.h: External definitions for optimized assembly string |
3 | * routines for the Linux Kernel. | 3 | * routines for the Linux Kernel. |
4 | * | 4 | * |
diff --git a/include/asm-sparc64/sunbpp.h b/include/asm-sparc64/sunbpp.h index b441cc9c426c..8e171b7a9f4f 100644 --- a/include/asm-sparc64/sunbpp.h +++ b/include/asm-sparc64/sunbpp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: sunbpp.h,v 1.1 1999/08/13 06:21:44 shadow Exp $ | 1 | /* |
2 | * include/asm-sparc64/sunbpp.h | 2 | * include/asm-sparc64/sunbpp.h |
3 | */ | 3 | */ |
4 | 4 | ||
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index cacbea171ad7..1f5dab25dda5 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: termios.h,v 1.11 2001/06/01 08:12:11 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TERMIOS_H | 1 | #ifndef _SPARC64_TERMIOS_H |
3 | #define _SPARC64_TERMIOS_H | 2 | #define _SPARC64_TERMIOS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h index 52d67d394107..0ba199587e07 100644 --- a/include/asm-sparc64/ttable.h +++ b/include/asm-sparc64/ttable.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: ttable.h,v 1.18 2002/02/09 19:49:32 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TTABLE_H | 1 | #ifndef _SPARC64_TTABLE_H |
3 | #define _SPARC64_TTABLE_H | 2 | #define _SPARC64_TTABLE_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index 5dbe04f4044a..b27ccc85202f 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: types.h,v 1.4 2001/10/09 02:24:35 davem Exp $ */ | ||
2 | #ifndef _SPARC64_TYPES_H | 1 | #ifndef _SPARC64_TYPES_H |
3 | #define _SPARC64_TYPES_H | 2 | #define _SPARC64_TYPES_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index d8547b87e730..5fcbaf68c3f6 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id: uaccess.h,v 1.35 2002/02/09 19:49:31 davem Exp $ */ | ||
2 | #ifndef _ASM_UACCESS_H | 1 | #ifndef _ASM_UACCESS_H |
3 | #define _ASM_UACCESS_H | 2 | #define _ASM_UACCESS_H |
4 | 3 | ||
diff --git a/include/asm-sparc64/uctx.h b/include/asm-sparc64/uctx.h index 6eaf16ef23f6..dc937c75ffdd 100644 --- a/include/asm-sparc64/uctx.h +++ b/include/asm-sparc64/uctx.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: uctx.h,v 1.1 1997/06/18 16:51:58 davem Exp $ | 1 | /* |
2 | * uctx.h: Sparc64 {set,get}context() register state layouts. | 2 | * uctx.h: Sparc64 {set,get}context() register state layouts. |
3 | * | 3 | * |
4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) |
diff --git a/include/asm-sparc64/utrap.h b/include/asm-sparc64/utrap.h index 81b0ebf3736c..e49e5c46ad68 100644 --- a/include/asm-sparc64/utrap.h +++ b/include/asm-sparc64/utrap.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: utrap.h,v 1.1 1997/10/14 16:21:31 jj Exp $ | 1 | /* |
2 | * include/asm-sparc64/utrap.h | 2 | * include/asm-sparc64/utrap.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
diff --git a/include/asm-sparc64/watchdog.h b/include/asm-sparc64/watchdog.h index 4d5b03b60e4d..5baf2d3919cf 100644 --- a/include/asm-sparc64/watchdog.h +++ b/include/asm-sparc64/watchdog.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: watchdog.h,v 1.1 2001/01/18 04:47:44 davem Exp $ | 1 | /* |
2 | * | 2 | * |
3 | * watchdog - Driver interface for the hardware watchdog timers | 3 | * watchdog - Driver interface for the hardware watchdog timers |
4 | * present on Sun Microsystems boardsets | 4 | * present on Sun Microsystems boardsets |
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 6686fc524ca1..54f42e8b0105 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -22,16 +22,10 @@ extern void force_flush_all(void); | |||
22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 22 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
23 | { | 23 | { |
24 | /* | 24 | /* |
25 | * This is called by fs/exec.c and fs/aio.c. In the first case, for an | 25 | * This is called by fs/exec.c and sys_unshare() |
26 | * exec, we don't need to do anything as we're called from userspace | 26 | * when the new ->mm is used for the first time. |
27 | * and thus going to use a new host PID. In the second, we're called | ||
28 | * from a kernel thread, and thus need to go doing the mmap's on the | ||
29 | * host. Since they're very expensive, we want to avoid that as far as | ||
30 | * possible. | ||
31 | */ | 27 | */ |
32 | if (old != new && (current->flags & PF_BORROWED_MM)) | 28 | __switch_mm(&new->context.id); |
33 | __switch_mm(&new->context.id); | ||
34 | |||
35 | arch_dup_mmap(old, new); | 29 | arch_dup_mmap(old, new); |
36 | } | 30 | } |
37 | 31 | ||
diff --git a/include/asm-v850/clinkage.h b/include/asm-v850/clinkage.h index 2b622adccae5..c389691d6f86 100644 --- a/include/asm-v850/clinkage.h +++ b/include/asm-v850/clinkage.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * Written by Miles Bader <miles@gnu.org> | 11 | * Written by Miles Bader <miles@gnu.org> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifndef __CLINKAGE_H__ | 14 | #ifndef __V850_CLINKAGE_H__ |
15 | #define __V850_CLINKAGE_H__ | 15 | #define __V850_CLINKAGE_H__ |
16 | 16 | ||
17 | #include <asm/macrology.h> | 17 | #include <asm/macrology.h> |
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h index 6b722d315936..37672f79dcc8 100644 --- a/include/asm-x86/i387.h +++ b/include/asm-x86/i387.h | |||
@@ -193,6 +193,8 @@ static inline int restore_i387(struct _fpstate __user *buf) | |||
193 | 193 | ||
194 | #else /* CONFIG_X86_32 */ | 194 | #else /* CONFIG_X86_32 */ |
195 | 195 | ||
196 | extern void finit(void); | ||
197 | |||
196 | static inline void tolerant_fwait(void) | 198 | static inline void tolerant_fwait(void) |
197 | { | 199 | { |
198 | asm volatile("fnclex ; fwait"); | 200 | asm volatile("fnclex ; fwait"); |
diff --git a/include/asm-x86/kvm_x86_emulate.h b/include/asm-x86/kvm_x86_emulate.h index d6337f941c98..b877bbd2d3a7 100644 --- a/include/asm-x86/kvm_x86_emulate.h +++ b/include/asm-x86/kvm_x86_emulate.h | |||
@@ -135,6 +135,7 @@ struct decode_cache { | |||
135 | u8 modrm_rm; | 135 | u8 modrm_rm; |
136 | u8 use_modrm_ea; | 136 | u8 use_modrm_ea; |
137 | unsigned long modrm_ea; | 137 | unsigned long modrm_ea; |
138 | void *modrm_ptr; | ||
138 | unsigned long modrm_val; | 139 | unsigned long modrm_val; |
139 | struct fetch_cache fetch; | 140 | struct fetch_cache fetch; |
140 | }; | 141 | }; |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index b381f4a5a0bd..dc936dddf161 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -10,8 +10,16 @@ | |||
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK) | 13 | #define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1) |
14 | #define PTE_MASK (_AT(long, PHYSICAL_PAGE_MASK)) | 14 | #define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1) |
15 | |||
16 | /* Cast PAGE_MASK to a signed type so that it is sign-extended if | ||
17 | virtual addresses are 32-bits but physical addresses are larger | ||
18 | (ie, 32-bit PAE). */ | ||
19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | ||
20 | |||
21 | /* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | ||
22 | #define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | ||
15 | 23 | ||
16 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | 24 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) |
17 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | 25 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) |
@@ -24,9 +32,6 @@ | |||
24 | /* to align the pointer to the (next) page boundary */ | 32 | /* to align the pointer to the (next) page boundary */ |
25 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 33 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
26 | 34 | ||
27 | #define __PHYSICAL_MASK _AT(phys_addr_t, (_AC(1,ULL) << __PHYSICAL_MASK_SHIFT) - 1) | ||
28 | #define __VIRTUAL_MASK ((_AC(1,UL) << __VIRTUAL_MASK_SHIFT) - 1) | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
31 | #include <linux/types.h> | 36 | #include <linux/types.h> |
32 | #endif | 37 | #endif |
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h index 8b4a9d44b7f4..c93dbb6c2624 100644 --- a/include/asm-x86/pgtable-3level.h +++ b/include/asm-x86/pgtable-3level.h | |||
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp) | |||
120 | write_cr3(pgd); | 120 | write_cr3(pgd); |
121 | } | 121 | } |
122 | 122 | ||
123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 123 | #define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK)) |
124 | 124 | ||
125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) | 125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK)) |
126 | 126 | ||
127 | 127 | ||
128 | /* Find an entry in the second-level page table.. */ | 128 | /* Find an entry in the second-level page table.. */ |
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte) | |||
160 | 160 | ||
161 | static inline unsigned long pte_pfn(pte_t pte) | 161 | static inline unsigned long pte_pfn(pte_t pte) |
162 | { | 162 | { |
163 | return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; | 163 | return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT; |
164 | } | 164 | } |
165 | 165 | ||
166 | /* | 166 | /* |
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 55c3a0e3a8ce..97c271b2910b 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -57,6 +57,7 @@ | |||
57 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ | 57 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ |
58 | _PAGE_DIRTY) | 58 | _PAGE_DIRTY) |
59 | 59 | ||
60 | /* Set of bits not changed in pte_modify */ | ||
60 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ | 61 | #define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ |
61 | _PAGE_ACCESSED | _PAGE_DIRTY) | 62 | _PAGE_ACCESSED | _PAGE_DIRTY) |
62 | 63 | ||
@@ -304,7 +305,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | |||
304 | return __pgprot(preservebits | addbits); | 305 | return __pgprot(preservebits | addbits); |
305 | } | 306 | } |
306 | 307 | ||
307 | #define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX)) | 308 | #define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK) |
308 | 309 | ||
309 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) | 310 | #define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) |
310 | 311 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index d7f0403bbecb..32ca03109a4c 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -88,7 +88,7 @@ extern unsigned long pg0[]; | |||
88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 88 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | 89 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) |
90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | 90 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) |
91 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 91 | #define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
92 | 92 | ||
93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 93 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
94 | 94 | ||
@@ -159,7 +159,7 @@ static inline int pud_large(pud_t pud) { return 0; } | |||
159 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | 159 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) |
160 | 160 | ||
161 | #define pmd_page_vaddr(pmd) \ | 161 | #define pmd_page_vaddr(pmd) \ |
162 | ((unsigned long)__va(pmd_val((pmd)) & PAGE_MASK)) | 162 | ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK)) |
163 | 163 | ||
164 | #if defined(CONFIG_HIGHPTE) | 164 | #if defined(CONFIG_HIGHPTE) |
165 | #define pte_offset_map(dir, address) \ | 165 | #define pte_offset_map(dir, address) \ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index efe83dcbd412..1cc50d22d735 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -151,19 +151,19 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
151 | 151 | ||
152 | #ifndef __ASSEMBLY__ | 152 | #ifndef __ASSEMBLY__ |
153 | 153 | ||
154 | static inline unsigned long pgd_bad(pgd_t pgd) | 154 | static inline int pgd_bad(pgd_t pgd) |
155 | { | 155 | { |
156 | return pgd_val(pgd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 156 | return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
157 | } | 157 | } |
158 | 158 | ||
159 | static inline unsigned long pud_bad(pud_t pud) | 159 | static inline int pud_bad(pud_t pud) |
160 | { | 160 | { |
161 | return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 161 | return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline unsigned long pmd_bad(pmd_t pmd) | 164 | static inline int pmd_bad(pmd_t pmd) |
165 | { | 165 | { |
166 | return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 166 | return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE; |
167 | } | 167 | } |
168 | 168 | ||
169 | #define pte_none(x) (!pte_val((x))) | 169 | #define pte_none(x) (!pte_val((x))) |
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h index 0c0674d94255..35c76ceb9f40 100644 --- a/include/asm-x86/tlbflush.h +++ b/include/asm-x86/tlbflush.h | |||
@@ -22,12 +22,23 @@ static inline void __native_flush_tlb(void) | |||
22 | 22 | ||
23 | static inline void __native_flush_tlb_global(void) | 23 | static inline void __native_flush_tlb_global(void) |
24 | { | 24 | { |
25 | unsigned long cr4 = read_cr4(); | 25 | unsigned long flags; |
26 | unsigned long cr4; | ||
26 | 27 | ||
28 | /* | ||
29 | * Read-modify-write to CR4 - protect it from preemption and | ||
30 | * from interrupts. (Use the raw variant because this code can | ||
31 | * be called from deep inside debugging code.) | ||
32 | */ | ||
33 | raw_local_irq_save(flags); | ||
34 | |||
35 | cr4 = read_cr4(); | ||
27 | /* clear PGE */ | 36 | /* clear PGE */ |
28 | write_cr4(cr4 & ~X86_CR4_PGE); | 37 | write_cr4(cr4 & ~X86_CR4_PGE); |
29 | /* write old PGE again and flush TLBs */ | 38 | /* write old PGE again and flush TLBs */ |
30 | write_cr4(cr4); | 39 | write_cr4(cr4); |
40 | |||
41 | raw_local_irq_restore(flags); | ||
31 | } | 42 | } |
32 | 43 | ||
33 | static inline void __native_flush_tlb_single(unsigned long addr) | 44 | static inline void __native_flush_tlb_single(unsigned long addr) |
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h index 01799305f02a..baf3a4dce28c 100644 --- a/include/asm-x86/xen/page.h +++ b/include/asm-x86/xen/page.h | |||
@@ -127,7 +127,7 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
127 | 127 | ||
128 | static inline unsigned long pte_mfn(pte_t pte) | 128 | static inline unsigned long pte_mfn(pte_t pte) |
129 | { | 129 | { |
130 | return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; | 130 | return (pte.pte & PTE_MASK) >> PAGE_SHIFT; |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) | 133 | static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index b7d81b2a9041..93b98856007a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -92,7 +92,6 @@ header-y += if_slip.h | |||
92 | header-y += if_strip.h | 92 | header-y += if_strip.h |
93 | header-y += if_tun.h | 93 | header-y += if_tun.h |
94 | header-y += if_tunnel.h | 94 | header-y += if_tunnel.h |
95 | header-y += in6.h | ||
96 | header-y += in_route.h | 95 | header-y += in_route.h |
97 | header-y += ioctl.h | 96 | header-y += ioctl.h |
98 | header-y += ip6_tunnel.h | 97 | header-y += ip6_tunnel.h |
@@ -105,7 +104,6 @@ header-y += ixjuser.h | |||
105 | header-y += jffs2.h | 104 | header-y += jffs2.h |
106 | header-y += keyctl.h | 105 | header-y += keyctl.h |
107 | header-y += limits.h | 106 | header-y += limits.h |
108 | header-y += dlm_plock.h | ||
109 | header-y += magic.h | 107 | header-y += magic.h |
110 | header-y += major.h | 108 | header-y += major.h |
111 | header-y += matroxfb.h | 109 | header-y += matroxfb.h |
@@ -190,6 +188,7 @@ unifdef-y += cyclades.h | |||
190 | unifdef-y += dccp.h | 188 | unifdef-y += dccp.h |
191 | unifdef-y += dirent.h | 189 | unifdef-y += dirent.h |
192 | unifdef-y += dlm.h | 190 | unifdef-y += dlm.h |
191 | unifdef-y += dlm_plock.h | ||
193 | unifdef-y += edd.h | 192 | unifdef-y += edd.h |
194 | unifdef-y += elf.h | 193 | unifdef-y += elf.h |
195 | unifdef-y += elfcore.h | 194 | unifdef-y += elfcore.h |
@@ -236,6 +235,7 @@ unifdef-y += if_vlan.h | |||
236 | unifdef-y += igmp.h | 235 | unifdef-y += igmp.h |
237 | unifdef-y += inet_diag.h | 236 | unifdef-y += inet_diag.h |
238 | unifdef-y += in.h | 237 | unifdef-y += in.h |
238 | unifdef-y += in6.h | ||
239 | unifdef-y += inotify.h | 239 | unifdef-y += inotify.h |
240 | unifdef-y += input.h | 240 | unifdef-y += input.h |
241 | unifdef-y += ip.h | 241 | unifdef-y += ip.h |
diff --git a/include/linux/atm.h b/include/linux/atm.h index 60136684e0af..c791ddd96939 100644 --- a/include/linux/atm.h +++ b/include/linux/atm.h | |||
@@ -16,14 +16,11 @@ | |||
16 | * documentation. Do not change them. | 16 | * documentation. Do not change them. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifdef __KERNEL__ | ||
20 | #include <linux/socket.h> | ||
21 | #include <linux/types.h> | ||
22 | #endif | ||
23 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
24 | #include <linux/atmapi.h> | 20 | #include <linux/atmapi.h> |
25 | #include <linux/atmsap.h> | 21 | #include <linux/atmsap.h> |
26 | #include <linux/atmioc.h> | 22 | #include <linux/atmioc.h> |
23 | #include <linux/types.h> | ||
27 | 24 | ||
28 | 25 | ||
29 | /* general ATM constants */ | 26 | /* general ATM constants */ |
@@ -212,7 +209,7 @@ struct sockaddr_atmsvc { | |||
212 | char pub[ATM_E164_LEN+1]; /* public address (E.164) */ | 209 | char pub[ATM_E164_LEN+1]; /* public address (E.164) */ |
213 | /* unused addresses must be bzero'ed */ | 210 | /* unused addresses must be bzero'ed */ |
214 | char lij_type; /* role in LIJ call; one of ATM_LIJ* */ | 211 | char lij_type; /* role in LIJ call; one of ATM_LIJ* */ |
215 | uint32_t lij_id; /* LIJ call identifier */ | 212 | __u32 lij_id; /* LIJ call identifier */ |
216 | } sas_addr __ATM_API_ALIGN; /* SVC address */ | 213 | } sas_addr __ATM_API_ALIGN; /* SVC address */ |
217 | }; | 214 | }; |
218 | 215 | ||
diff --git a/include/linux/atm_tcp.h b/include/linux/atm_tcp.h index 18787f9b2f19..375638f8554b 100644 --- a/include/linux/atm_tcp.h +++ b/include/linux/atm_tcp.h | |||
@@ -8,11 +8,9 @@ | |||
8 | #define LINUX_ATM_TCP_H | 8 | #define LINUX_ATM_TCP_H |
9 | 9 | ||
10 | #include <linux/atmapi.h> | 10 | #include <linux/atmapi.h> |
11 | 11 | #include <linux/atm.h> | |
12 | #ifdef __KERNEL__ | ||
13 | #include <linux/types.h> | ||
14 | #endif | ||
15 | #include <linux/atmioc.h> | 12 | #include <linux/atmioc.h> |
13 | #include <linux/types.h> | ||
16 | 14 | ||
17 | 15 | ||
18 | /* | 16 | /* |
@@ -20,9 +18,9 @@ | |||
20 | */ | 18 | */ |
21 | 19 | ||
22 | struct atmtcp_hdr { | 20 | struct atmtcp_hdr { |
23 | uint16_t vpi; | 21 | __u16 vpi; |
24 | uint16_t vci; | 22 | __u16 vci; |
25 | uint32_t length; /* ... of data part */ | 23 | __u32 length; /* ... of data part */ |
26 | }; | 24 | }; |
27 | 25 | ||
28 | /* | 26 | /* |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index b512e48f6d8e..ee0ed48e8348 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -99,6 +99,7 @@ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | |||
99 | extern void compute_creds(struct linux_binprm *binprm); | 99 | extern void compute_creds(struct linux_binprm *binprm); |
100 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 100 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); |
101 | extern int set_binfmt(struct linux_binfmt *new); | 101 | extern int set_binfmt(struct linux_binfmt *new); |
102 | extern void free_bprm(struct linux_binprm *); | ||
102 | 103 | ||
103 | #endif /* __KERNEL__ */ | 104 | #endif /* __KERNEL__ */ |
104 | #endif /* _LINUX_BINFMTS_H */ | 105 | #endif /* _LINUX_BINFMTS_H */ |
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 05e540d6963a..7ffe03f4693d 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h | |||
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte) | |||
10 | return byte_rev_table[byte]; | 10 | return byte_rev_table[byte]; |
11 | } | 11 | } |
12 | 12 | ||
13 | extern u16 bitrev16(u16 in); | ||
13 | extern u32 bitrev32(u32 in); | 14 | extern u32 bitrev32(u32 in); |
14 | 15 | ||
15 | #endif /* _LINUX_BITREV_H */ | 16 | #endif /* _LINUX_BITREV_H */ |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index cfc3147e5cf9..e3ef903aae88 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -55,6 +55,7 @@ enum blktrace_act { | |||
55 | enum blktrace_notify { | 55 | enum blktrace_notify { |
56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ | 56 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ |
57 | __BLK_TN_TIMESTAMP, /* include system clock */ | 57 | __BLK_TN_TIMESTAMP, /* include system clock */ |
58 | __BLK_TN_MESSAGE, /* Character string message */ | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | 61 | ||
@@ -79,6 +80,7 @@ enum blktrace_notify { | |||
79 | 80 | ||
80 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) | 81 | #define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) |
81 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) | 82 | #define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) |
83 | #define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY)) | ||
82 | 84 | ||
83 | #define BLK_IO_TRACE_MAGIC 0x65617400 | 85 | #define BLK_IO_TRACE_MAGIC 0x65617400 |
84 | #define BLK_IO_TRACE_VERSION 0x07 | 86 | #define BLK_IO_TRACE_VERSION 0x07 |
@@ -119,6 +121,7 @@ struct blk_trace { | |||
119 | int trace_state; | 121 | int trace_state; |
120 | struct rchan *rchan; | 122 | struct rchan *rchan; |
121 | unsigned long *sequence; | 123 | unsigned long *sequence; |
124 | unsigned char *msg_data; | ||
122 | u16 act_mask; | 125 | u16 act_mask; |
123 | u64 start_lba; | 126 | u64 start_lba; |
124 | u64 end_lba; | 127 | u64 end_lba; |
@@ -149,7 +152,28 @@ extern void blk_trace_shutdown(struct request_queue *); | |||
149 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); | 152 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); |
150 | extern int do_blk_trace_setup(struct request_queue *q, | 153 | extern int do_blk_trace_setup(struct request_queue *q, |
151 | char *name, dev_t dev, struct blk_user_trace_setup *buts); | 154 | char *name, dev_t dev, struct blk_user_trace_setup *buts); |
155 | extern void __trace_note_message(struct blk_trace *, const char *fmt, ...); | ||
152 | 156 | ||
157 | /** | ||
158 | * blk_add_trace_msg - Add a (simple) message to the blktrace stream | ||
159 | * @q: queue the io is for | ||
160 | * @fmt: format to print message in | ||
161 | * args... Variable argument list for format | ||
162 | * | ||
163 | * Description: | ||
164 | * Records a (simple) message onto the blktrace stream. | ||
165 | * | ||
166 | * NOTE: BLK_TN_MAX_MSG characters are output at most. | ||
167 | * NOTE: Can not use 'static inline' due to presence of var args... | ||
168 | * | ||
169 | **/ | ||
170 | #define blk_add_trace_msg(q, fmt, ...) \ | ||
171 | do { \ | ||
172 | struct blk_trace *bt = (q)->blk_trace; \ | ||
173 | if (unlikely(bt)) \ | ||
174 | __trace_note_message(bt, fmt, ##__VA_ARGS__); \ | ||
175 | } while (0) | ||
176 | #define BLK_TN_MAX_MSG 128 | ||
153 | 177 | ||
154 | /** | 178 | /** |
155 | * blk_add_trace_rq - Add a trace for a request oriented action | 179 | * blk_add_trace_rq - Add a trace for a request oriented action |
@@ -299,6 +323,8 @@ extern int blk_trace_remove(struct request_queue *q); | |||
299 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) | 323 | #define blk_trace_setup(q, name, dev, arg) (-ENOTTY) |
300 | #define blk_trace_startstop(q, start) (-ENOTTY) | 324 | #define blk_trace_startstop(q, start) (-ENOTTY) |
301 | #define blk_trace_remove(q) (-ENOTTY) | 325 | #define blk_trace_remove(q) (-ENOTTY) |
326 | #define blk_add_trace_msg(q, fmt, ...) do { } while (0) | ||
327 | |||
302 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ | 328 | #endif /* CONFIG_BLK_DEV_IO_TRACE */ |
303 | #endif /* __KERNEL__ */ | 329 | #endif /* __KERNEL__ */ |
304 | #endif | 330 | #endif |
diff --git a/include/linux/capability.h b/include/linux/capability.h index f4ea0dd9a618..fa830f8de032 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -31,11 +31,11 @@ struct task_struct; | |||
31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 | 31 | #define _LINUX_CAPABILITY_VERSION_1 0x19980330 |
32 | #define _LINUX_CAPABILITY_U32S_1 1 | 32 | #define _LINUX_CAPABILITY_U32S_1 1 |
33 | 33 | ||
34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 | 34 | #define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */ |
35 | #define _LINUX_CAPABILITY_U32S_2 2 | 35 | #define _LINUX_CAPABILITY_U32S_2 2 |
36 | 36 | ||
37 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2 | 37 | #define _LINUX_CAPABILITY_VERSION_3 0x20080522 |
38 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2 | 38 | #define _LINUX_CAPABILITY_U32S_3 2 |
39 | 39 | ||
40 | typedef struct __user_cap_header_struct { | 40 | typedef struct __user_cap_header_struct { |
41 | __u32 version; | 41 | __u32 version; |
@@ -77,10 +77,23 @@ struct vfs_cap_data { | |||
77 | } data[VFS_CAP_U32]; | 77 | } data[VFS_CAP_U32]; |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifndef __KERNEL__ |
81 | |||
82 | /* | ||
83 | * Backwardly compatible definition for source code - trapped in a | ||
84 | * 32-bit world. If you find you need this, please consider using | ||
85 | * libcap to untrap yourself... | ||
86 | */ | ||
87 | #define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1 | ||
88 | #define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1 | ||
89 | |||
90 | #else | ||
91 | |||
92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | ||
93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | ||
81 | 94 | ||
82 | typedef struct kernel_cap_struct { | 95 | typedef struct kernel_cap_struct { |
83 | __u32 cap[_LINUX_CAPABILITY_U32S]; | 96 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
84 | } kernel_cap_t; | 97 | } kernel_cap_t; |
85 | 98 | ||
86 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) | 99 | #define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) |
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct { | |||
351 | */ | 364 | */ |
352 | 365 | ||
353 | #define CAP_FOR_EACH_U32(__capi) \ | 366 | #define CAP_FOR_EACH_U32(__capi) \ |
354 | for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi) | 367 | for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi) |
355 | 368 | ||
356 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ | 369 | # define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ |
357 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ | 370 | | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ |
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct { | |||
361 | 374 | ||
362 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) | 375 | # define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) |
363 | 376 | ||
364 | #if _LINUX_CAPABILITY_U32S != 2 | 377 | #if _KERNEL_CAPABILITY_U32S != 2 |
365 | # error Fix up hand-coded capability macro initializers | 378 | # error Fix up hand-coded capability macro initializers |
366 | #else /* HAND-CODED capability initializers */ | 379 | #else /* HAND-CODED capability initializers */ |
367 | 380 | ||
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct { | |||
372 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ | 385 | # define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
373 | CAP_FS_MASK_B1 } }) | 386 | CAP_FS_MASK_B1 } }) |
374 | 387 | ||
375 | #endif /* _LINUX_CAPABILITY_U32S != 2 */ | 388 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
376 | 389 | ||
377 | #define CAP_INIT_INH_SET CAP_EMPTY_SET | 390 | #define CAP_INIT_INH_SET CAP_EMPTY_SET |
378 | 391 | ||
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 51e6b1e520e6..dcf77fa826b5 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj { | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct cpuidle_device { | 84 | struct cpuidle_device { |
85 | unsigned int registered:1; | ||
85 | unsigned int enabled:1; | 86 | unsigned int enabled:1; |
86 | unsigned int cpu; | 87 | unsigned int cpu; |
87 | 88 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 15e9fa3ad3af..6a2d04c011bc 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -385,6 +385,9 @@ static inline const char *dev_name(struct device *dev) | |||
385 | return dev->bus_id; | 385 | return dev->bus_id; |
386 | } | 386 | } |
387 | 387 | ||
388 | extern int dev_set_name(struct device *dev, const char *name, ...) | ||
389 | __attribute__((format(printf, 2, 3))); | ||
390 | |||
388 | #ifdef CONFIG_NUMA | 391 | #ifdef CONFIG_NUMA |
389 | static inline int dev_to_node(struct device *dev) | 392 | static inline int dev_to_node(struct device *dev) |
390 | { | 393 | { |
@@ -449,9 +452,21 @@ extern int __must_check device_reprobe(struct device *dev); | |||
449 | /* | 452 | /* |
450 | * Easy functions for dynamically creating devices on the fly | 453 | * Easy functions for dynamically creating devices on the fly |
451 | */ | 454 | */ |
455 | extern struct device *device_create_vargs(struct class *cls, | ||
456 | struct device *parent, | ||
457 | dev_t devt, | ||
458 | void *drvdata, | ||
459 | const char *fmt, | ||
460 | va_list vargs); | ||
452 | extern struct device *device_create(struct class *cls, struct device *parent, | 461 | extern struct device *device_create(struct class *cls, struct device *parent, |
453 | dev_t devt, const char *fmt, ...) | 462 | dev_t devt, const char *fmt, ...) |
454 | __attribute__((format(printf, 4, 5))); | 463 | __attribute__((format(printf, 4, 5))); |
464 | extern struct device *device_create_drvdata(struct class *cls, | ||
465 | struct device *parent, | ||
466 | dev_t devt, | ||
467 | void *drvdata, | ||
468 | const char *fmt, ...) | ||
469 | __attribute__((format(printf, 5, 6))); | ||
455 | extern void device_destroy(struct class *cls, dev_t devt); | 470 | extern void device_destroy(struct class *cls, dev_t devt); |
456 | 471 | ||
457 | /* | 472 | /* |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index a118f3c0b240..4aab6f12cfab 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
@@ -93,6 +93,7 @@ struct files_struct *get_files_struct(struct task_struct *); | |||
93 | void put_files_struct(struct files_struct *fs); | 93 | void put_files_struct(struct files_struct *fs); |
94 | void reset_files_struct(struct files_struct *); | 94 | void reset_files_struct(struct files_struct *); |
95 | int unshare_files(struct files_struct **); | 95 | int unshare_files(struct files_struct **); |
96 | struct files_struct *dup_fd(struct files_struct *, int *); | ||
96 | 97 | ||
97 | extern struct kmem_cache *files_cachep; | 98 | extern struct kmem_cache *files_cachep; |
98 | 99 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index f413085f748e..d490779f18d9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2000,7 +2000,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | |||
2000 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); | 2000 | extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); |
2001 | extern void simple_release_fs(struct vfsmount **mount, int *count); | 2001 | extern void simple_release_fs(struct vfsmount **mount, int *count); |
2002 | 2002 | ||
2003 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 2003 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2004 | loff_t *ppos, const void *from, size_t available); | ||
2005 | extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, | ||
2006 | const void *from, size_t available); | ||
2004 | 2007 | ||
2005 | #ifdef CONFIG_MIGRATION | 2008 | #ifdef CONFIG_MIGRATION |
2006 | extern int buffer_migrate_page(struct address_space *, | 2009 | extern int buffer_migrate_page(struct address_space *, |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 4987a84078ef..98be6c5762b9 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
@@ -8,6 +8,9 @@ | |||
8 | 8 | ||
9 | #else | 9 | #else |
10 | 10 | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/errno.h> | ||
13 | |||
11 | /* | 14 | /* |
12 | * Some platforms don't support the GPIO programming interface. | 15 | * Some platforms don't support the GPIO programming interface. |
13 | * | 16 | * |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 4ce3b7a979ba..fe56b86f2c67 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define __HID_H | 2 | #define __HID_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * $Id: hid.h,v 1.24 2001/12/27 10:37:41 vojtech Exp $ | ||
6 | * | ||
7 | * Copyright (c) 1999 Andreas Gal | 5 | * Copyright (c) 1999 Andreas Gal |
8 | * Copyright (c) 2000-2001 Vojtech Pavlik | 6 | * Copyright (c) 2000-2001 Vojtech Pavlik |
9 | * Copyright (c) 2006-2007 Jiri Kosina | 7 | * Copyright (c) 2006-2007 Jiri Kosina |
@@ -285,6 +283,7 @@ struct hid_item { | |||
285 | #define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 | 283 | #define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 |
286 | #define HID_QUIRK_MICROSOFT_KEYS 0x08000000 | 284 | #define HID_QUIRK_MICROSOFT_KEYS 0x08000000 |
287 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 285 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
286 | #define HID_QUIRK_APPLE_NUMLOCK_EMULATION 0x20000000 | ||
288 | 287 | ||
289 | /* | 288 | /* |
290 | * Separate quirks for runtime report descriptor fixup | 289 | * Separate quirks for runtime report descriptor fixup |
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index acbdae6d7ae1..a416b904ba90 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define _HIDDEV_H | 2 | #define _HIDDEV_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * $Id: hiddev.h,v 1.2 2001/04/26 11:26:09 vojtech Exp $ | ||
6 | * | ||
7 | * Copyright (c) 1999-2000 Vojtech Pavlik | 5 | * Copyright (c) 1999-2000 Vojtech Pavlik |
8 | * | 6 | * |
9 | * Sponsored by SuSE | 7 | * Sponsored by SuSE |
diff --git a/include/linux/ide.h b/include/linux/ide.h index f8f195c20da2..9918772bf274 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci, | |||
153 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 153 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
154 | ide_rz1000, ide_trm290, | 154 | ide_rz1000, ide_trm290, |
155 | ide_cmd646, ide_cy82c693, ide_4drives, | 155 | ide_cmd646, ide_cy82c693, ide_4drives, |
156 | ide_pmac, ide_etrax100, ide_acorn, | 156 | ide_pmac, ide_acorn, |
157 | ide_au1xxx, ide_palm3710 | 157 | ide_au1xxx, ide_palm3710 |
158 | }; | 158 | }; |
159 | 159 | ||
diff --git a/include/linux/in_route.h b/include/linux/in_route.h index 61f25c30a2a0..b261b8c915f0 100644 --- a/include/linux/in_route.h +++ b/include/linux/in_route.h | |||
@@ -10,19 +10,19 @@ | |||
10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC | 10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC |
11 | 11 | ||
12 | #define RTCF_NOTIFY 0x00010000 | 12 | #define RTCF_NOTIFY 0x00010000 |
13 | #define RTCF_DIRECTDST 0x00020000 | 13 | #define RTCF_DIRECTDST 0x00020000 /* unused */ |
14 | #define RTCF_REDIRECTED 0x00040000 | 14 | #define RTCF_REDIRECTED 0x00040000 |
15 | #define RTCF_TPROXY 0x00080000 | 15 | #define RTCF_TPROXY 0x00080000 /* unused */ |
16 | 16 | ||
17 | #define RTCF_FAST 0x00200000 | 17 | #define RTCF_FAST 0x00200000 /* unused */ |
18 | #define RTCF_MASQ 0x00400000 | 18 | #define RTCF_MASQ 0x00400000 /* unused */ |
19 | #define RTCF_SNAT 0x00800000 | 19 | #define RTCF_SNAT 0x00800000 /* unused */ |
20 | #define RTCF_DOREDIRECT 0x01000000 | 20 | #define RTCF_DOREDIRECT 0x01000000 |
21 | #define RTCF_DIRECTSRC 0x04000000 | 21 | #define RTCF_DIRECTSRC 0x04000000 |
22 | #define RTCF_DNAT 0x08000000 | 22 | #define RTCF_DNAT 0x08000000 |
23 | #define RTCF_BROADCAST 0x10000000 | 23 | #define RTCF_BROADCAST 0x10000000 |
24 | #define RTCF_MULTICAST 0x20000000 | 24 | #define RTCF_MULTICAST 0x20000000 |
25 | #define RTCF_REJECT 0x40000000 | 25 | #define RTCF_REJECT 0x40000000 /* unused */ |
26 | #define RTCF_LOCAL 0x80000000 | 26 | #define RTCF_LOCAL 0x80000000 |
27 | 27 | ||
28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) | 28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7009b0cdd06f..c6f51ad52d5b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -117,7 +117,6 @@ struct in_ifaddr | |||
117 | __be32 ifa_address; | 117 | __be32 ifa_address; |
118 | __be32 ifa_mask; | 118 | __be32 ifa_mask; |
119 | __be32 ifa_broadcast; | 119 | __be32 ifa_broadcast; |
120 | __be32 ifa_anycast; | ||
121 | unsigned char ifa_scope; | 120 | unsigned char ifa_scope; |
122 | unsigned char ifa_flags; | 121 | unsigned char ifa_flags; |
123 | unsigned char ifa_prefixlen; | 122 | unsigned char ifa_prefixlen; |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index b24c2875aa05..9927a88674a3 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _LINUX__INIT_TASK_H | 1 | #ifndef _LINUX__INIT_TASK_H |
2 | #define _LINUX__INIT_TASK_H | 2 | #define _LINUX__INIT_TASK_H |
3 | 3 | ||
4 | #include <linux/fdtable.h> | ||
5 | #include <linux/rcupdate.h> | 4 | #include <linux/rcupdate.h> |
6 | #include <linux/irqflags.h> | 5 | #include <linux/irqflags.h> |
7 | #include <linux/utsname.h> | 6 | #include <linux/utsname.h> |
@@ -12,27 +11,7 @@ | |||
12 | #include <linux/securebits.h> | 11 | #include <linux/securebits.h> |
13 | #include <net/net_namespace.h> | 12 | #include <net/net_namespace.h> |
14 | 13 | ||
15 | #define INIT_FDTABLE \ | 14 | extern struct files_struct init_files; |
16 | { \ | ||
17 | .max_fds = NR_OPEN_DEFAULT, \ | ||
18 | .fd = &init_files.fd_array[0], \ | ||
19 | .close_on_exec = (fd_set *)&init_files.close_on_exec_init, \ | ||
20 | .open_fds = (fd_set *)&init_files.open_fds_init, \ | ||
21 | .rcu = RCU_HEAD_INIT, \ | ||
22 | .next = NULL, \ | ||
23 | } | ||
24 | |||
25 | #define INIT_FILES \ | ||
26 | { \ | ||
27 | .count = ATOMIC_INIT(1), \ | ||
28 | .fdt = &init_files.fdtab, \ | ||
29 | .fdtab = INIT_FDTABLE, \ | ||
30 | .file_lock = __SPIN_LOCK_UNLOCKED(init_task.file_lock), \ | ||
31 | .next_fd = 0, \ | ||
32 | .close_on_exec_init = { { 0, } }, \ | ||
33 | .open_fds_init = { { 0, } }, \ | ||
34 | .fd_array = { NULL, } \ | ||
35 | } | ||
36 | 15 | ||
37 | #define INIT_KIOCTX(name, which_mm) \ | 16 | #define INIT_KIOCTX(name, which_mm) \ |
38 | { \ | 17 | { \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 28a094fcfe20..e075c4b762fb 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -637,7 +637,9 @@ struct input_absinfo { | |||
637 | #define SW_LID 0x00 /* set = lid shut */ | 637 | #define SW_LID 0x00 /* set = lid shut */ |
638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | 638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | 639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
640 | #define SW_RADIO 0x03 /* set = radio enabled */ | 640 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
641 | set = radio enabled */ | ||
642 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
641 | #define SW_MAX 0x0f | 643 | #define SW_MAX 0x0f |
642 | #define SW_CNT (SW_MAX+1) | 644 | #define SW_CNT (SW_MAX+1) |
643 | 645 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index d5d40a9f7929..c6801bffe76d 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -53,14 +53,14 @@ struct resource_list { | |||
53 | #define IORESOURCE_AUTO 0x40000000 | 53 | #define IORESOURCE_AUTO 0x40000000 |
54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ | 54 | #define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ |
55 | 55 | ||
56 | /* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ | 56 | /* PnP IRQ specific bits (IORESOURCE_BITS) */ |
57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) | 57 | #define IORESOURCE_IRQ_HIGHEDGE (1<<0) |
58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) | 58 | #define IORESOURCE_IRQ_LOWEDGE (1<<1) |
59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) | 59 | #define IORESOURCE_IRQ_HIGHLEVEL (1<<2) |
60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) | 60 | #define IORESOURCE_IRQ_LOWLEVEL (1<<3) |
61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) | 61 | #define IORESOURCE_IRQ_SHAREABLE (1<<4) |
62 | 62 | ||
63 | /* ISA PnP DMA specific bits (IORESOURCE_BITS) */ | 63 | /* PnP DMA specific bits (IORESOURCE_BITS) */ |
64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) | 64 | #define IORESOURCE_DMA_TYPE_MASK (3<<0) |
65 | #define IORESOURCE_DMA_8BIT (0<<0) | 65 | #define IORESOURCE_DMA_8BIT (0<<0) |
66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) | 66 | #define IORESOURCE_DMA_8AND16BIT (1<<0) |
@@ -76,7 +76,7 @@ struct resource_list { | |||
76 | #define IORESOURCE_DMA_TYPEB (2<<6) | 76 | #define IORESOURCE_DMA_TYPEB (2<<6) |
77 | #define IORESOURCE_DMA_TYPEF (3<<6) | 77 | #define IORESOURCE_DMA_TYPEF (3<<6) |
78 | 78 | ||
79 | /* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ | 79 | /* PnP memory I/O specific bits (IORESOURCE_BITS) */ |
80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ | 80 | #define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ |
81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ | 81 | #define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ |
82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ | 82 | #define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 10b666b61add..cde056e08181 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op | |||
396 | { | 396 | { |
397 | struct request_sock *req = reqsk_alloc(ops); | 397 | struct request_sock *req = reqsk_alloc(ops); |
398 | 398 | ||
399 | if (req != NULL) | 399 | if (req != NULL) { |
400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); | 400 | inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); |
401 | inet6_rsk(req)->pktopts = NULL; | ||
402 | } | ||
401 | 403 | ||
402 | return req; | 404 | return req; |
403 | } | 405 | } |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 05e2b307161a..d147f0f90360 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -919,6 +919,9 @@ struct journal_s | |||
919 | struct proc_dir_entry *j_proc_entry; | 919 | struct proc_dir_entry *j_proc_entry; |
920 | struct transaction_stats_s j_stats; | 920 | struct transaction_stats_s j_stats; |
921 | 921 | ||
922 | /* Failed journal commit ID */ | ||
923 | unsigned int j_failed_commit; | ||
924 | |||
922 | /* | 925 | /* |
923 | * An opaque pointer to fs-private information. ext3 puts its | 926 | * An opaque pointer to fs-private information. ext3 puts its |
924 | * superblock pointer here | 927 | * superblock pointer here |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 398978972b7a..092b1b25291d 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -297,7 +297,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn) | |||
297 | return (gpa_t)gfn << PAGE_SHIFT; | 297 | return (gpa_t)gfn << PAGE_SHIFT; |
298 | } | 298 | } |
299 | 299 | ||
300 | static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) | 300 | static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) |
301 | { | 301 | { |
302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); | 302 | set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); |
303 | } | 303 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0f17643e0a6e..e57e5d08312d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -111,13 +111,10 @@ enum { | |||
111 | /* various global constants */ | 111 | /* various global constants */ |
112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, | 112 | LIBATA_MAX_PRD = ATA_MAX_PRD / 2, |
113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ | 113 | LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ |
114 | ATA_MAX_PORTS = 8, | ||
115 | ATA_DEF_QUEUE = 1, | 114 | ATA_DEF_QUEUE = 1, |
116 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ | 115 | /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ |
117 | ATA_MAX_QUEUE = 32, | 116 | ATA_MAX_QUEUE = 32, |
118 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, | 117 | ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, |
119 | ATA_MAX_BUS = 2, | ||
120 | ATA_DEF_BUSY_WAIT = 10000, | ||
121 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 118 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
122 | 119 | ||
123 | ATAPI_MAX_DRAIN = 16 << 10, | 120 | ATAPI_MAX_DRAIN = 16 << 10, |
@@ -341,7 +338,7 @@ enum { | |||
341 | ATA_EH_PMP_TRIES = 5, | 338 | ATA_EH_PMP_TRIES = 5, |
342 | ATA_EH_PMP_LINK_TRIES = 3, | 339 | ATA_EH_PMP_LINK_TRIES = 3, |
343 | 340 | ||
344 | SATA_PMP_SCR_TIMEOUT = 250, | 341 | SATA_PMP_RW_TIMEOUT = 3000, /* PMP read/write timeout */ |
345 | 342 | ||
346 | /* Horkage types. May be set by libata or controller on drives | 343 | /* Horkage types. May be set by libata or controller on drives |
347 | (some horkage may be drive/controller pair dependant */ | 344 | (some horkage may be drive/controller pair dependant */ |
@@ -351,7 +348,7 @@ enum { | |||
351 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ | 348 | ATA_HORKAGE_NONCQ = (1 << 2), /* Don't use NCQ */ |
352 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ | 349 | ATA_HORKAGE_MAX_SEC_128 = (1 << 3), /* Limit max sects to 128 */ |
353 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ | 350 | ATA_HORKAGE_BROKEN_HPA = (1 << 4), /* Broken HPA */ |
354 | ATA_HORKAGE_SKIP_PM = (1 << 5), /* Skip PM operations */ | 351 | ATA_HORKAGE_DISABLE = (1 << 5), /* Disable it */ |
355 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 352 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
356 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 353 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
357 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 354 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
@@ -821,8 +818,6 @@ struct ata_timing { | |||
821 | unsigned short udma; /* t2CYCTYP/2 */ | 818 | unsigned short udma; /* t2CYCTYP/2 */ |
822 | }; | 819 | }; |
823 | 820 | ||
824 | #define FIT(v, vmin, vmax) max_t(short, min_t(short, v, vmax), vmin) | ||
825 | |||
826 | /* | 821 | /* |
827 | * Core layer - drivers/ata/libata-core.c | 822 | * Core layer - drivers/ata/libata-core.c |
828 | */ | 823 | */ |
@@ -1437,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc); | |||
1437 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); | 1432 | extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); |
1438 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); | 1433 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
1439 | extern u8 ata_sff_check_status(struct ata_port *ap); | 1434 | extern u8 ata_sff_check_status(struct ata_port *ap); |
1440 | extern u8 ata_sff_altstatus(struct ata_port *ap); | 1435 | extern void ata_sff_pause(struct ata_port *ap); |
1436 | extern void ata_sff_dma_pause(struct ata_port *ap); | ||
1441 | extern int ata_sff_busy_sleep(struct ata_port *ap, | 1437 | extern int ata_sff_busy_sleep(struct ata_port *ap, |
1442 | unsigned long timeout_pat, unsigned long timeout); | 1438 | unsigned long timeout_pat, unsigned long timeout); |
1443 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); | 1439 | extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); |
@@ -1498,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, | |||
1498 | #endif /* CONFIG_PCI */ | 1494 | #endif /* CONFIG_PCI */ |
1499 | 1495 | ||
1500 | /** | 1496 | /** |
1501 | * ata_sff_pause - Flush writes and pause 400 nanoseconds. | ||
1502 | * @ap: Port to wait for. | ||
1503 | * | ||
1504 | * LOCKING: | ||
1505 | * Inherited from caller. | ||
1506 | */ | ||
1507 | static inline void ata_sff_pause(struct ata_port *ap) | ||
1508 | { | ||
1509 | ata_sff_altstatus(ap); | ||
1510 | ndelay(400); | ||
1511 | } | ||
1512 | |||
1513 | /** | ||
1514 | * ata_sff_busy_wait - Wait for a port status register | 1497 | * ata_sff_busy_wait - Wait for a port status register |
1515 | * @ap: Port to wait for. | 1498 | * @ap: Port to wait for. |
1516 | * @bits: bits that must be clear | 1499 | * @bits: bits that must be clear |
diff --git a/include/linux/math64.h b/include/linux/math64.h index c1a5f81501ff..c87f1528703a 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor) | |||
81 | } | 81 | } |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder); | ||
85 | |||
86 | static __always_inline u32 | ||
87 | __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | ||
88 | { | ||
89 | u32 ret = 0; | ||
90 | |||
91 | while (dividend >= divisor) { | ||
92 | /* The following asm() prevents the compiler from | ||
93 | optimising this loop into a modulo operation. */ | ||
94 | asm("" : "+rm"(dividend)); | ||
95 | |||
96 | dividend -= divisor; | ||
97 | ret++; | ||
98 | } | ||
99 | |||
100 | *remainder = dividend; | ||
101 | |||
102 | return ret; | ||
103 | } | ||
104 | |||
84 | #endif /* _LINUX_MATH64_H */ | 105 | #endif /* _LINUX_MATH64_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 73e358612eaf..ea9f5ad9ec8e 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn, | |||
77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | 77 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, |
78 | unsigned long nr_pages); | 78 | unsigned long nr_pages); |
79 | 79 | ||
80 | /* | ||
81 | * Walk through all memory which is registered as resource. | ||
82 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
83 | */ | ||
84 | extern int walk_memory_resource(unsigned long start_pfn, | ||
85 | unsigned long nr_pages, void *arg, | ||
86 | int (*func)(unsigned long, unsigned long, void *)); | ||
87 | |||
88 | #ifdef CONFIG_NUMA | 80 | #ifdef CONFIG_NUMA |
89 | extern int memory_add_physaddr_to_nid(u64 start); | 81 | extern int memory_add_physaddr_to_nid(u64 start); |
90 | #else | 82 | #else |
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat) | |||
199 | 191 | ||
200 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ | 192 | #endif /* ! CONFIG_MEMORY_HOTPLUG */ |
201 | 193 | ||
194 | /* | ||
195 | * Walk through all memory which is registered as resource. | ||
196 | * arg is (start_pfn, nr_pages, private_arg_pointer) | ||
197 | */ | ||
198 | extern int walk_memory_resource(unsigned long start_pfn, | ||
199 | unsigned long nr_pages, void *arg, | ||
200 | int (*func)(unsigned long, unsigned long, void *)); | ||
201 | |||
202 | extern int add_memory(int nid, u64 start, u64 size); | 202 | extern int add_memory(int nid, u64 start, u64 size); |
203 | extern int arch_add_memory(int nid, u64 start, u64 size); | 203 | extern int arch_add_memory(int nid, u64 start, u64 size); |
204 | extern int remove_memory(u64 start, u64 size); | 204 | extern int remove_memory(u64 start, u64 size); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c31a9cd2a30e..586a943cab01 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
760 | * (see walk_page_range for more details) | 760 | * (see walk_page_range for more details) |
761 | */ | 761 | */ |
762 | struct mm_walk { | 762 | struct mm_walk { |
763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); | 763 | int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); |
764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); | 764 | int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); |
765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); | 765 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); | 766 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
767 | int (*pte_hole)(unsigned long, unsigned long, void *); | 767 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
768 | struct mm_struct *mm; | ||
769 | void *private; | ||
768 | }; | 770 | }; |
769 | 771 | ||
770 | int walk_page_range(const struct mm_struct *, unsigned long addr, | 772 | int walk_page_range(unsigned long addr, unsigned long end, |
771 | unsigned long end, const struct mm_walk *walk, | 773 | struct mm_walk *walk); |
772 | void *private); | ||
773 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 774 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, |
774 | unsigned long end, unsigned long floor, unsigned long ceiling); | 775 | unsigned long end, unsigned long floor, unsigned long ceiling); |
775 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | 776 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 87920a0852a3..dab8892e6ff1 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -17,14 +17,14 @@ | |||
17 | 17 | ||
18 | extern int sysctl_overcommit_memory; | 18 | extern int sysctl_overcommit_memory; |
19 | extern int sysctl_overcommit_ratio; | 19 | extern int sysctl_overcommit_ratio; |
20 | extern atomic_t vm_committed_space; | 20 | extern atomic_long_t vm_committed_space; |
21 | 21 | ||
22 | #ifdef CONFIG_SMP | 22 | #ifdef CONFIG_SMP |
23 | extern void vm_acct_memory(long pages); | 23 | extern void vm_acct_memory(long pages); |
24 | #else | 24 | #else |
25 | static inline void vm_acct_memory(long pages) | 25 | static inline void vm_acct_memory(long pages) |
26 | { | 26 | { |
27 | atomic_add(pages, &vm_committed_space); | 27 | atomic_long_add(pages, &vm_committed_space); |
28 | } | 28 | } |
29 | #endif | 29 | #endif |
30 | 30 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c463cd8a15a4..443bc7cd8c62 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -703,7 +703,7 @@ extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); | |||
703 | extern struct zone *next_zone(struct zone *zone); | 703 | extern struct zone *next_zone(struct zone *zone); |
704 | 704 | ||
705 | /** | 705 | /** |
706 | * for_each_pgdat - helper macro to iterate over all nodes | 706 | * for_each_online_pgdat - helper macro to iterate over all online nodes |
707 | * @pgdat - pointer to a pg_data_t variable | 707 | * @pgdat - pointer to a pg_data_t variable |
708 | */ | 708 | */ |
709 | #define for_each_online_pgdat(pgdat) \ | 709 | #define for_each_online_pgdat(pgdat) \ |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index d73eceaa7afb..69b2342d5ebb 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -375,7 +375,8 @@ struct virtio_device_id { | |||
375 | 375 | ||
376 | struct i2c_device_id { | 376 | struct i2c_device_id { |
377 | char name[I2C_NAME_SIZE]; | 377 | char name[I2C_NAME_SIZE]; |
378 | kernel_ulong_t driver_data; /* Data private to the driver */ | 378 | kernel_ulong_t driver_data /* Data private to the driver */ |
379 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
379 | }; | 380 | }; |
380 | 381 | ||
381 | 382 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index b03b27457413..81cd36b735b0 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -57,12 +57,6 @@ | |||
57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 57 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 58 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
59 | 59 | ||
60 | /* media of boot sector */ | ||
61 | static inline int fat_valid_media(u8 media) | ||
62 | { | ||
63 | return 0xf8 <= media || media == 0xf0; | ||
64 | } | ||
65 | |||
66 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ | 60 | #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ |
67 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) | 61 | MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) |
68 | 62 | ||
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) | |||
334 | #endif | 328 | #endif |
335 | } | 329 | } |
336 | 330 | ||
331 | /* media of boot sector */ | ||
332 | static inline int fat_valid_media(u8 media) | ||
333 | { | ||
334 | return 0xf8 <= media || media == 0xf0; | ||
335 | } | ||
336 | |||
337 | /* fat/cache.c */ | 337 | /* fat/cache.c */ |
338 | extern void fat_cache_inval_inode(struct inode *inode); | 338 | extern void fat_cache_inval_inode(struct inode *inode); |
339 | extern int fat_get_cluster(struct inode *inode, int cluster, | 339 | extern int fat_get_cluster(struct inode *inode, int cluster, |
diff --git a/include/linux/msg.h b/include/linux/msg.h index 6f3b8e79a991..56abf1558fdd 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h | |||
@@ -64,11 +64,11 @@ struct msginfo { | |||
64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ | 64 | #define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ |
65 | 65 | ||
66 | /* unused */ | 66 | /* unused */ |
67 | #define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ | 67 | #define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */ |
68 | #define MSGTQL MSGMNB /* number of system message headers */ | 68 | #define MSGTQL MSGMNB /* number of system message headers */ |
69 | #define MSGMAP MSGMNB /* number of entries in message map */ | 69 | #define MSGMAP MSGMNB /* number of entries in message map */ |
70 | #define MSGSSZ 16 /* message segment size */ | 70 | #define MSGSSZ 16 /* message segment size */ |
71 | #define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ | 71 | #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */ |
72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) | 72 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
73 | 73 | ||
74 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index c42bc7f533a5..53ea3dc8b0e8 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/nand.h | 2 | * linux/include/linux/mtd/nand.h |
3 | * | 3 | * |
4 | * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com> | 4 | * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org> |
5 | * Steven J. Hill <sjhill@realitydiluted.com> | 5 | * Steven J. Hill <sjhill@realitydiluted.com> |
6 | * Thomas Gleixner <tglx@linutronix.de> | 6 | * Thomas Gleixner <tglx@linutronix.de> |
7 | * | 7 | * |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b11e6e19e96c..f27fd2009334 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -745,6 +745,9 @@ struct net_device | |||
745 | /* rtnetlink link ops */ | 745 | /* rtnetlink link ops */ |
746 | const struct rtnl_link_ops *rtnl_link_ops; | 746 | const struct rtnl_link_ops *rtnl_link_ops; |
747 | 747 | ||
748 | /* VLAN feature mask */ | ||
749 | unsigned long vlan_features; | ||
750 | |||
748 | /* for setting kernel sock attribute on TCP connection setup */ | 751 | /* for setting kernel sock attribute on TCP connection setup */ |
749 | #define GSO_MAX_SIZE 65536 | 752 | #define GSO_MAX_SIZE 65536 |
750 | unsigned int gso_max_size; | 753 | unsigned int gso_max_size; |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index e4c66593b5c6..0c5eb7ed8b3f 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/types.h> | ||
7 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
8 | #include <linux/net.h> | 7 | #include <linux/net.h> |
9 | #include <linux/netdevice.h> | 8 | #include <linux/netdevice.h> |
@@ -14,6 +13,7 @@ | |||
14 | #include <linux/list.h> | 13 | #include <linux/list.h> |
15 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
16 | #endif | 15 | #endif |
16 | #include <linux/types.h> | ||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | 18 | ||
19 | /* Responses from hook functions. */ | 19 | /* Responses from hook functions. */ |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index dd9c97f2d436..590ac3d6d5d6 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -11,11 +11,11 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | #include <linux/if.h> | 13 | #include <linux/if.h> |
14 | #include <linux/types.h> | ||
15 | #include <linux/in.h> | 14 | #include <linux/in.h> |
16 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
17 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
18 | #endif | 17 | #endif |
18 | #include <linux/types.h> | ||
19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
20 | #include <linux/netfilter_arp.h> | 20 | #include <linux/netfilter_arp.h> |
21 | 21 | ||
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index bfc889f90276..092bd50581a9 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/if.h> | 19 | #include <linux/if.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/in.h> | 20 | #include <linux/in.h> |
22 | #include <linux/ip.h> | 21 | #include <linux/ip.h> |
23 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
24 | #endif | 23 | #endif |
24 | #include <linux/types.h> | ||
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <linux/netfilter_ipv4.h> | 26 | #include <linux/netfilter_ipv4.h> |
27 | 27 | ||
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index f2507dcc5750..1089e33cf633 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/if.h> | 19 | #include <linux/if.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
22 | #include <linux/ipv6.h> | 21 | #include <linux/ipv6.h> |
23 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
24 | #endif | 23 | #endif |
24 | #include <linux/types.h> | ||
25 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
26 | #include <linux/netfilter_ipv6.h> | 26 | #include <linux/netfilter_ipv6.h> |
27 | 27 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 590cff32415d..f31debfac926 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -306,5 +306,29 @@ static inline void __ClearPageTail(struct page *page) | |||
306 | } | 306 | } |
307 | 307 | ||
308 | #endif /* !PAGEFLAGS_EXTENDED */ | 308 | #endif /* !PAGEFLAGS_EXTENDED */ |
309 | |||
310 | #define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \ | ||
311 | 1 << PG_buddy | 1 << PG_writeback | \ | ||
312 | 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active) | ||
313 | |||
314 | /* | ||
315 | * Flags checked in bad_page(). Pages on the free list should not have | ||
316 | * these flags set. It they are, there is a problem. | ||
317 | */ | ||
318 | #define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty) | ||
319 | |||
320 | /* | ||
321 | * Flags checked when a page is freed. Pages being freed should not have | ||
322 | * these flags set. It they are, there is a problem. | ||
323 | */ | ||
324 | #define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved) | ||
325 | |||
326 | /* | ||
327 | * Flags checked when a page is prepped for return by the page allocator. | ||
328 | * Pages being prepped should not have these flags set. It they are, there | ||
329 | * is a problem. | ||
330 | */ | ||
331 | #define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty) | ||
332 | |||
309 | #endif /* !__GENERATING_BOUNDS_H */ | 333 | #endif /* !__GENERATING_BOUNDS_H */ |
310 | #endif /* PAGE_FLAGS_H */ | 334 | #endif /* PAGE_FLAGS_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 509159bcd4e7..d18b1dd49fab 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -206,6 +206,7 @@ struct pci_dev { | |||
206 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 206 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
207 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 207 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
208 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 208 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
209 | struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */ | ||
209 | #ifdef CONFIG_PCI_MSI | 210 | #ifdef CONFIG_PCI_MSI |
210 | struct list_head msi_list; | 211 | struct list_head msi_list; |
211 | #endif | 212 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cf6dbd759395..eafc9d6d2b35 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -716,6 +716,7 @@ | |||
716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 | 716 | #define PCI_DEVICE_ID_HP_CISSA 0x3220 |
717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 | 717 | #define PCI_DEVICE_ID_HP_CISSC 0x3230 |
718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 | 718 | #define PCI_DEVICE_ID_HP_CISSD 0x3238 |
719 | #define PCI_DEVICE_ID_HP_CISSE 0x323a | ||
719 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 | 720 | #define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 |
720 | 721 | ||
721 | #define PCI_VENDOR_ID_PCTECH 0x1042 | 722 | #define PCI_VENDOR_ID_PCTECH 0x1042 |
@@ -1761,6 +1762,7 @@ | |||
1761 | 1762 | ||
1762 | #define PCI_VENDOR_ID_INTASHIELD 0x135a | 1763 | #define PCI_VENDOR_ID_INTASHIELD 0x135a |
1763 | #define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 | 1764 | #define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 |
1765 | #define PCI_DEVICE_ID_INTASHIELD_IS400 0x0dc0 | ||
1764 | 1766 | ||
1765 | #define PCI_VENDOR_ID_QUATECH 0x135C | 1767 | #define PCI_VENDOR_ID_QUATECH 0x135C |
1766 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 | 1768 | #define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 |
@@ -2383,6 +2385,9 @@ | |||
2383 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 | 2385 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 |
2384 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | 2386 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 |
2385 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2387 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2388 | #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 | ||
2389 | #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 | ||
2390 | #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 | ||
2386 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff | 2391 | #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff |
2387 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 | 2392 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 |
2388 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 | 2393 | #define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 9883bc942262..fff1d27ddb4c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
12 | struct mm_struct; | ||
13 | |||
12 | /* | 14 | /* |
13 | * The proc filesystem constants/structures | 15 | * The proc filesystem constants/structures |
14 | */ | 16 | */ |
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock; | |||
101 | extern void proc_root_init(void); | 103 | extern void proc_root_init(void); |
102 | extern void proc_misc_init(void); | 104 | extern void proc_misc_init(void); |
103 | 105 | ||
104 | struct mm_struct; | ||
105 | |||
106 | void proc_flush_task(struct task_struct *task); | 106 | void proc_flush_task(struct task_struct *task); |
107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 107 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 108 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 47fbcba11850..78bfdea24a8e 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -262,7 +262,6 @@ int bitmap_create(mddev_t *mddev); | |||
262 | void bitmap_flush(mddev_t *mddev); | 262 | void bitmap_flush(mddev_t *mddev); |
263 | void bitmap_destroy(mddev_t *mddev); | 263 | void bitmap_destroy(mddev_t *mddev); |
264 | 264 | ||
265 | char *file_path(struct file *file, char *buf, int count); | ||
266 | void bitmap_print_sb(struct bitmap *bitmap); | 265 | void bitmap_print_sb(struct bitmap *bitmap); |
267 | void bitmap_update_sb(struct bitmap *bitmap); | 266 | void bitmap_update_sb(struct bitmap *bitmap); |
268 | 267 | ||
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index 81a1a02d4566..b7386ae9d288 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -72,6 +72,8 @@ | |||
72 | */ | 72 | */ |
73 | #define MD_PATCHLEVEL_VERSION 3 | 73 | #define MD_PATCHLEVEL_VERSION 3 |
74 | 74 | ||
75 | extern int mdp_major; | ||
76 | |||
75 | extern int register_md_personality (struct mdk_personality *p); | 77 | extern int register_md_personality (struct mdk_personality *p); |
76 | extern int unregister_md_personality (struct mdk_personality *p); | 78 | extern int unregister_md_personality (struct mdk_personality *p); |
77 | extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), | 79 | extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 812ffa590cff..3dea9f545c8f 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -180,13 +180,15 @@ struct mddev_s | |||
180 | int sync_speed_min; | 180 | int sync_speed_min; |
181 | int sync_speed_max; | 181 | int sync_speed_max; |
182 | 182 | ||
183 | /* resync even though the same disks are shared among md-devices */ | ||
184 | int parallel_resync; | ||
185 | |||
183 | int ok_start_degraded; | 186 | int ok_start_degraded; |
184 | /* recovery/resync flags | 187 | /* recovery/resync flags |
185 | * NEEDED: we might need to start a resync/recover | 188 | * NEEDED: we might need to start a resync/recover |
186 | * RUNNING: a thread is running, or about to be started | 189 | * RUNNING: a thread is running, or about to be started |
187 | * SYNC: actually doing a resync, not a recovery | 190 | * SYNC: actually doing a resync, not a recovery |
188 | * ERR: and IO error was detected - abort the resync/recovery | 191 | * INTR: resync needs to be aborted for some reason |
189 | * INTR: someone requested a (clean) early abort. | ||
190 | * DONE: thread is done and is waiting to be reaped | 192 | * DONE: thread is done and is waiting to be reaped |
191 | * REQUEST: user-space has requested a sync (used with SYNC) | 193 | * REQUEST: user-space has requested a sync (used with SYNC) |
192 | * CHECK: user-space request for for check-only, no repair | 194 | * CHECK: user-space request for for check-only, no repair |
@@ -196,7 +198,6 @@ struct mddev_s | |||
196 | */ | 198 | */ |
197 | #define MD_RECOVERY_RUNNING 0 | 199 | #define MD_RECOVERY_RUNNING 0 |
198 | #define MD_RECOVERY_SYNC 1 | 200 | #define MD_RECOVERY_SYNC 1 |
199 | #define MD_RECOVERY_ERR 2 | ||
200 | #define MD_RECOVERY_INTR 3 | 201 | #define MD_RECOVERY_INTR 3 |
201 | #define MD_RECOVERY_DONE 4 | 202 | #define MD_RECOVERY_DONE 4 |
202 | #define MD_RECOVERY_NEEDED 5 | 203 | #define MD_RECOVERY_NEEDED 5 |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 44c81c744538..b358c704d102 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -246,6 +246,7 @@ enum rt_class_t | |||
246 | { | 246 | { |
247 | RT_TABLE_UNSPEC=0, | 247 | RT_TABLE_UNSPEC=0, |
248 | /* User defined values */ | 248 | /* User defined values */ |
249 | RT_TABLE_COMPAT=252, | ||
249 | RT_TABLE_DEFAULT=253, | 250 | RT_TABLE_DEFAULT=253, |
250 | RT_TABLE_MAIN=254, | 251 | RT_TABLE_MAIN=254, |
251 | RT_TABLE_LOCAL=255, | 252 | RT_TABLE_LOCAL=255, |
@@ -267,10 +268,10 @@ enum rtattr_type_t | |||
267 | RTA_PREFSRC, | 268 | RTA_PREFSRC, |
268 | RTA_METRICS, | 269 | RTA_METRICS, |
269 | RTA_MULTIPATH, | 270 | RTA_MULTIPATH, |
270 | RTA_PROTOINFO, | 271 | RTA_PROTOINFO, /* no longer used */ |
271 | RTA_FLOW, | 272 | RTA_FLOW, |
272 | RTA_CACHEINFO, | 273 | RTA_CACHEINFO, |
273 | RTA_SESSION, | 274 | RTA_SESSION, /* no longer used */ |
274 | RTA_MP_ALGO, /* no longer used */ | 275 | RTA_MP_ALGO, /* no longer used */ |
275 | RTA_TABLE, | 276 | RTA_TABLE, |
276 | __RTA_MAX | 277 | __RTA_MAX |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5395a6176f4b..c5d3f847ca8d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -766,7 +766,6 @@ struct sched_domain { | |||
766 | struct sched_domain *child; /* bottom domain must be null terminated */ | 766 | struct sched_domain *child; /* bottom domain must be null terminated */ |
767 | struct sched_group *groups; /* the balancing groups of the domain */ | 767 | struct sched_group *groups; /* the balancing groups of the domain */ |
768 | cpumask_t span; /* span of all CPUs in this domain */ | 768 | cpumask_t span; /* span of all CPUs in this domain */ |
769 | int first_cpu; /* cache of the first cpu in this domain */ | ||
770 | unsigned long min_interval; /* Minimum balance interval ms */ | 769 | unsigned long min_interval; /* Minimum balance interval ms */ |
771 | unsigned long max_interval; /* Maximum balance interval ms */ | 770 | unsigned long max_interval; /* Maximum balance interval ms */ |
772 | unsigned int busy_factor; /* less balancing by factor if busy */ | 771 | unsigned int busy_factor; /* less balancing by factor if busy */ |
@@ -1848,7 +1847,9 @@ extern void exit_thread(void); | |||
1848 | extern void exit_files(struct task_struct *); | 1847 | extern void exit_files(struct task_struct *); |
1849 | extern void __cleanup_signal(struct signal_struct *); | 1848 | extern void __cleanup_signal(struct signal_struct *); |
1850 | extern void __cleanup_sighand(struct sighand_struct *); | 1849 | extern void __cleanup_sighand(struct sighand_struct *); |
1850 | |||
1851 | extern void exit_itimers(struct signal_struct *); | 1851 | extern void exit_itimers(struct signal_struct *); |
1852 | extern void flush_itimer_signals(void); | ||
1852 | 1853 | ||
1853 | extern NORET_TYPE void do_group_exit(int); | 1854 | extern NORET_TYPE void do_group_exit(int); |
1854 | 1855 | ||
@@ -2025,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p) | |||
2025 | return signal_pending(p) && __fatal_signal_pending(p); | 2026 | return signal_pending(p) && __fatal_signal_pending(p); |
2026 | } | 2027 | } |
2027 | 2028 | ||
2029 | static inline int signal_pending_state(long state, struct task_struct *p) | ||
2030 | { | ||
2031 | if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) | ||
2032 | return 0; | ||
2033 | if (!signal_pending(p)) | ||
2034 | return 0; | ||
2035 | |||
2036 | if (state & (__TASK_STOPPED | __TASK_TRACED)) | ||
2037 | return 0; | ||
2038 | |||
2039 | return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); | ||
2040 | } | ||
2041 | |||
2028 | static inline int need_resched(void) | 2042 | static inline int need_resched(void) |
2029 | { | 2043 | { |
2030 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); | 2044 | return unlikely(test_thread_flag(TIF_NEED_RESCHED)); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 805ed4b92f9a..c2ad35016599 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
276 | return kmalloc(size, flags | __GFP_ZERO); | 276 | return kmalloc(size, flags | __GFP_ZERO); |
277 | } | 277 | } |
278 | 278 | ||
279 | /** | ||
280 | * kzalloc_node - allocate zeroed memory from a particular memory node. | ||
281 | * @size: how many bytes of memory are required. | ||
282 | * @flags: the type of memory to allocate (see kmalloc). | ||
283 | * @node: memory node from which to allocate | ||
284 | */ | ||
285 | static inline void *kzalloc_node(size_t size, gfp_t flags, int node) | ||
286 | { | ||
287 | return kmalloc_node(size, flags | __GFP_ZERO, node); | ||
288 | } | ||
289 | |||
279 | #ifdef CONFIG_SLABINFO | 290 | #ifdef CONFIG_SLABINFO |
280 | extern const struct seq_operations slabinfo_op; | 291 | extern const struct seq_operations slabinfo_op; |
281 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | 292 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); |
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index bca134544700..95c1c39ba445 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, | |||
71 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) | 71 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) |
72 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) | 72 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) |
73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | 73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) |
74 | #define SM501FB_FLAG_PANEL_USE_FPEN (1<<4) | 74 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) |
75 | #define SM501FB_FLAG_PANEL_USE_VBIASEN (1<<5) | 75 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) |
76 | 76 | ||
77 | struct sm501_platdata_fbsub { | 77 | struct sm501_platdata_fbsub { |
78 | struct fb_videomode *def_mode; | 78 | struct fb_videomode *def_mode; |
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index e9bbe3ebd721..d5ca78b93a3b 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_SPI_MMC_SPI_H | 1 | #ifndef __LINUX_SPI_MMC_SPI_H |
2 | #define __LINUX_SPI_MMC_SPI_H | 2 | #define __LINUX_SPI_MMC_SPI_H |
3 | 3 | ||
4 | #include <linux/interrupt.h> | ||
5 | |||
4 | struct device; | 6 | struct device; |
5 | struct mmc_host; | 7 | struct mmc_host; |
6 | 8 | ||
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 01fbdf5fef22..942e38736901 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name); | |||
100 | /* Get the device MAC address */ | 100 | /* Get the device MAC address */ |
101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
102 | { | 102 | { |
103 | #ifdef CONFIG_BCM947XX | 103 | #ifdef CONFIG_BCM47XX |
104 | char *res = nvram_get("et0macaddr"); | 104 | char *res = nvram_get("et0macaddr"); |
105 | if (res) | 105 | if (res) |
106 | memcpy(macaddr, res, 6); | 106 | memcpy(macaddr, res, 6); |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index c11bbcc081f9..05eb4664d0dd 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
@@ -71,7 +71,8 @@ extern atomic_t rdma_stat_sq_prod; | |||
71 | * completes. | 71 | * completes. |
72 | */ | 72 | */ |
73 | struct svc_rdma_op_ctxt { | 73 | struct svc_rdma_op_ctxt { |
74 | struct svc_rdma_op_ctxt *next; | 74 | struct svc_rdma_op_ctxt *read_hdr; |
75 | struct list_head free_list; | ||
75 | struct xdr_buf arg; | 76 | struct xdr_buf arg; |
76 | struct list_head dto_q; | 77 | struct list_head dto_q; |
77 | enum ib_wr_opcode wr_op; | 78 | enum ib_wr_opcode wr_op; |
@@ -85,7 +86,6 @@ struct svc_rdma_op_ctxt { | |||
85 | struct page *pages[RPCSVC_MAXPAGES]; | 86 | struct page *pages[RPCSVC_MAXPAGES]; |
86 | }; | 87 | }; |
87 | 88 | ||
88 | #define RDMACTXT_F_READ_DONE 1 | ||
89 | #define RDMACTXT_F_LAST_CTXT 2 | 89 | #define RDMACTXT_F_LAST_CTXT 2 |
90 | 90 | ||
91 | struct svcxprt_rdma { | 91 | struct svcxprt_rdma { |
@@ -104,7 +104,8 @@ struct svcxprt_rdma { | |||
104 | 104 | ||
105 | struct ib_pd *sc_pd; | 105 | struct ib_pd *sc_pd; |
106 | 106 | ||
107 | struct svc_rdma_op_ctxt *sc_ctxt_head; | 107 | atomic_t sc_ctxt_used; |
108 | struct list_head sc_ctxt_free; | ||
108 | int sc_ctxt_cnt; | 109 | int sc_ctxt_cnt; |
109 | int sc_ctxt_bump; | 110 | int sc_ctxt_bump; |
110 | int sc_ctxt_max; | 111 | int sc_ctxt_max; |
@@ -123,6 +124,7 @@ struct svcxprt_rdma { | |||
123 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ | 124 | struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ |
124 | struct list_head sc_read_complete_q; | 125 | struct list_head sc_read_complete_q; |
125 | spinlock_t sc_read_complete_lock; | 126 | spinlock_t sc_read_complete_lock; |
127 | struct work_struct sc_work; | ||
126 | }; | 128 | }; |
127 | /* sc_flags */ | 129 | /* sc_flags */ |
128 | #define RDMAXPRT_RQ_PENDING 1 | 130 | #define RDMAXPRT_RQ_PENDING 1 |
@@ -164,8 +166,8 @@ extern int svc_rdma_sendto(struct svc_rqst *); | |||
164 | 166 | ||
165 | /* svc_rdma_transport.c */ | 167 | /* svc_rdma_transport.c */ |
166 | extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); | 168 | extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); |
167 | extern int svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *, | 169 | extern void svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *, |
168 | enum rpcrdma_errcode); | 170 | enum rpcrdma_errcode); |
169 | struct page *svc_rdma_get_page(void); | 171 | struct page *svc_rdma_get_page(void); |
170 | extern int svc_rdma_post_recv(struct svcxprt_rdma *); | 172 | extern int svc_rdma_post_recv(struct svcxprt_rdma *); |
171 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); | 173 | extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index d96d9b122304..b31b6b74aa28 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | |||
239 | return (struct tcp_request_sock *)req; | 239 | return (struct tcp_request_sock *)req; |
240 | } | 240 | } |
241 | 241 | ||
242 | struct tcp_deferred_accept_info { | ||
243 | struct sock *listen_sk; | ||
244 | struct request_sock *request; | ||
245 | }; | ||
246 | |||
247 | struct tcp_sock { | 242 | struct tcp_sock { |
248 | /* inet_connection_sock has to be the first member of tcp_sock */ | 243 | /* inet_connection_sock has to be the first member of tcp_sock */ |
249 | struct inet_connection_sock inet_conn; | 244 | struct inet_connection_sock inet_conn; |
@@ -355,7 +350,7 @@ struct tcp_sock { | |||
355 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ | 350 | u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ |
356 | 351 | ||
357 | u16 advmss; /* Advertised MSS */ | 352 | u16 advmss; /* Advertised MSS */ |
358 | u16 prior_ssthresh; /* ssthresh saved at recovery start */ | 353 | u32 prior_ssthresh; /* ssthresh saved at recovery start */ |
359 | u32 lost_out; /* Lost packets */ | 354 | u32 lost_out; /* Lost packets */ |
360 | u32 sacked_out; /* SACK'd packets */ | 355 | u32 sacked_out; /* SACK'd packets */ |
361 | u32 fackets_out; /* FACK'd packets */ | 356 | u32 fackets_out; /* FACK'd packets */ |
@@ -379,8 +374,6 @@ struct tcp_sock { | |||
379 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 374 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
380 | int linger2; | 375 | int linger2; |
381 | 376 | ||
382 | struct tcp_deferred_accept_info defer_tcp_accept; | ||
383 | |||
384 | unsigned long last_synq_overflow; | 377 | unsigned long last_synq_overflow; |
385 | 378 | ||
386 | u32 tso_deferred; | 379 | u32 tso_deferred; |
diff --git a/include/linux/time.h b/include/linux/time.h index d32ef0ad4c0a..e15206a7e82e 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | # include <linux/cache.h> | 7 | # include <linux/cache.h> |
8 | # include <linux/seqlock.h> | 8 | # include <linux/seqlock.h> |
9 | # include <linux/math64.h> | ||
9 | #endif | 10 | #endif |
10 | 11 | ||
11 | #ifndef _STRUCT_TIMESPEC | 12 | #ifndef _STRUCT_TIMESPEC |
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec); | |||
169 | * timespec_add_ns - Adds nanoseconds to a timespec | 170 | * timespec_add_ns - Adds nanoseconds to a timespec |
170 | * @a: pointer to timespec to be incremented | 171 | * @a: pointer to timespec to be incremented |
171 | * @ns: unsigned nanoseconds value to be added | 172 | * @ns: unsigned nanoseconds value to be added |
173 | * | ||
174 | * This must always be inlined because its used from the x86-64 vdso, | ||
175 | * which cannot call other kernel functions. | ||
172 | */ | 176 | */ |
173 | static inline void timespec_add_ns(struct timespec *a, u64 ns) | 177 | static __always_inline void timespec_add_ns(struct timespec *a, u64 ns) |
174 | { | 178 | { |
175 | ns += a->tv_nsec; | 179 | a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns); |
176 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
177 | /* The following asm() prevents the compiler from | ||
178 | * optimising this loop into a modulo operation. */ | ||
179 | asm("" : "+r"(ns)); | ||
180 | |||
181 | ns -= NSEC_PER_SEC; | ||
182 | a->tv_sec++; | ||
183 | } | ||
184 | a->tv_nsec = ns; | 180 | a->tv_nsec = ns; |
185 | } | 181 | } |
186 | #endif /* __KERNEL__ */ | 182 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/topology.h b/include/linux/topology.h index 4bb7074a2c3a..24f3d2282e11 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -166,7 +166,9 @@ void arch_update_cpu_topology(void); | |||
166 | .busy_idx = 3, \ | 166 | .busy_idx = 3, \ |
167 | .idle_idx = 3, \ | 167 | .idle_idx = 3, \ |
168 | .flags = SD_LOAD_BALANCE \ | 168 | .flags = SD_LOAD_BALANCE \ |
169 | | SD_SERIALIZE, \ | 169 | | SD_BALANCE_NEWIDLE \ |
170 | | SD_WAKE_AFFINE \ | ||
171 | | SD_SERIALIZE, \ | ||
170 | .last_balance = jiffies, \ | 172 | .last_balance = jiffies, \ |
171 | .balance_interval = 64, \ | 173 | .balance_interval = 64, \ |
172 | } | 174 | } |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 7f7121f9c968..324a3b231d40 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define N_6PACK 7 | 36 | #define N_6PACK 7 |
37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | 37 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ |
38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | 38 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ |
39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | 39 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ |
40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | 40 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ |
41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | 41 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ |
42 | /* cards about SMS messages */ | 42 | /* cards about SMS messages */ |
diff --git a/include/linux/types.h b/include/linux/types.h index 9dc2346627b4..d4a9ce6e2760 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -197,8 +197,6 @@ typedef u64 resource_size_t; | |||
197 | typedef u32 resource_size_t; | 197 | typedef u32 resource_size_t; |
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | #endif /* __KERNEL__ */ | ||
201 | |||
202 | struct ustat { | 200 | struct ustat { |
203 | __kernel_daddr_t f_tfree; | 201 | __kernel_daddr_t f_tfree; |
204 | __kernel_ino_t f_tinode; | 202 | __kernel_ino_t f_tinode; |
@@ -206,4 +204,6 @@ struct ustat { | |||
206 | char f_fpack[6]; | 204 | char f_fpack[6]; |
207 | }; | 205 | }; |
208 | 206 | ||
207 | #endif /* __KERNEL__ */ | ||
208 | |||
209 | #endif /* _LINUX_TYPES_H */ | 209 | #endif /* _LINUX_TYPES_H */ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 71e52f2f6a38..ca228bb94218 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -130,6 +130,15 @@ struct usb_cdc_ether_desc { | |||
130 | __u8 bNumberPowerFilters; | 130 | __u8 bNumberPowerFilters; |
131 | } __attribute__ ((packed)); | 131 | } __attribute__ ((packed)); |
132 | 132 | ||
133 | /* "Telephone Control Model Functional Descriptor" from CDC WMC spec 6.3..3 */ | ||
134 | struct usb_cdc_dmm_desc { | ||
135 | __u8 bFunctionLength; | ||
136 | __u8 bDescriptorType; | ||
137 | __u8 bDescriptorSubtype; | ||
138 | __u16 bcdVersion; | ||
139 | __le16 wMaxCommand; | ||
140 | } __attribute__ ((packed)); | ||
141 | |||
133 | /* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ | 142 | /* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ |
134 | struct usb_cdc_mdlm_desc { | 143 | struct usb_cdc_mdlm_desc { |
135 | __u8 bLength; | 144 | __u8 bLength; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index c1411189ba6c..4a535ea1e123 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -865,9 +865,9 @@ struct v4l2_querymenu | |||
865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) | 865 | #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) |
866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) | 866 | #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) |
867 | 867 | ||
868 | /* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ | 868 | /* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ |
869 | #define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) | 869 | #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) |
870 | #define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) | 870 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) |
871 | 871 | ||
872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) | 872 | #define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) |
873 | enum v4l2_power_line_frequency { | 873 | enum v4l2_power_line_frequency { |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index d4695a3356d0..5f79a5f9de79 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -10,18 +10,19 @@ | |||
10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ | 10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ |
11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ | 11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ |
12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ | 12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ |
13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | ||
13 | 14 | ||
14 | struct virtio_blk_config | 15 | struct virtio_blk_config |
15 | { | 16 | { |
16 | /* The capacity (in 512-byte sectors). */ | 17 | /* The capacity (in 512-byte sectors). */ |
17 | __le64 capacity; | 18 | __u64 capacity; |
18 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 19 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
19 | __le32 size_max; | 20 | __u32 size_max; |
20 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ | 21 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ |
21 | __le32 seg_max; | 22 | __u32 seg_max; |
22 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ | 23 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ |
23 | struct virtio_blk_geometry { | 24 | struct virtio_blk_geometry { |
24 | __le16 cylinders; | 25 | __u16 cylinders; |
25 | __u8 heads; | 26 | __u8 heads; |
26 | __u8 sectors; | 27 | __u8 sectors; |
27 | } geometry; | 28 | } geometry; |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 50db245c81ad..f364bbf63c34 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -15,6 +15,10 @@ | |||
15 | /* We've given up on this device. */ | 15 | /* We've given up on this device. */ |
16 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 16 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
17 | 17 | ||
18 | /* Do we get callbacks when the ring is completely used, even if we've | ||
19 | * suppressed them? */ | ||
20 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 | ||
21 | |||
18 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
19 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
20 | 24 | ||
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
99 | * The return value is -ENOENT if the feature doesn't exist. Otherwise | 103 | * The return value is -ENOENT if the feature doesn't exist. Otherwise |
100 | * the config value is copied into whatever is pointed to by v. */ | 104 | * the config value is copied into whatever is pointed to by v. */ |
101 | #define virtio_config_val(vdev, fbit, offset, v) \ | 105 | #define virtio_config_val(vdev, fbit, offset, v) \ |
102 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) | 106 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) |
103 | 107 | ||
104 | static inline int virtio_config_buf(struct virtio_device *vdev, | 108 | static inline int virtio_config_buf(struct virtio_device *vdev, |
105 | unsigned int fbit, | 109 | unsigned int fbit, |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 9405aa6cdf26..38c0571820fb 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -38,7 +38,7 @@ struct virtio_net_hdr | |||
38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set | 38 | #define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set |
39 | __u8 gso_type; | 39 | __u8 gso_type; |
40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 40 | __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
41 | __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ | 41 | __u16 gso_size; /* Bytes to append to hdr_len per frame */ |
42 | __u16 csum_start; /* Position to start checksumming from */ | 42 | __u16 csum_start; /* Position to start checksumming from */ |
43 | __u16 csum_offset; /* Offset after that to place checksum */ | 43 | __u16 csum_offset; /* Offset after that to place checksum */ |
44 | }; | 44 | }; |
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h new file mode 100644 index 000000000000..331afb6c9f62 --- /dev/null +++ b/include/linux/virtio_rng.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RNG_H | ||
2 | #define _LINUX_VIRTIO_RNG_H | ||
3 | #include <linux/virtio_config.h> | ||
4 | |||
5 | /* The ID for virtio_rng */ | ||
6 | #define VIRTIO_ID_RNG 4 | ||
7 | |||
8 | #endif /* _LINUX_VIRTIO_RNG_H */ | ||
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 4d13732e9cf0..6f69968eab24 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | 100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ |
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | 101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ |
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | 102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ |
103 | #define WM9713_45W 0x1000 /* set for 5 wire panel */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | 104 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ |
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | 105 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ |
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | 106 | #define WM9713_WAIT 0x0200 /* coordinate wait */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index a807d2f86ee8..33f01ae08f76 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #define VFL_TYPE_VTX 3 | 40 | #define VFL_TYPE_VTX 3 |
41 | 41 | ||
42 | /* Video standard functions */ | 42 | /* Video standard functions */ |
43 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | ||
44 | extern char *v4l2_norm_to_name(v4l2_std_id id); | 43 | extern char *v4l2_norm_to_name(v4l2_std_id id); |
45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
46 | int id, char *name); | 45 | int id, char *name); |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 5b39a22533fe..874f1340d049 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -237,6 +237,9 @@ unsigned int videobuf_poll_stream(struct file *file, | |||
237 | int videobuf_mmap_setup(struct videobuf_queue *q, | 237 | int videobuf_mmap_setup(struct videobuf_queue *q, |
238 | unsigned int bcount, unsigned int bsize, | 238 | unsigned int bcount, unsigned int bsize, |
239 | enum v4l2_memory memory); | 239 | enum v4l2_memory memory); |
240 | int __videobuf_mmap_setup(struct videobuf_queue *q, | ||
241 | unsigned int bcount, unsigned int bsize, | ||
242 | enum v4l2_memory memory); | ||
240 | int videobuf_mmap_free(struct videobuf_queue *q); | 243 | int videobuf_mmap_free(struct videobuf_queue *q); |
241 | int videobuf_mmap_mapper(struct videobuf_queue *q, | 244 | int videobuf_mmap_mapper(struct videobuf_queue *q, |
242 | struct vm_area_struct *vma); | 245 | struct vm_area_struct *vma); |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 0a2f0372df31..bbd3d583c6e6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev, | |||
94 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 94 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
95 | struct in6_addr *addr); | 95 | struct in6_addr *addr); |
96 | 96 | ||
97 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | ||
98 | unsigned unit) | ||
99 | { | ||
100 | if (timeout == 0xffffffff) | ||
101 | return ~0UL; | ||
102 | |||
103 | /* | ||
104 | * Avoid arithmetic overflow. | ||
105 | * Assuming unit is constant and non-zero, this "if" statement | ||
106 | * will go away on 64bit archs. | ||
107 | */ | ||
108 | if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit) | ||
109 | return LONG_MAX / unit; | ||
110 | |||
111 | return timeout; | ||
112 | } | ||
113 | |||
114 | static inline int addrconf_finite_timeout(unsigned long timeout) | ||
115 | { | ||
116 | return ~timeout; | ||
117 | } | ||
118 | |||
97 | /* | 119 | /* |
98 | * IPv6 Address Label subsystem (addrlabel.c) | 120 | * IPv6 Address Label subsystem (addrlabel.c) |
99 | */ | 121 | */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index a42cd63d241a..9fabe5b38912 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb) | |||
197 | return skb->rtable->rt_iif; | 197 | return skb->rtable->rt_iif; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) | ||
201 | { | ||
202 | struct request_sock *req = reqsk_alloc(ops); | ||
203 | |||
204 | if (req != NULL) | ||
205 | inet_rsk(req)->opt = NULL; | ||
206 | |||
207 | return req; | ||
208 | } | ||
209 | |||
200 | #endif /* _INET_SOCK_H */ | 210 | #endif /* _INET_SOCK_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 4a80d74975e8..dae3f9ec1154 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1594,13 +1594,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw); | |||
1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); | 1594 | void ieee80211_scan_completed(struct ieee80211_hw *hw); |
1595 | 1595 | ||
1596 | /** | 1596 | /** |
1597 | * ieee80211_iterate_active_interfaces - iterate active interfaces | 1597 | * ieee80211_iterate_active_interfaces- iterate active interfaces |
1598 | * | 1598 | * |
1599 | * This function iterates over the interfaces associated with a given | 1599 | * This function iterates over the interfaces associated with a given |
1600 | * hardware that are currently active and calls the callback for them. | 1600 | * hardware that are currently active and calls the callback for them. |
1601 | * This function allows the iterator function to sleep, when the iterator | ||
1602 | * function is atomic @ieee80211_iterate_active_interfaces_atomic can | ||
1603 | * be used. | ||
1601 | * | 1604 | * |
1602 | * @hw: the hardware struct of which the interfaces should be iterated over | 1605 | * @hw: the hardware struct of which the interfaces should be iterated over |
1603 | * @iterator: the iterator function to call, cannot sleep | 1606 | * @iterator: the iterator function to call |
1604 | * @data: first argument of the iterator function | 1607 | * @data: first argument of the iterator function |
1605 | */ | 1608 | */ |
1606 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | 1609 | void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, |
@@ -1609,6 +1612,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, | |||
1609 | void *data); | 1612 | void *data); |
1610 | 1613 | ||
1611 | /** | 1614 | /** |
1615 | * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces | ||
1616 | * | ||
1617 | * This function iterates over the interfaces associated with a given | ||
1618 | * hardware that are currently active and calls the callback for them. | ||
1619 | * This function requires the iterator callback function to be atomic, | ||
1620 | * if that is not desired, use @ieee80211_iterate_active_interfaces instead. | ||
1621 | * | ||
1622 | * @hw: the hardware struct of which the interfaces should be iterated over | ||
1623 | * @iterator: the iterator function to call, cannot sleep | ||
1624 | * @data: first argument of the iterator function | ||
1625 | */ | ||
1626 | void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | ||
1627 | void (*iterator)(void *data, | ||
1628 | u8 *mac, | ||
1629 | struct ieee80211_vif *vif), | ||
1630 | void *data); | ||
1631 | |||
1632 | /** | ||
1612 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1633 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1613 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1634 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1614 | * @ra: receiver address of the BA session recipient | 1635 | * @ra: receiver address of the BA session recipient |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 9c451ff2f4f4..a01b7c4dc763 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -129,6 +129,10 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, | |||
129 | void __user *buffer, | 129 | void __user *buffer, |
130 | size_t *lenp, | 130 | size_t *lenp, |
131 | loff_t *ppos); | 131 | loff_t *ppos); |
132 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | ||
133 | int nlen, void __user *oldval, | ||
134 | size_t __user *oldlenp, | ||
135 | void __user *newval, size_t newlen); | ||
132 | #endif | 136 | #endif |
133 | 137 | ||
134 | extern void inet6_ifinfo_notify(int event, | 138 | extern void inet6_ifinfo_notify(int event, |
diff --git a/include/net/netlink.h b/include/net/netlink.h index a5506c42f03c..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -772,12 +770,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
772 | const struct nla_policy *policy, | 770 | const struct nla_policy *policy, |
773 | int len) | 771 | int len) |
774 | { | 772 | { |
775 | if (nla_len(nla) < len) | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | return -1; | 774 | |
777 | if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) | 775 | if (nested_len < 0) |
778 | return nla_parse_nested(tb, maxtype, | 776 | return -EINVAL; |
779 | nla_data(nla) + NLA_ALIGN(len), | 777 | if (nested_len >= nla_attr_size(0)) |
780 | policy); | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
779 | nested_len, policy); | ||
781 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); | 780 | memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); |
782 | return 0; | 781 | return 0; |
783 | } | 782 | } |
@@ -1079,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1079 | * @start: container attribute | 1078 | * @start: container attribute |
1080 | * | 1079 | * |
1081 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1082 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1083 | */ | 1082 | */ |
1084 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1085 | { | 1084 | { |
1086 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1087 | } | 1086 | } |
1088 | 1087 | ||
1089 | /** | 1088 | /** |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index b220b5f624de..0c96e7bed5db 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -115,8 +115,8 @@ struct request_sock_queue { | |||
115 | struct request_sock *rskq_accept_head; | 115 | struct request_sock *rskq_accept_head; |
116 | struct request_sock *rskq_accept_tail; | 116 | struct request_sock *rskq_accept_tail; |
117 | rwlock_t syn_wait_lock; | 117 | rwlock_t syn_wait_lock; |
118 | u16 rskq_defer_accept; | 118 | u8 rskq_defer_accept; |
119 | /* 2 bytes hole, try to pack */ | 119 | /* 3 bytes hole, try to pack */ |
120 | struct listen_sock *listen_opt; | 120 | struct listen_sock *listen_opt; |
121 | }; | 121 | }; |
122 | 122 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 0ce0443c5b79..7f25195f9855 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -548,7 +548,8 @@ struct sctp_af { | |||
548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 548 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, |
549 | union sctp_addr *daddr, | 549 | union sctp_addr *daddr, |
550 | union sctp_addr *saddr); | 550 | union sctp_addr *saddr); |
551 | void (*get_saddr) (struct sctp_association *asoc, | 551 | void (*get_saddr) (struct sctp_sock *sk, |
552 | struct sctp_association *asoc, | ||
552 | struct dst_entry *dst, | 553 | struct dst_entry *dst, |
553 | union sctp_addr *daddr, | 554 | union sctp_addr *daddr, |
554 | union sctp_addr *saddr); | 555 | union sctp_addr *saddr); |
@@ -587,6 +588,7 @@ struct sctp_af { | |||
587 | int (*is_ce) (const struct sk_buff *sk); | 588 | int (*is_ce) (const struct sk_buff *sk); |
588 | void (*seq_dump_addr)(struct seq_file *seq, | 589 | void (*seq_dump_addr)(struct seq_file *seq, |
589 | union sctp_addr *addr); | 590 | union sctp_addr *addr); |
591 | void (*ecn_capable)(struct sock *sk); | ||
590 | __u16 net_header_len; | 592 | __u16 net_header_len; |
591 | int sockaddr_len; | 593 | int sockaddr_len; |
592 | sa_family_t sa_family; | 594 | sa_family_t sa_family; |
@@ -901,7 +903,10 @@ struct sctp_transport { | |||
901 | * calculation completes (i.e. the DATA chunk | 903 | * calculation completes (i.e. the DATA chunk |
902 | * is SACK'd) clear this flag. | 904 | * is SACK'd) clear this flag. |
903 | */ | 905 | */ |
904 | int rto_pending; | 906 | __u8 rto_pending; |
907 | |||
908 | /* Flag to track the current fast recovery state */ | ||
909 | __u8 fast_recovery; | ||
905 | 910 | ||
906 | /* | 911 | /* |
907 | * These are the congestion stats. | 912 | * These are the congestion stats. |
@@ -920,6 +925,9 @@ struct sctp_transport { | |||
920 | /* Data that has been sent, but not acknowledged. */ | 925 | /* Data that has been sent, but not acknowledged. */ |
921 | __u32 flight_size; | 926 | __u32 flight_size; |
922 | 927 | ||
928 | /* TSN marking the fast recovery exit point */ | ||
929 | __u32 fast_recovery_exit; | ||
930 | |||
923 | /* Destination */ | 931 | /* Destination */ |
924 | struct dst_entry *dst; | 932 | struct dst_entry *dst; |
925 | /* Source address. */ | 933 | /* Source address. */ |
@@ -1044,7 +1052,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1044 | struct sctp_sock *); | 1052 | struct sctp_sock *); |
1045 | void sctp_transport_pmtu(struct sctp_transport *); | 1053 | void sctp_transport_pmtu(struct sctp_transport *); |
1046 | void sctp_transport_free(struct sctp_transport *); | 1054 | void sctp_transport_free(struct sctp_transport *); |
1047 | void sctp_transport_reset_timers(struct sctp_transport *); | 1055 | void sctp_transport_reset_timers(struct sctp_transport *, int); |
1048 | void sctp_transport_hold(struct sctp_transport *); | 1056 | void sctp_transport_hold(struct sctp_transport *); |
1049 | void sctp_transport_put(struct sctp_transport *); | 1057 | void sctp_transport_put(struct sctp_transport *); |
1050 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1058 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1134,6 +1142,9 @@ struct sctp_outq { | |||
1134 | /* How many unackd bytes do we have in-flight? */ | 1142 | /* How many unackd bytes do we have in-flight? */ |
1135 | __u32 outstanding_bytes; | 1143 | __u32 outstanding_bytes; |
1136 | 1144 | ||
1145 | /* Are we doing fast-rtx on this queue */ | ||
1146 | char fast_rtx; | ||
1147 | |||
1137 | /* Corked? */ | 1148 | /* Corked? */ |
1138 | char cork; | 1149 | char cork; |
1139 | 1150 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 633147cb6bbc..cf54034019d9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
139 | #define MAX_TCP_KEEPINTVL 32767 | 139 | #define MAX_TCP_KEEPINTVL 32767 |
140 | #define MAX_TCP_KEEPCNT 127 | 140 | #define MAX_TCP_KEEPCNT 127 |
141 | #define MAX_TCP_SYNCNT 127 | 141 | #define MAX_TCP_SYNCNT 127 |
142 | #define MAX_TCP_ACCEPT_DEFERRED 65535 | ||
143 | 142 | ||
144 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ | 143 | #define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ |
145 | 144 | ||
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk, | |||
433 | 432 | ||
434 | extern int tcp_disconnect(struct sock *sk, int flags); | 433 | extern int tcp_disconnect(struct sock *sk, int flags); |
435 | 434 | ||
436 | extern void tcp_unhash(struct sock *sk); | ||
437 | 435 | ||
438 | /* From syncookies.c */ | 436 | /* From syncookies.c */ |
439 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 437 | extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 27394e0447d8..112934a3288d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk, | |||
40 | struct msghdr *msg, | 40 | struct msghdr *msg, |
41 | struct sk_buff *skb); | 41 | struct sk_buff *skb); |
42 | 42 | ||
43 | extern int datagram_send_ctl(struct msghdr *msg, | 43 | extern int datagram_send_ctl(struct net *net, |
44 | struct msghdr *msg, | ||
44 | struct flowi *fl, | 45 | struct flowi *fl, |
45 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
46 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e55a99b0ba3..ccce83707046 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32); | |||
135 | 135 | ||
136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
137 | struct msghdr *msg, size_t len); | 137 | struct msghdr *msg, size_t len); |
138 | extern void udp_flush_pending_frames(struct sock *sk); | ||
138 | 139 | ||
139 | extern int udp_rcv(struct sk_buff *skb); | 140 | extern int udp_rcv(struct sk_buff *skb); |
140 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 141 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 911a661b7278..31d30b1852e8 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -105,7 +105,6 @@ enum ib_device_cap_flags { | |||
105 | */ | 105 | */ |
106 | IB_DEVICE_UD_IP_CSUM = (1<<18), | 106 | IB_DEVICE_UD_IP_CSUM = (1<<18), |
107 | IB_DEVICE_UD_TSO = (1<<19), | 107 | IB_DEVICE_UD_TSO = (1<<19), |
108 | IB_DEVICE_SEND_W_INV = (1<<21), | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | enum ib_atomic_cap { | 110 | enum ib_atomic_cap { |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 049edc5e6461..9c309daf492b 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -505,6 +505,7 @@ struct snd_ac97 { | |||
505 | unsigned short pcmreg[3]; // PCM registers | 505 | unsigned short pcmreg[3]; // PCM registers |
506 | unsigned short codec_cfg[3]; // CODEC_CFG bits | 506 | unsigned short codec_cfg[3]; // CODEC_CFG bits |
507 | unsigned char swap_mic_linein; // AD1986/AD1986A only | 507 | unsigned char swap_mic_linein; // AD1986/AD1986A only |
508 | unsigned char lo_as_master; /* LO as master */ | ||
508 | } ad18xx; | 509 | } ad18xx; |
509 | unsigned int dev_flags; /* device specific */ | 510 | unsigned int dev_flags; /* device specific */ |
510 | } spec; | 511 | } spec; |
diff --git a/init/Kconfig b/init/Kconfig index 6135d07f31ec..6199d1120900 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -13,6 +13,7 @@ config DEFCONFIG_LIST | |||
13 | default "/lib/modules/$UNAME_RELEASE/.config" | 13 | default "/lib/modules/$UNAME_RELEASE/.config" |
14 | default "/etc/kernel-config" | 14 | default "/etc/kernel-config" |
15 | default "/boot/config-$UNAME_RELEASE" | 15 | default "/boot/config-$UNAME_RELEASE" |
16 | default "$ARCH_DEFCONFIG" | ||
16 | default "arch/$ARCH/defconfig" | 17 | default "arch/$ARCH/defconfig" |
17 | 18 | ||
18 | menu "General setup" | 19 | menu "General setup" |
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index 7473b0c59d4d..693d24694a6c 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c | |||
@@ -24,7 +24,6 @@ static struct { | |||
24 | 24 | ||
25 | static int md_setup_ents __initdata; | 25 | static int md_setup_ents __initdata; |
26 | 26 | ||
27 | extern int mdp_major; | ||
28 | /* | 27 | /* |
29 | * Parse the command-line parameters given our kernel, but do not | 28 | * Parse the command-line parameters given our kernel, but do not |
30 | * actually try to invoke the MD device now; that is handled by | 29 | * actually try to invoke the MD device now; that is handled by |
@@ -98,20 +98,15 @@ void recompute_msgmni(struct ipc_namespace *ns) | |||
98 | 98 | ||
99 | if (allowed < MSGMNI) { | 99 | if (allowed < MSGMNI) { |
100 | ns->msg_ctlmni = MSGMNI; | 100 | ns->msg_ctlmni = MSGMNI; |
101 | goto out_callback; | 101 | return; |
102 | } | 102 | } |
103 | 103 | ||
104 | if (allowed > IPCMNI / nb_ns) { | 104 | if (allowed > IPCMNI / nb_ns) { |
105 | ns->msg_ctlmni = IPCMNI / nb_ns; | 105 | ns->msg_ctlmni = IPCMNI / nb_ns; |
106 | goto out_callback; | 106 | return; |
107 | } | 107 | } |
108 | 108 | ||
109 | ns->msg_ctlmni = allowed; | 109 | ns->msg_ctlmni = allowed; |
110 | |||
111 | out_callback: | ||
112 | |||
113 | printk(KERN_INFO "msgmni has been set to %d for ipc namespace %p\n", | ||
114 | ns->msg_ctlmni, ns); | ||
115 | } | 110 | } |
116 | 111 | ||
117 | void msg_init_ns(struct ipc_namespace *ns) | 112 | void msg_init_ns(struct ipc_namespace *ns) |
@@ -136,6 +131,10 @@ void msg_exit_ns(struct ipc_namespace *ns) | |||
136 | void __init msg_init(void) | 131 | void __init msg_init(void) |
137 | { | 132 | { |
138 | msg_init_ns(&init_ipc_ns); | 133 | msg_init_ns(&init_ipc_ns); |
134 | |||
135 | printk(KERN_INFO "msgmni has been set to %d\n", | ||
136 | init_ipc_ns.msg_ctlmni); | ||
137 | |||
139 | ipc_init_proc_interface("sysvipc/msg", | 138 | ipc_init_proc_interface("sysvipc/msg", |
140 | " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n", | 139 | " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n", |
141 | IPC_MSG_IDS, sysvipc_msg_proc_show); | 140 | IPC_MSG_IDS, sysvipc_msg_proc_show); |
@@ -894,8 +894,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr) | |||
894 | if (!sfd) | 894 | if (!sfd) |
895 | goto out_put_dentry; | 895 | goto out_put_dentry; |
896 | 896 | ||
897 | err = -ENOMEM; | ||
898 | |||
899 | file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations); | 897 | file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations); |
900 | if (!file) | 898 | if (!file) |
901 | goto out_free; | 899 | goto out_free; |
@@ -1060,16 +1058,16 @@ asmlinkage long sys_shmdt(char __user *shmaddr) | |||
1060 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it) | 1058 | static int sysvipc_shm_proc_show(struct seq_file *s, void *it) |
1061 | { | 1059 | { |
1062 | struct shmid_kernel *shp = it; | 1060 | struct shmid_kernel *shp = it; |
1063 | char *format; | ||
1064 | 1061 | ||
1065 | #define SMALL_STRING "%10d %10d %4o %10u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" | 1062 | #if BITS_PER_LONG <= 32 |
1066 | #define BIG_STRING "%10d %10d %4o %21u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" | 1063 | #define SIZE_SPEC "%10lu" |
1064 | #else | ||
1065 | #define SIZE_SPEC "%21lu" | ||
1066 | #endif | ||
1067 | 1067 | ||
1068 | if (sizeof(size_t) <= sizeof(int)) | 1068 | return seq_printf(s, |
1069 | format = SMALL_STRING; | 1069 | "%10d %10d %4o " SIZE_SPEC " %5u %5u " |
1070 | else | 1070 | "%5lu %5u %5u %5u %5u %10lu %10lu %10lu\n", |
1071 | format = BIG_STRING; | ||
1072 | return seq_printf(s, format, | ||
1073 | shp->shm_perm.key, | 1071 | shp->shm_perm.key, |
1074 | shp->shm_perm.id, | 1072 | shp->shm_perm.id, |
1075 | shp->shm_perm.mode, | 1073 | shp->shm_perm.mode, |
diff --git a/kernel/audit.c b/kernel/audit.c index b7d3709cc452..e8692a5748c2 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -572,16 +572,17 @@ void audit_send_reply(int pid, int seq, int type, int done, int multi, | |||
572 | 572 | ||
573 | skb = audit_make_reply(pid, seq, type, done, multi, payload, size); | 573 | skb = audit_make_reply(pid, seq, type, done, multi, payload, size); |
574 | if (!skb) | 574 | if (!skb) |
575 | return; | 575 | goto out; |
576 | 576 | ||
577 | reply->pid = pid; | 577 | reply->pid = pid; |
578 | reply->skb = skb; | 578 | reply->skb = skb; |
579 | 579 | ||
580 | tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply"); | 580 | tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply"); |
581 | if (IS_ERR(tsk)) { | 581 | if (!IS_ERR(tsk)) |
582 | kfree(reply); | 582 | return; |
583 | kfree_skb(skb); | 583 | kfree_skb(skb); |
584 | } | 584 | out: |
585 | kfree(reply); | ||
585 | } | 586 | } |
586 | 587 | ||
587 | /* | 588 | /* |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 9ef5e0aacc3c..f7921a2ecf16 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -172,10 +172,9 @@ static void insert_hash(struct audit_chunk *chunk) | |||
172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) | 172 | struct audit_chunk *audit_tree_lookup(const struct inode *inode) |
173 | { | 173 | { |
174 | struct list_head *list = chunk_hash(inode); | 174 | struct list_head *list = chunk_hash(inode); |
175 | struct list_head *pos; | 175 | struct audit_chunk *p; |
176 | 176 | ||
177 | list_for_each_rcu(pos, list) { | 177 | list_for_each_entry_rcu(p, list, hash) { |
178 | struct audit_chunk *p = container_of(pos, struct audit_chunk, hash); | ||
179 | if (p->watch.inode == inode) { | 178 | if (p->watch.inode == inode) { |
180 | get_inotify_watch(&p->watch); | 179 | get_inotify_watch(&p->watch); |
181 | return p; | 180 | return p; |
diff --git a/kernel/capability.c b/kernel/capability.c index 39e8193b41ea..cfbe44299488 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
@@ -53,6 +53,69 @@ static void warn_legacy_capability_use(void) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Version 2 capabilities worked fine, but the linux/capability.h file | ||
57 | * that accompanied their introduction encouraged their use without | ||
58 | * the necessary user-space source code changes. As such, we have | ||
59 | * created a version 3 with equivalent functionality to version 2, but | ||
60 | * with a header change to protect legacy source code from using | ||
61 | * version 2 when it wanted to use version 1. If your system has code | ||
62 | * that trips the following warning, it is using version 2 specific | ||
63 | * capabilities and may be doing so insecurely. | ||
64 | * | ||
65 | * The remedy is to either upgrade your version of libcap (to 2.10+, | ||
66 | * if the application is linked against it), or recompile your | ||
67 | * application with modern kernel headers and this warning will go | ||
68 | * away. | ||
69 | */ | ||
70 | |||
71 | static void warn_deprecated_v2(void) | ||
72 | { | ||
73 | static int warned; | ||
74 | |||
75 | if (!warned) { | ||
76 | char name[sizeof(current->comm)]; | ||
77 | |||
78 | printk(KERN_INFO "warning: `%s' uses deprecated v2" | ||
79 | " capabilities in a way that may be insecure.\n", | ||
80 | get_task_comm(name, current)); | ||
81 | warned = 1; | ||
82 | } | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * Version check. Return the number of u32s in each capability flag | ||
87 | * array, or a negative value on error. | ||
88 | */ | ||
89 | static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy) | ||
90 | { | ||
91 | __u32 version; | ||
92 | |||
93 | if (get_user(version, &header->version)) | ||
94 | return -EFAULT; | ||
95 | |||
96 | switch (version) { | ||
97 | case _LINUX_CAPABILITY_VERSION_1: | ||
98 | warn_legacy_capability_use(); | ||
99 | *tocopy = _LINUX_CAPABILITY_U32S_1; | ||
100 | break; | ||
101 | case _LINUX_CAPABILITY_VERSION_2: | ||
102 | warn_deprecated_v2(); | ||
103 | /* | ||
104 | * fall through - v3 is otherwise equivalent to v2. | ||
105 | */ | ||
106 | case _LINUX_CAPABILITY_VERSION_3: | ||
107 | *tocopy = _LINUX_CAPABILITY_U32S_3; | ||
108 | break; | ||
109 | default: | ||
110 | if (put_user((u32)_KERNEL_CAPABILITY_VERSION, &header->version)) | ||
111 | return -EFAULT; | ||
112 | return -EINVAL; | ||
113 | } | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | /* | ||
56 | * For sys_getproccap() and sys_setproccap(), any of the three | 119 | * For sys_getproccap() and sys_setproccap(), any of the three |
57 | * capability set pointers may be NULL -- indicating that that set is | 120 | * capability set pointers may be NULL -- indicating that that set is |
58 | * uninteresting and/or not to be changed. | 121 | * uninteresting and/or not to be changed. |
@@ -71,27 +134,13 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) | |||
71 | { | 134 | { |
72 | int ret = 0; | 135 | int ret = 0; |
73 | pid_t pid; | 136 | pid_t pid; |
74 | __u32 version; | ||
75 | struct task_struct *target; | 137 | struct task_struct *target; |
76 | unsigned tocopy; | 138 | unsigned tocopy; |
77 | kernel_cap_t pE, pI, pP; | 139 | kernel_cap_t pE, pI, pP; |
78 | 140 | ||
79 | if (get_user(version, &header->version)) | 141 | ret = cap_validate_magic(header, &tocopy); |
80 | return -EFAULT; | 142 | if (ret != 0) |
81 | 143 | return ret; | |
82 | switch (version) { | ||
83 | case _LINUX_CAPABILITY_VERSION_1: | ||
84 | warn_legacy_capability_use(); | ||
85 | tocopy = _LINUX_CAPABILITY_U32S_1; | ||
86 | break; | ||
87 | case _LINUX_CAPABILITY_VERSION_2: | ||
88 | tocopy = _LINUX_CAPABILITY_U32S_2; | ||
89 | break; | ||
90 | default: | ||
91 | if (put_user(_LINUX_CAPABILITY_VERSION, &header->version)) | ||
92 | return -EFAULT; | ||
93 | return -EINVAL; | ||
94 | } | ||
95 | 144 | ||
96 | if (get_user(pid, &header->pid)) | 145 | if (get_user(pid, &header->pid)) |
97 | return -EFAULT; | 146 | return -EFAULT; |
@@ -118,7 +167,7 @@ out: | |||
118 | spin_unlock(&task_capability_lock); | 167 | spin_unlock(&task_capability_lock); |
119 | 168 | ||
120 | if (!ret) { | 169 | if (!ret) { |
121 | struct __user_cap_data_struct kdata[_LINUX_CAPABILITY_U32S]; | 170 | struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; |
122 | unsigned i; | 171 | unsigned i; |
123 | 172 | ||
124 | for (i = 0; i < tocopy; i++) { | 173 | for (i = 0; i < tocopy; i++) { |
@@ -128,7 +177,7 @@ out: | |||
128 | } | 177 | } |
129 | 178 | ||
130 | /* | 179 | /* |
131 | * Note, in the case, tocopy < _LINUX_CAPABILITY_U32S, | 180 | * Note, in the case, tocopy < _KERNEL_CAPABILITY_U32S, |
132 | * we silently drop the upper capabilities here. This | 181 | * we silently drop the upper capabilities here. This |
133 | * has the effect of making older libcap | 182 | * has the effect of making older libcap |
134 | * implementations implicitly drop upper capability | 183 | * implementations implicitly drop upper capability |
@@ -240,30 +289,16 @@ static inline int cap_set_all(kernel_cap_t *effective, | |||
240 | */ | 289 | */ |
241 | asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) | 290 | asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) |
242 | { | 291 | { |
243 | struct __user_cap_data_struct kdata[_LINUX_CAPABILITY_U32S]; | 292 | struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; |
244 | unsigned i, tocopy; | 293 | unsigned i, tocopy; |
245 | kernel_cap_t inheritable, permitted, effective; | 294 | kernel_cap_t inheritable, permitted, effective; |
246 | __u32 version; | ||
247 | struct task_struct *target; | 295 | struct task_struct *target; |
248 | int ret; | 296 | int ret; |
249 | pid_t pid; | 297 | pid_t pid; |
250 | 298 | ||
251 | if (get_user(version, &header->version)) | 299 | ret = cap_validate_magic(header, &tocopy); |
252 | return -EFAULT; | 300 | if (ret != 0) |
253 | 301 | return ret; | |
254 | switch (version) { | ||
255 | case _LINUX_CAPABILITY_VERSION_1: | ||
256 | warn_legacy_capability_use(); | ||
257 | tocopy = _LINUX_CAPABILITY_U32S_1; | ||
258 | break; | ||
259 | case _LINUX_CAPABILITY_VERSION_2: | ||
260 | tocopy = _LINUX_CAPABILITY_U32S_2; | ||
261 | break; | ||
262 | default: | ||
263 | if (put_user(_LINUX_CAPABILITY_VERSION, &header->version)) | ||
264 | return -EFAULT; | ||
265 | return -EINVAL; | ||
266 | } | ||
267 | 302 | ||
268 | if (get_user(pid, &header->pid)) | 303 | if (get_user(pid, &header->pid)) |
269 | return -EFAULT; | 304 | return -EFAULT; |
@@ -281,7 +316,7 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) | |||
281 | permitted.cap[i] = kdata[i].permitted; | 316 | permitted.cap[i] = kdata[i].permitted; |
282 | inheritable.cap[i] = kdata[i].inheritable; | 317 | inheritable.cap[i] = kdata[i].inheritable; |
283 | } | 318 | } |
284 | while (i < _LINUX_CAPABILITY_U32S) { | 319 | while (i < _KERNEL_CAPABILITY_U32S) { |
285 | effective.cap[i] = 0; | 320 | effective.cap[i] = 0; |
286 | permitted.cap[i] = 0; | 321 | permitted.cap[i] = 0; |
287 | inheritable.cap[i] = 0; | 322 | inheritable.cap[i] = 0; |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index fbc6fc8949b4..15ac0e1e4f4d 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2903,7 +2903,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys) | |||
2903 | cg = tsk->cgroups; | 2903 | cg = tsk->cgroups; |
2904 | parent = task_cgroup(tsk, subsys->subsys_id); | 2904 | parent = task_cgroup(tsk, subsys->subsys_id); |
2905 | 2905 | ||
2906 | snprintf(nodename, MAX_CGROUP_TYPE_NAMELEN, "node_%d", tsk->pid); | 2906 | snprintf(nodename, MAX_CGROUP_TYPE_NAMELEN, "%d", tsk->pid); |
2907 | 2907 | ||
2908 | /* Pin the hierarchy */ | 2908 | /* Pin the hierarchy */ |
2909 | atomic_inc(&parent->root->sb->s_active); | 2909 | atomic_inc(&parent->root->sb->s_active); |
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 86ea9e34e326..039baa4cd90c 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -797,8 +797,10 @@ static int update_cpumask(struct cpuset *cs, char *buf) | |||
797 | retval = cpulist_parse(buf, trialcs.cpus_allowed); | 797 | retval = cpulist_parse(buf, trialcs.cpus_allowed); |
798 | if (retval < 0) | 798 | if (retval < 0) |
799 | return retval; | 799 | return retval; |
800 | |||
801 | if (!cpus_subset(trialcs.cpus_allowed, cpu_online_map)) | ||
802 | return -EINVAL; | ||
800 | } | 803 | } |
801 | cpus_and(trialcs.cpus_allowed, trialcs.cpus_allowed, cpu_online_map); | ||
802 | retval = validate_change(cs, &trialcs); | 804 | retval = validate_change(cs, &trialcs); |
803 | if (retval < 0) | 805 | if (retval < 0) |
804 | return retval; | 806 | return retval; |
@@ -932,9 +934,11 @@ static int update_nodemask(struct cpuset *cs, char *buf) | |||
932 | retval = nodelist_parse(buf, trialcs.mems_allowed); | 934 | retval = nodelist_parse(buf, trialcs.mems_allowed); |
933 | if (retval < 0) | 935 | if (retval < 0) |
934 | goto done; | 936 | goto done; |
937 | |||
938 | if (!nodes_subset(trialcs.mems_allowed, | ||
939 | node_states[N_HIGH_MEMORY])) | ||
940 | return -EINVAL; | ||
935 | } | 941 | } |
936 | nodes_and(trialcs.mems_allowed, trialcs.mems_allowed, | ||
937 | node_states[N_HIGH_MEMORY]); | ||
938 | oldmem = cs->mems_allowed; | 942 | oldmem = cs->mems_allowed; |
939 | if (nodes_equal(oldmem, trialcs.mems_allowed)) { | 943 | if (nodes_equal(oldmem, trialcs.mems_allowed)) { |
940 | retval = 0; /* Too easy - nothing to do */ | 944 | retval = 0; /* Too easy - nothing to do */ |
diff --git a/kernel/exit.c b/kernel/exit.c index 1510f78a0ffa..8f6185e69b69 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -126,6 +126,12 @@ static void __exit_signal(struct task_struct *tsk) | |||
126 | 126 | ||
127 | __unhash_process(tsk); | 127 | __unhash_process(tsk); |
128 | 128 | ||
129 | /* | ||
130 | * Do this under ->siglock, we can race with another thread | ||
131 | * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. | ||
132 | */ | ||
133 | flush_sigqueue(&tsk->pending); | ||
134 | |||
129 | tsk->signal = NULL; | 135 | tsk->signal = NULL; |
130 | tsk->sighand = NULL; | 136 | tsk->sighand = NULL; |
131 | spin_unlock(&sighand->siglock); | 137 | spin_unlock(&sighand->siglock); |
@@ -133,7 +139,6 @@ static void __exit_signal(struct task_struct *tsk) | |||
133 | 139 | ||
134 | __cleanup_sighand(sighand); | 140 | __cleanup_sighand(sighand); |
135 | clear_tsk_thread_flag(tsk,TIF_SIGPENDING); | 141 | clear_tsk_thread_flag(tsk,TIF_SIGPENDING); |
136 | flush_sigqueue(&tsk->pending); | ||
137 | if (sig) { | 142 | if (sig) { |
138 | flush_sigqueue(&sig->shared_pending); | 143 | flush_sigqueue(&sig->shared_pending); |
139 | taskstats_tgid_free(sig); | 144 | taskstats_tgid_free(sig); |
diff --git a/kernel/fork.c b/kernel/fork.c index 933e60ebccae..19908b26cf80 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -660,136 +660,6 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk) | |||
660 | return 0; | 660 | return 0; |
661 | } | 661 | } |
662 | 662 | ||
663 | static int count_open_files(struct fdtable *fdt) | ||
664 | { | ||
665 | int size = fdt->max_fds; | ||
666 | int i; | ||
667 | |||
668 | /* Find the last open fd */ | ||
669 | for (i = size/(8*sizeof(long)); i > 0; ) { | ||
670 | if (fdt->open_fds->fds_bits[--i]) | ||
671 | break; | ||
672 | } | ||
673 | i = (i+1) * 8 * sizeof(long); | ||
674 | return i; | ||
675 | } | ||
676 | |||
677 | static struct files_struct *alloc_files(void) | ||
678 | { | ||
679 | struct files_struct *newf; | ||
680 | struct fdtable *fdt; | ||
681 | |||
682 | newf = kmem_cache_alloc(files_cachep, GFP_KERNEL); | ||
683 | if (!newf) | ||
684 | goto out; | ||
685 | |||
686 | atomic_set(&newf->count, 1); | ||
687 | |||
688 | spin_lock_init(&newf->file_lock); | ||
689 | newf->next_fd = 0; | ||
690 | fdt = &newf->fdtab; | ||
691 | fdt->max_fds = NR_OPEN_DEFAULT; | ||
692 | fdt->close_on_exec = (fd_set *)&newf->close_on_exec_init; | ||
693 | fdt->open_fds = (fd_set *)&newf->open_fds_init; | ||
694 | fdt->fd = &newf->fd_array[0]; | ||
695 | INIT_RCU_HEAD(&fdt->rcu); | ||
696 | fdt->next = NULL; | ||
697 | rcu_assign_pointer(newf->fdt, fdt); | ||
698 | out: | ||
699 | return newf; | ||
700 | } | ||
701 | |||
702 | /* | ||
703 | * Allocate a new files structure and copy contents from the | ||
704 | * passed in files structure. | ||
705 | * errorp will be valid only when the returned files_struct is NULL. | ||
706 | */ | ||
707 | static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp) | ||
708 | { | ||
709 | struct files_struct *newf; | ||
710 | struct file **old_fds, **new_fds; | ||
711 | int open_files, size, i; | ||
712 | struct fdtable *old_fdt, *new_fdt; | ||
713 | |||
714 | *errorp = -ENOMEM; | ||
715 | newf = alloc_files(); | ||
716 | if (!newf) | ||
717 | goto out; | ||
718 | |||
719 | spin_lock(&oldf->file_lock); | ||
720 | old_fdt = files_fdtable(oldf); | ||
721 | new_fdt = files_fdtable(newf); | ||
722 | open_files = count_open_files(old_fdt); | ||
723 | |||
724 | /* | ||
725 | * Check whether we need to allocate a larger fd array and fd set. | ||
726 | * Note: we're not a clone task, so the open count won't change. | ||
727 | */ | ||
728 | if (open_files > new_fdt->max_fds) { | ||
729 | new_fdt->max_fds = 0; | ||
730 | spin_unlock(&oldf->file_lock); | ||
731 | spin_lock(&newf->file_lock); | ||
732 | *errorp = expand_files(newf, open_files-1); | ||
733 | spin_unlock(&newf->file_lock); | ||
734 | if (*errorp < 0) | ||
735 | goto out_release; | ||
736 | new_fdt = files_fdtable(newf); | ||
737 | /* | ||
738 | * Reacquire the oldf lock and a pointer to its fd table | ||
739 | * who knows it may have a new bigger fd table. We need | ||
740 | * the latest pointer. | ||
741 | */ | ||
742 | spin_lock(&oldf->file_lock); | ||
743 | old_fdt = files_fdtable(oldf); | ||
744 | } | ||
745 | |||
746 | old_fds = old_fdt->fd; | ||
747 | new_fds = new_fdt->fd; | ||
748 | |||
749 | memcpy(new_fdt->open_fds->fds_bits, | ||
750 | old_fdt->open_fds->fds_bits, open_files/8); | ||
751 | memcpy(new_fdt->close_on_exec->fds_bits, | ||
752 | old_fdt->close_on_exec->fds_bits, open_files/8); | ||
753 | |||
754 | for (i = open_files; i != 0; i--) { | ||
755 | struct file *f = *old_fds++; | ||
756 | if (f) { | ||
757 | get_file(f); | ||
758 | } else { | ||
759 | /* | ||
760 | * The fd may be claimed in the fd bitmap but not yet | ||
761 | * instantiated in the files array if a sibling thread | ||
762 | * is partway through open(). So make sure that this | ||
763 | * fd is available to the new process. | ||
764 | */ | ||
765 | FD_CLR(open_files - i, new_fdt->open_fds); | ||
766 | } | ||
767 | rcu_assign_pointer(*new_fds++, f); | ||
768 | } | ||
769 | spin_unlock(&oldf->file_lock); | ||
770 | |||
771 | /* compute the remainder to be cleared */ | ||
772 | size = (new_fdt->max_fds - open_files) * sizeof(struct file *); | ||
773 | |||
774 | /* This is long word aligned thus could use a optimized version */ | ||
775 | memset(new_fds, 0, size); | ||
776 | |||
777 | if (new_fdt->max_fds > open_files) { | ||
778 | int left = (new_fdt->max_fds-open_files)/8; | ||
779 | int start = open_files / (8 * sizeof(unsigned long)); | ||
780 | |||
781 | memset(&new_fdt->open_fds->fds_bits[start], 0, left); | ||
782 | memset(&new_fdt->close_on_exec->fds_bits[start], 0, left); | ||
783 | } | ||
784 | |||
785 | return newf; | ||
786 | |||
787 | out_release: | ||
788 | kmem_cache_free(files_cachep, newf); | ||
789 | out: | ||
790 | return NULL; | ||
791 | } | ||
792 | |||
793 | static int copy_files(unsigned long clone_flags, struct task_struct * tsk) | 663 | static int copy_files(unsigned long clone_flags, struct task_struct * tsk) |
794 | { | 664 | { |
795 | struct files_struct *oldf, *newf; | 665 | struct files_struct *oldf, *newf; |
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index 14787de568b3..79e3c90113c2 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/byteorder.h> | 52 | #include <asm/byteorder.h> |
53 | #include <asm/atomic.h> | 53 | #include <asm/atomic.h> |
54 | #include <asm/system.h> | 54 | #include <asm/system.h> |
55 | #include <asm/unaligned.h> | ||
55 | 56 | ||
56 | static int kgdb_break_asap; | 57 | static int kgdb_break_asap; |
57 | 58 | ||
@@ -227,8 +228,6 @@ void __weak kgdb_disable_hw_debug(struct pt_regs *regs) | |||
227 | * GDB remote protocol parser: | 228 | * GDB remote protocol parser: |
228 | */ | 229 | */ |
229 | 230 | ||
230 | static const char hexchars[] = "0123456789abcdef"; | ||
231 | |||
232 | static int hex(char ch) | 231 | static int hex(char ch) |
233 | { | 232 | { |
234 | if ((ch >= 'a') && (ch <= 'f')) | 233 | if ((ch >= 'a') && (ch <= 'f')) |
@@ -316,8 +315,8 @@ static void put_packet(char *buffer) | |||
316 | } | 315 | } |
317 | 316 | ||
318 | kgdb_io_ops->write_char('#'); | 317 | kgdb_io_ops->write_char('#'); |
319 | kgdb_io_ops->write_char(hexchars[checksum >> 4]); | 318 | kgdb_io_ops->write_char(hex_asc_hi(checksum)); |
320 | kgdb_io_ops->write_char(hexchars[checksum & 0xf]); | 319 | kgdb_io_ops->write_char(hex_asc_lo(checksum)); |
321 | if (kgdb_io_ops->flush) | 320 | if (kgdb_io_ops->flush) |
322 | kgdb_io_ops->flush(); | 321 | kgdb_io_ops->flush(); |
323 | 322 | ||
@@ -478,8 +477,8 @@ static void error_packet(char *pkt, int error) | |||
478 | { | 477 | { |
479 | error = -error; | 478 | error = -error; |
480 | pkt[0] = 'E'; | 479 | pkt[0] = 'E'; |
481 | pkt[1] = hexchars[(error / 10)]; | 480 | pkt[1] = hex_asc[(error / 10)]; |
482 | pkt[2] = hexchars[(error % 10)]; | 481 | pkt[2] = hex_asc[(error % 10)]; |
483 | pkt[3] = '\0'; | 482 | pkt[3] = '\0'; |
484 | } | 483 | } |
485 | 484 | ||
@@ -510,10 +509,7 @@ static void int_to_threadref(unsigned char *id, int value) | |||
510 | scan = (unsigned char *)id; | 509 | scan = (unsigned char *)id; |
511 | while (i--) | 510 | while (i--) |
512 | *scan++ = 0; | 511 | *scan++ = 0; |
513 | *scan++ = (value >> 24) & 0xff; | 512 | put_unaligned_be32(value, scan); |
514 | *scan++ = (value >> 16) & 0xff; | ||
515 | *scan++ = (value >> 8) & 0xff; | ||
516 | *scan++ = (value & 0xff); | ||
517 | } | 513 | } |
518 | 514 | ||
519 | static struct task_struct *getthread(struct pt_regs *regs, int tid) | 515 | static struct task_struct *getthread(struct pt_regs *regs, int tid) |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 1e0250cb9486..d4998f81e229 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -699,8 +699,9 @@ static int __register_kprobes(struct kprobe **kps, int num, | |||
699 | return -EINVAL; | 699 | return -EINVAL; |
700 | for (i = 0; i < num; i++) { | 700 | for (i = 0; i < num; i++) { |
701 | ret = __register_kprobe(kps[i], called_from); | 701 | ret = __register_kprobe(kps[i], called_from); |
702 | if (ret < 0 && i > 0) { | 702 | if (ret < 0) { |
703 | unregister_kprobes(kps, i); | 703 | if (i > 0) |
704 | unregister_kprobes(kps, i); | ||
704 | break; | 705 | break; |
705 | } | 706 | } |
706 | } | 707 | } |
@@ -776,8 +777,9 @@ static int __register_jprobes(struct jprobe **jps, int num, | |||
776 | jp->kp.break_handler = longjmp_break_handler; | 777 | jp->kp.break_handler = longjmp_break_handler; |
777 | ret = __register_kprobe(&jp->kp, called_from); | 778 | ret = __register_kprobe(&jp->kp, called_from); |
778 | } | 779 | } |
779 | if (ret < 0 && i > 0) { | 780 | if (ret < 0) { |
780 | unregister_jprobes(jps, i); | 781 | if (i > 0) |
782 | unregister_jprobes(jps, i); | ||
781 | break; | 783 | break; |
782 | } | 784 | } |
783 | } | 785 | } |
@@ -920,8 +922,9 @@ static int __register_kretprobes(struct kretprobe **rps, int num, | |||
920 | return -EINVAL; | 922 | return -EINVAL; |
921 | for (i = 0; i < num; i++) { | 923 | for (i = 0; i < num; i++) { |
922 | ret = __register_kretprobe(rps[i], called_from); | 924 | ret = __register_kretprobe(rps[i], called_from); |
923 | if (ret < 0 && i > 0) { | 925 | if (ret < 0) { |
924 | unregister_kretprobes(rps, i); | 926 | if (i > 0) |
927 | unregister_kretprobes(rps, i); | ||
925 | break; | 928 | break; |
926 | } | 929 | } |
927 | } | 930 | } |
diff --git a/kernel/module.c b/kernel/module.c index f5e9491ef7ac..5f80478b746d 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1337,7 +1337,19 @@ out_unreg: | |||
1337 | kobject_put(&mod->mkobj.kobj); | 1337 | kobject_put(&mod->mkobj.kobj); |
1338 | return err; | 1338 | return err; |
1339 | } | 1339 | } |
1340 | #endif | 1340 | |
1341 | static void mod_sysfs_fini(struct module *mod) | ||
1342 | { | ||
1343 | kobject_put(&mod->mkobj.kobj); | ||
1344 | } | ||
1345 | |||
1346 | #else /* CONFIG_SYSFS */ | ||
1347 | |||
1348 | static void mod_sysfs_fini(struct module *mod) | ||
1349 | { | ||
1350 | } | ||
1351 | |||
1352 | #endif /* CONFIG_SYSFS */ | ||
1341 | 1353 | ||
1342 | static void mod_kobject_remove(struct module *mod) | 1354 | static void mod_kobject_remove(struct module *mod) |
1343 | { | 1355 | { |
@@ -1345,7 +1357,7 @@ static void mod_kobject_remove(struct module *mod) | |||
1345 | module_param_sysfs_remove(mod); | 1357 | module_param_sysfs_remove(mod); |
1346 | kobject_put(mod->mkobj.drivers_dir); | 1358 | kobject_put(mod->mkobj.drivers_dir); |
1347 | kobject_put(mod->holders_dir); | 1359 | kobject_put(mod->holders_dir); |
1348 | kobject_put(&mod->mkobj.kobj); | 1360 | mod_sysfs_fini(mod); |
1349 | } | 1361 | } |
1350 | 1362 | ||
1351 | /* | 1363 | /* |
@@ -1780,7 +1792,7 @@ static struct module *load_module(void __user *umod, | |||
1780 | 1792 | ||
1781 | /* Sanity checks against insmoding binaries or wrong arch, | 1793 | /* Sanity checks against insmoding binaries or wrong arch, |
1782 | weird elf version */ | 1794 | weird elf version */ |
1783 | if (memcmp(hdr->e_ident, ELFMAG, 4) != 0 | 1795 | if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 |
1784 | || hdr->e_type != ET_REL | 1796 | || hdr->e_type != ET_REL |
1785 | || !elf_check_arch(hdr) | 1797 | || !elf_check_arch(hdr) |
1786 | || hdr->e_shentsize != sizeof(*sechdrs)) { | 1798 | || hdr->e_shentsize != sizeof(*sechdrs)) { |
diff --git a/kernel/relay.c b/kernel/relay.c index bc24dcdc570f..7de644cdec43 100644 --- a/kernel/relay.c +++ b/kernel/relay.c | |||
@@ -1191,7 +1191,7 @@ static ssize_t relay_file_splice_read(struct file *in, | |||
1191 | ret = 0; | 1191 | ret = 0; |
1192 | spliced = 0; | 1192 | spliced = 0; |
1193 | 1193 | ||
1194 | while (len) { | 1194 | while (len && !spliced) { |
1195 | ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret); | 1195 | ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret); |
1196 | if (ret < 0) | 1196 | if (ret < 0) |
1197 | break; | 1197 | break; |
diff --git a/kernel/sched.c b/kernel/sched.c index cfa222a91539..eaf6751e7612 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val) | |||
136 | 136 | ||
137 | static inline int rt_policy(int policy) | 137 | static inline int rt_policy(int policy) |
138 | { | 138 | { |
139 | if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR)) | 139 | if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR)) |
140 | return 1; | 140 | return 1; |
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
@@ -312,12 +312,15 @@ static DEFINE_SPINLOCK(task_group_lock); | |||
312 | #endif | 312 | #endif |
313 | 313 | ||
314 | /* | 314 | /* |
315 | * A weight of 0, 1 or ULONG_MAX can cause arithmetics problems. | 315 | * A weight of 0 or 1 can cause arithmetics problems. |
316 | * A weight of a cfs_rq is the sum of weights of which entities | ||
317 | * are queued on this cfs_rq, so a weight of a entity should not be | ||
318 | * too large, so as the shares value of a task group. | ||
316 | * (The default weight is 1024 - so there's no practical | 319 | * (The default weight is 1024 - so there's no practical |
317 | * limitation from this.) | 320 | * limitation from this.) |
318 | */ | 321 | */ |
319 | #define MIN_SHARES 2 | 322 | #define MIN_SHARES 2 |
320 | #define MAX_SHARES (ULONG_MAX - 1) | 323 | #define MAX_SHARES (1UL << 18) |
321 | 324 | ||
322 | static int init_task_group_load = INIT_TASK_GROUP_LOAD; | 325 | static int init_task_group_load = INIT_TASK_GROUP_LOAD; |
323 | #endif | 326 | #endif |
@@ -398,43 +401,6 @@ struct cfs_rq { | |||
398 | */ | 401 | */ |
399 | struct list_head leaf_cfs_rq_list; | 402 | struct list_head leaf_cfs_rq_list; |
400 | struct task_group *tg; /* group that "owns" this runqueue */ | 403 | struct task_group *tg; /* group that "owns" this runqueue */ |
401 | |||
402 | #ifdef CONFIG_SMP | ||
403 | unsigned long task_weight; | ||
404 | unsigned long shares; | ||
405 | /* | ||
406 | * We need space to build a sched_domain wide view of the full task | ||
407 | * group tree, in order to avoid depending on dynamic memory allocation | ||
408 | * during the load balancing we place this in the per cpu task group | ||
409 | * hierarchy. This limits the load balancing to one instance per cpu, | ||
410 | * but more should not be needed anyway. | ||
411 | */ | ||
412 | struct aggregate_struct { | ||
413 | /* | ||
414 | * load = weight(cpus) * f(tg) | ||
415 | * | ||
416 | * Where f(tg) is the recursive weight fraction assigned to | ||
417 | * this group. | ||
418 | */ | ||
419 | unsigned long load; | ||
420 | |||
421 | /* | ||
422 | * part of the group weight distributed to this span. | ||
423 | */ | ||
424 | unsigned long shares; | ||
425 | |||
426 | /* | ||
427 | * The sum of all runqueue weights within this span. | ||
428 | */ | ||
429 | unsigned long rq_weight; | ||
430 | |||
431 | /* | ||
432 | * Weight contributed by tasks; this is the part we can | ||
433 | * influence by moving tasks around. | ||
434 | */ | ||
435 | unsigned long task_weight; | ||
436 | } aggregate; | ||
437 | #endif | ||
438 | #endif | 404 | #endif |
439 | }; | 405 | }; |
440 | 406 | ||
@@ -1368,17 +1334,19 @@ static void __resched_task(struct task_struct *p, int tif_bit) | |||
1368 | */ | 1334 | */ |
1369 | #define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) | 1335 | #define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) |
1370 | 1336 | ||
1371 | /* | ||
1372 | * delta *= weight / lw | ||
1373 | */ | ||
1374 | static unsigned long | 1337 | static unsigned long |
1375 | calc_delta_mine(unsigned long delta_exec, unsigned long weight, | 1338 | calc_delta_mine(unsigned long delta_exec, unsigned long weight, |
1376 | struct load_weight *lw) | 1339 | struct load_weight *lw) |
1377 | { | 1340 | { |
1378 | u64 tmp; | 1341 | u64 tmp; |
1379 | 1342 | ||
1380 | if (!lw->inv_weight) | 1343 | if (!lw->inv_weight) { |
1381 | lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)/(lw->weight+1); | 1344 | if (BITS_PER_LONG > 32 && unlikely(lw->weight >= WMULT_CONST)) |
1345 | lw->inv_weight = 1; | ||
1346 | else | ||
1347 | lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2) | ||
1348 | / (lw->weight+1); | ||
1349 | } | ||
1382 | 1350 | ||
1383 | tmp = (u64)delta_exec * weight; | 1351 | tmp = (u64)delta_exec * weight; |
1384 | /* | 1352 | /* |
@@ -1393,6 +1361,12 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, | |||
1393 | return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); | 1361 | return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); |
1394 | } | 1362 | } |
1395 | 1363 | ||
1364 | static inline unsigned long | ||
1365 | calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) | ||
1366 | { | ||
1367 | return calc_delta_mine(delta_exec, NICE_0_LOAD, lw); | ||
1368 | } | ||
1369 | |||
1396 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) | 1370 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) |
1397 | { | 1371 | { |
1398 | lw->weight += inc; | 1372 | lw->weight += inc; |
@@ -1505,326 +1479,6 @@ static unsigned long source_load(int cpu, int type); | |||
1505 | static unsigned long target_load(int cpu, int type); | 1479 | static unsigned long target_load(int cpu, int type); |
1506 | static unsigned long cpu_avg_load_per_task(int cpu); | 1480 | static unsigned long cpu_avg_load_per_task(int cpu); |
1507 | static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); | 1481 | static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); |
1508 | |||
1509 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1510 | |||
1511 | /* | ||
1512 | * Group load balancing. | ||
1513 | * | ||
1514 | * We calculate a few balance domain wide aggregate numbers; load and weight. | ||
1515 | * Given the pictures below, and assuming each item has equal weight: | ||
1516 | * | ||
1517 | * root 1 - thread | ||
1518 | * / | \ A - group | ||
1519 | * A 1 B | ||
1520 | * /|\ / \ | ||
1521 | * C 2 D 3 4 | ||
1522 | * | | | ||
1523 | * 5 6 | ||
1524 | * | ||
1525 | * load: | ||
1526 | * A and B get 1/3-rd of the total load. C and D get 1/3-rd of A's 1/3-rd, | ||
1527 | * which equals 1/9-th of the total load. | ||
1528 | * | ||
1529 | * shares: | ||
1530 | * The weight of this group on the selected cpus. | ||
1531 | * | ||
1532 | * rq_weight: | ||
1533 | * Direct sum of all the cpu's their rq weight, e.g. A would get 3 while | ||
1534 | * B would get 2. | ||
1535 | * | ||
1536 | * task_weight: | ||
1537 | * Part of the rq_weight contributed by tasks; all groups except B would | ||
1538 | * get 1, B gets 2. | ||
1539 | */ | ||
1540 | |||
1541 | static inline struct aggregate_struct * | ||
1542 | aggregate(struct task_group *tg, struct sched_domain *sd) | ||
1543 | { | ||
1544 | return &tg->cfs_rq[sd->first_cpu]->aggregate; | ||
1545 | } | ||
1546 | |||
1547 | typedef void (*aggregate_func)(struct task_group *, struct sched_domain *); | ||
1548 | |||
1549 | /* | ||
1550 | * Iterate the full tree, calling @down when first entering a node and @up when | ||
1551 | * leaving it for the final time. | ||
1552 | */ | ||
1553 | static | ||
1554 | void aggregate_walk_tree(aggregate_func down, aggregate_func up, | ||
1555 | struct sched_domain *sd) | ||
1556 | { | ||
1557 | struct task_group *parent, *child; | ||
1558 | |||
1559 | rcu_read_lock(); | ||
1560 | parent = &root_task_group; | ||
1561 | down: | ||
1562 | (*down)(parent, sd); | ||
1563 | list_for_each_entry_rcu(child, &parent->children, siblings) { | ||
1564 | parent = child; | ||
1565 | goto down; | ||
1566 | |||
1567 | up: | ||
1568 | continue; | ||
1569 | } | ||
1570 | (*up)(parent, sd); | ||
1571 | |||
1572 | child = parent; | ||
1573 | parent = parent->parent; | ||
1574 | if (parent) | ||
1575 | goto up; | ||
1576 | rcu_read_unlock(); | ||
1577 | } | ||
1578 | |||
1579 | /* | ||
1580 | * Calculate the aggregate runqueue weight. | ||
1581 | */ | ||
1582 | static | ||
1583 | void aggregate_group_weight(struct task_group *tg, struct sched_domain *sd) | ||
1584 | { | ||
1585 | unsigned long rq_weight = 0; | ||
1586 | unsigned long task_weight = 0; | ||
1587 | int i; | ||
1588 | |||
1589 | for_each_cpu_mask(i, sd->span) { | ||
1590 | rq_weight += tg->cfs_rq[i]->load.weight; | ||
1591 | task_weight += tg->cfs_rq[i]->task_weight; | ||
1592 | } | ||
1593 | |||
1594 | aggregate(tg, sd)->rq_weight = rq_weight; | ||
1595 | aggregate(tg, sd)->task_weight = task_weight; | ||
1596 | } | ||
1597 | |||
1598 | /* | ||
1599 | * Compute the weight of this group on the given cpus. | ||
1600 | */ | ||
1601 | static | ||
1602 | void aggregate_group_shares(struct task_group *tg, struct sched_domain *sd) | ||
1603 | { | ||
1604 | unsigned long shares = 0; | ||
1605 | int i; | ||
1606 | |||
1607 | for_each_cpu_mask(i, sd->span) | ||
1608 | shares += tg->cfs_rq[i]->shares; | ||
1609 | |||
1610 | if ((!shares && aggregate(tg, sd)->rq_weight) || shares > tg->shares) | ||
1611 | shares = tg->shares; | ||
1612 | |||
1613 | aggregate(tg, sd)->shares = shares; | ||
1614 | } | ||
1615 | |||
1616 | /* | ||
1617 | * Compute the load fraction assigned to this group, relies on the aggregate | ||
1618 | * weight and this group's parent's load, i.e. top-down. | ||
1619 | */ | ||
1620 | static | ||
1621 | void aggregate_group_load(struct task_group *tg, struct sched_domain *sd) | ||
1622 | { | ||
1623 | unsigned long load; | ||
1624 | |||
1625 | if (!tg->parent) { | ||
1626 | int i; | ||
1627 | |||
1628 | load = 0; | ||
1629 | for_each_cpu_mask(i, sd->span) | ||
1630 | load += cpu_rq(i)->load.weight; | ||
1631 | |||
1632 | } else { | ||
1633 | load = aggregate(tg->parent, sd)->load; | ||
1634 | |||
1635 | /* | ||
1636 | * shares is our weight in the parent's rq so | ||
1637 | * shares/parent->rq_weight gives our fraction of the load | ||
1638 | */ | ||
1639 | load *= aggregate(tg, sd)->shares; | ||
1640 | load /= aggregate(tg->parent, sd)->rq_weight + 1; | ||
1641 | } | ||
1642 | |||
1643 | aggregate(tg, sd)->load = load; | ||
1644 | } | ||
1645 | |||
1646 | static void __set_se_shares(struct sched_entity *se, unsigned long shares); | ||
1647 | |||
1648 | /* | ||
1649 | * Calculate and set the cpu's group shares. | ||
1650 | */ | ||
1651 | static void | ||
1652 | __update_group_shares_cpu(struct task_group *tg, struct sched_domain *sd, | ||
1653 | int tcpu) | ||
1654 | { | ||
1655 | int boost = 0; | ||
1656 | unsigned long shares; | ||
1657 | unsigned long rq_weight; | ||
1658 | |||
1659 | if (!tg->se[tcpu]) | ||
1660 | return; | ||
1661 | |||
1662 | rq_weight = tg->cfs_rq[tcpu]->load.weight; | ||
1663 | |||
1664 | /* | ||
1665 | * If there are currently no tasks on the cpu pretend there is one of | ||
1666 | * average load so that when a new task gets to run here it will not | ||
1667 | * get delayed by group starvation. | ||
1668 | */ | ||
1669 | if (!rq_weight) { | ||
1670 | boost = 1; | ||
1671 | rq_weight = NICE_0_LOAD; | ||
1672 | } | ||
1673 | |||
1674 | /* | ||
1675 | * \Sum shares * rq_weight | ||
1676 | * shares = ----------------------- | ||
1677 | * \Sum rq_weight | ||
1678 | * | ||
1679 | */ | ||
1680 | shares = aggregate(tg, sd)->shares * rq_weight; | ||
1681 | shares /= aggregate(tg, sd)->rq_weight + 1; | ||
1682 | |||
1683 | /* | ||
1684 | * record the actual number of shares, not the boosted amount. | ||
1685 | */ | ||
1686 | tg->cfs_rq[tcpu]->shares = boost ? 0 : shares; | ||
1687 | |||
1688 | if (shares < MIN_SHARES) | ||
1689 | shares = MIN_SHARES; | ||
1690 | else if (shares > MAX_SHARES) | ||
1691 | shares = MAX_SHARES; | ||
1692 | |||
1693 | __set_se_shares(tg->se[tcpu], shares); | ||
1694 | } | ||
1695 | |||
1696 | /* | ||
1697 | * Re-adjust the weights on the cpu the task came from and on the cpu the | ||
1698 | * task went to. | ||
1699 | */ | ||
1700 | static void | ||
1701 | __move_group_shares(struct task_group *tg, struct sched_domain *sd, | ||
1702 | int scpu, int dcpu) | ||
1703 | { | ||
1704 | unsigned long shares; | ||
1705 | |||
1706 | shares = tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; | ||
1707 | |||
1708 | __update_group_shares_cpu(tg, sd, scpu); | ||
1709 | __update_group_shares_cpu(tg, sd, dcpu); | ||
1710 | |||
1711 | /* | ||
1712 | * ensure we never loose shares due to rounding errors in the | ||
1713 | * above redistribution. | ||
1714 | */ | ||
1715 | shares -= tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; | ||
1716 | if (shares) | ||
1717 | tg->cfs_rq[dcpu]->shares += shares; | ||
1718 | } | ||
1719 | |||
1720 | /* | ||
1721 | * Because changing a group's shares changes the weight of the super-group | ||
1722 | * we need to walk up the tree and change all shares until we hit the root. | ||
1723 | */ | ||
1724 | static void | ||
1725 | move_group_shares(struct task_group *tg, struct sched_domain *sd, | ||
1726 | int scpu, int dcpu) | ||
1727 | { | ||
1728 | while (tg) { | ||
1729 | __move_group_shares(tg, sd, scpu, dcpu); | ||
1730 | tg = tg->parent; | ||
1731 | } | ||
1732 | } | ||
1733 | |||
1734 | static | ||
1735 | void aggregate_group_set_shares(struct task_group *tg, struct sched_domain *sd) | ||
1736 | { | ||
1737 | unsigned long shares = aggregate(tg, sd)->shares; | ||
1738 | int i; | ||
1739 | |||
1740 | for_each_cpu_mask(i, sd->span) { | ||
1741 | struct rq *rq = cpu_rq(i); | ||
1742 | unsigned long flags; | ||
1743 | |||
1744 | spin_lock_irqsave(&rq->lock, flags); | ||
1745 | __update_group_shares_cpu(tg, sd, i); | ||
1746 | spin_unlock_irqrestore(&rq->lock, flags); | ||
1747 | } | ||
1748 | |||
1749 | aggregate_group_shares(tg, sd); | ||
1750 | |||
1751 | /* | ||
1752 | * ensure we never loose shares due to rounding errors in the | ||
1753 | * above redistribution. | ||
1754 | */ | ||
1755 | shares -= aggregate(tg, sd)->shares; | ||
1756 | if (shares) { | ||
1757 | tg->cfs_rq[sd->first_cpu]->shares += shares; | ||
1758 | aggregate(tg, sd)->shares += shares; | ||
1759 | } | ||
1760 | } | ||
1761 | |||
1762 | /* | ||
1763 | * Calculate the accumulative weight and recursive load of each task group | ||
1764 | * while walking down the tree. | ||
1765 | */ | ||
1766 | static | ||
1767 | void aggregate_get_down(struct task_group *tg, struct sched_domain *sd) | ||
1768 | { | ||
1769 | aggregate_group_weight(tg, sd); | ||
1770 | aggregate_group_shares(tg, sd); | ||
1771 | aggregate_group_load(tg, sd); | ||
1772 | } | ||
1773 | |||
1774 | /* | ||
1775 | * Rebalance the cpu shares while walking back up the tree. | ||
1776 | */ | ||
1777 | static | ||
1778 | void aggregate_get_up(struct task_group *tg, struct sched_domain *sd) | ||
1779 | { | ||
1780 | aggregate_group_set_shares(tg, sd); | ||
1781 | } | ||
1782 | |||
1783 | static DEFINE_PER_CPU(spinlock_t, aggregate_lock); | ||
1784 | |||
1785 | static void __init init_aggregate(void) | ||
1786 | { | ||
1787 | int i; | ||
1788 | |||
1789 | for_each_possible_cpu(i) | ||
1790 | spin_lock_init(&per_cpu(aggregate_lock, i)); | ||
1791 | } | ||
1792 | |||
1793 | static int get_aggregate(struct sched_domain *sd) | ||
1794 | { | ||
1795 | if (!spin_trylock(&per_cpu(aggregate_lock, sd->first_cpu))) | ||
1796 | return 0; | ||
1797 | |||
1798 | aggregate_walk_tree(aggregate_get_down, aggregate_get_up, sd); | ||
1799 | return 1; | ||
1800 | } | ||
1801 | |||
1802 | static void put_aggregate(struct sched_domain *sd) | ||
1803 | { | ||
1804 | spin_unlock(&per_cpu(aggregate_lock, sd->first_cpu)); | ||
1805 | } | ||
1806 | |||
1807 | static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) | ||
1808 | { | ||
1809 | cfs_rq->shares = shares; | ||
1810 | } | ||
1811 | |||
1812 | #else | ||
1813 | |||
1814 | static inline void init_aggregate(void) | ||
1815 | { | ||
1816 | } | ||
1817 | |||
1818 | static inline int get_aggregate(struct sched_domain *sd) | ||
1819 | { | ||
1820 | return 0; | ||
1821 | } | ||
1822 | |||
1823 | static inline void put_aggregate(struct sched_domain *sd) | ||
1824 | { | ||
1825 | } | ||
1826 | #endif | ||
1827 | |||
1828 | #else /* CONFIG_SMP */ | 1482 | #else /* CONFIG_SMP */ |
1829 | 1483 | ||
1830 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1484 | #ifdef CONFIG_FAIR_GROUP_SCHED |
@@ -1845,14 +1499,26 @@ static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) | |||
1845 | 1499 | ||
1846 | #define sched_class_highest (&rt_sched_class) | 1500 | #define sched_class_highest (&rt_sched_class) |
1847 | 1501 | ||
1848 | static void inc_nr_running(struct rq *rq) | 1502 | static inline void inc_load(struct rq *rq, const struct task_struct *p) |
1503 | { | ||
1504 | update_load_add(&rq->load, p->se.load.weight); | ||
1505 | } | ||
1506 | |||
1507 | static inline void dec_load(struct rq *rq, const struct task_struct *p) | ||
1508 | { | ||
1509 | update_load_sub(&rq->load, p->se.load.weight); | ||
1510 | } | ||
1511 | |||
1512 | static void inc_nr_running(struct task_struct *p, struct rq *rq) | ||
1849 | { | 1513 | { |
1850 | rq->nr_running++; | 1514 | rq->nr_running++; |
1515 | inc_load(rq, p); | ||
1851 | } | 1516 | } |
1852 | 1517 | ||
1853 | static void dec_nr_running(struct rq *rq) | 1518 | static void dec_nr_running(struct task_struct *p, struct rq *rq) |
1854 | { | 1519 | { |
1855 | rq->nr_running--; | 1520 | rq->nr_running--; |
1521 | dec_load(rq, p); | ||
1856 | } | 1522 | } |
1857 | 1523 | ||
1858 | static void set_load_weight(struct task_struct *p) | 1524 | static void set_load_weight(struct task_struct *p) |
@@ -1944,7 +1610,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup) | |||
1944 | rq->nr_uninterruptible--; | 1610 | rq->nr_uninterruptible--; |
1945 | 1611 | ||
1946 | enqueue_task(rq, p, wakeup); | 1612 | enqueue_task(rq, p, wakeup); |
1947 | inc_nr_running(rq); | 1613 | inc_nr_running(p, rq); |
1948 | } | 1614 | } |
1949 | 1615 | ||
1950 | /* | 1616 | /* |
@@ -1956,7 +1622,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) | |||
1956 | rq->nr_uninterruptible++; | 1622 | rq->nr_uninterruptible++; |
1957 | 1623 | ||
1958 | dequeue_task(rq, p, sleep); | 1624 | dequeue_task(rq, p, sleep); |
1959 | dec_nr_running(rq); | 1625 | dec_nr_running(p, rq); |
1960 | } | 1626 | } |
1961 | 1627 | ||
1962 | /** | 1628 | /** |
@@ -2609,7 +2275,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) | |||
2609 | * management (if any): | 2275 | * management (if any): |
2610 | */ | 2276 | */ |
2611 | p->sched_class->task_new(rq, p); | 2277 | p->sched_class->task_new(rq, p); |
2612 | inc_nr_running(rq); | 2278 | inc_nr_running(p, rq); |
2613 | } | 2279 | } |
2614 | check_preempt_curr(rq, p); | 2280 | check_preempt_curr(rq, p); |
2615 | #ifdef CONFIG_SMP | 2281 | #ifdef CONFIG_SMP |
@@ -3600,12 +3266,9 @@ static int load_balance(int this_cpu, struct rq *this_rq, | |||
3600 | unsigned long imbalance; | 3266 | unsigned long imbalance; |
3601 | struct rq *busiest; | 3267 | struct rq *busiest; |
3602 | unsigned long flags; | 3268 | unsigned long flags; |
3603 | int unlock_aggregate; | ||
3604 | 3269 | ||
3605 | cpus_setall(*cpus); | 3270 | cpus_setall(*cpus); |
3606 | 3271 | ||
3607 | unlock_aggregate = get_aggregate(sd); | ||
3608 | |||
3609 | /* | 3272 | /* |
3610 | * When power savings policy is enabled for the parent domain, idle | 3273 | * When power savings policy is enabled for the parent domain, idle |
3611 | * sibling can pick up load irrespective of busy siblings. In this case, | 3274 | * sibling can pick up load irrespective of busy siblings. In this case, |
@@ -3721,9 +3384,8 @@ redo: | |||
3721 | 3384 | ||
3722 | if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && | 3385 | if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && |
3723 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) | 3386 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) |
3724 | ld_moved = -1; | 3387 | return -1; |
3725 | 3388 | return ld_moved; | |
3726 | goto out; | ||
3727 | 3389 | ||
3728 | out_balanced: | 3390 | out_balanced: |
3729 | schedstat_inc(sd, lb_balanced[idle]); | 3391 | schedstat_inc(sd, lb_balanced[idle]); |
@@ -3738,13 +3400,8 @@ out_one_pinned: | |||
3738 | 3400 | ||
3739 | if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && | 3401 | if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && |
3740 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) | 3402 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) |
3741 | ld_moved = -1; | 3403 | return -1; |
3742 | else | 3404 | return 0; |
3743 | ld_moved = 0; | ||
3744 | out: | ||
3745 | if (unlock_aggregate) | ||
3746 | put_aggregate(sd); | ||
3747 | return ld_moved; | ||
3748 | } | 3405 | } |
3749 | 3406 | ||
3750 | /* | 3407 | /* |
@@ -4430,7 +4087,7 @@ static inline void schedule_debug(struct task_struct *prev) | |||
4430 | * schedule() atomically, we ignore that path for now. | 4087 | * schedule() atomically, we ignore that path for now. |
4431 | * Otherwise, whine if we are scheduling when we should not be. | 4088 | * Otherwise, whine if we are scheduling when we should not be. |
4432 | */ | 4089 | */ |
4433 | if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state)) | 4090 | if (unlikely(in_atomic_preempt_off() && !prev->exit_state)) |
4434 | __schedule_bug(prev); | 4091 | __schedule_bug(prev); |
4435 | 4092 | ||
4436 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); | 4093 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); |
@@ -4510,12 +4167,10 @@ need_resched_nonpreemptible: | |||
4510 | clear_tsk_need_resched(prev); | 4167 | clear_tsk_need_resched(prev); |
4511 | 4168 | ||
4512 | if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { | 4169 | if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { |
4513 | if (unlikely((prev->state & TASK_INTERRUPTIBLE) && | 4170 | if (unlikely(signal_pending_state(prev->state, prev))) |
4514 | signal_pending(prev))) { | ||
4515 | prev->state = TASK_RUNNING; | 4171 | prev->state = TASK_RUNNING; |
4516 | } else { | 4172 | else |
4517 | deactivate_task(rq, prev, 1); | 4173 | deactivate_task(rq, prev, 1); |
4518 | } | ||
4519 | switch_count = &prev->nvcsw; | 4174 | switch_count = &prev->nvcsw; |
4520 | } | 4175 | } |
4521 | 4176 | ||
@@ -4931,8 +4586,10 @@ void set_user_nice(struct task_struct *p, long nice) | |||
4931 | goto out_unlock; | 4586 | goto out_unlock; |
4932 | } | 4587 | } |
4933 | on_rq = p->se.on_rq; | 4588 | on_rq = p->se.on_rq; |
4934 | if (on_rq) | 4589 | if (on_rq) { |
4935 | dequeue_task(rq, p, 0); | 4590 | dequeue_task(rq, p, 0); |
4591 | dec_load(rq, p); | ||
4592 | } | ||
4936 | 4593 | ||
4937 | p->static_prio = NICE_TO_PRIO(nice); | 4594 | p->static_prio = NICE_TO_PRIO(nice); |
4938 | set_load_weight(p); | 4595 | set_load_weight(p); |
@@ -4942,6 +4599,7 @@ void set_user_nice(struct task_struct *p, long nice) | |||
4942 | 4599 | ||
4943 | if (on_rq) { | 4600 | if (on_rq) { |
4944 | enqueue_task(rq, p, 0); | 4601 | enqueue_task(rq, p, 0); |
4602 | inc_load(rq, p); | ||
4945 | /* | 4603 | /* |
4946 | * If the task increased its priority or is running and | 4604 | * If the task increased its priority or is running and |
4947 | * lowered its priority, then reschedule its CPU: | 4605 | * lowered its priority, then reschedule its CPU: |
@@ -7316,7 +6974,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7316 | SD_INIT(sd, ALLNODES); | 6974 | SD_INIT(sd, ALLNODES); |
7317 | set_domain_attribute(sd, attr); | 6975 | set_domain_attribute(sd, attr); |
7318 | sd->span = *cpu_map; | 6976 | sd->span = *cpu_map; |
7319 | sd->first_cpu = first_cpu(sd->span); | ||
7320 | cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); | 6977 | cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); |
7321 | p = sd; | 6978 | p = sd; |
7322 | sd_allnodes = 1; | 6979 | sd_allnodes = 1; |
@@ -7327,7 +6984,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7327 | SD_INIT(sd, NODE); | 6984 | SD_INIT(sd, NODE); |
7328 | set_domain_attribute(sd, attr); | 6985 | set_domain_attribute(sd, attr); |
7329 | sched_domain_node_span(cpu_to_node(i), &sd->span); | 6986 | sched_domain_node_span(cpu_to_node(i), &sd->span); |
7330 | sd->first_cpu = first_cpu(sd->span); | ||
7331 | sd->parent = p; | 6987 | sd->parent = p; |
7332 | if (p) | 6988 | if (p) |
7333 | p->child = sd; | 6989 | p->child = sd; |
@@ -7339,7 +6995,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7339 | SD_INIT(sd, CPU); | 6995 | SD_INIT(sd, CPU); |
7340 | set_domain_attribute(sd, attr); | 6996 | set_domain_attribute(sd, attr); |
7341 | sd->span = *nodemask; | 6997 | sd->span = *nodemask; |
7342 | sd->first_cpu = first_cpu(sd->span); | ||
7343 | sd->parent = p; | 6998 | sd->parent = p; |
7344 | if (p) | 6999 | if (p) |
7345 | p->child = sd; | 7000 | p->child = sd; |
@@ -7351,7 +7006,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7351 | SD_INIT(sd, MC); | 7006 | SD_INIT(sd, MC); |
7352 | set_domain_attribute(sd, attr); | 7007 | set_domain_attribute(sd, attr); |
7353 | sd->span = cpu_coregroup_map(i); | 7008 | sd->span = cpu_coregroup_map(i); |
7354 | sd->first_cpu = first_cpu(sd->span); | ||
7355 | cpus_and(sd->span, sd->span, *cpu_map); | 7009 | cpus_and(sd->span, sd->span, *cpu_map); |
7356 | sd->parent = p; | 7010 | sd->parent = p; |
7357 | p->child = sd; | 7011 | p->child = sd; |
@@ -7364,7 +7018,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7364 | SD_INIT(sd, SIBLING); | 7018 | SD_INIT(sd, SIBLING); |
7365 | set_domain_attribute(sd, attr); | 7019 | set_domain_attribute(sd, attr); |
7366 | sd->span = per_cpu(cpu_sibling_map, i); | 7020 | sd->span = per_cpu(cpu_sibling_map, i); |
7367 | sd->first_cpu = first_cpu(sd->span); | ||
7368 | cpus_and(sd->span, sd->span, *cpu_map); | 7021 | cpus_and(sd->span, sd->span, *cpu_map); |
7369 | sd->parent = p; | 7022 | sd->parent = p; |
7370 | p->child = sd; | 7023 | p->child = sd; |
@@ -7568,8 +7221,8 @@ static int build_sched_domains(const cpumask_t *cpu_map) | |||
7568 | 7221 | ||
7569 | static cpumask_t *doms_cur; /* current sched domains */ | 7222 | static cpumask_t *doms_cur; /* current sched domains */ |
7570 | static int ndoms_cur; /* number of sched domains in 'doms_cur' */ | 7223 | static int ndoms_cur; /* number of sched domains in 'doms_cur' */ |
7571 | static struct sched_domain_attr *dattr_cur; /* attribues of custom domains | 7224 | static struct sched_domain_attr *dattr_cur; |
7572 | in 'doms_cur' */ | 7225 | /* attribues of custom domains in 'doms_cur' */ |
7573 | 7226 | ||
7574 | /* | 7227 | /* |
7575 | * Special case: If a kmalloc of a doms_cur partition (array of | 7228 | * Special case: If a kmalloc of a doms_cur partition (array of |
@@ -8034,7 +7687,6 @@ void __init sched_init(void) | |||
8034 | } | 7687 | } |
8035 | 7688 | ||
8036 | #ifdef CONFIG_SMP | 7689 | #ifdef CONFIG_SMP |
8037 | init_aggregate(); | ||
8038 | init_defrootdomain(); | 7690 | init_defrootdomain(); |
8039 | #endif | 7691 | #endif |
8040 | 7692 | ||
@@ -8599,11 +8251,14 @@ void sched_move_task(struct task_struct *tsk) | |||
8599 | #endif | 8251 | #endif |
8600 | 8252 | ||
8601 | #ifdef CONFIG_FAIR_GROUP_SCHED | 8253 | #ifdef CONFIG_FAIR_GROUP_SCHED |
8602 | static void __set_se_shares(struct sched_entity *se, unsigned long shares) | 8254 | static void set_se_shares(struct sched_entity *se, unsigned long shares) |
8603 | { | 8255 | { |
8604 | struct cfs_rq *cfs_rq = se->cfs_rq; | 8256 | struct cfs_rq *cfs_rq = se->cfs_rq; |
8257 | struct rq *rq = cfs_rq->rq; | ||
8605 | int on_rq; | 8258 | int on_rq; |
8606 | 8259 | ||
8260 | spin_lock_irq(&rq->lock); | ||
8261 | |||
8607 | on_rq = se->on_rq; | 8262 | on_rq = se->on_rq; |
8608 | if (on_rq) | 8263 | if (on_rq) |
8609 | dequeue_entity(cfs_rq, se, 0); | 8264 | dequeue_entity(cfs_rq, se, 0); |
@@ -8613,17 +8268,8 @@ static void __set_se_shares(struct sched_entity *se, unsigned long shares) | |||
8613 | 8268 | ||
8614 | if (on_rq) | 8269 | if (on_rq) |
8615 | enqueue_entity(cfs_rq, se, 0); | 8270 | enqueue_entity(cfs_rq, se, 0); |
8616 | } | ||
8617 | 8271 | ||
8618 | static void set_se_shares(struct sched_entity *se, unsigned long shares) | 8272 | spin_unlock_irq(&rq->lock); |
8619 | { | ||
8620 | struct cfs_rq *cfs_rq = se->cfs_rq; | ||
8621 | struct rq *rq = cfs_rq->rq; | ||
8622 | unsigned long flags; | ||
8623 | |||
8624 | spin_lock_irqsave(&rq->lock, flags); | ||
8625 | __set_se_shares(se, shares); | ||
8626 | spin_unlock_irqrestore(&rq->lock, flags); | ||
8627 | } | 8273 | } |
8628 | 8274 | ||
8629 | static DEFINE_MUTEX(shares_mutex); | 8275 | static DEFINE_MUTEX(shares_mutex); |
@@ -8662,13 +8308,8 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) | |||
8662 | * w/o tripping rebalance_share or load_balance_fair. | 8308 | * w/o tripping rebalance_share or load_balance_fair. |
8663 | */ | 8309 | */ |
8664 | tg->shares = shares; | 8310 | tg->shares = shares; |
8665 | for_each_possible_cpu(i) { | 8311 | for_each_possible_cpu(i) |
8666 | /* | ||
8667 | * force a rebalance | ||
8668 | */ | ||
8669 | cfs_rq_set_shares(tg->cfs_rq[i], 0); | ||
8670 | set_se_shares(tg->se[i], shares); | 8312 | set_se_shares(tg->se[i], shares); |
8671 | } | ||
8672 | 8313 | ||
8673 | /* | 8314 | /* |
8674 | * Enable load balance activity on this group, by inserting it back on | 8315 | * Enable load balance activity on this group, by inserting it back on |
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c index 9c597e37f7de..ce05271219ab 100644 --- a/kernel/sched_clock.c +++ b/kernel/sched_clock.c | |||
@@ -59,22 +59,26 @@ static inline struct sched_clock_data *cpu_sdc(int cpu) | |||
59 | return &per_cpu(sched_clock_data, cpu); | 59 | return &per_cpu(sched_clock_data, cpu); |
60 | } | 60 | } |
61 | 61 | ||
62 | static __read_mostly int sched_clock_running; | ||
63 | |||
62 | void sched_clock_init(void) | 64 | void sched_clock_init(void) |
63 | { | 65 | { |
64 | u64 ktime_now = ktime_to_ns(ktime_get()); | 66 | u64 ktime_now = ktime_to_ns(ktime_get()); |
65 | u64 now = 0; | 67 | unsigned long now_jiffies = jiffies; |
66 | int cpu; | 68 | int cpu; |
67 | 69 | ||
68 | for_each_possible_cpu(cpu) { | 70 | for_each_possible_cpu(cpu) { |
69 | struct sched_clock_data *scd = cpu_sdc(cpu); | 71 | struct sched_clock_data *scd = cpu_sdc(cpu); |
70 | 72 | ||
71 | scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; | 73 | scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; |
72 | scd->prev_jiffies = jiffies; | 74 | scd->prev_jiffies = now_jiffies; |
73 | scd->prev_raw = now; | 75 | scd->prev_raw = 0; |
74 | scd->tick_raw = now; | 76 | scd->tick_raw = 0; |
75 | scd->tick_gtod = ktime_now; | 77 | scd->tick_gtod = ktime_now; |
76 | scd->clock = ktime_now; | 78 | scd->clock = ktime_now; |
77 | } | 79 | } |
80 | |||
81 | sched_clock_running = 1; | ||
78 | } | 82 | } |
79 | 83 | ||
80 | /* | 84 | /* |
@@ -136,6 +140,9 @@ u64 sched_clock_cpu(int cpu) | |||
136 | struct sched_clock_data *scd = cpu_sdc(cpu); | 140 | struct sched_clock_data *scd = cpu_sdc(cpu); |
137 | u64 now, clock; | 141 | u64 now, clock; |
138 | 142 | ||
143 | if (unlikely(!sched_clock_running)) | ||
144 | return 0ull; | ||
145 | |||
139 | WARN_ON_ONCE(!irqs_disabled()); | 146 | WARN_ON_ONCE(!irqs_disabled()); |
140 | now = sched_clock(); | 147 | now = sched_clock(); |
141 | 148 | ||
@@ -174,6 +181,9 @@ void sched_clock_tick(void) | |||
174 | struct sched_clock_data *scd = this_scd(); | 181 | struct sched_clock_data *scd = this_scd(); |
175 | u64 now, now_gtod; | 182 | u64 now, now_gtod; |
176 | 183 | ||
184 | if (unlikely(!sched_clock_running)) | ||
185 | return; | ||
186 | |||
177 | WARN_ON_ONCE(!irqs_disabled()); | 187 | WARN_ON_ONCE(!irqs_disabled()); |
178 | 188 | ||
179 | now = sched_clock(); | 189 | now = sched_clock(); |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 5f06118fbc31..8bb713040ac9 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -167,11 +167,6 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
167 | #endif | 167 | #endif |
168 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", | 168 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", |
169 | cfs_rq->nr_spread_over); | 169 | cfs_rq->nr_spread_over); |
170 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
171 | #ifdef CONFIG_SMP | ||
172 | SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares); | ||
173 | #endif | ||
174 | #endif | ||
175 | } | 170 | } |
176 | 171 | ||
177 | static void print_cpu(struct seq_file *m, int cpu) | 172 | static void print_cpu(struct seq_file *m, int cpu) |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index e24ecd39c4b8..08ae848b71d4 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -334,34 +334,6 @@ int sched_nr_latency_handler(struct ctl_table *table, int write, | |||
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * delta *= w / rw | ||
338 | */ | ||
339 | static inline unsigned long | ||
340 | calc_delta_weight(unsigned long delta, struct sched_entity *se) | ||
341 | { | ||
342 | for_each_sched_entity(se) { | ||
343 | delta = calc_delta_mine(delta, | ||
344 | se->load.weight, &cfs_rq_of(se)->load); | ||
345 | } | ||
346 | |||
347 | return delta; | ||
348 | } | ||
349 | |||
350 | /* | ||
351 | * delta *= rw / w | ||
352 | */ | ||
353 | static inline unsigned long | ||
354 | calc_delta_fair(unsigned long delta, struct sched_entity *se) | ||
355 | { | ||
356 | for_each_sched_entity(se) { | ||
357 | delta = calc_delta_mine(delta, | ||
358 | cfs_rq_of(se)->load.weight, &se->load); | ||
359 | } | ||
360 | |||
361 | return delta; | ||
362 | } | ||
363 | |||
364 | /* | ||
365 | * The idea is to set a period in which each task runs once. | 337 | * The idea is to set a period in which each task runs once. |
366 | * | 338 | * |
367 | * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch | 339 | * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch |
@@ -390,54 +362,47 @@ static u64 __sched_period(unsigned long nr_running) | |||
390 | */ | 362 | */ |
391 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) | 363 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) |
392 | { | 364 | { |
393 | return calc_delta_weight(__sched_period(cfs_rq->nr_running), se); | 365 | u64 slice = __sched_period(cfs_rq->nr_running); |
366 | |||
367 | for_each_sched_entity(se) { | ||
368 | cfs_rq = cfs_rq_of(se); | ||
369 | |||
370 | slice *= se->load.weight; | ||
371 | do_div(slice, cfs_rq->load.weight); | ||
372 | } | ||
373 | |||
374 | |||
375 | return slice; | ||
394 | } | 376 | } |
395 | 377 | ||
396 | /* | 378 | /* |
397 | * We calculate the vruntime slice of a to be inserted task | 379 | * We calculate the vruntime slice of a to be inserted task |
398 | * | 380 | * |
399 | * vs = s*rw/w = p | 381 | * vs = s/w = p/rw |
400 | */ | 382 | */ |
401 | static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) | 383 | static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) |
402 | { | 384 | { |
403 | unsigned long nr_running = cfs_rq->nr_running; | 385 | unsigned long nr_running = cfs_rq->nr_running; |
386 | unsigned long weight; | ||
387 | u64 vslice; | ||
404 | 388 | ||
405 | if (!se->on_rq) | 389 | if (!se->on_rq) |
406 | nr_running++; | 390 | nr_running++; |
407 | 391 | ||
408 | return __sched_period(nr_running); | 392 | vslice = __sched_period(nr_running); |
409 | } | ||
410 | |||
411 | /* | ||
412 | * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in | ||
413 | * that it favours >=0 over <0. | ||
414 | * | ||
415 | * -20 | | ||
416 | * | | ||
417 | * 0 --------+------- | ||
418 | * .' | ||
419 | * 19 .' | ||
420 | * | ||
421 | */ | ||
422 | static unsigned long | ||
423 | calc_delta_asym(unsigned long delta, struct sched_entity *se) | ||
424 | { | ||
425 | struct load_weight lw = { | ||
426 | .weight = NICE_0_LOAD, | ||
427 | .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT) | ||
428 | }; | ||
429 | 393 | ||
430 | for_each_sched_entity(se) { | 394 | for_each_sched_entity(se) { |
431 | struct load_weight *se_lw = &se->load; | 395 | cfs_rq = cfs_rq_of(se); |
432 | 396 | ||
433 | if (se->load.weight < NICE_0_LOAD) | 397 | weight = cfs_rq->load.weight; |
434 | se_lw = &lw; | 398 | if (!se->on_rq) |
399 | weight += se->load.weight; | ||
435 | 400 | ||
436 | delta = calc_delta_mine(delta, | 401 | vslice *= NICE_0_LOAD; |
437 | cfs_rq_of(se)->load.weight, se_lw); | 402 | do_div(vslice, weight); |
438 | } | 403 | } |
439 | 404 | ||
440 | return delta; | 405 | return vslice; |
441 | } | 406 | } |
442 | 407 | ||
443 | /* | 408 | /* |
@@ -454,7 +419,11 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, | |||
454 | 419 | ||
455 | curr->sum_exec_runtime += delta_exec; | 420 | curr->sum_exec_runtime += delta_exec; |
456 | schedstat_add(cfs_rq, exec_clock, delta_exec); | 421 | schedstat_add(cfs_rq, exec_clock, delta_exec); |
457 | delta_exec_weighted = calc_delta_fair(delta_exec, curr); | 422 | delta_exec_weighted = delta_exec; |
423 | if (unlikely(curr->load.weight != NICE_0_LOAD)) { | ||
424 | delta_exec_weighted = calc_delta_fair(delta_exec_weighted, | ||
425 | &curr->load); | ||
426 | } | ||
458 | curr->vruntime += delta_exec_weighted; | 427 | curr->vruntime += delta_exec_weighted; |
459 | } | 428 | } |
460 | 429 | ||
@@ -541,27 +510,10 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
541 | * Scheduling class queueing methods: | 510 | * Scheduling class queueing methods: |
542 | */ | 511 | */ |
543 | 512 | ||
544 | #if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED | ||
545 | static void | ||
546 | add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) | ||
547 | { | ||
548 | cfs_rq->task_weight += weight; | ||
549 | } | ||
550 | #else | ||
551 | static inline void | ||
552 | add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) | ||
553 | { | ||
554 | } | ||
555 | #endif | ||
556 | |||
557 | static void | 513 | static void |
558 | account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) | 514 | account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
559 | { | 515 | { |
560 | update_load_add(&cfs_rq->load, se->load.weight); | 516 | update_load_add(&cfs_rq->load, se->load.weight); |
561 | if (!parent_entity(se)) | ||
562 | inc_cpu_load(rq_of(cfs_rq), se->load.weight); | ||
563 | if (entity_is_task(se)) | ||
564 | add_cfs_task_weight(cfs_rq, se->load.weight); | ||
565 | cfs_rq->nr_running++; | 517 | cfs_rq->nr_running++; |
566 | se->on_rq = 1; | 518 | se->on_rq = 1; |
567 | list_add(&se->group_node, &cfs_rq->tasks); | 519 | list_add(&se->group_node, &cfs_rq->tasks); |
@@ -571,10 +523,6 @@ static void | |||
571 | account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) | 523 | account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
572 | { | 524 | { |
573 | update_load_sub(&cfs_rq->load, se->load.weight); | 525 | update_load_sub(&cfs_rq->load, se->load.weight); |
574 | if (!parent_entity(se)) | ||
575 | dec_cpu_load(rq_of(cfs_rq), se->load.weight); | ||
576 | if (entity_is_task(se)) | ||
577 | add_cfs_task_weight(cfs_rq, -se->load.weight); | ||
578 | cfs_rq->nr_running--; | 526 | cfs_rq->nr_running--; |
579 | se->on_rq = 0; | 527 | se->on_rq = 0; |
580 | list_del_init(&se->group_node); | 528 | list_del_init(&se->group_node); |
@@ -661,17 +609,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
661 | 609 | ||
662 | if (!initial) { | 610 | if (!initial) { |
663 | /* sleeps upto a single latency don't count. */ | 611 | /* sleeps upto a single latency don't count. */ |
664 | if (sched_feat(NEW_FAIR_SLEEPERS)) { | 612 | if (sched_feat(NEW_FAIR_SLEEPERS)) |
665 | unsigned long thresh = sysctl_sched_latency; | 613 | vruntime -= sysctl_sched_latency; |
666 | |||
667 | /* | ||
668 | * convert the sleeper threshold into virtual time | ||
669 | */ | ||
670 | if (sched_feat(NORMALIZED_SLEEPER)) | ||
671 | thresh = calc_delta_fair(thresh, se); | ||
672 | |||
673 | vruntime -= thresh; | ||
674 | } | ||
675 | 614 | ||
676 | /* ensure we never gain time by being placed backwards. */ | 615 | /* ensure we never gain time by being placed backwards. */ |
677 | vruntime = max_vruntime(se->vruntime, vruntime); | 616 | vruntime = max_vruntime(se->vruntime, vruntime); |
@@ -1057,16 +996,27 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, | |||
1057 | struct task_struct *curr = this_rq->curr; | 996 | struct task_struct *curr = this_rq->curr; |
1058 | unsigned long tl = this_load; | 997 | unsigned long tl = this_load; |
1059 | unsigned long tl_per_task; | 998 | unsigned long tl_per_task; |
999 | int balanced; | ||
1060 | 1000 | ||
1061 | if (!(this_sd->flags & SD_WAKE_AFFINE)) | 1001 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) |
1062 | return 0; | 1002 | return 0; |
1063 | 1003 | ||
1064 | /* | 1004 | /* |
1005 | * If sync wakeup then subtract the (maximum possible) | ||
1006 | * effect of the currently running task from the load | ||
1007 | * of the current CPU: | ||
1008 | */ | ||
1009 | if (sync) | ||
1010 | tl -= current->se.load.weight; | ||
1011 | |||
1012 | balanced = 100*(tl + p->se.load.weight) <= imbalance*load; | ||
1013 | |||
1014 | /* | ||
1065 | * If the currently running task will sleep within | 1015 | * If the currently running task will sleep within |
1066 | * a reasonable amount of time then attract this newly | 1016 | * a reasonable amount of time then attract this newly |
1067 | * woken task: | 1017 | * woken task: |
1068 | */ | 1018 | */ |
1069 | if (sync && curr->sched_class == &fair_sched_class) { | 1019 | if (sync && balanced && curr->sched_class == &fair_sched_class) { |
1070 | if (curr->se.avg_overlap < sysctl_sched_migration_cost && | 1020 | if (curr->se.avg_overlap < sysctl_sched_migration_cost && |
1071 | p->se.avg_overlap < sysctl_sched_migration_cost) | 1021 | p->se.avg_overlap < sysctl_sched_migration_cost) |
1072 | return 1; | 1022 | return 1; |
@@ -1075,16 +1025,8 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, | |||
1075 | schedstat_inc(p, se.nr_wakeups_affine_attempts); | 1025 | schedstat_inc(p, se.nr_wakeups_affine_attempts); |
1076 | tl_per_task = cpu_avg_load_per_task(this_cpu); | 1026 | tl_per_task = cpu_avg_load_per_task(this_cpu); |
1077 | 1027 | ||
1078 | /* | ||
1079 | * If sync wakeup then subtract the (maximum possible) | ||
1080 | * effect of the currently running task from the load | ||
1081 | * of the current CPU: | ||
1082 | */ | ||
1083 | if (sync) | ||
1084 | tl -= current->se.load.weight; | ||
1085 | |||
1086 | if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || | 1028 | if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || |
1087 | 100*(tl + p->se.load.weight) <= imbalance*load) { | 1029 | balanced) { |
1088 | /* | 1030 | /* |
1089 | * This domain has SD_WAKE_AFFINE and | 1031 | * This domain has SD_WAKE_AFFINE and |
1090 | * p is cache cold in this domain, and | 1032 | * p is cache cold in this domain, and |
@@ -1169,10 +1111,11 @@ static unsigned long wakeup_gran(struct sched_entity *se) | |||
1169 | unsigned long gran = sysctl_sched_wakeup_granularity; | 1111 | unsigned long gran = sysctl_sched_wakeup_granularity; |
1170 | 1112 | ||
1171 | /* | 1113 | /* |
1172 | * More easily preempt - nice tasks, while not making it harder for | 1114 | * More easily preempt - nice tasks, while not making |
1173 | * + nice tasks. | 1115 | * it harder for + nice tasks. |
1174 | */ | 1116 | */ |
1175 | gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se); | 1117 | if (unlikely(se->load.weight > NICE_0_LOAD)) |
1118 | gran = calc_delta_fair(gran, &se->load); | ||
1176 | 1119 | ||
1177 | return gran; | 1120 | return gran; |
1178 | } | 1121 | } |
@@ -1366,90 +1309,75 @@ static struct task_struct *load_balance_next_fair(void *arg) | |||
1366 | return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); | 1309 | return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); |
1367 | } | 1310 | } |
1368 | 1311 | ||
1369 | static unsigned long | 1312 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1370 | __load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1313 | static int cfs_rq_best_prio(struct cfs_rq *cfs_rq) |
1371 | unsigned long max_load_move, struct sched_domain *sd, | ||
1372 | enum cpu_idle_type idle, int *all_pinned, int *this_best_prio, | ||
1373 | struct cfs_rq *cfs_rq) | ||
1374 | { | 1314 | { |
1375 | struct rq_iterator cfs_rq_iterator; | 1315 | struct sched_entity *curr; |
1316 | struct task_struct *p; | ||
1376 | 1317 | ||
1377 | cfs_rq_iterator.start = load_balance_start_fair; | 1318 | if (!cfs_rq->nr_running || !first_fair(cfs_rq)) |
1378 | cfs_rq_iterator.next = load_balance_next_fair; | 1319 | return MAX_PRIO; |
1379 | cfs_rq_iterator.arg = cfs_rq; | 1320 | |
1321 | curr = cfs_rq->curr; | ||
1322 | if (!curr) | ||
1323 | curr = __pick_next_entity(cfs_rq); | ||
1324 | |||
1325 | p = task_of(curr); | ||
1380 | 1326 | ||
1381 | return balance_tasks(this_rq, this_cpu, busiest, | 1327 | return p->prio; |
1382 | max_load_move, sd, idle, all_pinned, | ||
1383 | this_best_prio, &cfs_rq_iterator); | ||
1384 | } | 1328 | } |
1329 | #endif | ||
1385 | 1330 | ||
1386 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1387 | static unsigned long | 1331 | static unsigned long |
1388 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1332 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, |
1389 | unsigned long max_load_move, | 1333 | unsigned long max_load_move, |
1390 | struct sched_domain *sd, enum cpu_idle_type idle, | 1334 | struct sched_domain *sd, enum cpu_idle_type idle, |
1391 | int *all_pinned, int *this_best_prio) | 1335 | int *all_pinned, int *this_best_prio) |
1392 | { | 1336 | { |
1337 | struct cfs_rq *busy_cfs_rq; | ||
1393 | long rem_load_move = max_load_move; | 1338 | long rem_load_move = max_load_move; |
1394 | int busiest_cpu = cpu_of(busiest); | 1339 | struct rq_iterator cfs_rq_iterator; |
1395 | struct task_group *tg; | ||
1396 | |||
1397 | rcu_read_lock(); | ||
1398 | list_for_each_entry(tg, &task_groups, list) { | ||
1399 | long imbalance; | ||
1400 | unsigned long this_weight, busiest_weight; | ||
1401 | long rem_load, max_load, moved_load; | ||
1402 | |||
1403 | /* | ||
1404 | * empty group | ||
1405 | */ | ||
1406 | if (!aggregate(tg, sd)->task_weight) | ||
1407 | continue; | ||
1408 | |||
1409 | rem_load = rem_load_move * aggregate(tg, sd)->rq_weight; | ||
1410 | rem_load /= aggregate(tg, sd)->load + 1; | ||
1411 | |||
1412 | this_weight = tg->cfs_rq[this_cpu]->task_weight; | ||
1413 | busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight; | ||
1414 | 1340 | ||
1415 | imbalance = (busiest_weight - this_weight) / 2; | 1341 | cfs_rq_iterator.start = load_balance_start_fair; |
1342 | cfs_rq_iterator.next = load_balance_next_fair; | ||
1416 | 1343 | ||
1417 | if (imbalance < 0) | 1344 | for_each_leaf_cfs_rq(busiest, busy_cfs_rq) { |
1418 | imbalance = busiest_weight; | 1345 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1346 | struct cfs_rq *this_cfs_rq; | ||
1347 | long imbalance; | ||
1348 | unsigned long maxload; | ||
1419 | 1349 | ||
1420 | max_load = max(rem_load, imbalance); | 1350 | this_cfs_rq = cpu_cfs_rq(busy_cfs_rq, this_cpu); |
1421 | moved_load = __load_balance_fair(this_rq, this_cpu, busiest, | ||
1422 | max_load, sd, idle, all_pinned, this_best_prio, | ||
1423 | tg->cfs_rq[busiest_cpu]); | ||
1424 | 1351 | ||
1425 | if (!moved_load) | 1352 | imbalance = busy_cfs_rq->load.weight - this_cfs_rq->load.weight; |
1353 | /* Don't pull if this_cfs_rq has more load than busy_cfs_rq */ | ||
1354 | if (imbalance <= 0) | ||
1426 | continue; | 1355 | continue; |
1427 | 1356 | ||
1428 | move_group_shares(tg, sd, busiest_cpu, this_cpu); | 1357 | /* Don't pull more than imbalance/2 */ |
1358 | imbalance /= 2; | ||
1359 | maxload = min(rem_load_move, imbalance); | ||
1429 | 1360 | ||
1430 | moved_load *= aggregate(tg, sd)->load; | 1361 | *this_best_prio = cfs_rq_best_prio(this_cfs_rq); |
1431 | moved_load /= aggregate(tg, sd)->rq_weight + 1; | 1362 | #else |
1363 | # define maxload rem_load_move | ||
1364 | #endif | ||
1365 | /* | ||
1366 | * pass busy_cfs_rq argument into | ||
1367 | * load_balance_[start|next]_fair iterators | ||
1368 | */ | ||
1369 | cfs_rq_iterator.arg = busy_cfs_rq; | ||
1370 | rem_load_move -= balance_tasks(this_rq, this_cpu, busiest, | ||
1371 | maxload, sd, idle, all_pinned, | ||
1372 | this_best_prio, | ||
1373 | &cfs_rq_iterator); | ||
1432 | 1374 | ||
1433 | rem_load_move -= moved_load; | 1375 | if (rem_load_move <= 0) |
1434 | if (rem_load_move < 0) | ||
1435 | break; | 1376 | break; |
1436 | } | 1377 | } |
1437 | rcu_read_unlock(); | ||
1438 | 1378 | ||
1439 | return max_load_move - rem_load_move; | 1379 | return max_load_move - rem_load_move; |
1440 | } | 1380 | } |
1441 | #else | ||
1442 | static unsigned long | ||
1443 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | ||
1444 | unsigned long max_load_move, | ||
1445 | struct sched_domain *sd, enum cpu_idle_type idle, | ||
1446 | int *all_pinned, int *this_best_prio) | ||
1447 | { | ||
1448 | return __load_balance_fair(this_rq, this_cpu, busiest, | ||
1449 | max_load_move, sd, idle, all_pinned, | ||
1450 | this_best_prio, &busiest->cfs); | ||
1451 | } | ||
1452 | #endif | ||
1453 | 1381 | ||
1454 | static int | 1382 | static int |
1455 | move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1383 | move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, |
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 060e87b0cb1c..3432d573205d 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -513,8 +513,6 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) | |||
513 | */ | 513 | */ |
514 | for_each_sched_rt_entity(rt_se) | 514 | for_each_sched_rt_entity(rt_se) |
515 | enqueue_rt_entity(rt_se); | 515 | enqueue_rt_entity(rt_se); |
516 | |||
517 | inc_cpu_load(rq, p->se.load.weight); | ||
518 | } | 516 | } |
519 | 517 | ||
520 | static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | 518 | static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) |
@@ -534,8 +532,6 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | |||
534 | if (rt_rq && rt_rq->rt_nr_running) | 532 | if (rt_rq && rt_rq->rt_nr_running) |
535 | enqueue_rt_entity(rt_se); | 533 | enqueue_rt_entity(rt_se); |
536 | } | 534 | } |
537 | |||
538 | dec_cpu_load(rq, p->se.load.weight); | ||
539 | } | 535 | } |
540 | 536 | ||
541 | /* | 537 | /* |
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 5bae2e0c3ff2..a38878e0e49d 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -67,6 +67,7 @@ static int show_schedstat(struct seq_file *seq, void *v) | |||
67 | preempt_enable(); | 67 | preempt_enable(); |
68 | #endif | 68 | #endif |
69 | } | 69 | } |
70 | kfree(mask_str); | ||
70 | return 0; | 71 | return 0; |
71 | } | 72 | } |
72 | 73 | ||
diff --git a/kernel/signal.c b/kernel/signal.c index 72bb4f51f963..6c0958e52ea7 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -231,6 +231,40 @@ void flush_signals(struct task_struct *t) | |||
231 | spin_unlock_irqrestore(&t->sighand->siglock, flags); | 231 | spin_unlock_irqrestore(&t->sighand->siglock, flags); |
232 | } | 232 | } |
233 | 233 | ||
234 | static void __flush_itimer_signals(struct sigpending *pending) | ||
235 | { | ||
236 | sigset_t signal, retain; | ||
237 | struct sigqueue *q, *n; | ||
238 | |||
239 | signal = pending->signal; | ||
240 | sigemptyset(&retain); | ||
241 | |||
242 | list_for_each_entry_safe(q, n, &pending->list, list) { | ||
243 | int sig = q->info.si_signo; | ||
244 | |||
245 | if (likely(q->info.si_code != SI_TIMER)) { | ||
246 | sigaddset(&retain, sig); | ||
247 | } else { | ||
248 | sigdelset(&signal, sig); | ||
249 | list_del_init(&q->list); | ||
250 | __sigqueue_free(q); | ||
251 | } | ||
252 | } | ||
253 | |||
254 | sigorsets(&pending->signal, &signal, &retain); | ||
255 | } | ||
256 | |||
257 | void flush_itimer_signals(void) | ||
258 | { | ||
259 | struct task_struct *tsk = current; | ||
260 | unsigned long flags; | ||
261 | |||
262 | spin_lock_irqsave(&tsk->sighand->siglock, flags); | ||
263 | __flush_itimer_signals(&tsk->pending); | ||
264 | __flush_itimer_signals(&tsk->signal->shared_pending); | ||
265 | spin_unlock_irqrestore(&tsk->sighand->siglock, flags); | ||
266 | } | ||
267 | |||
234 | void ignore_signals(struct task_struct *t) | 268 | void ignore_signals(struct task_struct *t) |
235 | { | 269 | { |
236 | int i; | 270 | int i; |
@@ -1240,17 +1274,22 @@ void sigqueue_free(struct sigqueue *q) | |||
1240 | 1274 | ||
1241 | BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); | 1275 | BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); |
1242 | /* | 1276 | /* |
1243 | * If the signal is still pending remove it from the | 1277 | * We must hold ->siglock while testing q->list |
1244 | * pending queue. We must hold ->siglock while testing | 1278 | * to serialize with collect_signal() or with |
1245 | * q->list to serialize with collect_signal(). | 1279 | * __exit_signal()->flush_sigqueue(). |
1246 | */ | 1280 | */ |
1247 | spin_lock_irqsave(lock, flags); | 1281 | spin_lock_irqsave(lock, flags); |
1282 | q->flags &= ~SIGQUEUE_PREALLOC; | ||
1283 | /* | ||
1284 | * If it is queued it will be freed when dequeued, | ||
1285 | * like the "regular" sigqueue. | ||
1286 | */ | ||
1248 | if (!list_empty(&q->list)) | 1287 | if (!list_empty(&q->list)) |
1249 | list_del_init(&q->list); | 1288 | q = NULL; |
1250 | spin_unlock_irqrestore(lock, flags); | 1289 | spin_unlock_irqrestore(lock, flags); |
1251 | 1290 | ||
1252 | q->flags &= ~SIGQUEUE_PREALLOC; | 1291 | if (q) |
1253 | __sigqueue_free(q); | 1292 | __sigqueue_free(q); |
1254 | } | 1293 | } |
1255 | 1294 | ||
1256 | int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) | 1295 | int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) |
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 0101aeef7ed7..b7350bbfb076 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c | |||
@@ -62,8 +62,7 @@ static int stopmachine(void *cpu) | |||
62 | * help our sisters onto their CPUs. */ | 62 | * help our sisters onto their CPUs. */ |
63 | if (!prepared && !irqs_disabled) | 63 | if (!prepared && !irqs_disabled) |
64 | yield(); | 64 | yield(); |
65 | else | 65 | cpu_relax(); |
66 | cpu_relax(); | ||
67 | } | 66 | } |
68 | 67 | ||
69 | /* Ack: we are exiting. */ | 68 | /* Ack: we are exiting. */ |
@@ -106,8 +105,10 @@ static int stop_machine(void) | |||
106 | } | 105 | } |
107 | 106 | ||
108 | /* Wait for them all to come to life. */ | 107 | /* Wait for them all to come to life. */ |
109 | while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) | 108 | while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) { |
110 | yield(); | 109 | yield(); |
110 | cpu_relax(); | ||
111 | } | ||
111 | 112 | ||
112 | /* If some failed, kill them all. */ | 113 | /* If some failed, kill them all. */ |
113 | if (ret < 0) { | 114 | if (ret < 0) { |
diff --git a/kernel/sys.c b/kernel/sys.c index 895d2d4c9493..14e97282eb6c 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1652,7 +1652,7 @@ asmlinkage long sys_umask(int mask) | |||
1652 | asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | 1652 | asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, |
1653 | unsigned long arg4, unsigned long arg5) | 1653 | unsigned long arg4, unsigned long arg5) |
1654 | { | 1654 | { |
1655 | long uninitialized_var(error); | 1655 | long error = 0; |
1656 | 1656 | ||
1657 | if (security_task_prctl(option, arg2, arg3, arg4, arg5, &error)) | 1657 | if (security_task_prctl(option, arg2, arg3, arg4, arg5, &error)) |
1658 | return error; | 1658 | return error; |
@@ -1701,9 +1701,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1701 | error = PR_TIMING_STATISTICAL; | 1701 | error = PR_TIMING_STATISTICAL; |
1702 | break; | 1702 | break; |
1703 | case PR_SET_TIMING: | 1703 | case PR_SET_TIMING: |
1704 | if (arg2 == PR_TIMING_STATISTICAL) | 1704 | if (arg2 != PR_TIMING_STATISTICAL) |
1705 | error = 0; | ||
1706 | else | ||
1707 | error = -EINVAL; | 1705 | error = -EINVAL; |
1708 | break; | 1706 | break; |
1709 | 1707 | ||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index d7ffdc59816a..29116652dca8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -81,6 +81,7 @@ extern int compat_log; | |||
81 | extern int maps_protect; | 81 | extern int maps_protect; |
82 | extern int sysctl_stat_interval; | 82 | extern int sysctl_stat_interval; |
83 | extern int latencytop_enabled; | 83 | extern int latencytop_enabled; |
84 | extern int sysctl_nr_open_min, sysctl_nr_open_max; | ||
84 | 85 | ||
85 | /* Constants used for minimum and maximum */ | 86 | /* Constants used for minimum and maximum */ |
86 | #if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM) | 87 | #if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM) |
@@ -1190,7 +1191,9 @@ static struct ctl_table fs_table[] = { | |||
1190 | .data = &sysctl_nr_open, | 1191 | .data = &sysctl_nr_open, |
1191 | .maxlen = sizeof(int), | 1192 | .maxlen = sizeof(int), |
1192 | .mode = 0644, | 1193 | .mode = 0644, |
1193 | .proc_handler = &proc_dointvec, | 1194 | .proc_handler = &proc_dointvec_minmax, |
1195 | .extra1 = &sysctl_nr_open_min, | ||
1196 | .extra2 = &sysctl_nr_open_max, | ||
1194 | }, | 1197 | }, |
1195 | { | 1198 | { |
1196 | .ctl_name = FS_DENTRY, | 1199 | .ctl_name = FS_DENTRY, |
diff --git a/lib/bitrev.c b/lib/bitrev.c index 989aff73f881..3956203456d4 100644 --- a/lib/bitrev.c +++ b/lib/bitrev.c | |||
@@ -42,10 +42,11 @@ const u8 byte_rev_table[256] = { | |||
42 | }; | 42 | }; |
43 | EXPORT_SYMBOL_GPL(byte_rev_table); | 43 | EXPORT_SYMBOL_GPL(byte_rev_table); |
44 | 44 | ||
45 | static __always_inline u16 bitrev16(u16 x) | 45 | u16 bitrev16(u16 x) |
46 | { | 46 | { |
47 | return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); | 47 | return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); |
48 | } | 48 | } |
49 | EXPORT_SYMBOL(bitrev16); | ||
49 | 50 | ||
50 | /** | 51 | /** |
51 | * bitrev32 - reverse the order of bits in a u32 value | 52 | * bitrev32 - reverse the order of bits in a u32 value |
diff --git a/lib/div64.c b/lib/div64.c index bb5bd0c0f030..a111eb8de9cf 100644 --- a/lib/div64.c +++ b/lib/div64.c | |||
@@ -98,3 +98,13 @@ EXPORT_SYMBOL(div64_u64); | |||
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #endif /* BITS_PER_LONG == 32 */ | 100 | #endif /* BITS_PER_LONG == 32 */ |
101 | |||
102 | /* | ||
103 | * Iterative div/mod for use when dividend is not expected to be much | ||
104 | * bigger than divisor. | ||
105 | */ | ||
106 | u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) | ||
107 | { | ||
108 | return __iter_div_u64_rem(dividend, divisor, remainder); | ||
109 | } | ||
110 | EXPORT_SYMBOL(iter_div_u64_rem); | ||
@@ -48,7 +48,8 @@ void lmb_dump_all(void) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt); | 50 | pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt); |
51 | pr_info(" reserved.size = 0x%lx\n", lmb.reserved.size); | 51 | pr_info(" reserved.size = 0x%llx\n", |
52 | (unsigned long long)lmb.memory.size); | ||
52 | for (i=0; i < lmb.reserved.cnt ;i++) { | 53 | for (i=0; i < lmb.reserved.cnt ;i++) { |
53 | pr_info(" reserved.region[0x%lx].base = 0x%llx\n", | 54 | pr_info(" reserved.region[0x%lx].base = 0x%llx\n", |
54 | i, (unsigned long long)lmb.reserved.region[i].base); | 55 | i, (unsigned long long)lmb.reserved.region[i].base); |
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index bd521716ab1a..169a2f8dabcc 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -88,6 +88,57 @@ static inline gfp_t root_gfp_mask(struct radix_tree_root *root) | |||
88 | return root->gfp_mask & __GFP_BITS_MASK; | 88 | return root->gfp_mask & __GFP_BITS_MASK; |
89 | } | 89 | } |
90 | 90 | ||
91 | static inline void tag_set(struct radix_tree_node *node, unsigned int tag, | ||
92 | int offset) | ||
93 | { | ||
94 | __set_bit(offset, node->tags[tag]); | ||
95 | } | ||
96 | |||
97 | static inline void tag_clear(struct radix_tree_node *node, unsigned int tag, | ||
98 | int offset) | ||
99 | { | ||
100 | __clear_bit(offset, node->tags[tag]); | ||
101 | } | ||
102 | |||
103 | static inline int tag_get(struct radix_tree_node *node, unsigned int tag, | ||
104 | int offset) | ||
105 | { | ||
106 | return test_bit(offset, node->tags[tag]); | ||
107 | } | ||
108 | |||
109 | static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) | ||
110 | { | ||
111 | root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT)); | ||
112 | } | ||
113 | |||
114 | static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) | ||
115 | { | ||
116 | root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT)); | ||
117 | } | ||
118 | |||
119 | static inline void root_tag_clear_all(struct radix_tree_root *root) | ||
120 | { | ||
121 | root->gfp_mask &= __GFP_BITS_MASK; | ||
122 | } | ||
123 | |||
124 | static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) | ||
125 | { | ||
126 | return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); | ||
127 | } | ||
128 | |||
129 | /* | ||
130 | * Returns 1 if any slot in the node has this tag set. | ||
131 | * Otherwise returns 0. | ||
132 | */ | ||
133 | static inline int any_tag_set(struct radix_tree_node *node, unsigned int tag) | ||
134 | { | ||
135 | int idx; | ||
136 | for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) { | ||
137 | if (node->tags[tag][idx]) | ||
138 | return 1; | ||
139 | } | ||
140 | return 0; | ||
141 | } | ||
91 | /* | 142 | /* |
92 | * This assumes that the caller has performed appropriate preallocation, and | 143 | * This assumes that the caller has performed appropriate preallocation, and |
93 | * that the caller has pinned this thread of control to the current CPU. | 144 | * that the caller has pinned this thread of control to the current CPU. |
@@ -124,6 +175,17 @@ static void radix_tree_node_rcu_free(struct rcu_head *head) | |||
124 | { | 175 | { |
125 | struct radix_tree_node *node = | 176 | struct radix_tree_node *node = |
126 | container_of(head, struct radix_tree_node, rcu_head); | 177 | container_of(head, struct radix_tree_node, rcu_head); |
178 | |||
179 | /* | ||
180 | * must only free zeroed nodes into the slab. radix_tree_shrink | ||
181 | * can leave us with a non-NULL entry in the first slot, so clear | ||
182 | * that here to make sure. | ||
183 | */ | ||
184 | tag_clear(node, 0, 0); | ||
185 | tag_clear(node, 1, 0); | ||
186 | node->slots[0] = NULL; | ||
187 | node->count = 0; | ||
188 | |||
127 | kmem_cache_free(radix_tree_node_cachep, node); | 189 | kmem_cache_free(radix_tree_node_cachep, node); |
128 | } | 190 | } |
129 | 191 | ||
@@ -165,59 +227,6 @@ out: | |||
165 | } | 227 | } |
166 | EXPORT_SYMBOL(radix_tree_preload); | 228 | EXPORT_SYMBOL(radix_tree_preload); |
167 | 229 | ||
168 | static inline void tag_set(struct radix_tree_node *node, unsigned int tag, | ||
169 | int offset) | ||
170 | { | ||
171 | __set_bit(offset, node->tags[tag]); | ||
172 | } | ||
173 | |||
174 | static inline void tag_clear(struct radix_tree_node *node, unsigned int tag, | ||
175 | int offset) | ||
176 | { | ||
177 | __clear_bit(offset, node->tags[tag]); | ||
178 | } | ||
179 | |||
180 | static inline int tag_get(struct radix_tree_node *node, unsigned int tag, | ||
181 | int offset) | ||
182 | { | ||
183 | return test_bit(offset, node->tags[tag]); | ||
184 | } | ||
185 | |||
186 | static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) | ||
187 | { | ||
188 | root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT)); | ||
189 | } | ||
190 | |||
191 | |||
192 | static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) | ||
193 | { | ||
194 | root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT)); | ||
195 | } | ||
196 | |||
197 | static inline void root_tag_clear_all(struct radix_tree_root *root) | ||
198 | { | ||
199 | root->gfp_mask &= __GFP_BITS_MASK; | ||
200 | } | ||
201 | |||
202 | static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) | ||
203 | { | ||
204 | return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT)); | ||
205 | } | ||
206 | |||
207 | /* | ||
208 | * Returns 1 if any slot in the node has this tag set. | ||
209 | * Otherwise returns 0. | ||
210 | */ | ||
211 | static inline int any_tag_set(struct radix_tree_node *node, unsigned int tag) | ||
212 | { | ||
213 | int idx; | ||
214 | for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) { | ||
215 | if (node->tags[tag][idx]) | ||
216 | return 1; | ||
217 | } | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | /* | 230 | /* |
222 | * Return the maximum key which can be store into a | 231 | * Return the maximum key which can be store into a |
223 | * radix tree with height HEIGHT. | 232 | * radix tree with height HEIGHT. |
@@ -930,11 +939,6 @@ static inline void radix_tree_shrink(struct radix_tree_root *root) | |||
930 | newptr = radix_tree_ptr_to_indirect(newptr); | 939 | newptr = radix_tree_ptr_to_indirect(newptr); |
931 | root->rnode = newptr; | 940 | root->rnode = newptr; |
932 | root->height--; | 941 | root->height--; |
933 | /* must only free zeroed nodes into the slab */ | ||
934 | tag_clear(to_free, 0, 0); | ||
935 | tag_clear(to_free, 1, 0); | ||
936 | to_free->slots[0] = NULL; | ||
937 | to_free->count = 0; | ||
938 | radix_tree_node_free(to_free); | 942 | radix_tree_node_free(to_free); |
939 | } | 943 | } |
940 | } | 944 | } |
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 7c4f9e097095..f2e574dbc300 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -172,30 +172,22 @@ postcore_initcall(bdi_class_init); | |||
172 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, | 172 | int bdi_register(struct backing_dev_info *bdi, struct device *parent, |
173 | const char *fmt, ...) | 173 | const char *fmt, ...) |
174 | { | 174 | { |
175 | char *name; | ||
176 | va_list args; | 175 | va_list args; |
177 | int ret = 0; | 176 | int ret = 0; |
178 | struct device *dev; | 177 | struct device *dev; |
179 | 178 | ||
180 | va_start(args, fmt); | 179 | va_start(args, fmt); |
181 | name = kvasprintf(GFP_KERNEL, fmt, args); | 180 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); |
182 | va_end(args); | 181 | va_end(args); |
183 | |||
184 | if (!name) | ||
185 | return -ENOMEM; | ||
186 | |||
187 | dev = device_create(bdi_class, parent, MKDEV(0, 0), name); | ||
188 | if (IS_ERR(dev)) { | 182 | if (IS_ERR(dev)) { |
189 | ret = PTR_ERR(dev); | 183 | ret = PTR_ERR(dev); |
190 | goto exit; | 184 | goto exit; |
191 | } | 185 | } |
192 | 186 | ||
193 | bdi->dev = dev; | 187 | bdi->dev = dev; |
194 | dev_set_drvdata(bdi->dev, bdi); | 188 | bdi_debug_register(bdi, dev_name(dev)); |
195 | bdi_debug_register(bdi, name); | ||
196 | 189 | ||
197 | exit: | 190 | exit: |
198 | kfree(name); | ||
199 | return ret; | 191 | return ret; |
200 | } | 192 | } |
201 | EXPORT_SYMBOL(bdi_register); | 193 | EXPORT_SYMBOL(bdi_register); |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bbf953eeb58b..ab171274ef21 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -785,7 +785,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, | |||
785 | continue; | 785 | continue; |
786 | 786 | ||
787 | spin_lock(&dst->page_table_lock); | 787 | spin_lock(&dst->page_table_lock); |
788 | spin_lock(&src->page_table_lock); | 788 | spin_lock_nested(&src->page_table_lock, SINGLE_DEPTH_NESTING); |
789 | if (!huge_pte_none(huge_ptep_get(src_pte))) { | 789 | if (!huge_pte_none(huge_ptep_get(src_pte))) { |
790 | if (cow) | 790 | if (cow) |
791 | huge_ptep_set_wrprotect(src, addr, src_pte); | 791 | huge_ptep_set_wrprotect(src, addr, src_pte); |
diff --git a/mm/memory.c b/mm/memory.c index fb5608a120ed..19e0ae9beecb 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2295,8 +2295,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2295 | vmf.flags = flags; | 2295 | vmf.flags = flags; |
2296 | vmf.page = NULL; | 2296 | vmf.page = NULL; |
2297 | 2297 | ||
2298 | BUG_ON(vma->vm_flags & VM_PFNMAP); | ||
2299 | |||
2300 | ret = vma->vm_ops->fault(vma, &vmf); | 2298 | ret = vma->vm_ops->fault(vma, &vmf); |
2301 | if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) | 2299 | if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) |
2302 | return ret; | 2300 | return ret; |
@@ -80,7 +80,7 @@ EXPORT_SYMBOL(vm_get_page_prot); | |||
80 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ | 80 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ |
81 | int sysctl_overcommit_ratio = 50; /* default is 50% */ | 81 | int sysctl_overcommit_ratio = 50; /* default is 50% */ |
82 | int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; | 82 | int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; |
83 | atomic_t vm_committed_space = ATOMIC_INIT(0); | 83 | atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0); |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Check that a process has enough memory to allocate a new virtual | 86 | * Check that a process has enough memory to allocate a new virtual |
@@ -177,7 +177,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) | |||
177 | * cast `allowed' as a signed long because vm_committed_space | 177 | * cast `allowed' as a signed long because vm_committed_space |
178 | * sometimes has a negative value | 178 | * sometimes has a negative value |
179 | */ | 179 | */ |
180 | if (atomic_read(&vm_committed_space) < (long)allowed) | 180 | if (atomic_long_read(&vm_committed_space) < (long)allowed) |
181 | return 0; | 181 | return 0; |
182 | error: | 182 | error: |
183 | vm_unacct_memory(pages); | 183 | vm_unacct_memory(pages); |
@@ -245,10 +245,16 @@ asmlinkage unsigned long sys_brk(unsigned long brk) | |||
245 | unsigned long rlim, retval; | 245 | unsigned long rlim, retval; |
246 | unsigned long newbrk, oldbrk; | 246 | unsigned long newbrk, oldbrk; |
247 | struct mm_struct *mm = current->mm; | 247 | struct mm_struct *mm = current->mm; |
248 | unsigned long min_brk; | ||
248 | 249 | ||
249 | down_write(&mm->mmap_sem); | 250 | down_write(&mm->mmap_sem); |
250 | 251 | ||
251 | if (brk < mm->start_brk) | 252 | #ifdef CONFIG_COMPAT_BRK |
253 | min_brk = mm->end_code; | ||
254 | #else | ||
255 | min_brk = mm->start_brk; | ||
256 | #endif | ||
257 | if (brk < min_brk) | ||
252 | goto out; | 258 | goto out; |
253 | 259 | ||
254 | /* | 260 | /* |
diff --git a/mm/nommu.c b/mm/nommu.c index ef8c62cec697..4462b6a3fcb9 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -39,7 +39,7 @@ struct page *mem_map; | |||
39 | unsigned long max_mapnr; | 39 | unsigned long max_mapnr; |
40 | unsigned long num_physpages; | 40 | unsigned long num_physpages; |
41 | unsigned long askedalloc, realalloc; | 41 | unsigned long askedalloc, realalloc; |
42 | atomic_t vm_committed_space = ATOMIC_INIT(0); | 42 | atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0); |
43 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ | 43 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ |
44 | int sysctl_overcommit_ratio = 50; /* default is 50% */ | 44 | int sysctl_overcommit_ratio = 50; /* default is 50% */ |
45 | int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; | 45 | int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; |
@@ -109,16 +109,23 @@ unsigned int kobjsize(const void *objp) | |||
109 | * If the object we have should not have ksize performed on it, | 109 | * If the object we have should not have ksize performed on it, |
110 | * return size of 0 | 110 | * return size of 0 |
111 | */ | 111 | */ |
112 | if (!objp || (unsigned long)objp >= memory_end || !((page = virt_to_page(objp)))) | 112 | if (!objp || !virt_addr_valid(objp)) |
113 | return 0; | 113 | return 0; |
114 | 114 | ||
115 | page = virt_to_head_page(objp); | ||
116 | |||
117 | /* | ||
118 | * If the allocator sets PageSlab, we know the pointer came from | ||
119 | * kmalloc(). | ||
120 | */ | ||
115 | if (PageSlab(page)) | 121 | if (PageSlab(page)) |
116 | return ksize(objp); | 122 | return ksize(objp); |
117 | 123 | ||
118 | BUG_ON(page->index < 0); | 124 | /* |
119 | BUG_ON(page->index >= MAX_ORDER); | 125 | * The ksize() function is only guaranteed to work for pointers |
120 | 126 | * returned by kmalloc(). So handle arbitrary pointers here. | |
121 | return (PAGE_SIZE << page->index); | 127 | */ |
128 | return PAGE_SIZE << compound_order(page); | ||
122 | } | 129 | } |
123 | 130 | ||
124 | /* | 131 | /* |
@@ -1410,7 +1417,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) | |||
1410 | * cast `allowed' as a signed long because vm_committed_space | 1417 | * cast `allowed' as a signed long because vm_committed_space |
1411 | * sometimes has a negative value | 1418 | * sometimes has a negative value |
1412 | */ | 1419 | */ |
1413 | if (atomic_read(&vm_committed_space) < (long)allowed) | 1420 | if (atomic_long_read(&vm_committed_space) < (long)allowed) |
1414 | return 0; | 1421 | return 0; |
1415 | error: | 1422 | error: |
1416 | vm_unacct_memory(pages); | 1423 | vm_unacct_memory(pages); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 63835579323a..2f552955a02f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -237,16 +237,7 @@ static void bad_page(struct page *page) | |||
237 | printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n" | 237 | printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n" |
238 | KERN_EMERG "Backtrace:\n"); | 238 | KERN_EMERG "Backtrace:\n"); |
239 | dump_stack(); | 239 | dump_stack(); |
240 | page->flags &= ~(1 << PG_lru | | 240 | page->flags &= ~PAGE_FLAGS_CLEAR_WHEN_BAD; |
241 | 1 << PG_private | | ||
242 | 1 << PG_locked | | ||
243 | 1 << PG_active | | ||
244 | 1 << PG_dirty | | ||
245 | 1 << PG_reclaim | | ||
246 | 1 << PG_slab | | ||
247 | 1 << PG_swapcache | | ||
248 | 1 << PG_writeback | | ||
249 | 1 << PG_buddy ); | ||
250 | set_page_count(page, 0); | 241 | set_page_count(page, 0); |
251 | reset_page_mapcount(page); | 242 | reset_page_mapcount(page); |
252 | page->mapping = NULL; | 243 | page->mapping = NULL; |
@@ -463,16 +454,7 @@ static inline int free_pages_check(struct page *page) | |||
463 | (page->mapping != NULL) | | 454 | (page->mapping != NULL) | |
464 | (page_get_page_cgroup(page) != NULL) | | 455 | (page_get_page_cgroup(page) != NULL) | |
465 | (page_count(page) != 0) | | 456 | (page_count(page) != 0) | |
466 | (page->flags & ( | 457 | (page->flags & PAGE_FLAGS_CHECK_AT_FREE))) |
467 | 1 << PG_lru | | ||
468 | 1 << PG_private | | ||
469 | 1 << PG_locked | | ||
470 | 1 << PG_active | | ||
471 | 1 << PG_slab | | ||
472 | 1 << PG_swapcache | | ||
473 | 1 << PG_writeback | | ||
474 | 1 << PG_reserved | | ||
475 | 1 << PG_buddy )))) | ||
476 | bad_page(page); | 458 | bad_page(page); |
477 | if (PageDirty(page)) | 459 | if (PageDirty(page)) |
478 | __ClearPageDirty(page); | 460 | __ClearPageDirty(page); |
@@ -616,17 +598,7 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags) | |||
616 | (page->mapping != NULL) | | 598 | (page->mapping != NULL) | |
617 | (page_get_page_cgroup(page) != NULL) | | 599 | (page_get_page_cgroup(page) != NULL) | |
618 | (page_count(page) != 0) | | 600 | (page_count(page) != 0) | |
619 | (page->flags & ( | 601 | (page->flags & PAGE_FLAGS_CHECK_AT_PREP))) |
620 | 1 << PG_lru | | ||
621 | 1 << PG_private | | ||
622 | 1 << PG_locked | | ||
623 | 1 << PG_active | | ||
624 | 1 << PG_dirty | | ||
625 | 1 << PG_slab | | ||
626 | 1 << PG_swapcache | | ||
627 | 1 << PG_writeback | | ||
628 | 1 << PG_reserved | | ||
629 | 1 << PG_buddy )))) | ||
630 | bad_page(page); | 602 | bad_page(page); |
631 | 603 | ||
632 | /* | 604 | /* |
@@ -1396,6 +1368,9 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order, | |||
1396 | 1368 | ||
1397 | (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask, | 1369 | (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask, |
1398 | &preferred_zone); | 1370 | &preferred_zone); |
1371 | if (!preferred_zone) | ||
1372 | return NULL; | ||
1373 | |||
1399 | classzone_idx = zone_idx(preferred_zone); | 1374 | classzone_idx = zone_idx(preferred_zone); |
1400 | 1375 | ||
1401 | zonelist_scan: | 1376 | zonelist_scan: |
@@ -2804,7 +2779,7 @@ int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages) | |||
2804 | alloc_size = zone->wait_table_hash_nr_entries | 2779 | alloc_size = zone->wait_table_hash_nr_entries |
2805 | * sizeof(wait_queue_head_t); | 2780 | * sizeof(wait_queue_head_t); |
2806 | 2781 | ||
2807 | if (system_state == SYSTEM_BOOTING) { | 2782 | if (!slab_is_available()) { |
2808 | zone->wait_table = (wait_queue_head_t *) | 2783 | zone->wait_table = (wait_queue_head_t *) |
2809 | alloc_bootmem_node(pgdat, alloc_size); | 2784 | alloc_bootmem_node(pgdat, alloc_size); |
2810 | } else { | 2785 | } else { |
@@ -3378,7 +3353,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, | |||
3378 | * is used by this zone for memmap. This affects the watermark | 3353 | * is used by this zone for memmap. This affects the watermark |
3379 | * and per-cpu initialisations | 3354 | * and per-cpu initialisations |
3380 | */ | 3355 | */ |
3381 | memmap_pages = (size * sizeof(struct page)) >> PAGE_SHIFT; | 3356 | memmap_pages = |
3357 | PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT; | ||
3382 | if (realsize >= memmap_pages) { | 3358 | if (realsize >= memmap_pages) { |
3383 | realsize -= memmap_pages; | 3359 | realsize -= memmap_pages; |
3384 | printk(KERN_DEBUG | 3360 | printk(KERN_DEBUG |
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 0afd2387e507..d5878bed7841 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
@@ -3,14 +3,14 @@ | |||
3 | #include <linux/sched.h> | 3 | #include <linux/sched.h> |
4 | 4 | ||
5 | static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | 5 | static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, |
6 | const struct mm_walk *walk, void *private) | 6 | struct mm_walk *walk) |
7 | { | 7 | { |
8 | pte_t *pte; | 8 | pte_t *pte; |
9 | int err = 0; | 9 | int err = 0; |
10 | 10 | ||
11 | pte = pte_offset_map(pmd, addr); | 11 | pte = pte_offset_map(pmd, addr); |
12 | for (;;) { | 12 | for (;;) { |
13 | err = walk->pte_entry(pte, addr, addr + PAGE_SIZE, private); | 13 | err = walk->pte_entry(pte, addr, addr + PAGE_SIZE, walk); |
14 | if (err) | 14 | if (err) |
15 | break; | 15 | break; |
16 | addr += PAGE_SIZE; | 16 | addr += PAGE_SIZE; |
@@ -24,7 +24,7 @@ static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, | |||
24 | } | 24 | } |
25 | 25 | ||
26 | static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, | 26 | static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, |
27 | const struct mm_walk *walk, void *private) | 27 | struct mm_walk *walk) |
28 | { | 28 | { |
29 | pmd_t *pmd; | 29 | pmd_t *pmd; |
30 | unsigned long next; | 30 | unsigned long next; |
@@ -35,15 +35,15 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, | |||
35 | next = pmd_addr_end(addr, end); | 35 | next = pmd_addr_end(addr, end); |
36 | if (pmd_none_or_clear_bad(pmd)) { | 36 | if (pmd_none_or_clear_bad(pmd)) { |
37 | if (walk->pte_hole) | 37 | if (walk->pte_hole) |
38 | err = walk->pte_hole(addr, next, private); | 38 | err = walk->pte_hole(addr, next, walk); |
39 | if (err) | 39 | if (err) |
40 | break; | 40 | break; |
41 | continue; | 41 | continue; |
42 | } | 42 | } |
43 | if (walk->pmd_entry) | 43 | if (walk->pmd_entry) |
44 | err = walk->pmd_entry(pmd, addr, next, private); | 44 | err = walk->pmd_entry(pmd, addr, next, walk); |
45 | if (!err && walk->pte_entry) | 45 | if (!err && walk->pte_entry) |
46 | err = walk_pte_range(pmd, addr, next, walk, private); | 46 | err = walk_pte_range(pmd, addr, next, walk); |
47 | if (err) | 47 | if (err) |
48 | break; | 48 | break; |
49 | } while (pmd++, addr = next, addr != end); | 49 | } while (pmd++, addr = next, addr != end); |
@@ -52,7 +52,7 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, | |||
52 | } | 52 | } |
53 | 53 | ||
54 | static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, | 54 | static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, |
55 | const struct mm_walk *walk, void *private) | 55 | struct mm_walk *walk) |
56 | { | 56 | { |
57 | pud_t *pud; | 57 | pud_t *pud; |
58 | unsigned long next; | 58 | unsigned long next; |
@@ -63,15 +63,15 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
63 | next = pud_addr_end(addr, end); | 63 | next = pud_addr_end(addr, end); |
64 | if (pud_none_or_clear_bad(pud)) { | 64 | if (pud_none_or_clear_bad(pud)) { |
65 | if (walk->pte_hole) | 65 | if (walk->pte_hole) |
66 | err = walk->pte_hole(addr, next, private); | 66 | err = walk->pte_hole(addr, next, walk); |
67 | if (err) | 67 | if (err) |
68 | break; | 68 | break; |
69 | continue; | 69 | continue; |
70 | } | 70 | } |
71 | if (walk->pud_entry) | 71 | if (walk->pud_entry) |
72 | err = walk->pud_entry(pud, addr, next, private); | 72 | err = walk->pud_entry(pud, addr, next, walk); |
73 | if (!err && (walk->pmd_entry || walk->pte_entry)) | 73 | if (!err && (walk->pmd_entry || walk->pte_entry)) |
74 | err = walk_pmd_range(pud, addr, next, walk, private); | 74 | err = walk_pmd_range(pud, addr, next, walk); |
75 | if (err) | 75 | if (err) |
76 | break; | 76 | break; |
77 | } while (pud++, addr = next, addr != end); | 77 | } while (pud++, addr = next, addr != end); |
@@ -85,15 +85,15 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
85 | * @addr: starting address | 85 | * @addr: starting address |
86 | * @end: ending address | 86 | * @end: ending address |
87 | * @walk: set of callbacks to invoke for each level of the tree | 87 | * @walk: set of callbacks to invoke for each level of the tree |
88 | * @private: private data passed to the callback function | ||
89 | * | 88 | * |
90 | * Recursively walk the page table for the memory area in a VMA, | 89 | * Recursively walk the page table for the memory area in a VMA, |
91 | * calling supplied callbacks. Callbacks are called in-order (first | 90 | * calling supplied callbacks. Callbacks are called in-order (first |
92 | * PGD, first PUD, first PMD, first PTE, second PTE... second PMD, | 91 | * PGD, first PUD, first PMD, first PTE, second PTE... second PMD, |
93 | * etc.). If lower-level callbacks are omitted, walking depth is reduced. | 92 | * etc.). If lower-level callbacks are omitted, walking depth is reduced. |
94 | * | 93 | * |
95 | * Each callback receives an entry pointer, the start and end of the | 94 | * Each callback receives an entry pointer and the start and end of the |
96 | * associated range, and a caller-supplied private data pointer. | 95 | * associated range, and a copy of the original mm_walk for access to |
96 | * the ->private or ->mm fields. | ||
97 | * | 97 | * |
98 | * No locks are taken, but the bottom level iterator will map PTE | 98 | * No locks are taken, but the bottom level iterator will map PTE |
99 | * directories from highmem if necessary. | 99 | * directories from highmem if necessary. |
@@ -101,9 +101,8 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
101 | * If any callback returns a non-zero value, the walk is aborted and | 101 | * If any callback returns a non-zero value, the walk is aborted and |
102 | * the return value is propagated back to the caller. Otherwise 0 is returned. | 102 | * the return value is propagated back to the caller. Otherwise 0 is returned. |
103 | */ | 103 | */ |
104 | int walk_page_range(const struct mm_struct *mm, | 104 | int walk_page_range(unsigned long addr, unsigned long end, |
105 | unsigned long addr, unsigned long end, | 105 | struct mm_walk *walk) |
106 | const struct mm_walk *walk, void *private) | ||
107 | { | 106 | { |
108 | pgd_t *pgd; | 107 | pgd_t *pgd; |
109 | unsigned long next; | 108 | unsigned long next; |
@@ -112,21 +111,24 @@ int walk_page_range(const struct mm_struct *mm, | |||
112 | if (addr >= end) | 111 | if (addr >= end) |
113 | return err; | 112 | return err; |
114 | 113 | ||
115 | pgd = pgd_offset(mm, addr); | 114 | if (!walk->mm) |
115 | return -EINVAL; | ||
116 | |||
117 | pgd = pgd_offset(walk->mm, addr); | ||
116 | do { | 118 | do { |
117 | next = pgd_addr_end(addr, end); | 119 | next = pgd_addr_end(addr, end); |
118 | if (pgd_none_or_clear_bad(pgd)) { | 120 | if (pgd_none_or_clear_bad(pgd)) { |
119 | if (walk->pte_hole) | 121 | if (walk->pte_hole) |
120 | err = walk->pte_hole(addr, next, private); | 122 | err = walk->pte_hole(addr, next, walk); |
121 | if (err) | 123 | if (err) |
122 | break; | 124 | break; |
123 | continue; | 125 | continue; |
124 | } | 126 | } |
125 | if (walk->pgd_entry) | 127 | if (walk->pgd_entry) |
126 | err = walk->pgd_entry(pgd, addr, next, private); | 128 | err = walk->pgd_entry(pgd, addr, next, walk); |
127 | if (!err && | 129 | if (!err && |
128 | (walk->pud_entry || walk->pmd_entry || walk->pte_entry)) | 130 | (walk->pud_entry || walk->pmd_entry || walk->pte_entry)) |
129 | err = walk_pud_range(pgd, addr, next, walk, private); | 131 | err = walk_pud_range(pgd, addr, next, walk); |
130 | if (err) | 132 | if (err) |
131 | break; | 133 | break; |
132 | } while (pgd++, addr = next, addr != end); | 134 | } while (pgd++, addr = next, addr != end); |
@@ -469,8 +469,9 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node) | |||
469 | return ZERO_SIZE_PTR; | 469 | return ZERO_SIZE_PTR; |
470 | 470 | ||
471 | m = slob_alloc(size + align, gfp, align, node); | 471 | m = slob_alloc(size + align, gfp, align, node); |
472 | if (m) | 472 | if (!m) |
473 | *m = size; | 473 | return NULL; |
474 | *m = size; | ||
474 | return (void *)m + align; | 475 | return (void *)m + align; |
475 | } else { | 476 | } else { |
476 | void *ret; | 477 | void *ret; |
@@ -2726,9 +2726,10 @@ size_t ksize(const void *object) | |||
2726 | 2726 | ||
2727 | page = virt_to_head_page(object); | 2727 | page = virt_to_head_page(object); |
2728 | 2728 | ||
2729 | if (unlikely(!PageSlab(page))) | 2729 | if (unlikely(!PageSlab(page))) { |
2730 | WARN_ON(!PageCompound(page)); | ||
2730 | return PAGE_SIZE << compound_order(page); | 2731 | return PAGE_SIZE << compound_order(page); |
2731 | 2732 | } | |
2732 | s = page->slab; | 2733 | s = page->slab; |
2733 | 2734 | ||
2734 | #ifdef CONFIG_SLUB_DEBUG | 2735 | #ifdef CONFIG_SLUB_DEBUG |
@@ -503,7 +503,7 @@ void vm_acct_memory(long pages) | |||
503 | local = &__get_cpu_var(committed_space); | 503 | local = &__get_cpu_var(committed_space); |
504 | *local += pages; | 504 | *local += pages; |
505 | if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) { | 505 | if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) { |
506 | atomic_add(*local, &vm_committed_space); | 506 | atomic_long_add(*local, &vm_committed_space); |
507 | *local = 0; | 507 | *local = 0; |
508 | } | 508 | } |
509 | preempt_enable(); | 509 | preempt_enable(); |
@@ -520,7 +520,7 @@ static int cpu_swap_callback(struct notifier_block *nfb, | |||
520 | 520 | ||
521 | committed = &per_cpu(committed_space, (long)hcpu); | 521 | committed = &per_cpu(committed_space, (long)hcpu); |
522 | if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { | 522 | if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { |
523 | atomic_add(*committed, &vm_committed_space); | 523 | atomic_long_add(*committed, &vm_committed_space); |
524 | *committed = 0; | 524 | *committed = 0; |
525 | drain_cpu_pagevecs((long)hcpu); | 525 | drain_cpu_pagevecs((long)hcpu); |
526 | } | 526 | } |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 9a29901ad3b3..967d30ccd92b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1307,7 +1307,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, | |||
1307 | struct scan_control *sc) | 1307 | struct scan_control *sc) |
1308 | { | 1308 | { |
1309 | int priority; | 1309 | int priority; |
1310 | int ret = 0; | 1310 | unsigned long ret = 0; |
1311 | unsigned long total_scanned = 0; | 1311 | unsigned long total_scanned = 0; |
1312 | unsigned long nr_reclaimed = 0; | 1312 | unsigned long nr_reclaimed = 0; |
1313 | struct reclaim_state *reclaim_state = current->reclaim_state; | 1313 | struct reclaim_state *reclaim_state = current->reclaim_state; |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index e7ddbfa0e02f..08f14f6c5fd6 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -383,6 +383,18 @@ static void vlan_sync_address(struct net_device *dev, | |||
383 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); | 383 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); |
384 | } | 384 | } |
385 | 385 | ||
386 | static void vlan_transfer_features(struct net_device *dev, | ||
387 | struct net_device *vlandev) | ||
388 | { | ||
389 | unsigned long old_features = vlandev->features; | ||
390 | |||
391 | vlandev->features &= ~dev->vlan_features; | ||
392 | vlandev->features |= dev->features & dev->vlan_features; | ||
393 | |||
394 | if (old_features != vlandev->features) | ||
395 | netdev_features_change(vlandev); | ||
396 | } | ||
397 | |||
386 | static void __vlan_device_event(struct net_device *dev, unsigned long event) | 398 | static void __vlan_device_event(struct net_device *dev, unsigned long event) |
387 | { | 399 | { |
388 | switch (event) { | 400 | switch (event) { |
@@ -411,10 +423,8 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
411 | int i, flgs; | 423 | int i, flgs; |
412 | struct net_device *vlandev; | 424 | struct net_device *vlandev; |
413 | 425 | ||
414 | if (is_vlan_dev(dev)) { | 426 | if (is_vlan_dev(dev)) |
415 | __vlan_device_event(dev, event); | 427 | __vlan_device_event(dev, event); |
416 | goto out; | ||
417 | } | ||
418 | 428 | ||
419 | grp = __vlan_find_group(dev); | 429 | grp = __vlan_find_group(dev); |
420 | if (!grp) | 430 | if (!grp) |
@@ -451,6 +461,18 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | |||
451 | } | 461 | } |
452 | break; | 462 | break; |
453 | 463 | ||
464 | case NETDEV_FEAT_CHANGE: | ||
465 | /* Propagate device features to underlying device */ | ||
466 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | ||
467 | vlandev = vlan_group_get_device(grp, i); | ||
468 | if (!vlandev) | ||
469 | continue; | ||
470 | |||
471 | vlan_transfer_features(dev, vlandev); | ||
472 | } | ||
473 | |||
474 | break; | ||
475 | |||
454 | case NETDEV_DOWN: | 476 | case NETDEV_DOWN: |
455 | /* Put all VLANs for this dev in the down state too. */ | 477 | /* Put all VLANs for this dev in the down state too. */ |
456 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { | 478 | for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index c961f0826005..5d055c242ed8 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -663,6 +663,8 @@ static int vlan_dev_init(struct net_device *dev) | |||
663 | (1<<__LINK_STATE_DORMANT))) | | 663 | (1<<__LINK_STATE_DORMANT))) | |
664 | (1<<__LINK_STATE_PRESENT); | 664 | (1<<__LINK_STATE_PRESENT); |
665 | 665 | ||
666 | dev->features |= real_dev->features & real_dev->vlan_features; | ||
667 | |||
666 | /* ipv6 shared card related stuff */ | 668 | /* ipv6 shared card related stuff */ |
667 | dev->dev_id = real_dev->dev_id; | 669 | dev->dev_id = real_dev->dev_id; |
668 | 670 | ||
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c index d8f215733175..034aa10a5198 100644 --- a/net/ax25/ax25_subr.c +++ b/net/ax25/ax25_subr.c | |||
@@ -64,20 +64,15 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) | |||
64 | 64 | ||
65 | void ax25_requeue_frames(ax25_cb *ax25) | 65 | void ax25_requeue_frames(ax25_cb *ax25) |
66 | { | 66 | { |
67 | struct sk_buff *skb, *skb_prev = NULL; | 67 | struct sk_buff *skb; |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Requeue all the un-ack-ed frames on the output queue to be picked | 70 | * Requeue all the un-ack-ed frames on the output queue to be picked |
71 | * up by ax25_kick called from the timer. This arrangement handles the | 71 | * up by ax25_kick called from the timer. This arrangement handles the |
72 | * possibility of an empty output queue. | 72 | * possibility of an empty output queue. |
73 | */ | 73 | */ |
74 | while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { | 74 | while ((skb = skb_dequeue_tail(&ax25->ack_queue)) != NULL) |
75 | if (skb_prev == NULL) | 75 | skb_queue_head(&ax25->write_queue, skb); |
76 | skb_queue_head(&ax25->write_queue, skb); | ||
77 | else | ||
78 | skb_append(skb_prev, skb, &ax25->write_queue); | ||
79 | skb_prev = skb; | ||
80 | } | ||
81 | } | 76 | } |
82 | 77 | ||
83 | /* | 78 | /* |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index eb62558e9b09..0c2c93735e93 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) | |||
423 | 423 | ||
424 | rfcomm_dlc_lock(d); | 424 | rfcomm_dlc_lock(d); |
425 | d->state = BT_CLOSED; | 425 | d->state = BT_CLOSED; |
426 | rfcomm_dlc_unlock(d); | ||
427 | d->state_change(d, err); | 426 | d->state_change(d, err); |
427 | rfcomm_dlc_unlock(d); | ||
428 | 428 | ||
429 | skb_queue_purge(&d->tx_queue); | 429 | skb_queue_purge(&d->tx_queue); |
430 | rfcomm_dlc_unlink(d); | 430 | rfcomm_dlc_unlink(d); |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index c3f749abb2d0..c9191871c1e0 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -566,11 +566,22 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err) | |||
566 | if (dlc->state == BT_CLOSED) { | 566 | if (dlc->state == BT_CLOSED) { |
567 | if (!dev->tty) { | 567 | if (!dev->tty) { |
568 | if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) { | 568 | if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) { |
569 | if (rfcomm_dev_get(dev->id) == NULL) | 569 | /* Drop DLC lock here to avoid deadlock |
570 | * 1. rfcomm_dev_get will take rfcomm_dev_lock | ||
571 | * but in rfcomm_dev_add there's lock order: | ||
572 | * rfcomm_dev_lock -> dlc lock | ||
573 | * 2. rfcomm_dev_put will deadlock if it's | ||
574 | * the last reference | ||
575 | */ | ||
576 | rfcomm_dlc_unlock(dlc); | ||
577 | if (rfcomm_dev_get(dev->id) == NULL) { | ||
578 | rfcomm_dlc_lock(dlc); | ||
570 | return; | 579 | return; |
580 | } | ||
571 | 581 | ||
572 | rfcomm_dev_del(dev); | 582 | rfcomm_dev_del(dev); |
573 | rfcomm_dev_put(dev); | 583 | rfcomm_dev_put(dev); |
584 | rfcomm_dlc_lock(dlc); | ||
574 | } | 585 | } |
575 | } else | 586 | } else |
576 | tty_hangup(dev->tty); | 587 | tty_hangup(dev->tty); |
diff --git a/net/core/dev.c b/net/core/dev.c index a1607bc0cd4c..582963077877 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -903,7 +903,11 @@ int dev_change_name(struct net_device *dev, char *newname) | |||
903 | strlcpy(dev->name, newname, IFNAMSIZ); | 903 | strlcpy(dev->name, newname, IFNAMSIZ); |
904 | 904 | ||
905 | rollback: | 905 | rollback: |
906 | device_rename(&dev->dev, dev->name); | 906 | err = device_rename(&dev->dev, dev->name); |
907 | if (err) { | ||
908 | memcpy(dev->name, oldname, IFNAMSIZ); | ||
909 | return err; | ||
910 | } | ||
907 | 911 | ||
908 | write_lock_bh(&dev_base_lock); | 912 | write_lock_bh(&dev_base_lock); |
909 | hlist_del(&dev->name_hlist); | 913 | hlist_del(&dev->name_hlist); |
@@ -3137,7 +3141,7 @@ int dev_change_flags(struct net_device *dev, unsigned flags) | |||
3137 | * Load in the correct multicast list now the flags have changed. | 3141 | * Load in the correct multicast list now the flags have changed. |
3138 | */ | 3142 | */ |
3139 | 3143 | ||
3140 | if (dev->change_rx_flags && (dev->flags ^ flags) & IFF_MULTICAST) | 3144 | if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST) |
3141 | dev->change_rx_flags(dev, IFF_MULTICAST); | 3145 | dev->change_rx_flags(dev, IFF_MULTICAST); |
3142 | 3146 | ||
3143 | dev_set_rx_mode(dev); | 3147 | dev_set_rx_mode(dev); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5d9d7130bd6e..65f01f71b3f3 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1714,7 +1714,8 @@ static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms) | |||
1714 | return nla_nest_end(skb, nest); | 1714 | return nla_nest_end(skb, nest); |
1715 | 1715 | ||
1716 | nla_put_failure: | 1716 | nla_put_failure: |
1717 | return nla_nest_cancel(skb, nest); | 1717 | nla_nest_cancel(skb, nest); |
1718 | return -EMSGSIZE; | ||
1718 | } | 1719 | } |
1719 | 1720 | ||
1720 | static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl, | 1721 | static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl, |
@@ -2057,9 +2058,9 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh, | |||
2057 | goto nla_put_failure; | 2058 | goto nla_put_failure; |
2058 | } | 2059 | } |
2059 | 2060 | ||
2060 | ci.ndm_used = now - neigh->used; | 2061 | ci.ndm_used = jiffies_to_clock_t(now - neigh->used); |
2061 | ci.ndm_confirmed = now - neigh->confirmed; | 2062 | ci.ndm_confirmed = jiffies_to_clock_t(now - neigh->confirmed); |
2062 | ci.ndm_updated = now - neigh->updated; | 2063 | ci.ndm_updated = jiffies_to_clock_t(now - neigh->updated); |
2063 | ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1; | 2064 | ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1; |
2064 | read_unlock_bh(&neigh->lock); | 2065 | read_unlock_bh(&neigh->lock); |
2065 | 2066 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 8dca21110493..fdf537707e51 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -390,6 +390,7 @@ struct pktgen_thread { | |||
390 | int cpu; | 390 | int cpu; |
391 | 391 | ||
392 | wait_queue_head_t queue; | 392 | wait_queue_head_t queue; |
393 | struct completion start_done; | ||
393 | }; | 394 | }; |
394 | 395 | ||
395 | #define REMOVE 1 | 396 | #define REMOVE 1 |
@@ -3414,6 +3415,7 @@ static int pktgen_thread_worker(void *arg) | |||
3414 | BUG_ON(smp_processor_id() != cpu); | 3415 | BUG_ON(smp_processor_id() != cpu); |
3415 | 3416 | ||
3416 | init_waitqueue_head(&t->queue); | 3417 | init_waitqueue_head(&t->queue); |
3418 | complete(&t->start_done); | ||
3417 | 3419 | ||
3418 | pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); | 3420 | pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); |
3419 | 3421 | ||
@@ -3615,6 +3617,7 @@ static int __init pktgen_create_thread(int cpu) | |||
3615 | INIT_LIST_HEAD(&t->if_list); | 3617 | INIT_LIST_HEAD(&t->if_list); |
3616 | 3618 | ||
3617 | list_add_tail(&t->th_list, &pktgen_threads); | 3619 | list_add_tail(&t->th_list, &pktgen_threads); |
3620 | init_completion(&t->start_done); | ||
3618 | 3621 | ||
3619 | p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); | 3622 | p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); |
3620 | if (IS_ERR(p)) { | 3623 | if (IS_ERR(p)) { |
@@ -3639,6 +3642,7 @@ static int __init pktgen_create_thread(int cpu) | |||
3639 | } | 3642 | } |
3640 | 3643 | ||
3641 | wake_up_process(p); | 3644 | wake_up_process(p); |
3645 | wait_for_completion(&t->start_done); | ||
3642 | 3646 | ||
3643 | return 0; | 3647 | return 0; |
3644 | } | 3648 | } |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index cf857c4dc7b1..a9a77216310e 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -498,7 +498,8 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics) | |||
498 | return nla_nest_end(skb, mx); | 498 | return nla_nest_end(skb, mx); |
499 | 499 | ||
500 | nla_put_failure: | 500 | nla_put_failure: |
501 | return nla_nest_cancel(skb, mx); | 501 | nla_nest_cancel(skb, mx); |
502 | return -EMSGSIZE; | ||
502 | } | 503 | } |
503 | 504 | ||
504 | int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, | 505 | int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5c459f2b7985..1e556d312117 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1445,6 +1445,7 @@ done: | |||
1445 | 1445 | ||
1446 | if (spd.nr_pages) { | 1446 | if (spd.nr_pages) { |
1447 | int ret; | 1447 | int ret; |
1448 | struct sock *sk = __skb->sk; | ||
1448 | 1449 | ||
1449 | /* | 1450 | /* |
1450 | * Drop the socket lock, otherwise we have reverse | 1451 | * Drop the socket lock, otherwise we have reverse |
@@ -1455,9 +1456,9 @@ done: | |||
1455 | * we call into ->sendpage() with the i_mutex lock held | 1456 | * we call into ->sendpage() with the i_mutex lock held |
1456 | * and networking will grab the socket lock. | 1457 | * and networking will grab the socket lock. |
1457 | */ | 1458 | */ |
1458 | release_sock(__skb->sk); | 1459 | release_sock(sk); |
1459 | ret = splice_to_pipe(pipe, &spd); | 1460 | ret = splice_to_pipe(pipe, &spd); |
1460 | lock_sock(__skb->sk); | 1461 | lock_sock(sk); |
1461 | return ret; | 1462 | return ret; |
1462 | } | 1463 | } |
1463 | 1464 | ||
diff --git a/net/core/user_dma.c b/net/core/user_dma.c index 0ad1cd57bc39..c77aff9c6eb3 100644 --- a/net/core/user_dma.c +++ b/net/core/user_dma.c | |||
@@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan, | |||
75 | 75 | ||
76 | end = start + skb_shinfo(skb)->frags[i].size; | 76 | end = start + skb_shinfo(skb)->frags[i].size; |
77 | copy = end - offset; | 77 | copy = end - offset; |
78 | if ((copy = end - offset) > 0) { | 78 | if (copy > 0) { |
79 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 79 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
80 | struct page *page = frag->page; | 80 | struct page *page = frag->page; |
81 | 81 | ||
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 6de4bd195d28..1e8be246ad15 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -290,12 +290,12 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, | |||
290 | 290 | ||
291 | while (1) { | 291 | while (1) { |
292 | const u8 len = dccp_ackvec_len(av, index); | 292 | const u8 len = dccp_ackvec_len(av, index); |
293 | const u8 state = dccp_ackvec_state(av, index); | 293 | const u8 av_state = dccp_ackvec_state(av, index); |
294 | /* | 294 | /* |
295 | * valid packets not yet in av_buf have a reserved | 295 | * valid packets not yet in av_buf have a reserved |
296 | * entry, with a len equal to 0. | 296 | * entry, with a len equal to 0. |
297 | */ | 297 | */ |
298 | if (state == DCCP_ACKVEC_STATE_NOT_RECEIVED && | 298 | if (av_state == DCCP_ACKVEC_STATE_NOT_RECEIVED && |
299 | len == 0 && delta == 0) { /* Found our | 299 | len == 0 && delta == 0) { /* Found our |
300 | reserved seat! */ | 300 | reserved seat! */ |
301 | dccp_pr_debug("Found %llu reserved seat!\n", | 301 | dccp_pr_debug("Found %llu reserved seat!\n", |
@@ -325,31 +325,6 @@ out_duplicate: | |||
325 | return -EILSEQ; | 325 | return -EILSEQ; |
326 | } | 326 | } |
327 | 327 | ||
328 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
329 | void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) | ||
330 | { | ||
331 | dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len, | ||
332 | (unsigned long long)ackno); | ||
333 | |||
334 | while (len--) { | ||
335 | const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6; | ||
336 | const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK; | ||
337 | |||
338 | dccp_pr_debug_cat("%d,%d|", state, rl); | ||
339 | ++vector; | ||
340 | } | ||
341 | |||
342 | dccp_pr_debug_cat("\n"); | ||
343 | } | ||
344 | |||
345 | void dccp_ackvec_print(const struct dccp_ackvec *av) | ||
346 | { | ||
347 | dccp_ackvector_print(av->av_buf_ackno, | ||
348 | av->av_buf + av->av_buf_head, | ||
349 | av->av_vec_len); | ||
350 | } | ||
351 | #endif | ||
352 | |||
353 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, | 328 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, |
354 | struct dccp_ackvec_record *avr) | 329 | struct dccp_ackvec_record *avr) |
355 | { | 330 | { |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index cd61dea2eea1..a1929f33d703 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -159,8 +159,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp) | |||
159 | } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld) | 159 | } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld) |
160 | - (s64)hctx->ccid3hctx_rtt >= 0) { | 160 | - (s64)hctx->ccid3hctx_rtt >= 0) { |
161 | 161 | ||
162 | hctx->ccid3hctx_x = | 162 | hctx->ccid3hctx_x = min(2 * hctx->ccid3hctx_x, min_rate); |
163 | max(min(2 * hctx->ccid3hctx_x, min_rate), | 163 | hctx->ccid3hctx_x = max(hctx->ccid3hctx_x, |
164 | scaled_div(((__u64)hctx->ccid3hctx_s) << 6, | 164 | scaled_div(((__u64)hctx->ccid3hctx_s) << 6, |
165 | hctx->ccid3hctx_rtt)); | 165 | hctx->ccid3hctx_rtt)); |
166 | hctx->ccid3hctx_t_ld = now; | 166 | hctx->ccid3hctx_t_ld = now; |
@@ -193,22 +193,17 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len) | |||
193 | 193 | ||
194 | /* | 194 | /* |
195 | * Update Window Counter using the algorithm from [RFC 4342, 8.1]. | 195 | * Update Window Counter using the algorithm from [RFC 4342, 8.1]. |
196 | * The algorithm is not applicable if RTT < 4 microseconds. | 196 | * As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt(). |
197 | */ | 197 | */ |
198 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, | 198 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, |
199 | ktime_t now) | 199 | ktime_t now) |
200 | { | 200 | { |
201 | u32 quarter_rtts; | 201 | u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count), |
202 | 202 | quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt; | |
203 | if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */ | ||
204 | return; | ||
205 | |||
206 | quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count); | ||
207 | quarter_rtts /= hctx->ccid3hctx_rtt / 4; | ||
208 | 203 | ||
209 | if (quarter_rtts > 0) { | 204 | if (quarter_rtts > 0) { |
210 | hctx->ccid3hctx_t_last_win_count = now; | 205 | hctx->ccid3hctx_t_last_win_count = now; |
211 | hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5); | 206 | hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U); |
212 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ | 207 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ |
213 | } | 208 | } |
214 | } | 209 | } |
@@ -334,8 +329,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) | |||
334 | hctx->ccid3hctx_x = rfc3390_initial_rate(sk); | 329 | hctx->ccid3hctx_x = rfc3390_initial_rate(sk); |
335 | hctx->ccid3hctx_t_ld = now; | 330 | hctx->ccid3hctx_t_ld = now; |
336 | } else { | 331 | } else { |
337 | /* Sender does not have RTT sample: X_pps = 1 pkt/sec */ | 332 | /* |
338 | hctx->ccid3hctx_x = hctx->ccid3hctx_s; | 333 | * Sender does not have RTT sample: |
334 | * - set fallback RTT (RFC 4340, 3.4) since a RTT value | ||
335 | * is needed in several parts (e.g. window counter); | ||
336 | * - set sending rate X_pps = 1pps as per RFC 3448, 4.2. | ||
337 | */ | ||
338 | hctx->ccid3hctx_rtt = DCCP_FALLBACK_RTT; | ||
339 | hctx->ccid3hctx_x = hctx->ccid3hctx_s; | ||
339 | hctx->ccid3hctx_x <<= 6; | 340 | hctx->ccid3hctx_x <<= 6; |
340 | } | 341 | } |
341 | ccid3_update_send_interval(hctx); | 342 | ccid3_update_send_interval(hctx); |
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index d1dfbb8de64c..97ecec0a8e76 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -14,14 +14,6 @@ module_param(tfrc_debug, bool, 0444); | |||
14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); | 14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | extern int tfrc_tx_packet_history_init(void); | ||
18 | extern void tfrc_tx_packet_history_exit(void); | ||
19 | extern int tfrc_rx_packet_history_init(void); | ||
20 | extern void tfrc_rx_packet_history_exit(void); | ||
21 | |||
22 | extern int tfrc_li_init(void); | ||
23 | extern void tfrc_li_exit(void); | ||
24 | |||
25 | static int __init tfrc_module_init(void) | 17 | static int __init tfrc_module_init(void) |
26 | { | 18 | { |
27 | int rc = tfrc_li_init(); | 19 | int rc = tfrc_li_init(); |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index 1fb1187bbf1c..ed9857527acf 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
@@ -15,7 +15,7 @@ | |||
15 | * (at your option) any later version. | 15 | * (at your option) any later version. |
16 | */ | 16 | */ |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <asm/div64.h> | 18 | #include <linux/math64.h> |
19 | #include "../../dccp.h" | 19 | #include "../../dccp.h" |
20 | /* internal includes that this module exports: */ | 20 | /* internal includes that this module exports: */ |
21 | #include "loss_interval.h" | 21 | #include "loss_interval.h" |
@@ -29,21 +29,19 @@ extern int tfrc_debug; | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | /* integer-arithmetic divisions of type (a * 1000000)/b */ | 31 | /* integer-arithmetic divisions of type (a * 1000000)/b */ |
32 | static inline u64 scaled_div(u64 a, u32 b) | 32 | static inline u64 scaled_div(u64 a, u64 b) |
33 | { | 33 | { |
34 | BUG_ON(b==0); | 34 | BUG_ON(b==0); |
35 | a *= 1000000; | 35 | return div64_u64(a * 1000000, b); |
36 | do_div(a, b); | ||
37 | return a; | ||
38 | } | 36 | } |
39 | 37 | ||
40 | static inline u32 scaled_div32(u64 a, u32 b) | 38 | static inline u32 scaled_div32(u64 a, u64 b) |
41 | { | 39 | { |
42 | u64 result = scaled_div(a, b); | 40 | u64 result = scaled_div(a, b); |
43 | 41 | ||
44 | if (result > UINT_MAX) { | 42 | if (result > UINT_MAX) { |
45 | DCCP_CRIT("Overflow: a(%llu)/b(%u) > ~0U", | 43 | DCCP_CRIT("Overflow: %llu/%llu > UINT_MAX", |
46 | (unsigned long long)a, b); | 44 | (unsigned long long)a, (unsigned long long)b); |
47 | return UINT_MAX; | 45 | return UINT_MAX; |
48 | } | 46 | } |
49 | return result; | 47 | return result; |
@@ -58,7 +56,14 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) | |||
58 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; | 56 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; |
59 | } | 57 | } |
60 | 58 | ||
61 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); | 59 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); |
62 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); | 60 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); |
63 | 61 | ||
62 | extern int tfrc_tx_packet_history_init(void); | ||
63 | extern void tfrc_tx_packet_history_exit(void); | ||
64 | extern int tfrc_rx_packet_history_init(void); | ||
65 | extern void tfrc_rx_packet_history_exit(void); | ||
66 | |||
67 | extern int tfrc_li_init(void); | ||
68 | extern void tfrc_li_exit(void); | ||
64 | #endif /* _TFRC_H_ */ | 69 | #endif /* _TFRC_H_ */ |
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c index e4e64b76c10c..2f20a29cffe4 100644 --- a/net/dccp/ccids/lib/tfrc_equation.c +++ b/net/dccp/ccids/lib/tfrc_equation.c | |||
@@ -661,7 +661,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p) | |||
661 | 661 | ||
662 | EXPORT_SYMBOL_GPL(tfrc_calc_x); | 662 | EXPORT_SYMBOL_GPL(tfrc_calc_x); |
663 | 663 | ||
664 | /* | 664 | /** |
665 | * tfrc_calc_x_reverse_lookup - try to find p given f(p) | 665 | * tfrc_calc_x_reverse_lookup - try to find p given f(p) |
666 | * | 666 | * |
667 | * @fvalue: function value to match, scaled by 1000000 | 667 | * @fvalue: function value to match, scaled by 1000000 |
@@ -676,11 +676,11 @@ u32 tfrc_calc_x_reverse_lookup(u32 fvalue) | |||
676 | 676 | ||
677 | /* Error cases. */ | 677 | /* Error cases. */ |
678 | if (fvalue < tfrc_calc_x_lookup[0][1]) { | 678 | if (fvalue < tfrc_calc_x_lookup[0][1]) { |
679 | DCCP_WARN("fvalue %d smaller than resolution\n", fvalue); | 679 | DCCP_WARN("fvalue %u smaller than resolution\n", fvalue); |
680 | return tfrc_calc_x_lookup[0][1]; | 680 | return TFRC_SMALLEST_P; |
681 | } | 681 | } |
682 | if (fvalue > tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][0]) { | 682 | if (fvalue > tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][0]) { |
683 | DCCP_WARN("fvalue %d exceeds bounds!\n", fvalue); | 683 | DCCP_WARN("fvalue %u exceeds bounds!\n", fvalue); |
684 | return 1000000; | 684 | return 1000000; |
685 | } | 685 | } |
686 | 686 | ||
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index b348dd70c685..37d27bcb361f 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -589,7 +589,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
589 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | 589 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) |
590 | goto drop; | 590 | goto drop; |
591 | 591 | ||
592 | req = reqsk_alloc(&dccp_request_sock_ops); | 592 | req = inet_reqsk_alloc(&dccp_request_sock_ops); |
593 | if (req == NULL) | 593 | if (req == NULL) |
594 | goto drop; | 594 | goto drop; |
595 | 595 | ||
@@ -605,7 +605,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
605 | ireq = inet_rsk(req); | 605 | ireq = inet_rsk(req); |
606 | ireq->loc_addr = ip_hdr(skb)->daddr; | 606 | ireq->loc_addr = ip_hdr(skb)->daddr; |
607 | ireq->rmt_addr = ip_hdr(skb)->saddr; | 607 | ireq->rmt_addr = ip_hdr(skb)->saddr; |
608 | ireq->opt = NULL; | ||
609 | 608 | ||
610 | /* | 609 | /* |
611 | * Step 3: Process LISTEN state | 610 | * Step 3: Process LISTEN state |
@@ -739,8 +738,8 @@ int dccp_invalid_packet(struct sk_buff *skb) | |||
739 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet | 738 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet |
740 | * has short sequence numbers), drop packet and return | 739 | * has short sequence numbers), drop packet and return |
741 | */ | 740 | */ |
742 | if (dh->dccph_type >= DCCP_PKT_DATA && | 741 | if ((dh->dccph_type < DCCP_PKT_DATA || |
743 | dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { | 742 | dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) { |
744 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", | 743 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", |
745 | dccp_packet_name(dh->dccph_type)); | 744 | dccp_packet_name(dh->dccph_type)); |
746 | return 1; | 745 | return 1; |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 9b1129bb7ece..f7fe2a572d7b 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -421,7 +421,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
421 | ireq6 = inet6_rsk(req); | 421 | ireq6 = inet6_rsk(req); |
422 | ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); | 422 | ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); |
423 | ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); | 423 | ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); |
424 | ireq6->pktopts = NULL; | ||
425 | 424 | ||
426 | if (ipv6_opt_accepted(sk, skb) || | 425 | if (ipv6_opt_accepted(sk, skb) || |
427 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || | 426 | np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || |
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 33ad48321b08..66dca5bba858 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -165,12 +165,12 @@ out_free: | |||
165 | /* See dccp_v4_conn_request */ | 165 | /* See dccp_v4_conn_request */ |
166 | newdmsk->dccpms_sequence_window = req->rcv_wnd; | 166 | newdmsk->dccpms_sequence_window = req->rcv_wnd; |
167 | 167 | ||
168 | newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr; | 168 | newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss; |
169 | dccp_update_gsr(newsk, dreq->dreq_isr); | ||
170 | |||
171 | newdp->dccps_iss = dreq->dreq_iss; | ||
172 | dccp_update_gss(newsk, dreq->dreq_iss); | 169 | dccp_update_gss(newsk, dreq->dreq_iss); |
173 | 170 | ||
171 | newdp->dccps_isr = dreq->dreq_isr; | ||
172 | dccp_update_gsr(newsk, dreq->dreq_isr); | ||
173 | |||
174 | /* | 174 | /* |
175 | * SWL and AWL are initially adjusted so that they are not less than | 175 | * SWL and AWL are initially adjusted so that they are not less than |
176 | * the initial Sequence Numbers received and sent, respectively: | 176 | * the initial Sequence Numbers received and sent, respectively: |
diff --git a/net/dccp/options.c b/net/dccp/options.c index d2a84a2fecee..43bc24e761d0 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -107,9 +107,11 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, | |||
107 | * | 107 | * |
108 | * CCID-specific options are ignored during connection setup, as | 108 | * CCID-specific options are ignored during connection setup, as |
109 | * negotiation may still be in progress (see RFC 4340, 10.3). | 109 | * negotiation may still be in progress (see RFC 4340, 10.3). |
110 | * The same applies to Ack Vectors, as these depend on the CCID. | ||
110 | * | 111 | * |
111 | */ | 112 | */ |
112 | if (dreq != NULL && opt >= 128) | 113 | if (dreq != NULL && (opt >= 128 || |
114 | opt == DCCPO_ACK_VECTOR_0 || opt == DCCPO_ACK_VECTOR_1)) | ||
113 | goto ignore_option; | 115 | goto ignore_option; |
114 | 116 | ||
115 | switch (opt) { | 117 | switch (opt) { |
diff --git a/net/dccp/output.c b/net/dccp/output.c index 1f8a9b64c083..fe20068c5d8e 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -508,6 +508,7 @@ void dccp_send_ack(struct sock *sk) | |||
508 | 508 | ||
509 | EXPORT_SYMBOL_GPL(dccp_send_ack); | 509 | EXPORT_SYMBOL_GPL(dccp_send_ack); |
510 | 510 | ||
511 | #if 0 | ||
511 | /* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */ | 512 | /* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */ |
512 | void dccp_send_delayed_ack(struct sock *sk) | 513 | void dccp_send_delayed_ack(struct sock *sk) |
513 | { | 514 | { |
@@ -538,6 +539,7 @@ void dccp_send_delayed_ack(struct sock *sk) | |||
538 | icsk->icsk_ack.timeout = timeout; | 539 | icsk->icsk_ack.timeout = timeout; |
539 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); | 540 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); |
540 | } | 541 | } |
542 | #endif | ||
541 | 543 | ||
542 | void dccp_send_sync(struct sock *sk, const u64 ackno, | 544 | void dccp_send_sync(struct sock *sk, const u64 ackno, |
543 | const enum dccp_pkt_type pkt_type) | 545 | const enum dccp_pkt_type pkt_type) |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 0bcdc9250279..81368a7f5379 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -42,7 +42,7 @@ static int bufsize = 64 * 1024; | |||
42 | 42 | ||
43 | static const char procname[] = "dccpprobe"; | 43 | static const char procname[] = "dccpprobe"; |
44 | 44 | ||
45 | struct { | 45 | static struct { |
46 | struct kfifo *fifo; | 46 | struct kfifo *fifo; |
47 | spinlock_t lock; | 47 | spinlock_t lock; |
48 | wait_queue_head_t wait; | 48 | wait_queue_head_t wait; |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 418862f1bf22..9b539fa9fe18 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -1288,7 +1288,6 @@ static void arp_format_neigh_entry(struct seq_file *seq, | |||
1288 | struct neighbour *n) | 1288 | struct neighbour *n) |
1289 | { | 1289 | { |
1290 | char hbuffer[HBUFFERLEN]; | 1290 | char hbuffer[HBUFFERLEN]; |
1291 | const char hexbuf[] = "0123456789ABCDEF"; | ||
1292 | int k, j; | 1291 | int k, j; |
1293 | char tbuf[16]; | 1292 | char tbuf[16]; |
1294 | struct net_device *dev = n->dev; | 1293 | struct net_device *dev = n->dev; |
@@ -1302,8 +1301,8 @@ static void arp_format_neigh_entry(struct seq_file *seq, | |||
1302 | else { | 1301 | else { |
1303 | #endif | 1302 | #endif |
1304 | for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) { | 1303 | for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) { |
1305 | hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15]; | 1304 | hbuffer[k++] = hex_asc_hi(n->ha[j]); |
1306 | hbuffer[k++] = hexbuf[n->ha[j] & 15]; | 1305 | hbuffer[k++] = hex_asc_lo(n->ha[j]); |
1307 | hbuffer[k++] = ':'; | 1306 | hbuffer[k++] = ':'; |
1308 | } | 1307 | } |
1309 | hbuffer[--k] = 0; | 1308 | hbuffer[--k] = 0; |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 6848e4760f34..79a7ef6209ff 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -90,7 +90,6 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = { | |||
90 | [IFA_LOCAL] = { .type = NLA_U32 }, | 90 | [IFA_LOCAL] = { .type = NLA_U32 }, |
91 | [IFA_ADDRESS] = { .type = NLA_U32 }, | 91 | [IFA_ADDRESS] = { .type = NLA_U32 }, |
92 | [IFA_BROADCAST] = { .type = NLA_U32 }, | 92 | [IFA_BROADCAST] = { .type = NLA_U32 }, |
93 | [IFA_ANYCAST] = { .type = NLA_U32 }, | ||
94 | [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, | 93 | [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, |
95 | }; | 94 | }; |
96 | 95 | ||
@@ -536,9 +535,6 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh) | |||
536 | if (tb[IFA_BROADCAST]) | 535 | if (tb[IFA_BROADCAST]) |
537 | ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]); | 536 | ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]); |
538 | 537 | ||
539 | if (tb[IFA_ANYCAST]) | ||
540 | ifa->ifa_anycast = nla_get_be32(tb[IFA_ANYCAST]); | ||
541 | |||
542 | if (tb[IFA_LABEL]) | 538 | if (tb[IFA_LABEL]) |
543 | nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ); | 539 | nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ); |
544 | else | 540 | else |
@@ -745,7 +741,6 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
745 | break; | 741 | break; |
746 | inet_del_ifa(in_dev, ifap, 0); | 742 | inet_del_ifa(in_dev, ifap, 0); |
747 | ifa->ifa_broadcast = 0; | 743 | ifa->ifa_broadcast = 0; |
748 | ifa->ifa_anycast = 0; | ||
749 | ifa->ifa_scope = 0; | 744 | ifa->ifa_scope = 0; |
750 | } | 745 | } |
751 | 746 | ||
@@ -1113,7 +1108,6 @@ static inline size_t inet_nlmsg_size(void) | |||
1113 | + nla_total_size(4) /* IFA_ADDRESS */ | 1108 | + nla_total_size(4) /* IFA_ADDRESS */ |
1114 | + nla_total_size(4) /* IFA_LOCAL */ | 1109 | + nla_total_size(4) /* IFA_LOCAL */ |
1115 | + nla_total_size(4) /* IFA_BROADCAST */ | 1110 | + nla_total_size(4) /* IFA_BROADCAST */ |
1116 | + nla_total_size(4) /* IFA_ANYCAST */ | ||
1117 | + nla_total_size(IFNAMSIZ); /* IFA_LABEL */ | 1111 | + nla_total_size(IFNAMSIZ); /* IFA_LABEL */ |
1118 | } | 1112 | } |
1119 | 1113 | ||
@@ -1143,9 +1137,6 @@ static int inet_fill_ifaddr(struct sk_buff *skb, struct in_ifaddr *ifa, | |||
1143 | if (ifa->ifa_broadcast) | 1137 | if (ifa->ifa_broadcast) |
1144 | NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast); | 1138 | NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast); |
1145 | 1139 | ||
1146 | if (ifa->ifa_anycast) | ||
1147 | NLA_PUT_BE32(skb, IFA_ANYCAST, ifa->ifa_anycast); | ||
1148 | |||
1149 | if (ifa->ifa_label[0]) | 1140 | if (ifa->ifa_label[0]) |
1150 | NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label); | 1141 | NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label); |
1151 | 1142 | ||
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 0f1557a4ac7a..0b2ac6a3d903 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -506,7 +506,6 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX+1] = { | |||
506 | [RTA_PREFSRC] = { .type = NLA_U32 }, | 506 | [RTA_PREFSRC] = { .type = NLA_U32 }, |
507 | [RTA_METRICS] = { .type = NLA_NESTED }, | 507 | [RTA_METRICS] = { .type = NLA_NESTED }, |
508 | [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, | 508 | [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, |
509 | [RTA_PROTOINFO] = { .type = NLA_U32 }, | ||
510 | [RTA_FLOW] = { .type = NLA_U32 }, | 509 | [RTA_FLOW] = { .type = NLA_U32 }, |
511 | }; | 510 | }; |
512 | 511 | ||
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 3b83c34019fc..0d4d72827e4b 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -960,7 +960,10 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, | |||
960 | rtm->rtm_dst_len = dst_len; | 960 | rtm->rtm_dst_len = dst_len; |
961 | rtm->rtm_src_len = 0; | 961 | rtm->rtm_src_len = 0; |
962 | rtm->rtm_tos = tos; | 962 | rtm->rtm_tos = tos; |
963 | rtm->rtm_table = tb_id; | 963 | if (tb_id < 256) |
964 | rtm->rtm_table = tb_id; | ||
965 | else | ||
966 | rtm->rtm_table = RT_TABLE_COMPAT; | ||
964 | NLA_PUT_U32(skb, RTA_TABLE, tb_id); | 967 | NLA_PUT_U32(skb, RTA_TABLE, tb_id); |
965 | rtm->rtm_type = type; | 968 | rtm->rtm_type = type; |
966 | rtm->rtm_flags = fi->fib_flags; | 969 | rtm->rtm_flags = fi->fib_flags; |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 828ea211ff21..045e799d3e1d 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -419,7 +419,8 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
419 | struct inet_connection_sock *icsk = inet_csk(parent); | 419 | struct inet_connection_sock *icsk = inet_csk(parent); |
420 | struct request_sock_queue *queue = &icsk->icsk_accept_queue; | 420 | struct request_sock_queue *queue = &icsk->icsk_accept_queue; |
421 | struct listen_sock *lopt = queue->listen_opt; | 421 | struct listen_sock *lopt = queue->listen_opt; |
422 | int thresh = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries; | 422 | int max_retries = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries; |
423 | int thresh = max_retries; | ||
423 | unsigned long now = jiffies; | 424 | unsigned long now = jiffies; |
424 | struct request_sock **reqp, *req; | 425 | struct request_sock **reqp, *req; |
425 | int i, budget; | 426 | int i, budget; |
@@ -455,6 +456,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
455 | } | 456 | } |
456 | } | 457 | } |
457 | 458 | ||
459 | if (queue->rskq_defer_accept) | ||
460 | max_retries = queue->rskq_defer_accept; | ||
461 | |||
458 | budget = 2 * (lopt->nr_table_entries / (timeout / interval)); | 462 | budget = 2 * (lopt->nr_table_entries / (timeout / interval)); |
459 | i = lopt->clock_hand; | 463 | i = lopt->clock_hand; |
460 | 464 | ||
@@ -462,8 +466,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
462 | reqp=&lopt->syn_table[i]; | 466 | reqp=&lopt->syn_table[i]; |
463 | while ((req = *reqp) != NULL) { | 467 | while ((req = *reqp) != NULL) { |
464 | if (time_after_eq(now, req->expires)) { | 468 | if (time_after_eq(now, req->expires)) { |
465 | if (req->retrans < thresh && | 469 | if ((req->retrans < (inet_rsk(req)->acked ? max_retries : thresh)) && |
466 | !req->rsk_ops->rtx_syn_ack(parent, req)) { | 470 | (inet_rsk(req)->acked || |
471 | !req->rsk_ops->rtx_syn_ack(parent, req))) { | ||
467 | unsigned long timeo; | 472 | unsigned long timeo; |
468 | 473 | ||
469 | if (req->retrans++ == 0) | 474 | if (req->retrans++ == 0) |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 2ada033406de..4342cba4ff82 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -313,9 +313,8 @@ static void ipgre_tunnel_uninit(struct net_device *dev) | |||
313 | 313 | ||
314 | static void ipgre_err(struct sk_buff *skb, u32 info) | 314 | static void ipgre_err(struct sk_buff *skb, u32 info) |
315 | { | 315 | { |
316 | #ifndef I_WISH_WORLD_WERE_PERFECT | ||
317 | 316 | ||
318 | /* It is not :-( All the routers (except for Linux) return only | 317 | /* All the routers (except for Linux) return only |
319 | 8 bytes of packet payload. It means, that precise relaying of | 318 | 8 bytes of packet payload. It means, that precise relaying of |
320 | ICMP in the real Internet is absolutely infeasible. | 319 | ICMP in the real Internet is absolutely infeasible. |
321 | 320 | ||
@@ -398,149 +397,6 @@ static void ipgre_err(struct sk_buff *skb, u32 info) | |||
398 | out: | 397 | out: |
399 | read_unlock(&ipgre_lock); | 398 | read_unlock(&ipgre_lock); |
400 | return; | 399 | return; |
401 | #else | ||
402 | struct iphdr *iph = (struct iphdr*)dp; | ||
403 | struct iphdr *eiph; | ||
404 | __be16 *p = (__be16*)(dp+(iph->ihl<<2)); | ||
405 | const int type = icmp_hdr(skb)->type; | ||
406 | const int code = icmp_hdr(skb)->code; | ||
407 | int rel_type = 0; | ||
408 | int rel_code = 0; | ||
409 | __be32 rel_info = 0; | ||
410 | __u32 n = 0; | ||
411 | __be16 flags; | ||
412 | int grehlen = (iph->ihl<<2) + 4; | ||
413 | struct sk_buff *skb2; | ||
414 | struct flowi fl; | ||
415 | struct rtable *rt; | ||
416 | |||
417 | if (p[1] != htons(ETH_P_IP)) | ||
418 | return; | ||
419 | |||
420 | flags = p[0]; | ||
421 | if (flags&(GRE_CSUM|GRE_KEY|GRE_SEQ|GRE_ROUTING|GRE_VERSION)) { | ||
422 | if (flags&(GRE_VERSION|GRE_ROUTING)) | ||
423 | return; | ||
424 | if (flags&GRE_CSUM) | ||
425 | grehlen += 4; | ||
426 | if (flags&GRE_KEY) | ||
427 | grehlen += 4; | ||
428 | if (flags&GRE_SEQ) | ||
429 | grehlen += 4; | ||
430 | } | ||
431 | if (len < grehlen + sizeof(struct iphdr)) | ||
432 | return; | ||
433 | eiph = (struct iphdr*)(dp + grehlen); | ||
434 | |||
435 | switch (type) { | ||
436 | default: | ||
437 | return; | ||
438 | case ICMP_PARAMETERPROB: | ||
439 | n = ntohl(icmp_hdr(skb)->un.gateway) >> 24; | ||
440 | if (n < (iph->ihl<<2)) | ||
441 | return; | ||
442 | |||
443 | /* So... This guy found something strange INSIDE encapsulated | ||
444 | packet. Well, he is fool, but what can we do ? | ||
445 | */ | ||
446 | rel_type = ICMP_PARAMETERPROB; | ||
447 | n -= grehlen; | ||
448 | rel_info = htonl(n << 24); | ||
449 | break; | ||
450 | |||
451 | case ICMP_DEST_UNREACH: | ||
452 | switch (code) { | ||
453 | case ICMP_SR_FAILED: | ||
454 | case ICMP_PORT_UNREACH: | ||
455 | /* Impossible event. */ | ||
456 | return; | ||
457 | case ICMP_FRAG_NEEDED: | ||
458 | /* And it is the only really necessary thing :-) */ | ||
459 | n = ntohs(icmp_hdr(skb)->un.frag.mtu); | ||
460 | if (n < grehlen+68) | ||
461 | return; | ||
462 | n -= grehlen; | ||
463 | /* BSD 4.2 MORE DOES NOT EXIST IN NATURE. */ | ||
464 | if (n > ntohs(eiph->tot_len)) | ||
465 | return; | ||
466 | rel_info = htonl(n); | ||
467 | break; | ||
468 | default: | ||
469 | /* All others are translated to HOST_UNREACH. | ||
470 | rfc2003 contains "deep thoughts" about NET_UNREACH, | ||
471 | I believe, it is just ether pollution. --ANK | ||
472 | */ | ||
473 | rel_type = ICMP_DEST_UNREACH; | ||
474 | rel_code = ICMP_HOST_UNREACH; | ||
475 | break; | ||
476 | } | ||
477 | break; | ||
478 | case ICMP_TIME_EXCEEDED: | ||
479 | if (code != ICMP_EXC_TTL) | ||
480 | return; | ||
481 | break; | ||
482 | } | ||
483 | |||
484 | /* Prepare fake skb to feed it to icmp_send */ | ||
485 | skb2 = skb_clone(skb, GFP_ATOMIC); | ||
486 | if (skb2 == NULL) | ||
487 | return; | ||
488 | dst_release(skb2->dst); | ||
489 | skb2->dst = NULL; | ||
490 | skb_pull(skb2, skb->data - (u8*)eiph); | ||
491 | skb_reset_network_header(skb2); | ||
492 | |||
493 | /* Try to guess incoming interface */ | ||
494 | memset(&fl, 0, sizeof(fl)); | ||
495 | fl.fl4_dst = eiph->saddr; | ||
496 | fl.fl4_tos = RT_TOS(eiph->tos); | ||
497 | fl.proto = IPPROTO_GRE; | ||
498 | if (ip_route_output_key(dev_net(skb->dev), &rt, &fl)) { | ||
499 | kfree_skb(skb2); | ||
500 | return; | ||
501 | } | ||
502 | skb2->dev = rt->u.dst.dev; | ||
503 | |||
504 | /* route "incoming" packet */ | ||
505 | if (rt->rt_flags&RTCF_LOCAL) { | ||
506 | ip_rt_put(rt); | ||
507 | rt = NULL; | ||
508 | fl.fl4_dst = eiph->daddr; | ||
509 | fl.fl4_src = eiph->saddr; | ||
510 | fl.fl4_tos = eiph->tos; | ||
511 | if (ip_route_output_key(dev_net(skb->dev), &rt, &fl) || | ||
512 | rt->u.dst.dev->type != ARPHRD_IPGRE) { | ||
513 | ip_rt_put(rt); | ||
514 | kfree_skb(skb2); | ||
515 | return; | ||
516 | } | ||
517 | } else { | ||
518 | ip_rt_put(rt); | ||
519 | if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) || | ||
520 | skb2->dst->dev->type != ARPHRD_IPGRE) { | ||
521 | kfree_skb(skb2); | ||
522 | return; | ||
523 | } | ||
524 | } | ||
525 | |||
526 | /* change mtu on this route */ | ||
527 | if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { | ||
528 | if (n > dst_mtu(skb2->dst)) { | ||
529 | kfree_skb(skb2); | ||
530 | return; | ||
531 | } | ||
532 | skb2->dst->ops->update_pmtu(skb2->dst, n); | ||
533 | } else if (type == ICMP_TIME_EXCEEDED) { | ||
534 | struct ip_tunnel *t = netdev_priv(skb2->dev); | ||
535 | if (t->parms.iph.ttl) { | ||
536 | rel_type = ICMP_DEST_UNREACH; | ||
537 | rel_code = ICMP_HOST_UNREACH; | ||
538 | } | ||
539 | } | ||
540 | |||
541 | icmp_send(skb2, rel_type, rel_code, rel_info); | ||
542 | kfree_skb(skb2); | ||
543 | #endif | ||
544 | } | 400 | } |
545 | 401 | ||
546 | static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) | 402 | static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 149111f08e8d..af5cb53da5cc 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -278,9 +278,8 @@ static void ipip_tunnel_uninit(struct net_device *dev) | |||
278 | 278 | ||
279 | static int ipip_err(struct sk_buff *skb, u32 info) | 279 | static int ipip_err(struct sk_buff *skb, u32 info) |
280 | { | 280 | { |
281 | #ifndef I_WISH_WORLD_WERE_PERFECT | ||
282 | 281 | ||
283 | /* It is not :-( All the routers (except for Linux) return only | 282 | /* All the routers (except for Linux) return only |
284 | 8 bytes of packet payload. It means, that precise relaying of | 283 | 8 bytes of packet payload. It means, that precise relaying of |
285 | ICMP in the real Internet is absolutely infeasible. | 284 | ICMP in the real Internet is absolutely infeasible. |
286 | */ | 285 | */ |
@@ -337,133 +336,6 @@ static int ipip_err(struct sk_buff *skb, u32 info) | |||
337 | out: | 336 | out: |
338 | read_unlock(&ipip_lock); | 337 | read_unlock(&ipip_lock); |
339 | return err; | 338 | return err; |
340 | #else | ||
341 | struct iphdr *iph = (struct iphdr*)dp; | ||
342 | int hlen = iph->ihl<<2; | ||
343 | struct iphdr *eiph; | ||
344 | const int type = icmp_hdr(skb)->type; | ||
345 | const int code = icmp_hdr(skb)->code; | ||
346 | int rel_type = 0; | ||
347 | int rel_code = 0; | ||
348 | __be32 rel_info = 0; | ||
349 | __u32 n = 0; | ||
350 | struct sk_buff *skb2; | ||
351 | struct flowi fl; | ||
352 | struct rtable *rt; | ||
353 | |||
354 | if (len < hlen + sizeof(struct iphdr)) | ||
355 | return 0; | ||
356 | eiph = (struct iphdr*)(dp + hlen); | ||
357 | |||
358 | switch (type) { | ||
359 | default: | ||
360 | return 0; | ||
361 | case ICMP_PARAMETERPROB: | ||
362 | n = ntohl(icmp_hdr(skb)->un.gateway) >> 24; | ||
363 | if (n < hlen) | ||
364 | return 0; | ||
365 | |||
366 | /* So... This guy found something strange INSIDE encapsulated | ||
367 | packet. Well, he is fool, but what can we do ? | ||
368 | */ | ||
369 | rel_type = ICMP_PARAMETERPROB; | ||
370 | rel_info = htonl((n - hlen) << 24); | ||
371 | break; | ||
372 | |||
373 | case ICMP_DEST_UNREACH: | ||
374 | switch (code) { | ||
375 | case ICMP_SR_FAILED: | ||
376 | case ICMP_PORT_UNREACH: | ||
377 | /* Impossible event. */ | ||
378 | return 0; | ||
379 | case ICMP_FRAG_NEEDED: | ||
380 | /* And it is the only really necessary thing :-) */ | ||
381 | n = ntohs(icmp_hdr(skb)->un.frag.mtu); | ||
382 | if (n < hlen+68) | ||
383 | return 0; | ||
384 | n -= hlen; | ||
385 | /* BSD 4.2 MORE DOES NOT EXIST IN NATURE. */ | ||
386 | if (n > ntohs(eiph->tot_len)) | ||
387 | return 0; | ||
388 | rel_info = htonl(n); | ||
389 | break; | ||
390 | default: | ||
391 | /* All others are translated to HOST_UNREACH. | ||
392 | rfc2003 contains "deep thoughts" about NET_UNREACH, | ||
393 | I believe, it is just ether pollution. --ANK | ||
394 | */ | ||
395 | rel_type = ICMP_DEST_UNREACH; | ||
396 | rel_code = ICMP_HOST_UNREACH; | ||
397 | break; | ||
398 | } | ||
399 | break; | ||
400 | case ICMP_TIME_EXCEEDED: | ||
401 | if (code != ICMP_EXC_TTL) | ||
402 | return 0; | ||
403 | break; | ||
404 | } | ||
405 | |||
406 | /* Prepare fake skb to feed it to icmp_send */ | ||
407 | skb2 = skb_clone(skb, GFP_ATOMIC); | ||
408 | if (skb2 == NULL) | ||
409 | return 0; | ||
410 | dst_release(skb2->dst); | ||
411 | skb2->dst = NULL; | ||
412 | skb_pull(skb2, skb->data - (u8*)eiph); | ||
413 | skb_reset_network_header(skb2); | ||
414 | |||
415 | /* Try to guess incoming interface */ | ||
416 | memset(&fl, 0, sizeof(fl)); | ||
417 | fl.fl4_daddr = eiph->saddr; | ||
418 | fl.fl4_tos = RT_TOS(eiph->tos); | ||
419 | fl.proto = IPPROTO_IPIP; | ||
420 | if (ip_route_output_key(dev_net(skb->dev), &rt, &key)) { | ||
421 | kfree_skb(skb2); | ||
422 | return 0; | ||
423 | } | ||
424 | skb2->dev = rt->u.dst.dev; | ||
425 | |||
426 | /* route "incoming" packet */ | ||
427 | if (rt->rt_flags&RTCF_LOCAL) { | ||
428 | ip_rt_put(rt); | ||
429 | rt = NULL; | ||
430 | fl.fl4_daddr = eiph->daddr; | ||
431 | fl.fl4_src = eiph->saddr; | ||
432 | fl.fl4_tos = eiph->tos; | ||
433 | if (ip_route_output_key(dev_net(skb->dev), &rt, &fl) || | ||
434 | rt->u.dst.dev->type != ARPHRD_TUNNEL) { | ||
435 | ip_rt_put(rt); | ||
436 | kfree_skb(skb2); | ||
437 | return 0; | ||
438 | } | ||
439 | } else { | ||
440 | ip_rt_put(rt); | ||
441 | if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) || | ||
442 | skb2->dst->dev->type != ARPHRD_TUNNEL) { | ||
443 | kfree_skb(skb2); | ||
444 | return 0; | ||
445 | } | ||
446 | } | ||
447 | |||
448 | /* change mtu on this route */ | ||
449 | if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { | ||
450 | if (n > dst_mtu(skb2->dst)) { | ||
451 | kfree_skb(skb2); | ||
452 | return 0; | ||
453 | } | ||
454 | skb2->dst->ops->update_pmtu(skb2->dst, n); | ||
455 | } else if (type == ICMP_TIME_EXCEEDED) { | ||
456 | struct ip_tunnel *t = netdev_priv(skb2->dev); | ||
457 | if (t->parms.iph.ttl) { | ||
458 | rel_type = ICMP_DEST_UNREACH; | ||
459 | rel_code = ICMP_HOST_UNREACH; | ||
460 | } | ||
461 | } | ||
462 | |||
463 | icmp_send(skb2, rel_type, rel_code, rel_info); | ||
464 | kfree_skb(skb2); | ||
465 | return 0; | ||
466 | #endif | ||
467 | } | 339 | } |
468 | 340 | ||
469 | static inline void ipip_ecn_decapsulate(const struct iphdr *outer_iph, | 341 | static inline void ipip_ecn_decapsulate(const struct iphdr *outer_iph, |
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 5daefad3d193..7750c97fde7b 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -232,6 +232,11 @@ static unsigned char asn1_length_decode(struct asn1_ctx *ctx, | |||
232 | } | 232 | } |
233 | } | 233 | } |
234 | } | 234 | } |
235 | |||
236 | /* don't trust len bigger than ctx buffer */ | ||
237 | if (*len > ctx->end - ctx->pointer) | ||
238 | return 0; | ||
239 | |||
235 | return 1; | 240 | return 1; |
236 | } | 241 | } |
237 | 242 | ||
@@ -250,6 +255,10 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx, | |||
250 | if (!asn1_length_decode(ctx, &def, &len)) | 255 | if (!asn1_length_decode(ctx, &def, &len)) |
251 | return 0; | 256 | return 0; |
252 | 257 | ||
258 | /* primitive shall be definite, indefinite shall be constructed */ | ||
259 | if (*con == ASN1_PRI && !def) | ||
260 | return 0; | ||
261 | |||
253 | if (def) | 262 | if (def) |
254 | *eoc = ctx->pointer + len; | 263 | *eoc = ctx->pointer + len; |
255 | else | 264 | else |
@@ -434,6 +443,11 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, | |||
434 | unsigned long *optr; | 443 | unsigned long *optr; |
435 | 444 | ||
436 | size = eoc - ctx->pointer + 1; | 445 | size = eoc - ctx->pointer + 1; |
446 | |||
447 | /* first subid actually encodes first two subids */ | ||
448 | if (size < 2 || size > ULONG_MAX/sizeof(unsigned long)) | ||
449 | return 0; | ||
450 | |||
437 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); | 451 | *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); |
438 | if (*oid == NULL) { | 452 | if (*oid == NULL) { |
439 | if (net_ratelimit()) | 453 | if (net_ratelimit()) |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index fead049daf43..e7e091d365ff 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -608,6 +608,14 @@ static void raw_close(struct sock *sk, long timeout) | |||
608 | sk_common_release(sk); | 608 | sk_common_release(sk); |
609 | } | 609 | } |
610 | 610 | ||
611 | static int raw_destroy(struct sock *sk) | ||
612 | { | ||
613 | lock_sock(sk); | ||
614 | ip_flush_pending_frames(sk); | ||
615 | release_sock(sk); | ||
616 | return 0; | ||
617 | } | ||
618 | |||
611 | /* This gets rid of all the nasties in af_inet. -DaveM */ | 619 | /* This gets rid of all the nasties in af_inet. -DaveM */ |
612 | static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | 620 | static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) |
613 | { | 621 | { |
@@ -820,6 +828,7 @@ struct proto raw_prot = { | |||
820 | .name = "RAW", | 828 | .name = "RAW", |
821 | .owner = THIS_MODULE, | 829 | .owner = THIS_MODULE, |
822 | .close = raw_close, | 830 | .close = raw_close, |
831 | .destroy = raw_destroy, | ||
823 | .connect = ip4_datagram_connect, | 832 | .connect = ip4_datagram_connect, |
824 | .disconnect = udp_disconnect, | 833 | .disconnect = udp_disconnect, |
825 | .ioctl = raw_ioctl, | 834 | .ioctl = raw_ioctl, |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 92f90ae46f4a..96be336064fb 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -160,7 +160,7 @@ static struct dst_ops ipv4_dst_ops = { | |||
160 | .negative_advice = ipv4_negative_advice, | 160 | .negative_advice = ipv4_negative_advice, |
161 | .link_failure = ipv4_link_failure, | 161 | .link_failure = ipv4_link_failure, |
162 | .update_pmtu = ip_rt_update_pmtu, | 162 | .update_pmtu = ip_rt_update_pmtu, |
163 | .local_out = ip_local_out, | 163 | .local_out = __ip_local_out, |
164 | .entry_size = sizeof(struct rtable), | 164 | .entry_size = sizeof(struct rtable), |
165 | .entries = ATOMIC_INIT(0), | 165 | .entries = ATOMIC_INIT(0), |
166 | }; | 166 | }; |
@@ -1792,7 +1792,7 @@ static int __mkroute_input(struct sk_buff *skb, | |||
1792 | if (err) | 1792 | if (err) |
1793 | flags |= RTCF_DIRECTSRC; | 1793 | flags |= RTCF_DIRECTSRC; |
1794 | 1794 | ||
1795 | if (out_dev == in_dev && err && !(flags & RTCF_MASQ) && | 1795 | if (out_dev == in_dev && err && |
1796 | (IN_DEV_SHARED_MEDIA(out_dev) || | 1796 | (IN_DEV_SHARED_MEDIA(out_dev) || |
1797 | inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) | 1797 | inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) |
1798 | flags |= RTCF_DOREDIRECT; | 1798 | flags |= RTCF_DOREDIRECT; |
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 73ba98921d64..d182a2a26291 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -285,7 +285,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
285 | cookie_check_timestamp(&tcp_opt); | 285 | cookie_check_timestamp(&tcp_opt); |
286 | 286 | ||
287 | ret = NULL; | 287 | ret = NULL; |
288 | req = reqsk_alloc(&tcp_request_sock_ops); /* for safety */ | 288 | req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */ |
289 | if (!req) | 289 | if (!req) |
290 | goto out; | 290 | goto out; |
291 | 291 | ||
@@ -301,7 +301,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, | |||
301 | ireq->rmt_port = th->source; | 301 | ireq->rmt_port = th->source; |
302 | ireq->loc_addr = ip_hdr(skb)->daddr; | 302 | ireq->loc_addr = ip_hdr(skb)->daddr; |
303 | ireq->rmt_addr = ip_hdr(skb)->saddr; | 303 | ireq->rmt_addr = ip_hdr(skb)->saddr; |
304 | ireq->opt = NULL; | ||
305 | ireq->snd_wscale = tcp_opt.snd_wscale; | 304 | ireq->snd_wscale = tcp_opt.snd_wscale; |
306 | ireq->rcv_wscale = tcp_opt.rcv_wscale; | 305 | ireq->rcv_wscale = tcp_opt.rcv_wscale; |
307 | ireq->sack_ok = tcp_opt.sack_ok; | 306 | ireq->sack_ok = tcp_opt.sack_ok; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f88653138621..fc54a48fde1e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1227,7 +1227,14 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
1227 | copied += used; | 1227 | copied += used; |
1228 | offset += used; | 1228 | offset += used; |
1229 | } | 1229 | } |
1230 | if (offset != skb->len) | 1230 | /* |
1231 | * If recv_actor drops the lock (e.g. TCP splice | ||
1232 | * receive) the skb pointer might be invalid when | ||
1233 | * getting here: tcp_collapse might have deleted it | ||
1234 | * while aggregating skbs from the socket queue. | ||
1235 | */ | ||
1236 | skb = tcp_recv_skb(sk, seq-1, &offset); | ||
1237 | if (!skb || (offset+1 != skb->len)) | ||
1231 | break; | 1238 | break; |
1232 | } | 1239 | } |
1233 | if (tcp_hdr(skb)->fin) { | 1240 | if (tcp_hdr(skb)->fin) { |
@@ -2105,12 +2112,15 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2105 | break; | 2112 | break; |
2106 | 2113 | ||
2107 | case TCP_DEFER_ACCEPT: | 2114 | case TCP_DEFER_ACCEPT: |
2108 | if (val < 0) { | 2115 | icsk->icsk_accept_queue.rskq_defer_accept = 0; |
2109 | err = -EINVAL; | 2116 | if (val > 0) { |
2110 | } else { | 2117 | /* Translate value in seconds to number of |
2111 | if (val > MAX_TCP_ACCEPT_DEFERRED) | 2118 | * retransmits */ |
2112 | val = MAX_TCP_ACCEPT_DEFERRED; | 2119 | while (icsk->icsk_accept_queue.rskq_defer_accept < 32 && |
2113 | icsk->icsk_accept_queue.rskq_defer_accept = val; | 2120 | val > ((TCP_TIMEOUT_INIT / HZ) << |
2121 | icsk->icsk_accept_queue.rskq_defer_accept)) | ||
2122 | icsk->icsk_accept_queue.rskq_defer_accept++; | ||
2123 | icsk->icsk_accept_queue.rskq_defer_accept++; | ||
2114 | } | 2124 | } |
2115 | break; | 2125 | break; |
2116 | 2126 | ||
@@ -2292,7 +2302,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level, | |||
2292 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; | 2302 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; |
2293 | break; | 2303 | break; |
2294 | case TCP_DEFER_ACCEPT: | 2304 | case TCP_DEFER_ACCEPT: |
2295 | val = icsk->icsk_accept_queue.rskq_defer_accept; | 2305 | val = !icsk->icsk_accept_queue.rskq_defer_accept ? 0 : |
2306 | ((TCP_TIMEOUT_INIT / HZ) << (icsk->icsk_accept_queue.rskq_defer_accept - 1)); | ||
2296 | break; | 2307 | break; |
2297 | case TCP_WINDOW_CLAMP: | 2308 | case TCP_WINDOW_CLAMP: |
2298 | val = tp->window_clamp; | 2309 | val = tp->window_clamp; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index b54d9d37b636..cad73b7dfef0 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1392,9 +1392,9 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb, | |||
1392 | 1392 | ||
1393 | if (before(next_dup->start_seq, skip_to_seq)) { | 1393 | if (before(next_dup->start_seq, skip_to_seq)) { |
1394 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); | 1394 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); |
1395 | tcp_sacktag_walk(skb, sk, NULL, | 1395 | skb = tcp_sacktag_walk(skb, sk, NULL, |
1396 | next_dup->start_seq, next_dup->end_seq, | 1396 | next_dup->start_seq, next_dup->end_seq, |
1397 | 1, fack_count, reord, flag); | 1397 | 1, fack_count, reord, flag); |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | return skb; | 1400 | return skb; |
@@ -2483,6 +2483,20 @@ static inline void tcp_complete_cwr(struct sock *sk) | |||
2483 | tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); | 2483 | tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); |
2484 | } | 2484 | } |
2485 | 2485 | ||
2486 | static void tcp_try_keep_open(struct sock *sk) | ||
2487 | { | ||
2488 | struct tcp_sock *tp = tcp_sk(sk); | ||
2489 | int state = TCP_CA_Open; | ||
2490 | |||
2491 | if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker) | ||
2492 | state = TCP_CA_Disorder; | ||
2493 | |||
2494 | if (inet_csk(sk)->icsk_ca_state != state) { | ||
2495 | tcp_set_ca_state(sk, state); | ||
2496 | tp->high_seq = tp->snd_nxt; | ||
2497 | } | ||
2498 | } | ||
2499 | |||
2486 | static void tcp_try_to_open(struct sock *sk, int flag) | 2500 | static void tcp_try_to_open(struct sock *sk, int flag) |
2487 | { | 2501 | { |
2488 | struct tcp_sock *tp = tcp_sk(sk); | 2502 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -2496,15 +2510,7 @@ static void tcp_try_to_open(struct sock *sk, int flag) | |||
2496 | tcp_enter_cwr(sk, 1); | 2510 | tcp_enter_cwr(sk, 1); |
2497 | 2511 | ||
2498 | if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { | 2512 | if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { |
2499 | int state = TCP_CA_Open; | 2513 | tcp_try_keep_open(sk); |
2500 | |||
2501 | if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker) | ||
2502 | state = TCP_CA_Disorder; | ||
2503 | |||
2504 | if (inet_csk(sk)->icsk_ca_state != state) { | ||
2505 | tcp_set_ca_state(sk, state); | ||
2506 | tp->high_seq = tp->snd_nxt; | ||
2507 | } | ||
2508 | tcp_moderate_cwnd(tp); | 2514 | tcp_moderate_cwnd(tp); |
2509 | } else { | 2515 | } else { |
2510 | tcp_cwnd_down(sk, flag); | 2516 | tcp_cwnd_down(sk, flag); |
@@ -3310,8 +3316,11 @@ no_queue: | |||
3310 | return 1; | 3316 | return 1; |
3311 | 3317 | ||
3312 | old_ack: | 3318 | old_ack: |
3313 | if (TCP_SKB_CB(skb)->sacked) | 3319 | if (TCP_SKB_CB(skb)->sacked) { |
3314 | tcp_sacktag_write_queue(sk, skb, prior_snd_una); | 3320 | tcp_sacktag_write_queue(sk, skb, prior_snd_una); |
3321 | if (icsk->icsk_ca_state == TCP_CA_Open) | ||
3322 | tcp_try_keep_open(sk); | ||
3323 | } | ||
3315 | 3324 | ||
3316 | uninteresting_ack: | 3325 | uninteresting_ack: |
3317 | SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt); | 3326 | SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt); |
@@ -4532,49 +4541,6 @@ static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th) | |||
4532 | } | 4541 | } |
4533 | } | 4542 | } |
4534 | 4543 | ||
4535 | static int tcp_defer_accept_check(struct sock *sk) | ||
4536 | { | ||
4537 | struct tcp_sock *tp = tcp_sk(sk); | ||
4538 | |||
4539 | if (tp->defer_tcp_accept.request) { | ||
4540 | int queued_data = tp->rcv_nxt - tp->copied_seq; | ||
4541 | int hasfin = !skb_queue_empty(&sk->sk_receive_queue) ? | ||
4542 | tcp_hdr((struct sk_buff *) | ||
4543 | sk->sk_receive_queue.prev)->fin : 0; | ||
4544 | |||
4545 | if (queued_data && hasfin) | ||
4546 | queued_data--; | ||
4547 | |||
4548 | if (queued_data && | ||
4549 | tp->defer_tcp_accept.listen_sk->sk_state == TCP_LISTEN) { | ||
4550 | if (sock_flag(sk, SOCK_KEEPOPEN)) { | ||
4551 | inet_csk_reset_keepalive_timer(sk, | ||
4552 | keepalive_time_when(tp)); | ||
4553 | } else { | ||
4554 | inet_csk_delete_keepalive_timer(sk); | ||
4555 | } | ||
4556 | |||
4557 | inet_csk_reqsk_queue_add( | ||
4558 | tp->defer_tcp_accept.listen_sk, | ||
4559 | tp->defer_tcp_accept.request, | ||
4560 | sk); | ||
4561 | |||
4562 | tp->defer_tcp_accept.listen_sk->sk_data_ready( | ||
4563 | tp->defer_tcp_accept.listen_sk, 0); | ||
4564 | |||
4565 | sock_put(tp->defer_tcp_accept.listen_sk); | ||
4566 | sock_put(sk); | ||
4567 | tp->defer_tcp_accept.listen_sk = NULL; | ||
4568 | tp->defer_tcp_accept.request = NULL; | ||
4569 | } else if (hasfin || | ||
4570 | tp->defer_tcp_accept.listen_sk->sk_state != TCP_LISTEN) { | ||
4571 | tcp_reset(sk); | ||
4572 | return -1; | ||
4573 | } | ||
4574 | } | ||
4575 | return 0; | ||
4576 | } | ||
4577 | |||
4578 | static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) | 4544 | static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) |
4579 | { | 4545 | { |
4580 | struct tcp_sock *tp = tcp_sk(sk); | 4546 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -4935,8 +4901,6 @@ step5: | |||
4935 | 4901 | ||
4936 | tcp_data_snd_check(sk); | 4902 | tcp_data_snd_check(sk); |
4937 | tcp_ack_snd_check(sk); | 4903 | tcp_ack_snd_check(sk); |
4938 | |||
4939 | tcp_defer_accept_check(sk); | ||
4940 | return 0; | 4904 | return 0; |
4941 | 4905 | ||
4942 | csum_error: | 4906 | csum_error: |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index cd601a866c2f..97a230026e13 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1285,7 +1285,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1285 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | 1285 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) |
1286 | goto drop; | 1286 | goto drop; |
1287 | 1287 | ||
1288 | req = reqsk_alloc(&tcp_request_sock_ops); | 1288 | req = inet_reqsk_alloc(&tcp_request_sock_ops); |
1289 | if (!req) | 1289 | if (!req) |
1290 | goto drop; | 1290 | goto drop; |
1291 | 1291 | ||
@@ -1918,14 +1918,6 @@ int tcp_v4_destroy_sock(struct sock *sk) | |||
1918 | sk->sk_sndmsg_page = NULL; | 1918 | sk->sk_sndmsg_page = NULL; |
1919 | } | 1919 | } |
1920 | 1920 | ||
1921 | if (tp->defer_tcp_accept.request) { | ||
1922 | reqsk_free(tp->defer_tcp_accept.request); | ||
1923 | sock_put(tp->defer_tcp_accept.listen_sk); | ||
1924 | sock_put(sk); | ||
1925 | tp->defer_tcp_accept.listen_sk = NULL; | ||
1926 | tp->defer_tcp_accept.request = NULL; | ||
1927 | } | ||
1928 | |||
1929 | atomic_dec(&tcp_sockets_allocated); | 1921 | atomic_dec(&tcp_sockets_allocated); |
1930 | 1922 | ||
1931 | return 0; | 1923 | return 0; |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 019c8c16e5cc..8245247a6ceb 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -571,8 +571,10 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
571 | does sequence test, SYN is truncated, and thus we consider | 571 | does sequence test, SYN is truncated, and thus we consider |
572 | it a bare ACK. | 572 | it a bare ACK. |
573 | 573 | ||
574 | Both ends (listening sockets) accept the new incoming | 574 | If icsk->icsk_accept_queue.rskq_defer_accept, we silently drop this |
575 | connection and try to talk to each other. 8-) | 575 | bare ACK. Otherwise, we create an established connection. Both |
576 | ends (listening sockets) accept the new incoming connection and try | ||
577 | to talk to each other. 8-) | ||
576 | 578 | ||
577 | Note: This case is both harmless, and rare. Possibility is about the | 579 | Note: This case is both harmless, and rare. Possibility is about the |
578 | same as us discovering intelligent life on another plant tomorrow. | 580 | same as us discovering intelligent life on another plant tomorrow. |
@@ -640,6 +642,13 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
640 | if (!(flg & TCP_FLAG_ACK)) | 642 | if (!(flg & TCP_FLAG_ACK)) |
641 | return NULL; | 643 | return NULL; |
642 | 644 | ||
645 | /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ | ||
646 | if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept && | ||
647 | TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) { | ||
648 | inet_rsk(req)->acked = 1; | ||
649 | return NULL; | ||
650 | } | ||
651 | |||
643 | /* OK, ACK is valid, create big socket and | 652 | /* OK, ACK is valid, create big socket and |
644 | * feed this segment to it. It will repeat all | 653 | * feed this segment to it. It will repeat all |
645 | * the tests. THIS SEGMENT MUST MOVE SOCKET TO | 654 | * the tests. THIS SEGMENT MUST MOVE SOCKET TO |
@@ -678,24 +687,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, | |||
678 | inet_csk_reqsk_queue_unlink(sk, req, prev); | 687 | inet_csk_reqsk_queue_unlink(sk, req, prev); |
679 | inet_csk_reqsk_queue_removed(sk, req); | 688 | inet_csk_reqsk_queue_removed(sk, req); |
680 | 689 | ||
681 | if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept && | 690 | inet_csk_reqsk_queue_add(sk, req, child); |
682 | TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) { | ||
683 | |||
684 | /* the accept queue handling is done is est recv slow | ||
685 | * path so lets make sure to start there | ||
686 | */ | ||
687 | tcp_sk(child)->pred_flags = 0; | ||
688 | sock_hold(sk); | ||
689 | sock_hold(child); | ||
690 | tcp_sk(child)->defer_tcp_accept.listen_sk = sk; | ||
691 | tcp_sk(child)->defer_tcp_accept.request = req; | ||
692 | |||
693 | inet_csk_reset_keepalive_timer(child, | ||
694 | inet_csk(sk)->icsk_accept_queue.rskq_defer_accept * HZ); | ||
695 | } else { | ||
696 | inet_csk_reqsk_queue_add(sk, req, child); | ||
697 | } | ||
698 | |||
699 | return child; | 691 | return child; |
700 | 692 | ||
701 | listen_overflow: | 693 | listen_overflow: |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index debf23581606..ad993ecb4810 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1836,7 +1836,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1836 | { | 1836 | { |
1837 | struct tcp_sock *tp = tcp_sk(sk); | 1837 | struct tcp_sock *tp = tcp_sk(sk); |
1838 | struct inet_connection_sock *icsk = inet_csk(sk); | 1838 | struct inet_connection_sock *icsk = inet_csk(sk); |
1839 | unsigned int cur_mss = tcp_current_mss(sk, 0); | 1839 | unsigned int cur_mss; |
1840 | int err; | 1840 | int err; |
1841 | 1841 | ||
1842 | /* Inconslusive MTU probe */ | 1842 | /* Inconslusive MTU probe */ |
@@ -1858,6 +1858,11 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1858 | return -ENOMEM; | 1858 | return -ENOMEM; |
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk)) | ||
1862 | return -EHOSTUNREACH; /* Routing failure or similar. */ | ||
1863 | |||
1864 | cur_mss = tcp_current_mss(sk, 0); | ||
1865 | |||
1861 | /* If receiver has shrunk his window, and skb is out of | 1866 | /* If receiver has shrunk his window, and skb is out of |
1862 | * new window, do not retransmit it. The exception is the | 1867 | * new window, do not retransmit it. The exception is the |
1863 | * case, when window is shrunk to zero. In this case | 1868 | * case, when window is shrunk to zero. In this case |
@@ -1884,9 +1889,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1884 | (sysctl_tcp_retrans_collapse != 0)) | 1889 | (sysctl_tcp_retrans_collapse != 0)) |
1885 | tcp_retrans_try_collapse(sk, skb, cur_mss); | 1890 | tcp_retrans_try_collapse(sk, skb, cur_mss); |
1886 | 1891 | ||
1887 | if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk)) | ||
1888 | return -EHOSTUNREACH; /* Routing failure or similar. */ | ||
1889 | |||
1890 | /* Some Solaris stacks overoptimize and ignore the FIN on a | 1892 | /* Some Solaris stacks overoptimize and ignore the FIN on a |
1891 | * retransmit when old data is attached. So strip it off | 1893 | * retransmit when old data is attached. So strip it off |
1892 | * since it is cheap to do so and saves bytes on the network. | 1894 | * since it is cheap to do so and saves bytes on the network. |
@@ -2129,6 +2131,8 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority) | |||
2129 | TCP_SKB_CB(skb)->when = tcp_time_stamp; | 2131 | TCP_SKB_CB(skb)->when = tcp_time_stamp; |
2130 | if (tcp_transmit_skb(sk, skb, 0, priority)) | 2132 | if (tcp_transmit_skb(sk, skb, 0, priority)) |
2131 | NET_INC_STATS(LINUX_MIB_TCPABORTFAILED); | 2133 | NET_INC_STATS(LINUX_MIB_TCPABORTFAILED); |
2134 | |||
2135 | TCP_INC_STATS(TCP_MIB_OUTRSTS); | ||
2132 | } | 2136 | } |
2133 | 2137 | ||
2134 | /* WARNING: This routine must only be called when we have already sent | 2138 | /* WARNING: This routine must only be called when we have already sent |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 4de68cf5f2aa..63ed9d6830e7 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -489,11 +489,6 @@ static void tcp_keepalive_timer (unsigned long data) | |||
489 | goto death; | 489 | goto death; |
490 | } | 490 | } |
491 | 491 | ||
492 | if (tp->defer_tcp_accept.request && sk->sk_state == TCP_ESTABLISHED) { | ||
493 | tcp_send_active_reset(sk, GFP_ATOMIC); | ||
494 | goto death; | ||
495 | } | ||
496 | |||
497 | if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) | 492 | if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) |
498 | goto out; | 493 | goto out; |
499 | 494 | ||
diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c index d3b709a6f264..cb1f0e83830b 100644 --- a/net/ipv4/tunnel4.c +++ b/net/ipv4/tunnel4.c | |||
@@ -97,7 +97,7 @@ static int tunnel64_rcv(struct sk_buff *skb) | |||
97 | { | 97 | { |
98 | struct xfrm_tunnel *handler; | 98 | struct xfrm_tunnel *handler; |
99 | 99 | ||
100 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | 100 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) |
101 | goto drop; | 101 | goto drop; |
102 | 102 | ||
103 | for (handler = tunnel64_handlers; handler; handler = handler->next) | 103 | for (handler = tunnel64_handlers; handler; handler = handler->next) |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index db1cb7c96d63..56fcda3694ba 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -420,7 +420,7 @@ void udp_err(struct sk_buff *skb, u32 info) | |||
420 | /* | 420 | /* |
421 | * Throw away all pending data and cancel the corking. Socket is locked. | 421 | * Throw away all pending data and cancel the corking. Socket is locked. |
422 | */ | 422 | */ |
423 | static void udp_flush_pending_frames(struct sock *sk) | 423 | void udp_flush_pending_frames(struct sock *sk) |
424 | { | 424 | { |
425 | struct udp_sock *up = udp_sk(sk); | 425 | struct udp_sock *up = udp_sk(sk); |
426 | 426 | ||
@@ -430,6 +430,7 @@ static void udp_flush_pending_frames(struct sock *sk) | |||
430 | ip_flush_pending_frames(sk); | 430 | ip_flush_pending_frames(sk); |
431 | } | 431 | } |
432 | } | 432 | } |
433 | EXPORT_SYMBOL(udp_flush_pending_frames); | ||
433 | 434 | ||
434 | /** | 435 | /** |
435 | * udp4_hwcsum_outgoing - handle outgoing HW checksumming | 436 | * udp4_hwcsum_outgoing - handle outgoing HW checksumming |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e591e09e5e4e..147588f4c7c0 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -731,8 +731,13 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) | |||
731 | onlink = -1; | 731 | onlink = -1; |
732 | 732 | ||
733 | spin_lock(&ifa->lock); | 733 | spin_lock(&ifa->lock); |
734 | lifetime = min_t(unsigned long, | 734 | |
735 | ifa->valid_lft, 0x7fffffffUL/HZ); | 735 | lifetime = addrconf_timeout_fixup(ifa->valid_lft, HZ); |
736 | /* | ||
737 | * Note: Because this address is | ||
738 | * not permanent, lifetime < | ||
739 | * LONG_MAX / HZ here. | ||
740 | */ | ||
736 | if (time_before(expires, | 741 | if (time_before(expires, |
737 | ifa->tstamp + lifetime * HZ)) | 742 | ifa->tstamp + lifetime * HZ)) |
738 | expires = ifa->tstamp + lifetime * HZ; | 743 | expires = ifa->tstamp + lifetime * HZ; |
@@ -1722,7 +1727,6 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1722 | __u32 valid_lft; | 1727 | __u32 valid_lft; |
1723 | __u32 prefered_lft; | 1728 | __u32 prefered_lft; |
1724 | int addr_type; | 1729 | int addr_type; |
1725 | unsigned long rt_expires; | ||
1726 | struct inet6_dev *in6_dev; | 1730 | struct inet6_dev *in6_dev; |
1727 | 1731 | ||
1728 | pinfo = (struct prefix_info *) opt; | 1732 | pinfo = (struct prefix_info *) opt; |
@@ -1764,41 +1768,49 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len) | |||
1764 | * 2) Configure prefixes with the auto flag set | 1768 | * 2) Configure prefixes with the auto flag set |
1765 | */ | 1769 | */ |
1766 | 1770 | ||
1767 | /* Avoid arithmetic overflow. Really, we could | ||
1768 | save rt_expires in seconds, likely valid_lft, | ||
1769 | but it would require division in fib gc, that it | ||
1770 | not good. | ||
1771 | */ | ||
1772 | if (valid_lft >= 0x7FFFFFFF/HZ) | ||
1773 | rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ); | ||
1774 | else | ||
1775 | rt_expires = valid_lft * HZ; | ||
1776 | |||
1777 | /* | ||
1778 | * We convert this (in jiffies) to clock_t later. | ||
1779 | * Avoid arithmetic overflow there as well. | ||
1780 | * Overflow can happen only if HZ < USER_HZ. | ||
1781 | */ | ||
1782 | if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ) | ||
1783 | rt_expires = 0x7FFFFFFF / USER_HZ; | ||
1784 | |||
1785 | if (pinfo->onlink) { | 1771 | if (pinfo->onlink) { |
1786 | struct rt6_info *rt; | 1772 | struct rt6_info *rt; |
1773 | unsigned long rt_expires; | ||
1774 | |||
1775 | /* Avoid arithmetic overflow. Really, we could | ||
1776 | * save rt_expires in seconds, likely valid_lft, | ||
1777 | * but it would require division in fib gc, that it | ||
1778 | * not good. | ||
1779 | */ | ||
1780 | if (HZ > USER_HZ) | ||
1781 | rt_expires = addrconf_timeout_fixup(valid_lft, HZ); | ||
1782 | else | ||
1783 | rt_expires = addrconf_timeout_fixup(valid_lft, USER_HZ); | ||
1784 | |||
1785 | if (addrconf_finite_timeout(rt_expires)) | ||
1786 | rt_expires *= HZ; | ||
1787 | |||
1787 | rt = rt6_lookup(dev_net(dev), &pinfo->prefix, NULL, | 1788 | rt = rt6_lookup(dev_net(dev), &pinfo->prefix, NULL, |
1788 | dev->ifindex, 1); | 1789 | dev->ifindex, 1); |
1789 | 1790 | ||
1790 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { | 1791 | if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { |
1791 | if (rt->rt6i_flags&RTF_EXPIRES) { | 1792 | /* Autoconf prefix route */ |
1792 | if (valid_lft == 0) { | 1793 | if (valid_lft == 0) { |
1793 | ip6_del_rt(rt); | 1794 | ip6_del_rt(rt); |
1794 | rt = NULL; | 1795 | rt = NULL; |
1795 | } else { | 1796 | } else if (addrconf_finite_timeout(rt_expires)) { |
1796 | rt->rt6i_expires = jiffies + rt_expires; | 1797 | /* not infinity */ |
1797 | } | 1798 | rt->rt6i_expires = jiffies + rt_expires; |
1799 | rt->rt6i_flags |= RTF_EXPIRES; | ||
1800 | } else { | ||
1801 | rt->rt6i_flags &= ~RTF_EXPIRES; | ||
1802 | rt->rt6i_expires = 0; | ||
1798 | } | 1803 | } |
1799 | } else if (valid_lft) { | 1804 | } else if (valid_lft) { |
1805 | clock_t expires = 0; | ||
1806 | int flags = RTF_ADDRCONF | RTF_PREFIX_RT; | ||
1807 | if (addrconf_finite_timeout(rt_expires)) { | ||
1808 | /* not infinity */ | ||
1809 | flags |= RTF_EXPIRES; | ||
1810 | expires = jiffies_to_clock_t(rt_expires); | ||
1811 | } | ||
1800 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, | 1812 | addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, |
1801 | dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); | 1813 | dev, expires, flags); |
1802 | } | 1814 | } |
1803 | if (rt) | 1815 | if (rt) |
1804 | dst_release(&rt->u.dst); | 1816 | dst_release(&rt->u.dst); |
@@ -2014,17 +2026,22 @@ err_exit: | |||
2014 | * Manual configuration of address on an interface | 2026 | * Manual configuration of address on an interface |
2015 | */ | 2027 | */ |
2016 | static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | 2028 | static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, |
2017 | int plen, __u8 ifa_flags, __u32 prefered_lft, | 2029 | unsigned int plen, __u8 ifa_flags, __u32 prefered_lft, |
2018 | __u32 valid_lft) | 2030 | __u32 valid_lft) |
2019 | { | 2031 | { |
2020 | struct inet6_ifaddr *ifp; | 2032 | struct inet6_ifaddr *ifp; |
2021 | struct inet6_dev *idev; | 2033 | struct inet6_dev *idev; |
2022 | struct net_device *dev; | 2034 | struct net_device *dev; |
2023 | int scope; | 2035 | int scope; |
2024 | u32 flags = RTF_EXPIRES; | 2036 | u32 flags; |
2037 | clock_t expires; | ||
2038 | unsigned long timeout; | ||
2025 | 2039 | ||
2026 | ASSERT_RTNL(); | 2040 | ASSERT_RTNL(); |
2027 | 2041 | ||
2042 | if (plen > 128) | ||
2043 | return -EINVAL; | ||
2044 | |||
2028 | /* check the lifetime */ | 2045 | /* check the lifetime */ |
2029 | if (!valid_lft || prefered_lft > valid_lft) | 2046 | if (!valid_lft || prefered_lft > valid_lft) |
2030 | return -EINVAL; | 2047 | return -EINVAL; |
@@ -2038,17 +2055,23 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2038 | 2055 | ||
2039 | scope = ipv6_addr_scope(pfx); | 2056 | scope = ipv6_addr_scope(pfx); |
2040 | 2057 | ||
2041 | if (valid_lft == INFINITY_LIFE_TIME) { | 2058 | timeout = addrconf_timeout_fixup(valid_lft, HZ); |
2042 | ifa_flags |= IFA_F_PERMANENT; | 2059 | if (addrconf_finite_timeout(timeout)) { |
2060 | expires = jiffies_to_clock_t(timeout * HZ); | ||
2061 | valid_lft = timeout; | ||
2062 | flags = RTF_EXPIRES; | ||
2063 | } else { | ||
2064 | expires = 0; | ||
2043 | flags = 0; | 2065 | flags = 0; |
2044 | } else if (valid_lft >= 0x7FFFFFFF/HZ) | 2066 | ifa_flags |= IFA_F_PERMANENT; |
2045 | valid_lft = 0x7FFFFFFF/HZ; | 2067 | } |
2046 | 2068 | ||
2047 | if (prefered_lft == 0) | 2069 | timeout = addrconf_timeout_fixup(prefered_lft, HZ); |
2048 | ifa_flags |= IFA_F_DEPRECATED; | 2070 | if (addrconf_finite_timeout(timeout)) { |
2049 | else if ((prefered_lft >= 0x7FFFFFFF/HZ) && | 2071 | if (timeout == 0) |
2050 | (prefered_lft != INFINITY_LIFE_TIME)) | 2072 | ifa_flags |= IFA_F_DEPRECATED; |
2051 | prefered_lft = 0x7FFFFFFF/HZ; | 2073 | prefered_lft = timeout; |
2074 | } | ||
2052 | 2075 | ||
2053 | ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags); | 2076 | ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags); |
2054 | 2077 | ||
@@ -2060,7 +2083,7 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2060 | spin_unlock_bh(&ifp->lock); | 2083 | spin_unlock_bh(&ifp->lock); |
2061 | 2084 | ||
2062 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, | 2085 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, |
2063 | jiffies_to_clock_t(valid_lft * HZ), flags); | 2086 | expires, flags); |
2064 | /* | 2087 | /* |
2065 | * Note that section 3.1 of RFC 4429 indicates | 2088 | * Note that section 3.1 of RFC 4429 indicates |
2066 | * that the Optimistic flag should not be set for | 2089 | * that the Optimistic flag should not be set for |
@@ -2076,12 +2099,15 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, | |||
2076 | } | 2099 | } |
2077 | 2100 | ||
2078 | static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx, | 2101 | static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx, |
2079 | int plen) | 2102 | unsigned int plen) |
2080 | { | 2103 | { |
2081 | struct inet6_ifaddr *ifp; | 2104 | struct inet6_ifaddr *ifp; |
2082 | struct inet6_dev *idev; | 2105 | struct inet6_dev *idev; |
2083 | struct net_device *dev; | 2106 | struct net_device *dev; |
2084 | 2107 | ||
2108 | if (plen > 128) | ||
2109 | return -EINVAL; | ||
2110 | |||
2085 | dev = __dev_get_by_index(net, ifindex); | 2111 | dev = __dev_get_by_index(net, ifindex); |
2086 | if (!dev) | 2112 | if (!dev) |
2087 | return -ENODEV; | 2113 | return -ENODEV; |
@@ -3148,22 +3174,30 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
3148 | static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, | 3174 | static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, |
3149 | u32 prefered_lft, u32 valid_lft) | 3175 | u32 prefered_lft, u32 valid_lft) |
3150 | { | 3176 | { |
3151 | u32 flags = RTF_EXPIRES; | 3177 | u32 flags; |
3178 | clock_t expires; | ||
3179 | unsigned long timeout; | ||
3152 | 3180 | ||
3153 | if (!valid_lft || (prefered_lft > valid_lft)) | 3181 | if (!valid_lft || (prefered_lft > valid_lft)) |
3154 | return -EINVAL; | 3182 | return -EINVAL; |
3155 | 3183 | ||
3156 | if (valid_lft == INFINITY_LIFE_TIME) { | 3184 | timeout = addrconf_timeout_fixup(valid_lft, HZ); |
3157 | ifa_flags |= IFA_F_PERMANENT; | 3185 | if (addrconf_finite_timeout(timeout)) { |
3186 | expires = jiffies_to_clock_t(timeout * HZ); | ||
3187 | valid_lft = timeout; | ||
3188 | flags = RTF_EXPIRES; | ||
3189 | } else { | ||
3190 | expires = 0; | ||
3158 | flags = 0; | 3191 | flags = 0; |
3159 | } else if (valid_lft >= 0x7FFFFFFF/HZ) | 3192 | ifa_flags |= IFA_F_PERMANENT; |
3160 | valid_lft = 0x7FFFFFFF/HZ; | 3193 | } |
3161 | 3194 | ||
3162 | if (prefered_lft == 0) | 3195 | timeout = addrconf_timeout_fixup(prefered_lft, HZ); |
3163 | ifa_flags |= IFA_F_DEPRECATED; | 3196 | if (addrconf_finite_timeout(timeout)) { |
3164 | else if ((prefered_lft >= 0x7FFFFFFF/HZ) && | 3197 | if (timeout == 0) |
3165 | (prefered_lft != INFINITY_LIFE_TIME)) | 3198 | ifa_flags |= IFA_F_DEPRECATED; |
3166 | prefered_lft = 0x7FFFFFFF/HZ; | 3199 | prefered_lft = timeout; |
3200 | } | ||
3167 | 3201 | ||
3168 | spin_lock_bh(&ifp->lock); | 3202 | spin_lock_bh(&ifp->lock); |
3169 | ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags; | 3203 | ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags; |
@@ -3176,7 +3210,7 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, | |||
3176 | ipv6_ifa_notify(0, ifp); | 3210 | ipv6_ifa_notify(0, ifp); |
3177 | 3211 | ||
3178 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, | 3212 | addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, |
3179 | jiffies_to_clock_t(valid_lft * HZ), flags); | 3213 | expires, flags); |
3180 | addrconf_verify(0); | 3214 | addrconf_verify(0); |
3181 | 3215 | ||
3182 | return 0; | 3216 | return 0; |
@@ -4242,7 +4276,7 @@ static void addrconf_sysctl_register(struct inet6_dev *idev) | |||
4242 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, | 4276 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, |
4243 | NET_IPV6_NEIGH, "ipv6", | 4277 | NET_IPV6_NEIGH, "ipv6", |
4244 | &ndisc_ifinfo_sysctl_change, | 4278 | &ndisc_ifinfo_sysctl_change, |
4245 | NULL); | 4279 | ndisc_ifinfo_sysctl_strategy); |
4246 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, | 4280 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, |
4247 | idev->dev->ifindex, idev, &idev->cnf); | 4281 | idev->dev->ifindex, idev, &idev->cnf); |
4248 | } | 4282 | } |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 3c6aafb02183..e84b3fd17fb4 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -191,7 +191,7 @@ lookup_protocol: | |||
191 | np->mcast_hops = -1; | 191 | np->mcast_hops = -1; |
192 | np->mc_loop = 1; | 192 | np->mc_loop = 1; |
193 | np->pmtudisc = IPV6_PMTUDISC_WANT; | 193 | np->pmtudisc = IPV6_PMTUDISC_WANT; |
194 | np->ipv6only = init_net.ipv6.sysctl.bindv6only; | 194 | np->ipv6only = net->ipv6.sysctl.bindv6only; |
195 | 195 | ||
196 | /* Init the ipv4 part of the socket since we can have sockets | 196 | /* Init the ipv4 part of the socket since we can have sockets |
197 | * using v6 API for ipv4. | 197 | * using v6 API for ipv4. |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 94fa6ae77cfe..0f0f94a40335 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -496,7 +496,8 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
496 | return 0; | 496 | return 0; |
497 | } | 497 | } |
498 | 498 | ||
499 | int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | 499 | int datagram_send_ctl(struct net *net, |
500 | struct msghdr *msg, struct flowi *fl, | ||
500 | struct ipv6_txoptions *opt, | 501 | struct ipv6_txoptions *opt, |
501 | int *hlimit, int *tclass) | 502 | int *hlimit, int *tclass) |
502 | { | 503 | { |
@@ -509,7 +510,6 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
509 | 510 | ||
510 | for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { | 511 | for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { |
511 | int addr_type; | 512 | int addr_type; |
512 | struct net_device *dev = NULL; | ||
513 | 513 | ||
514 | if (!CMSG_OK(msg, cmsg)) { | 514 | if (!CMSG_OK(msg, cmsg)) { |
515 | err = -EINVAL; | 515 | err = -EINVAL; |
@@ -522,6 +522,9 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
522 | switch (cmsg->cmsg_type) { | 522 | switch (cmsg->cmsg_type) { |
523 | case IPV6_PKTINFO: | 523 | case IPV6_PKTINFO: |
524 | case IPV6_2292PKTINFO: | 524 | case IPV6_2292PKTINFO: |
525 | { | ||
526 | struct net_device *dev = NULL; | ||
527 | |||
525 | if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) { | 528 | if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) { |
526 | err = -EINVAL; | 529 | err = -EINVAL; |
527 | goto exit_f; | 530 | goto exit_f; |
@@ -535,32 +538,32 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
535 | fl->oif = src_info->ipi6_ifindex; | 538 | fl->oif = src_info->ipi6_ifindex; |
536 | } | 539 | } |
537 | 540 | ||
538 | addr_type = ipv6_addr_type(&src_info->ipi6_addr); | 541 | addr_type = __ipv6_addr_type(&src_info->ipi6_addr); |
539 | 542 | ||
540 | if (addr_type == IPV6_ADDR_ANY) | 543 | if (fl->oif) { |
541 | break; | 544 | dev = dev_get_by_index(net, fl->oif); |
545 | if (!dev) | ||
546 | return -ENODEV; | ||
547 | } else if (addr_type & IPV6_ADDR_LINKLOCAL) | ||
548 | return -EINVAL; | ||
542 | 549 | ||
543 | if (addr_type & IPV6_ADDR_LINKLOCAL) { | 550 | if (addr_type != IPV6_ADDR_ANY) { |
544 | if (!src_info->ipi6_ifindex) | 551 | int strict = __ipv6_addr_src_scope(addr_type) <= IPV6_ADDR_SCOPE_LINKLOCAL; |
545 | return -EINVAL; | 552 | if (!ipv6_chk_addr(net, &src_info->ipi6_addr, |
546 | else { | 553 | strict ? dev : NULL, 0)) |
547 | dev = dev_get_by_index(&init_net, src_info->ipi6_ifindex); | 554 | err = -EINVAL; |
548 | if (!dev) | 555 | else |
549 | return -ENODEV; | 556 | ipv6_addr_copy(&fl->fl6_src, &src_info->ipi6_addr); |
550 | } | ||
551 | } | ||
552 | if (!ipv6_chk_addr(&init_net, &src_info->ipi6_addr, | ||
553 | dev, 0)) { | ||
554 | if (dev) | ||
555 | dev_put(dev); | ||
556 | err = -EINVAL; | ||
557 | goto exit_f; | ||
558 | } | 557 | } |
558 | |||
559 | if (dev) | 559 | if (dev) |
560 | dev_put(dev); | 560 | dev_put(dev); |
561 | 561 | ||
562 | ipv6_addr_copy(&fl->fl6_src, &src_info->ipi6_addr); | 562 | if (err) |
563 | goto exit_f; | ||
564 | |||
563 | break; | 565 | break; |
566 | } | ||
564 | 567 | ||
565 | case IPV6_FLOWINFO: | 568 | case IPV6_FLOWINFO: |
566 | if (cmsg->cmsg_len < CMSG_LEN(4)) { | 569 | if (cmsg->cmsg_len < CMSG_LEN(4)) { |
@@ -702,6 +705,11 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
702 | } | 705 | } |
703 | 706 | ||
704 | *hlimit = *(int *)CMSG_DATA(cmsg); | 707 | *hlimit = *(int *)CMSG_DATA(cmsg); |
708 | if (*hlimit < -1 || *hlimit > 0xff) { | ||
709 | err = -EINVAL; | ||
710 | goto exit_f; | ||
711 | } | ||
712 | |||
705 | break; | 713 | break; |
706 | 714 | ||
707 | case IPV6_TCLASS: | 715 | case IPV6_TCLASS: |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index eb7a940310f4..37a4e777e347 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -354,7 +354,7 @@ fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval, | |||
354 | msg.msg_control = (void*)(fl->opt+1); | 354 | msg.msg_control = (void*)(fl->opt+1); |
355 | flowi.oif = 0; | 355 | flowi.oif = 0; |
356 | 356 | ||
357 | err = datagram_send_ctl(&msg, &flowi, fl->opt, &junk, &junk); | 357 | err = datagram_send_ctl(net, &msg, &flowi, fl->opt, &junk, &junk); |
358 | if (err) | 358 | if (err) |
359 | goto done; | 359 | goto done; |
360 | err = -EINVAL; | 360 | err = -EINVAL; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 2de3c464fe75..14796181e8b5 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -197,7 +197,7 @@ static int ip6mr_vif_seq_show(struct seq_file *seq, void *v) | |||
197 | const char *name = vif->dev ? vif->dev->name : "none"; | 197 | const char *name = vif->dev ? vif->dev->name : "none"; |
198 | 198 | ||
199 | seq_printf(seq, | 199 | seq_printf(seq, |
200 | "%2Zd %-10s %8ld %7ld %8ld %7ld %05X\n", | 200 | "%2td %-10s %8ld %7ld %8ld %7ld %05X\n", |
201 | vif - vif6_table, | 201 | vif - vif6_table, |
202 | name, vif->bytes_in, vif->pkt_in, | 202 | name, vif->bytes_in, vif->pkt_in, |
203 | vif->bytes_out, vif->pkt_out, | 203 | vif->bytes_out, vif->pkt_out, |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 56d55fecf8ec..c042ce19bd14 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -67,7 +67,7 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *)) | |||
67 | 67 | ||
68 | /* RA packet may be delivered ONLY to IPPROTO_RAW socket */ | 68 | /* RA packet may be delivered ONLY to IPPROTO_RAW socket */ |
69 | if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW) | 69 | if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW) |
70 | return -EINVAL; | 70 | return -ENOPROTOOPT; |
71 | 71 | ||
72 | new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL; | 72 | new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL; |
73 | 73 | ||
@@ -161,9 +161,17 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
161 | struct ipv6_txoptions *opt; | 161 | struct ipv6_txoptions *opt; |
162 | struct sk_buff *pktopt; | 162 | struct sk_buff *pktopt; |
163 | 163 | ||
164 | if (sk->sk_protocol != IPPROTO_UDP && | 164 | if (sk->sk_type == SOCK_RAW) |
165 | sk->sk_protocol != IPPROTO_UDPLITE && | 165 | break; |
166 | sk->sk_protocol != IPPROTO_TCP) | 166 | |
167 | if (sk->sk_protocol == IPPROTO_UDP || | ||
168 | sk->sk_protocol == IPPROTO_UDPLITE) { | ||
169 | struct udp_sock *up = udp_sk(sk); | ||
170 | if (up->pending == AF_INET6) { | ||
171 | retv = -EBUSY; | ||
172 | break; | ||
173 | } | ||
174 | } else if (sk->sk_protocol != IPPROTO_TCP) | ||
167 | break; | 175 | break; |
168 | 176 | ||
169 | if (sk->sk_state != TCP_ESTABLISHED) { | 177 | if (sk->sk_state != TCP_ESTABLISHED) { |
@@ -416,7 +424,7 @@ sticky_done: | |||
416 | msg.msg_controllen = optlen; | 424 | msg.msg_controllen = optlen; |
417 | msg.msg_control = (void*)(opt+1); | 425 | msg.msg_control = (void*)(opt+1); |
418 | 426 | ||
419 | retv = datagram_send_ctl(&msg, &fl, opt, &junk, &junk); | 427 | retv = datagram_send_ctl(net, &msg, &fl, opt, &junk, &junk); |
420 | if (retv) | 428 | if (retv) |
421 | goto done; | 429 | goto done; |
422 | update: | 430 | update: |
@@ -438,7 +446,7 @@ done: | |||
438 | 446 | ||
439 | case IPV6_MULTICAST_HOPS: | 447 | case IPV6_MULTICAST_HOPS: |
440 | if (sk->sk_type == SOCK_STREAM) | 448 | if (sk->sk_type == SOCK_STREAM) |
441 | goto e_inval; | 449 | break; |
442 | if (optlen < sizeof(int)) | 450 | if (optlen < sizeof(int)) |
443 | goto e_inval; | 451 | goto e_inval; |
444 | if (val > 255 || val < -1) | 452 | if (val > 255 || val < -1) |
@@ -450,13 +458,15 @@ done: | |||
450 | case IPV6_MULTICAST_LOOP: | 458 | case IPV6_MULTICAST_LOOP: |
451 | if (optlen < sizeof(int)) | 459 | if (optlen < sizeof(int)) |
452 | goto e_inval; | 460 | goto e_inval; |
461 | if (val != valbool) | ||
462 | goto e_inval; | ||
453 | np->mc_loop = valbool; | 463 | np->mc_loop = valbool; |
454 | retv = 0; | 464 | retv = 0; |
455 | break; | 465 | break; |
456 | 466 | ||
457 | case IPV6_MULTICAST_IF: | 467 | case IPV6_MULTICAST_IF: |
458 | if (sk->sk_type == SOCK_STREAM) | 468 | if (sk->sk_type == SOCK_STREAM) |
459 | goto e_inval; | 469 | break; |
460 | if (optlen < sizeof(int)) | 470 | if (optlen < sizeof(int)) |
461 | goto e_inval; | 471 | goto e_inval; |
462 | 472 | ||
@@ -832,7 +842,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt, | |||
832 | len = min_t(unsigned int, len, ipv6_optlen(hdr)); | 842 | len = min_t(unsigned int, len, ipv6_optlen(hdr)); |
833 | if (copy_to_user(optval, hdr, len)) | 843 | if (copy_to_user(optval, hdr, len)) |
834 | return -EFAULT; | 844 | return -EFAULT; |
835 | return ipv6_optlen(hdr); | 845 | return len; |
836 | } | 846 | } |
837 | 847 | ||
838 | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | 848 | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, |
@@ -852,7 +862,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
852 | if (sk->sk_protocol != IPPROTO_UDP && | 862 | if (sk->sk_protocol != IPPROTO_UDP && |
853 | sk->sk_protocol != IPPROTO_UDPLITE && | 863 | sk->sk_protocol != IPPROTO_UDPLITE && |
854 | sk->sk_protocol != IPPROTO_TCP) | 864 | sk->sk_protocol != IPPROTO_TCP) |
855 | return -EINVAL; | 865 | return -ENOPROTOOPT; |
856 | if (sk->sk_state != TCP_ESTABLISHED) | 866 | if (sk->sk_state != TCP_ESTABLISHED) |
857 | return -ENOTCONN; | 867 | return -ENOTCONN; |
858 | val = sk->sk_family; | 868 | val = sk->sk_family; |
@@ -866,6 +876,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
866 | return -EINVAL; | 876 | return -EINVAL; |
867 | if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) | 877 | if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) |
868 | return -EFAULT; | 878 | return -EFAULT; |
879 | if (gsf.gf_group.ss_family != AF_INET6) | ||
880 | return -EADDRNOTAVAIL; | ||
869 | lock_sock(sk); | 881 | lock_sock(sk); |
870 | err = ip6_mc_msfget(sk, &gsf, | 882 | err = ip6_mc_msfget(sk, &gsf, |
871 | (struct group_filter __user *)optval, optlen); | 883 | (struct group_filter __user *)optval, optlen); |
@@ -975,6 +987,9 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
975 | len = ipv6_getsockopt_sticky(sk, np->opt, | 987 | len = ipv6_getsockopt_sticky(sk, np->opt, |
976 | optname, optval, len); | 988 | optname, optval, len); |
977 | release_sock(sk); | 989 | release_sock(sk); |
990 | /* check if ipv6_getsockopt_sticky() returns err code */ | ||
991 | if (len < 0) | ||
992 | return len; | ||
978 | return put_user(len, optlen); | 993 | return put_user(len, optlen); |
979 | } | 994 | } |
980 | 995 | ||
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index a55fc05b8125..282fdb31f8ed 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1727,10 +1727,10 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1727 | return ret; | 1727 | return ret; |
1728 | } | 1728 | } |
1729 | 1729 | ||
1730 | static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | 1730 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, |
1731 | int nlen, void __user *oldval, | 1731 | int nlen, void __user *oldval, |
1732 | size_t __user *oldlenp, | 1732 | size_t __user *oldlenp, |
1733 | void __user *newval, size_t newlen) | 1733 | void __user *newval, size_t newlen) |
1734 | { | 1734 | { |
1735 | struct net_device *dev = ctl->extra1; | 1735 | struct net_device *dev = ctl->extra1; |
1736 | struct inet6_dev *idev; | 1736 | struct inet6_dev *idev; |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 2dccad48058c..e65e26e210ee 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -209,7 +209,9 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst) | |||
209 | arg.dst = dst; | 209 | arg.dst = dst; |
210 | hash = ip6qhashfn(id, src, dst); | 210 | hash = ip6qhashfn(id, src, dst); |
211 | 211 | ||
212 | local_bh_disable(); | ||
212 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); | 213 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); |
214 | local_bh_enable(); | ||
213 | if (q == NULL) | 215 | if (q == NULL) |
214 | goto oom; | 216 | goto oom; |
215 | 217 | ||
@@ -638,10 +640,10 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb) | |||
638 | goto ret_orig; | 640 | goto ret_orig; |
639 | } | 641 | } |
640 | 642 | ||
641 | spin_lock(&fq->q.lock); | 643 | spin_lock_bh(&fq->q.lock); |
642 | 644 | ||
643 | if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) { | 645 | if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) { |
644 | spin_unlock(&fq->q.lock); | 646 | spin_unlock_bh(&fq->q.lock); |
645 | pr_debug("Can't insert skb to queue\n"); | 647 | pr_debug("Can't insert skb to queue\n"); |
646 | fq_put(fq); | 648 | fq_put(fq); |
647 | goto ret_orig; | 649 | goto ret_orig; |
@@ -653,7 +655,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb) | |||
653 | if (ret_skb == NULL) | 655 | if (ret_skb == NULL) |
654 | pr_debug("Can't reassemble fragmented packets\n"); | 656 | pr_debug("Can't reassemble fragmented packets\n"); |
655 | } | 657 | } |
656 | spin_unlock(&fq->q.lock); | 658 | spin_unlock_bh(&fq->q.lock); |
657 | 659 | ||
658 | fq_put(fq); | 660 | fq_put(fq); |
659 | return ret_skb; | 661 | return ret_skb; |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 232e0dc45bf5..3aee12310d94 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -813,7 +813,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
813 | memset(opt, 0, sizeof(struct ipv6_txoptions)); | 813 | memset(opt, 0, sizeof(struct ipv6_txoptions)); |
814 | opt->tot_len = sizeof(struct ipv6_txoptions); | 814 | opt->tot_len = sizeof(struct ipv6_txoptions); |
815 | 815 | ||
816 | err = datagram_send_ctl(msg, &fl, opt, &hlimit, &tclass); | 816 | err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass); |
817 | if (err < 0) { | 817 | if (err < 0) { |
818 | fl6_sock_release(flowlabel); | 818 | fl6_sock_release(flowlabel); |
819 | return err; | 819 | return err; |
@@ -1164,6 +1164,15 @@ static void rawv6_close(struct sock *sk, long timeout) | |||
1164 | sk_common_release(sk); | 1164 | sk_common_release(sk); |
1165 | } | 1165 | } |
1166 | 1166 | ||
1167 | static int raw6_destroy(struct sock *sk) | ||
1168 | { | ||
1169 | lock_sock(sk); | ||
1170 | ip6_flush_pending_frames(sk); | ||
1171 | release_sock(sk); | ||
1172 | |||
1173 | return inet6_destroy_sock(sk); | ||
1174 | } | ||
1175 | |||
1167 | static int rawv6_init_sk(struct sock *sk) | 1176 | static int rawv6_init_sk(struct sock *sk) |
1168 | { | 1177 | { |
1169 | struct raw6_sock *rp = raw6_sk(sk); | 1178 | struct raw6_sock *rp = raw6_sk(sk); |
@@ -1187,11 +1196,11 @@ struct proto rawv6_prot = { | |||
1187 | .name = "RAWv6", | 1196 | .name = "RAWv6", |
1188 | .owner = THIS_MODULE, | 1197 | .owner = THIS_MODULE, |
1189 | .close = rawv6_close, | 1198 | .close = rawv6_close, |
1199 | .destroy = raw6_destroy, | ||
1190 | .connect = ip6_datagram_connect, | 1200 | .connect = ip6_datagram_connect, |
1191 | .disconnect = udp_disconnect, | 1201 | .disconnect = udp_disconnect, |
1192 | .ioctl = rawv6_ioctl, | 1202 | .ioctl = rawv6_ioctl, |
1193 | .init = rawv6_init_sk, | 1203 | .init = rawv6_init_sk, |
1194 | .destroy = inet6_destroy_sock, | ||
1195 | .setsockopt = rawv6_setsockopt, | 1204 | .setsockopt = rawv6_setsockopt, |
1196 | .getsockopt = rawv6_getsockopt, | 1205 | .getsockopt = rawv6_getsockopt, |
1197 | .sendmsg = rawv6_sendmsg, | 1206 | .sendmsg = rawv6_sendmsg, |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 12bba0880345..d1f3e19b06c7 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -109,7 +109,7 @@ static struct dst_ops ip6_dst_ops_template = { | |||
109 | .negative_advice = ip6_negative_advice, | 109 | .negative_advice = ip6_negative_advice, |
110 | .link_failure = ip6_link_failure, | 110 | .link_failure = ip6_link_failure, |
111 | .update_pmtu = ip6_rt_update_pmtu, | 111 | .update_pmtu = ip6_rt_update_pmtu, |
112 | .local_out = ip6_local_out, | 112 | .local_out = __ip6_local_out, |
113 | .entry_size = sizeof(struct rt6_info), | 113 | .entry_size = sizeof(struct rt6_info), |
114 | .entries = ATOMIC_INIT(0), | 114 | .entries = ATOMIC_INIT(0), |
115 | }; | 115 | }; |
@@ -446,7 +446,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, | |||
446 | struct route_info *rinfo = (struct route_info *) opt; | 446 | struct route_info *rinfo = (struct route_info *) opt; |
447 | struct in6_addr prefix_buf, *prefix; | 447 | struct in6_addr prefix_buf, *prefix; |
448 | unsigned int pref; | 448 | unsigned int pref; |
449 | u32 lifetime; | 449 | unsigned long lifetime; |
450 | struct rt6_info *rt; | 450 | struct rt6_info *rt; |
451 | 451 | ||
452 | if (len < sizeof(struct route_info)) { | 452 | if (len < sizeof(struct route_info)) { |
@@ -472,13 +472,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, | |||
472 | if (pref == ICMPV6_ROUTER_PREF_INVALID) | 472 | if (pref == ICMPV6_ROUTER_PREF_INVALID) |
473 | pref = ICMPV6_ROUTER_PREF_MEDIUM; | 473 | pref = ICMPV6_ROUTER_PREF_MEDIUM; |
474 | 474 | ||
475 | lifetime = ntohl(rinfo->lifetime); | 475 | lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ); |
476 | if (lifetime == 0xffffffff) { | ||
477 | /* infinity */ | ||
478 | } else if (lifetime > 0x7fffffff/HZ) { | ||
479 | /* Avoid arithmetic overflow */ | ||
480 | lifetime = 0x7fffffff/HZ - 1; | ||
481 | } | ||
482 | 476 | ||
483 | if (rinfo->length == 3) | 477 | if (rinfo->length == 3) |
484 | prefix = (struct in6_addr *)rinfo->prefix; | 478 | prefix = (struct in6_addr *)rinfo->prefix; |
@@ -506,7 +500,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, | |||
506 | (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); | 500 | (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); |
507 | 501 | ||
508 | if (rt) { | 502 | if (rt) { |
509 | if (lifetime == 0xffffffff) { | 503 | if (!addrconf_finite_timeout(lifetime)) { |
510 | rt->rt6i_flags &= ~RTF_EXPIRES; | 504 | rt->rt6i_flags &= ~RTF_EXPIRES; |
511 | } else { | 505 | } else { |
512 | rt->rt6i_expires = jiffies + HZ * lifetime; | 506 | rt->rt6i_expires = jiffies + HZ * lifetime; |
@@ -1106,7 +1100,9 @@ int ip6_route_add(struct fib6_config *cfg) | |||
1106 | } | 1100 | } |
1107 | 1101 | ||
1108 | rt->u.dst.obsolete = -1; | 1102 | rt->u.dst.obsolete = -1; |
1109 | rt->rt6i_expires = jiffies + clock_t_to_jiffies(cfg->fc_expires); | 1103 | rt->rt6i_expires = (cfg->fc_flags & RTF_EXPIRES) ? |
1104 | jiffies + clock_t_to_jiffies(cfg->fc_expires) : | ||
1105 | 0; | ||
1110 | 1106 | ||
1111 | if (cfg->fc_protocol == RTPROT_UNSPEC) | 1107 | if (cfg->fc_protocol == RTPROT_UNSPEC) |
1112 | cfg->fc_protocol = RTPROT_BOOT; | 1108 | cfg->fc_protocol = RTPROT_BOOT; |
@@ -2200,7 +2196,13 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
2200 | 2196 | ||
2201 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); | 2197 | NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); |
2202 | 2198 | ||
2203 | expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0; | 2199 | if (!(rt->rt6i_flags & RTF_EXPIRES)) |
2200 | expires = 0; | ||
2201 | else if (rt->rt6i_expires - jiffies < INT_MAX) | ||
2202 | expires = rt->rt6i_expires - jiffies; | ||
2203 | else | ||
2204 | expires = INT_MAX; | ||
2205 | |||
2204 | if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, | 2206 | if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, |
2205 | expires, rt->u.dst.error) < 0) | 2207 | expires, rt->u.dst.error) < 0) |
2206 | goto nla_put_failure; | 2208 | goto nla_put_failure; |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 5a6fab95569f..3de6ffdaedf2 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -403,9 +403,8 @@ static void ipip6_tunnel_uninit(struct net_device *dev) | |||
403 | 403 | ||
404 | static int ipip6_err(struct sk_buff *skb, u32 info) | 404 | static int ipip6_err(struct sk_buff *skb, u32 info) |
405 | { | 405 | { |
406 | #ifndef I_WISH_WORLD_WERE_PERFECT | ||
407 | 406 | ||
408 | /* It is not :-( All the routers (except for Linux) return only | 407 | /* All the routers (except for Linux) return only |
409 | 8 bytes of packet payload. It means, that precise relaying of | 408 | 8 bytes of packet payload. It means, that precise relaying of |
410 | ICMP in the real Internet is absolutely infeasible. | 409 | ICMP in the real Internet is absolutely infeasible. |
411 | */ | 410 | */ |
@@ -462,92 +461,6 @@ static int ipip6_err(struct sk_buff *skb, u32 info) | |||
462 | out: | 461 | out: |
463 | read_unlock(&ipip6_lock); | 462 | read_unlock(&ipip6_lock); |
464 | return err; | 463 | return err; |
465 | #else | ||
466 | struct iphdr *iph = (struct iphdr*)dp; | ||
467 | int hlen = iph->ihl<<2; | ||
468 | struct ipv6hdr *iph6; | ||
469 | const int type = icmp_hdr(skb)->type; | ||
470 | const int code = icmp_hdr(skb)->code; | ||
471 | int rel_type = 0; | ||
472 | int rel_code = 0; | ||
473 | int rel_info = 0; | ||
474 | struct sk_buff *skb2; | ||
475 | struct rt6_info *rt6i; | ||
476 | |||
477 | if (len < hlen + sizeof(struct ipv6hdr)) | ||
478 | return; | ||
479 | iph6 = (struct ipv6hdr*)(dp + hlen); | ||
480 | |||
481 | switch (type) { | ||
482 | default: | ||
483 | return; | ||
484 | case ICMP_PARAMETERPROB: | ||
485 | if (icmp_hdr(skb)->un.gateway < hlen) | ||
486 | return; | ||
487 | |||
488 | /* So... This guy found something strange INSIDE encapsulated | ||
489 | packet. Well, he is fool, but what can we do ? | ||
490 | */ | ||
491 | rel_type = ICMPV6_PARAMPROB; | ||
492 | rel_info = icmp_hdr(skb)->un.gateway - hlen; | ||
493 | break; | ||
494 | |||
495 | case ICMP_DEST_UNREACH: | ||
496 | switch (code) { | ||
497 | case ICMP_SR_FAILED: | ||
498 | case ICMP_PORT_UNREACH: | ||
499 | /* Impossible event. */ | ||
500 | return; | ||
501 | case ICMP_FRAG_NEEDED: | ||
502 | /* Too complicated case ... */ | ||
503 | return; | ||
504 | default: | ||
505 | /* All others are translated to HOST_UNREACH. | ||
506 | rfc2003 contains "deep thoughts" about NET_UNREACH, | ||
507 | I believe, it is just ether pollution. --ANK | ||
508 | */ | ||
509 | rel_type = ICMPV6_DEST_UNREACH; | ||
510 | rel_code = ICMPV6_ADDR_UNREACH; | ||
511 | break; | ||
512 | } | ||
513 | break; | ||
514 | case ICMP_TIME_EXCEEDED: | ||
515 | if (code != ICMP_EXC_TTL) | ||
516 | return; | ||
517 | rel_type = ICMPV6_TIME_EXCEED; | ||
518 | rel_code = ICMPV6_EXC_HOPLIMIT; | ||
519 | break; | ||
520 | } | ||
521 | |||
522 | /* Prepare fake skb to feed it to icmpv6_send */ | ||
523 | skb2 = skb_clone(skb, GFP_ATOMIC); | ||
524 | if (skb2 == NULL) | ||
525 | return 0; | ||
526 | dst_release(skb2->dst); | ||
527 | skb2->dst = NULL; | ||
528 | skb_pull(skb2, skb->data - (u8*)iph6); | ||
529 | skb_reset_network_header(skb2); | ||
530 | |||
531 | /* Try to guess incoming interface */ | ||
532 | rt6i = rt6_lookup(dev_net(skb->dev), &iph6->saddr, NULL, NULL, 0); | ||
533 | if (rt6i && rt6i->rt6i_dev) { | ||
534 | skb2->dev = rt6i->rt6i_dev; | ||
535 | |||
536 | rt6i = rt6_lookup(dev_net(skb->dev), | ||
537 | &iph6->daddr, &iph6->saddr, NULL, 0); | ||
538 | |||
539 | if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) { | ||
540 | struct ip_tunnel *t = netdev_priv(rt6i->rt6i_dev); | ||
541 | if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) { | ||
542 | rel_type = ICMPV6_DEST_UNREACH; | ||
543 | rel_code = ICMPV6_ADDR_UNREACH; | ||
544 | } | ||
545 | icmpv6_send(skb2, rel_type, rel_code, rel_info, skb2->dev); | ||
546 | } | ||
547 | } | ||
548 | kfree_skb(skb2); | ||
549 | return 0; | ||
550 | #endif | ||
551 | } | 464 | } |
552 | 465 | ||
553 | static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) | 466 | static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 938ce4ecde55..3ecc1157994e 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -198,7 +198,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
198 | ireq = inet_rsk(req); | 198 | ireq = inet_rsk(req); |
199 | ireq6 = inet6_rsk(req); | 199 | ireq6 = inet6_rsk(req); |
200 | treq = tcp_rsk(req); | 200 | treq = tcp_rsk(req); |
201 | ireq6->pktopts = NULL; | ||
202 | 201 | ||
203 | if (security_inet_conn_request(sk, skb, req)) { | 202 | if (security_inet_conn_request(sk, skb, req)) { |
204 | reqsk_free(req); | 203 | reqsk_free(req); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 715965f0fac0..cb46749d4c32 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1299,7 +1299,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1299 | treq = inet6_rsk(req); | 1299 | treq = inet6_rsk(req); |
1300 | ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); | 1300 | ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); |
1301 | ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); | 1301 | ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); |
1302 | treq->pktopts = NULL; | ||
1303 | if (!want_cookie) | 1302 | if (!want_cookie) |
1304 | TCP_ECN_create_request(req, tcp_hdr(skb)); | 1303 | TCP_ECN_create_request(req, tcp_hdr(skb)); |
1305 | 1304 | ||
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index 6323921b40be..669f280989c3 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
@@ -109,7 +109,7 @@ static int tunnel46_rcv(struct sk_buff *skb) | |||
109 | { | 109 | { |
110 | struct xfrm6_tunnel *handler; | 110 | struct xfrm6_tunnel *handler; |
111 | 111 | ||
112 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) | 112 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) |
113 | goto drop; | 113 | goto drop; |
114 | 114 | ||
115 | for (handler = tunnel46_handlers; handler; handler = handler->next) | 115 | for (handler = tunnel46_handlers; handler; handler = handler->next) |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1fd784f3e2ec..dd309626ae9a 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -534,7 +534,9 @@ static void udp_v6_flush_pending_frames(struct sock *sk) | |||
534 | { | 534 | { |
535 | struct udp_sock *up = udp_sk(sk); | 535 | struct udp_sock *up = udp_sk(sk); |
536 | 536 | ||
537 | if (up->pending) { | 537 | if (up->pending == AF_INET) |
538 | udp_flush_pending_frames(sk); | ||
539 | else if (up->pending) { | ||
538 | up->len = 0; | 540 | up->len = 0; |
539 | up->pending = 0; | 541 | up->pending = 0; |
540 | ip6_flush_pending_frames(sk); | 542 | ip6_flush_pending_frames(sk); |
@@ -731,7 +733,7 @@ do_udp_sendmsg: | |||
731 | memset(opt, 0, sizeof(struct ipv6_txoptions)); | 733 | memset(opt, 0, sizeof(struct ipv6_txoptions)); |
732 | opt->tot_len = sizeof(*opt); | 734 | opt->tot_len = sizeof(*opt); |
733 | 735 | ||
734 | err = datagram_send_ctl(msg, &fl, opt, &hlimit, &tclass); | 736 | err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass); |
735 | if (err < 0) { | 737 | if (err < 0) { |
736 | fl6_sock_release(flowlabel); | 738 | fl6_sock_release(flowlabel); |
737 | return err; | 739 | return err; |
@@ -848,12 +850,14 @@ do_append_data: | |||
848 | } else { | 850 | } else { |
849 | dst_release(dst); | 851 | dst_release(dst); |
850 | } | 852 | } |
853 | dst = NULL; | ||
851 | } | 854 | } |
852 | 855 | ||
853 | if (err > 0) | 856 | if (err > 0) |
854 | err = np->recverr ? net_xmit_errno(err) : 0; | 857 | err = np->recverr ? net_xmit_errno(err) : 0; |
855 | release_sock(sk); | 858 | release_sock(sk); |
856 | out: | 859 | out: |
860 | dst_release(dst); | ||
857 | fl6_sock_release(flowlabel); | 861 | fl6_sock_release(flowlabel); |
858 | if (!err) | 862 | if (!err) |
859 | return len; | 863 | return len; |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index ae54b20d0470..3eb5bcc75f99 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -1093,11 +1093,6 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1093 | 1093 | ||
1094 | init_waitqueue_head(&self->query_wait); | 1094 | init_waitqueue_head(&self->query_wait); |
1095 | 1095 | ||
1096 | /* Initialise networking socket struct */ | ||
1097 | sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */ | ||
1098 | sk->sk_family = PF_IRDA; | ||
1099 | sk->sk_protocol = protocol; | ||
1100 | |||
1101 | switch (sock->type) { | 1096 | switch (sock->type) { |
1102 | case SOCK_STREAM: | 1097 | case SOCK_STREAM: |
1103 | sock->ops = &irda_stream_ops; | 1098 | sock->ops = &irda_stream_ops; |
@@ -1124,13 +1119,20 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1124 | self->max_sdu_size_rx = TTP_SAR_UNBOUND; | 1119 | self->max_sdu_size_rx = TTP_SAR_UNBOUND; |
1125 | break; | 1120 | break; |
1126 | default: | 1121 | default: |
1122 | sk_free(sk); | ||
1127 | return -ESOCKTNOSUPPORT; | 1123 | return -ESOCKTNOSUPPORT; |
1128 | } | 1124 | } |
1129 | break; | 1125 | break; |
1130 | default: | 1126 | default: |
1127 | sk_free(sk); | ||
1131 | return -ESOCKTNOSUPPORT; | 1128 | return -ESOCKTNOSUPPORT; |
1132 | } | 1129 | } |
1133 | 1130 | ||
1131 | /* Initialise networking socket struct */ | ||
1132 | sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */ | ||
1133 | sk->sk_family = PF_IRDA; | ||
1134 | sk->sk_protocol = protocol; | ||
1135 | |||
1134 | /* Register as a client with IrLMP */ | 1136 | /* Register as a client with IrLMP */ |
1135 | self->ckey = irlmp_register_client(0, NULL, NULL, NULL); | 1137 | self->ckey = irlmp_register_client(0, NULL, NULL, NULL); |
1136 | self->mask.word = 0xffff; | 1138 | self->mask.word = 0xffff; |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 9e7236ff6bcc..7470e367272b 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1251,7 +1251,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr, | |||
1251 | x->sel.prefixlen_s = addr->sadb_address_prefixlen; | 1251 | x->sel.prefixlen_s = addr->sadb_address_prefixlen; |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | if (x->props.mode == XFRM_MODE_TRANSPORT) | 1254 | if (!x->sel.family) |
1255 | x->sel.family = x->props.family; | 1255 | x->sel.family = x->props.family; |
1256 | 1256 | ||
1257 | if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) { | 1257 | if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) { |
@@ -3030,6 +3030,9 @@ static int key_notify_sa_expire(struct xfrm_state *x, struct km_event *c) | |||
3030 | 3030 | ||
3031 | static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) | 3031 | static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) |
3032 | { | 3032 | { |
3033 | if (atomic_read(&pfkey_socks_nr) == 0) | ||
3034 | return 0; | ||
3035 | |||
3033 | switch (c->event) { | 3036 | switch (c->event) { |
3034 | case XFRM_MSG_EXPIRE: | 3037 | case XFRM_MSG_EXPIRE: |
3035 | return key_notify_sa_expire(x, c); | 3038 | return key_notify_sa_expire(x, c); |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index e2ddde755019..008de1fc42ca 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -286,12 +286,14 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb, | |||
286 | * | 286 | * |
287 | * Sends received pdus to the sap state machine. | 287 | * Sends received pdus to the sap state machine. |
288 | */ | 288 | */ |
289 | static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) | 289 | static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb, |
290 | struct sock *sk) | ||
290 | { | 291 | { |
291 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); | 292 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); |
292 | 293 | ||
293 | ev->type = LLC_SAP_EV_TYPE_PDU; | 294 | ev->type = LLC_SAP_EV_TYPE_PDU; |
294 | ev->reason = 0; | 295 | ev->reason = 0; |
296 | skb->sk = sk; | ||
295 | llc_sap_state_process(sap, skb); | 297 | llc_sap_state_process(sap, skb); |
296 | } | 298 | } |
297 | 299 | ||
@@ -360,8 +362,7 @@ static void llc_sap_mcast(struct llc_sap *sap, | |||
360 | break; | 362 | break; |
361 | 363 | ||
362 | sock_hold(sk); | 364 | sock_hold(sk); |
363 | skb_set_owner_r(skb1, sk); | 365 | llc_sap_rcv(sap, skb1, sk); |
364 | llc_sap_rcv(sap, skb1); | ||
365 | sock_put(sk); | 366 | sock_put(sk); |
366 | } | 367 | } |
367 | read_unlock_bh(&sap->sk_list.lock); | 368 | read_unlock_bh(&sap->sk_list.lock); |
@@ -381,8 +382,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb) | |||
381 | } else { | 382 | } else { |
382 | struct sock *sk = llc_lookup_dgram(sap, &laddr); | 383 | struct sock *sk = llc_lookup_dgram(sap, &laddr); |
383 | if (sk) { | 384 | if (sk) { |
384 | skb_set_owner_r(skb, sk); | 385 | llc_sap_rcv(sap, skb, sk); |
385 | llc_sap_rcv(sap, skb); | ||
386 | sock_put(sk); | 386 | sock_put(sk); |
387 | } else | 387 | } else |
388 | kfree_skb(skb); | 388 | kfree_skb(skb); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 699d97b8de5e..a9fce4afdf21 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
672 | if (params->vlan) { | 672 | if (params->vlan) { |
673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
674 | 674 | ||
675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) | 676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
677 | return -EINVAL; | 677 | return -EINVAL; |
678 | } else | 678 | } else |
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
760 | if (params->vlan && params->vlan != sta->sdata->dev) { | 760 | if (params->vlan && params->vlan != sta->sdata->dev) { |
761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
762 | 762 | ||
763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { | 764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { |
765 | rcu_read_unlock(); | 765 | rcu_read_unlock(); |
766 | return -EINVAL; | 766 | return -EINVAL; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c7314bf4bec2..006486b26726 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -899,7 +899,7 @@ extern const struct iw_handler_def ieee80211_iw_handler_def; | |||
899 | 899 | ||
900 | 900 | ||
901 | /* ieee80211_ioctl.c */ | 901 | /* ieee80211_ioctl.c */ |
902 | int ieee80211_set_freq(struct ieee80211_local *local, int freq); | 902 | int ieee80211_set_freq(struct net_device *dev, int freq); |
903 | /* ieee80211_sta.c */ | 903 | /* ieee80211_sta.c */ |
904 | void ieee80211_sta_timer(unsigned long data); | 904 | void ieee80211_sta_timer(unsigned long data); |
905 | void ieee80211_sta_work(struct work_struct *work); | 905 | void ieee80211_sta_work(struct work_struct *work); |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 915afadb0602..98c0b5e56ecc 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -511,6 +511,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
511 | case IEEE80211_IF_TYPE_STA: | 511 | case IEEE80211_IF_TYPE_STA: |
512 | case IEEE80211_IF_TYPE_IBSS: | 512 | case IEEE80211_IF_TYPE_IBSS: |
513 | sdata->u.sta.state = IEEE80211_DISABLED; | 513 | sdata->u.sta.state = IEEE80211_DISABLED; |
514 | memset(sdata->u.sta.bssid, 0, ETH_ALEN); | ||
514 | del_timer_sync(&sdata->u.sta.timer); | 515 | del_timer_sync(&sdata->u.sta.timer); |
515 | /* | 516 | /* |
516 | * When we get here, the interface is marked down. | 517 | * When we get here, the interface is marked down. |
@@ -1313,7 +1314,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
1313 | /* | 1314 | /* |
1314 | * Clear the TX filter mask for this STA when sending the next | 1315 | * Clear the TX filter mask for this STA when sending the next |
1315 | * packet. If the STA went to power save mode, this will happen | 1316 | * packet. If the STA went to power save mode, this will happen |
1316 | * happen when it wakes up for the next time. | 1317 | * when it wakes up for the next time. |
1317 | */ | 1318 | */ |
1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; | 1319 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; |
1319 | 1320 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4adba09e80ca..4d2b582dd055 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) | 44 | #define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) |
45 | #define IEEE80211_SCAN_INTERVAL (2 * HZ) | 45 | #define IEEE80211_SCAN_INTERVAL (2 * HZ) |
46 | #define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) | 46 | #define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) |
47 | #define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ) | 47 | #define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ) |
48 | 48 | ||
49 | #define IEEE80211_PROBE_DELAY (HZ / 33) | 49 | #define IEEE80211_PROBE_DELAY (HZ / 33) |
50 | #define IEEE80211_CHANNEL_TIME (HZ / 33) | 50 | #define IEEE80211_CHANNEL_TIME (HZ / 33) |
@@ -730,7 +730,17 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
730 | if (bss->wmm_ie) { | 730 | if (bss->wmm_ie) { |
731 | wmm = 1; | 731 | wmm = 1; |
732 | } | 732 | } |
733 | |||
734 | /* get all rates supported by the device and the AP as | ||
735 | * some APs don't like getting a superset of their rates | ||
736 | * in the association request (e.g. D-Link DAP 1353 in | ||
737 | * b-only mode) */ | ||
738 | rates_len = ieee80211_compatible_rates(bss, sband, &rates); | ||
739 | |||
733 | ieee80211_rx_bss_put(dev, bss); | 740 | ieee80211_rx_bss_put(dev, bss); |
741 | } else { | ||
742 | rates = ~0; | ||
743 | rates_len = sband->n_bitrates; | ||
734 | } | 744 | } |
735 | 745 | ||
736 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); | 746 | mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); |
@@ -761,10 +771,7 @@ static void ieee80211_send_assoc(struct net_device *dev, | |||
761 | *pos++ = ifsta->ssid_len; | 771 | *pos++ = ifsta->ssid_len; |
762 | memcpy(pos, ifsta->ssid, ifsta->ssid_len); | 772 | memcpy(pos, ifsta->ssid, ifsta->ssid_len); |
763 | 773 | ||
764 | /* all supported rates should be added here but some APs | 774 | /* add all rates which were marked to be used above */ |
765 | * (e.g. D-Link DAP 1353 in b-only mode) don't like that | ||
766 | * Therefore only add rates the AP supports */ | ||
767 | rates_len = ieee80211_compatible_rates(bss, sband, &rates); | ||
768 | supp_rates_len = rates_len; | 775 | supp_rates_len = rates_len; |
769 | if (supp_rates_len > 8) | 776 | if (supp_rates_len > 8) |
770 | supp_rates_len = 8; | 777 | supp_rates_len = 8; |
@@ -1318,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1318 | 1325 | ||
1319 | /* prepare reordering buffer */ | 1326 | /* prepare reordering buffer */ |
1320 | tid_agg_rx->reorder_buf = | 1327 | tid_agg_rx->reorder_buf = |
1321 | kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); | 1328 | kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); |
1322 | if (!tid_agg_rx->reorder_buf) { | 1329 | if (!tid_agg_rx->reorder_buf) { |
1323 | if (net_ratelimit()) | 1330 | if (net_ratelimit()) |
1324 | printk(KERN_ERR "can not allocate reordering buffer " | 1331 | printk(KERN_ERR "can not allocate reordering buffer " |
@@ -1327,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1327 | goto end; | 1334 | goto end; |
1328 | } | 1335 | } |
1329 | memset(tid_agg_rx->reorder_buf, 0, | 1336 | memset(tid_agg_rx->reorder_buf, 0, |
1330 | buf_size * sizeof(struct sk_buf *)); | 1337 | buf_size * sizeof(struct sk_buff *)); |
1331 | 1338 | ||
1332 | if (local->ops->ampdu_action) | 1339 | if (local->ops->ampdu_action) |
1333 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |
@@ -1607,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data) | |||
1607 | * only one argument, and both sta_info and TID are needed, so init | 1614 | * only one argument, and both sta_info and TID are needed, so init |
1608 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1609 | * array gives the sta through container_of */ | 1616 | * array gives the sta through container_of */ |
1610 | u16 tid = *(int *)data; | 1617 | u16 tid = *(u8 *)data; |
1611 | struct sta_info *temp_sta = container_of((void *)data, | 1618 | struct sta_info *temp_sta = container_of((void *)data, |
1612 | struct sta_info, timer_to_tid[tid]); | 1619 | struct sta_info, timer_to_tid[tid]); |
1613 | 1620 | ||
@@ -1655,7 +1662,7 @@ timer_expired_exit: | |||
1655 | void sta_rx_agg_session_timer_expired(unsigned long data) | 1662 | void sta_rx_agg_session_timer_expired(unsigned long data) |
1656 | { | 1663 | { |
1657 | /* not an elegant detour, but there is no choice as the timer passes | 1664 | /* not an elegant detour, but there is no choice as the timer passes |
1658 | * only one argument, and verious sta_info are needed here, so init | 1665 | * only one argument, and various sta_info are needed here, so init |
1659 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1660 | * array gives the sta through container_of */ | 1667 | * array gives the sta through container_of */ |
1661 | u8 *ptid = (u8 *)data; | 1668 | u8 *ptid = (u8 *)data; |
@@ -2329,6 +2336,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2329 | u8 *pos; | 2336 | u8 *pos; |
2330 | struct ieee80211_sub_if_data *sdata; | 2337 | struct ieee80211_sub_if_data *sdata; |
2331 | struct ieee80211_supported_band *sband; | 2338 | struct ieee80211_supported_band *sband; |
2339 | union iwreq_data wrqu; | ||
2332 | 2340 | ||
2333 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; | 2341 | sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; |
2334 | 2342 | ||
@@ -2351,13 +2359,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2351 | sdata->drop_unencrypted = bss->capability & | 2359 | sdata->drop_unencrypted = bss->capability & |
2352 | WLAN_CAPABILITY_PRIVACY ? 1 : 0; | 2360 | WLAN_CAPABILITY_PRIVACY ? 1 : 0; |
2353 | 2361 | ||
2354 | res = ieee80211_set_freq(local, bss->freq); | 2362 | res = ieee80211_set_freq(dev, bss->freq); |
2355 | 2363 | ||
2356 | if (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS) { | 2364 | if (res) |
2357 | printk(KERN_DEBUG "%s: IBSS not allowed on frequency " | 2365 | return res; |
2358 | "%d MHz\n", dev->name, local->oper_channel->center_freq); | ||
2359 | return -1; | ||
2360 | } | ||
2361 | 2366 | ||
2362 | /* Set beacon template */ | 2367 | /* Set beacon template */ |
2363 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400); | 2368 | skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400); |
@@ -2472,7 +2477,9 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2472 | ifsta->state = IEEE80211_IBSS_JOINED; | 2477 | ifsta->state = IEEE80211_IBSS_JOINED; |
2473 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); | 2478 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); |
2474 | 2479 | ||
2475 | ieee80211_rx_bss_put(dev, bss); | 2480 | memset(&wrqu, 0, sizeof(wrqu)); |
2481 | memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN); | ||
2482 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | ||
2476 | 2483 | ||
2477 | return res; | 2484 | return res; |
2478 | } | 2485 | } |
@@ -3446,21 +3453,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3446 | struct ieee80211_sta_bss *bss, *selected = NULL; | 3453 | struct ieee80211_sta_bss *bss, *selected = NULL; |
3447 | int top_rssi = 0, freq; | 3454 | int top_rssi = 0, freq; |
3448 | 3455 | ||
3449 | if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | | ||
3450 | IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) { | ||
3451 | ifsta->state = IEEE80211_AUTHENTICATE; | ||
3452 | ieee80211_sta_reset_auth(dev, ifsta); | ||
3453 | return 0; | ||
3454 | } | ||
3455 | |||
3456 | spin_lock_bh(&local->sta_bss_lock); | 3456 | spin_lock_bh(&local->sta_bss_lock); |
3457 | freq = local->oper_channel->center_freq; | 3457 | freq = local->oper_channel->center_freq; |
3458 | list_for_each_entry(bss, &local->sta_bss_list, list) { | 3458 | list_for_each_entry(bss, &local->sta_bss_list, list) { |
3459 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) | 3459 | if (!(bss->capability & WLAN_CAPABILITY_ESS)) |
3460 | continue; | 3460 | continue; |
3461 | 3461 | ||
3462 | if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | 3462 | if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL | |
3463 | !!sdata->default_key) | 3463 | IEEE80211_STA_AUTO_BSSID_SEL | |
3464 | IEEE80211_STA_AUTO_CHANNEL_SEL)) && | ||
3465 | (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ | ||
3466 | !!sdata->default_key)) | ||
3464 | continue; | 3467 | continue; |
3465 | 3468 | ||
3466 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && | 3469 | if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && |
@@ -3485,7 +3488,7 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
3485 | spin_unlock_bh(&local->sta_bss_lock); | 3488 | spin_unlock_bh(&local->sta_bss_lock); |
3486 | 3489 | ||
3487 | if (selected) { | 3490 | if (selected) { |
3488 | ieee80211_set_freq(local, selected->freq); | 3491 | ieee80211_set_freq(dev, selected->freq); |
3489 | if (!(ifsta->flags & IEEE80211_STA_SSID_SET)) | 3492 | if (!(ifsta->flags & IEEE80211_STA_SSID_SET)) |
3490 | ieee80211_sta_set_ssid(dev, selected->ssid, | 3493 | ieee80211_sta_set_ssid(dev, selected->ssid, |
3491 | selected->ssid_len); | 3494 | selected->ssid_len); |
@@ -3520,6 +3523,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3520 | struct ieee80211_supported_band *sband; | 3523 | struct ieee80211_supported_band *sband; |
3521 | u8 bssid[ETH_ALEN], *pos; | 3524 | u8 bssid[ETH_ALEN], *pos; |
3522 | int i; | 3525 | int i; |
3526 | int ret; | ||
3523 | DECLARE_MAC_BUF(mac); | 3527 | DECLARE_MAC_BUF(mac); |
3524 | 3528 | ||
3525 | #if 0 | 3529 | #if 0 |
@@ -3564,7 +3568,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3564 | *pos++ = (u8) (rate / 5); | 3568 | *pos++ = (u8) (rate / 5); |
3565 | } | 3569 | } |
3566 | 3570 | ||
3567 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3571 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3572 | ieee80211_rx_bss_put(dev, bss); | ||
3573 | return ret; | ||
3568 | } | 3574 | } |
3569 | 3575 | ||
3570 | 3576 | ||
@@ -3612,10 +3618,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3612 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3618 | (bss = ieee80211_rx_bss_get(dev, bssid, |
3613 | local->hw.conf.channel->center_freq, | 3619 | local->hw.conf.channel->center_freq, |
3614 | ifsta->ssid, ifsta->ssid_len))) { | 3620 | ifsta->ssid, ifsta->ssid_len))) { |
3621 | int ret; | ||
3615 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" | 3622 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" |
3616 | " based on configured SSID\n", | 3623 | " based on configured SSID\n", |
3617 | dev->name, print_mac(mac, bssid)); | 3624 | dev->name, print_mac(mac, bssid)); |
3618 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3625 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3626 | ieee80211_rx_bss_put(dev, bss); | ||
3627 | return ret; | ||
3619 | } | 3628 | } |
3620 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3629 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3621 | printk(KERN_DEBUG " did not try to join ibss\n"); | 3630 | printk(KERN_DEBUG " did not try to join ibss\n"); |
@@ -4092,18 +4101,17 @@ ieee80211_sta_scan_result(struct net_device *dev, | |||
4092 | 4101 | ||
4093 | memset(&iwe, 0, sizeof(iwe)); | 4102 | memset(&iwe, 0, sizeof(iwe)); |
4094 | iwe.cmd = SIOCGIWFREQ; | 4103 | iwe.cmd = SIOCGIWFREQ; |
4095 | iwe.u.freq.m = bss->freq; | 4104 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); |
4096 | iwe.u.freq.e = 6; | 4105 | iwe.u.freq.e = 0; |
4097 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4106 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4098 | IW_EV_FREQ_LEN); | 4107 | IW_EV_FREQ_LEN); |
4099 | 4108 | ||
4100 | memset(&iwe, 0, sizeof(iwe)); | 4109 | memset(&iwe, 0, sizeof(iwe)); |
4101 | iwe.cmd = SIOCGIWFREQ; | 4110 | iwe.cmd = SIOCGIWFREQ; |
4102 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); | 4111 | iwe.u.freq.m = bss->freq; |
4103 | iwe.u.freq.e = 0; | 4112 | iwe.u.freq.e = 6; |
4104 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4113 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4105 | IW_EV_FREQ_LEN); | 4114 | IW_EV_FREQ_LEN); |
4106 | |||
4107 | memset(&iwe, 0, sizeof(iwe)); | 4115 | memset(&iwe, 0, sizeof(iwe)); |
4108 | iwe.cmd = IWEVQUAL; | 4116 | iwe.cmd = IWEVQUAL; |
4109 | iwe.u.qual.qual = bss->signal; | 4117 | iwe.u.qual.qual = bss->signal; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1958bfb361c6..0941e5d6a522 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1091 | u16 fc, hdrlen, ethertype; | 1091 | u16 fc, hdrlen, ethertype; |
1092 | u8 *payload; | 1092 | u8 *payload; |
1093 | u8 dst[ETH_ALEN]; | 1093 | u8 dst[ETH_ALEN]; |
1094 | u8 src[ETH_ALEN]; | 1094 | u8 src[ETH_ALEN] __aligned(2); |
1095 | struct sk_buff *skb = rx->skb; | 1095 | struct sk_buff *skb = rx->skb; |
1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1097 | DECLARE_MAC_BUF(mac); | 1097 | DECLARE_MAC_BUF(mac); |
@@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1234 | */ | 1234 | */ |
1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) | 1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) |
1236 | { | 1236 | { |
1237 | static const u8 pae_group_addr[ETH_ALEN] | 1237 | static const u8 pae_group_addr[ETH_ALEN] __aligned(2) |
1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; | 1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; |
1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; | 1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; |
1240 | 1240 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 24a465c4df09..4e97b266f907 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid; | |||
34 | 34 | ||
35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | 35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ |
36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | 36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ |
37 | const unsigned char rfc1042_header[] = | 37 | const unsigned char rfc1042_header[] __aligned(2) = |
38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | 38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; |
39 | 39 | ||
40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | 40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ |
41 | const unsigned char bridge_tunnel_header[] = | 41 | const unsigned char bridge_tunnel_header[] __aligned(2) = |
42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | 42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
43 | 43 | ||
44 | 44 | ||
@@ -389,6 +389,41 @@ void ieee80211_iterate_active_interfaces( | |||
389 | struct ieee80211_local *local = hw_to_local(hw); | 389 | struct ieee80211_local *local = hw_to_local(hw); |
390 | struct ieee80211_sub_if_data *sdata; | 390 | struct ieee80211_sub_if_data *sdata; |
391 | 391 | ||
392 | rtnl_lock(); | ||
393 | |||
394 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
395 | switch (sdata->vif.type) { | ||
396 | case IEEE80211_IF_TYPE_INVALID: | ||
397 | case IEEE80211_IF_TYPE_MNTR: | ||
398 | case IEEE80211_IF_TYPE_VLAN: | ||
399 | continue; | ||
400 | case IEEE80211_IF_TYPE_AP: | ||
401 | case IEEE80211_IF_TYPE_STA: | ||
402 | case IEEE80211_IF_TYPE_IBSS: | ||
403 | case IEEE80211_IF_TYPE_WDS: | ||
404 | case IEEE80211_IF_TYPE_MESH_POINT: | ||
405 | break; | ||
406 | } | ||
407 | if (sdata->dev == local->mdev) | ||
408 | continue; | ||
409 | if (netif_running(sdata->dev)) | ||
410 | iterator(data, sdata->dev->dev_addr, | ||
411 | &sdata->vif); | ||
412 | } | ||
413 | |||
414 | rtnl_unlock(); | ||
415 | } | ||
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | ||
417 | |||
418 | void ieee80211_iterate_active_interfaces_atomic( | ||
419 | struct ieee80211_hw *hw, | ||
420 | void (*iterator)(void *data, u8 *mac, | ||
421 | struct ieee80211_vif *vif), | ||
422 | void *data) | ||
423 | { | ||
424 | struct ieee80211_local *local = hw_to_local(hw); | ||
425 | struct ieee80211_sub_if_data *sdata; | ||
426 | |||
392 | rcu_read_lock(); | 427 | rcu_read_lock(); |
393 | 428 | ||
394 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { | 429 | list_for_each_entry_rcu(sdata, &local->interfaces, list) { |
@@ -413,4 +448,4 @@ void ieee80211_iterate_active_interfaces( | |||
413 | 448 | ||
414 | rcu_read_unlock(); | 449 | rcu_read_unlock(); |
415 | } | 450 | } |
416 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); | 451 | EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic); |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 76e1de1dc735..a8bb8e31b1ec 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -209,7 +209,6 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev, | |||
209 | range->num_frequency = c; | 209 | range->num_frequency = c; |
210 | 210 | ||
211 | IW_EVENT_CAPA_SET_KERNEL(range->event_capa); | 211 | IW_EVENT_CAPA_SET_KERNEL(range->event_capa); |
212 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY); | ||
213 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); | 212 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); |
214 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); | 213 | IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); |
215 | 214 | ||
@@ -291,14 +290,22 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev, | |||
291 | return 0; | 290 | return 0; |
292 | } | 291 | } |
293 | 292 | ||
294 | int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz) | 293 | int ieee80211_set_freq(struct net_device *dev, int freqMHz) |
295 | { | 294 | { |
296 | int ret = -EINVAL; | 295 | int ret = -EINVAL; |
297 | struct ieee80211_channel *chan; | 296 | struct ieee80211_channel *chan; |
297 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
298 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
298 | 299 | ||
299 | chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); | 300 | chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); |
300 | 301 | ||
301 | if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { | 302 | if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { |
303 | if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && | ||
304 | chan->flags & IEEE80211_CHAN_NO_IBSS) { | ||
305 | printk(KERN_DEBUG "%s: IBSS not allowed on frequency " | ||
306 | "%d MHz\n", dev->name, chan->center_freq); | ||
307 | return ret; | ||
308 | } | ||
302 | local->oper_channel = chan; | 309 | local->oper_channel = chan; |
303 | 310 | ||
304 | if (local->sta_sw_scanning || local->sta_hw_scanning) | 311 | if (local->sta_sw_scanning || local->sta_hw_scanning) |
@@ -316,7 +323,6 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev, | |||
316 | struct iw_request_info *info, | 323 | struct iw_request_info *info, |
317 | struct iw_freq *freq, char *extra) | 324 | struct iw_freq *freq, char *extra) |
318 | { | 325 | { |
319 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
320 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 326 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
321 | 327 | ||
322 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) | 328 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA) |
@@ -330,14 +336,14 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev, | |||
330 | IEEE80211_STA_AUTO_CHANNEL_SEL; | 336 | IEEE80211_STA_AUTO_CHANNEL_SEL; |
331 | return 0; | 337 | return 0; |
332 | } else | 338 | } else |
333 | return ieee80211_set_freq(local, | 339 | return ieee80211_set_freq(dev, |
334 | ieee80211_channel_to_frequency(freq->m)); | 340 | ieee80211_channel_to_frequency(freq->m)); |
335 | } else { | 341 | } else { |
336 | int i, div = 1000000; | 342 | int i, div = 1000000; |
337 | for (i = 0; i < freq->e; i++) | 343 | for (i = 0; i < freq->e; i++) |
338 | div /= 10; | 344 | div /= 10; |
339 | if (div > 0) | 345 | if (div > 0) |
340 | return ieee80211_set_freq(local, freq->m / div); | 346 | return ieee80211_set_freq(dev, freq->m / div); |
341 | else | 347 | else |
342 | return -EINVAL; | 348 | return -EINVAL; |
343 | } | 349 | } |
@@ -490,9 +496,14 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, | |||
490 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 496 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
491 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || | 497 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
492 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { | 498 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
493 | ap_addr->sa_family = ARPHRD_ETHER; | 499 | if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { |
494 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); | 500 | ap_addr->sa_family = ARPHRD_ETHER; |
495 | return 0; | 501 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); |
502 | return 0; | ||
503 | } else { | ||
504 | memset(&ap_addr->sa_data, 0, ETH_ALEN); | ||
505 | return 0; | ||
506 | } | ||
496 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { | 507 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
497 | ap_addr->sa_family = ARPHRD_ETHER; | 508 | ap_addr->sa_family = ARPHRD_ETHER; |
498 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); | 509 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index c4b1799da5d7..662c1ccfee26 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -196,8 +196,6 @@ destroy_conntrack(struct nf_conntrack *nfct) | |||
196 | if (l4proto && l4proto->destroy) | 196 | if (l4proto && l4proto->destroy) |
197 | l4proto->destroy(ct); | 197 | l4proto->destroy(ct); |
198 | 198 | ||
199 | nf_ct_ext_destroy(ct); | ||
200 | |||
201 | rcu_read_unlock(); | 199 | rcu_read_unlock(); |
202 | 200 | ||
203 | spin_lock_bh(&nf_conntrack_lock); | 201 | spin_lock_bh(&nf_conntrack_lock); |
@@ -520,6 +518,7 @@ static void nf_conntrack_free_rcu(struct rcu_head *head) | |||
520 | 518 | ||
521 | void nf_conntrack_free(struct nf_conn *ct) | 519 | void nf_conntrack_free(struct nf_conn *ct) |
522 | { | 520 | { |
521 | nf_ct_ext_destroy(ct); | ||
523 | call_rcu(&ct->rcu, nf_conntrack_free_rcu); | 522 | call_rcu(&ct->rcu, nf_conntrack_free_rcu); |
524 | } | 523 | } |
525 | EXPORT_SYMBOL_GPL(nf_conntrack_free); | 524 | EXPORT_SYMBOL_GPL(nf_conntrack_free); |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e31beeb33b2b..e8f0dead267f 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void) | |||
587 | return 0; | 587 | return 0; |
588 | 588 | ||
589 | err3: | 589 | err3: |
590 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
591 | err2: | ||
590 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, | 592 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, |
591 | nf_ct_expect_hsize); | 593 | nf_ct_expect_hsize); |
592 | err2: | ||
593 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
594 | err1: | 594 | err1: |
595 | return err; | 595 | return err; |
596 | } | 596 | } |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index bc11d7092032..9fda6ee95a31 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -92,10 +92,6 @@ void nf_log_packet(int pf, | |||
92 | vsnprintf(prefix, sizeof(prefix), fmt, args); | 92 | vsnprintf(prefix, sizeof(prefix), fmt, args); |
93 | va_end(args); | 93 | va_end(args); |
94 | logger->logfn(pf, hooknum, skb, in, out, loginfo, prefix); | 94 | logger->logfn(pf, hooknum, skb, in, out, loginfo, prefix); |
95 | } else if (net_ratelimit()) { | ||
96 | printk(KERN_WARNING "nf_log_packet: can\'t log since " | ||
97 | "no backend logging module loaded in! Please either " | ||
98 | "load one, or disable logging explicitly\n"); | ||
99 | } | 95 | } |
100 | rcu_read_unlock(); | 96 | rcu_read_unlock(); |
101 | } | 97 | } |
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 2e89a00df92c..70907f6baac3 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c | |||
@@ -73,7 +73,8 @@ connlimit_iphash6(const union nf_inet_addr *addr, | |||
73 | static inline bool already_closed(const struct nf_conn *conn) | 73 | static inline bool already_closed(const struct nf_conn *conn) |
74 | { | 74 | { |
75 | if (nf_ct_protonum(conn) == IPPROTO_TCP) | 75 | if (nf_ct_protonum(conn) == IPPROTO_TCP) |
76 | return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT; | 76 | return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT || |
77 | conn->proto.tcp.state == TCP_CONNTRACK_CLOSE; | ||
77 | else | 78 | else |
78 | return 0; | 79 | return 0; |
79 | } | 80 | } |
diff --git a/net/netlink/attr.c b/net/netlink/attr.c index feb326f4a752..47bbf45ae5d7 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c | |||
@@ -400,13 +400,13 @@ void __nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | |||
400 | * @attrlen: length of attribute payload | 400 | * @attrlen: length of attribute payload |
401 | * @data: head of attribute payload | 401 | * @data: head of attribute payload |
402 | * | 402 | * |
403 | * Returns -1 if the tailroom of the skb is insufficient to store | 403 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
404 | * the attribute header and payload. | 404 | * the attribute header and payload. |
405 | */ | 405 | */ |
406 | int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) | 406 | int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) |
407 | { | 407 | { |
408 | if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen))) | 408 | if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen))) |
409 | return -1; | 409 | return -EMSGSIZE; |
410 | 410 | ||
411 | __nla_put(skb, attrtype, attrlen, data); | 411 | __nla_put(skb, attrtype, attrlen, data); |
412 | return 0; | 412 | return 0; |
@@ -418,13 +418,13 @@ int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) | |||
418 | * @attrlen: length of attribute payload | 418 | * @attrlen: length of attribute payload |
419 | * @data: head of attribute payload | 419 | * @data: head of attribute payload |
420 | * | 420 | * |
421 | * Returns -1 if the tailroom of the skb is insufficient to store | 421 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
422 | * the attribute payload. | 422 | * the attribute payload. |
423 | */ | 423 | */ |
424 | int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | 424 | int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) |
425 | { | 425 | { |
426 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) | 426 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) |
427 | return -1; | 427 | return -EMSGSIZE; |
428 | 428 | ||
429 | __nla_put_nohdr(skb, attrlen, data); | 429 | __nla_put_nohdr(skb, attrlen, data); |
430 | return 0; | 430 | return 0; |
@@ -436,13 +436,13 @@ int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | |||
436 | * @attrlen: length of attribute payload | 436 | * @attrlen: length of attribute payload |
437 | * @data: head of attribute payload | 437 | * @data: head of attribute payload |
438 | * | 438 | * |
439 | * Returns -1 if the tailroom of the skb is insufficient to store | 439 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
440 | * the attribute payload. | 440 | * the attribute payload. |
441 | */ | 441 | */ |
442 | int nla_append(struct sk_buff *skb, int attrlen, const void *data) | 442 | int nla_append(struct sk_buff *skb, int attrlen, const void *data) |
443 | { | 443 | { |
444 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) | 444 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) |
445 | return -1; | 445 | return -EMSGSIZE; |
446 | 446 | ||
447 | memcpy(skb_put(skb, attrlen), data, attrlen); | 447 | memcpy(skb_put(skb, attrlen), data, attrlen); |
448 | return 0; | 448 | return 0; |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index d16929c9b4bc..f5aa23c3e886 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -554,7 +554,8 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, | |||
554 | return genlmsg_end(skb, hdr); | 554 | return genlmsg_end(skb, hdr); |
555 | 555 | ||
556 | nla_put_failure: | 556 | nla_put_failure: |
557 | return genlmsg_cancel(skb, hdr); | 557 | genlmsg_cancel(skb, hdr); |
558 | return -EMSGSIZE; | ||
558 | } | 559 | } |
559 | 560 | ||
560 | static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, | 561 | static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, |
@@ -590,7 +591,8 @@ static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, | |||
590 | return genlmsg_end(skb, hdr); | 591 | return genlmsg_end(skb, hdr); |
591 | 592 | ||
592 | nla_put_failure: | 593 | nla_put_failure: |
593 | return genlmsg_cancel(skb, hdr); | 594 | genlmsg_cancel(skb, hdr); |
595 | return -EMSGSIZE; | ||
594 | } | 596 | } |
595 | 597 | ||
596 | static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) | 598 | static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 1086df7478bc..9360fc81e8c7 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -220,7 +220,7 @@ replay: | |||
220 | tp = kzalloc(sizeof(*tp), GFP_KERNEL); | 220 | tp = kzalloc(sizeof(*tp), GFP_KERNEL); |
221 | if (tp == NULL) | 221 | if (tp == NULL) |
222 | goto errout; | 222 | goto errout; |
223 | err = -EINVAL; | 223 | err = -ENOENT; |
224 | tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); | 224 | tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); |
225 | if (tp_ops == NULL) { | 225 | if (tp_ops == NULL) { |
226 | #ifdef CONFIG_KMOD | 226 | #ifdef CONFIG_KMOD |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 0df911fd67b1..64465bacbe79 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -444,7 +444,8 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl, | |||
444 | return nla_nest_end(skb, opts); | 444 | return nla_nest_end(skb, opts); |
445 | 445 | ||
446 | nla_put_failure: | 446 | nla_put_failure: |
447 | return nla_nest_cancel(skb, opts); | 447 | nla_nest_cancel(skb, opts); |
448 | return -EMSGSIZE; | ||
448 | } | 449 | } |
449 | 450 | ||
450 | static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) | 451 | static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) |
@@ -466,7 +467,8 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
466 | return nla_nest_end(skb, opts); | 467 | return nla_nest_end(skb, opts); |
467 | 468 | ||
468 | nla_put_failure: | 469 | nla_put_failure: |
469 | return nla_nest_cancel(skb, opts); | 470 | nla_nest_cancel(skb, opts); |
471 | return -EMSGSIZE; | ||
470 | } | 472 | } |
471 | 473 | ||
472 | static const struct Qdisc_class_ops dsmark_class_ops = { | 474 | static const struct Qdisc_class_ops dsmark_class_ops = { |
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 3a9d226ff1e4..c89fba56db56 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -582,7 +582,8 @@ append_opt: | |||
582 | return nla_nest_end(skb, opts); | 582 | return nla_nest_end(skb, opts); |
583 | 583 | ||
584 | nla_put_failure: | 584 | nla_put_failure: |
585 | return nla_nest_cancel(skb, opts); | 585 | nla_nest_cancel(skb, opts); |
586 | return -EMSGSIZE; | ||
586 | } | 587 | } |
587 | 588 | ||
588 | static void gred_destroy(struct Qdisc *sch) | 589 | static void gred_destroy(struct Qdisc *sch) |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 87293d0db1d7..fdfaa3fcc16d 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1360,7 +1360,7 @@ hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, | |||
1360 | 1360 | ||
1361 | nla_put_failure: | 1361 | nla_put_failure: |
1362 | nla_nest_cancel(skb, nest); | 1362 | nla_nest_cancel(skb, nest); |
1363 | return -1; | 1363 | return -EMSGSIZE; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static int | 1366 | static int |
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 3dcd493f4f4a..5c569853b9c0 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -281,7 +281,8 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
281 | return nla_nest_end(skb, opts); | 281 | return nla_nest_end(skb, opts); |
282 | 282 | ||
283 | nla_put_failure: | 283 | nla_put_failure: |
284 | return nla_nest_cancel(skb, opts); | 284 | nla_nest_cancel(skb, opts); |
285 | return -EMSGSIZE; | ||
285 | } | 286 | } |
286 | 287 | ||
287 | static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) | 288 | static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index b4cd2b71953f..532634861db1 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1203,6 +1203,9 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1203 | struct list_head *head = &asoc->peer.transport_addr_list; | 1203 | struct list_head *head = &asoc->peer.transport_addr_list; |
1204 | struct list_head *pos; | 1204 | struct list_head *pos; |
1205 | 1205 | ||
1206 | if (asoc->peer.transport_count == 1) | ||
1207 | return; | ||
1208 | |||
1206 | /* Find the next transport in a round-robin fashion. */ | 1209 | /* Find the next transport in a round-robin fashion. */ |
1207 | t = asoc->peer.retran_path; | 1210 | t = asoc->peer.retran_path; |
1208 | pos = &t->transports; | 1211 | pos = &t->transports; |
@@ -1217,6 +1220,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1217 | 1220 | ||
1218 | t = list_entry(pos, struct sctp_transport, transports); | 1221 | t = list_entry(pos, struct sctp_transport, transports); |
1219 | 1222 | ||
1223 | /* We have exhausted the list, but didn't find any | ||
1224 | * other active transports. If so, use the next | ||
1225 | * transport. | ||
1226 | */ | ||
1227 | if (t == asoc->peer.retran_path) { | ||
1228 | t = next; | ||
1229 | break; | ||
1230 | } | ||
1231 | |||
1220 | /* Try to find an active transport. */ | 1232 | /* Try to find an active transport. */ |
1221 | 1233 | ||
1222 | if ((t->state == SCTP_ACTIVE) || | 1234 | if ((t->state == SCTP_ACTIVE) || |
@@ -1229,15 +1241,6 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc) | |||
1229 | if (!next) | 1241 | if (!next) |
1230 | next = t; | 1242 | next = t; |
1231 | } | 1243 | } |
1232 | |||
1233 | /* We have exhausted the list, but didn't find any | ||
1234 | * other active transports. If so, use the next | ||
1235 | * transport. | ||
1236 | */ | ||
1237 | if (t == asoc->peer.retran_path) { | ||
1238 | t = next; | ||
1239 | break; | ||
1240 | } | ||
1241 | } | 1244 | } |
1242 | 1245 | ||
1243 | asoc->peer.retran_path = t; | 1246 | asoc->peer.retran_path = t; |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index e45e44c60635..a2f4d4d51593 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -299,7 +299,8 @@ static inline int sctp_v6_addr_match_len(union sctp_addr *s1, | |||
299 | /* Fills in the source address(saddr) based on the destination address(daddr) | 299 | /* Fills in the source address(saddr) based on the destination address(daddr) |
300 | * and asoc's bind address list. | 300 | * and asoc's bind address list. |
301 | */ | 301 | */ |
302 | static void sctp_v6_get_saddr(struct sctp_association *asoc, | 302 | static void sctp_v6_get_saddr(struct sctp_sock *sk, |
303 | struct sctp_association *asoc, | ||
303 | struct dst_entry *dst, | 304 | struct dst_entry *dst, |
304 | union sctp_addr *daddr, | 305 | union sctp_addr *daddr, |
305 | union sctp_addr *saddr) | 306 | union sctp_addr *saddr) |
@@ -318,7 +319,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc, | |||
318 | if (!asoc) { | 319 | if (!asoc) { |
319 | ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, | 320 | ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, |
320 | &daddr->v6.sin6_addr, | 321 | &daddr->v6.sin6_addr, |
321 | inet6_sk(asoc->base.sk)->srcprefs, | 322 | inet6_sk(&sk->inet.sk)->srcprefs, |
322 | &saddr->v6.sin6_addr); | 323 | &saddr->v6.sin6_addr); |
323 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", | 324 | SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", |
324 | NIP6(saddr->v6.sin6_addr)); | 325 | NIP6(saddr->v6.sin6_addr)); |
@@ -726,6 +727,11 @@ static void sctp_v6_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) | |||
726 | seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr)); | 727 | seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr)); |
727 | } | 728 | } |
728 | 729 | ||
730 | static void sctp_v6_ecn_capable(struct sock *sk) | ||
731 | { | ||
732 | inet6_sk(sk)->tclass |= INET_ECN_ECT_0; | ||
733 | } | ||
734 | |||
729 | /* Initialize a PF_INET6 socket msg_name. */ | 735 | /* Initialize a PF_INET6 socket msg_name. */ |
730 | static void sctp_inet6_msgname(char *msgname, int *addr_len) | 736 | static void sctp_inet6_msgname(char *msgname, int *addr_len) |
731 | { | 737 | { |
@@ -996,6 +1002,7 @@ static struct sctp_af sctp_af_inet6 = { | |||
996 | .skb_iif = sctp_v6_skb_iif, | 1002 | .skb_iif = sctp_v6_skb_iif, |
997 | .is_ce = sctp_v6_is_ce, | 1003 | .is_ce = sctp_v6_is_ce, |
998 | .seq_dump_addr = sctp_v6_seq_dump_addr, | 1004 | .seq_dump_addr = sctp_v6_seq_dump_addr, |
1005 | .ecn_capable = sctp_v6_ecn_capable, | ||
999 | .net_header_len = sizeof(struct ipv6hdr), | 1006 | .net_header_len = sizeof(struct ipv6hdr), |
1000 | .sockaddr_len = sizeof(struct sockaddr_in6), | 1007 | .sockaddr_len = sizeof(struct sockaddr_in6), |
1001 | #ifdef CONFIG_COMPAT | 1008 | #ifdef CONFIG_COMPAT |
diff --git a/net/sctp/output.c b/net/sctp/output.c index cf4f9fb6819d..6d45bae93b46 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -548,7 +548,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
548 | * Note: The works for IPv6 layer checks this bit too later | 548 | * Note: The works for IPv6 layer checks this bit too later |
549 | * in transmission. See IP6_ECN_flow_xmit(). | 549 | * in transmission. See IP6_ECN_flow_xmit(). |
550 | */ | 550 | */ |
551 | INET_ECN_xmit(nskb->sk); | 551 | (*tp->af_specific->ecn_capable)(nskb->sk); |
552 | 552 | ||
553 | /* Set up the IP options. */ | 553 | /* Set up the IP options. */ |
554 | /* BUG: not implemented | 554 | /* BUG: not implemented |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 59edfd25a19c..ace6770e9048 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -208,6 +208,7 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q) | |||
208 | INIT_LIST_HEAD(&q->sacked); | 208 | INIT_LIST_HEAD(&q->sacked); |
209 | INIT_LIST_HEAD(&q->abandoned); | 209 | INIT_LIST_HEAD(&q->abandoned); |
210 | 210 | ||
211 | q->fast_rtx = 0; | ||
211 | q->outstanding_bytes = 0; | 212 | q->outstanding_bytes = 0; |
212 | q->empty = 1; | 213 | q->empty = 1; |
213 | q->cork = 0; | 214 | q->cork = 0; |
@@ -500,6 +501,7 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, | |||
500 | case SCTP_RTXR_FAST_RTX: | 501 | case SCTP_RTXR_FAST_RTX: |
501 | SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS); | 502 | SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS); |
502 | sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX); | 503 | sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX); |
504 | q->fast_rtx = 1; | ||
503 | break; | 505 | break; |
504 | case SCTP_RTXR_PMTUD: | 506 | case SCTP_RTXR_PMTUD: |
505 | SCTP_INC_STATS(SCTP_MIB_PMTUD_RETRANSMITS); | 507 | SCTP_INC_STATS(SCTP_MIB_PMTUD_RETRANSMITS); |
@@ -518,9 +520,15 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport, | |||
518 | * the sender SHOULD try to advance the "Advanced.Peer.Ack.Point" by | 520 | * the sender SHOULD try to advance the "Advanced.Peer.Ack.Point" by |
519 | * following the procedures outlined in C1 - C5. | 521 | * following the procedures outlined in C1 - C5. |
520 | */ | 522 | */ |
521 | sctp_generate_fwdtsn(q, q->asoc->ctsn_ack_point); | 523 | if (reason == SCTP_RTXR_T3_RTX) |
524 | sctp_generate_fwdtsn(q, q->asoc->ctsn_ack_point); | ||
522 | 525 | ||
523 | error = sctp_outq_flush(q, /* rtx_timeout */ 1); | 526 | /* Flush the queues only on timeout, since fast_rtx is only |
527 | * triggered during sack processing and the queue | ||
528 | * will be flushed at the end. | ||
529 | */ | ||
530 | if (reason != SCTP_RTXR_FAST_RTX) | ||
531 | error = sctp_outq_flush(q, /* rtx_timeout */ 1); | ||
524 | 532 | ||
525 | if (error) | 533 | if (error) |
526 | q->asoc->base.sk->sk_err = -error; | 534 | q->asoc->base.sk->sk_err = -error; |
@@ -538,17 +546,23 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
538 | int rtx_timeout, int *start_timer) | 546 | int rtx_timeout, int *start_timer) |
539 | { | 547 | { |
540 | struct list_head *lqueue; | 548 | struct list_head *lqueue; |
541 | struct list_head *lchunk; | ||
542 | struct sctp_transport *transport = pkt->transport; | 549 | struct sctp_transport *transport = pkt->transport; |
543 | sctp_xmit_t status; | 550 | sctp_xmit_t status; |
544 | struct sctp_chunk *chunk, *chunk1; | 551 | struct sctp_chunk *chunk, *chunk1; |
545 | struct sctp_association *asoc; | 552 | struct sctp_association *asoc; |
553 | int fast_rtx; | ||
546 | int error = 0; | 554 | int error = 0; |
555 | int timer = 0; | ||
556 | int done = 0; | ||
547 | 557 | ||
548 | asoc = q->asoc; | 558 | asoc = q->asoc; |
549 | lqueue = &q->retransmit; | 559 | lqueue = &q->retransmit; |
560 | fast_rtx = q->fast_rtx; | ||
550 | 561 | ||
551 | /* RFC 2960 6.3.3 Handle T3-rtx Expiration | 562 | /* This loop handles time-out retransmissions, fast retransmissions, |
563 | * and retransmissions due to opening of whindow. | ||
564 | * | ||
565 | * RFC 2960 6.3.3 Handle T3-rtx Expiration | ||
552 | * | 566 | * |
553 | * E3) Determine how many of the earliest (i.e., lowest TSN) | 567 | * E3) Determine how many of the earliest (i.e., lowest TSN) |
554 | * outstanding DATA chunks for the address for which the | 568 | * outstanding DATA chunks for the address for which the |
@@ -563,12 +577,12 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
563 | * [Just to be painfully clear, if we are retransmitting | 577 | * [Just to be painfully clear, if we are retransmitting |
564 | * because a timeout just happened, we should send only ONE | 578 | * because a timeout just happened, we should send only ONE |
565 | * packet of retransmitted data.] | 579 | * packet of retransmitted data.] |
580 | * | ||
581 | * For fast retransmissions we also send only ONE packet. However, | ||
582 | * if we are just flushing the queue due to open window, we'll | ||
583 | * try to send as much as possible. | ||
566 | */ | 584 | */ |
567 | lchunk = sctp_list_dequeue(lqueue); | 585 | list_for_each_entry_safe(chunk, chunk1, lqueue, transmitted_list) { |
568 | |||
569 | while (lchunk) { | ||
570 | chunk = list_entry(lchunk, struct sctp_chunk, | ||
571 | transmitted_list); | ||
572 | 586 | ||
573 | /* Make sure that Gap Acked TSNs are not retransmitted. A | 587 | /* Make sure that Gap Acked TSNs are not retransmitted. A |
574 | * simple approach is just to move such TSNs out of the | 588 | * simple approach is just to move such TSNs out of the |
@@ -576,58 +590,60 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
576 | * next chunk. | 590 | * next chunk. |
577 | */ | 591 | */ |
578 | if (chunk->tsn_gap_acked) { | 592 | if (chunk->tsn_gap_acked) { |
579 | list_add_tail(lchunk, &transport->transmitted); | 593 | list_del(&chunk->transmitted_list); |
580 | lchunk = sctp_list_dequeue(lqueue); | 594 | list_add_tail(&chunk->transmitted_list, |
595 | &transport->transmitted); | ||
581 | continue; | 596 | continue; |
582 | } | 597 | } |
583 | 598 | ||
599 | /* If we are doing fast retransmit, ignore non-fast_rtransmit | ||
600 | * chunks | ||
601 | */ | ||
602 | if (fast_rtx && !chunk->fast_retransmit) | ||
603 | continue; | ||
604 | |||
584 | /* Attempt to append this chunk to the packet. */ | 605 | /* Attempt to append this chunk to the packet. */ |
585 | status = sctp_packet_append_chunk(pkt, chunk); | 606 | status = sctp_packet_append_chunk(pkt, chunk); |
586 | 607 | ||
587 | switch (status) { | 608 | switch (status) { |
588 | case SCTP_XMIT_PMTU_FULL: | 609 | case SCTP_XMIT_PMTU_FULL: |
589 | /* Send this packet. */ | 610 | /* Send this packet. */ |
590 | if ((error = sctp_packet_transmit(pkt)) == 0) | 611 | error = sctp_packet_transmit(pkt); |
591 | *start_timer = 1; | ||
592 | 612 | ||
593 | /* If we are retransmitting, we should only | 613 | /* If we are retransmitting, we should only |
594 | * send a single packet. | 614 | * send a single packet. |
595 | */ | 615 | */ |
596 | if (rtx_timeout) { | 616 | if (rtx_timeout || fast_rtx) |
597 | list_add(lchunk, lqueue); | 617 | done = 1; |
598 | lchunk = NULL; | ||
599 | } | ||
600 | 618 | ||
601 | /* Bundle lchunk in the next round. */ | 619 | /* Bundle next chunk in the next round. */ |
602 | break; | 620 | break; |
603 | 621 | ||
604 | case SCTP_XMIT_RWND_FULL: | 622 | case SCTP_XMIT_RWND_FULL: |
605 | /* Send this packet. */ | 623 | /* Send this packet. */ |
606 | if ((error = sctp_packet_transmit(pkt)) == 0) | 624 | error = sctp_packet_transmit(pkt); |
607 | *start_timer = 1; | ||
608 | 625 | ||
609 | /* Stop sending DATA as there is no more room | 626 | /* Stop sending DATA as there is no more room |
610 | * at the receiver. | 627 | * at the receiver. |
611 | */ | 628 | */ |
612 | list_add(lchunk, lqueue); | 629 | done = 1; |
613 | lchunk = NULL; | ||
614 | break; | 630 | break; |
615 | 631 | ||
616 | case SCTP_XMIT_NAGLE_DELAY: | 632 | case SCTP_XMIT_NAGLE_DELAY: |
617 | /* Send this packet. */ | 633 | /* Send this packet. */ |
618 | if ((error = sctp_packet_transmit(pkt)) == 0) | 634 | error = sctp_packet_transmit(pkt); |
619 | *start_timer = 1; | ||
620 | 635 | ||
621 | /* Stop sending DATA because of nagle delay. */ | 636 | /* Stop sending DATA because of nagle delay. */ |
622 | list_add(lchunk, lqueue); | 637 | done = 1; |
623 | lchunk = NULL; | ||
624 | break; | 638 | break; |
625 | 639 | ||
626 | default: | 640 | default: |
627 | /* The append was successful, so add this chunk to | 641 | /* The append was successful, so add this chunk to |
628 | * the transmitted list. | 642 | * the transmitted list. |
629 | */ | 643 | */ |
630 | list_add_tail(lchunk, &transport->transmitted); | 644 | list_del(&chunk->transmitted_list); |
645 | list_add_tail(&chunk->transmitted_list, | ||
646 | &transport->transmitted); | ||
631 | 647 | ||
632 | /* Mark the chunk as ineligible for fast retransmit | 648 | /* Mark the chunk as ineligible for fast retransmit |
633 | * after it is retransmitted. | 649 | * after it is retransmitted. |
@@ -635,27 +651,44 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt, | |||
635 | if (chunk->fast_retransmit > 0) | 651 | if (chunk->fast_retransmit > 0) |
636 | chunk->fast_retransmit = -1; | 652 | chunk->fast_retransmit = -1; |
637 | 653 | ||
638 | *start_timer = 1; | 654 | /* Force start T3-rtx timer when fast retransmitting |
639 | q->empty = 0; | 655 | * the earliest outstanding TSN |
656 | */ | ||
657 | if (!timer && fast_rtx && | ||
658 | ntohl(chunk->subh.data_hdr->tsn) == | ||
659 | asoc->ctsn_ack_point + 1) | ||
660 | timer = 2; | ||
640 | 661 | ||
641 | /* Retrieve a new chunk to bundle. */ | 662 | q->empty = 0; |
642 | lchunk = sctp_list_dequeue(lqueue); | ||
643 | break; | 663 | break; |
644 | } | 664 | } |
645 | 665 | ||
646 | /* If we are here due to a retransmit timeout or a fast | 666 | /* Set the timer if there were no errors */ |
647 | * retransmit and if there are any chunks left in the retransmit | 667 | if (!error && !timer) |
648 | * queue that could not fit in the PMTU sized packet, they need | 668 | timer = 1; |
649 | * to be marked as ineligible for a subsequent fast retransmit. | 669 | |
650 | */ | 670 | if (done) |
651 | if (rtx_timeout && !lchunk) { | 671 | break; |
652 | list_for_each_entry(chunk1, lqueue, transmitted_list) { | 672 | } |
653 | if (chunk1->fast_retransmit > 0) | 673 | |
654 | chunk1->fast_retransmit = -1; | 674 | /* If we are here due to a retransmit timeout or a fast |
655 | } | 675 | * retransmit and if there are any chunks left in the retransmit |
676 | * queue that could not fit in the PMTU sized packet, they need | ||
677 | * to be marked as ineligible for a subsequent fast retransmit. | ||
678 | */ | ||
679 | if (rtx_timeout || fast_rtx) { | ||
680 | list_for_each_entry(chunk1, lqueue, transmitted_list) { | ||
681 | if (chunk1->fast_retransmit > 0) | ||
682 | chunk1->fast_retransmit = -1; | ||
656 | } | 683 | } |
657 | } | 684 | } |
658 | 685 | ||
686 | *start_timer = timer; | ||
687 | |||
688 | /* Clear fast retransmit hint */ | ||
689 | if (fast_rtx) | ||
690 | q->fast_rtx = 0; | ||
691 | |||
659 | return error; | 692 | return error; |
660 | } | 693 | } |
661 | 694 | ||
@@ -862,7 +895,8 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
862 | rtx_timeout, &start_timer); | 895 | rtx_timeout, &start_timer); |
863 | 896 | ||
864 | if (start_timer) | 897 | if (start_timer) |
865 | sctp_transport_reset_timers(transport); | 898 | sctp_transport_reset_timers(transport, |
899 | start_timer-1); | ||
866 | 900 | ||
867 | /* This can happen on COOKIE-ECHO resend. Only | 901 | /* This can happen on COOKIE-ECHO resend. Only |
868 | * one chunk can get bundled with a COOKIE-ECHO. | 902 | * one chunk can get bundled with a COOKIE-ECHO. |
@@ -977,7 +1011,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
977 | list_add_tail(&chunk->transmitted_list, | 1011 | list_add_tail(&chunk->transmitted_list, |
978 | &transport->transmitted); | 1012 | &transport->transmitted); |
979 | 1013 | ||
980 | sctp_transport_reset_timers(transport); | 1014 | sctp_transport_reset_timers(transport, start_timer-1); |
981 | 1015 | ||
982 | q->empty = 0; | 1016 | q->empty = 0; |
983 | 1017 | ||
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 0ec234b762c2..b435a193c5df 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -470,11 +470,11 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | |||
470 | /* Walk through the bind address list and look for a bind | 470 | /* Walk through the bind address list and look for a bind |
471 | * address that matches the source address of the returned dst. | 471 | * address that matches the source address of the returned dst. |
472 | */ | 472 | */ |
473 | sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port)); | ||
473 | rcu_read_lock(); | 474 | rcu_read_lock(); |
474 | list_for_each_entry_rcu(laddr, &bp->address_list, list) { | 475 | list_for_each_entry_rcu(laddr, &bp->address_list, list) { |
475 | if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC)) | 476 | if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC)) |
476 | continue; | 477 | continue; |
477 | sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port)); | ||
478 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) | 478 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) |
479 | goto out_unlock; | 479 | goto out_unlock; |
480 | } | 480 | } |
@@ -519,7 +519,8 @@ out: | |||
519 | /* For v4, the source address is cached in the route entry(dst). So no need | 519 | /* For v4, the source address is cached in the route entry(dst). So no need |
520 | * to cache it separately and hence this is an empty routine. | 520 | * to cache it separately and hence this is an empty routine. |
521 | */ | 521 | */ |
522 | static void sctp_v4_get_saddr(struct sctp_association *asoc, | 522 | static void sctp_v4_get_saddr(struct sctp_sock *sk, |
523 | struct sctp_association *asoc, | ||
523 | struct dst_entry *dst, | 524 | struct dst_entry *dst, |
524 | union sctp_addr *daddr, | 525 | union sctp_addr *daddr, |
525 | union sctp_addr *saddr) | 526 | union sctp_addr *saddr) |
@@ -616,6 +617,11 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) | |||
616 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); | 617 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); |
617 | } | 618 | } |
618 | 619 | ||
620 | static void sctp_v4_ecn_capable(struct sock *sk) | ||
621 | { | ||
622 | INET_ECN_xmit(sk); | ||
623 | } | ||
624 | |||
619 | /* Event handler for inet address addition/deletion events. | 625 | /* Event handler for inet address addition/deletion events. |
620 | * The sctp_local_addr_list needs to be protocted by a spin lock since | 626 | * The sctp_local_addr_list needs to be protocted by a spin lock since |
621 | * multiple notifiers (say IPv4 and IPv6) may be running at the same | 627 | * multiple notifiers (say IPv4 and IPv6) may be running at the same |
@@ -934,6 +940,7 @@ static struct sctp_af sctp_af_inet = { | |||
934 | .skb_iif = sctp_v4_skb_iif, | 940 | .skb_iif = sctp_v4_skb_iif, |
935 | .is_ce = sctp_v4_is_ce, | 941 | .is_ce = sctp_v4_is_ce, |
936 | .seq_dump_addr = sctp_v4_seq_dump_addr, | 942 | .seq_dump_addr = sctp_v4_seq_dump_addr, |
943 | .ecn_capable = sctp_v4_ecn_capable, | ||
937 | .net_header_len = sizeof(struct iphdr), | 944 | .net_header_len = sizeof(struct iphdr), |
938 | .sockaddr_len = sizeof(struct sockaddr_in), | 945 | .sockaddr_len = sizeof(struct sockaddr_in), |
939 | #ifdef CONFIG_COMPAT | 946 | #ifdef CONFIG_COMPAT |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index f4938f6c5abe..3f34f61221ec 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -79,6 +79,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
79 | peer->rttvar = 0; | 79 | peer->rttvar = 0; |
80 | peer->srtt = 0; | 80 | peer->srtt = 0; |
81 | peer->rto_pending = 0; | 81 | peer->rto_pending = 0; |
82 | peer->fast_recovery = 0; | ||
82 | 83 | ||
83 | peer->last_time_heard = jiffies; | 84 | peer->last_time_heard = jiffies; |
84 | peer->last_time_used = jiffies; | 85 | peer->last_time_used = jiffies; |
@@ -190,7 +191,7 @@ static void sctp_transport_destroy(struct sctp_transport *transport) | |||
190 | /* Start T3_rtx timer if it is not already running and update the heartbeat | 191 | /* Start T3_rtx timer if it is not already running and update the heartbeat |
191 | * timer. This routine is called every time a DATA chunk is sent. | 192 | * timer. This routine is called every time a DATA chunk is sent. |
192 | */ | 193 | */ |
193 | void sctp_transport_reset_timers(struct sctp_transport *transport) | 194 | void sctp_transport_reset_timers(struct sctp_transport *transport, int force) |
194 | { | 195 | { |
195 | /* RFC 2960 6.3.2 Retransmission Timer Rules | 196 | /* RFC 2960 6.3.2 Retransmission Timer Rules |
196 | * | 197 | * |
@@ -200,7 +201,7 @@ void sctp_transport_reset_timers(struct sctp_transport *transport) | |||
200 | * address. | 201 | * address. |
201 | */ | 202 | */ |
202 | 203 | ||
203 | if (!timer_pending(&transport->T3_rtx_timer)) | 204 | if (force || !timer_pending(&transport->T3_rtx_timer)) |
204 | if (!mod_timer(&transport->T3_rtx_timer, | 205 | if (!mod_timer(&transport->T3_rtx_timer, |
205 | jiffies + transport->rto)) | 206 | jiffies + transport->rto)) |
206 | sctp_transport_hold(transport); | 207 | sctp_transport_hold(transport); |
@@ -291,7 +292,7 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
291 | if (saddr) | 292 | if (saddr) |
292 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); | 293 | memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); |
293 | else | 294 | else |
294 | af->get_saddr(asoc, dst, daddr, &transport->saddr); | 295 | af->get_saddr(opt, asoc, dst, daddr, &transport->saddr); |
295 | 296 | ||
296 | transport->dst = dst; | 297 | transport->dst = dst; |
297 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { | 298 | if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { |
@@ -403,11 +404,16 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport, | |||
403 | cwnd = transport->cwnd; | 404 | cwnd = transport->cwnd; |
404 | flight_size = transport->flight_size; | 405 | flight_size = transport->flight_size; |
405 | 406 | ||
407 | /* See if we need to exit Fast Recovery first */ | ||
408 | if (transport->fast_recovery && | ||
409 | TSN_lte(transport->fast_recovery_exit, sack_ctsn)) | ||
410 | transport->fast_recovery = 0; | ||
411 | |||
406 | /* The appropriate cwnd increase algorithm is performed if, and only | 412 | /* The appropriate cwnd increase algorithm is performed if, and only |
407 | * if the cumulative TSN has advanced and the congestion window is | 413 | * if the cumulative TSN whould advanced and the congestion window is |
408 | * being fully utilized. | 414 | * being fully utilized. |
409 | */ | 415 | */ |
410 | if ((transport->asoc->ctsn_ack_point >= sack_ctsn) || | 416 | if (TSN_lte(sack_ctsn, transport->asoc->ctsn_ack_point) || |
411 | (flight_size < cwnd)) | 417 | (flight_size < cwnd)) |
412 | return; | 418 | return; |
413 | 419 | ||
@@ -416,17 +422,23 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport, | |||
416 | pmtu = transport->asoc->pathmtu; | 422 | pmtu = transport->asoc->pathmtu; |
417 | 423 | ||
418 | if (cwnd <= ssthresh) { | 424 | if (cwnd <= ssthresh) { |
419 | /* RFC 2960 7.2.1, sctpimpguide-05 2.14.2 When cwnd is less | 425 | /* RFC 4960 7.2.1 |
420 | * than or equal to ssthresh an SCTP endpoint MUST use the | 426 | * o When cwnd is less than or equal to ssthresh, an SCTP |
421 | * slow start algorithm to increase cwnd only if the current | 427 | * endpoint MUST use the slow-start algorithm to increase |
422 | * congestion window is being fully utilized and an incoming | 428 | * cwnd only if the current congestion window is being fully |
423 | * SACK advances the Cumulative TSN Ack Point. Only when these | 429 | * utilized, an incoming SACK advances the Cumulative TSN |
424 | * two conditions are met can the cwnd be increased otherwise | 430 | * Ack Point, and the data sender is not in Fast Recovery. |
425 | * the cwnd MUST not be increased. If these conditions are met | 431 | * Only when these three conditions are met can the cwnd be |
426 | * then cwnd MUST be increased by at most the lesser of | 432 | * increased; otherwise, the cwnd MUST not be increased. |
427 | * 1) the total size of the previously outstanding DATA | 433 | * If these conditions are met, then cwnd MUST be increased |
428 | * chunk(s) acknowledged, and 2) the destination's path MTU. | 434 | * by, at most, the lesser of 1) the total size of the |
435 | * previously outstanding DATA chunk(s) acknowledged, and | ||
436 | * 2) the destination's path MTU. This upper bound protects | ||
437 | * against the ACK-Splitting attack outlined in [SAVAGE99]. | ||
429 | */ | 438 | */ |
439 | if (transport->fast_recovery) | ||
440 | return; | ||
441 | |||
430 | if (bytes_acked > pmtu) | 442 | if (bytes_acked > pmtu) |
431 | cwnd += pmtu; | 443 | cwnd += pmtu; |
432 | else | 444 | else |
@@ -502,6 +514,13 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport, | |||
502 | * cwnd = ssthresh | 514 | * cwnd = ssthresh |
503 | * partial_bytes_acked = 0 | 515 | * partial_bytes_acked = 0 |
504 | */ | 516 | */ |
517 | if (transport->fast_recovery) | ||
518 | return; | ||
519 | |||
520 | /* Mark Fast recovery */ | ||
521 | transport->fast_recovery = 1; | ||
522 | transport->fast_recovery_exit = transport->asoc->next_tsn - 1; | ||
523 | |||
505 | transport->ssthresh = max(transport->cwnd/2, | 524 | transport->ssthresh = max(transport->cwnd/2, |
506 | 4*transport->asoc->pathmtu); | 525 | 4*transport->asoc->pathmtu); |
507 | transport->cwnd = transport->ssthresh; | 526 | transport->cwnd = transport->ssthresh; |
@@ -586,6 +605,7 @@ void sctp_transport_reset(struct sctp_transport *t) | |||
586 | t->flight_size = 0; | 605 | t->flight_size = 0; |
587 | t->error_count = 0; | 606 | t->error_count = 0; |
588 | t->rto_pending = 0; | 607 | t->rto_pending = 0; |
608 | t->fast_recovery = 0; | ||
589 | 609 | ||
590 | /* Initialize the state information for SFR-CACC */ | 610 | /* Initialize the state information for SFR-CACC */ |
591 | t->cacc.changeover_active = 0; | 611 | t->cacc.changeover_active = 0; |
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c index d927d9f57412..744b79fdcb19 100644 --- a/net/sunrpc/auth_generic.c +++ b/net/sunrpc/auth_generic.c | |||
@@ -17,8 +17,8 @@ | |||
17 | # define RPCDBG_FACILITY RPCDBG_AUTH | 17 | # define RPCDBG_FACILITY RPCDBG_AUTH |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define RPC_ANONYMOUS_USERID ((uid_t)-2) | 20 | #define RPC_MACHINE_CRED_USERID ((uid_t)0) |
21 | #define RPC_ANONYMOUS_GROUPID ((gid_t)-2) | 21 | #define RPC_MACHINE_CRED_GROUPID ((gid_t)0) |
22 | 22 | ||
23 | struct generic_cred { | 23 | struct generic_cred { |
24 | struct rpc_cred gc_base; | 24 | struct rpc_cred gc_base; |
@@ -44,8 +44,8 @@ EXPORT_SYMBOL_GPL(rpc_lookup_cred); | |||
44 | struct rpc_cred *rpc_lookup_machine_cred(void) | 44 | struct rpc_cred *rpc_lookup_machine_cred(void) |
45 | { | 45 | { |
46 | struct auth_cred acred = { | 46 | struct auth_cred acred = { |
47 | .uid = RPC_ANONYMOUS_USERID, | 47 | .uid = RPC_MACHINE_CRED_USERID, |
48 | .gid = RPC_ANONYMOUS_GROUPID, | 48 | .gid = RPC_MACHINE_CRED_GROUPID, |
49 | .machine_cred = 1, | 49 | .machine_cred = 1, |
50 | }; | 50 | }; |
51 | 51 | ||
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index d8e8d79a8451..e46c825f4954 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -6,30 +6,9 @@ | |||
6 | 6 | ||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/fcntl.h> | ||
10 | #include <linux/net.h> | ||
11 | #include <linux/in.h> | ||
12 | #include <linux/inet.h> | ||
13 | #include <linux/udp.h> | ||
14 | #include <linux/tcp.h> | ||
15 | #include <linux/unistd.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/netdevice.h> | ||
18 | #include <linux/skbuff.h> | ||
19 | #include <linux/file.h> | ||
20 | #include <linux/freezer.h> | 9 | #include <linux/freezer.h> |
21 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
22 | #include <net/sock.h> | 11 | #include <net/sock.h> |
23 | #include <net/checksum.h> | ||
24 | #include <net/ip.h> | ||
25 | #include <net/ipv6.h> | ||
26 | #include <net/tcp_states.h> | ||
27 | #include <linux/uaccess.h> | ||
28 | #include <asm/ioctls.h> | ||
29 | |||
30 | #include <linux/sunrpc/types.h> | ||
31 | #include <linux/sunrpc/clnt.h> | ||
32 | #include <linux/sunrpc/xdr.h> | ||
33 | #include <linux/sunrpc/stats.h> | 12 | #include <linux/sunrpc/stats.h> |
34 | #include <linux/sunrpc/svc_xprt.h> | 13 | #include <linux/sunrpc/svc_xprt.h> |
35 | 14 | ||
@@ -296,8 +275,6 @@ void svc_xprt_enqueue(struct svc_xprt *xprt) | |||
296 | if (!(xprt->xpt_flags & | 275 | if (!(xprt->xpt_flags & |
297 | ((1<<XPT_CONN)|(1<<XPT_DATA)|(1<<XPT_CLOSE)|(1<<XPT_DEFERRED)))) | 276 | ((1<<XPT_CONN)|(1<<XPT_DATA)|(1<<XPT_CLOSE)|(1<<XPT_DEFERRED)))) |
298 | return; | 277 | return; |
299 | if (test_bit(XPT_DEAD, &xprt->xpt_flags)) | ||
300 | return; | ||
301 | 278 | ||
302 | cpu = get_cpu(); | 279 | cpu = get_cpu(); |
303 | pool = svc_pool_for_cpu(xprt->xpt_server, cpu); | 280 | pool = svc_pool_for_cpu(xprt->xpt_server, cpu); |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 3f30ee6006ae..f24800f2c098 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -278,7 +278,7 @@ static int ip_map_show(struct seq_file *m, | |||
278 | dom = im->m_client->h.name; | 278 | dom = im->m_client->h.name; |
279 | 279 | ||
280 | if (ipv6_addr_v4mapped(&addr)) { | 280 | if (ipv6_addr_v4mapped(&addr)) { |
281 | seq_printf(m, "%s" NIPQUAD_FMT "%s\n", | 281 | seq_printf(m, "%s " NIPQUAD_FMT " %s\n", |
282 | im->m_class, | 282 | im->m_class, |
283 | ntohl(addr.s6_addr32[3]) >> 24 & 0xff, | 283 | ntohl(addr.s6_addr32[3]) >> 24 & 0xff, |
284 | ntohl(addr.s6_addr32[3]) >> 16 & 0xff, | 284 | ntohl(addr.s6_addr32[3]) >> 16 & 0xff, |
@@ -286,7 +286,7 @@ static int ip_map_show(struct seq_file *m, | |||
286 | ntohl(addr.s6_addr32[3]) >> 0 & 0xff, | 286 | ntohl(addr.s6_addr32[3]) >> 0 & 0xff, |
287 | dom); | 287 | dom); |
288 | } else { | 288 | } else { |
289 | seq_printf(m, "%s" NIP6_FMT "%s\n", | 289 | seq_printf(m, "%s " NIP6_FMT " %s\n", |
290 | im->m_class, NIP6(addr), dom); | 290 | im->m_class, NIP6(addr), dom); |
291 | } | 291 | } |
292 | return 0; | 292 | return 0; |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index c22d6b6f2db4..06ab4841537b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -260,11 +260,16 @@ static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) | |||
260 | * On our side, we need to read into a pagelist. The first page immediately | 260 | * On our side, we need to read into a pagelist. The first page immediately |
261 | * follows the RPC header. | 261 | * follows the RPC header. |
262 | * | 262 | * |
263 | * This function returns 1 to indicate success. The data is not yet in | 263 | * This function returns: |
264 | * 0 - No error and no read-list found. | ||
265 | * | ||
266 | * 1 - Successful read-list processing. The data is not yet in | ||
264 | * the pagelist and therefore the RPC request must be deferred. The | 267 | * the pagelist and therefore the RPC request must be deferred. The |
265 | * I/O completion will enqueue the transport again and | 268 | * I/O completion will enqueue the transport again and |
266 | * svc_rdma_recvfrom will complete the request. | 269 | * svc_rdma_recvfrom will complete the request. |
267 | * | 270 | * |
271 | * <0 - Error processing/posting read-list. | ||
272 | * | ||
268 | * NOTE: The ctxt must not be touched after the last WR has been posted | 273 | * NOTE: The ctxt must not be touched after the last WR has been posted |
269 | * because the I/O completion processing may occur on another | 274 | * because the I/O completion processing may occur on another |
270 | * processor and free / modify the context. Ne touche pas! | 275 | * processor and free / modify the context. Ne touche pas! |
@@ -284,7 +289,6 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt, | |||
284 | u64 sgl_offset; | 289 | u64 sgl_offset; |
285 | struct rpcrdma_read_chunk *ch; | 290 | struct rpcrdma_read_chunk *ch; |
286 | struct svc_rdma_op_ctxt *ctxt = NULL; | 291 | struct svc_rdma_op_ctxt *ctxt = NULL; |
287 | struct svc_rdma_op_ctxt *head; | ||
288 | struct svc_rdma_op_ctxt *tmp_sge_ctxt; | 292 | struct svc_rdma_op_ctxt *tmp_sge_ctxt; |
289 | struct svc_rdma_op_ctxt *tmp_ch_ctxt; | 293 | struct svc_rdma_op_ctxt *tmp_ch_ctxt; |
290 | struct chunk_sge *ch_sge_ary; | 294 | struct chunk_sge *ch_sge_ary; |
@@ -302,25 +306,19 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt, | |||
302 | ch_sge_ary = (struct chunk_sge *)tmp_ch_ctxt->sge; | 306 | ch_sge_ary = (struct chunk_sge *)tmp_ch_ctxt->sge; |
303 | 307 | ||
304 | svc_rdma_rcl_chunk_counts(ch, &ch_count, &byte_count); | 308 | svc_rdma_rcl_chunk_counts(ch, &ch_count, &byte_count); |
309 | if (ch_count > RPCSVC_MAXPAGES) | ||
310 | return -EINVAL; | ||
305 | sge_count = rdma_rcl_to_sge(xprt, rqstp, hdr_ctxt, rmsgp, | 311 | sge_count = rdma_rcl_to_sge(xprt, rqstp, hdr_ctxt, rmsgp, |
306 | sge, ch_sge_ary, | 312 | sge, ch_sge_ary, |
307 | ch_count, byte_count); | 313 | ch_count, byte_count); |
308 | head = svc_rdma_get_context(xprt); | ||
309 | sgl_offset = 0; | 314 | sgl_offset = 0; |
310 | ch_no = 0; | 315 | ch_no = 0; |
311 | 316 | ||
312 | for (ch = (struct rpcrdma_read_chunk *)&rmsgp->rm_body.rm_chunks[0]; | 317 | for (ch = (struct rpcrdma_read_chunk *)&rmsgp->rm_body.rm_chunks[0]; |
313 | ch->rc_discrim != 0; ch++, ch_no++) { | 318 | ch->rc_discrim != 0; ch++, ch_no++) { |
314 | next_sge: | 319 | next_sge: |
315 | if (!ctxt) | 320 | ctxt = svc_rdma_get_context(xprt); |
316 | ctxt = head; | ||
317 | else { | ||
318 | ctxt->next = svc_rdma_get_context(xprt); | ||
319 | ctxt = ctxt->next; | ||
320 | } | ||
321 | ctxt->next = NULL; | ||
322 | ctxt->direction = DMA_FROM_DEVICE; | 321 | ctxt->direction = DMA_FROM_DEVICE; |
323 | clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); | ||
324 | clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); | 322 | clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); |
325 | 323 | ||
326 | /* Prepare READ WR */ | 324 | /* Prepare READ WR */ |
@@ -347,20 +345,15 @@ next_sge: | |||
347 | * the client and the RPC needs to be enqueued. | 345 | * the client and the RPC needs to be enqueued. |
348 | */ | 346 | */ |
349 | set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); | 347 | set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); |
350 | ctxt->next = hdr_ctxt; | 348 | ctxt->read_hdr = hdr_ctxt; |
351 | hdr_ctxt->next = head; | ||
352 | } | 349 | } |
353 | /* Post the read */ | 350 | /* Post the read */ |
354 | err = svc_rdma_send(xprt, &read_wr); | 351 | err = svc_rdma_send(xprt, &read_wr); |
355 | if (err) { | 352 | if (err) { |
356 | printk(KERN_ERR "svcrdma: Error posting send = %d\n", | 353 | printk(KERN_ERR "svcrdma: Error %d posting RDMA_READ\n", |
357 | err); | 354 | err); |
358 | /* | 355 | set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags); |
359 | * Break the circular list so free knows when | 356 | svc_rdma_put_context(ctxt, 0); |
360 | * to stop if the error happened to occur on | ||
361 | * the last read | ||
362 | */ | ||
363 | ctxt->next = NULL; | ||
364 | goto out; | 357 | goto out; |
365 | } | 358 | } |
366 | atomic_inc(&rdma_stat_read); | 359 | atomic_inc(&rdma_stat_read); |
@@ -371,7 +364,7 @@ next_sge: | |||
371 | goto next_sge; | 364 | goto next_sge; |
372 | } | 365 | } |
373 | sgl_offset = 0; | 366 | sgl_offset = 0; |
374 | err = 0; | 367 | err = 1; |
375 | } | 368 | } |
376 | 369 | ||
377 | out: | 370 | out: |
@@ -389,25 +382,12 @@ next_sge: | |||
389 | while (rqstp->rq_resused) | 382 | while (rqstp->rq_resused) |
390 | rqstp->rq_respages[--rqstp->rq_resused] = NULL; | 383 | rqstp->rq_respages[--rqstp->rq_resused] = NULL; |
391 | 384 | ||
392 | if (err) { | 385 | return err; |
393 | printk(KERN_ERR "svcrdma : RDMA_READ error = %d\n", err); | ||
394 | set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags); | ||
395 | /* Free the linked list of read contexts */ | ||
396 | while (head != NULL) { | ||
397 | ctxt = head->next; | ||
398 | svc_rdma_put_context(head, 1); | ||
399 | head = ctxt; | ||
400 | } | ||
401 | return 0; | ||
402 | } | ||
403 | |||
404 | return 1; | ||
405 | } | 386 | } |
406 | 387 | ||
407 | static int rdma_read_complete(struct svc_rqst *rqstp, | 388 | static int rdma_read_complete(struct svc_rqst *rqstp, |
408 | struct svc_rdma_op_ctxt *data) | 389 | struct svc_rdma_op_ctxt *head) |
409 | { | 390 | { |
410 | struct svc_rdma_op_ctxt *head = data->next; | ||
411 | int page_no; | 391 | int page_no; |
412 | int ret; | 392 | int ret; |
413 | 393 | ||
@@ -433,21 +413,12 @@ static int rdma_read_complete(struct svc_rqst *rqstp, | |||
433 | rqstp->rq_arg.len = head->arg.len; | 413 | rqstp->rq_arg.len = head->arg.len; |
434 | rqstp->rq_arg.buflen = head->arg.buflen; | 414 | rqstp->rq_arg.buflen = head->arg.buflen; |
435 | 415 | ||
416 | /* Free the context */ | ||
417 | svc_rdma_put_context(head, 0); | ||
418 | |||
436 | /* XXX: What should this be? */ | 419 | /* XXX: What should this be? */ |
437 | rqstp->rq_prot = IPPROTO_MAX; | 420 | rqstp->rq_prot = IPPROTO_MAX; |
438 | 421 | svc_xprt_copy_addrs(rqstp, rqstp->rq_xprt); | |
439 | /* | ||
440 | * Free the contexts we used to build the RDMA_READ. We have | ||
441 | * to be careful here because the context list uses the same | ||
442 | * next pointer used to chain the contexts associated with the | ||
443 | * RDMA_READ | ||
444 | */ | ||
445 | data->next = NULL; /* terminate circular list */ | ||
446 | do { | ||
447 | data = head->next; | ||
448 | svc_rdma_put_context(head, 0); | ||
449 | head = data; | ||
450 | } while (head != NULL); | ||
451 | 422 | ||
452 | ret = rqstp->rq_arg.head[0].iov_len | 423 | ret = rqstp->rq_arg.head[0].iov_len |
453 | + rqstp->rq_arg.page_len | 424 | + rqstp->rq_arg.page_len |
@@ -457,8 +428,6 @@ static int rdma_read_complete(struct svc_rqst *rqstp, | |||
457 | ret, rqstp->rq_arg.len, rqstp->rq_arg.head[0].iov_base, | 428 | ret, rqstp->rq_arg.len, rqstp->rq_arg.head[0].iov_base, |
458 | rqstp->rq_arg.head[0].iov_len); | 429 | rqstp->rq_arg.head[0].iov_len); |
459 | 430 | ||
460 | /* Indicate that we've consumed an RQ credit */ | ||
461 | rqstp->rq_xprt_ctxt = rqstp->rq_xprt; | ||
462 | svc_xprt_received(rqstp->rq_xprt); | 431 | svc_xprt_received(rqstp->rq_xprt); |
463 | return ret; | 432 | return ret; |
464 | } | 433 | } |
@@ -480,13 +449,6 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
480 | 449 | ||
481 | dprintk("svcrdma: rqstp=%p\n", rqstp); | 450 | dprintk("svcrdma: rqstp=%p\n", rqstp); |
482 | 451 | ||
483 | /* | ||
484 | * The rq_xprt_ctxt indicates if we've consumed an RQ credit | ||
485 | * or not. It is used in the rdma xpo_release_rqst function to | ||
486 | * determine whether or not to return an RQ WQE to the RQ. | ||
487 | */ | ||
488 | rqstp->rq_xprt_ctxt = NULL; | ||
489 | |||
490 | spin_lock_bh(&rdma_xprt->sc_read_complete_lock); | 452 | spin_lock_bh(&rdma_xprt->sc_read_complete_lock); |
491 | if (!list_empty(&rdma_xprt->sc_read_complete_q)) { | 453 | if (!list_empty(&rdma_xprt->sc_read_complete_q)) { |
492 | ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, | 454 | ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, |
@@ -537,21 +499,22 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
537 | /* If the request is invalid, reply with an error */ | 499 | /* If the request is invalid, reply with an error */ |
538 | if (len < 0) { | 500 | if (len < 0) { |
539 | if (len == -ENOSYS) | 501 | if (len == -ENOSYS) |
540 | (void)svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS); | 502 | svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS); |
541 | goto close_out; | 503 | goto close_out; |
542 | } | 504 | } |
543 | 505 | ||
544 | /* Read read-list data. If we would need to wait, defer | 506 | /* Read read-list data. */ |
545 | * it. Not that in this case, we don't return the RQ credit | 507 | ret = rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt); |
546 | * until after the read completes. | 508 | if (ret > 0) { |
547 | */ | 509 | /* read-list posted, defer until data received from client. */ |
548 | if (rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt)) { | ||
549 | svc_xprt_received(xprt); | 510 | svc_xprt_received(xprt); |
550 | return 0; | 511 | return 0; |
551 | } | 512 | } |
552 | 513 | if (ret < 0) { | |
553 | /* Indicate we've consumed an RQ credit */ | 514 | /* Post of read-list failed, free context. */ |
554 | rqstp->rq_xprt_ctxt = rqstp->rq_xprt; | 515 | svc_rdma_put_context(ctxt, 1); |
516 | return 0; | ||
517 | } | ||
555 | 518 | ||
556 | ret = rqstp->rq_arg.head[0].iov_len | 519 | ret = rqstp->rq_arg.head[0].iov_len |
557 | + rqstp->rq_arg.page_len | 520 | + rqstp->rq_arg.page_len |
@@ -569,11 +532,8 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) | |||
569 | return ret; | 532 | return ret; |
570 | 533 | ||
571 | close_out: | 534 | close_out: |
572 | if (ctxt) { | 535 | if (ctxt) |
573 | svc_rdma_put_context(ctxt, 1); | 536 | svc_rdma_put_context(ctxt, 1); |
574 | /* Indicate we've consumed an RQ credit */ | ||
575 | rqstp->rq_xprt_ctxt = rqstp->rq_xprt; | ||
576 | } | ||
577 | dprintk("svcrdma: transport %p is closing\n", xprt); | 537 | dprintk("svcrdma: transport %p is closing\n", xprt); |
578 | /* | 538 | /* |
579 | * Set the close bit and enqueue it. svc_recv will see the | 539 | * Set the close bit and enqueue it. svc_recv will see the |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 981f190c1b39..fb82b1b683f8 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -389,6 +389,17 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
389 | int page_no; | 389 | int page_no; |
390 | int ret; | 390 | int ret; |
391 | 391 | ||
392 | /* Post a recv buffer to handle another request. */ | ||
393 | ret = svc_rdma_post_recv(rdma); | ||
394 | if (ret) { | ||
395 | printk(KERN_INFO | ||
396 | "svcrdma: could not post a receive buffer, err=%d." | ||
397 | "Closing transport %p.\n", ret, rdma); | ||
398 | set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags); | ||
399 | svc_rdma_put_context(ctxt, 0); | ||
400 | return -ENOTCONN; | ||
401 | } | ||
402 | |||
392 | /* Prepare the context */ | 403 | /* Prepare the context */ |
393 | ctxt->pages[0] = page; | 404 | ctxt->pages[0] = page; |
394 | ctxt->count = 1; | 405 | ctxt->count = 1; |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index af408fc12634..e132509d1db0 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -103,8 +103,8 @@ static int rdma_bump_context_cache(struct svcxprt_rdma *xprt) | |||
103 | spin_lock_bh(&xprt->sc_ctxt_lock); | 103 | spin_lock_bh(&xprt->sc_ctxt_lock); |
104 | if (ctxt) { | 104 | if (ctxt) { |
105 | at_least_one = 1; | 105 | at_least_one = 1; |
106 | ctxt->next = xprt->sc_ctxt_head; | 106 | INIT_LIST_HEAD(&ctxt->free_list); |
107 | xprt->sc_ctxt_head = ctxt; | 107 | list_add(&ctxt->free_list, &xprt->sc_ctxt_free); |
108 | } else { | 108 | } else { |
109 | /* kmalloc failed...give up for now */ | 109 | /* kmalloc failed...give up for now */ |
110 | xprt->sc_ctxt_cnt--; | 110 | xprt->sc_ctxt_cnt--; |
@@ -123,7 +123,7 @@ struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt) | |||
123 | 123 | ||
124 | while (1) { | 124 | while (1) { |
125 | spin_lock_bh(&xprt->sc_ctxt_lock); | 125 | spin_lock_bh(&xprt->sc_ctxt_lock); |
126 | if (unlikely(xprt->sc_ctxt_head == NULL)) { | 126 | if (unlikely(list_empty(&xprt->sc_ctxt_free))) { |
127 | /* Try to bump my cache. */ | 127 | /* Try to bump my cache. */ |
128 | spin_unlock_bh(&xprt->sc_ctxt_lock); | 128 | spin_unlock_bh(&xprt->sc_ctxt_lock); |
129 | 129 | ||
@@ -136,12 +136,15 @@ struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt) | |||
136 | schedule_timeout_uninterruptible(msecs_to_jiffies(500)); | 136 | schedule_timeout_uninterruptible(msecs_to_jiffies(500)); |
137 | continue; | 137 | continue; |
138 | } | 138 | } |
139 | ctxt = xprt->sc_ctxt_head; | 139 | ctxt = list_entry(xprt->sc_ctxt_free.next, |
140 | xprt->sc_ctxt_head = ctxt->next; | 140 | struct svc_rdma_op_ctxt, |
141 | free_list); | ||
142 | list_del_init(&ctxt->free_list); | ||
141 | spin_unlock_bh(&xprt->sc_ctxt_lock); | 143 | spin_unlock_bh(&xprt->sc_ctxt_lock); |
142 | ctxt->xprt = xprt; | 144 | ctxt->xprt = xprt; |
143 | INIT_LIST_HEAD(&ctxt->dto_q); | 145 | INIT_LIST_HEAD(&ctxt->dto_q); |
144 | ctxt->count = 0; | 146 | ctxt->count = 0; |
147 | atomic_inc(&xprt->sc_ctxt_used); | ||
145 | break; | 148 | break; |
146 | } | 149 | } |
147 | return ctxt; | 150 | return ctxt; |
@@ -159,14 +162,15 @@ void svc_rdma_put_context(struct svc_rdma_op_ctxt *ctxt, int free_pages) | |||
159 | put_page(ctxt->pages[i]); | 162 | put_page(ctxt->pages[i]); |
160 | 163 | ||
161 | for (i = 0; i < ctxt->count; i++) | 164 | for (i = 0; i < ctxt->count; i++) |
162 | dma_unmap_single(xprt->sc_cm_id->device->dma_device, | 165 | ib_dma_unmap_single(xprt->sc_cm_id->device, |
163 | ctxt->sge[i].addr, | 166 | ctxt->sge[i].addr, |
164 | ctxt->sge[i].length, | 167 | ctxt->sge[i].length, |
165 | ctxt->direction); | 168 | ctxt->direction); |
169 | |||
166 | spin_lock_bh(&xprt->sc_ctxt_lock); | 170 | spin_lock_bh(&xprt->sc_ctxt_lock); |
167 | ctxt->next = xprt->sc_ctxt_head; | 171 | list_add(&ctxt->free_list, &xprt->sc_ctxt_free); |
168 | xprt->sc_ctxt_head = ctxt; | ||
169 | spin_unlock_bh(&xprt->sc_ctxt_lock); | 172 | spin_unlock_bh(&xprt->sc_ctxt_lock); |
173 | atomic_dec(&xprt->sc_ctxt_used); | ||
170 | } | 174 | } |
171 | 175 | ||
172 | /* ib_cq event handler */ | 176 | /* ib_cq event handler */ |
@@ -228,23 +232,8 @@ static void dto_tasklet_func(unsigned long data) | |||
228 | list_del_init(&xprt->sc_dto_q); | 232 | list_del_init(&xprt->sc_dto_q); |
229 | spin_unlock_irqrestore(&dto_lock, flags); | 233 | spin_unlock_irqrestore(&dto_lock, flags); |
230 | 234 | ||
231 | if (test_and_clear_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags)) { | 235 | rq_cq_reap(xprt); |
232 | ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); | 236 | sq_cq_reap(xprt); |
233 | rq_cq_reap(xprt); | ||
234 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); | ||
235 | /* | ||
236 | * If data arrived before established event, | ||
237 | * don't enqueue. This defers RPC I/O until the | ||
238 | * RDMA connection is complete. | ||
239 | */ | ||
240 | if (!test_bit(RDMAXPRT_CONN_PENDING, &xprt->sc_flags)) | ||
241 | svc_xprt_enqueue(&xprt->sc_xprt); | ||
242 | } | ||
243 | |||
244 | if (test_and_clear_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags)) { | ||
245 | ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP); | ||
246 | sq_cq_reap(xprt); | ||
247 | } | ||
248 | 237 | ||
249 | svc_xprt_put(&xprt->sc_xprt); | 238 | svc_xprt_put(&xprt->sc_xprt); |
250 | spin_lock_irqsave(&dto_lock, flags); | 239 | spin_lock_irqsave(&dto_lock, flags); |
@@ -263,11 +252,15 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context) | |||
263 | struct svcxprt_rdma *xprt = cq_context; | 252 | struct svcxprt_rdma *xprt = cq_context; |
264 | unsigned long flags; | 253 | unsigned long flags; |
265 | 254 | ||
255 | /* Guard against unconditional flush call for destroyed QP */ | ||
256 | if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0) | ||
257 | return; | ||
258 | |||
266 | /* | 259 | /* |
267 | * Set the bit regardless of whether or not it's on the list | 260 | * Set the bit regardless of whether or not it's on the list |
268 | * because it may be on the list already due to an SQ | 261 | * because it may be on the list already due to an SQ |
269 | * completion. | 262 | * completion. |
270 | */ | 263 | */ |
271 | set_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags); | 264 | set_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags); |
272 | 265 | ||
273 | /* | 266 | /* |
@@ -290,6 +283,8 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context) | |||
290 | * | 283 | * |
291 | * Take all completing WC off the CQE and enqueue the associated DTO | 284 | * Take all completing WC off the CQE and enqueue the associated DTO |
292 | * context on the dto_q for the transport. | 285 | * context on the dto_q for the transport. |
286 | * | ||
287 | * Note that caller must hold a transport reference. | ||
293 | */ | 288 | */ |
294 | static void rq_cq_reap(struct svcxprt_rdma *xprt) | 289 | static void rq_cq_reap(struct svcxprt_rdma *xprt) |
295 | { | 290 | { |
@@ -297,29 +292,47 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) | |||
297 | struct ib_wc wc; | 292 | struct ib_wc wc; |
298 | struct svc_rdma_op_ctxt *ctxt = NULL; | 293 | struct svc_rdma_op_ctxt *ctxt = NULL; |
299 | 294 | ||
295 | if (!test_and_clear_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags)) | ||
296 | return; | ||
297 | |||
298 | ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); | ||
300 | atomic_inc(&rdma_stat_rq_poll); | 299 | atomic_inc(&rdma_stat_rq_poll); |
301 | 300 | ||
302 | spin_lock_bh(&xprt->sc_rq_dto_lock); | ||
303 | while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { | 301 | while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { |
304 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; | 302 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; |
305 | ctxt->wc_status = wc.status; | 303 | ctxt->wc_status = wc.status; |
306 | ctxt->byte_len = wc.byte_len; | 304 | ctxt->byte_len = wc.byte_len; |
307 | if (wc.status != IB_WC_SUCCESS) { | 305 | if (wc.status != IB_WC_SUCCESS) { |
308 | /* Close the transport */ | 306 | /* Close the transport */ |
307 | dprintk("svcrdma: transport closing putting ctxt %p\n", ctxt); | ||
309 | set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags); | 308 | set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags); |
310 | svc_rdma_put_context(ctxt, 1); | 309 | svc_rdma_put_context(ctxt, 1); |
310 | svc_xprt_put(&xprt->sc_xprt); | ||
311 | continue; | 311 | continue; |
312 | } | 312 | } |
313 | spin_lock_bh(&xprt->sc_rq_dto_lock); | ||
313 | list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q); | 314 | list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q); |
315 | spin_unlock_bh(&xprt->sc_rq_dto_lock); | ||
316 | svc_xprt_put(&xprt->sc_xprt); | ||
314 | } | 317 | } |
315 | spin_unlock_bh(&xprt->sc_rq_dto_lock); | ||
316 | 318 | ||
317 | if (ctxt) | 319 | if (ctxt) |
318 | atomic_inc(&rdma_stat_rq_prod); | 320 | atomic_inc(&rdma_stat_rq_prod); |
321 | |||
322 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); | ||
323 | /* | ||
324 | * If data arrived before established event, | ||
325 | * don't enqueue. This defers RPC I/O until the | ||
326 | * RDMA connection is complete. | ||
327 | */ | ||
328 | if (!test_bit(RDMAXPRT_CONN_PENDING, &xprt->sc_flags)) | ||
329 | svc_xprt_enqueue(&xprt->sc_xprt); | ||
319 | } | 330 | } |
320 | 331 | ||
321 | /* | 332 | /* |
322 | * Send Queue Completion Handler - potentially called on interrupt context. | 333 | * Send Queue Completion Handler - potentially called on interrupt context. |
334 | * | ||
335 | * Note that caller must hold a transport reference. | ||
323 | */ | 336 | */ |
324 | static void sq_cq_reap(struct svcxprt_rdma *xprt) | 337 | static void sq_cq_reap(struct svcxprt_rdma *xprt) |
325 | { | 338 | { |
@@ -328,6 +341,11 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) | |||
328 | struct ib_cq *cq = xprt->sc_sq_cq; | 341 | struct ib_cq *cq = xprt->sc_sq_cq; |
329 | int ret; | 342 | int ret; |
330 | 343 | ||
344 | |||
345 | if (!test_and_clear_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags)) | ||
346 | return; | ||
347 | |||
348 | ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP); | ||
331 | atomic_inc(&rdma_stat_sq_poll); | 349 | atomic_inc(&rdma_stat_sq_poll); |
332 | while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) { | 350 | while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) { |
333 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; | 351 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; |
@@ -349,14 +367,16 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) | |||
349 | 367 | ||
350 | case IB_WR_RDMA_READ: | 368 | case IB_WR_RDMA_READ: |
351 | if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) { | 369 | if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) { |
370 | struct svc_rdma_op_ctxt *read_hdr = ctxt->read_hdr; | ||
371 | BUG_ON(!read_hdr); | ||
352 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); | 372 | set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); |
353 | set_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); | ||
354 | spin_lock_bh(&xprt->sc_read_complete_lock); | 373 | spin_lock_bh(&xprt->sc_read_complete_lock); |
355 | list_add_tail(&ctxt->dto_q, | 374 | list_add_tail(&read_hdr->dto_q, |
356 | &xprt->sc_read_complete_q); | 375 | &xprt->sc_read_complete_q); |
357 | spin_unlock_bh(&xprt->sc_read_complete_lock); | 376 | spin_unlock_bh(&xprt->sc_read_complete_lock); |
358 | svc_xprt_enqueue(&xprt->sc_xprt); | 377 | svc_xprt_enqueue(&xprt->sc_xprt); |
359 | } | 378 | } |
379 | svc_rdma_put_context(ctxt, 0); | ||
360 | break; | 380 | break; |
361 | 381 | ||
362 | default: | 382 | default: |
@@ -365,6 +385,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt) | |||
365 | wc.opcode, wc.status); | 385 | wc.opcode, wc.status); |
366 | break; | 386 | break; |
367 | } | 387 | } |
388 | svc_xprt_put(&xprt->sc_xprt); | ||
368 | } | 389 | } |
369 | 390 | ||
370 | if (ctxt) | 391 | if (ctxt) |
@@ -376,11 +397,15 @@ static void sq_comp_handler(struct ib_cq *cq, void *cq_context) | |||
376 | struct svcxprt_rdma *xprt = cq_context; | 397 | struct svcxprt_rdma *xprt = cq_context; |
377 | unsigned long flags; | 398 | unsigned long flags; |
378 | 399 | ||
400 | /* Guard against unconditional flush call for destroyed QP */ | ||
401 | if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0) | ||
402 | return; | ||
403 | |||
379 | /* | 404 | /* |
380 | * Set the bit regardless of whether or not it's on the list | 405 | * Set the bit regardless of whether or not it's on the list |
381 | * because it may be on the list already due to an RQ | 406 | * because it may be on the list already due to an RQ |
382 | * completion. | 407 | * completion. |
383 | */ | 408 | */ |
384 | set_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags); | 409 | set_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags); |
385 | 410 | ||
386 | /* | 411 | /* |
@@ -407,28 +432,29 @@ static void create_context_cache(struct svcxprt_rdma *xprt, | |||
407 | xprt->sc_ctxt_max = ctxt_max; | 432 | xprt->sc_ctxt_max = ctxt_max; |
408 | xprt->sc_ctxt_bump = ctxt_bump; | 433 | xprt->sc_ctxt_bump = ctxt_bump; |
409 | xprt->sc_ctxt_cnt = 0; | 434 | xprt->sc_ctxt_cnt = 0; |
410 | xprt->sc_ctxt_head = NULL; | 435 | atomic_set(&xprt->sc_ctxt_used, 0); |
436 | |||
437 | INIT_LIST_HEAD(&xprt->sc_ctxt_free); | ||
411 | for (i = 0; i < ctxt_count; i++) { | 438 | for (i = 0; i < ctxt_count; i++) { |
412 | ctxt = kmalloc(sizeof(*ctxt), GFP_KERNEL); | 439 | ctxt = kmalloc(sizeof(*ctxt), GFP_KERNEL); |
413 | if (ctxt) { | 440 | if (ctxt) { |
414 | ctxt->next = xprt->sc_ctxt_head; | 441 | INIT_LIST_HEAD(&ctxt->free_list); |
415 | xprt->sc_ctxt_head = ctxt; | 442 | list_add(&ctxt->free_list, &xprt->sc_ctxt_free); |
416 | xprt->sc_ctxt_cnt++; | 443 | xprt->sc_ctxt_cnt++; |
417 | } | 444 | } |
418 | } | 445 | } |
419 | } | 446 | } |
420 | 447 | ||
421 | static void destroy_context_cache(struct svc_rdma_op_ctxt *ctxt) | 448 | static void destroy_context_cache(struct svcxprt_rdma *xprt) |
422 | { | 449 | { |
423 | struct svc_rdma_op_ctxt *next; | 450 | while (!list_empty(&xprt->sc_ctxt_free)) { |
424 | if (!ctxt) | 451 | struct svc_rdma_op_ctxt *ctxt; |
425 | return; | 452 | ctxt = list_entry(xprt->sc_ctxt_free.next, |
426 | 453 | struct svc_rdma_op_ctxt, | |
427 | do { | 454 | free_list); |
428 | next = ctxt->next; | 455 | list_del_init(&ctxt->free_list); |
429 | kfree(ctxt); | 456 | kfree(ctxt); |
430 | ctxt = next; | 457 | } |
431 | } while (next); | ||
432 | } | 458 | } |
433 | 459 | ||
434 | static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, | 460 | static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, |
@@ -465,7 +491,7 @@ static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, | |||
465 | reqs + | 491 | reqs + |
466 | cma_xprt->sc_sq_depth + | 492 | cma_xprt->sc_sq_depth + |
467 | RPCRDMA_MAX_THREADS + 1); /* max */ | 493 | RPCRDMA_MAX_THREADS + 1); /* max */ |
468 | if (!cma_xprt->sc_ctxt_head) { | 494 | if (list_empty(&cma_xprt->sc_ctxt_free)) { |
469 | kfree(cma_xprt); | 495 | kfree(cma_xprt); |
470 | return NULL; | 496 | return NULL; |
471 | } | 497 | } |
@@ -520,7 +546,12 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt) | |||
520 | recv_wr.num_sge = ctxt->count; | 546 | recv_wr.num_sge = ctxt->count; |
521 | recv_wr.wr_id = (u64)(unsigned long)ctxt; | 547 | recv_wr.wr_id = (u64)(unsigned long)ctxt; |
522 | 548 | ||
549 | svc_xprt_get(&xprt->sc_xprt); | ||
523 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); | 550 | ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); |
551 | if (ret) { | ||
552 | svc_xprt_put(&xprt->sc_xprt); | ||
553 | svc_rdma_put_context(ctxt, 1); | ||
554 | } | ||
524 | return ret; | 555 | return ret; |
525 | } | 556 | } |
526 | 557 | ||
@@ -539,6 +570,7 @@ static void handle_connect_req(struct rdma_cm_id *new_cma_id) | |||
539 | { | 570 | { |
540 | struct svcxprt_rdma *listen_xprt = new_cma_id->context; | 571 | struct svcxprt_rdma *listen_xprt = new_cma_id->context; |
541 | struct svcxprt_rdma *newxprt; | 572 | struct svcxprt_rdma *newxprt; |
573 | struct sockaddr *sa; | ||
542 | 574 | ||
543 | /* Create a new transport */ | 575 | /* Create a new transport */ |
544 | newxprt = rdma_create_xprt(listen_xprt->sc_xprt.xpt_server, 0); | 576 | newxprt = rdma_create_xprt(listen_xprt->sc_xprt.xpt_server, 0); |
@@ -551,6 +583,12 @@ static void handle_connect_req(struct rdma_cm_id *new_cma_id) | |||
551 | dprintk("svcrdma: Creating newxprt=%p, cm_id=%p, listenxprt=%p\n", | 583 | dprintk("svcrdma: Creating newxprt=%p, cm_id=%p, listenxprt=%p\n", |
552 | newxprt, newxprt->sc_cm_id, listen_xprt); | 584 | newxprt, newxprt->sc_cm_id, listen_xprt); |
553 | 585 | ||
586 | /* Set the local and remote addresses in the transport */ | ||
587 | sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr; | ||
588 | svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa)); | ||
589 | sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr; | ||
590 | svc_xprt_set_local(&newxprt->sc_xprt, sa, svc_addr_len(sa)); | ||
591 | |||
554 | /* | 592 | /* |
555 | * Enqueue the new transport on the accept queue of the listening | 593 | * Enqueue the new transport on the accept queue of the listening |
556 | * transport | 594 | * transport |
@@ -627,6 +665,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id, | |||
627 | if (xprt) { | 665 | if (xprt) { |
628 | set_bit(XPT_CLOSE, &xprt->xpt_flags); | 666 | set_bit(XPT_CLOSE, &xprt->xpt_flags); |
629 | svc_xprt_enqueue(xprt); | 667 | svc_xprt_enqueue(xprt); |
668 | svc_xprt_put(xprt); | ||
630 | } | 669 | } |
631 | break; | 670 | break; |
632 | case RDMA_CM_EVENT_DEVICE_REMOVAL: | 671 | case RDMA_CM_EVENT_DEVICE_REMOVAL: |
@@ -661,31 +700,27 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, | |||
661 | 700 | ||
662 | cma_xprt = rdma_create_xprt(serv, 1); | 701 | cma_xprt = rdma_create_xprt(serv, 1); |
663 | if (!cma_xprt) | 702 | if (!cma_xprt) |
664 | return ERR_PTR(ENOMEM); | 703 | return ERR_PTR(-ENOMEM); |
665 | xprt = &cma_xprt->sc_xprt; | 704 | xprt = &cma_xprt->sc_xprt; |
666 | 705 | ||
667 | listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP); | 706 | listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP); |
668 | if (IS_ERR(listen_id)) { | 707 | if (IS_ERR(listen_id)) { |
669 | svc_xprt_put(&cma_xprt->sc_xprt); | 708 | ret = PTR_ERR(listen_id); |
670 | dprintk("svcrdma: rdma_create_id failed = %ld\n", | 709 | dprintk("svcrdma: rdma_create_id failed = %d\n", ret); |
671 | PTR_ERR(listen_id)); | 710 | goto err0; |
672 | return (void *)listen_id; | ||
673 | } | 711 | } |
712 | |||
674 | ret = rdma_bind_addr(listen_id, sa); | 713 | ret = rdma_bind_addr(listen_id, sa); |
675 | if (ret) { | 714 | if (ret) { |
676 | rdma_destroy_id(listen_id); | ||
677 | svc_xprt_put(&cma_xprt->sc_xprt); | ||
678 | dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret); | 715 | dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret); |
679 | return ERR_PTR(ret); | 716 | goto err1; |
680 | } | 717 | } |
681 | cma_xprt->sc_cm_id = listen_id; | 718 | cma_xprt->sc_cm_id = listen_id; |
682 | 719 | ||
683 | ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG); | 720 | ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG); |
684 | if (ret) { | 721 | if (ret) { |
685 | rdma_destroy_id(listen_id); | ||
686 | svc_xprt_put(&cma_xprt->sc_xprt); | ||
687 | dprintk("svcrdma: rdma_listen failed = %d\n", ret); | 722 | dprintk("svcrdma: rdma_listen failed = %d\n", ret); |
688 | return ERR_PTR(ret); | 723 | goto err1; |
689 | } | 724 | } |
690 | 725 | ||
691 | /* | 726 | /* |
@@ -696,6 +731,12 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, | |||
696 | svc_xprt_set_local(&cma_xprt->sc_xprt, sa, salen); | 731 | svc_xprt_set_local(&cma_xprt->sc_xprt, sa, salen); |
697 | 732 | ||
698 | return &cma_xprt->sc_xprt; | 733 | return &cma_xprt->sc_xprt; |
734 | |||
735 | err1: | ||
736 | rdma_destroy_id(listen_id); | ||
737 | err0: | ||
738 | kfree(cma_xprt); | ||
739 | return ERR_PTR(ret); | ||
699 | } | 740 | } |
700 | 741 | ||
701 | /* | 742 | /* |
@@ -716,7 +757,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
716 | struct rdma_conn_param conn_param; | 757 | struct rdma_conn_param conn_param; |
717 | struct ib_qp_init_attr qp_attr; | 758 | struct ib_qp_init_attr qp_attr; |
718 | struct ib_device_attr devattr; | 759 | struct ib_device_attr devattr; |
719 | struct sockaddr *sa; | ||
720 | int ret; | 760 | int ret; |
721 | int i; | 761 | int i; |
722 | 762 | ||
@@ -826,7 +866,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
826 | newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; | 866 | newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; |
827 | newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; | 867 | newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; |
828 | } | 868 | } |
829 | svc_xprt_get(&newxprt->sc_xprt); | ||
830 | newxprt->sc_qp = newxprt->sc_cm_id->qp; | 869 | newxprt->sc_qp = newxprt->sc_cm_id->qp; |
831 | 870 | ||
832 | /* Register all of physical memory */ | 871 | /* Register all of physical memory */ |
@@ -850,6 +889,13 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
850 | /* Swap out the handler */ | 889 | /* Swap out the handler */ |
851 | newxprt->sc_cm_id->event_handler = rdma_cma_handler; | 890 | newxprt->sc_cm_id->event_handler = rdma_cma_handler; |
852 | 891 | ||
892 | /* | ||
893 | * Arm the CQs for the SQ and RQ before accepting so we can't | ||
894 | * miss the first message | ||
895 | */ | ||
896 | ib_req_notify_cq(newxprt->sc_sq_cq, IB_CQ_NEXT_COMP); | ||
897 | ib_req_notify_cq(newxprt->sc_rq_cq, IB_CQ_NEXT_COMP); | ||
898 | |||
853 | /* Accept Connection */ | 899 | /* Accept Connection */ |
854 | set_bit(RDMAXPRT_CONN_PENDING, &newxprt->sc_flags); | 900 | set_bit(RDMAXPRT_CONN_PENDING, &newxprt->sc_flags); |
855 | memset(&conn_param, 0, sizeof conn_param); | 901 | memset(&conn_param, 0, sizeof conn_param); |
@@ -886,58 +932,26 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
886 | newxprt->sc_max_requests, | 932 | newxprt->sc_max_requests, |
887 | newxprt->sc_ord); | 933 | newxprt->sc_ord); |
888 | 934 | ||
889 | /* Set the local and remote addresses in the transport */ | ||
890 | sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr; | ||
891 | svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa)); | ||
892 | sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr; | ||
893 | svc_xprt_set_local(&newxprt->sc_xprt, sa, svc_addr_len(sa)); | ||
894 | |||
895 | ib_req_notify_cq(newxprt->sc_sq_cq, IB_CQ_NEXT_COMP); | ||
896 | ib_req_notify_cq(newxprt->sc_rq_cq, IB_CQ_NEXT_COMP); | ||
897 | return &newxprt->sc_xprt; | 935 | return &newxprt->sc_xprt; |
898 | 936 | ||
899 | errout: | 937 | errout: |
900 | dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret); | 938 | dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret); |
901 | /* Take a reference in case the DTO handler runs */ | 939 | /* Take a reference in case the DTO handler runs */ |
902 | svc_xprt_get(&newxprt->sc_xprt); | 940 | svc_xprt_get(&newxprt->sc_xprt); |
903 | if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp)) { | 941 | if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp)) |
904 | ib_destroy_qp(newxprt->sc_qp); | 942 | ib_destroy_qp(newxprt->sc_qp); |
905 | svc_xprt_put(&newxprt->sc_xprt); | ||
906 | } | ||
907 | rdma_destroy_id(newxprt->sc_cm_id); | 943 | rdma_destroy_id(newxprt->sc_cm_id); |
908 | /* This call to put will destroy the transport */ | 944 | /* This call to put will destroy the transport */ |
909 | svc_xprt_put(&newxprt->sc_xprt); | 945 | svc_xprt_put(&newxprt->sc_xprt); |
910 | return NULL; | 946 | return NULL; |
911 | } | 947 | } |
912 | 948 | ||
913 | /* | ||
914 | * Post an RQ WQE to the RQ when the rqst is being released. This | ||
915 | * effectively returns an RQ credit to the client. The rq_xprt_ctxt | ||
916 | * will be null if the request is deferred due to an RDMA_READ or the | ||
917 | * transport had no data ready (EAGAIN). Note that an RPC deferred in | ||
918 | * svc_process will still return the credit, this is because the data | ||
919 | * is copied and no longer consume a WQE/WC. | ||
920 | */ | ||
921 | static void svc_rdma_release_rqst(struct svc_rqst *rqstp) | 949 | static void svc_rdma_release_rqst(struct svc_rqst *rqstp) |
922 | { | 950 | { |
923 | int err; | ||
924 | struct svcxprt_rdma *rdma = | ||
925 | container_of(rqstp->rq_xprt, struct svcxprt_rdma, sc_xprt); | ||
926 | if (rqstp->rq_xprt_ctxt) { | ||
927 | BUG_ON(rqstp->rq_xprt_ctxt != rdma); | ||
928 | err = svc_rdma_post_recv(rdma); | ||
929 | if (err) | ||
930 | dprintk("svcrdma: failed to post an RQ WQE error=%d\n", | ||
931 | err); | ||
932 | } | ||
933 | rqstp->rq_xprt_ctxt = NULL; | ||
934 | } | 951 | } |
935 | 952 | ||
936 | /* | 953 | /* |
937 | * When connected, an svc_xprt has at least three references: | 954 | * When connected, an svc_xprt has at least two references: |
938 | * | ||
939 | * - A reference held by the QP. We still hold that here because this | ||
940 | * code deletes the QP and puts the reference. | ||
941 | * | 955 | * |
942 | * - A reference held by the cm_id between the ESTABLISHED and | 956 | * - A reference held by the cm_id between the ESTABLISHED and |
943 | * DISCONNECTED events. If the remote peer disconnected first, this | 957 | * DISCONNECTED events. If the remote peer disconnected first, this |
@@ -946,7 +960,7 @@ static void svc_rdma_release_rqst(struct svc_rqst *rqstp) | |||
946 | * - A reference held by the svc_recv code that called this function | 960 | * - A reference held by the svc_recv code that called this function |
947 | * as part of close processing. | 961 | * as part of close processing. |
948 | * | 962 | * |
949 | * At a minimum two references should still be held. | 963 | * At a minimum one references should still be held. |
950 | */ | 964 | */ |
951 | static void svc_rdma_detach(struct svc_xprt *xprt) | 965 | static void svc_rdma_detach(struct svc_xprt *xprt) |
952 | { | 966 | { |
@@ -956,23 +970,53 @@ static void svc_rdma_detach(struct svc_xprt *xprt) | |||
956 | 970 | ||
957 | /* Disconnect and flush posted WQE */ | 971 | /* Disconnect and flush posted WQE */ |
958 | rdma_disconnect(rdma->sc_cm_id); | 972 | rdma_disconnect(rdma->sc_cm_id); |
959 | |||
960 | /* Destroy the QP if present (not a listener) */ | ||
961 | if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) { | ||
962 | ib_destroy_qp(rdma->sc_qp); | ||
963 | svc_xprt_put(xprt); | ||
964 | } | ||
965 | |||
966 | /* Destroy the CM ID */ | ||
967 | rdma_destroy_id(rdma->sc_cm_id); | ||
968 | } | 973 | } |
969 | 974 | ||
970 | static void svc_rdma_free(struct svc_xprt *xprt) | 975 | static void __svc_rdma_free(struct work_struct *work) |
971 | { | 976 | { |
972 | struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt; | 977 | struct svcxprt_rdma *rdma = |
978 | container_of(work, struct svcxprt_rdma, sc_work); | ||
973 | dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); | 979 | dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); |
980 | |||
974 | /* We should only be called from kref_put */ | 981 | /* We should only be called from kref_put */ |
975 | BUG_ON(atomic_read(&xprt->xpt_ref.refcount) != 0); | 982 | BUG_ON(atomic_read(&rdma->sc_xprt.xpt_ref.refcount) != 0); |
983 | |||
984 | /* | ||
985 | * Destroy queued, but not processed read completions. Note | ||
986 | * that this cleanup has to be done before destroying the | ||
987 | * cm_id because the device ptr is needed to unmap the dma in | ||
988 | * svc_rdma_put_context. | ||
989 | */ | ||
990 | spin_lock_bh(&rdma->sc_read_complete_lock); | ||
991 | while (!list_empty(&rdma->sc_read_complete_q)) { | ||
992 | struct svc_rdma_op_ctxt *ctxt; | ||
993 | ctxt = list_entry(rdma->sc_read_complete_q.next, | ||
994 | struct svc_rdma_op_ctxt, | ||
995 | dto_q); | ||
996 | list_del_init(&ctxt->dto_q); | ||
997 | svc_rdma_put_context(ctxt, 1); | ||
998 | } | ||
999 | spin_unlock_bh(&rdma->sc_read_complete_lock); | ||
1000 | |||
1001 | /* Destroy queued, but not processed recv completions */ | ||
1002 | spin_lock_bh(&rdma->sc_rq_dto_lock); | ||
1003 | while (!list_empty(&rdma->sc_rq_dto_q)) { | ||
1004 | struct svc_rdma_op_ctxt *ctxt; | ||
1005 | ctxt = list_entry(rdma->sc_rq_dto_q.next, | ||
1006 | struct svc_rdma_op_ctxt, | ||
1007 | dto_q); | ||
1008 | list_del_init(&ctxt->dto_q); | ||
1009 | svc_rdma_put_context(ctxt, 1); | ||
1010 | } | ||
1011 | spin_unlock_bh(&rdma->sc_rq_dto_lock); | ||
1012 | |||
1013 | /* Warn if we leaked a resource or under-referenced */ | ||
1014 | WARN_ON(atomic_read(&rdma->sc_ctxt_used) != 0); | ||
1015 | |||
1016 | /* Destroy the QP if present (not a listener) */ | ||
1017 | if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) | ||
1018 | ib_destroy_qp(rdma->sc_qp); | ||
1019 | |||
976 | if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq)) | 1020 | if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq)) |
977 | ib_destroy_cq(rdma->sc_sq_cq); | 1021 | ib_destroy_cq(rdma->sc_sq_cq); |
978 | 1022 | ||
@@ -985,10 +1029,21 @@ static void svc_rdma_free(struct svc_xprt *xprt) | |||
985 | if (rdma->sc_pd && !IS_ERR(rdma->sc_pd)) | 1029 | if (rdma->sc_pd && !IS_ERR(rdma->sc_pd)) |
986 | ib_dealloc_pd(rdma->sc_pd); | 1030 | ib_dealloc_pd(rdma->sc_pd); |
987 | 1031 | ||
988 | destroy_context_cache(rdma->sc_ctxt_head); | 1032 | /* Destroy the CM ID */ |
1033 | rdma_destroy_id(rdma->sc_cm_id); | ||
1034 | |||
1035 | destroy_context_cache(rdma); | ||
989 | kfree(rdma); | 1036 | kfree(rdma); |
990 | } | 1037 | } |
991 | 1038 | ||
1039 | static void svc_rdma_free(struct svc_xprt *xprt) | ||
1040 | { | ||
1041 | struct svcxprt_rdma *rdma = | ||
1042 | container_of(xprt, struct svcxprt_rdma, sc_xprt); | ||
1043 | INIT_WORK(&rdma->sc_work, __svc_rdma_free); | ||
1044 | schedule_work(&rdma->sc_work); | ||
1045 | } | ||
1046 | |||
992 | static int svc_rdma_has_wspace(struct svc_xprt *xprt) | 1047 | static int svc_rdma_has_wspace(struct svc_xprt *xprt) |
993 | { | 1048 | { |
994 | struct svcxprt_rdma *rdma = | 1049 | struct svcxprt_rdma *rdma = |
@@ -1018,7 +1073,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr) | |||
1018 | int ret; | 1073 | int ret; |
1019 | 1074 | ||
1020 | if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags)) | 1075 | if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags)) |
1021 | return 0; | 1076 | return -ENOTCONN; |
1022 | 1077 | ||
1023 | BUG_ON(wr->send_flags != IB_SEND_SIGNALED); | 1078 | BUG_ON(wr->send_flags != IB_SEND_SIGNALED); |
1024 | BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op != | 1079 | BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op != |
@@ -1029,7 +1084,8 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr) | |||
1029 | if (xprt->sc_sq_depth == atomic_read(&xprt->sc_sq_count)) { | 1084 | if (xprt->sc_sq_depth == atomic_read(&xprt->sc_sq_count)) { |
1030 | spin_unlock_bh(&xprt->sc_lock); | 1085 | spin_unlock_bh(&xprt->sc_lock); |
1031 | atomic_inc(&rdma_stat_sq_starve); | 1086 | atomic_inc(&rdma_stat_sq_starve); |
1032 | /* See if we can reap some SQ WR */ | 1087 | |
1088 | /* See if we can opportunistically reap SQ WR to make room */ | ||
1033 | sq_cq_reap(xprt); | 1089 | sq_cq_reap(xprt); |
1034 | 1090 | ||
1035 | /* Wait until SQ WR available if SQ still full */ | 1091 | /* Wait until SQ WR available if SQ still full */ |
@@ -1041,22 +1097,25 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr) | |||
1041 | continue; | 1097 | continue; |
1042 | } | 1098 | } |
1043 | /* Bumped used SQ WR count and post */ | 1099 | /* Bumped used SQ WR count and post */ |
1100 | svc_xprt_get(&xprt->sc_xprt); | ||
1044 | ret = ib_post_send(xprt->sc_qp, wr, &bad_wr); | 1101 | ret = ib_post_send(xprt->sc_qp, wr, &bad_wr); |
1045 | if (!ret) | 1102 | if (!ret) |
1046 | atomic_inc(&xprt->sc_sq_count); | 1103 | atomic_inc(&xprt->sc_sq_count); |
1047 | else | 1104 | else { |
1105 | svc_xprt_put(&xprt->sc_xprt); | ||
1048 | dprintk("svcrdma: failed to post SQ WR rc=%d, " | 1106 | dprintk("svcrdma: failed to post SQ WR rc=%d, " |
1049 | "sc_sq_count=%d, sc_sq_depth=%d\n", | 1107 | "sc_sq_count=%d, sc_sq_depth=%d\n", |
1050 | ret, atomic_read(&xprt->sc_sq_count), | 1108 | ret, atomic_read(&xprt->sc_sq_count), |
1051 | xprt->sc_sq_depth); | 1109 | xprt->sc_sq_depth); |
1110 | } | ||
1052 | spin_unlock_bh(&xprt->sc_lock); | 1111 | spin_unlock_bh(&xprt->sc_lock); |
1053 | break; | 1112 | break; |
1054 | } | 1113 | } |
1055 | return ret; | 1114 | return ret; |
1056 | } | 1115 | } |
1057 | 1116 | ||
1058 | int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | 1117 | void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, |
1059 | enum rpcrdma_errcode err) | 1118 | enum rpcrdma_errcode err) |
1060 | { | 1119 | { |
1061 | struct ib_send_wr err_wr; | 1120 | struct ib_send_wr err_wr; |
1062 | struct ib_sge sge; | 1121 | struct ib_sge sge; |
@@ -1094,9 +1153,8 @@ int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, | |||
1094 | /* Post It */ | 1153 | /* Post It */ |
1095 | ret = svc_rdma_send(xprt, &err_wr); | 1154 | ret = svc_rdma_send(xprt, &err_wr); |
1096 | if (ret) { | 1155 | if (ret) { |
1097 | dprintk("svcrdma: Error posting send = %d\n", ret); | 1156 | dprintk("svcrdma: Error %d posting send for protocol error\n", |
1157 | ret); | ||
1098 | svc_rdma_put_context(ctxt, 1); | 1158 | svc_rdma_put_context(ctxt, 1); |
1099 | } | 1159 | } |
1100 | |||
1101 | return ret; | ||
1102 | } | 1160 | } |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2bdd4dddc0e1..fb75f265b39c 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -187,7 +187,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
187 | return genlmsg_end(msg, hdr); | 187 | return genlmsg_end(msg, hdr); |
188 | 188 | ||
189 | nla_put_failure: | 189 | nla_put_failure: |
190 | return genlmsg_cancel(msg, hdr); | 190 | genlmsg_cancel(msg, hdr); |
191 | return -EMSGSIZE; | ||
191 | } | 192 | } |
192 | 193 | ||
193 | static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | 194 | static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) |
@@ -273,7 +274,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
273 | return genlmsg_end(msg, hdr); | 274 | return genlmsg_end(msg, hdr); |
274 | 275 | ||
275 | nla_put_failure: | 276 | nla_put_failure: |
276 | return genlmsg_cancel(msg, hdr); | 277 | genlmsg_cancel(msg, hdr); |
278 | return -EMSGSIZE; | ||
277 | } | 279 | } |
278 | 280 | ||
279 | static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb) | 281 | static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb) |
@@ -928,7 +930,8 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | |||
928 | return genlmsg_end(msg, hdr); | 930 | return genlmsg_end(msg, hdr); |
929 | 931 | ||
930 | nla_put_failure: | 932 | nla_put_failure: |
931 | return genlmsg_cancel(msg, hdr); | 933 | genlmsg_cancel(msg, hdr); |
934 | return -EMSGSIZE; | ||
932 | } | 935 | } |
933 | 936 | ||
934 | static int nl80211_dump_station(struct sk_buff *skb, | 937 | static int nl80211_dump_station(struct sk_buff *skb, |
@@ -1267,7 +1270,8 @@ static int nl80211_send_mpath(struct sk_buff *msg, u32 pid, u32 seq, | |||
1267 | return genlmsg_end(msg, hdr); | 1270 | return genlmsg_end(msg, hdr); |
1268 | 1271 | ||
1269 | nla_put_failure: | 1272 | nla_put_failure: |
1270 | return genlmsg_cancel(msg, hdr); | 1273 | genlmsg_cancel(msg, hdr); |
1274 | return -EMSGSIZE; | ||
1271 | } | 1275 | } |
1272 | 1276 | ||
1273 | static int nl80211_dump_mpath(struct sk_buff *skb, | 1277 | static int nl80211_dump_mpath(struct sk_buff *skb, |
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index ac765dd9c7f5..23a2cc04b8cd 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c | |||
@@ -200,8 +200,8 @@ static struct xfrm_algo_desc aalg_list[] = { | |||
200 | } | 200 | } |
201 | }, | 201 | }, |
202 | { | 202 | { |
203 | .name = "hmac(ripemd160)", | 203 | .name = "hmac(rmd160)", |
204 | .compat = "ripemd160", | 204 | .compat = "rmd160", |
205 | 205 | ||
206 | .uinfo = { | 206 | .uinfo = { |
207 | .auth = { | 207 | .auth = { |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index a1b0fbe3ea35..b976d9ed10e4 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -50,19 +50,8 @@ static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type) | |||
50 | 50 | ||
51 | switch (type) { | 51 | switch (type) { |
52 | case XFRMA_ALG_AUTH: | 52 | case XFRMA_ALG_AUTH: |
53 | if (!algp->alg_key_len && | ||
54 | strcmp(algp->alg_name, "digest_null") != 0) | ||
55 | return -EINVAL; | ||
56 | break; | ||
57 | |||
58 | case XFRMA_ALG_CRYPT: | 53 | case XFRMA_ALG_CRYPT: |
59 | if (!algp->alg_key_len && | ||
60 | strcmp(algp->alg_name, "cipher_null") != 0) | ||
61 | return -EINVAL; | ||
62 | break; | ||
63 | |||
64 | case XFRMA_ALG_COMP: | 54 | case XFRMA_ALG_COMP: |
65 | /* Zero length keys are legal. */ | ||
66 | break; | 55 | break; |
67 | 56 | ||
68 | default: | 57 | default: |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index a098a0454dc8..17092d6c7db3 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -43,7 +43,13 @@ _modpost: __modpost | |||
43 | include include/config/auto.conf | 43 | include include/config/auto.conf |
44 | include scripts/Kbuild.include | 44 | include scripts/Kbuild.include |
45 | 45 | ||
46 | # When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info | ||
46 | ifneq ($(KBUILD_EXTMOD),) | 47 | ifneq ($(KBUILD_EXTMOD),) |
48 | |||
49 | # set src + obj - they may be used when building the .mod.c file | ||
50 | obj := $(KBUILD_EXTMOD) | ||
51 | src := $(obj) | ||
52 | |||
47 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS | 53 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS |
48 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ | 54 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ |
49 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) | 55 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b6bbbcdc557e..6971bf078d13 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -9,7 +9,7 @@ use strict; | |||
9 | my $P = $0; | 9 | my $P = $0; |
10 | $P =~ s@.*/@@g; | 10 | $P =~ s@.*/@@g; |
11 | 11 | ||
12 | my $V = '0.18'; | 12 | my $V = '0.19'; |
13 | 13 | ||
14 | use Getopt::Long qw(:config no_auto_abbrev); | 14 | use Getopt::Long qw(:config no_auto_abbrev); |
15 | 15 | ||
@@ -115,6 +115,7 @@ our $Attribute = qr{ | |||
115 | __kprobes| | 115 | __kprobes| |
116 | __(?:mem|cpu|dev|)(?:initdata|init) | 116 | __(?:mem|cpu|dev|)(?:initdata|init) |
117 | }x; | 117 | }x; |
118 | our $Modifier; | ||
118 | our $Inline = qr{inline|__always_inline|noinline}; | 119 | our $Inline = qr{inline|__always_inline|noinline}; |
119 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; | 120 | our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; |
120 | our $Lval = qr{$Ident(?:$Member)*}; | 121 | our $Lval = qr{$Ident(?:$Member)*}; |
@@ -144,17 +145,17 @@ our $UTF8 = qr { | |||
144 | 145 | ||
145 | our @typeList = ( | 146 | our @typeList = ( |
146 | qr{void}, | 147 | qr{void}, |
147 | qr{char}, | 148 | qr{(?:unsigned\s+)?char}, |
148 | qr{short}, | 149 | qr{(?:unsigned\s+)?short}, |
149 | qr{int}, | 150 | qr{(?:unsigned\s+)?int}, |
150 | qr{long}, | 151 | qr{(?:unsigned\s+)?long}, |
152 | qr{(?:unsigned\s+)?long\s+int}, | ||
153 | qr{(?:unsigned\s+)?long\s+long}, | ||
154 | qr{(?:unsigned\s+)?long\s+long\s+int}, | ||
151 | qr{unsigned}, | 155 | qr{unsigned}, |
152 | qr{float}, | 156 | qr{float}, |
153 | qr{double}, | 157 | qr{double}, |
154 | qr{bool}, | 158 | qr{bool}, |
155 | qr{long\s+int}, | ||
156 | qr{long\s+long}, | ||
157 | qr{long\s+long\s+int}, | ||
158 | qr{(?:__)?(?:u|s|be|le)(?:8|16|32|64)}, | 159 | qr{(?:__)?(?:u|s|be|le)(?:8|16|32|64)}, |
159 | qr{struct\s+$Ident}, | 160 | qr{struct\s+$Ident}, |
160 | qr{union\s+$Ident}, | 161 | qr{union\s+$Ident}, |
@@ -163,26 +164,29 @@ our @typeList = ( | |||
163 | qr{${Ident}_handler}, | 164 | qr{${Ident}_handler}, |
164 | qr{${Ident}_handler_fn}, | 165 | qr{${Ident}_handler_fn}, |
165 | ); | 166 | ); |
167 | our @modifierList = ( | ||
168 | qr{fastcall}, | ||
169 | ); | ||
166 | 170 | ||
167 | sub build_types { | 171 | sub build_types { |
172 | my $mods = "(?: \n" . join("|\n ", @modifierList) . "\n)"; | ||
168 | my $all = "(?: \n" . join("|\n ", @typeList) . "\n)"; | 173 | my $all = "(?: \n" . join("|\n ", @typeList) . "\n)"; |
169 | $NonptrType = qr{ | 174 | $NonptrType = qr{ |
170 | \b | ||
171 | (?:const\s+)? | 175 | (?:const\s+)? |
172 | (?:unsigned\s+)? | 176 | (?:$mods\s+)? |
173 | (?: | 177 | (?: |
174 | $all| | 178 | (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)| |
175 | (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\) | 179 | (?:${all}\b) |
176 | ) | 180 | ) |
177 | (?:\s+$Sparse|\s+const)* | 181 | (?:\s+$Sparse|\s+const)* |
178 | \b | ||
179 | }x; | 182 | }x; |
180 | $Type = qr{ | 183 | $Type = qr{ |
181 | \b$NonptrType\b | 184 | $NonptrType |
182 | (?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)? | 185 | (?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)? |
183 | (?:\s+$Inline|\s+$Sparse|\s+$Attribute)* | 186 | (?:\s+$Inline|\s+$Sparse|\s+$Attribute|\s+$mods)* |
184 | }x; | 187 | }x; |
185 | $Declare = qr{(?:$Storage\s+)?$Type}; | 188 | $Declare = qr{(?:$Storage\s+)?$Type}; |
189 | $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; | ||
186 | } | 190 | } |
187 | build_types(); | 191 | build_types(); |
188 | 192 | ||
@@ -329,7 +333,7 @@ sub sanitise_line { | |||
329 | $off++; | 333 | $off++; |
330 | next; | 334 | next; |
331 | } | 335 | } |
332 | if (substr($line, $off, 2) eq $sanitise_quote) { | 336 | if (substr($line, $off, 2) eq '*/') { |
333 | $sanitise_quote = ''; | 337 | $sanitise_quote = ''; |
334 | substr($res, $off, 2, "$;$;"); | 338 | substr($res, $off, 2, "$;$;"); |
335 | $off++; | 339 | $off++; |
@@ -366,14 +370,14 @@ sub sanitise_line { | |||
366 | } | 370 | } |
367 | 371 | ||
368 | # The pathname on a #include may be surrounded by '<' and '>'. | 372 | # The pathname on a #include may be surrounded by '<' and '>'. |
369 | if ($res =~ /^.#\s*include\s+\<(.*)\>/) { | 373 | if ($res =~ /^.\s*\#\s*include\s+\<(.*)\>/) { |
370 | my $clean = 'X' x length($1); | 374 | my $clean = 'X' x length($1); |
371 | $res =~ s@\<.*\>@<$clean>@; | 375 | $res =~ s@\<.*\>@<$clean>@; |
372 | 376 | ||
373 | # The whole of a #error is a string. | 377 | # The whole of a #error is a string. |
374 | } elsif ($res =~ /^.#\s*(?:error|warning)\s+(.*)\b/) { | 378 | } elsif ($res =~ /^.\s*\#\s*(?:error|warning)\s+(.*)\b/) { |
375 | my $clean = 'X' x length($1); | 379 | my $clean = 'X' x length($1); |
376 | $res =~ s@(#\s*(?:error|warning)\s+).*@$1$clean@; | 380 | $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@; |
377 | } | 381 | } |
378 | 382 | ||
379 | return $res; | 383 | return $res; |
@@ -715,7 +719,7 @@ sub annotate_values { | |||
715 | print "DECLARE($1)\n" if ($dbg_values > 1); | 719 | print "DECLARE($1)\n" if ($dbg_values > 1); |
716 | $type = 'T'; | 720 | $type = 'T'; |
717 | 721 | ||
718 | } elsif ($cur =~ /^(#\s*define\s*$Ident)(\(?)/o) { | 722 | } elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) { |
719 | print "DEFINE($1,$2)\n" if ($dbg_values > 1); | 723 | print "DEFINE($1,$2)\n" if ($dbg_values > 1); |
720 | $av_preprocessor = 1; | 724 | $av_preprocessor = 1; |
721 | push(@av_paren_type, $type); | 725 | push(@av_paren_type, $type); |
@@ -724,12 +728,12 @@ sub annotate_values { | |||
724 | } | 728 | } |
725 | $type = 'E'; | 729 | $type = 'E'; |
726 | 730 | ||
727 | } elsif ($cur =~ /^(#\s*undef\s*$Ident)/o) { | 731 | } elsif ($cur =~ /^(\#\s*(?:undef\s*$Ident|include\b))/o) { |
728 | print "UNDEF($1)\n" if ($dbg_values > 1); | 732 | print "UNDEF($1)\n" if ($dbg_values > 1); |
729 | $av_preprocessor = 1; | 733 | $av_preprocessor = 1; |
730 | push(@av_paren_type, $type); | 734 | push(@av_paren_type, $type); |
731 | 735 | ||
732 | } elsif ($cur =~ /^(#\s*(?:ifdef|ifndef|if))/o) { | 736 | } elsif ($cur =~ /^(\#\s*(?:ifdef|ifndef|if))/o) { |
733 | print "PRE_START($1)\n" if ($dbg_values > 1); | 737 | print "PRE_START($1)\n" if ($dbg_values > 1); |
734 | $av_preprocessor = 1; | 738 | $av_preprocessor = 1; |
735 | 739 | ||
@@ -737,7 +741,7 @@ sub annotate_values { | |||
737 | push(@av_paren_type, $type); | 741 | push(@av_paren_type, $type); |
738 | $type = 'E'; | 742 | $type = 'E'; |
739 | 743 | ||
740 | } elsif ($cur =~ /^(#\s*(?:else|elif))/o) { | 744 | } elsif ($cur =~ /^(\#\s*(?:else|elif))/o) { |
741 | print "PRE_RESTART($1)\n" if ($dbg_values > 1); | 745 | print "PRE_RESTART($1)\n" if ($dbg_values > 1); |
742 | $av_preprocessor = 1; | 746 | $av_preprocessor = 1; |
743 | 747 | ||
@@ -745,7 +749,7 @@ sub annotate_values { | |||
745 | 749 | ||
746 | $type = 'E'; | 750 | $type = 'E'; |
747 | 751 | ||
748 | } elsif ($cur =~ /^(#\s*(?:endif))/o) { | 752 | } elsif ($cur =~ /^(\#\s*(?:endif))/o) { |
749 | print "PRE_END($1)\n" if ($dbg_values > 1); | 753 | print "PRE_END($1)\n" if ($dbg_values > 1); |
750 | 754 | ||
751 | $av_preprocessor = 1; | 755 | $av_preprocessor = 1; |
@@ -837,14 +841,26 @@ sub annotate_values { | |||
837 | sub possible { | 841 | sub possible { |
838 | my ($possible, $line) = @_; | 842 | my ($possible, $line) = @_; |
839 | 843 | ||
840 | #print "CHECK<$possible>\n"; | 844 | print "CHECK<$possible> ($line)\n" if ($dbg_possible > 1); |
841 | if ($possible !~ /^(?:$Storage|$Type|DEFINE_\S+)$/ && | 845 | if ($possible !~ /^(?:$Storage|$Type|DEFINE_\S+)$/ && |
842 | $possible ne 'goto' && $possible ne 'return' && | 846 | $possible ne 'goto' && $possible ne 'return' && |
843 | $possible ne 'struct' && $possible ne 'enum' && | ||
844 | $possible ne 'case' && $possible ne 'else' && | 847 | $possible ne 'case' && $possible ne 'else' && |
845 | $possible ne 'typedef') { | 848 | $possible ne 'asm' && |
846 | warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); | 849 | $possible !~ /^(typedef|struct|enum)\b/) { |
847 | push(@typeList, $possible); | 850 | # Check for modifiers. |
851 | $possible =~ s/\s*$Storage\s*//g; | ||
852 | $possible =~ s/\s*$Sparse\s*//g; | ||
853 | if ($possible =~ /^\s*$/) { | ||
854 | |||
855 | } elsif ($possible =~ /\s/) { | ||
856 | $possible =~ s/\s*$Type\s*//g; | ||
857 | warn "MODIFIER: $possible ($line)\n" if ($dbg_possible); | ||
858 | push(@modifierList, $possible); | ||
859 | |||
860 | } else { | ||
861 | warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); | ||
862 | push(@typeList, $possible); | ||
863 | } | ||
848 | build_types(); | 864 | build_types(); |
849 | } | 865 | } |
850 | } | 866 | } |
@@ -949,6 +965,7 @@ sub process { | |||
949 | } else { | 965 | } else { |
950 | $realcnt=1+1; | 966 | $realcnt=1+1; |
951 | } | 967 | } |
968 | $in_comment = 0; | ||
952 | 969 | ||
953 | # Guestimate if this is a continuing comment. Run | 970 | # Guestimate if this is a continuing comment. Run |
954 | # the context looking for a comment "edge". If this | 971 | # the context looking for a comment "edge". If this |
@@ -1117,7 +1134,9 @@ sub process { | |||
1117 | ERROR("trailing whitespace\n" . $herevet); | 1134 | ERROR("trailing whitespace\n" . $herevet); |
1118 | } | 1135 | } |
1119 | #80 column limit | 1136 | #80 column limit |
1120 | if ($line =~ /^\+/ && !($prevrawline=~/\/\*\*/) && $length > 80) { | 1137 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && |
1138 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && $length > 80) | ||
1139 | { | ||
1121 | WARN("line over 80 characters\n" . $herecurr); | 1140 | WARN("line over 80 characters\n" . $herecurr); |
1122 | } | 1141 | } |
1123 | 1142 | ||
@@ -1159,18 +1178,20 @@ sub process { | |||
1159 | # Ignore functions being called | 1178 | # Ignore functions being called |
1160 | } elsif ($s =~ /^.\s*$Ident\s*\(/s) { | 1179 | } elsif ($s =~ /^.\s*$Ident\s*\(/s) { |
1161 | 1180 | ||
1181 | # declarations always start with types | ||
1182 | } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))\s*(?:;|=|,|\()/s) { | ||
1183 | my $type = $1; | ||
1184 | $type =~ s/\s+/ /g; | ||
1185 | possible($type, "A:" . $s); | ||
1186 | |||
1162 | # definitions in global scope can only start with types | 1187 | # definitions in global scope can only start with types |
1163 | } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) { | 1188 | } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) { |
1164 | possible($1, $s); | 1189 | possible($1, "B:" . $s); |
1165 | |||
1166 | # declarations always start with types | ||
1167 | } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:const\s+)?($Ident)\b(:?\s+$Sparse)?\s*\**\s*$Ident\s*(?:;|=|,)/s) { | ||
1168 | possible($1, $s); | ||
1169 | } | 1190 | } |
1170 | 1191 | ||
1171 | # any (foo ... *) is a pointer cast, and foo is a type | 1192 | # any (foo ... *) is a pointer cast, and foo is a type |
1172 | while ($s =~ /\(($Ident)(?:\s+$Sparse)*\s*\*+\s*\)/sg) { | 1193 | while ($s =~ /\(($Ident)(?:\s+$Sparse)*\s*\*+\s*\)/sg) { |
1173 | possible($1, $s); | 1194 | possible($1, "C:" . $s); |
1174 | } | 1195 | } |
1175 | 1196 | ||
1176 | # Check for any sort of function declaration. | 1197 | # Check for any sort of function declaration. |
@@ -1184,9 +1205,9 @@ sub process { | |||
1184 | $ctx =~ s/\)[^\)]*$//; | 1205 | $ctx =~ s/\)[^\)]*$//; |
1185 | 1206 | ||
1186 | for my $arg (split(/\s*,\s*/, $ctx)) { | 1207 | for my $arg (split(/\s*,\s*/, $ctx)) { |
1187 | if ($arg =~ /^(?:const\s+)?($Ident)(?:\s+$Sparse)*\s*\**\s*(:?\b$Ident)?$/ || $arg =~ /^($Ident)$/) { | 1208 | if ($arg =~ /^(?:const\s+)?($Ident)(?:\s+$Sparse)*\s*\**\s*(:?\b$Ident)?$/s || $arg =~ /^($Ident)$/s) { |
1188 | 1209 | ||
1189 | possible($1, $s); | 1210 | possible($1, "D:" . $s); |
1190 | } | 1211 | } |
1191 | } | 1212 | } |
1192 | } | 1213 | } |
@@ -1221,7 +1242,7 @@ sub process { | |||
1221 | 1242 | ||
1222 | # if/while/etc brace do not go on next line, unless defining a do while loop, | 1243 | # if/while/etc brace do not go on next line, unless defining a do while loop, |
1223 | # or if that brace on the next line is for something else | 1244 | # or if that brace on the next line is for something else |
1224 | if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.#/) { | 1245 | if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) { |
1225 | my $pre_ctx = "$1$2"; | 1246 | my $pre_ctx = "$1$2"; |
1226 | 1247 | ||
1227 | my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); | 1248 | my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); |
@@ -1239,7 +1260,7 @@ sub process { | |||
1239 | 1260 | ||
1240 | if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) { | 1261 | if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) { |
1241 | ERROR("that open brace { should be on the previous line\n" . | 1262 | ERROR("that open brace { should be on the previous line\n" . |
1242 | "$here\n$ctx\n$lines[$ctx_ln - 1]"); | 1263 | "$here\n$ctx\n$lines[$ctx_ln - 1]\n"); |
1243 | } | 1264 | } |
1244 | if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ && | 1265 | if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ && |
1245 | $ctx =~ /\)\s*\;\s*$/ && | 1266 | $ctx =~ /\)\s*\;\s*$/ && |
@@ -1248,7 +1269,7 @@ sub process { | |||
1248 | my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]); | 1269 | my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]); |
1249 | if ($nindent > $indent) { | 1270 | if ($nindent > $indent) { |
1250 | WARN("trailing semicolon indicates no statements, indent implies otherwise\n" . | 1271 | WARN("trailing semicolon indicates no statements, indent implies otherwise\n" . |
1251 | "$here\n$ctx\n$lines[$ctx_ln - 1]"); | 1272 | "$here\n$ctx\n$lines[$ctx_ln - 1]\n"); |
1252 | } | 1273 | } |
1253 | } | 1274 | } |
1254 | } | 1275 | } |
@@ -1284,7 +1305,7 @@ sub process { | |||
1284 | # | 1305 | # |
1285 | 1306 | ||
1286 | # check for malformed paths in #include statements (uses RAW line) | 1307 | # check for malformed paths in #include statements (uses RAW line) |
1287 | if ($rawline =~ m{^.#\s*include\s+[<"](.*)[">]}) { | 1308 | if ($rawline =~ m{^.\s*\#\s*include\s+[<"](.*)[">]}) { |
1288 | my $path = $1; | 1309 | my $path = $1; |
1289 | if ($path =~ m{//}) { | 1310 | if ($path =~ m{//}) { |
1290 | ERROR("malformed #include filename\n" . | 1311 | ERROR("malformed #include filename\n" . |
@@ -1316,7 +1337,7 @@ sub process { | |||
1316 | } | 1337 | } |
1317 | 1338 | ||
1318 | # check for external initialisers. | 1339 | # check for external initialisers. |
1319 | if ($line =~ /^.$Type\s*$Ident\s*=\s*(0|NULL|false)\s*;/) { | 1340 | if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { |
1320 | ERROR("do not initialise externals to 0 or NULL\n" . | 1341 | ERROR("do not initialise externals to 0 or NULL\n" . |
1321 | $herecurr); | 1342 | $herecurr); |
1322 | } | 1343 | } |
@@ -1330,6 +1351,7 @@ sub process { | |||
1330 | # make sense. | 1351 | # make sense. |
1331 | if ($line =~ /\btypedef\s/ && | 1352 | if ($line =~ /\btypedef\s/ && |
1332 | $line !~ /\btypedef\s+$Type\s+\(\s*\*?$Ident\s*\)\s*\(/ && | 1353 | $line !~ /\btypedef\s+$Type\s+\(\s*\*?$Ident\s*\)\s*\(/ && |
1354 | $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ && | ||
1333 | $line !~ /\b__bitwise(?:__|)\b/) { | 1355 | $line !~ /\b__bitwise(?:__|)\b/) { |
1334 | WARN("do not add new typedefs\n" . $herecurr); | 1356 | WARN("do not add new typedefs\n" . $herecurr); |
1335 | } | 1357 | } |
@@ -1388,8 +1410,8 @@ sub process { | |||
1388 | 1410 | ||
1389 | # function brace can't be on same line, except for #defines of do while, | 1411 | # function brace can't be on same line, except for #defines of do while, |
1390 | # or if closed on same line | 1412 | # or if closed on same line |
1391 | if (($line=~/$Type\s*[A-Za-z\d_]+\(.*\).*\s{/) and | 1413 | if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and |
1392 | !($line=~/\#define.*do\s{/) and !($line=~/}/)) { | 1414 | !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) { |
1393 | ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr); | 1415 | ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr); |
1394 | } | 1416 | } |
1395 | 1417 | ||
@@ -1416,10 +1438,10 @@ sub process { | |||
1416 | # cpp #define statements have non-optional spaces, ie | 1438 | # cpp #define statements have non-optional spaces, ie |
1417 | # if there is a space between the name and the open | 1439 | # if there is a space between the name and the open |
1418 | # parenthesis it is simply not a parameter group. | 1440 | # parenthesis it is simply not a parameter group. |
1419 | } elsif ($ctx_before =~ /^.\#\s*define\s*$/) { | 1441 | } elsif ($ctx_before =~ /^.\s*\#\s*define\s*$/) { |
1420 | 1442 | ||
1421 | # cpp #elif statement condition may start with a ( | 1443 | # cpp #elif statement condition may start with a ( |
1422 | } elsif ($ctx =~ /^.\#\s*elif\s*$/) { | 1444 | } elsif ($ctx =~ /^.\s*\#\s*elif\s*$/) { |
1423 | 1445 | ||
1424 | # If this whole things ends with a type its most | 1446 | # If this whole things ends with a type its most |
1425 | # likely a typedef for a function. | 1447 | # likely a typedef for a function. |
@@ -1625,13 +1647,14 @@ sub process { | |||
1625 | ERROR("space prohibited before that close square bracket ']'\n" . $herecurr); | 1647 | ERROR("space prohibited before that close square bracket ']'\n" . $herecurr); |
1626 | } | 1648 | } |
1627 | 1649 | ||
1628 | # check spacing on paretheses | 1650 | # check spacing on parentheses |
1629 | if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ && | 1651 | if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ && |
1630 | $line !~ /for\s*\(\s+;/) { | 1652 | $line !~ /for\s*\(\s+;/) { |
1631 | ERROR("space prohibited after that open parenthesis '('\n" . $herecurr); | 1653 | ERROR("space prohibited after that open parenthesis '('\n" . $herecurr); |
1632 | } | 1654 | } |
1633 | if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && | 1655 | if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && |
1634 | $line !~ /for\s*\(.*;\s+\)/) { | 1656 | $line !~ /for\s*\(.*;\s+\)/ && |
1657 | $line !~ /:\s+\)/) { | ||
1635 | ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr); | 1658 | ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr); |
1636 | } | 1659 | } |
1637 | 1660 | ||
@@ -1641,6 +1664,23 @@ sub process { | |||
1641 | WARN("labels should not be indented\n" . $herecurr); | 1664 | WARN("labels should not be indented\n" . $herecurr); |
1642 | } | 1665 | } |
1643 | 1666 | ||
1667 | # Return is not a function. | ||
1668 | if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) { | ||
1669 | my $spacing = $1; | ||
1670 | my $value = $2; | ||
1671 | |||
1672 | # Flatten any parentheses and braces | ||
1673 | while ($value =~ s/\([^\(\)]*\)/1/) { | ||
1674 | } | ||
1675 | |||
1676 | if ($value =~ /^(?:$Ident|-?$Constant)$/) { | ||
1677 | ERROR("return is not a function, parentheses are not required\n" . $herecurr); | ||
1678 | |||
1679 | } elsif ($spacing !~ /\s+/) { | ||
1680 | ERROR("space required before the open parenthesis '('\n" . $herecurr); | ||
1681 | } | ||
1682 | } | ||
1683 | |||
1644 | # Need a space before open parenthesis after if, while etc | 1684 | # Need a space before open parenthesis after if, while etc |
1645 | if ($line=~/\b(if|while|for|switch)\(/) { | 1685 | if ($line=~/\b(if|while|for|switch)\(/) { |
1646 | ERROR("space required before the open parenthesis '('\n" . $herecurr); | 1686 | ERROR("space required before the open parenthesis '('\n" . $herecurr); |
@@ -1660,7 +1700,7 @@ sub process { | |||
1660 | $s =~ s/\n.*//g; | 1700 | $s =~ s/\n.*//g; |
1661 | $s =~ s/$;//g; # Remove any comments | 1701 | $s =~ s/$;//g; # Remove any comments |
1662 | if (length($c) && $s !~ /^\s*({|;|)\s*\\*\s*$/ && | 1702 | if (length($c) && $s !~ /^\s*({|;|)\s*\\*\s*$/ && |
1663 | $c !~ /^.\#\s*if/) | 1703 | $c !~ /^.\s*\#\s*if/) |
1664 | { | 1704 | { |
1665 | ERROR("trailing statements should be on next line\n" . $herecurr); | 1705 | ERROR("trailing statements should be on next line\n" . $herecurr); |
1666 | } | 1706 | } |
@@ -1719,14 +1759,16 @@ sub process { | |||
1719 | # } | 1759 | # } |
1720 | 1760 | ||
1721 | #no spaces allowed after \ in define | 1761 | #no spaces allowed after \ in define |
1722 | if ($line=~/\#define.*\\\s$/) { | 1762 | if ($line=~/\#\s*define.*\\\s$/) { |
1723 | WARN("Whitepspace after \\ makes next lines useless\n" . $herecurr); | 1763 | WARN("Whitepspace after \\ makes next lines useless\n" . $herecurr); |
1724 | } | 1764 | } |
1725 | 1765 | ||
1726 | #warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line) | 1766 | #warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line) |
1727 | if ($tree && $rawline =~ m{^.\#\s*include\s*\<asm\/(.*)\.h\>}) { | 1767 | if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\<asm\/(.*)\.h\>}) { |
1728 | my $checkfile = "$root/include/linux/$1.h"; | 1768 | my $checkfile = "include/linux/$1.h"; |
1729 | if (-f $checkfile && $1 ne 'irq') { | 1769 | if (-f "$root/$checkfile" && $realfile ne $checkfile && |
1770 | $1 ne 'irq') | ||
1771 | { | ||
1730 | WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\n" . | 1772 | WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\n" . |
1731 | $herecurr); | 1773 | $herecurr); |
1732 | } | 1774 | } |
@@ -1735,45 +1777,87 @@ sub process { | |||
1735 | # multi-statement macros should be enclosed in a do while loop, grab the | 1777 | # multi-statement macros should be enclosed in a do while loop, grab the |
1736 | # first statement and ensure its the whole macro if its not enclosed | 1778 | # first statement and ensure its the whole macro if its not enclosed |
1737 | # in a known good container | 1779 | # in a known good container |
1738 | if ($prevline =~ /\#define.*\\/ && | 1780 | if ($line =~ /^.\s*\#\s*define\s*$Ident(\()?/) { |
1739 | $prevline !~/(?:do\s+{|\(\{|\{)/ && | ||
1740 | $line !~ /(?:do\s+{|\(\{|\{)/ && | ||
1741 | $line !~ /^.\s*$Declare\s/) { | ||
1742 | # Grab the first statement, if that is the entire macro | ||
1743 | # its ok. This may start either on the #define line | ||
1744 | # or the one below. | ||
1745 | my $ln = $linenr; | 1781 | my $ln = $linenr; |
1746 | my $cnt = $realcnt; | 1782 | my $cnt = $realcnt; |
1747 | my $off = 0; | 1783 | my ($off, $dstat, $dcond, $rest); |
1784 | my $ctx = ''; | ||
1748 | 1785 | ||
1749 | # If the macro starts on the define line start | 1786 | my $args = defined($1); |
1750 | # grabbing the statement after the identifier | 1787 | |
1751 | $prevline =~ m{^(.#\s*define\s*$Ident(?:\([^\)]*\))?\s*)(.*)\\\s*$}; | 1788 | # Find the end of the macro and limit our statement |
1752 | ##print "1<$1> 2<$2>\n"; | 1789 | # search to that. |
1753 | if (defined $2 && $2 ne '') { | 1790 | while ($cnt > 0 && defined $lines[$ln - 1] && |
1754 | $off = length($1); | 1791 | $lines[$ln - 1] =~ /^(?:-|..*\\$)/) |
1755 | $ln--; | 1792 | { |
1756 | $cnt++; | 1793 | $ctx .= $rawlines[$ln - 1] . "\n"; |
1757 | while ($lines[$ln - 1] =~ /^-/) { | 1794 | $ln++; |
1758 | $ln--; | 1795 | $cnt--; |
1759 | $cnt++; | 1796 | } |
1760 | } | 1797 | $ctx .= $rawlines[$ln - 1]; |
1798 | |||
1799 | ($dstat, $dcond, $ln, $cnt, $off) = | ||
1800 | ctx_statement_block($linenr, $ln - $linenr + 1, 0); | ||
1801 | #print "dstat<$dstat> dcond<$dcond> cnt<$cnt> off<$off>\n"; | ||
1802 | #print "LINE<$lines[$ln]> len<" . length($lines[$ln]) . "\n"; | ||
1803 | |||
1804 | # Extract the remainder of the define (if any) and | ||
1805 | # rip off surrounding spaces, and trailing \'s. | ||
1806 | $rest = ''; | ||
1807 | if (defined $lines[$ln - 1] && | ||
1808 | $off > length($lines[$ln - 1])) | ||
1809 | { | ||
1810 | $ln++; | ||
1811 | $cnt--; | ||
1812 | $off = 0; | ||
1813 | } | ||
1814 | while ($cnt > 0) { | ||
1815 | $rest .= substr($lines[$ln - 1], $off) . "\n"; | ||
1816 | $ln++; | ||
1817 | $cnt--; | ||
1818 | $off = 0; | ||
1819 | } | ||
1820 | $rest =~ s/\\\n.//g; | ||
1821 | $rest =~ s/^\s*//s; | ||
1822 | $rest =~ s/\s*$//s; | ||
1823 | |||
1824 | # Clean up the original statement. | ||
1825 | if ($args) { | ||
1826 | substr($dstat, 0, length($dcond), ''); | ||
1827 | } else { | ||
1828 | $dstat =~ s/^.\s*\#\s*define\s+$Ident\s*//; | ||
1761 | } | 1829 | } |
1762 | my @ctx = ctx_statement($ln, $cnt, $off); | 1830 | $dstat =~ s/\\\n.//g; |
1763 | my $ctx_ln = $ln + $#ctx + 1; | 1831 | $dstat =~ s/^\s*//s; |
1764 | my $ctx = join("\n", @ctx); | 1832 | $dstat =~ s/\s*$//s; |
1765 | 1833 | ||
1766 | # Pull in any empty extension lines. | 1834 | # Flatten any parentheses and braces |
1767 | while ($ctx =~ /\\$/ && | 1835 | while ($dstat =~ s/\([^\(\)]*\)/1/) { |
1768 | $lines[$ctx_ln - 1] =~ /^.\s*(?:\\)?$/) { | 1836 | } |
1769 | $ctx .= $lines[$ctx_ln - 1]; | 1837 | while ($dstat =~ s/\{[^\{\}]*\}/1/) { |
1770 | $ctx_ln++; | ||
1771 | } | 1838 | } |
1772 | 1839 | ||
1773 | if ($ctx =~ /\\$/) { | 1840 | my $exceptions = qr{ |
1774 | if ($ctx =~ /;/) { | 1841 | $Declare| |
1842 | module_param_named| | ||
1843 | MODULE_PARAM_DESC| | ||
1844 | DECLARE_PER_CPU| | ||
1845 | DEFINE_PER_CPU| | ||
1846 | __typeof__\( | ||
1847 | }x; | ||
1848 | if ($rest ne '') { | ||
1849 | if ($rest !~ /while\s*\(/ && | ||
1850 | $dstat !~ /$exceptions/) | ||
1851 | { | ||
1775 | ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n"); | 1852 | ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n"); |
1776 | } else { | 1853 | } |
1854 | |||
1855 | } elsif ($ctx !~ /;/) { | ||
1856 | if ($dstat ne '' && | ||
1857 | $dstat !~ /^(?:$Ident|-?$Constant)$/ && | ||
1858 | $dstat !~ /$exceptions/ && | ||
1859 | $dstat =~ /$Operators/) | ||
1860 | { | ||
1777 | ERROR("Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n"); | 1861 | ERROR("Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n"); |
1778 | } | 1862 | } |
1779 | } | 1863 | } |
@@ -1884,7 +1968,7 @@ sub process { | |||
1884 | 1968 | ||
1885 | # don't include deprecated include files (uses RAW line) | 1969 | # don't include deprecated include files (uses RAW line) |
1886 | for my $inc (@dep_includes) { | 1970 | for my $inc (@dep_includes) { |
1887 | if ($rawline =~ m@\#\s*include\s*\<$inc>@) { | 1971 | if ($rawline =~ m@^.\s*\#\s*include\s*\<$inc>@) { |
1888 | ERROR("Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr); | 1972 | ERROR("Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr); |
1889 | } | 1973 | } |
1890 | } | 1974 | } |
@@ -1908,7 +1992,7 @@ sub process { | |||
1908 | } | 1992 | } |
1909 | 1993 | ||
1910 | # warn about #if 0 | 1994 | # warn about #if 0 |
1911 | if ($line =~ /^.#\s*if\s+0\b/) { | 1995 | if ($line =~ /^.\s*\#\s*if\s+0\b/) { |
1912 | CHK("if this code is redundant consider removing it\n" . | 1996 | CHK("if this code is redundant consider removing it\n" . |
1913 | $herecurr); | 1997 | $herecurr); |
1914 | } | 1998 | } |
@@ -1920,23 +2004,16 @@ sub process { | |||
1920 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); | 2004 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); |
1921 | } | 2005 | } |
1922 | } | 2006 | } |
1923 | # check for needless usb_free_urb() checks | ||
1924 | if ($prevline =~ /\bif\s*\(([^\)]*)\)/) { | ||
1925 | my $expr = $1; | ||
1926 | if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) { | ||
1927 | WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev); | ||
1928 | } | ||
1929 | } | ||
1930 | 2007 | ||
1931 | # warn about #ifdefs in C files | 2008 | # warn about #ifdefs in C files |
1932 | # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { | 2009 | # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { |
1933 | # print "#ifdef in C files should be avoided\n"; | 2010 | # print "#ifdef in C files should be avoided\n"; |
1934 | # print "$herecurr"; | 2011 | # print "$herecurr"; |
1935 | # $clean = 0; | 2012 | # $clean = 0; |
1936 | # } | 2013 | # } |
1937 | 2014 | ||
1938 | # warn about spacing in #ifdefs | 2015 | # warn about spacing in #ifdefs |
1939 | if ($line =~ /^.#\s*(ifdef|ifndef|elif)\s\s+/) { | 2016 | if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) { |
1940 | ERROR("exactly one space required after that #$1\n" . $herecurr); | 2017 | ERROR("exactly one space required after that #$1\n" . $herecurr); |
1941 | } | 2018 | } |
1942 | 2019 | ||
@@ -1955,7 +2032,7 @@ sub process { | |||
1955 | } | 2032 | } |
1956 | } | 2033 | } |
1957 | # check of hardware specific defines | 2034 | # check of hardware specific defines |
1958 | if ($line =~ m@^.#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) { | 2035 | if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) { |
1959 | CHK("architecture specific defines should be avoided\n" . $herecurr); | 2036 | CHK("architecture specific defines should be avoided\n" . $herecurr); |
1960 | } | 2037 | } |
1961 | 2038 | ||
@@ -1973,15 +2050,18 @@ sub process { | |||
1973 | 2050 | ||
1974 | # check for new externs in .c files. | 2051 | # check for new externs in .c files. |
1975 | if ($realfile =~ /\.c$/ && defined $stat && | 2052 | if ($realfile =~ /\.c$/ && defined $stat && |
1976 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+$Ident(\s*)\(/s) | 2053 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) |
1977 | { | 2054 | { |
1978 | my $paren_space = $1; | 2055 | my $function_name = $1; |
2056 | my $paren_space = $2; | ||
1979 | 2057 | ||
1980 | my $s = $stat; | 2058 | my $s = $stat; |
1981 | if (defined $cond) { | 2059 | if (defined $cond) { |
1982 | substr($s, 0, length($cond), ''); | 2060 | substr($s, 0, length($cond), ''); |
1983 | } | 2061 | } |
1984 | if ($s =~ /^\s*;/) { | 2062 | if ($s =~ /^\s*;/ && |
2063 | $function_name ne 'uninitialized_var') | ||
2064 | { | ||
1985 | WARN("externs should be avoided in .c files\n" . $herecurr); | 2065 | WARN("externs should be avoided in .c files\n" . $herecurr); |
1986 | } | 2066 | } |
1987 | 2067 | ||
@@ -2030,8 +2110,8 @@ sub process { | |||
2030 | # use of NR_CPUS is usually wrong | 2110 | # use of NR_CPUS is usually wrong |
2031 | # ignore definitions of NR_CPUS and usage to define arrays as likely right | 2111 | # ignore definitions of NR_CPUS and usage to define arrays as likely right |
2032 | if ($line =~ /\bNR_CPUS\b/ && | 2112 | if ($line =~ /\bNR_CPUS\b/ && |
2033 | $line !~ /^.#\s*if\b.*\bNR_CPUS\b/ && | 2113 | $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ && |
2034 | $line !~ /^.#\s*define\b.*\bNR_CPUS\b/ && | 2114 | $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ && |
2035 | $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ && | 2115 | $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ && |
2036 | $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ && | 2116 | $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ && |
2037 | $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/) | 2117 | $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/) |
diff --git a/scripts/decodecode b/scripts/decodecode index 235d3938529d..235d3938529d 100644..100755 --- a/scripts/decodecode +++ b/scripts/decodecode | |||
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 5d20a2e24cd1..ad2434b26970 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -108,6 +108,9 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
108 | /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */ | 108 | /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */ |
109 | else if (str[0] == '$') | 109 | else if (str[0] == '$') |
110 | return -1; | 110 | return -1; |
111 | /* exclude debugging symbols */ | ||
112 | else if (stype == 'N') | ||
113 | return -1; | ||
111 | 114 | ||
112 | /* include the type field in the symbol name, so that it gets | 115 | /* include the type field in the symbol name, so that it gets |
113 | * compressed together */ | 116 | * compressed together */ |
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index f8e73c039dc8..3cc9f9369036 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
@@ -77,7 +77,7 @@ struct gstr str_new(void) | |||
77 | { | 77 | { |
78 | struct gstr gs; | 78 | struct gstr gs; |
79 | gs.s = malloc(sizeof(char) * 64); | 79 | gs.s = malloc(sizeof(char) * 64); |
80 | gs.len = 16; | 80 | gs.len = 64; |
81 | strcpy(gs.s, "\0"); | 81 | strcpy(gs.s, "\0"); |
82 | return gs; | 82 | return gs; |
83 | } | 83 | } |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 83cee18a02e9..88e3934a8b8c 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1556,7 +1556,9 @@ sub create_parameterlist($$$) { | |||
1556 | push_parameter($2, "$type $1", $file); | 1556 | push_parameter($2, "$type $1", $file); |
1557 | } | 1557 | } |
1558 | elsif ($param =~ m/(.*?):(\d+)/) { | 1558 | elsif ($param =~ m/(.*?):(\d+)/) { |
1559 | push_parameter($1, "$type:$2", $file) | 1559 | if ($type ne "") { # skip unnamed bit-fields |
1560 | push_parameter($1, "$type:$2", $file) | ||
1561 | } | ||
1560 | } | 1562 | } |
1561 | else { | 1563 | else { |
1562 | push_parameter($param, $type, $file); | 1564 | push_parameter($param, $type, $file); |
diff --git a/scripts/mksysmap b/scripts/mksysmap index 4390fab9f5bd..6e133a0bae7a 100644 --- a/scripts/mksysmap +++ b/scripts/mksysmap | |||
@@ -32,6 +32,7 @@ | |||
32 | # For System.map filter away: | 32 | # For System.map filter away: |
33 | # a - local absolute symbols | 33 | # a - local absolute symbols |
34 | # U - undefined global symbols | 34 | # U - undefined global symbols |
35 | # N - debugging symbols | ||
35 | # w - local weak symbols | 36 | # w - local weak symbols |
36 | 37 | ||
37 | # readprofile starts reading symbols when _stext is found, and | 38 | # readprofile starts reading symbols when _stext is found, and |
@@ -40,5 +41,5 @@ | |||
40 | # so we just ignore them to let readprofile continue to work. | 41 | # so we just ignore them to let readprofile continue to work. |
41 | # (At least sparc64 has __crc_ in the middle). | 42 | # (At least sparc64 has __crc_ in the middle). |
42 | 43 | ||
43 | $NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 | 44 | $NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 |
44 | 45 | ||
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 757294b4f322..a07f91aac920 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -467,6 +467,25 @@ static void parse_elf_finish(struct elf_info *info) | |||
467 | release_file(info->hdr, info->size); | 467 | release_file(info->hdr, info->size); |
468 | } | 468 | } |
469 | 469 | ||
470 | static int ignore_undef_symbol(struct elf_info *info, const char *symname) | ||
471 | { | ||
472 | /* ignore __this_module, it will be resolved shortly */ | ||
473 | if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) | ||
474 | return 1; | ||
475 | /* ignore global offset table */ | ||
476 | if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) | ||
477 | return 1; | ||
478 | if (info->hdr->e_machine == EM_PPC) | ||
479 | /* Special register function linked on all modules during final link of .ko */ | ||
480 | if (strncmp(symname, "_restgpr_", sizeof("_restgpr_") - 1) == 0 || | ||
481 | strncmp(symname, "_savegpr_", sizeof("_savegpr_") - 1) == 0 || | ||
482 | strncmp(symname, "_rest32gpr_", sizeof("_rest32gpr_") - 1) == 0 || | ||
483 | strncmp(symname, "_save32gpr_", sizeof("_save32gpr_") - 1) == 0) | ||
484 | return 1; | ||
485 | /* Do not ignore this symbol */ | ||
486 | return 0; | ||
487 | } | ||
488 | |||
470 | #define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_" | 489 | #define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_" |
471 | #define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_" | 490 | #define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_" |
472 | 491 | ||
@@ -493,11 +512,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info, | |||
493 | if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && | 512 | if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && |
494 | ELF_ST_BIND(sym->st_info) != STB_WEAK) | 513 | ELF_ST_BIND(sym->st_info) != STB_WEAK) |
495 | break; | 514 | break; |
496 | /* ignore global offset table */ | 515 | if (ignore_undef_symbol(info, symname)) |
497 | if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) | ||
498 | break; | ||
499 | /* ignore __this_module, it will be resolved shortly */ | ||
500 | if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) | ||
501 | break; | 516 | break; |
502 | /* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ | 517 | /* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ |
503 | #if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) | 518 | #if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) |
@@ -721,7 +736,7 @@ static int check_section(const char *modname, const char *sec) | |||
721 | /* consume all digits */ | 736 | /* consume all digits */ |
722 | while (*e && e != sec && isdigit(*e)) | 737 | while (*e && e != sec && isdigit(*e)) |
723 | e--; | 738 | e--; |
724 | if (*e == '.') { | 739 | if (*e == '.' && !strstr(sec, ".linkonce")) { |
725 | warn("%s (%s): unexpected section name.\n" | 740 | warn("%s (%s): unexpected section name.\n" |
726 | "The (.[number]+) following section name are " | 741 | "The (.[number]+) following section name are " |
727 | "ld generated and not expected.\n" | 742 | "ld generated and not expected.\n" |
diff --git a/scripts/ver_linux b/scripts/ver_linux index ab69ecefedbd..7ac0e309be09 100755 --- a/scripts/ver_linux +++ b/scripts/ver_linux | |||
@@ -12,12 +12,9 @@ echo ' ' | |||
12 | uname -a | 12 | uname -a |
13 | echo ' ' | 13 | echo ' ' |
14 | 14 | ||
15 | gcc --version 2>&1| head -n 1 | grep -v gcc | awk \ | 15 | gcc -dumpversion 2>&1| awk \ |
16 | 'NR==1{print "Gnu C ", $1}' | 16 | 'NR==1{print "Gnu C ", $1}' |
17 | 17 | ||
18 | gcc --version 2>&1| grep gcc | awk \ | ||
19 | 'NR==1{print "Gnu C ", $3}' | ||
20 | |||
21 | make --version 2>&1 | awk -F, '{print $1}' | awk \ | 18 | make --version 2>&1 | awk -F, '{print $1}' | awk \ |
22 | '/GNU Make/{print "Gnu make ",$NF}' | 19 | '/GNU Make/{print "Gnu make ",$NF}' |
23 | 20 | ||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 4ea583689eec..baf348834b66 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -49,10 +49,14 @@ struct dev_cgroup { | |||
49 | spinlock_t lock; | 49 | spinlock_t lock; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s) | ||
53 | { | ||
54 | return container_of(s, struct dev_cgroup, css); | ||
55 | } | ||
56 | |||
52 | static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup) | 57 | static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup) |
53 | { | 58 | { |
54 | return container_of(cgroup_subsys_state(cgroup, devices_subsys_id), | 59 | return css_to_devcgroup(cgroup_subsys_state(cgroup, devices_subsys_id)); |
55 | struct dev_cgroup, css); | ||
56 | } | 60 | } |
57 | 61 | ||
58 | struct cgroup_subsys devices_subsys; | 62 | struct cgroup_subsys devices_subsys; |
@@ -102,7 +106,7 @@ free_and_exit: | |||
102 | static int dev_whitelist_add(struct dev_cgroup *dev_cgroup, | 106 | static int dev_whitelist_add(struct dev_cgroup *dev_cgroup, |
103 | struct dev_whitelist_item *wh) | 107 | struct dev_whitelist_item *wh) |
104 | { | 108 | { |
105 | struct dev_whitelist_item *whcopy; | 109 | struct dev_whitelist_item *whcopy, *walk; |
106 | 110 | ||
107 | whcopy = kmalloc(sizeof(*whcopy), GFP_KERNEL); | 111 | whcopy = kmalloc(sizeof(*whcopy), GFP_KERNEL); |
108 | if (!whcopy) | 112 | if (!whcopy) |
@@ -110,7 +114,21 @@ static int dev_whitelist_add(struct dev_cgroup *dev_cgroup, | |||
110 | 114 | ||
111 | memcpy(whcopy, wh, sizeof(*whcopy)); | 115 | memcpy(whcopy, wh, sizeof(*whcopy)); |
112 | spin_lock(&dev_cgroup->lock); | 116 | spin_lock(&dev_cgroup->lock); |
113 | list_add_tail(&whcopy->list, &dev_cgroup->whitelist); | 117 | list_for_each_entry(walk, &dev_cgroup->whitelist, list) { |
118 | if (walk->type != wh->type) | ||
119 | continue; | ||
120 | if (walk->major != wh->major) | ||
121 | continue; | ||
122 | if (walk->minor != wh->minor) | ||
123 | continue; | ||
124 | |||
125 | walk->access |= wh->access; | ||
126 | kfree(whcopy); | ||
127 | whcopy = NULL; | ||
128 | } | ||
129 | |||
130 | if (whcopy != NULL) | ||
131 | list_add_tail(&whcopy->list, &dev_cgroup->whitelist); | ||
114 | spin_unlock(&dev_cgroup->lock); | 132 | spin_unlock(&dev_cgroup->lock); |
115 | return 0; | 133 | return 0; |
116 | } | 134 | } |
@@ -502,7 +520,6 @@ struct cgroup_subsys devices_subsys = { | |||
502 | 520 | ||
503 | int devcgroup_inode_permission(struct inode *inode, int mask) | 521 | int devcgroup_inode_permission(struct inode *inode, int mask) |
504 | { | 522 | { |
505 | struct cgroup *cgroup; | ||
506 | struct dev_cgroup *dev_cgroup; | 523 | struct dev_cgroup *dev_cgroup; |
507 | struct dev_whitelist_item *wh; | 524 | struct dev_whitelist_item *wh; |
508 | 525 | ||
@@ -511,8 +528,8 @@ int devcgroup_inode_permission(struct inode *inode, int mask) | |||
511 | return 0; | 528 | return 0; |
512 | if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode)) | 529 | if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode)) |
513 | return 0; | 530 | return 0; |
514 | cgroup = task_cgroup(current, devices_subsys.subsys_id); | 531 | dev_cgroup = css_to_devcgroup(task_subsys_state(current, |
515 | dev_cgroup = cgroup_to_devcgroup(cgroup); | 532 | devices_subsys_id)); |
516 | if (!dev_cgroup) | 533 | if (!dev_cgroup) |
517 | return 0; | 534 | return 0; |
518 | 535 | ||
@@ -543,12 +560,11 @@ acc_check: | |||
543 | 560 | ||
544 | int devcgroup_inode_mknod(int mode, dev_t dev) | 561 | int devcgroup_inode_mknod(int mode, dev_t dev) |
545 | { | 562 | { |
546 | struct cgroup *cgroup; | ||
547 | struct dev_cgroup *dev_cgroup; | 563 | struct dev_cgroup *dev_cgroup; |
548 | struct dev_whitelist_item *wh; | 564 | struct dev_whitelist_item *wh; |
549 | 565 | ||
550 | cgroup = task_cgroup(current, devices_subsys.subsys_id); | 566 | dev_cgroup = css_to_devcgroup(task_subsys_state(current, |
551 | dev_cgroup = cgroup_to_devcgroup(cgroup); | 567 | devices_subsys_id)); |
552 | if (!dev_cgroup) | 568 | if (!dev_cgroup) |
553 | return 0; | 569 | return 0; |
554 | 570 | ||
diff --git a/security/dummy.c b/security/dummy.c index f50c6c3c32c9..b8916883b77f 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/hugetlb.h> | 27 | #include <linux/hugetlb.h> |
28 | #include <linux/ptrace.h> | 28 | #include <linux/ptrace.h> |
29 | #include <linux/file.h> | 29 | #include <linux/file.h> |
30 | #include <linux/prctl.h> | ||
31 | #include <linux/securebits.h> | ||
30 | 32 | ||
31 | static int dummy_ptrace (struct task_struct *parent, struct task_struct *child) | 33 | static int dummy_ptrace (struct task_struct *parent, struct task_struct *child) |
32 | { | 34 | { |
@@ -607,7 +609,27 @@ static int dummy_task_kill (struct task_struct *p, struct siginfo *info, | |||
607 | static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3, | 609 | static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3, |
608 | unsigned long arg4, unsigned long arg5, long *rc_p) | 610 | unsigned long arg4, unsigned long arg5, long *rc_p) |
609 | { | 611 | { |
610 | return 0; | 612 | switch (option) { |
613 | case PR_CAPBSET_READ: | ||
614 | *rc_p = (cap_valid(arg2) ? 1 : -EINVAL); | ||
615 | break; | ||
616 | case PR_GET_KEEPCAPS: | ||
617 | *rc_p = issecure(SECURE_KEEP_CAPS); | ||
618 | break; | ||
619 | case PR_SET_KEEPCAPS: | ||
620 | if (arg2 > 1) | ||
621 | *rc_p = -EINVAL; | ||
622 | else if (arg2) | ||
623 | current->securebits |= issecure_mask(SECURE_KEEP_CAPS); | ||
624 | else | ||
625 | current->securebits &= | ||
626 | ~issecure_mask(SECURE_KEEP_CAPS); | ||
627 | break; | ||
628 | default: | ||
629 | return 0; | ||
630 | } | ||
631 | |||
632 | return 1; | ||
611 | } | 633 | } |
612 | 634 | ||
613 | static void dummy_task_reparent_to_init (struct task_struct *p) | 635 | static void dummy_task_reparent_to_init (struct task_struct *p) |
diff --git a/security/keys/internal.h b/security/keys/internal.h index 8c05587f5018..b39f5c2e2c4b 100644 --- a/security/keys/internal.h +++ b/security/keys/internal.h | |||
@@ -78,7 +78,6 @@ extern unsigned key_quota_maxbytes; | |||
78 | 78 | ||
79 | extern struct rb_root key_serial_tree; | 79 | extern struct rb_root key_serial_tree; |
80 | extern spinlock_t key_serial_lock; | 80 | extern spinlock_t key_serial_lock; |
81 | extern struct semaphore key_alloc_sem; | ||
82 | extern struct mutex key_construction_mutex; | 81 | extern struct mutex key_construction_mutex; |
83 | extern wait_queue_head_t request_key_conswq; | 82 | extern wait_queue_head_t request_key_conswq; |
84 | 83 | ||
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index b5c8f9237008..4a09293efa00 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -1881,6 +1881,18 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) | |||
1881 | final = sbsp->smk_default; | 1881 | final = sbsp->smk_default; |
1882 | 1882 | ||
1883 | /* | 1883 | /* |
1884 | * If this is the root inode the superblock | ||
1885 | * may be in the process of initialization. | ||
1886 | * If that is the case use the root value out | ||
1887 | * of the superblock. | ||
1888 | */ | ||
1889 | if (opt_dentry->d_parent == opt_dentry) { | ||
1890 | isp->smk_inode = sbsp->smk_root; | ||
1891 | isp->smk_flags |= SMK_INODE_INSTANT; | ||
1892 | goto unlockandout; | ||
1893 | } | ||
1894 | |||
1895 | /* | ||
1884 | * This is pretty hackish. | 1896 | * This is pretty hackish. |
1885 | * Casey says that we shouldn't have to do | 1897 | * Casey says that we shouldn't have to do |
1886 | * file system specific code, but it does help | 1898 | * file system specific code, but it does help |
diff --git a/sound/Kconfig b/sound/Kconfig index b2a2db47aff5..4247406160e7 100644 --- a/sound/Kconfig +++ b/sound/Kconfig | |||
@@ -28,11 +28,6 @@ config SOUND | |||
28 | and read <file:Documentation/sound/oss/README.modules>; the module | 28 | and read <file:Documentation/sound/oss/README.modules>; the module |
29 | will be called soundcore. | 29 | will be called soundcore. |
30 | 30 | ||
31 | I'm told that even without a sound card, you can make your computer | ||
32 | say more than an occasional beep, by programming the PC speaker. | ||
33 | Kernel patches and supporting utilities to do that are in the pcsp | ||
34 | package, available at <ftp://ftp.infradead.org/pub/pcsp/>. | ||
35 | |||
36 | source "sound/oss/dmasound/Kconfig" | 31 | source "sound/oss/dmasound/Kconfig" |
37 | 32 | ||
38 | if !M68K | 33 | if !M68K |
diff --git a/sound/core/sound.c b/sound/core/sound.c index 812f91b3de5b..6c8ab48c689a 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -259,8 +259,9 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
259 | return minor; | 259 | return minor; |
260 | } | 260 | } |
261 | snd_minors[minor] = preg; | 261 | snd_minors[minor] = preg; |
262 | preg->dev = device_create(sound_class, device, MKDEV(major, minor), | 262 | preg->dev = device_create_drvdata(sound_class, device, |
263 | "%s", name); | 263 | MKDEV(major, minor), |
264 | private_data, "%s", name); | ||
264 | if (IS_ERR(preg->dev)) { | 265 | if (IS_ERR(preg->dev)) { |
265 | snd_minors[minor] = NULL; | 266 | snd_minors[minor] = NULL; |
266 | mutex_unlock(&sound_mutex); | 267 | mutex_unlock(&sound_mutex); |
@@ -269,9 +270,6 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev, | |||
269 | return minor; | 270 | return minor; |
270 | } | 271 | } |
271 | 272 | ||
272 | if (preg->dev) | ||
273 | dev_set_drvdata(preg->dev, private_data); | ||
274 | |||
275 | mutex_unlock(&sound_mutex); | 273 | mutex_unlock(&sound_mutex); |
276 | return 0; | 274 | return 0; |
277 | } | 275 | } |
diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig index 379bcb074463..602b58e3b55d 100644 --- a/sound/drivers/Kconfig +++ b/sound/drivers/Kconfig | |||
@@ -5,9 +5,10 @@ menu "Generic devices" | |||
5 | 5 | ||
6 | 6 | ||
7 | config SND_PCSP | 7 | config SND_PCSP |
8 | tristate "PC-Speaker support" | 8 | tristate "PC-Speaker support (READ HELP!)" |
9 | depends on PCSPKR_PLATFORM && X86_PC && HIGH_RES_TIMERS | 9 | depends on PCSPKR_PLATFORM && X86_PC && HIGH_RES_TIMERS |
10 | depends on INPUT | 10 | depends on INPUT |
11 | depends on EXPERIMENTAL | ||
11 | depends on SND | 12 | depends on SND |
12 | select SND_PCM | 13 | select SND_PCM |
13 | help | 14 | help |
@@ -18,11 +19,21 @@ config SND_PCSP | |||
18 | 19 | ||
19 | You can compile this as a module which will be called snd-pcsp. | 20 | You can compile this as a module which will be called snd-pcsp. |
20 | 21 | ||
22 | WARNING: if you already have a soundcard, enabling this | ||
23 | driver may lead to a problem. Namely, it may get loaded | ||
24 | before the other sound driver of yours, making the | ||
25 | pc-speaker a default sound device. Which is likely not | ||
26 | what you want. To make this driver play nicely with other | ||
27 | sound driver, you can add this into your /etc/modprobe.conf: | ||
28 | options snd-pcsp index=2 | ||
29 | |||
21 | You don't need this driver if you only want your pc-speaker to beep. | 30 | You don't need this driver if you only want your pc-speaker to beep. |
22 | You don't need this driver if you have a tablet piezo beeper | 31 | You don't need this driver if you have a tablet piezo beeper |
23 | in your PC instead of the real speaker. | 32 | in your PC instead of the real speaker. |
24 | 33 | ||
25 | It should not hurt to say Y or M here in all other cases. | 34 | Say N if you have a sound card. |
35 | Say M if you don't. | ||
36 | Say Y only if you really know what you do. | ||
26 | 37 | ||
27 | config SND_MPU401_UART | 38 | config SND_MPU401_UART |
28 | tristate | 39 | tristate |
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 54a1f9036c66..1899cf0685bc 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c | |||
@@ -96,7 +96,7 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev) | |||
96 | return -EINVAL; | 96 | return -EINVAL; |
97 | 97 | ||
98 | hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 98 | hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
99 | pcsp_chip.timer.cb_mode = HRTIMER_CB_IRQSAFE; | 99 | pcsp_chip.timer.cb_mode = HRTIMER_CB_SOFTIRQ; |
100 | pcsp_chip.timer.function = pcsp_do_timer; | 100 | pcsp_chip.timer.function = pcsp_do_timer; |
101 | 101 | ||
102 | card = snd_card_new(index, id, THIS_MODULE, 0); | 102 | card = snd_card_new(index, id, THIS_MODULE, 0); |
diff --git a/sound/drivers/pcsp/pcsp.h b/sound/drivers/pcsp/pcsp.h index f07cc1ee1fe7..1d661f795e8c 100644 --- a/sound/drivers/pcsp/pcsp.h +++ b/sound/drivers/pcsp/pcsp.h | |||
@@ -24,7 +24,8 @@ static DEFINE_SPINLOCK(i8253_lock); | |||
24 | /* default timer freq for PC-Speaker: 18643 Hz */ | 24 | /* default timer freq for PC-Speaker: 18643 Hz */ |
25 | #define DIV_18KHZ 64 | 25 | #define DIV_18KHZ 64 |
26 | #define MAX_DIV DIV_18KHZ | 26 | #define MAX_DIV DIV_18KHZ |
27 | #define CUR_DIV() (MAX_DIV >> chip->treble) | 27 | #define CALC_DIV(d) (MAX_DIV >> (d)) |
28 | #define CUR_DIV() CALC_DIV(chip->treble) | ||
28 | #define PCSP_MAX_TREBLE 1 | 29 | #define PCSP_MAX_TREBLE 1 |
29 | 30 | ||
30 | /* unfortunately, with hrtimers 37KHz does not work very well :( */ | 31 | /* unfortunately, with hrtimers 37KHz does not work very well :( */ |
@@ -36,7 +37,8 @@ static DEFINE_SPINLOCK(i8253_lock); | |||
36 | #define PCSP_DEFAULT_SDIV (DIV_18KHZ >> 1) | 37 | #define PCSP_DEFAULT_SDIV (DIV_18KHZ >> 1) |
37 | #define PCSP_DEFAULT_SRATE (PIT_TICK_RATE / PCSP_DEFAULT_SDIV) | 38 | #define PCSP_DEFAULT_SRATE (PIT_TICK_RATE / PCSP_DEFAULT_SDIV) |
38 | #define PCSP_INDEX_INC() (1 << (PCSP_MAX_TREBLE - chip->treble)) | 39 | #define PCSP_INDEX_INC() (1 << (PCSP_MAX_TREBLE - chip->treble)) |
39 | #define PCSP_RATE() (PIT_TICK_RATE / CUR_DIV()) | 40 | #define PCSP_CALC_RATE(i) (PIT_TICK_RATE / CALC_DIV(i)) |
41 | #define PCSP_RATE() PCSP_CALC_RATE(chip->treble) | ||
40 | #define PCSP_MIN_RATE__1 MAX_DIV/PIT_TICK_RATE | 42 | #define PCSP_MIN_RATE__1 MAX_DIV/PIT_TICK_RATE |
41 | #define PCSP_MAX_RATE__1 MIN_DIV/PIT_TICK_RATE | 43 | #define PCSP_MAX_RATE__1 MIN_DIV/PIT_TICK_RATE |
42 | #define PCSP_MAX_PERIOD_NS (1000000000ULL * PCSP_MIN_RATE__1) | 44 | #define PCSP_MAX_PERIOD_NS (1000000000ULL * PCSP_MIN_RATE__1) |
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index ac6238e93513..e341f3f83b6a 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/moduleparam.h> | 10 | #include <linux/moduleparam.h> |
11 | #include <sound/pcm.h> | 11 | #include <sound/pcm.h> |
12 | #include <linux/interrupt.h> | ||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
14 | #include "pcsp.h" | 13 | #include "pcsp.h" |
15 | 14 | ||
@@ -18,36 +17,12 @@ module_param(nforce_wa, bool, 0444); | |||
18 | MODULE_PARM_DESC(nforce_wa, "Apply NForce chipset workaround " | 17 | MODULE_PARM_DESC(nforce_wa, "Apply NForce chipset workaround " |
19 | "(expect bad sound)"); | 18 | "(expect bad sound)"); |
20 | 19 | ||
21 | static void pcsp_start_timer(unsigned long dummy) | 20 | #define DMIX_WANTS_S16 1 |
22 | { | ||
23 | hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL); | ||
24 | } | ||
25 | |||
26 | /* | ||
27 | * We need the hrtimer_start as a tasklet to avoid | ||
28 | * the nasty locking problem. :( | ||
29 | * The problem: | ||
30 | * - The timer handler is called with the cpu_base->lock | ||
31 | * already held by hrtimer code. | ||
32 | * - snd_pcm_period_elapsed() takes the | ||
33 | * substream->self_group.lock. | ||
34 | * So far so good. | ||
35 | * But the snd_pcsp_trigger() is called with the | ||
36 | * substream->self_group.lock held, and it calls | ||
37 | * hrtimer_start(), which takes the cpu_base->lock. | ||
38 | * You see the problem. We have the code pathes | ||
39 | * which take two locks in a reverse order. This | ||
40 | * can deadlock and the lock validator complains. | ||
41 | * The only solution I could find was to move the | ||
42 | * hrtimer_start() into a tasklet. -stsp | ||
43 | */ | ||
44 | static DECLARE_TASKLET(pcsp_start_timer_tasklet, pcsp_start_timer, 0); | ||
45 | 21 | ||
46 | enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | 22 | enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) |
47 | { | 23 | { |
48 | unsigned long flags; | ||
49 | unsigned char timer_cnt, val; | 24 | unsigned char timer_cnt, val; |
50 | int periods_elapsed; | 25 | int fmt_size, periods_elapsed; |
51 | u64 ns; | 26 | u64 ns; |
52 | size_t period_bytes, buffer_bytes; | 27 | size_t period_bytes, buffer_bytes; |
53 | struct snd_pcm_substream *substream; | 28 | struct snd_pcm_substream *substream; |
@@ -64,9 +39,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
64 | return HRTIMER_RESTART; | 39 | return HRTIMER_RESTART; |
65 | } | 40 | } |
66 | 41 | ||
67 | /* hrtimer calls us from both hardirq and softirq contexts, | 42 | spin_lock_irq(&chip->substream_lock); |
68 | * so irqsave :( */ | ||
69 | spin_lock_irqsave(&chip->substream_lock, flags); | ||
70 | /* Takashi Iwai says regarding this extra lock: | 43 | /* Takashi Iwai says regarding this extra lock: |
71 | 44 | ||
72 | If the irq handler handles some data on the DMA buffer, it should | 45 | If the irq handler handles some data on the DMA buffer, it should |
@@ -92,8 +65,11 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
92 | goto exit_nr_unlock2; | 65 | goto exit_nr_unlock2; |
93 | 66 | ||
94 | runtime = substream->runtime; | 67 | runtime = substream->runtime; |
95 | /* assume it is u8 mono */ | 68 | fmt_size = snd_pcm_format_physical_width(runtime->format) >> 3; |
96 | val = runtime->dma_area[chip->playback_ptr]; | 69 | /* assume it is mono! */ |
70 | val = runtime->dma_area[chip->playback_ptr + fmt_size - 1]; | ||
71 | if (snd_pcm_format_signed(runtime->format)) | ||
72 | val ^= 0x80; | ||
97 | timer_cnt = val * CUR_DIV() / 256; | 73 | timer_cnt = val * CUR_DIV() / 256; |
98 | 74 | ||
99 | if (timer_cnt && chip->enable) { | 75 | if (timer_cnt && chip->enable) { |
@@ -111,12 +87,14 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
111 | 87 | ||
112 | period_bytes = snd_pcm_lib_period_bytes(substream); | 88 | period_bytes = snd_pcm_lib_period_bytes(substream); |
113 | buffer_bytes = snd_pcm_lib_buffer_bytes(substream); | 89 | buffer_bytes = snd_pcm_lib_buffer_bytes(substream); |
114 | chip->playback_ptr += PCSP_INDEX_INC(); | 90 | chip->playback_ptr += PCSP_INDEX_INC() * fmt_size; |
115 | periods_elapsed = chip->playback_ptr - chip->period_ptr; | 91 | periods_elapsed = chip->playback_ptr - chip->period_ptr; |
116 | if (periods_elapsed < 0) { | 92 | if (periods_elapsed < 0) { |
117 | printk(KERN_WARNING "PCSP: playback_ptr inconsistent " | 93 | #if PCSP_DEBUG |
94 | printk(KERN_INFO "PCSP: buffer_bytes mod period_bytes != 0 ? " | ||
118 | "(%zi %zi %zi)\n", | 95 | "(%zi %zi %zi)\n", |
119 | chip->playback_ptr, period_bytes, buffer_bytes); | 96 | chip->playback_ptr, period_bytes, buffer_bytes); |
97 | #endif | ||
120 | periods_elapsed += buffer_bytes; | 98 | periods_elapsed += buffer_bytes; |
121 | } | 99 | } |
122 | periods_elapsed /= period_bytes; | 100 | periods_elapsed /= period_bytes; |
@@ -132,7 +110,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
132 | chip->period_ptr %= buffer_bytes; | 110 | chip->period_ptr %= buffer_bytes; |
133 | } | 111 | } |
134 | 112 | ||
135 | spin_unlock_irqrestore(&chip->substream_lock, flags); | 113 | spin_unlock_irq(&chip->substream_lock); |
136 | 114 | ||
137 | if (!atomic_read(&chip->timer_active)) | 115 | if (!atomic_read(&chip->timer_active)) |
138 | return HRTIMER_NORESTART; | 116 | return HRTIMER_NORESTART; |
@@ -146,7 +124,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) | |||
146 | exit_nr_unlock2: | 124 | exit_nr_unlock2: |
147 | snd_pcm_stream_unlock(substream); | 125 | snd_pcm_stream_unlock(substream); |
148 | exit_nr_unlock1: | 126 | exit_nr_unlock1: |
149 | spin_unlock_irqrestore(&chip->substream_lock, flags); | 127 | spin_unlock_irq(&chip->substream_lock); |
150 | return HRTIMER_NORESTART; | 128 | return HRTIMER_NORESTART; |
151 | } | 129 | } |
152 | 130 | ||
@@ -167,7 +145,7 @@ static void pcsp_start_playing(struct snd_pcsp *chip) | |||
167 | atomic_set(&chip->timer_active, 1); | 145 | atomic_set(&chip->timer_active, 1); |
168 | chip->thalf = 0; | 146 | chip->thalf = 0; |
169 | 147 | ||
170 | tasklet_schedule(&pcsp_start_timer_tasklet); | 148 | hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL); |
171 | } | 149 | } |
172 | 150 | ||
173 | static void pcsp_stop_playing(struct snd_pcsp *chip) | 151 | static void pcsp_stop_playing(struct snd_pcsp *chip) |
@@ -270,7 +248,11 @@ static struct snd_pcm_hardware snd_pcsp_playback = { | |||
270 | .info = (SNDRV_PCM_INFO_INTERLEAVED | | 248 | .info = (SNDRV_PCM_INFO_INTERLEAVED | |
271 | SNDRV_PCM_INFO_HALF_DUPLEX | | 249 | SNDRV_PCM_INFO_HALF_DUPLEX | |
272 | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), | 250 | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID), |
273 | .formats = SNDRV_PCM_FMTBIT_U8, | 251 | .formats = (SNDRV_PCM_FMTBIT_U8 |
252 | #if DMIX_WANTS_S16 | ||
253 | | SNDRV_PCM_FMTBIT_S16_LE | ||
254 | #endif | ||
255 | ), | ||
274 | .rates = SNDRV_PCM_RATE_KNOT, | 256 | .rates = SNDRV_PCM_RATE_KNOT, |
275 | .rate_min = PCSP_DEFAULT_SRATE, | 257 | .rate_min = PCSP_DEFAULT_SRATE, |
276 | .rate_max = PCSP_DEFAULT_SRATE, | 258 | .rate_max = PCSP_DEFAULT_SRATE, |
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index 64a695fef74e..caeb0f57fcca 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c | |||
@@ -50,7 +50,8 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol, | |||
50 | uinfo->value.enumerated.items = chip->max_treble + 1; | 50 | uinfo->value.enumerated.items = chip->max_treble + 1; |
51 | if (uinfo->value.enumerated.item > chip->max_treble) | 51 | if (uinfo->value.enumerated.item > chip->max_treble) |
52 | uinfo->value.enumerated.item = chip->max_treble; | 52 | uinfo->value.enumerated.item = chip->max_treble; |
53 | sprintf(uinfo->value.enumerated.name, "%d", PCSP_RATE()); | 53 | sprintf(uinfo->value.enumerated.name, "%d", |
54 | PCSP_CALC_RATE(uinfo->value.enumerated.item)); | ||
54 | return 0; | 55 | return 0; |
55 | } | 56 | } |
56 | 57 | ||
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 857008bb7167..3be2dc1025b5 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig | |||
@@ -79,7 +79,7 @@ config SOUND_TRIDENT | |||
79 | 79 | ||
80 | config SOUND_MSNDCLAS | 80 | config SOUND_MSNDCLAS |
81 | tristate "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey" | 81 | tristate "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey" |
82 | depends on SOUND_PRIME && (m || !STANDALONE) | 82 | depends on SOUND_PRIME && (m || !STANDALONE) && ISA |
83 | help | 83 | help |
84 | Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or | 84 | Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or |
85 | Monterey (not for the Pinnacle or Fiji). | 85 | Monterey (not for the Pinnacle or Fiji). |
@@ -143,7 +143,7 @@ config MSNDCLAS_IO | |||
143 | 143 | ||
144 | config SOUND_MSNDPIN | 144 | config SOUND_MSNDPIN |
145 | tristate "Support for Turtle Beach MultiSound Pinnacle, Fiji" | 145 | tristate "Support for Turtle Beach MultiSound Pinnacle, Fiji" |
146 | depends on SOUND_PRIME && (m || !STANDALONE) | 146 | depends on SOUND_PRIME && (m || !STANDALONE) && ISA |
147 | help | 147 | help |
148 | Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji. | 148 | Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji. |
149 | See <file:Documentation/sound/oss/MultiSound> for important information | 149 | See <file:Documentation/sound/oss/MultiSound> for important information |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 2da89810ca10..1292dcee072d 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1971,6 +1971,9 @@ static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd | |||
1971 | 1971 | ||
1972 | val = ac97->regs[AC97_AD_MISC]; | 1972 | val = ac97->regs[AC97_AD_MISC]; |
1973 | ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL); | 1973 | ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL); |
1974 | if (ac97->spec.ad18xx.lo_as_master) | ||
1975 | ucontrol->value.integer.value[0] = | ||
1976 | !ucontrol->value.integer.value[0]; | ||
1974 | return 0; | 1977 | return 0; |
1975 | } | 1978 | } |
1976 | 1979 | ||
@@ -1979,8 +1982,10 @@ static int snd_ac97_ad1888_lohpsel_put(struct snd_kcontrol *kcontrol, struct snd | |||
1979 | struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); | 1982 | struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); |
1980 | unsigned short val; | 1983 | unsigned short val; |
1981 | 1984 | ||
1982 | val = !ucontrol->value.integer.value[0] | 1985 | val = !ucontrol->value.integer.value[0]; |
1983 | ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0; | 1986 | if (ac97->spec.ad18xx.lo_as_master) |
1987 | val = !val; | ||
1988 | val = val ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0; | ||
1984 | return snd_ac97_update_bits(ac97, AC97_AD_MISC, | 1989 | return snd_ac97_update_bits(ac97, AC97_AD_MISC, |
1985 | AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val); | 1990 | AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val); |
1986 | } | 1991 | } |
@@ -2031,7 +2036,7 @@ static void ad1888_update_jacks(struct snd_ac97 *ac97) | |||
2031 | { | 2036 | { |
2032 | unsigned short val = 0; | 2037 | unsigned short val = 0; |
2033 | /* clear LODIS if shared jack is to be used for Surround out */ | 2038 | /* clear LODIS if shared jack is to be used for Surround out */ |
2034 | if (is_shared_linein(ac97)) | 2039 | if (!ac97->spec.ad18xx.lo_as_master && is_shared_linein(ac97)) |
2035 | val |= (1 << 12); | 2040 | val |= (1 << 12); |
2036 | /* clear CLDIS if shared jack is to be used for C/LFE out */ | 2041 | /* clear CLDIS if shared jack is to be used for C/LFE out */ |
2037 | if (is_shared_micin(ac97)) | 2042 | if (is_shared_micin(ac97)) |
@@ -2067,9 +2072,13 @@ static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] = { | |||
2067 | 2072 | ||
2068 | static int patch_ad1888_specific(struct snd_ac97 *ac97) | 2073 | static int patch_ad1888_specific(struct snd_ac97 *ac97) |
2069 | { | 2074 | { |
2070 | /* rename 0x04 as "Master" and 0x02 as "Master Surround" */ | 2075 | if (!ac97->spec.ad18xx.lo_as_master) { |
2071 | snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback"); | 2076 | /* rename 0x04 as "Master" and 0x02 as "Master Surround" */ |
2072 | snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback"); | 2077 | snd_ac97_rename_vol_ctl(ac97, "Master Playback", |
2078 | "Master Surround Playback"); | ||
2079 | snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", | ||
2080 | "Master Playback"); | ||
2081 | } | ||
2073 | return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); | 2082 | return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); |
2074 | } | 2083 | } |
2075 | 2084 | ||
@@ -2088,16 +2097,27 @@ static int patch_ad1888(struct snd_ac97 * ac97) | |||
2088 | 2097 | ||
2089 | patch_ad1881(ac97); | 2098 | patch_ad1881(ac97); |
2090 | ac97->build_ops = &patch_ad1888_build_ops; | 2099 | ac97->build_ops = &patch_ad1888_build_ops; |
2091 | /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */ | 2100 | |
2092 | /* it seems that most vendors connect line-out connector to headphone out of AC'97 */ | 2101 | /* |
2102 | * LO can be used as a real line-out on some devices, | ||
2103 | * and we need to revert the front/surround mixer switches | ||
2104 | */ | ||
2105 | if (ac97->subsystem_vendor == 0x1043 && | ||
2106 | ac97->subsystem_device == 0x1193) /* ASUS A9T laptop */ | ||
2107 | ac97->spec.ad18xx.lo_as_master = 1; | ||
2108 | |||
2109 | misc = snd_ac97_read(ac97, AC97_AD_MISC); | ||
2093 | /* AD-compatible mode */ | 2110 | /* AD-compatible mode */ |
2094 | /* Stereo mutes enabled */ | 2111 | /* Stereo mutes enabled */ |
2095 | misc = snd_ac97_read(ac97, AC97_AD_MISC); | 2112 | misc |= AC97_AD198X_MSPLT | AC97_AD198X_AC97NC; |
2096 | snd_ac97_write_cache(ac97, AC97_AD_MISC, misc | | 2113 | if (!ac97->spec.ad18xx.lo_as_master) |
2097 | AC97_AD198X_LOSEL | | 2114 | /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */ |
2098 | AC97_AD198X_HPSEL | | 2115 | /* it seems that most vendors connect line-out connector to |
2099 | AC97_AD198X_MSPLT | | 2116 | * headphone out of AC'97 |
2100 | AC97_AD198X_AC97NC); | 2117 | */ |
2118 | misc |= AC97_AD198X_LOSEL | AC97_AD198X_HPSEL; | ||
2119 | |||
2120 | snd_ac97_write_cache(ac97, AC97_AD_MISC, misc); | ||
2101 | ac97->flags |= AC97_STEREO_MUTES; | 2121 | ac97->flags |= AC97_STEREO_MUTES; |
2102 | return 0; | 2122 | return 0; |
2103 | } | 2123 | } |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index abde5b901884..548c9cc81af5 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -1818,13 +1818,6 @@ int __devinit snd_emu10k1_create(struct snd_card *card, | |||
1818 | } | 1818 | } |
1819 | emu->port = pci_resource_start(pci, 0); | 1819 | emu->port = pci_resource_start(pci, 0); |
1820 | 1820 | ||
1821 | if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED, | ||
1822 | "EMU10K1", emu)) { | ||
1823 | err = -EBUSY; | ||
1824 | goto error; | ||
1825 | } | ||
1826 | emu->irq = pci->irq; | ||
1827 | |||
1828 | emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT; | 1821 | emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT; |
1829 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), | 1822 | if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), |
1830 | 32 * 1024, &emu->ptb_pages) < 0) { | 1823 | 32 * 1024, &emu->ptb_pages) < 0) { |
@@ -1887,6 +1880,14 @@ int __devinit snd_emu10k1_create(struct snd_card *card, | |||
1887 | emu->fx8010.etram_pages.area = NULL; | 1880 | emu->fx8010.etram_pages.area = NULL; |
1888 | emu->fx8010.etram_pages.bytes = 0; | 1881 | emu->fx8010.etram_pages.bytes = 0; |
1889 | 1882 | ||
1883 | /* irq handler must be registered after I/O ports are activated */ | ||
1884 | if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED, | ||
1885 | "EMU10K1", emu)) { | ||
1886 | err = -EBUSY; | ||
1887 | goto error; | ||
1888 | } | ||
1889 | emu->irq = pci->irq; | ||
1890 | |||
1890 | /* | 1891 | /* |
1891 | * Init to 0x02109204 : | 1892 | * Init to 0x02109204 : |
1892 | * Clock accuracy = 0 (1000ppm) | 1893 | * Clock accuracy = 0 (1000ppm) |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index e0a605adde42..a99e86d74278 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -2858,6 +2858,7 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = { | |||
2858 | static struct snd_pci_quirk ad1988_cfg_tbl[] = { | 2858 | static struct snd_pci_quirk ad1988_cfg_tbl[] = { |
2859 | SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), | 2859 | SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), |
2860 | SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), | 2860 | SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), |
2861 | SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG), | ||
2861 | {} | 2862 | {} |
2862 | }; | 2863 | }; |
2863 | 2864 | ||
@@ -3643,33 +3644,17 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = { | |||
3643 | { } /* end */ | 3644 | { } /* end */ |
3644 | }; | 3645 | }; |
3645 | 3646 | ||
3646 | static struct hda_input_mux ad1884a_mobile_capture_source = { | ||
3647 | .num_items = 2, | ||
3648 | .items = { | ||
3649 | { "Mic", 0x1 }, /* port-C */ | ||
3650 | { "Mix", 0x3 }, | ||
3651 | }, | ||
3652 | }; | ||
3653 | |||
3654 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { | 3647 | static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { |
3655 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 3648 | HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
3656 | HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 3649 | HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), |
3657 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), | 3650 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), |
3658 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), | 3651 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), |
3659 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT), | ||
3660 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT), | ||
3661 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x03, HDA_INPUT), | 3652 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x03, HDA_INPUT), |
3662 | HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT), | 3653 | HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT), |
3663 | HDA_CODEC_VOLUME("Mic Boost", 0x15, 0x0, HDA_INPUT), | 3654 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT), |
3655 | HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x15, 0x0, HDA_INPUT), | ||
3664 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3656 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3665 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3657 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3666 | { | ||
3667 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
3668 | .name = "Capture Source", | ||
3669 | .info = ad198x_mux_enum_info, | ||
3670 | .get = ad198x_mux_enum_get, | ||
3671 | .put = ad198x_mux_enum_put, | ||
3672 | }, | ||
3673 | { } /* end */ | 3658 | { } /* end */ |
3674 | }; | 3659 | }; |
3675 | 3660 | ||
@@ -3686,14 +3671,31 @@ static void ad1884a_hp_automute(struct hda_codec *codec) | |||
3686 | present ? 0x00 : 0x02); | 3671 | present ? 0x00 : 0x02); |
3687 | } | 3672 | } |
3688 | 3673 | ||
3674 | /* switch to external mic if plugged */ | ||
3675 | static void ad1884a_hp_automic(struct hda_codec *codec) | ||
3676 | { | ||
3677 | unsigned int present; | ||
3678 | |||
3679 | present = snd_hda_codec_read(codec, 0x14, 0, | ||
3680 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
3681 | snd_hda_codec_write(codec, 0x0c, 0, AC_VERB_SET_CONNECT_SEL, | ||
3682 | present ? 0 : 1); | ||
3683 | } | ||
3684 | |||
3689 | #define AD1884A_HP_EVENT 0x37 | 3685 | #define AD1884A_HP_EVENT 0x37 |
3686 | #define AD1884A_MIC_EVENT 0x36 | ||
3690 | 3687 | ||
3691 | /* unsolicited event for HP jack sensing */ | 3688 | /* unsolicited event for HP jack sensing */ |
3692 | static void ad1884a_hp_unsol_event(struct hda_codec *codec, unsigned int res) | 3689 | static void ad1884a_hp_unsol_event(struct hda_codec *codec, unsigned int res) |
3693 | { | 3690 | { |
3694 | if ((res >> 26) != AD1884A_HP_EVENT) | 3691 | switch (res >> 26) { |
3695 | return; | 3692 | case AD1884A_HP_EVENT: |
3696 | ad1884a_hp_automute(codec); | 3693 | ad1884a_hp_automute(codec); |
3694 | break; | ||
3695 | case AD1884A_MIC_EVENT: | ||
3696 | ad1884a_hp_automic(codec); | ||
3697 | break; | ||
3698 | } | ||
3697 | } | 3699 | } |
3698 | 3700 | ||
3699 | /* initialize jack-sensing, too */ | 3701 | /* initialize jack-sensing, too */ |
@@ -3701,6 +3703,7 @@ static int ad1884a_hp_init(struct hda_codec *codec) | |||
3701 | { | 3703 | { |
3702 | ad198x_init(codec); | 3704 | ad198x_init(codec); |
3703 | ad1884a_hp_automute(codec); | 3705 | ad1884a_hp_automute(codec); |
3706 | ad1884a_hp_automic(codec); | ||
3704 | return 0; | 3707 | return 0; |
3705 | } | 3708 | } |
3706 | 3709 | ||
@@ -3714,10 +3717,15 @@ static struct hda_verb ad1884a_laptop_verbs[] = { | |||
3714 | /* Port-F pin */ | 3717 | /* Port-F pin */ |
3715 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | 3718 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, |
3716 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | 3719 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, |
3720 | /* Port-C pin - internal mic-in */ | ||
3721 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
3722 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ | ||
3723 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ | ||
3717 | /* analog mix */ | 3724 | /* analog mix */ |
3718 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | 3725 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, |
3719 | /* unsolicited event for pin-sense */ | 3726 | /* unsolicited event for pin-sense */ |
3720 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, | 3727 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, |
3728 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, | ||
3721 | { } /* end */ | 3729 | { } /* end */ |
3722 | }; | 3730 | }; |
3723 | 3731 | ||
@@ -3877,7 +3885,6 @@ static int patch_ad1884a(struct hda_codec *codec) | |||
3877 | spec->mixers[0] = ad1884a_mobile_mixers; | 3885 | spec->mixers[0] = ad1884a_mobile_mixers; |
3878 | spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs; | 3886 | spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs; |
3879 | spec->multiout.dig_out_nid = 0; | 3887 | spec->multiout.dig_out_nid = 0; |
3880 | spec->input_mux = &ad1884a_mobile_capture_source; | ||
3881 | codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; | 3888 | codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; |
3882 | codec->patch_ops.init = ad1884a_hp_init; | 3889 | codec->patch_ops.init = ad1884a_hp_init; |
3883 | break; | 3890 | break; |
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c index c73ce074a6ea..6ef57fbfb6eb 100644 --- a/sound/pci/hda/patch_cmedia.c +++ b/sound/pci/hda/patch_cmedia.c | |||
@@ -611,6 +611,7 @@ static const char *cmi9880_models[CMI_MODELS] = { | |||
611 | 611 | ||
612 | static struct snd_pci_quirk cmi9880_cfg_tbl[] = { | 612 | static struct snd_pci_quirk cmi9880_cfg_tbl[] = { |
613 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG), | 613 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG), |
614 | SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL), | ||
614 | SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG), | 615 | SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG), |
615 | {} /* terminator */ | 616 | {} /* terminator */ |
616 | }; | 617 | }; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6d4df45e81e0..b0a2a262ece2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -853,6 +853,7 @@ do_sku: | |||
853 | case 0x10ec0269: | 853 | case 0x10ec0269: |
854 | case 0x10ec0862: | 854 | case 0x10ec0862: |
855 | case 0x10ec0662: | 855 | case 0x10ec0662: |
856 | case 0x10ec0889: | ||
856 | snd_hda_codec_write(codec, 0x14, 0, | 857 | snd_hda_codec_write(codec, 0x14, 0, |
857 | AC_VERB_SET_EAPD_BTLENABLE, 2); | 858 | AC_VERB_SET_EAPD_BTLENABLE, 2); |
858 | snd_hda_codec_write(codec, 0x15, 0, | 859 | snd_hda_codec_write(codec, 0x15, 0, |
@@ -877,6 +878,7 @@ do_sku: | |||
877 | case 0x10ec0883: | 878 | case 0x10ec0883: |
878 | case 0x10ec0885: | 879 | case 0x10ec0885: |
879 | case 0x10ec0888: | 880 | case 0x10ec0888: |
881 | case 0x10ec0889: | ||
880 | snd_hda_codec_write(codec, 0x20, 0, | 882 | snd_hda_codec_write(codec, 0x20, 0, |
881 | AC_VERB_SET_COEF_INDEX, 7); | 883 | AC_VERB_SET_COEF_INDEX, 7); |
882 | tmp = snd_hda_codec_read(codec, 0x20, 0, | 884 | tmp = snd_hda_codec_read(codec, 0x20, 0, |
@@ -940,7 +942,6 @@ do_sku: | |||
940 | AC_VERB_SET_UNSOLICITED_ENABLE, | 942 | AC_VERB_SET_UNSOLICITED_ENABLE, |
941 | AC_USRSP_EN | ALC880_HP_EVENT); | 943 | AC_USRSP_EN | ALC880_HP_EVENT); |
942 | spec->unsol_event = alc_sku_unsol_event; | 944 | spec->unsol_event = alc_sku_unsol_event; |
943 | spec->init_hook = alc_sku_automute; | ||
944 | } | 945 | } |
945 | 946 | ||
946 | /* | 947 | /* |
@@ -2981,7 +2982,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = { | |||
2981 | /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ | 2982 | /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ |
2982 | SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), | 2983 | SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), |
2983 | SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), | 2984 | SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), |
2984 | SND_PCI_QUIRK(0x1043, 0x814e, "ASUS", ALC880_ASUS), | 2985 | SND_PCI_QUIRK(0x1043, 0x814e, "ASUS P5GD1 w/SPDIF", ALC880_6ST_DIG), |
2985 | SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), | 2986 | SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), |
2986 | SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), | 2987 | SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), |
2987 | SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), | 2988 | SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), |
@@ -7743,6 +7744,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
7743 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 7744 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
7744 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 7745 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
7745 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 7746 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
7747 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | ||
7746 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 7748 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
7747 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), | 7749 | SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), |
7748 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 7750 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
@@ -8640,6 +8642,7 @@ static struct hda_verb alc262_sony_unsol_verbs[] = { | |||
8640 | 8642 | ||
8641 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | 8643 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, |
8642 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | 8644 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, |
8645 | {} | ||
8643 | }; | 8646 | }; |
8644 | 8647 | ||
8645 | /* mute/unmute internal speaker according to the hp jack and mute state */ | 8648 | /* mute/unmute internal speaker according to the hp jack and mute state */ |
@@ -8757,35 +8760,39 @@ static struct hda_input_mux alc262_HP_D7000_capture_source = { | |||
8757 | }, | 8760 | }, |
8758 | }; | 8761 | }; |
8759 | 8762 | ||
8760 | /* mute/unmute internal speaker according to the hp jack and mute state */ | 8763 | /* mute/unmute internal speaker according to the hp jacks and mute state */ |
8761 | static void alc262_fujitsu_automute(struct hda_codec *codec, int force) | 8764 | static void alc262_fujitsu_automute(struct hda_codec *codec, int force) |
8762 | { | 8765 | { |
8763 | struct alc_spec *spec = codec->spec; | 8766 | struct alc_spec *spec = codec->spec; |
8764 | unsigned int mute; | 8767 | unsigned int mute; |
8765 | 8768 | ||
8766 | if (force || !spec->sense_updated) { | 8769 | if (force || !spec->sense_updated) { |
8767 | unsigned int present_int_hp, present_dock_hp; | 8770 | unsigned int present; |
8768 | /* need to execute and sync at first */ | 8771 | /* need to execute and sync at first */ |
8769 | snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); | 8772 | snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); |
8770 | present_int_hp = snd_hda_codec_read(codec, 0x14, 0, | 8773 | /* check laptop HP jack */ |
8771 | AC_VERB_GET_PIN_SENSE, 0); | 8774 | present = snd_hda_codec_read(codec, 0x14, 0, |
8772 | snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0); | 8775 | AC_VERB_GET_PIN_SENSE, 0); |
8773 | present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0, | 8776 | /* need to execute and sync at first */ |
8774 | AC_VERB_GET_PIN_SENSE, 0); | 8777 | snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0); |
8775 | spec->jack_present = (present_int_hp & 0x80000000) != 0; | 8778 | /* check docking HP jack */ |
8776 | spec->jack_present |= (present_dock_hp & 0x80000000) != 0; | 8779 | present |= snd_hda_codec_read(codec, 0x1b, 0, |
8780 | AC_VERB_GET_PIN_SENSE, 0); | ||
8781 | if (present & AC_PINSENSE_PRESENCE) | ||
8782 | spec->jack_present = 1; | ||
8783 | else | ||
8784 | spec->jack_present = 0; | ||
8777 | spec->sense_updated = 1; | 8785 | spec->sense_updated = 1; |
8778 | } | 8786 | } |
8779 | if (spec->jack_present) { | 8787 | /* unmute internal speaker only if both HPs are unplugged and |
8780 | /* mute internal speaker */ | 8788 | * master switch is on |
8781 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | 8789 | */ |
8782 | HDA_AMP_MUTE, HDA_AMP_MUTE); | 8790 | if (spec->jack_present) |
8783 | } else { | 8791 | mute = HDA_AMP_MUTE; |
8784 | /* unmute internal speaker if necessary */ | 8792 | else |
8785 | mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); | 8793 | mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); |
8786 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, | 8794 | snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, |
8787 | HDA_AMP_MUTE, mute); | 8795 | HDA_AMP_MUTE, mute); |
8788 | } | ||
8789 | } | 8796 | } |
8790 | 8797 | ||
8791 | /* unsolicited event for HP jack sensing */ | 8798 | /* unsolicited event for HP jack sensing */ |
@@ -8797,6 +8804,11 @@ static void alc262_fujitsu_unsol_event(struct hda_codec *codec, | |||
8797 | alc262_fujitsu_automute(codec, 1); | 8804 | alc262_fujitsu_automute(codec, 1); |
8798 | } | 8805 | } |
8799 | 8806 | ||
8807 | static void alc262_fujitsu_init_hook(struct hda_codec *codec) | ||
8808 | { | ||
8809 | alc262_fujitsu_automute(codec, 1); | ||
8810 | } | ||
8811 | |||
8800 | /* bind volumes of both NID 0x0c and 0x0d */ | 8812 | /* bind volumes of both NID 0x0c and 0x0d */ |
8801 | static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { | 8813 | static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { |
8802 | .ops = &snd_hda_bind_vol, | 8814 | .ops = &snd_hda_bind_vol, |
@@ -9570,6 +9582,7 @@ static struct alc_config_preset alc262_presets[] = { | |||
9570 | .channel_mode = alc262_modes, | 9582 | .channel_mode = alc262_modes, |
9571 | .input_mux = &alc262_fujitsu_capture_source, | 9583 | .input_mux = &alc262_fujitsu_capture_source, |
9572 | .unsol_event = alc262_fujitsu_unsol_event, | 9584 | .unsol_event = alc262_fujitsu_unsol_event, |
9585 | .init_hook = alc262_fujitsu_init_hook, | ||
9573 | }, | 9586 | }, |
9574 | [ALC262_HP_BPC] = { | 9587 | [ALC262_HP_BPC] = { |
9575 | .mixers = { alc262_HP_BPC_mixer }, | 9588 | .mixers = { alc262_HP_BPC_mixer }, |
@@ -10500,6 +10513,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
10500 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), | 10513 | SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), |
10501 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), | 10514 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), |
10502 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), | 10515 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), |
10516 | SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA), | ||
10503 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), | 10517 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), |
10504 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), | 10518 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), |
10505 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), | 10519 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 393f7fd2b1be..a4f44a00bae8 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -840,7 +840,7 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { | |||
840 | static struct snd_kcontrol_new stac925x_mixer[] = { | 840 | static struct snd_kcontrol_new stac925x_mixer[] = { |
841 | STAC_INPUT_SOURCE(1), | 841 | STAC_INPUT_SOURCE(1), |
842 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | 842 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), |
843 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT), | 843 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), |
844 | HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), | 844 | HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), |
845 | { } /* end */ | 845 | { } /* end */ |
846 | }; | 846 | }; |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 52b1d81a26f7..e7e43524f8c7 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -447,6 +447,23 @@ static struct hda_pcm_stream vt1708_pcm_analog_playback = { | |||
447 | }, | 447 | }, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { | ||
451 | .substreams = 1, | ||
452 | .channels_min = 2, | ||
453 | .channels_max = 8, | ||
454 | .nid = 0x10, /* NID to query formats and rates */ | ||
455 | /* We got noisy outputs on the right channel on VT1708 when | ||
456 | * 24bit samples are used. Until any workaround is found, | ||
457 | * disable the 24bit format, so far. | ||
458 | */ | ||
459 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | ||
460 | .ops = { | ||
461 | .open = via_playback_pcm_open, | ||
462 | .prepare = via_playback_pcm_prepare, | ||
463 | .cleanup = via_playback_pcm_cleanup | ||
464 | }, | ||
465 | }; | ||
466 | |||
450 | static struct hda_pcm_stream vt1708_pcm_analog_capture = { | 467 | static struct hda_pcm_stream vt1708_pcm_analog_capture = { |
451 | .substreams = 2, | 468 | .substreams = 2, |
452 | .channels_min = 2, | 469 | .channels_min = 2, |
@@ -899,6 +916,9 @@ static int patch_vt1708(struct hda_codec *codec) | |||
899 | 916 | ||
900 | spec->stream_name_analog = "VT1708 Analog"; | 917 | spec->stream_name_analog = "VT1708 Analog"; |
901 | spec->stream_analog_playback = &vt1708_pcm_analog_playback; | 918 | spec->stream_analog_playback = &vt1708_pcm_analog_playback; |
919 | /* disable 32bit format on VT1708 */ | ||
920 | if (codec->vendor_id == 0x11061708) | ||
921 | spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback; | ||
902 | spec->stream_analog_capture = &vt1708_pcm_analog_capture; | 922 | spec->stream_analog_capture = &vt1708_pcm_analog_capture; |
903 | 923 | ||
904 | spec->stream_name_digital = "VT1708 Digital"; | 924 | spec->stream_name_digital = "VT1708 Digital"; |
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c index e97d8b2ac16a..a972f77bd785 100644 --- a/sound/usb/caiaq/caiaq-device.c +++ b/sound/usb/caiaq/caiaq-device.c | |||
@@ -351,8 +351,8 @@ static struct snd_card* create_card(struct usb_device* usb_dev) | |||
351 | dev = caiaqdev(card); | 351 | dev = caiaqdev(card); |
352 | dev->chip.dev = usb_dev; | 352 | dev->chip.dev = usb_dev; |
353 | dev->chip.card = card; | 353 | dev->chip.card = card; |
354 | dev->chip.usb_id = USB_ID(usb_dev->descriptor.idVendor, | 354 | dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor), |
355 | usb_dev->descriptor.idProduct); | 355 | le16_to_cpu(usb_dev->descriptor.idProduct)); |
356 | spin_lock_init(&dev->spinlock); | 356 | spin_lock_init(&dev->spinlock); |
357 | snd_card_set_dev(card, &usb_dev->dev); | 357 | snd_card_set_dev(card, &usb_dev->dev); |
358 | 358 | ||
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 4232fd75dd20..98778cb69c6e 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #else | 45 | #else |
46 | #define ioapic_debug(fmt, arg...) | 46 | #define ioapic_debug(fmt, arg...) |
47 | #endif | 47 | #endif |
48 | static void ioapic_deliver(struct kvm_ioapic *vioapic, int irq); | 48 | static int ioapic_deliver(struct kvm_ioapic *vioapic, int irq); |
49 | 49 | ||
50 | static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic, | 50 | static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic, |
51 | unsigned long addr, | 51 | unsigned long addr, |
@@ -89,8 +89,8 @@ static void ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx) | |||
89 | pent = &ioapic->redirtbl[idx]; | 89 | pent = &ioapic->redirtbl[idx]; |
90 | 90 | ||
91 | if (!pent->fields.mask) { | 91 | if (!pent->fields.mask) { |
92 | ioapic_deliver(ioapic, idx); | 92 | int injected = ioapic_deliver(ioapic, idx); |
93 | if (pent->fields.trig_mode == IOAPIC_LEVEL_TRIG) | 93 | if (injected && pent->fields.trig_mode == IOAPIC_LEVEL_TRIG) |
94 | pent->fields.remote_irr = 1; | 94 | pent->fields.remote_irr = 1; |
95 | } | 95 | } |
96 | if (!pent->fields.trig_mode) | 96 | if (!pent->fields.trig_mode) |
@@ -133,7 +133,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | static void ioapic_inj_irq(struct kvm_ioapic *ioapic, | 136 | static int ioapic_inj_irq(struct kvm_ioapic *ioapic, |
137 | struct kvm_vcpu *vcpu, | 137 | struct kvm_vcpu *vcpu, |
138 | u8 vector, u8 trig_mode, u8 delivery_mode) | 138 | u8 vector, u8 trig_mode, u8 delivery_mode) |
139 | { | 139 | { |
@@ -143,7 +143,7 @@ static void ioapic_inj_irq(struct kvm_ioapic *ioapic, | |||
143 | ASSERT((delivery_mode == IOAPIC_FIXED) || | 143 | ASSERT((delivery_mode == IOAPIC_FIXED) || |
144 | (delivery_mode == IOAPIC_LOWEST_PRIORITY)); | 144 | (delivery_mode == IOAPIC_LOWEST_PRIORITY)); |
145 | 145 | ||
146 | kvm_apic_set_irq(vcpu, vector, trig_mode); | 146 | return kvm_apic_set_irq(vcpu, vector, trig_mode); |
147 | } | 147 | } |
148 | 148 | ||
149 | static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest, | 149 | static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest, |
@@ -186,7 +186,7 @@ static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest, | |||
186 | return mask; | 186 | return mask; |
187 | } | 187 | } |
188 | 188 | ||
189 | static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | 189 | static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq) |
190 | { | 190 | { |
191 | u8 dest = ioapic->redirtbl[irq].fields.dest_id; | 191 | u8 dest = ioapic->redirtbl[irq].fields.dest_id; |
192 | u8 dest_mode = ioapic->redirtbl[irq].fields.dest_mode; | 192 | u8 dest_mode = ioapic->redirtbl[irq].fields.dest_mode; |
@@ -195,7 +195,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
195 | u8 trig_mode = ioapic->redirtbl[irq].fields.trig_mode; | 195 | u8 trig_mode = ioapic->redirtbl[irq].fields.trig_mode; |
196 | u32 deliver_bitmask; | 196 | u32 deliver_bitmask; |
197 | struct kvm_vcpu *vcpu; | 197 | struct kvm_vcpu *vcpu; |
198 | int vcpu_id; | 198 | int vcpu_id, r = 0; |
199 | 199 | ||
200 | ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x " | 200 | ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x " |
201 | "vector=%x trig_mode=%x\n", | 201 | "vector=%x trig_mode=%x\n", |
@@ -204,7 +204,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
204 | deliver_bitmask = ioapic_get_delivery_bitmask(ioapic, dest, dest_mode); | 204 | deliver_bitmask = ioapic_get_delivery_bitmask(ioapic, dest, dest_mode); |
205 | if (!deliver_bitmask) { | 205 | if (!deliver_bitmask) { |
206 | ioapic_debug("no target on destination\n"); | 206 | ioapic_debug("no target on destination\n"); |
207 | return; | 207 | return 0; |
208 | } | 208 | } |
209 | 209 | ||
210 | switch (delivery_mode) { | 210 | switch (delivery_mode) { |
@@ -216,7 +216,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
216 | vcpu = ioapic->kvm->vcpus[0]; | 216 | vcpu = ioapic->kvm->vcpus[0]; |
217 | #endif | 217 | #endif |
218 | if (vcpu != NULL) | 218 | if (vcpu != NULL) |
219 | ioapic_inj_irq(ioapic, vcpu, vector, | 219 | r = ioapic_inj_irq(ioapic, vcpu, vector, |
220 | trig_mode, delivery_mode); | 220 | trig_mode, delivery_mode); |
221 | else | 221 | else |
222 | ioapic_debug("null lowest prio vcpu: " | 222 | ioapic_debug("null lowest prio vcpu: " |
@@ -234,7 +234,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
234 | deliver_bitmask &= ~(1 << vcpu_id); | 234 | deliver_bitmask &= ~(1 << vcpu_id); |
235 | vcpu = ioapic->kvm->vcpus[vcpu_id]; | 235 | vcpu = ioapic->kvm->vcpus[vcpu_id]; |
236 | if (vcpu) { | 236 | if (vcpu) { |
237 | ioapic_inj_irq(ioapic, vcpu, vector, | 237 | r = ioapic_inj_irq(ioapic, vcpu, vector, |
238 | trig_mode, delivery_mode); | 238 | trig_mode, delivery_mode); |
239 | } | 239 | } |
240 | } | 240 | } |
@@ -246,6 +246,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) | |||
246 | delivery_mode); | 246 | delivery_mode); |
247 | break; | 247 | break; |
248 | } | 248 | } |
249 | return r; | ||
249 | } | 250 | } |
250 | 251 | ||
251 | void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) | 252 | void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f7ba099049ea..2d29e260da3d 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -758,25 +758,26 @@ void mark_page_dirty(struct kvm *kvm, gfn_t gfn) | |||
758 | */ | 758 | */ |
759 | void kvm_vcpu_block(struct kvm_vcpu *vcpu) | 759 | void kvm_vcpu_block(struct kvm_vcpu *vcpu) |
760 | { | 760 | { |
761 | DECLARE_WAITQUEUE(wait, current); | 761 | DEFINE_WAIT(wait); |
762 | 762 | ||
763 | add_wait_queue(&vcpu->wq, &wait); | 763 | for (;;) { |
764 | 764 | prepare_to_wait(&vcpu->wq, &wait, TASK_INTERRUPTIBLE); | |
765 | /* | 765 | |
766 | * We will block until either an interrupt or a signal wakes us up | 766 | if (kvm_cpu_has_interrupt(vcpu)) |
767 | */ | 767 | break; |
768 | while (!kvm_cpu_has_interrupt(vcpu) | 768 | if (kvm_cpu_has_pending_timer(vcpu)) |
769 | && !kvm_cpu_has_pending_timer(vcpu) | 769 | break; |
770 | && !signal_pending(current) | 770 | if (kvm_arch_vcpu_runnable(vcpu)) |
771 | && !kvm_arch_vcpu_runnable(vcpu)) { | 771 | break; |
772 | set_current_state(TASK_INTERRUPTIBLE); | 772 | if (signal_pending(current)) |
773 | break; | ||
774 | |||
773 | vcpu_put(vcpu); | 775 | vcpu_put(vcpu); |
774 | schedule(); | 776 | schedule(); |
775 | vcpu_load(vcpu); | 777 | vcpu_load(vcpu); |
776 | } | 778 | } |
777 | 779 | ||
778 | __set_current_state(TASK_RUNNING); | 780 | finish_wait(&vcpu->wq, &wait); |
779 | remove_wait_queue(&vcpu->wq, &wait); | ||
780 | } | 781 | } |
781 | 782 | ||
782 | void kvm_resched(struct kvm_vcpu *vcpu) | 783 | void kvm_resched(struct kvm_vcpu *vcpu) |