diff options
121 files changed, 680 insertions, 275 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 4ce5450ab6e8..6066e3a6b9a9 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 d94292065359..d513433d1659 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/ |
| @@ -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 b9c28f3f1956..6acea1f96de3 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/kernel/calls.S b/arch/arm/kernel/calls.S index 80f7896cc016..9943e9e74a1b 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/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 9e0856b2f9e9..523f608eb8cf 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 d41c01f83f15..0ea71f8d4b89 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
| @@ -1588,6 +1588,7 @@ static void __init mackerel_init(void) | |||
| 1588 | hdmi_init_pm_clock(); | 1588 | hdmi_init_pm_clock(); |
| 1589 | sh7372_pm_init(); | 1589 | sh7372_pm_init(); |
| 1590 | pm_clk_add(&fsi_device.dev, "spu2"); | 1590 | pm_clk_add(&fsi_device.dev, "spu2"); |
| 1591 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | ||
| 1591 | } | 1592 | } |
| 1592 | 1593 | ||
| 1593 | static void __init mackerel_timer_init(void) | 1594 | 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 6b1619a65dba..e6e11e4e2d43 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
| @@ -655,6 +655,8 @@ static struct clk_lookup lookups[] = { | |||
| 655 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ | 655 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ |
| 656 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 656 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
| 657 | 657 | ||
| 658 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | ||
| 659 | &div6_reparent_clks[DIV6_HDMI]), | ||
| 658 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 660 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
| 659 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 661 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
| 660 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 662 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b409744954..9a6a53854911 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/avr32/kernel/syscall_table.S b/arch/avr32/kernel/syscall_table.S index c7fd394d28a4..6eba53530d1c 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 225d311c9701..e4137297b790 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 1161883eb582..592fbe9dfb62 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 84fed7e91ada..c3ea4694fbaf 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 017d6d7b784f..5ba23f715ea5 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 f4b2e67bcc34..4be2ea2fbe26 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 97dd2abdeb1a..198c753d1006 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 528f2e6ad064..f365c19795ef 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 00d1452f9571..c468f2edaa85 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 d915a122c865..8789daa2a346 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 e521420a45a5..865bc7a6f5a1 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 85874d6a8a70..fb7334bea731 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 b85842fc87ae..f9296e894e46 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 46c4763edf21..4d7c9827706f 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 ae435e1d5669..3e3620d9fc45 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/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 08ab9aa6a0d5..7526db6bf501 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 068f8465c4ee..f297456dba7a 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 04361d5a4279..48c710206366 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 6ee39ef8fe4a..73eb08c874fb 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 39b051de4c7c..293e39c59c00 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 089c4d825d08..ceb34b94afa9 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/sys32.S b/arch/sparc/kernel/sys32.S index 44e5faf1ad5f..d97f3eb72e06 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 6e492d59f6b1..09d8ec454450 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 f566518483b5..c9296ab0b1f4 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
| @@ -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 a0e866d233ee..54edb207ff3a 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 d92641cc7acc..201040573444 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 fbb0a045a1a2..bc19be332bc9 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 7000e74b3087..58425adc22c6 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 a6f934f37f1a..798ee6d285a1 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 cf7a0c788052..65cd74832450 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 33e1bed68fdd..a4760e095ff5 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 0cad9c7f6bb5..99a5272d7c2f 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 a846b2f95cfb..2c18d584066d 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/firewire/sbp2.c b/drivers/firewire/sbp2.c index 41841a3e3f99..17cef864506a 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 68810fd1a59d..aa83de9db1b9 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/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ee1d701317f7..56a8554d9039 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/misc/Kconfig b/drivers/misc/Kconfig index 0a4d86c6c4a4..2d6423c2d193 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 54c91ffe4a91..ba168a7d54d4 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 38fd2f04c07e..3a3580566dfc 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 3f2495138855..1ff460a8e9c7 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/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index eb4e034378cd..f1a2016829fc 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 be55fb2b1b1c..837e010299a8 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 34253cf37812..4a70180eba5d 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 bbf21897ae0e..823b5e4672e2 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 9c0d2936e486..c3d73f8431ae 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 970825421884..d0e2d514968a 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 589a0554332e..3d1279c424a8 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 975e34bcd722..1ca66ea9b281 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 855a5bb56a47..a3f5162bfedc 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 98b6e3bdb000..e809e9d4683c 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 f2dfec82faf8..7f50999eebc2 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 6b887d90a205..3abeca2a2a1b 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 fc301f6722e1..a2f236510ff1 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 af9b7814965a..b922f5d2e61e 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 a1fe304f2f52..d73aadd7a9ad 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 750b4f627315..a8164601c0ea 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 a764bf99743b..23bc743f2a22 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 c37df8d0fa28..5e713d3ef1f4 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 846dfcd3ce0d..b46218d679e2 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 afc629423152..6edafb5ace18 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 db7912cb7ae0..a3efbea5dbba 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 161e70010709..5ea6ec3442e6 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 c327218cad44..9af9f0879a24 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 150e4f747c7d..4f1fc81112e6 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 8669ba3fe794..73cbbd85219f 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 8f8d3f6cd89e..8f3eab1af885 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 e051b30c1847..4c32cb19b405 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 b3958b3d3163..9e77f1c8bdbd 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 0be788cc2fdb..1e96d1f1fe6b 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 7113d16e2d3a..54139a2f06ce 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 1c4432d8fc10..3a0f695138f4 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 ae8c39617743..5e7cfba5b079 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 149f3f310a0a..318fb4e8a885 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 668eeef601ae..b3c065ab9dbc 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 8c41a2e6ea77..e81820370d6f 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 82410703dcd3..03f2655af290 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 9eec41fbf3a4..ec1480191f78 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 07c8a73dfe41..b67b4bc596c1 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 cecace411832..ef4333f4bbe0 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 78a2cf9551cc..5fc13e717911 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 815656198914..fe22e90bc879 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 0b48d018e38a..58b1da459893 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 4f76959397fa..f4c38d8c6674 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 8779405e15a8..c6e7523bf765 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 8c03b98df5f9..1ff0ec2a5e8d 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 b004e557caa9..2ef4385da6bf 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 44bc0c5617e1..5f2ede82b3d6 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 9deeac855240..ecdaeb98b293 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/kernel/sys_ni.c b/kernel/sys_ni.c index 62cbc8877fef..a9a5de07c4f1 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/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 502fc9499453..7696d05b9356 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 fcb11af9ad24..7cabd7317163 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 d6651c033cb7..a118a0fb9d81 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 2374ca5ffe68..eedb6f5e5823 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 9747b5497877..cccc2e8e5fbd 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 409d89d1f34c..fbd7eb9e61ce 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 60d740ebeb5b..1725550c293e 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 ab8e9d1aaff0..0cdb9d105671 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 56efa0c1c9a9..099614e16651 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 732208c8c0b4..cb50598338e9 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 a19297959587..358f0baaf71b 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 8fa4d5f8eda1..fcb862eb0c73 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 a33fc51f363b..8f16cd37c2af 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 30fe0d0efe1c..0aa475f92efa 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 b99091fc34eb..65f980ef2870 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 241f55d00660..c6c65892294e 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 1e574a5d440d..bc8c1676459f 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 0b9eb5f7ec4c..72535f2daaf2 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 83ad8ca27490..b085d8e87574 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 cca490c80589..a62f7dd4ba96 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 7c17b98d5846..38b00131b2fe 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 b5759397afa3..2879c883eebc 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 661373c2352a..be27f1d229af 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()) { |
