diff options
82 files changed, 414 insertions, 217 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 736d45602886..826b6e148316 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -199,6 +199,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 199 | acpi_display_output=video | 199 | acpi_display_output=video |
| 200 | See above. | 200 | See above. |
| 201 | 201 | ||
| 202 | acpi_early_pdc_eval [HW,ACPI] Evaluate processor _PDC methods | ||
| 203 | early. Needed on some platforms to properly | ||
| 204 | initialize the EC. | ||
| 205 | |||
| 202 | acpi_irq_balance [HW,ACPI] | 206 | acpi_irq_balance [HW,ACPI] |
| 203 | ACPI will balance active IRQs | 207 | ACPI will balance active IRQs |
| 204 | default in APIC mode | 208 | default in APIC mode |
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h index 7ae58892ba8d..e97b255d97bc 100644 --- a/arch/ia64/include/asm/acpi.h +++ b/arch/ia64/include/asm/acpi.h | |||
| @@ -94,6 +94,7 @@ ia64_acpi_release_global_lock (unsigned int *lock) | |||
| 94 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ | 94 | #define acpi_noirq 0 /* ACPI always enabled on IA64 */ |
| 95 | #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ | 95 | #define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ |
| 96 | #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ | 96 | #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ |
| 97 | #define acpi_ht 0 /* no HT-only mode on IA64 */ | ||
| 97 | #endif | 98 | #endif |
| 98 | #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ | 99 | #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ |
| 99 | static inline void disable_acpi(void) { } | 100 | static inline void disable_acpi(void) { } |
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index e14108b19c09..4c41656ede87 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
| @@ -201,7 +201,9 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
| 201 | relevant until we have real hardware to play with... */ | 201 | relevant until we have real hardware to play with... */ |
| 202 | #define ELF_PLATFORM NULL | 202 | #define ELF_PLATFORM NULL |
| 203 | 203 | ||
| 204 | #define SET_PERSONALITY(ex) set_personality(PER_LINUX) | 204 | #define SET_PERSONALITY(ex) \ |
| 205 | set_personality((current->personality & ~PER_MASK) | PER_LINUX) | ||
| 206 | |||
| 205 | #define elf_read_implies_exec(ex, executable_stack) \ | 207 | #define elf_read_implies_exec(ex, executable_stack) \ |
| 206 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 208 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
| 207 | 209 | ||
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 873ebdc4f98e..b063eb8b18e3 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
| @@ -133,6 +133,8 @@ void user_enable_single_step(struct task_struct *child) | |||
| 133 | struct pt_regs *regs = child->thread.uregs; | 133 | struct pt_regs *regs = child->thread.uregs; |
| 134 | 134 | ||
| 135 | regs->sr |= SR_SSTEP; /* auto-resetting upon exception */ | 135 | regs->sr |= SR_SSTEP; /* auto-resetting upon exception */ |
| 136 | |||
| 137 | set_tsk_thread_flag(child, TIF_SINGLESTEP); | ||
| 136 | } | 138 | } |
| 137 | 139 | ||
| 138 | void user_disable_single_step(struct task_struct *child) | 140 | void user_disable_single_step(struct task_struct *child) |
| @@ -140,6 +142,8 @@ void user_disable_single_step(struct task_struct *child) | |||
| 140 | struct pt_regs *regs = child->thread.uregs; | 142 | struct pt_regs *regs = child->thread.uregs; |
| 141 | 143 | ||
| 142 | regs->sr &= ~SR_SSTEP; | 144 | regs->sr &= ~SR_SSTEP; |
| 145 | |||
| 146 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); | ||
| 143 | } | 147 | } |
| 144 | 148 | ||
| 145 | static int genregs_get(struct task_struct *target, | 149 | static int genregs_get(struct task_struct *target, |
| @@ -454,6 +458,8 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs) | |||
| 454 | 458 | ||
| 455 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) | 459 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) |
| 456 | { | 460 | { |
| 461 | int step; | ||
| 462 | |||
| 457 | if (unlikely(current->audit_context)) | 463 | if (unlikely(current->audit_context)) |
| 458 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), | 464 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), |
| 459 | regs->regs[9]); | 465 | regs->regs[9]); |
| @@ -461,8 +467,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) | |||
| 461 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | 467 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
| 462 | trace_sys_exit(regs, regs->regs[9]); | 468 | trace_sys_exit(regs, regs->regs[9]); |
| 463 | 469 | ||
| 464 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 470 | step = test_thread_flag(TIF_SINGLESTEP); |
| 465 | tracehook_report_syscall_exit(regs, 0); | 471 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) |
| 472 | tracehook_report_syscall_exit(regs, step); | ||
| 466 | } | 473 | } |
| 467 | 474 | ||
| 468 | /* Called with interrupts disabled */ | 475 | /* Called with interrupts disabled */ |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index ce76dbdef294..580e97d46ca5 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
| @@ -118,7 +118,9 @@ static int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
| 118 | * clear the TS_RESTORE_SIGMASK flag. | 118 | * clear the TS_RESTORE_SIGMASK flag. |
| 119 | */ | 119 | */ |
| 120 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; | 120 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
| 121 | tracehook_signal_handler(signr, &info, &ka, regs, 0); | 121 | |
| 122 | tracehook_signal_handler(signr, &info, &ka, regs, | ||
| 123 | test_thread_flag(TIF_SINGLESTEP)); | ||
| 122 | return 1; | 124 | return 1; |
| 123 | } | 125 | } |
| 124 | } | 126 | } |
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h index 1994d3f58443..f2ad2163109d 100644 --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h | |||
| @@ -170,10 +170,7 @@ static inline void elf_common_init(struct thread_struct *t, | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | #define ELF_PLAT_INIT(_r, load_addr) \ | 172 | #define ELF_PLAT_INIT(_r, load_addr) \ |
| 173 | do { \ | 173 | elf_common_init(¤t->thread, _r, 0) |
| 174 | elf_common_init(¤t->thread, _r, 0); \ | ||
| 175 | clear_thread_flag(TIF_IA32); \ | ||
| 176 | } while (0) | ||
| 177 | 174 | ||
| 178 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ | 175 | #define COMPAT_ELF_PLAT_INIT(regs, load_addr) \ |
| 179 | elf_common_init(¤t->thread, regs, __USER_DS) | 176 | elf_common_init(¤t->thread, regs, __USER_DS) |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 0acbcdfa5ca4..af1c5833ff23 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
| @@ -1344,14 +1344,6 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = { | |||
| 1344 | }, | 1344 | }, |
| 1345 | { | 1345 | { |
| 1346 | .callback = force_acpi_ht, | 1346 | .callback = force_acpi_ht, |
| 1347 | .ident = "ASUS P2B-DS", | ||
| 1348 | .matches = { | ||
| 1349 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | ||
| 1350 | DMI_MATCH(DMI_BOARD_NAME, "P2B-DS"), | ||
| 1351 | }, | ||
| 1352 | }, | ||
| 1353 | { | ||
| 1354 | .callback = force_acpi_ht, | ||
| 1355 | .ident = "ASUS CUR-DLS", | 1347 | .ident = "ASUS CUR-DLS", |
| 1356 | .matches = { | 1348 | .matches = { |
| 1357 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 1349 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 41a26a82470a..126f0b493d04 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
| @@ -527,6 +527,7 @@ void set_personality_ia32(void) | |||
| 527 | 527 | ||
| 528 | /* Make sure to be in 32bit mode */ | 528 | /* Make sure to be in 32bit mode */ |
| 529 | set_thread_flag(TIF_IA32); | 529 | set_thread_flag(TIF_IA32); |
| 530 | current->personality |= force_personality32; | ||
| 530 | 531 | ||
| 531 | /* Prepare the first "return" to user space */ | 532 | /* Prepare the first "return" to user space */ |
| 532 | current_thread_info()->status |= TS_COMPAT; | 533 | current_thread_info()->status |= TS_COMPAT; |
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index bbc2c1315c47..b2586f57e1f5 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
| @@ -935,6 +935,7 @@ static int dock_add(acpi_handle handle) | |||
| 935 | struct platform_device *dd; | 935 | struct platform_device *dd; |
| 936 | 936 | ||
| 937 | id = dock_station_count; | 937 | id = dock_station_count; |
| 938 | memset(&ds, 0, sizeof(ds)); | ||
| 938 | dd = platform_device_register_data(NULL, "dock", id, &ds, sizeof(ds)); | 939 | dd = platform_device_register_data(NULL, "dock", id, &ds, sizeof(ds)); |
| 939 | if (IS_ERR(dd)) | 940 | if (IS_ERR(dd)) |
| 940 | return PTR_ERR(dd); | 941 | return PTR_ERR(dd); |
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 7247819dbd80..e306ba9aa34e 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c | |||
| @@ -125,6 +125,8 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) | |||
| 125 | return status; | 125 | return status; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static int early_pdc_done; | ||
| 129 | |||
| 128 | void acpi_processor_set_pdc(acpi_handle handle) | 130 | void acpi_processor_set_pdc(acpi_handle handle) |
| 129 | { | 131 | { |
| 130 | struct acpi_object_list *obj_list; | 132 | struct acpi_object_list *obj_list; |
| @@ -132,6 +134,9 @@ void acpi_processor_set_pdc(acpi_handle handle) | |||
| 132 | if (arch_has_acpi_pdc() == false) | 134 | if (arch_has_acpi_pdc() == false) |
| 133 | return; | 135 | return; |
| 134 | 136 | ||
| 137 | if (early_pdc_done) | ||
| 138 | return; | ||
| 139 | |||
| 135 | obj_list = acpi_processor_alloc_pdc(); | 140 | obj_list = acpi_processor_alloc_pdc(); |
| 136 | if (!obj_list) | 141 | if (!obj_list) |
| 137 | return; | 142 | return; |
| @@ -151,6 +156,13 @@ static int set_early_pdc_optin(const struct dmi_system_id *id) | |||
| 151 | return 0; | 156 | return 0; |
| 152 | } | 157 | } |
| 153 | 158 | ||
| 159 | static int param_early_pdc_optin(char *s) | ||
| 160 | { | ||
| 161 | early_pdc_optin = 1; | ||
| 162 | return 1; | ||
| 163 | } | ||
| 164 | __setup("acpi_early_pdc_eval", param_early_pdc_optin); | ||
| 165 | |||
| 154 | static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { | 166 | static struct dmi_system_id __cpuinitdata early_pdc_optin_table[] = { |
| 155 | { | 167 | { |
| 156 | set_early_pdc_optin, "HP Envy", { | 168 | set_early_pdc_optin, "HP Envy", { |
| @@ -192,4 +204,6 @@ void __init acpi_early_processor_set_pdc(void) | |||
| 192 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, | 204 | acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT, |
| 193 | ACPI_UINT32_MAX, | 205 | ACPI_UINT32_MAX, |
| 194 | early_init_pdc, NULL, NULL, NULL); | 206 | early_init_pdc, NULL, NULL, NULL); |
| 207 | |||
| 208 | early_pdc_done = 1; | ||
| 195 | } | 209 | } |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index ff9f6226085d..3e009674f333 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
| @@ -1336,9 +1336,25 @@ static int acpi_bus_scan(acpi_handle handle, struct acpi_bus_ops *ops, | |||
| 1336 | 1336 | ||
| 1337 | if (child) | 1337 | if (child) |
| 1338 | *child = device; | 1338 | *child = device; |
| 1339 | return 0; | 1339 | |
| 1340 | if (device) | ||
| 1341 | return 0; | ||
| 1342 | else | ||
| 1343 | return -ENODEV; | ||
| 1340 | } | 1344 | } |
| 1341 | 1345 | ||
| 1346 | /* | ||
| 1347 | * acpi_bus_add and acpi_bus_start | ||
| 1348 | * | ||
| 1349 | * scan a given ACPI tree and (probably recently hot-plugged) | ||
| 1350 | * create and add or starts found devices. | ||
| 1351 | * | ||
| 1352 | * If no devices were found -ENODEV is returned which does not | ||
| 1353 | * mean that this is a real error, there just have been no suitable | ||
| 1354 | * ACPI objects in the table trunk from which the kernel could create | ||
| 1355 | * a device and add/start an appropriate driver. | ||
| 1356 | */ | ||
| 1357 | |||
| 1342 | int | 1358 | int |
| 1343 | acpi_bus_add(struct acpi_device **child, | 1359 | acpi_bus_add(struct acpi_device **child, |
| 1344 | struct acpi_device *parent, acpi_handle handle, int type) | 1360 | struct acpi_device *parent, acpi_handle handle, int type) |
| @@ -1348,8 +1364,7 @@ acpi_bus_add(struct acpi_device **child, | |||
| 1348 | memset(&ops, 0, sizeof(ops)); | 1364 | memset(&ops, 0, sizeof(ops)); |
| 1349 | ops.acpi_op_add = 1; | 1365 | ops.acpi_op_add = 1; |
| 1350 | 1366 | ||
| 1351 | acpi_bus_scan(handle, &ops, child); | 1367 | return acpi_bus_scan(handle, &ops, child); |
| 1352 | return 0; | ||
| 1353 | } | 1368 | } |
| 1354 | EXPORT_SYMBOL(acpi_bus_add); | 1369 | EXPORT_SYMBOL(acpi_bus_add); |
| 1355 | 1370 | ||
| @@ -1357,11 +1372,13 @@ int acpi_bus_start(struct acpi_device *device) | |||
| 1357 | { | 1372 | { |
| 1358 | struct acpi_bus_ops ops; | 1373 | struct acpi_bus_ops ops; |
| 1359 | 1374 | ||
| 1375 | if (!device) | ||
| 1376 | return -EINVAL; | ||
| 1377 | |||
| 1360 | memset(&ops, 0, sizeof(ops)); | 1378 | memset(&ops, 0, sizeof(ops)); |
| 1361 | ops.acpi_op_start = 1; | 1379 | ops.acpi_op_start = 1; |
| 1362 | 1380 | ||
| 1363 | acpi_bus_scan(device->handle, &ops, NULL); | 1381 | return acpi_bus_scan(device->handle, &ops, NULL); |
| 1364 | return 0; | ||
| 1365 | } | 1382 | } |
| 1366 | EXPORT_SYMBOL(acpi_bus_start); | 1383 | EXPORT_SYMBOL(acpi_bus_start); |
| 1367 | 1384 | ||
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index f336bca7c450..8a0ed2800e63 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
| @@ -213,7 +213,7 @@ acpi_table_parse_entries(char *id, | |||
| 213 | unsigned long table_end; | 213 | unsigned long table_end; |
| 214 | acpi_size tbl_size; | 214 | acpi_size tbl_size; |
| 215 | 215 | ||
| 216 | if (acpi_disabled) | 216 | if (acpi_disabled && !acpi_ht) |
| 217 | return -ENODEV; | 217 | return -ENODEV; |
| 218 | 218 | ||
| 219 | if (!handler) | 219 | if (!handler) |
| @@ -280,7 +280,7 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler) | |||
| 280 | struct acpi_table_header *table = NULL; | 280 | struct acpi_table_header *table = NULL; |
| 281 | acpi_size tbl_size; | 281 | acpi_size tbl_size; |
| 282 | 282 | ||
| 283 | if (acpi_disabled) | 283 | if (acpi_disabled && !acpi_ht) |
| 284 | return -ENODEV; | 284 | return -ENODEV; |
| 285 | 285 | ||
| 286 | if (!handler) | 286 | if (!handler) |
diff --git a/drivers/base/class.c b/drivers/base/class.c index 161746deab4b..6e2c3b064f53 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
| @@ -59,6 +59,8 @@ static void class_release(struct kobject *kobj) | |||
| 59 | else | 59 | else |
| 60 | pr_debug("class '%s' does not have a release() function, " | 60 | pr_debug("class '%s' does not have a release() function, " |
| 61 | "be careful\n", class->name); | 61 | "be careful\n", class->name); |
| 62 | |||
| 63 | kfree(cp); | ||
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | static struct sysfs_ops class_sysfs_ops = { | 66 | static struct sysfs_ops class_sysfs_ops = { |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index cbaf420c36c5..2d3dc7ded0a9 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
| @@ -893,20 +893,31 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context, | |||
| 893 | 893 | ||
| 894 | static struct kmem_cache *fwnet_packet_task_cache; | 894 | static struct kmem_cache *fwnet_packet_task_cache; |
| 895 | 895 | ||
| 896 | static void fwnet_free_ptask(struct fwnet_packet_task *ptask) | ||
| 897 | { | ||
| 898 | dev_kfree_skb_any(ptask->skb); | ||
| 899 | kmem_cache_free(fwnet_packet_task_cache, ptask); | ||
| 900 | } | ||
| 901 | |||
| 896 | static int fwnet_send_packet(struct fwnet_packet_task *ptask); | 902 | static int fwnet_send_packet(struct fwnet_packet_task *ptask); |
| 897 | 903 | ||
| 898 | static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask) | 904 | static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask) |
| 899 | { | 905 | { |
| 900 | struct fwnet_device *dev; | 906 | struct fwnet_device *dev = ptask->dev; |
| 901 | unsigned long flags; | 907 | unsigned long flags; |
| 902 | 908 | bool free; | |
| 903 | dev = ptask->dev; | ||
| 904 | 909 | ||
| 905 | spin_lock_irqsave(&dev->lock, flags); | 910 | spin_lock_irqsave(&dev->lock, flags); |
| 906 | list_del(&ptask->pt_link); | ||
| 907 | spin_unlock_irqrestore(&dev->lock, flags); | ||
| 908 | 911 | ||
| 909 | ptask->outstanding_pkts--; /* FIXME access inside lock */ | 912 | ptask->outstanding_pkts--; |
| 913 | |||
| 914 | /* Check whether we or the networking TX soft-IRQ is last user. */ | ||
| 915 | free = (ptask->outstanding_pkts == 0 && !list_empty(&ptask->pt_link)); | ||
| 916 | |||
| 917 | if (ptask->outstanding_pkts == 0) | ||
| 918 | list_del(&ptask->pt_link); | ||
| 919 | |||
| 920 | spin_unlock_irqrestore(&dev->lock, flags); | ||
| 910 | 921 | ||
| 911 | if (ptask->outstanding_pkts > 0) { | 922 | if (ptask->outstanding_pkts > 0) { |
| 912 | u16 dg_size; | 923 | u16 dg_size; |
| @@ -951,10 +962,10 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask) | |||
| 951 | ptask->max_payload = skb->len + RFC2374_FRAG_HDR_SIZE; | 962 | ptask->max_payload = skb->len + RFC2374_FRAG_HDR_SIZE; |
| 952 | } | 963 | } |
| 953 | fwnet_send_packet(ptask); | 964 | fwnet_send_packet(ptask); |
| 954 | } else { | ||
| 955 | dev_kfree_skb_any(ptask->skb); | ||
| 956 | kmem_cache_free(fwnet_packet_task_cache, ptask); | ||
| 957 | } | 965 | } |
| 966 | |||
| 967 | if (free) | ||
| 968 | fwnet_free_ptask(ptask); | ||
| 958 | } | 969 | } |
| 959 | 970 | ||
| 960 | static void fwnet_write_complete(struct fw_card *card, int rcode, | 971 | static void fwnet_write_complete(struct fw_card *card, int rcode, |
| @@ -977,6 +988,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask) | |||
| 977 | unsigned tx_len; | 988 | unsigned tx_len; |
| 978 | struct rfc2734_header *bufhdr; | 989 | struct rfc2734_header *bufhdr; |
| 979 | unsigned long flags; | 990 | unsigned long flags; |
| 991 | bool free; | ||
| 980 | 992 | ||
| 981 | dev = ptask->dev; | 993 | dev = ptask->dev; |
| 982 | tx_len = ptask->max_payload; | 994 | tx_len = ptask->max_payload; |
| @@ -1022,12 +1034,16 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask) | |||
| 1022 | generation, SCODE_100, 0ULL, ptask->skb->data, | 1034 | generation, SCODE_100, 0ULL, ptask->skb->data, |
| 1023 | tx_len + 8, fwnet_write_complete, ptask); | 1035 | tx_len + 8, fwnet_write_complete, ptask); |
| 1024 | 1036 | ||
| 1025 | /* FIXME race? */ | ||
| 1026 | spin_lock_irqsave(&dev->lock, flags); | 1037 | spin_lock_irqsave(&dev->lock, flags); |
| 1027 | list_add_tail(&ptask->pt_link, &dev->broadcasted_list); | 1038 | |
| 1039 | /* If the AT tasklet already ran, we may be last user. */ | ||
| 1040 | free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link)); | ||
| 1041 | if (!free) | ||
| 1042 | list_add_tail(&ptask->pt_link, &dev->broadcasted_list); | ||
| 1043 | |||
| 1028 | spin_unlock_irqrestore(&dev->lock, flags); | 1044 | spin_unlock_irqrestore(&dev->lock, flags); |
| 1029 | 1045 | ||
| 1030 | return 0; | 1046 | goto out; |
| 1031 | } | 1047 | } |
| 1032 | 1048 | ||
| 1033 | fw_send_request(dev->card, &ptask->transaction, | 1049 | fw_send_request(dev->card, &ptask->transaction, |
| @@ -1035,12 +1051,19 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask) | |||
| 1035 | ptask->generation, ptask->speed, ptask->fifo_addr, | 1051 | ptask->generation, ptask->speed, ptask->fifo_addr, |
| 1036 | ptask->skb->data, tx_len, fwnet_write_complete, ptask); | 1052 | ptask->skb->data, tx_len, fwnet_write_complete, ptask); |
| 1037 | 1053 | ||
| 1038 | /* FIXME race? */ | ||
| 1039 | spin_lock_irqsave(&dev->lock, flags); | 1054 | spin_lock_irqsave(&dev->lock, flags); |
| 1040 | list_add_tail(&ptask->pt_link, &dev->sent_list); | 1055 | |
| 1056 | /* If the AT tasklet already ran, we may be last user. */ | ||
| 1057 | free = (ptask->outstanding_pkts == 0 && list_empty(&ptask->pt_link)); | ||
| 1058 | if (!free) | ||
| 1059 | list_add_tail(&ptask->pt_link, &dev->sent_list); | ||
| 1060 | |||
| 1041 | spin_unlock_irqrestore(&dev->lock, flags); | 1061 | spin_unlock_irqrestore(&dev->lock, flags); |
| 1042 | 1062 | ||
| 1043 | dev->netdev->trans_start = jiffies; | 1063 | dev->netdev->trans_start = jiffies; |
| 1064 | out: | ||
| 1065 | if (free) | ||
| 1066 | fwnet_free_ptask(ptask); | ||
| 1044 | 1067 | ||
| 1045 | return 0; | 1068 | return 0; |
| 1046 | } | 1069 | } |
| @@ -1298,6 +1321,8 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net) | |||
| 1298 | spin_unlock_irqrestore(&dev->lock, flags); | 1321 | spin_unlock_irqrestore(&dev->lock, flags); |
| 1299 | 1322 | ||
| 1300 | ptask->max_payload = max_payload; | 1323 | ptask->max_payload = max_payload; |
| 1324 | INIT_LIST_HEAD(&ptask->pt_link); | ||
| 1325 | |||
| 1301 | fwnet_send_packet(ptask); | 1326 | fwnet_send_packet(ptask); |
| 1302 | 1327 | ||
| 1303 | return NETDEV_TX_OK; | 1328 | return NETDEV_TX_OK; |
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 2345d4103fe6..43ebf337b131 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
| @@ -2101,11 +2101,6 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base, | |||
| 2101 | u32 payload_index, payload_end_index, next_page_index; | 2101 | u32 payload_index, payload_end_index, next_page_index; |
| 2102 | int page, end_page, i, length, offset; | 2102 | int page, end_page, i, length, offset; |
| 2103 | 2103 | ||
| 2104 | /* | ||
| 2105 | * FIXME: Cycle lost behavior should be configurable: lose | ||
| 2106 | * packet, retransmit or terminate.. | ||
| 2107 | */ | ||
| 2108 | |||
| 2109 | p = packet; | 2104 | p = packet; |
| 2110 | payload_index = payload; | 2105 | payload_index = payload; |
| 2111 | 2106 | ||
| @@ -2135,6 +2130,14 @@ static int ohci_queue_iso_transmit(struct fw_iso_context *base, | |||
| 2135 | if (!p->skip) { | 2130 | if (!p->skip) { |
| 2136 | d[0].control = cpu_to_le16(DESCRIPTOR_KEY_IMMEDIATE); | 2131 | d[0].control = cpu_to_le16(DESCRIPTOR_KEY_IMMEDIATE); |
| 2137 | d[0].req_count = cpu_to_le16(8); | 2132 | d[0].req_count = cpu_to_le16(8); |
| 2133 | /* | ||
| 2134 | * Link the skip address to this descriptor itself. This causes | ||
| 2135 | * a context to skip a cycle whenever lost cycles or FIFO | ||
| 2136 | * overruns occur, without dropping the data. The application | ||
| 2137 | * should then decide whether this is an error condition or not. | ||
| 2138 | * FIXME: Make the context's cycle-lost behaviour configurable? | ||
| 2139 | */ | ||
| 2140 | d[0].branch_address = cpu_to_le32(d_bus | z); | ||
| 2138 | 2141 | ||
| 2139 | header = (__le32 *) &d[1]; | 2142 | header = (__le32 *) &d[1]; |
| 2140 | header[0] = cpu_to_le32(IT_HEADER_SY(p->sy) | | 2143 | header[0] = cpu_to_le32(IT_HEADER_SY(p->sy) | |
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index cdec32977129..2ac074c8f5d2 100644 --- a/drivers/gpu/drm/drm_mm.c +++ b/drivers/gpu/drm/drm_mm.c | |||
| @@ -405,7 +405,8 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm, | |||
| 405 | wasted += alignment - tmp; | 405 | wasted += alignment - tmp; |
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | if (entry->size >= size + wasted) { | 408 | if (entry->size >= size + wasted && |
| 409 | (entry->start + wasted + size) <= end) { | ||
| 409 | if (!best_match) | 410 | if (!best_match) |
| 410 | return entry; | 411 | return entry; |
| 411 | if (entry->size < best_size) { | 412 | if (entry->size < best_size) { |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b1d0acbae4e4..c2e8a45780d5 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
| @@ -636,6 +636,13 @@ static const struct dmi_system_id bad_lid_status[] = { | |||
| 636 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-81005"), | 636 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-81005"), |
| 637 | }, | 637 | }, |
| 638 | }, | 638 | }, |
| 639 | { | ||
| 640 | .ident = "Clevo M5x0N", | ||
| 641 | .matches = { | ||
| 642 | DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."), | ||
| 643 | DMI_MATCH(DMI_BOARD_NAME, "M5x0N"), | ||
| 644 | }, | ||
| 645 | }, | ||
| 639 | { } | 646 | { } |
| 640 | }; | 647 | }; |
| 641 | 648 | ||
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index e3b44562d265..2a3df5599ab4 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <asm/unaligned.h> | ||
| 27 | 28 | ||
| 28 | #define ATOM_DEBUG | 29 | #define ATOM_DEBUG |
| 29 | 30 | ||
| @@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr, | |||
| 212 | case ATOM_ARG_PS: | 213 | case ATOM_ARG_PS: |
| 213 | idx = U8(*ptr); | 214 | idx = U8(*ptr); |
| 214 | (*ptr)++; | 215 | (*ptr)++; |
| 215 | val = le32_to_cpu(ctx->ps[idx]); | 216 | /* get_unaligned_le32 avoids unaligned accesses from atombios |
| 217 | * tables, noticed on a DEC Alpha. */ | ||
| 218 | val = get_unaligned_le32((u32 *)&ctx->ps[idx]); | ||
| 216 | if (print) | 219 | if (print) |
| 217 | DEBUG("PS[0x%02X,0x%04X]", idx, val); | 220 | DEBUG("PS[0x%02X,0x%04X]", idx, val); |
| 218 | break; | 221 | break; |
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index b32eeea5bb8b..99915a682d59 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
| @@ -350,7 +350,7 @@ retry: | |||
| 350 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 350 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
| 351 | 351 | ||
| 352 | if (args.ucReplyStatus && !args.ucDataOutLen) { | 352 | if (args.ucReplyStatus && !args.ucDataOutLen) { |
| 353 | if (args.ucReplyStatus == 0x20 && retry_count < 10) | 353 | if (args.ucReplyStatus == 0x20 && retry_count++ < 10) |
| 354 | goto retry; | 354 | goto retry; |
| 355 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n", | 355 | DRM_DEBUG("failed to get auxch %02x%02x %02x %02x 0x%02x %02x after %d retries\n", |
| 356 | req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], | 356 | req_bytes[1], req_bytes[0], req_bytes[2], req_bytes[3], |
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 1a3e909b7bba..c7320ce4567d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -1020,6 +1020,12 @@ static int ttm_bo_mem_compat(struct ttm_placement *placement, | |||
| 1020 | struct ttm_mem_reg *mem) | 1020 | struct ttm_mem_reg *mem) |
| 1021 | { | 1021 | { |
| 1022 | int i; | 1022 | int i; |
| 1023 | struct drm_mm_node *node = mem->mm_node; | ||
| 1024 | |||
| 1025 | if (node && placement->lpfn != 0 && | ||
| 1026 | (node->start < placement->fpfn || | ||
| 1027 | node->start + node->size > placement->lpfn)) | ||
| 1028 | return -1; | ||
| 1023 | 1029 | ||
| 1024 | for (i = 0; i < placement->num_placement; i++) { | 1030 | for (i = 0; i < placement->num_placement; i++) { |
| 1025 | if ((placement->placement[i] & mem->placement & | 1031 | if ((placement->placement[i] & mem->placement & |
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index 54abf9e303b7..f1c8cae70b4b 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c | |||
| @@ -172,11 +172,15 @@ int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type, | |||
| 172 | { | 172 | { |
| 173 | int r = 0; | 173 | int r = 0; |
| 174 | size_t dummy = 0; | 174 | size_t dummy = 0; |
| 175 | int overhead_size = | 175 | int overhead_size = sizeof(struct dm_ulog_request) + sizeof(struct cn_msg); |
| 176 | sizeof(struct dm_ulog_request *) + sizeof(struct cn_msg); | ||
| 177 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; | 176 | struct dm_ulog_request *tfr = prealloced_ulog_tfr; |
| 178 | struct receiving_pkg pkg; | 177 | struct receiving_pkg pkg; |
| 179 | 178 | ||
| 179 | /* | ||
| 180 | * Given the space needed to hold the 'struct cn_msg' and | ||
| 181 | * 'struct dm_ulog_request' - do we have enough payload | ||
| 182 | * space remaining? | ||
| 183 | */ | ||
| 180 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { | 184 | if (data_size > (DM_ULOG_PREALLOCED_SIZE - overhead_size)) { |
| 181 | DMINFO("Size of tfr exceeds preallocated size"); | 185 | DMINFO("Size of tfr exceeds preallocated size"); |
| 182 | return -EINVAL; | 186 | return -EINVAL; |
| @@ -191,7 +195,7 @@ resend: | |||
| 191 | */ | 195 | */ |
| 192 | mutex_lock(&dm_ulog_lock); | 196 | mutex_lock(&dm_ulog_lock); |
| 193 | 197 | ||
| 194 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size); | 198 | memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - sizeof(struct cn_msg)); |
| 195 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); | 199 | memcpy(tfr->uuid, uuid, DM_UUID_LEN); |
| 196 | tfr->luid = luid; | 200 | tfr->luid = luid; |
| 197 | tfr->seq = dm_ulog_seq++; | 201 | tfr->seq = dm_ulog_seq++; |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index ad779bd13aec..6c1046df81f6 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
| @@ -724,7 +724,7 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes) | |||
| 724 | /* | 724 | /* |
| 725 | * Dispatch io. | 725 | * Dispatch io. |
| 726 | */ | 726 | */ |
| 727 | if (unlikely(ms->log_failure)) { | 727 | if (unlikely(ms->log_failure) && errors_handled(ms)) { |
| 728 | spin_lock_irq(&ms->lock); | 728 | spin_lock_irq(&ms->lock); |
| 729 | bio_list_merge(&ms->failures, &sync); | 729 | bio_list_merge(&ms->failures, &sync); |
| 730 | spin_unlock_irq(&ms->lock); | 730 | spin_unlock_irq(&ms->lock); |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 5f19ceb6fe91..168bd38f5006 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
| @@ -660,10 +660,9 @@ void dm_rh_recovery_end(struct dm_region *reg, int success) | |||
| 660 | spin_lock_irq(&rh->region_lock); | 660 | spin_lock_irq(&rh->region_lock); |
| 661 | if (success) | 661 | if (success) |
| 662 | list_add(®->list, ®->rh->recovered_regions); | 662 | list_add(®->list, ®->rh->recovered_regions); |
| 663 | else { | 663 | else |
| 664 | reg->state = DM_RH_NOSYNC; | ||
| 665 | list_add(®->list, ®->rh->failed_recovered_regions); | 664 | list_add(®->list, ®->rh->failed_recovered_regions); |
| 666 | } | 665 | |
| 667 | spin_unlock_irq(&rh->region_lock); | 666 | spin_unlock_irq(&rh->region_lock); |
| 668 | 667 | ||
| 669 | rh->wakeup_workers(rh->context); | 668 | rh->wakeup_workers(rh->context); |
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 7d08879689ac..c097d8a4823d 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c | |||
| @@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, | |||
| 254 | * Issue the synchronous I/O from a different thread | 254 | * Issue the synchronous I/O from a different thread |
| 255 | * to avoid generic_make_request recursion. | 255 | * to avoid generic_make_request recursion. |
| 256 | */ | 256 | */ |
| 257 | INIT_WORK(&req.work, do_metadata); | 257 | INIT_WORK_ON_STACK(&req.work, do_metadata); |
| 258 | queue_work(ps->metadata_wq, &req.work); | 258 | queue_work(ps->metadata_wq, &req.work); |
| 259 | flush_workqueue(ps->metadata_wq); | 259 | flush_workqueue(ps->metadata_wq); |
| 260 | 260 | ||
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index e0efc1adcaff..bd58703ee8f6 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
| @@ -110,7 +110,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | stripes = simple_strtoul(argv[0], &end, 10); | 112 | stripes = simple_strtoul(argv[0], &end, 10); |
| 113 | if (*end) { | 113 | if (!stripes || *end) { |
| 114 | ti->error = "Invalid stripe count"; | 114 | ti->error = "Invalid stripe count"; |
| 115 | return -EINVAL; | 115 | return -EINVAL; |
| 116 | } | 116 | } |
diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c index f53392df7b97..f91b40942e07 100644 --- a/drivers/md/dm-sysfs.c +++ b/drivers/md/dm-sysfs.c | |||
| @@ -80,20 +80,12 @@ static struct sysfs_ops dm_sysfs_ops = { | |||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * The sysfs structure is embedded in md struct, nothing to do here | ||
| 84 | */ | ||
| 85 | static void dm_sysfs_release(struct kobject *kobj) | ||
| 86 | { | ||
| 87 | } | ||
| 88 | |||
| 89 | /* | ||
| 90 | * dm kobject is embedded in mapped_device structure | 83 | * dm kobject is embedded in mapped_device structure |
| 91 | * no need to define release function here | 84 | * no need to define release function here |
| 92 | */ | 85 | */ |
| 93 | static struct kobj_type dm_ktype = { | 86 | static struct kobj_type dm_ktype = { |
| 94 | .sysfs_ops = &dm_sysfs_ops, | 87 | .sysfs_ops = &dm_sysfs_ops, |
| 95 | .default_attrs = dm_attrs, | 88 | .default_attrs = dm_attrs, |
| 96 | .release = dm_sysfs_release | ||
| 97 | }; | 89 | }; |
| 98 | 90 | ||
| 99 | /* | 91 | /* |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 3167480b532c..aa4e2aa86d49 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -1595,10 +1595,15 @@ static int dm_prep_fn(struct request_queue *q, struct request *rq) | |||
| 1595 | return BLKPREP_OK; | 1595 | return BLKPREP_OK; |
| 1596 | } | 1596 | } |
| 1597 | 1597 | ||
| 1598 | static void map_request(struct dm_target *ti, struct request *clone, | 1598 | /* |
| 1599 | struct mapped_device *md) | 1599 | * Returns: |
| 1600 | * 0 : the request has been processed (not requeued) | ||
| 1601 | * !0 : the request has been requeued | ||
| 1602 | */ | ||
| 1603 | static int map_request(struct dm_target *ti, struct request *clone, | ||
| 1604 | struct mapped_device *md) | ||
| 1600 | { | 1605 | { |
| 1601 | int r; | 1606 | int r, requeued = 0; |
| 1602 | struct dm_rq_target_io *tio = clone->end_io_data; | 1607 | struct dm_rq_target_io *tio = clone->end_io_data; |
| 1603 | 1608 | ||
| 1604 | /* | 1609 | /* |
| @@ -1625,6 +1630,7 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1625 | case DM_MAPIO_REQUEUE: | 1630 | case DM_MAPIO_REQUEUE: |
| 1626 | /* The target wants to requeue the I/O */ | 1631 | /* The target wants to requeue the I/O */ |
| 1627 | dm_requeue_unmapped_request(clone); | 1632 | dm_requeue_unmapped_request(clone); |
| 1633 | requeued = 1; | ||
| 1628 | break; | 1634 | break; |
| 1629 | default: | 1635 | default: |
| 1630 | if (r > 0) { | 1636 | if (r > 0) { |
| @@ -1636,6 +1642,8 @@ static void map_request(struct dm_target *ti, struct request *clone, | |||
| 1636 | dm_kill_unmapped_request(clone, r); | 1642 | dm_kill_unmapped_request(clone, r); |
| 1637 | break; | 1643 | break; |
| 1638 | } | 1644 | } |
| 1645 | |||
| 1646 | return requeued; | ||
| 1639 | } | 1647 | } |
| 1640 | 1648 | ||
| 1641 | /* | 1649 | /* |
| @@ -1677,12 +1685,17 @@ static void dm_request_fn(struct request_queue *q) | |||
| 1677 | atomic_inc(&md->pending[rq_data_dir(clone)]); | 1685 | atomic_inc(&md->pending[rq_data_dir(clone)]); |
| 1678 | 1686 | ||
| 1679 | spin_unlock(q->queue_lock); | 1687 | spin_unlock(q->queue_lock); |
| 1680 | map_request(ti, clone, md); | 1688 | if (map_request(ti, clone, md)) |
| 1689 | goto requeued; | ||
| 1690 | |||
| 1681 | spin_lock_irq(q->queue_lock); | 1691 | spin_lock_irq(q->queue_lock); |
| 1682 | } | 1692 | } |
| 1683 | 1693 | ||
| 1684 | goto out; | 1694 | goto out; |
| 1685 | 1695 | ||
| 1696 | requeued: | ||
| 1697 | spin_lock_irq(q->queue_lock); | ||
| 1698 | |||
| 1686 | plug_and_out: | 1699 | plug_and_out: |
| 1687 | if (!elv_queue_empty(q)) | 1700 | if (!elv_queue_empty(q)) |
| 1688 | /* Some requests still remain, retry later */ | 1701 | /* Some requests still remain, retry later */ |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index fee6eee7ae5b..006cb2efcd22 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, | |||
| 296 | req_hdr->opcode = opcode; | 296 | req_hdr->opcode = opcode; |
| 297 | req_hdr->subsystem = subsystem; | 297 | req_hdr->subsystem = subsystem; |
| 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); | 298 | req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); |
| 299 | req_hdr->version = 0; | ||
| 299 | } | 300 | } |
| 300 | 301 | ||
| 301 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, | 302 | static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 3103f4165311..35a06b47587b 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
| @@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) | |||
| 357 | u32 fctrl_reg; | 357 | u32 fctrl_reg; |
| 358 | u32 rmcs_reg; | 358 | u32 rmcs_reg; |
| 359 | u32 reg; | 359 | u32 reg; |
| 360 | u32 link_speed = 0; | ||
| 361 | bool link_up; | ||
| 360 | 362 | ||
| 361 | #ifdef CONFIG_DCB | 363 | #ifdef CONFIG_DCB |
| 362 | if (hw->fc.requested_mode == ixgbe_fc_pfc) | 364 | if (hw->fc.requested_mode == ixgbe_fc_pfc) |
| 363 | goto out; | 365 | goto out; |
| 364 | 366 | ||
| 365 | #endif /* CONFIG_DCB */ | 367 | #endif /* CONFIG_DCB */ |
| 368 | /* | ||
| 369 | * On 82598 having Rx FC on causes resets while doing 1G | ||
| 370 | * so if it's on turn it off once we know link_speed. For | ||
| 371 | * more details see 82598 Specification update. | ||
| 372 | */ | ||
| 373 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); | ||
| 374 | if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) { | ||
| 375 | switch (hw->fc.requested_mode) { | ||
| 376 | case ixgbe_fc_full: | ||
| 377 | hw->fc.requested_mode = ixgbe_fc_tx_pause; | ||
| 378 | break; | ||
| 379 | case ixgbe_fc_rx_pause: | ||
| 380 | hw->fc.requested_mode = ixgbe_fc_none; | ||
| 381 | break; | ||
| 382 | default: | ||
| 383 | /* no change */ | ||
| 384 | break; | ||
| 385 | } | ||
| 386 | } | ||
| 387 | |||
| 366 | /* Negotiate the fc mode to use */ | 388 | /* Negotiate the fc mode to use */ |
| 367 | ret_val = ixgbe_fc_autoneg(hw); | 389 | ret_val = ixgbe_fc_autoneg(hw); |
| 368 | if (ret_val) | 390 | if (ret_val) |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7b7c8486c0bf..951b73cf5ca2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 5763 | if (err) | 5763 | if (err) |
| 5764 | goto err_sw_init; | 5764 | goto err_sw_init; |
| 5765 | 5765 | ||
| 5766 | /* Make it possible the adapter to be woken up via WOL */ | ||
| 5767 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
| 5768 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
| 5769 | |||
| 5766 | /* | 5770 | /* |
| 5767 | * If there is a fan on this device and it has failed log the | 5771 | * If there is a fan on this device and it has failed log the |
| 5768 | * failure. | 5772 | * failure. |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 103e8b0e2a0d..46997e177ee3 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
| @@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | |||
| 2284 | fail2: | 2284 | fail2: |
| 2285 | efx_fini_struct(efx); | 2285 | efx_fini_struct(efx); |
| 2286 | fail1: | 2286 | fail1: |
| 2287 | WARN_ON(rc > 0); | ||
| 2287 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); | 2288 | EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); |
| 2288 | free_netdev(net_dev); | 2289 | free_netdev(net_dev); |
| 2289 | return rc; | 2290 | return rc; |
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index e0d13a451019..67eec7a6e487 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
| @@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx) | |||
| 320 | 320 | ||
| 321 | falcon_board(efx)->type->init_phy(efx); | 321 | falcon_board(efx)->type->init_phy(efx); |
| 322 | 322 | ||
| 323 | return rc; | 323 | return 0; |
| 324 | 324 | ||
| 325 | fail: | 325 | fail: |
| 326 | EFX_ERR(efx, "PHY reset timed out\n"); | 326 | EFX_ERR(efx, "PHY reset timed out\n"); |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index c93f58f5c6f2..317aa34b21cf 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
| @@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status) | |||
| 1877 | /** | 1877 | /** |
| 1878 | * tx_srv - transmit interrupt service | 1878 | * tx_srv - transmit interrupt service |
| 1879 | * @vptr; Velocity | 1879 | * @vptr; Velocity |
| 1880 | * @status: | ||
| 1881 | * | 1880 | * |
| 1882 | * Scan the queues looking for transmitted packets that | 1881 | * Scan the queues looking for transmitted packets that |
| 1883 | * we can complete and clean up. Update any statistics as | 1882 | * we can complete and clean up. Update any statistics as |
| 1884 | * necessary/ | 1883 | * necessary/ |
| 1885 | */ | 1884 | */ |
| 1886 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) | 1885 | static int velocity_tx_srv(struct velocity_info *vptr) |
| 1887 | { | 1886 | { |
| 1888 | struct tx_desc *td; | 1887 | struct tx_desc *td; |
| 1889 | int qnum; | 1888 | int qnum; |
| @@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) | |||
| 2090 | /** | 2089 | /** |
| 2091 | * velocity_rx_srv - service RX interrupt | 2090 | * velocity_rx_srv - service RX interrupt |
| 2092 | * @vptr: velocity | 2091 | * @vptr: velocity |
| 2093 | * @status: adapter status (unused) | ||
| 2094 | * | 2092 | * |
| 2095 | * Walk the receive ring of the velocity adapter and remove | 2093 | * Walk the receive ring of the velocity adapter and remove |
| 2096 | * any received packets from the receive queue. Hand the ring | 2094 | * any received packets from the receive queue. Hand the ring |
| 2097 | * slots back to the adapter for reuse. | 2095 | * slots back to the adapter for reuse. |
| 2098 | */ | 2096 | */ |
| 2099 | static int velocity_rx_srv(struct velocity_info *vptr, int status, | 2097 | static int velocity_rx_srv(struct velocity_info *vptr, int budget_left) |
| 2100 | int budget_left) | ||
| 2101 | { | 2098 | { |
| 2102 | struct net_device_stats *stats = &vptr->dev->stats; | 2099 | struct net_device_stats *stats = &vptr->dev->stats; |
| 2103 | int rd_curr = vptr->rx.curr; | 2100 | int rd_curr = vptr->rx.curr; |
| @@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget) | |||
| 2151 | struct velocity_info *vptr = container_of(napi, | 2148 | struct velocity_info *vptr = container_of(napi, |
| 2152 | struct velocity_info, napi); | 2149 | struct velocity_info, napi); |
| 2153 | unsigned int rx_done; | 2150 | unsigned int rx_done; |
| 2154 | u32 isr_status; | 2151 | unsigned long flags; |
| 2155 | |||
| 2156 | spin_lock(&vptr->lock); | ||
| 2157 | isr_status = mac_read_isr(vptr->mac_regs); | ||
| 2158 | |||
| 2159 | /* Ack the interrupt */ | ||
| 2160 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2161 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2162 | velocity_error(vptr, isr_status); | ||
| 2163 | 2152 | ||
| 2153 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 2164 | /* | 2154 | /* |
| 2165 | * Do rx and tx twice for performance (taken from the VIA | 2155 | * Do rx and tx twice for performance (taken from the VIA |
| 2166 | * out-of-tree driver). | 2156 | * out-of-tree driver). |
| 2167 | */ | 2157 | */ |
| 2168 | rx_done = velocity_rx_srv(vptr, isr_status, budget / 2); | 2158 | rx_done = velocity_rx_srv(vptr, budget / 2); |
| 2169 | velocity_tx_srv(vptr, isr_status); | 2159 | velocity_tx_srv(vptr); |
| 2170 | rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done); | 2160 | rx_done += velocity_rx_srv(vptr, budget - rx_done); |
| 2171 | velocity_tx_srv(vptr, isr_status); | 2161 | velocity_tx_srv(vptr); |
| 2172 | |||
| 2173 | spin_unlock(&vptr->lock); | ||
| 2174 | 2162 | ||
| 2175 | /* If budget not fully consumed, exit the polling mode */ | 2163 | /* If budget not fully consumed, exit the polling mode */ |
| 2176 | if (rx_done < budget) { | 2164 | if (rx_done < budget) { |
| 2177 | napi_complete(napi); | 2165 | napi_complete(napi); |
| 2178 | mac_enable_int(vptr->mac_regs); | 2166 | mac_enable_int(vptr->mac_regs); |
| 2179 | } | 2167 | } |
| 2168 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 2180 | 2169 | ||
| 2181 | return rx_done; | 2170 | return rx_done; |
| 2182 | } | 2171 | } |
| @@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance) | |||
| 2206 | return IRQ_NONE; | 2195 | return IRQ_NONE; |
| 2207 | } | 2196 | } |
| 2208 | 2197 | ||
| 2198 | /* Ack the interrupt */ | ||
| 2199 | mac_write_isr(vptr->mac_regs, isr_status); | ||
| 2200 | |||
| 2209 | if (likely(napi_schedule_prep(&vptr->napi))) { | 2201 | if (likely(napi_schedule_prep(&vptr->napi))) { |
| 2210 | mac_disable_int(vptr->mac_regs); | 2202 | mac_disable_int(vptr->mac_regs); |
| 2211 | __napi_schedule(&vptr->napi); | 2203 | __napi_schedule(&vptr->napi); |
| 2212 | } | 2204 | } |
| 2205 | |||
| 2206 | if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI))) | ||
| 2207 | velocity_error(vptr, isr_status); | ||
| 2208 | |||
| 2213 | spin_unlock(&vptr->lock); | 2209 | spin_unlock(&vptr->lock); |
| 2214 | 2210 | ||
| 2215 | return IRQ_HANDLED; | 2211 | return IRQ_HANDLED; |
| @@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev) | |||
| 3100 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); | 3096 | velocity_init_registers(vptr, VELOCITY_INIT_WOL); |
| 3101 | mac_disable_int(vptr->mac_regs); | 3097 | mac_disable_int(vptr->mac_regs); |
| 3102 | 3098 | ||
| 3103 | velocity_tx_srv(vptr, 0); | 3099 | velocity_tx_srv(vptr); |
| 3104 | 3100 | ||
| 3105 | for (i = 0; i < vptr->tx.numq; i++) { | 3101 | for (i = 0; i < vptr->tx.numq; i++) { |
| 3106 | if (vptr->tx.used[i]) | 3102 | if (vptr->tx.used[i]) |
| @@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3344 | { | 3340 | { |
| 3345 | struct velocity_info *vptr = netdev_priv(dev); | 3341 | struct velocity_info *vptr = netdev_priv(dev); |
| 3346 | int max_us = 0x3f * 64; | 3342 | int max_us = 0x3f * 64; |
| 3343 | unsigned long flags; | ||
| 3347 | 3344 | ||
| 3348 | /* 6 bits of */ | 3345 | /* 6 bits of */ |
| 3349 | if (ecmd->tx_coalesce_usecs > max_us) | 3346 | if (ecmd->tx_coalesce_usecs > max_us) |
| @@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3365 | ecmd->tx_coalesce_usecs); | 3362 | ecmd->tx_coalesce_usecs); |
| 3366 | 3363 | ||
| 3367 | /* Setup the interrupt suppression and queue timers */ | 3364 | /* Setup the interrupt suppression and queue timers */ |
| 3365 | spin_lock_irqsave(&vptr->lock, flags); | ||
| 3368 | mac_disable_int(vptr->mac_regs); | 3366 | mac_disable_int(vptr->mac_regs); |
| 3369 | setup_adaptive_interrupts(vptr); | 3367 | setup_adaptive_interrupts(vptr); |
| 3370 | setup_queue_timers(vptr); | 3368 | setup_queue_timers(vptr); |
| @@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev, | |||
| 3372 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); | 3370 | mac_write_int_mask(vptr->int_mask, vptr->mac_regs); |
| 3373 | mac_clear_isr(vptr->mac_regs); | 3371 | mac_clear_isr(vptr->mac_regs); |
| 3374 | mac_enable_int(vptr->mac_regs); | 3372 | mac_enable_int(vptr->mac_regs); |
| 3373 | spin_unlock_irqrestore(&vptr->lock, flags); | ||
| 3375 | 3374 | ||
| 3376 | return 0; | 3375 | return 0; |
| 3377 | } | 3376 | } |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fa12b9060b0b..29bf33692f71 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
| 1615 | bf->bf_frmlen -= padsize; | 1615 | bf->bf_frmlen -= padsize; |
| 1616 | } | 1616 | } |
| 1617 | 1617 | ||
| 1618 | if (conf_is_ht(&hw->conf) && !is_pae(skb)) | 1618 | if (conf_is_ht(&hw->conf)) |
| 1619 | bf->bf_state.bf_type |= BUF_HT; | 1619 | bf->bf_state.bf_type |= BUF_HT; |
| 1620 | 1620 | ||
| 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); | 1621 | bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); |
| @@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1701 | goto tx_done; | 1701 | goto tx_done; |
| 1702 | } | 1702 | } |
| 1703 | 1703 | ||
| 1704 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { | 1704 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { |
| 1705 | /* | 1705 | /* |
| 1706 | * Try aggregation if it's a unicast data frame | 1706 | * Try aggregation if it's a unicast data frame |
| 1707 | * and the destination is HT capable. | 1707 | * and the destination is HT capable. |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index fe3bf9491997..c484cc253892 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
| @@ -115,6 +115,7 @@ | |||
| 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ | 115 | #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ |
| 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ | 116 | #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ |
| 117 | #define B43_MMIO_RNG 0x65A | 117 | #define B43_MMIO_RNG 0x65A |
| 118 | #define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */ | ||
| 118 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ | 119 | #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ |
| 119 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 | 120 | #define B43_MMIO_IFSCTL_USE_EDCF 0x0004 |
| 120 | #define B43_MMIO_POWERUP_DELAY 0x6A8 | 121 | #define B43_MMIO_POWERUP_DELAY 0x6A8 |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 4c41cfe44f26..490fb45d1d05 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev) | |||
| 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) | 628 | static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) |
| 629 | { | 629 | { |
| 630 | /* slot_time is in usec. */ | 630 | /* slot_time is in usec. */ |
| 631 | if (dev->phy.type != B43_PHYTYPE_G) | 631 | /* This test used to exit for all but a G PHY. */ |
| 632 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | ||
| 632 | return; | 633 | return; |
| 633 | b43_write16(dev, 0x684, 510 + slot_time); | 634 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
| 634 | b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | 635 | /* Shared memory location 0x0010 is the slot time and should be |
| 636 | * set to slot_time; however, this register is initially 0 and changing | ||
| 637 | * the value adversely affects the transmit rate for BCM4311 | ||
| 638 | * devices. Until this behavior is unterstood, delete this step | ||
| 639 | * | ||
| 640 | * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); | ||
| 641 | */ | ||
| 635 | } | 642 | } |
| 636 | 643 | ||
| 637 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) | 644 | static void b43_short_slot_timing_enable(struct b43_wldev *dev) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5461f105bd2d..d10bea64fce3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -2744,6 +2744,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
| 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) | 2744 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) |
| 2745 | priv->staging_rxon.flags = 0; | 2745 | priv->staging_rxon.flags = 0; |
| 2746 | 2746 | ||
| 2747 | iwl_set_rxon_ht(priv, ht_conf); | ||
| 2747 | iwl_set_rxon_channel(priv, conf->channel); | 2748 | iwl_set_rxon_channel(priv, conf->channel); |
| 2748 | 2749 | ||
| 2749 | iwl_set_flags_for_band(priv, conf->channel->band); | 2750 | iwl_set_flags_for_band(priv, conf->channel->band); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 6f36b6e79f5e..2dbce85404aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
| @@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
| 928 | if (ieee80211_is_mgmt(fc) || | 928 | if (ieee80211_is_mgmt(fc) || |
| 929 | ieee80211_has_protected(fc) || | 929 | ieee80211_has_protected(fc) || |
| 930 | ieee80211_has_morefrags(fc) || | 930 | ieee80211_has_morefrags(fc) || |
| 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) | 931 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG || |
| 932 | (ieee80211_is_data_qos(fc) && | ||
| 933 | *ieee80211_get_qos_ctl(hdr) & | ||
| 934 | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)) | ||
| 932 | ret = skb_linearize(skb); | 935 | ret = skb_linearize(skb); |
| 933 | else | 936 | else |
| 934 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? | 937 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? |
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed7485175..f727b4a83196 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
| @@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, | |||
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); | 796 | bss->bss = kzalloc(bss_len, GFP_KERNEL); |
| 797 | if (!bss) { | 797 | if (!bss->bss) { |
| 798 | kfree(bss); | 798 | kfree(bss); |
| 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); | 799 | IWM_ERR(iwm, "Couldn't allocate bss\n"); |
| 800 | return -ENOMEM; | 800 | return -ENOMEM; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index bc5726dd5fe4..7ba3052b0708 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
| @@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
| 65 | /* Sitecom */ | 65 | /* Sitecom */ |
| 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, | 66 | {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, |
| 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, | 67 | {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, |
| 68 | {USB_DEVICE(0x0df6, 0x0029), .driver_info = DEVICE_RTL8187B}, | ||
| 68 | /* Sphairon Access Systems GmbH */ | 69 | /* Sphairon Access Systems GmbH */ |
| 69 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, | 70 | {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, |
| 70 | /* Dick Smith Electronics */ | 71 | /* Dick Smith Electronics */ |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 8e952fdab764..cb2fd01eddae 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
| @@ -720,12 +720,6 @@ static int acpiphp_bus_add(struct acpiphp_func *func) | |||
| 720 | -ret_val); | 720 | -ret_val); |
| 721 | goto acpiphp_bus_add_out; | 721 | goto acpiphp_bus_add_out; |
| 722 | } | 722 | } |
| 723 | /* | ||
| 724 | * try to start anyway. We could have failed to add | ||
| 725 | * simply because this bus had previously been added | ||
| 726 | * on another add. Don't bother with the return value | ||
| 727 | * we just keep going. | ||
| 728 | */ | ||
| 729 | ret_val = acpi_bus_start(device); | 723 | ret_val = acpi_bus_start(device); |
| 730 | 724 | ||
| 731 | acpiphp_bus_add_out: | 725 | acpiphp_bus_add_out: |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index e67e4feb35cb..eb603f1d55ca 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
| @@ -5771,7 +5771,7 @@ static void thermal_exit(void) | |||
| 5771 | case TPACPI_THERMAL_ACPI_TMP07: | 5771 | case TPACPI_THERMAL_ACPI_TMP07: |
| 5772 | case TPACPI_THERMAL_ACPI_UPDT: | 5772 | case TPACPI_THERMAL_ACPI_UPDT: |
| 5773 | sysfs_remove_group(&tpacpi_sensors_pdev->dev.kobj, | 5773 | sysfs_remove_group(&tpacpi_sensors_pdev->dev.kobj, |
| 5774 | &thermal_temp_input16_group); | 5774 | &thermal_temp_input8_group); |
| 5775 | break; | 5775 | break; |
| 5776 | case TPACPI_THERMAL_NONE: | 5776 | case TPACPI_THERMAL_NONE: |
| 5777 | default: | 5777 | default: |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index c3e37c8e7e26..e9b15c3746fa 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -83,6 +83,9 @@ static unsigned int skip_txen_test; /* force skip of txen test at init time */ | |||
| 83 | 83 | ||
| 84 | #define PASS_LIMIT 256 | 84 | #define PASS_LIMIT 256 |
| 85 | 85 | ||
| 86 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) | ||
| 87 | |||
| 88 | |||
| 86 | /* | 89 | /* |
| 87 | * We default to IRQ0 for the "no irq" hack. Some | 90 | * We default to IRQ0 for the "no irq" hack. Some |
| 88 | * machine types want others as well - they're free | 91 | * machine types want others as well - they're free |
| @@ -1792,7 +1795,7 @@ static unsigned int serial8250_tx_empty(struct uart_port *port) | |||
| 1792 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; | 1795 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; |
| 1793 | spin_unlock_irqrestore(&up->port.lock, flags); | 1796 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 1794 | 1797 | ||
| 1795 | return lsr & UART_LSR_TEMT ? TIOCSER_TEMT : 0; | 1798 | return (lsr & BOTH_EMPTY) == BOTH_EMPTY ? TIOCSER_TEMT : 0; |
| 1796 | } | 1799 | } |
| 1797 | 1800 | ||
| 1798 | static unsigned int serial8250_get_mctrl(struct uart_port *port) | 1801 | static unsigned int serial8250_get_mctrl(struct uart_port *port) |
| @@ -1850,8 +1853,6 @@ static void serial8250_break_ctl(struct uart_port *port, int break_state) | |||
| 1850 | spin_unlock_irqrestore(&up->port.lock, flags); | 1853 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 1851 | } | 1854 | } |
| 1852 | 1855 | ||
| 1853 | #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) | ||
| 1854 | |||
| 1855 | /* | 1856 | /* |
| 1856 | * Wait for transmitter & holding register to empty | 1857 | * Wait for transmitter & holding register to empty |
| 1857 | */ | 1858 | */ |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 5681ebed9c65..03dfd27c4bfb 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
| @@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
| 494 | #endif | 494 | #endif |
| 495 | break; | 495 | break; |
| 496 | case SSB_BUSTYPE_SDIO: | 496 | case SSB_BUSTYPE_SDIO: |
| 497 | #ifdef CONFIG_SSB_SDIO | 497 | #ifdef CONFIG_SSB_SDIOHOST |
| 498 | sdev->irq = bus->host_sdio->dev.irq; | ||
| 499 | dev->parent = &bus->host_sdio->dev; | 498 | dev->parent = &bus->host_sdio->dev; |
| 500 | #endif | 499 | #endif |
| 501 | break; | 500 | break; |
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 6e8bcdfd23b4..a678186f218f 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
| @@ -1312,9 +1312,9 @@ static int processcompl(struct async *as, void __user * __user *arg) | |||
| 1312 | void __user *addr = as->userurb; | 1312 | void __user *addr = as->userurb; |
| 1313 | unsigned int i; | 1313 | unsigned int i; |
| 1314 | 1314 | ||
| 1315 | if (as->userbuffer) | 1315 | if (as->userbuffer && urb->actual_length) |
| 1316 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, | 1316 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, |
| 1317 | urb->transfer_buffer_length)) | 1317 | urb->actual_length)) |
| 1318 | goto err_out; | 1318 | goto err_out; |
| 1319 | if (put_user(as->status, &userurb->status)) | 1319 | if (put_user(as->status, &userurb->status)) |
| 1320 | goto err_out; | 1320 | goto err_out; |
| @@ -1334,14 +1334,11 @@ static int processcompl(struct async *as, void __user * __user *arg) | |||
| 1334 | } | 1334 | } |
| 1335 | } | 1335 | } |
| 1336 | 1336 | ||
| 1337 | free_async(as); | ||
| 1338 | |||
| 1339 | if (put_user(addr, (void __user * __user *)arg)) | 1337 | if (put_user(addr, (void __user * __user *)arg)) |
| 1340 | return -EFAULT; | 1338 | return -EFAULT; |
| 1341 | return 0; | 1339 | return 0; |
| 1342 | 1340 | ||
| 1343 | err_out: | 1341 | err_out: |
| 1344 | free_async(as); | ||
| 1345 | return -EFAULT; | 1342 | return -EFAULT; |
| 1346 | } | 1343 | } |
| 1347 | 1344 | ||
| @@ -1371,8 +1368,11 @@ static struct async *reap_as(struct dev_state *ps) | |||
| 1371 | static int proc_reapurb(struct dev_state *ps, void __user *arg) | 1368 | static int proc_reapurb(struct dev_state *ps, void __user *arg) |
| 1372 | { | 1369 | { |
| 1373 | struct async *as = reap_as(ps); | 1370 | struct async *as = reap_as(ps); |
| 1374 | if (as) | 1371 | if (as) { |
| 1375 | return processcompl(as, (void __user * __user *)arg); | 1372 | int retval = processcompl(as, (void __user * __user *)arg); |
| 1373 | free_async(as); | ||
| 1374 | return retval; | ||
| 1375 | } | ||
| 1376 | if (signal_pending(current)) | 1376 | if (signal_pending(current)) |
| 1377 | return -EINTR; | 1377 | return -EINTR; |
| 1378 | return -EIO; | 1378 | return -EIO; |
| @@ -1380,11 +1380,16 @@ static int proc_reapurb(struct dev_state *ps, void __user *arg) | |||
| 1380 | 1380 | ||
| 1381 | static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg) | 1381 | static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg) |
| 1382 | { | 1382 | { |
| 1383 | int retval; | ||
| 1383 | struct async *as; | 1384 | struct async *as; |
| 1384 | 1385 | ||
| 1385 | if (!(as = async_getcompleted(ps))) | 1386 | as = async_getcompleted(ps); |
| 1386 | return -EAGAIN; | 1387 | retval = -EAGAIN; |
| 1387 | return processcompl(as, (void __user * __user *)arg); | 1388 | if (as) { |
| 1389 | retval = processcompl(as, (void __user * __user *)arg); | ||
| 1390 | free_async(as); | ||
| 1391 | } | ||
| 1392 | return retval; | ||
| 1388 | } | 1393 | } |
| 1389 | 1394 | ||
| 1390 | #ifdef CONFIG_COMPAT | 1395 | #ifdef CONFIG_COMPAT |
| @@ -1475,9 +1480,9 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1475 | void __user *addr = as->userurb; | 1480 | void __user *addr = as->userurb; |
| 1476 | unsigned int i; | 1481 | unsigned int i; |
| 1477 | 1482 | ||
| 1478 | if (as->userbuffer) | 1483 | if (as->userbuffer && urb->actual_length) |
| 1479 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, | 1484 | if (copy_to_user(as->userbuffer, urb->transfer_buffer, |
| 1480 | urb->transfer_buffer_length)) | 1485 | urb->actual_length)) |
| 1481 | return -EFAULT; | 1486 | return -EFAULT; |
| 1482 | if (put_user(as->status, &userurb->status)) | 1487 | if (put_user(as->status, &userurb->status)) |
| 1483 | return -EFAULT; | 1488 | return -EFAULT; |
| @@ -1497,7 +1502,6 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1497 | } | 1502 | } |
| 1498 | } | 1503 | } |
| 1499 | 1504 | ||
| 1500 | free_async(as); | ||
| 1501 | if (put_user(ptr_to_compat(addr), (u32 __user *)arg)) | 1505 | if (put_user(ptr_to_compat(addr), (u32 __user *)arg)) |
| 1502 | return -EFAULT; | 1506 | return -EFAULT; |
| 1503 | return 0; | 1507 | return 0; |
| @@ -1506,8 +1510,11 @@ static int processcompl_compat(struct async *as, void __user * __user *arg) | |||
| 1506 | static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) | 1510 | static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) |
| 1507 | { | 1511 | { |
| 1508 | struct async *as = reap_as(ps); | 1512 | struct async *as = reap_as(ps); |
| 1509 | if (as) | 1513 | if (as) { |
| 1510 | return processcompl_compat(as, (void __user * __user *)arg); | 1514 | int retval = processcompl_compat(as, (void __user * __user *)arg); |
| 1515 | free_async(as); | ||
| 1516 | return retval; | ||
| 1517 | } | ||
| 1511 | if (signal_pending(current)) | 1518 | if (signal_pending(current)) |
| 1512 | return -EINTR; | 1519 | return -EINTR; |
| 1513 | return -EIO; | 1520 | return -EIO; |
| @@ -1515,11 +1522,16 @@ static int proc_reapurb_compat(struct dev_state *ps, void __user *arg) | |||
| 1515 | 1522 | ||
| 1516 | static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) | 1523 | static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg) |
| 1517 | { | 1524 | { |
| 1525 | int retval; | ||
| 1518 | struct async *as; | 1526 | struct async *as; |
| 1519 | 1527 | ||
| 1520 | if (!(as = async_getcompleted(ps))) | 1528 | retval = -EAGAIN; |
| 1521 | return -EAGAIN; | 1529 | as = async_getcompleted(ps); |
| 1522 | return processcompl_compat(as, (void __user * __user *)arg); | 1530 | if (as) { |
| 1531 | retval = processcompl_compat(as, (void __user * __user *)arg); | ||
| 1532 | free_async(as); | ||
| 1533 | } | ||
| 1534 | return retval; | ||
| 1523 | } | 1535 | } |
| 1524 | 1536 | ||
| 1525 | 1537 | ||
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index 0a577d5694fd..d4f0db58a8ad 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
| @@ -358,7 +358,7 @@ done: | |||
| 358 | * b15: bmType (0 == data) | 358 | * b15: bmType (0 == data) |
| 359 | */ | 359 | */ |
| 360 | len = skb->len; | 360 | len = skb->len; |
| 361 | put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(skb, 2)); | 361 | put_unaligned_le16(len & 0x3FFF, skb_push(skb, 2)); |
| 362 | 362 | ||
| 363 | /* add a zero-length EEM packet, if needed */ | 363 | /* add a zero-length EEM packet, if needed */ |
| 364 | if (padlen) | 364 | if (padlen) |
| @@ -464,7 +464,6 @@ static int eem_unwrap(struct gether *port, | |||
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | /* validate CRC */ | 466 | /* validate CRC */ |
| 467 | crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN); | ||
| 468 | if (header & BIT(14)) { | 467 | if (header & BIT(14)) { |
| 469 | crc = get_unaligned_le32(skb->data + len | 468 | crc = get_unaligned_le32(skb->data + len |
| 470 | - ETH_FCS_LEN); | 469 | - ETH_FCS_LEN); |
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 429560100b10..76496f5d272c 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | #if defined USB_ETH_RNDIS | 29 | #if defined USB_ETH_RNDIS |
| 30 | # undef USB_ETH_RNDIS | 30 | # undef USB_ETH_RNDIS |
| 31 | #endif | 31 | #endif |
| 32 | #ifdef CONFIG_USB_ETH_RNDIS | 32 | #ifdef CONFIG_USB_G_MULTI_RNDIS |
| 33 | # define USB_ETH_RNDIS y | 33 | # define USB_ETH_RNDIS y |
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index e220fb8091a3..8b45145b9136 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
| 27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
| 28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
| 29 | #include <linux/err.h> | ||
| 29 | 30 | ||
| 30 | #include <linux/usb/ch9.h> | 31 | #include <linux/usb/ch9.h> |
| 31 | #include <linux/usb/gadget.h> | 32 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 4b5dbd0127f5..5fc80a104150 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
| @@ -2582,6 +2582,7 @@ err: | |||
| 2582 | hsotg->gadget.dev.driver = NULL; | 2582 | hsotg->gadget.dev.driver = NULL; |
| 2583 | return ret; | 2583 | return ret; |
| 2584 | } | 2584 | } |
| 2585 | EXPORT_SYMBOL(usb_gadget_register_driver); | ||
| 2585 | 2586 | ||
| 2586 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) | 2587 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) |
| 2587 | { | 2588 | { |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index c75d9270c752..19372673bf09 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
| @@ -196,7 +196,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) | |||
| 196 | if (hostpc_reg) { | 196 | if (hostpc_reg) { |
| 197 | u32 t3; | 197 | u32 t3; |
| 198 | 198 | ||
| 199 | spin_unlock_irq(&ehci->lock); | ||
| 199 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 200 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 201 | spin_lock_irq(&ehci->lock); | ||
| 200 | t3 = ehci_readl(ehci, hostpc_reg); | 202 | t3 = ehci_readl(ehci, hostpc_reg); |
| 201 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); | 203 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); |
| 202 | t3 = ehci_readl(ehci, hostpc_reg); | 204 | t3 = ehci_readl(ehci, hostpc_reg); |
| @@ -904,17 +906,18 @@ static int ehci_hub_control ( | |||
| 904 | if ((temp & PORT_PE) == 0 | 906 | if ((temp & PORT_PE) == 0 |
| 905 | || (temp & PORT_RESET) != 0) | 907 | || (temp & PORT_RESET) != 0) |
| 906 | goto error; | 908 | goto error; |
| 907 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | 909 | |
| 908 | /* After above check the port must be connected. | 910 | /* After above check the port must be connected. |
| 909 | * Set appropriate bit thus could put phy into low power | 911 | * Set appropriate bit thus could put phy into low power |
| 910 | * mode if we have hostpc feature | 912 | * mode if we have hostpc feature |
| 911 | */ | 913 | */ |
| 914 | temp &= ~PORT_WKCONN_E; | ||
| 915 | temp |= PORT_WKDISC_E | PORT_WKOC_E; | ||
| 916 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | ||
| 912 | if (hostpc_reg) { | 917 | if (hostpc_reg) { |
| 913 | temp &= ~PORT_WKCONN_E; | 918 | spin_unlock_irqrestore(&ehci->lock, flags); |
| 914 | temp |= (PORT_WKDISC_E | PORT_WKOC_E); | ||
| 915 | ehci_writel(ehci, temp | PORT_SUSPEND, | ||
| 916 | status_reg); | ||
| 917 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 919 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 920 | spin_lock_irqsave(&ehci->lock, flags); | ||
| 918 | temp1 = ehci_readl(ehci, hostpc_reg); | 921 | temp1 = ehci_readl(ehci, hostpc_reg); |
| 919 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, | 922 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, |
| 920 | hostpc_reg); | 923 | hostpc_reg); |
diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index d224ab467a40..e1232890c78b 100644 --- a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c | |||
| @@ -105,7 +105,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 105 | if (ep->td_base) | 105 | if (ep->td_base) |
| 106 | cpm_muram_free(cpm_muram_offset(ep->td_base)); | 106 | cpm_muram_free(cpm_muram_offset(ep->td_base)); |
| 107 | 107 | ||
| 108 | if (ep->conf_frame_Q) { | 108 | if (kfifo_initialized(&ep->conf_frame_Q)) { |
| 109 | size = cq_howmany(&ep->conf_frame_Q); | 109 | size = cq_howmany(&ep->conf_frame_Q); |
| 110 | for (; size; size--) { | 110 | for (; size; size--) { |
| 111 | struct packet *pkt = cq_get(&ep->conf_frame_Q); | 111 | struct packet *pkt = cq_get(&ep->conf_frame_Q); |
| @@ -115,7 +115,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 115 | cq_delete(&ep->conf_frame_Q); | 115 | cq_delete(&ep->conf_frame_Q); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | if (ep->empty_frame_Q) { | 118 | if (kfifo_initialized(&ep->empty_frame_Q)) { |
| 119 | size = cq_howmany(&ep->empty_frame_Q); | 119 | size = cq_howmany(&ep->empty_frame_Q); |
| 120 | for (; size; size--) { | 120 | for (; size; size--) { |
| 121 | struct packet *pkt = cq_get(&ep->empty_frame_Q); | 121 | struct packet *pkt = cq_get(&ep->empty_frame_Q); |
| @@ -125,7 +125,7 @@ void fhci_ep0_free(struct fhci_usb *usb) | |||
| 125 | cq_delete(&ep->empty_frame_Q); | 125 | cq_delete(&ep->empty_frame_Q); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | if (ep->dummy_packets_Q) { | 128 | if (kfifo_initialized(&ep->dummy_packets_Q)) { |
| 129 | size = cq_howmany(&ep->dummy_packets_Q); | 129 | size = cq_howmany(&ep->dummy_packets_Q); |
| 130 | for (; size; size--) { | 130 | for (; size; size--) { |
| 131 | u8 *buff = cq_get(&ep->dummy_packets_Q); | 131 | u8 *buff = cq_get(&ep->dummy_packets_Q); |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 0025847743f3..8b37a4b9839e 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
| @@ -3245,6 +3245,7 @@ static struct usb_device_id sisusb_table [] = { | |||
| 3245 | { USB_DEVICE(0x0711, 0x0902) }, | 3245 | { USB_DEVICE(0x0711, 0x0902) }, |
| 3246 | { USB_DEVICE(0x0711, 0x0903) }, | 3246 | { USB_DEVICE(0x0711, 0x0903) }, |
| 3247 | { USB_DEVICE(0x0711, 0x0918) }, | 3247 | { USB_DEVICE(0x0711, 0x0918) }, |
| 3248 | { USB_DEVICE(0x0711, 0x0920) }, | ||
| 3248 | { USB_DEVICE(0x182d, 0x021c) }, | 3249 | { USB_DEVICE(0x182d, 0x021c) }, |
| 3249 | { USB_DEVICE(0x182d, 0x0269) }, | 3250 | { USB_DEVICE(0x182d, 0x0269) }, |
| 3250 | { } | 3251 | { } |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index de56b3d743d7..3d2d3e549bd1 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
| @@ -44,6 +44,7 @@ config ISP1301_OMAP | |||
| 44 | config USB_ULPI | 44 | config USB_ULPI |
| 45 | bool "Generic ULPI Transceiver Driver" | 45 | bool "Generic ULPI Transceiver Driver" |
| 46 | depends on ARM | 46 | depends on ARM |
| 47 | select USB_OTG_UTILS | ||
| 47 | help | 48 | help |
| 48 | Enable this to support ULPI connected USB OTG transceivers which | 49 | Enable this to support ULPI connected USB OTG transceivers which |
| 49 | are likely found on embedded boards. | 50 | are likely found on embedded boards. |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 216f187582ab..7638828e7317 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
| @@ -50,7 +50,7 @@ | |||
| 50 | * Version Information | 50 | * Version Information |
| 51 | */ | 51 | */ |
| 52 | #define DRIVER_VERSION "v1.5.0" | 52 | #define DRIVER_VERSION "v1.5.0" |
| 53 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>" | 53 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com>, Bill Ryder <bryder@sgi.com>, Kuba Ober <kuba@mareimbrium.org>, Andreas Mohr" |
| 54 | #define DRIVER_DESC "USB FTDI Serial Converters Driver" | 54 | #define DRIVER_DESC "USB FTDI Serial Converters Driver" |
| 55 | 55 | ||
| 56 | static int debug; | 56 | static int debug; |
| @@ -145,10 +145,15 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
| 145 | 145 | ||
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | /* | ||
| 149 | * Device ID not listed? Test via module params product/vendor or | ||
| 150 | * /sys/bus/usb/ftdi_sio/new_id, then send patch/report! | ||
| 151 | */ | ||
| 148 | static struct usb_device_id id_table_combined [] = { | 152 | static struct usb_device_id id_table_combined [] = { |
| 149 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, | 153 | { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) }, |
| 150 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, | 154 | { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) }, |
| 151 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, | 155 | { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) }, |
| 156 | { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) }, | ||
| 152 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, | 157 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) }, |
| 153 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, | 158 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) }, |
| 154 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, | 159 | { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) }, |
| @@ -552,9 +557,16 @@ static struct usb_device_id id_table_combined [] = { | |||
| 552 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) }, | 557 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) }, |
| 553 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) }, | 558 | { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) }, |
| 554 | /* | 559 | /* |
| 555 | * Due to many user requests for multiple ELV devices we enable | 560 | * ELV devices: |
| 556 | * them by default. | ||
| 557 | */ | 561 | */ |
| 562 | { USB_DEVICE(FTDI_VID, FTDI_ELV_USR_PID) }, | ||
| 563 | { USB_DEVICE(FTDI_VID, FTDI_ELV_MSM1_PID) }, | ||
| 564 | { USB_DEVICE(FTDI_VID, FTDI_ELV_KL100_PID) }, | ||
| 565 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS550_PID) }, | ||
| 566 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EC3000_PID) }, | ||
| 567 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS888_PID) }, | ||
| 568 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TWS550_PID) }, | ||
| 569 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FEM_PID) }, | ||
| 558 | { USB_DEVICE(FTDI_VID, FTDI_ELV_CLI7000_PID) }, | 570 | { USB_DEVICE(FTDI_VID, FTDI_ELV_CLI7000_PID) }, |
| 559 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PPS7330_PID) }, | 571 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PPS7330_PID) }, |
| 560 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFM100_PID) }, | 572 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFM100_PID) }, |
| @@ -571,11 +583,17 @@ static struct usb_device_id id_table_combined [] = { | |||
| 571 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, | 583 | { USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) }, |
| 572 | { USB_DEVICE(FTDI_VID, FTDI_ELV_RFP500_PID) }, | 584 | { USB_DEVICE(FTDI_VID, FTDI_ELV_RFP500_PID) }, |
| 573 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, | 585 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) }, |
| 586 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UTP8_PID) }, | ||
| 574 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, | 587 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) }, |
| 588 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS444PC_PID) }, | ||
| 575 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, | 589 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) }, |
| 576 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, | 590 | { USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) }, |
| 577 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, | 591 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) }, |
| 578 | { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, | 592 | { USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) }, |
| 593 | { USB_DEVICE(FTDI_VID, FTDI_ELV_UMS100_PID) }, | ||
| 594 | { USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) }, | ||
| 595 | { USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) }, | ||
| 596 | { USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) }, | ||
| 579 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, | 597 | { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, |
| 580 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, | 598 | { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, |
| 581 | { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) }, | 599 | { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) }, |
| @@ -697,6 +715,7 @@ static struct usb_device_id id_table_combined [] = { | |||
| 697 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, | 715 | { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) }, |
| 698 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, | 716 | { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) }, |
| 699 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, | 717 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
| 718 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) }, | ||
| 700 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, | 719 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
| 701 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, | 720 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
| 702 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, | 721 | { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index da92b4952ffb..c8951aeed983 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | /* www.candapter.com Ewert Energy Systems CANdapter device */ | 38 | /* www.candapter.com Ewert Energy Systems CANdapter device */ |
| 39 | #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ | 39 | #define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */ |
| 40 | 40 | ||
| 41 | #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */ | ||
| 42 | |||
| 41 | /* OOCDlink by Joern Kaipf <joernk@web.de> | 43 | /* OOCDlink by Joern Kaipf <joernk@web.de> |
| 42 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ | 44 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ |
| 43 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | 45 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ |
| @@ -161,22 +163,37 @@ | |||
| 161 | /* | 163 | /* |
| 162 | * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). | 164 | * ELV USB devices submitted by Christian Abt of ELV (www.elv.de). |
| 163 | * All of these devices use FTDI's vendor ID (0x0403). | 165 | * All of these devices use FTDI's vendor ID (0x0403). |
| 166 | * Further IDs taken from ELV Windows .inf file. | ||
| 164 | * | 167 | * |
| 165 | * The previously included PID for the UO 100 module was incorrect. | 168 | * The previously included PID for the UO 100 module was incorrect. |
| 166 | * In fact, that PID was for ELV's UR 100 USB-RS232 converter (0xFB58). | 169 | * In fact, that PID was for ELV's UR 100 USB-RS232 converter (0xFB58). |
| 167 | * | 170 | * |
| 168 | * Armin Laeuger originally sent the PID for the UM 100 module. | 171 | * Armin Laeuger originally sent the PID for the UM 100 module. |
| 169 | */ | 172 | */ |
| 173 | #define FTDI_ELV_USR_PID 0xE000 /* ELV Universal-Sound-Recorder */ | ||
| 174 | #define FTDI_ELV_MSM1_PID 0xE001 /* ELV Mini-Sound-Modul */ | ||
| 175 | #define FTDI_ELV_KL100_PID 0xE002 /* ELV Kfz-Leistungsmesser KL 100 */ | ||
| 176 | #define FTDI_ELV_WS550_PID 0xE004 /* WS 550 */ | ||
| 177 | #define FTDI_ELV_EC3000_PID 0xE006 /* ENERGY CONTROL 3000 USB */ | ||
| 178 | #define FTDI_ELV_WS888_PID 0xE008 /* WS 888 */ | ||
| 179 | #define FTDI_ELV_TWS550_PID 0xE009 /* Technoline WS 550 */ | ||
| 180 | #define FTDI_ELV_FEM_PID 0xE00A /* Funk Energie Monitor */ | ||
| 170 | #define FTDI_ELV_FHZ1300PC_PID 0xE0E8 /* FHZ 1300 PC */ | 181 | #define FTDI_ELV_FHZ1300PC_PID 0xE0E8 /* FHZ 1300 PC */ |
| 171 | #define FTDI_ELV_WS500_PID 0xE0E9 /* PC-Wetterstation (WS 500) */ | 182 | #define FTDI_ELV_WS500_PID 0xE0E9 /* PC-Wetterstation (WS 500) */ |
| 172 | #define FTDI_ELV_HS485_PID 0xE0EA /* USB to RS-485 adapter */ | 183 | #define FTDI_ELV_HS485_PID 0xE0EA /* USB to RS-485 adapter */ |
| 184 | #define FTDI_ELV_UMS100_PID 0xE0EB /* ELV USB Master-Slave Schaltsteckdose UMS 100 */ | ||
| 185 | #define FTDI_ELV_TFD128_PID 0xE0EC /* ELV Temperatur-Feuchte-Datenlogger TFD 128 */ | ||
| 186 | #define FTDI_ELV_FM3RX_PID 0xE0ED /* ELV Messwertuebertragung FM3 RX */ | ||
| 187 | #define FTDI_ELV_WS777_PID 0xE0EE /* Conrad WS 777 */ | ||
| 173 | #define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */ | 188 | #define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */ |
| 174 | #define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */ | 189 | #define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */ |
| 175 | #define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */ | 190 | #define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */ |
| 176 | #define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */ | 191 | #define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */ |
| 177 | #define FTDI_ELV_RFP500_PID 0xE0F3 /* HF-Leistungsmesser (RFP 500) */ | 192 | #define FTDI_ELV_RFP500_PID 0xE0F3 /* HF-Leistungsmesser (RFP 500) */ |
| 178 | #define FTDI_ELV_FS20SIG_PID 0xE0F4 /* Signalgeber (FS 20 SIG) */ | 193 | #define FTDI_ELV_FS20SIG_PID 0xE0F4 /* Signalgeber (FS 20 SIG) */ |
| 194 | #define FTDI_ELV_UTP8_PID 0xE0F5 /* ELV UTP 8 */ | ||
| 179 | #define FTDI_ELV_WS300PC_PID 0xE0F6 /* PC-Wetterstation (WS 300 PC) */ | 195 | #define FTDI_ELV_WS300PC_PID 0xE0F6 /* PC-Wetterstation (WS 300 PC) */ |
| 196 | #define FTDI_ELV_WS444PC_PID 0xE0F7 /* Conrad WS 444 PC */ | ||
| 180 | #define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */ | 197 | #define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */ |
| 181 | #define FTDI_ELV_UAD8_PID 0xF068 /* USB-AD-Wandler (UAD 8) */ | 198 | #define FTDI_ELV_UAD8_PID 0xF068 /* USB-AD-Wandler (UAD 8) */ |
| 182 | #define FTDI_ELV_UDA7_PID 0xF069 /* USB-DA-Wandler (UDA 7) */ | 199 | #define FTDI_ELV_UDA7_PID 0xF069 /* USB-DA-Wandler (UDA 7) */ |
| @@ -968,6 +985,7 @@ | |||
| 968 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ | 985 | #define PAPOUCH_VID 0x5050 /* Vendor ID */ |
| 969 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ | 986 | #define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */ |
| 970 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */ | 987 | #define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */ |
| 988 | #define PAPOUCH_AD4USB_PID 0x8003 /* AD4USB Measurement Module */ | ||
| 971 | 989 | ||
| 972 | /* | 990 | /* |
| 973 | * Marvell SheevaPlug | 991 | * Marvell SheevaPlug |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index ac1b6449fb6a..3eb6143bb646 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
| @@ -298,6 +298,7 @@ static struct usb_device_id id_table [] = { | |||
| 298 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ | 298 | { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ |
| 299 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist | 299 | .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist |
| 300 | }, | 300 | }, |
| 301 | { USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */ | ||
| 301 | 302 | ||
| 302 | { } | 303 | { } |
| 303 | }; | 304 | }; |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index c932f9053188..49575fba3756 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
| @@ -941,7 +941,7 @@ UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0000, 0x9999, | |||
| 941 | UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, | 941 | UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133, |
| 942 | "Microtech", | 942 | "Microtech", |
| 943 | "USB-SCSI-DB25", | 943 | "USB-SCSI-DB25", |
| 944 | US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init, | 944 | US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init, |
| 945 | US_FL_SCM_MULT_TARG ), | 945 | US_FL_SCM_MULT_TARG ), |
| 946 | 946 | ||
| 947 | UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, | 947 | UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100, |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 9d0809629967..6ed434ac037f 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
| @@ -720,13 +720,15 @@ again: | |||
| 720 | inode->i_ino, orig_offset); | 720 | inode->i_ino, orig_offset); |
| 721 | BUG_ON(ret); | 721 | BUG_ON(ret); |
| 722 | } | 722 | } |
| 723 | fi = btrfs_item_ptr(leaf, path->slots[0], | ||
| 724 | struct btrfs_file_extent_item); | ||
| 725 | if (del_nr == 0) { | 723 | if (del_nr == 0) { |
| 724 | fi = btrfs_item_ptr(leaf, path->slots[0], | ||
| 725 | struct btrfs_file_extent_item); | ||
| 726 | btrfs_set_file_extent_type(leaf, fi, | 726 | btrfs_set_file_extent_type(leaf, fi, |
| 727 | BTRFS_FILE_EXTENT_REG); | 727 | BTRFS_FILE_EXTENT_REG); |
| 728 | btrfs_mark_buffer_dirty(leaf); | 728 | btrfs_mark_buffer_dirty(leaf); |
| 729 | } else { | 729 | } else { |
| 730 | fi = btrfs_item_ptr(leaf, del_slot - 1, | ||
| 731 | struct btrfs_file_extent_item); | ||
| 730 | btrfs_set_file_extent_type(leaf, fi, | 732 | btrfs_set_file_extent_type(leaf, fi, |
| 731 | BTRFS_FILE_EXTENT_REG); | 733 | BTRFS_FILE_EXTENT_REG); |
| 732 | btrfs_set_file_extent_num_bytes(leaf, fi, | 734 | btrfs_set_file_extent_num_bytes(leaf, fi, |
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index e1d415e97849..0d289823e856 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
| @@ -342,6 +342,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_direct_req *dreq, | |||
| 342 | data->res.fattr = &data->fattr; | 342 | data->res.fattr = &data->fattr; |
| 343 | data->res.eof = 0; | 343 | data->res.eof = 0; |
| 344 | data->res.count = bytes; | 344 | data->res.count = bytes; |
| 345 | nfs_fattr_init(&data->fattr); | ||
| 345 | msg.rpc_argp = &data->args; | 346 | msg.rpc_argp = &data->args; |
| 346 | msg.rpc_resp = &data->res; | 347 | msg.rpc_resp = &data->res; |
| 347 | 348 | ||
| @@ -575,6 +576,7 @@ static void nfs_direct_commit_schedule(struct nfs_direct_req *dreq) | |||
| 575 | data->res.count = 0; | 576 | data->res.count = 0; |
| 576 | data->res.fattr = &data->fattr; | 577 | data->res.fattr = &data->fattr; |
| 577 | data->res.verf = &data->verf; | 578 | data->res.verf = &data->verf; |
| 579 | nfs_fattr_init(&data->fattr); | ||
| 578 | 580 | ||
| 579 | NFS_PROTO(data->inode)->commit_setup(data, &msg); | 581 | NFS_PROTO(data->inode)->commit_setup(data, &msg); |
| 580 | 582 | ||
| @@ -766,6 +768,7 @@ static ssize_t nfs_direct_write_schedule_segment(struct nfs_direct_req *dreq, | |||
| 766 | data->res.fattr = &data->fattr; | 768 | data->res.fattr = &data->fattr; |
| 767 | data->res.count = bytes; | 769 | data->res.count = bytes; |
| 768 | data->res.verf = &data->verf; | 770 | data->res.verf = &data->verf; |
| 771 | nfs_fattr_init(&data->fattr); | ||
| 769 | 772 | ||
| 770 | task_setup_data.task = &data->task; | 773 | task_setup_data.task = &data->task; |
| 771 | task_setup_data.callback_data = data; | 774 | task_setup_data.callback_data = data; |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 9087b10209e6..2df0f5c7c60b 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
| @@ -1497,9 +1497,11 @@ struct inode *reiserfs_iget(struct super_block *s, const struct cpu_key *key) | |||
| 1497 | 1497 | ||
| 1498 | args.objectid = key->on_disk_key.k_objectid; | 1498 | args.objectid = key->on_disk_key.k_objectid; |
| 1499 | args.dirid = key->on_disk_key.k_dir_id; | 1499 | args.dirid = key->on_disk_key.k_dir_id; |
| 1500 | reiserfs_write_unlock(s); | ||
| 1500 | inode = iget5_locked(s, key->on_disk_key.k_objectid, | 1501 | inode = iget5_locked(s, key->on_disk_key.k_objectid, |
| 1501 | reiserfs_find_actor, reiserfs_init_locked_inode, | 1502 | reiserfs_find_actor, reiserfs_init_locked_inode, |
| 1502 | (void *)(&args)); | 1503 | (void *)(&args)); |
| 1504 | reiserfs_write_lock(s); | ||
| 1503 | if (!inode) | 1505 | if (!inode) |
| 1504 | return ERR_PTR(-ENOMEM); | 1506 | return ERR_PTR(-ENOMEM); |
| 1505 | 1507 | ||
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 220b758523ae..6a06a1d1ea7b 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
| @@ -81,24 +81,23 @@ int sysfs_sd_setattr(struct sysfs_dirent *sd, struct iattr * iattr) | |||
| 81 | if (!sd_attrs) | 81 | if (!sd_attrs) |
| 82 | return -ENOMEM; | 82 | return -ENOMEM; |
| 83 | sd->s_iattr = sd_attrs; | 83 | sd->s_iattr = sd_attrs; |
| 84 | } else { | 84 | } |
| 85 | /* attributes were changed at least once in past */ | 85 | /* attributes were changed at least once in past */ |
| 86 | iattrs = &sd_attrs->ia_iattr; | 86 | iattrs = &sd_attrs->ia_iattr; |
| 87 | 87 | ||
| 88 | if (ia_valid & ATTR_UID) | 88 | if (ia_valid & ATTR_UID) |
| 89 | iattrs->ia_uid = iattr->ia_uid; | 89 | iattrs->ia_uid = iattr->ia_uid; |
| 90 | if (ia_valid & ATTR_GID) | 90 | if (ia_valid & ATTR_GID) |
| 91 | iattrs->ia_gid = iattr->ia_gid; | 91 | iattrs->ia_gid = iattr->ia_gid; |
| 92 | if (ia_valid & ATTR_ATIME) | 92 | if (ia_valid & ATTR_ATIME) |
| 93 | iattrs->ia_atime = iattr->ia_atime; | 93 | iattrs->ia_atime = iattr->ia_atime; |
| 94 | if (ia_valid & ATTR_MTIME) | 94 | if (ia_valid & ATTR_MTIME) |
| 95 | iattrs->ia_mtime = iattr->ia_mtime; | 95 | iattrs->ia_mtime = iattr->ia_mtime; |
| 96 | if (ia_valid & ATTR_CTIME) | 96 | if (ia_valid & ATTR_CTIME) |
| 97 | iattrs->ia_ctime = iattr->ia_ctime; | 97 | iattrs->ia_ctime = iattr->ia_ctime; |
| 98 | if (ia_valid & ATTR_MODE) { | 98 | if (ia_valid & ATTR_MODE) { |
| 99 | umode_t mode = iattr->ia_mode; | 99 | umode_t mode = iattr->ia_mode; |
| 100 | iattrs->ia_mode = sd->s_mode = mode; | 100 | iattrs->ia_mode = sd->s_mode = mode; |
| 101 | } | ||
| 102 | } | 101 | } |
| 103 | return 0; | 102 | return 0; |
| 104 | } | 103 | } |
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 070ba0621738..5977b724f7c6 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -44,7 +44,7 @@ static inline int hw_breakpoint_type(struct perf_event *bp) | |||
| 44 | return bp->attr.bp_type; | 44 | return bp->attr.bp_type; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static inline int hw_breakpoint_len(struct perf_event *bp) | 47 | static inline unsigned long hw_breakpoint_len(struct perf_event *bp) |
| 48 | { | 48 | { |
| 49 | return bp->attr.bp_len; | 49 | return bp->attr.bp_len; |
| 50 | } | 50 | } |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 6f6c5f300af6..bc0fc795bd35 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, | |||
| 124 | */ | 124 | */ |
| 125 | static inline bool kfifo_initialized(struct kfifo *fifo) | 125 | static inline bool kfifo_initialized(struct kfifo *fifo) |
| 126 | { | 126 | { |
| 127 | return fifo->buffer != 0; | 127 | return fifo->buffer != NULL; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | /** | 130 | /** |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 8fa71874113f..a177698d95e2 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -211,11 +211,9 @@ struct perf_event_attr { | |||
| 211 | __u32 wakeup_watermark; /* bytes before wakeup */ | 211 | __u32 wakeup_watermark; /* bytes before wakeup */ |
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | __u32 __reserved_2; | ||
| 215 | |||
| 216 | __u64 bp_addr; | ||
| 217 | __u32 bp_type; | 214 | __u32 bp_type; |
| 218 | __u32 bp_len; | 215 | __u64 bp_addr; |
| 216 | __u64 bp_len; | ||
| 219 | }; | 217 | }; |
| 220 | 218 | ||
| 221 | /* | 219 | /* |
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index 8a5c7d55ac9f..967e66143e11 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c | |||
| @@ -360,8 +360,8 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint); | |||
| 360 | int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) | 360 | int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr) |
| 361 | { | 361 | { |
| 362 | u64 old_addr = bp->attr.bp_addr; | 362 | u64 old_addr = bp->attr.bp_addr; |
| 363 | u64 old_len = bp->attr.bp_len; | ||
| 363 | int old_type = bp->attr.bp_type; | 364 | int old_type = bp->attr.bp_type; |
| 364 | int old_len = bp->attr.bp_len; | ||
| 365 | int err = 0; | 365 | int err = 0; |
| 366 | 366 | ||
| 367 | perf_event_disable(bp); | 367 | perf_event_disable(bp); |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 498cabba225e..35edbe22e9a9 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
| @@ -80,7 +80,7 @@ int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask) | |||
| 80 | 80 | ||
| 81 | buffer = kmalloc(size, gfp_mask); | 81 | buffer = kmalloc(size, gfp_mask); |
| 82 | if (!buffer) { | 82 | if (!buffer) { |
| 83 | _kfifo_init(fifo, 0, 0); | 83 | _kfifo_init(fifo, NULL, 0); |
| 84 | return -ENOMEM; | 84 | return -ENOMEM; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| @@ -97,6 +97,7 @@ EXPORT_SYMBOL(kfifo_alloc); | |||
| 97 | void kfifo_free(struct kfifo *fifo) | 97 | void kfifo_free(struct kfifo *fifo) |
| 98 | { | 98 | { |
| 99 | kfree(fifo->buffer); | 99 | kfree(fifo->buffer); |
| 100 | _kfifo_init(fifo, NULL, 0); | ||
| 100 | } | 101 | } |
| 101 | EXPORT_SYMBOL(kfifo_free); | 102 | EXPORT_SYMBOL(kfifo_free); |
| 102 | 103 | ||
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index d27746bd3a06..2b19297742cb 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
| @@ -4580,7 +4580,7 @@ static int perf_copy_attr(struct perf_event_attr __user *uattr, | |||
| 4580 | if (attr->type >= PERF_TYPE_MAX) | 4580 | if (attr->type >= PERF_TYPE_MAX) |
| 4581 | return -EINVAL; | 4581 | return -EINVAL; |
| 4582 | 4582 | ||
| 4583 | if (attr->__reserved_1 || attr->__reserved_2) | 4583 | if (attr->__reserved_1) |
| 4584 | return -EINVAL; | 4584 | return -EINVAL; |
| 4585 | 4585 | ||
| 4586 | if (attr->sample_type & ~(PERF_SAMPLE_MAX-1)) | 4586 | if (attr->sample_type & ~(PERF_SAMPLE_MAX-1)) |
diff --git a/kernel/softirq.c b/kernel/softirq.c index a09502e2ef75..7c1a67ef0274 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
| @@ -500,22 +500,17 @@ EXPORT_SYMBOL(tasklet_kill); | |||
| 500 | */ | 500 | */ |
| 501 | 501 | ||
| 502 | /* | 502 | /* |
| 503 | * The trampoline is called when the hrtimer expires. If this is | 503 | * The trampoline is called when the hrtimer expires. It schedules a tasklet |
| 504 | * called from the hrtimer interrupt then we schedule the tasklet as | 504 | * to run __tasklet_hrtimer_trampoline() which in turn will call the intended |
| 505 | * the timer callback function expects to run in softirq context. If | 505 | * hrtimer callback, but from softirq context. |
| 506 | * it's called in softirq context anyway (i.e. high resolution timers | ||
| 507 | * disabled) then the hrtimer callback is called right away. | ||
| 508 | */ | 506 | */ |
| 509 | static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer) | 507 | static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer) |
| 510 | { | 508 | { |
| 511 | struct tasklet_hrtimer *ttimer = | 509 | struct tasklet_hrtimer *ttimer = |
| 512 | container_of(timer, struct tasklet_hrtimer, timer); | 510 | container_of(timer, struct tasklet_hrtimer, timer); |
| 513 | 511 | ||
| 514 | if (hrtimer_is_hres_active(timer)) { | 512 | tasklet_hi_schedule(&ttimer->tasklet); |
| 515 | tasklet_hi_schedule(&ttimer->tasklet); | 513 | return HRTIMER_NORESTART; |
| 516 | return HRTIMER_NORESTART; | ||
| 517 | } | ||
| 518 | return ttimer->function(timer); | ||
| 519 | } | 514 | } |
| 520 | 515 | ||
| 521 | /* | 516 | /* |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 6ea90c0e2c96..50b1b8239806 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
| @@ -689,7 +689,7 @@ static int create_trace_probe(int argc, char **argv) | |||
| 689 | return -EINVAL; | 689 | return -EINVAL; |
| 690 | } | 690 | } |
| 691 | /* an address specified */ | 691 | /* an address specified */ |
| 692 | ret = strict_strtoul(&argv[0][2], 0, (unsigned long *)&addr); | 692 | ret = strict_strtoul(&argv[1][0], 0, (unsigned long *)&addr); |
| 693 | if (ret) { | 693 | if (ret) { |
| 694 | pr_info("Failed to parse address.\n"); | 694 | pr_info("Failed to parse address.\n"); |
| 695 | return ret; | 695 | return ret; |
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 678a5120ee30..f4bc9b27de5f 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
| @@ -157,6 +157,7 @@ stack_max_size_write(struct file *filp, const char __user *ubuf, | |||
| 157 | unsigned long val, flags; | 157 | unsigned long val, flags; |
| 158 | char buf[64]; | 158 | char buf[64]; |
| 159 | int ret; | 159 | int ret; |
| 160 | int cpu; | ||
| 160 | 161 | ||
| 161 | if (count >= sizeof(buf)) | 162 | if (count >= sizeof(buf)) |
| 162 | return -EINVAL; | 163 | return -EINVAL; |
| @@ -171,9 +172,20 @@ stack_max_size_write(struct file *filp, const char __user *ubuf, | |||
| 171 | return ret; | 172 | return ret; |
| 172 | 173 | ||
| 173 | local_irq_save(flags); | 174 | local_irq_save(flags); |
| 175 | |||
| 176 | /* | ||
| 177 | * In case we trace inside arch_spin_lock() or after (NMI), | ||
| 178 | * we will cause circular lock, so we also need to increase | ||
| 179 | * the percpu trace_active here. | ||
| 180 | */ | ||
| 181 | cpu = smp_processor_id(); | ||
| 182 | per_cpu(trace_active, cpu)++; | ||
| 183 | |||
| 174 | arch_spin_lock(&max_stack_lock); | 184 | arch_spin_lock(&max_stack_lock); |
| 175 | *ptr = val; | 185 | *ptr = val; |
| 176 | arch_spin_unlock(&max_stack_lock); | 186 | arch_spin_unlock(&max_stack_lock); |
| 187 | |||
| 188 | per_cpu(trace_active, cpu)--; | ||
| 177 | local_irq_restore(flags); | 189 | local_irq_restore(flags); |
| 178 | 190 | ||
| 179 | return count; | 191 | return count; |
| @@ -206,7 +218,13 @@ t_next(struct seq_file *m, void *v, loff_t *pos) | |||
| 206 | 218 | ||
| 207 | static void *t_start(struct seq_file *m, loff_t *pos) | 219 | static void *t_start(struct seq_file *m, loff_t *pos) |
| 208 | { | 220 | { |
| 221 | int cpu; | ||
| 222 | |||
| 209 | local_irq_disable(); | 223 | local_irq_disable(); |
| 224 | |||
| 225 | cpu = smp_processor_id(); | ||
| 226 | per_cpu(trace_active, cpu)++; | ||
| 227 | |||
| 210 | arch_spin_lock(&max_stack_lock); | 228 | arch_spin_lock(&max_stack_lock); |
| 211 | 229 | ||
| 212 | if (*pos == 0) | 230 | if (*pos == 0) |
| @@ -217,7 +235,13 @@ static void *t_start(struct seq_file *m, loff_t *pos) | |||
| 217 | 235 | ||
| 218 | static void t_stop(struct seq_file *m, void *p) | 236 | static void t_stop(struct seq_file *m, void *p) |
| 219 | { | 237 | { |
| 238 | int cpu; | ||
| 239 | |||
| 220 | arch_spin_unlock(&max_stack_lock); | 240 | arch_spin_unlock(&max_stack_lock); |
| 241 | |||
| 242 | cpu = smp_processor_id(); | ||
| 243 | per_cpu(trace_active, cpu)--; | ||
| 244 | |||
| 221 | local_irq_enable(); | 245 | local_irq_enable(); |
| 222 | } | 246 | } |
| 223 | 247 | ||
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index d8aee584e8d1..236a9988ea91 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
| @@ -927,6 +927,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
| 927 | case ETHTOOL_GPERMADDR: | 927 | case ETHTOOL_GPERMADDR: |
| 928 | case ETHTOOL_GUFO: | 928 | case ETHTOOL_GUFO: |
| 929 | case ETHTOOL_GGSO: | 929 | case ETHTOOL_GGSO: |
| 930 | case ETHTOOL_GGRO: | ||
| 930 | case ETHTOOL_GFLAGS: | 931 | case ETHTOOL_GFLAGS: |
| 931 | case ETHTOOL_GPFLAGS: | 932 | case ETHTOOL_GPFLAGS: |
| 932 | case ETHTOOL_GRXFH: | 933 | case ETHTOOL_GRXFH: |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 76c08402c933..a42f658e756a 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
| @@ -946,7 +946,6 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 946 | break; | 946 | break; |
| 947 | case IGMP_HOST_MEMBERSHIP_REPORT: | 947 | case IGMP_HOST_MEMBERSHIP_REPORT: |
| 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: | 948 | case IGMPV2_HOST_MEMBERSHIP_REPORT: |
| 949 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 950 | /* Is it our report looped back? */ | 949 | /* Is it our report looped back? */ |
| 951 | if (skb_rtable(skb)->fl.iif == 0) | 950 | if (skb_rtable(skb)->fl.iif == 0) |
| 952 | break; | 951 | break; |
| @@ -960,6 +959,7 @@ int igmp_rcv(struct sk_buff *skb) | |||
| 960 | in_dev_put(in_dev); | 959 | in_dev_put(in_dev); |
| 961 | return pim_rcv_v1(skb); | 960 | return pim_rcv_v1(skb); |
| 962 | #endif | 961 | #endif |
| 962 | case IGMPV3_HOST_MEMBERSHIP_REPORT: | ||
| 963 | case IGMP_DVMRP: | 963 | case IGMP_DVMRP: |
| 964 | case IGMP_TRACE: | 964 | case IGMP_TRACE: |
| 965 | case IGMP_HOST_LEAVE_MESSAGE: | 965 | case IGMP_HOST_LEAVE_MESSAGE: |
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index 38fbf04150ae..544ce0876f12 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
| @@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x) | |||
| 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 124 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 125 | err = ipcomp_tunnel_attach(x); | 125 | err = ipcomp_tunnel_attach(x); |
| 126 | if (err) | 126 | if (err) |
| 127 | goto error_tunnel; | 127 | goto out; |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | err = 0; | 130 | err = 0; |
| 131 | out: | 131 | out: |
| 132 | return err; | 132 | return err; |
| 133 | |||
| 134 | error_tunnel: | ||
| 135 | ipcomp_destroy(x); | ||
| 136 | goto out; | ||
| 137 | } | 133 | } |
| 138 | 134 | ||
| 139 | static const struct xfrm_type ipcomp_type = { | 135 | static const struct xfrm_type ipcomp_type = { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 28e029632493..3fddc69ccccc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
| 5783 | 5783 | ||
| 5784 | /* tcp_ack considers this ACK as duplicate | 5784 | /* tcp_ack considers this ACK as duplicate |
| 5785 | * and does not calculate rtt. | 5785 | * and does not calculate rtt. |
| 5786 | * Fix it at least with timestamps. | 5786 | * Force it here. |
| 5787 | */ | 5787 | */ |
| 5788 | if (tp->rx_opt.saw_tstamp && | 5788 | tcp_ack_update_rtt(sk, 0, 0); |
| 5789 | tp->rx_opt.rcv_tsecr && !tp->srtt) | ||
| 5790 | tcp_ack_saw_tstamp(sk, 0); | ||
| 5791 | 5789 | ||
| 5792 | if (tp->rx_opt.tstamp_ok) | 5790 | if (tp->rx_opt.tstamp_ok) |
| 5793 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; | 5791 | tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 2f2a5ca2c878..002e6eef9120 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
| @@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x) | |||
| 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { | 154 | if (x->props.mode == XFRM_MODE_TUNNEL) { |
| 155 | err = ipcomp6_tunnel_attach(x); | 155 | err = ipcomp6_tunnel_attach(x); |
| 156 | if (err) | 156 | if (err) |
| 157 | goto error_tunnel; | 157 | goto out; |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | err = 0; | 160 | err = 0; |
| 161 | out: | 161 | out: |
| 162 | return err; | 162 | return err; |
| 163 | error_tunnel: | ||
| 164 | ipcomp_destroy(x); | ||
| 165 | |||
| 166 | goto out; | ||
| 167 | } | 163 | } |
| 168 | 164 | ||
| 169 | static const struct xfrm_type ipcomp6_type = | 165 | static const struct xfrm_type ipcomp6_type = |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 1f2db647bb5c..22f0c2aa7a89 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
| @@ -647,7 +647,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
| 647 | } | 647 | } |
| 648 | if (pos[1] != 0 && | 648 | if (pos[1] != 0 && |
| 649 | (pos[1] != ifibss->ssid_len || | 649 | (pos[1] != ifibss->ssid_len || |
| 650 | !memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { | 650 | memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { |
| 651 | /* Ignore ProbeReq for foreign SSID */ | 651 | /* Ignore ProbeReq for foreign SSID */ |
| 652 | return; | 652 | return; |
| 653 | } | 653 | } |
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index b9007f80cb92..12a2bff7dcdb 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
| @@ -245,6 +245,9 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, | |||
| 245 | info->control.rates[i].count = 1; | 245 | info->control.rates[i].count = 1; |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) | ||
| 249 | return; | ||
| 250 | |||
| 248 | if (sta && sdata->force_unicast_rateidx > -1) { | 251 | if (sta && sdata->force_unicast_rateidx > -1) { |
| 249 | info->control.rates[0].idx = sdata->force_unicast_rateidx; | 252 | info->control.rates[0].idx = sdata->force_unicast_rateidx; |
| 250 | } else { | 253 | } else { |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index f934c9620b73..bc17cf7d68db 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 439 | if (local->scan_req) | 439 | if (local->scan_req) |
| 440 | return -EBUSY; | 440 | return -EBUSY; |
| 441 | 441 | ||
| 442 | if (req != local->int_scan_req && | ||
| 443 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 444 | !list_empty(&ifmgd->work_list)) { | ||
| 445 | /* actually wait for the work it's doing to finish/time out */ | ||
| 446 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 447 | local->scan_req = req; | ||
| 448 | local->scan_sdata = sdata; | ||
| 449 | return 0; | ||
| 450 | } | ||
| 451 | |||
| 442 | if (local->ops->hw_scan) { | 452 | if (local->ops->hw_scan) { |
| 443 | u8 *ies; | 453 | u8 *ies; |
| 444 | 454 | ||
| @@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, | |||
| 463 | local->scan_req = req; | 473 | local->scan_req = req; |
| 464 | local->scan_sdata = sdata; | 474 | local->scan_sdata = sdata; |
| 465 | 475 | ||
| 466 | if (req != local->int_scan_req && | ||
| 467 | sdata->vif.type == NL80211_IFTYPE_STATION && | ||
| 468 | !list_empty(&ifmgd->work_list)) { | ||
| 469 | /* actually wait for the work it's doing to finish/time out */ | ||
| 470 | set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request); | ||
| 471 | return 0; | ||
| 472 | } | ||
| 473 | |||
| 474 | if (local->ops->hw_scan) | 476 | if (local->ops->hw_scan) |
| 475 | __set_bit(SCAN_HW_SCANNING, &local->scanning); | 477 | __set_bit(SCAN_HW_SCANNING, &local->scanning); |
| 476 | else | 478 | else |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index b36cc344474b..f445ea1c5f52 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
| @@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1102 | int err = -ENOMEM; | 1102 | int err = -ENOMEM; |
| 1103 | struct xfrm_state *x = xfrm_state_alloc(net); | 1103 | struct xfrm_state *x = xfrm_state_alloc(net); |
| 1104 | if (!x) | 1104 | if (!x) |
| 1105 | goto error; | 1105 | goto out; |
| 1106 | 1106 | ||
| 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); | 1107 | memcpy(&x->id, &orig->id, sizeof(x->id)); |
| 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); | 1108 | memcpy(&x->sel, &orig->sel, sizeof(x->sel)); |
| @@ -1160,16 +1160,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) | |||
| 1160 | return x; | 1160 | return x; |
| 1161 | 1161 | ||
| 1162 | error: | 1162 | error: |
| 1163 | xfrm_state_put(x); | ||
| 1164 | out: | ||
| 1163 | if (errp) | 1165 | if (errp) |
| 1164 | *errp = err; | 1166 | *errp = err; |
| 1165 | if (x) { | ||
| 1166 | kfree(x->aalg); | ||
| 1167 | kfree(x->ealg); | ||
| 1168 | kfree(x->calg); | ||
| 1169 | kfree(x->encap); | ||
| 1170 | kfree(x->coaddr); | ||
| 1171 | } | ||
| 1172 | kfree(x); | ||
| 1173 | return NULL; | 1167 | return NULL; |
| 1174 | } | 1168 | } |
| 1175 | 1169 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 3600e9cc9bc6..ff6da6f386d1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -2350,7 +2350,7 @@ static void __devinit check_probe_mask(struct azx *chip, int dev) | |||
| 2350 | */ | 2350 | */ |
| 2351 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { | 2351 | static struct snd_pci_quirk msi_black_list[] __devinitdata = { |
| 2352 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | 2352 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ |
| 2353 | SND_PCI_QUIRK(0x1043, 0x829c, "ASUS", 0), /* nvidia */ | 2353 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ |
| 2354 | {} | 2354 | {} |
| 2355 | }; | 2355 | }; |
| 2356 | 2356 | ||
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index ddc584b64871..4b91d8cf00ec 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
| @@ -705,7 +705,7 @@ static void print_mapped_keys(void) | |||
| 705 | fprintf(stdout, "\t[w] toggle display weighted/count[E]r. \t(%d)\n", display_weighted ? 1 : 0); | 705 | fprintf(stdout, "\t[w] toggle display weighted/count[E]r. \t(%d)\n", display_weighted ? 1 : 0); |
| 706 | 706 | ||
| 707 | fprintf(stdout, | 707 | fprintf(stdout, |
| 708 | "\t[K] hide kernel_symbols symbols. \t(%s)\n", | 708 | "\t[K] hide kernel_symbols symbols. \t(%s)\n", |
| 709 | hide_kernel_symbols ? "yes" : "no"); | 709 | hide_kernel_symbols ? "yes" : "no"); |
| 710 | fprintf(stdout, | 710 | fprintf(stdout, |
| 711 | "\t[U] hide user symbols. \t(%s)\n", | 711 | "\t[U] hide user symbols. \t(%s)\n", |
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index bb0fd6da2d56..8a9e6baa3099 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
| @@ -295,10 +295,10 @@ void thread__find_addr_location(struct thread *self, | |||
| 295 | al->thread = self; | 295 | al->thread = self; |
| 296 | al->addr = addr; | 296 | al->addr = addr; |
| 297 | 297 | ||
| 298 | if (cpumode & PERF_RECORD_MISC_KERNEL) { | 298 | if (cpumode == PERF_RECORD_MISC_KERNEL) { |
| 299 | al->level = 'k'; | 299 | al->level = 'k'; |
| 300 | mg = &session->kmaps; | 300 | mg = &session->kmaps; |
| 301 | } else if (cpumode & PERF_RECORD_MISC_USER) | 301 | } else if (cpumode == PERF_RECORD_MISC_USER) |
| 302 | al->level = '.'; | 302 | al->level = '.'; |
| 303 | else { | 303 | else { |
| 304 | al->level = 'H'; | 304 | al->level = 'H'; |
