diff options
159 files changed, 2244 insertions, 1664 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 3be8ab2a886a..82fafe0429fe 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -157,6 +157,9 @@ struct virtqueue | |||
157 | 157 | ||
158 | /* The routine to call when the Guest pings us. */ | 158 | /* The routine to call when the Guest pings us. */ |
159 | void (*handle_output)(int fd, struct virtqueue *me); | 159 | void (*handle_output)(int fd, struct virtqueue *me); |
160 | |||
161 | /* Outstanding buffers */ | ||
162 | unsigned int inflight; | ||
160 | }; | 163 | }; |
161 | 164 | ||
162 | /* Remember the arguments to the program so we can "reboot" */ | 165 | /* Remember the arguments to the program so we can "reboot" */ |
@@ -702,6 +705,7 @@ static unsigned get_vq_desc(struct virtqueue *vq, | |||
702 | errx(1, "Looped descriptor"); | 705 | errx(1, "Looped descriptor"); |
703 | } while ((i = next_desc(vq, i)) != vq->vring.num); | 706 | } while ((i = next_desc(vq, i)) != vq->vring.num); |
704 | 707 | ||
708 | vq->inflight++; | ||
705 | return head; | 709 | return head; |
706 | } | 710 | } |
707 | 711 | ||
@@ -719,6 +723,7 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len) | |||
719 | /* Make sure buffer is written before we update index. */ | 723 | /* Make sure buffer is written before we update index. */ |
720 | wmb(); | 724 | wmb(); |
721 | vq->vring.used->idx++; | 725 | vq->vring.used->idx++; |
726 | vq->inflight--; | ||
722 | } | 727 | } |
723 | 728 | ||
724 | /* This actually sends the interrupt for this virtqueue */ | 729 | /* This actually sends the interrupt for this virtqueue */ |
@@ -726,8 +731,9 @@ static void trigger_irq(int fd, struct virtqueue *vq) | |||
726 | { | 731 | { |
727 | unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; | 732 | unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; |
728 | 733 | ||
729 | /* If they don't want an interrupt, don't send one. */ | 734 | /* If they don't want an interrupt, don't send one, unless empty. */ |
730 | if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) | 735 | if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) |
736 | && vq->inflight) | ||
731 | return; | 737 | return; |
732 | 738 | ||
733 | /* Send the Guest an interrupt tell them we used something up. */ | 739 | /* Send the Guest an interrupt tell them we used something up. */ |
@@ -1107,6 +1113,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1107 | vq->next = NULL; | 1113 | vq->next = NULL; |
1108 | vq->last_avail_idx = 0; | 1114 | vq->last_avail_idx = 0; |
1109 | vq->dev = dev; | 1115 | vq->dev = dev; |
1116 | vq->inflight = 0; | ||
1110 | 1117 | ||
1111 | /* Initialize the configuration. */ | 1118 | /* Initialize the configuration. */ |
1112 | vq->config.num = num_descs; | 1119 | vq->config.num = num_descs; |
@@ -1368,6 +1375,7 @@ static void setup_tun_net(const char *arg) | |||
1368 | 1375 | ||
1369 | /* Tell Guest what MAC address to use. */ | 1376 | /* Tell Guest what MAC address to use. */ |
1370 | add_feature(dev, VIRTIO_NET_F_MAC); | 1377 | add_feature(dev, VIRTIO_NET_F_MAC); |
1378 | add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); | ||
1371 | set_config(dev, sizeof(conf), &conf); | 1379 | set_config(dev, sizeof(conf), &conf); |
1372 | 1380 | ||
1373 | /* We don't need the socket any more; setup is done. */ | 1381 | /* We don't need the socket any more; setup is done. */ |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index e698554895a7..3a3e9615b002 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c | |||
@@ -10,8 +10,8 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/io.h> | ||
13 | 14 | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/blackfin.h> | 15 | #include <asm/blackfin.h> |
16 | #include <asm/gptimers.h> | 16 | #include <asm/gptimers.h> |
17 | 17 | ||
diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S index 3daf96035bf6..4685b7aa0080 100644 --- a/arch/blackfin/lib/outs.S +++ b/arch/blackfin/lib/outs.S | |||
@@ -76,4 +76,4 @@ ENTRY(_outsw_8) | |||
76 | R0 = R0 + R1; | 76 | R0 = R0 + R1; |
77 | .Lword8_loop_e: W[P0] = R0; | 77 | .Lword8_loop_e: W[P0] = R0; |
78 | RTS; | 78 | RTS; |
79 | ENDPROC(_outsw) | 79 | ENDPROC(_outsw_8) |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index bb6d58c931de..fa4f4e833e84 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -647,10 +647,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
647 | { | 647 | { |
648 | .modalias = "ad7877", | 648 | .modalias = "ad7877", |
649 | .platform_data = &bfin_ad7877_ts_info, | 649 | .platform_data = &bfin_ad7877_ts_info, |
650 | .irq = IRQ_PF6, | 650 | .irq = IRQ_PF8, |
651 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 651 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
652 | .bus_num = 0, | 652 | .bus_num = 0, |
653 | .chip_select = 1, | 653 | .chip_select = 2, |
654 | .controller_data = &spi_ad7877_chip_info, | 654 | .controller_data = &spi_ad7877_chip_info, |
655 | }, | 655 | }, |
656 | #endif | 656 | #endif |
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile index 87e450f29e37..c94f7a5b8211 100644 --- a/arch/blackfin/mach-bf537/boards/Makefile +++ b/arch/blackfin/mach-bf537/boards/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o | 5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o |
6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o | 6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o |
7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o | 7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o |
8 | obj-$(CONFIG_PNAV10) += pnav10.o | 8 | obj-$(CONFIG_PNAV10) += pnav10.o |
9 | obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o | 9 | obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o |
diff --git a/arch/blackfin/mach-bf537/boards/led.S b/arch/blackfin/mach-bf537/boards/led.S deleted file mode 100644 index 4e9ea4283e5f..000000000000 --- a/arch/blackfin/mach-bf537/boards/led.S +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | /**************************************************** | ||
2 | * LED1 ---- PF6 LED2 ---- PF7 * | ||
3 | * LED3 ---- PF8 LED4 ---- PF9 * | ||
4 | * LED5 ---- PF10 LED6 ---- PF11 * | ||
5 | ****************************************************/ | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <asm/blackfin.h> | ||
9 | |||
10 | /* All functions in this file save the registers they uses. | ||
11 | So there is no need to save any registers before calling them. */ | ||
12 | |||
13 | .text; | ||
14 | |||
15 | /* Initialize LEDs. */ | ||
16 | |||
17 | ENTRY(_led_init) | ||
18 | LINK 12; | ||
19 | [--SP] = P0; | ||
20 | [--SP] = R0; | ||
21 | [--SP] = R1; | ||
22 | [--SP] = R2; | ||
23 | R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z); | ||
24 | R2 = ~R1; | ||
25 | |||
26 | P0.H = hi(PORTF_FER); | ||
27 | P0.L = lo(PORTF_FER); | ||
28 | R0 = W[P0](Z); | ||
29 | SSYNC; | ||
30 | R0 = R0 & R2; | ||
31 | W[P0] = R0.L; | ||
32 | SSYNC; | ||
33 | |||
34 | P0.H = hi(PORTFIO_DIR); | ||
35 | P0.L = lo(PORTFIO_DIR); | ||
36 | R0 = W[P0](Z); | ||
37 | SSYNC; | ||
38 | R0 = R0 | R1; | ||
39 | W[P0] = R0.L; | ||
40 | SSYNC; | ||
41 | |||
42 | P0.H = hi(PORTFIO_INEN); | ||
43 | P0.L = lo(PORTFIO_INEN); | ||
44 | R0 = W[P0](Z); | ||
45 | SSYNC; | ||
46 | R0 = R0 & R2; | ||
47 | W[P0] = R0.L; | ||
48 | SSYNC; | ||
49 | |||
50 | R2 = [SP++]; | ||
51 | R1 = [SP++]; | ||
52 | R0 = [SP++]; | ||
53 | P0 = [SP++]; | ||
54 | UNLINK; | ||
55 | RTS; | ||
56 | .size _led_init, .-_led_init | ||
57 | |||
58 | /* Set one LED on. Leave other LEDs unchanged. | ||
59 | It expects the LED number passed through R0. */ | ||
60 | |||
61 | ENTRY(_led_on) | ||
62 | LINK 12; | ||
63 | [--SP] = P0; | ||
64 | [--SP] = R1; | ||
65 | CALL _led_init; | ||
66 | R1 = 1; | ||
67 | R0 += 5; | ||
68 | R1 <<= R0; | ||
69 | P0.H = hi(PORTFIO); | ||
70 | P0.L = lo(PORTFIO); | ||
71 | R0 = W[P0](Z); | ||
72 | SSYNC; | ||
73 | R0 = R0 | R1; | ||
74 | W[P0] = R0.L; | ||
75 | SSYNC; | ||
76 | R1 = [SP++]; | ||
77 | P0 = [SP++]; | ||
78 | UNLINK; | ||
79 | RTS; | ||
80 | .size _led_on, .-_led_on | ||
81 | |||
82 | /* Set one LED off. Leave other LEDs unchanged. */ | ||
83 | |||
84 | ENTRY(_led_off) | ||
85 | LINK 12; | ||
86 | [--SP] = P0; | ||
87 | [--SP] = R1; | ||
88 | CALL _led_init; | ||
89 | R1 = 1; | ||
90 | R0 += 5; | ||
91 | R1 <<= R0; | ||
92 | R1 = ~R1; | ||
93 | P0.H = hi(PORTFIO); | ||
94 | P0.L = lo(PORTFIO); | ||
95 | R0 = W[P0](Z); | ||
96 | SSYNC; | ||
97 | R0 = R0 & R1; | ||
98 | W[P0] = R0.L; | ||
99 | SSYNC; | ||
100 | R1 = [SP++]; | ||
101 | P0 = [SP++]; | ||
102 | UNLINK; | ||
103 | RTS; | ||
104 | .size _led_off, .-_led_off | ||
105 | |||
106 | /* Toggle one LED. Leave other LEDs unchanged. */ | ||
107 | |||
108 | ENTRY(_led_toggle) | ||
109 | LINK 12; | ||
110 | [--SP] = P0; | ||
111 | [--SP] = R1; | ||
112 | CALL _led_init; | ||
113 | R1 = 1; | ||
114 | R0 += 5; | ||
115 | R1 <<= R0; | ||
116 | P0.H = hi(PORTFIO); | ||
117 | P0.L = lo(PORTFIO); | ||
118 | R0 = W[P0](Z); | ||
119 | SSYNC; | ||
120 | R0 = R0 ^ R1; | ||
121 | W[P0] = R0.L; | ||
122 | SSYNC; | ||
123 | R1 = [SP++]; | ||
124 | P0 = [SP++]; | ||
125 | UNLINK; | ||
126 | RTS; | ||
127 | .size _led_toggle, .-_led_toggle | ||
128 | |||
129 | /* Display the number using LEDs in binary format. */ | ||
130 | |||
131 | ENTRY(_led_disp_num) | ||
132 | LINK 12; | ||
133 | [--SP] = P0; | ||
134 | [--SP] = R1; | ||
135 | [--SP] = R2; | ||
136 | CALL _led_init; | ||
137 | R1 = 0x3f(X); | ||
138 | R0 = R0 & R1; | ||
139 | R2 = 6(X); | ||
140 | R0 <<= R2; | ||
141 | R1 <<= R2; | ||
142 | P0.H = hi(PORTFIO); | ||
143 | P0.L = lo(PORTFIO); | ||
144 | R2 = W[P0](Z); | ||
145 | SSYNC; | ||
146 | R1 = ~R1; | ||
147 | R2 = R2 & R1; | ||
148 | R2 = R2 | R0; | ||
149 | W[P0] = R2.L; | ||
150 | SSYNC; | ||
151 | R2 = [SP++]; | ||
152 | R1 = [SP++]; | ||
153 | P0 = [SP++]; | ||
154 | UNLINK; | ||
155 | RTS; | ||
156 | .size _led_disp_num, .-_led_disp_num | ||
157 | |||
158 | /* Toggle the number using LEDs in binary format. */ | ||
159 | |||
160 | ENTRY(_led_toggle_num) | ||
161 | LINK 12; | ||
162 | [--SP] = P0; | ||
163 | [--SP] = R1; | ||
164 | [--SP] = R2; | ||
165 | CALL _led_init; | ||
166 | R1 = 0x3f(X); | ||
167 | R0 = R0 & R1; | ||
168 | R1 = 6(X); | ||
169 | R0 <<= R1; | ||
170 | P0.H = hi(PORTFIO); | ||
171 | P0.L = lo(PORTFIO); | ||
172 | R1 = W[P0](Z); | ||
173 | SSYNC; | ||
174 | R1 = R1 ^ R0; | ||
175 | W[P0] = R1.L; | ||
176 | SSYNC; | ||
177 | R2 = [SP++]; | ||
178 | R1 = [SP++]; | ||
179 | P0 = [SP++]; | ||
180 | UNLINK; | ||
181 | RTS; | ||
182 | .size _led_toggle_num, .-_led_toggle_num | ||
183 | |||
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile index eed161dd7845..319ef54c4221 100644 --- a/arch/blackfin/mach-bf548/boards/Makefile +++ b/arch/blackfin/mach-bf548/boards/Makefile | |||
@@ -2,5 +2,5 @@ | |||
2 | # arch/blackfin/mach-bf548/boards/Makefile | 2 | # arch/blackfin/mach-bf548/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o | 5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o |
6 | obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o | 6 | obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o |
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index 3b74f96d3590..4f4ae8787edf 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { | |||
684 | 684 | ||
685 | static int __init cm_bf548_init(void) | 685 | static int __init cm_bf548_init(void) |
686 | { | 686 | { |
687 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 687 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
688 | platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); | 688 | platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); |
689 | 689 | ||
690 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 690 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S deleted file mode 100644 index f47daf3770d0..000000000000 --- a/arch/blackfin/mach-bf548/boards/led.S +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /**************************************************** | ||
2 | * LED1 ---- PG6 LED2 ---- PG7 * | ||
3 | * LED3 ---- PG8 LED4 ---- PG9 * | ||
4 | * LED5 ---- PG10 LED6 ---- PG11 * | ||
5 | ****************************************************/ | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <asm/blackfin.h> | ||
9 | |||
10 | /* All functions in this file save the registers they uses. | ||
11 | So there is no need to save any registers before calling them. */ | ||
12 | |||
13 | .text; | ||
14 | |||
15 | /* Initialize LEDs. */ | ||
16 | |||
17 | ENTRY(_led_init) | ||
18 | LINK 0; | ||
19 | [--SP] = P0; | ||
20 | [--SP] = R0; | ||
21 | [--SP] = R1; | ||
22 | [--SP] = R2; | ||
23 | R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z); | ||
24 | R2 = ~R1; | ||
25 | |||
26 | P0.H = hi(PORTG_FER); | ||
27 | P0.L = lo(PORTG_FER); | ||
28 | R0 = W[P0](Z); | ||
29 | SSYNC; | ||
30 | R0 = R0 & R2; | ||
31 | W[P0] = R0.L; | ||
32 | SSYNC; | ||
33 | |||
34 | P0.H = hi(PORTG_DIR_SET); | ||
35 | P0.L = lo(PORTG_DIR_SET); | ||
36 | W[P0] = R1.L; | ||
37 | SSYNC; | ||
38 | |||
39 | P0.H = hi(PORTG_INEN); | ||
40 | P0.L = lo(PORTG_INEN); | ||
41 | R0 = W[P0](Z); | ||
42 | SSYNC; | ||
43 | R0 = R0 & R2; | ||
44 | W[P0] = R0.L; | ||
45 | SSYNC; | ||
46 | |||
47 | R2 = [SP++]; | ||
48 | R1 = [SP++]; | ||
49 | R0 = [SP++]; | ||
50 | P0 = [SP++]; | ||
51 | RTS; | ||
52 | .size _led_init, .-_led_init | ||
53 | |||
54 | /* Set one LED on. Leave other LEDs unchanged. | ||
55 | It expects the LED number passed through R0. */ | ||
56 | |||
57 | ENTRY(_led_on) | ||
58 | LINK 0; | ||
59 | [--SP] = P0; | ||
60 | [--SP] = R1; | ||
61 | CALL _led_init; | ||
62 | R1 = 1; | ||
63 | R0 += 5; | ||
64 | R1 <<= R0; | ||
65 | P0.H = hi(PORTG_SET); | ||
66 | P0.L = lo(PORTG_SET); | ||
67 | W[P0] = R1.L; | ||
68 | SSYNC; | ||
69 | R1 = [SP++]; | ||
70 | P0 = [SP++]; | ||
71 | UNLINK; | ||
72 | RTS; | ||
73 | .size _led_on, .-_led_on | ||
74 | |||
75 | /* Set one LED off. Leave other LEDs unchanged. */ | ||
76 | |||
77 | ENTRY(_led_off) | ||
78 | LINK 0; | ||
79 | [--SP] = P0; | ||
80 | [--SP] = R1; | ||
81 | CALL _led_init; | ||
82 | R1 = 1; | ||
83 | R0 += 5; | ||
84 | R1 <<= R0; | ||
85 | P0.H = hi(PORTG_CLEAR); | ||
86 | P0.L = lo(PORTG_CLEAR); | ||
87 | W[P0] = R1.L; | ||
88 | SSYNC; | ||
89 | R1 = [SP++]; | ||
90 | P0 = [SP++]; | ||
91 | UNLINK; | ||
92 | RTS; | ||
93 | .size _led_off, .-_led_off | ||
94 | |||
95 | /* Toggle one LED. Leave other LEDs unchanged. */ | ||
96 | |||
97 | ENTRY(_led_toggle) | ||
98 | LINK 0; | ||
99 | [--SP] = P0; | ||
100 | [--SP] = R1; | ||
101 | CALL _led_init; | ||
102 | R1 = 1; | ||
103 | R0 += 5; | ||
104 | R1 <<= R0; | ||
105 | P0.H = hi(PORTG); | ||
106 | P0.L = lo(PORTG); | ||
107 | R0 = W[P0](Z); | ||
108 | SSYNC; | ||
109 | R0 = R0 ^ R1; | ||
110 | W[P0] = R0.L; | ||
111 | SSYNC; | ||
112 | R1 = [SP++]; | ||
113 | P0 = [SP++]; | ||
114 | UNLINK; | ||
115 | RTS; | ||
116 | .size _led_toggle, .-_led_toggle | ||
117 | |||
118 | /* Display the number using LEDs in binary format. */ | ||
119 | |||
120 | ENTRY(_led_disp_num) | ||
121 | LINK 0; | ||
122 | [--SP] = P0; | ||
123 | [--SP] = R1; | ||
124 | [--SP] = R2; | ||
125 | CALL _led_init; | ||
126 | R1 = 0x3f(X); | ||
127 | R0 = R0 & R1; | ||
128 | R2 = 6(X); | ||
129 | R0 <<= R2; | ||
130 | R1 <<= R2; | ||
131 | P0.H = hi(PORTG); | ||
132 | P0.L = lo(PORTG); | ||
133 | R2 = W[P0](Z); | ||
134 | SSYNC; | ||
135 | R1 = ~R1; | ||
136 | R2 = R2 & R1; | ||
137 | R2 = R2 | R0; | ||
138 | W[P0] = R2.L; | ||
139 | SSYNC; | ||
140 | R2 = [SP++]; | ||
141 | R1 = [SP++]; | ||
142 | P0 = [SP++]; | ||
143 | UNLINK; | ||
144 | RTS; | ||
145 | .size _led_disp_num, .-_led_disp_num | ||
146 | |||
147 | /* Toggle the number using LEDs in binary format. */ | ||
148 | |||
149 | ENTRY(_led_toggle_num) | ||
150 | LINK 0; | ||
151 | [--SP] = P0; | ||
152 | [--SP] = R1; | ||
153 | [--SP] = R2; | ||
154 | CALL _led_init; | ||
155 | R1 = 0x3f(X); | ||
156 | R0 = R0 & R1; | ||
157 | R1 = 6(X); | ||
158 | R0 <<= R1; | ||
159 | P0.H = hi(PORTG); | ||
160 | P0.L = lo(PORTG); | ||
161 | R1 = W[P0](Z); | ||
162 | SSYNC; | ||
163 | R1 = R1 ^ R0; | ||
164 | W[P0] = R1.L; | ||
165 | SSYNC; | ||
166 | R2 = [SP++]; | ||
167 | R1 = [SP++]; | ||
168 | P0 = [SP++]; | ||
169 | UNLINK; | ||
170 | RTS; | ||
171 | .size _led_toggle_num, .-_led_toggle_num | ||
172 | |||
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 6678c49daba3..80b44ea052d7 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -1076,48 +1076,6 @@ END(ia64_syscall_setup) | |||
1076 | DBG_FAULT(15) | 1076 | DBG_FAULT(15) |
1077 | FAULT(15) | 1077 | FAULT(15) |
1078 | 1078 | ||
1079 | /* | ||
1080 | * Squatting in this space ... | ||
1081 | * | ||
1082 | * This special case dispatcher for illegal operation faults allows preserved | ||
1083 | * registers to be modified through a callback function (asm only) that is handed | ||
1084 | * back from the fault handler in r8. Up to three arguments can be passed to the | ||
1085 | * callback function by returning an aggregate with the callback as its first | ||
1086 | * element, followed by the arguments. | ||
1087 | */ | ||
1088 | ENTRY(dispatch_illegal_op_fault) | ||
1089 | .prologue | ||
1090 | .body | ||
1091 | SAVE_MIN_WITH_COVER | ||
1092 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1093 | ;; | ||
1094 | srlz.i // guarantee that interruption collection is on | ||
1095 | ;; | ||
1096 | (p15) ssm psr.i // restore psr.i | ||
1097 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1098 | ;; | ||
1099 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group | ||
1100 | mov out0=ar.ec | ||
1101 | ;; | ||
1102 | SAVE_REST | ||
1103 | PT_REGS_UNWIND_INFO(0) | ||
1104 | ;; | ||
1105 | br.call.sptk.many rp=ia64_illegal_op_fault | ||
1106 | .ret0: ;; | ||
1107 | alloc r14=ar.pfs,0,0,3,0 // must be first in insn group | ||
1108 | mov out0=r9 | ||
1109 | mov out1=r10 | ||
1110 | mov out2=r11 | ||
1111 | movl r15=ia64_leave_kernel | ||
1112 | ;; | ||
1113 | mov rp=r15 | ||
1114 | mov b6=r8 | ||
1115 | ;; | ||
1116 | cmp.ne p6,p0=0,r8 | ||
1117 | (p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel | ||
1118 | br.sptk.many ia64_leave_kernel | ||
1119 | END(dispatch_illegal_op_fault) | ||
1120 | |||
1121 | .org ia64_ivt+0x4000 | 1079 | .org ia64_ivt+0x4000 |
1122 | ///////////////////////////////////////////////////////////////////////////////////////// | 1080 | ///////////////////////////////////////////////////////////////////////////////////////// |
1123 | // 0x4000 Entry 16 (size 64 bundles) Reserved | 1081 | // 0x4000 Entry 16 (size 64 bundles) Reserved |
@@ -1715,6 +1673,48 @@ END(ia32_interrupt) | |||
1715 | DBG_FAULT(67) | 1673 | DBG_FAULT(67) |
1716 | FAULT(67) | 1674 | FAULT(67) |
1717 | 1675 | ||
1676 | /* | ||
1677 | * Squatting in this space ... | ||
1678 | * | ||
1679 | * This special case dispatcher for illegal operation faults allows preserved | ||
1680 | * registers to be modified through a callback function (asm only) that is handed | ||
1681 | * back from the fault handler in r8. Up to three arguments can be passed to the | ||
1682 | * callback function by returning an aggregate with the callback as its first | ||
1683 | * element, followed by the arguments. | ||
1684 | */ | ||
1685 | ENTRY(dispatch_illegal_op_fault) | ||
1686 | .prologue | ||
1687 | .body | ||
1688 | SAVE_MIN_WITH_COVER | ||
1689 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1690 | ;; | ||
1691 | srlz.i // guarantee that interruption collection is on | ||
1692 | ;; | ||
1693 | (p15) ssm psr.i // restore psr.i | ||
1694 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1695 | ;; | ||
1696 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group | ||
1697 | mov out0=ar.ec | ||
1698 | ;; | ||
1699 | SAVE_REST | ||
1700 | PT_REGS_UNWIND_INFO(0) | ||
1701 | ;; | ||
1702 | br.call.sptk.many rp=ia64_illegal_op_fault | ||
1703 | .ret0: ;; | ||
1704 | alloc r14=ar.pfs,0,0,3,0 // must be first in insn group | ||
1705 | mov out0=r9 | ||
1706 | mov out1=r10 | ||
1707 | mov out2=r11 | ||
1708 | movl r15=ia64_leave_kernel | ||
1709 | ;; | ||
1710 | mov rp=r15 | ||
1711 | mov b6=r8 | ||
1712 | ;; | ||
1713 | cmp.ne p6,p0=0,r8 | ||
1714 | (p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel | ||
1715 | br.sptk.many ia64_leave_kernel | ||
1716 | END(dispatch_illegal_op_fault) | ||
1717 | |||
1718 | #ifdef CONFIG_IA32_SUPPORT | 1718 | #ifdef CONFIG_IA32_SUPPORT |
1719 | 1719 | ||
1720 | /* | 1720 | /* |
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index 7c548ac52bbc..74b6d670aaef 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h | |||
@@ -15,6 +15,9 @@ | |||
15 | #define ACCOUNT_SYS_ENTER | 15 | #define ACCOUNT_SYS_ENTER |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | .section ".data.patch.rse", "a" | ||
19 | .previous | ||
20 | |||
18 | /* | 21 | /* |
19 | * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves | 22 | * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves |
20 | * the minimum state necessary that allows us to turn psr.ic back | 23 | * the minimum state necessary that allows us to turn psr.ic back |
@@ -40,7 +43,7 @@ | |||
40 | * Note that psr.ic is NOT turned on by this macro. This is so that | 43 | * Note that psr.ic is NOT turned on by this macro. This is so that |
41 | * we can pass interruption state as arguments to a handler. | 44 | * we can pass interruption state as arguments to a handler. |
42 | */ | 45 | */ |
43 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ | 46 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \ |
44 | mov r16=IA64_KR(CURRENT); /* M */ \ | 47 | mov r16=IA64_KR(CURRENT); /* M */ \ |
45 | mov r27=ar.rsc; /* M */ \ | 48 | mov r27=ar.rsc; /* M */ \ |
46 | mov r20=r1; /* A */ \ | 49 | mov r20=r1; /* A */ \ |
@@ -87,6 +90,7 @@ | |||
87 | tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ | 90 | tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ |
88 | mov r29=b0 \ | 91 | mov r29=b0 \ |
89 | ;; \ | 92 | ;; \ |
93 | WORKAROUND; \ | ||
90 | adds r16=PT(R8),r1; /* initialize first base pointer */ \ | 94 | adds r16=PT(R8),r1; /* initialize first base pointer */ \ |
91 | adds r17=PT(R9),r1; /* initialize second base pointer */ \ | 95 | adds r17=PT(R9),r1; /* initialize second base pointer */ \ |
92 | (pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ | 96 | (pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ |
@@ -206,6 +210,40 @@ | |||
206 | st8 [r25]=r10; /* ar.ssd */ \ | 210 | st8 [r25]=r10; /* ar.ssd */ \ |
207 | ;; | 211 | ;; |
208 | 212 | ||
209 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) | 213 | #define RSE_WORKAROUND \ |
210 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) | 214 | (pUStk) extr.u r17=r18,3,6; \ |
211 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) | 215 | (pUStk) sub r16=r18,r22; \ |
216 | [1:](pKStk) br.cond.sptk.many 1f; \ | ||
217 | .xdata4 ".data.patch.rse",1b-. \ | ||
218 | ;; \ | ||
219 | cmp.ge p6,p7 = 33,r17; \ | ||
220 | ;; \ | ||
221 | (p6) mov r17=0x310; \ | ||
222 | (p7) mov r17=0x308; \ | ||
223 | ;; \ | ||
224 | cmp.leu p1,p0=r16,r17; \ | ||
225 | (p1) br.cond.sptk.many 1f; \ | ||
226 | dep.z r17=r26,0,62; \ | ||
227 | movl r16=2f; \ | ||
228 | ;; \ | ||
229 | mov ar.pfs=r17; \ | ||
230 | dep r27=r0,r27,16,14; \ | ||
231 | mov b0=r16; \ | ||
232 | ;; \ | ||
233 | br.ret.sptk b0; \ | ||
234 | ;; \ | ||
235 | 2: \ | ||
236 | mov ar.rsc=r0 \ | ||
237 | ;; \ | ||
238 | flushrs; \ | ||
239 | ;; \ | ||
240 | mov ar.bspstore=r22 \ | ||
241 | ;; \ | ||
242 | mov r18=ar.bsp; \ | ||
243 | ;; \ | ||
244 | 1: \ | ||
245 | .pred.rel "mutex", pKStk, pUStk | ||
246 | |||
247 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND) | ||
248 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) | ||
249 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) | ||
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index e0dca8743dbb..b83b2c516008 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c | |||
@@ -115,6 +115,29 @@ ia64_patch_vtop (unsigned long start, unsigned long end) | |||
115 | ia64_srlz_i(); | 115 | ia64_srlz_i(); |
116 | } | 116 | } |
117 | 117 | ||
118 | /* | ||
119 | * Disable the RSE workaround by turning the conditional branch | ||
120 | * that we tagged in each place the workaround was used into an | ||
121 | * unconditional branch. | ||
122 | */ | ||
123 | void __init | ||
124 | ia64_patch_rse (unsigned long start, unsigned long end) | ||
125 | { | ||
126 | s32 *offp = (s32 *) start; | ||
127 | u64 ip, *b; | ||
128 | |||
129 | while (offp < (s32 *) end) { | ||
130 | ip = (u64) offp + *offp; | ||
131 | |||
132 | b = (u64 *)(ip & -16); | ||
133 | b[1] &= ~0xf800000L; | ||
134 | ia64_fc((void *) ip); | ||
135 | ++offp; | ||
136 | } | ||
137 | ia64_sync_i(); | ||
138 | ia64_srlz_i(); | ||
139 | } | ||
140 | |||
118 | void __init | 141 | void __init |
119 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) | 142 | ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) |
120 | { | 143 | { |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index e9596cd0cdab..f48a809c686d 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -560,6 +560,17 @@ setup_arch (char **cmdline_p) | |||
560 | /* process SAL system table: */ | 560 | /* process SAL system table: */ |
561 | ia64_sal_init(__va(efi.sal_systab)); | 561 | ia64_sal_init(__va(efi.sal_systab)); |
562 | 562 | ||
563 | #ifdef CONFIG_ITANIUM | ||
564 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
565 | #else | ||
566 | { | ||
567 | u64 num_phys_stacked; | ||
568 | |||
569 | if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96) | ||
570 | ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); | ||
571 | } | ||
572 | #endif | ||
573 | |||
563 | #ifdef CONFIG_SMP | 574 | #ifdef CONFIG_SMP |
564 | cpu_physical_id(0) = hard_smp_processor_id(); | 575 | cpu_physical_id(0) = hard_smp_processor_id(); |
565 | #endif | 576 | #endif |
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 80622acc95de..5929ab10a289 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -156,6 +156,13 @@ SECTIONS | |||
156 | __end___vtop_patchlist = .; | 156 | __end___vtop_patchlist = .; |
157 | } | 157 | } |
158 | 158 | ||
159 | .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET) | ||
160 | { | ||
161 | __start___rse_patchlist = .; | ||
162 | *(.data.patch.rse) | ||
163 | __end___rse_patchlist = .; | ||
164 | } | ||
165 | |||
159 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) | 166 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) |
160 | { | 167 | { |
161 | __start___mckinley_e9_bundles = .; | 168 | __start___mckinley_e9_bundles = .; |
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 08a780d89807..fa9b6bbeb5af 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts | |||
@@ -251,14 +251,14 @@ | |||
251 | dma@c300 { | 251 | dma@c300 { |
252 | #address-cells = <1>; | 252 | #address-cells = <1>; |
253 | #size-cells = <1>; | 253 | #size-cells = <1>; |
254 | compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma"; | 254 | compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma"; |
255 | cell-index = <1>; | 255 | cell-index = <1>; |
256 | reg = <0xc300 0x4>; /* DMA general status register */ | 256 | reg = <0xc300 0x4>; /* DMA general status register */ |
257 | ranges = <0x0 0xc100 0x200>; | 257 | ranges = <0x0 0xc100 0x200>; |
258 | 258 | ||
259 | dma-channel@0 { | 259 | dma-channel@0 { |
260 | compatible = "fsl,mpc8610-dma-channel", | 260 | compatible = "fsl,mpc8610-dma-channel", |
261 | "fsl,mpc8540-dma-channel"; | 261 | "fsl,eloplus-dma-channel"; |
262 | cell-index = <0>; | 262 | cell-index = <0>; |
263 | reg = <0x0 0x80>; | 263 | reg = <0x0 0x80>; |
264 | interrupt-parent = <&mpic>; | 264 | interrupt-parent = <&mpic>; |
@@ -266,7 +266,7 @@ | |||
266 | }; | 266 | }; |
267 | dma-channel@1 { | 267 | dma-channel@1 { |
268 | compatible = "fsl,mpc8610-dma-channel", | 268 | compatible = "fsl,mpc8610-dma-channel", |
269 | "fsl,mpc8540-dma-channel"; | 269 | "fsl,eloplus-dma-channel"; |
270 | cell-index = <1>; | 270 | cell-index = <1>; |
271 | reg = <0x80 0x80>; | 271 | reg = <0x80 0x80>; |
272 | interrupt-parent = <&mpic>; | 272 | interrupt-parent = <&mpic>; |
@@ -274,7 +274,7 @@ | |||
274 | }; | 274 | }; |
275 | dma-channel@2 { | 275 | dma-channel@2 { |
276 | compatible = "fsl,mpc8610-dma-channel", | 276 | compatible = "fsl,mpc8610-dma-channel", |
277 | "fsl,mpc8540-dma-channel"; | 277 | "fsl,eloplus-dma-channel"; |
278 | cell-index = <2>; | 278 | cell-index = <2>; |
279 | reg = <0x100 0x80>; | 279 | reg = <0x100 0x80>; |
280 | interrupt-parent = <&mpic>; | 280 | interrupt-parent = <&mpic>; |
@@ -282,7 +282,7 @@ | |||
282 | }; | 282 | }; |
283 | dma-channel@3 { | 283 | dma-channel@3 { |
284 | compatible = "fsl,mpc8610-dma-channel", | 284 | compatible = "fsl,mpc8610-dma-channel", |
285 | "fsl,mpc8540-dma-channel"; | 285 | "fsl,eloplus-dma-channel"; |
286 | cell-index = <3>; | 286 | cell-index = <3>; |
287 | reg = <0x180 0x80>; | 287 | reg = <0x180 0x80>; |
288 | interrupt-parent = <&mpic>; | 288 | interrupt-parent = <&mpic>; |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index 09f306248f2e..199e5f59d7a6 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25-rc6 | 3 | # Linux kernel version: 2.6.26-rc3 |
4 | # Tue Mar 25 10:25:48 2008 | 4 | # Tue May 27 16:08:06 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -29,6 +29,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y | |||
29 | CONFIG_GENERIC_HARDIRQS=y | 29 | CONFIG_GENERIC_HARDIRQS=y |
30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 30 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
31 | CONFIG_IRQ_PER_CPU=y | 31 | CONFIG_IRQ_PER_CPU=y |
32 | CONFIG_STACKTRACE_SUPPORT=y | ||
33 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
34 | CONFIG_LOCKDEP_SUPPORT=y | ||
32 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 35 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
33 | CONFIG_ARCH_HAS_ILOG2_U32=y | 36 | CONFIG_ARCH_HAS_ILOG2_U32=y |
34 | CONFIG_ARCH_HAS_ILOG2_U64=y | 37 | CONFIG_ARCH_HAS_ILOG2_U64=y |
@@ -87,6 +90,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
87 | CONFIG_SYSCTL=y | 90 | CONFIG_SYSCTL=y |
88 | # CONFIG_EMBEDDED is not set | 91 | # CONFIG_EMBEDDED is not set |
89 | CONFIG_SYSCTL_SYSCALL=y | 92 | CONFIG_SYSCTL_SYSCALL=y |
93 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
90 | CONFIG_KALLSYMS=y | 94 | CONFIG_KALLSYMS=y |
91 | # CONFIG_KALLSYMS_ALL is not set | 95 | # CONFIG_KALLSYMS_ALL is not set |
92 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 96 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -115,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y | |||
115 | # CONFIG_KPROBES is not set | 119 | # CONFIG_KPROBES is not set |
116 | CONFIG_HAVE_KPROBES=y | 120 | CONFIG_HAVE_KPROBES=y |
117 | CONFIG_HAVE_KRETPROBES=y | 121 | CONFIG_HAVE_KRETPROBES=y |
122 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
118 | CONFIG_PROC_PAGE_MONITOR=y | 123 | CONFIG_PROC_PAGE_MONITOR=y |
119 | CONFIG_SLABINFO=y | 124 | CONFIG_SLABINFO=y |
120 | CONFIG_RT_MUTEXES=y | 125 | CONFIG_RT_MUTEXES=y |
121 | # CONFIG_TINY_SHMEM is not set | 126 | # CONFIG_TINY_SHMEM is not set |
122 | CONFIG_BASE_SMALL=0 | 127 | CONFIG_BASE_SMALL=0 |
123 | CONFIG_MODULES=y | 128 | CONFIG_MODULES=y |
129 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
124 | CONFIG_MODULE_UNLOAD=y | 130 | CONFIG_MODULE_UNLOAD=y |
125 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 131 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
126 | # CONFIG_MODVERSIONS is not set | 132 | # CONFIG_MODVERSIONS is not set |
@@ -167,11 +173,11 @@ CONFIG_PPC_PASEMI=y | |||
167 | CONFIG_PPC_PASEMI_IOMMU=y | 173 | CONFIG_PPC_PASEMI_IOMMU=y |
168 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set | 174 | # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set |
169 | CONFIG_PPC_PASEMI_MDIO=y | 175 | CONFIG_PPC_PASEMI_MDIO=y |
170 | # CONFIG_PPC_CELLEB is not set | ||
171 | # CONFIG_PPC_PS3 is not set | 176 | # CONFIG_PPC_PS3 is not set |
172 | # CONFIG_PPC_CELL is not set | 177 | # CONFIG_PPC_CELL is not set |
173 | # CONFIG_PPC_CELL_NATIVE is not set | 178 | # CONFIG_PPC_CELL_NATIVE is not set |
174 | # CONFIG_PPC_IBM_CELL_BLADE is not set | 179 | # CONFIG_PPC_IBM_CELL_BLADE is not set |
180 | # CONFIG_PPC_CELLEB is not set | ||
175 | # CONFIG_PQ2ADS is not set | 181 | # CONFIG_PQ2ADS is not set |
176 | CONFIG_PPC_NATIVE=y | 182 | CONFIG_PPC_NATIVE=y |
177 | # CONFIG_IPIC is not set | 183 | # CONFIG_IPIC is not set |
@@ -192,6 +198,7 @@ CONFIG_CPU_FREQ_DEBUG=y | |||
192 | CONFIG_CPU_FREQ_STAT=y | 198 | CONFIG_CPU_FREQ_STAT=y |
193 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 199 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
194 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 200 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
201 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
195 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 202 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set |
196 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | 203 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set |
197 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | 204 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set |
@@ -226,7 +233,6 @@ CONFIG_PREEMPT_NONE=y | |||
226 | CONFIG_BINFMT_ELF=y | 233 | CONFIG_BINFMT_ELF=y |
227 | CONFIG_COMPAT_BINFMT_ELF=y | 234 | CONFIG_COMPAT_BINFMT_ELF=y |
228 | # CONFIG_BINFMT_MISC is not set | 235 | # CONFIG_BINFMT_MISC is not set |
229 | CONFIG_FORCE_MAX_ZONEORDER=9 | ||
230 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | 236 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y |
231 | CONFIG_IOMMU_VMERGE=y | 237 | CONFIG_IOMMU_VMERGE=y |
232 | CONFIG_IOMMU_HELPER=y | 238 | CONFIG_IOMMU_HELPER=y |
@@ -249,12 +255,14 @@ CONFIG_FLATMEM=y | |||
249 | CONFIG_FLAT_NODE_MEM_MAP=y | 255 | CONFIG_FLAT_NODE_MEM_MAP=y |
250 | # CONFIG_SPARSEMEM_STATIC is not set | 256 | # CONFIG_SPARSEMEM_STATIC is not set |
251 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 257 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
258 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
252 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 259 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
253 | CONFIG_RESOURCES_64BIT=y | 260 | CONFIG_RESOURCES_64BIT=y |
254 | CONFIG_ZONE_DMA_FLAG=1 | 261 | CONFIG_ZONE_DMA_FLAG=1 |
255 | CONFIG_BOUNCE=y | 262 | CONFIG_BOUNCE=y |
256 | CONFIG_PPC_HAS_HASH_64K=y | 263 | CONFIG_PPC_HAS_HASH_64K=y |
257 | CONFIG_PPC_64K_PAGES=y | 264 | CONFIG_PPC_64K_PAGES=y |
265 | CONFIG_FORCE_MAX_ZONEORDER=9 | ||
258 | # CONFIG_PPC_SUBPAGE_PROT is not set | 266 | # CONFIG_PPC_SUBPAGE_PROT is not set |
259 | # CONFIG_SCHED_SMT is not set | 267 | # CONFIG_SCHED_SMT is not set |
260 | CONFIG_PROC_DEVICETREE=y | 268 | CONFIG_PROC_DEVICETREE=y |
@@ -290,9 +298,12 @@ CONFIG_CARDBUS=y | |||
290 | # CONFIG_YENTA is not set | 298 | # CONFIG_YENTA is not set |
291 | # CONFIG_PD6729 is not set | 299 | # CONFIG_PD6729 is not set |
292 | # CONFIG_I82092 is not set | 300 | # CONFIG_I82092 is not set |
293 | # CONFIG_ELECTRA_CF is not set | 301 | CONFIG_ELECTRA_CF=y |
294 | # CONFIG_HOTPLUG_PCI is not set | 302 | # CONFIG_HOTPLUG_PCI is not set |
303 | # CONFIG_HAS_RAPIDIO is not set | ||
304 | CONFIG_PAGE_OFFSET=0xc000000000000000 | ||
295 | CONFIG_KERNEL_START=0xc000000000000000 | 305 | CONFIG_KERNEL_START=0xc000000000000000 |
306 | CONFIG_PHYSICAL_START=0x00000000 | ||
296 | 307 | ||
297 | # | 308 | # |
298 | # Networking | 309 | # Networking |
@@ -341,8 +352,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
341 | CONFIG_DEFAULT_TCP_CONG="cubic" | 352 | CONFIG_DEFAULT_TCP_CONG="cubic" |
342 | # CONFIG_TCP_MD5SIG is not set | 353 | # CONFIG_TCP_MD5SIG is not set |
343 | # CONFIG_IPV6 is not set | 354 | # CONFIG_IPV6 is not set |
344 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
345 | # CONFIG_INET6_TUNNEL is not set | ||
346 | # CONFIG_NETWORK_SECMARK is not set | 355 | # CONFIG_NETWORK_SECMARK is not set |
347 | # CONFIG_NETFILTER is not set | 356 | # CONFIG_NETFILTER is not set |
348 | # CONFIG_IP_DCCP is not set | 357 | # CONFIG_IP_DCCP is not set |
@@ -473,6 +482,7 @@ CONFIG_MTD_NAND_PASEMI=y | |||
473 | # | 482 | # |
474 | # CONFIG_MTD_UBI is not set | 483 | # CONFIG_MTD_UBI is not set |
475 | CONFIG_OF_DEVICE=y | 484 | CONFIG_OF_DEVICE=y |
485 | CONFIG_OF_I2C=y | ||
476 | # CONFIG_PARPORT is not set | 486 | # CONFIG_PARPORT is not set |
477 | CONFIG_BLK_DEV=y | 487 | CONFIG_BLK_DEV=y |
478 | # CONFIG_BLK_DEV_FD is not set | 488 | # CONFIG_BLK_DEV_FD is not set |
@@ -520,7 +530,6 @@ CONFIG_IDE_PROC_FS=y | |||
520 | # | 530 | # |
521 | # IDE chipset support/bugfixes | 531 | # IDE chipset support/bugfixes |
522 | # | 532 | # |
523 | # CONFIG_IDE_GENERIC is not set | ||
524 | # CONFIG_BLK_DEV_PLATFORM is not set | 533 | # CONFIG_BLK_DEV_PLATFORM is not set |
525 | 534 | ||
526 | # | 535 | # |
@@ -554,7 +563,7 @@ CONFIG_IDE_PROC_FS=y | |||
554 | # CONFIG_BLK_DEV_VIA82CXXX is not set | 563 | # CONFIG_BLK_DEV_VIA82CXXX is not set |
555 | # CONFIG_BLK_DEV_TC86C001 is not set | 564 | # CONFIG_BLK_DEV_TC86C001 is not set |
556 | # CONFIG_BLK_DEV_IDEDMA is not set | 565 | # CONFIG_BLK_DEV_IDEDMA is not set |
557 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 566 | # CONFIG_BLK_DEV_HD_ONLY is not set |
558 | # CONFIG_BLK_DEV_HD is not set | 567 | # CONFIG_BLK_DEV_HD is not set |
559 | 568 | ||
560 | # | 569 | # |
@@ -632,7 +641,10 @@ CONFIG_SCSI_LOWLEVEL=y | |||
632 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set | 641 | # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set |
633 | CONFIG_ATA=y | 642 | CONFIG_ATA=y |
634 | # CONFIG_ATA_NONSTANDARD is not set | 643 | # CONFIG_ATA_NONSTANDARD is not set |
644 | CONFIG_SATA_PMP=y | ||
635 | # CONFIG_SATA_AHCI is not set | 645 | # CONFIG_SATA_AHCI is not set |
646 | CONFIG_SATA_SIL24=y | ||
647 | CONFIG_ATA_SFF=y | ||
636 | # CONFIG_SATA_SVW is not set | 648 | # CONFIG_SATA_SVW is not set |
637 | # CONFIG_ATA_PIIX is not set | 649 | # CONFIG_ATA_PIIX is not set |
638 | CONFIG_SATA_MV=y | 650 | CONFIG_SATA_MV=y |
@@ -642,7 +654,6 @@ CONFIG_SATA_MV=y | |||
642 | # CONFIG_SATA_PROMISE is not set | 654 | # CONFIG_SATA_PROMISE is not set |
643 | # CONFIG_SATA_SX4 is not set | 655 | # CONFIG_SATA_SX4 is not set |
644 | # CONFIG_SATA_SIL is not set | 656 | # CONFIG_SATA_SIL is not set |
645 | CONFIG_SATA_SIL24=y | ||
646 | # CONFIG_SATA_SIS is not set | 657 | # CONFIG_SATA_SIS is not set |
647 | # CONFIG_SATA_ULI is not set | 658 | # CONFIG_SATA_ULI is not set |
648 | # CONFIG_SATA_VIA is not set | 659 | # CONFIG_SATA_VIA is not set |
@@ -689,6 +700,7 @@ CONFIG_PATA_PCMCIA=y | |||
689 | # CONFIG_PATA_WINBOND is not set | 700 | # CONFIG_PATA_WINBOND is not set |
690 | CONFIG_PATA_PLATFORM=y | 701 | CONFIG_PATA_PLATFORM=y |
691 | CONFIG_PATA_OF_PLATFORM=y | 702 | CONFIG_PATA_OF_PLATFORM=y |
703 | # CONFIG_PATA_SCH is not set | ||
692 | CONFIG_MD=y | 704 | CONFIG_MD=y |
693 | CONFIG_BLK_DEV_MD=y | 705 | CONFIG_BLK_DEV_MD=y |
694 | CONFIG_MD_LINEAR=y | 706 | CONFIG_MD_LINEAR=y |
@@ -791,7 +803,6 @@ CONFIG_E1000_NAPI=y | |||
791 | # CONFIG_SIS190 is not set | 803 | # CONFIG_SIS190 is not set |
792 | # CONFIG_SKGE is not set | 804 | # CONFIG_SKGE is not set |
793 | # CONFIG_SKY2 is not set | 805 | # CONFIG_SKY2 is not set |
794 | # CONFIG_SK98LIN is not set | ||
795 | # CONFIG_VIA_VELOCITY is not set | 806 | # CONFIG_VIA_VELOCITY is not set |
796 | CONFIG_TIGON3=y | 807 | CONFIG_TIGON3=y |
797 | # CONFIG_BNX2 is not set | 808 | # CONFIG_BNX2 is not set |
@@ -810,6 +821,7 @@ CONFIG_PASEMI_MAC=y | |||
810 | # CONFIG_MLX4_CORE is not set | 821 | # CONFIG_MLX4_CORE is not set |
811 | # CONFIG_TEHUTI is not set | 822 | # CONFIG_TEHUTI is not set |
812 | # CONFIG_BNX2X is not set | 823 | # CONFIG_BNX2X is not set |
824 | # CONFIG_SFC is not set | ||
813 | # CONFIG_TR is not set | 825 | # CONFIG_TR is not set |
814 | 826 | ||
815 | # | 827 | # |
@@ -817,6 +829,7 @@ CONFIG_PASEMI_MAC=y | |||
817 | # | 829 | # |
818 | # CONFIG_WLAN_PRE80211 is not set | 830 | # CONFIG_WLAN_PRE80211 is not set |
819 | # CONFIG_WLAN_80211 is not set | 831 | # CONFIG_WLAN_80211 is not set |
832 | # CONFIG_IWLWIFI_LEDS is not set | ||
820 | 833 | ||
821 | # | 834 | # |
822 | # USB Network Adapters | 835 | # USB Network Adapters |
@@ -890,6 +903,7 @@ CONFIG_VT=y | |||
890 | CONFIG_VT_CONSOLE=y | 903 | CONFIG_VT_CONSOLE=y |
891 | CONFIG_HW_CONSOLE=y | 904 | CONFIG_HW_CONSOLE=y |
892 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 905 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
906 | CONFIG_DEVKMEM=y | ||
893 | # CONFIG_SERIAL_NONSTANDARD is not set | 907 | # CONFIG_SERIAL_NONSTANDARD is not set |
894 | # CONFIG_NOZOMI is not set | 908 | # CONFIG_NOZOMI is not set |
895 | 909 | ||
@@ -917,7 +931,6 @@ CONFIG_LEGACY_PTY_COUNT=4 | |||
917 | # CONFIG_IPMI_HANDLER is not set | 931 | # CONFIG_IPMI_HANDLER is not set |
918 | CONFIG_HW_RANDOM=y | 932 | CONFIG_HW_RANDOM=y |
919 | CONFIG_HW_RANDOM_PASEMI=y | 933 | CONFIG_HW_RANDOM_PASEMI=y |
920 | # CONFIG_GEN_RTC is not set | ||
921 | # CONFIG_R3964 is not set | 934 | # CONFIG_R3964 is not set |
922 | # CONFIG_APPLICOM is not set | 935 | # CONFIG_APPLICOM is not set |
923 | 936 | ||
@@ -936,13 +949,7 @@ CONFIG_DEVPORT=y | |||
936 | CONFIG_I2C=y | 949 | CONFIG_I2C=y |
937 | CONFIG_I2C_BOARDINFO=y | 950 | CONFIG_I2C_BOARDINFO=y |
938 | CONFIG_I2C_CHARDEV=y | 951 | CONFIG_I2C_CHARDEV=y |
939 | |||
940 | # | ||
941 | # I2C Algorithms | ||
942 | # | ||
943 | CONFIG_I2C_ALGOBIT=y | 952 | CONFIG_I2C_ALGOBIT=y |
944 | CONFIG_I2C_ALGOPCF=y | ||
945 | CONFIG_I2C_ALGOPCA=y | ||
946 | 953 | ||
947 | # | 954 | # |
948 | # I2C Hardware Bus support | 955 | # I2C Hardware Bus support |
@@ -971,6 +978,7 @@ CONFIG_I2C_PASEMI=y | |||
971 | # CONFIG_I2C_VIA is not set | 978 | # CONFIG_I2C_VIA is not set |
972 | # CONFIG_I2C_VIAPRO is not set | 979 | # CONFIG_I2C_VIAPRO is not set |
973 | # CONFIG_I2C_VOODOO3 is not set | 980 | # CONFIG_I2C_VOODOO3 is not set |
981 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
974 | 982 | ||
975 | # | 983 | # |
976 | # Miscellaneous I2C Chip support | 984 | # Miscellaneous I2C Chip support |
@@ -980,19 +988,13 @@ CONFIG_SENSORS_EEPROM=y | |||
980 | # CONFIG_SENSORS_PCF8574 is not set | 988 | # CONFIG_SENSORS_PCF8574 is not set |
981 | # CONFIG_PCF8575 is not set | 989 | # CONFIG_PCF8575 is not set |
982 | # CONFIG_SENSORS_PCF8591 is not set | 990 | # CONFIG_SENSORS_PCF8591 is not set |
983 | # CONFIG_TPS65010 is not set | ||
984 | # CONFIG_SENSORS_MAX6875 is not set | 991 | # CONFIG_SENSORS_MAX6875 is not set |
985 | # CONFIG_SENSORS_TSL2550 is not set | 992 | # CONFIG_SENSORS_TSL2550 is not set |
986 | # CONFIG_I2C_DEBUG_CORE is not set | 993 | # CONFIG_I2C_DEBUG_CORE is not set |
987 | # CONFIG_I2C_DEBUG_ALGO is not set | 994 | # CONFIG_I2C_DEBUG_ALGO is not set |
988 | # CONFIG_I2C_DEBUG_BUS is not set | 995 | # CONFIG_I2C_DEBUG_BUS is not set |
989 | # CONFIG_I2C_DEBUG_CHIP is not set | 996 | # CONFIG_I2C_DEBUG_CHIP is not set |
990 | |||
991 | # | ||
992 | # SPI support | ||
993 | # | ||
994 | # CONFIG_SPI is not set | 997 | # CONFIG_SPI is not set |
995 | # CONFIG_SPI_MASTER is not set | ||
996 | # CONFIG_W1 is not set | 998 | # CONFIG_W1 is not set |
997 | # CONFIG_POWER_SUPPLY is not set | 999 | # CONFIG_POWER_SUPPLY is not set |
998 | CONFIG_HWMON=y | 1000 | CONFIG_HWMON=y |
@@ -1062,12 +1064,22 @@ CONFIG_SSB_POSSIBLE=y | |||
1062 | # Multifunction device drivers | 1064 | # Multifunction device drivers |
1063 | # | 1065 | # |
1064 | # CONFIG_MFD_SM501 is not set | 1066 | # CONFIG_MFD_SM501 is not set |
1067 | # CONFIG_HTC_PASIC3 is not set | ||
1065 | 1068 | ||
1066 | # | 1069 | # |
1067 | # Multimedia devices | 1070 | # Multimedia devices |
1068 | # | 1071 | # |
1072 | |||
1073 | # | ||
1074 | # Multimedia core support | ||
1075 | # | ||
1069 | # CONFIG_VIDEO_DEV is not set | 1076 | # CONFIG_VIDEO_DEV is not set |
1070 | # CONFIG_DVB_CORE is not set | 1077 | # CONFIG_DVB_CORE is not set |
1078 | # CONFIG_VIDEO_MEDIA is not set | ||
1079 | |||
1080 | # | ||
1081 | # Multimedia drivers | ||
1082 | # | ||
1071 | CONFIG_DAB=y | 1083 | CONFIG_DAB=y |
1072 | # CONFIG_USB_DABUSB is not set | 1084 | # CONFIG_USB_DABUSB is not set |
1073 | 1085 | ||
@@ -1094,8 +1106,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
1094 | # CONFIG_FB_SYS_FILLRECT is not set | 1106 | # CONFIG_FB_SYS_FILLRECT is not set |
1095 | # CONFIG_FB_SYS_COPYAREA is not set | 1107 | # CONFIG_FB_SYS_COPYAREA is not set |
1096 | # CONFIG_FB_SYS_IMAGEBLIT is not set | 1108 | # CONFIG_FB_SYS_IMAGEBLIT is not set |
1109 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
1097 | # CONFIG_FB_SYS_FOPS is not set | 1110 | # CONFIG_FB_SYS_FOPS is not set |
1098 | CONFIG_FB_DEFERRED_IO=y | ||
1099 | # CONFIG_FB_SVGALIB is not set | 1111 | # CONFIG_FB_SVGALIB is not set |
1100 | CONFIG_FB_MACMODES=y | 1112 | CONFIG_FB_MACMODES=y |
1101 | CONFIG_FB_BACKLIGHT=y | 1113 | CONFIG_FB_BACKLIGHT=y |
@@ -1213,6 +1225,7 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1213 | # CONFIG_SND_AU8810 is not set | 1225 | # CONFIG_SND_AU8810 is not set |
1214 | # CONFIG_SND_AU8820 is not set | 1226 | # CONFIG_SND_AU8820 is not set |
1215 | # CONFIG_SND_AU8830 is not set | 1227 | # CONFIG_SND_AU8830 is not set |
1228 | # CONFIG_SND_AW2 is not set | ||
1216 | # CONFIG_SND_AZT3328 is not set | 1229 | # CONFIG_SND_AZT3328 is not set |
1217 | # CONFIG_SND_BT87X is not set | 1230 | # CONFIG_SND_BT87X is not set |
1218 | # CONFIG_SND_CA0106 is not set | 1231 | # CONFIG_SND_CA0106 is not set |
@@ -1292,11 +1305,11 @@ CONFIG_SND_USB_USX2Y=y | |||
1292 | # CONFIG_SND_SOC is not set | 1305 | # CONFIG_SND_SOC is not set |
1293 | 1306 | ||
1294 | # | 1307 | # |
1295 | # SoC Audio support for SuperH | 1308 | # ALSA SoC audio for Freescale SOCs |
1296 | # | 1309 | # |
1297 | 1310 | ||
1298 | # | 1311 | # |
1299 | # ALSA SoC audio for Freescale SOCs | 1312 | # SoC Audio for the Texas Instruments OMAP |
1300 | # | 1313 | # |
1301 | 1314 | ||
1302 | # | 1315 | # |
@@ -1334,11 +1347,13 @@ CONFIG_USB_DEVICEFS=y | |||
1334 | # | 1347 | # |
1335 | # USB Host Controller Drivers | 1348 | # USB Host Controller Drivers |
1336 | # | 1349 | # |
1350 | # CONFIG_USB_C67X00_HCD is not set | ||
1337 | CONFIG_USB_EHCI_HCD=y | 1351 | CONFIG_USB_EHCI_HCD=y |
1338 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1352 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1339 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1353 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1340 | CONFIG_USB_EHCI_HCD_PPC_OF=y | 1354 | CONFIG_USB_EHCI_HCD_PPC_OF=y |
1341 | # CONFIG_USB_ISP116X_HCD is not set | 1355 | # CONFIG_USB_ISP116X_HCD is not set |
1356 | # CONFIG_USB_ISP1760_HCD is not set | ||
1342 | CONFIG_USB_OHCI_HCD=y | 1357 | CONFIG_USB_OHCI_HCD=y |
1343 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 1358 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
1344 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 1359 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -1354,6 +1369,7 @@ CONFIG_USB_SL811_HCD=y | |||
1354 | # | 1369 | # |
1355 | # CONFIG_USB_ACM is not set | 1370 | # CONFIG_USB_ACM is not set |
1356 | # CONFIG_USB_PRINTER is not set | 1371 | # CONFIG_USB_PRINTER is not set |
1372 | # CONFIG_USB_WDM is not set | ||
1357 | 1373 | ||
1358 | # | 1374 | # |
1359 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1375 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -1375,6 +1391,7 @@ CONFIG_USB_STORAGE=y | |||
1375 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1391 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1376 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1392 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1377 | # CONFIG_USB_STORAGE_KARMA is not set | 1393 | # CONFIG_USB_STORAGE_KARMA is not set |
1394 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1378 | CONFIG_USB_LIBUSUAL=y | 1395 | CONFIG_USB_LIBUSUAL=y |
1379 | 1396 | ||
1380 | # | 1397 | # |
@@ -1416,6 +1433,7 @@ CONFIG_USB_LIBUSUAL=y | |||
1416 | # CONFIG_MMC is not set | 1433 | # CONFIG_MMC is not set |
1417 | # CONFIG_MEMSTICK is not set | 1434 | # CONFIG_MEMSTICK is not set |
1418 | # CONFIG_NEW_LEDS is not set | 1435 | # CONFIG_NEW_LEDS is not set |
1436 | # CONFIG_ACCESSIBILITY is not set | ||
1419 | # CONFIG_INFINIBAND is not set | 1437 | # CONFIG_INFINIBAND is not set |
1420 | CONFIG_EDAC=y | 1438 | CONFIG_EDAC=y |
1421 | 1439 | ||
@@ -1475,10 +1493,6 @@ CONFIG_RTC_DRV_DS1307=y | |||
1475 | # on-CPU RTC drivers | 1493 | # on-CPU RTC drivers |
1476 | # | 1494 | # |
1477 | # CONFIG_DMADEVICES is not set | 1495 | # CONFIG_DMADEVICES is not set |
1478 | |||
1479 | # | ||
1480 | # Userspace I/O | ||
1481 | # | ||
1482 | # CONFIG_UIO is not set | 1496 | # CONFIG_UIO is not set |
1483 | 1497 | ||
1484 | # | 1498 | # |
@@ -1576,12 +1590,10 @@ CONFIG_NFS_FS=y | |||
1576 | CONFIG_NFS_V3=y | 1590 | CONFIG_NFS_V3=y |
1577 | # CONFIG_NFS_V3_ACL is not set | 1591 | # CONFIG_NFS_V3_ACL is not set |
1578 | # CONFIG_NFS_V4 is not set | 1592 | # CONFIG_NFS_V4 is not set |
1579 | # CONFIG_NFS_DIRECTIO is not set | ||
1580 | CONFIG_NFSD=y | 1593 | CONFIG_NFSD=y |
1581 | CONFIG_NFSD_V3=y | 1594 | CONFIG_NFSD_V3=y |
1582 | # CONFIG_NFSD_V3_ACL is not set | 1595 | # CONFIG_NFSD_V3_ACL is not set |
1583 | CONFIG_NFSD_V4=y | 1596 | CONFIG_NFSD_V4=y |
1584 | CONFIG_NFSD_TCP=y | ||
1585 | CONFIG_ROOT_NFS=y | 1597 | CONFIG_ROOT_NFS=y |
1586 | CONFIG_LOCKD=y | 1598 | CONFIG_LOCKD=y |
1587 | CONFIG_LOCKD_V4=y | 1599 | CONFIG_LOCKD_V4=y |
@@ -1665,9 +1677,10 @@ CONFIG_NLS_ISO8859_1=y | |||
1665 | # Library routines | 1677 | # Library routines |
1666 | # | 1678 | # |
1667 | CONFIG_BITREVERSE=y | 1679 | CONFIG_BITREVERSE=y |
1680 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1668 | CONFIG_CRC_CCITT=y | 1681 | CONFIG_CRC_CCITT=y |
1669 | # CONFIG_CRC16 is not set | 1682 | # CONFIG_CRC16 is not set |
1670 | # CONFIG_CRC_ITU_T is not set | 1683 | CONFIG_CRC_ITU_T=y |
1671 | CONFIG_CRC32=y | 1684 | CONFIG_CRC32=y |
1672 | # CONFIG_CRC7 is not set | 1685 | # CONFIG_CRC7 is not set |
1673 | CONFIG_LIBCRC32C=m | 1686 | CONFIG_LIBCRC32C=m |
@@ -1677,6 +1690,7 @@ CONFIG_PLIST=y | |||
1677 | CONFIG_HAS_IOMEM=y | 1690 | CONFIG_HAS_IOMEM=y |
1678 | CONFIG_HAS_IOPORT=y | 1691 | CONFIG_HAS_IOPORT=y |
1679 | CONFIG_HAS_DMA=y | 1692 | CONFIG_HAS_DMA=y |
1693 | CONFIG_HAVE_LMB=y | ||
1680 | 1694 | ||
1681 | # | 1695 | # |
1682 | # Kernel hacking | 1696 | # Kernel hacking |
@@ -1684,6 +1698,7 @@ CONFIG_HAS_DMA=y | |||
1684 | # CONFIG_PRINTK_TIME is not set | 1698 | # CONFIG_PRINTK_TIME is not set |
1685 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1699 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1686 | CONFIG_ENABLE_MUST_CHECK=y | 1700 | CONFIG_ENABLE_MUST_CHECK=y |
1701 | CONFIG_FRAME_WARN=2048 | ||
1687 | CONFIG_MAGIC_SYSRQ=y | 1702 | CONFIG_MAGIC_SYSRQ=y |
1688 | # CONFIG_UNUSED_SYMBOLS is not set | 1703 | # CONFIG_UNUSED_SYMBOLS is not set |
1689 | # CONFIG_DEBUG_FS is not set | 1704 | # CONFIG_DEBUG_FS is not set |
@@ -1694,18 +1709,23 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1694 | # CONFIG_SCHED_DEBUG is not set | 1709 | # CONFIG_SCHED_DEBUG is not set |
1695 | # CONFIG_SCHEDSTATS is not set | 1710 | # CONFIG_SCHEDSTATS is not set |
1696 | # CONFIG_TIMER_STATS is not set | 1711 | # CONFIG_TIMER_STATS is not set |
1712 | # CONFIG_DEBUG_OBJECTS is not set | ||
1697 | # CONFIG_SLUB_DEBUG_ON is not set | 1713 | # CONFIG_SLUB_DEBUG_ON is not set |
1698 | # CONFIG_SLUB_STATS is not set | 1714 | # CONFIG_SLUB_STATS is not set |
1699 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1715 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1700 | # CONFIG_RT_MUTEX_TESTER is not set | 1716 | # CONFIG_RT_MUTEX_TESTER is not set |
1701 | # CONFIG_DEBUG_SPINLOCK is not set | 1717 | # CONFIG_DEBUG_SPINLOCK is not set |
1702 | # CONFIG_DEBUG_MUTEXES is not set | 1718 | # CONFIG_DEBUG_MUTEXES is not set |
1719 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1720 | # CONFIG_PROVE_LOCKING is not set | ||
1721 | # CONFIG_LOCK_STAT is not set | ||
1703 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1722 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1704 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1723 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1705 | # CONFIG_DEBUG_KOBJECT is not set | 1724 | # CONFIG_DEBUG_KOBJECT is not set |
1706 | CONFIG_DEBUG_BUGVERBOSE=y | 1725 | CONFIG_DEBUG_BUGVERBOSE=y |
1707 | # CONFIG_DEBUG_INFO is not set | 1726 | # CONFIG_DEBUG_INFO is not set |
1708 | # CONFIG_DEBUG_VM is not set | 1727 | # CONFIG_DEBUG_VM is not set |
1728 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1709 | # CONFIG_DEBUG_LIST is not set | 1729 | # CONFIG_DEBUG_LIST is not set |
1710 | # CONFIG_DEBUG_SG is not set | 1730 | # CONFIG_DEBUG_SG is not set |
1711 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1731 | # CONFIG_BOOT_PRINTK_DELAY is not set |
@@ -1735,53 +1755,83 @@ CONFIG_ASYNC_CORE=y | |||
1735 | CONFIG_ASYNC_MEMCPY=y | 1755 | CONFIG_ASYNC_MEMCPY=y |
1736 | CONFIG_ASYNC_XOR=y | 1756 | CONFIG_ASYNC_XOR=y |
1737 | CONFIG_CRYPTO=y | 1757 | CONFIG_CRYPTO=y |
1758 | |||
1759 | # | ||
1760 | # Crypto core or helper | ||
1761 | # | ||
1738 | CONFIG_CRYPTO_ALGAPI=y | 1762 | CONFIG_CRYPTO_ALGAPI=y |
1739 | CONFIG_CRYPTO_AEAD=y | 1763 | CONFIG_CRYPTO_AEAD=y |
1740 | CONFIG_CRYPTO_BLKCIPHER=y | 1764 | CONFIG_CRYPTO_BLKCIPHER=y |
1741 | # CONFIG_CRYPTO_SEQIV is not set | ||
1742 | CONFIG_CRYPTO_HASH=y | 1765 | CONFIG_CRYPTO_HASH=y |
1743 | CONFIG_CRYPTO_MANAGER=y | 1766 | CONFIG_CRYPTO_MANAGER=y |
1767 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1768 | # CONFIG_CRYPTO_NULL is not set | ||
1769 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1770 | CONFIG_CRYPTO_AUTHENC=y | ||
1771 | # CONFIG_CRYPTO_TEST is not set | ||
1772 | |||
1773 | # | ||
1774 | # Authenticated Encryption with Associated Data | ||
1775 | # | ||
1776 | # CONFIG_CRYPTO_CCM is not set | ||
1777 | # CONFIG_CRYPTO_GCM is not set | ||
1778 | # CONFIG_CRYPTO_SEQIV is not set | ||
1779 | |||
1780 | # | ||
1781 | # Block modes | ||
1782 | # | ||
1783 | CONFIG_CRYPTO_CBC=y | ||
1784 | # CONFIG_CRYPTO_CTR is not set | ||
1785 | # CONFIG_CRYPTO_CTS is not set | ||
1786 | # CONFIG_CRYPTO_ECB is not set | ||
1787 | # CONFIG_CRYPTO_LRW is not set | ||
1788 | # CONFIG_CRYPTO_PCBC is not set | ||
1789 | # CONFIG_CRYPTO_XTS is not set | ||
1790 | |||
1791 | # | ||
1792 | # Hash modes | ||
1793 | # | ||
1744 | CONFIG_CRYPTO_HMAC=y | 1794 | CONFIG_CRYPTO_HMAC=y |
1745 | # CONFIG_CRYPTO_XCBC is not set | 1795 | # CONFIG_CRYPTO_XCBC is not set |
1746 | # CONFIG_CRYPTO_NULL is not set | 1796 | |
1797 | # | ||
1798 | # Digest | ||
1799 | # | ||
1800 | # CONFIG_CRYPTO_CRC32C is not set | ||
1747 | CONFIG_CRYPTO_MD4=y | 1801 | CONFIG_CRYPTO_MD4=y |
1748 | CONFIG_CRYPTO_MD5=y | 1802 | CONFIG_CRYPTO_MD5=y |
1803 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1749 | CONFIG_CRYPTO_SHA1=y | 1804 | CONFIG_CRYPTO_SHA1=y |
1750 | CONFIG_CRYPTO_SHA256=y | 1805 | CONFIG_CRYPTO_SHA256=y |
1751 | CONFIG_CRYPTO_SHA512=y | 1806 | CONFIG_CRYPTO_SHA512=y |
1752 | # CONFIG_CRYPTO_WP512 is not set | ||
1753 | # CONFIG_CRYPTO_TGR192 is not set | 1807 | # CONFIG_CRYPTO_TGR192 is not set |
1754 | # CONFIG_CRYPTO_GF128MUL is not set | 1808 | # CONFIG_CRYPTO_WP512 is not set |
1755 | # CONFIG_CRYPTO_ECB is not set | 1809 | |
1756 | CONFIG_CRYPTO_CBC=y | 1810 | # |
1757 | # CONFIG_CRYPTO_PCBC is not set | 1811 | # Ciphers |
1758 | # CONFIG_CRYPTO_LRW is not set | 1812 | # |
1759 | # CONFIG_CRYPTO_XTS is not set | ||
1760 | # CONFIG_CRYPTO_CTR is not set | ||
1761 | # CONFIG_CRYPTO_GCM is not set | ||
1762 | # CONFIG_CRYPTO_CCM is not set | ||
1763 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1764 | CONFIG_CRYPTO_DES=y | ||
1765 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1766 | CONFIG_CRYPTO_BLOWFISH=y | ||
1767 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1768 | # CONFIG_CRYPTO_SERPENT is not set | ||
1769 | CONFIG_CRYPTO_AES=y | 1813 | CONFIG_CRYPTO_AES=y |
1814 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1815 | # CONFIG_CRYPTO_ARC4 is not set | ||
1816 | CONFIG_CRYPTO_BLOWFISH=y | ||
1817 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1770 | # CONFIG_CRYPTO_CAST5 is not set | 1818 | # CONFIG_CRYPTO_CAST5 is not set |
1771 | # CONFIG_CRYPTO_CAST6 is not set | 1819 | # CONFIG_CRYPTO_CAST6 is not set |
1772 | # CONFIG_CRYPTO_TEA is not set | 1820 | CONFIG_CRYPTO_DES=y |
1773 | # CONFIG_CRYPTO_ARC4 is not set | 1821 | # CONFIG_CRYPTO_FCRYPT is not set |
1774 | # CONFIG_CRYPTO_KHAZAD is not set | 1822 | # CONFIG_CRYPTO_KHAZAD is not set |
1775 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1776 | # CONFIG_CRYPTO_SEED is not set | ||
1777 | # CONFIG_CRYPTO_SALSA20 is not set | 1823 | # CONFIG_CRYPTO_SALSA20 is not set |
1824 | # CONFIG_CRYPTO_SEED is not set | ||
1825 | # CONFIG_CRYPTO_SERPENT is not set | ||
1826 | # CONFIG_CRYPTO_TEA is not set | ||
1827 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1828 | |||
1829 | # | ||
1830 | # Compression | ||
1831 | # | ||
1778 | # CONFIG_CRYPTO_DEFLATE is not set | 1832 | # CONFIG_CRYPTO_DEFLATE is not set |
1779 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1780 | # CONFIG_CRYPTO_CRC32C is not set | ||
1781 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1782 | # CONFIG_CRYPTO_TEST is not set | ||
1783 | CONFIG_CRYPTO_AUTHENC=y | ||
1784 | # CONFIG_CRYPTO_LZO is not set | 1833 | # CONFIG_CRYPTO_LZO is not set |
1785 | CONFIG_CRYPTO_HW=y | 1834 | CONFIG_CRYPTO_HW=y |
1786 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 1835 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
1787 | # CONFIG_PPC_CLOCK is not set | 1836 | # CONFIG_PPC_CLOCK is not set |
1837 | # CONFIG_VIRTUALIZATION is not set | ||
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index 48da5dfe4856..8a455ebce98d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -100,7 +100,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | |||
100 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 100 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
101 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 101 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
102 | struct mpc52xx_gpiochip, mmchip); | 102 | struct mpc52xx_gpiochip, mmchip); |
103 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | 103 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; |
104 | unsigned long flags; | 104 | unsigned long flags; |
105 | 105 | ||
106 | spin_lock_irqsave(&gpio_lock, flags); | 106 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -122,7 +122,7 @@ static int | |||
122 | mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | 122 | mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) |
123 | { | 123 | { |
124 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 124 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
125 | struct mpc52xx_gpio_wkup *regs = mm_gc->regs; | 125 | struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; |
126 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 126 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
127 | struct mpc52xx_gpiochip, mmchip); | 127 | struct mpc52xx_gpiochip, mmchip); |
128 | unsigned long flags; | 128 | unsigned long flags; |
@@ -150,7 +150,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev, | |||
150 | const struct of_device_id *match) | 150 | const struct of_device_id *match) |
151 | { | 151 | { |
152 | struct mpc52xx_gpiochip *chip; | 152 | struct mpc52xx_gpiochip *chip; |
153 | struct mpc52xx_gpio_wkup *regs; | 153 | struct mpc52xx_gpio_wkup __iomem *regs; |
154 | struct of_gpio_chip *ofchip; | 154 | struct of_gpio_chip *ofchip; |
155 | int ret; | 155 | int ret; |
156 | 156 | ||
@@ -260,7 +260,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | |||
260 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 260 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
261 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 261 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
262 | struct mpc52xx_gpiochip, mmchip); | 262 | struct mpc52xx_gpiochip, mmchip); |
263 | struct mpc52xx_gpio *regs = mm_gc->regs; | 263 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; |
264 | unsigned long flags; | 264 | unsigned long flags; |
265 | 265 | ||
266 | spin_lock_irqsave(&gpio_lock, flags); | 266 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -284,7 +284,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) | |||
284 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 284 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
285 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, | 285 | struct mpc52xx_gpiochip *chip = container_of(mm_gc, |
286 | struct mpc52xx_gpiochip, mmchip); | 286 | struct mpc52xx_gpiochip, mmchip); |
287 | struct mpc52xx_gpio *regs = mm_gc->regs; | 287 | struct mpc52xx_gpio __iomem *regs = mm_gc->regs; |
288 | unsigned long flags; | 288 | unsigned long flags; |
289 | 289 | ||
290 | spin_lock_irqsave(&gpio_lock, flags); | 290 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -312,7 +312,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev, | |||
312 | { | 312 | { |
313 | struct mpc52xx_gpiochip *chip; | 313 | struct mpc52xx_gpiochip *chip; |
314 | struct of_gpio_chip *ofchip; | 314 | struct of_gpio_chip *ofchip; |
315 | struct mpc52xx_gpio *regs; | 315 | struct mpc52xx_gpio __iomem *regs; |
316 | int ret; | 316 | int ret; |
317 | 317 | ||
318 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 318 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
@@ -387,7 +387,7 @@ mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) | |||
387 | static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) | 387 | static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) |
388 | { | 388 | { |
389 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); | 389 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); |
390 | struct mpc52xx_gpt *regs = mm_gc->regs; | 390 | struct mpc52xx_gpt __iomem *regs = mm_gc->regs; |
391 | 391 | ||
392 | out_be32(®s->mode, 0x04); | 392 | out_be32(®s->mode, 0x04); |
393 | 393 | ||
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 31da84c458d2..0e04f8fb152a 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -217,7 +217,7 @@ static u##size scc_pciex_in##name(unsigned long port) \ | |||
217 | static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ | 217 | static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ |
218 | { \ | 218 | { \ |
219 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ | 219 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ |
220 | u##size *dst = b; \ | 220 | __le##size *dst = b; \ |
221 | for (; c != 0; c--, dst++) \ | 221 | for (; c != 0; c--, dst++) \ |
222 | *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ | 222 | *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ |
223 | scc_pciex_io_flush(bus); \ | 223 | scc_pciex_io_flush(bus); \ |
@@ -231,10 +231,11 @@ static void scc_pciex_outs##name(unsigned long p, const void *b, \ | |||
231 | unsigned long c) \ | 231 | unsigned long c) \ |
232 | { \ | 232 | { \ |
233 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ | 233 | struct iowa_bus *bus = iowa_pio_find_bus(p); \ |
234 | const u##size *src = b; \ | 234 | const __le##size *src = b; \ |
235 | for (; c != 0; c--, src++) \ | 235 | for (; c != 0; c--, src++) \ |
236 | __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ | 236 | __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ |
237 | } | 237 | } |
238 | #define __le8 u8 | ||
238 | #define cpu_to_le8(x) (x) | 239 | #define cpu_to_le8(x) (x) |
239 | #define le8_to_cpu(x) (x) | 240 | #define le8_to_cpu(x) (x) |
240 | PCIEX_PIO_FUNC(8, b) | 241 | PCIEX_PIO_FUNC(8, b) |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 602c268fc8a2..5d529bcbeee9 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -60,8 +60,10 @@ long long __ashrdi3(long long, int); | |||
60 | long long __ashldi3(long long, int); | 60 | long long __ashldi3(long long, int); |
61 | long long __lshrdi3(long long, int); | 61 | long long __lshrdi3(long long, int); |
62 | 62 | ||
63 | EXPORT_SYMBOL(empty_zero_page); | ||
63 | EXPORT_SYMBOL(clear_pages); | 64 | EXPORT_SYMBOL(clear_pages); |
64 | EXPORT_SYMBOL(clear_user_page); | 65 | EXPORT_SYMBOL(clear_user_page); |
66 | EXPORT_SYMBOL(copy_page); | ||
65 | EXPORT_SYMBOL(transfer_to_handler); | 67 | EXPORT_SYMBOL(transfer_to_handler); |
66 | EXPORT_SYMBOL(do_IRQ); | 68 | EXPORT_SYMBOL(do_IRQ); |
67 | EXPORT_SYMBOL(machine_check_exception); | 69 | EXPORT_SYMBOL(machine_check_exception); |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 1d035082e78e..93acb3c1859d 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -308,6 +308,9 @@ config ARCH_SPARSEMEM_ENABLE | |||
308 | config ARCH_SPARSEMEM_DEFAULT | 308 | config ARCH_SPARSEMEM_DEFAULT |
309 | def_bool y | 309 | def_bool y |
310 | 310 | ||
311 | config ARCH_SELECT_MEMORY_MODEL | ||
312 | def_bool y | ||
313 | |||
311 | source "mm/Kconfig" | 314 | source "mm/Kconfig" |
312 | 315 | ||
313 | comment "I/O subsystem configuration" | 316 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 655d52543e2d..ad40729bec3d 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -130,6 +130,7 @@ static void appldata_work_fn(struct work_struct *work) | |||
130 | 130 | ||
131 | P_DEBUG(" -= Work Queue =-\n"); | 131 | P_DEBUG(" -= Work Queue =-\n"); |
132 | i = 0; | 132 | i = 0; |
133 | get_online_cpus(); | ||
133 | spin_lock(&appldata_ops_lock); | 134 | spin_lock(&appldata_ops_lock); |
134 | list_for_each(lh, &appldata_ops_list) { | 135 | list_for_each(lh, &appldata_ops_list) { |
135 | ops = list_entry(lh, struct appldata_ops, list); | 136 | ops = list_entry(lh, struct appldata_ops, list); |
@@ -140,6 +141,7 @@ static void appldata_work_fn(struct work_struct *work) | |||
140 | } | 141 | } |
141 | } | 142 | } |
142 | spin_unlock(&appldata_ops_lock); | 143 | spin_unlock(&appldata_ops_lock); |
144 | put_online_cpus(); | ||
143 | } | 145 | } |
144 | 146 | ||
145 | /* | 147 | /* |
@@ -266,12 +268,14 @@ appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, | |||
266 | len = *lenp; | 268 | len = *lenp; |
267 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) | 269 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) |
268 | return -EFAULT; | 270 | return -EFAULT; |
271 | get_online_cpus(); | ||
269 | spin_lock(&appldata_timer_lock); | 272 | spin_lock(&appldata_timer_lock); |
270 | if (buf[0] == '1') | 273 | if (buf[0] == '1') |
271 | __appldata_vtimer_setup(APPLDATA_ADD_TIMER); | 274 | __appldata_vtimer_setup(APPLDATA_ADD_TIMER); |
272 | else if (buf[0] == '0') | 275 | else if (buf[0] == '0') |
273 | __appldata_vtimer_setup(APPLDATA_DEL_TIMER); | 276 | __appldata_vtimer_setup(APPLDATA_DEL_TIMER); |
274 | spin_unlock(&appldata_timer_lock); | 277 | spin_unlock(&appldata_timer_lock); |
278 | put_online_cpus(); | ||
275 | out: | 279 | out: |
276 | *lenp = len; | 280 | *lenp = len; |
277 | *ppos += len; | 281 | *ppos += len; |
@@ -314,10 +318,12 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | |||
314 | return -EINVAL; | 318 | return -EINVAL; |
315 | } | 319 | } |
316 | 320 | ||
321 | get_online_cpus(); | ||
317 | spin_lock(&appldata_timer_lock); | 322 | spin_lock(&appldata_timer_lock); |
318 | appldata_interval = interval; | 323 | appldata_interval = interval; |
319 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); | 324 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); |
320 | spin_unlock(&appldata_timer_lock); | 325 | spin_unlock(&appldata_timer_lock); |
326 | put_online_cpus(); | ||
321 | 327 | ||
322 | P_INFO("Monitoring CPU interval set to %u milliseconds.\n", | 328 | P_INFO("Monitoring CPU interval set to %u milliseconds.\n", |
323 | interval); | 329 | interval); |
@@ -556,8 +562,10 @@ static int __init appldata_init(void) | |||
556 | return -ENOMEM; | 562 | return -ENOMEM; |
557 | } | 563 | } |
558 | 564 | ||
565 | get_online_cpus(); | ||
559 | for_each_online_cpu(i) | 566 | for_each_online_cpu(i) |
560 | appldata_online_cpu(i); | 567 | appldata_online_cpu(i); |
568 | put_online_cpus(); | ||
561 | 569 | ||
562 | /* Register cpu hotplug notifier */ | 570 | /* Register cpu hotplug notifier */ |
563 | register_hotcpu_notifier(&appldata_nb); | 571 | register_hotcpu_notifier(&appldata_nb); |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index aa341d0ea1e6..c5cdb975d590 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25 | 3 | # Linux kernel version: 2.6.26-rc4 |
4 | # Wed Apr 30 11:07:45 2008 | 4 | # Fri May 30 09:49:33 2008 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -103,6 +103,7 @@ CONFIG_RT_MUTEXES=y | |||
103 | # CONFIG_TINY_SHMEM is not set | 103 | # CONFIG_TINY_SHMEM is not set |
104 | CONFIG_BASE_SMALL=0 | 104 | CONFIG_BASE_SMALL=0 |
105 | CONFIG_MODULES=y | 105 | CONFIG_MODULES=y |
106 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
106 | CONFIG_MODULE_UNLOAD=y | 107 | CONFIG_MODULE_UNLOAD=y |
107 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 108 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
108 | CONFIG_MODVERSIONS=y | 109 | CONFIG_MODVERSIONS=y |
@@ -173,6 +174,7 @@ CONFIG_PREEMPT=y | |||
173 | # CONFIG_PREEMPT_RCU is not set | 174 | # CONFIG_PREEMPT_RCU is not set |
174 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 175 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
175 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | 176 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y |
177 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
176 | CONFIG_SELECT_MEMORY_MODEL=y | 178 | CONFIG_SELECT_MEMORY_MODEL=y |
177 | # CONFIG_FLATMEM_MANUAL is not set | 179 | # CONFIG_FLATMEM_MANUAL is not set |
178 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 180 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -210,6 +212,7 @@ CONFIG_FORCE_MAX_ZONEORDER=9 | |||
210 | CONFIG_PFAULT=y | 212 | CONFIG_PFAULT=y |
211 | # CONFIG_SHARED_KERNEL is not set | 213 | # CONFIG_SHARED_KERNEL is not set |
212 | # CONFIG_CMM is not set | 214 | # CONFIG_CMM is not set |
215 | # CONFIG_PAGE_STATES is not set | ||
213 | CONFIG_VIRT_TIMER=y | 216 | CONFIG_VIRT_TIMER=y |
214 | CONFIG_VIRT_CPU_ACCOUNTING=y | 217 | CONFIG_VIRT_CPU_ACCOUNTING=y |
215 | # CONFIG_APPLDATA_BASE is not set | 218 | # CONFIG_APPLDATA_BASE is not set |
@@ -620,6 +623,7 @@ CONFIG_S390_VMUR=m | |||
620 | # | 623 | # |
621 | # CONFIG_MEMSTICK is not set | 624 | # CONFIG_MEMSTICK is not set |
622 | # CONFIG_NEW_LEDS is not set | 625 | # CONFIG_NEW_LEDS is not set |
626 | CONFIG_ACCESSIBILITY=y | ||
623 | 627 | ||
624 | # | 628 | # |
625 | # File systems | 629 | # File systems |
@@ -754,11 +758,12 @@ CONFIG_FRAME_WARN=2048 | |||
754 | CONFIG_MAGIC_SYSRQ=y | 758 | CONFIG_MAGIC_SYSRQ=y |
755 | # CONFIG_UNUSED_SYMBOLS is not set | 759 | # CONFIG_UNUSED_SYMBOLS is not set |
756 | CONFIG_DEBUG_FS=y | 760 | CONFIG_DEBUG_FS=y |
757 | CONFIG_HEADERS_CHECK=y | 761 | # CONFIG_HEADERS_CHECK is not set |
758 | CONFIG_DEBUG_KERNEL=y | 762 | CONFIG_DEBUG_KERNEL=y |
759 | # CONFIG_SCHED_DEBUG is not set | 763 | # CONFIG_SCHED_DEBUG is not set |
760 | # CONFIG_SCHEDSTATS is not set | 764 | # CONFIG_SCHEDSTATS is not set |
761 | # CONFIG_TIMER_STATS is not set | 765 | # CONFIG_TIMER_STATS is not set |
766 | # CONFIG_DEBUG_OBJECTS is not set | ||
762 | # CONFIG_DEBUG_SLAB is not set | 767 | # CONFIG_DEBUG_SLAB is not set |
763 | CONFIG_DEBUG_PREEMPT=y | 768 | CONFIG_DEBUG_PREEMPT=y |
764 | # CONFIG_DEBUG_RT_MUTEXES is not set | 769 | # CONFIG_DEBUG_RT_MUTEXES is not set |
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index c14a336f6300..d2f270c995d9 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -208,7 +208,7 @@ static const unsigned char formats[][7] = { | |||
208 | [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ | 208 | [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ |
209 | [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ | 209 | [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ |
210 | [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ | 210 | [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ |
211 | [INSTR_RRF_R0RR] = { 0xff, R_24,R_28,R_16,0,0,0 }, /* e.g. idte */ | 211 | [INSTR_RRF_R0RR] = { 0xff, R_24,R_16,R_28,0,0,0 }, /* e.g. idte */ |
212 | [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ | 212 | [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ |
213 | [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ | 213 | [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ |
214 | [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ | 214 | [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 1f4228948dc4..42b1d12ebb10 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -1089,7 +1089,7 @@ out: | |||
1089 | 1089 | ||
1090 | #ifdef CONFIG_HOTPLUG_CPU | 1090 | #ifdef CONFIG_HOTPLUG_CPU |
1091 | 1091 | ||
1092 | int smp_rescan_cpus(void) | 1092 | int __ref smp_rescan_cpus(void) |
1093 | { | 1093 | { |
1094 | cpumask_t newcpus; | 1094 | cpumask_t newcpus; |
1095 | int cpu; | 1095 | int cpu; |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 29f3a63806b9..05598649b326 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -44,37 +44,34 @@ char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); | |||
44 | 44 | ||
45 | void show_mem(void) | 45 | void show_mem(void) |
46 | { | 46 | { |
47 | int i, total = 0, reserved = 0; | 47 | unsigned long i, total = 0, reserved = 0; |
48 | int shared = 0, cached = 0; | 48 | unsigned long shared = 0, cached = 0; |
49 | unsigned long flags; | ||
49 | struct page *page; | 50 | struct page *page; |
51 | pg_data_t *pgdat; | ||
50 | 52 | ||
51 | printk("Mem-info:\n"); | 53 | printk("Mem-info:\n"); |
52 | show_free_areas(); | 54 | show_free_areas(); |
53 | i = max_mapnr; | 55 | for_each_online_pgdat(pgdat) { |
54 | while (i-- > 0) { | 56 | pgdat_resize_lock(pgdat, &flags); |
55 | if (!pfn_valid(i)) | 57 | for (i = 0; i < pgdat->node_spanned_pages; i++) { |
56 | continue; | 58 | if (!pfn_valid(pgdat->node_start_pfn + i)) |
57 | page = pfn_to_page(i); | 59 | continue; |
58 | total++; | 60 | page = pfn_to_page(pgdat->node_start_pfn + i); |
59 | if (PageReserved(page)) | 61 | total++; |
60 | reserved++; | 62 | if (PageReserved(page)) |
61 | else if (PageSwapCache(page)) | 63 | reserved++; |
62 | cached++; | 64 | else if (PageSwapCache(page)) |
63 | else if (page_count(page)) | 65 | cached++; |
64 | shared += page_count(page) - 1; | 66 | else if (page_count(page)) |
67 | shared += page_count(page) - 1; | ||
68 | } | ||
69 | pgdat_resize_unlock(pgdat, &flags); | ||
65 | } | 70 | } |
66 | printk("%d pages of RAM\n", total); | 71 | printk("%ld pages of RAM\n", total); |
67 | printk("%d reserved pages\n", reserved); | 72 | printk("%ld reserved pages\n", reserved); |
68 | printk("%d pages shared\n", shared); | 73 | printk("%ld pages shared\n", shared); |
69 | printk("%d pages swap cached\n", cached); | 74 | printk("%ld pages swap cached\n", cached); |
70 | |||
71 | printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); | ||
72 | printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK)); | ||
73 | printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); | ||
74 | printk("%lu pages slab\n", | ||
75 | global_page_state(NR_SLAB_RECLAIMABLE) + | ||
76 | global_page_state(NR_SLAB_UNRECLAIMABLE)); | ||
77 | printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); | ||
78 | } | 75 | } |
79 | 76 | ||
80 | /* | 77 | /* |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index ea2804808f39..f591188fa2c0 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -27,12 +27,19 @@ struct memory_segment { | |||
27 | 27 | ||
28 | static LIST_HEAD(mem_segs); | 28 | static LIST_HEAD(mem_segs); |
29 | 29 | ||
30 | static pud_t *vmem_pud_alloc(void) | 30 | static void __ref *vmem_alloc_pages(unsigned int order) |
31 | { | ||
32 | if (slab_is_available()) | ||
33 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
34 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
35 | } | ||
36 | |||
37 | static inline pud_t *vmem_pud_alloc(void) | ||
31 | { | 38 | { |
32 | pud_t *pud = NULL; | 39 | pud_t *pud = NULL; |
33 | 40 | ||
34 | #ifdef CONFIG_64BIT | 41 | #ifdef CONFIG_64BIT |
35 | pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); | 42 | pud = vmem_alloc_pages(2); |
36 | if (!pud) | 43 | if (!pud) |
37 | return NULL; | 44 | return NULL; |
38 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); | 45 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -40,12 +47,12 @@ static pud_t *vmem_pud_alloc(void) | |||
40 | return pud; | 47 | return pud; |
41 | } | 48 | } |
42 | 49 | ||
43 | static pmd_t *vmem_pmd_alloc(void) | 50 | static inline pmd_t *vmem_pmd_alloc(void) |
44 | { | 51 | { |
45 | pmd_t *pmd = NULL; | 52 | pmd_t *pmd = NULL; |
46 | 53 | ||
47 | #ifdef CONFIG_64BIT | 54 | #ifdef CONFIG_64BIT |
48 | pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); | 55 | pmd = vmem_alloc_pages(2); |
49 | if (!pmd) | 56 | if (!pmd) |
50 | return NULL; | 57 | return NULL; |
51 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); | 58 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -207,13 +214,14 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) | |||
207 | if (pte_none(*pt_dir)) { | 214 | if (pte_none(*pt_dir)) { |
208 | unsigned long new_page; | 215 | unsigned long new_page; |
209 | 216 | ||
210 | new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); | 217 | new_page =__pa(vmem_alloc_pages(0)); |
211 | if (!new_page) | 218 | if (!new_page) |
212 | goto out; | 219 | goto out; |
213 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | 220 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); |
214 | *pt_dir = pte; | 221 | *pt_dir = pte; |
215 | } | 222 | } |
216 | } | 223 | } |
224 | memset(start, 0, nr * sizeof(struct page)); | ||
217 | ret = 0; | 225 | ret = 0; |
218 | out: | 226 | out: |
219 | flush_tlb_kernel_range(start_addr, end_addr); | 227 | flush_tlb_kernel_range(start_addr, end_addr); |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index af65b2da3ba0..5c7e2fd52075 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -582,8 +582,9 @@ static void __init lguest_init_IRQ(void) | |||
582 | int vector = FIRST_EXTERNAL_VECTOR + i; | 582 | int vector = FIRST_EXTERNAL_VECTOR + i; |
583 | if (vector != SYSCALL_VECTOR) { | 583 | if (vector != SYSCALL_VECTOR) { |
584 | set_intr_gate(vector, interrupt[i]); | 584 | set_intr_gate(vector, interrupt[i]); |
585 | set_irq_chip_and_handler(i, &lguest_irq_controller, | 585 | set_irq_chip_and_handler_name(i, &lguest_irq_controller, |
586 | handle_level_irq); | 586 | handle_level_irq, |
587 | "level"); | ||
587 | } | 588 | } |
588 | } | 589 | } |
589 | /* This call is required to set up for 4k stacks, where we have | 590 | /* This call is required to set up for 4k stacks, where we have |
diff --git a/crypto/cts.c b/crypto/cts.c index c4e70bfb4970..ccf9c5de3958 100644 --- a/crypto/cts.c +++ b/crypto/cts.c | |||
@@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx, | |||
89 | if (lastn < 0) | 89 | if (lastn < 0) |
90 | return -EINVAL; | 90 | return -EINVAL; |
91 | 91 | ||
92 | sg_init_table(sgsrc, 1); | ||
93 | sg_init_table(sgdst, 1); | ||
94 | |||
92 | memset(s, 0, sizeof(s)); | 95 | memset(s, 0, sizeof(s)); |
93 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); | 96 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); |
94 | 97 | ||
@@ -172,6 +175,9 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx, | |||
172 | if (lastn < 0) | 175 | if (lastn < 0) |
173 | return -EINVAL; | 176 | return -EINVAL; |
174 | 177 | ||
178 | sg_init_table(sgsrc, 1); | ||
179 | sg_init_table(sgdst, 1); | ||
180 | |||
175 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); | 181 | scatterwalk_map_and_copy(s, src, offset, nbytes, 0); |
176 | 182 | ||
177 | lcldesc.tfm = ctx->child; | 183 | lcldesc.tfm = ctx->child; |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 97f83fb2ee2e..544b7d6c617c 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -502,10 +502,10 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
502 | { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ | 502 | { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ |
503 | { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ | 503 | { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ |
504 | { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ | 504 | { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ |
505 | { PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci }, /* MCP7B */ | 505 | { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci }, /* MCP7B */ |
506 | { PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci }, /* MCP7B */ | 506 | { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci }, /* MCP7B */ |
507 | { PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci }, /* MCP7B */ | 507 | { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci }, /* MCP7B */ |
508 | { PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci }, /* MCP7B */ | 508 | { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */ |
509 | 509 | ||
510 | /* SiS */ | 510 | /* SiS */ |
511 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ | 511 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index a9027b8fbdd5..3548ee7014ca 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -247,10 +247,11 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
247 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | 247 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, |
248 | /* SATA Controller 2 IDE (ICH8) */ | 248 | /* SATA Controller 2 IDE (ICH8) */ |
249 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 249 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
250 | /* Mobile SATA Controller IDE (ICH8M) */ | ||
251 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | ||
252 | /* Mobile SATA Controller IDE (ICH8M), Apple */ | 250 | /* Mobile SATA Controller IDE (ICH8M), Apple */ |
253 | { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, | 251 | { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, |
252 | { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata }, | ||
253 | /* Mobile SATA Controller IDE (ICH8M) */ | ||
254 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | ||
254 | /* SATA Controller IDE (ICH9) */ | 255 | /* SATA Controller IDE (ICH9) */ |
255 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, | 256 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, |
256 | /* SATA Controller IDE (ICH9) */ | 257 | /* SATA Controller IDE (ICH9) */ |
@@ -526,7 +527,7 @@ static struct ata_port_info piix_port_info[] = { | |||
526 | 527 | ||
527 | [ich8m_apple_sata] = | 528 | [ich8m_apple_sata] = |
528 | { | 529 | { |
529 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, | 530 | .flags = PIIX_SATA_FLAGS, |
530 | .pio_mask = 0x1f, /* pio0-4 */ | 531 | .pio_mask = 0x1f, /* pio0-4 */ |
531 | .mwdma_mask = 0x07, /* mwdma0-2 */ | 532 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
532 | .udma_mask = ATA_UDMA6, | 533 | .udma_mask = ATA_UDMA6, |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3c89f205c83f..cc816ca623d3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -5403,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res) | |||
5403 | */ | 5403 | */ |
5404 | static void ata_finalize_port_ops(struct ata_port_operations *ops) | 5404 | static void ata_finalize_port_ops(struct ata_port_operations *ops) |
5405 | { | 5405 | { |
5406 | static spinlock_t lock = SPIN_LOCK_UNLOCKED; | 5406 | static DEFINE_SPINLOCK(lock); |
5407 | const struct ata_port_operations *cur; | 5407 | const struct ata_port_operations *cur; |
5408 | void **begin = (void **)ops; | 5408 | void **begin = (void **)ops; |
5409 | void **end = (void **)&ops->inherits; | 5409 | void **end = (void **)&ops->inherits; |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 0f9386d4a5a0..7daf4c0f6216 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -322,9 +322,12 @@ static void sata_pmp_quirks(struct ata_port *ap) | |||
322 | if (vendor == 0x1095 && devid == 0x3726) { | 322 | if (vendor == 0x1095 && devid == 0x3726) { |
323 | /* sil3726 quirks */ | 323 | /* sil3726 quirks */ |
324 | ata_port_for_each_link(link, ap) { | 324 | ata_port_for_each_link(link, ap) { |
325 | /* class code report is unreliable */ | 325 | /* Class code report is unreliable and SRST |
326 | * times out under certain configurations. | ||
327 | */ | ||
326 | if (link->pmp < 5) | 328 | if (link->pmp < 5) |
327 | link->flags |= ATA_LFLAG_ASSUME_ATA; | 329 | link->flags |= ATA_LFLAG_NO_SRST | |
330 | ATA_LFLAG_ASSUME_ATA; | ||
328 | 331 | ||
329 | /* port 5 is for SEMB device and it doesn't like SRST */ | 332 | /* port 5 is for SEMB device and it doesn't like SRST */ |
330 | if (link->pmp == 5) | 333 | if (link->pmp == 5) |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index aeb6e01d82ce..2e6e1622dc6d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1637,6 +1637,7 @@ defer: | |||
1637 | 1637 | ||
1638 | /** | 1638 | /** |
1639 | * ata_scsi_rbuf_get - Map response buffer. | 1639 | * ata_scsi_rbuf_get - Map response buffer. |
1640 | * @cmd: SCSI command containing buffer to be mapped. | ||
1640 | * @flags: unsigned long variable to store irq enable status | 1641 | * @flags: unsigned long variable to store irq enable status |
1641 | * @copy_in: copy in from user buffer | 1642 | * @copy_in: copy in from user buffer |
1642 | * | 1643 | * |
@@ -1954,7 +1955,7 @@ static unsigned int ata_msense_ctl_mode(u8 *buf) | |||
1954 | 1955 | ||
1955 | /** | 1956 | /** |
1956 | * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page | 1957 | * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page |
1957 | * @bufp: output buffer | 1958 | * @buf: output buffer |
1958 | * | 1959 | * |
1959 | * Generate a generic MODE SENSE r/w error recovery page. | 1960 | * Generate a generic MODE SENSE r/w error recovery page. |
1960 | * | 1961 | * |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 853559e32315..3924e7209a44 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -34,7 +34,7 @@ enum { | |||
34 | 34 | ||
35 | SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 35 | SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
36 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | | 36 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | |
37 | ATA_FLAG_NCQ), | 37 | ATA_FLAG_PMP | ATA_FLAG_NCQ), |
38 | 38 | ||
39 | SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, | 39 | SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, |
40 | SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ | 40 | SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ |
@@ -395,7 +395,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc) | |||
395 | cd = (struct command_desc *)pp->cmdentry + tag; | 395 | cd = (struct command_desc *)pp->cmdentry + tag; |
396 | cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; | 396 | cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; |
397 | 397 | ||
398 | ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); | 398 | ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis); |
399 | 399 | ||
400 | VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", | 400 | VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", |
401 | cd->cfis[0], cd->cfis[1], cd->cfis[2]); | 401 | cd->cfis[0], cd->cfis[1], cd->cfis[2]); |
@@ -438,6 +438,8 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc) | |||
438 | ioread32(CA + hcr_base), | 438 | ioread32(CA + hcr_base), |
439 | ioread32(CE + hcr_base), ioread32(CC + hcr_base)); | 439 | ioread32(CE + hcr_base), ioread32(CC + hcr_base)); |
440 | 440 | ||
441 | iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); | ||
442 | |||
441 | /* Simply queue command to the controller/device */ | 443 | /* Simply queue command to the controller/device */ |
442 | iowrite32(1 << tag, CQ + hcr_base); | 444 | iowrite32(1 << tag, CQ + hcr_base); |
443 | 445 | ||
@@ -558,11 +560,36 @@ static void sata_fsl_thaw(struct ata_port *ap) | |||
558 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); | 560 | ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); |
559 | } | 561 | } |
560 | 562 | ||
563 | static void sata_fsl_pmp_attach(struct ata_port *ap) | ||
564 | { | ||
565 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | ||
566 | void __iomem *hcr_base = host_priv->hcr_base; | ||
567 | u32 temp; | ||
568 | |||
569 | temp = ioread32(hcr_base + HCONTROL); | ||
570 | iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); | ||
571 | } | ||
572 | |||
573 | static void sata_fsl_pmp_detach(struct ata_port *ap) | ||
574 | { | ||
575 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | ||
576 | void __iomem *hcr_base = host_priv->hcr_base; | ||
577 | u32 temp; | ||
578 | |||
579 | temp = ioread32(hcr_base + HCONTROL); | ||
580 | temp &= ~HCONTROL_PMP_ATTACHED; | ||
581 | iowrite32(temp, hcr_base + HCONTROL); | ||
582 | |||
583 | /* enable interrupts on the controller/port */ | ||
584 | temp = ioread32(hcr_base + HCONTROL); | ||
585 | iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); | ||
586 | |||
587 | } | ||
588 | |||
561 | static int sata_fsl_port_start(struct ata_port *ap) | 589 | static int sata_fsl_port_start(struct ata_port *ap) |
562 | { | 590 | { |
563 | struct device *dev = ap->host->dev; | 591 | struct device *dev = ap->host->dev; |
564 | struct sata_fsl_port_priv *pp; | 592 | struct sata_fsl_port_priv *pp; |
565 | int retval; | ||
566 | void *mem; | 593 | void *mem; |
567 | dma_addr_t mem_dma; | 594 | dma_addr_t mem_dma; |
568 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 595 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
@@ -688,12 +715,13 @@ static int sata_fsl_prereset(struct ata_link *link, unsigned long deadline) | |||
688 | } | 715 | } |
689 | 716 | ||
690 | static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, | 717 | static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, |
691 | unsigned long deadline) | 718 | unsigned long deadline) |
692 | { | 719 | { |
693 | struct ata_port *ap = link->ap; | 720 | struct ata_port *ap = link->ap; |
694 | struct sata_fsl_port_priv *pp = ap->private_data; | 721 | struct sata_fsl_port_priv *pp = ap->private_data; |
695 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 722 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
696 | void __iomem *hcr_base = host_priv->hcr_base; | 723 | void __iomem *hcr_base = host_priv->hcr_base; |
724 | int pmp = sata_srst_pmp(link); | ||
697 | u32 temp; | 725 | u32 temp; |
698 | struct ata_taskfile tf; | 726 | struct ata_taskfile tf; |
699 | u8 *cfis; | 727 | u8 *cfis; |
@@ -703,6 +731,9 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, | |||
703 | 731 | ||
704 | DPRINTK("in xx_softreset\n"); | 732 | DPRINTK("in xx_softreset\n"); |
705 | 733 | ||
734 | if (pmp != SATA_PMP_CTRL_PORT) | ||
735 | goto issue_srst; | ||
736 | |||
706 | try_offline_again: | 737 | try_offline_again: |
707 | /* | 738 | /* |
708 | * Force host controller to go off-line, aborting current operations | 739 | * Force host controller to go off-line, aborting current operations |
@@ -746,6 +777,7 @@ try_offline_again: | |||
746 | 777 | ||
747 | temp = ioread32(hcr_base + HCONTROL); | 778 | temp = ioread32(hcr_base + HCONTROL); |
748 | temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); | 779 | temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); |
780 | temp |= HCONTROL_PMP_ATTACHED; | ||
749 | iowrite32(temp, hcr_base + HCONTROL); | 781 | iowrite32(temp, hcr_base + HCONTROL); |
750 | 782 | ||
751 | temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); | 783 | temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); |
@@ -771,7 +803,8 @@ try_offline_again: | |||
771 | ata_port_printk(ap, KERN_WARNING, | 803 | ata_port_printk(ap, KERN_WARNING, |
772 | "No Device OR PHYRDY change,Hstatus = 0x%x\n", | 804 | "No Device OR PHYRDY change,Hstatus = 0x%x\n", |
773 | ioread32(hcr_base + HSTATUS)); | 805 | ioread32(hcr_base + HSTATUS)); |
774 | goto err; | 806 | *class = ATA_DEV_NONE; |
807 | goto out; | ||
775 | } | 808 | } |
776 | 809 | ||
777 | /* | 810 | /* |
@@ -783,7 +816,8 @@ try_offline_again: | |||
783 | 816 | ||
784 | if ((temp & 0xFF) != 0x18) { | 817 | if ((temp & 0xFF) != 0x18) { |
785 | ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); | 818 | ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); |
786 | goto err; | 819 | *class = ATA_DEV_NONE; |
820 | goto out; | ||
787 | } else { | 821 | } else { |
788 | ata_port_printk(ap, KERN_INFO, | 822 | ata_port_printk(ap, KERN_INFO, |
789 | "Signature Update detected @ %d msecs\n", | 823 | "Signature Update detected @ %d msecs\n", |
@@ -798,6 +832,7 @@ try_offline_again: | |||
798 | * reached here, we can send a command to the target device | 832 | * reached here, we can send a command to the target device |
799 | */ | 833 | */ |
800 | 834 | ||
835 | issue_srst: | ||
801 | DPRINTK("Sending SRST/device reset\n"); | 836 | DPRINTK("Sending SRST/device reset\n"); |
802 | 837 | ||
803 | ata_tf_init(link->device, &tf); | 838 | ata_tf_init(link->device, &tf); |
@@ -808,7 +843,7 @@ try_offline_again: | |||
808 | SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); | 843 | SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); |
809 | 844 | ||
810 | tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ | 845 | tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ |
811 | ata_tf_to_fis(&tf, 0, 0, cfis); | 846 | ata_tf_to_fis(&tf, pmp, 0, cfis); |
812 | 847 | ||
813 | DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", | 848 | DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", |
814 | cfis[0], cfis[1], cfis[2], cfis[3]); | 849 | cfis[0], cfis[1], cfis[2], cfis[3]); |
@@ -854,8 +889,10 @@ try_offline_again: | |||
854 | sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); | 889 | sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); |
855 | 890 | ||
856 | tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ | 891 | tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ |
857 | ata_tf_to_fis(&tf, 0, 0, cfis); | 892 | ata_tf_to_fis(&tf, pmp, 0, cfis); |
858 | 893 | ||
894 | if (pmp != SATA_PMP_CTRL_PORT) | ||
895 | iowrite32(pmp, CQPMP + hcr_base); | ||
859 | iowrite32(1, CQ + hcr_base); | 896 | iowrite32(1, CQ + hcr_base); |
860 | msleep(150); /* ?? */ | 897 | msleep(150); /* ?? */ |
861 | 898 | ||
@@ -886,12 +923,21 @@ try_offline_again: | |||
886 | VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); | 923 | VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); |
887 | } | 924 | } |
888 | 925 | ||
926 | out: | ||
889 | return 0; | 927 | return 0; |
890 | 928 | ||
891 | err: | 929 | err: |
892 | return -EIO; | 930 | return -EIO; |
893 | } | 931 | } |
894 | 932 | ||
933 | static void sata_fsl_error_handler(struct ata_port *ap) | ||
934 | { | ||
935 | |||
936 | DPRINTK("in xx_error_handler\n"); | ||
937 | sata_pmp_error_handler(ap); | ||
938 | |||
939 | } | ||
940 | |||
895 | static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) | 941 | static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) |
896 | { | 942 | { |
897 | if (qc->flags & ATA_QCFLAG_FAILED) | 943 | if (qc->flags & ATA_QCFLAG_FAILED) |
@@ -905,18 +951,21 @@ static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) | |||
905 | 951 | ||
906 | static void sata_fsl_error_intr(struct ata_port *ap) | 952 | static void sata_fsl_error_intr(struct ata_port *ap) |
907 | { | 953 | { |
908 | struct ata_link *link = &ap->link; | ||
909 | struct ata_eh_info *ehi = &link->eh_info; | ||
910 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 954 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
911 | void __iomem *hcr_base = host_priv->hcr_base; | 955 | void __iomem *hcr_base = host_priv->hcr_base; |
912 | u32 hstatus, dereg, cereg = 0, SError = 0; | 956 | u32 hstatus, dereg=0, cereg = 0, SError = 0; |
913 | unsigned int err_mask = 0, action = 0; | 957 | unsigned int err_mask = 0, action = 0; |
914 | struct ata_queued_cmd *qc; | 958 | int freeze = 0, abort=0; |
915 | int freeze = 0; | 959 | struct ata_link *link = NULL; |
960 | struct ata_queued_cmd *qc = NULL; | ||
961 | struct ata_eh_info *ehi; | ||
916 | 962 | ||
917 | hstatus = ioread32(hcr_base + HSTATUS); | 963 | hstatus = ioread32(hcr_base + HSTATUS); |
918 | cereg = ioread32(hcr_base + CE); | 964 | cereg = ioread32(hcr_base + CE); |
919 | 965 | ||
966 | /* first, analyze and record host port events */ | ||
967 | link = &ap->link; | ||
968 | ehi = &link->eh_info; | ||
920 | ata_ehi_clear_desc(ehi); | 969 | ata_ehi_clear_desc(ehi); |
921 | 970 | ||
922 | /* | 971 | /* |
@@ -926,42 +975,28 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
926 | sata_fsl_scr_read(ap, SCR_ERROR, &SError); | 975 | sata_fsl_scr_read(ap, SCR_ERROR, &SError); |
927 | if (unlikely(SError & 0xFFFF0000)) { | 976 | if (unlikely(SError & 0xFFFF0000)) { |
928 | sata_fsl_scr_write(ap, SCR_ERROR, SError); | 977 | sata_fsl_scr_write(ap, SCR_ERROR, SError); |
929 | err_mask |= AC_ERR_ATA_BUS; | ||
930 | } | 978 | } |
931 | 979 | ||
932 | DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", | 980 | DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", |
933 | hstatus, cereg, ioread32(hcr_base + DE), SError); | 981 | hstatus, cereg, ioread32(hcr_base + DE), SError); |
934 | 982 | ||
935 | /* handle single device errors */ | 983 | /* handle fatal errors */ |
936 | if (cereg) { | 984 | if (hstatus & FATAL_ERROR_DECODE) { |
937 | /* | 985 | ehi->err_mask |= AC_ERR_ATA_BUS; |
938 | * clear the command error, also clears queue to the device | 986 | ehi->action |= ATA_EH_SOFTRESET; |
939 | * in error, and we can (re)issue commands to this device. | ||
940 | * When a device is in error all commands queued into the | ||
941 | * host controller and at the device are considered aborted | ||
942 | * and the queue for that device is stopped. Now, after | ||
943 | * clearing the device error, we can issue commands to the | ||
944 | * device to interrogate it to find the source of the error. | ||
945 | */ | ||
946 | dereg = ioread32(hcr_base + DE); | ||
947 | iowrite32(dereg, hcr_base + DE); | ||
948 | iowrite32(cereg, hcr_base + CE); | ||
949 | 987 | ||
950 | DPRINTK("single device error, CE=0x%x, DE=0x%x\n", | ||
951 | ioread32(hcr_base + CE), ioread32(hcr_base + DE)); | ||
952 | /* | 988 | /* |
953 | * We should consider this as non fatal error, and TF must | 989 | * Ignore serror in case of fatal errors as we always want |
954 | * be updated as done below. | 990 | * to do a soft-reset of the FSL SATA controller. Analyzing |
991 | * serror may cause libata to schedule a hard-reset action, | ||
992 | * and hard-reset currently does not do controller | ||
993 | * offline/online, causing command timeouts and leads to an | ||
994 | * un-recoverable state, hence make libATA ignore | ||
995 | * autopsy in case of fatal errors. | ||
955 | */ | 996 | */ |
956 | 997 | ||
957 | err_mask |= AC_ERR_DEV; | 998 | ehi->flags |= ATA_EHI_NO_AUTOPSY; |
958 | } | ||
959 | 999 | ||
960 | /* handle fatal errors */ | ||
961 | if (hstatus & FATAL_ERROR_DECODE) { | ||
962 | err_mask |= AC_ERR_ATA_BUS; | ||
963 | action |= ATA_EH_RESET; | ||
964 | /* how will fatal error interrupts be completed ?? */ | ||
965 | freeze = 1; | 1000 | freeze = 1; |
966 | } | 1001 | } |
967 | 1002 | ||
@@ -971,30 +1006,83 @@ static void sata_fsl_error_intr(struct ata_port *ap) | |||
971 | 1006 | ||
972 | /* Setup a soft-reset EH action */ | 1007 | /* Setup a soft-reset EH action */ |
973 | ata_ehi_hotplugged(ehi); | 1008 | ata_ehi_hotplugged(ehi); |
1009 | ata_ehi_push_desc(ehi, "%s", "PHY RDY changed"); | ||
974 | freeze = 1; | 1010 | freeze = 1; |
975 | } | 1011 | } |
976 | 1012 | ||
977 | /* record error info */ | 1013 | /* handle single device errors */ |
978 | qc = ata_qc_from_tag(ap, link->active_tag); | 1014 | if (cereg) { |
1015 | /* | ||
1016 | * clear the command error, also clears queue to the device | ||
1017 | * in error, and we can (re)issue commands to this device. | ||
1018 | * When a device is in error all commands queued into the | ||
1019 | * host controller and at the device are considered aborted | ||
1020 | * and the queue for that device is stopped. Now, after | ||
1021 | * clearing the device error, we can issue commands to the | ||
1022 | * device to interrogate it to find the source of the error. | ||
1023 | */ | ||
1024 | abort = 1; | ||
1025 | |||
1026 | DPRINTK("single device error, CE=0x%x, DE=0x%x\n", | ||
1027 | ioread32(hcr_base + CE), ioread32(hcr_base + DE)); | ||
979 | 1028 | ||
980 | if (qc) | 1029 | /* find out the offending link and qc */ |
1030 | if (ap->nr_pmp_links) { | ||
1031 | dereg = ioread32(hcr_base + DE); | ||
1032 | iowrite32(dereg, hcr_base + DE); | ||
1033 | iowrite32(cereg, hcr_base + CE); | ||
1034 | |||
1035 | if (dereg < ap->nr_pmp_links) { | ||
1036 | link = &ap->pmp_link[dereg]; | ||
1037 | ehi = &link->eh_info; | ||
1038 | qc = ata_qc_from_tag(ap, link->active_tag); | ||
1039 | /* | ||
1040 | * We should consider this as non fatal error, | ||
1041 | * and TF must be updated as done below. | ||
1042 | */ | ||
1043 | |||
1044 | err_mask |= AC_ERR_DEV; | ||
1045 | |||
1046 | } else { | ||
1047 | err_mask |= AC_ERR_HSM; | ||
1048 | action |= ATA_EH_HARDRESET; | ||
1049 | freeze = 1; | ||
1050 | } | ||
1051 | } else { | ||
1052 | dereg = ioread32(hcr_base + DE); | ||
1053 | iowrite32(dereg, hcr_base + DE); | ||
1054 | iowrite32(cereg, hcr_base + CE); | ||
1055 | |||
1056 | qc = ata_qc_from_tag(ap, link->active_tag); | ||
1057 | /* | ||
1058 | * We should consider this as non fatal error, | ||
1059 | * and TF must be updated as done below. | ||
1060 | */ | ||
1061 | err_mask |= AC_ERR_DEV; | ||
1062 | } | ||
1063 | } | ||
1064 | |||
1065 | /* record error info */ | ||
1066 | if (qc) { | ||
981 | qc->err_mask |= err_mask; | 1067 | qc->err_mask |= err_mask; |
982 | else | 1068 | } else |
983 | ehi->err_mask |= err_mask; | 1069 | ehi->err_mask |= err_mask; |
984 | 1070 | ||
985 | ehi->action |= action; | 1071 | ehi->action |= action; |
986 | ehi->serror |= SError; | ||
987 | 1072 | ||
988 | /* freeze or abort */ | 1073 | /* freeze or abort */ |
989 | if (freeze) | 1074 | if (freeze) |
990 | ata_port_freeze(ap); | 1075 | ata_port_freeze(ap); |
991 | else | 1076 | else if (abort) { |
992 | ata_port_abort(ap); | 1077 | if (qc) |
1078 | ata_link_abort(qc->dev->link); | ||
1079 | else | ||
1080 | ata_port_abort(ap); | ||
1081 | } | ||
993 | } | 1082 | } |
994 | 1083 | ||
995 | static void sata_fsl_host_intr(struct ata_port *ap) | 1084 | static void sata_fsl_host_intr(struct ata_port *ap) |
996 | { | 1085 | { |
997 | struct ata_link *link = &ap->link; | ||
998 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; | 1086 | struct sata_fsl_host_priv *host_priv = ap->host->private_data; |
999 | void __iomem *hcr_base = host_priv->hcr_base; | 1087 | void __iomem *hcr_base = host_priv->hcr_base; |
1000 | u32 hstatus, qc_active = 0; | 1088 | u32 hstatus, qc_active = 0; |
@@ -1017,10 +1105,19 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1017 | return; | 1105 | return; |
1018 | } | 1106 | } |
1019 | 1107 | ||
1020 | if (link->sactive) { /* only true for NCQ commands */ | 1108 | /* Read command completed register */ |
1109 | qc_active = ioread32(hcr_base + CC); | ||
1110 | |||
1111 | VPRINTK("Status of all queues :\n"); | ||
1112 | VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", | ||
1113 | qc_active, | ||
1114 | ioread32(hcr_base + CA), | ||
1115 | ioread32(hcr_base + CE), | ||
1116 | ioread32(hcr_base + CQ), | ||
1117 | ap->qc_active); | ||
1118 | |||
1119 | if (qc_active & ap->qc_active) { | ||
1021 | int i; | 1120 | int i; |
1022 | /* Read command completed register */ | ||
1023 | qc_active = ioread32(hcr_base + CC); | ||
1024 | /* clear CC bit, this will also complete the interrupt */ | 1121 | /* clear CC bit, this will also complete the interrupt */ |
1025 | iowrite32(qc_active, hcr_base + CC); | 1122 | iowrite32(qc_active, hcr_base + CC); |
1026 | 1123 | ||
@@ -1032,8 +1129,9 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1032 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { | 1129 | for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { |
1033 | if (qc_active & (1 << i)) { | 1130 | if (qc_active & (1 << i)) { |
1034 | qc = ata_qc_from_tag(ap, i); | 1131 | qc = ata_qc_from_tag(ap, i); |
1035 | if (qc) | 1132 | if (qc) { |
1036 | ata_qc_complete(qc); | 1133 | ata_qc_complete(qc); |
1134 | } | ||
1037 | DPRINTK | 1135 | DPRINTK |
1038 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", | 1136 | ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", |
1039 | i, ioread32(hcr_base + CC), | 1137 | i, ioread32(hcr_base + CC), |
@@ -1042,19 +1140,21 @@ static void sata_fsl_host_intr(struct ata_port *ap) | |||
1042 | } | 1140 | } |
1043 | return; | 1141 | return; |
1044 | 1142 | ||
1045 | } else if (ap->qc_active) { | 1143 | } else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) { |
1046 | iowrite32(1, hcr_base + CC); | 1144 | iowrite32(1, hcr_base + CC); |
1047 | qc = ata_qc_from_tag(ap, link->active_tag); | 1145 | qc = ata_qc_from_tag(ap, ATA_TAG_INTERNAL); |
1048 | 1146 | ||
1049 | DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", | 1147 | DPRINTK("completing non-ncq cmd, CC=0x%x\n", |
1050 | link->active_tag, ioread32(hcr_base + CC)); | 1148 | ioread32(hcr_base + CC)); |
1051 | 1149 | ||
1052 | if (qc) | 1150 | if (qc) { |
1053 | ata_qc_complete(qc); | 1151 | ata_qc_complete(qc); |
1152 | } | ||
1054 | } else { | 1153 | } else { |
1055 | /* Spurious Interrupt!! */ | 1154 | /* Spurious Interrupt!! */ |
1056 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", | 1155 | DPRINTK("spurious interrupt!!, CC = 0x%x\n", |
1057 | ioread32(hcr_base + CC)); | 1156 | ioread32(hcr_base + CC)); |
1157 | iowrite32(qc_active, hcr_base + CC); | ||
1058 | return; | 1158 | return; |
1059 | } | 1159 | } |
1060 | } | 1160 | } |
@@ -1130,9 +1230,6 @@ static int sata_fsl_init_controller(struct ata_host *host) | |||
1130 | iowrite32(0x00000FFFF, hcr_base + CE); | 1230 | iowrite32(0x00000FFFF, hcr_base + CE); |
1131 | iowrite32(0x00000FFFF, hcr_base + DE); | 1231 | iowrite32(0x00000FFFF, hcr_base + DE); |
1132 | 1232 | ||
1133 | /* initially assuming no Port multiplier, set CQPMP to 0 */ | ||
1134 | iowrite32(0x0, hcr_base + CQPMP); | ||
1135 | |||
1136 | /* | 1233 | /* |
1137 | * host controller will be brought on-line, during xx_port_start() | 1234 | * host controller will be brought on-line, during xx_port_start() |
1138 | * callback, that should also initiate the OOB, COMINIT sequence | 1235 | * callback, that should also initiate the OOB, COMINIT sequence |
@@ -1154,8 +1251,8 @@ static struct scsi_host_template sata_fsl_sht = { | |||
1154 | .dma_boundary = ATA_DMA_BOUNDARY, | 1251 | .dma_boundary = ATA_DMA_BOUNDARY, |
1155 | }; | 1252 | }; |
1156 | 1253 | ||
1157 | static const struct ata_port_operations sata_fsl_ops = { | 1254 | static struct ata_port_operations sata_fsl_ops = { |
1158 | .inherits = &sata_port_ops, | 1255 | .inherits = &sata_pmp_port_ops, |
1159 | 1256 | ||
1160 | .qc_prep = sata_fsl_qc_prep, | 1257 | .qc_prep = sata_fsl_qc_prep, |
1161 | .qc_issue = sata_fsl_qc_issue, | 1258 | .qc_issue = sata_fsl_qc_issue, |
@@ -1168,10 +1265,15 @@ static const struct ata_port_operations sata_fsl_ops = { | |||
1168 | .thaw = sata_fsl_thaw, | 1265 | .thaw = sata_fsl_thaw, |
1169 | .prereset = sata_fsl_prereset, | 1266 | .prereset = sata_fsl_prereset, |
1170 | .softreset = sata_fsl_softreset, | 1267 | .softreset = sata_fsl_softreset, |
1268 | .pmp_softreset = sata_fsl_softreset, | ||
1269 | .error_handler = sata_fsl_error_handler, | ||
1171 | .post_internal_cmd = sata_fsl_post_internal_cmd, | 1270 | .post_internal_cmd = sata_fsl_post_internal_cmd, |
1172 | 1271 | ||
1173 | .port_start = sata_fsl_port_start, | 1272 | .port_start = sata_fsl_port_start, |
1174 | .port_stop = sata_fsl_port_stop, | 1273 | .port_stop = sata_fsl_port_stop, |
1274 | |||
1275 | .pmp_attach = sata_fsl_pmp_attach, | ||
1276 | .pmp_detach = sata_fsl_pmp_detach, | ||
1175 | }; | 1277 | }; |
1176 | 1278 | ||
1177 | static const struct ata_port_info sata_fsl_port_info[] = { | 1279 | static const struct ata_port_info sata_fsl_port_info[] = { |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index fb81f0c7a8c2..acf347f71a2f 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -72,7 +72,7 @@ | |||
72 | #include <linux/libata.h> | 72 | #include <linux/libata.h> |
73 | 73 | ||
74 | #define DRV_NAME "sata_mv" | 74 | #define DRV_NAME "sata_mv" |
75 | #define DRV_VERSION "1.21" | 75 | #define DRV_VERSION "1.24" |
76 | 76 | ||
77 | enum { | 77 | enum { |
78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ | 78 | /* BAR's are enumerated in terms of pci_resource_start() terms */ |
@@ -122,8 +122,6 @@ enum { | |||
122 | /* Host Flags */ | 122 | /* Host Flags */ |
123 | MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ | 123 | MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ |
124 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ | 124 | MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ |
125 | /* SoC integrated controllers, no PCI interface */ | ||
126 | MV_FLAG_SOC = (1 << 28), | ||
127 | 125 | ||
128 | MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 126 | MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
129 | ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | | 127 | ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | |
@@ -356,12 +354,12 @@ enum { | |||
356 | MV_HP_ERRATA_50XXB2 = (1 << 2), | 354 | MV_HP_ERRATA_50XXB2 = (1 << 2), |
357 | MV_HP_ERRATA_60X1B2 = (1 << 3), | 355 | MV_HP_ERRATA_60X1B2 = (1 << 3), |
358 | MV_HP_ERRATA_60X1C0 = (1 << 4), | 356 | MV_HP_ERRATA_60X1C0 = (1 << 4), |
359 | MV_HP_ERRATA_XX42A0 = (1 << 5), | ||
360 | MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ | 357 | MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ |
361 | MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ | 358 | MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ |
362 | MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ | 359 | MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ |
363 | MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ | 360 | MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ |
364 | MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ | 361 | MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ |
362 | MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */ | ||
365 | 363 | ||
366 | /* Port private flags (pp_flags) */ | 364 | /* Port private flags (pp_flags) */ |
367 | MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ | 365 | MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ |
@@ -374,7 +372,7 @@ enum { | |||
374 | #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) | 372 | #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) |
375 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) | 373 | #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) |
376 | #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) | 374 | #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) |
377 | #define HAS_PCI(host) (!((host)->ports[0]->flags & MV_FLAG_SOC)) | 375 | #define IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC) |
378 | 376 | ||
379 | #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) | 377 | #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) |
380 | #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) | 378 | #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) |
@@ -652,7 +650,7 @@ static const struct ata_port_info mv_port_info[] = { | |||
652 | .port_ops = &mv_iie_ops, | 650 | .port_ops = &mv_iie_ops, |
653 | }, | 651 | }, |
654 | { /* chip_soc */ | 652 | { /* chip_soc */ |
655 | .flags = MV_GENIIE_FLAGS | MV_FLAG_SOC, | 653 | .flags = MV_GENIIE_FLAGS, |
656 | .pio_mask = 0x1f, /* pio0-4 */ | 654 | .pio_mask = 0x1f, /* pio0-4 */ |
657 | .udma_mask = ATA_UDMA6, | 655 | .udma_mask = ATA_UDMA6, |
658 | .port_ops = &mv_iie_ops, | 656 | .port_ops = &mv_iie_ops, |
@@ -812,12 +810,7 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, | |||
812 | writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); | 810 | writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); |
813 | writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, | 811 | writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, |
814 | port_mmio + EDMA_REQ_Q_IN_PTR_OFS); | 812 | port_mmio + EDMA_REQ_Q_IN_PTR_OFS); |
815 | 813 | writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | |
816 | if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) | ||
817 | writelfl((pp->crqb_dma & 0xffffffff) | index, | ||
818 | port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | ||
819 | else | ||
820 | writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); | ||
821 | 814 | ||
822 | /* | 815 | /* |
823 | * initialize response queue | 816 | * initialize response queue |
@@ -827,13 +820,7 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, | |||
827 | 820 | ||
828 | WARN_ON(pp->crpb_dma & 0xff); | 821 | WARN_ON(pp->crpb_dma & 0xff); |
829 | writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); | 822 | writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); |
830 | 823 | writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | |
831 | if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) | ||
832 | writelfl((pp->crpb_dma & 0xffffffff) | index, | ||
833 | port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | ||
834 | else | ||
835 | writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); | ||
836 | |||
837 | writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, | 824 | writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, |
838 | port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); | 825 | port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); |
839 | } | 826 | } |
@@ -1254,7 +1241,7 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq) | |||
1254 | 1241 | ||
1255 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ | 1242 | cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ |
1256 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ | 1243 | cfg |= (1 << 22); /* enab 4-entry host queue cache */ |
1257 | if (HAS_PCI(ap->host)) | 1244 | if (!IS_SOC(hpriv)) |
1258 | cfg |= (1 << 18); /* enab early completion */ | 1245 | cfg |= (1 << 18); /* enab early completion */ |
1259 | if (hpriv->hp_flags & MV_HP_CUT_THROUGH) | 1246 | if (hpriv->hp_flags & MV_HP_CUT_THROUGH) |
1260 | cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ | 1247 | cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ |
@@ -2225,7 +2212,7 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance) | |||
2225 | * a bogus register value which can indicate HW removal or PCI fault. | 2212 | * a bogus register value which can indicate HW removal or PCI fault. |
2226 | */ | 2213 | */ |
2227 | if (pending_irqs && main_irq_cause != 0xffffffffU) { | 2214 | if (pending_irqs && main_irq_cause != 0xffffffffU) { |
2228 | if (unlikely((pending_irqs & PCI_ERR) && HAS_PCI(host))) | 2215 | if (unlikely((pending_irqs & PCI_ERR) && !IS_SOC(hpriv))) |
2229 | handled = mv_pci_error(host, hpriv->base); | 2216 | handled = mv_pci_error(host, hpriv->base); |
2230 | else | 2217 | else |
2231 | handled = mv_host_intr(host, pending_irqs); | 2218 | handled = mv_host_intr(host, pending_irqs); |
@@ -2547,7 +2534,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2547 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2534 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2548 | int fix_phy_mode4 = | 2535 | int fix_phy_mode4 = |
2549 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); | 2536 | hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); |
2550 | u32 m2, tmp; | 2537 | u32 m2, m3; |
2551 | 2538 | ||
2552 | if (fix_phy_mode2) { | 2539 | if (fix_phy_mode2) { |
2553 | m2 = readl(port_mmio + PHY_MODE2); | 2540 | m2 = readl(port_mmio + PHY_MODE2); |
@@ -2564,28 +2551,37 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, | |||
2564 | udelay(200); | 2551 | udelay(200); |
2565 | } | 2552 | } |
2566 | 2553 | ||
2567 | /* who knows what this magic does */ | 2554 | /* |
2568 | tmp = readl(port_mmio + PHY_MODE3); | 2555 | * Gen-II/IIe PHY_MODE3 errata RM#2: |
2569 | tmp &= ~0x7F800000; | 2556 | * Achieves better receiver noise performance than the h/w default: |
2570 | tmp |= 0x2A800000; | 2557 | */ |
2571 | writel(tmp, port_mmio + PHY_MODE3); | 2558 | m3 = readl(port_mmio + PHY_MODE3); |
2559 | m3 = (m3 & 0x1f) | (0x5555601 << 5); | ||
2560 | |||
2561 | /* Guideline 88F5182 (GL# SATA-S11) */ | ||
2562 | if (IS_SOC(hpriv)) | ||
2563 | m3 &= ~0x1c; | ||
2572 | 2564 | ||
2573 | if (fix_phy_mode4) { | 2565 | if (fix_phy_mode4) { |
2574 | u32 m4; | 2566 | u32 m4; |
2575 | 2567 | ||
2576 | m4 = readl(port_mmio + PHY_MODE4); | 2568 | m4 = readl(port_mmio + PHY_MODE4); |
2577 | 2569 | ||
2578 | if (hp_flags & MV_HP_ERRATA_60X1B2) | ||
2579 | tmp = readl(port_mmio + PHY_MODE3); | ||
2580 | |||
2581 | /* workaround for errata FEr SATA#10 (part 1) */ | 2570 | /* workaround for errata FEr SATA#10 (part 1) */ |
2582 | m4 = (m4 & ~(1 << 1)) | (1 << 0); | 2571 | m4 = (m4 & ~(1 << 1)) | (1 << 0); |
2583 | 2572 | ||
2584 | writel(m4, port_mmio + PHY_MODE4); | 2573 | /* enforce bit restrictions on GenIIe devices */ |
2574 | if (IS_GEN_IIE(hpriv)) | ||
2575 | m4 = (m4 & ~0x5DE3FFFC) | (1 << 2); | ||
2585 | 2576 | ||
2586 | if (hp_flags & MV_HP_ERRATA_60X1B2) | 2577 | writel(m4, port_mmio + PHY_MODE4); |
2587 | writel(tmp, port_mmio + PHY_MODE3); | ||
2588 | } | 2578 | } |
2579 | /* | ||
2580 | * Workaround for 60x1-B2 errata SATA#13: | ||
2581 | * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3, | ||
2582 | * so we must always rewrite PHY_MODE3 after PHY_MODE4. | ||
2583 | */ | ||
2584 | writel(m3, port_mmio + PHY_MODE3); | ||
2589 | 2585 | ||
2590 | /* Revert values of pre-emphasis and signal amps to the saved ones */ | 2586 | /* Revert values of pre-emphasis and signal amps to the saved ones */ |
2591 | m2 = readl(port_mmio + PHY_MODE2); | 2587 | m2 = readl(port_mmio + PHY_MODE2); |
@@ -2876,7 +2872,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host) | |||
2876 | void __iomem *mmio = hpriv->base; | 2872 | void __iomem *mmio = hpriv->base; |
2877 | u32 reg; | 2873 | u32 reg; |
2878 | 2874 | ||
2879 | if (!HAS_PCI(host) || !IS_PCIE(hpriv)) | 2875 | if (IS_SOC(hpriv) || !IS_PCIE(hpriv)) |
2880 | return 0; /* not PCI-X capable */ | 2876 | return 0; /* not PCI-X capable */ |
2881 | reg = readl(mmio + MV_PCI_MODE_OFS); | 2877 | reg = readl(mmio + MV_PCI_MODE_OFS); |
2882 | if ((reg & MV_PCI_MODE_MASK) == 0) | 2878 | if ((reg & MV_PCI_MODE_MASK) == 0) |
@@ -3003,10 +2999,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) | |||
3003 | hp_flags |= MV_HP_CUT_THROUGH; | 2999 | hp_flags |= MV_HP_CUT_THROUGH; |
3004 | 3000 | ||
3005 | switch (pdev->revision) { | 3001 | switch (pdev->revision) { |
3006 | case 0x0: | 3002 | case 0x2: /* Rev.B0: the first/only public release */ |
3007 | hp_flags |= MV_HP_ERRATA_XX42A0; | ||
3008 | break; | ||
3009 | case 0x1: | ||
3010 | hp_flags |= MV_HP_ERRATA_60X1C0; | 3003 | hp_flags |= MV_HP_ERRATA_60X1C0; |
3011 | break; | 3004 | break; |
3012 | default: | 3005 | default: |
@@ -3018,7 +3011,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) | |||
3018 | break; | 3011 | break; |
3019 | case chip_soc: | 3012 | case chip_soc: |
3020 | hpriv->ops = &mv_soc_ops; | 3013 | hpriv->ops = &mv_soc_ops; |
3021 | hp_flags |= MV_HP_ERRATA_60X1C0; | 3014 | hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0; |
3022 | break; | 3015 | break; |
3023 | 3016 | ||
3024 | default: | 3017 | default: |
@@ -3062,12 +3055,12 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3062 | if (rc) | 3055 | if (rc) |
3063 | goto done; | 3056 | goto done; |
3064 | 3057 | ||
3065 | if (HAS_PCI(host)) { | 3058 | if (IS_SOC(hpriv)) { |
3066 | hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; | ||
3067 | hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; | ||
3068 | } else { | ||
3069 | hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; | 3059 | hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; |
3070 | hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; | 3060 | hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; |
3061 | } else { | ||
3062 | hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; | ||
3063 | hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; | ||
3071 | } | 3064 | } |
3072 | 3065 | ||
3073 | /* global interrupt mask: 0 == mask everything */ | 3066 | /* global interrupt mask: 0 == mask everything */ |
@@ -3093,7 +3086,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3093 | mv_port_init(&ap->ioaddr, port_mmio); | 3086 | mv_port_init(&ap->ioaddr, port_mmio); |
3094 | 3087 | ||
3095 | #ifdef CONFIG_PCI | 3088 | #ifdef CONFIG_PCI |
3096 | if (HAS_PCI(host)) { | 3089 | if (!IS_SOC(hpriv)) { |
3097 | unsigned int offset = port_mmio - mmio; | 3090 | unsigned int offset = port_mmio - mmio; |
3098 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); | 3091 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); |
3099 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); | 3092 | ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); |
@@ -3113,7 +3106,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) | |||
3113 | writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); | 3106 | writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); |
3114 | } | 3107 | } |
3115 | 3108 | ||
3116 | if (HAS_PCI(host)) { | 3109 | if (!IS_SOC(hpriv)) { |
3117 | /* Clear any currently outstanding host interrupt conditions */ | 3110 | /* Clear any currently outstanding host interrupt conditions */ |
3118 | writelfl(0, mmio + hpriv->irq_cause_ofs); | 3111 | writelfl(0, mmio + hpriv->irq_cause_ofs); |
3119 | 3112 | ||
diff --git a/drivers/base/core.c b/drivers/base/core.c index 72eccae4904b..422cfcad486d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -760,6 +760,21 @@ static void device_remove_class_symlinks(struct device *dev) | |||
760 | } | 760 | } |
761 | 761 | ||
762 | /** | 762 | /** |
763 | * dev_set_name - set a device name | ||
764 | * @dev: device | ||
765 | */ | ||
766 | int dev_set_name(struct device *dev, const char *fmt, ...) | ||
767 | { | ||
768 | va_list vargs; | ||
769 | |||
770 | va_start(vargs, fmt); | ||
771 | vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs); | ||
772 | va_end(vargs); | ||
773 | return 0; | ||
774 | } | ||
775 | EXPORT_SYMBOL_GPL(dev_set_name); | ||
776 | |||
777 | /** | ||
763 | * device_add - add device to device hierarchy. | 778 | * device_add - add device to device hierarchy. |
764 | * @dev: device. | 779 | * @dev: device. |
765 | * | 780 | * |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 84e064ffee52..dd7ea203f940 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -260,6 +260,10 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) | 260 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) |
261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); | 261 | blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); |
262 | 262 | ||
263 | /* If disk is read-only in the host, the guest should obey */ | ||
264 | if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) | ||
265 | set_disk_ro(vblk->disk, 1); | ||
266 | |||
263 | /* Host must always specify the capacity. */ | 267 | /* Host must always specify the capacity. */ |
264 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), | 268 | vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), |
265 | &cap, sizeof(cap)); | 269 | &cap, sizeof(cap)); |
@@ -311,6 +315,7 @@ static void virtblk_remove(struct virtio_device *vdev) | |||
311 | /* Stop all the virtqueues. */ | 315 | /* Stop all the virtqueues. */ |
312 | vdev->config->reset(vdev); | 316 | vdev->config->reset(vdev); |
313 | 317 | ||
318 | del_gendisk(vblk->disk); | ||
314 | blk_cleanup_queue(vblk->disk->queue); | 319 | blk_cleanup_queue(vblk->disk->queue); |
315 | put_disk(vblk->disk); | 320 | put_disk(vblk->disk); |
316 | mempool_destroy(vblk->pool); | 321 | mempool_destroy(vblk->pool); |
@@ -325,7 +330,7 @@ static struct virtio_device_id id_table[] = { | |||
325 | 330 | ||
326 | static unsigned int features[] = { | 331 | static unsigned int features[] = { |
327 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | 332 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, |
328 | VIRTIO_BLK_F_GEOMETRY, | 333 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, |
329 | }; | 334 | }; |
330 | 335 | ||
331 | static struct virtio_driver virtio_blk = { | 336 | static struct virtio_driver virtio_blk = { |
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 8d6c2089d2a8..efd0b4db7c8e 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -112,3 +112,12 @@ config HW_RANDOM_PASEMI | |||
112 | 112 | ||
113 | If unsure, say Y. | 113 | If unsure, say Y. |
114 | 114 | ||
115 | config HW_RANDOM_VIRTIO | ||
116 | tristate "VirtIO Random Number Generator support" | ||
117 | depends on HW_RANDOM && VIRTIO | ||
118 | ---help--- | ||
119 | This driver provides kernel-side support for the virtual Random Number | ||
120 | Generator hardware. | ||
121 | |||
122 | To compile this driver as a module, choose M here: the | ||
123 | module will be called virtio-rng. If unsure, say N. | ||
diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile index c8b7300e2fb1..b4940ddbb35f 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile | |||
@@ -11,3 +11,4 @@ obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o | |||
11 | obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o | 11 | obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o |
12 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o | 12 | obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o |
13 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o | 13 | obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o |
14 | obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o | ||
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c new file mode 100644 index 000000000000..d0e563e4fc39 --- /dev/null +++ b/drivers/char/hw_random/virtio-rng.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * Randomness driver for virtio | ||
3 | * Copyright (C) 2007, 2008 Rusty Russell IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | #include <linux/err.h> | ||
20 | #include <linux/hw_random.h> | ||
21 | #include <linux/scatterlist.h> | ||
22 | #include <linux/spinlock.h> | ||
23 | #include <linux/virtio.h> | ||
24 | #include <linux/virtio_rng.h> | ||
25 | |||
26 | /* The host will fill any buffer we give it with sweet, sweet randomness. We | ||
27 | * give it 64 bytes at a time, and the hwrng framework takes it 4 bytes at a | ||
28 | * time. */ | ||
29 | #define RANDOM_DATA_SIZE 64 | ||
30 | |||
31 | static struct virtqueue *vq; | ||
32 | static u32 *random_data; | ||
33 | static unsigned int data_left; | ||
34 | static DECLARE_COMPLETION(have_data); | ||
35 | |||
36 | static void random_recv_done(struct virtqueue *vq) | ||
37 | { | ||
38 | int len; | ||
39 | |||
40 | /* We never get spurious callbacks. */ | ||
41 | if (!vq->vq_ops->get_buf(vq, &len)) | ||
42 | BUG(); | ||
43 | |||
44 | data_left = len / sizeof(random_data[0]); | ||
45 | complete(&have_data); | ||
46 | } | ||
47 | |||
48 | static void register_buffer(void) | ||
49 | { | ||
50 | struct scatterlist sg; | ||
51 | |||
52 | sg_init_one(&sg, random_data, RANDOM_DATA_SIZE); | ||
53 | /* There should always be room for one buffer. */ | ||
54 | if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0) | ||
55 | BUG(); | ||
56 | vq->vq_ops->kick(vq); | ||
57 | } | ||
58 | |||
59 | /* At least we don't udelay() in a loop like some other drivers. */ | ||
60 | static int virtio_data_present(struct hwrng *rng, int wait) | ||
61 | { | ||
62 | if (data_left) | ||
63 | return 1; | ||
64 | |||
65 | if (!wait) | ||
66 | return 0; | ||
67 | |||
68 | wait_for_completion(&have_data); | ||
69 | return 1; | ||
70 | } | ||
71 | |||
72 | /* virtio_data_present() must have succeeded before this is called. */ | ||
73 | static int virtio_data_read(struct hwrng *rng, u32 *data) | ||
74 | { | ||
75 | BUG_ON(!data_left); | ||
76 | |||
77 | *data = random_data[--data_left]; | ||
78 | |||
79 | if (!data_left) { | ||
80 | init_completion(&have_data); | ||
81 | register_buffer(); | ||
82 | } | ||
83 | return sizeof(*data); | ||
84 | } | ||
85 | |||
86 | static struct hwrng virtio_hwrng = { | ||
87 | .name = "virtio", | ||
88 | .data_present = virtio_data_present, | ||
89 | .data_read = virtio_data_read, | ||
90 | }; | ||
91 | |||
92 | static int virtrng_probe(struct virtio_device *vdev) | ||
93 | { | ||
94 | int err; | ||
95 | |||
96 | /* We expect a single virtqueue. */ | ||
97 | vq = vdev->config->find_vq(vdev, 0, random_recv_done); | ||
98 | if (IS_ERR(vq)) | ||
99 | return PTR_ERR(vq); | ||
100 | |||
101 | err = hwrng_register(&virtio_hwrng); | ||
102 | if (err) { | ||
103 | vdev->config->del_vq(vq); | ||
104 | return err; | ||
105 | } | ||
106 | |||
107 | register_buffer(); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static void virtrng_remove(struct virtio_device *vdev) | ||
112 | { | ||
113 | vdev->config->reset(vdev); | ||
114 | hwrng_unregister(&virtio_hwrng); | ||
115 | vdev->config->del_vq(vq); | ||
116 | } | ||
117 | |||
118 | static struct virtio_device_id id_table[] = { | ||
119 | { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, | ||
120 | { 0 }, | ||
121 | }; | ||
122 | |||
123 | static struct virtio_driver virtio_rng = { | ||
124 | .driver.name = KBUILD_MODNAME, | ||
125 | .driver.owner = THIS_MODULE, | ||
126 | .id_table = id_table, | ||
127 | .probe = virtrng_probe, | ||
128 | .remove = __devexit_p(virtrng_remove), | ||
129 | }; | ||
130 | |||
131 | static int __init init(void) | ||
132 | { | ||
133 | int err; | ||
134 | |||
135 | random_data = kmalloc(RANDOM_DATA_SIZE, GFP_KERNEL); | ||
136 | if (!random_data) | ||
137 | return -ENOMEM; | ||
138 | |||
139 | err = register_virtio_driver(&virtio_rng); | ||
140 | if (err) | ||
141 | kfree(random_data); | ||
142 | return err; | ||
143 | } | ||
144 | |||
145 | static void __exit fini(void) | ||
146 | { | ||
147 | kfree(random_data); | ||
148 | unregister_virtio_driver(&virtio_rng); | ||
149 | } | ||
150 | module_init(init); | ||
151 | module_exit(fini); | ||
152 | |||
153 | MODULE_DEVICE_TABLE(virtio, id_table); | ||
154 | MODULE_DESCRIPTION("Virtio random number driver"); | ||
155 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7fce038fa57e..86f0a2430624 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -928,13 +928,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
928 | policy->user_policy.policy = policy->policy; | 928 | policy->user_policy.policy = policy->policy; |
929 | policy->user_policy.governor = policy->governor; | 929 | policy->user_policy.governor = policy->governor; |
930 | 930 | ||
931 | unlock_policy_rwsem_write(cpu); | ||
932 | |||
933 | if (ret) { | 931 | if (ret) { |
934 | dprintk("setting policy failed\n"); | 932 | dprintk("setting policy failed\n"); |
935 | goto err_out_unregister; | 933 | goto err_out_unregister; |
936 | } | 934 | } |
937 | 935 | ||
936 | unlock_policy_rwsem_write(cpu); | ||
937 | |||
938 | kobject_uevent(&policy->kobj, KOBJ_ADD); | 938 | kobject_uevent(&policy->kobj, KOBJ_ADD); |
939 | module_put(cpufreq_driver->owner); | 939 | module_put(cpufreq_driver->owner); |
940 | dprintk("initialization complete\n"); | 940 | dprintk("initialization complete\n"); |
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index 5c006c9a4311..c9416e657487 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c | |||
@@ -189,8 +189,8 @@ static struct aem_iana_id system_x_id = { | |||
189 | struct aem_find_firmware_req { | 189 | struct aem_find_firmware_req { |
190 | struct aem_iana_id id; | 190 | struct aem_iana_id id; |
191 | u8 rsvd; | 191 | u8 rsvd; |
192 | u16 index; | 192 | __be16 index; |
193 | u16 module_type_id; | 193 | __be16 module_type_id; |
194 | } __packed; | 194 | } __packed; |
195 | 195 | ||
196 | struct aem_find_firmware_resp { | 196 | struct aem_find_firmware_resp { |
@@ -202,7 +202,7 @@ struct aem_find_firmware_resp { | |||
202 | struct aem_find_instance_req { | 202 | struct aem_find_instance_req { |
203 | struct aem_iana_id id; | 203 | struct aem_iana_id id; |
204 | u8 instance_number; | 204 | u8 instance_number; |
205 | u16 module_type_id; | 205 | __be16 module_type_id; |
206 | } __packed; | 206 | } __packed; |
207 | 207 | ||
208 | struct aem_find_instance_resp { | 208 | struct aem_find_instance_resp { |
@@ -444,17 +444,17 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg, | |||
444 | } | 444 | } |
445 | case 2: { | 445 | case 2: { |
446 | u16 *x = buf; | 446 | u16 *x = buf; |
447 | *x = be16_to_cpup((u16 *)rs_resp->bytes); | 447 | *x = be16_to_cpup((__be16 *)rs_resp->bytes); |
448 | break; | 448 | break; |
449 | } | 449 | } |
450 | case 4: { | 450 | case 4: { |
451 | u32 *x = buf; | 451 | u32 *x = buf; |
452 | *x = be32_to_cpup((u32 *)rs_resp->bytes); | 452 | *x = be32_to_cpup((__be32 *)rs_resp->bytes); |
453 | break; | 453 | break; |
454 | } | 454 | } |
455 | case 8: { | 455 | case 8: { |
456 | u64 *x = buf; | 456 | u64 *x = buf; |
457 | *x = be64_to_cpup((u64 *)rs_resp->bytes); | 457 | *x = be64_to_cpup((__be64 *)rs_resp->bytes); |
458 | break; | 458 | break; |
459 | } | 459 | } |
460 | } | 460 | } |
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4a95adc4cc78..af58a6f1e898 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd) | |||
807 | static void atkbd_cleanup(struct serio *serio) | 807 | static void atkbd_cleanup(struct serio *serio) |
808 | { | 808 | { |
809 | struct atkbd *atkbd = serio_get_drvdata(serio); | 809 | struct atkbd *atkbd = serio_get_drvdata(serio); |
810 | |||
811 | atkbd_disable(atkbd); | ||
810 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); | 812 | ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); |
811 | } | 813 | } |
812 | 814 | ||
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 3dea0c5077a9..45767e73f071 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -136,6 +136,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
136 | set_bit(code, input_dev->keybit); | 136 | set_bit(code, input_dev->keybit); |
137 | } | 137 | } |
138 | 138 | ||
139 | for (i = 0; i < pdata->direct_key_num; i++) | ||
140 | set_bit(pdata->direct_key_map[i], input_dev->keybit); | ||
141 | |||
139 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; | 142 | keypad->rotary_up_key[0] = pdata->rotary0_up_key; |
140 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; | 143 | keypad->rotary_up_key[1] = pdata->rotary1_up_key; |
141 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; | 144 | keypad->rotary_down_key[0] = pdata->rotary0_down_key; |
@@ -143,17 +146,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) | |||
143 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; | 146 | keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; |
144 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; | 147 | keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; |
145 | 148 | ||
146 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { | 149 | if (pdata->enable_rotary0) { |
147 | set_bit(pdata->rotary0_up_key, input_dev->keybit); | 150 | if (pdata->rotary0_up_key && pdata->rotary0_down_key) { |
148 | set_bit(pdata->rotary0_down_key, input_dev->keybit); | 151 | set_bit(pdata->rotary0_up_key, input_dev->keybit); |
149 | } else | 152 | set_bit(pdata->rotary0_down_key, input_dev->keybit); |
150 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | 153 | } else |
151 | 154 | set_bit(pdata->rotary0_rel_code, input_dev->relbit); | |
152 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { | 155 | } |
153 | set_bit(pdata->rotary1_up_key, input_dev->keybit); | 156 | |
154 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | 157 | if (pdata->enable_rotary1) { |
155 | } else | 158 | if (pdata->rotary1_up_key && pdata->rotary1_down_key) { |
156 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | 159 | set_bit(pdata->rotary1_up_key, input_dev->keybit); |
160 | set_bit(pdata->rotary1_down_key, input_dev->keybit); | ||
161 | } else | ||
162 | set_bit(pdata->rotary1_rel_code, input_dev->relbit); | ||
163 | } | ||
157 | } | 164 | } |
158 | 165 | ||
159 | static inline unsigned int lookup_matrix_keycode( | 166 | static inline unsigned int lookup_matrix_keycode( |
@@ -484,8 +491,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
484 | keypad->input_dev = input_dev; | 491 | keypad->input_dev = input_dev; |
485 | input_set_drvdata(input_dev, keypad); | 492 | input_set_drvdata(input_dev, keypad); |
486 | 493 | ||
487 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | | 494 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); |
488 | BIT_MASK(EV_REL); | 495 | if ((keypad->pdata->enable_rotary0 && |
496 | keypad->pdata->rotary0_rel_code) || | ||
497 | (keypad->pdata->enable_rotary1 && | ||
498 | keypad->pdata->rotary1_rel_code)) { | ||
499 | input_dev->evbit[0] |= BIT_MASK(EV_REL); | ||
500 | } | ||
489 | 501 | ||
490 | pxa27x_keypad_build_keycode(keypad); | 502 | pxa27x_keypad_build_keycode(keypad); |
491 | platform_set_drvdata(pdev, keypad); | 503 | platform_set_drvdata(pdev, keypad); |
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c index 9531d8c7444f..d82f7f727f7a 100644 --- a/drivers/input/misc/apanel.c +++ b/drivers/input/misc/apanel.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/module.h> | ||
24 | #include <linux/input-polldev.h> | 23 | #include <linux/input-polldev.h> |
25 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
26 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 5ece9f56babc..9aafa96cb746 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -331,6 +331,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { | |||
331 | }, | 331 | }, |
332 | }, | 332 | }, |
333 | { | 333 | { |
334 | .ident = "Acer TravelMate 660", | ||
335 | .matches = { | ||
336 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
337 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), | ||
338 | }, | ||
339 | }, | ||
340 | { | ||
334 | .ident = "Acer TravelMate 2490", | 341 | .ident = "Acer TravelMate 2490", |
335 | .matches = { | 342 | .matches = { |
336 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 343 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 65a74cfc187b..592ff55b62d0 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -885,6 +885,20 @@ static long i8042_panic_blink(long count) | |||
885 | 885 | ||
886 | #undef DELAY | 886 | #undef DELAY |
887 | 887 | ||
888 | #ifdef CONFIG_X86 | ||
889 | static void i8042_dritek_enable(void) | ||
890 | { | ||
891 | char param = 0x90; | ||
892 | int error; | ||
893 | |||
894 | error = i8042_command(¶m, 0x1059); | ||
895 | if (error) | ||
896 | printk(KERN_WARNING | ||
897 | "Failed to enable DRITEK extension: %d\n", | ||
898 | error); | ||
899 | } | ||
900 | #endif | ||
901 | |||
888 | #ifdef CONFIG_PM | 902 | #ifdef CONFIG_PM |
889 | /* | 903 | /* |
890 | * Here we try to restore the original BIOS settings. We only want to | 904 | * Here we try to restore the original BIOS settings. We only want to |
@@ -942,6 +956,12 @@ static int i8042_resume(struct platform_device *dev) | |||
942 | return -EIO; | 956 | return -EIO; |
943 | } | 957 | } |
944 | 958 | ||
959 | |||
960 | #ifdef CONFIG_X86 | ||
961 | if (i8042_dritek) | ||
962 | i8042_dritek_enable(); | ||
963 | #endif | ||
964 | |||
945 | if (i8042_mux_present) { | 965 | if (i8042_mux_present) { |
946 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) | 966 | if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) |
947 | printk(KERN_WARNING | 967 | printk(KERN_WARNING |
@@ -1160,6 +1180,11 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1160 | if (error) | 1180 | if (error) |
1161 | return error; | 1181 | return error; |
1162 | 1182 | ||
1183 | #ifdef CONFIG_X86 | ||
1184 | if (i8042_dritek) | ||
1185 | i8042_dritek_enable(); | ||
1186 | #endif | ||
1187 | |||
1163 | if (!i8042_noaux) { | 1188 | if (!i8042_noaux) { |
1164 | error = i8042_setup_aux(); | 1189 | error = i8042_setup_aux(); |
1165 | if (error && error != -ENODEV && error != -EBUSY) | 1190 | if (error && error != -ENODEV && error != -EBUSY) |
@@ -1171,14 +1196,6 @@ static int __devinit i8042_probe(struct platform_device *dev) | |||
1171 | if (error) | 1196 | if (error) |
1172 | goto out_fail; | 1197 | goto out_fail; |
1173 | } | 1198 | } |
1174 | #ifdef CONFIG_X86 | ||
1175 | if (i8042_dritek) { | ||
1176 | char param = 0x90; | ||
1177 | error = i8042_command(¶m, 0x1059); | ||
1178 | if (error) | ||
1179 | goto out_fail; | ||
1180 | } | ||
1181 | #endif | ||
1182 | /* | 1199 | /* |
1183 | * Ok, everything is ready, let's register all serio ports | 1200 | * Ok, everything is ready, let's register all serio ports |
1184 | */ | 1201 | */ |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index c5a8661a1baa..1e748e46d12e 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
830 | struct gtco *gtco; | 830 | struct gtco *gtco; |
831 | struct input_dev *input_dev; | 831 | struct input_dev *input_dev; |
832 | struct hid_descriptor *hid_desc; | 832 | struct hid_descriptor *hid_desc; |
833 | char *report = NULL; | 833 | char *report; |
834 | int result = 0, retry; | 834 | int result = 0, retry; |
835 | int error; | 835 | int error; |
836 | struct usb_endpoint_descriptor *endpoint; | 836 | struct usb_endpoint_descriptor *endpoint; |
@@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
916 | le16_to_cpu(hid_desc->wDescriptorLength), | 916 | le16_to_cpu(hid_desc->wDescriptorLength), |
917 | 5000); /* 5 secs */ | 917 | 5000); /* 5 secs */ |
918 | 918 | ||
919 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) | 919 | dbg("usb_control_msg result: %d", result); |
920 | if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { | ||
921 | parse_hid_report_descriptor(gtco, report, result); | ||
920 | break; | 922 | break; |
923 | } | ||
921 | } | 924 | } |
922 | 925 | ||
926 | kfree(report); | ||
927 | |||
923 | /* If we didn't get the report, fail */ | 928 | /* If we didn't get the report, fail */ |
924 | dbg("usb_control_msg result: :%d", result); | ||
925 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { | 929 | if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { |
926 | err("Failed to get HID Report Descriptor of size: %d", | 930 | err("Failed to get HID Report Descriptor of size: %d", |
927 | hid_desc->wDescriptorLength); | 931 | hid_desc->wDescriptorLength); |
@@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
929 | goto err_free_urb; | 933 | goto err_free_urb; |
930 | } | 934 | } |
931 | 935 | ||
932 | /* Now we parse the report */ | ||
933 | parse_hid_report_descriptor(gtco, report, result); | ||
934 | |||
935 | /* Now we delete it */ | ||
936 | kfree(report); | ||
937 | |||
938 | /* Create a device file node */ | 936 | /* Create a device file node */ |
939 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); | 937 | usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); |
940 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); | 938 | strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); |
@@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface, | |||
988 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, | 986 | usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, |
989 | gtco->buffer, gtco->buf_dma); | 987 | gtco->buffer, gtco->buf_dma); |
990 | err_free_devs: | 988 | err_free_devs: |
991 | kfree(report); | ||
992 | input_free_device(input_dev); | 989 | input_free_device(input_dev); |
993 | kfree(gtco); | 990 | kfree(gtco); |
994 | return error; | 991 | return error; |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 01278bd7e65c..838458792ea0 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -85,6 +85,15 @@ module_param(delay, int, 0); | |||
85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); | 85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Set five_wire = 1 to use a 5 wire touchscreen. | ||
89 | * | ||
90 | * NOTE: Five wire mode does not allow for readback of pressure. | ||
91 | */ | ||
92 | static int five_wire; | ||
93 | module_param(five_wire, int, 0); | ||
94 | MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); | ||
95 | |||
96 | /* | ||
88 | * Set adc mask function. | 97 | * Set adc mask function. |
89 | * | 98 | * |
90 | * Sources of glitch noise, such as signals driving an LCD display, may feed | 99 | * Sources of glitch noise, such as signals driving an LCD display, may feed |
@@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm) | |||
162 | 64000 / rpu); | 171 | 64000 / rpu); |
163 | } | 172 | } |
164 | 173 | ||
174 | /* Five wire panel? */ | ||
175 | if (five_wire) { | ||
176 | dig3 |= WM9713_45W; | ||
177 | dev_info(wm->dev, "setting 5-wire touchscreen mode."); | ||
178 | |||
179 | if (pil) { | ||
180 | dev_warn(wm->dev, | ||
181 | "Pressure measurement not supported in 5 " | ||
182 | "wire mode, disabling\n"); | ||
183 | pil = 0; | ||
184 | } | ||
185 | } | ||
186 | |||
165 | /* touchpanel pressure */ | 187 | /* touchpanel pressure */ |
166 | if (pil == 2) { | 188 | if (pil == 2) { |
167 | dig3 |= WM9712_PIL; | 189 | dig3 |= WM9712_PIL; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index e9c7ea46b6e3..cdc24ad314e0 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev) | |||
608 | goto alloc_err; | 608 | goto alloc_err; |
609 | } | 609 | } |
610 | 610 | ||
611 | /* set up physical characteristics */ | ||
612 | wm->codec->phy_init(wm); | ||
613 | |||
614 | /* load gpio cache */ | ||
615 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
616 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
617 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
618 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
619 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
620 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
621 | |||
611 | wm->input_dev = input_allocate_device(); | 622 | wm->input_dev = input_allocate_device(); |
612 | if (wm->input_dev == NULL) { | 623 | if (wm->input_dev == NULL) { |
613 | ret = -ENOMEM; | 624 | ret = -ENOMEM; |
@@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev) | |||
616 | 627 | ||
617 | /* set up touch configuration */ | 628 | /* set up touch configuration */ |
618 | wm->input_dev->name = "wm97xx touchscreen"; | 629 | wm->input_dev->name = "wm97xx touchscreen"; |
630 | wm->input_dev->phys = "wm97xx"; | ||
619 | wm->input_dev->open = wm97xx_ts_input_open; | 631 | wm->input_dev->open = wm97xx_ts_input_open; |
620 | wm->input_dev->close = wm97xx_ts_input_close; | 632 | wm->input_dev->close = wm97xx_ts_input_close; |
621 | set_bit(EV_ABS, wm->input_dev->evbit); | 633 | set_bit(EV_ABS, wm->input_dev->evbit); |
@@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev) | |||
634 | if (ret < 0) | 646 | if (ret < 0) |
635 | goto dev_alloc_err; | 647 | goto dev_alloc_err; |
636 | 648 | ||
637 | /* set up physical characteristics */ | ||
638 | wm->codec->phy_init(wm); | ||
639 | |||
640 | /* load gpio cache */ | ||
641 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
642 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
643 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
644 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
645 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
646 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
647 | |||
648 | /* register our battery device */ | 649 | /* register our battery device */ |
649 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); | 650 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); |
650 | if (!wm->battery_dev) { | 651 | if (!wm->battery_dev) { |
@@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm) | |||
801 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); | 802 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); |
802 | 803 | ||
803 | static struct device_driver wm97xx_driver = { | 804 | static struct device_driver wm97xx_driver = { |
804 | .name = "ac97", | 805 | .name = "wm97xx-ts", |
805 | .bus = &ac97_bus_type, | 806 | .bus = &ac97_bus_type, |
806 | .owner = THIS_MODULE, | 807 | .owner = THIS_MODULE, |
807 | .probe = wm97xx_probe, | 808 | .probe = wm97xx_probe, |
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 8080249957af..1a8de57289eb 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -20,14 +20,11 @@ | |||
20 | /* The pointer to our (page) of device descriptions. */ | 20 | /* The pointer to our (page) of device descriptions. */ |
21 | static void *lguest_devices; | 21 | static void *lguest_devices; |
22 | 22 | ||
23 | /* Unique numbering for lguest devices. */ | ||
24 | static unsigned int dev_index; | ||
25 | |||
26 | /* For Guests, device memory can be used as normal memory, so we cast away the | 23 | /* For Guests, device memory can be used as normal memory, so we cast away the |
27 | * __iomem to quieten sparse. */ | 24 | * __iomem to quieten sparse. */ |
28 | static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) | 25 | static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) |
29 | { | 26 | { |
30 | return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages); | 27 | return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages); |
31 | } | 28 | } |
32 | 29 | ||
33 | static inline void lguest_unmap(void *addr) | 30 | static inline void lguest_unmap(void *addr) |
@@ -325,8 +322,10 @@ static struct device lguest_root = { | |||
325 | * As Andrew Tridgell says, "Untested code is buggy code". | 322 | * As Andrew Tridgell says, "Untested code is buggy code". |
326 | * | 323 | * |
327 | * It's worth reading this carefully: we start with a pointer to the new device | 324 | * It's worth reading this carefully: we start with a pointer to the new device |
328 | * descriptor in the "lguest_devices" page. */ | 325 | * descriptor in the "lguest_devices" page, and the offset into the device |
329 | static void add_lguest_device(struct lguest_device_desc *d) | 326 | * descriptor page so we can uniquely identify it if things go badly wrong. */ |
327 | static void add_lguest_device(struct lguest_device_desc *d, | ||
328 | unsigned int offset) | ||
330 | { | 329 | { |
331 | struct lguest_device *ldev; | 330 | struct lguest_device *ldev; |
332 | 331 | ||
@@ -334,18 +333,14 @@ static void add_lguest_device(struct lguest_device_desc *d) | |||
334 | * it. */ | 333 | * it. */ |
335 | ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); | 334 | ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); |
336 | if (!ldev) { | 335 | if (!ldev) { |
337 | printk(KERN_EMERG "Cannot allocate lguest dev %u\n", | 336 | printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n", |
338 | dev_index++); | 337 | offset, d->type); |
339 | return; | 338 | return; |
340 | } | 339 | } |
341 | 340 | ||
342 | /* This devices' parent is the lguest/ dir. */ | 341 | /* This devices' parent is the lguest/ dir. */ |
343 | ldev->vdev.dev.parent = &lguest_root; | 342 | ldev->vdev.dev.parent = &lguest_root; |
344 | /* We have a unique device index thanks to the dev_index counter. */ | 343 | /* We have a unique device index thanks to the dev_index counter. */ |
345 | ldev->vdev.index = dev_index++; | ||
346 | /* The device type comes straight from the descriptor. There's also a | ||
347 | * device vendor field in the virtio_device struct, which we leave as | ||
348 | * 0. */ | ||
349 | ldev->vdev.id.device = d->type; | 344 | ldev->vdev.id.device = d->type; |
350 | /* We have a simple set of routines for querying the device's | 345 | /* We have a simple set of routines for querying the device's |
351 | * configuration information and setting its status. */ | 346 | * configuration information and setting its status. */ |
@@ -357,8 +352,8 @@ static void add_lguest_device(struct lguest_device_desc *d) | |||
357 | * virtio_device and calls device_register(). This makes the bus | 352 | * virtio_device and calls device_register(). This makes the bus |
358 | * infrastructure look for a matching driver. */ | 353 | * infrastructure look for a matching driver. */ |
359 | if (register_virtio_device(&ldev->vdev) != 0) { | 354 | if (register_virtio_device(&ldev->vdev) != 0) { |
360 | printk(KERN_ERR "Failed to register lguest device %u\n", | 355 | printk(KERN_ERR "Failed to register lguest dev %u type %u\n", |
361 | ldev->vdev.index); | 356 | offset, d->type); |
362 | kfree(ldev); | 357 | kfree(ldev); |
363 | } | 358 | } |
364 | } | 359 | } |
@@ -379,7 +374,7 @@ static void scan_devices(void) | |||
379 | break; | 374 | break; |
380 | 375 | ||
381 | printk("Device at %i has size %u\n", i, desc_size(d)); | 376 | printk("Device at %i has size %u\n", i, desc_size(d)); |
382 | add_lguest_device(d); | 377 | add_lguest_device(d, i); |
383 | } | 378 | } |
384 | } | 379 | } |
385 | 380 | ||
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 3f28f6eabdbf..a0ce0b2fa03e 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -3821,7 +3821,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */ | |||
3821 | #define TPACPI_LED_NUMLEDS 8 | 3821 | #define TPACPI_LED_NUMLEDS 8 |
3822 | static struct tpacpi_led_classdev *tpacpi_leds; | 3822 | static struct tpacpi_led_classdev *tpacpi_leds; |
3823 | static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; | 3823 | static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; |
3824 | static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { | 3824 | static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = { |
3825 | /* there's a limit of 19 chars + NULL before 2.6.26 */ | 3825 | /* there's a limit of 19 chars + NULL before 2.6.26 */ |
3826 | "tpacpi::power", | 3826 | "tpacpi::power", |
3827 | "tpacpi:orange:batt", | 3827 | "tpacpi:orange:batt", |
@@ -3860,10 +3860,10 @@ static int led_get_status(unsigned int led) | |||
3860 | static int led_set_status(unsigned int led, enum led_status_t ledstatus) | 3860 | static int led_set_status(unsigned int led, enum led_status_t ledstatus) |
3861 | { | 3861 | { |
3862 | /* off, on, blink. Index is led_status_t */ | 3862 | /* off, on, blink. Index is led_status_t */ |
3863 | static const int const led_sled_arg1[] = { 0, 1, 3 }; | 3863 | static const int led_sled_arg1[] = { 0, 1, 3 }; |
3864 | static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ | 3864 | static const int led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ |
3865 | static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ | 3865 | static const int led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ |
3866 | static const int const led_led_arg1[] = { 0, 0x80, 0xc0 }; | 3866 | static const int led_led_arg1[] = { 0, 0x80, 0xc0 }; |
3867 | 3867 | ||
3868 | int rc = 0; | 3868 | int rc = 0; |
3869 | 3869 | ||
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index a20693e09ae8..b5c1e663417d 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -2861,7 +2861,8 @@ static int s2io_poll_msix(struct napi_struct *napi, int budget) | |||
2861 | struct config_param *config; | 2861 | struct config_param *config; |
2862 | struct mac_info *mac_control; | 2862 | struct mac_info *mac_control; |
2863 | int pkts_processed = 0; | 2863 | int pkts_processed = 0; |
2864 | u8 *addr = NULL, val8 = 0; | 2864 | u8 __iomem *addr = NULL; |
2865 | u8 val8 = 0; | ||
2865 | struct s2io_nic *nic = dev->priv; | 2866 | struct s2io_nic *nic = dev->priv; |
2866 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 2867 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
2867 | int budget_org = budget; | 2868 | int budget_org = budget; |
@@ -2878,7 +2879,7 @@ static int s2io_poll_msix(struct napi_struct *napi, int budget) | |||
2878 | if (pkts_processed < budget_org) { | 2879 | if (pkts_processed < budget_org) { |
2879 | netif_rx_complete(dev, napi); | 2880 | netif_rx_complete(dev, napi); |
2880 | /*Re Enable MSI-Rx Vector*/ | 2881 | /*Re Enable MSI-Rx Vector*/ |
2881 | addr = (u8 *)&bar0->xmsi_mask_reg; | 2882 | addr = (u8 __iomem *)&bar0->xmsi_mask_reg; |
2882 | addr += 7 - ring->ring_no; | 2883 | addr += 7 - ring->ring_no; |
2883 | val8 = (ring->ring_no == 0) ? 0x3f : 0xbf; | 2884 | val8 = (ring->ring_no == 0) ? 0x3f : 0xbf; |
2884 | writeb(val8, addr); | 2885 | writeb(val8, addr); |
@@ -4364,9 +4365,10 @@ static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id) | |||
4364 | return IRQ_HANDLED; | 4365 | return IRQ_HANDLED; |
4365 | 4366 | ||
4366 | if (sp->config.napi) { | 4367 | if (sp->config.napi) { |
4367 | u8 *addr = NULL, val8 = 0; | 4368 | u8 __iomem *addr = NULL; |
4369 | u8 val8 = 0; | ||
4368 | 4370 | ||
4369 | addr = (u8 *)&bar0->xmsi_mask_reg; | 4371 | addr = (u8 __iomem *)&bar0->xmsi_mask_reg; |
4370 | addr += (7 - ring->ring_no); | 4372 | addr += (7 - ring->ring_no); |
4371 | val8 = (ring->ring_no == 0) ? 0x7f : 0xff; | 4373 | val8 = (ring->ring_no == 0) ? 0x7f : 0xff; |
4372 | writeb(val8, addr); | 4374 | writeb(val8, addr); |
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 37783cdd301a..dfa4bdd5597c 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -737,6 +737,7 @@ struct b43_wl { | |||
737 | struct ieee80211_tx_control beacon_txctl; | 737 | struct ieee80211_tx_control beacon_txctl; |
738 | bool beacon0_uploaded; | 738 | bool beacon0_uploaded; |
739 | bool beacon1_uploaded; | 739 | bool beacon1_uploaded; |
740 | bool beacon_templates_virgin; /* Never wrote the templates? */ | ||
740 | struct work_struct beacon_update_trigger; | 741 | struct work_struct beacon_update_trigger; |
741 | 742 | ||
742 | /* The current QOS parameters for the 4 queues. | 743 | /* The current QOS parameters for the 4 queues. |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 8fdba9415c04..6c3d9ea0a9f8 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -1544,6 +1544,30 @@ static void b43_write_probe_resp_template(struct b43_wldev *dev, | |||
1544 | kfree(probe_resp_data); | 1544 | kfree(probe_resp_data); |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | static void b43_upload_beacon0(struct b43_wldev *dev) | ||
1548 | { | ||
1549 | struct b43_wl *wl = dev->wl; | ||
1550 | |||
1551 | if (wl->beacon0_uploaded) | ||
1552 | return; | ||
1553 | b43_write_beacon_template(dev, 0x68, 0x18); | ||
1554 | /* FIXME: Probe resp upload doesn't really belong here, | ||
1555 | * but we don't use that feature anyway. */ | ||
1556 | b43_write_probe_resp_template(dev, 0x268, 0x4A, | ||
1557 | &__b43_ratetable[3]); | ||
1558 | wl->beacon0_uploaded = 1; | ||
1559 | } | ||
1560 | |||
1561 | static void b43_upload_beacon1(struct b43_wldev *dev) | ||
1562 | { | ||
1563 | struct b43_wl *wl = dev->wl; | ||
1564 | |||
1565 | if (wl->beacon1_uploaded) | ||
1566 | return; | ||
1567 | b43_write_beacon_template(dev, 0x468, 0x1A); | ||
1568 | wl->beacon1_uploaded = 1; | ||
1569 | } | ||
1570 | |||
1547 | static void handle_irq_beacon(struct b43_wldev *dev) | 1571 | static void handle_irq_beacon(struct b43_wldev *dev) |
1548 | { | 1572 | { |
1549 | struct b43_wl *wl = dev->wl; | 1573 | struct b43_wl *wl = dev->wl; |
@@ -1568,24 +1592,27 @@ static void handle_irq_beacon(struct b43_wldev *dev) | |||
1568 | return; | 1592 | return; |
1569 | } | 1593 | } |
1570 | 1594 | ||
1571 | if (!beacon0_valid) { | 1595 | if (unlikely(wl->beacon_templates_virgin)) { |
1572 | if (!wl->beacon0_uploaded) { | 1596 | /* We never uploaded a beacon before. |
1573 | b43_write_beacon_template(dev, 0x68, 0x18); | 1597 | * Upload both templates now, but only mark one valid. */ |
1574 | b43_write_probe_resp_template(dev, 0x268, 0x4A, | 1598 | wl->beacon_templates_virgin = 0; |
1575 | &__b43_ratetable[3]); | 1599 | b43_upload_beacon0(dev); |
1576 | wl->beacon0_uploaded = 1; | 1600 | b43_upload_beacon1(dev); |
1577 | } | ||
1578 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | 1601 | cmd = b43_read32(dev, B43_MMIO_MACCMD); |
1579 | cmd |= B43_MACCMD_BEACON0_VALID; | 1602 | cmd |= B43_MACCMD_BEACON0_VALID; |
1580 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | 1603 | b43_write32(dev, B43_MMIO_MACCMD, cmd); |
1581 | } else if (!beacon1_valid) { | 1604 | } else { |
1582 | if (!wl->beacon1_uploaded) { | 1605 | if (!beacon0_valid) { |
1583 | b43_write_beacon_template(dev, 0x468, 0x1A); | 1606 | b43_upload_beacon0(dev); |
1584 | wl->beacon1_uploaded = 1; | 1607 | cmd = b43_read32(dev, B43_MMIO_MACCMD); |
1608 | cmd |= B43_MACCMD_BEACON0_VALID; | ||
1609 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1610 | } else if (!beacon1_valid) { | ||
1611 | b43_upload_beacon1(dev); | ||
1612 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | ||
1613 | cmd |= B43_MACCMD_BEACON1_VALID; | ||
1614 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1585 | } | 1615 | } |
1586 | cmd = b43_read32(dev, B43_MMIO_MACCMD); | ||
1587 | cmd |= B43_MACCMD_BEACON1_VALID; | ||
1588 | b43_write32(dev, B43_MMIO_MACCMD, cmd); | ||
1589 | } | 1616 | } |
1590 | } | 1617 | } |
1591 | 1618 | ||
@@ -4073,6 +4100,9 @@ static int b43_op_start(struct ieee80211_hw *hw) | |||
4073 | wl->filter_flags = 0; | 4100 | wl->filter_flags = 0; |
4074 | wl->radiotap_enabled = 0; | 4101 | wl->radiotap_enabled = 0; |
4075 | b43_qos_clear(wl); | 4102 | b43_qos_clear(wl); |
4103 | wl->beacon0_uploaded = 0; | ||
4104 | wl->beacon1_uploaded = 0; | ||
4105 | wl->beacon_templates_virgin = 1; | ||
4076 | 4106 | ||
4077 | /* First register RFkill. | 4107 | /* First register RFkill. |
4078 | * LEDs that are registered later depend on it. */ | 4108 | * LEDs that are registered later depend on it. */ |
@@ -4241,7 +4271,9 @@ static void b43_chip_reset(struct work_struct *work) | |||
4241 | goto out; | 4271 | goto out; |
4242 | } | 4272 | } |
4243 | } | 4273 | } |
4244 | out: | 4274 | out: |
4275 | if (err) | ||
4276 | wl->current_dev = NULL; /* Failed to init the dev. */ | ||
4245 | mutex_unlock(&wl->mutex); | 4277 | mutex_unlock(&wl->mutex); |
4246 | if (err) | 4278 | if (err) |
4247 | b43err(wl, "Controller restart FAILED\n"); | 4279 | b43err(wl, "Controller restart FAILED\n"); |
@@ -4382,9 +4414,11 @@ static void b43_one_core_detach(struct ssb_device *dev) | |||
4382 | struct b43_wldev *wldev; | 4414 | struct b43_wldev *wldev; |
4383 | struct b43_wl *wl; | 4415 | struct b43_wl *wl; |
4384 | 4416 | ||
4417 | /* Do not cancel ieee80211-workqueue based work here. | ||
4418 | * See comment in b43_remove(). */ | ||
4419 | |||
4385 | wldev = ssb_get_drvdata(dev); | 4420 | wldev = ssb_get_drvdata(dev); |
4386 | wl = wldev->wl; | 4421 | wl = wldev->wl; |
4387 | cancel_work_sync(&wldev->restart_work); | ||
4388 | b43_debugfs_remove_device(wldev); | 4422 | b43_debugfs_remove_device(wldev); |
4389 | b43_wireless_core_detach(wldev); | 4423 | b43_wireless_core_detach(wldev); |
4390 | list_del(&wldev->list); | 4424 | list_del(&wldev->list); |
@@ -4569,6 +4603,10 @@ static void b43_remove(struct ssb_device *dev) | |||
4569 | struct b43_wl *wl = ssb_get_devtypedata(dev); | 4603 | struct b43_wl *wl = ssb_get_devtypedata(dev); |
4570 | struct b43_wldev *wldev = ssb_get_drvdata(dev); | 4604 | struct b43_wldev *wldev = ssb_get_drvdata(dev); |
4571 | 4605 | ||
4606 | /* We must cancel any work here before unregistering from ieee80211, | ||
4607 | * as the ieee80211 unreg will destroy the workqueue. */ | ||
4608 | cancel_work_sync(&wldev->restart_work); | ||
4609 | |||
4572 | B43_WARN_ON(!wl); | 4610 | B43_WARN_ON(!wl); |
4573 | if (wl->current_dev == wldev) | 4611 | if (wl->current_dev == wldev) |
4574 | ieee80211_unregister_hw(wl->hw); | 4612 | ieee80211_unregister_hw(wl->hw); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index c9847b1a67f7..3a7f0cb710ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c | |||
@@ -1162,7 +1162,6 @@ static s32 rs_get_best_rate(struct iwl_priv *priv, | |||
1162 | 1162 | ||
1163 | /* Higher rate not available, use the original */ | 1163 | /* Higher rate not available, use the original */ |
1164 | } else { | 1164 | } else { |
1165 | new_rate = rate; | ||
1166 | break; | 1165 | break; |
1167 | } | 1166 | } |
1168 | } | 1167 | } |
@@ -2009,7 +2008,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
2009 | * 2) Not just finishing up a search | 2008 | * 2) Not just finishing up a search |
2010 | * 3) Allowing a new search | 2009 | * 3) Allowing a new search |
2011 | */ | 2010 | */ |
2012 | if (!update_lq && !done_search && !lq_sta->stay_in_tbl) { | 2011 | if (!update_lq && !done_search && !lq_sta->stay_in_tbl && window->counter) { |
2013 | /* Save current throughput to compare with "search" throughput*/ | 2012 | /* Save current throughput to compare with "search" throughput*/ |
2014 | lq_sta->last_tpt = current_tpt; | 2013 | lq_sta->last_tpt = current_tpt; |
2015 | 2014 | ||
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index d0b1fb15c709..18c9931e3267 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -116,6 +116,7 @@ MODULE_PARM_DESC(workaround_interval, | |||
116 | #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) | 116 | #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) |
117 | #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) | 117 | #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) |
118 | #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) | 118 | #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) |
119 | #define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f) | ||
119 | #define OID_802_11_PMKID ccpu2(0x0d010123) | 120 | #define OID_802_11_PMKID ccpu2(0x0d010123) |
120 | #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) | 121 | #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) |
121 | #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) | 122 | #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) |
@@ -271,6 +272,26 @@ struct ndis_config_param { | |||
271 | __le32 value_length; | 272 | __le32 value_length; |
272 | } __attribute__((packed)); | 273 | } __attribute__((packed)); |
273 | 274 | ||
275 | struct ndis_80211_assoc_info { | ||
276 | __le32 length; | ||
277 | __le16 req_ies; | ||
278 | struct req_ie { | ||
279 | __le16 capa; | ||
280 | __le16 listen_interval; | ||
281 | u8 cur_ap_address[6]; | ||
282 | } req_ie; | ||
283 | __le32 req_ie_length; | ||
284 | __le32 offset_req_ies; | ||
285 | __le16 resp_ies; | ||
286 | struct resp_ie { | ||
287 | __le16 capa; | ||
288 | __le16 status_code; | ||
289 | __le16 assoc_id; | ||
290 | } resp_ie; | ||
291 | __le32 resp_ie_length; | ||
292 | __le32 offset_resp_ies; | ||
293 | } __attribute__((packed)); | ||
294 | |||
274 | /* these have to match what is in wpa_supplicant */ | 295 | /* these have to match what is in wpa_supplicant */ |
275 | enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; | 296 | enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; |
276 | enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, | 297 | enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, |
@@ -674,6 +695,12 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) | |||
674 | return ret; | 695 | return ret; |
675 | } | 696 | } |
676 | 697 | ||
698 | static int get_association_info(struct usbnet *usbdev, | ||
699 | struct ndis_80211_assoc_info *info, int len) | ||
700 | { | ||
701 | return rndis_query_oid(usbdev, OID_802_11_ASSOCIATION_INFORMATION, | ||
702 | info, &len); | ||
703 | } | ||
677 | 704 | ||
678 | static int is_associated(struct usbnet *usbdev) | 705 | static int is_associated(struct usbnet *usbdev) |
679 | { | 706 | { |
@@ -2182,11 +2209,40 @@ static void rndis_wext_worker(struct work_struct *work) | |||
2182 | struct usbnet *usbdev = priv->usbdev; | 2209 | struct usbnet *usbdev = priv->usbdev; |
2183 | union iwreq_data evt; | 2210 | union iwreq_data evt; |
2184 | unsigned char bssid[ETH_ALEN]; | 2211 | unsigned char bssid[ETH_ALEN]; |
2185 | int ret; | 2212 | struct ndis_80211_assoc_info *info; |
2213 | int assoc_size = sizeof(*info) + IW_CUSTOM_MAX + 32; | ||
2214 | int ret, offset; | ||
2186 | 2215 | ||
2187 | if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { | 2216 | if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { |
2188 | ret = get_bssid(usbdev, bssid); | 2217 | info = kzalloc(assoc_size, GFP_KERNEL); |
2218 | if (!info) | ||
2219 | goto get_bssid; | ||
2220 | |||
2221 | /* Get association info IEs from device and send them back to | ||
2222 | * userspace. */ | ||
2223 | ret = get_association_info(usbdev, info, assoc_size); | ||
2224 | if (!ret) { | ||
2225 | evt.data.length = le32_to_cpu(info->req_ie_length); | ||
2226 | if (evt.data.length > 0) { | ||
2227 | offset = le32_to_cpu(info->offset_req_ies); | ||
2228 | wireless_send_event(usbdev->net, | ||
2229 | IWEVASSOCREQIE, &evt, | ||
2230 | (char *)info + offset); | ||
2231 | } | ||
2232 | |||
2233 | evt.data.length = le32_to_cpu(info->resp_ie_length); | ||
2234 | if (evt.data.length > 0) { | ||
2235 | offset = le32_to_cpu(info->offset_resp_ies); | ||
2236 | wireless_send_event(usbdev->net, | ||
2237 | IWEVASSOCRESPIE, &evt, | ||
2238 | (char *)info + offset); | ||
2239 | } | ||
2240 | } | ||
2241 | |||
2242 | kfree(info); | ||
2189 | 2243 | ||
2244 | get_bssid: | ||
2245 | ret = get_bssid(usbdev, bssid); | ||
2190 | if (!ret) { | 2246 | if (!ret) { |
2191 | evt.data.flags = 0; | 2247 | evt.data.flags = 0; |
2192 | evt.data.length = 0; | 2248 | evt.data.length = 0; |
@@ -2414,6 +2470,11 @@ static int bcm4320_early_init(struct usbnet *dev) | |||
2414 | else if (priv->param_power_save > 2) | 2470 | else if (priv->param_power_save > 2) |
2415 | priv->param_power_save = 2; | 2471 | priv->param_power_save = 2; |
2416 | 2472 | ||
2473 | if (priv->param_power_output < 0) | ||
2474 | priv->param_power_output = 0; | ||
2475 | else if (priv->param_power_output > 3) | ||
2476 | priv->param_power_output = 3; | ||
2477 | |||
2417 | if (priv->param_roamtrigger < -80) | 2478 | if (priv->param_roamtrigger < -80) |
2418 | priv->param_roamtrigger = -80; | 2479 | priv->param_roamtrigger = -80; |
2419 | else if (priv->param_roamtrigger > -60) | 2480 | else if (priv->param_roamtrigger > -60) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 57bdc153952f..611d98320593 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -328,6 +328,11 @@ static inline int rt2x00_get_link_ant_rssi(struct link *link) | |||
328 | return DEFAULT_RSSI; | 328 | return DEFAULT_RSSI; |
329 | } | 329 | } |
330 | 330 | ||
331 | static inline void rt2x00_reset_link_ant_rssi(struct link *link) | ||
332 | { | ||
333 | link->ant.rssi_ant = 0; | ||
334 | } | ||
335 | |||
331 | static inline int rt2x00_get_link_ant_rssi_history(struct link *link, | 336 | static inline int rt2x00_get_link_ant_rssi_history(struct link *link, |
332 | enum antenna ant) | 337 | enum antenna ant) |
333 | { | 338 | { |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index a9930a03f450..48608e8cc8b4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -129,6 +129,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | |||
129 | */ | 129 | */ |
130 | rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); | 130 | rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); |
131 | rt2x00lib_reset_link_tuner(rt2x00dev); | 131 | rt2x00lib_reset_link_tuner(rt2x00dev); |
132 | rt2x00_reset_link_ant_rssi(&rt2x00dev->link); | ||
132 | 133 | ||
133 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; | 134 | rt2x00dev->link.ant.active.rx = libconf.ant.rx; |
134 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; | 135 | rt2x00dev->link.ant.active.tx = libconf.ant.tx; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index b22c02737185..2673d568bcac 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -483,9 +483,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) | |||
483 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) | 483 | if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) |
484 | return; | 484 | return; |
485 | 485 | ||
486 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, | 486 | ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, |
487 | rt2x00lib_beacondone_iter, | 487 | rt2x00lib_beacondone_iter, |
488 | rt2x00dev); | 488 | rt2x00dev); |
489 | 489 | ||
490 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); | 490 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); |
491 | } | 491 | } |
@@ -507,7 +507,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
507 | * Update TX statistics. | 507 | * Update TX statistics. |
508 | */ | 508 | */ |
509 | rt2x00dev->link.qual.tx_success += success; | 509 | rt2x00dev->link.qual.tx_success += success; |
510 | rt2x00dev->link.qual.tx_failed += txdesc->retry + fail; | 510 | rt2x00dev->link.qual.tx_failed += fail; |
511 | 511 | ||
512 | /* | 512 | /* |
513 | * Initialize TX status | 513 | * Initialize TX status |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index c206b5092070..87e280a21971 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -93,6 +93,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
93 | */ | 93 | */ |
94 | if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { | 94 | if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { |
95 | ieee80211_stop_queues(hw); | 95 | ieee80211_stop_queues(hw); |
96 | dev_kfree_skb_any(skb); | ||
96 | return NETDEV_TX_OK; | 97 | return NETDEV_TX_OK; |
97 | } | 98 | } |
98 | 99 | ||
diff --git a/drivers/net/wireless/rtl8180_grf5101.c b/drivers/net/wireless/rtl8180_grf5101.c index 5d47935dbac3..947ee55f18b2 100644 --- a/drivers/net/wireless/rtl8180_grf5101.c +++ b/drivers/net/wireless/rtl8180_grf5101.c | |||
@@ -88,7 +88,7 @@ static void grf5101_rf_set_channel(struct ieee80211_hw *dev, | |||
88 | write_grf5101(dev, 0x0B, chan); | 88 | write_grf5101(dev, 0x0B, chan); |
89 | write_grf5101(dev, 0x07, 0x1000); | 89 | write_grf5101(dev, 0x07, 0x1000); |
90 | 90 | ||
91 | grf5101_write_phy_antenna(dev, chan); | 91 | grf5101_write_phy_antenna(dev, channel); |
92 | } | 92 | } |
93 | 93 | ||
94 | static void grf5101_rf_stop(struct ieee80211_hw *dev) | 94 | static void grf5101_rf_stop(struct ieee80211_hw *dev) |
diff --git a/drivers/net/wireless/rtl8180_max2820.c b/drivers/net/wireless/rtl8180_max2820.c index a34dfd382b6d..6c825fd7f3b6 100644 --- a/drivers/net/wireless/rtl8180_max2820.c +++ b/drivers/net/wireless/rtl8180_max2820.c | |||
@@ -78,7 +78,8 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, | |||
78 | struct ieee80211_conf *conf) | 78 | struct ieee80211_conf *conf) |
79 | { | 79 | { |
80 | struct rtl8180_priv *priv = dev->priv; | 80 | struct rtl8180_priv *priv = dev->priv; |
81 | int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); | 81 | int channel = conf ? |
82 | ieee80211_frequency_to_channel(conf->channel->center_freq) : 1; | ||
82 | unsigned int chan_idx = channel - 1; | 83 | unsigned int chan_idx = channel - 1; |
83 | u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; | 84 | u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; |
84 | u32 chan = max2820_chan[chan_idx]; | 85 | u32 chan = max2820_chan[chan_idx]; |
@@ -87,7 +88,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, | |||
87 | * sa2400, for MAXIM we do this directly from BB */ | 88 | * sa2400, for MAXIM we do this directly from BB */ |
88 | rtl8180_write_phy(dev, 3, txpw); | 89 | rtl8180_write_phy(dev, 3, txpw); |
89 | 90 | ||
90 | max2820_write_phy_antenna(dev, chan); | 91 | max2820_write_phy_antenna(dev, channel); |
91 | write_max2820(dev, 3, chan); | 92 | write_max2820(dev, 3, chan); |
92 | } | 93 | } |
93 | 94 | ||
diff --git a/drivers/net/wireless/rtl8180_sa2400.c b/drivers/net/wireless/rtl8180_sa2400.c index 0311b4ea124c..cea4e0ccb92d 100644 --- a/drivers/net/wireless/rtl8180_sa2400.c +++ b/drivers/net/wireless/rtl8180_sa2400.c | |||
@@ -86,7 +86,7 @@ static void sa2400_rf_set_channel(struct ieee80211_hw *dev, | |||
86 | 86 | ||
87 | write_sa2400(dev, 7, txpw); | 87 | write_sa2400(dev, 7, txpw); |
88 | 88 | ||
89 | sa2400_write_phy_antenna(dev, chan); | 89 | sa2400_write_phy_antenna(dev, channel); |
90 | 90 | ||
91 | write_sa2400(dev, 0, chan); | 91 | write_sa2400(dev, 0, chan); |
92 | write_sa2400(dev, 1, 0xbb50); | 92 | write_sa2400(dev, 1, 0xbb50); |
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c index e32148a8fa12..779c5db71be4 100644 --- a/drivers/pci/hotplug/rpadlpar_sysfs.c +++ b/drivers/pci/hotplug/rpadlpar_sysfs.c | |||
@@ -18,8 +18,12 @@ | |||
18 | #include "rpadlpar.h" | 18 | #include "rpadlpar.h" |
19 | 19 | ||
20 | #define DLPAR_KOBJ_NAME "control" | 20 | #define DLPAR_KOBJ_NAME "control" |
21 | #define ADD_SLOT_ATTR_NAME "add_slot" | 21 | |
22 | #define REMOVE_SLOT_ATTR_NAME "remove_slot" | 22 | /* Those two have no quotes because they are passed to __ATTR() which |
23 | * stringifies the argument (yuck !) | ||
24 | */ | ||
25 | #define ADD_SLOT_ATTR_NAME add_slot | ||
26 | #define REMOVE_SLOT_ATTR_NAME remove_slot | ||
23 | 27 | ||
24 | #define MAX_DRC_NAME_LEN 64 | 28 | #define MAX_DRC_NAME_LEN 64 |
25 | 29 | ||
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 0a6cea1316b4..52d0aa8c2e7a 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -352,6 +352,7 @@ static struct of_device_id electra_cf_match[] = { | |||
352 | }, | 352 | }, |
353 | {}, | 353 | {}, |
354 | }; | 354 | }; |
355 | MODULE_DEVICE_TABLE(of, electra_cf_match); | ||
355 | 356 | ||
356 | static struct of_platform_driver electra_cf_driver = { | 357 | static struct of_platform_driver electra_cf_driver = { |
357 | .name = (char *)driver_name, | 358 | .name = (char *)driver_name, |
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index e2b7de4cb05e..1ff3bb585ab2 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -286,7 +286,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) | |||
286 | pci_name(pdev), i, | 286 | pci_name(pdev), i, |
287 | (unsigned long long) pci_start, | 287 | (unsigned long long) pci_start, |
288 | (unsigned long long) pci_end); | 288 | (unsigned long long) pci_end); |
289 | res->flags = 0; | 289 | res->flags |= IORESOURCE_DISABLED; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | } | 292 | } |
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c index 9c2496dbeee4..8f0a570509c5 100644 --- a/drivers/pnp/system.c +++ b/drivers/pnp/system.c | |||
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { | 83 | for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { |
84 | if (res->flags & IORESOURCE_UNSET) | 84 | if (res->flags & IORESOURCE_DISABLED) |
85 | continue; | 85 | continue; |
86 | 86 | ||
87 | reserve_range(dev, res->start, res->end, 0); | 87 | reserve_range(dev, res->start, res->end, 0); |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 8ba3f135da22..1a4025683362 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -63,6 +63,7 @@ static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); | |||
63 | */ | 63 | */ |
64 | static wait_queue_head_t dasd_init_waitq; | 64 | static wait_queue_head_t dasd_init_waitq; |
65 | static wait_queue_head_t dasd_flush_wq; | 65 | static wait_queue_head_t dasd_flush_wq; |
66 | static wait_queue_head_t generic_waitq; | ||
66 | 67 | ||
67 | /* | 68 | /* |
68 | * Allocate memory for a new device structure. | 69 | * Allocate memory for a new device structure. |
@@ -1151,11 +1152,15 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1151 | struct list_head *l, *n; | 1152 | struct list_head *l, *n; |
1152 | struct dasd_ccw_req *cqr; | 1153 | struct dasd_ccw_req *cqr; |
1153 | struct dasd_block *block; | 1154 | struct dasd_block *block; |
1155 | void (*callback)(struct dasd_ccw_req *, void *data); | ||
1156 | void *callback_data; | ||
1154 | 1157 | ||
1155 | list_for_each_safe(l, n, final_queue) { | 1158 | list_for_each_safe(l, n, final_queue) { |
1156 | cqr = list_entry(l, struct dasd_ccw_req, devlist); | 1159 | cqr = list_entry(l, struct dasd_ccw_req, devlist); |
1157 | list_del_init(&cqr->devlist); | 1160 | list_del_init(&cqr->devlist); |
1158 | block = cqr->block; | 1161 | block = cqr->block; |
1162 | callback = cqr->callback; | ||
1163 | callback_data = cqr->callback_data; | ||
1159 | if (block) | 1164 | if (block) |
1160 | spin_lock_bh(&block->queue_lock); | 1165 | spin_lock_bh(&block->queue_lock); |
1161 | switch (cqr->status) { | 1166 | switch (cqr->status) { |
@@ -1176,7 +1181,7 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, | |||
1176 | BUG(); | 1181 | BUG(); |
1177 | } | 1182 | } |
1178 | if (cqr->callback != NULL) | 1183 | if (cqr->callback != NULL) |
1179 | (cqr->callback)(cqr, cqr->callback_data); | 1184 | (callback)(cqr, callback_data); |
1180 | if (block) | 1185 | if (block) |
1181 | spin_unlock_bh(&block->queue_lock); | 1186 | spin_unlock_bh(&block->queue_lock); |
1182 | } | 1187 | } |
@@ -1406,17 +1411,15 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) | |||
1406 | */ | 1411 | */ |
1407 | int dasd_sleep_on(struct dasd_ccw_req *cqr) | 1412 | int dasd_sleep_on(struct dasd_ccw_req *cqr) |
1408 | { | 1413 | { |
1409 | wait_queue_head_t wait_q; | ||
1410 | struct dasd_device *device; | 1414 | struct dasd_device *device; |
1411 | int rc; | 1415 | int rc; |
1412 | 1416 | ||
1413 | device = cqr->startdev; | 1417 | device = cqr->startdev; |
1414 | 1418 | ||
1415 | init_waitqueue_head (&wait_q); | ||
1416 | cqr->callback = dasd_wakeup_cb; | 1419 | cqr->callback = dasd_wakeup_cb; |
1417 | cqr->callback_data = (void *) &wait_q; | 1420 | cqr->callback_data = (void *) &generic_waitq; |
1418 | dasd_add_request_tail(cqr); | 1421 | dasd_add_request_tail(cqr); |
1419 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1422 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1420 | 1423 | ||
1421 | /* Request status is either done or failed. */ | 1424 | /* Request status is either done or failed. */ |
1422 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1425 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
@@ -1429,20 +1432,18 @@ int dasd_sleep_on(struct dasd_ccw_req *cqr) | |||
1429 | */ | 1432 | */ |
1430 | int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) | 1433 | int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) |
1431 | { | 1434 | { |
1432 | wait_queue_head_t wait_q; | ||
1433 | struct dasd_device *device; | 1435 | struct dasd_device *device; |
1434 | int rc; | 1436 | int rc; |
1435 | 1437 | ||
1436 | device = cqr->startdev; | 1438 | device = cqr->startdev; |
1437 | init_waitqueue_head (&wait_q); | ||
1438 | cqr->callback = dasd_wakeup_cb; | 1439 | cqr->callback = dasd_wakeup_cb; |
1439 | cqr->callback_data = (void *) &wait_q; | 1440 | cqr->callback_data = (void *) &generic_waitq; |
1440 | dasd_add_request_tail(cqr); | 1441 | dasd_add_request_tail(cqr); |
1441 | rc = wait_event_interruptible(wait_q, _wait_for_wakeup(cqr)); | 1442 | rc = wait_event_interruptible(generic_waitq, _wait_for_wakeup(cqr)); |
1442 | if (rc == -ERESTARTSYS) { | 1443 | if (rc == -ERESTARTSYS) { |
1443 | dasd_cancel_req(cqr); | 1444 | dasd_cancel_req(cqr); |
1444 | /* wait (non-interruptible) for final status */ | 1445 | /* wait (non-interruptible) for final status */ |
1445 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1446 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1446 | } | 1447 | } |
1447 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1448 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
1448 | return rc; | 1449 | return rc; |
@@ -1466,7 +1467,6 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device) | |||
1466 | 1467 | ||
1467 | int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | 1468 | int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) |
1468 | { | 1469 | { |
1469 | wait_queue_head_t wait_q; | ||
1470 | struct dasd_device *device; | 1470 | struct dasd_device *device; |
1471 | int rc; | 1471 | int rc; |
1472 | 1472 | ||
@@ -1478,9 +1478,8 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1478 | return rc; | 1478 | return rc; |
1479 | } | 1479 | } |
1480 | 1480 | ||
1481 | init_waitqueue_head (&wait_q); | ||
1482 | cqr->callback = dasd_wakeup_cb; | 1481 | cqr->callback = dasd_wakeup_cb; |
1483 | cqr->callback_data = (void *) &wait_q; | 1482 | cqr->callback_data = (void *) &generic_waitq; |
1484 | cqr->status = DASD_CQR_QUEUED; | 1483 | cqr->status = DASD_CQR_QUEUED; |
1485 | list_add(&cqr->devlist, &device->ccw_queue); | 1484 | list_add(&cqr->devlist, &device->ccw_queue); |
1486 | 1485 | ||
@@ -1489,7 +1488,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) | |||
1489 | 1488 | ||
1490 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1489 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1491 | 1490 | ||
1492 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1491 | wait_event(generic_waitq, _wait_for_wakeup(cqr)); |
1493 | 1492 | ||
1494 | /* Request status is either done or failed. */ | 1493 | /* Request status is either done or failed. */ |
1495 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; | 1494 | rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; |
@@ -2430,6 +2429,7 @@ static int __init dasd_init(void) | |||
2430 | 2429 | ||
2431 | init_waitqueue_head(&dasd_init_waitq); | 2430 | init_waitqueue_head(&dasd_init_waitq); |
2432 | init_waitqueue_head(&dasd_flush_wq); | 2431 | init_waitqueue_head(&dasd_flush_wq); |
2432 | init_waitqueue_head(&generic_waitq); | ||
2433 | 2433 | ||
2434 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ | 2434 | /* register 'common' DASD debug area, used for all DBF_XXX calls */ |
2435 | dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); | 2435 | dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 0d98f1ff2edd..848ef7e8523f 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -549,7 +549,6 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, | |||
549 | struct raw3270_request *rq) | 549 | struct raw3270_request *rq) |
550 | { | 550 | { |
551 | unsigned long flags; | 551 | unsigned long flags; |
552 | wait_queue_head_t wq; | ||
553 | int rc; | 552 | int rc; |
554 | 553 | ||
555 | #ifdef CONFIG_TN3270_CONSOLE | 554 | #ifdef CONFIG_TN3270_CONSOLE |
@@ -566,20 +565,20 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, | |||
566 | return rq->rc; | 565 | return rq->rc; |
567 | } | 566 | } |
568 | #endif | 567 | #endif |
569 | init_waitqueue_head(&wq); | ||
570 | rq->callback = raw3270_wake_init; | 568 | rq->callback = raw3270_wake_init; |
571 | rq->callback_data = &wq; | 569 | rq->callback_data = &raw3270_wait_queue; |
572 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); | 570 | spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); |
573 | rc = __raw3270_start(rp, view, rq); | 571 | rc = __raw3270_start(rp, view, rq); |
574 | spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); | 572 | spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); |
575 | if (rc) | 573 | if (rc) |
576 | return rc; | 574 | return rc; |
577 | /* Now wait for the completion. */ | 575 | /* Now wait for the completion. */ |
578 | rc = wait_event_interruptible(wq, raw3270_request_final(rq)); | 576 | rc = wait_event_interruptible(raw3270_wait_queue, |
577 | raw3270_request_final(rq)); | ||
579 | if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ | 578 | if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ |
580 | raw3270_halt_io(view->dev, rq); | 579 | raw3270_halt_io(view->dev, rq); |
581 | /* No wait for the halt to complete. */ | 580 | /* No wait for the halt to complete. */ |
582 | wait_event(wq, raw3270_request_final(rq)); | 581 | wait_event(raw3270_wait_queue, raw3270_request_final(rq)); |
583 | return -ERESTARTSYS; | 582 | return -ERESTARTSYS; |
584 | } | 583 | } |
585 | return rq->rc; | 584 | return rq->rc; |
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c index 9e784d5f7f57..ad05a87bc480 100644 --- a/drivers/s390/char/sclp_config.c +++ b/drivers/s390/char/sclp_config.c | |||
@@ -40,7 +40,7 @@ static void sclp_cpu_capability_notify(struct work_struct *work) | |||
40 | put_online_cpus(); | 40 | put_online_cpus(); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void sclp_cpu_change_notify(struct work_struct *work) | 43 | static void __ref sclp_cpu_change_notify(struct work_struct *work) |
44 | { | 44 | { |
45 | smp_rescan_cpus(); | 45 | smp_rescan_cpus(); |
46 | } | 46 | } |
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 35707c04e613..62576af36f47 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c | |||
@@ -71,9 +71,6 @@ static struct list_head sclp_vt220_outqueue; | |||
71 | /* Number of requests in outqueue */ | 71 | /* Number of requests in outqueue */ |
72 | static int sclp_vt220_outqueue_count; | 72 | static int sclp_vt220_outqueue_count; |
73 | 73 | ||
74 | /* Wait queue used to delay write requests while we've run out of buffers */ | ||
75 | static wait_queue_head_t sclp_vt220_waitq; | ||
76 | |||
77 | /* Timer used for delaying write requests to merge subsequent messages into | 74 | /* Timer used for delaying write requests to merge subsequent messages into |
78 | * a single buffer */ | 75 | * a single buffer */ |
79 | static struct timer_list sclp_vt220_timer; | 76 | static struct timer_list sclp_vt220_timer; |
@@ -133,7 +130,6 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request) | |||
133 | } while (request && __sclp_vt220_emit(request)); | 130 | } while (request && __sclp_vt220_emit(request)); |
134 | if (request == NULL && sclp_vt220_flush_later) | 131 | if (request == NULL && sclp_vt220_flush_later) |
135 | sclp_vt220_emit_current(); | 132 | sclp_vt220_emit_current(); |
136 | wake_up(&sclp_vt220_waitq); | ||
137 | /* Check if the tty needs a wake up call */ | 133 | /* Check if the tty needs a wake up call */ |
138 | if (sclp_vt220_tty != NULL) { | 134 | if (sclp_vt220_tty != NULL) { |
139 | tty_wakeup(sclp_vt220_tty); | 135 | tty_wakeup(sclp_vt220_tty); |
@@ -383,7 +379,7 @@ sclp_vt220_timeout(unsigned long data) | |||
383 | */ | 379 | */ |
384 | static int | 380 | static int |
385 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | 381 | __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, |
386 | int convertlf, int may_schedule) | 382 | int convertlf, int may_fail) |
387 | { | 383 | { |
388 | unsigned long flags; | 384 | unsigned long flags; |
389 | void *page; | 385 | void *page; |
@@ -395,15 +391,14 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
395 | overall_written = 0; | 391 | overall_written = 0; |
396 | spin_lock_irqsave(&sclp_vt220_lock, flags); | 392 | spin_lock_irqsave(&sclp_vt220_lock, flags); |
397 | do { | 393 | do { |
398 | /* Create a sclp output buffer if none exists yet */ | 394 | /* Create an sclp output buffer if none exists yet */ |
399 | if (sclp_vt220_current_request == NULL) { | 395 | if (sclp_vt220_current_request == NULL) { |
400 | while (list_empty(&sclp_vt220_empty)) { | 396 | while (list_empty(&sclp_vt220_empty)) { |
401 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); | 397 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); |
402 | if (in_interrupt() || !may_schedule) | 398 | if (may_fail) |
403 | sclp_sync_wait(); | 399 | goto out; |
404 | else | 400 | else |
405 | wait_event(sclp_vt220_waitq, | 401 | sclp_sync_wait(); |
406 | !list_empty(&sclp_vt220_empty)); | ||
407 | spin_lock_irqsave(&sclp_vt220_lock, flags); | 402 | spin_lock_irqsave(&sclp_vt220_lock, flags); |
408 | } | 403 | } |
409 | page = (void *) sclp_vt220_empty.next; | 404 | page = (void *) sclp_vt220_empty.next; |
@@ -437,6 +432,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, | |||
437 | add_timer(&sclp_vt220_timer); | 432 | add_timer(&sclp_vt220_timer); |
438 | } | 433 | } |
439 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); | 434 | spin_unlock_irqrestore(&sclp_vt220_lock, flags); |
435 | out: | ||
440 | return overall_written; | 436 | return overall_written; |
441 | } | 437 | } |
442 | 438 | ||
@@ -520,19 +516,11 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp) | |||
520 | * character to the tty device. If the kernel uses this routine, | 516 | * character to the tty device. If the kernel uses this routine, |
521 | * it must call the flush_chars() routine (if defined) when it is | 517 | * it must call the flush_chars() routine (if defined) when it is |
522 | * done stuffing characters into the driver. | 518 | * done stuffing characters into the driver. |
523 | * | ||
524 | * NOTE: include/linux/tty_driver.h specifies that a character should be | ||
525 | * ignored if there is no room in the queue. This driver implements a different | ||
526 | * semantic in that it will block when there is no more room left. | ||
527 | * | ||
528 | * FIXME: putchar can currently be called from BH and other non blocking | ||
529 | * handlers so this semantic isn't a good idea. | ||
530 | */ | 519 | */ |
531 | static int | 520 | static int |
532 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) | 521 | sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) |
533 | { | 522 | { |
534 | __sclp_vt220_write(&ch, 1, 0, 0, 1); | 523 | return __sclp_vt220_write(&ch, 1, 0, 0, 1); |
535 | return 1; | ||
536 | } | 524 | } |
537 | 525 | ||
538 | /* | 526 | /* |
@@ -653,7 +641,6 @@ static int __init __sclp_vt220_init(void) | |||
653 | spin_lock_init(&sclp_vt220_lock); | 641 | spin_lock_init(&sclp_vt220_lock); |
654 | INIT_LIST_HEAD(&sclp_vt220_empty); | 642 | INIT_LIST_HEAD(&sclp_vt220_empty); |
655 | INIT_LIST_HEAD(&sclp_vt220_outqueue); | 643 | INIT_LIST_HEAD(&sclp_vt220_outqueue); |
656 | init_waitqueue_head(&sclp_vt220_waitq); | ||
657 | init_timer(&sclp_vt220_timer); | 644 | init_timer(&sclp_vt220_timer); |
658 | sclp_vt220_current_request = NULL; | 645 | sclp_vt220_current_request = NULL; |
659 | sclp_vt220_buffered_chars = 0; | 646 | sclp_vt220_buffered_chars = 0; |
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h index dddf8d62c153..d0d565a05dfe 100644 --- a/drivers/s390/char/tape.h +++ b/drivers/s390/char/tape.h | |||
@@ -231,6 +231,9 @@ struct tape_device { | |||
231 | /* Request queue. */ | 231 | /* Request queue. */ |
232 | struct list_head req_queue; | 232 | struct list_head req_queue; |
233 | 233 | ||
234 | /* Request wait queue. */ | ||
235 | wait_queue_head_t wait_queue; | ||
236 | |||
234 | /* Each tape device has (currently) two minor numbers. */ | 237 | /* Each tape device has (currently) two minor numbers. */ |
235 | int first_minor; | 238 | int first_minor; |
236 | 239 | ||
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index ddc4a114e7f4..95da72bc17e8 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -179,11 +179,11 @@ tapeblock_requeue(struct work_struct *work) { | |||
179 | tapeblock_end_request(req, -EIO); | 179 | tapeblock_end_request(req, -EIO); |
180 | continue; | 180 | continue; |
181 | } | 181 | } |
182 | blkdev_dequeue_request(req); | ||
183 | nr_queued++; | ||
182 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 184 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
183 | rc = tapeblock_start_request(device, req); | 185 | rc = tapeblock_start_request(device, req); |
184 | spin_lock_irq(&device->blk_data.request_queue_lock); | 186 | spin_lock_irq(&device->blk_data.request_queue_lock); |
185 | blkdev_dequeue_request(req); | ||
186 | nr_queued++; | ||
187 | } | 187 | } |
188 | spin_unlock_irq(&device->blk_data.request_queue_lock); | 188 | spin_unlock_irq(&device->blk_data.request_queue_lock); |
189 | atomic_set(&device->blk_data.requeue_scheduled, 0); | 189 | atomic_set(&device->blk_data.requeue_scheduled, 0); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 76e44eb7c47f..c20e3c548343 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -449,6 +449,7 @@ tape_alloc_device(void) | |||
449 | INIT_LIST_HEAD(&device->req_queue); | 449 | INIT_LIST_HEAD(&device->req_queue); |
450 | INIT_LIST_HEAD(&device->node); | 450 | INIT_LIST_HEAD(&device->node); |
451 | init_waitqueue_head(&device->state_change_wq); | 451 | init_waitqueue_head(&device->state_change_wq); |
452 | init_waitqueue_head(&device->wait_queue); | ||
452 | device->tape_state = TS_INIT; | 453 | device->tape_state = TS_INIT; |
453 | device->medium_state = MS_UNKNOWN; | 454 | device->medium_state = MS_UNKNOWN; |
454 | *device->modeset_byte = 0; | 455 | *device->modeset_byte = 0; |
@@ -954,21 +955,19 @@ __tape_wake_up(struct tape_request *request, void *data) | |||
954 | int | 955 | int |
955 | tape_do_io(struct tape_device *device, struct tape_request *request) | 956 | tape_do_io(struct tape_device *device, struct tape_request *request) |
956 | { | 957 | { |
957 | wait_queue_head_t wq; | ||
958 | int rc; | 958 | int rc; |
959 | 959 | ||
960 | init_waitqueue_head(&wq); | ||
961 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 960 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
962 | /* Setup callback */ | 961 | /* Setup callback */ |
963 | request->callback = __tape_wake_up; | 962 | request->callback = __tape_wake_up; |
964 | request->callback_data = &wq; | 963 | request->callback_data = &device->wait_queue; |
965 | /* Add request to request queue and try to start it. */ | 964 | /* Add request to request queue and try to start it. */ |
966 | rc = __tape_start_request(device, request); | 965 | rc = __tape_start_request(device, request); |
967 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 966 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
968 | if (rc) | 967 | if (rc) |
969 | return rc; | 968 | return rc; |
970 | /* Request added to the queue. Wait for its completion. */ | 969 | /* Request added to the queue. Wait for its completion. */ |
971 | wait_event(wq, (request->callback == NULL)); | 970 | wait_event(device->wait_queue, (request->callback == NULL)); |
972 | /* Get rc from request */ | 971 | /* Get rc from request */ |
973 | return request->rc; | 972 | return request->rc; |
974 | } | 973 | } |
@@ -989,20 +988,19 @@ int | |||
989 | tape_do_io_interruptible(struct tape_device *device, | 988 | tape_do_io_interruptible(struct tape_device *device, |
990 | struct tape_request *request) | 989 | struct tape_request *request) |
991 | { | 990 | { |
992 | wait_queue_head_t wq; | ||
993 | int rc; | 991 | int rc; |
994 | 992 | ||
995 | init_waitqueue_head(&wq); | ||
996 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 993 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
997 | /* Setup callback */ | 994 | /* Setup callback */ |
998 | request->callback = __tape_wake_up_interruptible; | 995 | request->callback = __tape_wake_up_interruptible; |
999 | request->callback_data = &wq; | 996 | request->callback_data = &device->wait_queue; |
1000 | rc = __tape_start_request(device, request); | 997 | rc = __tape_start_request(device, request); |
1001 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 998 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1002 | if (rc) | 999 | if (rc) |
1003 | return rc; | 1000 | return rc; |
1004 | /* Request added to the queue. Wait for its completion. */ | 1001 | /* Request added to the queue. Wait for its completion. */ |
1005 | rc = wait_event_interruptible(wq, (request->callback == NULL)); | 1002 | rc = wait_event_interruptible(device->wait_queue, |
1003 | (request->callback == NULL)); | ||
1006 | if (rc != -ERESTARTSYS) | 1004 | if (rc != -ERESTARTSYS) |
1007 | /* Request finished normally. */ | 1005 | /* Request finished normally. */ |
1008 | return request->rc; | 1006 | return request->rc; |
@@ -1015,7 +1013,7 @@ tape_do_io_interruptible(struct tape_device *device, | |||
1015 | /* Wait for the interrupt that acknowledges the halt. */ | 1013 | /* Wait for the interrupt that acknowledges the halt. */ |
1016 | do { | 1014 | do { |
1017 | rc = wait_event_interruptible( | 1015 | rc = wait_event_interruptible( |
1018 | wq, | 1016 | device->wait_queue, |
1019 | (request->callback == NULL) | 1017 | (request->callback == NULL) |
1020 | ); | 1018 | ); |
1021 | } while (rc == -ERESTARTSYS); | 1019 | } while (rc == -ERESTARTSYS); |
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index 9f55ce6f3c78..5ab34340919b 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -31,11 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | static void *kvm_devices; | 32 | static void *kvm_devices; |
33 | 33 | ||
34 | /* | ||
35 | * Unique numbering for kvm devices. | ||
36 | */ | ||
37 | static unsigned int dev_index; | ||
38 | |||
39 | struct kvm_device { | 34 | struct kvm_device { |
40 | struct virtio_device vdev; | 35 | struct virtio_device vdev; |
41 | struct kvm_device_desc *desc; | 36 | struct kvm_device_desc *desc; |
@@ -250,26 +245,25 @@ static struct device kvm_root = { | |||
250 | * adds a new device and register it with virtio | 245 | * adds a new device and register it with virtio |
251 | * appropriate drivers are loaded by the device model | 246 | * appropriate drivers are loaded by the device model |
252 | */ | 247 | */ |
253 | static void add_kvm_device(struct kvm_device_desc *d) | 248 | static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset) |
254 | { | 249 | { |
255 | struct kvm_device *kdev; | 250 | struct kvm_device *kdev; |
256 | 251 | ||
257 | kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); | 252 | kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); |
258 | if (!kdev) { | 253 | if (!kdev) { |
259 | printk(KERN_EMERG "Cannot allocate kvm dev %u\n", | 254 | printk(KERN_EMERG "Cannot allocate kvm dev %u type %u\n", |
260 | dev_index++); | 255 | offset, d->type); |
261 | return; | 256 | return; |
262 | } | 257 | } |
263 | 258 | ||
264 | kdev->vdev.dev.parent = &kvm_root; | 259 | kdev->vdev.dev.parent = &kvm_root; |
265 | kdev->vdev.index = dev_index++; | ||
266 | kdev->vdev.id.device = d->type; | 260 | kdev->vdev.id.device = d->type; |
267 | kdev->vdev.config = &kvm_vq_configspace_ops; | 261 | kdev->vdev.config = &kvm_vq_configspace_ops; |
268 | kdev->desc = d; | 262 | kdev->desc = d; |
269 | 263 | ||
270 | if (register_virtio_device(&kdev->vdev) != 0) { | 264 | if (register_virtio_device(&kdev->vdev) != 0) { |
271 | printk(KERN_ERR "Failed to register kvm device %u\n", | 265 | printk(KERN_ERR "Failed to register kvm device %u type %u\n", |
272 | kdev->vdev.index); | 266 | offset, d->type); |
273 | kfree(kdev); | 267 | kfree(kdev); |
274 | } | 268 | } |
275 | } | 269 | } |
@@ -289,7 +283,7 @@ static void scan_devices(void) | |||
289 | if (d->type == 0) | 283 | if (d->type == 0) |
290 | break; | 284 | break; |
291 | 285 | ||
292 | add_kvm_device(d); | 286 | add_kvm_device(d, i); |
293 | } | 287 | } |
294 | } | 288 | } |
295 | 289 | ||
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 1400ea6a2491..1bc00b721e9d 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | #include <asm/serial.h> | ||
47 | 46 | ||
48 | #include "8250.h" | 47 | #include "8250.h" |
49 | 48 | ||
@@ -93,6 +92,7 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS; | |||
93 | */ | 92 | */ |
94 | #define CONFIG_HUB6 1 | 93 | #define CONFIG_HUB6 1 |
95 | 94 | ||
95 | #include <asm/serial.h> | ||
96 | /* | 96 | /* |
97 | * SERIAL_PORT_DFNS tells us about built-in ports that have no | 97 | * SERIAL_PORT_DFNS tells us about built-in ports that have no |
98 | * standard enumeration mechanism. Platforms that can find all | 98 | * standard enumeration mechanism. Platforms that can find all |
@@ -1547,8 +1547,6 @@ static int serial_link_irq_chain(struct uart_8250_port *up) | |||
1547 | i->head = &up->list; | 1547 | i->head = &up->list; |
1548 | spin_unlock_irq(&i->lock); | 1548 | spin_unlock_irq(&i->lock); |
1549 | 1549 | ||
1550 | irq_flags |= SERIAL_EXTRA_IRQ_FLAGS; | ||
1551 | |||
1552 | ret = request_irq(up->port.irq, serial8250_interrupt, | 1550 | ret = request_irq(up->port.irq, serial8250_interrupt, |
1553 | irq_flags, "serial", i); | 1551 | irq_flags, "serial", i); |
1554 | if (ret < 0) | 1552 | if (ret < 0) |
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index a10a40cc0d9e..91bd28f2bb47 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h | |||
@@ -78,8 +78,3 @@ struct serial8250_config { | |||
78 | #else | 78 | #else |
79 | #define ALPHA_KLUDGE_MCR 0 | 79 | #define ALPHA_KLUDGE_MCR 0 |
80 | #endif | 80 | #endif |
81 | |||
82 | #ifndef SERIAL_EXTRA_IRQ_FLAGS | ||
83 | #define SERIAL_EXTRA_IRQ_FLAGS 0 | ||
84 | #endif | ||
85 | |||
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 53b03c629aff..951a75ea6e3e 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1165,6 +1165,15 @@ out: | |||
1165 | return ret; | 1165 | return ret; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | static void uart_set_ldisc(struct tty_struct *tty, int ldisc) | ||
1169 | { | ||
1170 | struct uart_state *state = tty->driver_data; | ||
1171 | struct uart_port *port = state->port; | ||
1172 | |||
1173 | if (port->ops->set_ldisc) | ||
1174 | port->ops->set_ldisc(port); | ||
1175 | } | ||
1176 | |||
1168 | static void uart_set_termios(struct tty_struct *tty, | 1177 | static void uart_set_termios(struct tty_struct *tty, |
1169 | struct ktermios *old_termios) | 1178 | struct ktermios *old_termios) |
1170 | { | 1179 | { |
@@ -2288,6 +2297,7 @@ static const struct tty_operations uart_ops = { | |||
2288 | .unthrottle = uart_unthrottle, | 2297 | .unthrottle = uart_unthrottle, |
2289 | .send_xchar = uart_send_xchar, | 2298 | .send_xchar = uart_send_xchar, |
2290 | .set_termios = uart_set_termios, | 2299 | .set_termios = uart_set_termios, |
2300 | .set_ldisc = uart_set_ldisc, | ||
2291 | .stop = uart_stop, | 2301 | .stop = uart_stop, |
2292 | .start = uart_start, | 2302 | .start = uart_start, |
2293 | .hangup = uart_hangup, | 2303 | .hangup = uart_hangup, |
diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c index 5100fbbf6cb0..a9636f43bca2 100644 --- a/drivers/usb/c67x00/c67x00-ll-hpi.c +++ b/drivers/usb/c67x00/c67x00-ll-hpi.c | |||
@@ -120,7 +120,7 @@ static void hpi_write_word(struct c67x00_device *dev, u16 reg, u16 value) | |||
120 | * Only data is little endian, addr has cpu endianess | 120 | * Only data is little endian, addr has cpu endianess |
121 | */ | 121 | */ |
122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | 122 | static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, |
123 | u16 *data, u16 count) | 123 | __le16 *data, u16 count) |
124 | { | 124 | { |
125 | unsigned long flags; | 125 | unsigned long flags; |
126 | int i; | 126 | int i; |
@@ -129,7 +129,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
129 | 129 | ||
130 | hpi_write_reg(dev, HPI_ADDR, addr); | 130 | hpi_write_reg(dev, HPI_ADDR, addr); |
131 | for (i = 0; i < count; i++) | 131 | for (i = 0; i < count; i++) |
132 | hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++)); | 132 | hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++)); |
133 | 133 | ||
134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 134 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
135 | } | 135 | } |
@@ -138,7 +138,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, | |||
138 | * Only data is little endian, addr has cpu endianess | 138 | * Only data is little endian, addr has cpu endianess |
139 | */ | 139 | */ |
140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | 140 | static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, |
141 | u16 *data, u16 count) | 141 | __le16 *data, u16 count) |
142 | { | 142 | { |
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | int i; | 144 | int i; |
@@ -146,7 +146,7 @@ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, | |||
146 | spin_lock_irqsave(&dev->hpi.lock, flags); | 146 | spin_lock_irqsave(&dev->hpi.lock, flags); |
147 | hpi_write_reg(dev, HPI_ADDR, addr); | 147 | hpi_write_reg(dev, HPI_ADDR, addr); |
148 | for (i = 0; i < count; i++) | 148 | for (i = 0; i < count; i++) |
149 | *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA)); | 149 | *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA)); |
150 | 150 | ||
151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); | 151 | spin_unlock_irqrestore(&dev->hpi.lock, flags); |
152 | } | 152 | } |
@@ -425,7 +425,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr, | |||
425 | len--; | 425 | len--; |
426 | } | 426 | } |
427 | 427 | ||
428 | hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2); | 428 | hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2); |
429 | buf += len & ~0x01; | 429 | buf += len & ~0x01; |
430 | addr += len & ~0x01; | 430 | addr += len & ~0x01; |
431 | len &= 0x01; | 431 | len &= 0x01; |
@@ -456,7 +456,7 @@ void c67x00_ll_read_mem_le16(struct c67x00_device *dev, u16 addr, | |||
456 | len--; | 456 | len--; |
457 | } | 457 | } |
458 | 458 | ||
459 | hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2); | 459 | hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2); |
460 | buf += len & ~0x01; | 460 | buf += len & ~0x01; |
461 | addr += len & ~0x01; | 461 | addr += len & ~0x01; |
462 | len &= 0x01; | 462 | len &= 0x01; |
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 107666d4e2ec..731db051070a 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -611,8 +611,8 @@ next_desc: | |||
611 | goto err; | 611 | goto err; |
612 | } | 612 | } |
613 | 613 | ||
614 | desc->wMaxPacketSize = ep->wMaxPacketSize; | 614 | desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize); |
615 | desc->bMaxPacketSize0 = cpu_to_le16(udev->descriptor.bMaxPacketSize0); | 615 | desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0; |
616 | 616 | ||
617 | desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); | 617 | desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); |
618 | if (!desc->orq) | 618 | if (!desc->orq) |
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index c1cb94e9f242..7e912f21fd36 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c | |||
@@ -155,9 +155,6 @@ static int generic_probe(struct usb_device *udev) | |||
155 | { | 155 | { |
156 | int err, c; | 156 | int err, c; |
157 | 157 | ||
158 | /* put device-specific files into sysfs */ | ||
159 | usb_create_sysfs_dev_files(udev); | ||
160 | |||
161 | /* Choose and set the configuration. This registers the interfaces | 158 | /* Choose and set the configuration. This registers the interfaces |
162 | * with the driver core and lets interface drivers bind to them. | 159 | * with the driver core and lets interface drivers bind to them. |
163 | */ | 160 | */ |
@@ -189,8 +186,6 @@ static void generic_disconnect(struct usb_device *udev) | |||
189 | * unconfigure the device */ | 186 | * unconfigure the device */ |
190 | if (udev->actconfig) | 187 | if (udev->actconfig) |
191 | usb_set_configuration(udev, -1); | 188 | usb_set_configuration(udev, -1); |
192 | |||
193 | usb_remove_sysfs_dev_files(udev); | ||
194 | } | 189 | } |
195 | 190 | ||
196 | #ifdef CONFIG_PM | 191 | #ifdef CONFIG_PM |
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h index 1e4b81e9eb50..a0bf5df6cb6f 100644 --- a/drivers/usb/core/hcd.h +++ b/drivers/usb/core/hcd.h | |||
@@ -213,6 +213,8 @@ struct hc_driver { | |||
213 | 213 | ||
214 | /* force handover of high-speed port to full-speed companion */ | 214 | /* force handover of high-speed port to full-speed companion */ |
215 | void (*relinquish_port)(struct usb_hcd *, int); | 215 | void (*relinquish_port)(struct usb_hcd *, int); |
216 | /* has a port been handed over to a companion? */ | ||
217 | int (*port_handed_over)(struct usb_hcd *, int); | ||
216 | }; | 218 | }; |
217 | 219 | ||
218 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 220 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index eb57fcc701d7..8eb4da332f56 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1326,6 +1326,12 @@ void usb_disconnect(struct usb_device **pdev) | |||
1326 | 1326 | ||
1327 | usb_unlock_device(udev); | 1327 | usb_unlock_device(udev); |
1328 | 1328 | ||
1329 | /* Remove the device-specific files from sysfs. This must be | ||
1330 | * done with udev unlocked, because some of the attribute | ||
1331 | * routines try to acquire the device lock. | ||
1332 | */ | ||
1333 | usb_remove_sysfs_dev_files(udev); | ||
1334 | |||
1329 | /* Unregister the device. The device driver is responsible | 1335 | /* Unregister the device. The device driver is responsible |
1330 | * for removing the device files from usbfs and sysfs and for | 1336 | * for removing the device files from usbfs and sysfs and for |
1331 | * de-configuring the device. | 1337 | * de-configuring the device. |
@@ -1541,6 +1547,9 @@ int usb_new_device(struct usb_device *udev) | |||
1541 | goto fail; | 1547 | goto fail; |
1542 | } | 1548 | } |
1543 | 1549 | ||
1550 | /* put device-specific files into sysfs */ | ||
1551 | usb_create_sysfs_dev_files(udev); | ||
1552 | |||
1544 | /* Tell the world! */ | 1553 | /* Tell the world! */ |
1545 | announce_device(udev); | 1554 | announce_device(udev); |
1546 | return err; | 1555 | return err; |
@@ -2744,7 +2753,11 @@ loop: | |||
2744 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) | 2753 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) |
2745 | break; | 2754 | break; |
2746 | } | 2755 | } |
2747 | dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1); | 2756 | if (hub->hdev->parent || |
2757 | !hcd->driver->port_handed_over || | ||
2758 | !(hcd->driver->port_handed_over)(hcd, port1)) | ||
2759 | dev_err(hub_dev, "unable to enumerate USB device on port %d\n", | ||
2760 | port1); | ||
2748 | 2761 | ||
2749 | done: | 2762 | done: |
2750 | hub_port_disable(hub, port1, 1); | 2763 | hub_port_disable(hub, port1, 1); |
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 2e2019390290..3da1ab4b389d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
@@ -47,6 +47,10 @@ static const struct usb_device_id usb_quirk_list[] = { | |||
47 | /* Edirol SD-20 */ | 47 | /* Edirol SD-20 */ |
48 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, | 48 | { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, |
49 | 49 | ||
50 | /* Avision AV600U */ | ||
51 | { USB_DEVICE(0x0638, 0x0a13), .driver_info = | ||
52 | USB_QUIRK_STRING_FETCH_255 }, | ||
53 | |||
50 | /* M-Systems Flash Disk Pioneers */ | 54 | /* M-Systems Flash Disk Pioneers */ |
51 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, | 55 | { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, |
52 | 56 | ||
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index c783cb111847..5e1f5d55bf04 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -588,35 +588,33 @@ read_descriptors(struct kobject *kobj, struct bin_attribute *attr, | |||
588 | container_of(kobj, struct device, kobj)); | 588 | container_of(kobj, struct device, kobj)); |
589 | size_t nleft = count; | 589 | size_t nleft = count; |
590 | size_t srclen, n; | 590 | size_t srclen, n; |
591 | int cfgno; | ||
592 | void *src; | ||
591 | 593 | ||
592 | usb_lock_device(udev); | 594 | /* The binary attribute begins with the device descriptor. |
593 | 595 | * Following that are the raw descriptor entries for all the | |
594 | /* The binary attribute begins with the device descriptor */ | 596 | * configurations (config plus subsidiary descriptors). |
595 | srclen = sizeof(struct usb_device_descriptor); | ||
596 | if (off < srclen) { | ||
597 | n = min_t(size_t, nleft, srclen - off); | ||
598 | memcpy(buf, off + (char *) &udev->descriptor, n); | ||
599 | nleft -= n; | ||
600 | buf += n; | ||
601 | off = 0; | ||
602 | } else { | ||
603 | off -= srclen; | ||
604 | } | ||
605 | |||
606 | /* Then follows the raw descriptor entry for the current | ||
607 | * configuration (config plus subsidiary descriptors). | ||
608 | */ | 597 | */ |
609 | if (udev->actconfig) { | 598 | for (cfgno = -1; cfgno < udev->descriptor.bNumConfigurations && |
610 | int cfgno = udev->actconfig - udev->config; | 599 | nleft > 0; ++cfgno) { |
611 | 600 | if (cfgno < 0) { | |
612 | srclen = __le16_to_cpu(udev->actconfig->desc.wTotalLength); | 601 | src = &udev->descriptor; |
602 | srclen = sizeof(struct usb_device_descriptor); | ||
603 | } else { | ||
604 | src = udev->rawdescriptors[cfgno]; | ||
605 | srclen = __le16_to_cpu(udev->config[cfgno].desc. | ||
606 | wTotalLength); | ||
607 | } | ||
613 | if (off < srclen) { | 608 | if (off < srclen) { |
614 | n = min_t(size_t, nleft, srclen - off); | 609 | n = min(nleft, srclen - (size_t) off); |
615 | memcpy(buf, off + udev->rawdescriptors[cfgno], n); | 610 | memcpy(buf, src + off, n); |
616 | nleft -= n; | 611 | nleft -= n; |
612 | buf += n; | ||
613 | off = 0; | ||
614 | } else { | ||
615 | off -= srclen; | ||
617 | } | 616 | } |
618 | } | 617 | } |
619 | usb_unlock_device(udev); | ||
620 | return count - nleft; | 618 | return count - nleft; |
621 | } | 619 | } |
622 | 620 | ||
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 651b82701394..18687543d7fa 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c | |||
@@ -1627,7 +1627,9 @@ static int reset_queues(struct fsl_udc *udc) | |||
1627 | udc_reset_ep_queue(udc, pipe); | 1627 | udc_reset_ep_queue(udc, pipe); |
1628 | 1628 | ||
1629 | /* report disconnect; the driver is already quiesced */ | 1629 | /* report disconnect; the driver is already quiesced */ |
1630 | spin_unlock(&udc->lock); | ||
1630 | udc->driver->disconnect(&udc->gadget); | 1631 | udc->driver->disconnect(&udc->gadget); |
1632 | spin_lock(&udc->lock); | ||
1631 | 1633 | ||
1632 | return 0; | 1634 | return 0; |
1633 | } | 1635 | } |
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index 8b5f991e949c..08a4335401a9 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c | |||
@@ -223,6 +223,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { | |||
223 | .bus_suspend = ehci_bus_suspend, | 223 | .bus_suspend = ehci_bus_suspend, |
224 | .bus_resume = ehci_bus_resume, | 224 | .bus_resume = ehci_bus_resume, |
225 | .relinquish_port = ehci_relinquish_port, | 225 | .relinquish_port = ehci_relinquish_port, |
226 | .port_handed_over = ehci_port_handed_over, | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | /*-------------------------------------------------------------------------*/ | 229 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 6d9bed6c1f48..7370d6187c64 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) | |||
269 | if (retval) | 269 | if (retval) |
270 | return retval; | 270 | return retval; |
271 | 271 | ||
272 | ehci->is_tdi_rh_tt = 1; | 272 | hcd->has_tt = 1; |
273 | 273 | ||
274 | ehci->sbrn = 0x20; | 274 | ehci->sbrn = 0x20; |
275 | 275 | ||
@@ -295,10 +295,6 @@ static const struct hc_driver ehci_fsl_hc_driver = { | |||
295 | */ | 295 | */ |
296 | .reset = ehci_fsl_setup, | 296 | .reset = ehci_fsl_setup, |
297 | .start = ehci_run, | 297 | .start = ehci_run, |
298 | #ifdef CONFIG_PM | ||
299 | .suspend = ehci_bus_suspend, | ||
300 | .resume = ehci_bus_resume, | ||
301 | #endif | ||
302 | .stop = ehci_stop, | 298 | .stop = ehci_stop, |
303 | .shutdown = ehci_shutdown, | 299 | .shutdown = ehci_shutdown, |
304 | 300 | ||
@@ -322,6 +318,7 @@ static const struct hc_driver ehci_fsl_hc_driver = { | |||
322 | .bus_suspend = ehci_bus_suspend, | 318 | .bus_suspend = ehci_bus_suspend, |
323 | .bus_resume = ehci_bus_resume, | 319 | .bus_resume = ehci_bus_resume, |
324 | .relinquish_port = ehci_relinquish_port, | 320 | .relinquish_port = ehci_relinquish_port, |
321 | .port_handed_over = ehci_port_handed_over, | ||
325 | }; | 322 | }; |
326 | 323 | ||
327 | static int ehci_fsl_drv_probe(struct platform_device *pdev) | 324 | static int ehci_fsl_drv_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 382587c4457c..740835bb8575 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -609,7 +609,7 @@ static int ehci_hub_control ( | |||
609 | } | 609 | } |
610 | break; | 610 | break; |
611 | case USB_PORT_FEAT_C_SUSPEND: | 611 | case USB_PORT_FEAT_C_SUSPEND: |
612 | /* we auto-clear this feature */ | 612 | clear_bit(wIndex, &ehci->port_c_suspend); |
613 | break; | 613 | break; |
614 | case USB_PORT_FEAT_POWER: | 614 | case USB_PORT_FEAT_POWER: |
615 | if (HCS_PPC (ehci->hcs_params)) | 615 | if (HCS_PPC (ehci->hcs_params)) |
@@ -688,7 +688,7 @@ static int ehci_hub_control ( | |||
688 | /* resume completed? */ | 688 | /* resume completed? */ |
689 | else if (time_after_eq(jiffies, | 689 | else if (time_after_eq(jiffies, |
690 | ehci->reset_done[wIndex])) { | 690 | ehci->reset_done[wIndex])) { |
691 | status |= 1 << USB_PORT_FEAT_C_SUSPEND; | 691 | set_bit(wIndex, &ehci->port_c_suspend); |
692 | ehci->reset_done[wIndex] = 0; | 692 | ehci->reset_done[wIndex] = 0; |
693 | 693 | ||
694 | /* stop resume signaling */ | 694 | /* stop resume signaling */ |
@@ -765,6 +765,8 @@ static int ehci_hub_control ( | |||
765 | status |= 1 << USB_PORT_FEAT_RESET; | 765 | status |= 1 << USB_PORT_FEAT_RESET; |
766 | if (temp & PORT_POWER) | 766 | if (temp & PORT_POWER) |
767 | status |= 1 << USB_PORT_FEAT_POWER; | 767 | status |= 1 << USB_PORT_FEAT_POWER; |
768 | if (test_bit(wIndex, &ehci->port_c_suspend)) | ||
769 | status |= 1 << USB_PORT_FEAT_C_SUSPEND; | ||
768 | 770 | ||
769 | #ifndef VERBOSE_DEBUG | 771 | #ifndef VERBOSE_DEBUG |
770 | if (status & ~0xffff) /* only if wPortChange is interesting */ | 772 | if (status & ~0xffff) /* only if wPortChange is interesting */ |
@@ -875,3 +877,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum) | |||
875 | set_owner(ehci, --portnum, PORT_OWNER); | 877 | set_owner(ehci, --portnum, PORT_OWNER); |
876 | } | 878 | } |
877 | 879 | ||
880 | static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) | ||
881 | { | ||
882 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
883 | u32 __iomem *reg; | ||
884 | |||
885 | if (ehci_is_TDI(ehci)) | ||
886 | return 0; | ||
887 | reg = &ehci->regs->port_status[portnum - 1]; | ||
888 | return ehci_readl(ehci, reg) & PORT_OWNER; | ||
889 | } | ||
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c index 601c8795a854..9d042f220097 100644 --- a/drivers/usb/host/ehci-ixp4xx.c +++ b/drivers/usb/host/ehci-ixp4xx.c | |||
@@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd) | |||
26 | + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); | 26 | + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
27 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 27 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
28 | 28 | ||
29 | ehci->is_tdi_rh_tt = 1; | 29 | hcd->has_tt = 1; |
30 | ehci_reset(ehci); | 30 | ehci_reset(ehci); |
31 | 31 | ||
32 | retval = ehci_init(hcd); | 32 | retval = ehci_init(hcd); |
@@ -58,6 +58,8 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = { | |||
58 | .bus_suspend = ehci_bus_suspend, | 58 | .bus_suspend = ehci_bus_suspend, |
59 | .bus_resume = ehci_bus_resume, | 59 | .bus_resume = ehci_bus_resume, |
60 | #endif | 60 | #endif |
61 | .relinquish_port = ehci_relinquish_port, | ||
62 | .port_handed_over = ehci_port_handed_over, | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | static int ixp4xx_ehci_probe(struct platform_device *pdev) | 65 | static int ixp4xx_ehci_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 3adfda813a7b..ab625f0ba1d9 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -139,10 +139,6 @@ static const struct hc_driver ehci_orion_hc_driver = { | |||
139 | */ | 139 | */ |
140 | .reset = ehci_orion_setup, | 140 | .reset = ehci_orion_setup, |
141 | .start = ehci_run, | 141 | .start = ehci_run, |
142 | #ifdef CONFIG_PM | ||
143 | .suspend = ehci_bus_suspend, | ||
144 | .resume = ehci_bus_resume, | ||
145 | #endif | ||
146 | .stop = ehci_stop, | 142 | .stop = ehci_stop, |
147 | .shutdown = ehci_shutdown, | 143 | .shutdown = ehci_shutdown, |
148 | 144 | ||
@@ -165,6 +161,8 @@ static const struct hc_driver ehci_orion_hc_driver = { | |||
165 | .hub_control = ehci_hub_control, | 161 | .hub_control = ehci_hub_control, |
166 | .bus_suspend = ehci_bus_suspend, | 162 | .bus_suspend = ehci_bus_suspend, |
167 | .bus_resume = ehci_bus_resume, | 163 | .bus_resume = ehci_bus_resume, |
164 | .relinquish_port = ehci_relinquish_port, | ||
165 | .port_handed_over = ehci_port_handed_over, | ||
168 | }; | 166 | }; |
169 | 167 | ||
170 | static void __init | 168 | static void __init |
@@ -250,7 +248,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) | |||
250 | ehci->regs = hcd->regs + 0x100 + | 248 | ehci->regs = hcd->regs + 0x100 + |
251 | HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); | 249 | HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); |
252 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); | 250 | ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); |
253 | ehci->is_tdi_rh_tt = 1; | 251 | hcd->has_tt = 1; |
254 | ehci->sbrn = 0x20; | 252 | ehci->sbrn = 0x20; |
255 | 253 | ||
256 | /* | 254 | /* |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 5bb7f6bb13f3..c46a58f9181d 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -129,7 +129,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd) | |||
129 | switch (pdev->vendor) { | 129 | switch (pdev->vendor) { |
130 | case PCI_VENDOR_ID_TDI: | 130 | case PCI_VENDOR_ID_TDI: |
131 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | 131 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { |
132 | ehci->is_tdi_rh_tt = 1; | ||
133 | hcd->has_tt = 1; | 132 | hcd->has_tt = 1; |
134 | tdi_reset(ehci); | 133 | tdi_reset(ehci); |
135 | } | 134 | } |
@@ -379,7 +378,8 @@ static const struct hc_driver ehci_pci_hc_driver = { | |||
379 | .hub_control = ehci_hub_control, | 378 | .hub_control = ehci_hub_control, |
380 | .bus_suspend = ehci_bus_suspend, | 379 | .bus_suspend = ehci_bus_suspend, |
381 | .bus_resume = ehci_bus_resume, | 380 | .bus_resume = ehci_bus_resume, |
382 | .relinquish_port = ehci_relinquish_port, | 381 | .relinquish_port = ehci_relinquish_port, |
382 | .port_handed_over = ehci_port_handed_over, | ||
383 | }; | 383 | }; |
384 | 384 | ||
385 | /*-------------------------------------------------------------------------*/ | 385 | /*-------------------------------------------------------------------------*/ |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index ee305b1f99ff..b018deed2e8f 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
@@ -76,6 +76,8 @@ static const struct hc_driver ehci_ppc_of_hc_driver = { | |||
76 | .bus_suspend = ehci_bus_suspend, | 76 | .bus_suspend = ehci_bus_suspend, |
77 | .bus_resume = ehci_bus_resume, | 77 | .bus_resume = ehci_bus_resume, |
78 | #endif | 78 | #endif |
79 | .relinquish_port = ehci_relinquish_port, | ||
80 | .port_handed_over = ehci_port_handed_over, | ||
79 | }; | 81 | }; |
80 | 82 | ||
81 | 83 | ||
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c index 6c76036783a1..529590eb4037 100644 --- a/drivers/usb/host/ehci-ppc-soc.c +++ b/drivers/usb/host/ehci-ppc-soc.c | |||
@@ -163,6 +163,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = { | |||
163 | .bus_suspend = ehci_bus_suspend, | 163 | .bus_suspend = ehci_bus_suspend, |
164 | .bus_resume = ehci_bus_resume, | 164 | .bus_resume = ehci_bus_resume, |
165 | .relinquish_port = ehci_relinquish_port, | 165 | .relinquish_port = ehci_relinquish_port, |
166 | .port_handed_over = ehci_port_handed_over, | ||
166 | }; | 167 | }; |
167 | 168 | ||
168 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) | 169 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) |
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index 69782221bcf3..37e6abeb794c 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c | |||
@@ -73,6 +73,7 @@ static const struct hc_driver ps3_ehci_hc_driver = { | |||
73 | .bus_resume = ehci_bus_resume, | 73 | .bus_resume = ehci_bus_resume, |
74 | #endif | 74 | #endif |
75 | .relinquish_port = ehci_relinquish_port, | 75 | .relinquish_port = ehci_relinquish_port, |
76 | .port_handed_over = ehci_port_handed_over, | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | static int ps3_ehci_probe(struct ps3_system_bus_device *dev) | 79 | static int ps3_ehci_probe(struct ps3_system_bus_device *dev) |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index be575e46eac3..b7853c8bac0f 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1349,18 +1349,27 @@ iso_stream_schedule ( | |||
1349 | /* when's the last uframe this urb could start? */ | 1349 | /* when's the last uframe this urb could start? */ |
1350 | max = now + mod; | 1350 | max = now + mod; |
1351 | 1351 | ||
1352 | /* typical case: reuse current schedule. stream is still active, | 1352 | /* Typical case: reuse current schedule, stream is still active. |
1353 | * and no gaps from host falling behind (irq delays etc) | 1353 | * Hopefully there are no gaps from the host falling behind |
1354 | * (irq delays etc), but if there are we'll take the next | ||
1355 | * slot in the schedule, implicitly assuming URB_ISO_ASAP. | ||
1354 | */ | 1356 | */ |
1355 | if (likely (!list_empty (&stream->td_list))) { | 1357 | if (likely (!list_empty (&stream->td_list))) { |
1356 | start = stream->next_uframe; | 1358 | start = stream->next_uframe; |
1357 | if (start < now) | 1359 | if (start < now) |
1358 | start += mod; | 1360 | start += mod; |
1359 | if (likely ((start + sched->span) < max)) | 1361 | |
1360 | goto ready; | 1362 | /* Fell behind (by up to twice the slop amount)? */ |
1361 | /* else fell behind; someday, try to reschedule */ | 1363 | if (start >= max - 2 * 8 * SCHEDULE_SLOP) |
1362 | status = -EL2NSYNC; | 1364 | start += stream->interval * DIV_ROUND_UP( |
1363 | goto fail; | 1365 | max - start, stream->interval) - mod; |
1366 | |||
1367 | /* Tried to schedule too far into the future? */ | ||
1368 | if (unlikely((start + sched->span) >= max)) { | ||
1369 | status = -EFBIG; | ||
1370 | goto fail; | ||
1371 | } | ||
1372 | goto ready; | ||
1364 | } | 1373 | } |
1365 | 1374 | ||
1366 | /* need to schedule; when's the next (u)frame we could start? | 1375 | /* need to schedule; when's the next (u)frame we could start? |
@@ -1613,6 +1622,9 @@ itd_complete ( | |||
1613 | } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { | 1622 | } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { |
1614 | desc->status = 0; | 1623 | desc->status = 0; |
1615 | desc->actual_length = EHCI_ITD_LENGTH (t); | 1624 | desc->actual_length = EHCI_ITD_LENGTH (t); |
1625 | } else { | ||
1626 | /* URB was too late */ | ||
1627 | desc->status = -EXDEV; | ||
1616 | } | 1628 | } |
1617 | } | 1629 | } |
1618 | 1630 | ||
@@ -2095,7 +2107,7 @@ done: | |||
2095 | static void | 2107 | static void |
2096 | scan_periodic (struct ehci_hcd *ehci) | 2108 | scan_periodic (struct ehci_hcd *ehci) |
2097 | { | 2109 | { |
2098 | unsigned frame, clock, now_uframe, mod; | 2110 | unsigned now_uframe, frame, clock, clock_frame, mod; |
2099 | unsigned modified; | 2111 | unsigned modified; |
2100 | 2112 | ||
2101 | mod = ehci->periodic_size << 3; | 2113 | mod = ehci->periodic_size << 3; |
@@ -2111,6 +2123,7 @@ scan_periodic (struct ehci_hcd *ehci) | |||
2111 | else | 2123 | else |
2112 | clock = now_uframe + mod - 1; | 2124 | clock = now_uframe + mod - 1; |
2113 | clock %= mod; | 2125 | clock %= mod; |
2126 | clock_frame = clock >> 3; | ||
2114 | 2127 | ||
2115 | for (;;) { | 2128 | for (;;) { |
2116 | union ehci_shadow q, *q_p; | 2129 | union ehci_shadow q, *q_p; |
@@ -2157,22 +2170,26 @@ restart: | |||
2157 | case Q_TYPE_ITD: | 2170 | case Q_TYPE_ITD: |
2158 | /* If this ITD is still active, leave it for | 2171 | /* If this ITD is still active, leave it for |
2159 | * later processing ... check the next entry. | 2172 | * later processing ... check the next entry. |
2173 | * No need to check for activity unless the | ||
2174 | * frame is current. | ||
2160 | */ | 2175 | */ |
2161 | rmb (); | 2176 | if (frame == clock_frame && live) { |
2162 | for (uf = 0; uf < 8 && live; uf++) { | 2177 | rmb(); |
2163 | if (0 == (q.itd->hw_transaction [uf] | 2178 | for (uf = 0; uf < 8; uf++) { |
2164 | & ITD_ACTIVE(ehci))) | 2179 | if (q.itd->hw_transaction[uf] & |
2165 | continue; | 2180 | ITD_ACTIVE(ehci)) |
2166 | incomplete = true; | 2181 | break; |
2167 | q_p = &q.itd->itd_next; | 2182 | } |
2168 | hw_p = &q.itd->hw_next; | 2183 | if (uf < 8) { |
2169 | type = Q_NEXT_TYPE(ehci, | 2184 | incomplete = true; |
2185 | q_p = &q.itd->itd_next; | ||
2186 | hw_p = &q.itd->hw_next; | ||
2187 | type = Q_NEXT_TYPE(ehci, | ||
2170 | q.itd->hw_next); | 2188 | q.itd->hw_next); |
2171 | q = *q_p; | 2189 | q = *q_p; |
2172 | break; | 2190 | break; |
2191 | } | ||
2173 | } | 2192 | } |
2174 | if (uf < 8 && live) | ||
2175 | break; | ||
2176 | 2193 | ||
2177 | /* Take finished ITDs out of the schedule | 2194 | /* Take finished ITDs out of the schedule |
2178 | * and process them: recycle, maybe report | 2195 | * and process them: recycle, maybe report |
@@ -2189,9 +2206,12 @@ restart: | |||
2189 | case Q_TYPE_SITD: | 2206 | case Q_TYPE_SITD: |
2190 | /* If this SITD is still active, leave it for | 2207 | /* If this SITD is still active, leave it for |
2191 | * later processing ... check the next entry. | 2208 | * later processing ... check the next entry. |
2209 | * No need to check for activity unless the | ||
2210 | * frame is current. | ||
2192 | */ | 2211 | */ |
2193 | if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) | 2212 | if (frame == clock_frame && live && |
2194 | && live) { | 2213 | (q.sitd->hw_results & |
2214 | SITD_ACTIVE(ehci))) { | ||
2195 | incomplete = true; | 2215 | incomplete = true; |
2196 | q_p = &q.sitd->sitd_next; | 2216 | q_p = &q.sitd->sitd_next; |
2197 | hw_p = &q.sitd->hw_next; | 2217 | hw_p = &q.sitd->hw_next; |
@@ -2260,6 +2280,7 @@ restart: | |||
2260 | 2280 | ||
2261 | /* rescan the rest of this frame, then ... */ | 2281 | /* rescan the rest of this frame, then ... */ |
2262 | clock = now; | 2282 | clock = now; |
2283 | clock_frame = clock >> 3; | ||
2263 | } else { | 2284 | } else { |
2264 | now_uframe++; | 2285 | now_uframe++; |
2265 | now_uframe %= mod; | 2286 | now_uframe %= mod; |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index bf92d209a1a9..35a03095757e 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controller */ | |||
97 | dedicated to the companion controller */ | 97 | dedicated to the companion controller */ |
98 | unsigned long owned_ports; /* which ports are | 98 | unsigned long owned_ports; /* which ports are |
99 | owned by the companion during a bus suspend */ | 99 | owned by the companion during a bus suspend */ |
100 | unsigned long port_c_suspend; /* which ports have | ||
101 | the change-suspend feature turned on */ | ||
100 | 102 | ||
101 | /* per-HC memory pools (could be per-bus, but ...) */ | 103 | /* per-HC memory pools (could be per-bus, but ...) */ |
102 | struct dma_pool *qh_pool; /* qh per active urb */ | 104 | struct dma_pool *qh_pool; /* qh per active urb */ |
@@ -112,7 +114,6 @@ struct ehci_hcd { /* one per controller */ | |||
112 | u32 command; | 114 | u32 command; |
113 | 115 | ||
114 | /* SILICON QUIRKS */ | 116 | /* SILICON QUIRKS */ |
115 | unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ | ||
116 | unsigned no_selective_suspend:1; | 117 | unsigned no_selective_suspend:1; |
117 | unsigned has_fsl_port_bug:1; /* FreeScale */ | 118 | unsigned has_fsl_port_bug:1; /* FreeScale */ |
118 | unsigned big_endian_mmio:1; | 119 | unsigned big_endian_mmio:1; |
@@ -678,7 +679,7 @@ struct ehci_fstn { | |||
678 | * needed (mostly in root hub code). | 679 | * needed (mostly in root hub code). |
679 | */ | 680 | */ |
680 | 681 | ||
681 | #define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) | 682 | #define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt) |
682 | 683 | ||
683 | /* Returns the speed of a device attached to a port on the root hub. */ | 684 | /* Returns the speed of a device attached to a port on the root hub. */ |
684 | static inline unsigned int | 685 | static inline unsigned int |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 440bf94f0d4c..c9db3fe98726 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -104,8 +104,8 @@ static u32 nxp_pci_io_base; | |||
104 | static u32 iolength; | 104 | static u32 iolength; |
105 | static u32 pci_mem_phy0; | 105 | static u32 pci_mem_phy0; |
106 | static u32 length; | 106 | static u32 length; |
107 | static u8 *chip_addr; | 107 | static u8 __iomem *chip_addr; |
108 | static u8 *iobase; | 108 | static u8 __iomem *iobase; |
109 | 109 | ||
110 | static int __devinit isp1761_pci_probe(struct pci_dev *dev, | 110 | static int __devinit isp1761_pci_probe(struct pci_dev *dev, |
111 | const struct pci_device_id *id) | 111 | const struct pci_device_id *id) |
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index a53db1d4e07a..eb6c06979f3b 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig | |||
@@ -269,3 +269,14 @@ config USB_TEST | |||
269 | See <http://www.linux-usb.org/usbtest/> for more information, | 269 | See <http://www.linux-usb.org/usbtest/> for more information, |
270 | including sample test device firmware and "how to use it". | 270 | including sample test device firmware and "how to use it". |
271 | 271 | ||
272 | config USB_ISIGHTFW | ||
273 | tristate "iSight firmware loading support" | ||
274 | depends on USB | ||
275 | help | ||
276 | This driver loads firmware for USB Apple iSight cameras, allowing | ||
277 | them to be driven by the USB video class driver available at | ||
278 | http://linux-uvc.berlios.de | ||
279 | |||
280 | The firmware for this driver must be extracted from the MacOS | ||
281 | driver beforehand. Tools for doing so are available at | ||
282 | http://bersace03.free.fr | ||
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index b68e6b774f1a..aba091cb5ec0 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_USB_EMI62) += emi62.o | |||
14 | obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o | 14 | obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o |
15 | obj-$(CONFIG_USB_IDMOUSE) += idmouse.o | 15 | obj-$(CONFIG_USB_IDMOUSE) += idmouse.o |
16 | obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o | 16 | obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o |
17 | obj-$(CONFIG_USB_ISIGHTFW) += isight_firmware.o | ||
17 | obj-$(CONFIG_USB_LCD) += usblcd.o | 18 | obj-$(CONFIG_USB_LCD) += usblcd.o |
18 | obj-$(CONFIG_USB_LD) += ldusb.o | 19 | obj-$(CONFIG_USB_LD) += ldusb.o |
19 | obj-$(CONFIG_USB_LED) += usbled.o | 20 | obj-$(CONFIG_USB_LED) += usbled.o |
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c new file mode 100644 index 000000000000..390e04885536 --- /dev/null +++ b/drivers/usb/misc/isight_firmware.c | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * Driver for loading USB isight firmware | ||
3 | * | ||
4 | * Copyright (C) 2008 Matthew Garrett <mjg@redhat.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation, version 2. | ||
9 | * | ||
10 | * The USB isight cameras in recent Apples are roughly compatible with the USB | ||
11 | * video class specification, and can be driven by uvcvideo. However, they | ||
12 | * need firmware to be loaded beforehand. After firmware loading, the device | ||
13 | * detaches from the USB bus and reattaches with a new device ID. It can then | ||
14 | * be claimed by the uvc driver. | ||
15 | * | ||
16 | * The firmware is non-free and must be extracted by the user. Tools to do this | ||
17 | * are available at http://bersace03.free.fr/ift/ | ||
18 | * | ||
19 | * The isight firmware loading was reverse engineered by Johannes Berg | ||
20 | * <johannes@sipsolutions.de>, and this driver is based on code by Ronald | ||
21 | * Bultje <rbultje@ronald.bitfreak.net> | ||
22 | */ | ||
23 | |||
24 | #include <linux/usb.h> | ||
25 | #include <linux/firmware.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/module.h> | ||
28 | |||
29 | static struct usb_device_id id_table[] = { | ||
30 | {USB_DEVICE(0x05ac, 0x8300)}, | ||
31 | {}, | ||
32 | }; | ||
33 | |||
34 | MODULE_DEVICE_TABLE(usb, id_table); | ||
35 | |||
36 | static int isight_firmware_load(struct usb_interface *intf, | ||
37 | const struct usb_device_id *id) | ||
38 | { | ||
39 | struct usb_device *dev = interface_to_usbdev(intf); | ||
40 | int llen, len, req, ret = 0; | ||
41 | const struct firmware *firmware; | ||
42 | unsigned char *buf; | ||
43 | unsigned char data[4]; | ||
44 | char *ptr; | ||
45 | |||
46 | if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { | ||
47 | printk(KERN_ERR "Unable to load isight firmware\n"); | ||
48 | return -ENODEV; | ||
49 | } | ||
50 | |||
51 | ptr = firmware->data; | ||
52 | |||
53 | if (usb_control_msg | ||
54 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\1", 1, | ||
55 | 300) != 1) { | ||
56 | printk(KERN_ERR | ||
57 | "Failed to initialise isight firmware loader\n"); | ||
58 | ret = -ENODEV; | ||
59 | goto out; | ||
60 | } | ||
61 | |||
62 | while (1) { | ||
63 | memcpy(data, ptr, 4); | ||
64 | len = (data[0] << 8 | data[1]); | ||
65 | req = (data[2] << 8 | data[3]); | ||
66 | ptr += 4; | ||
67 | |||
68 | if (len == 0x8001) | ||
69 | break; /* success */ | ||
70 | else if (len == 0) | ||
71 | continue; | ||
72 | |||
73 | for (; len > 0; req += 50) { | ||
74 | llen = len > 50 ? 50 : len; | ||
75 | len -= llen; | ||
76 | |||
77 | buf = kmalloc(llen, GFP_KERNEL); | ||
78 | memcpy(buf, ptr, llen); | ||
79 | |||
80 | ptr += llen; | ||
81 | |||
82 | if (usb_control_msg | ||
83 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, req, 0, | ||
84 | buf, llen, 300) != llen) { | ||
85 | printk(KERN_ERR | ||
86 | "Failed to load isight firmware\n"); | ||
87 | kfree(buf); | ||
88 | ret = -ENODEV; | ||
89 | goto out; | ||
90 | } | ||
91 | |||
92 | kfree(buf); | ||
93 | } | ||
94 | } | ||
95 | if (usb_control_msg | ||
96 | (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\0", 1, | ||
97 | 300) != 1) { | ||
98 | printk(KERN_ERR "isight firmware loading completion failed\n"); | ||
99 | ret = -ENODEV; | ||
100 | } | ||
101 | out: | ||
102 | release_firmware(firmware); | ||
103 | return ret; | ||
104 | } | ||
105 | |||
106 | static void isight_firmware_disconnect(struct usb_interface *intf) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | static struct usb_driver isight_firmware_driver = { | ||
111 | .name = "isight_firmware", | ||
112 | .probe = isight_firmware_load, | ||
113 | .disconnect = isight_firmware_disconnect, | ||
114 | .id_table = id_table, | ||
115 | }; | ||
116 | |||
117 | static int __init isight_firmware_init(void) | ||
118 | { | ||
119 | return usb_register(&isight_firmware_driver); | ||
120 | } | ||
121 | |||
122 | static void __exit isight_firmware_exit(void) | ||
123 | { | ||
124 | usb_deregister(&isight_firmware_driver); | ||
125 | } | ||
126 | |||
127 | module_init(isight_firmware_init); | ||
128 | module_exit(isight_firmware_exit); | ||
129 | |||
130 | MODULE_LICENSE("GPL"); | ||
131 | MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>"); | ||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 3cee6feac174..5234e7a3bd2c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -174,8 +174,270 @@ static struct usb_device_id id_table_combined [] = { | |||
174 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, | 174 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, |
175 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, | 175 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, |
176 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, | 176 | { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, |
177 | { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), | 177 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0100_PID) }, |
178 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0101_PID) }, | ||
179 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0102_PID) }, | ||
180 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0103_PID) }, | ||
181 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0104_PID) }, | ||
182 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0105_PID) }, | ||
183 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0106_PID) }, | ||
184 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0107_PID) }, | ||
185 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0108_PID) }, | ||
186 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0109_PID) }, | ||
187 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010A_PID) }, | ||
188 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010B_PID) }, | ||
189 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010C_PID) }, | ||
190 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010D_PID) }, | ||
191 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010E_PID) }, | ||
192 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010F_PID) }, | ||
193 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0110_PID) }, | ||
194 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0111_PID) }, | ||
195 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0112_PID) }, | ||
196 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0113_PID) }, | ||
197 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0114_PID) }, | ||
198 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0115_PID) }, | ||
199 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0116_PID) }, | ||
200 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0117_PID) }, | ||
201 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0118_PID) }, | ||
202 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0119_PID) }, | ||
203 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011A_PID) }, | ||
204 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011B_PID) }, | ||
205 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011C_PID) }, | ||
206 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011D_PID) }, | ||
207 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011E_PID) }, | ||
208 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011F_PID) }, | ||
209 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0120_PID) }, | ||
210 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0121_PID) }, | ||
211 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0122_PID) }, | ||
212 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0123_PID) }, | ||
213 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0124_PID) }, | ||
214 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0125_PID) }, | ||
215 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0126_PID) }, | ||
216 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0127_PID), | ||
178 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | 217 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, |
218 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0128_PID) }, | ||
219 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0129_PID) }, | ||
220 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012A_PID) }, | ||
221 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012B_PID) }, | ||
222 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012C_PID), | ||
223 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
224 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012D_PID) }, | ||
225 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012E_PID) }, | ||
226 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012F_PID) }, | ||
227 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0130_PID) }, | ||
228 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0131_PID) }, | ||
229 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0132_PID) }, | ||
230 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0133_PID) }, | ||
231 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0134_PID) }, | ||
232 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0135_PID) }, | ||
233 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0136_PID) }, | ||
234 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0137_PID) }, | ||
235 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0138_PID) }, | ||
236 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0139_PID) }, | ||
237 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013A_PID) }, | ||
238 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013B_PID) }, | ||
239 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013C_PID) }, | ||
240 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013D_PID) }, | ||
241 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013E_PID) }, | ||
242 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013F_PID) }, | ||
243 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0140_PID) }, | ||
244 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0141_PID) }, | ||
245 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0142_PID) }, | ||
246 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0143_PID) }, | ||
247 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0144_PID) }, | ||
248 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0145_PID) }, | ||
249 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0146_PID) }, | ||
250 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0147_PID) }, | ||
251 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0148_PID) }, | ||
252 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0149_PID) }, | ||
253 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014A_PID) }, | ||
254 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014B_PID) }, | ||
255 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014C_PID) }, | ||
256 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014D_PID) }, | ||
257 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014E_PID) }, | ||
258 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014F_PID) }, | ||
259 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0150_PID) }, | ||
260 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0151_PID) }, | ||
261 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0152_PID) }, | ||
262 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0153_PID), | ||
263 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
264 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0154_PID), | ||
265 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
266 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0155_PID), | ||
267 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
268 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0156_PID), | ||
269 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
270 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0157_PID), | ||
271 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
272 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0158_PID), | ||
273 | .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, | ||
274 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0159_PID) }, | ||
275 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015A_PID) }, | ||
276 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015B_PID) }, | ||
277 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015C_PID) }, | ||
278 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015D_PID) }, | ||
279 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015E_PID) }, | ||
280 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015F_PID) }, | ||
281 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0160_PID) }, | ||
282 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0161_PID) }, | ||
283 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0162_PID) }, | ||
284 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0163_PID) }, | ||
285 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0164_PID) }, | ||
286 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0165_PID) }, | ||
287 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0166_PID) }, | ||
288 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0167_PID) }, | ||
289 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0168_PID) }, | ||
290 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0169_PID) }, | ||
291 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016A_PID) }, | ||
292 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016B_PID) }, | ||
293 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016C_PID) }, | ||
294 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016D_PID) }, | ||
295 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016E_PID) }, | ||
296 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016F_PID) }, | ||
297 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0170_PID) }, | ||
298 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0171_PID) }, | ||
299 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0172_PID) }, | ||
300 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0173_PID) }, | ||
301 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0174_PID) }, | ||
302 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0175_PID) }, | ||
303 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0176_PID) }, | ||
304 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0177_PID) }, | ||
305 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0178_PID) }, | ||
306 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0179_PID) }, | ||
307 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017A_PID) }, | ||
308 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017B_PID) }, | ||
309 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017C_PID) }, | ||
310 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017D_PID) }, | ||
311 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017E_PID) }, | ||
312 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017F_PID) }, | ||
313 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0180_PID) }, | ||
314 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0181_PID) }, | ||
315 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0182_PID) }, | ||
316 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0183_PID) }, | ||
317 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0184_PID) }, | ||
318 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0185_PID) }, | ||
319 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0186_PID) }, | ||
320 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0187_PID) }, | ||
321 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0188_PID) }, | ||
322 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0189_PID) }, | ||
323 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018A_PID) }, | ||
324 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018B_PID) }, | ||
325 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018C_PID) }, | ||
326 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018D_PID) }, | ||
327 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018E_PID) }, | ||
328 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018F_PID) }, | ||
329 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0190_PID) }, | ||
330 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0191_PID) }, | ||
331 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0192_PID) }, | ||
332 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0193_PID) }, | ||
333 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0194_PID) }, | ||
334 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0195_PID) }, | ||
335 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0196_PID) }, | ||
336 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0197_PID) }, | ||
337 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0198_PID) }, | ||
338 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0199_PID) }, | ||
339 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019A_PID) }, | ||
340 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019B_PID) }, | ||
341 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019C_PID) }, | ||
342 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019D_PID) }, | ||
343 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019E_PID) }, | ||
344 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019F_PID) }, | ||
345 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A0_PID) }, | ||
346 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A1_PID) }, | ||
347 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A2_PID) }, | ||
348 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A3_PID) }, | ||
349 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A4_PID) }, | ||
350 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A5_PID) }, | ||
351 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A6_PID) }, | ||
352 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A7_PID) }, | ||
353 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A8_PID) }, | ||
354 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A9_PID) }, | ||
355 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AA_PID) }, | ||
356 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AB_PID) }, | ||
357 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AC_PID) }, | ||
358 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AD_PID) }, | ||
359 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AE_PID) }, | ||
360 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AF_PID) }, | ||
361 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B0_PID) }, | ||
362 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B1_PID) }, | ||
363 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B2_PID) }, | ||
364 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B3_PID) }, | ||
365 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B4_PID) }, | ||
366 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B5_PID) }, | ||
367 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B6_PID) }, | ||
368 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B7_PID) }, | ||
369 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B8_PID) }, | ||
370 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B9_PID) }, | ||
371 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BA_PID) }, | ||
372 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BB_PID) }, | ||
373 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BC_PID) }, | ||
374 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BD_PID) }, | ||
375 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BE_PID) }, | ||
376 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BF_PID) }, | ||
377 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C0_PID) }, | ||
378 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C1_PID) }, | ||
379 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C2_PID) }, | ||
380 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C3_PID) }, | ||
381 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C4_PID) }, | ||
382 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C5_PID) }, | ||
383 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C6_PID) }, | ||
384 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C7_PID) }, | ||
385 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C8_PID) }, | ||
386 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C9_PID) }, | ||
387 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CA_PID) }, | ||
388 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CB_PID) }, | ||
389 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CC_PID) }, | ||
390 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CD_PID) }, | ||
391 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CE_PID) }, | ||
392 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CF_PID) }, | ||
393 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D0_PID) }, | ||
394 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D1_PID) }, | ||
395 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D2_PID) }, | ||
396 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D3_PID) }, | ||
397 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D4_PID) }, | ||
398 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D5_PID) }, | ||
399 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D6_PID) }, | ||
400 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D7_PID) }, | ||
401 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D8_PID) }, | ||
402 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D9_PID) }, | ||
403 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DA_PID) }, | ||
404 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DB_PID) }, | ||
405 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DC_PID) }, | ||
406 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DD_PID) }, | ||
407 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DE_PID) }, | ||
408 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DF_PID) }, | ||
409 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E0_PID) }, | ||
410 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E1_PID) }, | ||
411 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E2_PID) }, | ||
412 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E3_PID) }, | ||
413 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E4_PID) }, | ||
414 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E5_PID) }, | ||
415 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E6_PID) }, | ||
416 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E7_PID) }, | ||
417 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E8_PID) }, | ||
418 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E9_PID) }, | ||
419 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EA_PID) }, | ||
420 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EB_PID) }, | ||
421 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EC_PID) }, | ||
422 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01ED_PID) }, | ||
423 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EE_PID) }, | ||
424 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EF_PID) }, | ||
425 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F0_PID) }, | ||
426 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F1_PID) }, | ||
427 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F2_PID) }, | ||
428 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F3_PID) }, | ||
429 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F4_PID) }, | ||
430 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F5_PID) }, | ||
431 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F6_PID) }, | ||
432 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F7_PID) }, | ||
433 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F8_PID) }, | ||
434 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F9_PID) }, | ||
435 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FA_PID) }, | ||
436 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FB_PID) }, | ||
437 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FC_PID) }, | ||
438 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FD_PID) }, | ||
439 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FE_PID) }, | ||
440 | { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FF_PID) }, | ||
179 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, | 441 | { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, |
180 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, | 442 | { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, |
181 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, | 443 | { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index a72f2c81d664..06e0ecabb3eb 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -114,11 +114,268 @@ | |||
114 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | 114 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * The following are the values for the Matrix Orbital VK204-25-USB | 117 | * The following are the values for the Matrix Orbital FTDI Range |
118 | * display, which use the FT232RL. | 118 | * Anything in this range will use an FT232RL. |
119 | */ | 119 | */ |
120 | #define MTXORB_VK_VID 0x1b3d | 120 | #define MTXORB_VID 0x1B3D |
121 | #define MTXORB_VK_PID 0x0158 | 121 | #define MTXORB_FTDI_RANGE_0100_PID 0x0100 |
122 | #define MTXORB_FTDI_RANGE_0101_PID 0x0101 | ||
123 | #define MTXORB_FTDI_RANGE_0102_PID 0x0102 | ||
124 | #define MTXORB_FTDI_RANGE_0103_PID 0x0103 | ||
125 | #define MTXORB_FTDI_RANGE_0104_PID 0x0104 | ||
126 | #define MTXORB_FTDI_RANGE_0105_PID 0x0105 | ||
127 | #define MTXORB_FTDI_RANGE_0106_PID 0x0106 | ||
128 | #define MTXORB_FTDI_RANGE_0107_PID 0x0107 | ||
129 | #define MTXORB_FTDI_RANGE_0108_PID 0x0108 | ||
130 | #define MTXORB_FTDI_RANGE_0109_PID 0x0109 | ||
131 | #define MTXORB_FTDI_RANGE_010A_PID 0x010A | ||
132 | #define MTXORB_FTDI_RANGE_010B_PID 0x010B | ||
133 | #define MTXORB_FTDI_RANGE_010C_PID 0x010C | ||
134 | #define MTXORB_FTDI_RANGE_010D_PID 0x010D | ||
135 | #define MTXORB_FTDI_RANGE_010E_PID 0x010E | ||
136 | #define MTXORB_FTDI_RANGE_010F_PID 0x010F | ||
137 | #define MTXORB_FTDI_RANGE_0110_PID 0x0110 | ||
138 | #define MTXORB_FTDI_RANGE_0111_PID 0x0111 | ||
139 | #define MTXORB_FTDI_RANGE_0112_PID 0x0112 | ||
140 | #define MTXORB_FTDI_RANGE_0113_PID 0x0113 | ||
141 | #define MTXORB_FTDI_RANGE_0114_PID 0x0114 | ||
142 | #define MTXORB_FTDI_RANGE_0115_PID 0x0115 | ||
143 | #define MTXORB_FTDI_RANGE_0116_PID 0x0116 | ||
144 | #define MTXORB_FTDI_RANGE_0117_PID 0x0117 | ||
145 | #define MTXORB_FTDI_RANGE_0118_PID 0x0118 | ||
146 | #define MTXORB_FTDI_RANGE_0119_PID 0x0119 | ||
147 | #define MTXORB_FTDI_RANGE_011A_PID 0x011A | ||
148 | #define MTXORB_FTDI_RANGE_011B_PID 0x011B | ||
149 | #define MTXORB_FTDI_RANGE_011C_PID 0x011C | ||
150 | #define MTXORB_FTDI_RANGE_011D_PID 0x011D | ||
151 | #define MTXORB_FTDI_RANGE_011E_PID 0x011E | ||
152 | #define MTXORB_FTDI_RANGE_011F_PID 0x011F | ||
153 | #define MTXORB_FTDI_RANGE_0120_PID 0x0120 | ||
154 | #define MTXORB_FTDI_RANGE_0121_PID 0x0121 | ||
155 | #define MTXORB_FTDI_RANGE_0122_PID 0x0122 | ||
156 | #define MTXORB_FTDI_RANGE_0123_PID 0x0123 | ||
157 | #define MTXORB_FTDI_RANGE_0124_PID 0x0124 | ||
158 | #define MTXORB_FTDI_RANGE_0125_PID 0x0125 | ||
159 | #define MTXORB_FTDI_RANGE_0126_PID 0x0126 | ||
160 | #define MTXORB_FTDI_RANGE_0127_PID 0x0127 | ||
161 | #define MTXORB_FTDI_RANGE_0128_PID 0x0128 | ||
162 | #define MTXORB_FTDI_RANGE_0129_PID 0x0129 | ||
163 | #define MTXORB_FTDI_RANGE_012A_PID 0x012A | ||
164 | #define MTXORB_FTDI_RANGE_012B_PID 0x012B | ||
165 | #define MTXORB_FTDI_RANGE_012C_PID 0x012C | ||
166 | #define MTXORB_FTDI_RANGE_012D_PID 0x012D | ||
167 | #define MTXORB_FTDI_RANGE_012E_PID 0x012E | ||
168 | #define MTXORB_FTDI_RANGE_012F_PID 0x012F | ||
169 | #define MTXORB_FTDI_RANGE_0130_PID 0x0130 | ||
170 | #define MTXORB_FTDI_RANGE_0131_PID 0x0131 | ||
171 | #define MTXORB_FTDI_RANGE_0132_PID 0x0132 | ||
172 | #define MTXORB_FTDI_RANGE_0133_PID 0x0133 | ||
173 | #define MTXORB_FTDI_RANGE_0134_PID 0x0134 | ||
174 | #define MTXORB_FTDI_RANGE_0135_PID 0x0135 | ||
175 | #define MTXORB_FTDI_RANGE_0136_PID 0x0136 | ||
176 | #define MTXORB_FTDI_RANGE_0137_PID 0x0137 | ||
177 | #define MTXORB_FTDI_RANGE_0138_PID 0x0138 | ||
178 | #define MTXORB_FTDI_RANGE_0139_PID 0x0139 | ||
179 | #define MTXORB_FTDI_RANGE_013A_PID 0x013A | ||
180 | #define MTXORB_FTDI_RANGE_013B_PID 0x013B | ||
181 | #define MTXORB_FTDI_RANGE_013C_PID 0x013C | ||
182 | #define MTXORB_FTDI_RANGE_013D_PID 0x013D | ||
183 | #define MTXORB_FTDI_RANGE_013E_PID 0x013E | ||
184 | #define MTXORB_FTDI_RANGE_013F_PID 0x013F | ||
185 | #define MTXORB_FTDI_RANGE_0140_PID 0x0140 | ||
186 | #define MTXORB_FTDI_RANGE_0141_PID 0x0141 | ||
187 | #define MTXORB_FTDI_RANGE_0142_PID 0x0142 | ||
188 | #define MTXORB_FTDI_RANGE_0143_PID 0x0143 | ||
189 | #define MTXORB_FTDI_RANGE_0144_PID 0x0144 | ||
190 | #define MTXORB_FTDI_RANGE_0145_PID 0x0145 | ||
191 | #define MTXORB_FTDI_RANGE_0146_PID 0x0146 | ||
192 | #define MTXORB_FTDI_RANGE_0147_PID 0x0147 | ||
193 | #define MTXORB_FTDI_RANGE_0148_PID 0x0148 | ||
194 | #define MTXORB_FTDI_RANGE_0149_PID 0x0149 | ||
195 | #define MTXORB_FTDI_RANGE_014A_PID 0x014A | ||
196 | #define MTXORB_FTDI_RANGE_014B_PID 0x014B | ||
197 | #define MTXORB_FTDI_RANGE_014C_PID 0x014C | ||
198 | #define MTXORB_FTDI_RANGE_014D_PID 0x014D | ||
199 | #define MTXORB_FTDI_RANGE_014E_PID 0x014E | ||
200 | #define MTXORB_FTDI_RANGE_014F_PID 0x014F | ||
201 | #define MTXORB_FTDI_RANGE_0150_PID 0x0150 | ||
202 | #define MTXORB_FTDI_RANGE_0151_PID 0x0151 | ||
203 | #define MTXORB_FTDI_RANGE_0152_PID 0x0152 | ||
204 | #define MTXORB_FTDI_RANGE_0153_PID 0x0153 | ||
205 | #define MTXORB_FTDI_RANGE_0154_PID 0x0154 | ||
206 | #define MTXORB_FTDI_RANGE_0155_PID 0x0155 | ||
207 | #define MTXORB_FTDI_RANGE_0156_PID 0x0156 | ||
208 | #define MTXORB_FTDI_RANGE_0157_PID 0x0157 | ||
209 | #define MTXORB_FTDI_RANGE_0158_PID 0x0158 | ||
210 | #define MTXORB_FTDI_RANGE_0159_PID 0x0159 | ||
211 | #define MTXORB_FTDI_RANGE_015A_PID 0x015A | ||
212 | #define MTXORB_FTDI_RANGE_015B_PID 0x015B | ||
213 | #define MTXORB_FTDI_RANGE_015C_PID 0x015C | ||
214 | #define MTXORB_FTDI_RANGE_015D_PID 0x015D | ||
215 | #define MTXORB_FTDI_RANGE_015E_PID 0x015E | ||
216 | #define MTXORB_FTDI_RANGE_015F_PID 0x015F | ||
217 | #define MTXORB_FTDI_RANGE_0160_PID 0x0160 | ||
218 | #define MTXORB_FTDI_RANGE_0161_PID 0x0161 | ||
219 | #define MTXORB_FTDI_RANGE_0162_PID 0x0162 | ||
220 | #define MTXORB_FTDI_RANGE_0163_PID 0x0163 | ||
221 | #define MTXORB_FTDI_RANGE_0164_PID 0x0164 | ||
222 | #define MTXORB_FTDI_RANGE_0165_PID 0x0165 | ||
223 | #define MTXORB_FTDI_RANGE_0166_PID 0x0166 | ||
224 | #define MTXORB_FTDI_RANGE_0167_PID 0x0167 | ||
225 | #define MTXORB_FTDI_RANGE_0168_PID 0x0168 | ||
226 | #define MTXORB_FTDI_RANGE_0169_PID 0x0169 | ||
227 | #define MTXORB_FTDI_RANGE_016A_PID 0x016A | ||
228 | #define MTXORB_FTDI_RANGE_016B_PID 0x016B | ||
229 | #define MTXORB_FTDI_RANGE_016C_PID 0x016C | ||
230 | #define MTXORB_FTDI_RANGE_016D_PID 0x016D | ||
231 | #define MTXORB_FTDI_RANGE_016E_PID 0x016E | ||
232 | #define MTXORB_FTDI_RANGE_016F_PID 0x016F | ||
233 | #define MTXORB_FTDI_RANGE_0170_PID 0x0170 | ||
234 | #define MTXORB_FTDI_RANGE_0171_PID 0x0171 | ||
235 | #define MTXORB_FTDI_RANGE_0172_PID 0x0172 | ||
236 | #define MTXORB_FTDI_RANGE_0173_PID 0x0173 | ||
237 | #define MTXORB_FTDI_RANGE_0174_PID 0x0174 | ||
238 | #define MTXORB_FTDI_RANGE_0175_PID 0x0175 | ||
239 | #define MTXORB_FTDI_RANGE_0176_PID 0x0176 | ||
240 | #define MTXORB_FTDI_RANGE_0177_PID 0x0177 | ||
241 | #define MTXORB_FTDI_RANGE_0178_PID 0x0178 | ||
242 | #define MTXORB_FTDI_RANGE_0179_PID 0x0179 | ||
243 | #define MTXORB_FTDI_RANGE_017A_PID 0x017A | ||
244 | #define MTXORB_FTDI_RANGE_017B_PID 0x017B | ||
245 | #define MTXORB_FTDI_RANGE_017C_PID 0x017C | ||
246 | #define MTXORB_FTDI_RANGE_017D_PID 0x017D | ||
247 | #define MTXORB_FTDI_RANGE_017E_PID 0x017E | ||
248 | #define MTXORB_FTDI_RANGE_017F_PID 0x017F | ||
249 | #define MTXORB_FTDI_RANGE_0180_PID 0x0180 | ||
250 | #define MTXORB_FTDI_RANGE_0181_PID 0x0181 | ||
251 | #define MTXORB_FTDI_RANGE_0182_PID 0x0182 | ||
252 | #define MTXORB_FTDI_RANGE_0183_PID 0x0183 | ||
253 | #define MTXORB_FTDI_RANGE_0184_PID 0x0184 | ||
254 | #define MTXORB_FTDI_RANGE_0185_PID 0x0185 | ||
255 | #define MTXORB_FTDI_RANGE_0186_PID 0x0186 | ||
256 | #define MTXORB_FTDI_RANGE_0187_PID 0x0187 | ||
257 | #define MTXORB_FTDI_RANGE_0188_PID 0x0188 | ||
258 | #define MTXORB_FTDI_RANGE_0189_PID 0x0189 | ||
259 | #define MTXORB_FTDI_RANGE_018A_PID 0x018A | ||
260 | #define MTXORB_FTDI_RANGE_018B_PID 0x018B | ||
261 | #define MTXORB_FTDI_RANGE_018C_PID 0x018C | ||
262 | #define MTXORB_FTDI_RANGE_018D_PID 0x018D | ||
263 | #define MTXORB_FTDI_RANGE_018E_PID 0x018E | ||
264 | #define MTXORB_FTDI_RANGE_018F_PID 0x018F | ||
265 | #define MTXORB_FTDI_RANGE_0190_PID 0x0190 | ||
266 | #define MTXORB_FTDI_RANGE_0191_PID 0x0191 | ||
267 | #define MTXORB_FTDI_RANGE_0192_PID 0x0192 | ||
268 | #define MTXORB_FTDI_RANGE_0193_PID 0x0193 | ||
269 | #define MTXORB_FTDI_RANGE_0194_PID 0x0194 | ||
270 | #define MTXORB_FTDI_RANGE_0195_PID 0x0195 | ||
271 | #define MTXORB_FTDI_RANGE_0196_PID 0x0196 | ||
272 | #define MTXORB_FTDI_RANGE_0197_PID 0x0197 | ||
273 | #define MTXORB_FTDI_RANGE_0198_PID 0x0198 | ||
274 | #define MTXORB_FTDI_RANGE_0199_PID 0x0199 | ||
275 | #define MTXORB_FTDI_RANGE_019A_PID 0x019A | ||
276 | #define MTXORB_FTDI_RANGE_019B_PID 0x019B | ||
277 | #define MTXORB_FTDI_RANGE_019C_PID 0x019C | ||
278 | #define MTXORB_FTDI_RANGE_019D_PID 0x019D | ||
279 | #define MTXORB_FTDI_RANGE_019E_PID 0x019E | ||
280 | #define MTXORB_FTDI_RANGE_019F_PID 0x019F | ||
281 | #define MTXORB_FTDI_RANGE_01A0_PID 0x01A0 | ||
282 | #define MTXORB_FTDI_RANGE_01A1_PID 0x01A1 | ||
283 | #define MTXORB_FTDI_RANGE_01A2_PID 0x01A2 | ||
284 | #define MTXORB_FTDI_RANGE_01A3_PID 0x01A3 | ||
285 | #define MTXORB_FTDI_RANGE_01A4_PID 0x01A4 | ||
286 | #define MTXORB_FTDI_RANGE_01A5_PID 0x01A5 | ||
287 | #define MTXORB_FTDI_RANGE_01A6_PID 0x01A6 | ||
288 | #define MTXORB_FTDI_RANGE_01A7_PID 0x01A7 | ||
289 | #define MTXORB_FTDI_RANGE_01A8_PID 0x01A8 | ||
290 | #define MTXORB_FTDI_RANGE_01A9_PID 0x01A9 | ||
291 | #define MTXORB_FTDI_RANGE_01AA_PID 0x01AA | ||
292 | #define MTXORB_FTDI_RANGE_01AB_PID 0x01AB | ||
293 | #define MTXORB_FTDI_RANGE_01AC_PID 0x01AC | ||
294 | #define MTXORB_FTDI_RANGE_01AD_PID 0x01AD | ||
295 | #define MTXORB_FTDI_RANGE_01AE_PID 0x01AE | ||
296 | #define MTXORB_FTDI_RANGE_01AF_PID 0x01AF | ||
297 | #define MTXORB_FTDI_RANGE_01B0_PID 0x01B0 | ||
298 | #define MTXORB_FTDI_RANGE_01B1_PID 0x01B1 | ||
299 | #define MTXORB_FTDI_RANGE_01B2_PID 0x01B2 | ||
300 | #define MTXORB_FTDI_RANGE_01B3_PID 0x01B3 | ||
301 | #define MTXORB_FTDI_RANGE_01B4_PID 0x01B4 | ||
302 | #define MTXORB_FTDI_RANGE_01B5_PID 0x01B5 | ||
303 | #define MTXORB_FTDI_RANGE_01B6_PID 0x01B6 | ||
304 | #define MTXORB_FTDI_RANGE_01B7_PID 0x01B7 | ||
305 | #define MTXORB_FTDI_RANGE_01B8_PID 0x01B8 | ||
306 | #define MTXORB_FTDI_RANGE_01B9_PID 0x01B9 | ||
307 | #define MTXORB_FTDI_RANGE_01BA_PID 0x01BA | ||
308 | #define MTXORB_FTDI_RANGE_01BB_PID 0x01BB | ||
309 | #define MTXORB_FTDI_RANGE_01BC_PID 0x01BC | ||
310 | #define MTXORB_FTDI_RANGE_01BD_PID 0x01BD | ||
311 | #define MTXORB_FTDI_RANGE_01BE_PID 0x01BE | ||
312 | #define MTXORB_FTDI_RANGE_01BF_PID 0x01BF | ||
313 | #define MTXORB_FTDI_RANGE_01C0_PID 0x01C0 | ||
314 | #define MTXORB_FTDI_RANGE_01C1_PID 0x01C1 | ||
315 | #define MTXORB_FTDI_RANGE_01C2_PID 0x01C2 | ||
316 | #define MTXORB_FTDI_RANGE_01C3_PID 0x01C3 | ||
317 | #define MTXORB_FTDI_RANGE_01C4_PID 0x01C4 | ||
318 | #define MTXORB_FTDI_RANGE_01C5_PID 0x01C5 | ||
319 | #define MTXORB_FTDI_RANGE_01C6_PID 0x01C6 | ||
320 | #define MTXORB_FTDI_RANGE_01C7_PID 0x01C7 | ||
321 | #define MTXORB_FTDI_RANGE_01C8_PID 0x01C8 | ||
322 | #define MTXORB_FTDI_RANGE_01C9_PID 0x01C9 | ||
323 | #define MTXORB_FTDI_RANGE_01CA_PID 0x01CA | ||
324 | #define MTXORB_FTDI_RANGE_01CB_PID 0x01CB | ||
325 | #define MTXORB_FTDI_RANGE_01CC_PID 0x01CC | ||
326 | #define MTXORB_FTDI_RANGE_01CD_PID 0x01CD | ||
327 | #define MTXORB_FTDI_RANGE_01CE_PID 0x01CE | ||
328 | #define MTXORB_FTDI_RANGE_01CF_PID 0x01CF | ||
329 | #define MTXORB_FTDI_RANGE_01D0_PID 0x01D0 | ||
330 | #define MTXORB_FTDI_RANGE_01D1_PID 0x01D1 | ||
331 | #define MTXORB_FTDI_RANGE_01D2_PID 0x01D2 | ||
332 | #define MTXORB_FTDI_RANGE_01D3_PID 0x01D3 | ||
333 | #define MTXORB_FTDI_RANGE_01D4_PID 0x01D4 | ||
334 | #define MTXORB_FTDI_RANGE_01D5_PID 0x01D5 | ||
335 | #define MTXORB_FTDI_RANGE_01D6_PID 0x01D6 | ||
336 | #define MTXORB_FTDI_RANGE_01D7_PID 0x01D7 | ||
337 | #define MTXORB_FTDI_RANGE_01D8_PID 0x01D8 | ||
338 | #define MTXORB_FTDI_RANGE_01D9_PID 0x01D9 | ||
339 | #define MTXORB_FTDI_RANGE_01DA_PID 0x01DA | ||
340 | #define MTXORB_FTDI_RANGE_01DB_PID 0x01DB | ||
341 | #define MTXORB_FTDI_RANGE_01DC_PID 0x01DC | ||
342 | #define MTXORB_FTDI_RANGE_01DD_PID 0x01DD | ||
343 | #define MTXORB_FTDI_RANGE_01DE_PID 0x01DE | ||
344 | #define MTXORB_FTDI_RANGE_01DF_PID 0x01DF | ||
345 | #define MTXORB_FTDI_RANGE_01E0_PID 0x01E0 | ||
346 | #define MTXORB_FTDI_RANGE_01E1_PID 0x01E1 | ||
347 | #define MTXORB_FTDI_RANGE_01E2_PID 0x01E2 | ||
348 | #define MTXORB_FTDI_RANGE_01E3_PID 0x01E3 | ||
349 | #define MTXORB_FTDI_RANGE_01E4_PID 0x01E4 | ||
350 | #define MTXORB_FTDI_RANGE_01E5_PID 0x01E5 | ||
351 | #define MTXORB_FTDI_RANGE_01E6_PID 0x01E6 | ||
352 | #define MTXORB_FTDI_RANGE_01E7_PID 0x01E7 | ||
353 | #define MTXORB_FTDI_RANGE_01E8_PID 0x01E8 | ||
354 | #define MTXORB_FTDI_RANGE_01E9_PID 0x01E9 | ||
355 | #define MTXORB_FTDI_RANGE_01EA_PID 0x01EA | ||
356 | #define MTXORB_FTDI_RANGE_01EB_PID 0x01EB | ||
357 | #define MTXORB_FTDI_RANGE_01EC_PID 0x01EC | ||
358 | #define MTXORB_FTDI_RANGE_01ED_PID 0x01ED | ||
359 | #define MTXORB_FTDI_RANGE_01EE_PID 0x01EE | ||
360 | #define MTXORB_FTDI_RANGE_01EF_PID 0x01EF | ||
361 | #define MTXORB_FTDI_RANGE_01F0_PID 0x01F0 | ||
362 | #define MTXORB_FTDI_RANGE_01F1_PID 0x01F1 | ||
363 | #define MTXORB_FTDI_RANGE_01F2_PID 0x01F2 | ||
364 | #define MTXORB_FTDI_RANGE_01F3_PID 0x01F3 | ||
365 | #define MTXORB_FTDI_RANGE_01F4_PID 0x01F4 | ||
366 | #define MTXORB_FTDI_RANGE_01F5_PID 0x01F5 | ||
367 | #define MTXORB_FTDI_RANGE_01F6_PID 0x01F6 | ||
368 | #define MTXORB_FTDI_RANGE_01F7_PID 0x01F7 | ||
369 | #define MTXORB_FTDI_RANGE_01F8_PID 0x01F8 | ||
370 | #define MTXORB_FTDI_RANGE_01F9_PID 0x01F9 | ||
371 | #define MTXORB_FTDI_RANGE_01FA_PID 0x01FA | ||
372 | #define MTXORB_FTDI_RANGE_01FB_PID 0x01FB | ||
373 | #define MTXORB_FTDI_RANGE_01FC_PID 0x01FC | ||
374 | #define MTXORB_FTDI_RANGE_01FD_PID 0x01FD | ||
375 | #define MTXORB_FTDI_RANGE_01FE_PID 0x01FE | ||
376 | #define MTXORB_FTDI_RANGE_01FF_PID 0x01FF | ||
377 | |||
378 | |||
122 | 379 | ||
123 | /* Interbiometrics USB I/O Board */ | 380 | /* Interbiometrics USB I/O Board */ |
124 | /* Developed for Interbiometrics by Rudolf Gugler */ | 381 | /* Developed for Interbiometrics by Rudolf Gugler */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 6cecd2c12b1d..43cfde83a93b 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -236,25 +236,25 @@ static struct usb_device_id option_ids[] = { | |||
236 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, | 236 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, |
237 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, | 237 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
238 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, | 238 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, |
239 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, | 239 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
240 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, | 240 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
241 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, | 241 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
242 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) }, | 242 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) }, |
243 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) }, | 243 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) }, |
244 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) }, | 244 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) }, |
245 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) }, | 245 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) }, |
246 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) }, | 246 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) }, |
247 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) }, | 247 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) }, |
248 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) }, | 248 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) }, |
249 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) }, | 249 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) }, |
250 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) }, | 250 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) }, |
251 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) }, | 251 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) }, |
252 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) }, | 252 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) }, |
253 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) }, | 253 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) }, |
254 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) }, | 254 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) }, |
255 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) }, | 255 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) }, |
256 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) }, | 256 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) }, |
257 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) }, | 257 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) }, |
258 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, | 258 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, |
259 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ | 259 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ |
260 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ | 260 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 234c5eea95a2..103195abd417 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -56,6 +56,7 @@ static struct usb_device_id id_table [] = { | |||
56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, | 56 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, |
57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, | 57 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, |
58 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, | 58 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, |
59 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, | ||
59 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, | 60 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, |
60 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, | 61 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, |
61 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, | 62 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, |
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index 3bdefe020501..cff160abb130 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 | 14 | #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 |
15 | #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 | 15 | #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 |
16 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 | 16 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 |
17 | #define PL2303_PRODUCT_ID_MMX 0x0612 | ||
17 | 18 | ||
18 | #define ATEN_VENDOR_ID 0x0557 | 19 | #define ATEN_VENDOR_ID 0x0557 |
19 | #define ATEN_VENDOR_ID2 0x0547 | 20 | #define ATEN_VENDOR_ID2 0x0547 |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 1b09578cbb10..45fe3663fa7f 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -405,7 +405,7 @@ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, | |||
405 | UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, | 405 | UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, |
406 | "Cypress", | 406 | "Cypress", |
407 | "Cypress AT2LP", | 407 | "Cypress AT2LP", |
408 | US_SC_CYP_ATACB, US_PR_BULK, NULL, | 408 | US_SC_CYP_ATACB, US_PR_DEVICE, NULL, |
409 | 0), | 409 | 0), |
410 | #endif | 410 | #endif |
411 | 411 | ||
@@ -1522,7 +1522,7 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, | |||
1522 | "Sony Ericsson", | 1522 | "Sony Ericsson", |
1523 | "M600i", | 1523 | "M600i", |
1524 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1524 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1525 | US_FL_FIX_CAPACITY ), | 1525 | US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), |
1526 | 1526 | ||
1527 | /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> | 1527 | /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> |
1528 | * Tested on hardware version 1.10. | 1528 | * Tested on hardware version 1.10. |
@@ -1716,10 +1716,12 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, | |||
1716 | /* | 1716 | /* |
1717 | * Patch by Pete Zaitcev <zaitcev@redhat.com> | 1717 | * Patch by Pete Zaitcev <zaitcev@redhat.com> |
1718 | * Report by Mark Patton. Red Hat bz#208928. | 1718 | * Report by Mark Patton. Red Hat bz#208928. |
1719 | * Added support for rev 0x0002 (Motorola ROKR W5) | ||
1720 | * by Javier Smaldone <javier@smaldone.com.ar> | ||
1719 | */ | 1721 | */ |
1720 | UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, | 1722 | UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0002, |
1721 | "Motorola", | 1723 | "Motorola", |
1722 | "RAZR V3i", | 1724 | "RAZR V3i/ROKR W5", |
1723 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1725 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1724 | US_FL_FIX_CAPACITY), | 1726 | US_FL_FIX_CAPACITY), |
1725 | 1727 | ||
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 13866789b356..0f3c2bb7bf35 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -2,6 +2,9 @@ | |||
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/virtio_config.h> | 3 | #include <linux/virtio_config.h> |
4 | 4 | ||
5 | /* Unique numbering for virtio devices. */ | ||
6 | static unsigned int dev_index; | ||
7 | |||
5 | static ssize_t device_show(struct device *_d, | 8 | static ssize_t device_show(struct device *_d, |
6 | struct device_attribute *attr, char *buf) | 9 | struct device_attribute *attr, char *buf) |
7 | { | 10 | { |
@@ -166,7 +169,10 @@ int register_virtio_device(struct virtio_device *dev) | |||
166 | int err; | 169 | int err; |
167 | 170 | ||
168 | dev->dev.bus = &virtio_bus; | 171 | dev->dev.bus = &virtio_bus; |
169 | sprintf(dev->dev.bus_id, "%u", dev->index); | 172 | |
173 | /* Assign a unique device index and hence name. */ | ||
174 | dev->index = dev_index++; | ||
175 | sprintf(dev->dev.bus_id, "virtio%u", dev->index); | ||
170 | 176 | ||
171 | /* We always start by resetting the device, in case a previous | 177 | /* We always start by resetting the device, in case a previous |
172 | * driver messed it up. This also tests that code path a little. */ | 178 | * driver messed it up. This also tests that code path a little. */ |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 27e9fc9117cd..eae7236310e4 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -78,9 +78,6 @@ static struct device virtio_pci_root = { | |||
78 | .bus_id = "virtio-pci", | 78 | .bus_id = "virtio-pci", |
79 | }; | 79 | }; |
80 | 80 | ||
81 | /* Unique numbering for devices under the kvm root */ | ||
82 | static unsigned int dev_index; | ||
83 | |||
84 | /* Convert a generic virtio device to our structure */ | 81 | /* Convert a generic virtio device to our structure */ |
85 | static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) | 82 | static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) |
86 | { | 83 | { |
@@ -325,10 +322,6 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, | |||
325 | if (vp_dev == NULL) | 322 | if (vp_dev == NULL) |
326 | return -ENOMEM; | 323 | return -ENOMEM; |
327 | 324 | ||
328 | snprintf(vp_dev->vdev.dev.bus_id, BUS_ID_SIZE, "virtio%d", dev_index); | ||
329 | vp_dev->vdev.index = dev_index; | ||
330 | dev_index++; | ||
331 | |||
332 | vp_dev->vdev.dev.parent = &virtio_pci_root; | 325 | vp_dev->vdev.dev.parent = &virtio_pci_root; |
333 | vp_dev->vdev.config = &virtio_pci_config_ops; | 326 | vp_dev->vdev.config = &virtio_pci_config_ops; |
334 | vp_dev->pci_dev = pci_dev; | 327 | vp_dev->pci_dev = pci_dev; |
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 937a49d6772c..72bf8bc09014 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -227,7 +227,6 @@ static bool vring_enable_cb(struct virtqueue *_vq) | |||
227 | struct vring_virtqueue *vq = to_vvq(_vq); | 227 | struct vring_virtqueue *vq = to_vvq(_vq); |
228 | 228 | ||
229 | START_USE(vq); | 229 | START_USE(vq); |
230 | BUG_ON(!(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)); | ||
231 | 230 | ||
232 | /* We optimistically turn back on interrupts, then check if there was | 231 | /* We optimistically turn back on interrupts, then check if there was |
233 | * more to do. */ | 232 | * more to do. */ |
@@ -254,13 +253,6 @@ irqreturn_t vring_interrupt(int irq, void *_vq) | |||
254 | if (unlikely(vq->broken)) | 253 | if (unlikely(vq->broken)) |
255 | return IRQ_HANDLED; | 254 | return IRQ_HANDLED; |
256 | 255 | ||
257 | /* Other side may have missed us turning off the interrupt, | ||
258 | * but we should preserve disable semantic for virtio users. */ | ||
259 | if (unlikely(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { | ||
260 | pr_debug("virtqueue interrupt after disable for %p\n", vq); | ||
261 | return IRQ_HANDLED; | ||
262 | } | ||
263 | |||
264 | pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); | 256 | pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); |
265 | if (vq->vq.callback) | 257 | if (vq->vq.callback) |
266 | vq->vq.callback(&vq->vq); | 258 | vq->vq.callback(&vq->vq); |
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c index f85b19625f97..30d09cbbad94 100644 --- a/drivers/watchdog/geodewdt.c +++ b/drivers/watchdog/geodewdt.c | |||
@@ -221,8 +221,7 @@ geodewdt_probe(struct platform_device *dev) | |||
221 | { | 221 | { |
222 | int ret, timer; | 222 | int ret, timer; |
223 | 223 | ||
224 | timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, | 224 | timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING); |
225 | MFGPT_DOMAIN_WORKING, THIS_MODULE); | ||
226 | 225 | ||
227 | if (timer == -1) { | 226 | if (timer == -1) { |
228 | printk(KERN_ERR "geodewdt: No timers were available\n"); | 227 | printk(KERN_ERR "geodewdt: No timers were available\n"); |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 9b8b4cfdf993..fb655b4593c6 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -3927,9 +3927,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | |||
3927 | } | 3927 | } |
3928 | 3928 | ||
3929 | ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); | 3929 | ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); |
3930 | if (ref->VersionNumber != 3) { | 3930 | if (ref->VersionNumber != cpu_to_le16(3)) { |
3931 | cERROR(1, ("Referrals of V%d version are not supported," | 3931 | cERROR(1, ("Referrals of V%d version are not supported," |
3932 | "should be V3", ref->VersionNumber)); | 3932 | "should be V3", le16_to_cpu(ref->VersionNumber))); |
3933 | rc = -EINVAL; | 3933 | rc = -EINVAL; |
3934 | goto parse_DFS_referrals_exit; | 3934 | goto parse_DFS_referrals_exit; |
3935 | } | 3935 | } |
@@ -3977,7 +3977,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, | |||
3977 | if (rc) | 3977 | if (rc) |
3978 | goto parse_DFS_referrals_exit; | 3978 | goto parse_DFS_referrals_exit; |
3979 | 3979 | ||
3980 | ref += ref->Size; | 3980 | ref += le16_to_cpu(ref->Size); |
3981 | } | 3981 | } |
3982 | 3982 | ||
3983 | parse_DFS_referrals_exit: | 3983 | parse_DFS_referrals_exit: |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 1e44ad14881a..a27d61581bd6 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -142,53 +142,43 @@ static void o2net_idle_timer(unsigned long data); | |||
142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); | 142 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); |
143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); | 143 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); |
144 | 144 | ||
145 | static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
146 | u32 msgkey, struct task_struct *task, u8 node) | ||
147 | { | ||
148 | #ifdef CONFIG_DEBUG_FS | 145 | #ifdef CONFIG_DEBUG_FS |
146 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
147 | u32 msgkey, struct task_struct *task, u8 node) | ||
148 | { | ||
149 | INIT_LIST_HEAD(&nst->st_net_debug_item); | 149 | INIT_LIST_HEAD(&nst->st_net_debug_item); |
150 | nst->st_task = task; | 150 | nst->st_task = task; |
151 | nst->st_msg_type = msgtype; | 151 | nst->st_msg_type = msgtype; |
152 | nst->st_msg_key = msgkey; | 152 | nst->st_msg_key = msgkey; |
153 | nst->st_node = node; | 153 | nst->st_node = node; |
154 | #endif | ||
155 | } | 154 | } |
156 | 155 | ||
157 | static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | 156 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) |
158 | { | 157 | { |
159 | #ifdef CONFIG_DEBUG_FS | ||
160 | do_gettimeofday(&nst->st_sock_time); | 158 | do_gettimeofday(&nst->st_sock_time); |
161 | #endif | ||
162 | } | 159 | } |
163 | 160 | ||
164 | static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | 161 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst) |
165 | { | 162 | { |
166 | #ifdef CONFIG_DEBUG_FS | ||
167 | do_gettimeofday(&nst->st_send_time); | 163 | do_gettimeofday(&nst->st_send_time); |
168 | #endif | ||
169 | } | 164 | } |
170 | 165 | ||
171 | static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | 166 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst) |
172 | { | 167 | { |
173 | #ifdef CONFIG_DEBUG_FS | ||
174 | do_gettimeofday(&nst->st_status_time); | 168 | do_gettimeofday(&nst->st_status_time); |
175 | #endif | ||
176 | } | 169 | } |
177 | 170 | ||
178 | static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | 171 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, |
179 | struct o2net_sock_container *sc) | 172 | struct o2net_sock_container *sc) |
180 | { | 173 | { |
181 | #ifdef CONFIG_DEBUG_FS | ||
182 | nst->st_sc = sc; | 174 | nst->st_sc = sc; |
183 | #endif | ||
184 | } | 175 | } |
185 | 176 | ||
186 | static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) | 177 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) |
187 | { | 178 | { |
188 | #ifdef CONFIG_DEBUG_FS | ||
189 | nst->st_id = msg_id; | 179 | nst->st_id = msg_id; |
190 | #endif | ||
191 | } | 180 | } |
181 | #endif /* CONFIG_DEBUG_FS */ | ||
192 | 182 | ||
193 | static inline int o2net_reconnect_delay(void) | 183 | static inline int o2net_reconnect_delay(void) |
194 | { | 184 | { |
diff --git a/fs/ocfs2/cluster/tcp.h b/fs/ocfs2/cluster/tcp.h index a705d5d19036..fd6179eb26d4 100644 --- a/fs/ocfs2/cluster/tcp.h +++ b/fs/ocfs2/cluster/tcp.h | |||
@@ -128,23 +128,23 @@ void o2net_debug_del_nst(struct o2net_send_tracking *nst); | |||
128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); | 128 | void o2net_debug_add_sc(struct o2net_sock_container *sc); |
129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); | 129 | void o2net_debug_del_sc(struct o2net_sock_container *sc); |
130 | #else | 130 | #else |
131 | static int o2net_debugfs_init(void) | 131 | static inline int o2net_debugfs_init(void) |
132 | { | 132 | { |
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | static void o2net_debugfs_exit(void) | 135 | static inline void o2net_debugfs_exit(void) |
136 | { | 136 | { |
137 | } | 137 | } |
138 | static void o2net_debug_add_nst(struct o2net_send_tracking *nst) | 138 | static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst) |
139 | { | 139 | { |
140 | } | 140 | } |
141 | static void o2net_debug_del_nst(struct o2net_send_tracking *nst) | 141 | static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst) |
142 | { | 142 | { |
143 | } | 143 | } |
144 | static void o2net_debug_add_sc(struct o2net_sock_container *sc) | 144 | static inline void o2net_debug_add_sc(struct o2net_sock_container *sc) |
145 | { | 145 | { |
146 | } | 146 | } |
147 | static void o2net_debug_del_sc(struct o2net_sock_container *sc) | 147 | static inline void o2net_debug_del_sc(struct o2net_sock_container *sc) |
148 | { | 148 | { |
149 | } | 149 | } |
150 | #endif /* CONFIG_DEBUG_FS */ | 150 | #endif /* CONFIG_DEBUG_FS */ |
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h index 8d58cfe410b1..18307ff81b77 100644 --- a/fs/ocfs2/cluster/tcp_internal.h +++ b/fs/ocfs2/cluster/tcp_internal.h | |||
@@ -224,10 +224,42 @@ struct o2net_send_tracking { | |||
224 | struct timeval st_send_time; | 224 | struct timeval st_send_time; |
225 | struct timeval st_status_time; | 225 | struct timeval st_status_time; |
226 | }; | 226 | }; |
227 | |||
228 | void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
229 | u32 msgkey, struct task_struct *task, u8 node); | ||
230 | void o2net_set_nst_sock_time(struct o2net_send_tracking *nst); | ||
231 | void o2net_set_nst_send_time(struct o2net_send_tracking *nst); | ||
232 | void o2net_set_nst_status_time(struct o2net_send_tracking *nst); | ||
233 | void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
234 | struct o2net_sock_container *sc); | ||
235 | void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id); | ||
236 | |||
227 | #else | 237 | #else |
228 | struct o2net_send_tracking { | 238 | struct o2net_send_tracking { |
229 | u32 dummy; | 239 | u32 dummy; |
230 | }; | 240 | }; |
241 | |||
242 | static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, | ||
243 | u32 msgkey, struct task_struct *task, u8 node) | ||
244 | { | ||
245 | } | ||
246 | static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) | ||
247 | { | ||
248 | } | ||
249 | static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) | ||
250 | { | ||
251 | } | ||
252 | static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) | ||
253 | { | ||
254 | } | ||
255 | static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, | ||
256 | struct o2net_sock_container *sc) | ||
257 | { | ||
258 | } | ||
259 | static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, | ||
260 | u32 msg_id) | ||
261 | { | ||
262 | } | ||
231 | #endif /* CONFIG_DEBUG_FS */ | 263 | #endif /* CONFIG_DEBUG_FS */ |
232 | 264 | ||
233 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ | 265 | #endif /* O2CLUSTER_TCP_INTERNAL_H */ |
diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h index d34a62a3a625..8c686d22f9c7 100644 --- a/fs/ocfs2/dlm/dlmdebug.h +++ b/fs/ocfs2/dlm/dlmdebug.h | |||
@@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void); | |||
60 | 60 | ||
61 | #else | 61 | #else |
62 | 62 | ||
63 | static int dlm_debug_init(struct dlm_ctxt *dlm) | 63 | static inline int dlm_debug_init(struct dlm_ctxt *dlm) |
64 | { | 64 | { |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | static void dlm_debug_shutdown(struct dlm_ctxt *dlm) | 67 | static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm) |
68 | { | 68 | { |
69 | } | 69 | } |
70 | static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) | 70 | static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) |
71 | { | 71 | { |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) | 74 | static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) |
75 | { | 75 | { |
76 | } | 76 | } |
77 | static int dlm_create_debugfs_root(void) | 77 | static inline int dlm_create_debugfs_root(void) |
78 | { | 78 | { |
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | static void dlm_destroy_debugfs_root(void) | 81 | static inline void dlm_destroy_debugfs_root(void) |
82 | { | 82 | { |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index b503772cd0ec..6b97d11f6bf8 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -61,7 +61,7 @@ | |||
61 | * negotiated by the client. The client negotiates based on the maximum | 61 | * negotiated by the client. The client negotiates based on the maximum |
62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major | 62 | * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major |
63 | * number from the "SETV" message must match | 63 | * number from the "SETV" message must match |
64 | * user_stack.sp_proto->lp_max_version.pv_major, and the minor number | 64 | * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number |
65 | * must be less than or equal to ...->lp_max_version.pv_minor. | 65 | * must be less than or equal to ...->lp_max_version.pv_minor. |
66 | * | 66 | * |
67 | * Once this information has been set, mounts will be allowed. From this | 67 | * Once this information has been set, mounts will be allowed. From this |
@@ -153,7 +153,7 @@ union ocfs2_control_message { | |||
153 | struct ocfs2_control_message_down u_down; | 153 | struct ocfs2_control_message_down u_down; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct ocfs2_stack_plugin user_stack; | 156 | static struct ocfs2_stack_plugin ocfs2_user_plugin; |
157 | 157 | ||
158 | static atomic_t ocfs2_control_opened; | 158 | static atomic_t ocfs2_control_opened; |
159 | static int ocfs2_control_this_node = -1; | 159 | static int ocfs2_control_this_node = -1; |
@@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file, | |||
399 | char *ptr = NULL; | 399 | char *ptr = NULL; |
400 | struct ocfs2_control_private *p = file->private_data; | 400 | struct ocfs2_control_private *p = file->private_data; |
401 | struct ocfs2_protocol_version *max = | 401 | struct ocfs2_protocol_version *max = |
402 | &user_stack.sp_proto->lp_max_version; | 402 | &ocfs2_user_plugin.sp_proto->lp_max_version; |
403 | 403 | ||
404 | if (ocfs2_control_get_handshake_state(file) != | 404 | if (ocfs2_control_get_handshake_state(file) != |
405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) | 405 | OCFS2_CONTROL_HANDSHAKE_PROTOCOL) |
@@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); | 680 | struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); |
681 | int status = lksb->sb_status; | 681 | int status = lksb->sb_status; |
682 | 682 | ||
683 | BUG_ON(user_stack.sp_proto == NULL); | 683 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
684 | 684 | ||
685 | /* | 685 | /* |
686 | * For now we're punting on the issue of other non-standard errors | 686 | * For now we're punting on the issue of other non-standard errors |
@@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg) | |||
693 | */ | 693 | */ |
694 | 694 | ||
695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) | 695 | if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) |
696 | user_stack.sp_proto->lp_unlock_ast(astarg, 0); | 696 | ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); |
697 | else | 697 | else |
698 | user_stack.sp_proto->lp_lock_ast(astarg); | 698 | ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); |
699 | } | 699 | } |
700 | 700 | ||
701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) | 701 | static void fsdlm_blocking_ast_wrapper(void *astarg, int level) |
702 | { | 702 | { |
703 | BUG_ON(user_stack.sp_proto == NULL); | 703 | BUG_ON(ocfs2_user_plugin.sp_proto == NULL); |
704 | 704 | ||
705 | user_stack.sp_proto->lp_blocking_ast(astarg, level); | 705 | ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); |
706 | } | 706 | } |
707 | 707 | ||
708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, | 708 | static int user_dlm_lock(struct ocfs2_cluster_connection *conn, |
@@ -838,7 +838,7 @@ static int user_cluster_this_node(unsigned int *this_node) | |||
838 | return 0; | 838 | return 0; |
839 | } | 839 | } |
840 | 840 | ||
841 | static struct ocfs2_stack_operations user_stack_ops = { | 841 | static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { |
842 | .connect = user_cluster_connect, | 842 | .connect = user_cluster_connect, |
843 | .disconnect = user_cluster_disconnect, | 843 | .disconnect = user_cluster_disconnect, |
844 | .this_node = user_cluster_this_node, | 844 | .this_node = user_cluster_this_node, |
@@ -849,20 +849,20 @@ static struct ocfs2_stack_operations user_stack_ops = { | |||
849 | .dump_lksb = user_dlm_dump_lksb, | 849 | .dump_lksb = user_dlm_dump_lksb, |
850 | }; | 850 | }; |
851 | 851 | ||
852 | static struct ocfs2_stack_plugin user_stack = { | 852 | static struct ocfs2_stack_plugin ocfs2_user_plugin = { |
853 | .sp_name = "user", | 853 | .sp_name = "user", |
854 | .sp_ops = &user_stack_ops, | 854 | .sp_ops = &ocfs2_user_plugin_ops, |
855 | .sp_owner = THIS_MODULE, | 855 | .sp_owner = THIS_MODULE, |
856 | }; | 856 | }; |
857 | 857 | ||
858 | 858 | ||
859 | static int __init user_stack_init(void) | 859 | static int __init ocfs2_user_plugin_init(void) |
860 | { | 860 | { |
861 | int rc; | 861 | int rc; |
862 | 862 | ||
863 | rc = ocfs2_control_init(); | 863 | rc = ocfs2_control_init(); |
864 | if (!rc) { | 864 | if (!rc) { |
865 | rc = ocfs2_stack_glue_register(&user_stack); | 865 | rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); |
866 | if (rc) | 866 | if (rc) |
867 | ocfs2_control_exit(); | 867 | ocfs2_control_exit(); |
868 | } | 868 | } |
@@ -870,14 +870,14 @@ static int __init user_stack_init(void) | |||
870 | return rc; | 870 | return rc; |
871 | } | 871 | } |
872 | 872 | ||
873 | static void __exit user_stack_exit(void) | 873 | static void __exit ocfs2_user_plugin_exit(void) |
874 | { | 874 | { |
875 | ocfs2_stack_glue_unregister(&user_stack); | 875 | ocfs2_stack_glue_unregister(&ocfs2_user_plugin); |
876 | ocfs2_control_exit(); | 876 | ocfs2_control_exit(); |
877 | } | 877 | } |
878 | 878 | ||
879 | MODULE_AUTHOR("Oracle"); | 879 | MODULE_AUTHOR("Oracle"); |
880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); | 880 | MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); |
881 | MODULE_LICENSE("GPL"); | 881 | MODULE_LICENSE("GPL"); |
882 | module_init(user_stack_init); | 882 | module_init(ocfs2_user_plugin_init); |
883 | module_exit(user_stack_exit); | 883 | module_exit(ocfs2_user_plugin_exit); |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index a9248d883675..76033831eb35 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -105,13 +105,6 @@ extern int sram_free(const void*); | |||
105 | extern void *sram_alloc_with_lsl(size_t, unsigned long); | 105 | extern void *sram_alloc_with_lsl(size_t, unsigned long); |
106 | extern int sram_free_with_lsl(const void*); | 106 | extern int sram_free_with_lsl(const void*); |
107 | 107 | ||
108 | extern void led_on(int); | ||
109 | extern void led_off(int); | ||
110 | extern void led_toggle(int); | ||
111 | extern void led_disp_num(int); | ||
112 | extern void led_toggle_num(int); | ||
113 | extern void init_leds(void); | ||
114 | |||
115 | extern const char bfin_board_name[]; | 108 | extern const char bfin_board_name[]; |
116 | extern unsigned long wall_jiffies; | 109 | extern unsigned long wall_jiffies; |
117 | 110 | ||
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h index 735fa02fafb2..4725268a5ada 100644 --- a/include/asm-blackfin/mach-bf527/anomaly.h +++ b/include/asm-blackfin/mach-bf527/anomaly.h | |||
@@ -15,12 +15,16 @@ | |||
15 | 15 | ||
16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ | 16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ |
17 | #define ANOMALY_05000074 (1) | 17 | #define ANOMALY_05000074 (1) |
18 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ | ||
19 | #define ANOMALY_05000119 (1) | ||
18 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 20 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
19 | #define ANOMALY_05000122 (1) | 21 | #define ANOMALY_05000122 (1) |
20 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ | 22 | /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ |
21 | #define ANOMALY_05000245 (1) | 23 | #define ANOMALY_05000245 (1) |
22 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 24 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
23 | #define ANOMALY_05000265 (1) | 25 | #define ANOMALY_05000265 (1) |
26 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
27 | #define ANOMALY_05000312 (1) | ||
24 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 28 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
25 | #define ANOMALY_05000328 (1) | 29 | #define ANOMALY_05000328 (1) |
26 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 30 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
@@ -92,7 +96,6 @@ | |||
92 | #define ANOMALY_05000266 (0) | 96 | #define ANOMALY_05000266 (0) |
93 | #define ANOMALY_05000273 (0) | 97 | #define ANOMALY_05000273 (0) |
94 | #define ANOMALY_05000311 (0) | 98 | #define ANOMALY_05000311 (0) |
95 | #define ANOMALY_05000312 (0) | ||
96 | #define ANOMALY_05000323 (0) | 99 | #define ANOMALY_05000323 (0) |
97 | #define ANOMALY_05000363 (0) | 100 | #define ANOMALY_05000363 (0) |
98 | 101 | ||
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index 5a6dcc5fa36c..8f7ea112fd3a 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf533/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf533/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -176,6 +176,21 @@ | |||
176 | #define ANOMALY_05000315 (1) | 176 | #define ANOMALY_05000315 (1) |
177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ | 177 | /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ |
178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) | 178 | #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) |
179 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
180 | #define ANOMALY_05000357 (1) | ||
181 | /* UART Break Signal Issues */ | ||
182 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
183 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
184 | #define ANOMALY_05000366 (1) | ||
185 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
186 | #define ANOMALY_05000371 (1) | ||
187 | /* PPI Does Not Start Properly In Specific Mode */ | ||
188 | #define ANOMALY_05000400 (__SILICON_REVISION__ >= 5) | ||
189 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
190 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) | ||
191 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
192 | #define ANOMALY_05000403 (1) | ||
193 | |||
179 | 194 | ||
180 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are | 195 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are |
181 | * here to show running on older silicon just isn't feasible. | 196 | * here to show running on older silicon just isn't feasible. |
@@ -249,20 +264,6 @@ | |||
249 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) | 264 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) |
250 | /* Internal Voltage Regulator may not start up */ | 265 | /* Internal Voltage Regulator may not start up */ |
251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 266 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
253 | #define ANOMALY_05000357 (1) | ||
254 | /* UART Break Signal Issues */ | ||
255 | #define ANOMALY_05000363 (__SILICON_REVISION__ < 5) | ||
256 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
257 | #define ANOMALY_05000366 (1) | ||
258 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
259 | #define ANOMALY_05000371 (1) | ||
260 | /* PPI Does Not Start Properly In Specific Mode */ | ||
261 | #define ANOMALY_05000400 (__SILICON_REVISION__ == 5) | ||
262 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
263 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 5) | ||
264 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
265 | #define ANOMALY_05000403 (1) | ||
266 | 267 | ||
267 | /* Anomalies that don't exist on this proc */ | 268 | /* Anomalies that don't exist on this proc */ |
268 | #define ANOMALY_05000266 (0) | 269 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index a6b08facb242..8460ab9c324f 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf537/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf537/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -132,8 +132,8 @@ | |||
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | 134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) |
135 | /* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ | 135 | /* New Feature: UART Remains Enabled after UART Boot */ |
136 | #define ANOMALY_05000350 (__SILICON_REVISION__ < 3) | 136 | #define ANOMALY_05000350 (__SILICON_REVISION__ >= 3) |
137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | 137 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ |
138 | #define ANOMALY_05000355 (1) | 138 | #define ANOMALY_05000355 (1) |
139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 139 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
@@ -145,12 +145,10 @@ | |||
145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 145 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
146 | #define ANOMALY_05000371 (1) | 146 | #define ANOMALY_05000371 (1) |
147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | 147 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ |
148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) | 148 | #define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) |
149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | 149 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ |
150 | #define ANOMALY_05000403 (1) | 150 | #define ANOMALY_05000403 (1) |
151 | 151 | ||
152 | |||
153 | |||
154 | /* Anomalies that don't exist on this proc */ | 152 | /* Anomalies that don't exist on this proc */ |
155 | #define ANOMALY_05000125 (0) | 153 | #define ANOMALY_05000125 (0) |
156 | #define ANOMALY_05000158 (0) | 154 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index 49d3cebc5293..3ad59655881a 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define ANOMALY_05000365 (1) | 75 | #define ANOMALY_05000365 (1) |
76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | 76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ |
77 | #define ANOMALY_05000369 (1) | 77 | #define ANOMALY_05000369 (1) |
78 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
79 | #define ANOMALY_05000371 (1) | ||
78 | /* Mobile DDR Operation Not Functional */ | 80 | /* Mobile DDR Operation Not Functional */ |
79 | #define ANOMALY_05000377 (1) | 81 | #define ANOMALY_05000377 (1) |
80 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | 82 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ |
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index 82157caa96a2..5c5d7d7d695f 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * File: include/asm-blackfin/mach-bf561/anomaly.h | 2 | * File: include/asm-blackfin/mach-bf561/anomaly.h |
3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 3 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
4 | * | 4 | * |
5 | * Copyright (C) 2004-2007 Analog Devices Inc. | 5 | * Copyright (C) 2004-2008 Analog Devices Inc. |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
diff --git a/include/asm-ia64/patch.h b/include/asm-ia64/patch.h index a71543084fb4..295fe6ab4584 100644 --- a/include/asm-ia64/patch.h +++ b/include/asm-ia64/patch.h | |||
@@ -21,6 +21,7 @@ extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel | |||
21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); | 21 | extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); |
22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); | 22 | extern void ia64_patch_vtop (unsigned long start, unsigned long end); |
23 | extern void ia64_patch_phys_stack_reg(unsigned long val); | 23 | extern void ia64_patch_phys_stack_reg(unsigned long val); |
24 | extern void ia64_patch_rse (unsigned long start, unsigned long end); | ||
24 | extern void ia64_patch_gate (void); | 25 | extern void ia64_patch_gate (void); |
25 | 26 | ||
26 | #endif /* _ASM_IA64_PATCH_H */ | 27 | #endif /* _ASM_IA64_PATCH_H */ |
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h index 4b2a8d40ebc5..15f8dcfe6eee 100644 --- a/include/asm-ia64/ptrace.h +++ b/include/asm-ia64/ptrace.h | |||
@@ -76,7 +76,7 @@ | |||
76 | # define KERNEL_STACK_SIZE_ORDER 0 | 76 | # define KERNEL_STACK_SIZE_ORDER 0 |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15) | 79 | #define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31) |
80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) | 80 | #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) |
81 | 81 | ||
82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET | 82 | #define KERNEL_STACK_SIZE IA64_STK_OFFSET |
diff --git a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h index dc42a359894f..7286e4a9fe84 100644 --- a/include/asm-ia64/sections.h +++ b/include/asm-ia64/sections.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; | 11 | extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; |
12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; | 12 | extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; |
13 | extern char __start___rse_patchlist[], __end___rse_patchlist[]; | ||
13 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; | 14 | extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; |
14 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; | 15 | extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; |
15 | extern char __start_gate_section[]; | 16 | extern char __start_gate_section[]; |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index e0062d73db1c..89189488e286 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -100,7 +100,7 @@ static inline type name(const volatile type __iomem *addr) \ | |||
100 | { \ | 100 | { \ |
101 | type ret; \ | 101 | type ret; \ |
102 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ | 102 | __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ |
103 | : "=r" (ret) : "r" (addr), "m" (*addr)); \ | 103 | : "=r" (ret) : "r" (addr), "m" (*addr) : "memory"); \ |
104 | return ret; \ | 104 | return ret; \ |
105 | } | 105 | } |
106 | 106 | ||
@@ -108,8 +108,8 @@ static inline type name(const volatile type __iomem *addr) \ | |||
108 | static inline void name(volatile type __iomem *addr, type val) \ | 108 | static inline void name(volatile type __iomem *addr, type val) \ |
109 | { \ | 109 | { \ |
110 | __asm__ __volatile__("sync;" insn \ | 110 | __asm__ __volatile__("sync;" insn \ |
111 | : "=m" (*addr) : "r" (val), "r" (addr)); \ | 111 | : "=m" (*addr) : "r" (val), "r" (addr) : "memory"); \ |
112 | IO_SET_SYNC_FLAG(); \ | 112 | IO_SET_SYNC_FLAG(); \ |
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||
@@ -333,7 +333,8 @@ static inline unsigned int name(unsigned int port) \ | |||
333 | " .long 3b,5b\n" \ | 333 | " .long 3b,5b\n" \ |
334 | ".previous" \ | 334 | ".previous" \ |
335 | : "=&r" (x) \ | 335 | : "=&r" (x) \ |
336 | : "r" (port + _IO_BASE)); \ | 336 | : "r" (port + _IO_BASE) \ |
337 | : "memory"); \ | ||
337 | return x; \ | 338 | return x; \ |
338 | } | 339 | } |
339 | 340 | ||
@@ -350,7 +351,8 @@ static inline void name(unsigned int val, unsigned int port) \ | |||
350 | " .long 0b,2b\n" \ | 351 | " .long 0b,2b\n" \ |
351 | " .long 1b,2b\n" \ | 352 | " .long 1b,2b\n" \ |
352 | ".previous" \ | 353 | ".previous" \ |
353 | : : "r" (val), "r" (port + _IO_BASE)); \ | 354 | : : "r" (val), "r" (port + _IO_BASE) \ |
355 | : "memory"); \ | ||
354 | } | 356 | } |
355 | 357 | ||
356 | __do_in_asm(_rec_inb, "lbzx") | 358 | __do_in_asm(_rec_inb, "lbzx") |
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 0e959e20e9a3..41c547656130 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -40,7 +40,13 @@ typedef __signed__ long saddr_t; | |||
40 | 40 | ||
41 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | 42 | ||
43 | typedef u64 dma64_addr_t; | ||
44 | #ifdef __s390x__ | ||
45 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | ||
46 | typedef u64 dma_addr_t; | ||
47 | #else | ||
43 | typedef u32 dma_addr_t; | 48 | typedef u32 dma_addr_t; |
49 | #endif | ||
44 | 50 | ||
45 | #ifndef __s390x__ | 51 | #ifndef __s390x__ |
46 | typedef union { | 52 | typedef union { |
diff --git a/include/linux/device.h b/include/linux/device.h index 14616e80213c..6a2d04c011bc 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -385,6 +385,9 @@ static inline const char *dev_name(struct device *dev) | |||
385 | return dev->bus_id; | 385 | return dev->bus_id; |
386 | } | 386 | } |
387 | 387 | ||
388 | extern int dev_set_name(struct device *dev, const char *name, ...) | ||
389 | __attribute__((format(printf, 2, 3))); | ||
390 | |||
388 | #ifdef CONFIG_NUMA | 391 | #ifdef CONFIG_NUMA |
389 | static inline int dev_to_node(struct device *dev) | 392 | static inline int dev_to_node(struct device *dev) |
390 | { | 393 | { |
diff --git a/include/linux/input.h b/include/linux/input.h index 28a094fcfe20..e075c4b762fb 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -637,7 +637,9 @@ struct input_absinfo { | |||
637 | #define SW_LID 0x00 /* set = lid shut */ | 637 | #define SW_LID 0x00 /* set = lid shut */ |
638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ | 638 | #define SW_TABLET_MODE 0x01 /* set = tablet mode */ |
639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ | 639 | #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ |
640 | #define SW_RADIO 0x03 /* set = radio enabled */ | 640 | #define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" |
641 | set = radio enabled */ | ||
642 | #define SW_RADIO SW_RFKILL_ALL /* deprecated */ | ||
641 | #define SW_MAX 0x0f | 643 | #define SW_MAX 0x0f |
642 | #define SW_CNT (SW_MAX+1) | 644 | #define SW_CNT (SW_MAX+1) |
643 | 645 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 3e05e5474749..ae0be3c62375 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -766,7 +766,6 @@ struct sched_domain { | |||
766 | struct sched_domain *child; /* bottom domain must be null terminated */ | 766 | struct sched_domain *child; /* bottom domain must be null terminated */ |
767 | struct sched_group *groups; /* the balancing groups of the domain */ | 767 | struct sched_group *groups; /* the balancing groups of the domain */ |
768 | cpumask_t span; /* span of all CPUs in this domain */ | 768 | cpumask_t span; /* span of all CPUs in this domain */ |
769 | int first_cpu; /* cache of the first cpu in this domain */ | ||
770 | unsigned long min_interval; /* Minimum balance interval ms */ | 769 | unsigned long min_interval; /* Minimum balance interval ms */ |
771 | unsigned long max_interval; /* Maximum balance interval ms */ | 770 | unsigned long max_interval; /* Maximum balance interval ms */ |
772 | unsigned int busy_factor; /* less balancing by factor if busy */ | 771 | unsigned int busy_factor; /* less balancing by factor if busy */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d32123ae08ad..d8f31de632c5 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -192,6 +192,7 @@ struct uart_ops { | |||
192 | void (*shutdown)(struct uart_port *); | 192 | void (*shutdown)(struct uart_port *); |
193 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 193 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
194 | struct ktermios *old); | 194 | struct ktermios *old); |
195 | void (*set_ldisc)(struct uart_port *); | ||
195 | void (*pm)(struct uart_port *, unsigned int state, | 196 | void (*pm)(struct uart_port *, unsigned int state, |
196 | unsigned int oldstate); | 197 | unsigned int oldstate); |
197 | int (*set_wake)(struct uart_port *, unsigned int state); | 198 | int (*set_wake)(struct uart_port *, unsigned int state); |
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h index e9bbe3ebd721..d5ca78b93a3b 100644 --- a/include/linux/spi/mmc_spi.h +++ b/include/linux/spi/mmc_spi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_SPI_MMC_SPI_H | 1 | #ifndef __LINUX_SPI_MMC_SPI_H |
2 | #define __LINUX_SPI_MMC_SPI_H | 2 | #define __LINUX_SPI_MMC_SPI_H |
3 | 3 | ||
4 | #include <linux/interrupt.h> | ||
5 | |||
4 | struct device; | 6 | struct device; |
5 | struct mmc_host; | 7 | struct mmc_host; |
6 | 8 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index 4bb7074a2c3a..24f3d2282e11 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -166,7 +166,9 @@ void arch_update_cpu_topology(void); | |||
166 | .busy_idx = 3, \ | 166 | .busy_idx = 3, \ |
167 | .idle_idx = 3, \ | 167 | .idle_idx = 3, \ |
168 | .flags = SD_LOAD_BALANCE \ | 168 | .flags = SD_LOAD_BALANCE \ |
169 | | SD_SERIALIZE, \ | 169 | | SD_BALANCE_NEWIDLE \ |
170 | | SD_WAKE_AFFINE \ | ||
171 | | SD_SERIALIZE, \ | ||
170 | .last_balance = jiffies, \ | 172 | .last_balance = jiffies, \ |
171 | .balance_interval = 64, \ | 173 | .balance_interval = 64, \ |
172 | } | 174 | } |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index d4695a3356d0..5f79a5f9de79 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -10,18 +10,19 @@ | |||
10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ | 10 | #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ |
11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ | 11 | #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ |
12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ | 12 | #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ |
13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | ||
13 | 14 | ||
14 | struct virtio_blk_config | 15 | struct virtio_blk_config |
15 | { | 16 | { |
16 | /* The capacity (in 512-byte sectors). */ | 17 | /* The capacity (in 512-byte sectors). */ |
17 | __le64 capacity; | 18 | __u64 capacity; |
18 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 19 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
19 | __le32 size_max; | 20 | __u32 size_max; |
20 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ | 21 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ |
21 | __le32 seg_max; | 22 | __u32 seg_max; |
22 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ | 23 | /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ |
23 | struct virtio_blk_geometry { | 24 | struct virtio_blk_geometry { |
24 | __le16 cylinders; | 25 | __u16 cylinders; |
25 | __u8 heads; | 26 | __u8 heads; |
26 | __u8 sectors; | 27 | __u8 sectors; |
27 | } geometry; | 28 | } geometry; |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 50db245c81ad..f364bbf63c34 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -15,6 +15,10 @@ | |||
15 | /* We've given up on this device. */ | 15 | /* We've given up on this device. */ |
16 | #define VIRTIO_CONFIG_S_FAILED 0x80 | 16 | #define VIRTIO_CONFIG_S_FAILED 0x80 |
17 | 17 | ||
18 | /* Do we get callbacks when the ring is completely used, even if we've | ||
19 | * suppressed them? */ | ||
20 | #define VIRTIO_F_NOTIFY_ON_EMPTY 24 | ||
21 | |||
18 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
19 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
20 | 24 | ||
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, | |||
99 | * The return value is -ENOENT if the feature doesn't exist. Otherwise | 103 | * The return value is -ENOENT if the feature doesn't exist. Otherwise |
100 | * the config value is copied into whatever is pointed to by v. */ | 104 | * the config value is copied into whatever is pointed to by v. */ |
101 | #define virtio_config_val(vdev, fbit, offset, v) \ | 105 | #define virtio_config_val(vdev, fbit, offset, v) \ |
102 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) | 106 | virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) |
103 | 107 | ||
104 | static inline int virtio_config_buf(struct virtio_device *vdev, | 108 | static inline int virtio_config_buf(struct virtio_device *vdev, |
105 | unsigned int fbit, | 109 | unsigned int fbit, |
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h new file mode 100644 index 000000000000..331afb6c9f62 --- /dev/null +++ b/include/linux/virtio_rng.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_VIRTIO_RNG_H | ||
2 | #define _LINUX_VIRTIO_RNG_H | ||
3 | #include <linux/virtio_config.h> | ||
4 | |||
5 | /* The ID for virtio_rng */ | ||
6 | #define VIRTIO_ID_RNG 4 | ||
7 | |||
8 | #endif /* _LINUX_VIRTIO_RNG_H */ | ||
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h index 4d13732e9cf0..6f69968eab24 100644 --- a/include/linux/wm97xx.h +++ b/include/linux/wm97xx.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ | 100 | #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ |
101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ | 101 | #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ |
102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ | 102 | #define WM9713_COO 0x0001 /* enable coordinate mode */ |
103 | #define WM9713_45W 0x1000 /* set for 5 wire panel */ | ||
103 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ | 104 | #define WM9713_PDEN 0x0800 /* measure only when pen down */ |
104 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ | 105 | #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ |
105 | #define WM9713_WAIT 0x0200 /* coordinate wait */ | 106 | #define WM9713_WAIT 0x0200 /* coordinate wait */ |
diff --git a/kernel/sched.c b/kernel/sched.c index cfa222a91539..bfb8ad8ed171 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val) | |||
136 | 136 | ||
137 | static inline int rt_policy(int policy) | 137 | static inline int rt_policy(int policy) |
138 | { | 138 | { |
139 | if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR)) | 139 | if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR)) |
140 | return 1; | 140 | return 1; |
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
@@ -398,43 +398,6 @@ struct cfs_rq { | |||
398 | */ | 398 | */ |
399 | struct list_head leaf_cfs_rq_list; | 399 | struct list_head leaf_cfs_rq_list; |
400 | struct task_group *tg; /* group that "owns" this runqueue */ | 400 | struct task_group *tg; /* group that "owns" this runqueue */ |
401 | |||
402 | #ifdef CONFIG_SMP | ||
403 | unsigned long task_weight; | ||
404 | unsigned long shares; | ||
405 | /* | ||
406 | * We need space to build a sched_domain wide view of the full task | ||
407 | * group tree, in order to avoid depending on dynamic memory allocation | ||
408 | * during the load balancing we place this in the per cpu task group | ||
409 | * hierarchy. This limits the load balancing to one instance per cpu, | ||
410 | * but more should not be needed anyway. | ||
411 | */ | ||
412 | struct aggregate_struct { | ||
413 | /* | ||
414 | * load = weight(cpus) * f(tg) | ||
415 | * | ||
416 | * Where f(tg) is the recursive weight fraction assigned to | ||
417 | * this group. | ||
418 | */ | ||
419 | unsigned long load; | ||
420 | |||
421 | /* | ||
422 | * part of the group weight distributed to this span. | ||
423 | */ | ||
424 | unsigned long shares; | ||
425 | |||
426 | /* | ||
427 | * The sum of all runqueue weights within this span. | ||
428 | */ | ||
429 | unsigned long rq_weight; | ||
430 | |||
431 | /* | ||
432 | * Weight contributed by tasks; this is the part we can | ||
433 | * influence by moving tasks around. | ||
434 | */ | ||
435 | unsigned long task_weight; | ||
436 | } aggregate; | ||
437 | #endif | ||
438 | #endif | 401 | #endif |
439 | }; | 402 | }; |
440 | 403 | ||
@@ -1368,9 +1331,6 @@ static void __resched_task(struct task_struct *p, int tif_bit) | |||
1368 | */ | 1331 | */ |
1369 | #define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) | 1332 | #define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) |
1370 | 1333 | ||
1371 | /* | ||
1372 | * delta *= weight / lw | ||
1373 | */ | ||
1374 | static unsigned long | 1334 | static unsigned long |
1375 | calc_delta_mine(unsigned long delta_exec, unsigned long weight, | 1335 | calc_delta_mine(unsigned long delta_exec, unsigned long weight, |
1376 | struct load_weight *lw) | 1336 | struct load_weight *lw) |
@@ -1393,6 +1353,12 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, | |||
1393 | return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); | 1353 | return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); |
1394 | } | 1354 | } |
1395 | 1355 | ||
1356 | static inline unsigned long | ||
1357 | calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) | ||
1358 | { | ||
1359 | return calc_delta_mine(delta_exec, NICE_0_LOAD, lw); | ||
1360 | } | ||
1361 | |||
1396 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) | 1362 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) |
1397 | { | 1363 | { |
1398 | lw->weight += inc; | 1364 | lw->weight += inc; |
@@ -1505,326 +1471,6 @@ static unsigned long source_load(int cpu, int type); | |||
1505 | static unsigned long target_load(int cpu, int type); | 1471 | static unsigned long target_load(int cpu, int type); |
1506 | static unsigned long cpu_avg_load_per_task(int cpu); | 1472 | static unsigned long cpu_avg_load_per_task(int cpu); |
1507 | static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); | 1473 | static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); |
1508 | |||
1509 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1510 | |||
1511 | /* | ||
1512 | * Group load balancing. | ||
1513 | * | ||
1514 | * We calculate a few balance domain wide aggregate numbers; load and weight. | ||
1515 | * Given the pictures below, and assuming each item has equal weight: | ||
1516 | * | ||
1517 | * root 1 - thread | ||
1518 | * / | \ A - group | ||
1519 | * A 1 B | ||
1520 | * /|\ / \ | ||
1521 | * C 2 D 3 4 | ||
1522 | * | | | ||
1523 | * 5 6 | ||
1524 | * | ||
1525 | * load: | ||
1526 | * A and B get 1/3-rd of the total load. C and D get 1/3-rd of A's 1/3-rd, | ||
1527 | * which equals 1/9-th of the total load. | ||
1528 | * | ||
1529 | * shares: | ||
1530 | * The weight of this group on the selected cpus. | ||
1531 | * | ||
1532 | * rq_weight: | ||
1533 | * Direct sum of all the cpu's their rq weight, e.g. A would get 3 while | ||
1534 | * B would get 2. | ||
1535 | * | ||
1536 | * task_weight: | ||
1537 | * Part of the rq_weight contributed by tasks; all groups except B would | ||
1538 | * get 1, B gets 2. | ||
1539 | */ | ||
1540 | |||
1541 | static inline struct aggregate_struct * | ||
1542 | aggregate(struct task_group *tg, struct sched_domain *sd) | ||
1543 | { | ||
1544 | return &tg->cfs_rq[sd->first_cpu]->aggregate; | ||
1545 | } | ||
1546 | |||
1547 | typedef void (*aggregate_func)(struct task_group *, struct sched_domain *); | ||
1548 | |||
1549 | /* | ||
1550 | * Iterate the full tree, calling @down when first entering a node and @up when | ||
1551 | * leaving it for the final time. | ||
1552 | */ | ||
1553 | static | ||
1554 | void aggregate_walk_tree(aggregate_func down, aggregate_func up, | ||
1555 | struct sched_domain *sd) | ||
1556 | { | ||
1557 | struct task_group *parent, *child; | ||
1558 | |||
1559 | rcu_read_lock(); | ||
1560 | parent = &root_task_group; | ||
1561 | down: | ||
1562 | (*down)(parent, sd); | ||
1563 | list_for_each_entry_rcu(child, &parent->children, siblings) { | ||
1564 | parent = child; | ||
1565 | goto down; | ||
1566 | |||
1567 | up: | ||
1568 | continue; | ||
1569 | } | ||
1570 | (*up)(parent, sd); | ||
1571 | |||
1572 | child = parent; | ||
1573 | parent = parent->parent; | ||
1574 | if (parent) | ||
1575 | goto up; | ||
1576 | rcu_read_unlock(); | ||
1577 | } | ||
1578 | |||
1579 | /* | ||
1580 | * Calculate the aggregate runqueue weight. | ||
1581 | */ | ||
1582 | static | ||
1583 | void aggregate_group_weight(struct task_group *tg, struct sched_domain *sd) | ||
1584 | { | ||
1585 | unsigned long rq_weight = 0; | ||
1586 | unsigned long task_weight = 0; | ||
1587 | int i; | ||
1588 | |||
1589 | for_each_cpu_mask(i, sd->span) { | ||
1590 | rq_weight += tg->cfs_rq[i]->load.weight; | ||
1591 | task_weight += tg->cfs_rq[i]->task_weight; | ||
1592 | } | ||
1593 | |||
1594 | aggregate(tg, sd)->rq_weight = rq_weight; | ||
1595 | aggregate(tg, sd)->task_weight = task_weight; | ||
1596 | } | ||
1597 | |||
1598 | /* | ||
1599 | * Compute the weight of this group on the given cpus. | ||
1600 | */ | ||
1601 | static | ||
1602 | void aggregate_group_shares(struct task_group *tg, struct sched_domain *sd) | ||
1603 | { | ||
1604 | unsigned long shares = 0; | ||
1605 | int i; | ||
1606 | |||
1607 | for_each_cpu_mask(i, sd->span) | ||
1608 | shares += tg->cfs_rq[i]->shares; | ||
1609 | |||
1610 | if ((!shares && aggregate(tg, sd)->rq_weight) || shares > tg->shares) | ||
1611 | shares = tg->shares; | ||
1612 | |||
1613 | aggregate(tg, sd)->shares = shares; | ||
1614 | } | ||
1615 | |||
1616 | /* | ||
1617 | * Compute the load fraction assigned to this group, relies on the aggregate | ||
1618 | * weight and this group's parent's load, i.e. top-down. | ||
1619 | */ | ||
1620 | static | ||
1621 | void aggregate_group_load(struct task_group *tg, struct sched_domain *sd) | ||
1622 | { | ||
1623 | unsigned long load; | ||
1624 | |||
1625 | if (!tg->parent) { | ||
1626 | int i; | ||
1627 | |||
1628 | load = 0; | ||
1629 | for_each_cpu_mask(i, sd->span) | ||
1630 | load += cpu_rq(i)->load.weight; | ||
1631 | |||
1632 | } else { | ||
1633 | load = aggregate(tg->parent, sd)->load; | ||
1634 | |||
1635 | /* | ||
1636 | * shares is our weight in the parent's rq so | ||
1637 | * shares/parent->rq_weight gives our fraction of the load | ||
1638 | */ | ||
1639 | load *= aggregate(tg, sd)->shares; | ||
1640 | load /= aggregate(tg->parent, sd)->rq_weight + 1; | ||
1641 | } | ||
1642 | |||
1643 | aggregate(tg, sd)->load = load; | ||
1644 | } | ||
1645 | |||
1646 | static void __set_se_shares(struct sched_entity *se, unsigned long shares); | ||
1647 | |||
1648 | /* | ||
1649 | * Calculate and set the cpu's group shares. | ||
1650 | */ | ||
1651 | static void | ||
1652 | __update_group_shares_cpu(struct task_group *tg, struct sched_domain *sd, | ||
1653 | int tcpu) | ||
1654 | { | ||
1655 | int boost = 0; | ||
1656 | unsigned long shares; | ||
1657 | unsigned long rq_weight; | ||
1658 | |||
1659 | if (!tg->se[tcpu]) | ||
1660 | return; | ||
1661 | |||
1662 | rq_weight = tg->cfs_rq[tcpu]->load.weight; | ||
1663 | |||
1664 | /* | ||
1665 | * If there are currently no tasks on the cpu pretend there is one of | ||
1666 | * average load so that when a new task gets to run here it will not | ||
1667 | * get delayed by group starvation. | ||
1668 | */ | ||
1669 | if (!rq_weight) { | ||
1670 | boost = 1; | ||
1671 | rq_weight = NICE_0_LOAD; | ||
1672 | } | ||
1673 | |||
1674 | /* | ||
1675 | * \Sum shares * rq_weight | ||
1676 | * shares = ----------------------- | ||
1677 | * \Sum rq_weight | ||
1678 | * | ||
1679 | */ | ||
1680 | shares = aggregate(tg, sd)->shares * rq_weight; | ||
1681 | shares /= aggregate(tg, sd)->rq_weight + 1; | ||
1682 | |||
1683 | /* | ||
1684 | * record the actual number of shares, not the boosted amount. | ||
1685 | */ | ||
1686 | tg->cfs_rq[tcpu]->shares = boost ? 0 : shares; | ||
1687 | |||
1688 | if (shares < MIN_SHARES) | ||
1689 | shares = MIN_SHARES; | ||
1690 | else if (shares > MAX_SHARES) | ||
1691 | shares = MAX_SHARES; | ||
1692 | |||
1693 | __set_se_shares(tg->se[tcpu], shares); | ||
1694 | } | ||
1695 | |||
1696 | /* | ||
1697 | * Re-adjust the weights on the cpu the task came from and on the cpu the | ||
1698 | * task went to. | ||
1699 | */ | ||
1700 | static void | ||
1701 | __move_group_shares(struct task_group *tg, struct sched_domain *sd, | ||
1702 | int scpu, int dcpu) | ||
1703 | { | ||
1704 | unsigned long shares; | ||
1705 | |||
1706 | shares = tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; | ||
1707 | |||
1708 | __update_group_shares_cpu(tg, sd, scpu); | ||
1709 | __update_group_shares_cpu(tg, sd, dcpu); | ||
1710 | |||
1711 | /* | ||
1712 | * ensure we never loose shares due to rounding errors in the | ||
1713 | * above redistribution. | ||
1714 | */ | ||
1715 | shares -= tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; | ||
1716 | if (shares) | ||
1717 | tg->cfs_rq[dcpu]->shares += shares; | ||
1718 | } | ||
1719 | |||
1720 | /* | ||
1721 | * Because changing a group's shares changes the weight of the super-group | ||
1722 | * we need to walk up the tree and change all shares until we hit the root. | ||
1723 | */ | ||
1724 | static void | ||
1725 | move_group_shares(struct task_group *tg, struct sched_domain *sd, | ||
1726 | int scpu, int dcpu) | ||
1727 | { | ||
1728 | while (tg) { | ||
1729 | __move_group_shares(tg, sd, scpu, dcpu); | ||
1730 | tg = tg->parent; | ||
1731 | } | ||
1732 | } | ||
1733 | |||
1734 | static | ||
1735 | void aggregate_group_set_shares(struct task_group *tg, struct sched_domain *sd) | ||
1736 | { | ||
1737 | unsigned long shares = aggregate(tg, sd)->shares; | ||
1738 | int i; | ||
1739 | |||
1740 | for_each_cpu_mask(i, sd->span) { | ||
1741 | struct rq *rq = cpu_rq(i); | ||
1742 | unsigned long flags; | ||
1743 | |||
1744 | spin_lock_irqsave(&rq->lock, flags); | ||
1745 | __update_group_shares_cpu(tg, sd, i); | ||
1746 | spin_unlock_irqrestore(&rq->lock, flags); | ||
1747 | } | ||
1748 | |||
1749 | aggregate_group_shares(tg, sd); | ||
1750 | |||
1751 | /* | ||
1752 | * ensure we never loose shares due to rounding errors in the | ||
1753 | * above redistribution. | ||
1754 | */ | ||
1755 | shares -= aggregate(tg, sd)->shares; | ||
1756 | if (shares) { | ||
1757 | tg->cfs_rq[sd->first_cpu]->shares += shares; | ||
1758 | aggregate(tg, sd)->shares += shares; | ||
1759 | } | ||
1760 | } | ||
1761 | |||
1762 | /* | ||
1763 | * Calculate the accumulative weight and recursive load of each task group | ||
1764 | * while walking down the tree. | ||
1765 | */ | ||
1766 | static | ||
1767 | void aggregate_get_down(struct task_group *tg, struct sched_domain *sd) | ||
1768 | { | ||
1769 | aggregate_group_weight(tg, sd); | ||
1770 | aggregate_group_shares(tg, sd); | ||
1771 | aggregate_group_load(tg, sd); | ||
1772 | } | ||
1773 | |||
1774 | /* | ||
1775 | * Rebalance the cpu shares while walking back up the tree. | ||
1776 | */ | ||
1777 | static | ||
1778 | void aggregate_get_up(struct task_group *tg, struct sched_domain *sd) | ||
1779 | { | ||
1780 | aggregate_group_set_shares(tg, sd); | ||
1781 | } | ||
1782 | |||
1783 | static DEFINE_PER_CPU(spinlock_t, aggregate_lock); | ||
1784 | |||
1785 | static void __init init_aggregate(void) | ||
1786 | { | ||
1787 | int i; | ||
1788 | |||
1789 | for_each_possible_cpu(i) | ||
1790 | spin_lock_init(&per_cpu(aggregate_lock, i)); | ||
1791 | } | ||
1792 | |||
1793 | static int get_aggregate(struct sched_domain *sd) | ||
1794 | { | ||
1795 | if (!spin_trylock(&per_cpu(aggregate_lock, sd->first_cpu))) | ||
1796 | return 0; | ||
1797 | |||
1798 | aggregate_walk_tree(aggregate_get_down, aggregate_get_up, sd); | ||
1799 | return 1; | ||
1800 | } | ||
1801 | |||
1802 | static void put_aggregate(struct sched_domain *sd) | ||
1803 | { | ||
1804 | spin_unlock(&per_cpu(aggregate_lock, sd->first_cpu)); | ||
1805 | } | ||
1806 | |||
1807 | static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) | ||
1808 | { | ||
1809 | cfs_rq->shares = shares; | ||
1810 | } | ||
1811 | |||
1812 | #else | ||
1813 | |||
1814 | static inline void init_aggregate(void) | ||
1815 | { | ||
1816 | } | ||
1817 | |||
1818 | static inline int get_aggregate(struct sched_domain *sd) | ||
1819 | { | ||
1820 | return 0; | ||
1821 | } | ||
1822 | |||
1823 | static inline void put_aggregate(struct sched_domain *sd) | ||
1824 | { | ||
1825 | } | ||
1826 | #endif | ||
1827 | |||
1828 | #else /* CONFIG_SMP */ | 1474 | #else /* CONFIG_SMP */ |
1829 | 1475 | ||
1830 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1476 | #ifdef CONFIG_FAIR_GROUP_SCHED |
@@ -1845,14 +1491,26 @@ static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) | |||
1845 | 1491 | ||
1846 | #define sched_class_highest (&rt_sched_class) | 1492 | #define sched_class_highest (&rt_sched_class) |
1847 | 1493 | ||
1848 | static void inc_nr_running(struct rq *rq) | 1494 | static inline void inc_load(struct rq *rq, const struct task_struct *p) |
1495 | { | ||
1496 | update_load_add(&rq->load, p->se.load.weight); | ||
1497 | } | ||
1498 | |||
1499 | static inline void dec_load(struct rq *rq, const struct task_struct *p) | ||
1500 | { | ||
1501 | update_load_sub(&rq->load, p->se.load.weight); | ||
1502 | } | ||
1503 | |||
1504 | static void inc_nr_running(struct task_struct *p, struct rq *rq) | ||
1849 | { | 1505 | { |
1850 | rq->nr_running++; | 1506 | rq->nr_running++; |
1507 | inc_load(rq, p); | ||
1851 | } | 1508 | } |
1852 | 1509 | ||
1853 | static void dec_nr_running(struct rq *rq) | 1510 | static void dec_nr_running(struct task_struct *p, struct rq *rq) |
1854 | { | 1511 | { |
1855 | rq->nr_running--; | 1512 | rq->nr_running--; |
1513 | dec_load(rq, p); | ||
1856 | } | 1514 | } |
1857 | 1515 | ||
1858 | static void set_load_weight(struct task_struct *p) | 1516 | static void set_load_weight(struct task_struct *p) |
@@ -1944,7 +1602,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup) | |||
1944 | rq->nr_uninterruptible--; | 1602 | rq->nr_uninterruptible--; |
1945 | 1603 | ||
1946 | enqueue_task(rq, p, wakeup); | 1604 | enqueue_task(rq, p, wakeup); |
1947 | inc_nr_running(rq); | 1605 | inc_nr_running(p, rq); |
1948 | } | 1606 | } |
1949 | 1607 | ||
1950 | /* | 1608 | /* |
@@ -1956,7 +1614,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) | |||
1956 | rq->nr_uninterruptible++; | 1614 | rq->nr_uninterruptible++; |
1957 | 1615 | ||
1958 | dequeue_task(rq, p, sleep); | 1616 | dequeue_task(rq, p, sleep); |
1959 | dec_nr_running(rq); | 1617 | dec_nr_running(p, rq); |
1960 | } | 1618 | } |
1961 | 1619 | ||
1962 | /** | 1620 | /** |
@@ -2609,7 +2267,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) | |||
2609 | * management (if any): | 2267 | * management (if any): |
2610 | */ | 2268 | */ |
2611 | p->sched_class->task_new(rq, p); | 2269 | p->sched_class->task_new(rq, p); |
2612 | inc_nr_running(rq); | 2270 | inc_nr_running(p, rq); |
2613 | } | 2271 | } |
2614 | check_preempt_curr(rq, p); | 2272 | check_preempt_curr(rq, p); |
2615 | #ifdef CONFIG_SMP | 2273 | #ifdef CONFIG_SMP |
@@ -3600,12 +3258,9 @@ static int load_balance(int this_cpu, struct rq *this_rq, | |||
3600 | unsigned long imbalance; | 3258 | unsigned long imbalance; |
3601 | struct rq *busiest; | 3259 | struct rq *busiest; |
3602 | unsigned long flags; | 3260 | unsigned long flags; |
3603 | int unlock_aggregate; | ||
3604 | 3261 | ||
3605 | cpus_setall(*cpus); | 3262 | cpus_setall(*cpus); |
3606 | 3263 | ||
3607 | unlock_aggregate = get_aggregate(sd); | ||
3608 | |||
3609 | /* | 3264 | /* |
3610 | * When power savings policy is enabled for the parent domain, idle | 3265 | * When power savings policy is enabled for the parent domain, idle |
3611 | * sibling can pick up load irrespective of busy siblings. In this case, | 3266 | * sibling can pick up load irrespective of busy siblings. In this case, |
@@ -3721,9 +3376,8 @@ redo: | |||
3721 | 3376 | ||
3722 | if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && | 3377 | if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && |
3723 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) | 3378 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) |
3724 | ld_moved = -1; | 3379 | return -1; |
3725 | 3380 | return ld_moved; | |
3726 | goto out; | ||
3727 | 3381 | ||
3728 | out_balanced: | 3382 | out_balanced: |
3729 | schedstat_inc(sd, lb_balanced[idle]); | 3383 | schedstat_inc(sd, lb_balanced[idle]); |
@@ -3738,13 +3392,8 @@ out_one_pinned: | |||
3738 | 3392 | ||
3739 | if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && | 3393 | if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && |
3740 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) | 3394 | !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) |
3741 | ld_moved = -1; | 3395 | return -1; |
3742 | else | 3396 | return 0; |
3743 | ld_moved = 0; | ||
3744 | out: | ||
3745 | if (unlock_aggregate) | ||
3746 | put_aggregate(sd); | ||
3747 | return ld_moved; | ||
3748 | } | 3397 | } |
3749 | 3398 | ||
3750 | /* | 3399 | /* |
@@ -4430,7 +4079,7 @@ static inline void schedule_debug(struct task_struct *prev) | |||
4430 | * schedule() atomically, we ignore that path for now. | 4079 | * schedule() atomically, we ignore that path for now. |
4431 | * Otherwise, whine if we are scheduling when we should not be. | 4080 | * Otherwise, whine if we are scheduling when we should not be. |
4432 | */ | 4081 | */ |
4433 | if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state)) | 4082 | if (unlikely(in_atomic_preempt_off() && !prev->exit_state)) |
4434 | __schedule_bug(prev); | 4083 | __schedule_bug(prev); |
4435 | 4084 | ||
4436 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); | 4085 | profile_hit(SCHED_PROFILING, __builtin_return_address(0)); |
@@ -4931,8 +4580,10 @@ void set_user_nice(struct task_struct *p, long nice) | |||
4931 | goto out_unlock; | 4580 | goto out_unlock; |
4932 | } | 4581 | } |
4933 | on_rq = p->se.on_rq; | 4582 | on_rq = p->se.on_rq; |
4934 | if (on_rq) | 4583 | if (on_rq) { |
4935 | dequeue_task(rq, p, 0); | 4584 | dequeue_task(rq, p, 0); |
4585 | dec_load(rq, p); | ||
4586 | } | ||
4936 | 4587 | ||
4937 | p->static_prio = NICE_TO_PRIO(nice); | 4588 | p->static_prio = NICE_TO_PRIO(nice); |
4938 | set_load_weight(p); | 4589 | set_load_weight(p); |
@@ -4942,6 +4593,7 @@ void set_user_nice(struct task_struct *p, long nice) | |||
4942 | 4593 | ||
4943 | if (on_rq) { | 4594 | if (on_rq) { |
4944 | enqueue_task(rq, p, 0); | 4595 | enqueue_task(rq, p, 0); |
4596 | inc_load(rq, p); | ||
4945 | /* | 4597 | /* |
4946 | * If the task increased its priority or is running and | 4598 | * If the task increased its priority or is running and |
4947 | * lowered its priority, then reschedule its CPU: | 4599 | * lowered its priority, then reschedule its CPU: |
@@ -7316,7 +6968,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7316 | SD_INIT(sd, ALLNODES); | 6968 | SD_INIT(sd, ALLNODES); |
7317 | set_domain_attribute(sd, attr); | 6969 | set_domain_attribute(sd, attr); |
7318 | sd->span = *cpu_map; | 6970 | sd->span = *cpu_map; |
7319 | sd->first_cpu = first_cpu(sd->span); | ||
7320 | cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); | 6971 | cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); |
7321 | p = sd; | 6972 | p = sd; |
7322 | sd_allnodes = 1; | 6973 | sd_allnodes = 1; |
@@ -7327,7 +6978,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7327 | SD_INIT(sd, NODE); | 6978 | SD_INIT(sd, NODE); |
7328 | set_domain_attribute(sd, attr); | 6979 | set_domain_attribute(sd, attr); |
7329 | sched_domain_node_span(cpu_to_node(i), &sd->span); | 6980 | sched_domain_node_span(cpu_to_node(i), &sd->span); |
7330 | sd->first_cpu = first_cpu(sd->span); | ||
7331 | sd->parent = p; | 6981 | sd->parent = p; |
7332 | if (p) | 6982 | if (p) |
7333 | p->child = sd; | 6983 | p->child = sd; |
@@ -7339,7 +6989,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7339 | SD_INIT(sd, CPU); | 6989 | SD_INIT(sd, CPU); |
7340 | set_domain_attribute(sd, attr); | 6990 | set_domain_attribute(sd, attr); |
7341 | sd->span = *nodemask; | 6991 | sd->span = *nodemask; |
7342 | sd->first_cpu = first_cpu(sd->span); | ||
7343 | sd->parent = p; | 6992 | sd->parent = p; |
7344 | if (p) | 6993 | if (p) |
7345 | p->child = sd; | 6994 | p->child = sd; |
@@ -7351,7 +7000,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7351 | SD_INIT(sd, MC); | 7000 | SD_INIT(sd, MC); |
7352 | set_domain_attribute(sd, attr); | 7001 | set_domain_attribute(sd, attr); |
7353 | sd->span = cpu_coregroup_map(i); | 7002 | sd->span = cpu_coregroup_map(i); |
7354 | sd->first_cpu = first_cpu(sd->span); | ||
7355 | cpus_and(sd->span, sd->span, *cpu_map); | 7003 | cpus_and(sd->span, sd->span, *cpu_map); |
7356 | sd->parent = p; | 7004 | sd->parent = p; |
7357 | p->child = sd; | 7005 | p->child = sd; |
@@ -7364,7 +7012,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map, | |||
7364 | SD_INIT(sd, SIBLING); | 7012 | SD_INIT(sd, SIBLING); |
7365 | set_domain_attribute(sd, attr); | 7013 | set_domain_attribute(sd, attr); |
7366 | sd->span = per_cpu(cpu_sibling_map, i); | 7014 | sd->span = per_cpu(cpu_sibling_map, i); |
7367 | sd->first_cpu = first_cpu(sd->span); | ||
7368 | cpus_and(sd->span, sd->span, *cpu_map); | 7015 | cpus_and(sd->span, sd->span, *cpu_map); |
7369 | sd->parent = p; | 7016 | sd->parent = p; |
7370 | p->child = sd; | 7017 | p->child = sd; |
@@ -7568,8 +7215,8 @@ static int build_sched_domains(const cpumask_t *cpu_map) | |||
7568 | 7215 | ||
7569 | static cpumask_t *doms_cur; /* current sched domains */ | 7216 | static cpumask_t *doms_cur; /* current sched domains */ |
7570 | static int ndoms_cur; /* number of sched domains in 'doms_cur' */ | 7217 | static int ndoms_cur; /* number of sched domains in 'doms_cur' */ |
7571 | static struct sched_domain_attr *dattr_cur; /* attribues of custom domains | 7218 | static struct sched_domain_attr *dattr_cur; |
7572 | in 'doms_cur' */ | 7219 | /* attribues of custom domains in 'doms_cur' */ |
7573 | 7220 | ||
7574 | /* | 7221 | /* |
7575 | * Special case: If a kmalloc of a doms_cur partition (array of | 7222 | * Special case: If a kmalloc of a doms_cur partition (array of |
@@ -8034,7 +7681,6 @@ void __init sched_init(void) | |||
8034 | } | 7681 | } |
8035 | 7682 | ||
8036 | #ifdef CONFIG_SMP | 7683 | #ifdef CONFIG_SMP |
8037 | init_aggregate(); | ||
8038 | init_defrootdomain(); | 7684 | init_defrootdomain(); |
8039 | #endif | 7685 | #endif |
8040 | 7686 | ||
@@ -8599,11 +8245,14 @@ void sched_move_task(struct task_struct *tsk) | |||
8599 | #endif | 8245 | #endif |
8600 | 8246 | ||
8601 | #ifdef CONFIG_FAIR_GROUP_SCHED | 8247 | #ifdef CONFIG_FAIR_GROUP_SCHED |
8602 | static void __set_se_shares(struct sched_entity *se, unsigned long shares) | 8248 | static void set_se_shares(struct sched_entity *se, unsigned long shares) |
8603 | { | 8249 | { |
8604 | struct cfs_rq *cfs_rq = se->cfs_rq; | 8250 | struct cfs_rq *cfs_rq = se->cfs_rq; |
8251 | struct rq *rq = cfs_rq->rq; | ||
8605 | int on_rq; | 8252 | int on_rq; |
8606 | 8253 | ||
8254 | spin_lock_irq(&rq->lock); | ||
8255 | |||
8607 | on_rq = se->on_rq; | 8256 | on_rq = se->on_rq; |
8608 | if (on_rq) | 8257 | if (on_rq) |
8609 | dequeue_entity(cfs_rq, se, 0); | 8258 | dequeue_entity(cfs_rq, se, 0); |
@@ -8613,17 +8262,8 @@ static void __set_se_shares(struct sched_entity *se, unsigned long shares) | |||
8613 | 8262 | ||
8614 | if (on_rq) | 8263 | if (on_rq) |
8615 | enqueue_entity(cfs_rq, se, 0); | 8264 | enqueue_entity(cfs_rq, se, 0); |
8616 | } | ||
8617 | 8265 | ||
8618 | static void set_se_shares(struct sched_entity *se, unsigned long shares) | 8266 | spin_unlock_irq(&rq->lock); |
8619 | { | ||
8620 | struct cfs_rq *cfs_rq = se->cfs_rq; | ||
8621 | struct rq *rq = cfs_rq->rq; | ||
8622 | unsigned long flags; | ||
8623 | |||
8624 | spin_lock_irqsave(&rq->lock, flags); | ||
8625 | __set_se_shares(se, shares); | ||
8626 | spin_unlock_irqrestore(&rq->lock, flags); | ||
8627 | } | 8267 | } |
8628 | 8268 | ||
8629 | static DEFINE_MUTEX(shares_mutex); | 8269 | static DEFINE_MUTEX(shares_mutex); |
@@ -8662,13 +8302,8 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) | |||
8662 | * w/o tripping rebalance_share or load_balance_fair. | 8302 | * w/o tripping rebalance_share or load_balance_fair. |
8663 | */ | 8303 | */ |
8664 | tg->shares = shares; | 8304 | tg->shares = shares; |
8665 | for_each_possible_cpu(i) { | 8305 | for_each_possible_cpu(i) |
8666 | /* | ||
8667 | * force a rebalance | ||
8668 | */ | ||
8669 | cfs_rq_set_shares(tg->cfs_rq[i], 0); | ||
8670 | set_se_shares(tg->se[i], shares); | 8306 | set_se_shares(tg->se[i], shares); |
8671 | } | ||
8672 | 8307 | ||
8673 | /* | 8308 | /* |
8674 | * Enable load balance activity on this group, by inserting it back on | 8309 | * Enable load balance activity on this group, by inserting it back on |
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c index 9c597e37f7de..ce05271219ab 100644 --- a/kernel/sched_clock.c +++ b/kernel/sched_clock.c | |||
@@ -59,22 +59,26 @@ static inline struct sched_clock_data *cpu_sdc(int cpu) | |||
59 | return &per_cpu(sched_clock_data, cpu); | 59 | return &per_cpu(sched_clock_data, cpu); |
60 | } | 60 | } |
61 | 61 | ||
62 | static __read_mostly int sched_clock_running; | ||
63 | |||
62 | void sched_clock_init(void) | 64 | void sched_clock_init(void) |
63 | { | 65 | { |
64 | u64 ktime_now = ktime_to_ns(ktime_get()); | 66 | u64 ktime_now = ktime_to_ns(ktime_get()); |
65 | u64 now = 0; | 67 | unsigned long now_jiffies = jiffies; |
66 | int cpu; | 68 | int cpu; |
67 | 69 | ||
68 | for_each_possible_cpu(cpu) { | 70 | for_each_possible_cpu(cpu) { |
69 | struct sched_clock_data *scd = cpu_sdc(cpu); | 71 | struct sched_clock_data *scd = cpu_sdc(cpu); |
70 | 72 | ||
71 | scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; | 73 | scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; |
72 | scd->prev_jiffies = jiffies; | 74 | scd->prev_jiffies = now_jiffies; |
73 | scd->prev_raw = now; | 75 | scd->prev_raw = 0; |
74 | scd->tick_raw = now; | 76 | scd->tick_raw = 0; |
75 | scd->tick_gtod = ktime_now; | 77 | scd->tick_gtod = ktime_now; |
76 | scd->clock = ktime_now; | 78 | scd->clock = ktime_now; |
77 | } | 79 | } |
80 | |||
81 | sched_clock_running = 1; | ||
78 | } | 82 | } |
79 | 83 | ||
80 | /* | 84 | /* |
@@ -136,6 +140,9 @@ u64 sched_clock_cpu(int cpu) | |||
136 | struct sched_clock_data *scd = cpu_sdc(cpu); | 140 | struct sched_clock_data *scd = cpu_sdc(cpu); |
137 | u64 now, clock; | 141 | u64 now, clock; |
138 | 142 | ||
143 | if (unlikely(!sched_clock_running)) | ||
144 | return 0ull; | ||
145 | |||
139 | WARN_ON_ONCE(!irqs_disabled()); | 146 | WARN_ON_ONCE(!irqs_disabled()); |
140 | now = sched_clock(); | 147 | now = sched_clock(); |
141 | 148 | ||
@@ -174,6 +181,9 @@ void sched_clock_tick(void) | |||
174 | struct sched_clock_data *scd = this_scd(); | 181 | struct sched_clock_data *scd = this_scd(); |
175 | u64 now, now_gtod; | 182 | u64 now, now_gtod; |
176 | 183 | ||
184 | if (unlikely(!sched_clock_running)) | ||
185 | return; | ||
186 | |||
177 | WARN_ON_ONCE(!irqs_disabled()); | 187 | WARN_ON_ONCE(!irqs_disabled()); |
178 | 188 | ||
179 | now = sched_clock(); | 189 | now = sched_clock(); |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 5f06118fbc31..8bb713040ac9 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -167,11 +167,6 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
167 | #endif | 167 | #endif |
168 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", | 168 | SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", |
169 | cfs_rq->nr_spread_over); | 169 | cfs_rq->nr_spread_over); |
170 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
171 | #ifdef CONFIG_SMP | ||
172 | SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares); | ||
173 | #endif | ||
174 | #endif | ||
175 | } | 170 | } |
176 | 171 | ||
177 | static void print_cpu(struct seq_file *m, int cpu) | 172 | static void print_cpu(struct seq_file *m, int cpu) |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index e24ecd39c4b8..08ae848b71d4 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -334,34 +334,6 @@ int sched_nr_latency_handler(struct ctl_table *table, int write, | |||
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * delta *= w / rw | ||
338 | */ | ||
339 | static inline unsigned long | ||
340 | calc_delta_weight(unsigned long delta, struct sched_entity *se) | ||
341 | { | ||
342 | for_each_sched_entity(se) { | ||
343 | delta = calc_delta_mine(delta, | ||
344 | se->load.weight, &cfs_rq_of(se)->load); | ||
345 | } | ||
346 | |||
347 | return delta; | ||
348 | } | ||
349 | |||
350 | /* | ||
351 | * delta *= rw / w | ||
352 | */ | ||
353 | static inline unsigned long | ||
354 | calc_delta_fair(unsigned long delta, struct sched_entity *se) | ||
355 | { | ||
356 | for_each_sched_entity(se) { | ||
357 | delta = calc_delta_mine(delta, | ||
358 | cfs_rq_of(se)->load.weight, &se->load); | ||
359 | } | ||
360 | |||
361 | return delta; | ||
362 | } | ||
363 | |||
364 | /* | ||
365 | * The idea is to set a period in which each task runs once. | 337 | * The idea is to set a period in which each task runs once. |
366 | * | 338 | * |
367 | * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch | 339 | * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch |
@@ -390,54 +362,47 @@ static u64 __sched_period(unsigned long nr_running) | |||
390 | */ | 362 | */ |
391 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) | 363 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) |
392 | { | 364 | { |
393 | return calc_delta_weight(__sched_period(cfs_rq->nr_running), se); | 365 | u64 slice = __sched_period(cfs_rq->nr_running); |
366 | |||
367 | for_each_sched_entity(se) { | ||
368 | cfs_rq = cfs_rq_of(se); | ||
369 | |||
370 | slice *= se->load.weight; | ||
371 | do_div(slice, cfs_rq->load.weight); | ||
372 | } | ||
373 | |||
374 | |||
375 | return slice; | ||
394 | } | 376 | } |
395 | 377 | ||
396 | /* | 378 | /* |
397 | * We calculate the vruntime slice of a to be inserted task | 379 | * We calculate the vruntime slice of a to be inserted task |
398 | * | 380 | * |
399 | * vs = s*rw/w = p | 381 | * vs = s/w = p/rw |
400 | */ | 382 | */ |
401 | static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) | 383 | static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) |
402 | { | 384 | { |
403 | unsigned long nr_running = cfs_rq->nr_running; | 385 | unsigned long nr_running = cfs_rq->nr_running; |
386 | unsigned long weight; | ||
387 | u64 vslice; | ||
404 | 388 | ||
405 | if (!se->on_rq) | 389 | if (!se->on_rq) |
406 | nr_running++; | 390 | nr_running++; |
407 | 391 | ||
408 | return __sched_period(nr_running); | 392 | vslice = __sched_period(nr_running); |
409 | } | ||
410 | |||
411 | /* | ||
412 | * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in | ||
413 | * that it favours >=0 over <0. | ||
414 | * | ||
415 | * -20 | | ||
416 | * | | ||
417 | * 0 --------+------- | ||
418 | * .' | ||
419 | * 19 .' | ||
420 | * | ||
421 | */ | ||
422 | static unsigned long | ||
423 | calc_delta_asym(unsigned long delta, struct sched_entity *se) | ||
424 | { | ||
425 | struct load_weight lw = { | ||
426 | .weight = NICE_0_LOAD, | ||
427 | .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT) | ||
428 | }; | ||
429 | 393 | ||
430 | for_each_sched_entity(se) { | 394 | for_each_sched_entity(se) { |
431 | struct load_weight *se_lw = &se->load; | 395 | cfs_rq = cfs_rq_of(se); |
432 | 396 | ||
433 | if (se->load.weight < NICE_0_LOAD) | 397 | weight = cfs_rq->load.weight; |
434 | se_lw = &lw; | 398 | if (!se->on_rq) |
399 | weight += se->load.weight; | ||
435 | 400 | ||
436 | delta = calc_delta_mine(delta, | 401 | vslice *= NICE_0_LOAD; |
437 | cfs_rq_of(se)->load.weight, se_lw); | 402 | do_div(vslice, weight); |
438 | } | 403 | } |
439 | 404 | ||
440 | return delta; | 405 | return vslice; |
441 | } | 406 | } |
442 | 407 | ||
443 | /* | 408 | /* |
@@ -454,7 +419,11 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, | |||
454 | 419 | ||
455 | curr->sum_exec_runtime += delta_exec; | 420 | curr->sum_exec_runtime += delta_exec; |
456 | schedstat_add(cfs_rq, exec_clock, delta_exec); | 421 | schedstat_add(cfs_rq, exec_clock, delta_exec); |
457 | delta_exec_weighted = calc_delta_fair(delta_exec, curr); | 422 | delta_exec_weighted = delta_exec; |
423 | if (unlikely(curr->load.weight != NICE_0_LOAD)) { | ||
424 | delta_exec_weighted = calc_delta_fair(delta_exec_weighted, | ||
425 | &curr->load); | ||
426 | } | ||
458 | curr->vruntime += delta_exec_weighted; | 427 | curr->vruntime += delta_exec_weighted; |
459 | } | 428 | } |
460 | 429 | ||
@@ -541,27 +510,10 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
541 | * Scheduling class queueing methods: | 510 | * Scheduling class queueing methods: |
542 | */ | 511 | */ |
543 | 512 | ||
544 | #if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED | ||
545 | static void | ||
546 | add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) | ||
547 | { | ||
548 | cfs_rq->task_weight += weight; | ||
549 | } | ||
550 | #else | ||
551 | static inline void | ||
552 | add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) | ||
553 | { | ||
554 | } | ||
555 | #endif | ||
556 | |||
557 | static void | 513 | static void |
558 | account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) | 514 | account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
559 | { | 515 | { |
560 | update_load_add(&cfs_rq->load, se->load.weight); | 516 | update_load_add(&cfs_rq->load, se->load.weight); |
561 | if (!parent_entity(se)) | ||
562 | inc_cpu_load(rq_of(cfs_rq), se->load.weight); | ||
563 | if (entity_is_task(se)) | ||
564 | add_cfs_task_weight(cfs_rq, se->load.weight); | ||
565 | cfs_rq->nr_running++; | 517 | cfs_rq->nr_running++; |
566 | se->on_rq = 1; | 518 | se->on_rq = 1; |
567 | list_add(&se->group_node, &cfs_rq->tasks); | 519 | list_add(&se->group_node, &cfs_rq->tasks); |
@@ -571,10 +523,6 @@ static void | |||
571 | account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) | 523 | account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) |
572 | { | 524 | { |
573 | update_load_sub(&cfs_rq->load, se->load.weight); | 525 | update_load_sub(&cfs_rq->load, se->load.weight); |
574 | if (!parent_entity(se)) | ||
575 | dec_cpu_load(rq_of(cfs_rq), se->load.weight); | ||
576 | if (entity_is_task(se)) | ||
577 | add_cfs_task_weight(cfs_rq, -se->load.weight); | ||
578 | cfs_rq->nr_running--; | 526 | cfs_rq->nr_running--; |
579 | se->on_rq = 0; | 527 | se->on_rq = 0; |
580 | list_del_init(&se->group_node); | 528 | list_del_init(&se->group_node); |
@@ -661,17 +609,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
661 | 609 | ||
662 | if (!initial) { | 610 | if (!initial) { |
663 | /* sleeps upto a single latency don't count. */ | 611 | /* sleeps upto a single latency don't count. */ |
664 | if (sched_feat(NEW_FAIR_SLEEPERS)) { | 612 | if (sched_feat(NEW_FAIR_SLEEPERS)) |
665 | unsigned long thresh = sysctl_sched_latency; | 613 | vruntime -= sysctl_sched_latency; |
666 | |||
667 | /* | ||
668 | * convert the sleeper threshold into virtual time | ||
669 | */ | ||
670 | if (sched_feat(NORMALIZED_SLEEPER)) | ||
671 | thresh = calc_delta_fair(thresh, se); | ||
672 | |||
673 | vruntime -= thresh; | ||
674 | } | ||
675 | 614 | ||
676 | /* ensure we never gain time by being placed backwards. */ | 615 | /* ensure we never gain time by being placed backwards. */ |
677 | vruntime = max_vruntime(se->vruntime, vruntime); | 616 | vruntime = max_vruntime(se->vruntime, vruntime); |
@@ -1057,16 +996,27 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, | |||
1057 | struct task_struct *curr = this_rq->curr; | 996 | struct task_struct *curr = this_rq->curr; |
1058 | unsigned long tl = this_load; | 997 | unsigned long tl = this_load; |
1059 | unsigned long tl_per_task; | 998 | unsigned long tl_per_task; |
999 | int balanced; | ||
1060 | 1000 | ||
1061 | if (!(this_sd->flags & SD_WAKE_AFFINE)) | 1001 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) |
1062 | return 0; | 1002 | return 0; |
1063 | 1003 | ||
1064 | /* | 1004 | /* |
1005 | * If sync wakeup then subtract the (maximum possible) | ||
1006 | * effect of the currently running task from the load | ||
1007 | * of the current CPU: | ||
1008 | */ | ||
1009 | if (sync) | ||
1010 | tl -= current->se.load.weight; | ||
1011 | |||
1012 | balanced = 100*(tl + p->se.load.weight) <= imbalance*load; | ||
1013 | |||
1014 | /* | ||
1065 | * If the currently running task will sleep within | 1015 | * If the currently running task will sleep within |
1066 | * a reasonable amount of time then attract this newly | 1016 | * a reasonable amount of time then attract this newly |
1067 | * woken task: | 1017 | * woken task: |
1068 | */ | 1018 | */ |
1069 | if (sync && curr->sched_class == &fair_sched_class) { | 1019 | if (sync && balanced && curr->sched_class == &fair_sched_class) { |
1070 | if (curr->se.avg_overlap < sysctl_sched_migration_cost && | 1020 | if (curr->se.avg_overlap < sysctl_sched_migration_cost && |
1071 | p->se.avg_overlap < sysctl_sched_migration_cost) | 1021 | p->se.avg_overlap < sysctl_sched_migration_cost) |
1072 | return 1; | 1022 | return 1; |
@@ -1075,16 +1025,8 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, | |||
1075 | schedstat_inc(p, se.nr_wakeups_affine_attempts); | 1025 | schedstat_inc(p, se.nr_wakeups_affine_attempts); |
1076 | tl_per_task = cpu_avg_load_per_task(this_cpu); | 1026 | tl_per_task = cpu_avg_load_per_task(this_cpu); |
1077 | 1027 | ||
1078 | /* | ||
1079 | * If sync wakeup then subtract the (maximum possible) | ||
1080 | * effect of the currently running task from the load | ||
1081 | * of the current CPU: | ||
1082 | */ | ||
1083 | if (sync) | ||
1084 | tl -= current->se.load.weight; | ||
1085 | |||
1086 | if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || | 1028 | if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || |
1087 | 100*(tl + p->se.load.weight) <= imbalance*load) { | 1029 | balanced) { |
1088 | /* | 1030 | /* |
1089 | * This domain has SD_WAKE_AFFINE and | 1031 | * This domain has SD_WAKE_AFFINE and |
1090 | * p is cache cold in this domain, and | 1032 | * p is cache cold in this domain, and |
@@ -1169,10 +1111,11 @@ static unsigned long wakeup_gran(struct sched_entity *se) | |||
1169 | unsigned long gran = sysctl_sched_wakeup_granularity; | 1111 | unsigned long gran = sysctl_sched_wakeup_granularity; |
1170 | 1112 | ||
1171 | /* | 1113 | /* |
1172 | * More easily preempt - nice tasks, while not making it harder for | 1114 | * More easily preempt - nice tasks, while not making |
1173 | * + nice tasks. | 1115 | * it harder for + nice tasks. |
1174 | */ | 1116 | */ |
1175 | gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se); | 1117 | if (unlikely(se->load.weight > NICE_0_LOAD)) |
1118 | gran = calc_delta_fair(gran, &se->load); | ||
1176 | 1119 | ||
1177 | return gran; | 1120 | return gran; |
1178 | } | 1121 | } |
@@ -1366,90 +1309,75 @@ static struct task_struct *load_balance_next_fair(void *arg) | |||
1366 | return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); | 1309 | return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); |
1367 | } | 1310 | } |
1368 | 1311 | ||
1369 | static unsigned long | 1312 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1370 | __load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1313 | static int cfs_rq_best_prio(struct cfs_rq *cfs_rq) |
1371 | unsigned long max_load_move, struct sched_domain *sd, | ||
1372 | enum cpu_idle_type idle, int *all_pinned, int *this_best_prio, | ||
1373 | struct cfs_rq *cfs_rq) | ||
1374 | { | 1314 | { |
1375 | struct rq_iterator cfs_rq_iterator; | 1315 | struct sched_entity *curr; |
1316 | struct task_struct *p; | ||
1376 | 1317 | ||
1377 | cfs_rq_iterator.start = load_balance_start_fair; | 1318 | if (!cfs_rq->nr_running || !first_fair(cfs_rq)) |
1378 | cfs_rq_iterator.next = load_balance_next_fair; | 1319 | return MAX_PRIO; |
1379 | cfs_rq_iterator.arg = cfs_rq; | 1320 | |
1321 | curr = cfs_rq->curr; | ||
1322 | if (!curr) | ||
1323 | curr = __pick_next_entity(cfs_rq); | ||
1324 | |||
1325 | p = task_of(curr); | ||
1380 | 1326 | ||
1381 | return balance_tasks(this_rq, this_cpu, busiest, | 1327 | return p->prio; |
1382 | max_load_move, sd, idle, all_pinned, | ||
1383 | this_best_prio, &cfs_rq_iterator); | ||
1384 | } | 1328 | } |
1329 | #endif | ||
1385 | 1330 | ||
1386 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1387 | static unsigned long | 1331 | static unsigned long |
1388 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1332 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, |
1389 | unsigned long max_load_move, | 1333 | unsigned long max_load_move, |
1390 | struct sched_domain *sd, enum cpu_idle_type idle, | 1334 | struct sched_domain *sd, enum cpu_idle_type idle, |
1391 | int *all_pinned, int *this_best_prio) | 1335 | int *all_pinned, int *this_best_prio) |
1392 | { | 1336 | { |
1337 | struct cfs_rq *busy_cfs_rq; | ||
1393 | long rem_load_move = max_load_move; | 1338 | long rem_load_move = max_load_move; |
1394 | int busiest_cpu = cpu_of(busiest); | 1339 | struct rq_iterator cfs_rq_iterator; |
1395 | struct task_group *tg; | ||
1396 | |||
1397 | rcu_read_lock(); | ||
1398 | list_for_each_entry(tg, &task_groups, list) { | ||
1399 | long imbalance; | ||
1400 | unsigned long this_weight, busiest_weight; | ||
1401 | long rem_load, max_load, moved_load; | ||
1402 | |||
1403 | /* | ||
1404 | * empty group | ||
1405 | */ | ||
1406 | if (!aggregate(tg, sd)->task_weight) | ||
1407 | continue; | ||
1408 | |||
1409 | rem_load = rem_load_move * aggregate(tg, sd)->rq_weight; | ||
1410 | rem_load /= aggregate(tg, sd)->load + 1; | ||
1411 | |||
1412 | this_weight = tg->cfs_rq[this_cpu]->task_weight; | ||
1413 | busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight; | ||
1414 | 1340 | ||
1415 | imbalance = (busiest_weight - this_weight) / 2; | 1341 | cfs_rq_iterator.start = load_balance_start_fair; |
1342 | cfs_rq_iterator.next = load_balance_next_fair; | ||
1416 | 1343 | ||
1417 | if (imbalance < 0) | 1344 | for_each_leaf_cfs_rq(busiest, busy_cfs_rq) { |
1418 | imbalance = busiest_weight; | 1345 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1346 | struct cfs_rq *this_cfs_rq; | ||
1347 | long imbalance; | ||
1348 | unsigned long maxload; | ||
1419 | 1349 | ||
1420 | max_load = max(rem_load, imbalance); | 1350 | this_cfs_rq = cpu_cfs_rq(busy_cfs_rq, this_cpu); |
1421 | moved_load = __load_balance_fair(this_rq, this_cpu, busiest, | ||
1422 | max_load, sd, idle, all_pinned, this_best_prio, | ||
1423 | tg->cfs_rq[busiest_cpu]); | ||
1424 | 1351 | ||
1425 | if (!moved_load) | 1352 | imbalance = busy_cfs_rq->load.weight - this_cfs_rq->load.weight; |
1353 | /* Don't pull if this_cfs_rq has more load than busy_cfs_rq */ | ||
1354 | if (imbalance <= 0) | ||
1426 | continue; | 1355 | continue; |
1427 | 1356 | ||
1428 | move_group_shares(tg, sd, busiest_cpu, this_cpu); | 1357 | /* Don't pull more than imbalance/2 */ |
1358 | imbalance /= 2; | ||
1359 | maxload = min(rem_load_move, imbalance); | ||
1429 | 1360 | ||
1430 | moved_load *= aggregate(tg, sd)->load; | 1361 | *this_best_prio = cfs_rq_best_prio(this_cfs_rq); |
1431 | moved_load /= aggregate(tg, sd)->rq_weight + 1; | 1362 | #else |
1363 | # define maxload rem_load_move | ||
1364 | #endif | ||
1365 | /* | ||
1366 | * pass busy_cfs_rq argument into | ||
1367 | * load_balance_[start|next]_fair iterators | ||
1368 | */ | ||
1369 | cfs_rq_iterator.arg = busy_cfs_rq; | ||
1370 | rem_load_move -= balance_tasks(this_rq, this_cpu, busiest, | ||
1371 | maxload, sd, idle, all_pinned, | ||
1372 | this_best_prio, | ||
1373 | &cfs_rq_iterator); | ||
1432 | 1374 | ||
1433 | rem_load_move -= moved_load; | 1375 | if (rem_load_move <= 0) |
1434 | if (rem_load_move < 0) | ||
1435 | break; | 1376 | break; |
1436 | } | 1377 | } |
1437 | rcu_read_unlock(); | ||
1438 | 1378 | ||
1439 | return max_load_move - rem_load_move; | 1379 | return max_load_move - rem_load_move; |
1440 | } | 1380 | } |
1441 | #else | ||
1442 | static unsigned long | ||
1443 | load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | ||
1444 | unsigned long max_load_move, | ||
1445 | struct sched_domain *sd, enum cpu_idle_type idle, | ||
1446 | int *all_pinned, int *this_best_prio) | ||
1447 | { | ||
1448 | return __load_balance_fair(this_rq, this_cpu, busiest, | ||
1449 | max_load_move, sd, idle, all_pinned, | ||
1450 | this_best_prio, &busiest->cfs); | ||
1451 | } | ||
1452 | #endif | ||
1453 | 1381 | ||
1454 | static int | 1382 | static int |
1455 | move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, | 1383 | move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, |
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 060e87b0cb1c..3432d573205d 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -513,8 +513,6 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) | |||
513 | */ | 513 | */ |
514 | for_each_sched_rt_entity(rt_se) | 514 | for_each_sched_rt_entity(rt_se) |
515 | enqueue_rt_entity(rt_se); | 515 | enqueue_rt_entity(rt_se); |
516 | |||
517 | inc_cpu_load(rq, p->se.load.weight); | ||
518 | } | 516 | } |
519 | 517 | ||
520 | static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | 518 | static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) |
@@ -534,8 +532,6 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) | |||
534 | if (rt_rq && rt_rq->rt_nr_running) | 532 | if (rt_rq && rt_rq->rt_nr_running) |
535 | enqueue_rt_entity(rt_se); | 533 | enqueue_rt_entity(rt_se); |
536 | } | 534 | } |
537 | |||
538 | dec_cpu_load(rq, p->se.load.weight); | ||
539 | } | 535 | } |
540 | 536 | ||
541 | /* | 537 | /* |
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 5bae2e0c3ff2..a38878e0e49d 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h | |||
@@ -67,6 +67,7 @@ static int show_schedstat(struct seq_file *seq, void *v) | |||
67 | preempt_enable(); | 67 | preempt_enable(); |
68 | #endif | 68 | #endif |
69 | } | 69 | } |
70 | kfree(mask_str); | ||
70 | return 0; | 71 | return 0; |
71 | } | 72 | } |
72 | 73 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index eb62558e9b09..0c2c93735e93 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) | |||
423 | 423 | ||
424 | rfcomm_dlc_lock(d); | 424 | rfcomm_dlc_lock(d); |
425 | d->state = BT_CLOSED; | 425 | d->state = BT_CLOSED; |
426 | rfcomm_dlc_unlock(d); | ||
427 | d->state_change(d, err); | 426 | d->state_change(d, err); |
427 | rfcomm_dlc_unlock(d); | ||
428 | 428 | ||
429 | skb_queue_purge(&d->tx_queue); | 429 | skb_queue_purge(&d->tx_queue); |
430 | rfcomm_dlc_unlink(d); | 430 | rfcomm_dlc_unlink(d); |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index cd61dea2eea1..f813077234b7 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -193,22 +193,17 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len) | |||
193 | 193 | ||
194 | /* | 194 | /* |
195 | * Update Window Counter using the algorithm from [RFC 4342, 8.1]. | 195 | * Update Window Counter using the algorithm from [RFC 4342, 8.1]. |
196 | * The algorithm is not applicable if RTT < 4 microseconds. | 196 | * As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt(). |
197 | */ | 197 | */ |
198 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, | 198 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, |
199 | ktime_t now) | 199 | ktime_t now) |
200 | { | 200 | { |
201 | u32 quarter_rtts; | 201 | u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count), |
202 | 202 | quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt; | |
203 | if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */ | ||
204 | return; | ||
205 | |||
206 | quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count); | ||
207 | quarter_rtts /= hctx->ccid3hctx_rtt / 4; | ||
208 | 203 | ||
209 | if (quarter_rtts > 0) { | 204 | if (quarter_rtts > 0) { |
210 | hctx->ccid3hctx_t_last_win_count = now; | 205 | hctx->ccid3hctx_t_last_win_count = now; |
211 | hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5); | 206 | hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U); |
212 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ | 207 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ |
213 | } | 208 | } |
214 | } | 209 | } |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index b348dd70c685..c22a3780c14e 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -739,8 +739,8 @@ int dccp_invalid_packet(struct sk_buff *skb) | |||
739 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet | 739 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet |
740 | * has short sequence numbers), drop packet and return | 740 | * has short sequence numbers), drop packet and return |
741 | */ | 741 | */ |
742 | if (dh->dccph_type >= DCCP_PKT_DATA && | 742 | if ((dh->dccph_type < DCCP_PKT_DATA || |
743 | dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { | 743 | dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) { |
744 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", | 744 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", |
745 | dccp_packet_name(dh->dccph_type)); | 745 | dccp_packet_name(dh->dccph_type)); |
746 | return 1; | 746 | return 1; |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 2de3c464fe75..14796181e8b5 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -197,7 +197,7 @@ static int ip6mr_vif_seq_show(struct seq_file *seq, void *v) | |||
197 | const char *name = vif->dev ? vif->dev->name : "none"; | 197 | const char *name = vif->dev ? vif->dev->name : "none"; |
198 | 198 | ||
199 | seq_printf(seq, | 199 | seq_printf(seq, |
200 | "%2Zd %-10s %8ld %7ld %8ld %7ld %05X\n", | 200 | "%2td %-10s %8ld %7ld %8ld %7ld %05X\n", |
201 | vif - vif6_table, | 201 | vif - vif6_table, |
202 | name, vif->bytes_in, vif->pkt_in, | 202 | name, vif->bytes_in, vif->pkt_in, |
203 | vif->bytes_out, vif->pkt_out, | 203 | vif->bytes_out, vif->pkt_out, |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index e2ddde755019..008de1fc42ca 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -286,12 +286,14 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb, | |||
286 | * | 286 | * |
287 | * Sends received pdus to the sap state machine. | 287 | * Sends received pdus to the sap state machine. |
288 | */ | 288 | */ |
289 | static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) | 289 | static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb, |
290 | struct sock *sk) | ||
290 | { | 291 | { |
291 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); | 292 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); |
292 | 293 | ||
293 | ev->type = LLC_SAP_EV_TYPE_PDU; | 294 | ev->type = LLC_SAP_EV_TYPE_PDU; |
294 | ev->reason = 0; | 295 | ev->reason = 0; |
296 | skb->sk = sk; | ||
295 | llc_sap_state_process(sap, skb); | 297 | llc_sap_state_process(sap, skb); |
296 | } | 298 | } |
297 | 299 | ||
@@ -360,8 +362,7 @@ static void llc_sap_mcast(struct llc_sap *sap, | |||
360 | break; | 362 | break; |
361 | 363 | ||
362 | sock_hold(sk); | 364 | sock_hold(sk); |
363 | skb_set_owner_r(skb1, sk); | 365 | llc_sap_rcv(sap, skb1, sk); |
364 | llc_sap_rcv(sap, skb1); | ||
365 | sock_put(sk); | 366 | sock_put(sk); |
366 | } | 367 | } |
367 | read_unlock_bh(&sap->sk_list.lock); | 368 | read_unlock_bh(&sap->sk_list.lock); |
@@ -381,8 +382,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb) | |||
381 | } else { | 382 | } else { |
382 | struct sock *sk = llc_lookup_dgram(sap, &laddr); | 383 | struct sock *sk = llc_lookup_dgram(sap, &laddr); |
383 | if (sk) { | 384 | if (sk) { |
384 | skb_set_owner_r(skb, sk); | 385 | llc_sap_rcv(sap, skb, sk); |
385 | llc_sap_rcv(sap, skb); | ||
386 | sock_put(sk); | 386 | sock_put(sk); |
387 | } else | 387 | } else |
388 | kfree_skb(skb); | 388 | kfree_skb(skb); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 699d97b8de5e..a9fce4afdf21 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
672 | if (params->vlan) { | 672 | if (params->vlan) { |
673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
674 | 674 | ||
675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 675 | if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) | 676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
677 | return -EINVAL; | 677 | return -EINVAL; |
678 | } else | 678 | } else |
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
760 | if (params->vlan && params->vlan != sta->sdata->dev) { | 760 | if (params->vlan && params->vlan != sta->sdata->dev) { |
761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); |
762 | 762 | ||
763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || | 763 | if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && |
764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { | 764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { |
765 | rcu_read_unlock(); | 765 | rcu_read_unlock(); |
766 | return -EINVAL; | 766 | return -EINVAL; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 915afadb0602..5c876450b14c 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -1313,7 +1313,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
1313 | /* | 1313 | /* |
1314 | * Clear the TX filter mask for this STA when sending the next | 1314 | * Clear the TX filter mask for this STA when sending the next |
1315 | * packet. If the STA went to power save mode, this will happen | 1315 | * packet. If the STA went to power save mode, this will happen |
1316 | * happen when it wakes up for the next time. | 1316 | * when it wakes up for the next time. |
1317 | */ | 1317 | */ |
1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; | 1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; |
1319 | 1319 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7cfd12e0d1e2..841278f1df8e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1325,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1325 | 1325 | ||
1326 | /* prepare reordering buffer */ | 1326 | /* prepare reordering buffer */ |
1327 | tid_agg_rx->reorder_buf = | 1327 | tid_agg_rx->reorder_buf = |
1328 | kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); | 1328 | kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); |
1329 | if (!tid_agg_rx->reorder_buf) { | 1329 | if (!tid_agg_rx->reorder_buf) { |
1330 | if (net_ratelimit()) | 1330 | if (net_ratelimit()) |
1331 | printk(KERN_ERR "can not allocate reordering buffer " | 1331 | printk(KERN_ERR "can not allocate reordering buffer " |
@@ -1334,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1334 | goto end; | 1334 | goto end; |
1335 | } | 1335 | } |
1336 | memset(tid_agg_rx->reorder_buf, 0, | 1336 | memset(tid_agg_rx->reorder_buf, 0, |
1337 | buf_size * sizeof(struct sk_buf *)); | 1337 | buf_size * sizeof(struct sk_buff *)); |
1338 | 1338 | ||
1339 | if (local->ops->ampdu_action) | 1339 | if (local->ops->ampdu_action) |
1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |
@@ -1614,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data) | |||
1614 | * only one argument, and both sta_info and TID are needed, so init | 1614 | * only one argument, and both sta_info and TID are needed, so init |
1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1616 | * array gives the sta through container_of */ | 1616 | * array gives the sta through container_of */ |
1617 | u16 tid = *(int *)data; | 1617 | u16 tid = *(u8 *)data; |
1618 | struct sta_info *temp_sta = container_of((void *)data, | 1618 | struct sta_info *temp_sta = container_of((void *)data, |
1619 | struct sta_info, timer_to_tid[tid]); | 1619 | struct sta_info, timer_to_tid[tid]); |
1620 | 1620 | ||
@@ -1662,7 +1662,7 @@ timer_expired_exit: | |||
1662 | void sta_rx_agg_session_timer_expired(unsigned long data) | 1662 | void sta_rx_agg_session_timer_expired(unsigned long data) |
1663 | { | 1663 | { |
1664 | /* not an elegant detour, but there is no choice as the timer passes | 1664 | /* not an elegant detour, but there is no choice as the timer passes |
1665 | * only one argument, and verious sta_info are needed here, so init | 1665 | * only one argument, and various sta_info are needed here, so init |
1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1667 | * array gives the sta through container_of */ | 1667 | * array gives the sta through container_of */ |
1668 | u8 *ptid = (u8 *)data; | 1668 | u8 *ptid = (u8 *)data; |
@@ -2479,8 +2479,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2479 | ifsta->state = IEEE80211_IBSS_JOINED; | 2479 | ifsta->state = IEEE80211_IBSS_JOINED; |
2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); | 2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); |
2481 | 2481 | ||
2482 | ieee80211_rx_bss_put(dev, bss); | ||
2483 | |||
2484 | return res; | 2482 | return res; |
2485 | } | 2483 | } |
2486 | 2484 | ||
@@ -3523,6 +3521,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3523 | struct ieee80211_supported_band *sband; | 3521 | struct ieee80211_supported_band *sband; |
3524 | u8 bssid[ETH_ALEN], *pos; | 3522 | u8 bssid[ETH_ALEN], *pos; |
3525 | int i; | 3523 | int i; |
3524 | int ret; | ||
3526 | DECLARE_MAC_BUF(mac); | 3525 | DECLARE_MAC_BUF(mac); |
3527 | 3526 | ||
3528 | #if 0 | 3527 | #if 0 |
@@ -3567,7 +3566,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3567 | *pos++ = (u8) (rate / 5); | 3566 | *pos++ = (u8) (rate / 5); |
3568 | } | 3567 | } |
3569 | 3568 | ||
3570 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3569 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3570 | ieee80211_rx_bss_put(dev, bss); | ||
3571 | return ret; | ||
3571 | } | 3572 | } |
3572 | 3573 | ||
3573 | 3574 | ||
@@ -3615,10 +3616,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3615 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3616 | (bss = ieee80211_rx_bss_get(dev, bssid, |
3616 | local->hw.conf.channel->center_freq, | 3617 | local->hw.conf.channel->center_freq, |
3617 | ifsta->ssid, ifsta->ssid_len))) { | 3618 | ifsta->ssid, ifsta->ssid_len))) { |
3619 | int ret; | ||
3618 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" | 3620 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" |
3619 | " based on configured SSID\n", | 3621 | " based on configured SSID\n", |
3620 | dev->name, print_mac(mac, bssid)); | 3622 | dev->name, print_mac(mac, bssid)); |
3621 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3623 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3624 | ieee80211_rx_bss_put(dev, bss); | ||
3625 | return ret; | ||
3622 | } | 3626 | } |
3623 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3627 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3624 | printk(KERN_DEBUG " did not try to join ibss\n"); | 3628 | printk(KERN_DEBUG " did not try to join ibss\n"); |
@@ -4095,18 +4099,17 @@ ieee80211_sta_scan_result(struct net_device *dev, | |||
4095 | 4099 | ||
4096 | memset(&iwe, 0, sizeof(iwe)); | 4100 | memset(&iwe, 0, sizeof(iwe)); |
4097 | iwe.cmd = SIOCGIWFREQ; | 4101 | iwe.cmd = SIOCGIWFREQ; |
4098 | iwe.u.freq.m = bss->freq; | 4102 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); |
4099 | iwe.u.freq.e = 6; | 4103 | iwe.u.freq.e = 0; |
4100 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4104 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4101 | IW_EV_FREQ_LEN); | 4105 | IW_EV_FREQ_LEN); |
4102 | 4106 | ||
4103 | memset(&iwe, 0, sizeof(iwe)); | 4107 | memset(&iwe, 0, sizeof(iwe)); |
4104 | iwe.cmd = SIOCGIWFREQ; | 4108 | iwe.cmd = SIOCGIWFREQ; |
4105 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); | 4109 | iwe.u.freq.m = bss->freq; |
4106 | iwe.u.freq.e = 0; | 4110 | iwe.u.freq.e = 6; |
4107 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4111 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4108 | IW_EV_FREQ_LEN); | 4112 | IW_EV_FREQ_LEN); |
4109 | |||
4110 | memset(&iwe, 0, sizeof(iwe)); | 4113 | memset(&iwe, 0, sizeof(iwe)); |
4111 | iwe.cmd = IWEVQUAL; | 4114 | iwe.cmd = IWEVQUAL; |
4112 | iwe.u.qual.qual = bss->signal; | 4115 | iwe.u.qual.qual = bss->signal; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1958bfb361c6..0941e5d6a522 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1091 | u16 fc, hdrlen, ethertype; | 1091 | u16 fc, hdrlen, ethertype; |
1092 | u8 *payload; | 1092 | u8 *payload; |
1093 | u8 dst[ETH_ALEN]; | 1093 | u8 dst[ETH_ALEN]; |
1094 | u8 src[ETH_ALEN]; | 1094 | u8 src[ETH_ALEN] __aligned(2); |
1095 | struct sk_buff *skb = rx->skb; | 1095 | struct sk_buff *skb = rx->skb; |
1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1097 | DECLARE_MAC_BUF(mac); | 1097 | DECLARE_MAC_BUF(mac); |
@@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1234 | */ | 1234 | */ |
1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) | 1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) |
1236 | { | 1236 | { |
1237 | static const u8 pae_group_addr[ETH_ALEN] | 1237 | static const u8 pae_group_addr[ETH_ALEN] __aligned(2) |
1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; | 1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; |
1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; | 1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; |
1240 | 1240 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 131e9e6c8a32..4e97b266f907 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid; | |||
34 | 34 | ||
35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | 35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ |
36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | 36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ |
37 | const unsigned char rfc1042_header[] = | 37 | const unsigned char rfc1042_header[] __aligned(2) = |
38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | 38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; |
39 | 39 | ||
40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | 40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ |
41 | const unsigned char bridge_tunnel_header[] = | 41 | const unsigned char bridge_tunnel_header[] __aligned(2) = |
42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | 42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
43 | 43 | ||
44 | 44 | ||
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 457ebf9e85ae..8311bb24f9f3 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -489,9 +489,14 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, | |||
489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || | 490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { | 491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
492 | ap_addr->sa_family = ARPHRD_ETHER; | 492 | if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { |
493 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); | 493 | ap_addr->sa_family = ARPHRD_ETHER; |
494 | return 0; | 494 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); |
495 | return 0; | ||
496 | } else { | ||
497 | memset(&ap_addr->sa_data, 0, ETH_ALEN); | ||
498 | return 0; | ||
499 | } | ||
495 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { | 500 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
496 | ap_addr->sa_family = ARPHRD_ETHER; | 501 | ap_addr->sa_family = ARPHRD_ETHER; |
497 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); | 502 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e31beeb33b2b..e8f0dead267f 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void) | |||
587 | return 0; | 587 | return 0; |
588 | 588 | ||
589 | err3: | 589 | err3: |
590 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
591 | err2: | ||
590 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, | 592 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, |
591 | nf_ct_expect_hsize); | 593 | nf_ct_expect_hsize); |
592 | err2: | ||
593 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
594 | err1: | 594 | err1: |
595 | return err; | 595 | return err; |
596 | } | 596 | } |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index a098a0454dc8..17092d6c7db3 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -43,7 +43,13 @@ _modpost: __modpost | |||
43 | include include/config/auto.conf | 43 | include include/config/auto.conf |
44 | include scripts/Kbuild.include | 44 | include scripts/Kbuild.include |
45 | 45 | ||
46 | # When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info | ||
46 | ifneq ($(KBUILD_EXTMOD),) | 47 | ifneq ($(KBUILD_EXTMOD),) |
48 | |||
49 | # set src + obj - they may be used when building the .mod.c file | ||
50 | obj := $(KBUILD_EXTMOD) | ||
51 | src := $(obj) | ||
52 | |||
47 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS | 53 | # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS |
48 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ | 54 | include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ |
49 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) | 55 | $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) |
diff --git a/scripts/decodecode b/scripts/decodecode index 235d3938529d..235d3938529d 100644..100755 --- a/scripts/decodecode +++ b/scripts/decodecode | |||