Magellan Linux

Contents of /trunk/kernel-magellan/patches-3.12/0104-3.12.5-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2385 - (show annotations) (download)
Tue Jan 28 08:29:04 2014 UTC (10 years, 3 months ago) by niro
File size: 80338 byte(s)
-linux-3.12.5
1 diff --git a/Makefile b/Makefile
2 index 3b7165eb4734..986f3cdbad56 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 12
8 -SUBLEVEL = 4
9 +SUBLEVEL = 5
10 EXTRAVERSION =
11 NAME = One Giant Leap for Frogkind
12
13 diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
14 index 90ce29dbe119..08a56bcfc724 100644
15 --- a/arch/arm/boot/dts/armada-370-db.dts
16 +++ b/arch/arm/boot/dts/armada-370-db.dts
17 @@ -99,22 +99,22 @@
18 spi-max-frequency = <50000000>;
19 };
20 };
21 + };
22
23 - pcie-controller {
24 + pcie-controller {
25 + status = "okay";
26 + /*
27 + * The two PCIe units are accessible through
28 + * both standard PCIe slots and mini-PCIe
29 + * slots on the board.
30 + */
31 + pcie@1,0 {
32 + /* Port 0, Lane 0 */
33 + status = "okay";
34 + };
35 + pcie@2,0 {
36 + /* Port 1, Lane 0 */
37 status = "okay";
38 - /*
39 - * The two PCIe units are accessible through
40 - * both standard PCIe slots and mini-PCIe
41 - * slots on the board.
42 - */
43 - pcie@1,0 {
44 - /* Port 0, Lane 0 */
45 - status = "okay";
46 - };
47 - pcie@2,0 {
48 - /* Port 1, Lane 0 */
49 - status = "okay";
50 - };
51 };
52 };
53 };
54 diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
55 index 1de2dae0fdae..b97ab017d4a2 100644
56 --- a/arch/arm/boot/dts/armada-370-xp.dtsi
57 +++ b/arch/arm/boot/dts/armada-370-xp.dtsi
58 @@ -117,7 +117,7 @@
59
60 coherency-fabric@20200 {
61 compatible = "marvell,coherency-fabric";
62 - reg = <0x20200 0xb0>, <0x21810 0x1c>;
63 + reg = <0x20200 0xb0>, <0x21010 0x1c>;
64 };
65
66 serial@12000 {
67 diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
68 index 0358a33cba48..9dc7381d57c2 100644
69 --- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
70 +++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
71 @@ -47,7 +47,7 @@
72 /*
73 * MV78230 has 2 PCIe units Gen2.0: One unit can be
74 * configured as x4 or quad x1 lanes. One unit is
75 - * x4/x1.
76 + * x1 only.
77 */
78 pcie-controller {
79 compatible = "marvell,armada-xp-pcie";
80 @@ -61,10 +61,10 @@
81
82 ranges =
83 <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */
84 - 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */
85 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */
86 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */
87 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */
88 + 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */
89 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
90 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */
91 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
92 @@ -73,8 +73,8 @@
93 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */
94 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
95 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */
96 - 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
97 - 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>;
98 + 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
99 + 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */>;
100
101 pcie@1,0 {
102 device_type = "pci";
103 @@ -144,20 +144,20 @@
104 status = "disabled";
105 };
106
107 - pcie@9,0 {
108 + pcie@5,0 {
109 device_type = "pci";
110 - assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
111 - reg = <0x4800 0 0 0 0>;
112 + assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
113 + reg = <0x2800 0 0 0 0>;
114 #address-cells = <3>;
115 #size-cells = <2>;
116 #interrupt-cells = <1>;
117 - ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
118 - 0x81000000 0 0 0x81000000 0x9 0 1 0>;
119 + ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
120 + 0x81000000 0 0 0x81000000 0x5 0 1 0>;
121 interrupt-map-mask = <0 0 0 0>;
122 - interrupt-map = <0 0 0 0 &mpic 99>;
123 - marvell,pcie-port = <2>;
124 + interrupt-map = <0 0 0 0 &mpic 62>;
125 + marvell,pcie-port = <1>;
126 marvell,pcie-lane = <0>;
127 - clocks = <&gateclk 26>;
128 + clocks = <&gateclk 9>;
129 status = "disabled";
130 };
131 };
132 diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
133 index 0e82c5062243..a598ce9035f5 100644
134 --- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
135 +++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
136 @@ -48,7 +48,7 @@
137 /*
138 * MV78260 has 3 PCIe units Gen2.0: Two units can be
139 * configured as x4 or quad x1 lanes. One unit is
140 - * x4/x1.
141 + * x4 only.
142 */
143 pcie-controller {
144 compatible = "marvell,armada-xp-pcie";
145 @@ -67,7 +67,9 @@
146 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */
147 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */
148 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */
149 - 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */
150 + 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */
151 + 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */
152 + 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */
153 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */
154 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */
155 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */
156 @@ -76,10 +78,18 @@
157 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */
158 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */
159 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */
160 - 0x82000000 0x9 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
161 - 0x81000000 0x9 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */
162 - 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */
163 - 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>;
164 +
165 + 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */
166 + 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */
167 + 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */
168 + 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */
169 + 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */
170 + 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */
171 + 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */
172 + 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */
173 +
174 + 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */
175 + 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */>;
176
177 pcie@1,0 {
178 device_type = "pci";
179 @@ -105,8 +115,8 @@
180 #address-cells = <3>;
181 #size-cells = <2>;
182 #interrupt-cells = <1>;
183 - ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
184 - 0x81000000 0 0 0x81000000 0x2 0 1 0>;
185 + ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
186 + 0x81000000 0 0 0x81000000 0x2 0 1 0>;
187 interrupt-map-mask = <0 0 0 0>;
188 interrupt-map = <0 0 0 0 &mpic 59>;
189 marvell,pcie-port = <0>;
190 @@ -149,37 +159,88 @@
191 status = "disabled";
192 };
193
194 - pcie@9,0 {
195 + pcie@5,0 {
196 device_type = "pci";
197 - assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
198 - reg = <0x4800 0 0 0 0>;
199 + assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
200 + reg = <0x2800 0 0 0 0>;
201 #address-cells = <3>;
202 #size-cells = <2>;
203 #interrupt-cells = <1>;
204 - ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
205 - 0x81000000 0 0 0x81000000 0x9 0 1 0>;
206 + ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0
207 + 0x81000000 0 0 0x81000000 0x5 0 1 0>;
208 interrupt-map-mask = <0 0 0 0>;
209 - interrupt-map = <0 0 0 0 &mpic 99>;
210 - marvell,pcie-port = <2>;
211 + interrupt-map = <0 0 0 0 &mpic 62>;
212 + marvell,pcie-port = <1>;
213 marvell,pcie-lane = <0>;
214 - clocks = <&gateclk 26>;
215 + clocks = <&gateclk 9>;
216 status = "disabled";
217 };
218
219 - pcie@10,0 {
220 + pcie@6,0 {
221 device_type = "pci";
222 - assigned-addresses = <0x82000800 0 0x82000 0 0x2000>;
223 - reg = <0x5000 0 0 0 0>;
224 + assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
225 + reg = <0x3000 0 0 0 0>;
226 #address-cells = <3>;
227 #size-cells = <2>;
228 #interrupt-cells = <1>;
229 - ranges = <0x82000000 0 0 0x82000000 0xa 0 1 0
230 - 0x81000000 0 0 0x81000000 0xa 0 1 0>;
231 + ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0
232 + 0x81000000 0 0 0x81000000 0x6 0 1 0>;
233 interrupt-map-mask = <0 0 0 0>;
234 - interrupt-map = <0 0 0 0 &mpic 103>;
235 - marvell,pcie-port = <3>;
236 + interrupt-map = <0 0 0 0 &mpic 63>;
237 + marvell,pcie-port = <1>;
238 + marvell,pcie-lane = <1>;
239 + clocks = <&gateclk 10>;
240 + status = "disabled";
241 + };
242 +
243 + pcie@7,0 {
244 + device_type = "pci";
245 + assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
246 + reg = <0x3800 0 0 0 0>;
247 + #address-cells = <3>;
248 + #size-cells = <2>;
249 + #interrupt-cells = <1>;
250 + ranges = <0x82000000 0 0 0x82000000 0x7 0 1 0
251 + 0x81000000 0 0 0x81000000 0x7 0 1 0>;
252 + interrupt-map-mask = <0 0 0 0>;
253 + interrupt-map = <0 0 0 0 &mpic 64>;
254 + marvell,pcie-port = <1>;
255 + marvell,pcie-lane = <2>;
256 + clocks = <&gateclk 11>;
257 + status = "disabled";
258 + };
259 +
260 + pcie@8,0 {
261 + device_type = "pci";
262 + assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
263 + reg = <0x4000 0 0 0 0>;
264 + #address-cells = <3>;
265 + #size-cells = <2>;
266 + #interrupt-cells = <1>;
267 + ranges = <0x82000000 0 0 0x82000000 0x8 0 1 0
268 + 0x81000000 0 0 0x81000000 0x8 0 1 0>;
269 + interrupt-map-mask = <0 0 0 0>;
270 + interrupt-map = <0 0 0 0 &mpic 65>;
271 + marvell,pcie-port = <1>;
272 + marvell,pcie-lane = <3>;
273 + clocks = <&gateclk 12>;
274 + status = "disabled";
275 + };
276 +
277 + pcie@9,0 {
278 + device_type = "pci";
279 + assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
280 + reg = <0x4800 0 0 0 0>;
281 + #address-cells = <3>;
282 + #size-cells = <2>;
283 + #interrupt-cells = <1>;
284 + ranges = <0x82000000 0 0 0x82000000 0x9 0 1 0
285 + 0x81000000 0 0 0x81000000 0x9 0 1 0>;
286 + interrupt-map-mask = <0 0 0 0>;
287 + interrupt-map = <0 0 0 0 &mpic 99>;
288 + marvell,pcie-port = <2>;
289 marvell,pcie-lane = <0>;
290 - clocks = <&gateclk 27>;
291 + clocks = <&gateclk 26>;
292 status = "disabled";
293 };
294 };
295 diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
296 index 814ab67c8c29..b74879b42515 100644
297 --- a/arch/arm/boot/dts/omap4-panda-common.dtsi
298 +++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
299 @@ -239,15 +239,6 @@
300 0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
301 >;
302 };
303 -};
304 -
305 -&omap4_pmx_wkup {
306 - led_wkgpio_pins: pinmux_leds_wkpins {
307 - pinctrl-single,pins = <
308 - 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */
309 - 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
310 - >;
311 - };
312
313 /*
314 * wl12xx GPIO outputs for WLAN_EN, BT_EN, FM_EN, BT_WAKEUP
315 @@ -267,7 +258,7 @@
316 pinctrl-single,pins = <
317 0x38 (PIN_INPUT | MUX_MODE3) /* gpmc_ncs2.gpio_52 */
318 0x3a (PIN_INPUT | MUX_MODE3) /* gpmc_ncs3.gpio_53 */
319 - 0x108 (PIN_OUTPUT | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */
320 + 0x108 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */
321 0x10a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */
322 0x10c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */
323 0x10e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */
324 @@ -277,6 +268,15 @@
325 };
326 };
327
328 +&omap4_pmx_wkup {
329 + led_wkgpio_pins: pinmux_leds_wkpins {
330 + pinctrl-single,pins = <
331 + 0x1a (PIN_OUTPUT | MUX_MODE3) /* gpio_wk7 */
332 + 0x1c (PIN_OUTPUT | MUX_MODE3) /* gpio_wk8 */
333 + >;
334 + };
335 +};
336 +
337 &i2c1 {
338 pinctrl-names = "default";
339 pinctrl-0 = <&i2c1_pins>;
340 diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
341 index 119fc378fc52..fe88105a0421 100644
342 --- a/arch/arm/configs/multi_v7_defconfig
343 +++ b/arch/arm/configs/multi_v7_defconfig
344 @@ -132,12 +132,14 @@ CONFIG_USB_GPIO_VBUS=y
345 CONFIG_USB_ISP1301=y
346 CONFIG_USB_MXS_PHY=y
347 CONFIG_MMC=y
348 +CONFIG_MMC_BLOCK_MINORS=16
349 CONFIG_MMC_ARMMMCI=y
350 CONFIG_MMC_SDHCI=y
351 CONFIG_MMC_SDHCI_PLTFM=y
352 CONFIG_MMC_SDHCI_ESDHC_IMX=y
353 CONFIG_MMC_SDHCI_TEGRA=y
354 CONFIG_MMC_SDHCI_SPEAR=y
355 +CONFIG_MMC_SDHCI_BCM_KONA=y
356 CONFIG_MMC_OMAP=y
357 CONFIG_MMC_OMAP_HS=y
358 CONFIG_EDAC=y
359 diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
360 index be956dbf6bae..1571d126e9dd 100644
361 --- a/arch/arm/include/asm/pgtable.h
362 +++ b/arch/arm/include/asm/pgtable.h
363 @@ -61,7 +61,7 @@ extern void __pgd_error(const char *file, int line, pgd_t);
364 * mapping to be mapped at. This is particularly important for
365 * non-high vector CPUs.
366 */
367 -#define FIRST_USER_ADDRESS PAGE_SIZE
368 +#define FIRST_USER_ADDRESS (PAGE_SIZE * 2)
369
370 /*
371 * Use TASK_SIZE as the ceiling argument for free_pgtables() and
372 diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c
373 index 3ea86428ee09..a28873fe3049 100644
374 --- a/arch/arm/mach-at91/sama5d3.c
375 +++ b/arch/arm/mach-at91/sama5d3.c
376 @@ -95,19 +95,19 @@ static struct clk twi0_clk = {
377 .name = "twi0_clk",
378 .pid = SAMA5D3_ID_TWI0,
379 .type = CLK_TYPE_PERIPHERAL,
380 - .div = AT91_PMC_PCR_DIV2,
381 + .div = AT91_PMC_PCR_DIV8,
382 };
383 static struct clk twi1_clk = {
384 .name = "twi1_clk",
385 .pid = SAMA5D3_ID_TWI1,
386 .type = CLK_TYPE_PERIPHERAL,
387 - .div = AT91_PMC_PCR_DIV2,
388 + .div = AT91_PMC_PCR_DIV8,
389 };
390 static struct clk twi2_clk = {
391 .name = "twi2_clk",
392 .pid = SAMA5D3_ID_TWI2,
393 .type = CLK_TYPE_PERIPHERAL,
394 - .div = AT91_PMC_PCR_DIV2,
395 + .div = AT91_PMC_PCR_DIV8,
396 };
397 static struct clk mmc0_clk = {
398 .name = "mci0_clk",
399 diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
400 index 2739ca2c1334..e0091685fd48 100644
401 --- a/arch/arm/mach-footbridge/common.c
402 +++ b/arch/arm/mach-footbridge/common.c
403 @@ -15,6 +15,7 @@
404 #include <linux/init.h>
405 #include <linux/io.h>
406 #include <linux/spinlock.h>
407 +#include <video/vga.h>
408
409 #include <asm/pgtable.h>
410 #include <asm/page.h>
411 @@ -196,6 +197,8 @@ void __init footbridge_map_io(void)
412 iotable_init(ebsa285_host_io_desc, ARRAY_SIZE(ebsa285_host_io_desc));
413 pci_map_io_early(__phys_to_pfn(DC21285_PCI_IO));
414 }
415 +
416 + vga_base = PCIMEM_BASE;
417 }
418
419 void footbridge_restart(enum reboot_mode mode, const char *cmd)
420 diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
421 index 3490a24f969e..7c2fdae9a38b 100644
422 --- a/arch/arm/mach-footbridge/dc21285.c
423 +++ b/arch/arm/mach-footbridge/dc21285.c
424 @@ -18,7 +18,6 @@
425 #include <linux/irq.h>
426 #include <linux/io.h>
427 #include <linux/spinlock.h>
428 -#include <video/vga.h>
429
430 #include <asm/irq.h>
431 #include <asm/mach/pci.h>
432 @@ -291,7 +290,6 @@ void __init dc21285_preinit(void)
433 int cfn_mode;
434
435 pcibios_min_mem = 0x81000000;
436 - vga_base = PCIMEM_BASE;
437
438 mem_size = (unsigned int)high_memory - PAGE_OFFSET;
439 for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1)
440 diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c
441 index b08243500e2e..1a7235fb52ac 100644
442 --- a/arch/arm/mach-footbridge/ebsa285.c
443 +++ b/arch/arm/mach-footbridge/ebsa285.c
444 @@ -30,21 +30,24 @@ static const struct {
445 const char *name;
446 const char *trigger;
447 } ebsa285_leds[] = {
448 - { "ebsa285:amber", "heartbeat", },
449 - { "ebsa285:green", "cpu0", },
450 + { "ebsa285:amber", "cpu0", },
451 + { "ebsa285:green", "heartbeat", },
452 { "ebsa285:red",},
453 };
454
455 +static unsigned char hw_led_state;
456 +
457 static void ebsa285_led_set(struct led_classdev *cdev,
458 enum led_brightness b)
459 {
460 struct ebsa285_led *led = container_of(cdev,
461 struct ebsa285_led, cdev);
462
463 - if (b != LED_OFF)
464 - *XBUS_LEDS |= led->mask;
465 + if (b == LED_OFF)
466 + hw_led_state |= led->mask;
467 else
468 - *XBUS_LEDS &= ~led->mask;
469 + hw_led_state &= ~led->mask;
470 + *XBUS_LEDS = hw_led_state;
471 }
472
473 static enum led_brightness ebsa285_led_get(struct led_classdev *cdev)
474 @@ -52,18 +55,19 @@ static enum led_brightness ebsa285_led_get(struct led_classdev *cdev)
475 struct ebsa285_led *led = container_of(cdev,
476 struct ebsa285_led, cdev);
477
478 - return (*XBUS_LEDS & led->mask) ? LED_FULL : LED_OFF;
479 + return hw_led_state & led->mask ? LED_OFF : LED_FULL;
480 }
481
482 static int __init ebsa285_leds_init(void)
483 {
484 int i;
485
486 - if (machine_is_ebsa285())
487 + if (!machine_is_ebsa285())
488 return -ENODEV;
489
490 - /* 3 LEDS All ON */
491 - *XBUS_LEDS |= XBUS_LED_AMBER | XBUS_LED_GREEN | XBUS_LED_RED;
492 + /* 3 LEDS all off */
493 + hw_led_state = XBUS_LED_AMBER | XBUS_LED_GREEN | XBUS_LED_RED;
494 + *XBUS_LEDS = hw_led_state;
495
496 for (i = 0; i < ARRAY_SIZE(ebsa285_leds); i++) {
497 struct ebsa285_led *led;
498 diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
499 index 0c6356255fe3..304661d21369 100644
500 --- a/arch/arm/mm/mmap.c
501 +++ b/arch/arm/mm/mmap.c
502 @@ -146,7 +146,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
503
504 info.flags = VM_UNMAPPED_AREA_TOPDOWN;
505 info.length = len;
506 - info.low_limit = PAGE_SIZE;
507 + info.low_limit = FIRST_USER_ADDRESS;
508 info.high_limit = mm->mmap_base;
509 info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
510 info.align_offset = pgoff << PAGE_SHIFT;
511 diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
512 index 0acb089d0f70..1046b373d1ae 100644
513 --- a/arch/arm/mm/pgd.c
514 +++ b/arch/arm/mm/pgd.c
515 @@ -87,7 +87,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
516 init_pud = pud_offset(init_pgd, 0);
517 init_pmd = pmd_offset(init_pud, 0);
518 init_pte = pte_offset_map(init_pmd, 0);
519 - set_pte_ext(new_pte, *init_pte, 0);
520 + set_pte_ext(new_pte + 0, init_pte[0], 0);
521 + set_pte_ext(new_pte + 1, init_pte[1], 0);
522 pte_unmap(init_pte);
523 pte_unmap(new_pte);
524 }
525 diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
526 index 5dfd248e3f1a..0d3a9d4927b5 100644
527 --- a/arch/parisc/kernel/sys_parisc.c
528 +++ b/arch/parisc/kernel/sys_parisc.c
529 @@ -61,8 +61,15 @@ static int get_offset(struct address_space *mapping)
530 return (unsigned long) mapping >> 8;
531 }
532
533 -static unsigned long get_shared_area(struct address_space *mapping,
534 - unsigned long addr, unsigned long len, unsigned long pgoff)
535 +static unsigned long shared_align_offset(struct file *filp, unsigned long pgoff)
536 +{
537 + struct address_space *mapping = filp ? filp->f_mapping : NULL;
538 +
539 + return (get_offset(mapping) + pgoff) << PAGE_SHIFT;
540 +}
541 +
542 +static unsigned long get_shared_area(struct file *filp, unsigned long addr,
543 + unsigned long len, unsigned long pgoff)
544 {
545 struct vm_unmapped_area_info info;
546
547 @@ -71,7 +78,7 @@ static unsigned long get_shared_area(struct address_space *mapping,
548 info.low_limit = PAGE_ALIGN(addr);
549 info.high_limit = TASK_SIZE;
550 info.align_mask = PAGE_MASK & (SHMLBA - 1);
551 - info.align_offset = (get_offset(mapping) + pgoff) << PAGE_SHIFT;
552 + info.align_offset = shared_align_offset(filp, pgoff);
553 return vm_unmapped_area(&info);
554 }
555
556 @@ -82,20 +89,18 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
557 return -ENOMEM;
558 if (flags & MAP_FIXED) {
559 if ((flags & MAP_SHARED) &&
560 - (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
561 + (addr - shared_align_offset(filp, pgoff)) & (SHMLBA - 1))
562 return -EINVAL;
563 return addr;
564 }
565 if (!addr)
566 addr = TASK_UNMAPPED_BASE;
567
568 - if (filp) {
569 - addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
570 - } else if(flags & MAP_SHARED) {
571 - addr = get_shared_area(NULL, addr, len, pgoff);
572 - } else {
573 + if (filp || (flags & MAP_SHARED))
574 + addr = get_shared_area(filp, addr, len, pgoff);
575 + else
576 addr = get_unshared_area(addr, len);
577 - }
578 +
579 return addr;
580 }
581
582 diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
583 index 2e4b5be31a1b..94e20dd2729f 100644
584 --- a/arch/s390/crypto/aes_s390.c
585 +++ b/arch/s390/crypto/aes_s390.c
586 @@ -55,8 +55,7 @@ struct pcc_param {
587
588 struct s390_xts_ctx {
589 u8 key[32];
590 - u8 xts_param[16];
591 - struct pcc_param pcc;
592 + u8 pcc_key[32];
593 long enc;
594 long dec;
595 int key_len;
596 @@ -591,7 +590,7 @@ static int xts_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
597 xts_ctx->enc = KM_XTS_128_ENCRYPT;
598 xts_ctx->dec = KM_XTS_128_DECRYPT;
599 memcpy(xts_ctx->key + 16, in_key, 16);
600 - memcpy(xts_ctx->pcc.key + 16, in_key + 16, 16);
601 + memcpy(xts_ctx->pcc_key + 16, in_key + 16, 16);
602 break;
603 case 48:
604 xts_ctx->enc = 0;
605 @@ -602,7 +601,7 @@ static int xts_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
606 xts_ctx->enc = KM_XTS_256_ENCRYPT;
607 xts_ctx->dec = KM_XTS_256_DECRYPT;
608 memcpy(xts_ctx->key, in_key, 32);
609 - memcpy(xts_ctx->pcc.key, in_key + 32, 32);
610 + memcpy(xts_ctx->pcc_key, in_key + 32, 32);
611 break;
612 default:
613 *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
614 @@ -621,29 +620,33 @@ static int xts_aes_crypt(struct blkcipher_desc *desc, long func,
615 unsigned int nbytes = walk->nbytes;
616 unsigned int n;
617 u8 *in, *out;
618 - void *param;
619 + struct pcc_param pcc_param;
620 + struct {
621 + u8 key[32];
622 + u8 init[16];
623 + } xts_param;
624
625 if (!nbytes)
626 goto out;
627
628 - memset(xts_ctx->pcc.block, 0, sizeof(xts_ctx->pcc.block));
629 - memset(xts_ctx->pcc.bit, 0, sizeof(xts_ctx->pcc.bit));
630 - memset(xts_ctx->pcc.xts, 0, sizeof(xts_ctx->pcc.xts));
631 - memcpy(xts_ctx->pcc.tweak, walk->iv, sizeof(xts_ctx->pcc.tweak));
632 - param = xts_ctx->pcc.key + offset;
633 - ret = crypt_s390_pcc(func, param);
634 + memset(pcc_param.block, 0, sizeof(pcc_param.block));
635 + memset(pcc_param.bit, 0, sizeof(pcc_param.bit));
636 + memset(pcc_param.xts, 0, sizeof(pcc_param.xts));
637 + memcpy(pcc_param.tweak, walk->iv, sizeof(pcc_param.tweak));
638 + memcpy(pcc_param.key, xts_ctx->pcc_key, 32);
639 + ret = crypt_s390_pcc(func, &pcc_param.key[offset]);
640 if (ret < 0)
641 return -EIO;
642
643 - memcpy(xts_ctx->xts_param, xts_ctx->pcc.xts, 16);
644 - param = xts_ctx->key + offset;
645 + memcpy(xts_param.key, xts_ctx->key, 32);
646 + memcpy(xts_param.init, pcc_param.xts, 16);
647 do {
648 /* only use complete blocks */
649 n = nbytes & ~(AES_BLOCK_SIZE - 1);
650 out = walk->dst.virt.addr;
651 in = walk->src.virt.addr;
652
653 - ret = crypt_s390_km(func, param, out, in, n);
654 + ret = crypt_s390_km(func, &xts_param.key[offset], out, in, n);
655 if (ret < 0 || ret != n)
656 return -EIO;
657
658 diff --git a/arch/x86/Makefile b/arch/x86/Makefile
659 index 41250fb33985..eda00f9be0cf 100644
660 --- a/arch/x86/Makefile
661 +++ b/arch/x86/Makefile
662 @@ -31,6 +31,9 @@ ifeq ($(CONFIG_X86_32),y)
663
664 KBUILD_CFLAGS += -msoft-float -mregparm=3 -freg-struct-return
665
666 + # Don't autogenerate SSE instructions
667 + KBUILD_CFLAGS += -mno-sse
668 +
669 # Never want PIC in a 32-bit kernel, prevent breakage with GCC built
670 # with nonstandard options
671 KBUILD_CFLAGS += -fno-pic
672 @@ -57,8 +60,11 @@ else
673 KBUILD_AFLAGS += -m64
674 KBUILD_CFLAGS += -m64
675
676 + # Don't autogenerate SSE instructions
677 + KBUILD_CFLAGS += -mno-sse
678 +
679 # Use -mpreferred-stack-boundary=3 if supported.
680 - KBUILD_CFLAGS += $(call cc-option,-mno-sse -mpreferred-stack-boundary=3)
681 + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3)
682
683 # FIXME - should be integrated in Makefile.cpu (Makefile_32.cpu)
684 cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
685 diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
686 index ae6969a7ffd4..2e34c386d760 100644
687 --- a/block/blk-cgroup.h
688 +++ b/block/blk-cgroup.h
689 @@ -430,9 +430,9 @@ static inline uint64_t blkg_stat_read(struct blkg_stat *stat)
690 uint64_t v;
691
692 do {
693 - start = u64_stats_fetch_begin(&stat->syncp);
694 + start = u64_stats_fetch_begin_bh(&stat->syncp);
695 v = stat->cnt;
696 - } while (u64_stats_fetch_retry(&stat->syncp, start));
697 + } while (u64_stats_fetch_retry_bh(&stat->syncp, start));
698
699 return v;
700 }
701 @@ -498,9 +498,9 @@ static inline struct blkg_rwstat blkg_rwstat_read(struct blkg_rwstat *rwstat)
702 struct blkg_rwstat tmp;
703
704 do {
705 - start = u64_stats_fetch_begin(&rwstat->syncp);
706 + start = u64_stats_fetch_begin_bh(&rwstat->syncp);
707 tmp = *rwstat;
708 - } while (u64_stats_fetch_retry(&rwstat->syncp, start));
709 + } while (u64_stats_fetch_retry_bh(&rwstat->syncp, start));
710
711 return tmp;
712 }
713 diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
714 index 850246206b12..585c3b279feb 100644
715 --- a/crypto/algif_hash.c
716 +++ b/crypto/algif_hash.c
717 @@ -117,6 +117,9 @@ static ssize_t hash_sendpage(struct socket *sock, struct page *page,
718 if (flags & MSG_SENDPAGE_NOTLAST)
719 flags |= MSG_MORE;
720
721 + if (flags & MSG_SENDPAGE_NOTLAST)
722 + flags |= MSG_MORE;
723 +
724 lock_sock(sk);
725 sg_init_table(ctx->sgl.sg, 1);
726 sg_set_page(ctx->sgl.sg, page, size, offset);
727 diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
728 index a19c027b29bd..918a3b4148b8 100644
729 --- a/crypto/algif_skcipher.c
730 +++ b/crypto/algif_skcipher.c
731 @@ -381,6 +381,9 @@ static ssize_t skcipher_sendpage(struct socket *sock, struct page *page,
732 if (flags & MSG_SENDPAGE_NOTLAST)
733 flags |= MSG_MORE;
734
735 + if (flags & MSG_SENDPAGE_NOTLAST)
736 + flags |= MSG_MORE;
737 +
738 lock_sock(sk);
739 if (!ctx->more && ctx->used)
740 goto unlock;
741 diff --git a/crypto/authenc.c b/crypto/authenc.c
742 index ffce19de05cf..528b00bc4769 100644
743 --- a/crypto/authenc.c
744 +++ b/crypto/authenc.c
745 @@ -368,9 +368,10 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req,
746 if (!err) {
747 struct crypto_aead *authenc = crypto_aead_reqtfm(areq);
748 struct crypto_authenc_ctx *ctx = crypto_aead_ctx(authenc);
749 - struct ablkcipher_request *abreq = aead_request_ctx(areq);
750 - u8 *iv = (u8 *)(abreq + 1) +
751 - crypto_ablkcipher_reqsize(ctx->enc);
752 + struct authenc_request_ctx *areq_ctx = aead_request_ctx(areq);
753 + struct ablkcipher_request *abreq = (void *)(areq_ctx->tail
754 + + ctx->reqoff);
755 + u8 *iv = (u8 *)abreq - crypto_ablkcipher_ivsize(ctx->enc);
756
757 err = crypto_authenc_genicv(areq, iv, 0);
758 }
759 diff --git a/crypto/ccm.c b/crypto/ccm.c
760 index 499c91717d93..ed009b77e67d 100644
761 --- a/crypto/ccm.c
762 +++ b/crypto/ccm.c
763 @@ -271,7 +271,8 @@ static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain,
764 }
765
766 /* compute plaintext into mac */
767 - get_data_to_compute(cipher, pctx, plain, cryptlen);
768 + if (cryptlen)
769 + get_data_to_compute(cipher, pctx, plain, cryptlen);
770
771 out:
772 return err;
773 diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
774 index db6dfcfa3e2e..ab58556d347c 100644
775 --- a/drivers/ata/libata-scsi.c
776 +++ b/drivers/ata/libata-scsi.c
777 @@ -3625,6 +3625,7 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
778 shost->max_lun = 1;
779 shost->max_channel = 1;
780 shost->max_cmd_len = 16;
781 + shost->no_write_same = 1;
782
783 /* Schedule policy is determined by ->qc_defer()
784 * callback and it needs to see every deferred qc.
785 diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
786 index 40cc0cf2ded6..e6939e13e338 100644
787 --- a/drivers/char/i8k.c
788 +++ b/drivers/char/i8k.c
789 @@ -664,6 +664,13 @@ static struct dmi_system_id __initdata i8k_dmi_table[] = {
790 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro"),
791 },
792 },
793 + {
794 + .ident = "Dell XPS421",
795 + .matches = {
796 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
797 + DMI_MATCH(DMI_PRODUCT_NAME, "XPS L421X"),
798 + },
799 + },
800 { }
801 };
802
803 diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
804 index d75040ddd2b3..22c07fb6ab78 100644
805 --- a/drivers/cpuidle/cpuidle.c
806 +++ b/drivers/cpuidle/cpuidle.c
807 @@ -448,7 +448,7 @@ EXPORT_SYMBOL_GPL(cpuidle_register_device);
808 */
809 void cpuidle_unregister_device(struct cpuidle_device *dev)
810 {
811 - if (dev->registered == 0)
812 + if (!dev || dev->registered == 0)
813 return;
814
815 cpuidle_pause_and_lock();
816 diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
817 index 281029daf98c..b0bb056458a3 100644
818 --- a/drivers/firewire/sbp2.c
819 +++ b/drivers/firewire/sbp2.c
820 @@ -1623,6 +1623,7 @@ static struct scsi_host_template scsi_driver_template = {
821 .cmd_per_lun = 1,
822 .can_queue = 1,
823 .sdev_attrs = sbp2_scsi_sysfs_attrs,
824 + .no_write_same = 1,
825 };
826
827 MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
828 diff --git a/drivers/firmware/efi/efi-pstore.c b/drivers/firmware/efi/efi-pstore.c
829 index 5002d50e3781..743fd426f21b 100644
830 --- a/drivers/firmware/efi/efi-pstore.c
831 +++ b/drivers/firmware/efi/efi-pstore.c
832 @@ -18,14 +18,12 @@ module_param_named(pstore_disable, efivars_pstore_disable, bool, 0644);
833
834 static int efi_pstore_open(struct pstore_info *psi)
835 {
836 - efivar_entry_iter_begin();
837 psi->data = NULL;
838 return 0;
839 }
840
841 static int efi_pstore_close(struct pstore_info *psi)
842 {
843 - efivar_entry_iter_end();
844 psi->data = NULL;
845 return 0;
846 }
847 @@ -39,6 +37,12 @@ struct pstore_read_data {
848 char **buf;
849 };
850
851 +static inline u64 generic_id(unsigned long timestamp,
852 + unsigned int part, int count)
853 +{
854 + return (timestamp * 100 + part) * 1000 + count;
855 +}
856 +
857 static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
858 {
859 efi_guid_t vendor = LINUX_EFI_CRASH_GUID;
860 @@ -57,7 +61,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
861
862 if (sscanf(name, "dump-type%u-%u-%d-%lu-%c",
863 cb_data->type, &part, &cnt, &time, &data_type) == 5) {
864 - *cb_data->id = part;
865 + *cb_data->id = generic_id(time, part, cnt);
866 *cb_data->count = cnt;
867 cb_data->timespec->tv_sec = time;
868 cb_data->timespec->tv_nsec = 0;
869 @@ -67,7 +71,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
870 *cb_data->compressed = false;
871 } else if (sscanf(name, "dump-type%u-%u-%d-%lu",
872 cb_data->type, &part, &cnt, &time) == 4) {
873 - *cb_data->id = part;
874 + *cb_data->id = generic_id(time, part, cnt);
875 *cb_data->count = cnt;
876 cb_data->timespec->tv_sec = time;
877 cb_data->timespec->tv_nsec = 0;
878 @@ -79,7 +83,7 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
879 * which doesn't support holding
880 * multiple logs, remains.
881 */
882 - *cb_data->id = part;
883 + *cb_data->id = generic_id(time, part, 0);
884 *cb_data->count = 0;
885 cb_data->timespec->tv_sec = time;
886 cb_data->timespec->tv_nsec = 0;
887 @@ -91,19 +95,125 @@ static int efi_pstore_read_func(struct efivar_entry *entry, void *data)
888 __efivar_entry_get(entry, &entry->var.Attributes,
889 &entry->var.DataSize, entry->var.Data);
890 size = entry->var.DataSize;
891 + memcpy(*cb_data->buf, entry->var.Data,
892 + (size_t)min_t(unsigned long, EFIVARS_DATA_SIZE_MAX, size));
893
894 - *cb_data->buf = kmemdup(entry->var.Data, size, GFP_KERNEL);
895 - if (*cb_data->buf == NULL)
896 - return -ENOMEM;
897 return size;
898 }
899
900 +/**
901 + * efi_pstore_scan_sysfs_enter
902 + * @entry: scanning entry
903 + * @next: next entry
904 + * @head: list head
905 + */
906 +static void efi_pstore_scan_sysfs_enter(struct efivar_entry *pos,
907 + struct efivar_entry *next,
908 + struct list_head *head)
909 +{
910 + pos->scanning = true;
911 + if (&next->list != head)
912 + next->scanning = true;
913 +}
914 +
915 +/**
916 + * __efi_pstore_scan_sysfs_exit
917 + * @entry: deleting entry
918 + * @turn_off_scanning: Check if a scanning flag should be turned off
919 + */
920 +static inline void __efi_pstore_scan_sysfs_exit(struct efivar_entry *entry,
921 + bool turn_off_scanning)
922 +{
923 + if (entry->deleting) {
924 + list_del(&entry->list);
925 + efivar_entry_iter_end();
926 + efivar_unregister(entry);
927 + efivar_entry_iter_begin();
928 + } else if (turn_off_scanning)
929 + entry->scanning = false;
930 +}
931 +
932 +/**
933 + * efi_pstore_scan_sysfs_exit
934 + * @pos: scanning entry
935 + * @next: next entry
936 + * @head: list head
937 + * @stop: a flag checking if scanning will stop
938 + */
939 +static void efi_pstore_scan_sysfs_exit(struct efivar_entry *pos,
940 + struct efivar_entry *next,
941 + struct list_head *head, bool stop)
942 +{
943 + __efi_pstore_scan_sysfs_exit(pos, true);
944 + if (stop)
945 + __efi_pstore_scan_sysfs_exit(next, &next->list != head);
946 +}
947 +
948 +/**
949 + * efi_pstore_sysfs_entry_iter
950 + *
951 + * @data: function-specific data to pass to callback
952 + * @pos: entry to begin iterating from
953 + *
954 + * You MUST call efivar_enter_iter_begin() before this function, and
955 + * efivar_entry_iter_end() afterwards.
956 + *
957 + * It is possible to begin iteration from an arbitrary entry within
958 + * the list by passing @pos. @pos is updated on return to point to
959 + * the next entry of the last one passed to efi_pstore_read_func().
960 + * To begin iterating from the beginning of the list @pos must be %NULL.
961 + */
962 +static int efi_pstore_sysfs_entry_iter(void *data, struct efivar_entry **pos)
963 +{
964 + struct efivar_entry *entry, *n;
965 + struct list_head *head = &efivar_sysfs_list;
966 + int size = 0;
967 +
968 + if (!*pos) {
969 + list_for_each_entry_safe(entry, n, head, list) {
970 + efi_pstore_scan_sysfs_enter(entry, n, head);
971 +
972 + size = efi_pstore_read_func(entry, data);
973 + efi_pstore_scan_sysfs_exit(entry, n, head, size < 0);
974 + if (size)
975 + break;
976 + }
977 + *pos = n;
978 + return size;
979 + }
980 +
981 + list_for_each_entry_safe_from((*pos), n, head, list) {
982 + efi_pstore_scan_sysfs_enter((*pos), n, head);
983 +
984 + size = efi_pstore_read_func((*pos), data);
985 + efi_pstore_scan_sysfs_exit((*pos), n, head, size < 0);
986 + if (size)
987 + break;
988 + }
989 + *pos = n;
990 + return size;
991 +}
992 +
993 +/**
994 + * efi_pstore_read
995 + *
996 + * This function returns a size of NVRAM entry logged via efi_pstore_write().
997 + * The meaning and behavior of efi_pstore/pstore are as below.
998 + *
999 + * size > 0: Got data of an entry logged via efi_pstore_write() successfully,
1000 + * and pstore filesystem will continue reading subsequent entries.
1001 + * size == 0: Entry was not logged via efi_pstore_write(),
1002 + * and efi_pstore driver will continue reading subsequent entries.
1003 + * size < 0: Failed to get data of entry logging via efi_pstore_write(),
1004 + * and pstore will stop reading entry.
1005 + */
1006 static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
1007 int *count, struct timespec *timespec,
1008 char **buf, bool *compressed,
1009 struct pstore_info *psi)
1010 {
1011 struct pstore_read_data data;
1012 + ssize_t size;
1013
1014 data.id = id;
1015 data.type = type;
1016 @@ -112,8 +222,17 @@ static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
1017 data.compressed = compressed;
1018 data.buf = buf;
1019
1020 - return __efivar_entry_iter(efi_pstore_read_func, &efivar_sysfs_list, &data,
1021 - (struct efivar_entry **)&psi->data);
1022 + *data.buf = kzalloc(EFIVARS_DATA_SIZE_MAX, GFP_KERNEL);
1023 + if (!*data.buf)
1024 + return -ENOMEM;
1025 +
1026 + efivar_entry_iter_begin();
1027 + size = efi_pstore_sysfs_entry_iter(&data,
1028 + (struct efivar_entry **)&psi->data);
1029 + efivar_entry_iter_end();
1030 + if (size <= 0)
1031 + kfree(*data.buf);
1032 + return size;
1033 }
1034
1035 static int efi_pstore_write(enum pstore_type_id type,
1036 @@ -184,9 +303,17 @@ static int efi_pstore_erase_func(struct efivar_entry *entry, void *data)
1037 return 0;
1038 }
1039
1040 + if (entry->scanning) {
1041 + /*
1042 + * Skip deletion because this entry will be deleted
1043 + * after scanning is completed.
1044 + */
1045 + entry->deleting = true;
1046 + } else
1047 + list_del(&entry->list);
1048 +
1049 /* found */
1050 __efivar_entry_delete(entry);
1051 - list_del(&entry->list);
1052
1053 return 1;
1054 }
1055 @@ -199,14 +326,16 @@ static int efi_pstore_erase(enum pstore_type_id type, u64 id, int count,
1056 char name[DUMP_NAME_LEN];
1057 efi_char16_t efi_name[DUMP_NAME_LEN];
1058 int found, i;
1059 + unsigned int part;
1060
1061 - sprintf(name, "dump-type%u-%u-%d-%lu", type, (unsigned int)id, count,
1062 - time.tv_sec);
1063 + do_div(id, 1000);
1064 + part = do_div(id, 100);
1065 + sprintf(name, "dump-type%u-%u-%d-%lu", type, part, count, time.tv_sec);
1066
1067 for (i = 0; i < DUMP_NAME_LEN; i++)
1068 efi_name[i] = name[i];
1069
1070 - edata.id = id;
1071 + edata.id = part;
1072 edata.type = type;
1073 edata.count = count;
1074 edata.time = time;
1075 @@ -214,10 +343,12 @@ static int efi_pstore_erase(enum pstore_type_id type, u64 id, int count,
1076
1077 efivar_entry_iter_begin();
1078 found = __efivar_entry_iter(efi_pstore_erase_func, &efivar_sysfs_list, &edata, &entry);
1079 - efivar_entry_iter_end();
1080
1081 - if (found)
1082 + if (found && !entry->scanning) {
1083 + efivar_entry_iter_end();
1084 efivar_unregister(entry);
1085 + } else
1086 + efivar_entry_iter_end();
1087
1088 return 0;
1089 }
1090 diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
1091 index 8a7432a4b413..8c5a61ae03ea 100644
1092 --- a/drivers/firmware/efi/efivars.c
1093 +++ b/drivers/firmware/efi/efivars.c
1094 @@ -383,12 +383,16 @@ static ssize_t efivar_delete(struct file *filp, struct kobject *kobj,
1095 else if (__efivar_entry_delete(entry))
1096 err = -EIO;
1097
1098 - efivar_entry_iter_end();
1099 -
1100 - if (err)
1101 + if (err) {
1102 + efivar_entry_iter_end();
1103 return err;
1104 + }
1105
1106 - efivar_unregister(entry);
1107 + if (!entry->scanning) {
1108 + efivar_entry_iter_end();
1109 + efivar_unregister(entry);
1110 + } else
1111 + efivar_entry_iter_end();
1112
1113 /* It's dead Jim.... */
1114 return count;
1115 diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c
1116 index 391c67b182d9..b22659cccca4 100644
1117 --- a/drivers/firmware/efi/vars.c
1118 +++ b/drivers/firmware/efi/vars.c
1119 @@ -683,8 +683,16 @@ struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid,
1120 if (!found)
1121 return NULL;
1122
1123 - if (remove)
1124 - list_del(&entry->list);
1125 + if (remove) {
1126 + if (entry->scanning) {
1127 + /*
1128 + * The entry will be deleted
1129 + * after scanning is completed.
1130 + */
1131 + entry->deleting = true;
1132 + } else
1133 + list_del(&entry->list);
1134 + }
1135
1136 return entry;
1137 }
1138 diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
1139 index a0b33a216d4a..2aa3ca215bd6 100644
1140 --- a/drivers/gpio/gpio-mpc8xxx.c
1141 +++ b/drivers/gpio/gpio-mpc8xxx.c
1142 @@ -69,10 +69,14 @@ static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1143 u32 val;
1144 struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc);
1145 struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm);
1146 + u32 out_mask, out_shadow;
1147
1148 - val = in_be32(mm->regs + GPIO_DAT) & ~in_be32(mm->regs + GPIO_DIR);
1149 + out_mask = in_be32(mm->regs + GPIO_DIR);
1150
1151 - return (val | mpc8xxx_gc->data) & mpc8xxx_gpio2mask(gpio);
1152 + val = in_be32(mm->regs + GPIO_DAT) & ~out_mask;
1153 + out_shadow = mpc8xxx_gc->data & out_mask;
1154 +
1155 + return (val | out_shadow) & mpc8xxx_gpio2mask(gpio);
1156 }
1157
1158 static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1159 diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
1160 index 38b523a1ece0..a11ff74a5127 100644
1161 --- a/drivers/input/Kconfig
1162 +++ b/drivers/input/Kconfig
1163 @@ -80,7 +80,7 @@ config INPUT_MATRIXKMAP
1164 comment "Userland interfaces"
1165
1166 config INPUT_MOUSEDEV
1167 - tristate "Mouse interface" if EXPERT
1168 + tristate "Mouse interface"
1169 default y
1170 help
1171 Say Y here if you want your mouse to be accessible as char devices
1172 diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
1173 index c1edd39bc5ba..1fa37e6d004e 100644
1174 --- a/drivers/input/keyboard/Kconfig
1175 +++ b/drivers/input/keyboard/Kconfig
1176 @@ -2,7 +2,7 @@
1177 # Input core configuration
1178 #
1179 menuconfig INPUT_KEYBOARD
1180 - bool "Keyboards" if EXPERT || !X86
1181 + bool "Keyboards"
1182 default y
1183 help
1184 Say Y here, and a list of supported keyboards will be displayed.
1185 @@ -67,7 +67,7 @@ config KEYBOARD_ATARI
1186 module will be called atakbd.
1187
1188 config KEYBOARD_ATKBD
1189 - tristate "AT keyboard" if EXPERT || !X86
1190 + tristate "AT keyboard"
1191 default y
1192 select SERIO
1193 select SERIO_LIBPS2
1194 diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
1195 index 33b3e88fe4a2..f6578647e550 100644
1196 --- a/drivers/input/serio/Kconfig
1197 +++ b/drivers/input/serio/Kconfig
1198 @@ -2,7 +2,7 @@
1199 # Input core configuration
1200 #
1201 config SERIO
1202 - tristate "Serial I/O support" if EXPERT || !X86
1203 + tristate "Serial I/O support"
1204 default y
1205 help
1206 Say Yes here if you have any input device that uses serial I/O to
1207 @@ -19,7 +19,7 @@ config SERIO
1208 if SERIO
1209
1210 config SERIO_I8042
1211 - tristate "i8042 PC Keyboard controller" if EXPERT || !X86
1212 + tristate "i8042 PC Keyboard controller"
1213 default y
1214 depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && \
1215 (!SUPERH || SH_CAYMAN) && !M68K && !BLACKFIN && !S390 && \
1216 @@ -170,7 +170,7 @@ config SERIO_MACEPS2
1217 module will be called maceps2.
1218
1219 config SERIO_LIBPS2
1220 - tristate "PS/2 driver library" if EXPERT
1221 + tristate "PS/2 driver library"
1222 depends on SERIO_I8042 || SERIO_I8042=n
1223 help
1224 Say Y here if you are using a driver for device connected
1225 diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
1226 index 0e8df41aaf14..2cf2bbc0b927 100644
1227 --- a/drivers/misc/enclosure.c
1228 +++ b/drivers/misc/enclosure.c
1229 @@ -198,6 +198,13 @@ static void enclosure_remove_links(struct enclosure_component *cdev)
1230 {
1231 char name[ENCLOSURE_NAME_SIZE];
1232
1233 + /*
1234 + * In odd circumstances, like multipath devices, something else may
1235 + * already have removed the links, so check for this condition first.
1236 + */
1237 + if (!cdev->dev->kobj.sd)
1238 + return;
1239 +
1240 enclosure_link_name(cdev, name);
1241 sysfs_remove_link(&cdev->dev->kobj, name);
1242 sysfs_remove_link(&cdev->cdev.kobj, "device");
1243 diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
1244 index 6a203b6e8346..66f411a6e8ea 100644
1245 --- a/drivers/misc/mei/hw-me-regs.h
1246 +++ b/drivers/misc/mei/hw-me-regs.h
1247 @@ -109,8 +109,12 @@
1248 #define MEI_DEV_ID_PPT_2 0x1CBA /* Panther Point */
1249 #define MEI_DEV_ID_PPT_3 0x1DBA /* Panther Point */
1250
1251 -#define MEI_DEV_ID_LPT 0x8C3A /* Lynx Point */
1252 +#define MEI_DEV_ID_LPT_H 0x8C3A /* Lynx Point H */
1253 +#define MEI_DEV_ID_LPT_W 0x8D3A /* Lynx Point - Wellsburg */
1254 #define MEI_DEV_ID_LPT_LP 0x9C3A /* Lynx Point LP */
1255 +#define MEI_DEV_ID_LPT_HR 0x8CBA /* Lynx Point H Refresh */
1256 +
1257 +#define MEI_DEV_ID_WPT_LP 0x9CBA /* Wildcat Point LP */
1258 /*
1259 * MEI HW Section
1260 */
1261 diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
1262 index 1b3844e82379..e637318b79ba 100644
1263 --- a/drivers/misc/mei/pci-me.c
1264 +++ b/drivers/misc/mei/pci-me.c
1265 @@ -76,8 +76,11 @@ static DEFINE_PCI_DEVICE_TABLE(mei_me_pci_tbl) = {
1266 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_1)},
1267 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_2)},
1268 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_3)},
1269 - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT)},
1270 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_H)},
1271 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_W)},
1272 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_LP)},
1273 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_HR)},
1274 + {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_WPT_LP)},
1275
1276 /* required last entry */
1277 {0, }
1278 diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
1279 index e3fc07cf2f62..e59c42b446a9 100644
1280 --- a/drivers/net/can/c_can/c_can.c
1281 +++ b/drivers/net/can/c_can/c_can.c
1282 @@ -712,22 +712,31 @@ static int c_can_set_mode(struct net_device *dev, enum can_mode mode)
1283 return 0;
1284 }
1285
1286 -static int c_can_get_berr_counter(const struct net_device *dev,
1287 - struct can_berr_counter *bec)
1288 +static int __c_can_get_berr_counter(const struct net_device *dev,
1289 + struct can_berr_counter *bec)
1290 {
1291 unsigned int reg_err_counter;
1292 struct c_can_priv *priv = netdev_priv(dev);
1293
1294 - c_can_pm_runtime_get_sync(priv);
1295 -
1296 reg_err_counter = priv->read_reg(priv, C_CAN_ERR_CNT_REG);
1297 bec->rxerr = (reg_err_counter & ERR_CNT_REC_MASK) >>
1298 ERR_CNT_REC_SHIFT;
1299 bec->txerr = reg_err_counter & ERR_CNT_TEC_MASK;
1300
1301 + return 0;
1302 +}
1303 +
1304 +static int c_can_get_berr_counter(const struct net_device *dev,
1305 + struct can_berr_counter *bec)
1306 +{
1307 + struct c_can_priv *priv = netdev_priv(dev);
1308 + int err;
1309 +
1310 + c_can_pm_runtime_get_sync(priv);
1311 + err = __c_can_get_berr_counter(dev, bec);
1312 c_can_pm_runtime_put_sync(priv);
1313
1314 - return 0;
1315 + return err;
1316 }
1317
1318 /*
1319 @@ -872,7 +881,7 @@ static int c_can_handle_state_change(struct net_device *dev,
1320 if (unlikely(!skb))
1321 return 0;
1322
1323 - c_can_get_berr_counter(dev, &bec);
1324 + __c_can_get_berr_counter(dev, &bec);
1325 reg_err_counter = priv->read_reg(priv, C_CAN_ERR_CNT_REG);
1326 rx_err_passive = (reg_err_counter & ERR_CNT_RP_MASK) >>
1327 ERR_CNT_RP_SHIFT;
1328 diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
1329 index 8f5ce747feb5..c1c3b132fed5 100644
1330 --- a/drivers/net/can/flexcan.c
1331 +++ b/drivers/net/can/flexcan.c
1332 @@ -1020,13 +1020,13 @@ static int flexcan_probe(struct platform_device *pdev)
1333 dev_err(&pdev->dev, "no ipg clock defined\n");
1334 return PTR_ERR(clk_ipg);
1335 }
1336 - clock_freq = clk_get_rate(clk_ipg);
1337
1338 clk_per = devm_clk_get(&pdev->dev, "per");
1339 if (IS_ERR(clk_per)) {
1340 dev_err(&pdev->dev, "no per clock defined\n");
1341 return PTR_ERR(clk_per);
1342 }
1343 + clock_freq = clk_get_rate(clk_per);
1344 }
1345
1346 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1347 diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
1348 index 7164a999f50f..f17c3018b7c7 100644
1349 --- a/drivers/net/can/sja1000/sja1000.c
1350 +++ b/drivers/net/can/sja1000/sja1000.c
1351 @@ -494,20 +494,20 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
1352 uint8_t isrc, status;
1353 int n = 0;
1354
1355 - /* Shared interrupts and IRQ off? */
1356 - if (priv->read_reg(priv, SJA1000_IER) == IRQ_OFF)
1357 - return IRQ_NONE;
1358 -
1359 if (priv->pre_irq)
1360 priv->pre_irq(priv);
1361
1362 + /* Shared interrupts and IRQ off? */
1363 + if (priv->read_reg(priv, SJA1000_IER) == IRQ_OFF)
1364 + goto out;
1365 +
1366 while ((isrc = priv->read_reg(priv, SJA1000_IR)) &&
1367 (n < SJA1000_MAX_IRQ)) {
1368 - n++;
1369 +
1370 status = priv->read_reg(priv, SJA1000_SR);
1371 /* check for absent controller due to hw unplug */
1372 if (status == 0xFF && sja1000_is_absent(priv))
1373 - return IRQ_NONE;
1374 + goto out;
1375
1376 if (isrc & IRQ_WUI)
1377 netdev_warn(dev, "wakeup interrupt\n");
1378 @@ -535,7 +535,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
1379 status = priv->read_reg(priv, SJA1000_SR);
1380 /* check for absent controller */
1381 if (status == 0xFF && sja1000_is_absent(priv))
1382 - return IRQ_NONE;
1383 + goto out;
1384 }
1385 }
1386 if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) {
1387 @@ -543,8 +543,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
1388 if (sja1000_err(dev, isrc, status))
1389 break;
1390 }
1391 + n++;
1392 }
1393 -
1394 +out:
1395 if (priv->post_irq)
1396 priv->post_irq(priv);
1397
1398 diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
1399 index 12d961c4ebca..cd76d2a6e014 100644
1400 --- a/drivers/net/ethernet/broadcom/tg3.c
1401 +++ b/drivers/net/ethernet/broadcom/tg3.c
1402 @@ -6848,12 +6848,6 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
1403 pci_unmap_single(tp->pdev, dma_addr, skb_size,
1404 PCI_DMA_FROMDEVICE);
1405
1406 - skb = build_skb(data, frag_size);
1407 - if (!skb) {
1408 - tg3_frag_free(frag_size != 0, data);
1409 - goto drop_it_no_recycle;
1410 - }
1411 - skb_reserve(skb, TG3_RX_OFFSET(tp));
1412 /* Ensure that the update to the data happens
1413 * after the usage of the old DMA mapping.
1414 */
1415 @@ -6861,6 +6855,12 @@ static int tg3_rx(struct tg3_napi *tnapi, int budget)
1416
1417 ri->data = NULL;
1418
1419 + skb = build_skb(data, frag_size);
1420 + if (!skb) {
1421 + tg3_frag_free(frag_size != 0, data);
1422 + goto drop_it_no_recycle;
1423 + }
1424 + skb_reserve(skb, TG3_RX_OFFSET(tp));
1425 } else {
1426 tg3_recycle_rx(tnapi, tpr, opaque_key,
1427 desc_idx, *post_ptr);
1428 diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
1429 index da442b81370a..1fef5240e6ad 100644
1430 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c
1431 +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
1432 @@ -433,27 +433,19 @@ int iwlagn_tx_skb(struct iwl_priv *priv,
1433 /* Copy MAC header from skb into command buffer */
1434 memcpy(tx_cmd->hdr, hdr, hdr_len);
1435
1436 + txq_id = info->hw_queue;
1437 +
1438 if (is_agg)
1439 txq_id = priv->tid_data[sta_id][tid].agg.txq_id;
1440 else if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) {
1441 /*
1442 - * Send this frame after DTIM -- there's a special queue
1443 - * reserved for this for contexts that support AP mode.
1444 - */
1445 - txq_id = ctx->mcast_queue;
1446 -
1447 - /*
1448 * The microcode will clear the more data
1449 * bit in the last frame it transmits.
1450 */
1451 hdr->frame_control |=
1452 cpu_to_le16(IEEE80211_FCTL_MOREDATA);
1453 - } else if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
1454 - txq_id = IWL_AUX_QUEUE;
1455 - else
1456 - txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)];
1457 + }
1458
1459 - WARN_ON_ONCE(!is_agg && txq_id != info->hw_queue);
1460 WARN_ON_ONCE(is_agg &&
1461 priv->queue_to_mac80211[txq_id] != info->hw_queue);
1462
1463 diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
1464 index a39ee38a9414..2bd5c5f7db08 100644
1465 --- a/drivers/pnp/driver.c
1466 +++ b/drivers/pnp/driver.c
1467 @@ -197,6 +197,11 @@ static int pnp_bus_freeze(struct device *dev)
1468 return __pnp_bus_suspend(dev, PMSG_FREEZE);
1469 }
1470
1471 +static int pnp_bus_poweroff(struct device *dev)
1472 +{
1473 + return __pnp_bus_suspend(dev, PMSG_HIBERNATE);
1474 +}
1475 +
1476 static int pnp_bus_resume(struct device *dev)
1477 {
1478 struct pnp_dev *pnp_dev = to_pnp_dev(dev);
1479 @@ -234,9 +239,14 @@ static int pnp_bus_resume(struct device *dev)
1480 }
1481
1482 static const struct dev_pm_ops pnp_bus_dev_pm_ops = {
1483 + /* Suspend callbacks */
1484 .suspend = pnp_bus_suspend,
1485 - .freeze = pnp_bus_freeze,
1486 .resume = pnp_bus_resume,
1487 + /* Hibernate callbacks */
1488 + .freeze = pnp_bus_freeze,
1489 + .thaw = pnp_bus_resume,
1490 + .poweroff = pnp_bus_poweroff,
1491 + .restore = pnp_bus_resume,
1492 };
1493
1494 struct bus_type pnp_bus_type = {
1495 diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
1496 index 5e1e12c0cf42..0a7325361d29 100644
1497 --- a/drivers/scsi/3w-9xxx.c
1498 +++ b/drivers/scsi/3w-9xxx.c
1499 @@ -2025,7 +2025,8 @@ static struct scsi_host_template driver_template = {
1500 .cmd_per_lun = TW_MAX_CMDS_PER_LUN,
1501 .use_clustering = ENABLE_CLUSTERING,
1502 .shost_attrs = twa_host_attrs,
1503 - .emulated = 1
1504 + .emulated = 1,
1505 + .no_write_same = 1,
1506 };
1507
1508 /* This function will probe and initialize a card */
1509 diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
1510 index c845bdbeb6c0..4de346017e9f 100644
1511 --- a/drivers/scsi/3w-sas.c
1512 +++ b/drivers/scsi/3w-sas.c
1513 @@ -1600,7 +1600,8 @@ static struct scsi_host_template driver_template = {
1514 .cmd_per_lun = TW_MAX_CMDS_PER_LUN,
1515 .use_clustering = ENABLE_CLUSTERING,
1516 .shost_attrs = twl_host_attrs,
1517 - .emulated = 1
1518 + .emulated = 1,
1519 + .no_write_same = 1,
1520 };
1521
1522 /* This function will probe and initialize a card */
1523 diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
1524 index b9276d10b25c..752624e6bc00 100644
1525 --- a/drivers/scsi/3w-xxxx.c
1526 +++ b/drivers/scsi/3w-xxxx.c
1527 @@ -2279,7 +2279,8 @@ static struct scsi_host_template driver_template = {
1528 .cmd_per_lun = TW_MAX_CMDS_PER_LUN,
1529 .use_clustering = ENABLE_CLUSTERING,
1530 .shost_attrs = tw_host_attrs,
1531 - .emulated = 1
1532 + .emulated = 1,
1533 + .no_write_same = 1,
1534 };
1535
1536 /* This function will probe and initialize a card */
1537 diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
1538 index f0d432c139d0..4921ed19a027 100644
1539 --- a/drivers/scsi/aacraid/linit.c
1540 +++ b/drivers/scsi/aacraid/linit.c
1541 @@ -1081,6 +1081,7 @@ static struct scsi_host_template aac_driver_template = {
1542 #endif
1543 .use_clustering = ENABLE_CLUSTERING,
1544 .emulated = 1,
1545 + .no_write_same = 1,
1546 };
1547
1548 static void __aac_shutdown(struct aac_dev * aac)
1549 diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
1550 index 33c52bc2c7b4..278c9fa62067 100644
1551 --- a/drivers/scsi/arcmsr/arcmsr_hba.c
1552 +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
1553 @@ -137,6 +137,7 @@ static struct scsi_host_template arcmsr_scsi_host_template = {
1554 .cmd_per_lun = ARCMSR_MAX_CMD_PERLUN,
1555 .use_clustering = ENABLE_CLUSTERING,
1556 .shost_attrs = arcmsr_host_attrs,
1557 + .no_write_same = 1,
1558 };
1559 static struct pci_device_id arcmsr_device_id_table[] = {
1560 {PCI_DEVICE(PCI_VENDOR_ID_ARECA, PCI_DEVICE_ID_ARECA_1110)},
1561 diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h
1562 index 94d5d0102f7d..42bcb970445a 100644
1563 --- a/drivers/scsi/bfa/bfa_fcs.h
1564 +++ b/drivers/scsi/bfa/bfa_fcs.h
1565 @@ -296,6 +296,7 @@ wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn,
1566 struct bfa_fcs_lport_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs,
1567 u16 vf_id, wwn_t lpwwn);
1568
1569 +void bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, char *symname);
1570 void bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
1571 struct bfa_lport_info_s *port_info);
1572 void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port,
1573 diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
1574 index 2f61a5af3658..f5e4e61a0fd7 100644
1575 --- a/drivers/scsi/bfa/bfa_fcs_lport.c
1576 +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
1577 @@ -1097,6 +1097,17 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport,
1578 bfa_sm_send_event(lport, BFA_FCS_PORT_SM_CREATE);
1579 }
1580
1581 +void
1582 +bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port,
1583 + char *symname)
1584 +{
1585 + strcpy(port->port_cfg.sym_name.symname, symname);
1586 +
1587 + if (bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
1588 + bfa_fcs_lport_ns_util_send_rspn_id(
1589 + BFA_FCS_GET_NS_FROM_PORT(port), NULL);
1590 +}
1591 +
1592 /*
1593 * fcs_lport_api
1594 */
1595 @@ -5140,9 +5151,6 @@ bfa_fcs_lport_ns_util_send_rspn_id(void *cbarg, struct bfa_fcxp_s *fcxp_alloced)
1596 u8 *psymbl = &symbl[0];
1597 int len;
1598
1599 - if (!bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
1600 - return;
1601 -
1602 /* Avoid sending RSPN in the following states. */
1603 if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_offline) ||
1604 bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_sending) ||
1605 diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c
1606 index e9a681d31223..40be670a1cbc 100644
1607 --- a/drivers/scsi/bfa/bfad_attr.c
1608 +++ b/drivers/scsi/bfa/bfad_attr.c
1609 @@ -593,11 +593,8 @@ bfad_im_vport_set_symbolic_name(struct fc_vport *fc_vport)
1610 return;
1611
1612 spin_lock_irqsave(&bfad->bfad_lock, flags);
1613 - if (strlen(sym_name) > 0) {
1614 - strcpy(fcs_vport->lport.port_cfg.sym_name.symname, sym_name);
1615 - bfa_fcs_lport_ns_util_send_rspn_id(
1616 - BFA_FCS_GET_NS_FROM_PORT((&fcs_vport->lport)), NULL);
1617 - }
1618 + if (strlen(sym_name) > 0)
1619 + bfa_fcs_lport_set_symname(&fcs_vport->lport, sym_name);
1620 spin_unlock_irqrestore(&bfad->bfad_lock, flags);
1621 }
1622
1623 diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
1624 index 6d55b4e7e792..aec3d4da276f 100644
1625 --- a/drivers/scsi/gdth.c
1626 +++ b/drivers/scsi/gdth.c
1627 @@ -4686,6 +4686,7 @@ static struct scsi_host_template gdth_template = {
1628 .cmd_per_lun = GDTH_MAXC_P_L,
1629 .unchecked_isa_dma = 1,
1630 .use_clustering = ENABLE_CLUSTERING,
1631 + .no_write_same = 1,
1632 };
1633
1634 #ifdef CONFIG_ISA
1635 diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
1636 index df0c3c71ea43..3cafe0d784b8 100644
1637 --- a/drivers/scsi/hosts.c
1638 +++ b/drivers/scsi/hosts.c
1639 @@ -388,6 +388,7 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
1640 shost->unchecked_isa_dma = sht->unchecked_isa_dma;
1641 shost->use_clustering = sht->use_clustering;
1642 shost->ordered_tag = sht->ordered_tag;
1643 + shost->no_write_same = sht->no_write_same;
1644
1645 if (sht->supported_mode == MODE_UNKNOWN)
1646 /* means we didn't set it ... default to INITIATOR */
1647 diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
1648 index 891c86b66253..0eb09403680c 100644
1649 --- a/drivers/scsi/hpsa.c
1650 +++ b/drivers/scsi/hpsa.c
1651 @@ -562,6 +562,7 @@ static struct scsi_host_template hpsa_driver_template = {
1652 .sdev_attrs = hpsa_sdev_attrs,
1653 .shost_attrs = hpsa_shost_attrs,
1654 .max_sectors = 8192,
1655 + .no_write_same = 1,
1656 };
1657
1658
1659 @@ -1289,7 +1290,7 @@ static void complete_scsi_command(struct CommandList *cp)
1660 "has check condition: aborted command: "
1661 "ASC: 0x%x, ASCQ: 0x%x\n",
1662 cp, asc, ascq);
1663 - cmd->result = DID_SOFT_ERROR << 16;
1664 + cmd->result |= DID_SOFT_ERROR << 16;
1665 break;
1666 }
1667 /* Must be some other type of check condition */
1668 @@ -4926,7 +4927,7 @@ reinit_after_soft_reset:
1669 hpsa_hba_inquiry(h);
1670 hpsa_register_scsi(h); /* hook ourselves into SCSI subsystem */
1671 start_controller_lockup_detector(h);
1672 - return 1;
1673 + return 0;
1674
1675 clean4:
1676 hpsa_free_sg_chain_blocks(h);
1677 diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
1678 index 36ac1c34ce97..573f4128b6b6 100644
1679 --- a/drivers/scsi/ipr.c
1680 +++ b/drivers/scsi/ipr.c
1681 @@ -6305,7 +6305,8 @@ static struct scsi_host_template driver_template = {
1682 .use_clustering = ENABLE_CLUSTERING,
1683 .shost_attrs = ipr_ioa_attrs,
1684 .sdev_attrs = ipr_dev_attrs,
1685 - .proc_name = IPR_NAME
1686 + .proc_name = IPR_NAME,
1687 + .no_write_same = 1,
1688 };
1689
1690 /**
1691 diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
1692 index 8d5ea8a1e5a6..52a216f21ae5 100644
1693 --- a/drivers/scsi/ips.c
1694 +++ b/drivers/scsi/ips.c
1695 @@ -374,6 +374,7 @@ static struct scsi_host_template ips_driver_template = {
1696 .sg_tablesize = IPS_MAX_SG,
1697 .cmd_per_lun = 3,
1698 .use_clustering = ENABLE_CLUSTERING,
1699 + .no_write_same = 1,
1700 };
1701
1702
1703 diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
1704 index 161c98efade9..d2895836f9fa 100644
1705 --- a/drivers/scsi/libsas/sas_ata.c
1706 +++ b/drivers/scsi/libsas/sas_ata.c
1707 @@ -211,7 +211,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
1708 qc->tf.nsect = 0;
1709 }
1710
1711 - ata_tf_to_fis(&qc->tf, 1, 0, (u8*)&task->ata_task.fis);
1712 + ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *)&task->ata_task.fis);
1713 task->uldd_task = qc;
1714 if (ata_is_atapi(qc->tf.protocol)) {
1715 memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len);
1716 diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
1717 index 90c95a3385d1..816db12ef5d5 100644
1718 --- a/drivers/scsi/megaraid.c
1719 +++ b/drivers/scsi/megaraid.c
1720 @@ -4244,6 +4244,7 @@ static struct scsi_host_template megaraid_template = {
1721 .eh_device_reset_handler = megaraid_reset,
1722 .eh_bus_reset_handler = megaraid_reset,
1723 .eh_host_reset_handler = megaraid_reset,
1724 + .no_write_same = 1,
1725 };
1726
1727 static int
1728 diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
1729 index 515c9629e9fe..8844d5c179af 100644
1730 --- a/drivers/scsi/megaraid/megaraid_mbox.c
1731 +++ b/drivers/scsi/megaraid/megaraid_mbox.c
1732 @@ -367,6 +367,7 @@ static struct scsi_host_template megaraid_template_g = {
1733 .eh_host_reset_handler = megaraid_reset_handler,
1734 .change_queue_depth = megaraid_change_queue_depth,
1735 .use_clustering = ENABLE_CLUSTERING,
1736 + .no_write_same = 1,
1737 .sdev_attrs = megaraid_sdev_attrs,
1738 .shost_attrs = megaraid_shost_attrs,
1739 };
1740 diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
1741 index 3020921a4746..a59a5526a318 100644
1742 --- a/drivers/scsi/megaraid/megaraid_sas_base.c
1743 +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
1744 @@ -2148,6 +2148,7 @@ static struct scsi_host_template megasas_template = {
1745 .bios_param = megasas_bios_param,
1746 .use_clustering = ENABLE_CLUSTERING,
1747 .change_queue_depth = megasas_change_queue_depth,
1748 + .no_write_same = 1,
1749 };
1750
1751 /**
1752 diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
1753 index 1eb7b0280a45..a38f71bbe7b6 100644
1754 --- a/drivers/scsi/pmcraid.c
1755 +++ b/drivers/scsi/pmcraid.c
1756 @@ -4314,6 +4314,7 @@ static struct scsi_host_template pmcraid_host_template = {
1757 .this_id = -1,
1758 .sg_tablesize = PMCRAID_MAX_IOADLS,
1759 .max_sectors = PMCRAID_IOA_MAX_SECTORS,
1760 + .no_write_same = 1,
1761 .cmd_per_lun = PMCRAID_MAX_CMD_PER_LUN,
1762 .use_clustering = ENABLE_CLUSTERING,
1763 .shost_attrs = pmcraid_host_attrs,
1764 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
1765 index 5693f6d7eddb..2634d691ec17 100644
1766 --- a/drivers/scsi/sd.c
1767 +++ b/drivers/scsi/sd.c
1768 @@ -2638,6 +2638,12 @@ static void sd_read_write_same(struct scsi_disk *sdkp, unsigned char *buffer)
1769 {
1770 struct scsi_device *sdev = sdkp->device;
1771
1772 + if (sdev->host->no_write_same) {
1773 + sdev->no_write_same = 1;
1774 +
1775 + return;
1776 + }
1777 +
1778 if (scsi_report_opcode(sdev, buffer, SD_BUF_SIZE, INQUIRY) < 0) {
1779 sdev->no_report_opcodes = 1;
1780
1781 diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
1782 index 1a28f5632797..17d740427240 100644
1783 --- a/drivers/scsi/storvsc_drv.c
1784 +++ b/drivers/scsi/storvsc_drv.c
1785 @@ -1697,6 +1697,7 @@ static struct scsi_host_template scsi_driver = {
1786 .use_clustering = DISABLE_CLUSTERING,
1787 /* Make sure we dont get a sg segment crosses a page boundary */
1788 .dma_boundary = PAGE_SIZE-1,
1789 + .no_write_same = 1,
1790 };
1791
1792 enum {
1793 diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
1794 index c1a50674c1e3..28361f7783cd 100644
1795 --- a/drivers/spi/spi-pxa2xx.c
1796 +++ b/drivers/spi/spi-pxa2xx.c
1797 @@ -1077,6 +1077,8 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
1798 static struct acpi_device_id pxa2xx_spi_acpi_match[] = {
1799 { "INT33C0", 0 },
1800 { "INT33C1", 0 },
1801 + { "INT3430", 0 },
1802 + { "INT3431", 0 },
1803 { "80860F0E", 0 },
1804 { },
1805 };
1806 diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
1807 index ff582933e94c..4d6f430087d0 100644
1808 --- a/drivers/tty/n_tty.c
1809 +++ b/drivers/tty/n_tty.c
1810 @@ -810,7 +810,8 @@ static void process_echoes(struct tty_struct *tty)
1811 struct n_tty_data *ldata = tty->disc_data;
1812 size_t echoed;
1813
1814 - if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_tail)
1815 + if ((!L_ECHO(tty) && !L_ECHONL(tty)) ||
1816 + ldata->echo_commit == ldata->echo_tail)
1817 return;
1818
1819 mutex_lock(&ldata->output_lock);
1820 @@ -825,7 +826,8 @@ static void flush_echoes(struct tty_struct *tty)
1821 {
1822 struct n_tty_data *ldata = tty->disc_data;
1823
1824 - if (!L_ECHO(tty) || ldata->echo_commit == ldata->echo_head)
1825 + if ((!L_ECHO(tty) && !L_ECHONL(tty)) ||
1826 + ldata->echo_commit == ldata->echo_head)
1827 return;
1828
1829 mutex_lock(&ldata->output_lock);
1830 diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
1831 index 3e7560f004f8..e8404319ca68 100644
1832 --- a/drivers/usb/class/cdc-acm.c
1833 +++ b/drivers/usb/class/cdc-acm.c
1834 @@ -1515,6 +1515,8 @@ static int acm_reset_resume(struct usb_interface *intf)
1835
1836 static const struct usb_device_id acm_ids[] = {
1837 /* quirky and broken devices */
1838 + { USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */
1839 + .driver_info = NO_UNION_NORMAL, },/* has no union descriptor */
1840 { USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
1841 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
1842 },
1843 diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
1844 index b21d553c245b..dccb4db98ea1 100644
1845 --- a/drivers/usb/serial/ftdi_sio.c
1846 +++ b/drivers/usb/serial/ftdi_sio.c
1847 @@ -2115,6 +2115,20 @@ static void ftdi_set_termios(struct tty_struct *tty,
1848 termios->c_cflag |= CRTSCTS;
1849 }
1850
1851 + /*
1852 + * All FTDI UART chips are limited to CS7/8. We won't pretend to
1853 + * support CS5/6 and revert the CSIZE setting instead.
1854 + */
1855 + if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) {
1856 + dev_warn(ddev, "requested CSIZE setting not supported\n");
1857 +
1858 + termios->c_cflag &= ~CSIZE;
1859 + if (old_termios)
1860 + termios->c_cflag |= old_termios->c_cflag & CSIZE;
1861 + else
1862 + termios->c_cflag |= CS8;
1863 + }
1864 +
1865 cflag = termios->c_cflag;
1866
1867 if (!old_termios)
1868 @@ -2151,19 +2165,16 @@ no_skip:
1869 } else {
1870 urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE;
1871 }
1872 - if (cflag & CSIZE) {
1873 - switch (cflag & CSIZE) {
1874 - case CS7:
1875 - urb_value |= 7;
1876 - dev_dbg(ddev, "Setting CS7\n");
1877 - break;
1878 - case CS8:
1879 - urb_value |= 8;
1880 - dev_dbg(ddev, "Setting CS8\n");
1881 - break;
1882 - default:
1883 - dev_err(ddev, "CSIZE was set but not CS7-CS8\n");
1884 - }
1885 + switch (cflag & CSIZE) {
1886 + case CS7:
1887 + urb_value |= 7;
1888 + dev_dbg(ddev, "Setting CS7\n");
1889 + break;
1890 + default:
1891 + case CS8:
1892 + urb_value |= 8;
1893 + dev_dbg(ddev, "Setting CS8\n");
1894 + break;
1895 }
1896
1897 /* This is needed by the break command since it uses the same command
1898 diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
1899 index e5bdd987b9e8..a69da83604c0 100644
1900 --- a/drivers/usb/serial/mos7840.c
1901 +++ b/drivers/usb/serial/mos7840.c
1902 @@ -1813,25 +1813,25 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
1903 iflag = tty->termios.c_iflag;
1904
1905 /* Change the number of bits */
1906 - if (cflag & CSIZE) {
1907 - switch (cflag & CSIZE) {
1908 - case CS5:
1909 - lData = LCR_BITS_5;
1910 - break;
1911 + switch (cflag & CSIZE) {
1912 + case CS5:
1913 + lData = LCR_BITS_5;
1914 + break;
1915
1916 - case CS6:
1917 - lData = LCR_BITS_6;
1918 - break;
1919 + case CS6:
1920 + lData = LCR_BITS_6;
1921 + break;
1922
1923 - case CS7:
1924 - lData = LCR_BITS_7;
1925 - break;
1926 - default:
1927 - case CS8:
1928 - lData = LCR_BITS_8;
1929 - break;
1930 - }
1931 + case CS7:
1932 + lData = LCR_BITS_7;
1933 + break;
1934 +
1935 + default:
1936 + case CS8:
1937 + lData = LCR_BITS_8;
1938 + break;
1939 }
1940 +
1941 /* Change the Parity bit */
1942 if (cflag & PARENB) {
1943 if (cflag & PARODD) {
1944 diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
1945 index 1e6de4cd079d..1e3318dfa1cb 100644
1946 --- a/drivers/usb/serial/pl2303.c
1947 +++ b/drivers/usb/serial/pl2303.c
1948 @@ -361,23 +361,21 @@ static void pl2303_set_termios(struct tty_struct *tty,
1949 0, 0, buf, 7, 100);
1950 dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf);
1951
1952 - if (C_CSIZE(tty)) {
1953 - switch (C_CSIZE(tty)) {
1954 - case CS5:
1955 - buf[6] = 5;
1956 - break;
1957 - case CS6:
1958 - buf[6] = 6;
1959 - break;
1960 - case CS7:
1961 - buf[6] = 7;
1962 - break;
1963 - default:
1964 - case CS8:
1965 - buf[6] = 8;
1966 - }
1967 - dev_dbg(&port->dev, "data bits = %d\n", buf[6]);
1968 + switch (C_CSIZE(tty)) {
1969 + case CS5:
1970 + buf[6] = 5;
1971 + break;
1972 + case CS6:
1973 + buf[6] = 6;
1974 + break;
1975 + case CS7:
1976 + buf[6] = 7;
1977 + break;
1978 + default:
1979 + case CS8:
1980 + buf[6] = 8;
1981 }
1982 + dev_dbg(&port->dev, "data bits = %d\n", buf[6]);
1983
1984 /* For reference buf[0]:buf[3] baud rate value */
1985 pl2303_encode_baudrate(tty, port, &buf[0]);
1986 diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
1987 index 4abac28b5992..5b793c352267 100644
1988 --- a/drivers/usb/serial/spcp8x5.c
1989 +++ b/drivers/usb/serial/spcp8x5.c
1990 @@ -348,22 +348,20 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
1991 }
1992
1993 /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */
1994 - if (cflag & CSIZE) {
1995 - switch (cflag & CSIZE) {
1996 - case CS5:
1997 - buf[1] |= SET_UART_FORMAT_SIZE_5;
1998 - break;
1999 - case CS6:
2000 - buf[1] |= SET_UART_FORMAT_SIZE_6;
2001 - break;
2002 - case CS7:
2003 - buf[1] |= SET_UART_FORMAT_SIZE_7;
2004 - break;
2005 - default:
2006 - case CS8:
2007 - buf[1] |= SET_UART_FORMAT_SIZE_8;
2008 - break;
2009 - }
2010 + switch (cflag & CSIZE) {
2011 + case CS5:
2012 + buf[1] |= SET_UART_FORMAT_SIZE_5;
2013 + break;
2014 + case CS6:
2015 + buf[1] |= SET_UART_FORMAT_SIZE_6;
2016 + break;
2017 + case CS7:
2018 + buf[1] |= SET_UART_FORMAT_SIZE_7;
2019 + break;
2020 + default:
2021 + case CS8:
2022 + buf[1] |= SET_UART_FORMAT_SIZE_8;
2023 + break;
2024 }
2025
2026 /* Set Stop bit2 : 0:1bit 1:2bit */
2027 diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
2028 index e6d56f714ae4..d94f35dbd536 100644
2029 --- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
2030 +++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c
2031 @@ -526,6 +526,8 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
2032 struct omap_dss_device *in = ddata->in;
2033 int r;
2034
2035 + mutex_lock(&ddata->mutex);
2036 +
2037 dev_dbg(&ddata->spi->dev, "%s\n", __func__);
2038
2039 in->ops.sdi->set_timings(in, &ddata->videomode);
2040 @@ -614,10 +616,7 @@ static int acx565akm_enable(struct omap_dss_device *dssdev)
2041 if (omapdss_device_is_enabled(dssdev))
2042 return 0;
2043
2044 - mutex_lock(&ddata->mutex);
2045 r = acx565akm_panel_power_on(dssdev);
2046 - mutex_unlock(&ddata->mutex);
2047 -
2048 if (r)
2049 return r;
2050
2051 diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
2052 index c4d2298893b1..255e8287d99a 100644
2053 --- a/drivers/xen/grant-table.c
2054 +++ b/drivers/xen/grant-table.c
2055 @@ -921,9 +921,10 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops,
2056 ret = m2p_add_override(mfn, pages[i], kmap_ops ?
2057 &kmap_ops[i] : NULL);
2058 if (ret)
2059 - return ret;
2060 + goto out;
2061 }
2062
2063 + out:
2064 if (lazy)
2065 arch_leave_lazy_mmu_mode();
2066
2067 @@ -954,9 +955,10 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops,
2068 ret = m2p_remove_override(pages[i], kmap_ops ?
2069 &kmap_ops[i] : NULL);
2070 if (ret)
2071 - return ret;
2072 + goto out;
2073 }
2074
2075 + out:
2076 if (lazy)
2077 arch_leave_lazy_mmu_mode();
2078
2079 diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
2080 index 3b115653d422..9be8021c70d8 100644
2081 --- a/fs/nfs/nfs4proc.c
2082 +++ b/fs/nfs/nfs4proc.c
2083 @@ -4938,11 +4938,17 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
2084
2085 trace_nfs4_delegreturn_exit(&data->args, &data->res, task->tk_status);
2086 switch (task->tk_status) {
2087 - case -NFS4ERR_STALE_STATEID:
2088 - case -NFS4ERR_EXPIRED:
2089 case 0:
2090 renew_lease(data->res.server, data->timestamp);
2091 break;
2092 + case -NFS4ERR_ADMIN_REVOKED:
2093 + case -NFS4ERR_DELEG_REVOKED:
2094 + case -NFS4ERR_BAD_STATEID:
2095 + case -NFS4ERR_OLD_STATEID:
2096 + case -NFS4ERR_STALE_STATEID:
2097 + case -NFS4ERR_EXPIRED:
2098 + task->tk_status = 0;
2099 + break;
2100 default:
2101 if (nfs4_async_handle_error(task, data->res.server, NULL) ==
2102 -EAGAIN) {
2103 diff --git a/fs/pipe.c b/fs/pipe.c
2104 index d2c45e14e6d8..0e0752ef2715 100644
2105 --- a/fs/pipe.c
2106 +++ b/fs/pipe.c
2107 @@ -726,11 +726,25 @@ pipe_poll(struct file *filp, poll_table *wait)
2108 return mask;
2109 }
2110
2111 +static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe)
2112 +{
2113 + int kill = 0;
2114 +
2115 + spin_lock(&inode->i_lock);
2116 + if (!--pipe->files) {
2117 + inode->i_pipe = NULL;
2118 + kill = 1;
2119 + }
2120 + spin_unlock(&inode->i_lock);
2121 +
2122 + if (kill)
2123 + free_pipe_info(pipe);
2124 +}
2125 +
2126 static int
2127 pipe_release(struct inode *inode, struct file *file)
2128 {
2129 - struct pipe_inode_info *pipe = inode->i_pipe;
2130 - int kill = 0;
2131 + struct pipe_inode_info *pipe = file->private_data;
2132
2133 __pipe_lock(pipe);
2134 if (file->f_mode & FMODE_READ)
2135 @@ -743,17 +757,9 @@ pipe_release(struct inode *inode, struct file *file)
2136 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
2137 kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
2138 }
2139 - spin_lock(&inode->i_lock);
2140 - if (!--pipe->files) {
2141 - inode->i_pipe = NULL;
2142 - kill = 1;
2143 - }
2144 - spin_unlock(&inode->i_lock);
2145 __pipe_unlock(pipe);
2146
2147 - if (kill)
2148 - free_pipe_info(pipe);
2149 -
2150 + put_pipe_info(inode, pipe);
2151 return 0;
2152 }
2153
2154 @@ -1014,7 +1020,6 @@ static int fifo_open(struct inode *inode, struct file *filp)
2155 {
2156 struct pipe_inode_info *pipe;
2157 bool is_pipe = inode->i_sb->s_magic == PIPEFS_MAGIC;
2158 - int kill = 0;
2159 int ret;
2160
2161 filp->f_version = 0;
2162 @@ -1130,15 +1135,9 @@ err_wr:
2163 goto err;
2164
2165 err:
2166 - spin_lock(&inode->i_lock);
2167 - if (!--pipe->files) {
2168 - inode->i_pipe = NULL;
2169 - kill = 1;
2170 - }
2171 - spin_unlock(&inode->i_lock);
2172 __pipe_unlock(pipe);
2173 - if (kill)
2174 - free_pipe_info(pipe);
2175 +
2176 + put_pipe_info(inode, pipe);
2177 return ret;
2178 }
2179
2180 diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
2181 index 13621cc8cf4c..6a626a507b8c 100644
2182 --- a/include/crypto/scatterwalk.h
2183 +++ b/include/crypto/scatterwalk.h
2184 @@ -36,6 +36,7 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
2185 {
2186 sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0);
2187 sg1[num - 1].page_link &= ~0x02;
2188 + sg1[num - 1].page_link |= 0x01;
2189 }
2190
2191 static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
2192 @@ -43,7 +44,7 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
2193 if (sg_is_last(sg))
2194 return NULL;
2195
2196 - return (++sg)->length ? sg : (void *)sg_page(sg);
2197 + return (++sg)->length ? sg : sg_chain_ptr(sg);
2198 }
2199
2200 static inline void scatterwalk_crypto_chain(struct scatterlist *head,
2201 diff --git a/include/linux/efi.h b/include/linux/efi.h
2202 index 5f8f176154f7..094ddd0f5d1c 100644
2203 --- a/include/linux/efi.h
2204 +++ b/include/linux/efi.h
2205 @@ -782,6 +782,8 @@ struct efivar_entry {
2206 struct efi_variable var;
2207 struct list_head list;
2208 struct kobject kobj;
2209 + bool scanning;
2210 + bool deleting;
2211 };
2212
2213 extern struct list_head efivar_sysfs_list;
2214 @@ -840,6 +842,8 @@ void efivar_run_worker(void);
2215 #if defined(CONFIG_EFI_VARS) || defined(CONFIG_EFI_VARS_MODULE)
2216 int efivars_sysfs_init(void);
2217
2218 +#define EFIVARS_DATA_SIZE_MAX 1024
2219 +
2220 #endif /* CONFIG_EFI_VARS */
2221
2222 #endif /* _LINUX_EFI_H */
2223 diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
2224 index 755243572219..50769a72166b 100644
2225 --- a/include/scsi/scsi_host.h
2226 +++ b/include/scsi/scsi_host.h
2227 @@ -475,6 +475,9 @@ struct scsi_host_template {
2228 */
2229 unsigned ordered_tag:1;
2230
2231 + /* True if the controller does not support WRITE SAME */
2232 + unsigned no_write_same:1;
2233 +
2234 /*
2235 * Countdown for host blocking with no commands outstanding.
2236 */
2237 @@ -674,6 +677,9 @@ struct Scsi_Host {
2238 /* Don't resume host in EH */
2239 unsigned eh_noresume:1;
2240
2241 + /* The controller does not support WRITE SAME */
2242 + unsigned no_write_same:1;
2243 +
2244 /*
2245 * Optional work queue to be utilized by the transport
2246 */
2247 diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
2248 index 27a72d5d4b00..9e600b418467 100644
2249 --- a/include/sound/soc-dapm.h
2250 +++ b/include/sound/soc-dapm.h
2251 @@ -104,7 +104,8 @@ struct device;
2252 SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
2253 .kcontrol_news = wcontrols, .num_kcontrols = 1}
2254 #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \
2255 -{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, \
2256 +{ .id = snd_soc_dapm_mux, .name = wname, \
2257 + SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \
2258 .kcontrol_news = wcontrols, .num_kcontrols = 1}
2259 #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \
2260 { .id = snd_soc_dapm_virt_mux, .name = wname, \
2261 diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
2262 index cb228bf21760..abcd6ca86cb7 100644
2263 --- a/kernel/irq/pm.c
2264 +++ b/kernel/irq/pm.c
2265 @@ -50,7 +50,7 @@ static void resume_irqs(bool want_early)
2266 bool is_early = desc->action &&
2267 desc->action->flags & IRQF_EARLY_RESUME;
2268
2269 - if (is_early != want_early)
2270 + if (!is_early && want_early)
2271 continue;
2272
2273 raw_spin_lock_irqsave(&desc->lock, flags);
2274 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
2275 index 947ba25a95a0..5cf6c7097a71 100644
2276 --- a/kernel/time/timekeeping.c
2277 +++ b/kernel/time/timekeeping.c
2278 @@ -1347,7 +1347,7 @@ static inline void old_vsyscall_fixup(struct timekeeper *tk)
2279 tk->xtime_nsec -= remainder;
2280 tk->xtime_nsec += 1ULL << tk->shift;
2281 tk->ntp_error += remainder << tk->ntp_error_shift;
2282 -
2283 + tk->ntp_error -= (1ULL << tk->shift) << tk->ntp_error_shift;
2284 }
2285 #else
2286 #define old_vsyscall_fixup(tk)
2287 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
2288 index 5e2c2f1a075d..f60b1eec3f87 100644
2289 --- a/net/ipv4/udp.c
2290 +++ b/net/ipv4/udp.c
2291 @@ -1075,6 +1075,9 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset,
2292 if (flags & MSG_SENDPAGE_NOTLAST)
2293 flags |= MSG_MORE;
2294
2295 + if (flags & MSG_SENDPAGE_NOTLAST)
2296 + flags |= MSG_MORE;
2297 +
2298 if (!up->pending) {
2299 struct msghdr msg = { .msg_flags = flags|MSG_MORE };
2300
2301 diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
2302 index a52d2a1a5e83..f684a4f8c797 100644
2303 --- a/sound/pci/hda/patch_analog.c
2304 +++ b/sound/pci/hda/patch_analog.c
2305 @@ -345,6 +345,9 @@ static int patch_ad1986a(struct hda_codec *codec)
2306 */
2307 spec->gen.multiout.no_share_stream = 1;
2308
2309 + /* AD1986A can't manage the dynamic pin on/off smoothly */
2310 + spec->gen.auto_mute_via_amp = 1;
2311 +
2312 snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl,
2313 ad1986a_fixups);
2314 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
2315 @@ -961,6 +964,7 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec,
2316 switch (action) {
2317 case HDA_FIXUP_ACT_PRE_PROBE:
2318 spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook;
2319 + spec->gen.own_eapd_ctl = 1;
2320 snd_hda_sequence_write_cache(codec, gpio_init_verbs);
2321 break;
2322 case HDA_FIXUP_ACT_PROBE:
2323 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
2324 index f0f54829ecee..21b948af6ed0 100644
2325 --- a/sound/pci/hda/patch_realtek.c
2326 +++ b/sound/pci/hda/patch_realtek.c
2327 @@ -1769,6 +1769,7 @@ enum {
2328 ALC889_FIXUP_DAC_ROUTE,
2329 ALC889_FIXUP_MBP_VREF,
2330 ALC889_FIXUP_IMAC91_VREF,
2331 + ALC889_FIXUP_MBA21_VREF,
2332 ALC882_FIXUP_INV_DMIC,
2333 ALC882_FIXUP_NO_PRIMARY_HP,
2334 ALC887_FIXUP_ASUS_BASS,
2335 @@ -1872,17 +1873,13 @@ static void alc889_fixup_mbp_vref(struct hda_codec *codec,
2336 }
2337 }
2338
2339 -/* Set VREF on speaker pins on imac91 */
2340 -static void alc889_fixup_imac91_vref(struct hda_codec *codec,
2341 - const struct hda_fixup *fix, int action)
2342 +static void alc889_fixup_mac_pins(struct hda_codec *codec,
2343 + const hda_nid_t *nids, int num_nids)
2344 {
2345 struct alc_spec *spec = codec->spec;
2346 - static hda_nid_t nids[2] = { 0x18, 0x1a };
2347 int i;
2348
2349 - if (action != HDA_FIXUP_ACT_INIT)
2350 - return;
2351 - for (i = 0; i < ARRAY_SIZE(nids); i++) {
2352 + for (i = 0; i < num_nids; i++) {
2353 unsigned int val;
2354 val = snd_hda_codec_get_pin_target(codec, nids[i]);
2355 val |= AC_PINCTL_VREF_50;
2356 @@ -1891,6 +1888,26 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec,
2357 spec->gen.keep_vref_in_automute = 1;
2358 }
2359
2360 +/* Set VREF on speaker pins on imac91 */
2361 +static void alc889_fixup_imac91_vref(struct hda_codec *codec,
2362 + const struct hda_fixup *fix, int action)
2363 +{
2364 + static hda_nid_t nids[2] = { 0x18, 0x1a };
2365 +
2366 + if (action == HDA_FIXUP_ACT_INIT)
2367 + alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
2368 +}
2369 +
2370 +/* Set VREF on speaker pins on mba21 */
2371 +static void alc889_fixup_mba21_vref(struct hda_codec *codec,
2372 + const struct hda_fixup *fix, int action)
2373 +{
2374 + static hda_nid_t nids[2] = { 0x18, 0x19 };
2375 +
2376 + if (action == HDA_FIXUP_ACT_INIT)
2377 + alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids));
2378 +}
2379 +
2380 /* Don't take HP output as primary
2381 * Strangely, the speaker output doesn't work on Vaio Z and some Vaio
2382 * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05
2383 @@ -2087,6 +2104,12 @@ static const struct hda_fixup alc882_fixups[] = {
2384 .chained = true,
2385 .chain_id = ALC882_FIXUP_GPIO1,
2386 },
2387 + [ALC889_FIXUP_MBA21_VREF] = {
2388 + .type = HDA_FIXUP_FUNC,
2389 + .v.func = alc889_fixup_mba21_vref,
2390 + .chained = true,
2391 + .chain_id = ALC889_FIXUP_MBP_VREF,
2392 + },
2393 [ALC882_FIXUP_INV_DMIC] = {
2394 .type = HDA_FIXUP_FUNC,
2395 .v.func = alc_fixup_inv_dmic_0x12,
2396 @@ -2151,7 +2174,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2397 SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF),
2398 SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD),
2399 SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF),
2400 - SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBP_VREF),
2401 + SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF),
2402 SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF),
2403 SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF),
2404 SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO),
2405 @@ -3231,6 +3254,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
2406 alc_write_coef_idx(codec, 0x18, 0x7388);
2407 break;
2408 case 0x10ec0668:
2409 + alc_write_coef_idx(codec, 0x11, 0x0001);
2410 alc_write_coef_idx(codec, 0x15, 0x0d60);
2411 alc_write_coef_idx(codec, 0xc3, 0x0000);
2412 break;
2413 @@ -3253,6 +3277,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
2414 alc_write_coef_idx(codec, 0x18, 0x7388);
2415 break;
2416 case 0x10ec0668:
2417 + alc_write_coef_idx(codec, 0x11, 0x0001);
2418 alc_write_coef_idx(codec, 0x15, 0x0d50);
2419 alc_write_coef_idx(codec, 0xc3, 0x0000);
2420 break;
2421 @@ -3982,6 +4007,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
2422 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
2423 SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
2424 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
2425 + SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS),
2426 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
2427 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
2428 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
2429 @@ -4266,6 +4292,7 @@ enum {
2430 ALC861_FIXUP_AMP_VREF_0F,
2431 ALC861_FIXUP_NO_JACK_DETECT,
2432 ALC861_FIXUP_ASUS_A6RP,
2433 + ALC660_FIXUP_ASUS_W7J,
2434 };
2435
2436 /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */
2437 @@ -4315,10 +4342,22 @@ static const struct hda_fixup alc861_fixups[] = {
2438 .v.func = alc861_fixup_asus_amp_vref_0f,
2439 .chained = true,
2440 .chain_id = ALC861_FIXUP_NO_JACK_DETECT,
2441 + },
2442 + [ALC660_FIXUP_ASUS_W7J] = {
2443 + .type = HDA_FIXUP_VERBS,
2444 + .v.verbs = (const struct hda_verb[]) {
2445 + /* ASUS W7J needs a magic pin setup on unused NID 0x10
2446 + * for enabling outputs
2447 + */
2448 + {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
2449 + { }
2450 + },
2451 }
2452 };
2453
2454 static const struct snd_pci_quirk alc861_fixup_tbl[] = {
2455 + SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J),
2456 + SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J),
2457 SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP),
2458 SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F),
2459 SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT),
2460 diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
2461 index 456bb8c6d759..bc7472c968e3 100644
2462 --- a/sound/soc/codecs/wm8731.c
2463 +++ b/sound/soc/codecs/wm8731.c
2464 @@ -447,10 +447,10 @@ static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai,
2465 iface |= 0x0001;
2466 break;
2467 case SND_SOC_DAIFMT_DSP_A:
2468 - iface |= 0x0003;
2469 + iface |= 0x0013;
2470 break;
2471 case SND_SOC_DAIFMT_DSP_B:
2472 - iface |= 0x0013;
2473 + iface |= 0x0003;
2474 break;
2475 default:
2476 return -EINVAL;
2477 diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
2478 index 253c88bb7a4c..4f05fb88bddf 100644
2479 --- a/sound/soc/codecs/wm8990.c
2480 +++ b/sound/soc/codecs/wm8990.c
2481 @@ -1259,6 +1259,8 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
2482
2483 /* disable POBCTRL, SOFT_ST and BUFDCOPEN */
2484 snd_soc_write(codec, WM8990_ANTIPOP2, 0x0);
2485 +
2486 + codec->cache_sync = 1;
2487 break;
2488 }
2489