diff options
172 files changed, 1368 insertions, 1098 deletions
diff --git a/Documentation/filesystems/ocfs2.txt b/Documentation/filesystems/ocfs2.txt index c2a0871280a0..c58b9f5ba002 100644 --- a/Documentation/filesystems/ocfs2.txt +++ b/Documentation/filesystems/ocfs2.txt | |||
@@ -20,15 +20,16 @@ Lots of code taken from ext3 and other projects. | |||
20 | Authors in alphabetical order: | 20 | Authors in alphabetical order: |
21 | Joel Becker <joel.becker@oracle.com> | 21 | Joel Becker <joel.becker@oracle.com> |
22 | Zach Brown <zach.brown@oracle.com> | 22 | Zach Brown <zach.brown@oracle.com> |
23 | Mark Fasheh <mark.fasheh@oracle.com> | 23 | Mark Fasheh <mfasheh@suse.com> |
24 | Kurt Hackel <kurt.hackel@oracle.com> | 24 | Kurt Hackel <kurt.hackel@oracle.com> |
25 | Tao Ma <tao.ma@oracle.com> | ||
25 | Sunil Mushran <sunil.mushran@oracle.com> | 26 | Sunil Mushran <sunil.mushran@oracle.com> |
26 | Manish Singh <manish.singh@oracle.com> | 27 | Manish Singh <manish.singh@oracle.com> |
28 | Tiger Yang <tiger.yang@oracle.com> | ||
27 | 29 | ||
28 | Caveats | 30 | Caveats |
29 | ======= | 31 | ======= |
30 | Features which OCFS2 does not support yet: | 32 | Features which OCFS2 does not support yet: |
31 | - quotas | ||
32 | - Directory change notification (F_NOTIFY) | 33 | - Directory change notification (F_NOTIFY) |
33 | - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) | 34 | - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease) |
34 | 35 | ||
@@ -70,7 +71,6 @@ commit=nrsec (*) Ocfs2 can be told to sync all its data and metadata | |||
70 | performance. | 71 | performance. |
71 | localalloc=8(*) Allows custom localalloc size in MB. If the value is too | 72 | localalloc=8(*) Allows custom localalloc size in MB. If the value is too |
72 | large, the fs will silently revert it to the default. | 73 | large, the fs will silently revert it to the default. |
73 | Localalloc is not enabled for local mounts. | ||
74 | localflocks This disables cluster aware flock. | 74 | localflocks This disables cluster aware flock. |
75 | inode64 Indicates that Ocfs2 is allowed to create inodes at | 75 | inode64 Indicates that Ocfs2 is allowed to create inodes at |
76 | any location in the filesystem, including those which | 76 | any location in the filesystem, including those which |
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c index 3ec4f2a22585..4793c6aac733 100644 --- a/Documentation/vm/page-types.c +++ b/Documentation/vm/page-types.c | |||
@@ -218,7 +218,7 @@ static void fatal(const char *x, ...) | |||
218 | exit(EXIT_FAILURE); | 218 | exit(EXIT_FAILURE); |
219 | } | 219 | } |
220 | 220 | ||
221 | int checked_open(const char *pathname, int flags) | 221 | static int checked_open(const char *pathname, int flags) |
222 | { | 222 | { |
223 | int fd = open(pathname, flags); | 223 | int fd = open(pathname, flags); |
224 | 224 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 81d68d5b7eea..c824b4d62754 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -3084,9 +3084,13 @@ F: kernel/kgdb.c | |||
3084 | 3084 | ||
3085 | KMEMCHECK | 3085 | KMEMCHECK |
3086 | M: Vegard Nossum <vegardno@ifi.uio.no> | 3086 | M: Vegard Nossum <vegardno@ifi.uio.no> |
3087 | P Pekka Enberg | 3087 | M: Pekka Enberg <penberg@cs.helsinki.fi> |
3088 | M: penberg@cs.helsinki.fi | ||
3089 | S: Maintained | 3088 | S: Maintained |
3089 | F: Documentation/kmemcheck.txt | ||
3090 | F: arch/x86/include/asm/kmemcheck.h | ||
3091 | F: arch/x86/mm/kmemcheck/ | ||
3092 | F: include/linux/kmemcheck.h | ||
3093 | F: mm/kmemcheck.c | ||
3090 | 3094 | ||
3091 | KMEMLEAK | 3095 | KMEMLEAK |
3092 | M: Catalin Marinas <catalin.marinas@arm.com> | 3096 | M: Catalin Marinas <catalin.marinas@arm.com> |
@@ -4328,6 +4332,8 @@ F: drivers/video/aty/aty128fb.c | |||
4328 | 4332 | ||
4329 | RALINK RT2X00 WIRELESS LAN DRIVER | 4333 | RALINK RT2X00 WIRELESS LAN DRIVER |
4330 | P: rt2x00 project | 4334 | P: rt2x00 project |
4335 | M: Ivo van Doorn <IvDoorn@gmail.com> | ||
4336 | M: Gertjan van Wingerde <gwingerde@gmail.com> | ||
4331 | L: linux-wireless@vger.kernel.org | 4337 | L: linux-wireless@vger.kernel.org |
4332 | L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) | 4338 | L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) |
4333 | W: http://rt2x00.serialmonkey.com/ | 4339 | W: http://rt2x00.serialmonkey.com/ |
@@ -4415,7 +4421,7 @@ RFKILL | |||
4415 | M: Johannes Berg <johannes@sipsolutions.net> | 4421 | M: Johannes Berg <johannes@sipsolutions.net> |
4416 | L: linux-wireless@vger.kernel.org | 4422 | L: linux-wireless@vger.kernel.org |
4417 | S: Maintained | 4423 | S: Maintained |
4418 | F Documentation/rfkill.txt | 4424 | F: Documentation/rfkill.txt |
4419 | F: net/rfkill/ | 4425 | F: net/rfkill/ |
4420 | 4426 | ||
4421 | RISCOM8 DRIVER | 4427 | RISCOM8 DRIVER |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 32 | 3 | SUBLEVEL = 32 |
4 | EXTRAVERSION = -rc7 | 4 | EXTRAVERSION = -rc8 |
5 | NAME = Man-Eating Seals of Antiquity | 5 | NAME = Man-Eating Seals of Antiquity |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -221,7 +221,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | |||
221 | 221 | ||
222 | HOSTCC = gcc | 222 | HOSTCC = gcc |
223 | HOSTCXX = g++ | 223 | HOSTCXX = g++ |
224 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | 224 | HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer |
225 | HOSTCXXFLAGS = -O2 | 225 | HOSTCXXFLAGS = -O2 |
226 | 226 | ||
227 | # Decide whether to build built-in, modular, or both. | 227 | # Decide whether to build built-in, modular, or both. |
diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c index 9d0727d18aee..367d53d031fc 100644 --- a/arch/alpha/boot/tools/objstrip.c +++ b/arch/alpha/boot/tools/objstrip.c | |||
@@ -35,7 +35,7 @@ | |||
35 | const char * prog_name; | 35 | const char * prog_name; |
36 | 36 | ||
37 | 37 | ||
38 | void | 38 | static void |
39 | usage (void) | 39 | usage (void) |
40 | { | 40 | { |
41 | fprintf(stderr, | 41 | fprintf(stderr, |
diff --git a/arch/alpha/include/asm/fcntl.h b/arch/alpha/include/asm/fcntl.h index 73126e4dd639..25da0017ec87 100644 --- a/arch/alpha/include/asm/fcntl.h +++ b/arch/alpha/include/asm/fcntl.h | |||
@@ -26,8 +26,6 @@ | |||
26 | #define F_GETOWN 6 /* for sockets. */ | 26 | #define F_GETOWN 6 /* for sockets. */ |
27 | #define F_SETSIG 10 /* for sockets. */ | 27 | #define F_SETSIG 10 /* for sockets. */ |
28 | #define F_GETSIG 11 /* for sockets. */ | 28 | #define F_GETSIG 11 /* for sockets. */ |
29 | #define F_SETOWN_EX 15 | ||
30 | #define F_GETOWN_EX 16 | ||
31 | 29 | ||
32 | /* for posix fcntl() and lockf() */ | 30 | /* for posix fcntl() and lockf() */ |
33 | #define F_RDLCK 1 | 31 | #define F_RDLCK 1 |
diff --git a/arch/arm/include/asm/kmap_types.h b/arch/arm/include/asm/kmap_types.h index d16ec97ec9a9..c019949a5189 100644 --- a/arch/arm/include/asm/kmap_types.h +++ b/arch/arm/include/asm/kmap_types.h | |||
@@ -22,4 +22,10 @@ enum km_type { | |||
22 | KM_TYPE_NR | 22 | KM_TYPE_NR |
23 | }; | 23 | }; |
24 | 24 | ||
25 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
26 | #define KM_NMI (-1) | ||
27 | #define KM_NMI_PTE (-1) | ||
28 | #define KM_IRQ_PTE (-1) | ||
29 | #endif | ||
30 | |||
25 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 7177c4aa6342..242dd0775343 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -915,6 +915,14 @@ void __init kirkwood_init(void) | |||
915 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; | 915 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; |
916 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; | 916 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; |
917 | 917 | ||
918 | /* | ||
919 | * Disable propagation of mbus errors to the CPU local bus, | ||
920 | * as this causes mbus errors (which can occur for example | ||
921 | * for PCI aborts) to throw CPU aborts, which we're not set | ||
922 | * up to deal with. | ||
923 | */ | ||
924 | writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); | ||
925 | |||
918 | kirkwood_setup_cpu_mbus(); | 926 | kirkwood_setup_cpu_mbus(); |
919 | 927 | ||
920 | #ifdef CONFIG_CACHE_FEROCEON_L2 | 928 | #ifdef CONFIG_CACHE_FEROCEON_L2 |
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 9e80d9232c83..418f5017c50e 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h | |||
@@ -13,6 +13,9 @@ | |||
13 | 13 | ||
14 | #include <mach/kirkwood.h> | 14 | #include <mach/kirkwood.h> |
15 | 15 | ||
16 | #define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0100) | ||
17 | #define CPU_CONFIG_ERROR_PROP 0x00000004 | ||
18 | |||
16 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) | 19 | #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) |
17 | #define CPU_RESET 0x00000002 | 20 | #define CPU_RESET 0x00000002 |
18 | 21 | ||
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h index bf1189ff9a34..7e8a80f25ddc 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h | |||
@@ -160,7 +160,7 @@ | |||
160 | #define MMC1_WP_MMC1_WP MFP_CFG_DRV(MMC1_WP, AF0, MEDIUM) | 160 | #define MMC1_WP_MMC1_WP MFP_CFG_DRV(MMC1_WP, AF0, MEDIUM) |
161 | 161 | ||
162 | /* PWM */ | 162 | /* PWM */ |
163 | #define GPIO27 PWM3 AF2 MFP_CFG(GPIO27, AF2) | 163 | #define GPIO27_PWM3_AF2 MFP_CFG(GPIO27, AF2) |
164 | #define GPIO51_PWM2_OUT MFP_CFG(GPIO51, AF2) | 164 | #define GPIO51_PWM2_OUT MFP_CFG(GPIO51, AF2) |
165 | #define GPIO117_PWM1_OUT MFP_CFG(GPIO117, AF2) | 165 | #define GPIO117_PWM1_OUT MFP_CFG(GPIO117, AF2) |
166 | #define GPIO118_PWM2_OUT MFP_CFG(GPIO118, AF2) | 166 | #define GPIO118_PWM2_OUT MFP_CFG(GPIO118, AF2) |
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index ea00486a5e53..51e0b3ba5f3a 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
@@ -30,57 +30,56 @@ | |||
30 | /* Zoom2 has Qwerty keyboard*/ | 30 | /* Zoom2 has Qwerty keyboard*/ |
31 | static int board_keymap[] = { | 31 | static int board_keymap[] = { |
32 | KEY(0, 0, KEY_E), | 32 | KEY(0, 0, KEY_E), |
33 | KEY(1, 0, KEY_R), | 33 | KEY(0, 1, KEY_R), |
34 | KEY(2, 0, KEY_T), | 34 | KEY(0, 2, KEY_T), |
35 | KEY(3, 0, KEY_HOME), | 35 | KEY(0, 3, KEY_HOME), |
36 | KEY(6, 0, KEY_I), | 36 | KEY(0, 6, KEY_I), |
37 | KEY(7, 0, KEY_LEFTSHIFT), | 37 | KEY(0, 7, KEY_LEFTSHIFT), |
38 | KEY(0, 1, KEY_D), | 38 | KEY(1, 0, KEY_D), |
39 | KEY(1, 1, KEY_F), | 39 | KEY(1, 1, KEY_F), |
40 | KEY(2, 1, KEY_G), | 40 | KEY(1, 2, KEY_G), |
41 | KEY(3, 1, KEY_SEND), | 41 | KEY(1, 3, KEY_SEND), |
42 | KEY(6, 1, KEY_K), | 42 | KEY(1, 6, KEY_K), |
43 | KEY(7, 1, KEY_ENTER), | 43 | KEY(1, 7, KEY_ENTER), |
44 | KEY(0, 2, KEY_X), | 44 | KEY(2, 0, KEY_X), |
45 | KEY(1, 2, KEY_C), | 45 | KEY(2, 1, KEY_C), |
46 | KEY(2, 2, KEY_V), | 46 | KEY(2, 2, KEY_V), |
47 | KEY(3, 2, KEY_END), | 47 | KEY(2, 3, KEY_END), |
48 | KEY(6, 2, KEY_DOT), | 48 | KEY(2, 6, KEY_DOT), |
49 | KEY(7, 2, KEY_CAPSLOCK), | 49 | KEY(2, 7, KEY_CAPSLOCK), |
50 | KEY(0, 3, KEY_Z), | 50 | KEY(3, 0, KEY_Z), |
51 | KEY(1, 3, KEY_KPPLUS), | 51 | KEY(3, 1, KEY_KPPLUS), |
52 | KEY(2, 3, KEY_B), | 52 | KEY(3, 2, KEY_B), |
53 | KEY(3, 3, KEY_F1), | 53 | KEY(3, 3, KEY_F1), |
54 | KEY(6, 3, KEY_O), | 54 | KEY(3, 6, KEY_O), |
55 | KEY(7, 3, KEY_SPACE), | 55 | KEY(3, 7, KEY_SPACE), |
56 | KEY(0, 4, KEY_W), | 56 | KEY(4, 0, KEY_W), |
57 | KEY(1, 4, KEY_Y), | 57 | KEY(4, 1, KEY_Y), |
58 | KEY(2, 4, KEY_U), | 58 | KEY(4, 2, KEY_U), |
59 | KEY(3, 4, KEY_F2), | 59 | KEY(4, 3, KEY_F2), |
60 | KEY(4, 4, KEY_VOLUMEUP), | 60 | KEY(4, 4, KEY_VOLUMEUP), |
61 | KEY(6, 4, KEY_L), | 61 | KEY(4, 6, KEY_L), |
62 | KEY(7, 4, KEY_LEFT), | 62 | KEY(4, 7, KEY_LEFT), |
63 | KEY(0, 5, KEY_S), | 63 | KEY(5, 0, KEY_S), |
64 | KEY(1, 5, KEY_H), | 64 | KEY(5, 1, KEY_H), |
65 | KEY(2, 5, KEY_J), | 65 | KEY(5, 2, KEY_J), |
66 | KEY(3, 5, KEY_F3), | 66 | KEY(5, 3, KEY_F3), |
67 | KEY(5, 5, KEY_VOLUMEDOWN), | 67 | KEY(5, 5, KEY_VOLUMEDOWN), |
68 | KEY(6, 5, KEY_M), | 68 | KEY(5, 6, KEY_M), |
69 | KEY(4, 5, KEY_ENTER), | 69 | KEY(5, 7, KEY_ENTER), |
70 | KEY(7, 5, KEY_RIGHT), | 70 | KEY(6, 0, KEY_Q), |
71 | KEY(0, 6, KEY_Q), | 71 | KEY(6, 1, KEY_A), |
72 | KEY(1, 6, KEY_A), | 72 | KEY(6, 2, KEY_N), |
73 | KEY(2, 6, KEY_N), | 73 | KEY(6, 3, KEY_BACKSPACE), |
74 | KEY(3, 6, KEY_BACKSPACE), | ||
75 | KEY(6, 6, KEY_P), | 74 | KEY(6, 6, KEY_P), |
76 | KEY(7, 6, KEY_UP), | ||
77 | KEY(6, 7, KEY_SELECT), | 75 | KEY(6, 7, KEY_SELECT), |
78 | KEY(7, 7, KEY_DOWN), | 76 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ |
79 | KEY(0, 7, KEY_PROG1), /*MACRO 1 <User defined> */ | 77 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ |
80 | KEY(1, 7, KEY_PROG2), /*MACRO 2 <User defined> */ | 78 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ |
81 | KEY(2, 7, KEY_PROG3), /*MACRO 3 <User defined> */ | 79 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ |
82 | KEY(3, 7, KEY_PROG4), /*MACRO 4 <User defined> */ | 80 | KEY(7, 5, KEY_RIGHT), |
83 | 0 | 81 | KEY(7, 6, KEY_UP), |
82 | KEY(7, 7, KEY_DOWN) | ||
84 | }; | 83 | }; |
85 | 84 | ||
86 | static struct matrix_keymap_data board_map_data = { | 85 | static struct matrix_keymap_data board_map_data = { |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 489556eecbd1..7c5c00df3c70 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -473,7 +473,7 @@ static u16 _omap3_dpll_compute_freqsel(struct clk *clk, u8 n) | |||
473 | unsigned long fint; | 473 | unsigned long fint; |
474 | u16 f = 0; | 474 | u16 f = 0; |
475 | 475 | ||
476 | fint = clk->dpll_data->clk_ref->rate / (n + 1); | 476 | fint = clk->dpll_data->clk_ref->rate / n; |
477 | 477 | ||
478 | pr_debug("clock: fint is %lu\n", fint); | 478 | pr_debug("clock: fint is %lu\n", fint); |
479 | 479 | ||
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h index c8119781e00a..9565c05bebd2 100644 --- a/arch/arm/mach-omap2/clock34xx.h +++ b/arch/arm/mach-omap2/clock34xx.h | |||
@@ -489,9 +489,9 @@ static struct clk core_ck = { | |||
489 | static struct clk dpll3_m2x2_ck = { | 489 | static struct clk dpll3_m2x2_ck = { |
490 | .name = "dpll3_m2x2_ck", | 490 | .name = "dpll3_m2x2_ck", |
491 | .ops = &clkops_null, | 491 | .ops = &clkops_null, |
492 | .parent = &dpll3_x2_ck, | 492 | .parent = &dpll3_m2_ck, |
493 | .clkdm_name = "dpll3_clkdm", | 493 | .clkdm_name = "dpll3_clkdm", |
494 | .recalc = &followparent_recalc, | 494 | .recalc = &omap3_clkoutx2_recalc, |
495 | }; | 495 | }; |
496 | 496 | ||
497 | /* The PWRDN bit is apparently only available on 3430ES2 and above */ | 497 | /* The PWRDN bit is apparently only available on 3430ES2 and above */ |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index f8657568b1ba..f3c992e29651 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -378,7 +378,7 @@ EXPORT_SYMBOL(gpmc_cs_request); | |||
378 | void gpmc_cs_free(int cs) | 378 | void gpmc_cs_free(int cs) |
379 | { | 379 | { |
380 | spin_lock(&gpmc_mem_lock); | 380 | spin_lock(&gpmc_mem_lock); |
381 | if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { | 381 | if (cs >= GPMC_CS_NUM || cs < 0 || !gpmc_cs_reserved(cs)) { |
382 | printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); | 382 | printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); |
383 | BUG(); | 383 | BUG(); |
384 | spin_unlock(&gpmc_mem_lock); | 384 | spin_unlock(&gpmc_mem_lock); |
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index 494572825c7d..ec0e14b96682 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <mach/colibri.h> | 27 | #include <mach/colibri.h> |
28 | #include <mach/pxafb.h> | 28 | #include <mach/pxafb.h> |
29 | #include <mach/ohci.h> | 29 | #include <mach/ohci.h> |
30 | #include <mach/audio.h> | ||
30 | 31 | ||
31 | #include "generic.h" | 32 | #include "generic.h" |
32 | #include "devices.h" | 33 | #include "devices.h" |
@@ -145,7 +146,8 @@ static void __init colibri_pxa320_init_lcd(void) | |||
145 | static inline void colibri_pxa320_init_lcd(void) {} | 146 | static inline void colibri_pxa320_init_lcd(void) {} |
146 | #endif | 147 | #endif |
147 | 148 | ||
148 | #if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) | 149 | #if defined(CONFIG_SND_AC97_CODEC) || \ |
150 | defined(CONFIG_SND_AC97_CODEC_MODULE) | ||
149 | static mfp_cfg_t colibri_pxa320_ac97_pin_config[] __initdata = { | 151 | static mfp_cfg_t colibri_pxa320_ac97_pin_config[] __initdata = { |
150 | GPIO34_AC97_SYSCLK, | 152 | GPIO34_AC97_SYSCLK, |
151 | GPIO35_AC97_SDATA_IN_0, | 153 | GPIO35_AC97_SDATA_IN_0, |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index abff9e132749..83bd3c6e3884 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -604,7 +604,7 @@ static struct platform_device gpio_vbus = { | |||
604 | static const struct ads7846_platform_data tsc2046_info = { | 604 | static const struct ads7846_platform_data tsc2046_info = { |
605 | .model = 7846, | 605 | .model = 7846, |
606 | .vref_delay_usecs = 100, | 606 | .vref_delay_usecs = 100, |
607 | .pressure_max = 512, | 607 | .pressure_max = 1024, |
608 | .debounce_max = 10, | 608 | .debounce_max = 10, |
609 | .debounce_tol = 3, | 609 | .debounce_tol = 3, |
610 | .debounce_rep = 1, | 610 | .debounce_rep = 1, |
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S index 241880608ac6..a73bc86a3c26 100644 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/arch/arm/mach-pxa/include/mach/entry-macro.S | |||
@@ -46,5 +46,6 @@ | |||
46 | beq 1001f | 46 | beq 1001f |
47 | bic \irqstat, \irqstat, #0x80000000 | 47 | bic \irqstat, \irqstat, #0x80000000 |
48 | mov \irqnr, \irqstat, lsr #16 | 48 | mov \irqnr, \irqstat, lsr #16 |
49 | add \irqnr, \irqnr, #(PXA_IRQ(0)) | ||
49 | 1001: | 50 | 1001: |
50 | .endm | 51 | .endm |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index be60d6deee8b..653e25be3dd8 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -408,7 +408,7 @@ static struct platform_device keypad_device = { | |||
408 | }; | 408 | }; |
409 | 409 | ||
410 | static struct platform_device rtc_device = { | 410 | static struct platform_device rtc_device = { |
411 | .name = "rtc0", | 411 | .name = "rtc-coh901331", |
412 | .id = -1, | 412 | .id = -1, |
413 | .num_resources = ARRAY_SIZE(rtc_resources), | 413 | .num_resources = ARRAY_SIZE(rtc_resources), |
414 | .resource = rtc_resources, | 414 | .resource = rtc_resources, |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 71ebd7fcfea1..7c345b757df1 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -373,7 +373,7 @@ static inline int gpio_valid(int gpio) | |||
373 | 373 | ||
374 | static int check_gpio(int gpio) | 374 | static int check_gpio(int gpio) |
375 | { | 375 | { |
376 | if (unlikely(gpio_valid(gpio)) < 0) { | 376 | if (unlikely(gpio_valid(gpio) < 0)) { |
377 | printk(KERN_ERR "omap-gpio: invalid GPIO %d\n", gpio); | 377 | printk(KERN_ERR "omap-gpio: invalid GPIO %d\n", gpio); |
378 | dump_stack(); | 378 | dump_stack(); |
379 | return -1; | 379 | return -1; |
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 22086e696e8e..857a6839071c 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifndef __ASM_PLAT_MFP_H | 16 | #ifndef __ASM_PLAT_MFP_H |
17 | #define __ASM_PLAT_MFP_H | 17 | #define __ASM_PLAT_MFP_H |
18 | 18 | ||
19 | #define mfp_to_gpio(m) ((m) % 128) | 19 | #define mfp_to_gpio(m) ((m) % 256) |
20 | 20 | ||
21 | /* list of all the configurable MFP pins */ | 21 | /* list of all the configurable MFP pins */ |
22 | enum { | 22 | enum { |
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c index 9405d0379c85..be58f9fe65b0 100644 --- a/arch/arm/plat-pxa/mfp.c +++ b/arch/arm/plat-pxa/mfp.c | |||
@@ -207,7 +207,7 @@ unsigned long mfp_read(int mfp) | |||
207 | { | 207 | { |
208 | unsigned long val, flags; | 208 | unsigned long val, flags; |
209 | 209 | ||
210 | BUG_ON(mfp >= MFP_PIN_MAX); | 210 | BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); |
211 | 211 | ||
212 | spin_lock_irqsave(&mfp_spin_lock, flags); | 212 | spin_lock_irqsave(&mfp_spin_lock, flags); |
213 | val = mfpr_readl(mfp_table[mfp].mfpr_off); | 213 | val = mfpr_readl(mfp_table[mfp].mfpr_off); |
@@ -220,7 +220,7 @@ void mfp_write(int mfp, unsigned long val) | |||
220 | { | 220 | { |
221 | unsigned long flags; | 221 | unsigned long flags; |
222 | 222 | ||
223 | BUG_ON(mfp >= MFP_PIN_MAX); | 223 | BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); |
224 | 224 | ||
225 | spin_lock_irqsave(&mfp_spin_lock, flags); | 225 | spin_lock_irqsave(&mfp_spin_lock, flags); |
226 | mfpr_writel(mfp_table[mfp].mfpr_off, val); | 226 | mfpr_writel(mfp_table[mfp].mfpr_off, val); |
diff --git a/arch/parisc/include/asm/fcntl.h b/arch/parisc/include/asm/fcntl.h index 5f39d5597ced..1e1c824764ee 100644 --- a/arch/parisc/include/asm/fcntl.h +++ b/arch/parisc/include/asm/fcntl.h | |||
@@ -28,8 +28,6 @@ | |||
28 | #define F_SETOWN 12 /* for sockets. */ | 28 | #define F_SETOWN 12 /* for sockets. */ |
29 | #define F_SETSIG 13 /* for sockets. */ | 29 | #define F_SETSIG 13 /* for sockets. */ |
30 | #define F_GETSIG 14 /* for sockets. */ | 30 | #define F_GETSIG 14 /* for sockets. */ |
31 | #define F_GETOWN_EX 15 | ||
32 | #define F_SETOWN_EX 16 | ||
33 | 31 | ||
34 | /* for posix fcntl() and lockf() */ | 32 | /* for posix fcntl() and lockf() */ |
35 | #define F_RDLCK 01 | 33 | #define F_RDLCK 01 |
diff --git a/arch/powerpc/boot/addRamDisk.c b/arch/powerpc/boot/addRamDisk.c index c02a99952be7..893f446cbd22 100644 --- a/arch/powerpc/boot/addRamDisk.c +++ b/arch/powerpc/boot/addRamDisk.c | |||
@@ -58,7 +58,7 @@ static int check_elf64(void *p, int size, struct addr_range *r) | |||
58 | 58 | ||
59 | return 64; | 59 | return 64; |
60 | } | 60 | } |
61 | void get4k(FILE *file, char *buf ) | 61 | static void get4k(FILE *file, char *buf ) |
62 | { | 62 | { |
63 | unsigned j; | 63 | unsigned j; |
64 | unsigned num = fread(buf, 1, 4096, file); | 64 | unsigned num = fread(buf, 1, 4096, file); |
@@ -66,12 +66,12 @@ void get4k(FILE *file, char *buf ) | |||
66 | buf[j] = 0; | 66 | buf[j] = 0; |
67 | } | 67 | } |
68 | 68 | ||
69 | void put4k(FILE *file, char *buf ) | 69 | static void put4k(FILE *file, char *buf ) |
70 | { | 70 | { |
71 | fwrite(buf, 1, 4096, file); | 71 | fwrite(buf, 1, 4096, file); |
72 | } | 72 | } |
73 | 73 | ||
74 | void death(const char *msg, FILE *fdesc, const char *fname) | 74 | static void death(const char *msg, FILE *fdesc, const char *fname) |
75 | { | 75 | { |
76 | fprintf(stderr, msg); | 76 | fprintf(stderr, msg); |
77 | fclose(fdesc); | 77 | fclose(fdesc); |
diff --git a/arch/sh/kernel/cpu/irq/imask.c b/arch/sh/kernel/cpu/irq/imask.c index 6b5d191eec3a..a351ed84eec5 100644 --- a/arch/sh/kernel/cpu/irq/imask.c +++ b/arch/sh/kernel/cpu/irq/imask.c | |||
@@ -68,7 +68,7 @@ static void unmask_imask_irq(unsigned int irq) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | static struct irq_chip imask_irq_chip = { | 70 | static struct irq_chip imask_irq_chip = { |
71 | .typename = "SR.IMASK", | 71 | .name = "SR.IMASK", |
72 | .mask = mask_imask_irq, | 72 | .mask = mask_imask_irq, |
73 | .unmask = unmask_imask_irq, | 73 | .unmask = unmask_imask_irq, |
74 | .mask_ack = mask_imask_irq, | 74 | .mask_ack = mask_imask_irq, |
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c index 6c092f1f5557..06e7e2959b54 100644 --- a/arch/sh/kernel/cpu/irq/intc-sh5.c +++ b/arch/sh/kernel/cpu/irq/intc-sh5.c | |||
@@ -85,7 +85,7 @@ static void mask_and_ack_intc(unsigned int); | |||
85 | static void end_intc_irq(unsigned int irq); | 85 | static void end_intc_irq(unsigned int irq); |
86 | 86 | ||
87 | static struct irq_chip intc_irq_type = { | 87 | static struct irq_chip intc_irq_type = { |
88 | .typename = "INTC", | 88 | .name = "INTC", |
89 | .startup = startup_intc_irq, | 89 | .startup = startup_intc_irq, |
90 | .shutdown = shutdown_intc_irq, | 90 | .shutdown = shutdown_intc_irq, |
91 | .enable = enable_intc_irq, | 91 | .enable = enable_intc_irq, |
diff --git a/arch/sparc/boot/btfixupprep.c b/arch/sparc/boot/btfixupprep.c index 52a4208fe4f0..bbf91b9c3d39 100644 --- a/arch/sparc/boot/btfixupprep.c +++ b/arch/sparc/boot/btfixupprep.c | |||
@@ -61,14 +61,14 @@ unsigned long lastfoffset = -1; | |||
61 | unsigned long lastfrelno; | 61 | unsigned long lastfrelno; |
62 | btfixup *lastf; | 62 | btfixup *lastf; |
63 | 63 | ||
64 | void fatal(void) __attribute__((noreturn)); | 64 | static void fatal(void) __attribute__((noreturn)); |
65 | void fatal(void) | 65 | static void fatal(void) |
66 | { | 66 | { |
67 | fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); | 67 | fprintf(stderr, "Malformed output from objdump\n%s\n", buffer); |
68 | exit(1); | 68 | exit(1); |
69 | } | 69 | } |
70 | 70 | ||
71 | btfixup *find(int type, char *name) | 71 | static btfixup *find(int type, char *name) |
72 | { | 72 | { |
73 | int i; | 73 | int i; |
74 | for (i = 0; i < last; i++) { | 74 | for (i = 0; i < last; i++) { |
@@ -88,7 +88,7 @@ btfixup *find(int type, char *name) | |||
88 | return array + last - 1; | 88 | return array + last - 1; |
89 | } | 89 | } |
90 | 90 | ||
91 | void set_mode (char *buffer) | 91 | static void set_mode (char *buffer) |
92 | { | 92 | { |
93 | for (mode = 0;; mode++) | 93 | for (mode = 0;; mode++) |
94 | if (buffer[mode] < '0' || buffer[mode] > '9') | 94 | if (buffer[mode] < '0' || buffer[mode] > '9') |
diff --git a/arch/sparc/boot/piggyback_32.c b/arch/sparc/boot/piggyback_32.c index e8dc9adfcd61..ac944aec7301 100644 --- a/arch/sparc/boot/piggyback_32.c +++ b/arch/sparc/boot/piggyback_32.c | |||
@@ -35,17 +35,17 @@ | |||
35 | * as PROM looks for a.out image only. | 35 | * as PROM looks for a.out image only. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | unsigned short ld2(char *p) | 38 | static unsigned short ld2(char *p) |
39 | { | 39 | { |
40 | return (p[0] << 8) | p[1]; | 40 | return (p[0] << 8) | p[1]; |
41 | } | 41 | } |
42 | 42 | ||
43 | unsigned int ld4(char *p) | 43 | static unsigned int ld4(char *p) |
44 | { | 44 | { |
45 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; | 45 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; |
46 | } | 46 | } |
47 | 47 | ||
48 | void st4(char *p, unsigned int x) | 48 | static void st4(char *p, unsigned int x) |
49 | { | 49 | { |
50 | p[0] = x >> 24; | 50 | p[0] = x >> 24; |
51 | p[1] = x >> 16; | 51 | p[1] = x >> 16; |
@@ -53,7 +53,7 @@ void st4(char *p, unsigned int x) | |||
53 | p[3] = x; | 53 | p[3] = x; |
54 | } | 54 | } |
55 | 55 | ||
56 | void usage(void) | 56 | static void usage(void) |
57 | { | 57 | { |
58 | /* fs_img.gz is an image of initial ramdisk. */ | 58 | /* fs_img.gz is an image of initial ramdisk. */ |
59 | fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); | 59 | fprintf(stderr, "Usage: piggyback vmlinux.aout System.map fs_img.gz\n"); |
@@ -61,7 +61,7 @@ void usage(void) | |||
61 | exit(1); | 61 | exit(1); |
62 | } | 62 | } |
63 | 63 | ||
64 | void die(char *str) | 64 | static void die(char *str) |
65 | { | 65 | { |
66 | perror (str); | 66 | perror (str); |
67 | exit(1); | 67 | exit(1); |
diff --git a/arch/sparc/boot/piggyback_64.c b/arch/sparc/boot/piggyback_64.c index c63fd1b6bdd4..a26a686cb5aa 100644 --- a/arch/sparc/boot/piggyback_64.c +++ b/arch/sparc/boot/piggyback_64.c | |||
@@ -32,7 +32,7 @@ | |||
32 | /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly | 32 | /* Note: run this on an a.out kernel (use elftoaout for it), as PROM looks for a.out image onlly |
33 | usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ | 33 | usage: piggyback vmlinux System.map tail, where tail is gzipped fs of the initial ramdisk */ |
34 | 34 | ||
35 | void die(char *str) | 35 | static void die(char *str) |
36 | { | 36 | { |
37 | perror (str); | 37 | perror (str); |
38 | exit(1); | 38 | exit(1); |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 7d5c3b0ea8da..8b581d3905cb 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -526,15 +526,21 @@ static const struct dmi_system_id sw_any_bug_dmi_table[] = { | |||
526 | 526 | ||
527 | static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c) | 527 | static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c) |
528 | { | 528 | { |
529 | /* http://www.intel.com/Assets/PDF/specupdate/314554.pdf | 529 | /* Intel Xeon Processor 7100 Series Specification Update |
530 | * http://www.intel.com/Assets/PDF/specupdate/314554.pdf | ||
530 | * AL30: A Machine Check Exception (MCE) Occurring during an | 531 | * AL30: A Machine Check Exception (MCE) Occurring during an |
531 | * Enhanced Intel SpeedStep Technology Ratio Change May Cause | 532 | * Enhanced Intel SpeedStep Technology Ratio Change May Cause |
532 | * Both Processor Cores to Lock Up when HT is enabled*/ | 533 | * Both Processor Cores to Lock Up. */ |
533 | if (c->x86_vendor == X86_VENDOR_INTEL) { | 534 | if (c->x86_vendor == X86_VENDOR_INTEL) { |
534 | if ((c->x86 == 15) && | 535 | if ((c->x86 == 15) && |
535 | (c->x86_model == 6) && | 536 | (c->x86_model == 6) && |
536 | (c->x86_mask == 8) && smt_capable()) | 537 | (c->x86_mask == 8)) { |
538 | printk(KERN_INFO "acpi-cpufreq: Intel(R) " | ||
539 | "Xeon(R) 7100 Errata AL30, processors may " | ||
540 | "lock up on frequency changes: disabling " | ||
541 | "acpi-cpufreq.\n"); | ||
537 | return -ENODEV; | 542 | return -ENODEV; |
543 | } | ||
538 | } | 544 | } |
539 | return 0; | 545 | return 0; |
540 | } | 546 | } |
@@ -549,13 +555,18 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
549 | unsigned int result = 0; | 555 | unsigned int result = 0; |
550 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); | 556 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); |
551 | struct acpi_processor_performance *perf; | 557 | struct acpi_processor_performance *perf; |
558 | #ifdef CONFIG_SMP | ||
559 | static int blacklisted; | ||
560 | #endif | ||
552 | 561 | ||
553 | dprintk("acpi_cpufreq_cpu_init\n"); | 562 | dprintk("acpi_cpufreq_cpu_init\n"); |
554 | 563 | ||
555 | #ifdef CONFIG_SMP | 564 | #ifdef CONFIG_SMP |
556 | result = acpi_cpufreq_blacklist(c); | 565 | if (blacklisted) |
557 | if (result) | 566 | return blacklisted; |
558 | return result; | 567 | blacklisted = acpi_cpufreq_blacklist(c); |
568 | if (blacklisted) | ||
569 | return blacklisted; | ||
559 | #endif | 570 | #endif |
560 | 571 | ||
561 | data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL); | 572 | data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL); |
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index ce2ed3e4aad9..cabd2fa3fc93 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -813,7 +813,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
813 | memcpy(eblcr, samuel2_eblcr, sizeof(samuel2_eblcr)); | 813 | memcpy(eblcr, samuel2_eblcr, sizeof(samuel2_eblcr)); |
814 | break; | 814 | break; |
815 | case 1 ... 15: | 815 | case 1 ... 15: |
816 | longhaul_version = TYPE_LONGHAUL_V1; | 816 | longhaul_version = TYPE_LONGHAUL_V2; |
817 | if (c->x86_mask < 8) { | 817 | if (c->x86_mask < 8) { |
818 | cpu_model = CPU_SAMUEL2; | 818 | cpu_model = CPU_SAMUEL2; |
819 | cpuname = "C3 'Samuel 2' [C5B]"; | 819 | cpuname = "C3 'Samuel 2' [C5B]"; |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 6394aa5c7985..3f12dabeab52 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -1022,7 +1022,7 @@ static int get_transition_latency(struct powernow_k8_data *data) | |||
1022 | * set it to 1 to avoid problems in the future. | 1022 | * set it to 1 to avoid problems in the future. |
1023 | * For all others it's a BIOS bug. | 1023 | * For all others it's a BIOS bug. |
1024 | */ | 1024 | */ |
1025 | if (!boot_cpu_data.x86 == 0x11) | 1025 | if (boot_cpu_data.x86 != 0x11) |
1026 | printk(KERN_ERR FW_WARN PFX "Invalid zero transition " | 1026 | printk(KERN_ERR FW_WARN PFX "Invalid zero transition " |
1027 | "latency\n"); | 1027 | "latency\n"); |
1028 | max_latency = 1; | 1028 | max_latency = 1; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 6911e91fb4f6..3ae5a7a3a500 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -232,28 +232,23 @@ static unsigned int speedstep_detect_chipset(void) | |||
232 | return 0; | 232 | return 0; |
233 | } | 233 | } |
234 | 234 | ||
235 | struct get_freq_data { | 235 | static void get_freq_data(void *_speed) |
236 | unsigned int speed; | ||
237 | unsigned int processor; | ||
238 | }; | ||
239 | |||
240 | static void get_freq_data(void *_data) | ||
241 | { | 236 | { |
242 | struct get_freq_data *data = _data; | 237 | unsigned int *speed = _speed; |
243 | 238 | ||
244 | data->speed = speedstep_get_frequency(data->processor); | 239 | *speed = speedstep_get_frequency(speedstep_processor); |
245 | } | 240 | } |
246 | 241 | ||
247 | static unsigned int speedstep_get(unsigned int cpu) | 242 | static unsigned int speedstep_get(unsigned int cpu) |
248 | { | 243 | { |
249 | struct get_freq_data data = { .processor = cpu }; | 244 | unsigned int speed; |
250 | 245 | ||
251 | /* You're supposed to ensure CPU is online. */ | 246 | /* You're supposed to ensure CPU is online. */ |
252 | if (smp_call_function_single(cpu, get_freq_data, &data, 1) != 0) | 247 | if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0) |
253 | BUG(); | 248 | BUG(); |
254 | 249 | ||
255 | dprintk("detected %u kHz as current frequency\n", data.speed); | 250 | dprintk("detected %u kHz as current frequency\n", speed); |
256 | return data.speed; | 251 | return speed; |
257 | } | 252 | } |
258 | 253 | ||
259 | /** | 254 | /** |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 4068467ce7b9..10e1f0390bbb 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -1161,12 +1161,6 @@ static int intel_i915_configure(void) | |||
1161 | 1161 | ||
1162 | intel_i9xx_setup_flush(); | 1162 | intel_i9xx_setup_flush(); |
1163 | 1163 | ||
1164 | #ifdef USE_PCI_DMA_API | ||
1165 | if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) | ||
1166 | dev_err(&intel_private.pcidev->dev, | ||
1167 | "set gfx device dma mask 36bit failed!\n"); | ||
1168 | #endif | ||
1169 | |||
1170 | return 0; | 1164 | return 0; |
1171 | } | 1165 | } |
1172 | 1166 | ||
@@ -2456,6 +2450,11 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, | |||
2456 | &bridge->mode); | 2450 | &bridge->mode); |
2457 | } | 2451 | } |
2458 | 2452 | ||
2453 | if (bridge->driver->mask_memory == intel_i965_mask_memory) | ||
2454 | if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) | ||
2455 | dev_err(&intel_private.pcidev->dev, | ||
2456 | "set gfx device dma mask 36bit failed!\n"); | ||
2457 | |||
2459 | pci_set_drvdata(pdev, bridge); | 2458 | pci_set_drvdata(pdev, bridge); |
2460 | return agp_add_bridge(bridge); | 2459 | return agp_add_bridge(bridge); |
2461 | } | 2460 | } |
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index a4bbb28f10be..2e8552dc5eda 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c | |||
@@ -221,6 +221,9 @@ int tty_port_block_til_ready(struct tty_port *port, | |||
221 | the port has just hung up or is in another error state */ | 221 | the port has just hung up or is in another error state */ |
222 | if ((filp->f_flags & O_NONBLOCK) || | 222 | if ((filp->f_flags & O_NONBLOCK) || |
223 | (tty->flags & (1 << TTY_IO_ERROR))) { | 223 | (tty->flags & (1 << TTY_IO_ERROR))) { |
224 | /* Indicate we are open */ | ||
225 | if (tty->termios->c_cflag & CBAUD) | ||
226 | tty_port_raise_dtr_rts(port); | ||
224 | port->flags |= ASYNC_NORMAL_ACTIVE; | 227 | port->flags |= ASYNC_NORMAL_ACTIVE; |
225 | return 0; | 228 | return 0; |
226 | } | 229 | } |
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index ed86d3bf249a..6aa10284104a 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -103,8 +103,8 @@ void vt_event_post(unsigned int event, unsigned int old, unsigned int new) | |||
103 | ve->event.event = event; | 103 | ve->event.event = event; |
104 | /* kernel view is consoles 0..n-1, user space view is | 104 | /* kernel view is consoles 0..n-1, user space view is |
105 | console 1..n with 0 meaning current, so we must bias */ | 105 | console 1..n with 0 meaning current, so we must bias */ |
106 | ve->event.old = old + 1; | 106 | ve->event.oldev = old + 1; |
107 | ve->event.new = new + 1; | 107 | ve->event.newev = new + 1; |
108 | wake = 1; | 108 | wake = 1; |
109 | ve->done = 1; | 109 | ve->done = 1; |
110 | } | 110 | } |
@@ -186,7 +186,7 @@ int vt_waitactive(int n) | |||
186 | vt_event_wait(&vw); | 186 | vt_event_wait(&vw); |
187 | if (vw.done == 0) | 187 | if (vw.done == 0) |
188 | return -EINTR; | 188 | return -EINTR; |
189 | } while (vw.event.new != n); | 189 | } while (vw.event.newev != n); |
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
192 | 192 | ||
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3938c7817095..ff57c40e9b8b 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -41,7 +41,7 @@ static struct cpufreq_driver *cpufreq_driver; | |||
41 | static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data); | 41 | static DEFINE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_data); |
42 | #ifdef CONFIG_HOTPLUG_CPU | 42 | #ifdef CONFIG_HOTPLUG_CPU |
43 | /* This one keeps track of the previously set governor of a removed CPU */ | 43 | /* This one keeps track of the previously set governor of a removed CPU */ |
44 | static DEFINE_PER_CPU(struct cpufreq_governor *, cpufreq_cpu_governor); | 44 | static DEFINE_PER_CPU(char[CPUFREQ_NAME_LEN], cpufreq_cpu_governor); |
45 | #endif | 45 | #endif |
46 | static DEFINE_SPINLOCK(cpufreq_driver_lock); | 46 | static DEFINE_SPINLOCK(cpufreq_driver_lock); |
47 | 47 | ||
@@ -774,10 +774,12 @@ int cpufreq_add_dev_policy(unsigned int cpu, struct cpufreq_policy *policy, | |||
774 | #ifdef CONFIG_SMP | 774 | #ifdef CONFIG_SMP |
775 | unsigned long flags; | 775 | unsigned long flags; |
776 | unsigned int j; | 776 | unsigned int j; |
777 | |||
778 | #ifdef CONFIG_HOTPLUG_CPU | 777 | #ifdef CONFIG_HOTPLUG_CPU |
779 | if (per_cpu(cpufreq_cpu_governor, cpu)) { | 778 | struct cpufreq_governor *gov; |
780 | policy->governor = per_cpu(cpufreq_cpu_governor, cpu); | 779 | |
780 | gov = __find_governor(per_cpu(cpufreq_cpu_governor, cpu)); | ||
781 | if (gov) { | ||
782 | policy->governor = gov; | ||
781 | dprintk("Restoring governor %s for cpu %d\n", | 783 | dprintk("Restoring governor %s for cpu %d\n", |
782 | policy->governor->name, cpu); | 784 | policy->governor->name, cpu); |
783 | } | 785 | } |
@@ -949,10 +951,13 @@ err_out_kobj_put: | |||
949 | static int cpufreq_add_dev(struct sys_device *sys_dev) | 951 | static int cpufreq_add_dev(struct sys_device *sys_dev) |
950 | { | 952 | { |
951 | unsigned int cpu = sys_dev->id; | 953 | unsigned int cpu = sys_dev->id; |
952 | int ret = 0; | 954 | int ret = 0, found = 0; |
953 | struct cpufreq_policy *policy; | 955 | struct cpufreq_policy *policy; |
954 | unsigned long flags; | 956 | unsigned long flags; |
955 | unsigned int j; | 957 | unsigned int j; |
958 | #ifdef CONFIG_HOTPLUG_CPU | ||
959 | int sibling; | ||
960 | #endif | ||
956 | 961 | ||
957 | if (cpu_is_offline(cpu)) | 962 | if (cpu_is_offline(cpu)) |
958 | return 0; | 963 | return 0; |
@@ -999,7 +1004,19 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
999 | INIT_WORK(&policy->update, handle_update); | 1004 | INIT_WORK(&policy->update, handle_update); |
1000 | 1005 | ||
1001 | /* Set governor before ->init, so that driver could check it */ | 1006 | /* Set governor before ->init, so that driver could check it */ |
1002 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 1007 | #ifdef CONFIG_HOTPLUG_CPU |
1008 | for_each_online_cpu(sibling) { | ||
1009 | struct cpufreq_policy *cp = per_cpu(cpufreq_cpu_data, sibling); | ||
1010 | if (cp && cp->governor && | ||
1011 | (cpumask_test_cpu(cpu, cp->related_cpus))) { | ||
1012 | policy->governor = cp->governor; | ||
1013 | found = 1; | ||
1014 | break; | ||
1015 | } | ||
1016 | } | ||
1017 | #endif | ||
1018 | if (!found) | ||
1019 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
1003 | /* call driver. From then on the cpufreq must be able | 1020 | /* call driver. From then on the cpufreq must be able |
1004 | * to accept all calls to ->verify and ->setpolicy for this CPU | 1021 | * to accept all calls to ->verify and ->setpolicy for this CPU |
1005 | */ | 1022 | */ |
@@ -1111,7 +1128,8 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev) | |||
1111 | #ifdef CONFIG_SMP | 1128 | #ifdef CONFIG_SMP |
1112 | 1129 | ||
1113 | #ifdef CONFIG_HOTPLUG_CPU | 1130 | #ifdef CONFIG_HOTPLUG_CPU |
1114 | per_cpu(cpufreq_cpu_governor, cpu) = data->governor; | 1131 | strncpy(per_cpu(cpufreq_cpu_governor, cpu), data->governor->name, |
1132 | CPUFREQ_NAME_LEN); | ||
1115 | #endif | 1133 | #endif |
1116 | 1134 | ||
1117 | /* if we have other CPUs still registered, we need to unlink them, | 1135 | /* if we have other CPUs still registered, we need to unlink them, |
@@ -1135,7 +1153,8 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev) | |||
1135 | continue; | 1153 | continue; |
1136 | dprintk("removing link for cpu %u\n", j); | 1154 | dprintk("removing link for cpu %u\n", j); |
1137 | #ifdef CONFIG_HOTPLUG_CPU | 1155 | #ifdef CONFIG_HOTPLUG_CPU |
1138 | per_cpu(cpufreq_cpu_governor, j) = data->governor; | 1156 | strncpy(per_cpu(cpufreq_cpu_governor, j), |
1157 | data->governor->name, CPUFREQ_NAME_LEN); | ||
1139 | #endif | 1158 | #endif |
1140 | cpu_sys_dev = get_cpu_sysdev(j); | 1159 | cpu_sys_dev = get_cpu_sysdev(j); |
1141 | sysfs_remove_link(&cpu_sys_dev->kobj, "cpufreq"); | 1160 | sysfs_remove_link(&cpu_sys_dev->kobj, "cpufreq"); |
@@ -1606,9 +1625,22 @@ EXPORT_SYMBOL_GPL(cpufreq_register_governor); | |||
1606 | 1625 | ||
1607 | void cpufreq_unregister_governor(struct cpufreq_governor *governor) | 1626 | void cpufreq_unregister_governor(struct cpufreq_governor *governor) |
1608 | { | 1627 | { |
1628 | #ifdef CONFIG_HOTPLUG_CPU | ||
1629 | int cpu; | ||
1630 | #endif | ||
1631 | |||
1609 | if (!governor) | 1632 | if (!governor) |
1610 | return; | 1633 | return; |
1611 | 1634 | ||
1635 | #ifdef CONFIG_HOTPLUG_CPU | ||
1636 | for_each_present_cpu(cpu) { | ||
1637 | if (cpu_online(cpu)) | ||
1638 | continue; | ||
1639 | if (!strcmp(per_cpu(cpufreq_cpu_governor, cpu), governor->name)) | ||
1640 | strcpy(per_cpu(cpufreq_cpu_governor, cpu), "\0"); | ||
1641 | } | ||
1642 | #endif | ||
1643 | |||
1612 | mutex_lock(&cpufreq_governor_mutex); | 1644 | mutex_lock(&cpufreq_governor_mutex); |
1613 | list_del(&governor->governor_list); | 1645 | list_del(&governor->governor_list); |
1614 | mutex_unlock(&cpufreq_governor_mutex); | 1646 | mutex_unlock(&cpufreq_governor_mutex); |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index bc33ddc9c97c..c7b081b839ff 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -116,9 +116,9 @@ static inline cputime64_t get_cpu_idle_time_jiffy(unsigned int cpu, | |||
116 | 116 | ||
117 | idle_time = cputime64_sub(cur_wall_time, busy_time); | 117 | idle_time = cputime64_sub(cur_wall_time, busy_time); |
118 | if (wall) | 118 | if (wall) |
119 | *wall = cur_wall_time; | 119 | *wall = (cputime64_t)jiffies_to_usecs(cur_wall_time); |
120 | 120 | ||
121 | return idle_time; | 121 | return (cputime64_t)jiffies_to_usecs(idle_time);; |
122 | } | 122 | } |
123 | 123 | ||
124 | static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) | 124 | static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 071699de50ee..4b34ade2332b 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -133,9 +133,9 @@ static inline cputime64_t get_cpu_idle_time_jiffy(unsigned int cpu, | |||
133 | 133 | ||
134 | idle_time = cputime64_sub(cur_wall_time, busy_time); | 134 | idle_time = cputime64_sub(cur_wall_time, busy_time); |
135 | if (wall) | 135 | if (wall) |
136 | *wall = cur_wall_time; | 136 | *wall = (cputime64_t)jiffies_to_usecs(cur_wall_time); |
137 | 137 | ||
138 | return idle_time; | 138 | return (cputime64_t)jiffies_to_usecs(idle_time); |
139 | } | 139 | } |
140 | 140 | ||
141 | static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) | 141 | static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) |
diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c index fb211e585dea..0d79577c1576 100644 --- a/drivers/gpu/drm/radeon/mkregtable.c +++ b/drivers/gpu/drm/radeon/mkregtable.c | |||
@@ -561,7 +561,7 @@ struct table { | |||
561 | char *gpu_prefix; | 561 | char *gpu_prefix; |
562 | }; | 562 | }; |
563 | 563 | ||
564 | struct offset *offset_new(unsigned o) | 564 | static struct offset *offset_new(unsigned o) |
565 | { | 565 | { |
566 | struct offset *offset; | 566 | struct offset *offset; |
567 | 567 | ||
@@ -573,12 +573,12 @@ struct offset *offset_new(unsigned o) | |||
573 | return offset; | 573 | return offset; |
574 | } | 574 | } |
575 | 575 | ||
576 | void table_offset_add(struct table *t, struct offset *offset) | 576 | static void table_offset_add(struct table *t, struct offset *offset) |
577 | { | 577 | { |
578 | list_add_tail(&offset->list, &t->offsets); | 578 | list_add_tail(&offset->list, &t->offsets); |
579 | } | 579 | } |
580 | 580 | ||
581 | void table_init(struct table *t) | 581 | static void table_init(struct table *t) |
582 | { | 582 | { |
583 | INIT_LIST_HEAD(&t->offsets); | 583 | INIT_LIST_HEAD(&t->offsets); |
584 | t->offset_max = 0; | 584 | t->offset_max = 0; |
@@ -586,7 +586,7 @@ void table_init(struct table *t) | |||
586 | t->table = NULL; | 586 | t->table = NULL; |
587 | } | 587 | } |
588 | 588 | ||
589 | void table_print(struct table *t) | 589 | static void table_print(struct table *t) |
590 | { | 590 | { |
591 | unsigned nlloop, i, j, n, c, id; | 591 | unsigned nlloop, i, j, n, c, id; |
592 | 592 | ||
@@ -611,7 +611,7 @@ void table_print(struct table *t) | |||
611 | printf("};\n"); | 611 | printf("};\n"); |
612 | } | 612 | } |
613 | 613 | ||
614 | int table_build(struct table *t) | 614 | static int table_build(struct table *t) |
615 | { | 615 | { |
616 | struct offset *offset; | 616 | struct offset *offset; |
617 | unsigned i, m; | 617 | unsigned i, m; |
@@ -631,7 +631,7 @@ int table_build(struct table *t) | |||
631 | } | 631 | } |
632 | 632 | ||
633 | static char gpu_name[10]; | 633 | static char gpu_name[10]; |
634 | int parser_auth(struct table *t, const char *filename) | 634 | static int parser_auth(struct table *t, const char *filename) |
635 | { | 635 | { |
636 | FILE *file; | 636 | FILE *file; |
637 | regex_t mask_rex; | 637 | regex_t mask_rex; |
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index d39877a7da63..b5a95193c694 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c | |||
@@ -350,8 +350,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *attr, | |||
350 | 350 | ||
351 | case FAULT: | 351 | case FAULT: |
352 | /* Note - only for remote1 and remote2 */ | 352 | /* Note - only for remote1 and remote2 */ |
353 | out = data->alarms & (sattr->index ? 0x8000 : 0x4000); | 353 | out = !!(data->alarms & (sattr->index ? 0x8000 : 0x4000)); |
354 | out = out ? 0 : 1; | ||
355 | break; | 354 | break; |
356 | 355 | ||
357 | default: | 356 | default: |
@@ -863,7 +862,7 @@ static SENSOR_DEVICE_ATTR_2(pwm1_freq, S_IRUGO | S_IWUSR, show_pwmfreq, | |||
863 | set_pwmfreq, INPUT, 0); | 862 | set_pwmfreq, INPUT, 0); |
864 | static SENSOR_DEVICE_ATTR_2(pwm1_enable, S_IRUGO | S_IWUSR, show_pwmctrl, | 863 | static SENSOR_DEVICE_ATTR_2(pwm1_enable, S_IRUGO | S_IWUSR, show_pwmctrl, |
865 | set_pwmctrl, INPUT, 0); | 864 | set_pwmctrl, INPUT, 0); |
866 | static SENSOR_DEVICE_ATTR_2(pwm1_auto_channel_temp, S_IRUGO | S_IWUSR, | 865 | static SENSOR_DEVICE_ATTR_2(pwm1_auto_channels_temp, S_IRUGO | S_IWUSR, |
867 | show_pwmchan, set_pwmchan, INPUT, 0); | 866 | show_pwmchan, set_pwmchan, INPUT, 0); |
868 | static SENSOR_DEVICE_ATTR_2(pwm1_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, | 867 | static SENSOR_DEVICE_ATTR_2(pwm1_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, |
869 | set_pwm, MIN, 0); | 868 | set_pwm, MIN, 0); |
@@ -875,7 +874,7 @@ static SENSOR_DEVICE_ATTR_2(pwm2_freq, S_IRUGO | S_IWUSR, show_pwmfreq, | |||
875 | set_pwmfreq, INPUT, 1); | 874 | set_pwmfreq, INPUT, 1); |
876 | static SENSOR_DEVICE_ATTR_2(pwm2_enable, S_IRUGO | S_IWUSR, show_pwmctrl, | 875 | static SENSOR_DEVICE_ATTR_2(pwm2_enable, S_IRUGO | S_IWUSR, show_pwmctrl, |
877 | set_pwmctrl, INPUT, 1); | 876 | set_pwmctrl, INPUT, 1); |
878 | static SENSOR_DEVICE_ATTR_2(pwm2_auto_channel_temp, S_IRUGO | S_IWUSR, | 877 | static SENSOR_DEVICE_ATTR_2(pwm2_auto_channels_temp, S_IRUGO | S_IWUSR, |
879 | show_pwmchan, set_pwmchan, INPUT, 1); | 878 | show_pwmchan, set_pwmchan, INPUT, 1); |
880 | static SENSOR_DEVICE_ATTR_2(pwm2_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, | 879 | static SENSOR_DEVICE_ATTR_2(pwm2_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, |
881 | set_pwm, MIN, 1); | 880 | set_pwm, MIN, 1); |
@@ -887,7 +886,7 @@ static SENSOR_DEVICE_ATTR_2(pwm3_freq, S_IRUGO | S_IWUSR, show_pwmfreq, | |||
887 | set_pwmfreq, INPUT, 2); | 886 | set_pwmfreq, INPUT, 2); |
888 | static SENSOR_DEVICE_ATTR_2(pwm3_enable, S_IRUGO | S_IWUSR, show_pwmctrl, | 887 | static SENSOR_DEVICE_ATTR_2(pwm3_enable, S_IRUGO | S_IWUSR, show_pwmctrl, |
889 | set_pwmctrl, INPUT, 2); | 888 | set_pwmctrl, INPUT, 2); |
890 | static SENSOR_DEVICE_ATTR_2(pwm3_auto_channel_temp, S_IRUGO | S_IWUSR, | 889 | static SENSOR_DEVICE_ATTR_2(pwm3_auto_channels_temp, S_IRUGO | S_IWUSR, |
891 | show_pwmchan, set_pwmchan, INPUT, 2); | 890 | show_pwmchan, set_pwmchan, INPUT, 2); |
892 | static SENSOR_DEVICE_ATTR_2(pwm3_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, | 891 | static SENSOR_DEVICE_ATTR_2(pwm3_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, |
893 | set_pwm, MIN, 2); | 892 | set_pwm, MIN, 2); |
@@ -947,19 +946,19 @@ static struct attribute *adt7475_attrs[] = { | |||
947 | &sensor_dev_attr_pwm1.dev_attr.attr, | 946 | &sensor_dev_attr_pwm1.dev_attr.attr, |
948 | &sensor_dev_attr_pwm1_freq.dev_attr.attr, | 947 | &sensor_dev_attr_pwm1_freq.dev_attr.attr, |
949 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, | 948 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, |
950 | &sensor_dev_attr_pwm1_auto_channel_temp.dev_attr.attr, | 949 | &sensor_dev_attr_pwm1_auto_channels_temp.dev_attr.attr, |
951 | &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr, | 950 | &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr, |
952 | &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr, | 951 | &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr, |
953 | &sensor_dev_attr_pwm2.dev_attr.attr, | 952 | &sensor_dev_attr_pwm2.dev_attr.attr, |
954 | &sensor_dev_attr_pwm2_freq.dev_attr.attr, | 953 | &sensor_dev_attr_pwm2_freq.dev_attr.attr, |
955 | &sensor_dev_attr_pwm2_enable.dev_attr.attr, | 954 | &sensor_dev_attr_pwm2_enable.dev_attr.attr, |
956 | &sensor_dev_attr_pwm2_auto_channel_temp.dev_attr.attr, | 955 | &sensor_dev_attr_pwm2_auto_channels_temp.dev_attr.attr, |
957 | &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr, | 956 | &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr, |
958 | &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr, | 957 | &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr, |
959 | &sensor_dev_attr_pwm3.dev_attr.attr, | 958 | &sensor_dev_attr_pwm3.dev_attr.attr, |
960 | &sensor_dev_attr_pwm3_freq.dev_attr.attr, | 959 | &sensor_dev_attr_pwm3_freq.dev_attr.attr, |
961 | &sensor_dev_attr_pwm3_enable.dev_attr.attr, | 960 | &sensor_dev_attr_pwm3_enable.dev_attr.attr, |
962 | &sensor_dev_attr_pwm3_auto_channel_temp.dev_attr.attr, | 961 | &sensor_dev_attr_pwm3_auto_channels_temp.dev_attr.attr, |
963 | &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr, | 962 | &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr, |
964 | &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr, | 963 | &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr, |
965 | NULL, | 964 | NULL, |
@@ -1152,7 +1151,7 @@ static struct adt7475_data *adt7475_update_device(struct device *dev) | |||
1152 | } | 1151 | } |
1153 | 1152 | ||
1154 | /* Limits and settings, should never change update every 60 seconds */ | 1153 | /* Limits and settings, should never change update every 60 seconds */ |
1155 | if (time_after(jiffies, data->limits_updated + HZ * 2) || | 1154 | if (time_after(jiffies, data->limits_updated + HZ * 60) || |
1156 | !data->valid) { | 1155 | !data->valid) { |
1157 | data->config5 = adt7475_read(REG_CONFIG5); | 1156 | data->config5 = adt7475_read(REG_CONFIG5); |
1158 | 1157 | ||
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 3a524f2fe493..71835412529f 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
@@ -323,14 +323,21 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev) | |||
323 | } | 323 | } |
324 | 324 | ||
325 | for (i = 0; i < ARRAY_SIZE(pdata->in); i++) { | 325 | for (i = 0; i < ARRAY_SIZE(pdata->in); i++) { |
326 | if (!pdata->in[i]) | 326 | struct s3c24xx_adc_hwmon_incfg *cfg = pdata->in[i]; |
327 | |||
328 | if (!cfg) | ||
327 | continue; | 329 | continue; |
328 | 330 | ||
329 | if (pdata->in[i]->mult >= 0x10000) | 331 | if (cfg->mult >= 0x10000) |
330 | dev_warn(&dev->dev, | 332 | dev_warn(&dev->dev, |
331 | "channel %d multiplier too large\n", | 333 | "channel %d multiplier too large\n", |
332 | i); | 334 | i); |
333 | 335 | ||
336 | if (cfg->divider == 0) { | ||
337 | dev_err(&dev->dev, "channel %d divider zero\n", i); | ||
338 | continue; | ||
339 | } | ||
340 | |||
334 | ret = s3c_hwmon_create_attr(&dev->dev, pdata->in[i], | 341 | ret = s3c_hwmon_create_attr(&dev->dev, pdata->in[i], |
335 | &hwmon->attrs[i], i); | 342 | &hwmon->attrs[i], i); |
336 | if (ret) { | 343 | if (ret) { |
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 6ff6c20f1e78..1fca59077949 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
@@ -19,7 +19,9 @@ | |||
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/i2c-pnx.h> | 21 | #include <linux/i2c-pnx.h> |
22 | #include <linux/io.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/i2c.h> | ||
23 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
24 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
25 | 27 | ||
@@ -54,6 +56,9 @@ static inline void i2c_pnx_arm_timer(struct i2c_adapter *adap) | |||
54 | struct timer_list *timer = &data->mif.timer; | 56 | struct timer_list *timer = &data->mif.timer; |
55 | int expires = I2C_PNX_TIMEOUT / (1000 / HZ); | 57 | int expires = I2C_PNX_TIMEOUT / (1000 / HZ); |
56 | 58 | ||
59 | if (expires <= 1) | ||
60 | expires = 2; | ||
61 | |||
57 | del_timer_sync(timer); | 62 | del_timer_sync(timer); |
58 | 63 | ||
59 | dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", | 64 | dev_dbg(&adap->dev, "Timer armed at %lu plus %u jiffies.\n", |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 5e6308694408..82811558ec33 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -107,8 +107,7 @@ static const struct dmi_system_id lifebook_dmi_table[] = { | |||
107 | .matches = { | 107 | .matches = { |
108 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-72"), | 108 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-72"), |
109 | }, | 109 | }, |
110 | .callback = lifebook_set_serio_phys, | 110 | .callback = lifebook_set_6byte_proto, |
111 | .driver_data = "isa0060/serio3", | ||
112 | }, | 111 | }, |
113 | { | 112 | { |
114 | .ident = "Lifebook B142", | 113 | .ident = "Lifebook B142", |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index 5bd64841bf1c..07c53798301a 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -581,7 +581,7 @@ static int cortron_detect(struct psmouse *psmouse, bool set_properties) | |||
581 | static int psmouse_extensions(struct psmouse *psmouse, | 581 | static int psmouse_extensions(struct psmouse *psmouse, |
582 | unsigned int max_proto, bool set_properties) | 582 | unsigned int max_proto, bool set_properties) |
583 | { | 583 | { |
584 | bool synaptics_hardware = true; | 584 | bool synaptics_hardware = false; |
585 | 585 | ||
586 | /* | 586 | /* |
587 | * We always check for lifebook because it does not disturb mouse | 587 | * We always check for lifebook because it does not disturb mouse |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index faed794cf75a..a6624ad252c5 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -5481,7 +5481,7 @@ HFCmulti_init(void) | |||
5481 | if (err) { | 5481 | if (err) { |
5482 | printk(KERN_ERR "error registering embedded driver: " | 5482 | printk(KERN_ERR "error registering embedded driver: " |
5483 | "%x\n", err); | 5483 | "%x\n", err); |
5484 | return -err; | 5484 | return err; |
5485 | } | 5485 | } |
5486 | HFC_cnt++; | 5486 | HFC_cnt++; |
5487 | printk(KERN_INFO "%d devices registered\n", HFC_cnt); | 5487 | printk(KERN_INFO "%d devices registered\n", HFC_cnt); |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 2d14b64202a3..642d5aaf53ce 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -1535,10 +1535,8 @@ static int isdn_ppp_mp_bundle_array_init(void) | |||
1535 | int sz = ISDN_MAX_CHANNELS*sizeof(ippp_bundle); | 1535 | int sz = ISDN_MAX_CHANNELS*sizeof(ippp_bundle); |
1536 | if( (isdn_ppp_bundle_arr = kzalloc(sz, GFP_KERNEL)) == NULL ) | 1536 | if( (isdn_ppp_bundle_arr = kzalloc(sz, GFP_KERNEL)) == NULL ) |
1537 | return -ENOMEM; | 1537 | return -ENOMEM; |
1538 | for (i = 0; i < ISDN_MAX_CHANNELS; i++) { | 1538 | for( i = 0; i < ISDN_MAX_CHANNELS; i++ ) |
1539 | spin_lock_init(&isdn_ppp_bundle_arr[i].lock); | 1539 | spin_lock_init(&isdn_ppp_bundle_arr[i].lock); |
1540 | skb_queue_head_init(&isdn_ppp_bundle_arr[i].frags); | ||
1541 | } | ||
1542 | return 0; | 1540 | return 0; |
1543 | } | 1541 | } |
1544 | 1542 | ||
@@ -1571,7 +1569,7 @@ static int isdn_ppp_mp_init( isdn_net_local * lp, ippp_bundle * add_to ) | |||
1571 | if ((lp->netdev->pb = isdn_ppp_mp_bundle_alloc()) == NULL) | 1569 | if ((lp->netdev->pb = isdn_ppp_mp_bundle_alloc()) == NULL) |
1572 | return -ENOMEM; | 1570 | return -ENOMEM; |
1573 | lp->next = lp->last = lp; /* nobody else in a queue */ | 1571 | lp->next = lp->last = lp; /* nobody else in a queue */ |
1574 | skb_queue_head_init(&lp->netdev->pb->frags); | 1572 | lp->netdev->pb->frags = NULL; |
1575 | lp->netdev->pb->frames = 0; | 1573 | lp->netdev->pb->frames = 0; |
1576 | lp->netdev->pb->seq = UINT_MAX; | 1574 | lp->netdev->pb->seq = UINT_MAX; |
1577 | } | 1575 | } |
@@ -1583,29 +1581,28 @@ static int isdn_ppp_mp_init( isdn_net_local * lp, ippp_bundle * add_to ) | |||
1583 | 1581 | ||
1584 | static u32 isdn_ppp_mp_get_seq( int short_seq, | 1582 | static u32 isdn_ppp_mp_get_seq( int short_seq, |
1585 | struct sk_buff * skb, u32 last_seq ); | 1583 | struct sk_buff * skb, u32 last_seq ); |
1586 | static void isdn_ppp_mp_discard(ippp_bundle *mp, struct sk_buff *from, | 1584 | static struct sk_buff * isdn_ppp_mp_discard( ippp_bundle * mp, |
1587 | struct sk_buff *to); | 1585 | struct sk_buff * from, struct sk_buff * to ); |
1588 | static void isdn_ppp_mp_reassembly(isdn_net_dev *net_dev, isdn_net_local *lp, | 1586 | static void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp, |
1589 | struct sk_buff *from, struct sk_buff *to, | 1587 | struct sk_buff * from, struct sk_buff * to ); |
1590 | u32 lastseq); | 1588 | static void isdn_ppp_mp_free_skb( ippp_bundle * mp, struct sk_buff * skb ); |
1591 | static void isdn_ppp_mp_free_skb(ippp_bundle *mp, struct sk_buff *skb); | ||
1592 | static void isdn_ppp_mp_print_recv_pkt( int slot, struct sk_buff * skb ); | 1589 | static void isdn_ppp_mp_print_recv_pkt( int slot, struct sk_buff * skb ); |
1593 | 1590 | ||
1594 | static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | 1591 | static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, |
1595 | struct sk_buff *skb) | 1592 | struct sk_buff *skb) |
1596 | { | 1593 | { |
1597 | struct sk_buff *newfrag, *frag, *start, *nextf; | ||
1598 | u32 newseq, minseq, thisseq; | ||
1599 | isdn_mppp_stats *stats; | ||
1600 | struct ippp_struct *is; | 1594 | struct ippp_struct *is; |
1595 | isdn_net_local * lpq; | ||
1596 | ippp_bundle * mp; | ||
1597 | isdn_mppp_stats * stats; | ||
1598 | struct sk_buff * newfrag, * frag, * start, *nextf; | ||
1599 | u32 newseq, minseq, thisseq; | ||
1601 | unsigned long flags; | 1600 | unsigned long flags; |
1602 | isdn_net_local *lpq; | ||
1603 | ippp_bundle *mp; | ||
1604 | int slot; | 1601 | int slot; |
1605 | 1602 | ||
1606 | spin_lock_irqsave(&net_dev->pb->lock, flags); | 1603 | spin_lock_irqsave(&net_dev->pb->lock, flags); |
1607 | mp = net_dev->pb; | 1604 | mp = net_dev->pb; |
1608 | stats = &mp->stats; | 1605 | stats = &mp->stats; |
1609 | slot = lp->ppp_slot; | 1606 | slot = lp->ppp_slot; |
1610 | if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { | 1607 | if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { |
1611 | printk(KERN_ERR "%s: lp->ppp_slot(%d)\n", | 1608 | printk(KERN_ERR "%s: lp->ppp_slot(%d)\n", |
@@ -1616,19 +1613,20 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1616 | return; | 1613 | return; |
1617 | } | 1614 | } |
1618 | is = ippp_table[slot]; | 1615 | is = ippp_table[slot]; |
1619 | if (++mp->frames > stats->max_queue_len) | 1616 | if( ++mp->frames > stats->max_queue_len ) |
1620 | stats->max_queue_len = mp->frames; | 1617 | stats->max_queue_len = mp->frames; |
1621 | 1618 | ||
1622 | if (is->debug & 0x8) | 1619 | if (is->debug & 0x8) |
1623 | isdn_ppp_mp_print_recv_pkt(lp->ppp_slot, skb); | 1620 | isdn_ppp_mp_print_recv_pkt(lp->ppp_slot, skb); |
1624 | 1621 | ||
1625 | newseq = isdn_ppp_mp_get_seq(is->mpppcfg & SC_IN_SHORT_SEQ, | 1622 | newseq = isdn_ppp_mp_get_seq(is->mpppcfg & SC_IN_SHORT_SEQ, |
1626 | skb, is->last_link_seqno); | 1623 | skb, is->last_link_seqno); |
1624 | |||
1627 | 1625 | ||
1628 | /* if this packet seq # is less than last already processed one, | 1626 | /* if this packet seq # is less than last already processed one, |
1629 | * toss it right away, but check for sequence start case first | 1627 | * toss it right away, but check for sequence start case first |
1630 | */ | 1628 | */ |
1631 | if (mp->seq > MP_LONGSEQ_MAX && (newseq & MP_LONGSEQ_MAXBIT)) { | 1629 | if( mp->seq > MP_LONGSEQ_MAX && (newseq & MP_LONGSEQ_MAXBIT) ) { |
1632 | mp->seq = newseq; /* the first packet: required for | 1630 | mp->seq = newseq; /* the first packet: required for |
1633 | * rfc1990 non-compliant clients -- | 1631 | * rfc1990 non-compliant clients -- |
1634 | * prevents constant packet toss */ | 1632 | * prevents constant packet toss */ |
@@ -1638,7 +1636,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1638 | spin_unlock_irqrestore(&mp->lock, flags); | 1636 | spin_unlock_irqrestore(&mp->lock, flags); |
1639 | return; | 1637 | return; |
1640 | } | 1638 | } |
1641 | 1639 | ||
1642 | /* find the minimum received sequence number over all links */ | 1640 | /* find the minimum received sequence number over all links */ |
1643 | is->last_link_seqno = minseq = newseq; | 1641 | is->last_link_seqno = minseq = newseq; |
1644 | for (lpq = net_dev->queue;;) { | 1642 | for (lpq = net_dev->queue;;) { |
@@ -1659,31 +1657,22 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1659 | * packets */ | 1657 | * packets */ |
1660 | newfrag = skb; | 1658 | newfrag = skb; |
1661 | 1659 | ||
1662 | /* Insert new fragment into the proper sequence slot. */ | 1660 | /* if this new fragment is before the first one, then enqueue it now. */ |
1663 | skb_queue_walk(&mp->frags, frag) { | 1661 | if ((frag = mp->frags) == NULL || MP_LT(newseq, MP_SEQ(frag))) { |
1664 | if (MP_SEQ(frag) == newseq) { | 1662 | newfrag->next = frag; |
1665 | isdn_ppp_mp_free_skb(mp, newfrag); | 1663 | mp->frags = frag = newfrag; |
1666 | newfrag = NULL; | 1664 | newfrag = NULL; |
1667 | break; | 1665 | } |
1668 | } | ||
1669 | if (MP_LT(newseq, MP_SEQ(frag))) { | ||
1670 | __skb_queue_before(&mp->frags, frag, newfrag); | ||
1671 | newfrag = NULL; | ||
1672 | break; | ||
1673 | } | ||
1674 | } | ||
1675 | if (newfrag) | ||
1676 | __skb_queue_tail(&mp->frags, newfrag); | ||
1677 | 1666 | ||
1678 | frag = skb_peek(&mp->frags); | 1667 | start = MP_FLAGS(frag) & MP_BEGIN_FRAG && |
1679 | start = ((MP_FLAGS(frag) & MP_BEGIN_FRAG) && | 1668 | MP_SEQ(frag) == mp->seq ? frag : NULL; |
1680 | (MP_SEQ(frag) == mp->seq)) ? frag : NULL; | ||
1681 | if (!start) | ||
1682 | goto check_overflow; | ||
1683 | 1669 | ||
1684 | /* main fragment traversing loop | 1670 | /* |
1671 | * main fragment traversing loop | ||
1685 | * | 1672 | * |
1686 | * try to accomplish several tasks: | 1673 | * try to accomplish several tasks: |
1674 | * - insert new fragment into the proper sequence slot (once that's done | ||
1675 | * newfrag will be set to NULL) | ||
1687 | * - reassemble any complete fragment sequence (non-null 'start' | 1676 | * - reassemble any complete fragment sequence (non-null 'start' |
1688 | * indicates there is a continguous sequence present) | 1677 | * indicates there is a continguous sequence present) |
1689 | * - discard any incomplete sequences that are below minseq -- due | 1678 | * - discard any incomplete sequences that are below minseq -- due |
@@ -1692,46 +1681,71 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1692 | * come to complete such sequence and it should be discarded | 1681 | * come to complete such sequence and it should be discarded |
1693 | * | 1682 | * |
1694 | * loop completes when we accomplished the following tasks: | 1683 | * loop completes when we accomplished the following tasks: |
1684 | * - new fragment is inserted in the proper sequence ('newfrag' is | ||
1685 | * set to NULL) | ||
1695 | * - we hit a gap in the sequence, so no reassembly/processing is | 1686 | * - we hit a gap in the sequence, so no reassembly/processing is |
1696 | * possible ('start' would be set to NULL) | 1687 | * possible ('start' would be set to NULL) |
1697 | * | 1688 | * |
1698 | * algorithm for this code is derived from code in the book | 1689 | * algorithm for this code is derived from code in the book |
1699 | * 'PPP Design And Debugging' by James Carlson (Addison-Wesley) | 1690 | * 'PPP Design And Debugging' by James Carlson (Addison-Wesley) |
1700 | */ | 1691 | */ |
1701 | skb_queue_walk_safe(&mp->frags, frag, nextf) { | 1692 | while (start != NULL || newfrag != NULL) { |
1702 | thisseq = MP_SEQ(frag); | 1693 | |
1703 | 1694 | thisseq = MP_SEQ(frag); | |
1704 | /* check for misplaced start */ | 1695 | nextf = frag->next; |
1705 | if (start != frag && (MP_FLAGS(frag) & MP_BEGIN_FRAG)) { | 1696 | |
1706 | printk(KERN_WARNING"isdn_mppp(seq %d): new " | 1697 | /* drop any duplicate fragments */ |
1707 | "BEGIN flag with no prior END", thisseq); | 1698 | if (newfrag != NULL && thisseq == newseq) { |
1708 | stats->seqerrs++; | 1699 | isdn_ppp_mp_free_skb(mp, newfrag); |
1709 | stats->frame_drops++; | 1700 | newfrag = NULL; |
1710 | isdn_ppp_mp_discard(mp, start, frag); | 1701 | } |
1711 | start = frag; | 1702 | |
1712 | } else if (MP_LE(thisseq, minseq)) { | 1703 | /* insert new fragment before next element if possible. */ |
1713 | if (MP_FLAGS(frag) & MP_BEGIN_FRAG) | 1704 | if (newfrag != NULL && (nextf == NULL || |
1705 | MP_LT(newseq, MP_SEQ(nextf)))) { | ||
1706 | newfrag->next = nextf; | ||
1707 | frag->next = nextf = newfrag; | ||
1708 | newfrag = NULL; | ||
1709 | } | ||
1710 | |||
1711 | if (start != NULL) { | ||
1712 | /* check for misplaced start */ | ||
1713 | if (start != frag && (MP_FLAGS(frag) & MP_BEGIN_FRAG)) { | ||
1714 | printk(KERN_WARNING"isdn_mppp(seq %d): new " | ||
1715 | "BEGIN flag with no prior END", thisseq); | ||
1716 | stats->seqerrs++; | ||
1717 | stats->frame_drops++; | ||
1718 | start = isdn_ppp_mp_discard(mp, start,frag); | ||
1719 | nextf = frag->next; | ||
1720 | } | ||
1721 | } else if (MP_LE(thisseq, minseq)) { | ||
1722 | if (MP_FLAGS(frag) & MP_BEGIN_FRAG) | ||
1714 | start = frag; | 1723 | start = frag; |
1715 | else { | 1724 | else { |
1716 | if (MP_FLAGS(frag) & MP_END_FRAG) | 1725 | if (MP_FLAGS(frag) & MP_END_FRAG) |
1717 | stats->frame_drops++; | 1726 | stats->frame_drops++; |
1718 | __skb_unlink(skb, &mp->frags); | 1727 | if( mp->frags == frag ) |
1728 | mp->frags = nextf; | ||
1719 | isdn_ppp_mp_free_skb(mp, frag); | 1729 | isdn_ppp_mp_free_skb(mp, frag); |
1730 | frag = nextf; | ||
1720 | continue; | 1731 | continue; |
1721 | } | 1732 | } |
1722 | } | 1733 | } |
1723 | 1734 | ||
1724 | /* if we have end fragment, then we have full reassembly | 1735 | /* if start is non-null and we have end fragment, then |
1725 | * sequence -- reassemble and process packet now | 1736 | * we have full reassembly sequence -- reassemble |
1737 | * and process packet now | ||
1726 | */ | 1738 | */ |
1727 | if (MP_FLAGS(frag) & MP_END_FRAG) { | 1739 | if (start != NULL && (MP_FLAGS(frag) & MP_END_FRAG)) { |
1728 | minseq = mp->seq = (thisseq+1) & MP_LONGSEQ_MASK; | 1740 | minseq = mp->seq = (thisseq+1) & MP_LONGSEQ_MASK; |
1729 | /* Reassemble the packet then dispatch it */ | 1741 | /* Reassemble the packet then dispatch it */ |
1730 | isdn_ppp_mp_reassembly(net_dev, lp, start, frag, thisseq); | 1742 | isdn_ppp_mp_reassembly(net_dev, lp, start, nextf); |
1743 | |||
1744 | start = NULL; | ||
1745 | frag = NULL; | ||
1731 | 1746 | ||
1732 | start = NULL; | 1747 | mp->frags = nextf; |
1733 | frag = NULL; | 1748 | } |
1734 | } | ||
1735 | 1749 | ||
1736 | /* check if need to update start pointer: if we just | 1750 | /* check if need to update start pointer: if we just |
1737 | * reassembled the packet and sequence is contiguous | 1751 | * reassembled the packet and sequence is contiguous |
@@ -1742,25 +1756,26 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1742 | * below low watermark and set start to the next frag or | 1756 | * below low watermark and set start to the next frag or |
1743 | * clear start ptr. | 1757 | * clear start ptr. |
1744 | */ | 1758 | */ |
1745 | if (nextf != (struct sk_buff *)&mp->frags && | 1759 | if (nextf != NULL && |
1746 | ((thisseq+1) & MP_LONGSEQ_MASK) == MP_SEQ(nextf)) { | 1760 | ((thisseq+1) & MP_LONGSEQ_MASK) == MP_SEQ(nextf)) { |
1747 | /* if we just reassembled and the next one is here, | 1761 | /* if we just reassembled and the next one is here, |
1748 | * then start another reassembly. | 1762 | * then start another reassembly. */ |
1749 | */ | 1763 | |
1750 | if (frag == NULL) { | 1764 | if (frag == NULL) { |
1751 | if (MP_FLAGS(nextf) & MP_BEGIN_FRAG) | 1765 | if (MP_FLAGS(nextf) & MP_BEGIN_FRAG) |
1752 | start = nextf; | 1766 | start = nextf; |
1753 | else { | 1767 | else |
1754 | printk(KERN_WARNING"isdn_mppp(seq %d):" | 1768 | { |
1755 | " END flag with no following " | 1769 | printk(KERN_WARNING"isdn_mppp(seq %d):" |
1756 | "BEGIN", thisseq); | 1770 | " END flag with no following " |
1771 | "BEGIN", thisseq); | ||
1757 | stats->seqerrs++; | 1772 | stats->seqerrs++; |
1758 | } | 1773 | } |
1759 | } | 1774 | } |
1760 | } else { | 1775 | |
1761 | if (nextf != (struct sk_buff *)&mp->frags && | 1776 | } else { |
1762 | frag != NULL && | 1777 | if ( nextf != NULL && frag != NULL && |
1763 | MP_LT(thisseq, minseq)) { | 1778 | MP_LT(thisseq, minseq)) { |
1764 | /* we've got a break in the sequence | 1779 | /* we've got a break in the sequence |
1765 | * and we not at the end yet | 1780 | * and we not at the end yet |
1766 | * and we did not just reassembled | 1781 | * and we did not just reassembled |
@@ -1769,39 +1784,41 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, | |||
1769 | * discard all the frames below low watermark | 1784 | * discard all the frames below low watermark |
1770 | * and start over */ | 1785 | * and start over */ |
1771 | stats->frame_drops++; | 1786 | stats->frame_drops++; |
1772 | isdn_ppp_mp_discard(mp, start, nextf); | 1787 | mp->frags = isdn_ppp_mp_discard(mp,start,nextf); |
1773 | } | 1788 | } |
1774 | /* break in the sequence, no reassembly */ | 1789 | /* break in the sequence, no reassembly */ |
1775 | start = NULL; | 1790 | start = NULL; |
1776 | } | 1791 | } |
1777 | if (!start) | 1792 | |
1778 | break; | 1793 | frag = nextf; |
1779 | } | 1794 | } /* while -- main loop */ |
1780 | 1795 | ||
1781 | check_overflow: | 1796 | if (mp->frags == NULL) |
1797 | mp->frags = frag; | ||
1798 | |||
1782 | /* rather straighforward way to deal with (not very) possible | 1799 | /* rather straighforward way to deal with (not very) possible |
1783 | * queue overflow | 1800 | * queue overflow */ |
1784 | */ | ||
1785 | if (mp->frames > MP_MAX_QUEUE_LEN) { | 1801 | if (mp->frames > MP_MAX_QUEUE_LEN) { |
1786 | stats->overflows++; | 1802 | stats->overflows++; |
1787 | skb_queue_walk_safe(&mp->frags, frag, nextf) { | 1803 | while (mp->frames > MP_MAX_QUEUE_LEN) { |
1788 | if (mp->frames <= MP_MAX_QUEUE_LEN) | 1804 | frag = mp->frags->next; |
1789 | break; | 1805 | isdn_ppp_mp_free_skb(mp, mp->frags); |
1790 | __skb_unlink(frag, &mp->frags); | 1806 | mp->frags = frag; |
1791 | isdn_ppp_mp_free_skb(mp, frag); | ||
1792 | } | 1807 | } |
1793 | } | 1808 | } |
1794 | spin_unlock_irqrestore(&mp->lock, flags); | 1809 | spin_unlock_irqrestore(&mp->lock, flags); |
1795 | } | 1810 | } |
1796 | 1811 | ||
1797 | static void isdn_ppp_mp_cleanup(isdn_net_local *lp) | 1812 | static void isdn_ppp_mp_cleanup( isdn_net_local * lp ) |
1798 | { | 1813 | { |
1799 | struct sk_buff *skb, *tmp; | 1814 | struct sk_buff * frag = lp->netdev->pb->frags; |
1800 | 1815 | struct sk_buff * nextfrag; | |
1801 | skb_queue_walk_safe(&lp->netdev->pb->frags, skb, tmp) { | 1816 | while( frag ) { |
1802 | __skb_unlink(skb, &lp->netdev->pb->frags); | 1817 | nextfrag = frag->next; |
1803 | isdn_ppp_mp_free_skb(lp->netdev->pb, skb); | 1818 | isdn_ppp_mp_free_skb(lp->netdev->pb, frag); |
1804 | } | 1819 | frag = nextfrag; |
1820 | } | ||
1821 | lp->netdev->pb->frags = NULL; | ||
1805 | } | 1822 | } |
1806 | 1823 | ||
1807 | static u32 isdn_ppp_mp_get_seq( int short_seq, | 1824 | static u32 isdn_ppp_mp_get_seq( int short_seq, |
@@ -1838,115 +1855,72 @@ static u32 isdn_ppp_mp_get_seq( int short_seq, | |||
1838 | return seq; | 1855 | return seq; |
1839 | } | 1856 | } |
1840 | 1857 | ||
1841 | static void isdn_ppp_mp_discard(ippp_bundle *mp, struct sk_buff *from, | 1858 | struct sk_buff * isdn_ppp_mp_discard( ippp_bundle * mp, |
1842 | struct sk_buff *to) | 1859 | struct sk_buff * from, struct sk_buff * to ) |
1843 | { | 1860 | { |
1844 | if (from) { | 1861 | if( from ) |
1845 | struct sk_buff *skb, *tmp; | 1862 | while (from != to) { |
1846 | int freeing = 0; | 1863 | struct sk_buff * next = from->next; |
1847 | 1864 | isdn_ppp_mp_free_skb(mp, from); | |
1848 | skb_queue_walk_safe(&mp->frags, skb, tmp) { | 1865 | from = next; |
1849 | if (skb == to) | ||
1850 | break; | ||
1851 | if (skb == from) | ||
1852 | freeing = 1; | ||
1853 | if (!freeing) | ||
1854 | continue; | ||
1855 | __skb_unlink(skb, &mp->frags); | ||
1856 | isdn_ppp_mp_free_skb(mp, skb); | ||
1857 | } | 1866 | } |
1858 | } | 1867 | return from; |
1859 | } | ||
1860 | |||
1861 | static unsigned int calc_tot_len(struct sk_buff_head *queue, | ||
1862 | struct sk_buff *from, struct sk_buff *to) | ||
1863 | { | ||
1864 | unsigned int tot_len = 0; | ||
1865 | struct sk_buff *skb; | ||
1866 | int found_start = 0; | ||
1867 | |||
1868 | skb_queue_walk(queue, skb) { | ||
1869 | if (skb == from) | ||
1870 | found_start = 1; | ||
1871 | if (!found_start) | ||
1872 | continue; | ||
1873 | tot_len += skb->len - MP_HEADER_LEN; | ||
1874 | if (skb == to) | ||
1875 | break; | ||
1876 | } | ||
1877 | return tot_len; | ||
1878 | } | 1868 | } |
1879 | 1869 | ||
1880 | /* Reassemble packet using fragments in the reassembly queue from | 1870 | void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp, |
1881 | * 'from' until 'to', inclusive. | 1871 | struct sk_buff * from, struct sk_buff * to ) |
1882 | */ | ||
1883 | static void isdn_ppp_mp_reassembly(isdn_net_dev *net_dev, isdn_net_local *lp, | ||
1884 | struct sk_buff *from, struct sk_buff *to, | ||
1885 | u32 lastseq) | ||
1886 | { | 1872 | { |
1887 | ippp_bundle *mp = net_dev->pb; | 1873 | ippp_bundle * mp = net_dev->pb; |
1888 | unsigned int tot_len; | ||
1889 | struct sk_buff *skb; | ||
1890 | int proto; | 1874 | int proto; |
1875 | struct sk_buff * skb; | ||
1876 | unsigned int tot_len; | ||
1891 | 1877 | ||
1892 | if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { | 1878 | if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { |
1893 | printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", | 1879 | printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", |
1894 | __func__, lp->ppp_slot); | 1880 | __func__, lp->ppp_slot); |
1895 | return; | 1881 | return; |
1896 | } | 1882 | } |
1897 | 1883 | if( MP_FLAGS(from) == (MP_BEGIN_FRAG | MP_END_FRAG) ) { | |
1898 | tot_len = calc_tot_len(&mp->frags, from, to); | 1884 | if( ippp_table[lp->ppp_slot]->debug & 0x40 ) |
1899 | |||
1900 | if (MP_FLAGS(from) == (MP_BEGIN_FRAG | MP_END_FRAG)) { | ||
1901 | if (ippp_table[lp->ppp_slot]->debug & 0x40) | ||
1902 | printk(KERN_DEBUG "isdn_mppp: reassembly: frame %d, " | 1885 | printk(KERN_DEBUG "isdn_mppp: reassembly: frame %d, " |
1903 | "len %d\n", MP_SEQ(from), from->len); | 1886 | "len %d\n", MP_SEQ(from), from->len ); |
1904 | skb = from; | 1887 | skb = from; |
1905 | skb_pull(skb, MP_HEADER_LEN); | 1888 | skb_pull(skb, MP_HEADER_LEN); |
1906 | __skb_unlink(skb, &mp->frags); | ||
1907 | mp->frames--; | 1889 | mp->frames--; |
1908 | } else { | 1890 | } else { |
1909 | struct sk_buff *walk, *tmp; | 1891 | struct sk_buff * frag; |
1910 | int found_start = 0; | 1892 | int n; |
1911 | 1893 | ||
1912 | if (ippp_table[lp->ppp_slot]->debug & 0x40) | 1894 | for(tot_len=n=0, frag=from; frag != to; frag=frag->next, n++) |
1913 | printk(KERN_DEBUG"isdn_mppp: reassembling frames %d " | 1895 | tot_len += frag->len - MP_HEADER_LEN; |
1914 | "to %d, len %d\n", MP_SEQ(from), lastseq, | ||
1915 | tot_len); | ||
1916 | 1896 | ||
1917 | skb = dev_alloc_skb(tot_len); | 1897 | if( ippp_table[lp->ppp_slot]->debug & 0x40 ) |
1918 | if (!skb) | 1898 | printk(KERN_DEBUG"isdn_mppp: reassembling frames %d " |
1899 | "to %d, len %d\n", MP_SEQ(from), | ||
1900 | (MP_SEQ(from)+n-1) & MP_LONGSEQ_MASK, tot_len ); | ||
1901 | if( (skb = dev_alloc_skb(tot_len)) == NULL ) { | ||
1919 | printk(KERN_ERR "isdn_mppp: cannot allocate sk buff " | 1902 | printk(KERN_ERR "isdn_mppp: cannot allocate sk buff " |
1920 | "of size %d\n", tot_len); | 1903 | "of size %d\n", tot_len); |
1921 | 1904 | isdn_ppp_mp_discard(mp, from, to); | |
1922 | found_start = 0; | 1905 | return; |
1923 | skb_queue_walk_safe(&mp->frags, walk, tmp) { | 1906 | } |
1924 | if (walk == from) | ||
1925 | found_start = 1; | ||
1926 | if (!found_start) | ||
1927 | continue; | ||
1928 | 1907 | ||
1929 | if (skb) { | 1908 | while( from != to ) { |
1930 | unsigned int len = walk->len - MP_HEADER_LEN; | 1909 | unsigned int len = from->len - MP_HEADER_LEN; |
1931 | skb_copy_from_linear_data_offset(walk, MP_HEADER_LEN, | ||
1932 | skb_put(skb, len), | ||
1933 | len); | ||
1934 | } | ||
1935 | __skb_unlink(walk, &mp->frags); | ||
1936 | isdn_ppp_mp_free_skb(mp, walk); | ||
1937 | 1910 | ||
1938 | if (walk == to) | 1911 | skb_copy_from_linear_data_offset(from, MP_HEADER_LEN, |
1939 | break; | 1912 | skb_put(skb,len), |
1913 | len); | ||
1914 | frag = from->next; | ||
1915 | isdn_ppp_mp_free_skb(mp, from); | ||
1916 | from = frag; | ||
1940 | } | 1917 | } |
1941 | } | 1918 | } |
1942 | if (!skb) | ||
1943 | return; | ||
1944 | |||
1945 | proto = isdn_ppp_strip_proto(skb); | 1919 | proto = isdn_ppp_strip_proto(skb); |
1946 | isdn_ppp_push_higher(net_dev, lp, skb, proto); | 1920 | isdn_ppp_push_higher(net_dev, lp, skb, proto); |
1947 | } | 1921 | } |
1948 | 1922 | ||
1949 | static void isdn_ppp_mp_free_skb(ippp_bundle *mp, struct sk_buff *skb) | 1923 | static void isdn_ppp_mp_free_skb(ippp_bundle * mp, struct sk_buff * skb) |
1950 | { | 1924 | { |
1951 | dev_kfree_skb(skb); | 1925 | dev_kfree_skb(skb); |
1952 | mp->frames--; | 1926 | mp->frames--; |
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 7467980b8cf9..e5225d28f392 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -78,6 +78,8 @@ static int __devinit create_gpio_led(const struct gpio_led *template, | |||
78 | { | 78 | { |
79 | int ret, state; | 79 | int ret, state; |
80 | 80 | ||
81 | led_dat->gpio = -1; | ||
82 | |||
81 | /* skip leds that aren't available */ | 83 | /* skip leds that aren't available */ |
82 | if (!gpio_is_valid(template->gpio)) { | 84 | if (!gpio_is_valid(template->gpio)) { |
83 | printk(KERN_INFO "Skipping unavailable LED gpio %d (%s)\n", | 85 | printk(KERN_INFO "Skipping unavailable LED gpio %d (%s)\n", |
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index fdb97f3d30e9..d7a47574d21e 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -209,8 +209,8 @@ static int sa1100_probe_subdev(struct sa_subdev_info *subdev, struct resource *r | |||
209 | } | 209 | } |
210 | subdev->mtd->owner = THIS_MODULE; | 210 | subdev->mtd->owner = THIS_MODULE; |
211 | 211 | ||
212 | printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %dMiB, " | 212 | printk(KERN_INFO "SA1100 flash: CFI device at 0x%08lx, %uMiB, %d-bit\n", |
213 | "%d-bit\n", phys, subdev->mtd->size >> 20, | 213 | phys, (unsigned)(subdev->mtd->size >> 20), |
214 | subdev->map.bankwidth * 8); | 214 | subdev->map.bankwidth * 8); |
215 | 215 | ||
216 | return 0; | 216 | return 0; |
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index df32c109b7ac..772f6d2489ce 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig | |||
@@ -35,66 +35,16 @@ config CAN_CALC_BITTIMING | |||
35 | arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw". | 35 | arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw". |
36 | If unsure, say Y. | 36 | If unsure, say Y. |
37 | 37 | ||
38 | config CAN_SJA1000 | ||
39 | depends on CAN_DEV && HAS_IOMEM | ||
40 | tristate "Philips SJA1000" | ||
41 | ---help--- | ||
42 | Driver for the SJA1000 CAN controllers from Philips or NXP | ||
43 | |||
44 | config CAN_SJA1000_ISA | ||
45 | depends on CAN_SJA1000 && ISA | ||
46 | tristate "ISA Bus based legacy SJA1000 driver" | ||
47 | ---help--- | ||
48 | This driver adds legacy support for SJA1000 chips connected to | ||
49 | the ISA bus using I/O port, memory mapped or indirect access. | ||
50 | |||
51 | config CAN_SJA1000_PLATFORM | ||
52 | depends on CAN_SJA1000 | ||
53 | tristate "Generic Platform Bus based SJA1000 driver" | ||
54 | ---help--- | ||
55 | This driver adds support for the SJA1000 chips connected to | ||
56 | the "platform bus" (Linux abstraction for directly to the | ||
57 | processor attached devices). Which can be found on various | ||
58 | boards from Phytec (http://www.phytec.de) like the PCM027, | ||
59 | PCM038. | ||
60 | |||
61 | config CAN_SJA1000_OF_PLATFORM | ||
62 | depends on CAN_SJA1000 && PPC_OF | ||
63 | tristate "Generic OF Platform Bus based SJA1000 driver" | ||
64 | ---help--- | ||
65 | This driver adds support for the SJA1000 chips connected to | ||
66 | the OpenFirmware "platform bus" found on embedded systems with | ||
67 | OpenFirmware bindings, e.g. if you have a PowerPC based system | ||
68 | you may want to enable this option. | ||
69 | |||
70 | config CAN_EMS_PCI | ||
71 | tristate "EMS CPC-PCI, CPC-PCIe and CPC-104P Card" | ||
72 | depends on PCI && CAN_SJA1000 | ||
73 | ---help--- | ||
74 | This driver is for the one, two or four channel CPC-PCI, | ||
75 | CPC-PCIe and CPC-104P cards from EMS Dr. Thomas Wuensche | ||
76 | (http://www.ems-wuensche.de). | ||
77 | |||
78 | config CAN_EMS_USB | ||
79 | tristate "EMS CPC-USB/ARM7 CAN/USB interface" | ||
80 | depends on USB && CAN_DEV | ||
81 | ---help--- | ||
82 | This driver is for the one channel CPC-USB/ARM7 CAN/USB interface | ||
83 | from from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de). | ||
84 | |||
85 | config CAN_KVASER_PCI | ||
86 | tristate "Kvaser PCIcanx and Kvaser PCIcan PCI Cards" | ||
87 | depends on PCI && CAN_SJA1000 | ||
88 | ---help--- | ||
89 | This driver is for the the PCIcanx and PCIcan cards (1, 2 or | ||
90 | 4 channel) from Kvaser (http://www.kvaser.com). | ||
91 | |||
92 | config CAN_AT91 | 38 | config CAN_AT91 |
93 | tristate "Atmel AT91 onchip CAN controller" | 39 | tristate "Atmel AT91 onchip CAN controller" |
94 | depends on CAN && CAN_DEV && ARCH_AT91SAM9263 | 40 | depends on CAN_DEV && ARCH_AT91SAM9263 |
95 | ---help--- | 41 | ---help--- |
96 | This is a driver for the SoC CAN controller in Atmel's AT91SAM9263. | 42 | This is a driver for the SoC CAN controller in Atmel's AT91SAM9263. |
97 | 43 | ||
44 | source "drivers/net/can/sja1000/Kconfig" | ||
45 | |||
46 | source "drivers/net/can/usb/Kconfig" | ||
47 | |||
98 | config CAN_DEBUG_DEVICES | 48 | config CAN_DEBUG_DEVICES |
99 | bool "CAN devices debugging messages" | 49 | bool "CAN devices debugging messages" |
100 | depends on CAN | 50 | depends on CAN |
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 564e31c9fee4..2868fe842a41 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c | |||
@@ -629,6 +629,11 @@ nla_put_failure: | |||
629 | return -EMSGSIZE; | 629 | return -EMSGSIZE; |
630 | } | 630 | } |
631 | 631 | ||
632 | static size_t can_get_xstats_size(const struct net_device *dev) | ||
633 | { | ||
634 | return sizeof(struct can_device_stats); | ||
635 | } | ||
636 | |||
632 | static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev) | 637 | static int can_fill_xstats(struct sk_buff *skb, const struct net_device *dev) |
633 | { | 638 | { |
634 | struct can_priv *priv = netdev_priv(dev); | 639 | struct can_priv *priv = netdev_priv(dev); |
@@ -657,6 +662,7 @@ static struct rtnl_link_ops can_link_ops __read_mostly = { | |||
657 | .changelink = can_changelink, | 662 | .changelink = can_changelink, |
658 | .get_size = can_get_size, | 663 | .get_size = can_get_size, |
659 | .fill_info = can_fill_info, | 664 | .fill_info = can_fill_info, |
665 | .get_xstats_size = can_get_xstats_size, | ||
660 | .fill_xstats = can_fill_xstats, | 666 | .fill_xstats = can_fill_xstats, |
661 | }; | 667 | }; |
662 | 668 | ||
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig new file mode 100644 index 000000000000..4c674927f247 --- /dev/null +++ b/drivers/net/can/sja1000/Kconfig | |||
@@ -0,0 +1,47 @@ | |||
1 | menuconfig CAN_SJA1000 | ||
2 | tristate "Philips/NXP SJA1000 devices" | ||
3 | depends on CAN_DEV && HAS_IOMEM | ||
4 | |||
5 | if CAN_SJA1000 | ||
6 | |||
7 | config CAN_SJA1000_ISA | ||
8 | tristate "ISA Bus based legacy SJA1000 driver" | ||
9 | depends on ISA | ||
10 | ---help--- | ||
11 | This driver adds legacy support for SJA1000 chips connected to | ||
12 | the ISA bus using I/O port, memory mapped or indirect access. | ||
13 | |||
14 | config CAN_SJA1000_PLATFORM | ||
15 | tristate "Generic Platform Bus based SJA1000 driver" | ||
16 | ---help--- | ||
17 | This driver adds support for the SJA1000 chips connected to | ||
18 | the "platform bus" (Linux abstraction for directly to the | ||
19 | processor attached devices). Which can be found on various | ||
20 | boards from Phytec (http://www.phytec.de) like the PCM027, | ||
21 | PCM038. | ||
22 | |||
23 | config CAN_SJA1000_OF_PLATFORM | ||
24 | tristate "Generic OF Platform Bus based SJA1000 driver" | ||
25 | depends on PPC_OF | ||
26 | ---help--- | ||
27 | This driver adds support for the SJA1000 chips connected to | ||
28 | the OpenFirmware "platform bus" found on embedded systems with | ||
29 | OpenFirmware bindings, e.g. if you have a PowerPC based system | ||
30 | you may want to enable this option. | ||
31 | |||
32 | config CAN_EMS_PCI | ||
33 | tristate "EMS CPC-PCI, CPC-PCIe and CPC-104P Card" | ||
34 | depends on PCI | ||
35 | ---help--- | ||
36 | This driver is for the one, two or four channel CPC-PCI, | ||
37 | CPC-PCIe and CPC-104P cards from EMS Dr. Thomas Wuensche | ||
38 | (http://www.ems-wuensche.de). | ||
39 | |||
40 | config CAN_KVASER_PCI | ||
41 | tristate "Kvaser PCIcanx and Kvaser PCIcan PCI Cards" | ||
42 | depends on PCI | ||
43 | ---help--- | ||
44 | This driver is for the the PCIcanx and PCIcan cards (1, 2 or | ||
45 | 4 channel) from Kvaser (http://www.kvaser.com). | ||
46 | |||
47 | endif | ||
diff --git a/drivers/net/can/usb/Kconfig b/drivers/net/can/usb/Kconfig new file mode 100644 index 000000000000..bbc78e0b8a15 --- /dev/null +++ b/drivers/net/can/usb/Kconfig | |||
@@ -0,0 +1,10 @@ | |||
1 | menu "CAN USB interfaces" | ||
2 | depends on USB && CAN_DEV | ||
3 | |||
4 | config CAN_EMS_USB | ||
5 | tristate "EMS CPC-USB/ARM7 CAN/USB interface" | ||
6 | ---help--- | ||
7 | This driver is for the one channel CPC-USB/ARM7 CAN/USB interface | ||
8 | from from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de). | ||
9 | |||
10 | endmenu | ||
diff --git a/drivers/net/can/usb/Makefile b/drivers/net/can/usb/Makefile index c3f75ba701b1..0afd51d4c7a5 100644 --- a/drivers/net/can/usb/Makefile +++ b/drivers/net/can/usb/Makefile | |||
@@ -3,3 +3,5 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_CAN_EMS_USB) += ems_usb.o | 5 | obj-$(CONFIG_CAN_EMS_USB) += ems_usb.o |
6 | |||
7 | ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG | ||
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index f86612857a73..6366061712f4 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -879,7 +879,7 @@ recycle: | |||
879 | pci_dma_sync_single_for_cpu(adap->pdev, dma_addr, len, | 879 | pci_dma_sync_single_for_cpu(adap->pdev, dma_addr, len, |
880 | PCI_DMA_FROMDEVICE); | 880 | PCI_DMA_FROMDEVICE); |
881 | (*sd->pg_chunk.p_cnt)--; | 881 | (*sd->pg_chunk.p_cnt)--; |
882 | if (!*sd->pg_chunk.p_cnt) | 882 | if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page) |
883 | pci_unmap_page(adap->pdev, | 883 | pci_unmap_page(adap->pdev, |
884 | sd->pg_chunk.mapping, | 884 | sd->pg_chunk.mapping, |
885 | fl->alloc_size, | 885 | fl->alloc_size, |
@@ -2088,7 +2088,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2088 | PCI_DMA_FROMDEVICE); | 2088 | PCI_DMA_FROMDEVICE); |
2089 | 2089 | ||
2090 | (*sd->pg_chunk.p_cnt)--; | 2090 | (*sd->pg_chunk.p_cnt)--; |
2091 | if (!*sd->pg_chunk.p_cnt) | 2091 | if (!*sd->pg_chunk.p_cnt && sd->pg_chunk.page != fl->pg_chunk.page) |
2092 | pci_unmap_page(adap->pdev, | 2092 | pci_unmap_page(adap->pdev, |
2093 | sd->pg_chunk.mapping, | 2093 | sd->pg_chunk.mapping, |
2094 | fl->alloc_size, | 2094 | fl->alloc_size, |
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 3179521aee90..db6380379478 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -2140,9 +2140,6 @@ static int emac_poll(struct napi_struct *napi, int budget) | |||
2140 | u32 status = 0; | 2140 | u32 status = 0; |
2141 | u32 num_pkts = 0; | 2141 | u32 num_pkts = 0; |
2142 | 2142 | ||
2143 | if (!netif_running(ndev)) | ||
2144 | return 0; | ||
2145 | |||
2146 | /* Check interrupt vectors and call packet processing */ | 2143 | /* Check interrupt vectors and call packet processing */ |
2147 | status = emac_read(EMAC_MACINVECTOR); | 2144 | status = emac_read(EMAC_MACINVECTOR); |
2148 | 2145 | ||
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index e1da4666f204..3116601dbfea 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -5821,10 +5821,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5821 | dev->dev_addr); | 5821 | dev->dev_addr); |
5822 | dev_printk(KERN_ERR, &pci_dev->dev, | 5822 | dev_printk(KERN_ERR, &pci_dev->dev, |
5823 | "Please complain to your hardware vendor. Switching to a random MAC.\n"); | 5823 | "Please complain to your hardware vendor. Switching to a random MAC.\n"); |
5824 | dev->dev_addr[0] = 0x00; | 5824 | random_ether_addr(dev->dev_addr); |
5825 | dev->dev_addr[1] = 0x00; | ||
5826 | dev->dev_addr[2] = 0x6c; | ||
5827 | get_random_bytes(&dev->dev_addr[3], 3); | ||
5828 | } | 5825 | } |
5829 | 5826 | ||
5830 | dprintk(KERN_DEBUG "%s: MAC Address %pM\n", | 5827 | dprintk(KERN_DEBUG "%s: MAC Address %pM\n", |
diff --git a/drivers/net/ibm_newemac/emac.h b/drivers/net/ibm_newemac/emac.h index d34adf99fc6a..8a61b597a169 100644 --- a/drivers/net/ibm_newemac/emac.h +++ b/drivers/net/ibm_newemac/emac.h | |||
@@ -263,8 +263,8 @@ struct emac_regs { | |||
263 | 263 | ||
264 | 264 | ||
265 | /* EMACx_TRTR */ | 265 | /* EMACx_TRTR */ |
266 | #define EMAC_TRTR_SHIFT_EMAC4 27 | 266 | #define EMAC_TRTR_SHIFT_EMAC4 24 |
267 | #define EMAC_TRTR_SHIFT 24 | 267 | #define EMAC_TRTR_SHIFT 27 |
268 | 268 | ||
269 | /* EMAC specific TX descriptor control fields (write access) */ | 269 | /* EMAC specific TX descriptor control fields (write access) */ |
270 | #define EMAC_TX_CTRL_GFCS 0x0200 | 270 | #define EMAC_TX_CTRL_GFCS 0x0200 |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 5bd9e6bf6f2f..a5036f7c1923 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5994,6 +5994,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) | |||
5994 | } else { | 5994 | } else { |
5995 | pci_set_master(pdev); | 5995 | pci_set_master(pdev); |
5996 | pci_restore_state(pdev); | 5996 | pci_restore_state(pdev); |
5997 | pci_save_state(pdev); | ||
5997 | 5998 | ||
5998 | pci_wake_from_d3(pdev, false); | 5999 | pci_wake_from_d3(pdev, false); |
5999 | 6000 | ||
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 8659d341e769..35897134a5dd 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -139,7 +139,7 @@ out: | |||
139 | return NULL; | 139 | return NULL; |
140 | } | 140 | } |
141 | 141 | ||
142 | static void __devinit mdio_gpio_bus_deinit(struct device *dev) | 142 | static void mdio_gpio_bus_deinit(struct device *dev) |
143 | { | 143 | { |
144 | struct mii_bus *bus = dev_get_drvdata(dev); | 144 | struct mii_bus *bus = dev_get_drvdata(dev); |
145 | struct mdio_gpio_info *bitbang = bus->priv; | 145 | struct mdio_gpio_info *bitbang = bus->priv; |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 9bf2a6be9031..965adb6174c3 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1944,8 +1944,15 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | /* Pull completed packets off the queue and receive them. */ | 1946 | /* Pull completed packets off the queue and receive them. */ |
1947 | while ((skb = ppp_mp_reconstruct(ppp))) | 1947 | while ((skb = ppp_mp_reconstruct(ppp))) { |
1948 | ppp_receive_nonmp_frame(ppp, skb); | 1948 | if (pskb_may_pull(skb, 2)) |
1949 | ppp_receive_nonmp_frame(ppp, skb); | ||
1950 | else { | ||
1951 | ++ppp->dev->stats.rx_length_errors; | ||
1952 | kfree_skb(skb); | ||
1953 | ppp_receive_error(ppp); | ||
1954 | } | ||
1955 | } | ||
1949 | 1956 | ||
1950 | return; | 1957 | return; |
1951 | 1958 | ||
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 7dfcb58b0eb4..8b14c6eda7c3 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -1085,7 +1085,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, | |||
1085 | int bar = 0; | 1085 | int bar = 0; |
1086 | u16 *adrp; | 1086 | u16 *adrp; |
1087 | 1087 | ||
1088 | printk(KERN_INFO "%s\n", version); | 1088 | printk("%s\n", version); |
1089 | 1089 | ||
1090 | err = pci_enable_device(pdev); | 1090 | err = pci_enable_device(pdev); |
1091 | if (err) | 1091 | if (err) |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index fa4935678488..b9221bdc7184 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3243,9 +3243,9 @@ static void __devexit rtl8169_remove_one(struct pci_dev *pdev) | |||
3243 | static void rtl8169_set_rxbufsize(struct rtl8169_private *tp, | 3243 | static void rtl8169_set_rxbufsize(struct rtl8169_private *tp, |
3244 | struct net_device *dev) | 3244 | struct net_device *dev) |
3245 | { | 3245 | { |
3246 | unsigned int mtu = dev->mtu; | 3246 | unsigned int max_frame = dev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN; |
3247 | 3247 | ||
3248 | tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE; | 3248 | tp->rx_buf_sz = (max_frame > RX_BUF_SIZE) ? max_frame : RX_BUF_SIZE; |
3249 | } | 3249 | } |
3250 | 3250 | ||
3251 | static int rtl8169_open(struct net_device *dev) | 3251 | static int rtl8169_open(struct net_device *dev) |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index ddccf5fa56b6..0dd7839322bc 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -3494,6 +3494,7 @@ static void s2io_reset(struct s2io_nic *sp) | |||
3494 | 3494 | ||
3495 | /* Restore the PCI state saved during initialization. */ | 3495 | /* Restore the PCI state saved during initialization. */ |
3496 | pci_restore_state(sp->pdev); | 3496 | pci_restore_state(sp->pdev); |
3497 | pci_save_state(sp->pdev); | ||
3497 | pci_read_config_word(sp->pdev, 0x2, &val16); | 3498 | pci_read_config_word(sp->pdev, 0x2, &val16); |
3498 | if (check_pci_device_id(val16) != (u16)PCI_ANY_ID) | 3499 | if (check_pci_device_id(val16) != (u16)PCI_ANY_ID) |
3499 | break; | 3500 | break; |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index ccdd196f5297..f9cdcbcb77d4 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -986,7 +986,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) | |||
986 | struct net_device *dev = pdata->dev; | 986 | struct net_device *dev = pdata->dev; |
987 | int npackets = 0; | 987 | int npackets = 0; |
988 | 988 | ||
989 | while (likely(netif_running(dev)) && (npackets < budget)) { | 989 | while (npackets < budget) { |
990 | unsigned int pktlength; | 990 | unsigned int pktlength; |
991 | unsigned int pktwords; | 991 | unsigned int pktwords; |
992 | struct sk_buff *skb; | 992 | struct sk_buff *skb; |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 7019a0d1a82b..61640b99b705 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2063,7 +2063,15 @@ static int gem_check_invariants(struct gem *gp) | |||
2063 | mif_cfg &= ~MIF_CFG_PSELECT; | 2063 | mif_cfg &= ~MIF_CFG_PSELECT; |
2064 | writel(mif_cfg, gp->regs + MIF_CFG); | 2064 | writel(mif_cfg, gp->regs + MIF_CFG); |
2065 | } else { | 2065 | } else { |
2066 | gp->phy_type = phy_serialink; | 2066 | #ifdef CONFIG_SPARC |
2067 | const char *p; | ||
2068 | |||
2069 | p = of_get_property(gp->of_node, "shared-pins", NULL); | ||
2070 | if (p && !strcmp(p, "serdes")) | ||
2071 | gp->phy_type = phy_serdes; | ||
2072 | else | ||
2073 | #endif | ||
2074 | gp->phy_type = phy_serialink; | ||
2067 | } | 2075 | } |
2068 | if (gp->phy_type == phy_mii_mdio1 || | 2076 | if (gp->phy_type == phy_mii_mdio1 || |
2069 | gp->phy_type == phy_mii_mdio0) { | 2077 | gp->phy_type == phy_mii_mdio0) { |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 9c6ab5378f6e..95a8e232b58f 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -1125,7 +1125,6 @@ ath5k_mode_setup(struct ath5k_softc *sc) | |||
1125 | /* configure operational mode */ | 1125 | /* configure operational mode */ |
1126 | ath5k_hw_set_opmode(ah); | 1126 | ath5k_hw_set_opmode(ah); |
1127 | 1127 | ||
1128 | ath5k_hw_set_mcast_filter(ah, 0, 0); | ||
1129 | ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "RX filter 0x%x\n", rfilt); | 1128 | ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "RX filter 0x%x\n", rfilt); |
1130 | } | 1129 | } |
1131 | 1130 | ||
diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c index b767c3b67b24..b548c8eaaae1 100644 --- a/drivers/net/wireless/ath/ath5k/led.c +++ b/drivers/net/wireless/ath/ath5k/led.c | |||
@@ -63,12 +63,16 @@ static const struct pci_device_id ath5k_led_devices[] = { | |||
63 | { ATH_SDEVICE(PCI_VENDOR_ID_AMBIT, 0x0422), ATH_LED(1, 1) }, | 63 | { ATH_SDEVICE(PCI_VENDOR_ID_AMBIT, 0x0422), ATH_LED(1, 1) }, |
64 | /* E-machines E510 (tuliom@gmail.com) */ | 64 | /* E-machines E510 (tuliom@gmail.com) */ |
65 | { ATH_SDEVICE(PCI_VENDOR_ID_AMBIT, 0x0428), ATH_LED(3, 0) }, | 65 | { ATH_SDEVICE(PCI_VENDOR_ID_AMBIT, 0x0428), ATH_LED(3, 0) }, |
66 | /* BenQ Joybook R55v (nowymarluk@wp.pl) */ | ||
67 | { ATH_SDEVICE(PCI_VENDOR_ID_QMI, 0x0100), ATH_LED(1, 0) }, | ||
66 | /* Acer Extensa 5620z (nekoreeve@gmail.com) */ | 68 | /* Acer Extensa 5620z (nekoreeve@gmail.com) */ |
67 | { ATH_SDEVICE(PCI_VENDOR_ID_QMI, 0x0105), ATH_LED(3, 0) }, | 69 | { ATH_SDEVICE(PCI_VENDOR_ID_QMI, 0x0105), ATH_LED(3, 0) }, |
68 | /* Fukato Datacask Jupiter 1014a (mrb74@gmx.at) */ | 70 | /* Fukato Datacask Jupiter 1014a (mrb74@gmx.at) */ |
69 | { ATH_SDEVICE(PCI_VENDOR_ID_AZWAVE, 0x1026), ATH_LED(3, 0) }, | 71 | { ATH_SDEVICE(PCI_VENDOR_ID_AZWAVE, 0x1026), ATH_LED(3, 0) }, |
70 | /* IBM ThinkPad AR5BXB6 (legovini@spiro.fisica.unipd.it) */ | 72 | /* IBM ThinkPad AR5BXB6 (legovini@spiro.fisica.unipd.it) */ |
71 | { ATH_SDEVICE(PCI_VENDOR_ID_IBM, 0x058a), ATH_LED(1, 0) }, | 73 | { ATH_SDEVICE(PCI_VENDOR_ID_IBM, 0x058a), ATH_LED(1, 0) }, |
74 | /* HP Compaq CQ60-206US (ddreggors@jumptv.com) */ | ||
75 | { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137a), ATH_LED(3, 1) }, | ||
72 | /* HP Compaq C700 (nitrousnrg@gmail.com) */ | 76 | /* HP Compaq C700 (nitrousnrg@gmail.com) */ |
73 | { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 1) }, | 77 | { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 1) }, |
74 | /* IBM-specific AR5212 (all others) */ | 78 | /* IBM-specific AR5212 (all others) */ |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 86f35827f008..098dda1a67c1 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -4521,9 +4521,8 @@ static int b43_op_beacon_set_tim(struct ieee80211_hw *hw, | |||
4521 | { | 4521 | { |
4522 | struct b43_wl *wl = hw_to_b43_wl(hw); | 4522 | struct b43_wl *wl = hw_to_b43_wl(hw); |
4523 | 4523 | ||
4524 | mutex_lock(&wl->mutex); | 4524 | /* FIXME: add locking */ |
4525 | b43_update_templates(wl); | 4525 | b43_update_templates(wl); |
4526 | mutex_unlock(&wl->mutex); | ||
4527 | 4526 | ||
4528 | return 0; | 4527 | return 0; |
4529 | } | 4528 | } |
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 240cff1e6979..6e2fc0cb6f8a 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -6029,7 +6029,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6029 | struct ipw2100_priv *priv; | 6029 | struct ipw2100_priv *priv; |
6030 | struct net_device *dev; | 6030 | struct net_device *dev; |
6031 | 6031 | ||
6032 | dev = alloc_ieee80211(sizeof(struct ipw2100_priv), 0); | 6032 | dev = alloc_ieee80211(sizeof(struct ipw2100_priv)); |
6033 | if (!dev) | 6033 | if (!dev) |
6034 | return NULL; | 6034 | return NULL; |
6035 | priv = libipw_priv(dev); | 6035 | priv = libipw_priv(dev); |
@@ -6342,7 +6342,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
6342 | sysfs_remove_group(&pci_dev->dev.kobj, | 6342 | sysfs_remove_group(&pci_dev->dev.kobj, |
6343 | &ipw2100_attribute_group); | 6343 | &ipw2100_attribute_group); |
6344 | 6344 | ||
6345 | free_ieee80211(dev, 0); | 6345 | free_ieee80211(dev); |
6346 | pci_set_drvdata(pci_dev, NULL); | 6346 | pci_set_drvdata(pci_dev, NULL); |
6347 | } | 6347 | } |
6348 | 6348 | ||
@@ -6400,7 +6400,7 @@ static void __devexit ipw2100_pci_remove_one(struct pci_dev *pci_dev) | |||
6400 | if (dev->base_addr) | 6400 | if (dev->base_addr) |
6401 | iounmap((void __iomem *)dev->base_addr); | 6401 | iounmap((void __iomem *)dev->base_addr); |
6402 | 6402 | ||
6403 | free_ieee80211(dev, 0); | 6403 | free_ieee80211(dev); |
6404 | } | 6404 | } |
6405 | 6405 | ||
6406 | pci_release_regions(pci_dev); | 6406 | pci_release_regions(pci_dev); |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 827824d45de9..a6ca536e44f8 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -104,25 +104,6 @@ static int antenna = CFG_SYS_ANTENNA_BOTH; | |||
104 | static int rtap_iface = 0; /* def: 0 -- do not create rtap interface */ | 104 | static int rtap_iface = 0; /* def: 0 -- do not create rtap interface */ |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | static struct ieee80211_rate ipw2200_rates[] = { | ||
108 | { .bitrate = 10 }, | ||
109 | { .bitrate = 20, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, | ||
110 | { .bitrate = 55, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, | ||
111 | { .bitrate = 110, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, | ||
112 | { .bitrate = 60 }, | ||
113 | { .bitrate = 90 }, | ||
114 | { .bitrate = 120 }, | ||
115 | { .bitrate = 180 }, | ||
116 | { .bitrate = 240 }, | ||
117 | { .bitrate = 360 }, | ||
118 | { .bitrate = 480 }, | ||
119 | { .bitrate = 540 } | ||
120 | }; | ||
121 | |||
122 | #define ipw2200_a_rates (ipw2200_rates + 4) | ||
123 | #define ipw2200_num_a_rates 8 | ||
124 | #define ipw2200_bg_rates (ipw2200_rates + 0) | ||
125 | #define ipw2200_num_bg_rates 12 | ||
126 | 107 | ||
127 | #ifdef CONFIG_IPW2200_QOS | 108 | #ifdef CONFIG_IPW2200_QOS |
128 | static int qos_enable = 0; | 109 | static int qos_enable = 0; |
@@ -8674,6 +8655,24 @@ static int ipw_sw_reset(struct ipw_priv *priv, int option) | |||
8674 | * | 8655 | * |
8675 | */ | 8656 | */ |
8676 | 8657 | ||
8658 | static int ipw_wx_get_name(struct net_device *dev, | ||
8659 | struct iw_request_info *info, | ||
8660 | union iwreq_data *wrqu, char *extra) | ||
8661 | { | ||
8662 | struct ipw_priv *priv = libipw_priv(dev); | ||
8663 | mutex_lock(&priv->mutex); | ||
8664 | if (priv->status & STATUS_RF_KILL_MASK) | ||
8665 | strcpy(wrqu->name, "radio off"); | ||
8666 | else if (!(priv->status & STATUS_ASSOCIATED)) | ||
8667 | strcpy(wrqu->name, "unassociated"); | ||
8668 | else | ||
8669 | snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11%c", | ||
8670 | ipw_modes[priv->assoc_request.ieee_mode]); | ||
8671 | IPW_DEBUG_WX("Name: %s\n", wrqu->name); | ||
8672 | mutex_unlock(&priv->mutex); | ||
8673 | return 0; | ||
8674 | } | ||
8675 | |||
8677 | static int ipw_set_channel(struct ipw_priv *priv, u8 channel) | 8676 | static int ipw_set_channel(struct ipw_priv *priv, u8 channel) |
8678 | { | 8677 | { |
8679 | if (channel == 0) { | 8678 | if (channel == 0) { |
@@ -9973,7 +9972,7 @@ static int ipw_wx_sw_reset(struct net_device *dev, | |||
9973 | /* Rebase the WE IOCTLs to zero for the handler array */ | 9972 | /* Rebase the WE IOCTLs to zero for the handler array */ |
9974 | #define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT] | 9973 | #define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT] |
9975 | static iw_handler ipw_wx_handlers[] = { | 9974 | static iw_handler ipw_wx_handlers[] = { |
9976 | IW_IOCTL(SIOCGIWNAME) = (iw_handler) cfg80211_wext_giwname, | 9975 | IW_IOCTL(SIOCGIWNAME) = ipw_wx_get_name, |
9977 | IW_IOCTL(SIOCSIWFREQ) = ipw_wx_set_freq, | 9976 | IW_IOCTL(SIOCSIWFREQ) = ipw_wx_set_freq, |
9978 | IW_IOCTL(SIOCGIWFREQ) = ipw_wx_get_freq, | 9977 | IW_IOCTL(SIOCGIWFREQ) = ipw_wx_get_freq, |
9979 | IW_IOCTL(SIOCSIWMODE) = ipw_wx_set_mode, | 9978 | IW_IOCTL(SIOCSIWMODE) = ipw_wx_set_mode, |
@@ -11417,100 +11416,16 @@ static void ipw_bg_down(struct work_struct *work) | |||
11417 | /* Called by register_netdev() */ | 11416 | /* Called by register_netdev() */ |
11418 | static int ipw_net_init(struct net_device *dev) | 11417 | static int ipw_net_init(struct net_device *dev) |
11419 | { | 11418 | { |
11420 | int i, rc = 0; | ||
11421 | struct ipw_priv *priv = libipw_priv(dev); | 11419 | struct ipw_priv *priv = libipw_priv(dev); |
11422 | const struct libipw_geo *geo = libipw_get_geo(priv->ieee); | ||
11423 | struct wireless_dev *wdev = &priv->ieee->wdev; | ||
11424 | mutex_lock(&priv->mutex); | 11420 | mutex_lock(&priv->mutex); |
11425 | 11421 | ||
11426 | if (ipw_up(priv)) { | 11422 | if (ipw_up(priv)) { |
11427 | rc = -EIO; | 11423 | mutex_unlock(&priv->mutex); |
11428 | goto out; | 11424 | return -EIO; |
11429 | } | ||
11430 | |||
11431 | memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); | ||
11432 | |||
11433 | /* fill-out priv->ieee->bg_band */ | ||
11434 | if (geo->bg_channels) { | ||
11435 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; | ||
11436 | |||
11437 | bg_band->band = IEEE80211_BAND_2GHZ; | ||
11438 | bg_band->n_channels = geo->bg_channels; | ||
11439 | bg_band->channels = | ||
11440 | kzalloc(geo->bg_channels * | ||
11441 | sizeof(struct ieee80211_channel), GFP_KERNEL); | ||
11442 | /* translate geo->bg to bg_band.channels */ | ||
11443 | for (i = 0; i < geo->bg_channels; i++) { | ||
11444 | bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | ||
11445 | bg_band->channels[i].center_freq = geo->bg[i].freq; | ||
11446 | bg_band->channels[i].hw_value = geo->bg[i].channel; | ||
11447 | bg_band->channels[i].max_power = geo->bg[i].max_power; | ||
11448 | if (geo->bg[i].flags & LIBIPW_CH_PASSIVE_ONLY) | ||
11449 | bg_band->channels[i].flags |= | ||
11450 | IEEE80211_CHAN_PASSIVE_SCAN; | ||
11451 | if (geo->bg[i].flags & LIBIPW_CH_NO_IBSS) | ||
11452 | bg_band->channels[i].flags |= | ||
11453 | IEEE80211_CHAN_NO_IBSS; | ||
11454 | if (geo->bg[i].flags & LIBIPW_CH_RADAR_DETECT) | ||
11455 | bg_band->channels[i].flags |= | ||
11456 | IEEE80211_CHAN_RADAR; | ||
11457 | /* No equivalent for LIBIPW_CH_80211H_RULES, | ||
11458 | LIBIPW_CH_UNIFORM_SPREADING, or | ||
11459 | LIBIPW_CH_B_ONLY... */ | ||
11460 | } | ||
11461 | /* point at bitrate info */ | ||
11462 | bg_band->bitrates = ipw2200_bg_rates; | ||
11463 | bg_band->n_bitrates = ipw2200_num_bg_rates; | ||
11464 | |||
11465 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; | ||
11466 | } | ||
11467 | |||
11468 | /* fill-out priv->ieee->a_band */ | ||
11469 | if (geo->a_channels) { | ||
11470 | struct ieee80211_supported_band *a_band = &priv->ieee->a_band; | ||
11471 | |||
11472 | a_band->band = IEEE80211_BAND_5GHZ; | ||
11473 | a_band->n_channels = geo->a_channels; | ||
11474 | a_band->channels = | ||
11475 | kzalloc(geo->a_channels * | ||
11476 | sizeof(struct ieee80211_channel), GFP_KERNEL); | ||
11477 | /* translate geo->bg to a_band.channels */ | ||
11478 | for (i = 0; i < geo->a_channels; i++) { | ||
11479 | a_band->channels[i].band = IEEE80211_BAND_2GHZ; | ||
11480 | a_band->channels[i].center_freq = geo->a[i].freq; | ||
11481 | a_band->channels[i].hw_value = geo->a[i].channel; | ||
11482 | a_band->channels[i].max_power = geo->a[i].max_power; | ||
11483 | if (geo->a[i].flags & LIBIPW_CH_PASSIVE_ONLY) | ||
11484 | a_band->channels[i].flags |= | ||
11485 | IEEE80211_CHAN_PASSIVE_SCAN; | ||
11486 | if (geo->a[i].flags & LIBIPW_CH_NO_IBSS) | ||
11487 | a_band->channels[i].flags |= | ||
11488 | IEEE80211_CHAN_NO_IBSS; | ||
11489 | if (geo->a[i].flags & LIBIPW_CH_RADAR_DETECT) | ||
11490 | a_band->channels[i].flags |= | ||
11491 | IEEE80211_CHAN_RADAR; | ||
11492 | /* No equivalent for LIBIPW_CH_80211H_RULES, | ||
11493 | LIBIPW_CH_UNIFORM_SPREADING, or | ||
11494 | LIBIPW_CH_B_ONLY... */ | ||
11495 | } | ||
11496 | /* point at bitrate info */ | ||
11497 | a_band->bitrates = ipw2200_a_rates; | ||
11498 | a_band->n_bitrates = ipw2200_num_a_rates; | ||
11499 | |||
11500 | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band; | ||
11501 | } | ||
11502 | |||
11503 | set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev); | ||
11504 | |||
11505 | /* With that information in place, we can now register the wiphy... */ | ||
11506 | if (wiphy_register(wdev->wiphy)) { | ||
11507 | rc = -EIO; | ||
11508 | goto out; | ||
11509 | } | 11425 | } |
11510 | 11426 | ||
11511 | out: | ||
11512 | mutex_unlock(&priv->mutex); | 11427 | mutex_unlock(&priv->mutex); |
11513 | return rc; | 11428 | return 0; |
11514 | } | 11429 | } |
11515 | 11430 | ||
11516 | /* PCI driver stuff */ | 11431 | /* PCI driver stuff */ |
@@ -11641,7 +11556,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11641 | if (priv->prom_net_dev) | 11556 | if (priv->prom_net_dev) |
11642 | return -EPERM; | 11557 | return -EPERM; |
11643 | 11558 | ||
11644 | priv->prom_net_dev = alloc_ieee80211(sizeof(struct ipw_prom_priv), 1); | 11559 | priv->prom_net_dev = alloc_ieee80211(sizeof(struct ipw_prom_priv)); |
11645 | if (priv->prom_net_dev == NULL) | 11560 | if (priv->prom_net_dev == NULL) |
11646 | return -ENOMEM; | 11561 | return -ENOMEM; |
11647 | 11562 | ||
@@ -11660,7 +11575,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv) | |||
11660 | 11575 | ||
11661 | rc = register_netdev(priv->prom_net_dev); | 11576 | rc = register_netdev(priv->prom_net_dev); |
11662 | if (rc) { | 11577 | if (rc) { |
11663 | free_ieee80211(priv->prom_net_dev, 1); | 11578 | free_ieee80211(priv->prom_net_dev); |
11664 | priv->prom_net_dev = NULL; | 11579 | priv->prom_net_dev = NULL; |
11665 | return rc; | 11580 | return rc; |
11666 | } | 11581 | } |
@@ -11674,7 +11589,7 @@ static void ipw_prom_free(struct ipw_priv *priv) | |||
11674 | return; | 11589 | return; |
11675 | 11590 | ||
11676 | unregister_netdev(priv->prom_net_dev); | 11591 | unregister_netdev(priv->prom_net_dev); |
11677 | free_ieee80211(priv->prom_net_dev, 1); | 11592 | free_ieee80211(priv->prom_net_dev); |
11678 | 11593 | ||
11679 | priv->prom_net_dev = NULL; | 11594 | priv->prom_net_dev = NULL; |
11680 | } | 11595 | } |
@@ -11702,7 +11617,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11702 | struct ipw_priv *priv; | 11617 | struct ipw_priv *priv; |
11703 | int i; | 11618 | int i; |
11704 | 11619 | ||
11705 | net_dev = alloc_ieee80211(sizeof(struct ipw_priv), 0); | 11620 | net_dev = alloc_ieee80211(sizeof(struct ipw_priv)); |
11706 | if (net_dev == NULL) { | 11621 | if (net_dev == NULL) { |
11707 | err = -ENOMEM; | 11622 | err = -ENOMEM; |
11708 | goto out; | 11623 | goto out; |
@@ -11850,7 +11765,7 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev, | |||
11850 | pci_disable_device(pdev); | 11765 | pci_disable_device(pdev); |
11851 | pci_set_drvdata(pdev, NULL); | 11766 | pci_set_drvdata(pdev, NULL); |
11852 | out_free_ieee80211: | 11767 | out_free_ieee80211: |
11853 | free_ieee80211(priv->net_dev, 0); | 11768 | free_ieee80211(priv->net_dev); |
11854 | out: | 11769 | out: |
11855 | return err; | 11770 | return err; |
11856 | } | 11771 | } |
@@ -11917,7 +11832,7 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev) | |||
11917 | pci_release_regions(pdev); | 11832 | pci_release_regions(pdev); |
11918 | pci_disable_device(pdev); | 11833 | pci_disable_device(pdev); |
11919 | pci_set_drvdata(pdev, NULL); | 11834 | pci_set_drvdata(pdev, NULL); |
11920 | free_ieee80211(priv->net_dev, 0); | 11835 | free_ieee80211(priv->net_dev); |
11921 | free_firmware(); | 11836 | free_firmware(); |
11922 | } | 11837 | } |
11923 | 11838 | ||
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h index bf45391172f3..1e334ff6bd52 100644 --- a/drivers/net/wireless/ipw2x00/libipw.h +++ b/drivers/net/wireless/ipw2x00/libipw.h | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/ieee80211.h> | 31 | #include <linux/ieee80211.h> |
32 | 32 | ||
33 | #include <net/lib80211.h> | 33 | #include <net/lib80211.h> |
34 | #include <net/cfg80211.h> | ||
35 | 34 | ||
36 | #define LIBIPW_VERSION "git-1.1.13" | 35 | #define LIBIPW_VERSION "git-1.1.13" |
37 | 36 | ||
@@ -784,15 +783,12 @@ struct libipw_geo { | |||
784 | 783 | ||
785 | struct libipw_device { | 784 | struct libipw_device { |
786 | struct net_device *dev; | 785 | struct net_device *dev; |
787 | struct wireless_dev wdev; | ||
788 | struct libipw_security sec; | 786 | struct libipw_security sec; |
789 | 787 | ||
790 | /* Bookkeeping structures */ | 788 | /* Bookkeeping structures */ |
791 | struct libipw_stats ieee_stats; | 789 | struct libipw_stats ieee_stats; |
792 | 790 | ||
793 | struct libipw_geo geo; | 791 | struct libipw_geo geo; |
794 | struct ieee80211_supported_band bg_band; | ||
795 | struct ieee80211_supported_band a_band; | ||
796 | 792 | ||
797 | /* Probe / Beacon management */ | 793 | /* Probe / Beacon management */ |
798 | struct list_head network_free_list; | 794 | struct list_head network_free_list; |
@@ -1018,8 +1014,8 @@ static inline int libipw_is_cck_rate(u8 rate) | |||
1018 | } | 1014 | } |
1019 | 1015 | ||
1020 | /* ieee80211.c */ | 1016 | /* ieee80211.c */ |
1021 | extern void free_ieee80211(struct net_device *dev, int monitor); | 1017 | extern void free_ieee80211(struct net_device *dev); |
1022 | extern struct net_device *alloc_ieee80211(int sizeof_priv, int monitor); | 1018 | extern struct net_device *alloc_ieee80211(int sizeof_priv); |
1023 | extern int libipw_change_mtu(struct net_device *dev, int new_mtu); | 1019 | extern int libipw_change_mtu(struct net_device *dev, int new_mtu); |
1024 | 1020 | ||
1025 | extern void libipw_networks_age(struct libipw_device *ieee, | 1021 | extern void libipw_networks_age(struct libipw_device *ieee, |
diff --git a/drivers/net/wireless/ipw2x00/libipw_module.c b/drivers/net/wireless/ipw2x00/libipw_module.c index a0e9f6aed7da..eb2b60834c17 100644 --- a/drivers/net/wireless/ipw2x00/libipw_module.c +++ b/drivers/net/wireless/ipw2x00/libipw_module.c | |||
@@ -62,9 +62,6 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION); | |||
62 | MODULE_AUTHOR(DRV_COPYRIGHT); | 62 | MODULE_AUTHOR(DRV_COPYRIGHT); |
63 | MODULE_LICENSE("GPL"); | 63 | MODULE_LICENSE("GPL"); |
64 | 64 | ||
65 | struct cfg80211_ops libipw_config_ops = { }; | ||
66 | void *libipw_wiphy_privid = &libipw_wiphy_privid; | ||
67 | |||
68 | static int libipw_networks_allocate(struct libipw_device *ieee) | 65 | static int libipw_networks_allocate(struct libipw_device *ieee) |
69 | { | 66 | { |
70 | if (ieee->networks) | 67 | if (ieee->networks) |
@@ -143,7 +140,7 @@ int libipw_change_mtu(struct net_device *dev, int new_mtu) | |||
143 | } | 140 | } |
144 | EXPORT_SYMBOL(libipw_change_mtu); | 141 | EXPORT_SYMBOL(libipw_change_mtu); |
145 | 142 | ||
146 | struct net_device *alloc_ieee80211(int sizeof_priv, int monitor) | 143 | struct net_device *alloc_ieee80211(int sizeof_priv) |
147 | { | 144 | { |
148 | struct libipw_device *ieee; | 145 | struct libipw_device *ieee; |
149 | struct net_device *dev; | 146 | struct net_device *dev; |
@@ -160,31 +157,10 @@ struct net_device *alloc_ieee80211(int sizeof_priv, int monitor) | |||
160 | 157 | ||
161 | ieee->dev = dev; | 158 | ieee->dev = dev; |
162 | 159 | ||
163 | if (!monitor) { | ||
164 | ieee->wdev.wiphy = wiphy_new(&libipw_config_ops, 0); | ||
165 | if (!ieee->wdev.wiphy) { | ||
166 | LIBIPW_ERROR("Unable to allocate wiphy.\n"); | ||
167 | goto failed_free_netdev; | ||
168 | } | ||
169 | |||
170 | ieee->dev->ieee80211_ptr = &ieee->wdev; | ||
171 | ieee->wdev.iftype = NL80211_IFTYPE_STATION; | ||
172 | |||
173 | /* Fill-out wiphy structure bits we know... Not enough info | ||
174 | here to call set_wiphy_dev or set MAC address or channel info | ||
175 | -- have to do that in ->ndo_init... */ | ||
176 | ieee->wdev.wiphy->privid = libipw_wiphy_privid; | ||
177 | |||
178 | ieee->wdev.wiphy->max_scan_ssids = 1; | ||
179 | ieee->wdev.wiphy->max_scan_ie_len = 0; | ||
180 | ieee->wdev.wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | ||
181 | | BIT(NL80211_IFTYPE_ADHOC); | ||
182 | } | ||
183 | |||
184 | err = libipw_networks_allocate(ieee); | 160 | err = libipw_networks_allocate(ieee); |
185 | if (err) { | 161 | if (err) { |
186 | LIBIPW_ERROR("Unable to allocate beacon storage: %d\n", err); | 162 | LIBIPW_ERROR("Unable to allocate beacon storage: %d\n", err); |
187 | goto failed_free_wiphy; | 163 | goto failed_free_netdev; |
188 | } | 164 | } |
189 | libipw_networks_initialize(ieee); | 165 | libipw_networks_initialize(ieee); |
190 | 166 | ||
@@ -217,31 +193,19 @@ struct net_device *alloc_ieee80211(int sizeof_priv, int monitor) | |||
217 | 193 | ||
218 | return dev; | 194 | return dev; |
219 | 195 | ||
220 | failed_free_wiphy: | ||
221 | if (!monitor) | ||
222 | wiphy_free(ieee->wdev.wiphy); | ||
223 | failed_free_netdev: | 196 | failed_free_netdev: |
224 | free_netdev(dev); | 197 | free_netdev(dev); |
225 | failed: | 198 | failed: |
226 | return NULL; | 199 | return NULL; |
227 | } | 200 | } |
228 | 201 | ||
229 | void free_ieee80211(struct net_device *dev, int monitor) | 202 | void free_ieee80211(struct net_device *dev) |
230 | { | 203 | { |
231 | struct libipw_device *ieee = netdev_priv(dev); | 204 | struct libipw_device *ieee = netdev_priv(dev); |
232 | 205 | ||
233 | lib80211_crypt_info_free(&ieee->crypt_info); | 206 | lib80211_crypt_info_free(&ieee->crypt_info); |
234 | 207 | ||
235 | libipw_networks_free(ieee); | 208 | libipw_networks_free(ieee); |
236 | |||
237 | /* free cfg80211 resources */ | ||
238 | if (!monitor) { | ||
239 | wiphy_unregister(ieee->wdev.wiphy); | ||
240 | kfree(ieee->a_band.channels); | ||
241 | kfree(ieee->bg_band.channels); | ||
242 | wiphy_free(ieee->wdev.wiphy); | ||
243 | } | ||
244 | |||
245 | free_netdev(dev); | 209 | free_netdev(dev); |
246 | } | 210 | } |
247 | 211 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 2716b91ba9fa..950267ab556a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -161,5 +161,6 @@ struct iwl_cfg iwl1000_bgn_cfg = { | |||
161 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | 161 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, |
162 | .shadow_ram_support = false, | 162 | .shadow_ram_support = false, |
163 | .ht_greenfield_support = true, | 163 | .ht_greenfield_support = true, |
164 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
164 | }; | 165 | }; |
165 | 166 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index c295b8ee9228..1473452ba22f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -175,6 +175,7 @@ struct iwl_cfg iwl6000h_2agn_cfg = { | |||
175 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 175 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
176 | .shadow_ram_support = true, | 176 | .shadow_ram_support = true, |
177 | .ht_greenfield_support = true, | 177 | .ht_greenfield_support = true, |
178 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
178 | }; | 179 | }; |
179 | 180 | ||
180 | /* | 181 | /* |
@@ -198,6 +199,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
198 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 199 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
199 | .shadow_ram_support = true, | 200 | .shadow_ram_support = true, |
200 | .ht_greenfield_support = true, | 201 | .ht_greenfield_support = true, |
202 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
201 | }; | 203 | }; |
202 | 204 | ||
203 | struct iwl_cfg iwl6050_2agn_cfg = { | 205 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -218,6 +220,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
218 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 220 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
219 | .shadow_ram_support = true, | 221 | .shadow_ram_support = true, |
220 | .ht_greenfield_support = true, | 222 | .ht_greenfield_support = true, |
223 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
221 | }; | 224 | }; |
222 | 225 | ||
223 | struct iwl_cfg iwl6000_3agn_cfg = { | 226 | struct iwl_cfg iwl6000_3agn_cfg = { |
@@ -238,6 +241,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
238 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 241 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
239 | .shadow_ram_support = true, | 242 | .shadow_ram_support = true, |
240 | .ht_greenfield_support = true, | 243 | .ht_greenfield_support = true, |
244 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
241 | }; | 245 | }; |
242 | 246 | ||
243 | struct iwl_cfg iwl6050_3agn_cfg = { | 247 | struct iwl_cfg iwl6050_3agn_cfg = { |
@@ -258,6 +262,7 @@ struct iwl_cfg iwl6050_3agn_cfg = { | |||
258 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 262 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
259 | .shadow_ram_support = true, | 263 | .shadow_ram_support = true, |
260 | .ht_greenfield_support = true, | 264 | .ht_greenfield_support = true, |
265 | .use_rts_for_ht = true, /* use rts/cts protection */ | ||
261 | }; | 266 | }; |
262 | 267 | ||
263 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 268 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 346dc06fa7b7..81726ee32858 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -418,6 +418,15 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid, | |||
418 | else if (tid == IWL_AGG_ALL_TID) | 418 | else if (tid == IWL_AGG_ALL_TID) |
419 | for (tid = 0; tid < TID_MAX_LOAD_COUNT; tid++) | 419 | for (tid = 0; tid < TID_MAX_LOAD_COUNT; tid++) |
420 | rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta); | 420 | rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta); |
421 | if (priv->cfg->use_rts_for_ht) { | ||
422 | /* | ||
423 | * switch to RTS/CTS if it is the prefer protection method | ||
424 | * for HT traffic | ||
425 | */ | ||
426 | IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n"); | ||
427 | priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN; | ||
428 | iwlcore_commit_rxon(priv); | ||
429 | } | ||
421 | } | 430 | } |
422 | 431 | ||
423 | static inline int get_num_of_ant_from_rate(u32 rate_n_flags) | 432 | static inline int get_num_of_ant_from_rate(u32 rate_n_flags) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index eaafae091f5b..921dc4a26fe2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -116,9 +116,6 @@ int iwl_commit_rxon(struct iwl_priv *priv) | |||
116 | 116 | ||
117 | /* always get timestamp with Rx frame */ | 117 | /* always get timestamp with Rx frame */ |
118 | priv->staging_rxon.flags |= RXON_FLG_TSF2HOST_MSK; | 118 | priv->staging_rxon.flags |= RXON_FLG_TSF2HOST_MSK; |
119 | /* allow CTS-to-self if possible. this is relevant only for | ||
120 | * 5000, but will not damage 4965 */ | ||
121 | priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN; | ||
122 | 119 | ||
123 | ret = iwl_check_rxon_cmd(priv); | 120 | ret = iwl_check_rxon_cmd(priv); |
124 | if (ret) { | 121 | if (ret) { |
@@ -218,6 +215,13 @@ int iwl_commit_rxon(struct iwl_priv *priv) | |||
218 | "Could not send WEP static key.\n"); | 215 | "Could not send WEP static key.\n"); |
219 | } | 216 | } |
220 | 217 | ||
218 | /* | ||
219 | * allow CTS-to-self if possible for new association. | ||
220 | * this is relevant only for 5000 series and up, | ||
221 | * but will not damage 4965 | ||
222 | */ | ||
223 | priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN; | ||
224 | |||
221 | /* Apply the new configuration | 225 | /* Apply the new configuration |
222 | * RXON assoc doesn't clear the station table in uCode, | 226 | * RXON assoc doesn't clear the station table in uCode, |
223 | */ | 227 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index e50103a956b1..7754538c2194 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -213,6 +213,7 @@ struct iwl_mod_params { | |||
213 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier | 213 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier |
214 | * @max_ll_items: max number of OTP blocks | 214 | * @max_ll_items: max number of OTP blocks |
215 | * @shadow_ram_support: shadow support for OTP memory | 215 | * @shadow_ram_support: shadow support for OTP memory |
216 | * @use_rts_for_ht: use rts/cts protection for HT traffic | ||
216 | * | 217 | * |
217 | * We enable the driver to be backward compatible wrt API version. The | 218 | * We enable the driver to be backward compatible wrt API version. The |
218 | * driver specifies which APIs it supports (with @ucode_api_max being the | 219 | * driver specifies which APIs it supports (with @ucode_api_max being the |
@@ -255,6 +256,7 @@ struct iwl_cfg { | |||
255 | const bool shadow_ram_support; | 256 | const bool shadow_ram_support; |
256 | const bool ht_greenfield_support; | 257 | const bool ht_greenfield_support; |
257 | const bool broken_powersave; | 258 | const bool broken_powersave; |
259 | bool use_rts_for_ht; | ||
258 | }; | 260 | }; |
259 | 261 | ||
260 | /*************************** | 262 | /*************************** |
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index 039b555e4d76..53d56ab83c03 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c | |||
@@ -169,16 +169,19 @@ static int lbs_ethtool_set_wol(struct net_device *dev, | |||
169 | struct lbs_private *priv = dev->ml_priv; | 169 | struct lbs_private *priv = dev->ml_priv; |
170 | uint32_t criteria = 0; | 170 | uint32_t criteria = 0; |
171 | 171 | ||
172 | if (priv->wol_criteria == 0xffffffff && wol->wolopts) | ||
173 | return -EOPNOTSUPP; | ||
174 | |||
175 | if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) | 172 | if (wol->wolopts & ~(WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY)) |
176 | return -EOPNOTSUPP; | 173 | return -EOPNOTSUPP; |
177 | 174 | ||
178 | if (wol->wolopts & WAKE_UCAST) criteria |= EHS_WAKE_ON_UNICAST_DATA; | 175 | if (wol->wolopts & WAKE_UCAST) |
179 | if (wol->wolopts & WAKE_MCAST) criteria |= EHS_WAKE_ON_MULTICAST_DATA; | 176 | criteria |= EHS_WAKE_ON_UNICAST_DATA; |
180 | if (wol->wolopts & WAKE_BCAST) criteria |= EHS_WAKE_ON_BROADCAST_DATA; | 177 | if (wol->wolopts & WAKE_MCAST) |
181 | if (wol->wolopts & WAKE_PHY) criteria |= EHS_WAKE_ON_MAC_EVENT; | 178 | criteria |= EHS_WAKE_ON_MULTICAST_DATA; |
179 | if (wol->wolopts & WAKE_BCAST) | ||
180 | criteria |= EHS_WAKE_ON_BROADCAST_DATA; | ||
181 | if (wol->wolopts & WAKE_PHY) | ||
182 | criteria |= EHS_WAKE_ON_MAC_EVENT; | ||
183 | if (wol->wolopts == 0) | ||
184 | criteria |= EHS_REMOVE_WAKEUP; | ||
182 | 185 | ||
183 | return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL); | 186 | return lbs_host_sleep_cfg(priv, criteria, (struct wol_config *)NULL); |
184 | } | 187 | } |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 17e199546eeb..92af9b96bb7a 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -426,12 +426,16 @@ static const char p54u_romboot_3887[] = "~~~~"; | |||
426 | static int p54u_firmware_reset_3887(struct ieee80211_hw *dev) | 426 | static int p54u_firmware_reset_3887(struct ieee80211_hw *dev) |
427 | { | 427 | { |
428 | struct p54u_priv *priv = dev->priv; | 428 | struct p54u_priv *priv = dev->priv; |
429 | u8 buf[4]; | 429 | u8 *buf; |
430 | int ret; | 430 | int ret; |
431 | 431 | ||
432 | memcpy(&buf, p54u_romboot_3887, sizeof(buf)); | 432 | buf = kmalloc(4, GFP_KERNEL); |
433 | if (!buf) | ||
434 | return -ENOMEM; | ||
435 | memcpy(buf, p54u_romboot_3887, 4); | ||
433 | ret = p54u_bulk_msg(priv, P54U_PIPE_DATA, | 436 | ret = p54u_bulk_msg(priv, P54U_PIPE_DATA, |
434 | buf, sizeof(buf)); | 437 | buf, 4); |
438 | kfree(buf); | ||
435 | if (ret) | 439 | if (ret) |
436 | dev_err(&priv->udev->dev, "(p54usb) unable to jump to " | 440 | dev_err(&priv->udev->dev, "(p54usb) unable to jump to " |
437 | "boot ROM (%d)!\n", ret); | 441 | "boot ROM (%d)!\n", ret); |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c b/drivers/net/wireless/rtl818x/rtl8187_rfkill.c index 9fab13e4004e..cad8037ab2af 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c +++ b/drivers/net/wireless/rtl818x/rtl8187_rfkill.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
19 | 19 | ||
20 | #include "rtl8187.h" | 20 | #include "rtl8187.h" |
21 | #include "rtl8187_rfkill.h" | ||
21 | 22 | ||
22 | static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv) | 23 | static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv) |
23 | { | 24 | { |
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index e5f8fc164fd3..b952ebc7a78b 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -609,6 +609,9 @@ int __init check_zero_address(void) | |||
609 | dmi_get_system_info(DMI_BIOS_VENDOR), | 609 | dmi_get_system_info(DMI_BIOS_VENDOR), |
610 | dmi_get_system_info(DMI_BIOS_VERSION), | 610 | dmi_get_system_info(DMI_BIOS_VERSION), |
611 | dmi_get_system_info(DMI_PRODUCT_VERSION)); | 611 | dmi_get_system_info(DMI_PRODUCT_VERSION)); |
612 | #ifdef CONFIG_DMAR | ||
613 | dmar_disabled = 1; | ||
614 | #endif | ||
612 | return 0; | 615 | return 0; |
613 | } | 616 | } |
614 | break; | 617 | break; |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 744ea1d0b59b..efe568deda12 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1283,7 +1283,8 @@ static int _regulator_disable(struct regulator_dev *rdev) | |||
1283 | return -EIO; | 1283 | return -EIO; |
1284 | 1284 | ||
1285 | /* are we the last user and permitted to disable ? */ | 1285 | /* are we the last user and permitted to disable ? */ |
1286 | if (rdev->use_count == 1 && !rdev->constraints->always_on) { | 1286 | if (rdev->use_count == 1 && |
1287 | (rdev->constraints && !rdev->constraints->always_on)) { | ||
1287 | 1288 | ||
1288 | /* we are last user */ | 1289 | /* we are last user */ |
1289 | if (_regulator_can_change_status(rdev) && | 1290 | if (_regulator_can_change_status(rdev) && |
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index f8b295700d7d..f9f516a3028a 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
@@ -196,11 +196,10 @@ static int regulator_fixed_voltage_remove(struct platform_device *pdev) | |||
196 | struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev); | 196 | struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev); |
197 | 197 | ||
198 | regulator_unregister(drvdata->dev); | 198 | regulator_unregister(drvdata->dev); |
199 | kfree(drvdata->desc.name); | ||
200 | kfree(drvdata); | ||
201 | |||
202 | if (gpio_is_valid(drvdata->gpio)) | 199 | if (gpio_is_valid(drvdata->gpio)) |
203 | gpio_free(drvdata->gpio); | 200 | gpio_free(drvdata->gpio); |
201 | kfree(drvdata->desc.name); | ||
202 | kfree(drvdata); | ||
204 | 203 | ||
205 | return 0; | 204 | return 0; |
206 | } | 205 | } |
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index bb61aede4801..902db56ce099 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c | |||
@@ -175,18 +175,18 @@ static unsigned int wm831x_gp_ldo_get_mode(struct regulator_dev *rdev) | |||
175 | struct wm831x *wm831x = ldo->wm831x; | 175 | struct wm831x *wm831x = ldo->wm831x; |
176 | int ctrl_reg = ldo->base + WM831X_LDO_CONTROL; | 176 | int ctrl_reg = ldo->base + WM831X_LDO_CONTROL; |
177 | int on_reg = ldo->base + WM831X_LDO_ON_CONTROL; | 177 | int on_reg = ldo->base + WM831X_LDO_ON_CONTROL; |
178 | unsigned int ret; | 178 | int ret; |
179 | 179 | ||
180 | ret = wm831x_reg_read(wm831x, on_reg); | 180 | ret = wm831x_reg_read(wm831x, on_reg); |
181 | if (ret < 0) | 181 | if (ret < 0) |
182 | return 0; | 182 | return ret; |
183 | 183 | ||
184 | if (!(ret & WM831X_LDO1_ON_MODE)) | 184 | if (!(ret & WM831X_LDO1_ON_MODE)) |
185 | return REGULATOR_MODE_NORMAL; | 185 | return REGULATOR_MODE_NORMAL; |
186 | 186 | ||
187 | ret = wm831x_reg_read(wm831x, ctrl_reg); | 187 | ret = wm831x_reg_read(wm831x, ctrl_reg); |
188 | if (ret < 0) | 188 | if (ret < 0) |
189 | return 0; | 189 | return ret; |
190 | 190 | ||
191 | if (ret & WM831X_LDO1_LP_MODE) | 191 | if (ret & WM831X_LDO1_LP_MODE) |
192 | return REGULATOR_MODE_STANDBY; | 192 | return REGULATOR_MODE_STANDBY; |
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index 7fe1fa26c52c..03ea530981d1 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c | |||
@@ -58,7 +58,16 @@ static irqreturn_t coh901331_interrupt(int irq, void *data) | |||
58 | clk_enable(rtap->clk); | 58 | clk_enable(rtap->clk); |
59 | /* Ack IRQ */ | 59 | /* Ack IRQ */ |
60 | writel(1, rtap->virtbase + COH901331_IRQ_EVENT); | 60 | writel(1, rtap->virtbase + COH901331_IRQ_EVENT); |
61 | /* | ||
62 | * Disable the interrupt. This is necessary because | ||
63 | * the RTC lives on a lower-clocked line and will | ||
64 | * not release the IRQ line until after a few (slower) | ||
65 | * clock cycles. The interrupt will be re-enabled when | ||
66 | * a new alarm is set anyway. | ||
67 | */ | ||
68 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); | ||
61 | clk_disable(rtap->clk); | 69 | clk_disable(rtap->clk); |
70 | |||
62 | /* Set alarm flag */ | 71 | /* Set alarm flag */ |
63 | rtc_update_irq(rtap->rtc, 1, RTC_AF); | 72 | rtc_update_irq(rtap->rtc, 1, RTC_AF); |
64 | 73 | ||
@@ -128,6 +137,8 @@ static int coh901331_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
128 | else | 137 | else |
129 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); | 138 | writel(0, rtap->virtbase + COH901331_IRQ_MASK); |
130 | clk_disable(rtap->clk); | 139 | clk_disable(rtap->clk); |
140 | |||
141 | return 0; | ||
131 | } | 142 | } |
132 | 143 | ||
133 | static struct rtc_class_ops coh901331_ops = { | 144 | static struct rtc_class_ops coh901331_ops = { |
diff --git a/drivers/scsi/bfa/bfad_fwimg.c b/drivers/scsi/bfa/bfad_fwimg.c index b2f6949bc8d3..bd34b0db2d6b 100644 --- a/drivers/scsi/bfa/bfad_fwimg.c +++ b/drivers/scsi/bfa/bfad_fwimg.c | |||
@@ -41,6 +41,8 @@ u32 *bfi_image_cb; | |||
41 | 41 | ||
42 | #define BFAD_FW_FILE_CT "ctfw.bin" | 42 | #define BFAD_FW_FILE_CT "ctfw.bin" |
43 | #define BFAD_FW_FILE_CB "cbfw.bin" | 43 | #define BFAD_FW_FILE_CB "cbfw.bin" |
44 | MODULE_FIRMWARE(BFAD_FW_FILE_CT); | ||
45 | MODULE_FIRMWARE(BFAD_FW_FILE_CB); | ||
44 | 46 | ||
45 | u32 * | 47 | u32 * |
46 | bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image, | 48 | bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image, |
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 158c99243c08..55d012a9a668 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -948,7 +948,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port) | |||
948 | if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM | BFA_PORT_ROLE_FCP_TM)) | 948 | if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM | BFA_PORT_ROLE_FCP_TM)) |
949 | /* For FCP type 0x08 */ | 949 | /* For FCP type 0x08 */ |
950 | fc_host_supported_fc4s(host)[2] = 1; | 950 | fc_host_supported_fc4s(host)[2] = 1; |
951 | if (bfad_supported_fc4s | BFA_PORT_ROLE_FCP_IPFC) | 951 | if (bfad_supported_fc4s & BFA_PORT_ROLE_FCP_IPFC) |
952 | /* For LLC/SNAP type 0x05 */ | 952 | /* For LLC/SNAP type 0x05 */ |
953 | fc_host_supported_fc4s(host)[3] = 0x20; | 953 | fc_host_supported_fc4s(host)[3] = 0x20; |
954 | /* For fibre channel services type 0x20 */ | 954 | /* For fibre channel services type 0x20 */ |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 185e6bc4dd40..9e8fce0f0c1b 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -2900,7 +2900,7 @@ static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr) | |||
2900 | eindex = handle; | 2900 | eindex = handle; |
2901 | estr->event_source = 0; | 2901 | estr->event_source = 0; |
2902 | 2902 | ||
2903 | if (eindex >= MAX_EVENTS) { | 2903 | if (eindex < 0 || eindex >= MAX_EVENTS) { |
2904 | spin_unlock_irqrestore(&ha->smp_lock, flags); | 2904 | spin_unlock_irqrestore(&ha->smp_lock, flags); |
2905 | return eindex; | 2905 | return eindex; |
2906 | } | 2906 | } |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 5f045505a1f4..76d294fc7846 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -4189,6 +4189,25 @@ static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg, | |||
4189 | } | 4189 | } |
4190 | 4190 | ||
4191 | /** | 4191 | /** |
4192 | * ipr_isr_eh - Interrupt service routine error handler | ||
4193 | * @ioa_cfg: ioa config struct | ||
4194 | * @msg: message to log | ||
4195 | * | ||
4196 | * Return value: | ||
4197 | * none | ||
4198 | **/ | ||
4199 | static void ipr_isr_eh(struct ipr_ioa_cfg *ioa_cfg, char *msg) | ||
4200 | { | ||
4201 | ioa_cfg->errors_logged++; | ||
4202 | dev_err(&ioa_cfg->pdev->dev, "%s\n", msg); | ||
4203 | |||
4204 | if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) | ||
4205 | ioa_cfg->sdt_state = GET_DUMP; | ||
4206 | |||
4207 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); | ||
4208 | } | ||
4209 | |||
4210 | /** | ||
4192 | * ipr_isr - Interrupt service routine | 4211 | * ipr_isr - Interrupt service routine |
4193 | * @irq: irq number | 4212 | * @irq: irq number |
4194 | * @devp: pointer to ioa config struct | 4213 | * @devp: pointer to ioa config struct |
@@ -4203,6 +4222,7 @@ static irqreturn_t ipr_isr(int irq, void *devp) | |||
4203 | volatile u32 int_reg, int_mask_reg; | 4222 | volatile u32 int_reg, int_mask_reg; |
4204 | u32 ioasc; | 4223 | u32 ioasc; |
4205 | u16 cmd_index; | 4224 | u16 cmd_index; |
4225 | int num_hrrq = 0; | ||
4206 | struct ipr_cmnd *ipr_cmd; | 4226 | struct ipr_cmnd *ipr_cmd; |
4207 | irqreturn_t rc = IRQ_NONE; | 4227 | irqreturn_t rc = IRQ_NONE; |
4208 | 4228 | ||
@@ -4233,13 +4253,7 @@ static irqreturn_t ipr_isr(int irq, void *devp) | |||
4233 | IPR_HRRQ_REQ_RESP_HANDLE_MASK) >> IPR_HRRQ_REQ_RESP_HANDLE_SHIFT; | 4253 | IPR_HRRQ_REQ_RESP_HANDLE_MASK) >> IPR_HRRQ_REQ_RESP_HANDLE_SHIFT; |
4234 | 4254 | ||
4235 | if (unlikely(cmd_index >= IPR_NUM_CMD_BLKS)) { | 4255 | if (unlikely(cmd_index >= IPR_NUM_CMD_BLKS)) { |
4236 | ioa_cfg->errors_logged++; | 4256 | ipr_isr_eh(ioa_cfg, "Invalid response handle from IOA"); |
4237 | dev_err(&ioa_cfg->pdev->dev, "Invalid response handle from IOA\n"); | ||
4238 | |||
4239 | if (WAIT_FOR_DUMP == ioa_cfg->sdt_state) | ||
4240 | ioa_cfg->sdt_state = GET_DUMP; | ||
4241 | |||
4242 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); | ||
4243 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | 4257 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); |
4244 | return IRQ_HANDLED; | 4258 | return IRQ_HANDLED; |
4245 | } | 4259 | } |
@@ -4266,8 +4280,18 @@ static irqreturn_t ipr_isr(int irq, void *devp) | |||
4266 | 4280 | ||
4267 | if (ipr_cmd != NULL) { | 4281 | if (ipr_cmd != NULL) { |
4268 | /* Clear the PCI interrupt */ | 4282 | /* Clear the PCI interrupt */ |
4269 | writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg); | 4283 | do { |
4270 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg; | 4284 | writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg); |
4285 | int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg; | ||
4286 | } while (int_reg & IPR_PCII_HRRQ_UPDATED && | ||
4287 | num_hrrq++ < IPR_MAX_HRRQ_RETRIES); | ||
4288 | |||
4289 | if (int_reg & IPR_PCII_HRRQ_UPDATED) { | ||
4290 | ipr_isr_eh(ioa_cfg, "Error clearing HRRQ"); | ||
4291 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); | ||
4292 | return IRQ_HANDLED; | ||
4293 | } | ||
4294 | |||
4271 | } else | 4295 | } else |
4272 | break; | 4296 | break; |
4273 | } | 4297 | } |
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 163245a1c3e5..19bbcf39f0c9 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -144,6 +144,7 @@ | |||
144 | #define IPR_IOA_MAX_SECTORS 32767 | 144 | #define IPR_IOA_MAX_SECTORS 32767 |
145 | #define IPR_VSET_MAX_SECTORS 512 | 145 | #define IPR_VSET_MAX_SECTORS 512 |
146 | #define IPR_MAX_CDB_LEN 16 | 146 | #define IPR_MAX_CDB_LEN 16 |
147 | #define IPR_MAX_HRRQ_RETRIES 3 | ||
147 | 148 | ||
148 | #define IPR_DEFAULT_BUS_WIDTH 16 | 149 | #define IPR_DEFAULT_BUS_WIDTH 16 |
149 | #define IPR_80MBs_SCSI_RATE ((80 * 10) / (IPR_DEFAULT_BUS_WIDTH / 8)) | 150 | #define IPR_80MBs_SCSI_RATE ((80 * 10) / (IPR_DEFAULT_BUS_WIDTH / 8)) |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index b3381959acce..33cf988c8c8a 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -960,7 +960,6 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) | |||
960 | 960 | ||
961 | } | 961 | } |
962 | } | 962 | } |
963 | res = 0; | ||
964 | } | 963 | } |
965 | 964 | ||
966 | return res; | 965 | return res; |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index f7c70e2a8224..0a97bc9074bb 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -1071,7 +1071,7 @@ static struct pmcraid_cmd *pmcraid_init_hcam | |||
1071 | 1071 | ||
1072 | ioarcb->data_transfer_length = cpu_to_le32(rcb_size); | 1072 | ioarcb->data_transfer_length = cpu_to_le32(rcb_size); |
1073 | 1073 | ||
1074 | ioadl[0].flags |= cpu_to_le32(IOADL_FLAGS_READ_LAST); | 1074 | ioadl[0].flags |= IOADL_FLAGS_READ_LAST; |
1075 | ioadl[0].data_len = cpu_to_le32(rcb_size); | 1075 | ioadl[0].data_len = cpu_to_le32(rcb_size); |
1076 | ioadl[0].address = cpu_to_le32(dma); | 1076 | ioadl[0].address = cpu_to_le32(dma); |
1077 | 1077 | ||
@@ -2251,7 +2251,7 @@ static void pmcraid_request_sense(struct pmcraid_cmd *cmd) | |||
2251 | 2251 | ||
2252 | ioadl->address = cpu_to_le64(cmd->sense_buffer_dma); | 2252 | ioadl->address = cpu_to_le64(cmd->sense_buffer_dma); |
2253 | ioadl->data_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); | 2253 | ioadl->data_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); |
2254 | ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); | 2254 | ioadl->flags = IOADL_FLAGS_LAST_DESC; |
2255 | 2255 | ||
2256 | /* request sense might be called as part of error response processing | 2256 | /* request sense might be called as part of error response processing |
2257 | * which runs in tasklets context. It is possible that mid-layer might | 2257 | * which runs in tasklets context. It is possible that mid-layer might |
@@ -3017,7 +3017,7 @@ static int pmcraid_build_ioadl( | |||
3017 | ioadl[i].flags = 0; | 3017 | ioadl[i].flags = 0; |
3018 | } | 3018 | } |
3019 | /* setup last descriptor */ | 3019 | /* setup last descriptor */ |
3020 | ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); | 3020 | ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC; |
3021 | 3021 | ||
3022 | return 0; | 3022 | return 0; |
3023 | } | 3023 | } |
@@ -3387,7 +3387,7 @@ static int pmcraid_build_passthrough_ioadls( | |||
3387 | } | 3387 | } |
3388 | 3388 | ||
3389 | /* setup the last descriptor */ | 3389 | /* setup the last descriptor */ |
3390 | ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); | 3390 | ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC; |
3391 | 3391 | ||
3392 | return 0; | 3392 | return 0; |
3393 | } | 3393 | } |
@@ -5314,7 +5314,7 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd) | |||
5314 | cpu_to_le32(sizeof(struct pmcraid_config_table)); | 5314 | cpu_to_le32(sizeof(struct pmcraid_config_table)); |
5315 | 5315 | ||
5316 | ioadl = &(ioarcb->add_data.u.ioadl[0]); | 5316 | ioadl = &(ioarcb->add_data.u.ioadl[0]); |
5317 | ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC); | 5317 | ioadl->flags = IOADL_FLAGS_LAST_DESC; |
5318 | ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr); | 5318 | ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr); |
5319 | ioadl->data_len = cpu_to_le32(sizeof(struct pmcraid_config_table)); | 5319 | ioadl->data_len = cpu_to_le32(sizeof(struct pmcraid_config_table)); |
5320 | 5320 | ||
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index a67fed10598a..c6f70dae9b2e 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -3656,6 +3656,7 @@ fc_bsg_host_dispatch(struct request_queue *q, struct Scsi_Host *shost, | |||
3656 | fail_host_msg: | 3656 | fail_host_msg: |
3657 | /* return the errno failure code as the only status */ | 3657 | /* return the errno failure code as the only status */ |
3658 | BUG_ON(job->reply_len < sizeof(uint32_t)); | 3658 | BUG_ON(job->reply_len < sizeof(uint32_t)); |
3659 | job->reply->reply_payload_rcv_len = 0; | ||
3659 | job->reply->result = ret; | 3660 | job->reply->result = ret; |
3660 | job->reply_len = sizeof(uint32_t); | 3661 | job->reply_len = sizeof(uint32_t); |
3661 | fc_bsg_jobdone(job); | 3662 | fc_bsg_jobdone(job); |
@@ -3741,6 +3742,7 @@ check_bidi: | |||
3741 | fail_rport_msg: | 3742 | fail_rport_msg: |
3742 | /* return the errno failure code as the only status */ | 3743 | /* return the errno failure code as the only status */ |
3743 | BUG_ON(job->reply_len < sizeof(uint32_t)); | 3744 | BUG_ON(job->reply_len < sizeof(uint32_t)); |
3745 | job->reply->reply_payload_rcv_len = 0; | ||
3744 | job->reply->result = ret; | 3746 | job->reply->result = ret; |
3745 | job->reply_len = sizeof(uint32_t); | 3747 | job->reply_len = sizeof(uint32_t); |
3746 | fc_bsg_jobdone(job); | 3748 | fc_bsg_jobdone(job); |
@@ -3797,6 +3799,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, | |||
3797 | /* check if we have the msgcode value at least */ | 3799 | /* check if we have the msgcode value at least */ |
3798 | if (job->request_len < sizeof(uint32_t)) { | 3800 | if (job->request_len < sizeof(uint32_t)) { |
3799 | BUG_ON(job->reply_len < sizeof(uint32_t)); | 3801 | BUG_ON(job->reply_len < sizeof(uint32_t)); |
3802 | job->reply->reply_payload_rcv_len = 0; | ||
3800 | job->reply->result = -ENOMSG; | 3803 | job->reply->result = -ENOMSG; |
3801 | job->reply_len = sizeof(uint32_t); | 3804 | job->reply_len = sizeof(uint32_t); |
3802 | fc_bsg_jobdone(job); | 3805 | fc_bsg_jobdone(job); |
diff --git a/drivers/spi/spi_stmp.c b/drivers/spi/spi_stmp.c index d871dc23909c..2552bb364005 100644 --- a/drivers/spi/spi_stmp.c +++ b/drivers/spi/spi_stmp.c | |||
@@ -242,7 +242,7 @@ static int stmp_spi_txrx_dma(struct stmp_spi *ss, int cs, | |||
242 | wait_for_completion(&ss->done); | 242 | wait_for_completion(&ss->done); |
243 | 243 | ||
244 | if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN)) | 244 | if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN)) |
245 | status = ETIMEDOUT; | 245 | status = -ETIMEDOUT; |
246 | 246 | ||
247 | if (!dma_buf) | 247 | if (!dma_buf) |
248 | dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir); | 248 | dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir); |
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c index b74212d698c7..e8b89e8ac9bd 100644 --- a/drivers/ssb/scan.c +++ b/drivers/ssb/scan.c | |||
@@ -162,6 +162,8 @@ static u8 chipid_to_nrcores(u16 chipid) | |||
162 | static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, | 162 | static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, |
163 | u16 offset) | 163 | u16 offset) |
164 | { | 164 | { |
165 | u32 lo, hi; | ||
166 | |||
165 | switch (bus->bustype) { | 167 | switch (bus->bustype) { |
166 | case SSB_BUSTYPE_SSB: | 168 | case SSB_BUSTYPE_SSB: |
167 | offset += current_coreidx * SSB_CORE_SIZE; | 169 | offset += current_coreidx * SSB_CORE_SIZE; |
@@ -174,7 +176,9 @@ static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, | |||
174 | offset -= 0x800; | 176 | offset -= 0x800; |
175 | } else | 177 | } else |
176 | ssb_pcmcia_switch_segment(bus, 0); | 178 | ssb_pcmcia_switch_segment(bus, 0); |
177 | break; | 179 | lo = readw(bus->mmio + offset); |
180 | hi = readw(bus->mmio + offset + 2); | ||
181 | return lo | (hi << 16); | ||
178 | case SSB_BUSTYPE_SDIO: | 182 | case SSB_BUSTYPE_SDIO: |
179 | offset += current_coreidx * SSB_CORE_SIZE; | 183 | offset += current_coreidx * SSB_CORE_SIZE; |
180 | return ssb_sdio_scan_read32(bus, offset); | 184 | return ssb_sdio_scan_read32(bus, offset); |
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c index 02347c57357d..aa53db9f2e88 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c | |||
@@ -178,6 +178,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) | |||
178 | return 0; | 178 | return 0; |
179 | bad1: | 179 | bad1: |
180 | kfree(priv); | 180 | kfree(priv); |
181 | pm_runtime_disable(&pdev->dev); | ||
181 | bad0: | 182 | bad0: |
182 | return ret; | 183 | return ret; |
183 | } | 184 | } |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index e3861b21e776..e4eca7810bcf 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -609,9 +609,9 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp) | |||
609 | 609 | ||
610 | acm->throttle = 0; | 610 | acm->throttle = 0; |
611 | 611 | ||
612 | tasklet_schedule(&acm->urb_task); | ||
613 | set_bit(ASYNCB_INITIALIZED, &acm->port.flags); | 612 | set_bit(ASYNCB_INITIALIZED, &acm->port.flags); |
614 | rv = tty_port_block_til_ready(&acm->port, tty, filp); | 613 | rv = tty_port_block_til_ready(&acm->port, tty, filp); |
614 | tasklet_schedule(&acm->urb_task); | ||
615 | done: | 615 | done: |
616 | mutex_unlock(&acm->mutex); | 616 | mutex_unlock(&acm->mutex); |
617 | err_out: | 617 | err_out: |
@@ -686,15 +686,21 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp) | |||
686 | 686 | ||
687 | /* Perform the closing process and see if we need to do the hardware | 687 | /* Perform the closing process and see if we need to do the hardware |
688 | shutdown */ | 688 | shutdown */ |
689 | if (!acm || tty_port_close_start(&acm->port, tty, filp) == 0) | 689 | if (!acm) |
690 | return; | ||
691 | if (tty_port_close_start(&acm->port, tty, filp) == 0) { | ||
692 | mutex_lock(&open_mutex); | ||
693 | if (!acm->dev) { | ||
694 | tty_port_tty_set(&acm->port, NULL); | ||
695 | acm_tty_unregister(acm); | ||
696 | tty->driver_data = NULL; | ||
697 | } | ||
698 | mutex_unlock(&open_mutex); | ||
690 | return; | 699 | return; |
700 | } | ||
691 | acm_port_down(acm, 0); | 701 | acm_port_down(acm, 0); |
692 | tty_port_close_end(&acm->port, tty); | 702 | tty_port_close_end(&acm->port, tty); |
693 | mutex_lock(&open_mutex); | ||
694 | tty_port_tty_set(&acm->port, NULL); | 703 | tty_port_tty_set(&acm->port, NULL); |
695 | if (!acm->dev) | ||
696 | acm_tty_unregister(acm); | ||
697 | mutex_unlock(&open_mutex); | ||
698 | } | 704 | } |
699 | 705 | ||
700 | static int acm_tty_write(struct tty_struct *tty, | 706 | static int acm_tty_write(struct tty_struct *tty, |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 78bb7710f36d..24eb74781919 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -87,6 +87,7 @@ static int ohci_restart (struct ohci_hcd *ohci); | |||
87 | #ifdef CONFIG_PCI | 87 | #ifdef CONFIG_PCI |
88 | static void quirk_amd_pll(int state); | 88 | static void quirk_amd_pll(int state); |
89 | static void amd_iso_dev_put(void); | 89 | static void amd_iso_dev_put(void); |
90 | static void sb800_prefetch(struct ohci_hcd *ohci, int on); | ||
90 | #else | 91 | #else |
91 | static inline void quirk_amd_pll(int state) | 92 | static inline void quirk_amd_pll(int state) |
92 | { | 93 | { |
@@ -96,6 +97,10 @@ static inline void amd_iso_dev_put(void) | |||
96 | { | 97 | { |
97 | return; | 98 | return; |
98 | } | 99 | } |
100 | static inline void sb800_prefetch(struct ohci_hcd *ohci, int on) | ||
101 | { | ||
102 | return; | ||
103 | } | ||
99 | #endif | 104 | #endif |
100 | 105 | ||
101 | 106 | ||
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index d2ba04dd785e..b8a1148f248e 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -177,6 +177,13 @@ static int ohci_quirk_amd700(struct usb_hcd *hcd) | |||
177 | return 0; | 177 | return 0; |
178 | 178 | ||
179 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); | 179 | pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev); |
180 | |||
181 | /* SB800 needs pre-fetch fix */ | ||
182 | if ((rev >= 0x40) && (rev <= 0x4f)) { | ||
183 | ohci->flags |= OHCI_QUIRK_AMD_PREFETCH; | ||
184 | ohci_dbg(ohci, "enabled AMD prefetch quirk\n"); | ||
185 | } | ||
186 | |||
180 | if ((rev > 0x3b) || (rev < 0x30)) { | 187 | if ((rev > 0x3b) || (rev < 0x30)) { |
181 | pci_dev_put(amd_smbus_dev); | 188 | pci_dev_put(amd_smbus_dev); |
182 | amd_smbus_dev = NULL; | 189 | amd_smbus_dev = NULL; |
@@ -262,6 +269,19 @@ static void amd_iso_dev_put(void) | |||
262 | 269 | ||
263 | } | 270 | } |
264 | 271 | ||
272 | static void sb800_prefetch(struct ohci_hcd *ohci, int on) | ||
273 | { | ||
274 | struct pci_dev *pdev; | ||
275 | u16 misc; | ||
276 | |||
277 | pdev = to_pci_dev(ohci_to_hcd(ohci)->self.controller); | ||
278 | pci_read_config_word(pdev, 0x50, &misc); | ||
279 | if (on == 0) | ||
280 | pci_write_config_word(pdev, 0x50, misc & 0xfcff); | ||
281 | else | ||
282 | pci_write_config_word(pdev, 0x50, misc | 0x0300); | ||
283 | } | ||
284 | |||
265 | /* List of quirks for OHCI */ | 285 | /* List of quirks for OHCI */ |
266 | static const struct pci_device_id ohci_pci_quirks[] = { | 286 | static const struct pci_device_id ohci_pci_quirks[] = { |
267 | { | 287 | { |
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index 16fecb8ecc39..35288bcae0db 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c | |||
@@ -49,9 +49,12 @@ __acquires(ohci->lock) | |||
49 | switch (usb_pipetype (urb->pipe)) { | 49 | switch (usb_pipetype (urb->pipe)) { |
50 | case PIPE_ISOCHRONOUS: | 50 | case PIPE_ISOCHRONOUS: |
51 | ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--; | 51 | ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs--; |
52 | if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0 | 52 | if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0) { |
53 | && quirk_amdiso(ohci)) | 53 | if (quirk_amdiso(ohci)) |
54 | quirk_amd_pll(1); | 54 | quirk_amd_pll(1); |
55 | if (quirk_amdprefetch(ohci)) | ||
56 | sb800_prefetch(ohci, 0); | ||
57 | } | ||
55 | break; | 58 | break; |
56 | case PIPE_INTERRUPT: | 59 | case PIPE_INTERRUPT: |
57 | ohci_to_hcd(ohci)->self.bandwidth_int_reqs--; | 60 | ohci_to_hcd(ohci)->self.bandwidth_int_reqs--; |
@@ -680,9 +683,12 @@ static void td_submit_urb ( | |||
680 | data + urb->iso_frame_desc [cnt].offset, | 683 | data + urb->iso_frame_desc [cnt].offset, |
681 | urb->iso_frame_desc [cnt].length, urb, cnt); | 684 | urb->iso_frame_desc [cnt].length, urb, cnt); |
682 | } | 685 | } |
683 | if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0 | 686 | if (ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs == 0) { |
684 | && quirk_amdiso(ohci)) | 687 | if (quirk_amdiso(ohci)) |
685 | quirk_amd_pll(0); | 688 | quirk_amd_pll(0); |
689 | if (quirk_amdprefetch(ohci)) | ||
690 | sb800_prefetch(ohci, 1); | ||
691 | } | ||
686 | periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0 | 692 | periodic = ohci_to_hcd(ohci)->self.bandwidth_isoc_reqs++ == 0 |
687 | && ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0; | 693 | && ohci_to_hcd(ohci)->self.bandwidth_int_reqs == 0; |
688 | break; | 694 | break; |
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 222011f6172c..5bf15fed0d9f 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h | |||
@@ -402,6 +402,7 @@ struct ohci_hcd { | |||
402 | #define OHCI_QUIRK_FRAME_NO 0x80 /* no big endian frame_no shift */ | 402 | #define OHCI_QUIRK_FRAME_NO 0x80 /* no big endian frame_no shift */ |
403 | #define OHCI_QUIRK_HUB_POWER 0x100 /* distrust firmware power/oc setup */ | 403 | #define OHCI_QUIRK_HUB_POWER 0x100 /* distrust firmware power/oc setup */ |
404 | #define OHCI_QUIRK_AMD_ISO 0x200 /* ISO transfers*/ | 404 | #define OHCI_QUIRK_AMD_ISO 0x200 /* ISO transfers*/ |
405 | #define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */ | ||
405 | // there are also chip quirks/bugs in init logic | 406 | // there are also chip quirks/bugs in init logic |
406 | 407 | ||
407 | struct work_struct nec_work; /* Worker for NEC quirk */ | 408 | struct work_struct nec_work; /* Worker for NEC quirk */ |
@@ -433,6 +434,10 @@ static inline int quirk_amdiso(struct ohci_hcd *ohci) | |||
433 | { | 434 | { |
434 | return ohci->flags & OHCI_QUIRK_AMD_ISO; | 435 | return ohci->flags & OHCI_QUIRK_AMD_ISO; |
435 | } | 436 | } |
437 | static inline int quirk_amdprefetch(struct ohci_hcd *ohci) | ||
438 | { | ||
439 | return ohci->flags & OHCI_QUIRK_AMD_PREFETCH; | ||
440 | } | ||
436 | #else | 441 | #else |
437 | static inline int quirk_nec(struct ohci_hcd *ohci) | 442 | static inline int quirk_nec(struct ohci_hcd *ohci) |
438 | { | 443 | { |
@@ -446,6 +451,10 @@ static inline int quirk_amdiso(struct ohci_hcd *ohci) | |||
446 | { | 451 | { |
447 | return 0; | 452 | return 0; |
448 | } | 453 | } |
454 | static inline int quirk_amdprefetch(struct ohci_hcd *ohci) | ||
455 | { | ||
456 | return 0; | ||
457 | } | ||
449 | #endif | 458 | #endif |
450 | 459 | ||
451 | /* convert between an hcd pointer and the corresponding ohci_hcd */ | 460 | /* convert between an hcd pointer and the corresponding ohci_hcd */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 1db4fea8c170..b8fd270a8b0d 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -802,9 +802,11 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
802 | int i; | 802 | int i; |
803 | 803 | ||
804 | /* Free the Event Ring Segment Table and the actual Event Ring */ | 804 | /* Free the Event Ring Segment Table and the actual Event Ring */ |
805 | xhci_writel(xhci, 0, &xhci->ir_set->erst_size); | 805 | if (xhci->ir_set) { |
806 | xhci_write_64(xhci, 0, &xhci->ir_set->erst_base); | 806 | xhci_writel(xhci, 0, &xhci->ir_set->erst_size); |
807 | xhci_write_64(xhci, 0, &xhci->ir_set->erst_dequeue); | 807 | xhci_write_64(xhci, 0, &xhci->ir_set->erst_base); |
808 | xhci_write_64(xhci, 0, &xhci->ir_set->erst_dequeue); | ||
809 | } | ||
808 | size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); | 810 | size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); |
809 | if (xhci->erst.entries) | 811 | if (xhci->erst.entries) |
810 | pci_free_consistent(pdev, size, | 812 | pci_free_consistent(pdev, size, |
@@ -841,9 +843,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
841 | xhci->dcbaa, xhci->dcbaa->dma); | 843 | xhci->dcbaa, xhci->dcbaa->dma); |
842 | xhci->dcbaa = NULL; | 844 | xhci->dcbaa = NULL; |
843 | 845 | ||
846 | scratchpad_free(xhci); | ||
844 | xhci->page_size = 0; | 847 | xhci->page_size = 0; |
845 | xhci->page_shift = 0; | 848 | xhci->page_shift = 0; |
846 | scratchpad_free(xhci); | ||
847 | } | 849 | } |
848 | 850 | ||
849 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | 851 | int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 173c39c76489..821b7b4709de 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -864,9 +864,11 @@ static struct xhci_segment *trb_in_td( | |||
864 | cur_seg = start_seg; | 864 | cur_seg = start_seg; |
865 | 865 | ||
866 | do { | 866 | do { |
867 | if (start_dma == 0) | ||
868 | return 0; | ||
867 | /* We may get an event for a Link TRB in the middle of a TD */ | 869 | /* We may get an event for a Link TRB in the middle of a TD */ |
868 | end_seg_dma = xhci_trb_virt_to_dma(cur_seg, | 870 | end_seg_dma = xhci_trb_virt_to_dma(cur_seg, |
869 | &start_seg->trbs[TRBS_PER_SEGMENT - 1]); | 871 | &cur_seg->trbs[TRBS_PER_SEGMENT - 1]); |
870 | /* If the end TRB isn't in this segment, this is set to 0 */ | 872 | /* If the end TRB isn't in this segment, this is set to 0 */ |
871 | end_trb_dma = xhci_trb_virt_to_dma(cur_seg, end_trb); | 873 | end_trb_dma = xhci_trb_virt_to_dma(cur_seg, end_trb); |
872 | 874 | ||
@@ -893,8 +895,9 @@ static struct xhci_segment *trb_in_td( | |||
893 | } | 895 | } |
894 | cur_seg = cur_seg->next; | 896 | cur_seg = cur_seg->next; |
895 | start_dma = xhci_trb_virt_to_dma(cur_seg, &cur_seg->trbs[0]); | 897 | start_dma = xhci_trb_virt_to_dma(cur_seg, &cur_seg->trbs[0]); |
896 | } while (1); | 898 | } while (cur_seg != start_seg); |
897 | 899 | ||
900 | return 0; | ||
898 | } | 901 | } |
899 | 902 | ||
900 | /* | 903 | /* |
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 9ed3e741bee1..10f3205798e8 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -348,12 +348,12 @@ static unsigned int mon_buff_area_alloc_contiguous(struct mon_reader_bin *rp, | |||
348 | 348 | ||
349 | /* | 349 | /* |
350 | * Return a few (kilo-)bytes to the head of the buffer. | 350 | * Return a few (kilo-)bytes to the head of the buffer. |
351 | * This is used if a DMA fetch fails. | 351 | * This is used if a data fetch fails. |
352 | */ | 352 | */ |
353 | static void mon_buff_area_shrink(struct mon_reader_bin *rp, unsigned int size) | 353 | static void mon_buff_area_shrink(struct mon_reader_bin *rp, unsigned int size) |
354 | { | 354 | { |
355 | 355 | ||
356 | size = (size + PKT_ALIGN-1) & ~(PKT_ALIGN-1); | 356 | /* size &= ~(PKT_ALIGN-1); -- we're called with aligned size */ |
357 | rp->b_cnt -= size; | 357 | rp->b_cnt -= size; |
358 | if (rp->b_in < size) | 358 | if (rp->b_in < size) |
359 | rp->b_in += rp->b_size; | 359 | rp->b_in += rp->b_size; |
@@ -433,6 +433,7 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, | |||
433 | unsigned int urb_length; | 433 | unsigned int urb_length; |
434 | unsigned int offset; | 434 | unsigned int offset; |
435 | unsigned int length; | 435 | unsigned int length; |
436 | unsigned int delta; | ||
436 | unsigned int ndesc, lendesc; | 437 | unsigned int ndesc, lendesc; |
437 | unsigned char dir; | 438 | unsigned char dir; |
438 | struct mon_bin_hdr *ep; | 439 | struct mon_bin_hdr *ep; |
@@ -537,8 +538,10 @@ static void mon_bin_event(struct mon_reader_bin *rp, struct urb *urb, | |||
537 | if (length != 0) { | 538 | if (length != 0) { |
538 | ep->flag_data = mon_bin_get_data(rp, offset, urb, length); | 539 | ep->flag_data = mon_bin_get_data(rp, offset, urb, length); |
539 | if (ep->flag_data != 0) { /* Yes, it's 0x00, not '0' */ | 540 | if (ep->flag_data != 0) { /* Yes, it's 0x00, not '0' */ |
540 | ep->len_cap = 0; | 541 | delta = (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1); |
541 | mon_buff_area_shrink(rp, length); | 542 | ep->len_cap -= length; |
543 | delta -= (ep->len_cap + PKT_ALIGN-1) & ~(PKT_ALIGN-1); | ||
544 | mon_buff_area_shrink(rp, delta); | ||
542 | } | 545 | } |
543 | } else { | 546 | } else { |
544 | ep->flag_data = data_tag; | 547 | ep->flag_data = data_tag; |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 698252a4dc5d..bd254ec97d14 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -50,6 +50,8 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, | |||
50 | static void cp210x_break_ctl(struct tty_struct *, int); | 50 | static void cp210x_break_ctl(struct tty_struct *, int); |
51 | static int cp210x_startup(struct usb_serial *); | 51 | static int cp210x_startup(struct usb_serial *); |
52 | static void cp210x_disconnect(struct usb_serial *); | 52 | static void cp210x_disconnect(struct usb_serial *); |
53 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); | ||
54 | static int cp210x_carrier_raised(struct usb_serial_port *p); | ||
53 | 55 | ||
54 | static int debug; | 56 | static int debug; |
55 | 57 | ||
@@ -143,6 +145,8 @@ static struct usb_serial_driver cp210x_device = { | |||
143 | .tiocmset = cp210x_tiocmset, | 145 | .tiocmset = cp210x_tiocmset, |
144 | .attach = cp210x_startup, | 146 | .attach = cp210x_startup, |
145 | .disconnect = cp210x_disconnect, | 147 | .disconnect = cp210x_disconnect, |
148 | .dtr_rts = cp210x_dtr_rts, | ||
149 | .carrier_raised = cp210x_carrier_raised | ||
146 | }; | 150 | }; |
147 | 151 | ||
148 | /* Config request types */ | 152 | /* Config request types */ |
@@ -746,6 +750,14 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file, | |||
746 | return cp210x_set_config(port, CP210X_SET_MHS, &control, 2); | 750 | return cp210x_set_config(port, CP210X_SET_MHS, &control, 2); |
747 | } | 751 | } |
748 | 752 | ||
753 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on) | ||
754 | { | ||
755 | if (on) | ||
756 | cp210x_tiocmset_port(p, NULL, TIOCM_DTR|TIOCM_RTS, 0); | ||
757 | else | ||
758 | cp210x_tiocmset_port(p, NULL, 0, TIOCM_DTR|TIOCM_RTS); | ||
759 | } | ||
760 | |||
749 | static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | 761 | static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) |
750 | { | 762 | { |
751 | struct usb_serial_port *port = tty->driver_data; | 763 | struct usb_serial_port *port = tty->driver_data; |
@@ -768,6 +780,15 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | |||
768 | return result; | 780 | return result; |
769 | } | 781 | } |
770 | 782 | ||
783 | static int cp210x_carrier_raised(struct usb_serial_port *p) | ||
784 | { | ||
785 | unsigned int control; | ||
786 | cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1); | ||
787 | if (control & CONTROL_DCD) | ||
788 | return 1; | ||
789 | return 0; | ||
790 | } | ||
791 | |||
771 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) | 792 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) |
772 | { | 793 | { |
773 | struct usb_serial_port *port = tty->driver_data; | 794 | struct usb_serial_port *port = tty->driver_data; |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index cd44c68954df..319aaf9725b3 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -308,6 +308,7 @@ static int option_resume(struct usb_serial *serial); | |||
308 | 308 | ||
309 | #define DLINK_VENDOR_ID 0x1186 | 309 | #define DLINK_VENDOR_ID 0x1186 |
310 | #define DLINK_PRODUCT_DWM_652 0x3e04 | 310 | #define DLINK_PRODUCT_DWM_652 0x3e04 |
311 | #define DLINK_PRODUCT_DWM_652_U5 0xce16 | ||
311 | 312 | ||
312 | #define QISDA_VENDOR_ID 0x1da5 | 313 | #define QISDA_VENDOR_ID 0x1da5 |
313 | #define QISDA_PRODUCT_H21_4512 0x4512 | 314 | #define QISDA_PRODUCT_H21_4512 0x4512 |
@@ -586,6 +587,7 @@ static struct usb_device_id option_ids[] = { | |||
586 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 587 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
587 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, | 588 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
588 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, | 589 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, |
590 | { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ | ||
589 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, | 591 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4512) }, |
590 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, | 592 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) }, |
591 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, | 593 | { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) }, |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 2211a852af9c..96774949cd30 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -433,8 +433,9 @@ static int corgi_bl_update_status(struct backlight_device *bd) | |||
433 | 433 | ||
434 | if (corgibl_flags & CORGIBL_SUSPENDED) | 434 | if (corgibl_flags & CORGIBL_SUSPENDED) |
435 | intensity = 0; | 435 | intensity = 0; |
436 | if (corgibl_flags & CORGIBL_BATTLOW) | 436 | |
437 | intensity &= lcd->limit_mask; | 437 | if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask) |
438 | intensity = lcd->limit_mask; | ||
438 | 439 | ||
439 | return corgi_bl_set_intensity(lcd, intensity); | 440 | return corgi_bl_set_intensity(lcd, intensity); |
440 | } | 441 | } |
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index b6449470106c..a482dd7b0311 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -56,7 +56,7 @@ static int fb_notifier_callback(struct notifier_block *self, | |||
56 | 56 | ||
57 | static int lcd_register_fb(struct lcd_device *ld) | 57 | static int lcd_register_fb(struct lcd_device *ld) |
58 | { | 58 | { |
59 | memset(&ld->fb_notif, 0, sizeof(&ld->fb_notif)); | 59 | memset(&ld->fb_notif, 0, sizeof(ld->fb_notif)); |
60 | ld->fb_notif.notifier_call = fb_notifier_callback; | 60 | ld->fb_notif.notifier_call = fb_notifier_callback; |
61 | return fb_register_client(&ld->fb_notif); | 61 | return fb_register_client(&ld->fb_notif); |
62 | } | 62 | } |
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index d065894ce38f..035d56835b75 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -704,7 +704,7 @@ static int __init fb_probe(struct platform_device *device) | |||
704 | 704 | ||
705 | if (i == ARRAY_SIZE(known_lcd_panels)) { | 705 | if (i == ARRAY_SIZE(known_lcd_panels)) { |
706 | dev_err(&device->dev, "GLCD: No valid panel found\n"); | 706 | dev_err(&device->dev, "GLCD: No valid panel found\n"); |
707 | ret = ENODEV; | 707 | ret = -ENODEV; |
708 | goto err_clk_disable; | 708 | goto err_clk_disable; |
709 | } else | 709 | } else |
710 | dev_info(&device->dev, "GLCD: Found %s panel\n", | 710 | dev_info(&device->dev, "GLCD: Found %s panel\n", |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index f24d04132eda..4d227b152001 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
@@ -317,7 +317,7 @@ static int __devexit pnx4008_wdt_remove(struct platform_device *pdev) | |||
317 | 317 | ||
318 | static struct platform_driver platform_wdt_driver = { | 318 | static struct platform_driver platform_wdt_driver = { |
319 | .driver = { | 319 | .driver = { |
320 | .name = "watchdog", | 320 | .name = "pnx4008-watchdog", |
321 | .owner = THIS_MODULE, | 321 | .owner = THIS_MODULE, |
322 | }, | 322 | }, |
323 | .probe = pnx4008_wdt_probe, | 323 | .probe = pnx4008_wdt_probe, |
@@ -352,4 +352,4 @@ MODULE_PARM_DESC(nowayout, | |||
352 | 352 | ||
353 | MODULE_LICENSE("GPL"); | 353 | MODULE_LICENSE("GPL"); |
354 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 354 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
355 | MODULE_ALIAS("platform:watchdog"); | 355 | MODULE_ALIAS("platform:pnx4008-watchdog"); |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 1e25efcb55c8..d27d4ec6579b 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -720,7 +720,7 @@ void | |||
720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | 720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) |
721 | { | 721 | { |
722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
723 | cifs_sb->mnt_cifs_flags &= CIFS_MOUNT_SERVER_INUM; | 723 | cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM; |
724 | cERROR(1, ("Autodisabling the use of server inode numbers on " | 724 | cERROR(1, ("Autodisabling the use of server inode numbers on " |
725 | "%s. This server doesn't seem to support them " | 725 | "%s. This server doesn't seem to support them " |
726 | "properly. Hardlinks will not be recognized on this " | 726 | "properly. Hardlinks will not be recognized on this " |
diff --git a/fs/fcntl.c b/fs/fcntl.c index fc089f2f7f56..2cf93ec40a67 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -284,7 +284,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg) | |||
284 | type = PIDTYPE_PID; | 284 | type = PIDTYPE_PID; |
285 | break; | 285 | break; |
286 | 286 | ||
287 | case F_OWNER_GID: | 287 | case F_OWNER_PGRP: |
288 | type = PIDTYPE_PGID; | 288 | type = PIDTYPE_PGID; |
289 | break; | 289 | break; |
290 | 290 | ||
@@ -321,7 +321,7 @@ static int f_getown_ex(struct file *filp, unsigned long arg) | |||
321 | break; | 321 | break; |
322 | 322 | ||
323 | case PIDTYPE_PGID: | 323 | case PIDTYPE_PGID: |
324 | owner.type = F_OWNER_GID; | 324 | owner.type = F_OWNER_PGRP; |
325 | break; | 325 | break; |
326 | 326 | ||
327 | default: | 327 | default: |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ff37454fa783..741a562177fc 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2767,7 +2767,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred, | |||
2767 | .pages = &page, | 2767 | .pages = &page, |
2768 | .pgbase = 0, | 2768 | .pgbase = 0, |
2769 | .count = count, | 2769 | .count = count, |
2770 | .bitmask = NFS_SERVER(dentry->d_inode)->cache_consistency_bitmask, | 2770 | .bitmask = NFS_SERVER(dentry->d_inode)->attr_bitmask, |
2771 | }; | 2771 | }; |
2772 | struct nfs4_readdir_res res; | 2772 | struct nfs4_readdir_res res; |
2773 | struct rpc_message msg = { | 2773 | struct rpc_message msg = { |
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index 1c6cfb59128d..3f5d5d06f53c 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
@@ -871,7 +871,6 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) | |||
871 | * exclusive with a new mount job. Though it doesn't cover | 871 | * exclusive with a new mount job. Though it doesn't cover |
872 | * umount, it's enough for the purpose. | 872 | * umount, it's enough for the purpose. |
873 | */ | 873 | */ |
874 | mutex_lock(&nilfs->ns_mount_mutex); | ||
875 | if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { | 874 | if (nilfs_checkpoint_is_mounted(nilfs, cno, 1)) { |
876 | /* Current implementation does not have to protect | 875 | /* Current implementation does not have to protect |
877 | plain read-only mounts since they are exclusive | 876 | plain read-only mounts since they are exclusive |
@@ -880,7 +879,6 @@ int nilfs_cpfile_change_cpmode(struct inode *cpfile, __u64 cno, int mode) | |||
880 | ret = -EBUSY; | 879 | ret = -EBUSY; |
881 | } else | 880 | } else |
882 | ret = nilfs_cpfile_clear_snapshot(cpfile, cno); | 881 | ret = nilfs_cpfile_clear_snapshot(cpfile, cno); |
883 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
884 | return ret; | 882 | return ret; |
885 | case NILFS_SNAPSHOT: | 883 | case NILFS_SNAPSHOT: |
886 | return nilfs_cpfile_set_snapshot(cpfile, cno); | 884 | return nilfs_cpfile_set_snapshot(cpfile, cno); |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 5040220c3732..2a0a5a3ac134 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -664,7 +664,6 @@ int nilfs_load_inode_block(struct nilfs_sb_info *sbi, struct inode *inode, | |||
664 | int err; | 664 | int err; |
665 | 665 | ||
666 | spin_lock(&sbi->s_inode_lock); | 666 | spin_lock(&sbi->s_inode_lock); |
667 | /* Caller of this function MUST lock s_inode_lock */ | ||
668 | if (ii->i_bh == NULL) { | 667 | if (ii->i_bh == NULL) { |
669 | spin_unlock(&sbi->s_inode_lock); | 668 | spin_unlock(&sbi->s_inode_lock); |
670 | err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino, | 669 | err = nilfs_ifile_get_inode_block(sbi->s_ifile, inode->i_ino, |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index d24057d58f17..f6af76042d80 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
@@ -99,7 +99,8 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs, | |||
99 | static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, | 99 | static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, |
100 | unsigned int cmd, void __user *argp) | 100 | unsigned int cmd, void __user *argp) |
101 | { | 101 | { |
102 | struct inode *cpfile = NILFS_SB(inode->i_sb)->s_nilfs->ns_cpfile; | 102 | struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs; |
103 | struct inode *cpfile = nilfs->ns_cpfile; | ||
103 | struct nilfs_transaction_info ti; | 104 | struct nilfs_transaction_info ti; |
104 | struct nilfs_cpmode cpmode; | 105 | struct nilfs_cpmode cpmode; |
105 | int ret; | 106 | int ret; |
@@ -109,14 +110,17 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, | |||
109 | if (copy_from_user(&cpmode, argp, sizeof(cpmode))) | 110 | if (copy_from_user(&cpmode, argp, sizeof(cpmode))) |
110 | return -EFAULT; | 111 | return -EFAULT; |
111 | 112 | ||
113 | mutex_lock(&nilfs->ns_mount_mutex); | ||
112 | nilfs_transaction_begin(inode->i_sb, &ti, 0); | 114 | nilfs_transaction_begin(inode->i_sb, &ti, 0); |
113 | ret = nilfs_cpfile_change_cpmode( | 115 | ret = nilfs_cpfile_change_cpmode( |
114 | cpfile, cpmode.cm_cno, cpmode.cm_mode); | 116 | cpfile, cpmode.cm_cno, cpmode.cm_mode); |
115 | if (unlikely(ret < 0)) { | 117 | if (unlikely(ret < 0)) { |
116 | nilfs_transaction_abort(inode->i_sb); | 118 | nilfs_transaction_abort(inode->i_sb); |
119 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
117 | return ret; | 120 | return ret; |
118 | } | 121 | } |
119 | nilfs_transaction_commit(inode->i_sb); /* never fails */ | 122 | nilfs_transaction_commit(inode->i_sb); /* never fails */ |
123 | mutex_unlock(&nilfs->ns_mount_mutex); | ||
120 | return ret; | 124 | return ret; |
121 | } | 125 | } |
122 | 126 | ||
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 89fc8ee1f5a5..de059f490586 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1712,7 +1712,8 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, | |||
1712 | struct super_block *sb = inode->i_sb; | 1712 | struct super_block *sb = inode->i_sb; |
1713 | 1713 | ||
1714 | if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)) || | 1714 | if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)) || |
1715 | !(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL)) | 1715 | !(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL) || |
1716 | OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) | ||
1716 | return 0; | 1717 | return 0; |
1717 | 1718 | ||
1718 | cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits; | 1719 | cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits; |
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index eae404602424..d963d8638709 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -35,12 +35,7 @@ | |||
35 | #include <linux/kref.h> | 35 | #include <linux/kref.h> |
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/lockdep.h> | 37 | #include <linux/lockdep.h> |
38 | #ifndef CONFIG_OCFS2_COMPAT_JBD | 38 | #include <linux/jbd2.h> |
39 | # include <linux/jbd2.h> | ||
40 | #else | ||
41 | # include <linux/jbd.h> | ||
42 | # include "ocfs2_jbd_compat.h" | ||
43 | #endif | ||
44 | 39 | ||
45 | /* For union ocfs2_dlm_lksb */ | 40 | /* For union ocfs2_dlm_lksb */ |
46 | #include "stackglue.h" | 41 | #include "stackglue.h" |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 60287fc56bcb..3a0df7a1b810 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -3743,6 +3743,9 @@ static int ocfs2_attach_refcount_tree(struct inode *inode, | |||
3743 | goto out; | 3743 | goto out; |
3744 | } | 3744 | } |
3745 | 3745 | ||
3746 | if (oi->ip_dyn_features & OCFS2_INLINE_DATA_FL) | ||
3747 | goto attach_xattr; | ||
3748 | |||
3746 | ocfs2_init_dinode_extent_tree(&di_et, INODE_CACHE(inode), di_bh); | 3749 | ocfs2_init_dinode_extent_tree(&di_et, INODE_CACHE(inode), di_bh); |
3747 | 3750 | ||
3748 | size = i_size_read(inode); | 3751 | size = i_size_read(inode); |
@@ -3769,6 +3772,7 @@ static int ocfs2_attach_refcount_tree(struct inode *inode, | |||
3769 | cpos += num_clusters; | 3772 | cpos += num_clusters; |
3770 | } | 3773 | } |
3771 | 3774 | ||
3775 | attach_xattr: | ||
3772 | if (oi->ip_dyn_features & OCFS2_HAS_XATTR_FL) { | 3776 | if (oi->ip_dyn_features & OCFS2_HAS_XATTR_FL) { |
3773 | ret = ocfs2_xattr_attach_refcount_tree(inode, di_bh, | 3777 | ret = ocfs2_xattr_attach_refcount_tree(inode, di_bh, |
3774 | &ref_tree->rf_ci, | 3778 | &ref_tree->rf_ci, |
@@ -3858,6 +3862,49 @@ out: | |||
3858 | return ret; | 3862 | return ret; |
3859 | } | 3863 | } |
3860 | 3864 | ||
3865 | static int ocfs2_duplicate_inline_data(struct inode *s_inode, | ||
3866 | struct buffer_head *s_bh, | ||
3867 | struct inode *t_inode, | ||
3868 | struct buffer_head *t_bh) | ||
3869 | { | ||
3870 | int ret; | ||
3871 | handle_t *handle; | ||
3872 | struct ocfs2_super *osb = OCFS2_SB(s_inode->i_sb); | ||
3873 | struct ocfs2_dinode *s_di = (struct ocfs2_dinode *)s_bh->b_data; | ||
3874 | struct ocfs2_dinode *t_di = (struct ocfs2_dinode *)t_bh->b_data; | ||
3875 | |||
3876 | BUG_ON(!(OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)); | ||
3877 | |||
3878 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); | ||
3879 | if (IS_ERR(handle)) { | ||
3880 | ret = PTR_ERR(handle); | ||
3881 | mlog_errno(ret); | ||
3882 | goto out; | ||
3883 | } | ||
3884 | |||
3885 | ret = ocfs2_journal_access_di(handle, INODE_CACHE(t_inode), t_bh, | ||
3886 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
3887 | if (ret) { | ||
3888 | mlog_errno(ret); | ||
3889 | goto out_commit; | ||
3890 | } | ||
3891 | |||
3892 | t_di->id2.i_data.id_count = s_di->id2.i_data.id_count; | ||
3893 | memcpy(t_di->id2.i_data.id_data, s_di->id2.i_data.id_data, | ||
3894 | le16_to_cpu(s_di->id2.i_data.id_count)); | ||
3895 | spin_lock(&OCFS2_I(t_inode)->ip_lock); | ||
3896 | OCFS2_I(t_inode)->ip_dyn_features |= OCFS2_INLINE_DATA_FL; | ||
3897 | t_di->i_dyn_features = cpu_to_le16(OCFS2_I(t_inode)->ip_dyn_features); | ||
3898 | spin_unlock(&OCFS2_I(t_inode)->ip_lock); | ||
3899 | |||
3900 | ocfs2_journal_dirty(handle, t_bh); | ||
3901 | |||
3902 | out_commit: | ||
3903 | ocfs2_commit_trans(osb, handle); | ||
3904 | out: | ||
3905 | return ret; | ||
3906 | } | ||
3907 | |||
3861 | static int ocfs2_duplicate_extent_list(struct inode *s_inode, | 3908 | static int ocfs2_duplicate_extent_list(struct inode *s_inode, |
3862 | struct inode *t_inode, | 3909 | struct inode *t_inode, |
3863 | struct buffer_head *t_bh, | 3910 | struct buffer_head *t_bh, |
@@ -3997,6 +4044,14 @@ static int ocfs2_create_reflink_node(struct inode *s_inode, | |||
3997 | goto out; | 4044 | goto out; |
3998 | } | 4045 | } |
3999 | 4046 | ||
4047 | if (OCFS2_I(s_inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { | ||
4048 | ret = ocfs2_duplicate_inline_data(s_inode, s_bh, | ||
4049 | t_inode, t_bh); | ||
4050 | if (ret) | ||
4051 | mlog_errno(ret); | ||
4052 | goto out; | ||
4053 | } | ||
4054 | |||
4000 | ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), | 4055 | ret = ocfs2_lock_refcount_tree(osb, le64_to_cpu(di->i_refcount_loc), |
4001 | 1, &ref_tree, &ref_root_bh); | 4056 | 1, &ref_tree, &ref_root_bh); |
4002 | if (ret) { | 4057 | if (ret) { |
@@ -4013,10 +4068,6 @@ static int ocfs2_create_reflink_node(struct inode *s_inode, | |||
4013 | goto out_unlock_refcount; | 4068 | goto out_unlock_refcount; |
4014 | } | 4069 | } |
4015 | 4070 | ||
4016 | ret = ocfs2_complete_reflink(s_inode, s_bh, t_inode, t_bh, preserve); | ||
4017 | if (ret) | ||
4018 | mlog_errno(ret); | ||
4019 | |||
4020 | out_unlock_refcount: | 4071 | out_unlock_refcount: |
4021 | ocfs2_unlock_refcount_tree(osb, ref_tree, 1); | 4072 | ocfs2_unlock_refcount_tree(osb, ref_tree, 1); |
4022 | brelse(ref_root_bh); | 4073 | brelse(ref_root_bh); |
@@ -4068,9 +4119,17 @@ static int __ocfs2_reflink(struct dentry *old_dentry, | |||
4068 | ret = ocfs2_reflink_xattrs(inode, old_bh, | 4119 | ret = ocfs2_reflink_xattrs(inode, old_bh, |
4069 | new_inode, new_bh, | 4120 | new_inode, new_bh, |
4070 | preserve); | 4121 | preserve); |
4071 | if (ret) | 4122 | if (ret) { |
4072 | mlog_errno(ret); | 4123 | mlog_errno(ret); |
4124 | goto inode_unlock; | ||
4125 | } | ||
4073 | } | 4126 | } |
4127 | |||
4128 | ret = ocfs2_complete_reflink(inode, old_bh, | ||
4129 | new_inode, new_bh, preserve); | ||
4130 | if (ret) | ||
4131 | mlog_errno(ret); | ||
4132 | |||
4074 | inode_unlock: | 4133 | inode_unlock: |
4075 | ocfs2_inode_unlock(new_inode, 1); | 4134 | ocfs2_inode_unlock(new_inode, 1); |
4076 | brelse(new_bh); | 4135 | brelse(new_bh); |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index c0e48aeebb1c..14f47d2bfe02 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -773,18 +773,20 @@ static int ocfs2_sb_probe(struct super_block *sb, | |||
773 | if (tmpstat < 0) { | 773 | if (tmpstat < 0) { |
774 | status = tmpstat; | 774 | status = tmpstat; |
775 | mlog_errno(status); | 775 | mlog_errno(status); |
776 | goto bail; | 776 | break; |
777 | } | 777 | } |
778 | di = (struct ocfs2_dinode *) (*bh)->b_data; | 778 | di = (struct ocfs2_dinode *) (*bh)->b_data; |
779 | memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats)); | 779 | memset(stats, 0, sizeof(struct ocfs2_blockcheck_stats)); |
780 | spin_lock_init(&stats->b_lock); | 780 | spin_lock_init(&stats->b_lock); |
781 | status = ocfs2_verify_volume(di, *bh, blksize, stats); | 781 | tmpstat = ocfs2_verify_volume(di, *bh, blksize, stats); |
782 | if (status >= 0) | 782 | if (tmpstat < 0) { |
783 | goto bail; | 783 | brelse(*bh); |
784 | brelse(*bh); | 784 | *bh = NULL; |
785 | *bh = NULL; | 785 | } |
786 | if (status != -EAGAIN) | 786 | if (tmpstat != -EAGAIN) { |
787 | status = tmpstat; | ||
787 | break; | 788 | break; |
789 | } | ||
788 | } | 790 | } |
789 | 791 | ||
790 | bail: | 792 | bail: |
@@ -1645,6 +1647,10 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
1645 | buf->f_bavail = buf->f_bfree; | 1647 | buf->f_bavail = buf->f_bfree; |
1646 | buf->f_files = numbits; | 1648 | buf->f_files = numbits; |
1647 | buf->f_ffree = freebits; | 1649 | buf->f_ffree = freebits; |
1650 | buf->f_fsid.val[0] = crc32_le(0, osb->uuid_str, OCFS2_VOL_UUID_LEN) | ||
1651 | & 0xFFFFFFFFUL; | ||
1652 | buf->f_fsid.val[1] = crc32_le(0, osb->uuid_str + OCFS2_VOL_UUID_LEN, | ||
1653 | OCFS2_VOL_UUID_LEN) & 0xFFFFFFFFUL; | ||
1648 | 1654 | ||
1649 | brelse(bh); | 1655 | brelse(bh); |
1650 | 1656 | ||
diff --git a/fs/ocfs2/uptodate.c b/fs/ocfs2/uptodate.c index b6284f235d2f..c61369342a27 100644 --- a/fs/ocfs2/uptodate.c +++ b/fs/ocfs2/uptodate.c | |||
@@ -53,11 +53,6 @@ | |||
53 | #include <linux/highmem.h> | 53 | #include <linux/highmem.h> |
54 | #include <linux/buffer_head.h> | 54 | #include <linux/buffer_head.h> |
55 | #include <linux/rbtree.h> | 55 | #include <linux/rbtree.h> |
56 | #ifndef CONFIG_OCFS2_COMPAT_JBD | ||
57 | # include <linux/jbd2.h> | ||
58 | #else | ||
59 | # include <linux/jbd.h> | ||
60 | #endif | ||
61 | 56 | ||
62 | #define MLOG_MASK_PREFIX ML_UPTODATE | 57 | #define MLOG_MASK_PREFIX ML_UPTODATE |
63 | 58 | ||
diff --git a/fs/proc/array.c b/fs/proc/array.c index 07f77a7945c3..822c2d506518 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -571,7 +571,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
571 | rsslim, | 571 | rsslim, |
572 | mm ? mm->start_code : 0, | 572 | mm ? mm->start_code : 0, |
573 | mm ? mm->end_code : 0, | 573 | mm ? mm->end_code : 0, |
574 | (permitted) ? task->stack_start : 0, | 574 | (permitted && mm) ? task->stack_start : 0, |
575 | esp, | 575 | esp, |
576 | eip, | 576 | eip, |
577 | /* The signal information here is obsolete. | 577 | /* The signal information here is obsolete. |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1099395d7d6c..fb17f8226b09 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1980,7 +1980,7 @@ xlog_recover_do_reg_buffer( | |||
1980 | "XFS: NULL dquot in %s.", __func__); | 1980 | "XFS: NULL dquot in %s.", __func__); |
1981 | goto next; | 1981 | goto next; |
1982 | } | 1982 | } |
1983 | if (item->ri_buf[i].i_len < sizeof(xfs_dqblk_t)) { | 1983 | if (item->ri_buf[i].i_len < sizeof(xfs_disk_dquot_t)) { |
1984 | cmn_err(CE_ALERT, | 1984 | cmn_err(CE_ALERT, |
1985 | "XFS: dquot too small (%d) in %s.", | 1985 | "XFS: dquot too small (%d) in %s.", |
1986 | item->ri_buf[i].i_len, __func__); | 1986 | item->ri_buf[i].i_len, __func__); |
@@ -2635,7 +2635,7 @@ xlog_recover_do_dquot_trans( | |||
2635 | "XFS: NULL dquot in %s.", __func__); | 2635 | "XFS: NULL dquot in %s.", __func__); |
2636 | return XFS_ERROR(EIO); | 2636 | return XFS_ERROR(EIO); |
2637 | } | 2637 | } |
2638 | if (item->ri_buf[1].i_len < sizeof(xfs_dqblk_t)) { | 2638 | if (item->ri_buf[1].i_len < sizeof(xfs_disk_dquot_t)) { |
2639 | cmn_err(CE_ALERT, | 2639 | cmn_err(CE_ALERT, |
2640 | "XFS: dquot too small (%d) in %s.", | 2640 | "XFS: dquot too small (%d) in %s.", |
2641 | item->ri_buf[1].i_len, __func__); | 2641 | item->ri_buf[1].i_len, __func__); |
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index f31271c30de9..2ffc570679be 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c | |||
@@ -467,6 +467,7 @@ xfs_trans_ail_update( | |||
467 | { | 467 | { |
468 | xfs_log_item_t *dlip = NULL; | 468 | xfs_log_item_t *dlip = NULL; |
469 | xfs_log_item_t *mlip; /* ptr to minimum lip */ | 469 | xfs_log_item_t *mlip; /* ptr to minimum lip */ |
470 | xfs_lsn_t tail_lsn; | ||
470 | 471 | ||
471 | mlip = xfs_ail_min(ailp); | 472 | mlip = xfs_ail_min(ailp); |
472 | 473 | ||
@@ -483,8 +484,16 @@ xfs_trans_ail_update( | |||
483 | 484 | ||
484 | if (mlip == dlip) { | 485 | if (mlip == dlip) { |
485 | mlip = xfs_ail_min(ailp); | 486 | mlip = xfs_ail_min(ailp); |
487 | /* | ||
488 | * It is not safe to access mlip after the AIL lock is | ||
489 | * dropped, so we must get a copy of li_lsn before we do | ||
490 | * so. This is especially important on 32-bit platforms | ||
491 | * where accessing and updating 64-bit values like li_lsn | ||
492 | * is not atomic. | ||
493 | */ | ||
494 | tail_lsn = mlip->li_lsn; | ||
486 | spin_unlock(&ailp->xa_lock); | 495 | spin_unlock(&ailp->xa_lock); |
487 | xfs_log_move_tail(ailp->xa_mount, mlip->li_lsn); | 496 | xfs_log_move_tail(ailp->xa_mount, tail_lsn); |
488 | } else { | 497 | } else { |
489 | spin_unlock(&ailp->xa_lock); | 498 | spin_unlock(&ailp->xa_lock); |
490 | } | 499 | } |
@@ -514,6 +523,7 @@ xfs_trans_ail_delete( | |||
514 | { | 523 | { |
515 | xfs_log_item_t *dlip; | 524 | xfs_log_item_t *dlip; |
516 | xfs_log_item_t *mlip; | 525 | xfs_log_item_t *mlip; |
526 | xfs_lsn_t tail_lsn; | ||
517 | 527 | ||
518 | if (lip->li_flags & XFS_LI_IN_AIL) { | 528 | if (lip->li_flags & XFS_LI_IN_AIL) { |
519 | mlip = xfs_ail_min(ailp); | 529 | mlip = xfs_ail_min(ailp); |
@@ -527,9 +537,16 @@ xfs_trans_ail_delete( | |||
527 | 537 | ||
528 | if (mlip == dlip) { | 538 | if (mlip == dlip) { |
529 | mlip = xfs_ail_min(ailp); | 539 | mlip = xfs_ail_min(ailp); |
540 | /* | ||
541 | * It is not safe to access mlip after the AIL lock | ||
542 | * is dropped, so we must get a copy of li_lsn | ||
543 | * before we do so. This is especially important | ||
544 | * on 32-bit platforms where accessing and updating | ||
545 | * 64-bit values like li_lsn is not atomic. | ||
546 | */ | ||
547 | tail_lsn = mlip ? mlip->li_lsn : 0; | ||
530 | spin_unlock(&ailp->xa_lock); | 548 | spin_unlock(&ailp->xa_lock); |
531 | xfs_log_move_tail(ailp->xa_mount, | 549 | xfs_log_move_tail(ailp->xa_mount, tail_lsn); |
532 | (mlip ? mlip->li_lsn : 0)); | ||
533 | } else { | 550 | } else { |
534 | spin_unlock(&ailp->xa_lock); | 551 | spin_unlock(&ailp->xa_lock); |
535 | } | 552 | } |
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index cd2d7896e34b..495dc8af4044 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
@@ -89,7 +89,7 @@ | |||
89 | 89 | ||
90 | #define F_OWNER_TID 0 | 90 | #define F_OWNER_TID 0 |
91 | #define F_OWNER_PID 1 | 91 | #define F_OWNER_PID 1 |
92 | #define F_OWNER_GID 2 | 92 | #define F_OWNER_PGRP 2 |
93 | 93 | ||
94 | struct f_owner_ex { | 94 | struct f_owner_ex { |
95 | int type; | 95 | int type; |
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h index f13255e06406..9eb07bbc6522 100644 --- a/include/linux/i2c-pnx.h +++ b/include/linux/i2c-pnx.h | |||
@@ -21,7 +21,7 @@ struct i2c_pnx_mif { | |||
21 | int mode; /* Interface mode */ | 21 | int mode; /* Interface mode */ |
22 | struct completion complete; /* I/O completion */ | 22 | struct completion complete; /* I/O completion */ |
23 | struct timer_list timer; /* Timeout */ | 23 | struct timer_list timer; /* Timeout */ |
24 | char * buf; /* Data buffer */ | 24 | u8 * buf; /* Data buffer */ |
25 | int len; /* Length of data buffer */ | 25 | int len; /* Length of data buffer */ |
26 | }; | 26 | }; |
27 | 27 | ||
diff --git a/include/linux/isdn_ppp.h b/include/linux/isdn_ppp.h index 4c218ee7587a..8687a7dc0632 100644 --- a/include/linux/isdn_ppp.h +++ b/include/linux/isdn_ppp.h | |||
@@ -157,7 +157,7 @@ typedef struct { | |||
157 | 157 | ||
158 | typedef struct { | 158 | typedef struct { |
159 | int mp_mrru; /* unused */ | 159 | int mp_mrru; /* unused */ |
160 | struct sk_buff_head frags; /* fragments sl list */ | 160 | struct sk_buff * frags; /* fragments sl list -- use skb->next */ |
161 | long frames; /* number of frames in the frame list */ | 161 | long frames; /* number of frames in the frame list */ |
162 | unsigned int seq; /* last processed packet seq #: any packets | 162 | unsigned int seq; /* last processed packet seq #: any packets |
163 | * with smaller seq # will be dropped | 163 | * with smaller seq # will be dropped |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 79fec6af3f9f..ce520402e840 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -425,15 +425,6 @@ struct nilfs_dat_entry { | |||
425 | }; | 425 | }; |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * struct nilfs_dat_group_desc - block group descriptor | ||
429 | * @dg_nfrees: number of free virtual block numbers in block group | ||
430 | */ | ||
431 | struct nilfs_dat_group_desc { | ||
432 | __le32 dg_nfrees; | ||
433 | }; | ||
434 | |||
435 | |||
436 | /** | ||
437 | * struct nilfs_snapshot_list - snapshot list | 428 | * struct nilfs_snapshot_list - snapshot list |
438 | * @ssl_next: next checkpoint number on snapshot list | 429 | * @ssl_next: next checkpoint number on snapshot list |
439 | * @ssl_prev: previous checkpoint number on snapshot list | 430 | * @ssl_prev: previous checkpoint number on snapshot list |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cd15df6c63cd..5e781d824e6d 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -301,6 +301,8 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 301 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
302 | #endif /* !CONFIG_PM_SLEEP */ | 302 | #endif /* !CONFIG_PM_SLEEP */ |
303 | 303 | ||
304 | extern struct mutex pm_mutex; | ||
305 | |||
304 | #ifndef CONFIG_HIBERNATION | 306 | #ifndef CONFIG_HIBERNATION |
305 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 307 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
306 | { | 308 | { |
@@ -308,8 +310,23 @@ static inline void register_nosave_region(unsigned long b, unsigned long e) | |||
308 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | 310 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) |
309 | { | 311 | { |
310 | } | 312 | } |
311 | #endif | ||
312 | 313 | ||
313 | extern struct mutex pm_mutex; | 314 | static inline void lock_system_sleep(void) {} |
315 | static inline void unlock_system_sleep(void) {} | ||
316 | |||
317 | #else | ||
318 | |||
319 | /* Let some subsystems like memory hotadd exclude hibernation */ | ||
320 | |||
321 | static inline void lock_system_sleep(void) | ||
322 | { | ||
323 | mutex_lock(&pm_mutex); | ||
324 | } | ||
325 | |||
326 | static inline void unlock_system_sleep(void) | ||
327 | { | ||
328 | mutex_unlock(&pm_mutex); | ||
329 | } | ||
330 | #endif | ||
314 | 331 | ||
315 | #endif /* _LINUX_SUSPEND_H */ | 332 | #endif /* _LINUX_SUSPEND_H */ |
diff --git a/include/linux/vt.h b/include/linux/vt.h index 7afca0d72139..7ffa11f06232 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -70,8 +70,8 @@ struct vt_event { | |||
70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ | 70 | #define VT_EVENT_UNBLANK 0x0004 /* Screen unblank */ |
71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ | 71 | #define VT_EVENT_RESIZE 0x0008 /* Resize display */ |
72 | #define VT_MAX_EVENT 0x000F | 72 | #define VT_MAX_EVENT 0x000F |
73 | unsigned int old; /* Old console */ | 73 | unsigned int oldev; /* Old console */ |
74 | unsigned int new; /* New console (if changing) */ | 74 | unsigned int newev; /* New console (if changing) */ |
75 | unsigned int pad[4]; /* Padding for expansion */ | 75 | unsigned int pad[4]; /* Padding for expansion */ |
76 | }; | 76 | }; |
77 | 77 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 6e5f0e0c7967..cd2e18778f81 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -1980,7 +1980,7 @@ void sctp_assoc_set_primary(struct sctp_association *, | |||
1980 | void sctp_assoc_del_nonprimary_peers(struct sctp_association *, | 1980 | void sctp_assoc_del_nonprimary_peers(struct sctp_association *, |
1981 | struct sctp_transport *); | 1981 | struct sctp_transport *); |
1982 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, | 1982 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, |
1983 | gfp_t); | 1983 | sctp_scope_t, gfp_t); |
1984 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, | 1984 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, |
1985 | struct sctp_cookie*, | 1985 | struct sctp_cookie*, |
1986 | gfp_t gfp); | 1986 | gfp_t gfp); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 6e728b176904..47941fc5aba7 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -797,30 +797,23 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost) | |||
797 | 797 | ||
798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) | 798 | static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type) |
799 | { | 799 | { |
800 | switch (target_type) { | 800 | static unsigned char cap[] = { 0, |
801 | case 1: | 801 | SHOST_DIF_TYPE1_PROTECTION, |
802 | if (shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION) | 802 | SHOST_DIF_TYPE2_PROTECTION, |
803 | return target_type; | 803 | SHOST_DIF_TYPE3_PROTECTION }; |
804 | case 2: | ||
805 | if (shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION) | ||
806 | return target_type; | ||
807 | case 3: | ||
808 | if (shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION) | ||
809 | return target_type; | ||
810 | } | ||
811 | 804 | ||
812 | return 0; | 805 | return shost->prot_capabilities & cap[target_type] ? target_type : 0; |
813 | } | 806 | } |
814 | 807 | ||
815 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) | 808 | static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type) |
816 | { | 809 | { |
817 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 810 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
818 | switch (target_type) { | 811 | static unsigned char cap[] = { SHOST_DIX_TYPE0_PROTECTION, |
819 | case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION; | 812 | SHOST_DIX_TYPE1_PROTECTION, |
820 | case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION; | 813 | SHOST_DIX_TYPE2_PROTECTION, |
821 | case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION; | 814 | SHOST_DIX_TYPE3_PROTECTION }; |
822 | case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION; | 815 | |
823 | } | 816 | return shost->prot_capabilities & cap[target_type]; |
824 | #endif | 817 | #endif |
825 | return 0; | 818 | return 0; |
826 | } | 819 | } |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 12328147132c..67e526b6ae81 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -692,31 +692,29 @@ int schedule_on_each_cpu(work_func_t func) | |||
692 | if (!works) | 692 | if (!works) |
693 | return -ENOMEM; | 693 | return -ENOMEM; |
694 | 694 | ||
695 | get_online_cpus(); | ||
696 | |||
695 | /* | 697 | /* |
696 | * when running in keventd don't schedule a work item on itself. | 698 | * When running in keventd don't schedule a work item on |
697 | * Can just call directly because the work queue is already bound. | 699 | * itself. Can just call directly because the work queue is |
698 | * This also is faster. | 700 | * already bound. This also is faster. |
699 | * Make this a generic parameter for other workqueues? | ||
700 | */ | 701 | */ |
701 | if (current_is_keventd()) { | 702 | if (current_is_keventd()) |
702 | orig = raw_smp_processor_id(); | 703 | orig = raw_smp_processor_id(); |
703 | INIT_WORK(per_cpu_ptr(works, orig), func); | ||
704 | func(per_cpu_ptr(works, orig)); | ||
705 | } | ||
706 | 704 | ||
707 | get_online_cpus(); | ||
708 | for_each_online_cpu(cpu) { | 705 | for_each_online_cpu(cpu) { |
709 | struct work_struct *work = per_cpu_ptr(works, cpu); | 706 | struct work_struct *work = per_cpu_ptr(works, cpu); |
710 | 707 | ||
711 | if (cpu == orig) | ||
712 | continue; | ||
713 | INIT_WORK(work, func); | 708 | INIT_WORK(work, func); |
714 | schedule_work_on(cpu, work); | ||
715 | } | ||
716 | for_each_online_cpu(cpu) { | ||
717 | if (cpu != orig) | 709 | if (cpu != orig) |
718 | flush_work(per_cpu_ptr(works, cpu)); | 710 | schedule_work_on(cpu, work); |
719 | } | 711 | } |
712 | if (orig >= 0) | ||
713 | func(per_cpu_ptr(works, orig)); | ||
714 | |||
715 | for_each_online_cpu(cpu) | ||
716 | flush_work(per_cpu_ptr(works, cpu)); | ||
717 | |||
720 | put_online_cpus(); | 718 | put_online_cpus(); |
721 | free_percpu(works); | 719 | free_percpu(works); |
722 | return 0; | 720 | return 0; |
diff --git a/lib/string.c b/lib/string.c index b19b87af65a3..e96421ab9a9a 100644 --- a/lib/string.c +++ b/lib/string.c | |||
@@ -246,13 +246,17 @@ EXPORT_SYMBOL(strlcat); | |||
246 | #undef strcmp | 246 | #undef strcmp |
247 | int strcmp(const char *cs, const char *ct) | 247 | int strcmp(const char *cs, const char *ct) |
248 | { | 248 | { |
249 | signed char __res; | 249 | unsigned char c1, c2; |
250 | 250 | ||
251 | while (1) { | 251 | while (1) { |
252 | if ((__res = *cs - *ct++) != 0 || !*cs++) | 252 | c1 = *cs++; |
253 | c2 = *ct++; | ||
254 | if (c1 != c2) | ||
255 | return c1 < c2 ? -1 : 1; | ||
256 | if (!c1) | ||
253 | break; | 257 | break; |
254 | } | 258 | } |
255 | return __res; | 259 | return 0; |
256 | } | 260 | } |
257 | EXPORT_SYMBOL(strcmp); | 261 | EXPORT_SYMBOL(strcmp); |
258 | #endif | 262 | #endif |
@@ -266,14 +270,18 @@ EXPORT_SYMBOL(strcmp); | |||
266 | */ | 270 | */ |
267 | int strncmp(const char *cs, const char *ct, size_t count) | 271 | int strncmp(const char *cs, const char *ct, size_t count) |
268 | { | 272 | { |
269 | signed char __res = 0; | 273 | unsigned char c1, c2; |
270 | 274 | ||
271 | while (count) { | 275 | while (count) { |
272 | if ((__res = *cs - *ct++) != 0 || !*cs++) | 276 | c1 = *cs++; |
277 | c2 = *ct++; | ||
278 | if (c1 != c2) | ||
279 | return c1 < c2 ? -1 : 1; | ||
280 | if (!c1) | ||
273 | break; | 281 | break; |
274 | count--; | 282 | count--; |
275 | } | 283 | } |
276 | return __res; | 284 | return 0; |
277 | } | 285 | } |
278 | EXPORT_SYMBOL(strncmp); | 286 | EXPORT_SYMBOL(strncmp); |
279 | #endif | 287 | #endif |
diff --git a/mm/Kconfig b/mm/Kconfig index fd3386242cf0..44cf6f0a3a6d 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -128,12 +128,9 @@ config SPARSEMEM_VMEMMAP | |||
128 | config MEMORY_HOTPLUG | 128 | config MEMORY_HOTPLUG |
129 | bool "Allow for memory hot-add" | 129 | bool "Allow for memory hot-add" |
130 | depends on SPARSEMEM || X86_64_ACPI_NUMA | 130 | depends on SPARSEMEM || X86_64_ACPI_NUMA |
131 | depends on HOTPLUG && !(HIBERNATION && !S390) && ARCH_ENABLE_MEMORY_HOTPLUG | 131 | depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG |
132 | depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390) | 132 | depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390) |
133 | 133 | ||
134 | comment "Memory hotplug is currently incompatible with Software Suspend" | ||
135 | depends on SPARSEMEM && HOTPLUG && HIBERNATION && !S390 | ||
136 | |||
137 | config MEMORY_HOTPLUG_SPARSE | 134 | config MEMORY_HOTPLUG_SPARSE |
138 | def_bool y | 135 | def_bool y |
139 | depends on SPARSEMEM && MEMORY_HOTPLUG | 136 | depends on SPARSEMEM && MEMORY_HOTPLUG |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 821dee596377..2047465cd27c 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/migrate.h> | 26 | #include <linux/migrate.h> |
27 | #include <linux/page-isolation.h> | 27 | #include <linux/page-isolation.h> |
28 | #include <linux/pfn.h> | 28 | #include <linux/pfn.h> |
29 | #include <linux/suspend.h> | ||
29 | 30 | ||
30 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
31 | 32 | ||
@@ -447,7 +448,8 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) | |||
447 | } | 448 | } |
448 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 449 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
449 | 450 | ||
450 | static pg_data_t *hotadd_new_pgdat(int nid, u64 start) | 451 | /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */ |
452 | static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) | ||
451 | { | 453 | { |
452 | struct pglist_data *pgdat; | 454 | struct pglist_data *pgdat; |
453 | unsigned long zones_size[MAX_NR_ZONES] = {0}; | 455 | unsigned long zones_size[MAX_NR_ZONES] = {0}; |
@@ -484,14 +486,18 @@ int __ref add_memory(int nid, u64 start, u64 size) | |||
484 | struct resource *res; | 486 | struct resource *res; |
485 | int ret; | 487 | int ret; |
486 | 488 | ||
489 | lock_system_sleep(); | ||
490 | |||
487 | res = register_memory_resource(start, size); | 491 | res = register_memory_resource(start, size); |
492 | ret = -EEXIST; | ||
488 | if (!res) | 493 | if (!res) |
489 | return -EEXIST; | 494 | goto out; |
490 | 495 | ||
491 | if (!node_online(nid)) { | 496 | if (!node_online(nid)) { |
492 | pgdat = hotadd_new_pgdat(nid, start); | 497 | pgdat = hotadd_new_pgdat(nid, start); |
498 | ret = -ENOMEM; | ||
493 | if (!pgdat) | 499 | if (!pgdat) |
494 | return -ENOMEM; | 500 | goto out; |
495 | new_pgdat = 1; | 501 | new_pgdat = 1; |
496 | } | 502 | } |
497 | 503 | ||
@@ -514,7 +520,8 @@ int __ref add_memory(int nid, u64 start, u64 size) | |||
514 | BUG_ON(ret); | 520 | BUG_ON(ret); |
515 | } | 521 | } |
516 | 522 | ||
517 | return ret; | 523 | goto out; |
524 | |||
518 | error: | 525 | error: |
519 | /* rollback pgdat allocation and others */ | 526 | /* rollback pgdat allocation and others */ |
520 | if (new_pgdat) | 527 | if (new_pgdat) |
@@ -522,6 +529,8 @@ error: | |||
522 | if (res) | 529 | if (res) |
523 | release_memory_resource(res); | 530 | release_memory_resource(res); |
524 | 531 | ||
532 | out: | ||
533 | unlock_system_sleep(); | ||
525 | return ret; | 534 | return ret; |
526 | } | 535 | } |
527 | EXPORT_SYMBOL_GPL(add_memory); | 536 | EXPORT_SYMBOL_GPL(add_memory); |
@@ -758,6 +767,8 @@ int offline_pages(unsigned long start_pfn, | |||
758 | if (!test_pages_in_a_zone(start_pfn, end_pfn)) | 767 | if (!test_pages_in_a_zone(start_pfn, end_pfn)) |
759 | return -EINVAL; | 768 | return -EINVAL; |
760 | 769 | ||
770 | lock_system_sleep(); | ||
771 | |||
761 | zone = page_zone(pfn_to_page(start_pfn)); | 772 | zone = page_zone(pfn_to_page(start_pfn)); |
762 | node = zone_to_nid(zone); | 773 | node = zone_to_nid(zone); |
763 | nr_pages = end_pfn - start_pfn; | 774 | nr_pages = end_pfn - start_pfn; |
@@ -765,7 +776,7 @@ int offline_pages(unsigned long start_pfn, | |||
765 | /* set above range as isolated */ | 776 | /* set above range as isolated */ |
766 | ret = start_isolate_page_range(start_pfn, end_pfn); | 777 | ret = start_isolate_page_range(start_pfn, end_pfn); |
767 | if (ret) | 778 | if (ret) |
768 | return ret; | 779 | goto out; |
769 | 780 | ||
770 | arg.start_pfn = start_pfn; | 781 | arg.start_pfn = start_pfn; |
771 | arg.nr_pages = nr_pages; | 782 | arg.nr_pages = nr_pages; |
@@ -843,6 +854,7 @@ repeat: | |||
843 | writeback_set_ratelimit(); | 854 | writeback_set_ratelimit(); |
844 | 855 | ||
845 | memory_notify(MEM_OFFLINE, &arg); | 856 | memory_notify(MEM_OFFLINE, &arg); |
857 | unlock_system_sleep(); | ||
846 | return 0; | 858 | return 0; |
847 | 859 | ||
848 | failed_removal: | 860 | failed_removal: |
@@ -852,6 +864,8 @@ failed_removal: | |||
852 | /* pushback to free area */ | 864 | /* pushback to free area */ |
853 | undo_isolate_page_range(start_pfn, end_pfn); | 865 | undo_isolate_page_range(start_pfn, end_pfn); |
854 | 866 | ||
867 | out: | ||
868 | unlock_system_sleep(); | ||
855 | return ret; | 869 | return ret; |
856 | } | 870 | } |
857 | 871 | ||
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 8836575f9d79..a29c5ab5815c 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -281,8 +281,11 @@ out_uninit_applicant: | |||
281 | if (ngrp) | 281 | if (ngrp) |
282 | vlan_gvrp_uninit_applicant(real_dev); | 282 | vlan_gvrp_uninit_applicant(real_dev); |
283 | out_free_group: | 283 | out_free_group: |
284 | if (ngrp) | 284 | if (ngrp) { |
285 | vlan_group_free(ngrp); | 285 | hlist_del_rcu(&ngrp->hlist); |
286 | /* Free the group, after all cpu's are done. */ | ||
287 | call_rcu(&ngrp->rcu, vlan_rcu_free); | ||
288 | } | ||
286 | return err; | 289 | return err; |
287 | } | 290 | } |
288 | 291 | ||
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a9750984f772..b7c4224f4e7d 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -211,6 +211,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) | |||
211 | conn->type = type; | 211 | conn->type = type; |
212 | conn->mode = HCI_CM_ACTIVE; | 212 | conn->mode = HCI_CM_ACTIVE; |
213 | conn->state = BT_OPEN; | 213 | conn->state = BT_OPEN; |
214 | conn->auth_type = HCI_AT_GENERAL_BONDING; | ||
214 | 215 | ||
215 | conn->power_save = 1; | 216 | conn->power_save = 1; |
216 | conn->disc_timeout = HCI_DISCONN_TIMEOUT; | 217 | conn->disc_timeout = HCI_DISCONN_TIMEOUT; |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 77e9fb130adb..947f8bbb4bb3 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2205,7 +2205,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data) | |||
2205 | { | 2205 | { |
2206 | struct l2cap_pinfo *pi = l2cap_pi(sk); | 2206 | struct l2cap_pinfo *pi = l2cap_pi(sk); |
2207 | struct l2cap_conf_req *req = data; | 2207 | struct l2cap_conf_req *req = data; |
2208 | struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_ERTM }; | 2208 | struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; |
2209 | void *ptr = req->data; | 2209 | void *ptr = req->data; |
2210 | 2210 | ||
2211 | BT_DBG("sk %p", sk); | 2211 | BT_DBG("sk %p", sk); |
@@ -2394,6 +2394,10 @@ done: | |||
2394 | rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO; | 2394 | rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO; |
2395 | 2395 | ||
2396 | pi->conf_state |= L2CAP_CONF_MODE_DONE; | 2396 | pi->conf_state |= L2CAP_CONF_MODE_DONE; |
2397 | |||
2398 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, | ||
2399 | sizeof(rfc), (unsigned long) &rfc); | ||
2400 | |||
2397 | break; | 2401 | break; |
2398 | 2402 | ||
2399 | case L2CAP_MODE_STREAMING: | 2403 | case L2CAP_MODE_STREAMING: |
@@ -2401,6 +2405,10 @@ done: | |||
2401 | pi->max_pdu_size = rfc.max_pdu_size; | 2405 | pi->max_pdu_size = rfc.max_pdu_size; |
2402 | 2406 | ||
2403 | pi->conf_state |= L2CAP_CONF_MODE_DONE; | 2407 | pi->conf_state |= L2CAP_CONF_MODE_DONE; |
2408 | |||
2409 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, | ||
2410 | sizeof(rfc), (unsigned long) &rfc); | ||
2411 | |||
2404 | break; | 2412 | break; |
2405 | 2413 | ||
2406 | default: | 2414 | default: |
@@ -2410,9 +2418,6 @@ done: | |||
2410 | rfc.mode = pi->mode; | 2418 | rfc.mode = pi->mode; |
2411 | } | 2419 | } |
2412 | 2420 | ||
2413 | l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, | ||
2414 | sizeof(rfc), (unsigned long) &rfc); | ||
2415 | |||
2416 | if (result == L2CAP_CONF_SUCCESS) | 2421 | if (result == L2CAP_CONF_SUCCESS) |
2417 | pi->conf_state |= L2CAP_CONF_OUTPUT_DONE; | 2422 | pi->conf_state |= L2CAP_CONF_OUTPUT_DONE; |
2418 | } | 2423 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index b8f74cfb1bfd..fe10551d3671 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -942,14 +942,15 @@ rollback: | |||
942 | ret = notifier_to_errno(ret); | 942 | ret = notifier_to_errno(ret); |
943 | 943 | ||
944 | if (ret) { | 944 | if (ret) { |
945 | if (err) { | 945 | /* err >= 0 after dev_alloc_name() or stores the first errno */ |
946 | printk(KERN_ERR | 946 | if (err >= 0) { |
947 | "%s: name change rollback failed: %d.\n", | ||
948 | dev->name, ret); | ||
949 | } else { | ||
950 | err = ret; | 947 | err = ret; |
951 | memcpy(dev->name, oldname, IFNAMSIZ); | 948 | memcpy(dev->name, oldname, IFNAMSIZ); |
952 | goto rollback; | 949 | goto rollback; |
950 | } else { | ||
951 | printk(KERN_ERR | ||
952 | "%s: name change rollback failed: %d.\n", | ||
953 | dev->name, ret); | ||
953 | } | 954 | } |
954 | } | 955 | } |
955 | 956 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 80a96166df39..ec85681a7dd8 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2701,7 +2701,8 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2701 | 2701 | ||
2702 | NAPI_GRO_CB(skb)->free = 1; | 2702 | NAPI_GRO_CB(skb)->free = 1; |
2703 | goto done; | 2703 | goto done; |
2704 | } | 2704 | } else if (skb_gro_len(p) != pinfo->gso_size) |
2705 | return -E2BIG; | ||
2705 | 2706 | ||
2706 | headroom = skb_headroom(p); | 2707 | headroom = skb_headroom(p); |
2707 | nskb = netdev_alloc_skb(p->dev, headroom + skb_gro_offset(p)); | 2708 | nskb = netdev_alloc_skb(p->dev, headroom + skb_gro_offset(p)); |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 630a56df7b47..99508d66a642 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -483,8 +483,10 @@ static int vif_add(struct net *net, struct vifctl *vifc, int mrtsock) | |||
483 | return -EINVAL; | 483 | return -EINVAL; |
484 | } | 484 | } |
485 | 485 | ||
486 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) | 486 | if ((in_dev = __in_dev_get_rtnl(dev)) == NULL) { |
487 | dev_put(dev); | ||
487 | return -EADDRNOTAVAIL; | 488 | return -EADDRNOTAVAIL; |
489 | } | ||
488 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; | 490 | IPV4_DEVCONF(in_dev->cnf, MC_FORWARDING)++; |
489 | ip_rt_multicast_event(in_dev); | 491 | ip_rt_multicast_event(in_dev); |
490 | 492 | ||
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 98440ad82558..f1813bc71088 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1183,7 +1183,9 @@ void tcp_cleanup_rbuf(struct sock *sk, int copied) | |||
1183 | #if TCP_DEBUG | 1183 | #if TCP_DEBUG |
1184 | struct sk_buff *skb = skb_peek(&sk->sk_receive_queue); | 1184 | struct sk_buff *skb = skb_peek(&sk->sk_receive_queue); |
1185 | 1185 | ||
1186 | WARN_ON(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq)); | 1186 | WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq), |
1187 | KERN_INFO "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n", | ||
1188 | tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt); | ||
1187 | #endif | 1189 | #endif |
1188 | 1190 | ||
1189 | if (inet_csk_ack_scheduled(sk)) { | 1191 | if (inet_csk_ack_scheduled(sk)) { |
@@ -1430,11 +1432,13 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1430 | /* Now that we have two receive queues this | 1432 | /* Now that we have two receive queues this |
1431 | * shouldn't happen. | 1433 | * shouldn't happen. |
1432 | */ | 1434 | */ |
1433 | if (before(*seq, TCP_SKB_CB(skb)->seq)) { | 1435 | if (WARN(before(*seq, TCP_SKB_CB(skb)->seq), |
1434 | printk(KERN_INFO "recvmsg bug: copied %X " | 1436 | KERN_INFO "recvmsg bug: copied %X " |
1435 | "seq %X\n", *seq, TCP_SKB_CB(skb)->seq); | 1437 | "seq %X rcvnxt %X fl %X\n", *seq, |
1438 | TCP_SKB_CB(skb)->seq, tp->rcv_nxt, | ||
1439 | flags)) | ||
1436 | break; | 1440 | break; |
1437 | } | 1441 | |
1438 | offset = *seq - TCP_SKB_CB(skb)->seq; | 1442 | offset = *seq - TCP_SKB_CB(skb)->seq; |
1439 | if (tcp_hdr(skb)->syn) | 1443 | if (tcp_hdr(skb)->syn) |
1440 | offset--; | 1444 | offset--; |
@@ -1443,8 +1447,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1443 | if (tcp_hdr(skb)->fin) | 1447 | if (tcp_hdr(skb)->fin) |
1444 | goto found_fin_ok; | 1448 | goto found_fin_ok; |
1445 | WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: " | 1449 | WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: " |
1446 | "copied %X seq %X\n", *seq, | 1450 | "copied %X seq %X rcvnxt %X fl %X\n", |
1447 | TCP_SKB_CB(skb)->seq); | 1451 | *seq, TCP_SKB_CB(skb)->seq, |
1452 | tp->rcv_nxt, flags); | ||
1448 | } | 1453 | } |
1449 | 1454 | ||
1450 | /* Well, if we have backlog, try to process it now yet. */ | 1455 | /* Well, if we have backlog, try to process it now yet. */ |
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 8450960df24f..7eed77a39d0d 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -1485,15 +1485,13 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned len) | |||
1485 | * local endpoint and the remote peer. | 1485 | * local endpoint and the remote peer. |
1486 | */ | 1486 | */ |
1487 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, | 1487 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc, |
1488 | gfp_t gfp) | 1488 | sctp_scope_t scope, gfp_t gfp) |
1489 | { | 1489 | { |
1490 | sctp_scope_t scope; | ||
1491 | int flags; | 1490 | int flags; |
1492 | 1491 | ||
1493 | /* Use scoping rules to determine the subset of addresses from | 1492 | /* Use scoping rules to determine the subset of addresses from |
1494 | * the endpoint. | 1493 | * the endpoint. |
1495 | */ | 1494 | */ |
1496 | scope = sctp_scope(&asoc->peer.active_path->ipaddr); | ||
1497 | flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0; | 1495 | flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0; |
1498 | if (asoc->peer.ipv4_address) | 1496 | if (asoc->peer.ipv4_address) |
1499 | flags |= SCTP_ADDR4_PEERSUPP; | 1497 | flags |= SCTP_ADDR4_PEERSUPP; |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index c8fae1983dd1..d4df45022ffa 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -384,6 +384,11 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep, | |||
384 | if (!new_asoc) | 384 | if (!new_asoc) |
385 | goto nomem; | 385 | goto nomem; |
386 | 386 | ||
387 | if (sctp_assoc_set_bind_addr_from_ep(new_asoc, | ||
388 | sctp_scope(sctp_source(chunk)), | ||
389 | GFP_ATOMIC) < 0) | ||
390 | goto nomem_init; | ||
391 | |||
387 | /* The call, sctp_process_init(), can fail on memory allocation. */ | 392 | /* The call, sctp_process_init(), can fail on memory allocation. */ |
388 | if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type, | 393 | if (!sctp_process_init(new_asoc, chunk->chunk_hdr->type, |
389 | sctp_source(chunk), | 394 | sctp_source(chunk), |
@@ -401,9 +406,6 @@ sctp_disposition_t sctp_sf_do_5_1B_init(const struct sctp_endpoint *ep, | |||
401 | len = ntohs(err_chunk->chunk_hdr->length) - | 406 | len = ntohs(err_chunk->chunk_hdr->length) - |
402 | sizeof(sctp_chunkhdr_t); | 407 | sizeof(sctp_chunkhdr_t); |
403 | 408 | ||
404 | if (sctp_assoc_set_bind_addr_from_ep(new_asoc, GFP_ATOMIC) < 0) | ||
405 | goto nomem_init; | ||
406 | |||
407 | repl = sctp_make_init_ack(new_asoc, chunk, GFP_ATOMIC, len); | 409 | repl = sctp_make_init_ack(new_asoc, chunk, GFP_ATOMIC, len); |
408 | if (!repl) | 410 | if (!repl) |
409 | goto nomem_init; | 411 | goto nomem_init; |
@@ -1452,6 +1454,10 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( | |||
1452 | if (!new_asoc) | 1454 | if (!new_asoc) |
1453 | goto nomem; | 1455 | goto nomem; |
1454 | 1456 | ||
1457 | if (sctp_assoc_set_bind_addr_from_ep(new_asoc, | ||
1458 | sctp_scope(sctp_source(chunk)), GFP_ATOMIC) < 0) | ||
1459 | goto nomem; | ||
1460 | |||
1455 | /* In the outbound INIT ACK the endpoint MUST copy its current | 1461 | /* In the outbound INIT ACK the endpoint MUST copy its current |
1456 | * Verification Tag and Peers Verification tag into a reserved | 1462 | * Verification Tag and Peers Verification tag into a reserved |
1457 | * place (local tie-tag and per tie-tag) within the state cookie. | 1463 | * place (local tie-tag and per tie-tag) within the state cookie. |
@@ -1488,9 +1494,6 @@ static sctp_disposition_t sctp_sf_do_unexpected_init( | |||
1488 | sizeof(sctp_chunkhdr_t); | 1494 | sizeof(sctp_chunkhdr_t); |
1489 | } | 1495 | } |
1490 | 1496 | ||
1491 | if (sctp_assoc_set_bind_addr_from_ep(new_asoc, GFP_ATOMIC) < 0) | ||
1492 | goto nomem; | ||
1493 | |||
1494 | repl = sctp_make_init_ack(new_asoc, chunk, GFP_ATOMIC, len); | 1497 | repl = sctp_make_init_ack(new_asoc, chunk, GFP_ATOMIC, len); |
1495 | if (!repl) | 1498 | if (!repl) |
1496 | goto nomem; | 1499 | goto nomem; |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index c8d05758661d..3a95fcb17a9e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1080,6 +1080,13 @@ static int __sctp_connect(struct sock* sk, | |||
1080 | err = -ENOMEM; | 1080 | err = -ENOMEM; |
1081 | goto out_free; | 1081 | goto out_free; |
1082 | } | 1082 | } |
1083 | |||
1084 | err = sctp_assoc_set_bind_addr_from_ep(asoc, scope, | ||
1085 | GFP_KERNEL); | ||
1086 | if (err < 0) { | ||
1087 | goto out_free; | ||
1088 | } | ||
1089 | |||
1083 | } | 1090 | } |
1084 | 1091 | ||
1085 | /* Prime the peer's transport structures. */ | 1092 | /* Prime the peer's transport structures. */ |
@@ -1095,11 +1102,6 @@ static int __sctp_connect(struct sock* sk, | |||
1095 | walk_size += af->sockaddr_len; | 1102 | walk_size += af->sockaddr_len; |
1096 | } | 1103 | } |
1097 | 1104 | ||
1098 | err = sctp_assoc_set_bind_addr_from_ep(asoc, GFP_KERNEL); | ||
1099 | if (err < 0) { | ||
1100 | goto out_free; | ||
1101 | } | ||
1102 | |||
1103 | /* In case the user of sctp_connectx() wants an association | 1105 | /* In case the user of sctp_connectx() wants an association |
1104 | * id back, assign one now. | 1106 | * id back, assign one now. |
1105 | */ | 1107 | */ |
@@ -1274,22 +1276,30 @@ SCTP_STATIC int sctp_setsockopt_connectx(struct sock* sk, | |||
1274 | } | 1276 | } |
1275 | 1277 | ||
1276 | /* | 1278 | /* |
1277 | * New (hopefully final) interface for the API. The option buffer is used | 1279 | * New (hopefully final) interface for the API. |
1278 | * both for the returned association id and the addresses. | 1280 | * We use the sctp_getaddrs_old structure so that use-space library |
1281 | * can avoid any unnecessary allocations. The only defferent part | ||
1282 | * is that we store the actual length of the address buffer into the | ||
1283 | * addrs_num structure member. That way we can re-use the existing | ||
1284 | * code. | ||
1279 | */ | 1285 | */ |
1280 | SCTP_STATIC int sctp_getsockopt_connectx3(struct sock* sk, int len, | 1286 | SCTP_STATIC int sctp_getsockopt_connectx3(struct sock* sk, int len, |
1281 | char __user *optval, | 1287 | char __user *optval, |
1282 | int __user *optlen) | 1288 | int __user *optlen) |
1283 | { | 1289 | { |
1290 | struct sctp_getaddrs_old param; | ||
1284 | sctp_assoc_t assoc_id = 0; | 1291 | sctp_assoc_t assoc_id = 0; |
1285 | int err = 0; | 1292 | int err = 0; |
1286 | 1293 | ||
1287 | if (len < sizeof(assoc_id)) | 1294 | if (len < sizeof(param)) |
1288 | return -EINVAL; | 1295 | return -EINVAL; |
1289 | 1296 | ||
1297 | if (copy_from_user(¶m, optval, sizeof(param))) | ||
1298 | return -EFAULT; | ||
1299 | |||
1290 | err = __sctp_setsockopt_connectx(sk, | 1300 | err = __sctp_setsockopt_connectx(sk, |
1291 | (struct sockaddr __user *)(optval + sizeof(assoc_id)), | 1301 | (struct sockaddr __user *)param.addrs, |
1292 | len - sizeof(assoc_id), &assoc_id); | 1302 | param.addr_num, &assoc_id); |
1293 | 1303 | ||
1294 | if (err == 0 || err == -EINPROGRESS) { | 1304 | if (err == 0 || err == -EINPROGRESS) { |
1295 | if (copy_to_user(optval, &assoc_id, sizeof(assoc_id))) | 1305 | if (copy_to_user(optval, &assoc_id, sizeof(assoc_id))) |
@@ -1689,6 +1699,11 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1689 | goto out_unlock; | 1699 | goto out_unlock; |
1690 | } | 1700 | } |
1691 | asoc = new_asoc; | 1701 | asoc = new_asoc; |
1702 | err = sctp_assoc_set_bind_addr_from_ep(asoc, scope, GFP_KERNEL); | ||
1703 | if (err < 0) { | ||
1704 | err = -ENOMEM; | ||
1705 | goto out_free; | ||
1706 | } | ||
1692 | 1707 | ||
1693 | /* If the SCTP_INIT ancillary data is specified, set all | 1708 | /* If the SCTP_INIT ancillary data is specified, set all |
1694 | * the association init values accordingly. | 1709 | * the association init values accordingly. |
@@ -1718,11 +1733,6 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1718 | err = -ENOMEM; | 1733 | err = -ENOMEM; |
1719 | goto out_free; | 1734 | goto out_free; |
1720 | } | 1735 | } |
1721 | err = sctp_assoc_set_bind_addr_from_ep(asoc, GFP_KERNEL); | ||
1722 | if (err < 0) { | ||
1723 | err = -ENOMEM; | ||
1724 | goto out_free; | ||
1725 | } | ||
1726 | } | 1736 | } |
1727 | 1737 | ||
1728 | /* ASSERT: we have a valid association at this point. */ | 1738 | /* ASSERT: we have a valid association at this point. */ |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index c256e4839316..3b141bb32faf 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -308,7 +308,8 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
308 | /* Initialize sk->sk_rcv_saddr, if the transport is the | 308 | /* Initialize sk->sk_rcv_saddr, if the transport is the |
309 | * association's active path for getsockname(). | 309 | * association's active path for getsockname(). |
310 | */ | 310 | */ |
311 | if (asoc && (transport == asoc->peer.active_path)) | 311 | if (asoc && (!asoc->peer.primary_path || |
312 | (transport == asoc->peer.active_path))) | ||
312 | opt->pf->af->to_sk_saddr(&transport->saddr, | 313 | opt->pf->af->to_sk_saddr(&transport->saddr, |
313 | asoc->base.sk); | 314 | asoc->base.sk); |
314 | } else | 315 | } else |
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 22e8fd89477f..c7450c8f0a7c 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c | |||
@@ -306,24 +306,25 @@ EXPORT_SYMBOL_GPL(rpc_sockaddr2uaddr); | |||
306 | * @sap: buffer into which to plant socket address | 306 | * @sap: buffer into which to plant socket address |
307 | * @salen: size of buffer | 307 | * @salen: size of buffer |
308 | * | 308 | * |
309 | * @uaddr does not have to be '\0'-terminated, but strict_strtoul() and | ||
310 | * rpc_pton() require proper string termination to be successful. | ||
311 | * | ||
309 | * Returns the size of the socket address if successful; otherwise | 312 | * Returns the size of the socket address if successful; otherwise |
310 | * zero is returned. | 313 | * zero is returned. |
311 | */ | 314 | */ |
312 | size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | 315 | size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, |
313 | struct sockaddr *sap, const size_t salen) | 316 | struct sockaddr *sap, const size_t salen) |
314 | { | 317 | { |
315 | char *c, buf[RPCBIND_MAXUADDRLEN]; | 318 | char *c, buf[RPCBIND_MAXUADDRLEN + sizeof('\0')]; |
316 | unsigned long portlo, porthi; | 319 | unsigned long portlo, porthi; |
317 | unsigned short port; | 320 | unsigned short port; |
318 | 321 | ||
319 | if (uaddr_len > sizeof(buf)) | 322 | if (uaddr_len > RPCBIND_MAXUADDRLEN) |
320 | return 0; | 323 | return 0; |
321 | 324 | ||
322 | memcpy(buf, uaddr, uaddr_len); | 325 | memcpy(buf, uaddr, uaddr_len); |
323 | 326 | ||
324 | buf[uaddr_len] = '\n'; | 327 | buf[uaddr_len] = '\0'; |
325 | buf[uaddr_len + 1] = '\0'; | ||
326 | |||
327 | c = strrchr(buf, '.'); | 328 | c = strrchr(buf, '.'); |
328 | if (unlikely(c == NULL)) | 329 | if (unlikely(c == NULL)) |
329 | return 0; | 330 | return 0; |
@@ -332,9 +333,7 @@ size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | |||
332 | if (unlikely(portlo > 255)) | 333 | if (unlikely(portlo > 255)) |
333 | return 0; | 334 | return 0; |
334 | 335 | ||
335 | c[0] = '\n'; | 336 | *c = '\0'; |
336 | c[1] = '\0'; | ||
337 | |||
338 | c = strrchr(buf, '.'); | 337 | c = strrchr(buf, '.'); |
339 | if (unlikely(c == NULL)) | 338 | if (unlikely(c == NULL)) |
340 | return 0; | 339 | return 0; |
@@ -345,8 +344,7 @@ size_t rpc_uaddr2sockaddr(const char *uaddr, const size_t uaddr_len, | |||
345 | 344 | ||
346 | port = (unsigned short)((porthi << 8) | portlo); | 345 | port = (unsigned short)((porthi << 8) | portlo); |
347 | 346 | ||
348 | c[0] = '\0'; | 347 | *c = '\0'; |
349 | |||
350 | if (rpc_pton(buf, strlen(buf), sap, salen) == 0) | 348 | if (rpc_pton(buf, strlen(buf), sap, salen) == 0) |
351 | return 0; | 349 | return 0; |
352 | 350 | ||
diff --git a/scripts/dtc/data.c b/scripts/dtc/data.c index dd2e3d39d4c1..fe555e819bf8 100644 --- a/scripts/dtc/data.c +++ b/scripts/dtc/data.c | |||
@@ -217,7 +217,7 @@ struct data data_insert_at_marker(struct data d, struct marker *m, | |||
217 | return d; | 217 | return d; |
218 | } | 218 | } |
219 | 219 | ||
220 | struct data data_append_markers(struct data d, struct marker *m) | 220 | static struct data data_append_markers(struct data d, struct marker *m) |
221 | { | 221 | { |
222 | struct marker **mp = &d.markers; | 222 | struct marker **mp = &d.markers; |
223 | 223 | ||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index 44dbfd3f0976..a627bbee91d4 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l | |||
@@ -18,7 +18,7 @@ | |||
18 | * USA | 18 | * USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | %option noyywrap nounput yylineno | 21 | %option noyywrap noinput nounput yylineno |
22 | 22 | ||
23 | %x INCLUDE | 23 | %x INCLUDE |
24 | %x BYTESTRING | 24 | %x BYTESTRING |
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index ac392cb040f6..e27cc636e326 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped | |||
@@ -9,7 +9,7 @@ | |||
9 | #define FLEX_SCANNER | 9 | #define FLEX_SCANNER |
10 | #define YY_FLEX_MAJOR_VERSION 2 | 10 | #define YY_FLEX_MAJOR_VERSION 2 |
11 | #define YY_FLEX_MINOR_VERSION 5 | 11 | #define YY_FLEX_MINOR_VERSION 5 |
12 | #define YY_FLEX_SUBMINOR_VERSION 34 | 12 | #define YY_FLEX_SUBMINOR_VERSION 35 |
13 | #if YY_FLEX_SUBMINOR_VERSION > 0 | 13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
14 | #define FLEX_BETA | 14 | #define FLEX_BETA |
15 | #endif | 15 | #endif |
@@ -54,7 +54,6 @@ typedef int flex_int32_t; | |||
54 | typedef unsigned char flex_uint8_t; | 54 | typedef unsigned char flex_uint8_t; |
55 | typedef unsigned short int flex_uint16_t; | 55 | typedef unsigned short int flex_uint16_t; |
56 | typedef unsigned int flex_uint32_t; | 56 | typedef unsigned int flex_uint32_t; |
57 | #endif /* ! C99 */ | ||
58 | 57 | ||
59 | /* Limits of integral types. */ | 58 | /* Limits of integral types. */ |
60 | #ifndef INT8_MIN | 59 | #ifndef INT8_MIN |
@@ -85,6 +84,8 @@ typedef unsigned int flex_uint32_t; | |||
85 | #define UINT32_MAX (4294967295U) | 84 | #define UINT32_MAX (4294967295U) |
86 | #endif | 85 | #endif |
87 | 86 | ||
87 | #endif /* ! C99 */ | ||
88 | |||
88 | #endif /* ! FLEXINT_H */ | 89 | #endif /* ! FLEXINT_H */ |
89 | 90 | ||
90 | #ifdef __cplusplus | 91 | #ifdef __cplusplus |
@@ -141,7 +142,15 @@ typedef unsigned int flex_uint32_t; | |||
141 | 142 | ||
142 | /* Size of default input buffer. */ | 143 | /* Size of default input buffer. */ |
143 | #ifndef YY_BUF_SIZE | 144 | #ifndef YY_BUF_SIZE |
145 | #ifdef __ia64__ | ||
146 | /* On IA-64, the buffer size is 16k, not 8k. | ||
147 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
148 | * Ditto for the __ia64__ case accordingly. | ||
149 | */ | ||
150 | #define YY_BUF_SIZE 32768 | ||
151 | #else | ||
144 | #define YY_BUF_SIZE 16384 | 152 | #define YY_BUF_SIZE 16384 |
153 | #endif /* __ia64__ */ | ||
145 | #endif | 154 | #endif |
146 | 155 | ||
147 | /* The state buf must be large enough to hold one state per character in the main buffer. | 156 | /* The state buf must be large enough to hold one state per character in the main buffer. |
@@ -192,13 +201,6 @@ extern FILE *yyin, *yyout; | |||
192 | 201 | ||
193 | #define unput(c) yyunput( c, (yytext_ptr) ) | 202 | #define unput(c) yyunput( c, (yytext_ptr) ) |
194 | 203 | ||
195 | /* The following is because we cannot portably get our hands on size_t | ||
196 | * (without autoconf's help, which isn't available because we want | ||
197 | * flex-generated scanners to compile on their own). | ||
198 | * Given that the standard has decreed that size_t exists since 1989, | ||
199 | * I guess we can afford to depend on it. Manoj. | ||
200 | */ | ||
201 | |||
202 | #ifndef YY_TYPEDEF_YY_SIZE_T | 204 | #ifndef YY_TYPEDEF_YY_SIZE_T |
203 | #define YY_TYPEDEF_YY_SIZE_T | 205 | #define YY_TYPEDEF_YY_SIZE_T |
204 | typedef size_t yy_size_t; | 206 | typedef size_t yy_size_t; |
@@ -604,6 +606,7 @@ char *yytext; | |||
604 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | 606 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
605 | * USA | 607 | * USA |
606 | */ | 608 | */ |
609 | #define YY_NO_INPUT 1 | ||
607 | 610 | ||
608 | 611 | ||
609 | 612 | ||
@@ -634,7 +637,7 @@ static int dts_version; /* = 0 */ | |||
634 | 637 | ||
635 | static void push_input_file(const char *filename); | 638 | static void push_input_file(const char *filename); |
636 | static int pop_input_file(void); | 639 | static int pop_input_file(void); |
637 | #line 638 "dtc-lexer.lex.c" | 640 | #line 641 "dtc-lexer.lex.c" |
638 | 641 | ||
639 | #define INITIAL 0 | 642 | #define INITIAL 0 |
640 | #define INCLUDE 1 | 643 | #define INCLUDE 1 |
@@ -656,6 +659,35 @@ static int pop_input_file(void); | |||
656 | 659 | ||
657 | static int yy_init_globals (void ); | 660 | static int yy_init_globals (void ); |
658 | 661 | ||
662 | /* Accessor methods to globals. | ||
663 | These are made visible to non-reentrant scanners for convenience. */ | ||
664 | |||
665 | int yylex_destroy (void ); | ||
666 | |||
667 | int yyget_debug (void ); | ||
668 | |||
669 | void yyset_debug (int debug_flag ); | ||
670 | |||
671 | YY_EXTRA_TYPE yyget_extra (void ); | ||
672 | |||
673 | void yyset_extra (YY_EXTRA_TYPE user_defined ); | ||
674 | |||
675 | FILE *yyget_in (void ); | ||
676 | |||
677 | void yyset_in (FILE * in_str ); | ||
678 | |||
679 | FILE *yyget_out (void ); | ||
680 | |||
681 | void yyset_out (FILE * out_str ); | ||
682 | |||
683 | int yyget_leng (void ); | ||
684 | |||
685 | char *yyget_text (void ); | ||
686 | |||
687 | int yyget_lineno (void ); | ||
688 | |||
689 | void yyset_lineno (int line_number ); | ||
690 | |||
659 | /* Macros after this point can all be overridden by user definitions in | 691 | /* Macros after this point can all be overridden by user definitions in |
660 | * section 1. | 692 | * section 1. |
661 | */ | 693 | */ |
@@ -688,7 +720,12 @@ static int input (void ); | |||
688 | 720 | ||
689 | /* Amount of stuff to slurp up with each read. */ | 721 | /* Amount of stuff to slurp up with each read. */ |
690 | #ifndef YY_READ_BUF_SIZE | 722 | #ifndef YY_READ_BUF_SIZE |
723 | #ifdef __ia64__ | ||
724 | /* On IA-64, the buffer size is 16k, not 8k */ | ||
725 | #define YY_READ_BUF_SIZE 16384 | ||
726 | #else | ||
691 | #define YY_READ_BUF_SIZE 8192 | 727 | #define YY_READ_BUF_SIZE 8192 |
728 | #endif /* __ia64__ */ | ||
692 | #endif | 729 | #endif |
693 | 730 | ||
694 | /* Copy whatever the last rule matched to the standard output. */ | 731 | /* Copy whatever the last rule matched to the standard output. */ |
@@ -696,7 +733,7 @@ static int input (void ); | |||
696 | /* This used to be an fputs(), but since the string might contain NUL's, | 733 | /* This used to be an fputs(), but since the string might contain NUL's, |
697 | * we now use fwrite(). | 734 | * we now use fwrite(). |
698 | */ | 735 | */ |
699 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) | 736 | #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
700 | #endif | 737 | #endif |
701 | 738 | ||
702 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 739 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
@@ -707,7 +744,7 @@ static int input (void ); | |||
707 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ | 744 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
708 | { \ | 745 | { \ |
709 | int c = '*'; \ | 746 | int c = '*'; \ |
710 | int n; \ | 747 | size_t n; \ |
711 | for ( n = 0; n < max_size && \ | 748 | for ( n = 0; n < max_size && \ |
712 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | 749 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
713 | buf[n] = (char) c; \ | 750 | buf[n] = (char) c; \ |
@@ -791,7 +828,7 @@ YY_DECL | |||
791 | 828 | ||
792 | #line 64 "dtc-lexer.l" | 829 | #line 64 "dtc-lexer.l" |
793 | 830 | ||
794 | #line 795 "dtc-lexer.lex.c" | 831 | #line 832 "dtc-lexer.lex.c" |
795 | 832 | ||
796 | if ( !(yy_init) ) | 833 | if ( !(yy_init) ) |
797 | { | 834 | { |
@@ -1116,7 +1153,7 @@ YY_RULE_SETUP | |||
1116 | #line 222 "dtc-lexer.l" | 1153 | #line 222 "dtc-lexer.l" |
1117 | ECHO; | 1154 | ECHO; |
1118 | YY_BREAK | 1155 | YY_BREAK |
1119 | #line 1120 "dtc-lexer.lex.c" | 1156 | #line 1157 "dtc-lexer.lex.c" |
1120 | 1157 | ||
1121 | case YY_END_OF_BUFFER: | 1158 | case YY_END_OF_BUFFER: |
1122 | { | 1159 | { |
@@ -1840,8 +1877,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) | |||
1840 | 1877 | ||
1841 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | 1878 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
1842 | * scan from a @e copy of @a bytes. | 1879 | * scan from a @e copy of @a bytes. |
1843 | * @param bytes the byte buffer to scan | 1880 | * @param yybytes the byte buffer to scan |
1844 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 1881 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
1845 | * | 1882 | * |
1846 | * @return the newly allocated buffer state object. | 1883 | * @return the newly allocated buffer state object. |
1847 | */ | 1884 | */ |
diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c index fbbba44fcd0d..22e692919ff9 100644 --- a/scripts/dtc/libfdt/fdt_ro.c +++ b/scripts/dtc/libfdt/fdt_ro.c | |||
@@ -411,7 +411,7 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) | |||
411 | &phandle, sizeof(phandle)); | 411 | &phandle, sizeof(phandle)); |
412 | } | 412 | } |
413 | 413 | ||
414 | int _stringlist_contains(const char *strlist, int listlen, const char *str) | 414 | static int _stringlist_contains(const char *strlist, int listlen, const char *str) |
415 | { | 415 | { |
416 | int len = strlen(str); | 416 | int len = strlen(str); |
417 | const char *p; | 417 | const char *p; |
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c index ebeb6eb27907..1521ff11bb97 100644 --- a/scripts/dtc/treesource.c +++ b/scripts/dtc/treesource.c | |||
@@ -52,7 +52,7 @@ static void write_prefix(FILE *f, int level) | |||
52 | fputc('\t', f); | 52 | fputc('\t', f); |
53 | } | 53 | } |
54 | 54 | ||
55 | int isstring(char c) | 55 | static int isstring(char c) |
56 | { | 56 | { |
57 | return (isprint(c) | 57 | return (isprint(c) |
58 | || (c == '\0') | 58 | || (c == '\0') |
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.c_shipped index 971e0113ae7a..287467a2e8c7 100644 --- a/scripts/genksyms/keywords.c_shipped +++ b/scripts/genksyms/keywords.c_shipped | |||
@@ -1,4 +1,4 @@ | |||
1 | /* ANSI-C code produced by gperf version 3.0.2 */ | 1 | /* ANSI-C code produced by gperf version 3.0.3 */ |
2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ | 2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ |
3 | 3 | ||
4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
@@ -30,7 +30,9 @@ | |||
30 | 30 | ||
31 | #line 1 "scripts/genksyms/keywords.gperf" | 31 | #line 1 "scripts/genksyms/keywords.gperf" |
32 | 32 | ||
33 | #line 3 "scripts/genksyms/keywords.gperf" | 33 | struct resword; |
34 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); | ||
35 | #line 5 "scripts/genksyms/keywords.gperf" | ||
34 | struct resword { const char *name; int token; }; | 36 | struct resword { const char *name; int token; }; |
35 | /* maximum key range = 62, duplicates = 0 */ | 37 | /* maximum key range = 62, duplicates = 0 */ |
36 | 38 | ||
@@ -78,6 +80,9 @@ is_reserved_hash (register const char *str, register unsigned int len) | |||
78 | 80 | ||
79 | #ifdef __GNUC__ | 81 | #ifdef __GNUC__ |
80 | __inline | 82 | __inline |
83 | #ifdef __GNUC_STDC_INLINE__ | ||
84 | __attribute__ ((__gnu_inline__)) | ||
85 | #endif | ||
81 | #endif | 86 | #endif |
82 | const struct resword * | 87 | const struct resword * |
83 | is_reserved_word (register const char *str, register unsigned int len) | 88 | is_reserved_word (register const char *str, register unsigned int len) |
@@ -94,105 +99,105 @@ is_reserved_word (register const char *str, register unsigned int len) | |||
94 | static const struct resword wordlist[] = | 99 | static const struct resword wordlist[] = |
95 | { | 100 | { |
96 | {""}, {""}, {""}, | 101 | {""}, {""}, {""}, |
97 | #line 26 "scripts/genksyms/keywords.gperf" | 102 | #line 28 "scripts/genksyms/keywords.gperf" |
98 | {"asm", ASM_KEYW}, | 103 | {"asm", ASM_KEYW}, |
99 | {""}, | 104 | {""}, |
100 | #line 8 "scripts/genksyms/keywords.gperf" | 105 | #line 10 "scripts/genksyms/keywords.gperf" |
101 | {"__asm", ASM_KEYW}, | 106 | {"__asm", ASM_KEYW}, |
102 | {""}, | 107 | {""}, |
103 | #line 9 "scripts/genksyms/keywords.gperf" | 108 | #line 11 "scripts/genksyms/keywords.gperf" |
104 | {"__asm__", ASM_KEYW}, | 109 | {"__asm__", ASM_KEYW}, |
105 | {""}, {""}, | 110 | {""}, {""}, |
106 | #line 52 "scripts/genksyms/keywords.gperf" | 111 | #line 54 "scripts/genksyms/keywords.gperf" |
107 | {"__typeof__", TYPEOF_KEYW}, | 112 | {"__typeof__", TYPEOF_KEYW}, |
108 | {""}, | 113 | {""}, |
109 | #line 12 "scripts/genksyms/keywords.gperf" | 114 | #line 14 "scripts/genksyms/keywords.gperf" |
110 | {"__const", CONST_KEYW}, | 115 | {"__const", CONST_KEYW}, |
111 | #line 11 "scripts/genksyms/keywords.gperf" | ||
112 | {"__attribute__", ATTRIBUTE_KEYW}, | ||
113 | #line 13 "scripts/genksyms/keywords.gperf" | 116 | #line 13 "scripts/genksyms/keywords.gperf" |
117 | {"__attribute__", ATTRIBUTE_KEYW}, | ||
118 | #line 15 "scripts/genksyms/keywords.gperf" | ||
114 | {"__const__", CONST_KEYW}, | 119 | {"__const__", CONST_KEYW}, |
115 | #line 18 "scripts/genksyms/keywords.gperf" | 120 | #line 20 "scripts/genksyms/keywords.gperf" |
116 | {"__signed__", SIGNED_KEYW}, | 121 | {"__signed__", SIGNED_KEYW}, |
117 | #line 44 "scripts/genksyms/keywords.gperf" | 122 | #line 46 "scripts/genksyms/keywords.gperf" |
118 | {"static", STATIC_KEYW}, | 123 | {"static", STATIC_KEYW}, |
119 | #line 20 "scripts/genksyms/keywords.gperf" | 124 | #line 22 "scripts/genksyms/keywords.gperf" |
120 | {"__volatile__", VOLATILE_KEYW}, | 125 | {"__volatile__", VOLATILE_KEYW}, |
121 | #line 39 "scripts/genksyms/keywords.gperf" | 126 | #line 41 "scripts/genksyms/keywords.gperf" |
122 | {"int", INT_KEYW}, | 127 | {"int", INT_KEYW}, |
123 | #line 32 "scripts/genksyms/keywords.gperf" | 128 | #line 34 "scripts/genksyms/keywords.gperf" |
124 | {"char", CHAR_KEYW}, | 129 | {"char", CHAR_KEYW}, |
125 | #line 33 "scripts/genksyms/keywords.gperf" | 130 | #line 35 "scripts/genksyms/keywords.gperf" |
126 | {"const", CONST_KEYW}, | 131 | {"const", CONST_KEYW}, |
127 | #line 45 "scripts/genksyms/keywords.gperf" | 132 | #line 47 "scripts/genksyms/keywords.gperf" |
128 | {"struct", STRUCT_KEYW}, | 133 | {"struct", STRUCT_KEYW}, |
129 | #line 24 "scripts/genksyms/keywords.gperf" | 134 | #line 26 "scripts/genksyms/keywords.gperf" |
130 | {"__restrict__", RESTRICT_KEYW}, | 135 | {"__restrict__", RESTRICT_KEYW}, |
131 | #line 25 "scripts/genksyms/keywords.gperf" | 136 | #line 27 "scripts/genksyms/keywords.gperf" |
132 | {"restrict", RESTRICT_KEYW}, | 137 | {"restrict", RESTRICT_KEYW}, |
133 | #line 23 "scripts/genksyms/keywords.gperf" | 138 | #line 25 "scripts/genksyms/keywords.gperf" |
134 | {"_restrict", RESTRICT_KEYW}, | 139 | {"_restrict", RESTRICT_KEYW}, |
135 | #line 16 "scripts/genksyms/keywords.gperf" | 140 | #line 18 "scripts/genksyms/keywords.gperf" |
136 | {"__inline__", INLINE_KEYW}, | 141 | {"__inline__", INLINE_KEYW}, |
137 | #line 10 "scripts/genksyms/keywords.gperf" | 142 | #line 12 "scripts/genksyms/keywords.gperf" |
138 | {"__attribute", ATTRIBUTE_KEYW}, | 143 | {"__attribute", ATTRIBUTE_KEYW}, |
139 | {""}, | 144 | {""}, |
140 | #line 14 "scripts/genksyms/keywords.gperf" | 145 | #line 16 "scripts/genksyms/keywords.gperf" |
141 | {"__extension__", EXTENSION_KEYW}, | 146 | {"__extension__", EXTENSION_KEYW}, |
142 | #line 35 "scripts/genksyms/keywords.gperf" | 147 | #line 37 "scripts/genksyms/keywords.gperf" |
143 | {"enum", ENUM_KEYW}, | 148 | {"enum", ENUM_KEYW}, |
144 | #line 19 "scripts/genksyms/keywords.gperf" | 149 | #line 21 "scripts/genksyms/keywords.gperf" |
145 | {"__volatile", VOLATILE_KEYW}, | 150 | {"__volatile", VOLATILE_KEYW}, |
146 | #line 36 "scripts/genksyms/keywords.gperf" | 151 | #line 38 "scripts/genksyms/keywords.gperf" |
147 | {"extern", EXTERN_KEYW}, | 152 | {"extern", EXTERN_KEYW}, |
148 | {""}, | 153 | {""}, |
149 | #line 17 "scripts/genksyms/keywords.gperf" | 154 | #line 19 "scripts/genksyms/keywords.gperf" |
150 | {"__signed", SIGNED_KEYW}, | 155 | {"__signed", SIGNED_KEYW}, |
151 | #line 7 "scripts/genksyms/keywords.gperf" | 156 | #line 9 "scripts/genksyms/keywords.gperf" |
152 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, | 157 | {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, |
153 | {""}, | 158 | {""}, |
154 | #line 51 "scripts/genksyms/keywords.gperf" | 159 | #line 53 "scripts/genksyms/keywords.gperf" |
155 | {"typeof", TYPEOF_KEYW}, | 160 | {"typeof", TYPEOF_KEYW}, |
156 | #line 46 "scripts/genksyms/keywords.gperf" | 161 | #line 48 "scripts/genksyms/keywords.gperf" |
157 | {"typedef", TYPEDEF_KEYW}, | 162 | {"typedef", TYPEDEF_KEYW}, |
158 | #line 15 "scripts/genksyms/keywords.gperf" | 163 | #line 17 "scripts/genksyms/keywords.gperf" |
159 | {"__inline", INLINE_KEYW}, | 164 | {"__inline", INLINE_KEYW}, |
160 | #line 31 "scripts/genksyms/keywords.gperf" | 165 | #line 33 "scripts/genksyms/keywords.gperf" |
161 | {"auto", AUTO_KEYW}, | 166 | {"auto", AUTO_KEYW}, |
162 | #line 47 "scripts/genksyms/keywords.gperf" | 167 | #line 49 "scripts/genksyms/keywords.gperf" |
163 | {"union", UNION_KEYW}, | 168 | {"union", UNION_KEYW}, |
164 | {""}, {""}, | 169 | {""}, {""}, |
165 | #line 48 "scripts/genksyms/keywords.gperf" | 170 | #line 50 "scripts/genksyms/keywords.gperf" |
166 | {"unsigned", UNSIGNED_KEYW}, | 171 | {"unsigned", UNSIGNED_KEYW}, |
167 | #line 49 "scripts/genksyms/keywords.gperf" | 172 | #line 51 "scripts/genksyms/keywords.gperf" |
168 | {"void", VOID_KEYW}, | 173 | {"void", VOID_KEYW}, |
169 | #line 42 "scripts/genksyms/keywords.gperf" | 174 | #line 44 "scripts/genksyms/keywords.gperf" |
170 | {"short", SHORT_KEYW}, | 175 | {"short", SHORT_KEYW}, |
171 | {""}, {""}, | 176 | {""}, {""}, |
172 | #line 50 "scripts/genksyms/keywords.gperf" | 177 | #line 52 "scripts/genksyms/keywords.gperf" |
173 | {"volatile", VOLATILE_KEYW}, | 178 | {"volatile", VOLATILE_KEYW}, |
174 | {""}, | 179 | {""}, |
175 | #line 37 "scripts/genksyms/keywords.gperf" | 180 | #line 39 "scripts/genksyms/keywords.gperf" |
176 | {"float", FLOAT_KEYW}, | 181 | {"float", FLOAT_KEYW}, |
177 | #line 34 "scripts/genksyms/keywords.gperf" | 182 | #line 36 "scripts/genksyms/keywords.gperf" |
178 | {"double", DOUBLE_KEYW}, | 183 | {"double", DOUBLE_KEYW}, |
179 | {""}, | 184 | {""}, |
180 | #line 5 "scripts/genksyms/keywords.gperf" | 185 | #line 7 "scripts/genksyms/keywords.gperf" |
181 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, | 186 | {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, |
182 | {""}, {""}, | 187 | {""}, {""}, |
183 | #line 38 "scripts/genksyms/keywords.gperf" | 188 | #line 40 "scripts/genksyms/keywords.gperf" |
184 | {"inline", INLINE_KEYW}, | 189 | {"inline", INLINE_KEYW}, |
185 | #line 6 "scripts/genksyms/keywords.gperf" | 190 | #line 8 "scripts/genksyms/keywords.gperf" |
186 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, | 191 | {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, |
187 | #line 41 "scripts/genksyms/keywords.gperf" | 192 | #line 43 "scripts/genksyms/keywords.gperf" |
188 | {"register", REGISTER_KEYW}, | 193 | {"register", REGISTER_KEYW}, |
189 | {""}, | 194 | {""}, |
190 | #line 22 "scripts/genksyms/keywords.gperf" | 195 | #line 24 "scripts/genksyms/keywords.gperf" |
191 | {"_Bool", BOOL_KEYW}, | 196 | {"_Bool", BOOL_KEYW}, |
192 | #line 43 "scripts/genksyms/keywords.gperf" | 197 | #line 45 "scripts/genksyms/keywords.gperf" |
193 | {"signed", SIGNED_KEYW}, | 198 | {"signed", SIGNED_KEYW}, |
194 | {""}, {""}, | 199 | {""}, {""}, |
195 | #line 40 "scripts/genksyms/keywords.gperf" | 200 | #line 42 "scripts/genksyms/keywords.gperf" |
196 | {"long", LONG_KEYW} | 201 | {"long", LONG_KEYW} |
197 | }; | 202 | }; |
198 | 203 | ||
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf index 5ef3733225fb..8fe977a4d57b 100644 --- a/scripts/genksyms/keywords.gperf +++ b/scripts/genksyms/keywords.gperf | |||
@@ -1,4 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | struct resword; | ||
3 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); | ||
2 | %} | 4 | %} |
3 | struct resword { const char *name; int token; } | 5 | struct resword { const char *name; int token; } |
4 | %% | 6 | %% |
diff --git a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped index dc3e81807d13..fdc7113b08d1 100644 --- a/scripts/kconfig/lex.zconf.c_shipped +++ b/scripts/kconfig/lex.zconf.c_shipped | |||
@@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t; | |||
160 | 160 | ||
161 | /* Size of default input buffer. */ | 161 | /* Size of default input buffer. */ |
162 | #ifndef YY_BUF_SIZE | 162 | #ifndef YY_BUF_SIZE |
163 | #ifdef __ia64__ | ||
164 | /* On IA-64, the buffer size is 16k, not 8k. | ||
165 | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. | ||
166 | * Ditto for the __ia64__ case accordingly. | ||
167 | */ | ||
168 | #define YY_BUF_SIZE 32768 | ||
169 | #else | ||
163 | #define YY_BUF_SIZE 16384 | 170 | #define YY_BUF_SIZE 16384 |
171 | #endif /* __ia64__ */ | ||
164 | #endif | 172 | #endif |
165 | 173 | ||
166 | /* The state buf must be large enough to hold one state per character in the main buffer. | 174 | /* The state buf must be large enough to hold one state per character in the main buffer. |
@@ -802,7 +810,7 @@ static int last_ts, first_ts; | |||
802 | static void zconf_endhelp(void); | 810 | static void zconf_endhelp(void); |
803 | static void zconf_endfile(void); | 811 | static void zconf_endfile(void); |
804 | 812 | ||
805 | void new_string(void) | 813 | static void new_string(void) |
806 | { | 814 | { |
807 | text = malloc(START_STRSIZE); | 815 | text = malloc(START_STRSIZE); |
808 | text_asize = START_STRSIZE; | 816 | text_asize = START_STRSIZE; |
@@ -810,7 +818,7 @@ void new_string(void) | |||
810 | *text = 0; | 818 | *text = 0; |
811 | } | 819 | } |
812 | 820 | ||
813 | void append_string(const char *str, int size) | 821 | static void append_string(const char *str, int size) |
814 | { | 822 | { |
815 | int new_size = text_size + size + 1; | 823 | int new_size = text_size + size + 1; |
816 | if (new_size > text_asize) { | 824 | if (new_size > text_asize) { |
@@ -824,7 +832,7 @@ void append_string(const char *str, int size) | |||
824 | text[text_size] = 0; | 832 | text[text_size] = 0; |
825 | } | 833 | } |
826 | 834 | ||
827 | void alloc_string(const char *str, int size) | 835 | static void alloc_string(const char *str, int size) |
828 | { | 836 | { |
829 | text = malloc(size + 1); | 837 | text = malloc(size + 1); |
830 | memcpy(text, str, size); | 838 | memcpy(text, str, size); |
@@ -914,7 +922,12 @@ static int input (void ); | |||
914 | 922 | ||
915 | /* Amount of stuff to slurp up with each read. */ | 923 | /* Amount of stuff to slurp up with each read. */ |
916 | #ifndef YY_READ_BUF_SIZE | 924 | #ifndef YY_READ_BUF_SIZE |
925 | #ifdef __ia64__ | ||
926 | /* On IA-64, the buffer size is 16k, not 8k */ | ||
927 | #define YY_READ_BUF_SIZE 16384 | ||
928 | #else | ||
917 | #define YY_READ_BUF_SIZE 8192 | 929 | #define YY_READ_BUF_SIZE 8192 |
930 | #endif /* __ia64__ */ | ||
918 | #endif | 931 | #endif |
919 | 932 | ||
920 | /* Copy whatever the last rule matched to the standard output. */ | 933 | /* Copy whatever the last rule matched to the standard output. */ |
@@ -922,7 +935,7 @@ static int input (void ); | |||
922 | /* This used to be an fputs(), but since the string might contain NUL's, | 935 | /* This used to be an fputs(), but since the string might contain NUL's, |
923 | * we now use fwrite(). | 936 | * we now use fwrite(). |
924 | */ | 937 | */ |
925 | #define ECHO fwrite( zconftext, zconfleng, 1, zconfout ) | 938 | #define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) |
926 | #endif | 939 | #endif |
927 | 940 | ||
928 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | 941 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
@@ -2060,8 +2073,8 @@ YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) | |||
2060 | 2073 | ||
2061 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will | 2074 | /** Setup the input buffer state to scan the given bytes. The next call to zconflex() will |
2062 | * scan from a @e copy of @a bytes. | 2075 | * scan from a @e copy of @a bytes. |
2063 | * @param bytes the byte buffer to scan | 2076 | * @param yybytes the byte buffer to scan |
2064 | * @param len the number of bytes in the buffer pointed to by @a bytes. | 2077 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
2065 | * | 2078 | * |
2066 | * @return the newly allocated buffer state object. | 2079 | * @return the newly allocated buffer state object. |
2067 | */ | 2080 | */ |
diff --git a/scripts/kconfig/zconf.gperf b/scripts/kconfig/zconf.gperf index 25ef5d01c0af..d8bc74249622 100644 --- a/scripts/kconfig/zconf.gperf +++ b/scripts/kconfig/zconf.gperf | |||
@@ -9,6 +9,8 @@ | |||
9 | 9 | ||
10 | struct kconf_id; | 10 | struct kconf_id; |
11 | 11 | ||
12 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
13 | |||
12 | %% | 14 | %% |
13 | mainmenu, T_MAINMENU, TF_COMMAND | 15 | mainmenu, T_MAINMENU, TF_COMMAND |
14 | menu, T_MENU, TF_COMMAND | 16 | menu, T_MENU, TF_COMMAND |
diff --git a/scripts/kconfig/zconf.hash.c_shipped b/scripts/kconfig/zconf.hash.c_shipped index 5c73d51339d8..c1748faf4634 100644 --- a/scripts/kconfig/zconf.hash.c_shipped +++ b/scripts/kconfig/zconf.hash.c_shipped | |||
@@ -30,6 +30,8 @@ | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | struct kconf_id; | 32 | struct kconf_id; |
33 | |||
34 | static struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); | ||
33 | /* maximum key range = 47, duplicates = 0 */ | 35 | /* maximum key range = 47, duplicates = 0 */ |
34 | 36 | ||
35 | #ifdef __GNUC__ | 37 | #ifdef __GNUC__ |
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 21ff69c9ad4e..d8f7236cb0a3 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l | |||
@@ -39,7 +39,7 @@ static int last_ts, first_ts; | |||
39 | static void zconf_endhelp(void); | 39 | static void zconf_endhelp(void); |
40 | static void zconf_endfile(void); | 40 | static void zconf_endfile(void); |
41 | 41 | ||
42 | void new_string(void) | 42 | static void new_string(void) |
43 | { | 43 | { |
44 | text = malloc(START_STRSIZE); | 44 | text = malloc(START_STRSIZE); |
45 | text_asize = START_STRSIZE; | 45 | text_asize = START_STRSIZE; |
@@ -47,7 +47,7 @@ void new_string(void) | |||
47 | *text = 0; | 47 | *text = 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | void append_string(const char *str, int size) | 50 | static void append_string(const char *str, int size) |
51 | { | 51 | { |
52 | int new_size = text_size + size + 1; | 52 | int new_size = text_size + size + 1; |
53 | if (new_size > text_asize) { | 53 | if (new_size > text_asize) { |
@@ -61,7 +61,7 @@ void append_string(const char *str, int size) | |||
61 | text[text_size] = 0; | 61 | text[text_size] = 0; |
62 | } | 62 | } |
63 | 63 | ||
64 | void alloc_string(const char *str, int size) | 64 | static void alloc_string(const char *str, int size) |
65 | { | 65 | { |
66 | text = malloc(size + 1); | 66 | text = malloc(size + 1); |
67 | memcpy(text, str, size); | 67 | memcpy(text, str, size); |
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped index 95df833b5a9d..6e9dcd59aa87 100644 --- a/scripts/kconfig/zconf.tab.c_shipped +++ b/scripts/kconfig/zconf.tab.c_shipped | |||
@@ -1,24 +1,23 @@ | |||
1 | /* A Bison parser, made by GNU Bison 2.3. */ | ||
2 | 1 | ||
3 | /* Skeleton implementation for Bison's Yacc-like parsers in C | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ |
4 | 3 | ||
5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 4 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
5 | |||
6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | ||
6 | Free Software Foundation, Inc. | 7 | Free Software Foundation, Inc. |
7 | 8 | ||
8 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | 10 | it under the terms of the GNU General Public License as published by |
10 | the Free Software Foundation; either version 2, or (at your option) | 11 | the Free Software Foundation, either version 3 of the License, or |
11 | any later version. | 12 | (at your option) any later version. |
12 | 13 | ||
13 | This program is distributed in the hope that it will be useful, | 14 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
17 | 18 | ||
18 | You should have received a copy of the GNU General Public License | 19 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | Boston, MA 02110-1301, USA. */ | ||
22 | 21 | ||
23 | /* As a special exception, you may create a larger work that contains | 22 | /* As a special exception, you may create a larger work that contains |
24 | part or all of the Bison parser skeleton and distribute that work | 23 | part or all of the Bison parser skeleton and distribute that work |
@@ -29,7 +28,7 @@ | |||
29 | special exception, which will cause the skeleton and the resulting | 28 | special exception, which will cause the skeleton and the resulting |
30 | Bison output files to be licensed under the GNU General Public | 29 | Bison output files to be licensed under the GNU General Public |
31 | License without this special exception. | 30 | License without this special exception. |
32 | 31 | ||
33 | This special exception was added by the Free Software Foundation in | 32 | This special exception was added by the Free Software Foundation in |
34 | version 2.2 of Bison. */ | 33 | version 2.2 of Bison. */ |
35 | 34 | ||
@@ -47,7 +46,7 @@ | |||
47 | #define YYBISON 1 | 46 | #define YYBISON 1 |
48 | 47 | ||
49 | /* Bison version. */ | 48 | /* Bison version. */ |
50 | #define YYBISON_VERSION "2.3" | 49 | #define YYBISON_VERSION "2.4.1" |
51 | 50 | ||
52 | /* Skeleton name. */ | 51 | /* Skeleton name. */ |
53 | #define YYSKELETON_NAME "yacc.c" | 52 | #define YYSKELETON_NAME "yacc.c" |
@@ -55,94 +54,23 @@ | |||
55 | /* Pure parsers. */ | 54 | /* Pure parsers. */ |
56 | #define YYPURE 0 | 55 | #define YYPURE 0 |
57 | 56 | ||
57 | /* Push parsers. */ | ||
58 | #define YYPUSH 0 | ||
59 | |||
60 | /* Pull parsers. */ | ||
61 | #define YYPULL 1 | ||
62 | |||
58 | /* Using locations. */ | 63 | /* Using locations. */ |
59 | #define YYLSP_NEEDED 0 | 64 | #define YYLSP_NEEDED 0 |
60 | 65 | ||
61 | /* Substitute the variable and function names. */ | 66 | /* Substitute the variable and function names. */ |
62 | #define yyparse zconfparse | 67 | #define yyparse zconfparse |
63 | #define yylex zconflex | 68 | #define yylex zconflex |
64 | #define yyerror zconferror | 69 | #define yyerror zconferror |
65 | #define yylval zconflval | 70 | #define yylval zconflval |
66 | #define yychar zconfchar | 71 | #define yychar zconfchar |
67 | #define yydebug zconfdebug | 72 | #define yydebug zconfdebug |
68 | #define yynerrs zconfnerrs | 73 | #define yynerrs zconfnerrs |
69 | |||
70 | |||
71 | /* Tokens. */ | ||
72 | #ifndef YYTOKENTYPE | ||
73 | # define YYTOKENTYPE | ||
74 | /* Put the tokens into the symbol table, so that GDB and other debuggers | ||
75 | know about them. */ | ||
76 | enum yytokentype { | ||
77 | T_MAINMENU = 258, | ||
78 | T_MENU = 259, | ||
79 | T_ENDMENU = 260, | ||
80 | T_SOURCE = 261, | ||
81 | T_CHOICE = 262, | ||
82 | T_ENDCHOICE = 263, | ||
83 | T_COMMENT = 264, | ||
84 | T_CONFIG = 265, | ||
85 | T_MENUCONFIG = 266, | ||
86 | T_HELP = 267, | ||
87 | T_HELPTEXT = 268, | ||
88 | T_IF = 269, | ||
89 | T_ENDIF = 270, | ||
90 | T_DEPENDS = 271, | ||
91 | T_OPTIONAL = 272, | ||
92 | T_PROMPT = 273, | ||
93 | T_TYPE = 274, | ||
94 | T_DEFAULT = 275, | ||
95 | T_SELECT = 276, | ||
96 | T_RANGE = 277, | ||
97 | T_OPTION = 278, | ||
98 | T_ON = 279, | ||
99 | T_WORD = 280, | ||
100 | T_WORD_QUOTE = 281, | ||
101 | T_UNEQUAL = 282, | ||
102 | T_CLOSE_PAREN = 283, | ||
103 | T_OPEN_PAREN = 284, | ||
104 | T_EOL = 285, | ||
105 | T_OR = 286, | ||
106 | T_AND = 287, | ||
107 | T_EQUAL = 288, | ||
108 | T_NOT = 289 | ||
109 | }; | ||
110 | #endif | ||
111 | /* Tokens. */ | ||
112 | #define T_MAINMENU 258 | ||
113 | #define T_MENU 259 | ||
114 | #define T_ENDMENU 260 | ||
115 | #define T_SOURCE 261 | ||
116 | #define T_CHOICE 262 | ||
117 | #define T_ENDCHOICE 263 | ||
118 | #define T_COMMENT 264 | ||
119 | #define T_CONFIG 265 | ||
120 | #define T_MENUCONFIG 266 | ||
121 | #define T_HELP 267 | ||
122 | #define T_HELPTEXT 268 | ||
123 | #define T_IF 269 | ||
124 | #define T_ENDIF 270 | ||
125 | #define T_DEPENDS 271 | ||
126 | #define T_OPTIONAL 272 | ||
127 | #define T_PROMPT 273 | ||
128 | #define T_TYPE 274 | ||
129 | #define T_DEFAULT 275 | ||
130 | #define T_SELECT 276 | ||
131 | #define T_RANGE 277 | ||
132 | #define T_OPTION 278 | ||
133 | #define T_ON 279 | ||
134 | #define T_WORD 280 | ||
135 | #define T_WORD_QUOTE 281 | ||
136 | #define T_UNEQUAL 282 | ||
137 | #define T_CLOSE_PAREN 283 | ||
138 | #define T_OPEN_PAREN 284 | ||
139 | #define T_EOL 285 | ||
140 | #define T_OR 286 | ||
141 | #define T_AND 287 | ||
142 | #define T_EQUAL 288 | ||
143 | #define T_NOT 289 | ||
144 | |||
145 | |||
146 | 74 | ||
147 | 75 | ||
148 | /* Copy the first part of user declarations. */ | 76 | /* Copy the first part of user declarations. */ |
@@ -163,8 +91,6 @@ | |||
163 | #define LKC_DIRECT_LINK | 91 | #define LKC_DIRECT_LINK |
164 | #include "lkc.h" | 92 | #include "lkc.h" |
165 | 93 | ||
166 | #include "zconf.hash.c" | ||
167 | |||
168 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 94 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
169 | 95 | ||
170 | #define PRINTD 0x0001 | 96 | #define PRINTD 0x0001 |
@@ -188,6 +114,7 @@ static struct menu *current_menu, *current_entry; | |||
188 | #endif | 114 | #endif |
189 | 115 | ||
190 | 116 | ||
117 | |||
191 | /* Enabling traces. */ | 118 | /* Enabling traces. */ |
192 | #ifndef YYDEBUG | 119 | #ifndef YYDEBUG |
193 | # define YYDEBUG 0 | 120 | # define YYDEBUG 0 |
@@ -206,31 +133,77 @@ static struct menu *current_menu, *current_entry; | |||
206 | # define YYTOKEN_TABLE 0 | 133 | # define YYTOKEN_TABLE 0 |
207 | #endif | 134 | #endif |
208 | 135 | ||
136 | |||
137 | /* Tokens. */ | ||
138 | #ifndef YYTOKENTYPE | ||
139 | # define YYTOKENTYPE | ||
140 | /* Put the tokens into the symbol table, so that GDB and other debuggers | ||
141 | know about them. */ | ||
142 | enum yytokentype { | ||
143 | T_MAINMENU = 258, | ||
144 | T_MENU = 259, | ||
145 | T_ENDMENU = 260, | ||
146 | T_SOURCE = 261, | ||
147 | T_CHOICE = 262, | ||
148 | T_ENDCHOICE = 263, | ||
149 | T_COMMENT = 264, | ||
150 | T_CONFIG = 265, | ||
151 | T_MENUCONFIG = 266, | ||
152 | T_HELP = 267, | ||
153 | T_HELPTEXT = 268, | ||
154 | T_IF = 269, | ||
155 | T_ENDIF = 270, | ||
156 | T_DEPENDS = 271, | ||
157 | T_OPTIONAL = 272, | ||
158 | T_PROMPT = 273, | ||
159 | T_TYPE = 274, | ||
160 | T_DEFAULT = 275, | ||
161 | T_SELECT = 276, | ||
162 | T_RANGE = 277, | ||
163 | T_OPTION = 278, | ||
164 | T_ON = 279, | ||
165 | T_WORD = 280, | ||
166 | T_WORD_QUOTE = 281, | ||
167 | T_UNEQUAL = 282, | ||
168 | T_CLOSE_PAREN = 283, | ||
169 | T_OPEN_PAREN = 284, | ||
170 | T_EOL = 285, | ||
171 | T_OR = 286, | ||
172 | T_AND = 287, | ||
173 | T_EQUAL = 288, | ||
174 | T_NOT = 289 | ||
175 | }; | ||
176 | #endif | ||
177 | |||
178 | |||
179 | |||
209 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | 180 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
210 | typedef union YYSTYPE | 181 | typedef union YYSTYPE |
211 | |||
212 | { | 182 | { |
183 | |||
184 | |||
213 | char *string; | 185 | char *string; |
214 | struct file *file; | 186 | struct file *file; |
215 | struct symbol *symbol; | 187 | struct symbol *symbol; |
216 | struct expr *expr; | 188 | struct expr *expr; |
217 | struct menu *menu; | 189 | struct menu *menu; |
218 | struct kconf_id *id; | 190 | struct kconf_id *id; |
219 | } | ||
220 | /* Line 187 of yacc.c. */ | ||
221 | 191 | ||
222 | YYSTYPE; | 192 | |
193 | |||
194 | } YYSTYPE; | ||
195 | # define YYSTYPE_IS_TRIVIAL 1 | ||
223 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 196 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
224 | # define YYSTYPE_IS_DECLARED 1 | 197 | # define YYSTYPE_IS_DECLARED 1 |
225 | # define YYSTYPE_IS_TRIVIAL 1 | ||
226 | #endif | 198 | #endif |
227 | 199 | ||
228 | 200 | ||
229 | |||
230 | /* Copy the second part of user declarations. */ | 201 | /* Copy the second part of user declarations. */ |
231 | 202 | ||
232 | 203 | ||
233 | /* Line 216 of yacc.c. */ | 204 | /* Include zconf.hash.c here so it can see the token constants. */ |
205 | #include "zconf.hash.c" | ||
206 | |||
234 | 207 | ||
235 | 208 | ||
236 | #ifdef short | 209 | #ifdef short |
@@ -306,14 +279,14 @@ typedef short int yytype_int16; | |||
306 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 279 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
307 | || defined __cplusplus || defined _MSC_VER) | 280 | || defined __cplusplus || defined _MSC_VER) |
308 | static int | 281 | static int |
309 | YYID (int i) | 282 | YYID (int yyi) |
310 | #else | 283 | #else |
311 | static int | 284 | static int |
312 | YYID (i) | 285 | YYID (yyi) |
313 | int i; | 286 | int yyi; |
314 | #endif | 287 | #endif |
315 | { | 288 | { |
316 | return i; | 289 | return yyi; |
317 | } | 290 | } |
318 | #endif | 291 | #endif |
319 | 292 | ||
@@ -394,9 +367,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ | |||
394 | /* A type that is properly aligned for any stack member. */ | 367 | /* A type that is properly aligned for any stack member. */ |
395 | union yyalloc | 368 | union yyalloc |
396 | { | 369 | { |
397 | yytype_int16 yyss; | 370 | yytype_int16 yyss_alloc; |
398 | YYSTYPE yyvs; | 371 | YYSTYPE yyvs_alloc; |
399 | }; | 372 | }; |
400 | 373 | ||
401 | /* The size of the maximum gap between one aligned stack and the next. */ | 374 | /* The size of the maximum gap between one aligned stack and the next. */ |
402 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | 375 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
@@ -430,12 +403,12 @@ union yyalloc | |||
430 | elements in the stack, and YYPTR gives the new location of the | 403 | elements in the stack, and YYPTR gives the new location of the |
431 | stack. Advance YYPTR to a properly aligned location for the next | 404 | stack. Advance YYPTR to a properly aligned location for the next |
432 | stack. */ | 405 | stack. */ |
433 | # define YYSTACK_RELOCATE(Stack) \ | 406 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
434 | do \ | 407 | do \ |
435 | { \ | 408 | { \ |
436 | YYSIZE_T yynewbytes; \ | 409 | YYSIZE_T yynewbytes; \ |
437 | YYCOPY (&yyptr->Stack, Stack, yysize); \ | 410 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
438 | Stack = &yyptr->Stack; \ | 411 | Stack = &yyptr->Stack_alloc; \ |
439 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | 412 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
440 | yyptr += yynewbytes / sizeof (*yyptr); \ | 413 | yyptr += yynewbytes / sizeof (*yyptr); \ |
441 | } \ | 414 | } \ |
@@ -558,18 +531,18 @@ static const yytype_int8 yyrhs[] = | |||
558 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 531 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
559 | static const yytype_uint16 yyrline[] = | 532 | static const yytype_uint16 yyrline[] = |
560 | { | 533 | { |
561 | 0, 104, 104, 106, 108, 109, 110, 111, 112, 113, | 534 | 0, 107, 107, 109, 111, 112, 113, 114, 115, 116, |
562 | 114, 118, 122, 122, 122, 122, 122, 122, 122, 126, | 535 | 117, 121, 125, 125, 125, 125, 125, 125, 125, 129, |
563 | 127, 128, 129, 130, 131, 135, 136, 142, 150, 156, | 536 | 130, 131, 132, 133, 134, 138, 139, 145, 153, 159, |
564 | 164, 174, 176, 177, 178, 179, 180, 181, 184, 192, | 537 | 167, 177, 179, 180, 181, 182, 183, 184, 187, 195, |
565 | 198, 208, 214, 220, 223, 225, 236, 237, 242, 251, | 538 | 201, 211, 217, 223, 226, 228, 239, 240, 245, 254, |
566 | 256, 264, 267, 269, 270, 271, 272, 273, 276, 282, | 539 | 259, 267, 270, 272, 273, 274, 275, 276, 279, 285, |
567 | 293, 299, 309, 311, 316, 324, 332, 335, 337, 338, | 540 | 296, 302, 312, 314, 319, 327, 335, 338, 340, 341, |
568 | 339, 344, 351, 356, 364, 367, 369, 370, 371, 374, | 541 | 342, 347, 354, 359, 367, 370, 372, 373, 374, 377, |
569 | 382, 389, 396, 402, 409, 411, 412, 413, 416, 424, | 542 | 385, 392, 399, 405, 412, 414, 415, 416, 419, 427, |
570 | 426, 431, 432, 435, 436, 437, 441, 442, 445, 446, | 543 | 429, 434, 435, 438, 439, 440, 444, 445, 448, 449, |
571 | 449, 450, 451, 452, 453, 454, 455, 458, 459, 462, | 544 | 452, 453, 454, 455, 456, 457, 458, 461, 462, 465, |
572 | 463 | 545 | 466 |
573 | }; | 546 | }; |
574 | #endif | 547 | #endif |
575 | 548 | ||
@@ -985,17 +958,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | |||
985 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 958 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
986 | || defined __cplusplus || defined _MSC_VER) | 959 | || defined __cplusplus || defined _MSC_VER) |
987 | static void | 960 | static void |
988 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) | 961 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
989 | #else | 962 | #else |
990 | static void | 963 | static void |
991 | yy_stack_print (bottom, top) | 964 | yy_stack_print (yybottom, yytop) |
992 | yytype_int16 *bottom; | 965 | yytype_int16 *yybottom; |
993 | yytype_int16 *top; | 966 | yytype_int16 *yytop; |
994 | #endif | 967 | #endif |
995 | { | 968 | { |
996 | YYFPRINTF (stderr, "Stack now"); | 969 | YYFPRINTF (stderr, "Stack now"); |
997 | for (; bottom <= top; ++bottom) | 970 | for (; yybottom <= yytop; yybottom++) |
998 | YYFPRINTF (stderr, " %d", *bottom); | 971 | { |
972 | int yybot = *yybottom; | ||
973 | YYFPRINTF (stderr, " %d", yybot); | ||
974 | } | ||
999 | YYFPRINTF (stderr, "\n"); | 975 | YYFPRINTF (stderr, "\n"); |
1000 | } | 976 | } |
1001 | 977 | ||
@@ -1029,11 +1005,11 @@ yy_reduce_print (yyvsp, yyrule) | |||
1029 | /* The symbols being reduced. */ | 1005 | /* The symbols being reduced. */ |
1030 | for (yyi = 0; yyi < yynrhs; yyi++) | 1006 | for (yyi = 0; yyi < yynrhs; yyi++) |
1031 | { | 1007 | { |
1032 | fprintf (stderr, " $%d = ", yyi + 1); | 1008 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
1033 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | 1009 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
1034 | &(yyvsp[(yyi + 1) - (yynrhs)]) | 1010 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
1035 | ); | 1011 | ); |
1036 | fprintf (stderr, "\n"); | 1012 | YYFPRINTF (stderr, "\n"); |
1037 | } | 1013 | } |
1038 | } | 1014 | } |
1039 | 1015 | ||
@@ -1343,10 +1319,8 @@ yydestruct (yymsg, yytype, yyvaluep) | |||
1343 | break; | 1319 | break; |
1344 | } | 1320 | } |
1345 | } | 1321 | } |
1346 | |||
1347 | 1322 | ||
1348 | /* Prevent warnings from -Wmissing-prototypes. */ | 1323 | /* Prevent warnings from -Wmissing-prototypes. */ |
1349 | |||
1350 | #ifdef YYPARSE_PARAM | 1324 | #ifdef YYPARSE_PARAM |
1351 | #if defined __STDC__ || defined __cplusplus | 1325 | #if defined __STDC__ || defined __cplusplus |
1352 | int yyparse (void *YYPARSE_PARAM); | 1326 | int yyparse (void *YYPARSE_PARAM); |
@@ -1362,11 +1336,10 @@ int yyparse (); | |||
1362 | #endif /* ! YYPARSE_PARAM */ | 1336 | #endif /* ! YYPARSE_PARAM */ |
1363 | 1337 | ||
1364 | 1338 | ||
1365 | 1339 | /* The lookahead symbol. */ | |
1366 | /* The look-ahead symbol. */ | ||
1367 | int yychar; | 1340 | int yychar; |
1368 | 1341 | ||
1369 | /* The semantic value of the look-ahead symbol. */ | 1342 | /* The semantic value of the lookahead symbol. */ |
1370 | YYSTYPE yylval; | 1343 | YYSTYPE yylval; |
1371 | 1344 | ||
1372 | /* Number of syntax errors so far. */ | 1345 | /* Number of syntax errors so far. */ |
@@ -1374,9 +1347,9 @@ int yynerrs; | |||
1374 | 1347 | ||
1375 | 1348 | ||
1376 | 1349 | ||
1377 | /*----------. | 1350 | /*-------------------------. |
1378 | | yyparse. | | 1351 | | yyparse or yypush_parse. | |
1379 | `----------*/ | 1352 | `-------------------------*/ |
1380 | 1353 | ||
1381 | #ifdef YYPARSE_PARAM | 1354 | #ifdef YYPARSE_PARAM |
1382 | #if (defined __STDC__ || defined __C99__FUNC__ \ | 1355 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
@@ -1400,66 +1373,68 @@ yyparse () | |||
1400 | #endif | 1373 | #endif |
1401 | #endif | 1374 | #endif |
1402 | { | 1375 | { |
1403 | |||
1404 | int yystate; | ||
1405 | int yyn; | ||
1406 | int yyresult; | ||
1407 | /* Number of tokens to shift before error messages enabled. */ | ||
1408 | int yyerrstatus; | ||
1409 | /* Look-ahead token as an internal (translated) token number. */ | ||
1410 | int yytoken = 0; | ||
1411 | #if YYERROR_VERBOSE | ||
1412 | /* Buffer for error messages, and its allocated size. */ | ||
1413 | char yymsgbuf[128]; | ||
1414 | char *yymsg = yymsgbuf; | ||
1415 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | ||
1416 | #endif | ||
1417 | |||
1418 | /* Three stacks and their tools: | ||
1419 | `yyss': related to states, | ||
1420 | `yyvs': related to semantic values, | ||
1421 | `yyls': related to locations. | ||
1422 | 1376 | ||
1423 | Refer to the stacks thru separate pointers, to allow yyoverflow | ||
1424 | to reallocate them elsewhere. */ | ||
1425 | 1377 | ||
1426 | /* The state stack. */ | 1378 | int yystate; |
1427 | yytype_int16 yyssa[YYINITDEPTH]; | 1379 | /* Number of tokens to shift before error messages enabled. */ |
1428 | yytype_int16 *yyss = yyssa; | 1380 | int yyerrstatus; |
1429 | yytype_int16 *yyssp; | ||
1430 | 1381 | ||
1431 | /* The semantic value stack. */ | 1382 | /* The stacks and their tools: |
1432 | YYSTYPE yyvsa[YYINITDEPTH]; | 1383 | `yyss': related to states. |
1433 | YYSTYPE *yyvs = yyvsa; | 1384 | `yyvs': related to semantic values. |
1434 | YYSTYPE *yyvsp; | ||
1435 | 1385 | ||
1386 | Refer to the stacks thru separate pointers, to allow yyoverflow | ||
1387 | to reallocate them elsewhere. */ | ||
1436 | 1388 | ||
1389 | /* The state stack. */ | ||
1390 | yytype_int16 yyssa[YYINITDEPTH]; | ||
1391 | yytype_int16 *yyss; | ||
1392 | yytype_int16 *yyssp; | ||
1437 | 1393 | ||
1438 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | 1394 | /* The semantic value stack. */ |
1395 | YYSTYPE yyvsa[YYINITDEPTH]; | ||
1396 | YYSTYPE *yyvs; | ||
1397 | YYSTYPE *yyvsp; | ||
1439 | 1398 | ||
1440 | YYSIZE_T yystacksize = YYINITDEPTH; | 1399 | YYSIZE_T yystacksize; |
1441 | 1400 | ||
1401 | int yyn; | ||
1402 | int yyresult; | ||
1403 | /* Lookahead token as an internal (translated) token number. */ | ||
1404 | int yytoken; | ||
1442 | /* The variables used to return semantic value and location from the | 1405 | /* The variables used to return semantic value and location from the |
1443 | action routines. */ | 1406 | action routines. */ |
1444 | YYSTYPE yyval; | 1407 | YYSTYPE yyval; |
1445 | 1408 | ||
1409 | #if YYERROR_VERBOSE | ||
1410 | /* Buffer for error messages, and its allocated size. */ | ||
1411 | char yymsgbuf[128]; | ||
1412 | char *yymsg = yymsgbuf; | ||
1413 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | ||
1414 | #endif | ||
1415 | |||
1416 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | ||
1446 | 1417 | ||
1447 | /* The number of symbols on the RHS of the reduced rule. | 1418 | /* The number of symbols on the RHS of the reduced rule. |
1448 | Keep to zero when no symbol should be popped. */ | 1419 | Keep to zero when no symbol should be popped. */ |
1449 | int yylen = 0; | 1420 | int yylen = 0; |
1450 | 1421 | ||
1422 | yytoken = 0; | ||
1423 | yyss = yyssa; | ||
1424 | yyvs = yyvsa; | ||
1425 | yystacksize = YYINITDEPTH; | ||
1426 | |||
1451 | YYDPRINTF ((stderr, "Starting parse\n")); | 1427 | YYDPRINTF ((stderr, "Starting parse\n")); |
1452 | 1428 | ||
1453 | yystate = 0; | 1429 | yystate = 0; |
1454 | yyerrstatus = 0; | 1430 | yyerrstatus = 0; |
1455 | yynerrs = 0; | 1431 | yynerrs = 0; |
1456 | yychar = YYEMPTY; /* Cause a token to be read. */ | 1432 | yychar = YYEMPTY; /* Cause a token to be read. */ |
1457 | 1433 | ||
1458 | /* Initialize stack pointers. | 1434 | /* Initialize stack pointers. |
1459 | Waste one element of value and location stack | 1435 | Waste one element of value and location stack |
1460 | so that they stay on the same level as the state stack. | 1436 | so that they stay on the same level as the state stack. |
1461 | The wasted elements are never initialized. */ | 1437 | The wasted elements are never initialized. */ |
1462 | |||
1463 | yyssp = yyss; | 1438 | yyssp = yyss; |
1464 | yyvsp = yyvs; | 1439 | yyvsp = yyvs; |
1465 | 1440 | ||
@@ -1489,7 +1464,6 @@ yyparse () | |||
1489 | YYSTYPE *yyvs1 = yyvs; | 1464 | YYSTYPE *yyvs1 = yyvs; |
1490 | yytype_int16 *yyss1 = yyss; | 1465 | yytype_int16 *yyss1 = yyss; |
1491 | 1466 | ||
1492 | |||
1493 | /* Each stack pointer address is followed by the size of the | 1467 | /* Each stack pointer address is followed by the size of the |
1494 | data in use in that stack, in bytes. This used to be a | 1468 | data in use in that stack, in bytes. This used to be a |
1495 | conditional around just the two extra args, but that might | 1469 | conditional around just the two extra args, but that might |
@@ -1497,7 +1471,6 @@ yyparse () | |||
1497 | yyoverflow (YY_("memory exhausted"), | 1471 | yyoverflow (YY_("memory exhausted"), |
1498 | &yyss1, yysize * sizeof (*yyssp), | 1472 | &yyss1, yysize * sizeof (*yyssp), |
1499 | &yyvs1, yysize * sizeof (*yyvsp), | 1473 | &yyvs1, yysize * sizeof (*yyvsp), |
1500 | |||
1501 | &yystacksize); | 1474 | &yystacksize); |
1502 | 1475 | ||
1503 | yyss = yyss1; | 1476 | yyss = yyss1; |
@@ -1520,9 +1493,8 @@ yyparse () | |||
1520 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | 1493 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1521 | if (! yyptr) | 1494 | if (! yyptr) |
1522 | goto yyexhaustedlab; | 1495 | goto yyexhaustedlab; |
1523 | YYSTACK_RELOCATE (yyss); | 1496 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
1524 | YYSTACK_RELOCATE (yyvs); | 1497 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1525 | |||
1526 | # undef YYSTACK_RELOCATE | 1498 | # undef YYSTACK_RELOCATE |
1527 | if (yyss1 != yyssa) | 1499 | if (yyss1 != yyssa) |
1528 | YYSTACK_FREE (yyss1); | 1500 | YYSTACK_FREE (yyss1); |
@@ -1533,7 +1505,6 @@ yyparse () | |||
1533 | yyssp = yyss + yysize - 1; | 1505 | yyssp = yyss + yysize - 1; |
1534 | yyvsp = yyvs + yysize - 1; | 1506 | yyvsp = yyvs + yysize - 1; |
1535 | 1507 | ||
1536 | |||
1537 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", | 1508 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1538 | (unsigned long int) yystacksize)); | 1509 | (unsigned long int) yystacksize)); |
1539 | 1510 | ||
@@ -1543,6 +1514,9 @@ yyparse () | |||
1543 | 1514 | ||
1544 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | 1515 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1545 | 1516 | ||
1517 | if (yystate == YYFINAL) | ||
1518 | YYACCEPT; | ||
1519 | |||
1546 | goto yybackup; | 1520 | goto yybackup; |
1547 | 1521 | ||
1548 | /*-----------. | 1522 | /*-----------. |
@@ -1551,16 +1525,16 @@ yyparse () | |||
1551 | yybackup: | 1525 | yybackup: |
1552 | 1526 | ||
1553 | /* Do appropriate processing given the current state. Read a | 1527 | /* Do appropriate processing given the current state. Read a |
1554 | look-ahead token if we need one and don't already have one. */ | 1528 | lookahead token if we need one and don't already have one. */ |
1555 | 1529 | ||
1556 | /* First try to decide what to do without reference to look-ahead token. */ | 1530 | /* First try to decide what to do without reference to lookahead token. */ |
1557 | yyn = yypact[yystate]; | 1531 | yyn = yypact[yystate]; |
1558 | if (yyn == YYPACT_NINF) | 1532 | if (yyn == YYPACT_NINF) |
1559 | goto yydefault; | 1533 | goto yydefault; |
1560 | 1534 | ||
1561 | /* Not known => get a look-ahead token if don't already have one. */ | 1535 | /* Not known => get a lookahead token if don't already have one. */ |
1562 | 1536 | ||
1563 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ | 1537 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1564 | if (yychar == YYEMPTY) | 1538 | if (yychar == YYEMPTY) |
1565 | { | 1539 | { |
1566 | YYDPRINTF ((stderr, "Reading a token: ")); | 1540 | YYDPRINTF ((stderr, "Reading a token: ")); |
@@ -1592,20 +1566,16 @@ yybackup: | |||
1592 | goto yyreduce; | 1566 | goto yyreduce; |
1593 | } | 1567 | } |
1594 | 1568 | ||
1595 | if (yyn == YYFINAL) | ||
1596 | YYACCEPT; | ||
1597 | |||
1598 | /* Count tokens shifted since error; after three, turn off error | 1569 | /* Count tokens shifted since error; after three, turn off error |
1599 | status. */ | 1570 | status. */ |
1600 | if (yyerrstatus) | 1571 | if (yyerrstatus) |
1601 | yyerrstatus--; | 1572 | yyerrstatus--; |
1602 | 1573 | ||
1603 | /* Shift the look-ahead token. */ | 1574 | /* Shift the lookahead token. */ |
1604 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | 1575 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1605 | 1576 | ||
1606 | /* Discard the shifted token unless it is eof. */ | 1577 | /* Discard the shifted token. */ |
1607 | if (yychar != YYEOF) | 1578 | yychar = YYEMPTY; |
1608 | yychar = YYEMPTY; | ||
1609 | 1579 | ||
1610 | yystate = yyn; | 1580 | yystate = yyn; |
1611 | *++yyvsp = yylval; | 1581 | *++yyvsp = yylval; |
@@ -2029,7 +1999,6 @@ yyreduce: | |||
2029 | break; | 1999 | break; |
2030 | 2000 | ||
2031 | 2001 | ||
2032 | /* Line 1267 of yacc.c. */ | ||
2033 | 2002 | ||
2034 | default: break; | 2003 | default: break; |
2035 | } | 2004 | } |
@@ -2041,7 +2010,6 @@ yyreduce: | |||
2041 | 2010 | ||
2042 | *++yyvsp = yyval; | 2011 | *++yyvsp = yyval; |
2043 | 2012 | ||
2044 | |||
2045 | /* Now `shift' the result of the reduction. Determine what state | 2013 | /* Now `shift' the result of the reduction. Determine what state |
2046 | that goes to, based on the state we popped back to and the rule | 2014 | that goes to, based on the state we popped back to and the rule |
2047 | number reduced by. */ | 2015 | number reduced by. */ |
@@ -2106,7 +2074,7 @@ yyerrlab: | |||
2106 | 2074 | ||
2107 | if (yyerrstatus == 3) | 2075 | if (yyerrstatus == 3) |
2108 | { | 2076 | { |
2109 | /* If just tried and failed to reuse look-ahead token after an | 2077 | /* If just tried and failed to reuse lookahead token after an |
2110 | error, discard it. */ | 2078 | error, discard it. */ |
2111 | 2079 | ||
2112 | if (yychar <= YYEOF) | 2080 | if (yychar <= YYEOF) |
@@ -2123,7 +2091,7 @@ yyerrlab: | |||
2123 | } | 2091 | } |
2124 | } | 2092 | } |
2125 | 2093 | ||
2126 | /* Else will try to reuse look-ahead token after shifting the error | 2094 | /* Else will try to reuse lookahead token after shifting the error |
2127 | token. */ | 2095 | token. */ |
2128 | goto yyerrlab1; | 2096 | goto yyerrlab1; |
2129 | 2097 | ||
@@ -2180,9 +2148,6 @@ yyerrlab1: | |||
2180 | YY_STACK_PRINT (yyss, yyssp); | 2148 | YY_STACK_PRINT (yyss, yyssp); |
2181 | } | 2149 | } |
2182 | 2150 | ||
2183 | if (yyn == YYFINAL) | ||
2184 | YYACCEPT; | ||
2185 | |||
2186 | *++yyvsp = yylval; | 2151 | *++yyvsp = yylval; |
2187 | 2152 | ||
2188 | 2153 | ||
@@ -2207,7 +2172,7 @@ yyabortlab: | |||
2207 | yyresult = 1; | 2172 | yyresult = 1; |
2208 | goto yyreturn; | 2173 | goto yyreturn; |
2209 | 2174 | ||
2210 | #ifndef yyoverflow | 2175 | #if !defined(yyoverflow) || YYERROR_VERBOSE |
2211 | /*-------------------------------------------------. | 2176 | /*-------------------------------------------------. |
2212 | | yyexhaustedlab -- memory exhaustion comes here. | | 2177 | | yyexhaustedlab -- memory exhaustion comes here. | |
2213 | `-------------------------------------------------*/ | 2178 | `-------------------------------------------------*/ |
@@ -2218,7 +2183,7 @@ yyexhaustedlab: | |||
2218 | #endif | 2183 | #endif |
2219 | 2184 | ||
2220 | yyreturn: | 2185 | yyreturn: |
2221 | if (yychar != YYEOF && yychar != YYEMPTY) | 2186 | if (yychar != YYEMPTY) |
2222 | yydestruct ("Cleanup: discarding lookahead", | 2187 | yydestruct ("Cleanup: discarding lookahead", |
2223 | yytoken, &yylval); | 2188 | yytoken, &yylval); |
2224 | /* Do not reclaim the symbols of the rule which action triggered | 2189 | /* Do not reclaim the symbols of the rule which action triggered |
@@ -2284,7 +2249,7 @@ void conf_parse(const char *name) | |||
2284 | sym_set_change_count(1); | 2249 | sym_set_change_count(1); |
2285 | } | 2250 | } |
2286 | 2251 | ||
2287 | const char *zconf_tokenname(int token) | 2252 | static const char *zconf_tokenname(int token) |
2288 | { | 2253 | { |
2289 | switch (token) { | 2254 | switch (token) { |
2290 | case T_MENU: return "menu"; | 2255 | case T_MENU: return "menu"; |
@@ -2348,7 +2313,7 @@ static void zconferror(const char *err) | |||
2348 | #endif | 2313 | #endif |
2349 | } | 2314 | } |
2350 | 2315 | ||
2351 | void print_quoted_string(FILE *out, const char *str) | 2316 | static void print_quoted_string(FILE *out, const char *str) |
2352 | { | 2317 | { |
2353 | const char *p; | 2318 | const char *p; |
2354 | int len; | 2319 | int len; |
@@ -2365,7 +2330,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
2365 | putc('"', out); | 2330 | putc('"', out); |
2366 | } | 2331 | } |
2367 | 2332 | ||
2368 | void print_symbol(FILE *out, struct menu *menu) | 2333 | static void print_symbol(FILE *out, struct menu *menu) |
2369 | { | 2334 | { |
2370 | struct symbol *sym = menu->sym; | 2335 | struct symbol *sym = menu->sym; |
2371 | struct property *prop; | 2336 | struct property *prop; |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 9710b82466f2..8c43491f8cc9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -14,8 +14,6 @@ | |||
14 | #define LKC_DIRECT_LINK | 14 | #define LKC_DIRECT_LINK |
15 | #include "lkc.h" | 15 | #include "lkc.h" |
16 | 16 | ||
17 | #include "zconf.hash.c" | ||
18 | |||
19 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) | 17 | #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) |
20 | 18 | ||
21 | #define PRINTD 0x0001 | 19 | #define PRINTD 0x0001 |
@@ -100,6 +98,11 @@ static struct menu *current_menu, *current_entry; | |||
100 | menu_end_menu(); | 98 | menu_end_menu(); |
101 | } if_entry menu_entry choice_entry | 99 | } if_entry menu_entry choice_entry |
102 | 100 | ||
101 | %{ | ||
102 | /* Include zconf.hash.c here so it can see the token constants. */ | ||
103 | #include "zconf.hash.c" | ||
104 | %} | ||
105 | |||
103 | %% | 106 | %% |
104 | input: stmt_list; | 107 | input: stmt_list; |
105 | 108 | ||
@@ -501,7 +504,7 @@ void conf_parse(const char *name) | |||
501 | sym_set_change_count(1); | 504 | sym_set_change_count(1); |
502 | } | 505 | } |
503 | 506 | ||
504 | const char *zconf_tokenname(int token) | 507 | static const char *zconf_tokenname(int token) |
505 | { | 508 | { |
506 | switch (token) { | 509 | switch (token) { |
507 | case T_MENU: return "menu"; | 510 | case T_MENU: return "menu"; |
@@ -565,7 +568,7 @@ static void zconferror(const char *err) | |||
565 | #endif | 568 | #endif |
566 | } | 569 | } |
567 | 570 | ||
568 | void print_quoted_string(FILE *out, const char *str) | 571 | static void print_quoted_string(FILE *out, const char *str) |
569 | { | 572 | { |
570 | const char *p; | 573 | const char *p; |
571 | int len; | 574 | int len; |
@@ -582,7 +585,7 @@ void print_quoted_string(FILE *out, const char *str) | |||
582 | putc('"', out); | 585 | putc('"', out); |
583 | } | 586 | } |
584 | 587 | ||
585 | void print_symbol(FILE *out, struct menu *menu) | 588 | static void print_symbol(FILE *out, struct menu *menu) |
586 | { | 589 | { |
587 | struct symbol *sym = menu->sym; | 590 | struct symbol *sym = menu->sym; |
588 | struct property *prop; | 591 | struct property *prop; |
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c index b8dd693f8790..a4e2b1dac943 100644 --- a/security/integrity/ima/ima_iint.c +++ b/security/integrity/ima/ima_iint.c | |||
@@ -58,11 +58,11 @@ struct ima_iint_cache *ima_iint_insert(struct inode *inode) | |||
58 | 58 | ||
59 | if (!ima_initialized) | 59 | if (!ima_initialized) |
60 | return iint; | 60 | return iint; |
61 | iint = kmem_cache_alloc(iint_cache, GFP_KERNEL); | 61 | iint = kmem_cache_alloc(iint_cache, GFP_NOFS); |
62 | if (!iint) | 62 | if (!iint) |
63 | return iint; | 63 | return iint; |
64 | 64 | ||
65 | rc = radix_tree_preload(GFP_KERNEL); | 65 | rc = radix_tree_preload(GFP_NOFS); |
66 | if (rc < 0) | 66 | if (rc < 0) |
67 | goto out; | 67 | goto out; |
68 | 68 | ||
diff --git a/sound/oss/hex2hex.c b/sound/oss/hex2hex.c index 5460faae98c9..041ef5c52bc2 100644 --- a/sound/oss/hex2hex.c +++ b/sound/oss/hex2hex.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #define MAX_SIZE (256*1024) | 12 | #define MAX_SIZE (256*1024) |
13 | unsigned char buf[MAX_SIZE]; | 13 | unsigned char buf[MAX_SIZE]; |
14 | 14 | ||
15 | int loadhex(FILE *inf, unsigned char *buf) | 15 | static int loadhex(FILE *inf, unsigned char *buf) |
16 | { | 16 | { |
17 | int l=0, c, i; | 17 | int l=0, c, i; |
18 | 18 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 9fb60276f5c9..6afdab09bab7 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -397,6 +397,7 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
397 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 397 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
398 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 398 | { .id = 0x10de0002, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
399 | { .id = 0x10de0003, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 399 | { .id = 0x10de0003, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
400 | { .id = 0x10de0005, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | ||
400 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, | 401 | { .id = 0x10de0006, .name = "MCP78 HDMI", .patch = patch_nvhdmi_8ch }, |
401 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi_8ch }, | 402 | { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi_8ch }, |
402 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | 403 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, |
@@ -406,6 +407,7 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
406 | 407 | ||
407 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); | 408 | MODULE_ALIAS("snd-hda-codec-id:10de0002"); |
408 | MODULE_ALIAS("snd-hda-codec-id:10de0003"); | 409 | MODULE_ALIAS("snd-hda-codec-id:10de0003"); |
410 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | ||
409 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 411 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
410 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 412 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
411 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 413 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index daf6975b0c2e..70583719282b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -8911,10 +8911,11 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | |||
8911 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), | 8911 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), |
8912 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), | 8912 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), |
8913 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), | 8913 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), |
8914 | /* FIXME: HP jack sense seems not working for MBP 5,1, so apparently | 8914 | /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2, |
8915 | * no perfect solution yet | 8915 | * so apparently no perfect solution yet |
8916 | */ | 8916 | */ |
8917 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), | 8917 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), |
8918 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC885_MB5), | ||
8918 | {} /* terminator */ | 8919 | {} /* terminator */ |
8919 | }; | 8920 | }; |
8920 | 8921 | ||
@@ -11461,6 +11462,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
11461 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ | 11462 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ |
11462 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), | 11463 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), |
11463 | SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO), | 11464 | SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO), |
11465 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony VAIO Type G", ALC262_AUTO), | ||
11464 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", | 11466 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", |
11465 | ALC262_SONY_ASSAMD), | 11467 | ALC262_SONY_ASSAMD), |
11466 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 11468 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8eb6508cd991..86de305fc9f2 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1590,6 +1590,8 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | |||
1590 | "Dell Studio 17", STAC_DELL_M6_DMIC), | 1590 | "Dell Studio 17", STAC_DELL_M6_DMIC), |
1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, | 1591 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02be, |
1592 | "Dell Studio 1555", STAC_DELL_M6_DMIC), | 1592 | "Dell Studio 1555", STAC_DELL_M6_DMIC), |
1593 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd, | ||
1594 | "Dell Studio 1557", STAC_DELL_M6_DMIC), | ||
1593 | {} /* terminator */ | 1595 | {} /* terminator */ |
1594 | }; | 1596 | }; |
1595 | 1597 | ||
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index 9da2dae64c5b..d063149e7047 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h | |||
@@ -382,8 +382,8 @@ struct snd_ice1712 { | |||
382 | #ifdef CONFIG_PM | 382 | #ifdef CONFIG_PM |
383 | int (*pm_suspend)(struct snd_ice1712 *); | 383 | int (*pm_suspend)(struct snd_ice1712 *); |
384 | int (*pm_resume)(struct snd_ice1712 *); | 384 | int (*pm_resume)(struct snd_ice1712 *); |
385 | int pm_suspend_enabled:1; | 385 | unsigned int pm_suspend_enabled:1; |
386 | int pm_saved_is_spdif_master:1; | 386 | unsigned int pm_saved_is_spdif_master:1; |
387 | unsigned int pm_saved_spdif_ctrl; | 387 | unsigned int pm_saved_spdif_ctrl; |
388 | unsigned char pm_saved_spdif_cfg; | 388 | unsigned char pm_saved_spdif_cfg; |
389 | unsigned int pm_saved_route; | 389 | unsigned int pm_saved_route; |
diff --git a/sound/pci/ice1712/prodigy_hifi.c b/sound/pci/ice1712/prodigy_hifi.c index c75515f5be6f..6a9fee3ee78f 100644 --- a/sound/pci/ice1712/prodigy_hifi.c +++ b/sound/pci/ice1712/prodigy_hifi.c | |||
@@ -1100,7 +1100,7 @@ static void ak4396_init(struct snd_ice1712 *ice) | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | #ifdef CONFIG_PM | 1102 | #ifdef CONFIG_PM |
1103 | static int __devinit prodigy_hd2_resume(struct snd_ice1712 *ice) | 1103 | static int prodigy_hd2_resume(struct snd_ice1712 *ice) |
1104 | { | 1104 | { |
1105 | /* initialize ak4396 codec and restore previous mixer volumes */ | 1105 | /* initialize ak4396 codec and restore previous mixer volumes */ |
1106 | struct prodigy_hifi_spec *spec = ice->spec; | 1106 | struct prodigy_hifi_spec *spec = ice->spec; |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 0b8dcb5cd729..6b24d8bb02bb 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -265,8 +265,8 @@ static const int bosr_usb_divisor_table[] = { | |||
265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) | 265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) |
266 | static const unsigned short sr_valid_mask[] = { | 266 | static const unsigned short sr_valid_mask[] = { |
267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ | 267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ |
268 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
269 | LOWER_GROUP, /* Usb, bosr - 0*/ | 268 | LOWER_GROUP, /* Usb, bosr - 0*/ |
269 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
270 | UPPER_GROUP, /* Usb, bosr - 1*/ | 270 | UPPER_GROUP, /* Usb, bosr - 1*/ |
271 | }; | 271 | }; |
272 | /* | 272 | /* |
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index 9114c263077b..13aa380de162 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -144,4 +144,4 @@ module_exit(omap3evm_soc_exit); | |||
144 | 144 | ||
145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); | 145 | MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); |
146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); | 146 | MODULE_DESCRIPTION("ALSA SoC OMAP3 EVM"); |
147 | MODULE_LICENSE("GPLv2"); | 147 | MODULE_LICENSE("GPL v2"); |
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index ad219aaf7cb8..0cd06f5dd356 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -134,7 +134,7 @@ static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w, | |||
134 | * |P| <--- TWL4030 <--------- Line In and MICs | 134 | * |P| <--- TWL4030 <--------- Line In and MICs |
135 | */ | 135 | */ |
136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { | 136 | static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = { |
137 | SND_SOC_DAPM_DAC("PCM DAC", "Playback", SND_SOC_NOPM, 0, 0), | 137 | SND_SOC_DAPM_DAC("PCM DAC", "HiFi Playback", SND_SOC_NOPM, 0, 0), |
138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, | 138 | SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM, |
139 | 0, 0, NULL, 0, omap3pandora_hp_event, | 139 | 0, 0, NULL, 0, omap3pandora_hp_event, |
140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), | 140 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD), |
@@ -181,6 +181,7 @@ static int omap3pandora_out_init(struct snd_soc_codec *codec) | |||
181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); | 181 | snd_soc_dapm_nc_pin(codec, "CARKITR"); |
182 | snd_soc_dapm_nc_pin(codec, "HFL"); | 182 | snd_soc_dapm_nc_pin(codec, "HFL"); |
183 | snd_soc_dapm_nc_pin(codec, "HFR"); | 183 | snd_soc_dapm_nc_pin(codec, "HFR"); |
184 | snd_soc_dapm_nc_pin(codec, "VIBRA"); | ||
184 | 185 | ||
185 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, | 186 | ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, |
186 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); | 187 | ARRAY_SIZE(omap3pandora_out_dapm_widgets)); |
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 9efcfd08d747..c998220b99c6 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c | |||
@@ -1071,6 +1071,15 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, unsig | |||
1071 | channels = (ftr[0] - 7) / csize - 1; | 1071 | channels = (ftr[0] - 7) / csize - 1; |
1072 | 1072 | ||
1073 | master_bits = snd_usb_combine_bytes(ftr + 6, csize); | 1073 | master_bits = snd_usb_combine_bytes(ftr + 6, csize); |
1074 | /* master configuration quirks */ | ||
1075 | switch (state->chip->usb_id) { | ||
1076 | case USB_ID(0x08bb, 0x2702): | ||
1077 | snd_printk(KERN_INFO | ||
1078 | "usbmixer: master volume quirk for PCM2702 chip\n"); | ||
1079 | /* disable non-functional volume control */ | ||
1080 | master_bits &= ~(1 << (USB_FEATURE_VOLUME - 1)); | ||
1081 | break; | ||
1082 | } | ||
1074 | if (channels > 0) | 1083 | if (channels > 0) |
1075 | first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize); | 1084 | first_ch_bits = snd_usb_combine_bytes(ftr + 6 + csize, csize); |
1076 | else | 1085 | else |