diff options
202 files changed, 1250 insertions, 908 deletions
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index e0188a23fd5e..61613166981b 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | Linux Magic System Request Key Hacks | 1 | Linux Magic System Request Key Hacks |
2 | Documentation for sysrq.c version 1.15 | 2 | Documentation for sysrq.c |
3 | Last update: $Date: 2001/01/28 10:15:59 $ | 3 | Last update: 2007-JAN-06 |
4 | 4 | ||
5 | * What is the magic SysRq key? | 5 | * What is the magic SysRq key? |
6 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 6 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -35,7 +35,7 @@ You can set the value in the file by the following command: | |||
35 | 35 | ||
36 | Note that the value of /proc/sys/kernel/sysrq influences only the invocation | 36 | Note that the value of /proc/sys/kernel/sysrq influences only the invocation |
37 | via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always | 37 | via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always |
38 | allowed. | 38 | allowed (by a user with admin privileges). |
39 | 39 | ||
40 | * How do I use the magic SysRq key? | 40 | * How do I use the magic SysRq key? |
41 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 41 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
@@ -58,7 +58,7 @@ On PowerPC - Press 'ALT - Print Screen (or F13) - <command key>, | |||
58 | On other - If you know of the key combos for other architectures, please | 58 | On other - If you know of the key combos for other architectures, please |
59 | let me know so I can add them to this section. | 59 | let me know so I can add them to this section. |
60 | 60 | ||
61 | On all - write a character to /proc/sysrq-trigger. eg: | 61 | On all - write a character to /proc/sysrq-trigger. e.g.: |
62 | 62 | ||
63 | echo t > /proc/sysrq-trigger | 63 | echo t > /proc/sysrq-trigger |
64 | 64 | ||
@@ -74,6 +74,8 @@ On all - write a character to /proc/sysrq-trigger. eg: | |||
74 | 74 | ||
75 | 'c' - Will perform a kexec reboot in order to take a crashdump. | 75 | 'c' - Will perform a kexec reboot in order to take a crashdump. |
76 | 76 | ||
77 | 'd' - Shows all locks that are held. | ||
78 | |||
77 | 'o' - Will shut your system off (if configured and supported). | 79 | 'o' - Will shut your system off (if configured and supported). |
78 | 80 | ||
79 | 's' - Will attempt to sync all mounted filesystems. | 81 | 's' - Will attempt to sync all mounted filesystems. |
@@ -87,38 +89,43 @@ On all - write a character to /proc/sysrq-trigger. eg: | |||
87 | 89 | ||
88 | 'm' - Will dump current memory info to your console. | 90 | 'm' - Will dump current memory info to your console. |
89 | 91 | ||
92 | 'n' - Used to make RT tasks nice-able | ||
93 | |||
90 | 'v' - Dumps Voyager SMP processor info to your console. | 94 | 'v' - Dumps Voyager SMP processor info to your console. |
91 | 95 | ||
96 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. | ||
97 | |||
98 | 'x' - Used by xmon interface on ppc/powerpc platforms. | ||
99 | |||
92 | '0'-'9' - Sets the console log level, controlling which kernel messages | 100 | '0'-'9' - Sets the console log level, controlling which kernel messages |
93 | will be printed to your console. ('0', for example would make | 101 | will be printed to your console. ('0', for example would make |
94 | it so that only emergency messages like PANICs or OOPSes would | 102 | it so that only emergency messages like PANICs or OOPSes would |
95 | make it to your console.) | 103 | make it to your console.) |
96 | 104 | ||
97 | 'f' - Will call oom_kill to kill a memory hog process | 105 | 'f' - Will call oom_kill to kill a memory hog process. |
98 | 106 | ||
99 | 'e' - Send a SIGTERM to all processes, except for init. | 107 | 'e' - Send a SIGTERM to all processes, except for init. |
100 | 108 | ||
101 | 'i' - Send a SIGKILL to all processes, except for init. | 109 | 'g' - Used by kgdb on ppc platforms. |
102 | 110 | ||
103 | 'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system | 111 | 'i' - Send a SIGKILL to all processes, except for init. |
104 | will be non-functional after this.) | ||
105 | 112 | ||
106 | 'h' - Will display help ( actually any other key than those listed | 113 | 'h' - Will display help (actually any other key than those listed |
107 | above will display help. but 'h' is easy to remember :-) | 114 | above will display help. but 'h' is easy to remember :-) |
108 | 115 | ||
109 | * Okay, so what can I use them for? | 116 | * Okay, so what can I use them for? |
110 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 117 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
111 | Well, un'R'aw is very handy when your X server or a svgalib program crashes. | 118 | Well, un'R'aw is very handy when your X server or a svgalib program crashes. |
112 | 119 | ||
113 | sa'K' (Secure Access Key) is useful when you want to be sure there are no | 120 | sa'K' (Secure Access Key) is useful when you want to be sure there is no |
114 | trojan program is running at console and which could grab your password | 121 | trojan program running at console which could grab your password |
115 | when you would try to login. It will kill all programs on given console | 122 | when you would try to login. It will kill all programs on given console, |
116 | and thus letting you make sure that the login prompt you see is actually | 123 | thus letting you make sure that the login prompt you see is actually |
117 | the one from init, not some trojan program. | 124 | the one from init, not some trojan program. |
118 | IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT | 125 | IMPORTANT: In its true form it is not a true SAK like the one in a :IMPORTANT |
119 | IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT | 126 | IMPORTANT: c2 compliant system, and it should not be mistaken as :IMPORTANT |
120 | IMPORTANT: such. :IMPORTANT | 127 | IMPORTANT: such. :IMPORTANT |
121 | It seems other find it useful as (System Attention Key) which is | 128 | It seems others find it useful as (System Attention Key) which is |
122 | useful when you want to exit a program that will not let you switch consoles. | 129 | useful when you want to exit a program that will not let you switch consoles. |
123 | (For example, X or a svgalib program.) | 130 | (For example, X or a svgalib program.) |
124 | 131 | ||
@@ -139,8 +146,8 @@ OK or Done message...) | |||
139 | Again, the unmount (remount read-only) hasn't taken place until you see the | 146 | Again, the unmount (remount read-only) hasn't taken place until you see the |
140 | "OK" and "Done" message appear on the screen. | 147 | "OK" and "Done" message appear on the screen. |
141 | 148 | ||
142 | The loglevel'0'-'9' is useful when your console is being flooded with | 149 | The loglevels '0'-'9' are useful when your console is being flooded with |
143 | kernel messages you do not want to see. Setting '0' will prevent all but | 150 | kernel messages you do not want to see. Selecting '0' will prevent all but |
144 | the most urgent kernel messages from reaching your console. (They will | 151 | the most urgent kernel messages from reaching your console. (They will |
145 | still be logged if syslogd/klogd are alive, though.) | 152 | still be logged if syslogd/klogd are alive, though.) |
146 | 153 | ||
@@ -152,7 +159,7 @@ processes. | |||
152 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 159 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
153 | That happens to me, also. I've found that tapping shift, alt, and control | 160 | That happens to me, also. I've found that tapping shift, alt, and control |
154 | on both sides of the keyboard, and hitting an invalid sysrq sequence again | 161 | on both sides of the keyboard, and hitting an invalid sysrq sequence again |
155 | will fix the problem. (ie, something like alt-sysrq-z). Switching to another | 162 | will fix the problem. (i.e., something like alt-sysrq-z). Switching to another |
156 | virtual console (ALT+Fn) and then back again should also help. | 163 | virtual console (ALT+Fn) and then back again should also help. |
157 | 164 | ||
158 | * I hit SysRq, but nothing seems to happen, what's wrong? | 165 | * I hit SysRq, but nothing seems to happen, what's wrong? |
@@ -174,11 +181,11 @@ handler function you will use, B) a help_msg string, that will print when SysRQ | |||
174 | prints help, and C) an action_msg string, that will print right before your | 181 | prints help, and C) an action_msg string, that will print right before your |
175 | handler is called. Your handler must conform to the prototype in 'sysrq.h'. | 182 | handler is called. Your handler must conform to the prototype in 'sysrq.h'. |
176 | 183 | ||
177 | After the sysrq_key_op is created, you can call the macro | 184 | After the sysrq_key_op is created, you can call the kernel function |
178 | register_sysrq_key(int key, struct sysrq_key_op *op_p) that is defined in | 185 | register_sysrq_key(int key, struct sysrq_key_op *op_p); this will |
179 | sysrq.h, this will register the operation pointed to by 'op_p' at table | 186 | register the operation pointed to by 'op_p' at table key 'key', |
180 | key 'key', if that slot in the table is blank. At module unload time, you must | 187 | if that slot in the table is blank. At module unload time, you must call |
181 | call the macro unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which | 188 | the function unregister_sysrq_key(int key, struct sysrq_key_op *op_p), which |
182 | will remove the key op pointed to by 'op_p' from the key 'key', if and only if | 189 | will remove the key op pointed to by 'op_p' from the key 'key', if and only if |
183 | it is currently registered in that slot. This is in case the slot has been | 190 | it is currently registered in that slot. This is in case the slot has been |
184 | overwritten since you registered it. | 191 | overwritten since you registered it. |
@@ -186,15 +193,12 @@ overwritten since you registered it. | |||
186 | The Magic SysRQ system works by registering key operations against a key op | 193 | The Magic SysRQ system works by registering key operations against a key op |
187 | lookup table, which is defined in 'drivers/char/sysrq.c'. This key table has | 194 | lookup table, which is defined in 'drivers/char/sysrq.c'. This key table has |
188 | a number of operations registered into it at compile time, but is mutable, | 195 | a number of operations registered into it at compile time, but is mutable, |
189 | and 4 functions are exported for interface to it: __sysrq_lock_table, | 196 | and 2 functions are exported for interface to it: |
190 | __sysrq_unlock_table, __sysrq_get_key_op, and __sysrq_put_key_op. The | 197 | register_sysrq_key and unregister_sysrq_key. |
191 | functions __sysrq_swap_key_ops and __sysrq_swap_key_ops_nolock are defined | 198 | Of course, never ever leave an invalid pointer in the table. I.e., when |
192 | in the header itself, and the REGISTER and UNREGISTER macros are built from | 199 | your module that called register_sysrq_key() exits, it must call |
193 | these. More complex (and dangerous!) manipulations of the table are possible | 200 | unregister_sysrq_key() to clean up the sysrq key table entry that it used. |
194 | using these functions, but you must be careful to always lock the table before | 201 | Null pointers in the table are always safe. :) |
195 | you read or write from it, and to unlock it again when you are done. (And of | ||
196 | course, to never ever leave an invalid pointer in the table). Null pointers in | ||
197 | the table are always safe :) | ||
198 | 202 | ||
199 | If for some reason you feel the need to call the handle_sysrq function from | 203 | If for some reason you feel the need to call the handle_sysrq function from |
200 | within a function called by handle_sysrq, you must be aware that you are in | 204 | within a function called by handle_sysrq, you must be aware that you are in |
diff --git a/MAINTAINERS b/MAINTAINERS index f0596e452c5c..0ad8803a0c75 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -598,8 +598,6 @@ W: http://linux-atm.sourceforge.net | |||
598 | S: Maintained | 598 | S: Maintained |
599 | 599 | ||
600 | ATMEL MACB ETHERNET DRIVER | 600 | ATMEL MACB ETHERNET DRIVER |
601 | P: Atmel AVR32 Support Team | ||
602 | M: avr32@atmel.com | ||
603 | P: Haavard Skinnemoen | 601 | P: Haavard Skinnemoen |
604 | M: hskinnemoen@atmel.com | 602 | M: hskinnemoen@atmel.com |
605 | S: Supported | 603 | S: Supported |
@@ -620,8 +618,6 @@ T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git | |||
620 | S: Maintained | 618 | S: Maintained |
621 | 619 | ||
622 | AVR32 ARCHITECTURE | 620 | AVR32 ARCHITECTURE |
623 | P: Atmel AVR32 Support Team | ||
624 | M: avr32@atmel.com | ||
625 | P: Haavard Skinnemoen | 621 | P: Haavard Skinnemoen |
626 | M: hskinnemoen@atmel.com | 622 | M: hskinnemoen@atmel.com |
627 | W: http://www.atmel.com/products/AVR32/ | 623 | W: http://www.atmel.com/products/AVR32/ |
@@ -630,8 +626,6 @@ W: http://avrfreaks.net/ | |||
630 | S: Supported | 626 | S: Supported |
631 | 627 | ||
632 | AVR32/AT32AP MACHINE SUPPORT | 628 | AVR32/AT32AP MACHINE SUPPORT |
633 | P: Atmel AVR32 Support Team | ||
634 | M: avr32@atmel.com | ||
635 | P: Haavard Skinnemoen | 629 | P: Haavard Skinnemoen |
636 | M: hskinnemoen@atmel.com | 630 | M: hskinnemoen@atmel.com |
637 | S: Supported | 631 | S: Supported |
@@ -1598,12 +1592,11 @@ M: ipslinux@adaptec.com | |||
1598 | W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html | 1592 | W: http://www.developer.ibm.com/welcome/netfinity/serveraid.html |
1599 | S: Supported | 1593 | S: Supported |
1600 | 1594 | ||
1601 | IDE DRIVER [GENERAL] | 1595 | IDE SUBSYSTEM |
1602 | P: Bartlomiej Zolnierkiewicz | 1596 | P: Bartlomiej Zolnierkiewicz |
1603 | M: B.Zolnierkiewicz@elka.pw.edu.pl | 1597 | M: bzolnier@gmail.com |
1604 | L: linux-kernel@vger.kernel.org | ||
1605 | L: linux-ide@vger.kernel.org | 1598 | L: linux-ide@vger.kernel.org |
1606 | T: git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git | 1599 | T: quilt kernel.org/pub/linux/kernel/people/bart/pata-2.6/ |
1607 | S: Maintained | 1600 | S: Maintained |
1608 | 1601 | ||
1609 | IDE/ATAPI CDROM DRIVER | 1602 | IDE/ATAPI CDROM DRIVER |
@@ -2289,7 +2282,7 @@ P: Jozsef Kadlecsik | |||
2289 | P: Patrick McHardy | 2282 | P: Patrick McHardy |
2290 | M: kaber@trash.net | 2283 | M: kaber@trash.net |
2291 | L: netfilter-devel@lists.netfilter.org | 2284 | L: netfilter-devel@lists.netfilter.org |
2292 | L: netfilter@lists.netfilter.org | 2285 | L: netfilter@lists.netfilter.org (subscribers-only) |
2293 | L: coreteam@netfilter.org | 2286 | L: coreteam@netfilter.org |
2294 | W: http://www.netfilter.org/ | 2287 | W: http://www.netfilter.org/ |
2295 | W: http://www.iptables.org/ | 2288 | W: http://www.iptables.org/ |
@@ -3600,6 +3593,12 @@ M: ysato@users.sourceforge.jp | |||
3600 | W: http://uclinux-h8.sourceforge.jp/ | 3593 | W: http://uclinux-h8.sourceforge.jp/ |
3601 | S: Supported | 3594 | S: Supported |
3602 | 3595 | ||
3596 | UFS FILESYSTEM | ||
3597 | P: Evgeniy Dushistov | ||
3598 | M: dushistov@mail.ru | ||
3599 | L: linux-kernel@vger.kernel.org | ||
3600 | S: Maintained | ||
3601 | |||
3603 | USB DIAMOND RIO500 DRIVER | 3602 | USB DIAMOND RIO500 DRIVER |
3604 | P: Cesar Miquel | 3603 | P: Cesar Miquel |
3605 | M: miquel@df.uba.ar | 3604 | M: miquel@df.uba.ar |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 20 | 3 | SUBLEVEL = 20 |
4 | EXTRAVERSION =-rc6 | 4 | EXTRAVERSION =-rc7 |
5 | NAME = Homicidal Dwarf Hamster | 5 | NAME = Homicidal Dwarf Hamster |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -1116,15 +1116,15 @@ help: | |||
1116 | @echo ' cscope - Generate cscope index' | 1116 | @echo ' cscope - Generate cscope index' |
1117 | @echo ' kernelrelease - Output the release version string' | 1117 | @echo ' kernelrelease - Output the release version string' |
1118 | @echo ' kernelversion - Output the version stored in Makefile' | 1118 | @echo ' kernelversion - Output the version stored in Makefile' |
1119 | @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ | 1119 | @if [ -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \ |
1120 | echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ | 1120 | echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ |
1121 | echo ' (default: $(INSTALL_HDR_PATH))'; \ | ||
1121 | fi | 1122 | fi |
1122 | @echo ' (default: $(INSTALL_HDR_PATH))' | ||
1123 | @echo '' | 1123 | @echo '' |
1124 | @echo 'Static analysers' | 1124 | @echo 'Static analysers' |
1125 | @echo ' checkstack - Generate a list of stack hogs' | 1125 | @echo ' checkstack - Generate a list of stack hogs' |
1126 | @echo ' namespacecheck - Name space analysis on compiled kernel' | 1126 | @echo ' namespacecheck - Name space analysis on compiled kernel' |
1127 | @if [ -r include/asm-$(ARCH)/Kbuild ]; then \ | 1127 | @if [ -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \ |
1128 | echo ' headers_check - Sanity check on exported headers'; \ | 1128 | echo ' headers_check - Sanity check on exported headers'; \ |
1129 | fi | 1129 | fi |
1130 | @echo '' | 1130 | @echo '' |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 3370e6faeae0..c15186390693 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -47,6 +47,7 @@ | |||
47 | * Power off function, if any | 47 | * Power off function, if any |
48 | */ | 48 | */ |
49 | void (*pm_power_off)(void) = machine_power_off; | 49 | void (*pm_power_off)(void) = machine_power_off; |
50 | EXPORT_SYMBOL(pm_power_off); | ||
50 | 51 | ||
51 | void | 52 | void |
52 | cpu_idle(void) | 53 | cpu_idle(void) |
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig index 79049206dfa5..46b0c734aeb9 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260ek_defconfig | |||
@@ -923,7 +923,6 @@ CONFIG_FORCED_INLINING=y | |||
923 | # CONFIG_HEADERS_CHECK is not set | 923 | # CONFIG_HEADERS_CHECK is not set |
924 | # CONFIG_RCU_TORTURE_TEST is not set | 924 | # CONFIG_RCU_TORTURE_TEST is not set |
925 | CONFIG_DEBUG_USER=y | 925 | CONFIG_DEBUG_USER=y |
926 | # CONFIG_DEBUG_WAITQ is not set | ||
927 | # CONFIG_DEBUG_ERRORS is not set | 926 | # CONFIG_DEBUG_ERRORS is not set |
928 | CONFIG_DEBUG_LL=y | 927 | CONFIG_DEBUG_LL=y |
929 | # CONFIG_DEBUG_ICEDCC is not set | 928 | # CONFIG_DEBUG_ICEDCC is not set |
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig index 784ad7c0186d..fcd8fa091e9d 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261ek_defconfig | |||
@@ -1079,7 +1079,6 @@ CONFIG_FORCED_INLINING=y | |||
1079 | # CONFIG_HEADERS_CHECK is not set | 1079 | # CONFIG_HEADERS_CHECK is not set |
1080 | # CONFIG_RCU_TORTURE_TEST is not set | 1080 | # CONFIG_RCU_TORTURE_TEST is not set |
1081 | CONFIG_DEBUG_USER=y | 1081 | CONFIG_DEBUG_USER=y |
1082 | # CONFIG_DEBUG_WAITQ is not set | ||
1083 | # CONFIG_DEBUG_ERRORS is not set | 1082 | # CONFIG_DEBUG_ERRORS is not set |
1084 | CONFIG_DEBUG_LL=y | 1083 | CONFIG_DEBUG_LL=y |
1085 | # CONFIG_DEBUG_ICEDCC is not set | 1084 | # CONFIG_DEBUG_ICEDCC is not set |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index d994561816a1..cf495a3084b3 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -22,6 +22,10 @@ | |||
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | 24 | ||
25 | #if (PHYS_OFFSET & 0x001fffff) | ||
26 | #error "PHYS_OFFSET must be at an even 2MiB boundary!" | ||
27 | #endif | ||
28 | |||
25 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) | 29 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) |
26 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) | 30 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) |
27 | 31 | ||
@@ -251,7 +255,8 @@ __create_page_tables: | |||
251 | * Then map first 1MB of ram in case it contains our boot params. | 255 | * Then map first 1MB of ram in case it contains our boot params. |
252 | */ | 256 | */ |
253 | add r0, r4, #PAGE_OFFSET >> 18 | 257 | add r0, r4, #PAGE_OFFSET >> 18 |
254 | orr r6, r7, #PHYS_OFFSET | 258 | orr r6, r7, #(PHYS_OFFSET & 0xff000000) |
259 | orr r6, r6, #(PHYS_OFFSET & 0x00e00000) | ||
255 | str r6, [r0] | 260 | str r6, [r0] |
256 | 261 | ||
257 | #ifdef CONFIG_XIP_KERNEL | 262 | #ifdef CONFIG_XIP_KERNEL |
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_devices.c b/arch/arm/mach-at91rm9200/at91rm9200_devices.c index 4641b99db0ee..57fac7203fe4 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200_devices.c +++ b/arch/arm/mach-at91rm9200/at91rm9200_devices.c | |||
@@ -272,7 +272,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data) | |||
272 | at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ | 272 | at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */ |
273 | 273 | ||
274 | /* nWAIT is _not_ a default setting */ | 274 | /* nWAIT is _not_ a default setting */ |
275 | at91_set_A_periph(AT91_PIN_PC6, 1); /* nWAIT */ | 275 | at91_set_A_periph(AT91_PIN_PC6, 1); /* nWAIT */ |
276 | 276 | ||
277 | cf_data = *data; | 277 | cf_data = *data; |
278 | platform_device_register(&at91rm9200_cf_device); | 278 | platform_device_register(&at91rm9200_cf_device); |
diff --git a/arch/arm/mach-at91rm9200/at91sam9260.c b/arch/arm/mach-at91rm9200/at91sam9260.c index 203f073a53e6..b14871adc300 100644 --- a/arch/arm/mach-at91rm9200/at91sam9260.c +++ b/arch/arm/mach-at91rm9200/at91sam9260.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/arch/at91sam9260.h> | 17 | #include <asm/arch/at91sam9260.h> |
18 | #include <asm/arch/at91_pmc.h> | 18 | #include <asm/arch/at91_pmc.h> |
19 | #include <asm/arch/at91_rstc.h> | ||
19 | 20 | ||
20 | #include "generic.h" | 21 | #include "generic.h" |
21 | #include "clock.h" | 22 | #include "clock.h" |
@@ -212,7 +213,7 @@ static struct at91_gpio_bank at91sam9260_gpio[] = { | |||
212 | 213 | ||
213 | static void at91sam9260_reset(void) | 214 | static void at91sam9260_reset(void) |
214 | { | 215 | { |
215 | #warning "Implement CPU reset" | 216 | at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); |
216 | } | 217 | } |
217 | 218 | ||
218 | 219 | ||
diff --git a/arch/arm/mach-at91rm9200/at91sam9261.c b/arch/arm/mach-at91rm9200/at91sam9261.c index 5a82f35da2e9..d242bb885c6d 100644 --- a/arch/arm/mach-at91rm9200/at91sam9261.c +++ b/arch/arm/mach-at91rm9200/at91sam9261.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/arch/at91sam9261.h> | 17 | #include <asm/arch/at91sam9261.h> |
18 | #include <asm/arch/at91_pmc.h> | 18 | #include <asm/arch/at91_pmc.h> |
19 | #include <asm/arch/at91_rstc.h> | ||
19 | 20 | ||
20 | #include "generic.h" | 21 | #include "generic.h" |
21 | #include "clock.h" | 22 | #include "clock.h" |
@@ -207,7 +208,7 @@ static struct at91_gpio_bank at91sam9261_gpio[] = { | |||
207 | 208 | ||
208 | static void at91sam9261_reset(void) | 209 | static void at91sam9261_reset(void) |
209 | { | 210 | { |
210 | #warning "Implement CPU reset" | 211 | at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); |
211 | } | 212 | } |
212 | 213 | ||
213 | 214 | ||
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index 3f188508c391..af22659c8a28 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
22 | #include <asm/arch/at91_pio.h> | 22 | #include <asm/arch/at91_pio.h> |
23 | #include <asm/arch/at91_pmc.h> | ||
24 | #include <asm/arch/gpio.h> | 23 | #include <asm/arch/gpio.h> |
25 | 24 | ||
26 | #include "generic.h" | 25 | #include "generic.h" |
@@ -224,17 +223,17 @@ static u32 backups[MAX_GPIO_BANKS]; | |||
224 | static int gpio_irq_set_wake(unsigned pin, unsigned state) | 223 | static int gpio_irq_set_wake(unsigned pin, unsigned state) |
225 | { | 224 | { |
226 | unsigned mask = pin_to_mask(pin); | 225 | unsigned mask = pin_to_mask(pin); |
226 | unsigned bank = (pin - PIN_BASE) / 32; | ||
227 | 227 | ||
228 | pin -= PIN_BASE; | 228 | if (unlikely(bank >= MAX_GPIO_BANKS)) |
229 | pin /= 32; | ||
230 | |||
231 | if (unlikely(pin >= MAX_GPIO_BANKS)) | ||
232 | return -EINVAL; | 229 | return -EINVAL; |
233 | 230 | ||
234 | if (state) | 231 | if (state) |
235 | wakeups[pin] |= mask; | 232 | wakeups[bank] |= mask; |
236 | else | 233 | else |
237 | wakeups[pin] &= ~mask; | 234 | wakeups[bank] &= ~mask; |
235 | |||
236 | set_irq_wake(gpio[bank].id, state); | ||
238 | 237 | ||
239 | return 0; | 238 | return 0; |
240 | } | 239 | } |
@@ -246,29 +245,15 @@ void at91_gpio_suspend(void) | |||
246 | for (i = 0; i < gpio_banks; i++) { | 245 | for (i = 0; i < gpio_banks; i++) { |
247 | u32 pio = gpio[i].offset; | 246 | u32 pio = gpio[i].offset; |
248 | 247 | ||
249 | /* | ||
250 | * Note: drivers should have disabled GPIO interrupts that | ||
251 | * aren't supposed to be wakeup sources. | ||
252 | * But that is not much good on ARM..... disable_irq() does | ||
253 | * not update the hardware immediately, so the hardware mask | ||
254 | * (IMR) has the wrong value (not current, too much is | ||
255 | * permitted). | ||
256 | * | ||
257 | * Our workaround is to disable all non-wakeup IRQs ... | ||
258 | * which is exactly what correct drivers asked for in the | ||
259 | * first place! | ||
260 | */ | ||
261 | backups[i] = at91_sys_read(pio + PIO_IMR); | 248 | backups[i] = at91_sys_read(pio + PIO_IMR); |
262 | at91_sys_write(pio + PIO_IDR, backups[i]); | 249 | at91_sys_write(pio + PIO_IDR, backups[i]); |
263 | at91_sys_write(pio + PIO_IER, wakeups[i]); | 250 | at91_sys_write(pio + PIO_IER, wakeups[i]); |
264 | 251 | ||
265 | if (!wakeups[i]) { | 252 | if (!wakeups[i]) |
266 | disable_irq_wake(gpio[i].id); | 253 | clk_disable(gpio[i].clock); |
267 | at91_sys_write(AT91_PMC_PCDR, 1 << gpio[i].id); | 254 | else { |
268 | } else { | ||
269 | enable_irq_wake(gpio[i].id); | ||
270 | #ifdef CONFIG_PM_DEBUG | 255 | #ifdef CONFIG_PM_DEBUG |
271 | printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", "ABCD"[i], wakeups[i]); | 256 | printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", 'A'+i, wakeups[i]); |
272 | #endif | 257 | #endif |
273 | } | 258 | } |
274 | } | 259 | } |
@@ -281,9 +266,11 @@ void at91_gpio_resume(void) | |||
281 | for (i = 0; i < gpio_banks; i++) { | 266 | for (i = 0; i < gpio_banks; i++) { |
282 | u32 pio = gpio[i].offset; | 267 | u32 pio = gpio[i].offset; |
283 | 268 | ||
269 | if (!wakeups[i]) | ||
270 | clk_enable(gpio[i].clock); | ||
271 | |||
284 | at91_sys_write(pio + PIO_IDR, wakeups[i]); | 272 | at91_sys_write(pio + PIO_IDR, wakeups[i]); |
285 | at91_sys_write(pio + PIO_IER, backups[i]); | 273 | at91_sys_write(pio + PIO_IER, backups[i]); |
286 | at91_sys_write(AT91_PMC_PCER, 1 << gpio[i].id); | ||
287 | } | 274 | } |
288 | } | 275 | } |
289 | 276 | ||
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c index ac5f99895660..4f66e90db74f 100644 --- a/arch/arm/mach-imx/cpufreq.c +++ b/arch/arm/mach-imx/cpufreq.c | |||
@@ -184,6 +184,17 @@ static int imx_set_target(struct cpufreq_policy *policy, | |||
184 | long sysclk; | 184 | long sysclk; |
185 | unsigned int bclk_div = 1; | 185 | unsigned int bclk_div = 1; |
186 | 186 | ||
187 | /* | ||
188 | * Some governors do not respects CPU and policy lower limits | ||
189 | * which leads to bad things (division by zero etc), ensure | ||
190 | * that such things do not happen. | ||
191 | */ | ||
192 | if(target_freq < policy->cpuinfo.min_freq) | ||
193 | target_freq = policy->cpuinfo.min_freq; | ||
194 | |||
195 | if(target_freq < policy->min) | ||
196 | target_freq = policy->min; | ||
197 | |||
187 | freq = target_freq * 1000; | 198 | freq = target_freq * 1000; |
188 | 199 | ||
189 | pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n", | 200 | pr_debug(KERN_DEBUG "imx: requested frequency %ld Hz, mpctl0 at boot 0x%08x\n", |
@@ -258,7 +269,8 @@ static int __init imx_cpufreq_driver_init(struct cpufreq_policy *policy) | |||
258 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 269 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
259 | policy->cpuinfo.min_freq = 8000; | 270 | policy->cpuinfo.min_freq = 8000; |
260 | policy->cpuinfo.max_freq = 200000; | 271 | policy->cpuinfo.max_freq = 200000; |
261 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 272 | /* Manual states, that PLL stabilizes in two CLK32 periods */ |
273 | policy->cpuinfo.transition_latency = 4 * 1000000000LL / CLK32; | ||
262 | return 0; | 274 | return 0; |
263 | } | 275 | } |
264 | 276 | ||
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c index ba346546150b..f6fb215bb48c 100644 --- a/arch/arm/mach-s3c2410/gpio.c +++ b/arch/arm/mach-s3c2410/gpio.c | |||
@@ -57,6 +57,7 @@ void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) | |||
57 | case S3C2410_GPIO_SFN2: | 57 | case S3C2410_GPIO_SFN2: |
58 | case S3C2410_GPIO_SFN3: | 58 | case S3C2410_GPIO_SFN3: |
59 | if (pin < S3C2410_GPIO_BANKB) { | 59 | if (pin < S3C2410_GPIO_BANKB) { |
60 | function -= 1; | ||
60 | function &= 1; | 61 | function &= 1; |
61 | function <<= S3C2410_GPIO_OFFSET(pin); | 62 | function <<= S3C2410_GPIO_OFFSET(pin); |
62 | } else { | 63 | } else { |
@@ -83,15 +84,18 @@ EXPORT_SYMBOL(s3c2410_gpio_cfgpin); | |||
83 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) | 84 | unsigned int s3c2410_gpio_getcfg(unsigned int pin) |
84 | { | 85 | { |
85 | void __iomem *base = S3C24XX_GPIO_BASE(pin); | 86 | void __iomem *base = S3C24XX_GPIO_BASE(pin); |
86 | unsigned long mask; | 87 | unsigned long val = __raw_readl(base); |
87 | 88 | ||
88 | if (pin < S3C2410_GPIO_BANKB) { | 89 | if (pin < S3C2410_GPIO_BANKB) { |
89 | mask = 1 << S3C2410_GPIO_OFFSET(pin); | 90 | val >>= S3C2410_GPIO_OFFSET(pin); |
91 | val &= 1; | ||
92 | val += 1; | ||
90 | } else { | 93 | } else { |
91 | mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; | 94 | val >>= S3C2410_GPIO_OFFSET(pin)*2; |
95 | val &= 3; | ||
92 | } | 96 | } |
93 | 97 | ||
94 | return __raw_readl(base) & mask; | 98 | return val | S3C2410_GPIO_INPUT; |
95 | } | 99 | } |
96 | 100 | ||
97 | EXPORT_SYMBOL(s3c2410_gpio_getcfg); | 101 | EXPORT_SYMBOL(s3c2410_gpio_getcfg); |
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index 00834097eb82..ebf294dd31da 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c | |||
@@ -451,15 +451,14 @@ static void s3c2410_pm_check_resume_pin(unsigned int pin, unsigned int irqoffs) | |||
451 | irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); | 451 | irqstate = s3c_irqwake_eintmask & (1L<<irqoffs); |
452 | 452 | ||
453 | pinstate = s3c2410_gpio_getcfg(pin); | 453 | pinstate = s3c2410_gpio_getcfg(pin); |
454 | pinstate >>= S3C2410_GPIO_OFFSET(pin)*2; | ||
455 | 454 | ||
456 | if (!irqstate) { | 455 | if (!irqstate) { |
457 | if (pinstate == 0x02) | 456 | if (pinstate == S3C2410_GPIO_IRQ) |
458 | DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); | 457 | DBG("Leaving IRQ %d (pin %d) enabled\n", irq, pin); |
459 | } else { | 458 | } else { |
460 | if (pinstate == 0x02) { | 459 | if (pinstate == S3C2410_GPIO_IRQ) { |
461 | DBG("Disabling IRQ %d (pin %d)\n", irq, pin); | 460 | DBG("Disabling IRQ %d (pin %d)\n", irq, pin); |
462 | s3c2410_gpio_cfgpin(pin, 0x00); | 461 | s3c2410_gpio_cfgpin(pin, S3C2410_GPIO_INPUT); |
463 | } | 462 | } |
464 | } | 463 | } |
465 | } | 464 | } |
diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c b/arch/arm/mach-s3c2410/s3c2412-dma.c index fe71a8fdb87c..138f726ac6bf 100644 --- a/arch/arm/mach-s3c2410/s3c2412-dma.c +++ b/arch/arm/mach-s3c2410/s3c2412-dma.c | |||
@@ -133,8 +133,8 @@ static struct s3c24xx_dma_map __initdata s3c2412_dma_mappings[] = { | |||
133 | static void s3c2412_dma_select(struct s3c2410_dma_chan *chan, | 133 | static void s3c2412_dma_select(struct s3c2410_dma_chan *chan, |
134 | struct s3c24xx_dma_map *map) | 134 | struct s3c24xx_dma_map *map) |
135 | { | 135 | { |
136 | writel(chan->regs + S3C2412_DMA_DMAREQSEL, | 136 | writel(map->channels[0] | S3C2412_DMAREQSEL_HW, |
137 | map->channels[0] | S3C2412_DMAREQSEL_HW); | 137 | chan->regs + S3C2412_DMA_DMAREQSEL); |
138 | } | 138 | } |
139 | 139 | ||
140 | static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { | 140 | static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index b5814b4b6f35..7760193e74cc 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -52,15 +52,18 @@ void show_mem(void) | |||
52 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); | 52 | printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); |
53 | 53 | ||
54 | for_each_online_node(node) { | 54 | for_each_online_node(node) { |
55 | pg_data_t *n = NODE_DATA(node); | ||
56 | struct page *map = n->node_mem_map - n->node_start_pfn; | ||
57 | |||
55 | for_each_nodebank (i,mi,node) { | 58 | for_each_nodebank (i,mi,node) { |
56 | unsigned int pfn1, pfn2; | 59 | unsigned int pfn1, pfn2; |
57 | struct page *page, *end; | 60 | struct page *page, *end; |
58 | 61 | ||
59 | pfn1 = mi->bank[i].start >> PAGE_SHIFT; | 62 | pfn1 = __phys_to_pfn(mi->bank[i].start); |
60 | pfn2 = (mi->bank[i].size + mi->bank[i].start) >> PAGE_SHIFT; | 63 | pfn2 = __phys_to_pfn(mi->bank[i].size + mi->bank[i].start); |
61 | 64 | ||
62 | page = NODE_MEM_MAP(node) + pfn1; | 65 | page = map + pfn1; |
63 | end = NODE_MEM_MAP(node) + pfn2; | 66 | end = map + pfn2; |
64 | 67 | ||
65 | do { | 68 | do { |
66 | total++; | 69 | total++; |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 251685fe73a8..0ac615c0f798 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -300,7 +300,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, | |||
300 | addr = (unsigned long)area->addr; | 300 | addr = (unsigned long)area->addr; |
301 | 301 | ||
302 | #ifndef CONFIG_SMP | 302 | #ifndef CONFIG_SMP |
303 | if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || | 303 | if (DOMAIN_IO == 0 && |
304 | (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) || | ||
304 | cpu_is_xsc3()) && | 305 | cpu_is_xsc3()) && |
305 | !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { | 306 | !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) { |
306 | area->flags |= VM_ARM_SECTION_MAPPING; | 307 | area->flags |= VM_ARM_SECTION_MAPPING; |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 490e11b34231..d29fe927ee9e 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -708,7 +708,7 @@ __8032x_proc_info: | |||
708 | .type __8033x_proc_info,#object | 708 | .type __8033x_proc_info,#object |
709 | __8033x_proc_info: | 709 | __8033x_proc_info: |
710 | .long 0x69054010 | 710 | .long 0x69054010 |
711 | .long 0xffffff30 | 711 | .long 0xfffffd30 |
712 | .long PMD_TYPE_SECT | \ | 712 | .long PMD_TYPE_SECT | \ |
713 | PMD_SECT_BUFFERABLE | \ | 713 | PMD_SECT_BUFFERABLE | \ |
714 | PMD_SECT_CACHEABLE | \ | 714 | PMD_SECT_CACHEABLE | \ |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 8bcb838e5444..bd78058b7178 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Thu Dec 7 17:19:20 2006 | 15 | # Last update: Tue Jan 16 16:52:56 2007 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -1219,3 +1219,26 @@ zevio_1020 MACH_ZEVIO_1020 ZEVIO_1020 1207 | |||
1219 | hitrack MACH_HITRACK HITRACK 1208 | 1219 | hitrack MACH_HITRACK HITRACK 1208 |
1220 | syme1 MACH_SYME1 SYME1 1209 | 1220 | syme1 MACH_SYME1 SYME1 1209 |
1221 | syhl1 MACH_SYHL1 SYHL1 1210 | 1221 | syhl1 MACH_SYHL1 SYHL1 1210 |
1222 | empca400 MACH_EMPCA400 EMPCA400 1211 | ||
1223 | em7210 MACH_EM7210 EM7210 1212 | ||
1224 | htchermes MACH_HTCHERMES HTCHERMES 1213 | ||
1225 | eti_c1 MACH_ETI_C1 ETI_C1 1214 | ||
1226 | mach_dep2410 MACH_MACH_DEP2410 MACH_DEP2410 1215 | ||
1227 | ac100 MACH_AC100 AC100 1216 | ||
1228 | sneetch MACH_SNEETCH SNEETCH 1217 | ||
1229 | studentmate MACH_STUDENTMATE STUDENTMATE 1218 | ||
1230 | zir2410 MACH_ZIR2410 ZIR2410 1219 | ||
1231 | zir2413 MACH_ZIR2413 ZIR2413 1220 | ||
1232 | dlonip3 MACH_DLONIP3 DLONIP3 1221 | ||
1233 | instream MACH_INSTREAM INSTREAM 1222 | ||
1234 | ambarella MACH_AMBARELLA AMBARELLA 1223 | ||
1235 | nevis MACH_NEVIS NEVIS 1224 | ||
1236 | htc_trinity MACH_HTC_TRINITY HTC_TRINITY 1225 | ||
1237 | ql202b MACH_QL202B QL202B 1226 | ||
1238 | vpac270 MACH_VPAC270 VPAC270 1227 | ||
1239 | rd129 MACH_RD129 RD129 1228 | ||
1240 | htcwizard MACH_HTCWIZARD HTCWIZARD 1229 | ||
1241 | xscale_treo680 MACH_XSCALE_TREO680 XSCALE_TREO680 1230 | ||
1242 | tecon_tmezon MACH_TECON_TMEZON TECON_TMEZON 1231 | ||
1243 | zylonite MACH_ZYLONITE ZYLONITE 1233 | ||
1244 | gene1270 MACH_GENE1270 GENE1270 1234 | ||
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index 7b595547c1c8..ca2a5ad19ea6 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S | |||
@@ -25,6 +25,7 @@ | |||
25 | do_vfp: | 25 | do_vfp: |
26 | enable_irq | 26 | enable_irq |
27 | ldr r4, .LCvfp | 27 | ldr r4, .LCvfp |
28 | ldr r11, [r10, #TI_CPU] @ CPU number | ||
28 | add r10, r10, #TI_VFPSTATE @ r10 = workspace | 29 | add r10, r10, #TI_VFPSTATE @ r10 = workspace |
29 | ldr pc, [r4] @ call VFP entry point | 30 | ldr pc, [r4] @ call VFP entry point |
30 | 31 | ||
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index f2797896e6d5..54a2ad6d9ca2 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h | |||
@@ -370,3 +370,7 @@ struct op { | |||
370 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); | 370 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); |
371 | u32 flags; | 371 | u32 flags; |
372 | }; | 372 | }; |
373 | |||
374 | #ifdef CONFIG_SMP | ||
375 | extern void vfp_save_state(void *location, u32 fpexc); | ||
376 | #endif | ||
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index e51e6679c402..d4b7b229631d 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -65,6 +65,7 @@ | |||
65 | @ r2 = faulted PC+4 | 65 | @ r2 = faulted PC+4 |
66 | @ r9 = successful return | 66 | @ r9 = successful return |
67 | @ r10 = vfp_state union | 67 | @ r10 = vfp_state union |
68 | @ r11 = CPU number | ||
68 | @ lr = failure return | 69 | @ lr = failure return |
69 | 70 | ||
70 | .globl vfp_support_entry | 71 | .globl vfp_support_entry |
@@ -79,7 +80,7 @@ vfp_support_entry: | |||
79 | DBGSTR1 "enable %x", r10 | 80 | DBGSTR1 "enable %x", r10 |
80 | ldr r3, last_VFP_context_address | 81 | ldr r3, last_VFP_context_address |
81 | orr r1, r1, #FPEXC_ENABLE @ user FPEXC has the enable bit set | 82 | orr r1, r1, #FPEXC_ENABLE @ user FPEXC has the enable bit set |
82 | ldr r4, [r3] @ last_VFP_context pointer | 83 | ldr r4, [r3, r11, lsl #2] @ last_VFP_context pointer |
83 | bic r5, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled | 84 | bic r5, r1, #FPEXC_EXCEPTION @ make sure exceptions are disabled |
84 | cmp r4, r10 | 85 | cmp r4, r10 |
85 | beq check_for_exception @ we are returning to the same | 86 | beq check_for_exception @ we are returning to the same |
@@ -91,7 +92,9 @@ vfp_support_entry: | |||
91 | @ exceptions, so we can get at the | 92 | @ exceptions, so we can get at the |
92 | @ rest of it | 93 | @ rest of it |
93 | 94 | ||
95 | #ifndef CONFIG_SMP | ||
94 | @ Save out the current registers to the old thread state | 96 | @ Save out the current registers to the old thread state |
97 | @ No need for SMP since this is not done lazily | ||
95 | 98 | ||
96 | DBGSTR1 "save old state %p", r4 | 99 | DBGSTR1 "save old state %p", r4 |
97 | cmp r4, #0 | 100 | cmp r4, #0 |
@@ -105,10 +108,11 @@ vfp_support_entry: | |||
105 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 | 108 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 |
106 | @ and point r4 at the word at the | 109 | @ and point r4 at the word at the |
107 | @ start of the register dump | 110 | @ start of the register dump |
111 | #endif | ||
108 | 112 | ||
109 | no_old_VFP_process: | 113 | no_old_VFP_process: |
110 | DBGSTR1 "load state %p", r10 | 114 | DBGSTR1 "load state %p", r10 |
111 | str r10, [r3] @ update the last_VFP_context pointer | 115 | str r10, [r3, r11, lsl #2] @ update the last_VFP_context pointer |
112 | @ Load the saved state back into the VFP | 116 | @ Load the saved state back into the VFP |
113 | VFPFLDMIA r10 @ reload the working registers while | 117 | VFPFLDMIA r10 @ reload the working registers while |
114 | @ FPEXC is in a safe state | 118 | @ FPEXC is in a safe state |
@@ -162,6 +166,24 @@ process_exception: | |||
162 | @ required. If not, the user code will | 166 | @ required. If not, the user code will |
163 | @ retry the faulted instruction | 167 | @ retry the faulted instruction |
164 | 168 | ||
169 | #ifdef CONFIG_SMP | ||
170 | .globl vfp_save_state | ||
171 | .type vfp_save_state, %function | ||
172 | vfp_save_state: | ||
173 | @ Save the current VFP state | ||
174 | @ r0 - save location | ||
175 | @ r1 - FPEXC | ||
176 | DBGSTR1 "save VFP state %p", r0 | ||
177 | VFPFMRX r2, FPSCR @ current status | ||
178 | VFPFMRX r3, FPINST @ FPINST (always there, rev0 onwards) | ||
179 | tst r1, #FPEXC_FPV2 @ is there an FPINST2 to read? | ||
180 | VFPFMRX r12, FPINST2, NE @ FPINST2 if needed - avoids reading | ||
181 | @ nonexistant reg on rev0 | ||
182 | VFPFSTMIA r0 @ save the working registers | ||
183 | stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2 | ||
184 | mov pc, lr | ||
185 | #endif | ||
186 | |||
165 | last_VFP_context_address: | 187 | last_VFP_context_address: |
166 | .word last_VFP_context | 188 | .word last_VFP_context |
167 | 189 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 490d9d18a7d1..f1e5951dc721 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -28,7 +28,7 @@ void vfp_testing_entry(void); | |||
28 | void vfp_support_entry(void); | 28 | void vfp_support_entry(void); |
29 | 29 | ||
30 | void (*vfp_vector)(void) = vfp_testing_entry; | 30 | void (*vfp_vector)(void) = vfp_testing_entry; |
31 | union vfp_state *last_VFP_context; | 31 | union vfp_state *last_VFP_context[NR_CPUS]; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Dual-use variable. | 34 | * Dual-use variable. |
@@ -41,13 +41,35 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
41 | { | 41 | { |
42 | struct thread_info *thread = v; | 42 | struct thread_info *thread = v; |
43 | union vfp_state *vfp; | 43 | union vfp_state *vfp; |
44 | __u32 cpu = thread->cpu; | ||
44 | 45 | ||
45 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { | 46 | if (likely(cmd == THREAD_NOTIFY_SWITCH)) { |
47 | u32 fpexc = fmrx(FPEXC); | ||
48 | |||
49 | #ifdef CONFIG_SMP | ||
50 | /* | ||
51 | * On SMP, if VFP is enabled, save the old state in | ||
52 | * case the thread migrates to a different CPU. The | ||
53 | * restoring is done lazily. | ||
54 | */ | ||
55 | if ((fpexc & FPEXC_ENABLE) && last_VFP_context[cpu]) { | ||
56 | vfp_save_state(last_VFP_context[cpu], fpexc); | ||
57 | last_VFP_context[cpu]->hard.cpu = cpu; | ||
58 | } | ||
59 | /* | ||
60 | * Thread migration, just force the reloading of the | ||
61 | * state on the new CPU in case the VFP registers | ||
62 | * contain stale data. | ||
63 | */ | ||
64 | if (thread->vfpstate.hard.cpu != cpu) | ||
65 | last_VFP_context[cpu] = NULL; | ||
66 | #endif | ||
67 | |||
46 | /* | 68 | /* |
47 | * Always disable VFP so we can lazily save/restore the | 69 | * Always disable VFP so we can lazily save/restore the |
48 | * old state. | 70 | * old state. |
49 | */ | 71 | */ |
50 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_ENABLE); | 72 | fmxr(FPEXC, fpexc & ~FPEXC_ENABLE); |
51 | return NOTIFY_DONE; | 73 | return NOTIFY_DONE; |
52 | } | 74 | } |
53 | 75 | ||
@@ -68,8 +90,8 @@ static int vfp_notifier(struct notifier_block *self, unsigned long cmd, void *v) | |||
68 | } | 90 | } |
69 | 91 | ||
70 | /* flush and release case: Per-thread VFP cleanup. */ | 92 | /* flush and release case: Per-thread VFP cleanup. */ |
71 | if (last_VFP_context == vfp) | 93 | if (last_VFP_context[cpu] == vfp) |
72 | last_VFP_context = NULL; | 94 | last_VFP_context[cpu] = NULL; |
73 | 95 | ||
74 | return NOTIFY_DONE; | 96 | return NOTIFY_DONE; |
75 | } | 97 | } |
diff --git a/arch/i386/boot/compressed/relocs.c b/arch/i386/boot/compressed/relocs.c index 468da89153c4..881951ca03e1 100644 --- a/arch/i386/boot/compressed/relocs.c +++ b/arch/i386/boot/compressed/relocs.c | |||
@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name) | |||
43 | /* Match found */ | 43 | /* Match found */ |
44 | return 1; | 44 | return 1; |
45 | } | 45 | } |
46 | if (strncmp(sym_name, "__crc_", 6) == 0) | ||
47 | return 1; | ||
46 | return 0; | 48 | return 0; |
47 | } | 49 | } |
48 | 50 | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index bec50170b75a..4786fedca6eb 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -51,7 +51,6 @@ enum { | |||
51 | 51 | ||
52 | 52 | ||
53 | static int has_N44_O17_errata[NR_CPUS]; | 53 | static int has_N44_O17_errata[NR_CPUS]; |
54 | static int has_N60_errata[NR_CPUS]; | ||
55 | static unsigned int stock_freq; | 54 | static unsigned int stock_freq; |
56 | static struct cpufreq_driver p4clockmod_driver; | 55 | static struct cpufreq_driver p4clockmod_driver; |
57 | static unsigned int cpufreq_p4_get(unsigned int cpu); | 56 | static unsigned int cpufreq_p4_get(unsigned int cpu); |
@@ -224,12 +223,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
224 | case 0x0f12: | 223 | case 0x0f12: |
225 | has_N44_O17_errata[policy->cpu] = 1; | 224 | has_N44_O17_errata[policy->cpu] = 1; |
226 | dprintk("has errata -- disabling low frequencies\n"); | 225 | dprintk("has errata -- disabling low frequencies\n"); |
227 | break; | ||
228 | |||
229 | case 0x0f29: | ||
230 | has_N60_errata[policy->cpu] = 1; | ||
231 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); | ||
232 | break; | ||
233 | } | 226 | } |
234 | 227 | ||
235 | /* get max frequency */ | 228 | /* get max frequency */ |
@@ -241,8 +234,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
241 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 234 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
242 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) | 235 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) |
243 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 236 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
244 | else if (has_N60_errata[policy->cpu] && ((stock_freq * i)/8) < 2000000) | ||
245 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | ||
246 | else | 237 | else |
247 | p4clockmod_table[i].frequency = (stock_freq * i)/8; | 238 | p4clockmod_table[i].frequency = (stock_freq * i)/8; |
248 | } | 239 | } |
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index abcff92f994c..c0c3b59de32c 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c | |||
@@ -173,7 +173,7 @@ static void __cpuinit geode_configure(void) | |||
173 | ccr4 = getCx86(CX86_CCR4); | 173 | ccr4 = getCx86(CX86_CCR4); |
174 | ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */ | 174 | ccr4 |= 0x38; /* FPU fast, DTE cache, Mem bypass */ |
175 | 175 | ||
176 | setCx86(CX86_CCR4, ccr4); | 176 | setCx86(CX86_CCR3, ccr3); |
177 | 177 | ||
178 | set_cx86_memwb(); | 178 | set_cx86_memwb(); |
179 | set_cx86_reorder(); | 179 | set_cx86_reorder(); |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 2424cc9c7b3d..6a3875f81a0a 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -1227,26 +1227,32 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 } | |||
1227 | 1227 | ||
1228 | static int __assign_irq_vector(int irq) | 1228 | static int __assign_irq_vector(int irq) |
1229 | { | 1229 | { |
1230 | static int current_vector = FIRST_DEVICE_VECTOR, offset = 0; | 1230 | static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; |
1231 | int vector; | 1231 | int vector, offset, i; |
1232 | 1232 | ||
1233 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); | 1233 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); |
1234 | 1234 | ||
1235 | if (irq_vector[irq] > 0) | 1235 | if (irq_vector[irq] > 0) |
1236 | return irq_vector[irq]; | 1236 | return irq_vector[irq]; |
1237 | 1237 | ||
1238 | current_vector += 8; | ||
1239 | if (current_vector == SYSCALL_VECTOR) | ||
1240 | current_vector += 8; | ||
1241 | |||
1242 | if (current_vector >= FIRST_SYSTEM_VECTOR) { | ||
1243 | offset++; | ||
1244 | if (!(offset % 8)) | ||
1245 | return -ENOSPC; | ||
1246 | current_vector = FIRST_DEVICE_VECTOR + offset; | ||
1247 | } | ||
1248 | |||
1249 | vector = current_vector; | 1238 | vector = current_vector; |
1239 | offset = current_offset; | ||
1240 | next: | ||
1241 | vector += 8; | ||
1242 | if (vector >= FIRST_SYSTEM_VECTOR) { | ||
1243 | offset = (offset + 1) % 8; | ||
1244 | vector = FIRST_DEVICE_VECTOR + offset; | ||
1245 | } | ||
1246 | if (vector == current_vector) | ||
1247 | return -ENOSPC; | ||
1248 | if (vector == SYSCALL_VECTOR) | ||
1249 | goto next; | ||
1250 | for (i = 0; i < NR_IRQ_VECTORS; i++) | ||
1251 | if (irq_vector[i] == vector) | ||
1252 | goto next; | ||
1253 | |||
1254 | current_vector = vector; | ||
1255 | current_offset = offset; | ||
1250 | irq_vector[irq] = vector; | 1256 | irq_vector[irq] = vector; |
1251 | 1257 | ||
1252 | return vector; | 1258 | return vector; |
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c index c511705c386c..cc2f519b2f7f 100644 --- a/arch/i386/mach-default/setup.c +++ b/arch/i386/mach-default/setup.c | |||
@@ -102,7 +102,7 @@ void __init time_init_hook(void) | |||
102 | * along the MCA bus. Use this to hook into that chain if you will need | 102 | * along the MCA bus. Use this to hook into that chain if you will need |
103 | * it. | 103 | * it. |
104 | **/ | 104 | **/ |
105 | void __init mca_nmi_hook(void) | 105 | void mca_nmi_hook(void) |
106 | { | 106 | { |
107 | /* If I recall correctly, there's a whole bunch of other things that | 107 | /* If I recall correctly, there's a whole bunch of other things that |
108 | * we can do to check for NMI problems, but that's all I know about | 108 | * we can do to check for NMI problems, but that's all I know about |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index ef2fe474f107..29f05d4b68cd 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -609,6 +609,9 @@ EXPORT_SYMBOL(acpi_register_gsi); | |||
609 | 609 | ||
610 | void acpi_unregister_gsi(u32 gsi) | 610 | void acpi_unregister_gsi(u32 gsi) |
611 | { | 611 | { |
612 | if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM) | ||
613 | return; | ||
614 | |||
612 | iosapic_unregister_intr(gsi); | 615 | iosapic_unregister_intr(gsi); |
613 | } | 616 | } |
614 | 617 | ||
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 54d55e4d64f7..ce49c85c928f 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c | |||
@@ -122,6 +122,9 @@ static void migrate_irqs(void) | |||
122 | for (irq=0; irq < NR_IRQS; irq++) { | 122 | for (irq=0; irq < NR_IRQS; irq++) { |
123 | desc = irq_desc + irq; | 123 | desc = irq_desc + irq; |
124 | 124 | ||
125 | if (desc->status == IRQ_DISABLED) | ||
126 | continue; | ||
127 | |||
125 | /* | 128 | /* |
126 | * No handling for now. | 129 | * No handling for now. |
127 | * TBD: Implement a disable function so we can now | 130 | * TBD: Implement a disable function so we can now |
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile index b662c75fb28e..cb7f349b0514 100644 --- a/arch/mips/mips-boards/malta/Makefile +++ b/arch/mips/mips-boards/malta/Makefile | |||
@@ -19,5 +19,6 @@ | |||
19 | # under Linux. | 19 | # under Linux. |
20 | # | 20 | # |
21 | 21 | ||
22 | obj-y := malta_int.o malta_mtd.o malta_setup.o | 22 | obj-y := malta_int.o malta_setup.o |
23 | obj-$(CONFIG_MTD) += malta_mtd.o | ||
23 | obj-$(CONFIG_SMP) += malta_smp.o | 24 | obj-$(CONFIG_SMP) += malta_smp.o |
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c index 2659c1c3b78d..ea2066c3a1f7 100644 --- a/arch/mips/mips-boards/sim/sim_setup.c +++ b/arch/mips/mips-boards/sim/sim_setup.c | |||
@@ -57,7 +57,7 @@ void __init plat_mem_setup(void) | |||
57 | board_time_init = sim_time_init; | 57 | board_time_init = sim_time_init; |
58 | prom_printf("Linux started...\n"); | 58 | prom_printf("Linux started...\n"); |
59 | 59 | ||
60 | #ifdef CONFIG_MT_SMP | 60 | #ifdef CONFIG_MIPS_MT_SMP |
61 | sanitize_tlb_entries(); | 61 | sanitize_tlb_entries(); |
62 | #endif | 62 | #endif |
63 | } | 63 | } |
diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c index 6509a9c9863c..2f75c6b91ec5 100644 --- a/arch/mips/momentum/ocelot_g/prom.c +++ b/arch/mips/momentum/ocelot_g/prom.c | |||
@@ -28,7 +28,7 @@ struct callvectors* debug_vectors; | |||
28 | extern unsigned long marvell_base; | 28 | extern unsigned long marvell_base; |
29 | extern unsigned long bus_clock; | 29 | extern unsigned long bus_clock; |
30 | 30 | ||
31 | #ifdef CONFIG_GALILLEO_GT64240_ETH | 31 | #ifdef CONFIG_GALILEO_GT64240_ETH |
32 | extern unsigned char prom_mac_addr_base[6]; | 32 | extern unsigned char prom_mac_addr_base[6]; |
33 | #endif | 33 | #endif |
34 | 34 | ||
@@ -61,7 +61,7 @@ void __init prom_init(void) | |||
61 | mips_machgroup = MACH_GROUP_MOMENCO; | 61 | mips_machgroup = MACH_GROUP_MOMENCO; |
62 | mips_machtype = MACH_MOMENCO_OCELOT_G; | 62 | mips_machtype = MACH_MOMENCO_OCELOT_G; |
63 | 63 | ||
64 | #ifdef CONFIG_GALILLEO_GT64240_ETH | 64 | #ifdef CONFIG_GALILEO_GT64240_ETH |
65 | /* get the base MAC address for on-board ethernet ports */ | 65 | /* get the base MAC address for on-board ethernet ports */ |
66 | memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); | 66 | memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); |
67 | #endif | 67 | #endif |
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c index d288f7b01842..9db638a7982c 100644 --- a/arch/mips/momentum/ocelot_g/setup.c +++ b/arch/mips/momentum/ocelot_g/setup.c | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | #include "ocelot_pld.h" | 65 | #include "ocelot_pld.h" |
66 | 66 | ||
67 | #ifdef CONFIG_GALILLEO_GT64240_ETH | 67 | #ifdef CONFIG_GALILEO_GT64240_ETH |
68 | extern unsigned char prom_mac_addr_base[6]; | 68 | extern unsigned char prom_mac_addr_base[6]; |
69 | #endif | 69 | #endif |
70 | 70 | ||
@@ -185,7 +185,7 @@ void __init plat_mem_setup(void) | |||
185 | /* do handoff reconfiguration */ | 185 | /* do handoff reconfiguration */ |
186 | PMON_v2_setup(); | 186 | PMON_v2_setup(); |
187 | 187 | ||
188 | #ifdef CONFIG_GALILLEO_GT64240_ETH | 188 | #ifdef CONFIG_GALILEO_GT64240_ETH |
189 | /* get the mac addr */ | 189 | /* get the mac addr */ |
190 | memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); | 190 | memcpy(prom_mac_addr_base, (void*)0xfc807cf2, 6); |
191 | #endif | 191 | #endif |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b268c417c0bf..d6abe495c6b0 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -526,12 +526,15 @@ config PPC_IBM_CELL_BLADE | |||
526 | select UDBG_RTAS_CONSOLE | 526 | select UDBG_RTAS_CONSOLE |
527 | 527 | ||
528 | config PPC_PS3 | 528 | config PPC_PS3 |
529 | bool "Sony PS3" | 529 | bool "Sony PS3 (incomplete)" |
530 | depends on PPC_MULTIPLATFORM && PPC64 | 530 | depends on PPC_MULTIPLATFORM && PPC64 |
531 | select PPC_CELL | 531 | select PPC_CELL |
532 | help | 532 | help |
533 | This option enables support for the Sony PS3 game console | 533 | This option enables support for the Sony PS3 game console |
534 | and other platforms using the PS3 hypervisor. | 534 | and other platforms using the PS3 hypervisor. |
535 | Support for this platform is not yet complete, so | ||
536 | enabling this will not result in a bootable kernel on a | ||
537 | PS3 system. | ||
535 | 538 | ||
536 | config PPC_NATIVE | 539 | config PPC_NATIVE |
537 | bool | 540 | bool |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 73c59ec49120..01f18c683407 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -1430,7 +1430,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus, | |||
1430 | 1430 | ||
1431 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { | 1431 | for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) { |
1432 | bus = pci_bus_b(ln); | 1432 | bus = pci_bus_b(ln); |
1433 | if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate)) | 1433 | if (in_bus >= bus->number && in_bus <= bus->subordinate) |
1434 | break; | 1434 | break; |
1435 | bus = NULL; | 1435 | bus = NULL; |
1436 | } | 1436 | } |
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile index 3757cfabc8ce..1994904f580f 100644 --- a/arch/powerpc/platforms/ps3/Makefile +++ b/arch/powerpc/platforms/ps3/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | obj-y += setup.o mm.o smp.o time.o hvcall.o htab.o repository.o | 1 | obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o |
2 | obj-y += interrupt.o exports.o os-area.o | 2 | obj-y += interrupt.o exports.o os-area.o |
3 | 3 | ||
4 | obj-$(CONFIG_SMP) += smp.o | ||
4 | obj-$(CONFIG_SPU_BASE) += spu.o | 5 | obj-$(CONFIG_SPU_BASE) += spu.o |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 056c1e4141ba..6f5de438b980 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -71,7 +71,7 @@ int ps3_free_io_irq(unsigned int virq) | |||
71 | 71 | ||
72 | result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); | 72 | result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); |
73 | 73 | ||
74 | if (!result) | 74 | if (result) |
75 | pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", | 75 | pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", |
76 | __func__, __LINE__, ps3_result(result)); | 76 | __func__, __LINE__, ps3_result(result)); |
77 | 77 | ||
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 89a28cc018c9..113bd48a89bd 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
@@ -54,6 +54,7 @@ void (*pm_idle)(void); | |||
54 | * handler when auxio is not present-- unused for now... | 54 | * handler when auxio is not present-- unused for now... |
55 | */ | 55 | */ |
56 | void (*pm_power_off)(void) = machine_power_off; | 56 | void (*pm_power_off)(void) = machine_power_off; |
57 | EXPORT_SYMBOL(pm_power_off); | ||
57 | 58 | ||
58 | /* | 59 | /* |
59 | * sysctl - toggle power-off restriction for serial console | 60 | * sysctl - toggle power-off restriction for serial console |
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 276f22881d0f..6b5f26b0fb75 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -292,8 +292,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
292 | 292 | ||
293 | void __init smp_prepare_cpus(unsigned int max_cpus) | 293 | void __init smp_prepare_cpus(unsigned int max_cpus) |
294 | { | 294 | { |
295 | extern void smp4m_boot_cpus(void); | 295 | extern void __init smp4m_boot_cpus(void); |
296 | extern void smp4d_boot_cpus(void); | 296 | extern void __init smp4d_boot_cpus(void); |
297 | int i, cpuid, extra; | 297 | int i, cpuid, extra; |
298 | 298 | ||
299 | printk("Entering SMP Mode...\n"); | 299 | printk("Entering SMP Mode...\n"); |
@@ -375,8 +375,8 @@ void __init smp_prepare_boot_cpu(void) | |||
375 | 375 | ||
376 | int __cpuinit __cpu_up(unsigned int cpu) | 376 | int __cpuinit __cpu_up(unsigned int cpu) |
377 | { | 377 | { |
378 | extern int smp4m_boot_one_cpu(int); | 378 | extern int __cpuinit smp4m_boot_one_cpu(int); |
379 | extern int smp4d_boot_one_cpu(int); | 379 | extern int __cpuinit smp4d_boot_one_cpu(int); |
380 | int ret=0; | 380 | int ret=0; |
381 | 381 | ||
382 | switch(sparc_cpu_model) { | 382 | switch(sparc_cpu_model) { |
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index c80ea61e8ba0..c69de5d4863d 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c | |||
@@ -164,7 +164,7 @@ void __init smp4d_boot_cpus(void) | |||
164 | local_flush_cache_all(); | 164 | local_flush_cache_all(); |
165 | } | 165 | } |
166 | 166 | ||
167 | int smp4d_boot_one_cpu(int i) | 167 | int __cpuinit smp4d_boot_one_cpu(int i) |
168 | { | 168 | { |
169 | extern unsigned long sun4d_cpu_startup; | 169 | extern unsigned long sun4d_cpu_startup; |
170 | unsigned long *entry = &sun4d_cpu_startup; | 170 | unsigned long *entry = &sun4d_cpu_startup; |
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386 index 77558a88a2fe..d6cffb27fff8 100644 --- a/arch/um/Kconfig.i386 +++ b/arch/um/Kconfig.i386 | |||
@@ -36,14 +36,14 @@ choice | |||
36 | 36 | ||
37 | So, if you do not know what to do here, say 'Default split'. | 37 | So, if you do not know what to do here, say 'Default split'. |
38 | 38 | ||
39 | config HOST_VMSPLIT_3G | 39 | config HOST_VMSPLIT_3G |
40 | bool "Default split (3G/1G user/kernel host split)" | 40 | bool "Default split (3G/1G user/kernel host split)" |
41 | config HOST_VMSPLIT_3G_OPT | 41 | config HOST_VMSPLIT_3G_OPT |
42 | bool "3G/1G user/kernel host split (for full 1G low memory)" | 42 | bool "3G/1G user/kernel host split (for full 1G low memory)" |
43 | config HOST_VMSPLIT_2G | 43 | config HOST_VMSPLIT_2G |
44 | bool "2G/2G user/kernel host split" | 44 | bool "2G/2G user/kernel host split" |
45 | config HOST_VMSPLIT_1G | 45 | config HOST_VMSPLIT_1G |
46 | bool "1G/3G user/kernel host split" | 46 | bool "1G/3G user/kernel host split" |
47 | endchoice | 47 | endchoice |
48 | 48 | ||
49 | config TOP_ADDR | 49 | config TOP_ADDR |
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index 0709fc6670c2..3f6acd667717 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -219,7 +219,8 @@ int setup_signal_stack_sc(unsigned long stack_top, int sig, | |||
219 | unsigned long save_sp = PT_REGS_SP(regs); | 219 | unsigned long save_sp = PT_REGS_SP(regs); |
220 | int err = 0; | 220 | int err = 0; |
221 | 221 | ||
222 | stack_top &= -8UL; | 222 | /* This is the same calculation as i386 - ((sp + 4) & 15) == 0 */ |
223 | stack_top = ((stack_top + 4) & -16UL) - 4; | ||
223 | frame = (struct sigframe __user *) stack_top - 1; | 224 | frame = (struct sigframe __user *) stack_top - 1; |
224 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | 225 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
225 | return 1; | 226 | return 1; |
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 9edf114faf79..af2f017617b4 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -191,8 +191,9 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
191 | struct task_struct *me = current; | 191 | struct task_struct *me = current; |
192 | 192 | ||
193 | frame = (struct rt_sigframe __user *) | 193 | frame = (struct rt_sigframe __user *) |
194 | round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; | 194 | round_down(stack_top - sizeof(struct rt_sigframe), 16); |
195 | frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); | 195 | /* Subtract 128 for a red zone and 8 for proper alignment */ |
196 | frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128 - 8); | ||
196 | 197 | ||
197 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) | 198 | if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) |
198 | goto out; | 199 | goto out; |
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 2528a0c0dec8..65c6a3cba6d6 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
@@ -223,7 +223,7 @@ static int verify_command(struct file *file, unsigned char *cmd) | |||
223 | static int sg_io(struct file *file, request_queue_t *q, | 223 | static int sg_io(struct file *file, request_queue_t *q, |
224 | struct gendisk *bd_disk, struct sg_io_hdr *hdr) | 224 | struct gendisk *bd_disk, struct sg_io_hdr *hdr) |
225 | { | 225 | { |
226 | unsigned long start_time; | 226 | unsigned long start_time, timeout; |
227 | int writing = 0, ret = 0; | 227 | int writing = 0, ret = 0; |
228 | struct request *rq; | 228 | struct request *rq; |
229 | char sense[SCSI_SENSE_BUFFERSIZE]; | 229 | char sense[SCSI_SENSE_BUFFERSIZE]; |
@@ -271,7 +271,8 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
271 | 271 | ||
272 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | 272 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
273 | 273 | ||
274 | rq->timeout = jiffies_to_msecs(hdr->timeout); | 274 | timeout = msecs_to_jiffies(hdr->timeout); |
275 | rq->timeout = (timeout < INT_MAX) ? timeout : INT_MAX; | ||
275 | if (!rq->timeout) | 276 | if (!rq->timeout) |
276 | rq->timeout = q->sg_timeout; | 277 | rq->timeout = q->sg_timeout; |
277 | if (!rq->timeout) | 278 | if (!rq->timeout) |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 28a82e3403f1..48616c6fee9d 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1282,7 +1282,7 @@ static void ahci_thaw(struct ata_port *ap) | |||
1282 | /* clear IRQ */ | 1282 | /* clear IRQ */ |
1283 | tmp = readl(port_mmio + PORT_IRQ_STAT); | 1283 | tmp = readl(port_mmio + PORT_IRQ_STAT); |
1284 | writel(tmp, port_mmio + PORT_IRQ_STAT); | 1284 | writel(tmp, port_mmio + PORT_IRQ_STAT); |
1285 | writel(1 << ap->id, mmio + HOST_IRQ_STAT); | 1285 | writel(1 << ap->port_no, mmio + HOST_IRQ_STAT); |
1286 | 1286 | ||
1287 | /* turn IRQ back on */ | 1287 | /* turn IRQ back on */ |
1288 | writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); | 1288 | writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index a388a8df0043..667acd283364 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1037,7 +1037,7 @@ static unsigned int ata_id_xfermask(const u16 *id) | |||
1037 | * the PIO timing number for the maximum. Turn it into | 1037 | * the PIO timing number for the maximum. Turn it into |
1038 | * a mask. | 1038 | * a mask. |
1039 | */ | 1039 | */ |
1040 | u8 mode = id[ATA_ID_OLD_PIO_MODES] & 0xFF; | 1040 | u8 mode = (id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF; |
1041 | if (mode < 5) /* Valid PIO range */ | 1041 | if (mode < 5) /* Valid PIO range */ |
1042 | pio_mask = (2 << mode) - 1; | 1042 | pio_mask = (2 << mode) - 1; |
1043 | else | 1043 | else |
@@ -1250,6 +1250,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, | |||
1250 | 1250 | ||
1251 | ata_sg_init(qc, sg, n_elem); | 1251 | ata_sg_init(qc, sg, n_elem); |
1252 | qc->nsect = buflen / ATA_SECT_SIZE; | 1252 | qc->nsect = buflen / ATA_SECT_SIZE; |
1253 | qc->nbytes = buflen; | ||
1253 | } | 1254 | } |
1254 | 1255 | ||
1255 | qc->private_data = &wait; | 1256 | qc->private_data = &wait; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 56cf59b60ec4..748435807d68 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1796,7 +1796,7 @@ static int ata_eh_suspend(struct ata_port *ap, struct ata_device **r_failed_dev) | |||
1796 | *r_failed_dev = dev; | 1796 | *r_failed_dev = dev; |
1797 | 1797 | ||
1798 | DPRINTK("EXIT\n"); | 1798 | DPRINTK("EXIT\n"); |
1799 | return 0; | 1799 | return rc; |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | /** | 1802 | /** |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 7cc5a4a910a4..73902d335767 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -273,8 +273,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) | |||
273 | { | 273 | { |
274 | int rc = 0; | 274 | int rc = 0; |
275 | u8 scsi_cmd[MAX_COMMAND_SIZE]; | 275 | u8 scsi_cmd[MAX_COMMAND_SIZE]; |
276 | u8 args[7]; | 276 | u8 args[7], *sensebuf = NULL; |
277 | struct scsi_sense_hdr sshdr; | 277 | int cmd_result; |
278 | 278 | ||
279 | if (arg == NULL) | 279 | if (arg == NULL) |
280 | return -EINVAL; | 280 | return -EINVAL; |
@@ -282,10 +282,14 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) | |||
282 | if (copy_from_user(args, arg, sizeof(args))) | 282 | if (copy_from_user(args, arg, sizeof(args))) |
283 | return -EFAULT; | 283 | return -EFAULT; |
284 | 284 | ||
285 | sensebuf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO); | ||
286 | if (!sensebuf) | ||
287 | return -ENOMEM; | ||
288 | |||
285 | memset(scsi_cmd, 0, sizeof(scsi_cmd)); | 289 | memset(scsi_cmd, 0, sizeof(scsi_cmd)); |
286 | scsi_cmd[0] = ATA_16; | 290 | scsi_cmd[0] = ATA_16; |
287 | scsi_cmd[1] = (3 << 1); /* Non-data */ | 291 | scsi_cmd[1] = (3 << 1); /* Non-data */ |
288 | /* scsi_cmd[2] is already 0 -- no off.line, cc, or data xfer */ | 292 | scsi_cmd[2] = 0x20; /* cc but no off.line or data xfer */ |
289 | scsi_cmd[4] = args[1]; | 293 | scsi_cmd[4] = args[1]; |
290 | scsi_cmd[6] = args[2]; | 294 | scsi_cmd[6] = args[2]; |
291 | scsi_cmd[8] = args[3]; | 295 | scsi_cmd[8] = args[3]; |
@@ -295,11 +299,46 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg) | |||
295 | 299 | ||
296 | /* Good values for timeout and retries? Values below | 300 | /* Good values for timeout and retries? Values below |
297 | from scsi_ioctl_send_command() for default case... */ | 301 | from scsi_ioctl_send_command() for default case... */ |
298 | if (scsi_execute_req(scsidev, scsi_cmd, DMA_NONE, NULL, 0, &sshdr, | 302 | cmd_result = scsi_execute(scsidev, scsi_cmd, DMA_NONE, NULL, 0, |
299 | (10*HZ), 5)) | 303 | sensebuf, (10*HZ), 5, 0); |
304 | |||
305 | if (driver_byte(cmd_result) == DRIVER_SENSE) {/* sense data available */ | ||
306 | u8 *desc = sensebuf + 8; | ||
307 | cmd_result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */ | ||
308 | |||
309 | /* If we set cc then ATA pass-through will cause a | ||
310 | * check condition even if no error. Filter that. */ | ||
311 | if (cmd_result & SAM_STAT_CHECK_CONDITION) { | ||
312 | struct scsi_sense_hdr sshdr; | ||
313 | scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE, | ||
314 | &sshdr); | ||
315 | if (sshdr.sense_key==0 && | ||
316 | sshdr.asc==0 && sshdr.ascq==0) | ||
317 | cmd_result &= ~SAM_STAT_CHECK_CONDITION; | ||
318 | } | ||
319 | |||
320 | /* Send userspace ATA registers */ | ||
321 | if (sensebuf[0] == 0x72 && /* format is "descriptor" */ | ||
322 | desc[0] == 0x09) {/* code is "ATA Descriptor" */ | ||
323 | args[0] = desc[13]; /* status */ | ||
324 | args[1] = desc[3]; /* error */ | ||
325 | args[2] = desc[5]; /* sector count (0:7) */ | ||
326 | args[3] = desc[7]; /* lbal */ | ||
327 | args[4] = desc[9]; /* lbam */ | ||
328 | args[5] = desc[11]; /* lbah */ | ||
329 | args[6] = desc[12]; /* select */ | ||
330 | if (copy_to_user(arg, args, sizeof(args))) | ||
331 | rc = -EFAULT; | ||
332 | } | ||
333 | } | ||
334 | |||
335 | if (cmd_result) { | ||
300 | rc = -EIO; | 336 | rc = -EIO; |
337 | goto error; | ||
338 | } | ||
301 | 339 | ||
302 | /* Need code to retrieve data from check condition? */ | 340 | error: |
341 | kfree(sensebuf); | ||
303 | return rc; | 342 | return rc; |
304 | } | 343 | } |
305 | 344 | ||
@@ -983,11 +1022,10 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) | |||
983 | } | 1022 | } |
984 | 1023 | ||
985 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ | 1024 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ |
986 | } else { | 1025 | } else |
987 | tf->nsect = 0; /* time period value (0 implies now) */ | 1026 | /* Issue ATA STANDBY IMMEDIATE command */ |
988 | tf->command = ATA_CMD_STANDBY; | 1027 | tf->command = ATA_CMD_STANDBYNOW1; |
989 | /* Consider: ATA STANDBY IMMEDIATE command */ | 1028 | |
990 | } | ||
991 | /* | 1029 | /* |
992 | * Standby and Idle condition timers could be implemented but that | 1030 | * Standby and Idle condition timers could be implemented but that |
993 | * would require libata to implement the Power condition mode page | 1031 | * would require libata to implement the Power condition mode page |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 6f6672c55131..504e1dbfffd7 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
@@ -36,15 +36,22 @@ enum { | |||
36 | static int atiixp_pre_reset(struct ata_port *ap) | 36 | static int atiixp_pre_reset(struct ata_port *ap) |
37 | { | 37 | { |
38 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 38 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
39 | static struct pci_bits atiixp_enable_bits[] = { | 39 | static const struct pci_bits atiixp_enable_bits[] = { |
40 | { 0x48, 1, 0x01, 0x00 }, | 40 | { 0x48, 1, 0x01, 0x00 }, |
41 | { 0x48, 1, 0x08, 0x00 } | 41 | { 0x48, 1, 0x08, 0x00 } |
42 | }; | 42 | }; |
43 | u8 udma; | ||
43 | 44 | ||
44 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) | 45 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no])) |
45 | return -ENOENT; | 46 | return -ENOENT; |
46 | 47 | ||
47 | ap->cbl = ATA_CBL_PATA80; | 48 | /* Hack from drivers/ide/pci. Really we want to know how to do the |
49 | raw detection not play follow the bios mode guess */ | ||
50 | pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma); | ||
51 | if ((udma & 0x07) >= 0x04 || (udma & 0x70) >= 0x40) | ||
52 | ap->cbl = ATA_CBL_PATA80; | ||
53 | else | ||
54 | ap->cbl = ATA_CBL_PATA40; | ||
48 | return ata_std_prereset(ap); | 55 | return ata_std_prereset(ap); |
49 | } | 56 | } |
50 | 57 | ||
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 2d661cb4df3c..d50264af2848 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -204,20 +204,12 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
204 | 204 | ||
205 | u32 reg; | 205 | u32 reg; |
206 | 206 | ||
207 | if (id->driver_data != 368) { | 207 | /* PATA controller is fn 1, AHCI is fn 0 */ |
208 | /* Put the controller into AHCI mode in case the AHCI driver | 208 | if (id->driver_data != 368 && PCI_FUNC(pdev->devfn) != 1) |
209 | has not yet been loaded. This can be done with either | 209 | return -ENODEV; |
210 | function present */ | ||
211 | 210 | ||
212 | /* FIXME: We may want a way to override this in future */ | 211 | /* The 365/66 have two PATA channels, redirect the second */ |
213 | pci_write_config_byte(pdev, 0x41, 0xa1); | 212 | if (id->driver_data == 365 || id->driver_data == 366) { |
214 | |||
215 | /* PATA controller is fn 1, AHCI is fn 0 */ | ||
216 | if (PCI_FUNC(pdev->devfn) != 1) | ||
217 | return -ENODEV; | ||
218 | } | ||
219 | if ( id->driver_data == 365 || id->driver_data == 366) { | ||
220 | /* The 365/66 have two PATA channels, redirect the second */ | ||
221 | pci_read_config_dword(pdev, 0x80, ®); | 213 | pci_read_config_dword(pdev, 0x80, ®); |
222 | reg |= (1 << 24); /* IDE1 to PATA IDE secondary */ | 214 | reg |= (1 << 24); /* IDE1 to PATA IDE secondary */ |
223 | pci_write_config_dword(pdev, 0x80, reg); | 215 | pci_write_config_dword(pdev, 0x80, reg); |
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index 443b1d85c6c4..40ae11cbfda4 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c | |||
@@ -30,7 +30,7 @@ static int pio_mask = 1; | |||
30 | * Provide our own set_mode() as we don't want to change anything that has | 30 | * Provide our own set_mode() as we don't want to change anything that has |
31 | * already been configured.. | 31 | * already been configured.. |
32 | */ | 32 | */ |
33 | static void pata_platform_set_mode(struct ata_port *ap) | 33 | static int pata_platform_set_mode(struct ata_port *ap, struct ata_device **unused) |
34 | { | 34 | { |
35 | int i; | 35 | int i; |
36 | 36 | ||
@@ -44,6 +44,7 @@ static void pata_platform_set_mode(struct ata_port *ap) | |||
44 | dev->flags |= ATA_DFLAG_PIO; | 44 | dev->flags |= ATA_DFLAG_PIO; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | return 0; | ||
47 | } | 48 | } |
48 | 49 | ||
49 | static void pata_platform_host_stop(struct ata_host *host) | 50 | static void pata_platform_host_stop(struct ata_host *host) |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 32cf0bfa8921..e8dfd8fc3ff7 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -135,7 +135,7 @@ static void sil680_error_handler(struct ata_port *ap) | |||
135 | static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) | 135 | static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) |
136 | { | 136 | { |
137 | static u16 speed_p[5] = { 0x328A, 0x2283, 0x1104, 0x10C3, 0x10C1 }; | 137 | static u16 speed_p[5] = { 0x328A, 0x2283, 0x1104, 0x10C3, 0x10C1 }; |
138 | static u16 speed_t[5] = { 0x328A, 0x1281, 0x1281, 0x10C3, 0x10C1 }; | 138 | static u16 speed_t[5] = { 0x328A, 0x2283, 0x1281, 0x10C3, 0x10C1 }; |
139 | 139 | ||
140 | unsigned long tfaddr = sil680_selreg(ap, 0x02); | 140 | unsigned long tfaddr = sil680_selreg(ap, 0x02); |
141 | unsigned long addr = sil680_seldev(ap, adev, 0x04); | 141 | unsigned long addr = sil680_seldev(ap, adev, 0x04); |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index f0d4f7e9ed31..f0b6c3b71429 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * VIA VT8233c - UDMA100 | 23 | * VIA VT8233c - UDMA100 |
24 | * VIA VT8235 - UDMA133 | 24 | * VIA VT8235 - UDMA133 |
25 | * VIA VT8237 - UDMA133 | 25 | * VIA VT8237 - UDMA133 |
26 | * VIA VT8237S - UDMA133 | ||
26 | * VIA VT8251 - UDMA133 | 27 | * VIA VT8251 - UDMA133 |
27 | * | 28 | * |
28 | * Most registers remain compatible across chips. Others start reserved | 29 | * Most registers remain compatible across chips. Others start reserved |
@@ -61,7 +62,7 @@ | |||
61 | #include <linux/libata.h> | 62 | #include <linux/libata.h> |
62 | 63 | ||
63 | #define DRV_NAME "pata_via" | 64 | #define DRV_NAME "pata_via" |
64 | #define DRV_VERSION "0.2.0" | 65 | #define DRV_VERSION "0.2.1" |
65 | 66 | ||
66 | /* | 67 | /* |
67 | * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx | 68 | * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx |
@@ -95,6 +96,7 @@ static const struct via_isa_bridge { | |||
95 | u8 rev_max; | 96 | u8 rev_max; |
96 | u16 flags; | 97 | u16 flags; |
97 | } via_isa_bridges[] = { | 98 | } via_isa_bridges[] = { |
99 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | ||
98 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 100 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
99 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 101 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
100 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, | 102 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES}, |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 51d0d562d01e..c85c8cadb6df 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -101,6 +101,11 @@ static int amd_create_gatt_pages(int nr_tables) | |||
101 | for (i = 0; i < nr_tables; i++) { | 101 | for (i = 0; i < nr_tables; i++) { |
102 | entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL); | 102 | entry = kzalloc(sizeof(struct amd_page_map), GFP_KERNEL); |
103 | if (entry == NULL) { | 103 | if (entry == NULL) { |
104 | while (i > 0) { | ||
105 | kfree(tables[i-1]); | ||
106 | i--; | ||
107 | } | ||
108 | kfree(tables); | ||
104 | retval = -ENOMEM; | 109 | retval = -ENOMEM; |
105 | break; | 110 | break; |
106 | } | 111 | } |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 979300405c0e..93d2209fee4c 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -655,7 +655,7 @@ static struct pci_device_id agp_amd64_pci_table[] = { | |||
655 | .class = (PCI_CLASS_BRIDGE_HOST << 8), | 655 | .class = (PCI_CLASS_BRIDGE_HOST << 8), |
656 | .class_mask = ~0, | 656 | .class_mask = ~0, |
657 | .vendor = PCI_VENDOR_ID_VIA, | 657 | .vendor = PCI_VENDOR_ID_VIA, |
658 | .device = PCI_DEVICE_ID_VIA_K8M890CE, | 658 | .device = PCI_DEVICE_ID_VIA_VT3336, |
659 | .subvendor = PCI_ANY_ID, | 659 | .subvendor = PCI_ANY_ID, |
660 | .subdevice = PCI_ANY_ID, | 660 | .subdevice = PCI_ANY_ID, |
661 | }, | 661 | }, |
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index f244c6682738..9987dc2e0c3f 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c | |||
@@ -41,18 +41,18 @@ static struct gatt_mask ati_generic_masks[] = | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | 43 | ||
44 | typedef struct _ati_page_map { | 44 | struct ati_page_map { |
45 | unsigned long *real; | 45 | unsigned long *real; |
46 | unsigned long __iomem *remapped; | 46 | unsigned long __iomem *remapped; |
47 | } ati_page_map; | 47 | }; |
48 | 48 | ||
49 | static struct _ati_generic_private { | 49 | static struct _ati_generic_private { |
50 | volatile u8 __iomem *registers; | 50 | volatile u8 __iomem *registers; |
51 | ati_page_map **gatt_pages; | 51 | struct ati_page_map **gatt_pages; |
52 | int num_tables; | 52 | int num_tables; |
53 | } ati_generic_private; | 53 | } ati_generic_private; |
54 | 54 | ||
55 | static int ati_create_page_map(ati_page_map *page_map) | 55 | static int ati_create_page_map(struct ati_page_map *page_map) |
56 | { | 56 | { |
57 | int i, err = 0; | 57 | int i, err = 0; |
58 | 58 | ||
@@ -82,7 +82,7 @@ static int ati_create_page_map(ati_page_map *page_map) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | static void ati_free_page_map(ati_page_map *page_map) | 85 | static void ati_free_page_map(struct ati_page_map *page_map) |
86 | { | 86 | { |
87 | unmap_page_from_agp(virt_to_page(page_map->real)); | 87 | unmap_page_from_agp(virt_to_page(page_map->real)); |
88 | iounmap(page_map->remapped); | 88 | iounmap(page_map->remapped); |
@@ -94,8 +94,8 @@ static void ati_free_page_map(ati_page_map *page_map) | |||
94 | static void ati_free_gatt_pages(void) | 94 | static void ati_free_gatt_pages(void) |
95 | { | 95 | { |
96 | int i; | 96 | int i; |
97 | ati_page_map **tables; | 97 | struct ati_page_map **tables; |
98 | ati_page_map *entry; | 98 | struct ati_page_map *entry; |
99 | 99 | ||
100 | tables = ati_generic_private.gatt_pages; | 100 | tables = ati_generic_private.gatt_pages; |
101 | for (i = 0; i < ati_generic_private.num_tables; i++) { | 101 | for (i = 0; i < ati_generic_private.num_tables; i++) { |
@@ -112,30 +112,30 @@ static void ati_free_gatt_pages(void) | |||
112 | 112 | ||
113 | static int ati_create_gatt_pages(int nr_tables) | 113 | static int ati_create_gatt_pages(int nr_tables) |
114 | { | 114 | { |
115 | ati_page_map **tables; | 115 | struct ati_page_map **tables; |
116 | ati_page_map *entry; | 116 | struct ati_page_map *entry; |
117 | int retval = 0; | 117 | int retval = 0; |
118 | int i; | 118 | int i; |
119 | 119 | ||
120 | tables = kzalloc((nr_tables + 1) * sizeof(ati_page_map *),GFP_KERNEL); | 120 | tables = kzalloc((nr_tables + 1) * sizeof(struct ati_page_map *),GFP_KERNEL); |
121 | if (tables == NULL) | 121 | if (tables == NULL) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | for (i = 0; i < nr_tables; i++) { | 124 | for (i = 0; i < nr_tables; i++) { |
125 | entry = kzalloc(sizeof(ati_page_map), GFP_KERNEL); | 125 | entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL); |
126 | if (entry == NULL) { | 126 | if (entry == NULL) { |
127 | while (i>0) { | 127 | while (i > 0) { |
128 | kfree (tables[i-1]); | 128 | kfree(tables[i-1]); |
129 | i--; | 129 | i--; |
130 | } | 130 | } |
131 | kfree (tables); | 131 | kfree(tables); |
132 | tables = NULL; | ||
133 | retval = -ENOMEM; | 132 | retval = -ENOMEM; |
134 | break; | 133 | break; |
135 | } | 134 | } |
136 | tables[i] = entry; | 135 | tables[i] = entry; |
137 | retval = ati_create_page_map(entry); | 136 | retval = ati_create_page_map(entry); |
138 | if (retval != 0) break; | 137 | if (retval != 0) |
138 | break; | ||
139 | } | 139 | } |
140 | ati_generic_private.num_tables = nr_tables; | 140 | ati_generic_private.num_tables = nr_tables; |
141 | ati_generic_private.gatt_pages = tables; | 141 | ati_generic_private.gatt_pages = tables; |
@@ -340,7 +340,7 @@ static int ati_remove_memory(struct agp_memory * mem, off_t pg_start, | |||
340 | static int ati_create_gatt_table(struct agp_bridge_data *bridge) | 340 | static int ati_create_gatt_table(struct agp_bridge_data *bridge) |
341 | { | 341 | { |
342 | struct aper_size_info_lvl2 *value; | 342 | struct aper_size_info_lvl2 *value; |
343 | ati_page_map page_dir; | 343 | struct ati_page_map page_dir; |
344 | unsigned long addr; | 344 | unsigned long addr; |
345 | int retval; | 345 | int retval; |
346 | u32 temp; | 346 | u32 temp; |
@@ -400,7 +400,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge) | |||
400 | 400 | ||
401 | static int ati_free_gatt_table(struct agp_bridge_data *bridge) | 401 | static int ati_free_gatt_table(struct agp_bridge_data *bridge) |
402 | { | 402 | { |
403 | ati_page_map page_dir; | 403 | struct ati_page_map page_dir; |
404 | 404 | ||
405 | page_dir.real = (unsigned long *)agp_bridge->gatt_table_real; | 405 | page_dir.real = (unsigned long *)agp_bridge->gatt_table_real; |
406 | page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table; | 406 | page_dir.remapped = (unsigned long __iomem *)agp_bridge->gatt_table; |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index ab0a9c0ad7c0..a3011de51f7c 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -1955,6 +1955,15 @@ static int agp_intel_resume(struct pci_dev *pdev) | |||
1955 | 1955 | ||
1956 | pci_restore_state(pdev); | 1956 | pci_restore_state(pdev); |
1957 | 1957 | ||
1958 | /* We should restore our graphics device's config space, | ||
1959 | * as host bridge (00:00) resumes before graphics device (02:00), | ||
1960 | * then our access to its pci space can work right. | ||
1961 | */ | ||
1962 | if (intel_i810_private.i810_dev) | ||
1963 | pci_restore_state(intel_i810_private.i810_dev); | ||
1964 | if (intel_i830_private.i830_dev) | ||
1965 | pci_restore_state(intel_i830_private.i830_dev); | ||
1966 | |||
1958 | if (bridge->driver == &intel_generic_driver) | 1967 | if (bridge->driver == &intel_generic_driver) |
1959 | intel_configure(); | 1968 | intel_configure(); |
1960 | else if (bridge->driver == &intel_850_driver) | 1969 | else if (bridge->driver == &intel_850_driver) |
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index c149ac9ce9a7..2ded7a280d7f 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c | |||
@@ -380,9 +380,23 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata = | |||
380 | /* P4M800CE */ | 380 | /* P4M800CE */ |
381 | { | 381 | { |
382 | .device_id = PCI_DEVICE_ID_VIA_P4M800CE, | 382 | .device_id = PCI_DEVICE_ID_VIA_P4M800CE, |
383 | .chipset_name = "P4M800CE", | 383 | .chipset_name = "VT3314", |
384 | }, | ||
385 | /* CX700 */ | ||
386 | { | ||
387 | .device_id = PCI_DEVICE_ID_VIA_CX700, | ||
388 | .chipset_name = "CX700", | ||
389 | }, | ||
390 | /* VT3336 */ | ||
391 | { | ||
392 | .device_id = PCI_DEVICE_ID_VIA_VT3336, | ||
393 | .chipset_name = "VT3336", | ||
394 | }, | ||
395 | /* P4M890 */ | ||
396 | { | ||
397 | .device_id = PCI_DEVICE_ID_VIA_P4M890, | ||
398 | .chipset_name = "P4M890", | ||
384 | }, | 399 | }, |
385 | |||
386 | { }, /* dummy final entry, always present */ | 400 | { }, /* dummy final entry, always present */ |
387 | }; | 401 | }; |
388 | 402 | ||
@@ -524,6 +538,9 @@ static const struct pci_device_id agp_via_pci_table[] = { | |||
524 | ID(PCI_DEVICE_ID_VIA_83_87XX_1), | 538 | ID(PCI_DEVICE_ID_VIA_83_87XX_1), |
525 | ID(PCI_DEVICE_ID_VIA_3296_0), | 539 | ID(PCI_DEVICE_ID_VIA_3296_0), |
526 | ID(PCI_DEVICE_ID_VIA_P4M800CE), | 540 | ID(PCI_DEVICE_ID_VIA_P4M800CE), |
541 | ID(PCI_DEVICE_ID_VIA_CX700), | ||
542 | ID(PCI_DEVICE_ID_VIA_VT3336), | ||
543 | ID(PCI_DEVICE_ID_VIA_P4M890), | ||
527 | { } | 544 | { } |
528 | }; | 545 | }; |
529 | 546 | ||
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 4e4691a53890..53582b53da95 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -3649,8 +3649,6 @@ static void ipmi_timeout_handler(long timeout_period) | |||
3649 | unsigned long flags; | 3649 | unsigned long flags; |
3650 | int i; | 3650 | int i; |
3651 | 3651 | ||
3652 | INIT_LIST_HEAD(&timeouts); | ||
3653 | |||
3654 | rcu_read_lock(); | 3652 | rcu_read_lock(); |
3655 | list_for_each_entry_rcu(intf, &ipmi_interfaces, link) { | 3653 | list_for_each_entry_rcu(intf, &ipmi_interfaces, link) { |
3656 | /* See if any waiting messages need to be processed. */ | 3654 | /* See if any waiting messages need to be processed. */ |
@@ -3671,6 +3669,7 @@ static void ipmi_timeout_handler(long timeout_period) | |||
3671 | /* Go through the seq table and find any messages that | 3669 | /* Go through the seq table and find any messages that |
3672 | have timed out, putting them in the timeouts | 3670 | have timed out, putting them in the timeouts |
3673 | list. */ | 3671 | list. */ |
3672 | INIT_LIST_HEAD(&timeouts); | ||
3674 | spin_lock_irqsave(&intf->seq_lock, flags); | 3673 | spin_lock_irqsave(&intf->seq_lock, flags); |
3675 | for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++) | 3674 | for (i = 0; i < IPMI_IPMB_NUM_SEQ; i++) |
3676 | check_msg_timeout(intf, &(intf->seq_table[i]), | 3675 | check_msg_timeout(intf, &(intf->seq_table[i]), |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 13935235e066..7fd3cd5ddf21 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -215,7 +215,7 @@ static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty) | |||
215 | } | 215 | } |
216 | static struct sysrq_key_op sysrq_showstate_blocked_op = { | 216 | static struct sysrq_key_op sysrq_showstate_blocked_op = { |
217 | .handler = sysrq_handle_showstate_blocked, | 217 | .handler = sysrq_handle_showstate_blocked, |
218 | .help_msg = "showBlockedTasks", | 218 | .help_msg = "shoW-blocked-tasks", |
219 | .action_msg = "Show Blocked State", | 219 | .action_msg = "Show Blocked State", |
220 | .enable_mask = SYSRQ_ENABLE_DUMP, | 220 | .enable_mask = SYSRQ_ENABLE_DUMP, |
221 | }; | 221 | }; |
@@ -315,15 +315,16 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
315 | &sysrq_loglevel_op, /* 9 */ | 315 | &sysrq_loglevel_op, /* 9 */ |
316 | 316 | ||
317 | /* | 317 | /* |
318 | * Don't use for system provided sysrqs, it is handled specially on | 318 | * a: Don't use for system provided sysrqs, it is handled specially on |
319 | * sparc and will never arrive | 319 | * sparc and will never arrive. |
320 | */ | 320 | */ |
321 | NULL, /* a */ | 321 | NULL, /* a */ |
322 | &sysrq_reboot_op, /* b */ | 322 | &sysrq_reboot_op, /* b */ |
323 | &sysrq_crashdump_op, /* c */ | 323 | &sysrq_crashdump_op, /* c & ibm_emac driver debug */ |
324 | &sysrq_showlocks_op, /* d */ | 324 | &sysrq_showlocks_op, /* d */ |
325 | &sysrq_term_op, /* e */ | 325 | &sysrq_term_op, /* e */ |
326 | &sysrq_moom_op, /* f */ | 326 | &sysrq_moom_op, /* f */ |
327 | /* g: May be registered by ppc for kgdb */ | ||
327 | NULL, /* g */ | 328 | NULL, /* g */ |
328 | NULL, /* h */ | 329 | NULL, /* h */ |
329 | &sysrq_kill_op, /* i */ | 330 | &sysrq_kill_op, /* i */ |
@@ -332,18 +333,19 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
332 | NULL, /* l */ | 333 | NULL, /* l */ |
333 | &sysrq_showmem_op, /* m */ | 334 | &sysrq_showmem_op, /* m */ |
334 | &sysrq_unrt_op, /* n */ | 335 | &sysrq_unrt_op, /* n */ |
335 | /* This will often be registered as 'Off' at init time */ | 336 | /* o: This will often be registered as 'Off' at init time */ |
336 | NULL, /* o */ | 337 | NULL, /* o */ |
337 | &sysrq_showregs_op, /* p */ | 338 | &sysrq_showregs_op, /* p */ |
338 | NULL, /* q */ | 339 | NULL, /* q */ |
339 | &sysrq_unraw_op, /* r */ | 340 | &sysrq_unraw_op, /* r */ |
340 | &sysrq_sync_op, /* s */ | 341 | &sysrq_sync_op, /* s */ |
341 | &sysrq_showstate_op, /* t */ | 342 | &sysrq_showstate_op, /* t */ |
342 | &sysrq_mountro_op, /* u */ | 343 | &sysrq_mountro_op, /* u */ |
343 | /* May be assigned at init time by SMP VOYAGER */ | 344 | /* v: May be registered at init time by SMP VOYAGER */ |
344 | NULL, /* v */ | 345 | NULL, /* v */ |
345 | NULL, /* w */ | 346 | &sysrq_showstate_blocked_op, /* w */ |
346 | &sysrq_showstate_blocked_op, /* x */ | 347 | /* x: May be registered on ppc/powerpc for xmon */ |
348 | NULL, /* x */ | ||
347 | NULL, /* y */ | 349 | NULL, /* y */ |
348 | NULL /* z */ | 350 | NULL /* z */ |
349 | }; | 351 | }; |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d91330432ba2..a45cc89e387a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -722,8 +722,13 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
722 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 722 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
723 | 723 | ||
724 | dprintk("CPU already managed, adding link\n"); | 724 | dprintk("CPU already managed, adding link\n"); |
725 | sysfs_create_link(&sys_dev->kobj, | 725 | ret = sysfs_create_link(&sys_dev->kobj, |
726 | &managed_policy->kobj, "cpufreq"); | 726 | &managed_policy->kobj, |
727 | "cpufreq"); | ||
728 | if (ret) { | ||
729 | mutex_unlock(&policy->lock); | ||
730 | goto err_out_driver_exit; | ||
731 | } | ||
727 | 732 | ||
728 | cpufreq_debug_enable_ratelimit(); | 733 | cpufreq_debug_enable_ratelimit(); |
729 | mutex_unlock(&policy->lock); | 734 | mutex_unlock(&policy->lock); |
@@ -770,8 +775,12 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
770 | dprintk("CPU %u already managed, adding link\n", j); | 775 | dprintk("CPU %u already managed, adding link\n", j); |
771 | cpufreq_cpu_get(cpu); | 776 | cpufreq_cpu_get(cpu); |
772 | cpu_sys_dev = get_cpu_sysdev(j); | 777 | cpu_sys_dev = get_cpu_sysdev(j); |
773 | sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, | 778 | ret = sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, |
774 | "cpufreq"); | 779 | "cpufreq"); |
780 | if (ret) { | ||
781 | mutex_unlock(&policy->lock); | ||
782 | goto err_out_unregister; | ||
783 | } | ||
775 | } | 784 | } |
776 | 785 | ||
777 | policy->governor = NULL; /* to assure that the starting sequence is | 786 | policy->governor = NULL; /* to assure that the starting sequence is |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index b8cf50fcd64d..49f18f5b2514 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -543,6 +543,7 @@ void hid_free_device(struct hid_device *device) | |||
543 | } | 543 | } |
544 | 544 | ||
545 | kfree(device->rdesc); | 545 | kfree(device->rdesc); |
546 | kfree(device->collection); | ||
546 | kfree(device); | 547 | kfree(device); |
547 | } | 548 | } |
548 | EXPORT_SYMBOL_GPL(hid_free_device); | 549 | EXPORT_SYMBOL_GPL(hid_free_device); |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 9cf591a1bda3..c7a6833f6821 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -35,6 +35,11 @@ | |||
35 | 35 | ||
36 | #include <linux/hid.h> | 36 | #include <linux/hid.h> |
37 | 37 | ||
38 | static int hid_pb_fnmode = 1; | ||
39 | module_param_named(pb_fnmode, hid_pb_fnmode, int, 0644); | ||
40 | MODULE_PARM_DESC(pb_fnmode, | ||
41 | "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); | ||
42 | |||
38 | #define unk KEY_UNKNOWN | 43 | #define unk KEY_UNKNOWN |
39 | 44 | ||
40 | static const unsigned char hid_keyboard[256] = { | 45 | static const unsigned char hid_keyboard[256] = { |
@@ -154,7 +159,7 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input, | |||
154 | return 1; | 159 | return 1; |
155 | } | 160 | } |
156 | 161 | ||
157 | if (hid->pb_fnmode) { | 162 | if (hid_pb_fnmode) { |
158 | int do_translate; | 163 | int do_translate; |
159 | 164 | ||
160 | trans = find_translation(powerbook_fn_keys, usage->code); | 165 | trans = find_translation(powerbook_fn_keys, usage->code); |
@@ -163,8 +168,8 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input, | |||
163 | do_translate = 1; | 168 | do_translate = 1; |
164 | else if (trans->flags & POWERBOOK_FLAG_FKEY) | 169 | else if (trans->flags & POWERBOOK_FLAG_FKEY) |
165 | do_translate = | 170 | do_translate = |
166 | (hid->pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || | 171 | (hid_pb_fnmode == 2 && (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)) || |
167 | (hid->pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); | 172 | (hid_pb_fnmode == 1 && !(hid->quirks & HID_QUIRK_POWERBOOK_FN_ON)); |
168 | else | 173 | else |
169 | do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON); | 174 | do_translate = (hid->quirks & HID_QUIRK_POWERBOOK_FN_ON); |
170 | 175 | ||
@@ -431,6 +436,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
431 | case 0x040: map_key_clear(KEY_MENU); break; | 436 | case 0x040: map_key_clear(KEY_MENU); break; |
432 | case 0x045: map_key_clear(KEY_RADIO); break; | 437 | case 0x045: map_key_clear(KEY_RADIO); break; |
433 | 438 | ||
439 | case 0x083: map_key_clear(KEY_LAST); break; | ||
434 | case 0x088: map_key_clear(KEY_PC); break; | 440 | case 0x088: map_key_clear(KEY_PC); break; |
435 | case 0x089: map_key_clear(KEY_TV); break; | 441 | case 0x089: map_key_clear(KEY_TV); break; |
436 | case 0x08a: map_key_clear(KEY_WWW); break; | 442 | case 0x08a: map_key_clear(KEY_WWW); break; |
@@ -448,6 +454,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
448 | case 0x096: map_key_clear(KEY_TAPE); break; | 454 | case 0x096: map_key_clear(KEY_TAPE); break; |
449 | case 0x097: map_key_clear(KEY_TV2); break; | 455 | case 0x097: map_key_clear(KEY_TV2); break; |
450 | case 0x098: map_key_clear(KEY_SAT); break; | 456 | case 0x098: map_key_clear(KEY_SAT); break; |
457 | case 0x09a: map_key_clear(KEY_PVR); break; | ||
451 | 458 | ||
452 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; | 459 | case 0x09c: map_key_clear(KEY_CHANNELUP); break; |
453 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; | 460 | case 0x09d: map_key_clear(KEY_CHANNELDOWN); break; |
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index df7d1504f84e..98410ca044cf 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c | |||
@@ -73,3 +73,8 @@ void __init pnpide_init(void) | |||
73 | { | 73 | { |
74 | pnp_register_driver(&idepnp_driver); | 74 | pnp_register_driver(&idepnp_driver); |
75 | } | 75 | } |
76 | |||
77 | void __exit pnpide_exit(void) | ||
78 | { | ||
79 | pnp_unregister_driver(&idepnp_driver); | ||
80 | } | ||
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 16890769dca6..6c9bd5165bdb 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1781,8 +1781,9 @@ done: | |||
1781 | return 1; | 1781 | return 1; |
1782 | } | 1782 | } |
1783 | 1783 | ||
1784 | extern void pnpide_init(void); | 1784 | extern void __init pnpide_init(void); |
1785 | extern void h8300_ide_init(void); | 1785 | extern void __exit pnpide_exit(void); |
1786 | extern void __init h8300_ide_init(void); | ||
1786 | 1787 | ||
1787 | /* | 1788 | /* |
1788 | * probe_for_hwifs() finds/initializes "known" IDE interfaces | 1789 | * probe_for_hwifs() finds/initializes "known" IDE interfaces |
@@ -2087,13 +2088,17 @@ int __init init_module (void) | |||
2087 | return ide_init(); | 2088 | return ide_init(); |
2088 | } | 2089 | } |
2089 | 2090 | ||
2090 | void cleanup_module (void) | 2091 | void __exit cleanup_module (void) |
2091 | { | 2092 | { |
2092 | int index; | 2093 | int index; |
2093 | 2094 | ||
2094 | for (index = 0; index < MAX_HWIFS; ++index) | 2095 | for (index = 0; index < MAX_HWIFS; ++index) |
2095 | ide_unregister(index); | 2096 | ide_unregister(index); |
2096 | 2097 | ||
2098 | #ifdef CONFIG_BLK_DEV_IDEPNP | ||
2099 | pnpide_exit(); | ||
2100 | #endif | ||
2101 | |||
2097 | #ifdef CONFIG_PROC_FS | 2102 | #ifdef CONFIG_PROC_FS |
2098 | proc_ide_destroy(); | 2103 | proc_ide_destroy(); |
2099 | #endif | 2104 | #endif |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index f286079d233f..d261bfbad222 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -441,7 +441,7 @@ static struct pci_driver driver = { | |||
441 | .probe = aec62xx_init_one, | 441 | .probe = aec62xx_init_one, |
442 | }; | 442 | }; |
443 | 443 | ||
444 | static int aec62xx_ide_init(void) | 444 | static int __init aec62xx_ide_init(void) |
445 | { | 445 | { |
446 | return ide_pci_register_driver(&driver); | 446 | return ide_pci_register_driver(&driver); |
447 | } | 447 | } |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 89109be5162c..68df77ec502b 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -907,7 +907,7 @@ static struct pci_driver driver = { | |||
907 | .probe = alim15x3_init_one, | 907 | .probe = alim15x3_init_one, |
908 | }; | 908 | }; |
909 | 909 | ||
910 | static int ali15x3_ide_init(void) | 910 | static int __init ali15x3_ide_init(void) |
911 | { | 911 | { |
912 | return ide_pci_register_driver(&driver); | 912 | return ide_pci_register_driver(&driver); |
913 | } | 913 | } |
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 753fe0e21456..a4336995a410 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -544,7 +544,7 @@ static struct pci_driver driver = { | |||
544 | .probe = amd74xx_probe, | 544 | .probe = amd74xx_probe, |
545 | }; | 545 | }; |
546 | 546 | ||
547 | static int amd74xx_ide_init(void) | 547 | static int __init amd74xx_ide_init(void) |
548 | { | 548 | { |
549 | return ide_pci_register_driver(&driver); | 549 | return ide_pci_register_driver(&driver); |
550 | } | 550 | } |
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 524e65de4398..982ac31fa995 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -291,8 +291,12 @@ fast_ata_pio: | |||
291 | 291 | ||
292 | static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | 292 | static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) |
293 | { | 293 | { |
294 | u8 udma_mode = 0; | ||
295 | u8 ch = hwif->channel; | ||
296 | struct pci_dev *pdev = hwif->pci_dev; | ||
297 | |||
294 | if (!hwif->irq) | 298 | if (!hwif->irq) |
295 | hwif->irq = hwif->channel ? 15 : 14; | 299 | hwif->irq = ch ? 15 : 14; |
296 | 300 | ||
297 | hwif->autodma = 0; | 301 | hwif->autodma = 0; |
298 | hwif->tuneproc = &atiixp_tuneproc; | 302 | hwif->tuneproc = &atiixp_tuneproc; |
@@ -308,8 +312,12 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
308 | hwif->mwdma_mask = 0x06; | 312 | hwif->mwdma_mask = 0x06; |
309 | hwif->swdma_mask = 0x04; | 313 | hwif->swdma_mask = 0x04; |
310 | 314 | ||
311 | /* FIXME: proper cable detection needed */ | 315 | pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ch, &udma_mode); |
312 | hwif->udma_four = 1; | 316 | if ((udma_mode & 0x07) >= 0x04 || (udma_mode & 0x70) >= 0x40) |
317 | hwif->udma_four = 1; | ||
318 | else | ||
319 | hwif->udma_four = 0; | ||
320 | |||
313 | hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; | 321 | hwif->ide_dma_host_on = &atiixp_ide_dma_host_on; |
314 | hwif->ide_dma_host_off = &atiixp_ide_dma_host_off; | 322 | hwif->ide_dma_host_off = &atiixp_ide_dma_host_off; |
315 | hwif->ide_dma_check = &atiixp_dma_check; | 323 | hwif->ide_dma_check = &atiixp_dma_check; |
@@ -320,19 +328,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
320 | hwif->drives[0].autodma = hwif->autodma; | 328 | hwif->drives[0].autodma = hwif->autodma; |
321 | } | 329 | } |
322 | 330 | ||
323 | static void __devinit init_hwif_sb600_legacy(ide_hwif_t *hwif) | ||
324 | { | ||
325 | |||
326 | hwif->atapi_dma = 1; | ||
327 | hwif->ultra_mask = 0x7f; | ||
328 | hwif->mwdma_mask = 0x07; | ||
329 | hwif->swdma_mask = 0x07; | ||
330 | |||
331 | if (!noautodma) | ||
332 | hwif->autodma = 1; | ||
333 | hwif->drives[0].autodma = hwif->autodma; | ||
334 | hwif->drives[1].autodma = hwif->autodma; | ||
335 | } | ||
336 | 331 | ||
337 | static ide_pci_device_t atiixp_pci_info[] __devinitdata = { | 332 | static ide_pci_device_t atiixp_pci_info[] __devinitdata = { |
338 | { /* 0 */ | 333 | { /* 0 */ |
@@ -343,12 +338,13 @@ static ide_pci_device_t atiixp_pci_info[] __devinitdata = { | |||
343 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, | 338 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, |
344 | .bootable = ON_BOARD, | 339 | .bootable = ON_BOARD, |
345 | },{ /* 1 */ | 340 | },{ /* 1 */ |
346 | .name = "ATI SB600 SATA Legacy IDE", | 341 | .name = "SB600_PATA", |
347 | .init_hwif = init_hwif_sb600_legacy, | 342 | .init_hwif = init_hwif_atiixp, |
348 | .channels = 2, | 343 | .channels = 1, |
349 | .autodma = AUTODMA, | 344 | .autodma = AUTODMA, |
350 | .bootable = ON_BOARD, | 345 | .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, |
351 | } | 346 | .bootable = ON_BOARD, |
347 | }, | ||
352 | }; | 348 | }; |
353 | 349 | ||
354 | /** | 350 | /** |
@@ -369,7 +365,7 @@ static struct pci_device_id atiixp_pci_tbl[] = { | |||
369 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 365 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
370 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 366 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
371 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 367 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
372 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 368 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
373 | { 0, }, | 369 | { 0, }, |
374 | }; | 370 | }; |
375 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); | 371 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); |
@@ -380,7 +376,7 @@ static struct pci_driver driver = { | |||
380 | .probe = atiixp_init_one, | 376 | .probe = atiixp_init_one, |
381 | }; | 377 | }; |
382 | 378 | ||
383 | static int atiixp_ide_init(void) | 379 | static int __init atiixp_ide_init(void) |
384 | { | 380 | { |
385 | return ide_pci_register_driver(&driver); | 381 | return ide_pci_register_driver(&driver); |
386 | } | 382 | } |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 20c32716bbc4..aee947e8fc38 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -793,7 +793,7 @@ static struct pci_driver driver = { | |||
793 | .probe = cmd64x_init_one, | 793 | .probe = cmd64x_init_one, |
794 | }; | 794 | }; |
795 | 795 | ||
796 | static int cmd64x_ide_init(void) | 796 | static int __init cmd64x_ide_init(void) |
797 | { | 797 | { |
798 | return ide_pci_register_driver(&driver); | 798 | return ide_pci_register_driver(&driver); |
799 | } | 799 | } |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 079f7c86726b..ba6786aabf3b 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -260,7 +260,7 @@ static struct pci_driver driver = { | |||
260 | .probe = cs5520_init_one, | 260 | .probe = cs5520_init_one, |
261 | }; | 261 | }; |
262 | 262 | ||
263 | static int cs5520_ide_init(void) | 263 | static int __init cs5520_ide_init(void) |
264 | { | 264 | { |
265 | return ide_pci_register_driver(&driver); | 265 | return ide_pci_register_driver(&driver); |
266 | } | 266 | } |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index ae405fa32236..9bf5fdfc5b1f 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -374,7 +374,7 @@ static struct pci_driver driver = { | |||
374 | .probe = cs5530_init_one, | 374 | .probe = cs5530_init_one, |
375 | }; | 375 | }; |
376 | 376 | ||
377 | static int cs5530_ide_init(void) | 377 | static int __init cs5530_ide_init(void) |
378 | { | 378 | { |
379 | return ide_pci_register_driver(&driver); | 379 | return ide_pci_register_driver(&driver); |
380 | } | 380 | } |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 64330c459bd4..9eafcbf444f4 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -519,7 +519,7 @@ static struct pci_driver driver = { | |||
519 | .probe = cy82c693_init_one, | 519 | .probe = cy82c693_init_one, |
520 | }; | 520 | }; |
521 | 521 | ||
522 | static int cy82c693_ide_init(void) | 522 | static int __init cy82c693_ide_init(void) |
523 | { | 523 | { |
524 | return ide_pci_register_driver(&driver); | 524 | return ide_pci_register_driver(&driver); |
525 | } | 525 | } |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 9f306880491a..b408c6c517ea 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -185,36 +185,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
185 | .channels = 2, | 185 | .channels = 2, |
186 | .autodma = AUTODMA, | 186 | .autodma = AUTODMA, |
187 | .bootable = OFF_BOARD, | 187 | .bootable = OFF_BOARD, |
188 | },{ /* 15 */ | ||
189 | .name = "JMB361", | ||
190 | .init_hwif = init_hwif_generic, | ||
191 | .channels = 2, | ||
192 | .autodma = AUTODMA, | ||
193 | .bootable = OFF_BOARD, | ||
194 | },{ /* 16 */ | ||
195 | .name = "JMB363", | ||
196 | .init_hwif = init_hwif_generic, | ||
197 | .channels = 2, | ||
198 | .autodma = AUTODMA, | ||
199 | .bootable = OFF_BOARD, | ||
200 | },{ /* 17 */ | ||
201 | .name = "JMB365", | ||
202 | .init_hwif = init_hwif_generic, | ||
203 | .channels = 2, | ||
204 | .autodma = AUTODMA, | ||
205 | .bootable = OFF_BOARD, | ||
206 | },{ /* 18 */ | ||
207 | .name = "JMB366", | ||
208 | .init_hwif = init_hwif_generic, | ||
209 | .channels = 2, | ||
210 | .autodma = AUTODMA, | ||
211 | .bootable = OFF_BOARD, | ||
212 | },{ /* 19 */ | ||
213 | .name = "JMB368", | ||
214 | .init_hwif = init_hwif_generic, | ||
215 | .channels = 2, | ||
216 | .autodma = AUTODMA, | ||
217 | .bootable = OFF_BOARD, | ||
218 | } | 188 | } |
219 | }; | 189 | }; |
220 | 190 | ||
@@ -281,11 +251,6 @@ static struct pci_device_id generic_pci_tbl[] = { | |||
281 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, | 251 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, |
282 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, | 252 | { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, |
283 | { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, | 253 | { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, |
284 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15}, | ||
285 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16}, | ||
286 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17}, | ||
287 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 18}, | ||
288 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 19}, | ||
289 | /* Must come last. If you add entries adjust this table appropriately and the init_one code */ | 254 | /* Must come last. If you add entries adjust this table appropriately and the init_one code */ |
290 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, | 255 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, |
291 | { 0, }, | 256 | { 0, }, |
@@ -298,7 +263,7 @@ static struct pci_driver driver = { | |||
298 | .probe = generic_init_one, | 263 | .probe = generic_init_one, |
299 | }; | 264 | }; |
300 | 265 | ||
301 | static int generic_ide_init(void) | 266 | static int __init generic_ide_init(void) |
302 | { | 267 | { |
303 | return ide_pci_register_driver(&driver); | 268 | return ide_pci_register_driver(&driver); |
304 | } | 269 | } |
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index b46cb042290a..ce7b08f08a09 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c | |||
@@ -265,7 +265,7 @@ static struct pci_driver driver = { | |||
265 | .probe = hpt34x_init_one, | 265 | .probe = hpt34x_init_one, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static int hpt34x_ide_init(void) | 268 | static int __init hpt34x_ide_init(void) |
269 | { | 269 | { |
270 | return ide_pci_register_driver(&driver); | 270 | return ide_pci_register_driver(&driver); |
271 | } | 271 | } |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 08119da06d54..b486442dd5d7 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1613,7 +1613,7 @@ static struct pci_driver driver = { | |||
1613 | .probe = hpt366_init_one, | 1613 | .probe = hpt366_init_one, |
1614 | }; | 1614 | }; |
1615 | 1615 | ||
1616 | static int hpt366_ide_init(void) | 1616 | static int __init hpt366_ide_init(void) |
1617 | { | 1617 | { |
1618 | return ide_pci_register_driver(&driver); | 1618 | return ide_pci_register_driver(&driver); |
1619 | } | 1619 | } |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index c1cec236ecf0..f07bbbed1778 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -86,15 +86,16 @@ static int __devinit ata66_jmicron(ide_hwif_t *hwif) | |||
86 | { | 86 | { |
87 | case PORT_PATA0: | 87 | case PORT_PATA0: |
88 | if (control & (1 << 3)) /* 40/80 pin primary */ | 88 | if (control & (1 << 3)) /* 40/80 pin primary */ |
89 | return 1; | 89 | return 0; |
90 | return 0; | 90 | return 1; |
91 | case PORT_PATA1: | 91 | case PORT_PATA1: |
92 | if (control5 & (1 << 19)) /* 40/80 pin secondary */ | 92 | if (control5 & (1 << 19)) /* 40/80 pin secondary */ |
93 | return 0; | 93 | return 0; |
94 | return 1; | 94 | return 1; |
95 | case PORT_SATA: | 95 | case PORT_SATA: |
96 | return 1; | 96 | break; |
97 | } | 97 | } |
98 | return 1; /* Avoid bogus "control reaches end of non-void function" */ | ||
98 | } | 99 | } |
99 | 100 | ||
100 | static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted) | 101 | static void jmicron_tuneproc (ide_drive_t *drive, byte mode_wanted) |
@@ -240,11 +241,11 @@ static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_devi | |||
240 | } | 241 | } |
241 | 242 | ||
242 | static struct pci_device_id jmicron_pci_tbl[] = { | 243 | static struct pci_device_id jmicron_pci_tbl[] = { |
243 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 0}, | 244 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
244 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 1}, | 245 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
245 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 2}, | 246 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, |
246 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 3}, | 247 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, |
247 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 4}, | 248 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, |
248 | { 0, }, | 249 | { 0, }, |
249 | }; | 250 | }; |
250 | 251 | ||
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index d95714bcee4e..8aaea4ea5549 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -302,7 +302,7 @@ static struct pci_driver driver = { | |||
302 | .probe = ns87415_init_one, | 302 | .probe = ns87415_init_one, |
303 | }; | 303 | }; |
304 | 304 | ||
305 | static int ns87415_ide_init(void) | 305 | static int __init ns87415_ide_init(void) |
306 | { | 306 | { |
307 | return ide_pci_register_driver(&driver); | 307 | return ide_pci_register_driver(&driver); |
308 | } | 308 | } |
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 7a7c2ef78ac2..22bbf613f948 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -382,7 +382,7 @@ static struct pci_driver driver = { | |||
382 | .probe = opti621_init_one, | 382 | .probe = opti621_init_one, |
383 | }; | 383 | }; |
384 | 384 | ||
385 | static int opti621_ide_init(void) | 385 | static int __init opti621_ide_init(void) |
386 | { | 386 | { |
387 | return ide_pci_register_driver(&driver); | 387 | return ide_pci_register_driver(&driver); |
388 | } | 388 | } |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 7cb48576e479..77a9aaa7dab9 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -756,7 +756,7 @@ static struct pci_driver driver = { | |||
756 | .probe = pdc202new_init_one, | 756 | .probe = pdc202new_init_one, |
757 | }; | 757 | }; |
758 | 758 | ||
759 | static int pdc202new_ide_init(void) | 759 | static int __init pdc202new_ide_init(void) |
760 | { | 760 | { |
761 | return ide_pci_register_driver(&driver); | 761 | return ide_pci_register_driver(&driver); |
762 | } | 762 | } |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 184cdacddeb6..143239c093d5 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -719,7 +719,7 @@ static struct pci_driver driver = { | |||
719 | .probe = pdc202xx_init_one, | 719 | .probe = pdc202xx_init_one, |
720 | }; | 720 | }; |
721 | 721 | ||
722 | static int pdc202xx_ide_init(void) | 722 | static int __init pdc202xx_ide_init(void) |
723 | { | 723 | { |
724 | return ide_pci_register_driver(&driver); | 724 | return ide_pci_register_driver(&driver); |
725 | } | 725 | } |
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c index 5f6950c2d1d1..c1855311052b 100644 --- a/drivers/ide/pci/rz1000.c +++ b/drivers/ide/pci/rz1000.c | |||
@@ -77,7 +77,7 @@ static struct pci_driver driver = { | |||
77 | .probe = rz1000_init_one, | 77 | .probe = rz1000_init_one, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static int rz1000_ide_init(void) | 80 | static int __init rz1000_ide_init(void) |
81 | { | 81 | { |
82 | return ide_pci_register_driver(&driver); | 82 | return ide_pci_register_driver(&driver); |
83 | } | 83 | } |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index ff80937d94dd..8d762d323f8b 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -507,7 +507,7 @@ static struct pci_driver driver = { | |||
507 | #endif | 507 | #endif |
508 | }; | 508 | }; |
509 | 509 | ||
510 | static int sc1200_ide_init(void) | 510 | static int __init sc1200_ide_init(void) |
511 | { | 511 | { |
512 | return ide_pci_register_driver(&driver); | 512 | return ide_pci_register_driver(&driver); |
513 | } | 513 | } |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 057548d07205..ea9a28a45853 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -666,7 +666,7 @@ static struct pci_driver driver = { | |||
666 | .probe = svwks_init_one, | 666 | .probe = svwks_init_one, |
667 | }; | 667 | }; |
668 | 668 | ||
669 | static int svwks_ide_init(void) | 669 | static int __init svwks_ide_init(void) |
670 | { | 670 | { |
671 | return ide_pci_register_driver(&driver); | 671 | return ide_pci_register_driver(&driver); |
672 | } | 672 | } |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index cfad09accf52..b0bf01809279 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -762,8 +762,7 @@ static struct ioc4_submodule ioc4_ide_submodule = { | |||
762 | /* .is_remove = ioc4_ide_remove_one, */ | 762 | /* .is_remove = ioc4_ide_remove_one, */ |
763 | }; | 763 | }; |
764 | 764 | ||
765 | static int __devinit | 765 | static int __init ioc4_ide_init(void) |
766 | ioc4_ide_init(void) | ||
767 | { | 766 | { |
768 | return ioc4_register_submodule(&ioc4_ide_submodule); | 767 | return ioc4_register_submodule(&ioc4_ide_submodule); |
769 | } | 768 | } |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 697f566fb90a..4ff89c7d990a 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -1096,7 +1096,7 @@ static struct pci_driver driver = { | |||
1096 | .probe = siimage_init_one, | 1096 | .probe = siimage_init_one, |
1097 | }; | 1097 | }; |
1098 | 1098 | ||
1099 | static int siimage_ide_init(void) | 1099 | static int __init siimage_ide_init(void) |
1100 | { | 1100 | { |
1101 | return ide_pci_register_driver(&driver); | 1101 | return ide_pci_register_driver(&driver); |
1102 | } | 1102 | } |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 6b313139b5e4..1afff659ab55 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -968,7 +968,7 @@ static struct pci_driver driver = { | |||
968 | .probe = sis5513_init_one, | 968 | .probe = sis5513_init_one, |
969 | }; | 969 | }; |
970 | 970 | ||
971 | static int sis5513_ide_init(void) | 971 | static int __init sis5513_ide_init(void) |
972 | { | 972 | { |
973 | return ide_pci_register_driver(&driver); | 973 | return ide_pci_register_driver(&driver); |
974 | } | 974 | } |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 5afefe8692fe..170a26199050 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -492,7 +492,7 @@ static struct pci_driver driver = { | |||
492 | .probe = sl82c105_init_one, | 492 | .probe = sl82c105_init_one, |
493 | }; | 493 | }; |
494 | 494 | ||
495 | static int sl82c105_ide_init(void) | 495 | static int __init sl82c105_ide_init(void) |
496 | { | 496 | { |
497 | return ide_pci_register_driver(&driver); | 497 | return ide_pci_register_driver(&driver); |
498 | } | 498 | } |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 9be7e49cba0e..90e79c0844d2 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -253,7 +253,7 @@ static struct pci_driver driver = { | |||
253 | .probe = slc90e66_init_one, | 253 | .probe = slc90e66_init_one, |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static int slc90e66_ide_init(void) | 256 | static int __init slc90e66_ide_init(void) |
257 | { | 257 | { |
258 | return ide_pci_register_driver(&driver); | 258 | return ide_pci_register_driver(&driver); |
259 | } | 259 | } |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 56d84931d6de..b13cce1fd1a6 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -173,7 +173,7 @@ static struct pci_driver driver = { | |||
173 | .probe = triflex_init_one, | 173 | .probe = triflex_init_one, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static int triflex_ide_init(void) | 176 | static int __init triflex_ide_init(void) |
177 | { | 177 | { |
178 | return ide_pci_register_driver(&driver); | 178 | return ide_pci_register_driver(&driver); |
179 | } | 179 | } |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 2a282529bfc1..174b88c4780e 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -355,7 +355,7 @@ static struct pci_driver driver = { | |||
355 | .probe = trm290_init_one, | 355 | .probe = trm290_init_one, |
356 | }; | 356 | }; |
357 | 357 | ||
358 | static int trm290_ide_init(void) | 358 | static int __init trm290_ide_init(void) |
359 | { | 359 | { |
360 | return ide_pci_register_driver(&driver); | 360 | return ide_pci_register_driver(&driver); |
361 | } | 361 | } |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 381cc6f101ce..6fb6e50b8231 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -78,6 +78,8 @@ static struct via_isa_bridge { | |||
78 | u8 rev_max; | 78 | u8 rev_max; |
79 | u16 flags; | 79 | u16 flags; |
80 | } via_isa_bridges[] = { | 80 | } via_isa_bridges[] = { |
81 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | ||
82 | { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | ||
81 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 83 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
82 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 84 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
83 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 85 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
@@ -504,6 +506,7 @@ static struct pci_device_id via_pci_tbl[] = { | |||
504 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 506 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
505 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 507 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
506 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 508 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, |
509 | { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | ||
507 | { 0, }, | 510 | { 0, }, |
508 | }; | 511 | }; |
509 | MODULE_DEVICE_TABLE(pci, via_pci_tbl); | 512 | MODULE_DEVICE_TABLE(pci, via_pci_tbl); |
@@ -514,7 +517,7 @@ static struct pci_driver driver = { | |||
514 | .probe = via_init_one, | 517 | .probe = via_init_one, |
515 | }; | 518 | }; |
516 | 519 | ||
517 | static int via_ide_init(void) | 520 | static int __init via_ide_init(void) |
518 | { | 521 | { |
519 | return ide_pci_register_driver(&driver); | 522 | return ide_pci_register_driver(&driver); |
520 | } | 523 | } |
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 9c70ff65e6b7..c79df79307ed 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -1163,7 +1163,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data) | |||
1163 | case MSR_K6_STAR: | 1163 | case MSR_K6_STAR: |
1164 | vcpu->svm->vmcb->save.star = data; | 1164 | vcpu->svm->vmcb->save.star = data; |
1165 | break; | 1165 | break; |
1166 | #ifdef CONFIG_X86_64_ | 1166 | #ifdef CONFIG_X86_64 |
1167 | case MSR_LSTAR: | 1167 | case MSR_LSTAR: |
1168 | vcpu->svm->vmcb->save.lstar = data; | 1168 | vcpu->svm->vmcb->save.lstar = data; |
1169 | break; | 1169 | break; |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 27f2751c3baa..54c35c0b3181 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1116,6 +1116,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu) | |||
1116 | 1116 | ||
1117 | if (rdmsr_safe(index, &data_low, &data_high) < 0) | 1117 | if (rdmsr_safe(index, &data_low, &data_high) < 0) |
1118 | continue; | 1118 | continue; |
1119 | if (wrmsr_safe(index, data_low, data_high) < 0) | ||
1120 | continue; | ||
1119 | data = data_low | ((u64)data_high << 32); | 1121 | data = data_low | ((u64)data_high << 32); |
1120 | vcpu->host_msrs[j].index = index; | 1122 | vcpu->host_msrs[j].index = index; |
1121 | vcpu->host_msrs[j].reserved = 0; | 1123 | vcpu->host_msrs[j].reserved = 0; |
diff --git a/drivers/mtd/nand/cafe.c b/drivers/mtd/nand/cafe.c index b8d9b64cccc0..65f9bd3ceebf 100644 --- a/drivers/mtd/nand/cafe.c +++ b/drivers/mtd/nand/cafe.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/dma-mapping.h> | ||
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | 19 | ||
19 | #define CAFE_NAND_CTRL1 0x00 | 20 | #define CAFE_NAND_CTRL1 0x00 |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 8236f26ffd46..640d7ca2ebcf 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -1066,8 +1066,8 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1066 | short length = skb->len; | 1066 | short length = skb->len; |
1067 | dev->trans_start = jiffies; | 1067 | dev->trans_start = jiffies; |
1068 | 1068 | ||
1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%x) called\n", dev->name, | 1069 | DEB(DEB_STARTTX,printk(KERN_DEBUG "%s: i596_start_xmit(%x,%p) called\n", |
1070 | skb->len, (unsigned int)skb->data)); | 1070 | dev->name, skb->len, skb->data)); |
1071 | 1071 | ||
1072 | if (skb->len < ETH_ZLEN) { | 1072 | if (skb->len < ETH_ZLEN) { |
1073 | if (skb_padto(skb, ETH_ZLEN)) | 1073 | if (skb_padto(skb, ETH_ZLEN)) |
@@ -1246,7 +1246,8 @@ struct net_device * __init i82596_probe(int unit) | |||
1246 | dev->priv = (void *)(dev->mem_start); | 1246 | dev->priv = (void *)(dev->mem_start); |
1247 | 1247 | ||
1248 | lp = dev->priv; | 1248 | lp = dev->priv; |
1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n", | 1249 | DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%zd bytes), " |
1250 | "lp->scb at 0x%08lx\n", | ||
1250 | dev->name, (unsigned long)lp, | 1251 | dev->name, (unsigned long)lp, |
1251 | sizeof(struct i596_private), (unsigned long)&lp->scb)); | 1252 | sizeof(struct i596_private), (unsigned long)&lp->scb)); |
1252 | memset((void *) lp, 0, sizeof(struct i596_private)); | 1253 | memset((void *) lp, 0, sizeof(struct i596_private)); |
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 5eb2ec68393f..303a8d94ad4b 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -110,6 +110,11 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl); | |||
110 | 110 | ||
111 | static void b44_halt(struct b44 *); | 111 | static void b44_halt(struct b44 *); |
112 | static void b44_init_rings(struct b44 *); | 112 | static void b44_init_rings(struct b44 *); |
113 | |||
114 | #define B44_FULL_RESET 1 | ||
115 | #define B44_FULL_RESET_SKIP_PHY 2 | ||
116 | #define B44_PARTIAL_RESET 3 | ||
117 | |||
113 | static void b44_init_hw(struct b44 *, int); | 118 | static void b44_init_hw(struct b44 *, int); |
114 | 119 | ||
115 | static int dma_desc_align_mask; | 120 | static int dma_desc_align_mask; |
@@ -752,7 +757,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) | |||
752 | dest_idx * sizeof(dest_desc), | 757 | dest_idx * sizeof(dest_desc), |
753 | DMA_BIDIRECTIONAL); | 758 | DMA_BIDIRECTIONAL); |
754 | 759 | ||
755 | pci_dma_sync_single_for_device(bp->pdev, src_desc->addr, | 760 | pci_dma_sync_single_for_device(bp->pdev, le32_to_cpu(src_desc->addr), |
756 | RX_PKT_BUF_SZ, | 761 | RX_PKT_BUF_SZ, |
757 | PCI_DMA_FROMDEVICE); | 762 | PCI_DMA_FROMDEVICE); |
758 | } | 763 | } |
@@ -884,7 +889,7 @@ static int b44_poll(struct net_device *netdev, int *budget) | |||
884 | spin_lock_irqsave(&bp->lock, flags); | 889 | spin_lock_irqsave(&bp->lock, flags); |
885 | b44_halt(bp); | 890 | b44_halt(bp); |
886 | b44_init_rings(bp); | 891 | b44_init_rings(bp); |
887 | b44_init_hw(bp, 1); | 892 | b44_init_hw(bp, B44_FULL_RESET_SKIP_PHY); |
888 | netif_wake_queue(bp->dev); | 893 | netif_wake_queue(bp->dev); |
889 | spin_unlock_irqrestore(&bp->lock, flags); | 894 | spin_unlock_irqrestore(&bp->lock, flags); |
890 | done = 1; | 895 | done = 1; |
@@ -954,7 +959,7 @@ static void b44_tx_timeout(struct net_device *dev) | |||
954 | 959 | ||
955 | b44_halt(bp); | 960 | b44_halt(bp); |
956 | b44_init_rings(bp); | 961 | b44_init_rings(bp); |
957 | b44_init_hw(bp, 1); | 962 | b44_init_hw(bp, B44_FULL_RESET); |
958 | 963 | ||
959 | spin_unlock_irq(&bp->lock); | 964 | spin_unlock_irq(&bp->lock); |
960 | 965 | ||
@@ -1071,7 +1076,7 @@ static int b44_change_mtu(struct net_device *dev, int new_mtu) | |||
1071 | b44_halt(bp); | 1076 | b44_halt(bp); |
1072 | dev->mtu = new_mtu; | 1077 | dev->mtu = new_mtu; |
1073 | b44_init_rings(bp); | 1078 | b44_init_rings(bp); |
1074 | b44_init_hw(bp, 1); | 1079 | b44_init_hw(bp, B44_FULL_RESET); |
1075 | spin_unlock_irq(&bp->lock); | 1080 | spin_unlock_irq(&bp->lock); |
1076 | 1081 | ||
1077 | b44_enable_ints(bp); | 1082 | b44_enable_ints(bp); |
@@ -1368,12 +1373,12 @@ static int b44_set_mac_addr(struct net_device *dev, void *p) | |||
1368 | * packet processing. Invoked with bp->lock held. | 1373 | * packet processing. Invoked with bp->lock held. |
1369 | */ | 1374 | */ |
1370 | static void __b44_set_rx_mode(struct net_device *); | 1375 | static void __b44_set_rx_mode(struct net_device *); |
1371 | static void b44_init_hw(struct b44 *bp, int full_reset) | 1376 | static void b44_init_hw(struct b44 *bp, int reset_kind) |
1372 | { | 1377 | { |
1373 | u32 val; | 1378 | u32 val; |
1374 | 1379 | ||
1375 | b44_chip_reset(bp); | 1380 | b44_chip_reset(bp); |
1376 | if (full_reset) { | 1381 | if (reset_kind == B44_FULL_RESET) { |
1377 | b44_phy_reset(bp); | 1382 | b44_phy_reset(bp); |
1378 | b44_setup_phy(bp); | 1383 | b44_setup_phy(bp); |
1379 | } | 1384 | } |
@@ -1390,7 +1395,10 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1390 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); | 1395 | bw32(bp, B44_TXMAXLEN, bp->dev->mtu + ETH_HLEN + 8 + RX_HEADER_LEN); |
1391 | 1396 | ||
1392 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ | 1397 | bw32(bp, B44_TX_WMARK, 56); /* XXX magic */ |
1393 | if (full_reset) { | 1398 | if (reset_kind == B44_PARTIAL_RESET) { |
1399 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1400 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1401 | } else { | ||
1394 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); | 1402 | bw32(bp, B44_DMATX_CTRL, DMATX_CTRL_ENABLE); |
1395 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); | 1403 | bw32(bp, B44_DMATX_ADDR, bp->tx_ring_dma + bp->dma_offset); |
1396 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | 1404 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | |
@@ -1401,9 +1409,6 @@ static void b44_init_hw(struct b44 *bp, int full_reset) | |||
1401 | bp->rx_prod = bp->rx_pending; | 1409 | bp->rx_prod = bp->rx_pending; |
1402 | 1410 | ||
1403 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); | 1411 | bw32(bp, B44_MIB_CTRL, MIB_CTRL_CLR_ON_READ); |
1404 | } else { | ||
1405 | bw32(bp, B44_DMARX_CTRL, (DMARX_CTRL_ENABLE | | ||
1406 | (bp->rx_offset << DMARX_CTRL_ROSHIFT))); | ||
1407 | } | 1412 | } |
1408 | 1413 | ||
1409 | val = br32(bp, B44_ENET_CTRL); | 1414 | val = br32(bp, B44_ENET_CTRL); |
@@ -1420,7 +1425,7 @@ static int b44_open(struct net_device *dev) | |||
1420 | goto out; | 1425 | goto out; |
1421 | 1426 | ||
1422 | b44_init_rings(bp); | 1427 | b44_init_rings(bp); |
1423 | b44_init_hw(bp, 1); | 1428 | b44_init_hw(bp, B44_FULL_RESET); |
1424 | 1429 | ||
1425 | b44_check_phy(bp); | 1430 | b44_check_phy(bp); |
1426 | 1431 | ||
@@ -1629,7 +1634,7 @@ static int b44_close(struct net_device *dev) | |||
1629 | netif_poll_enable(dev); | 1634 | netif_poll_enable(dev); |
1630 | 1635 | ||
1631 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 1636 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
1632 | b44_init_hw(bp, 0); | 1637 | b44_init_hw(bp, B44_PARTIAL_RESET); |
1633 | b44_setup_wol(bp); | 1638 | b44_setup_wol(bp); |
1634 | } | 1639 | } |
1635 | 1640 | ||
@@ -1905,7 +1910,7 @@ static int b44_set_ringparam(struct net_device *dev, | |||
1905 | 1910 | ||
1906 | b44_halt(bp); | 1911 | b44_halt(bp); |
1907 | b44_init_rings(bp); | 1912 | b44_init_rings(bp); |
1908 | b44_init_hw(bp, 1); | 1913 | b44_init_hw(bp, B44_FULL_RESET); |
1909 | netif_wake_queue(bp->dev); | 1914 | netif_wake_queue(bp->dev); |
1910 | spin_unlock_irq(&bp->lock); | 1915 | spin_unlock_irq(&bp->lock); |
1911 | 1916 | ||
@@ -1948,7 +1953,7 @@ static int b44_set_pauseparam(struct net_device *dev, | |||
1948 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { | 1953 | if (bp->flags & B44_FLAG_PAUSE_AUTO) { |
1949 | b44_halt(bp); | 1954 | b44_halt(bp); |
1950 | b44_init_rings(bp); | 1955 | b44_init_rings(bp); |
1951 | b44_init_hw(bp, 1); | 1956 | b44_init_hw(bp, B44_FULL_RESET); |
1952 | } else { | 1957 | } else { |
1953 | __b44_set_flow_ctrl(bp, bp->flags); | 1958 | __b44_set_flow_ctrl(bp, bp->flags); |
1954 | } | 1959 | } |
@@ -2304,7 +2309,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2304 | 2309 | ||
2305 | free_irq(dev->irq, dev); | 2310 | free_irq(dev->irq, dev); |
2306 | if (bp->flags & B44_FLAG_WOL_ENABLE) { | 2311 | if (bp->flags & B44_FLAG_WOL_ENABLE) { |
2307 | b44_init_hw(bp, 0); | 2312 | b44_init_hw(bp, B44_PARTIAL_RESET); |
2308 | b44_setup_wol(bp); | 2313 | b44_setup_wol(bp); |
2309 | } | 2314 | } |
2310 | pci_disable_device(pdev); | 2315 | pci_disable_device(pdev); |
@@ -2315,21 +2320,32 @@ static int b44_resume(struct pci_dev *pdev) | |||
2315 | { | 2320 | { |
2316 | struct net_device *dev = pci_get_drvdata(pdev); | 2321 | struct net_device *dev = pci_get_drvdata(pdev); |
2317 | struct b44 *bp = netdev_priv(dev); | 2322 | struct b44 *bp = netdev_priv(dev); |
2323 | int rc = 0; | ||
2318 | 2324 | ||
2319 | pci_restore_state(pdev); | 2325 | pci_restore_state(pdev); |
2320 | pci_enable_device(pdev); | 2326 | rc = pci_enable_device(pdev); |
2327 | if (rc) { | ||
2328 | printk(KERN_ERR PFX "%s: pci_enable_device failed\n", | ||
2329 | dev->name); | ||
2330 | return rc; | ||
2331 | } | ||
2332 | |||
2321 | pci_set_master(pdev); | 2333 | pci_set_master(pdev); |
2322 | 2334 | ||
2323 | if (!netif_running(dev)) | 2335 | if (!netif_running(dev)) |
2324 | return 0; | 2336 | return 0; |
2325 | 2337 | ||
2326 | if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev)) | 2338 | rc = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev); |
2339 | if (rc) { | ||
2327 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); | 2340 | printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); |
2341 | pci_disable_device(pdev); | ||
2342 | return rc; | ||
2343 | } | ||
2328 | 2344 | ||
2329 | spin_lock_irq(&bp->lock); | 2345 | spin_lock_irq(&bp->lock); |
2330 | 2346 | ||
2331 | b44_init_rings(bp); | 2347 | b44_init_rings(bp); |
2332 | b44_init_hw(bp, 1); | 2348 | b44_init_hw(bp, B44_FULL_RESET); |
2333 | netif_device_attach(bp->dev); | 2349 | netif_device_attach(bp->dev); |
2334 | spin_unlock_irq(&bp->lock); | 2350 | spin_unlock_irq(&bp->lock); |
2335 | 2351 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 953808efe551..ee7b75b976b5 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.5.4" | 60 | #define DRV_MODULE_VERSION "1.5.5" |
61 | #define DRV_MODULE_RELDATE "January 24, 2007" | 61 | #define DRV_MODULE_RELDATE "February 1, 2007" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -1356,6 +1356,14 @@ bnx2_init_copper_phy(struct bnx2 *bp) | |||
1356 | bnx2_write_phy(bp, 0x18, 0x0400); | 1356 | bnx2_write_phy(bp, 0x18, 0x0400); |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | if (bp->phy_flags & PHY_DIS_EARLY_DAC_FLAG) { | ||
1360 | bnx2_write_phy(bp, MII_BNX2_DSP_ADDRESS, | ||
1361 | MII_BNX2_DSP_EXPAND_REG | 0x8); | ||
1362 | bnx2_read_phy(bp, MII_BNX2_DSP_RW_PORT, &val); | ||
1363 | val &= ~(1 << 8); | ||
1364 | bnx2_write_phy(bp, MII_BNX2_DSP_RW_PORT, val); | ||
1365 | } | ||
1366 | |||
1359 | if (bp->dev->mtu > 1500) { | 1367 | if (bp->dev->mtu > 1500) { |
1360 | /* Set extended packet length bit */ | 1368 | /* Set extended packet length bit */ |
1361 | bnx2_write_phy(bp, 0x18, 0x7); | 1369 | bnx2_write_phy(bp, 0x18, 0x7); |
@@ -5918,6 +5926,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5918 | } else if (CHIP_NUM(bp) == CHIP_NUM_5706 || | 5926 | } else if (CHIP_NUM(bp) == CHIP_NUM_5706 || |
5919 | CHIP_NUM(bp) == CHIP_NUM_5708) | 5927 | CHIP_NUM(bp) == CHIP_NUM_5708) |
5920 | bp->phy_flags |= PHY_CRC_FIX_FLAG; | 5928 | bp->phy_flags |= PHY_CRC_FIX_FLAG; |
5929 | else if (CHIP_ID(bp) == CHIP_ID_5709_A0) | ||
5930 | bp->phy_flags |= PHY_DIS_EARLY_DAC_FLAG; | ||
5921 | 5931 | ||
5922 | if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || | 5932 | if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || |
5923 | (CHIP_ID(bp) == CHIP_ID_5708_B0) || | 5933 | (CHIP_ID(bp) == CHIP_ID_5708_B0) || |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 13b6f9b11e01..ccbdf81c6599 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -6288,6 +6288,10 @@ struct l2_fhdr { | |||
6288 | 6288 | ||
6289 | #define BCM5708S_TX_ACTL3 0x17 | 6289 | #define BCM5708S_TX_ACTL3 0x17 |
6290 | 6290 | ||
6291 | #define MII_BNX2_DSP_RW_PORT 0x15 | ||
6292 | #define MII_BNX2_DSP_ADDRESS 0x17 | ||
6293 | #define MII_BNX2_DSP_EXPAND_REG 0x0f00 | ||
6294 | |||
6291 | #define MIN_ETHERNET_PACKET_SIZE 60 | 6295 | #define MIN_ETHERNET_PACKET_SIZE 60 |
6292 | #define MAX_ETHERNET_PACKET_SIZE 1514 | 6296 | #define MAX_ETHERNET_PACKET_SIZE 1514 |
6293 | #define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014 | 6297 | #define MAX_ETHERNET_JUMBO_PACKET_SIZE 9014 |
@@ -6489,6 +6493,7 @@ struct bnx2 { | |||
6489 | #define PHY_INT_MODE_MASK_FLAG 0x300 | 6493 | #define PHY_INT_MODE_MASK_FLAG 0x300 |
6490 | #define PHY_INT_MODE_AUTO_POLLING_FLAG 0x100 | 6494 | #define PHY_INT_MODE_AUTO_POLLING_FLAG 0x100 |
6491 | #define PHY_INT_MODE_LINK_READY_FLAG 0x200 | 6495 | #define PHY_INT_MODE_LINK_READY_FLAG 0x200 |
6496 | #define PHY_DIS_EARLY_DAC_FLAG 0x400 | ||
6492 | 6497 | ||
6493 | u32 chip_id; | 6498 | u32 chip_id; |
6494 | /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ | 6499 | /* chip num:16-31, rev:12-15, metal:4-11, bond_id:0-3 */ |
@@ -6512,6 +6517,7 @@ struct bnx2 { | |||
6512 | #define CHIP_ID_5708_A0 0x57080000 | 6517 | #define CHIP_ID_5708_A0 0x57080000 |
6513 | #define CHIP_ID_5708_B0 0x57081000 | 6518 | #define CHIP_ID_5708_B0 0x57081000 |
6514 | #define CHIP_ID_5708_B1 0x57081010 | 6519 | #define CHIP_ID_5708_B1 0x57081010 |
6520 | #define CHIP_ID_5709_A0 0x57090000 | ||
6515 | 6521 | ||
6516 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) | 6522 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) |
6517 | 6523 | ||
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index dc434fb6da85..0978c9ac6d2b 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -151,8 +151,8 @@ struct slave { | |||
151 | struct slave *next; | 151 | struct slave *next; |
152 | struct slave *prev; | 152 | struct slave *prev; |
153 | int delay; | 153 | int delay; |
154 | u32 jiffies; | 154 | unsigned long jiffies; |
155 | u32 last_arp_rx; | 155 | unsigned long last_arp_rx; |
156 | s8 link; /* one of BOND_LINK_XXXX */ | 156 | s8 link; /* one of BOND_LINK_XXXX */ |
157 | s8 state; /* one of BOND_STATE_XXXX */ | 157 | s8 state; /* one of BOND_STATE_XXXX */ |
158 | u32 original_flags; | 158 | u32 original_flags; |
@@ -242,7 +242,8 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav | |||
242 | return bond->params.arp_validate & (1 << slave->state); | 242 | return bond->params.arp_validate & (1 << slave->state); |
243 | } | 243 | } |
244 | 244 | ||
245 | extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave) | 245 | extern inline unsigned long slave_last_rx(struct bonding *bond, |
246 | struct slave *slave) | ||
246 | { | 247 | { |
247 | if (slave_do_arp_validate(bond, slave)) | 248 | if (slave_do_arp_validate(bond, slave)) |
248 | return slave->last_arp_rx; | 249 | return slave->last_arp_rx; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index c2ae2a24629b..0cefef5e3f06 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2718,12 +2718,11 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2718 | struct net_device *netdev = pci_get_drvdata(pdev); | 2718 | struct net_device *netdev = pci_get_drvdata(pdev); |
2719 | struct nic *nic = netdev_priv(netdev); | 2719 | struct nic *nic = netdev_priv(netdev); |
2720 | 2720 | ||
2721 | #ifdef CONFIG_E100_NAPI | ||
2722 | if (netif_running(netdev)) | 2721 | if (netif_running(netdev)) |
2723 | netif_poll_disable(nic->netdev); | 2722 | netif_poll_disable(nic->netdev); |
2724 | #endif | ||
2725 | del_timer_sync(&nic->watchdog); | 2723 | del_timer_sync(&nic->watchdog); |
2726 | netif_carrier_off(nic->netdev); | 2724 | netif_carrier_off(nic->netdev); |
2725 | netif_device_detach(netdev); | ||
2727 | 2726 | ||
2728 | pci_save_state(pdev); | 2727 | pci_save_state(pdev); |
2729 | 2728 | ||
@@ -2736,6 +2735,7 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2736 | } | 2735 | } |
2737 | 2736 | ||
2738 | pci_disable_device(pdev); | 2737 | pci_disable_device(pdev); |
2738 | free_irq(pdev->irq, netdev); | ||
2739 | pci_set_power_state(pdev, PCI_D3hot); | 2739 | pci_set_power_state(pdev, PCI_D3hot); |
2740 | 2740 | ||
2741 | return 0; | 2741 | return 0; |
@@ -2759,16 +2759,13 @@ static int e100_resume(struct pci_dev *pdev) | |||
2759 | } | 2759 | } |
2760 | #endif /* CONFIG_PM */ | 2760 | #endif /* CONFIG_PM */ |
2761 | 2761 | ||
2762 | |||
2763 | static void e100_shutdown(struct pci_dev *pdev) | 2762 | static void e100_shutdown(struct pci_dev *pdev) |
2764 | { | 2763 | { |
2765 | struct net_device *netdev = pci_get_drvdata(pdev); | 2764 | struct net_device *netdev = pci_get_drvdata(pdev); |
2766 | struct nic *nic = netdev_priv(netdev); | 2765 | struct nic *nic = netdev_priv(netdev); |
2767 | 2766 | ||
2768 | #ifdef CONFIG_E100_NAPI | ||
2769 | if (netif_running(netdev)) | 2767 | if (netif_running(netdev)) |
2770 | netif_poll_disable(nic->netdev); | 2768 | netif_poll_disable(nic->netdev); |
2771 | #endif | ||
2772 | del_timer_sync(&nic->watchdog); | 2769 | del_timer_sync(&nic->watchdog); |
2773 | netif_carrier_off(nic->netdev); | 2770 | netif_carrier_off(nic->netdev); |
2774 | 2771 | ||
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index be10a3a26b5b..272e1ec51aa2 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0044" | 42 | #define DRV_VERSION "EHEA_0045" |
43 | 43 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 1072e69ef85d..9de2d38a5321 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2316,6 +2316,7 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2316 | struct ehea_adapter *adapter = port->adapter; | 2316 | struct ehea_adapter *adapter = port->adapter; |
2317 | struct hcp_ehea_port_cb4 *cb4; | 2317 | struct hcp_ehea_port_cb4 *cb4; |
2318 | u32 *dn_log_port_id; | 2318 | u32 *dn_log_port_id; |
2319 | int jumbo = 0; | ||
2319 | 2320 | ||
2320 | sema_init(&port->port_lock, 1); | 2321 | sema_init(&port->port_lock, 1); |
2321 | port->state = EHEA_PORT_DOWN; | 2322 | port->state = EHEA_PORT_DOWN; |
@@ -2357,13 +2358,25 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2357 | if (!cb4) { | 2358 | if (!cb4) { |
2358 | ehea_error("no mem for cb4"); | 2359 | ehea_error("no mem for cb4"); |
2359 | } else { | 2360 | } else { |
2360 | cb4->jumbo_frame = 1; | 2361 | hret = ehea_h_query_ehea_port(adapter->handle, |
2361 | hret = ehea_h_modify_ehea_port(adapter->handle, | 2362 | port->logical_port_id, |
2362 | port->logical_port_id, | 2363 | H_PORT_CB4, |
2363 | H_PORT_CB4, H_PORT_CB4_JUMBO, | 2364 | H_PORT_CB4_JUMBO, cb4); |
2364 | cb4); | 2365 | |
2365 | if (hret != H_SUCCESS) { | 2366 | if (hret == H_SUCCESS) { |
2366 | ehea_info("Jumbo frames not activated"); | 2367 | if (cb4->jumbo_frame) |
2368 | jumbo = 1; | ||
2369 | else { | ||
2370 | cb4->jumbo_frame = 1; | ||
2371 | hret = ehea_h_modify_ehea_port(adapter->handle, | ||
2372 | port-> | ||
2373 | logical_port_id, | ||
2374 | H_PORT_CB4, | ||
2375 | H_PORT_CB4_JUMBO, | ||
2376 | cb4); | ||
2377 | if (hret == H_SUCCESS) | ||
2378 | jumbo = 1; | ||
2379 | } | ||
2367 | } | 2380 | } |
2368 | kfree(cb4); | 2381 | kfree(cb4); |
2369 | } | 2382 | } |
@@ -2402,6 +2415,9 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2402 | goto out_free; | 2415 | goto out_free; |
2403 | } | 2416 | } |
2404 | 2417 | ||
2418 | ehea_info("%s: Jumbo frames are %sabled", dev->name, | ||
2419 | jumbo == 1 ? "en" : "dis"); | ||
2420 | |||
2405 | port->netdev = dev; | 2421 | port->netdev = dev; |
2406 | ret = 0; | 2422 | ret = 0; |
2407 | goto out; | 2423 | goto out; |
@@ -2582,6 +2598,7 @@ static int __devexit ehea_remove(struct ibmebus_dev *dev) | |||
2582 | destroy_workqueue(adapter->ehea_wq); | 2598 | destroy_workqueue(adapter->ehea_wq); |
2583 | 2599 | ||
2584 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); | 2600 | ibmebus_free_irq(NULL, adapter->neq->attr.ist1, adapter); |
2601 | tasklet_kill(&adapter->neq_tasklet); | ||
2585 | 2602 | ||
2586 | ehea_destroy_eq(adapter->neq); | 2603 | ehea_destroy_eq(adapter->neq); |
2587 | 2604 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index c2c5fd419bd0..ff6839477306 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -104,9 +104,9 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); | 104 | fep->interrupt = platform_get_irq_byname(pdev,"interrupt"); |
105 | if (fep->interrupt < 0) | 105 | if (fep->interrupt < 0) |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | 107 | ||
108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 108 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
109 | fep->fec.fecp =(void*)r->start; | 109 | fep->fec.fecp = ioremap(r->start, r->end - r->start + 1); |
110 | 110 | ||
111 | if(fep->fec.fecp == NULL) | 111 | if(fep->fec.fecp == NULL) |
112 | return -EINVAL; | 112 | return -EINVAL; |
@@ -319,11 +319,14 @@ static void restart(struct net_device *dev) | |||
319 | * Clear any outstanding interrupt. | 319 | * Clear any outstanding interrupt. |
320 | */ | 320 | */ |
321 | FW(fecp, ievent, 0xffc0); | 321 | FW(fecp, ievent, 0xffc0); |
322 | #ifndef CONFIG_PPC_MERGE | ||
322 | FW(fecp, ivec, (fep->interrupt / 2) << 29); | 323 | FW(fecp, ivec, (fep->interrupt / 2) << 29); |
323 | 324 | #else | |
325 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); | ||
326 | #endif | ||
324 | 327 | ||
325 | /* | 328 | /* |
326 | * adjust to speed (only for DUET & RMII) | 329 | * adjust to speed (only for DUET & RMII) |
327 | */ | 330 | */ |
328 | #ifdef CONFIG_DUET | 331 | #ifdef CONFIG_DUET |
329 | if (fpi->use_rmii) { | 332 | if (fpi->use_rmii) { |
@@ -418,6 +421,7 @@ static void stop(struct net_device *dev) | |||
418 | 421 | ||
419 | static void pre_request_irq(struct net_device *dev, int irq) | 422 | static void pre_request_irq(struct net_device *dev, int irq) |
420 | { | 423 | { |
424 | #ifndef CONFIG_PPC_MERGE | ||
421 | immap_t *immap = fs_enet_immap; | 425 | immap_t *immap = fs_enet_immap; |
422 | u32 siel; | 426 | u32 siel; |
423 | 427 | ||
@@ -431,6 +435,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
431 | siel &= ~(0x80000000 >> (irq & ~1)); | 435 | siel &= ~(0x80000000 >> (irq & ~1)); |
432 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 436 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
433 | } | 437 | } |
438 | #endif | ||
434 | } | 439 | } |
435 | 440 | ||
436 | static void post_free_irq(struct net_device *dev, int irq) | 441 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 95ec5872c507..afd7fca7c6c4 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -121,13 +121,13 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
121 | return -EINVAL; | 121 | return -EINVAL; |
122 | 122 | ||
123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
124 | fep->scc.sccp = (void *)r->start; | 124 | fep->scc.sccp = ioremap(r->start, r->end - r->start + 1); |
125 | 125 | ||
126 | if (fep->scc.sccp == NULL) | 126 | if (fep->scc.sccp == NULL) |
127 | return -EINVAL; | 127 | return -EINVAL; |
128 | 128 | ||
129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); | 129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); |
130 | fep->scc.ep = (void *)r->start; | 130 | fep->scc.ep = ioremap(r->start, r->end - r->start + 1); |
131 | 131 | ||
132 | if (fep->scc.ep == NULL) | 132 | if (fep->scc.ep == NULL) |
133 | return -EINVAL; | 133 | return -EINVAL; |
@@ -397,6 +397,7 @@ static void stop(struct net_device *dev) | |||
397 | 397 | ||
398 | static void pre_request_irq(struct net_device *dev, int irq) | 398 | static void pre_request_irq(struct net_device *dev, int irq) |
399 | { | 399 | { |
400 | #ifndef CONFIG_PPC_MERGE | ||
400 | immap_t *immap = fs_enet_immap; | 401 | immap_t *immap = fs_enet_immap; |
401 | u32 siel; | 402 | u32 siel; |
402 | 403 | ||
@@ -410,6 +411,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
410 | siel &= ~(0x80000000 >> (irq & ~1)); | 411 | siel &= ~(0x80000000 >> (irq & ~1)); |
411 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 412 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
412 | } | 413 | } |
414 | #endif | ||
413 | } | 415 | } |
414 | 416 | ||
415 | static void post_free_irq(struct net_device *dev, int irq) | 417 | static void post_free_irq(struct net_device *dev, int irq) |
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig index 896aa02000d7..feb0ada7a025 100644 --- a/drivers/net/hamradio/Kconfig +++ b/drivers/net/hamradio/Kconfig | |||
@@ -113,7 +113,7 @@ config SCC_TRXECHO | |||
113 | 113 | ||
114 | config BAYCOM_SER_FDX | 114 | config BAYCOM_SER_FDX |
115 | tristate "BAYCOM ser12 fullduplex driver for AX.25" | 115 | tristate "BAYCOM ser12 fullduplex driver for AX.25" |
116 | depends on AX25 | 116 | depends on AX25 && !S390 |
117 | select CRC_CCITT | 117 | select CRC_CCITT |
118 | ---help--- | 118 | ---help--- |
119 | This is one of two drivers for Baycom style simple amateur radio | 119 | This is one of two drivers for Baycom style simple amateur radio |
@@ -133,7 +133,7 @@ config BAYCOM_SER_FDX | |||
133 | 133 | ||
134 | config BAYCOM_SER_HDX | 134 | config BAYCOM_SER_HDX |
135 | tristate "BAYCOM ser12 halfduplex driver for AX.25" | 135 | tristate "BAYCOM ser12 halfduplex driver for AX.25" |
136 | depends on AX25 | 136 | depends on AX25 && !S390 |
137 | select CRC_CCITT | 137 | select CRC_CCITT |
138 | ---help--- | 138 | ---help--- |
139 | This is one of two drivers for Baycom style simple amateur radio | 139 | This is one of two drivers for Baycom style simple amateur radio |
@@ -181,7 +181,7 @@ config BAYCOM_EPP | |||
181 | 181 | ||
182 | config YAM | 182 | config YAM |
183 | tristate "YAM driver for AX.25" | 183 | tristate "YAM driver for AX.25" |
184 | depends on AX25 | 184 | depends on AX25 && !S390 |
185 | help | 185 | help |
186 | The YAM is a modem for packet radio which connects to the serial | 186 | The YAM is a modem for packet radio which connects to the serial |
187 | port and includes some of the functions of a Terminal Node | 187 | port and includes some of the functions of a Terminal Node |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 59324b1693d6..e8598b809228 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -239,49 +239,39 @@ extern unsigned long long netxen_dma_mask; | |||
239 | 239 | ||
240 | typedef u32 netxen_ctx_msg; | 240 | typedef u32 netxen_ctx_msg; |
241 | 241 | ||
242 | #define _netxen_set_bits(config_word, start, bits, val) {\ | ||
243 | unsigned long long mask = (((1ULL << (bits)) - 1) << (start)); \ | ||
244 | unsigned long long value = (val); \ | ||
245 | (config_word) &= ~mask; \ | ||
246 | (config_word) |= (((value) << (start)) & mask); \ | ||
247 | } | ||
248 | |||
249 | #define netxen_set_msg_peg_id(config_word, val) \ | 242 | #define netxen_set_msg_peg_id(config_word, val) \ |
250 | _netxen_set_bits(config_word, 0, 2, val) | 243 | ((config_word) &= ~3, (config_word) |= val & 3) |
251 | #define netxen_set_msg_privid(config_word) \ | 244 | #define netxen_set_msg_privid(config_word) \ |
252 | set_bit(2, (unsigned long*)&config_word) | 245 | ((config_word) |= 1 << 2) |
253 | #define netxen_set_msg_count(config_word, val) \ | 246 | #define netxen_set_msg_count(config_word, val) \ |
254 | _netxen_set_bits(config_word, 3, 15, val) | 247 | ((config_word) &= ~(0x7fff<<3), (config_word) |= (val & 0x7fff) << 3) |
255 | #define netxen_set_msg_ctxid(config_word, val) \ | 248 | #define netxen_set_msg_ctxid(config_word, val) \ |
256 | _netxen_set_bits(config_word, 18, 10, val) | 249 | ((config_word) &= ~(0x3ff<<18), (config_word) |= (val & 0x3ff) << 18) |
257 | #define netxen_set_msg_opcode(config_word, val) \ | 250 | #define netxen_set_msg_opcode(config_word, val) \ |
258 | _netxen_set_bits(config_word, 28, 4, val) | 251 | ((config_word) &= ~(0xf<<24), (config_word) |= (val & 0xf) << 24) |
259 | 252 | ||
260 | struct netxen_rcv_context { | 253 | struct netxen_rcv_context { |
261 | u32 rcv_ring_addr_lo; | 254 | __le64 rcv_ring_addr; |
262 | u32 rcv_ring_addr_hi; | 255 | __le32 rcv_ring_size; |
263 | u32 rcv_ring_size; | 256 | __le32 rsrvd; |
264 | u32 rsrvd; | ||
265 | }; | 257 | }; |
266 | 258 | ||
267 | struct netxen_ring_ctx { | 259 | struct netxen_ring_ctx { |
268 | 260 | ||
269 | /* one command ring */ | 261 | /* one command ring */ |
270 | u64 cmd_consumer_offset; | 262 | __le64 cmd_consumer_offset; |
271 | u32 cmd_ring_addr_lo; | 263 | __le64 cmd_ring_addr; |
272 | u32 cmd_ring_addr_hi; | 264 | __le32 cmd_ring_size; |
273 | u32 cmd_ring_size; | 265 | __le32 rsrvd; |
274 | u32 rsrvd; | ||
275 | 266 | ||
276 | /* three receive rings */ | 267 | /* three receive rings */ |
277 | struct netxen_rcv_context rcv_ctx[3]; | 268 | struct netxen_rcv_context rcv_ctx[3]; |
278 | 269 | ||
279 | /* one status ring */ | 270 | /* one status ring */ |
280 | u32 sts_ring_addr_lo; | 271 | __le64 sts_ring_addr; |
281 | u32 sts_ring_addr_hi; | 272 | __le32 sts_ring_size; |
282 | u32 sts_ring_size; | ||
283 | 273 | ||
284 | u32 ctx_id; | 274 | __le32 ctx_id; |
285 | } __attribute__ ((aligned(64))); | 275 | } __attribute__ ((aligned(64))); |
286 | 276 | ||
287 | /* | 277 | /* |
@@ -305,81 +295,85 @@ struct netxen_ring_ctx { | |||
305 | ((cmd_desc)->port_ctxid |= ((var) & 0x0F)) | 295 | ((cmd_desc)->port_ctxid |= ((var) & 0x0F)) |
306 | 296 | ||
307 | #define netxen_set_cmd_desc_flags(cmd_desc, val) \ | 297 | #define netxen_set_cmd_desc_flags(cmd_desc, val) \ |
308 | _netxen_set_bits((cmd_desc)->flags_opcode, 0, 7, val) | 298 | ((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x7f), \ |
299 | (cmd_desc)->flags_opcode |= cpu_to_le16((val) & 0x7f)) | ||
309 | #define netxen_set_cmd_desc_opcode(cmd_desc, val) \ | 300 | #define netxen_set_cmd_desc_opcode(cmd_desc, val) \ |
310 | _netxen_set_bits((cmd_desc)->flags_opcode, 7, 6, val) | 301 | ((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x3f<<7), \ |
302 | (cmd_desc)->flags_opcode |= cpu_to_le16((val) & (0x3f<<7))) | ||
311 | 303 | ||
312 | #define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \ | 304 | #define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \ |
313 | _netxen_set_bits((cmd_desc)->num_of_buffers_total_length, 0, 8, val); | 305 | ((cmd_desc)->num_of_buffers_total_length &= ~cpu_to_le32(0xff), \ |
306 | (cmd_desc)->num_of_buffers_total_length |= cpu_to_le32((val) & 0xff)) | ||
314 | #define netxen_set_cmd_desc_totallength(cmd_desc, val) \ | 307 | #define netxen_set_cmd_desc_totallength(cmd_desc, val) \ |
315 | _netxen_set_bits((cmd_desc)->num_of_buffers_total_length, 8, 24, val); | 308 | ((cmd_desc)->num_of_buffers_total_length &= cpu_to_le32(0xff), \ |
309 | (cmd_desc)->num_of_buffers_total_length |= cpu_to_le32(val << 24)) | ||
316 | 310 | ||
317 | #define netxen_get_cmd_desc_opcode(cmd_desc) \ | 311 | #define netxen_get_cmd_desc_opcode(cmd_desc) \ |
318 | (((cmd_desc)->flags_opcode >> 7) & 0x003F) | 312 | ((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003F) |
319 | #define netxen_get_cmd_desc_totallength(cmd_desc) \ | 313 | #define netxen_get_cmd_desc_totallength(cmd_desc) \ |
320 | (((cmd_desc)->num_of_buffers_total_length >> 8) & 0x0FFFFFF) | 314 | (le32_to_cpu((cmd_desc)->num_of_buffers_total_length) >> 8) |
321 | 315 | ||
322 | struct cmd_desc_type0 { | 316 | struct cmd_desc_type0 { |
323 | u8 tcp_hdr_offset; /* For LSO only */ | 317 | u8 tcp_hdr_offset; /* For LSO only */ |
324 | u8 ip_hdr_offset; /* For LSO only */ | 318 | u8 ip_hdr_offset; /* For LSO only */ |
325 | /* Bit pattern: 0-6 flags, 7-12 opcode, 13-15 unused */ | 319 | /* Bit pattern: 0-6 flags, 7-12 opcode, 13-15 unused */ |
326 | u16 flags_opcode; | 320 | __le16 flags_opcode; |
327 | /* Bit pattern: 0-7 total number of segments, | 321 | /* Bit pattern: 0-7 total number of segments, |
328 | 8-31 Total size of the packet */ | 322 | 8-31 Total size of the packet */ |
329 | u32 num_of_buffers_total_length; | 323 | __le32 num_of_buffers_total_length; |
330 | union { | 324 | union { |
331 | struct { | 325 | struct { |
332 | u32 addr_low_part2; | 326 | __le32 addr_low_part2; |
333 | u32 addr_high_part2; | 327 | __le32 addr_high_part2; |
334 | }; | 328 | }; |
335 | u64 addr_buffer2; | 329 | __le64 addr_buffer2; |
336 | }; | 330 | }; |
337 | 331 | ||
338 | u16 reference_handle; /* changed to u16 to add mss */ | 332 | __le16 reference_handle; /* changed to u16 to add mss */ |
339 | u16 mss; /* passed by NDIS_PACKET for LSO */ | 333 | __le16 mss; /* passed by NDIS_PACKET for LSO */ |
340 | /* Bit pattern 0-3 port, 0-3 ctx id */ | 334 | /* Bit pattern 0-3 port, 0-3 ctx id */ |
341 | u8 port_ctxid; | 335 | u8 port_ctxid; |
342 | u8 total_hdr_length; /* LSO only : MAC+IP+TCP Hdr size */ | 336 | u8 total_hdr_length; /* LSO only : MAC+IP+TCP Hdr size */ |
343 | u16 conn_id; /* IPSec offoad only */ | 337 | __le16 conn_id; /* IPSec offoad only */ |
344 | 338 | ||
345 | union { | 339 | union { |
346 | struct { | 340 | struct { |
347 | u32 addr_low_part3; | 341 | __le32 addr_low_part3; |
348 | u32 addr_high_part3; | 342 | __le32 addr_high_part3; |
349 | }; | 343 | }; |
350 | u64 addr_buffer3; | 344 | __le64 addr_buffer3; |
351 | }; | 345 | }; |
352 | union { | 346 | union { |
353 | struct { | 347 | struct { |
354 | u32 addr_low_part1; | 348 | __le32 addr_low_part1; |
355 | u32 addr_high_part1; | 349 | __le32 addr_high_part1; |
356 | }; | 350 | }; |
357 | u64 addr_buffer1; | 351 | __le64 addr_buffer1; |
358 | }; | 352 | }; |
359 | 353 | ||
360 | u16 buffer1_length; | 354 | __le16 buffer1_length; |
361 | u16 buffer2_length; | 355 | __le16 buffer2_length; |
362 | u16 buffer3_length; | 356 | __le16 buffer3_length; |
363 | u16 buffer4_length; | 357 | __le16 buffer4_length; |
364 | 358 | ||
365 | union { | 359 | union { |
366 | struct { | 360 | struct { |
367 | u32 addr_low_part4; | 361 | __le32 addr_low_part4; |
368 | u32 addr_high_part4; | 362 | __le32 addr_high_part4; |
369 | }; | 363 | }; |
370 | u64 addr_buffer4; | 364 | __le64 addr_buffer4; |
371 | }; | 365 | }; |
372 | 366 | ||
373 | u64 unused; | 367 | __le64 unused; |
374 | 368 | ||
375 | } __attribute__ ((aligned(64))); | 369 | } __attribute__ ((aligned(64))); |
376 | 370 | ||
377 | /* Note: sizeof(rcv_desc) should always be a mutliple of 2 */ | 371 | /* Note: sizeof(rcv_desc) should always be a mutliple of 2 */ |
378 | struct rcv_desc { | 372 | struct rcv_desc { |
379 | u16 reference_handle; | 373 | __le16 reference_handle; |
380 | u16 reserved; | 374 | __le16 reserved; |
381 | u32 buffer_length; /* allocated buffer length (usually 2K) */ | 375 | __le32 buffer_length; /* allocated buffer length (usually 2K) */ |
382 | u64 addr_buffer; | 376 | __le64 addr_buffer; |
383 | }; | 377 | }; |
384 | 378 | ||
385 | /* opcode field in status_desc */ | 379 | /* opcode field in status_desc */ |
@@ -405,36 +399,36 @@ struct rcv_desc { | |||
405 | (((status_desc)->lro & 0x80) >> 7) | 399 | (((status_desc)->lro & 0x80) >> 7) |
406 | 400 | ||
407 | #define netxen_get_sts_port(status_desc) \ | 401 | #define netxen_get_sts_port(status_desc) \ |
408 | ((status_desc)->status_desc_data & 0x0F) | 402 | (le64_to_cpu((status_desc)->status_desc_data) & 0x0F) |
409 | #define netxen_get_sts_status(status_desc) \ | 403 | #define netxen_get_sts_status(status_desc) \ |
410 | (((status_desc)->status_desc_data >> 4) & 0x0F) | 404 | ((le64_to_cpu((status_desc)->status_desc_data) >> 4) & 0x0F) |
411 | #define netxen_get_sts_type(status_desc) \ | 405 | #define netxen_get_sts_type(status_desc) \ |
412 | (((status_desc)->status_desc_data >> 8) & 0x0F) | 406 | ((le64_to_cpu((status_desc)->status_desc_data) >> 8) & 0x0F) |
413 | #define netxen_get_sts_totallength(status_desc) \ | 407 | #define netxen_get_sts_totallength(status_desc) \ |
414 | (((status_desc)->status_desc_data >> 12) & 0xFFFF) | 408 | ((le64_to_cpu((status_desc)->status_desc_data) >> 12) & 0xFFFF) |
415 | #define netxen_get_sts_refhandle(status_desc) \ | 409 | #define netxen_get_sts_refhandle(status_desc) \ |
416 | (((status_desc)->status_desc_data >> 28) & 0xFFFF) | 410 | ((le64_to_cpu((status_desc)->status_desc_data) >> 28) & 0xFFFF) |
417 | #define netxen_get_sts_prot(status_desc) \ | 411 | #define netxen_get_sts_prot(status_desc) \ |
418 | (((status_desc)->status_desc_data >> 44) & 0x0F) | 412 | ((le64_to_cpu((status_desc)->status_desc_data) >> 44) & 0x0F) |
419 | #define netxen_get_sts_owner(status_desc) \ | 413 | #define netxen_get_sts_owner(status_desc) \ |
420 | (((status_desc)->status_desc_data >> 56) & 0x03) | 414 | ((le64_to_cpu((status_desc)->status_desc_data) >> 56) & 0x03) |
421 | #define netxen_get_sts_opcode(status_desc) \ | 415 | #define netxen_get_sts_opcode(status_desc) \ |
422 | (((status_desc)->status_desc_data >> 58) & 0x03F) | 416 | ((le64_to_cpu((status_desc)->status_desc_data) >> 58) & 0x03F) |
423 | 417 | ||
424 | #define netxen_clear_sts_owner(status_desc) \ | 418 | #define netxen_clear_sts_owner(status_desc) \ |
425 | ((status_desc)->status_desc_data &= \ | 419 | ((status_desc)->status_desc_data &= \ |
426 | ~(((unsigned long long)3) << 56 )) | 420 | ~cpu_to_le64(((unsigned long long)3) << 56 )) |
427 | #define netxen_set_sts_owner(status_desc, val) \ | 421 | #define netxen_set_sts_owner(status_desc, val) \ |
428 | ((status_desc)->status_desc_data |= \ | 422 | ((status_desc)->status_desc_data |= \ |
429 | (((unsigned long long)((val) & 0x3)) << 56 )) | 423 | cpu_to_le64(((unsigned long long)((val) & 0x3)) << 56 )) |
430 | 424 | ||
431 | struct status_desc { | 425 | struct status_desc { |
432 | /* Bit pattern: 0-3 port, 4-7 status, 8-11 type, 12-27 total_length | 426 | /* Bit pattern: 0-3 port, 4-7 status, 8-11 type, 12-27 total_length |
433 | 28-43 reference_handle, 44-47 protocol, 48-52 unused | 427 | 28-43 reference_handle, 44-47 protocol, 48-52 unused |
434 | 53-55 desc_cnt, 56-57 owner, 58-63 opcode | 428 | 53-55 desc_cnt, 56-57 owner, 58-63 opcode |
435 | */ | 429 | */ |
436 | u64 status_desc_data; | 430 | __le64 status_desc_data; |
437 | u32 hash_value; | 431 | __le32 hash_value; |
438 | u8 hash_type; | 432 | u8 hash_type; |
439 | u8 msg_type; | 433 | u8 msg_type; |
440 | u8 unused; | 434 | u8 unused; |
@@ -1005,9 +999,9 @@ void netxen_niu_gbe_set_mii_mode(struct netxen_adapter *adapter, int port, | |||
1005 | void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, int port, | 999 | void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, int port, |
1006 | long enable); | 1000 | long enable); |
1007 | int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, long reg, | 1001 | int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, long reg, |
1008 | __le32 * readval); | 1002 | __u32 * readval); |
1009 | int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long phy, | 1003 | int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long phy, |
1010 | long reg, __le32 val); | 1004 | long reg, __u32 val); |
1011 | 1005 | ||
1012 | /* Functions available from netxen_nic_hw.c */ | 1006 | /* Functions available from netxen_nic_hw.c */ |
1013 | int netxen_nic_set_mtu_xgb(struct netxen_port *port, int new_mtu); | 1007 | int netxen_nic_set_mtu_xgb(struct netxen_port *port, int new_mtu); |
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c index 34044616b3c8..c381d77a7336 100644 --- a/drivers/net/netxen/netxen_nic_ethtool.c +++ b/drivers/net/netxen/netxen_nic_ethtool.c | |||
@@ -218,7 +218,7 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
218 | { | 218 | { |
219 | struct netxen_port *port = netdev_priv(dev); | 219 | struct netxen_port *port = netdev_priv(dev); |
220 | struct netxen_adapter *adapter = port->adapter; | 220 | struct netxen_adapter *adapter = port->adapter; |
221 | __le32 status; | 221 | __u32 status; |
222 | 222 | ||
223 | /* read which mode */ | 223 | /* read which mode */ |
224 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 224 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
@@ -226,7 +226,7 @@ netxen_nic_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
226 | if (adapter->phy_write | 226 | if (adapter->phy_write |
227 | && adapter->phy_write(adapter, port->portnum, | 227 | && adapter->phy_write(adapter, port->portnum, |
228 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 228 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
229 | (__le32) ecmd->autoneg) != 0) | 229 | ecmd->autoneg) != 0) |
230 | return -EIO; | 230 | return -EIO; |
231 | else | 231 | else |
232 | port->link_autoneg = ecmd->autoneg; | 232 | port->link_autoneg = ecmd->autoneg; |
@@ -279,7 +279,7 @@ static int netxen_nic_get_regs_len(struct net_device *dev) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | struct netxen_niu_regs { | 281 | struct netxen_niu_regs { |
282 | __le32 reg[NETXEN_NIC_REGS_COUNT]; | 282 | __u32 reg[NETXEN_NIC_REGS_COUNT]; |
283 | }; | 283 | }; |
284 | 284 | ||
285 | static struct netxen_niu_regs niu_registers[] = { | 285 | static struct netxen_niu_regs niu_registers[] = { |
@@ -372,7 +372,7 @@ netxen_nic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) | |||
372 | { | 372 | { |
373 | struct netxen_port *port = netdev_priv(dev); | 373 | struct netxen_port *port = netdev_priv(dev); |
374 | struct netxen_adapter *adapter = port->adapter; | 374 | struct netxen_adapter *adapter = port->adapter; |
375 | __le32 mode, *regs_buff = p; | 375 | __u32 mode, *regs_buff = p; |
376 | void __iomem *addr; | 376 | void __iomem *addr; |
377 | int i, window; | 377 | int i, window; |
378 | 378 | ||
@@ -415,7 +415,7 @@ static u32 netxen_nic_get_link(struct net_device *dev) | |||
415 | { | 415 | { |
416 | struct netxen_port *port = netdev_priv(dev); | 416 | struct netxen_port *port = netdev_priv(dev); |
417 | struct netxen_adapter *adapter = port->adapter; | 417 | struct netxen_adapter *adapter = port->adapter; |
418 | __le32 status; | 418 | __u32 status; |
419 | 419 | ||
420 | /* read which mode */ | 420 | /* read which mode */ |
421 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 421 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
@@ -482,13 +482,13 @@ netxen_nic_get_pauseparam(struct net_device *dev, | |||
482 | { | 482 | { |
483 | struct netxen_port *port = netdev_priv(dev); | 483 | struct netxen_port *port = netdev_priv(dev); |
484 | struct netxen_adapter *adapter = port->adapter; | 484 | struct netxen_adapter *adapter = port->adapter; |
485 | __le32 val; | 485 | __u32 val; |
486 | 486 | ||
487 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { | 487 | if (adapter->ahw.board_type == NETXEN_NIC_GBE) { |
488 | /* get flow control settings */ | 488 | /* get flow control settings */ |
489 | netxen_nic_read_w0(adapter, | 489 | netxen_nic_read_w0(adapter, |
490 | NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum), | 490 | NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum), |
491 | (u32 *) & val); | 491 | &val); |
492 | pause->rx_pause = netxen_gb_get_rx_flowctl(val); | 492 | pause->rx_pause = netxen_gb_get_rx_flowctl(val); |
493 | pause->tx_pause = netxen_gb_get_tx_flowctl(val); | 493 | pause->tx_pause = netxen_gb_get_tx_flowctl(val); |
494 | /* get autoneg settings */ | 494 | /* get autoneg settings */ |
@@ -502,7 +502,7 @@ netxen_nic_set_pauseparam(struct net_device *dev, | |||
502 | { | 502 | { |
503 | struct netxen_port *port = netdev_priv(dev); | 503 | struct netxen_port *port = netdev_priv(dev); |
504 | struct netxen_adapter *adapter = port->adapter; | 504 | struct netxen_adapter *adapter = port->adapter; |
505 | __le32 val; | 505 | __u32 val; |
506 | unsigned int autoneg; | 506 | unsigned int autoneg; |
507 | 507 | ||
508 | /* read mode */ | 508 | /* read mode */ |
@@ -522,13 +522,13 @@ netxen_nic_set_pauseparam(struct net_device *dev, | |||
522 | 522 | ||
523 | netxen_nic_write_w0(adapter, | 523 | netxen_nic_write_w0(adapter, |
524 | NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum), | 524 | NETXEN_NIU_GB_MAC_CONFIG_0(port->portnum), |
525 | *(u32 *) (&val)); | 525 | *&val); |
526 | /* set autoneg */ | 526 | /* set autoneg */ |
527 | autoneg = pause->autoneg; | 527 | autoneg = pause->autoneg; |
528 | if (adapter->phy_write | 528 | if (adapter->phy_write |
529 | && adapter->phy_write(adapter, port->portnum, | 529 | && adapter->phy_write(adapter, port->portnum, |
530 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, | 530 | NETXEN_NIU_GB_MII_MGMT_ADDR_AUTONEG, |
531 | (__le32) autoneg) != 0) | 531 | autoneg) != 0) |
532 | return -EIO; | 532 | return -EIO; |
533 | else { | 533 | else { |
534 | port->link_autoneg = pause->autoneg; | 534 | port->link_autoneg = pause->autoneg; |
@@ -543,7 +543,7 @@ static int netxen_nic_reg_test(struct net_device *dev) | |||
543 | struct netxen_port *port = netdev_priv(dev); | 543 | struct netxen_port *port = netdev_priv(dev); |
544 | struct netxen_adapter *adapter = port->adapter; | 544 | struct netxen_adapter *adapter = port->adapter; |
545 | u32 data_read, data_written, save; | 545 | u32 data_read, data_written, save; |
546 | __le32 mode; | 546 | __u32 mode; |
547 | 547 | ||
548 | /* | 548 | /* |
549 | * first test the "Read Only" registers by writing which mode | 549 | * first test the "Read Only" registers by writing which mode |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 191e2336e323..f263232f499f 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -95,7 +95,7 @@ void netxen_nic_set_multi(struct net_device *netdev) | |||
95 | struct netxen_port *port = netdev_priv(netdev); | 95 | struct netxen_port *port = netdev_priv(netdev); |
96 | struct netxen_adapter *adapter = port->adapter; | 96 | struct netxen_adapter *adapter = port->adapter; |
97 | struct dev_mc_list *mc_ptr; | 97 | struct dev_mc_list *mc_ptr; |
98 | __le32 netxen_mac_addr_cntl_data = 0; | 98 | __u32 netxen_mac_addr_cntl_data = 0; |
99 | 99 | ||
100 | mc_ptr = netdev->mc_list; | 100 | mc_ptr = netdev->mc_list; |
101 | if (netdev->flags & IFF_PROMISC) { | 101 | if (netdev->flags & IFF_PROMISC) { |
@@ -236,8 +236,9 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
236 | } | 236 | } |
237 | memset(addr, 0, sizeof(struct netxen_ring_ctx)); | 237 | memset(addr, 0, sizeof(struct netxen_ring_ctx)); |
238 | adapter->ctx_desc = (struct netxen_ring_ctx *)addr; | 238 | adapter->ctx_desc = (struct netxen_ring_ctx *)addr; |
239 | adapter->ctx_desc->cmd_consumer_offset = adapter->ctx_desc_phys_addr | 239 | adapter->ctx_desc->cmd_consumer_offset = |
240 | + sizeof(struct netxen_ring_ctx); | 240 | cpu_to_le64(adapter->ctx_desc_phys_addr + |
241 | sizeof(struct netxen_ring_ctx)); | ||
241 | adapter->cmd_consumer = (uint32_t *) (((char *)addr) + | 242 | adapter->cmd_consumer = (uint32_t *) (((char *)addr) + |
242 | sizeof(struct netxen_ring_ctx)); | 243 | sizeof(struct netxen_ring_ctx)); |
243 | 244 | ||
@@ -253,11 +254,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
253 | return -ENOMEM; | 254 | return -ENOMEM; |
254 | } | 255 | } |
255 | 256 | ||
256 | adapter->ctx_desc->cmd_ring_addr_lo = | 257 | adapter->ctx_desc->cmd_ring_addr = |
257 | hw->cmd_desc_phys_addr & 0xffffffffUL; | 258 | cpu_to_le64(hw->cmd_desc_phys_addr); |
258 | adapter->ctx_desc->cmd_ring_addr_hi = | 259 | adapter->ctx_desc->cmd_ring_size = |
259 | ((u64) hw->cmd_desc_phys_addr >> 32); | 260 | cpu_to_le32(adapter->max_tx_desc_count); |
260 | adapter->ctx_desc->cmd_ring_size = adapter->max_tx_desc_count; | ||
261 | 261 | ||
262 | hw->cmd_desc_head = (struct cmd_desc_type0 *)addr; | 262 | hw->cmd_desc_head = (struct cmd_desc_type0 *)addr; |
263 | 263 | ||
@@ -278,12 +278,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
278 | return err; | 278 | return err; |
279 | } | 279 | } |
280 | rcv_desc->desc_head = (struct rcv_desc *)addr; | 280 | rcv_desc->desc_head = (struct rcv_desc *)addr; |
281 | adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr_lo = | 281 | adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr = |
282 | rcv_desc->phys_addr & 0xffffffffUL; | 282 | cpu_to_le64(rcv_desc->phys_addr); |
283 | adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr_hi = | ||
284 | ((u64) rcv_desc->phys_addr >> 32); | ||
285 | adapter->ctx_desc->rcv_ctx[ring].rcv_ring_size = | 283 | adapter->ctx_desc->rcv_ctx[ring].rcv_ring_size = |
286 | rcv_desc->max_rx_desc_count; | 284 | cpu_to_le32(rcv_desc->max_rx_desc_count); |
287 | } | 285 | } |
288 | 286 | ||
289 | addr = netxen_alloc(adapter->ahw.pdev, STATUS_DESC_RINGSIZE, | 287 | addr = netxen_alloc(adapter->ahw.pdev, STATUS_DESC_RINGSIZE, |
@@ -297,11 +295,10 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
297 | return err; | 295 | return err; |
298 | } | 296 | } |
299 | recv_ctx->rcv_status_desc_head = (struct status_desc *)addr; | 297 | recv_ctx->rcv_status_desc_head = (struct status_desc *)addr; |
300 | adapter->ctx_desc->sts_ring_addr_lo = | 298 | adapter->ctx_desc->sts_ring_addr = |
301 | recv_ctx->rcv_status_desc_phys_addr & 0xffffffffUL; | 299 | cpu_to_le64(recv_ctx->rcv_status_desc_phys_addr); |
302 | adapter->ctx_desc->sts_ring_addr_hi = | 300 | adapter->ctx_desc->sts_ring_size = |
303 | ((u64) recv_ctx->rcv_status_desc_phys_addr >> 32); | 301 | cpu_to_le32(adapter->max_rx_desc_count); |
304 | adapter->ctx_desc->sts_ring_size = adapter->max_rx_desc_count; | ||
305 | 302 | ||
306 | } | 303 | } |
307 | /* Window = 1 */ | 304 | /* Window = 1 */ |
@@ -387,10 +384,6 @@ void netxen_tso_check(struct netxen_adapter *adapter, | |||
387 | } | 384 | } |
388 | adapter->stats.xmitcsummed++; | 385 | adapter->stats.xmitcsummed++; |
389 | desc->tcp_hdr_offset = skb->h.raw - skb->data; | 386 | desc->tcp_hdr_offset = skb->h.raw - skb->data; |
390 | netxen_set_cmd_desc_totallength(desc, | ||
391 | cpu_to_le32 | ||
392 | (netxen_get_cmd_desc_totallength | ||
393 | (desc))); | ||
394 | desc->ip_hdr_offset = skb->nh.raw - skb->data; | 387 | desc->ip_hdr_offset = skb->nh.raw - skb->data; |
395 | } | 388 | } |
396 | 389 | ||
@@ -867,9 +860,9 @@ netxen_crb_writelit_adapter(struct netxen_adapter *adapter, unsigned long off, | |||
867 | void netxen_nic_set_link_parameters(struct netxen_port *port) | 860 | void netxen_nic_set_link_parameters(struct netxen_port *port) |
868 | { | 861 | { |
869 | struct netxen_adapter *adapter = port->adapter; | 862 | struct netxen_adapter *adapter = port->adapter; |
870 | __le32 status; | 863 | __u32 status; |
871 | __le32 autoneg; | 864 | __u32 autoneg; |
872 | __le32 mode; | 865 | __u32 mode; |
873 | 866 | ||
874 | netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode); | 867 | netxen_nic_read_w0(adapter, NETXEN_NIU_MODE, &mode); |
875 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ | 868 | if (netxen_get_niu_enable_ge(mode)) { /* Gb 10/100/1000 Mbps mode */ |
diff --git a/drivers/net/netxen/netxen_nic_hw.h b/drivers/net/netxen/netxen_nic_hw.h index 0685633a9c1e..ab1112eb1b0d 100644 --- a/drivers/net/netxen/netxen_nic_hw.h +++ b/drivers/net/netxen/netxen_nic_hw.h | |||
@@ -124,28 +124,28 @@ typedef enum { | |||
124 | */ | 124 | */ |
125 | 125 | ||
126 | #define netxen_gb_enable_tx(config_word) \ | 126 | #define netxen_gb_enable_tx(config_word) \ |
127 | set_bit(0, (unsigned long*)(&config_word)) | 127 | ((config_word) |= 1 << 0) |
128 | #define netxen_gb_enable_rx(config_word) \ | 128 | #define netxen_gb_enable_rx(config_word) \ |
129 | set_bit(2, (unsigned long*)(&config_word)) | 129 | ((config_word) |= 1 << 2) |
130 | #define netxen_gb_tx_flowctl(config_word) \ | 130 | #define netxen_gb_tx_flowctl(config_word) \ |
131 | set_bit(4, (unsigned long*)(&config_word)) | 131 | ((config_word) |= 1 << 4) |
132 | #define netxen_gb_rx_flowctl(config_word) \ | 132 | #define netxen_gb_rx_flowctl(config_word) \ |
133 | set_bit(5, (unsigned long*)(&config_word)) | 133 | ((config_word) |= 1 << 5) |
134 | #define netxen_gb_tx_reset_pb(config_word) \ | 134 | #define netxen_gb_tx_reset_pb(config_word) \ |
135 | set_bit(16, (unsigned long*)(&config_word)) | 135 | ((config_word) |= 1 << 16) |
136 | #define netxen_gb_rx_reset_pb(config_word) \ | 136 | #define netxen_gb_rx_reset_pb(config_word) \ |
137 | set_bit(17, (unsigned long*)(&config_word)) | 137 | ((config_word) |= 1 << 17) |
138 | #define netxen_gb_tx_reset_mac(config_word) \ | 138 | #define netxen_gb_tx_reset_mac(config_word) \ |
139 | set_bit(18, (unsigned long*)(&config_word)) | 139 | ((config_word) |= 1 << 18) |
140 | #define netxen_gb_rx_reset_mac(config_word) \ | 140 | #define netxen_gb_rx_reset_mac(config_word) \ |
141 | set_bit(19, (unsigned long*)(&config_word)) | 141 | ((config_word) |= 1 << 19) |
142 | #define netxen_gb_soft_reset(config_word) \ | 142 | #define netxen_gb_soft_reset(config_word) \ |
143 | set_bit(31, (unsigned long*)(&config_word)) | 143 | ((config_word) |= 1 << 31) |
144 | 144 | ||
145 | #define netxen_gb_unset_tx_flowctl(config_word) \ | 145 | #define netxen_gb_unset_tx_flowctl(config_word) \ |
146 | clear_bit(4, (unsigned long *)(&config_word)) | 146 | ((config_word) &= ~(1 << 4)) |
147 | #define netxen_gb_unset_rx_flowctl(config_word) \ | 147 | #define netxen_gb_unset_rx_flowctl(config_word) \ |
148 | clear_bit(5, (unsigned long*)(&config_word)) | 148 | ((config_word) &= ~(1 << 5)) |
149 | 149 | ||
150 | #define netxen_gb_get_tx_synced(config_word) \ | 150 | #define netxen_gb_get_tx_synced(config_word) \ |
151 | _netxen_crb_get_bit((config_word), 1) | 151 | _netxen_crb_get_bit((config_word), 1) |
@@ -171,15 +171,15 @@ typedef enum { | |||
171 | */ | 171 | */ |
172 | 172 | ||
173 | #define netxen_gb_set_duplex(config_word) \ | 173 | #define netxen_gb_set_duplex(config_word) \ |
174 | set_bit(0, (unsigned long*)&config_word) | 174 | ((config_word) |= 1 << 0) |
175 | #define netxen_gb_set_crc_enable(config_word) \ | 175 | #define netxen_gb_set_crc_enable(config_word) \ |
176 | set_bit(1, (unsigned long*)&config_word) | 176 | ((config_word) |= 1 << 1) |
177 | #define netxen_gb_set_padshort(config_word) \ | 177 | #define netxen_gb_set_padshort(config_word) \ |
178 | set_bit(2, (unsigned long*)&config_word) | 178 | ((config_word) |= 1 << 2) |
179 | #define netxen_gb_set_checklength(config_word) \ | 179 | #define netxen_gb_set_checklength(config_word) \ |
180 | set_bit(4, (unsigned long*)&config_word) | 180 | ((config_word) |= 1 << 4) |
181 | #define netxen_gb_set_hugeframes(config_word) \ | 181 | #define netxen_gb_set_hugeframes(config_word) \ |
182 | set_bit(5, (unsigned long*)&config_word) | 182 | ((config_word) |= 1 << 5) |
183 | #define netxen_gb_set_preamblelen(config_word, val) \ | 183 | #define netxen_gb_set_preamblelen(config_word, val) \ |
184 | ((config_word) |= ((val) << 12) & 0xF000) | 184 | ((config_word) |= ((val) << 12) & 0xF000) |
185 | #define netxen_gb_set_intfmode(config_word, val) \ | 185 | #define netxen_gb_set_intfmode(config_word, val) \ |
@@ -190,9 +190,9 @@ typedef enum { | |||
190 | #define netxen_gb_set_mii_mgmt_clockselect(config_word, val) \ | 190 | #define netxen_gb_set_mii_mgmt_clockselect(config_word, val) \ |
191 | ((config_word) |= ((val) & 0x07)) | 191 | ((config_word) |= ((val) & 0x07)) |
192 | #define netxen_gb_mii_mgmt_reset(config_word) \ | 192 | #define netxen_gb_mii_mgmt_reset(config_word) \ |
193 | set_bit(31, (unsigned long*)&config_word) | 193 | ((config_word) |= 1 << 31) |
194 | #define netxen_gb_mii_mgmt_unset(config_word) \ | 194 | #define netxen_gb_mii_mgmt_unset(config_word) \ |
195 | clear_bit(31, (unsigned long*)&config_word) | 195 | ((config_word) &= ~(1 << 31)) |
196 | 196 | ||
197 | /* | 197 | /* |
198 | * NIU GB MII Mgmt Command Register (applies to GB0, GB1, GB2, GB3) | 198 | * NIU GB MII Mgmt Command Register (applies to GB0, GB1, GB2, GB3) |
@@ -201,7 +201,7 @@ typedef enum { | |||
201 | */ | 201 | */ |
202 | 202 | ||
203 | #define netxen_gb_mii_mgmt_set_read_cycle(config_word) \ | 203 | #define netxen_gb_mii_mgmt_set_read_cycle(config_word) \ |
204 | set_bit(0, (unsigned long*)&config_word) | 204 | ((config_word) |= 1 << 0) |
205 | #define netxen_gb_mii_mgmt_reg_addr(config_word, val) \ | 205 | #define netxen_gb_mii_mgmt_reg_addr(config_word, val) \ |
206 | ((config_word) |= ((val) & 0x1F)) | 206 | ((config_word) |= ((val) & 0x1F)) |
207 | #define netxen_gb_mii_mgmt_phy_addr(config_word, val) \ | 207 | #define netxen_gb_mii_mgmt_phy_addr(config_word, val) \ |
@@ -274,9 +274,9 @@ typedef enum { | |||
274 | #define netxen_set_phy_speed(config_word, val) \ | 274 | #define netxen_set_phy_speed(config_word, val) \ |
275 | ((config_word) |= ((val & 0x03) << 14)) | 275 | ((config_word) |= ((val & 0x03) << 14)) |
276 | #define netxen_set_phy_duplex(config_word) \ | 276 | #define netxen_set_phy_duplex(config_word) \ |
277 | set_bit(13, (unsigned long*)&config_word) | 277 | ((config_word) |= 1 << 13) |
278 | #define netxen_clear_phy_duplex(config_word) \ | 278 | #define netxen_clear_phy_duplex(config_word) \ |
279 | clear_bit(13, (unsigned long*)&config_word) | 279 | ((config_word) &= ~(1 << 13)) |
280 | 280 | ||
281 | #define netxen_get_phy_jabber(config_word) \ | 281 | #define netxen_get_phy_jabber(config_word) \ |
282 | _netxen_crb_get_bit(config_word, 0) | 282 | _netxen_crb_get_bit(config_word, 0) |
@@ -350,11 +350,11 @@ typedef enum { | |||
350 | _netxen_crb_get_bit(config_word, 15) | 350 | _netxen_crb_get_bit(config_word, 15) |
351 | 351 | ||
352 | #define netxen_set_phy_int_link_status_changed(config_word) \ | 352 | #define netxen_set_phy_int_link_status_changed(config_word) \ |
353 | set_bit(10, (unsigned long*)&config_word) | 353 | ((config_word) |= 1 << 10) |
354 | #define netxen_set_phy_int_autoneg_completed(config_word) \ | 354 | #define netxen_set_phy_int_autoneg_completed(config_word) \ |
355 | set_bit(11, (unsigned long*)&config_word) | 355 | ((config_word) |= 1 << 11) |
356 | #define netxen_set_phy_int_speed_changed(config_word) \ | 356 | #define netxen_set_phy_int_speed_changed(config_word) \ |
357 | set_bit(14, (unsigned long*)&config_word) | 357 | ((config_word) |= 1 << 14) |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * NIU Mode Register. | 360 | * NIU Mode Register. |
@@ -382,22 +382,22 @@ typedef enum { | |||
382 | */ | 382 | */ |
383 | 383 | ||
384 | #define netxen_set_gb_drop_gb0(config_word) \ | 384 | #define netxen_set_gb_drop_gb0(config_word) \ |
385 | set_bit(0, (unsigned long*)&config_word) | 385 | ((config_word) |= 1 << 0) |
386 | #define netxen_set_gb_drop_gb1(config_word) \ | 386 | #define netxen_set_gb_drop_gb1(config_word) \ |
387 | set_bit(1, (unsigned long*)&config_word) | 387 | ((config_word) |= 1 << 1) |
388 | #define netxen_set_gb_drop_gb2(config_word) \ | 388 | #define netxen_set_gb_drop_gb2(config_word) \ |
389 | set_bit(2, (unsigned long*)&config_word) | 389 | ((config_word) |= 1 << 2) |
390 | #define netxen_set_gb_drop_gb3(config_word) \ | 390 | #define netxen_set_gb_drop_gb3(config_word) \ |
391 | set_bit(3, (unsigned long*)&config_word) | 391 | ((config_word) |= 1 << 3) |
392 | 392 | ||
393 | #define netxen_clear_gb_drop_gb0(config_word) \ | 393 | #define netxen_clear_gb_drop_gb0(config_word) \ |
394 | clear_bit(0, (unsigned long*)&config_word) | 394 | ((config_word) &= ~(1 << 0)) |
395 | #define netxen_clear_gb_drop_gb1(config_word) \ | 395 | #define netxen_clear_gb_drop_gb1(config_word) \ |
396 | clear_bit(1, (unsigned long*)&config_word) | 396 | ((config_word) &= ~(1 << 1)) |
397 | #define netxen_clear_gb_drop_gb2(config_word) \ | 397 | #define netxen_clear_gb_drop_gb2(config_word) \ |
398 | clear_bit(2, (unsigned long*)&config_word) | 398 | ((config_word) &= ~(1 << 2)) |
399 | #define netxen_clear_gb_drop_gb3(config_word) \ | 399 | #define netxen_clear_gb_drop_gb3(config_word) \ |
400 | clear_bit(3, (unsigned long*)&config_word) | 400 | ((config_word) &= ~(1 << 3)) |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * NIU XG MAC Config Register | 403 | * NIU XG MAC Config Register |
@@ -413,7 +413,7 @@ typedef enum { | |||
413 | */ | 413 | */ |
414 | 414 | ||
415 | #define netxen_xg_soft_reset(config_word) \ | 415 | #define netxen_xg_soft_reset(config_word) \ |
416 | set_bit(4, (unsigned long*)&config_word) | 416 | ((config_word) |= 1 << 4) |
417 | 417 | ||
418 | /* | 418 | /* |
419 | * MAC Control Register | 419 | * MAC Control Register |
@@ -433,19 +433,19 @@ typedef enum { | |||
433 | #define netxen_nic_mcr_set_id_pool0(config, val) \ | 433 | #define netxen_nic_mcr_set_id_pool0(config, val) \ |
434 | ((config) |= ((val) &0x03)) | 434 | ((config) |= ((val) &0x03)) |
435 | #define netxen_nic_mcr_set_enable_xtnd0(config) \ | 435 | #define netxen_nic_mcr_set_enable_xtnd0(config) \ |
436 | (set_bit(3, (unsigned long *)&(config))) | 436 | ((config) |= 1 << 3) |
437 | #define netxen_nic_mcr_set_id_pool1(config, val) \ | 437 | #define netxen_nic_mcr_set_id_pool1(config, val) \ |
438 | ((config) |= (((val) & 0x03) << 4)) | 438 | ((config) |= (((val) & 0x03) << 4)) |
439 | #define netxen_nic_mcr_set_enable_xtnd1(config) \ | 439 | #define netxen_nic_mcr_set_enable_xtnd1(config) \ |
440 | (set_bit(6, (unsigned long *)&(config))) | 440 | ((config) |= 1 << 6) |
441 | #define netxen_nic_mcr_set_id_pool2(config, val) \ | 441 | #define netxen_nic_mcr_set_id_pool2(config, val) \ |
442 | ((config) |= (((val) & 0x03) << 8)) | 442 | ((config) |= (((val) & 0x03) << 8)) |
443 | #define netxen_nic_mcr_set_enable_xtnd2(config) \ | 443 | #define netxen_nic_mcr_set_enable_xtnd2(config) \ |
444 | (set_bit(10, (unsigned long *)&(config))) | 444 | ((config) |= 1 << 10) |
445 | #define netxen_nic_mcr_set_id_pool3(config, val) \ | 445 | #define netxen_nic_mcr_set_id_pool3(config, val) \ |
446 | ((config) |= (((val) & 0x03) << 12)) | 446 | ((config) |= (((val) & 0x03) << 12)) |
447 | #define netxen_nic_mcr_set_enable_xtnd3(config) \ | 447 | #define netxen_nic_mcr_set_enable_xtnd3(config) \ |
448 | (set_bit(14, (unsigned long *)&(config))) | 448 | ((config) |= 1 << 14) |
449 | #define netxen_nic_mcr_set_mode_select(config, val) \ | 449 | #define netxen_nic_mcr_set_mode_select(config, val) \ |
450 | ((config) |= (((val) & 0x03) << 24)) | 450 | ((config) |= (((val) & 0x03) << 24)) |
451 | #define netxen_nic_mcr_set_enable_pool(config, val) \ | 451 | #define netxen_nic_mcr_set_enable_pool(config, val) \ |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index c3e41f368554..973af96337a9 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -690,8 +690,7 @@ int netxen_nic_rx_has_work(struct netxen_adapter *adapter) | |||
690 | desc_head = recv_ctx->rcv_status_desc_head; | 690 | desc_head = recv_ctx->rcv_status_desc_head; |
691 | desc = &desc_head[consumer]; | 691 | desc = &desc_head[consumer]; |
692 | 692 | ||
693 | if (((le16_to_cpu(netxen_get_sts_owner(desc))) | 693 | if (netxen_get_sts_owner(desc) & STATUS_OWNER_HOST) |
694 | & STATUS_OWNER_HOST)) | ||
695 | return 1; | 694 | return 1; |
696 | } | 695 | } |
697 | 696 | ||
@@ -787,11 +786,11 @@ netxen_process_rcv(struct netxen_adapter *adapter, int ctxid, | |||
787 | struct netxen_port *port = adapter->port[netxen_get_sts_port(desc)]; | 786 | struct netxen_port *port = adapter->port[netxen_get_sts_port(desc)]; |
788 | struct pci_dev *pdev = port->pdev; | 787 | struct pci_dev *pdev = port->pdev; |
789 | struct net_device *netdev = port->netdev; | 788 | struct net_device *netdev = port->netdev; |
790 | int index = le16_to_cpu(netxen_get_sts_refhandle(desc)); | 789 | int index = netxen_get_sts_refhandle(desc); |
791 | struct netxen_recv_context *recv_ctx = &(adapter->recv_ctx[ctxid]); | 790 | struct netxen_recv_context *recv_ctx = &(adapter->recv_ctx[ctxid]); |
792 | struct netxen_rx_buffer *buffer; | 791 | struct netxen_rx_buffer *buffer; |
793 | struct sk_buff *skb; | 792 | struct sk_buff *skb; |
794 | u32 length = le16_to_cpu(netxen_get_sts_totallength(desc)); | 793 | u32 length = netxen_get_sts_totallength(desc); |
795 | u32 desc_ctx; | 794 | u32 desc_ctx; |
796 | struct netxen_rcv_desc_ctx *rcv_desc; | 795 | struct netxen_rcv_desc_ctx *rcv_desc; |
797 | int ret; | 796 | int ret; |
@@ -918,16 +917,14 @@ u32 netxen_process_rcv_ring(struct netxen_adapter *adapter, int ctxid, int max) | |||
918 | */ | 917 | */ |
919 | while (count < max) { | 918 | while (count < max) { |
920 | desc = &desc_head[consumer]; | 919 | desc = &desc_head[consumer]; |
921 | if (! | 920 | if (!(netxen_get_sts_owner(desc) & STATUS_OWNER_HOST)) { |
922 | (le16_to_cpu(netxen_get_sts_owner(desc)) & | ||
923 | STATUS_OWNER_HOST)) { | ||
924 | DPRINTK(ERR, "desc %p ownedby %x\n", desc, | 921 | DPRINTK(ERR, "desc %p ownedby %x\n", desc, |
925 | netxen_get_sts_owner(desc)); | 922 | netxen_get_sts_owner(desc)); |
926 | break; | 923 | break; |
927 | } | 924 | } |
928 | netxen_process_rcv(adapter, ctxid, desc); | 925 | netxen_process_rcv(adapter, ctxid, desc); |
929 | netxen_clear_sts_owner(desc); | 926 | netxen_clear_sts_owner(desc); |
930 | netxen_set_sts_owner(desc, cpu_to_le16(STATUS_OWNER_PHANTOM)); | 927 | netxen_set_sts_owner(desc, STATUS_OWNER_PHANTOM); |
931 | consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1); | 928 | consumer = (consumer + 1) & (adapter->max_rx_desc_count - 1); |
932 | count++; | 929 | count++; |
933 | } | 930 | } |
@@ -1232,7 +1229,7 @@ void netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, uint32_t ctx, | |||
1232 | 1229 | ||
1233 | /* make a rcv descriptor */ | 1230 | /* make a rcv descriptor */ |
1234 | pdesc->reference_handle = cpu_to_le16(buffer->ref_handle); | 1231 | pdesc->reference_handle = cpu_to_le16(buffer->ref_handle); |
1235 | pdesc->buffer_length = cpu_to_le16(rcv_desc->dma_size); | 1232 | pdesc->buffer_length = cpu_to_le32(rcv_desc->dma_size); |
1236 | pdesc->addr_buffer = cpu_to_le64(buffer->dma); | 1233 | pdesc->addr_buffer = cpu_to_le64(buffer->dma); |
1237 | DPRINTK(INFO, "done writing descripter\n"); | 1234 | DPRINTK(INFO, "done writing descripter\n"); |
1238 | producer = | 1235 | producer = |
diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c index 06847d4252c3..be366e48007c 100644 --- a/drivers/net/netxen/netxen_nic_isr.c +++ b/drivers/net/netxen/netxen_nic_isr.c | |||
@@ -79,7 +79,7 @@ void netxen_indicate_link_status(struct netxen_adapter *adapter, u32 portno, | |||
79 | void netxen_handle_port_int(struct netxen_adapter *adapter, u32 portno, | 79 | void netxen_handle_port_int(struct netxen_adapter *adapter, u32 portno, |
80 | u32 enable) | 80 | u32 enable) |
81 | { | 81 | { |
82 | __le32 int_src; | 82 | __u32 int_src; |
83 | struct netxen_port *port; | 83 | struct netxen_port *port; |
84 | 84 | ||
85 | /* This should clear the interrupt source */ | 85 | /* This should clear the interrupt source */ |
@@ -110,7 +110,7 @@ void netxen_handle_port_int(struct netxen_adapter *adapter, u32 portno, | |||
110 | /* write it down later.. */ | 110 | /* write it down later.. */ |
111 | if ((netxen_get_phy_int_speed_changed(int_src)) | 111 | if ((netxen_get_phy_int_speed_changed(int_src)) |
112 | || (netxen_get_phy_int_link_status_changed(int_src))) { | 112 | || (netxen_get_phy_int_link_status_changed(int_src))) { |
113 | __le32 status; | 113 | __u32 status; |
114 | 114 | ||
115 | DPRINTK(INFO, "SPEED CHANGED OR LINK STATUS CHANGED \n"); | 115 | DPRINTK(INFO, "SPEED CHANGED OR LINK STATUS CHANGED \n"); |
116 | 116 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 96e1bee19ba0..69c1b9d23a1a 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -117,7 +117,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
117 | void __iomem *mem_ptr1 = NULL; | 117 | void __iomem *mem_ptr1 = NULL; |
118 | void __iomem *mem_ptr2 = NULL; | 118 | void __iomem *mem_ptr2 = NULL; |
119 | 119 | ||
120 | u8 *db_ptr = NULL; | 120 | u8 __iomem *db_ptr = NULL; |
121 | unsigned long mem_base, mem_len, db_base, db_len; | 121 | unsigned long mem_base, mem_len, db_base, db_len; |
122 | int pci_using_dac, i, err; | 122 | int pci_using_dac, i, err; |
123 | int ring; | 123 | int ring; |
@@ -191,7 +191,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
191 | db_len); | 191 | db_len); |
192 | 192 | ||
193 | db_ptr = ioremap(db_base, NETXEN_DB_MAPSIZE_BYTES); | 193 | db_ptr = ioremap(db_base, NETXEN_DB_MAPSIZE_BYTES); |
194 | if (db_ptr == 0UL) { | 194 | if (!db_ptr) { |
195 | printk(KERN_ERR "%s: Failed to allocate doorbell map.", | 195 | printk(KERN_ERR "%s: Failed to allocate doorbell map.", |
196 | netxen_nic_driver_name); | 196 | netxen_nic_driver_name); |
197 | err = -EIO; | 197 | err = -EIO; |
@@ -818,7 +818,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
818 | /* Take skb->data itself */ | 818 | /* Take skb->data itself */ |
819 | pbuf = &adapter->cmd_buf_arr[producer]; | 819 | pbuf = &adapter->cmd_buf_arr[producer]; |
820 | if ((netdev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size > 0) { | 820 | if ((netdev->features & NETIF_F_TSO) && skb_shinfo(skb)->gso_size > 0) { |
821 | pbuf->mss = cpu_to_le16(skb_shinfo(skb)->gso_size); | 821 | pbuf->mss = skb_shinfo(skb)->gso_size; |
822 | hwdesc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size); | 822 | hwdesc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size); |
823 | } else { | 823 | } else { |
824 | pbuf->mss = 0; | 824 | pbuf->mss = 0; |
@@ -882,7 +882,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
882 | hwdesc->addr_buffer3 = cpu_to_le64(temp_dma); | 882 | hwdesc->addr_buffer3 = cpu_to_le64(temp_dma); |
883 | break; | 883 | break; |
884 | case 3: | 884 | case 3: |
885 | hwdesc->buffer4_length = temp_len; | 885 | hwdesc->buffer4_length = cpu_to_le16(temp_len); |
886 | hwdesc->addr_buffer4 = cpu_to_le64(temp_dma); | 886 | hwdesc->addr_buffer4 = cpu_to_le64(temp_dma); |
887 | break; | 887 | break; |
888 | } | 888 | } |
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c index 4987dc765d99..40d7003a371c 100644 --- a/drivers/net/netxen/netxen_nic_niu.c +++ b/drivers/net/netxen/netxen_nic_niu.c | |||
@@ -89,15 +89,15 @@ static inline int phy_unlock(struct netxen_adapter *adapter) | |||
89 | * | 89 | * |
90 | */ | 90 | */ |
91 | int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, | 91 | int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, |
92 | long reg, __le32 * readval) | 92 | long reg, __u32 * readval) |
93 | { | 93 | { |
94 | long timeout = 0; | 94 | long timeout = 0; |
95 | long result = 0; | 95 | long result = 0; |
96 | long restore = 0; | 96 | long restore = 0; |
97 | __le32 address; | 97 | __u32 address; |
98 | __le32 command; | 98 | __u32 command; |
99 | __le32 status; | 99 | __u32 status; |
100 | __le32 mac_cfg0; | 100 | __u32 mac_cfg0; |
101 | 101 | ||
102 | if (phy_lock(adapter) != 0) { | 102 | if (phy_lock(adapter) != 0) { |
103 | return -1; | 103 | return -1; |
@@ -112,7 +112,7 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, | |||
112 | &mac_cfg0, 4)) | 112 | &mac_cfg0, 4)) |
113 | return -EIO; | 113 | return -EIO; |
114 | if (netxen_gb_get_soft_reset(mac_cfg0)) { | 114 | if (netxen_gb_get_soft_reset(mac_cfg0)) { |
115 | __le32 temp; | 115 | __u32 temp; |
116 | temp = 0; | 116 | temp = 0; |
117 | netxen_gb_tx_reset_pb(temp); | 117 | netxen_gb_tx_reset_pb(temp); |
118 | netxen_gb_rx_reset_pb(temp); | 118 | netxen_gb_rx_reset_pb(temp); |
@@ -184,15 +184,15 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long phy, | |||
184 | * | 184 | * |
185 | */ | 185 | */ |
186 | int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, | 186 | int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, |
187 | long phy, long reg, __le32 val) | 187 | long phy, long reg, __u32 val) |
188 | { | 188 | { |
189 | long timeout = 0; | 189 | long timeout = 0; |
190 | long result = 0; | 190 | long result = 0; |
191 | long restore = 0; | 191 | long restore = 0; |
192 | __le32 address; | 192 | __u32 address; |
193 | __le32 command; | 193 | __u32 command; |
194 | __le32 status; | 194 | __u32 status; |
195 | __le32 mac_cfg0; | 195 | __u32 mac_cfg0; |
196 | 196 | ||
197 | /* | 197 | /* |
198 | * MII mgmt all goes through port 0 MAC interface, so it | 198 | * MII mgmt all goes through port 0 MAC interface, so it |
@@ -203,7 +203,7 @@ int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, | |||
203 | &mac_cfg0, 4)) | 203 | &mac_cfg0, 4)) |
204 | return -EIO; | 204 | return -EIO; |
205 | if (netxen_gb_get_soft_reset(mac_cfg0)) { | 205 | if (netxen_gb_get_soft_reset(mac_cfg0)) { |
206 | __le32 temp; | 206 | __u32 temp; |
207 | temp = 0; | 207 | temp = 0; |
208 | netxen_gb_tx_reset_pb(temp); | 208 | netxen_gb_tx_reset_pb(temp); |
209 | netxen_gb_rx_reset_pb(temp); | 209 | netxen_gb_rx_reset_pb(temp); |
@@ -269,7 +269,7 @@ int netxen_niu_gbe_enable_phy_interrupts(struct netxen_adapter *adapter, | |||
269 | int port) | 269 | int port) |
270 | { | 270 | { |
271 | int result = 0; | 271 | int result = 0; |
272 | __le32 enable = 0; | 272 | __u32 enable = 0; |
273 | netxen_set_phy_int_link_status_changed(enable); | 273 | netxen_set_phy_int_link_status_changed(enable); |
274 | netxen_set_phy_int_autoneg_completed(enable); | 274 | netxen_set_phy_int_autoneg_completed(enable); |
275 | netxen_set_phy_int_speed_changed(enable); | 275 | netxen_set_phy_int_speed_changed(enable); |
@@ -402,7 +402,7 @@ void netxen_niu_gbe_set_gmii_mode(struct netxen_adapter *adapter, | |||
402 | int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port) | 402 | int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port) |
403 | { | 403 | { |
404 | int result = 0; | 404 | int result = 0; |
405 | __le32 status; | 405 | __u32 status; |
406 | if (adapter->disable_phy_interrupts) | 406 | if (adapter->disable_phy_interrupts) |
407 | adapter->disable_phy_interrupts(adapter, port); | 407 | adapter->disable_phy_interrupts(adapter, port); |
408 | mdelay(2); | 408 | mdelay(2); |
@@ -410,7 +410,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port) | |||
410 | if (0 == | 410 | if (0 == |
411 | netxen_niu_gbe_phy_read(adapter, port, | 411 | netxen_niu_gbe_phy_read(adapter, port, |
412 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, | 412 | NETXEN_NIU_GB_MII_MGMT_ADDR_PHY_STATUS, |
413 | (__le32 *) & status)) { | 413 | &status)) { |
414 | if (netxen_get_phy_link(status)) { | 414 | if (netxen_get_phy_link(status)) { |
415 | if (netxen_get_phy_speed(status) == 2) { | 415 | if (netxen_get_phy_speed(status) == 2) { |
416 | netxen_niu_gbe_set_gmii_mode(adapter, port, 1); | 416 | netxen_niu_gbe_set_gmii_mode(adapter, port, 1); |
@@ -489,7 +489,7 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter, | |||
489 | int port, long enable) | 489 | int port, long enable) |
490 | { | 490 | { |
491 | int result = 0; | 491 | int result = 0; |
492 | __le32 int_src; | 492 | __u32 int_src; |
493 | 493 | ||
494 | printk(KERN_INFO PFX "NETXEN: Handling PHY interrupt on port %d" | 494 | printk(KERN_INFO PFX "NETXEN: Handling PHY interrupt on port %d" |
495 | " (device enable = %d)\n", (int)port, (int)enable); | 495 | " (device enable = %d)\n", (int)port, (int)enable); |
@@ -530,7 +530,7 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter, | |||
530 | printk(KERN_INFO PFX "autoneg_error "); | 530 | printk(KERN_INFO PFX "autoneg_error "); |
531 | if ((netxen_get_phy_int_speed_changed(int_src)) | 531 | if ((netxen_get_phy_int_speed_changed(int_src)) |
532 | || (netxen_get_phy_int_link_status_changed(int_src))) { | 532 | || (netxen_get_phy_int_link_status_changed(int_src))) { |
533 | __le32 status; | 533 | __u32 status; |
534 | 534 | ||
535 | printk(KERN_INFO PFX | 535 | printk(KERN_INFO PFX |
536 | "speed_changed or link status changed"); | 536 | "speed_changed or link status changed"); |
@@ -583,9 +583,9 @@ int netxen_niu_gbe_handle_phy_interrupt(struct netxen_adapter *adapter, | |||
583 | int netxen_niu_macaddr_get(struct netxen_adapter *adapter, | 583 | int netxen_niu_macaddr_get(struct netxen_adapter *adapter, |
584 | int phy, netxen_ethernet_macaddr_t * addr) | 584 | int phy, netxen_ethernet_macaddr_t * addr) |
585 | { | 585 | { |
586 | u64 result = 0; | 586 | u32 stationhigh; |
587 | __le32 stationhigh; | 587 | u32 stationlow; |
588 | __le32 stationlow; | 588 | u8 val[8]; |
589 | 589 | ||
590 | if (addr == NULL) | 590 | if (addr == NULL) |
591 | return -EINVAL; | 591 | return -EINVAL; |
@@ -598,10 +598,10 @@ int netxen_niu_macaddr_get(struct netxen_adapter *adapter, | |||
598 | if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), | 598 | if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), |
599 | &stationlow, 4)) | 599 | &stationlow, 4)) |
600 | return -EIO; | 600 | return -EIO; |
601 | ((__le32 *)val)[1] = cpu_to_le32(stationhigh); | ||
602 | ((__le32 *)val)[0] = cpu_to_le32(stationlow); | ||
601 | 603 | ||
602 | result = (u64) netxen_gb_get_stationaddress_low(stationlow); | 604 | memcpy(addr, val + 2, 6); |
603 | result |= (u64) stationhigh << 16; | ||
604 | memcpy(*addr, &result, sizeof(netxen_ethernet_macaddr_t)); | ||
605 | 605 | ||
606 | return 0; | 606 | return 0; |
607 | } | 607 | } |
@@ -613,24 +613,25 @@ int netxen_niu_macaddr_get(struct netxen_adapter *adapter, | |||
613 | int netxen_niu_macaddr_set(struct netxen_port *port, | 613 | int netxen_niu_macaddr_set(struct netxen_port *port, |
614 | netxen_ethernet_macaddr_t addr) | 614 | netxen_ethernet_macaddr_t addr) |
615 | { | 615 | { |
616 | __le32 temp = 0; | 616 | u8 temp[4]; |
617 | u32 val; | ||
617 | struct netxen_adapter *adapter = port->adapter; | 618 | struct netxen_adapter *adapter = port->adapter; |
618 | int phy = port->portnum; | 619 | int phy = port->portnum; |
619 | unsigned char mac_addr[6]; | 620 | unsigned char mac_addr[6]; |
620 | int i; | 621 | int i; |
621 | 622 | ||
622 | for (i = 0; i < 10; i++) { | 623 | for (i = 0; i < 10; i++) { |
623 | memcpy(&temp, addr, 2); | 624 | temp[0] = temp[1] = 0; |
624 | temp <<= 16; | 625 | memcpy(temp + 2, addr, 2); |
626 | val = le32_to_cpu(*(__le32 *)temp); | ||
625 | if (netxen_nic_hw_write_wx | 627 | if (netxen_nic_hw_write_wx |
626 | (adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), &temp, 4)) | 628 | (adapter, NETXEN_NIU_GB_STATION_ADDR_1(phy), &val, 4)) |
627 | return -EIO; | 629 | return -EIO; |
628 | 630 | ||
629 | temp = 0; | 631 | memcpy(temp, ((u8 *) addr) + 2, sizeof(__le32)); |
630 | 632 | val = le32_to_cpu(*(__le32 *)temp); | |
631 | memcpy(&temp, ((u8 *) addr) + 2, sizeof(__le32)); | ||
632 | if (netxen_nic_hw_write_wx | 633 | if (netxen_nic_hw_write_wx |
633 | (adapter, NETXEN_NIU_GB_STATION_ADDR_0(phy), &temp, 4)) | 634 | (adapter, NETXEN_NIU_GB_STATION_ADDR_0(phy), &val, 4)) |
634 | return -2; | 635 | return -2; |
635 | 636 | ||
636 | netxen_niu_macaddr_get(adapter, phy, | 637 | netxen_niu_macaddr_get(adapter, phy, |
@@ -659,9 +660,9 @@ int netxen_niu_macaddr_set(struct netxen_port *port, | |||
659 | int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter, | 660 | int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter, |
660 | int port, netxen_niu_gbe_ifmode_t mode) | 661 | int port, netxen_niu_gbe_ifmode_t mode) |
661 | { | 662 | { |
662 | __le32 mac_cfg0; | 663 | __u32 mac_cfg0; |
663 | __le32 mac_cfg1; | 664 | __u32 mac_cfg1; |
664 | __le32 mii_cfg; | 665 | __u32 mii_cfg; |
665 | 666 | ||
666 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) | 667 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) |
667 | return -EINVAL; | 668 | return -EINVAL; |
@@ -736,7 +737,7 @@ int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter, | |||
736 | /* Disable a GbE interface */ | 737 | /* Disable a GbE interface */ |
737 | int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter, int port) | 738 | int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter, int port) |
738 | { | 739 | { |
739 | __le32 mac_cfg0; | 740 | __u32 mac_cfg0; |
740 | 741 | ||
741 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) | 742 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) |
742 | return -EINVAL; | 743 | return -EINVAL; |
@@ -752,7 +753,7 @@ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter, int port) | |||
752 | /* Disable an XG interface */ | 753 | /* Disable an XG interface */ |
753 | int netxen_niu_disable_xg_port(struct netxen_adapter *adapter, int port) | 754 | int netxen_niu_disable_xg_port(struct netxen_adapter *adapter, int port) |
754 | { | 755 | { |
755 | __le32 mac_cfg; | 756 | __u32 mac_cfg; |
756 | 757 | ||
757 | if (port != 0) | 758 | if (port != 0) |
758 | return -EINVAL; | 759 | return -EINVAL; |
@@ -769,7 +770,7 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter, int port) | |||
769 | int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port, | 770 | int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port, |
770 | netxen_niu_prom_mode_t mode) | 771 | netxen_niu_prom_mode_t mode) |
771 | { | 772 | { |
772 | __le32 reg; | 773 | __u32 reg; |
773 | 774 | ||
774 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) | 775 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) |
775 | return -EINVAL; | 776 | return -EINVAL; |
@@ -826,22 +827,21 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter, int port, | |||
826 | int netxen_niu_xg_macaddr_set(struct netxen_port *port, | 827 | int netxen_niu_xg_macaddr_set(struct netxen_port *port, |
827 | netxen_ethernet_macaddr_t addr) | 828 | netxen_ethernet_macaddr_t addr) |
828 | { | 829 | { |
829 | __le32 temp = 0; | 830 | u8 temp[4]; |
831 | u32 val; | ||
830 | struct netxen_adapter *adapter = port->adapter; | 832 | struct netxen_adapter *adapter = port->adapter; |
831 | 833 | ||
832 | memcpy(&temp, addr, 2); | 834 | temp[0] = temp[1] = 0; |
833 | temp = cpu_to_le32(temp); | 835 | memcpy(temp + 2, addr, 2); |
834 | temp <<= 16; | 836 | val = le32_to_cpu(*(__le32 *)temp); |
835 | if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1, | 837 | if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1, |
836 | &temp, 4)) | 838 | &val, 4)) |
837 | return -EIO; | 839 | return -EIO; |
838 | 840 | ||
839 | temp = 0; | ||
840 | |||
841 | memcpy(&temp, ((u8 *) addr) + 2, sizeof(__le32)); | 841 | memcpy(&temp, ((u8 *) addr) + 2, sizeof(__le32)); |
842 | temp = cpu_to_le32(temp); | 842 | val = le32_to_cpu(*(__le32 *)temp); |
843 | if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_HI, | 843 | if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_HI, |
844 | &temp, 4)) | 844 | &val, 4)) |
845 | return -EIO; | 845 | return -EIO; |
846 | 846 | ||
847 | return 0; | 847 | return 0; |
@@ -854,9 +854,9 @@ int netxen_niu_xg_macaddr_set(struct netxen_port *port, | |||
854 | int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy, | 854 | int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy, |
855 | netxen_ethernet_macaddr_t * addr) | 855 | netxen_ethernet_macaddr_t * addr) |
856 | { | 856 | { |
857 | __le32 stationhigh; | 857 | u32 stationhigh; |
858 | __le32 stationlow; | 858 | u32 stationlow; |
859 | u64 result; | 859 | u8 val[8]; |
860 | 860 | ||
861 | if (addr == NULL) | 861 | if (addr == NULL) |
862 | return -EINVAL; | 862 | return -EINVAL; |
@@ -869,10 +869,10 @@ int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy, | |||
869 | if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1, | 869 | if (netxen_nic_hw_read_wx(adapter, NETXEN_NIU_XGE_STATION_ADDR_0_1, |
870 | &stationlow, 4)) | 870 | &stationlow, 4)) |
871 | return -EIO; | 871 | return -EIO; |
872 | ((__le32 *)val)[1] = cpu_to_le32(stationhigh); | ||
873 | ((__le32 *)val)[0] = cpu_to_le32(stationlow); | ||
872 | 874 | ||
873 | result = ((u64) stationlow) >> 16; | 875 | memcpy(addr, val + 2, 6); |
874 | result |= (u64) stationhigh << 16; | ||
875 | memcpy(*addr, &result, sizeof(netxen_ethernet_macaddr_t)); | ||
876 | 876 | ||
877 | return 0; | 877 | return 0; |
878 | } | 878 | } |
@@ -880,7 +880,7 @@ int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, int phy, | |||
880 | int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter, | 880 | int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter, |
881 | int port, netxen_niu_prom_mode_t mode) | 881 | int port, netxen_niu_prom_mode_t mode) |
882 | { | 882 | { |
883 | __le32 reg; | 883 | __u32 reg; |
884 | 884 | ||
885 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) | 885 | if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) |
886 | return -EINVAL; | 886 | return -EINVAL; |
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 096d4a100bf2..86135397f430 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -349,7 +349,7 @@ static int __init fixed_init(void) | |||
349 | fixed_mdio_register_device(0, 100, 1); | 349 | fixed_mdio_register_device(0, 100, 1); |
350 | #endif | 350 | #endif |
351 | 351 | ||
352 | #ifdef CONFIX_FIXED_MII_10_FDX | 352 | #ifdef CONFIG_FIXED_MII_10_FDX |
353 | fixed_mdio_register_device(0, 10, 1); | 353 | fixed_mdio_register_device(0, 10, 1); |
354 | #endif | 354 | #endif |
355 | return 0; | 355 | return 0; |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index a2e804ddca6c..822dd0b13133 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -3639,29 +3639,6 @@ static int sky2_resume(struct pci_dev *pdev) | |||
3639 | out: | 3639 | out: |
3640 | return err; | 3640 | return err; |
3641 | } | 3641 | } |
3642 | |||
3643 | /* BIOS resume runs after device (it's a bug in PM) | ||
3644 | * as a temporary workaround on suspend/resume leave MSI disabled | ||
3645 | */ | ||
3646 | static int sky2_suspend_late(struct pci_dev *pdev, pm_message_t state) | ||
3647 | { | ||
3648 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
3649 | |||
3650 | free_irq(pdev->irq, hw); | ||
3651 | if (hw->msi) { | ||
3652 | pci_disable_msi(pdev); | ||
3653 | hw->msi = 0; | ||
3654 | } | ||
3655 | return 0; | ||
3656 | } | ||
3657 | |||
3658 | static int sky2_resume_early(struct pci_dev *pdev) | ||
3659 | { | ||
3660 | struct sky2_hw *hw = pci_get_drvdata(pdev); | ||
3661 | struct net_device *dev = hw->dev[0]; | ||
3662 | |||
3663 | return request_irq(pdev->irq, sky2_intr, IRQF_SHARED, dev->name, hw); | ||
3664 | } | ||
3665 | #endif | 3642 | #endif |
3666 | 3643 | ||
3667 | static struct pci_driver sky2_driver = { | 3644 | static struct pci_driver sky2_driver = { |
@@ -3672,8 +3649,6 @@ static struct pci_driver sky2_driver = { | |||
3672 | #ifdef CONFIG_PM | 3649 | #ifdef CONFIG_PM |
3673 | .suspend = sky2_suspend, | 3650 | .suspend = sky2_suspend, |
3674 | .resume = sky2_resume, | 3651 | .resume = sky2_resume, |
3675 | .suspend_late = sky2_suspend_late, | ||
3676 | .resume_early = sky2_resume_early, | ||
3677 | #endif | 3652 | #endif |
3678 | }; | 3653 | }; |
3679 | 3654 | ||
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 880d9fdd7c67..43af61438449 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -968,11 +968,11 @@ static void smc911x_phy_configure(struct work_struct *work) | |||
968 | * We should not be called if phy_type is zero. | 968 | * We should not be called if phy_type is zero. |
969 | */ | 969 | */ |
970 | if (lp->phy_type == 0) | 970 | if (lp->phy_type == 0) |
971 | goto smc911x_phy_configure_exit; | 971 | goto smc911x_phy_configure_exit_nolock; |
972 | 972 | ||
973 | if (smc911x_phy_reset(dev, phyaddr)) { | 973 | if (smc911x_phy_reset(dev, phyaddr)) { |
974 | printk("%s: PHY reset timed out\n", dev->name); | 974 | printk("%s: PHY reset timed out\n", dev->name); |
975 | goto smc911x_phy_configure_exit; | 975 | goto smc911x_phy_configure_exit_nolock; |
976 | } | 976 | } |
977 | spin_lock_irqsave(&lp->lock, flags); | 977 | spin_lock_irqsave(&lp->lock, flags); |
978 | 978 | ||
@@ -1041,6 +1041,7 @@ static void smc911x_phy_configure(struct work_struct *work) | |||
1041 | 1041 | ||
1042 | smc911x_phy_configure_exit: | 1042 | smc911x_phy_configure_exit: |
1043 | spin_unlock_irqrestore(&lp->lock, flags); | 1043 | spin_unlock_irqrestore(&lp->lock, flags); |
1044 | smc911x_phy_configure_exit_nolock: | ||
1044 | lp->work_pending = 0; | 1045 | lp->work_pending = 0; |
1045 | } | 1046 | } |
1046 | 1047 | ||
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index ebb6aa39f9c7..8ea2fc1b96cb 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1925,6 +1925,8 @@ spider_net_stop(struct net_device *netdev) | |||
1925 | /* release chains */ | 1925 | /* release chains */ |
1926 | spider_net_release_tx_chain(card, 1); | 1926 | spider_net_release_tx_chain(card, 1); |
1927 | 1927 | ||
1928 | spider_net_free_rx_chain_contents(card); | ||
1929 | |||
1928 | spider_net_free_chain(card, &card->tx_chain); | 1930 | spider_net_free_chain(card, &card->tx_chain); |
1929 | spider_net_free_chain(card, &card->rx_chain); | 1931 | spider_net_free_chain(card, &card->rx_chain); |
1930 | 1932 | ||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index ef882a8a094e..c913ea4e545c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -654,19 +654,42 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vi | |||
654 | * VIA bridges which have VLink | 654 | * VIA bridges which have VLink |
655 | */ | 655 | */ |
656 | 656 | ||
657 | static const struct pci_device_id via_vlink_fixup_tbl[] = { | 657 | static int via_vlink_dev_lo = -1, via_vlink_dev_hi = 18; |
658 | /* Internal devices need IRQ line routing, pre VLink */ | 658 | |
659 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C686), 0 }, | 659 | static void quirk_via_bridge(struct pci_dev *dev) |
660 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8231), 17 }, | 660 | { |
661 | /* Devices with VLink */ | 661 | /* See what bridge we have and find the device ranges */ |
662 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233_0), 17}, | 662 | switch (dev->device) { |
663 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233A), 17 }, | 663 | case PCI_DEVICE_ID_VIA_82C686: |
664 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233C_0), 17 }, | 664 | /* The VT82C686 is special, it attaches to PCI and can have |
665 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8235), 16 }, | 665 | any device number. All its subdevices are functions of |
666 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237), 15 }, | 666 | that single device. */ |
667 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237A), 15 }, | 667 | via_vlink_dev_lo = PCI_SLOT(dev->devfn); |
668 | { 0, }, | 668 | via_vlink_dev_hi = PCI_SLOT(dev->devfn); |
669 | }; | 669 | break; |
670 | case PCI_DEVICE_ID_VIA_8237: | ||
671 | case PCI_DEVICE_ID_VIA_8237A: | ||
672 | via_vlink_dev_lo = 15; | ||
673 | break; | ||
674 | case PCI_DEVICE_ID_VIA_8235: | ||
675 | via_vlink_dev_lo = 16; | ||
676 | break; | ||
677 | case PCI_DEVICE_ID_VIA_8231: | ||
678 | case PCI_DEVICE_ID_VIA_8233_0: | ||
679 | case PCI_DEVICE_ID_VIA_8233A: | ||
680 | case PCI_DEVICE_ID_VIA_8233C_0: | ||
681 | via_vlink_dev_lo = 17; | ||
682 | break; | ||
683 | } | ||
684 | } | ||
685 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_bridge); | ||
686 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, quirk_via_bridge); | ||
687 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233_0, quirk_via_bridge); | ||
688 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233A, quirk_via_bridge); | ||
689 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8233C_0, quirk_via_bridge); | ||
690 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_via_bridge); | ||
691 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_bridge); | ||
692 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237A, quirk_via_bridge); | ||
670 | 693 | ||
671 | /** | 694 | /** |
672 | * quirk_via_vlink - VIA VLink IRQ number update | 695 | * quirk_via_vlink - VIA VLink IRQ number update |
@@ -675,35 +698,20 @@ static const struct pci_device_id via_vlink_fixup_tbl[] = { | |||
675 | * If the device we are dealing with is on a PIC IRQ we need to | 698 | * If the device we are dealing with is on a PIC IRQ we need to |
676 | * ensure that the IRQ line register which usually is not relevant | 699 | * ensure that the IRQ line register which usually is not relevant |
677 | * for PCI cards, is actually written so that interrupts get sent | 700 | * for PCI cards, is actually written so that interrupts get sent |
678 | * to the right place | 701 | * to the right place. |
702 | * We only do this on systems where a VIA south bridge was detected, | ||
703 | * and only for VIA devices on the motherboard (see quirk_via_bridge | ||
704 | * above). | ||
679 | */ | 705 | */ |
680 | 706 | ||
681 | static void quirk_via_vlink(struct pci_dev *dev) | 707 | static void quirk_via_vlink(struct pci_dev *dev) |
682 | { | 708 | { |
683 | const struct pci_device_id *via_vlink_fixup; | ||
684 | static int dev_lo = -1, dev_hi = 18; | ||
685 | u8 irq, new_irq; | 709 | u8 irq, new_irq; |
686 | 710 | ||
687 | /* Check if we have VLink and cache the result */ | 711 | /* Check if we have VLink at all */ |
688 | 712 | if (via_vlink_dev_lo == -1) | |
689 | /* Checked already - no */ | ||
690 | if (dev_lo == -2) | ||
691 | return; | 713 | return; |
692 | 714 | ||
693 | /* Not checked - see what bridge we have and find the device | ||
694 | ranges */ | ||
695 | |||
696 | if (dev_lo == -1) { | ||
697 | via_vlink_fixup = pci_find_present(via_vlink_fixup_tbl); | ||
698 | if (via_vlink_fixup == NULL) { | ||
699 | dev_lo = -2; | ||
700 | return; | ||
701 | } | ||
702 | dev_lo = via_vlink_fixup->driver_data; | ||
703 | /* 82C686 is special - 0/0 */ | ||
704 | if (dev_lo == 0) | ||
705 | dev_hi = 0; | ||
706 | } | ||
707 | new_irq = dev->irq; | 715 | new_irq = dev->irq; |
708 | 716 | ||
709 | /* Don't quirk interrupts outside the legacy IRQ range */ | 717 | /* Don't quirk interrupts outside the legacy IRQ range */ |
@@ -711,8 +719,8 @@ static void quirk_via_vlink(struct pci_dev *dev) | |||
711 | return; | 719 | return; |
712 | 720 | ||
713 | /* Internal device ? */ | 721 | /* Internal device ? */ |
714 | if (dev->bus->number != 0 || PCI_SLOT(dev->devfn) > dev_hi || | 722 | if (dev->bus->number != 0 || PCI_SLOT(dev->devfn) > via_vlink_dev_hi || |
715 | PCI_SLOT(dev->devfn) < dev_lo) | 723 | PCI_SLOT(dev->devfn) < via_vlink_dev_lo) |
716 | return; | 724 | return; |
717 | 725 | ||
718 | /* This is an internal VLink device on a PIC interrupt. The BIOS | 726 | /* This is an internal VLink device on a PIC interrupt. The BIOS |
@@ -1254,8 +1262,8 @@ static void quirk_jmicron_dualfn(struct pci_dev *pdev) | |||
1254 | pci_read_config_dword(pdev, 0x40, &conf); | 1262 | pci_read_config_dword(pdev, 0x40, &conf); |
1255 | /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ | 1263 | /* Enable dual function mode, AHCI on fn 0, IDE fn1 */ |
1256 | /* Set the class codes correctly and then direct IDE 0 */ | 1264 | /* Set the class codes correctly and then direct IDE 0 */ |
1257 | conf &= ~0x000F0200; /* Clear bit 9 and 16-19 */ | 1265 | conf &= ~0x000FF200; /* Clear bit 9 and 12-19 */ |
1258 | conf |= 0x00C20002; /* Set bit 1, 17, 22, 23 */ | 1266 | conf |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */ |
1259 | pci_write_config_dword(pdev, 0x40, conf); | 1267 | pci_write_config_dword(pdev, 0x40, conf); |
1260 | 1268 | ||
1261 | /* Reconfigure so that the PCI scanner discovers the | 1269 | /* Reconfigure so that the PCI scanner discovers the |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index fab381ed853c..b2653c4afe9e 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -200,11 +200,8 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor, | |||
200 | * can cause some machines to crash. So here we detect and flag that | 200 | * can cause some machines to crash. So here we detect and flag that |
201 | * situation and bail out early. | 201 | * situation and bail out early. |
202 | */ | 202 | */ |
203 | if (unlikely(list_empty(&pci_devices))) { | 203 | if (unlikely(list_empty(&pci_devices))) |
204 | printk(KERN_INFO "pci_find_subsys() called while pci_devices " | ||
205 | "is still empty\n"); | ||
206 | return NULL; | 204 | return NULL; |
207 | } | ||
208 | down_read(&pci_bus_sem); | 205 | down_read(&pci_bus_sem); |
209 | n = from ? from->global_list.next : pci_devices.next; | 206 | n = from ? from->global_list.next : pci_devices.next; |
210 | 207 | ||
@@ -278,11 +275,8 @@ pci_get_subsys(unsigned int vendor, unsigned int device, | |||
278 | * can cause some machines to crash. So here we detect and flag that | 275 | * can cause some machines to crash. So here we detect and flag that |
279 | * situation and bail out early. | 276 | * situation and bail out early. |
280 | */ | 277 | */ |
281 | if (unlikely(list_empty(&pci_devices))) { | 278 | if (unlikely(list_empty(&pci_devices))) |
282 | printk(KERN_NOTICE "pci_get_subsys() called while pci_devices " | ||
283 | "is still empty\n"); | ||
284 | return NULL; | 279 | return NULL; |
285 | } | ||
286 | down_read(&pci_bus_sem); | 280 | down_read(&pci_bus_sem); |
287 | n = from ? from->global_list.next : pci_devices.next; | 281 | n = from ? from->global_list.next : pci_devices.next; |
288 | 282 | ||
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 9fb0ea5c1fb9..5b458d2478f7 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -545,8 +545,6 @@ SYM53C500_release(struct pcmcia_device *link) | |||
545 | */ | 545 | */ |
546 | if (shost->irq) | 546 | if (shost->irq) |
547 | free_irq(shost->irq, shost); | 547 | free_irq(shost->irq, shost); |
548 | if (shost->dma_channel != 0xff) | ||
549 | free_dma(shost->dma_channel); | ||
550 | if (shost->io_port && shost->n_io_port) | 548 | if (shost->io_port && shost->n_io_port) |
551 | release_region(shost->io_port, shost->n_io_port); | 549 | release_region(shost->io_port, shost->n_io_port); |
552 | 550 | ||
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 61db6973755a..f69bd097166e 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -589,6 +589,8 @@ static int __init pl010_console_setup(struct console *co, char *options) | |||
589 | */ | 589 | */ |
590 | if (co->index >= UART_NR) | 590 | if (co->index >= UART_NR) |
591 | co->index = 0; | 591 | co->index = 0; |
592 | if (!amba_ports[co->index]) | ||
593 | return -ENODEV; | ||
592 | port = &amba_ports[co->index]->port; | 594 | port = &amba_ports[co->index]->port; |
593 | 595 | ||
594 | if (options) | 596 | if (options) |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 9a3b374b2a08..44639e71372a 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -661,6 +661,8 @@ static int __init pl011_console_setup(struct console *co, char *options) | |||
661 | if (co->index >= UART_NR) | 661 | if (co->index >= UART_NR) |
662 | co->index = 0; | 662 | co->index = 0; |
663 | uap = amba_ports[co->index]; | 663 | uap = amba_ports[co->index]; |
664 | if (!uap) | ||
665 | return -ENODEV; | ||
664 | 666 | ||
665 | uap->port.uartclk = clk_get_rate(uap->clk); | 667 | uap->port.uartclk = clk_get_rate(uap->clk); |
666 | 668 | ||
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index ed7f7209ea59..881f886b91c6 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -689,9 +689,9 @@ static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct | |||
689 | struct atmel_uart_data *data = pdev->dev.platform_data; | 689 | struct atmel_uart_data *data = pdev->dev.platform_data; |
690 | 690 | ||
691 | port->iotype = UPIO_MEM; | 691 | port->iotype = UPIO_MEM; |
692 | port->flags = UPF_BOOT_AUTOCONF; | 692 | port->flags = UPF_BOOT_AUTOCONF; |
693 | port->ops = &atmel_pops; | 693 | port->ops = &atmel_pops; |
694 | port->fifosize = 1; | 694 | port->fifosize = 1; |
695 | port->line = pdev->id; | 695 | port->line = pdev->id; |
696 | port->dev = &pdev->dev; | 696 | port->dev = &pdev->dev; |
697 | 697 | ||
@@ -890,7 +890,6 @@ static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state | |||
890 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) | 890 | if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) |
891 | enable_irq_wake(port->irq); | 891 | enable_irq_wake(port->irq); |
892 | else { | 892 | else { |
893 | disable_irq_wake(port->irq); | ||
894 | uart_suspend_port(&atmel_uart, port); | 893 | uart_suspend_port(&atmel_uart, port); |
895 | atmel_port->suspended = 1; | 894 | atmel_port->suspended = 1; |
896 | } | 895 | } |
@@ -907,6 +906,8 @@ static int atmel_serial_resume(struct platform_device *pdev) | |||
907 | uart_resume_port(&atmel_uart, port); | 906 | uart_resume_port(&atmel_uart, port); |
908 | atmel_port->suspended = 0; | 907 | atmel_port->suspended = 0; |
909 | } | 908 | } |
909 | else | ||
910 | disable_irq_wake(port->irq); | ||
910 | 911 | ||
911 | return 0; | 912 | return 0; |
912 | } | 913 | } |
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h index fe1763b2a6d5..11b44360e108 100644 --- a/drivers/serial/atmel_serial.h +++ b/drivers/serial/atmel_serial.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ | 106 | #define ATMEL_US_CSR 0x14 /* Channel Status Register */ |
107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ | 107 | #define ATMEL_US_RHR 0x18 /* Receiver Holding Register */ |
108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ | 108 | #define ATMEL_US_THR 0x1c /* Transmitter Holding Register */ |
109 | #define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [SAM9 only] */ | 109 | #define ATMEL_US_SYNH (1 << 15) /* Transmit/Receive Sync [AT91SAM9261 only] */ |
110 | 110 | ||
111 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ | 111 | #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ |
112 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ | 112 | #define ATMEL_US_CD (0xffff << 0) /* Clock Divider */ |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index ea3636d96e1b..c6c9e72e5fd9 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -56,11 +56,6 @@ static unsigned int hid_mousepoll_interval; | |||
56 | module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); | 56 | module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); |
57 | MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); | 57 | MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); |
58 | 58 | ||
59 | static int usbhid_pb_fnmode = 1; | ||
60 | module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644); | ||
61 | MODULE_PARM_DESC(pb_fnmode, | ||
62 | "Mode of fn key on PowerBooks (0 = disabled, 1 = fkeyslast, 2 = fkeysfirst)"); | ||
63 | |||
64 | /* | 59 | /* |
65 | * Input submission and I/O error handler. | 60 | * Input submission and I/O error handler. |
66 | */ | 61 | */ |
@@ -582,7 +577,6 @@ void usbhid_init_reports(struct hid_device *hid) | |||
582 | } | 577 | } |
583 | 578 | ||
584 | #define USB_VENDOR_ID_GTCO 0x078c | 579 | #define USB_VENDOR_ID_GTCO 0x078c |
585 | #define USB_VENDOR_ID_GTCO_IPANEL_1 0x08ca | ||
586 | #define USB_VENDOR_ID_GTCO_IPANEL_2 0x5543 | 580 | #define USB_VENDOR_ID_GTCO_IPANEL_2 0x5543 |
587 | #define USB_DEVICE_ID_GTCO_90 0x0090 | 581 | #define USB_DEVICE_ID_GTCO_90 0x0090 |
588 | #define USB_DEVICE_ID_GTCO_100 0x0100 | 582 | #define USB_DEVICE_ID_GTCO_100 0x0100 |
@@ -629,7 +623,6 @@ void usbhid_init_reports(struct hid_device *hid) | |||
629 | #define USB_DEVICE_ID_GTCO_1004 0x1004 | 623 | #define USB_DEVICE_ID_GTCO_1004 0x1004 |
630 | #define USB_DEVICE_ID_GTCO_1005 0x1005 | 624 | #define USB_DEVICE_ID_GTCO_1005 0x1005 |
631 | #define USB_DEVICE_ID_GTCO_1006 0x1006 | 625 | #define USB_DEVICE_ID_GTCO_1006 0x1006 |
632 | #define USB_DEVICE_ID_GTCO_10 0x0010 | ||
633 | #define USB_DEVICE_ID_GTCO_8 0x0008 | 626 | #define USB_DEVICE_ID_GTCO_8 0x0008 |
634 | #define USB_DEVICE_ID_GTCO_d 0x000d | 627 | #define USB_DEVICE_ID_GTCO_d 0x000d |
635 | 628 | ||
@@ -883,7 +876,6 @@ static const struct hid_blacklist { | |||
883 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, | 876 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, |
884 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, | 877 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, |
885 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, | 878 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, |
886 | { USB_VENDOR_ID_GTCO_IPANEL_1, USB_DEVICE_ID_GTCO_10, HID_QUIRK_IGNORE }, | ||
887 | { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_8, HID_QUIRK_IGNORE }, | 879 | { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_8, HID_QUIRK_IGNORE }, |
888 | { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_d, HID_QUIRK_IGNORE }, | 880 | { USB_VENDOR_ID_GTCO_IPANEL_2, USB_DEVICE_ID_GTCO_d, HID_QUIRK_IGNORE }, |
889 | { USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA, HID_QUIRK_IGNORE }, | 881 | { USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA, HID_QUIRK_IGNORE }, |
@@ -1249,10 +1241,6 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
1249 | hid->hiddev_hid_event = hiddev_hid_event; | 1241 | hid->hiddev_hid_event = hiddev_hid_event; |
1250 | hid->hiddev_report_event = hiddev_report_event; | 1242 | hid->hiddev_report_event = hiddev_report_event; |
1251 | #endif | 1243 | #endif |
1252 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | ||
1253 | hid->pb_fnmode = usbhid_pb_fnmode; | ||
1254 | #endif | ||
1255 | |||
1256 | return hid; | 1244 | return hid; |
1257 | 1245 | ||
1258 | fail: | 1246 | fail: |
@@ -298,17 +298,23 @@ static void wait_for_all_aios(struct kioctx *ctx) | |||
298 | struct task_struct *tsk = current; | 298 | struct task_struct *tsk = current; |
299 | DECLARE_WAITQUEUE(wait, tsk); | 299 | DECLARE_WAITQUEUE(wait, tsk); |
300 | 300 | ||
301 | spin_lock_irq(&ctx->ctx_lock); | ||
301 | if (!ctx->reqs_active) | 302 | if (!ctx->reqs_active) |
302 | return; | 303 | goto out; |
303 | 304 | ||
304 | add_wait_queue(&ctx->wait, &wait); | 305 | add_wait_queue(&ctx->wait, &wait); |
305 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); | 306 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); |
306 | while (ctx->reqs_active) { | 307 | while (ctx->reqs_active) { |
308 | spin_unlock_irq(&ctx->ctx_lock); | ||
307 | schedule(); | 309 | schedule(); |
308 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); | 310 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); |
311 | spin_lock_irq(&ctx->ctx_lock); | ||
309 | } | 312 | } |
310 | __set_task_state(tsk, TASK_RUNNING); | 313 | __set_task_state(tsk, TASK_RUNNING); |
311 | remove_wait_queue(&ctx->wait, &wait); | 314 | remove_wait_queue(&ctx->wait, &wait); |
315 | |||
316 | out: | ||
317 | spin_unlock_irq(&ctx->ctx_lock); | ||
312 | } | 318 | } |
313 | 319 | ||
314 | /* wait_on_sync_kiocb: | 320 | /* wait_on_sync_kiocb: |
@@ -424,7 +430,6 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx) | |||
424 | ring = kmap_atomic(ctx->ring_info.ring_pages[0], KM_USER0); | 430 | ring = kmap_atomic(ctx->ring_info.ring_pages[0], KM_USER0); |
425 | if (ctx->reqs_active < aio_ring_avail(&ctx->ring_info, ring)) { | 431 | if (ctx->reqs_active < aio_ring_avail(&ctx->ring_info, ring)) { |
426 | list_add(&req->ki_list, &ctx->active_reqs); | 432 | list_add(&req->ki_list, &ctx->active_reqs); |
427 | get_ioctx(ctx); | ||
428 | ctx->reqs_active++; | 433 | ctx->reqs_active++; |
429 | okay = 1; | 434 | okay = 1; |
430 | } | 435 | } |
@@ -536,8 +541,6 @@ int fastcall aio_put_req(struct kiocb *req) | |||
536 | spin_lock_irq(&ctx->ctx_lock); | 541 | spin_lock_irq(&ctx->ctx_lock); |
537 | ret = __aio_put_req(ctx, req); | 542 | ret = __aio_put_req(ctx, req); |
538 | spin_unlock_irq(&ctx->ctx_lock); | 543 | spin_unlock_irq(&ctx->ctx_lock); |
539 | if (ret) | ||
540 | put_ioctx(ctx); | ||
541 | return ret; | 544 | return ret; |
542 | } | 545 | } |
543 | 546 | ||
@@ -779,8 +782,7 @@ static int __aio_run_iocbs(struct kioctx *ctx) | |||
779 | */ | 782 | */ |
780 | iocb->ki_users++; /* grab extra reference */ | 783 | iocb->ki_users++; /* grab extra reference */ |
781 | aio_run_iocb(iocb); | 784 | aio_run_iocb(iocb); |
782 | if (__aio_put_req(ctx, iocb)) /* drop extra ref */ | 785 | __aio_put_req(ctx, iocb); |
783 | put_ioctx(ctx); | ||
784 | } | 786 | } |
785 | if (!list_empty(&ctx->run_list)) | 787 | if (!list_empty(&ctx->run_list)) |
786 | return 1; | 788 | return 1; |
@@ -997,14 +999,10 @@ put_rq: | |||
997 | /* everything turned out well, dispose of the aiocb. */ | 999 | /* everything turned out well, dispose of the aiocb. */ |
998 | ret = __aio_put_req(ctx, iocb); | 1000 | ret = __aio_put_req(ctx, iocb); |
999 | 1001 | ||
1000 | spin_unlock_irqrestore(&ctx->ctx_lock, flags); | ||
1001 | |||
1002 | if (waitqueue_active(&ctx->wait)) | 1002 | if (waitqueue_active(&ctx->wait)) |
1003 | wake_up(&ctx->wait); | 1003 | wake_up(&ctx->wait); |
1004 | 1004 | ||
1005 | if (ret) | 1005 | spin_unlock_irqrestore(&ctx->ctx_lock, flags); |
1006 | put_ioctx(ctx); | ||
1007 | |||
1008 | return ret; | 1006 | return ret; |
1009 | } | 1007 | } |
1010 | 1008 | ||
diff --git a/fs/block_dev.c b/fs/block_dev.c index d9bdf2b3ade2..fc7028b685f2 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -129,6 +129,46 @@ blkdev_get_block(struct inode *inode, sector_t iblock, | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static int | ||
133 | blkdev_get_blocks(struct inode *inode, sector_t iblock, | ||
134 | struct buffer_head *bh, int create) | ||
135 | { | ||
136 | sector_t end_block = max_block(I_BDEV(inode)); | ||
137 | unsigned long max_blocks = bh->b_size >> inode->i_blkbits; | ||
138 | |||
139 | if ((iblock + max_blocks) > end_block) { | ||
140 | max_blocks = end_block - iblock; | ||
141 | if ((long)max_blocks <= 0) { | ||
142 | if (create) | ||
143 | return -EIO; /* write fully beyond EOF */ | ||
144 | /* | ||
145 | * It is a read which is fully beyond EOF. We return | ||
146 | * a !buffer_mapped buffer | ||
147 | */ | ||
148 | max_blocks = 0; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | bh->b_bdev = I_BDEV(inode); | ||
153 | bh->b_blocknr = iblock; | ||
154 | bh->b_size = max_blocks << inode->i_blkbits; | ||
155 | if (max_blocks) | ||
156 | set_buffer_mapped(bh); | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | static ssize_t | ||
161 | blkdev_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | ||
162 | loff_t offset, unsigned long nr_segs) | ||
163 | { | ||
164 | struct file *file = iocb->ki_filp; | ||
165 | struct inode *inode = file->f_mapping->host; | ||
166 | |||
167 | return blockdev_direct_IO_no_locking(rw, iocb, inode, I_BDEV(inode), | ||
168 | iov, offset, nr_segs, blkdev_get_blocks, NULL); | ||
169 | } | ||
170 | |||
171 | #if 0 | ||
132 | static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) | 172 | static int blk_end_aio(struct bio *bio, unsigned int bytes_done, int error) |
133 | { | 173 | { |
134 | struct kiocb *iocb = bio->bi_private; | 174 | struct kiocb *iocb = bio->bi_private; |
@@ -323,6 +363,7 @@ backout: | |||
323 | return PTR_ERR(page); | 363 | return PTR_ERR(page); |
324 | goto completion; | 364 | goto completion; |
325 | } | 365 | } |
366 | #endif | ||
326 | 367 | ||
327 | static int blkdev_writepage(struct page *page, struct writeback_control *wbc) | 368 | static int blkdev_writepage(struct page *page, struct writeback_control *wbc) |
328 | { | 369 | { |
diff --git a/fs/buffer.c b/fs/buffer.c index 460f1c43238e..1ad674fd348c 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2844,7 +2844,6 @@ int try_to_free_buffers(struct page *page) | |||
2844 | 2844 | ||
2845 | spin_lock(&mapping->private_lock); | 2845 | spin_lock(&mapping->private_lock); |
2846 | ret = drop_buffers(page, &buffers_to_free); | 2846 | ret = drop_buffers(page, &buffers_to_free); |
2847 | spin_unlock(&mapping->private_lock); | ||
2848 | 2847 | ||
2849 | /* | 2848 | /* |
2850 | * If the filesystem writes its buffers by hand (eg ext3) | 2849 | * If the filesystem writes its buffers by hand (eg ext3) |
@@ -2855,9 +2854,14 @@ int try_to_free_buffers(struct page *page) | |||
2855 | * Also, during truncate, discard_buffer will have marked all | 2854 | * Also, during truncate, discard_buffer will have marked all |
2856 | * the page's buffers clean. We discover that here and clean | 2855 | * the page's buffers clean. We discover that here and clean |
2857 | * the page also. | 2856 | * the page also. |
2857 | * | ||
2858 | * private_lock must be held over this entire operation in order | ||
2859 | * to synchronise against __set_page_dirty_buffers and prevent the | ||
2860 | * dirty bit from being lost. | ||
2858 | */ | 2861 | */ |
2859 | if (ret) | 2862 | if (ret) |
2860 | cancel_dirty_page(page, PAGE_CACHE_SIZE); | 2863 | cancel_dirty_page(page, PAGE_CACHE_SIZE); |
2864 | spin_unlock(&mapping->private_lock); | ||
2861 | out: | 2865 | out: |
2862 | if (buffers_to_free) { | 2866 | if (buffers_to_free) { |
2863 | struct buffer_head *bh = buffers_to_free; | 2867 | struct buffer_head *bh = buffers_to_free; |
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 8c58bd453993..1794305f9ed8 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c | |||
@@ -193,8 +193,12 @@ static int fuse_ctl_get_sb(struct file_system_type *fs_type, int flags, | |||
193 | 193 | ||
194 | static void fuse_ctl_kill_sb(struct super_block *sb) | 194 | static void fuse_ctl_kill_sb(struct super_block *sb) |
195 | { | 195 | { |
196 | struct fuse_conn *fc; | ||
197 | |||
196 | mutex_lock(&fuse_mutex); | 198 | mutex_lock(&fuse_mutex); |
197 | fuse_control_sb = NULL; | 199 | fuse_control_sb = NULL; |
200 | list_for_each_entry(fc, &fuse_conn_list, entry) | ||
201 | fc->ctl_ndents = 0; | ||
198 | mutex_unlock(&fuse_mutex); | 202 | mutex_unlock(&fuse_mutex); |
199 | 203 | ||
200 | kill_litter_super(sb); | 204 | kill_litter_super(sb); |
diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h index cca3fb693f99..70543b17e4c7 100644 --- a/fs/hostfs/hostfs.h +++ b/fs/hostfs/hostfs.h | |||
@@ -76,7 +76,7 @@ extern int make_symlink(const char *from, const char *to); | |||
76 | extern int unlink_file(const char *file); | 76 | extern int unlink_file(const char *file); |
77 | extern int do_mkdir(const char *file, int mode); | 77 | extern int do_mkdir(const char *file, int mode); |
78 | extern int do_rmdir(const char *file); | 78 | extern int do_rmdir(const char *file); |
79 | extern int do_mknod(const char *file, int mode, int dev); | 79 | extern int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor); |
80 | extern int link_file(const char *from, const char *to); | 80 | extern int link_file(const char *from, const char *to); |
81 | extern int do_readlink(char *file, char *buf, int size); | 81 | extern int do_readlink(char *file, char *buf, int size); |
82 | extern int rename_file(char *from, char *to); | 82 | extern int rename_file(char *from, char *to); |
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 1e6fc3799876..69a376f35a68 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -755,7 +755,7 @@ int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) | |||
755 | goto out_put; | 755 | goto out_put; |
756 | 756 | ||
757 | init_special_inode(inode, mode, dev); | 757 | init_special_inode(inode, mode, dev); |
758 | err = do_mknod(name, mode, dev); | 758 | err = do_mknod(name, mode, MAJOR(dev), MINOR(dev)); |
759 | if(err) | 759 | if(err) |
760 | goto out_free; | 760 | goto out_free; |
761 | 761 | ||
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 23b7cee72123..1ed5ea389f15 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c | |||
@@ -295,11 +295,11 @@ int do_rmdir(const char *file) | |||
295 | return(0); | 295 | return(0); |
296 | } | 296 | } |
297 | 297 | ||
298 | int do_mknod(const char *file, int mode, int dev) | 298 | int do_mknod(const char *file, int mode, unsigned int major, unsigned int minor) |
299 | { | 299 | { |
300 | int err; | 300 | int err; |
301 | 301 | ||
302 | err = mknod(file, mode, dev); | 302 | err = mknod(file, mode, makedev(major, minor)); |
303 | if(err) return(-errno); | 303 | if(err) return(-errno); |
304 | return(0); | 304 | return(0); |
305 | } | 305 | } |
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 062707745162..f4d45d4d835b 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -176,7 +176,7 @@ reclaimer(void *ptr) | |||
176 | lock_kernel(); | 176 | lock_kernel(); |
177 | lockd_up(0); /* note: this cannot fail as lockd is already running */ | 177 | lockd_up(0); /* note: this cannot fail as lockd is already running */ |
178 | 178 | ||
179 | dprintk("lockd: reclaiming locks for host %s", host->h_name); | 179 | dprintk("lockd: reclaiming locks for host %s\n", host->h_name); |
180 | 180 | ||
181 | restart: | 181 | restart: |
182 | nsmstate = host->h_nsmstate; | 182 | nsmstate = host->h_nsmstate; |
@@ -206,7 +206,7 @@ restart: | |||
206 | 206 | ||
207 | host->h_reclaiming = 0; | 207 | host->h_reclaiming = 0; |
208 | up_write(&host->h_rwsem); | 208 | up_write(&host->h_rwsem); |
209 | dprintk("NLM: done reclaiming locks for host %s", host->h_name); | 209 | dprintk("NLM: done reclaiming locks for host %s\n", host->h_name); |
210 | 210 | ||
211 | /* Now, wake up all processes that sleep on a blocked lock */ | 211 | /* Now, wake up all processes that sleep on a blocked lock */ |
212 | list_for_each_entry(block, &nlm_blocked, b_list) { | 212 | list_for_each_entry(block, &nlm_blocked, b_list) { |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index fab20d06d936..9e4a2b70995a 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -434,8 +434,9 @@ static int do_vfs_lock(struct file *file, struct file_lock *fl) | |||
434 | BUG(); | 434 | BUG(); |
435 | } | 435 | } |
436 | if (res < 0) | 436 | if (res < 0) |
437 | printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n", | 437 | dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager" |
438 | __FUNCTION__); | 438 | " - error %d!\n", |
439 | __FUNCTION__, res); | ||
439 | return res; | 440 | return res; |
440 | } | 441 | } |
441 | 442 | ||
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 248dd92e6a56..49c310b84923 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/lockd/bind.h> | 35 | #include <linux/lockd/bind.h> |
36 | 36 | ||
37 | #define NFSDDBG_FACILITY NFSDDBG_EXPORT | 37 | #define NFSDDBG_FACILITY NFSDDBG_EXPORT |
38 | #define NFSD_PARANOIA 1 | ||
39 | 38 | ||
40 | typedef struct auth_domain svc_client; | 39 | typedef struct auth_domain svc_client; |
41 | typedef struct svc_export svc_export; | 40 | typedef struct svc_export svc_export; |
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index b06bf9f70efc..c59d6fbb7a6b 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/nfsd/nfsd.h> | 24 | #include <linux/nfsd/nfsd.h> |
25 | 25 | ||
26 | #define NFSDDBG_FACILITY NFSDDBG_FH | 26 | #define NFSDDBG_FACILITY NFSDDBG_FH |
27 | #define NFSD_PARANOIA 1 | ||
28 | /* #define NFSD_DEBUG_VERBOSE 1 */ | ||
29 | 27 | ||
30 | 28 | ||
31 | static int nfsd_nr_verified; | 29 | static int nfsd_nr_verified; |
@@ -230,13 +228,12 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
230 | error = nfserrno(PTR_ERR(dentry)); | 228 | error = nfserrno(PTR_ERR(dentry)); |
231 | goto out; | 229 | goto out; |
232 | } | 230 | } |
233 | #ifdef NFSD_PARANOIA | 231 | |
234 | if (S_ISDIR(dentry->d_inode->i_mode) && | 232 | if (S_ISDIR(dentry->d_inode->i_mode) && |
235 | (dentry->d_flags & DCACHE_DISCONNECTED)) { | 233 | (dentry->d_flags & DCACHE_DISCONNECTED)) { |
236 | printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %s/%s\n", | 234 | printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %s/%s\n", |
237 | dentry->d_parent->d_name.name, dentry->d_name.name); | 235 | dentry->d_parent->d_name.name, dentry->d_name.name); |
238 | } | 236 | } |
239 | #endif | ||
240 | 237 | ||
241 | fhp->fh_dentry = dentry; | 238 | fhp->fh_dentry = dentry; |
242 | fhp->fh_export = exp; | 239 | fhp->fh_export = exp; |
@@ -267,12 +264,13 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
267 | /* Finally, check access permissions. */ | 264 | /* Finally, check access permissions. */ |
268 | error = nfsd_permission(exp, dentry, access); | 265 | error = nfsd_permission(exp, dentry, access); |
269 | 266 | ||
270 | #ifdef NFSD_PARANOIA_EXTREME | ||
271 | if (error) { | 267 | if (error) { |
272 | printk("fh_verify: %s/%s permission failure, acc=%x, error=%d\n", | 268 | dprintk("fh_verify: %s/%s permission failure, " |
273 | dentry->d_parent->d_name.name, dentry->d_name.name, access, (error >> 24)); | 269 | "acc=%x, error=%d\n", |
270 | dentry->d_parent->d_name.name, | ||
271 | dentry->d_name.name, | ||
272 | access, ntohl(error)); | ||
274 | } | 273 | } |
275 | #endif | ||
276 | out: | 274 | out: |
277 | if (exp && !IS_ERR(exp)) | 275 | if (exp && !IS_ERR(exp)) |
278 | exp_put(exp); | 276 | exp_put(exp); |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 5d32e5fa697e..8283236c6a0f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -59,7 +59,6 @@ | |||
59 | #include <asm/uaccess.h> | 59 | #include <asm/uaccess.h> |
60 | 60 | ||
61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP | 61 | #define NFSDDBG_FACILITY NFSDDBG_FILEOP |
62 | #define NFSD_PARANOIA | ||
63 | 62 | ||
64 | 63 | ||
65 | /* We must ignore files (but only files) which might have mandatory | 64 | /* We must ignore files (but only files) which might have mandatory |
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index 7b2c8f4f6a6f..629e7abdd840 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
@@ -92,10 +92,12 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) | |||
92 | ofs = 0; | 92 | ofs = 0; |
93 | if (file_ofs < init_size) | 93 | if (file_ofs < init_size) |
94 | ofs = init_size - file_ofs; | 94 | ofs = init_size - file_ofs; |
95 | local_irq_save(flags); | ||
95 | kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); | 96 | kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); |
96 | memset(kaddr + bh_offset(bh) + ofs, 0, | 97 | memset(kaddr + bh_offset(bh) + ofs, 0, |
97 | bh->b_size - ofs); | 98 | bh->b_size - ofs); |
98 | kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); | 99 | kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); |
100 | local_irq_restore(flags); | ||
99 | flush_dcache_page(page); | 101 | flush_dcache_page(page); |
100 | } | 102 | } |
101 | } else { | 103 | } else { |
@@ -143,11 +145,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) | |||
143 | recs = PAGE_CACHE_SIZE / rec_size; | 145 | recs = PAGE_CACHE_SIZE / rec_size; |
144 | /* Should have been verified before we got here... */ | 146 | /* Should have been verified before we got here... */ |
145 | BUG_ON(!recs); | 147 | BUG_ON(!recs); |
148 | local_irq_save(flags); | ||
146 | kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); | 149 | kaddr = kmap_atomic(page, KM_BIO_SRC_IRQ); |
147 | for (i = 0; i < recs; i++) | 150 | for (i = 0; i < recs; i++) |
148 | post_read_mst_fixup((NTFS_RECORD*)(kaddr + | 151 | post_read_mst_fixup((NTFS_RECORD*)(kaddr + |
149 | i * rec_size), rec_size); | 152 | i * rec_size), rec_size); |
150 | kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); | 153 | kunmap_atomic(kaddr, KM_BIO_SRC_IRQ); |
154 | local_irq_restore(flags); | ||
151 | flush_dcache_page(page); | 155 | flush_dcache_page(page); |
152 | if (likely(page_uptodate && !PageError(page))) | 156 | if (likely(page_uptodate && !PageError(page))) |
153 | SetPageUptodate(page); | 157 | SetPageUptodate(page); |
diff --git a/fs/proc/base.c b/fs/proc/base.c index ff7a66850602..1a979ea3b379 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2328,13 +2328,23 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi | |||
2328 | { | 2328 | { |
2329 | struct dentry *dentry = filp->f_path.dentry; | 2329 | struct dentry *dentry = filp->f_path.dentry; |
2330 | struct inode *inode = dentry->d_inode; | 2330 | struct inode *inode = dentry->d_inode; |
2331 | struct task_struct *leader = get_proc_task(inode); | 2331 | struct task_struct *leader = NULL; |
2332 | struct task_struct *task; | 2332 | struct task_struct *task; |
2333 | int retval = -ENOENT; | 2333 | int retval = -ENOENT; |
2334 | ino_t ino; | 2334 | ino_t ino; |
2335 | int tid; | 2335 | int tid; |
2336 | unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */ | 2336 | unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */ |
2337 | 2337 | ||
2338 | task = get_proc_task(inode); | ||
2339 | if (!task) | ||
2340 | goto out_no_task; | ||
2341 | rcu_read_lock(); | ||
2342 | if (pid_alive(task)) { | ||
2343 | leader = task->group_leader; | ||
2344 | get_task_struct(leader); | ||
2345 | } | ||
2346 | rcu_read_unlock(); | ||
2347 | put_task_struct(task); | ||
2338 | if (!leader) | 2348 | if (!leader) |
2339 | goto out_no_task; | 2349 | goto out_no_task; |
2340 | retval = 0; | 2350 | retval = 0; |
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c index 2e0021e8f366..638f4c585e89 100644 --- a/fs/ufs/balloc.c +++ b/fs/ufs/balloc.c | |||
@@ -227,24 +227,27 @@ failed: | |||
227 | * We can come here from ufs_writepage or ufs_prepare_write, | 227 | * We can come here from ufs_writepage or ufs_prepare_write, |
228 | * locked_page is argument of these functions, so we already lock it. | 228 | * locked_page is argument of these functions, so we already lock it. |
229 | */ | 229 | */ |
230 | static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, | 230 | static void ufs_change_blocknr(struct inode *inode, unsigned int beg, |
231 | unsigned int count, unsigned int oldb, | 231 | unsigned int count, unsigned int oldb, |
232 | unsigned int newb, struct page *locked_page) | 232 | unsigned int newb, struct page *locked_page) |
233 | { | 233 | { |
234 | unsigned int blk_per_page = 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits); | 234 | const unsigned mask = (1 << (PAGE_CACHE_SHIFT - inode->i_blkbits)) - 1; |
235 | struct address_space *mapping = inode->i_mapping; | 235 | struct address_space * const mapping = inode->i_mapping; |
236 | pgoff_t index, cur_index = locked_page->index; | 236 | pgoff_t index, cur_index; |
237 | unsigned int i, j; | 237 | unsigned end, pos, j; |
238 | struct page *page; | 238 | struct page *page; |
239 | struct buffer_head *head, *bh; | 239 | struct buffer_head *head, *bh; |
240 | 240 | ||
241 | UFSD("ENTER, ino %lu, count %u, oldb %u, newb %u\n", | 241 | UFSD("ENTER, ino %lu, count %u, oldb %u, newb %u\n", |
242 | inode->i_ino, count, oldb, newb); | 242 | inode->i_ino, count, oldb, newb); |
243 | 243 | ||
244 | BUG_ON(!locked_page); | ||
244 | BUG_ON(!PageLocked(locked_page)); | 245 | BUG_ON(!PageLocked(locked_page)); |
245 | 246 | ||
246 | for (i = 0; i < count; i += blk_per_page) { | 247 | cur_index = locked_page->index; |
247 | index = (baseblk+i) >> (PAGE_CACHE_SHIFT - inode->i_blkbits); | 248 | |
249 | for (end = count + beg; beg < end; beg = (beg | mask) + 1) { | ||
250 | index = beg >> (PAGE_CACHE_SHIFT - inode->i_blkbits); | ||
248 | 251 | ||
249 | if (likely(cur_index != index)) { | 252 | if (likely(cur_index != index)) { |
250 | page = ufs_get_locked_page(mapping, index); | 253 | page = ufs_get_locked_page(mapping, index); |
@@ -253,21 +256,32 @@ static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, | |||
253 | } else | 256 | } else |
254 | page = locked_page; | 257 | page = locked_page; |
255 | 258 | ||
256 | j = i; | ||
257 | head = page_buffers(page); | 259 | head = page_buffers(page); |
258 | bh = head; | 260 | bh = head; |
261 | pos = beg & mask; | ||
262 | for (j = 0; j < pos; ++j) | ||
263 | bh = bh->b_this_page; | ||
264 | j = 0; | ||
259 | do { | 265 | do { |
260 | if (likely(bh->b_blocknr == j + oldb && j < count)) { | 266 | if (buffer_mapped(bh)) { |
261 | unmap_underlying_metadata(bh->b_bdev, | 267 | pos = bh->b_blocknr - oldb; |
262 | bh->b_blocknr); | 268 | if (pos < count) { |
263 | bh->b_blocknr = newb + j++; | 269 | UFSD(" change from %llu to %llu\n", |
264 | mark_buffer_dirty(bh); | 270 | (unsigned long long)pos + oldb, |
271 | (unsigned long long)pos + newb); | ||
272 | bh->b_blocknr = newb + pos; | ||
273 | unmap_underlying_metadata(bh->b_bdev, | ||
274 | bh->b_blocknr); | ||
275 | mark_buffer_dirty(bh); | ||
276 | ++j; | ||
277 | } | ||
265 | } | 278 | } |
266 | 279 | ||
267 | bh = bh->b_this_page; | 280 | bh = bh->b_this_page; |
268 | } while (bh != head); | 281 | } while (bh != head); |
269 | 282 | ||
270 | set_page_dirty(page); | 283 | if (j) |
284 | set_page_dirty(page); | ||
271 | 285 | ||
272 | if (likely(cur_index != index)) | 286 | if (likely(cur_index != index)) |
273 | ufs_put_locked_page(page); | 287 | ufs_put_locked_page(page); |
@@ -415,14 +429,14 @@ unsigned ufs_new_fragments(struct inode * inode, __fs32 * p, unsigned fragment, | |||
415 | } | 429 | } |
416 | result = ufs_alloc_fragments (inode, cgno, goal, request, err); | 430 | result = ufs_alloc_fragments (inode, cgno, goal, request, err); |
417 | if (result) { | 431 | if (result) { |
432 | ufs_clear_frags(inode, result + oldcount, newcount - oldcount, | ||
433 | locked_page != NULL); | ||
418 | ufs_change_blocknr(inode, fragment - oldcount, oldcount, tmp, | 434 | ufs_change_blocknr(inode, fragment - oldcount, oldcount, tmp, |
419 | result, locked_page); | 435 | result, locked_page); |
420 | 436 | ||
421 | *p = cpu_to_fs32(sb, result); | 437 | *p = cpu_to_fs32(sb, result); |
422 | *err = 0; | 438 | *err = 0; |
423 | UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); | 439 | UFS_I(inode)->i_lastfrag = max_t(u32, UFS_I(inode)->i_lastfrag, fragment + count); |
424 | ufs_clear_frags(inode, result + oldcount, newcount - oldcount, | ||
425 | locked_page != NULL); | ||
426 | unlock_super(sb); | 440 | unlock_super(sb); |
427 | if (newcount < request) | 441 | if (newcount < request) |
428 | ufs_free_fragments (inode, result + newcount, request - newcount); | 442 | ufs_free_fragments (inode, result + newcount, request - newcount); |
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 2fbab0aab688..4295ca91cf85 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c | |||
@@ -242,7 +242,8 @@ repeat: | |||
242 | goal = tmp + uspi->s_fpb; | 242 | goal = tmp + uspi->s_fpb; |
243 | tmp = ufs_new_fragments (inode, p, fragment - blockoff, | 243 | tmp = ufs_new_fragments (inode, p, fragment - blockoff, |
244 | goal, required + blockoff, | 244 | goal, required + blockoff, |
245 | err, locked_page); | 245 | err, |
246 | phys != NULL ? locked_page : NULL); | ||
246 | } | 247 | } |
247 | /* | 248 | /* |
248 | * We will extend last allocated block | 249 | * We will extend last allocated block |
@@ -250,7 +251,7 @@ repeat: | |||
250 | else if (lastblock == block) { | 251 | else if (lastblock == block) { |
251 | tmp = ufs_new_fragments(inode, p, fragment - (blockoff - lastblockoff), | 252 | tmp = ufs_new_fragments(inode, p, fragment - (blockoff - lastblockoff), |
252 | fs32_to_cpu(sb, *p), required + (blockoff - lastblockoff), | 253 | fs32_to_cpu(sb, *p), required + (blockoff - lastblockoff), |
253 | err, locked_page); | 254 | err, phys != NULL ? locked_page : NULL); |
254 | } else /* (lastblock > block) */ { | 255 | } else /* (lastblock > block) */ { |
255 | /* | 256 | /* |
256 | * We will allocate new block before last allocated block | 257 | * We will allocate new block before last allocated block |
@@ -261,7 +262,8 @@ repeat: | |||
261 | goal = tmp + uspi->s_fpb; | 262 | goal = tmp + uspi->s_fpb; |
262 | } | 263 | } |
263 | tmp = ufs_new_fragments(inode, p, fragment - blockoff, | 264 | tmp = ufs_new_fragments(inode, p, fragment - blockoff, |
264 | goal, uspi->s_fpb, err, locked_page); | 265 | goal, uspi->s_fpb, err, |
266 | phys != NULL ? locked_page : NULL); | ||
265 | } | 267 | } |
266 | if (!tmp) { | 268 | if (!tmp) { |
267 | if ((!blockoff && *p) || | 269 | if ((!blockoff && *p) || |
@@ -438,9 +440,11 @@ int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head | |||
438 | * it much more readable: | 440 | * it much more readable: |
439 | */ | 441 | */ |
440 | #define GET_INODE_DATABLOCK(x) \ | 442 | #define GET_INODE_DATABLOCK(x) \ |
441 | ufs_inode_getfrag(inode, x, fragment, 1, &err, &phys, &new, bh_result->b_page) | 443 | ufs_inode_getfrag(inode, x, fragment, 1, &err, &phys, &new,\ |
444 | bh_result->b_page) | ||
442 | #define GET_INODE_PTR(x) \ | 445 | #define GET_INODE_PTR(x) \ |
443 | ufs_inode_getfrag(inode, x, fragment, uspi->s_fpb, &err, NULL, NULL, NULL) | 446 | ufs_inode_getfrag(inode, x, fragment, uspi->s_fpb, &err, NULL, NULL,\ |
447 | bh_result->b_page) | ||
444 | #define GET_INDIRECT_DATABLOCK(x) \ | 448 | #define GET_INDIRECT_DATABLOCK(x) \ |
445 | ufs_inode_getblock(inode, bh, x, fragment, \ | 449 | ufs_inode_getblock(inode, bh, x, fragment, \ |
446 | &err, &phys, &new, bh_result->b_page) | 450 | &err, &phys, &new, bh_result->b_page) |
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index ea11d04c41a0..0437b0a6fe97 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c | |||
@@ -109,10 +109,10 @@ static int ufs_trunc_direct (struct inode * inode) | |||
109 | tmp = fs32_to_cpu(sb, *p); | 109 | tmp = fs32_to_cpu(sb, *p); |
110 | if (!tmp ) | 110 | if (!tmp ) |
111 | ufs_panic (sb, "ufs_trunc_direct", "internal error"); | 111 | ufs_panic (sb, "ufs_trunc_direct", "internal error"); |
112 | frag2 -= frag1; | ||
112 | frag1 = ufs_fragnum (frag1); | 113 | frag1 = ufs_fragnum (frag1); |
113 | frag2 = ufs_fragnum (frag2); | ||
114 | 114 | ||
115 | ufs_free_fragments (inode, tmp + frag1, frag2 - frag1); | 115 | ufs_free_fragments(inode, tmp + frag1, frag2); |
116 | mark_inode_dirty(inode); | 116 | mark_inode_dirty(inode); |
117 | frag_to_free = tmp + frag1; | 117 | frag_to_free = tmp + frag1; |
118 | 118 | ||
diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h index 57e09f5e3424..75a1aff5b57b 100644 --- a/include/asm-alpha/dma-mapping.h +++ b/include/asm-alpha/dma-mapping.h | |||
@@ -41,9 +41,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
41 | #define dma_map_single(dev, va, size, dir) virt_to_phys(va) | 41 | #define dma_map_single(dev, va, size, dir) virt_to_phys(va) |
42 | #define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off) | 42 | #define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off) |
43 | 43 | ||
44 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 44 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) |
45 | #define dma_unmap_page(dev, addr, size, dir) do { } while (0) | 45 | #define dma_unmap_page(dev, addr, size, dir) ((void)0) |
46 | #define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) | 46 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) |
47 | 47 | ||
48 | #define dma_mapping_error(addr) (0) | 48 | #define dma_mapping_error(addr) (0) |
49 | 49 | ||
@@ -55,12 +55,14 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
55 | 55 | ||
56 | int dma_set_mask(struct device *dev, u64 mask); | 56 | int dma_set_mask(struct device *dev, u64 mask); |
57 | 57 | ||
58 | #define dma_sync_single_for_cpu(dev, addr, size, dir) do { } while (0) | 58 | #define dma_sync_single_for_cpu(dev, addr, size, dir) ((void)0) |
59 | #define dma_sync_single_for_device(dev, addr, size, dir) do { } while (0) | 59 | #define dma_sync_single_for_device(dev, addr, size, dir) ((void)0) |
60 | #define dma_sync_single_range(dev, addr, off, size, dir) do { } while (0) | 60 | #define dma_sync_single_range(dev, addr, off, size, dir) ((void)0) |
61 | #define dma_sync_sg_for_cpu(dev, sg, nents, dir) do { } while (0) | 61 | #define dma_sync_sg_for_cpu(dev, sg, nents, dir) ((void)0) |
62 | #define dma_sync_sg_for_device(dev, sg, nents, dir) do { } while (0) | 62 | #define dma_sync_sg_for_device(dev, sg, nents, dir) ((void)0) |
63 | #define dma_cache_sync(dev, va, size, dir) do { } while (0) | 63 | #define dma_cache_sync(dev, va, size, dir) ((void)0) |
64 | #define dma_sync_single_range_for_cpu(dev, addr, offset, size, dir) ((void)0) | ||
65 | #define dma_sync_single_range_for_device(dev, addr, offset, size, dir) ((void)0) | ||
64 | 66 | ||
65 | #define dma_get_cache_alignment() L1_CACHE_BYTES | 67 | #define dma_get_cache_alignment() L1_CACHE_BYTES |
66 | 68 | ||
diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h index 84313d14e780..e58a427012dd 100644 --- a/include/asm-alpha/unistd.h +++ b/include/asm-alpha/unistd.h | |||
@@ -342,9 +342,14 @@ | |||
342 | #define __NR_io_cancel 402 | 342 | #define __NR_io_cancel 402 |
343 | #define __NR_exit_group 405 | 343 | #define __NR_exit_group 405 |
344 | #define __NR_lookup_dcookie 406 | 344 | #define __NR_lookup_dcookie 406 |
345 | #define __NR_sys_epoll_create 407 | 345 | #define __NR_epoll_create 407 |
346 | #define __NR_sys_epoll_ctl 408 | 346 | #define __NR_epoll_ctl 408 |
347 | #define __NR_sys_epoll_wait 409 | 347 | #define __NR_epoll_wait 409 |
348 | /* Feb 2007: These three sys_epoll defines shouldn't be here but culling | ||
349 | * them would break userspace apps ... we'll kill them off in 2010 :) */ | ||
350 | #define __NR_sys_epoll_create __NR_epoll_create | ||
351 | #define __NR_sys_epoll_ctl __NR_epoll_ctl | ||
352 | #define __NR_sys_epoll_wait __NR_epoll_wait | ||
348 | #define __NR_remap_file_pages 410 | 353 | #define __NR_remap_file_pages 410 |
349 | #define __NR_set_tid_address 411 | 354 | #define __NR_set_tid_address 411 |
350 | #define __NR_restart_syscall 412 | 355 | #define __NR_restart_syscall 412 |
diff --git a/include/asm-arm/arch-at91rm9200/at91_ecc.h b/include/asm-arm/arch-at91rm9200/at91_ecc.h index fddf256a98d3..5c564ede5c5d 100644 --- a/include/asm-arm/arch-at91rm9200/at91_ecc.h +++ b/include/asm-arm/arch-at91rm9200/at91_ecc.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define AT91_ECC_H | 14 | #define AT91_ECC_H |
15 | 15 | ||
16 | #define AT91_ECC_CR (AT91_ECC + 0x00) /* Control register */ | 16 | #define AT91_ECC_CR (AT91_ECC + 0x00) /* Control register */ |
17 | #define AT91_ECC_RST (1 << 0) /* Reset parity */ | 17 | #define AT91_ECC_RST (1 << 0) /* Reset parity */ |
18 | 18 | ||
19 | #define AT91_ECC_MR (AT91_ECC + 0x04) /* Mode register */ | 19 | #define AT91_ECC_MR (AT91_ECC + 0x04) /* Mode register */ |
20 | #define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */ | 20 | #define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */ |
@@ -23,16 +23,16 @@ | |||
23 | #define AT91_ECC_PAGESIZE_2112 (2) | 23 | #define AT91_ECC_PAGESIZE_2112 (2) |
24 | #define AT91_ECC_PAGESIZE_4224 (3) | 24 | #define AT91_ECC_PAGESIZE_4224 (3) |
25 | 25 | ||
26 | #define AT91_ECC_SR (AT91_ECC + 0x08) /* Status register */ | 26 | #define AT91_ECC_SR (AT91_ECC + 0x08) /* Status register */ |
27 | #define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */ | 27 | #define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */ |
28 | #define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */ | 28 | #define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */ |
29 | #define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */ | 29 | #define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */ |
30 | 30 | ||
31 | #define AT91_ECC_PR (AT91_ECC + 0x0c) /* Parity register */ | 31 | #define AT91_ECC_PR (AT91_ECC + 0x0c) /* Parity register */ |
32 | #define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */ | 32 | #define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */ |
33 | #define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */ | 33 | #define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */ |
34 | 34 | ||
35 | #define AT91_ECC_NPR (AT91_ECC + 0x10) /* NParity register */ | 35 | #define AT91_ECC_NPR (AT91_ECC + 0x10) /* NParity register */ |
36 | #define AT91_ECC_NPARITY (0xffff << 0) /* NParity */ | 36 | #define AT91_ECC_NPARITY (0xffff << 0) /* NParity */ |
37 | 37 | ||
38 | #endif | 38 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pmc.h b/include/asm-arm/arch-at91rm9200/at91_pmc.h index de8c3da74a01..c3b489d09b6c 100644 --- a/include/asm-arm/arch-at91rm9200/at91_pmc.h +++ b/include/asm-arm/arch-at91rm9200/at91_pmc.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define AT91_PMC_CSS_PLLA (2 << 0) | 61 | #define AT91_PMC_CSS_PLLA (2 << 0) |
62 | #define AT91_PMC_CSS_PLLB (3 << 0) | 62 | #define AT91_PMC_CSS_PLLB (3 << 0) |
63 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ | 63 | #define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */ |
64 | #define AT91_PMC_PRES_1 (0 << 2) | 64 | #define AT91_PMC_PRES_1 (0 << 2) |
65 | #define AT91_PMC_PRES_2 (1 << 2) | 65 | #define AT91_PMC_PRES_2 (1 << 2) |
66 | #define AT91_PMC_PRES_4 (2 << 2) | 66 | #define AT91_PMC_PRES_4 (2 << 2) |
67 | #define AT91_PMC_PRES_8 (3 << 2) | 67 | #define AT91_PMC_PRES_8 (3 << 2) |
diff --git a/include/asm-arm/arch-at91rm9200/at91_rstc.h b/include/asm-arm/arch-at91rm9200/at91_rstc.h index ccdc52da973d..237d3c40b318 100644 --- a/include/asm-arm/arch-at91rm9200/at91_rstc.h +++ b/include/asm-arm/arch-at91rm9200/at91_rstc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */ | 17 | #define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */ |
18 | #define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */ | 18 | #define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */ |
19 | #define AT91_RSTC_EXTRST (1 << 3) /* External Reset */ | 19 | #define AT91_RSTC_EXTRST (1 << 3) /* External Reset */ |
20 | #define AT01_RSTC_KEY (0xff << 24) /* KEY Password */ | 20 | #define AT91_RSTC_KEY (0xff << 24) /* KEY Password */ |
21 | 21 | ||
22 | #define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */ | 22 | #define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */ |
23 | #define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */ | 23 | #define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_rtc.h b/include/asm-arm/arch-at91rm9200/at91_rtc.h index 6e5065d56260..095fe0883102 100644 --- a/include/asm-arm/arch-at91rm9200/at91_rtc.h +++ b/include/asm-arm/arch-at91rm9200/at91_rtc.h | |||
@@ -21,21 +21,21 @@ | |||
21 | #define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */ | 21 | #define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */ |
22 | #define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */ | 22 | #define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */ |
23 | #define AT91_RTC_TIMEVSEL_MINUTE (0 << 8) | 23 | #define AT91_RTC_TIMEVSEL_MINUTE (0 << 8) |
24 | #define AT91_RTC_TIMEVSEL_HOUR (1 << 8) | 24 | #define AT91_RTC_TIMEVSEL_HOUR (1 << 8) |
25 | #define AT91_RTC_TIMEVSEL_DAY24 (2 << 8) | 25 | #define AT91_RTC_TIMEVSEL_DAY24 (2 << 8) |
26 | #define AT91_RTC_TIMEVSEL_DAY12 (3 << 8) | 26 | #define AT91_RTC_TIMEVSEL_DAY12 (3 << 8) |
27 | #define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */ | 27 | #define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */ |
28 | #define AT91_RTC_CALEVSEL_WEEK (0 << 16) | 28 | #define AT91_RTC_CALEVSEL_WEEK (0 << 16) |
29 | #define AT91_RTC_CALEVSEL_MONTH (1 << 16) | 29 | #define AT91_RTC_CALEVSEL_MONTH (1 << 16) |
30 | #define AT91_RTC_CALEVSEL_YEAR (2 << 16) | 30 | #define AT91_RTC_CALEVSEL_YEAR (2 << 16) |
31 | 31 | ||
32 | #define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */ | 32 | #define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */ |
33 | #define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */ | 33 | #define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */ |
34 | 34 | ||
35 | #define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */ | 35 | #define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */ |
36 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ | 36 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ |
37 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ | 37 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ |
38 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ | 38 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ |
39 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ | 39 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ |
40 | 40 | ||
41 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ | 41 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200.h b/include/asm-arm/arch-at91rm9200/at91rm9200.h index 4d51177efddd..c569b6a21a42 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200.h +++ b/include/asm-arm/arch-at91rm9200/at91rm9200.h | |||
@@ -274,7 +274,7 @@ | |||
274 | #define AT91_PD19_TPK7 (1 << 19) /* B: ETM Trace Packet Port 7 */ | 274 | #define AT91_PD19_TPK7 (1 << 19) /* B: ETM Trace Packet Port 7 */ |
275 | #define AT91_PD20_NPCS3 (1 << 20) /* A: SPI Peripheral Chip Select 3 */ | 275 | #define AT91_PD20_NPCS3 (1 << 20) /* A: SPI Peripheral Chip Select 3 */ |
276 | #define AT91_PD20_TPK8 (1 << 20) /* B: ETM Trace Packet Port 8 */ | 276 | #define AT91_PD20_TPK8 (1 << 20) /* B: ETM Trace Packet Port 8 */ |
277 | #define AT91_PD21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */ | 277 | #define AT91_PD21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */ |
278 | #define AT91_PD21_TPK9 (1 << 21) /* B: ETM Trace Packet Port 9 */ | 278 | #define AT91_PD21_TPK9 (1 << 21) /* B: ETM Trace Packet Port 9 */ |
279 | #define AT91_PD22_RTS1 (1 << 22) /* A: USART Ready To Send 1 */ | 279 | #define AT91_PD22_RTS1 (1 << 22) /* A: USART Ready To Send 1 */ |
280 | #define AT91_PD22_TPK10 (1 << 22) /* B: ETM Trace Packet Port 10 */ | 280 | #define AT91_PD22_TPK10 (1 << 22) /* B: ETM Trace Packet Port 10 */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h b/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h index 746d973705bf..78f6b4917b8b 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h +++ b/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | 58 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ |
59 | 59 | ||
60 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */ | 60 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */ |
61 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | 61 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ |
62 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | 62 | #define AT91_MATRIX_CS1A_SMC (0 << 1) |
63 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | 63 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) |
64 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | 64 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h b/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h index 270a5dcdf1cd..ec88efabbe6c 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h +++ b/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #define AT91_MATRIX_MCFG (AT91_MATRIX + 0x00) /* Master Configuration Register */ | 16 | #define AT91_MATRIX_MCFG (AT91_MATRIX + 0x00) /* Master Configuration Register */ |
17 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | 17 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ |
18 | #define AT01_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | 18 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ |
19 | 19 | ||
20 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x04) /* Slave Configuration Register 0 */ | 20 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x04) /* Slave Configuration Register 0 */ |
21 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x08) /* Slave Configuration Register 1 */ | 21 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x08) /* Slave Configuration Register 1 */ |
@@ -43,8 +43,8 @@ | |||
43 | 43 | ||
44 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x30) /* EBI Chip Select Assignment Register */ | 44 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x30) /* EBI Chip Select Assignment Register */ |
45 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | 45 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ |
46 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | 46 | #define AT91_MATRIX_CS1A_SMC (0 << 1) |
47 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | 47 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) |
48 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | 48 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ |
49 | #define AT91_MATRIX_CS3A_SMC (0 << 3) | 49 | #define AT91_MATRIX_CS3A_SMC (0 << 3) |
50 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) | 50 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h b/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h index 7d94968b5d57..972e7531c7f4 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h +++ b/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h | |||
@@ -33,14 +33,14 @@ | |||
33 | #define AT91_SDRAMC_NC_9 (1 << 0) | 33 | #define AT91_SDRAMC_NC_9 (1 << 0) |
34 | #define AT91_SDRAMC_NC_10 (2 << 0) | 34 | #define AT91_SDRAMC_NC_10 (2 << 0) |
35 | #define AT91_SDRAMC_NC_11 (3 << 0) | 35 | #define AT91_SDRAMC_NC_11 (3 << 0) |
36 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | 36 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ |
37 | #define AT91_SDRAMC_NR_11 (0 << 2) | 37 | #define AT91_SDRAMC_NR_11 (0 << 2) |
38 | #define AT91_SDRAMC_NR_12 (1 << 2) | 38 | #define AT91_SDRAMC_NR_12 (1 << 2) |
39 | #define AT91_SDRAMC_NR_13 (2 << 2) | 39 | #define AT91_SDRAMC_NR_13 (2 << 2) |
40 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | 40 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ |
41 | #define AT91_SDRAMC_NB_2 (0 << 4) | 41 | #define AT91_SDRAMC_NB_2 (0 << 4) |
42 | #define AT91_SDRAMC_NB_4 (1 << 4) | 42 | #define AT91_SDRAMC_NB_4 (1 << 4) |
43 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | 43 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ |
44 | #define AT91_SDRAMC_CAS_1 (1 << 5) | 44 | #define AT91_SDRAMC_CAS_1 (1 << 5) |
45 | #define AT91_SDRAMC_CAS_2 (2 << 5) | 45 | #define AT91_SDRAMC_CAS_2 (2 << 5) |
46 | #define AT91_SDRAMC_CAS_3 (3 << 5) | 46 | #define AT91_SDRAMC_CAS_3 (3 << 5) |
@@ -110,10 +110,10 @@ | |||
110 | #define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | 110 | #define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ |
111 | #define AT91_SMC_READMODE (1 << 0) /* Read Mode */ | 111 | #define AT91_SMC_READMODE (1 << 0) /* Read Mode */ |
112 | #define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */ | 112 | #define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */ |
113 | #define AT91_SMC_EXNWMODE (3 << 5) /* NWAIT Mode */ | 113 | #define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */ |
114 | #define AT91_SMC_EXNWMODE_DISABLE (0 << 5) | 114 | #define AT91_SMC_EXNWMODE_DISABLE (0 << 4) |
115 | #define AT91_SMC_EXNWMODE_FROZEN (2 << 5) | 115 | #define AT91_SMC_EXNWMODE_FROZEN (2 << 4) |
116 | #define AT91_SMC_EXNWMODE_READY (3 << 5) | 116 | #define AT91_SMC_EXNWMODE_READY (3 << 4) |
117 | #define AT91_SMC_BAT (1 << 8) /* Byte Access Type */ | 117 | #define AT91_SMC_BAT (1 << 8) /* Byte Access Type */ |
118 | #define AT91_SMC_BAT_SELECT (0 << 8) | 118 | #define AT91_SMC_BAT_SELECT (0 << 8) |
119 | #define AT91_SMC_BAT_WRITE (1 << 8) | 119 | #define AT91_SMC_BAT_WRITE (1 << 8) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index b2893e32a236..eae91694edcd 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -52,10 +52,10 @@ | |||
52 | /* general configuration options */ | 52 | /* general configuration options */ |
53 | 53 | ||
54 | #define S3C2410_GPIO_LEAVE (0xFFFFFFFF) | 54 | #define S3C2410_GPIO_LEAVE (0xFFFFFFFF) |
55 | #define S3C2410_GPIO_INPUT (0xFFFFFFF0) | 55 | #define S3C2410_GPIO_INPUT (0xFFFFFFF0) /* not available on A */ |
56 | #define S3C2410_GPIO_OUTPUT (0xFFFFFFF1) | 56 | #define S3C2410_GPIO_OUTPUT (0xFFFFFFF1) |
57 | #define S3C2410_GPIO_IRQ (0xFFFFFFF2) /* not available for all */ | 57 | #define S3C2410_GPIO_IRQ (0xFFFFFFF2) /* not available for all */ |
58 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ | 58 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* bank A => addr/cs/nand */ |
59 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ | 59 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ |
60 | 60 | ||
61 | /* register address for the GPIO registers. | 61 | /* register address for the GPIO registers. |
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index 375dca50364e..e4d82341f7ba 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
@@ -133,10 +133,10 @@ | |||
133 | #define S3C2410_BANKCON_SDRAM (0x3 << 15) | 133 | #define S3C2410_BANKCON_SDRAM (0x3 << 15) |
134 | 134 | ||
135 | /* next bits only for EDO DRAM in 6,7 */ | 135 | /* next bits only for EDO DRAM in 6,7 */ |
136 | #define S3C2400_BANKCON_EDO_Trdc1 (0x00 << 4) | 136 | #define S3C2400_BANKCON_EDO_Trcd1 (0x00 << 4) |
137 | #define S3C2400_BANKCON_EDO_Trdc2 (0x01 << 4) | 137 | #define S3C2400_BANKCON_EDO_Trcd2 (0x01 << 4) |
138 | #define S3C2400_BANKCON_EDO_Trdc3 (0x02 << 4) | 138 | #define S3C2400_BANKCON_EDO_Trcd3 (0x02 << 4) |
139 | #define S3C2400_BANKCON_EDO_Trdc4 (0x03 << 4) | 139 | #define S3C2400_BANKCON_EDO_Trcd4 (0x03 << 4) |
140 | 140 | ||
141 | /* CAS pulse width */ | 141 | /* CAS pulse width */ |
142 | #define S3C2400_BANKCON_EDO_PULSE1 (0x00 << 3) | 142 | #define S3C2400_BANKCON_EDO_PULSE1 (0x00 << 3) |
@@ -153,9 +153,9 @@ | |||
153 | #define S3C2400_BANKCON_EDO_SCANb11 (0x03 << 0) | 153 | #define S3C2400_BANKCON_EDO_SCANb11 (0x03 << 0) |
154 | 154 | ||
155 | /* next bits only for SDRAM in 6,7 */ | 155 | /* next bits only for SDRAM in 6,7 */ |
156 | #define S3C2410_BANKCON_Trdc2 (0x00 << 2) | 156 | #define S3C2410_BANKCON_Trcd2 (0x00 << 2) |
157 | #define S3C2410_BANKCON_Trdc3 (0x01 << 2) | 157 | #define S3C2410_BANKCON_Trcd3 (0x01 << 2) |
158 | #define S3C2410_BANKCON_Trdc4 (0x02 << 2) | 158 | #define S3C2410_BANKCON_Trcd4 (0x02 << 2) |
159 | 159 | ||
160 | /* control column address select */ | 160 | /* control column address select */ |
161 | #define S3C2410_BANKCON_SCANb8 (0x00 << 0) | 161 | #define S3C2410_BANKCON_SCANb8 (0x00 << 0) |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 6af4e6bd1290..f31cda5a55ee 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -35,6 +35,9 @@ struct vfp_hard_struct { | |||
35 | */ | 35 | */ |
36 | __u32 fpinst; | 36 | __u32 fpinst; |
37 | __u32 fpinst2; | 37 | __u32 fpinst2; |
38 | #ifdef CONFIG_SMP | ||
39 | __u32 cpu; | ||
40 | #endif | ||
38 | }; | 41 | }; |
39 | 42 | ||
40 | union vfp_state { | 43 | union vfp_state { |
diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild index c68e1680da01..966a9836d556 100644 --- a/include/asm-frv/Kbuild +++ b/include/asm-frv/Kbuild | |||
@@ -1 +1,7 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | header-y += registers.h | ||
4 | |||
5 | unifdef-y += termios.h | ||
6 | unifdef-y += ptrace.h | ||
7 | unifdef-y += page.h | ||
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index 134cc0cdf6c2..213d92fd652a 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h | |||
@@ -76,8 +76,6 @@ extern unsigned long max_pfn; | |||
76 | 76 | ||
77 | #endif /* __ASSEMBLY__ */ | 77 | #endif /* __ASSEMBLY__ */ |
78 | 78 | ||
79 | #endif /* __KERNEL__ */ | ||
80 | |||
81 | #ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC | 79 | #ifdef CONFIG_CONTIGUOUS_PAGE_ALLOC |
82 | #define WANT_PAGE_VIRTUAL 1 | 80 | #define WANT_PAGE_VIRTUAL 1 |
83 | #endif | 81 | #endif |
@@ -85,4 +83,6 @@ extern unsigned long max_pfn; | |||
85 | #include <asm-generic/memory_model.h> | 83 | #include <asm-generic/memory_model.h> |
86 | #include <asm-generic/page.h> | 84 | #include <asm-generic/page.h> |
87 | 85 | ||
86 | #endif /* __KERNEL__ */ | ||
87 | |||
88 | #endif /* _ASM_PAGE_H */ | 88 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h index 9a2241b8eb1e..cf6934012b64 100644 --- a/include/asm-frv/ptrace.h +++ b/include/asm-frv/ptrace.h | |||
@@ -12,9 +12,11 @@ | |||
12 | #define _ASM_PTRACE_H | 12 | #define _ASM_PTRACE_H |
13 | 13 | ||
14 | #include <asm/registers.h> | 14 | #include <asm/registers.h> |
15 | #ifdef __KERNEL__ | ||
15 | #include <asm/irq_regs.h> | 16 | #include <asm/irq_regs.h> |
16 | 17 | ||
17 | #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) | 18 | #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0) |
19 | #endif | ||
18 | 20 | ||
19 | 21 | ||
20 | #define PT_PSR 0 | 22 | #define PT_PSR 0 |
@@ -60,6 +62,7 @@ | |||
60 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | 62 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ |
61 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | 63 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ |
62 | 64 | ||
65 | #ifdef __KERNEL__ | ||
63 | #ifndef __ASSEMBLY__ | 66 | #ifndef __ASSEMBLY__ |
64 | 67 | ||
65 | /* | 68 | /* |
@@ -74,6 +77,7 @@ register struct pt_regs *__frame asm("gr28"); | |||
74 | extern unsigned long user_stack(const struct pt_regs *); | 77 | extern unsigned long user_stack(const struct pt_regs *); |
75 | extern void show_regs(struct pt_regs *); | 78 | extern void show_regs(struct pt_regs *); |
76 | #define profile_pc(regs) ((regs)->pc) | 79 | #define profile_pc(regs) ((regs)->pc) |
80 | #endif | ||
77 | 81 | ||
78 | #endif /* !__ASSEMBLY__ */ | 82 | #endif /* !__ASSEMBLY__ */ |
79 | #endif /* _ASM_PTRACE_H */ | 83 | #endif /* _ASM_PTRACE_H */ |
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h index b4a664e7f55c..8840cf95e8dd 100644 --- a/include/asm-frv/termios.h +++ b/include/asm-frv/termios.h | |||
@@ -69,6 +69,8 @@ struct termio { | |||
69 | #define N_SYNC_PPP 14 | 69 | #define N_SYNC_PPP 14 |
70 | #define N_HCI 15 /* Bluetooth HCI UART */ | 70 | #define N_HCI 15 /* Bluetooth HCI UART */ |
71 | 71 | ||
72 | #ifdef __KERNEL__ | ||
72 | #include <asm-generic/termios.h> | 73 | #include <asm-generic/termios.h> |
74 | #endif | ||
73 | 75 | ||
74 | #endif /* _ASM_TERMIOS_H */ | 76 | #endif /* _ASM_TERMIOS_H */ |
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h index 556f53fa44cb..5160233bbfac 100644 --- a/include/asm-ia64/pci.h +++ b/include/asm-ia64/pci.h | |||
@@ -167,4 +167,10 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res) | |||
167 | 167 | ||
168 | #define pcibios_scan_all_fns(a, b) 0 | 168 | #define pcibios_scan_all_fns(a, b) 0 |
169 | 169 | ||
170 | #define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | ||
171 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | ||
172 | { | ||
173 | return channel ? 15 : 14; | ||
174 | } | ||
175 | |||
170 | #endif /* _ASM_IA64_PCI_H */ | 176 | #endif /* _ASM_IA64_PCI_H */ |
diff --git a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h index e4c9f080ff20..6a4cf2081512 100644 --- a/include/asm-m68k/uaccess.h +++ b/include/asm-m68k/uaccess.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/sched.h> | ||
10 | #include <asm/segment.h> | 11 | #include <asm/segment.h> |
11 | 12 | ||
12 | #define VERIFY_READ 0 | 13 | #define VERIFY_READ 0 |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index f2e1325fec6c..3fcfd7979de5 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -69,16 +69,6 @@ extern unsigned long zero_page_mask; | |||
69 | #define ZERO_PAGE(vaddr) \ | 69 | #define ZERO_PAGE(vaddr) \ |
70 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) | 70 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) |
71 | 71 | ||
72 | #define __HAVE_ARCH_MOVE_PTE | ||
73 | #define move_pte(pte, prot, old_addr, new_addr) \ | ||
74 | ({ \ | ||
75 | pte_t newpte = (pte); \ | ||
76 | if (pte_present(pte) && pfn_valid(pte_pfn(pte)) && \ | ||
77 | pte_page(pte) == ZERO_PAGE(old_addr)) \ | ||
78 | newpte = mk_pte(ZERO_PAGE(new_addr), (prot)); \ | ||
79 | newpte; \ | ||
80 | }) | ||
81 | |||
82 | extern void paging_init(void); | 72 | extern void paging_init(void); |
83 | 73 | ||
84 | /* | 74 | /* |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 7c7de87bd8ae..a19a6f1a1cf1 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -37,9 +37,9 @@ extern void __dma_sync_page(struct page *page, unsigned long offset, | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define __dma_alloc_coherent(gfp, size, handle) NULL | 39 | #define __dma_alloc_coherent(gfp, size, handle) NULL |
40 | #define __dma_free_coherent(size, addr) do { } while (0) | 40 | #define __dma_free_coherent(size, addr) ((void)0) |
41 | #define __dma_sync(addr, size, rw) do { } while (0) | 41 | #define __dma_sync(addr, size, rw) ((void)0) |
42 | #define __dma_sync_page(pg, off, sz, rw) do { } while (0) | 42 | #define __dma_sync_page(pg, off, sz, rw) ((void)0) |
43 | 43 | ||
44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ | 44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ |
45 | 45 | ||
@@ -251,7 +251,7 @@ dma_map_single(struct device *dev, void *ptr, size_t size, | |||
251 | } | 251 | } |
252 | 252 | ||
253 | /* We do nothing. */ | 253 | /* We do nothing. */ |
254 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 254 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) |
255 | 255 | ||
256 | static inline dma_addr_t | 256 | static inline dma_addr_t |
257 | dma_map_page(struct device *dev, struct page *page, | 257 | dma_map_page(struct device *dev, struct page *page, |
@@ -266,7 +266,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
266 | } | 266 | } |
267 | 267 | ||
268 | /* We do nothing. */ | 268 | /* We do nothing. */ |
269 | #define dma_unmap_page(dev, handle, size, dir) do { } while (0) | 269 | #define dma_unmap_page(dev, handle, size, dir) ((void)0) |
270 | 270 | ||
271 | static inline int | 271 | static inline int |
272 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 272 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
@@ -286,7 +286,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* We don't do anything here. */ | 288 | /* We don't do anything here. */ |
289 | #define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) | 289 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) |
290 | 290 | ||
291 | #endif /* CONFIG_PPC64 */ | 291 | #endif /* CONFIG_PPC64 */ |
292 | 292 | ||
diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h index 267e631e9bbc..34518ea7bf1b 100644 --- a/include/asm-sparc/checksum.h +++ b/include/asm-sparc/checksum.h | |||
@@ -151,7 +151,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) | |||
151 | "xnor\t%%g0, %0, %0" | 151 | "xnor\t%%g0, %0, %0" |
152 | : "=r" (sum), "=&r" (iph) | 152 | : "=r" (sum), "=&r" (iph) |
153 | : "r" (ihl), "1" (iph) | 153 | : "r" (ihl), "1" (iph) |
154 | : "g2", "g3", "g4", "cc"); | 154 | : "g2", "g3", "g4", "cc", "memory"); |
155 | return sum; | 155 | return sum; |
156 | } | 156 | } |
157 | 157 | ||
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 188f72621776..e57ff136ee51 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -408,6 +408,15 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
408 | 408 | ||
409 | #include <asm-generic/pgtable-nopud.h> | 409 | #include <asm-generic/pgtable-nopud.h> |
410 | 410 | ||
411 | #ifdef CONFIG_HIGHMEM | ||
412 | /* Clear a kernel PTE and flush it from the TLB */ | ||
413 | #define kpte_clear_flush(ptep, vaddr) \ | ||
414 | do { \ | ||
415 | pte_clear(&init_mm, vaddr, ptep); \ | ||
416 | __flush_tlb_one(vaddr); \ | ||
417 | } while (0) | ||
418 | #endif | ||
419 | |||
411 | #endif | 420 | #endif |
412 | #endif | 421 | #endif |
413 | 422 | ||
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index be9ec6890723..49dbab09ef2b 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
@@ -63,6 +63,9 @@ static inline int dma_mapping_error(dma_addr_t dma_addr) | |||
63 | return (dma_addr == bad_dma_address); | 63 | return (dma_addr == bad_dma_address); |
64 | } | 64 | } |
65 | 65 | ||
66 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
67 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
68 | |||
66 | extern void *dma_alloc_coherent(struct device *dev, size_t size, | 69 | extern void *dma_alloc_coherent(struct device *dev, size_t size, |
67 | dma_addr_t *dma_handle, gfp_t gfp); | 70 | dma_addr_t *dma_handle, gfp_t gfp); |
68 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | 71 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, |
diff --git a/include/linux/cdev.h b/include/linux/cdev.h index f309b00e986e..1e29b13d0062 100644 --- a/include/linux/cdev.h +++ b/include/linux/cdev.h | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <linux/kdev_t.h> | 6 | #include <linux/kdev_t.h> |
7 | #include <linux/list.h> | 7 | #include <linux/list.h> |
8 | 8 | ||
9 | struct file_operations; | ||
10 | struct inode; | ||
11 | struct module; | ||
12 | |||
9 | struct cdev { | 13 | struct cdev { |
10 | struct kobject kobj; | 14 | struct kobject kobj; |
11 | struct module *owner; | 15 | struct module *owner; |
diff --git a/include/linux/efi.h b/include/linux/efi.h index df1c91855f0e..f8ebd7c1ddb3 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -301,7 +301,7 @@ extern int __init efi_uart_console_only (void); | |||
301 | extern void efi_initialize_iomem_resources(struct resource *code_resource, | 301 | extern void efi_initialize_iomem_resources(struct resource *code_resource, |
302 | struct resource *data_resource); | 302 | struct resource *data_resource); |
303 | extern unsigned long efi_get_time(void); | 303 | extern unsigned long efi_get_time(void); |
304 | extern int __init efi_set_rtc_mmss(unsigned long nowtime); | 304 | extern int efi_set_rtc_mmss(unsigned long nowtime); |
305 | extern int is_available_memory(efi_memory_desc_t * md); | 305 | extern int is_available_memory(efi_memory_desc_t * md); |
306 | extern struct efi_memory_map memmap; | 306 | extern struct efi_memory_map memmap; |
307 | 307 | ||
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index 2b54eac738ea..818c6afc1091 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
@@ -60,13 +60,15 @@ | |||
60 | #define TAG_MASK 0xf8 | 60 | #define TAG_MASK 0xf8 |
61 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
62 | 62 | ||
63 | #include <linux/types.h> | ||
64 | |||
63 | /* | 65 | /* |
64 | * Command Header sizes for IOCTL commands | 66 | * Command Header sizes for IOCTL commands |
65 | */ | 67 | */ |
66 | 68 | ||
67 | #define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8)) | 69 | #define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(__u8)) |
68 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8)) | 70 | #define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(__u8)) |
69 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8)) | 71 | #define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(__u8)) |
70 | 72 | ||
71 | #define IDE_DRIVE_TASK_INVALID -1 | 73 | #define IDE_DRIVE_TASK_INVALID -1 |
72 | #define IDE_DRIVE_TASK_NO_DATA 0 | 74 | #define IDE_DRIVE_TASK_NO_DATA 0 |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 770120add15a..342b4e639acb 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -438,7 +438,6 @@ struct hid_device { /* device report descriptor */ | |||
438 | struct hid_usage *, __s32); | 438 | struct hid_usage *, __s32); |
439 | void (*hiddev_report_event) (struct hid_device *, struct hid_report *); | 439 | void (*hiddev_report_event) (struct hid_device *, struct hid_report *); |
440 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK | 440 | #ifdef CONFIG_USB_HIDINPUT_POWERBOOK |
441 | unsigned int pb_fnmode; | ||
442 | unsigned long pb_pressed_fn[NBITS(KEY_MAX)]; | 441 | unsigned long pb_pressed_fn[NBITS(KEY_MAX)]; |
443 | unsigned long pb_pressed_numlock[NBITS(KEY_MAX)]; | 442 | unsigned long pb_pressed_numlock[NBITS(KEY_MAX)]; |
444 | #endif | 443 | #endif |
diff --git a/include/linux/i2o-dev.h b/include/linux/i2o-dev.h index c2519df1b6dc..a0b23dd45239 100644 --- a/include/linux/i2o-dev.h +++ b/include/linux/i2o-dev.h | |||
@@ -24,12 +24,13 @@ | |||
24 | #define MAX_I2O_CONTROLLERS 32 | 24 | #define MAX_I2O_CONTROLLERS 32 |
25 | 25 | ||
26 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
27 | #include <linux/types.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * I2O Control IOCTLs and structures | 30 | * I2O Control IOCTLs and structures |
30 | */ | 31 | */ |
31 | #define I2O_MAGIC_NUMBER 'i' | 32 | #define I2O_MAGIC_NUMBER 'i' |
32 | #define I2OGETIOPS _IOR(I2O_MAGIC_NUMBER,0,u8[MAX_I2O_CONTROLLERS]) | 33 | #define I2OGETIOPS _IOR(I2O_MAGIC_NUMBER,0,__u8[MAX_I2O_CONTROLLERS]) |
33 | #define I2OHRTGET _IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct) | 34 | #define I2OHRTGET _IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct) |
34 | #define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct) | 35 | #define I2OLCTGET _IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct) |
35 | #define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget) | 36 | #define I2OPARMSET _IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget) |
@@ -37,7 +38,7 @@ | |||
37 | #define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer) | 38 | #define I2OSWDL _IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer) |
38 | #define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer) | 39 | #define I2OSWUL _IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer) |
39 | #define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer) | 40 | #define I2OSWDEL _IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer) |
40 | #define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,u32) | 41 | #define I2OVALIDATE _IOR(I2O_MAGIC_NUMBER,8,__u32) |
41 | #define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html) | 42 | #define I2OHTML _IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html) |
42 | #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) | 43 | #define I2OEVTREG _IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id) |
43 | #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) | 44 | #define I2OEVTGET _IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 22aa69e20905..91bb8ceef0b5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1054,6 +1054,8 @@ static inline void ata_pause(struct ata_port *ap) | |||
1054 | /** | 1054 | /** |
1055 | * ata_busy_wait - Wait for a port status register | 1055 | * ata_busy_wait - Wait for a port status register |
1056 | * @ap: Port to wait for. | 1056 | * @ap: Port to wait for. |
1057 | * @bits: bits that must be clear | ||
1058 | * @max: number of 10uS waits to perform | ||
1057 | * | 1059 | * |
1058 | * Waits up to max*10 microseconds for the selected bits in the port's | 1060 | * Waits up to max*10 microseconds for the selected bits in the port's |
1059 | * status register to be cleared. | 1061 | * status register to be cleared. |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f7a416c52edc..3d1d21035dec 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1277,13 +1277,13 @@ | |||
1277 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 | 1277 | #define PCI_DEVICE_ID_VIA_3296_0 0x0296 |
1278 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 | 1278 | #define PCI_DEVICE_ID_VIA_8363_0 0x0305 |
1279 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 | 1279 | #define PCI_DEVICE_ID_VIA_P4M800CE 0x0314 |
1280 | #define PCI_DEVICE_ID_VIA_K8M890CE 0x0336 | 1280 | #define PCI_DEVICE_ID_VIA_P4M890 0x0327 |
1281 | #define PCI_DEVICE_ID_VIA_VT3336 0x0336 | ||
1281 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 | 1282 | #define PCI_DEVICE_ID_VIA_8371_0 0x0391 |
1282 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 | 1283 | #define PCI_DEVICE_ID_VIA_8501_0 0x0501 |
1283 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 | 1284 | #define PCI_DEVICE_ID_VIA_82C561 0x0561 |
1284 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 | 1285 | #define PCI_DEVICE_ID_VIA_82C586_1 0x0571 |
1285 | #define PCI_DEVICE_ID_VIA_82C576 0x0576 | 1286 | #define PCI_DEVICE_ID_VIA_82C576 0x0576 |
1286 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x0581 | ||
1287 | #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 | 1287 | #define PCI_DEVICE_ID_VIA_82C586_0 0x0586 |
1288 | #define PCI_DEVICE_ID_VIA_82C596 0x0596 | 1288 | #define PCI_DEVICE_ID_VIA_82C596 0x0596 |
1289 | #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 | 1289 | #define PCI_DEVICE_ID_VIA_82C597_0 0x0597 |
@@ -1326,6 +1326,8 @@ | |||
1326 | #define PCI_DEVICE_ID_VIA_8237 0x3227 | 1326 | #define PCI_DEVICE_ID_VIA_8237 0x3227 |
1327 | #define PCI_DEVICE_ID_VIA_8251 0x3287 | 1327 | #define PCI_DEVICE_ID_VIA_8251 0x3287 |
1328 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 | 1328 | #define PCI_DEVICE_ID_VIA_8237A 0x3337 |
1329 | #define PCI_DEVICE_ID_VIA_8237S 0x3372 | ||
1330 | #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 | ||
1329 | #define PCI_DEVICE_ID_VIA_8231 0x8231 | 1331 | #define PCI_DEVICE_ID_VIA_8231 0x8231 |
1330 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 | 1332 | #define PCI_DEVICE_ID_VIA_8231_4 0x8235 |
1331 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 | 1333 | #define PCI_DEVICE_ID_VIA_8365_1 0x8305 |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index d2a9d419f01f..2833806d42c6 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -39,7 +39,7 @@ static inline void put_pid_ns(struct pid_namespace *ns) | |||
39 | 39 | ||
40 | static inline struct task_struct *child_reaper(struct task_struct *tsk) | 40 | static inline struct task_struct *child_reaper(struct task_struct *tsk) |
41 | { | 41 | { |
42 | return tsk->nsproxy->pid_ns->child_reaper; | 42 | return init_pid_ns.child_reaper; |
43 | } | 43 | } |
44 | 44 | ||
45 | #endif /* _LINUX_PID_NS_H */ | 45 | #endif /* _LINUX_PID_NS_H */ |
diff --git a/include/sound/core.h b/include/sound/core.h index a994bea09cd6..521f036cce99 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -132,8 +132,10 @@ struct snd_card { | |||
132 | int shutdown; /* this card is going down */ | 132 | int shutdown; /* this card is going down */ |
133 | int free_on_last_close; /* free in context of file_release */ | 133 | int free_on_last_close; /* free in context of file_release */ |
134 | wait_queue_head_t shutdown_sleep; | 134 | wait_queue_head_t shutdown_sleep; |
135 | struct device *parent; | 135 | struct device *dev; /* device assigned to this card */ |
136 | struct device *dev; | 136 | #ifndef CONFIG_SYSFS_DEPRECATED |
137 | struct device *card_dev; /* cardX object for sysfs */ | ||
138 | #endif | ||
137 | 139 | ||
138 | #ifdef CONFIG_PM | 140 | #ifdef CONFIG_PM |
139 | unsigned int power_state; /* power state */ | 141 | unsigned int power_state; /* power state */ |
@@ -191,6 +193,16 @@ struct snd_minor { | |||
191 | struct device *dev; /* device for sysfs */ | 193 | struct device *dev; /* device for sysfs */ |
192 | }; | 194 | }; |
193 | 195 | ||
196 | /* return a device pointer linked to each sound device as a parent */ | ||
197 | static inline struct device *snd_card_get_device_link(struct snd_card *card) | ||
198 | { | ||
199 | #ifdef CONFIG_SYSFS_DEPRECATED | ||
200 | return card ? card->dev : NULL; | ||
201 | #else | ||
202 | return card ? card->card_dev : NULL; | ||
203 | #endif | ||
204 | } | ||
205 | |||
194 | /* sound.c */ | 206 | /* sound.c */ |
195 | 207 | ||
196 | extern int snd_major; | 208 | extern int snd_major; |
@@ -257,7 +269,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file); | |||
257 | int snd_card_file_remove(struct snd_card *card, struct file *file); | 269 | int snd_card_file_remove(struct snd_card *card, struct file *file); |
258 | 270 | ||
259 | #ifndef snd_card_set_dev | 271 | #ifndef snd_card_set_dev |
260 | #define snd_card_set_dev(card,devptr) ((card)->parent = (devptr)) | 272 | #define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) |
261 | #endif | 273 | #endif |
262 | 274 | ||
263 | /* device.c */ | 275 | /* device.c */ |
diff --git a/kernel/exit.c b/kernel/exit.c index 35401720635b..fec12eb12471 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -938,8 +938,8 @@ fastcall NORET_TYPE void do_exit(long code) | |||
938 | 938 | ||
939 | tsk->exit_code = code; | 939 | tsk->exit_code = code; |
940 | proc_exit_connector(tsk); | 940 | proc_exit_connector(tsk); |
941 | exit_notify(tsk); | ||
942 | exit_task_namespaces(tsk); | 941 | exit_task_namespaces(tsk); |
942 | exit_notify(tsk); | ||
943 | #ifdef CONFIG_NUMA | 943 | #ifdef CONFIG_NUMA |
944 | mpol_free(tsk->mempolicy); | 944 | mpol_free(tsk->mempolicy); |
945 | tsk->mempolicy = NULL; | 945 | tsk->mempolicy = NULL; |
diff --git a/kernel/fork.c b/kernel/fork.c index fc723e595cd5..d57118da73ff 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1313,7 +1313,7 @@ noinline struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_re | |||
1313 | return regs; | 1313 | return regs; |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | struct task_struct * __devinit fork_idle(int cpu) | 1316 | struct task_struct * __cpuinit fork_idle(int cpu) |
1317 | { | 1317 | { |
1318 | struct task_struct *task; | 1318 | struct task_struct *task; |
1319 | struct pt_regs regs; | 1319 | struct pt_regs regs; |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 17ec4afb0994..6fcf8dd148d0 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -87,6 +87,12 @@ struct kprobe_insn_page { | |||
87 | int ngarbage; | 87 | int ngarbage; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | enum kprobe_slot_state { | ||
91 | SLOT_CLEAN = 0, | ||
92 | SLOT_DIRTY = 1, | ||
93 | SLOT_USED = 2, | ||
94 | }; | ||
95 | |||
90 | static struct hlist_head kprobe_insn_pages; | 96 | static struct hlist_head kprobe_insn_pages; |
91 | static int kprobe_garbage_slots; | 97 | static int kprobe_garbage_slots; |
92 | static int collect_garbage_slots(void); | 98 | static int collect_garbage_slots(void); |
@@ -130,8 +136,8 @@ kprobe_opcode_t __kprobes *get_insn_slot(void) | |||
130 | if (kip->nused < INSNS_PER_PAGE) { | 136 | if (kip->nused < INSNS_PER_PAGE) { |
131 | int i; | 137 | int i; |
132 | for (i = 0; i < INSNS_PER_PAGE; i++) { | 138 | for (i = 0; i < INSNS_PER_PAGE; i++) { |
133 | if (!kip->slot_used[i]) { | 139 | if (kip->slot_used[i] == SLOT_CLEAN) { |
134 | kip->slot_used[i] = 1; | 140 | kip->slot_used[i] = SLOT_USED; |
135 | kip->nused++; | 141 | kip->nused++; |
136 | return kip->insns + (i * MAX_INSN_SIZE); | 142 | return kip->insns + (i * MAX_INSN_SIZE); |
137 | } | 143 | } |
@@ -163,8 +169,8 @@ kprobe_opcode_t __kprobes *get_insn_slot(void) | |||
163 | } | 169 | } |
164 | INIT_HLIST_NODE(&kip->hlist); | 170 | INIT_HLIST_NODE(&kip->hlist); |
165 | hlist_add_head(&kip->hlist, &kprobe_insn_pages); | 171 | hlist_add_head(&kip->hlist, &kprobe_insn_pages); |
166 | memset(kip->slot_used, 0, INSNS_PER_PAGE); | 172 | memset(kip->slot_used, SLOT_CLEAN, INSNS_PER_PAGE); |
167 | kip->slot_used[0] = 1; | 173 | kip->slot_used[0] = SLOT_USED; |
168 | kip->nused = 1; | 174 | kip->nused = 1; |
169 | kip->ngarbage = 0; | 175 | kip->ngarbage = 0; |
170 | return kip->insns; | 176 | return kip->insns; |
@@ -173,7 +179,7 @@ kprobe_opcode_t __kprobes *get_insn_slot(void) | |||
173 | /* Return 1 if all garbages are collected, otherwise 0. */ | 179 | /* Return 1 if all garbages are collected, otherwise 0. */ |
174 | static int __kprobes collect_one_slot(struct kprobe_insn_page *kip, int idx) | 180 | static int __kprobes collect_one_slot(struct kprobe_insn_page *kip, int idx) |
175 | { | 181 | { |
176 | kip->slot_used[idx] = 0; | 182 | kip->slot_used[idx] = SLOT_CLEAN; |
177 | kip->nused--; | 183 | kip->nused--; |
178 | if (kip->nused == 0) { | 184 | if (kip->nused == 0) { |
179 | /* | 185 | /* |
@@ -212,7 +218,7 @@ static int __kprobes collect_garbage_slots(void) | |||
212 | continue; | 218 | continue; |
213 | kip->ngarbage = 0; /* we will collect all garbages */ | 219 | kip->ngarbage = 0; /* we will collect all garbages */ |
214 | for (i = 0; i < INSNS_PER_PAGE; i++) { | 220 | for (i = 0; i < INSNS_PER_PAGE; i++) { |
215 | if (kip->slot_used[i] == -1 && | 221 | if (kip->slot_used[i] == SLOT_DIRTY && |
216 | collect_one_slot(kip, i)) | 222 | collect_one_slot(kip, i)) |
217 | break; | 223 | break; |
218 | } | 224 | } |
@@ -232,7 +238,7 @@ void __kprobes free_insn_slot(kprobe_opcode_t * slot, int dirty) | |||
232 | slot < kip->insns + (INSNS_PER_PAGE * MAX_INSN_SIZE)) { | 238 | slot < kip->insns + (INSNS_PER_PAGE * MAX_INSN_SIZE)) { |
233 | int i = (slot - kip->insns) / MAX_INSN_SIZE; | 239 | int i = (slot - kip->insns) / MAX_INSN_SIZE; |
234 | if (dirty) { | 240 | if (dirty) { |
235 | kip->slot_used[i] = -1; | 241 | kip->slot_used[i] = SLOT_DIRTY; |
236 | kip->ngarbage++; | 242 | kip->ngarbage++; |
237 | } else { | 243 | } else { |
238 | collect_one_slot(kip, i); | 244 | collect_one_slot(kip, i); |
diff --git a/kernel/pid.c b/kernel/pid.c index 2efe9d8d367b..78f2aee90f54 100644 --- a/kernel/pid.c +++ b/kernel/pid.c | |||
@@ -197,7 +197,7 @@ fastcall void free_pid(struct pid *pid) | |||
197 | hlist_del_rcu(&pid->pid_chain); | 197 | hlist_del_rcu(&pid->pid_chain); |
198 | spin_unlock_irqrestore(&pidmap_lock, flags); | 198 | spin_unlock_irqrestore(&pidmap_lock, flags); |
199 | 199 | ||
200 | free_pidmap(current->nsproxy->pid_ns, pid->nr); | 200 | free_pidmap(&init_pid_ns, pid->nr); |
201 | call_rcu(&pid->rcu, delayed_put_pid); | 201 | call_rcu(&pid->rcu, delayed_put_pid); |
202 | } | 202 | } |
203 | 203 | ||
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 45b3553865cf..9dd9fbb75139 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c | |||
@@ -183,7 +183,7 @@ __xip_unmap (struct address_space * mapping, | |||
183 | address = vma->vm_start + | 183 | address = vma->vm_start + |
184 | ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); | 184 | ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); |
185 | BUG_ON(address < vma->vm_start || address >= vma->vm_end); | 185 | BUG_ON(address < vma->vm_start || address >= vma->vm_end); |
186 | page = ZERO_PAGE(address); | 186 | page = ZERO_PAGE(0); |
187 | pte = page_check_address(page, mm, address, &ptl); | 187 | pte = page_check_address(page, mm, address, &ptl); |
188 | if (pte) { | 188 | if (pte) { |
189 | /* Nuke the page table entry. */ | 189 | /* Nuke the page table entry. */ |
@@ -246,7 +246,7 @@ xip_file_nopage(struct vm_area_struct * area, | |||
246 | __xip_unmap(mapping, pgoff); | 246 | __xip_unmap(mapping, pgoff); |
247 | } else { | 247 | } else { |
248 | /* not shared and writable, use ZERO_PAGE() */ | 248 | /* not shared and writable, use ZERO_PAGE() */ |
249 | page = ZERO_PAGE(address); | 249 | page = ZERO_PAGE(0); |
250 | } | 250 | } |
251 | 251 | ||
252 | out: | 252 | out: |
@@ -1477,6 +1477,7 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un | |||
1477 | { | 1477 | { |
1478 | struct mm_struct *mm = vma->vm_mm; | 1478 | struct mm_struct *mm = vma->vm_mm; |
1479 | struct rlimit *rlim = current->signal->rlim; | 1479 | struct rlimit *rlim = current->signal->rlim; |
1480 | unsigned long new_start; | ||
1480 | 1481 | ||
1481 | /* address space limit tests */ | 1482 | /* address space limit tests */ |
1482 | if (!may_expand_vm(mm, grow)) | 1483 | if (!may_expand_vm(mm, grow)) |
@@ -1496,6 +1497,12 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un | |||
1496 | return -ENOMEM; | 1497 | return -ENOMEM; |
1497 | } | 1498 | } |
1498 | 1499 | ||
1500 | /* Check to ensure the stack will not grow into a hugetlb-only region */ | ||
1501 | new_start = (vma->vm_flags & VM_GROWSUP) ? vma->vm_start : | ||
1502 | vma->vm_end - size; | ||
1503 | if (is_hugepage_only_range(vma->vm_mm, new_start, size)) | ||
1504 | return -EFAULT; | ||
1505 | |||
1499 | /* | 1506 | /* |
1500 | * Overcommit.. This must be the final test, as it will | 1507 | * Overcommit.. This must be the final test, as it will |
1501 | * update security statistics. | 1508 | * update security statistics. |
diff --git a/mm/mremap.c b/mm/mremap.c index 9c769fa29f32..5d4bd4f95b8e 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -105,7 +105,6 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, | |||
105 | if (pte_none(*old_pte)) | 105 | if (pte_none(*old_pte)) |
106 | continue; | 106 | continue; |
107 | pte = ptep_clear_flush(vma, old_addr, old_pte); | 107 | pte = ptep_clear_flush(vma, old_addr, old_pte); |
108 | /* ZERO_PAGE can be dependant on virtual addr */ | ||
109 | pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); | 108 | pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr); |
110 | set_pte_at(mm, new_addr, new_pte, pte); | 109 | set_pte_at(mm, new_addr, new_pte, pte); |
111 | } | 110 | } |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 1d2fc89ca56d..be0efbde4994 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -133,11 +133,9 @@ get_dirty_limits(long *pbackground, long *pdirty, | |||
133 | 133 | ||
134 | #ifdef CONFIG_HIGHMEM | 134 | #ifdef CONFIG_HIGHMEM |
135 | /* | 135 | /* |
136 | * If this mapping can only allocate from low memory, | 136 | * We always exclude high memory from our count. |
137 | * we exclude high memory from our count. | ||
138 | */ | 137 | */ |
139 | if (mapping && !(mapping_gfp_mask(mapping) & __GFP_HIGHMEM)) | 138 | available_memory -= totalhigh_pages; |
140 | available_memory -= totalhigh_pages; | ||
141 | #endif | 139 | #endif |
142 | 140 | ||
143 | 141 | ||
@@ -526,28 +524,25 @@ static struct notifier_block __cpuinitdata ratelimit_nb = { | |||
526 | }; | 524 | }; |
527 | 525 | ||
528 | /* | 526 | /* |
529 | * If the machine has a large highmem:lowmem ratio then scale back the default | 527 | * Called early on to tune the page writeback dirty limits. |
530 | * dirty memory thresholds: allowing too much dirty highmem pins an excessive | 528 | * |
531 | * number of buffer_heads. | 529 | * We used to scale dirty pages according to how total memory |
530 | * related to pages that could be allocated for buffers (by | ||
531 | * comparing nr_free_buffer_pages() to vm_total_pages. | ||
532 | * | ||
533 | * However, that was when we used "dirty_ratio" to scale with | ||
534 | * all memory, and we don't do that any more. "dirty_ratio" | ||
535 | * is now applied to total non-HIGHPAGE memory (by subtracting | ||
536 | * totalhigh_pages from vm_total_pages), and as such we can't | ||
537 | * get into the old insane situation any more where we had | ||
538 | * large amounts of dirty pages compared to a small amount of | ||
539 | * non-HIGHMEM memory. | ||
540 | * | ||
541 | * But we might still want to scale the dirty_ratio by how | ||
542 | * much memory the box has.. | ||
532 | */ | 543 | */ |
533 | void __init page_writeback_init(void) | 544 | void __init page_writeback_init(void) |
534 | { | 545 | { |
535 | long buffer_pages = nr_free_buffer_pages(); | ||
536 | long correction; | ||
537 | |||
538 | correction = (100 * 4 * buffer_pages) / vm_total_pages; | ||
539 | |||
540 | if (correction < 100) { | ||
541 | dirty_background_ratio *= correction; | ||
542 | dirty_background_ratio /= 100; | ||
543 | vm_dirty_ratio *= correction; | ||
544 | vm_dirty_ratio /= 100; | ||
545 | |||
546 | if (dirty_background_ratio <= 0) | ||
547 | dirty_background_ratio = 1; | ||
548 | if (vm_dirty_ratio <= 0) | ||
549 | vm_dirty_ratio = 1; | ||
550 | } | ||
551 | mod_timer(&wb_timer, jiffies + dirty_writeback_interval); | 546 | mod_timer(&wb_timer, jiffies + dirty_writeback_interval); |
552 | writeback_set_ratelimit(); | 547 | writeback_set_ratelimit(); |
553 | register_cpu_notifier(&ratelimit_nb); | 548 | register_cpu_notifier(&ratelimit_nb); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fc5b5442e942..2c606cc922a5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -989,8 +989,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | |||
989 | int classzone_idx, int alloc_flags) | 989 | int classzone_idx, int alloc_flags) |
990 | { | 990 | { |
991 | /* free_pages my go negative - that's OK */ | 991 | /* free_pages my go negative - that's OK */ |
992 | unsigned long min = mark; | 992 | long min = mark, free_pages = z->free_pages - (1 << order) + 1; |
993 | long free_pages = z->free_pages - (1 << order) + 1; | ||
994 | int o; | 993 | int o; |
995 | 994 | ||
996 | if (alloc_flags & ALLOC_HIGH) | 995 | if (alloc_flags & ALLOC_HIGH) |
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 6f31fad9be13..7f70b0886b83 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -374,9 +374,11 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
374 | && ctnetlink_dump_helpinfo(skb, ct) < 0) | 374 | && ctnetlink_dump_helpinfo(skb, ct) < 0) |
375 | goto nfattr_failure; | 375 | goto nfattr_failure; |
376 | 376 | ||
377 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK | ||
377 | if ((events & IPCT_MARK || ct->mark) | 378 | if ((events & IPCT_MARK || ct->mark) |
378 | && ctnetlink_dump_mark(skb, ct) < 0) | 379 | && ctnetlink_dump_mark(skb, ct) < 0) |
379 | goto nfattr_failure; | 380 | goto nfattr_failure; |
381 | #endif | ||
380 | 382 | ||
381 | if (events & IPCT_COUNTER_FILLING && | 383 | if (events & IPCT_COUNTER_FILLING && |
382 | (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || | 384 | (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || |
diff --git a/net/ipv4/netfilter/ip_conntrack_sip.c b/net/ipv4/netfilter/ip_conntrack_sip.c index 3a26d63eed88..11c588a10e6b 100644 --- a/net/ipv4/netfilter/ip_conntrack_sip.c +++ b/net/ipv4/netfilter/ip_conntrack_sip.c | |||
@@ -283,10 +283,16 @@ static int skp_epaddr_len(const char *dptr, const char *limit, int *shift) | |||
283 | { | 283 | { |
284 | int s = *shift; | 284 | int s = *shift; |
285 | 285 | ||
286 | for (; dptr <= limit && *dptr != '@'; dptr++) | 286 | /* Search for @, but stop at the end of the line. |
287 | * We are inside a sip: URI, so we don't need to worry about | ||
288 | * continuation lines. */ | ||
289 | while (dptr <= limit && | ||
290 | *dptr != '@' && *dptr != '\r' && *dptr != '\n') { | ||
287 | (*shift)++; | 291 | (*shift)++; |
292 | dptr++; | ||
293 | } | ||
288 | 294 | ||
289 | if (*dptr == '@') { | 295 | if (dptr <= limit && *dptr == '@') { |
290 | dptr++; | 296 | dptr++; |
291 | (*shift)++; | 297 | (*shift)++; |
292 | } else | 298 | } else |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2a7e4618f526..e3854696988d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3393,7 +3393,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf, | |||
3393 | #ifdef CONFIG_IPV6_ROUTER_PREF | 3393 | #ifdef CONFIG_IPV6_ROUTER_PREF |
3394 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; | 3394 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; |
3395 | array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; | 3395 | array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; |
3396 | #ifdef CONFIV_IPV6_ROUTE_INFO | 3396 | #ifdef CONFIG_IPV6_ROUTE_INFO |
3397 | array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; | 3397 | array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; |
3398 | #endif | 3398 | #endif |
3399 | #endif | 3399 | #endif |
@@ -3898,7 +3898,7 @@ static struct addrconf_sysctl_table | |||
3898 | .proc_handler = &proc_dointvec_jiffies, | 3898 | .proc_handler = &proc_dointvec_jiffies, |
3899 | .strategy = &sysctl_jiffies, | 3899 | .strategy = &sysctl_jiffies, |
3900 | }, | 3900 | }, |
3901 | #ifdef CONFIV_IPV6_ROUTE_INFO | 3901 | #ifdef CONFIG_IPV6_ROUTE_INFO |
3902 | { | 3902 | { |
3903 | .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN, | 3903 | .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN, |
3904 | .procname = "accept_ra_rt_info_max_plen", | 3904 | .procname = "accept_ra_rt_info_max_plen", |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 6a9f616de37d..39bb658f3c44 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1413,6 +1413,13 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1413 | return; | 1413 | return; |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | if (!ipv6_addr_equal(&skb->nh.ipv6h->daddr, target) && | ||
1417 | !(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) { | ||
1418 | ND_PRINTK2(KERN_WARNING | ||
1419 | "ICMPv6 Redirect: target address is not link-local.\n"); | ||
1420 | return; | ||
1421 | } | ||
1422 | |||
1416 | ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr, | 1423 | ndisc_flow_init(&fl, NDISC_REDIRECT, &saddr_buf, &skb->nh.ipv6h->saddr, |
1417 | dev->ifindex); | 1424 | dev->ifindex); |
1418 | 1425 | ||
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index cd10e44db015..80107d4909c5 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig | |||
@@ -165,7 +165,7 @@ config NF_CONNTRACK_FTP | |||
165 | 165 | ||
166 | config NF_CONNTRACK_H323 | 166 | config NF_CONNTRACK_H323 |
167 | tristate "H.323 protocol support (EXPERIMENTAL)" | 167 | tristate "H.323 protocol support (EXPERIMENTAL)" |
168 | depends on EXPERIMENTAL && NF_CONNTRACK | 168 | depends on EXPERIMENTAL && NF_CONNTRACK && (IPV6 || IPV6=n) |
169 | help | 169 | help |
170 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most | 170 | H.323 is a VoIP signalling protocol from ITU-T. As one of the most |
171 | important VoIP protocols, it is widely used by voice hardware and | 171 | important VoIP protocols, it is widely used by voice hardware and |
@@ -628,7 +628,7 @@ config NETFILTER_XT_MATCH_TCPMSS | |||
628 | 628 | ||
629 | config NETFILTER_XT_MATCH_HASHLIMIT | 629 | config NETFILTER_XT_MATCH_HASHLIMIT |
630 | tristate '"hashlimit" match support' | 630 | tristate '"hashlimit" match support' |
631 | depends on NETFILTER_XTABLES | 631 | depends on NETFILTER_XTABLES && (IP6_NF_IPTABLES || IP6_NF_IPTABLES=n) |
632 | help | 632 | help |
633 | This option adds a `hashlimit' match. | 633 | This option adds a `hashlimit' match. |
634 | 634 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 811e3e782f0f..c64f029f7052 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -389,9 +389,11 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
389 | && ctnetlink_dump_helpinfo(skb, ct) < 0) | 389 | && ctnetlink_dump_helpinfo(skb, ct) < 0) |
390 | goto nfattr_failure; | 390 | goto nfattr_failure; |
391 | 391 | ||
392 | #ifdef CONFIG_NF_CONNTRACK_MARK | ||
392 | if ((events & IPCT_MARK || ct->mark) | 393 | if ((events & IPCT_MARK || ct->mark) |
393 | && ctnetlink_dump_mark(skb, ct) < 0) | 394 | && ctnetlink_dump_mark(skb, ct) < 0) |
394 | goto nfattr_failure; | 395 | goto nfattr_failure; |
396 | #endif | ||
395 | 397 | ||
396 | if (events & IPCT_COUNTER_FILLING && | 398 | if (events & IPCT_COUNTER_FILLING && |
397 | (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || | 399 | (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 || |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index eb2a2411f97b..9dec11534678 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -303,10 +303,16 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, | |||
303 | { | 303 | { |
304 | int s = *shift; | 304 | int s = *shift; |
305 | 305 | ||
306 | for (; dptr <= limit && *dptr != '@'; dptr++) | 306 | /* Search for @, but stop at the end of the line. |
307 | * We are inside a sip: URI, so we don't need to worry about | ||
308 | * continuation lines. */ | ||
309 | while (dptr <= limit && | ||
310 | *dptr != '@' && *dptr != '\r' && *dptr != '\n') { | ||
307 | (*shift)++; | 311 | (*shift)++; |
312 | dptr++; | ||
313 | } | ||
308 | 314 | ||
309 | if (*dptr == '@') { | 315 | if (dptr <= limit && *dptr == '@') { |
310 | dptr++; | 316 | dptr++; |
311 | (*shift)++; | 317 | (*shift)++; |
312 | } else | 318 | } else |
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c index d93cb096a675..5e32dfa2668b 100644 --- a/net/netfilter/xt_connbytes.c +++ b/net/netfilter/xt_connbytes.c | |||
@@ -52,6 +52,8 @@ match(const struct sk_buff *skb, | |||
52 | { | 52 | { |
53 | const struct xt_connbytes_info *sinfo = matchinfo; | 53 | const struct xt_connbytes_info *sinfo = matchinfo; |
54 | u_int64_t what = 0; /* initialize to make gcc happy */ | 54 | u_int64_t what = 0; /* initialize to make gcc happy */ |
55 | u_int64_t bytes = 0; | ||
56 | u_int64_t pkts = 0; | ||
55 | const struct ip_conntrack_counter *counters; | 57 | const struct ip_conntrack_counter *counters; |
56 | 58 | ||
57 | if (!(counters = nf_ct_get_counters(skb))) | 59 | if (!(counters = nf_ct_get_counters(skb))) |
@@ -89,29 +91,22 @@ match(const struct sk_buff *skb, | |||
89 | case XT_CONNBYTES_AVGPKT: | 91 | case XT_CONNBYTES_AVGPKT: |
90 | switch (sinfo->direction) { | 92 | switch (sinfo->direction) { |
91 | case XT_CONNBYTES_DIR_ORIGINAL: | 93 | case XT_CONNBYTES_DIR_ORIGINAL: |
92 | what = div64_64(counters[IP_CT_DIR_ORIGINAL].bytes, | 94 | bytes = counters[IP_CT_DIR_ORIGINAL].bytes; |
93 | counters[IP_CT_DIR_ORIGINAL].packets); | 95 | pkts = counters[IP_CT_DIR_ORIGINAL].packets; |
94 | break; | 96 | break; |
95 | case XT_CONNBYTES_DIR_REPLY: | 97 | case XT_CONNBYTES_DIR_REPLY: |
96 | what = div64_64(counters[IP_CT_DIR_REPLY].bytes, | 98 | bytes = counters[IP_CT_DIR_REPLY].bytes; |
97 | counters[IP_CT_DIR_REPLY].packets); | 99 | pkts = counters[IP_CT_DIR_REPLY].packets; |
98 | break; | 100 | break; |
99 | case XT_CONNBYTES_DIR_BOTH: | 101 | case XT_CONNBYTES_DIR_BOTH: |
100 | { | 102 | bytes = counters[IP_CT_DIR_ORIGINAL].bytes + |
101 | u_int64_t bytes; | 103 | counters[IP_CT_DIR_REPLY].bytes; |
102 | u_int64_t pkts; | 104 | pkts = counters[IP_CT_DIR_ORIGINAL].packets + |
103 | bytes = counters[IP_CT_DIR_ORIGINAL].bytes + | 105 | counters[IP_CT_DIR_REPLY].packets; |
104 | counters[IP_CT_DIR_REPLY].bytes; | ||
105 | pkts = counters[IP_CT_DIR_ORIGINAL].packets+ | ||
106 | counters[IP_CT_DIR_REPLY].packets; | ||
107 | |||
108 | /* FIXME_THEORETICAL: what to do if sum | ||
109 | * overflows ? */ | ||
110 | |||
111 | what = div64_64(bytes, pkts); | ||
112 | } | ||
113 | break; | 106 | break; |
114 | } | 107 | } |
108 | if (pkts != 0) | ||
109 | what = div64_64(bytes, pkts); | ||
115 | break; | 110 | break; |
116 | } | 111 | } |
117 | 112 | ||
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index a9608064a4c3..01e69138578d 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -55,7 +55,8 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int | |||
55 | struct ipt_target *target; | 55 | struct ipt_target *target; |
56 | int ret = 0; | 56 | int ret = 0; |
57 | 57 | ||
58 | target = xt_find_target(AF_INET, t->u.user.name, t->u.user.revision); | 58 | target = xt_request_find_target(AF_INET, t->u.user.name, |
59 | t->u.user.revision); | ||
59 | if (!target) | 60 | if (!target) |
60 | return -ENOENT; | 61 | return -ENOENT; |
61 | 62 | ||
@@ -63,9 +64,10 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int | |||
63 | 64 | ||
64 | ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t), | 65 | ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t), |
65 | table, hook, 0, 0); | 66 | table, hook, 0, 0); |
66 | if (ret) | 67 | if (ret) { |
68 | module_put(t->u.kernel.target->me); | ||
67 | return ret; | 69 | return ret; |
68 | 70 | } | |
69 | if (t->u.kernel.target->checkentry | 71 | if (t->u.kernel.target->checkentry |
70 | && !t->u.kernel.target->checkentry(table, NULL, | 72 | && !t->u.kernel.target->checkentry(table, NULL, |
71 | t->u.kernel.target, t->data, | 73 | t->u.kernel.target, t->data, |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 8bd30976cdee..6db77d1329f7 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -621,7 +621,13 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds, | |||
621 | /* The receiver of the HEARTBEAT ACK should also perform an | 621 | /* The receiver of the HEARTBEAT ACK should also perform an |
622 | * RTT measurement for that destination transport address | 622 | * RTT measurement for that destination transport address |
623 | * using the time value carried in the HEARTBEAT ACK chunk. | 623 | * using the time value carried in the HEARTBEAT ACK chunk. |
624 | * If the transport's rto_pending variable has been cleared, | ||
625 | * it was most likely due to a retransmit. However, we want | ||
626 | * to re-enable it to properly update the rto. | ||
624 | */ | 627 | */ |
628 | if (t->rto_pending == 0) | ||
629 | t->rto_pending = 1; | ||
630 | |||
625 | hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data; | 631 | hbinfo = (sctp_sender_hb_info_t *) chunk->skb->data; |
626 | sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at)); | 632 | sctp_transport_update_rto(t, (jiffies - hbinfo->sent_at)); |
627 | 633 | ||
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index bf21a2047010..4c1611211119 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/sunrpc/clnt.h> | 26 | #include <linux/sunrpc/clnt.h> |
27 | 27 | ||
28 | #define RPCDBG_FACILITY RPCDBG_SVCDSP | 28 | #define RPCDBG_FACILITY RPCDBG_SVCDSP |
29 | #define RPC_PARANOIA 1 | ||
30 | 29 | ||
31 | /* | 30 | /* |
32 | * Mode for mapping cpus to pools. | 31 | * Mode for mapping cpus to pools. |
@@ -872,15 +871,15 @@ svc_process(struct svc_rqst *rqstp) | |||
872 | return 0; | 871 | return 0; |
873 | 872 | ||
874 | err_short_len: | 873 | err_short_len: |
875 | #ifdef RPC_PARANOIA | 874 | if (net_ratelimit()) |
876 | printk("svc: short len %Zd, dropping request\n", argv->iov_len); | 875 | printk("svc: short len %Zd, dropping request\n", argv->iov_len); |
877 | #endif | 876 | |
878 | goto dropit; /* drop request */ | 877 | goto dropit; /* drop request */ |
879 | 878 | ||
880 | err_bad_dir: | 879 | err_bad_dir: |
881 | #ifdef RPC_PARANOIA | 880 | if (net_ratelimit()) |
882 | printk("svc: bad direction %d, dropping request\n", dir); | 881 | printk("svc: bad direction %d, dropping request\n", dir); |
883 | #endif | 882 | |
884 | serv->sv_stats->rpcbadfmt++; | 883 | serv->sv_stats->rpcbadfmt++; |
885 | goto dropit; /* drop request */ | 884 | goto dropit; /* drop request */ |
886 | 885 | ||
@@ -909,10 +908,10 @@ err_bad_prog: | |||
909 | goto sendit; | 908 | goto sendit; |
910 | 909 | ||
911 | err_bad_vers: | 910 | err_bad_vers: |
912 | #ifdef RPC_PARANOIA | 911 | if (net_ratelimit()) |
913 | printk("svc: unknown version (%d for prog %d, %s)\n", | 912 | printk("svc: unknown version (%d for prog %d, %s)\n", |
914 | vers, prog, progp->pg_name); | 913 | vers, prog, progp->pg_name); |
915 | #endif | 914 | |
916 | serv->sv_stats->rpcbadfmt++; | 915 | serv->sv_stats->rpcbadfmt++; |
917 | svc_putnl(resv, RPC_PROG_MISMATCH); | 916 | svc_putnl(resv, RPC_PROG_MISMATCH); |
918 | svc_putnl(resv, progp->pg_lovers); | 917 | svc_putnl(resv, progp->pg_lovers); |
@@ -920,17 +919,17 @@ err_bad_vers: | |||
920 | goto sendit; | 919 | goto sendit; |
921 | 920 | ||
922 | err_bad_proc: | 921 | err_bad_proc: |
923 | #ifdef RPC_PARANOIA | 922 | if (net_ratelimit()) |
924 | printk("svc: unknown procedure (%d)\n", proc); | 923 | printk("svc: unknown procedure (%d)\n", proc); |
925 | #endif | 924 | |
926 | serv->sv_stats->rpcbadfmt++; | 925 | serv->sv_stats->rpcbadfmt++; |
927 | svc_putnl(resv, RPC_PROC_UNAVAIL); | 926 | svc_putnl(resv, RPC_PROC_UNAVAIL); |
928 | goto sendit; | 927 | goto sendit; |
929 | 928 | ||
930 | err_garbage: | 929 | err_garbage: |
931 | #ifdef RPC_PARANOIA | 930 | if (net_ratelimit()) |
932 | printk("svc: failed to decode args\n"); | 931 | printk("svc: failed to decode args\n"); |
933 | #endif | 932 | |
934 | rpc_stat = rpc_garbage_args; | 933 | rpc_stat = rpc_garbage_args; |
935 | err_bad: | 934 | err_bad: |
936 | serv->sv_stats->rpcbadfmt++; | 935 | serv->sv_stats->rpcbadfmt++; |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 45120f268d03..ff1f8bf680aa 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1062,15 +1062,19 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp) | |||
1062 | * bit set in the fragment length header. | 1062 | * bit set in the fragment length header. |
1063 | * But apparently no known nfs clients send fragmented | 1063 | * But apparently no known nfs clients send fragmented |
1064 | * records. */ | 1064 | * records. */ |
1065 | printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (non-terminal)\n", | 1065 | if (net_ratelimit()) |
1066 | (unsigned long) svsk->sk_reclen); | 1066 | printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx" |
1067 | " (non-terminal)\n", | ||
1068 | (unsigned long) svsk->sk_reclen); | ||
1067 | goto err_delete; | 1069 | goto err_delete; |
1068 | } | 1070 | } |
1069 | svsk->sk_reclen &= 0x7fffffff; | 1071 | svsk->sk_reclen &= 0x7fffffff; |
1070 | dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); | 1072 | dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); |
1071 | if (svsk->sk_reclen > serv->sv_max_mesg) { | 1073 | if (svsk->sk_reclen > serv->sv_max_mesg) { |
1072 | printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (large)\n", | 1074 | if (net_ratelimit()) |
1073 | (unsigned long) svsk->sk_reclen); | 1075 | printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx" |
1076 | " (large)\n", | ||
1077 | (unsigned long) svsk->sk_reclen); | ||
1074 | goto err_delete; | 1078 | goto err_delete; |
1075 | } | 1079 | } |
1076 | } | 1080 | } |
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 4241e0dfeeaf..f7b6705fd6a3 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst | |||
@@ -109,7 +109,7 @@ quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | |||
109 | quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) | 109 | quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) |
110 | cmd_gen = \ | 110 | cmd_gen = \ |
111 | FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ | 111 | FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ |
112 | STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z. A-Z_`; \ | 112 | STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \ |
113 | (echo "/* File autogenerated by 'make headers_install' */" ; \ | 113 | (echo "/* File autogenerated by 'make headers_install' */" ; \ |
114 | echo "\#ifndef $$STUBDEF" ; \ | 114 | echo "\#ifndef $$STUBDEF" ; \ |
115 | echo "\#define $$STUBDEF" ; \ | 115 | echo "\#define $$STUBDEF" ; \ |
diff --git a/sound/core/init.c b/sound/core/init.c index 6152a7554dfd..a4cc6b155ae9 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -361,8 +361,10 @@ static int snd_card_do_free(struct snd_card *card) | |||
361 | snd_printk(KERN_WARNING "unable to free card info\n"); | 361 | snd_printk(KERN_WARNING "unable to free card info\n"); |
362 | /* Not fatal error */ | 362 | /* Not fatal error */ |
363 | } | 363 | } |
364 | if (card->dev) | 364 | #ifndef CONFIG_SYSFS_DEPRECATED |
365 | device_unregister(card->dev); | 365 | if (card->card_dev) |
366 | device_unregister(card->card_dev); | ||
367 | #endif | ||
366 | kfree(card); | 368 | kfree(card); |
367 | return 0; | 369 | return 0; |
368 | } | 370 | } |
@@ -497,12 +499,14 @@ int snd_card_register(struct snd_card *card) | |||
497 | int err; | 499 | int err; |
498 | 500 | ||
499 | snd_assert(card != NULL, return -EINVAL); | 501 | snd_assert(card != NULL, return -EINVAL); |
500 | if (!card->dev) { | 502 | #ifndef CONFIG_SYSFS_DEPRECATED |
501 | card->dev = device_create(sound_class, card->parent, 0, | 503 | if (!card->card_dev) { |
502 | "card%i", card->number); | 504 | card->card_dev = device_create(sound_class, card->dev, 0, |
503 | if (IS_ERR(card->dev)) | 505 | "card%i", card->number); |
504 | card->dev = NULL; | 506 | if (IS_ERR(card->card_dev)) |
507 | card->card_dev = NULL; | ||
505 | } | 508 | } |
509 | #endif | ||
506 | if ((err = snd_device_register_all(card)) < 0) | 510 | if ((err = snd_device_register_all(card)) < 0) |
507 | return err; | 511 | return err; |
508 | mutex_lock(&snd_card_mutex); | 512 | mutex_lock(&snd_card_mutex); |
diff --git a/sound/core/sound.c b/sound/core/sound.c index 282742022de6..82a61c67cf3a 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -238,7 +238,7 @@ int snd_register_device(int type, struct snd_card *card, int dev, | |||
238 | { | 238 | { |
239 | int minor; | 239 | int minor; |
240 | struct snd_minor *preg; | 240 | struct snd_minor *preg; |
241 | struct device *device = NULL; | 241 | struct device *device = snd_card_get_device_link(card); |
242 | 242 | ||
243 | snd_assert(name, return -EINVAL); | 243 | snd_assert(name, return -EINVAL); |
244 | preg = kmalloc(sizeof *preg, GFP_KERNEL); | 244 | preg = kmalloc(sizeof *preg, GFP_KERNEL); |
@@ -263,8 +263,6 @@ int snd_register_device(int type, struct snd_card *card, int dev, | |||
263 | return minor; | 263 | return minor; |
264 | } | 264 | } |
265 | snd_minors[minor] = preg; | 265 | snd_minors[minor] = preg; |
266 | if (card) | ||
267 | device = card->dev; | ||
268 | preg->dev = device_create(sound_class, device, MKDEV(major, minor), | 266 | preg->dev = device_create(sound_class, device, MKDEV(major, minor), |
269 | "%s", name); | 267 | "%s", name); |
270 | if (preg->dev) | 268 | if (preg->dev) |
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index b2fc40aa520b..4566df41912a 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c | |||
@@ -106,7 +106,7 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev, | |||
106 | int cidx = SNDRV_MINOR_OSS_CARD(minor); | 106 | int cidx = SNDRV_MINOR_OSS_CARD(minor); |
107 | int track2 = -1; | 107 | int track2 = -1; |
108 | int register1 = -1, register2 = -1; | 108 | int register1 = -1, register2 = -1; |
109 | struct device *carddev = NULL; | 109 | struct device *carddev = snd_card_get_device_link(card); |
110 | 110 | ||
111 | if (card && card->number >= 8) | 111 | if (card && card->number >= 8) |
112 | return 0; /* ignore silently */ | 112 | return 0; /* ignore silently */ |
@@ -134,8 +134,6 @@ int snd_register_oss_device(int type, struct snd_card *card, int dev, | |||
134 | track2 = SNDRV_MINOR_OSS(cidx, SNDRV_MINOR_OSS_DMMIDI1); | 134 | track2 = SNDRV_MINOR_OSS(cidx, SNDRV_MINOR_OSS_DMMIDI1); |
135 | break; | 135 | break; |
136 | } | 136 | } |
137 | if (card) | ||
138 | carddev = card->dev; | ||
139 | register1 = register_sound_special_device(f_ops, minor, carddev); | 137 | register1 = register_sound_special_device(f_ops, minor, carddev); |
140 | if (register1 != minor) | 138 | if (register1 != minor) |
141 | goto __end; | 139 | goto __end; |