From 4afc32034d9118ed2826e6f49caa1dbe0ef7be55 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 13 Nov 2014 13:55:54 -0500 Subject: [PATCH] Add patch for MS Surface Pro 3 Type Cover (rhbz 1135338) --- ...port-for-MS-Surface-Pro-3-Type-Cover.patch | 84 +++++++++++++++++++ ...clear_user-handle-exceptions-on-strb.patch | 1 - kernel.spec | 7 ++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch diff --git a/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch b/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch new file mode 100644 index 000000000..b4276610d --- /dev/null +++ b/HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch @@ -0,0 +1,84 @@ +From: Alan Wu +Date: Mon, 3 Nov 2014 18:26:12 -0800 +Subject: [PATCH] HID: add support for MS Surface Pro 3 Type Cover + +Surface Pro 3 Type Cover that works with Ubuntu (and possibly Arch) from this thread. Both trackpad and keyboard work after compiling my own kernel. +http://ubuntuforums.org/showthread.php?t=2231207&page=2&s=44910e0c56047e4f93dfd9fea58121ef + +Also includes Jarrad Whitaker's message which sources +http://winaero.com/blog/how-to-install-linux-on-surface-pro-3/ +which he says is sourced from a Russian site + +Signed-off-by: Alan Wu +Signed-off-by: Jiri Kosina +--- + drivers/hid/hid-core.c | 6 ++++++ + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-microsoft.c | 2 ++ + drivers/hid/usbhid/hid-quirks.c | 1 + + 4 files changed, 10 insertions(+) + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index 73bd9e2e42bc..e94afcc19eda 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -702,6 +702,11 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type) + if (((parser->global.usage_page << 16) == HID_UP_SENSOR) && + type == HID_COLLECTION_PHYSICAL) + hid->group = HID_GROUP_SENSOR_HUB; ++ ++ if (hid->vendor == USB_VENDOR_ID_MICROSOFT && ++ hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 && ++ hid->group == HID_GROUP_MULTITOUCH) ++ hid->group = HID_GROUP_GENERIC; + } + + static int hid_scan_main(struct hid_parser *parser, struct hid_item *item) +@@ -1861,6 +1866,7 @@ static const struct hid_device_id hid_have_special_driver[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) }, + { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index e23ab8b30626..15f32c22178c 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -648,6 +648,7 @@ + #define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799 + #define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7 + #define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9 ++#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07dc + + #define USB_VENDOR_ID_MOJO 0x8282 + #define USB_DEVICE_ID_RETRO_ADAPTER 0x3201 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c +index 8ba17a946f2a..cacda43f6a6f 100644 +--- a/drivers/hid/hid-microsoft.c ++++ b/drivers/hid/hid-microsoft.c +@@ -274,6 +274,8 @@ static const struct hid_device_id ms_devices[] = { + .driver_data = MS_NOGET }, + { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_MOUSE_4500), + .driver_data = MS_DUPLICATE_USAGES }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), ++ .driver_data = MS_HIDINPUT }, + + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT), + .driver_data = MS_PRESENTER }, +diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c +index 5014bb567b29..cebfaf288bd3 100644 +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -77,6 +77,7 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_NOGET }, ++ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, 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 }, + { USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE, HID_QUIRK_NO_INIT_REPORTS }, +-- +1.9.3 + diff --git a/arm64-__clear_user-handle-exceptions-on-strb.patch b/arm64-__clear_user-handle-exceptions-on-strb.patch index 3fd69bc6c..199da5e7c 100644 --- a/arm64-__clear_user-handle-exceptions-on-strb.patch +++ b/arm64-__clear_user-handle-exceptions-on-strb.patch @@ -1,4 +1,3 @@ -From 98e676789aa06582cb0d0f7758e77864b38c12a7 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Wed, 12 Nov 2014 16:07:44 -0500 Subject: [PATCH] arm64: __clear_user: handle exceptions on strb diff --git a/kernel.spec b/kernel.spec index c635d5807..880fc4079 100644 --- a/kernel.spec +++ b/kernel.spec @@ -625,6 +625,9 @@ Patch26067: net-sctp-fix-NULL-pointer-dereference-in-af-from_add.patch #CVE-2014-7843 rhbz 1163744 1163745 Patch26069: arm64-__clear_user-handle-exceptions-on-strb.patch +#rhbz 1135338 +Patch26070: HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1359,6 +1362,9 @@ ApplyPatch net-sctp-fix-NULL-pointer-dereference-in-af-from_add.patch #CVE-2014-7843 rhbz 1163744 1163745 ApplyPatch arm64-__clear_user-handle-exceptions-on-strb.patch +#rhbz 1135338 +ApplyPatch HID-add-support-for-MS-Surface-Pro-3-Type-Cover.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2228,6 +2234,7 @@ fi # || || %changelog * Thu Nov 13 2014 Josh Boyer +- Add patch for MS Surface Pro 3 Type Cover (rhbz 1135338) - CVE-2014-7843 aarch64: copying from /dev/zero causes local DoS (rhbz 1163744 1163745) * Thu Nov 13 2014 Josh Boyer - 3.18.0-0.rc4.git1.1