diff options
author | Josh Boyer <jwboyer@fedoraproject.org> | 2014-06-10 08:31:19 -0400 |
---|---|---|
committer | Josh Boyer <jwboyer@fedoraproject.org> | 2014-06-10 08:31:19 -0400 |
commit | 9b82ecdfb861cd3daf9d01b050c4937391aec003 (patch) | |
tree | 04c35507c2c3b5cabd7ba2fcb217af3e8285c129 | |
parent | 38d8cd2ec1088b1ea6afe3520826405f20e9adcb (diff) | |
download | kernel-9b82ecdfb861cd3daf9d01b050c4937391aec003.tar.gz kernel-9b82ecdfb861cd3daf9d01b050c4937391aec003.tar.xz kernel-9b82ecdfb861cd3daf9d01b050c4937391aec003.zip |
Update to Linux v3.15
52 files changed, 4255 insertions, 1084 deletions
diff --git a/0001-ARM-sunxi-Add-driver-for-SD-MMC-hosts-found-on-Allwi.patch b/0001-ARM-sunxi-Add-driver-for-SD-MMC-hosts-found-on-Allwi.patch new file mode 100644 index 000000000..de006062f --- /dev/null +++ b/0001-ARM-sunxi-Add-driver-for-SD-MMC-hosts-found-on-Allwi.patch @@ -0,0 +1,2201 @@ +From 528a5cd576861f90f51398c707c602a79623492d Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Thu, 5 Sep 2013 19:52:41 -0300 +Subject: [PATCH] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner + sunxi SoCs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The Allwinner sunxi mmc host uses dma in bus-master mode using a built-in +designware idmac controller, which is identical to the one found in the mmc-dw +hosts. However the rest of the host is not identical to mmc-dw, it deals with +sending stop commands in hardware which makes it significantly different +from the mmc-dw devices. + +Signed-off-by: David Lanzendörfer <david.lanzendoerfer@o2s.ch> +Signed-off-by: Emilio López <emilio@elopez.com.ar> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + .../devicetree/bindings/mmc/sunxi-mmc.txt | 43 + + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/sun4i-a10-a1000.dts | 9 + + arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 9 + + arch/arm/boot/dts/sun4i-a10-hackberry.dts | 9 + + arch/arm/boot/dts/sun4i-a10-inet97fv2.dts | 9 + + arch/arm/boot/dts/sun4i-a10-mini-xplus.dts | 9 + + arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 9 + + arch/arm/boot/dts/sun4i-a10-pcduino.dts | 9 + + arch/arm/boot/dts/sun4i-a10.dtsi | 50 + + arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 32 + + arch/arm/boot/dts/sun5i-a10s.dtsi | 41 + + arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts | 16 + + arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 16 + + arch/arm/boot/dts/sun5i-a13.dtsi | 25 + + arch/arm/boot/dts/sun6i-a31-m9.dts | 46 + + arch/arm/boot/dts/sun6i-a31.dtsi | 91 ++ + arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 9 + + arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 40 + + arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 25 + + arch/arm/boot/dts/sun7i-a20.dtsi | 57 + + drivers/clk/sunxi/clk-factors.c | 36 + + drivers/clk/sunxi/clk-sunxi.c | 36 + + drivers/mmc/host/Kconfig | 7 + + drivers/mmc/host/Makefile | 2 + + drivers/mmc/host/sunxi-mmc.c | 1125 ++++++++++++++++++++ + include/linux/clk/sunxi.h | 22 + + 27 files changed, 1783 insertions(+) + create mode 100644 Documentation/devicetree/bindings/mmc/sunxi-mmc.txt + create mode 100644 arch/arm/boot/dts/sun6i-a31-m9.dts + create mode 100644 drivers/mmc/host/sunxi-mmc.c + create mode 100644 include/linux/clk/sunxi.h + +diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +new file mode 100644 +index 0000000..f0c06e7 +--- /dev/null ++++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt +@@ -0,0 +1,43 @@ ++* Allwinner sunxi MMC controller ++ ++The highspeed MMC host controller on Allwinner SoCs provides an interface ++for MMC, SD and SDIO types of memory cards. ++ ++Supported maximum speeds are the ones of the eMMC standard 4.5 as well ++as the speed of SD standard 3.0. ++Absolute maximum transfer rate is 200MB/s ++ ++Required properties: ++ - compatible : "allwinner,sun4i-a10-mmc" or "allwinner,sun5i-a13-mmc" ++ - reg : mmc controller base registers ++ - clocks : a list with 2 phandle + clock specifier pairs ++ - clock-names : must contain "ahb" and "mod" ++ - interrupts : mmc controller interrupt ++ ++Optional properties: ++ - resets : phandle + reset specifier pair ++ - reset-names : must contain "ahb" ++ - for cd, bus-width and additional generic mmc parameters ++ please refer to mmc.txt within this directory ++ ++Examples: ++ - Within .dtsi: ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <0 32 4>; ++ status = "disabled"; ++ }; ++ ++ - Within dts: ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default", "default"; ++ pinctrl-0 = <&mmc0_pins_a>; ++ pinctrl-1 = <&mmc0_cd_pin_reference_design>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 35c146f..1cd137d 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -351,6 +351,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += \ + sun5i-a13-olinuxino.dtb \ + sun5i-a13-olinuxino-micro.dtb \ + sun6i-a31-colombus.dtb \ ++ sun6i-a31-m9.dtb \ + sun7i-a20-cubieboard2.dtb \ + sun7i-a20-cubietruck.dtb \ + sun7i-a20-olinuxino-micro.dtb +diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts +index fa746aea..3056db5 100644 +--- a/arch/arm/boot/dts/sun4i-a10-a1000.dts ++++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts +@@ -36,6 +36,15 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +index 4684cbe..ad9321b 100644 +--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts ++++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +@@ -34,6 +34,15 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts +index d7c17e4..62defd5 100644 +--- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts ++++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts +@@ -36,6 +36,15 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +index fe9272e..d1a9e34 100644 +--- a/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts ++++ b/arch/arm/boot/dts/sun4i-a10-inet97fv2.dts +@@ -24,6 +24,15 @@ + }; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + uart0: serial@01c28000 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; +diff --git a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +index dd84a9e..07a598f 100644 +--- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts ++++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts +@@ -20,6 +20,15 @@ + compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10"; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +index 66cf0c7..8d5d321 100644 +--- a/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts ++++ b/arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts +@@ -33,6 +33,15 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10-pcduino.dts b/arch/arm/boot/dts/sun4i-a10-pcduino.dts +index 255b47e..ce02086 100644 +--- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts ++++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts +@@ -34,6 +34,15 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi +index 9174724..29fd4f5 100644 +--- a/arch/arm/boot/dts/sun4i-a10.dtsi ++++ b/arch/arm/boot/dts/sun4i-a10.dtsi +@@ -377,6 +377,42 @@ + #size-cells = <0>; + }; + ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun4i-a10-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <32>; ++ status = "disabled"; ++ }; ++ ++ mmc1: mmc@01c10000 { ++ compatible = "allwinner,sun4i-a10-mmc"; ++ reg = <0x01c10000 0x1000>; ++ clocks = <&ahb_gates 9>, <&mmc1_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <33>; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@01c11000 { ++ compatible = "allwinner,sun4i-a10-mmc"; ++ reg = <0x01c11000 0x1000>; ++ clocks = <&ahb_gates 10>, <&mmc2_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <34>; ++ status = "disabled"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ compatible = "allwinner,sun4i-a10-mmc"; ++ reg = <0x01c12000 0x1000>; ++ clocks = <&ahb_gates 11>, <&mmc3_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <35>; ++ status = "disabled"; ++ }; ++ + usbphy: phy@01c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun4i-a10-usb-phy"; +@@ -529,6 +565,20 @@ + allwinner,drive = <0>; + allwinner,pull = <0>; + }; ++ ++ mmc0_pins_a: mmc0@0 { ++ allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; ++ allwinner,function = "mmc0"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; ++ ++ mmc0_cd_pin_a: mmc0_cd_pin@0 { ++ allwinner,pins = "PH1"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; + }; + + timer@01c20c00 { +diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts +index 23611b7..de91308 100644 +--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts ++++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts +@@ -35,6 +35,24 @@ + }; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>; ++ bus-width = <4>; ++ cd-gpios = <&pio 6 1 0>; /* PG1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ ++ mmc1: mmc@01c10000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>; ++ bus-width = <4>; ++ cd-gpios = <&pio 6 13 0>; /* PG13 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +@@ -49,6 +67,20 @@ + }; + + pinctrl@01c20800 { ++ mmc0_cd_pin_olinuxino_micro: mmc0_cd_pin@0 { ++ allwinner,pins = "PG1"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ ++ mmc1_cd_pin_olinuxino_micro: mmc1_cd_pin@0 { ++ allwinner,pins = "PG13"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ + led_pins_olinuxino: led_pins@0 { + allwinner,pins = "PE3"; + allwinner,function = "gpio_out"; +diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi +index 79989ed..fb345c2 100644 +--- a/arch/arm/boot/dts/sun5i-a10s.dtsi ++++ b/arch/arm/boot/dts/sun5i-a10s.dtsi +@@ -338,6 +338,33 @@ + #size-cells = <0>; + }; + ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <32>; ++ status = "disabled"; ++ }; ++ ++ mmc1: mmc@01c10000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c10000 0x1000>; ++ clocks = <&ahb_gates 9>, <&mmc1_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <33>; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@01c11000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c11000 0x1000>; ++ clocks = <&ahb_gates 10>, <&mmc2_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <34>; ++ status = "disabled"; ++ }; ++ + usbphy: phy@01c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun5i-a13-usb-phy"; +@@ -451,6 +478,20 @@ + allwinner,drive = <0>; + allwinner,pull = <0>; + }; ++ ++ mmc0_pins_a: mmc0@0 { ++ allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; ++ allwinner,function = "mmc0"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; ++ ++ mmc1_pins_a: mmc1@0 { ++ allwinner,pins = "PG3","PG4","PG5","PG6","PG7","PG8"; ++ allwinner,function = "mmc1"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; + }; + + timer@01c20c00 { +diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts +index 11169d5..8515f19 100644 +--- a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts ++++ b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts +@@ -21,6 +21,15 @@ + compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13"; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxinom>; ++ bus-width = <4>; ++ cd-gpios = <&pio 6 0 0>; /* PG0 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +@@ -35,6 +44,13 @@ + }; + + pinctrl@01c20800 { ++ mmc0_cd_pin_olinuxinom: mmc0_cd_pin@0 { ++ allwinner,pins = "PG0"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ + led_pins_olinuxinom: led_pins@0 { + allwinner,pins = "PG9"; + allwinner,function = "gpio_out"; +diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts +index 7a9187b..51a9438 100644 +--- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts ++++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts +@@ -20,6 +20,15 @@ + compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13"; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>; ++ bus-width = <4>; ++ cd-gpios = <&pio 6 0 0>; /* PG0 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay"; +@@ -34,6 +43,13 @@ + }; + + pinctrl@01c20800 { ++ mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 { ++ allwinner,pins = "PG0"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ + led_pins_olinuxino: led_pins@0 { + allwinner,pins = "PG9"; + allwinner,function = "gpio_out"; +diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi +index f01c315..48ffa51 100644 +--- a/arch/arm/boot/dts/sun5i-a13.dtsi ++++ b/arch/arm/boot/dts/sun5i-a13.dtsi +@@ -320,6 +320,24 @@ + #size-cells = <0>; + }; + ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <32>; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@01c11000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c11000 0x1000>; ++ clocks = <&ahb_gates 10>, <&mmc2_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <34>; ++ status = "disabled"; ++ }; ++ + usbphy: phy@01c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun5i-a13-usb-phy"; +@@ -415,6 +433,13 @@ + allwinner,drive = <0>; + allwinner,pull = <0>; + }; ++ ++ mmc0_pins_a: mmc0@0 { ++ allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; ++ allwinner,function = "mmc0"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; + }; + + timer@01c20c00 { +diff --git a/arch/arm/boot/dts/sun6i-a31-m9.dts b/arch/arm/boot/dts/sun6i-a31-m9.dts +new file mode 100644 +index 0000000..a188721 +--- /dev/null ++++ b/arch/arm/boot/dts/sun6i-a31-m9.dts +@@ -0,0 +1,46 @@ ++/* ++ * Copyright 2014 Hans de Goede <hdegoede@redhat.com> ++ * ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/dts-v1/; ++/include/ "sun6i-a31.dtsi" ++ ++/ { ++ model = "Mele M9 / A1000G Quad top set box"; ++ compatible = "mele,m9", "allwinner,sun6i-a31"; ++ ++ chosen { ++ bootargs = "earlyprintk console=ttyS0,115200"; ++ }; ++ ++ soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_m9>; ++ cd-gpios = <&pio 7 22 0>; /* PH22 */ ++ status = "okay"; ++ }; ++ ++ pio: pinctrl@01c20800 { ++ mmc0_cd_pin_m9: mmc0_cd_pin@0 { ++ allwinner,pins = "PH22"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ }; ++ ++ uart0: serial@01c28000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_pins_a>; ++ status = "okay"; ++ }; ++ }; ++}; +diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi +index d45efa7..0939fc1 100644 +--- a/arch/arm/boot/dts/sun6i-a31.dtsi ++++ b/arch/arm/boot/dts/sun6i-a31.dtsi +@@ -198,6 +198,38 @@ + "apb2_uart4", "apb2_uart5"; + }; + ++ mmc0_clk: clk@01c20088 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c20088 0x4>; ++ clocks = <&osc24M>, <&pll6>; ++ clock-output-names = "mmc0"; ++ }; ++ ++ mmc1_clk: clk@01c2008c { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c2008c 0x4>; ++ clocks = <&osc24M>, <&pll6>; ++ clock-output-names = "mmc1"; ++ }; ++ ++ mmc2_clk: clk@01c20090 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c20090 0x4>; ++ clocks = <&osc24M>, <&pll6>; ++ clock-output-names = "mmc2"; ++ }; ++ ++ mmc3_clk: clk@01c20094 { ++ #clock-cells = <0>; ++ compatible = "allwinner,sun4i-a10-mod0-clk"; ++ reg = <0x01c20094 0x4>; ++ clocks = <&osc24M>, <&pll6>; ++ clock-output-names = "mmc3"; ++ }; ++ + spi0_clk: clk@01c200a0 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-mod0-clk"; +@@ -237,6 +269,58 @@ + #size-cells = <1>; + ranges; + ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb1_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 8>; ++ reset-names = "ahb"; ++ interrupts = <0 60 4>; ++ bus-width = <4>; ++ cd-inverted; ++ status = "disabled"; ++ }; ++ ++ mmc1: mmc@01c10000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c10000 0x1000>; ++ clocks = <&ahb1_gates 9>, <&mmc1_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 9>; ++ reset-names = "reset"; ++ interrupts = <0 61 4>; ++ bus-width = <4>; ++ cd-inverted; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@01c11000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c11000 0x1000>; ++ clocks = <&ahb1_gates 10>, <&mmc2_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 10>; ++ reset-names = "reset"; ++ interrupts = <0 62 4>; ++ bus-width = <4>; ++ cd-inverted; ++ status = "disabled"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c12000 0x1000>; ++ clocks = <&ahb1_gates 11>, <&mmc3_clk>; ++ clock-names = "ahb", "mod"; ++ resets = <&ahb1_rst 11>; ++ reset-names = "reset"; ++ interrupts = <0 63 4>; ++ bus-width = <4>; ++ cd-inverted; ++ status = "disabled"; ++ }; ++ + nmi_intc: interrupt-controller@01f00c0c { + compatible = "allwinner,sun6i-a31-sc-nmi"; + interrupt-controller; +@@ -286,6 +370,13 @@ + allwinner,drive = <0>; + allwinner,pull = <0>; + }; ++ ++ mmc0_pins_a: mmc0@0 { ++ allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; ++ allwinner,function = "mmc0"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; + }; + + ahb1_rst: reset@01c202c0 { +diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +index 68de89f..b41aa99 100644 +--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts ++++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +@@ -20,6 +20,15 @@ + compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20"; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +index cb25d3c..270bac0 100644 +--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts ++++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +@@ -20,6 +20,23 @@ + compatible = "cubietech,cubietruck", "allwinner,sun7i-a20"; + + soc@01c00000 { ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins_a>; ++ vmmc-supply = <®_vmmc3>; ++ non-removable; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +@@ -48,6 +65,18 @@ + }; + + pinctrl@01c20800 { ++ mmc3_pins_a: mmc3@0 { ++ /* AP6210 requires pull-up */ ++ allwinner,pull = <1>; ++ }; ++ ++ vmmc3_pin_cubietruck: vmmc3_pin@0 { ++ allwinner,pins = "PH9"; ++ allwinner,function = "gpio_out"; ++ allwinner,drive = <0>; ++ allwinner,pull = <0>; ++ }; ++ + ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 { + allwinner,pins = "PH12"; + allwinner,function = "gpio_out"; +@@ -139,4 +168,15 @@ + reg_usb2_vbus: usb2-vbus { + status = "okay"; + }; ++ ++ reg_vmmc3: vmmc3 { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vmmc3_pin_cubietruck>; ++ regulator-name = "vmmc3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ enable-active-high; ++ gpio = <&pio 7 9 0>; ++ }; + }; +diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +index eeadf76..f989554 100644 +--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts ++++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts +@@ -31,6 +31,24 @@ + status = "okay"; + }; + ++ mmc0: mmc@01c0f000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_a>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 1 0>; /* PH1 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olinuxinom>; ++ bus-width = <4>; ++ cd-gpios = <&pio 7 11 0>; /* PH11 */ ++ cd-inverted; ++ status = "okay"; ++ }; ++ + usbphy: phy@01c13400 { + usb1_vbus-supply = <®_usb1_vbus>; + usb2_vbus-supply = <®_usb2_vbus>; +@@ -65,6 +83,13 @@ + }; + + pinctrl@01c20800 { ++ mmc3_cd_pin_olinuxinom: mmc3_cd_pin@0 { ++ allwinner,pins = "PH11"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ + led_pins_olinuxino: led_pins@0 { + allwinner,pins = "PH2"; + allwinner,function = "gpio_out"; +diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi +index 32efc10..99e8336 100644 +--- a/arch/arm/boot/dts/sun7i-a20.dtsi ++++ b/arch/arm/boot/dts/sun7i-a20.dtsi +@@ -447,6 +447,42 @@ + #size-cells = <0>; + }; + ++ mmc0: mmc@01c0f000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c0f000 0x1000>; ++ clocks = <&ahb_gates 8>, <&mmc0_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <0 32 4>; ++ status = "disabled"; ++ }; ++ ++ mmc1: mmc@01c10000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c10000 0x1000>; ++ clocks = <&ahb_gates 9>, <&mmc1_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <0 33 4>; ++ status = "disabled"; ++ }; ++ ++ mmc2: mmc@01c11000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c11000 0x1000>; ++ clocks = <&ahb_gates 10>, <&mmc2_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <0 34 4>; ++ status = "disabled"; ++ }; ++ ++ mmc3: mmc@01c12000 { ++ compatible = "allwinner,sun5i-a13-mmc"; ++ reg = <0x01c12000 0x1000>; ++ clocks = <&ahb_gates 11>, <&mmc3_clk>; ++ clock-names = "ahb", "mod"; ++ interrupts = <0 35 4>; ++ status = "disabled"; ++ }; ++ + usbphy: phy@01c13400 { + #phy-cells = <1>; + compatible = "allwinner,sun7i-a20-usb-phy"; +@@ -653,6 +689,27 @@ + allwinner,drive = <0>; + allwinner,pull = <0>; + }; ++ ++ mmc0_pins_a: mmc0@0 { ++ allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5"; ++ allwinner,function = "mmc0"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; ++ ++ mmc0_cd_pin_a: mmc0_cd_pin@0 { ++ allwinner,pins = "PH1"; ++ allwinner,function = "gpio_in"; ++ allwinner,drive = <0>; ++ allwinner,pull = <1>; ++ }; ++ ++ mmc3_pins_a: mmc3@0 { ++ allwinner,pins = "PI4","PI5","PI6","PI7","PI8","PI9"; ++ allwinner,function = "mmc3"; ++ allwinner,drive = <2>; ++ allwinner,pull = <0>; ++ }; + }; + + timer@01c20c00 { +diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c +index 9e23264..3806d97 100644 +--- a/drivers/clk/sunxi/clk-factors.c ++++ b/drivers/clk/sunxi/clk-factors.c +@@ -77,6 +77,41 @@ static long clk_factors_round_rate(struct clk_hw *hw, unsigned long rate, + return rate; + } + ++static long clk_factors_determine_rate(struct clk_hw *hw, unsigned long rate, ++ unsigned long *best_parent_rate, ++ struct clk **best_parent_p) ++{ ++ struct clk *clk = hw->clk, *parent, *best_parent = NULL; ++ int i, num_parents; ++ unsigned long parent_rate, best = 0, child_rate, best_child_rate = 0; ++ ++ /* find the parent that can help provide the fastest rate <= rate */ ++ num_parents = __clk_get_num_parents(clk); ++ for (i = 0; i < num_parents; i++) { ++ parent = clk_get_parent_by_index(clk, i); ++ if (!parent) ++ continue; ++ if (__clk_get_flags(clk) & CLK_SET_RATE_PARENT) ++ parent_rate = __clk_round_rate(parent, rate); ++ else ++ parent_rate = __clk_get_rate(parent); ++ ++ child_rate = clk_factors_round_rate(hw, rate, &parent_rate); ++ ++ if (child_rate <= rate && child_rate > best_child_rate) { ++ best_parent = parent; ++ best = parent_rate; ++ best_child_rate = child_rate; ++ } ++ } ++ ++ if (best_parent) ++ *best_parent_p = best_parent; ++ *best_parent_rate = best; ++ ++ return best_child_rate; ++} ++ + static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate, + unsigned long parent_rate) + { +@@ -113,6 +148,7 @@ static int clk_factors_set_rate(struct clk_hw *hw, unsigned long rate, + } + + const struct clk_ops clk_factors_ops = { ++ .determine_rate = clk_factors_determine_rate, + .recalc_rate = clk_factors_recalc_rate, + .round_rate = clk_factors_round_rate, + .set_rate = clk_factors_set_rate, +diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c +index bd7dc73..59f9040 100644 +--- a/drivers/clk/sunxi/clk-sunxi.c ++++ b/drivers/clk/sunxi/clk-sunxi.c +@@ -507,6 +507,42 @@ CLK_OF_DECLARE(sun7i_a20_gmac, "allwinner,sun7i-a20-gmac-clk", + + + /** ++ * clk_sunxi_mmc_phase_control() - configures MMC clock phase control ++ */ ++ ++void clk_sunxi_mmc_phase_control(struct clk_hw *hw, u8 sample, u8 output) ++{ ++ #define to_clk_composite(_hw) container_of(_hw, struct clk_composite, hw) ++ #define to_clk_factors(_hw) container_of(_hw, struct clk_factors, hw) ++ ++ struct clk_composite *composite = to_clk_composite(hw); ++ struct clk_hw *rate_hw = composite->rate_hw; ++ struct clk_factors *factors = to_clk_factors(rate_hw); ++ unsigned long flags = 0; ++ u32 reg; ++ ++ if (factors->lock) ++ spin_lock_irqsave(factors->lock, flags); ++ ++ reg = readl(factors->reg); ++ ++ /* set sample clock phase control */ ++ reg &= ~(0x7 << 20); ++ reg |= ((sample & 0x7) << 20); ++ ++ /* set output clock phase control */ ++ reg &= ~(0x7 << 8); ++ reg |= ((output & 0x7) << 8); ++ ++ writel(reg, factors->reg); ++ ++ if (factors->lock) ++ spin_unlock_irqrestore(factors->lock, flags); ++} ++EXPORT_SYMBOL(clk_sunxi_mmc_phase_control); ++ ++ ++/** + * sunxi_factors_clk_setup() - Setup function for factor clocks + */ + +diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig +index 8aaf8c1..d50ac1c 100644 +--- a/drivers/mmc/host/Kconfig ++++ b/drivers/mmc/host/Kconfig +@@ -694,3 +694,10 @@ config MMC_REALTEK_PCI + help + Say Y here to include driver code to support SD/MMC card interface + of Realtek PCI-E card reader ++ ++config MMC_SUNXI ++ tristate "Allwinner sunxi SD/MMC Host Controller support" ++ depends on ARCH_SUNXI ++ help ++ This selects support for the SD/MMC Host Controller on ++ Allwinner sunxi SoCs. +diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile +index 0c8aa5e..c706c0f 100644 +--- a/drivers/mmc/host/Makefile ++++ b/drivers/mmc/host/Makefile +@@ -53,6 +53,8 @@ obj-$(CONFIG_MMC_WMT) += wmt-sdmmc.o + + obj-$(CONFIG_MMC_REALTEK_PCI) += rtsx_pci_sdmmc.o + ++obj-$(CONFIG_MMC_SUNXI) += sunxi-mmc.o ++ + obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o + obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o + obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o +diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c +new file mode 100644 +index 0000000..f1de52c +--- /dev/null ++++ b/drivers/mmc/host/sunxi-mmc.c +@@ -0,0 +1,1125 @@ ++/* ++ * Driver for sunxi SD/MMC host controllers ++ * (C) Copyright 2007-2011 Reuuimlla Technology Co., Ltd. ++ * (C) Copyright 2007-2011 Aaron Maoye <leafy.myeh@reuuimllatech.com> ++ * (C) Copyright 2013-2014 O2S GmbH <www.o2s.ch> ++ * (C) Copyright 2013-2014 David Lanzendörfer <david.lanzendoerfer@o2s.ch> ++ * (C) Copyright 2013-2014 Hans de Goede <hdegoede@redhat.com> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/io.h> ++#include <linux/device.h> ++#include <linux/interrupt.h> ++#include <linux/delay.h> ++#include <linux/err.h> ++ ++#include <linux/clk.h> ++#include <linux/clk-private.h> ++#include <linux/clk/sunxi.h> ++ ++#include <linux/gpio.h> ++#include <linux/platform_device.h> ++#include <linux/spinlock.h> ++#include <linux/scatterlist.h> ++#include <linux/dma-mapping.h> ++#include <linux/slab.h> ++#include <linux/regulator/consumer.h> ++#include <linux/reset.h> ++ ++#include <linux/of_address.h> ++#include <linux/of_gpio.h> ++#include <linux/of_platform.h> ++ ++#include <linux/mmc/host.h> ++#include <linux/mmc/sd.h> ++#include <linux/mmc/sdio.h> ++#include <linux/mmc/mmc.h> ++#include <linux/mmc/core.h> ++#include <linux/mmc/card.h> ++#include <linux/mmc/slot-gpio.h> ++ ++/* register offset definitions */ ++#define SDXC_REG_GCTRL (0x00) /* SMC Global Control Register */ ++#define SDXC_REG_CLKCR (0x04) /* SMC Clock Control Register */ ++#define SDXC_REG_TMOUT (0x08) /* SMC Time Out Register */ ++#define SDXC_REG_WIDTH (0x0C) /* SMC Bus Width Register */ ++#define SDXC_REG_BLKSZ (0x10) /* SMC Block Size Register */ ++#define SDXC_REG_BCNTR (0x14) /* SMC Byte Count Register */ ++#define SDXC_REG_CMDR (0x18) /* SMC Command Register */ ++#define SDXC_REG_CARG (0x1C) /* SMC Argument Register */ ++#define SDXC_REG_RESP0 (0x20) /* SMC Response Register 0 */ ++#define SDXC_REG_RESP1 (0x24) /* SMC Response Register 1 */ ++#define SDXC_REG_RESP2 (0x28) /* SMC Response Register 2 */ ++#define SDXC_REG_RESP3 (0x2C) /* SMC Response Register 3 */ ++#define SDXC_REG_IMASK (0x30) /* SMC Interrupt Mask Register */ ++#define SDXC_REG_MISTA (0x34) /* SMC Masked Interrupt Status Register */ ++#define SDXC_REG_RINTR (0x38) /* SMC Raw Interrupt Status Register */ ++#define SDXC_REG_STAS (0x3C) /* SMC Status Register */ ++#define SDXC_REG_FTRGL (0x40) /* SMC FIFO Threshold Watermark Registe */ ++#define SDXC_REG_FUNS (0x44) /* SMC Function Select Register */ ++#define SDXC_REG_CBCR (0x48) /* SMC CIU Byte Count Register */ ++#define SDXC_REG_BBCR (0x4C) /* SMC BIU Byte Count Register */ ++#define SDXC_REG_DBGC (0x50) /* SMC Debug Enable Register */ ++#define SDXC_REG_HWRST (0x78) /* SMC Card Hardware Reset for Register */ ++#define SDXC_REG_DMAC (0x80) /* SMC IDMAC Control Register */ ++#define SDXC_REG_DLBA (0x84) /* SMC IDMAC Descriptor List Base Addre */ ++#define SDXC_REG_IDST (0x88) /* SMC IDMAC Status Register */ ++#define SDXC_REG_IDIE (0x8C) /* SMC IDMAC Interrupt Enable Register */ ++#define SDXC_REG_CHDA (0x90) ++#define SDXC_REG_CBDA (0x94) ++ ++#define mci_readl(host, reg) \ ++ readl((host)->reg_base + SDXC_##reg) ++#define mci_writel(host, reg, value) \ ++ writel((value), (host)->reg_base + SDXC_##reg) ++ ++/* global control register bits */ ++#define SDXC_SOFT_RESET BIT(0) ++#define SDXC_FIFO_RESET BIT(1) ++#define SDXC_DMA_RESET BIT(2) ++#define SDXC_INTERRUPT_ENABLE_BIT BIT(4) ++#define SDXC_DMA_ENABLE_BIT BIT(5) ++#define SDXC_DEBOUNCE_ENABLE_BIT BIT(8) ++#define SDXC_POSEDGE_LATCH_DATA BIT(9) ++#define SDXC_DDR_MODE BIT(10) ++#define SDXC_MEMORY_ACCESS_DONE BIT(29) ++#define SDXC_ACCESS_DONE_DIRECT BIT(30) ++#define SDXC_ACCESS_BY_AHB BIT(31) ++#define SDXC_ACCESS_BY_DMA (0 << 31) ++#define SDXC_HARDWARE_RESET \ ++ (SDXC_SOFT_RESET | SDXC_FIFO_RESET | SDXC_DMA_RESET) ++ ++/* clock control bits */ ++#define SDXC_CARD_CLOCK_ON BIT(16) ++#define SDXC_LOW_POWER_ON BIT(17) ++ ++/* bus width */ ++#define SDXC_WIDTH1 0 ++#define SDXC_WIDTH4 1 ++#define SDXC_WIDTH8 2 ++ ++/* smc command bits */ ++#define SDXC_RESP_EXPIRE BIT(6) ++#define SDXC_LONG_RESPONSE BIT(7) ++#define SDXC_CHECK_RESPONSE_CRC BIT(8) ++#define SDXC_DATA_EXPIRE BIT(9) ++#define SDXC_WRITE BIT(10) ++#define SDXC_SEQUENCE_MODE BIT(11) ++#define SDXC_SEND_AUTO_STOP BIT(12) ++#define SDXC_WAIT_PRE_OVER BIT(13) ++#define SDXC_STOP_ABORT_CMD BIT(14) ++#define SDXC_SEND_INIT_SEQUENCE BIT(15) ++#define SDXC_UPCLK_ONLY BIT(21) ++#define SDXC_READ_CEATA_DEV BIT(22) ++#define SDXC_CCS_EXPIRE BIT(23) ++#define SDXC_ENABLE_BIT_BOOT BIT(24) ++#define SDXC_ALT_BOOT_OPTIONS BIT(25) ++#define SDXC_BOOT_ACK_EXPIRE BIT(26) ++#define SDXC_BOOT_ABORT BIT(27) ++#define SDXC_VOLTAGE_SWITCH BIT(28) ++#define SDXC_USE_HOLD_REGISTER BIT(29) ++#define SDXC_START BIT(31) ++ ++/* interrupt bits */ ++#define SDXC_RESP_ERROR BIT(1) ++#define SDXC_COMMAND_DONE BIT(2) ++#define SDXC_DATA_OVER BIT(3) ++#define SDXC_TX_DATA_REQUEST BIT(4) ++#define SDXC_RX_DATA_REQUEST BIT(5) ++#define SDXC_RESP_CRC_ERROR BIT(6) ++#define SDXC_DATA_CRC_ERROR BIT(7) ++#define SDXC_RESP_TIMEOUT BIT(8) ++#define SDXC_DATA_TIMEOUT BIT(9) ++#define SDXC_VOLTAGE_CHANGE_DONE BIT(10) ++#define SDXC_FIFO_RUN_ERROR BIT(11) ++#define SDXC_HARD_WARE_LOCKED BIT(12) ++#define SDXC_START_BIT_ERROR BIT(13) ++#define SDXC_AUTO_COMMAND_DONE BIT(14) ++#define SDXC_END_BIT_ERROR BIT(15) ++#define SDXC_SDIO_INTERRUPT BIT(16) ++#define SDXC_CARD_INSERT BIT(30) ++#define SDXC_CARD_REMOVE BIT(31) ++#define SDXC_INTERRUPT_ERROR_BIT \ ++ (SDXC_RESP_ERROR | SDXC_RESP_CRC_ERROR | SDXC_DATA_CRC_ERROR | \ ++ SDXC_RESP_TIMEOUT | SDXC_DATA_TIMEOUT | SDXC_FIFO_RUN_ERROR | \ ++ SDXC_HARD_WARE_LOCKED | SDXC_START_BIT_ERROR | SDXC_END_BIT_ERROR) ++#define SDXC_INTERRUPT_DONE_BIT \ ++ (SDXC_AUTO_COMMAND_DONE | SDXC_DATA_OVER | \ ++ SDXC_COMMAND_DONE | SDXC_VOLTAGE_CHANGE_DONE) ++ ++/* status */ ++#define SDXC_RXWL_FLAG BIT(0) ++#define SDXC_TXWL_FLAG BIT(1) ++#define SDXC_FIFO_EMPTY BIT(2) ++#define SDXC_FIFO_FULL BIT(3) ++#define SDXC_CARD_PRESENT BIT(8) ++#define SDXC_CARD_DATA_BUSY BIT(9) ++#define SDXC_DATA_FSM_BUSY BIT(10) ++#define SDXC_DMA_REQUEST BIT(31) ++#define SDXC_FIFO_SIZE 16 ++ ++/* Function select */ ++#define SDXC_CEATA_ON (0xceaa << 16) ++#define SDXC_SEND_IRQ_RESPONSE BIT(0) ++#define SDXC_SDIO_READ_WAIT BIT(1) ++#define SDXC_ABORT_READ_DATA BIT(2) ++#define SDXC_SEND_CCSD BIT(8) ++#define SDXC_SEND_AUTO_STOPCCSD BIT(9) ++#define SDXC_CEATA_DEV_IRQ_ENABLE BIT(10) ++ ++/* IDMA controller bus mod bit field */ ++#define SDXC_IDMAC_SOFT_RESET BIT(0) ++#define SDXC_IDMAC_FIX_BURST BIT(1) ++#define SDXC_IDMAC_IDMA_ON BIT(7) ++#define SDXC_IDMAC_REFETCH_DES BIT(31) ++ ++/* IDMA status bit field */ ++#define SDXC_IDMAC_TRANSMIT_INTERRUPT BIT(0) ++#define SDXC_IDMAC_RECEIVE_INTERRUPT BIT(1) ++#define SDXC_IDMAC_FATAL_BUS_ERROR BIT(2) ++#define SDXC_IDMAC_DESTINATION_INVALID BIT(4) ++#define SDXC_IDMAC_CARD_ERROR_SUM BIT(5) ++#define SDXC_IDMAC_NORMAL_INTERRUPT_SUM BIT(8) ++#define SDXC_IDMAC_ABNORMAL_INTERRUPT_SUM BIT(9) ++#define SDXC_IDMAC_HOST_ABORT_INTERRUPT BIT(10) ++#define SDXC_IDMAC_IDLE (0 << 13) ++#define SDXC_IDMAC_SUSPEND (1 << 13) ++#define SDXC_IDMAC_DESC_READ (2 << 13) ++#define SDXC_IDMAC_DESC_CHECK (3 << 13) ++#define SDXC_IDMAC_READ_REQUEST_WAIT (4 << 13) ++#define SDXC_IDMAC_WRITE_REQUEST_WAIT (5 << 13) ++#define SDXC_IDMAC_READ (6 << 13) ++#define SDXC_IDMAC_WRITE (7 << 13) ++#define SDXC_IDMAC_DESC_CLOSE (8 << 13) ++ ++/* ++* If the idma-des-size-bits of property is ie 13, bufsize bits are: ++* Bits 0-12: buf1 size ++* Bits 13-25: buf2 size ++* Bits 26-31: not used ++* Since we only ever set buf1 size, we can simply store it directly. ++*/ ++#define SDXC_IDMAC_DES0_DIC BIT(1) /* disable interrupt on completion */ ++#define SDXC_IDMAC_DES0_LD BIT(2) /* last descriptor */ ++#define SDXC_IDMAC_DES0_FD BIT(3) /* first descriptor */ ++#define SDXC_IDMAC_DES0_CH BIT(4) /* chain mode */ ++#define SDXC_IDMAC_DES0_ER BIT(5) /* end of ring */ ++#define SDXC_IDMAC_DES0_CES BIT(30) /* card error summary */ ++#define SDXC_IDMAC_DES0_OWN BIT(31) /* 1-idma owns it, 0-host owns it */ ++ ++struct sunxi_idma_des { ++ u32 config; ++ u32 buf_size; ++ u32 buf_addr_ptr1; ++ u32 buf_addr_ptr2; ++}; ++ ++struct sunxi_mmc_host { ++ struct mmc_host *mmc; ++ struct regulator *vmmc; ++ struct reset_control *reset; ++ ++ /* IO mapping base */ ++ void __iomem *reg_base; ++ ++ spinlock_t lock; ++ struct tasklet_struct manual_stop_tasklet; ++ ++ /* clock management */ ++ struct clk *clk_ahb; ++ struct clk *clk_mod; ++ ++ /* ios information */ ++ u32 clk_mod_rate; ++ u32 bus_width; ++ u32 idma_des_size_bits; ++ u32 ddr; ++ u32 voltage_switching; ++ ++ /* irq */ ++ int irq; ++ u32 int_sum; ++ u32 sdio_imask; ++ ++ /* flags */ ++ bool wait_dma; ++ ++ dma_addr_t sg_dma; ++ void *sg_cpu; ++ ++ struct mmc_request *mrq; ++ struct mmc_request *manual_stop_mrq; ++ u32 ferror; ++}; ++ ++static int sunxi_mmc_init_host(struct mmc_host *mmc) ++{ ++ u32 rval; ++ struct sunxi_mmc_host *smc_host = mmc_priv(mmc); ++ int ret; ++ ++ ret = clk_prepare_enable(smc_host->clk_ahb); ++ if (ret) { ++ dev_err(mmc_dev(smc_host->mmc), "AHB clk err %d\n", ret); ++ return ret; ++ } ++ ++ ret = clk_prepare_enable(smc_host->clk_mod); ++ if (ret) { ++ dev_err(mmc_dev(smc_host->mmc), "MOD clk err %d\n", ret); ++ clk_disable_unprepare(smc_host->clk_ahb); ++ return ret; ++ } ++ ++ if (smc_host->reset) { ++ ret = reset_control_deassert(smc_host->reset); ++ if (ret) { ++ dev_err(mmc_dev(smc_host->mmc), "reset err %d\n", ret); ++ clk_disable_unprepare(smc_host->clk_ahb); ++ clk_disable_unprepare(smc_host->clk_mod); ++ return ret; ++ } ++ } ++ ++ /* reset controller */ ++ rval = mci_readl(smc_host, REG_GCTRL); ++ rval |= SDXC_HARDWARE_RESET; ++ mci_writel(smc_host, REG_GCTRL, rval); ++ ++ mci_writel(smc_host, REG_FTRGL, 0x20070008); ++ mci_writel(smc_host, REG_TMOUT, 0xffffffff); ++ mci_writel(smc_host, REG_IMASK, smc_host->sdio_imask); ++ mci_writel(smc_host, REG_RINTR, 0xffffffff); ++ mci_writel(smc_host, REG_DBGC, 0xdeb); ++ mci_writel(smc_host, REG_FUNS, SDXC_CEATA_ON); ++ mci_writel(smc_host, REG_DLBA, smc_host->sg_dma); ++ ++ rval = mci_readl(smc_host, REG_GCTRL); ++ rval |= SDXC_INTERRUPT_ENABLE_BIT; ++ rval &= ~SDXC_ACCESS_DONE_DIRECT; ++ mci_writel(smc_host, REG_GCTRL, rval); ++ ++ return 0; ++} ++ ++static void sunxi_mmc_exit_host(struct sunxi_mmc_host *smc_host) ++{ ++ mci_writel(smc_host, REG_GCTRL, SDXC_HARDWARE_RESET); ++ ++ if (smc_host->reset) ++ reset_control_assert(smc_host->reset); ++ ++ clk_disable_unprepare(smc_host->clk_ahb); ++ clk_disable_unprepare(smc_host->clk_mod); ++} ++ ++/* /\* UHS-I Operation Modes */ ++/* * DS 25MHz 12.5MB/s 3.3V */ ++/* * HS 50MHz 25MB/s 3.3V */ ++/* * SDR12 25MHz 12.5MB/s 1.8V */ ++/* * SDR25 50MHz 25MB/s 1.8V */ ++/* * SDR50 100MHz 50MB/s 1.8V */ ++/* * SDR104 208MHz 104MB/s 1.8V */ ++/* * DDR50 50MHz 50MB/s 1.8V */ ++/* * MMC Operation Modes */ ++/* * DS 26MHz 26MB/s 3/1.8/1.2V */ ++/* * HS 52MHz 52MB/s 3/1.8/1.2V */ ++/* * HSDDR 52MHz 104MB/s 3/1.8/1.2V */ ++/* * HS200 200MHz 200MB/s 1.8/1.2V */ ++/* * */ ++/* * Spec. Timing */ ++/* * SD3.0 */ ++/* * Fcclk Tcclk Fsclk Tsclk Tis Tih odly RTis RTih */ ++/* * 400K 2.5us 24M 41ns 5ns 5ns 1 2209ns 41ns */ ++/* * 25M 40ns 600M 1.67ns 5ns 5ns 3 14.99ns 5.01ns */ ++/* * 50M 20ns 600M 1.67ns 6ns 2ns 3 14.99ns 5.01ns */ ++/* * 50MDDR 20ns 600M 1.67ns 6ns 0.8ns 2 6.67ns 3.33ns */ ++/* * 104M 9.6ns 600M 1.67ns 3ns 0.8ns 1 7.93ns 1.67ns */ ++/* * 208M 4.8ns 600M 1.67ns 1.4ns 0.8ns 1 3.33ns 1.67ns */ ++ ++/* * 25M 40ns 300M 3.33ns 5ns 5ns 2 13.34ns 6.66ns */ ++/* * 50M 20ns 300M 3.33ns 6ns 2ns 2 13.34ns 6.66ns */ ++/* * 50MDDR 20ns 300M 3.33ns 6ns 0.8ns 1 6.67ns 3.33ns */ ++/* * 104M 9.6ns 300M 3.33ns 3ns 0.8ns 0 7.93ns 1.67ns */ ++/* * 208M 4.8ns 300M 3.33ns 1.4ns 0.8ns 0 3.13ns 1.67ns */ ++ ++/* * eMMC4.5 */ ++/* * 400K 2.5us 24M 41ns 3ns 3ns 1 2209ns 41ns */ ++/* * 25M 40ns 600M 1.67ns 3ns 3ns 3 14.99ns 5.01ns */ ++/* * 50M 20ns 600M 1.67ns 3ns 3ns 3 14.99ns 5.01ns */ ++/* * 50MDDR 20ns 600M 1.67ns 2.5ns 2.5ns 2 6.67ns 3.33ns */ ++/* * 200M 5ns 600M 1.67ns 1.4ns 0.8ns 1 3.33ns 1.67ns */ ++/* *\/ */ ++ ++static void sunxi_mmc_init_idma_des(struct sunxi_mmc_host *host, ++ struct mmc_data *data) ++{ ++ struct sunxi_idma_des *pdes = (struct sunxi_idma_des *)host->sg_cpu; ++ struct sunxi_idma_des *pdes_pa = (struct sunxi_idma_des *)host->sg_dma; ++ int i, max_len = (1 << host->idma_des_size_bits); ++ ++ for (i = 0; i < data->sg_len; i++) { ++ pdes[i].config = SDXC_IDMAC_DES0_CH | SDXC_IDMAC_DES0_OWN | ++ SDXC_IDMAC_DES0_DIC; ++ ++ if (data->sg[i].length == max_len) ++ pdes[i].buf_size = 0; /* 0 == max_len */ ++ else ++ pdes[i].buf_size = data->sg[i].length; ++ ++ pdes[i].buf_addr_ptr1 = sg_dma_address(&data->sg[i]); ++ pdes[i].buf_addr_ptr2 = (u32)&pdes_pa[i + 1]; ++ } ++ ++ pdes[0].config |= SDXC_IDMAC_DES0_FD; ++ pdes[i - 1].config = SDXC_IDMAC_DES0_OWN | SDXC_IDMAC_DES0_LD; ++ ++ /* ++ * Avoid the io-store starting the idmac hitting io-mem before the ++ * descriptors hit the main-mem. ++ */ ++ wmb(); ++} ++ ++static enum dma_data_direction sunxi_mmc_get_dma_dir(struct mmc_data *data) ++{ ++ if (data->flags & MMC_DATA_WRITE) ++ return DMA_TO_DEVICE; ++ else ++ return DMA_FROM_DEVICE; ++} ++ ++static int sunxi_mmc_map_dma(struct sunxi_mmc_host *smc_host, ++ struct mmc_data *data) ++{ ++ u32 i, dma_len; ++ struct scatterlist *sg; ++ ++ dma_len = dma_map_sg(mmc_dev(smc_host->mmc), data->sg, data->sg_len, ++ sunxi_mmc_get_dma_dir(data)); ++ if (dma_len == 0) { ++ dev_err(mmc_dev(smc_host->mmc), "dma_map_sg failed\n"); ++ return -ENOMEM; ++ } ++ ++ for_each_sg(data->sg, sg, data->sg_len, i) { ++ if (sg->offset & 3 || sg->length & 3) { ++ dev_err(mmc_dev(smc_host->mmc), ++ "unaligned scatterlist: os %x length %d\n", ++ sg->offset, sg->length); ++ return -EINVAL; ++ } ++ } ++ ++ return 0; ++} ++ ++static void sunxi_mmc_start_dma(struct sunxi_mmc_host *smc_host, ++ struct mmc_data *data) ++{ ++ u32 rval; ++ ++ sunxi_mmc_init_idma_des(smc_host, data); ++ ++ rval = mci_readl(smc_host, REG_GCTRL); ++ rval |= SDXC_DMA_ENABLE_BIT; ++ mci_writel(smc_host, REG_GCTRL, rval); ++ rval |= SDXC_DMA_RESET; ++ mci_writel(smc_host, REG_GCTRL, rval); ++ ++ mci_writel(smc_host, REG_DMAC, SDXC_IDMAC_SOFT_RESET); ++ ++ if (!(data->flags & MMC_DATA_WRITE)) ++ mci_writel(smc_host, REG_IDIE, SDXC_IDMAC_RECEIVE_INTERRUPT); ++ ++ mci_writel(smc_host, REG_DMAC, ++ SDXC_IDMAC_FIX_BURST | SDXC_IDMAC_IDMA_ON); ++} ++ ++static void sunxi_mmc_send_manual_stop(struct sunxi_mmc_host *host, ++ struct mmc_request *req) ++{ ++ u32 cmd_val = SDXC_START | SDXC_RESP_EXPIRE | SDXC_STOP_ABORT_CMD ++ | SDXC_CHECK_RESPONSE_CRC | MMC_STOP_TRANSMISSION; ++ u32 ri = 0; ++ unsigned long expire = jiffies + msecs_to_jiffies(1000); ++ ++ mci_writel(host, REG_CARG, 0); ++ mci_writel(host, REG_CMDR, cmd_val); ++ ++ do { ++ ri = mci_readl(host, REG_RINTR); ++ } while (!(ri & (SDXC_COMMAND_DONE | SDXC_INTERRUPT_ERROR_BIT)) && ++ time_before(jiffies, expire)); ++ ++ if (ri & SDXC_INTERRUPT_ERROR_BIT) { ++ dev_err(mmc_dev(host->mmc), "send stop command failed\n"); ++ if (req->stop) ++ req->stop->resp[0] = -ETIMEDOUT; ++ } else { ++ if (req->stop) ++ req->stop->resp[0] = mci_readl(host, REG_RESP0); ++ } ++ ++ mci_writel(host, REG_RINTR, 0xffff); ++} ++ ++static void sunxi_mmc_dump_errinfo(struct sunxi_mmc_host *smc_host) ++{ ++ struct mmc_command *cmd = smc_host->mrq->cmd; ++ struct mmc_data *data = smc_host->mrq->data; ++ ++ /* For some cmds timeout is normal with sd/mmc cards */ ++ if ((smc_host->int_sum & SDXC_INTERRUPT_ERROR_BIT) == ++ SDXC_RESP_TIMEOUT && (cmd->opcode == SD_IO_SEND_OP_COND || ++ cmd->opcode == SD_IO_RW_DIRECT)) ++ return; ++ ++ dev_err(mmc_dev(smc_host->mmc), ++ "smc %d err, cmd %d,%s%s%s%s%s%s%s%s%s%s !!\n", ++ smc_host->mmc->index, cmd->opcode, ++ data ? (data->flags & MMC_DATA_WRITE ? " WR" : " RD") : "", ++ smc_host->int_sum & SDXC_RESP_ERROR ? " RE" : "", ++ smc_host->int_sum & SDXC_RESP_CRC_ERROR ? " RCE" : "", ++ smc_host->int_sum & SDXC_DATA_CRC_ERROR ? " DCE" : "", ++ smc_host->int_sum & SDXC_RESP_TIMEOUT ? " RTO" : "", ++ smc_host->int_sum & SDXC_DATA_TIMEOUT ? " DTO" : "", ++ smc_host->int_sum & SDXC_FIFO_RUN_ERROR ? " FE" : "", ++ smc_host->int_sum & SDXC_HARD_WARE_LOCKED ? " HL" : "", ++ smc_host->int_sum & SDXC_START_BIT_ERROR ? " SBE" : "", ++ smc_host->int_sum & SDXC_END_BIT_ERROR ? " EBE" : "" ++ ); ++} ++ ++/* Called in interrupt context! */ ++static int sunxi_mmc_finalize_request(struct sunxi_mmc_host *host) ++{ ++ struct mmc_request *mrq = host->mrq; ++ ++ mci_writel(host, REG_IMASK, host->sdio_imask); ++ mci_writel(host, REG_IDIE, 0); ++ ++ if (host->int_sum & SDXC_INTERRUPT_ERROR_BIT) { ++ sunxi_mmc_dump_errinfo(host); ++ mrq->cmd->error = -ETIMEDOUT; ++ ++ if (mrq->data) ++ mrq->data->error = -ETIMEDOUT; ++ ++ if (mrq->stop) ++ mrq->stop->error = -ETIMEDOUT; ++ } else { ++ if (mrq->cmd->flags & MMC_RSP_136) { ++ mrq->cmd->resp[0] = mci_readl(host, REG_RESP3); ++ mrq->cmd->resp[1] = mci_readl(host, REG_RESP2); ++ mrq->cmd->resp[2] = mci_readl(host, REG_RESP1); ++ mrq->cmd->resp[3] = mci_readl(host, REG_RESP0); ++ } else { ++ mrq->cmd->resp[0] = mci_readl(host, REG_RESP0); ++ } ++ ++ if (mrq->data) ++ mrq->data->bytes_xfered = ++ mrq->data->blocks * mrq->data->blksz; ++ } ++ ++ if (mrq->data) { ++ struct mmc_data *data = mrq->data; ++ u32 rval; ++ ++ mci_writel(host, REG_IDST, 0x337); ++ mci_writel(host, REG_DMAC, 0); ++ rval = mci_readl(host, REG_GCTRL); ++ rval |= SDXC_DMA_RESET; ++ mci_writel(host, REG_GCTRL, rval); ++ rval &= ~SDXC_DMA_ENABLE_BIT; ++ mci_writel(host, REG_GCTRL, rval); ++ rval |= SDXC_FIFO_RESET; ++ mci_writel(host, REG_GCTRL, rval); ++ dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, ++ sunxi_mmc_get_dma_dir(data)); ++ } ++ ++ mci_writel(host, REG_RINTR, 0xffff); ++ ++ dev_dbg(mmc_dev(host->mmc), "req done, resp %08x %08x %08x %08x\n", ++ mrq->cmd->resp[0], mrq->cmd->resp[1], ++ mrq->cmd->resp[2], mrq->cmd->resp[3]); ++ ++ host->mrq = NULL; ++ host->int_sum = 0; ++ host->wait_dma = false; ++ ++ if (mrq->data && mrq->data->error) { ++ host->manual_stop_mrq = mrq; ++ tasklet_schedule(&host->manual_stop_tasklet); ++ return -EBUSY; ++ } ++ ++ return 0; ++} ++ ++static irqreturn_t sunxi_mmc_irq(int irq, void *dev_id) ++{ ++ struct sunxi_mmc_host *host = dev_id; ++ struct mmc_request *mrq; ++ bool finalize = false; ++ bool complete = false; ++ bool sdio_int = false; ++ u32 msk_int; ++ u32 idma_int; ++ ++ spin_lock(&host->lock); ++ ++ idma_int = mci_readl(host, REG_IDST); ++ msk_int = mci_readl(host, REG_MISTA); ++ ++ dev_dbg(mmc_dev(host->mmc), "irq: rq %p mi %08x idi %08x\n", ++ host->mrq, msk_int, idma_int); ++ ++ mrq = host->mrq; ++ if (mrq) { ++ if (idma_int & SDXC_IDMAC_RECEIVE_INTERRUPT) ++ host->wait_dma = false; ++ ++ host->int_sum |= msk_int; ++ ++ /* Wait for COMMAND_DONE on RESPONSE_TIMEOUT before finalize */ ++ if ((host->int_sum & SDXC_RESP_TIMEOUT) && ++ !(host->int_sum & SDXC_COMMAND_DONE)) ++ mci_writel(host, REG_IMASK, ++ host->sdio_imask | SDXC_COMMAND_DONE); ++ /* Don't wait for dma on error */ ++ else if (host->int_sum & SDXC_INTERRUPT_ERROR_BIT) ++ finalize = true; ++ else if ((host->int_sum & SDXC_INTERRUPT_DONE_BIT) && ++ !host->wait_dma) ++ finalize = true; ++ } ++ ++ if (msk_int & SDXC_SDIO_INTERRUPT) ++ sdio_int = true; ++ ++ mci_writel(host, REG_RINTR, msk_int); ++ mci_writel(host, REG_IDST, idma_int); ++ ++ if (finalize) { ++ if (sunxi_mmc_finalize_request(host) == 0) ++ complete = true; ++ } ++ ++ spin_unlock(&host->lock); ++ ++ if (complete) ++ mmc_request_done(host->mmc, mrq); ++ ++ if (sdio_int) ++ mmc_signal_sdio_irq(host->mmc); ++ ++ return IRQ_HANDLED; ++} ++ ++static void sunxi_mmc_manual_stop_tasklet(unsigned long data) ++{ ++ struct sunxi_mmc_host *host = (struct sunxi_mmc_host *) data; ++ struct mmc_request *mrq; ++ unsigned long iflags; ++ ++ spin_lock_irqsave(&host->lock, iflags); ++ mrq = host->manual_stop_mrq; ++ spin_unlock_irqrestore(&host->lock, iflags); ++ ++ if (!mrq) { ++ dev_err(mmc_dev(host->mmc), "no request for manual stop\n"); ++ return; ++ } ++ ++ dev_err(mmc_dev(host->mmc), "data error, sending stop command\n"); ++ sunxi_mmc_send_manual_stop(host, mrq); ++ ++ spin_lock_irqsave(&host->lock, iflags); ++ host->manual_stop_mrq = NULL; ++ spin_unlock_irqrestore(&host->lock, iflags); ++ ++ mmc_request_done(host->mmc, mrq); ++} ++ ++static void sunxi_mmc_oclk_onoff(struct sunxi_mmc_host *host, u32 oclk_en) ++{ ++ unsigned long expire = jiffies + msecs_to_jiffies(2000); ++ u32 rval; ++ ++ rval = mci_readl(host, REG_CLKCR); ++ rval &= ~(SDXC_CARD_CLOCK_ON | SDXC_LOW_POWER_ON); ++ ++ if (oclk_en) ++ rval |= SDXC_CARD_CLOCK_ON; ++ ++ mci_writel(host, REG_CLKCR, rval); ++ ++ rval = SDXC_START | SDXC_UPCLK_ONLY | SDXC_WAIT_PRE_OVER; ++ if (host->voltage_switching) ++ rval |= SDXC_VOLTAGE_SWITCH; ++ mci_writel(host, REG_CMDR, rval); ++ ++ do { ++ rval = mci_readl(host, REG_CMDR); ++ } while (time_before(jiffies, expire) && (rval & SDXC_START)); ++ ++ if (rval & SDXC_START) { ++ dev_err(mmc_dev(host->mmc), "fatal err update clk timeout\n"); ++ host->ferror = 1; ++ } ++} ++ ++static void sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *smc_host, ++ unsigned int rate) ++{ ++ u32 newrate, oclk_dly, rval, sclk_dly, src_clk; ++ struct clk_hw *hw = __clk_get_hw(smc_host->clk_mod); ++ ++ newrate = clk_round_rate(smc_host->clk_mod, rate); ++ if (smc_host->clk_mod_rate == newrate) { ++ dev_dbg(mmc_dev(smc_host->mmc), "clk already %d, rounded %d\n", ++ rate, newrate); ++ return; ++ } ++ ++ dev_dbg(mmc_dev(smc_host->mmc), "setting clk to %d, rounded %d\n", ++ rate, newrate); ++ ++ /* setting clock rate */ ++ clk_set_rate(smc_host->clk_mod, newrate); ++ smc_host->clk_mod_rate = clk_get_rate(smc_host->clk_mod); ++ dev_dbg(mmc_dev(smc_host->mmc), "clk is now %d\n", ++ smc_host->clk_mod_rate); ++ ++ sunxi_mmc_oclk_onoff(smc_host, 0); ++ /* clear internal divider */ ++ rval = mci_readl(smc_host, REG_CLKCR); ++ rval &= ~0xff; ++ mci_writel(smc_host, REG_CLKCR, rval); ++ ++ /* determine delays */ ++ if (rate <= 400000) { ++ oclk_dly = 0; ++ sclk_dly = 7; ++ } else if (rate <= 25000000) { ++ oclk_dly = 0; ++ sclk_dly = 5; ++ } else if (rate <= 50000000) { ++ if (smc_host->ddr) { ++ oclk_dly = 2; ++ sclk_dly = 4; ++ } else { ++ oclk_dly = 3; ++ sclk_dly = 5; ++ } ++ } else { ++ /* rate > 50000000 */ ++ oclk_dly = 2; ++ sclk_dly = 4; ++ } ++ ++ src_clk = clk_get_rate(clk_get_parent(smc_host->clk_mod)); ++ if (src_clk >= 300000000 && src_clk <= 400000000) { ++ if (oclk_dly) ++ oclk_dly--; ++ if (sclk_dly) ++ sclk_dly--; ++ } ++ ++ clk_sunxi_mmc_phase_control(hw, sclk_dly, oclk_dly); ++ sunxi_mmc_oclk_onoff(smc_host, 1); ++ ++ /* oclk_onoff sets various irq status bits, clear these */ ++ mci_writel(smc_host, REG_RINTR, ++ mci_readl(smc_host, REG_RINTR) & ~SDXC_SDIO_INTERRUPT); ++} ++ ++static void sunxi_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ++{ ++ struct sunxi_mmc_host *host = mmc_priv(mmc); ++ u32 rval; ++ s32 err; ++ ++ /* Set the power state */ ++ switch (ios->power_mode) { ++ case MMC_POWER_ON: ++ break; ++ ++ case MMC_POWER_UP: ++ if (!IS_ERR(host->vmmc)) { ++ mmc_regulator_set_ocr(host->mmc, host->vmmc, ios->vdd); ++ udelay(200); ++ } ++ ++ err = sunxi_mmc_init_host(mmc); ++ if (err) { ++ host->ferror = 1; ++ return; ++ } ++ ++ enable_irq(host->irq); ++ ++ dev_dbg(mmc_dev(host->mmc), "power on!\n"); ++ host->ferror = 0; ++ break; ++ ++ case MMC_POWER_OFF: ++ dev_dbg(mmc_dev(host->mmc), "power off!\n"); ++ disable_irq(host->irq); ++ sunxi_mmc_exit_host(host); ++ if (!IS_ERR(host->vmmc)) ++ mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); ++ ++ host->ferror = 0; ++ break; ++ } ++ ++ /* set bus width */ ++ switch (ios->bus_width) { ++ case MMC_BUS_WIDTH_1: ++ mci_writel(host, REG_WIDTH, SDXC_WIDTH1); ++ host->bus_width = 1; ++ break; ++ case MMC_BUS_WIDTH_4: ++ mci_writel(host, REG_WIDTH, SDXC_WIDTH4); ++ host->bus_width = 4; ++ break; ++ case MMC_BUS_WIDTH_8: ++ mci_writel(host, REG_WIDTH, SDXC_WIDTH8); ++ host->bus_width = 8; ++ break; ++ } ++ ++ /* set ddr mode */ ++ rval = mci_readl(host, REG_GCTRL); ++ if (ios->timing == MMC_TIMING_UHS_DDR50) { ++ rval |= SDXC_DDR_MODE; ++ host->ddr = 1; ++ } else { ++ rval &= ~SDXC_DDR_MODE; ++ host->ddr = 0; ++ } ++ mci_writel(host, REG_GCTRL, rval); ++ ++ /* set up clock */ ++ if (ios->clock && ios->power_mode) { ++ dev_dbg(mmc_dev(host->mmc), "ios->clock: %d\n", ios->clock); ++ sunxi_mmc_clk_set_rate(host, ios->clock); ++ usleep_range(50000, 55000); ++ } ++} ++ ++static void sunxi_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable) ++{ ++ struct sunxi_mmc_host *smc_host = mmc_priv(mmc); ++ unsigned long flags; ++ u32 imask; ++ ++ spin_lock_irqsave(&smc_host->lock, flags); ++ ++ imask = mci_readl(smc_host, REG_IMASK); ++ if (enable) { ++ smc_host->sdio_imask = SDXC_SDIO_INTERRUPT; ++ imask |= SDXC_SDIO_INTERRUPT; ++ } else { ++ smc_host->sdio_imask = 0; ++ imask &= ~SDXC_SDIO_INTERRUPT; ++ } ++ mci_writel(smc_host, REG_IMASK, imask); ++ spin_unlock_irqrestore(&smc_host->lock, flags); ++} ++ ++static void sunxi_mmc_hw_reset(struct mmc_host *mmc) ++{ ++ struct sunxi_mmc_host *smc_host = mmc_priv(mmc); ++ mci_writel(smc_host, REG_HWRST, 0); ++ udelay(10); ++ mci_writel(smc_host, REG_HWRST, 1); ++ udelay(300); ++} ++ ++static void sunxi_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) ++{ ++ struct sunxi_mmc_host *host = mmc_priv(mmc); ++ struct mmc_command *cmd = mrq->cmd; ++ struct mmc_data *data = mrq->data; ++ unsigned long iflags; ++ u32 imask = SDXC_INTERRUPT_ERROR_BIT; ++ u32 cmd_val = SDXC_START | (cmd->opcode & 0x3f); ++ int ret; ++ ++ if (!mmc_gpio_get_cd(mmc) || host->ferror) { ++ dev_dbg(mmc_dev(host->mmc), "no medium present\n"); ++ mrq->cmd->error = -ENOMEDIUM; ++ mmc_request_done(mmc, mrq); ++ return; ++ } ++ ++ if (data) { ++ ret = sunxi_mmc_map_dma(host, data); ++ if (ret < 0) { ++ dev_err(mmc_dev(host->mmc), "map DMA failed\n"); ++ cmd->error = ret; ++ cmd->data->error = ret; ++ mmc_request_done(host->mmc, mrq); ++ return; ++ } ++ } ++ ++ if (cmd->opcode == MMC_GO_IDLE_STATE) { ++ cmd_val |= SDXC_SEND_INIT_SEQUENCE; ++ imask |= SDXC_COMMAND_DONE; ++ } ++ ++ if (cmd->opcode == SD_SWITCH_VOLTAGE) { ++ cmd_val |= SDXC_VOLTAGE_SWITCH; ++ imask |= SDXC_VOLTAGE_CHANGE_DONE; ++ host->voltage_switching = 1; ++ sunxi_mmc_oclk_onoff(host, 1); ++ } ++ ++ if (cmd->flags & MMC_RSP_PRESENT) { ++ cmd_val |= SDXC_RESP_EXPIRE; ++ if (cmd->flags & MMC_RSP_136) ++ cmd_val |= SDXC_LONG_RESPONSE; ++ if (cmd->flags & MMC_RSP_CRC) ++ cmd_val |= SDXC_CHECK_RESPONSE_CRC; ++ ++ if ((cmd->flags & MMC_CMD_MASK) == MMC_CMD_ADTC) { ++ cmd_val |= SDXC_DATA_EXPIRE | SDXC_WAIT_PRE_OVER; ++ if (cmd->data->flags & MMC_DATA_STREAM) { ++ imask |= SDXC_AUTO_COMMAND_DONE; ++ cmd_val |= SDXC_SEQUENCE_MODE | ++ SDXC_SEND_AUTO_STOP; ++ } ++ ++ if (cmd->data->stop) { ++ imask |= SDXC_AUTO_COMMAND_DONE; ++ cmd_val |= SDXC_SEND_AUTO_STOP; ++ } else { ++ imask |= SDXC_DATA_OVER; ++ } ++ ++ if (cmd->data->flags & MMC_DATA_WRITE) ++ cmd_val |= SDXC_WRITE; ++ else ++ host->wait_dma = true; ++ } else { ++ imask |= SDXC_COMMAND_DONE; ++ } ++ } else { ++ imask |= SDXC_COMMAND_DONE; ++ } ++ ++ dev_dbg(mmc_dev(host->mmc), "cmd %d(%08x) arg %x ie 0x%08x len %d\n", ++ cmd_val & 0x3f, cmd_val, cmd->arg, imask, ++ mrq->data ? mrq->data->blksz * mrq->data->blocks : 0); ++ ++ spin_lock_irqsave(&host->lock, iflags); ++ ++ if (host->mrq || host->manual_stop_mrq) { ++ spin_unlock_irqrestore(&host->lock, iflags); ++ ++ if (data) ++ dma_unmap_sg(mmc_dev(host->mmc), data->sg, ++ data->sg_len, sunxi_mmc_get_dma_dir(data)); ++ ++ dev_err(mmc_dev(host->mmc), "request already pending\n"); ++ mrq->cmd->error = -EBUSY; ++ mmc_request_done(host->mmc, mrq); ++ return; ++ } ++ ++ if (data) { ++ mci_writel(host, REG_BLKSZ, data->blksz); ++ mci_writel(host, REG_BCNTR, data->blksz * data->blocks); ++ sunxi_mmc_start_dma(host, data); ++ } ++ ++ host->mrq = mrq; ++ mci_writel(host, REG_IMASK, host->sdio_imask | imask); ++ mci_writel(host, REG_CARG, cmd->arg); ++ mci_writel(host, REG_CMDR, cmd_val); ++ ++ spin_unlock_irqrestore(&host->lock, iflags); ++} ++ ++static const struct of_device_id sunxi_mmc_of_match[] = { ++ { .compatible = "allwinner,sun4i-a10-mmc", }, ++ { .compatible = "allwinner,sun5i-a13-mmc", }, ++ { /* sentinel */ } ++}; ++MODULE_DEVICE_TABLE(of, sunxi_mmc_of_match); ++ ++static struct mmc_host_ops sunxi_mmc_ops = { ++ .request = sunxi_mmc_request, ++ .set_ios = sunxi_mmc_set_ios, ++ .get_ro = mmc_gpio_get_ro, ++ .get_cd = mmc_gpio_get_cd, ++ .enable_sdio_irq = sunxi_mmc_enable_sdio_irq, ++ .hw_reset = sunxi_mmc_hw_reset, ++}; ++ ++static int sunxi_mmc_resource_request(struct sunxi_mmc_host *host, ++ struct platform_device *pdev) ++{ ++ struct device_node *np = pdev->dev.of_node; ++ int ret; ++ ++ if (of_device_is_compatible(np, "allwinner,sun4i-a10-mmc")) ++ host->idma_des_size_bits = 13; ++ else ++ host->idma_des_size_bits = 16; ++ ++ host->vmmc = devm_regulator_get_optional(&pdev->dev, "vmmc"); ++ if (IS_ERR(host->vmmc) && PTR_ERR(host->vmmc) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ ++ host->reg_base = devm_ioremap_resource(&pdev->dev, ++ platform_get_resource(pdev, IORESOURCE_MEM, 0)); ++ if (IS_ERR(host->reg_base)) ++ return PTR_ERR(host->reg_base); ++ ++ host->clk_ahb = devm_clk_get(&pdev->dev, "ahb"); ++ if (IS_ERR(host->clk_ahb)) { ++ dev_err(&pdev->dev, "Could not get ahb clock\n"); ++ return PTR_ERR(host->clk_ahb); ++ } ++ ++ host->clk_mod = devm_clk_get(&pdev->dev, "mod"); ++ if (IS_ERR(host->clk_mod)) { ++ dev_err(&pdev->dev, "Could not get mod clock\n"); ++ return PTR_ERR(host->clk_mod); ++ } ++ ++ host->reset = devm_reset_control_get(&pdev->dev, "ahb"); ++ if (IS_ERR(host->reset)) ++ host->reset = NULL; /* Having a reset controller is optional */ ++ ++ /* ++ * Sometimes the controller asserts the irq on boot for some reason, ++ * and since it is not clocked there is no way to clear it. So make ++ * sure the controller is in a sane state before enabling irqs. ++ */ ++ ret = sunxi_mmc_init_host(host->mmc); ++ if (ret) ++ return ret; ++ ++ host->irq = platform_get_irq(pdev, 0); ++ ret = devm_request_irq(&pdev->dev, host->irq, sunxi_mmc_irq, 0, ++ "sunxi-mmc", host); ++ if (ret == 0) ++ disable_irq(host->irq); ++ ++ /* And disable the controller again */ ++ sunxi_mmc_exit_host(host); ++ ++ return ret; ++} ++ ++static int sunxi_mmc_probe(struct platform_device *pdev) ++{ ++ struct sunxi_mmc_host *host; ++ struct mmc_host *mmc; ++ int ret; ++ ++ mmc = mmc_alloc_host(sizeof(struct sunxi_mmc_host), &pdev->dev); ++ if (!mmc) { ++ dev_err(&pdev->dev, "mmc alloc host failed\n"); ++ return -ENOMEM; ++ } ++ ++ host = mmc_priv(mmc); ++ host->mmc = mmc; ++ spin_lock_init(&host->lock); ++ tasklet_init(&host->manual_stop_tasklet, ++ sunxi_mmc_manual_stop_tasklet, (unsigned long)host); ++ ++ ret = sunxi_mmc_resource_request(host, pdev); ++ if (ret) ++ goto error_free_host; ++ ++ host->sg_cpu = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, ++ &host->sg_dma, GFP_KERNEL); ++ if (!host->sg_cpu) { ++ dev_err(&pdev->dev, "Failed to allocate DMA descriptor mem\n"); ++ ret = -ENOMEM; ++ goto error_free_host; ++ } ++ ++ mmc->ops = &sunxi_mmc_ops; ++ mmc->max_blk_count = 8192; ++ mmc->max_blk_size = 4096; ++ mmc->max_segs = PAGE_SIZE / sizeof(struct sunxi_idma_des); ++ mmc->max_seg_size = (1 << host->idma_des_size_bits); ++ mmc->max_req_size = mmc->max_seg_size * mmc->max_segs; ++ /* 400kHz ~ 50MHz */ ++ mmc->f_min = 400000; ++ mmc->f_max = 50000000; ++ /* available voltages */ ++ if (!IS_ERR(host->vmmc)) ++ mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vmmc); ++ else ++ mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; ++ ++ mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; ++ mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP; ++ ++ ret = mmc_of_parse(mmc); ++ if (ret) ++ goto error_free_dma; ++ ++ ret = mmc_add_host(mmc); ++ if (ret) ++ goto error_free_dma; ++ ++ dev_info(&pdev->dev, "base:0x%p irq:%u\n", host->reg_base, host->irq); ++ platform_set_drvdata(pdev, mmc); ++ return 0; ++ ++error_free_dma: ++ dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); ++error_free_host: ++ mmc_free_host(mmc); ++ return ret; ++} ++ ++static int sunxi_mmc_remove(struct platform_device *pdev) ++{ ++ struct mmc_host *mmc = platform_get_drvdata(pdev); ++ struct sunxi_mmc_host *host = mmc_priv(mmc); ++ ++ mmc_remove_host(mmc); ++ sunxi_mmc_exit_host(host); ++ tasklet_disable(&host->manual_stop_tasklet); ++ dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); ++ mmc_free_host(mmc); ++ ++ return 0; ++} ++ ++static struct platform_driver sunxi_mmc_driver = { ++ .driver = { ++ .name = "sunxi-mmc", ++ .owner = THIS_MODULE, ++ .of_match_table = of_match_ptr(sunxi_mmc_of_match), ++ }, ++ .probe = sunxi_mmc_probe, ++ .remove = sunxi_mmc_remove, ++}; ++module_platform_driver(sunxi_mmc_driver); ++ ++MODULE_DESCRIPTION("Allwinner's SD/MMC Card Controller Driver"); ++MODULE_LICENSE("GPL v2"); ++MODULE_AUTHOR("David Lanzendörfer <david.lanzendoerfer@o2s.ch>"); ++MODULE_ALIAS("platform:sunxi-mmc"); +diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h +new file mode 100644 +index 0000000..1ef5c89 +--- /dev/null ++++ b/include/linux/clk/sunxi.h +@@ -0,0 +1,22 @@ ++/* ++ * Copyright 2013 - Hans de Goede <hdegoede@redhat.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#ifndef __LINUX_CLK_SUNXI_H_ ++#define __LINUX_CLK_SUNXI_H_ ++ ++#include <linux/clk.h> ++ ++void clk_sunxi_mmc_phase_control(struct clk_hw *hw, u8 sample, u8 output); ++ ++#endif +-- +1.9.0 + diff --git a/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch b/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch new file mode 100644 index 000000000..e9015c9ad --- /dev/null +++ b/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch @@ -0,0 +1,102 @@ +Bugzilla: 1089583 +Upstream-status: Sent for 3.15 + +From 4cebb979af8d7bd1ec463406eaf57a44bd5b9f04 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires <benjamin.tissoires@redhat.com> +Date: Tue, 22 Apr 2014 11:21:00 -0400 +Subject: [PATCH] HID: rmi: do not handle touchscreens through hid-rmi + +Currently, hid-rmi drives every Synaptics product, but the touchscreens +on the Windows tablets should be handled through hid-multitouch. + +Instead of providing a long list of PIDs, rely on the scan_report +capability to detect which should go to hid-multitouch, and which +should not go to hid-rmi. + +We introduce a generic HID_GROUP_HAVE_SPECIAL_DRIVER which can be reused +amoung other drivers if they want to have a catch rule but still +have multitouch devices handled through hid-multitouch. + +related bug: +https://bugzilla.kernel.org/show_bug.cgi?id=74241 +https://bugzilla.redhat.com/show_bug.cgi?id=1089583 + +Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> +--- + drivers/hid/hid-core.c | 10 ++++++++-- + drivers/hid/hid-rmi.c | 6 ++++-- + include/linux/hid.h | 13 +++++++++++++ + 3 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index 6ba2fd0..ea18639 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -776,6 +776,14 @@ static int hid_scan_report(struct hid_device *hid) + (hid->group == HID_GROUP_MULTITOUCH)) + hid->group = HID_GROUP_MULTITOUCH_WIN_8; + ++ /* ++ * Vendor specific handlings ++ */ ++ if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) && ++ (hid->group == HID_GROUP_GENERIC)) ++ /* hid-rmi should take care of them, not hid-generic */ ++ hid->group = HID_GROUP_HAVE_SPECIAL_DRIVER; ++ + vfree(parser); + return 0; + } +@@ -1840,8 +1848,6 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, +- { HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THINGM, USB_DEVICE_ID_BLINK1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) }, + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) }, +diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c +index a4f04d4..a97a373 100644 +--- a/drivers/hid/hid-rmi.c ++++ b/drivers/hid/hid-rmi.c +@@ -863,8 +863,10 @@ static void rmi_remove(struct hid_device *hdev) + } + + static const struct hid_device_id rmi_id[] = { +- { HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, ++ { HID_DEVICE(BUS_I2C, HID_GROUP_HAVE_SPECIAL_DRIVER, ++ USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, ++ { HID_DEVICE(BUS_USB, HID_GROUP_HAVE_SPECIAL_DRIVER, ++ USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) }, + { } + }; + MODULE_DEVICE_TABLE(hid, rmi_id); +diff --git a/include/linux/hid.h b/include/linux/hid.h +index 1b5f1e9..2fdd612 100644 +--- a/include/linux/hid.h ++++ b/include/linux/hid.h +@@ -299,6 +299,19 @@ struct hid_item { + #define HID_GROUP_MULTITOUCH 0x0002 + #define HID_GROUP_SENSOR_HUB 0x0003 + #define HID_GROUP_MULTITOUCH_WIN_8 0x0004 ++#define HID_GROUP_HAVE_SPECIAL_DRIVER 0xffff ++/* ++ * HID_GROUP_HAVE_SPECIAL_DRIVER should be used when the device needs to be ++ * scanned in case it is handled by either hid-multitouch, hid-generic, ++ * hid-sensor-hub or any other generic hid driver. ++ * ++ * Devices declared in hid_have_special_driver[] in hid-core.c can use ++ * HID_GROUP_ANY instead because there will be not overlap between their ++ * specific driver and a generic one. ++ * ++ * Note: HID_GROUP_ANY is declared in linux/mod_devicetable.h ++ * and has a value of 0x0000 ++ */ + + /* + * This is the global environment of the parser. This information is +-- +1.9.0 + diff --git a/0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch b/0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch index b3ec026c3..632174608 100644 --- a/0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch +++ b/0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch @@ -32,19 +32,15 @@ Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> - Removed obviously wrong hid_hw_stop() at the end of probe -- emulate hid_hw_raw_request and hid_hw_output_report that has been - interoduced in 3.15 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> --- drivers/hid/Kconfig | 8 + drivers/hid/Makefile | 1 + - drivers/hid/compat.h | 43 +++ drivers/hid/hid-core.c | 2 + drivers/hid/hid-rmi.c | 890 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/hid.h | 2 + 6 files changed, 946 insertions(+) - create mode 100644 drivers/hid/compat.h create mode 100644 drivers/hid/hid-rmi.c diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig @@ -78,55 +74,6 @@ index 30e4431..b326f79 100644 obj-$(CONFIG_HID_SAITEK) += hid-saitek.o obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o -diff --git a/drivers/hid/compat.h b/drivers/hid/compat.h -new file mode 100644 -index 0000000..1318ca6e ---- /dev/null -+++ b/drivers/hid/compat.h -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (c) 2014 Benjamin Tissoires <benjamin.tissoires@gmail.com> -+ * Copyright (c) 2014 Red Hat, Inc -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the Free -+ * Software Foundation; either version 2 of the License, or (at your option) -+ * any later version. -+ */ -+ -+#include <linux/version.h> -+ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0) -+ -+static inline int hid_hw_raw_request(struct hid_device *hdev, -+ unsigned char reportnum, __u8 *buf, -+ size_t len, unsigned char rtype, int reqtype) -+{ -+ if (len < 1 || len > HID_MAX_BUFFER_SIZE || !buf) -+ return -EINVAL; -+ -+ switch (reqtype) { -+ case HID_REQ_SET_REPORT: -+ if (reportnum != buf[0]) -+ return -EINVAL; -+ return hdev->hid_output_raw_report(hdev, buf, len, rtype); -+ case HID_REQ_GET_REPORT: -+ return hdev->hid_get_raw_report(hdev, reportnum, buf, len, rtype); -+ } -+ -+ return -ENOSYS; -+} -+ -+static inline int hid_hw_output_report(struct hid_device *hdev, __u8 *buf, -+ size_t len) -+{ -+ if (len < 1 || len > HID_MAX_BUFFER_SIZE || !buf) -+ return -EINVAL; -+ -+ return hdev->hid_output_raw_report(hdev, buf, len, HID_OUTPUT_REPORT); -+} -+ -+#endif diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 253fe23..543dd1f 100644 --- a/drivers/hid/hid-core.c @@ -169,7 +116,7 @@ index 0000000..a4f04d4 +#include <linux/sched.h> +#include "hid-ids.h" + -+#include "compat.h" ++/* removed backported compat.h include */ + +#define RMI_MOUSE_REPORT_ID 0x01 /* Mouse emulation Report */ +#define RMI_WRITE_REPORT_ID 0x09 /* Output Report */ diff --git a/0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch b/0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch new file mode 100644 index 000000000..dd7f27367 --- /dev/null +++ b/0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch @@ -0,0 +1,89 @@ +From 5573624261ab5d54f2dea2a3e09a98729db9ecd9 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Wed, 30 Apr 2014 15:24:19 +0200 +Subject: [PATCH 1/2] acpi-video: Add 4 new models to the use_native_backlight + dmi list + +Acer Aspire V5-171 +https://bugzilla.redhat.com/show_bug.cgi?id=983342 + +Acer Aspire V5-471G +Lenovo Yoga 2 11 +Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com> + +HP EliteBook 8470p +https://bugzilla.redhat.com/show_bug.cgi?id=1093120 + +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/acpi/video.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index 8b6990e..48146fc 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -488,6 +488,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + }, + { ++ .callback = video_set_use_native_backlight, ++ .ident = "Lenovo Yoga 2 11", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"), ++ }, ++ }, ++ { + .callback = video_set_use_native_backlight, + .ident = "Thinkpad Helix", + .matches = { +@@ -513,6 +521,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + { + .callback = video_set_use_native_backlight, ++ .ident = "Acer Aspire V5-171", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "V5-171"), ++ }, ++ }, ++ { ++ .callback = video_set_use_native_backlight, + .ident = "Acer Aspire V5-431", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), +@@ -520,6 +536,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + }, + { ++ .callback = video_set_use_native_backlight, ++ .ident = "Acer Aspire V5-471G", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-471G"), ++ }, ++ }, ++ { + .callback = video_set_use_native_backlight, + .ident = "HP ProBook 4340s", + .matches = { +@@ -571,6 +595,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + { + .callback = video_set_use_native_backlight, ++ .ident = "HP EliteBook 8470p", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8470p"), ++ }, ++ }, ++ { ++ .callback = video_set_use_native_backlight, + .ident = "HP EliteBook 8780w", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), +-- +1.9.0 + diff --git a/0001-synaptics-Add-min-max-quirk-for-ThinkPad-Edge-E431.patch b/0001-synaptics-Add-min-max-quirk-for-ThinkPad-Edge-E431.patch deleted file mode 100644 index 03527a568..000000000 --- a/0001-synaptics-Add-min-max-quirk-for-ThinkPad-Edge-E431.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d1b9785eda70e7638927d294139c6d4796cb7ea6 Mon Sep 17 00:00:00 2001 -From: Hans de Goede <hdegoede@redhat.com> -Date: Tue, 22 Apr 2014 11:08:16 +0200 -Subject: [PATCH v3] synaptics: Add min/max quirk for ThinkPad Edge E431 - -Cc: stable@vger.kernel.org -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/input/mouse/synaptics.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c -index 7c9f509..93cc8fd 100644 ---- a/drivers/input/mouse/synaptics.c -+++ b/drivers/input/mouse/synaptics.c -@@ -1566,6 +1566,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { - .driver_data = (int []){1232, 5710, 1156, 4696}, - }, - { -+ /* Lenovo ThinkPad Edge E431 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Edge E431"), -+ }, -+ .driver_data = (int []){1024, 5022, 2508, 4832}, -+ }, -+ { - /* Lenovo ThinkPad T431s */ - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), --- -1.9.0 - diff --git a/0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch b/0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch deleted file mode 100644 index 920c8eaaf..000000000 --- a/0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 555b84220a7c84c2faa1964d19733d867d7bf61f Mon Sep 17 00:00:00 2001 -From: Hans de Goede <hdegoede@redhat.com> -Date: Thu, 10 Apr 2014 11:36:14 +0200 -Subject: [PATCH v3] synaptics: Add min/max quirk for ThinkPad T431s, L440, - L540, S1 Yoga and X1 - -We expect that all the Haswell series will need such quirks, sigh. - -The T431s seems to be T430 hardware in a T440s case, using the T440s touchpad, -with the same min/max issue. - -The X1 Carbon 3rd generation name says 2nd while it is a 3rd generation. - -The X1 and T431s share a PnPID with the T540p, but the reported ranges are -closer to those of the T440s. - -HdG: Squashed 5 quirk patches into one. T431s + L440 + L540 are written by me, -S1 Yoga and X1 are written by Benjamin Tissoires. - -Hdg: Standardized S1 Yoga and X1 values, Yoga uses the same touchpad as the -X240, X1 uses the same touchpad as the T440. - -Cc: stable@vger.kernel.org -Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> -Signed-off-by: Hans de Goede <hdegoede@redhat.com> ---- - drivers/input/mouse/synaptics.c | 42 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - -diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c -index a8b57d7..7c9f509 100644 ---- a/drivers/input/mouse/synaptics.c -+++ b/drivers/input/mouse/synaptics.c -@@ -1566,6 +1566,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { - .driver_data = (int []){1232, 5710, 1156, 4696}, - }, - { -+ /* Lenovo ThinkPad T431s */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T431"), -+ }, -+ .driver_data = (int []){1024, 5112, 2024, 4832}, -+ }, -+ { - /* Lenovo ThinkPad T440s */ - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -@@ -1574,6 +1582,14 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { - .driver_data = (int []){1024, 5112, 2024, 4832}, - }, - { -+ /* Lenovo ThinkPad L440 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L440"), -+ }, -+ .driver_data = (int []){1024, 5112, 2024, 4832}, -+ }, -+ { - /* Lenovo ThinkPad T540p */ - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -@@ -1581,6 +1597,32 @@ static const struct dmi_system_id min_max_dmi_table[] __initconst = { - }, - .driver_data = (int []){1024, 5056, 2058, 4832}, - }, -+ { -+ /* Lenovo ThinkPad L540 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L540"), -+ }, -+ .driver_data = (int []){1024, 5112, 2024, 4832}, -+ }, -+ { -+ /* Lenovo Yoga S1 */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, -+ "ThinkPad S1 Yoga"), -+ }, -+ .driver_data = (int []){1232, 5710, 1156, 4696}, -+ }, -+ { -+ /* Lenovo ThinkPad X1 Carbon Haswell (3rd generation) */ -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), -+ DMI_MATCH(DMI_PRODUCT_VERSION, -+ "ThinkPad X1 Carbon 2nd"), -+ }, -+ .driver_data = (int []){1024, 5112, 2024, 4832}, -+ }, - #endif - { } - }; --- -1.9.0 - diff --git a/Bluetooth-allocate-static-minor-for-vhci.patch b/Bluetooth-allocate-static-minor-for-vhci.patch deleted file mode 100644 index 8acfb308f..000000000 --- a/Bluetooth-allocate-static-minor-for-vhci.patch +++ /dev/null @@ -1,71 +0,0 @@ -Bugzilla: 1051748 -Upstream-status: Queued for 3.15 - -From b075dd40c95d11c2c8690f6c4d6232fc0d9e7f56 Mon Sep 17 00:00:00 2001 -From: Lucas De Marchi <lucas.demarchi@intel.com> -Date: Tue, 18 Feb 2014 05:19:26 +0000 -Subject: Bluetooth: allocate static minor for vhci - -Commit bfacbb9 (Bluetooth: Use devname:vhci module alias for virtual HCI -driver) added the module alias to hci_vhci module so it's possible to -create the /dev/vhci node. However creating an alias without -specifying the minor doesn't allow us to create the node ahead, -triggerring module auto-load when it's first accessed. - -Starting with depmod from kmod 16 we started to warn if there's a -devname alias without specifying the major and minor. - -Let's do the same done for uhid, kvm, fuse and others, specifying a -fixed minor. In systems with systemd as the init the following will -happen: on early boot systemd will call "kmod static-nodes" to read -/lib/modules/$(uname -r)/modules.devname and then create the nodes. When -first accessed these "dead" nodes will trigger the module loading. - -Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> -Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -Signed-off-by: Marcel Holtmann <marcel@holtmann.org> ---- -diff --git a/Documentation/devices.txt b/Documentation/devices.txt -index 10378cc..04356f5 100644 ---- a/Documentation/devices.txt -+++ b/Documentation/devices.txt -@@ -353,6 +353,7 @@ Your cooperation is appreciated. - 133 = /dev/exttrp External device trap - 134 = /dev/apm_bios Advanced Power Management BIOS - 135 = /dev/rtc Real Time Clock -+ 137 = /dev/vhci Bluetooth virtual HCI driver - 139 = /dev/openprom SPARC OpenBoot PROM - 140 = /dev/relay8 Berkshire Products Octal relay card - 141 = /dev/relay16 Berkshire Products ISO-16 relay card -diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c -index 1ef6990..add1c6a 100644 ---- a/drivers/bluetooth/hci_vhci.c -+++ b/drivers/bluetooth/hci_vhci.c -@@ -359,7 +359,7 @@ static const struct file_operations vhci_fops = { - static struct miscdevice vhci_miscdev= { - .name = "vhci", - .fops = &vhci_fops, -- .minor = MISC_DYNAMIC_MINOR, -+ .minor = VHCI_MINOR, - }; - - static int __init vhci_init(void) -@@ -385,3 +385,4 @@ MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION); - MODULE_VERSION(VERSION); - MODULE_LICENSE("GPL"); - MODULE_ALIAS("devname:vhci"); -+MODULE_ALIAS_MISCDEV(VHCI_MINOR); -diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h -index 3737f72..7bb6148 100644 ---- a/include/linux/miscdevice.h -+++ b/include/linux/miscdevice.h -@@ -23,6 +23,7 @@ - #define TEMP_MINOR 131 /* Temperature Sensor */ - #define RTC_MINOR 135 - #define EFI_RTC_MINOR 136 /* EFI Time services */ -+#define VHCI_MINOR 137 - #define SUN_OPENPROM_MINOR 139 - #define DMAPI_MINOR 140 /* DMAPI */ - #define NVRAM_MINOR 144 --- -cgit v0.9.2 diff --git a/HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch b/HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch new file mode 100644 index 000000000..972a1b142 --- /dev/null +++ b/HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch @@ -0,0 +1,60 @@ +Bugzilla: 1090161 +Upstream-status: sent https://patchwork.kernel.org/patch/4055781/ + +From patchwork Thu Apr 24 22:26:38 2014 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: HID: rmi: do not fetch more than 16 bytes in a query +From: Benjamin Tissoires <benjamin.tissoires@redhat.com> +X-Patchwork-Id: 4055781 +Message-Id: <1398378398-24825-1-git-send-email-benjamin.tissoires@redhat.com> +To: Andrew Duggan <aduggan@synaptics.com>, + Christopher Heiny <cheiny@synaptics.com>, + Jiri Kosina <jkosina@suse.cz>, linux-input@vger.kernel.org, + linux-kernel@vger.kernel.org +Date: Thu, 24 Apr 2014 18:26:38 -0400 + +A firmware bug is present on the XPS Haswell edition which silently +split the request in two responses when the caller ask for a read of +more than 16 bytes. +The FW sends the first 16 then the 4 next, but it says that it answered +the 20 bytes in the first report. + +This occurs only on the retrieving of the min/max of X and Y of the F11 +function. +We only use the first 10 bytes of the Ctrl register, so we can get only +those 10 bytes to prevent the bug from happening. + +Resolves: +https://bugzilla.redhat.com/show_bug.cgi?id=1090161 + +Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> + +--- +drivers/hid/hid-rmi.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c +index 7da9509..cee89c9 100644 +--- a/drivers/hid/hid-rmi.c ++++ b/drivers/hid/hid-rmi.c +@@ -613,10 +613,15 @@ static int rmi_populate_f11(struct hid_device *hdev) + } + } + +- /* retrieve the ctrl registers */ +- ret = rmi_read_block(hdev, data->f11.control_base_addr, buf, 20); ++ /* ++ * retrieve the ctrl registers ++ * the ctrl register has a size of 20 but a fw bug split it into 16 + 4, ++ * and there is no way to know if the first 20 bytes are here or not. ++ * We use only the first 10 bytes, so get only them. ++ */ ++ ret = rmi_read_block(hdev, data->f11.control_base_addr, buf, 10); + if (ret) { +- hid_err(hdev, "can not read ctrl block of size 20: %d.\n", ret); ++ hid_err(hdev, "can not read ctrl block of size 10: %d.\n", ret); + return ret; + } + diff --git a/KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch b/KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch deleted file mode 100644 index 170911e1d..000000000 --- a/KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch +++ /dev/null @@ -1,38 +0,0 @@ -Bugzilla: 1085016 -Upstream-status: Queued for 3.15 - -From 5678de3f15010b9022ee45673f33bcfc71d47b60 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini <pbonzini@redhat.com> -Date: Fri, 28 Mar 2014 20:41:50 +0100 -Subject: KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi - (CVE-2014-0155) - -QE reported that they got the BUG_ON in ioapic_service to trigger. -I cannot reproduce it, but there are two reasons why this could happen. - -The less likely but also easiest one, is when kvm_irq_delivery_to_apic -does not deliver to any APIC and returns -1. - -Because irqe.shorthand == 0, the kvm_for_each_vcpu loop in that -function is never reached. However, you can target the similar loop in -kvm_irq_delivery_to_apic_fast; just program a zero logical destination -address into the IOAPIC, or an out-of-range physical destination address. - -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> - -diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c -index d4b6015..d98d107 100644 ---- a/virt/kvm/ioapic.c -+++ b/virt/kvm/ioapic.c -@@ -356,7 +356,7 @@ static int ioapic_service(struct kvm_ioapic *ioapic, int irq, bool line_status) - BUG_ON(ioapic->rtc_status.pending_eoi != 0); - ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe, - ioapic->rtc_status.dest_map); -- ioapic->rtc_status.pending_eoi = ret; -+ ioapic->rtc_status.pending_eoi = (ret < 0 ? 0 : ret); - } else - ret = kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe, NULL); - --- -cgit v0.10.1 - diff --git a/acer-wmi-Add-Aspire-5741-to-video_vendor_dmi_table.patch b/acer-wmi-Add-Aspire-5741-to-video_vendor_dmi_table.patch new file mode 100644 index 000000000..668fa0956 --- /dev/null +++ b/acer-wmi-Add-Aspire-5741-to-video_vendor_dmi_table.patch @@ -0,0 +1,40 @@ +Bugzilla: 1012674 +Upstream-status: Queued for 3.16 + +From a94de796cd769fc5c4a9c57ebe99c0ae74b9c8a1 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:06 +0200 +Subject: [PATCH 09/14] acer-wmi: Add Aspire 5741 to video_vendor_dmi_table + +The Aspire 5741 has broken acpi-video backlight control, so add it to the +quirk table. + +https://bugzilla.redhat.com/show_bug.cgi?id=1012674 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/acer-wmi.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c +index 3a746998f92a..bbf78b2d6d93 100644 +--- a/drivers/platform/x86/acer-wmi.c ++++ b/drivers/platform/x86/acer-wmi.c +@@ -570,6 +570,14 @@ static const struct dmi_system_id video_vendor_dmi_table[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5750"), + }, + }, ++ { ++ .callback = video_set_backlight_video_vendor, ++ .ident = "Acer Aspire 5741", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5741"), ++ }, ++ }, + {} + }; + +-- +1.9.0 + diff --git a/acer-wmi-Switch-to-acpi_video_unregister_backlight.patch b/acer-wmi-Switch-to-acpi_video_unregister_backlight.patch new file mode 100644 index 000000000..310e8a299 --- /dev/null +++ b/acer-wmi-Switch-to-acpi_video_unregister_backlight.patch @@ -0,0 +1,64 @@ +Bugzilla: 1012674 +Upstream-status: Queued for 3.16 + +From d8aceabf18681a92e8031c43d3917f6826ac6691 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:05 +0200 +Subject: [PATCH 08/14] acer-wmi: Switch to acpi_video_unregister_backlight + +Switch from acpi_video_unregister(), to acpi_video_unregister_backlight(), +so that the hotkeys handler registered by acpi-video stays in place. + +Since there are no mappings for the atkbd raw codes for the brightness +keys used by newer Acer models in /lib/udev/hwdb.d/60-keyboard.hwdb, and +since we map the wmi events with a code of KE_IGNORE, we rely on acpi-video +to do the hotkey handling for us. + +For laptops such as the Acer Aspire 5750 which uses intel gfx this works +despite us calling acpi_video_unregister() because the following happens: + +1) acpi-video module gets loaded (as it is a dependency of acer-wmi and i915) +2) acpi-video does NOT call acpi_video_register() +3) acer-wmi loads (assume it loads before i915), calls +acpi_video_dmi_promote_vendor(); which sets ACPI_VIDEO_BACKLIGHT_DMI_VENDOR +4) calls acpi_video_unregister -> not registered, nop +5) i915 loads, calls acpi_video_register +6) acpi_video_register registers the acpi_notifier for the hotkeys, + does NOT register a backlight device because of ACPI_VIDEO_BACKLIGHT_DMI_VENDOR + +But on the Acer Aspire 5750G, which uses nvidia graphics the following happens: +1) acpi-video module gets loaded (as it is a dependency of acer-wmi) +2) acpi-video calls acpi_video_register() +3) acpi_video_register registers the acpi_notifier for the hotkeys, + and a backlight device +4) acer-wmi loads, calls acpi_video_dmi_promote_vendor() +5) calls acpi_video_unregister, this unregisters BOTH the acpi_notifier for + the hotkeys AND the backlight device + +And we end up without any handler for the brightness hotkeys. This patch fixes +this by switching over to acpi_video_unregister_backlight() which keeps the +hotkey handler in place. + +https://bugzilla.kernel.org/show_bug.cgi?id=35622 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/acer-wmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c +index c91f69b39db4..3a746998f92a 100644 +--- a/drivers/platform/x86/acer-wmi.c ++++ b/drivers/platform/x86/acer-wmi.c +@@ -2228,7 +2228,7 @@ static int __init acer_wmi_init(void) + pr_info("Brightness must be controlled by acpi video driver\n"); + } else { + pr_info("Disabling ACPI video driver\n"); +- acpi_video_unregister(); ++ acpi_video_unregister_backlight(); + } + + if (wmi_has_guid(WMID_GUID3)) { +-- +1.9.0 + diff --git a/acpi-video-Add-an-acpi_video_unregister_backlight-fu.patch b/acpi-video-Add-an-acpi_video_unregister_backlight-fu.patch new file mode 100644 index 000000000..c956ad0c2 --- /dev/null +++ b/acpi-video-Add-an-acpi_video_unregister_backlight-fu.patch @@ -0,0 +1,112 @@ +Bugzilla: 1012674 +Upstream-status: Queued for 3.16 + +From 4cf3eac89ed731d7cdb7d9d815a97109472af824 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:04 +0200 +Subject: [PATCH 07/14] acpi-video: Add an acpi_video_unregister_backlight + function + +Add an acpi_video_unregister_backlight function, which only unregisters +the backlight device, and leaves the acpi_notifier in place. Some acpi_vendor +driver need this as they don't want the acpi_video# backlight device, but do +need the acpi-video driver for hotkey handling. + +Chances are that this new acpi_video_unregister_backlight() is actually +what existing acpi_vendor drivers have wanted all along. Currently acpi_vendor +drivers which want to disable the acpi_video# backlight device, make 2 calls: + +acpi_video_dmi_promote_vendor(); +acpi_video_unregister(); + +The intention here is to make things independent of when acpi_video_register() +gets called. As acpi_video_register() will get called on acpi-video load time +on non intel gfx machines, while it gets called on i915 load time on intel +gfx machines. + +This leads to the following 2 interesting scenarios: + +a) intel gfx: +1) acpi-video module gets loaded (as it is a dependency of acpi_vendor and i915) +2) acpi-video does NOT call acpi_video_register() +3) acpi_vendor loads (lets assume it loads before i915), calls +acpi_video_dmi_promote_vendor(); which sets ACPI_VIDEO_BACKLIGHT_DMI_VENDOR +4) calls acpi_video_unregister -> not registered, nop +5) i915 loads, calls acpi_video_register +6) acpi_video_register registers the acpi_notifier for the hotkeys, + does NOT register a backlight device because of ACPI_VIDEO_BACKLIGHT_DMI_VENDOR + +b) non intel gfx +1) acpi-video module gets loaded (as it is a dependency acpi_vendor) +2) acpi-video calls acpi_video_register() +3) acpi_video_register registers the acpi_notifier for the hotkeys, + and a backlight device +4) acpi_vendor loads, calls acpi_video_dmi_promote_vendor() +5) calls acpi_video_unregister, this unregisters BOTH the acpi_notifier for + the hotkeys AND the backlight device + +So here we have possibly the same acpi_vendor module, making the same calls, +but with different results, in one cases acpi-video does handle hotkeys, +in the other it does not. + +Note that the a) scenario turns into b) if we assume the i915 module loads +before the vendor_acpi module, so we also have different behavior depending +on module loading order! + +So as said I believe that quite a few existing acpi_vendor modules really +always want the behavior of a), hence this patch adds a new +acpi_video_unregister_backlight() which gives the behavior of a) independent +of module loading order. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/acpi/video.c | 14 ++++++++++++++ + include/acpi/video.h | 2 ++ + 2 files changed, 16 insertions(+) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index a68313720c9c..d4d6ea3ac77a 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -2070,6 +2070,20 @@ void acpi_video_unregister(void) + } + EXPORT_SYMBOL(acpi_video_unregister); + ++void acpi_video_unregister_backlight(void) ++{ ++ struct acpi_video_bus *video; ++ ++ if (!register_count) ++ return; ++ ++ mutex_lock(&video_list_lock); ++ list_for_each_entry(video, &video_bus_head, entry) ++ acpi_video_bus_unregister_backlight(video); ++ mutex_unlock(&video_list_lock); ++} ++EXPORT_SYMBOL(acpi_video_unregister_backlight); ++ + /* + * This is kind of nasty. Hardware using Intel chipsets may require + * the video opregion code to be run first in order to initialise +diff --git a/include/acpi/video.h b/include/acpi/video.h +index 61109f2609fc..ea4c7bbded4d 100644 +--- a/include/acpi/video.h ++++ b/include/acpi/video.h +@@ -19,11 +19,13 @@ struct acpi_device; + #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) + extern int acpi_video_register(void); + extern void acpi_video_unregister(void); ++extern void acpi_video_unregister_backlight(void); + extern int acpi_video_get_edid(struct acpi_device *device, int type, + int device_id, void **edid); + #else + static inline int acpi_video_register(void) { return 0; } + static inline void acpi_video_unregister(void) { return; } ++static inline void acpi_video_unregister_backlight(void) { return; } + static inline int acpi_video_get_edid(struct acpi_device *device, int type, + int device_id, void **edid) + { +-- +1.9.0 + diff --git a/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch b/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch new file mode 100644 index 000000000..f3d36889f --- /dev/null +++ b/acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch @@ -0,0 +1,45 @@ +Bugzilla: 1093171 +Upstream-status: Queued for 3.16 + +From 7ac976d0109433d1ad0812f4f6889a904d9a0c40 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:10 +0200 +Subject: [PATCH 13/14] acpi-video: Add use native backlight quirk for the + ThinkPad W530 + +Like all of the other *30 ThinkPad models, the W530 has a broken acpi-video +backlight control. Note in order for this to actually fix things on the +ThinkPad W530 the commit titled: +"nouveau: Don't check acpi_video_backlight_support() before registering backlight" +is also needed. + +https://bugzilla.redhat.com/show_bug.cgi?id=1093171 + +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/acpi/video.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index ab7cd65ce21e..dcb0ef4c22f6 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -468,6 +468,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + { + .callback = video_set_use_native_backlight, ++ .ident = "ThinkPad W530", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"), ++ }, ++ }, ++ { ++ .callback = video_set_use_native_backlight, + .ident = "ThinkPad X230", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), +-- +1.9.0 + diff --git a/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch b/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch new file mode 100644 index 000000000..c8c1f7aa2 --- /dev/null +++ b/acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch @@ -0,0 +1,41 @@ +Bugzilla: 1025690 +Upstream-status: Waiting for feedback from reporter + +From dfe2c6722a6f6cb45f6b336b094b26a77acd8393 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:11 +0200 +Subject: [PATCH 14/14] acpi-video: Add use_native_backlight quirk for HP + ProBook 4540s + +As reported here: +https://bugzilla.redhat.com/show_bug.cgi?id=1025690 +This is yet another model which needs this quirk. + +Cc: stable@vger.kernel.org +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/acpi/video.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index dcb0ef4c22f6..3db16753f88a 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -548,6 +548,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = { + }, + { + .callback = video_set_use_native_backlight, ++ .ident = "HP ProBook 4540s", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "HP ProBook 4540s"), ++ }, ++ }, ++ { ++ .callback = video_set_use_native_backlight, + .ident = "HP ProBook 2013 models", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), +-- +1.9.0 + diff --git a/acpi-video-Don-t-register-acpi_video_resume-notifier.patch b/acpi-video-Don-t-register-acpi_video_resume-notifier.patch new file mode 100644 index 000000000..ac40462cd --- /dev/null +++ b/acpi-video-Don-t-register-acpi_video_resume-notifier.patch @@ -0,0 +1,214 @@ +Bugzilla: 1012674 +Upstream-status: Queued for 3.16 + +From 5d9b5801af7cbeaab060fa07576ca6cd7dc3be89 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:03 +0200 +Subject: [PATCH 06/14] acpi-video: Don't register acpi_video_resume notifier + without backlight devices + +If we're not going to be registering any backlight devices then +acpi_video_resume is always nop, so don't register it in that case. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> + +-- + +Note to reviewers the changes to acpi_video_dev_register_backlight() only +remove the "if (!acpi_video_verify_backlight_support()) {" which surrounded +the entire body of the function, as that is checked earlier now. +--- + drivers/acpi/video.c | 139 +++++++++++++++++++++++++++------------------------ + 1 file changed, 74 insertions(+), 65 deletions(-) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index f8bc5a755dda..a68313720c9c 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -150,6 +150,7 @@ struct acpi_video_enumerated_device { + + struct acpi_video_bus { + struct acpi_device *device; ++ bool backlight_registered; + u8 dos_setting; + struct acpi_video_enumerated_device *attached_array; + u8 attached_count; +@@ -1658,88 +1659,89 @@ acpi_video_bus_match(acpi_handle handle, u32 level, void *context, + + static void acpi_video_dev_register_backlight(struct acpi_video_device *device) + { +- if (acpi_video_verify_backlight_support()) { +- struct backlight_properties props; +- struct pci_dev *pdev; +- acpi_handle acpi_parent; +- struct device *parent = NULL; +- int result; +- static int count; +- char *name; +- +- result = acpi_video_init_brightness(device); +- if (result) +- return; +- name = kasprintf(GFP_KERNEL, "acpi_video%d", count); +- if (!name) +- return; +- count++; ++ struct backlight_properties props; ++ struct pci_dev *pdev; ++ acpi_handle acpi_parent; ++ struct device *parent = NULL; ++ int result; ++ static int count; ++ char *name; + +- acpi_get_parent(device->dev->handle, &acpi_parent); ++ result = acpi_video_init_brightness(device); ++ if (result) ++ return; ++ name = kasprintf(GFP_KERNEL, "acpi_video%d", count); ++ if (!name) ++ return; ++ count++; + +- pdev = acpi_get_pci_dev(acpi_parent); +- if (pdev) { +- parent = &pdev->dev; +- pci_dev_put(pdev); +- } ++ acpi_get_parent(device->dev->handle, &acpi_parent); + +- memset(&props, 0, sizeof(struct backlight_properties)); +- props.type = BACKLIGHT_FIRMWARE; +- props.max_brightness = device->brightness->count - 3; +- device->backlight = backlight_device_register(name, +- parent, +- device, +- &acpi_backlight_ops, +- &props); +- kfree(name); +- if (IS_ERR(device->backlight)) +- return; ++ pdev = acpi_get_pci_dev(acpi_parent); ++ if (pdev) { ++ parent = &pdev->dev; ++ pci_dev_put(pdev); ++ } + +- /* +- * Save current brightness level in case we have to restore it +- * before acpi_video_device_lcd_set_level() is called next time. +- */ +- device->backlight->props.brightness = +- acpi_video_get_brightness(device->backlight); ++ memset(&props, 0, sizeof(struct backlight_properties)); ++ props.type = BACKLIGHT_FIRMWARE; ++ props.max_brightness = device->brightness->count - 3; ++ device->backlight = backlight_device_register(name, ++ parent, ++ device, ++ &acpi_backlight_ops, ++ &props); ++ kfree(name); ++ if (IS_ERR(device->backlight)) ++ return; + +- device->cooling_dev = thermal_cooling_device_register("LCD", +- device->dev, &video_cooling_ops); +- if (IS_ERR(device->cooling_dev)) { +- /* +- * Set cooling_dev to NULL so we don't crash trying to +- * free it. +- * Also, why the hell we are returning early and +- * not attempt to register video output if cooling +- * device registration failed? +- * -- dtor +- */ +- device->cooling_dev = NULL; +- return; +- } ++ /* ++ * Save current brightness level in case we have to restore it ++ * before acpi_video_device_lcd_set_level() is called next time. ++ */ ++ device->backlight->props.brightness = ++ acpi_video_get_brightness(device->backlight); + +- dev_info(&device->dev->dev, "registered as cooling_device%d\n", +- device->cooling_dev->id); +- result = sysfs_create_link(&device->dev->dev.kobj, +- &device->cooling_dev->device.kobj, +- "thermal_cooling"); +- if (result) +- printk(KERN_ERR PREFIX "Create sysfs link\n"); +- result = sysfs_create_link(&device->cooling_dev->device.kobj, +- &device->dev->dev.kobj, "device"); +- if (result) +- printk(KERN_ERR PREFIX "Create sysfs link\n"); ++ device->cooling_dev = thermal_cooling_device_register("LCD", ++ device->dev, &video_cooling_ops); ++ if (IS_ERR(device->cooling_dev)) { ++ /* ++ * Set cooling_dev to NULL so we don't crash trying to free it. ++ * Also, why the hell we are returning early and not attempt to ++ * register video output if cooling device registration failed? ++ * -- dtor ++ */ ++ device->cooling_dev = NULL; ++ return; + } ++ ++ dev_info(&device->dev->dev, "registered as cooling_device%d\n", ++ device->cooling_dev->id); ++ result = sysfs_create_link(&device->dev->dev.kobj, ++ &device->cooling_dev->device.kobj, ++ "thermal_cooling"); ++ if (result) ++ printk(KERN_ERR PREFIX "Create sysfs link\n"); ++ result = sysfs_create_link(&device->cooling_dev->device.kobj, ++ &device->dev->dev.kobj, "device"); ++ if (result) ++ printk(KERN_ERR PREFIX "Create sysfs link\n"); + } + + static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) + { + struct acpi_video_device *dev; + ++ if (!acpi_video_verify_backlight_support()) ++ return 0; ++ + mutex_lock(&video->device_list_lock); + list_for_each_entry(dev, &video->video_device_list, entry) + acpi_video_dev_register_backlight(dev); + mutex_unlock(&video->device_list_lock); + ++ video->backlight_registered = true; ++ + video->pm_nb.notifier_call = acpi_video_resume; + video->pm_nb.priority = 0; + return register_pm_notifier(&video->pm_nb); +@@ -1767,13 +1769,20 @@ static void acpi_video_dev_unregister_backlight(struct acpi_video_device *device + static int acpi_video_bus_unregister_backlight(struct acpi_video_bus *video) + { + struct acpi_video_device *dev; +- int error = unregister_pm_notifier(&video->pm_nb); ++ int error; ++ ++ if (!video->backlight_registered) ++ return 0; ++ ++ error = unregister_pm_notifier(&video->pm_nb); + + mutex_lock(&video->device_list_lock); + list_for_each_entry(dev, &video->video_device_list, entry) + acpi_video_dev_unregister_backlight(dev); + mutex_unlock(&video->device_list_lock); + ++ video->backlight_registered = false; ++ + return error; + } + +-- +1.9.0 + diff --git a/acpi-video-Unregister-the-backlight-device-if-a-raw-.patch b/acpi-video-Unregister-the-backlight-device-if-a-raw-.patch new file mode 100644 index 000000000..f922d4235 --- /dev/null +++ b/acpi-video-Unregister-the-backlight-device-if-a-raw-.patch @@ -0,0 +1,130 @@ +Bugzilla: 1093171 +Upstream-status: Queued for 3.16 + +From 7f5b3e9378c0adfdb1cf2ffde6c4f890e05517c7 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:09 +0200 +Subject: [PATCH 12/14] acpi-video: Unregister the backlight device if a raw + one shows up later + +When video.use_native_backlight=1 and non intel gfx are in use, the raw +backlight device of the gfx driver will show up after acpi-video has done its +acpi_video_verify_backlight_support() check. + +This causes video.use_native_backlight=1 to not have the desired result. + +This patch fixes this by adding a backlight notifier and when a raw +backlight is registered or unregistered re-doing the +acpi_video_verify_backlight_support() check. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/acpi/video.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 57 insertions(+) + +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index d4d6ea3ac77a..ab7cd65ce21e 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -151,6 +151,7 @@ struct acpi_video_enumerated_device { + struct acpi_video_bus { + struct acpi_device *device; + bool backlight_registered; ++ bool backlight_notifier_registered; + u8 dos_setting; + struct acpi_video_enumerated_device *attached_array; + u8 attached_count; +@@ -162,6 +163,7 @@ struct acpi_video_bus { + struct input_dev *input; + char phys[32]; /* for input device */ + struct notifier_block pm_nb; ++ struct notifier_block backlight_nb; + }; + + struct acpi_video_device_flags { +@@ -1732,6 +1734,9 @@ static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) + { + struct acpi_video_device *dev; + ++ if (video->backlight_registered) ++ return 0; ++ + if (!acpi_video_verify_backlight_support()) + return 0; + +@@ -1876,6 +1881,56 @@ static void acpi_video_bus_remove_notify_handler(struct acpi_video_bus *video) + video->input = NULL; + } + ++static int acpi_video_backlight_notify(struct notifier_block *nb, ++ unsigned long val, void *bd) ++{ ++ struct backlight_device *backlight = bd; ++ struct acpi_video_bus *video; ++ ++ /* acpi_video_verify_backlight_support only cares about raw devices */ ++ if (backlight->props.type != BACKLIGHT_RAW) ++ return NOTIFY_DONE; ++ ++ video = container_of(nb, struct acpi_video_bus, backlight_nb); ++ ++ switch (val) { ++ case BACKLIGHT_REGISTERED: ++ if (!acpi_video_verify_backlight_support()) ++ acpi_video_bus_unregister_backlight(video); ++ break; ++ case BACKLIGHT_UNREGISTERED: ++ acpi_video_bus_register_backlight(video); ++ break; ++ } ++ ++ return NOTIFY_OK; ++} ++ ++static int acpi_video_bus_add_backlight_notify_handler( ++ struct acpi_video_bus *video) ++{ ++ int error; ++ ++ video->backlight_nb.notifier_call = acpi_video_backlight_notify; ++ video->backlight_nb.priority = 0; ++ error = backlight_register_notifier(&video->backlight_nb); ++ if (error == 0) ++ video->backlight_notifier_registered = true; ++ ++ return error; ++} ++ ++static int acpi_video_bus_remove_backlight_notify_handler( ++ struct acpi_video_bus *video) ++{ ++ if (!video->backlight_notifier_registered) ++ return 0; ++ ++ video->backlight_notifier_registered = false; ++ ++ return backlight_unregister_notifier(&video->backlight_nb); ++} ++ + static int acpi_video_bus_put_devices(struct acpi_video_bus *video) + { + struct acpi_video_device *dev, *next; +@@ -1957,6 +2012,7 @@ static int acpi_video_bus_add(struct acpi_device *device) + + acpi_video_bus_register_backlight(video); + acpi_video_bus_add_notify_handler(video); ++ acpi_video_bus_add_backlight_notify_handler(video); + + return 0; + +@@ -1980,6 +2036,7 @@ static int acpi_video_bus_remove(struct acpi_device *device) + + video = acpi_driver_data(device); + ++ acpi_video_bus_remove_backlight_notify_handler(video); + acpi_video_bus_remove_notify_handler(video); + acpi_video_bus_unregister_backlight(video); + acpi_video_bus_put_devices(video); +-- +1.9.0 + diff --git a/arm-imx6-utilite.patch b/arm-imx6-utilite.patch deleted file mode 100644 index 35f34c166..000000000 --- a/arm-imx6-utilite.patch +++ /dev/null @@ -1,158 +0,0 @@ -commit 682d055e6ac5c3855f51649de6d68e9bb29c26a6 -Author: Valentin Raevsky <valentin@compulab.co.il> -Date: Tue Oct 29 14:11:43 2013 +0200 - - ARM: dts: Add initial support for cm-fx6. - - Add initial support for cm-fx6 module. - - cm-fx6 is a module based on mx6q SoC with the following features: - - Up to 4GB of DDR3 - - 1 LCD/DVI output port - - 1 HDMI output port - - 2 LVDS LCD ports - - Gigabit Ethernet - - Analog Audio - - CAN - - SATA - - NAND - - PCIE - - This patch allows to boot up the module, configures the serial console, - the Ethernet adapter and the heartbeat led. - - cm-fx6 is embedded inside the Utilite computer. - - Signed-off-by: Valentin Raevsky <valentin@compulab.co.il> - Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> - Signed-off-by: Shawn Guo <shawn.guo@linaro.org> - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 8081479..5672e91 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -162,6 +162,7 @@ dtb-$(CONFIG_ARCH_MXC) += \ - imx6dl-sabresd.dtb \ - imx6dl-wandboard.dtb \ - imx6q-arm2.dtb \ -+ imx6q-cm-fx6.dtb \ - imx6q-cubox-i.dtb \ - imx6q-phytec-pbab01.dtb \ - imx6q-sabreauto.dtb \ -diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts -new file mode 100644 -index 0000000..99b46f8 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts -@@ -0,0 +1,107 @@ -+/* -+ * Copyright 2013 CompuLab Ltd. -+ * -+ * Author: Valentin Raevsky <valentin@compulab.co.il> -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+/dts-v1/; -+#include "imx6q.dtsi" -+ -+/ { -+ model = "CompuLab CM-FX6"; -+ compatible = "compulab,cm-fx6", "fsl,imx6q"; -+ -+ memory { -+ reg = <0x10000000 0x80000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ heartbeat-led { -+ label = "Heartbeat"; -+ gpios = <&gpio2 31 0>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ }; -+}; -+ -+&fec { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_enet>; -+ phy-mode = "rgmii"; -+ status = "okay"; -+}; -+ -+&gpmi { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_gpmi_nand>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ imx6q-cm-fx6 { -+ pinctrl_enet: enetgrp { -+ fsl,pins = < -+ MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 -+ MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 -+ MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 -+ MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 -+ MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 -+ MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 -+ MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 -+ MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8 -+ >; -+ }; -+ -+ pinctrl_gpmi_nand: gpminandgrp { -+ fsl,pins = < -+ MX6QDL_PAD_NANDF_CLE__NAND_CLE 0xb0b1 -+ MX6QDL_PAD_NANDF_ALE__NAND_ALE 0xb0b1 -+ MX6QDL_PAD_NANDF_WP_B__NAND_WP_B 0xb0b1 -+ MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000 -+ MX6QDL_PAD_NANDF_CS0__NAND_CE0_B 0xb0b1 -+ MX6QDL_PAD_NANDF_CS1__NAND_CE1_B 0xb0b1 -+ MX6QDL_PAD_SD4_CMD__NAND_RE_B 0xb0b1 -+ MX6QDL_PAD_SD4_CLK__NAND_WE_B 0xb0b1 -+ MX6QDL_PAD_NANDF_D0__NAND_DATA00 0xb0b1 -+ MX6QDL_PAD_NANDF_D1__NAND_DATA01 0xb0b1 -+ MX6QDL_PAD_NANDF_D2__NAND_DATA02 0xb0b1 -+ MX6QDL_PAD_NANDF_D3__NAND_DATA03 0xb0b1 -+ MX6QDL_PAD_NANDF_D4__NAND_DATA04 0xb0b1 -+ MX6QDL_PAD_NANDF_D5__NAND_DATA05 0xb0b1 -+ MX6QDL_PAD_NANDF_D6__NAND_DATA06 0xb0b1 -+ MX6QDL_PAD_NANDF_D7__NAND_DATA07 0xb0b1 -+ MX6QDL_PAD_SD4_DAT0__NAND_DQS 0x00b1 -+ >; -+ }; -+ -+ pinctrl_uart4: uart4grp { -+ fsl,pins = < -+ MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1 -+ MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 -+ >; -+ }; -+ }; -+}; -+ -+&uart4 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart4>; -+ status = "okay"; -+}; -+ -+&sata { -+ status = "okay"; -+}; diff --git a/arm-lpae-ax88796.patch b/arm-lpae-ax88796.patch deleted file mode 100644 index b1bdc760c..000000000 --- a/arm-lpae-ax88796.patch +++ /dev/null @@ -1,21 +0,0 @@ -X-Git-Url: http://git.linaro.org/gitweb?p=people%2Fahs3%2Farndale-acpi.git;a=blobdiff_plain;f=drivers%2Fnet%2Fethernet%2F8390%2Fax88796.c;fp=drivers%2Fnet%2Fethernet%2F8390%2Fax88796.c;h=763e575c82bc5d24e1927ad685dfbdd7a0eaa19e;hp=70dba5d01ad3cc8178318f9976a5922894a86859;hb=fe8e7c500d3d25234759351096d457b6e557ebd9;hpb=af28003b46fa7b2c5d7b52e0d4bc8f725a6305f1 - -diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c -index 70dba5d..763e575 100644 ---- a/drivers/net/ethernet/8390/ax88796.c -+++ b/drivers/net/ethernet/8390/ax88796.c -@@ -828,7 +828,14 @@ static int ax_probe(struct platform_device *pdev) - struct ei_device *ei_local; - struct ax_device *ax; - struct resource *irq, *mem, *mem2; -+#ifndef CONFIG_ARM_LPAE -+ /* LPAE breaks this code as __aeabi_uldivmod for 64-bit -+ * is not supported in lib1funcs.s yet -+ */ - unsigned long mem_size, mem2_size = 0; -+#else -+ u32 mem_size, mem2_size = 0; -+#endif - int ret = 0; - - dev = ax__alloc_ei_netdev(sizeof(struct ax_device)); diff --git a/arm-omap-load-tfp410.patch b/arm-omap-load-tfp410.patch deleted file mode 100644 index 3ef21a062..000000000 --- a/arm-omap-load-tfp410.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c -index 60d3958..0e304ce 100644 ---- a/drivers/video/omap2/dss/core.c -+++ b/drivers/video/omap2/dss/core.c -@@ -298,6 +298,9 @@ static int __init omap_dss_init(void) - int r; - int i; - -+ /* hack to load encoder-tfp410 driver */ -+ request_module("encoder-tfp410"); -+ - r = platform_driver_probe(&omap_dss_driver, omap_dss_probe); - if (r) - return r; diff --git a/arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch b/arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch deleted file mode 100644 index d6de76989..000000000 --- a/arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c -index 21b7926..19e6662 100644 ---- a/sound/soc/samsung/dma.c -+++ b/sound/soc/samsung/dma.c -@@ -76,7 +76,7 @@ static void dma_enqueue(struct snd_pcm_substream *substream) - - pr_debug("Entered %s\n", __func__); - -- limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period; -+ limit = (u32)(prtd->dma_end - prtd->dma_start) / prtd->dma_period; - - pr_debug("%s: loaded %d, limit %d\n", - __func__, prtd->dma_loaded, limit); diff --git a/arm-tegra-paz00-panel-dts.patch b/arm-tegra-paz00-panel-dts.patch deleted file mode 100644 index e64f2ce1e..000000000 --- a/arm-tegra-paz00-panel-dts.patch +++ /dev/null @@ -1,99 +0,0 @@ -From fb4a8356eb67514b10618d1e9e4059ced14c05f2 Mon Sep 17 00:00:00 2001 -From: Marc Dietrich <marvin24@gmx.de> -Date: Sat, 21 Dec 2013 21:38:13 +0100 -Subject: [PATCH] ARM: tegra: paz00: Add LVDS support to device tree - -Add backlight and panel nodes for the PAZ00 TFT LCD panel. - -Signed-off-by: Marc Dietrich <marvin24@gmx.de> ---- - arch/arm/boot/dts/tegra20-paz00.dts | 46 ++++++++++++++++++++++++++++++++++- - 1 files changed, 45 insertions(+), 1 deletions(-) - -diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts -index c7cd8e6..9a39a80 100644 ---- a/arch/arm/boot/dts/tegra20-paz00.dts -+++ b/arch/arm/boot/dts/tegra20-paz00.dts -@@ -17,6 +17,14 @@ - }; - - host1x@50000000 { -+ dc@54200000 { -+ rgb { -+ status = "okay"; -+ -+ nvidia,panel = <&panel>; -+ }; -+ }; -+ - hdmi@54280000 { - status = "okay"; - -@@ -257,7 +265,11 @@ - status = "okay"; - }; - -- i2c@7000c000 { -+ pwm: pwm@7000a000 { -+ status = "okay"; -+ }; -+ -+ lvds_ddc: i2c@7000c000 { - status = "okay"; - clock-frequency = <400000>; - -@@ -475,6 +487,18 @@ - non-removable; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ -+ enable-gpios = <&gpio TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>; -+ pwms = <&pwm 0 5000000>; -+ -+ brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 255>; -+ default-brightness-level = <10>; -+ -+ backlight-boot-off; -+ }; -+ - clocks { - compatible = "simple-bus"; - #address-cells = <1>; -@@ -509,6 +533,16 @@ - }; - }; - -+ panel: panel { -+ compatible = "samsung,ltn101nt05", "simple-panel"; -+ -+ ddc-i2c-bus = <&lvds_ddc>; -+ power-supply = <&vdd_pnl_reg>; -+ enable-gpios = <&gpio TEGRA_GPIO(M, 6) GPIO_ACTIVE_HIGH>; -+ -+ backlight = <&backlight>; -+ }; -+ - regulators { - compatible = "simple-bus"; - #address-cells = <1>; -@@ -522,6 +556,16 @@ - regulator-max-microvolt = <5000000>; - regulator-always-on; - }; -+ -+ vdd_pnl_reg: regulator@1 { -+ compatible = "regulator-fixed"; -+ reg = <1>; -+ regulator-name = "+3VS,vdd_pnl"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>; -+ enable-active-high; -+ }; - }; - - sound { --- -1.7.1 diff --git a/asus-wmi-Add-a-no-backlight-quirk.patch b/asus-wmi-Add-a-no-backlight-quirk.patch new file mode 100644 index 000000000..3a99afef9 --- /dev/null +++ b/asus-wmi-Add-a-no-backlight-quirk.patch @@ -0,0 +1,69 @@ +Bugzilla: 1097436 +Upstream-status: Sent upstream for 3.16 + +From f6fad201a0e4584e9826a2deb8ebbfccdb8cb13b Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:01 +0200 +Subject: [PATCH 04/14] asus-wmi: Add a no backlight quirk + +Some Asus motherboards for desktop PC-s export an acpi-video and +an asus-wmi interface advertising backlight support. Add a quirk to allow +to blacklist these so that desktop environments such as gnome don't start +showing nonsense brightness controls. + +https://bugzilla.redhat.com/show_bug.cgi?id=1097436 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/asus-wmi.c | 8 ++++++-- + drivers/platform/x86/asus-wmi.h | 1 + + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c +index c5e082fb82fa..6f73dc5125ca 100644 +--- a/drivers/platform/x86/asus-wmi.c ++++ b/drivers/platform/x86/asus-wmi.c +@@ -1272,6 +1272,9 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus) + int max; + int power; + ++ if (asus->driver->quirks->no_backlight) ++ return -ENODEV; ++ + max = read_brightness_max(asus); + + if (max == -ENODEV) +@@ -1370,7 +1373,7 @@ static void asus_wmi_notify(u32 value, void *context) + code = ASUS_WMI_BRN_DOWN; + + if (code == ASUS_WMI_BRN_DOWN || code == ASUS_WMI_BRN_UP) { +- if (!acpi_video_backlight_support()) { ++ if (asus->backlight_device) { + asus_wmi_backlight_notify(asus, orig_code); + goto exit; + } +@@ -1773,7 +1776,8 @@ static int asus_wmi_add(struct platform_device *pdev) + if (err) + goto fail_rfkill; + +- if (asus->driver->quirks->wmi_backlight_power) ++ if (asus->driver->quirks->wmi_backlight_power || ++ asus->driver->quirks->no_backlight) + acpi_video_dmi_promote_vendor(); + if (!acpi_video_backlight_support()) { + pr_info("Disabling ACPI video driver\n"); +diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h +index 4da4c8bafe70..cc47efe14974 100644 +--- a/drivers/platform/x86/asus-wmi.h ++++ b/drivers/platform/x86/asus-wmi.h +@@ -42,6 +42,7 @@ struct quirk_entry { + bool scalar_panel_brightness; + bool store_backlight_power; + bool wmi_backlight_power; ++ bool no_backlight; + int wapf; + /* + * For machines with AMD graphic chips, it will send out WMI event +-- +1.9.0 + diff --git a/auditsc-audit_krule-mask-accesses-need-bounds-checking.patch b/auditsc-audit_krule-mask-accesses-need-bounds-checking.patch new file mode 100644 index 000000000..1a7763767 --- /dev/null +++ b/auditsc-audit_krule-mask-accesses-need-bounds-checking.patch @@ -0,0 +1,128 @@ +Bugzilla: 1102715 +Upstream-status: Submitted for 3.15 and CC'd to stable +Delivered-To: jwboyer@gmail.com +Received: by 10.76.6.212 with SMTP id d20csp285523oaa; + Wed, 28 May 2014 20:10:58 -0700 (PDT) +X-Received: by 10.66.250.166 with SMTP id zd6mr4872927pac.7.1401333057574; + Wed, 28 May 2014 20:10:57 -0700 (PDT) +Return-Path: <stable-owner@vger.kernel.org> +Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) + by mx.google.com with ESMTP id j1si26042371pbw.214.2014.05.28.20.10.31 + for <multiple recipients>; + Wed, 28 May 2014 20:10:57 -0700 (PDT) +Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; +Authentication-Results: mx.google.com; + spf=neutral (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) smtp.mail=stable-owner@vger.kernel.org +Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand + id S1755059AbaE2DKa (ORCPT <rfc822;takashi.bg@gmail.com> + + 73 others); Wed, 28 May 2014 23:10:30 -0400 +Received: from mx1.redhat.com ([209.132.183.28]:34907 "EHLO mx1.redhat.com" + rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP + id S1753861AbaE2DK3 (ORCPT <rfc822;stable@vger.kernel.org>); + Wed, 28 May 2014 23:10:29 -0400 +Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) + by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4T3AQfK017267 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); + Wed, 28 May 2014 23:10:26 -0400 +Received: from paris.rdu.redhat.com (paris.rdu.redhat.com [10.13.136.28]) + by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4T3APd7019240; + Wed, 28 May 2014 23:10:26 -0400 +From: Eric Paris <eparis@redhat.com> +To: torvalds@linux-foundation.org +Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org, + Andy Lutomirski <luto@amacapital.net>, stable@vger.kernel.org, + Eric Paris <eparis@redhat.com> +Subject: [PATCH 1/2] auditsc: audit_krule mask accesses need bounds checking +Date: Wed, 28 May 2014 23:09:58 -0400 +Message-Id: <1401332999-15167-1-git-send-email-eparis@redhat.com> +X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 +Sender: stable-owner@vger.kernel.org +Precedence: bulk +List-ID: <stable.vger.kernel.org> +X-Mailing-List: stable@vger.kernel.org + +From: Andy Lutomirski <luto@amacapital.net> + +Fixes an easy DoS and possible information disclosure. + +This does nothing about the broken state of x32 auditing. + +eparis: If the admin has enabled auditd and has specifically loaded audit +rules. This bug has been around since before git. Wow... + +Cc: stable@vger.kernel.org +Signed-off-by: Andy Lutomirski <luto@amacapital.net> +Signed-off-by: Eric Paris <eparis@redhat.com> +--- + kernel/auditsc.c | 27 ++++++++++++++++++--------- + 1 file changed, 18 insertions(+), 9 deletions(-) + +diff --git a/kernel/auditsc.c b/kernel/auditsc.c +index 254ce20..842f58a 100644 +--- a/kernel/auditsc.c ++++ b/kernel/auditsc.c +@@ -728,6 +728,22 @@ static enum audit_state audit_filter_task(struct task_struct *tsk, char **key) + return AUDIT_BUILD_CONTEXT; + } + ++static int audit_in_mask(const struct audit_krule *rule, unsigned long val) ++{ ++ int word, bit; ++ ++ if (val > 0xffffffff) ++ return false; ++ ++ word = AUDIT_WORD(val); ++ if (word >= AUDIT_BITMASK_SIZE) ++ return false; ++ ++ bit = AUDIT_BIT(val); ++ ++ return rule->mask[word] & bit; ++} ++ + /* At syscall entry and exit time, this filter is called if the + * audit_state is not low enough that auditing cannot take place, but is + * also not high enough that we already know we have to write an audit +@@ -745,11 +761,8 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, + + rcu_read_lock(); + if (!list_empty(list)) { +- int word = AUDIT_WORD(ctx->major); +- int bit = AUDIT_BIT(ctx->major); +- + list_for_each_entry_rcu(e, list, list) { +- if ((e->rule.mask[word] & bit) == bit && ++ if (audit_in_mask(&e->rule, ctx->major) && + audit_filter_rules(tsk, &e->rule, ctx, NULL, + &state, false)) { + rcu_read_unlock(); +@@ -769,20 +782,16 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, + static int audit_filter_inode_name(struct task_struct *tsk, + struct audit_names *n, + struct audit_context *ctx) { +- int word, bit; + int h = audit_hash_ino((u32)n->ino); + struct list_head *list = &audit_inode_hash[h]; + struct audit_entry *e; + enum audit_state state; + +- word = AUDIT_WORD(ctx->major); +- bit = AUDIT_BIT(ctx->major); +- + if (list_empty(list)) + return 0; + + list_for_each_entry_rcu(e, list, list) { +- if ((e->rule.mask[word] & bit) == bit && ++ if (audit_in_mask(&e->rule, ctx->major) && + audit_filter_rules(tsk, &e->rule, ctx, n, &state, false)) { + ctx->current_state = state; + return 1; +-- +1.9.0 + +-- +To unsubscribe from this list: send the line "unsubscribe stable" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/backlight-Add-backlight-device-un-registration-notif.patch b/backlight-Add-backlight-device-un-registration-notif.patch new file mode 100644 index 000000000..a411bb9cb --- /dev/null +++ b/backlight-Add-backlight-device-un-registration-notif.patch @@ -0,0 +1,132 @@ +Bugzilla: 1093171 +Upstream-status: Queued for 3.16 + +From ee515e61a002b4d571407173ac8bbadadc114cf0 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:08 +0200 +Subject: [PATCH 11/14] backlight: Add backlight device (un)registration + notification + +Some firmware drivers, ie acpi-video want to get themselves out of the +way (in some cases) when their also is a raw backlight device available. + +Due to module loading ordering being unknown, acpi-video cannot be certain +that the backlight_device_registered(BACKLIGHT_RAW) it does for this is +the final verdict wrt there being a BACKLIGHT_RAW device. + +By adding notification acpi-video can listen for backlight devices showing +up after it has loaded, and unregister its backlight device if desired. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/video/backlight/backlight.c | 40 +++++++++++++++++++++++++++++++++++++ + include/linux/backlight.h | 7 +++++++ + 2 files changed, 47 insertions(+) + +diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c +index bd2172c2d650..428089009cd5 100644 +--- a/drivers/video/backlight/backlight.c ++++ b/drivers/video/backlight/backlight.c +@@ -23,6 +23,7 @@ + + static struct list_head backlight_dev_list; + static struct mutex backlight_dev_list_mutex; ++static struct blocking_notifier_head backlight_notifier; + + static const char *const backlight_types[] = { + [BACKLIGHT_RAW] = "raw", +@@ -370,6 +371,9 @@ struct backlight_device *backlight_device_register(const char *name, + list_add(&new_bd->entry, &backlight_dev_list); + mutex_unlock(&backlight_dev_list_mutex); + ++ blocking_notifier_call_chain(&backlight_notifier, ++ BACKLIGHT_REGISTERED, new_bd); ++ + return new_bd; + } + EXPORT_SYMBOL(backlight_device_register); +@@ -413,6 +417,10 @@ void backlight_device_unregister(struct backlight_device *bd) + pmac_backlight = NULL; + mutex_unlock(&pmac_backlight_mutex); + #endif ++ ++ blocking_notifier_call_chain(&backlight_notifier, ++ BACKLIGHT_UNREGISTERED, bd); ++ + mutex_lock(&bd->ops_lock); + bd->ops = NULL; + mutex_unlock(&bd->ops_lock); +@@ -438,6 +446,36 @@ static int devm_backlight_device_match(struct device *dev, void *res, + } + + /** ++ * backlight_register_notifier - get notified of backlight (un)registration ++ * @nb: notifier block with the notifier to call on backlight (un)registration ++ * ++ * @return 0 on success, otherwise a negative error code ++ * ++ * Register a notifier to get notified when backlight devices get registered ++ * or unregistered. ++ */ ++int backlight_register_notifier(struct notifier_block *nb) ++{ ++ return blocking_notifier_chain_register(&backlight_notifier, nb); ++} ++EXPORT_SYMBOL(backlight_register_notifier); ++ ++/** ++ * backlight_unregister_notifier - unregister a backlight notifier ++ * @nb: notifier block to unregister ++ * ++ * @return 0 on success, otherwise a negative error code ++ * ++ * Register a notifier to get notified when backlight devices get registered ++ * or unregistered. ++ */ ++int backlight_unregister_notifier(struct notifier_block *nb) ++{ ++ return blocking_notifier_chain_unregister(&backlight_notifier, nb); ++} ++EXPORT_SYMBOL(backlight_unregister_notifier); ++ ++/** + * devm_backlight_device_register - resource managed backlight_device_register() + * @dev: the device to register + * @name: the name of the device +@@ -544,6 +582,8 @@ static int __init backlight_class_init(void) + backlight_class->pm = &backlight_class_dev_pm_ops; + INIT_LIST_HEAD(&backlight_dev_list); + mutex_init(&backlight_dev_list_mutex); ++ BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier); ++ + return 0; + } + +diff --git a/include/linux/backlight.h b/include/linux/backlight.h +index 72647429adf6..adb14a8616df 100644 +--- a/include/linux/backlight.h ++++ b/include/linux/backlight.h +@@ -40,6 +40,11 @@ enum backlight_type { + BACKLIGHT_TYPE_MAX, + }; + ++enum backlight_notification { ++ BACKLIGHT_REGISTERED, ++ BACKLIGHT_UNREGISTERED, ++}; ++ + struct backlight_device; + struct fb_info; + +@@ -133,6 +138,8 @@ extern void devm_backlight_device_unregister(struct device *dev, + extern void backlight_force_update(struct backlight_device *bd, + enum backlight_update_reason reason); + extern bool backlight_device_registered(enum backlight_type type); ++extern int backlight_register_notifier(struct notifier_block *nb); ++extern int backlight_unregister_notifier(struct notifier_block *nb); + + #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) + +-- +1.9.0 + diff --git a/config-arm-generic b/config-arm-generic index cd56b2493..c1bc6534b 100644 --- a/config-arm-generic +++ b/config-arm-generic @@ -4,16 +4,19 @@ CONFIG_COMMON_CLK=y CONFIG_EARLY_PRINTK=y CONFIG_FB_SSD1307=m CONFIG_HW_PERF_EVENTS=y -CONFIG_MMC=y CONFIG_NFS_FS=y +CONFIG_CRASH=m + # CONFIG_PID_IN_CONTEXTIDR is not set # CONFIG_CPU_BIG_ENDIAN is not set # CONFIG_BIG_LITTLE is not set +# CONFIG_IWMMXT is not set CONFIG_PWM=y CONFIG_PWM_SYSFS=y +# CONFIG_PWM_FSL_FTM is not set CONFIG_RESET_CONTROLLER=y CONFIG_RESET_GPIO=y @@ -125,6 +128,7 @@ CONFIG_I2C_MUX=m CONFIG_I2C_MUX_GPIO=m CONFIG_I2C_MUX_PINCTRL=m CONFIG_I2C_MUX_PCA9541=m +CONFIG_I2C_MUX_PCA954x=m # Sensors CONFIG_SENSORS_IIO_HWMON=m @@ -184,15 +188,31 @@ CONFIG_CMA_AREAS=7 # CONFIG_INFINIBAND is not set # CONFIG_ISDN is not set +# CONFIG_PCMCIA is not set +# CONFIG_PARPORT is not set +# CONFIG_FIREWIRE is not set +# CONFIG_ATM_DRIVERS is not set +# CONFIG_ISDN is not set +# CONFIG_GAMEPORT is not set +# CONFIG_AGP is not set # netdrv -# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_NET_VENDOR_ADAPTEC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_BROCADE is not set # CONFIG_NET_VENDOR_CHELSIO is not set +# CONFIG_NET_VENDOR_CISCO is not set +# CONFIG_NET_VENDOR_DEC is not set +# CONFIG_NET_VENDOR_EMULEX is not set # CONFIG_NET_VENDOR_EXAR is not set -# CONFIG_NET_VENDOR_INTEL is not set # CONFIG_NET_VENDOR_MELLANOX is not set -# CONFIG_NET_VENDOR_BROCADE is not set +# CONFIG_NET_VENDOR_QLOGIC is not set +# CONFIG_NET_VENDOR_SUN is not set +# CONFIG_NET_VENDOR_WIZNET is not set +# CONFIG_NET_VENDOR_XIRCOM is not set +# CONFIG_NET_PCMCIA is not set # scsi @@ -203,10 +223,19 @@ CONFIG_CMA_AREAS=7 # CONFIG_SCSI_CXGB3_ISCSI is not set # CONFIG_SCSI_CXGB4_ISCSI is not set # CONFIG_SCSI_BFA_FC is not set +# CONFIG_FUSION is not set +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_MPT2SAS is not set +# CONFIG_SCSI_MPT3SAS is not set # serial # CONFIG_SERIAL_SH_SCI is not set -CONFIG_CRASH=m +# drm +# CONFIG_DRM_VMWGFX is not set # CONFIG_DEBUG_SET_MODULE_RONX is not set diff --git a/config-arm64 b/config-arm64 index 38a0debd2..ddd5bc4b9 100644 --- a/config-arm64 +++ b/config-arm64 @@ -1,6 +1,9 @@ CONFIG_64BIT=y CONFIG_ARM64=y +CONFIG_SCHED_MC=y +CONFIG_SCHED_SMT=y + # CONFIG_CPU_BIG_ENDIAN is not set # arm64 only SoCs @@ -70,6 +73,7 @@ CONFIG_VM_EVENT_COUNTERS=y # CONFIG_MDIO_BUS_MUX_GPIO is not set # CONFIG_MDIO_BUS_MUX_MMIOREG is not set + # busted build for various reasons # uses pci_* for some reason to allocate DMA buffers # CONFIG_DVB_B2C2_FLEXCOP_USB is not set @@ -80,3 +84,6 @@ CONFIG_VM_EVENT_COUNTERS=y # CONFIG_VGA_CONSOLE is not set CONFIG_POWER_RESET_XGENE=y CONFIG_COMMON_CLK_XGENE=y + +CONFIG_AHCI_XGENE=m +CONFIG_PHY_XGENE=m diff --git a/config-armv7 b/config-armv7 index d609bc65d..4aaa913a6 100644 --- a/config-armv7 +++ b/config-armv7 @@ -9,7 +9,7 @@ CONFIG_ARCH_OMAP3=y CONFIG_ARCH_OMAP4=y CONFIG_ARCH_PICOXCELL=y CONFIG_ARCH_ROCKCHIP=y -CONFIG_ARCH_SOCFPGA=y +# CONFIG_ARCH_SOCFPGA is not set CONFIG_ARCH_TEGRA=y CONFIG_ARCH_U8500=y # CONFIG_ARCH_VIRT is not set @@ -19,11 +19,15 @@ CONFIG_ARCH_ZYNQ=y # CONFIG_ARM_LPAE is not set # CONFIG_XEN is not set # CONFIG_ARM_VIRT_EXT is not set +# CONFIG_VIRTUALIZATION is not set # mvebu CONFIG_MACH_ARMADA_370_XP=y CONFIG_MACH_ARMADA_370=y CONFIG_MACH_ARMADA_XP=y +# CONFIG_MACH_ARMADA_375 is not set +# CONFIG_MACH_ARMADA_38X is not set +CONFIG_MACH_DOVE=y CONFIG_MVEBU_DEVBUS=y CONFIG_PCI_MVEBU=y @@ -45,12 +49,20 @@ CONFIG_MVEBU_CLK_CORE=y CONFIG_MVEBU_CLK_COREDIV=y CONFIG_MVEBU_CLK_GATING=y CONFIG_MMC_MVSDIO=m +CONFIG_MMC_SDHCI_DOVE=m CONFIG_SPI_ORION=m CONFIG_USB_MV_UDC=m CONFIG_MVEBU_MBUS=y CONFIG_PHY_MVEBU_SATA=y CONFIG_ARMADA_THERMAL=m +CONFIG_DOVE_THERMAL=m CONFIG_DRM_ARMADA=m +CONFIG_ORION_WATCHDOG=m +CONFIG_SND_KIRKWOOD_SOC=m +CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=m +CONFIG_USB_EHCI_HCD_ORION=m +# CONFIG_CACHE_FEROCEON_L2 is not set +# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set # omap CONFIG_ARCH_OMAP2PLUS_TYPICAL=y @@ -58,27 +70,26 @@ CONFIG_SOC_OMAP5=y # CONFIG_SOC_DRA7XX is not set CONFIG_SOC_OMAP3430=y CONFIG_SOC_TI81XX=y -CONFIG_MACH_CRANEBOARD=y -CONFIG_MACH_DEVKIT8000=y +# CONFIG_MACH_CM_T35 is not set +# CONFIG_MACH_CM_T3517 is not set +# CONFIG_MACH_CRANEBOARD is not set +# CONFIG_MACH_DEVKIT8000 is not set +# CONFIG_MACH_IGEP0030 is not set # CONFIG_MACH_NOKIA_RX51 is not set -CONFIG_MACH_OMAP_3630SDP=y -CONFIG_MACH_OMAP_GENERIC=y -CONFIG_MACH_OMAP_LDP=y -CONFIG_MACH_OMAP3_BEAGLE=y -# CONFIG_MACH_OMAP3EVM is not set -CONFIG_MACH_OMAP_3430SDP=y -CONFIG_MACH_OMAP3530_LV_SOM=y +# CONFIG_MACH_OMAP_3430SDP is not set +# CONFIG_MACH_OMAP_3630SDP is not set +# CONFIG_MACH_OMAP_LDP is not set +# CONFIG_MACH_OMAP3_BEAGLE is not set # CONFIG_MACH_OMAP3517EVM is not set -CONFIG_MACH_OMAP3_PANDORA=y -CONFIG_MACH_OMAP3_TORPEDO=y -CONFIG_MACH_OVERO=y -CONFIG_MACH_TOUCHBOOK=y -CONFIG_MACH_CM_T35=y -CONFIG_MACH_CM_T3517=y -CONFIG_MACH_IGEP0030=y -CONFIG_MACH_SBC3530=y +# CONFIG_MACH_OMAP3530_LV_SOM is not set +# CONFIG_MACH_OMAP3EVM is not set +# CONFIG_MACH_OMAP3_PANDORA is not set +# CONFIG_MACH_OMAP3_TORPEDO is not set +# CONFIG_MACH_OVERO is not set +# CONFIG_MACH_SBC3530 is not set # CONFIG_MACH_TI8168EVM is not set # CONFIG_MACH_TI8148EVM is not set +# CONFIG_MACH_TOUCHBOOK is not set CONFIG_SOC_HAS_REALTIME_COUNTER=y CONFIG_OMAP_RESET_CLOCKS=y @@ -86,6 +97,8 @@ CONFIG_OMAP_MUX=y CONFIG_OMAP_MUX_WARNINGS=y CONFIG_OMAP_32K_TIMER=y CONFIG_OMAP_32K_TIMER_HZ=128 +CONFIG_OMAP_PACKAGE_CBB=y +CONFIG_OMAP_PACKAGE_CUS=y # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set CONFIG_OMAP_MCBSP=y @@ -115,7 +128,8 @@ CONFIG_TWL4030_POWER=y CONFIG_TWL4030_WATCHDOG=m CONFIG_BATTERY_TWL4030_MADC=m CONFIG_OMAP_USB2=m -CONFIG_OMAP_USB3=m +CONFIG_OMAP_CONTROL_PHY=m +CONFIG_TI_PIPE3=m CONFIG_TWL4030_USB=m CONFIG_TWL6030_USB=m CONFIG_TWL6030_PWM=m @@ -128,12 +142,11 @@ CONFIG_REGULATOR_TWL4030=y CONFIG_BACKLIGHT_PANDORA=m CONFIG_OMAP_OCP2SCP=m CONFIG_USB_EHCI_HCD_OMAP=m -CONFIG_USB_OHCI_HCD_PLATFORM=m CONFIG_USB_OHCI_HCD_OMAP3=m CONFIG_USB_MUSB_AM35X=m CONFIG_USB_MUSB_OMAP2PLUS=m CONFIG_OMAP_CONTROL_USB=m -CONFIG_MMC_OMAP=y +CONFIG_MMC_OMAP=m CONFIG_MMC_OMAP_HS=y CONFIG_RTC_DRV_MAX8907=m # CONFIG_RTC_DRV_TWL92330 is not set @@ -141,6 +154,8 @@ CONFIG_RTC_DRV_TWL4030=y CONFIG_RTC_DRV_OMAP=y CONFIG_SENSORS_TWL4030_MADC=m CONFIG_TWL6030_GPADC=m +CONFIG_BATTERY_RX51=m +# CONFIG_IR_RX51 is not set # OMAP5 (possibly other devices too) CONFIG_MFD_PALMAS=y @@ -148,6 +163,7 @@ CONFIG_EXTCON_PALMAS=m CONFIG_GPIO_PALMAS=y CONFIG_PINCTRL_PALMAS=y CONFIG_REGULATOR_PALMAS=y +CONFIG_REGULATOR_PBIAS=m CONFIG_RTC_DRV_PALMAS=m CONFIG_WL_TI=y @@ -184,8 +200,8 @@ CONFIG_OMAP5_THERMAL=y CONFIG_POWER_AVS=y CONFIG_POWER_AVS_OMAP=y CONFIG_POWER_AVS_OMAP_CLASS3=y - -CONFIG_ARM_OMAP2PLUS_CPUFREQ=y +# CPUFREQ_CPU0 is used for scaling on DT OMAP +# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set CONFIG_PWM_TIECAP=m CONFIG_PWM_TIEHRPWM=m @@ -194,6 +210,7 @@ CONFIG_PWM_TWL_LED=m CONFIG_CRYPTO_DEV_OMAP_SHAM=m CONFIG_CRYPTO_DEV_OMAP_AES=m +CONFIG_CRYPTO_DEV_OMAP_DES=m CONFIG_HW_RANDOM_OMAP=m CONFIG_HW_RANDOM_OMAP3_ROM=m @@ -206,7 +223,7 @@ CONFIG_OMAP2_VRFB=y # CONFIG_FB_DA8XX is not set CONFIG_OMAP2_DSS=m -CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_DEBUG_SUPPORT is not set # CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set CONFIG_OMAP2_DSS_DPI=y CONFIG_OMAP2_DSS_RFBI=y @@ -235,12 +252,13 @@ CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1=m # Enable V4L2 drivers for OMAP2+ CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_V4L2_SUBDEV_API=y CONFIG_V4L_PLATFORM_DRIVERS=y # CONFIG_VIDEO_OMAP2_VOUT is not set -# CONFIG_VIDEO_OMAP3 is not set -# CONFIG_VIDEO_VPFE_CAPTURE is not set +CONFIG_VIDEO_OMAP3=m +# CONFIG_VIDEO_OMAP4 is not set +# CONFIG_VIDEO_OMAP4_DEBUG is not set # The ones below are for TI Davinci +# CONFIG_VIDEO_VPFE_CAPTURE is not set # CONFIG_VIDEO_VPSS_SYSTEM is not set # CONFIG_VIDEO_DM6446_CCDC is not set # CONFIG_VIDEO_DM644X_VPBE is not set @@ -265,7 +283,7 @@ CONFIG_SND_OMAP_SOC_OMAP3EVM=m CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m CONFIG_SND_OMAP_SOC_OVERO=m -# CONFIG_SND_OMAP_SOC_RX51 is not set +CONFIG_SND_OMAP_SOC_RX51=m CONFIG_SND_OMAP_SOC_SDP4430=m CONFIG_SND_SOC_TLV320AIC23=m CONFIG_SND_SOC_TLV320AIC3X=m @@ -308,7 +326,7 @@ CONFIG_TI_DAVINCI_MDIO=m CONFIG_TI_CPSW=m CONFIG_TI_CPSW_PHY_SEL=y CONFIG_TI_CPTS=y -# Needed for BBone White +# Builtin needed for BBone White CONFIG_REGULATOR_TPS65217=y CONFIG_TI_EMIF=m CONFIG_DRM_TILCDC=m @@ -333,6 +351,7 @@ CONFIG_SOC_IMX50=y CONFIG_SOC_IMX53=y CONFIG_SOC_IMX6Q=y CONFIG_SOC_IMX6SL=y +# CONFIG_SOC_VF610 is not set CONFIG_MACH_IMX51_DT=y # CONFIG_MACH_MX51_BABBAGE is not set # CONFIG_MACH_EUKREA_CPUIMX51SD is not set @@ -340,7 +359,7 @@ CONFIG_ARM_IMX6Q_CPUFREQ=m CONFIG_IMX_THERMAL=m CONFIG_PATA_IMX=m CONFIG_PCI_IMX6=y -# CONFIG_USB_EHCI_MXC is not set +CONFIG_USB_EHCI_MXC=m CONFIG_USB_CHIPIDEA=m CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y @@ -382,10 +401,10 @@ CONFIG_SND_SOC_IMX_SGTL5000=m CONFIG_SND_SOC_IMX_WM8962=m CONFIG_SND_SOC_IMX_MC13783=m CONFIG_SND_SOC_IMX_SPDIF=m +CONFIG_SND_SOC_EUKREA_TLV320=m CONFIG_USB_IMX21_HCD=m CONFIG_USB_MXS_PHY=m -CONFIG_MMC_DW_SOCFPGA=m CONFIG_MMC_SDHCI_ESDHC_IMX=m CONFIG_MMC_MXC=m CONFIG_SPI_MXS=m @@ -404,12 +423,13 @@ CONFIG_DRM_IMX_FB_HELPER=m CONFIG_DRM_IMX_HDMI=m CONFIG_DRM_IMX_IPUV3_CORE=m CONFIG_DRM_IMX_IPUV3=m -# CONFIG_DRM_IMX_LDB is not set +CONFIG_DRM_IMX_LDB=m CONFIG_DRM_IMX_PARALLEL_DISPLAY=m CONFIG_DRM_IMX_TVE=m CONFIG_VIDEO_CODA=m CONFIG_MFD_SYSCON=y +CONFIG_GPIO_SYSCON=m CONFIG_SENSORS_MC13783_ADC=m CONFIG_REGULATOR_ANATOP=m CONFIG_REGULATOR_MC13783=m @@ -450,7 +470,6 @@ CONFIG_HW_RANDOM_PICOXCELL=m # ST Ericsson CONFIG_MACH_HREFV60=y CONFIG_MACH_SNOWBALL=y -CONFIG_MACH_UX500_DT=y CONFIG_ABX500_CORE=y CONFIG_ARM_U8500_CPUIDLE=y @@ -465,6 +484,7 @@ CONFIG_KEYBOARD_NOMADIK=m CONFIG_DB8500_CPUFREQ_COOLING=m CONFIG_DB8500_THERMAL=y CONFIG_UX500_WATCHDOG=m +CONFIG_AHCI_ST=m CONFIG_INPUT_AB8500_PONKEY=m CONFIG_REGULATOR_AB8500=y CONFIG_AB8500_USB=m @@ -483,6 +503,7 @@ CONFIG_AB8500_BM=y CONFIG_AB8500_GPADC=y CONFIG_SENSORS_AB8500=m CONFIG_STE_MODEM_RPROC=m +CONFIG_STIH415_RESET=y CONFIG_IIO_ST_GYRO_I2C_3AXIS=m CONFIG_IIO_ST_GYRO_SPI_3AXIS=m @@ -511,9 +532,8 @@ CONFIG_PCI_TEGRA=y CONFIG_TEGRA_IOMMU_GART=y CONFIG_TEGRA_IOMMU_SMMU=y CONFIG_MMC_SDHCI_TEGRA=m - +CONFIG_TEGRA_WATCHDOG=m CONFIG_I2C_TEGRA=m -CONFIG_I2C_MUX_PCA954x=m CONFIG_TEGRA_SYSTEM_DMA=y CONFIG_TEGRA_EMC_SCALING_ENABLE=y @@ -568,17 +588,16 @@ CONFIG_DRM_TEGRA_FBDEV=y CONFIG_DRM_TEGRA_STAGING=y CONFIG_DRM_PANEL=y CONFIG_DRM_PANEL_SIMPLE=m - +CONFIG_DRM_PANEL_LD9040=m +CONFIG_DRM_PANEL_S6E8AA0=m CONFIG_CRYPTO_DEV_TEGRA_AES=m -CONFIG_GPIO_PCA953X=m - # OLPC XO CONFIG_SERIO_OLPC_APSP=m # Zynq-7xxx -# likely needs usb/mmc still +# likely needs usb still CONFIG_SERIAL_UARTLITE=y CONFIG_SERIAL_UARTLITE_CONSOLE=y CONFIG_SERIAL_XILINX_PS_UART=y @@ -592,6 +611,12 @@ CONFIG_GPIO_XILINX=y CONFIG_I2C_XILINX=m CONFIG_SPI_XILINX=m CONFIG_MMC_SDHCI_OF_ARASAN=m +CONFIG_I2C_CADENCE=m +CONFIG_XILINX_WATCHDOG=m +CONFIG_XILINX_XADC=m +CONFIG_SND_SOC_ADI=m +CONFIG_SND_SOC_ADI_AXI_I2S=m +CONFIG_SND_SOC_ADI_AXI_SPDIF=m # Multi function devices CONFIG_MFD_88PM800=m @@ -629,8 +654,6 @@ CONFIG_REGULATOR_MAX8973=m # Defined config options we don't use yet # CONFIG_PINCTRL_IMX35 is not set -# CONFIG_BATTERY_RX51 is not set -# CONFIG_IR_RX51 is not set # CONFIG_MFD_SMSC is not set # CONFIG_MFD_SEC_CORE is not set # CONFIG_MFD_LP8788 is not set @@ -652,12 +675,9 @@ CONFIG_REGULATOR_MAX8973=m # CONFIG_TOUCHSCREEN_EGALAX is not set # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set -# CONFIG_VIRTUALIZATION is not set # CONFIG_POWER_RESET_QNAP is not set # CONFIG_OMAP2_DSS_DEBUG is not set # CONFIG_CRYPTO_DEV_UX500_DEBUG is not set # CONFIG_AB8500_DEBUG is not set -# CONFIG_SOC_VF610 is not set # CONFIG_MMC_TMIO is not set -# CONFIG_SND_SOC_ADI is not set diff --git a/config-armv7-generic b/config-armv7-generic index 26e90fe82..1b6bea7ad 100644 --- a/config-armv7-generic +++ b/config-armv7-generic @@ -15,6 +15,7 @@ CONFIG_AEABI=y CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_NEON=y +CONFIG_IWMMXT=y CONFIG_KERNEL_MODE_NEON=y CONFIG_ARM_UNWIND=y @@ -35,6 +36,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_XZ_DEC_ARMTHUMB=y CONFIG_ARCH_HAS_TICK_BROADCAST=y CONFIG_ALWAYS_USE_PERSISTENT_CLOCK=y +CONFIG_IRQ_CROSSBAR=y # CONFIG_MCPM is not set # CONFIG_OABI_COMPAT is not set @@ -64,6 +66,7 @@ CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y # CONFIG_ARCH_BERLIN is not set # CONFIG_ARCH_HI3xxx is not set # CONFIG_ARCH_MSM_DT is not set +# CONFIG_ARCH_QCOM is not set # errata # v5/v6 @@ -117,7 +120,6 @@ CONFIG_LSM_MMAP_MIN_ADDR=32768 CONFIG_XZ_DEC_ARM=y -CONFIG_LOCAL_TIMERS=y CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_CC_STACKPROTECTOR=y @@ -159,16 +161,23 @@ CONFIG_SATA_HIGHBANK=m CONFIG_ARM_HIGHBANK_CPUFREQ=m # CONFIG_ARM_HIGHBANK_CPUIDLE is not set -# Allwinner a1x +# Allwinner CONFIG_PINCTRL_SUNXI=y CONFIG_SUNXI_WATCHDOG=m CONFIG_MDIO_SUN4I=m CONFIG_NET_VENDOR_ALLWINNER=y CONFIG_SUN4I_EMAC=m CONFIG_STMMAC_PLATFORM=y +CONFIG_DWMAC_SOCFPGA=y CONFIG_DWMAC_SUNXI=y CONFIG_EEPROM_SUNXI_SID=m CONFIG_RTC_DRV_SUNXI=m +CONFIG_PHY_SUN4I_USB=m +CONFIG_AHCI_SUNXI=m +CONFIG_SPI_SUN4I=m +CONFIG_SPI_SUN6I=m +CONFIG_MMC_SUNXI=m +CONFIG_GPIO_PCA953X=m CONFIG_REGMAP=y CONFIG_REGMAP_I2C=m @@ -183,6 +192,8 @@ CONFIG_ARM_CPU_SUSPEND=y CONFIG_GENERIC_CPUFREQ_CPU0=m # usb +CONFIG_USB_OHCI_HCD_PLATFORM=m +CONFIG_USB_EHCI_HCD_PLATFORM=m CONFIG_USB_OTG=y # CONFIG_USB_OTG_WHITELIST is not set # CONFIG_USB_OTG_BLACKLIST_HUB is not set @@ -190,7 +201,6 @@ CONFIG_USB_ULPI=y CONFIG_AX88796=m CONFIG_AX88796_93CX6=y CONFIG_USB_ISP1760_HCD=m -# CONFIG_USB_EHCI_HCD_ORION is not set # usb gadget CONFIG_USB_GADGET=m @@ -203,7 +213,6 @@ CONFIG_USB_MUSB_DSPS=m CONFIG_USB_GPIO_VBUS=m CONFIG_USB_G_ACM_MS=m CONFIG_USB_G_DBGP=m -CONFIG_USB_G_DBGP_PRINTK=y CONFIG_USB_G_DBGP_SERIAL=y CONFIG_USB_G_MULTI=m CONFIG_USB_G_MULTI_CDC=y @@ -261,6 +270,7 @@ CONFIG_MFD_TPS65912_SPI=y # CONFIG_MFD_ARIZONA_SPI is not set # CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_PM8921_CORE is not set # Pin stuff CONFIG_PINMUX=y @@ -272,6 +282,7 @@ CONFIG_GENERIC_PINCONF=y # CONFIG_PINCTRL_EXYNOS4 is not set # CONFIG_PINCTRL_CAPRI is not set # CONFIG_PINCTRL_MSM8X74 is not set +# CONFIG_PINCTRL_BCM281XX is not set # GPIO # CONFIG_GPIO_EM is not set @@ -282,6 +293,7 @@ CONFIG_GPIO_MAX7301=m CONFIG_GPIO_MC33880=m CONFIG_GPIO_TPS65910=y CONFIG_GPIO_TPS65912=m +# CONFIG_GPIO_ZEVIO is not set CONFIG_LEDS_GPIO=m CONFIG_MDIO_BUS_MUX=m CONFIG_MDIO_BUS_MUX_GPIO=m @@ -299,19 +311,19 @@ CONFIG_W1_MASTER_GPIO=m CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_GPIO=m -CONFIG_SPI_BITBANG=m -CONFIG_SPI_PL022=m CONFIG_SPI_SPIDEV=m CONFIG_SPI_ALTERA=m +CONFIG_SPI_BITBANG=m CONFIG_SPI_BUTTERFLY=m +CONFIG_SPI_DESIGNWARE=m CONFIG_SPI_LM70_LLP=m CONFIG_SPI_OC_TINY=m +CONFIG_SPI_PL022=m CONFIG_SPI_S3C64XX=m CONFIG_SPI_SC18IS602=m +CONFIG_SPI_TLE62X0=m CONFIG_SPI_XCOMM=m CONFIG_SPI_XILINX=m -CONFIG_SPI_DESIGNWARE=m -CONFIG_SPI_TLE62X0=m # CONFIG_SPI_FSL_SPI is not set CONFIG_NFC_NCI_SPI=y @@ -368,6 +380,7 @@ CONFIG_MTD_NAND_TMIO=m CONFIG_MTD_SPINAND_MT29F=m CONFIG_MTD_SPINAND_ONDIEECC=y CONFIG_MTD_SST25L=m +CONFIG_MTD_ST_SPI_FSM=m CONFIG_EEPROM_AT25=m CONFIG_EEPROM_93XX46=m @@ -411,6 +424,42 @@ CONFIG_SND_SOC_ALL_CODECS=m CONFIG_SND_SOC_CACHE_LZO=y CONFIG_SND_SOC_DMIC=m CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y +# CONFIG_SND_SOC_ADAU1701 is not set +# CONFIG_SND_SOC_AK4104 is not set +# CONFIG_SND_SOC_AK4554 is not set +# CONFIG_SND_SOC_AK4642 is not set +# CONFIG_SND_SOC_AK5386 is not set +# CONFIG_SND_SOC_CS42L52 is not set +# CONFIG_SND_SOC_CS42L73 is not set +# CONFIG_SND_SOC_CS4270 is not set +# CONFIG_SND_SOC_CS4271 is not set +# CONFIG_SND_SOC_CS42XX8_I2C is not set +# CONFIG_SND_SOC_HDMI_CODEC is not set +# CONFIG_SND_SOC_PCM1681 is not set +# CONFIG_SND_SOC_PCM1792A is not set +# CONFIG_SND_SOC_PCM512x_I2C is not set +# CONFIG_SND_SOC_PCM512x_SPI is not set +# CONFIG_SND_SOC_SGTL5000 is not set +# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set +# CONFIG_SND_SOC_SPDIF is not set +# CONFIG_SND_SOC_TAS5086 is not set +# CONFIG_SND_SOC_TLV320AIC3X is not set +# CONFIG_SND_SOC_WM8510 is not set +# CONFIG_SND_SOC_WM8523 is not set +# CONFIG_SND_SOC_WM8580 is not set +# CONFIG_SND_SOC_WM8711 is not set +# CONFIG_SND_SOC_WM8728 is not set +# CONFIG_SND_SOC_WM8731 is not set +# CONFIG_SND_SOC_WM8737 is not set +# CONFIG_SND_SOC_WM8741 is not set +# CONFIG_SND_SOC_WM8750 is not set +# CONFIG_SND_SOC_WM8753 is not set +# CONFIG_SND_SOC_WM8770 is not set +# CONFIG_SND_SOC_WM8776 is not set +# CONFIG_SND_SOC_WM8804 is not set +# CONFIG_SND_SOC_WM8903 is not set +# CONFIG_SND_SOC_WM8962 is not set +# CONFIG_SND_SOC_TPA6130A2 is not set # CONFIG_SND_ATMEL_SOC is not set # Displays @@ -429,6 +478,7 @@ CONFIG_RTC_DRV_RS5C348=m CONFIG_RTC_DRV_RX4581=m CONFIG_RTC_DRV_TPS65910=m CONFIG_RTC_DRV_TPS80031=m +# CONFIG_RTC_DRV_DS1347 is not set # Regulators CONFIG_REGULATOR=y @@ -505,6 +555,7 @@ CONFIG_LCD_HX8357=m CONFIG_INPUT_GP2A=m CONFIG_INPUT_ARIZONA_HAPTICS=m CONFIG_INPUT_MC13783_PWRBUTTON=m +# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set CONFIG_TOUCHSCREEN_ADS7846=m CONFIG_TOUCHSCREEN_AD7877=m diff --git a/config-armv7-lpae b/config-armv7-lpae index 25fe122d5..bc9324fde 100644 --- a/config-armv7-lpae +++ b/config-armv7-lpae @@ -90,6 +90,8 @@ CONFIG_DRM_EXYNOS_IPP=y CONFIG_DRM_EXYNOS_FIMC=y CONFIG_DRM_EXYNOS_ROTATOR=y CONFIG_DRM_EXYNOS_GSC=y +CONFIG_DRM_EXYNOS_DPI=y +CONFIG_DRM_EXYNOS_DSI=y # CONFIG_FB_S3C is not set CONFIG_SND_SOC_SAMSUNG=m CONFIG_USB_EHCI_HCD=y @@ -111,6 +113,7 @@ CONFIG_KEYSTONE_USB_PHY=m CONFIG_USB_DWC3_KEYSTONE=m CONFIG_GPIO_DAVINCI=y CONFIG_I2C_DAVINCI=m +CONFIG_TI_AEMIF=m # CONFIG_DAVINCI_WATCHDOG is not set # CONFIG_SPI_DAVINCI is not set # CONFIG_SND_DAVINCI_SOC is not set @@ -133,3 +136,6 @@ CONFIG_S3C_LOWLEVEL_UART_PORT=1 # CONFIG_S3C2410_WATCHDOG is not set # CONFIG_MMC_SDHCI_S3C is not set # CONFIG_TEGRA_HOST1X is not set +# CONFIG_DRM_PANEL_SIMPLE is not set +# CONFIG_DRM_PANEL_LD9040 is not set +# CONFIG_DRM_PANEL_S6E8AA0 is not set diff --git a/config-debug b/config-debug index e22532600..6ad71f3f5 100644 --- a/config-debug +++ b/config-debug @@ -8,6 +8,7 @@ CONFIG_DEBUG_MUTEXES=y CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_LOCK_TORTURE_TEST=m CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK=y CONFIG_PROVE_RCU=y @@ -46,6 +47,7 @@ CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 CONFIG_X86_PTDUMP=y +CONFIG_EFI_PGT_DUMP=y CONFIG_CAN_DEBUG_DEVICES=y diff --git a/config-generic b/config-generic index 207145926..b7ece128a 100644 --- a/config-generic +++ b/config-generic @@ -37,6 +37,7 @@ CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y # CONFIG_COMPILE_TEST is not set CONFIG_FHANDLE=y +# CONFIG_USELIB is not set CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y @@ -122,8 +123,8 @@ CONFIG_YENTA=m CONFIG_CARDBUS=y CONFIG_I82092=m CONFIG_PD6729=m - CONFIG_PCCARD=y + CONFIG_MMC=m CONFIG_SDIO_UART=m # CONFIG_MMC_TEST is not set @@ -216,6 +217,8 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_SPI is not set +# CONFIG_SPMI is not set + # # Memory Technology Devices (MTD) # @@ -291,6 +294,7 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_LIMIT=20 # CONFIG_MTD_UBI_FASTMAP is not set # CONFIG_MTD_UBI_GLUEBI is not set +# CONFIG_MTD_UBI_BLOCK is not set # # Parallel port support @@ -316,6 +320,7 @@ CONFIG_BLK_DEV_NULL_BLK=m CONFIG_BLK_DEV_FD=m # CONFIG_PARIDE is not set CONFIG_ZRAM=m +# CONFIG_ZRAM_LZ4_COMPRESS is not set # CONFIG_ZRAM_DEBUG is not set CONFIG_BLK_CPQ_DA=m @@ -523,6 +528,11 @@ CONFIG_SCSI_LPFC=m # PCMCIA SCSI adapter support # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set +CONFIG_LIBFC=m +CONFIG_LIBFCOE=m +CONFIG_FCOE=m +CONFIG_FCOE_FNIC=m + CONFIG_ATA=y CONFIG_ATA_BMDMA=y CONFIG_ATA_VERBOSE_ERROR=y @@ -540,7 +550,7 @@ CONFIG_SATA_NV=m CONFIG_SATA_PMP=y CONFIG_SATA_PROMISE=m CONFIG_SATA_QSTOR=m -CONFIG_SATA_RCAR=m +# CONFIG_SATA_RCAR is not set CONFIG_SATA_SIL=m CONFIG_SATA_SIL24=m CONFIG_SATA_SIS=m @@ -602,6 +612,9 @@ CONFIG_PATA_VIA=m CONFIG_PATA_WINBOND=m CONFIG_PATA_ATP867X=m +CONFIG_ATA_OVER_ETH=m + +# CONFIG_MCB is not set # # Multi-device support (RAID and LVM) @@ -635,6 +648,7 @@ CONFIG_DM_THIN_PROVISIONING=m CONFIG_DM_CACHE=m CONFIG_DM_CACHE_MQ=m CONFIG_DM_CACHE_CLEANER=m +# CONFIG_DM_ERA is not set # CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set # CONFIG_DM_DEBUG_SPACE_MAPS is not set CONFIG_DM_UEVENT=y @@ -672,10 +686,6 @@ CONFIG_FIREWIRE_NOSY=m # CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set # -# IEEE 1394 (FireWire) support -# - -# # I2O device support # # CONFIG_I2O is not set @@ -1063,6 +1073,7 @@ CONFIG_IP_SET_BITMAP_IP=m CONFIG_IP_SET_BITMAP_IPMAC=m CONFIG_IP_SET_BITMAP_PORT=m CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPMARK=m CONFIG_IP_SET_HASH_IPPORT=m CONFIG_IP_SET_HASH_IPPORTIP=m CONFIG_IP_SET_HASH_IPPORTNET=m @@ -1074,7 +1085,7 @@ CONFIG_IP_SET_HASH_NETIFACE=m CONFIG_IP_SET_LIST_SET=m # -# SCTP Configuration (EXPERIMENTAL) +# SCTP Configuration # CONFIG_IP_SCTP=m CONFIG_NET_SCTPPROBE=m @@ -1191,6 +1202,7 @@ CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_BLA=y CONFIG_BATMAN_ADV_DAT=y CONFIG_BATMAN_ADV_NC=y +CONFIG_BATMAN_ADV_MCAST=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m @@ -1299,6 +1311,8 @@ CONFIG_NET_VENDOR_ALTEON=y CONFIG_ACENIC=m # CONFIG_ACENIC_OMIT_TIGON_I is not set +CONFIG_ALTERA_TSE=m + CONFIG_NET_VENDOR_AMD=y CONFIG_PCNET32=m CONFIG_AMD8111_ETH=m @@ -1331,6 +1345,8 @@ CONFIG_CHELSIO_T4VF=m CONFIG_NET_VENDOR_CISCO=y CONFIG_ENIC=m +# CONFIG_CX_ECAT is not set + CONFIG_NET_VENDOR_DEC=y # # Tulip family network device support @@ -1358,6 +1374,7 @@ CONFIG_SUNDANCE=m CONFIG_NET_VENDOR_EMULEX=y CONFIG_BE2NET=m +CONFIG_BE2NET_VXLAN=y CONFIG_NET_VENDOR_EXAR=y CONFIG_S2IO=m @@ -1433,6 +1450,7 @@ CONFIG_QLA3XXX=m CONFIG_QLCNIC=m CONFIG_QLCNIC_SRIOV=y CONFIG_QLCNIC_DCB=y +CONFIG_QLCNIC_VXLAN=y CONFIG_QLGE=m CONFIG_NETXEN_NIC=m @@ -1452,6 +1470,7 @@ CONFIG_NET_VENDOR_RDC=y CONFIG_R6040=m # CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set CONFIG_NET_VENDOR_SILAN=y CONFIG_SC92031=m @@ -1460,6 +1479,8 @@ CONFIG_NET_VENDOR_SIS=y CONFIG_SIS900=m CONFIG_SIS190=m +CONFIG_NET_VENDOR_SMC=y + CONFIG_NET_VENDOR_SMSC=y CONFIG_PCMCIA_SMC91C92=m CONFIG_EPIC100=m @@ -1511,6 +1532,7 @@ CONFIG_MDIO_BITBANG=m CONFIG_NATIONAL_PHY=m CONFIG_ICPLUS_PHY=m CONFIG_BCM63XX_PHY=m +CONFIG_BCM7XXX_PHY=m CONFIG_LSI_ET1011C_PHY=m CONFIG_LXT_PHY=m CONFIG_MARVELL_PHY=m @@ -1520,6 +1542,8 @@ CONFIG_SMSC_PHY=m CONFIG_STE10XP=m CONFIG_VITESSE_PHY=m CONFIG_MICREL_PHY=m +# CONFIG_OMAP_CONTROL_PHY is not set +# CONFIG_PHY_SAMSUNG_USB2 is not set CONFIG_MII=m CONFIG_NET_CORE=y @@ -1534,6 +1558,7 @@ CONFIG_ES3210=m CONFIG_NET_PCI=y CONFIG_B44=m CONFIG_B44_PCI=y +CONFIG_BCMGENET=m CONFIG_BNX2=m CONFIG_BNX2X=m CONFIG_BNX2X_SRIOV=y @@ -1553,6 +1578,7 @@ CONFIG_JME=m # # CONFIG_IP1000 is not set # CONFIG_MLX4_EN is not set +# CONFIG_MLX4_EN_VXLAN is not set # CONFIG_SFC is not set # CONFIG_FDDI is not set @@ -1710,6 +1736,7 @@ CONFIG_LIBERTAS_MESH=y CONFIG_IWLWIFI=m CONFIG_IWLDVM=m CONFIG_IWLMVM=m +# CONFIG_IWLWIFI_BCAST_FILTERING is not set CONFIG_IWLWIFI_DEBUG=y CONFIG_IWLWIFI_DEBUGFS=y CONFIG_IWLWIFI_DEVICE_SVTOOL=y @@ -1731,6 +1758,10 @@ CONFIG_P54_PCI=m CONFIG_MWL8K=m # CONFIG_PRISM54 is not set # CONFIG_PCMCIA_WL3501 is not set +CONFIG_RSI_91X=m +CONFIG_RSI_DEBUGFS=y +CONFIG_RSI_SDIO=m +CONFIG_RSI_USB=m CONFIG_RT2X00=m CONFIG_RT2X00_LIB_DEBUGFS=y # CONFIG_RT2X00_DEBUG is not set @@ -1778,6 +1809,7 @@ CONFIG_RTL8192SE=m CONFIG_RTL8192CU=m CONFIG_RTL8192DE=m CONFIG_RTL8723AE=m +CONFIG_RTL8723BE=m CONFIG_RTL8188EE=m CONFIG_MWIFIEX=m @@ -1825,6 +1857,9 @@ CONFIG_BAYCOM_PAR=m CONFIG_BAYCOM_EPP=m CONFIG_YAM=m +# +# Near Field Communication (NFC) devices +# CONFIG_NFC=m CONFIG_NFC_DIGITAL=m CONFIG_NFC_NCI=m @@ -1832,18 +1867,16 @@ CONFIG_NFC_HCI=m CONFIG_NFC_SHDLC=y CONFIG_NFC_LLCP=y CONFIG_NFC_SIM=m + CONFIG_NFC_MRVL=m CONFIG_NFC_MRVL_USB=m - -# -# Near Field Communication (NFC) devices -# CONFIG_NFC_PORT100=m CONFIG_NFC_PN544=m CONFIG_NFC_PN544_I2C=m CONFIG_NFC_PN533=m CONFIG_NFC_MICROREAD=m CONFIG_NFC_MICROREAD_I2C=m +CONFIG_NFC_TRF7970A=m # # IrDA (infrared) support @@ -1887,6 +1920,7 @@ CONFIG_WINBOND_FIR=m # Bluetooth support # CONFIG_BT=m +# CONFIG_BT_6LOWPAN is not set CONFIG_BT_L2CAP=y CONFIG_BT_SCO=y CONFIG_BT_CMTP=m @@ -2404,6 +2438,7 @@ CONFIG_SENSORS_ABITUGURU=m CONFIG_SENSORS_ABITUGURU3=m CONFIG_SENSORS_AD7414=m CONFIG_SENSORS_AD7418=m +CONFIG_SENSORS_ADC128D818=m CONFIG_SENSORS_ADM1021=m CONFIG_SENSORS_ADM1025=m CONFIG_SENSORS_ADM1026=m @@ -2457,6 +2492,9 @@ CONFIG_SENSORS_LM92=m CONFIG_SENSORS_LM93=m CONFIG_SENSORS_LM95234=m CONFIG_SENSORS_LTC4245=m +CONFIG_SENSORS_LTC2945=m +CONFIG_SENSORS_LTC4222=m +CONFIG_SENSORS_LTC4260=m CONFIG_SENSORS_MAX1619=m CONFIG_SENSORS_MAX6650=m CONFIG_SENSORS_MAX6697=m @@ -2567,12 +2605,15 @@ CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS=y # CONFIG_GP2AP020A00F is not set # CONFIG_TSL2583 is not set # CONFIG_TSL2x7x is not set +# CONFIG_LTR501 is not set # CONFIG_TCS3472 is not set # CONFIG_TSL4531 is not set # CONFIG_NAU7802 is not set # CONFIG_TI_ADC081C is not set # CONFIG_EXYNOS_ADC is not set # CONFIG_VIPERBOARD_ADC is not set +# CONFIG_VF610_ADC is not set +# CONFIG_XILINX_XADC is not set # CONFIG_INV_MPU6050_IIO is not set CONFIG_IIO_ST_GYRO_3AXIS=m CONFIG_IIO_ST_MAGN_3AXIS=m @@ -2584,6 +2625,7 @@ CONFIG_HID_SENSOR_INCLINOMETER_3D=m # CONFIG_AK8975 is not set # CONFIG_MAG3110 is not set # CONFIG_TMP006 is not set +# CONFIG_HID_SENSOR_PRESS is not set # CONFIG_IIO_ST_PRESS is not set # CONFIG_KXSD9 is not set # CONFIG_AD7266 is not set @@ -2617,6 +2659,7 @@ CONFIG_HID_SENSOR_INCLINOMETER_3D=m # CONFIG_ADIS16480 is not set # CONFIG_DHT11 is not set # CONFIG_MPL3115 is not set +# CONFIG_SI7005 is not set # staging IIO drivers # CONFIG_AD7291 is not set @@ -2676,7 +2719,6 @@ CONFIG_W1_CON=y CONFIG_W1_MASTER_DS2490=m CONFIG_W1_MASTER_DS2482=m CONFIG_W1_MASTER_DS1WM=m -# CONFIG_HDQ_MASTER_OMAP is not set CONFIG_W1_SLAVE_THERM=m CONFIG_W1_SLAVE_SMEM=m CONFIG_W1_SLAVE_DS2408=m @@ -2704,6 +2746,7 @@ CONFIG_IPMI_HANDLER=m CONFIG_IPMI_DEVICE_INTERFACE=m CONFIG_IPMI_WATCHDOG=m CONFIG_IPMI_SI=m +# CONFIG_IPMI_SI_PROBE_DEFAULTS is not set CONFIG_IPMI_POWEROFF=m # @@ -2749,6 +2792,7 @@ CONFIG_WM831X_WATCHDOG=m CONFIG_W83697UG_WDT=m # CONFIG_MEN_A21_WDT is not set # CONFIG_GPIO_WATCHDOG is not set +# CONFIG_XILINX_WATCHDOG is not set CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_TIMERIOMEM=m @@ -2819,7 +2863,7 @@ CONFIG_R3964=m # CONFIG_SONYPI is not set # -# Ftape, the floppy tape device driver +# AGP Support # CONFIG_AGP=y CONFIG_AGP_ALI=y @@ -2872,6 +2916,7 @@ CONFIG_DRM_VMWGFX=m CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_QXL=m CONFIG_DRM_BOCHS=m +CONFIG_DRM_PTN3460=m # # PCMCIA character devices @@ -2977,7 +3022,6 @@ CONFIG_VIDEO_ZORAN_DC30=m CONFIG_VIDEO_ZORAN_LML33=m CONFIG_VIDEO_ZORAN_LML33R10=m CONFIG_VIDEO_ZORAN_ZR36060=m -# CONFIG_V4L_ISA_PARPORT_DRIVERS is not set # CONFIG_V4L_PLATFORM_DRIVERS is not set CONFIG_VIDEO_FB_IVTV=m CONFIG_VIDEO_SAA7164=m @@ -3128,8 +3172,10 @@ CONFIG_IR_JVC_DECODER=m CONFIG_IR_SONY_DECODER=m CONFIG_IR_RC5_SZ_DECODER=m CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_SHARP_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m CONFIG_IR_LIRC_CODEC=m +# CONFIG_IR_IMG is not set CONFIG_IR_IMON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ITE_CIR=m @@ -3302,14 +3348,10 @@ CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0 CONFIG_SND_DRIVERS=y # -# ISA devices -# -CONFIG_SND_AD1889=m - -# # PCI devices # CONFIG_SND_PCI=y +CONFIG_SND_AD1889=m CONFIG_SND_ALI5451=m CONFIG_SND_ALS300=m CONFIG_SND_ALS4000=m @@ -3477,9 +3519,6 @@ CONFIG_USB_XHCI_HCD=y # USB Device Class drivers # -# -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem -# CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m CONFIG_USB_WDM=m @@ -3502,7 +3541,7 @@ CONFIG_USB_STORAGE_REALTEK=m CONFIG_REALTEK_AUTOPM=y CONFIG_USB_STORAGE_ENE_UB6250=m # CONFIG_USB_LIBUSUAL is not set -# CONFIG_USB_UAS is not set +CONFIG_USB_UAS=m # @@ -3570,6 +3609,7 @@ CONFIG_HID_SENSOR_HUB=m CONFIG_HID_SENSOR_GYRO_3D=m CONFIG_HID_SENSOR_MAGNETOMETER_3D=m CONFIG_HID_SENSOR_ALS=m +# CONFIG_HID_SENSOR_PROX is not set CONFIG_HID_SENSOR_ACCEL_3D=m CONFIG_HID_EMS_FF=m CONFIG_HID_ELECOM=m @@ -3598,6 +3638,7 @@ CONFIG_HID_TIVO=m CONFIG_HID_GENERIC=y CONFIG_HID_AUREAL=m CONFIG_HID_APPLEIR=m +# CONFIG_HID_CP2112 is not set # @@ -3825,15 +3866,12 @@ CONFIG_USB_PHY=y # CONFIG_GENERIC_PHY is not set # CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set # CONFIG_PHY_EXYNOS_DP_VIDEO is not set -# CONFIG_OMAP_USB2 is not set -# CONFIG_OMAP_USB3 is not set -# CONFIG_OMAP_CONTROL_USB is not set # CONFIG_AM335X_PHY_USB is not set # CONFIG_SAMSUNG_USBPHY is not set # CONFIG_SAMSUNG_USB2PHY is not set # CONFIG_SAMSUNG_USB3PHY is not set # CONFIG_BCM_KONA_USB2_PHY is not set -CONFIG_USB_RCAR_PHY=m +# CONFIG_USB_RCAR_PHY is not set CONFIG_USB_ATM=m CONFIG_USB_CXACRU=m # CONFIG_USB_C67X00_HCD is not set @@ -3954,6 +3992,10 @@ CONFIG_MFD_VIPERBOARD=m # CONFIG_MFD_SYSCON is not set # CONFIG_MFD_DA9063 is not set # CONFIG_MFD_LP3943 is not set +# CONFIG_MFD_BCM590XX is not set +# CONFIG_MFD_RTSX_USB is not set +# CONFIG_MFD_TPS65218 is not set + # # File systems @@ -4119,7 +4161,8 @@ CONFIG_LOCKD_V4=y CONFIG_EXPORTFS=y CONFIG_SUNRPC=m CONFIG_SUNRPC_GSS=m -CONFIG_SUNRPC_XPRT_RDMA=m +CONFIG_SUNRPC_XPRT_RDMA_CLIENT=m +# CONFIG_SUNRPC_XPRT_RDMA_SERVER is not set CONFIG_SUNRPC_DEBUG=y CONFIG_RPCSEC_GSS_KRB5=m CONFIG_CIFS=m @@ -4479,7 +4522,6 @@ CONFIG_CDROM_PKTCDVD=m CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set -CONFIG_ATA_OVER_ETH=m CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=m # CONFIG_BACKLIGHT_GENERIC is not set @@ -4526,7 +4568,7 @@ CONFIG_MEMCG_SWAP_ENABLED=y CONFIG_MEMCG_KMEM=y # CONFIG_CGROUP_HUGETLB is not set CONFIG_CGROUP_PERF=y -CONFIG_CGROUP_NET_PRIO=m +CONFIG_CGROUP_NET_PRIO=y # CONFIG_CGROUP_NET_CLASSID is not set CONFIG_BLK_CGROUP=y @@ -4559,7 +4601,6 @@ CONFIG_INOTIFY_USER=y # # Bus devices # -# CONFIG_OMAP_OCP2SCP is not set CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y @@ -4592,7 +4633,6 @@ CONFIG_CPU_FREQ_STAT=m CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_NET_VENDOR_SMC=y # CONFIG_IBMTR is not set # CONFIG_SKISA is not set # CONFIG_PROTEON is not set @@ -4691,6 +4731,7 @@ CONFIG_DW_DMAC_PCI=m # CONFIG_DW_DMAC_BIG_ENDIAN_IO is not set # CONFIG_TIMB_DMA is not set # CONFIG_DMATEST is not set +# CONFIG_FSL_EDMA is not set CONFIG_ASYNC_TX_DMA=y CONFIG_UNUSED_SYMBOLS=y @@ -4894,7 +4935,6 @@ CONFIG_STAGING_MEDIA=y # CONFIG_VIDEO_GO7007 is not set # CONFIG_I2C_BCM2048 is not set # CONFIG_VIDEO_TCM825X is not set -# CONFIG_VIDEO_OMAP4 is not set # CONFIG_USB_MSI3101 is not set # CONFIG_DT3155 is not set # CONFIG_W35UND is not set @@ -4924,6 +4964,10 @@ CONFIG_RTL8192E=m # CONFIG_R8188EU is not set # CONFIG_R8821AE is not set # CONFIG_RTL8192U is not set +CONFIG_R8723AU=m # Jes Sorensen maintains this (rhbz 1100162) +# CONFIG_8723AU_AP_MODE is not set +# CONFIG_8723AU_P2P is not set +# CONFIG_8723AU_BT_COEXIST is not set # CONFIG_FB_SM7XX is not set # CONFIG_SPECTRA is not set # CONFIG_EASYCAP is not set @@ -4944,6 +4988,8 @@ CONFIG_R8712U=m # Larry Finger maintains this (rhbz 699618) # CONFIG_RTS_PSTOR is not set CONFIG_ALTERA_STAPL=m # CONFIG_DVB_CXD2099 is not set +# CONFIG_DVB_RTL2832_SDR is not set +# CONFIG_PWM_FSL_FTM is not set # CONFIG_USBIP_CORE is not set # CONFIG_INTEL_MEI is not set # CONFIG_ZCACHE is not set @@ -4967,6 +5013,10 @@ CONFIG_ALTERA_STAPL=m # CONFIG_DGAP is not set # CONFIG_DGNC is not set # CONFIG_RTS5208 is not set +# CONFIG_GS_FPGABOOT is not set +# CONFIG_BT_NOKIA_H4P is not set +# CONFIG_UNISYSSPAR is not set +# CONFIG_MEDIA_TUNER_MSI001 is not set # END OF STAGING # @@ -4974,11 +5024,6 @@ CONFIG_ALTERA_STAPL=m # # CONFIG_STE_MODEM_RPROC is not set -CONFIG_LIBFC=m -CONFIG_LIBFCOE=m -CONFIG_FCOE=m -CONFIG_FCOE_FNIC=m - CONFIG_NOP_USB_XCEIV=m # CONFIG_IMA is not set @@ -5084,6 +5129,7 @@ CONFIG_GPIO_VIPERBOARD=m # CONFIG_GPIO_PL061 is not set # CONFIG_GPIO_BCM_KONA is not set # CONFIG_GPIO_SCH311X is not set +# CONFIG_GPIO_DWAPB is not set # FIXME: Why? CONFIG_EVENT_POWER_TRACING_DEPRECATED=y diff --git a/config-nodebug b/config-nodebug index ee4842bfc..c6b4b7902 100644 --- a/config-nodebug +++ b/config-nodebug @@ -8,6 +8,7 @@ CONFIG_SND_PCM_XRUN_DEBUG=y # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_LOCK_TORTURE_TEST is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_PROVE_RCU is not set @@ -46,6 +47,7 @@ CONFIG_CPUMASK_OFFSTACK=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 # CONFIG_X86_PTDUMP is not set +# CONFIG_EFI_PGT_DUMP is not set # CONFIG_CAN_DEBUG_DEVICES is not set diff --git a/config-powerpc32-generic b/config-powerpc32-generic index 61e3236b1..10e02fb7b 100644 --- a/config-powerpc32-generic +++ b/config-powerpc32-generic @@ -138,7 +138,6 @@ CONFIG_VIRTUALIZATION=y # PPC gets sad with debug alloc (bz 448598) # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_SND_ISA=y CONFIG_CRYPTO_DEV_TALITOS=m # CONFIG_FSL_EMB_PERFMON is not set diff --git a/config-powerpc64 b/config-powerpc64 index 4b8ba84aa..7f4133593 100644 --- a/config-powerpc64 +++ b/config-powerpc64 @@ -14,7 +14,9 @@ CONFIG_PPC_PMAC=y CONFIG_PPC_POWERNV=y CONFIG_POWERNV_MSI=y CONFIG_PPC_POWERNV_RTAS=y +CONFIG_SENSORS_IBMPOWERNV=y CONFIG_HW_RANDOM_POWERNV=m +CONFIG_POWERNV_CPUFREQ=m CONFIG_SCOM_DEBUGFS=y # CONFIG_PPC_PASEMI is not set # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set @@ -154,6 +156,7 @@ CONFIG_KVM_XICS=y #-- active memory sharing CONFIG_PPC_SMLPAR=y CONFIG_CMM=y +CONFIG_HV_PERF_CTRS=y #-- DLPAR memory remove CONFIG_SPARSEMEM_VMEMMAP=y diff --git a/config-powerpc64p7 b/config-powerpc64p7 index 4fe09eee2..d8ce7e0b1 100644 --- a/config-powerpc64p7 +++ b/config-powerpc64p7 @@ -11,6 +11,8 @@ CONFIG_PPC_POWERNV=y CONFIG_POWERNV_MSI=y CONFIG_PPC_POWERNV_RTAS=y CONFIG_HW_RANDOM_POWERNV=m +CONFIG_SENSORS_IBMPOWERNV=y +CONFIG_POWERNV_CPUFREQ=m CONFIG_SCOM_DEBUGFS=y # CONFIG_PPC_PASEMI is not set # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set @@ -145,6 +147,7 @@ CONFIG_KVM_XICS=y #-- active memory sharing CONFIG_PPC_SMLPAR=y CONFIG_CMM=y +CONFIG_HV_PERF_CTRS=y #-- DLPAR memory remove CONFIG_SPARSEMEM_VMEMMAP=y diff --git a/config-x86-32-generic b/config-x86-32-generic index 21fe6fe75..6adcfb524 100644 --- a/config-x86-32-generic +++ b/config-x86-32-generic @@ -115,9 +115,6 @@ CONFIG_PC8736x_GPIO=m CONFIG_CS5535_GPIO=m CONFIG_GPIO_SCH=m -CONFIG_SND_ISA=y -CONFIG_SND_ES18XX=m - CONFIG_HW_RANDOM_GEODE=m CONFIG_TC1100_WMI=m @@ -232,5 +229,6 @@ CONFIG_BACKLIGHT_PWM=m # CONFIG_PINCTRL_SINGLE is not set # CONFIG_PINCTRL_CAPRI is not set # CONFIG_PINCTRL_MSM8X74 is not set +# CONFIG_PINCTRL_BCM281XX is not set # CONFIG_COMMON_CLK_SI570 is not set # CONFIG_COMMON_CLK_QCOM is not set diff --git a/config-x86-generic b/config-x86-generic index f6b3fa8c5..92441b0a7 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -34,6 +34,7 @@ CONFIG_X86_PM_TIMER=y CONFIG_EFI=y CONFIG_EFI_STUB=y +# CONFIG_EFI_MIXED is not set CONFIG_EFI_VARS=y CONFIG_EFIVAR_FS=y CONFIG_EFI_VARS_PSTORE=y @@ -185,9 +186,6 @@ CONFIG_EDAC_LEGACY_SYSFS=y CONFIG_SCHED_MC=y -CONFIG_SND_ISA=y -CONFIG_SND_ES18XX=m - CONFIG_TCG_INFINEON=m CONFIG_HW_RANDOM_INTEL=m @@ -219,6 +217,7 @@ CONFIG_TOPSTAR_LAPTOP=m CONFIG_ACPI_WMI=m CONFIG_ACER_WMI=m CONFIG_ACERHDF=m +CONFIG_ALIENWARE_WMI=m CONFIG_ASUS_WMI=m CONFIG_ASUS_NB_WMI=m CONFIG_HP_WIRELESS=m @@ -439,6 +438,7 @@ CONFIG_RCU_FANOUT_LEAF=16 CONFIG_INTEL_MEI=m CONFIG_INTEL_MEI_ME=m +CONFIG_INTEL_MEI_TXE=m CONFIG_NFC_MEI_PHY=m CONFIG_NFC_PN544_MEI=m @@ -448,6 +448,7 @@ CONFIG_NFC_MICROREAD_MEI=m # CONFIG_DEBUG_NMI_SELFTEST is not set CONFIG_X86_INTEL_LPSS=y +CONFIG_PWM_LPSS=m CONFIG_PINCTRL=y CONFIG_PINCTRL_BAYTRAIL=y diff --git a/disable-libdw-unwind-on-non-x86.patch b/disable-libdw-unwind-on-non-x86.patch new file mode 100644 index 000000000..445fc1942 --- /dev/null +++ b/disable-libdw-unwind-on-non-x86.patch @@ -0,0 +1,15 @@ +diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile +index ee21fa9..19ee413 100644 +--- a/tools/perf/config/Makefile ++++ b/tools/perf/config/Makefile +@@ -34,6 +34,10 @@ ifeq ($(ARCH),arm) + LIBUNWIND_LIBS = -lunwind -lunwind-arm + endif + ++ifneq ($(ARCH),x86) ++ NO_LIBDW_DWARF_UNWIND := 1 ++endif ++ + ifeq ($(LIBUNWIND_LIBS),) + NO_LIBUNWIND := 1 + else diff --git a/eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch b/eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch new file mode 100644 index 000000000..4cb493325 --- /dev/null +++ b/eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch @@ -0,0 +1,50 @@ +Bugzilla: 1097463 +Upstream-status: Sent for 3.16 + +From 7ad066ecd4dfb4c36fb00f9f9eb1a5d6099db834 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:02 +0200 +Subject: [PATCH 05/14] eeepc-wmi: Add no backlight quirk for Asus H87I-PLUS + Motherboard + +https://bugzilla.redhat.com/show_bug.cgi?id=1097436 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/eeepc-wmi.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c +index 6112933f6278..a7286bbfe28e 100644 +--- a/drivers/platform/x86/eeepc-wmi.c ++++ b/drivers/platform/x86/eeepc-wmi.c +@@ -114,6 +114,10 @@ static struct quirk_entry quirk_asus_x101ch = { + .wmi_backlight_power = true, + }; + ++static struct quirk_entry quirk_asus_no_backlight = { ++ .no_backlight = true, ++}; ++ + static struct quirk_entry *quirks; + + static void et2012_quirks(void) +@@ -182,6 +186,15 @@ static struct dmi_system_id asus_quirks[] = { + }, + .driver_data = &quirk_asus_x101ch, + }, ++ { ++ .callback = dmi_matched, ++ .ident = "ASUSTeK Computer INC. H87I-PLUS", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "H87I-PLUS"), ++ }, ++ .driver_data = &quirk_asus_no_backlight, ++ }, + {}, + }; + +-- +1.9.0 + diff --git a/ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch b/ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch new file mode 100644 index 000000000..86d608664 --- /dev/null +++ b/ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch @@ -0,0 +1,73 @@ +Bugzilla: N/A +Upstream-status: Sent upstream for 3.16 + +From ec5a006650d13c183124bd4279b95625f85efc6d Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:00 +0200 +Subject: [PATCH 03/14] ideapad-laptop: Blacklist rfkill control on the Lenovo + Yoga 2 11 + +The Lenovo Yoga 2 11 always reports everything as blocked, causing userspace +to not even try to use the wlan / bluetooth even though they work fine. + +Note this patch also removes the "else priv->rfk[i] = NULL;" bit of the +rfkill initialization, it is not necessary as the priv struct is allocated +with kzalloc. + +Reported-and-tested-by: Vincent Gerris <vgerris@gmail.com> +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/ideapad-laptop.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c +index 6dd060a0bb65..219eb289a909 100644 +--- a/drivers/platform/x86/ideapad-laptop.c ++++ b/drivers/platform/x86/ideapad-laptop.c +@@ -36,6 +36,7 @@ + #include <linux/debugfs.h> + #include <linux/seq_file.h> + #include <linux/i8042.h> ++#include <linux/dmi.h> + + #define IDEAPAD_RFKILL_DEV_NUM (3) + +@@ -819,6 +820,19 @@ static void ideapad_acpi_notify(acpi_handle handle, u32 event, void *data) + } + } + ++/* Blacklist for devices where the ideapad rfkill interface does not work */ ++static struct dmi_system_id rfkill_blacklist[] = { ++ /* The Lenovo Yoga 2 11 always reports everything as blocked */ ++ { ++ .ident = "Lenovo Yoga 2 11", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"), ++ }, ++ }, ++ {} ++}; ++ + static int ideapad_acpi_add(struct platform_device *pdev) + { + int ret, i; +@@ -854,11 +868,10 @@ static int ideapad_acpi_add(struct platform_device *pdev) + if (ret) + goto input_failed; + +- for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) { +- if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) +- ideapad_register_rfkill(priv, i); +- else +- priv->rfk[i] = NULL; ++ if (!dmi_check_system(rfkill_blacklist)) { ++ for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++) ++ if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) ++ ideapad_register_rfkill(priv, i); + } + ideapad_sync_rfk_state(priv); + ideapad_sync_touchpad_state(priv); +-- +1.9.0 + diff --git a/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch b/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch deleted file mode 100644 index ee06d9f09..000000000 --- a/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch +++ /dev/null @@ -1,48 +0,0 @@ -Bugzilla: 1046495 -Upstream-status: Sent for 3.14 http://marc.info/?l=linux-wireless&m=139453882510796&w=2 - -From: Emmanuel Grumbach <emmanuel.grumbach@intel.com> - -There is a flow in which we send the host command in SYNC -mode, but we don't take priv->mutex. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046495 - -Cc: <stable@vger.kernel.org> -Reviewed-by: Johannes Berg <johannes.berg@intel.com> -Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> ---- - drivers/net/wireless/iwlwifi/dvm/main.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c -index ba1b1ea..ea7e70c 100644 ---- a/drivers/net/wireless/iwlwifi/dvm/main.c -+++ b/drivers/net/wireless/iwlwifi/dvm/main.c -@@ -252,13 +252,17 @@ static void iwl_bg_bt_runtime_config(struct work_struct *work) - struct iwl_priv *priv = - container_of(work, struct iwl_priv, bt_runtime_config); - -+ mutex_lock(&priv->mutex); - if (test_bit(STATUS_EXIT_PENDING, &priv->status)) -- return; -+ goto out; - - /* dont send host command if rf-kill is on */ - if (!iwl_is_ready_rf(priv)) -- return; -+ goto out; -+ - iwlagn_send_advance_bt_config(priv); -+out: -+ mutex_unlock(&priv->mutex); - } - - static void iwl_bg_bt_full_concurrency(struct work_struct *work) --- -1.8.3.2 - --- -To unsubscribe from this list: send the line "unsubscribe linux-wireless" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel.spec b/kernel.spec index f882411b6..7afc11e44 100644 --- a/kernel.spec +++ b/kernel.spec @@ -62,19 +62,19 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching # on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, # which yields a base_sublevel of 0. -%define base_sublevel 14 +%define base_sublevel 15 ## If this is a released kernel ## %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 1 +%define stable_update 0 # Is it a -stable RC? %define stable_rc 0 # Set rpm version accordingly @@ -665,23 +665,13 @@ Patch15000: nowatchdog-on-virt.patch # ARM -# lpae -Patch21001: arm-lpae-ax88796.patch -Patch21004: arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch - -# ARM omap -Patch21010: arm-omap-load-tfp410.patch - # ARM tegra Patch21020: arm-tegra-usb-no-reset-linux33.patch -# Add panel support for tegra paz00 -# Backported from linux-next scheduled for 3.15 -Patch21021: arm-tegra-paz00-panel-dts.patch - # ARM i.MX6 -# http://www.spinics.net/lists/devicetree/msg08276.html -Patch21025: arm-imx6-utilite.patch + +# ARM sunxi (AllWinner) +Patch21025: 0001-ARM-sunxi-Add-driver-for-SD-MMC-hosts-found-on-Allwi.patch #rhbz 754518 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch @@ -696,29 +686,41 @@ Patch22000: weird-root-dentry-name-debug.patch Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch -#rhbz 1051748 -Patch25035: Bluetooth-allocate-static-minor-for-vhci.patch - -#rhbz 1046495 -Patch25044: iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch - -#CVE-2014-0155 rhbz 1081589 1085016 -Patch25036: KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch +#rhbz 1025603 +Patch25063: disable-libdw-unwind-on-non-x86.patch #rhbz 1048314 Patch25062: 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch -#rhbz 1074235 -Patch25055: lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch +#rhbz 1089583 +Patch25064: 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch + +#rhbz 1090161 +Patch25072: HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch + +#rhbz 983342 1093120 +Patch25069: 0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch -#CVE-2014-2851 rhbz 1086730 1087420 -Patch25059: net-ipv4-current-group_info-should-be-put-after-using.patch +Patch25071: s390-appldata-add-slab.h-for-kzalloc-kfree.patch -#rhbz 1085582 1085697 1088588 -Patch25060: 0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch +# CVE-2014-3917 rhbz 1102571 1102715 +Patch25093: auditsc-audit_krule-mask-accesses-need-bounds-checking.patch -#rhbz 1089689 -Patch25061: 0001-synaptics-Add-min-max-quirk-for-ThinkPad-Edge-E431.patch +# Patch series from Hans for various backlight and platform driver fixes +Patch26001: thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch +Patch26002: samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch +Patch26003: ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch +Patch26004: asus-wmi-Add-a-no-backlight-quirk.patch +Patch26005: eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch +Patch26006: acpi-video-Don-t-register-acpi_video_resume-notifier.patch +Patch26007: acpi-video-Add-an-acpi_video_unregister_backlight-fu.patch +Patch26008: acer-wmi-Switch-to-acpi_video_unregister_backlight.patch +Patch26009: acer-wmi-Add-Aspire-5741-to-video_vendor_dmi_table.patch +Patch26010: nouveau-Don-t-check-acpi_video_backlight_support-bef.patch +Patch26011: backlight-Add-backlight-device-un-registration-notif.patch +Patch26012: acpi-video-Unregister-the-backlight-device-if-a-raw-.patch +Patch26013: acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch +Patch26014: acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch # END OF PATCH DEFINITIONS @@ -1269,13 +1271,8 @@ ApplyPatch 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch # # ARM # -ApplyPatch arm-lpae-ax88796.patch -ApplyPatch arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch -ApplyPatch arm-omap-load-tfp410.patch ApplyPatch arm-tegra-usb-no-reset-linux33.patch -ApplyPatch arm-tegra-paz00-panel-dts.patch -ApplyPatch arm-imx6-utilite.patch - +ApplyPatch 0001-ARM-sunxi-Add-driver-for-SD-MMC-hosts-found-on-Allwi.patch # # bugfixes to drivers and filesystems @@ -1381,29 +1378,39 @@ ApplyPatch ath9k_rx_dma_stop_check.patch ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch -#rhbz 1051748 -ApplyPatch Bluetooth-allocate-static-minor-for-vhci.patch - -#rhbz 1046495 -ApplyPatch iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch - -#CVE-2014-0155 rhbz 1081589 1085016 -ApplyPatch KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch - #rhbz 1048314 ApplyPatch 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch - -#rhbz 1074235 -ApplyPatch lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch - -#CVE-2014-2851 rhbz 1086730 1087420 -ApplyPatch net-ipv4-current-group_info-should-be-put-after-using.patch - -#rhbz 1085582 1085697 -ApplyPatch 0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch - -#rhbz 1089689 -ApplyPatch 0001-synaptics-Add-min-max-quirk-for-ThinkPad-Edge-E431.patch +#rhbz 1089583 +ApplyPatch 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch +#rhbz 1090161 +ApplyPatch HID-rmi-do-not-fetch-more-than-16-bytes-in-a-query.patch + +#rhbz 1025603 +ApplyPatch disable-libdw-unwind-on-non-x86.patch + +#rhbz 983342 1093120 +ApplyPatch 0001-acpi-video-Add-4-new-models-to-the-use_native_backli.patch + +ApplyPatch s390-appldata-add-slab.h-for-kzalloc-kfree.patch + +# CVE-2014-3917 rhbz 1102571 1102715 +ApplyPatch auditsc-audit_krule-mask-accesses-need-bounds-checking.patch + +# Patch series from Hans for various backlight and platform driver fixes +ApplyPatch thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch +ApplyPatch samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch +ApplyPatch ideapad-laptop-Blacklist-rfkill-control-on-the-Lenov.patch +ApplyPatch asus-wmi-Add-a-no-backlight-quirk.patch +ApplyPatch eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch +ApplyPatch acpi-video-Don-t-register-acpi_video_resume-notifier.patch +ApplyPatch acpi-video-Add-an-acpi_video_unregister_backlight-fu.patch +ApplyPatch acer-wmi-Switch-to-acpi_video_unregister_backlight.patch +ApplyPatch acer-wmi-Add-Aspire-5741-to-video_vendor_dmi_table.patch +ApplyPatch nouveau-Don-t-check-acpi_video_backlight_support-bef.patch +ApplyPatch backlight-Add-backlight-device-un-registration-notif.patch +ApplyPatch acpi-video-Unregister-the-backlight-device-if-a-raw-.patch +ApplyPatch acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch +ApplyPatch acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch # END OF PATCH APPLICATIONS @@ -2217,6 +2224,9 @@ fi # ||----w | # || || %changelog +* Mon Jun 09 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Update to Linux v3.15 + * Fri Apr 25 2014 Hans de Goede <hdegoede@redhat.com> - Add synaptics min-max quirk for ThinkPad Edge E431 (rhbz#1089689) diff --git a/lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch b/lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch deleted file mode 100644 index 7cc9d9ee3..000000000 --- a/lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch +++ /dev/null @@ -1,63 +0,0 @@ -Bugzilla: 1074235 -Upstream-status: 3.15 and CC'd to stable - -From e39435ce68bb4685288f78b1a7e24311f7ef939f Mon Sep 17 00:00:00 2001 -From: Jens Axboe <axboe@fb.com> -Date: Tue, 8 Apr 2014 16:04:12 -0700 -Subject: [PATCH] lib/percpu_counter.c: fix bad percpu counter state during - suspend - -I got a bug report yesterday from Laszlo Ersek in which he states that -his kvm instance fails to suspend. Laszlo bisected it down to this -commit 1cf7e9c68fe8 ("virtio_blk: blk-mq support") where virtio-blk is -converted to use the blk-mq infrastructure. - -After digging a bit, it became clear that the issue was with the queue -drain. blk-mq tracks queue usage in a percpu counter, which is -incremented on request alloc and decremented when the request is freed. -The initial hunt was for an inconsistency in blk-mq, but everything -seemed fine. In fact, the counter only returned crazy values when -suspend was in progress. - -When a CPU is unplugged, the percpu counters merges that CPU state with -the general state. blk-mq takes care to register a hotcpu notifier with -the appropriate priority, so we know it runs after the percpu counter -notifier. However, the percpu counter notifier only merges the state -when the CPU is fully gone. This leaves a state transition where the -CPU going away is no longer in the online mask, yet it still holds -private values. This means that in this state, percpu_counter_sum() -returns invalid results, and the suspend then hangs waiting for -abs(dead-cpu-value) requests to complete which of course will never -happen. - -Fix this by clearing the state earlier, so we never have a case where -the CPU isn't in online mask but still holds private state. This bug -has been there since forever, I guess we don't have a lot of users where -percpu counters needs to be reliable during the suspend cycle. - -Signed-off-by: Jens Axboe <axboe@fb.com> -Reported-by: Laszlo Ersek <lersek@redhat.com> -Tested-by: Laszlo Ersek <lersek@redhat.com> -Cc: <stable@vger.kernel.org> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- - lib/percpu_counter.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c -index 8280a5dd1727..7dd33577b905 100644 ---- a/lib/percpu_counter.c -+++ b/lib/percpu_counter.c -@@ -169,7 +169,7 @@ static int percpu_counter_hotcpu_callback(struct notifier_block *nb, - struct percpu_counter *fbc; - - compute_batch_value(); -- if (action != CPU_DEAD) -+ if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) - return NOTIFY_OK; - - cpu = (unsigned long)hcpu; --- -1.8.5.3 - diff --git a/makefile-after_link.patch b/makefile-after_link.patch index 23406fc95..ac7c5e159 100644 --- a/makefile-after_link.patch +++ b/makefile-after_link.patch @@ -1,7 +1,7 @@ Bugzilla: N/A Upstream-status: ?? -From b707aea6a4947c3806ced2c23e889943a0f36876 Mon Sep 17 00:00:00 2001 +From fd4e7f06ecc891474dea3a93df083de5f8c50cdc Mon Sep 17 00:00:00 2001 From: Roland McGrath <roland@redhat.com> Date: Mon, 6 Oct 2008 23:03:03 -0700 Subject: [PATCH] kbuild: AFTER_LINK @@ -10,10 +10,18 @@ If the make variable AFTER_LINK is set, it is a command line to run after each final link. This includes vmlinux itself and vDSO images. Signed-off-by: Roland McGrath <roland@redhat.com> - +--- + arch/arm64/kernel/vdso/Makefile | 3 ++- + arch/powerpc/kernel/vdso32/Makefile | 3 ++- + arch/powerpc/kernel/vdso64/Makefile | 3 ++- + arch/s390/kernel/vdso32/Makefile | 3 ++- + arch/s390/kernel/vdso64/Makefile | 3 ++- + arch/x86/vdso/Makefile | 5 +++-- + scripts/link-vmlinux.sh | 4 ++++ + 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile -index 6d20b7d..863a01b 100644 +index 6d20b7d162d8..863a01bde0bf 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -48,7 +48,8 @@ $(obj-vdso): %.o: %.S @@ -27,7 +35,7 @@ index 6d20b7d..863a01b 100644 cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $< diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile -index 53e6c9b..e427844 100644 +index 53e6c9b979ec..e427844e9bb0 100644 --- a/arch/powerpc/kernel/vdso32/Makefile +++ b/arch/powerpc/kernel/vdso32/Makefile @@ -43,7 +43,8 @@ $(obj-vdso32): %.o: %.S @@ -41,7 +49,7 @@ index 53e6c9b..e427844 100644 cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $< diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile -index effca94..713891a 100644 +index effca9404b17..713891a92d23 100644 --- a/arch/powerpc/kernel/vdso64/Makefile +++ b/arch/powerpc/kernel/vdso64/Makefile @@ -36,7 +36,8 @@ $(obj-vdso64): %.o: %.S @@ -55,7 +63,7 @@ index effca94..713891a 100644 cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile -index 8ad2b34..e153572 100644 +index 8ad2b34ad151..e153572ab351 100644 --- a/arch/s390/kernel/vdso32/Makefile +++ b/arch/s390/kernel/vdso32/Makefile @@ -43,7 +43,8 @@ $(obj-vdso32): %.o: %.S @@ -69,7 +77,7 @@ index 8ad2b34..e153572 100644 cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $< diff --git a/arch/s390/kernel/vdso64/Makefile b/arch/s390/kernel/vdso64/Makefile -index 2a8ddfd..452ca53 100644 +index 2a8ddfd12a5b..452ca53561fe 100644 --- a/arch/s390/kernel/vdso64/Makefile +++ b/arch/s390/kernel/vdso64/Makefile @@ -43,7 +43,8 @@ $(obj-vdso64): %.o: %.S @@ -83,10 +91,10 @@ index 2a8ddfd..452ca53 100644 cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $< diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile -index fd14be1..1f3eb19 100644 +index 9206ac7961a5..3d7f533f6757 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile -@@ -178,8 +178,9 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE +@@ -181,8 +181,9 @@ $(obj)/vdso32-syms.lds: $(vdso32.so-y:%=$(obj)/vdso32-%-syms.lds) FORCE quiet_cmd_vdso = VDSO $@ cmd_vdso = $(CC) -nostdlib -o $@ \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ @@ -96,10 +104,10 @@ index fd14be1..1f3eb19 100644 + $(if $(AFTER_LINK),; $(AFTER_LINK)) && \ + sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' - VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) - GCOV_PROFILE := n + VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \ + $(LTO_CFLAGS) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh -index 2dcb377..25e170e 100644 +index 2dcb37736d84..25e170e92ef1 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -65,6 +65,10 @@ vmlinux_link() @@ -113,3 +121,6 @@ index 2dcb377..25e170e 100644 } +-- +1.8.5.3 + diff --git a/modsign-uefi.patch b/modsign-uefi.patch index d8e762cb7..af6844d5a 100644 --- a/modsign-uefi.patch +++ b/modsign-uefi.patch @@ -1,7 +1,7 @@ Bugzilla: N/A Upstream-status: Fedora mustard for now -From 2b668e069365b608e855cf1f5edcf8caed0aaa4d Mon Sep 17 00:00:00 2001 +From 779183da2955e33a221c3f7a622766cd53e06d45 Mon Sep 17 00:00:00 2001 From: Dave Howells <dhowells@redhat.com> Date: Tue, 23 Oct 2012 09:30:54 -0400 Subject: [PATCH 1/5] Add EFI signature data types @@ -15,10 +15,10 @@ Signed-off-by: David Howells <dhowells@redhat.com> 1 file changed, 20 insertions(+) diff --git a/include/linux/efi.h b/include/linux/efi.h -index 0c1d367..de1faea 100644 +index 3a77a70fff27..4c7f7011ea19 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -394,6 +394,12 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long si +@@ -575,6 +575,12 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long si #define EFI_FILE_SYSTEM_GUID \ EFI_GUID( 0x964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b ) @@ -31,7 +31,7 @@ index 0c1d367..de1faea 100644 typedef struct { efi_guid_t guid; u64 table; -@@ -541,6 +547,20 @@ typedef struct _efi_file_io_interface { +@@ -782,6 +788,20 @@ typedef struct _efi_file_io_interface { #define EFI_INVALID_TABLE_ADDR (~0UL) @@ -53,10 +53,10 @@ index 0c1d367..de1faea 100644 * All runtime access to EFI goes through this structure: */ -- -1.8.4.2 +1.9.0 -From 42d75e3e3fe134cc274f765525031b764540a587 Mon Sep 17 00:00:00 2001 +From 8592d1f6a8cc8d901c94582b9d0b57d170a0940b Mon Sep 17 00:00:00 2001 From: Dave Howells <dhowells@redhat.com> Date: Tue, 23 Oct 2012 09:36:28 -0400 Subject: [PATCH 2/5] Add an EFI signature blob parser and key loader. @@ -74,7 +74,7 @@ Signed-off-by: David Howells <dhowells@redhat.com> create mode 100644 crypto/asymmetric_keys/efi_parser.c diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig -index 03a6eb9..6306ffc 100644 +index 03a6eb95ab50..6306ffc2a7fe 100644 --- a/crypto/asymmetric_keys/Kconfig +++ b/crypto/asymmetric_keys/Kconfig @@ -37,4 +37,12 @@ config X509_CERTIFICATE_PARSER @@ -91,7 +91,7 @@ index 03a6eb9..6306ffc 100644 + endif # ASYMMETRIC_KEY_TYPE diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile -index 0727204..cd8388e 100644 +index 0727204aab68..cd8388e5f2f1 100644 --- a/crypto/asymmetric_keys/Makefile +++ b/crypto/asymmetric_keys/Makefile @@ -8,6 +8,7 @@ asymmetric_keys-y := asymmetric_type.o signature.o @@ -104,7 +104,7 @@ index 0727204..cd8388e 100644 # X.509 Certificate handling diff --git a/crypto/asymmetric_keys/efi_parser.c b/crypto/asymmetric_keys/efi_parser.c new file mode 100644 -index 0000000..424896a +index 000000000000..424896a0b169 --- /dev/null +++ b/crypto/asymmetric_keys/efi_parser.c @@ -0,0 +1,109 @@ @@ -218,10 +218,10 @@ index 0000000..424896a + return 0; +} diff --git a/include/linux/efi.h b/include/linux/efi.h -index de1faea..13e1425 100644 +index 4c7f7011ea19..96174a7f9e90 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -641,6 +641,10 @@ extern int efi_set_rtc_mmss(const struct timespec *now); +@@ -883,6 +883,10 @@ extern int efi_set_rtc_mmss(const struct timespec *now); extern void efi_reserve_boot_services(void); extern struct efi_memory_map memmap; @@ -233,10 +233,10 @@ index de1faea..13e1425 100644 * efi_range_is_wc - check the WC bit on an address range * @start: starting kvirt address -- -1.8.4.2 +1.9.0 -From d750dbcdcb3a712a2ea4ec57b9c9729c6a26b41d Mon Sep 17 00:00:00 2001 +From a4da3547b2eb4e0c7111eee7e5d5043413142835 Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@fedoraproject.org> Date: Fri, 26 Oct 2012 12:36:24 -0400 Subject: [PATCH 3/5] KEYS: Add a system blacklist keyring @@ -255,7 +255,7 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 4 files changed, 42 insertions(+) diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h -index 8dabc39..e466de1 100644 +index 8dabc399bd1d..e466de10ceec 100644 --- a/include/keys/system_keyring.h +++ b/include/keys/system_keyring.h @@ -18,6 +18,10 @@ @@ -270,10 +270,10 @@ index 8dabc39..e466de1 100644 #endif /* _KEYS_SYSTEM_KEYRING_H */ diff --git a/init/Kconfig b/init/Kconfig -index 5236dc5..f59e6fe 100644 +index 9d3585bb2a7a..932f22f7cc40 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1673,6 +1673,15 @@ config SYSTEM_TRUSTED_KEYRING +@@ -1658,6 +1658,15 @@ config SYSTEM_TRUSTED_KEYRING Keys in this keyring are used by module signature checking. @@ -281,16 +281,16 @@ index 5236dc5..f59e6fe 100644 + bool "Provide system-wide ring of blacklisted keys" + depends on KEYS + help -+ Provide a system keyring to which blacklisted keys can be added. Keys -+ in the keyring are considered entirely untrusted. Keys in this keyring -+ are used by the module signature checking to reject loading of modules -+ signed with a blacklisted key. -+ - menuconfig MODULES - bool "Enable loadable module support" - option modules ++ Provide a system keyring to which blacklisted keys can be added. ++ Keys in the keyring are considered entirely untrusted. Keys in this ++ keyring are used by the module signature checking to reject loading ++ of modules signed with a blacklisted key. ++ + config PROFILING + bool "Profiling support" + help diff --git a/kernel/module_signing.c b/kernel/module_signing.c -index be5b8fa..fed815f 100644 +index be5b8fac4bd0..fed815fcdaf2 100644 --- a/kernel/module_signing.c +++ b/kernel/module_signing.c @@ -158,6 +158,18 @@ static struct key *request_asymmetric_key(const char *signer, size_t signer_len, @@ -313,7 +313,7 @@ index be5b8fa..fed815f 100644 &key_type_asymmetric, id); if (IS_ERR(key)) diff --git a/kernel/system_keyring.c b/kernel/system_keyring.c -index 52ebc70..478c4f8 100644 +index 52ebc70263f4..478c4f8ec908 100644 --- a/kernel/system_keyring.c +++ b/kernel/system_keyring.c @@ -20,6 +20,9 @@ @@ -348,10 +348,10 @@ index 52ebc70..478c4f8 100644 } -- -1.8.4.2 +1.9.0 -From c32beadd0d75fddcd75b700e4a75884d7a82e9bb Mon Sep 17 00:00:00 2001 +From 25adb4e43fb5c23723f33a806399ad484f8dcfa5 Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@fedoraproject.org> Date: Fri, 26 Oct 2012 12:42:16 -0400 Subject: [PATCH 4/5] MODSIGN: Import certificates from UEFI Secure Boot @@ -379,10 +379,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> create mode 100644 kernel/modsign_uefi.c diff --git a/include/linux/efi.h b/include/linux/efi.h -index 13e1425..a7175eb 100644 +index 96174a7f9e90..8f7466023105 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -400,6 +400,12 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long si +@@ -581,6 +581,12 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long si #define EFI_CERT_X509_GUID \ EFI_GUID( 0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 ) @@ -396,10 +396,10 @@ index 13e1425..a7175eb 100644 efi_guid_t guid; u64 table; diff --git a/init/Kconfig b/init/Kconfig -index f59e6fe..90fa75f 100644 +index 932f22f7cc40..6023af12ef4f 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1792,6 +1792,15 @@ config MODULE_SIG_ALL +@@ -1812,6 +1812,15 @@ config MODULE_SIG_ALL comment "Do not forget to sign required modules with scripts/sign-file" depends on MODULE_SIG_FORCE && !MODULE_SIG_ALL @@ -416,10 +416,10 @@ index f59e6fe..90fa75f 100644 prompt "Which hash algorithm should modules be signed with?" depends on MODULE_SIG diff --git a/kernel/Makefile b/kernel/Makefile -index bc010ee..bee938f 100644 +index f2a8b6246ce9..706e7952bde5 100644 --- a/kernel/Makefile +++ b/kernel/Makefile -@@ -44,6 +44,7 @@ obj-$(CONFIG_UID16) += uid16.o +@@ -46,6 +46,7 @@ obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULE_SIG) += module_signing.o @@ -427,7 +427,7 @@ index bc010ee..bee938f 100644 obj-$(CONFIG_KALLSYMS) += kallsyms.o obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o obj-$(CONFIG_KEXEC) += kexec.o -@@ -96,6 +97,8 @@ obj-$(CONFIG_CONTEXT_TRACKING) += context_tracking.o +@@ -99,6 +100,8 @@ obj-$(CONFIG_TORTURE_TEST) += torture.o $(obj)/configs.o: $(obj)/config_data.h @@ -438,7 +438,7 @@ index bc010ee..bee938f 100644 targets += config_data.gz diff --git a/kernel/modsign_uefi.c b/kernel/modsign_uefi.c new file mode 100644 -index 0000000..94b0eb3 +index 000000000000..94b0eb38a284 --- /dev/null +++ b/kernel/modsign_uefi.c @@ -0,0 +1,92 @@ @@ -535,10 +535,10 @@ index 0000000..94b0eb3 +} +late_initcall(load_uefi_certs); -- -1.8.4.2 +1.9.0 -From 5c86fc6c7e4d51286d75ee6d8ceedf983ae434fb Mon Sep 17 00:00:00 2001 +From 20b7de055a87e6f5555c27de8188b7c975e3e330 Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@fedoraproject.org> Date: Thu, 3 Oct 2013 10:14:23 -0400 Subject: [PATCH 5/5] MODSIGN: Support not importing certs from db @@ -554,7 +554,7 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/kernel/modsign_uefi.c b/kernel/modsign_uefi.c -index 94b0eb3..ae28b97 100644 +index 94b0eb38a284..ae28b974d49a 100644 --- a/kernel/modsign_uefi.c +++ b/kernel/modsign_uefi.c @@ -8,6 +8,23 @@ @@ -620,5 +620,5 @@ index 94b0eb3..ae28b97 100644 mok = get_cert_list(L"MokListRT", &mok_var, &moksize); -- -1.8.4.2 +1.9.0 diff --git a/net-ipv4-current-group_info-should-be-put-after-using.patch b/net-ipv4-current-group_info-should-be-put-after-using.patch deleted file mode 100644 index 265b3839b..000000000 --- a/net-ipv4-current-group_info-should-be-put-after-using.patch +++ /dev/null @@ -1,64 +0,0 @@ -Bugzilla: 1087420 -Upstream-status: Queued for 3.15 and stable - -From b04c46190219a4f845e46a459e3102137b7f6cac Mon Sep 17 00:00:00 2001 -From: "Wang, Xiaoming" <xiaoming.wang@intel.com> -Date: Mon, 14 Apr 2014 12:30:45 -0400 -Subject: net: ipv4: current group_info should be put after using. - -Plug a group_info refcount leak in ping_init. -group_info is only needed during initialization and -the code failed to release the reference on exit. -While here move grabbing the reference to a place -where it is actually needed. - -Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com> -Signed-off-by: Zhang Dongxing <dongxing.zhang@intel.com> -Signed-off-by: xiaoming wang <xiaoming.wang@intel.com> -Signed-off-by: David S. Miller <davem@davemloft.net> - -diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c -index f4b19e5..8210964 100644 ---- a/net/ipv4/ping.c -+++ b/net/ipv4/ping.c -@@ -252,26 +252,33 @@ int ping_init_sock(struct sock *sk) - { - struct net *net = sock_net(sk); - kgid_t group = current_egid(); -- struct group_info *group_info = get_current_groups(); -- int i, j, count = group_info->ngroups; -+ struct group_info *group_info; -+ int i, j, count; - kgid_t low, high; -+ int ret = 0; - - inet_get_ping_group_range_net(net, &low, &high); - if (gid_lte(low, group) && gid_lte(group, high)) - return 0; - -+ group_info = get_current_groups(); -+ count = group_info->ngroups; - for (i = 0; i < group_info->nblocks; i++) { - int cp_count = min_t(int, NGROUPS_PER_BLOCK, count); - for (j = 0; j < cp_count; j++) { - kgid_t gid = group_info->blocks[i][j]; - if (gid_lte(low, gid) && gid_lte(gid, high)) -- return 0; -+ goto out_release_group; - } - - count -= cp_count; - } - -- return -EACCES; -+ ret = -EACCES; -+ -+out_release_group: -+ put_group_info(group_info); -+ return ret; - } - EXPORT_SYMBOL_GPL(ping_init_sock); - --- -cgit v0.10.1 - diff --git a/nouveau-Don-t-check-acpi_video_backlight_support-bef.patch b/nouveau-Don-t-check-acpi_video_backlight_support-bef.patch new file mode 100644 index 000000000..b6ed45c39 --- /dev/null +++ b/nouveau-Don-t-check-acpi_video_backlight_support-bef.patch @@ -0,0 +1,79 @@ +Bugzilla: 1093171 +Upstream-status: Queued for 3.16 + +From abf17f7885656ccc181a608d2a9ee770b23d9e23 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:41:07 +0200 +Subject: [PATCH 10/14] nouveau: Don't check acpi_video_backlight_support() + before registering backlight + +acpi_video_backlight_support() is supposed to be called by other (vendor +specific) firmware backlight controls, not by native / raw backlight controls +like nv_backlight. + +Userspace will normally prefer firmware interfaces over raw interfaces, so +if acpi_video backlight support is present it will use that even if +nv_backlight is registered as well. + +Except when video.use_native_backlight is present on the kernel cmdline +(or enabled through a dmi based quirk). As the name indicates the goal here +is to make only the raw interface available to userspace so that it will use +that (it only does this when it sees a win8 compliant bios). + +This is done by: +1) Not registering any acpi_video# backlight devices; and +2) Making acpi_video_backlight_support() return true so that other firmware +drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their +own vender specific interfaces. + +Currently nouveau breaks this setup, as when acpi_video_backlight_support() +returns true, it does not register itself, resulting in no backlight control +at all. + +This is esp. going to be a problem with 3.16 which will default to +video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios +will get no backlight control at all. + +This also likely explains why the previous attempt to make +video.use_native_backlight=1 the default was not a success, as without this +patch having a default of video.use_native_backlight=1 will cause regressions. + +Note this effectively reverts commit 5bead799 + +Also see: https://bugzilla.redhat.com/show_bug.cgi?id=1093171 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/gpu/drm/nouveau/nouveau_backlight.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c +index 630f6e84fc01..2c1e4aad7da3 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c ++++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c +@@ -31,7 +31,6 @@ + */ + + #include <linux/backlight.h> +-#include <linux/acpi.h> + + #include "nouveau_drm.h" + #include "nouveau_reg.h" +@@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev) + struct nouveau_device *device = nv_device(drm->device); + struct drm_connector *connector; + +-#ifdef CONFIG_ACPI +- if (acpi_video_backlight_support()) { +- NV_INFO(drm, "ACPI backlight interface available, " +- "not registering our own\n"); +- return 0; +- } +-#endif +- + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { + if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && + connector->connector_type != DRM_MODE_CONNECTOR_eDP) +-- +1.9.0 + diff --git a/s390-appldata-add-slab.h-for-kzalloc-kfree.patch b/s390-appldata-add-slab.h-for-kzalloc-kfree.patch new file mode 100644 index 000000000..3716ce8b1 --- /dev/null +++ b/s390-appldata-add-slab.h-for-kzalloc-kfree.patch @@ -0,0 +1,28 @@ +From 1eb5e8b7449ff017c2f358d97bd2fcd4eb87cc53 Mon Sep 17 00:00:00 2001 +From: Jeff Mahoney <jeffm@suse.com> +Date: Sun, 27 Apr 2014 17:35:43 -0400 +Subject: s390/appldata: add slab.h for kzalloc/kfree + +This fixes: +arch/s390/appldata/appldata_mem.c:135:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] +arch/s390/appldata/appldata_mem.c:141:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] + +Signed-off-by: Jeff Mahoney <jeffm@suse.com> +Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> +Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> + +diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c +index 42be537..edcf2a7 100644 +--- a/arch/s390/appldata/appldata_mem.c ++++ b/arch/s390/appldata/appldata_mem.c +@@ -13,6 +13,7 @@ + #include <linux/kernel_stat.h> + #include <linux/pagemap.h> + #include <linux/swap.h> ++#include <linux/slab.h> + #include <asm/io.h> + + #include "appldata.h" +-- +cgit v0.10.1 + diff --git a/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch b/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch new file mode 100644 index 000000000..ce83ed21c --- /dev/null +++ b/samsung-laptop-Add-broken-acpi-video-quirk-for-NC210.patch @@ -0,0 +1,41 @@ +Bugzilla: 861573 +Upstream-status: Waiting for feedback from reporter + +From 2fa2078cdd4198b49c02cb03087158d398476463 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:40:59 +0200 +Subject: [PATCH 02/14] samsung-laptop: Add broken-acpi-video quirk for + NC210/NC110 + +Reported (and tested) here: +https://bugzilla.redhat.com/show_bug.cgi?id=861573 + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/samsung-laptop.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c +index d1f030053176..98f61f677627 100644 +--- a/drivers/platform/x86/samsung-laptop.c ++++ b/drivers/platform/x86/samsung-laptop.c +@@ -1534,6 +1534,16 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = { + }, + .driver_data = &samsung_broken_acpi_video, + }, ++ { ++ .callback = samsung_dmi_matched, ++ .ident = "NC210", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "NC210/NC110"), ++ DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"), ++ }, ++ .driver_data = &samsung_broken_acpi_video, ++ }, + { }, + }; + MODULE_DEVICE_TABLE(dmi, samsung_dmi_table); +-- +1.9.0 + diff --git a/secure-modules.patch b/secure-modules.patch index 86bf9dc6f..478c62ff5 100644 --- a/secure-modules.patch +++ b/secure-modules.patch @@ -1,7 +1,7 @@ Bugzilla: N/A Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd -From f212a4d8b8638a3e15e4cd76874d4fab60726752 Mon Sep 17 00:00:00 2001 +From 0f81a4461431941c17ff26fd3d5e284ede4a368a Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Aug 2013 17:58:15 -0400 Subject: [PATCH 01/14] Add secure_modules() call @@ -17,10 +17,10 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 2 files changed, 17 insertions(+) diff --git a/include/linux/module.h b/include/linux/module.h -index 15cd6b1..30702eb 100644 +index f520a767c86c..fc9b54eb779e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -512,6 +512,8 @@ int unregister_module_notifier(struct notifier_block * nb); +@@ -509,6 +509,8 @@ int unregister_module_notifier(struct notifier_block *nb); extern void print_modules(void); @@ -29,7 +29,7 @@ index 15cd6b1..30702eb 100644 #else /* !CONFIG_MODULES... */ /* Given an address, look for it in the exception tables. */ -@@ -622,6 +624,11 @@ static inline int unregister_module_notifier(struct notifier_block * nb) +@@ -619,6 +621,11 @@ static inline int unregister_module_notifier(struct notifier_block *nb) static inline void print_modules(void) { } @@ -42,10 +42,10 @@ index 15cd6b1..30702eb 100644 #ifdef CONFIG_SYSFS diff --git a/kernel/module.c b/kernel/module.c -index f5a3b1e..644c33e 100644 +index 11869408f79b..2b9204fe055f 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -3831,3 +3831,13 @@ void module_layout(struct module *mod, +@@ -3835,3 +3835,13 @@ void module_layout(struct module *mod, } EXPORT_SYMBOL(module_layout); #endif @@ -60,10 +60,10 @@ index f5a3b1e..644c33e 100644 +} +EXPORT_SYMBOL(secure_modules); -- -1.8.4.2 +1.8.5.3 -From 394a8259d0b457495dddda8704821ec9e56ea44a Mon Sep 17 00:00:00 2001 +From 806c4ee0e6484b529b88b3d0ceb49f6edf96ae11 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Thu, 8 Mar 2012 10:10:38 -0500 Subject: [PATCH 02/14] PCI: Lock down BAR access when module security is @@ -83,7 +83,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c -index c91e6c1..447742e 100644 +index 4e0acefb7565..01b56d13d021 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -29,6 +29,7 @@ @@ -94,7 +94,7 @@ index c91e6c1..447742e 100644 #include "pci.h" static int sysfs_initialized; /* = 0 */ -@@ -668,6 +669,9 @@ pci_write_config(struct file* filp, struct kobject *kobj, +@@ -652,6 +653,9 @@ pci_write_config(struct file* filp, struct kobject *kobj, loff_t init_off = off; u8 *data = (u8*) buf; @@ -104,7 +104,7 @@ index c91e6c1..447742e 100644 if (off > dev->cfg_size) return 0; if (off + count > dev->cfg_size) { -@@ -974,6 +978,9 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, +@@ -958,6 +962,9 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, resource_size_t start, end; int i; @@ -114,7 +114,7 @@ index c91e6c1..447742e 100644 for (i = 0; i < PCI_ROM_RESOURCE; i++) if (res == &pdev->resource[i]) break; -@@ -1081,6 +1088,9 @@ pci_write_resource_io(struct file *filp, struct kobject *kobj, +@@ -1065,6 +1072,9 @@ pci_write_resource_io(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) { @@ -125,7 +125,7 @@ index c91e6c1..447742e 100644 } diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c -index 46d1378..294fe7b 100644 +index 46d1378f2e9e..294fe7b34af0 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -117,6 +117,9 @@ proc_bus_pci_write(struct file *file, const char __user *buf, size_t nbytes, lof @@ -158,7 +158,7 @@ index 46d1378..294fe7b 100644 /* Make sure the caller is mapping a real resource for this device */ diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c -index 24750a1..fa57896 100644 +index 24750a1b39b6..fa57896b97dd 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c @@ -10,6 +10,7 @@ @@ -179,10 +179,10 @@ index 24750a1..fa57896 100644 dev = pci_get_bus_and_slot(bus, dfn); -- -1.8.4.2 +1.8.5.3 -From 69532e626cece8a43c2528246e0421488b468102 Mon Sep 17 00:00:00 2001 +From 16ee82e2add8684e374451e6ba34be3ee41e4ef1 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Thu, 8 Mar 2012 10:35:59 -0500 Subject: [PATCH 03/14] x86: Lock down IO port access when module security is @@ -200,7 +200,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c -index 4ddaf66..00b4403 100644 +index 4ddaf66ea35f..00b440307419 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c @@ -15,6 +15,7 @@ @@ -230,10 +230,10 @@ index 4ddaf66..00b4403 100644 } regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12); diff --git a/drivers/char/mem.c b/drivers/char/mem.c -index f895a8c..1af8664 100644 +index 917403fe10da..cdf839f9defe 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c -@@ -28,6 +28,7 @@ +@@ -27,6 +27,7 @@ #include <linux/export.h> #include <linux/io.h> #include <linux/aio.h> @@ -241,7 +241,7 @@ index f895a8c..1af8664 100644 #include <asm/uaccess.h> -@@ -563,6 +564,9 @@ static ssize_t write_port(struct file *file, const char __user *buf, +@@ -568,6 +569,9 @@ static ssize_t write_port(struct file *file, const char __user *buf, unsigned long i = *ppos; const char __user *tmp = buf; @@ -252,10 +252,10 @@ index f895a8c..1af8664 100644 return -EFAULT; while (count-- > 0 && i < 65536) { -- -1.8.4.2 +1.8.5.3 -From 8771ff55273e964d707b174dd0dbe433783c0254 Mon Sep 17 00:00:00 2001 +From 2fd4b35393b19cde87e4770d3b85d12760e72f6a Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Mar 2012 08:39:37 -0500 Subject: [PATCH 04/14] ACPI: Limit access to custom_method @@ -270,7 +270,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c -index 12b62f2..50647b3 100644 +index c68e72414a67..4277938af700 100644 --- a/drivers/acpi/custom_method.c +++ b/drivers/acpi/custom_method.c @@ -29,6 +29,9 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf, @@ -284,10 +284,10 @@ index 12b62f2..50647b3 100644 /* parse the table header to get the table length */ if (count <= sizeof(struct acpi_table_header)) -- -1.8.4.2 +1.8.5.3 -From 7d3e3db90e1b4cf33ba4a46624ae4a68f787e5fc Mon Sep 17 00:00:00 2001 +From 543d64276237adb782ec30a5dab67d0b21afc1d4 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Mar 2012 08:46:50 -0500 Subject: [PATCH 05/14] asus-wmi: Restrict debugfs interface when module @@ -305,10 +305,10 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 9 insertions(+) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c -index 19c313b..db18ef66 100644 +index c5e082fb82fa..03c57fc8de8a 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c -@@ -1618,6 +1618,9 @@ static int show_dsts(struct seq_file *m, void *data) +@@ -1595,6 +1595,9 @@ static int show_dsts(struct seq_file *m, void *data) int err; u32 retval = -1; @@ -318,7 +318,7 @@ index 19c313b..db18ef66 100644 err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval); if (err < 0) -@@ -1634,6 +1637,9 @@ static int show_devs(struct seq_file *m, void *data) +@@ -1611,6 +1614,9 @@ static int show_devs(struct seq_file *m, void *data) int err; u32 retval = -1; @@ -328,7 +328,7 @@ index 19c313b..db18ef66 100644 err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param, &retval); -@@ -1658,6 +1664,9 @@ static int show_call(struct seq_file *m, void *data) +@@ -1635,6 +1641,9 @@ static int show_call(struct seq_file *m, void *data) union acpi_object *obj; acpi_status status; @@ -339,10 +339,10 @@ index 19c313b..db18ef66 100644 1, asus->debug.method_id, &input, &output); -- -1.8.4.2 +1.8.5.3 -From 98ebe083d75333e269730fe374cca42ac7f08a07 Mon Sep 17 00:00:00 2001 +From 6e2fec5547b597c43ca72e34729b8a402660a7c1 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Mar 2012 09:28:15 -0500 Subject: [PATCH 06/14] Restrict /dev/mem and /dev/kmem when module loading is @@ -358,12 +358,12 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 6 insertions(+) diff --git a/drivers/char/mem.c b/drivers/char/mem.c -index 1af8664..61406c8 100644 +index cdf839f9defe..c63cf93b00eb 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c -@@ -159,6 +159,9 @@ static ssize_t write_mem(struct file *file, const char __user *buf, - unsigned long copied; - void *ptr; +@@ -164,6 +164,9 @@ static ssize_t write_mem(struct file *file, const char __user *buf, + if (p != *ppos) + return -EFBIG; + if (secure_modules()) + return -EPERM; @@ -371,7 +371,7 @@ index 1af8664..61406c8 100644 if (!valid_phys_addr_range(p, count)) return -EFAULT; -@@ -497,6 +500,9 @@ static ssize_t write_kmem(struct file *file, const char __user *buf, +@@ -502,6 +505,9 @@ static ssize_t write_kmem(struct file *file, const char __user *buf, char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ int err = 0; @@ -382,10 +382,10 @@ index 1af8664..61406c8 100644 unsigned long to_write = min_t(unsigned long, count, (unsigned long)high_memory - p); -- -1.8.4.2 +1.8.5.3 -From 71353d491c70b303a07b4e79c896e729a4f74978 Mon Sep 17 00:00:00 2001 +From 358cea0a54f726fa61839b411f3f54284d4588bf Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@redhat.com> Date: Mon, 25 Jun 2012 19:57:30 -0400 Subject: [PATCH 07/14] acpi: Ignore acpi_rsdp kernel parameter when module @@ -401,10 +401,10 @@ Signed-off-by: Josh Boyer <jwboyer@redhat.com> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c -index 54a20ff..d21d269 100644 +index f7fd72ac69cf..ccdae1c8c386 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c -@@ -45,6 +45,7 @@ +@@ -44,6 +44,7 @@ #include <linux/list.h> #include <linux/jiffies.h> #include <linux/semaphore.h> @@ -412,7 +412,7 @@ index 54a20ff..d21d269 100644 #include <asm/io.h> #include <asm/uaccess.h> -@@ -248,7 +249,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); +@@ -244,7 +245,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp); acpi_physical_address __init acpi_os_get_root_pointer(void) { #ifdef CONFIG_KEXEC @@ -422,10 +422,10 @@ index 54a20ff..d21d269 100644 #endif -- -1.8.4.2 +1.8.5.3 -From e0a6b0dd91460123d71784d531b9df26449940ae Mon Sep 17 00:00:00 2001 +From 89751b3ad4dea7cf5b806cd14126dd70657a9148 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Aug 2013 03:33:56 -0400 Subject: [PATCH 08/14] kexec: Disable at runtime if the kernel enforces module @@ -441,18 +441,18 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 8 insertions(+) diff --git a/kernel/kexec.c b/kernel/kexec.c -index 9c97016..8ad0d38 100644 +index c8380ad203bc..e6eb239f567a 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c -@@ -32,6 +32,7 @@ - #include <linux/vmalloc.h> +@@ -33,6 +33,7 @@ #include <linux/swap.h> #include <linux/syscore_ops.h> + #include <linux/compiler.h> +#include <linux/module.h> #include <asm/page.h> #include <asm/uaccess.h> -@@ -946,6 +947,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, +@@ -948,6 +949,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, return -EPERM; /* @@ -467,10 +467,10 @@ index 9c97016..8ad0d38 100644 * This leaves us room for future extensions. */ -- -1.8.4.2 +1.8.5.3 -From c340630e68e5ed4d731d60d05ef9e2ae27080b66 Mon Sep 17 00:00:00 2001 +From 31174421a7103571a1c3faf7ba27d4045e5fbc18 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Tue, 3 Sep 2013 11:23:29 -0400 Subject: [PATCH 09/14] uswsusp: Disable when module loading is restricted @@ -485,7 +485,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 4 insertions(+) diff --git a/kernel/power/user.c b/kernel/power/user.c -index 98d3575..efe99de 100644 +index 98d357584cd6..efe99dee9510 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -24,6 +24,7 @@ @@ -507,10 +507,10 @@ index 98d3575..efe99de 100644 if (!atomic_add_unless(&snapshot_device_available, -1, 0)) { -- -1.8.4.2 +1.8.5.3 -From 273deda4ddec360ce67ac256b8cbdabdc5e8c51d Mon Sep 17 00:00:00 2001 +From ea5cf8801db979fa7d5f90ab3faf72eb22490f9b Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 8 Feb 2013 11:12:13 -0800 Subject: [PATCH 10/14] x86: Restrict MSR access when module loading is @@ -527,7 +527,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 1 file changed, 7 insertions(+) diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c -index 05266b5..e2bd647 100644 +index c9603ac80de5..8bef43fc3f40 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c @@ -103,6 +103,9 @@ static ssize_t msr_write(struct file *file, const char __user *buf, @@ -552,10 +552,10 @@ index 05266b5..e2bd647 100644 err = -EFAULT; break; -- -1.8.4.2 +1.8.5.3 -From 089166c0d42f1b82988aad4f23607deb6ee531e7 Mon Sep 17 00:00:00 2001 +From 2985684ff78972bde7ebf1e295b52afd9bea29e0 Mon Sep 17 00:00:00 2001 From: Matthew Garrett <matthew.garrett@nebula.com> Date: Fri, 9 Aug 2013 18:36:30 -0400 Subject: [PATCH 11/14] Add option to automatically enforce module signatures @@ -578,7 +578,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> 7 files changed, 69 insertions(+), 1 deletion(-) diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt -index 199f453..ec38acf 100644 +index 199f453cb4de..ec38acf00b40 100644 --- a/Documentation/x86/zero-page.txt +++ b/Documentation/x86/zero-page.txt @@ -30,6 +30,8 @@ Offset Proto Name Meaning @@ -591,12 +591,12 @@ index 199f453..ec38acf 100644 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures 2D0/A00 ALL e820_map E820 memory map table diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 5216e28..2a147a3 100644 +index 5b8ec0f53b57..085d5eb36361 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1582,6 +1582,16 @@ config EFI_STUB +@@ -1534,6 +1534,16 @@ config EFI_MIXED - See Documentation/efi-stub.txt for more information. + If unsure, say N. +config EFI_SECURE_BOOT_SIG_ENFORCE + def_bool n @@ -612,7 +612,7 @@ index 5216e28..2a147a3 100644 def_bool y prompt "Enable seccomp to safely compute untrusted bytecode" diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index a7677ba..4e172e9 100644 +index 1e6146137f8e..b00745ff398a 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -12,6 +12,7 @@ @@ -623,10 +623,10 @@ index a7677ba..4e172e9 100644 #undef memcpy /* Use memcpy from misc.c */ -@@ -741,6 +742,37 @@ free_mem_map: +@@ -809,6 +810,37 @@ out: + return status; } - +static int get_secure_boot(void) +{ + u8 sb, setup; @@ -659,11 +659,11 @@ index a7677ba..4e172e9 100644 + + /* - * On success we return a pointer to a boot_params structure, and NULL - * on failure. -@@ -760,6 +792,10 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table, - if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) - goto fail; + * See if we have Graphics Output Protocol + */ +@@ -1372,6 +1404,10 @@ struct boot_params *efi_main(struct efi_config *c, + else + setup_boot_services32(efi_early); + sanitize_boot_params(boot_params); + @@ -673,7 +673,7 @@ index a7677ba..4e172e9 100644 setup_efi_pci(boot_params); diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h -index 225b098..90dbfb7 100644 +index 225b0988043a..90dbfb73e11f 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -133,7 +133,8 @@ struct boot_params { @@ -687,10 +687,10 @@ index 225b098..90dbfb7 100644 * The sentinel is set to a nonzero value (0xff) in header.S. * diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index 182b3f9..ab6cc9e 100644 +index 09c76d265550..5a61d732fd5c 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1129,6 +1129,12 @@ void __init setup_arch(char **cmdline_p) +@@ -1142,6 +1142,12 @@ void __init setup_arch(char **cmdline_p) io_delay_init(); @@ -704,10 +704,10 @@ index 182b3f9..ab6cc9e 100644 * Parse the ACPI tables for possible boot-time SMP configuration. */ diff --git a/include/linux/module.h b/include/linux/module.h -index 30702eb..3eb0f52 100644 +index fc9b54eb779e..7377bc851461 100644 --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -190,6 +190,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add); +@@ -188,6 +188,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add); struct notifier_block; @@ -721,10 +721,10 @@ index 30702eb..3eb0f52 100644 extern int modules_disabled; /* for sysctl */ diff --git a/kernel/module.c b/kernel/module.c -index 644c33e..92b73b1 100644 +index 2b9204fe055f..2b8cc2d57c16 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -3832,6 +3832,13 @@ void module_layout(struct module *mod, +@@ -3836,6 +3836,13 @@ void module_layout(struct module *mod, EXPORT_SYMBOL(module_layout); #endif @@ -739,10 +739,10 @@ index 644c33e..92b73b1 100644 { #ifdef CONFIG_MODULE_SIG -- -1.8.4.2 +1.8.5.3 -From e9ad6bd405fa01b7dd52d8c75b9dc91ae52e131d Mon Sep 17 00:00:00 2001 +From b2e4ea728ccab2befbd5fe1bd834881a7dd8f34b Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@redhat.com> Date: Tue, 5 Feb 2013 19:25:05 -0500 Subject: [PATCH 12/14] efi: Disable secure boot if shim is in insecure mode @@ -759,10 +759,10 @@ Signed-off-by: Josh Boyer <jwboyer@redhat.com> 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c -index 4e172e9..4905f4d 100644 +index b00745ff398a..bf42cc5f083d 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c -@@ -744,8 +744,9 @@ free_mem_map: +@@ -812,8 +812,9 @@ out: static int get_secure_boot(void) { @@ -773,7 +773,7 @@ index 4e172e9..4905f4d 100644 efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID; efi_status_t status; -@@ -769,6 +770,23 @@ static int get_secure_boot(void) +@@ -837,6 +838,23 @@ static int get_secure_boot(void) if (setup == 1) return 0; @@ -798,10 +798,10 @@ index 4e172e9..4905f4d 100644 } -- -1.8.4.2 +1.8.5.3 -From f9f355d5e58c1503bb7c03d92c9e89267e0f46ad Mon Sep 17 00:00:00 2001 +From fb418c682d01c447d30b5591a591fdbf33b1334e Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@fedoraproject.org> Date: Tue, 27 Aug 2013 13:28:43 -0400 Subject: [PATCH 13/14] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI @@ -815,11 +815,11 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 2a147a3..9e644d5 100644 +index 085d5eb36361..3e8d398a976d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1583,7 +1583,8 @@ config EFI_STUB - See Documentation/efi-stub.txt for more information. +@@ -1535,7 +1535,8 @@ config EFI_MIXED + If unsure, say N. config EFI_SECURE_BOOT_SIG_ENFORCE - def_bool n @@ -829,10 +829,10 @@ index 2a147a3..9e644d5 100644 ---help--- UEFI Secure Boot provides a mechanism for ensuring that the -- -1.8.4.2 +1.8.5.3 -From a30576a9db583213474b74360c5869e8882e6ed7 Mon Sep 17 00:00:00 2001 +From 87bf357dd4589cfca043ec4b641b912a088b1234 Mon Sep 17 00:00:00 2001 From: Josh Boyer <jwboyer@fedoraproject.org> Date: Tue, 27 Aug 2013 13:33:03 -0400 Subject: [PATCH 14/14] efi: Add EFI_SECURE_BOOT bit @@ -847,31 +847,31 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org> 2 files changed, 3 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index ab6cc9e..99933cd 100644 +index 5a61d732fd5c..23fe9bf3c401 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1131,7 +1131,9 @@ void __init setup_arch(char **cmdline_p) +@@ -1144,7 +1144,9 @@ void __init setup_arch(char **cmdline_p) #ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE if (boot_params.secure_boot) { -+ set_bit(EFI_SECURE_BOOT, &x86_efi_facility); ++ set_bit(EFI_SECURE_BOOT, &efi.flags); enforce_signed_modules(); + pr_info("Secure boot enabled\n"); } #endif diff --git a/include/linux/efi.h b/include/linux/efi.h -index 0a819e7..0c1d367 100644 +index 6c100ff0cae4..3a77a70fff27 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h -@@ -657,6 +657,7 @@ extern int __init efi_setup_pcdp_console(char *); +@@ -899,6 +899,7 @@ extern int __init efi_setup_pcdp_console(char *); #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ #define EFI_64BIT 5 /* Is the firmware 64-bit? */ #define EFI_ARCH_1 6 /* First arch-specific bit */ +#define EFI_SECURE_BOOT 7 /* Are we in Secure Boot mode? */ #ifdef CONFIG_EFI - # ifdef CONFIG_X86 + /* -- -1.8.4.2 +1.8.5.3 @@ -1,3 +1,2 @@ -b621207b3f6ecbb67db18b13258f8ea8 linux-3.14.tar.xz -d36baf2d62de5aa61f10a976d00d2d2a perf-man-3.14.tar.gz -2526eb95793ecc1c22d7e1428ef23cdc patch-3.14.1.xz +97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz +ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz diff --git a/thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch b/thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch new file mode 100644 index 000000000..9f82b7d66 --- /dev/null +++ b/thinkpad_acpi-Add-mappings-for-F9-F12-hotkeys-on-X24.patch @@ -0,0 +1,45 @@ +Bugzilla: N/A +Upstream-status: Sent for 3.16 + +From a02f11f85e2cb2e0aced78913ebcf060d6055203 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Mon, 2 Jun 2014 17:40:58 +0200 +Subject: [PATCH 01/14] thinkpad_acpi: Add mappings for F9 - F12 hotkeys on + X240 / T440 / T540 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The T440s user guide says that when Fn-lock is not active, the *40s' F9 - F12 +keys should be mapped to: control-panel, search, show-all-windows and Computer. + +These keys generate the sofar unused 28 - 31 hotkey scancodes. + +For the first 2 this nicely matches the icons on the keys, for the latter 2 +the icons are somewhat creative, which is why I ended up looking them up in +the user manual. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/thinkpad_acpi.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c +index 15e61c16736e..d82f196e3cfe 100644 +--- a/drivers/platform/x86/thinkpad_acpi.c ++++ b/drivers/platform/x86/thinkpad_acpi.c +@@ -3171,8 +3171,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) + KEY_MICMUTE, /* 0x1a: Mic mute (since ?400 or so) */ + + /* (assignments unknown, please report if found) */ +- KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, + KEY_UNKNOWN, ++ ++ /* Extra keys in use since the X240 / T440 / T540 */ ++ KEY_CONFIG, KEY_SEARCH, KEY_SCALE, KEY_COMPUTER, + }, + }; + +-- +1.9.0 + |