Annotation of /trunk/kernel26-alx/patches-2.6.27-r3/0114-2.6.27.15-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(hide annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 77770 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 77770 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | niro | 1176 | diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c |
2 | index 6568942..a15baac 100644 | ||
3 | --- a/arch/ia64/sn/kernel/io_acpi_init.c | ||
4 | +++ b/arch/ia64/sn/kernel/io_acpi_init.c | ||
5 | @@ -232,7 +232,7 @@ exit: | ||
6 | static unsigned int | ||
7 | get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) | ||
8 | { | ||
9 | - unsigned long adr; | ||
10 | + unsigned long long adr; | ||
11 | acpi_handle child; | ||
12 | unsigned int devfn; | ||
13 | int function; | ||
14 | @@ -292,8 +292,8 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) | ||
15 | static acpi_status | ||
16 | find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
17 | { | ||
18 | - unsigned long bbn = -1; | ||
19 | - unsigned long adr; | ||
20 | + unsigned long long bbn = -1; | ||
21 | + unsigned long long adr; | ||
22 | acpi_handle parent = NULL; | ||
23 | acpi_status status; | ||
24 | unsigned int devfn; | ||
25 | @@ -348,7 +348,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, | ||
26 | unsigned int host_devfn; | ||
27 | struct sn_pcidev_match pcidev_match; | ||
28 | acpi_handle rootbus_handle; | ||
29 | - unsigned long segment; | ||
30 | + unsigned long long segment; | ||
31 | acpi_status status; | ||
32 | |||
33 | rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; | ||
34 | diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig | ||
35 | index 2e7515e..04aa00b 100644 | ||
36 | --- a/arch/m68knommu/Kconfig | ||
37 | +++ b/arch/m68knommu/Kconfig | ||
38 | @@ -14,6 +14,10 @@ config MMU | ||
39 | bool | ||
40 | default n | ||
41 | |||
42 | +config NO_DMA | ||
43 | + bool | ||
44 | + default y | ||
45 | + | ||
46 | config FPU | ||
47 | bool | ||
48 | default n | ||
49 | diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig | ||
50 | index 388bae2..d0561fe 100644 | ||
51 | --- a/arch/x86/Kconfig | ||
52 | +++ b/arch/x86/Kconfig | ||
53 | @@ -123,6 +123,9 @@ config GENERIC_TIME_VSYSCALL | ||
54 | config ARCH_HAS_CPU_RELAX | ||
55 | def_bool y | ||
56 | |||
57 | +config ARCH_HAS_DEFAULT_IDLE | ||
58 | + def_bool y | ||
59 | + | ||
60 | config ARCH_HAS_CACHE_LINE_SIZE | ||
61 | def_bool y | ||
62 | |||
63 | diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c | ||
64 | index c2502eb..a4805b3 100644 | ||
65 | --- a/arch/x86/kernel/acpi/cstate.c | ||
66 | +++ b/arch/x86/kernel/acpi/cstate.c | ||
67 | @@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */ | ||
68 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; | ||
69 | |||
70 | #define MWAIT_SUBSTATE_MASK (0xf) | ||
71 | +#define MWAIT_CSTATE_MASK (0xf) | ||
72 | #define MWAIT_SUBSTATE_SIZE (4) | ||
73 | |||
74 | #define CPUID_MWAIT_LEAF (5) | ||
75 | @@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | ||
76 | cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx); | ||
77 | |||
78 | /* Check whether this particular cx_type (in CST) is supported or not */ | ||
79 | - cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1; | ||
80 | + cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) & | ||
81 | + MWAIT_CSTATE_MASK) + 1; | ||
82 | edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE); | ||
83 | num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK; | ||
84 | |||
85 | diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c | ||
86 | index 24e6094..dbeab3c 100644 | ||
87 | --- a/arch/x86/lib/usercopy_32.c | ||
88 | +++ b/arch/x86/lib/usercopy_32.c | ||
89 | @@ -49,7 +49,7 @@ do { \ | ||
90 | " jmp 2b\n" \ | ||
91 | ".previous\n" \ | ||
92 | _ASM_EXTABLE(0b,3b) \ | ||
93 | - : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ | ||
94 | + : "=&d"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \ | ||
95 | "=&D" (__d2) \ | ||
96 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ | ||
97 | : "memory"); \ | ||
98 | @@ -211,7 +211,7 @@ long strnlen_user(const char __user *s, long n) | ||
99 | " .align 4\n" | ||
100 | " .long 0b,2b\n" | ||
101 | ".previous" | ||
102 | - :"=r" (n), "=D" (s), "=a" (res), "=c" (tmp) | ||
103 | + :"=&r" (n), "=&D" (s), "=&a" (res), "=&c" (tmp) | ||
104 | :"0" (n), "1" (s), "2" (0), "3" (mask) | ||
105 | :"cc"); | ||
106 | return res & mask; | ||
107 | diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c | ||
108 | index f4df6e7..500b930 100644 | ||
109 | --- a/arch/x86/lib/usercopy_64.c | ||
110 | +++ b/arch/x86/lib/usercopy_64.c | ||
111 | @@ -32,7 +32,7 @@ do { \ | ||
112 | " jmp 2b\n" \ | ||
113 | ".previous\n" \ | ||
114 | _ASM_EXTABLE(0b,3b) \ | ||
115 | - : "=r"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ | ||
116 | + : "=&r"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \ | ||
117 | "=&D" (__d2) \ | ||
118 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ | ||
119 | : "memory"); \ | ||
120 | @@ -86,7 +86,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | ||
121 | ".previous\n" | ||
122 | _ASM_EXTABLE(0b,3b) | ||
123 | _ASM_EXTABLE(1b,2b) | ||
124 | - : [size8] "=c"(size), [dst] "=&D" (__d0) | ||
125 | + : [size8] "=&c"(size), [dst] "=&D" (__d0) | ||
126 | : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), | ||
127 | [zero] "r" (0UL), [eight] "r" (8UL)); | ||
128 | return size; | ||
129 | diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c | ||
130 | index 43e2f84..5b719a0 100644 | ||
131 | --- a/arch/x86/mm/pageattr.c | ||
132 | +++ b/arch/x86/mm/pageattr.c | ||
133 | @@ -582,6 +582,36 @@ out_unlock: | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | +static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr, | ||
138 | + int primary) | ||
139 | +{ | ||
140 | + /* | ||
141 | + * Ignore all non primary paths. | ||
142 | + */ | ||
143 | + if (!primary) | ||
144 | + return 0; | ||
145 | + | ||
146 | + /* | ||
147 | + * Ignore the NULL PTE for kernel identity mapping, as it is expected | ||
148 | + * to have holes. | ||
149 | + * Also set numpages to '1' indicating that we processed cpa req for | ||
150 | + * one virtual address page and its pfn. TBD: numpages can be set based | ||
151 | + * on the initial value and the level returned by lookup_address(). | ||
152 | + */ | ||
153 | + if (within(vaddr, PAGE_OFFSET, | ||
154 | + PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT))) { | ||
155 | + cpa->numpages = 1; | ||
156 | + cpa->pfn = __pa(vaddr) >> PAGE_SHIFT; | ||
157 | + return 0; | ||
158 | + } else { | ||
159 | + WARN(1, KERN_WARNING "CPA: called for zero pte. " | ||
160 | + "vaddr = %lx cpa->vaddr = %lx\n", vaddr, | ||
161 | + cpa->vaddr); | ||
162 | + | ||
163 | + return -EINVAL; | ||
164 | + } | ||
165 | +} | ||
166 | + | ||
167 | static int __change_page_attr(struct cpa_data *cpa, int primary) | ||
168 | { | ||
169 | unsigned long address = cpa->vaddr; | ||
170 | @@ -592,17 +622,11 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) | ||
171 | repeat: | ||
172 | kpte = lookup_address(address, &level); | ||
173 | if (!kpte) | ||
174 | - return 0; | ||
175 | + return __cpa_process_fault(cpa, address, primary); | ||
176 | |||
177 | old_pte = *kpte; | ||
178 | - if (!pte_val(old_pte)) { | ||
179 | - if (!primary) | ||
180 | - return 0; | ||
181 | - WARN(1, KERN_WARNING "CPA: called for zero pte. " | ||
182 | - "vaddr = %lx cpa->vaddr = %lx\n", address, | ||
183 | - cpa->vaddr); | ||
184 | - return -EINVAL; | ||
185 | - } | ||
186 | + if (!pte_val(old_pte)) | ||
187 | + return __cpa_process_fault(cpa, address, primary); | ||
188 | |||
189 | if (level == PG_LEVEL_4K) { | ||
190 | pte_t new_pte; | ||
191 | @@ -676,12 +700,7 @@ static int cpa_process_alias(struct cpa_data *cpa) | ||
192 | * mapping already: | ||
193 | */ | ||
194 | if (!(within(cpa->vaddr, PAGE_OFFSET, | ||
195 | - PAGE_OFFSET + (max_low_pfn_mapped << PAGE_SHIFT)) | ||
196 | -#ifdef CONFIG_X86_64 | ||
197 | - || within(cpa->vaddr, PAGE_OFFSET + (1UL<<32), | ||
198 | - PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT)) | ||
199 | -#endif | ||
200 | - )) { | ||
201 | + PAGE_OFFSET + (max_pfn_mapped << PAGE_SHIFT)))) { | ||
202 | |||
203 | alias_cpa = *cpa; | ||
204 | alias_cpa.vaddr = (unsigned long) __va(cpa->pfn << PAGE_SHIFT); | ||
205 | diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c | ||
206 | index 8e07718..95e76ce 100644 | ||
207 | --- a/arch/x86/pci/irq.c | ||
208 | +++ b/arch/x86/pci/irq.c | ||
209 | @@ -573,6 +573,7 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | ||
210 | case PCI_DEVICE_ID_INTEL_ICH7_1: | ||
211 | case PCI_DEVICE_ID_INTEL_ICH7_30: | ||
212 | case PCI_DEVICE_ID_INTEL_ICH7_31: | ||
213 | + case PCI_DEVICE_ID_INTEL_TGP_LPC: | ||
214 | case PCI_DEVICE_ID_INTEL_ESB2_0: | ||
215 | case PCI_DEVICE_ID_INTEL_ICH8_0: | ||
216 | case PCI_DEVICE_ID_INTEL_ICH8_1: | ||
217 | diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c | ||
218 | index 831883b..5e57a80 100644 | ||
219 | --- a/drivers/acpi/ac.c | ||
220 | +++ b/drivers/acpi/ac.c | ||
221 | @@ -85,7 +85,7 @@ struct acpi_ac { | ||
222 | struct power_supply charger; | ||
223 | #endif | ||
224 | struct acpi_device * device; | ||
225 | - unsigned long state; | ||
226 | + unsigned long long state; | ||
227 | }; | ||
228 | |||
229 | #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); | ||
230 | diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c | ||
231 | index 5f1127a..2b77316 100644 | ||
232 | --- a/drivers/acpi/acpi_memhotplug.c | ||
233 | +++ b/drivers/acpi/acpi_memhotplug.c | ||
234 | @@ -194,8 +194,7 @@ acpi_memory_get_device(acpi_handle handle, | ||
235 | |||
236 | static int acpi_memory_check_device(struct acpi_memory_device *mem_device) | ||
237 | { | ||
238 | - unsigned long current_status; | ||
239 | - | ||
240 | + unsigned long long current_status; | ||
241 | |||
242 | /* Get device present/absent information from the _STA */ | ||
243 | if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA", | ||
244 | @@ -264,7 +263,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) | ||
245 | acpi_status status; | ||
246 | struct acpi_object_list arg_list; | ||
247 | union acpi_object arg; | ||
248 | - unsigned long current_status; | ||
249 | + unsigned long long current_status; | ||
250 | |||
251 | |||
252 | /* Issue the _EJ0 command */ | ||
253 | diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c | ||
254 | index d3d0886..e2ab023 100644 | ||
255 | --- a/drivers/acpi/asus_acpi.c | ||
256 | +++ b/drivers/acpi/asus_acpi.c | ||
257 | @@ -753,7 +753,7 @@ static int get_lcd_state(void) | ||
258 | /* That's what the AML code does */ | ||
259 | lcd = out_obj.integer.value >> 8; | ||
260 | } else if (hotk->model == F3Sa) { | ||
261 | - unsigned long tmp; | ||
262 | + unsigned long long tmp; | ||
263 | union acpi_object param; | ||
264 | struct acpi_object_list input; | ||
265 | acpi_status status; | ||
266 | @@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void) | ||
267 | "default values\n", string); | ||
268 | printk(KERN_NOTICE | ||
269 | " send /proc/acpi/dsdt to the developers\n"); | ||
270 | + kfree(model); | ||
271 | + return -ENODEV; | ||
272 | } | ||
273 | hotk->methods = &model_conf[hotk->model]; | ||
274 | return AE_OK; | ||
275 | diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c | ||
276 | index b1c723f..e5ca3a0 100644 | ||
277 | --- a/drivers/acpi/battery.c | ||
278 | +++ b/drivers/acpi/battery.c | ||
279 | @@ -472,7 +472,7 @@ static void sysfs_remove_battery(struct acpi_battery *battery) | ||
280 | |||
281 | static int acpi_battery_update(struct acpi_battery *battery) | ||
282 | { | ||
283 | - int result; | ||
284 | + int result, old_present = acpi_battery_present(battery); | ||
285 | result = acpi_battery_get_status(battery); | ||
286 | if (result) | ||
287 | return result; | ||
288 | @@ -483,7 +483,8 @@ static int acpi_battery_update(struct acpi_battery *battery) | ||
289 | return 0; | ||
290 | } | ||
291 | #endif | ||
292 | - if (!battery->update_time) { | ||
293 | + if (!battery->update_time || | ||
294 | + old_present != acpi_battery_present(battery)) { | ||
295 | result = acpi_battery_get_info(battery); | ||
296 | if (result) | ||
297 | return result; | ||
298 | diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c | ||
299 | index 61b6c5b..23a51e4 100644 | ||
300 | --- a/drivers/acpi/bay.c | ||
301 | +++ b/drivers/acpi/bay.c | ||
302 | @@ -90,7 +90,7 @@ static int is_ejectable(acpi_handle handle) | ||
303 | */ | ||
304 | static int bay_present(struct bay *bay) | ||
305 | { | ||
306 | - unsigned long sta; | ||
307 | + unsigned long long sta; | ||
308 | acpi_status status; | ||
309 | |||
310 | if (bay) { | ||
311 | diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c | ||
312 | index c54f38e..60c34ed 100644 | ||
313 | --- a/drivers/acpi/bus.c | ||
314 | +++ b/drivers/acpi/bus.c | ||
315 | @@ -77,7 +77,7 @@ EXPORT_SYMBOL(acpi_bus_get_device); | ||
316 | int acpi_bus_get_status(struct acpi_device *device) | ||
317 | { | ||
318 | acpi_status status = AE_OK; | ||
319 | - unsigned long sta = 0; | ||
320 | + unsigned long long sta = 0; | ||
321 | |||
322 | |||
323 | if (!device) | ||
324 | @@ -155,7 +155,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state) | ||
325 | int result = 0; | ||
326 | acpi_status status = 0; | ||
327 | struct acpi_device *device = NULL; | ||
328 | - unsigned long psc = 0; | ||
329 | + unsigned long long psc = 0; | ||
330 | |||
331 | |||
332 | result = acpi_bus_get_device(handle, &device); | ||
333 | diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c | ||
334 | index 59352d9..9e8e8a6 100644 | ||
335 | --- a/drivers/acpi/button.c | ||
336 | +++ b/drivers/acpi/button.c | ||
337 | @@ -145,7 +145,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) | ||
338 | { | ||
339 | struct acpi_button *button = seq->private; | ||
340 | acpi_status status; | ||
341 | - unsigned long state; | ||
342 | + unsigned long long state; | ||
343 | |||
344 | if (!button || !button->device) | ||
345 | return 0; | ||
346 | @@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct acpi_device *device) | ||
347 | -------------------------------------------------------------------------- */ | ||
348 | static int acpi_lid_send_state(struct acpi_button *button) | ||
349 | { | ||
350 | - unsigned long state; | ||
351 | + unsigned long long state; | ||
352 | acpi_status status; | ||
353 | |||
354 | status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, | ||
355 | diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c | ||
356 | index 3c25ec7..cfa5fd6 100644 | ||
357 | --- a/drivers/acpi/container.c | ||
358 | +++ b/drivers/acpi/container.c | ||
359 | @@ -76,7 +76,7 @@ static int is_device_present(acpi_handle handle) | ||
360 | { | ||
361 | acpi_handle temp; | ||
362 | acpi_status status; | ||
363 | - unsigned long sta; | ||
364 | + unsigned long long sta; | ||
365 | |||
366 | |||
367 | status = acpi_get_handle(handle, "_STA", &temp); | ||
368 | diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c | ||
369 | index 4613b9c..279a5a6 100644 | ||
370 | --- a/drivers/acpi/dispatcher/dsmethod.c | ||
371 | +++ b/drivers/acpi/dispatcher/dsmethod.c | ||
372 | @@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) | ||
373 | NULL); | ||
374 | acpi_ex_enter_interpreter(); | ||
375 | } | ||
376 | + | ||
377 | + acpi_ds_clear_implicit_return(walk_state); | ||
378 | + | ||
379 | #ifdef ACPI_DISASSEMBLER | ||
380 | if (ACPI_FAILURE(status)) { | ||
381 | |||
382 | diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c | ||
383 | index 25d2161..e28469e 100644 | ||
384 | --- a/drivers/acpi/dock.c | ||
385 | +++ b/drivers/acpi/dock.c | ||
386 | @@ -229,7 +229,7 @@ EXPORT_SYMBOL_GPL(is_dock_device); | ||
387 | */ | ||
388 | static int dock_present(struct dock_station *ds) | ||
389 | { | ||
390 | - unsigned long sta; | ||
391 | + unsigned long long sta; | ||
392 | acpi_status status; | ||
393 | |||
394 | if (ds) { | ||
395 | @@ -730,13 +730,13 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); | ||
396 | static ssize_t show_dock_uid(struct device *dev, | ||
397 | struct device_attribute *attr, char *buf) | ||
398 | { | ||
399 | - unsigned long lbuf; | ||
400 | + unsigned long long lbuf; | ||
401 | acpi_status status = acpi_evaluate_integer(dock_station->handle, | ||
402 | "_UID", NULL, &lbuf); | ||
403 | if (ACPI_FAILURE(status)) | ||
404 | return 0; | ||
405 | |||
406 | - return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf); | ||
407 | + return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf); | ||
408 | } | ||
409 | static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); | ||
410 | |||
411 | diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c | ||
412 | index 9ab3fb9..566206a 100644 | ||
413 | --- a/drivers/acpi/ec.c | ||
414 | +++ b/drivers/acpi/ec.c | ||
415 | @@ -769,6 +769,7 @@ static acpi_status | ||
416 | ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) | ||
417 | { | ||
418 | acpi_status status; | ||
419 | + unsigned long long tmp = 0; | ||
420 | |||
421 | struct acpi_ec *ec = context; | ||
422 | status = acpi_walk_resources(handle, METHOD_NAME__CRS, | ||
423 | @@ -778,11 +779,14 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) | ||
424 | |||
425 | /* Get GPE bit assignment (EC events). */ | ||
426 | /* TODO: Add support for _GPE returning a package */ | ||
427 | - status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe); | ||
428 | + status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp); | ||
429 | if (ACPI_FAILURE(status)) | ||
430 | return status; | ||
431 | + ec->gpe = tmp; | ||
432 | /* Use the global lock for all EC transactions? */ | ||
433 | - acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); | ||
434 | + tmp = 0; | ||
435 | + acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); | ||
436 | + ec->global_lock = tmp; | ||
437 | ec->handle = handle; | ||
438 | return AE_CTRL_TERMINATE; | ||
439 | } | ||
440 | diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c | ||
441 | index b0817e1..337fb04 100644 | ||
442 | --- a/drivers/acpi/namespace/nsutils.c | ||
443 | +++ b/drivers/acpi/namespace/nsutils.c | ||
444 | @@ -314,9 +314,15 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) | ||
445 | * | ||
446 | * strlen() + 1 covers the first name_seg, which has no path separator | ||
447 | */ | ||
448 | - if (acpi_ns_valid_root_prefix(next_external_char[0])) { | ||
449 | + if (acpi_ns_valid_root_prefix(*next_external_char)) { | ||
450 | info->fully_qualified = TRUE; | ||
451 | next_external_char++; | ||
452 | + | ||
453 | + /* Skip redundant root_prefix, like \\_SB.PCI0.SBRG.EC0 */ | ||
454 | + | ||
455 | + while (acpi_ns_valid_root_prefix(*next_external_char)) { | ||
456 | + next_external_char++; | ||
457 | + } | ||
458 | } else { | ||
459 | /* | ||
460 | * Handle Carat prefixes | ||
461 | diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c | ||
462 | index a287ed5..3cb910d 100644 | ||
463 | --- a/drivers/acpi/namespace/nsxfname.c | ||
464 | +++ b/drivers/acpi/namespace/nsxfname.c | ||
465 | @@ -253,6 +253,7 @@ acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) | ||
466 | node = acpi_ns_map_handle_to_node(handle); | ||
467 | if (!node) { | ||
468 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
469 | + status = AE_BAD_PARAMETER; | ||
470 | goto cleanup; | ||
471 | } | ||
472 | |||
473 | diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c | ||
474 | index cb9864e..25ceae9 100644 | ||
475 | --- a/drivers/acpi/numa.c | ||
476 | +++ b/drivers/acpi/numa.c | ||
477 | @@ -258,7 +258,7 @@ int __init acpi_numa_init(void) | ||
478 | |||
479 | int acpi_get_pxm(acpi_handle h) | ||
480 | { | ||
481 | - unsigned long pxm; | ||
482 | + unsigned long long pxm; | ||
483 | acpi_status status; | ||
484 | acpi_handle handle; | ||
485 | acpi_handle phandle = h; | ||
486 | diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c | ||
487 | index b0d40aa..f5beb8a 100644 | ||
488 | --- a/drivers/acpi/osl.c | ||
489 | +++ b/drivers/acpi/osl.c | ||
490 | @@ -608,7 +608,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */ | ||
491 | acpi_handle handle; | ||
492 | struct acpi_pci_id *pci_id = *id; | ||
493 | acpi_status status; | ||
494 | - unsigned long temp; | ||
495 | + unsigned long long temp; | ||
496 | acpi_object_type type; | ||
497 | |||
498 | acpi_get_parent(chandle, &handle); | ||
499 | @@ -620,8 +620,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */ | ||
500 | if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE)) | ||
501 | return; | ||
502 | |||
503 | - status = | ||
504 | - acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, | ||
505 | + status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, | ||
506 | &temp); | ||
507 | if (ACPI_SUCCESS(status)) { | ||
508 | u32 val; | ||
509 | diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c | ||
510 | index 15e1702..a05e2a3 100644 | ||
511 | --- a/drivers/acpi/parser/psparse.c | ||
512 | +++ b/drivers/acpi/parser/psparse.c | ||
513 | @@ -641,10 +641,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | ||
514 | ACPI_WALK_METHOD_RESTART; | ||
515 | } | ||
516 | } else { | ||
517 | - /* On error, delete any return object */ | ||
518 | + /* On error, delete any return object or implicit return */ | ||
519 | |||
520 | acpi_ut_remove_reference(previous_walk_state-> | ||
521 | return_desc); | ||
522 | + acpi_ds_clear_implicit_return | ||
523 | + (previous_walk_state); | ||
524 | } | ||
525 | } | ||
526 | |||
527 | diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c | ||
528 | index cf47805..0ea8a9f 100644 | ||
529 | --- a/drivers/acpi/pci_link.c | ||
530 | +++ b/drivers/acpi/pci_link.c | ||
531 | @@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_device *dev) | ||
532 | struct list_head *node = NULL; | ||
533 | struct acpi_pci_link *link = NULL; | ||
534 | |||
535 | - | ||
536 | - /* Make sure SCI is enabled again (Apple firmware bug?) */ | ||
537 | - acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1); | ||
538 | - | ||
539 | list_for_each(node, &acpi_link.entries) { | ||
540 | link = list_entry(node, struct acpi_pci_link, node); | ||
541 | if (!link) { | ||
542 | diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c | ||
543 | index c3fed31..18ff4e5 100644 | ||
544 | --- a/drivers/acpi/pci_root.c | ||
545 | +++ b/drivers/acpi/pci_root.c | ||
546 | @@ -190,7 +190,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) | ||
547 | struct acpi_pci_root *root = NULL; | ||
548 | struct acpi_pci_root *tmp; | ||
549 | acpi_status status = AE_OK; | ||
550 | - unsigned long value = 0; | ||
551 | + unsigned long long value = 0; | ||
552 | acpi_handle handle = NULL; | ||
553 | struct acpi_device *child; | ||
554 | |||
555 | diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c | ||
556 | index 8d4a568..cd1f446 100644 | ||
557 | --- a/drivers/acpi/pci_slot.c | ||
558 | +++ b/drivers/acpi/pci_slot.c | ||
559 | @@ -76,10 +76,10 @@ static struct acpi_pci_driver acpi_pci_slot_driver = { | ||
560 | }; | ||
561 | |||
562 | static int | ||
563 | -check_slot(acpi_handle handle, unsigned long *sun) | ||
564 | +check_slot(acpi_handle handle, unsigned long long *sun) | ||
565 | { | ||
566 | int device = -1; | ||
567 | - unsigned long adr, sta; | ||
568 | + unsigned long long adr, sta; | ||
569 | acpi_status status; | ||
570 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
571 | |||
572 | @@ -132,7 +132,7 @@ static acpi_status | ||
573 | register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
574 | { | ||
575 | int device; | ||
576 | - unsigned long sun; | ||
577 | + unsigned long long sun; | ||
578 | char name[SLOT_NAME_SIZE]; | ||
579 | struct acpi_pci_slot *slot; | ||
580 | struct pci_slot *pci_slot; | ||
581 | @@ -182,7 +182,7 @@ static acpi_status | ||
582 | walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
583 | { | ||
584 | int device, function; | ||
585 | - unsigned long adr; | ||
586 | + unsigned long long adr; | ||
587 | acpi_status status; | ||
588 | acpi_handle dummy_handle; | ||
589 | acpi_walk_callback user_function; | ||
590 | @@ -239,7 +239,7 @@ static int | ||
591 | walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function) | ||
592 | { | ||
593 | int seg, bus; | ||
594 | - unsigned long tmp; | ||
595 | + unsigned long long tmp; | ||
596 | acpi_status status; | ||
597 | acpi_handle dummy_handle; | ||
598 | struct pci_bus *pci_bus; | ||
599 | diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c | ||
600 | index 4ab21cb..89e5d2a 100644 | ||
601 | --- a/drivers/acpi/power.c | ||
602 | +++ b/drivers/acpi/power.c | ||
603 | @@ -131,7 +131,7 @@ acpi_power_get_context(acpi_handle handle, | ||
604 | static int acpi_power_get_state(struct acpi_power_resource *resource, int *state) | ||
605 | { | ||
606 | acpi_status status = AE_OK; | ||
607 | - unsigned long sta = 0; | ||
608 | + unsigned long long sta = 0; | ||
609 | |||
610 | |||
611 | if (!resource || !state) | ||
612 | diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c | ||
613 | index ee68ac5..8a27871 100644 | ||
614 | --- a/drivers/acpi/processor_core.c | ||
615 | +++ b/drivers/acpi/processor_core.c | ||
616 | @@ -563,7 +563,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid) | ||
617 | |||
618 | /* Check if it is a Device with HID and UID */ | ||
619 | if (has_uid) { | ||
620 | - unsigned long value; | ||
621 | + unsigned long long value; | ||
622 | status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID, | ||
623 | NULL, &value); | ||
624 | if (ACPI_FAILURE(status)) { | ||
625 | @@ -875,7 +875,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | ||
626 | static int is_processor_present(acpi_handle handle) | ||
627 | { | ||
628 | acpi_status status; | ||
629 | - unsigned long sta = 0; | ||
630 | + unsigned long long sta = 0; | ||
631 | |||
632 | |||
633 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | ||
634 | diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c | ||
635 | index cf5b1b7..81b40ed 100644 | ||
636 | --- a/drivers/acpi/processor_idle.c | ||
637 | +++ b/drivers/acpi/processor_idle.c | ||
638 | @@ -1587,6 +1587,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | ||
639 | |||
640 | if (acpi_idle_bm_check()) { | ||
641 | if (dev->safe_state) { | ||
642 | + dev->last_state = dev->safe_state; | ||
643 | return dev->safe_state->enter(dev, dev->safe_state); | ||
644 | } else { | ||
645 | local_irq_disable(); | ||
646 | diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c | ||
647 | index 80c251e..f8129c7 100644 | ||
648 | --- a/drivers/acpi/processor_perflib.c | ||
649 | +++ b/drivers/acpi/processor_perflib.c | ||
650 | @@ -126,7 +126,7 @@ static struct notifier_block acpi_ppc_notifier_block = { | ||
651 | static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | ||
652 | { | ||
653 | acpi_status status = 0; | ||
654 | - unsigned long ppc = 0; | ||
655 | + unsigned long long ppc = 0; | ||
656 | |||
657 | |||
658 | if (!pr) | ||
659 | diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c | ||
660 | index a56fc6c..3097b75 100644 | ||
661 | --- a/drivers/acpi/processor_throttling.c | ||
662 | +++ b/drivers/acpi/processor_throttling.c | ||
663 | @@ -274,7 +274,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data) | ||
664 | static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | ||
665 | { | ||
666 | acpi_status status = 0; | ||
667 | - unsigned long tpc = 0; | ||
668 | + unsigned long long tpc = 0; | ||
669 | |||
670 | if (!pr) | ||
671 | return -EINVAL; | ||
672 | diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c | ||
673 | index a4e3767..81d23d3 100644 | ||
674 | --- a/drivers/acpi/sbshc.c | ||
675 | +++ b/drivers/acpi/sbshc.c | ||
676 | @@ -258,7 +258,7 @@ extern int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, | ||
677 | static int acpi_smbus_hc_add(struct acpi_device *device) | ||
678 | { | ||
679 | int status; | ||
680 | - unsigned long val; | ||
681 | + unsigned long long val; | ||
682 | struct acpi_smb_hc *hc; | ||
683 | |||
684 | if (!device) | ||
685 | diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c | ||
686 | index 0450761..afa66f4 100644 | ||
687 | --- a/drivers/acpi/scan.c | ||
688 | +++ b/drivers/acpi/scan.c | ||
689 | @@ -1262,6 +1262,16 @@ acpi_add_single_object(struct acpi_device **child, | ||
690 | acpi_device_set_id(device, parent, handle, type); | ||
691 | |||
692 | /* | ||
693 | + * The ACPI device is attached to acpi handle before getting | ||
694 | + * the power/wakeup/peformance flags. Otherwise OS can't get | ||
695 | + * the corresponding ACPI device by the acpi handle in the course | ||
696 | + * of getting the power/wakeup/performance flags. | ||
697 | + */ | ||
698 | + result = acpi_device_set_context(device, type); | ||
699 | + if (result) | ||
700 | + goto end; | ||
701 | + | ||
702 | + /* | ||
703 | * Power Management | ||
704 | * ---------------- | ||
705 | */ | ||
706 | @@ -1291,8 +1301,6 @@ acpi_add_single_object(struct acpi_device **child, | ||
707 | goto end; | ||
708 | } | ||
709 | |||
710 | - if ((result = acpi_device_set_context(device, type))) | ||
711 | - goto end; | ||
712 | |||
713 | result = acpi_device_register(device, parent); | ||
714 | |||
715 | diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c | ||
716 | index 3706469..e7e0aac 100644 | ||
717 | --- a/drivers/acpi/sleep/main.c | ||
718 | +++ b/drivers/acpi/sleep/main.c | ||
719 | @@ -344,6 +344,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | ||
720 | DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), | ||
721 | }, | ||
722 | }, | ||
723 | + { | ||
724 | + .callback = init_old_suspend_ordering, | ||
725 | + .ident = "HP xw4600 Workstation", | ||
726 | + .matches = { | ||
727 | + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
728 | + DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"), | ||
729 | + }, | ||
730 | + }, | ||
731 | {}, | ||
732 | }; | ||
733 | #endif /* CONFIG_SUSPEND */ | ||
734 | @@ -492,7 +500,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p) | ||
735 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); | ||
736 | struct acpi_device *adev; | ||
737 | char acpi_method[] = "_SxD"; | ||
738 | - unsigned long d_min, d_max; | ||
739 | + unsigned long long d_min, d_max; | ||
740 | |||
741 | if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { | ||
742 | printk(KERN_DEBUG "ACPI handle has no context!\n"); | ||
743 | diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c | ||
744 | index 9127036..47abb94 100644 | ||
745 | --- a/drivers/acpi/thermal.c | ||
746 | +++ b/drivers/acpi/thermal.c | ||
747 | @@ -246,18 +246,18 @@ static const struct file_operations acpi_thermal_polling_fops = { | ||
748 | static int acpi_thermal_get_temperature(struct acpi_thermal *tz) | ||
749 | { | ||
750 | acpi_status status = AE_OK; | ||
751 | - | ||
752 | + unsigned long long tmp; | ||
753 | |||
754 | if (!tz) | ||
755 | return -EINVAL; | ||
756 | |||
757 | tz->last_temperature = tz->temperature; | ||
758 | |||
759 | - status = | ||
760 | - acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tz->temperature); | ||
761 | + status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp); | ||
762 | if (ACPI_FAILURE(status)) | ||
763 | return -ENODEV; | ||
764 | |||
765 | + tz->temperature = tmp; | ||
766 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", | ||
767 | tz->temperature)); | ||
768 | |||
769 | @@ -267,17 +267,16 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz) | ||
770 | static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) | ||
771 | { | ||
772 | acpi_status status = AE_OK; | ||
773 | - | ||
774 | + unsigned long long tmp; | ||
775 | |||
776 | if (!tz) | ||
777 | return -EINVAL; | ||
778 | |||
779 | - status = | ||
780 | - acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, | ||
781 | - &tz->polling_frequency); | ||
782 | + status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp); | ||
783 | if (ACPI_FAILURE(status)) | ||
784 | return -ENODEV; | ||
785 | |||
786 | + tz->polling_frequency = tmp; | ||
787 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n", | ||
788 | tz->polling_frequency)); | ||
789 | |||
790 | @@ -356,6 +355,7 @@ do { \ | ||
791 | static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
792 | { | ||
793 | acpi_status status = AE_OK; | ||
794 | + unsigned long long tmp; | ||
795 | struct acpi_handle_list devices; | ||
796 | int valid = 0; | ||
797 | int i; | ||
798 | @@ -363,7 +363,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
799 | /* Critical Shutdown (required) */ | ||
800 | if (flag & ACPI_TRIPS_CRITICAL) { | ||
801 | status = acpi_evaluate_integer(tz->device->handle, | ||
802 | - "_CRT", NULL, &tz->trips.critical.temperature); | ||
803 | + "_CRT", NULL, &tmp); | ||
804 | + tz->trips.critical.temperature = tmp; | ||
805 | /* | ||
806 | * Treat freezing temperatures as invalid as well; some | ||
807 | * BIOSes return really low values and cause reboots at startup. | ||
808 | @@ -399,12 +400,13 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
809 | /* Critical Sleep (optional) */ | ||
810 | if (flag & ACPI_TRIPS_HOT) { | ||
811 | status = acpi_evaluate_integer(tz->device->handle, | ||
812 | - "_HOT", NULL, &tz->trips.hot.temperature); | ||
813 | + "_HOT", NULL, &tmp); | ||
814 | if (ACPI_FAILURE(status)) { | ||
815 | tz->trips.hot.flags.valid = 0; | ||
816 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
817 | "No hot threshold\n")); | ||
818 | } else { | ||
819 | + tz->trips.hot.temperature = tmp; | ||
820 | tz->trips.hot.flags.valid = 1; | ||
821 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
822 | "Found hot threshold [%lu]\n", | ||
823 | @@ -418,33 +420,40 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
824 | if (psv == -1) { | ||
825 | status = AE_SUPPORT; | ||
826 | } else if (psv > 0) { | ||
827 | - tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv); | ||
828 | + tmp = CELSIUS_TO_KELVIN(psv); | ||
829 | status = AE_OK; | ||
830 | } else { | ||
831 | status = acpi_evaluate_integer(tz->device->handle, | ||
832 | - "_PSV", NULL, &tz->trips.passive.temperature); | ||
833 | + "_PSV", NULL, &tmp); | ||
834 | } | ||
835 | |||
836 | if (ACPI_FAILURE(status)) | ||
837 | tz->trips.passive.flags.valid = 0; | ||
838 | else { | ||
839 | + tz->trips.passive.temperature = tmp; | ||
840 | tz->trips.passive.flags.valid = 1; | ||
841 | if (flag == ACPI_TRIPS_INIT) { | ||
842 | status = acpi_evaluate_integer( | ||
843 | tz->device->handle, "_TC1", | ||
844 | - NULL, &tz->trips.passive.tc1); | ||
845 | + NULL, &tmp); | ||
846 | if (ACPI_FAILURE(status)) | ||
847 | tz->trips.passive.flags.valid = 0; | ||
848 | + else | ||
849 | + tz->trips.passive.tc1 = tmp; | ||
850 | status = acpi_evaluate_integer( | ||
851 | tz->device->handle, "_TC2", | ||
852 | - NULL, &tz->trips.passive.tc2); | ||
853 | + NULL, &tmp); | ||
854 | if (ACPI_FAILURE(status)) | ||
855 | tz->trips.passive.flags.valid = 0; | ||
856 | + else | ||
857 | + tz->trips.passive.tc2 = tmp; | ||
858 | status = acpi_evaluate_integer( | ||
859 | tz->device->handle, "_TSP", | ||
860 | - NULL, &tz->trips.passive.tsp); | ||
861 | + NULL, &tmp); | ||
862 | if (ACPI_FAILURE(status)) | ||
863 | tz->trips.passive.flags.valid = 0; | ||
864 | + else | ||
865 | + tz->trips.passive.tsp = tmp; | ||
866 | } | ||
867 | } | ||
868 | } | ||
869 | @@ -479,7 +488,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
870 | |||
871 | if (flag & ACPI_TRIPS_ACTIVE) { | ||
872 | status = acpi_evaluate_integer(tz->device->handle, | ||
873 | - name, NULL, &tz->trips.active[i].temperature); | ||
874 | + name, NULL, &tmp); | ||
875 | if (ACPI_FAILURE(status)) { | ||
876 | tz->trips.active[i].flags.valid = 0; | ||
877 | if (i == 0) | ||
878 | @@ -500,8 +509,10 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) | ||
879 | tz->trips.active[i - 2].temperature : | ||
880 | CELSIUS_TO_KELVIN(act)); | ||
881 | break; | ||
882 | - } else | ||
883 | + } else { | ||
884 | + tz->trips.active[i].temperature = tmp; | ||
885 | tz->trips.active[i].flags.valid = 1; | ||
886 | + } | ||
887 | } | ||
888 | |||
889 | name[2] = 'L'; | ||
890 | diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c | ||
891 | index 1009261..e827be3 100644 | ||
892 | --- a/drivers/acpi/utils.c | ||
893 | +++ b/drivers/acpi/utils.c | ||
894 | @@ -256,7 +256,7 @@ EXPORT_SYMBOL(acpi_extract_package); | ||
895 | acpi_status | ||
896 | acpi_evaluate_integer(acpi_handle handle, | ||
897 | acpi_string pathname, | ||
898 | - struct acpi_object_list *arguments, unsigned long *data) | ||
899 | + struct acpi_object_list *arguments, unsigned long long *data) | ||
900 | { | ||
901 | acpi_status status = AE_OK; | ||
902 | union acpi_object *element; | ||
903 | @@ -288,7 +288,7 @@ acpi_evaluate_integer(acpi_handle handle, | ||
904 | *data = element->integer.value; | ||
905 | kfree(element); | ||
906 | |||
907 | - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); | ||
908 | + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data)); | ||
909 | |||
910 | return AE_OK; | ||
911 | } | ||
912 | diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c | ||
913 | index e8a51a1..42e1e84 100644 | ||
914 | --- a/drivers/acpi/video.c | ||
915 | +++ b/drivers/acpi/video.c | ||
916 | @@ -291,20 +291,20 @@ static int acpi_video_device_lcd_set_level(struct acpi_video_device *device, | ||
917 | int level); | ||
918 | static int acpi_video_device_lcd_get_level_current( | ||
919 | struct acpi_video_device *device, | ||
920 | - unsigned long *level); | ||
921 | + unsigned long long *level); | ||
922 | static int acpi_video_get_next_level(struct acpi_video_device *device, | ||
923 | u32 level_current, u32 event); | ||
924 | static void acpi_video_switch_brightness(struct acpi_video_device *device, | ||
925 | int event); | ||
926 | static int acpi_video_device_get_state(struct acpi_video_device *device, | ||
927 | - unsigned long *state); | ||
928 | + unsigned long long *state); | ||
929 | static int acpi_video_output_get(struct output_device *od); | ||
930 | static int acpi_video_device_set_state(struct acpi_video_device *device, int state); | ||
931 | |||
932 | /*backlight device sysfs support*/ | ||
933 | static int acpi_video_get_brightness(struct backlight_device *bd) | ||
934 | { | ||
935 | - unsigned long cur_level; | ||
936 | + unsigned long long cur_level; | ||
937 | int i; | ||
938 | struct acpi_video_device *vd = | ||
939 | (struct acpi_video_device *)bl_get_data(bd); | ||
940 | @@ -336,7 +336,7 @@ static struct backlight_ops acpi_backlight_ops = { | ||
941 | /*video output device sysfs support*/ | ||
942 | static int acpi_video_output_get(struct output_device *od) | ||
943 | { | ||
944 | - unsigned long state; | ||
945 | + unsigned long long state; | ||
946 | struct acpi_video_device *vd = | ||
947 | (struct acpi_video_device *)dev_get_drvdata(&od->dev); | ||
948 | acpi_video_device_get_state(vd, &state); | ||
949 | @@ -370,7 +370,7 @@ static int video_get_cur_state(struct thermal_cooling_device *cdev, char *buf) | ||
950 | { | ||
951 | struct acpi_device *device = cdev->devdata; | ||
952 | struct acpi_video_device *video = acpi_driver_data(device); | ||
953 | - unsigned long level; | ||
954 | + unsigned long long level; | ||
955 | int state; | ||
956 | |||
957 | acpi_video_device_lcd_get_level_current(video, &level); | ||
958 | @@ -410,7 +410,7 @@ static struct thermal_cooling_device_ops video_cooling_ops = { | ||
959 | /* device */ | ||
960 | |||
961 | static int | ||
962 | -acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) | ||
963 | +acpi_video_device_query(struct acpi_video_device *device, unsigned long long *state) | ||
964 | { | ||
965 | int status; | ||
966 | |||
967 | @@ -421,7 +421,7 @@ acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) | ||
968 | |||
969 | static int | ||
970 | acpi_video_device_get_state(struct acpi_video_device *device, | ||
971 | - unsigned long *state) | ||
972 | + unsigned long long *state) | ||
973 | { | ||
974 | int status; | ||
975 | |||
976 | @@ -436,7 +436,7 @@ acpi_video_device_set_state(struct acpi_video_device *device, int state) | ||
977 | int status; | ||
978 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; | ||
979 | struct acpi_object_list args = { 1, &arg0 }; | ||
980 | - unsigned long ret; | ||
981 | + unsigned long long ret; | ||
982 | |||
983 | |||
984 | arg0.integer.value = state; | ||
985 | @@ -482,6 +482,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) | ||
986 | int status = AE_OK; | ||
987 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; | ||
988 | struct acpi_object_list args = { 1, &arg0 }; | ||
989 | + int state; | ||
990 | |||
991 | |||
992 | arg0.integer.value = level; | ||
993 | @@ -490,12 +491,16 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) | ||
994 | status = acpi_evaluate_object(device->dev->handle, "_BCM", | ||
995 | &args, NULL); | ||
996 | device->brightness->curr = level; | ||
997 | + for (state = 2; state < device->brightness->count; state++) | ||
998 | + if (level == device->brightness->levels[state]) | ||
999 | + device->backlight->props.brightness = state - 2; | ||
1000 | + | ||
1001 | return status; | ||
1002 | } | ||
1003 | |||
1004 | static int | ||
1005 | acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | ||
1006 | - unsigned long *level) | ||
1007 | + unsigned long long *level) | ||
1008 | { | ||
1009 | if (device->cap._BQC) | ||
1010 | return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, | ||
1011 | @@ -549,7 +554,7 @@ static int | ||
1012 | acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option) | ||
1013 | { | ||
1014 | int status; | ||
1015 | - unsigned long tmp; | ||
1016 | + unsigned long long tmp; | ||
1017 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; | ||
1018 | struct acpi_object_list args = { 1, &arg0 }; | ||
1019 | |||
1020 | @@ -564,7 +569,7 @@ acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option) | ||
1021 | } | ||
1022 | |||
1023 | static int | ||
1024 | -acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id) | ||
1025 | +acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long long *id) | ||
1026 | { | ||
1027 | int status; | ||
1028 | |||
1029 | @@ -575,7 +580,7 @@ acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id) | ||
1030 | |||
1031 | static int | ||
1032 | acpi_video_bus_POST_options(struct acpi_video_bus *video, | ||
1033 | - unsigned long *options) | ||
1034 | + unsigned long long *options) | ||
1035 | { | ||
1036 | int status; | ||
1037 | |||
1038 | @@ -918,7 +923,7 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) | ||
1039 | { | ||
1040 | int status; | ||
1041 | struct acpi_video_device *dev = seq->private; | ||
1042 | - unsigned long state; | ||
1043 | + unsigned long long state; | ||
1044 | |||
1045 | |||
1046 | if (!dev) | ||
1047 | @@ -927,14 +932,14 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) | ||
1048 | status = acpi_video_device_get_state(dev, &state); | ||
1049 | seq_printf(seq, "state: "); | ||
1050 | if (ACPI_SUCCESS(status)) | ||
1051 | - seq_printf(seq, "0x%02lx\n", state); | ||
1052 | + seq_printf(seq, "0x%02llx\n", state); | ||
1053 | else | ||
1054 | seq_printf(seq, "<not supported>\n"); | ||
1055 | |||
1056 | status = acpi_video_device_query(dev, &state); | ||
1057 | seq_printf(seq, "query: "); | ||
1058 | if (ACPI_SUCCESS(status)) | ||
1059 | - seq_printf(seq, "0x%02lx\n", state); | ||
1060 | + seq_printf(seq, "0x%02llx\n", state); | ||
1061 | else | ||
1062 | seq_printf(seq, "<not supported>\n"); | ||
1063 | |||
1064 | @@ -1217,7 +1222,7 @@ static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file) | ||
1065 | static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) | ||
1066 | { | ||
1067 | struct acpi_video_bus *video = seq->private; | ||
1068 | - unsigned long options; | ||
1069 | + unsigned long long options; | ||
1070 | int status; | ||
1071 | |||
1072 | |||
1073 | @@ -1232,7 +1237,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) | ||
1074 | printk(KERN_WARNING PREFIX | ||
1075 | "This indicates a BIOS bug. Please contact the manufacturer.\n"); | ||
1076 | } | ||
1077 | - printk("%lx\n", options); | ||
1078 | + printk("%llx\n", options); | ||
1079 | seq_printf(seq, "can POST: <integrated video>"); | ||
1080 | if (options & 2) | ||
1081 | seq_printf(seq, " <PCI video>"); | ||
1082 | @@ -1256,7 +1261,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset) | ||
1083 | { | ||
1084 | struct acpi_video_bus *video = seq->private; | ||
1085 | int status; | ||
1086 | - unsigned long id; | ||
1087 | + unsigned long long id; | ||
1088 | |||
1089 | |||
1090 | if (!video) | ||
1091 | @@ -1303,7 +1308,7 @@ acpi_video_bus_write_POST(struct file *file, | ||
1092 | struct seq_file *m = file->private_data; | ||
1093 | struct acpi_video_bus *video = m->private; | ||
1094 | char str[12] = { 0 }; | ||
1095 | - unsigned long opt, options; | ||
1096 | + unsigned long long opt, options; | ||
1097 | |||
1098 | |||
1099 | if (!video || count + 1 > sizeof str) | ||
1100 | @@ -1473,7 +1478,7 @@ static int | ||
1101 | acpi_video_bus_get_one_device(struct acpi_device *device, | ||
1102 | struct acpi_video_bus *video) | ||
1103 | { | ||
1104 | - unsigned long device_id; | ||
1105 | + unsigned long long device_id; | ||
1106 | int status; | ||
1107 | struct acpi_video_device *data; | ||
1108 | struct acpi_video_device_attrib* attribute; | ||
1109 | @@ -1724,7 +1729,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, | ||
1110 | static void | ||
1111 | acpi_video_switch_brightness(struct acpi_video_device *device, int event) | ||
1112 | { | ||
1113 | - unsigned long level_current, level_next; | ||
1114 | + unsigned long long level_current, level_next; | ||
1115 | if (!device->brightness) | ||
1116 | return; | ||
1117 | acpi_video_device_lcd_get_level_current(device, &level_current); | ||
1118 | diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c | ||
1119 | index 9330b79..ae45187 100644 | ||
1120 | --- a/drivers/ata/libata-acpi.c | ||
1121 | +++ b/drivers/ata/libata-acpi.c | ||
1122 | @@ -180,7 +180,7 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev, | ||
1123 | int wait = 0; | ||
1124 | unsigned long flags; | ||
1125 | acpi_handle handle, tmphandle; | ||
1126 | - unsigned long sta; | ||
1127 | + unsigned long long sta; | ||
1128 | acpi_status status; | ||
1129 | |||
1130 | if (dev) { | ||
1131 | diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c | ||
1132 | index c815f8e..394cb0c 100644 | ||
1133 | --- a/drivers/ata/sata_mv.c | ||
1134 | +++ b/drivers/ata/sata_mv.c | ||
1135 | @@ -669,8 +669,8 @@ static const struct pci_device_id mv_pci_tbl[] = { | ||
1136 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, | ||
1137 | /* RocketRAID 1720/174x have different identifiers */ | ||
1138 | { PCI_VDEVICE(TTI, 0x1720), chip_6042 }, | ||
1139 | - { PCI_VDEVICE(TTI, 0x1740), chip_508x }, | ||
1140 | - { PCI_VDEVICE(TTI, 0x1742), chip_508x }, | ||
1141 | + { PCI_VDEVICE(TTI, 0x1740), chip_6042 }, | ||
1142 | + { PCI_VDEVICE(TTI, 0x1742), chip_6042 }, | ||
1143 | |||
1144 | { PCI_VDEVICE(MARVELL, 0x6040), chip_604x }, | ||
1145 | { PCI_VDEVICE(MARVELL, 0x6041), chip_604x }, | ||
1146 | @@ -883,7 +883,7 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio, | ||
1147 | struct mv_host_priv *hpriv = ap->host->private_data; | ||
1148 | int hardport = mv_hardport_from_port(ap->port_no); | ||
1149 | void __iomem *hc_mmio = mv_hc_base_from_port( | ||
1150 | - mv_host_base(ap->host), hardport); | ||
1151 | + mv_host_base(ap->host), ap->port_no); | ||
1152 | u32 hc_irq_cause, ipending; | ||
1153 | |||
1154 | /* clear EDMA event indicators, if any */ | ||
1155 | diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c | ||
1156 | index 8714c36..89e3b7f 100644 | ||
1157 | --- a/drivers/ata/sata_nv.c | ||
1158 | +++ b/drivers/ata/sata_nv.c | ||
1159 | @@ -305,10 +305,10 @@ static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance); | ||
1160 | static int nv_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); | ||
1161 | static int nv_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); | ||
1162 | |||
1163 | +static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class, | ||
1164 | + unsigned long deadline); | ||
1165 | static void nv_nf2_freeze(struct ata_port *ap); | ||
1166 | static void nv_nf2_thaw(struct ata_port *ap); | ||
1167 | -static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class, | ||
1168 | - unsigned long deadline); | ||
1169 | static void nv_ck804_freeze(struct ata_port *ap); | ||
1170 | static void nv_ck804_thaw(struct ata_port *ap); | ||
1171 | static int nv_adma_slave_config(struct scsi_device *sdev); | ||
1172 | @@ -352,6 +352,7 @@ enum nv_host_type | ||
1173 | NFORCE3 = NFORCE2, /* NF2 == NF3 as far as sata_nv is concerned */ | ||
1174 | CK804, | ||
1175 | ADMA, | ||
1176 | + MCP5x, | ||
1177 | SWNCQ, | ||
1178 | }; | ||
1179 | |||
1180 | @@ -363,10 +364,10 @@ static const struct pci_device_id nv_pci_tbl[] = { | ||
1181 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 }, | ||
1182 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 }, | ||
1183 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 }, | ||
1184 | - { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), SWNCQ }, | ||
1185 | - { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), SWNCQ }, | ||
1186 | - { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), SWNCQ }, | ||
1187 | - { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), SWNCQ }, | ||
1188 | + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), MCP5x }, | ||
1189 | + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), MCP5x }, | ||
1190 | + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), MCP5x }, | ||
1191 | + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), MCP5x }, | ||
1192 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC }, | ||
1193 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC }, | ||
1194 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC }, | ||
1195 | @@ -432,14 +433,19 @@ static struct ata_port_operations nv_nf2_ops = { | ||
1196 | .inherits = &nv_common_ops, | ||
1197 | .freeze = nv_nf2_freeze, | ||
1198 | .thaw = nv_nf2_thaw, | ||
1199 | - .hardreset = nv_nf2_hardreset, | ||
1200 | + .hardreset = nv_noclassify_hardreset, | ||
1201 | }; | ||
1202 | |||
1203 | -/* CK804 finally gets hardreset right */ | ||
1204 | +/* For initial probing after boot and hot plugging, hardreset mostly | ||
1205 | + * works fine on CK804 but curiously, reprobing on the initial port by | ||
1206 | + * rescanning or rmmod/insmod fails to acquire the initial D2H Reg FIS | ||
1207 | + * in somewhat undeterministic way. Use noclassify hardreset. | ||
1208 | + */ | ||
1209 | static struct ata_port_operations nv_ck804_ops = { | ||
1210 | .inherits = &nv_common_ops, | ||
1211 | .freeze = nv_ck804_freeze, | ||
1212 | .thaw = nv_ck804_thaw, | ||
1213 | + .hardreset = nv_noclassify_hardreset, | ||
1214 | .host_stop = nv_ck804_host_stop, | ||
1215 | }; | ||
1216 | |||
1217 | @@ -467,8 +473,19 @@ static struct ata_port_operations nv_adma_ops = { | ||
1218 | .host_stop = nv_adma_host_stop, | ||
1219 | }; | ||
1220 | |||
1221 | +/* Kernel bz#12351 reports that when SWNCQ is enabled, for hotplug to | ||
1222 | + * work, hardreset should be used and hardreset can't report proper | ||
1223 | + * signature, which suggests that mcp5x is closer to nf2 as long as | ||
1224 | + * reset quirkiness is concerned. Define separate ops for mcp5x with | ||
1225 | + * nv_noclassify_hardreset(). | ||
1226 | + */ | ||
1227 | +static struct ata_port_operations nv_mcp5x_ops = { | ||
1228 | + .inherits = &nv_common_ops, | ||
1229 | + .hardreset = nv_noclassify_hardreset, | ||
1230 | +}; | ||
1231 | + | ||
1232 | static struct ata_port_operations nv_swncq_ops = { | ||
1233 | - .inherits = &nv_generic_ops, | ||
1234 | + .inherits = &nv_mcp5x_ops, | ||
1235 | |||
1236 | .qc_defer = ata_std_qc_defer, | ||
1237 | .qc_prep = nv_swncq_qc_prep, | ||
1238 | @@ -531,6 +548,15 @@ static const struct ata_port_info nv_port_info[] = { | ||
1239 | .port_ops = &nv_adma_ops, | ||
1240 | .private_data = NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht), | ||
1241 | }, | ||
1242 | + /* MCP5x */ | ||
1243 | + { | ||
1244 | + .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY, | ||
1245 | + .pio_mask = NV_PIO_MASK, | ||
1246 | + .mwdma_mask = NV_MWDMA_MASK, | ||
1247 | + .udma_mask = NV_UDMA_MASK, | ||
1248 | + .port_ops = &nv_mcp5x_ops, | ||
1249 | + .private_data = NV_PI_PRIV(nv_generic_interrupt, &nv_sht), | ||
1250 | + }, | ||
1251 | /* SWNCQ */ | ||
1252 | { | ||
1253 | .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | ||
1254 | @@ -1530,6 +1556,17 @@ static int nv_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) | ||
1255 | return 0; | ||
1256 | } | ||
1257 | |||
1258 | +static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class, | ||
1259 | + unsigned long deadline) | ||
1260 | +{ | ||
1261 | + bool online; | ||
1262 | + int rc; | ||
1263 | + | ||
1264 | + rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline, | ||
1265 | + &online, NULL); | ||
1266 | + return online ? -EAGAIN : rc; | ||
1267 | +} | ||
1268 | + | ||
1269 | static void nv_nf2_freeze(struct ata_port *ap) | ||
1270 | { | ||
1271 | void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr; | ||
1272 | @@ -1554,17 +1591,6 @@ static void nv_nf2_thaw(struct ata_port *ap) | ||
1273 | iowrite8(mask, scr_addr + NV_INT_ENABLE); | ||
1274 | } | ||
1275 | |||
1276 | -static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class, | ||
1277 | - unsigned long deadline) | ||
1278 | -{ | ||
1279 | - bool online; | ||
1280 | - int rc; | ||
1281 | - | ||
1282 | - rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline, | ||
1283 | - &online, NULL); | ||
1284 | - return online ? -EAGAIN : rc; | ||
1285 | -} | ||
1286 | - | ||
1287 | static void nv_ck804_freeze(struct ata_port *ap) | ||
1288 | { | ||
1289 | void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR]; | ||
1290 | @@ -2355,14 +2381,9 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | ||
1291 | if (type == CK804 && adma_enabled) { | ||
1292 | dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n"); | ||
1293 | type = ADMA; | ||
1294 | - } | ||
1295 | - | ||
1296 | - if (type == SWNCQ) { | ||
1297 | - if (swncq_enabled) | ||
1298 | - dev_printk(KERN_NOTICE, &pdev->dev, | ||
1299 | - "Using SWNCQ mode\n"); | ||
1300 | - else | ||
1301 | - type = GENERIC; | ||
1302 | + } else if (type == MCP5x && swncq_enabled) { | ||
1303 | + dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n"); | ||
1304 | + type = SWNCQ; | ||
1305 | } | ||
1306 | |||
1307 | ppi[0] = &nv_port_info[type]; | ||
1308 | diff --git a/drivers/char/selection.c b/drivers/char/selection.c | ||
1309 | index 2978a49..caf3fa2 100644 | ||
1310 | --- a/drivers/char/selection.c | ||
1311 | +++ b/drivers/char/selection.c | ||
1312 | @@ -268,7 +268,7 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t | ||
1313 | |||
1314 | /* Allocate a new buffer before freeing the old one ... */ | ||
1315 | multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */ | ||
1316 | - bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL); | ||
1317 | + bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL); | ||
1318 | if (!bp) { | ||
1319 | printk(KERN_WARNING "selection: kmalloc() failed\n"); | ||
1320 | clear_selection(); | ||
1321 | diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c | ||
1322 | index 5ce07b5..bb6e3b3 100644 | ||
1323 | --- a/drivers/cpuidle/cpuidle.c | ||
1324 | +++ b/drivers/cpuidle/cpuidle.c | ||
1325 | @@ -56,7 +56,11 @@ static void cpuidle_idle_call(void) | ||
1326 | if (pm_idle_old) | ||
1327 | pm_idle_old(); | ||
1328 | else | ||
1329 | +#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE) | ||
1330 | + default_idle(); | ||
1331 | +#else | ||
1332 | local_irq_enable(); | ||
1333 | +#endif | ||
1334 | return; | ||
1335 | } | ||
1336 | |||
1337 | @@ -67,8 +71,11 @@ static void cpuidle_idle_call(void) | ||
1338 | target_state = &dev->states[next_state]; | ||
1339 | |||
1340 | /* enter the state and update stats */ | ||
1341 | - dev->last_residency = target_state->enter(dev, target_state); | ||
1342 | dev->last_state = target_state; | ||
1343 | + dev->last_residency = target_state->enter(dev, target_state); | ||
1344 | + if (dev->last_state) | ||
1345 | + target_state = dev->last_state; | ||
1346 | + | ||
1347 | target_state->time += (unsigned long long)dev->last_residency; | ||
1348 | target_state->usage++; | ||
1349 | |||
1350 | diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c | ||
1351 | index 8d7cf3f..f1df59f 100644 | ||
1352 | --- a/drivers/cpuidle/governors/menu.c | ||
1353 | +++ b/drivers/cpuidle/governors/menu.c | ||
1354 | @@ -15,12 +15,14 @@ | ||
1355 | #include <linux/tick.h> | ||
1356 | |||
1357 | #define BREAK_FUZZ 4 /* 4 us */ | ||
1358 | +#define PRED_HISTORY_PCT 50 | ||
1359 | |||
1360 | struct menu_device { | ||
1361 | int last_state_idx; | ||
1362 | |||
1363 | unsigned int expected_us; | ||
1364 | unsigned int predicted_us; | ||
1365 | + unsigned int current_predicted_us; | ||
1366 | unsigned int last_measured_us; | ||
1367 | unsigned int elapsed_us; | ||
1368 | }; | ||
1369 | @@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_device *dev) | ||
1370 | data->expected_us = | ||
1371 | (u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000; | ||
1372 | |||
1373 | + /* Recalculate predicted_us based on prediction_history_pct */ | ||
1374 | + data->predicted_us *= PRED_HISTORY_PCT; | ||
1375 | + data->predicted_us += (100 - PRED_HISTORY_PCT) * | ||
1376 | + data->current_predicted_us; | ||
1377 | + data->predicted_us /= 100; | ||
1378 | + | ||
1379 | /* find the deepest idle state that satisfies our constraints */ | ||
1380 | for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) { | ||
1381 | struct cpuidle_state *s = &dev->states[i]; | ||
1382 | @@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_device *dev) | ||
1383 | measured_us = -1; | ||
1384 | |||
1385 | /* Predict time until next break event */ | ||
1386 | - data->predicted_us = max(measured_us, data->last_measured_us); | ||
1387 | + data->current_predicted_us = max(measured_us, data->last_measured_us); | ||
1388 | |||
1389 | if (last_idle_us + BREAK_FUZZ < | ||
1390 | data->expected_us - target->exit_latency) { | ||
1391 | diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c | ||
1392 | index c694eaa..191f01b 100644 | ||
1393 | --- a/drivers/input/keyboard/atkbd.c | ||
1394 | +++ b/drivers/input/keyboard/atkbd.c | ||
1395 | @@ -884,6 +884,22 @@ static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd) | ||
1396 | } | ||
1397 | |||
1398 | /* | ||
1399 | + * Samsung NC10 with Fn+F? key release not working | ||
1400 | + */ | ||
1401 | +static void atkbd_samsung_keymap_fixup(struct atkbd *atkbd) | ||
1402 | +{ | ||
1403 | + const unsigned int forced_release_keys[] = { | ||
1404 | + 0x82, 0x83, 0x84, 0x86, 0x88, 0x89, 0xb3, 0xf7, 0xf9, | ||
1405 | + }; | ||
1406 | + int i; | ||
1407 | + | ||
1408 | + if (atkbd->set == 2) | ||
1409 | + for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++) | ||
1410 | + __set_bit(forced_release_keys[i], | ||
1411 | + atkbd->force_release_mask); | ||
1412 | +} | ||
1413 | + | ||
1414 | +/* | ||
1415 | * atkbd_set_keycode_table() initializes keyboard's keycode table | ||
1416 | * according to the selected scancode set | ||
1417 | */ | ||
1418 | @@ -1486,6 +1502,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | ||
1419 | .driver_data = atkbd_dell_laptop_keymap_fixup, | ||
1420 | }, | ||
1421 | { | ||
1422 | + .ident = "Dell Laptop", | ||
1423 | + .matches = { | ||
1424 | + DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), | ||
1425 | + DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ | ||
1426 | + }, | ||
1427 | + .callback = atkbd_setup_fixup, | ||
1428 | + .driver_data = atkbd_dell_laptop_keymap_fixup, | ||
1429 | + }, | ||
1430 | + { | ||
1431 | .ident = "HP 2133", | ||
1432 | .matches = { | ||
1433 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
1434 | @@ -1503,6 +1528,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | ||
1435 | .callback = atkbd_setup_fixup, | ||
1436 | .driver_data = atkbd_inventec_keymap_fixup, | ||
1437 | }, | ||
1438 | + { | ||
1439 | + .ident = "Samsung NC10", | ||
1440 | + .matches = { | ||
1441 | + DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
1442 | + DMI_MATCH(DMI_PRODUCT_NAME, "NC10"), | ||
1443 | + }, | ||
1444 | + .callback = atkbd_setup_fixup, | ||
1445 | + .driver_data = atkbd_samsung_keymap_fixup, | ||
1446 | + }, | ||
1447 | { } | ||
1448 | }; | ||
1449 | |||
1450 | diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c | ||
1451 | index 7c6dfd0..95965a7 100644 | ||
1452 | --- a/drivers/misc/asus-laptop.c | ||
1453 | +++ b/drivers/misc/asus-laptop.c | ||
1454 | @@ -139,6 +139,7 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ | ||
1455 | "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ | ||
1456 | "\\_SB.PCI0.PX40.EC0.Q10", /* M1A */ | ||
1457 | "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */ | ||
1458 | + "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */ | ||
1459 | "\\_SB.PCI0.PX40.Q10", /* S1x */ | ||
1460 | "\\Q10"); /* A2x, L2D, L3D, M2E */ | ||
1461 | |||
1462 | @@ -280,7 +281,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val, | ||
1463 | |||
1464 | static int read_wireless_status(int mask) | ||
1465 | { | ||
1466 | - ulong status; | ||
1467 | + unsigned long long status; | ||
1468 | acpi_status rv = AE_OK; | ||
1469 | |||
1470 | if (!wireless_status_handle) | ||
1471 | @@ -297,7 +298,7 @@ static int read_wireless_status(int mask) | ||
1472 | |||
1473 | static int read_gps_status(void) | ||
1474 | { | ||
1475 | - ulong status; | ||
1476 | + unsigned long long status; | ||
1477 | acpi_status rv = AE_OK; | ||
1478 | |||
1479 | rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status); | ||
1480 | @@ -350,7 +351,7 @@ static void write_status(acpi_handle handle, int out, int mask) | ||
1481 | static void object##_led_set(struct led_classdev *led_cdev, \ | ||
1482 | enum led_brightness value) \ | ||
1483 | { \ | ||
1484 | - object##_led_wk = value; \ | ||
1485 | + object##_led_wk = (value > 0) ? 1 : 0; \ | ||
1486 | queue_work(led_workqueue, &object##_led_work); \ | ||
1487 | } \ | ||
1488 | static void object##_led_update(struct work_struct *ignored) \ | ||
1489 | @@ -404,7 +405,7 @@ static void lcd_blank(int blank) | ||
1490 | |||
1491 | static int read_brightness(struct backlight_device *bd) | ||
1492 | { | ||
1493 | - ulong value; | ||
1494 | + unsigned long long value; | ||
1495 | acpi_status rv = AE_OK; | ||
1496 | |||
1497 | rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value); | ||
1498 | @@ -455,7 +456,7 @@ static ssize_t show_infos(struct device *dev, | ||
1499 | struct device_attribute *attr, char *page) | ||
1500 | { | ||
1501 | int len = 0; | ||
1502 | - ulong temp; | ||
1503 | + unsigned long long temp; | ||
1504 | char buf[16]; //enough for all info | ||
1505 | acpi_status rv = AE_OK; | ||
1506 | |||
1507 | @@ -603,7 +604,7 @@ static void set_display(int value) | ||
1508 | |||
1509 | static int read_display(void) | ||
1510 | { | ||
1511 | - ulong value = 0; | ||
1512 | + unsigned long long value = 0; | ||
1513 | acpi_status rv = AE_OK; | ||
1514 | |||
1515 | /* In most of the case, we know how to set the display, but sometime | ||
1516 | @@ -849,7 +850,7 @@ static int asus_hotk_get_info(void) | ||
1517 | { | ||
1518 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
1519 | union acpi_object *model = NULL; | ||
1520 | - ulong bsts_result, hwrs_result; | ||
1521 | + unsigned long long bsts_result, hwrs_result; | ||
1522 | char *string = NULL; | ||
1523 | acpi_status status; | ||
1524 | |||
1525 | diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c | ||
1526 | index 1ee8501..616bcbd 100644 | ||
1527 | --- a/drivers/misc/eeepc-laptop.c | ||
1528 | +++ b/drivers/misc/eeepc-laptop.c | ||
1529 | @@ -204,7 +204,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val, | ||
1530 | static int read_acpi_int(acpi_handle handle, const char *method, int *val) | ||
1531 | { | ||
1532 | acpi_status status; | ||
1533 | - ulong result; | ||
1534 | + unsigned long long result; | ||
1535 | |||
1536 | status = acpi_evaluate_integer(handle, (char *)method, NULL, &result); | ||
1537 | if (ACPI_FAILURE(status)) { | ||
1538 | diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c | ||
1539 | index 3e56203..efd395a 100644 | ||
1540 | --- a/drivers/misc/fujitsu-laptop.c | ||
1541 | +++ b/drivers/misc/fujitsu-laptop.c | ||
1542 | @@ -224,7 +224,7 @@ static int set_lcd_level_alt(int level) | ||
1543 | |||
1544 | static int get_lcd_level(void) | ||
1545 | { | ||
1546 | - unsigned long state = 0; | ||
1547 | + unsigned long long state = 0; | ||
1548 | acpi_status status = AE_OK; | ||
1549 | |||
1550 | vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n"); | ||
1551 | @@ -246,7 +246,7 @@ static int get_lcd_level(void) | ||
1552 | |||
1553 | static int get_max_brightness(void) | ||
1554 | { | ||
1555 | - unsigned long state = 0; | ||
1556 | + unsigned long long state = 0; | ||
1557 | acpi_status status = AE_OK; | ||
1558 | |||
1559 | vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n"); | ||
1560 | @@ -263,7 +263,7 @@ static int get_max_brightness(void) | ||
1561 | |||
1562 | static int get_lcd_level_alt(void) | ||
1563 | { | ||
1564 | - unsigned long state = 0; | ||
1565 | + unsigned long long state = 0; | ||
1566 | acpi_status status = AE_OK; | ||
1567 | |||
1568 | vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n"); | ||
1569 | @@ -384,7 +384,7 @@ static ssize_t store_lcd_level(struct device *dev, | ||
1570 | |||
1571 | static int get_irb(void) | ||
1572 | { | ||
1573 | - unsigned long state = 0; | ||
1574 | + unsigned long long state = 0; | ||
1575 | acpi_status status = AE_OK; | ||
1576 | |||
1577 | vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n"); | ||
1578 | diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c | ||
1579 | index 80a1363..f2257a7 100644 | ||
1580 | --- a/drivers/misc/intel_menlow.c | ||
1581 | +++ b/drivers/misc/intel_menlow.c | ||
1582 | @@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev, | ||
1583 | { | ||
1584 | struct acpi_device *device = cdev->devdata; | ||
1585 | acpi_handle handle = device->handle; | ||
1586 | - unsigned long value; | ||
1587 | + unsigned long long value; | ||
1588 | struct acpi_object_list arg_list; | ||
1589 | union acpi_object arg; | ||
1590 | acpi_status status = AE_OK; | ||
1591 | @@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev, | ||
1592 | { | ||
1593 | struct acpi_device *device = cdev->devdata; | ||
1594 | acpi_handle handle = device->handle; | ||
1595 | - unsigned long value; | ||
1596 | + unsigned long long value; | ||
1597 | struct acpi_object_list arg_list; | ||
1598 | union acpi_object arg; | ||
1599 | acpi_status status = AE_OK; | ||
1600 | @@ -104,7 +104,7 @@ static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev, | ||
1601 | if (ACPI_FAILURE(status)) | ||
1602 | return -EFAULT; | ||
1603 | |||
1604 | - return sprintf(buf, "%ld\n", value); | ||
1605 | + return sprintf(buf, "%lld\n", value); | ||
1606 | } | ||
1607 | |||
1608 | static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, | ||
1609 | @@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, | ||
1610 | struct acpi_object_list arg_list; | ||
1611 | union acpi_object arg; | ||
1612 | acpi_status status; | ||
1613 | - int temp; | ||
1614 | + unsigned long long temp; | ||
1615 | unsigned long max_state; | ||
1616 | |||
1617 | if (memory_get_int_max_bandwidth(cdev, &max_state)) | ||
1618 | @@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, | ||
1619 | |||
1620 | status = | ||
1621 | acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list, | ||
1622 | - (unsigned long *)&temp); | ||
1623 | + &temp); | ||
1624 | |||
1625 | printk(KERN_INFO | ||
1626 | "Bandwidth value was %d: status is %d\n", state, status); | ||
1627 | @@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lock); | ||
1628 | * @auxtype : AUX0/AUX1 | ||
1629 | * @buf: syfs buffer | ||
1630 | */ | ||
1631 | -static int sensor_get_auxtrip(acpi_handle handle, int index, int *value) | ||
1632 | +static int sensor_get_auxtrip(acpi_handle handle, int index, | ||
1633 | + unsigned long long *value) | ||
1634 | { | ||
1635 | acpi_status status; | ||
1636 | |||
1637 | @@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handle handle, int index, int *value) | ||
1638 | return -EINVAL; | ||
1639 | |||
1640 | status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0, | ||
1641 | - NULL, (unsigned long *)value); | ||
1642 | + NULL, value); | ||
1643 | if (ACPI_FAILURE(status)) | ||
1644 | return -EIO; | ||
1645 | |||
1646 | @@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value) | ||
1647 | struct acpi_object_list args = { | ||
1648 | 1, &arg | ||
1649 | }; | ||
1650 | - int temp; | ||
1651 | + unsigned long long temp; | ||
1652 | |||
1653 | if (index != 0 && index != 1) | ||
1654 | return -EINVAL; | ||
1655 | |||
1656 | status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1, | ||
1657 | - NULL, (unsigned long *)&temp); | ||
1658 | + NULL, &temp); | ||
1659 | if (ACPI_FAILURE(status)) | ||
1660 | return -EIO; | ||
1661 | if ((index && value < temp) || (!index && value > temp)) | ||
1662 | @@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value) | ||
1663 | |||
1664 | arg.integer.value = value; | ||
1665 | status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0, | ||
1666 | - &args, (unsigned long *)&temp); | ||
1667 | + &args, &temp); | ||
1668 | if (ACPI_FAILURE(status)) | ||
1669 | return -EIO; | ||
1670 | |||
1671 | @@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *dev, | ||
1672 | struct device_attribute *dev_attr, char *buf) | ||
1673 | { | ||
1674 | struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); | ||
1675 | - int value; | ||
1676 | + unsigned long long value; | ||
1677 | int result; | ||
1678 | |||
1679 | result = sensor_get_auxtrip(attr->handle, 0, &value); | ||
1680 | @@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *dev, | ||
1681 | struct device_attribute *dev_attr, char *buf) | ||
1682 | { | ||
1683 | struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); | ||
1684 | - int value; | ||
1685 | + unsigned long long value; | ||
1686 | int result; | ||
1687 | |||
1688 | result = sensor_get_auxtrip(attr->handle, 1, &value); | ||
1689 | @@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct device *dev, | ||
1690 | struct device_attribute *attr, char *buf) | ||
1691 | { | ||
1692 | acpi_status status; | ||
1693 | - unsigned long bios_enabled; | ||
1694 | + unsigned long long bios_enabled; | ||
1695 | |||
1696 | status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled); | ||
1697 | if (ACPI_FAILURE(status)) | ||
1698 | @@ -492,7 +493,7 @@ static int __init intel_menlow_module_init(void) | ||
1699 | { | ||
1700 | int result = -ENODEV; | ||
1701 | acpi_status status; | ||
1702 | - unsigned long enable; | ||
1703 | + unsigned long long enable; | ||
1704 | |||
1705 | if (acpi_disabled) | ||
1706 | return result; | ||
1707 | diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c | ||
1708 | index aa75385..be3c7dc 100644 | ||
1709 | --- a/drivers/net/ixgb/ixgb_main.c | ||
1710 | +++ b/drivers/net/ixgb/ixgb_main.c | ||
1711 | @@ -977,15 +977,17 @@ ixgb_clean_rx_ring(struct ixgb_adapter *adapter) | ||
1712 | |||
1713 | for (i = 0; i < rx_ring->count; i++) { | ||
1714 | buffer_info = &rx_ring->buffer_info[i]; | ||
1715 | - if (buffer_info->skb) { | ||
1716 | - | ||
1717 | + if (buffer_info->dma) { | ||
1718 | pci_unmap_single(pdev, | ||
1719 | buffer_info->dma, | ||
1720 | buffer_info->length, | ||
1721 | PCI_DMA_FROMDEVICE); | ||
1722 | + buffer_info->dma = 0; | ||
1723 | + buffer_info->length = 0; | ||
1724 | + } | ||
1725 | |||
1726 | + if (buffer_info->skb) { | ||
1727 | dev_kfree_skb(buffer_info->skb); | ||
1728 | - | ||
1729 | buffer_info->skb = NULL; | ||
1730 | } | ||
1731 | } | ||
1732 | diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c | ||
1733 | index a3e4705..3baee56 100644 | ||
1734 | --- a/drivers/pci/hotplug/acpiphp_glue.c | ||
1735 | +++ b/drivers/pci/hotplug/acpiphp_glue.c | ||
1736 | @@ -180,7 +180,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
1737 | struct acpiphp_func *newfunc; | ||
1738 | acpi_handle tmp; | ||
1739 | acpi_status status = AE_OK; | ||
1740 | - unsigned long adr, sun; | ||
1741 | + unsigned long long adr, sun; | ||
1742 | int device, function, retval; | ||
1743 | |||
1744 | status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); | ||
1745 | @@ -528,7 +528,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
1746 | { | ||
1747 | acpi_status status; | ||
1748 | acpi_handle dummy_handle; | ||
1749 | - unsigned long tmp; | ||
1750 | + unsigned long long tmp; | ||
1751 | int device, function; | ||
1752 | struct pci_dev *dev; | ||
1753 | struct pci_bus *pci_bus = context; | ||
1754 | @@ -573,7 +573,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
1755 | static int add_bridge(acpi_handle handle) | ||
1756 | { | ||
1757 | acpi_status status; | ||
1758 | - unsigned long tmp; | ||
1759 | + unsigned long long tmp; | ||
1760 | int seg, bus; | ||
1761 | acpi_handle dummy_handle; | ||
1762 | struct pci_bus *pci_bus; | ||
1763 | @@ -767,7 +767,7 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base) | ||
1764 | { | ||
1765 | acpi_status status; | ||
1766 | int result = -1; | ||
1767 | - unsigned long gsb; | ||
1768 | + unsigned long long gsb; | ||
1769 | struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; | ||
1770 | union acpi_object *obj; | ||
1771 | void *table; | ||
1772 | @@ -808,7 +808,7 @@ static acpi_status | ||
1773 | ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
1774 | { | ||
1775 | acpi_status status; | ||
1776 | - unsigned long sta; | ||
1777 | + unsigned long long sta; | ||
1778 | acpi_handle tmp; | ||
1779 | struct pci_dev *pdev; | ||
1780 | u32 gsi_base; | ||
1781 | @@ -872,7 +872,7 @@ static acpi_status | ||
1782 | ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv) | ||
1783 | { | ||
1784 | acpi_status status; | ||
1785 | - unsigned long sta; | ||
1786 | + unsigned long long sta; | ||
1787 | acpi_handle tmp; | ||
1788 | u32 gsi_base; | ||
1789 | struct acpiphp_ioapic *pos, *n, *ioapic = NULL; | ||
1790 | @@ -1264,7 +1264,7 @@ static int disable_device(struct acpiphp_slot *slot) | ||
1791 | static unsigned int get_slot_status(struct acpiphp_slot *slot) | ||
1792 | { | ||
1793 | acpi_status status; | ||
1794 | - unsigned long sta = 0; | ||
1795 | + unsigned long long sta = 0; | ||
1796 | u32 dvid; | ||
1797 | struct list_head *l; | ||
1798 | struct acpiphp_func *func; | ||
1799 | diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c | ||
1800 | index 2b7c45e..881fdd2 100644 | ||
1801 | --- a/drivers/pci/hotplug/acpiphp_ibm.c | ||
1802 | +++ b/drivers/pci/hotplug/acpiphp_ibm.c | ||
1803 | @@ -183,7 +183,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) | ||
1804 | union acpi_object args[2]; | ||
1805 | struct acpi_object_list params = { .pointer = args, .count = 2 }; | ||
1806 | acpi_status stat; | ||
1807 | - unsigned long rc; | ||
1808 | + unsigned long long rc; | ||
1809 | union apci_descriptor *ibm_slot; | ||
1810 | |||
1811 | ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot)); | ||
1812 | @@ -204,7 +204,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status) | ||
1813 | err("APLS evaluation failed: 0x%08x\n", stat); | ||
1814 | return -ENODEV; | ||
1815 | } else if (!rc) { | ||
1816 | - err("APLS method failed: 0x%08lx\n", rc); | ||
1817 | + err("APLS method failed: 0x%08llx\n", rc); | ||
1818 | return -ERANGE; | ||
1819 | } | ||
1820 | return 0; | ||
1821 | diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c | ||
1822 | index d748698..3eee709 100644 | ||
1823 | --- a/drivers/pci/hotplug/sgi_hotplug.c | ||
1824 | +++ b/drivers/pci/hotplug/sgi_hotplug.c | ||
1825 | @@ -413,7 +413,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot) | ||
1826 | /* | ||
1827 | * Add the slot's devices to the ACPI infrastructure */ | ||
1828 | if (SN_ACPI_BASE_SUPPORT() && ssdt) { | ||
1829 | - unsigned long adr; | ||
1830 | + unsigned long long adr; | ||
1831 | struct acpi_device *pdevice; | ||
1832 | struct acpi_device *device; | ||
1833 | acpi_handle phandle; | ||
1834 | @@ -505,7 +505,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot) | ||
1835 | /* free the ACPI resources for the slot */ | ||
1836 | if (SN_ACPI_BASE_SUPPORT() && | ||
1837 | PCI_CONTROLLER(slot->pci_bus)->acpi_handle) { | ||
1838 | - unsigned long adr; | ||
1839 | + unsigned long long adr; | ||
1840 | struct acpi_device *device; | ||
1841 | acpi_handle phandle; | ||
1842 | acpi_handle chandle = NULL; | ||
1843 | diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c | ||
1844 | index a697914..3fc7e0f 100644 | ||
1845 | --- a/drivers/serial/jsm/jsm_tty.c | ||
1846 | +++ b/drivers/serial/jsm/jsm_tty.c | ||
1847 | @@ -161,6 +161,11 @@ static void jsm_tty_stop_rx(struct uart_port *port) | ||
1848 | channel->ch_bd->bd_ops->disable_receiver(channel); | ||
1849 | } | ||
1850 | |||
1851 | +static void jsm_tty_enable_ms(struct uart_port *port) | ||
1852 | +{ | ||
1853 | + /* Nothing needed */ | ||
1854 | +} | ||
1855 | + | ||
1856 | static void jsm_tty_break(struct uart_port *port, int break_state) | ||
1857 | { | ||
1858 | unsigned long lock_flags; | ||
1859 | @@ -345,6 +350,7 @@ static struct uart_ops jsm_ops = { | ||
1860 | .start_tx = jsm_tty_start_tx, | ||
1861 | .send_xchar = jsm_tty_send_xchar, | ||
1862 | .stop_rx = jsm_tty_stop_rx, | ||
1863 | + .enable_ms = jsm_tty_enable_ms, | ||
1864 | .break_ctl = jsm_tty_break, | ||
1865 | .startup = jsm_tty_open, | ||
1866 | .shutdown = jsm_tty_close, | ||
1867 | diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c | ||
1868 | index d8b0ba5..9c4a76a 100644 | ||
1869 | --- a/drivers/usb/host/isp1760-if.c | ||
1870 | +++ b/drivers/usb/host/isp1760-if.c | ||
1871 | @@ -129,23 +129,23 @@ static struct of_platform_driver isp1760_of_driver = { | ||
1872 | #endif | ||
1873 | |||
1874 | #ifdef CONFIG_PCI | ||
1875 | -static u32 nxp_pci_io_base; | ||
1876 | -static u32 iolength; | ||
1877 | -static u32 pci_mem_phy0; | ||
1878 | -static u32 length; | ||
1879 | -static u8 __iomem *chip_addr; | ||
1880 | -static u8 __iomem *iobase; | ||
1881 | - | ||
1882 | static int __devinit isp1761_pci_probe(struct pci_dev *dev, | ||
1883 | const struct pci_device_id *id) | ||
1884 | { | ||
1885 | u8 latency, limit; | ||
1886 | __u32 reg_data; | ||
1887 | int retry_count; | ||
1888 | - int length; | ||
1889 | - int status = 1; | ||
1890 | struct usb_hcd *hcd; | ||
1891 | unsigned int devflags = 0; | ||
1892 | + int ret_status = 0; | ||
1893 | + | ||
1894 | + resource_size_t pci_mem_phy0; | ||
1895 | + resource_size_t memlength; | ||
1896 | + | ||
1897 | + u8 __iomem *chip_addr; | ||
1898 | + u8 __iomem *iobase; | ||
1899 | + resource_size_t nxp_pci_io_base; | ||
1900 | + resource_size_t iolength; | ||
1901 | |||
1902 | if (usb_disabled()) | ||
1903 | return -ENODEV; | ||
1904 | @@ -168,26 +168,30 @@ static int __devinit isp1761_pci_probe(struct pci_dev *dev, | ||
1905 | iobase = ioremap_nocache(nxp_pci_io_base, iolength); | ||
1906 | if (!iobase) { | ||
1907 | printk(KERN_ERR "ioremap #1\n"); | ||
1908 | - release_mem_region(nxp_pci_io_base, iolength); | ||
1909 | - return -ENOMEM; | ||
1910 | + ret_status = -ENOMEM; | ||
1911 | + goto cleanup1; | ||
1912 | } | ||
1913 | /* Grab the PLX PCI shared memory of the ISP 1761 we need */ | ||
1914 | pci_mem_phy0 = pci_resource_start(dev, 3); | ||
1915 | - length = pci_resource_len(dev, 3); | ||
1916 | - | ||
1917 | - if (length < 0xffff) { | ||
1918 | - printk(KERN_ERR "memory length for this resource is less than " | ||
1919 | - "required\n"); | ||
1920 | - release_mem_region(nxp_pci_io_base, iolength); | ||
1921 | - iounmap(iobase); | ||
1922 | - return -ENOMEM; | ||
1923 | + memlength = pci_resource_len(dev, 3); | ||
1924 | + if (memlength < 0xffff) { | ||
1925 | + printk(KERN_ERR "memory length for this resource is wrong\n"); | ||
1926 | + ret_status = -ENOMEM; | ||
1927 | + goto cleanup2; | ||
1928 | } | ||
1929 | |||
1930 | - if (!request_mem_region(pci_mem_phy0, length, "ISP-PCI")) { | ||
1931 | + if (!request_mem_region(pci_mem_phy0, memlength, "ISP-PCI")) { | ||
1932 | printk(KERN_ERR "host controller already in use\n"); | ||
1933 | - release_mem_region(nxp_pci_io_base, iolength); | ||
1934 | - iounmap(iobase); | ||
1935 | - return -EBUSY; | ||
1936 | + ret_status = -EBUSY; | ||
1937 | + goto cleanup2; | ||
1938 | + } | ||
1939 | + | ||
1940 | + /* map available memory */ | ||
1941 | + chip_addr = ioremap_nocache(pci_mem_phy0,memlength); | ||
1942 | + if (!chip_addr) { | ||
1943 | + printk(KERN_ERR "Error ioremap failed\n"); | ||
1944 | + ret_status = -ENOMEM; | ||
1945 | + goto cleanup3; | ||
1946 | } | ||
1947 | |||
1948 | /* bad pci latencies can contribute to overruns */ | ||
1949 | @@ -210,38 +214,54 @@ static int __devinit isp1761_pci_probe(struct pci_dev *dev, | ||
1950 | * */ | ||
1951 | writel(0xface, chip_addr + HC_SCRATCH_REG); | ||
1952 | udelay(100); | ||
1953 | - reg_data = readl(chip_addr + HC_SCRATCH_REG); | ||
1954 | + reg_data = readl(chip_addr + HC_SCRATCH_REG) & 0x0000ffff; | ||
1955 | retry_count--; | ||
1956 | } | ||
1957 | |||
1958 | + iounmap(chip_addr); | ||
1959 | + | ||
1960 | /* Host Controller presence is detected by writing to scratch register | ||
1961 | * and reading back and checking the contents are same or not | ||
1962 | */ | ||
1963 | if (reg_data != 0xFACE) { | ||
1964 | err("scratch register mismatch %x", reg_data); | ||
1965 | - goto clean; | ||
1966 | + ret_status = -ENOMEM; | ||
1967 | + goto cleanup3; | ||
1968 | } | ||
1969 | |||
1970 | pci_set_master(dev); | ||
1971 | |||
1972 | - status = readl(iobase + 0x68); | ||
1973 | - status |= 0x900; | ||
1974 | - writel(status, iobase + 0x68); | ||
1975 | + /* configure PLX PCI chip to pass interrupts */ | ||
1976 | +#define PLX_INT_CSR_REG 0x68 | ||
1977 | + reg_data = readl(iobase + PLX_INT_CSR_REG); | ||
1978 | + reg_data |= 0x900; | ||
1979 | + writel(reg_data, iobase + PLX_INT_CSR_REG); | ||
1980 | |||
1981 | dev->dev.dma_mask = NULL; | ||
1982 | - hcd = isp1760_register(pci_mem_phy0, length, dev->irq, | ||
1983 | + hcd = isp1760_register(pci_mem_phy0, memlength, dev->irq, | ||
1984 | IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev_name(&dev->dev), | ||
1985 | devflags); | ||
1986 | + if (IS_ERR(hcd)) { | ||
1987 | + ret_status = -ENODEV; | ||
1988 | + goto cleanup3; | ||
1989 | + } | ||
1990 | + | ||
1991 | + /* done with PLX IO access */ | ||
1992 | + iounmap(iobase); | ||
1993 | + release_mem_region(nxp_pci_io_base, iolength); | ||
1994 | + | ||
1995 | pci_set_drvdata(dev, hcd); | ||
1996 | - if (!hcd) | ||
1997 | - return 0; | ||
1998 | -clean: | ||
1999 | - status = -ENODEV; | ||
2000 | + return 0; | ||
2001 | + | ||
2002 | +cleanup3: | ||
2003 | + release_mem_region(pci_mem_phy0, memlength); | ||
2004 | +cleanup2: | ||
2005 | iounmap(iobase); | ||
2006 | - release_mem_region(pci_mem_phy0, length); | ||
2007 | +cleanup1: | ||
2008 | release_mem_region(nxp_pci_io_base, iolength); | ||
2009 | - return status; | ||
2010 | + return ret_status; | ||
2011 | } | ||
2012 | + | ||
2013 | static void isp1761_pci_remove(struct pci_dev *dev) | ||
2014 | { | ||
2015 | struct usb_hcd *hcd; | ||
2016 | @@ -254,12 +274,6 @@ static void isp1761_pci_remove(struct pci_dev *dev) | ||
2017 | usb_put_hcd(hcd); | ||
2018 | |||
2019 | pci_disable_device(dev); | ||
2020 | - | ||
2021 | - iounmap(iobase); | ||
2022 | - iounmap(chip_addr); | ||
2023 | - | ||
2024 | - release_mem_region(nxp_pci_io_base, iolength); | ||
2025 | - release_mem_region(pci_mem_phy0, length); | ||
2026 | } | ||
2027 | |||
2028 | static void isp1761_pci_shutdown(struct pci_dev *dev) | ||
2029 | diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c | ||
2030 | index c50c7cf..2745b85 100644 | ||
2031 | --- a/drivers/video/aty/mach64_ct.c | ||
2032 | +++ b/drivers/video/aty/mach64_ct.c | ||
2033 | @@ -8,6 +8,9 @@ | ||
2034 | #include <asm/io.h> | ||
2035 | #include <video/mach64.h> | ||
2036 | #include "atyfb.h" | ||
2037 | +#ifdef CONFIG_PPC | ||
2038 | +#include <asm/machdep.h> | ||
2039 | +#endif | ||
2040 | |||
2041 | #undef DEBUG | ||
2042 | |||
2043 | @@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info, | ||
2044 | pll->ct.xclk_post_div_real = postdividers[xpost_div]; | ||
2045 | pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; | ||
2046 | |||
2047 | +#ifdef CONFIG_PPC | ||
2048 | + if (machine_is(powermac)) { | ||
2049 | + /* Override PLL_EXT_CNTL & 0x07. */ | ||
2050 | + pll->ct.xclk_post_div = xpost_div; | ||
2051 | + pll->ct.xclk_ref_div = 1; | ||
2052 | + } | ||
2053 | +#endif | ||
2054 | + | ||
2055 | #ifdef DEBUG | ||
2056 | pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) / | ||
2057 | (par->ref_clk_per * pll->ct.pll_ref_div); | ||
2058 | diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c | ||
2059 | index 223647f..f254235 100644 | ||
2060 | --- a/fs/cifs/connect.c | ||
2061 | +++ b/fs/cifs/connect.c | ||
2062 | @@ -1349,7 +1349,7 @@ cifs_parse_mount_options(char *options, const char *devname, | ||
2063 | } | ||
2064 | |||
2065 | static struct TCP_Server_Info * | ||
2066 | -cifs_find_tcp_session(struct sockaddr *addr) | ||
2067 | +cifs_find_tcp_session(struct sockaddr_storage *addr) | ||
2068 | { | ||
2069 | struct list_head *tmp; | ||
2070 | struct TCP_Server_Info *server; | ||
2071 | @@ -1369,11 +1369,11 @@ cifs_find_tcp_session(struct sockaddr *addr) | ||
2072 | if (server->tcpStatus == CifsNew) | ||
2073 | continue; | ||
2074 | |||
2075 | - if (addr->sa_family == AF_INET && | ||
2076 | + if (addr->ss_family == AF_INET && | ||
2077 | (addr4->sin_addr.s_addr != | ||
2078 | server->addr.sockAddr.sin_addr.s_addr)) | ||
2079 | continue; | ||
2080 | - else if (addr->sa_family == AF_INET6 && | ||
2081 | + else if (addr->ss_family == AF_INET6 && | ||
2082 | memcmp(&server->addr.sockAddr6.sin6_addr, | ||
2083 | &addr6->sin6_addr, sizeof(addr6->sin6_addr))) | ||
2084 | continue; | ||
2085 | @@ -2027,7 +2027,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | ||
2086 | int rc = 0; | ||
2087 | int xid; | ||
2088 | struct socket *csocket = NULL; | ||
2089 | - struct sockaddr addr; | ||
2090 | + struct sockaddr_storage addr; | ||
2091 | struct sockaddr_in *sin_server = (struct sockaddr_in *) &addr; | ||
2092 | struct sockaddr_in6 *sin_server6 = (struct sockaddr_in6 *) &addr; | ||
2093 | struct smb_vol volume_info; | ||
2094 | @@ -2039,7 +2039,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | ||
2095 | |||
2096 | /* cFYI(1, ("Entering cifs_mount. Xid: %d with: %s", xid, mount_data)); */ | ||
2097 | |||
2098 | - memset(&addr, 0, sizeof(struct sockaddr)); | ||
2099 | + memset(&addr, 0, sizeof(struct sockaddr_storage)); | ||
2100 | memset(&volume_info, 0, sizeof(struct smb_vol)); | ||
2101 | if (cifs_parse_mount_options(mount_data, devname, &volume_info)) { | ||
2102 | rc = -EINVAL; | ||
2103 | @@ -2069,9 +2069,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | ||
2104 | rc = cifs_inet_pton(AF_INET6, volume_info.UNCip, | ||
2105 | &sin_server6->sin6_addr.in6_u); | ||
2106 | if (rc > 0) | ||
2107 | - addr.sa_family = AF_INET6; | ||
2108 | + addr.ss_family = AF_INET6; | ||
2109 | } else { | ||
2110 | - addr.sa_family = AF_INET; | ||
2111 | + addr.ss_family = AF_INET; | ||
2112 | } | ||
2113 | |||
2114 | if (rc <= 0) { | ||
2115 | @@ -2113,7 +2113,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | ||
2116 | |||
2117 | srvTcp = cifs_find_tcp_session(&addr); | ||
2118 | if (!srvTcp) { /* create socket */ | ||
2119 | - if (addr.sa_family == AF_INET6) { | ||
2120 | + if (addr.ss_family == AF_INET6) { | ||
2121 | cFYI(1, ("attempting ipv6 connect")); | ||
2122 | /* BB should we allow ipv6 on port 139? */ | ||
2123 | /* other OS never observed in Wild doing 139 with v6 */ | ||
2124 | @@ -2144,7 +2144,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | ||
2125 | } else { | ||
2126 | srvTcp->noblocksnd = volume_info.noblocksnd; | ||
2127 | srvTcp->noautotune = volume_info.noautotune; | ||
2128 | - if (addr.sa_family == AF_INET6) | ||
2129 | + if (addr.ss_family == AF_INET6) | ||
2130 | memcpy(&srvTcp->addr.sockAddr6, sin_server6, | ||
2131 | sizeof(struct sockaddr_in6)); | ||
2132 | else | ||
2133 | diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c | ||
2134 | index eba87ff..ca46f11 100644 | ||
2135 | --- a/fs/dlm/plock.c | ||
2136 | +++ b/fs/dlm/plock.c | ||
2137 | @@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file, | ||
2138 | if (rv == -ENOENT) | ||
2139 | rv = 0; | ||
2140 | else if (rv > 0) { | ||
2141 | + locks_init_lock(fl); | ||
2142 | fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK; | ||
2143 | + fl->fl_flags = FL_POSIX; | ||
2144 | fl->fl_pid = op->info.pid; | ||
2145 | fl->fl_start = op->info.start; | ||
2146 | fl->fl_end = op->info.end; | ||
2147 | diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c | ||
2148 | index 1578d7a..ddcbed8 100644 | ||
2149 | --- a/fs/nfsd/nfs4state.c | ||
2150 | +++ b/fs/nfsd/nfs4state.c | ||
2151 | @@ -2767,6 +2767,25 @@ out: | ||
2152 | } | ||
2153 | |||
2154 | /* | ||
2155 | + * The NFSv4 spec allows a client to do a LOCKT without holding an OPEN, | ||
2156 | + * so we do a temporary open here just to get an open file to pass to | ||
2157 | + * vfs_test_lock. (Arguably perhaps test_lock should be done with an | ||
2158 | + * inode operation.) | ||
2159 | + */ | ||
2160 | +static int nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file_lock *lock) | ||
2161 | +{ | ||
2162 | + struct file *file; | ||
2163 | + int err; | ||
2164 | + | ||
2165 | + err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); | ||
2166 | + if (err) | ||
2167 | + return err; | ||
2168 | + err = vfs_test_lock(file, lock); | ||
2169 | + nfsd_close(file); | ||
2170 | + return err; | ||
2171 | +} | ||
2172 | + | ||
2173 | +/* | ||
2174 | * LOCKT operation | ||
2175 | */ | ||
2176 | __be32 | ||
2177 | @@ -2774,7 +2793,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
2178 | struct nfsd4_lockt *lockt) | ||
2179 | { | ||
2180 | struct inode *inode; | ||
2181 | - struct file file; | ||
2182 | struct file_lock file_lock; | ||
2183 | int error; | ||
2184 | __be32 status; | ||
2185 | @@ -2822,7 +2840,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
2186 | file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; | ||
2187 | file_lock.fl_pid = current->tgid; | ||
2188 | file_lock.fl_flags = FL_POSIX; | ||
2189 | - file_lock.fl_lmops = &nfsd_posix_mng_ops; | ||
2190 | |||
2191 | file_lock.fl_start = lockt->lt_offset; | ||
2192 | if ((lockt->lt_length == ~(u64)0) || LOFF_OVERFLOW(lockt->lt_offset, lockt->lt_length)) | ||
2193 | @@ -2832,16 +2849,8 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
2194 | |||
2195 | nfs4_transform_lock_offset(&file_lock); | ||
2196 | |||
2197 | - /* vfs_test_lock uses the struct file _only_ to resolve the inode. | ||
2198 | - * since LOCKT doesn't require an OPEN, and therefore a struct | ||
2199 | - * file may not exist, pass vfs_test_lock a struct file with | ||
2200 | - * only the dentry:inode set. | ||
2201 | - */ | ||
2202 | - memset(&file, 0, sizeof (struct file)); | ||
2203 | - file.f_path.dentry = cstate->current_fh.fh_dentry; | ||
2204 | - | ||
2205 | status = nfs_ok; | ||
2206 | - error = vfs_test_lock(&file, &file_lock); | ||
2207 | + error = nfsd_test_lock(rqstp, &cstate->current_fh, &file_lock); | ||
2208 | if (error) { | ||
2209 | status = nfserrno(error); | ||
2210 | goto out; | ||
2211 | diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h | ||
2212 | index a5ac0bc..c52f10d 100644 | ||
2213 | --- a/include/acpi/acpi_bus.h | ||
2214 | +++ b/include/acpi/acpi_bus.h | ||
2215 | @@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *package, | ||
2216 | acpi_status | ||
2217 | acpi_evaluate_integer(acpi_handle handle, | ||
2218 | acpi_string pathname, | ||
2219 | - struct acpi_object_list *arguments, unsigned long *data); | ||
2220 | + struct acpi_object_list *arguments, unsigned long long *data); | ||
2221 | acpi_status | ||
2222 | acpi_evaluate_reference(acpi_handle handle, | ||
2223 | acpi_string pathname, | ||
2224 | diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h | ||
2225 | index 4ea4f40..73d6b1c 100644 | ||
2226 | --- a/include/acpi/actypes.h | ||
2227 | +++ b/include/acpi/actypes.h | ||
2228 | @@ -1225,8 +1225,8 @@ struct acpi_resource { | ||
2229 | |||
2230 | #pragma pack() | ||
2231 | |||
2232 | -#define ACPI_RS_SIZE_MIN 12 | ||
2233 | #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ | ||
2234 | +#define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) | ||
2235 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) | ||
2236 | |||
2237 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) | ||
2238 | diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h | ||
2239 | index 9e7b49b..a5cb0c3 100644 | ||
2240 | --- a/include/linux/if_vlan.h | ||
2241 | +++ b/include/linux/if_vlan.h | ||
2242 | @@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | ||
2243 | |||
2244 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | ||
2245 | u16 vlan_tci, int polling); | ||
2246 | +extern int vlan_hwaccel_do_receive(struct sk_buff *skb); | ||
2247 | + | ||
2248 | #else | ||
2249 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | ||
2250 | { | ||
2251 | @@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | ||
2252 | BUG(); | ||
2253 | return NET_XMIT_SUCCESS; | ||
2254 | } | ||
2255 | + | ||
2256 | +static inline int vlan_hwaccel_do_receive(struct sk_buff *skb) | ||
2257 | +{ | ||
2258 | + return 0; | ||
2259 | +} | ||
2260 | #endif | ||
2261 | |||
2262 | /** | ||
2263 | diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h | ||
2264 | index 391cbf3..26b59cb 100644 | ||
2265 | --- a/include/linux/pci_ids.h | ||
2266 | +++ b/include/linux/pci_ids.h | ||
2267 | @@ -2384,6 +2384,7 @@ | ||
2268 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 | ||
2269 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 | ||
2270 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 | ||
2271 | +#define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc | ||
2272 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd | ||
2273 | #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da | ||
2274 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd | ||
2275 | diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c | ||
2276 | index 916061f..68ced4b 100644 | ||
2277 | --- a/net/8021q/vlan_core.c | ||
2278 | +++ b/net/8021q/vlan_core.c | ||
2279 | @@ -3,11 +3,20 @@ | ||
2280 | #include <linux/if_vlan.h> | ||
2281 | #include "vlan.h" | ||
2282 | |||
2283 | +struct vlan_hwaccel_cb { | ||
2284 | + struct net_device *dev; | ||
2285 | +}; | ||
2286 | + | ||
2287 | +static inline struct vlan_hwaccel_cb *vlan_hwaccel_cb(struct sk_buff *skb) | ||
2288 | +{ | ||
2289 | + return (struct vlan_hwaccel_cb *)skb->cb; | ||
2290 | +} | ||
2291 | + | ||
2292 | /* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */ | ||
2293 | int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | ||
2294 | u16 vlan_tci, int polling) | ||
2295 | { | ||
2296 | - struct net_device_stats *stats; | ||
2297 | + struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb); | ||
2298 | |||
2299 | if (skb_bond_should_drop(skb)) { | ||
2300 | dev_kfree_skb_any(skb); | ||
2301 | @@ -15,23 +24,35 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | ||
2302 | } | ||
2303 | |||
2304 | skb->vlan_tci = vlan_tci; | ||
2305 | + cb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK); | ||
2306 | + | ||
2307 | + return (polling ? netif_receive_skb(skb) : netif_rx(skb)); | ||
2308 | +} | ||
2309 | +EXPORT_SYMBOL(__vlan_hwaccel_rx); | ||
2310 | + | ||
2311 | +int vlan_hwaccel_do_receive(struct sk_buff *skb) | ||
2312 | +{ | ||
2313 | + struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb); | ||
2314 | + struct net_device *dev = cb->dev; | ||
2315 | + struct net_device_stats *stats; | ||
2316 | + | ||
2317 | netif_nit_deliver(skb); | ||
2318 | |||
2319 | - skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK); | ||
2320 | - if (skb->dev == NULL) { | ||
2321 | - dev_kfree_skb_any(skb); | ||
2322 | - /* Not NET_RX_DROP, this is not being dropped | ||
2323 | - * due to congestion. */ | ||
2324 | - return NET_RX_SUCCESS; | ||
2325 | + if (dev == NULL) { | ||
2326 | + kfree_skb(skb); | ||
2327 | + return -1; | ||
2328 | } | ||
2329 | - skb->dev->last_rx = jiffies; | ||
2330 | + | ||
2331 | + skb->dev = dev; | ||
2332 | + skb->priority = vlan_get_ingress_priority(dev, skb->vlan_tci); | ||
2333 | skb->vlan_tci = 0; | ||
2334 | |||
2335 | - stats = &skb->dev->stats; | ||
2336 | + dev->last_rx = jiffies; | ||
2337 | + | ||
2338 | + stats = &dev->stats; | ||
2339 | stats->rx_packets++; | ||
2340 | stats->rx_bytes += skb->len; | ||
2341 | |||
2342 | - skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tci); | ||
2343 | switch (skb->pkt_type) { | ||
2344 | case PACKET_BROADCAST: | ||
2345 | break; | ||
2346 | @@ -43,13 +64,12 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | ||
2347 | * This allows the VLAN to have a different MAC than the | ||
2348 | * underlying device, and still route correctly. */ | ||
2349 | if (!compare_ether_addr(eth_hdr(skb)->h_dest, | ||
2350 | - skb->dev->dev_addr)) | ||
2351 | + dev->dev_addr)) | ||
2352 | skb->pkt_type = PACKET_HOST; | ||
2353 | break; | ||
2354 | }; | ||
2355 | - return (polling ? netif_receive_skb(skb) : netif_rx(skb)); | ||
2356 | + return 0; | ||
2357 | } | ||
2358 | -EXPORT_SYMBOL(__vlan_hwaccel_rx); | ||
2359 | |||
2360 | struct net_device *vlan_dev_real_dev(const struct net_device *dev) | ||
2361 | { | ||
2362 | diff --git a/net/core/dev.c b/net/core/dev.c | ||
2363 | index 5a25896..f7a30f2 100644 | ||
2364 | --- a/net/core/dev.c | ||
2365 | +++ b/net/core/dev.c | ||
2366 | @@ -2187,6 +2187,9 @@ int netif_receive_skb(struct sk_buff *skb) | ||
2367 | int ret = NET_RX_DROP; | ||
2368 | __be16 type; | ||
2369 | |||
2370 | + if (skb->vlan_tci && vlan_hwaccel_do_receive(skb)) | ||
2371 | + return NET_RX_SUCCESS; | ||
2372 | + | ||
2373 | /* if we've gotten here through NAPI, check netpoll */ | ||
2374 | if (netpoll_receive_skb(skb)) | ||
2375 | return NET_RX_DROP; |