diff --git a/0001-HID-multitouch-enable-the-Surface-3-Type-Cover-to-re.patch b/0001-HID-multitouch-enable-the-Surface-3-Type-Cover-to-re.patch new file mode 100644 index 000000000..37c896420 --- /dev/null +++ b/0001-HID-multitouch-enable-the-Surface-3-Type-Cover-to-re.patch @@ -0,0 +1,99 @@ +From 8fe89ef076fa104f514da6ef61d90f5bf93488e3 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Fri, 25 Nov 2016 14:27:23 +0100 +Subject: [PATCH] HID: multitouch: enable the Surface 3 Type Cover to report + multitouch data + +There is no reasons to filter out keyboard and consumer control collections +in hid-multitouch. +With the previous hid-input fix, there is now a full support of the Type +Cover and we can remove all specific bits from hid-core and hid-microsoft. + +hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we can +also remove it from the list of ushbid quirks. + +Signed-off-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +--- + drivers/hid/hid-core.c | 2 -- + drivers/hid/hid-ids.h | 1 - + drivers/hid/hid-microsoft.c | 2 -- + drivers/hid/hid-multitouch.c | 4 +++- + drivers/hid/usbhid/hid-quirks.c | 1 - + 5 files changed, 3 insertions(+), 7 deletions(-) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index 2b89c70..a5dd7e6 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -728,7 +728,6 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP || +- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 || + hid->product == USB_DEVICE_ID_MS_POWER_COVER) && + hid->group == HID_GROUP_MULTITOUCH) + hid->group = HID_GROUP_GENERIC; +@@ -1984,7 +1983,6 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index 575aa65..10d1535 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -719,7 +719,6 @@ + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2 + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9 +-#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de + #define USB_DEVICE_ID_MS_POWER_COVER 0x07da + + #define USB_VENDOR_ID_MOJO 0x8282 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index c6cd392..ba02667 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -282,8 +282,6 @@ static const struct hid_device_id ms_devices[] = { + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP), + .driver_data = MS_HIDINPUT }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), +- .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD), +diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c +index fb6f1f4..84c56e6 100644 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -842,7 +842,9 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, + if (!td->mtclass.export_all_inputs && + field->application != HID_DG_TOUCHSCREEN && + field->application != HID_DG_PEN && +- field->application != HID_DG_TOUCHPAD) ++ field->application != HID_DG_TOUCHPAD && ++ field->application != HID_GD_KEYBOARD && ++ field->application != HID_CP_CONSUMER_CONTROL) + return -1; + + /* +diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c +index e6cfd32..18ae715 100644 +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -102,7 +102,6 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP, HID_QUIRK_NO_INIT_REPORTS }, +- { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS }, +-- +2.9.3 + diff --git a/0001-Work-around-for-gcc7-and-arm64.patch b/0001-Work-around-for-gcc7-and-arm64.patch new file mode 100644 index 000000000..88f40be5d --- /dev/null +++ b/0001-Work-around-for-gcc7-and-arm64.patch @@ -0,0 +1,62 @@ +From 975dcf140bd307b431aff7b6d671155c796cfe5e Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Sat, 28 Jan 2017 16:13:49 +0100 +Subject: [PATCH] Work around for gcc7 and arm64 + +Originally proposed by Will Deacon + +http://lists.infradead.org/pipermail/linux-arm-kernel/2016-October/462224.html + +Signed-off-by: Laura Abbott +--- + include/linux/log2.h | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) + +diff --git a/include/linux/log2.h b/include/linux/log2.h +index fd7ff3d91e6a..1ab22b79681e 100644 +--- a/include/linux/log2.h ++++ b/include/linux/log2.h +@@ -16,12 +16,6 @@ + #include + + /* +- * deal with unrepresentable constant logarithms +- */ +-extern __attribute__((const, noreturn)) +-int ____ilog2_NaN(void); +- +-/* + * non-constant log of base 2 calculators + * - the arch may override these in asm/bitops.h if they can be implemented + * more efficiently than using fls() and fls64() +@@ -85,7 +79,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + #define ilog2(n) \ + ( \ + __builtin_constant_p(n) ? ( \ +- (n) < 1 ? ____ilog2_NaN() : \ ++ (n) < 1 ? 0 : \ + (n) & (1ULL << 63) ? 63 : \ + (n) & (1ULL << 62) ? 62 : \ + (n) & (1ULL << 61) ? 61 : \ +@@ -149,9 +143,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + (n) & (1ULL << 3) ? 3 : \ + (n) & (1ULL << 2) ? 2 : \ + (n) & (1ULL << 1) ? 1 : \ +- (n) & (1ULL << 0) ? 0 : \ +- ____ilog2_NaN() \ +- ) : \ ++ 0 ) : \ + (sizeof(n) <= 4) ? \ + __ilog2_u32(n) : \ + __ilog2_u64(n) \ +@@ -194,7 +186,6 @@ unsigned long __rounddown_pow_of_two(unsigned long n) + * @n: parameter + * + * The first few values calculated by this routine: +- * ob2(0) = 0 + * ob2(1) = 0 + * ob2(2) = 1 + * ob2(3) = 2 +-- +2.11.0 + diff --git a/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch b/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch new file mode 100644 index 000000000..4d4f0cb0f --- /dev/null +++ b/0001-i2c-bcm2835-Debug-test-for-curr_msg.patch @@ -0,0 +1,29 @@ +From 81c53729ee7c7f721c357ed3b531ebc97ca44051 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Wed, 15 Feb 2017 11:57:57 -0800 +Subject: [PATCH] i2c-bcm2835: Debug test for curr_msg + +Signed-off-by: Eric Anholt +--- + drivers/i2c/busses/i2c-bcm2835.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c +index c3436f627028..a75fab4dd660 100644 +--- a/drivers/i2c/busses/i2c-bcm2835.c ++++ b/drivers/i2c/busses/i2c-bcm2835.c +@@ -195,7 +195,10 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data) + } + + if (val & BCM2835_I2C_S_DONE) { +- if (i2c_dev->curr_msg->flags & I2C_M_RD) { ++ if (!i2c_dev->curr_msg) { ++ dev_info(i2c_dev->dev, ++ "Processing DONE interrupt with no msg\n"); ++ } else if (i2c_dev->curr_msg->flags & I2C_M_RD) { + bcm2835_drain_rxfifo(i2c_dev); + val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S); + } +-- +2.11.0 + diff --git a/0002-HID-multitouch-enable-the-Surface-4-Type-Cover-Pro-J.patch b/0002-HID-multitouch-enable-the-Surface-4-Type-Cover-Pro-J.patch new file mode 100644 index 000000000..40b010bb3 --- /dev/null +++ b/0002-HID-multitouch-enable-the-Surface-4-Type-Cover-Pro-J.patch @@ -0,0 +1,83 @@ +From 4fed0231994b27b3896bc63885ac66d02fff625b Mon Sep 17 00:00:00 2001 +From: Yuta Kobayashi +Date: Mon, 19 Dec 2016 02:36:45 +0000 +Subject: [PATCH] HID: multitouch: enable the Surface 4 Type Cover Pro (JP) to + report multitouch data + +Since commit 8fe89ef076fa1 ("HID: multitouch: enable the Surface 3 Type +Cover to report multitouch data"), the TypeCover can be properly handled +by hid-multitouch and don't require any special quirk in the kernel. + +Remove the support of the Surface 4 Type Cover Pro (JP) from +hid-microsoft so it can properly report multitouch from the touchpad. + +Signed-off-by: Yuta Kobayashi +Reviewed-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +--- + drivers/hid/hid-core.c | 2 -- + drivers/hid/hid-ids.h | 1 - + drivers/hid/hid-microsoft.c | 2 -- + drivers/hid/usbhid/hid-quirks.c | 1 - + 4 files changed, 6 deletions(-) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index cff060b..db87d91 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -729,7 +729,6 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2 || +- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP || + hid->product == USB_DEVICE_ID_MS_POWER_COVER) && + hid->group == HID_GROUP_MULTITOUCH) + hid->group = HID_GROUP_GENERIC; +@@ -1990,7 +1989,6 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index ec277b9..55758f7 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -723,7 +723,6 @@ + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 0x07e4 + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2 0x07e8 +-#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9 + #define USB_DEVICE_ID_MS_POWER_COVER 0x07da + + #define USB_VENDOR_ID_MOJO 0x8282 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index 74b7b84..2b706b5 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -284,8 +284,6 @@ static const struct hid_device_id ms_devices[] = { + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2), + .driver_data = MS_HIDINPUT }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP), +- .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD), +diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c +index b3e01c8..ebb8e95c 100644 +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -105,7 +105,6 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2, HID_QUIRK_NO_INIT_REPORTS }, +- { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS }, +-- +2.9.3 + diff --git a/0003-HID-multitouch-enable-Surface-4-Type-Cover-Pro-non-J.patch b/0003-HID-multitouch-enable-Surface-4-Type-Cover-Pro-non-J.patch new file mode 100644 index 000000000..22bc8b482 --- /dev/null +++ b/0003-HID-multitouch-enable-Surface-4-Type-Cover-Pro-non-J.patch @@ -0,0 +1,88 @@ +From 66e5c5ffc7a5e4d36d136ce4fd8bdb4e92ecec7b Mon Sep 17 00:00:00 2001 +From: Daniel Keller +Date: Tue, 10 Jan 2017 20:39:31 +0100 +Subject: [PATCH] HID: multitouch: enable Surface 4 Type Cover Pro (non-JP) to + report multitouch data + +Nearly identical to the patch "multitouch: enable the Surface 4 Type Cover Pro +(JP) to report multitouch data" + +We can now remove the support of the Surface 4 Type Cover Pro (not JP versions) +from hid-microsoft so it can properly report multi touch from the touchpad. + +Signed-off-by: Daniel Keller +Acked-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +--- + drivers/hid/hid-core.c | 4 ---- + drivers/hid/hid-ids.h | 2 -- + drivers/hid/hid-microsoft.c | 4 ---- + drivers/hid/usbhid/hid-quirks.c | 2 -- + 4 files changed, 12 deletions(-) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index db87d91..1ff9142 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -727,8 +727,6 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) + (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 || + hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP || +- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 || +- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2 || + hid->product == USB_DEVICE_ID_MS_POWER_COVER) && + hid->group == HID_GROUP_MULTITOUCH) + hid->group = HID_GROUP_GENERIC; +@@ -1987,8 +1985,6 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index 55758f7..9d87716 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -721,8 +721,6 @@ + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 0x07dc + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2 + #define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd +-#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 0x07e4 +-#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2 0x07e8 + #define USB_DEVICE_ID_MS_POWER_COVER 0x07da + + #define USB_VENDOR_ID_MOJO 0x8282 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index 2b706b5..d856726 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -280,10 +280,6 @@ static const struct hid_device_id ms_devices[] = { + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP), + .driver_data = MS_HIDINPUT }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4), +- .driver_data = MS_HIDINPUT }, +- { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2), +- .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER), + .driver_data = MS_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD), +diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c +index ebb8e95c..6108649 100644 +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -103,8 +103,6 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS }, +- { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4, HID_QUIRK_NO_INIT_REPORTS }, +- { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_2, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_NEXIO, USB_DEVICE_ID_NEXIO_MULTITOUCH_PTI0750, HID_QUIRK_NO_INIT_REPORTS }, +-- +2.9.3 + diff --git a/ACPI-Limit-access-to-custom_method.patch b/ACPI-Limit-access-to-custom_method.patch deleted file mode 100644 index 38236753e..000000000 --- a/ACPI-Limit-access-to-custom_method.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 4b85149b764cd024e3dd2aff9eb22a9e1aadd1fa Mon Sep 17 00:00:00 2001 -From: Matthew Garrett -Date: Fri, 9 Mar 2012 08:39:37 -0500 -Subject: [PATCH 04/20] ACPI: Limit access to custom_method - -custom_method effectively allows arbitrary access to system memory, making -it possible for an attacker to circumvent restrictions on module loading. -Disable it if any such restrictions have been enabled. - -Signed-off-by: Matthew Garrett ---- - drivers/acpi/custom_method.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c -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, - struct acpi_table_header table; - acpi_status status; - -+ if (secure_modules()) -+ return -EPERM; -+ - if (!(*ppos)) { - /* parse the table header to get the table length */ - if (count <= sizeof(struct acpi_table_header)) --- -2.4.3 - diff --git a/ARM-Drop-fixed-200-Hz-timer-requirement-from-Samsung-platforms.patch b/ARM-Drop-fixed-200-Hz-timer-requirement-from-Samsung-platforms.patch deleted file mode 100644 index bf389545b..000000000 --- a/ARM-Drop-fixed-200-Hz-timer-requirement-from-Samsung-platforms.patch +++ /dev/null @@ -1,88 +0,0 @@ -From patchwork Fri Nov 18 11:15:12 2016 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v3] ARM: Drop fixed 200 Hz timer requirement from Samsung platforms -From: Krzysztof Kozlowski -X-Patchwork-Id: 9436225 -Message-Id: <1479467712-5218-1-git-send-email-krzk@kernel.org> -To: Russell King , Kukjin Kim , - Krzysztof Kozlowski , - Javier Martinez Canillas , - linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, - linux-kernel@vger.kernel.org -Cc: Arnd Bergmann , - Bartlomiej Zolnierkiewicz , - Tomasz Figa , - Ben Dooks , - Sylwester Nawrocki , - Lee Jones , - Marek Szyprowski -Date: Fri, 18 Nov 2016 13:15:12 +0200 - -All Samsung platforms, including the Exynos, are selecting HZ_FIXED with -200 Hz. Unfortunately in case of multiplatform image this affects also -other platforms when Exynos is enabled. - -This looks like an very old legacy code, dating back to initial -upstreaming of S3C24xx. Probably it was required for s3c24xx timer -driver, which was removed in commit ad38bdd15d5b ("ARM: SAMSUNG: Remove -unused plat-samsung/time.c"). - -Since then, this fixed 200 Hz spread everywhere, including out-of-tree -Samsung kernels (SoC vendor's and Tizen's). I believe this choice -was rather an effect of coincidence instead of conscious choice. - -On S3C24xx, the PWM counter is only 16 bit wide, and with the -typical 12MHz input clock that overflows every 5.5ms. This works -with HZ=200 or higher but not with HZ=100 which needs a 10ms -interval between ticks. On Later chips (S3C64xx, S5P and EXYNOS), -the counter is 32 bits and does not have this problem. - -The new samsung_pwm_timer driver solves the problem by scaling the input -clock by a factor of 50 on S3C24xx, which makes it less accurate but -allows HZ=100 as well as CONFIG_NO_HZ with fewer wakeups. - -Few perf mem and sched tests on Odroid XU3 board (Exynos5422, 4x Cortex -A7, 4x Cortex A15) show no regressions when switching from 200 Hz to -other values. - -Reported-by: Lee Jones -[Dropping of 200_HZ from S3C/S5P was suggested by Arnd] -Reported-by: Arnd Bergmann -Signed-off-by: Krzysztof Kozlowski -Cc: Kukjin Kim -[Tested on Exynos5800] -Tested-by: Javier Martinez Canillas -Acked-by: Kukjin Kim -[Tested on S3C2440] -Tested-by: Sylwester Nawrocki ---- - -Changes since v2: -1. Extend message. -2. Add Kukjin's ack. -3. Add Sylwester's tested-by. - -Changes since v1: -1. Add Javier's tested-by. -2. Drop HZ_FIXED also from ARCH_S5PV210 and ARCH_S3C24XX after Arnd - suggestions and analysis. ---- - arch/arm/Kconfig | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index b5d529fdffab..ced2e08a9d08 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -1496,8 +1496,7 @@ source kernel/Kconfig.preempt - - config HZ_FIXED - int -- default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \ -- ARCH_S5PV210 || ARCH_EXYNOS4 -+ default 200 if ARCH_EBSA110 - default 128 if SOC_AT91RM9200 - default 0 - diff --git a/ARM-OMAP4-Fix-crashes.patch b/ARM-OMAP4-Fix-crashes.patch deleted file mode 100644 index 5a4a257e1..000000000 --- a/ARM-OMAP4-Fix-crashes.patch +++ /dev/null @@ -1,46 +0,0 @@ -From patchwork Wed Oct 26 15:17:01 2016 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [3/5] ARM: OMAP4+: Fix bad fallthrough for cpuidle -From: Tony Lindgren -X-Patchwork-Id: 9397501 -Message-Id: <20161026151703.24730-4-tony@atomide.com> -To: linux-omap@vger.kernel.org -Cc: Nishanth Menon , Dmitry Lifshitz , - Dave Gerlach , - Enric Balletbo Serra , - "Dr . H . Nikolaus Schaller" , - Pau Pajuel , Grazvydas Ignotas , - Benoit Cousson , - Santosh Shilimkar , - Javier Martinez Canillas , - Robert Nelson , - Marek Belisko , linux-arm-kernel@lists.infradead.org -Date: Wed, 26 Oct 2016 08:17:01 -0700 - -We don't want to fall through to a bunch of errors for retention -if PM_OMAP4_CPU_OSWR_DISABLE is not configured for a SoC. - -Fixes: 6099dd37c669 ("ARM: OMAP5 / DRA7: Enable CPU RET on suspend") -Signed-off-by: Tony Lindgren ---- - arch/arm/mach-omap2/omap-mpuss-lowpower.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c ---- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c -+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c -@@ -244,10 +244,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) - save_state = 1; - break; - case PWRDM_POWER_RET: -- if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) { -+ if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) - save_state = 0; -- break; -- } -+ break; - default: - /* - * CPUx CSWR is invalid hardware state. Also CPUx OSWR diff --git a/Add-EFI-signature-data-types.patch b/Add-EFI-signature-data-types.patch index c376c48b3..40d14f949 100644 --- a/Add-EFI-signature-data-types.patch +++ b/Add-EFI-signature-data-types.patch @@ -19,8 +19,8 @@ index 5af91b58afae..190858d62fe3 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -603,6 +603,9 @@ void efi_native_runtime_setup(void); - #define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95) #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) + #define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) +#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28) +#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72) diff --git a/Add-option-to-automatically-enforce-module-signature.patch b/Add-option-to-automatically-enforce-module-signature.patch index aa1983377..ebabac62e 100644 --- a/Add-option-to-automatically-enforce-module-signature.patch +++ b/Add-option-to-automatically-enforce-module-signature.patch @@ -1,8 +1,8 @@ -From 0000dc9edd5997cc49b8893a9d5407f89dfa1307 Mon Sep 17 00:00:00 2001 +From 6b6203b92cfb457a0669a9c87a29b360405bffc6 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 18:36:30 -0400 -Subject: [PATCH] Add option to automatically enforce module signatures when in - Secure Boot mode +Subject: [PATCH 10/20] Add option to automatically enforce module signatures + when in Secure Boot mode UEFI Secure Boot provides a mechanism for ensuring that the firmware will only load signed bootloaders and kernels. Certain use cases may also @@ -34,10 +34,10 @@ index 95a4d34af3fd..b8527c6b7646 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 0a7b885964ba..29b8ba9ae713 100644 +index bada636d1065..d666ef8b616c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1776,6 +1776,17 @@ config EFI_MIXED +@@ -1786,6 +1786,17 @@ config EFI_MIXED If unsure, say N. @@ -56,7 +56,7 @@ index 0a7b885964ba..29b8ba9ae713 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 52fef606bc54..6b8b9a775b46 100644 +index cc69e37548db..ebc85c1eefd6 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -12,6 +12,7 @@ @@ -67,7 +67,7 @@ index 52fef606bc54..6b8b9a775b46 100644 #include "../string.h" #include "eboot.h" -@@ -571,6 +572,67 @@ free_handle: +@@ -537,6 +538,67 @@ static void setup_efi_pci(struct boot_params *params) efi_call_early(free_pool, pci_handle); } @@ -135,7 +135,7 @@ index 52fef606bc54..6b8b9a775b46 100644 static efi_status_t setup_uga32(void **uga_handle, unsigned long size, u32 *width, u32 *height) { -@@ -1126,6 +1188,10 @@ struct boot_params *efi_main(struct efi_config *c, +@@ -1094,6 +1156,10 @@ struct boot_params *efi_main(struct efi_config *c, else setup_boot_services32(efi_early); @@ -161,10 +161,10 @@ index c18ce67495fa..2b3e5427097b 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 c4e7b3991b60..bdb9881c7afd 100644 +index bbfbca5fea0c..d40e961753c9 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c -@@ -1152,6 +1152,12 @@ void __init setup_arch(char **cmdline_p) +@@ -1160,6 +1160,12 @@ void __init setup_arch(char **cmdline_p) io_delay_init(); @@ -178,10 +178,10 @@ index c4e7b3991b60..bdb9881c7afd 100644 * Parse the ACPI tables for possible boot-time SMP configuration. */ diff --git a/include/linux/module.h b/include/linux/module.h -index 082298a09df1..38d0597f7615 100644 +index 05bd6c989a0c..32327704e18d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h -@@ -273,6 +273,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add); +@@ -260,6 +260,12 @@ extern const typeof(name) __mod_##type##__##name##_device_table \ struct notifier_block; @@ -195,10 +195,10 @@ index 082298a09df1..38d0597f7615 100644 extern int modules_disabled; /* for sysctl */ diff --git a/kernel/module.c b/kernel/module.c -index 3c384968f553..ea484f3a35b2 100644 +index cb864505d020..cb1f1da69bf4 100644 --- a/kernel/module.c +++ b/kernel/module.c -@@ -4200,6 +4200,13 @@ void module_layout(struct module *mod, +@@ -4285,6 +4285,13 @@ void module_layout(struct module *mod, EXPORT_SYMBOL(module_layout); #endif @@ -213,5 +213,5 @@ index 3c384968f553..ea484f3a35b2 100644 { #ifdef CONFIG_MODULE_SIG -- -2.5.5 +2.9.3 diff --git a/Add-secure_modules-call.patch b/Add-secure_modules-call.patch deleted file mode 100644 index 99d04c43e..000000000 --- a/Add-secure_modules-call.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 80d2d273b36b33d46820ab128c7a5b068389f643 Mon Sep 17 00:00:00 2001 -From: Matthew Garrett -Date: Fri, 9 Aug 2013 17:58:15 -0400 -Subject: [PATCH 01/20] Add secure_modules() call - -Provide a single call to allow kernel code to determine whether the system -has been configured to either disable module loading entirely or to load -only modules signed with a trusted key. - -Bugzilla: N/A -Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd - -Signed-off-by: Matthew Garrett ---- - include/linux/module.h | 6 ++++++ - kernel/module.c | 10 ++++++++++ - 2 files changed, 16 insertions(+) - -diff --git a/include/linux/module.h b/include/linux/module.h -index 0c3207d26ac0..05bd6c989a0c 100644 ---- a/include/linux/module.h -+++ b/include/linux/module.h -@@ -641,6 +641,8 @@ static inline bool is_livepatch_module(struct module *mod) - } - #endif /* CONFIG_LIVEPATCH */ - -+extern bool secure_modules(void); -+ - #else /* !CONFIG_MODULES... */ - - static inline struct module *__module_address(unsigned long addr) -@@ -750,6 +752,10 @@ static inline bool module_requested_async_probing(struct module *module) - return false; - } - -+static inline bool secure_modules(void) -+{ -+ return false; -+} - #endif /* CONFIG_MODULES */ - - #ifdef CONFIG_SYSFS -diff --git a/kernel/module.c b/kernel/module.c -index f57dd63186e6..cb864505d020 100644 ---- a/kernel/module.c -+++ b/kernel/module.c -@@ -4284,3 +4284,13 @@ void module_layout(struct module *mod, - } - EXPORT_SYMBOL(module_layout); - #endif -+ -+bool secure_modules(void) -+{ -+#ifdef CONFIG_MODULE_SIG -+ return (sig_enforce || modules_disabled); -+#else -+ return modules_disabled; -+#endif -+} -+EXPORT_SYMBOL(secure_modules); --- -2.9.3 - diff --git a/Add-sysrq-option-to-disable-secure-boot-mode.patch b/Add-sysrq-option-to-disable-secure-boot-mode.patch deleted file mode 100644 index 4600848cf..000000000 --- a/Add-sysrq-option-to-disable-secure-boot-mode.patch +++ /dev/null @@ -1,246 +0,0 @@ -From 16d2ba5d5bc46e67e6aa7a3d113fbcc18c217388 Mon Sep 17 00:00:00 2001 -From: Kyle McMartin -Date: Fri, 30 Aug 2013 09:28:51 -0400 -Subject: [PATCH 20/20] Add sysrq option to disable secure boot mode - -Bugzilla: N/A -Upstream-status: Fedora mustard ---- - arch/x86/kernel/setup.c | 36 ++++++++++++++++++++++++++++++++++++ - drivers/input/misc/uinput.c | 1 + - drivers/tty/sysrq.c | 19 +++++++++++++------ - include/linux/input.h | 5 +++++ - include/linux/sysrq.h | 8 +++++++- - kernel/debug/kdb/kdb_main.c | 2 +- - kernel/module.c | 2 +- - 7 files changed, 64 insertions(+), 9 deletions(-) - -diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c -index f93826b8522c..41679b1aca83 100644 ---- a/arch/x86/kernel/setup.c -+++ b/arch/x86/kernel/setup.c -@@ -70,6 +70,11 @@ - #include - #include - -+#include -+#include -+#include -+#include -+ - #include