diff --git a/patches/4.19/0001-surface3-power.patch b/patches/4.19/0001-surface3-power.patch index 2059656fa..e5941c8f3 100644 --- a/patches/4.19/0001-surface3-power.patch +++ b/patches/4.19/0001-surface3-power.patch @@ -1,4 +1,4 @@ -From 4ad8416c8ace84a2178e7c9c74fc312938cd3052 Mon Sep 17 00:00:00 2001 +From 30eab94cb03ffd0b3746c86f7799e7c7878ae751 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 28 Sep 2019 18:00:43 +0200 Subject: [PATCH] platform/x86: Surface 3 battery platform operation region diff --git a/patches/4.19/0002-surface3-touchscreen-dma-fix.patch b/patches/4.19/0002-surface3-touchscreen-dma-fix.patch index d48cf365c..78ad07c7a 100644 --- a/patches/4.19/0002-surface3-touchscreen-dma-fix.patch +++ b/patches/4.19/0002-surface3-touchscreen-dma-fix.patch @@ -1,4 +1,4 @@ -From b89dcbd909f25b77e082c01878f0043136080b32 Mon Sep 17 00:00:00 2001 +From 51fff19063114133a8ed4a56c317037c640f5be6 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Sun, 5 Jul 2020 14:56:20 +0300 Subject: [PATCH] dmaengine: dw: Initialize channel before each transfer diff --git a/patches/4.19/0003-surface3-oemb.patch b/patches/4.19/0003-surface3-oemb.patch index d8e818769..190adac7f 100644 --- a/patches/4.19/0003-surface3-oemb.patch +++ b/patches/4.19/0003-surface3-oemb.patch @@ -1,4 +1,4 @@ -From 24c5d2953fba7ce34cee2fe04a952b6320ea65fd Mon Sep 17 00:00:00 2001 +From be8dd019e9f17e5a9018f03db85b13be6e9d8212 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 18 Oct 2020 16:42:44 +0900 Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI diff --git a/patches/4.19/0004-surface-buttons.patch b/patches/4.19/0004-surface-buttons.patch index 6b2c78526..3ab441b53 100644 --- a/patches/4.19/0004-surface-buttons.patch +++ b/patches/4.19/0004-surface-buttons.patch @@ -1,4 +1,4 @@ -From 164f71c58d9e749aac8f224ae921d0291f610a14 Mon Sep 17 00:00:00 2001 +From 1d63613b6e3f4ca13d96c5fa375bd9c270fc0f2f Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Jul 2019 17:51:37 +0200 Subject: [PATCH] platform/x86: surfacepro3_button: Fix device check @@ -92,7 +92,7 @@ index 1b491690ce07..96627627060e 100644 -- 2.30.0 -From e03cfc89890740a9753dafbb7c350dce089fc18c Mon Sep 17 00:00:00 2001 +From cdd3030d3cdee20d9477c6522a56f0dc875b42ee Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Jul 2019 17:52:01 +0200 Subject: [PATCH] Input: soc_button_array - Add support for newer surface @@ -297,7 +297,7 @@ index 55cd6e0b409c..8f21c062c85d 100644 -- 2.30.0 -From 6a3340c6a13d4e455cd2bfbf9b8005ddd82a4f29 Mon Sep 17 00:00:00 2001 +From c19c5a278f22965fedac76a926407b0ed034ccff Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 5 Oct 2019 14:11:58 +0200 Subject: [PATCH] Input: soc_button_array - partial revert of support for newer @@ -386,7 +386,7 @@ index 8f21c062c85d..5983733d78dd 100644 -- 2.30.0 -From 1ea5e656241b4a73d19e36294ba497ed20ed5ff3 Mon Sep 17 00:00:00 2001 +From 8d02c182a7416657ac7cd3a11a3125570b594cd9 Mon Sep 17 00:00:00 2001 From: "Tsuchiya Yuto (kitakar5525)" Date: Mon, 11 May 2020 17:40:21 +0900 Subject: [PATCH] Input: soc_button_array - fix Wdiscarded-qualifiers for diff --git a/patches/4.19/0005-suspend.patch b/patches/4.19/0005-suspend.patch index 9796c0008..a30d2deac 100644 --- a/patches/4.19/0005-suspend.patch +++ b/patches/4.19/0005-suspend.patch @@ -1,4 +1,4 @@ -From b28dbc1767a284b9c0642e800fb4d51edcc5d2e2 Mon Sep 17 00:00:00 2001 +From 07c7027154d488b008f76ca6ecba7e05cb309387 Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Sat, 28 Sep 2019 17:48:21 +0200 Subject: [PATCH] nvme: Backport changes for suspend diff --git a/patches/4.19/0006-ipts.patch b/patches/4.19/0006-ipts.patch index f7af694db..d387f9db1 100644 --- a/patches/4.19/0006-ipts.patch +++ b/patches/4.19/0006-ipts.patch @@ -1,4 +1,4 @@ -From 0cd68a0afc47d225acdc5f1c986fbd86bb0179b8 Mon Sep 17 00:00:00 2001 +From 78148d031e16508b47487d916268515c28eb654e Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 28 Sep 2019 17:58:17 +0200 Subject: [PATCH] Add support for Intel IPTS touch devices diff --git a/patches/4.19/0007-wifi.patch b/patches/4.19/0007-wifi.patch index dcc92d17f..e28e33b2e 100644 --- a/patches/4.19/0007-wifi.patch +++ b/patches/4.19/0007-wifi.patch @@ -1,4 +1,4 @@ -From 345b633710f6a488cfa0e8ce7e8ccf29e61056d7 Mon Sep 17 00:00:00 2001 +From faf432cf6ea117bf9c7e25feaebd4efb64cd0967 Mon Sep 17 00:00:00 2001 From: Chuhong Yuan Date: Wed, 24 Jul 2019 19:27:45 +0800 Subject: [PATCH] mwifiex: pcie: Use dev_get_drvdata @@ -49,7 +49,7 @@ index 991b9cc18000..2aa0436d3548 100644 -- 2.30.0 -From d87ae0a3b5419e678131a58eb7dfdb640344765d Mon Sep 17 00:00:00 2001 +From 7939aa61d01657948ba1802de7496e4dc9209860 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Thu, 24 Sep 2020 18:02:06 +0900 Subject: [PATCH] mwifiex: pcie: skip cancel_work_sync() on reset failure path @@ -206,7 +206,7 @@ index f7ce9b6db6b4..72d0c01ff359 100644 -- 2.30.0 -From 53148831bcda1c40877b3ed3e55a50639e2c1995 Mon Sep 17 00:00:00 2001 +From c8ddca25de458eef013c4eea1902cb5997fc4be3 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Mon, 28 Sep 2020 17:46:49 +0900 Subject: [PATCH] mwifiex: pcie: add DMI-based quirk impl for Surface devices @@ -414,7 +414,7 @@ index 000000000000..5326ae7e5671 -- 2.30.0 -From e6e1a8916ae5a6eb492437263ee6e0970a7af5af Mon Sep 17 00:00:00 2001 +From 09de9741d492fdcd2179c2e5bab633994dcd0cdf Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Tue, 29 Sep 2020 17:25:22 +0900 Subject: [PATCH] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+ @@ -615,7 +615,7 @@ index 5326ae7e5671..8b9dcb5070d8 100644 -- 2.30.0 -From ce8ea8570c74a658c189b6fecafda627671f6503 Mon Sep 17 00:00:00 2001 +From ef14b99712d098811a158e96301ca12f08fe4119 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Tue, 29 Sep 2020 17:32:22 +0900 Subject: [PATCH] mwifiex: pcie: add reset_wsid quirk for Surface 3 @@ -794,7 +794,7 @@ index 8b9dcb5070d8..3ef7440418e3 100644 -- 2.30.0 -From c32e5849f6f5f94273efc6ea8c86674140d31b13 Mon Sep 17 00:00:00 2001 +From 7c48ac9c9a00a66df5084d3f39027ce3eb10ac7b Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Wed, 30 Sep 2020 18:08:24 +0900 Subject: [PATCH] mwifiex: pcie: (OEMB) add quirk for Surface 3 with broken DMI @@ -856,7 +856,7 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644 -- 2.30.0 -From 3fdfbcaaa80eff3948c4f902e031ccdd80b921d4 Mon Sep 17 00:00:00 2001 +From 275ef787d33f7d2bdbae87846dcf95b466c76ae5 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Thu, 24 Sep 2020 01:56:34 +0900 Subject: [PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on @@ -998,7 +998,7 @@ index 290427c98630..d80eb18fb0d1 100644 -- 2.30.0 -From 7509f5bae9899f70d29a94155a2ee509785883a0 Mon Sep 17 00:00:00 2001 +From 4b234d1787dda86fe087ccbdb38a31e392986a90 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Mon, 24 Aug 2020 17:11:35 +0900 Subject: [PATCH] mwifiex: pcie: add enable_device_dump module parameter @@ -1047,7 +1047,7 @@ index d80eb18fb0d1..ea766584d3b7 100644 -- 2.30.0 -From 1f919fc07501a8569a66a4d72b43a674e3a7a5c1 Mon Sep 17 00:00:00 2001 +From 942bea1df79dcf86be5ac05e233fdceec95ff275 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:11:49 +0900 Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+ @@ -1202,7 +1202,7 @@ index 3ef7440418e3..a95ebac06e13 100644 -- 2.30.0 -From 48e3389396407d0da842bfddc5a142710f0e1039 Mon Sep 17 00:00:00 2001 +From 6baf41b41ea6572a4e1ef0d984868e8adbb5f8a0 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:25:48 +0900 Subject: [PATCH] mwifiex: add allow_ps_mode module parameter @@ -1264,7 +1264,7 @@ index 650191db25cb..dd1f08a2325f 100644 -- 2.30.0 -From 16194a2e0197aa6b1cb57bcbe48fbf24e0c21d38 Mon Sep 17 00:00:00 2001 +From 2d60a4ae1a6a376b497369a8d7940d491bfb0619 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:38:48 +0900 Subject: [PATCH] mwifiex: print message when changing ps_mode @@ -1299,7 +1299,7 @@ index dd1f08a2325f..ee88da92b97c 100644 -- 2.30.0 -From 3092e29bdcd374a43d4407282c9c251c10cde2cb Mon Sep 17 00:00:00 2001 +From f014d9a6dbd8b94156b27e2af3f27a2e3e2a2ede Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:59:37 +0900 Subject: [PATCH] mwifiex: disable ps_mode explicitly by default instead diff --git a/patches/4.19/0008-surface-gpe.patch b/patches/4.19/0008-surface-gpe.patch index 1c09b3966..785719bde 100644 --- a/patches/4.19/0008-surface-gpe.patch +++ b/patches/4.19/0008-surface-gpe.patch @@ -1,4 +1,4 @@ -From 0d6c8807a8096fa70add8ce0e6a85d4beaed37e2 Mon Sep 17 00:00:00 2001 +From 7b663b34e8a2ebbe4d89107cfd06a5470c064c34 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 16 Aug 2020 23:39:56 +0200 Subject: [PATCH] platform/x86: Add Driver to set up lid GPEs on MS Surface @@ -33,8 +33,8 @@ Patchset: surface-gpe --- drivers/platform/x86/Kconfig | 9 + drivers/platform/x86/Makefile | 1 + - drivers/platform/x86/surface_gpe.c | 314 +++++++++++++++++++++++++++++ - 3 files changed, 324 insertions(+) + drivers/platform/x86/surface_gpe.c | 313 +++++++++++++++++++++++++++++ + 3 files changed, 323 insertions(+) create mode 100644 drivers/platform/x86/surface_gpe.c diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig @@ -71,10 +71,10 @@ index 2ea90039a3e4..49238e9d4abf 100644 obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \ diff --git a/drivers/platform/x86/surface_gpe.c b/drivers/platform/x86/surface_gpe.c new file mode 100644 -index 000000000000..247558cdd6c1 +index 000000000000..7eaaeacbf408 --- /dev/null +++ b/drivers/platform/x86/surface_gpe.c -@@ -0,0 +1,314 @@ +@@ -0,0 +1,313 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Surface GPE/Lid driver to enable wakeup from suspend via the lid by @@ -206,7 +206,7 @@ index 000000000000..247558cdd6c1 + .ident = "Surface Laptop 3 (Intel 13\")", + .matches = { + /* -+ * We match for SKU here due to different vairants: The ++ * We match for SKU here due to different variants: The + * AMD (15") version does not rely on GPEs. + */ + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), @@ -218,7 +218,7 @@ index 000000000000..247558cdd6c1 + .ident = "Surface Laptop 3 (Intel 15\")", + .matches = { + /* -+ * We match for SKU here due to different vairants: The ++ * We match for SKU here due to different variants: The + * AMD (15") version does not rely on GPEs. + */ + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), @@ -246,8 +246,7 @@ index 000000000000..247558cdd6c1 + return 0; +} + -+ -+static int surface_gpe_suspend(struct device *dev) ++static int __maybe_unused surface_gpe_suspend(struct device *dev) +{ + const struct surface_lid_device *lid; + @@ -255,7 +254,7 @@ index 000000000000..247558cdd6c1 + return surface_lid_enable_wakeup(dev, lid, true); +} + -+static int surface_gpe_resume(struct device *dev) ++static int __maybe_unused surface_gpe_resume(struct device *dev) +{ + const struct surface_lid_device *lid; + diff --git a/patches/4.19/0009-surface-sam-over-hid.patch b/patches/4.19/0009-surface-sam-over-hid.patch index fd8d2e4d7..2ac66be12 100644 --- a/patches/4.19/0009-surface-sam-over-hid.patch +++ b/patches/4.19/0009-surface-sam-over-hid.patch @@ -1,4 +1,4 @@ -From c351e96db12ba663f2d3d905d6b124dc47ab9426 Mon Sep 17 00:00:00 2001 +From aadd201e4dc578d324e59663bf587effd547147a Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 25 Jul 2020 17:19:53 +0200 Subject: [PATCH] i2c: acpi: Implement RawBytes read access @@ -109,7 +109,7 @@ index 8ba4122fb340..f9a24b56fec0 100644 -- 2.30.0 -From a756823bc840736cff7c55e262cacb55520527a7 Mon Sep 17 00:00:00 2001 +From b6fd7d9754c9e3f807d623b2dbbce1a92b2bcbd8 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 6 Sep 2020 04:01:19 +0200 Subject: [PATCH] platform/x86: Add driver for Surface Book 1 dGPU switch diff --git a/patches/4.19/0010-surface-sam.patch b/patches/4.19/0010-surface-sam.patch index 924f041f8..28c32ec65 100644 --- a/patches/4.19/0010-surface-sam.patch +++ b/patches/4.19/0010-surface-sam.patch @@ -1,4 +1,4 @@ -From c3deca5d30353ee6dd93d953492179e8dd2b5b17 Mon Sep 17 00:00:00 2001 +From d914b20c1665945b5dd78cee9d77bb8249ce5af0 Mon Sep 17 00:00:00 2001 From: qzed Date: Mon, 26 Aug 2019 01:15:40 +0200 Subject: [PATCH] ACPI: Fix buffer/integer type mismatch @@ -81,7 +81,7 @@ index b272c329d45d..cf547883a993 100644 -- 2.30.0 -From bb40c876925210f219b8217f8d416aff5fddd31b Mon Sep 17 00:00:00 2001 +From cebc1d5c70f3b345ae6dbbcfafcdfd60aee9829d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 24 Sep 2019 17:38:12 +0200 Subject: [PATCH] serdev: Add ACPI devices by ResourceSource field @@ -269,7 +269,7 @@ index c66a04d24f1d..1b18d12d217f 100644 -- 2.30.0 -From acb73eea2a31fd1f4fee63e6887a78f2d5f1a5e2 Mon Sep 17 00:00:00 2001 +From 5db077b084b80addad351b6590fef740ead2c80c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 17 Aug 2020 01:23:20 +0200 Subject: [PATCH] misc: surface_sam: Add file2alias support for Surface SAM @@ -371,7 +371,7 @@ index 7f40b6aab689..76e3b1d7db45 100644 -- 2.30.0 -From da2809033cbcc921dff8c52d0c48019d9a48028f Mon Sep 17 00:00:00 2001 +From de35235f6cba8c6f4a99de3b8a937fec133c4379 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 17 Aug 2020 01:44:30 +0200 Subject: [PATCH] misc: Add support for Surface System Aggregator Module @@ -409,7 +409,7 @@ Patchset: surface-sam .../misc/surface_aggregator/clients/Kconfig | 134 + .../misc/surface_aggregator/clients/Makefile | 10 + .../clients/surface_acpi_notify.c | 886 ++++++ - .../clients/surface_aggregator_cdev.c | 303 ++ + .../clients/surface_aggregator_cdev.c | 322 +++ .../clients/surface_aggregator_registry.c | 616 ++++ .../clients/surface_battery.c | 1164 ++++++++ .../surface_aggregator/clients/surface_dtx.c | 1275 ++++++++ @@ -419,11 +419,11 @@ Patchset: surface-sam drivers/misc/surface_aggregator/controller.h | 285 ++ drivers/misc/surface_aggregator/core.c | 851 ++++++ drivers/misc/surface_aggregator/ssh_msgb.h | 205 ++ - .../surface_aggregator/ssh_packet_layer.c | 2057 +++++++++++++ + .../surface_aggregator/ssh_packet_layer.c | 2074 +++++++++++++ .../surface_aggregator/ssh_packet_layer.h | 190 ++ drivers/misc/surface_aggregator/ssh_parser.c | 228 ++ drivers/misc/surface_aggregator/ssh_parser.h | 155 + - .../surface_aggregator/ssh_request_layer.c | 1264 ++++++++ + .../surface_aggregator/ssh_request_layer.c | 1263 ++++++++ .../surface_aggregator/ssh_request_layer.h | 143 + drivers/misc/surface_aggregator/trace.h | 632 ++++ include/linux/mod_devicetable.h | 5 +- @@ -435,7 +435,7 @@ Patchset: surface-sam include/uapi/linux/surface_aggregator/dtx.h | 146 + scripts/mod/devicetable-offsets.c | 3 +- scripts/mod/file2alias.c | 10 +- - 47 files changed, 19110 insertions(+), 7 deletions(-) + 47 files changed, 19145 insertions(+), 7 deletions(-) create mode 100644 Documentation/driver-api/surface_aggregator/client-api.rst create mode 100644 Documentation/driver-api/surface_aggregator/client.rst create mode 100644 Documentation/driver-api/surface_aggregator/clients/cdev.rst @@ -3667,7 +3667,7 @@ index 000000000000..4249af06d738 +obj-$(CONFIG_SURFACE_PERFMODE) += surface_perfmode.o diff --git a/drivers/misc/surface_aggregator/clients/surface_acpi_notify.c b/drivers/misc/surface_aggregator/clients/surface_acpi_notify.c new file mode 100644 -index 000000000000..8cd67a669c86 +index 000000000000..ef9c1f8e8336 --- /dev/null +++ b/drivers/misc/surface_aggregator/clients/surface_acpi_notify.c @@ -0,0 +1,886 @@ @@ -3861,7 +3861,7 @@ index 000000000000..8cd67a669c86 + union acpi_object *obj; + int status = 0; + -+ if (!acpi_check_dsm(san, &SAN_DSM_UUID, SAN_DSM_REVISION, 1 << func)) ++ if (!acpi_check_dsm(san, &SAN_DSM_UUID, SAN_DSM_REVISION, BIT_ULL(func))) + return 0; + + dev_dbg(dev, "notify event %#04llx\n", func); @@ -4559,10 +4559,10 @@ index 000000000000..8cd67a669c86 +MODULE_LICENSE("GPL"); diff --git a/drivers/misc/surface_aggregator/clients/surface_aggregator_cdev.c b/drivers/misc/surface_aggregator/clients/surface_aggregator_cdev.c new file mode 100644 -index 000000000000..bd8f6f106cdd +index 000000000000..cad859e1402d --- /dev/null +++ b/drivers/misc/surface_aggregator/clients/surface_aggregator_cdev.c -@@ -0,0 +1,303 @@ +@@ -0,0 +1,322 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Provides user-space access to the SSAM EC via the /dev/surface/aggregator @@ -4631,8 +4631,8 @@ index 000000000000..bd8f6f106cdd +{ + struct ssam_cdev_request __user *r; + struct ssam_cdev_request rqst; -+ struct ssam_request spec; -+ struct ssam_response rsp; ++ struct ssam_request spec = {}; ++ struct ssam_response rsp = {}; + const void __user *plddata; + void __user *rspdata; + int status = 0, ret = 0, tmp; @@ -4671,6 +4671,15 @@ index 000000000000..bd8f6f106cdd + goto out; + } + ++ /* ++ * Note: spec.length is limited to U16_MAX bytes via struct ++ * ssam_cdev_request. This is slightly larger than the ++ * theoretical maximum (SSH_COMMAND_MAX_PAYLOAD_SIZE) of the ++ * underlying protocol (note that nothing remotely this size ++ * should ever be allocated in any normal case). This size is ++ * validated later in ssam_request_sync(), for allocation the ++ * bound imposed by u16 should be enough. ++ */ + spec.payload = kzalloc(spec.length, GFP_KERNEL); + if (!spec.payload) { + ret = -ENOMEM; @@ -4690,6 +4699,16 @@ index 000000000000..bd8f6f106cdd + goto out; + } + ++ /* ++ * Note: rsp.capacity is limited to U16_MAX bytes via struct ++ * ssam_cdev_request. This is slightly larger than the ++ * theoretical maximum (SSH_COMMAND_MAX_PAYLOAD_SIZE) of the ++ * underlying protocol (note that nothing remotely this size ++ * should ever be allocated in any normal case). In later use, ++ * this capacity does not have to be strictly bounded, as it ++ * is only used as an output buffer to be written to. For ++ * allocation the bound imposed by u16 should be enough. ++ */ + rsp.pointer = kzalloc(rsp.capacity, GFP_KERNEL); + if (!rsp.pointer) { + ret = -ENOMEM; @@ -12928,10 +12947,10 @@ index 000000000000..1221f642dda1 +#endif /* _SURFACE_AGGREGATOR_SSH_MSGB_H */ diff --git a/drivers/misc/surface_aggregator/ssh_packet_layer.c b/drivers/misc/surface_aggregator/ssh_packet_layer.c new file mode 100644 -index 000000000000..9323d038eade +index 000000000000..9f18310f4c26 --- /dev/null +++ b/drivers/misc/surface_aggregator/ssh_packet_layer.c -@@ -0,0 +1,2057 @@ +@@ -0,0 +1,2074 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * SSH packet transport layer. @@ -14628,7 +14647,24 @@ index 000000000000..9323d038eade + /* Find SYN. */ + syn_found = sshp_find_syn(source, &aligned); + -+ if (unlikely(aligned.ptr - source->ptr) > 0) { ++ if (unlikely(aligned.ptr != source->ptr)) { ++ /* ++ * We expect aligned.ptr == source->ptr. If this is not the ++ * case, then aligned.ptr > source->ptr and we've encountered ++ * some unexpected data where we'd expect the start of a new ++ * message (i.e. the SYN sequence). ++ * ++ * This can happen when a CRC check for the previous message ++ * failed and we start actively searching for the next one ++ * (via the call to sshp_find_syn() above), or the first bytes ++ * of a message got dropped or corrupted. ++ * ++ * In any case, we issue a warning, send a NAK to the EC to ++ * request re-transmission of any data we haven't acknowledged ++ * yet, and finally, skip everything up to the next SYN ++ * sequence. ++ */ ++ + ptl_warn(ptl, "rx: parser: invalid start of frame, skipping\n"); + + /* @@ -15582,10 +15618,10 @@ index 000000000000..395c61ef890b +#endif /* _SURFACE_AGGREGATOR_SSH_PARSER_h */ diff --git a/drivers/misc/surface_aggregator/ssh_request_layer.c b/drivers/misc/surface_aggregator/ssh_request_layer.c new file mode 100644 -index 000000000000..bb1c862411a2 +index 000000000000..52a83a8fcf82 --- /dev/null +++ b/drivers/misc/surface_aggregator/ssh_request_layer.c -@@ -0,0 +1,1264 @@ +@@ -0,0 +1,1263 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * SSH request transport layer. @@ -16592,9 +16628,8 @@ index 000000000000..bb1c862411a2 + * + * Initializes the given request transport layer and associated packet + * transport layer. Transmitter and receiver threads must be started -+ * separately via ssh_rtl_tx_start() and ssh_rtl_rx_start(), after the -+ * request-layer has been initialized and the lower-level serial device layer -+ * has been set up. ++ * separately via ssh_rtl_start(), after the request-layer has been ++ * initialized and the lower-level serial device layer has been set up. + * + * Return: Returns zero on success and a nonzero error code on failure. + */ @@ -16644,7 +16679,7 @@ index 000000000000..bb1c862411a2 +} + +/** -+ * ssh_rtl_tx_start() - Start request transmitter and receiver. ++ * ssh_rtl_start() - Start request transmitter and receiver. + * @rtl: The request transport layer. + * + * Return: Returns zero on success, a negative error code on failure. diff --git a/patches/4.19/0011-surface-hotplug.patch b/patches/4.19/0011-surface-hotplug.patch index 1b4b81913..12bf9ccb9 100644 --- a/patches/4.19/0011-surface-hotplug.patch +++ b/patches/4.19/0011-surface-hotplug.patch @@ -1,4 +1,4 @@ -From bfbf37b4ee0a8acc66bcb44f7005fafe8409e563 Mon Sep 17 00:00:00 2001 +From b63983a6536a99be8da444149232adc6a8d5e6c2 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Tue, 31 Jul 2018 07:50:37 +0200 Subject: [PATCH] PCI: pciehp: Differentiate between surprise and safe removal @@ -197,7 +197,7 @@ index 5c58c22e0c08..18f83e554c73 100644 -- 2.30.0 -From ab630da8e9b4c1605507163f41e1c4bf94a5c4e1 Mon Sep 17 00:00:00 2001 +From f235e14a8a90af341b58041555d2f2eedcfcf46e Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 19 Aug 2018 16:29:00 +0200 Subject: [PATCH] PCI: pciehp: Drop unnecessary includes @@ -336,7 +336,7 @@ index 18f83e554c73..c512b2ed85ed 100644 -- 2.30.0 -From 57ed9ebf739a684fc07854461b3dd3390cee7e9c Mon Sep 17 00:00:00 2001 +From d2f8db35b8a57856afecb7eac3939e228ede6a38 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 19 Aug 2018 16:29:00 +0200 Subject: [PATCH] PCI: pciehp: Drop hotplug_slot_ops wrappers @@ -549,7 +549,7 @@ index d4b7049cbc70..576362d0b1cd 100644 -- 2.30.0 -From 32ce1635a6062bde6a52582db4f9bdb2c636da1e Mon Sep 17 00:00:00 2001 +From 130b0053672f79bb9afc3dbfe7ef0e93114aa176 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sat, 8 Sep 2018 09:59:01 +0200 Subject: [PATCH] PCI: pciehp: Tolerate Presence Detect hardwired to zero @@ -747,7 +747,7 @@ index 576362d0b1cd..7f4173d6771a 100644 -- 2.30.0 -From 044442a987b5d792225b49b030e84d47ed5879c4 Mon Sep 17 00:00:00 2001 +From c10f22ffa0b0bb52c0bcef1b261e4e2173bd2d91 Mon Sep 17 00:00:00 2001 From: Patrick Talbert Date: Wed, 5 Sep 2018 09:12:53 +0200 Subject: [PATCH] PCI/ASPM: Do not initialize link state when aspm_disabled is @@ -792,7 +792,7 @@ index cb474338f39d..18aa830e79e4 100644 -- 2.30.0 -From abff87ad330d90c610a310513d01c811ed7c7da7 Mon Sep 17 00:00:00 2001 +From 5e68e471040f1e81e9374ac2da3cf2439997d1ec Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 19 Aug 2018 16:29:00 +0200 Subject: [PATCH] PCI: Simplify disconnected marking @@ -878,7 +878,7 @@ index 2c3b5bd59b18..dee5a7507403 100644 -- 2.30.0 -From 91b22fc2bc50aa69c72e2ec2c86becf7059fa257 Mon Sep 17 00:00:00 2001 +From c53dc649b8cb265ef4d409d43a1dec2aec4c4f17 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Tue, 18 Sep 2018 21:46:17 +0200 Subject: [PATCH] PCI: pciehp: Unify controller and slot structs @@ -2070,7 +2070,7 @@ index 8da87931bd45..b9c1396db6fe 100644 -- 2.30.0 -From 7ee1a60edd7be00847e3291b93c685e4ab924d43 Mon Sep 17 00:00:00 2001 +From 66568278cc479142e079bbd8f42e7304e22b67a6 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sat, 8 Sep 2018 09:59:01 +0200 Subject: [PATCH] PCI: pciehp: Rename controller struct members for clarity @@ -2377,7 +2377,7 @@ index 4a17d71e15d3..e4d6ec960630 100644 -- 2.30.0 -From ef5932209964db3ec69436c65fff3f0fc7395053 Mon Sep 17 00:00:00 2001 +From f2b741a4e0b8b35bdb59e993dae758f61c5088b5 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sat, 8 Sep 2018 09:59:01 +0200 Subject: [PATCH] PCI: pciehp: Reshuffle controller struct for clarity @@ -2508,7 +2508,7 @@ index 2499489158cc..df82a0335515 100644 -- 2.30.0 -From 5a08d940f1ec6b3917c8be023b22fa91c89e3320 Mon Sep 17 00:00:00 2001 +From b2b5683cb9c5e7a04b7eb116f3ceecfcc33367a0 Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Thu, 20 Sep 2018 10:27:17 -0600 Subject: [PATCH] PCI: Make link active reporting detection generic @@ -2705,7 +2705,7 @@ index ec6c48ecd7d5..74c8e9190fed 100644 -- 2.30.0 -From 5c63429e93d24eee648ff642ef83e5660630ff2e Mon Sep 17 00:00:00 2001 +From df496c591f4b1c0fa77f732d2aaaf67d45444546 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:53:53 -0500 Subject: [PATCH] PCI: Do not skip power-managed bridges in pci_enable_wake() @@ -2756,7 +2756,7 @@ index 25b0fe79420f..6a0dc12187ed 100644 -- 2.30.0 -From d8d56d7e2d6c87af53b533eabc61f633ee54c88b Mon Sep 17 00:00:00 2001 +From aebee92343c39b3104b8dcbe6ac24b84e8b6b5b6 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:38:19 -0500 Subject: [PATCH] PCI: pciehp: Disable hotplug interrupt during suspend @@ -2870,7 +2870,7 @@ index 0693870a9e24..b5c7f5ef597a 100644 -- 2.30.0 -From bb65a7473f622cc641aae0ae5d6dbd3f7396389a Mon Sep 17 00:00:00 2001 +From 22444a6c9e7dc204d10bc7df7afa9f302f9a2c1d Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:41:46 -0500 Subject: [PATCH] PCI: pciehp: Do not handle events if interrupts are masked @@ -2912,7 +2912,7 @@ index b5c7f5ef597a..242b9f30210a 100644 -- 2.30.0 -From f0587a4b841bae2c6934988de1dd7090ba0c57a3 Mon Sep 17 00:00:00 2001 +From 6c84300d115a3b0e3a74a773f686834665e29efe Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:41:47 -0500 Subject: [PATCH] PCI/portdrv: Resume upon exit from system suspend if left @@ -2965,7 +2965,7 @@ index 23a5a0c2c3fe..5badf8a1ce0a 100644 -- 2.30.0 -From ff824119245a462236d1731da487904047757c33 Mon Sep 17 00:00:00 2001 +From a4f6dff3069f9e7de10e93e8b19f263deddbf902 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:41:48 -0500 Subject: [PATCH] PCI/portdrv: Add runtime PM hooks for port service drivers @@ -3077,7 +3077,7 @@ index 5badf8a1ce0a..59d2567e2db2 100644 -- 2.30.0 -From 523d1309d38ec2e9f75832c83fca120595236628 Mon Sep 17 00:00:00 2001 +From 4e6fea38d9539ae22de646bc11c74db56c5b39eb Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:41:49 -0500 Subject: [PATCH] PCI: pciehp: Implement runtime PM callbacks @@ -3134,7 +3134,7 @@ index 8e6e4ce869fb..e5de25ebc4cf 100644 -- 2.30.0 -From adbcb31a8d4c0959ffeae2f7282f7f4fd90ea6a9 Mon Sep 17 00:00:00 2001 +From 66ee2bafce6e1d4a57d40566aa769654b672889b Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:57:05 -0500 Subject: [PATCH] ACPI / property: Allow multiple property compatible _DSD @@ -3429,7 +3429,7 @@ index 019468f072b7..2b2d92863923 100644 -- 2.30.0 -From 4e2ada09abc597178ae7d856a39c03bc784d523e Mon Sep 17 00:00:00 2001 +From 6fd470c78b119778c26d33b66d077768071deae8 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 27 Sep 2018 16:57:14 -0500 Subject: [PATCH] PCI / ACPI: Whitelist D3 for more PCIe hotplug ports @@ -3594,7 +3594,7 @@ index e9ede82ee2c2..0a5efc437bd1 100644 -- 2.30.0 -From 82fedcaa0b1a1df171dd43254e1a127f24eee1dc Mon Sep 17 00:00:00 2001 +From 6a9cb4adc9b9977b96ebb3bfa24781227134f25e Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 7 Jan 2019 16:09:40 +0300 Subject: [PATCH] PCI: pciehp: Assign ctrl->slot_ctrl before writing it to @@ -3648,7 +3648,7 @@ index 242b9f30210a..7074d4923811 100644 -- 2.30.0 -From a12443edbf1c2ff466dc9fb3504d3f5c6d677cd2 Mon Sep 17 00:00:00 2001 +From 9930b5f74a80ab2726eb9bc9b5fb5867f6e11155 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 31 Jan 2019 20:07:46 +0300 Subject: [PATCH] PCI: pciehp: Disable Data Link Layer State Changed event on @@ -3737,7 +3737,7 @@ index 7074d4923811..a37ff79a6e9e 100644 -- 2.30.0 -From c709748ba18558f170a32f0cbf56d530d5281a4b Mon Sep 17 00:00:00 2001 +From 41a48a80db0ef8735680192fffb47ceee80990a1 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 29 Oct 2020 22:04:38 +0100 Subject: [PATCH] PCI: Allow D3cold for hot-plug ports on Surface Books @@ -3822,7 +3822,7 @@ index c5fd51d7f153..737d3a34e623 100644 -- 2.30.0 -From 52d6af3dfb293684ececb72d93760b2b6d0e2701 Mon Sep 17 00:00:00 2001 +From 1e986e86d95c2363e37159d761aaa174dedd4762 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 9 Nov 2020 14:23:00 +0100 Subject: [PATCH] PCI: Run platform power transition on initial D0 entry @@ -3884,7 +3884,7 @@ index 737d3a34e623..f72651684719 100644 -- 2.30.0 -From 3b12ba3d4bd50356e6c78ed35f2d6fcdac072d8b Mon Sep 17 00:00:00 2001 +From 721822b3add605c0c14ccfdad7610cbc8001e6e7 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 31 Oct 2020 20:46:33 +0100 Subject: [PATCH] PCI: Add sysfs attribute for PCI device power state @@ -3957,7 +3957,7 @@ index 1edf5a1836ea..ee1518650d55 100644 -- 2.30.0 -From cd5eb64a111baefdc75546e7bbf023983864b9a2 Mon Sep 17 00:00:00 2001 +From 7d15e2ca136be1ee071b72a973ee0be15da1651d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 14 Dec 2020 20:50:59 +0100 Subject: [PATCH] platform/x86: Add Surface Hotplug driver diff --git a/patches/4.19/0012-surface-typecover.patch b/patches/4.19/0012-surface-typecover.patch index c44b659e8..b9d0f12b3 100644 --- a/patches/4.19/0012-surface-typecover.patch +++ b/patches/4.19/0012-surface-typecover.patch @@ -1,4 +1,4 @@ -From 5515e2db7798cbf0510b63f3908c1ada8ba17a83 Mon Sep 17 00:00:00 2001 +From 2be72e4746293200781294991ebf26ef9af95bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 5 Nov 2020 13:09:45 +0100 Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when diff --git a/pkg/arch/kernel-lts/PKGBUILD b/pkg/arch/kernel-lts/PKGBUILD index 4a1aeb27a..4f2ee5474 100644 --- a/pkg/arch/kernel-lts/PKGBUILD +++ b/pkg/arch/kernel-lts/PKGBUILD @@ -44,18 +44,18 @@ sha256sums=('dd0d0264f8ef4363d0080054fd344470a73f07aca2cd673e91bf6e77fbe25b4a' '4e68572e7cc4c5368f0236e0792660ae8498373988625dca46e509399a7eaea6' 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2' 'a019c4c93bb35d007ab47824f5f9aa542a4c9645563012c1a7dfb542d8adcc1b' - '6ee27b4b4223f9fa0ee6c0539bab876819f6887963a784115f5cd4f6df45e5d0' - 'c8591d271b2c54498b985c846e3683a9e2f64d14698a7a768e8047b19c001c86' - '5898be0466295503ba1e993c34dd4e372c5b0900a31a9c61e77816c9e5ff67f4' - '6a9abdf7a56b78df5484239750637c59ce1af8c7c94dc90e079980a9ab8e85df' - '4fe0b851838d4423d8d5cb1aa3363e66d0a6579136be00eb3b776d3656ce6312' - '7ff5e6e2ab1d1c1484729d2cceea8c70a83fc1f4faeda601ac460a5cd380ed66' - 'fde268a68d87133bd7a54f809c595e5c3d07073dab72eb70128d33d9b1f0153e' - 'ad7cacfa849b8221d10dc228e6793c4094e2940e828b78aac754162f4a91c28a' - '2abf877d692b73b6866c87e6abd514c67f5181b39ee53dcb34429c2fdea5056b' - 'fa48d02b774b48773d904d205b4a93a0c92c14a073a6c828e9f7a3969e13bc87' - '6bd32d0c5896c4838ed79a3a8ce81e2290e0b6a1e39372f72079b912e97001c4' - 'a61357f8028af537250478416d2f5b3c8ce007381c4379377930b8997bedce44') + '07bec3964b4aa87e4858c434ca48614dffa2cceb452d2740a99eb42266b1a8ea' + '9bd2176186347f5b2ce4f9c5dcadb26a517801190b243efd958532ac7196d7e5' + 'b877825c9099b99a79b8439ce47a5339022d1e8d0ca7dee36b2bec5563809aa5' + 'cf7128510876ff545e593d5c9a672b40bccdcb456a4bd7b605fc71daeee6e58c' + '0bc6764317bb059329a2b89b7d185d9a0703bc0df4cbd055b728465955e65367' + '00c964842f428f60d6e91c8aebc92c7b98e01cc128c092d022584f7bace7ba23' + '7f09a75ee2d4ca24abc2cf5b7d54cf5828830775d2932f76e4f9512d74289ae1' + '75afe838e071a97222efe00849018d4af23598fb1fc41b383df4c6af7a81fbf4' + 'e62d0d0a4deecd317e7b1340245232132f974c85148fffa356d7d7e0b0d5dfc1' + '6884bc842bbd56faadb088a29d7a5c2c1d2bc7ebcc61724bda9b3c0688f154a0' + 'd6cddef1c43fec9d72d5be47e693b7293c44e410943af586c68ea70e20464dd8' + '11e0a77f55fabcb087350239bd9cc3e105a78c2db3e894f78adceaf1c3cacde9') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase