diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-09-04 23:52:08 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-09-04 23:52:08 -0400 |
commit | f5a18f932e051ff0f19dcd80a421a4dd9b11f10f (patch) | |
tree | 9189ffc9fa735e5297ed8c3678a9463e8dbb1561 | |
parent | b9a3acf46afdafc601947136f63e9dd228cd86e8 (diff) | |
parent | 9e79e3e9dd9672b37ac9412e9a926714306551fe (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into sh-latest
215 files changed, 1264 insertions, 560 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 4ce5450ab6e..6066e3a6b9a 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
@@ -431,8 +431,7 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
431 | 431 | ||
432 | void pm_runtime_irq_safe(struct device *dev); | 432 | void pm_runtime_irq_safe(struct device *dev); |
433 | - set the power.irq_safe flag for the device, causing the runtime-PM | 433 | - set the power.irq_safe flag for the device, causing the runtime-PM |
434 | suspend and resume callbacks (but not the idle callback) to be invoked | 434 | callbacks to be invoked with interrupts off |
435 | with interrupts disabled | ||
436 | 435 | ||
437 | void pm_runtime_mark_last_busy(struct device *dev); | 436 | void pm_runtime_mark_last_busy(struct device *dev); |
438 | - set the power.last_busy field to the current time | 437 | - set the power.last_busy field to the current time |
diff --git a/MAINTAINERS b/MAINTAINERS index d9429206535..28f65c249b9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2649,11 +2649,11 @@ F: drivers/net/wan/dlci.c | |||
2649 | F: drivers/net/wan/sdla.c | 2649 | F: drivers/net/wan/sdla.c |
2650 | 2650 | ||
2651 | FRAMEBUFFER LAYER | 2651 | FRAMEBUFFER LAYER |
2652 | M: Paul Mundt <lethal@linux-sh.org> | 2652 | M: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> |
2653 | L: linux-fbdev@vger.kernel.org | 2653 | L: linux-fbdev@vger.kernel.org |
2654 | W: http://linux-fbdev.sourceforge.net/ | 2654 | W: http://linux-fbdev.sourceforge.net/ |
2655 | Q: http://patchwork.kernel.org/project/linux-fbdev/list/ | 2655 | Q: http://patchwork.kernel.org/project/linux-fbdev/list/ |
2656 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git | 2656 | T: git git://github.com/schandinat/linux-2.6.git fbdev-next |
2657 | S: Maintained | 2657 | S: Maintained |
2658 | F: Documentation/fb/ | 2658 | F: Documentation/fb/ |
2659 | F: Documentation/devicetree/bindings/fb/ | 2659 | F: Documentation/devicetree/bindings/fb/ |
@@ -4450,8 +4450,8 @@ M: "David S. Miller" <davem@davemloft.net> | |||
4450 | L: netdev@vger.kernel.org | 4450 | L: netdev@vger.kernel.org |
4451 | W: http://www.linuxfoundation.org/en/Net | 4451 | W: http://www.linuxfoundation.org/en/Net |
4452 | W: http://patchwork.ozlabs.org/project/netdev/list/ | 4452 | W: http://patchwork.ozlabs.org/project/netdev/list/ |
4453 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git | 4453 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git |
4454 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git | 4454 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git |
4455 | S: Maintained | 4455 | S: Maintained |
4456 | F: net/ | 4456 | F: net/ |
4457 | F: include/net/ | 4457 | F: include/net/ |
@@ -5532,6 +5532,7 @@ F: include/media/*7146* | |||
5532 | 5532 | ||
5533 | SAMSUNG AUDIO (ASoC) DRIVERS | 5533 | SAMSUNG AUDIO (ASoC) DRIVERS |
5534 | M: Jassi Brar <jassisinghbrar@gmail.com> | 5534 | M: Jassi Brar <jassisinghbrar@gmail.com> |
5535 | M: Sangbeom Kim <sbkim73@samsung.com> | ||
5535 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) | 5536 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
5536 | S: Supported | 5537 | S: Supported |
5537 | F: sound/soc/samsung | 5538 | F: sound/soc/samsung |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 3 | 1 | VERSION = 3 |
2 | PATCHLEVEL = 1 | 2 | PATCHLEVEL = 1 |
3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
4 | EXTRAVERSION = -rc3 | 4 | EXTRAVERSION = -rc4 |
5 | NAME = "Divemaster Edition" | 5 | NAME = "Divemaster Edition" |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index b9c28f3f195..6acea1f96de 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S | |||
@@ -360,7 +360,7 @@ sys_call_table: | |||
360 | .quad sys_newuname | 360 | .quad sys_newuname |
361 | .quad sys_nanosleep /* 340 */ | 361 | .quad sys_nanosleep /* 340 */ |
362 | .quad sys_mremap | 362 | .quad sys_mremap |
363 | .quad sys_nfsservctl | 363 | .quad sys_ni_syscall /* old nfsservctl */ |
364 | .quad sys_setresuid | 364 | .quad sys_setresuid |
365 | .quad sys_getresuid | 365 | .quad sys_getresuid |
366 | .quad sys_pciconfig_read /* 345 */ | 366 | .quad sys_pciconfig_read /* 345 */ |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 5ebc5d922ea..3269576dbfa 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1271,6 +1271,18 @@ config ARM_ERRATA_754327 | |||
1271 | This workaround defines cpu_relax() as smp_mb(), preventing correctly | 1271 | This workaround defines cpu_relax() as smp_mb(), preventing correctly |
1272 | written polling loops from denying visibility of updates to memory. | 1272 | written polling loops from denying visibility of updates to memory. |
1273 | 1273 | ||
1274 | config ARM_ERRATA_364296 | ||
1275 | bool "ARM errata: Possible cache data corruption with hit-under-miss enabled" | ||
1276 | depends on CPU_V6 && !SMP | ||
1277 | help | ||
1278 | This options enables the workaround for the 364296 ARM1136 | ||
1279 | r0p2 erratum (possible cache data corruption with | ||
1280 | hit-under-miss enabled). It sets the undocumented bit 31 in | ||
1281 | the auxiliary control register and the FI bit in the control | ||
1282 | register, thus disabling hit-under-miss without putting the | ||
1283 | processor into full low interrupt latency mode. ARM11MPCore | ||
1284 | is not affected. | ||
1285 | |||
1274 | endmenu | 1286 | endmenu |
1275 | 1287 | ||
1276 | source "arch/arm/common/Kconfig" | 1288 | source "arch/arm/common/Kconfig" |
diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c index b6f61d9a5a1..672ae95db5c 100644 --- a/arch/arm/boot/compressed/mmcif-sh7372.c +++ b/arch/arm/boot/compressed/mmcif-sh7372.c | |||
@@ -82,7 +82,7 @@ asmlinkage void mmc_loader(unsigned char *buf, unsigned long len) | |||
82 | 82 | ||
83 | 83 | ||
84 | /* Disable clock to MMC hardware block */ | 84 | /* Disable clock to MMC hardware block */ |
85 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); | 85 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 12), SMSTPCR3); |
86 | 86 | ||
87 | mmc_update_progress(MMC_PROGRESS_DONE); | 87 | mmc_update_progress(MMC_PROGRESS_DONE); |
88 | } | 88 | } |
diff --git a/arch/arm/boot/compressed/sdhi-sh7372.c b/arch/arm/boot/compressed/sdhi-sh7372.c index d403a8b24d7..d279294f238 100644 --- a/arch/arm/boot/compressed/sdhi-sh7372.c +++ b/arch/arm/boot/compressed/sdhi-sh7372.c | |||
@@ -85,7 +85,7 @@ asmlinkage void mmc_loader(unsigned short *buf, unsigned long len) | |||
85 | goto err; | 85 | goto err; |
86 | 86 | ||
87 | /* Disable clock to SDHI1 hardware block */ | 87 | /* Disable clock to SDHI1 hardware block */ |
88 | __raw_writel(__raw_readl(SMSTPCR3) & (1 << 13), SMSTPCR3); | 88 | __raw_writel(__raw_readl(SMSTPCR3) | (1 << 13), SMSTPCR3); |
89 | 89 | ||
90 | mmc_update_progress(MMC_PROGRESS_DONE); | 90 | mmc_update_progress(MMC_PROGRESS_DONE); |
91 | 91 | ||
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 16bd4803158..bfa706ffd96 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -64,7 +64,7 @@ | |||
64 | #define L2X0_AUX_CTRL_MASK 0xc0000fff | 64 | #define L2X0_AUX_CTRL_MASK 0xc0000fff |
65 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 | 65 | #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 |
66 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 | 66 | #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 |
67 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x3 << 17) | 67 | #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) |
68 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 | 68 | #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 |
69 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 | 69 | #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 |
70 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 | 70 | #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 67c70a31a1b..b7e82c4aced 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -41,7 +41,7 @@ struct arm_pmu_platdata { | |||
41 | * encoded error on failure. | 41 | * encoded error on failure. |
42 | */ | 42 | */ |
43 | extern struct platform_device * | 43 | extern struct platform_device * |
44 | reserve_pmu(enum arm_pmu_type device); | 44 | reserve_pmu(enum arm_pmu_type type); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * release_pmu() - Relinquish control of the performance counters | 47 | * release_pmu() - Relinquish control of the performance counters |
@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type); | |||
62 | * the actual hardware initialisation. | 62 | * the actual hardware initialisation. |
63 | */ | 63 | */ |
64 | extern int | 64 | extern int |
65 | init_pmu(enum arm_pmu_type device); | 65 | init_pmu(enum arm_pmu_type type); |
66 | 66 | ||
67 | #else /* CONFIG_CPU_HAS_PMU */ | 67 | #else /* CONFIG_CPU_HAS_PMU */ |
68 | 68 | ||
69 | #include <linux/err.h> | 69 | #include <linux/err.h> |
70 | 70 | ||
71 | static inline struct platform_device * | 71 | static inline struct platform_device * |
72 | reserve_pmu(enum arm_pmu_type device) | 72 | reserve_pmu(enum arm_pmu_type type) |
73 | { | 73 | { |
74 | return ERR_PTR(-ENODEV); | 74 | return ERR_PTR(-ENODEV); |
75 | } | 75 | } |
76 | 76 | ||
77 | static inline int | 77 | static inline int |
78 | release_pmu(struct platform_device *pdev) | 78 | release_pmu(enum arm_pmu_type type) |
79 | { | 79 | { |
80 | return -ENODEV; | 80 | return -ENODEV; |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int | 83 | static inline int |
84 | init_pmu(enum arm_pmu_type device) | 84 | init_pmu(enum arm_pmu_type type) |
85 | { | 85 | { |
86 | return -ENODEV; | 86 | return -ENODEV; |
87 | } | 87 | } |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 80f7896cc01..9943e9e74a1 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -178,7 +178,7 @@ | |||
178 | CALL(sys_ni_syscall) /* vm86 */ | 178 | CALL(sys_ni_syscall) /* vm86 */ |
179 | CALL(sys_ni_syscall) /* was sys_query_module */ | 179 | CALL(sys_ni_syscall) /* was sys_query_module */ |
180 | CALL(sys_poll) | 180 | CALL(sys_poll) |
181 | CALL(sys_nfsservctl) | 181 | CALL(sys_ni_syscall) /* was nfsservctl */ |
182 | /* 170 */ CALL(sys_setresgid16) | 182 | /* 170 */ CALL(sys_setresgid16) |
183 | CALL(sys_getresgid16) | 183 | CALL(sys_getresgid16) |
184 | CALL(sys_prctl) | 184 | CALL(sys_prctl) |
diff --git a/arch/arm/kernel/pmu.c b/arch/arm/kernel/pmu.c index 2b70709376c..c53474fe84d 100644 --- a/arch/arm/kernel/pmu.c +++ b/arch/arm/kernel/pmu.c | |||
@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev, | |||
31 | { | 31 | { |
32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { | 32 | if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { |
33 | pr_warning("received registration request for unknown " | 33 | pr_warning("received registration request for unknown " |
34 | "device %d\n", type); | 34 | "PMU device type %d\n", type); |
35 | return -EINVAL; | 35 | return -EINVAL; |
36 | } | 36 | } |
37 | 37 | ||
@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void) | |||
112 | device_initcall(register_pmu_driver); | 112 | device_initcall(register_pmu_driver); |
113 | 113 | ||
114 | struct platform_device * | 114 | struct platform_device * |
115 | reserve_pmu(enum arm_pmu_type device) | 115 | reserve_pmu(enum arm_pmu_type type) |
116 | { | 116 | { |
117 | struct platform_device *pdev; | 117 | struct platform_device *pdev; |
118 | 118 | ||
119 | if (test_and_set_bit_lock(device, &pmu_lock)) { | 119 | if (test_and_set_bit_lock(type, &pmu_lock)) { |
120 | pdev = ERR_PTR(-EBUSY); | 120 | pdev = ERR_PTR(-EBUSY); |
121 | } else if (pmu_devices[device] == NULL) { | 121 | } else if (pmu_devices[type] == NULL) { |
122 | clear_bit_unlock(device, &pmu_lock); | 122 | clear_bit_unlock(type, &pmu_lock); |
123 | pdev = ERR_PTR(-ENODEV); | 123 | pdev = ERR_PTR(-ENODEV); |
124 | } else { | 124 | } else { |
125 | pdev = pmu_devices[device]; | 125 | pdev = pmu_devices[type]; |
126 | } | 126 | } |
127 | 127 | ||
128 | return pdev; | 128 | return pdev; |
@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device) | |||
130 | EXPORT_SYMBOL_GPL(reserve_pmu); | 130 | EXPORT_SYMBOL_GPL(reserve_pmu); |
131 | 131 | ||
132 | int | 132 | int |
133 | release_pmu(enum arm_pmu_type device) | 133 | release_pmu(enum arm_pmu_type type) |
134 | { | 134 | { |
135 | if (WARN_ON(!pmu_devices[device])) | 135 | if (WARN_ON(!pmu_devices[type])) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | clear_bit_unlock(device, &pmu_lock); | 137 | clear_bit_unlock(type, &pmu_lock); |
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | EXPORT_SYMBOL_GPL(release_pmu); | 140 | EXPORT_SYMBOL_GPL(release_pmu); |
@@ -182,17 +182,17 @@ init_cpu_pmu(void) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | int | 184 | int |
185 | init_pmu(enum arm_pmu_type device) | 185 | init_pmu(enum arm_pmu_type type) |
186 | { | 186 | { |
187 | int err = 0; | 187 | int err = 0; |
188 | 188 | ||
189 | switch (device) { | 189 | switch (type) { |
190 | case ARM_PMU_DEVICE_CPU: | 190 | case ARM_PMU_DEVICE_CPU: |
191 | err = init_cpu_pmu(); | 191 | err = init_cpu_pmu(); |
192 | break; | 192 | break; |
193 | default: | 193 | default: |
194 | pr_warning("attempt to initialise unknown device %d\n", | 194 | pr_warning("attempt to initialise PMU of unknown " |
195 | device); | 195 | "type %d\n", type); |
196 | err = -EINVAL; | 196 | err = -EINVAL; |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index 9cf4cbf8f95..d0cdedf4864 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S | |||
@@ -57,7 +57,8 @@ relocate_new_kernel: | |||
57 | mov r0,#0 | 57 | mov r0,#0 |
58 | ldr r1,kexec_mach_type | 58 | ldr r1,kexec_mach_type |
59 | ldr r2,kexec_boot_atags | 59 | ldr r2,kexec_boot_atags |
60 | mov pc,lr | 60 | ARM( mov pc, lr ) |
61 | THUMB( bx lr ) | ||
61 | 62 | ||
62 | .align | 63 | .align |
63 | 64 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 70bca649e92..e514c76043b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -280,18 +280,19 @@ static void __init cacheid_init(void) | |||
280 | if (arch >= CPU_ARCH_ARMv6) { | 280 | if (arch >= CPU_ARCH_ARMv6) { |
281 | if ((cachetype & (7 << 29)) == 4 << 29) { | 281 | if ((cachetype & (7 << 29)) == 4 << 29) { |
282 | /* ARMv7 register format */ | 282 | /* ARMv7 register format */ |
283 | arch = CPU_ARCH_ARMv7; | ||
283 | cacheid = CACHEID_VIPT_NONALIASING; | 284 | cacheid = CACHEID_VIPT_NONALIASING; |
284 | if ((cachetype & (3 << 14)) == 1 << 14) | 285 | if ((cachetype & (3 << 14)) == 1 << 14) |
285 | cacheid |= CACHEID_ASID_TAGGED; | 286 | cacheid |= CACHEID_ASID_TAGGED; |
286 | else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7)) | ||
287 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
288 | } else if (cachetype & (1 << 23)) { | ||
289 | cacheid = CACHEID_VIPT_ALIASING; | ||
290 | } else { | 287 | } else { |
291 | cacheid = CACHEID_VIPT_NONALIASING; | 288 | arch = CPU_ARCH_ARMv6; |
292 | if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6)) | 289 | if (cachetype & (1 << 23)) |
293 | cacheid |= CACHEID_VIPT_I_ALIASING; | 290 | cacheid = CACHEID_VIPT_ALIASING; |
291 | else | ||
292 | cacheid = CACHEID_VIPT_NONALIASING; | ||
294 | } | 293 | } |
294 | if (cpu_has_aliasing_icache(arch)) | ||
295 | cacheid |= CACHEID_VIPT_I_ALIASING; | ||
295 | } else { | 296 | } else { |
296 | cacheid = CACHEID_VIVT; | 297 | cacheid = CACHEID_VIVT; |
297 | } | 298 | } |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 2c277d40cee..01c186222f3 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | 137 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); |
138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | 138 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); |
139 | 139 | ||
140 | clockevents_register_device(clk); | ||
141 | |||
140 | /* Make sure our local interrupt controller has this enabled */ | 142 | /* Make sure our local interrupt controller has this enabled */ |
141 | gic_enable_ppi(clk->irq); | 143 | gic_enable_ppi(clk->irq); |
142 | |||
143 | clockevents_register_device(clk); | ||
144 | } | 144 | } |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index d522b47e30b..6c8e3b5f669 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -157,7 +157,7 @@ static struct clk_lookup periph_clocks_lookups[] = { | |||
157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | 157 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), |
158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), | 158 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), |
159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), | 159 | CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), |
160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk), | 160 | CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk), |
161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | 161 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), |
162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | 162 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), |
163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), | 163 | CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), |
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h index 0eabec62cd9..f1397a13e76 100644 --- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h +++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * TS72xx memory map: | 6 | * TS72xx memory map: |
7 | * | 7 | * |
8 | * virt phys size | 8 | * virt phys size |
9 | * febff000 22000000 4K model number register | 9 | * febff000 22000000 4K model number register (bits 0-2) |
10 | * febfe000 22400000 4K options register | 10 | * febfe000 22400000 4K options register |
11 | * febfd000 22800000 4K options register #2 | 11 | * febfd000 22800000 4K options register #2 |
12 | * febf9000 10800000 4K TS-5620 RTC index register | 12 | * febf9000 10800000 4K TS-5620 RTC index register |
@@ -20,6 +20,9 @@ | |||
20 | #define TS72XX_MODEL_TS7200 0x00 | 20 | #define TS72XX_MODEL_TS7200 0x00 |
21 | #define TS72XX_MODEL_TS7250 0x01 | 21 | #define TS72XX_MODEL_TS7250 0x01 |
22 | #define TS72XX_MODEL_TS7260 0x02 | 22 | #define TS72XX_MODEL_TS7260 0x02 |
23 | #define TS72XX_MODEL_TS7300 0x03 | ||
24 | #define TS72XX_MODEL_TS7400 0x04 | ||
25 | #define TS72XX_MODEL_MASK 0x07 | ||
23 | 26 | ||
24 | 27 | ||
25 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 | 28 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 |
@@ -51,19 +54,34 @@ | |||
51 | 54 | ||
52 | #ifndef __ASSEMBLY__ | 55 | #ifndef __ASSEMBLY__ |
53 | 56 | ||
57 | static inline int ts72xx_model(void) | ||
58 | { | ||
59 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) & TS72XX_MODEL_MASK; | ||
60 | } | ||
61 | |||
54 | static inline int board_is_ts7200(void) | 62 | static inline int board_is_ts7200(void) |
55 | { | 63 | { |
56 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; | 64 | return ts72xx_model() == TS72XX_MODEL_TS7200; |
57 | } | 65 | } |
58 | 66 | ||
59 | static inline int board_is_ts7250(void) | 67 | static inline int board_is_ts7250(void) |
60 | { | 68 | { |
61 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; | 69 | return ts72xx_model() == TS72XX_MODEL_TS7250; |
62 | } | 70 | } |
63 | 71 | ||
64 | static inline int board_is_ts7260(void) | 72 | static inline int board_is_ts7260(void) |
65 | { | 73 | { |
66 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; | 74 | return ts72xx_model() == TS72XX_MODEL_TS7260; |
75 | } | ||
76 | |||
77 | static inline int board_is_ts7300(void) | ||
78 | { | ||
79 | return ts72xx_model() == TS72XX_MODEL_TS7300; | ||
80 | } | ||
81 | |||
82 | static inline int board_is_ts7400(void) | ||
83 | { | ||
84 | return ts72xx_model() == TS72XX_MODEL_TS7400; | ||
67 | } | 85 | } |
68 | 86 | ||
69 | static inline int is_max197_installed(void) | 87 | static inline int is_max197_installed(void) |
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c index 851dea01857..1561b036a9b 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = { | |||
520 | .ctrlbit = (1 << 21), | 520 | .ctrlbit = (1 << 21), |
521 | }, { | 521 | }, { |
522 | .name = "ac97", | 522 | .name = "ac97", |
523 | .id = -1, | 523 | .devname = "samsung-ac97", |
524 | .enable = exynos4_clk_ip_peril_ctrl, | 524 | .enable = exynos4_clk_ip_peril_ctrl, |
525 | .ctrlbit = (1 << 27), | 525 | .ctrlbit = (1 << 27), |
526 | }, { | 526 | }, { |
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c index 2d8a40c9e6e..746d6fc6d39 100644 --- a/arch/arm/mach-exynos4/cpu.c +++ b/arch/arm/mach-exynos4/cpu.c | |||
@@ -24,12 +24,13 @@ | |||
24 | #include <plat/exynos4.h> | 24 | #include <plat/exynos4.h> |
25 | #include <plat/adc-core.h> | 25 | #include <plat/adc-core.h> |
26 | #include <plat/sdhci.h> | 26 | #include <plat/sdhci.h> |
27 | #include <plat/devs.h> | ||
28 | #include <plat/fb-core.h> | 27 | #include <plat/fb-core.h> |
29 | #include <plat/fimc-core.h> | 28 | #include <plat/fimc-core.h> |
30 | #include <plat/iic-core.h> | 29 | #include <plat/iic-core.h> |
30 | #include <plat/reset.h> | ||
31 | 31 | ||
32 | #include <mach/regs-irq.h> | 32 | #include <mach/regs-irq.h> |
33 | #include <mach/regs-pmu.h> | ||
33 | 34 | ||
34 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, | 35 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
35 | unsigned int irq_start); | 36 | unsigned int irq_start); |
@@ -128,6 +129,11 @@ static void exynos4_idle(void) | |||
128 | local_irq_enable(); | 129 | local_irq_enable(); |
129 | } | 130 | } |
130 | 131 | ||
132 | static void exynos4_sw_reset(void) | ||
133 | { | ||
134 | __raw_writel(0x1, S5P_SWRESET); | ||
135 | } | ||
136 | |||
131 | /* | 137 | /* |
132 | * exynos4_map_io | 138 | * exynos4_map_io |
133 | * | 139 | * |
@@ -241,5 +247,8 @@ int __init exynos4_init(void) | |||
241 | /* set idle function */ | 247 | /* set idle function */ |
242 | pm_idle = exynos4_idle; | 248 | pm_idle = exynos4_idle; |
243 | 249 | ||
250 | /* set sw_reset function */ | ||
251 | s5p_reset_hook = exynos4_sw_reset; | ||
252 | |||
244 | return sysdev_register(&exynos4_sysdev); | 253 | return sysdev_register(&exynos4_sysdev); |
245 | } | 254 | } |
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h b/arch/arm/mach-exynos4/include/mach/irqs.h index 934d2a49398..f8952f8f375 100644 --- a/arch/arm/mach-exynos4/include/mach/irqs.h +++ b/arch/arm/mach-exynos4/include/mach/irqs.h | |||
@@ -80,9 +80,8 @@ | |||
80 | #define IRQ_HSMMC3 IRQ_SPI(76) | 80 | #define IRQ_HSMMC3 IRQ_SPI(76) |
81 | #define IRQ_DWMCI IRQ_SPI(77) | 81 | #define IRQ_DWMCI IRQ_SPI(77) |
82 | 82 | ||
83 | #define IRQ_MIPICSI0 IRQ_SPI(78) | 83 | #define IRQ_MIPI_CSIS0 IRQ_SPI(78) |
84 | 84 | #define IRQ_MIPI_CSIS1 IRQ_SPI(80) | |
85 | #define IRQ_MIPICSI1 IRQ_SPI(80) | ||
86 | 85 | ||
87 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) | 86 | #define IRQ_ONENAND_AUDI IRQ_SPI(82) |
88 | #define IRQ_ROTATOR IRQ_SPI(83) | 87 | #define IRQ_ROTATOR IRQ_SPI(83) |
diff --git a/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/arch/arm/mach-exynos4/include/mach/regs-pmu.h index fa49bbb8e7b..cdf9b47c303 100644 --- a/arch/arm/mach-exynos4/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos4/include/mach/regs-pmu.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) | 29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) |
30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) | 30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) |
31 | 31 | ||
32 | #define S5P_SWRESET S5P_PMUREG(0x0400) | ||
33 | |||
32 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) | 34 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
33 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) | 35 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
34 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) | 36 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) |
diff --git a/arch/arm/mach-exynos4/irq-eint.c b/arch/arm/mach-exynos4/irq-eint.c index 9d87d2ac7f6..badb8c66fc9 100644 --- a/arch/arm/mach-exynos4/irq-eint.c +++ b/arch/arm/mach-exynos4/irq-eint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | static DEFINE_SPINLOCK(eint_lock); | 28 | static DEFINE_SPINLOCK(eint_lock); |
27 | 29 | ||
28 | static unsigned int eint0_15_data[16]; | 30 | static unsigned int eint0_15_data[16]; |
@@ -184,8 +186,11 @@ static inline void exynos4_irq_demux_eint(unsigned int start) | |||
184 | 186 | ||
185 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | 187 | static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) |
186 | { | 188 | { |
189 | struct irq_chip *chip = irq_get_chip(irq); | ||
190 | chained_irq_enter(chip, desc); | ||
187 | exynos4_irq_demux_eint(IRQ_EINT(16)); | 191 | exynos4_irq_demux_eint(IRQ_EINT(16)); |
188 | exynos4_irq_demux_eint(IRQ_EINT(24)); | 192 | exynos4_irq_demux_eint(IRQ_EINT(24)); |
193 | chained_irq_exit(chip, desc); | ||
189 | } | 194 | } |
190 | 195 | ||
191 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | 196 | static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) |
@@ -193,6 +198,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
193 | u32 *irq_data = irq_get_handler_data(irq); | 198 | u32 *irq_data = irq_get_handler_data(irq); |
194 | struct irq_chip *chip = irq_get_chip(irq); | 199 | struct irq_chip *chip = irq_get_chip(irq); |
195 | 200 | ||
201 | chained_irq_enter(chip, desc); | ||
196 | chip->irq_mask(&desc->irq_data); | 202 | chip->irq_mask(&desc->irq_data); |
197 | 203 | ||
198 | if (chip->irq_ack) | 204 | if (chip->irq_ack) |
@@ -201,6 +207,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
201 | generic_handle_irq(*irq_data); | 207 | generic_handle_irq(*irq_data); |
202 | 208 | ||
203 | chip->irq_unmask(&desc->irq_data); | 209 | chip->irq_unmask(&desc->irq_data); |
210 | chained_irq_exit(chip, desc); | ||
204 | } | 211 | } |
205 | 212 | ||
206 | int __init exynos4_init_irq_eint(void) | 213 | int __init exynos4_init_irq_eint(void) |
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index 0e280d12301..b3b5d891100 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c | |||
@@ -79,7 +79,7 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct regulator_consumer_supply max8952_consumer = | 81 | static struct regulator_consumer_supply max8952_consumer = |
82 | REGULATOR_SUPPLY("vddarm", NULL); | 82 | REGULATOR_SUPPLY("vdd_arm", NULL); |
83 | 83 | ||
84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { | 84 | static struct max8952_platform_data universal_max8952_pdata __initdata = { |
85 | .gpio_vid0 = EXYNOS4_GPX0(3), | 85 | .gpio_vid0 = EXYNOS4_GPX0(3), |
@@ -105,7 +105,7 @@ static struct max8952_platform_data universal_max8952_pdata __initdata = { | |||
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct regulator_consumer_supply lp3974_buck1_consumer = | 107 | static struct regulator_consumer_supply lp3974_buck1_consumer = |
108 | REGULATOR_SUPPLY("vddint", NULL); | 108 | REGULATOR_SUPPLY("vdd_int", NULL); |
109 | 109 | ||
110 | static struct regulator_consumer_supply lp3974_buck2_consumer = | 110 | static struct regulator_consumer_supply lp3974_buck2_consumer = |
111 | REGULATOR_SUPPLY("vddg3d", NULL); | 111 | REGULATOR_SUPPLY("vddg3d", NULL); |
diff --git a/arch/arm/mach-exynos4/setup-usb-phy.c b/arch/arm/mach-exynos4/setup-usb-phy.c index 0883c1b824b..39aca045f66 100644 --- a/arch/arm/mach-exynos4/setup-usb-phy.c +++ b/arch/arm/mach-exynos4/setup-usb-phy.c | |||
@@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device *pdev) | |||
82 | 82 | ||
83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); | 83 | rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); |
84 | writel(rstcon, EXYNOS4_RSTCON); | 84 | writel(rstcon, EXYNOS4_RSTCON); |
85 | udelay(50); | 85 | udelay(80); |
86 | 86 | ||
87 | clk_disable(otg_clk); | 87 | clk_disable(otg_clk); |
88 | clk_put(otg_clk); | 88 | clk_put(otg_clk); |
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig index dc26fff22cf..c8e7afcf14e 100644 --- a/arch/arm/mach-footbridge/Kconfig +++ b/arch/arm/mach-footbridge/Kconfig | |||
@@ -62,6 +62,7 @@ config ARCH_EBSA285_HOST | |||
62 | config ARCH_NETWINDER | 62 | config ARCH_NETWINDER |
63 | bool "NetWinder" | 63 | bool "NetWinder" |
64 | select CLKSRC_I8253 | 64 | select CLKSRC_I8253 |
65 | select CLKEVT_I8253 | ||
65 | select FOOTBRIDGE_HOST | 66 | select FOOTBRIDGE_HOST |
66 | select ISA | 67 | select ISA |
67 | select ISA_DMA | 68 | select ISA_DMA |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index 1331fff51ae..18c32a5541d 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <video/vga.h> | ||
21 | 22 | ||
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 87887ac5806..f851fe90368 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = { | |||
310 | .init = eukrea_cpuimx27_timer_init, | 310 | .init = eukrea_cpuimx27_timer_init, |
311 | }; | 311 | }; |
312 | 312 | ||
313 | MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") | 313 | MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") |
314 | .boot_params = MX27_PHYS_OFFSET + 0x100, | 314 | .boot_params = MX27_PHYS_OFFSET + 0x100, |
315 | .map_io = mx27_map_io, | 315 | .map_io = mx27_map_io, |
316 | .init_early = imx27_init_early, | 316 | .init_early = imx27_init_early, |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index f39a478ba1a..4bd083ba9af 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -192,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = { | |||
192 | .init = eukrea_cpuimx35_timer_init, | 192 | .init = eukrea_cpuimx35_timer_init, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | 195 | MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") |
196 | /* Maintainer: Eukrea Electromatique */ | 196 | /* Maintainer: Eukrea Electromatique */ |
197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | 197 | .boot_params = MX3x_PHYS_OFFSET + 0x100, |
198 | .map_io = mx35_map_io, | 198 | .map_io = mx35_map_io, |
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c index da36da52969..2442d5da883 100644 --- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c +++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c | |||
@@ -161,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = { | |||
161 | .init = eukrea_cpuimx25_timer_init, | 161 | .init = eukrea_cpuimx25_timer_init, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | 164 | MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") |
165 | /* Maintainer: Eukrea Electromatique */ | 165 | /* Maintainer: Eukrea Electromatique */ |
166 | .boot_params = MX25_PHYS_OFFSET + 0x100, | 166 | .boot_params = MX25_PHYS_OFFSET + 0x100, |
167 | .map_io = mx25_map_io, | 167 | .map_io = mx25_map_io, |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index a6eddae82a0..c105556a0ee 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -77,7 +77,7 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
77 | /* | 77 | /* |
78 | * Check for devices with hard-wired IRQs. | 78 | * Check for devices with hard-wired IRQs. |
79 | */ | 79 | */ |
80 | irq = orion5x_pci_map_irq(const dev, slot, pin); | 80 | irq = orion5x_pci_map_irq(dev, slot, pin); |
81 | if (irq != -1) | 81 | if (irq != -1) |
82 | return irq; | 82 | return irq; |
83 | 83 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index 28b8760ab9f..bc4a920e26e 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/mbus.h> | 16 | #include <linux/mbus.h> |
17 | #include <video/vga.h> | ||
17 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
18 | #include <asm/mach/pci.h> | 19 | #include <asm/mach/pci.h> |
19 | #include <plat/pcie.h> | 20 | #include <plat/pcie.h> |
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h index a30f2e3ec17..6657ff23116 100644 --- a/arch/arm/mach-realview/include/mach/system.h +++ b/arch/arm/mach-realview/include/mach/system.h | |||
@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd) | |||
44 | */ | 44 | */ |
45 | if (realview_reset) | 45 | if (realview_reset) |
46 | realview_reset(mode); | 46 | realview_reset(mode); |
47 | dsb(); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 8bad6437068..055e2858b0d 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/suspend.h> | 16 | #include <linux/suspend.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <mach/map.h> | 21 | #include <mach/map.h> |
21 | #include <mach/irqs.h> | 22 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c index 69ed4545112..fe7380f5c3c 100644 --- a/arch/arm/mach-s5p64x0/irq-eint.c +++ b/arch/arm/mach-s5p64x0/irq-eint.c | |||
@@ -129,7 +129,7 @@ static int s5p64x0_alloc_gc(void) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | ct = gc->chip_types; | 131 | ct = gc->chip_types; |
132 | ct->chip.irq_ack = irq_gc_ack; | 132 | ct->chip.irq_ack = irq_gc_ack_set_bit; |
133 | ct->chip.irq_mask = irq_gc_mask_set_bit; | 133 | ct->chip.irq_mask = irq_gc_mask_set_bit; |
134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; | 134 | ct->chip.irq_unmask = irq_gc_mask_clr_bit; |
135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; | 135 | ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; |
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 309e388a8a8..f149d278377 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -88,7 +88,7 @@ static struct sleep_save s5pv210_core_save[] = { | |||
88 | SAVE_ITEM(S3C2410_TCNTO(0)), | 88 | SAVE_ITEM(S3C2410_TCNTO(0)), |
89 | }; | 89 | }; |
90 | 90 | ||
91 | void s5pv210_cpu_suspend(unsigned long arg) | 91 | static int s5pv210_cpu_suspend(unsigned long arg) |
92 | { | 92 | { |
93 | unsigned long tmp; | 93 | unsigned long tmp; |
94 | 94 | ||
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index ce5c2513c6c..cdfdd624d21 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -341,6 +341,7 @@ static struct platform_device mipidsi0_device = { | |||
341 | static struct sh_mobile_sdhi_info sdhi0_info = { | 341 | static struct sh_mobile_sdhi_info sdhi0_info = { |
342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 342 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 343 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
344 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | ||
344 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 345 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
345 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 346 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
346 | }; | 347 | }; |
@@ -382,7 +383,7 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) | |||
382 | } | 383 | } |
383 | 384 | ||
384 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { | 385 | static struct sh_mobile_sdhi_info sh_sdhi1_info = { |
385 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, | 386 | .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT, |
386 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, | 387 | .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, |
387 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 388 | .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
388 | .set_pwr = ag5evm_sdhi1_set_pwr, | 389 | .set_pwr = ag5evm_sdhi1_set_pwr, |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 9e0856b2f9e..523f608eb8c 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -1412,6 +1412,7 @@ static void __init ap4evb_init(void) | |||
1412 | fsi_init_pm_clock(); | 1412 | fsi_init_pm_clock(); |
1413 | sh7372_pm_init(); | 1413 | sh7372_pm_init(); |
1414 | pm_clk_add(&fsi_device.dev, "spu2"); | 1414 | pm_clk_add(&fsi_device.dev, "spu2"); |
1415 | pm_clk_add(&lcdc1_device.dev, "hdmi"); | ||
1415 | } | 1416 | } |
1416 | 1417 | ||
1417 | static void __init ap4evb_timer_init(void) | 1418 | static void __init ap4evb_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d41c01f83f1..17c19dc2560 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -641,6 +641,8 @@ static struct usbhs_private usbhs0_private = { | |||
641 | }, | 641 | }, |
642 | .driver_param = { | 642 | .driver_param = { |
643 | .buswait_bwait = 4, | 643 | .buswait_bwait = 4, |
644 | .d0_tx_id = SHDMA_SLAVE_USB0_TX, | ||
645 | .d1_rx_id = SHDMA_SLAVE_USB0_RX, | ||
644 | }, | 646 | }, |
645 | }, | 647 | }, |
646 | }; | 648 | }; |
@@ -810,6 +812,8 @@ static struct usbhs_private usbhs1_private = { | |||
810 | .buswait_bwait = 4, | 812 | .buswait_bwait = 4, |
811 | .pipe_type = usbhs1_pipe_cfg, | 813 | .pipe_type = usbhs1_pipe_cfg, |
812 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), | 814 | .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), |
815 | .d0_tx_id = SHDMA_SLAVE_USB1_TX, | ||
816 | .d1_rx_id = SHDMA_SLAVE_USB1_RX, | ||
813 | }, | 817 | }, |
814 | }, | 818 | }, |
815 | }; | 819 | }; |
@@ -1588,6 +1592,7 @@ static void __init mackerel_init(void) | |||
1588 | hdmi_init_pm_clock(); | 1592 | hdmi_init_pm_clock(); |
1589 | sh7372_pm_init(); | 1593 | sh7372_pm_init(); |
1590 | pm_clk_add(&fsi_device.dev, "spu2"); | 1594 | pm_clk_add(&fsi_device.dev, "spu2"); |
1595 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | ||
1591 | } | 1596 | } |
1592 | 1597 | ||
1593 | static void __init mackerel_timer_init(void) | 1598 | static void __init mackerel_timer_init(void) |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 6b1619a65db..66975921e64 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -503,16 +503,17 @@ static struct clk *late_main_clks[] = { | |||
503 | &sh7372_fsidivb_clk, | 503 | &sh7372_fsidivb_clk, |
504 | }; | 504 | }; |
505 | 505 | ||
506 | enum { MSTP001, | 506 | enum { MSTP001, MSTP000, |
507 | MSTP131, MSTP130, | 507 | MSTP131, MSTP130, |
508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, | 508 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, |
509 | MSTP118, MSTP117, MSTP116, MSTP113, | 509 | MSTP118, MSTP117, MSTP116, MSTP113, |
510 | MSTP106, MSTP101, MSTP100, | 510 | MSTP106, MSTP101, MSTP100, |
511 | MSTP223, | 511 | MSTP223, |
512 | MSTP218, MSTP217, MSTP216, | 512 | MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207, |
513 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 513 | MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
514 | MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, | 514 | MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, |
515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, | 515 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406, |
516 | MSTP405, MSTP404, MSTP403, MSTP400, | ||
516 | MSTP_NR }; | 517 | MSTP_NR }; |
517 | 518 | ||
518 | #define MSTP(_parent, _reg, _bit, _flags) \ | 519 | #define MSTP(_parent, _reg, _bit, _flags) \ |
@@ -520,6 +521,7 @@ enum { MSTP001, | |||
520 | 521 | ||
521 | static struct clk mstp_clks[MSTP_NR] = { | 522 | static struct clk mstp_clks[MSTP_NR] = { |
522 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ | 523 | [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ |
524 | [MSTP000] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 0, 0), /* MSIOF0 */ | ||
523 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ | 525 | [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ |
524 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ | 526 | [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ |
525 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ | 527 | [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ |
@@ -538,14 +540,16 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
538 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ | 540 | [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ |
539 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ | 541 | [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ |
540 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ | 542 | [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ |
543 | [MSTP214] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 14, 0), /* USBDMAC */ | ||
544 | [MSTP208] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 8, 0), /* MSIOF1 */ | ||
541 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | 545 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ |
542 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | 546 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ |
547 | [MSTP205] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 5, 0), /* MSIOF2 */ | ||
543 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ | 548 | [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ |
544 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ | 549 | [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ |
545 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ | 550 | [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ |
546 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ | 551 | [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ |
547 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 552 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
548 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | ||
549 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ | 553 | [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ |
550 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ | 554 | [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ |
551 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ | 555 | [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ |
@@ -557,8 +561,12 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
557 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ | 561 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ |
558 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ | 562 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ |
559 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ | 563 | [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ |
564 | [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USB-DMAC1 */ | ||
560 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ | 565 | [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ |
566 | [MSTP405] = MSTP(&r_clk, SMSTPCR4, 5, 0), /* CMT4 */ | ||
567 | [MSTP404] = MSTP(&r_clk, SMSTPCR4, 4, 0), /* CMT3 */ | ||
561 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ | 568 | [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ |
569 | [MSTP400] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* CMT2 */ | ||
562 | }; | 570 | }; |
563 | 571 | ||
564 | static struct clk_lookup lookups[] = { | 572 | static struct clk_lookup lookups[] = { |
@@ -609,6 +617,7 @@ static struct clk_lookup lookups[] = { | |||
609 | 617 | ||
610 | /* MSTP32 clocks */ | 618 | /* MSTP32 clocks */ |
611 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 619 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
620 | CLKDEV_DEV_ID("spi_sh_msiof.0", &mstp_clks[MSTP000]), /* MSIOF0 */ | ||
612 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ | 621 | CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ |
613 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ | 622 | CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ |
614 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ | 623 | CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ |
@@ -629,14 +638,16 @@ static struct clk_lookup lookups[] = { | |||
629 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ | 638 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ |
630 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ | 639 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ |
631 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ | 640 | CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ |
641 | CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */ | ||
642 | CLKDEV_DEV_ID("spi_sh_msiof.1", &mstp_clks[MSTP208]), /* MSIOF1 */ | ||
632 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 643 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
633 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ | 644 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ |
645 | CLKDEV_DEV_ID("spi_sh_msiof.2", &mstp_clks[MSTP205]), /* MSIOF2 */ | ||
634 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 646 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
635 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 647 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
636 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ | 648 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ |
637 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ | 649 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ |
638 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 650 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
639 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | ||
640 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ | 651 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ |
641 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ | 652 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ |
642 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ | 653 | CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ |
@@ -650,11 +661,17 @@ static struct clk_lookup lookups[] = { | |||
650 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ | 661 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ |
651 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ | 662 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ |
652 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ | 663 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ |
664 | CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */ | ||
653 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ | 665 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ |
654 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ | 666 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ |
655 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ | 667 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ |
668 | CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */ | ||
669 | CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */ | ||
656 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 670 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
671 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | ||
657 | 672 | ||
673 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | ||
674 | &div6_reparent_clks[DIV6_HDMI]), | ||
658 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 675 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
659 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 676 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
660 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 677 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 6db2ccabc2b..61a846bb30f 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -365,7 +365,7 @@ void __init sh73a0_clock_init(void) | |||
365 | __raw_writel(0x108, SD2CKCR); | 365 | __raw_writel(0x108, SD2CKCR); |
366 | 366 | ||
367 | /* detect main clock parent */ | 367 | /* detect main clock parent */ |
368 | switch ((__raw_readl(CKSCR) >> 24) & 0x03) { | 368 | switch ((__raw_readl(CKSCR) >> 28) & 0x03) { |
369 | case 0: | 369 | case 0: |
370 | main_clk.parent = &sh73a0_extal1_clk; | 370 | main_clk.parent = &sh73a0_extal1_clk; |
371 | break; | 371 | break; |
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index ce595cee86c..24e63a85e66 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -459,6 +459,10 @@ enum { | |||
459 | SHDMA_SLAVE_SDHI2_TX, | 459 | SHDMA_SLAVE_SDHI2_TX, |
460 | SHDMA_SLAVE_MMCIF_RX, | 460 | SHDMA_SLAVE_MMCIF_RX, |
461 | SHDMA_SLAVE_MMCIF_TX, | 461 | SHDMA_SLAVE_MMCIF_TX, |
462 | SHDMA_SLAVE_USB0_TX, | ||
463 | SHDMA_SLAVE_USB0_RX, | ||
464 | SHDMA_SLAVE_USB1_TX, | ||
465 | SHDMA_SLAVE_USB1_RX, | ||
462 | }; | 466 | }; |
463 | 467 | ||
464 | extern struct clk sh7372_extal1_clk; | 468 | extern struct clk sh7372_extal1_clk; |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 3b28743c77e..739315e30eb 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -379,7 +379,7 @@ enum { | |||
379 | /* BBIF2 */ | 379 | /* BBIF2 */ |
380 | VPU, | 380 | VPU, |
381 | TSIF1, | 381 | TSIF1, |
382 | _3DG_SGX530, | 382 | /* 3DG */ |
383 | _2DDMAC, | 383 | _2DDMAC, |
384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, | 384 | IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, |
385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, | 385 | IPMMU_IPMMUR, IPMMU_IPMMUR2, |
@@ -436,7 +436,7 @@ static struct intc_vect intcs_vectors[] = { | |||
436 | /* BBIF2 */ | 436 | /* BBIF2 */ |
437 | INTCS_VECT(VPU, 0x980), | 437 | INTCS_VECT(VPU, 0x980), |
438 | INTCS_VECT(TSIF1, 0x9a0), | 438 | INTCS_VECT(TSIF1, 0x9a0), |
439 | INTCS_VECT(_3DG_SGX530, 0x9e0), | 439 | /* 3DG */ |
440 | INTCS_VECT(_2DDMAC, 0xa00), | 440 | INTCS_VECT(_2DDMAC, 0xa00), |
441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), | 441 | INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), |
442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), | 442 | INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), |
@@ -521,7 +521,7 @@ static struct intc_mask_reg intcs_mask_registers[] = { | |||
521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, | 521 | RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, |
522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ | 522 | { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ |
523 | { 0, 0, MSIOF, 0, | 523 | { 0, 0, MSIOF, 0, |
524 | _3DG_SGX530, 0, 0, 0 } }, | 524 | 0, 0, 0, 0 } }, |
525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ | 525 | { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ |
526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, | 526 | { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, |
527 | 0, 0, 0, 0 } }, | 527 | 0, 0, 0, 0 } }, |
@@ -561,7 +561,6 @@ static struct intc_prio_reg intcs_prio_registers[] = { | |||
561 | TMU_TUNI2, TSIF1 } }, | 561 | TMU_TUNI2, TSIF1 } }, |
562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, | 562 | { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, |
563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, | 563 | { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, |
564 | { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, _3DG_SGX530, 0, 0 } }, | ||
565 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, | 564 | { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, |
566 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, | 565 | { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, |
567 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, | 566 | { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 79f0413d872..2d9b1b1a253 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -169,35 +169,35 @@ static struct platform_device scif6_device = { | |||
169 | }; | 169 | }; |
170 | 170 | ||
171 | /* CMT */ | 171 | /* CMT */ |
172 | static struct sh_timer_config cmt10_platform_data = { | 172 | static struct sh_timer_config cmt2_platform_data = { |
173 | .name = "CMT10", | 173 | .name = "CMT2", |
174 | .channel_offset = 0x10, | 174 | .channel_offset = 0x40, |
175 | .timer_bit = 0, | 175 | .timer_bit = 5, |
176 | .clockevent_rating = 125, | 176 | .clockevent_rating = 125, |
177 | .clocksource_rating = 125, | 177 | .clocksource_rating = 125, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static struct resource cmt10_resources[] = { | 180 | static struct resource cmt2_resources[] = { |
181 | [0] = { | 181 | [0] = { |
182 | .name = "CMT10", | 182 | .name = "CMT2", |
183 | .start = 0xe6138010, | 183 | .start = 0xe6130040, |
184 | .end = 0xe613801b, | 184 | .end = 0xe613004b, |
185 | .flags = IORESOURCE_MEM, | 185 | .flags = IORESOURCE_MEM, |
186 | }, | 186 | }, |
187 | [1] = { | 187 | [1] = { |
188 | .start = evt2irq(0x0b00), /* CMT1_CMT10 */ | 188 | .start = evt2irq(0x0b80), /* CMT2 */ |
189 | .flags = IORESOURCE_IRQ, | 189 | .flags = IORESOURCE_IRQ, |
190 | }, | 190 | }, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct platform_device cmt10_device = { | 193 | static struct platform_device cmt2_device = { |
194 | .name = "sh_cmt", | 194 | .name = "sh_cmt", |
195 | .id = 10, | 195 | .id = 2, |
196 | .dev = { | 196 | .dev = { |
197 | .platform_data = &cmt10_platform_data, | 197 | .platform_data = &cmt2_platform_data, |
198 | }, | 198 | }, |
199 | .resource = cmt10_resources, | 199 | .resource = cmt2_resources, |
200 | .num_resources = ARRAY_SIZE(cmt10_resources), | 200 | .num_resources = ARRAY_SIZE(cmt2_resources), |
201 | }; | 201 | }; |
202 | 202 | ||
203 | /* TMU */ | 203 | /* TMU */ |
@@ -602,6 +602,150 @@ static struct platform_device dma2_device = { | |||
602 | }, | 602 | }, |
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* | ||
606 | * USB-DMAC | ||
607 | */ | ||
608 | |||
609 | unsigned int usbts_shift[] = {3, 4, 5}; | ||
610 | |||
611 | enum { | ||
612 | XMIT_SZ_8BYTE = 0, | ||
613 | XMIT_SZ_16BYTE = 1, | ||
614 | XMIT_SZ_32BYTE = 2, | ||
615 | }; | ||
616 | |||
617 | #define USBTS_INDEX2VAL(i) (((i) & 3) << 6) | ||
618 | |||
619 | static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = { | ||
620 | { | ||
621 | .offset = 0, | ||
622 | }, { | ||
623 | .offset = 0x20, | ||
624 | }, | ||
625 | }; | ||
626 | |||
627 | /* USB DMAC0 */ | ||
628 | static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = { | ||
629 | { | ||
630 | .slave_id = SHDMA_SLAVE_USB0_TX, | ||
631 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
632 | }, { | ||
633 | .slave_id = SHDMA_SLAVE_USB0_RX, | ||
634 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
635 | }, | ||
636 | }; | ||
637 | |||
638 | static struct sh_dmae_pdata usb_dma0_platform_data = { | ||
639 | .slave = sh7372_usb_dmae0_slaves, | ||
640 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves), | ||
641 | .channel = sh7372_usb_dmae_channels, | ||
642 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
643 | .ts_low_shift = 6, | ||
644 | .ts_low_mask = 0xc0, | ||
645 | .ts_high_shift = 0, | ||
646 | .ts_high_mask = 0, | ||
647 | .ts_shift = usbts_shift, | ||
648 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
649 | .dmaor_init = DMAOR_DME, | ||
650 | .chcr_offset = 0x14, | ||
651 | .chcr_ie_bit = 1 << 5, | ||
652 | .dmaor_is_32bit = 1, | ||
653 | .needs_tend_set = 1, | ||
654 | .no_dmars = 1, | ||
655 | }; | ||
656 | |||
657 | static struct resource sh7372_usb_dmae0_resources[] = { | ||
658 | { | ||
659 | /* Channel registers and DMAOR */ | ||
660 | .start = 0xe68a0020, | ||
661 | .end = 0xe68a0064 - 1, | ||
662 | .flags = IORESOURCE_MEM, | ||
663 | }, | ||
664 | { | ||
665 | /* VCR/SWR/DMICR */ | ||
666 | .start = 0xe68a0000, | ||
667 | .end = 0xe68a0014 - 1, | ||
668 | .flags = IORESOURCE_MEM, | ||
669 | }, | ||
670 | { | ||
671 | /* IRQ for channels */ | ||
672 | .start = evt2irq(0x0a00), | ||
673 | .end = evt2irq(0x0a00), | ||
674 | .flags = IORESOURCE_IRQ, | ||
675 | }, | ||
676 | }; | ||
677 | |||
678 | static struct platform_device usb_dma0_device = { | ||
679 | .name = "sh-dma-engine", | ||
680 | .id = 3, | ||
681 | .resource = sh7372_usb_dmae0_resources, | ||
682 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources), | ||
683 | .dev = { | ||
684 | .platform_data = &usb_dma0_platform_data, | ||
685 | }, | ||
686 | }; | ||
687 | |||
688 | /* USB DMAC1 */ | ||
689 | static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = { | ||
690 | { | ||
691 | .slave_id = SHDMA_SLAVE_USB1_TX, | ||
692 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
693 | }, { | ||
694 | .slave_id = SHDMA_SLAVE_USB1_RX, | ||
695 | .chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE), | ||
696 | }, | ||
697 | }; | ||
698 | |||
699 | static struct sh_dmae_pdata usb_dma1_platform_data = { | ||
700 | .slave = sh7372_usb_dmae1_slaves, | ||
701 | .slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves), | ||
702 | .channel = sh7372_usb_dmae_channels, | ||
703 | .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels), | ||
704 | .ts_low_shift = 6, | ||
705 | .ts_low_mask = 0xc0, | ||
706 | .ts_high_shift = 0, | ||
707 | .ts_high_mask = 0, | ||
708 | .ts_shift = usbts_shift, | ||
709 | .ts_shift_num = ARRAY_SIZE(usbts_shift), | ||
710 | .dmaor_init = DMAOR_DME, | ||
711 | .chcr_offset = 0x14, | ||
712 | .chcr_ie_bit = 1 << 5, | ||
713 | .dmaor_is_32bit = 1, | ||
714 | .needs_tend_set = 1, | ||
715 | .no_dmars = 1, | ||
716 | }; | ||
717 | |||
718 | static struct resource sh7372_usb_dmae1_resources[] = { | ||
719 | { | ||
720 | /* Channel registers and DMAOR */ | ||
721 | .start = 0xe68c0020, | ||
722 | .end = 0xe68c0064 - 1, | ||
723 | .flags = IORESOURCE_MEM, | ||
724 | }, | ||
725 | { | ||
726 | /* VCR/SWR/DMICR */ | ||
727 | .start = 0xe68c0000, | ||
728 | .end = 0xe68c0014 - 1, | ||
729 | .flags = IORESOURCE_MEM, | ||
730 | }, | ||
731 | { | ||
732 | /* IRQ for channels */ | ||
733 | .start = evt2irq(0x1d00), | ||
734 | .end = evt2irq(0x1d00), | ||
735 | .flags = IORESOURCE_IRQ, | ||
736 | }, | ||
737 | }; | ||
738 | |||
739 | static struct platform_device usb_dma1_device = { | ||
740 | .name = "sh-dma-engine", | ||
741 | .id = 4, | ||
742 | .resource = sh7372_usb_dmae1_resources, | ||
743 | .num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources), | ||
744 | .dev = { | ||
745 | .platform_data = &usb_dma1_platform_data, | ||
746 | }, | ||
747 | }; | ||
748 | |||
605 | /* VPU */ | 749 | /* VPU */ |
606 | static struct uio_info vpu_platform_data = { | 750 | static struct uio_info vpu_platform_data = { |
607 | .name = "VPU5HG", | 751 | .name = "VPU5HG", |
@@ -818,7 +962,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { | |||
818 | &scif4_device, | 962 | &scif4_device, |
819 | &scif5_device, | 963 | &scif5_device, |
820 | &scif6_device, | 964 | &scif6_device, |
821 | &cmt10_device, | 965 | &cmt2_device, |
822 | &tmu00_device, | 966 | &tmu00_device, |
823 | &tmu01_device, | 967 | &tmu01_device, |
824 | }; | 968 | }; |
@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = { | |||
829 | &dma0_device, | 973 | &dma0_device, |
830 | &dma1_device, | 974 | &dma1_device, |
831 | &dma2_device, | 975 | &dma2_device, |
976 | &usb_dma0_device, | ||
977 | &usb_dma1_device, | ||
832 | &vpu_device, | 978 | &vpu_device, |
833 | &veu0_device, | 979 | &veu0_device, |
834 | &veu1_device, | 980 | &veu1_device, |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 9e6b93b1a04..d0d267a8d3f 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = { | |||
318 | .rate = 1000000, | 318 | .rate = 1000000, |
319 | }; | 319 | }; |
320 | 320 | ||
321 | static struct clk v2m_ref_clk = { | ||
322 | .rate = 32768, | ||
323 | }; | ||
324 | |||
321 | static struct clk dummy_apb_pclk; | 325 | static struct clk dummy_apb_pclk; |
322 | 326 | ||
323 | static struct clk_lookup v2m_lookups[] = { | 327 | static struct clk_lookup v2m_lookups[] = { |
@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = { | |||
348 | }, { /* CLCD */ | 352 | }, { /* CLCD */ |
349 | .dev_id = "mb:clcd", | 353 | .dev_id = "mb:clcd", |
350 | .clk = &osc1_clk, | 354 | .clk = &osc1_clk, |
355 | }, { /* SP805 WDT */ | ||
356 | .dev_id = "mb:wdt", | ||
357 | .clk = &v2m_ref_clk, | ||
351 | }, { /* SP804 timers */ | 358 | }, { /* SP804 timers */ |
352 | .dev_id = "sp804", | 359 | .dev_id = "sp804", |
353 | .con_id = "v2m-timer0", | 360 | .con_id = "v2m-timer0", |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 92bd102e398..2e6849b41f6 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -379,7 +379,7 @@ ENTRY(cpu_arm920_set_pte_ext) | |||
379 | 379 | ||
380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 380 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
381 | .globl cpu_arm920_suspend_size | 381 | .globl cpu_arm920_suspend_size |
382 | .equ cpu_arm920_suspend_size, 4 * 3 | 382 | .equ cpu_arm920_suspend_size, 4 * 4 |
383 | #ifdef CONFIG_PM_SLEEP | 383 | #ifdef CONFIG_PM_SLEEP |
384 | ENTRY(cpu_arm920_do_suspend) | 384 | ENTRY(cpu_arm920_do_suspend) |
385 | stmfd sp!, {r4 - r7, lr} | 385 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 2bbcf053dff..cd8f79c3a28 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -394,7 +394,7 @@ ENTRY(cpu_arm926_set_pte_ext) | |||
394 | 394 | ||
395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ | 395 | /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ |
396 | .globl cpu_arm926_suspend_size | 396 | .globl cpu_arm926_suspend_size |
397 | .equ cpu_arm926_suspend_size, 4 * 3 | 397 | .equ cpu_arm926_suspend_size, 4 * 4 |
398 | #ifdef CONFIG_PM_SLEEP | 398 | #ifdef CONFIG_PM_SLEEP |
399 | ENTRY(cpu_arm926_do_suspend) | 399 | ENTRY(cpu_arm926_do_suspend) |
400 | stmfd sp!, {r4 - r7, lr} | 400 | stmfd sp!, {r4 - r7, lr} |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 07219c2ae11..69e7f2ef738 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -182,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend) | |||
182 | 182 | ||
183 | ENTRY(cpu_sa1100_do_resume) | 183 | ENTRY(cpu_sa1100_do_resume) |
184 | ldmia r0, {r4 - r7} @ load cp regs | 184 | ldmia r0, {r4 - r7} @ load cp regs |
185 | mov r1, #0 | 185 | mov ip, #0 |
186 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs | 186 | mcr p15, 0, ip, c8, c7, 0 @ flush I+D TLBs |
187 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache | 187 | mcr p15, 0, ip, c7, c7, 0 @ flush I&D cache |
188 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB | 188 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB |
189 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB | 189 | mcr p15, 0, ip, c9, c0, 5 @ allow user space to use RB |
190 | 190 | ||
191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID | 191 | mcr p15, 0, r4, c3, c0, 0 @ domain ID |
192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 219138d2f15..a923aa0fd00 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -223,6 +223,22 @@ __v6_setup: | |||
223 | mrc p15, 0, r0, c1, c0, 0 @ read control register | 223 | mrc p15, 0, r0, c1, c0, 0 @ read control register |
224 | bic r0, r0, r5 @ clear bits them | 224 | bic r0, r0, r5 @ clear bits them |
225 | orr r0, r0, r6 @ set them | 225 | orr r0, r0, r6 @ set them |
226 | #ifdef CONFIG_ARM_ERRATA_364296 | ||
227 | /* | ||
228 | * Workaround for the 364296 ARM1136 r0p2 erratum (possible cache data | ||
229 | * corruption with hit-under-miss enabled). The conditional code below | ||
230 | * (setting the undocumented bit 31 in the auxiliary control register | ||
231 | * and the FI bit in the control register) disables hit-under-miss | ||
232 | * without putting the processor into full low interrupt latency mode. | ||
233 | */ | ||
234 | ldr r6, =0x4107b362 @ id for ARM1136 r0p2 | ||
235 | mrc p15, 0, r5, c0, c0, 0 @ get processor id | ||
236 | teq r5, r6 @ check for the faulty core | ||
237 | mrceq p15, 0, r5, c1, c0, 1 @ load aux control reg | ||
238 | orreq r5, r5, #(1 << 31) @ set the undocumented bit 31 | ||
239 | mcreq p15, 0, r5, c1, c0, 1 @ write aux control reg | ||
240 | orreq r0, r0, #(1 << 21) @ low interrupt latency configuration | ||
241 | #endif | ||
226 | mov pc, lr @ return to head.S:__ret | 242 | mov pc, lr @ return to head.S:__ret |
227 | 243 | ||
228 | /* | 244 | /* |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index a30e78542cc..9049c0764db 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin) | |||
66 | ENTRY(cpu_v7_reset) | 66 | ENTRY(cpu_v7_reset) |
67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register | 67 | mrc p15, 0, r1, c1, c0, 0 @ ctrl register |
68 | bic r1, r1, #0x1 @ ...............m | 68 | bic r1, r1, #0x1 @ ...............m |
69 | THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions) | ||
69 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU | 70 | mcr p15, 0, r1, c1, c0, 0 @ disable MMU |
70 | isb | 71 | isb |
71 | mov pc, r0 | 72 | mov pc, r0 |
@@ -247,13 +248,16 @@ ENTRY(cpu_v7_do_resume) | |||
247 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 248 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 |
248 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 249 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 |
249 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
250 | mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register | 251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register |
252 | teq r4, r10 @ Is it already set? | ||
253 | mcrne p15, 0, r10, c1, c0, 1 @ No, so write it | ||
251 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 254 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control |
252 | ldr r4, =PRRR @ PRRR | 255 | ldr r4, =PRRR @ PRRR |
253 | ldr r5, =NMRR @ NMRR | 256 | ldr r5, =NMRR @ NMRR |
254 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR | 257 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR |
255 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR | 258 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR |
256 | isb | 259 | isb |
260 | dsb | ||
257 | mov r0, r9 @ control register | 261 | mov r0, r9 @ control register |
258 | mov r2, r7, lsr #14 @ get TTB0 base | 262 | mov r2, r7, lsr #14 @ get TTB0 base |
259 | mov r2, r2, lsl #14 | 263 | mov r2, r2, lsl #14 |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 28c72a2006a..755e1bf2268 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -406,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext) | |||
406 | .align | 406 | .align |
407 | 407 | ||
408 | .globl cpu_xsc3_suspend_size | 408 | .globl cpu_xsc3_suspend_size |
409 | .equ cpu_xsc3_suspend_size, 4 * 8 | 409 | .equ cpu_xsc3_suspend_size, 4 * 7 |
410 | #ifdef CONFIG_PM_SLEEP | 410 | #ifdef CONFIG_PM_SLEEP |
411 | ENTRY(cpu_xsc3_do_suspend) | 411 | ENTRY(cpu_xsc3_do_suspend) |
412 | stmfd sp!, {r4 - r10, lr} | 412 | stmfd sp!, {r4 - r10, lr} |
@@ -418,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend) | |||
418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 418 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg |
419 | mrc p15, 0, r10, c1, c0, 0 @ control reg | 419 | mrc p15, 0, r10, c1, c0, 0 @ control reg |
420 | bic r4, r4, #2 @ clear frequency change bit | 420 | bic r4, r4, #2 @ clear frequency change bit |
421 | stmia r0, {r1, r4 - r10} @ store v:p offset + cp regs | 421 | stmia r0, {r4 - r10} @ store cp regs |
422 | ldmia sp!, {r4 - r10, pc} | 422 | ldmia sp!, {r4 - r10, pc} |
423 | ENDPROC(cpu_xsc3_do_suspend) | 423 | ENDPROC(cpu_xsc3_do_suspend) |
424 | 424 | ||
425 | ENTRY(cpu_xsc3_do_resume) | 425 | ENTRY(cpu_xsc3_do_resume) |
426 | ldmia r0, {r1, r4 - r10} @ load v:p offset + cp regs | 426 | ldmia r0, {r4 - r10} @ load cp regs |
427 | mov ip, #0 | 427 | mov ip, #0 |
428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB | 428 | mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB |
429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer | 429 | mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b40974495..9a6a5385491 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -622,7 +622,8 @@ static struct dev_pm_domain omap_device_pm_domain = { | |||
622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 622 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |
623 | _od_runtime_idle) | 623 | _od_runtime_idle) |
624 | USE_PLATFORM_PM_SLEEP_OPS | 624 | USE_PLATFORM_PM_SLEEP_OPS |
625 | SET_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq, _od_resume_noirq) | 625 | .suspend_noirq = _od_suspend_noirq, |
626 | .resume_noirq = _od_resume_noirq, | ||
626 | } | 627 | } |
627 | }; | 628 | }; |
628 | 629 | ||
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 02af235298e..5f84a3f13ef 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk) | |||
192 | if (IS_ERR(pclk)) | 192 | if (IS_ERR(pclk)) |
193 | return -EINVAL; | 193 | return -EINVAL; |
194 | 194 | ||
195 | rate = pclk->ops->get_rate(clk); | 195 | rate = pclk->ops->get_rate(pclk); |
196 | clk_put(pclk); | 196 | clk_put(pclk); |
197 | 197 | ||
198 | return rate; | 198 | return rate; |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 327ab9f662e..f71078ef6bb 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <plat/gpio-core.h> | 23 | #include <plat/gpio-core.h> |
24 | #include <plat/gpio-cfg.h> | 24 | #include <plat/gpio-cfg.h> |
25 | 25 | ||
26 | #include <asm/mach/irq.h> | ||
27 | |||
26 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) | 28 | #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) |
27 | 29 | ||
28 | #define CON_OFFSET 0x700 | 30 | #define CON_OFFSET 0x700 |
@@ -81,6 +83,9 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
81 | int group, pend_offset, mask_offset; | 83 | int group, pend_offset, mask_offset; |
82 | unsigned int pend, mask; | 84 | unsigned int pend, mask; |
83 | 85 | ||
86 | struct irq_chip *chip = irq_get_chip(irq); | ||
87 | chained_irq_enter(chip, desc); | ||
88 | |||
84 | for (group = 0; group < bank->nr_groups; group++) { | 89 | for (group = 0; group < bank->nr_groups; group++) { |
85 | struct s3c_gpio_chip *chip = bank->chips[group]; | 90 | struct s3c_gpio_chip *chip = bank->chips[group]; |
86 | if (!chip) | 91 | if (!chip) |
@@ -102,6 +107,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | |||
102 | pend &= ~BIT(offset); | 107 | pend &= ~BIT(offset); |
103 | } | 108 | } |
104 | } | 109 | } |
110 | chained_irq_exit(chip, desc); | ||
105 | } | 111 | } |
106 | 112 | ||
107 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) | 113 | static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) |
diff --git a/arch/arm/plat-samsung/include/plat/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h index 51d8da846a6..ad530c78fe8 100644 --- a/arch/arm/plat-samsung/include/plat/backlight.h +++ b/arch/arm/plat-samsung/include/plat/backlight.h | |||
@@ -20,7 +20,7 @@ struct samsung_bl_gpio_info { | |||
20 | int func; | 20 | int func; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | 23 | extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, |
24 | struct platform_pwm_backlight_data *bl_data); | 24 | struct platform_pwm_backlight_data *bl_data); |
25 | 25 | ||
26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ | 26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ |
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index f714d060370..51583cd3016 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -22,9 +22,14 @@ | |||
22 | #include <plat/irq-vic-timer.h> | 22 | #include <plat/irq-vic-timer.h> |
23 | #include <plat/regs-timer.h> | 23 | #include <plat/regs-timer.h> |
24 | 24 | ||
25 | #include <asm/mach/irq.h> | ||
26 | |||
25 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) | 27 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) |
26 | { | 28 | { |
29 | struct irq_chip *chip = irq_get_chip(irq); | ||
30 | chained_irq_enter(chip, desc); | ||
27 | generic_handle_irq((int)desc->irq_data.handler_data); | 31 | generic_handle_irq((int)desc->irq_data.handler_data); |
32 | chained_irq_exit(chip, desc); | ||
28 | } | 33 | } |
29 | 34 | ||
30 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ | 35 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index fff68d0d521..62cc8f98117 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -351,7 +351,7 @@ centro MACH_CENTRO CENTRO 1944 | |||
351 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 | 351 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 |
352 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 | 352 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 |
353 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 | 353 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 |
354 | eukrea_cpuimx27 MACH_CPUIMX27 CPUIMX27 1975 | 354 | eukrea_cpuimx27 MACH_EUKREA_CPUIMX27 EUKREA_CPUIMX27 1975 |
355 | acs5k MACH_ACS5K ACS5K 1982 | 355 | acs5k MACH_ACS5K ACS5K 1982 |
356 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 | 356 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 |
357 | dsm320 MACH_DSM320 DSM320 1988 | 357 | dsm320 MACH_DSM320 DSM320 1988 |
@@ -476,8 +476,8 @@ cns3420vb MACH_CNS3420VB CNS3420VB 2776 | |||
476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 476 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 477 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 | 478 | teton_bga MACH_TETON_BGA TETON_BGA 2816 |
479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 | 479 | eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25SD EUKREA_CPUIMX25SD 2820 |
480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 | 480 | eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 |
481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 481 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 482 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 483 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
diff --git a/arch/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index c7fd394d28a..6eba53530d1 100644 --- a/arch/avr32/kernel/syscall_table.S +++ b/arch/avr32/kernel/syscall_table.S | |||
@@ -158,7 +158,7 @@ sys_call_table: | |||
158 | .long sys_sched_rr_get_interval | 158 | .long sys_sched_rr_get_interval |
159 | .long sys_nanosleep | 159 | .long sys_nanosleep |
160 | .long sys_poll | 160 | .long sys_poll |
161 | .long sys_nfsservctl /* 145 */ | 161 | .long sys_ni_syscall /* 145 was nfsservctl */ |
162 | .long sys_setresgid | 162 | .long sys_setresgid |
163 | .long sys_getresgid | 163 | .long sys_getresgid |
164 | .long sys_prctl | 164 | .long sys_prctl |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 225d311c970..e4137297b79 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -1543,7 +1543,7 @@ ENTRY(_sys_call_table) | |||
1543 | .long _sys_ni_syscall /* for vm86 */ | 1543 | .long _sys_ni_syscall /* for vm86 */ |
1544 | .long _sys_ni_syscall /* old "query_module" */ | 1544 | .long _sys_ni_syscall /* old "query_module" */ |
1545 | .long _sys_ni_syscall /* sys_poll */ | 1545 | .long _sys_ni_syscall /* sys_poll */ |
1546 | .long _sys_nfsservctl | 1546 | .long _sys_ni_syscall /* old nfsservctl */ |
1547 | .long _sys_setresgid /* setresgid16 */ /* 170 */ | 1547 | .long _sys_setresgid /* setresgid16 */ /* 170 */ |
1548 | .long _sys_getresgid /* getresgid16 */ | 1548 | .long _sys_getresgid /* getresgid16 */ |
1549 | .long _sys_prctl | 1549 | .long _sys_prctl |
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index 1161883eb58..592fbe9dfb6 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -771,7 +771,7 @@ sys_call_table: | |||
771 | .long sys_ni_syscall /* sys_vm86 */ | 771 | .long sys_ni_syscall /* sys_vm86 */ |
772 | .long sys_ni_syscall /* Old sys_query_module */ | 772 | .long sys_ni_syscall /* Old sys_query_module */ |
773 | .long sys_poll | 773 | .long sys_poll |
774 | .long sys_nfsservctl | 774 | .long sys_ni_syscall /* old nfsservctl */ |
775 | .long sys_setresgid16 /* 170 */ | 775 | .long sys_setresgid16 /* 170 */ |
776 | .long sys_getresgid16 | 776 | .long sys_getresgid16 |
777 | .long sys_prctl | 777 | .long sys_prctl |
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 84fed7e91ad..c3ea4694fba 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
@@ -714,7 +714,7 @@ sys_call_table: | |||
714 | .long sys_ni_syscall /* sys_vm86 */ | 714 | .long sys_ni_syscall /* sys_vm86 */ |
715 | .long sys_ni_syscall /* Old sys_query_module */ | 715 | .long sys_ni_syscall /* Old sys_query_module */ |
716 | .long sys_poll | 716 | .long sys_poll |
717 | .long sys_nfsservctl | 717 | .long sys_ni_syscall /* Old nfsservctl */ |
718 | .long sys_setresgid16 /* 170 */ | 718 | .long sys_setresgid16 /* 170 */ |
719 | .long sys_getresgid16 | 719 | .long sys_getresgid16 |
720 | .long sys_prctl | 720 | .long sys_prctl |
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 017d6d7b784..5ba23f715ea 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -1358,7 +1358,7 @@ sys_call_table: | |||
1358 | .long sys_ni_syscall /* for vm86 */ | 1358 | .long sys_ni_syscall /* for vm86 */ |
1359 | .long sys_ni_syscall /* Old sys_query_module */ | 1359 | .long sys_ni_syscall /* Old sys_query_module */ |
1360 | .long sys_poll | 1360 | .long sys_poll |
1361 | .long sys_nfsservctl | 1361 | .long sys_ni_syscall /* Old nfsservctl */ |
1362 | .long sys_setresgid16 /* 170 */ | 1362 | .long sys_setresgid16 /* 170 */ |
1363 | .long sys_getresgid16 | 1363 | .long sys_getresgid16 |
1364 | .long sys_prctl | 1364 | .long sys_prctl |
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S index f4b2e67bcc3..4be2ea2fbe2 100644 --- a/arch/h8300/kernel/syscalls.S +++ b/arch/h8300/kernel/syscalls.S | |||
@@ -183,7 +183,7 @@ SYMBOL_NAME_LABEL(sys_call_table) | |||
183 | .long SYMBOL_NAME(sys_ni_syscall) /* for vm86 */ | 183 | .long SYMBOL_NAME(sys_ni_syscall) /* for vm86 */ |
184 | .long SYMBOL_NAME(sys_ni_syscall) /* sys_query_module */ | 184 | .long SYMBOL_NAME(sys_ni_syscall) /* sys_query_module */ |
185 | .long SYMBOL_NAME(sys_poll) | 185 | .long SYMBOL_NAME(sys_poll) |
186 | .long SYMBOL_NAME(sys_nfsservctl) | 186 | .long SYMBOL_NAME(sys_ni_syscall) /* old nfsservctl */ |
187 | .long SYMBOL_NAME(sys_setresgid16) /* 170 */ | 187 | .long SYMBOL_NAME(sys_setresgid16) /* 170 */ |
188 | .long SYMBOL_NAME(sys_getresgid16) | 188 | .long SYMBOL_NAME(sys_getresgid16) |
189 | .long SYMBOL_NAME(sys_prctl) | 189 | .long SYMBOL_NAME(sys_prctl) |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 97dd2abdeb1..198c753d100 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1614,7 +1614,7 @@ sys_call_table: | |||
1614 | data8 sys_sched_get_priority_min | 1614 | data8 sys_sched_get_priority_min |
1615 | data8 sys_sched_rr_get_interval | 1615 | data8 sys_sched_rr_get_interval |
1616 | data8 sys_nanosleep | 1616 | data8 sys_nanosleep |
1617 | data8 sys_nfsservctl | 1617 | data8 sys_ni_syscall // old nfsservctl |
1618 | data8 sys_prctl // 1170 | 1618 | data8 sys_prctl // 1170 |
1619 | data8 sys_getpagesize | 1619 | data8 sys_getpagesize |
1620 | data8 sys_mmap2 | 1620 | data8 sys_mmap2 |
diff --git a/arch/m32r/kernel/syscall_table.S b/arch/m32r/kernel/syscall_table.S index 528f2e6ad06..f365c19795e 100644 --- a/arch/m32r/kernel/syscall_table.S +++ b/arch/m32r/kernel/syscall_table.S | |||
@@ -168,7 +168,7 @@ ENTRY(sys_call_table) | |||
168 | .long sys_tas /* vm86 syscall holder */ | 168 | .long sys_tas /* vm86 syscall holder */ |
169 | .long sys_ni_syscall /* query_module syscall holder */ | 169 | .long sys_ni_syscall /* query_module syscall holder */ |
170 | .long sys_poll | 170 | .long sys_poll |
171 | .long sys_nfsservctl | 171 | .long sys_ni_syscall /* was nfsservctl */ |
172 | .long sys_setresgid /* 170 */ | 172 | .long sys_setresgid /* 170 */ |
173 | .long sys_getresgid | 173 | .long sys_getresgid |
174 | .long sys_prctl | 174 | .long sys_prctl |
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S index 00d1452f957..c468f2edaa8 100644 --- a/arch/m68k/kernel/syscalltable.S +++ b/arch/m68k/kernel/syscalltable.S | |||
@@ -189,7 +189,7 @@ ENTRY(sys_call_table) | |||
189 | .long sys_getpagesize | 189 | .long sys_getpagesize |
190 | .long sys_ni_syscall /* old "query_module" */ | 190 | .long sys_ni_syscall /* old "query_module" */ |
191 | .long sys_poll | 191 | .long sys_poll |
192 | .long sys_nfsservctl | 192 | .long sys_ni_syscall /* old nfsservctl */ |
193 | .long sys_setresgid16 /* 170 */ | 193 | .long sys_setresgid16 /* 170 */ |
194 | .long sys_getresgid16 | 194 | .long sys_getresgid16 |
195 | .long sys_prctl | 195 | .long sys_prctl |
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index d915a122c86..8789daa2a34 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S | |||
@@ -173,7 +173,7 @@ ENTRY(sys_call_table) | |||
173 | .long sys_ni_syscall /* sys_vm86 */ | 173 | .long sys_ni_syscall /* sys_vm86 */ |
174 | .long sys_ni_syscall /* Old sys_query_module */ | 174 | .long sys_ni_syscall /* Old sys_query_module */ |
175 | .long sys_poll | 175 | .long sys_poll |
176 | .long sys_nfsservctl | 176 | .long sys_ni_syscall /* old nfsservctl */ |
177 | .long sys_setresgid /* 170 */ | 177 | .long sys_setresgid /* 170 */ |
178 | .long sys_getresgid | 178 | .long sys_getresgid |
179 | .long sys_prctl | 179 | .long sys_prctl |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index e521420a45a..865bc7a6f5a 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -424,7 +424,7 @@ einval: li v0, -ENOSYS | |||
424 | sys sys_getresuid 3 | 424 | sys sys_getresuid 3 |
425 | sys sys_ni_syscall 0 /* was sys_query_module */ | 425 | sys sys_ni_syscall 0 /* was sys_query_module */ |
426 | sys sys_poll 3 | 426 | sys sys_poll 3 |
427 | sys sys_nfsservctl 3 | 427 | sys sys_ni_syscall 0 /* was nfsservctl */ |
428 | sys sys_setresgid 3 /* 4190 */ | 428 | sys sys_setresgid 3 /* 4190 */ |
429 | sys sys_getresgid 3 | 429 | sys sys_getresgid 3 |
430 | sys sys_prctl 5 | 430 | sys sys_prctl 5 |
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 85874d6a8a7..fb7334bea73 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -299,7 +299,7 @@ sys_call_table: | |||
299 | PTR sys_ni_syscall /* 5170, was get_kernel_syms */ | 299 | PTR sys_ni_syscall /* 5170, was get_kernel_syms */ |
300 | PTR sys_ni_syscall /* was query_module */ | 300 | PTR sys_ni_syscall /* was query_module */ |
301 | PTR sys_quotactl | 301 | PTR sys_quotactl |
302 | PTR sys_nfsservctl | 302 | PTR sys_ni_syscall /* was nfsservctl */ |
303 | PTR sys_ni_syscall /* res. for getpmsg */ | 303 | PTR sys_ni_syscall /* res. for getpmsg */ |
304 | PTR sys_ni_syscall /* 5175 for putpmsg */ | 304 | PTR sys_ni_syscall /* 5175 for putpmsg */ |
305 | PTR sys_ni_syscall /* res. for afs_syscall */ | 305 | PTR sys_ni_syscall /* res. for afs_syscall */ |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index b85842fc87a..f9296e894e4 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -294,7 +294,7 @@ EXPORT(sysn32_call_table) | |||
294 | PTR sys_ni_syscall /* 6170, was get_kernel_syms */ | 294 | PTR sys_ni_syscall /* 6170, was get_kernel_syms */ |
295 | PTR sys_ni_syscall /* was query_module */ | 295 | PTR sys_ni_syscall /* was query_module */ |
296 | PTR sys_quotactl | 296 | PTR sys_quotactl |
297 | PTR compat_sys_nfsservctl | 297 | PTR sys_ni_syscall /* was nfsservctl */ |
298 | PTR sys_ni_syscall /* res. for getpmsg */ | 298 | PTR sys_ni_syscall /* res. for getpmsg */ |
299 | PTR sys_ni_syscall /* 6175 for putpmsg */ | 299 | PTR sys_ni_syscall /* 6175 for putpmsg */ |
300 | PTR sys_ni_syscall /* res. for afs_syscall */ | 300 | PTR sys_ni_syscall /* res. for afs_syscall */ |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 46c4763edf2..4d7c9827706 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -392,7 +392,7 @@ sys_call_table: | |||
392 | PTR sys_getresuid | 392 | PTR sys_getresuid |
393 | PTR sys_ni_syscall /* was query_module */ | 393 | PTR sys_ni_syscall /* was query_module */ |
394 | PTR sys_poll | 394 | PTR sys_poll |
395 | PTR compat_sys_nfsservctl | 395 | PTR sys_ni_syscall /* was nfsservctl */ |
396 | PTR sys_setresgid /* 4190 */ | 396 | PTR sys_setresgid /* 4190 */ |
397 | PTR sys_getresgid | 397 | PTR sys_getresgid |
398 | PTR sys_prctl | 398 | PTR sys_prctl |
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index ae435e1d566..3e3620d9fc4 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S | |||
@@ -589,7 +589,7 @@ ENTRY(sys_call_table) | |||
589 | .long sys_ni_syscall /* vm86 */ | 589 | .long sys_ni_syscall /* vm86 */ |
590 | .long sys_ni_syscall /* Old sys_query_module */ | 590 | .long sys_ni_syscall /* Old sys_query_module */ |
591 | .long sys_poll | 591 | .long sys_poll |
592 | .long sys_nfsservctl | 592 | .long sys_ni_syscall /* was nfsservctl */ |
593 | .long sys_setresgid16 /* 170 */ | 593 | .long sys_setresgid16 /* 170 */ |
594 | .long sys_getresgid16 | 594 | .long sys_getresgid16 |
595 | .long sys_prctl | 595 | .long sys_prctl |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index e66366fd2ab..3735abd7f8f 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -259,7 +259,7 @@ | |||
259 | ENTRY_SAME(ni_syscall) /* query_module */ | 259 | ENTRY_SAME(ni_syscall) /* query_module */ |
260 | ENTRY_SAME(poll) | 260 | ENTRY_SAME(poll) |
261 | /* structs contain pointers and an in_addr... */ | 261 | /* structs contain pointers and an in_addr... */ |
262 | ENTRY_COMP(nfsservctl) | 262 | ENTRY_SAME(ni_syscall) /* was nfsservctl */ |
263 | ENTRY_SAME(setresgid) /* 170 */ | 263 | ENTRY_SAME(setresgid) /* 170 */ |
264 | ENTRY_SAME(getresgid) | 264 | ENTRY_SAME(getresgid) |
265 | ENTRY_SAME(prctl) | 265 | ENTRY_SAME(prctl) |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index f6736b7da46..fa0d27a400d 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -171,7 +171,7 @@ SYSCALL_SPU(setresuid) | |||
171 | SYSCALL_SPU(getresuid) | 171 | SYSCALL_SPU(getresuid) |
172 | SYSCALL(ni_syscall) | 172 | SYSCALL(ni_syscall) |
173 | SYSCALL_SPU(poll) | 173 | SYSCALL_SPU(poll) |
174 | COMPAT_SYS(nfsservctl) | 174 | SYSCALL(ni_syscall) |
175 | SYSCALL_SPU(setresgid) | 175 | SYSCALL_SPU(setresgid) |
176 | SYSCALL_SPU(getresgid) | 176 | SYSCALL_SPU(getresgid) |
177 | COMPAT_SYS_SPU(prctl) | 177 | COMPAT_SYS_SPU(prctl) |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 08ab9aa6a0d..7526db6bf50 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -665,12 +665,6 @@ ENTRY(sys32_poll_wrapper) | |||
665 | lgfr %r4,%r4 # long | 665 | lgfr %r4,%r4 # long |
666 | jg sys_poll # branch to system call | 666 | jg sys_poll # branch to system call |
667 | 667 | ||
668 | ENTRY(compat_sys_nfsservctl_wrapper) | ||
669 | lgfr %r2,%r2 # int | ||
670 | llgtr %r3,%r3 # struct compat_nfsctl_arg* | ||
671 | llgtr %r4,%r4 # union compat_nfsctl_res* | ||
672 | jg compat_sys_nfsservctl # branch to system call | ||
673 | |||
674 | ENTRY(sys32_setresgid16_wrapper) | 668 | ENTRY(sys32_setresgid16_wrapper) |
675 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t | 669 | llgfr %r2,%r2 # __kernel_old_gid_emu31_t |
676 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t | 670 | llgfr %r3,%r3 # __kernel_old_gid_emu31_t |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 068f8465c4e..f297456dba7 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -396,17 +396,19 @@ static __init void detect_machine_facilities(void) | |||
396 | static __init void rescue_initrd(void) | 396 | static __init void rescue_initrd(void) |
397 | { | 397 | { |
398 | #ifdef CONFIG_BLK_DEV_INITRD | 398 | #ifdef CONFIG_BLK_DEV_INITRD |
399 | unsigned long min_initrd_addr = (unsigned long) _end + (4UL << 20); | ||
399 | /* | 400 | /* |
400 | * Move the initrd right behind the bss section in case it starts | 401 | * Just like in case of IPL from VM reader we make sure there is a |
401 | * within the bss section. So we don't overwrite it when the bss | 402 | * gap of 4MB between end of kernel and start of initrd. |
402 | * section gets cleared. | 403 | * That way we can also be sure that saving an NSS will succeed, |
404 | * which however only requires different segments. | ||
403 | */ | 405 | */ |
404 | if (!INITRD_START || !INITRD_SIZE) | 406 | if (!INITRD_START || !INITRD_SIZE) |
405 | return; | 407 | return; |
406 | if (INITRD_START >= (unsigned long) __bss_stop) | 408 | if (INITRD_START >= min_initrd_addr) |
407 | return; | 409 | return; |
408 | memmove(__bss_stop, (void *) INITRD_START, INITRD_SIZE); | 410 | memmove((void *) min_initrd_addr, (void *) INITRD_START, INITRD_SIZE); |
409 | INITRD_START = (unsigned long) __bss_stop; | 411 | INITRD_START = min_initrd_addr; |
410 | #endif | 412 | #endif |
411 | } | 413 | } |
412 | 414 | ||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 04361d5a427..48c71020636 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -1220,7 +1220,7 @@ static int __init reipl_fcp_init(void) | |||
1220 | /* sysfs: create fcp kset for mixing attr group and bin attrs */ | 1220 | /* sysfs: create fcp kset for mixing attr group and bin attrs */ |
1221 | reipl_fcp_kset = kset_create_and_add(IPL_FCP_STR, NULL, | 1221 | reipl_fcp_kset = kset_create_and_add(IPL_FCP_STR, NULL, |
1222 | &reipl_kset->kobj); | 1222 | &reipl_kset->kobj); |
1223 | if (!reipl_kset) { | 1223 | if (!reipl_fcp_kset) { |
1224 | free_page((unsigned long) reipl_block_fcp); | 1224 | free_page((unsigned long) reipl_block_fcp); |
1225 | return -ENOMEM; | 1225 | return -ENOMEM; |
1226 | } | 1226 | } |
@@ -1618,7 +1618,8 @@ static struct shutdown_action vmcmd_action = {SHUTDOWN_ACTION_VMCMD_STR, | |||
1618 | 1618 | ||
1619 | static void stop_run(struct shutdown_trigger *trigger) | 1619 | static void stop_run(struct shutdown_trigger *trigger) |
1620 | { | 1620 | { |
1621 | if (strcmp(trigger->name, ON_PANIC_STR) == 0) | 1621 | if (strcmp(trigger->name, ON_PANIC_STR) == 0 || |
1622 | strcmp(trigger->name, ON_RESTART_STR) == 0) | ||
1622 | disabled_wait((unsigned long) __builtin_return_address(0)); | 1623 | disabled_wait((unsigned long) __builtin_return_address(0)); |
1623 | while (sigp(smp_processor_id(), sigp_stop) == sigp_busy) | 1624 | while (sigp(smp_processor_id(), sigp_stop) == sigp_busy) |
1624 | cpu_relax(); | 1625 | cpu_relax(); |
@@ -1717,7 +1718,7 @@ static void do_panic(void) | |||
1717 | /* on restart */ | 1718 | /* on restart */ |
1718 | 1719 | ||
1719 | static struct shutdown_trigger on_restart_trigger = {ON_RESTART_STR, | 1720 | static struct shutdown_trigger on_restart_trigger = {ON_RESTART_STR, |
1720 | &reipl_action}; | 1721 | &stop_action}; |
1721 | 1722 | ||
1722 | static ssize_t on_restart_show(struct kobject *kobj, | 1723 | static ssize_t on_restart_show(struct kobject *kobj, |
1723 | struct kobj_attribute *attr, char *page) | 1724 | struct kobj_attribute *attr, char *page) |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 6ee39ef8fe4..73eb08c874f 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -177,7 +177,7 @@ SYSCALL(sys_getresuid16,sys_ni_syscall,sys32_getresuid16_wrapper) /* 165 old get | |||
177 | NI_SYSCALL /* for vm86 */ | 177 | NI_SYSCALL /* for vm86 */ |
178 | NI_SYSCALL /* old sys_query_module */ | 178 | NI_SYSCALL /* old sys_query_module */ |
179 | SYSCALL(sys_poll,sys_poll,sys32_poll_wrapper) | 179 | SYSCALL(sys_poll,sys_poll,sys32_poll_wrapper) |
180 | SYSCALL(sys_nfsservctl,sys_nfsservctl,compat_sys_nfsservctl_wrapper) | 180 | NI_SYSCALL /* old nfsservctl */ |
181 | SYSCALL(sys_setresgid16,sys_ni_syscall,sys32_setresgid16_wrapper) /* 170 old setresgid16 syscall */ | 181 | SYSCALL(sys_setresgid16,sys_ni_syscall,sys32_setresgid16_wrapper) /* 170 old setresgid16 syscall */ |
182 | SYSCALL(sys_getresgid16,sys_ni_syscall,sys32_getresgid16_wrapper) /* old getresgid16 syscall */ | 182 | SYSCALL(sys_getresgid16,sys_ni_syscall,sys32_getresgid16_wrapper) /* old getresgid16 syscall */ |
183 | SYSCALL(sys_prctl,sys_prctl,sys32_prctl_wrapper) | 183 | SYSCALL(sys_prctl,sys_prctl,sys32_prctl_wrapper) |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 39b051de4c7..293e39c59c0 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -185,7 +185,7 @@ ENTRY(sys_call_table) | |||
185 | .long sys_ni_syscall /* vm86 */ | 185 | .long sys_ni_syscall /* vm86 */ |
186 | .long sys_ni_syscall /* old "query_module" */ | 186 | .long sys_ni_syscall /* old "query_module" */ |
187 | .long sys_poll | 187 | .long sys_poll |
188 | .long sys_nfsservctl | 188 | .long sys_ni_syscall /* was nfsservctl */ |
189 | .long sys_setresgid16 /* 170 */ | 189 | .long sys_setresgid16 /* 170 */ |
190 | .long sys_getresgid16 | 190 | .long sys_getresgid16 |
191 | .long sys_prctl | 191 | .long sys_prctl |
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 089c4d825d0..ceb34b94afa 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -189,7 +189,7 @@ sys_call_table: | |||
189 | .long sys_ni_syscall /* vm86 */ | 189 | .long sys_ni_syscall /* vm86 */ |
190 | .long sys_ni_syscall /* old "query_module" */ | 190 | .long sys_ni_syscall /* old "query_module" */ |
191 | .long sys_poll | 191 | .long sys_poll |
192 | .long sys_nfsservctl | 192 | .long sys_ni_syscall /* was nfsservctl */ |
193 | .long sys_setresgid16 /* 170 */ | 193 | .long sys_setresgid16 /* 170 */ |
194 | .long sys_getresgid16 | 194 | .long sys_getresgid16 |
195 | .long sys_prctl | 195 | .long sys_prctl |
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h index 100b9c204e7..42851122bbd 100644 --- a/arch/sparc/kernel/irq.h +++ b/arch/sparc/kernel/irq.h | |||
@@ -88,7 +88,7 @@ BTFIXUPDEF_CALL(void, set_irq_udt, int) | |||
88 | #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu) | 88 | #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu) |
89 | 89 | ||
90 | /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */ | 90 | /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */ |
91 | #define SUN4D_IPI_IRQ 14 | 91 | #define SUN4D_IPI_IRQ 13 |
92 | 92 | ||
93 | extern void sun4d_ipi_interrupt(void); | 93 | extern void sun4d_ipi_interrupt(void); |
94 | 94 | ||
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 3e9daea1653..3c5bb784214 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -440,8 +440,14 @@ static void __init init_sparc64_elf_hwcap(void) | |||
440 | cap |= AV_SPARC_VIS; | 440 | cap |= AV_SPARC_VIS; |
441 | if (tlb_type == cheetah || tlb_type == cheetah_plus) | 441 | if (tlb_type == cheetah || tlb_type == cheetah_plus) |
442 | cap |= AV_SPARC_VIS | AV_SPARC_VIS2; | 442 | cap |= AV_SPARC_VIS | AV_SPARC_VIS2; |
443 | if (tlb_type == cheetah_plus) | 443 | if (tlb_type == cheetah_plus) { |
444 | cap |= AV_SPARC_POPC; | 444 | unsigned long impl, ver; |
445 | |||
446 | __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver)); | ||
447 | impl = ((ver >> 32) & 0xffff); | ||
448 | if (impl == PANTHER_IMPL) | ||
449 | cap |= AV_SPARC_POPC; | ||
450 | } | ||
445 | if (tlb_type == hypervisor) { | 451 | if (tlb_type == hypervisor) { |
446 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) | 452 | if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1) |
447 | cap |= AV_SPARC_ASI_BLK_INIT; | 453 | cap |= AV_SPARC_ASI_BLK_INIT; |
diff --git a/arch/sparc/kernel/sys32.S b/arch/sparc/kernel/sys32.S index 44e5faf1ad5..d97f3eb72e0 100644 --- a/arch/sparc/kernel/sys32.S +++ b/arch/sparc/kernel/sys32.S | |||
@@ -81,7 +81,6 @@ SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4) | |||
81 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) | 81 | SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5) |
82 | SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) | 82 | SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1) |
83 | SIGN1(sys32_mlockall, sys_mlockall, %o0) | 83 | SIGN1(sys32_mlockall, sys_mlockall, %o0) |
84 | SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0) | ||
85 | SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) | 84 | SIGN1(sys32_clock_nanosleep, compat_sys_clock_nanosleep, %o1) |
86 | SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) | 85 | SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1) |
87 | SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) | 86 | SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 6e492d59f6b..09d8ec45445 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -67,7 +67,7 @@ sys_call_table: | |||
67 | /*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall | 67 | /*235*/ .long sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall |
68 | /*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler | 68 | /*240*/ .long sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler |
69 | /*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep | 69 | /*245*/ .long sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep |
70 | /*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl | 70 | /*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_ni_syscall |
71 | /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep | 71 | /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep |
72 | /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun | 72 | /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun |
73 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy | 73 | /*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index f566518483b..edbec45d468 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -68,7 +68,7 @@ sys_call_table32: | |||
68 | .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall | 68 | .word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall |
69 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler | 69 | /*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler |
70 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep | 70 | .word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep |
71 | /*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl | 71 | /*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys_nis_syscall |
72 | .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep | 72 | .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep |
73 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun | 73 | /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun |
74 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy | 74 | .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy |
@@ -145,7 +145,7 @@ sys_call_table: | |||
145 | .word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall | 145 | .word sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys_mlockall |
146 | /*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler | 146 | /*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler |
147 | .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep | 147 | .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys_sched_rr_get_interval, sys_nanosleep |
148 | /*250*/ .word sys_64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl | 148 | /*250*/ .word sys_64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall |
149 | .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep | 149 | .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep |
150 | /*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun | 150 | /*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun |
151 | .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy | 151 | .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy |
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index a0e866d233e..54edb207ff3 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -672,7 +672,7 @@ ia32_sys_call_table: | |||
672 | .quad sys32_vm86_warning /* vm86 */ | 672 | .quad sys32_vm86_warning /* vm86 */ |
673 | .quad quiet_ni_syscall /* query_module */ | 673 | .quad quiet_ni_syscall /* query_module */ |
674 | .quad sys_poll | 674 | .quad sys_poll |
675 | .quad compat_sys_nfsservctl | 675 | .quad quiet_ni_syscall /* old nfsservctl */ |
676 | .quad sys_setresgid16 /* 170 */ | 676 | .quad sys_setresgid16 /* 170 */ |
677 | .quad sys_getresgid16 | 677 | .quad sys_getresgid16 |
678 | .quad sys_prctl | 678 | .quad sys_prctl |
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h index d92641cc7ac..20104057344 100644 --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h | |||
@@ -414,7 +414,7 @@ __SYSCALL(__NR_query_module, sys_ni_syscall) | |||
414 | __SYSCALL(__NR_quotactl, sys_quotactl) | 414 | __SYSCALL(__NR_quotactl, sys_quotactl) |
415 | 415 | ||
416 | #define __NR_nfsservctl 180 | 416 | #define __NR_nfsservctl 180 |
417 | __SYSCALL(__NR_nfsservctl, sys_nfsservctl) | 417 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) |
418 | 418 | ||
419 | /* reserved for LiS/STREAMS */ | 419 | /* reserved for LiS/STREAMS */ |
420 | #define __NR_getpmsg 181 | 420 | #define __NR_getpmsg 181 |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index fbb0a045a1a..bc19be332bc 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
@@ -168,7 +168,7 @@ ENTRY(sys_call_table) | |||
168 | .long ptregs_vm86 | 168 | .long ptregs_vm86 |
169 | .long sys_ni_syscall /* Old sys_query_module */ | 169 | .long sys_ni_syscall /* Old sys_query_module */ |
170 | .long sys_poll | 170 | .long sys_poll |
171 | .long sys_nfsservctl | 171 | .long sys_ni_syscall /* Old nfsservctl */ |
172 | .long sys_setresgid16 /* 170 */ | 172 | .long sys_setresgid16 /* 170 */ |
173 | .long sys_getresgid16 | 173 | .long sys_getresgid16 |
174 | .long sys_prctl | 174 | .long sys_prctl |
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c index 7000e74b308..58425adc22c 100644 --- a/arch/x86/platform/mrst/mrst.c +++ b/arch/x86/platform/mrst/mrst.c | |||
@@ -689,7 +689,9 @@ static int __init sfi_parse_devs(struct sfi_table_header *table) | |||
689 | irq_attr.trigger = 1; | 689 | irq_attr.trigger = 1; |
690 | irq_attr.polarity = 1; | 690 | irq_attr.polarity = 1; |
691 | io_apic_set_pci_routing(NULL, pentry->irq, &irq_attr); | 691 | io_apic_set_pci_routing(NULL, pentry->irq, &irq_attr); |
692 | } | 692 | } else |
693 | pentry->irq = 0; /* No irq */ | ||
694 | |||
693 | switch (pentry->type) { | 695 | switch (pentry->type) { |
694 | case SFI_DEV_TYPE_IPC: | 696 | case SFI_DEV_TYPE_IPC: |
695 | /* ID as IRQ is a hack that will go away */ | 697 | /* ID as IRQ is a hack that will go away */ |
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index a6f934f37f1..798ee6d285a 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -455,7 +455,7 @@ __SYSCALL(203, sys_reboot, 3) | |||
455 | #define __NR_quotactl 204 | 455 | #define __NR_quotactl 204 |
456 | __SYSCALL(204, sys_quotactl, 4) | 456 | __SYSCALL(204, sys_quotactl, 4) |
457 | #define __NR_nfsservctl 205 | 457 | #define __NR_nfsservctl 205 |
458 | __SYSCALL(205, sys_nfsservctl, 3) | 458 | __SYSCALL(205, sys_ni_syscall, 0) |
459 | #define __NR__sysctl 206 | 459 | #define __NR__sysctl 206 |
460 | __SYSCALL(206, sys_sysctl, 1) | 460 | __SYSCALL(206, sys_sysctl, 1) |
461 | #define __NR_bdflush 207 | 461 | #define __NR_bdflush 207 |
diff --git a/drivers/base/devres.c b/drivers/base/devres.c index cf7a0c78805..65cd7483245 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c | |||
@@ -397,6 +397,7 @@ static int remove_nodes(struct device *dev, | |||
397 | 397 | ||
398 | static int release_nodes(struct device *dev, struct list_head *first, | 398 | static int release_nodes(struct device *dev, struct list_head *first, |
399 | struct list_head *end, unsigned long flags) | 399 | struct list_head *end, unsigned long flags) |
400 | __releases(&dev->devres_lock) | ||
400 | { | 401 | { |
401 | LIST_HEAD(todo); | 402 | LIST_HEAD(todo); |
402 | int cnt; | 403 | int cnt; |
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index 33e1bed68fd..a4760e095ff 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c | |||
@@ -376,7 +376,7 @@ int devtmpfs_mount(const char *mntdir) | |||
376 | return err; | 376 | return err; |
377 | } | 377 | } |
378 | 378 | ||
379 | static __initdata DECLARE_COMPLETION(setup_done); | 379 | static DECLARE_COMPLETION(setup_done); |
380 | 380 | ||
381 | static int handle(const char *name, mode_t mode, struct device *dev) | 381 | static int handle(const char *name, mode_t mode, struct device *dev) |
382 | { | 382 | { |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 0cad9c7f6bb..99a5272d7c2 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -33,7 +33,7 @@ EXPORT_SYMBOL_GPL(platform_bus); | |||
33 | 33 | ||
34 | /** | 34 | /** |
35 | * arch_setup_pdev_archdata - Allow manipulation of archdata before its used | 35 | * arch_setup_pdev_archdata - Allow manipulation of archdata before its used |
36 | * @dev: platform device | 36 | * @pdev: platform device |
37 | * | 37 | * |
38 | * This is called before platform_device_add() such that any pdev_archdata may | 38 | * This is called before platform_device_add() such that any pdev_archdata may |
39 | * be setup before the platform_notifier is called. So if a user needs to | 39 | * be setup before the platform_notifier is called. So if a user needs to |
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index a846b2f95cf..2c18d584066 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | struct pm_clk_data { | 20 | struct pm_clk_data { |
21 | struct list_head clock_list; | 21 | struct list_head clock_list; |
22 | struct mutex lock; | 22 | spinlock_t lock; |
23 | }; | 23 | }; |
24 | 24 | ||
25 | enum pce_status { | 25 | enum pce_status { |
@@ -73,9 +73,9 @@ int pm_clk_add(struct device *dev, const char *con_id) | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | 75 | ||
76 | mutex_lock(&pcd->lock); | 76 | spin_lock_irq(&pcd->lock); |
77 | list_add_tail(&ce->node, &pcd->clock_list); | 77 | list_add_tail(&ce->node, &pcd->clock_list); |
78 | mutex_unlock(&pcd->lock); | 78 | spin_unlock_irq(&pcd->lock); |
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
@@ -83,8 +83,8 @@ int pm_clk_add(struct device *dev, const char *con_id) | |||
83 | * __pm_clk_remove - Destroy PM clock entry. | 83 | * __pm_clk_remove - Destroy PM clock entry. |
84 | * @ce: PM clock entry to destroy. | 84 | * @ce: PM clock entry to destroy. |
85 | * | 85 | * |
86 | * This routine must be called under the mutex protecting the PM list of clocks | 86 | * This routine must be called under the spinlock protecting the PM list of |
87 | * corresponding the the @ce's device. | 87 | * clocks corresponding the the @ce's device. |
88 | */ | 88 | */ |
89 | static void __pm_clk_remove(struct pm_clock_entry *ce) | 89 | static void __pm_clk_remove(struct pm_clock_entry *ce) |
90 | { | 90 | { |
@@ -123,7 +123,7 @@ void pm_clk_remove(struct device *dev, const char *con_id) | |||
123 | if (!pcd) | 123 | if (!pcd) |
124 | return; | 124 | return; |
125 | 125 | ||
126 | mutex_lock(&pcd->lock); | 126 | spin_lock_irq(&pcd->lock); |
127 | 127 | ||
128 | list_for_each_entry(ce, &pcd->clock_list, node) { | 128 | list_for_each_entry(ce, &pcd->clock_list, node) { |
129 | if (!con_id && !ce->con_id) { | 129 | if (!con_id && !ce->con_id) { |
@@ -137,7 +137,7 @@ void pm_clk_remove(struct device *dev, const char *con_id) | |||
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | mutex_unlock(&pcd->lock); | 140 | spin_unlock_irq(&pcd->lock); |
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
@@ -158,7 +158,7 @@ int pm_clk_init(struct device *dev) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | INIT_LIST_HEAD(&pcd->clock_list); | 160 | INIT_LIST_HEAD(&pcd->clock_list); |
161 | mutex_init(&pcd->lock); | 161 | spin_lock_init(&pcd->lock); |
162 | dev->power.subsys_data = pcd; | 162 | dev->power.subsys_data = pcd; |
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
@@ -181,12 +181,12 @@ void pm_clk_destroy(struct device *dev) | |||
181 | 181 | ||
182 | dev->power.subsys_data = NULL; | 182 | dev->power.subsys_data = NULL; |
183 | 183 | ||
184 | mutex_lock(&pcd->lock); | 184 | spin_lock_irq(&pcd->lock); |
185 | 185 | ||
186 | list_for_each_entry_safe_reverse(ce, c, &pcd->clock_list, node) | 186 | list_for_each_entry_safe_reverse(ce, c, &pcd->clock_list, node) |
187 | __pm_clk_remove(ce); | 187 | __pm_clk_remove(ce); |
188 | 188 | ||
189 | mutex_unlock(&pcd->lock); | 189 | spin_unlock_irq(&pcd->lock); |
190 | 190 | ||
191 | kfree(pcd); | 191 | kfree(pcd); |
192 | } | 192 | } |
@@ -220,13 +220,14 @@ int pm_clk_suspend(struct device *dev) | |||
220 | { | 220 | { |
221 | struct pm_clk_data *pcd = __to_pcd(dev); | 221 | struct pm_clk_data *pcd = __to_pcd(dev); |
222 | struct pm_clock_entry *ce; | 222 | struct pm_clock_entry *ce; |
223 | unsigned long flags; | ||
223 | 224 | ||
224 | dev_dbg(dev, "%s()\n", __func__); | 225 | dev_dbg(dev, "%s()\n", __func__); |
225 | 226 | ||
226 | if (!pcd) | 227 | if (!pcd) |
227 | return 0; | 228 | return 0; |
228 | 229 | ||
229 | mutex_lock(&pcd->lock); | 230 | spin_lock_irqsave(&pcd->lock, flags); |
230 | 231 | ||
231 | list_for_each_entry_reverse(ce, &pcd->clock_list, node) { | 232 | list_for_each_entry_reverse(ce, &pcd->clock_list, node) { |
232 | if (ce->status == PCE_STATUS_NONE) | 233 | if (ce->status == PCE_STATUS_NONE) |
@@ -238,7 +239,7 @@ int pm_clk_suspend(struct device *dev) | |||
238 | } | 239 | } |
239 | } | 240 | } |
240 | 241 | ||
241 | mutex_unlock(&pcd->lock); | 242 | spin_unlock_irqrestore(&pcd->lock, flags); |
242 | 243 | ||
243 | return 0; | 244 | return 0; |
244 | } | 245 | } |
@@ -251,13 +252,14 @@ int pm_clk_resume(struct device *dev) | |||
251 | { | 252 | { |
252 | struct pm_clk_data *pcd = __to_pcd(dev); | 253 | struct pm_clk_data *pcd = __to_pcd(dev); |
253 | struct pm_clock_entry *ce; | 254 | struct pm_clock_entry *ce; |
255 | unsigned long flags; | ||
254 | 256 | ||
255 | dev_dbg(dev, "%s()\n", __func__); | 257 | dev_dbg(dev, "%s()\n", __func__); |
256 | 258 | ||
257 | if (!pcd) | 259 | if (!pcd) |
258 | return 0; | 260 | return 0; |
259 | 261 | ||
260 | mutex_lock(&pcd->lock); | 262 | spin_lock_irqsave(&pcd->lock, flags); |
261 | 263 | ||
262 | list_for_each_entry(ce, &pcd->clock_list, node) { | 264 | list_for_each_entry(ce, &pcd->clock_list, node) { |
263 | if (ce->status == PCE_STATUS_NONE) | 265 | if (ce->status == PCE_STATUS_NONE) |
@@ -269,7 +271,7 @@ int pm_clk_resume(struct device *dev) | |||
269 | } | 271 | } |
270 | } | 272 | } |
271 | 273 | ||
272 | mutex_unlock(&pcd->lock); | 274 | spin_unlock_irqrestore(&pcd->lock, flags); |
273 | 275 | ||
274 | return 0; | 276 | return 0; |
275 | } | 277 | } |
@@ -344,6 +346,7 @@ int pm_clk_suspend(struct device *dev) | |||
344 | { | 346 | { |
345 | struct pm_clk_data *pcd = __to_pcd(dev); | 347 | struct pm_clk_data *pcd = __to_pcd(dev); |
346 | struct pm_clock_entry *ce; | 348 | struct pm_clock_entry *ce; |
349 | unsigned long flags; | ||
347 | 350 | ||
348 | dev_dbg(dev, "%s()\n", __func__); | 351 | dev_dbg(dev, "%s()\n", __func__); |
349 | 352 | ||
@@ -351,12 +354,12 @@ int pm_clk_suspend(struct device *dev) | |||
351 | if (!pcd || !dev->driver) | 354 | if (!pcd || !dev->driver) |
352 | return 0; | 355 | return 0; |
353 | 356 | ||
354 | mutex_lock(&pcd->lock); | 357 | spin_lock_irqsave(&pcd->lock, flags); |
355 | 358 | ||
356 | list_for_each_entry_reverse(ce, &pcd->clock_list, node) | 359 | list_for_each_entry_reverse(ce, &pcd->clock_list, node) |
357 | clk_disable(ce->clk); | 360 | clk_disable(ce->clk); |
358 | 361 | ||
359 | mutex_unlock(&pcd->lock); | 362 | spin_unlock_irqrestore(&pcd->lock, flags); |
360 | 363 | ||
361 | return 0; | 364 | return 0; |
362 | } | 365 | } |
@@ -369,6 +372,7 @@ int pm_clk_resume(struct device *dev) | |||
369 | { | 372 | { |
370 | struct pm_clk_data *pcd = __to_pcd(dev); | 373 | struct pm_clk_data *pcd = __to_pcd(dev); |
371 | struct pm_clock_entry *ce; | 374 | struct pm_clock_entry *ce; |
375 | unsigned long flags; | ||
372 | 376 | ||
373 | dev_dbg(dev, "%s()\n", __func__); | 377 | dev_dbg(dev, "%s()\n", __func__); |
374 | 378 | ||
@@ -376,12 +380,12 @@ int pm_clk_resume(struct device *dev) | |||
376 | if (!pcd || !dev->driver) | 380 | if (!pcd || !dev->driver) |
377 | return 0; | 381 | return 0; |
378 | 382 | ||
379 | mutex_lock(&pcd->lock); | 383 | spin_lock_irqsave(&pcd->lock, flags); |
380 | 384 | ||
381 | list_for_each_entry(ce, &pcd->clock_list, node) | 385 | list_for_each_entry(ce, &pcd->clock_list, node) |
382 | clk_enable(ce->clk); | 386 | clk_enable(ce->clk); |
383 | 387 | ||
384 | mutex_unlock(&pcd->lock); | 388 | spin_unlock_irqrestore(&pcd->lock, flags); |
385 | 389 | ||
386 | return 0; | 390 | return 0; |
387 | } | 391 | } |
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 873e2e4ac55..73b7b1a18fa 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL"); | |||
15 | static int bcma_bus_match(struct device *dev, struct device_driver *drv); | 15 | static int bcma_bus_match(struct device *dev, struct device_driver *drv); |
16 | static int bcma_device_probe(struct device *dev); | 16 | static int bcma_device_probe(struct device *dev); |
17 | static int bcma_device_remove(struct device *dev); | 17 | static int bcma_device_remove(struct device *dev); |
18 | static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env); | ||
18 | 19 | ||
19 | static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) | 20 | static ssize_t manuf_show(struct device *dev, struct device_attribute *attr, char *buf) |
20 | { | 21 | { |
@@ -49,6 +50,7 @@ static struct bus_type bcma_bus_type = { | |||
49 | .match = bcma_bus_match, | 50 | .match = bcma_bus_match, |
50 | .probe = bcma_device_probe, | 51 | .probe = bcma_device_probe, |
51 | .remove = bcma_device_remove, | 52 | .remove = bcma_device_remove, |
53 | .uevent = bcma_device_uevent, | ||
52 | .dev_attrs = bcma_device_attrs, | 54 | .dev_attrs = bcma_device_attrs, |
53 | }; | 55 | }; |
54 | 56 | ||
@@ -227,6 +229,16 @@ static int bcma_device_remove(struct device *dev) | |||
227 | return 0; | 229 | return 0; |
228 | } | 230 | } |
229 | 231 | ||
232 | static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env) | ||
233 | { | ||
234 | struct bcma_device *core = container_of(dev, struct bcma_device, dev); | ||
235 | |||
236 | return add_uevent_var(env, | ||
237 | "MODALIAS=bcma:m%04Xid%04Xrev%02Xcl%02X", | ||
238 | core->id.manuf, core->id.id, | ||
239 | core->id.rev, core->id.class); | ||
240 | } | ||
241 | |||
230 | static int __init bcma_modinit(void) | 242 | static int __init bcma_modinit(void) |
231 | { | 243 | { |
232 | int err; | 244 | int err; |
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index a5854735bb2..db7cb8111fb 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = { | |||
63 | /* Atheros AR3011 with sflash firmware*/ | 63 | /* Atheros AR3011 with sflash firmware*/ |
64 | { USB_DEVICE(0x0CF3, 0x3002) }, | 64 | { USB_DEVICE(0x0CF3, 0x3002) }, |
65 | { USB_DEVICE(0x13d3, 0x3304) }, | 65 | { USB_DEVICE(0x13d3, 0x3304) }, |
66 | { USB_DEVICE(0x0930, 0x0215) }, | ||
66 | 67 | ||
67 | /* Atheros AR9285 Malbec with sflash firmware */ | 68 | /* Atheros AR9285 Malbec with sflash firmware */ |
68 | { USB_DEVICE(0x03F0, 0x311D) }, | 69 | { USB_DEVICE(0x03F0, 0x311D) }, |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 91d13a9e8c6..3ef476070ba 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -106,6 +106,7 @@ static struct usb_device_id blacklist_table[] = { | |||
106 | /* Atheros 3011 with sflash firmware */ | 106 | /* Atheros 3011 with sflash firmware */ |
107 | { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, | 107 | { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE }, |
108 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, | 108 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, |
109 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, | ||
109 | 110 | ||
110 | /* Atheros AR9285 Malbec with sflash firmware */ | 111 | /* Atheros AR9285 Malbec with sflash firmware */ |
111 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, | 112 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, |
@@ -256,7 +257,9 @@ static void btusb_intr_complete(struct urb *urb) | |||
256 | 257 | ||
257 | err = usb_submit_urb(urb, GFP_ATOMIC); | 258 | err = usb_submit_urb(urb, GFP_ATOMIC); |
258 | if (err < 0) { | 259 | if (err < 0) { |
259 | if (err != -EPERM) | 260 | /* -EPERM: urb is being killed; |
261 | * -ENODEV: device got disconnected */ | ||
262 | if (err != -EPERM && err != -ENODEV) | ||
260 | BT_ERR("%s urb %p failed to resubmit (%d)", | 263 | BT_ERR("%s urb %p failed to resubmit (%d)", |
261 | hdev->name, urb, -err); | 264 | hdev->name, urb, -err); |
262 | usb_unanchor_urb(urb); | 265 | usb_unanchor_urb(urb); |
@@ -341,7 +344,9 @@ static void btusb_bulk_complete(struct urb *urb) | |||
341 | 344 | ||
342 | err = usb_submit_urb(urb, GFP_ATOMIC); | 345 | err = usb_submit_urb(urb, GFP_ATOMIC); |
343 | if (err < 0) { | 346 | if (err < 0) { |
344 | if (err != -EPERM) | 347 | /* -EPERM: urb is being killed; |
348 | * -ENODEV: device got disconnected */ | ||
349 | if (err != -EPERM && err != -ENODEV) | ||
345 | BT_ERR("%s urb %p failed to resubmit (%d)", | 350 | BT_ERR("%s urb %p failed to resubmit (%d)", |
346 | hdev->name, urb, -err); | 351 | hdev->name, urb, -err); |
347 | usb_unanchor_urb(urb); | 352 | usb_unanchor_urb(urb); |
@@ -431,7 +436,9 @@ static void btusb_isoc_complete(struct urb *urb) | |||
431 | 436 | ||
432 | err = usb_submit_urb(urb, GFP_ATOMIC); | 437 | err = usb_submit_urb(urb, GFP_ATOMIC); |
433 | if (err < 0) { | 438 | if (err < 0) { |
434 | if (err != -EPERM) | 439 | /* -EPERM: urb is being killed; |
440 | * -ENODEV: device got disconnected */ | ||
441 | if (err != -EPERM && err != -ENODEV) | ||
435 | BT_ERR("%s urb %p failed to resubmit (%d)", | 442 | BT_ERR("%s urb %p failed to resubmit (%d)", |
436 | hdev->name, urb, -err); | 443 | hdev->name, urb, -err); |
437 | usb_unanchor_urb(urb); | 444 | usb_unanchor_urb(urb); |
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 41841a3e3f9..17cef864506 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
@@ -1198,6 +1198,10 @@ static int sbp2_remove(struct device *dev) | |||
1198 | { | 1198 | { |
1199 | struct fw_unit *unit = fw_unit(dev); | 1199 | struct fw_unit *unit = fw_unit(dev); |
1200 | struct sbp2_target *tgt = dev_get_drvdata(&unit->device); | 1200 | struct sbp2_target *tgt = dev_get_drvdata(&unit->device); |
1201 | struct sbp2_logical_unit *lu; | ||
1202 | |||
1203 | list_for_each_entry(lu, &tgt->lu_list, link) | ||
1204 | cancel_delayed_work_sync(&lu->work); | ||
1201 | 1205 | ||
1202 | sbp2_target_put(tgt); | 1206 | sbp2_target_put(tgt); |
1203 | return 0; | 1207 | return 0; |
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index 68810fd1a59..aa83de9db1b 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c | |||
@@ -420,7 +420,7 @@ static efi_status_t gsmi_get_next_variable(unsigned long *name_size, | |||
420 | 420 | ||
421 | static efi_status_t gsmi_set_variable(efi_char16_t *name, | 421 | static efi_status_t gsmi_set_variable(efi_char16_t *name, |
422 | efi_guid_t *vendor, | 422 | efi_guid_t *vendor, |
423 | unsigned long attr, | 423 | u32 attr, |
424 | unsigned long data_size, | 424 | unsigned long data_size, |
425 | void *data) | 425 | void *data) |
426 | { | 426 | { |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 82db1850666..fe738f05309 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -499,6 +499,7 @@ void drm_connector_cleanup(struct drm_connector *connector) | |||
499 | mutex_lock(&dev->mode_config.mutex); | 499 | mutex_lock(&dev->mode_config.mutex); |
500 | drm_mode_object_put(dev, &connector->base); | 500 | drm_mode_object_put(dev, &connector->base); |
501 | list_del(&connector->head); | 501 | list_del(&connector->head); |
502 | dev->mode_config.num_connector--; | ||
502 | mutex_unlock(&dev->mode_config.mutex); | 503 | mutex_unlock(&dev->mode_config.mutex); |
503 | } | 504 | } |
504 | EXPORT_SYMBOL(drm_connector_cleanup); | 505 | EXPORT_SYMBOL(drm_connector_cleanup); |
@@ -529,6 +530,7 @@ void drm_encoder_cleanup(struct drm_encoder *encoder) | |||
529 | mutex_lock(&dev->mode_config.mutex); | 530 | mutex_lock(&dev->mode_config.mutex); |
530 | drm_mode_object_put(dev, &encoder->base); | 531 | drm_mode_object_put(dev, &encoder->base); |
531 | list_del(&encoder->head); | 532 | list_del(&encoder->head); |
533 | dev->mode_config.num_encoder--; | ||
532 | mutex_unlock(&dev->mode_config.mutex); | 534 | mutex_unlock(&dev->mode_config.mutex); |
533 | } | 535 | } |
534 | EXPORT_SYMBOL(drm_encoder_cleanup); | 536 | EXPORT_SYMBOL(drm_encoder_cleanup); |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ee1d701317f..56a8554d903 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -878,7 +878,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv, | |||
878 | int pp_reg, lvds_reg; | 878 | int pp_reg, lvds_reg; |
879 | u32 val; | 879 | u32 val; |
880 | enum pipe panel_pipe = PIPE_A; | 880 | enum pipe panel_pipe = PIPE_A; |
881 | bool locked = locked; | 881 | bool locked = true; |
882 | 882 | ||
883 | if (HAS_PCH_SPLIT(dev_priv->dev)) { | 883 | if (HAS_PCH_SPLIT(dev_priv->dev)) { |
884 | pp_reg = PCH_PP_CONTROL; | 884 | pp_reg = PCH_PP_CONTROL; |
@@ -7238,8 +7238,6 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
7238 | intel_encoder_clones(dev, encoder->clone_mask); | 7238 | intel_encoder_clones(dev, encoder->clone_mask); |
7239 | } | 7239 | } |
7240 | 7240 | ||
7241 | intel_panel_setup_backlight(dev); | ||
7242 | |||
7243 | /* disable all the possible outputs/crtcs before entering KMS mode */ | 7241 | /* disable all the possible outputs/crtcs before entering KMS mode */ |
7244 | drm_helper_disable_unused_functions(dev); | 7242 | drm_helper_disable_unused_functions(dev); |
7245 | } | 7243 | } |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index fb5fa089886..d8d71a399f5 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -1357,6 +1357,7 @@ int evergreen_cp_resume(struct radeon_device *rdev) | |||
1357 | SOFT_RESET_PA | | 1357 | SOFT_RESET_PA | |
1358 | SOFT_RESET_SH | | 1358 | SOFT_RESET_SH | |
1359 | SOFT_RESET_VGT | | 1359 | SOFT_RESET_VGT | |
1360 | SOFT_RESET_SPI | | ||
1360 | SOFT_RESET_SX)); | 1361 | SOFT_RESET_SX)); |
1361 | RREG32(GRBM_SOFT_RESET); | 1362 | RREG32(GRBM_SOFT_RESET); |
1362 | mdelay(15); | 1363 | mdelay(15); |
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 44c4750f451..a2e00fa9c61 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1159,6 +1159,7 @@ int cayman_cp_resume(struct radeon_device *rdev) | |||
1159 | SOFT_RESET_PA | | 1159 | SOFT_RESET_PA | |
1160 | SOFT_RESET_SH | | 1160 | SOFT_RESET_SH | |
1161 | SOFT_RESET_VGT | | 1161 | SOFT_RESET_VGT | |
1162 | SOFT_RESET_SPI | | ||
1162 | SOFT_RESET_SX)); | 1163 | SOFT_RESET_SX)); |
1163 | RREG32(GRBM_SOFT_RESET); | 1164 | RREG32(GRBM_SOFT_RESET); |
1164 | mdelay(15); | 1165 | mdelay(15); |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index e0138b674ac..63675241c7f 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -3298,6 +3298,14 @@ void radeon_combios_asic_init(struct drm_device *dev) | |||
3298 | rdev->pdev->subsystem_device == 0x30a4) | 3298 | rdev->pdev->subsystem_device == 0x30a4) |
3299 | return; | 3299 | return; |
3300 | 3300 | ||
3301 | /* quirk for rs4xx Compaq Presario V5245EU laptop to make it resume | ||
3302 | * - it hangs on resume inside the dynclk 1 table. | ||
3303 | */ | ||
3304 | if (rdev->family == CHIP_RS480 && | ||
3305 | rdev->pdev->subsystem_vendor == 0x103c && | ||
3306 | rdev->pdev->subsystem_device == 0x30ae) | ||
3307 | return; | ||
3308 | |||
3301 | /* DYN CLK 1 */ | 3309 | /* DYN CLK 1 */ |
3302 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); | 3310 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); |
3303 | if (table) | 3311 | if (table) |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 0a4d86c6c4a..2d6423c2d19 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -146,6 +146,7 @@ config PHANTOM | |||
146 | 146 | ||
147 | config INTEL_MID_PTI | 147 | config INTEL_MID_PTI |
148 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" | 148 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" |
149 | depends on PCI | ||
149 | default n | 150 | default n |
150 | help | 151 | help |
151 | The PTI (Parallel Trace Interface) driver directs | 152 | The PTI (Parallel Trace Interface) driver directs |
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index 54c91ffe4a9..ba168a7d54d 100644 --- a/drivers/misc/ti-st/st_core.c +++ b/drivers/misc/ti-st/st_core.c | |||
@@ -338,6 +338,12 @@ void st_int_recv(void *disc_data, | |||
338 | /* Unknow packet? */ | 338 | /* Unknow packet? */ |
339 | default: | 339 | default: |
340 | type = *ptr; | 340 | type = *ptr; |
341 | if (st_gdata->list[type] == NULL) { | ||
342 | pr_err("chip/interface misbehavior dropping" | ||
343 | " frame starting with 0x%02x", type); | ||
344 | goto done; | ||
345 | |||
346 | } | ||
341 | st_gdata->rx_skb = alloc_skb( | 347 | st_gdata->rx_skb = alloc_skb( |
342 | st_gdata->list[type]->max_frame_size, | 348 | st_gdata->list[type]->max_frame_size, |
343 | GFP_ATOMIC); | 349 | GFP_ATOMIC); |
@@ -354,6 +360,7 @@ void st_int_recv(void *disc_data, | |||
354 | ptr++; | 360 | ptr++; |
355 | count--; | 361 | count--; |
356 | } | 362 | } |
363 | done: | ||
357 | spin_unlock_irqrestore(&st_gdata->lock, flags); | 364 | spin_unlock_irqrestore(&st_gdata->lock, flags); |
358 | pr_debug("done %s", __func__); | 365 | pr_debug("done %s", __func__); |
359 | return; | 366 | return; |
@@ -717,9 +724,10 @@ static void st_tty_close(struct tty_struct *tty) | |||
717 | */ | 724 | */ |
718 | spin_lock_irqsave(&st_gdata->lock, flags); | 725 | spin_lock_irqsave(&st_gdata->lock, flags); |
719 | for (i = ST_BT; i < ST_MAX_CHANNELS; i++) { | 726 | for (i = ST_BT; i < ST_MAX_CHANNELS; i++) { |
720 | if (st_gdata->list[i] != NULL) | 727 | if (st_gdata->is_registered[i] == true) |
721 | pr_err("%d not un-registered", i); | 728 | pr_err("%d not un-registered", i); |
722 | st_gdata->list[i] = NULL; | 729 | st_gdata->list[i] = NULL; |
730 | st_gdata->is_registered[i] = false; | ||
723 | } | 731 | } |
724 | st_gdata->protos_registered = 0; | 732 | st_gdata->protos_registered = 0; |
725 | spin_unlock_irqrestore(&st_gdata->lock, flags); | 733 | spin_unlock_irqrestore(&st_gdata->lock, flags); |
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 38fd2f04c07..3a3580566df 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
@@ -68,6 +68,7 @@ void validate_firmware_response(struct kim_data_s *kim_gdata) | |||
68 | if (unlikely(skb->data[5] != 0)) { | 68 | if (unlikely(skb->data[5] != 0)) { |
69 | pr_err("no proper response during fw download"); | 69 | pr_err("no proper response during fw download"); |
70 | pr_err("data6 %x", skb->data[5]); | 70 | pr_err("data6 %x", skb->data[5]); |
71 | kfree_skb(skb); | ||
71 | return; /* keep waiting for the proper response */ | 72 | return; /* keep waiting for the proper response */ |
72 | } | 73 | } |
73 | /* becos of all the script being downloaded */ | 74 | /* becos of all the script being downloaded */ |
@@ -210,6 +211,7 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name) | |||
210 | pr_err(" waiting for ver info- timed out "); | 211 | pr_err(" waiting for ver info- timed out "); |
211 | return -ETIMEDOUT; | 212 | return -ETIMEDOUT; |
212 | } | 213 | } |
214 | INIT_COMPLETION(kim_gdata->kim_rcvd); | ||
213 | 215 | ||
214 | version = | 216 | version = |
215 | MAKEWORD(kim_gdata->resp_buffer[13], | 217 | MAKEWORD(kim_gdata->resp_buffer[13], |
@@ -298,6 +300,7 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
298 | 300 | ||
299 | switch (((struct bts_action *)ptr)->type) { | 301 | switch (((struct bts_action *)ptr)->type) { |
300 | case ACTION_SEND_COMMAND: /* action send */ | 302 | case ACTION_SEND_COMMAND: /* action send */ |
303 | pr_debug("S"); | ||
301 | action_ptr = &(((struct bts_action *)ptr)->data[0]); | 304 | action_ptr = &(((struct bts_action *)ptr)->data[0]); |
302 | if (unlikely | 305 | if (unlikely |
303 | (((struct hci_command *)action_ptr)->opcode == | 306 | (((struct hci_command *)action_ptr)->opcode == |
@@ -335,6 +338,10 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
335 | release_firmware(kim_gdata->fw_entry); | 338 | release_firmware(kim_gdata->fw_entry); |
336 | return -ETIMEDOUT; | 339 | return -ETIMEDOUT; |
337 | } | 340 | } |
341 | /* reinit completion before sending for the | ||
342 | * relevant wait | ||
343 | */ | ||
344 | INIT_COMPLETION(kim_gdata->kim_rcvd); | ||
338 | 345 | ||
339 | /* | 346 | /* |
340 | * Free space found in uart buffer, call st_int_write | 347 | * Free space found in uart buffer, call st_int_write |
@@ -361,6 +368,7 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
361 | } | 368 | } |
362 | break; | 369 | break; |
363 | case ACTION_WAIT_EVENT: /* wait */ | 370 | case ACTION_WAIT_EVENT: /* wait */ |
371 | pr_debug("W"); | ||
364 | if (!wait_for_completion_timeout | 372 | if (!wait_for_completion_timeout |
365 | (&kim_gdata->kim_rcvd, | 373 | (&kim_gdata->kim_rcvd, |
366 | msecs_to_jiffies(CMD_RESP_TIME))) { | 374 | msecs_to_jiffies(CMD_RESP_TIME))) { |
@@ -434,11 +442,17 @@ long st_kim_start(void *kim_data) | |||
434 | { | 442 | { |
435 | long err = 0; | 443 | long err = 0; |
436 | long retry = POR_RETRY_COUNT; | 444 | long retry = POR_RETRY_COUNT; |
445 | struct ti_st_plat_data *pdata; | ||
437 | struct kim_data_s *kim_gdata = (struct kim_data_s *)kim_data; | 446 | struct kim_data_s *kim_gdata = (struct kim_data_s *)kim_data; |
438 | 447 | ||
439 | pr_info(" %s", __func__); | 448 | pr_info(" %s", __func__); |
449 | pdata = kim_gdata->kim_pdev->dev.platform_data; | ||
440 | 450 | ||
441 | do { | 451 | do { |
452 | /* platform specific enabling code here */ | ||
453 | if (pdata->chip_enable) | ||
454 | pdata->chip_enable(kim_gdata); | ||
455 | |||
442 | /* Configure BT nShutdown to HIGH state */ | 456 | /* Configure BT nShutdown to HIGH state */ |
443 | gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); | 457 | gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); |
444 | mdelay(5); /* FIXME: a proper toggle */ | 458 | mdelay(5); /* FIXME: a proper toggle */ |
@@ -460,6 +474,12 @@ long st_kim_start(void *kim_data) | |||
460 | pr_info("ldisc_install = 0"); | 474 | pr_info("ldisc_install = 0"); |
461 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, | 475 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, |
462 | NULL, "install"); | 476 | NULL, "install"); |
477 | /* the following wait is never going to be completed, | ||
478 | * since the ldisc was never installed, hence serving | ||
479 | * as a mdelay of LDISC_TIME msecs */ | ||
480 | err = wait_for_completion_timeout | ||
481 | (&kim_gdata->ldisc_installed, | ||
482 | msecs_to_jiffies(LDISC_TIME)); | ||
463 | err = -ETIMEDOUT; | 483 | err = -ETIMEDOUT; |
464 | continue; | 484 | continue; |
465 | } else { | 485 | } else { |
@@ -472,6 +492,13 @@ long st_kim_start(void *kim_data) | |||
472 | pr_info("ldisc_install = 0"); | 492 | pr_info("ldisc_install = 0"); |
473 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, | 493 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, |
474 | NULL, "install"); | 494 | NULL, "install"); |
495 | /* this wait might be completed, though in the | ||
496 | * tty_close() since the ldisc is already | ||
497 | * installed */ | ||
498 | err = wait_for_completion_timeout | ||
499 | (&kim_gdata->ldisc_installed, | ||
500 | msecs_to_jiffies(LDISC_TIME)); | ||
501 | err = -EINVAL; | ||
475 | continue; | 502 | continue; |
476 | } else { /* on success don't retry */ | 503 | } else { /* on success don't retry */ |
477 | break; | 504 | break; |
@@ -489,6 +516,8 @@ long st_kim_stop(void *kim_data) | |||
489 | { | 516 | { |
490 | long err = 0; | 517 | long err = 0; |
491 | struct kim_data_s *kim_gdata = (struct kim_data_s *)kim_data; | 518 | struct kim_data_s *kim_gdata = (struct kim_data_s *)kim_data; |
519 | struct ti_st_plat_data *pdata = | ||
520 | kim_gdata->kim_pdev->dev.platform_data; | ||
492 | 521 | ||
493 | INIT_COMPLETION(kim_gdata->ldisc_installed); | 522 | INIT_COMPLETION(kim_gdata->ldisc_installed); |
494 | 523 | ||
@@ -515,6 +544,10 @@ long st_kim_stop(void *kim_data) | |||
515 | gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); | 544 | gpio_set_value(kim_gdata->nshutdown, GPIO_HIGH); |
516 | mdelay(1); | 545 | mdelay(1); |
517 | gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); | 546 | gpio_set_value(kim_gdata->nshutdown, GPIO_LOW); |
547 | |||
548 | /* platform specific disable */ | ||
549 | if (pdata->chip_disable) | ||
550 | pdata->chip_disable(kim_gdata); | ||
518 | return err; | 551 | return err; |
519 | } | 552 | } |
520 | 553 | ||
diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c index 3f249513885..1ff460a8e9c 100644 --- a/drivers/misc/ti-st/st_ll.c +++ b/drivers/misc/ti-st/st_ll.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #define pr_fmt(fmt) "(stll) :" fmt | 22 | #define pr_fmt(fmt) "(stll) :" fmt |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/platform_device.h> | ||
25 | #include <linux/ti_wilink_st.h> | 26 | #include <linux/ti_wilink_st.h> |
26 | 27 | ||
27 | /**********************************************************************/ | 28 | /**********************************************************************/ |
@@ -37,6 +38,9 @@ static void send_ll_cmd(struct st_data_s *st_data, | |||
37 | 38 | ||
38 | static void ll_device_want_to_sleep(struct st_data_s *st_data) | 39 | static void ll_device_want_to_sleep(struct st_data_s *st_data) |
39 | { | 40 | { |
41 | struct kim_data_s *kim_data; | ||
42 | struct ti_st_plat_data *pdata; | ||
43 | |||
40 | pr_debug("%s", __func__); | 44 | pr_debug("%s", __func__); |
41 | /* sanity check */ | 45 | /* sanity check */ |
42 | if (st_data->ll_state != ST_LL_AWAKE) | 46 | if (st_data->ll_state != ST_LL_AWAKE) |
@@ -46,10 +50,19 @@ static void ll_device_want_to_sleep(struct st_data_s *st_data) | |||
46 | send_ll_cmd(st_data, LL_SLEEP_ACK); | 50 | send_ll_cmd(st_data, LL_SLEEP_ACK); |
47 | /* update state */ | 51 | /* update state */ |
48 | st_data->ll_state = ST_LL_ASLEEP; | 52 | st_data->ll_state = ST_LL_ASLEEP; |
53 | |||
54 | /* communicate to platform about chip asleep */ | ||
55 | kim_data = st_data->kim_data; | ||
56 | pdata = kim_data->kim_pdev->dev.platform_data; | ||
57 | if (pdata->chip_asleep) | ||
58 | pdata->chip_asleep(NULL); | ||
49 | } | 59 | } |
50 | 60 | ||
51 | static void ll_device_want_to_wakeup(struct st_data_s *st_data) | 61 | static void ll_device_want_to_wakeup(struct st_data_s *st_data) |
52 | { | 62 | { |
63 | struct kim_data_s *kim_data; | ||
64 | struct ti_st_plat_data *pdata; | ||
65 | |||
53 | /* diff actions in diff states */ | 66 | /* diff actions in diff states */ |
54 | switch (st_data->ll_state) { | 67 | switch (st_data->ll_state) { |
55 | case ST_LL_ASLEEP: | 68 | case ST_LL_ASLEEP: |
@@ -70,6 +83,12 @@ static void ll_device_want_to_wakeup(struct st_data_s *st_data) | |||
70 | } | 83 | } |
71 | /* update state */ | 84 | /* update state */ |
72 | st_data->ll_state = ST_LL_AWAKE; | 85 | st_data->ll_state = ST_LL_AWAKE; |
86 | |||
87 | /* communicate to platform about chip wakeup */ | ||
88 | kim_data = st_data->kim_data; | ||
89 | pdata = kim_data->kim_pdev->dev.platform_data; | ||
90 | if (pdata->chip_asleep) | ||
91 | pdata->chip_awake(NULL); | ||
73 | } | 92 | } |
74 | 93 | ||
75 | /**********************************************************************/ | 94 | /**********************************************************************/ |
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index f7bbde9eb2c..a81249246ec 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c | |||
@@ -503,9 +503,9 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
503 | spin_unlock_irqrestore(&priv->mbx_lock, flags); | 503 | spin_unlock_irqrestore(&priv->mbx_lock, flags); |
504 | 504 | ||
505 | /* Prepare mailbox for transmission */ | 505 | /* Prepare mailbox for transmission */ |
506 | data = cf->can_dlc | (get_tx_head_prio(priv) << 8); | ||
506 | if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ | 507 | if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ |
507 | data |= HECC_CANMCF_RTR; | 508 | data |= HECC_CANMCF_RTR; |
508 | data |= get_tx_head_prio(priv) << 8; | ||
509 | hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); | 509 | hecc_write_mbx(priv, mbxno, HECC_CANMCF, data); |
510 | 510 | ||
511 | if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ | 511 | if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */ |
@@ -923,6 +923,7 @@ static int ti_hecc_probe(struct platform_device *pdev) | |||
923 | priv->can.do_get_state = ti_hecc_get_state; | 923 | priv->can.do_get_state = ti_hecc_get_state; |
924 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; | 924 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; |
925 | 925 | ||
926 | spin_lock_init(&priv->mbx_lock); | ||
926 | ndev->irq = irq->start; | 927 | ndev->irq = irq->start; |
927 | ndev->flags |= IFF_ECHO; | 928 | ndev->flags |= IFF_ECHO; |
928 | platform_set_drvdata(pdev, ndev); | 929 | platform_set_drvdata(pdev, ndev); |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 646c86bcc54..fdb7a175640 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -2452,14 +2452,13 @@ static irqreturn_t cas_interruptN(int irq, void *dev_id) | |||
2452 | struct net_device *dev = dev_id; | 2452 | struct net_device *dev = dev_id; |
2453 | struct cas *cp = netdev_priv(dev); | 2453 | struct cas *cp = netdev_priv(dev); |
2454 | unsigned long flags; | 2454 | unsigned long flags; |
2455 | int ring; | 2455 | int ring = (irq == cp->pci_irq_INTC) ? 2 : 3; |
2456 | u32 status = readl(cp->regs + REG_PLUS_INTRN_STATUS(ring)); | 2456 | u32 status = readl(cp->regs + REG_PLUS_INTRN_STATUS(ring)); |
2457 | 2457 | ||
2458 | /* check for shared irq */ | 2458 | /* check for shared irq */ |
2459 | if (status == 0) | 2459 | if (status == 0) |
2460 | return IRQ_NONE; | 2460 | return IRQ_NONE; |
2461 | 2461 | ||
2462 | ring = (irq == cp->pci_irq_INTC) ? 2 : 3; | ||
2463 | spin_lock_irqsave(&cp->lock, flags); | 2462 | spin_lock_irqsave(&cp->lock, flags); |
2464 | if (status & INTR_RX_DONE_ALT) { /* handle rx separately */ | 2463 | if (status & INTR_RX_DONE_ALT) { /* handle rx separately */ |
2465 | #ifdef USE_NAPI | 2464 | #ifdef USE_NAPI |
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index ba99af05bf6..3e667926940 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -395,7 +395,7 @@ static inline struct sk_buff *ibmveth_rxq_get_buffer(struct ibmveth_adapter *ada | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* recycle the current buffer on the rx queue */ | 397 | /* recycle the current buffer on the rx queue */ |
398 | static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) | 398 | static int ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) |
399 | { | 399 | { |
400 | u32 q_index = adapter->rx_queue.index; | 400 | u32 q_index = adapter->rx_queue.index; |
401 | u64 correlator = adapter->rx_queue.queue_addr[q_index].correlator; | 401 | u64 correlator = adapter->rx_queue.queue_addr[q_index].correlator; |
@@ -403,6 +403,7 @@ static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) | |||
403 | unsigned int index = correlator & 0xffffffffUL; | 403 | unsigned int index = correlator & 0xffffffffUL; |
404 | union ibmveth_buf_desc desc; | 404 | union ibmveth_buf_desc desc; |
405 | unsigned long lpar_rc; | 405 | unsigned long lpar_rc; |
406 | int ret = 1; | ||
406 | 407 | ||
407 | BUG_ON(pool >= IBMVETH_NUM_BUFF_POOLS); | 408 | BUG_ON(pool >= IBMVETH_NUM_BUFF_POOLS); |
408 | BUG_ON(index >= adapter->rx_buff_pool[pool].size); | 409 | BUG_ON(index >= adapter->rx_buff_pool[pool].size); |
@@ -410,7 +411,7 @@ static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) | |||
410 | if (!adapter->rx_buff_pool[pool].active) { | 411 | if (!adapter->rx_buff_pool[pool].active) { |
411 | ibmveth_rxq_harvest_buffer(adapter); | 412 | ibmveth_rxq_harvest_buffer(adapter); |
412 | ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[pool]); | 413 | ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[pool]); |
413 | return; | 414 | goto out; |
414 | } | 415 | } |
415 | 416 | ||
416 | desc.fields.flags_len = IBMVETH_BUF_VALID | | 417 | desc.fields.flags_len = IBMVETH_BUF_VALID | |
@@ -423,12 +424,16 @@ static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter) | |||
423 | netdev_dbg(adapter->netdev, "h_add_logical_lan_buffer failed " | 424 | netdev_dbg(adapter->netdev, "h_add_logical_lan_buffer failed " |
424 | "during recycle rc=%ld", lpar_rc); | 425 | "during recycle rc=%ld", lpar_rc); |
425 | ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator); | 426 | ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator); |
427 | ret = 0; | ||
426 | } | 428 | } |
427 | 429 | ||
428 | if (++adapter->rx_queue.index == adapter->rx_queue.num_slots) { | 430 | if (++adapter->rx_queue.index == adapter->rx_queue.num_slots) { |
429 | adapter->rx_queue.index = 0; | 431 | adapter->rx_queue.index = 0; |
430 | adapter->rx_queue.toggle = !adapter->rx_queue.toggle; | 432 | adapter->rx_queue.toggle = !adapter->rx_queue.toggle; |
431 | } | 433 | } |
434 | |||
435 | out: | ||
436 | return ret; | ||
432 | } | 437 | } |
433 | 438 | ||
434 | static void ibmveth_rxq_harvest_buffer(struct ibmveth_adapter *adapter) | 439 | static void ibmveth_rxq_harvest_buffer(struct ibmveth_adapter *adapter) |
@@ -1084,8 +1089,9 @@ restart_poll: | |||
1084 | if (rx_flush) | 1089 | if (rx_flush) |
1085 | ibmveth_flush_buffer(skb->data, | 1090 | ibmveth_flush_buffer(skb->data, |
1086 | length + offset); | 1091 | length + offset); |
1092 | if (!ibmveth_rxq_recycle_buffer(adapter)) | ||
1093 | kfree_skb(skb); | ||
1087 | skb = new_skb; | 1094 | skb = new_skb; |
1088 | ibmveth_rxq_recycle_buffer(adapter); | ||
1089 | } else { | 1095 | } else { |
1090 | ibmveth_rxq_harvest_buffer(adapter); | 1096 | ibmveth_rxq_harvest_buffer(adapter); |
1091 | skb_reserve(skb, offset); | 1097 | skb_reserve(skb, offset); |
diff --git a/drivers/net/phy/national.c b/drivers/net/phy/national.c index 0620ba96350..04bb8fcc0cb 100644 --- a/drivers/net/phy/national.c +++ b/drivers/net/phy/national.c | |||
@@ -25,8 +25,9 @@ | |||
25 | /* DP83865 phy identifier values */ | 25 | /* DP83865 phy identifier values */ |
26 | #define DP83865_PHY_ID 0x20005c7a | 26 | #define DP83865_PHY_ID 0x20005c7a |
27 | 27 | ||
28 | #define DP83865_INT_MASK_REG 0x15 | 28 | #define DP83865_INT_STATUS 0x14 |
29 | #define DP83865_INT_MASK_STATUS 0x14 | 29 | #define DP83865_INT_MASK 0x15 |
30 | #define DP83865_INT_CLEAR 0x17 | ||
30 | 31 | ||
31 | #define DP83865_INT_REMOTE_FAULT 0x0008 | 32 | #define DP83865_INT_REMOTE_FAULT 0x0008 |
32 | #define DP83865_INT_ANE_COMPLETED 0x0010 | 33 | #define DP83865_INT_ANE_COMPLETED 0x0010 |
@@ -68,21 +69,25 @@ static int ns_config_intr(struct phy_device *phydev) | |||
68 | int err; | 69 | int err; |
69 | 70 | ||
70 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) | 71 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) |
71 | err = phy_write(phydev, DP83865_INT_MASK_REG, | 72 | err = phy_write(phydev, DP83865_INT_MASK, |
72 | DP83865_INT_MASK_DEFAULT); | 73 | DP83865_INT_MASK_DEFAULT); |
73 | else | 74 | else |
74 | err = phy_write(phydev, DP83865_INT_MASK_REG, 0); | 75 | err = phy_write(phydev, DP83865_INT_MASK, 0); |
75 | 76 | ||
76 | return err; | 77 | return err; |
77 | } | 78 | } |
78 | 79 | ||
79 | static int ns_ack_interrupt(struct phy_device *phydev) | 80 | static int ns_ack_interrupt(struct phy_device *phydev) |
80 | { | 81 | { |
81 | int ret = phy_read(phydev, DP83865_INT_MASK_STATUS); | 82 | int ret = phy_read(phydev, DP83865_INT_STATUS); |
82 | if (ret < 0) | 83 | if (ret < 0) |
83 | return ret; | 84 | return ret; |
84 | 85 | ||
85 | return 0; | 86 | /* Clear the interrupt status bit by writing a “1” |
87 | * to the corresponding bit in INT_CLEAR (2:0 are reserved) */ | ||
88 | ret = phy_write(phydev, DP83865_INT_CLEAR, ret & ~0x7); | ||
89 | |||
90 | return ret; | ||
86 | } | 91 | } |
87 | 92 | ||
88 | static void ns_giga_speed_fallback(struct phy_device *phydev, int mode) | 93 | static void ns_giga_speed_fallback(struct phy_device *phydev, int mode) |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 190f619e421..1c1666e9910 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/phy.h> | 31 | #include <linux/phy.h> |
32 | #include <linux/cache.h> | 32 | #include <linux/cache.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/interrupt.h> | ||
34 | #include <linux/pm_runtime.h> | 35 | #include <linux/pm_runtime.h> |
35 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
36 | #include <linux/ethtool.h> | 37 | #include <linux/ethtool.h> |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index c34bef1bf2b..1b9400371ea 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -69,7 +69,7 @@ static int ar9003_hw_power_interpolate(int32_t x, | |||
69 | static const struct ar9300_eeprom ar9300_default = { | 69 | static const struct ar9300_eeprom ar9300_default = { |
70 | .eepromVersion = 2, | 70 | .eepromVersion = 2, |
71 | .templateVersion = 2, | 71 | .templateVersion = 2, |
72 | .macAddr = {1, 2, 3, 4, 5, 6}, | 72 | .macAddr = {0, 2, 3, 4, 5, 6}, |
73 | .custData = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 73 | .custData = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
74 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 74 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
75 | .baseEepHeader = { | 75 | .baseEepHeader = { |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9098aaad97a..6530694a59a 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2283,7 +2283,11 @@ static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class) | |||
2283 | 2283 | ||
2284 | mutex_lock(&sc->mutex); | 2284 | mutex_lock(&sc->mutex); |
2285 | ah->coverage_class = coverage_class; | 2285 | ah->coverage_class = coverage_class; |
2286 | |||
2287 | ath9k_ps_wakeup(sc); | ||
2286 | ath9k_hw_init_global_settings(ah); | 2288 | ath9k_hw_init_global_settings(ah); |
2289 | ath9k_ps_restore(sc); | ||
2290 | |||
2287 | mutex_unlock(&sc->mutex); | 2291 | mutex_unlock(&sc->mutex); |
2288 | } | 2292 | } |
2289 | 2293 | ||
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 0122930b14c..0474e6638d2 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
@@ -1066,8 +1066,10 @@ static int carl9170_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
1066 | * the high througput speed in 802.11n networks. | 1066 | * the high througput speed in 802.11n networks. |
1067 | */ | 1067 | */ |
1068 | 1068 | ||
1069 | if (!is_main_vif(ar, vif)) | 1069 | if (!is_main_vif(ar, vif)) { |
1070 | mutex_lock(&ar->mutex); | ||
1070 | goto err_softw; | 1071 | goto err_softw; |
1072 | } | ||
1071 | 1073 | ||
1072 | /* | 1074 | /* |
1073 | * While the hardware supports *catch-all* key, for offloading | 1075 | * While the hardware supports *catch-all* key, for offloading |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 7fbb55c9da8..1e31050dafc 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -871,18 +871,8 @@ int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state) | |||
871 | { | 871 | { |
872 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); | 872 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); |
873 | struct rt2x00_dev *rt2x00dev = hw->priv; | 873 | struct rt2x00_dev *rt2x00dev = hw->priv; |
874 | int retval; | ||
875 | |||
876 | retval = rt2x00lib_suspend(rt2x00dev, state); | ||
877 | if (retval) | ||
878 | return retval; | ||
879 | 874 | ||
880 | /* | 875 | return rt2x00lib_suspend(rt2x00dev, state); |
881 | * Decrease usbdev refcount. | ||
882 | */ | ||
883 | usb_put_dev(interface_to_usbdev(usb_intf)); | ||
884 | |||
885 | return 0; | ||
886 | } | 876 | } |
887 | EXPORT_SYMBOL_GPL(rt2x00usb_suspend); | 877 | EXPORT_SYMBOL_GPL(rt2x00usb_suspend); |
888 | 878 | ||
@@ -891,8 +881,6 @@ int rt2x00usb_resume(struct usb_interface *usb_intf) | |||
891 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); | 881 | struct ieee80211_hw *hw = usb_get_intfdata(usb_intf); |
892 | struct rt2x00_dev *rt2x00dev = hw->priv; | 882 | struct rt2x00_dev *rt2x00dev = hw->priv; |
893 | 883 | ||
894 | usb_get_dev(interface_to_usbdev(usb_intf)); | ||
895 | |||
896 | return rt2x00lib_resume(rt2x00dev); | 884 | return rt2x00lib_resume(rt2x00dev); |
897 | } | 885 | } |
898 | EXPORT_SYMBOL_GPL(rt2x00usb_resume); | 886 | EXPORT_SYMBOL_GPL(rt2x00usb_resume); |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index e58c22d21e3..b70ae40ad66 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -4283,6 +4283,7 @@ int wl1271_init_ieee80211(struct wl1271 *wl) | |||
4283 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 4283 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
4284 | BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP); | 4284 | BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP); |
4285 | wl->hw->wiphy->max_scan_ssids = 1; | 4285 | wl->hw->wiphy->max_scan_ssids = 1; |
4286 | wl->hw->wiphy->max_sched_scan_ssids = 1; | ||
4286 | /* | 4287 | /* |
4287 | * Maximum length of elements in scanning probe request templates | 4288 | * Maximum length of elements in scanning probe request templates |
4288 | * should be the maximum length possible for a template, without | 4289 | * should be the maximum length possible for a template, without |
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 5cf18c2c23f..fb1fd5af75e 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
@@ -164,7 +164,7 @@ static int wl1271_sdio_power_on(struct wl1271 *wl) | |||
164 | /* If enabled, tell runtime PM not to power off the card */ | 164 | /* If enabled, tell runtime PM not to power off the card */ |
165 | if (pm_runtime_enabled(&func->dev)) { | 165 | if (pm_runtime_enabled(&func->dev)) { |
166 | ret = pm_runtime_get_sync(&func->dev); | 166 | ret = pm_runtime_get_sync(&func->dev); |
167 | if (ret) | 167 | if (ret < 0) |
168 | goto out; | 168 | goto out; |
169 | } else { | 169 | } else { |
170 | /* Runtime PM is disabled: power up the card manually */ | 170 | /* Runtime PM is disabled: power up the card manually */ |
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index 88add68bd9a..4ae8effaee2 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c | |||
@@ -36,7 +36,6 @@ enum wl1271_tm_commands { | |||
36 | WL1271_TM_CMD_TEST, | 36 | WL1271_TM_CMD_TEST, |
37 | WL1271_TM_CMD_INTERROGATE, | 37 | WL1271_TM_CMD_INTERROGATE, |
38 | WL1271_TM_CMD_CONFIGURE, | 38 | WL1271_TM_CMD_CONFIGURE, |
39 | WL1271_TM_CMD_NVS_PUSH, | ||
40 | WL1271_TM_CMD_SET_PLT_MODE, | 39 | WL1271_TM_CMD_SET_PLT_MODE, |
41 | WL1271_TM_CMD_RECOVER, | 40 | WL1271_TM_CMD_RECOVER, |
42 | 41 | ||
@@ -190,48 +189,6 @@ static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[]) | |||
190 | return 0; | 189 | return 0; |
191 | } | 190 | } |
192 | 191 | ||
193 | static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[]) | ||
194 | { | ||
195 | int ret = 0; | ||
196 | size_t len; | ||
197 | void *buf; | ||
198 | |||
199 | wl1271_debug(DEBUG_TESTMODE, "testmode cmd nvs push"); | ||
200 | |||
201 | if (!tb[WL1271_TM_ATTR_DATA]) | ||
202 | return -EINVAL; | ||
203 | |||
204 | buf = nla_data(tb[WL1271_TM_ATTR_DATA]); | ||
205 | len = nla_len(tb[WL1271_TM_ATTR_DATA]); | ||
206 | |||
207 | mutex_lock(&wl->mutex); | ||
208 | |||
209 | kfree(wl->nvs); | ||
210 | |||
211 | if ((wl->chip.id == CHIP_ID_1283_PG20) && | ||
212 | (len != sizeof(struct wl128x_nvs_file))) | ||
213 | return -EINVAL; | ||
214 | else if (len != sizeof(struct wl1271_nvs_file)) | ||
215 | return -EINVAL; | ||
216 | |||
217 | wl->nvs = kzalloc(len, GFP_KERNEL); | ||
218 | if (!wl->nvs) { | ||
219 | wl1271_error("could not allocate memory for the nvs file"); | ||
220 | ret = -ENOMEM; | ||
221 | goto out; | ||
222 | } | ||
223 | |||
224 | memcpy(wl->nvs, buf, len); | ||
225 | wl->nvs_len = len; | ||
226 | |||
227 | wl1271_debug(DEBUG_TESTMODE, "testmode pushed nvs"); | ||
228 | |||
229 | out: | ||
230 | mutex_unlock(&wl->mutex); | ||
231 | |||
232 | return ret; | ||
233 | } | ||
234 | |||
235 | static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[]) | 192 | static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[]) |
236 | { | 193 | { |
237 | u32 val; | 194 | u32 val; |
@@ -288,8 +245,6 @@ int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len) | |||
288 | return wl1271_tm_cmd_interrogate(wl, tb); | 245 | return wl1271_tm_cmd_interrogate(wl, tb); |
289 | case WL1271_TM_CMD_CONFIGURE: | 246 | case WL1271_TM_CMD_CONFIGURE: |
290 | return wl1271_tm_cmd_configure(wl, tb); | 247 | return wl1271_tm_cmd_configure(wl, tb); |
291 | case WL1271_TM_CMD_NVS_PUSH: | ||
292 | return wl1271_tm_cmd_nvs_push(wl, tb); | ||
293 | case WL1271_TM_CMD_SET_PLT_MODE: | 248 | case WL1271_TM_CMD_SET_PLT_MODE: |
294 | return wl1271_tm_cmd_set_plt_mode(wl, tb); | 249 | return wl1271_tm_cmd_set_plt_mode(wl, tb); |
295 | case WL1271_TM_CMD_RECOVER: | 250 | case WL1271_TM_CMD_RECOVER: |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index eb4e034378c..f1a2016829f 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -249,6 +249,7 @@ static int dasd_ioctl_reset_profile(struct dasd_block *block) | |||
249 | static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) | 249 | static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) |
250 | { | 250 | { |
251 | struct dasd_profile_info_t *data; | 251 | struct dasd_profile_info_t *data; |
252 | int rc = 0; | ||
252 | 253 | ||
253 | data = kmalloc(sizeof(*data), GFP_KERNEL); | 254 | data = kmalloc(sizeof(*data), GFP_KERNEL); |
254 | if (!data) | 255 | if (!data) |
@@ -279,11 +280,14 @@ static int dasd_ioctl_read_profile(struct dasd_block *block, void __user *argp) | |||
279 | spin_unlock_bh(&block->profile.lock); | 280 | spin_unlock_bh(&block->profile.lock); |
280 | } else { | 281 | } else { |
281 | spin_unlock_bh(&block->profile.lock); | 282 | spin_unlock_bh(&block->profile.lock); |
282 | return -EIO; | 283 | rc = -EIO; |
284 | goto out; | ||
283 | } | 285 | } |
284 | if (copy_to_user(argp, data, sizeof(*data))) | 286 | if (copy_to_user(argp, data, sizeof(*data))) |
285 | return -EFAULT; | 287 | rc = -EFAULT; |
286 | return 0; | 288 | out: |
289 | kfree(data); | ||
290 | return rc; | ||
287 | } | 291 | } |
288 | #else | 292 | #else |
289 | static int dasd_ioctl_reset_profile(struct dasd_block *block) | 293 | static int dasd_ioctl_reset_profile(struct dasd_block *block) |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index be55fb2b1b1..837e010299a 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id) | |||
383 | switch (sccb->header.response_code) { | 383 | switch (sccb->header.response_code) { |
384 | case 0x0020: | 384 | case 0x0020: |
385 | set_bit(id, sclp_storage_ids); | 385 | set_bit(id, sclp_storage_ids); |
386 | for (i = 0; i < sccb->assigned; i++) | 386 | for (i = 0; i < sccb->assigned; i++) { |
387 | sclp_unassign_storage(sccb->entries[i] >> 16); | 387 | if (sccb->entries[i]) |
388 | sclp_unassign_storage(sccb->entries[i] >> 16); | ||
389 | } | ||
388 | break; | 390 | break; |
389 | default: | 391 | default: |
390 | rc = -EIO; | 392 | rc = -EIO; |
diff --git a/drivers/staging/brcm80211/brcmsmac/otp.c b/drivers/staging/brcm80211/brcmsmac/otp.c index 34253cf3781..4a70180eba5 100644 --- a/drivers/staging/brcm80211/brcmsmac/otp.c +++ b/drivers/staging/brcm80211/brcmsmac/otp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/string.h> | ||
19 | 20 | ||
20 | #include <brcm_hw_ids.h> | 21 | #include <brcm_hw_ids.h> |
21 | #include <chipcommon.h> | 22 | #include <chipcommon.h> |
diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index bbf21897ae0..823b5e4672e 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define _BRCM_TYPES_H_ | 18 | #define _BRCM_TYPES_H_ |
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/io.h> | ||
21 | 22 | ||
22 | /* Bus types */ | 23 | /* Bus types */ |
23 | #define SI_BUS 0 /* SOC Interconnect */ | 24 | #define SI_BUS 0 /* SOC Interconnect */ |
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c index 9c0d2936e48..c3d73f8431a 100644 --- a/drivers/staging/octeon/ethernet-rgmii.c +++ b/drivers/staging/octeon/ethernet-rgmii.c | |||
@@ -26,6 +26,7 @@ | |||
26 | **********************************************************************/ | 26 | **********************************************************************/ |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/interrupt.h> | ||
29 | #include <linux/phy.h> | 30 | #include <linux/phy.h> |
30 | #include <linux/ratelimit.h> | 31 | #include <linux/ratelimit.h> |
31 | #include <net/dst.h> | 32 | #include <net/dst.h> |
diff --git a/drivers/staging/octeon/ethernet-spi.c b/drivers/staging/octeon/ethernet-spi.c index 97082542188..d0e2d514968 100644 --- a/drivers/staging/octeon/ethernet-spi.c +++ b/drivers/staging/octeon/ethernet-spi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | **********************************************************************/ | 26 | **********************************************************************/ |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/interrupt.h> | ||
29 | #include <net/dst.h> | 30 | #include <net/dst.h> |
30 | 31 | ||
31 | #include <asm/octeon/octeon.h> | 32 | #include <asm/octeon/octeon.h> |
diff --git a/drivers/staging/tidspbridge/core/dsp-clock.c b/drivers/staging/tidspbridge/core/dsp-clock.c index 589a0554332..3d1279c424a 100644 --- a/drivers/staging/tidspbridge/core/dsp-clock.c +++ b/drivers/staging/tidspbridge/core/dsp-clock.c | |||
@@ -209,7 +209,6 @@ int dsp_clk_enable(enum dsp_clk_id clk_id) | |||
209 | break; | 209 | break; |
210 | #ifdef CONFIG_OMAP_MCBSP | 210 | #ifdef CONFIG_OMAP_MCBSP |
211 | case MCBSP_CLK: | 211 | case MCBSP_CLK: |
212 | omap_mcbsp_set_io_type(MCBSP_ID(clk_id), OMAP_MCBSP_POLL_IO); | ||
213 | omap_mcbsp_request(MCBSP_ID(clk_id)); | 212 | omap_mcbsp_request(MCBSP_ID(clk_id)); |
214 | omap2_mcbsp_set_clks_src(MCBSP_ID(clk_id), MCBSP_CLKS_PAD_SRC); | 213 | omap2_mcbsp_set_clks_src(MCBSP_ID(clk_id), MCBSP_CLKS_PAD_SRC); |
215 | break; | 214 | break; |
diff --git a/drivers/staging/zcache/tmem.c b/drivers/staging/zcache/tmem.c index 975e34bcd72..1ca66ea9b28 100644 --- a/drivers/staging/zcache/tmem.c +++ b/drivers/staging/zcache/tmem.c | |||
@@ -604,7 +604,7 @@ int tmem_get(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index, | |||
604 | struct tmem_obj *obj; | 604 | struct tmem_obj *obj; |
605 | void *pampd; | 605 | void *pampd; |
606 | bool ephemeral = is_ephemeral(pool); | 606 | bool ephemeral = is_ephemeral(pool); |
607 | uint32_t ret = -1; | 607 | int ret = -1; |
608 | struct tmem_hashbucket *hb; | 608 | struct tmem_hashbucket *hb; |
609 | bool free = (get_and_free == 1) || ((get_and_free == 0) && ephemeral); | 609 | bool free = (get_and_free == 1) || ((get_and_free == 0) && ephemeral); |
610 | bool lock_held = false; | 610 | bool lock_held = false; |
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 855a5bb56a4..a3f5162bfed 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c | |||
@@ -1158,7 +1158,7 @@ static void *zcache_pampd_create(char *data, size_t size, bool raw, int eph, | |||
1158 | size_t clen; | 1158 | size_t clen; |
1159 | int ret; | 1159 | int ret; |
1160 | unsigned long count; | 1160 | unsigned long count; |
1161 | struct page *page = virt_to_page(data); | 1161 | struct page *page = (struct page *)(data); |
1162 | struct zcache_client *cli = pool->client; | 1162 | struct zcache_client *cli = pool->client; |
1163 | uint16_t client_id = get_client_id_from_client(cli); | 1163 | uint16_t client_id = get_client_id_from_client(cli); |
1164 | unsigned long zv_mean_zsize; | 1164 | unsigned long zv_mean_zsize; |
@@ -1227,7 +1227,7 @@ static int zcache_pampd_get_data(char *data, size_t *bufsize, bool raw, | |||
1227 | int ret = 0; | 1227 | int ret = 0; |
1228 | 1228 | ||
1229 | BUG_ON(is_ephemeral(pool)); | 1229 | BUG_ON(is_ephemeral(pool)); |
1230 | zv_decompress(virt_to_page(data), pampd); | 1230 | zv_decompress((struct page *)(data), pampd); |
1231 | return ret; | 1231 | return ret; |
1232 | } | 1232 | } |
1233 | 1233 | ||
@@ -1539,7 +1539,7 @@ static int zcache_put_page(int cli_id, int pool_id, struct tmem_oid *oidp, | |||
1539 | goto out; | 1539 | goto out; |
1540 | if (!zcache_freeze && zcache_do_preload(pool) == 0) { | 1540 | if (!zcache_freeze && zcache_do_preload(pool) == 0) { |
1541 | /* preload does preempt_disable on success */ | 1541 | /* preload does preempt_disable on success */ |
1542 | ret = tmem_put(pool, oidp, index, page_address(page), | 1542 | ret = tmem_put(pool, oidp, index, (char *)(page), |
1543 | PAGE_SIZE, 0, is_ephemeral(pool)); | 1543 | PAGE_SIZE, 0, is_ephemeral(pool)); |
1544 | if (ret < 0) { | 1544 | if (ret < 0) { |
1545 | if (is_ephemeral(pool)) | 1545 | if (is_ephemeral(pool)) |
@@ -1572,7 +1572,7 @@ static int zcache_get_page(int cli_id, int pool_id, struct tmem_oid *oidp, | |||
1572 | pool = zcache_get_pool_by_id(cli_id, pool_id); | 1572 | pool = zcache_get_pool_by_id(cli_id, pool_id); |
1573 | if (likely(pool != NULL)) { | 1573 | if (likely(pool != NULL)) { |
1574 | if (atomic_read(&pool->obj_count) > 0) | 1574 | if (atomic_read(&pool->obj_count) > 0) |
1575 | ret = tmem_get(pool, oidp, index, page_address(page), | 1575 | ret = tmem_get(pool, oidp, index, (char *)(page), |
1576 | &size, 0, is_ephemeral(pool)); | 1576 | &size, 0, is_ephemeral(pool)); |
1577 | zcache_put_pool(pool); | 1577 | zcache_put_pool(pool); |
1578 | } | 1578 | } |
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 98b6e3bdb00..e809e9d4683 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -446,8 +446,19 @@ static inline void legacy_pty_init(void) { } | |||
446 | int pty_limit = NR_UNIX98_PTY_DEFAULT; | 446 | int pty_limit = NR_UNIX98_PTY_DEFAULT; |
447 | static int pty_limit_min; | 447 | static int pty_limit_min; |
448 | static int pty_limit_max = NR_UNIX98_PTY_MAX; | 448 | static int pty_limit_max = NR_UNIX98_PTY_MAX; |
449 | static int tty_count; | ||
449 | static int pty_count; | 450 | static int pty_count; |
450 | 451 | ||
452 | static inline void pty_inc_count(void) | ||
453 | { | ||
454 | pty_count = (++tty_count) / 2; | ||
455 | } | ||
456 | |||
457 | static inline void pty_dec_count(void) | ||
458 | { | ||
459 | pty_count = (--tty_count) / 2; | ||
460 | } | ||
461 | |||
451 | static struct cdev ptmx_cdev; | 462 | static struct cdev ptmx_cdev; |
452 | 463 | ||
453 | static struct ctl_table pty_table[] = { | 464 | static struct ctl_table pty_table[] = { |
@@ -542,6 +553,7 @@ static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver, | |||
542 | 553 | ||
543 | static void pty_unix98_shutdown(struct tty_struct *tty) | 554 | static void pty_unix98_shutdown(struct tty_struct *tty) |
544 | { | 555 | { |
556 | tty_driver_remove_tty(tty->driver, tty); | ||
545 | /* We have our own method as we don't use the tty index */ | 557 | /* We have our own method as we don't use the tty index */ |
546 | kfree(tty->termios); | 558 | kfree(tty->termios); |
547 | } | 559 | } |
@@ -588,7 +600,8 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty) | |||
588 | */ | 600 | */ |
589 | tty_driver_kref_get(driver); | 601 | tty_driver_kref_get(driver); |
590 | tty->count++; | 602 | tty->count++; |
591 | pty_count++; | 603 | pty_inc_count(); /* tty */ |
604 | pty_inc_count(); /* tty->link */ | ||
592 | return 0; | 605 | return 0; |
593 | err_free_mem: | 606 | err_free_mem: |
594 | deinitialize_tty_struct(o_tty); | 607 | deinitialize_tty_struct(o_tty); |
@@ -602,7 +615,7 @@ err_free_tty: | |||
602 | 615 | ||
603 | static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) | 616 | static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) |
604 | { | 617 | { |
605 | pty_count--; | 618 | pty_dec_count(); |
606 | } | 619 | } |
607 | 620 | ||
608 | static const struct tty_operations ptm_unix98_ops = { | 621 | static const struct tty_operations ptm_unix98_ops = { |
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index f2dfec82faf..7f50999eebc 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -1819,6 +1819,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1819 | unsigned int iir, ier = 0, lsr; | 1819 | unsigned int iir, ier = 0, lsr; |
1820 | unsigned long flags; | 1820 | unsigned long flags; |
1821 | 1821 | ||
1822 | spin_lock_irqsave(&up->port.lock, flags); | ||
1823 | |||
1822 | /* | 1824 | /* |
1823 | * Must disable interrupts or else we risk racing with the interrupt | 1825 | * Must disable interrupts or else we risk racing with the interrupt |
1824 | * based handler. | 1826 | * based handler. |
@@ -1836,10 +1838,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1836 | * the "Diva" UART used on the management processor on many HP | 1838 | * the "Diva" UART used on the management processor on many HP |
1837 | * ia64 and parisc boxes. | 1839 | * ia64 and parisc boxes. |
1838 | */ | 1840 | */ |
1839 | spin_lock_irqsave(&up->port.lock, flags); | ||
1840 | lsr = serial_in(up, UART_LSR); | 1841 | lsr = serial_in(up, UART_LSR); |
1841 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; | 1842 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; |
1842 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && | 1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && |
1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && | 1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && |
1845 | (lsr & UART_LSR_THRE)) { | 1845 | (lsr & UART_LSR_THRE)) { |
@@ -1848,11 +1848,13 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | if (!(iir & UART_IIR_NO_INT)) | 1850 | if (!(iir & UART_IIR_NO_INT)) |
1851 | serial8250_handle_port(up); | 1851 | transmit_chars(up); |
1852 | 1852 | ||
1853 | if (is_real_interrupt(up->port.irq)) | 1853 | if (is_real_interrupt(up->port.irq)) |
1854 | serial_out(up, UART_IER, ier); | 1854 | serial_out(up, UART_IER, ier); |
1855 | 1855 | ||
1856 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
1857 | |||
1856 | /* Standard timer interval plus 0.2s to keep the port running */ | 1858 | /* Standard timer interval plus 0.2s to keep the port running */ |
1857 | mod_timer(&up->timer, | 1859 | mod_timer(&up->timer, |
1858 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); | 1860 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); |
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 6b887d90a20..3abeca2a2a1 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
@@ -1599,11 +1599,6 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
1599 | .device = 0x800D, | 1599 | .device = 0x800D, |
1600 | .init = pci_eg20t_init, | 1600 | .init = pci_eg20t_init, |
1601 | }, | 1601 | }, |
1602 | { | ||
1603 | .vendor = 0x10DB, | ||
1604 | .device = 0x800D, | ||
1605 | .init = pci_eg20t_init, | ||
1606 | }, | ||
1607 | /* | 1602 | /* |
1608 | * Cronyx Omega PCI (PLX-chip based) | 1603 | * Cronyx Omega PCI (PLX-chip based) |
1609 | */ | 1604 | */ |
@@ -4021,7 +4016,7 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
4021 | 0, 0, pbn_NETMOS9900_2s_115200 }, | 4016 | 0, 0, pbn_NETMOS9900_2s_115200 }, |
4022 | 4017 | ||
4023 | /* | 4018 | /* |
4024 | * Best Connectivity PCI Multi I/O cards | 4019 | * Best Connectivity and Rosewill PCI Multi I/O cards |
4025 | */ | 4020 | */ |
4026 | 4021 | ||
4027 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | 4022 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
@@ -4029,6 +4024,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
4029 | 0, 0, pbn_b0_1_115200 }, | 4024 | 0, 0, pbn_b0_1_115200 }, |
4030 | 4025 | ||
4031 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | 4026 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
4027 | 0xA000, 0x3002, | ||
4028 | 0, 0, pbn_b0_bt_2_115200 }, | ||
4029 | |||
4030 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | ||
4032 | 0xA000, 0x3004, | 4031 | 0xA000, 0x3004, |
4033 | 0, 0, pbn_b0_bt_4_115200 }, | 4032 | 0, 0, pbn_b0_bt_4_115200 }, |
4034 | /* Intel CE4100 */ | 4033 | /* Intel CE4100 */ |
diff --git a/drivers/tty/serial/8250_pnp.c b/drivers/tty/serial/8250_pnp.c index fc301f6722e..a2f236510ff 100644 --- a/drivers/tty/serial/8250_pnp.c +++ b/drivers/tty/serial/8250_pnp.c | |||
@@ -109,6 +109,9 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
109 | /* IBM */ | 109 | /* IBM */ |
110 | /* IBM Thinkpad 701 Internal Modem Voice */ | 110 | /* IBM Thinkpad 701 Internal Modem Voice */ |
111 | { "IBM0033", 0 }, | 111 | { "IBM0033", 0 }, |
112 | /* Intermec */ | ||
113 | /* Intermec CV60 touchscreen port */ | ||
114 | { "PNP4972", 0 }, | ||
112 | /* Intertex */ | 115 | /* Intertex */ |
113 | /* Intertex 28k8 33k6 Voice EXT PnP */ | 116 | /* Intertex 28k8 33k6 Voice EXT PnP */ |
114 | { "IXDC801", 0 }, | 117 | { "IXDC801", 0 }, |
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index af9b7814965..b922f5d2e61 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
@@ -1609,9 +1609,11 @@ static struct console atmel_console = { | |||
1609 | static int __init atmel_console_init(void) | 1609 | static int __init atmel_console_init(void) |
1610 | { | 1610 | { |
1611 | if (atmel_default_console_device) { | 1611 | if (atmel_default_console_device) { |
1612 | add_preferred_console(ATMEL_DEVICENAME, | 1612 | struct atmel_uart_data *pdata = |
1613 | atmel_default_console_device->id, NULL); | 1613 | atmel_default_console_device->dev.platform_data; |
1614 | atmel_init_port(&atmel_ports[atmel_default_console_device->id], | 1614 | |
1615 | add_preferred_console(ATMEL_DEVICENAME, pdata->num, NULL); | ||
1616 | atmel_init_port(&atmel_ports[pdata->num], | ||
1615 | atmel_default_console_device); | 1617 | atmel_default_console_device); |
1616 | register_console(&atmel_console); | 1618 | register_console(&atmel_console); |
1617 | } | 1619 | } |
diff --git a/drivers/tty/serial/max3107-aava.c b/drivers/tty/serial/max3107-aava.c index a1fe304f2f5..d73aadd7a9a 100644 --- a/drivers/tty/serial/max3107-aava.c +++ b/drivers/tty/serial/max3107-aava.c | |||
@@ -340,5 +340,5 @@ module_exit(max3107_exit); | |||
340 | 340 | ||
341 | MODULE_DESCRIPTION("MAX3107 driver"); | 341 | MODULE_DESCRIPTION("MAX3107 driver"); |
342 | MODULE_AUTHOR("Aavamobile"); | 342 | MODULE_AUTHOR("Aavamobile"); |
343 | MODULE_ALIAS("aava-max3107-spi"); | 343 | MODULE_ALIAS("spi:aava-max3107"); |
344 | MODULE_LICENSE("GPL v2"); | 344 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/tty/serial/max3107.c b/drivers/tty/serial/max3107.c index 750b4f62731..a8164601c0e 100644 --- a/drivers/tty/serial/max3107.c +++ b/drivers/tty/serial/max3107.c | |||
@@ -1209,5 +1209,5 @@ module_exit(max3107_exit); | |||
1209 | 1209 | ||
1210 | MODULE_DESCRIPTION("MAX3107 driver"); | 1210 | MODULE_DESCRIPTION("MAX3107 driver"); |
1211 | MODULE_AUTHOR("Aavamobile"); | 1211 | MODULE_AUTHOR("Aavamobile"); |
1212 | MODULE_ALIAS("max3107-spi"); | 1212 | MODULE_ALIAS("spi:max3107"); |
1213 | MODULE_LICENSE("GPL v2"); | 1213 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c index a764bf99743..23bc743f2a2 100644 --- a/drivers/tty/serial/mrst_max3110.c +++ b/drivers/tty/serial/mrst_max3110.c | |||
@@ -917,4 +917,4 @@ module_init(serial_m3110_init); | |||
917 | module_exit(serial_m3110_exit); | 917 | module_exit(serial_m3110_exit); |
918 | 918 | ||
919 | MODULE_LICENSE("GPL v2"); | 919 | MODULE_LICENSE("GPL v2"); |
920 | MODULE_ALIAS("max3110-uart"); | 920 | MODULE_ALIAS("spi:max3110-uart"); |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index c37df8d0fa2..5e713d3ef1f 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -806,8 +806,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, | |||
806 | 806 | ||
807 | serial_omap_set_mctrl(&up->port, up->port.mctrl); | 807 | serial_omap_set_mctrl(&up->port, up->port.mctrl); |
808 | /* Software Flow Control Configuration */ | 808 | /* Software Flow Control Configuration */ |
809 | if (termios->c_iflag & (IXON | IXOFF)) | 809 | serial_omap_configure_xonxoff(up, termios); |
810 | serial_omap_configure_xonxoff(up, termios); | ||
811 | 810 | ||
812 | spin_unlock_irqrestore(&up->port.lock, flags); | 811 | spin_unlock_irqrestore(&up->port.lock, flags); |
813 | dev_dbg(up->port.dev, "serial_omap_set_termios+%d\n", up->pdev->id); | 812 | dev_dbg(up->port.dev, "serial_omap_set_termios+%d\n", up->pdev->id); |
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 846dfcd3ce0..b46218d679e 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c | |||
@@ -598,7 +598,8 @@ static void pch_request_dma(struct uart_port *port) | |||
598 | dma_cap_zero(mask); | 598 | dma_cap_zero(mask); |
599 | dma_cap_set(DMA_SLAVE, mask); | 599 | dma_cap_set(DMA_SLAVE, mask); |
600 | 600 | ||
601 | dma_dev = pci_get_bus_and_slot(2, PCI_DEVFN(0xa, 0)); /* Get DMA's dev | 601 | dma_dev = pci_get_bus_and_slot(priv->pdev->bus->number, |
602 | PCI_DEVFN(0xa, 0)); /* Get DMA's dev | ||
602 | information */ | 603 | information */ |
603 | /* Set Tx DMA */ | 604 | /* Set Tx DMA */ |
604 | param = &priv->param_tx; | 605 | param = &priv->param_tx; |
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index afc62942315..6edafb5ace1 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
@@ -1225,15 +1225,19 @@ static const struct dev_pm_ops s3c24xx_serial_pm_ops = { | |||
1225 | .suspend = s3c24xx_serial_suspend, | 1225 | .suspend = s3c24xx_serial_suspend, |
1226 | .resume = s3c24xx_serial_resume, | 1226 | .resume = s3c24xx_serial_resume, |
1227 | }; | 1227 | }; |
1228 | #define SERIAL_SAMSUNG_PM_OPS (&s3c24xx_serial_pm_ops) | ||
1229 | |||
1228 | #else /* !CONFIG_PM_SLEEP */ | 1230 | #else /* !CONFIG_PM_SLEEP */ |
1229 | #define s3c24xx_serial_pm_ops NULL | 1231 | |
1232 | #define SERIAL_SAMSUNG_PM_OPS NULL | ||
1230 | #endif /* CONFIG_PM_SLEEP */ | 1233 | #endif /* CONFIG_PM_SLEEP */ |
1231 | 1234 | ||
1232 | int s3c24xx_serial_init(struct platform_driver *drv, | 1235 | int s3c24xx_serial_init(struct platform_driver *drv, |
1233 | struct s3c24xx_uart_info *info) | 1236 | struct s3c24xx_uart_info *info) |
1234 | { | 1237 | { |
1235 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); | 1238 | dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); |
1236 | drv->driver.pm = &s3c24xx_serial_pm_ops; | 1239 | |
1240 | drv->driver.pm = SERIAL_SAMSUNG_PM_OPS; | ||
1237 | 1241 | ||
1238 | return platform_driver_register(drv); | 1242 | return platform_driver_register(drv); |
1239 | } | 1243 | } |
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index db7912cb7ae..a3efbea5dbb 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -200,6 +200,11 @@ static int uart_startup(struct tty_struct *tty, struct uart_state *state, int in | |||
200 | clear_bit(TTY_IO_ERROR, &tty->flags); | 200 | clear_bit(TTY_IO_ERROR, &tty->flags); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | ||
204 | * This is to allow setserial on this port. People may want to set | ||
205 | * port/irq/type and then reconfigure the port properly if it failed | ||
206 | * now. | ||
207 | */ | ||
203 | if (retval && capable(CAP_SYS_ADMIN)) | 208 | if (retval && capable(CAP_SYS_ADMIN)) |
204 | retval = 0; | 209 | retval = 0; |
205 | 210 | ||
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 161e7001070..5ea6ec3442e 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1927,6 +1927,7 @@ static int __devinit sci_init_single(struct platform_device *dev, | |||
1927 | 1927 | ||
1928 | port->dev = &dev->dev; | 1928 | port->dev = &dev->dev; |
1929 | 1929 | ||
1930 | pm_runtime_irq_safe(&dev->dev); | ||
1930 | pm_runtime_enable(&dev->dev); | 1931 | pm_runtime_enable(&dev->dev); |
1931 | } | 1932 | } |
1932 | 1933 | ||
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index c327218cad4..9af9f0879a2 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c | |||
@@ -235,7 +235,7 @@ static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port) | |||
235 | return qe_port->bd_virt + (addr - qe_port->bd_dma_addr); | 235 | return qe_port->bd_virt + (addr - qe_port->bd_dma_addr); |
236 | 236 | ||
237 | /* something nasty happened */ | 237 | /* something nasty happened */ |
238 | printk(KERN_ERR "%s: addr=%x\n", __func__, addr); | 238 | printk(KERN_ERR "%s: addr=%llx\n", __func__, (u64)addr); |
239 | BUG(); | 239 | BUG(); |
240 | return NULL; | 240 | return NULL; |
241 | } | 241 | } |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 150e4f747c7..4f1fc81112e 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -1295,8 +1295,7 @@ static int tty_driver_install_tty(struct tty_driver *driver, | |||
1295 | * | 1295 | * |
1296 | * Locking: tty_mutex for now | 1296 | * Locking: tty_mutex for now |
1297 | */ | 1297 | */ |
1298 | static void tty_driver_remove_tty(struct tty_driver *driver, | 1298 | void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty) |
1299 | struct tty_struct *tty) | ||
1300 | { | 1299 | { |
1301 | if (driver->ops->remove) | 1300 | if (driver->ops->remove) |
1302 | driver->ops->remove(driver, tty); | 1301 | driver->ops->remove(driver, tty); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 8669ba3fe79..73cbbd85219 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1775,6 +1775,8 @@ int usb_hcd_alloc_bandwidth(struct usb_device *udev, | |||
1775 | struct usb_interface *iface = usb_ifnum_to_if(udev, | 1775 | struct usb_interface *iface = usb_ifnum_to_if(udev, |
1776 | cur_alt->desc.bInterfaceNumber); | 1776 | cur_alt->desc.bInterfaceNumber); |
1777 | 1777 | ||
1778 | if (!iface) | ||
1779 | return -EINVAL; | ||
1778 | if (iface->resetting_device) { | 1780 | if (iface->resetting_device) { |
1779 | /* | 1781 | /* |
1780 | * The USB core just reset the device, so the xHCI host | 1782 | * The USB core just reset the device, so the xHCI host |
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index 8f8d3f6cd89..8f3eab1af88 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c | |||
@@ -434,6 +434,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt) | |||
434 | config_ep_by_speed(gadget, f, fp->out_ep)) { | 434 | config_ep_by_speed(gadget, f, fp->out_ep)) { |
435 | fp->in_ep->desc = NULL; | 435 | fp->in_ep->desc = NULL; |
436 | fp->out_ep->desc = NULL; | 436 | fp->out_ep->desc = NULL; |
437 | spin_unlock(&port->lock); | ||
437 | return -EINVAL; | 438 | return -EINVAL; |
438 | } | 439 | } |
439 | usb_ep_enable(fp->out_ep); | 440 | usb_ep_enable(fp->out_ep); |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index e051b30c184..4c32cb19b40 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -343,7 +343,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
343 | u32 temp; | 343 | u32 temp; |
344 | u32 power_okay; | 344 | u32 power_okay; |
345 | int i; | 345 | int i; |
346 | u8 resume_needed = 0; | 346 | unsigned long resume_needed = 0; |
347 | 347 | ||
348 | if (time_before (jiffies, ehci->next_statechange)) | 348 | if (time_before (jiffies, ehci->next_statechange)) |
349 | msleep(5); | 349 | msleep(5); |
@@ -416,7 +416,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
416 | if (test_bit(i, &ehci->bus_suspended) && | 416 | if (test_bit(i, &ehci->bus_suspended) && |
417 | (temp & PORT_SUSPEND)) { | 417 | (temp & PORT_SUSPEND)) { |
418 | temp |= PORT_RESUME; | 418 | temp |= PORT_RESUME; |
419 | resume_needed = 1; | 419 | set_bit(i, &resume_needed); |
420 | } | 420 | } |
421 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); | 421 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); |
422 | } | 422 | } |
@@ -431,8 +431,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
431 | i = HCS_N_PORTS (ehci->hcs_params); | 431 | i = HCS_N_PORTS (ehci->hcs_params); |
432 | while (i--) { | 432 | while (i--) { |
433 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); | 433 | temp = ehci_readl(ehci, &ehci->regs->port_status [i]); |
434 | if (test_bit(i, &ehci->bus_suspended) && | 434 | if (test_bit(i, &resume_needed)) { |
435 | (temp & PORT_SUSPEND)) { | ||
436 | temp &= ~(PORT_RWC_BITS | PORT_RESUME); | 435 | temp &= ~(PORT_RWC_BITS | PORT_RESUME); |
437 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); | 436 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); |
438 | ehci_vdbg (ehci, "resumed port %d\n", i + 1); | 437 | ehci_vdbg (ehci, "resumed port %d\n", i + 1); |
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index b3958b3d316..9e77f1c8bdb 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c | |||
@@ -86,6 +86,7 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) | |||
86 | goto fail_hcd; | 86 | goto fail_hcd; |
87 | } | 87 | } |
88 | 88 | ||
89 | s5p_ehci->hcd = hcd; | ||
89 | s5p_ehci->clk = clk_get(&pdev->dev, "usbhost"); | 90 | s5p_ehci->clk = clk_get(&pdev->dev, "usbhost"); |
90 | 91 | ||
91 | if (IS_ERR(s5p_ehci->clk)) { | 92 | if (IS_ERR(s5p_ehci->clk)) { |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 0be788cc2fd..1e96d1f1fe6 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -463,11 +463,12 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
463 | && (temp & PORT_POWER)) | 463 | && (temp & PORT_POWER)) |
464 | status |= USB_PORT_STAT_SUSPEND; | 464 | status |= USB_PORT_STAT_SUSPEND; |
465 | } | 465 | } |
466 | if ((temp & PORT_PLS_MASK) == XDEV_RESUME) { | 466 | if ((temp & PORT_PLS_MASK) == XDEV_RESUME && |
467 | !DEV_SUPERSPEED(temp)) { | ||
467 | if ((temp & PORT_RESET) || !(temp & PORT_PE)) | 468 | if ((temp & PORT_RESET) || !(temp & PORT_PE)) |
468 | goto error; | 469 | goto error; |
469 | if (!DEV_SUPERSPEED(temp) && time_after_eq(jiffies, | 470 | if (time_after_eq(jiffies, |
470 | bus_state->resume_done[wIndex])) { | 471 | bus_state->resume_done[wIndex])) { |
471 | xhci_dbg(xhci, "Resume USB2 port %d\n", | 472 | xhci_dbg(xhci, "Resume USB2 port %d\n", |
472 | wIndex + 1); | 473 | wIndex + 1); |
473 | bus_state->resume_done[wIndex] = 0; | 474 | bus_state->resume_done[wIndex] = 0; |
@@ -487,6 +488,14 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
487 | xhci_ring_device(xhci, slot_id); | 488 | xhci_ring_device(xhci, slot_id); |
488 | bus_state->port_c_suspend |= 1 << wIndex; | 489 | bus_state->port_c_suspend |= 1 << wIndex; |
489 | bus_state->suspended_ports &= ~(1 << wIndex); | 490 | bus_state->suspended_ports &= ~(1 << wIndex); |
491 | } else { | ||
492 | /* | ||
493 | * The resume has been signaling for less than | ||
494 | * 20ms. Report the port status as SUSPEND, | ||
495 | * let the usbcore check port status again | ||
496 | * and clear resume signaling later. | ||
497 | */ | ||
498 | status |= USB_PORT_STAT_SUSPEND; | ||
490 | } | 499 | } |
491 | } | 500 | } |
492 | if ((temp & PORT_PLS_MASK) == XDEV_U0 | 501 | if ((temp & PORT_PLS_MASK) == XDEV_U0 |
@@ -664,7 +673,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, | |||
664 | xhci_dbg(xhci, "PORTSC %04x\n", temp); | 673 | xhci_dbg(xhci, "PORTSC %04x\n", temp); |
665 | if (temp & PORT_RESET) | 674 | if (temp & PORT_RESET) |
666 | goto error; | 675 | goto error; |
667 | if (temp & XDEV_U3) { | 676 | if ((temp & PORT_PLS_MASK) == XDEV_U3) { |
668 | if ((temp & PORT_PE) == 0) | 677 | if ((temp & PORT_PE) == 0) |
669 | goto error; | 678 | goto error; |
670 | 679 | ||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 7113d16e2d3..54139a2f06c 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -514,8 +514,12 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, | |||
514 | (unsigned long long) addr); | 514 | (unsigned long long) addr); |
515 | } | 515 | } |
516 | 516 | ||
517 | /* flip_cycle means flip the cycle bit of all but the first and last TRB. | ||
518 | * (The last TRB actually points to the ring enqueue pointer, which is not part | ||
519 | * of this TD.) This is used to remove partially enqueued isoc TDs from a ring. | ||
520 | */ | ||
517 | static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, | 521 | static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, |
518 | struct xhci_td *cur_td) | 522 | struct xhci_td *cur_td, bool flip_cycle) |
519 | { | 523 | { |
520 | struct xhci_segment *cur_seg; | 524 | struct xhci_segment *cur_seg; |
521 | union xhci_trb *cur_trb; | 525 | union xhci_trb *cur_trb; |
@@ -528,6 +532,12 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, | |||
528 | * leave the pointers intact. | 532 | * leave the pointers intact. |
529 | */ | 533 | */ |
530 | cur_trb->generic.field[3] &= cpu_to_le32(~TRB_CHAIN); | 534 | cur_trb->generic.field[3] &= cpu_to_le32(~TRB_CHAIN); |
535 | /* Flip the cycle bit (link TRBs can't be the first | ||
536 | * or last TRB). | ||
537 | */ | ||
538 | if (flip_cycle) | ||
539 | cur_trb->generic.field[3] ^= | ||
540 | cpu_to_le32(TRB_CYCLE); | ||
531 | xhci_dbg(xhci, "Cancel (unchain) link TRB\n"); | 541 | xhci_dbg(xhci, "Cancel (unchain) link TRB\n"); |
532 | xhci_dbg(xhci, "Address = %p (0x%llx dma); " | 542 | xhci_dbg(xhci, "Address = %p (0x%llx dma); " |
533 | "in seg %p (0x%llx dma)\n", | 543 | "in seg %p (0x%llx dma)\n", |
@@ -541,6 +551,11 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, | |||
541 | cur_trb->generic.field[2] = 0; | 551 | cur_trb->generic.field[2] = 0; |
542 | /* Preserve only the cycle bit of this TRB */ | 552 | /* Preserve only the cycle bit of this TRB */ |
543 | cur_trb->generic.field[3] &= cpu_to_le32(TRB_CYCLE); | 553 | cur_trb->generic.field[3] &= cpu_to_le32(TRB_CYCLE); |
554 | /* Flip the cycle bit except on the first or last TRB */ | ||
555 | if (flip_cycle && cur_trb != cur_td->first_trb && | ||
556 | cur_trb != cur_td->last_trb) | ||
557 | cur_trb->generic.field[3] ^= | ||
558 | cpu_to_le32(TRB_CYCLE); | ||
544 | cur_trb->generic.field[3] |= cpu_to_le32( | 559 | cur_trb->generic.field[3] |= cpu_to_le32( |
545 | TRB_TYPE(TRB_TR_NOOP)); | 560 | TRB_TYPE(TRB_TR_NOOP)); |
546 | xhci_dbg(xhci, "Cancel TRB %p (0x%llx dma) " | 561 | xhci_dbg(xhci, "Cancel TRB %p (0x%llx dma) " |
@@ -719,14 +734,14 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci, | |||
719 | cur_td->urb->stream_id, | 734 | cur_td->urb->stream_id, |
720 | cur_td, &deq_state); | 735 | cur_td, &deq_state); |
721 | else | 736 | else |
722 | td_to_noop(xhci, ep_ring, cur_td); | 737 | td_to_noop(xhci, ep_ring, cur_td, false); |
723 | remove_finished_td: | 738 | remove_finished_td: |
724 | /* | 739 | /* |
725 | * The event handler won't see a completion for this TD anymore, | 740 | * The event handler won't see a completion for this TD anymore, |
726 | * so remove it from the endpoint ring's TD list. Keep it in | 741 | * so remove it from the endpoint ring's TD list. Keep it in |
727 | * the cancelled TD list for URB completion later. | 742 | * the cancelled TD list for URB completion later. |
728 | */ | 743 | */ |
729 | list_del(&cur_td->td_list); | 744 | list_del_init(&cur_td->td_list); |
730 | } | 745 | } |
731 | last_unlinked_td = cur_td; | 746 | last_unlinked_td = cur_td; |
732 | xhci_stop_watchdog_timer_in_irq(xhci, ep); | 747 | xhci_stop_watchdog_timer_in_irq(xhci, ep); |
@@ -754,7 +769,7 @@ remove_finished_td: | |||
754 | do { | 769 | do { |
755 | cur_td = list_entry(ep->cancelled_td_list.next, | 770 | cur_td = list_entry(ep->cancelled_td_list.next, |
756 | struct xhci_td, cancelled_td_list); | 771 | struct xhci_td, cancelled_td_list); |
757 | list_del(&cur_td->cancelled_td_list); | 772 | list_del_init(&cur_td->cancelled_td_list); |
758 | 773 | ||
759 | /* Clean up the cancelled URB */ | 774 | /* Clean up the cancelled URB */ |
760 | /* Doesn't matter what we pass for status, since the core will | 775 | /* Doesn't matter what we pass for status, since the core will |
@@ -862,9 +877,9 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) | |||
862 | cur_td = list_first_entry(&ring->td_list, | 877 | cur_td = list_first_entry(&ring->td_list, |
863 | struct xhci_td, | 878 | struct xhci_td, |
864 | td_list); | 879 | td_list); |
865 | list_del(&cur_td->td_list); | 880 | list_del_init(&cur_td->td_list); |
866 | if (!list_empty(&cur_td->cancelled_td_list)) | 881 | if (!list_empty(&cur_td->cancelled_td_list)) |
867 | list_del(&cur_td->cancelled_td_list); | 882 | list_del_init(&cur_td->cancelled_td_list); |
868 | xhci_giveback_urb_in_irq(xhci, cur_td, | 883 | xhci_giveback_urb_in_irq(xhci, cur_td, |
869 | -ESHUTDOWN, "killed"); | 884 | -ESHUTDOWN, "killed"); |
870 | } | 885 | } |
@@ -873,7 +888,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) | |||
873 | &temp_ep->cancelled_td_list, | 888 | &temp_ep->cancelled_td_list, |
874 | struct xhci_td, | 889 | struct xhci_td, |
875 | cancelled_td_list); | 890 | cancelled_td_list); |
876 | list_del(&cur_td->cancelled_td_list); | 891 | list_del_init(&cur_td->cancelled_td_list); |
877 | xhci_giveback_urb_in_irq(xhci, cur_td, | 892 | xhci_giveback_urb_in_irq(xhci, cur_td, |
878 | -ESHUTDOWN, "killed"); | 893 | -ESHUTDOWN, "killed"); |
879 | } | 894 | } |
@@ -1565,10 +1580,10 @@ td_cleanup: | |||
1565 | else | 1580 | else |
1566 | *status = 0; | 1581 | *status = 0; |
1567 | } | 1582 | } |
1568 | list_del(&td->td_list); | 1583 | list_del_init(&td->td_list); |
1569 | /* Was this TD slated to be cancelled but completed anyway? */ | 1584 | /* Was this TD slated to be cancelled but completed anyway? */ |
1570 | if (!list_empty(&td->cancelled_td_list)) | 1585 | if (!list_empty(&td->cancelled_td_list)) |
1571 | list_del(&td->cancelled_td_list); | 1586 | list_del_init(&td->cancelled_td_list); |
1572 | 1587 | ||
1573 | urb_priv->td_cnt++; | 1588 | urb_priv->td_cnt++; |
1574 | /* Giveback the urb when all the tds are completed */ | 1589 | /* Giveback the urb when all the tds are completed */ |
@@ -2500,11 +2515,8 @@ static int prepare_transfer(struct xhci_hcd *xhci, | |||
2500 | 2515 | ||
2501 | if (td_index == 0) { | 2516 | if (td_index == 0) { |
2502 | ret = usb_hcd_link_urb_to_ep(bus_to_hcd(urb->dev->bus), urb); | 2517 | ret = usb_hcd_link_urb_to_ep(bus_to_hcd(urb->dev->bus), urb); |
2503 | if (unlikely(ret)) { | 2518 | if (unlikely(ret)) |
2504 | xhci_urb_free_priv(xhci, urb_priv); | ||
2505 | urb->hcpriv = NULL; | ||
2506 | return ret; | 2519 | return ret; |
2507 | } | ||
2508 | } | 2520 | } |
2509 | 2521 | ||
2510 | td->urb = urb; | 2522 | td->urb = urb; |
@@ -2672,6 +2684,10 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len, | |||
2672 | { | 2684 | { |
2673 | int packets_transferred; | 2685 | int packets_transferred; |
2674 | 2686 | ||
2687 | /* One TRB with a zero-length data packet. */ | ||
2688 | if (running_total == 0 && trb_buff_len == 0) | ||
2689 | return 0; | ||
2690 | |||
2675 | /* All the TRB queueing functions don't count the current TRB in | 2691 | /* All the TRB queueing functions don't count the current TRB in |
2676 | * running_total. | 2692 | * running_total. |
2677 | */ | 2693 | */ |
@@ -3113,20 +3129,15 @@ static int count_isoc_trbs_needed(struct xhci_hcd *xhci, | |||
3113 | struct urb *urb, int i) | 3129 | struct urb *urb, int i) |
3114 | { | 3130 | { |
3115 | int num_trbs = 0; | 3131 | int num_trbs = 0; |
3116 | u64 addr, td_len, running_total; | 3132 | u64 addr, td_len; |
3117 | 3133 | ||
3118 | addr = (u64) (urb->transfer_dma + urb->iso_frame_desc[i].offset); | 3134 | addr = (u64) (urb->transfer_dma + urb->iso_frame_desc[i].offset); |
3119 | td_len = urb->iso_frame_desc[i].length; | 3135 | td_len = urb->iso_frame_desc[i].length; |
3120 | 3136 | ||
3121 | running_total = TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE - 1)); | 3137 | num_trbs = DIV_ROUND_UP(td_len + (addr & (TRB_MAX_BUFF_SIZE - 1)), |
3122 | running_total &= TRB_MAX_BUFF_SIZE - 1; | 3138 | TRB_MAX_BUFF_SIZE); |
3123 | if (running_total != 0) | 3139 | if (num_trbs == 0) |
3124 | num_trbs++; | ||
3125 | |||
3126 | while (running_total < td_len) { | ||
3127 | num_trbs++; | 3140 | num_trbs++; |
3128 | running_total += TRB_MAX_BUFF_SIZE; | ||
3129 | } | ||
3130 | 3141 | ||
3131 | return num_trbs; | 3142 | return num_trbs; |
3132 | } | 3143 | } |
@@ -3226,6 +3237,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3226 | start_trb = &ep_ring->enqueue->generic; | 3237 | start_trb = &ep_ring->enqueue->generic; |
3227 | start_cycle = ep_ring->cycle_state; | 3238 | start_cycle = ep_ring->cycle_state; |
3228 | 3239 | ||
3240 | urb_priv = urb->hcpriv; | ||
3229 | /* Queue the first TRB, even if it's zero-length */ | 3241 | /* Queue the first TRB, even if it's zero-length */ |
3230 | for (i = 0; i < num_tds; i++) { | 3242 | for (i = 0; i < num_tds; i++) { |
3231 | unsigned int total_packet_count; | 3243 | unsigned int total_packet_count; |
@@ -3237,9 +3249,11 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3237 | addr = start_addr + urb->iso_frame_desc[i].offset; | 3249 | addr = start_addr + urb->iso_frame_desc[i].offset; |
3238 | td_len = urb->iso_frame_desc[i].length; | 3250 | td_len = urb->iso_frame_desc[i].length; |
3239 | td_remain_len = td_len; | 3251 | td_remain_len = td_len; |
3240 | /* FIXME: Ignoring zero-length packets, can those happen? */ | ||
3241 | total_packet_count = roundup(td_len, | 3252 | total_packet_count = roundup(td_len, |
3242 | le16_to_cpu(urb->ep->desc.wMaxPacketSize)); | 3253 | le16_to_cpu(urb->ep->desc.wMaxPacketSize)); |
3254 | /* A zero-length transfer still involves at least one packet. */ | ||
3255 | if (total_packet_count == 0) | ||
3256 | total_packet_count++; | ||
3243 | burst_count = xhci_get_burst_count(xhci, urb->dev, urb, | 3257 | burst_count = xhci_get_burst_count(xhci, urb->dev, urb, |
3244 | total_packet_count); | 3258 | total_packet_count); |
3245 | residue = xhci_get_last_burst_packet_count(xhci, | 3259 | residue = xhci_get_last_burst_packet_count(xhci, |
@@ -3249,12 +3263,13 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3249 | 3263 | ||
3250 | ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, | 3264 | ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, |
3251 | urb->stream_id, trbs_per_td, urb, i, mem_flags); | 3265 | urb->stream_id, trbs_per_td, urb, i, mem_flags); |
3252 | if (ret < 0) | 3266 | if (ret < 0) { |
3253 | return ret; | 3267 | if (i == 0) |
3268 | return ret; | ||
3269 | goto cleanup; | ||
3270 | } | ||
3254 | 3271 | ||
3255 | urb_priv = urb->hcpriv; | ||
3256 | td = urb_priv->td[i]; | 3272 | td = urb_priv->td[i]; |
3257 | |||
3258 | for (j = 0; j < trbs_per_td; j++) { | 3273 | for (j = 0; j < trbs_per_td; j++) { |
3259 | u32 remainder = 0; | 3274 | u32 remainder = 0; |
3260 | field = TRB_TBC(burst_count) | TRB_TLBPC(residue); | 3275 | field = TRB_TBC(burst_count) | TRB_TLBPC(residue); |
@@ -3344,6 +3359,27 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, | |||
3344 | giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, | 3359 | giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, |
3345 | start_cycle, start_trb); | 3360 | start_cycle, start_trb); |
3346 | return 0; | 3361 | return 0; |
3362 | cleanup: | ||
3363 | /* Clean up a partially enqueued isoc transfer. */ | ||
3364 | |||
3365 | for (i--; i >= 0; i--) | ||
3366 | list_del_init(&urb_priv->td[i]->td_list); | ||
3367 | |||
3368 | /* Use the first TD as a temporary variable to turn the TDs we've queued | ||
3369 | * into No-ops with a software-owned cycle bit. That way the hardware | ||
3370 | * won't accidentally start executing bogus TDs when we partially | ||
3371 | * overwrite them. td->first_trb and td->start_seg are already set. | ||
3372 | */ | ||
3373 | urb_priv->td[0]->last_trb = ep_ring->enqueue; | ||
3374 | /* Every TRB except the first & last will have its cycle bit flipped. */ | ||
3375 | td_to_noop(xhci, ep_ring, urb_priv->td[0], true); | ||
3376 | |||
3377 | /* Reset the ring enqueue back to the first TRB and its cycle bit. */ | ||
3378 | ep_ring->enqueue = urb_priv->td[0]->first_trb; | ||
3379 | ep_ring->enq_seg = urb_priv->td[0]->start_seg; | ||
3380 | ep_ring->cycle_state = start_cycle; | ||
3381 | usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb); | ||
3382 | return ret; | ||
3347 | } | 3383 | } |
3348 | 3384 | ||
3349 | /* | 3385 | /* |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 1c4432d8fc1..3a0f695138f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1085,8 +1085,11 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1085 | if (urb->dev->speed == USB_SPEED_FULL) { | 1085 | if (urb->dev->speed == USB_SPEED_FULL) { |
1086 | ret = xhci_check_maxpacket(xhci, slot_id, | 1086 | ret = xhci_check_maxpacket(xhci, slot_id, |
1087 | ep_index, urb); | 1087 | ep_index, urb); |
1088 | if (ret < 0) | 1088 | if (ret < 0) { |
1089 | xhci_urb_free_priv(xhci, urb_priv); | ||
1090 | urb->hcpriv = NULL; | ||
1089 | return ret; | 1091 | return ret; |
1092 | } | ||
1090 | } | 1093 | } |
1091 | 1094 | ||
1092 | /* We have a spinlock and interrupts disabled, so we must pass | 1095 | /* We have a spinlock and interrupts disabled, so we must pass |
@@ -1097,6 +1100,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1097 | goto dying; | 1100 | goto dying; |
1098 | ret = xhci_queue_ctrl_tx(xhci, GFP_ATOMIC, urb, | 1101 | ret = xhci_queue_ctrl_tx(xhci, GFP_ATOMIC, urb, |
1099 | slot_id, ep_index); | 1102 | slot_id, ep_index); |
1103 | if (ret) | ||
1104 | goto free_priv; | ||
1100 | spin_unlock_irqrestore(&xhci->lock, flags); | 1105 | spin_unlock_irqrestore(&xhci->lock, flags); |
1101 | } else if (usb_endpoint_xfer_bulk(&urb->ep->desc)) { | 1106 | } else if (usb_endpoint_xfer_bulk(&urb->ep->desc)) { |
1102 | spin_lock_irqsave(&xhci->lock, flags); | 1107 | spin_lock_irqsave(&xhci->lock, flags); |
@@ -1117,6 +1122,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1117 | ret = xhci_queue_bulk_tx(xhci, GFP_ATOMIC, urb, | 1122 | ret = xhci_queue_bulk_tx(xhci, GFP_ATOMIC, urb, |
1118 | slot_id, ep_index); | 1123 | slot_id, ep_index); |
1119 | } | 1124 | } |
1125 | if (ret) | ||
1126 | goto free_priv; | ||
1120 | spin_unlock_irqrestore(&xhci->lock, flags); | 1127 | spin_unlock_irqrestore(&xhci->lock, flags); |
1121 | } else if (usb_endpoint_xfer_int(&urb->ep->desc)) { | 1128 | } else if (usb_endpoint_xfer_int(&urb->ep->desc)) { |
1122 | spin_lock_irqsave(&xhci->lock, flags); | 1129 | spin_lock_irqsave(&xhci->lock, flags); |
@@ -1124,6 +1131,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1124 | goto dying; | 1131 | goto dying; |
1125 | ret = xhci_queue_intr_tx(xhci, GFP_ATOMIC, urb, | 1132 | ret = xhci_queue_intr_tx(xhci, GFP_ATOMIC, urb, |
1126 | slot_id, ep_index); | 1133 | slot_id, ep_index); |
1134 | if (ret) | ||
1135 | goto free_priv; | ||
1127 | spin_unlock_irqrestore(&xhci->lock, flags); | 1136 | spin_unlock_irqrestore(&xhci->lock, flags); |
1128 | } else { | 1137 | } else { |
1129 | spin_lock_irqsave(&xhci->lock, flags); | 1138 | spin_lock_irqsave(&xhci->lock, flags); |
@@ -1131,18 +1140,22 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) | |||
1131 | goto dying; | 1140 | goto dying; |
1132 | ret = xhci_queue_isoc_tx_prepare(xhci, GFP_ATOMIC, urb, | 1141 | ret = xhci_queue_isoc_tx_prepare(xhci, GFP_ATOMIC, urb, |
1133 | slot_id, ep_index); | 1142 | slot_id, ep_index); |
1143 | if (ret) | ||
1144 | goto free_priv; | ||
1134 | spin_unlock_irqrestore(&xhci->lock, flags); | 1145 | spin_unlock_irqrestore(&xhci->lock, flags); |
1135 | } | 1146 | } |
1136 | exit: | 1147 | exit: |
1137 | return ret; | 1148 | return ret; |
1138 | dying: | 1149 | dying: |
1139 | xhci_urb_free_priv(xhci, urb_priv); | ||
1140 | urb->hcpriv = NULL; | ||
1141 | xhci_dbg(xhci, "Ep 0x%x: URB %p submitted for " | 1150 | xhci_dbg(xhci, "Ep 0x%x: URB %p submitted for " |
1142 | "non-responsive xHCI host.\n", | 1151 | "non-responsive xHCI host.\n", |
1143 | urb->ep->desc.bEndpointAddress, urb); | 1152 | urb->ep->desc.bEndpointAddress, urb); |
1153 | ret = -ESHUTDOWN; | ||
1154 | free_priv: | ||
1155 | xhci_urb_free_priv(xhci, urb_priv); | ||
1156 | urb->hcpriv = NULL; | ||
1144 | spin_unlock_irqrestore(&xhci->lock, flags); | 1157 | spin_unlock_irqrestore(&xhci->lock, flags); |
1145 | return -ESHUTDOWN; | 1158 | return ret; |
1146 | } | 1159 | } |
1147 | 1160 | ||
1148 | /* Get the right ring for the given URB. | 1161 | /* Get the right ring for the given URB. |
@@ -1239,6 +1252,13 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
1239 | if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) { | 1252 | if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) { |
1240 | xhci_dbg(xhci, "HW died, freeing TD.\n"); | 1253 | xhci_dbg(xhci, "HW died, freeing TD.\n"); |
1241 | urb_priv = urb->hcpriv; | 1254 | urb_priv = urb->hcpriv; |
1255 | for (i = urb_priv->td_cnt; i < urb_priv->length; i++) { | ||
1256 | td = urb_priv->td[i]; | ||
1257 | if (!list_empty(&td->td_list)) | ||
1258 | list_del_init(&td->td_list); | ||
1259 | if (!list_empty(&td->cancelled_td_list)) | ||
1260 | list_del_init(&td->cancelled_td_list); | ||
1261 | } | ||
1242 | 1262 | ||
1243 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 1263 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
1244 | spin_unlock_irqrestore(&xhci->lock, flags); | 1264 | spin_unlock_irqrestore(&xhci->lock, flags); |
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index ae8c3961774..5e7cfba5b07 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/prefetch.h> | ||
20 | 21 | ||
21 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
22 | 23 | ||
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index 149f3f310a0..318fb4e8a88 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c | |||
@@ -226,8 +226,10 @@ static int cppi_controller_stop(struct dma_controller *c) | |||
226 | struct cppi *controller; | 226 | struct cppi *controller; |
227 | void __iomem *tibase; | 227 | void __iomem *tibase; |
228 | int i; | 228 | int i; |
229 | struct musb *musb; | ||
229 | 230 | ||
230 | controller = container_of(c, struct cppi, controller); | 231 | controller = container_of(c, struct cppi, controller); |
232 | musb = controller->musb; | ||
231 | 233 | ||
232 | tibase = controller->tibase; | 234 | tibase = controller->tibase; |
233 | /* DISABLE INDIVIDUAL CHANNEL Interrupts */ | 235 | /* DISABLE INDIVIDUAL CHANNEL Interrupts */ |
@@ -289,9 +291,11 @@ cppi_channel_allocate(struct dma_controller *c, | |||
289 | u8 index; | 291 | u8 index; |
290 | struct cppi_channel *cppi_ch; | 292 | struct cppi_channel *cppi_ch; |
291 | void __iomem *tibase; | 293 | void __iomem *tibase; |
294 | struct musb *musb; | ||
292 | 295 | ||
293 | controller = container_of(c, struct cppi, controller); | 296 | controller = container_of(c, struct cppi, controller); |
294 | tibase = controller->tibase; | 297 | tibase = controller->tibase; |
298 | musb = controller->musb; | ||
295 | 299 | ||
296 | /* ep0 doesn't use DMA; remember cppi indices are 0..N-1 */ | 300 | /* ep0 doesn't use DMA; remember cppi indices are 0..N-1 */ |
297 | index = ep->epnum - 1; | 301 | index = ep->epnum - 1; |
@@ -339,7 +343,8 @@ static void cppi_channel_release(struct dma_channel *channel) | |||
339 | c = container_of(channel, struct cppi_channel, channel); | 343 | c = container_of(channel, struct cppi_channel, channel); |
340 | tibase = c->controller->tibase; | 344 | tibase = c->controller->tibase; |
341 | if (!c->hw_ep) | 345 | if (!c->hw_ep) |
342 | dev_dbg(musb->controller, "releasing idle DMA channel %p\n", c); | 346 | dev_dbg(c->controller->musb->controller, |
347 | "releasing idle DMA channel %p\n", c); | ||
343 | else if (!c->transmit) | 348 | else if (!c->transmit) |
344 | core_rxirq_enable(tibase, c->index + 1); | 349 | core_rxirq_enable(tibase, c->index + 1); |
345 | 350 | ||
@@ -357,10 +362,11 @@ cppi_dump_rx(int level, struct cppi_channel *c, const char *tag) | |||
357 | 362 | ||
358 | musb_ep_select(base, c->index + 1); | 363 | musb_ep_select(base, c->index + 1); |
359 | 364 | ||
360 | DBG(level, "RX DMA%d%s: %d left, csr %04x, " | 365 | dev_dbg(c->controller->musb->controller, |
361 | "%08x H%08x S%08x C%08x, " | 366 | "RX DMA%d%s: %d left, csr %04x, " |
362 | "B%08x L%08x %08x .. %08x" | 367 | "%08x H%08x S%08x C%08x, " |
363 | "\n", | 368 | "B%08x L%08x %08x .. %08x" |
369 | "\n", | ||
364 | c->index, tag, | 370 | c->index, tag, |
365 | musb_readl(c->controller->tibase, | 371 | musb_readl(c->controller->tibase, |
366 | DAVINCI_RXCPPI_BUFCNT0_REG + 4 * c->index), | 372 | DAVINCI_RXCPPI_BUFCNT0_REG + 4 * c->index), |
@@ -387,10 +393,11 @@ cppi_dump_tx(int level, struct cppi_channel *c, const char *tag) | |||
387 | 393 | ||
388 | musb_ep_select(base, c->index + 1); | 394 | musb_ep_select(base, c->index + 1); |
389 | 395 | ||
390 | DBG(level, "TX DMA%d%s: csr %04x, " | 396 | dev_dbg(c->controller->musb->controller, |
391 | "H%08x S%08x C%08x %08x, " | 397 | "TX DMA%d%s: csr %04x, " |
392 | "F%08x L%08x .. %08x" | 398 | "H%08x S%08x C%08x %08x, " |
393 | "\n", | 399 | "F%08x L%08x .. %08x" |
400 | "\n", | ||
394 | c->index, tag, | 401 | c->index, tag, |
395 | musb_readw(c->hw_ep->regs, MUSB_TXCSR), | 402 | musb_readw(c->hw_ep->regs, MUSB_TXCSR), |
396 | 403 | ||
@@ -1022,6 +1029,7 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch) | |||
1022 | int i; | 1029 | int i; |
1023 | dma_addr_t safe2ack; | 1030 | dma_addr_t safe2ack; |
1024 | void __iomem *regs = rx->hw_ep->regs; | 1031 | void __iomem *regs = rx->hw_ep->regs; |
1032 | struct musb *musb = cppi->musb; | ||
1025 | 1033 | ||
1026 | cppi_dump_rx(6, rx, "/K"); | 1034 | cppi_dump_rx(6, rx, "/K"); |
1027 | 1035 | ||
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 668eeef601a..b3c065ab9db 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -172,7 +172,8 @@ enum musb_g_ep0_state { | |||
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | /* TUSB mapping: "flat" plus ep0 special cases */ | 174 | /* TUSB mapping: "flat" plus ep0 special cases */ |
175 | #if defined(CONFIG_USB_MUSB_TUSB6010) | 175 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
176 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
176 | #define musb_ep_select(_mbase, _epnum) \ | 177 | #define musb_ep_select(_mbase, _epnum) \ |
177 | musb_writeb((_mbase), MUSB_INDEX, (_epnum)) | 178 | musb_writeb((_mbase), MUSB_INDEX, (_epnum)) |
178 | #define MUSB_EP_OFFSET MUSB_TUSB_OFFSET | 179 | #define MUSB_EP_OFFSET MUSB_TUSB_OFFSET |
@@ -241,7 +242,8 @@ struct musb_hw_ep { | |||
241 | void __iomem *fifo; | 242 | void __iomem *fifo; |
242 | void __iomem *regs; | 243 | void __iomem *regs; |
243 | 244 | ||
244 | #ifdef CONFIG_USB_MUSB_TUSB6010 | 245 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
246 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
245 | void __iomem *conf; | 247 | void __iomem *conf; |
246 | #endif | 248 | #endif |
247 | 249 | ||
@@ -258,7 +260,8 @@ struct musb_hw_ep { | |||
258 | struct dma_channel *tx_channel; | 260 | struct dma_channel *tx_channel; |
259 | struct dma_channel *rx_channel; | 261 | struct dma_channel *rx_channel; |
260 | 262 | ||
261 | #ifdef CONFIG_USB_MUSB_TUSB6010 | 263 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
264 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
262 | /* TUSB has "asynchronous" and "synchronous" dma modes */ | 265 | /* TUSB has "asynchronous" and "synchronous" dma modes */ |
263 | dma_addr_t fifo_async; | 266 | dma_addr_t fifo_async; |
264 | dma_addr_t fifo_sync; | 267 | dma_addr_t fifo_sync; |
@@ -356,7 +359,8 @@ struct musb { | |||
356 | void __iomem *ctrl_base; | 359 | void __iomem *ctrl_base; |
357 | void __iomem *mregs; | 360 | void __iomem *mregs; |
358 | 361 | ||
359 | #ifdef CONFIG_USB_MUSB_TUSB6010 | 362 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
363 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
360 | dma_addr_t async; | 364 | dma_addr_t async; |
361 | dma_addr_t sync; | 365 | dma_addr_t sync; |
362 | void __iomem *sync_va; | 366 | void __iomem *sync_va; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 8c41a2e6ea7..e81820370d6 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1856,6 +1856,7 @@ int __init musb_gadget_setup(struct musb *musb) | |||
1856 | 1856 | ||
1857 | return 0; | 1857 | return 0; |
1858 | err: | 1858 | err: |
1859 | musb->g.dev.parent = NULL; | ||
1859 | device_unregister(&musb->g.dev); | 1860 | device_unregister(&musb->g.dev); |
1860 | return status; | 1861 | return status; |
1861 | } | 1862 | } |
@@ -1863,7 +1864,8 @@ err: | |||
1863 | void musb_gadget_cleanup(struct musb *musb) | 1864 | void musb_gadget_cleanup(struct musb *musb) |
1864 | { | 1865 | { |
1865 | usb_del_gadget_udc(&musb->g); | 1866 | usb_del_gadget_udc(&musb->g); |
1866 | device_unregister(&musb->g.dev); | 1867 | if (musb->g.dev.parent) |
1868 | device_unregister(&musb->g.dev); | ||
1867 | } | 1869 | } |
1868 | 1870 | ||
1869 | /* | 1871 | /* |
diff --git a/drivers/usb/musb/musb_regs.h b/drivers/usb/musb/musb_regs.h index 82410703dcd..03f2655af29 100644 --- a/drivers/usb/musb/musb_regs.h +++ b/drivers/usb/musb/musb_regs.h | |||
@@ -234,7 +234,8 @@ | |||
234 | #define MUSB_TESTMODE 0x0F /* 8 bit */ | 234 | #define MUSB_TESTMODE 0x0F /* 8 bit */ |
235 | 235 | ||
236 | /* Get offset for a given FIFO from musb->mregs */ | 236 | /* Get offset for a given FIFO from musb->mregs */ |
237 | #ifdef CONFIG_USB_MUSB_TUSB6010 | 237 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
238 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
238 | #define MUSB_FIFO_OFFSET(epnum) (0x200 + ((epnum) * 0x20)) | 239 | #define MUSB_FIFO_OFFSET(epnum) (0x200 + ((epnum) * 0x20)) |
239 | #else | 240 | #else |
240 | #define MUSB_FIFO_OFFSET(epnum) (0x20 + ((epnum) * 4)) | 241 | #define MUSB_FIFO_OFFSET(epnum) (0x20 + ((epnum) * 4)) |
@@ -295,7 +296,8 @@ | |||
295 | #define MUSB_FLAT_OFFSET(_epnum, _offset) \ | 296 | #define MUSB_FLAT_OFFSET(_epnum, _offset) \ |
296 | (0x100 + (0x10*(_epnum)) + (_offset)) | 297 | (0x100 + (0x10*(_epnum)) + (_offset)) |
297 | 298 | ||
298 | #ifdef CONFIG_USB_MUSB_TUSB6010 | 299 | #if defined(CONFIG_USB_MUSB_TUSB6010) || \ |
300 | defined(CONFIG_USB_MUSB_TUSB6010_MODULE) | ||
299 | /* TUSB6010 EP0 configuration register is special */ | 301 | /* TUSB6010 EP0 configuration register is special */ |
300 | #define MUSB_TUSB_OFFSET(_epnum, _offset) \ | 302 | #define MUSB_TUSB_OFFSET(_epnum, _offset) \ |
301 | (0x10 + _offset) | 303 | (0x10 + _offset) |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 9eec41fbf3a..ec1480191f7 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/prefetch.h> | ||
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
22 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
23 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 07c8a73dfe4..b67b4bc596c 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <plat/mux.h> | 20 | #include <plat/mux.h> |
21 | 21 | ||
22 | #include "musb_core.h" | 22 | #include "musb_core.h" |
23 | #include "tusb6010.h" | ||
23 | 24 | ||
24 | #define to_chdat(c) ((struct tusb_omap_dma_ch *)(c)->private_data) | 25 | #define to_chdat(c) ((struct tusb_omap_dma_ch *)(c)->private_data) |
25 | 26 | ||
diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c index cecace41183..ef4333f4bbe 100644 --- a/drivers/usb/musb/ux500_dma.c +++ b/drivers/usb/musb/ux500_dma.c | |||
@@ -65,7 +65,8 @@ static void ux500_tx_work(struct work_struct *data) | |||
65 | struct musb *musb = hw_ep->musb; | 65 | struct musb *musb = hw_ep->musb; |
66 | unsigned long flags; | 66 | unsigned long flags; |
67 | 67 | ||
68 | DBG(4, "DMA tx transfer done on hw_ep=%d\n", hw_ep->epnum); | 68 | dev_dbg(musb->controller, "DMA tx transfer done on hw_ep=%d\n", |
69 | hw_ep->epnum); | ||
69 | 70 | ||
70 | spin_lock_irqsave(&musb->lock, flags); | 71 | spin_lock_irqsave(&musb->lock, flags); |
71 | ux500_channel->channel.actual_len = ux500_channel->cur_len; | 72 | ux500_channel->channel.actual_len = ux500_channel->cur_len; |
@@ -84,7 +85,8 @@ static void ux500_rx_work(struct work_struct *data) | |||
84 | struct musb *musb = hw_ep->musb; | 85 | struct musb *musb = hw_ep->musb; |
85 | unsigned long flags; | 86 | unsigned long flags; |
86 | 87 | ||
87 | DBG(4, "DMA rx transfer done on hw_ep=%d\n", hw_ep->epnum); | 88 | dev_dbg(musb->controller, "DMA rx transfer done on hw_ep=%d\n", |
89 | hw_ep->epnum); | ||
88 | 90 | ||
89 | spin_lock_irqsave(&musb->lock, flags); | 91 | spin_lock_irqsave(&musb->lock, flags); |
90 | ux500_channel->channel.actual_len = ux500_channel->cur_len; | 92 | ux500_channel->channel.actual_len = ux500_channel->cur_len; |
@@ -116,9 +118,11 @@ static bool ux500_configure_channel(struct dma_channel *channel, | |||
116 | enum dma_slave_buswidth addr_width; | 118 | enum dma_slave_buswidth addr_width; |
117 | dma_addr_t usb_fifo_addr = (MUSB_FIFO_OFFSET(hw_ep->epnum) + | 119 | dma_addr_t usb_fifo_addr = (MUSB_FIFO_OFFSET(hw_ep->epnum) + |
118 | ux500_channel->controller->phy_base); | 120 | ux500_channel->controller->phy_base); |
121 | struct musb *musb = ux500_channel->controller->private_data; | ||
119 | 122 | ||
120 | DBG(4, "packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d\n", | 123 | dev_dbg(musb->controller, |
121 | packet_sz, mode, dma_addr, len, ux500_channel->is_tx); | 124 | "packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d\n", |
125 | packet_sz, mode, dma_addr, len, ux500_channel->is_tx); | ||
122 | 126 | ||
123 | ux500_channel->cur_len = len; | 127 | ux500_channel->cur_len = len; |
124 | 128 | ||
@@ -133,15 +137,13 @@ static bool ux500_configure_channel(struct dma_channel *channel, | |||
133 | DMA_SLAVE_BUSWIDTH_4_BYTES; | 137 | DMA_SLAVE_BUSWIDTH_4_BYTES; |
134 | 138 | ||
135 | slave_conf.direction = direction; | 139 | slave_conf.direction = direction; |
136 | if (direction == DMA_FROM_DEVICE) { | 140 | slave_conf.src_addr = usb_fifo_addr; |
137 | slave_conf.src_addr = usb_fifo_addr; | 141 | slave_conf.src_addr_width = addr_width; |
138 | slave_conf.src_addr_width = addr_width; | 142 | slave_conf.src_maxburst = 16; |
139 | slave_conf.src_maxburst = 16; | 143 | slave_conf.dst_addr = usb_fifo_addr; |
140 | } else { | 144 | slave_conf.dst_addr_width = addr_width; |
141 | slave_conf.dst_addr = usb_fifo_addr; | 145 | slave_conf.dst_maxburst = 16; |
142 | slave_conf.dst_addr_width = addr_width; | 146 | |
143 | slave_conf.dst_maxburst = 16; | ||
144 | } | ||
145 | dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG, | 147 | dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG, |
146 | (unsigned long) &slave_conf); | 148 | (unsigned long) &slave_conf); |
147 | 149 | ||
@@ -166,6 +168,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, | |||
166 | struct ux500_dma_controller *controller = container_of(c, | 168 | struct ux500_dma_controller *controller = container_of(c, |
167 | struct ux500_dma_controller, controller); | 169 | struct ux500_dma_controller, controller); |
168 | struct ux500_dma_channel *ux500_channel = NULL; | 170 | struct ux500_dma_channel *ux500_channel = NULL; |
171 | struct musb *musb = controller->private_data; | ||
169 | u8 ch_num = hw_ep->epnum - 1; | 172 | u8 ch_num = hw_ep->epnum - 1; |
170 | u32 max_ch; | 173 | u32 max_ch; |
171 | 174 | ||
@@ -192,7 +195,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, | |||
192 | ux500_channel->hw_ep = hw_ep; | 195 | ux500_channel->hw_ep = hw_ep; |
193 | ux500_channel->is_allocated = 1; | 196 | ux500_channel->is_allocated = 1; |
194 | 197 | ||
195 | DBG(7, "hw_ep=%d, is_tx=0x%x, channel=%d\n", | 198 | dev_dbg(musb->controller, "hw_ep=%d, is_tx=0x%x, channel=%d\n", |
196 | hw_ep->epnum, is_tx, ch_num); | 199 | hw_ep->epnum, is_tx, ch_num); |
197 | 200 | ||
198 | return &(ux500_channel->channel); | 201 | return &(ux500_channel->channel); |
@@ -201,8 +204,9 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, | |||
201 | static void ux500_dma_channel_release(struct dma_channel *channel) | 204 | static void ux500_dma_channel_release(struct dma_channel *channel) |
202 | { | 205 | { |
203 | struct ux500_dma_channel *ux500_channel = channel->private_data; | 206 | struct ux500_dma_channel *ux500_channel = channel->private_data; |
207 | struct musb *musb = ux500_channel->controller->private_data; | ||
204 | 208 | ||
205 | DBG(7, "channel=%d\n", ux500_channel->ch_num); | 209 | dev_dbg(musb->controller, "channel=%d\n", ux500_channel->ch_num); |
206 | 210 | ||
207 | if (ux500_channel->is_allocated) { | 211 | if (ux500_channel->is_allocated) { |
208 | ux500_channel->is_allocated = 0; | 212 | ux500_channel->is_allocated = 0; |
@@ -252,8 +256,8 @@ static int ux500_dma_channel_abort(struct dma_channel *channel) | |||
252 | void __iomem *epio = musb->endpoints[ux500_channel->hw_ep->epnum].regs; | 256 | void __iomem *epio = musb->endpoints[ux500_channel->hw_ep->epnum].regs; |
253 | u16 csr; | 257 | u16 csr; |
254 | 258 | ||
255 | DBG(4, "channel=%d, is_tx=%d\n", ux500_channel->ch_num, | 259 | dev_dbg(musb->controller, "channel=%d, is_tx=%d\n", |
256 | ux500_channel->is_tx); | 260 | ux500_channel->ch_num, ux500_channel->is_tx); |
257 | 261 | ||
258 | if (channel->status == MUSB_DMA_STATUS_BUSY) { | 262 | if (channel->status == MUSB_DMA_STATUS_BUSY) { |
259 | if (ux500_channel->is_tx) { | 263 | if (ux500_channel->is_tx) { |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 78a2cf9551c..5fc13e71791 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -101,6 +101,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial); | |||
101 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); | 101 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); |
102 | static int ftdi_NDI_device_setup(struct usb_serial *serial); | 102 | static int ftdi_NDI_device_setup(struct usb_serial *serial); |
103 | static int ftdi_stmclite_probe(struct usb_serial *serial); | 103 | static int ftdi_stmclite_probe(struct usb_serial *serial); |
104 | static int ftdi_8u2232c_probe(struct usb_serial *serial); | ||
104 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); | 105 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); |
105 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); | 106 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); |
106 | 107 | ||
@@ -128,6 +129,10 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = { | |||
128 | .probe = ftdi_stmclite_probe, | 129 | .probe = ftdi_stmclite_probe, |
129 | }; | 130 | }; |
130 | 131 | ||
132 | static struct ftdi_sio_quirk ftdi_8u2232c_quirk = { | ||
133 | .probe = ftdi_8u2232c_probe, | ||
134 | }; | ||
135 | |||
131 | /* | 136 | /* |
132 | * The 8U232AM has the same API as the sio except for: | 137 | * The 8U232AM has the same API as the sio except for: |
133 | * - it can support MUCH higher baudrates; up to: | 138 | * - it can support MUCH higher baudrates; up to: |
@@ -178,7 +183,8 @@ static struct usb_device_id id_table_combined [] = { | |||
178 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, | 183 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, |
179 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, | 184 | { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, |
180 | { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, | 185 | { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, |
181 | { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, | 186 | { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) , |
187 | .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk }, | ||
182 | { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, | 188 | { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, |
183 | { USB_DEVICE(FTDI_VID, FTDI_232H_PID) }, | 189 | { USB_DEVICE(FTDI_VID, FTDI_232H_PID) }, |
184 | { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, | 190 | { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, |
@@ -1737,6 +1743,18 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
1737 | return 0; | 1743 | return 0; |
1738 | } | 1744 | } |
1739 | 1745 | ||
1746 | static int ftdi_8u2232c_probe(struct usb_serial *serial) | ||
1747 | { | ||
1748 | struct usb_device *udev = serial->dev; | ||
1749 | |||
1750 | dbg("%s", __func__); | ||
1751 | |||
1752 | if (strcmp(udev->manufacturer, "CALAO Systems") == 0) | ||
1753 | return ftdi_jtag_probe(serial); | ||
1754 | |||
1755 | return 0; | ||
1756 | } | ||
1757 | |||
1740 | /* | 1758 | /* |
1741 | * First and second port on STMCLiteadaptors is reserved for JTAG interface | 1759 | * First and second port on STMCLiteadaptors is reserved for JTAG interface |
1742 | * and the forth port for pio | 1760 | * and the forth port for pio |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 81565619891..fe22e90bc87 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -148,6 +148,8 @@ static void option_instat_callback(struct urb *urb); | |||
148 | #define HUAWEI_PRODUCT_K4505 0x1464 | 148 | #define HUAWEI_PRODUCT_K4505 0x1464 |
149 | #define HUAWEI_PRODUCT_K3765 0x1465 | 149 | #define HUAWEI_PRODUCT_K3765 0x1465 |
150 | #define HUAWEI_PRODUCT_E14AC 0x14AC | 150 | #define HUAWEI_PRODUCT_E14AC 0x14AC |
151 | #define HUAWEI_PRODUCT_K3806 0x14AE | ||
152 | #define HUAWEI_PRODUCT_K4605 0x14C6 | ||
151 | #define HUAWEI_PRODUCT_K3770 0x14C9 | 153 | #define HUAWEI_PRODUCT_K3770 0x14C9 |
152 | #define HUAWEI_PRODUCT_K3771 0x14CA | 154 | #define HUAWEI_PRODUCT_K3771 0x14CA |
153 | #define HUAWEI_PRODUCT_K4510 0x14CB | 155 | #define HUAWEI_PRODUCT_K4510 0x14CB |
@@ -416,6 +418,56 @@ static void option_instat_callback(struct urb *urb); | |||
416 | #define SAMSUNG_VENDOR_ID 0x04e8 | 418 | #define SAMSUNG_VENDOR_ID 0x04e8 |
417 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 | 419 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 |
418 | 420 | ||
421 | /* YUGA products www.yuga-info.com*/ | ||
422 | #define YUGA_VENDOR_ID 0x257A | ||
423 | #define YUGA_PRODUCT_CEM600 0x1601 | ||
424 | #define YUGA_PRODUCT_CEM610 0x1602 | ||
425 | #define YUGA_PRODUCT_CEM500 0x1603 | ||
426 | #define YUGA_PRODUCT_CEM510 0x1604 | ||
427 | #define YUGA_PRODUCT_CEM800 0x1605 | ||
428 | #define YUGA_PRODUCT_CEM900 0x1606 | ||
429 | |||
430 | #define YUGA_PRODUCT_CEU818 0x1607 | ||
431 | #define YUGA_PRODUCT_CEU816 0x1608 | ||
432 | #define YUGA_PRODUCT_CEU828 0x1609 | ||
433 | #define YUGA_PRODUCT_CEU826 0x160A | ||
434 | #define YUGA_PRODUCT_CEU518 0x160B | ||
435 | #define YUGA_PRODUCT_CEU516 0x160C | ||
436 | #define YUGA_PRODUCT_CEU528 0x160D | ||
437 | #define YUGA_PRODUCT_CEU526 0x160F | ||
438 | |||
439 | #define YUGA_PRODUCT_CWM600 0x2601 | ||
440 | #define YUGA_PRODUCT_CWM610 0x2602 | ||
441 | #define YUGA_PRODUCT_CWM500 0x2603 | ||
442 | #define YUGA_PRODUCT_CWM510 0x2604 | ||
443 | #define YUGA_PRODUCT_CWM800 0x2605 | ||
444 | #define YUGA_PRODUCT_CWM900 0x2606 | ||
445 | |||
446 | #define YUGA_PRODUCT_CWU718 0x2607 | ||
447 | #define YUGA_PRODUCT_CWU716 0x2608 | ||
448 | #define YUGA_PRODUCT_CWU728 0x2609 | ||
449 | #define YUGA_PRODUCT_CWU726 0x260A | ||
450 | #define YUGA_PRODUCT_CWU518 0x260B | ||
451 | #define YUGA_PRODUCT_CWU516 0x260C | ||
452 | #define YUGA_PRODUCT_CWU528 0x260D | ||
453 | #define YUGA_PRODUCT_CWU526 0x260F | ||
454 | |||
455 | #define YUGA_PRODUCT_CLM600 0x2601 | ||
456 | #define YUGA_PRODUCT_CLM610 0x2602 | ||
457 | #define YUGA_PRODUCT_CLM500 0x2603 | ||
458 | #define YUGA_PRODUCT_CLM510 0x2604 | ||
459 | #define YUGA_PRODUCT_CLM800 0x2605 | ||
460 | #define YUGA_PRODUCT_CLM900 0x2606 | ||
461 | |||
462 | #define YUGA_PRODUCT_CLU718 0x2607 | ||
463 | #define YUGA_PRODUCT_CLU716 0x2608 | ||
464 | #define YUGA_PRODUCT_CLU728 0x2609 | ||
465 | #define YUGA_PRODUCT_CLU726 0x260A | ||
466 | #define YUGA_PRODUCT_CLU518 0x260B | ||
467 | #define YUGA_PRODUCT_CLU516 0x260C | ||
468 | #define YUGA_PRODUCT_CLU528 0x260D | ||
469 | #define YUGA_PRODUCT_CLU526 0x260F | ||
470 | |||
419 | /* some devices interfaces need special handling due to a number of reasons */ | 471 | /* some devices interfaces need special handling due to a number of reasons */ |
420 | enum option_blacklist_reason { | 472 | enum option_blacklist_reason { |
421 | OPTION_BLACKLIST_NONE = 0, | 473 | OPTION_BLACKLIST_NONE = 0, |
@@ -551,6 +603,8 @@ static const struct usb_device_id option_ids[] = { | |||
551 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, | 603 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) }, |
552 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, | 604 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) }, |
553 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, | 605 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) }, |
606 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, | ||
607 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff) }, | ||
554 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, | 608 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, |
555 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, | 609 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, |
556 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, | 610 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, |
@@ -1005,6 +1059,48 @@ static const struct usb_device_id option_ids[] = { | |||
1005 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ | 1059 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
1006 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ | 1060 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ |
1007 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ | 1061 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ |
1062 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, | ||
1063 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) }, | ||
1064 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM500) }, | ||
1065 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM510) }, | ||
1066 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM800) }, | ||
1067 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM900) }, | ||
1068 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU818) }, | ||
1069 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU816) }, | ||
1070 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU828) }, | ||
1071 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU826) }, | ||
1072 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU518) }, | ||
1073 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU516) }, | ||
1074 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU528) }, | ||
1075 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU526) }, | ||
1076 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM600) }, | ||
1077 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM610) }, | ||
1078 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM500) }, | ||
1079 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM510) }, | ||
1080 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM800) }, | ||
1081 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM900) }, | ||
1082 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU718) }, | ||
1083 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU716) }, | ||
1084 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU728) }, | ||
1085 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU726) }, | ||
1086 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU518) }, | ||
1087 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU516) }, | ||
1088 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU528) }, | ||
1089 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU526) }, | ||
1090 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM600) }, | ||
1091 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM610) }, | ||
1092 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM500) }, | ||
1093 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM510) }, | ||
1094 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM800) }, | ||
1095 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM900) }, | ||
1096 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU718) }, | ||
1097 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU716) }, | ||
1098 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU728) }, | ||
1099 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU726) }, | ||
1100 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU518) }, | ||
1101 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) }, | ||
1102 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) }, | ||
1103 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) }, | ||
1008 | { } /* Terminating entry */ | 1104 | { } /* Terminating entry */ |
1009 | }; | 1105 | }; |
1010 | MODULE_DEVICE_TABLE(usb, option_ids); | 1106 | MODULE_DEVICE_TABLE(usb, option_ids); |
@@ -1134,11 +1230,13 @@ static int option_probe(struct usb_serial *serial, | |||
1134 | serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) | 1230 | serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) |
1135 | return -ENODEV; | 1231 | return -ENODEV; |
1136 | 1232 | ||
1137 | /* Don't bind network interfaces on Huawei K3765 & K4505 */ | 1233 | /* Don't bind network interfaces on Huawei K3765, K4505 & K4605 */ |
1138 | if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID && | 1234 | if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID && |
1139 | (serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 || | 1235 | (serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 || |
1140 | serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505) && | 1236 | serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505 || |
1141 | serial->interface->cur_altsetting->desc.bInterfaceNumber == 1) | 1237 | serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4605) && |
1238 | (serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 || | ||
1239 | serial->interface->cur_altsetting->desc.bInterfaceNumber == 2)) | ||
1142 | return -ENODEV; | 1240 | return -ENODEV; |
1143 | 1241 | ||
1144 | /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */ | 1242 | /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */ |
diff --git a/fs/compat.c b/fs/compat.c index 0b48d018e38..58b1da45989 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1675,11 +1675,6 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | |||
1675 | } | 1675 | } |
1676 | #endif /* HAVE_SET_RESTORE_SIGMASK */ | 1676 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |
1677 | 1677 | ||
1678 | long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2) | ||
1679 | { | ||
1680 | return sys_ni_syscall(); | ||
1681 | } | ||
1682 | |||
1683 | #ifdef CONFIG_EPOLL | 1678 | #ifdef CONFIG_EPOLL |
1684 | 1679 | ||
1685 | #ifdef HAVE_SET_RESTORE_SIGMASK | 1680 | #ifdef HAVE_SET_RESTORE_SIGMASK |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 4f76959397f..f4c38d8c667 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -143,7 +143,7 @@ __SYSCALL(__NR_pivot_root, sys_pivot_root) | |||
143 | 143 | ||
144 | /* fs/nfsctl.c */ | 144 | /* fs/nfsctl.c */ |
145 | #define __NR_nfsservctl 42 | 145 | #define __NR_nfsservctl 42 |
146 | __SC_COMP(__NR_nfsservctl, sys_nfsservctl, compat_sys_nfsservctl) | 146 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) |
147 | 147 | ||
148 | /* fs/open.c */ | 148 | /* fs/open.c */ |
149 | #define __NR3264_statfs 43 | 149 | #define __NR3264_statfs 43 |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 8779405e15a..c6e7523bf76 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -438,7 +438,6 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | |||
438 | struct compat_timespec __user *tsp, | 438 | struct compat_timespec __user *tsp, |
439 | const compat_sigset_t __user *sigmask, | 439 | const compat_sigset_t __user *sigmask, |
440 | compat_size_t sigsetsize); | 440 | compat_size_t sigsetsize); |
441 | asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); | ||
442 | asmlinkage long compat_sys_signalfd4(int ufd, | 441 | asmlinkage long compat_sys_signalfd4(int ufd, |
443 | const compat_sigset_t __user *sigmask, | 442 | const compat_sigset_t __user *sigmask, |
444 | compat_size_t sigsetsize, int flags); | 443 | compat_size_t sigsetsize, int flags); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8c03b98df5f..1ff0ec2a5e8 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -702,9 +702,6 @@ asmlinkage long sys_sysctl(struct __sysctl_args __user *args); | |||
702 | asmlinkage long sys_sysinfo(struct sysinfo __user *info); | 702 | asmlinkage long sys_sysinfo(struct sysinfo __user *info); |
703 | asmlinkage long sys_sysfs(int option, | 703 | asmlinkage long sys_sysfs(int option, |
704 | unsigned long arg1, unsigned long arg2); | 704 | unsigned long arg1, unsigned long arg2); |
705 | asmlinkage long sys_nfsservctl(int cmd, | ||
706 | struct nfsctl_arg __user *arg, | ||
707 | void __user *res); | ||
708 | asmlinkage long sys_syslog(int type, char __user *buf, int len); | 705 | asmlinkage long sys_syslog(int type, char __user *buf, int len); |
709 | asmlinkage long sys_uselib(const char __user *library); | 706 | asmlinkage long sys_uselib(const char __user *library); |
710 | asmlinkage long sys_ni_syscall(void); | 707 | asmlinkage long sys_ni_syscall(void); |
diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h index b004e557caa..2ef4385da6b 100644 --- a/include/linux/ti_wilink_st.h +++ b/include/linux/ti_wilink_st.h | |||
@@ -410,7 +410,28 @@ struct gps_event_hdr { | |||
410 | u16 plen; | 410 | u16 plen; |
411 | } __attribute__ ((packed)); | 411 | } __attribute__ ((packed)); |
412 | 412 | ||
413 | /* platform data */ | 413 | /** |
414 | * struct ti_st_plat_data - platform data shared between ST driver and | ||
415 | * platform specific board file which adds the ST device. | ||
416 | * @nshutdown_gpio: Host's GPIO line to which chip's BT_EN is connected. | ||
417 | * @dev_name: The UART/TTY name to which chip is interfaced. (eg: /dev/ttyS1) | ||
418 | * @flow_cntrl: Should always be 1, since UART's CTS/RTS is used for PM | ||
419 | * purposes. | ||
420 | * @baud_rate: The baud rate supported by the Host UART controller, this will | ||
421 | * be shared across with the chip via a HCI VS command from User-Space Init | ||
422 | * Mgr application. | ||
423 | * @suspend: | ||
424 | * @resume: legacy PM routines hooked to platform specific board file, so as | ||
425 | * to take chip-host interface specific action. | ||
426 | * @chip_enable: | ||
427 | * @chip_disable: Platform/Interface specific mux mode setting, GPIO | ||
428 | * configuring, Host side PM disabling etc.. can be done here. | ||
429 | * @chip_asleep: | ||
430 | * @chip_awake: Chip specific deep sleep states is communicated to Host | ||
431 | * specific board-xx.c to take actions such as cut UART clocks when chip | ||
432 | * asleep or run host faster when chip awake etc.. | ||
433 | * | ||
434 | */ | ||
414 | struct ti_st_plat_data { | 435 | struct ti_st_plat_data { |
415 | long nshutdown_gpio; | 436 | long nshutdown_gpio; |
416 | unsigned char dev_name[UART_DEV_NAME_LEN]; /* uart name */ | 437 | unsigned char dev_name[UART_DEV_NAME_LEN]; /* uart name */ |
@@ -418,6 +439,10 @@ struct ti_st_plat_data { | |||
418 | unsigned long baud_rate; | 439 | unsigned long baud_rate; |
419 | int (*suspend)(struct platform_device *, pm_message_t); | 440 | int (*suspend)(struct platform_device *, pm_message_t); |
420 | int (*resume)(struct platform_device *); | 441 | int (*resume)(struct platform_device *); |
442 | int (*chip_enable) (struct kim_data_s *); | ||
443 | int (*chip_disable) (struct kim_data_s *); | ||
444 | int (*chip_asleep) (struct kim_data_s *); | ||
445 | int (*chip_awake) (struct kim_data_s *); | ||
421 | }; | 446 | }; |
422 | 447 | ||
423 | #endif /* TI_WILINK_ST_H */ | 448 | #endif /* TI_WILINK_ST_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 44bc0c5617e..5f2ede82b3d 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -421,6 +421,8 @@ extern void tty_driver_flush_buffer(struct tty_struct *tty); | |||
421 | extern void tty_throttle(struct tty_struct *tty); | 421 | extern void tty_throttle(struct tty_struct *tty); |
422 | extern void tty_unthrottle(struct tty_struct *tty); | 422 | extern void tty_unthrottle(struct tty_struct *tty); |
423 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); | 423 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); |
424 | extern void tty_driver_remove_tty(struct tty_driver *driver, | ||
425 | struct tty_struct *tty); | ||
424 | extern void tty_shutdown(struct tty_struct *tty); | 426 | extern void tty_shutdown(struct tty_struct *tty); |
425 | extern void tty_free_termios(struct tty_struct *tty); | 427 | extern void tty_free_termios(struct tty_struct *tty); |
426 | extern int is_current_pgrp_orphaned(void); | 428 | extern int is_current_pgrp_orphaned(void); |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 9deeac85524..ecdaeb98b29 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -47,6 +47,9 @@ | |||
47 | * | 47 | * |
48 | * This routine is called synchronously when a particular tty device | 48 | * This routine is called synchronously when a particular tty device |
49 | * is closed for the last time freeing up the resources. | 49 | * is closed for the last time freeing up the resources. |
50 | * Note that tty_shutdown() is not called if ops->shutdown is defined. | ||
51 | * This means one is responsible to take care of calling ops->remove (e.g. | ||
52 | * via tty_driver_remove_tty) and releasing tty->termios. | ||
50 | * | 53 | * |
51 | * | 54 | * |
52 | * void (*cleanup)(struct tty_struct * tty); | 55 | * void (*cleanup)(struct tty_struct * tty); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d17f47fc9e3..408ae4882d2 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1865,6 +1865,9 @@ struct wiphy { | |||
1865 | * you need use set_wiphy_dev() (see below) */ | 1865 | * you need use set_wiphy_dev() (see below) */ |
1866 | struct device dev; | 1866 | struct device dev; |
1867 | 1867 | ||
1868 | /* protects ->resume, ->suspend sysfs callbacks against unregister hw */ | ||
1869 | bool registered; | ||
1870 | |||
1868 | /* dir in debugfs: ieee80211/<wiphyname> */ | 1871 | /* dir in debugfs: ieee80211/<wiphyname> */ |
1869 | struct dentry *debugfsdir; | 1872 | struct dentry *debugfsdir; |
1870 | 1873 | ||
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 62cbc8877fe..a9a5de07c4f 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c | |||
@@ -16,7 +16,6 @@ asmlinkage long sys_ni_syscall(void) | |||
16 | return -ENOSYS; | 16 | return -ENOSYS; |
17 | } | 17 | } |
18 | 18 | ||
19 | cond_syscall(sys_nfsservctl); | ||
20 | cond_syscall(sys_quotactl); | 19 | cond_syscall(sys_quotactl); |
21 | cond_syscall(sys32_quotactl); | 20 | cond_syscall(sys32_quotactl); |
22 | cond_syscall(sys_acct); | 21 | cond_syscall(sys_acct); |
diff --git a/lib/Makefile b/lib/Makefile index d5d175c8a6c..3f5bc6d903e 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -12,7 +12,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ | |||
12 | idr.o int_sqrt.o extable.o prio_tree.o \ | 12 | idr.o int_sqrt.o extable.o prio_tree.o \ |
13 | sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \ | 13 | sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \ |
14 | proportions.o prio_heap.o ratelimit.o show_mem.o \ | 14 | proportions.o prio_heap.o ratelimit.o show_mem.o \ |
15 | is_single_threaded.o plist.o decompress.o find_next_bit.o | 15 | is_single_threaded.o plist.o decompress.o |
16 | 16 | ||
17 | lib-$(CONFIG_MMU) += ioremap.o | 17 | lib-$(CONFIG_MMU) += ioremap.o |
18 | lib-$(CONFIG_SMP) += cpumask.o | 18 | lib-$(CONFIG_SMP) += cpumask.o |
@@ -22,7 +22,7 @@ lib-y += kobject.o kref.o klist.o | |||
22 | obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ | 22 | obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ |
23 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ | 23 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ |
24 | string_helpers.o gcd.o lcm.o list_sort.o uuid.o flex_array.o \ | 24 | string_helpers.o gcd.o lcm.o list_sort.o uuid.o flex_array.o \ |
25 | bsearch.o find_last_bit.o | 25 | bsearch.o find_last_bit.o find_next_bit.o |
26 | obj-y += kstrtox.o | 26 | obj-y += kstrtox.o |
27 | obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o | 27 | obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o |
28 | 28 | ||
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 8add9b49991..117e0d16178 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -494,9 +494,8 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) | |||
494 | BT_DBG("sk %p", sk); | 494 | BT_DBG("sk %p", sk); |
495 | 495 | ||
496 | add_wait_queue(sk_sleep(sk), &wait); | 496 | add_wait_queue(sk_sleep(sk), &wait); |
497 | set_current_state(TASK_INTERRUPTIBLE); | ||
497 | while (sk->sk_state != state) { | 498 | while (sk->sk_state != state) { |
498 | set_current_state(TASK_INTERRUPTIBLE); | ||
499 | |||
500 | if (!timeo) { | 499 | if (!timeo) { |
501 | err = -EINPROGRESS; | 500 | err = -EINPROGRESS; |
502 | break; | 501 | break; |
@@ -510,12 +509,13 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo) | |||
510 | release_sock(sk); | 509 | release_sock(sk); |
511 | timeo = schedule_timeout(timeo); | 510 | timeo = schedule_timeout(timeo); |
512 | lock_sock(sk); | 511 | lock_sock(sk); |
512 | set_current_state(TASK_INTERRUPTIBLE); | ||
513 | 513 | ||
514 | err = sock_error(sk); | 514 | err = sock_error(sk); |
515 | if (err) | 515 | if (err) |
516 | break; | 516 | break; |
517 | } | 517 | } |
518 | set_current_state(TASK_RUNNING); | 518 | __set_current_state(TASK_RUNNING); |
519 | remove_wait_queue(sk_sleep(sk), &wait); | 519 | remove_wait_queue(sk_sleep(sk), &wait); |
520 | return err; | 520 | return err; |
521 | } | 521 | } |
diff --git a/net/bluetooth/bnep/bnep.h b/net/bluetooth/bnep/bnep.h index 8e6c06158f8..e7ee5314f39 100644 --- a/net/bluetooth/bnep/bnep.h +++ b/net/bluetooth/bnep/bnep.h | |||
@@ -155,6 +155,7 @@ struct bnep_session { | |||
155 | unsigned int role; | 155 | unsigned int role; |
156 | unsigned long state; | 156 | unsigned long state; |
157 | unsigned long flags; | 157 | unsigned long flags; |
158 | atomic_t terminate; | ||
158 | struct task_struct *task; | 159 | struct task_struct *task; |
159 | 160 | ||
160 | struct ethhdr eh; | 161 | struct ethhdr eh; |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index ca39fcf010c..d9edfe8bf9d 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -484,9 +484,11 @@ static int bnep_session(void *arg) | |||
484 | 484 | ||
485 | init_waitqueue_entry(&wait, current); | 485 | init_waitqueue_entry(&wait, current); |
486 | add_wait_queue(sk_sleep(sk), &wait); | 486 | add_wait_queue(sk_sleep(sk), &wait); |
487 | while (!kthread_should_stop()) { | 487 | while (1) { |
488 | set_current_state(TASK_INTERRUPTIBLE); | 488 | set_current_state(TASK_INTERRUPTIBLE); |
489 | 489 | ||
490 | if (atomic_read(&s->terminate)) | ||
491 | break; | ||
490 | /* RX */ | 492 | /* RX */ |
491 | while ((skb = skb_dequeue(&sk->sk_receive_queue))) { | 493 | while ((skb = skb_dequeue(&sk->sk_receive_queue))) { |
492 | skb_orphan(skb); | 494 | skb_orphan(skb); |
@@ -504,7 +506,7 @@ static int bnep_session(void *arg) | |||
504 | 506 | ||
505 | schedule(); | 507 | schedule(); |
506 | } | 508 | } |
507 | set_current_state(TASK_RUNNING); | 509 | __set_current_state(TASK_RUNNING); |
508 | remove_wait_queue(sk_sleep(sk), &wait); | 510 | remove_wait_queue(sk_sleep(sk), &wait); |
509 | 511 | ||
510 | /* Cleanup session */ | 512 | /* Cleanup session */ |
@@ -640,9 +642,10 @@ int bnep_del_connection(struct bnep_conndel_req *req) | |||
640 | down_read(&bnep_session_sem); | 642 | down_read(&bnep_session_sem); |
641 | 643 | ||
642 | s = __bnep_get_session(req->dst); | 644 | s = __bnep_get_session(req->dst); |
643 | if (s) | 645 | if (s) { |
644 | kthread_stop(s->task); | 646 | atomic_inc(&s->terminate); |
645 | else | 647 | wake_up_process(s->task); |
648 | } else | ||
646 | err = -ENOENT; | 649 | err = -ENOENT; |
647 | 650 | ||
648 | up_read(&bnep_session_sem); | 651 | up_read(&bnep_session_sem); |
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index 040f67b1297..50f0d135eb8 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c | |||
@@ -386,7 +386,8 @@ static void cmtp_reset_ctr(struct capi_ctr *ctrl) | |||
386 | 386 | ||
387 | capi_ctr_down(ctrl); | 387 | capi_ctr_down(ctrl); |
388 | 388 | ||
389 | kthread_stop(session->task); | 389 | atomic_inc(&session->terminate); |
390 | wake_up_process(session->task); | ||
390 | } | 391 | } |
391 | 392 | ||
392 | static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_params *rp) | 393 | static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_params *rp) |
diff --git a/net/bluetooth/cmtp/cmtp.h b/net/bluetooth/cmtp/cmtp.h index db43b54ac9a..c32638dddbf 100644 --- a/net/bluetooth/cmtp/cmtp.h +++ b/net/bluetooth/cmtp/cmtp.h | |||
@@ -81,6 +81,7 @@ struct cmtp_session { | |||
81 | 81 | ||
82 | char name[BTNAMSIZ]; | 82 | char name[BTNAMSIZ]; |
83 | 83 | ||
84 | atomic_t terminate; | ||
84 | struct task_struct *task; | 85 | struct task_struct *task; |
85 | 86 | ||
86 | wait_queue_head_t wait; | 87 | wait_queue_head_t wait; |
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index c5b11af908b..521baa4fe83 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c | |||
@@ -292,9 +292,11 @@ static int cmtp_session(void *arg) | |||
292 | 292 | ||
293 | init_waitqueue_entry(&wait, current); | 293 | init_waitqueue_entry(&wait, current); |
294 | add_wait_queue(sk_sleep(sk), &wait); | 294 | add_wait_queue(sk_sleep(sk), &wait); |
295 | while (!kthread_should_stop()) { | 295 | while (1) { |
296 | set_current_state(TASK_INTERRUPTIBLE); | 296 | set_current_state(TASK_INTERRUPTIBLE); |
297 | 297 | ||
298 | if (atomic_read(&session->terminate)) | ||
299 | break; | ||
298 | if (sk->sk_state != BT_CONNECTED) | 300 | if (sk->sk_state != BT_CONNECTED) |
299 | break; | 301 | break; |
300 | 302 | ||
@@ -307,7 +309,7 @@ static int cmtp_session(void *arg) | |||
307 | 309 | ||
308 | schedule(); | 310 | schedule(); |
309 | } | 311 | } |
310 | set_current_state(TASK_RUNNING); | 312 | __set_current_state(TASK_RUNNING); |
311 | remove_wait_queue(sk_sleep(sk), &wait); | 313 | remove_wait_queue(sk_sleep(sk), &wait); |
312 | 314 | ||
313 | down_write(&cmtp_session_sem); | 315 | down_write(&cmtp_session_sem); |
@@ -380,16 +382,17 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) | |||
380 | 382 | ||
381 | if (!(session->flags & (1 << CMTP_LOOPBACK))) { | 383 | if (!(session->flags & (1 << CMTP_LOOPBACK))) { |
382 | err = cmtp_attach_device(session); | 384 | err = cmtp_attach_device(session); |
383 | if (err < 0) | 385 | if (err < 0) { |
384 | goto detach; | 386 | atomic_inc(&session->terminate); |
387 | wake_up_process(session->task); | ||
388 | up_write(&cmtp_session_sem); | ||
389 | return err; | ||
390 | } | ||
385 | } | 391 | } |
386 | 392 | ||
387 | up_write(&cmtp_session_sem); | 393 | up_write(&cmtp_session_sem); |
388 | return 0; | 394 | return 0; |
389 | 395 | ||
390 | detach: | ||
391 | cmtp_detach_device(session); | ||
392 | |||
393 | unlink: | 396 | unlink: |
394 | __cmtp_unlink_session(session); | 397 | __cmtp_unlink_session(session); |
395 | 398 | ||
@@ -414,7 +417,8 @@ int cmtp_del_connection(struct cmtp_conndel_req *req) | |||
414 | skb_queue_purge(&session->transmit); | 417 | skb_queue_purge(&session->transmit); |
415 | 418 | ||
416 | /* Stop session thread */ | 419 | /* Stop session thread */ |
417 | kthread_stop(session->task); | 420 | atomic_inc(&session->terminate); |
421 | wake_up_process(session->task); | ||
418 | } else | 422 | } else |
419 | err = -ENOENT; | 423 | err = -ENOENT; |
420 | 424 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ec0bc3f60f2..56943add45c 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1209,7 +1209,6 @@ static void hci_cmd_timer(unsigned long arg) | |||
1209 | 1209 | ||
1210 | BT_ERR("%s command tx timeout", hdev->name); | 1210 | BT_ERR("%s command tx timeout", hdev->name); |
1211 | atomic_set(&hdev->cmd_cnt, 1); | 1211 | atomic_set(&hdev->cmd_cnt, 1); |
1212 | clear_bit(HCI_RESET, &hdev->flags); | ||
1213 | tasklet_schedule(&hdev->cmd_task); | 1212 | tasklet_schedule(&hdev->cmd_task); |
1214 | } | 1213 | } |
1215 | 1214 | ||
@@ -1327,7 +1326,7 @@ int hci_blacklist_add(struct hci_dev *hdev, bdaddr_t *bdaddr) | |||
1327 | 1326 | ||
1328 | entry = kzalloc(sizeof(struct bdaddr_list), GFP_KERNEL); | 1327 | entry = kzalloc(sizeof(struct bdaddr_list), GFP_KERNEL); |
1329 | if (!entry) { | 1328 | if (!entry) { |
1330 | return -ENOMEM; | 1329 | err = -ENOMEM; |
1331 | goto err; | 1330 | goto err; |
1332 | } | 1331 | } |
1333 | 1332 | ||
@@ -2408,7 +2407,10 @@ static void hci_cmd_task(unsigned long arg) | |||
2408 | if (hdev->sent_cmd) { | 2407 | if (hdev->sent_cmd) { |
2409 | atomic_dec(&hdev->cmd_cnt); | 2408 | atomic_dec(&hdev->cmd_cnt); |
2410 | hci_send_frame(skb); | 2409 | hci_send_frame(skb); |
2411 | mod_timer(&hdev->cmd_timer, | 2410 | if (test_bit(HCI_RESET, &hdev->flags)) |
2411 | del_timer(&hdev->cmd_timer); | ||
2412 | else | ||
2413 | mod_timer(&hdev->cmd_timer, | ||
2412 | jiffies + msecs_to_jiffies(HCI_CMD_TIMEOUT)); | 2414 | jiffies + msecs_to_jiffies(HCI_CMD_TIMEOUT)); |
2413 | } else { | 2415 | } else { |
2414 | skb_queue_head(&hdev->cmd_q, skb); | 2416 | skb_queue_head(&hdev->cmd_q, skb); |
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 43b4c2deb7c..fb68f344c34 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -764,6 +764,7 @@ static int hidp_session(void *arg) | |||
764 | 764 | ||
765 | up_write(&hidp_session_sem); | 765 | up_write(&hidp_session_sem); |
766 | 766 | ||
767 | kfree(session->rd_data); | ||
767 | kfree(session); | 768 | kfree(session); |
768 | return 0; | 769 | return 0; |
769 | } | 770 | } |
@@ -841,7 +842,8 @@ static int hidp_setup_input(struct hidp_session *session, | |||
841 | 842 | ||
842 | err = input_register_device(input); | 843 | err = input_register_device(input); |
843 | if (err < 0) { | 844 | if (err < 0) { |
844 | hci_conn_put_device(session->conn); | 845 | input_free_device(input); |
846 | session->input = NULL; | ||
845 | return err; | 847 | return err; |
846 | } | 848 | } |
847 | 849 | ||
@@ -1044,8 +1046,12 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, | |||
1044 | } | 1046 | } |
1045 | 1047 | ||
1046 | err = hid_add_device(session->hid); | 1048 | err = hid_add_device(session->hid); |
1047 | if (err < 0) | 1049 | if (err < 0) { |
1048 | goto err_add_device; | 1050 | atomic_inc(&session->terminate); |
1051 | wake_up_process(session->task); | ||
1052 | up_write(&hidp_session_sem); | ||
1053 | return err; | ||
1054 | } | ||
1049 | 1055 | ||
1050 | if (session->input) { | 1056 | if (session->input) { |
1051 | hidp_send_ctrl_message(session, | 1057 | hidp_send_ctrl_message(session, |
@@ -1059,12 +1065,6 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, | |||
1059 | up_write(&hidp_session_sem); | 1065 | up_write(&hidp_session_sem); |
1060 | return 0; | 1066 | return 0; |
1061 | 1067 | ||
1062 | err_add_device: | ||
1063 | hid_destroy_device(session->hid); | ||
1064 | session->hid = NULL; | ||
1065 | atomic_inc(&session->terminate); | ||
1066 | wake_up_process(session->task); | ||
1067 | |||
1068 | unlink: | 1068 | unlink: |
1069 | hidp_del_timer(session); | 1069 | hidp_del_timer(session); |
1070 | 1070 | ||
@@ -1090,7 +1090,6 @@ purge: | |||
1090 | failed: | 1090 | failed: |
1091 | up_write(&hidp_session_sem); | 1091 | up_write(&hidp_session_sem); |
1092 | 1092 | ||
1093 | input_free_device(session->input); | ||
1094 | kfree(session); | 1093 | kfree(session); |
1095 | return err; | 1094 | return err; |
1096 | } | 1095 | } |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 3204ba8a701..b3bdb482bbe 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1159,9 +1159,8 @@ int __l2cap_wait_ack(struct sock *sk) | |||
1159 | int timeo = HZ/5; | 1159 | int timeo = HZ/5; |
1160 | 1160 | ||
1161 | add_wait_queue(sk_sleep(sk), &wait); | 1161 | add_wait_queue(sk_sleep(sk), &wait); |
1162 | while ((chan->unacked_frames > 0 && chan->conn)) { | 1162 | set_current_state(TASK_INTERRUPTIBLE); |
1163 | set_current_state(TASK_INTERRUPTIBLE); | 1163 | while (chan->unacked_frames > 0 && chan->conn) { |
1164 | |||
1165 | if (!timeo) | 1164 | if (!timeo) |
1166 | timeo = HZ/5; | 1165 | timeo = HZ/5; |
1167 | 1166 | ||
@@ -1173,6 +1172,7 @@ int __l2cap_wait_ack(struct sock *sk) | |||
1173 | release_sock(sk); | 1172 | release_sock(sk); |
1174 | timeo = schedule_timeout(timeo); | 1173 | timeo = schedule_timeout(timeo); |
1175 | lock_sock(sk); | 1174 | lock_sock(sk); |
1175 | set_current_state(TASK_INTERRUPTIBLE); | ||
1176 | 1176 | ||
1177 | err = sock_error(sk); | 1177 | err = sock_error(sk); |
1178 | if (err) | 1178 | if (err) |
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 5c36b3e8739..61f1f623091 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -235,30 +235,26 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl | |||
235 | 235 | ||
236 | lock_sock_nested(sk, SINGLE_DEPTH_NESTING); | 236 | lock_sock_nested(sk, SINGLE_DEPTH_NESTING); |
237 | 237 | ||
238 | if (sk->sk_state != BT_LISTEN) { | ||
239 | err = -EBADFD; | ||
240 | goto done; | ||
241 | } | ||
242 | |||
243 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); | 238 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); |
244 | 239 | ||
245 | BT_DBG("sk %p timeo %ld", sk, timeo); | 240 | BT_DBG("sk %p timeo %ld", sk, timeo); |
246 | 241 | ||
247 | /* Wait for an incoming connection. (wake-one). */ | 242 | /* Wait for an incoming connection. (wake-one). */ |
248 | add_wait_queue_exclusive(sk_sleep(sk), &wait); | 243 | add_wait_queue_exclusive(sk_sleep(sk), &wait); |
249 | while (!(nsk = bt_accept_dequeue(sk, newsock))) { | 244 | while (1) { |
250 | set_current_state(TASK_INTERRUPTIBLE); | 245 | set_current_state(TASK_INTERRUPTIBLE); |
251 | if (!timeo) { | 246 | |
252 | err = -EAGAIN; | 247 | if (sk->sk_state != BT_LISTEN) { |
248 | err = -EBADFD; | ||
253 | break; | 249 | break; |
254 | } | 250 | } |
255 | 251 | ||
256 | release_sock(sk); | 252 | nsk = bt_accept_dequeue(sk, newsock); |
257 | timeo = schedule_timeout(timeo); | 253 | if (nsk) |
258 | lock_sock_nested(sk, SINGLE_DEPTH_NESTING); | 254 | break; |
259 | 255 | ||
260 | if (sk->sk_state != BT_LISTEN) { | 256 | if (!timeo) { |
261 | err = -EBADFD; | 257 | err = -EAGAIN; |
262 | break; | 258 | break; |
263 | } | 259 | } |
264 | 260 | ||
@@ -266,8 +262,12 @@ static int l2cap_sock_accept(struct socket *sock, struct socket *newsock, int fl | |||
266 | err = sock_intr_errno(timeo); | 262 | err = sock_intr_errno(timeo); |
267 | break; | 263 | break; |
268 | } | 264 | } |
265 | |||
266 | release_sock(sk); | ||
267 | timeo = schedule_timeout(timeo); | ||
268 | lock_sock_nested(sk, SINGLE_DEPTH_NESTING); | ||
269 | } | 269 | } |
270 | set_current_state(TASK_RUNNING); | 270 | __set_current_state(TASK_RUNNING); |
271 | remove_wait_queue(sk_sleep(sk), &wait); | 271 | remove_wait_queue(sk_sleep(sk), &wait); |
272 | 272 | ||
273 | if (err) | 273 | if (err) |
@@ -993,7 +993,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p | |||
993 | INIT_LIST_HEAD(&bt_sk(sk)->accept_q); | 993 | INIT_LIST_HEAD(&bt_sk(sk)->accept_q); |
994 | 994 | ||
995 | sk->sk_destruct = l2cap_sock_destruct; | 995 | sk->sk_destruct = l2cap_sock_destruct; |
996 | sk->sk_sndtimeo = msecs_to_jiffies(L2CAP_CONN_TIMEOUT); | 996 | sk->sk_sndtimeo = L2CAP_CONN_TIMEOUT; |
997 | 997 | ||
998 | sock_reset_flag(sk, SOCK_ZAPPED); | 998 | sock_reset_flag(sk, SOCK_ZAPPED); |
999 | 999 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 5759bb7054f..5ba3f6df665 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -62,7 +62,6 @@ static DEFINE_MUTEX(rfcomm_mutex); | |||
62 | #define rfcomm_lock() mutex_lock(&rfcomm_mutex) | 62 | #define rfcomm_lock() mutex_lock(&rfcomm_mutex) |
63 | #define rfcomm_unlock() mutex_unlock(&rfcomm_mutex) | 63 | #define rfcomm_unlock() mutex_unlock(&rfcomm_mutex) |
64 | 64 | ||
65 | static unsigned long rfcomm_event; | ||
66 | 65 | ||
67 | static LIST_HEAD(session_list); | 66 | static LIST_HEAD(session_list); |
68 | 67 | ||
@@ -120,7 +119,6 @@ static inline void rfcomm_schedule(void) | |||
120 | { | 119 | { |
121 | if (!rfcomm_thread) | 120 | if (!rfcomm_thread) |
122 | return; | 121 | return; |
123 | set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event); | ||
124 | wake_up_process(rfcomm_thread); | 122 | wake_up_process(rfcomm_thread); |
125 | } | 123 | } |
126 | 124 | ||
@@ -2038,19 +2036,18 @@ static int rfcomm_run(void *unused) | |||
2038 | 2036 | ||
2039 | rfcomm_add_listener(BDADDR_ANY); | 2037 | rfcomm_add_listener(BDADDR_ANY); |
2040 | 2038 | ||
2041 | while (!kthread_should_stop()) { | 2039 | while (1) { |
2042 | set_current_state(TASK_INTERRUPTIBLE); | 2040 | set_current_state(TASK_INTERRUPTIBLE); |
2043 | if (!test_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event)) { | 2041 | |
2044 | /* No pending events. Let's sleep. | 2042 | if (kthread_should_stop()) |
2045 | * Incoming connections and data will wake us up. */ | 2043 | break; |
2046 | schedule(); | ||
2047 | } | ||
2048 | set_current_state(TASK_RUNNING); | ||
2049 | 2044 | ||
2050 | /* Process stuff */ | 2045 | /* Process stuff */ |
2051 | clear_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event); | ||
2052 | rfcomm_process_sessions(); | 2046 | rfcomm_process_sessions(); |
2047 | |||
2048 | schedule(); | ||
2053 | } | 2049 | } |
2050 | __set_current_state(TASK_RUNNING); | ||
2054 | 2051 | ||
2055 | rfcomm_kill_listener(); | 2052 | rfcomm_kill_listener(); |
2056 | 2053 | ||
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index 8f01e6b11a7..482722bbc7a 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -485,11 +485,6 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f | |||
485 | 485 | ||
486 | lock_sock(sk); | 486 | lock_sock(sk); |
487 | 487 | ||
488 | if (sk->sk_state != BT_LISTEN) { | ||
489 | err = -EBADFD; | ||
490 | goto done; | ||
491 | } | ||
492 | |||
493 | if (sk->sk_type != SOCK_STREAM) { | 488 | if (sk->sk_type != SOCK_STREAM) { |
494 | err = -EINVAL; | 489 | err = -EINVAL; |
495 | goto done; | 490 | goto done; |
@@ -501,19 +496,20 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f | |||
501 | 496 | ||
502 | /* Wait for an incoming connection. (wake-one). */ | 497 | /* Wait for an incoming connection. (wake-one). */ |
503 | add_wait_queue_exclusive(sk_sleep(sk), &wait); | 498 | add_wait_queue_exclusive(sk_sleep(sk), &wait); |
504 | while (!(nsk = bt_accept_dequeue(sk, newsock))) { | 499 | while (1) { |
505 | set_current_state(TASK_INTERRUPTIBLE); | 500 | set_current_state(TASK_INTERRUPTIBLE); |
506 | if (!timeo) { | 501 | |
507 | err = -EAGAIN; | 502 | if (sk->sk_state != BT_LISTEN) { |
503 | err = -EBADFD; | ||
508 | break; | 504 | break; |
509 | } | 505 | } |
510 | 506 | ||
511 | release_sock(sk); | 507 | nsk = bt_accept_dequeue(sk, newsock); |
512 | timeo = schedule_timeout(timeo); | 508 | if (nsk) |
513 | lock_sock(sk); | 509 | break; |
514 | 510 | ||
515 | if (sk->sk_state != BT_LISTEN) { | 511 | if (!timeo) { |
516 | err = -EBADFD; | 512 | err = -EAGAIN; |
517 | break; | 513 | break; |
518 | } | 514 | } |
519 | 515 | ||
@@ -521,8 +517,12 @@ static int rfcomm_sock_accept(struct socket *sock, struct socket *newsock, int f | |||
521 | err = sock_intr_errno(timeo); | 517 | err = sock_intr_errno(timeo); |
522 | break; | 518 | break; |
523 | } | 519 | } |
520 | |||
521 | release_sock(sk); | ||
522 | timeo = schedule_timeout(timeo); | ||
523 | lock_sock(sk); | ||
524 | } | 524 | } |
525 | set_current_state(TASK_RUNNING); | 525 | __set_current_state(TASK_RUNNING); |
526 | remove_wait_queue(sk_sleep(sk), &wait); | 526 | remove_wait_queue(sk_sleep(sk), &wait); |
527 | 527 | ||
528 | if (err) | 528 | if (err) |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 4c3621b5e0a..8270f05e3f1 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -564,30 +564,26 @@ static int sco_sock_accept(struct socket *sock, struct socket *newsock, int flag | |||
564 | 564 | ||
565 | lock_sock(sk); | 565 | lock_sock(sk); |
566 | 566 | ||
567 | if (sk->sk_state != BT_LISTEN) { | ||
568 | err = -EBADFD; | ||
569 | goto done; | ||
570 | } | ||
571 | |||
572 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); | 567 | timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); |
573 | 568 | ||
574 | BT_DBG("sk %p timeo %ld", sk, timeo); | 569 | BT_DBG("sk %p timeo %ld", sk, timeo); |
575 | 570 | ||
576 | /* Wait for an incoming connection. (wake-one). */ | 571 | /* Wait for an incoming connection. (wake-one). */ |
577 | add_wait_queue_exclusive(sk_sleep(sk), &wait); | 572 | add_wait_queue_exclusive(sk_sleep(sk), &wait); |
578 | while (!(ch = bt_accept_dequeue(sk, newsock))) { | 573 | while (1) { |
579 | set_current_state(TASK_INTERRUPTIBLE); | 574 | set_current_state(TASK_INTERRUPTIBLE); |
580 | if (!timeo) { | 575 | |
581 | err = -EAGAIN; | 576 | if (sk->sk_state != BT_LISTEN) { |
577 | err = -EBADFD; | ||
582 | break; | 578 | break; |
583 | } | 579 | } |
584 | 580 | ||
585 | release_sock(sk); | 581 | ch = bt_accept_dequeue(sk, newsock); |
586 | timeo = schedule_timeout(timeo); | 582 | if (ch) |
587 | lock_sock(sk); | 583 | break; |
588 | 584 | ||
589 | if (sk->sk_state != BT_LISTEN) { | 585 | if (!timeo) { |
590 | err = -EBADFD; | 586 | err = -EAGAIN; |
591 | break; | 587 | break; |
592 | } | 588 | } |
593 | 589 | ||
@@ -595,8 +591,12 @@ static int sco_sock_accept(struct socket *sock, struct socket *newsock, int flag | |||
595 | err = sock_intr_errno(timeo); | 591 | err = sock_intr_errno(timeo); |
596 | break; | 592 | break; |
597 | } | 593 | } |
594 | |||
595 | release_sock(sk); | ||
596 | timeo = schedule_timeout(timeo); | ||
597 | lock_sock(sk); | ||
598 | } | 598 | } |
599 | set_current_state(TASK_RUNNING); | 599 | __set_current_state(TASK_RUNNING); |
600 | remove_wait_queue(sk_sleep(sk), &wait); | 600 | remove_wait_queue(sk_sleep(sk), &wait); |
601 | 601 | ||
602 | if (err) | 602 | if (err) |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 2d85ca7111d..995cbe0ac0b 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -1456,7 +1456,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1456 | { | 1456 | { |
1457 | struct sk_buff *skb2; | 1457 | struct sk_buff *skb2; |
1458 | const struct ipv6hdr *ip6h; | 1458 | const struct ipv6hdr *ip6h; |
1459 | struct icmp6hdr *icmp6h; | 1459 | u8 icmp6_type; |
1460 | u8 nexthdr; | 1460 | u8 nexthdr; |
1461 | unsigned len; | 1461 | unsigned len; |
1462 | int offset; | 1462 | int offset; |
@@ -1502,9 +1502,9 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1502 | __skb_pull(skb2, offset); | 1502 | __skb_pull(skb2, offset); |
1503 | skb_reset_transport_header(skb2); | 1503 | skb_reset_transport_header(skb2); |
1504 | 1504 | ||
1505 | icmp6h = icmp6_hdr(skb2); | 1505 | icmp6_type = icmp6_hdr(skb2)->icmp6_type; |
1506 | 1506 | ||
1507 | switch (icmp6h->icmp6_type) { | 1507 | switch (icmp6_type) { |
1508 | case ICMPV6_MGM_QUERY: | 1508 | case ICMPV6_MGM_QUERY: |
1509 | case ICMPV6_MGM_REPORT: | 1509 | case ICMPV6_MGM_REPORT: |
1510 | case ICMPV6_MGM_REDUCTION: | 1510 | case ICMPV6_MGM_REDUCTION: |
@@ -1520,16 +1520,23 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1520 | err = pskb_trim_rcsum(skb2, len); | 1520 | err = pskb_trim_rcsum(skb2, len); |
1521 | if (err) | 1521 | if (err) |
1522 | goto out; | 1522 | goto out; |
1523 | err = -EINVAL; | ||
1523 | } | 1524 | } |
1524 | 1525 | ||
1526 | ip6h = ipv6_hdr(skb2); | ||
1527 | |||
1525 | switch (skb2->ip_summed) { | 1528 | switch (skb2->ip_summed) { |
1526 | case CHECKSUM_COMPLETE: | 1529 | case CHECKSUM_COMPLETE: |
1527 | if (!csum_fold(skb2->csum)) | 1530 | if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, skb2->len, |
1531 | IPPROTO_ICMPV6, skb2->csum)) | ||
1528 | break; | 1532 | break; |
1529 | /*FALLTHROUGH*/ | 1533 | /*FALLTHROUGH*/ |
1530 | case CHECKSUM_NONE: | 1534 | case CHECKSUM_NONE: |
1531 | skb2->csum = 0; | 1535 | skb2->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, |
1532 | if (skb_checksum_complete(skb2)) | 1536 | &ip6h->daddr, |
1537 | skb2->len, | ||
1538 | IPPROTO_ICMPV6, 0)); | ||
1539 | if (__skb_checksum_complete(skb2)) | ||
1533 | goto out; | 1540 | goto out; |
1534 | } | 1541 | } |
1535 | 1542 | ||
@@ -1537,7 +1544,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br, | |||
1537 | 1544 | ||
1538 | BR_INPUT_SKB_CB(skb)->igmp = 1; | 1545 | BR_INPUT_SKB_CB(skb)->igmp = 1; |
1539 | 1546 | ||
1540 | switch (icmp6h->icmp6_type) { | 1547 | switch (icmp6_type) { |
1541 | case ICMPV6_MGM_REPORT: | 1548 | case ICMPV6_MGM_REPORT: |
1542 | { | 1549 | { |
1543 | struct mld_msg *mld; | 1550 | struct mld_msg *mld; |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 8fab9b0bb20..1334d7e56f0 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1319,11 +1319,15 @@ static void neigh_proxy_process(unsigned long arg) | |||
1319 | 1319 | ||
1320 | if (tdif <= 0) { | 1320 | if (tdif <= 0) { |
1321 | struct net_device *dev = skb->dev; | 1321 | struct net_device *dev = skb->dev; |
1322 | |||
1322 | __skb_unlink(skb, &tbl->proxy_queue); | 1323 | __skb_unlink(skb, &tbl->proxy_queue); |
1323 | if (tbl->proxy_redo && netif_running(dev)) | 1324 | if (tbl->proxy_redo && netif_running(dev)) { |
1325 | rcu_read_lock(); | ||
1324 | tbl->proxy_redo(skb); | 1326 | tbl->proxy_redo(skb); |
1325 | else | 1327 | rcu_read_unlock(); |
1328 | } else { | ||
1326 | kfree_skb(skb); | 1329 | kfree_skb(skb); |
1330 | } | ||
1327 | 1331 | ||
1328 | dev_put(dev); | 1332 | dev_put(dev); |
1329 | } else if (!sched_next || tdif < sched_next) | 1333 | } else if (!sched_next || tdif < sched_next) |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index adf84dd8c7b..52622517e0d 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -558,13 +558,14 @@ int __netpoll_rx(struct sk_buff *skb) | |||
558 | if (skb_shared(skb)) | 558 | if (skb_shared(skb)) |
559 | goto out; | 559 | goto out; |
560 | 560 | ||
561 | iph = (struct iphdr *)skb->data; | ||
562 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | 561 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) |
563 | goto out; | 562 | goto out; |
563 | iph = (struct iphdr *)skb->data; | ||
564 | if (iph->ihl < 5 || iph->version != 4) | 564 | if (iph->ihl < 5 || iph->version != 4) |
565 | goto out; | 565 | goto out; |
566 | if (!pskb_may_pull(skb, iph->ihl*4)) | 566 | if (!pskb_may_pull(skb, iph->ihl*4)) |
567 | goto out; | 567 | goto out; |
568 | iph = (struct iphdr *)skb->data; | ||
568 | if (ip_fast_csum((u8 *)iph, iph->ihl) != 0) | 569 | if (ip_fast_csum((u8 *)iph, iph->ihl) != 0) |
569 | goto out; | 570 | goto out; |
570 | 571 | ||
@@ -579,6 +580,7 @@ int __netpoll_rx(struct sk_buff *skb) | |||
579 | if (pskb_trim_rcsum(skb, len)) | 580 | if (pskb_trim_rcsum(skb, len)) |
580 | goto out; | 581 | goto out; |
581 | 582 | ||
583 | iph = (struct iphdr *)skb->data; | ||
582 | if (iph->protocol != IPPROTO_UDP) | 584 | if (iph->protocol != IPPROTO_UDP) |
583 | goto out; | 585 | goto out; |
584 | 586 | ||
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 283c0a26e03..d577199eabd 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -767,7 +767,7 @@ static int igmp_xmarksources(struct ip_mc_list *pmc, int nsrcs, __be32 *srcs) | |||
767 | break; | 767 | break; |
768 | for (i=0; i<nsrcs; i++) { | 768 | for (i=0; i<nsrcs; i++) { |
769 | /* skip inactive filters */ | 769 | /* skip inactive filters */ |
770 | if (pmc->sfcount[MCAST_INCLUDE] || | 770 | if (psf->sf_count[MCAST_INCLUDE] || |
771 | pmc->sfcount[MCAST_EXCLUDE] != | 771 | pmc->sfcount[MCAST_EXCLUDE] != |
772 | psf->sf_count[MCAST_EXCLUDE]) | 772 | psf->sf_count[MCAST_EXCLUDE]) |
773 | continue; | 773 | continue; |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 3e6ebcdb477..ee7839f4d6e 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -1059,7 +1059,7 @@ static int mld_xmarksources(struct ifmcaddr6 *pmc, int nsrcs, | |||
1059 | break; | 1059 | break; |
1060 | for (i=0; i<nsrcs; i++) { | 1060 | for (i=0; i<nsrcs; i++) { |
1061 | /* skip inactive filters */ | 1061 | /* skip inactive filters */ |
1062 | if (pmc->mca_sfcount[MCAST_INCLUDE] || | 1062 | if (psf->sf_count[MCAST_INCLUDE] || |
1063 | pmc->mca_sfcount[MCAST_EXCLUDE] != | 1063 | pmc->mca_sfcount[MCAST_EXCLUDE] != |
1064 | psf->sf_count[MCAST_EXCLUDE]) | 1064 | psf->sf_count[MCAST_EXCLUDE]) |
1065 | continue; | 1065 | continue; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 866f269183c..acb44230b25 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -1012,7 +1012,6 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
1012 | cancel_work_sync(&local->reconfig_filter); | 1012 | cancel_work_sync(&local->reconfig_filter); |
1013 | 1013 | ||
1014 | ieee80211_clear_tx_pending(local); | 1014 | ieee80211_clear_tx_pending(local); |
1015 | sta_info_stop(local); | ||
1016 | rate_control_deinitialize(local); | 1015 | rate_control_deinitialize(local); |
1017 | 1016 | ||
1018 | if (skb_queue_len(&local->skb_queue) || | 1017 | if (skb_queue_len(&local->skb_queue) || |
@@ -1024,6 +1023,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
1024 | 1023 | ||
1025 | destroy_workqueue(local->workqueue); | 1024 | destroy_workqueue(local->workqueue); |
1026 | wiphy_unregister(local->hw.wiphy); | 1025 | wiphy_unregister(local->hw.wiphy); |
1026 | sta_info_stop(local); | ||
1027 | ieee80211_wep_free(local); | 1027 | ieee80211_wep_free(local); |
1028 | ieee80211_led_exit(local); | 1028 | ieee80211_led_exit(local); |
1029 | kfree(local->int_scan_req); | 1029 | kfree(local->int_scan_req); |
diff --git a/net/socket.c b/net/socket.c index 24a77400b65..ffe92ca32f2 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1965,8 +1965,9 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, | |||
1965 | * used_address->name_len is initialized to UINT_MAX so that the first | 1965 | * used_address->name_len is initialized to UINT_MAX so that the first |
1966 | * destination address never matches. | 1966 | * destination address never matches. |
1967 | */ | 1967 | */ |
1968 | if (used_address && used_address->name_len == msg_sys->msg_namelen && | 1968 | if (used_address && msg_sys->msg_name && |
1969 | !memcmp(&used_address->name, msg->msg_name, | 1969 | used_address->name_len == msg_sys->msg_namelen && |
1970 | !memcmp(&used_address->name, msg_sys->msg_name, | ||
1970 | used_address->name_len)) { | 1971 | used_address->name_len)) { |
1971 | err = sock_sendmsg_nosec(sock, msg_sys, total_len); | 1972 | err = sock_sendmsg_nosec(sock, msg_sys, total_len); |
1972 | goto out_freectl; | 1973 | goto out_freectl; |
@@ -1978,8 +1979,9 @@ static int __sys_sendmsg(struct socket *sock, struct msghdr __user *msg, | |||
1978 | */ | 1979 | */ |
1979 | if (used_address && err >= 0) { | 1980 | if (used_address && err >= 0) { |
1980 | used_address->name_len = msg_sys->msg_namelen; | 1981 | used_address->name_len = msg_sys->msg_namelen; |
1981 | memcpy(&used_address->name, msg->msg_name, | 1982 | if (msg_sys->msg_name) |
1982 | used_address->name_len); | 1983 | memcpy(&used_address->name, msg_sys->msg_name, |
1984 | used_address->name_len); | ||
1983 | } | 1985 | } |
1984 | 1986 | ||
1985 | out_freectl: | 1987 | out_freectl: |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 645437cfc46..c14865172da 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -616,6 +616,9 @@ int wiphy_register(struct wiphy *wiphy) | |||
616 | if (res) | 616 | if (res) |
617 | goto out_rm_dev; | 617 | goto out_rm_dev; |
618 | 618 | ||
619 | rtnl_lock(); | ||
620 | rdev->wiphy.registered = true; | ||
621 | rtnl_unlock(); | ||
619 | return 0; | 622 | return 0; |
620 | 623 | ||
621 | out_rm_dev: | 624 | out_rm_dev: |
@@ -647,6 +650,10 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
647 | { | 650 | { |
648 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 651 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
649 | 652 | ||
653 | rtnl_lock(); | ||
654 | rdev->wiphy.registered = false; | ||
655 | rtnl_unlock(); | ||
656 | |||
650 | rfkill_unregister(rdev->rfkill); | 657 | rfkill_unregister(rdev->rfkill); |
651 | 658 | ||
652 | /* protect the device list */ | 659 | /* protect the device list */ |
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c index c6e4ca6a7d2..ff574597a85 100644 --- a/net/wireless/sysfs.c +++ b/net/wireless/sysfs.c | |||
@@ -93,7 +93,8 @@ static int wiphy_suspend(struct device *dev, pm_message_t state) | |||
93 | 93 | ||
94 | if (rdev->ops->suspend) { | 94 | if (rdev->ops->suspend) { |
95 | rtnl_lock(); | 95 | rtnl_lock(); |
96 | ret = rdev->ops->suspend(&rdev->wiphy, rdev->wowlan); | 96 | if (rdev->wiphy.registered) |
97 | ret = rdev->ops->suspend(&rdev->wiphy, rdev->wowlan); | ||
97 | rtnl_unlock(); | 98 | rtnl_unlock(); |
98 | } | 99 | } |
99 | 100 | ||
@@ -112,7 +113,8 @@ static int wiphy_resume(struct device *dev) | |||
112 | 113 | ||
113 | if (rdev->ops->resume) { | 114 | if (rdev->ops->resume) { |
114 | rtnl_lock(); | 115 | rtnl_lock(); |
115 | ret = rdev->ops->resume(&rdev->wiphy); | 116 | if (rdev->wiphy.registered) |
117 | ret = rdev->ops->resume(&rdev->wiphy); | ||
116 | rtnl_unlock(); | 118 | rtnl_unlock(); |
117 | } | 119 | } |
118 | 120 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 502fc949945..7696d05b935 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3348,6 +3348,8 @@ static hda_nid_t get_unassigned_dac(struct hda_codec *codec, hda_nid_t pin, | |||
3348 | 3348 | ||
3349 | #define MAX_AUTO_DACS 5 | 3349 | #define MAX_AUTO_DACS 5 |
3350 | 3350 | ||
3351 | #define DAC_SLAVE_FLAG 0x8000 /* filled dac is a slave */ | ||
3352 | |||
3351 | /* fill analog DAC list from the widget tree */ | 3353 | /* fill analog DAC list from the widget tree */ |
3352 | static int fill_cx_auto_dacs(struct hda_codec *codec, hda_nid_t *dacs) | 3354 | static int fill_cx_auto_dacs(struct hda_codec *codec, hda_nid_t *dacs) |
3353 | { | 3355 | { |
@@ -3370,16 +3372,26 @@ static int fill_cx_auto_dacs(struct hda_codec *codec, hda_nid_t *dacs) | |||
3370 | /* fill pin_dac_pair list from the pin and dac list */ | 3372 | /* fill pin_dac_pair list from the pin and dac list */ |
3371 | static int fill_dacs_for_pins(struct hda_codec *codec, hda_nid_t *pins, | 3373 | static int fill_dacs_for_pins(struct hda_codec *codec, hda_nid_t *pins, |
3372 | int num_pins, hda_nid_t *dacs, int *rest, | 3374 | int num_pins, hda_nid_t *dacs, int *rest, |
3373 | struct pin_dac_pair *filled, int type) | 3375 | struct pin_dac_pair *filled, int nums, |
3376 | int type) | ||
3374 | { | 3377 | { |
3375 | int i, nums; | 3378 | int i, start = nums; |
3376 | 3379 | ||
3377 | nums = 0; | 3380 | for (i = 0; i < num_pins; i++, nums++) { |
3378 | for (i = 0; i < num_pins; i++) { | ||
3379 | filled[nums].pin = pins[i]; | 3381 | filled[nums].pin = pins[i]; |
3380 | filled[nums].type = type; | 3382 | filled[nums].type = type; |
3381 | filled[nums].dac = get_unassigned_dac(codec, pins[i], dacs, rest); | 3383 | filled[nums].dac = get_unassigned_dac(codec, pins[i], dacs, rest); |
3382 | nums++; | 3384 | if (filled[nums].dac) |
3385 | continue; | ||
3386 | if (filled[start].dac && get_connection_index(codec, pins[i], filled[start].dac) >= 0) { | ||
3387 | filled[nums].dac = filled[start].dac | DAC_SLAVE_FLAG; | ||
3388 | continue; | ||
3389 | } | ||
3390 | if (filled[0].dac && get_connection_index(codec, pins[i], filled[0].dac) >= 0) { | ||
3391 | filled[nums].dac = filled[0].dac | DAC_SLAVE_FLAG; | ||
3392 | continue; | ||
3393 | } | ||
3394 | snd_printdd("Failed to find a DAC for pin 0x%x", pins[i]); | ||
3383 | } | 3395 | } |
3384 | return nums; | 3396 | return nums; |
3385 | } | 3397 | } |
@@ -3395,19 +3407,19 @@ static void cx_auto_parse_output(struct hda_codec *codec) | |||
3395 | rest = fill_cx_auto_dacs(codec, dacs); | 3407 | rest = fill_cx_auto_dacs(codec, dacs); |
3396 | /* parse all analog output pins */ | 3408 | /* parse all analog output pins */ |
3397 | nums = fill_dacs_for_pins(codec, cfg->line_out_pins, cfg->line_outs, | 3409 | nums = fill_dacs_for_pins(codec, cfg->line_out_pins, cfg->line_outs, |
3398 | dacs, &rest, spec->dac_info, | 3410 | dacs, &rest, spec->dac_info, 0, |
3399 | AUTO_PIN_LINE_OUT); | 3411 | AUTO_PIN_LINE_OUT); |
3400 | nums += fill_dacs_for_pins(codec, cfg->hp_pins, cfg->hp_outs, | 3412 | nums = fill_dacs_for_pins(codec, cfg->hp_pins, cfg->hp_outs, |
3401 | dacs, &rest, spec->dac_info + nums, | 3413 | dacs, &rest, spec->dac_info, nums, |
3402 | AUTO_PIN_HP_OUT); | 3414 | AUTO_PIN_HP_OUT); |
3403 | nums += fill_dacs_for_pins(codec, cfg->speaker_pins, cfg->speaker_outs, | 3415 | nums = fill_dacs_for_pins(codec, cfg->speaker_pins, cfg->speaker_outs, |
3404 | dacs, &rest, spec->dac_info + nums, | 3416 | dacs, &rest, spec->dac_info, nums, |
3405 | AUTO_PIN_SPEAKER_OUT); | 3417 | AUTO_PIN_SPEAKER_OUT); |
3406 | spec->dac_info_filled = nums; | 3418 | spec->dac_info_filled = nums; |
3407 | /* fill multiout struct */ | 3419 | /* fill multiout struct */ |
3408 | for (i = 0; i < nums; i++) { | 3420 | for (i = 0; i < nums; i++) { |
3409 | hda_nid_t dac = spec->dac_info[i].dac; | 3421 | hda_nid_t dac = spec->dac_info[i].dac; |
3410 | if (!dac) | 3422 | if (!dac || (dac & DAC_SLAVE_FLAG)) |
3411 | continue; | 3423 | continue; |
3412 | switch (spec->dac_info[i].type) { | 3424 | switch (spec->dac_info[i].type) { |
3413 | case AUTO_PIN_LINE_OUT: | 3425 | case AUTO_PIN_LINE_OUT: |
@@ -3862,7 +3874,7 @@ static void cx_auto_parse_input(struct hda_codec *codec) | |||
3862 | } | 3874 | } |
3863 | if (imux->num_items >= 2 && cfg->num_inputs == imux->num_items) | 3875 | if (imux->num_items >= 2 && cfg->num_inputs == imux->num_items) |
3864 | cx_auto_check_auto_mic(codec); | 3876 | cx_auto_check_auto_mic(codec); |
3865 | if (imux->num_items > 1 && !spec->auto_mic) { | 3877 | if (imux->num_items > 1) { |
3866 | for (i = 1; i < imux->num_items; i++) { | 3878 | for (i = 1; i < imux->num_items; i++) { |
3867 | if (spec->imux_info[i].adc != spec->imux_info[0].adc) { | 3879 | if (spec->imux_info[i].adc != spec->imux_info[0].adc) { |
3868 | spec->adc_switching = 1; | 3880 | spec->adc_switching = 1; |
@@ -4035,6 +4047,8 @@ static void cx_auto_init_output(struct hda_codec *codec) | |||
4035 | nid = spec->dac_info[i].dac; | 4047 | nid = spec->dac_info[i].dac; |
4036 | if (!nid) | 4048 | if (!nid) |
4037 | nid = spec->multiout.dac_nids[0]; | 4049 | nid = spec->multiout.dac_nids[0]; |
4050 | else if (nid & DAC_SLAVE_FLAG) | ||
4051 | nid &= ~DAC_SLAVE_FLAG; | ||
4038 | select_connection(codec, spec->dac_info[i].pin, nid); | 4052 | select_connection(codec, spec->dac_info[i].pin, nid); |
4039 | } | 4053 | } |
4040 | if (spec->auto_mute) { | 4054 | if (spec->auto_mute) { |
@@ -4167,9 +4181,11 @@ static int try_add_pb_volume(struct hda_codec *codec, hda_nid_t dac, | |||
4167 | hda_nid_t pin, const char *name, int idx) | 4181 | hda_nid_t pin, const char *name, int idx) |
4168 | { | 4182 | { |
4169 | unsigned int caps; | 4183 | unsigned int caps; |
4170 | caps = query_amp_caps(codec, dac, HDA_OUTPUT); | 4184 | if (dac && !(dac & DAC_SLAVE_FLAG)) { |
4171 | if (caps & AC_AMPCAP_NUM_STEPS) | 4185 | caps = query_amp_caps(codec, dac, HDA_OUTPUT); |
4172 | return cx_auto_add_pb_volume(codec, dac, name, idx); | 4186 | if (caps & AC_AMPCAP_NUM_STEPS) |
4187 | return cx_auto_add_pb_volume(codec, dac, name, idx); | ||
4188 | } | ||
4173 | caps = query_amp_caps(codec, pin, HDA_OUTPUT); | 4189 | caps = query_amp_caps(codec, pin, HDA_OUTPUT); |
4174 | if (caps & AC_AMPCAP_NUM_STEPS) | 4190 | if (caps & AC_AMPCAP_NUM_STEPS) |
4175 | return cx_auto_add_pb_volume(codec, pin, name, idx); | 4191 | return cx_auto_add_pb_volume(codec, pin, name, idx); |
@@ -4191,8 +4207,7 @@ static int cx_auto_build_output_controls(struct hda_codec *codec) | |||
4191 | for (i = 0; i < spec->dac_info_filled; i++) { | 4207 | for (i = 0; i < spec->dac_info_filled; i++) { |
4192 | const char *label; | 4208 | const char *label; |
4193 | int idx, type; | 4209 | int idx, type; |
4194 | if (!spec->dac_info[i].dac) | 4210 | hda_nid_t dac = spec->dac_info[i].dac; |
4195 | continue; | ||
4196 | type = spec->dac_info[i].type; | 4211 | type = spec->dac_info[i].type; |
4197 | if (type == AUTO_PIN_LINE_OUT) | 4212 | if (type == AUTO_PIN_LINE_OUT) |
4198 | type = spec->autocfg.line_out_type; | 4213 | type = spec->autocfg.line_out_type; |
@@ -4211,7 +4226,7 @@ static int cx_auto_build_output_controls(struct hda_codec *codec) | |||
4211 | idx = num_spk++; | 4226 | idx = num_spk++; |
4212 | break; | 4227 | break; |
4213 | } | 4228 | } |
4214 | err = try_add_pb_volume(codec, spec->dac_info[i].dac, | 4229 | err = try_add_pb_volume(codec, dac, |
4215 | spec->dac_info[i].pin, | 4230 | spec->dac_info[i].pin, |
4216 | label, idx); | 4231 | label, idx); |
4217 | if (err < 0) | 4232 | if (err < 0) |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fcb11af9ad2..7cabd731716 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -565,11 +565,11 @@ static void alc_hp_automute(struct hda_codec *codec) | |||
565 | { | 565 | { |
566 | struct alc_spec *spec = codec->spec; | 566 | struct alc_spec *spec = codec->spec; |
567 | 567 | ||
568 | if (!spec->automute) | ||
569 | return; | ||
570 | spec->jack_present = | 568 | spec->jack_present = |
571 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | 569 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins), |
572 | spec->autocfg.hp_pins); | 570 | spec->autocfg.hp_pins); |
571 | if (!spec->automute) | ||
572 | return; | ||
573 | update_speakers(codec); | 573 | update_speakers(codec); |
574 | } | 574 | } |
575 | 575 | ||
@@ -578,11 +578,11 @@ static void alc_line_automute(struct hda_codec *codec) | |||
578 | { | 578 | { |
579 | struct alc_spec *spec = codec->spec; | 579 | struct alc_spec *spec = codec->spec; |
580 | 580 | ||
581 | if (!spec->automute || !spec->detect_line) | ||
582 | return; | ||
583 | spec->line_jack_present = | 581 | spec->line_jack_present = |
584 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), | 582 | detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins), |
585 | spec->autocfg.line_out_pins); | 583 | spec->autocfg.line_out_pins); |
584 | if (!spec->automute || !spec->detect_line) | ||
585 | return; | ||
586 | update_speakers(codec); | 586 | update_speakers(codec); |
587 | } | 587 | } |
588 | 588 | ||
@@ -3083,16 +3083,22 @@ static void alc_auto_init_multi_out(struct hda_codec *codec) | |||
3083 | static void alc_auto_init_extra_out(struct hda_codec *codec) | 3083 | static void alc_auto_init_extra_out(struct hda_codec *codec) |
3084 | { | 3084 | { |
3085 | struct alc_spec *spec = codec->spec; | 3085 | struct alc_spec *spec = codec->spec; |
3086 | hda_nid_t pin; | 3086 | hda_nid_t pin, dac; |
3087 | 3087 | ||
3088 | pin = spec->autocfg.hp_pins[0]; | 3088 | pin = spec->autocfg.hp_pins[0]; |
3089 | if (pin) | 3089 | if (pin) { |
3090 | alc_auto_set_output_and_unmute(codec, pin, PIN_HP, | 3090 | dac = spec->multiout.hp_nid; |
3091 | spec->multiout.hp_nid); | 3091 | if (!dac) |
3092 | dac = spec->multiout.dac_nids[0]; | ||
3093 | alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); | ||
3094 | } | ||
3092 | pin = spec->autocfg.speaker_pins[0]; | 3095 | pin = spec->autocfg.speaker_pins[0]; |
3093 | if (pin) | 3096 | if (pin) { |
3094 | alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, | 3097 | dac = spec->multiout.extra_out_nid[0]; |
3095 | spec->multiout.extra_out_nid[0]); | 3098 | if (!dac) |
3099 | dac = spec->multiout.dac_nids[0]; | ||
3100 | alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); | ||
3101 | } | ||
3096 | } | 3102 | } |
3097 | 3103 | ||
3098 | /* | 3104 | /* |
diff --git a/sound/soc/blackfin/bf5xx-ad193x.c b/sound/soc/blackfin/bf5xx-ad193x.c index d6651c033cb..a118a0fb9d8 100644 --- a/sound/soc/blackfin/bf5xx-ad193x.c +++ b/sound/soc/blackfin/bf5xx-ad193x.c | |||
@@ -56,7 +56,7 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream, | |||
56 | 56 | ||
57 | switch (params_rate(params)) { | 57 | switch (params_rate(params)) { |
58 | case 48000: | 58 | case 48000: |
59 | clk = 12288000; | 59 | clk = 24576000; |
60 | break; | 60 | break; |
61 | } | 61 | } |
62 | 62 | ||
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 2374ca5ffe6..eedb6f5e582 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c | |||
@@ -27,11 +27,6 @@ struct ad193x_priv { | |||
27 | int sysclk; | 27 | int sysclk; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | /* ad193x register cache & default register settings */ | ||
31 | static const u8 ad193x_reg[AD193X_NUM_REGS] = { | ||
32 | 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0, | ||
33 | }; | ||
34 | |||
35 | /* | 30 | /* |
36 | * AD193X volume/mute/de-emphasis etc. controls | 31 | * AD193X volume/mute/de-emphasis etc. controls |
37 | */ | 32 | */ |
@@ -307,7 +302,8 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream, | |||
307 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg); | 302 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg); |
308 | 303 | ||
309 | reg = snd_soc_read(codec, AD193X_DAC_CTRL2); | 304 | reg = snd_soc_read(codec, AD193X_DAC_CTRL2); |
310 | reg = (reg & (~AD193X_DAC_WORD_LEN_MASK)) | word_len; | 305 | reg = (reg & (~AD193X_DAC_WORD_LEN_MASK)) |
306 | | (word_len << AD193X_DAC_WORD_LEN_SHFT); | ||
311 | snd_soc_write(codec, AD193X_DAC_CTRL2, reg); | 307 | snd_soc_write(codec, AD193X_DAC_CTRL2, reg); |
312 | 308 | ||
313 | reg = snd_soc_read(codec, AD193X_ADC_CTRL1); | 309 | reg = snd_soc_read(codec, AD193X_ADC_CTRL1); |
@@ -389,9 +385,6 @@ static int ad193x_probe(struct snd_soc_codec *codec) | |||
389 | 385 | ||
390 | static struct snd_soc_codec_driver soc_codec_dev_ad193x = { | 386 | static struct snd_soc_codec_driver soc_codec_dev_ad193x = { |
391 | .probe = ad193x_probe, | 387 | .probe = ad193x_probe, |
392 | .reg_cache_default = ad193x_reg, | ||
393 | .reg_cache_size = AD193X_NUM_REGS, | ||
394 | .reg_word_size = sizeof(u16), | ||
395 | }; | 388 | }; |
396 | 389 | ||
397 | #if defined(CONFIG_SPI_MASTER) | 390 | #if defined(CONFIG_SPI_MASTER) |
diff --git a/sound/soc/codecs/ad193x.h b/sound/soc/codecs/ad193x.h index 9747b549787..cccc2e8e5fb 100644 --- a/sound/soc/codecs/ad193x.h +++ b/sound/soc/codecs/ad193x.h | |||
@@ -34,7 +34,8 @@ | |||
34 | #define AD193X_DAC_LEFT_HIGH (1 << 3) | 34 | #define AD193X_DAC_LEFT_HIGH (1 << 3) |
35 | #define AD193X_DAC_BCLK_INV (1 << 7) | 35 | #define AD193X_DAC_BCLK_INV (1 << 7) |
36 | #define AD193X_DAC_CTRL2 0x804 | 36 | #define AD193X_DAC_CTRL2 0x804 |
37 | #define AD193X_DAC_WORD_LEN_MASK 0xC | 37 | #define AD193X_DAC_WORD_LEN_SHFT 3 |
38 | #define AD193X_DAC_WORD_LEN_MASK 0x18 | ||
38 | #define AD193X_DAC_MASTER_MUTE 1 | 39 | #define AD193X_DAC_MASTER_MUTE 1 |
39 | #define AD193X_DAC_CHNL_MUTE 0x805 | 40 | #define AD193X_DAC_CHNL_MUTE 0x805 |
40 | #define AD193X_DACL1_MUTE 0 | 41 | #define AD193X_DACL1_MUTE 0 |
@@ -63,7 +64,7 @@ | |||
63 | #define AD193X_ADC_CTRL1 0x80f | 64 | #define AD193X_ADC_CTRL1 0x80f |
64 | #define AD193X_ADC_SERFMT_MASK 0x60 | 65 | #define AD193X_ADC_SERFMT_MASK 0x60 |
65 | #define AD193X_ADC_SERFMT_STEREO (0 << 5) | 66 | #define AD193X_ADC_SERFMT_STEREO (0 << 5) |
66 | #define AD193X_ADC_SERFMT_TDM (1 << 2) | 67 | #define AD193X_ADC_SERFMT_TDM (1 << 5) |
67 | #define AD193X_ADC_SERFMT_AUX (2 << 5) | 68 | #define AD193X_ADC_SERFMT_AUX (2 << 5) |
68 | #define AD193X_ADC_WORD_LEN_MASK 0x3 | 69 | #define AD193X_ADC_WORD_LEN_MASK 0x3 |
69 | #define AD193X_ADC_CTRL2 0x810 | 70 | #define AD193X_ADC_CTRL2 0x810 |
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c index 409d89d1f34..fbd7eb9e61c 100644 --- a/sound/soc/codecs/sta32x.c +++ b/sound/soc/codecs/sta32x.c | |||
@@ -857,6 +857,7 @@ static __devinit int sta32x_i2c_probe(struct i2c_client *i2c, | |||
857 | ret = snd_soc_register_codec(&i2c->dev, &sta32x_codec, &sta32x_dai, 1); | 857 | ret = snd_soc_register_codec(&i2c->dev, &sta32x_codec, &sta32x_dai, 1); |
858 | if (ret != 0) { | 858 | if (ret != 0) { |
859 | dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret); | 859 | dev_err(&i2c->dev, "Failed to register codec (%d)\n", ret); |
860 | kfree(sta32x); | ||
860 | return ret; | 861 | return ret; |
861 | } | 862 | } |
862 | 863 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 60d740ebeb5..1725550c293 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2221,6 +2221,8 @@ static int sysclk_event(struct snd_soc_dapm_widget *w, | |||
2221 | switch (event) { | 2221 | switch (event) { |
2222 | case SND_SOC_DAPM_PRE_PMU: | 2222 | case SND_SOC_DAPM_PRE_PMU: |
2223 | if (fll) { | 2223 | if (fll) { |
2224 | try_wait_for_completion(&wm8962->fll_lock); | ||
2225 | |||
2224 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, | 2226 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, |
2225 | WM8962_FLL_ENA, WM8962_FLL_ENA); | 2227 | WM8962_FLL_ENA, WM8962_FLL_ENA); |
2226 | if (wm8962->irq) { | 2228 | if (wm8962->irq) { |
@@ -2927,10 +2929,6 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec, | |||
2927 | WM8962_BIAS_ENA | 0x180); | 2929 | WM8962_BIAS_ENA | 0x180); |
2928 | 2930 | ||
2929 | msleep(5); | 2931 | msleep(5); |
2930 | |||
2931 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
2932 | WM8962_CLKREG_OVD, | ||
2933 | WM8962_CLKREG_OVD); | ||
2934 | } | 2932 | } |
2935 | 2933 | ||
2936 | /* VMID 2*250k */ | 2934 | /* VMID 2*250k */ |
@@ -3288,6 +3286,8 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source, | |||
3288 | snd_soc_write(codec, WM8962_FLL_CONTROL_7, fll_div.lambda); | 3286 | snd_soc_write(codec, WM8962_FLL_CONTROL_7, fll_div.lambda); |
3289 | snd_soc_write(codec, WM8962_FLL_CONTROL_8, fll_div.n); | 3287 | snd_soc_write(codec, WM8962_FLL_CONTROL_8, fll_div.n); |
3290 | 3288 | ||
3289 | try_wait_for_completion(&wm8962->fll_lock); | ||
3290 | |||
3291 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, | 3291 | snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, |
3292 | WM8962_FLL_FRAC | WM8962_FLL_REFCLK_SRC_MASK | | 3292 | WM8962_FLL_FRAC | WM8962_FLL_REFCLK_SRC_MASK | |
3293 | WM8962_FLL_ENA, fll1); | 3293 | WM8962_FLL_ENA, fll1); |
@@ -3868,6 +3868,10 @@ static int wm8962_probe(struct snd_soc_codec *codec) | |||
3868 | */ | 3868 | */ |
3869 | snd_soc_update_bits(codec, WM8962_CLOCKING2, WM8962_SYSCLK_ENA, 0); | 3869 | snd_soc_update_bits(codec, WM8962_CLOCKING2, WM8962_SYSCLK_ENA, 0); |
3870 | 3870 | ||
3871 | /* Ensure we have soft control over all registers */ | ||
3872 | snd_soc_update_bits(codec, WM8962_CLOCKING2, | ||
3873 | WM8962_CLKREG_OVD, WM8962_CLKREG_OVD); | ||
3874 | |||
3871 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); | 3875 | regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); |
3872 | 3876 | ||
3873 | if (pdata) { | 3877 | if (pdata) { |
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index ab8e9d1aaff..0cdb9d10567 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
@@ -420,7 +420,7 @@ static const char *sidetone_hpf_text[] = { | |||
420 | }; | 420 | }; |
421 | 421 | ||
422 | static const struct soc_enum sidetone_hpf = | 422 | static const struct soc_enum sidetone_hpf = |
423 | SOC_ENUM_SINGLE(WM8996_SIDETONE, 7, 6, sidetone_hpf_text); | 423 | SOC_ENUM_SINGLE(WM8996_SIDETONE, 7, 7, sidetone_hpf_text); |
424 | 424 | ||
425 | static const char *hpf_mode_text[] = { | 425 | static const char *hpf_mode_text[] = { |
426 | "HiFi", "Custom", "Voice" | 426 | "HiFi", "Custom", "Voice" |
@@ -988,15 +988,10 @@ SND_SOC_DAPM_MICBIAS("MICB1", WM8996_POWER_MANAGEMENT_1, 8, 0), | |||
988 | SND_SOC_DAPM_PGA("IN1L PGA", WM8996_POWER_MANAGEMENT_2, 5, 0, NULL, 0), | 988 | SND_SOC_DAPM_PGA("IN1L PGA", WM8996_POWER_MANAGEMENT_2, 5, 0, NULL, 0), |
989 | SND_SOC_DAPM_PGA("IN1R PGA", WM8996_POWER_MANAGEMENT_2, 4, 0, NULL, 0), | 989 | SND_SOC_DAPM_PGA("IN1R PGA", WM8996_POWER_MANAGEMENT_2, 4, 0, NULL, 0), |
990 | 990 | ||
991 | SND_SOC_DAPM_MUX("IN1L Mux", SND_SOC_NOPM, 0, 0, &in1_mux), | 991 | SND_SOC_DAPM_MUX("IN1L Mux", WM8996_POWER_MANAGEMENT_7, 2, 0, &in1_mux), |
992 | SND_SOC_DAPM_MUX("IN1R Mux", SND_SOC_NOPM, 0, 0, &in1_mux), | 992 | SND_SOC_DAPM_MUX("IN1R Mux", WM8996_POWER_MANAGEMENT_7, 3, 0, &in1_mux), |
993 | SND_SOC_DAPM_MUX("IN2L Mux", SND_SOC_NOPM, 0, 0, &in2_mux), | 993 | SND_SOC_DAPM_MUX("IN2L Mux", WM8996_POWER_MANAGEMENT_7, 6, 0, &in2_mux), |
994 | SND_SOC_DAPM_MUX("IN2R Mux", SND_SOC_NOPM, 0, 0, &in2_mux), | 994 | SND_SOC_DAPM_MUX("IN2R Mux", WM8996_POWER_MANAGEMENT_7, 7, 0, &in2_mux), |
995 | |||
996 | SND_SOC_DAPM_PGA("IN1L", WM8996_POWER_MANAGEMENT_7, 2, 0, NULL, 0), | ||
997 | SND_SOC_DAPM_PGA("IN1R", WM8996_POWER_MANAGEMENT_7, 3, 0, NULL, 0), | ||
998 | SND_SOC_DAPM_PGA("IN2L", WM8996_POWER_MANAGEMENT_7, 6, 0, NULL, 0), | ||
999 | SND_SOC_DAPM_PGA("IN2R", WM8996_POWER_MANAGEMENT_7, 7, 0, NULL, 0), | ||
1000 | 995 | ||
1001 | SND_SOC_DAPM_SUPPLY("DMIC2", WM8996_POWER_MANAGEMENT_7, 9, 0, NULL, 0), | 996 | SND_SOC_DAPM_SUPPLY("DMIC2", WM8996_POWER_MANAGEMENT_7, 9, 0, NULL, 0), |
1002 | SND_SOC_DAPM_SUPPLY("DMIC1", WM8996_POWER_MANAGEMENT_7, 8, 0, NULL, 0), | 997 | SND_SOC_DAPM_SUPPLY("DMIC1", WM8996_POWER_MANAGEMENT_7, 8, 0, NULL, 0), |
@@ -1213,6 +1208,16 @@ static const struct snd_soc_dapm_route wm8996_dapm_routes[] = { | |||
1213 | { "AIF2RX0", NULL, "AIFCLK" }, | 1208 | { "AIF2RX0", NULL, "AIFCLK" }, |
1214 | { "AIF2RX1", NULL, "AIFCLK" }, | 1209 | { "AIF2RX1", NULL, "AIFCLK" }, |
1215 | 1210 | ||
1211 | { "AIF1TX0", NULL, "AIFCLK" }, | ||
1212 | { "AIF1TX1", NULL, "AIFCLK" }, | ||
1213 | { "AIF1TX2", NULL, "AIFCLK" }, | ||
1214 | { "AIF1TX3", NULL, "AIFCLK" }, | ||
1215 | { "AIF1TX4", NULL, "AIFCLK" }, | ||
1216 | { "AIF1TX5", NULL, "AIFCLK" }, | ||
1217 | |||
1218 | { "AIF2TX0", NULL, "AIFCLK" }, | ||
1219 | { "AIF2TX1", NULL, "AIFCLK" }, | ||
1220 | |||
1216 | { "DSP1RXL", NULL, "SYSDSPCLK" }, | 1221 | { "DSP1RXL", NULL, "SYSDSPCLK" }, |
1217 | { "DSP1RXR", NULL, "SYSDSPCLK" }, | 1222 | { "DSP1RXR", NULL, "SYSDSPCLK" }, |
1218 | { "DSP2RXL", NULL, "SYSDSPCLK" }, | 1223 | { "DSP2RXL", NULL, "SYSDSPCLK" }, |
@@ -2106,6 +2111,9 @@ static int wm8996_set_fll(struct snd_soc_codec *codec, int fll_id, int source, | |||
2106 | 2111 | ||
2107 | snd_soc_write(codec, WM8996_FLL_EFS_1, fll_div.lambda); | 2112 | snd_soc_write(codec, WM8996_FLL_EFS_1, fll_div.lambda); |
2108 | 2113 | ||
2114 | /* Clear any pending completions (eg, from failed startups) */ | ||
2115 | try_wait_for_completion(&wm8996->fll_lock); | ||
2116 | |||
2109 | snd_soc_update_bits(codec, WM8996_FLL_CONTROL_1, | 2117 | snd_soc_update_bits(codec, WM8996_FLL_CONTROL_1, |
2110 | WM8996_FLL_ENA, WM8996_FLL_ENA); | 2118 | WM8996_FLL_ENA, WM8996_FLL_ENA); |
2111 | 2119 | ||
diff --git a/sound/soc/ep93xx/ep93xx-i2s.c b/sound/soc/ep93xx/ep93xx-i2s.c index 56efa0c1c9a..099614e1665 100644 --- a/sound/soc/ep93xx/ep93xx-i2s.c +++ b/sound/soc/ep93xx/ep93xx-i2s.c | |||
@@ -385,14 +385,14 @@ static int ep93xx_i2s_probe(struct platform_device *pdev) | |||
385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
386 | if (!res) { | 386 | if (!res) { |
387 | err = -ENODEV; | 387 | err = -ENODEV; |
388 | goto fail; | 388 | goto fail_free_info; |
389 | } | 389 | } |
390 | 390 | ||
391 | info->mem = request_mem_region(res->start, resource_size(res), | 391 | info->mem = request_mem_region(res->start, resource_size(res), |
392 | pdev->name); | 392 | pdev->name); |
393 | if (!info->mem) { | 393 | if (!info->mem) { |
394 | err = -EBUSY; | 394 | err = -EBUSY; |
395 | goto fail; | 395 | goto fail_free_info; |
396 | } | 396 | } |
397 | 397 | ||
398 | info->regs = ioremap(info->mem->start, resource_size(info->mem)); | 398 | info->regs = ioremap(info->mem->start, resource_size(info->mem)); |
@@ -435,6 +435,7 @@ fail_unmap_mem: | |||
435 | iounmap(info->regs); | 435 | iounmap(info->regs); |
436 | fail_release_mem: | 436 | fail_release_mem: |
437 | release_mem_region(info->mem->start, resource_size(info->mem)); | 437 | release_mem_region(info->mem->start, resource_size(info->mem)); |
438 | fail_free_info: | ||
438 | kfree(info); | 439 | kfree(info); |
439 | fail: | 440 | fail: |
440 | return err; | 441 | return err; |
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 732208c8c0b..cb50598338e 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -879,10 +879,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np) | |||
879 | * assume that device_node pointers are a valid comparison. | 879 | * assume that device_node pointers are a valid comparison. |
880 | */ | 880 | */ |
881 | np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); | 881 | np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0); |
882 | of_node_put(np); | ||
882 | if (np == dma_channel_np) | 883 | if (np == dma_channel_np) |
883 | return ssi_np; | 884 | return ssi_np; |
884 | 885 | ||
885 | np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); | 886 | np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0); |
887 | of_node_put(np); | ||
886 | if (np == dma_channel_np) | 888 | if (np == dma_channel_np) |
887 | return ssi_np; | 889 | return ssi_np; |
888 | } | 890 | } |
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index a1929795958..358f0baaf71 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -345,8 +345,10 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
345 | } | 345 | } |
346 | 346 | ||
347 | machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL); | 347 | machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL); |
348 | if (!machine_data) | 348 | if (!machine_data) { |
349 | return -ENOMEM; | 349 | ret = -ENOMEM; |
350 | goto error_alloc; | ||
351 | } | ||
350 | 352 | ||
351 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); | 353 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); |
352 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; | 354 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; |
@@ -494,7 +496,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
494 | ret = platform_device_add(sound_device); | 496 | ret = platform_device_add(sound_device); |
495 | if (ret) { | 497 | if (ret) { |
496 | dev_err(&pdev->dev, "platform device add failed\n"); | 498 | dev_err(&pdev->dev, "platform device add failed\n"); |
497 | goto error; | 499 | goto error_sound; |
498 | } | 500 | } |
499 | dev_set_drvdata(&pdev->dev, sound_device); | 501 | dev_set_drvdata(&pdev->dev, sound_device); |
500 | 502 | ||
@@ -502,14 +504,12 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
502 | 504 | ||
503 | return 0; | 505 | return 0; |
504 | 506 | ||
507 | error_sound: | ||
508 | platform_device_unregister(sound_device); | ||
505 | error: | 509 | error: |
506 | of_node_put(codec_np); | ||
507 | |||
508 | if (sound_device) | ||
509 | platform_device_unregister(sound_device); | ||
510 | |||
511 | kfree(machine_data); | 510 | kfree(machine_data); |
512 | 511 | error_alloc: | |
512 | of_node_put(codec_np); | ||
513 | return ret; | 513 | return ret; |
514 | } | 514 | } |
515 | 515 | ||
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 8fa4d5f8eda..fcb862eb0c7 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c | |||
@@ -297,8 +297,10 @@ static int get_dma_channel(struct device_node *ssi_np, | |||
297 | * dai->platform name should already point to an allocated buffer. | 297 | * dai->platform name should already point to an allocated buffer. |
298 | */ | 298 | */ |
299 | ret = of_address_to_resource(dma_channel_np, 0, &res); | 299 | ret = of_address_to_resource(dma_channel_np, 0, &res); |
300 | if (ret) | 300 | if (ret) { |
301 | of_node_put(dma_channel_np); | ||
301 | return ret; | 302 | return ret; |
303 | } | ||
302 | snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", | 304 | snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", |
303 | (unsigned long long) res.start, dma_channel_np->name); | 305 | (unsigned long long) res.start, dma_channel_np->name); |
304 | 306 | ||
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index a33fc51f363..8f16cd37c2a 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -424,7 +424,7 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev) | |||
424 | if (!priv->mem) { | 424 | if (!priv->mem) { |
425 | dev_err(&pdev->dev, "request_mem_region failed\n"); | 425 | dev_err(&pdev->dev, "request_mem_region failed\n"); |
426 | err = -EBUSY; | 426 | err = -EBUSY; |
427 | goto error; | 427 | goto error_alloc; |
428 | } | 428 | } |
429 | 429 | ||
430 | priv->io = ioremap(priv->mem->start, SZ_16K); | 430 | priv->io = ioremap(priv->mem->start, SZ_16K); |
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index 30fe0d0efe1..0aa475f92ef 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c | |||
@@ -514,7 +514,7 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) | |||
514 | } | 514 | } |
515 | 515 | ||
516 | /* Set codec bias level */ | 516 | /* Set codec bias level */ |
517 | ams_delta_set_bias_level(card, SND_SOC_BIAS_STANDBY); | 517 | ams_delta_set_bias_level(card, dapm, SND_SOC_BIAS_STANDBY); |
518 | 518 | ||
519 | /* Add hook switch - can be used to control the codec from userspace | 519 | /* Add hook switch - can be used to control the codec from userspace |
520 | * even if line discipline fails */ | 520 | * even if line discipline fails */ |
@@ -649,7 +649,9 @@ static void __exit ams_delta_module_exit(void) | |||
649 | ams_delta_hook_switch_gpios); | 649 | ams_delta_hook_switch_gpios); |
650 | 650 | ||
651 | /* Keep modem power on */ | 651 | /* Keep modem power on */ |
652 | ams_delta_set_bias_level(&ams_delta_audio_card, SND_SOC_BIAS_STANDBY); | 652 | ams_delta_set_bias_level(&ams_delta_audio_card, |
653 | &ams_delta_audio_card.rtd[0].codec->dapm, | ||
654 | SND_SOC_BIAS_STANDBY); | ||
653 | 655 | ||
654 | platform_device_unregister(cx20442_platform_device); | 656 | platform_device_unregister(cx20442_platform_device); |
655 | platform_device_unregister(ams_delta_audio_platform_device); | 657 | platform_device_unregister(ams_delta_audio_platform_device); |
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index b99091fc34e..65f980ef287 100644 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig | |||
@@ -185,6 +185,7 @@ config SND_SOC_SPEYSIDE | |||
185 | select SND_SAMSUNG_I2S | 185 | select SND_SAMSUNG_I2S |
186 | select SND_SOC_WM8996 | 186 | select SND_SOC_WM8996 |
187 | select SND_SOC_WM9081 | 187 | select SND_SOC_WM9081 |
188 | select SND_SOC_WM1250_EV1 | ||
188 | 189 | ||
189 | config SND_SOC_SPEYSIDE_WM8962 | 190 | config SND_SOC_SPEYSIDE_WM8962 |
190 | tristate "Audio support for Wolfson Speyside with WM8962" | 191 | tristate "Audio support for Wolfson Speyside with WM8962" |
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 241f55d0066..c6c65892294 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/types.h> | ||
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
17 | 18 | ||
18 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 1e574a5d440..bc8c1676459 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/types.h> | ||
20 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
21 | 22 | ||
22 | #include <sound/soc.h> | 23 | #include <sound/soc.h> |
diff --git a/sound/soc/samsung/speyside_wm8962.c b/sound/soc/samsung/speyside_wm8962.c index 0b9eb5f7ec4..72535f2daaf 100644 --- a/sound/soc/samsung/speyside_wm8962.c +++ b/sound/soc/samsung/speyside_wm8962.c | |||
@@ -23,6 +23,9 @@ static int speyside_wm8962_set_bias_level(struct snd_soc_card *card, | |||
23 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | 23 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; |
24 | int ret; | 24 | int ret; |
25 | 25 | ||
26 | if (dapm->dev != codec_dai->dev) | ||
27 | return 0; | ||
28 | |||
26 | switch (level) { | 29 | switch (level) { |
27 | case SND_SOC_BIAS_PREPARE: | 30 | case SND_SOC_BIAS_PREPARE: |
28 | if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { | 31 | if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { |
@@ -57,6 +60,9 @@ static int speyside_wm8962_set_bias_level_post(struct snd_soc_card *card, | |||
57 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; | 60 | struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; |
58 | int ret; | 61 | int ret; |
59 | 62 | ||
63 | if (dapm->dev != codec_dai->dev) | ||
64 | return 0; | ||
65 | |||
60 | switch (level) { | 66 | switch (level) { |
61 | case SND_SOC_BIAS_STANDBY: | 67 | case SND_SOC_BIAS_STANDBY: |
62 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK, | 68 | ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK, |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 83ad8ca2749..b085d8e8757 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1913,7 +1913,7 @@ struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | |||
1913 | 1913 | ||
1914 | if (prefix) { | 1914 | if (prefix) { |
1915 | name_len = strlen(long_name) + strlen(prefix) + 2; | 1915 | name_len = strlen(long_name) + strlen(prefix) + 2; |
1916 | name = kmalloc(name_len, GFP_ATOMIC); | 1916 | name = kmalloc(name_len, GFP_KERNEL); |
1917 | if (!name) | 1917 | if (!name) |
1918 | return NULL; | 1918 | return NULL; |
1919 | 1919 | ||
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index cca490c8058..a62f7dd4ba9 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -205,6 +205,25 @@ static unsigned int snd_soc_16_8_read_i2c(struct snd_soc_codec *codec, | |||
205 | #define snd_soc_16_8_read_i2c NULL | 205 | #define snd_soc_16_8_read_i2c NULL |
206 | #endif | 206 | #endif |
207 | 207 | ||
208 | #if defined(CONFIG_SPI_MASTER) | ||
209 | static unsigned int snd_soc_16_8_read_spi(struct snd_soc_codec *codec, | ||
210 | unsigned int r) | ||
211 | { | ||
212 | struct spi_device *spi = codec->control_data; | ||
213 | |||
214 | const u16 reg = cpu_to_be16(r | 0x100); | ||
215 | u8 data; | ||
216 | int ret; | ||
217 | |||
218 | ret = spi_write_then_read(spi, ®, 2, &data, 1); | ||
219 | if (ret < 0) | ||
220 | return 0; | ||
221 | return data; | ||
222 | } | ||
223 | #else | ||
224 | #define snd_soc_16_8_read_spi NULL | ||
225 | #endif | ||
226 | |||
208 | static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, | 227 | static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, |
209 | unsigned int value) | 228 | unsigned int value) |
210 | { | 229 | { |
@@ -295,6 +314,7 @@ static struct { | |||
295 | int (*write)(struct snd_soc_codec *codec, unsigned int, unsigned int); | 314 | int (*write)(struct snd_soc_codec *codec, unsigned int, unsigned int); |
296 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); | 315 | unsigned int (*read)(struct snd_soc_codec *, unsigned int); |
297 | unsigned int (*i2c_read)(struct snd_soc_codec *, unsigned int); | 316 | unsigned int (*i2c_read)(struct snd_soc_codec *, unsigned int); |
317 | unsigned int (*spi_read)(struct snd_soc_codec *, unsigned int); | ||
298 | } io_types[] = { | 318 | } io_types[] = { |
299 | { | 319 | { |
300 | .addr_bits = 4, .data_bits = 12, | 320 | .addr_bits = 4, .data_bits = 12, |
@@ -318,6 +338,7 @@ static struct { | |||
318 | .addr_bits = 16, .data_bits = 8, | 338 | .addr_bits = 16, .data_bits = 8, |
319 | .write = snd_soc_16_8_write, | 339 | .write = snd_soc_16_8_write, |
320 | .i2c_read = snd_soc_16_8_read_i2c, | 340 | .i2c_read = snd_soc_16_8_read_i2c, |
341 | .spi_read = snd_soc_16_8_read_spi, | ||
321 | }, | 342 | }, |
322 | { | 343 | { |
323 | .addr_bits = 16, .data_bits = 16, | 344 | .addr_bits = 16, .data_bits = 16, |
@@ -383,6 +404,8 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
383 | #ifdef CONFIG_SPI_MASTER | 404 | #ifdef CONFIG_SPI_MASTER |
384 | codec->hw_write = do_spi_write; | 405 | codec->hw_write = do_spi_write; |
385 | #endif | 406 | #endif |
407 | if (io_types[i].spi_read) | ||
408 | codec->hw_read = io_types[i].spi_read; | ||
386 | 409 | ||
387 | codec->control_data = container_of(codec->dev, | 410 | codec->control_data = container_of(codec->dev, |
388 | struct spi_device, | 411 | struct spi_device, |
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 7c17b98d584..38b00131b2f 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -327,7 +327,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | |||
327 | IRQF_TRIGGER_FALLING, | 327 | IRQF_TRIGGER_FALLING, |
328 | gpios[i].name, | 328 | gpios[i].name, |
329 | &gpios[i]); | 329 | &gpios[i]); |
330 | if (ret) | 330 | if (ret < 0) |
331 | goto err; | 331 | goto err; |
332 | 332 | ||
333 | if (gpios[i].wake) { | 333 | if (gpios[i].wake) { |
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b5759397afa..2879c883eeb 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -290,6 +290,9 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) | |||
290 | codec_dai->active--; | 290 | codec_dai->active--; |
291 | codec->active--; | 291 | codec->active--; |
292 | 292 | ||
293 | if (!cpu_dai->active && !codec_dai->active) | ||
294 | rtd->rate = 0; | ||
295 | |||
293 | /* Muting the DAC suppresses artifacts caused during digital | 296 | /* Muting the DAC suppresses artifacts caused during digital |
294 | * shutdown, for example from stopping clocks. | 297 | * shutdown, for example from stopping clocks. |
295 | */ | 298 | */ |
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 661373c2352..be27f1d229a 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c | |||
@@ -319,7 +319,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd) | |||
319 | snd_soc_dapm_force_enable_pin(dapm, "Mic Bias"); | 319 | snd_soc_dapm_force_enable_pin(dapm, "Mic Bias"); |
320 | 320 | ||
321 | /* FIXME: Calculate automatically based on DAPM routes? */ | 321 | /* FIXME: Calculate automatically based on DAPM routes? */ |
322 | if (!machine_is_harmony() && !machine_is_ventana()) | 322 | if (!machine_is_harmony()) |
323 | snd_soc_dapm_nc_pin(dapm, "IN1L"); | 323 | snd_soc_dapm_nc_pin(dapm, "IN1L"); |
324 | if (!machine_is_seaboard() && !machine_is_aebl()) | 324 | if (!machine_is_seaboard() && !machine_is_aebl()) |
325 | snd_soc_dapm_nc_pin(dapm, "IN1R"); | 325 | snd_soc_dapm_nc_pin(dapm, "IN1R"); |
@@ -395,7 +395,7 @@ static __devinit int tegra_wm8903_driver_probe(struct platform_device *pdev) | |||
395 | platform_set_drvdata(pdev, card); | 395 | platform_set_drvdata(pdev, card); |
396 | snd_soc_card_set_drvdata(card, machine); | 396 | snd_soc_card_set_drvdata(card, machine); |
397 | 397 | ||
398 | if (machine_is_harmony() || machine_is_ventana()) { | 398 | if (machine_is_harmony()) { |
399 | card->dapm_routes = harmony_audio_map; | 399 | card->dapm_routes = harmony_audio_map; |
400 | card->num_dapm_routes = ARRAY_SIZE(harmony_audio_map); | 400 | card->num_dapm_routes = ARRAY_SIZE(harmony_audio_map); |
401 | } else if (machine_is_seaboard()) { | 401 | } else if (machine_is_seaboard()) { |
diff --git a/tools/perf/arch/arm/util/dwarf-regs.c b/tools/perf/arch/arm/util/dwarf-regs.c index fff6450c8c9..e8d5c551c69 100644 --- a/tools/perf/arch/arm/util/dwarf-regs.c +++ b/tools/perf/arch/arm/util/dwarf-regs.c | |||
@@ -8,7 +8,10 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdlib.h> | ||
12 | #ifndef __UCLIBC__ | ||
11 | #include <libio.h> | 13 | #include <libio.h> |
14 | #endif | ||
12 | #include <dwarf-regs.h> | 15 | #include <dwarf-regs.h> |
13 | 16 | ||
14 | struct pt_regs_dwarfnum { | 17 | struct pt_regs_dwarfnum { |