Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0115-2.6.27.16-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(show annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 80124 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 80124 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | diff --git a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt |
2 | index 68ef488..de99749 100644 |
3 | --- a/Documentation/filesystems/sysfs-pci.txt |
4 | +++ b/Documentation/filesystems/sysfs-pci.txt |
5 | @@ -9,6 +9,7 @@ that support it. For example, a given bus might look like this: |
6 | | |-- class |
7 | | |-- config |
8 | | |-- device |
9 | + | |-- enable |
10 | | |-- irq |
11 | | |-- local_cpus |
12 | | |-- resource |
13 | @@ -32,6 +33,7 @@ files, each with their own function. |
14 | class PCI class (ascii, ro) |
15 | config PCI config space (binary, rw) |
16 | device PCI device (ascii, ro) |
17 | + enable Whether the device is enabled (ascii, rw) |
18 | irq IRQ number (ascii, ro) |
19 | local_cpus nearby CPU mask (cpumask, ro) |
20 | resource PCI resource host addresses (ascii, ro) |
21 | @@ -57,10 +59,19 @@ used to do actual device programming from userspace. Note that some platforms |
22 | don't support mmapping of certain resources, so be sure to check the return |
23 | value from any attempted mmap. |
24 | |
25 | +The 'enable' file provides a counter that indicates how many times the device |
26 | +has been enabled. If the 'enable' file currently returns '4', and a '1' is |
27 | +echoed into it, it will then return '5'. Echoing a '0' into it will decrease |
28 | +the count. Even when it returns to 0, though, some of the initialisation |
29 | +may not be reversed. |
30 | + |
31 | The 'rom' file is special in that it provides read-only access to the device's |
32 | ROM file, if available. It's disabled by default, however, so applications |
33 | should write the string "1" to the file to enable it before attempting a read |
34 | -call, and disable it following the access by writing "0" to the file. |
35 | +call, and disable it following the access by writing "0" to the file. Note |
36 | +that the device must be enabled for a rom read to return data succesfully. |
37 | +In the event a driver is not bound to the device, it can be enabled using the |
38 | +'enable' file, documented above. |
39 | |
40 | Accessing legacy resources through sysfs |
41 | ---------------------------------------- |
42 | diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c |
43 | index a15baac..0c3f2a0 100644 |
44 | --- a/arch/ia64/sn/kernel/io_acpi_init.c |
45 | +++ b/arch/ia64/sn/kernel/io_acpi_init.c |
46 | @@ -434,7 +434,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev) |
47 | size = pci_resource_len(dev, PCI_ROM_RESOURCE); |
48 | addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE], |
49 | size); |
50 | - image_size = pci_get_rom_size(addr, size); |
51 | + image_size = pci_get_rom_size(dev, addr, size); |
52 | dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr; |
53 | dev->resource[PCI_ROM_RESOURCE].end = |
54 | (unsigned long) addr + image_size - 1; |
55 | diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c |
56 | index c3aa851..1a3ed90 100644 |
57 | --- a/arch/ia64/sn/kernel/io_init.c |
58 | +++ b/arch/ia64/sn/kernel/io_init.c |
59 | @@ -269,7 +269,7 @@ sn_io_slot_fixup(struct pci_dev *dev) |
60 | |
61 | rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE), |
62 | size + 1); |
63 | - image_size = pci_get_rom_size(rom, size + 1); |
64 | + image_size = pci_get_rom_size(dev, rom, size + 1); |
65 | dev->resource[PCI_ROM_RESOURCE].end = |
66 | dev->resource[PCI_ROM_RESOURCE].start + |
67 | image_size - 1; |
68 | diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c |
69 | index f88bd0d..ffc633c 100644 |
70 | --- a/arch/x86/kernel/apic_32.c |
71 | +++ b/arch/x86/kernel/apic_32.c |
72 | @@ -1115,7 +1115,7 @@ static int __init detect_init_APIC(void) |
73 | switch (boot_cpu_data.x86_vendor) { |
74 | case X86_VENDOR_AMD: |
75 | if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) || |
76 | - (boot_cpu_data.x86 == 15)) |
77 | + (boot_cpu_data.x86 >= 15)) |
78 | break; |
79 | goto no_apic; |
80 | case X86_VENDOR_INTEL: |
81 | diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |
82 | index dd097b8..9943b4c 100644 |
83 | --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |
84 | +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |
85 | @@ -779,6 +779,9 @@ static int __init acpi_cpufreq_init(void) |
86 | { |
87 | int ret; |
88 | |
89 | + if (acpi_disabled) |
90 | + return 0; |
91 | + |
92 | dprintk("acpi_cpufreq_init\n"); |
93 | |
94 | ret = acpi_cpufreq_early_init(); |
95 | diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c |
96 | index da1973b..3384255 100644 |
97 | --- a/arch/x86/mm/fault.c |
98 | +++ b/arch/x86/mm/fault.c |
99 | @@ -607,8 +607,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) |
100 | |
101 | si_code = SEGV_MAPERR; |
102 | |
103 | - if (notify_page_fault(regs)) |
104 | - return; |
105 | if (unlikely(kmmio_fault(regs, address))) |
106 | return; |
107 | |
108 | @@ -638,6 +636,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) |
109 | if (spurious_fault(address, error_code)) |
110 | return; |
111 | |
112 | + /* kprobes don't want to hook the spurious faults. */ |
113 | + if (notify_page_fault(regs)) |
114 | + return; |
115 | /* |
116 | * Don't take the mm semaphore here. If we fixup a prefetch |
117 | * fault we could otherwise deadlock. |
118 | @@ -645,6 +646,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) |
119 | goto bad_area_nosemaphore; |
120 | } |
121 | |
122 | + /* kprobes don't want to hook the spurious faults. */ |
123 | + if (notify_page_fault(regs)) |
124 | + return; |
125 | |
126 | #ifdef CONFIG_X86_32 |
127 | /* It's safe to allow irq's after cr2 has been saved and the vmalloc |
128 | diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c |
129 | index e28469e..eab790f 100644 |
130 | --- a/drivers/acpi/dock.c |
131 | +++ b/drivers/acpi/dock.c |
132 | @@ -691,8 +691,14 @@ fdd_out: |
133 | static ssize_t show_docked(struct device *dev, |
134 | struct device_attribute *attr, char *buf) |
135 | { |
136 | - return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station)); |
137 | + struct acpi_device *tmp; |
138 | + |
139 | + struct dock_station *dock_station = *((struct dock_station **) |
140 | + dev->platform_data); |
141 | |
142 | + if (ACPI_SUCCESS(acpi_bus_get_device(dock_station->handle, &tmp))) |
143 | + return snprintf(buf, PAGE_SIZE, "1\n"); |
144 | + return snprintf(buf, PAGE_SIZE, "0\n"); |
145 | } |
146 | static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); |
147 | |
148 | diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c |
149 | index 8892b98..331a114 100644 |
150 | --- a/drivers/acpi/executer/exconfig.c |
151 | +++ b/drivers/acpi/executer/exconfig.c |
152 | @@ -280,6 +280,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, |
153 | struct acpi_walk_state *walk_state) |
154 | { |
155 | union acpi_operand_object *ddb_handle; |
156 | + struct acpi_table_header *table; |
157 | struct acpi_table_desc table_desc; |
158 | u32 table_index; |
159 | acpi_status status; |
160 | @@ -294,9 +295,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, |
161 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
162 | case ACPI_TYPE_REGION: |
163 | |
164 | - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Load from Region %p %s\n", |
165 | - obj_desc, |
166 | - acpi_ut_get_object_type_name(obj_desc))); |
167 | + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
168 | + "Load table from Region %p\n", obj_desc)); |
169 | |
170 | /* Region must be system_memory (from ACPI spec) */ |
171 | |
172 | @@ -316,61 +316,112 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, |
173 | } |
174 | |
175 | /* |
176 | - * We will simply map the memory region for the table. However, the |
177 | - * memory region is technically not guaranteed to remain stable and |
178 | - * we may eventually have to copy the table to a local buffer. |
179 | + * Map the table header and get the actual table length. The region |
180 | + * length is not guaranteed to be the same as the table length. |
181 | + */ |
182 | + table = acpi_os_map_memory(obj_desc->region.address, |
183 | + sizeof(struct acpi_table_header)); |
184 | + if (!table) { |
185 | + return_ACPI_STATUS(AE_NO_MEMORY); |
186 | + } |
187 | + |
188 | + length = table->length; |
189 | + acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); |
190 | + |
191 | + /* Must have at least an ACPI table header */ |
192 | + |
193 | + if (length < sizeof(struct acpi_table_header)) { |
194 | + return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
195 | + } |
196 | + |
197 | + /* |
198 | + * The memory region is not guaranteed to remain stable and we must |
199 | + * copy the table to a local buffer. For example, the memory region |
200 | + * is corrupted after suspend on some machines. Dynamically loaded |
201 | + * tables are usually small, so this overhead is minimal. |
202 | */ |
203 | + |
204 | + /* Allocate a buffer for the table */ |
205 | + |
206 | + table_desc.pointer = ACPI_ALLOCATE(length); |
207 | + if (!table_desc.pointer) { |
208 | + return_ACPI_STATUS(AE_NO_MEMORY); |
209 | + } |
210 | + |
211 | + /* Map the entire table and copy it */ |
212 | + |
213 | + table = acpi_os_map_memory(obj_desc->region.address, length); |
214 | + if (!table) { |
215 | + ACPI_FREE(table_desc.pointer); |
216 | + return_ACPI_STATUS(AE_NO_MEMORY); |
217 | + } |
218 | + |
219 | + ACPI_MEMCPY(table_desc.pointer, table, length); |
220 | + acpi_os_unmap_memory(table, length); |
221 | + |
222 | table_desc.address = obj_desc->region.address; |
223 | - table_desc.length = obj_desc->region.length; |
224 | - table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED; |
225 | break; |
226 | |
227 | case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */ |
228 | |
229 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
230 | - "Load from Buffer or Field %p %s\n", obj_desc, |
231 | - acpi_ut_get_object_type_name(obj_desc))); |
232 | - |
233 | - length = obj_desc->buffer.length; |
234 | + "Load table from Buffer or Field %p\n", |
235 | + obj_desc)); |
236 | |
237 | /* Must have at least an ACPI table header */ |
238 | |
239 | - if (length < sizeof(struct acpi_table_header)) { |
240 | + if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) { |
241 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
242 | } |
243 | |
244 | - /* Validate checksum here. It won't get validated in tb_add_table */ |
245 | + /* Get the actual table length from the table header */ |
246 | |
247 | - status = |
248 | - acpi_tb_verify_checksum(ACPI_CAST_PTR |
249 | - (struct acpi_table_header, |
250 | - obj_desc->buffer.pointer), length); |
251 | - if (ACPI_FAILURE(status)) { |
252 | - return_ACPI_STATUS(status); |
253 | + table = |
254 | + ACPI_CAST_PTR(struct acpi_table_header, |
255 | + obj_desc->buffer.pointer); |
256 | + length = table->length; |
257 | + |
258 | + /* Table cannot extend beyond the buffer */ |
259 | + |
260 | + if (length > obj_desc->buffer.length) { |
261 | + return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); |
262 | + } |
263 | + if (length < sizeof(struct acpi_table_header)) { |
264 | + return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
265 | } |
266 | |
267 | /* |
268 | - * We need to copy the buffer since the original buffer could be |
269 | - * changed or deleted in the future |
270 | + * Copy the table from the buffer because the buffer could be modified |
271 | + * or even deleted in the future |
272 | */ |
273 | table_desc.pointer = ACPI_ALLOCATE(length); |
274 | if (!table_desc.pointer) { |
275 | return_ACPI_STATUS(AE_NO_MEMORY); |
276 | } |
277 | |
278 | - ACPI_MEMCPY(table_desc.pointer, obj_desc->buffer.pointer, |
279 | - length); |
280 | - table_desc.length = length; |
281 | - table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED; |
282 | + ACPI_MEMCPY(table_desc.pointer, table, length); |
283 | + table_desc.address = ACPI_TO_INTEGER(table_desc.pointer); |
284 | break; |
285 | |
286 | default: |
287 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
288 | } |
289 | |
290 | - /* |
291 | - * Install the new table into the local data structures |
292 | - */ |
293 | + /* Validate table checksum (will not get validated in tb_add_table) */ |
294 | + |
295 | + status = acpi_tb_verify_checksum(table_desc.pointer, length); |
296 | + if (ACPI_FAILURE(status)) { |
297 | + ACPI_FREE(table_desc.pointer); |
298 | + return_ACPI_STATUS(status); |
299 | + } |
300 | + |
301 | + /* Complete the table descriptor */ |
302 | + |
303 | + table_desc.length = length; |
304 | + table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED; |
305 | + |
306 | + /* Install the new table into the local data structures */ |
307 | + |
308 | status = acpi_tb_add_table(&table_desc, &table_index); |
309 | if (ACPI_FAILURE(status)) { |
310 | goto cleanup; |
311 | @@ -379,7 +430,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, |
312 | /* |
313 | * Add the table to the namespace. |
314 | * |
315 | - * Note: We load the table objects relative to the root of the namespace. |
316 | + * Note: Load the table objects relative to the root of the namespace. |
317 | * This appears to go against the ACPI specification, but we do it for |
318 | * compatibility with other ACPI implementations. |
319 | */ |
320 | @@ -415,7 +466,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, |
321 | cleanup: |
322 | if (ACPI_FAILURE(status)) { |
323 | |
324 | - /* Delete allocated buffer or mapping */ |
325 | + /* Delete allocated table buffer */ |
326 | |
327 | acpi_tb_delete_table(&table_desc); |
328 | } |
329 | diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c |
330 | index 38be586..f3cc376 100644 |
331 | --- a/drivers/acpi/namespace/nsxfeval.c |
332 | +++ b/drivers/acpi/namespace/nsxfeval.c |
333 | @@ -45,9 +45,14 @@ |
334 | #include <acpi/acpi.h> |
335 | #include <acpi/acnamesp.h> |
336 | #include <acpi/acinterp.h> |
337 | +#include <acpi/amlcode.h> |
338 | |
339 | #define _COMPONENT ACPI_NAMESPACE |
340 | ACPI_MODULE_NAME("nsxfeval") |
341 | + |
342 | +/* Local prototypes */ |
343 | +static void acpi_ns_resolve_references(struct acpi_evaluate_info *info); |
344 | + |
345 | #ifdef ACPI_FUTURE_USAGE |
346 | /******************************************************************************* |
347 | * |
348 | @@ -69,6 +74,7 @@ ACPI_MODULE_NAME("nsxfeval") |
349 | * be valid (non-null) |
350 | * |
351 | ******************************************************************************/ |
352 | + |
353 | acpi_status |
354 | acpi_evaluate_object_typed(acpi_handle handle, |
355 | acpi_string pathname, |
356 | @@ -283,6 +289,10 @@ acpi_evaluate_object(acpi_handle handle, |
357 | |
358 | if (ACPI_SUCCESS(status)) { |
359 | |
360 | + /* Dereference Index and ref_of references */ |
361 | + |
362 | + acpi_ns_resolve_references(info); |
363 | + |
364 | /* Get the size of the returned object */ |
365 | |
366 | status = |
367 | @@ -352,6 +362,74 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object) |
368 | |
369 | /******************************************************************************* |
370 | * |
371 | + * FUNCTION: acpi_ns_resolve_references |
372 | + * |
373 | + * PARAMETERS: Info - Evaluation info block |
374 | + * |
375 | + * RETURN: Info->return_object is replaced with the dereferenced object |
376 | + * |
377 | + * DESCRIPTION: Dereference certain reference objects. Called before an |
378 | + * internal return object is converted to an external union acpi_object. |
379 | + * |
380 | + * Performs an automatic dereference of Index and ref_of reference objects. |
381 | + * These reference objects are not supported by the union acpi_object, so this is a |
382 | + * last resort effort to return something useful. Also, provides compatibility |
383 | + * with other ACPI implementations. |
384 | + * |
385 | + * NOTE: does not handle references within returned package objects or nested |
386 | + * references, but this support could be added later if found to be necessary. |
387 | + * |
388 | + ******************************************************************************/ |
389 | +static void acpi_ns_resolve_references(struct acpi_evaluate_info *info) |
390 | +{ |
391 | + union acpi_operand_object *obj_desc = NULL; |
392 | + struct acpi_namespace_node *node; |
393 | + |
394 | + /* We are interested in reference objects only */ |
395 | + |
396 | + if (ACPI_GET_OBJECT_TYPE(info->return_object) != |
397 | + ACPI_TYPE_LOCAL_REFERENCE) { |
398 | + return; |
399 | + } |
400 | + |
401 | + /* |
402 | + * Two types of references are supported - those created by Index and |
403 | + * ref_of operators. A name reference (AML_NAMEPATH_OP) can be converted |
404 | + * to an union acpi_object, so it is not dereferenced here. A ddb_handle |
405 | + * (AML_LOAD_OP) cannot be dereferenced, nor can it be converted to |
406 | + * an union acpi_object. |
407 | + */ |
408 | + switch (info->return_object->reference.opcode) { |
409 | + case AML_INDEX_OP: |
410 | + |
411 | + obj_desc = *(info->return_object->reference.where); |
412 | + break; |
413 | + |
414 | + case AML_REF_OF_OP: |
415 | + |
416 | + node = info->return_object->reference.object; |
417 | + if (node) { |
418 | + obj_desc = node->object; |
419 | + } |
420 | + break; |
421 | + |
422 | + default: |
423 | + return; |
424 | + } |
425 | + |
426 | + /* Replace the existing reference object */ |
427 | + |
428 | + if (obj_desc) { |
429 | + acpi_ut_add_reference(obj_desc); |
430 | + acpi_ut_remove_reference(info->return_object); |
431 | + info->return_object = obj_desc; |
432 | + } |
433 | + |
434 | + return; |
435 | +} |
436 | + |
437 | +/******************************************************************************* |
438 | + * |
439 | * FUNCTION: acpi_walk_namespace |
440 | * |
441 | * PARAMETERS: Type - acpi_object_type to search for |
442 | @@ -379,6 +457,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object) |
443 | * function, etc. |
444 | * |
445 | ******************************************************************************/ |
446 | + |
447 | acpi_status |
448 | acpi_walk_namespace(acpi_object_type type, |
449 | acpi_handle start_object, |
450 | diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c |
451 | index 775c97a..a885295 100644 |
452 | --- a/drivers/acpi/tables.c |
453 | +++ b/drivers/acpi/tables.c |
454 | @@ -293,7 +293,12 @@ static void __init check_multiple_madt(void) |
455 | |
456 | int __init acpi_table_init(void) |
457 | { |
458 | - acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); |
459 | + acpi_status status; |
460 | + |
461 | + status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); |
462 | + if (ACPI_FAILURE(status)) |
463 | + return 1; |
464 | + |
465 | check_multiple_madt(); |
466 | return 0; |
467 | } |
468 | diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c |
469 | index 0cc92ef..f5d7aec 100644 |
470 | --- a/drivers/acpi/tables/tbutils.c |
471 | +++ b/drivers/acpi/tables/tbutils.c |
472 | @@ -512,10 +512,9 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) |
473 | if (ACPI_FAILURE(status)) { |
474 | ACPI_WARNING((AE_INFO, |
475 | "Truncating %u table entries!", |
476 | - (unsigned) |
477 | - (acpi_gbl_root_table_list.size - |
478 | - acpi_gbl_root_table_list. |
479 | - count))); |
480 | + (unsigned) (table_count - |
481 | + (acpi_gbl_root_table_list. |
482 | + count - 2)))); |
483 | break; |
484 | } |
485 | } |
486 | diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c |
487 | index 42e1e84..a953b5d 100644 |
488 | --- a/drivers/acpi/video.c |
489 | +++ b/drivers/acpi/video.c |
490 | @@ -36,6 +36,7 @@ |
491 | #include <linux/backlight.h> |
492 | #include <linux/thermal.h> |
493 | #include <linux/video_output.h> |
494 | +#include <linux/sort.h> |
495 | #include <asm/uaccess.h> |
496 | |
497 | #include <acpi/acpi_bus.h> |
498 | @@ -632,6 +633,16 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) |
499 | } |
500 | |
501 | /* |
502 | + * Simple comparison function used to sort backlight levels. |
503 | + */ |
504 | + |
505 | +static int |
506 | +acpi_video_cmp_level(const void *a, const void *b) |
507 | +{ |
508 | + return *(int *)a - *(int *)b; |
509 | +} |
510 | + |
511 | +/* |
512 | * Arg: |
513 | * device : video output device (LCD, CRT, ..) |
514 | * |
515 | @@ -682,6 +693,10 @@ acpi_video_init_brightness(struct acpi_video_device *device) |
516 | count++; |
517 | } |
518 | |
519 | + /* don't sort the first two brightness levels */ |
520 | + sort(&br->levels[2], count - 2, sizeof(br->levels[2]), |
521 | + acpi_video_cmp_level, NULL); |
522 | + |
523 | if (count < 2) |
524 | goto out_free_levels; |
525 | |
526 | @@ -997,7 +1012,7 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) |
527 | } |
528 | |
529 | seq_printf(seq, "levels: "); |
530 | - for (i = 0; i < dev->brightness->count; i++) |
531 | + for (i = 2; i < dev->brightness->count; i++) |
532 | seq_printf(seq, " %d", dev->brightness->levels[i]); |
533 | seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); |
534 | |
535 | @@ -1036,7 +1051,7 @@ acpi_video_device_write_brightness(struct file *file, |
536 | return -EFAULT; |
537 | |
538 | /* validate through the list of available levels */ |
539 | - for (i = 0; i < dev->brightness->count; i++) |
540 | + for (i = 2; i < dev->brightness->count; i++) |
541 | if (level == dev->brightness->levels[i]) { |
542 | if (ACPI_SUCCESS |
543 | (acpi_video_device_lcd_set_level(dev, level))) |
544 | @@ -1689,7 +1704,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, |
545 | max = max_below = 0; |
546 | min = min_above = 255; |
547 | /* Find closest level to level_current */ |
548 | - for (i = 0; i < device->brightness->count; i++) { |
549 | + for (i = 2; i < device->brightness->count; i++) { |
550 | l = device->brightness->levels[i]; |
551 | if (abs(l - level_current) < abs(delta)) { |
552 | delta = l - level_current; |
553 | @@ -1699,7 +1714,7 @@ acpi_video_get_next_level(struct acpi_video_device *device, |
554 | } |
555 | /* Ajust level_current to closest available level */ |
556 | level_current += delta; |
557 | - for (i = 0; i < device->brightness->count; i++) { |
558 | + for (i = 2; i < device->brightness->count; i++) { |
559 | l = device->brightness->levels[i]; |
560 | if (l < min) |
561 | min = l; |
562 | @@ -1983,6 +1998,12 @@ static int acpi_video_bus_add(struct acpi_device *device) |
563 | device->pnp.bus_id[3] = '0' + instance; |
564 | instance ++; |
565 | } |
566 | + /* a hack to fix the duplicate name "VGA" problem on Pa 3553 */ |
567 | + if (!strcmp(device->pnp.bus_id, "VGA")) { |
568 | + if (instance) |
569 | + device->pnp.bus_id[3] = '0' + instance; |
570 | + instance++; |
571 | + } |
572 | |
573 | video->device = device; |
574 | strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); |
575 | diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c |
576 | index f1fe749..5eb23fa 100644 |
577 | --- a/drivers/char/agp/intel-agp.c |
578 | +++ b/drivers/char/agp/intel-agp.c |
579 | @@ -40,6 +40,8 @@ |
580 | #define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12 |
581 | #define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20 |
582 | #define PCI_DEVICE_ID_INTEL_G45_IG 0x2E22 |
583 | +#define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30 |
584 | +#define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32 |
585 | |
586 | /* cover 915 and 945 variants */ |
587 | #define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \ |
588 | @@ -63,7 +65,8 @@ |
589 | #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \ |
590 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ |
591 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ |
592 | - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB) |
593 | + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB || \ |
594 | + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G41_HB) |
595 | |
596 | extern int agp_memory_reserved; |
597 | |
598 | @@ -214,8 +217,8 @@ static int intel_i810_configure(void) |
599 | if (agp_bridge->driver->needs_scratch_page) { |
600 | for (i = 0; i < current_size->num_entries; i++) { |
601 | writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4)); |
602 | - readl(intel_private.registers+I810_PTE_BASE+(i*4)); /* PCI posting. */ |
603 | } |
604 | + readl(intel_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI posting. */ |
605 | } |
606 | global_cache_flush(); |
607 | return 0; |
608 | @@ -775,8 +778,8 @@ static int intel_i830_configure(void) |
609 | if (agp_bridge->driver->needs_scratch_page) { |
610 | for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) { |
611 | writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4)); |
612 | - readl(intel_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */ |
613 | } |
614 | + readl(intel_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI Posting. */ |
615 | } |
616 | |
617 | global_cache_flush(); |
618 | @@ -991,8 +994,8 @@ static int intel_i915_configure(void) |
619 | if (agp_bridge->driver->needs_scratch_page) { |
620 | for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) { |
621 | writel(agp_bridge->scratch_page, intel_private.gtt+i); |
622 | - readl(intel_private.gtt+i); /* PCI Posting. */ |
623 | } |
624 | + readl(intel_private.gtt+i-1); /* PCI Posting. */ |
625 | } |
626 | |
627 | global_cache_flush(); |
628 | @@ -1196,6 +1199,7 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) |
629 | case PCI_DEVICE_ID_INTEL_IGD_E_HB: |
630 | case PCI_DEVICE_ID_INTEL_Q45_HB: |
631 | case PCI_DEVICE_ID_INTEL_G45_HB: |
632 | + case PCI_DEVICE_ID_INTEL_G41_HB: |
633 | *gtt_offset = *gtt_size = MB(2); |
634 | break; |
635 | default: |
636 | @@ -2128,13 +2132,15 @@ static const struct intel_driver_description { |
637 | { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", |
638 | NULL, &intel_g33_driver }, |
639 | { PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0, |
640 | - "Mobile Intel? GM45 Express", NULL, &intel_i965_driver }, |
641 | + "Mobile Intel® GM45 Express", NULL, &intel_i965_driver }, |
642 | { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0, |
643 | "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, |
644 | { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0, |
645 | "Q45/Q43", NULL, &intel_i965_driver }, |
646 | { PCI_DEVICE_ID_INTEL_G45_HB, PCI_DEVICE_ID_INTEL_G45_IG, 0, |
647 | "G45/G43", NULL, &intel_i965_driver }, |
648 | + { PCI_DEVICE_ID_INTEL_G41_HB, PCI_DEVICE_ID_INTEL_G41_IG, 0, |
649 | + "G41", NULL, &intel_i965_driver }, |
650 | { 0, 0, 0, NULL, NULL, NULL } |
651 | }; |
652 | |
653 | @@ -2332,6 +2338,7 @@ static struct pci_device_id agp_intel_pci_table[] = { |
654 | ID(PCI_DEVICE_ID_INTEL_IGD_E_HB), |
655 | ID(PCI_DEVICE_ID_INTEL_Q45_HB), |
656 | ID(PCI_DEVICE_ID_INTEL_G45_HB), |
657 | + ID(PCI_DEVICE_ID_INTEL_G41_HB), |
658 | { } |
659 | }; |
660 | |
661 | diff --git a/drivers/char/vt.c b/drivers/char/vt.c |
662 | index d429499..372267d 100644 |
663 | --- a/drivers/char/vt.c |
664 | +++ b/drivers/char/vt.c |
665 | @@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, unsigned int t, unsigned int b, int nr) |
666 | d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); |
667 | s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr)); |
668 | scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row); |
669 | - scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_scrl_erase_char, |
670 | + scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char, |
671 | vc->vc_size_row * nr); |
672 | } |
673 | |
674 | @@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr) |
675 | s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t); |
676 | step = vc->vc_cols * nr; |
677 | scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row); |
678 | - scr_memsetw(s, vc->vc_scrl_erase_char, 2 * step); |
679 | + scr_memsetw(s, vc->vc_video_erase_char, 2 * step); |
680 | } |
681 | |
682 | static void do_update_region(struct vc_data *vc, unsigned long start, int count) |
683 | @@ -434,7 +434,6 @@ static void update_attr(struct vc_data *vc) |
684 | vc->vc_blink, vc->vc_underline, |
685 | vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); |
686 | vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; |
687 | - vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' '; |
688 | } |
689 | |
690 | /* Note: inverting the screen twice should revert to the original state */ |
691 | diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c |
692 | index 595759c..cd589ca 100644 |
693 | --- a/drivers/firewire/fw-ohci.c |
694 | +++ b/drivers/firewire/fw-ohci.c |
695 | @@ -226,7 +226,7 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card) |
696 | #define CONTEXT_DEAD 0x0800 |
697 | #define CONTEXT_ACTIVE 0x0400 |
698 | |
699 | -#define OHCI1394_MAX_AT_REQ_RETRIES 0x2 |
700 | +#define OHCI1394_MAX_AT_REQ_RETRIES 0xf |
701 | #define OHCI1394_MAX_AT_RESP_RETRIES 0x2 |
702 | #define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8 |
703 | |
704 | diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c |
705 | index 64142c1..716370c 100644 |
706 | --- a/drivers/firewire/fw-sbp2.c |
707 | +++ b/drivers/firewire/fw-sbp2.c |
708 | @@ -350,15 +350,17 @@ static const struct { |
709 | .model = ~0, |
710 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, |
711 | }, |
712 | - |
713 | /* |
714 | - * There are iPods (2nd gen, 3rd gen) with model_id == 0, but |
715 | - * these iPods do not feature the read_capacity bug according |
716 | - * to one report. Read_capacity behaviour as well as model_id |
717 | - * could change due to Apple-supplied firmware updates though. |
718 | + * iPod 2nd generation: needs 128k max transfer size workaround |
719 | + * iPod 3rd generation: needs fix capacity workaround |
720 | */ |
721 | - |
722 | - /* iPod 4th generation. */ { |
723 | + { |
724 | + .firmware_revision = 0x0a2700, |
725 | + .model = 0x000000, |
726 | + .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS | |
727 | + SBP2_WORKAROUND_FIX_CAPACITY, |
728 | + }, |
729 | + /* iPod 4th generation */ { |
730 | .firmware_revision = 0x0a2700, |
731 | .model = 0x000021, |
732 | .workarounds = SBP2_WORKAROUND_FIX_CAPACITY, |
733 | @@ -1293,6 +1295,19 @@ static struct fw_driver sbp2_driver = { |
734 | .id_table = sbp2_id_table, |
735 | }; |
736 | |
737 | +static void sbp2_unmap_scatterlist(struct device *card_device, |
738 | + struct sbp2_command_orb *orb) |
739 | +{ |
740 | + if (scsi_sg_count(orb->cmd)) |
741 | + dma_unmap_sg(card_device, scsi_sglist(orb->cmd), |
742 | + scsi_sg_count(orb->cmd), |
743 | + orb->cmd->sc_data_direction); |
744 | + |
745 | + if (orb->request.misc & cpu_to_be32(COMMAND_ORB_PAGE_TABLE_PRESENT)) |
746 | + dma_unmap_single(card_device, orb->page_table_bus, |
747 | + sizeof(orb->page_table), DMA_TO_DEVICE); |
748 | +} |
749 | + |
750 | static unsigned int |
751 | sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data) |
752 | { |
753 | @@ -1372,15 +1387,7 @@ complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status) |
754 | |
755 | dma_unmap_single(device->card->device, orb->base.request_bus, |
756 | sizeof(orb->request), DMA_TO_DEVICE); |
757 | - |
758 | - if (scsi_sg_count(orb->cmd) > 0) |
759 | - dma_unmap_sg(device->card->device, scsi_sglist(orb->cmd), |
760 | - scsi_sg_count(orb->cmd), |
761 | - orb->cmd->sc_data_direction); |
762 | - |
763 | - if (orb->page_table_bus != 0) |
764 | - dma_unmap_single(device->card->device, orb->page_table_bus, |
765 | - sizeof(orb->page_table), DMA_TO_DEVICE); |
766 | + sbp2_unmap_scatterlist(device->card->device, orb); |
767 | |
768 | orb->cmd->result = result; |
769 | orb->done(orb->cmd); |
770 | @@ -1530,8 +1537,10 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) |
771 | orb->base.request_bus = |
772 | dma_map_single(device->card->device, &orb->request, |
773 | sizeof(orb->request), DMA_TO_DEVICE); |
774 | - if (dma_mapping_error(device->card->device, orb->base.request_bus)) |
775 | + if (dma_mapping_error(device->card->device, orb->base.request_bus)) { |
776 | + sbp2_unmap_scatterlist(device->card->device, orb); |
777 | goto out; |
778 | + } |
779 | |
780 | sbp2_send_orb(&orb->base, lu, lu->tgt->node_id, lu->generation, |
781 | lu->command_block_agent_address + SBP2_ORB_POINTER); |
782 | diff --git a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h |
783 | index 4320bf0..7fb8ab9 100644 |
784 | --- a/drivers/ieee1394/ohci1394.h |
785 | +++ b/drivers/ieee1394/ohci1394.h |
786 | @@ -26,7 +26,7 @@ |
787 | |
788 | #define OHCI1394_DRIVER_NAME "ohci1394" |
789 | |
790 | -#define OHCI1394_MAX_AT_REQ_RETRIES 0x2 |
791 | +#define OHCI1394_MAX_AT_REQ_RETRIES 0xf |
792 | #define OHCI1394_MAX_AT_RESP_RETRIES 0x2 |
793 | #define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8 |
794 | #define OHCI1394_MAX_SELF_ID_ERRORS 16 |
795 | diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c |
796 | index bad46ea..0c0fdbb 100644 |
797 | --- a/drivers/ieee1394/sbp2.c |
798 | +++ b/drivers/ieee1394/sbp2.c |
799 | @@ -395,6 +395,16 @@ static const struct { |
800 | .model_id = SBP2_ROM_VALUE_WILDCARD, |
801 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, |
802 | }, |
803 | + /* |
804 | + * iPod 2nd generation: needs 128k max transfer size workaround |
805 | + * iPod 3rd generation: needs fix capacity workaround |
806 | + */ |
807 | + { |
808 | + .firmware_revision = 0x0a2700, |
809 | + .model_id = 0x000000, |
810 | + .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS | |
811 | + SBP2_WORKAROUND_FIX_CAPACITY, |
812 | + }, |
813 | /* iPod 4th generation */ { |
814 | .firmware_revision = 0x0a2700, |
815 | .model_id = 0x000021, |
816 | diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c |
817 | index c2fcf28..61f5753 100644 |
818 | --- a/drivers/md/dm-mpath.c |
819 | +++ b/drivers/md/dm-mpath.c |
820 | @@ -427,13 +427,13 @@ static void process_queued_ios(struct work_struct *work) |
821 | __choose_pgpath(m); |
822 | |
823 | pgpath = m->current_pgpath; |
824 | - m->pgpath_to_activate = m->current_pgpath; |
825 | |
826 | if ((pgpath && !m->queue_io) || |
827 | (!pgpath && !m->queue_if_no_path)) |
828 | must_queue = 0; |
829 | |
830 | - if (m->pg_init_required && !m->pg_init_in_progress) { |
831 | + if (m->pg_init_required && !m->pg_init_in_progress && pgpath) { |
832 | + m->pgpath_to_activate = pgpath; |
833 | m->pg_init_count++; |
834 | m->pg_init_required = 0; |
835 | m->pg_init_in_progress = 1; |
836 | diff --git a/drivers/md/md.c b/drivers/md/md.c |
837 | index fe6eccd..60f3e59 100644 |
838 | --- a/drivers/md/md.c |
839 | +++ b/drivers/md/md.c |
840 | @@ -1454,6 +1454,11 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) |
841 | if (find_rdev_nr(mddev, rdev->desc_nr)) |
842 | return -EBUSY; |
843 | } |
844 | + if (mddev->max_disks && rdev->desc_nr >= mddev->max_disks) { |
845 | + printk(KERN_WARNING "md: %s: array is limited to %d devices\n", |
846 | + mdname(mddev), mddev->max_disks); |
847 | + return -EBUSY; |
848 | + } |
849 | bdevname(rdev->bdev,b); |
850 | while ( (s=strchr(b, '/')) != NULL) |
851 | *s = '!'; |
852 | @@ -2362,6 +2367,15 @@ static void analyze_sbs(mddev_t * mddev) |
853 | |
854 | i = 0; |
855 | rdev_for_each(rdev, tmp, mddev) { |
856 | + if (rdev->desc_nr >= mddev->max_disks || |
857 | + i > mddev->max_disks) { |
858 | + printk(KERN_WARNING |
859 | + "md: %s: %s: only %d devices permitted\n", |
860 | + mdname(mddev), bdevname(rdev->bdev, b), |
861 | + mddev->max_disks); |
862 | + kick_rdev_from_array(rdev); |
863 | + continue; |
864 | + } |
865 | if (rdev != freshest) |
866 | if (super_types[mddev->major_version]. |
867 | validate_super(mddev, rdev)) { |
868 | @@ -2728,9 +2742,9 @@ array_state_store(mddev_t *mddev, const char *buf, size_t len) |
869 | break; |
870 | case read_auto: |
871 | if (mddev->pers) { |
872 | - if (mddev->ro != 1) |
873 | + if (mddev->ro == 0) |
874 | err = do_md_stop(mddev, 1, 0); |
875 | - else |
876 | + else if (mddev->ro == 1) |
877 | err = restart_array(mddev); |
878 | if (err == 0) { |
879 | mddev->ro = 2; |
880 | @@ -2946,7 +2960,13 @@ metadata_store(mddev_t *mddev, const char *buf, size_t len) |
881 | { |
882 | int major, minor; |
883 | char *e; |
884 | - if (!list_empty(&mddev->disks)) |
885 | + /* Changing the details of 'external' metadata is |
886 | + * always permitted. Otherwise there must be |
887 | + * no devices attached to the array. |
888 | + */ |
889 | + if (mddev->external && strncmp(buf, "external:", 9) == 0) |
890 | + ; |
891 | + else if (!list_empty(&mddev->disks)) |
892 | return -EBUSY; |
893 | |
894 | if (cmd_match(buf, "none")) { |
895 | @@ -4450,13 +4470,6 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev) |
896 | * noticed in interrupt contexts ... |
897 | */ |
898 | |
899 | - if (rdev->desc_nr == mddev->max_disks) { |
900 | - printk(KERN_WARNING "%s: can not hot-add to full array!\n", |
901 | - mdname(mddev)); |
902 | - err = -EBUSY; |
903 | - goto abort_unbind_export; |
904 | - } |
905 | - |
906 | rdev->raid_disk = -1; |
907 | |
908 | md_update_sb(mddev, 1); |
909 | @@ -4470,9 +4483,6 @@ static int hot_add_disk(mddev_t * mddev, dev_t dev) |
910 | md_new_event(mddev); |
911 | return 0; |
912 | |
913 | -abort_unbind_export: |
914 | - unbind_rdev_from_array(rdev); |
915 | - |
916 | abort_export: |
917 | export_rdev(rdev); |
918 | return err; |
919 | diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c |
920 | index 616bcbd..13a8996 100644 |
921 | --- a/drivers/misc/eeepc-laptop.c |
922 | +++ b/drivers/misc/eeepc-laptop.c |
923 | @@ -381,7 +381,8 @@ static void notify_wlan(u32 *event) |
924 | static void notify_brn(void) |
925 | { |
926 | struct backlight_device *bd = eeepc_backlight_device; |
927 | - bd->props.brightness = read_brightness(bd); |
928 | + if (bd) |
929 | + bd->props.brightness = read_brightness(bd); |
930 | } |
931 | |
932 | static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) |
933 | diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h |
934 | index 619208d..bcf3782 100644 |
935 | --- a/drivers/misc/sgi-xp/xpc.h |
936 | +++ b/drivers/misc/sgi-xp/xpc.h |
937 | @@ -3,7 +3,7 @@ |
938 | * License. See the file "COPYING" in the main directory of this archive |
939 | * for more details. |
940 | * |
941 | - * Copyright (c) 2004-2008 Silicon Graphics, Inc. All Rights Reserved. |
942 | + * Copyright (c) 2004-2009 Silicon Graphics, Inc. All Rights Reserved. |
943 | */ |
944 | |
945 | /* |
946 | @@ -502,7 +502,8 @@ struct xpc_channel_uv { |
947 | /* partition's notify mq */ |
948 | |
949 | struct xpc_send_msg_slot_uv *send_msg_slots; |
950 | - struct xpc_notify_mq_msg_uv *recv_msg_slots; |
951 | + void *recv_msg_slots; /* each slot will hold a xpc_notify_mq_msg_uv */ |
952 | + /* structure plus the user's payload */ |
953 | |
954 | struct xpc_fifo_head_uv msg_slot_free_list; |
955 | struct xpc_fifo_head_uv recv_msg_list; /* deliverable payloads */ |
956 | diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c |
957 | index b8f8d50..1bb8bc5 100644 |
958 | --- a/drivers/misc/sgi-xp/xpc_uv.c |
959 | +++ b/drivers/misc/sgi-xp/xpc_uv.c |
960 | @@ -3,7 +3,7 @@ |
961 | * License. See the file "COPYING" in the main directory of this archive |
962 | * for more details. |
963 | * |
964 | - * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. |
965 | + * Copyright (c) 2008-2009 Silicon Graphics, Inc. All Rights Reserved. |
966 | */ |
967 | |
968 | /* |
969 | @@ -825,8 +825,8 @@ xpc_allocate_recv_msg_slot_uv(struct xpc_channel *ch) |
970 | continue; |
971 | |
972 | for (entry = 0; entry < nentries; entry++) { |
973 | - msg_slot = ch_uv->recv_msg_slots + entry * |
974 | - ch->entry_size; |
975 | + msg_slot = ch_uv->recv_msg_slots + |
976 | + entry * ch->entry_size; |
977 | |
978 | msg_slot->hdr.msg_slot_number = entry; |
979 | } |
980 | @@ -1123,9 +1123,8 @@ xpc_handle_notify_mq_msg_uv(struct xpc_partition *part, |
981 | /* we're dealing with a normal message sent via the notify_mq */ |
982 | ch_uv = &ch->sn.uv; |
983 | |
984 | - msg_slot = (struct xpc_notify_mq_msg_uv *)((u64)ch_uv->recv_msg_slots + |
985 | - (msg->hdr.msg_slot_number % ch->remote_nentries) * |
986 | - ch->entry_size); |
987 | + msg_slot = ch_uv->recv_msg_slots + |
988 | + (msg->hdr.msg_slot_number % ch->remote_nentries) * ch->entry_size; |
989 | |
990 | BUG_ON(msg->hdr.msg_slot_number != msg_slot->hdr.msg_slot_number); |
991 | BUG_ON(msg_slot->hdr.size != 0); |
992 | diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c |
993 | index 872ea58..6b96357 100644 |
994 | --- a/drivers/net/e1000/e1000_main.c |
995 | +++ b/drivers/net/e1000/e1000_main.c |
996 | @@ -31,7 +31,7 @@ |
997 | |
998 | char e1000_driver_name[] = "e1000"; |
999 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; |
1000 | -#define DRV_VERSION "7.3.20-k3-NAPI" |
1001 | +#define DRV_VERSION "7.3.21-k3-NAPI" |
1002 | const char e1000_driver_version[] = DRV_VERSION; |
1003 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
1004 | |
1005 | @@ -927,7 +927,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, |
1006 | err = pci_enable_device(pdev); |
1007 | } else { |
1008 | bars = pci_select_bars(pdev, IORESOURCE_MEM); |
1009 | - err = pci_enable_device(pdev); |
1010 | + err = pci_enable_device_mem(pdev); |
1011 | } |
1012 | if (err) |
1013 | return err; |
1014 | @@ -3835,7 +3835,7 @@ static irqreturn_t e1000_intr(int irq, void *data) |
1015 | struct e1000_hw *hw = &adapter->hw; |
1016 | u32 rctl, icr = er32(ICR); |
1017 | |
1018 | - if (unlikely(!icr)) |
1019 | + if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags))) |
1020 | return IRQ_NONE; /* Not our interrupt */ |
1021 | |
1022 | /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is |
1023 | diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c |
1024 | index 6e42b5a..5790194 100644 |
1025 | --- a/drivers/net/usb/hso.c |
1026 | +++ b/drivers/net/usb/hso.c |
1027 | @@ -2047,7 +2047,7 @@ static void hso_create_rfkill(struct hso_device *hso_dev, |
1028 | char *rfkn; |
1029 | |
1030 | hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev, |
1031 | - RFKILL_TYPE_WLAN); |
1032 | + RFKILL_TYPE_WWAN); |
1033 | if (!hso_net->rfkill) { |
1034 | dev_err(dev, "%s - Out of memory", __func__); |
1035 | return; |
1036 | diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c |
1037 | index dcce354..966c86c 100644 |
1038 | --- a/drivers/net/wireless/ipw2200.c |
1039 | +++ b/drivers/net/wireless/ipw2200.c |
1040 | @@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, |
1041 | return; |
1042 | } |
1043 | |
1044 | - if (priv->status & STATUS_SCANNING) { |
1045 | + if (priv->status & STATUS_SCANNING && |
1046 | + missed_count > IPW_MB_SCAN_CANCEL_THRESHOLD) { |
1047 | /* Stop scan to keep fw from getting |
1048 | * stuck (only if we aren't roaming -- |
1049 | * otherwise we'll never scan more than 2 or 3 |
1050 | @@ -6276,6 +6277,20 @@ static void ipw_add_scan_channels(struct ipw_priv *priv, |
1051 | } |
1052 | } |
1053 | |
1054 | +static int ipw_passive_dwell_time(struct ipw_priv *priv) |
1055 | +{ |
1056 | + /* staying on passive channels longer than the DTIM interval during a |
1057 | + * scan, while associated, causes the firmware to cancel the scan |
1058 | + * without notification. Hence, don't stay on passive channels longer |
1059 | + * than the beacon interval. |
1060 | + */ |
1061 | + if (priv->status & STATUS_ASSOCIATED |
1062 | + && priv->assoc_network->beacon_interval > 10) |
1063 | + return priv->assoc_network->beacon_interval - 10; |
1064 | + else |
1065 | + return 120; |
1066 | +} |
1067 | + |
1068 | static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) |
1069 | { |
1070 | struct ipw_scan_request_ext scan; |
1071 | @@ -6319,16 +6334,16 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) |
1072 | scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee)); |
1073 | |
1074 | if (type == IW_SCAN_TYPE_PASSIVE) { |
1075 | - IPW_DEBUG_WX("use passive scanning\n"); |
1076 | - scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN; |
1077 | + IPW_DEBUG_WX("use passive scanning\n"); |
1078 | + scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN; |
1079 | scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = |
1080 | - cpu_to_le16(120); |
1081 | + cpu_to_le16(ipw_passive_dwell_time(priv)); |
1082 | ipw_add_scan_channels(priv, &scan, scan_type); |
1083 | goto send_request; |
1084 | } |
1085 | |
1086 | /* Use active scan by default. */ |
1087 | - if (priv->config & CFG_SPEED_SCAN) |
1088 | + if (priv->config & CFG_SPEED_SCAN) |
1089 | scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = |
1090 | cpu_to_le16(30); |
1091 | else |
1092 | @@ -6338,7 +6353,8 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) |
1093 | scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] = |
1094 | cpu_to_le16(20); |
1095 | |
1096 | - scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); |
1097 | + scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = |
1098 | + cpu_to_le16(ipw_passive_dwell_time(priv)); |
1099 | scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); |
1100 | |
1101 | #ifdef CONFIG_IPW2200_MONITOR |
1102 | diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h |
1103 | index d4ab28b..60b4e71 100644 |
1104 | --- a/drivers/net/wireless/ipw2200.h |
1105 | +++ b/drivers/net/wireless/ipw2200.h |
1106 | @@ -244,6 +244,7 @@ enum connection_manager_assoc_states { |
1107 | #define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31 |
1108 | |
1109 | #define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1 |
1110 | +#define IPW_MB_SCAN_CANCEL_THRESHOLD 3 |
1111 | #define IPW_MB_ROAMING_THRESHOLD_MIN 1 |
1112 | #define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8 |
1113 | #define IPW_MB_ROAMING_THRESHOLD_MAX 30 |
1114 | diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c |
1115 | index 77baff0..3f2309f 100644 |
1116 | --- a/drivers/pci/pci-sysfs.c |
1117 | +++ b/drivers/pci/pci-sysfs.c |
1118 | @@ -694,8 +694,8 @@ pci_read_rom(struct kobject *kobj, struct bin_attribute *bin_attr, |
1119 | return -EINVAL; |
1120 | |
1121 | rom = pci_map_rom(pdev, &size); /* size starts out as PCI window size */ |
1122 | - if (!rom) |
1123 | - return 0; |
1124 | + if (!rom || !size) |
1125 | + return -EIO; |
1126 | |
1127 | if (off >= size) |
1128 | count = 0; |
1129 | diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c |
1130 | index 8a82a62..e4df84b 100644 |
1131 | --- a/drivers/pci/pcie/aspm.c |
1132 | +++ b/drivers/pci/pcie/aspm.c |
1133 | @@ -713,9 +713,9 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) |
1134 | |
1135 | /* |
1136 | * All PCIe functions are in one slot, remove one function will remove |
1137 | - * the the whole slot, so just wait |
1138 | + * the whole slot, so just wait until we are the last function left. |
1139 | */ |
1140 | - if (!list_empty(&parent->subordinate->devices)) |
1141 | + if (!list_is_last(&pdev->bus_list, &parent->subordinate->devices)) |
1142 | goto out; |
1143 | |
1144 | /* All functions are removed, so just disable ASPM for the link */ |
1145 | diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c |
1146 | index bd5c0e0..b2bac71 100644 |
1147 | --- a/drivers/pci/rom.c |
1148 | +++ b/drivers/pci/rom.c |
1149 | @@ -63,7 +63,7 @@ static void pci_disable_rom(struct pci_dev *pdev) |
1150 | * The PCI window size could be much larger than the |
1151 | * actual image size. |
1152 | */ |
1153 | -size_t pci_get_rom_size(void __iomem *rom, size_t size) |
1154 | +size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size) |
1155 | { |
1156 | void __iomem *image; |
1157 | int last_image; |
1158 | @@ -72,8 +72,10 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size) |
1159 | do { |
1160 | void __iomem *pds; |
1161 | /* Standard PCI ROMs start out with these bytes 55 AA */ |
1162 | - if (readb(image) != 0x55) |
1163 | + if (readb(image) != 0x55) { |
1164 | + dev_err(&pdev->dev, "Invalid ROM contents\n"); |
1165 | break; |
1166 | + } |
1167 | if (readb(image + 1) != 0xAA) |
1168 | break; |
1169 | /* get the PCI data structure and check its signature */ |
1170 | @@ -158,7 +160,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) |
1171 | * size is much larger than the actual size of the ROM. |
1172 | * True size is important if the ROM is going to be copied. |
1173 | */ |
1174 | - *size = pci_get_rom_size(rom, *size); |
1175 | + *size = pci_get_rom_size(pdev, rom, *size); |
1176 | return rom; |
1177 | } |
1178 | |
1179 | diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c |
1180 | index fd0695b..056071d 100644 |
1181 | --- a/drivers/serial/8250_pci.c |
1182 | +++ b/drivers/serial/8250_pci.c |
1183 | @@ -599,6 +599,10 @@ static int pci_netmos_init(struct pci_dev *dev) |
1184 | /* subdevice 0x00PS means <P> parallel, <S> serial */ |
1185 | unsigned int num_serial = dev->subsystem_device & 0xf; |
1186 | |
1187 | + if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM && |
1188 | + dev->subsystem_device == 0x0299) |
1189 | + return 0; |
1190 | + |
1191 | if (num_serial == 0) |
1192 | return -ENODEV; |
1193 | return num_serial; |
1194 | @@ -766,6 +770,8 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board, |
1195 | #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208 |
1196 | #define PCI_SUBDEVICE_ID_POCTAL232 0x0308 |
1197 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 |
1198 | +#define PCI_VENDOR_ID_ADVANTECH 0x13fe |
1199 | +#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 |
1200 | |
1201 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
1202 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
1203 | @@ -2051,6 +2057,10 @@ static int pciserial_resume_one(struct pci_dev *dev) |
1204 | #endif |
1205 | |
1206 | static struct pci_device_id serial_pci_tbl[] = { |
1207 | + /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */ |
1208 | + { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620, |
1209 | + PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0, |
1210 | + pbn_b2_8_921600 }, |
1211 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960, |
1212 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
1213 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0, |
1214 | @@ -2294,6 +2304,9 @@ static struct pci_device_id serial_pci_tbl[] = { |
1215 | * For now just used the hex ID 0x950a. |
1216 | */ |
1217 | { PCI_VENDOR_ID_OXSEMI, 0x950a, |
1218 | + PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL, 0, 0, |
1219 | + pbn_b0_2_115200 }, |
1220 | + { PCI_VENDOR_ID_OXSEMI, 0x950a, |
1221 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
1222 | pbn_b0_2_1130000 }, |
1223 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
1224 | @@ -2846,6 +2859,10 @@ static struct pci_device_id serial_pci_tbl[] = { |
1225 | 0, |
1226 | pbn_b0_8_115200 }, |
1227 | |
1228 | + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, |
1229 | + PCI_VENDOR_ID_IBM, 0x0299, |
1230 | + 0, 0, pbn_b0_bt_2_115200 }, |
1231 | + |
1232 | /* |
1233 | * These entries match devices with class COMMUNICATION_SERIAL, |
1234 | * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL |
1235 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
1236 | index b205311..876bf36 100644 |
1237 | --- a/drivers/usb/serial/option.c |
1238 | +++ b/drivers/usb/serial/option.c |
1239 | @@ -192,14 +192,15 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
1240 | #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 |
1241 | |
1242 | /* FUTURE NOVATEL PRODUCTS */ |
1243 | -#define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000 |
1244 | -#define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000 |
1245 | -#define NOVATELWIRELESS_PRODUCT_EMBEDDED_1 0x8000 |
1246 | -#define NOVATELWIRELESS_PRODUCT_GLOBAL_1 0x9000 |
1247 | -#define NOVATELWIRELESS_PRODUCT_EVDO_2 0x6001 |
1248 | -#define NOVATELWIRELESS_PRODUCT_HSPA_2 0x7001 |
1249 | -#define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001 |
1250 | -#define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001 |
1251 | +#define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000 |
1252 | +#define NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED 0X6001 |
1253 | +#define NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED 0X7000 |
1254 | +#define NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED 0X7001 |
1255 | +#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED 0X8000 |
1256 | +#define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0X8001 |
1257 | +#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0X9000 |
1258 | +#define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0X9001 |
1259 | +#define NOVATELWIRELESS_PRODUCT_GLOBAL 0XA001 |
1260 | |
1261 | /* AMOI PRODUCTS */ |
1262 | #define AMOI_VENDOR_ID 0x1614 |
1263 | @@ -209,6 +210,27 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
1264 | |
1265 | #define DELL_VENDOR_ID 0x413C |
1266 | |
1267 | +/* Dell modems */ |
1268 | +#define DELL_PRODUCT_5700_MINICARD 0x8114 |
1269 | +#define DELL_PRODUCT_5500_MINICARD 0x8115 |
1270 | +#define DELL_PRODUCT_5505_MINICARD 0x8116 |
1271 | +#define DELL_PRODUCT_5700_EXPRESSCARD 0x8117 |
1272 | +#define DELL_PRODUCT_5510_EXPRESSCARD 0x8118 |
1273 | + |
1274 | +#define DELL_PRODUCT_5700_MINICARD_SPRINT 0x8128 |
1275 | +#define DELL_PRODUCT_5700_MINICARD_TELUS 0x8129 |
1276 | + |
1277 | +#define DELL_PRODUCT_5720_MINICARD_VZW 0x8133 |
1278 | +#define DELL_PRODUCT_5720_MINICARD_SPRINT 0x8134 |
1279 | +#define DELL_PRODUCT_5720_MINICARD_TELUS 0x8135 |
1280 | +#define DELL_PRODUCT_5520_MINICARD_CINGULAR 0x8136 |
1281 | +#define DELL_PRODUCT_5520_MINICARD_GENERIC_L 0x8137 |
1282 | +#define DELL_PRODUCT_5520_MINICARD_GENERIC_I 0x8138 |
1283 | + |
1284 | +#define DELL_PRODUCT_5730_MINICARD_SPRINT 0x8180 |
1285 | +#define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 |
1286 | +#define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 |
1287 | + |
1288 | #define KYOCERA_VENDOR_ID 0x0c88 |
1289 | #define KYOCERA_PRODUCT_KPC650 0x17da |
1290 | #define KYOCERA_PRODUCT_KPC680 0x180a |
1291 | @@ -267,12 +289,6 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
1292 | #define ERICSSON_VENDOR_ID 0x0bdb |
1293 | #define ERICSSON_PRODUCT_F3507G 0x1900 |
1294 | |
1295 | -/* Pantech products */ |
1296 | -#define PANTECH_VENDOR_ID 0x106c |
1297 | -#define PANTECH_PRODUCT_PC5740 0x3701 |
1298 | -#define PANTECH_PRODUCT_PC5750 0x3702 /* PX-500 */ |
1299 | -#define PANTECH_PRODUCT_UM150 0x3711 |
1300 | - |
1301 | static struct usb_device_id option_ids[] = { |
1302 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, |
1303 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, |
1304 | @@ -383,31 +399,37 @@ static struct usb_device_id option_ids[] = { |
1305 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ |
1306 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ |
1307 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ |
1308 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */ |
1309 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */ |
1310 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */ |
1311 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_1) }, /* Novatel Global product */ |
1312 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_2) }, /* Novatel EVDO product */ |
1313 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_2) }, /* Novatel HSPA product */ |
1314 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */ |
1315 | - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */ |
1316 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */ |
1317 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ |
1318 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ |
1319 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED) }, /* Novatel HSPA Embedded product */ |
1320 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_HIGHSPEED) }, /* Novatel EVDO product */ |
1321 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_HIGHSPEED) }, /* Novatel HSPA product */ |
1322 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED) }, /* Novatel EVDO Embedded product */ |
1323 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED) }, /* Novatel HSPA Embedded product */ |
1324 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL) }, /* Novatel Global product */ |
1325 | |
1326 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, |
1327 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, |
1328 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H02) }, |
1329 | |
1330 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ |
1331 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
1332 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
1333 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8117) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */ |
1334 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8118) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ |
1335 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8128) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ |
1336 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8129) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */ |
1337 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8133) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ |
1338 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8136) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
1339 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8137) }, /* Dell Wireless HSDPA 5520 */ |
1340 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8138) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ |
1341 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ |
1342 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ |
1343 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5500_MINICARD) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
1344 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5505_MINICARD) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
1345 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_EXPRESSCARD) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO ExpressCard == Novatel Merlin XV620 CDMA/EV-DO */ |
1346 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5510_EXPRESSCARD) }, /* Dell Wireless 5510 Mobile Broadband HSDPA ExpressCard == Novatel Merlin XU870 HSDPA/3G */ |
1347 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_SPRINT) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite E720 CDMA/EV-DO */ |
1348 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5700_MINICARD_TELUS) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite ET620 CDMA/EV-DO */ |
1349 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_VZW) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ |
1350 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_SPRINT) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ |
1351 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5720_MINICARD_TELUS) }, /* Dell Wireless 5720 == Novatel EV620 CDMA/EV-DO */ |
1352 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
1353 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */ |
1354 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ |
1355 | + { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ |
1356 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
1357 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
1358 | + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
1359 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ |
1360 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
1361 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, |
1362 | @@ -476,9 +498,6 @@ static struct usb_device_id option_ids[] = { |
1363 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, |
1364 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, |
1365 | { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) }, |
1366 | - { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5740) }, |
1367 | - { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_PC5750) }, |
1368 | - { USB_DEVICE(PANTECH_VENDOR_ID, PANTECH_PRODUCT_UM150) }, |
1369 | { } /* Terminating entry */ |
1370 | }; |
1371 | MODULE_DEVICE_TABLE(usb, option_ids); |
1372 | diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c |
1373 | index 9a3e495..d8c41ae 100644 |
1374 | --- a/drivers/usb/serial/ti_usb_3410_5052.c |
1375 | +++ b/drivers/usb/serial/ti_usb_3410_5052.c |
1376 | @@ -227,25 +227,32 @@ static unsigned int product_5052_count; |
1377 | /* the array dimension is the number of default entries plus */ |
1378 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ |
1379 | /* null entry */ |
1380 | -static struct usb_device_id ti_id_table_3410[1+TI_EXTRA_VID_PID_COUNT+1] = { |
1381 | +static struct usb_device_id ti_id_table_3410[10+TI_EXTRA_VID_PID_COUNT+1] = { |
1382 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
1383 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
1384 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
1385 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
1386 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
1387 | }; |
1388 | |
1389 | -static struct usb_device_id ti_id_table_5052[4+TI_EXTRA_VID_PID_COUNT+1] = { |
1390 | +static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { |
1391 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) }, |
1392 | { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) }, |
1393 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, |
1394 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, |
1395 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
1396 | }; |
1397 | |
1398 | -static struct usb_device_id ti_id_table_combined[] = { |
1399 | +static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1] = { |
1400 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
1401 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
1402 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_BOOT_PRODUCT_ID) }, |
1403 | { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) }, |
1404 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) }, |
1405 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, |
1406 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
1407 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
1408 | + { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
1409 | { } |
1410 | }; |
1411 | |
1412 | diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h |
1413 | index b5541bf..d4e4d7e 100644 |
1414 | --- a/drivers/usb/serial/ti_usb_3410_5052.h |
1415 | +++ b/drivers/usb/serial/ti_usb_3410_5052.h |
1416 | @@ -27,7 +27,11 @@ |
1417 | |
1418 | /* Vendor and product ids */ |
1419 | #define TI_VENDOR_ID 0x0451 |
1420 | +#define IBM_VENDOR_ID 0x04b3 |
1421 | #define TI_3410_PRODUCT_ID 0x3410 |
1422 | +#define IBM_4543_PRODUCT_ID 0x4543 |
1423 | +#define IBM_454B_PRODUCT_ID 0x454b |
1424 | +#define IBM_454C_PRODUCT_ID 0x454c |
1425 | #define TI_3410_EZ430_ID 0xF430 /* TI ez430 development tool */ |
1426 | #define TI_5052_BOOT_PRODUCT_ID 0x5052 /* no EEPROM, no firmware */ |
1427 | #define TI_5152_BOOT_PRODUCT_ID 0x5152 /* no EEPROM, no firmware */ |
1428 | diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c |
1429 | index 620c2b5..8daaace 100644 |
1430 | --- a/drivers/usb/storage/scsiglue.c |
1431 | +++ b/drivers/usb/storage/scsiglue.c |
1432 | @@ -64,6 +64,7 @@ |
1433 | */ |
1434 | #define VENDOR_ID_NOKIA 0x0421 |
1435 | #define VENDOR_ID_NIKON 0x04b0 |
1436 | +#define VENDOR_ID_PENTAX 0x0a17 |
1437 | #define VENDOR_ID_MOTOROLA 0x22b8 |
1438 | |
1439 | /*********************************************************************** |
1440 | @@ -150,6 +151,7 @@ static int slave_configure(struct scsi_device *sdev) |
1441 | switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { |
1442 | case VENDOR_ID_NOKIA: |
1443 | case VENDOR_ID_NIKON: |
1444 | + case VENDOR_ID_PENTAX: |
1445 | case VENDOR_ID_MOTOROLA: |
1446 | if (!(us->fflags & (US_FL_FIX_CAPACITY | |
1447 | US_FL_CAPACITY_OK))) |
1448 | diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h |
1449 | index aae786c..d775cfe 100644 |
1450 | --- a/drivers/usb/storage/unusual_devs.h |
1451 | +++ b/drivers/usb/storage/unusual_devs.h |
1452 | @@ -1381,21 +1381,6 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, |
1453 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1454 | US_FL_FIX_INQUIRY ), |
1455 | |
1456 | - |
1457 | -/* Submitted by Per Winkvist <per.winkvist@uk.com> */ |
1458 | -UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff, |
1459 | - "Pentax", |
1460 | - "Optio S/S4", |
1461 | - US_SC_DEVICE, US_PR_DEVICE, NULL, |
1462 | - US_FL_FIX_INQUIRY ), |
1463 | - |
1464 | -/* Reported by Jaak Ristioja <Ristioja@gmail.com> */ |
1465 | -UNUSUAL_DEV( 0x0a17, 0x006e, 0x0100, 0x0100, |
1466 | - "Pentax", |
1467 | - "K10D", |
1468 | - US_SC_DEVICE, US_PR_DEVICE, NULL, |
1469 | - US_FL_FIX_CAPACITY ), |
1470 | - |
1471 | /* These are virtual windows driver CDs, which the zd1211rw driver |
1472 | * automatically converts into WLAN devices. */ |
1473 | UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, |
1474 | diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c |
1475 | index 038ea62..93a080e 100644 |
1476 | --- a/drivers/video/console/fbcon.c |
1477 | +++ b/drivers/video/console/fbcon.c |
1478 | @@ -1855,8 +1855,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1479 | struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]]; |
1480 | struct display *p = &fb_display[vc->vc_num]; |
1481 | int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK; |
1482 | - unsigned short saved_ec; |
1483 | - int ret; |
1484 | |
1485 | if (fbcon_is_inactive(vc, info)) |
1486 | return -EINVAL; |
1487 | @@ -1869,11 +1867,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1488 | * whole screen (prevents flicker). |
1489 | */ |
1490 | |
1491 | - saved_ec = vc->vc_video_erase_char; |
1492 | - vc->vc_video_erase_char = vc->vc_scrl_erase_char; |
1493 | - |
1494 | - ret = 0; |
1495 | - |
1496 | switch (dir) { |
1497 | case SM_UP: |
1498 | if (count > vc->vc_rows) /* Maximum realistic size */ |
1499 | @@ -1890,9 +1883,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1500 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1501 | vc->vc_size_row * |
1502 | (b - count)), |
1503 | - vc->vc_scrl_erase_char, |
1504 | + vc->vc_video_erase_char, |
1505 | vc->vc_size_row * count); |
1506 | - ret = 1; |
1507 | + return 1; |
1508 | break; |
1509 | |
1510 | case SCROLL_WRAP_MOVE: |
1511 | @@ -1962,10 +1955,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1512 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1513 | vc->vc_size_row * |
1514 | (b - count)), |
1515 | - vc->vc_scrl_erase_char, |
1516 | + vc->vc_video_erase_char, |
1517 | vc->vc_size_row * count); |
1518 | - ret = 1; |
1519 | - break; |
1520 | + return 1; |
1521 | } |
1522 | break; |
1523 | |
1524 | @@ -1982,9 +1974,9 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1525 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1526 | vc->vc_size_row * |
1527 | t), |
1528 | - vc->vc_scrl_erase_char, |
1529 | + vc->vc_video_erase_char, |
1530 | vc->vc_size_row * count); |
1531 | - ret = 1; |
1532 | + return 1; |
1533 | break; |
1534 | |
1535 | case SCROLL_WRAP_MOVE: |
1536 | @@ -2052,15 +2044,12 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir, |
1537 | scr_memsetw((unsigned short *) (vc->vc_origin + |
1538 | vc->vc_size_row * |
1539 | t), |
1540 | - vc->vc_scrl_erase_char, |
1541 | + vc->vc_video_erase_char, |
1542 | vc->vc_size_row * count); |
1543 | - ret = 1; |
1544 | - break; |
1545 | + return 1; |
1546 | } |
1547 | - break; |
1548 | } |
1549 | - vc->vc_video_erase_char = saved_ec; |
1550 | - return ret; |
1551 | + return 0; |
1552 | } |
1553 | |
1554 | |
1555 | @@ -2522,9 +2511,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, |
1556 | c = vc->vc_video_erase_char; |
1557 | vc->vc_video_erase_char = |
1558 | ((c & 0xfe00) >> 1) | (c & 0xff); |
1559 | - c = vc->vc_scrl_erase_char; |
1560 | - vc->vc_scrl_erase_char = |
1561 | - ((c & 0xFE00) >> 1) | (c & 0xFF); |
1562 | vc->vc_attr >>= 1; |
1563 | } |
1564 | } else if (!vc->vc_hi_font_mask && cnt == 512) { |
1565 | @@ -2555,14 +2541,9 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, |
1566 | if (vc->vc_can_do_color) { |
1567 | vc->vc_video_erase_char = |
1568 | ((c & 0xff00) << 1) | (c & 0xff); |
1569 | - c = vc->vc_scrl_erase_char; |
1570 | - vc->vc_scrl_erase_char = |
1571 | - ((c & 0xFF00) << 1) | (c & 0xFF); |
1572 | vc->vc_attr <<= 1; |
1573 | - } else { |
1574 | + } else |
1575 | vc->vc_video_erase_char = c & ~0x100; |
1576 | - vc->vc_scrl_erase_char = c & ~0x100; |
1577 | - } |
1578 | } |
1579 | |
1580 | } |
1581 | diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c |
1582 | index 9901064..dd3eaaa 100644 |
1583 | --- a/drivers/video/console/mdacon.c |
1584 | +++ b/drivers/video/console/mdacon.c |
1585 | @@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data *c, int mode) |
1586 | |
1587 | static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) |
1588 | { |
1589 | - u16 eattr = mda_convert_attr(c->vc_scrl_erase_char); |
1590 | + u16 eattr = mda_convert_attr(c->vc_video_erase_char); |
1591 | |
1592 | if (!lines) |
1593 | return 0; |
1594 | diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c |
1595 | index 4055dbd..491c1c1 100644 |
1596 | --- a/drivers/video/console/sticon.c |
1597 | +++ b/drivers/video/console/sticon.c |
1598 | @@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data *conp, int t, int b, int dir, int count) |
1599 | switch (dir) { |
1600 | case SM_UP: |
1601 | sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols); |
1602 | - sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_scrl_erase_char); |
1603 | + sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_video_erase_char); |
1604 | break; |
1605 | |
1606 | case SM_DOWN: |
1607 | sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols); |
1608 | - sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_scrl_erase_char); |
1609 | + sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_video_erase_char); |
1610 | break; |
1611 | } |
1612 | |
1613 | diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c |
1614 | index bd1f57b..6df29a6 100644 |
1615 | --- a/drivers/video/console/vgacon.c |
1616 | +++ b/drivers/video/console/vgacon.c |
1617 | @@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, |
1618 | } else |
1619 | c->vc_origin += delta; |
1620 | scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size - |
1621 | - delta), c->vc_scrl_erase_char, |
1622 | + delta), c->vc_video_erase_char, |
1623 | delta); |
1624 | } else { |
1625 | if (oldo - delta < vga_vram_base) { |
1626 | @@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, |
1627 | } else |
1628 | c->vc_origin -= delta; |
1629 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; |
1630 | - scr_memsetw((u16 *) (c->vc_origin), c->vc_scrl_erase_char, |
1631 | + scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char, |
1632 | delta); |
1633 | } |
1634 | c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; |
1635 | diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c |
1636 | index 655ed8d..e57df48 100644 |
1637 | --- a/fs/binfmt_elf.c |
1638 | +++ b/fs/binfmt_elf.c |
1639 | @@ -1188,9 +1188,11 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, |
1640 | * check for an ELF header. If we find one, dump the first page to |
1641 | * aid in determining what was mapped here. |
1642 | */ |
1643 | - if (FILTER(ELF_HEADERS) && vma->vm_file != NULL && vma->vm_pgoff == 0) { |
1644 | + if (FILTER(ELF_HEADERS) && |
1645 | + vma->vm_pgoff == 0 && (vma->vm_flags & VM_READ)) { |
1646 | u32 __user *header = (u32 __user *) vma->vm_start; |
1647 | u32 word; |
1648 | + mm_segment_t fs = get_fs(); |
1649 | /* |
1650 | * Doing it this way gets the constant folded by GCC. |
1651 | */ |
1652 | @@ -1203,7 +1205,15 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, |
1653 | magic.elfmag[EI_MAG1] = ELFMAG1; |
1654 | magic.elfmag[EI_MAG2] = ELFMAG2; |
1655 | magic.elfmag[EI_MAG3] = ELFMAG3; |
1656 | - if (get_user(word, header) == 0 && word == magic.cmp) |
1657 | + /* |
1658 | + * Switch to the user "segment" for get_user(), |
1659 | + * then put back what elf_core_dump() had in place. |
1660 | + */ |
1661 | + set_fs(USER_DS); |
1662 | + if (unlikely(get_user(word, header))) |
1663 | + word = 0; |
1664 | + set_fs(fs); |
1665 | + if (word == magic.cmp) |
1666 | return PAGE_SIZE; |
1667 | } |
1668 | |
1669 | diff --git a/fs/seq_file.c b/fs/seq_file.c |
1670 | index bd20f7f..ef4d497 100644 |
1671 | --- a/fs/seq_file.c |
1672 | +++ b/fs/seq_file.c |
1673 | @@ -54,6 +54,64 @@ int seq_open(struct file *file, const struct seq_operations *op) |
1674 | } |
1675 | EXPORT_SYMBOL(seq_open); |
1676 | |
1677 | +static int traverse(struct seq_file *m, loff_t offset) |
1678 | +{ |
1679 | + loff_t pos = 0, index; |
1680 | + int error = 0; |
1681 | + void *p; |
1682 | + |
1683 | + m->version = 0; |
1684 | + index = 0; |
1685 | + m->count = m->from = 0; |
1686 | + if (!offset) { |
1687 | + m->index = index; |
1688 | + return 0; |
1689 | + } |
1690 | + if (!m->buf) { |
1691 | + m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); |
1692 | + if (!m->buf) |
1693 | + return -ENOMEM; |
1694 | + } |
1695 | + p = m->op->start(m, &index); |
1696 | + while (p) { |
1697 | + error = PTR_ERR(p); |
1698 | + if (IS_ERR(p)) |
1699 | + break; |
1700 | + error = m->op->show(m, p); |
1701 | + if (error < 0) |
1702 | + break; |
1703 | + if (unlikely(error)) { |
1704 | + error = 0; |
1705 | + m->count = 0; |
1706 | + } |
1707 | + if (m->count == m->size) |
1708 | + goto Eoverflow; |
1709 | + if (pos + m->count > offset) { |
1710 | + m->from = offset - pos; |
1711 | + m->count -= m->from; |
1712 | + m->index = index; |
1713 | + break; |
1714 | + } |
1715 | + pos += m->count; |
1716 | + m->count = 0; |
1717 | + if (pos == offset) { |
1718 | + index++; |
1719 | + m->index = index; |
1720 | + break; |
1721 | + } |
1722 | + p = m->op->next(m, p, &index); |
1723 | + } |
1724 | + m->op->stop(m, p); |
1725 | + m->index = index; |
1726 | + return error; |
1727 | + |
1728 | +Eoverflow: |
1729 | + m->op->stop(m, p); |
1730 | + kfree(m->buf); |
1731 | + m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); |
1732 | + return !m->buf ? -ENOMEM : -EAGAIN; |
1733 | +} |
1734 | + |
1735 | /** |
1736 | * seq_read - ->read() method for sequential files. |
1737 | * @file: the file to read from |
1738 | @@ -186,63 +244,6 @@ Efault: |
1739 | } |
1740 | EXPORT_SYMBOL(seq_read); |
1741 | |
1742 | -static int traverse(struct seq_file *m, loff_t offset) |
1743 | -{ |
1744 | - loff_t pos = 0, index; |
1745 | - int error = 0; |
1746 | - void *p; |
1747 | - |
1748 | - m->version = 0; |
1749 | - index = 0; |
1750 | - m->count = m->from = 0; |
1751 | - if (!offset) { |
1752 | - m->index = index; |
1753 | - return 0; |
1754 | - } |
1755 | - if (!m->buf) { |
1756 | - m->buf = kmalloc(m->size = PAGE_SIZE, GFP_KERNEL); |
1757 | - if (!m->buf) |
1758 | - return -ENOMEM; |
1759 | - } |
1760 | - p = m->op->start(m, &index); |
1761 | - while (p) { |
1762 | - error = PTR_ERR(p); |
1763 | - if (IS_ERR(p)) |
1764 | - break; |
1765 | - error = m->op->show(m, p); |
1766 | - if (error < 0) |
1767 | - break; |
1768 | - if (unlikely(error)) { |
1769 | - error = 0; |
1770 | - m->count = 0; |
1771 | - } |
1772 | - if (m->count == m->size) |
1773 | - goto Eoverflow; |
1774 | - if (pos + m->count > offset) { |
1775 | - m->from = offset - pos; |
1776 | - m->count -= m->from; |
1777 | - m->index = index; |
1778 | - break; |
1779 | - } |
1780 | - pos += m->count; |
1781 | - m->count = 0; |
1782 | - if (pos == offset) { |
1783 | - index++; |
1784 | - m->index = index; |
1785 | - break; |
1786 | - } |
1787 | - p = m->op->next(m, p, &index); |
1788 | - } |
1789 | - m->op->stop(m, p); |
1790 | - return error; |
1791 | - |
1792 | -Eoverflow: |
1793 | - m->op->stop(m, p); |
1794 | - kfree(m->buf); |
1795 | - m->buf = kmalloc(m->size <<= 1, GFP_KERNEL); |
1796 | - return !m->buf ? -ENOMEM : -EAGAIN; |
1797 | -} |
1798 | - |
1799 | /** |
1800 | * seq_lseek - ->llseek() method for sequential files. |
1801 | * @file: the file in question |
1802 | diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c |
1803 | index 36d5fcd..8454dee 100644 |
1804 | --- a/fs/xfs/linux-2.6/xfs_buf.c |
1805 | +++ b/fs/xfs/linux-2.6/xfs_buf.c |
1806 | @@ -1114,8 +1114,7 @@ xfs_buf_bio_end_io( |
1807 | unsigned int blocksize = bp->b_target->bt_bsize; |
1808 | struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1; |
1809 | |
1810 | - if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) |
1811 | - bp->b_error = EIO; |
1812 | + xfs_buf_ioerror(bp, -error); |
1813 | |
1814 | do { |
1815 | struct page *page = bvec->bv_page; |
1816 | diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h |
1817 | index e72bfdd..552637b 100644 |
1818 | --- a/include/acpi/pdc_intel.h |
1819 | +++ b/include/acpi/pdc_intel.h |
1820 | @@ -14,6 +14,7 @@ |
1821 | #define ACPI_PDC_SMP_T_SWCOORD (0x0080) |
1822 | #define ACPI_PDC_C_C1_FFH (0x0100) |
1823 | #define ACPI_PDC_C_C2C3_FFH (0x0200) |
1824 | +#define ACPI_PDC_SMP_P_HWCOORD (0x0800) |
1825 | |
1826 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ |
1827 | ACPI_PDC_C_C1_HALT | \ |
1828 | @@ -22,6 +23,7 @@ |
1829 | #define ACPI_PDC_EST_CAPABILITY_SWSMP (ACPI_PDC_SMP_C1PT | \ |
1830 | ACPI_PDC_C_C1_HALT | \ |
1831 | ACPI_PDC_SMP_P_SWCOORD | \ |
1832 | + ACPI_PDC_SMP_P_HWCOORD | \ |
1833 | ACPI_PDC_P_FFH) |
1834 | |
1835 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ |
1836 | diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h |
1837 | index b03f80a..d71f7c0 100644 |
1838 | --- a/include/linux/console_struct.h |
1839 | +++ b/include/linux/console_struct.h |
1840 | @@ -53,7 +53,6 @@ struct vc_data { |
1841 | unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ |
1842 | struct console_font vc_font; /* Current VC font set */ |
1843 | unsigned short vc_video_erase_char; /* Background erase character */ |
1844 | - unsigned short vc_scrl_erase_char; /* Erase character for scroll */ |
1845 | /* VT terminal data */ |
1846 | unsigned int vc_state; /* Escape sequence parser state */ |
1847 | unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */ |
1848 | diff --git a/include/linux/module.h b/include/linux/module.h |
1849 | index 68e0955..760a41b 100644 |
1850 | --- a/include/linux/module.h |
1851 | +++ b/include/linux/module.h |
1852 | @@ -387,7 +387,6 @@ void symbol_put_addr(void *addr); |
1853 | static inline void __module_get(struct module *module) |
1854 | { |
1855 | if (module) { |
1856 | - BUG_ON(module_refcount(module) == 0); |
1857 | local_inc(&module->ref[get_cpu()].count); |
1858 | put_cpu(); |
1859 | } |
1860 | diff --git a/include/linux/pci.h b/include/linux/pci.h |
1861 | index 426e029..911b99d 100644 |
1862 | --- a/include/linux/pci.h |
1863 | +++ b/include/linux/pci.h |
1864 | @@ -639,7 +639,7 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
1865 | /* ROM control related routines */ |
1866 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
1867 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
1868 | -size_t pci_get_rom_size(void __iomem *rom, size_t size); |
1869 | +size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); |
1870 | |
1871 | /* Power management related routines */ |
1872 | int pci_save_state(struct pci_dev *dev); |
1873 | diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h |
1874 | index 26b59cb..794e546 100644 |
1875 | --- a/include/linux/pci_ids.h |
1876 | +++ b/include/linux/pci_ids.h |
1877 | @@ -1755,6 +1755,7 @@ |
1878 | #define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081 |
1879 | #define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082 |
1880 | #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 |
1881 | +#define PCI_SUBDEVICE_ID_SIIG_DUAL_SERIAL 0x2530 |
1882 | |
1883 | #define PCI_VENDOR_ID_RADISYS 0x1331 |
1884 | |
1885 | diff --git a/include/linux/wait.h b/include/linux/wait.h |
1886 | index 0081147..3c2f411 100644 |
1887 | --- a/include/linux/wait.h |
1888 | +++ b/include/linux/wait.h |
1889 | @@ -141,6 +141,8 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, |
1890 | list_del(&old->task_list); |
1891 | } |
1892 | |
1893 | +void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
1894 | + int nr_exclusive, int sync, void *key); |
1895 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
1896 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); |
1897 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); |
1898 | @@ -342,16 +344,19 @@ do { \ |
1899 | for (;;) { \ |
1900 | prepare_to_wait_exclusive(&wq, &__wait, \ |
1901 | TASK_INTERRUPTIBLE); \ |
1902 | - if (condition) \ |
1903 | + if (condition) { \ |
1904 | + finish_wait(&wq, &__wait); \ |
1905 | break; \ |
1906 | + } \ |
1907 | if (!signal_pending(current)) { \ |
1908 | schedule(); \ |
1909 | continue; \ |
1910 | } \ |
1911 | ret = -ERESTARTSYS; \ |
1912 | + abort_exclusive_wait(&wq, &__wait, \ |
1913 | + TASK_INTERRUPTIBLE, NULL); \ |
1914 | break; \ |
1915 | } \ |
1916 | - finish_wait(&wq, &__wait); \ |
1917 | } while (0) |
1918 | |
1919 | #define wait_event_interruptible_exclusive(wq, condition) \ |
1920 | @@ -440,6 +445,8 @@ extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, |
1921 | void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); |
1922 | void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); |
1923 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); |
1924 | +void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, |
1925 | + unsigned int mode, void *key); |
1926 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
1927 | int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); |
1928 | |
1929 | diff --git a/ipc/shm.c b/ipc/shm.c |
1930 | index f00c897..35a65be 100644 |
1931 | --- a/ipc/shm.c |
1932 | +++ b/ipc/shm.c |
1933 | @@ -565,11 +565,15 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss, |
1934 | struct hstate *h = hstate_file(shp->shm_file); |
1935 | *rss += pages_per_huge_page(h) * mapping->nrpages; |
1936 | } else { |
1937 | +#ifdef CONFIG_SHMEM |
1938 | struct shmem_inode_info *info = SHMEM_I(inode); |
1939 | spin_lock(&info->lock); |
1940 | *rss += inode->i_mapping->nrpages; |
1941 | *swp += info->swapped; |
1942 | spin_unlock(&info->lock); |
1943 | +#else |
1944 | + *rss += inode->i_mapping->nrpages; |
1945 | +#endif |
1946 | } |
1947 | |
1948 | total++; |
1949 | diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c |
1950 | index 3cd441e..48c58fe 100644 |
1951 | --- a/kernel/irq/chip.c |
1952 | +++ b/kernel/irq/chip.c |
1953 | @@ -78,6 +78,7 @@ void dynamic_irq_cleanup(unsigned int irq) |
1954 | desc->chip_data = NULL; |
1955 | desc->handle_irq = handle_bad_irq; |
1956 | desc->chip = &no_irq_chip; |
1957 | + desc->name = NULL; |
1958 | spin_unlock_irqrestore(&desc->lock, flags); |
1959 | } |
1960 | |
1961 | diff --git a/kernel/sched.c b/kernel/sched.c |
1962 | index 2a09e44..98c0cdc 100644 |
1963 | --- a/kernel/sched.c |
1964 | +++ b/kernel/sched.c |
1965 | @@ -4556,8 +4556,8 @@ EXPORT_SYMBOL(default_wake_function); |
1966 | * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns |
1967 | * zero in this (rare) case, and we handle it by continuing to scan the queue. |
1968 | */ |
1969 | -static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
1970 | - int nr_exclusive, int sync, void *key) |
1971 | +void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
1972 | + int nr_exclusive, int sync, void *key) |
1973 | { |
1974 | wait_queue_t *curr, *next; |
1975 | |
1976 | diff --git a/kernel/wait.c b/kernel/wait.c |
1977 | index c275c56..24688c7 100644 |
1978 | --- a/kernel/wait.c |
1979 | +++ b/kernel/wait.c |
1980 | @@ -101,6 +101,15 @@ prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state) |
1981 | } |
1982 | EXPORT_SYMBOL(prepare_to_wait_exclusive); |
1983 | |
1984 | +/* |
1985 | + * finish_wait - clean up after waiting in a queue |
1986 | + * @q: waitqueue waited on |
1987 | + * @wait: wait descriptor |
1988 | + * |
1989 | + * Sets current thread back to running state and removes |
1990 | + * the wait descriptor from the given waitqueue if still |
1991 | + * queued. |
1992 | + */ |
1993 | void finish_wait(wait_queue_head_t *q, wait_queue_t *wait) |
1994 | { |
1995 | unsigned long flags; |
1996 | @@ -127,6 +136,39 @@ void finish_wait(wait_queue_head_t *q, wait_queue_t *wait) |
1997 | } |
1998 | EXPORT_SYMBOL(finish_wait); |
1999 | |
2000 | +/* |
2001 | + * abort_exclusive_wait - abort exclusive waiting in a queue |
2002 | + * @q: waitqueue waited on |
2003 | + * @wait: wait descriptor |
2004 | + * @state: runstate of the waiter to be woken |
2005 | + * @key: key to identify a wait bit queue or %NULL |
2006 | + * |
2007 | + * Sets current thread back to running state and removes |
2008 | + * the wait descriptor from the given waitqueue if still |
2009 | + * queued. |
2010 | + * |
2011 | + * Wakes up the next waiter if the caller is concurrently |
2012 | + * woken up through the queue. |
2013 | + * |
2014 | + * This prevents waiter starvation where an exclusive waiter |
2015 | + * aborts and is woken up concurrently and noone wakes up |
2016 | + * the next waiter. |
2017 | + */ |
2018 | +void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, |
2019 | + unsigned int mode, void *key) |
2020 | +{ |
2021 | + unsigned long flags; |
2022 | + |
2023 | + __set_current_state(TASK_RUNNING); |
2024 | + spin_lock_irqsave(&q->lock, flags); |
2025 | + if (!list_empty(&wait->task_list)) |
2026 | + list_del_init(&wait->task_list); |
2027 | + else if (waitqueue_active(q)) |
2028 | + __wake_up_common(q, mode, 1, 0, key); |
2029 | + spin_unlock_irqrestore(&q->lock, flags); |
2030 | +} |
2031 | +EXPORT_SYMBOL(abort_exclusive_wait); |
2032 | + |
2033 | int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) |
2034 | { |
2035 | int ret = default_wake_function(wait, mode, sync, key); |
2036 | @@ -187,17 +229,20 @@ int __sched |
2037 | __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q, |
2038 | int (*action)(void *), unsigned mode) |
2039 | { |
2040 | - int ret = 0; |
2041 | - |
2042 | do { |
2043 | + int ret; |
2044 | + |
2045 | prepare_to_wait_exclusive(wq, &q->wait, mode); |
2046 | - if (test_bit(q->key.bit_nr, q->key.flags)) { |
2047 | - if ((ret = (*action)(q->key.flags))) |
2048 | - break; |
2049 | - } |
2050 | + if (!test_bit(q->key.bit_nr, q->key.flags)) |
2051 | + continue; |
2052 | + ret = action(q->key.flags); |
2053 | + if (!ret) |
2054 | + continue; |
2055 | + abort_exclusive_wait(wq, &q->wait, mode, &q->key); |
2056 | + return ret; |
2057 | } while (test_and_set_bit(q->key.bit_nr, q->key.flags)); |
2058 | finish_wait(wq, &q->wait); |
2059 | - return ret; |
2060 | + return 0; |
2061 | } |
2062 | EXPORT_SYMBOL(__wait_on_bit_lock); |
2063 | |
2064 | diff --git a/mm/swap.c b/mm/swap.c |
2065 | index 9e0cb31..65e6825 100644 |
2066 | --- a/mm/swap.c |
2067 | +++ b/mm/swap.c |
2068 | @@ -244,7 +244,6 @@ void lru_add_drain(void) |
2069 | put_cpu(); |
2070 | } |
2071 | |
2072 | -#ifdef CONFIG_NUMA |
2073 | static void lru_add_drain_per_cpu(struct work_struct *dummy) |
2074 | { |
2075 | lru_add_drain(); |
2076 | @@ -258,18 +257,6 @@ int lru_add_drain_all(void) |
2077 | return schedule_on_each_cpu(lru_add_drain_per_cpu); |
2078 | } |
2079 | |
2080 | -#else |
2081 | - |
2082 | -/* |
2083 | - * Returns 0 for success |
2084 | - */ |
2085 | -int lru_add_drain_all(void) |
2086 | -{ |
2087 | - lru_add_drain(); |
2088 | - return 0; |
2089 | -} |
2090 | -#endif |
2091 | - |
2092 | /* |
2093 | * Batched page_cache_release(). Decrement the reference count on all the |
2094 | * passed pages. If it fell to zero then remove the page from the LRU and |
2095 | diff --git a/net/sctp/input.c b/net/sctp/input.c |
2096 | index a49fa80..be736af 100644 |
2097 | --- a/net/sctp/input.c |
2098 | +++ b/net/sctp/input.c |
2099 | @@ -249,6 +249,19 @@ int sctp_rcv(struct sk_buff *skb) |
2100 | */ |
2101 | sctp_bh_lock_sock(sk); |
2102 | |
2103 | + if (sk != rcvr->sk) { |
2104 | + /* Our cached sk is different from the rcvr->sk. This is |
2105 | + * because migrate()/accept() may have moved the association |
2106 | + * to a new socket and released all the sockets. So now we |
2107 | + * are holding a lock on the old socket while the user may |
2108 | + * be doing something with the new socket. Switch our veiw |
2109 | + * of the current sk. |
2110 | + */ |
2111 | + sctp_bh_unlock_sock(sk); |
2112 | + sk = rcvr->sk; |
2113 | + sctp_bh_lock_sock(sk); |
2114 | + } |
2115 | + |
2116 | if (sock_owned_by_user(sk)) { |
2117 | SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG); |
2118 | sctp_add_backlog(sk, skb); |
2119 | diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c |
2120 | index 3e65719..e4c27c1 100644 |
2121 | --- a/net/sunrpc/svcsock.c |
2122 | +++ b/net/sunrpc/svcsock.c |
2123 | @@ -1171,7 +1171,11 @@ int svc_addsock(struct svc_serv *serv, |
2124 | else if (so->state > SS_UNCONNECTED) |
2125 | err = -EISCONN; |
2126 | else { |
2127 | - svsk = svc_setup_socket(serv, so, &err, SVC_SOCK_DEFAULTS); |
2128 | + if (!try_module_get(THIS_MODULE)) |
2129 | + err = -ENOENT; |
2130 | + else |
2131 | + svsk = svc_setup_socket(serv, so, &err, |
2132 | + SVC_SOCK_DEFAULTS); |
2133 | if (svsk) { |
2134 | struct sockaddr_storage addr; |
2135 | struct sockaddr *sin = (struct sockaddr *)&addr; |
2136 | @@ -1184,7 +1188,8 @@ int svc_addsock(struct svc_serv *serv, |
2137 | spin_unlock_bh(&serv->sv_lock); |
2138 | svc_xprt_received(&svsk->sk_xprt); |
2139 | err = 0; |
2140 | - } |
2141 | + } else |
2142 | + module_put(THIS_MODULE); |
2143 | } |
2144 | if (err) { |
2145 | sockfd_put(so); |
2146 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
2147 | index aa7dc03..db9c702 100644 |
2148 | --- a/sound/pci/hda/patch_realtek.c |
2149 | +++ b/sound/pci/hda/patch_realtek.c |
2150 | @@ -920,6 +920,7 @@ do_sku: |
2151 | case 0x10ec0267: |
2152 | case 0x10ec0268: |
2153 | case 0x10ec0269: |
2154 | + case 0x10ec0272: |
2155 | case 0x10ec0660: |
2156 | case 0x10ec0662: |
2157 | case 0x10ec0663: |
2158 | @@ -948,6 +949,7 @@ do_sku: |
2159 | case 0x10ec0882: |
2160 | case 0x10ec0883: |
2161 | case 0x10ec0885: |
2162 | + case 0x10ec0887: |
2163 | case 0x10ec0889: |
2164 | snd_hda_codec_write(codec, 0x20, 0, |
2165 | AC_VERB_SET_COEF_INDEX, 7); |
2166 | @@ -8059,6 +8061,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { |
2167 | SND_PCI_QUIRK(0x1558, 0, "Clevo laptop", ALC883_LAPTOP_EAPD), |
2168 | SND_PCI_QUIRK(0x15d9, 0x8780, "Supermicro PDSBA", ALC883_3ST_6ch), |
2169 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), |
2170 | + SND_PCI_QUIRK(0x1734, 0x1107, "FSC AMILO Xi2550", |
2171 | + ALC883_FUJITSU_PI2515), |
2172 | SND_PCI_QUIRK(0x1734, 0x1108, "Fujitsu AMILO Pi2515", ALC883_FUJITSU_PI2515), |
2173 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch), |
2174 | SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763), |
2175 | diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c |
2176 | index b8cfb7c..7a1a8c8 100644 |
2177 | --- a/sound/usb/usbaudio.c |
2178 | +++ b/sound/usb/usbaudio.c |
2179 | @@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, |
2180 | return -EINVAL; |
2181 | } |
2182 | alts = &iface->altsetting[fp->altset_idx]; |
2183 | + fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); |
2184 | usb_set_interface(chip->dev, fp->iface, 0); |
2185 | init_usb_pitch(chip->dev, fp->iface, alts, fp); |
2186 | init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max); |