diff options
104 files changed, 871 insertions, 263 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a1793d670cd0..3844d21d6ca3 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -33,7 +33,7 @@ Table of Contents | |||
33 | 2 Modifying System Parameters | 33 | 2 Modifying System Parameters |
34 | 34 | ||
35 | 3 Per-Process Parameters | 35 | 3 Per-Process Parameters |
36 | 3.1 /proc/<pid>/oom_score_adj - Adjust the oom-killer | 36 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer |
37 | score | 37 | score |
38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score | 38 | 3.2 /proc/<pid>/oom_score - Display current oom-killer score |
39 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 39 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
@@ -1320,10 +1320,10 @@ of the kernel. | |||
1320 | CHAPTER 3: PER-PROCESS PARAMETERS | 1320 | CHAPTER 3: PER-PROCESS PARAMETERS |
1321 | ------------------------------------------------------------------------------ | 1321 | ------------------------------------------------------------------------------ |
1322 | 1322 | ||
1323 | 3.1 /proc/<pid>/oom_score_adj- Adjust the oom-killer score | 1323 | 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score |
1324 | -------------------------------------------------------------------------------- | 1324 | -------------------------------------------------------------------------------- |
1325 | 1325 | ||
1326 | This file can be used to adjust the badness heuristic used to select which | 1326 | These file can be used to adjust the badness heuristic used to select which |
1327 | process gets killed in out of memory conditions. | 1327 | process gets killed in out of memory conditions. |
1328 | 1328 | ||
1329 | The badness heuristic assigns a value to each candidate task ranging from 0 | 1329 | The badness heuristic assigns a value to each candidate task ranging from 0 |
@@ -1361,6 +1361,12 @@ same system, cpuset, mempolicy, or memory controller resources to use at least | |||
1361 | equivalent to discounting 50% of the task's allowed memory from being considered | 1361 | equivalent to discounting 50% of the task's allowed memory from being considered |
1362 | as scoring against the task. | 1362 | as scoring against the task. |
1363 | 1363 | ||
1364 | For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also | ||
1365 | be used to tune the badness score. Its acceptable values range from -16 | ||
1366 | (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 | ||
1367 | (OOM_DISABLE) to disable oom killing entirely for that task. Its value is | ||
1368 | scaled linearly with /proc/<pid>/oom_score_adj. | ||
1369 | |||
1364 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last | 1370 | The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last |
1365 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower | 1371 | value set by a CAP_SYS_RESOURCE process. To reduce the value any lower |
1366 | requires CAP_SYS_RESOURCE. | 1372 | requires CAP_SYS_RESOURCE. |
@@ -1375,7 +1381,9 @@ minimal amount of work. | |||
1375 | ------------------------------------------------------------- | 1381 | ------------------------------------------------------------- |
1376 | 1382 | ||
1377 | This file can be used to check the current score used by the oom-killer is for | 1383 | This file can be used to check the current score used by the oom-killer is for |
1378 | any given <pid>. | 1384 | any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which |
1385 | process should be killed in an out-of-memory situation. | ||
1386 | |||
1379 | 1387 | ||
1380 | 3.3 /proc/<pid>/io - Display the IO accounting fields | 1388 | 3.3 /proc/<pid>/io - Display the IO accounting fields |
1381 | ------------------------------------------------------- | 1389 | ------------------------------------------------------- |
diff --git a/Documentation/networking/netdev-features.txt b/Documentation/networking/netdev-features.txt index 4164f5c02e4b..f310edec8a77 100644 --- a/Documentation/networking/netdev-features.txt +++ b/Documentation/networking/netdev-features.txt | |||
@@ -164,4 +164,4 @@ read the CRC recorded by the NIC on receipt of the packet. | |||
164 | This requests that the NIC receive all possible frames, including errored | 164 | This requests that the NIC receive all possible frames, including errored |
165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with | 165 | frames (such as bad FCS, etc). This can be helpful when sniffing a link with |
166 | bad packets on it. Some NICs may receive more packets if also put into normal | 166 | bad packets on it. Some NICs may receive more packets if also put into normal |
167 | PROMISC mdoe. | 167 | PROMISC mode. |
diff --git a/MAINTAINERS b/MAINTAINERS index ff8e763eaa50..bb0b27db673f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -7259,6 +7259,14 @@ L: linux-xtensa@linux-xtensa.org | |||
7259 | S: Maintained | 7259 | S: Maintained |
7260 | F: arch/xtensa/ | 7260 | F: arch/xtensa/ |
7261 | 7261 | ||
7262 | THERMAL | ||
7263 | M: Zhang Rui <rui.zhang@intel.com> | ||
7264 | L: linux-pm@vger.kernel.org | ||
7265 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git | ||
7266 | S: Supported | ||
7267 | F: drivers/thermal/ | ||
7268 | F: include/linux/thermal.h | ||
7269 | |||
7262 | THINKPAD ACPI EXTRAS DRIVER | 7270 | THINKPAD ACPI EXTRAS DRIVER |
7263 | M: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> | 7271 | M: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> |
7264 | L: ibm-acpi-devel@lists.sourceforge.net | 7272 | L: ibm-acpi-devel@lists.sourceforge.net |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index f2aa09eb658e..9137df539b61 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -33,7 +33,7 @@ ifeq ($(CONFIG_XIP_KERNEL),y) | |||
33 | 33 | ||
34 | $(obj)/xipImage: vmlinux FORCE | 34 | $(obj)/xipImage: vmlinux FORCE |
35 | $(call if_changed,objcopy) | 35 | $(call if_changed,objcopy) |
36 | $(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' | 36 | @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))' |
37 | 37 | ||
38 | $(obj)/Image $(obj)/zImage: FORCE | 38 | $(obj)/Image $(obj)/zImage: FORCE |
39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' | 39 | @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' |
@@ -48,14 +48,14 @@ $(obj)/xipImage: FORCE | |||
48 | 48 | ||
49 | $(obj)/Image: vmlinux FORCE | 49 | $(obj)/Image: vmlinux FORCE |
50 | $(call if_changed,objcopy) | 50 | $(call if_changed,objcopy) |
51 | $(kecho) ' Kernel: $@ is ready' | 51 | @$(kecho) ' Kernel: $@ is ready' |
52 | 52 | ||
53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE | 53 | $(obj)/compressed/vmlinux: $(obj)/Image FORCE |
54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 54 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
55 | 55 | ||
56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 56 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
57 | $(call if_changed,objcopy) | 57 | $(call if_changed,objcopy) |
58 | $(kecho) ' Kernel: $@ is ready' | 58 | @$(kecho) ' Kernel: $@ is ready' |
59 | 59 | ||
60 | endif | 60 | endif |
61 | 61 | ||
@@ -90,7 +90,7 @@ fi | |||
90 | $(obj)/uImage: $(obj)/zImage FORCE | 90 | $(obj)/uImage: $(obj)/zImage FORCE |
91 | @$(check_for_multiple_loadaddr) | 91 | @$(check_for_multiple_loadaddr) |
92 | $(call if_changed,uimage) | 92 | $(call if_changed,uimage) |
93 | $(kecho) ' Image $@ is ready' | 93 | @$(kecho) ' Image $@ is ready' |
94 | 94 | ||
95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | 95 | $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE |
96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ | 96 | $(Q)$(MAKE) $(build)=$(obj)/bootp $@ |
@@ -98,7 +98,7 @@ $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE | |||
98 | 98 | ||
99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE | 99 | $(obj)/bootpImage: $(obj)/bootp/bootp FORCE |
100 | $(call if_changed,objcopy) | 100 | $(call if_changed,objcopy) |
101 | $(kecho) ' Kernel: $@ is ready' | 101 | @$(kecho) ' Kernel: $@ is ready' |
102 | 102 | ||
103 | PHONY += initrd FORCE | 103 | PHONY += initrd FORCE |
104 | initrd: | 104 | initrd: |
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index b1497c7d7d68..df7f2270fc91 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -73,8 +73,8 @@ | |||
73 | 73 | ||
74 | pinmux: pinmux { | 74 | pinmux: pinmux { |
75 | compatible = "nvidia,tegra30-pinmux"; | 75 | compatible = "nvidia,tegra30-pinmux"; |
76 | reg = <0x70000868 0xd0 /* Pad control registers */ | 76 | reg = <0x70000868 0xd4 /* Pad control registers */ |
77 | 0x70003000 0x3e0>; /* Mux registers */ | 77 | 0x70003000 0x3e4>; /* Mux registers */ |
78 | }; | 78 | }; |
79 | 79 | ||
80 | serial@70006000 { | 80 | serial@70006000 { |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 1e122bcd7845..3cee0e6ea7c3 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -68,7 +68,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
68 | 68 | ||
69 | /* Enable overcurrent notification */ | 69 | /* Enable overcurrent notification */ |
70 | for (i = 0; i < data->ports; i++) { | 70 | for (i = 0; i < data->ports; i++) { |
71 | if (data->overcurrent_pin[i]) | 71 | if (gpio_is_valid(data->overcurrent_pin[i])) |
72 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 72 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
73 | } | 73 | } |
74 | 74 | ||
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index aa1e58729885..414bd855fb0c 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
72 | 72 | ||
73 | /* Enable overcurrent notification */ | 73 | /* Enable overcurrent notification */ |
74 | for (i = 0; i < data->ports; i++) { | 74 | for (i = 0; i < data->ports; i++) { |
75 | if (data->overcurrent_pin[i]) | 75 | if (gpio_is_valid(data->overcurrent_pin[i])) |
76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index b9487696b7be..cd604aad8e96 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
72 | 72 | ||
73 | /* Enable overcurrent notification */ | 73 | /* Enable overcurrent notification */ |
74 | for (i = 0; i < data->ports; i++) { | 74 | for (i = 0; i < data->ports; i++) { |
75 | if (data->overcurrent_pin[i]) | 75 | if (gpio_is_valid(data->overcurrent_pin[i])) |
76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 76 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index cb85da2eccea..9c61e59a2104 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -78,7 +78,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
78 | 78 | ||
79 | /* Enable overcurrent notification */ | 79 | /* Enable overcurrent notification */ |
80 | for (i = 0; i < data->ports; i++) { | 80 | for (i = 0; i < data->ports; i++) { |
81 | if (data->overcurrent_pin[i]) | 81 | if (gpio_is_valid(data->overcurrent_pin[i])) |
82 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | 82 | at91_set_gpio_input(data->overcurrent_pin[i], 1); |
83 | } | 83 | } |
84 | 84 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index b1596072dcc2..fcd233cb33d2 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1841,8 +1841,8 @@ static struct resource sha_resources[] = { | |||
1841 | .flags = IORESOURCE_MEM, | 1841 | .flags = IORESOURCE_MEM, |
1842 | }, | 1842 | }, |
1843 | [1] = { | 1843 | [1] = { |
1844 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1844 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1845 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1845 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1846 | .flags = IORESOURCE_IRQ, | 1846 | .flags = IORESOURCE_IRQ, |
1847 | }, | 1847 | }, |
1848 | }; | 1848 | }; |
@@ -1874,8 +1874,8 @@ static struct resource tdes_resources[] = { | |||
1874 | .flags = IORESOURCE_MEM, | 1874 | .flags = IORESOURCE_MEM, |
1875 | }, | 1875 | }, |
1876 | [1] = { | 1876 | [1] = { |
1877 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1877 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1878 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1878 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1879 | .flags = IORESOURCE_IRQ, | 1879 | .flags = IORESOURCE_IRQ, |
1880 | }, | 1880 | }, |
1881 | }; | 1881 | }; |
@@ -1910,8 +1910,8 @@ static struct resource aes_resources[] = { | |||
1910 | .flags = IORESOURCE_MEM, | 1910 | .flags = IORESOURCE_MEM, |
1911 | }, | 1911 | }, |
1912 | [1] = { | 1912 | [1] = { |
1913 | .start = AT91SAM9G45_ID_AESTDESSHA, | 1913 | .start = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1914 | .end = AT91SAM9G45_ID_AESTDESSHA, | 1914 | .end = NR_IRQS_LEGACY + AT91SAM9G45_ID_AESTDESSHA, |
1915 | .flags = IORESOURCE_IRQ, | 1915 | .flags = IORESOURCE_IRQ, |
1916 | }, | 1916 | }, |
1917 | }; | 1917 | }; |
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c index 82c27230d4a9..86e37cd9376c 100644 --- a/arch/arm/mach-highbank/system.c +++ b/arch/arm/mach-highbank/system.c | |||
@@ -28,6 +28,7 @@ void highbank_restart(char mode, const char *cmd) | |||
28 | hignbank_set_pwr_soft_reset(); | 28 | hignbank_set_pwr_soft_reset(); |
29 | 29 | ||
30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); | 30 | scu_power_mode(scu_base_addr, SCU_PM_POWEROFF); |
31 | cpu_do_idle(); | 31 | while (1) |
32 | cpu_do_idle(); | ||
32 | } | 33 | } |
33 | 34 | ||
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c index 3c1b8ff9a0a6..cc49c7ae186e 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c | |||
@@ -112,7 +112,7 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, | |||
112 | 112 | ||
113 | clk = clk_register(dev, &gate->hw); | 113 | clk = clk_register(dev, &gate->hw); |
114 | if (IS_ERR(clk)) | 114 | if (IS_ERR(clk)) |
115 | kfree(clk); | 115 | kfree(gate); |
116 | 116 | ||
117 | return clk; | 117 | return clk; |
118 | } | 118 | } |
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c index 412c583a24b0..576af7446952 100644 --- a/arch/arm/mach-imx/ehci-imx25.c +++ b/arch/arm/mach-imx/ehci-imx25.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define MX25_H1_SIC_SHIFT 21 | 30 | #define MX25_H1_SIC_SHIFT 21 |
31 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) | 31 | #define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT) |
32 | #define MX25_H1_PP_BIT (1 << 18) | 32 | #define MX25_H1_PP_BIT (1 << 18) |
33 | #define MX25_H1_PM_BIT (1 << 8) | 33 | #define MX25_H1_PM_BIT (1 << 16) |
34 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) | 34 | #define MX25_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) | 35 | #define MX25_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX25_H1_TLL_BIT (1 << 5) | 36 | #define MX25_H1_TLL_BIT (1 << 5) |
diff --git a/arch/arm/mach-imx/ehci-imx35.c b/arch/arm/mach-imx/ehci-imx35.c index 779e16eb65cb..293397852e4e 100644 --- a/arch/arm/mach-imx/ehci-imx35.c +++ b/arch/arm/mach-imx/ehci-imx35.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #define MX35_H1_SIC_SHIFT 21 | 30 | #define MX35_H1_SIC_SHIFT 21 |
31 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) | 31 | #define MX35_H1_SIC_MASK (0x3 << MX35_H1_SIC_SHIFT) |
32 | #define MX35_H1_PP_BIT (1 << 18) | 32 | #define MX35_H1_PP_BIT (1 << 18) |
33 | #define MX35_H1_PM_BIT (1 << 8) | 33 | #define MX35_H1_PM_BIT (1 << 16) |
34 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) | 34 | #define MX35_H1_IPPUE_UP_BIT (1 << 7) |
35 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) | 35 | #define MX35_H1_IPPUE_DOWN_BIT (1 << 6) |
36 | #define MX35_H1_TLL_BIT (1 << 5) | 36 | #define MX35_H1_TLL_BIT (1 << 5) |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index b56d06b48782..95192a062d5d 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = { | |||
359 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, | 359 | .clkdm_offs = OMAP4430_CM2_CAM_CAM_CDOFFS, |
360 | .wkdep_srcs = iss_wkup_sleep_deps, | 360 | .wkdep_srcs = iss_wkup_sleep_deps, |
361 | .sleepdep_srcs = iss_wkup_sleep_deps, | 361 | .sleepdep_srcs = iss_wkup_sleep_deps, |
362 | .flags = CLKDM_CAN_HWSUP_SWSUP, | 362 | .flags = CLKDM_CAN_SWSUP, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | static struct clockdomain l3_dss_44xx_clkdm = { | 365 | static struct clockdomain l3_dss_44xx_clkdm = { |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index cba60e05e32e..c72b5a727720 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/pinctrl/machine.h> | 20 | #include <linux/pinctrl/machine.h> |
21 | #include <linux/platform_data/omap4-keypad.h> | 21 | #include <linux/platform_data/omap4-keypad.h> |
22 | #include <linux/platform_data/omap_ocp2scp.h> | ||
22 | 23 | ||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
@@ -613,6 +614,83 @@ static void omap_init_vout(void) | |||
613 | static inline void omap_init_vout(void) {} | 614 | static inline void omap_init_vout(void) {} |
614 | #endif | 615 | #endif |
615 | 616 | ||
617 | #if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) | ||
618 | static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev) | ||
619 | { | ||
620 | int cnt = 0; | ||
621 | |||
622 | while (ocp2scp_dev->drv_name != NULL) { | ||
623 | cnt++; | ||
624 | ocp2scp_dev++; | ||
625 | } | ||
626 | |||
627 | return cnt; | ||
628 | } | ||
629 | |||
630 | static void omap_init_ocp2scp(void) | ||
631 | { | ||
632 | struct omap_hwmod *oh; | ||
633 | struct platform_device *pdev; | ||
634 | int bus_id = -1, dev_cnt = 0, i; | ||
635 | struct omap_ocp2scp_dev *ocp2scp_dev; | ||
636 | const char *oh_name, *name; | ||
637 | struct omap_ocp2scp_platform_data *pdata; | ||
638 | |||
639 | if (!cpu_is_omap44xx()) | ||
640 | return; | ||
641 | |||
642 | oh_name = "ocp2scp_usb_phy"; | ||
643 | name = "omap-ocp2scp"; | ||
644 | |||
645 | oh = omap_hwmod_lookup(oh_name); | ||
646 | if (!oh) { | ||
647 | pr_err("%s: could not find omap_hwmod for %s\n", __func__, | ||
648 | oh_name); | ||
649 | return; | ||
650 | } | ||
651 | |||
652 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | ||
653 | if (!pdata) { | ||
654 | pr_err("%s: No memory for ocp2scp pdata\n", __func__); | ||
655 | return; | ||
656 | } | ||
657 | |||
658 | ocp2scp_dev = oh->dev_attr; | ||
659 | dev_cnt = count_ocp2scp_devices(ocp2scp_dev); | ||
660 | |||
661 | if (!dev_cnt) { | ||
662 | pr_err("%s: No devices connected to ocp2scp\n", __func__); | ||
663 | kfree(pdata); | ||
664 | return; | ||
665 | } | ||
666 | |||
667 | pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *) | ||
668 | * dev_cnt, GFP_KERNEL); | ||
669 | if (!pdata->devices) { | ||
670 | pr_err("%s: No memory for ocp2scp pdata devices\n", __func__); | ||
671 | kfree(pdata); | ||
672 | return; | ||
673 | } | ||
674 | |||
675 | for (i = 0; i < dev_cnt; i++, ocp2scp_dev++) | ||
676 | pdata->devices[i] = ocp2scp_dev; | ||
677 | |||
678 | pdata->dev_cnt = dev_cnt; | ||
679 | |||
680 | pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata), NULL, | ||
681 | 0, false); | ||
682 | if (IS_ERR(pdev)) { | ||
683 | pr_err("Could not build omap_device for %s %s\n", | ||
684 | name, oh_name); | ||
685 | kfree(pdata->devices); | ||
686 | kfree(pdata); | ||
687 | return; | ||
688 | } | ||
689 | } | ||
690 | #else | ||
691 | static inline void omap_init_ocp2scp(void) { } | ||
692 | #endif | ||
693 | |||
616 | /*-------------------------------------------------------------------------*/ | 694 | /*-------------------------------------------------------------------------*/ |
617 | 695 | ||
618 | static int __init omap2_init_devices(void) | 696 | static int __init omap2_init_devices(void) |
@@ -640,6 +718,7 @@ static int __init omap2_init_devices(void) | |||
640 | omap_init_sham(); | 718 | omap_init_sham(); |
641 | omap_init_aes(); | 719 | omap_init_aes(); |
642 | omap_init_vout(); | 720 | omap_init_vout(); |
721 | omap_init_ocp2scp(); | ||
643 | 722 | ||
644 | return 0; | 723 | return 0; |
645 | } | 724 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index b969ab1d258b..87cc6d058de2 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -422,6 +422,38 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) | |||
422 | } | 422 | } |
423 | 423 | ||
424 | /** | 424 | /** |
425 | * _wait_softreset_complete - wait for an OCP softreset to complete | ||
426 | * @oh: struct omap_hwmod * to wait on | ||
427 | * | ||
428 | * Wait until the IP block represented by @oh reports that its OCP | ||
429 | * softreset is complete. This can be triggered by software (see | ||
430 | * _ocp_softreset()) or by hardware upon returning from off-mode (one | ||
431 | * example is HSMMC). Waits for up to MAX_MODULE_SOFTRESET_WAIT | ||
432 | * microseconds. Returns the number of microseconds waited. | ||
433 | */ | ||
434 | static int _wait_softreset_complete(struct omap_hwmod *oh) | ||
435 | { | ||
436 | struct omap_hwmod_class_sysconfig *sysc; | ||
437 | u32 softrst_mask; | ||
438 | int c = 0; | ||
439 | |||
440 | sysc = oh->class->sysc; | ||
441 | |||
442 | if (sysc->sysc_flags & SYSS_HAS_RESET_STATUS) | ||
443 | omap_test_timeout((omap_hwmod_read(oh, sysc->syss_offs) | ||
444 | & SYSS_RESETDONE_MASK), | ||
445 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
446 | else if (sysc->sysc_flags & SYSC_HAS_RESET_STATUS) { | ||
447 | softrst_mask = (0x1 << sysc->sysc_fields->srst_shift); | ||
448 | omap_test_timeout(!(omap_hwmod_read(oh, sysc->sysc_offs) | ||
449 | & softrst_mask), | ||
450 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
451 | } | ||
452 | |||
453 | return c; | ||
454 | } | ||
455 | |||
456 | /** | ||
425 | * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v | 457 | * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v |
426 | * @oh: struct omap_hwmod * | 458 | * @oh: struct omap_hwmod * |
427 | * | 459 | * |
@@ -1282,6 +1314,18 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
1282 | if (!oh->class->sysc) | 1314 | if (!oh->class->sysc) |
1283 | return; | 1315 | return; |
1284 | 1316 | ||
1317 | /* | ||
1318 | * Wait until reset has completed, this is needed as the IP | ||
1319 | * block is reset automatically by hardware in some cases | ||
1320 | * (off-mode for example), and the drivers require the | ||
1321 | * IP to be ready when they access it | ||
1322 | */ | ||
1323 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1324 | _enable_optional_clocks(oh); | ||
1325 | _wait_softreset_complete(oh); | ||
1326 | if (oh->flags & HWMOD_CONTROL_OPT_CLKS_IN_RESET) | ||
1327 | _disable_optional_clocks(oh); | ||
1328 | |||
1285 | v = oh->_sysc_cache; | 1329 | v = oh->_sysc_cache; |
1286 | sf = oh->class->sysc->sysc_flags; | 1330 | sf = oh->class->sysc->sysc_flags; |
1287 | 1331 | ||
@@ -1804,7 +1848,7 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) | |||
1804 | */ | 1848 | */ |
1805 | static int _ocp_softreset(struct omap_hwmod *oh) | 1849 | static int _ocp_softreset(struct omap_hwmod *oh) |
1806 | { | 1850 | { |
1807 | u32 v, softrst_mask; | 1851 | u32 v; |
1808 | int c = 0; | 1852 | int c = 0; |
1809 | int ret = 0; | 1853 | int ret = 0; |
1810 | 1854 | ||
@@ -1834,19 +1878,7 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
1834 | if (oh->class->sysc->srst_udelay) | 1878 | if (oh->class->sysc->srst_udelay) |
1835 | udelay(oh->class->sysc->srst_udelay); | 1879 | udelay(oh->class->sysc->srst_udelay); |
1836 | 1880 | ||
1837 | if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) | 1881 | c = _wait_softreset_complete(oh); |
1838 | omap_test_timeout((omap_hwmod_read(oh, | ||
1839 | oh->class->sysc->syss_offs) | ||
1840 | & SYSS_RESETDONE_MASK), | ||
1841 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
1842 | else if (oh->class->sysc->sysc_flags & SYSC_HAS_RESET_STATUS) { | ||
1843 | softrst_mask = (0x1 << oh->class->sysc->sysc_fields->srst_shift); | ||
1844 | omap_test_timeout(!(omap_hwmod_read(oh, | ||
1845 | oh->class->sysc->sysc_offs) | ||
1846 | & softrst_mask), | ||
1847 | MAX_MODULE_SOFTRESET_WAIT, c); | ||
1848 | } | ||
1849 | |||
1850 | if (c == MAX_MODULE_SOFTRESET_WAIT) | 1882 | if (c == MAX_MODULE_SOFTRESET_WAIT) |
1851 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", | 1883 | pr_warning("omap_hwmod: %s: softreset failed (waited %d usec)\n", |
1852 | oh->name, MAX_MODULE_SOFTRESET_WAIT); | 1884 | oh->name, MAX_MODULE_SOFTRESET_WAIT); |
@@ -2352,6 +2384,9 @@ static int __init _setup_reset(struct omap_hwmod *oh) | |||
2352 | if (oh->_state != _HWMOD_STATE_INITIALIZED) | 2384 | if (oh->_state != _HWMOD_STATE_INITIALIZED) |
2353 | return -EINVAL; | 2385 | return -EINVAL; |
2354 | 2386 | ||
2387 | if (oh->flags & HWMOD_EXT_OPT_MAIN_CLK) | ||
2388 | return -EPERM; | ||
2389 | |||
2355 | if (oh->rst_lines_cnt == 0) { | 2390 | if (oh->rst_lines_cnt == 0) { |
2356 | r = _enable(oh); | 2391 | r = _enable(oh); |
2357 | if (r) { | 2392 | if (r) { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 652d0285bd6d..0b1249e00398 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/platform_data/gpio-omap.h> | 22 | #include <linux/platform_data/gpio-omap.h> |
23 | #include <linux/power/smartreflex.h> | 23 | #include <linux/power/smartreflex.h> |
24 | #include <linux/platform_data/omap_ocp2scp.h> | ||
24 | 25 | ||
25 | #include <plat/omap_hwmod.h> | 26 | #include <plat/omap_hwmod.h> |
26 | #include <plat/i2c.h> | 27 | #include <plat/i2c.h> |
@@ -2125,6 +2126,14 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
2125 | .name = "mcpdm", | 2126 | .name = "mcpdm", |
2126 | .class = &omap44xx_mcpdm_hwmod_class, | 2127 | .class = &omap44xx_mcpdm_hwmod_class, |
2127 | .clkdm_name = "abe_clkdm", | 2128 | .clkdm_name = "abe_clkdm", |
2129 | /* | ||
2130 | * It's suspected that the McPDM requires an off-chip main | ||
2131 | * functional clock, controlled via I2C. This IP block is | ||
2132 | * currently reset very early during boot, before I2C is | ||
2133 | * available, so it doesn't seem that we have any choice in | ||
2134 | * the kernel other than to avoid resetting it. | ||
2135 | */ | ||
2136 | .flags = HWMOD_EXT_OPT_MAIN_CLK, | ||
2128 | .mpu_irqs = omap44xx_mcpdm_irqs, | 2137 | .mpu_irqs = omap44xx_mcpdm_irqs, |
2129 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | 2138 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, |
2130 | .main_clk = "mcpdm_fck", | 2139 | .main_clk = "mcpdm_fck", |
@@ -2681,6 +2690,32 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = { | |||
2681 | .sysc = &omap44xx_ocp2scp_sysc, | 2690 | .sysc = &omap44xx_ocp2scp_sysc, |
2682 | }; | 2691 | }; |
2683 | 2692 | ||
2693 | /* ocp2scp dev_attr */ | ||
2694 | static struct resource omap44xx_usb_phy_and_pll_addrs[] = { | ||
2695 | { | ||
2696 | .name = "usb_phy", | ||
2697 | .start = 0x4a0ad080, | ||
2698 | .end = 0x4a0ae000, | ||
2699 | .flags = IORESOURCE_MEM, | ||
2700 | }, | ||
2701 | { | ||
2702 | /* XXX: Remove this once control module driver is in place */ | ||
2703 | .name = "ctrl_dev", | ||
2704 | .start = 0x4a002300, | ||
2705 | .end = 0x4a002303, | ||
2706 | .flags = IORESOURCE_MEM, | ||
2707 | }, | ||
2708 | { } | ||
2709 | }; | ||
2710 | |||
2711 | static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = { | ||
2712 | { | ||
2713 | .drv_name = "omap-usb2", | ||
2714 | .res = omap44xx_usb_phy_and_pll_addrs, | ||
2715 | }, | ||
2716 | { } | ||
2717 | }; | ||
2718 | |||
2684 | /* ocp2scp_usb_phy */ | 2719 | /* ocp2scp_usb_phy */ |
2685 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | 2720 | static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { |
2686 | .name = "ocp2scp_usb_phy", | 2721 | .name = "ocp2scp_usb_phy", |
@@ -2694,6 +2729,7 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { | |||
2694 | .modulemode = MODULEMODE_HWCTRL, | 2729 | .modulemode = MODULEMODE_HWCTRL, |
2695 | }, | 2730 | }, |
2696 | }, | 2731 | }, |
2732 | .dev_attr = ocp2scp_dev_attr, | ||
2697 | }; | 2733 | }; |
2698 | 2734 | ||
2699 | /* | 2735 | /* |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 635e109f5ad3..44c42057b61c 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -366,7 +366,7 @@ static struct regulator_init_data omap4_clk32kg_idata = { | |||
366 | }; | 366 | }; |
367 | 367 | ||
368 | static struct regulator_consumer_supply omap4_vdd1_supply[] = { | 368 | static struct regulator_consumer_supply omap4_vdd1_supply[] = { |
369 | REGULATOR_SUPPLY("vcc", "mpu.0"), | 369 | REGULATOR_SUPPLY("vcc", "cpu0"), |
370 | }; | 370 | }; |
371 | 371 | ||
372 | static struct regulator_consumer_supply omap4_vdd2_supply[] = { | 372 | static struct regulator_consumer_supply omap4_vdd2_supply[] = { |
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 880249b17012..75878c37959b 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
@@ -264,7 +264,7 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm) | |||
264 | 264 | ||
265 | if (initialized) { | 265 | if (initialized) { |
266 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) | 266 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) |
267 | pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).", | 267 | pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).\n", |
268 | __func__, voltdm->name, i2c_high_speed); | 268 | __func__, voltdm->name, i2c_high_speed); |
269 | return; | 269 | return; |
270 | } | 270 | } |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 5ecbd17b5641..e2c6391863fe 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mfd/asic3.h> | 28 | #include <linux/mfd/asic3.h> |
29 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
30 | #include <linux/pda_power.h> | 30 | #include <linux/pda_power.h> |
31 | #include <linux/pwm.h> | ||
31 | #include <linux/pwm_backlight.h> | 32 | #include <linux/pwm_backlight.h> |
32 | #include <linux/regulator/driver.h> | 33 | #include <linux/regulator/driver.h> |
33 | #include <linux/regulator/gpio-regulator.h> | 34 | #include <linux/regulator/gpio-regulator.h> |
@@ -556,7 +557,7 @@ static struct platform_device hx4700_lcd = { | |||
556 | */ | 557 | */ |
557 | 558 | ||
558 | static struct platform_pwm_backlight_data backlight_data = { | 559 | static struct platform_pwm_backlight_data backlight_data = { |
559 | .pwm_id = 1, | 560 | .pwm_id = -1, /* Superseded by pwm_lookup */ |
560 | .max_brightness = 200, | 561 | .max_brightness = 200, |
561 | .dft_brightness = 100, | 562 | .dft_brightness = 100, |
562 | .pwm_period_ns = 30923, | 563 | .pwm_period_ns = 30923, |
@@ -571,6 +572,10 @@ static struct platform_device backlight = { | |||
571 | }, | 572 | }, |
572 | }; | 573 | }; |
573 | 574 | ||
575 | static struct pwm_lookup hx4700_pwm_lookup[] = { | ||
576 | PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL), | ||
577 | }; | ||
578 | |||
574 | /* | 579 | /* |
575 | * USB "Transceiver" | 580 | * USB "Transceiver" |
576 | */ | 581 | */ |
@@ -872,6 +877,7 @@ static void __init hx4700_init(void) | |||
872 | pxa_set_stuart_info(NULL); | 877 | pxa_set_stuart_info(NULL); |
873 | 878 | ||
874 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 879 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
880 | pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup)); | ||
875 | 881 | ||
876 | pxa_set_ficp_info(&ficp_info); | 882 | pxa_set_ficp_info(&ficp_info); |
877 | pxa27x_set_i2c_power_info(NULL); | 883 | pxa27x_set_i2c_power_info(NULL); |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 438f02fe122a..842596d4d31e 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -86,10 +86,7 @@ static void spitz_discharge1(int on) | |||
86 | gpio_set_value(SPITZ_GPIO_LED_GREEN, on); | 86 | gpio_set_value(SPITZ_GPIO_LED_GREEN, on); |
87 | } | 87 | } |
88 | 88 | ||
89 | static unsigned long gpio18_config[] = { | 89 | static unsigned long gpio18_config = GPIO18_GPIO; |
90 | GPIO18_RDY, | ||
91 | GPIO18_GPIO, | ||
92 | }; | ||
93 | 90 | ||
94 | static void spitz_presuspend(void) | 91 | static void spitz_presuspend(void) |
95 | { | 92 | { |
@@ -112,7 +109,7 @@ static void spitz_presuspend(void) | |||
112 | PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT; | 109 | PGSR3 &= ~SPITZ_GPIO_G3_STROBE_BIT; |
113 | PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0); | 110 | PGSR2 |= GPIO_bit(SPITZ_GPIO_KEY_STROBE0); |
114 | 111 | ||
115 | pxa2xx_mfp_config(&gpio18_config[0], 1); | 112 | pxa2xx_mfp_config(&gpio18_config, 1); |
116 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown"); | 113 | gpio_request_one(18, GPIOF_OUT_INIT_HIGH, "Unknown"); |
117 | gpio_free(18); | 114 | gpio_free(18); |
118 | 115 | ||
@@ -131,7 +128,6 @@ static void spitz_presuspend(void) | |||
131 | 128 | ||
132 | static void spitz_postsuspend(void) | 129 | static void spitz_postsuspend(void) |
133 | { | 130 | { |
134 | pxa2xx_mfp_config(&gpio18_config[1], 1); | ||
135 | } | 131 | } |
136 | 132 | ||
137 | static int spitz_should_wakeup(unsigned int resume_on_alarm) | 133 | static int spitz_should_wakeup(unsigned int resume_on_alarm) |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index b3349f7b1a2c..1db029438022 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -443,6 +443,11 @@ struct omap_hwmod_omap4_prcm { | |||
443 | * in order to complete the reset. Optional clocks will be disabled | 443 | * in order to complete the reset. Optional clocks will be disabled |
444 | * again after the reset. | 444 | * again after the reset. |
445 | * HWMOD_16BIT_REG: Module has 16bit registers | 445 | * HWMOD_16BIT_REG: Module has 16bit registers |
446 | * HWMOD_EXT_OPT_MAIN_CLK: The only main functional clock source for | ||
447 | * this IP block comes from an off-chip source and is not always | ||
448 | * enabled. This prevents the hwmod code from being able to | ||
449 | * enable and reset the IP block early. XXX Eventually it should | ||
450 | * be possible to query the clock framework for this information. | ||
446 | */ | 451 | */ |
447 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 452 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
448 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 453 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
@@ -453,6 +458,7 @@ struct omap_hwmod_omap4_prcm { | |||
453 | #define HWMOD_NO_IDLEST (1 << 6) | 458 | #define HWMOD_NO_IDLEST (1 << 6) |
454 | #define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7) | 459 | #define HWMOD_CONTROL_OPT_CLKS_IN_RESET (1 << 7) |
455 | #define HWMOD_16BIT_REG (1 << 8) | 460 | #define HWMOD_16BIT_REG (1 << 8) |
461 | #define HWMOD_EXT_OPT_MAIN_CLK (1 << 9) | ||
456 | 462 | ||
457 | /* | 463 | /* |
458 | * omap_hwmod._int_flags definitions | 464 | * omap_hwmod._int_flags definitions |
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index cd60a81163e9..32d05c8219dc 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile | |||
@@ -5,6 +5,6 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types | 7 | include/generated/mach-types.h: $(src)/gen-mach-types $(src)/mach-types |
8 | $(kecho) ' Generating $@' | 8 | @$(kecho) ' Generating $@' |
9 | @mkdir -p $(dir $@) | 9 | @mkdir -p $(dir $@) |
10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } | 10 | $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } |
diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 54f6116697f7..d2f05a608274 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h | |||
@@ -222,7 +222,7 @@ extern void __iomem *__ioremap(phys_addr_t phys_addr, size_t size, pgprot_t prot | |||
222 | extern void __iounmap(volatile void __iomem *addr); | 222 | extern void __iounmap(volatile void __iomem *addr); |
223 | 223 | ||
224 | #define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) | 224 | #define PROT_DEFAULT (PTE_TYPE_PAGE | PTE_AF | PTE_DIRTY) |
225 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_XN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) | 225 | #define PROT_DEVICE_nGnRE (PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE)) |
226 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) | 226 | #define PROT_NORMAL_NC (PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL_NC)) |
227 | 227 | ||
228 | #define ioremap(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) | 228 | #define ioremap(addr, size) __ioremap((addr), (size), __pgprot(PROT_DEVICE_nGnRE)) |
diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index 0f3b4581d925..75fd13d289b9 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h | |||
@@ -38,7 +38,8 @@ | |||
38 | #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) | 38 | #define PMD_SECT_S (_AT(pmdval_t, 3) << 8) |
39 | #define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) | 39 | #define PMD_SECT_AF (_AT(pmdval_t, 1) << 10) |
40 | #define PMD_SECT_NG (_AT(pmdval_t, 1) << 11) | 40 | #define PMD_SECT_NG (_AT(pmdval_t, 1) << 11) |
41 | #define PMD_SECT_XN (_AT(pmdval_t, 1) << 54) | 41 | #define PMD_SECT_PXN (_AT(pmdval_t, 1) << 53) |
42 | #define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54) | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). | 45 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). |
@@ -57,7 +58,8 @@ | |||
57 | #define PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | 58 | #define PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ |
58 | #define PTE_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ | 59 | #define PTE_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ |
59 | #define PTE_NG (_AT(pteval_t, 1) << 11) /* nG */ | 60 | #define PTE_NG (_AT(pteval_t, 1) << 11) /* nG */ |
60 | #define PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ | 61 | #define PTE_PXN (_AT(pteval_t, 1) << 53) /* Privileged XN */ |
62 | #define PTE_UXN (_AT(pteval_t, 1) << 54) /* User XN */ | ||
61 | 63 | ||
62 | /* | 64 | /* |
63 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). | 65 | * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers). |
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 8960239be722..14aba2db6776 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h | |||
@@ -62,23 +62,23 @@ extern pgprot_t pgprot_default; | |||
62 | 62 | ||
63 | #define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) | 63 | #define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) |
64 | 64 | ||
65 | #define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_XN | PTE_RDONLY) | 65 | #define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
66 | #define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN) | 66 | #define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) |
67 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG) | 67 | #define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) |
68 | #define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) | 68 | #define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
69 | #define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) | 69 | #define PAGE_COPY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) |
70 | #define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) | 70 | #define PAGE_READONLY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
71 | #define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_RDONLY) | 71 | #define PAGE_READONLY_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) |
72 | #define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_XN | PTE_DIRTY) | 72 | #define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) |
73 | #define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_DIRTY) | 73 | #define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) |
74 | 74 | ||
75 | #define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_XN | PTE_RDONLY) | 75 | #define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
76 | #define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN) | 76 | #define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) |
77 | #define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG) | 77 | #define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) |
78 | #define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) | 78 | #define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
79 | #define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) | 79 | #define __PAGE_COPY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) |
80 | #define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_XN | PTE_RDONLY) | 80 | #define __PAGE_READONLY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) |
81 | #define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_RDONLY) | 81 | #define __PAGE_READONLY_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_RDONLY) |
82 | 82 | ||
83 | #endif /* __ASSEMBLY__ */ | 83 | #endif /* __ASSEMBLY__ */ |
84 | 84 | ||
@@ -130,10 +130,10 @@ extern struct page *empty_zero_page; | |||
130 | #define pte_young(pte) (pte_val(pte) & PTE_AF) | 130 | #define pte_young(pte) (pte_val(pte) & PTE_AF) |
131 | #define pte_special(pte) (pte_val(pte) & PTE_SPECIAL) | 131 | #define pte_special(pte) (pte_val(pte) & PTE_SPECIAL) |
132 | #define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY)) | 132 | #define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY)) |
133 | #define pte_exec(pte) (!(pte_val(pte) & PTE_XN)) | 133 | #define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) |
134 | 134 | ||
135 | #define pte_present_exec_user(pte) \ | 135 | #define pte_present_exec_user(pte) \ |
136 | ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_XN)) == \ | 136 | ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ |
137 | (PTE_VALID | PTE_USER)) | 137 | (PTE_VALID | PTE_USER)) |
138 | 138 | ||
139 | #define PTE_BIT_FUNC(fn,op) \ | 139 | #define PTE_BIT_FUNC(fn,op) \ |
@@ -262,7 +262,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr) | |||
262 | 262 | ||
263 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 263 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
264 | { | 264 | { |
265 | const pteval_t mask = PTE_USER | PTE_XN | PTE_RDONLY; | 265 | const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY; |
266 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); | 266 | pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); |
267 | return pte; | 267 | return pte; |
268 | } | 268 | } |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 5dba755a43e6..d385f396dfee 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -96,6 +96,7 @@ config S390 | |||
96 | select HAVE_MEMBLOCK_NODE_MAP | 96 | select HAVE_MEMBLOCK_NODE_MAP |
97 | select HAVE_CMPXCHG_LOCAL | 97 | select HAVE_CMPXCHG_LOCAL |
98 | select HAVE_CMPXCHG_DOUBLE | 98 | select HAVE_CMPXCHG_DOUBLE |
99 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB | ||
99 | select HAVE_VIRT_CPU_ACCOUNTING | 100 | select HAVE_VIRT_CPU_ACCOUNTING |
100 | select VIRT_CPU_ACCOUNTING | 101 | select VIRT_CPU_ACCOUNTING |
101 | select ARCH_DISCARD_MEMBLOCK | 102 | select ARCH_DISCARD_MEMBLOCK |
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index a34a9d612fc0..18cd6b592650 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define PSW32_MASK_CC 0x00003000UL | 20 | #define PSW32_MASK_CC 0x00003000UL |
21 | #define PSW32_MASK_PM 0x00000f00UL | 21 | #define PSW32_MASK_PM 0x00000f00UL |
22 | 22 | ||
23 | #define PSW32_MASK_USER 0x00003F00UL | 23 | #define PSW32_MASK_USER 0x0000FF00UL |
24 | 24 | ||
25 | #define PSW32_ADDR_AMODE 0x80000000UL | 25 | #define PSW32_ADDR_AMODE 0x80000000UL |
26 | #define PSW32_ADDR_INSN 0x7FFFFFFFUL | 26 | #define PSW32_ADDR_INSN 0x7FFFFFFFUL |
diff --git a/arch/s390/include/asm/topology.h b/arch/s390/include/asm/topology.h index 9ca305383760..9935cbd6a46f 100644 --- a/arch/s390/include/asm/topology.h +++ b/arch/s390/include/asm/topology.h | |||
@@ -8,6 +8,9 @@ struct cpu; | |||
8 | 8 | ||
9 | #ifdef CONFIG_SCHED_BOOK | 9 | #ifdef CONFIG_SCHED_BOOK |
10 | 10 | ||
11 | extern unsigned char cpu_socket_id[NR_CPUS]; | ||
12 | #define topology_physical_package_id(cpu) (cpu_socket_id[cpu]) | ||
13 | |||
11 | extern unsigned char cpu_core_id[NR_CPUS]; | 14 | extern unsigned char cpu_core_id[NR_CPUS]; |
12 | extern cpumask_t cpu_core_map[NR_CPUS]; | 15 | extern cpumask_t cpu_core_map[NR_CPUS]; |
13 | 16 | ||
diff --git a/arch/s390/include/uapi/asm/ptrace.h b/arch/s390/include/uapi/asm/ptrace.h index 705588a16d70..a5ca214b34fd 100644 --- a/arch/s390/include/uapi/asm/ptrace.h +++ b/arch/s390/include/uapi/asm/ptrace.h | |||
@@ -239,7 +239,7 @@ typedef struct | |||
239 | #define PSW_MASK_EA 0x00000000UL | 239 | #define PSW_MASK_EA 0x00000000UL |
240 | #define PSW_MASK_BA 0x00000000UL | 240 | #define PSW_MASK_BA 0x00000000UL |
241 | 241 | ||
242 | #define PSW_MASK_USER 0x00003F00UL | 242 | #define PSW_MASK_USER 0x0000FF00UL |
243 | 243 | ||
244 | #define PSW_ADDR_AMODE 0x80000000UL | 244 | #define PSW_ADDR_AMODE 0x80000000UL |
245 | #define PSW_ADDR_INSN 0x7FFFFFFFUL | 245 | #define PSW_ADDR_INSN 0x7FFFFFFFUL |
@@ -269,7 +269,7 @@ typedef struct | |||
269 | #define PSW_MASK_EA 0x0000000100000000UL | 269 | #define PSW_MASK_EA 0x0000000100000000UL |
270 | #define PSW_MASK_BA 0x0000000080000000UL | 270 | #define PSW_MASK_BA 0x0000000080000000UL |
271 | 271 | ||
272 | #define PSW_MASK_USER 0x00003F8180000000UL | 272 | #define PSW_MASK_USER 0x0000FF8180000000UL |
273 | 273 | ||
274 | #define PSW_ADDR_AMODE 0x0000000000000000UL | 274 | #define PSW_ADDR_AMODE 0x0000000000000000UL |
275 | #define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL | 275 | #define PSW_ADDR_INSN 0xFFFFFFFFFFFFFFFFUL |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index a1e8a8694bb7..593fcc9253fc 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -309,6 +309,10 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs) | |||
309 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 309 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | |
310 | (__u64)(regs32.psw.mask & PSW32_MASK_USER) << 32 | | 310 | (__u64)(regs32.psw.mask & PSW32_MASK_USER) << 32 | |
311 | (__u64)(regs32.psw.addr & PSW32_ADDR_AMODE); | 311 | (__u64)(regs32.psw.addr & PSW32_ADDR_AMODE); |
312 | /* Check for invalid user address space control. */ | ||
313 | if ((regs->psw.mask & PSW_MASK_ASC) >= (psw_kernel_bits & PSW_MASK_ASC)) | ||
314 | regs->psw.mask = (psw_user_bits & PSW_MASK_ASC) | | ||
315 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
312 | regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN); | 316 | regs->psw.addr = (__u64)(regs32.psw.addr & PSW32_ADDR_INSN); |
313 | for (i = 0; i < NUM_GPRS; i++) | 317 | for (i = 0; i < NUM_GPRS; i++) |
314 | regs->gprs[i] = (__u64) regs32.gprs[i]; | 318 | regs->gprs[i] = (__u64) regs32.gprs[i]; |
@@ -481,7 +485,10 @@ static int setup_frame32(int sig, struct k_sigaction *ka, | |||
481 | 485 | ||
482 | /* Set up registers for signal handler */ | 486 | /* Set up registers for signal handler */ |
483 | regs->gprs[15] = (__force __u64) frame; | 487 | regs->gprs[15] = (__force __u64) frame; |
484 | regs->psw.mask |= PSW_MASK_BA; /* force amode 31 */ | 488 | /* Force 31 bit amode and default user address space control. */ |
489 | regs->psw.mask = PSW_MASK_BA | | ||
490 | (psw_user_bits & PSW_MASK_ASC) | | ||
491 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
485 | regs->psw.addr = (__force __u64) ka->sa.sa_handler; | 492 | regs->psw.addr = (__force __u64) ka->sa.sa_handler; |
486 | 493 | ||
487 | regs->gprs[2] = map_signal(sig); | 494 | regs->gprs[2] = map_signal(sig); |
@@ -549,7 +556,10 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
549 | 556 | ||
550 | /* Set up registers for signal handler */ | 557 | /* Set up registers for signal handler */ |
551 | regs->gprs[15] = (__force __u64) frame; | 558 | regs->gprs[15] = (__force __u64) frame; |
552 | regs->psw.mask |= PSW_MASK_BA; /* force amode 31 */ | 559 | /* Force 31 bit amode and default user address space control. */ |
560 | regs->psw.mask = PSW_MASK_BA | | ||
561 | (psw_user_bits & PSW_MASK_ASC) | | ||
562 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
553 | regs->psw.addr = (__u64) ka->sa.sa_handler; | 563 | regs->psw.addr = (__u64) ka->sa.sa_handler; |
554 | 564 | ||
555 | regs->gprs[2] = map_signal(sig); | 565 | regs->gprs[2] = map_signal(sig); |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index c13a2a37ef00..d1259d875074 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -136,6 +136,10 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
136 | /* Use regs->psw.mask instead of psw_user_bits to preserve PER bit. */ | 136 | /* Use regs->psw.mask instead of psw_user_bits to preserve PER bit. */ |
137 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | | 137 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | |
138 | (user_sregs.regs.psw.mask & PSW_MASK_USER); | 138 | (user_sregs.regs.psw.mask & PSW_MASK_USER); |
139 | /* Check for invalid user address space control. */ | ||
140 | if ((regs->psw.mask & PSW_MASK_ASC) >= (psw_kernel_bits & PSW_MASK_ASC)) | ||
141 | regs->psw.mask = (psw_user_bits & PSW_MASK_ASC) | | ||
142 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
139 | /* Check for invalid amode */ | 143 | /* Check for invalid amode */ |
140 | if (regs->psw.mask & PSW_MASK_EA) | 144 | if (regs->psw.mask & PSW_MASK_EA) |
141 | regs->psw.mask |= PSW_MASK_BA; | 145 | regs->psw.mask |= PSW_MASK_BA; |
@@ -273,7 +277,10 @@ static int setup_frame(int sig, struct k_sigaction *ka, | |||
273 | 277 | ||
274 | /* Set up registers for signal handler */ | 278 | /* Set up registers for signal handler */ |
275 | regs->gprs[15] = (unsigned long) frame; | 279 | regs->gprs[15] = (unsigned long) frame; |
276 | regs->psw.mask |= PSW_MASK_EA | PSW_MASK_BA; /* 64 bit amode */ | 280 | /* Force default amode and default user address space control. */ |
281 | regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | | ||
282 | (psw_user_bits & PSW_MASK_ASC) | | ||
283 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
277 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; | 284 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; |
278 | 285 | ||
279 | regs->gprs[2] = map_signal(sig); | 286 | regs->gprs[2] = map_signal(sig); |
@@ -346,7 +353,10 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
346 | 353 | ||
347 | /* Set up registers for signal handler */ | 354 | /* Set up registers for signal handler */ |
348 | regs->gprs[15] = (unsigned long) frame; | 355 | regs->gprs[15] = (unsigned long) frame; |
349 | regs->psw.mask |= PSW_MASK_EA | PSW_MASK_BA; /* 64 bit amode */ | 356 | /* Force default amode and default user address space control. */ |
357 | regs->psw.mask = PSW_MASK_EA | PSW_MASK_BA | | ||
358 | (psw_user_bits & PSW_MASK_ASC) | | ||
359 | (regs->psw.mask & ~PSW_MASK_ASC); | ||
350 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; | 360 | regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE; |
351 | 361 | ||
352 | regs->gprs[2] = map_signal(sig); | 362 | regs->gprs[2] = map_signal(sig); |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 54d93f4b6818..dd55f7c20104 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -40,6 +40,7 @@ static DEFINE_SPINLOCK(topology_lock); | |||
40 | static struct mask_info core_info; | 40 | static struct mask_info core_info; |
41 | cpumask_t cpu_core_map[NR_CPUS]; | 41 | cpumask_t cpu_core_map[NR_CPUS]; |
42 | unsigned char cpu_core_id[NR_CPUS]; | 42 | unsigned char cpu_core_id[NR_CPUS]; |
43 | unsigned char cpu_socket_id[NR_CPUS]; | ||
43 | 44 | ||
44 | static struct mask_info book_info; | 45 | static struct mask_info book_info; |
45 | cpumask_t cpu_book_map[NR_CPUS]; | 46 | cpumask_t cpu_book_map[NR_CPUS]; |
@@ -83,11 +84,12 @@ static struct mask_info *add_cpus_to_mask(struct topology_cpu *tl_cpu, | |||
83 | cpumask_set_cpu(lcpu, &book->mask); | 84 | cpumask_set_cpu(lcpu, &book->mask); |
84 | cpu_book_id[lcpu] = book->id; | 85 | cpu_book_id[lcpu] = book->id; |
85 | cpumask_set_cpu(lcpu, &core->mask); | 86 | cpumask_set_cpu(lcpu, &core->mask); |
87 | cpu_core_id[lcpu] = rcpu; | ||
86 | if (one_core_per_cpu) { | 88 | if (one_core_per_cpu) { |
87 | cpu_core_id[lcpu] = rcpu; | 89 | cpu_socket_id[lcpu] = rcpu; |
88 | core = core->next; | 90 | core = core->next; |
89 | } else { | 91 | } else { |
90 | cpu_core_id[lcpu] = core->id; | 92 | cpu_socket_id[lcpu] = core->id; |
91 | } | 93 | } |
92 | smp_cpu_set_polarization(lcpu, tl_cpu->pp); | 94 | smp_cpu_set_polarization(lcpu, tl_cpu->pp); |
93 | } | 95 | } |
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 8b8285310b5a..1f5315d1215c 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -180,8 +180,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
180 | addr = start; | 180 | addr = start; |
181 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 181 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
182 | end = start + len; | 182 | end = start + len; |
183 | if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ, | 183 | if ((end < start) || (end > TASK_SIZE)) |
184 | (void __user *)start, len))) | ||
185 | return 0; | 184 | return 0; |
186 | 185 | ||
187 | local_irq_save(flags); | 186 | local_irq_save(flags); |
@@ -229,7 +228,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
229 | addr = start; | 228 | addr = start; |
230 | len = (unsigned long) nr_pages << PAGE_SHIFT; | 229 | len = (unsigned long) nr_pages << PAGE_SHIFT; |
231 | end = start + len; | 230 | end = start + len; |
232 | if (end < start) | 231 | if ((end < start) || (end > TASK_SIZE)) |
233 | goto slow_irqon; | 232 | goto slow_irqon; |
234 | 233 | ||
235 | /* | 234 | /* |
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index fc2de5528dcc..b00000e8aef6 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -67,6 +67,7 @@ static struct usb_device_id ath3k_table[] = { | |||
67 | { USB_DEVICE(0x13d3, 0x3304) }, | 67 | { USB_DEVICE(0x13d3, 0x3304) }, |
68 | { USB_DEVICE(0x0930, 0x0215) }, | 68 | { USB_DEVICE(0x0930, 0x0215) }, |
69 | { USB_DEVICE(0x0489, 0xE03D) }, | 69 | { USB_DEVICE(0x0489, 0xE03D) }, |
70 | { USB_DEVICE(0x0489, 0xE027) }, | ||
70 | 71 | ||
71 | /* Atheros AR9285 Malbec with sflash firmware */ | 72 | /* Atheros AR9285 Malbec with sflash firmware */ |
72 | { USB_DEVICE(0x03F0, 0x311D) }, | 73 | { USB_DEVICE(0x03F0, 0x311D) }, |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index debda27df9b0..ee82f2fb65f0 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -124,6 +124,7 @@ static struct usb_device_id blacklist_table[] = { | |||
124 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, | 124 | { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, |
125 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, | 125 | { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, |
126 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, | 126 | { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, |
127 | { USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE }, | ||
127 | 128 | ||
128 | /* Atheros AR9285 Malbec with sflash firmware */ | 129 | /* Atheros AR9285 Malbec with sflash firmware */ |
129 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, | 130 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, |
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c index ff63560b8467..0c48b0e05ed6 100644 --- a/drivers/bus/omap-ocp2scp.c +++ b/drivers/bus/omap-ocp2scp.c | |||
@@ -22,6 +22,26 @@ | |||
22 | #include <linux/pm_runtime.h> | 22 | #include <linux/pm_runtime.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/platform_data/omap_ocp2scp.h> | ||
26 | |||
27 | /** | ||
28 | * _count_resources - count for the number of resources | ||
29 | * @res: struct resource * | ||
30 | * | ||
31 | * Count and return the number of resources populated for the device that is | ||
32 | * connected to ocp2scp. | ||
33 | */ | ||
34 | static unsigned _count_resources(struct resource *res) | ||
35 | { | ||
36 | int cnt = 0; | ||
37 | |||
38 | while (res->start != res->end) { | ||
39 | cnt++; | ||
40 | res++; | ||
41 | } | ||
42 | |||
43 | return cnt; | ||
44 | } | ||
25 | 45 | ||
26 | static int ocp2scp_remove_devices(struct device *dev, void *c) | 46 | static int ocp2scp_remove_devices(struct device *dev, void *c) |
27 | { | 47 | { |
@@ -34,20 +54,62 @@ static int ocp2scp_remove_devices(struct device *dev, void *c) | |||
34 | 54 | ||
35 | static int __devinit omap_ocp2scp_probe(struct platform_device *pdev) | 55 | static int __devinit omap_ocp2scp_probe(struct platform_device *pdev) |
36 | { | 56 | { |
37 | int ret; | 57 | int ret; |
38 | struct device_node *np = pdev->dev.of_node; | 58 | unsigned res_cnt, i; |
59 | struct device_node *np = pdev->dev.of_node; | ||
60 | struct platform_device *pdev_child; | ||
61 | struct omap_ocp2scp_platform_data *pdata = pdev->dev.platform_data; | ||
62 | struct omap_ocp2scp_dev *dev; | ||
39 | 63 | ||
40 | if (np) { | 64 | if (np) { |
41 | ret = of_platform_populate(np, NULL, NULL, &pdev->dev); | 65 | ret = of_platform_populate(np, NULL, NULL, &pdev->dev); |
42 | if (ret) { | 66 | if (ret) { |
43 | dev_err(&pdev->dev, "failed to add resources for ocp2scp child\n"); | 67 | dev_err(&pdev->dev, |
68 | "failed to add resources for ocp2scp child\n"); | ||
44 | goto err0; | 69 | goto err0; |
45 | } | 70 | } |
71 | } else if (pdata) { | ||
72 | for (i = 0, dev = *pdata->devices; i < pdata->dev_cnt; i++, | ||
73 | dev++) { | ||
74 | res_cnt = _count_resources(dev->res); | ||
75 | |||
76 | pdev_child = platform_device_alloc(dev->drv_name, | ||
77 | PLATFORM_DEVID_AUTO); | ||
78 | if (!pdev_child) { | ||
79 | dev_err(&pdev->dev, | ||
80 | "failed to allocate mem for ocp2scp child\n"); | ||
81 | goto err0; | ||
82 | } | ||
83 | |||
84 | ret = platform_device_add_resources(pdev_child, | ||
85 | dev->res, res_cnt); | ||
86 | if (ret) { | ||
87 | dev_err(&pdev->dev, | ||
88 | "failed to add resources for ocp2scp child\n"); | ||
89 | goto err1; | ||
90 | } | ||
91 | |||
92 | pdev_child->dev.parent = &pdev->dev; | ||
93 | |||
94 | ret = platform_device_add(pdev_child); | ||
95 | if (ret) { | ||
96 | dev_err(&pdev->dev, | ||
97 | "failed to register ocp2scp child device\n"); | ||
98 | goto err1; | ||
99 | } | ||
100 | } | ||
101 | } else { | ||
102 | dev_err(&pdev->dev, "OCP2SCP initialized without plat data\n"); | ||
103 | return -EINVAL; | ||
46 | } | 104 | } |
105 | |||
47 | pm_runtime_enable(&pdev->dev); | 106 | pm_runtime_enable(&pdev->dev); |
48 | 107 | ||
49 | return 0; | 108 | return 0; |
50 | 109 | ||
110 | err1: | ||
111 | platform_device_put(pdev_child); | ||
112 | |||
51 | err0: | 113 | err0: |
52 | device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); | 114 | device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); |
53 | 115 | ||
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index b726b478a4f5..6345878ae1e7 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -143,7 +143,7 @@ static void intel_crt_dpms(struct drm_connector *connector, int mode) | |||
143 | int old_dpms; | 143 | int old_dpms; |
144 | 144 | ||
145 | /* PCH platforms and VLV only support on/off. */ | 145 | /* PCH platforms and VLV only support on/off. */ |
146 | if (INTEL_INFO(dev)->gen < 5 && mode != DRM_MODE_DPMS_ON) | 146 | if (INTEL_INFO(dev)->gen >= 5 && mode != DRM_MODE_DPMS_ON) |
147 | mode = DRM_MODE_DPMS_OFF; | 147 | mode = DRM_MODE_DPMS_OFF; |
148 | 148 | ||
149 | if (mode == connector->dpms) | 149 | if (mode == connector->dpms) |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 461a637f1ef7..4154bcd7a070 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3841,6 +3841,17 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc, | |||
3841 | } | 3841 | } |
3842 | } | 3842 | } |
3843 | 3843 | ||
3844 | if (intel_encoder->type == INTEL_OUTPUT_EDP) { | ||
3845 | /* Use VBT settings if we have an eDP panel */ | ||
3846 | unsigned int edp_bpc = dev_priv->edp.bpp / 3; | ||
3847 | |||
3848 | if (edp_bpc < display_bpc) { | ||
3849 | DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); | ||
3850 | display_bpc = edp_bpc; | ||
3851 | } | ||
3852 | continue; | ||
3853 | } | ||
3854 | |||
3844 | /* | 3855 | /* |
3845 | * HDMI is either 12 or 8, so if the display lets 10bpc sneak | 3856 | * HDMI is either 12 or 8, so if the display lets 10bpc sneak |
3846 | * through, clamp it down. (Note: >12bpc will be caught below.) | 3857 | * through, clamp it down. (Note: >12bpc will be caught below.) |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 79d308da29ff..c600fb06e25e 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -2382,6 +2382,18 @@ intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, uint16_t flags) | |||
2382 | return true; | 2382 | return true; |
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | static void intel_sdvo_output_cleanup(struct intel_sdvo *intel_sdvo) | ||
2386 | { | ||
2387 | struct drm_device *dev = intel_sdvo->base.base.dev; | ||
2388 | struct drm_connector *connector, *tmp; | ||
2389 | |||
2390 | list_for_each_entry_safe(connector, tmp, | ||
2391 | &dev->mode_config.connector_list, head) { | ||
2392 | if (intel_attached_encoder(connector) == &intel_sdvo->base) | ||
2393 | intel_sdvo_destroy(connector); | ||
2394 | } | ||
2395 | } | ||
2396 | |||
2385 | static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo, | 2397 | static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo, |
2386 | struct intel_sdvo_connector *intel_sdvo_connector, | 2398 | struct intel_sdvo_connector *intel_sdvo_connector, |
2387 | int type) | 2399 | int type) |
@@ -2705,7 +2717,8 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) | |||
2705 | intel_sdvo->caps.output_flags) != true) { | 2717 | intel_sdvo->caps.output_flags) != true) { |
2706 | DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", | 2718 | DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", |
2707 | SDVO_NAME(intel_sdvo)); | 2719 | SDVO_NAME(intel_sdvo)); |
2708 | goto err; | 2720 | /* Output_setup can leave behind connectors! */ |
2721 | goto err_output; | ||
2709 | } | 2722 | } |
2710 | 2723 | ||
2711 | /* Only enable the hotplug irq if we need it, to work around noisy | 2724 | /* Only enable the hotplug irq if we need it, to work around noisy |
@@ -2718,12 +2731,12 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) | |||
2718 | 2731 | ||
2719 | /* Set the input timing to the screen. Assume always input 0. */ | 2732 | /* Set the input timing to the screen. Assume always input 0. */ |
2720 | if (!intel_sdvo_set_target_input(intel_sdvo)) | 2733 | if (!intel_sdvo_set_target_input(intel_sdvo)) |
2721 | goto err; | 2734 | goto err_output; |
2722 | 2735 | ||
2723 | if (!intel_sdvo_get_input_pixel_clock_range(intel_sdvo, | 2736 | if (!intel_sdvo_get_input_pixel_clock_range(intel_sdvo, |
2724 | &intel_sdvo->pixel_clock_min, | 2737 | &intel_sdvo->pixel_clock_min, |
2725 | &intel_sdvo->pixel_clock_max)) | 2738 | &intel_sdvo->pixel_clock_max)) |
2726 | goto err; | 2739 | goto err_output; |
2727 | 2740 | ||
2728 | DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, " | 2741 | DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, " |
2729 | "clock range %dMHz - %dMHz, " | 2742 | "clock range %dMHz - %dMHz, " |
@@ -2743,6 +2756,9 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob) | |||
2743 | (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); | 2756 | (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); |
2744 | return true; | 2757 | return true; |
2745 | 2758 | ||
2759 | err_output: | ||
2760 | intel_sdvo_output_cleanup(intel_sdvo); | ||
2761 | |||
2746 | err: | 2762 | err: |
2747 | drm_encoder_cleanup(&intel_encoder->base); | 2763 | drm_encoder_cleanup(&intel_encoder->base); |
2748 | i2c_del_adapter(&intel_sdvo->ddc); | 2764 | i2c_del_adapter(&intel_sdvo->ddc); |
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index ba498f8e47a2..010bae19554a 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c | |||
@@ -1625,7 +1625,7 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) | |||
1625 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0); | 1625 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0); |
1626 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); | 1626 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); |
1627 | /* some early dce3.2 boards have a bug in their transmitter control table */ | 1627 | /* some early dce3.2 boards have a bug in their transmitter control table */ |
1628 | if ((rdev->family != CHIP_RV710) || (rdev->family != CHIP_RV730)) | 1628 | if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730)) |
1629 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); | 1629 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); |
1630 | } | 1630 | } |
1631 | if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { | 1631 | if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { |
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 860dc4813e99..bd2a3b40cd12 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
@@ -749,7 +749,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, | |||
749 | /* clear the pages coming from the pool if requested */ | 749 | /* clear the pages coming from the pool if requested */ |
750 | if (flags & TTM_PAGE_FLAG_ZERO_ALLOC) { | 750 | if (flags & TTM_PAGE_FLAG_ZERO_ALLOC) { |
751 | list_for_each_entry(p, &plist, lru) { | 751 | list_for_each_entry(p, &plist, lru) { |
752 | clear_page(page_address(p)); | 752 | if (PageHighMem(p)) |
753 | clear_highpage(p); | ||
754 | else | ||
755 | clear_page(page_address(p)); | ||
753 | } | 756 | } |
754 | } | 757 | } |
755 | 758 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index bf8260133ea9..7d759a430294 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c | |||
@@ -308,9 +308,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm) | |||
308 | if (unlikely(to_page == NULL)) | 308 | if (unlikely(to_page == NULL)) |
309 | goto out_err; | 309 | goto out_err; |
310 | 310 | ||
311 | preempt_disable(); | ||
312 | copy_highpage(to_page, from_page); | 311 | copy_highpage(to_page, from_page); |
313 | preempt_enable(); | ||
314 | page_cache_release(from_page); | 312 | page_cache_release(from_page); |
315 | } | 313 | } |
316 | 314 | ||
@@ -358,9 +356,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) | |||
358 | ret = PTR_ERR(to_page); | 356 | ret = PTR_ERR(to_page); |
359 | goto out_err; | 357 | goto out_err; |
360 | } | 358 | } |
361 | preempt_disable(); | ||
362 | copy_highpage(to_page, from_page); | 359 | copy_highpage(to_page, from_page); |
363 | preempt_enable(); | ||
364 | set_page_dirty(to_page); | 360 | set_page_dirty(to_page); |
365 | mark_page_accessed(to_page); | 361 | mark_page_accessed(to_page); |
366 | page_cache_release(to_page); | 362 | page_cache_release(to_page); |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c index b07ca2e4d04b..7290811f89be 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | |||
@@ -110,6 +110,8 @@ int vmw_get_cap_3d_ioctl(struct drm_device *dev, void *data, | |||
110 | memcpy_fromio(bounce, &fifo_mem[SVGA_FIFO_3D_CAPS], size); | 110 | memcpy_fromio(bounce, &fifo_mem[SVGA_FIFO_3D_CAPS], size); |
111 | 111 | ||
112 | ret = copy_to_user(buffer, bounce, size); | 112 | ret = copy_to_user(buffer, bounce, size); |
113 | if (ret) | ||
114 | ret = -EFAULT; | ||
113 | vfree(bounce); | 115 | vfree(bounce); |
114 | 116 | ||
115 | if (unlikely(ret != 0)) | 117 | if (unlikely(ret != 0)) |
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c index f676c01bb471..6fcd466d0825 100644 --- a/drivers/hid/hid-microsoft.c +++ b/drivers/hid/hid-microsoft.c | |||
@@ -46,9 +46,9 @@ static __u8 *ms_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
46 | rdesc[559] = 0x45; | 46 | rdesc[559] = 0x45; |
47 | } | 47 | } |
48 | /* the same as above (s/usage/physical/) */ | 48 | /* the same as above (s/usage/physical/) */ |
49 | if ((quirks & MS_RDESC_3K) && *rsize == 106 && | 49 | if ((quirks & MS_RDESC_3K) && *rsize == 106 && rdesc[94] == 0x19 && |
50 | !memcmp((char []){ 0x19, 0x00, 0x29, 0xff }, | 50 | rdesc[95] == 0x00 && rdesc[96] == 0x29 && |
51 | &rdesc[94], 4)) { | 51 | rdesc[97] == 0xff) { |
52 | rdesc[94] = 0x35; | 52 | rdesc[94] = 0x35; |
53 | rdesc[96] = 0x45; | 53 | rdesc[96] = 0x45; |
54 | } | 54 | } |
diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index dc670ccc6978..16c78f1c5ef2 100644 --- a/drivers/irqchip/irq-bcm2835.c +++ b/drivers/irqchip/irq-bcm2835.c | |||
@@ -168,7 +168,8 @@ static int __init armctrl_of_init(struct device_node *node, | |||
168 | } | 168 | } |
169 | 169 | ||
170 | static struct of_device_id irq_of_match[] __initconst = { | 170 | static struct of_device_id irq_of_match[] __initconst = { |
171 | { .compatible = "brcm,bcm2835-armctrl-ic", .data = armctrl_of_init } | 171 | { .compatible = "brcm,bcm2835-armctrl-ic", .data = armctrl_of_init }, |
172 | { } | ||
172 | }; | 173 | }; |
173 | 174 | ||
174 | void __init bcm2835_init_irq(void) | 175 | void __init bcm2835_init_irq(void) |
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 92317e9c0f73..60ac46f4ac08 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -1860,10 +1860,14 @@ jme_open(struct net_device *netdev) | |||
1860 | jme_clear_pm(jme); | 1860 | jme_clear_pm(jme); |
1861 | JME_NAPI_ENABLE(jme); | 1861 | JME_NAPI_ENABLE(jme); |
1862 | 1862 | ||
1863 | tasklet_enable(&jme->linkch_task); | 1863 | tasklet_init(&jme->linkch_task, jme_link_change_tasklet, |
1864 | tasklet_enable(&jme->txclean_task); | 1864 | (unsigned long) jme); |
1865 | tasklet_hi_enable(&jme->rxclean_task); | 1865 | tasklet_init(&jme->txclean_task, jme_tx_clean_tasklet, |
1866 | tasklet_hi_enable(&jme->rxempty_task); | 1866 | (unsigned long) jme); |
1867 | tasklet_init(&jme->rxclean_task, jme_rx_clean_tasklet, | ||
1868 | (unsigned long) jme); | ||
1869 | tasklet_init(&jme->rxempty_task, jme_rx_empty_tasklet, | ||
1870 | (unsigned long) jme); | ||
1867 | 1871 | ||
1868 | rc = jme_request_irq(jme); | 1872 | rc = jme_request_irq(jme); |
1869 | if (rc) | 1873 | if (rc) |
@@ -3079,22 +3083,6 @@ jme_init_one(struct pci_dev *pdev, | |||
3079 | tasklet_init(&jme->pcc_task, | 3083 | tasklet_init(&jme->pcc_task, |
3080 | jme_pcc_tasklet, | 3084 | jme_pcc_tasklet, |
3081 | (unsigned long) jme); | 3085 | (unsigned long) jme); |
3082 | tasklet_init(&jme->linkch_task, | ||
3083 | jme_link_change_tasklet, | ||
3084 | (unsigned long) jme); | ||
3085 | tasklet_init(&jme->txclean_task, | ||
3086 | jme_tx_clean_tasklet, | ||
3087 | (unsigned long) jme); | ||
3088 | tasklet_init(&jme->rxclean_task, | ||
3089 | jme_rx_clean_tasklet, | ||
3090 | (unsigned long) jme); | ||
3091 | tasklet_init(&jme->rxempty_task, | ||
3092 | jme_rx_empty_tasklet, | ||
3093 | (unsigned long) jme); | ||
3094 | tasklet_disable_nosync(&jme->linkch_task); | ||
3095 | tasklet_disable_nosync(&jme->txclean_task); | ||
3096 | tasklet_disable_nosync(&jme->rxclean_task); | ||
3097 | tasklet_disable_nosync(&jme->rxempty_task); | ||
3098 | jme->dpi.cur = PCC_P1; | 3086 | jme->dpi.cur = PCC_P1; |
3099 | 3087 | ||
3100 | jme->reg_ghc = 0; | 3088 | jme->reg_ghc = 0; |
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index e558edd1cb6c..69e01977a1dd 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c | |||
@@ -5459,8 +5459,10 @@ static int prepare_hardware(struct net_device *dev) | |||
5459 | rc = request_irq(dev->irq, netdev_intr, IRQF_SHARED, dev->name, dev); | 5459 | rc = request_irq(dev->irq, netdev_intr, IRQF_SHARED, dev->name, dev); |
5460 | if (rc) | 5460 | if (rc) |
5461 | return rc; | 5461 | return rc; |
5462 | tasklet_enable(&hw_priv->rx_tasklet); | 5462 | tasklet_init(&hw_priv->rx_tasklet, rx_proc_task, |
5463 | tasklet_enable(&hw_priv->tx_tasklet); | 5463 | (unsigned long) hw_priv); |
5464 | tasklet_init(&hw_priv->tx_tasklet, tx_proc_task, | ||
5465 | (unsigned long) hw_priv); | ||
5464 | 5466 | ||
5465 | hw->promiscuous = 0; | 5467 | hw->promiscuous = 0; |
5466 | hw->all_multi = 0; | 5468 | hw->all_multi = 0; |
@@ -7033,16 +7035,6 @@ static int __devinit pcidev_init(struct pci_dev *pdev, | |||
7033 | spin_lock_init(&hw_priv->hwlock); | 7035 | spin_lock_init(&hw_priv->hwlock); |
7034 | mutex_init(&hw_priv->lock); | 7036 | mutex_init(&hw_priv->lock); |
7035 | 7037 | ||
7036 | /* tasklet is enabled. */ | ||
7037 | tasklet_init(&hw_priv->rx_tasklet, rx_proc_task, | ||
7038 | (unsigned long) hw_priv); | ||
7039 | tasklet_init(&hw_priv->tx_tasklet, tx_proc_task, | ||
7040 | (unsigned long) hw_priv); | ||
7041 | |||
7042 | /* tasklet_enable will decrement the atomic counter. */ | ||
7043 | tasklet_disable(&hw_priv->rx_tasklet); | ||
7044 | tasklet_disable(&hw_priv->tx_tasklet); | ||
7045 | |||
7046 | for (i = 0; i < TOTAL_PORT_NUM; i++) | 7038 | for (i = 0; i < TOTAL_PORT_NUM; i++) |
7047 | init_waitqueue_head(&hw_priv->counter[i].counter); | 7039 | init_waitqueue_head(&hw_priv->counter[i].counter); |
7048 | 7040 | ||
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 62d1baf111ea..c53c0f4e2ce3 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -2110,7 +2110,7 @@ static void __devinit smsc911x_read_mac_address(struct net_device *dev) | |||
2110 | static int __devinit smsc911x_init(struct net_device *dev) | 2110 | static int __devinit smsc911x_init(struct net_device *dev) |
2111 | { | 2111 | { |
2112 | struct smsc911x_data *pdata = netdev_priv(dev); | 2112 | struct smsc911x_data *pdata = netdev_priv(dev); |
2113 | unsigned int byte_test; | 2113 | unsigned int byte_test, mask; |
2114 | unsigned int to = 100; | 2114 | unsigned int to = 100; |
2115 | 2115 | ||
2116 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); | 2116 | SMSC_TRACE(pdata, probe, "Driver Parameters:"); |
@@ -2130,9 +2130,22 @@ static int __devinit smsc911x_init(struct net_device *dev) | |||
2130 | /* | 2130 | /* |
2131 | * poll the READY bit in PMT_CTRL. Any other access to the device is | 2131 | * poll the READY bit in PMT_CTRL. Any other access to the device is |
2132 | * forbidden while this bit isn't set. Try for 100ms | 2132 | * forbidden while this bit isn't set. Try for 100ms |
2133 | * | ||
2134 | * Note that this test is done before the WORD_SWAP register is | ||
2135 | * programmed. So in some configurations the READY bit is at 16 before | ||
2136 | * WORD_SWAP is written to. This issue is worked around by waiting | ||
2137 | * until either bit 0 or bit 16 gets set in PMT_CTRL. | ||
2138 | * | ||
2139 | * SMSC has confirmed that checking bit 16 (marked as reserved in | ||
2140 | * the datasheet) is fine since these bits "will either never be set | ||
2141 | * or can only go high after READY does (so also indicate the device | ||
2142 | * is ready)". | ||
2133 | */ | 2143 | */ |
2134 | while (!(smsc911x_reg_read(pdata, PMT_CTRL) & PMT_CTRL_READY_) && --to) | 2144 | |
2145 | mask = PMT_CTRL_READY_ | swahw32(PMT_CTRL_READY_); | ||
2146 | while (!(smsc911x_reg_read(pdata, PMT_CTRL) & mask) && --to) | ||
2135 | udelay(1000); | 2147 | udelay(1000); |
2148 | |||
2136 | if (to == 0) { | 2149 | if (to == 0) { |
2137 | pr_err("Device not READY in 100ms aborting\n"); | 2150 | pr_err("Device not READY in 100ms aborting\n"); |
2138 | return -ENODEV; | 2151 | return -ENODEV; |
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 4e9810013850..66e025ad5df1 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
@@ -917,7 +917,7 @@ static int tile_net_setup_interrupts(struct net_device *dev) | |||
917 | ingress_irq = rc; | 917 | ingress_irq = rc; |
918 | tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU); | 918 | tile_irq_activate(ingress_irq, TILE_IRQ_PERCPU); |
919 | rc = request_irq(ingress_irq, tile_net_handle_ingress_irq, | 919 | rc = request_irq(ingress_irq, tile_net_handle_ingress_irq, |
920 | 0, NULL, NULL); | 920 | 0, "tile_net", NULL); |
921 | if (rc != 0) { | 921 | if (rc != 0) { |
922 | netdev_err(dev, "request_irq failed: %d\n", rc); | 922 | netdev_err(dev, "request_irq failed: %d\n", rc); |
923 | destroy_irq(ingress_irq); | 923 | destroy_irq(ingress_irq); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 1d04754a6637..77e6db9dcfed 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -942,6 +942,10 @@ static int axienet_open(struct net_device *ndev) | |||
942 | phy_start(lp->phy_dev); | 942 | phy_start(lp->phy_dev); |
943 | } | 943 | } |
944 | 944 | ||
945 | /* Enable tasklets for Axi DMA error handling */ | ||
946 | tasklet_init(&lp->dma_err_tasklet, axienet_dma_err_handler, | ||
947 | (unsigned long) lp); | ||
948 | |||
945 | /* Enable interrupts for Axi DMA Tx */ | 949 | /* Enable interrupts for Axi DMA Tx */ |
946 | ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev); | 950 | ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev); |
947 | if (ret) | 951 | if (ret) |
@@ -950,8 +954,7 @@ static int axienet_open(struct net_device *ndev) | |||
950 | ret = request_irq(lp->rx_irq, axienet_rx_irq, 0, ndev->name, ndev); | 954 | ret = request_irq(lp->rx_irq, axienet_rx_irq, 0, ndev->name, ndev); |
951 | if (ret) | 955 | if (ret) |
952 | goto err_rx_irq; | 956 | goto err_rx_irq; |
953 | /* Enable tasklets for Axi DMA error handling */ | 957 | |
954 | tasklet_enable(&lp->dma_err_tasklet); | ||
955 | return 0; | 958 | return 0; |
956 | 959 | ||
957 | err_rx_irq: | 960 | err_rx_irq: |
@@ -960,6 +963,7 @@ err_tx_irq: | |||
960 | if (lp->phy_dev) | 963 | if (lp->phy_dev) |
961 | phy_disconnect(lp->phy_dev); | 964 | phy_disconnect(lp->phy_dev); |
962 | lp->phy_dev = NULL; | 965 | lp->phy_dev = NULL; |
966 | tasklet_kill(&lp->dma_err_tasklet); | ||
963 | dev_err(lp->dev, "request_irq() failed\n"); | 967 | dev_err(lp->dev, "request_irq() failed\n"); |
964 | return ret; | 968 | return ret; |
965 | } | 969 | } |
@@ -1613,10 +1617,6 @@ static int __devinit axienet_of_probe(struct platform_device *op) | |||
1613 | goto err_iounmap_2; | 1617 | goto err_iounmap_2; |
1614 | } | 1618 | } |
1615 | 1619 | ||
1616 | tasklet_init(&lp->dma_err_tasklet, axienet_dma_err_handler, | ||
1617 | (unsigned long) lp); | ||
1618 | tasklet_disable(&lp->dma_err_tasklet); | ||
1619 | |||
1620 | return 0; | 1620 | return 0; |
1621 | 1621 | ||
1622 | err_iounmap_2: | 1622 | err_iounmap_2: |
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 6428fcbbdd4b..daec9b05d168 100644 --- a/drivers/net/phy/mdio-bitbang.c +++ b/drivers/net/phy/mdio-bitbang.c | |||
@@ -234,7 +234,6 @@ void free_mdio_bitbang(struct mii_bus *bus) | |||
234 | struct mdiobb_ctrl *ctrl = bus->priv; | 234 | struct mdiobb_ctrl *ctrl = bus->priv; |
235 | 235 | ||
236 | module_put(ctrl->ops->owner); | 236 | module_put(ctrl->ops->owner); |
237 | mdiobus_unregister(bus); | ||
238 | mdiobus_free(bus); | 237 | mdiobus_free(bus); |
239 | } | 238 | } |
240 | EXPORT_SYMBOL(free_mdio_bitbang); | 239 | EXPORT_SYMBOL(free_mdio_bitbang); |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 4cd582a4f625..74fab1a40156 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -540,10 +540,12 @@ advance: | |||
540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) | 540 | (ctx->ether_desc == NULL) || (ctx->control != intf)) |
541 | goto error; | 541 | goto error; |
542 | 542 | ||
543 | /* claim interfaces, if any */ | 543 | /* claim data interface, if different from control */ |
544 | temp = usb_driver_claim_interface(driver, ctx->data, dev); | 544 | if (ctx->data != ctx->control) { |
545 | if (temp) | 545 | temp = usb_driver_claim_interface(driver, ctx->data, dev); |
546 | goto error; | 546 | if (temp) |
547 | goto error; | ||
548 | } | ||
547 | 549 | ||
548 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; | 550 | iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; |
549 | 551 | ||
@@ -623,6 +625,10 @@ static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf) | |||
623 | 625 | ||
624 | tasklet_kill(&ctx->bh); | 626 | tasklet_kill(&ctx->bh); |
625 | 627 | ||
628 | /* handle devices with combined control and data interface */ | ||
629 | if (ctx->control == ctx->data) | ||
630 | ctx->data = NULL; | ||
631 | |||
626 | /* disconnect master --> disconnect slave */ | 632 | /* disconnect master --> disconnect slave */ |
627 | if (intf == ctx->control && ctx->data) { | 633 | if (intf == ctx->control && ctx->data) { |
628 | usb_set_intfdata(ctx->data, NULL); | 634 | usb_set_intfdata(ctx->data, NULL); |
@@ -1245,6 +1251,14 @@ static const struct usb_device_id cdc_devs[] = { | |||
1245 | .driver_info = (unsigned long) &wwan_info, | 1251 | .driver_info = (unsigned long) &wwan_info, |
1246 | }, | 1252 | }, |
1247 | 1253 | ||
1254 | /* Huawei NCM devices disguised as vendor specific */ | ||
1255 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x16), | ||
1256 | .driver_info = (unsigned long)&wwan_info, | ||
1257 | }, | ||
1258 | { USB_VENDOR_AND_INTERFACE_INFO(0x12d1, 0xff, 0x02, 0x46), | ||
1259 | .driver_info = (unsigned long)&wwan_info, | ||
1260 | }, | ||
1261 | |||
1248 | /* Generic CDC-NCM devices */ | 1262 | /* Generic CDC-NCM devices */ |
1249 | { USB_INTERFACE_INFO(USB_CLASS_COMM, | 1263 | { USB_INTERFACE_INFO(USB_CLASS_COMM, |
1250 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), | 1264 | USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE), |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 3286166415b4..362cb8cfeb92 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -184,7 +184,7 @@ static int smsc95xx_mdio_read(struct net_device *netdev, int phy_id, int idx) | |||
184 | /* set the address, index & direction (read from PHY) */ | 184 | /* set the address, index & direction (read from PHY) */ |
185 | phy_id &= dev->mii.phy_id_mask; | 185 | phy_id &= dev->mii.phy_id_mask; |
186 | idx &= dev->mii.reg_num_mask; | 186 | idx &= dev->mii.reg_num_mask; |
187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_; | 187 | addr = (phy_id << 11) | (idx << 6) | MII_READ_ | MII_BUSY_; |
188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 188 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 189 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
190 | 190 | ||
@@ -221,7 +221,7 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx, | |||
221 | /* set the address, index & direction (write to PHY) */ | 221 | /* set the address, index & direction (write to PHY) */ |
222 | phy_id &= dev->mii.phy_id_mask; | 222 | phy_id &= dev->mii.phy_id_mask; |
223 | idx &= dev->mii.reg_num_mask; | 223 | idx &= dev->mii.reg_num_mask; |
224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_; | 224 | addr = (phy_id << 11) | (idx << 6) | MII_WRITE_ | MII_BUSY_; |
225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); | 225 | ret = smsc95xx_write_reg(dev, MII_ADDR, addr); |
226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); | 226 | check_warn_goto_done(ret, "Error writing MII_ADDR"); |
227 | 227 | ||
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 7b4adde93c01..8b5c61917076 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * VXLAN: Virtual eXtensiable Local Area Network | 2 | * VXLAN: Virtual eXtensible Local Area Network |
3 | * | 3 | * |
4 | * Copyright (c) 2012 Vyatta Inc. | 4 | * Copyright (c) 2012 Vyatta Inc. |
5 | * | 5 | * |
@@ -50,8 +50,8 @@ | |||
50 | 50 | ||
51 | #define VXLAN_N_VID (1u << 24) | 51 | #define VXLAN_N_VID (1u << 24) |
52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) | 52 | #define VXLAN_VID_MASK (VXLAN_N_VID - 1) |
53 | /* VLAN + IP header + UDP + VXLAN */ | 53 | /* IP header + UDP + VXLAN + Ethernet header */ |
54 | #define VXLAN_HEADROOM (4 + 20 + 8 + 8) | 54 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) |
55 | 55 | ||
56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ | 56 | #define VXLAN_FLAGS 0x08000000 /* struct vxlanhdr.vx_flags required value. */ |
57 | 57 | ||
@@ -1102,6 +1102,10 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, | |||
1102 | 1102 | ||
1103 | if (!tb[IFLA_MTU]) | 1103 | if (!tb[IFLA_MTU]) |
1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; | 1104 | dev->mtu = lowerdev->mtu - VXLAN_HEADROOM; |
1105 | |||
1106 | /* update header length based on lower device */ | ||
1107 | dev->hard_header_len = lowerdev->hard_header_len + | ||
1108 | VXLAN_HEADROOM; | ||
1105 | } | 1109 | } |
1106 | 1110 | ||
1107 | if (data[IFLA_VXLAN_TOS]) | 1111 | if (data[IFLA_VXLAN_TOS]) |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index a6f1e8166008..481345c23ded 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -4401,7 +4401,7 @@ static s32 brcmf_mode_to_nl80211_iftype(s32 mode) | |||
4401 | 4401 | ||
4402 | static void brcmf_wiphy_pno_params(struct wiphy *wiphy) | 4402 | static void brcmf_wiphy_pno_params(struct wiphy *wiphy) |
4403 | { | 4403 | { |
4404 | #ifndef CONFIG_BRCMFISCAN | 4404 | #ifndef CONFIG_BRCMISCAN |
4405 | /* scheduled scan settings */ | 4405 | /* scheduled scan settings */ |
4406 | wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; | 4406 | wiphy->max_sched_scan_ssids = BRCMF_PNO_MAX_PFN_COUNT; |
4407 | wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT; | 4407 | wiphy->max_match_sets = BRCMF_PNO_MAX_PFN_COUNT; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index ff8162d4c454..fa4d1b8cd9f6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
@@ -521,7 +521,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw, | |||
521 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 521 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
522 | 522 | ||
523 | if (iwlagn_tx_skb(priv, control->sta, skb)) | 523 | if (iwlagn_tx_skb(priv, control->sta, skb)) |
524 | dev_kfree_skb_any(skb); | 524 | ieee80211_free_txskb(hw, skb); |
525 | } | 525 | } |
526 | 526 | ||
527 | static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, | 527 | static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 7ff3f1430678..408132cf83c1 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
@@ -2114,7 +2114,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb) | |||
2114 | 2114 | ||
2115 | info = IEEE80211_SKB_CB(skb); | 2115 | info = IEEE80211_SKB_CB(skb); |
2116 | iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); | 2116 | iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); |
2117 | dev_kfree_skb_any(skb); | 2117 | ieee80211_free_txskb(priv->hw, skb); |
2118 | } | 2118 | } |
2119 | 2119 | ||
2120 | static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) | 2120 | static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 17c8e5d82681..bb69f8f90b3b 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -321,6 +321,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority) | |||
321 | dma_map_page(trans->dev, page, 0, | 321 | dma_map_page(trans->dev, page, 0, |
322 | PAGE_SIZE << trans_pcie->rx_page_order, | 322 | PAGE_SIZE << trans_pcie->rx_page_order, |
323 | DMA_FROM_DEVICE); | 323 | DMA_FROM_DEVICE); |
324 | if (dma_mapping_error(trans->dev, rxb->page_dma)) { | ||
325 | rxb->page = NULL; | ||
326 | spin_lock_irqsave(&rxq->lock, flags); | ||
327 | list_add(&rxb->list, &rxq->rx_used); | ||
328 | spin_unlock_irqrestore(&rxq->lock, flags); | ||
329 | __free_pages(page, trans_pcie->rx_page_order); | ||
330 | return; | ||
331 | } | ||
324 | /* dma address must be no more than 36 bits */ | 332 | /* dma address must be no more than 36 bits */ |
325 | BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); | 333 | BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); |
326 | /* and also 256 byte aligned! */ | 334 | /* and also 256 byte aligned! */ |
@@ -488,8 +496,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans, | |||
488 | dma_map_page(trans->dev, rxb->page, 0, | 496 | dma_map_page(trans->dev, rxb->page, 0, |
489 | PAGE_SIZE << trans_pcie->rx_page_order, | 497 | PAGE_SIZE << trans_pcie->rx_page_order, |
490 | DMA_FROM_DEVICE); | 498 | DMA_FROM_DEVICE); |
491 | list_add_tail(&rxb->list, &rxq->rx_free); | 499 | if (dma_mapping_error(trans->dev, rxb->page_dma)) { |
492 | rxq->free_count++; | 500 | /* |
501 | * free the page(s) as well to not break | ||
502 | * the invariant that the items on the used | ||
503 | * list have no page(s) | ||
504 | */ | ||
505 | __free_pages(rxb->page, trans_pcie->rx_page_order); | ||
506 | rxb->page = NULL; | ||
507 | list_add_tail(&rxb->list, &rxq->rx_used); | ||
508 | } else { | ||
509 | list_add_tail(&rxb->list, &rxq->rx_free); | ||
510 | rxq->free_count++; | ||
511 | } | ||
493 | } else | 512 | } else |
494 | list_add_tail(&rxb->list, &rxq->rx_used); | 513 | list_add_tail(&rxb->list, &rxq->rx_used); |
495 | spin_unlock_irqrestore(&rxq->lock, flags); | 514 | spin_unlock_irqrestore(&rxq->lock, flags); |
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 9ffb6d5f17aa..4ed343e4eb41 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #define RAW3215_NR_CCWS 3 | 44 | #define RAW3215_NR_CCWS 3 |
45 | #define RAW3215_TIMEOUT HZ/10 /* time for delayed output */ | 45 | #define RAW3215_TIMEOUT HZ/10 /* time for delayed output */ |
46 | 46 | ||
47 | #define RAW3215_FIXED 1 /* 3215 console device is not be freed */ | ||
48 | #define RAW3215_WORKING 4 /* set if a request is being worked on */ | 47 | #define RAW3215_WORKING 4 /* set if a request is being worked on */ |
49 | #define RAW3215_THROTTLED 8 /* set if reading is disabled */ | 48 | #define RAW3215_THROTTLED 8 /* set if reading is disabled */ |
50 | #define RAW3215_STOPPED 16 /* set if writing is disabled */ | 49 | #define RAW3215_STOPPED 16 /* set if writing is disabled */ |
@@ -339,8 +338,10 @@ static void raw3215_wakeup(unsigned long data) | |||
339 | struct tty_struct *tty; | 338 | struct tty_struct *tty; |
340 | 339 | ||
341 | tty = tty_port_tty_get(&raw->port); | 340 | tty = tty_port_tty_get(&raw->port); |
342 | tty_wakeup(tty); | 341 | if (tty) { |
343 | tty_kref_put(tty); | 342 | tty_wakeup(tty); |
343 | tty_kref_put(tty); | ||
344 | } | ||
344 | } | 345 | } |
345 | 346 | ||
346 | /* | 347 | /* |
@@ -629,8 +630,7 @@ static void raw3215_shutdown(struct raw3215_info *raw) | |||
629 | DECLARE_WAITQUEUE(wait, current); | 630 | DECLARE_WAITQUEUE(wait, current); |
630 | unsigned long flags; | 631 | unsigned long flags; |
631 | 632 | ||
632 | if (!(raw->port.flags & ASYNC_INITIALIZED) || | 633 | if (!(raw->port.flags & ASYNC_INITIALIZED)) |
633 | (raw->flags & RAW3215_FIXED)) | ||
634 | return; | 634 | return; |
635 | /* Wait for outstanding requests, then free irq */ | 635 | /* Wait for outstanding requests, then free irq */ |
636 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); | 636 | spin_lock_irqsave(get_ccwdev_lock(raw->cdev), flags); |
@@ -926,8 +926,6 @@ static int __init con3215_init(void) | |||
926 | dev_set_drvdata(&cdev->dev, raw); | 926 | dev_set_drvdata(&cdev->dev, raw); |
927 | cdev->handler = raw3215_irq; | 927 | cdev->handler = raw3215_irq; |
928 | 928 | ||
929 | raw->flags |= RAW3215_FIXED; | ||
930 | |||
931 | /* Request the console irq */ | 929 | /* Request the console irq */ |
932 | if (raw3215_startup(raw) != 0) { | 930 | if (raw3215_startup(raw) != 0) { |
933 | raw3215_free_info(raw); | 931 | raw3215_free_info(raw); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 3e25d3150456..4d6ba00d0047 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -2942,13 +2942,33 @@ static int qeth_query_ipassists_cb(struct qeth_card *card, | |||
2942 | QETH_DBF_TEXT(SETUP, 2, "qipasscb"); | 2942 | QETH_DBF_TEXT(SETUP, 2, "qipasscb"); |
2943 | 2943 | ||
2944 | cmd = (struct qeth_ipa_cmd *) data; | 2944 | cmd = (struct qeth_ipa_cmd *) data; |
2945 | |||
2946 | switch (cmd->hdr.return_code) { | ||
2947 | case IPA_RC_NOTSUPP: | ||
2948 | case IPA_RC_L2_UNSUPPORTED_CMD: | ||
2949 | QETH_DBF_TEXT(SETUP, 2, "ipaunsup"); | ||
2950 | card->options.ipa4.supported_funcs |= IPA_SETADAPTERPARMS; | ||
2951 | card->options.ipa6.supported_funcs |= IPA_SETADAPTERPARMS; | ||
2952 | return -0; | ||
2953 | default: | ||
2954 | if (cmd->hdr.return_code) { | ||
2955 | QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Unhandled " | ||
2956 | "rc=%d\n", | ||
2957 | dev_name(&card->gdev->dev), | ||
2958 | cmd->hdr.return_code); | ||
2959 | return 0; | ||
2960 | } | ||
2961 | } | ||
2962 | |||
2945 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { | 2963 | if (cmd->hdr.prot_version == QETH_PROT_IPV4) { |
2946 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; | 2964 | card->options.ipa4.supported_funcs = cmd->hdr.ipa_supported; |
2947 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; | 2965 | card->options.ipa4.enabled_funcs = cmd->hdr.ipa_enabled; |
2948 | } else { | 2966 | } else if (cmd->hdr.prot_version == QETH_PROT_IPV6) { |
2949 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; | 2967 | card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; |
2950 | card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; | 2968 | card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; |
2951 | } | 2969 | } else |
2970 | QETH_DBF_MESSAGE(1, "%s IPA_CMD_QIPASSIST: Flawed LIC detected" | ||
2971 | "\n", dev_name(&card->gdev->dev)); | ||
2952 | QETH_DBF_TEXT(SETUP, 2, "suppenbl"); | 2972 | QETH_DBF_TEXT(SETUP, 2, "suppenbl"); |
2953 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported); | 2973 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_supported); |
2954 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled); | 2974 | QETH_DBF_TEXT_(SETUP, 2, "%08x", (__u32)cmd->hdr.ipa_enabled); |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index e67e0258aec5..fddb62654b6a 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -626,10 +626,13 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card) | |||
626 | QETH_DBF_TEXT(SETUP, 2, "doL2init"); | 626 | QETH_DBF_TEXT(SETUP, 2, "doL2init"); |
627 | QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card)); | 627 | QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card)); |
628 | 628 | ||
629 | rc = qeth_query_setadapterparms(card); | 629 | if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) { |
630 | if (rc) { | 630 | rc = qeth_query_setadapterparms(card); |
631 | QETH_DBF_MESSAGE(2, "could not query adapter parameters on " | 631 | if (rc) { |
632 | "device %s: x%x\n", CARD_BUS_ID(card), rc); | 632 | QETH_DBF_MESSAGE(2, "could not query adapter " |
633 | "parameters on device %s: x%x\n", | ||
634 | CARD_BUS_ID(card), rc); | ||
635 | } | ||
633 | } | 636 | } |
634 | 637 | ||
635 | if (card->info.type == QETH_CARD_TYPE_IQD || | 638 | if (card->info.type == QETH_CARD_TYPE_IQD || |
@@ -676,7 +679,7 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p) | |||
676 | return -ERESTARTSYS; | 679 | return -ERESTARTSYS; |
677 | } | 680 | } |
678 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); | 681 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); |
679 | if (!rc) | 682 | if (!rc || (rc == IPA_RC_L2_MAC_NOT_FOUND)) |
680 | rc = qeth_l2_send_setmac(card, addr->sa_data); | 683 | rc = qeth_l2_send_setmac(card, addr->sa_data); |
681 | return rc ? -EINVAL : 0; | 684 | return rc ? -EINVAL : 0; |
682 | } | 685 | } |
diff --git a/drivers/staging/android/android_alarm.h b/drivers/staging/android/android_alarm.h index f2ffd963f1c3..d0cafd637199 100644 --- a/drivers/staging/android/android_alarm.h +++ b/drivers/staging/android/android_alarm.h | |||
@@ -51,12 +51,10 @@ enum android_alarm_return_flags { | |||
51 | #define ANDROID_ALARM_WAIT _IO('a', 1) | 51 | #define ANDROID_ALARM_WAIT _IO('a', 1) |
52 | 52 | ||
53 | #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) | 53 | #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) |
54 | #define ALARM_IOR(c, type, size) _IOR('a', (c) | ((type) << 4), size) | ||
55 | |||
56 | /* Set alarm */ | 54 | /* Set alarm */ |
57 | #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) | 55 | #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) |
58 | #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) | 56 | #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) |
59 | #define ANDROID_ALARM_GET_TIME(type) ALARM_IOR(4, type, struct timespec) | 57 | #define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) |
60 | #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) | 58 | #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) |
61 | #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) | 59 | #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) |
62 | #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) | 60 | #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4) |
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index a5dec1ca1b82..13ee53bd0bf6 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c | |||
@@ -424,7 +424,6 @@ static void hvc_hangup(struct tty_struct *tty) | |||
424 | { | 424 | { |
425 | struct hvc_struct *hp = tty->driver_data; | 425 | struct hvc_struct *hp = tty->driver_data; |
426 | unsigned long flags; | 426 | unsigned long flags; |
427 | int temp_open_count; | ||
428 | 427 | ||
429 | if (!hp) | 428 | if (!hp) |
430 | return; | 429 | return; |
@@ -444,7 +443,6 @@ static void hvc_hangup(struct tty_struct *tty) | |||
444 | return; | 443 | return; |
445 | } | 444 | } |
446 | 445 | ||
447 | temp_open_count = hp->port.count; | ||
448 | hp->port.count = 0; | 446 | hp->port.count = 0; |
449 | spin_unlock_irqrestore(&hp->port.lock, flags); | 447 | spin_unlock_irqrestore(&hp->port.lock, flags); |
450 | tty_port_tty_set(&hp->port, NULL); | 448 | tty_port_tty_set(&hp->port, NULL); |
@@ -453,11 +451,6 @@ static void hvc_hangup(struct tty_struct *tty) | |||
453 | 451 | ||
454 | if (hp->ops->notifier_hangup) | 452 | if (hp->ops->notifier_hangup) |
455 | hp->ops->notifier_hangup(hp, hp->data); | 453 | hp->ops->notifier_hangup(hp, hp->data); |
456 | |||
457 | while(temp_open_count) { | ||
458 | --temp_open_count; | ||
459 | tty_port_put(&hp->port); | ||
460 | } | ||
461 | } | 454 | } |
462 | 455 | ||
463 | /* | 456 | /* |
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index 2bc28a59d385..1ab1d2c66de4 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c | |||
@@ -1239,6 +1239,7 @@ static int __devexit max310x_remove(struct spi_device *spi) | |||
1239 | static const struct spi_device_id max310x_id_table[] = { | 1239 | static const struct spi_device_id max310x_id_table[] = { |
1240 | { "max3107", MAX310X_TYPE_MAX3107 }, | 1240 | { "max3107", MAX310X_TYPE_MAX3107 }, |
1241 | { "max3108", MAX310X_TYPE_MAX3108 }, | 1241 | { "max3108", MAX310X_TYPE_MAX3108 }, |
1242 | { } | ||
1242 | }; | 1243 | }; |
1243 | MODULE_DEVICE_TABLE(spi, max310x_id_table); | 1244 | MODULE_DEVICE_TABLE(spi, max310x_id_table); |
1244 | 1245 | ||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 1e741bca0265..f034716190ff 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2151,8 +2151,15 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum); | |||
2151 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) | 2151 | irqreturn_t usb_hcd_irq (int irq, void *__hcd) |
2152 | { | 2152 | { |
2153 | struct usb_hcd *hcd = __hcd; | 2153 | struct usb_hcd *hcd = __hcd; |
2154 | unsigned long flags; | ||
2154 | irqreturn_t rc; | 2155 | irqreturn_t rc; |
2155 | 2156 | ||
2157 | /* IRQF_DISABLED doesn't work correctly with shared IRQs | ||
2158 | * when the first handler doesn't use it. So let's just | ||
2159 | * assume it's never used. | ||
2160 | */ | ||
2161 | local_irq_save(flags); | ||
2162 | |||
2156 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) | 2163 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) |
2157 | rc = IRQ_NONE; | 2164 | rc = IRQ_NONE; |
2158 | else if (hcd->driver->irq(hcd) == IRQ_NONE) | 2165 | else if (hcd->driver->irq(hcd) == IRQ_NONE) |
@@ -2160,6 +2167,7 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) | |||
2160 | else | 2167 | else |
2161 | rc = IRQ_HANDLED; | 2168 | rc = IRQ_HANDLED; |
2162 | 2169 | ||
2170 | local_irq_restore(flags); | ||
2163 | return rc; | 2171 | return rc; |
2164 | } | 2172 | } |
2165 | EXPORT_SYMBOL_GPL(usb_hcd_irq); | 2173 | EXPORT_SYMBOL_GPL(usb_hcd_irq); |
@@ -2347,6 +2355,14 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd, | |||
2347 | int retval; | 2355 | int retval; |
2348 | 2356 | ||
2349 | if (hcd->driver->irq) { | 2357 | if (hcd->driver->irq) { |
2358 | |||
2359 | /* IRQF_DISABLED doesn't work as advertised when used together | ||
2360 | * with IRQF_SHARED. As usb_hcd_irq() will always disable | ||
2361 | * interrupts we can remove it here. | ||
2362 | */ | ||
2363 | if (irqflags & IRQF_SHARED) | ||
2364 | irqflags &= ~IRQF_DISABLED; | ||
2365 | |||
2350 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", | 2366 | snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", |
2351 | hcd->driver->description, hcd->self.busnum); | 2367 | hcd->driver->description, hcd->self.busnum); |
2352 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, | 2368 | retval = request_irq(irqnum, &usb_hcd_irq, irqflags, |
diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c index e426ad626d74..4bfa78af379c 100644 --- a/drivers/usb/early/ehci-dbgp.c +++ b/drivers/usb/early/ehci-dbgp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/usb/ehci_def.h> | 20 | #include <linux/usb/ehci_def.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
23 | #include <linux/kconfig.h> | ||
23 | #include <linux/kgdb.h> | 24 | #include <linux/kgdb.h> |
24 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
@@ -614,12 +615,6 @@ err: | |||
614 | return -ENODEV; | 615 | return -ENODEV; |
615 | } | 616 | } |
616 | 617 | ||
617 | int dbgp_external_startup(struct usb_hcd *hcd) | ||
618 | { | ||
619 | return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); | ||
620 | } | ||
621 | EXPORT_SYMBOL_GPL(dbgp_external_startup); | ||
622 | |||
623 | static int ehci_reset_port(int port) | 618 | static int ehci_reset_port(int port) |
624 | { | 619 | { |
625 | u32 portsc; | 620 | u32 portsc; |
@@ -979,6 +974,7 @@ struct console early_dbgp_console = { | |||
979 | .index = -1, | 974 | .index = -1, |
980 | }; | 975 | }; |
981 | 976 | ||
977 | #if IS_ENABLED(CONFIG_USB_EHCI_HCD) | ||
982 | int dbgp_reset_prep(struct usb_hcd *hcd) | 978 | int dbgp_reset_prep(struct usb_hcd *hcd) |
983 | { | 979 | { |
984 | int ret = xen_dbgp_reset_prep(hcd); | 980 | int ret = xen_dbgp_reset_prep(hcd); |
@@ -1007,6 +1003,13 @@ int dbgp_reset_prep(struct usb_hcd *hcd) | |||
1007 | } | 1003 | } |
1008 | EXPORT_SYMBOL_GPL(dbgp_reset_prep); | 1004 | EXPORT_SYMBOL_GPL(dbgp_reset_prep); |
1009 | 1005 | ||
1006 | int dbgp_external_startup(struct usb_hcd *hcd) | ||
1007 | { | ||
1008 | return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); | ||
1009 | } | ||
1010 | EXPORT_SYMBOL_GPL(dbgp_external_startup); | ||
1011 | #endif /* USB_EHCI_HCD */ | ||
1012 | |||
1010 | #ifdef CONFIG_KGDB | 1013 | #ifdef CONFIG_KGDB |
1011 | 1014 | ||
1012 | static char kgdbdbgp_buf[DBGP_MAX_PACKET]; | 1015 | static char kgdbdbgp_buf[DBGP_MAX_PACKET]; |
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c index ca759652626b..aa0f328922df 100644 --- a/drivers/usb/host/ehci-ls1x.c +++ b/drivers/usb/host/ehci-ls1x.c | |||
@@ -113,7 +113,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev) | |||
113 | goto err_put_hcd; | 113 | goto err_put_hcd; |
114 | } | 114 | } |
115 | 115 | ||
116 | ret = usb_add_hcd(hcd, irq, IRQF_SHARED); | 116 | ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
117 | if (ret) | 117 | if (ret) |
118 | goto err_put_hcd; | 118 | goto err_put_hcd; |
119 | 119 | ||
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c index 84201cd1a472..41e378f17c66 100644 --- a/drivers/usb/host/ohci-xls.c +++ b/drivers/usb/host/ohci-xls.c | |||
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver, | |||
56 | goto err3; | 56 | goto err3; |
57 | } | 57 | } |
58 | 58 | ||
59 | retval = usb_add_hcd(hcd, irq, IRQF_SHARED); | 59 | retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); |
60 | if (retval != 0) | 60 | if (retval != 0) |
61 | goto err4; | 61 | goto err4; |
62 | return retval; | 62 | return retval; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index d0b87e7b4abf..b6b84dacc791 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -707,11 +707,12 @@ static void rxstate(struct musb *musb, struct musb_request *req) | |||
707 | fifo_count = musb_readw(epio, MUSB_RXCOUNT); | 707 | fifo_count = musb_readw(epio, MUSB_RXCOUNT); |
708 | 708 | ||
709 | /* | 709 | /* |
710 | * use mode 1 only if we expect data of at least ep packet_sz | 710 | * Enable Mode 1 on RX transfers only when short_not_ok flag |
711 | * and have not yet received a short packet | 711 | * is set. Currently short_not_ok flag is set only from |
712 | * file_storage and f_mass_storage drivers | ||
712 | */ | 713 | */ |
713 | if ((request->length - request->actual >= musb_ep->packet_sz) && | 714 | |
714 | (fifo_count >= musb_ep->packet_sz)) | 715 | if (request->short_not_ok && fifo_count == musb_ep->packet_sz) |
715 | use_mode_1 = 1; | 716 | use_mode_1 = 1; |
716 | else | 717 | else |
717 | use_mode_1 = 0; | 718 | use_mode_1 = 0; |
@@ -727,6 +728,27 @@ static void rxstate(struct musb *musb, struct musb_request *req) | |||
727 | c = musb->dma_controller; | 728 | c = musb->dma_controller; |
728 | channel = musb_ep->dma; | 729 | channel = musb_ep->dma; |
729 | 730 | ||
731 | /* We use DMA Req mode 0 in rx_csr, and DMA controller operates in | ||
732 | * mode 0 only. So we do not get endpoint interrupts due to DMA | ||
733 | * completion. We only get interrupts from DMA controller. | ||
734 | * | ||
735 | * We could operate in DMA mode 1 if we knew the size of the tranfer | ||
736 | * in advance. For mass storage class, request->length = what the host | ||
737 | * sends, so that'd work. But for pretty much everything else, | ||
738 | * request->length is routinely more than what the host sends. For | ||
739 | * most these gadgets, end of is signified either by a short packet, | ||
740 | * or filling the last byte of the buffer. (Sending extra data in | ||
741 | * that last pckate should trigger an overflow fault.) But in mode 1, | ||
742 | * we don't get DMA completion interrupt for short packets. | ||
743 | * | ||
744 | * Theoretically, we could enable DMAReq irq (MUSB_RXCSR_DMAMODE = 1), | ||
745 | * to get endpoint interrupt on every DMA req, but that didn't seem | ||
746 | * to work reliably. | ||
747 | * | ||
748 | * REVISIT an updated g_file_storage can set req->short_not_ok, which | ||
749 | * then becomes usable as a runtime "use mode 1" hint... | ||
750 | */ | ||
751 | |||
730 | /* Experimental: Mode1 works with mass storage use cases */ | 752 | /* Experimental: Mode1 works with mass storage use cases */ |
731 | if (use_mode_1) { | 753 | if (use_mode_1) { |
732 | csr |= MUSB_RXCSR_AUTOCLEAR; | 754 | csr |= MUSB_RXCSR_AUTOCLEAR; |
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index d62a91fedc22..0e62f504410e 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c | |||
@@ -65,7 +65,7 @@ static int __devinit ux500_probe(struct platform_device *pdev) | |||
65 | struct platform_device *musb; | 65 | struct platform_device *musb; |
66 | struct ux500_glue *glue; | 66 | struct ux500_glue *glue; |
67 | struct clk *clk; | 67 | struct clk *clk; |
68 | 68 | int musbid; | |
69 | int ret = -ENOMEM; | 69 | int ret = -ENOMEM; |
70 | 70 | ||
71 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); | 71 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); |
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig index d8c8a42bff3e..6223062d5d1b 100644 --- a/drivers/usb/otg/Kconfig +++ b/drivers/usb/otg/Kconfig | |||
@@ -58,7 +58,7 @@ config USB_ULPI_VIEWPORT | |||
58 | 58 | ||
59 | config TWL4030_USB | 59 | config TWL4030_USB |
60 | tristate "TWL4030 USB Transceiver Driver" | 60 | tristate "TWL4030 USB Transceiver Driver" |
61 | depends on TWL4030_CORE && REGULATOR_TWL4030 | 61 | depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS |
62 | select USB_OTG_UTILS | 62 | select USB_OTG_UTILS |
63 | help | 63 | help |
64 | Enable this to support the USB OTG transceiver on TWL4030 | 64 | Enable this to support the USB OTG transceiver on TWL4030 |
@@ -68,7 +68,7 @@ config TWL4030_USB | |||
68 | 68 | ||
69 | config TWL6030_USB | 69 | config TWL6030_USB |
70 | tristate "TWL6030 USB Transceiver Driver" | 70 | tristate "TWL6030 USB Transceiver Driver" |
71 | depends on TWL4030_CORE && OMAP_USB2 | 71 | depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS |
72 | select USB_OTG_UTILS | 72 | select USB_OTG_UTILS |
73 | help | 73 | help |
74 | Enable this to support the USB OTG transceiver on TWL6030 | 74 | Enable this to support the USB OTG transceiver on TWL6030 |
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 7179b0c5f814..cff8dd5b462d 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial) | |||
2430 | static int keyspan_port_probe(struct usb_serial_port *port) | 2430 | static int keyspan_port_probe(struct usb_serial_port *port) |
2431 | { | 2431 | { |
2432 | struct usb_serial *serial = port->serial; | 2432 | struct usb_serial *serial = port->serial; |
2433 | struct keyspan_port_private *s_priv; | 2433 | struct keyspan_serial_private *s_priv; |
2434 | struct keyspan_port_private *p_priv; | 2434 | struct keyspan_port_private *p_priv; |
2435 | const struct keyspan_device_details *d_details; | 2435 | const struct keyspan_device_details *d_details; |
2436 | struct callbacks *cback; | 2436 | struct callbacks *cback; |
@@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port) | |||
2445 | if (!p_priv) | 2445 | if (!p_priv) |
2446 | return -ENOMEM; | 2446 | return -ENOMEM; |
2447 | 2447 | ||
2448 | s_priv = usb_get_serial_data(port->serial); | ||
2449 | p_priv->device_details = d_details; | 2448 | p_priv->device_details = d_details; |
2450 | 2449 | ||
2451 | /* Setup values for the various callback routines */ | 2450 | /* Setup values for the various callback routines */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 5dee7d61241e..edc64bb6f457 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -158,6 +158,7 @@ static void option_instat_callback(struct urb *urb); | |||
158 | #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001 | 158 | #define NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_HIGHSPEED 0x8001 |
159 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 | 159 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 |
160 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 | 160 | #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 |
161 | #define NOVATELWIRELESS_PRODUCT_E362 0x9010 | ||
161 | #define NOVATELWIRELESS_PRODUCT_G1 0xA001 | 162 | #define NOVATELWIRELESS_PRODUCT_G1 0xA001 |
162 | #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 | 163 | #define NOVATELWIRELESS_PRODUCT_G1_M 0xA002 |
163 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 | 164 | #define NOVATELWIRELESS_PRODUCT_G2 0xA010 |
@@ -193,6 +194,9 @@ static void option_instat_callback(struct urb *urb); | |||
193 | #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 | 194 | #define DELL_PRODUCT_5730_MINICARD_TELUS 0x8181 |
194 | #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 | 195 | #define DELL_PRODUCT_5730_MINICARD_VZW 0x8182 |
195 | 196 | ||
197 | #define DELL_PRODUCT_5800_MINICARD_VZW 0x8195 /* Novatel E362 */ | ||
198 | #define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196 /* Novatel E362 */ | ||
199 | |||
196 | #define KYOCERA_VENDOR_ID 0x0c88 | 200 | #define KYOCERA_VENDOR_ID 0x0c88 |
197 | #define KYOCERA_PRODUCT_KPC650 0x17da | 201 | #define KYOCERA_PRODUCT_KPC650 0x17da |
198 | #define KYOCERA_PRODUCT_KPC680 0x180a | 202 | #define KYOCERA_PRODUCT_KPC680 0x180a |
@@ -283,6 +287,7 @@ static void option_instat_callback(struct urb *urb); | |||
283 | /* ALCATEL PRODUCTS */ | 287 | /* ALCATEL PRODUCTS */ |
284 | #define ALCATEL_VENDOR_ID 0x1bbb | 288 | #define ALCATEL_VENDOR_ID 0x1bbb |
285 | #define ALCATEL_PRODUCT_X060S_X200 0x0000 | 289 | #define ALCATEL_PRODUCT_X060S_X200 0x0000 |
290 | #define ALCATEL_PRODUCT_X220_X500D 0x0017 | ||
286 | 291 | ||
287 | #define PIRELLI_VENDOR_ID 0x1266 | 292 | #define PIRELLI_VENDOR_ID 0x1266 |
288 | #define PIRELLI_PRODUCT_C100_1 0x1002 | 293 | #define PIRELLI_PRODUCT_C100_1 0x1002 |
@@ -706,6 +711,7 @@ static const struct usb_device_id option_ids[] = { | |||
706 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) }, | 711 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_G2) }, |
707 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ | 712 | /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ |
708 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, | 713 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, |
714 | { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, | ||
709 | 715 | ||
710 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, | 716 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, |
711 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, | 717 | { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, |
@@ -728,6 +734,8 @@ static const struct usb_device_id option_ids[] = { | |||
728 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 734 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
729 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 735 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
730 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ | 736 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
737 | { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) }, | ||
738 | { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) }, | ||
731 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ | 739 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ |
732 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, | 740 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
733 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, | 741 | { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, |
@@ -1157,6 +1165,7 @@ static const struct usb_device_id option_ids[] = { | |||
1157 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), | 1165 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200), |
1158 | .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist | 1166 | .driver_info = (kernel_ulong_t)&alcatel_x200_blacklist |
1159 | }, | 1167 | }, |
1168 | { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) }, | ||
1160 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, | 1169 | { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) }, |
1161 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, | 1170 | { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, |
1162 | { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), | 1171 | { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14), |
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 61a73ad1a187..a3e9c095f0d8 100644 --- a/drivers/usb/serial/usb_wwan.c +++ b/drivers/usb/serial/usb_wwan.c | |||
@@ -455,9 +455,6 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port, | |||
455 | struct usb_serial *serial = port->serial; | 455 | struct usb_serial *serial = port->serial; |
456 | struct urb *urb; | 456 | struct urb *urb; |
457 | 457 | ||
458 | if (endpoint == -1) | ||
459 | return NULL; /* endpoint not needed */ | ||
460 | |||
461 | urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ | 458 | urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ |
462 | if (urb == NULL) { | 459 | if (urb == NULL) { |
463 | dev_dbg(&serial->interface->dev, | 460 | dev_dbg(&serial->interface->dev, |
@@ -489,6 +486,9 @@ int usb_wwan_port_probe(struct usb_serial_port *port) | |||
489 | init_usb_anchor(&portdata->delayed); | 486 | init_usb_anchor(&portdata->delayed); |
490 | 487 | ||
491 | for (i = 0; i < N_IN_URB; i++) { | 488 | for (i = 0; i < N_IN_URB; i++) { |
489 | if (!port->bulk_in_size) | ||
490 | break; | ||
491 | |||
492 | buffer = (u8 *)__get_free_page(GFP_KERNEL); | 492 | buffer = (u8 *)__get_free_page(GFP_KERNEL); |
493 | if (!buffer) | 493 | if (!buffer) |
494 | goto bail_out_error; | 494 | goto bail_out_error; |
@@ -502,8 +502,8 @@ int usb_wwan_port_probe(struct usb_serial_port *port) | |||
502 | } | 502 | } |
503 | 503 | ||
504 | for (i = 0; i < N_OUT_URB; i++) { | 504 | for (i = 0; i < N_OUT_URB; i++) { |
505 | if (port->bulk_out_endpointAddress == -1) | 505 | if (!port->bulk_out_size) |
506 | continue; | 506 | break; |
507 | 507 | ||
508 | buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); | 508 | buffer = kmalloc(OUT_BUFLEN, GFP_KERNEL); |
509 | if (!buffer) | 509 | if (!buffer) |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 144a96732dd7..3c231adf8450 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -873,6 +873,113 @@ static const struct file_operations proc_environ_operations = { | |||
873 | .release = mem_release, | 873 | .release = mem_release, |
874 | }; | 874 | }; |
875 | 875 | ||
876 | static ssize_t oom_adj_read(struct file *file, char __user *buf, size_t count, | ||
877 | loff_t *ppos) | ||
878 | { | ||
879 | struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); | ||
880 | char buffer[PROC_NUMBUF]; | ||
881 | int oom_adj = OOM_ADJUST_MIN; | ||
882 | size_t len; | ||
883 | unsigned long flags; | ||
884 | |||
885 | if (!task) | ||
886 | return -ESRCH; | ||
887 | if (lock_task_sighand(task, &flags)) { | ||
888 | if (task->signal->oom_score_adj == OOM_SCORE_ADJ_MAX) | ||
889 | oom_adj = OOM_ADJUST_MAX; | ||
890 | else | ||
891 | oom_adj = (task->signal->oom_score_adj * -OOM_DISABLE) / | ||
892 | OOM_SCORE_ADJ_MAX; | ||
893 | unlock_task_sighand(task, &flags); | ||
894 | } | ||
895 | put_task_struct(task); | ||
896 | len = snprintf(buffer, sizeof(buffer), "%d\n", oom_adj); | ||
897 | return simple_read_from_buffer(buf, count, ppos, buffer, len); | ||
898 | } | ||
899 | |||
900 | static ssize_t oom_adj_write(struct file *file, const char __user *buf, | ||
901 | size_t count, loff_t *ppos) | ||
902 | { | ||
903 | struct task_struct *task; | ||
904 | char buffer[PROC_NUMBUF]; | ||
905 | int oom_adj; | ||
906 | unsigned long flags; | ||
907 | int err; | ||
908 | |||
909 | memset(buffer, 0, sizeof(buffer)); | ||
910 | if (count > sizeof(buffer) - 1) | ||
911 | count = sizeof(buffer) - 1; | ||
912 | if (copy_from_user(buffer, buf, count)) { | ||
913 | err = -EFAULT; | ||
914 | goto out; | ||
915 | } | ||
916 | |||
917 | err = kstrtoint(strstrip(buffer), 0, &oom_adj); | ||
918 | if (err) | ||
919 | goto out; | ||
920 | if ((oom_adj < OOM_ADJUST_MIN || oom_adj > OOM_ADJUST_MAX) && | ||
921 | oom_adj != OOM_DISABLE) { | ||
922 | err = -EINVAL; | ||
923 | goto out; | ||
924 | } | ||
925 | |||
926 | task = get_proc_task(file->f_path.dentry->d_inode); | ||
927 | if (!task) { | ||
928 | err = -ESRCH; | ||
929 | goto out; | ||
930 | } | ||
931 | |||
932 | task_lock(task); | ||
933 | if (!task->mm) { | ||
934 | err = -EINVAL; | ||
935 | goto err_task_lock; | ||
936 | } | ||
937 | |||
938 | if (!lock_task_sighand(task, &flags)) { | ||
939 | err = -ESRCH; | ||
940 | goto err_task_lock; | ||
941 | } | ||
942 | |||
943 | /* | ||
944 | * Scale /proc/pid/oom_score_adj appropriately ensuring that a maximum | ||
945 | * value is always attainable. | ||
946 | */ | ||
947 | if (oom_adj == OOM_ADJUST_MAX) | ||
948 | oom_adj = OOM_SCORE_ADJ_MAX; | ||
949 | else | ||
950 | oom_adj = (oom_adj * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE; | ||
951 | |||
952 | if (oom_adj < task->signal->oom_score_adj && | ||
953 | !capable(CAP_SYS_RESOURCE)) { | ||
954 | err = -EACCES; | ||
955 | goto err_sighand; | ||
956 | } | ||
957 | |||
958 | /* | ||
959 | * /proc/pid/oom_adj is provided for legacy purposes, ask users to use | ||
960 | * /proc/pid/oom_score_adj instead. | ||
961 | */ | ||
962 | printk_once(KERN_WARNING "%s (%d): /proc/%d/oom_adj is deprecated, please use /proc/%d/oom_score_adj instead.\n", | ||
963 | current->comm, task_pid_nr(current), task_pid_nr(task), | ||
964 | task_pid_nr(task)); | ||
965 | |||
966 | task->signal->oom_score_adj = oom_adj; | ||
967 | trace_oom_score_adj_update(task); | ||
968 | err_sighand: | ||
969 | unlock_task_sighand(task, &flags); | ||
970 | err_task_lock: | ||
971 | task_unlock(task); | ||
972 | put_task_struct(task); | ||
973 | out: | ||
974 | return err < 0 ? err : count; | ||
975 | } | ||
976 | |||
977 | static const struct file_operations proc_oom_adj_operations = { | ||
978 | .read = oom_adj_read, | ||
979 | .write = oom_adj_write, | ||
980 | .llseek = generic_file_llseek, | ||
981 | }; | ||
982 | |||
876 | static ssize_t oom_score_adj_read(struct file *file, char __user *buf, | 983 | static ssize_t oom_score_adj_read(struct file *file, char __user *buf, |
877 | size_t count, loff_t *ppos) | 984 | size_t count, loff_t *ppos) |
878 | { | 985 | { |
@@ -2598,6 +2705,7 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2598 | REG("cgroup", S_IRUGO, proc_cgroup_operations), | 2705 | REG("cgroup", S_IRUGO, proc_cgroup_operations), |
2599 | #endif | 2706 | #endif |
2600 | INF("oom_score", S_IRUGO, proc_oom_score), | 2707 | INF("oom_score", S_IRUGO, proc_oom_score), |
2708 | REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations), | ||
2601 | REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), | 2709 | REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), |
2602 | #ifdef CONFIG_AUDITSYSCALL | 2710 | #ifdef CONFIG_AUDITSYSCALL |
2603 | REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), | 2711 | REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), |
@@ -2964,6 +3072,7 @@ static const struct pid_entry tid_base_stuff[] = { | |||
2964 | REG("cgroup", S_IRUGO, proc_cgroup_operations), | 3072 | REG("cgroup", S_IRUGO, proc_cgroup_operations), |
2965 | #endif | 3073 | #endif |
2966 | INF("oom_score", S_IRUGO, proc_oom_score), | 3074 | INF("oom_score", S_IRUGO, proc_oom_score), |
3075 | REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations), | ||
2967 | REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), | 3076 | REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), |
2968 | #ifdef CONFIG_AUDITSYSCALL | 3077 | #ifdef CONFIG_AUDITSYSCALL |
2969 | REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), | 3078 | REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index c12731582920..f9f5e9eeb9dd 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -335,8 +335,8 @@ const char *__clk_get_name(struct clk *clk); | |||
335 | struct clk_hw *__clk_get_hw(struct clk *clk); | 335 | struct clk_hw *__clk_get_hw(struct clk *clk); |
336 | u8 __clk_get_num_parents(struct clk *clk); | 336 | u8 __clk_get_num_parents(struct clk *clk); |
337 | struct clk *__clk_get_parent(struct clk *clk); | 337 | struct clk *__clk_get_parent(struct clk *clk); |
338 | inline int __clk_get_enable_count(struct clk *clk); | 338 | int __clk_get_enable_count(struct clk *clk); |
339 | inline int __clk_get_prepare_count(struct clk *clk); | 339 | int __clk_get_prepare_count(struct clk *clk); |
340 | unsigned long __clk_get_rate(struct clk *clk); | 340 | unsigned long __clk_get_rate(struct clk *clk); |
341 | unsigned long __clk_get_flags(struct clk *clk); | 341 | unsigned long __clk_get_flags(struct clk *clk); |
342 | int __clk_is_enabled(struct clk *clk); | 342 | int __clk_is_enabled(struct clk *clk); |
diff --git a/include/linux/platform_data/omap_ocp2scp.h b/include/linux/platform_data/omap_ocp2scp.h new file mode 100644 index 000000000000..5c6c3939355f --- /dev/null +++ b/include/linux/platform_data/omap_ocp2scp.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * omap_ocp2scp.h -- ocp2scp header file | ||
3 | * | ||
4 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com | ||
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 | * Author: Kishon Vijay Abraham I <kishon@ti.com> | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #ifndef __DRIVERS_OMAP_OCP2SCP_H | ||
20 | #define __DRIVERS_OMAP_OCP2SCP_H | ||
21 | |||
22 | struct omap_ocp2scp_dev { | ||
23 | const char *drv_name; | ||
24 | struct resource *res; | ||
25 | }; | ||
26 | |||
27 | struct omap_ocp2scp_platform_data { | ||
28 | int dev_cnt; | ||
29 | struct omap_ocp2scp_dev **devices; | ||
30 | }; | ||
31 | #endif /* __DRIVERS_OMAP_OCP2SCP_H */ | ||
diff --git a/include/uapi/linux/oom.h b/include/uapi/linux/oom.h index a49c4afc7060..b29272d621ce 100644 --- a/include/uapi/linux/oom.h +++ b/include/uapi/linux/oom.h | |||
@@ -8,4 +8,13 @@ | |||
8 | #define OOM_SCORE_ADJ_MIN (-1000) | 8 | #define OOM_SCORE_ADJ_MIN (-1000) |
9 | #define OOM_SCORE_ADJ_MAX 1000 | 9 | #define OOM_SCORE_ADJ_MAX 1000 |
10 | 10 | ||
11 | /* | ||
12 | * /proc/<pid>/oom_adj set to -17 protects from the oom killer for legacy | ||
13 | * purposes. | ||
14 | */ | ||
15 | #define OOM_DISABLE (-17) | ||
16 | /* inclusive */ | ||
17 | #define OOM_ADJUST_MIN (-16) | ||
18 | #define OOM_ADJUST_MAX 15 | ||
19 | |||
11 | #endif /* _UAPI__INCLUDE_LINUX_OOM_H */ | 20 | #endif /* _UAPI__INCLUDE_LINUX_OOM_H */ |
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index b9a28d2dd3e8..ce0684a1fc83 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -325,6 +325,12 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
325 | 325 | ||
326 | soft_iface->last_rx = jiffies; | 326 | soft_iface->last_rx = jiffies; |
327 | 327 | ||
328 | /* Let the bridge loop avoidance check the packet. If will | ||
329 | * not handle it, we can safely push it up. | ||
330 | */ | ||
331 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
332 | goto out; | ||
333 | |||
328 | if (orig_node) | 334 | if (orig_node) |
329 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | 335 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, |
330 | ethhdr->h_source); | 336 | ethhdr->h_source); |
@@ -332,12 +338,6 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
332 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 338 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) |
333 | goto dropped; | 339 | goto dropped; |
334 | 340 | ||
335 | /* Let the bridge loop avoidance check the packet. If will | ||
336 | * not handle it, we can safely push it up. | ||
337 | */ | ||
338 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
339 | goto out; | ||
340 | |||
341 | netif_rx(skb); | 341 | netif_rx(skb); |
342 | goto out; | 342 | goto out; |
343 | 343 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 112edd371b2f..baae71585804 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -769,6 +769,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, | |||
769 | */ | 769 | */ |
770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; | 770 | tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_TEMP; |
771 | 771 | ||
772 | /* the change can carry possible "attribute" flags like the | ||
773 | * TT_CLIENT_WIFI, therefore they have to be copied in the | ||
774 | * client entry | ||
775 | */ | ||
776 | tt_global_entry->common.flags |= flags; | ||
777 | |||
772 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only | 778 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only |
773 | * one originator left in the list and we previously received a | 779 | * one originator left in the list and we previously received a |
774 | * delete + roaming change for this originator. | 780 | * delete + roaming change for this originator. |
@@ -1496,7 +1502,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1496 | 1502 | ||
1497 | memcpy(tt_change->addr, tt_common_entry->addr, | 1503 | memcpy(tt_change->addr, tt_common_entry->addr, |
1498 | ETH_ALEN); | 1504 | ETH_ALEN); |
1499 | tt_change->flags = BATADV_NO_FLAGS; | 1505 | tt_change->flags = tt_common_entry->flags; |
1500 | 1506 | ||
1501 | tt_count++; | 1507 | tt_count++; |
1502 | tt_change++; | 1508 | tt_change++; |
@@ -2450,6 +2456,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, | |||
2450 | { | 2456 | { |
2451 | bool ret = false; | 2457 | bool ret = false; |
2452 | 2458 | ||
2459 | /* if the originator is a backbone node (meaning it belongs to the same | ||
2460 | * LAN of this node) the temporary client must not be added because to | ||
2461 | * reach such destination the node must use the LAN instead of the mesh | ||
2462 | */ | ||
2463 | if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig)) | ||
2464 | goto out; | ||
2465 | |||
2453 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, | 2466 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, |
2454 | BATADV_TT_CLIENT_TEMP, | 2467 | BATADV_TT_CLIENT_TEMP, |
2455 | atomic_read(&orig_node->last_ttvn))) | 2468 | atomic_read(&orig_node->last_ttvn))) |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8a0ce706aebd..a0a2f97b9c62 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1754,11 +1754,11 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1754 | if (hdev->dev_type != HCI_AMP) | 1754 | if (hdev->dev_type != HCI_AMP) |
1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); | 1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); |
1756 | 1756 | ||
1757 | schedule_work(&hdev->power_on); | ||
1758 | |||
1759 | hci_notify(hdev, HCI_DEV_REG); | 1757 | hci_notify(hdev, HCI_DEV_REG); |
1760 | hci_dev_hold(hdev); | 1758 | hci_dev_hold(hdev); |
1761 | 1759 | ||
1760 | schedule_work(&hdev->power_on); | ||
1761 | |||
1762 | return id; | 1762 | return id; |
1763 | 1763 | ||
1764 | err_wqueue: | 1764 | err_wqueue: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index aa2ea0a8142c..91de4239da66 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -326,7 +326,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
326 | struct hci_dev *d; | 326 | struct hci_dev *d; |
327 | size_t rp_len; | 327 | size_t rp_len; |
328 | u16 count; | 328 | u16 count; |
329 | int i, err; | 329 | int err; |
330 | 330 | ||
331 | BT_DBG("sock %p", sk); | 331 | BT_DBG("sock %p", sk); |
332 | 332 | ||
@@ -347,9 +347,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
347 | return -ENOMEM; | 347 | return -ENOMEM; |
348 | } | 348 | } |
349 | 349 | ||
350 | rp->num_controllers = cpu_to_le16(count); | 350 | count = 0; |
351 | |||
352 | i = 0; | ||
353 | list_for_each_entry(d, &hci_dev_list, list) { | 351 | list_for_each_entry(d, &hci_dev_list, list) { |
354 | if (test_bit(HCI_SETUP, &d->dev_flags)) | 352 | if (test_bit(HCI_SETUP, &d->dev_flags)) |
355 | continue; | 353 | continue; |
@@ -357,10 +355,13 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
357 | if (!mgmt_valid_hdev(d)) | 355 | if (!mgmt_valid_hdev(d)) |
358 | continue; | 356 | continue; |
359 | 357 | ||
360 | rp->index[i++] = cpu_to_le16(d->id); | 358 | rp->index[count++] = cpu_to_le16(d->id); |
361 | BT_DBG("Added hci%u", d->id); | 359 | BT_DBG("Added hci%u", d->id); |
362 | } | 360 | } |
363 | 361 | ||
362 | rp->num_controllers = cpu_to_le16(count); | ||
363 | rp_len = sizeof(*rp) + (2 * count); | ||
364 | |||
364 | read_unlock(&hci_dev_list_lock); | 365 | read_unlock(&hci_dev_list_lock); |
365 | 366 | ||
366 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, | 367 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, |
@@ -1366,6 +1367,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1366 | continue; | 1367 | continue; |
1367 | 1368 | ||
1368 | list_del(&match->list); | 1369 | list_del(&match->list); |
1370 | kfree(match); | ||
1369 | found++; | 1371 | found++; |
1370 | } | 1372 | } |
1371 | 1373 | ||
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 2ac8d50861e0..a5923378bdf0 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -267,7 +267,7 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send) | |||
267 | 267 | ||
268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); | 268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); |
269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, | 269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, |
270 | hcon->dst_type, reason); | 270 | hcon->dst_type, HCI_ERROR_AUTH_FAILURE); |
271 | 271 | ||
272 | cancel_delayed_work_sync(&conn->security_timer); | 272 | cancel_delayed_work_sync(&conn->security_timer); |
273 | 273 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index bda6d004f9f0..c0946cb2b354 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2818,8 +2818,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
2818 | if (unlikely(tcpu != next_cpu) && | 2818 | if (unlikely(tcpu != next_cpu) && |
2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || | 2819 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || |
2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - | 2820 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - |
2821 | rflow->last_qtail)) >= 0)) | 2821 | rflow->last_qtail)) >= 0)) { |
2822 | tcpu = next_cpu; | ||
2822 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); | 2823 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); |
2824 | } | ||
2823 | 2825 | ||
2824 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { | 2826 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { |
2825 | *rflowp = rflow; | 2827 | *rflowp = rflow; |
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 87cc17db2d56..b079c7bbc157 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c | |||
@@ -319,7 +319,8 @@ int dev_addr_del(struct net_device *dev, const unsigned char *addr, | |||
319 | */ | 319 | */ |
320 | ha = list_first_entry(&dev->dev_addrs.list, | 320 | ha = list_first_entry(&dev->dev_addrs.list, |
321 | struct netdev_hw_addr, list); | 321 | struct netdev_hw_addr, list); |
322 | if (ha->addr == dev->dev_addr && ha->refcount == 1) | 322 | if (!memcmp(ha->addr, addr, dev->addr_len) && |
323 | ha->type == addr_type && ha->refcount == 1) | ||
323 | return -ENOENT; | 324 | return -ENOENT; |
324 | 325 | ||
325 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, | 326 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 5eea4a811042..14bbfcf717ac 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -457,19 +457,28 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
457 | struct inet_sock *inet = inet_sk(sk); | 457 | struct inet_sock *inet = inet_sk(sk); |
458 | int val = 0, err; | 458 | int val = 0, err; |
459 | 459 | ||
460 | if (((1<<optname) & ((1<<IP_PKTINFO) | (1<<IP_RECVTTL) | | 460 | switch (optname) { |
461 | (1<<IP_RECVOPTS) | (1<<IP_RECVTOS) | | 461 | case IP_PKTINFO: |
462 | (1<<IP_RETOPTS) | (1<<IP_TOS) | | 462 | case IP_RECVTTL: |
463 | (1<<IP_TTL) | (1<<IP_HDRINCL) | | 463 | case IP_RECVOPTS: |
464 | (1<<IP_MTU_DISCOVER) | (1<<IP_RECVERR) | | 464 | case IP_RECVTOS: |
465 | (1<<IP_ROUTER_ALERT) | (1<<IP_FREEBIND) | | 465 | case IP_RETOPTS: |
466 | (1<<IP_PASSSEC) | (1<<IP_TRANSPARENT) | | 466 | case IP_TOS: |
467 | (1<<IP_MINTTL) | (1<<IP_NODEFRAG))) || | 467 | case IP_TTL: |
468 | optname == IP_UNICAST_IF || | 468 | case IP_HDRINCL: |
469 | optname == IP_MULTICAST_TTL || | 469 | case IP_MTU_DISCOVER: |
470 | optname == IP_MULTICAST_ALL || | 470 | case IP_RECVERR: |
471 | optname == IP_MULTICAST_LOOP || | 471 | case IP_ROUTER_ALERT: |
472 | optname == IP_RECVORIGDSTADDR) { | 472 | case IP_FREEBIND: |
473 | case IP_PASSSEC: | ||
474 | case IP_TRANSPARENT: | ||
475 | case IP_MINTTL: | ||
476 | case IP_NODEFRAG: | ||
477 | case IP_UNICAST_IF: | ||
478 | case IP_MULTICAST_TTL: | ||
479 | case IP_MULTICAST_ALL: | ||
480 | case IP_MULTICAST_LOOP: | ||
481 | case IP_RECVORIGDSTADDR: | ||
473 | if (optlen >= sizeof(int)) { | 482 | if (optlen >= sizeof(int)) { |
474 | if (get_user(val, (int __user *) optval)) | 483 | if (get_user(val, (int __user *) optval)) |
475 | return -EFAULT; | 484 | return -EFAULT; |
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 1831092f999f..858fddf6482a 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c | |||
@@ -338,12 +338,17 @@ static int vti_rcv(struct sk_buff *skb) | |||
338 | if (tunnel != NULL) { | 338 | if (tunnel != NULL) { |
339 | struct pcpu_tstats *tstats; | 339 | struct pcpu_tstats *tstats; |
340 | 340 | ||
341 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) | ||
342 | return -1; | ||
343 | |||
341 | tstats = this_cpu_ptr(tunnel->dev->tstats); | 344 | tstats = this_cpu_ptr(tunnel->dev->tstats); |
342 | u64_stats_update_begin(&tstats->syncp); | 345 | u64_stats_update_begin(&tstats->syncp); |
343 | tstats->rx_packets++; | 346 | tstats->rx_packets++; |
344 | tstats->rx_bytes += skb->len; | 347 | tstats->rx_bytes += skb->len; |
345 | u64_stats_update_end(&tstats->syncp); | 348 | u64_stats_update_end(&tstats->syncp); |
346 | 349 | ||
350 | skb->mark = 0; | ||
351 | secpath_reset(skb); | ||
347 | skb->dev = tunnel->dev; | 352 | skb->dev = tunnel->dev; |
348 | return 1; | 353 | return 1; |
349 | } | 354 | } |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 197c0008503c..083092e3aed6 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1212,7 +1212,7 @@ new_segment: | |||
1212 | wait_for_sndbuf: | 1212 | wait_for_sndbuf: |
1213 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); | 1213 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); |
1214 | wait_for_memory: | 1214 | wait_for_memory: |
1215 | if (copied && likely(!tp->repair)) | 1215 | if (copied) |
1216 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); | 1216 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); |
1217 | 1217 | ||
1218 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) | 1218 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) |
@@ -1223,7 +1223,7 @@ wait_for_memory: | |||
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | out: | 1225 | out: |
1226 | if (copied && likely(!tp->repair)) | 1226 | if (copied) |
1227 | tcp_push(sk, flags, mss_now, tp->nonagle); | 1227 | tcp_push(sk, flags, mss_now, tp->nonagle); |
1228 | release_sock(sk); | 1228 | release_sock(sk); |
1229 | return copied + copied_syn; | 1229 | return copied + copied_syn; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2c2b13a999ea..609ff98aeb47 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5313,11 +5313,6 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, | |||
5313 | goto discard; | 5313 | goto discard; |
5314 | } | 5314 | } |
5315 | 5315 | ||
5316 | /* ts_recent update must be made after we are sure that the packet | ||
5317 | * is in window. | ||
5318 | */ | ||
5319 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5320 | |||
5321 | /* step 3: check security and precedence [ignored] */ | 5316 | /* step 3: check security and precedence [ignored] */ |
5322 | 5317 | ||
5323 | /* step 4: Check for a SYN | 5318 | /* step 4: Check for a SYN |
@@ -5552,6 +5547,11 @@ step5: | |||
5552 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) | 5547 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) |
5553 | goto discard; | 5548 | goto discard; |
5554 | 5549 | ||
5550 | /* ts_recent update must be made after we are sure that the packet | ||
5551 | * is in window. | ||
5552 | */ | ||
5553 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5554 | |||
5555 | tcp_rcv_rtt_measure_ts(sk, skb); | 5555 | tcp_rcv_rtt_measure_ts(sk, skb); |
5556 | 5556 | ||
5557 | /* Process urgent data. */ | 5557 | /* Process urgent data. */ |
@@ -6130,6 +6130,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
6130 | } else | 6130 | } else |
6131 | goto discard; | 6131 | goto discard; |
6132 | 6132 | ||
6133 | /* ts_recent update must be made after we are sure that the packet | ||
6134 | * is in window. | ||
6135 | */ | ||
6136 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
6137 | |||
6133 | /* step 6: check the URG bit */ | 6138 | /* step 6: check the URG bit */ |
6134 | tcp_urg(sk, skb, th); | 6139 | tcp_urg(sk, skb, th); |
6135 | 6140 | ||
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 53bc5847bfa8..f696d7c2e9fa 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <linux/rcupdate.h> | 1 | #include <linux/rcupdate.h> |
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/jiffies.h> | 3 | #include <linux/jiffies.h> |
4 | #include <linux/bootmem.h> | ||
5 | #include <linux/module.h> | 4 | #include <linux/module.h> |
6 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
7 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
@@ -9,6 +8,7 @@ | |||
9 | #include <linux/tcp.h> | 8 | #include <linux/tcp.h> |
10 | #include <linux/hash.h> | 9 | #include <linux/hash.h> |
11 | #include <linux/tcp_metrics.h> | 10 | #include <linux/tcp_metrics.h> |
11 | #include <linux/vmalloc.h> | ||
12 | 12 | ||
13 | #include <net/inet_connection_sock.h> | 13 | #include <net/inet_connection_sock.h> |
14 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
@@ -1034,7 +1034,10 @@ static int __net_init tcp_net_metrics_init(struct net *net) | |||
1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); | 1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); |
1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; | 1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; |
1036 | 1036 | ||
1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL); | 1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL | __GFP_NOWARN); |
1038 | if (!net->ipv4.tcp_metrics_hash) | ||
1039 | net->ipv4.tcp_metrics_hash = vzalloc(size); | ||
1040 | |||
1038 | if (!net->ipv4.tcp_metrics_hash) | 1041 | if (!net->ipv4.tcp_metrics_hash) |
1039 | return -ENOMEM; | 1042 | return -ENOMEM; |
1040 | 1043 | ||
@@ -1055,7 +1058,10 @@ static void __net_exit tcp_net_metrics_exit(struct net *net) | |||
1055 | tm = next; | 1058 | tm = next; |
1056 | } | 1059 | } |
1057 | } | 1060 | } |
1058 | kfree(net->ipv4.tcp_metrics_hash); | 1061 | if (is_vmalloc_addr(net->ipv4.tcp_metrics_hash)) |
1062 | vfree(net->ipv4.tcp_metrics_hash); | ||
1063 | else | ||
1064 | kfree(net->ipv4.tcp_metrics_hash); | ||
1059 | } | 1065 | } |
1060 | 1066 | ||
1061 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { | 1067 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index cfe6ffe1c177..2798706cb063 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1986,6 +1986,9 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); | 1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); |
1987 | BUG_ON(!tso_segs); | 1987 | BUG_ON(!tso_segs); |
1988 | 1988 | ||
1989 | if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) | ||
1990 | goto repair; /* Skip network transmission */ | ||
1991 | |||
1989 | cwnd_quota = tcp_cwnd_test(tp, skb); | 1992 | cwnd_quota = tcp_cwnd_test(tp, skb); |
1990 | if (!cwnd_quota) | 1993 | if (!cwnd_quota) |
1991 | break; | 1994 | break; |
@@ -2026,6 +2029,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
2026 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) | 2029 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) |
2027 | break; | 2030 | break; |
2028 | 2031 | ||
2032 | repair: | ||
2029 | /* Advance the send_head. This one is sent out. | 2033 | /* Advance the send_head. This one is sent out. |
2030 | * This call will increment packets_out. | 2034 | * This call will increment packets_out. |
2031 | */ | 2035 | */ |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index ba6d13d1f1e1..e02faed6d17e 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -827,6 +827,7 @@ pref_skip_coa: | |||
827 | if (val < 0 || val > 255) | 827 | if (val < 0 || val > 255) |
828 | goto e_inval; | 828 | goto e_inval; |
829 | np->min_hopcount = val; | 829 | np->min_hopcount = val; |
830 | retv = 0; | ||
830 | break; | 831 | break; |
831 | case IPV6_DONTFRAG: | 832 | case IPV6_DONTFRAG: |
832 | np->dontfrag = valbool; | 833 | np->dontfrag = valbool; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 05f3a313db88..7371f676cf41 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2594,6 +2594,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | |||
2594 | else | 2594 | else |
2595 | local->probe_req_reg--; | 2595 | local->probe_req_reg--; |
2596 | 2596 | ||
2597 | if (!local->open_count) | ||
2598 | break; | ||
2599 | |||
2597 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); | 2600 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); |
2598 | break; | 2601 | break; |
2599 | default: | 2602 | default: |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 8c804550465b..156e5835e37f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1314,6 +1314,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1314 | struct net_device *dev); | 1314 | struct net_device *dev); |
1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | 1315 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, |
1316 | struct net_device *dev); | 1316 | struct net_device *dev); |
1317 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
1318 | struct sk_buff_head *skbs); | ||
1317 | 1319 | ||
1318 | /* HT */ | 1320 | /* HT */ |
1319 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | 1321 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c80c4490351c..f57f597972f8 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -871,8 +871,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
871 | local->hw.wiphy->cipher_suites, | 871 | local->hw.wiphy->cipher_suites, |
872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, | 872 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, |
873 | GFP_KERNEL); | 873 | GFP_KERNEL); |
874 | if (!suites) | 874 | if (!suites) { |
875 | return -ENOMEM; | 875 | result = -ENOMEM; |
876 | goto fail_wiphy_register; | ||
877 | } | ||
876 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { | 878 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { |
877 | u32 suite = local->hw.wiphy->cipher_suites[r]; | 879 | u32 suite = local->hw.wiphy->cipher_suites[r]; |
878 | if (suite == WLAN_CIPHER_SUITE_WEP40 || | 880 | if (suite == WLAN_CIPHER_SUITE_WEP40 || |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c4cdbde24fd3..43e60b5a7546 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -917,7 +917,7 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
917 | struct cfg80211_sched_scan_request *req) | 917 | struct cfg80211_sched_scan_request *req) |
918 | { | 918 | { |
919 | struct ieee80211_local *local = sdata->local; | 919 | struct ieee80211_local *local = sdata->local; |
920 | struct ieee80211_sched_scan_ies sched_scan_ies; | 920 | struct ieee80211_sched_scan_ies sched_scan_ies = {}; |
921 | int ret, i; | 921 | int ret, i; |
922 | 922 | ||
923 | mutex_lock(&local->mtx); | 923 | mutex_lock(&local->mtx); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 0a4e4c04db89..d2eb64e12353 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -117,8 +117,8 @@ static void free_sta_work(struct work_struct *wk) | |||
117 | 117 | ||
118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 118 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); | 119 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); |
120 | __skb_queue_purge(&sta->ps_tx_buf[ac]); | 120 | ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); |
121 | __skb_queue_purge(&sta->tx_filtered[ac]); | 121 | ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); |
122 | } | 122 | } |
123 | 123 | ||
124 | #ifdef CONFIG_MAC80211_MESH | 124 | #ifdef CONFIG_MAC80211_MESH |
@@ -141,7 +141,7 @@ static void free_sta_work(struct work_struct *wk) | |||
141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); | 141 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); |
142 | if (!tid_tx) | 142 | if (!tid_tx) |
143 | continue; | 143 | continue; |
144 | __skb_queue_purge(&tid_tx->pending); | 144 | ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); |
145 | kfree(tid_tx); | 145 | kfree(tid_tx); |
146 | } | 146 | } |
147 | 147 | ||
@@ -961,6 +961,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
961 | struct ieee80211_local *local = sdata->local; | 961 | struct ieee80211_local *local = sdata->local; |
962 | struct sk_buff_head pending; | 962 | struct sk_buff_head pending; |
963 | int filtered = 0, buffered = 0, ac; | 963 | int filtered = 0, buffered = 0, ac; |
964 | unsigned long flags; | ||
964 | 965 | ||
965 | clear_sta_flag(sta, WLAN_STA_SP); | 966 | clear_sta_flag(sta, WLAN_STA_SP); |
966 | 967 | ||
@@ -976,12 +977,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
976 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 977 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
977 | int count = skb_queue_len(&pending), tmp; | 978 | int count = skb_queue_len(&pending), tmp; |
978 | 979 | ||
980 | spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags); | ||
979 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); | 981 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); |
982 | spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags); | ||
980 | tmp = skb_queue_len(&pending); | 983 | tmp = skb_queue_len(&pending); |
981 | filtered += tmp - count; | 984 | filtered += tmp - count; |
982 | count = tmp; | 985 | count = tmp; |
983 | 986 | ||
987 | spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags); | ||
984 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); | 988 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); |
989 | spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags); | ||
985 | tmp = skb_queue_len(&pending); | 990 | tmp = skb_queue_len(&pending); |
986 | buffered += tmp - count; | 991 | buffered += tmp - count; |
987 | } | 992 | } |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 3af0cc4130f1..101eb88a2b78 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -668,3 +668,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
668 | dev_kfree_skb_any(skb); | 668 | dev_kfree_skb_any(skb); |
669 | } | 669 | } |
670 | EXPORT_SYMBOL(ieee80211_free_txskb); | 670 | EXPORT_SYMBOL(ieee80211_free_txskb); |
671 | |||
672 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
673 | struct sk_buff_head *skbs) | ||
674 | { | ||
675 | struct sk_buff *skb; | ||
676 | |||
677 | while ((skb = __skb_dequeue(skbs))) | ||
678 | ieee80211_free_txskb(hw, skb); | ||
679 | } | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c9bf83f36657..b858ebe41fda 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1358,7 +1358,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1358 | if (tx->skb) | 1358 | if (tx->skb) |
1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); | 1359 | ieee80211_free_txskb(&tx->local->hw, tx->skb); |
1360 | else | 1360 | else |
1361 | __skb_queue_purge(&tx->skbs); | 1361 | ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); |
1362 | return -1; | 1362 | return -1; |
1363 | } else if (unlikely(res == TX_QUEUED)) { | 1363 | } else if (unlikely(res == TX_QUEUED)) { |
1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); | 1364 | I802_DEBUG_INC(tx->local->tx_handlers_queued); |
@@ -2120,10 +2120,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
2120 | */ | 2120 | */ |
2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) | 2121 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) |
2122 | { | 2122 | { |
2123 | struct sk_buff *skb; | ||
2123 | int i; | 2124 | int i; |
2124 | 2125 | ||
2125 | for (i = 0; i < local->hw.queues; i++) | 2126 | for (i = 0; i < local->hw.queues; i++) { |
2126 | skb_queue_purge(&local->pending[i]); | 2127 | while ((skb = skb_dequeue(&local->pending[i])) != NULL) |
2128 | ieee80211_free_txskb(&local->hw, skb); | ||
2129 | } | ||
2127 | } | 2130 | } |
2128 | 2131 | ||
2129 | /* | 2132 | /* |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 239391807ca9..0151ae33c4cd 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1491,6 +1491,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1491 | list_for_each_entry(sdata, &local->interfaces, list) { | 1491 | list_for_each_entry(sdata, &local->interfaces, list) { |
1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 1492 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
1493 | continue; | 1493 | continue; |
1494 | if (!sdata->u.mgd.associated) | ||
1495 | continue; | ||
1494 | 1496 | ||
1495 | ieee80211_send_nullfunc(local, sdata, 0); | 1497 | ieee80211_send_nullfunc(local, sdata, 0); |
1496 | } | 1498 | } |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index c3bea269faf4..9966e7b16451 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -102,7 +102,7 @@ static const struct file_operations sctp_snmp_seq_fops = { | |||
102 | .open = sctp_snmp_seq_open, | 102 | .open = sctp_snmp_seq_open, |
103 | .read = seq_read, | 103 | .read = seq_read, |
104 | .llseek = seq_lseek, | 104 | .llseek = seq_lseek, |
105 | .release = single_release, | 105 | .release = single_release_net, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | /* Set up the proc fs entry for 'snmp' object. */ | 108 | /* Set up the proc fs entry for 'snmp' object. */ |
@@ -251,7 +251,7 @@ static const struct file_operations sctp_eps_seq_fops = { | |||
251 | .open = sctp_eps_seq_open, | 251 | .open = sctp_eps_seq_open, |
252 | .read = seq_read, | 252 | .read = seq_read, |
253 | .llseek = seq_lseek, | 253 | .llseek = seq_lseek, |
254 | .release = seq_release, | 254 | .release = seq_release_net, |
255 | }; | 255 | }; |
256 | 256 | ||
257 | /* Set up the proc fs entry for 'eps' object. */ | 257 | /* Set up the proc fs entry for 'eps' object. */ |
@@ -372,7 +372,7 @@ static const struct file_operations sctp_assocs_seq_fops = { | |||
372 | .open = sctp_assocs_seq_open, | 372 | .open = sctp_assocs_seq_open, |
373 | .read = seq_read, | 373 | .read = seq_read, |
374 | .llseek = seq_lseek, | 374 | .llseek = seq_lseek, |
375 | .release = seq_release, | 375 | .release = seq_release_net, |
376 | }; | 376 | }; |
377 | 377 | ||
378 | /* Set up the proc fs entry for 'assocs' object. */ | 378 | /* Set up the proc fs entry for 'assocs' object. */ |
@@ -517,7 +517,7 @@ static const struct file_operations sctp_remaddr_seq_fops = { | |||
517 | .open = sctp_remaddr_seq_open, | 517 | .open = sctp_remaddr_seq_open, |
518 | .read = seq_read, | 518 | .read = seq_read, |
519 | .llseek = seq_lseek, | 519 | .llseek = seq_lseek, |
520 | .release = seq_release, | 520 | .release = seq_release_net, |
521 | }; | 521 | }; |
522 | 522 | ||
523 | int __net_init sctp_remaddr_proc_init(struct net *net) | 523 | int __net_init sctp_remaddr_proc_init(struct net *net) |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bcc7d7ee5a51..b75756b05af7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -141,9 +141,8 @@ static const struct ieee80211_regdomain world_regdom = { | |||
141 | .reg_rules = { | 141 | .reg_rules = { |
142 | /* IEEE 802.11b/g, channels 1..11 */ | 142 | /* IEEE 802.11b/g, channels 1..11 */ |
143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), | 143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), |
144 | /* IEEE 802.11b/g, channels 12..13. No HT40 | 144 | /* IEEE 802.11b/g, channels 12..13. */ |
145 | * channel fits here. */ | 145 | REG_RULE(2467-10, 2472+10, 40, 6, 20, |
146 | REG_RULE(2467-10, 2472+10, 20, 6, 20, | ||
147 | NL80211_RRF_PASSIVE_SCAN | | 146 | NL80211_RRF_PASSIVE_SCAN | |
148 | NL80211_RRF_NO_IBSS), | 147 | NL80211_RRF_NO_IBSS), |
149 | /* IEEE 802.11 channel 14 - Only JP enables | 148 | /* IEEE 802.11 channel 14 - Only JP enables |