|
@@ -1,4 +1,4 @@
|
|
|
-From e5396b65d0a5db6ffad8ffd9290217c34aa5fb6a Mon Sep 17 00:00:00 2001
|
|
|
+From 5b765606600d1f4a4581f4d8d5f3cee0acfa0222 Mon Sep 17 00:00:00 2001
|
|
|
From: qzed <qzed@users.noreply.github.com>
|
|
|
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.29.2
|
|
|
|
|
|
-From 98e7c4795fe586f76f3800c200d91f94b94988f8 Mon Sep 17 00:00:00 2001
|
|
|
+From 80f09b969e7decca3d838608b39798d7df2015e2 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
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.29.2
|
|
|
|
|
|
-From 59903a6f376692bc4400f26a70223ce8efb52571 Mon Sep 17 00:00:00 2001
|
|
|
+From b1f7f5ecda45cf0cdf7366e255ff62b3b5dd3bab Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Tue, 31 Jul 2018 07:50:37 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Differentiate between surprise and safe removal
|
|
@@ -468,7 +468,7 @@ index 5c58c22e0c08..18f83e554c73 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 705add1ff08aa86accb5ca7616f401f481ced186 Mon Sep 17 00:00:00 2001
|
|
|
+From ec007174866d6553dd4dbc05000c3aec18c2cce0 Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sun, 19 Aug 2018 16:29:00 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Drop unnecessary includes
|
|
@@ -607,7 +607,7 @@ index 18f83e554c73..c512b2ed85ed 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From e6974b233a290d13909f6919fc8e4c95da3b7e7c Mon Sep 17 00:00:00 2001
|
|
|
+From 6bed3010f06ec3de55589f9c4f87da381556e68a Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sun, 19 Aug 2018 16:29:00 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Drop hotplug_slot_ops wrappers
|
|
@@ -820,7 +820,7 @@ index d4b7049cbc70..576362d0b1cd 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 7d0738319b444c496478de604bf671962dbca9da Mon Sep 17 00:00:00 2001
|
|
|
+From 0e77f201b68315d587d733f62f8794e783f639c8 Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sat, 8 Sep 2018 09:59:01 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Tolerate Presence Detect hardwired to zero
|
|
@@ -1018,7 +1018,7 @@ index 576362d0b1cd..7f4173d6771a 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 7e9a7201ec48619094e26251a84428e273a9fb28 Mon Sep 17 00:00:00 2001
|
|
|
+From db19cd7660e7b86b1e7a98facce9075ef2611bd9 Mon Sep 17 00:00:00 2001
|
|
|
From: Patrick Talbert <ptalbert@redhat.com>
|
|
|
Date: Wed, 5 Sep 2018 09:12:53 +0200
|
|
|
Subject: [PATCH] PCI/ASPM: Do not initialize link state when aspm_disabled is
|
|
@@ -1063,7 +1063,7 @@ index cb474338f39d..18aa830e79e4 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 5669402f43f49197d35a1a6656fd6ab9d5de1a8d Mon Sep 17 00:00:00 2001
|
|
|
+From 05f15ec4b4f1511f2d78187f473e271f01de3448 Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sun, 19 Aug 2018 16:29:00 +0200
|
|
|
Subject: [PATCH] PCI: Simplify disconnected marking
|
|
@@ -1149,7 +1149,7 @@ index 2c3b5bd59b18..dee5a7507403 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 8ecc289079e5f3b6f3880d31406f015e2f1d7576 Mon Sep 17 00:00:00 2001
|
|
|
+From 42267ed19f917bbb893f7ece8ef8b665c325614a Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Tue, 18 Sep 2018 21:46:17 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Unify controller and slot structs
|
|
@@ -2341,7 +2341,7 @@ index 8da87931bd45..b9c1396db6fe 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From bdb3c9c2e2c6cc604e4b08538f6d3145c73d8b13 Mon Sep 17 00:00:00 2001
|
|
|
+From 7376862298dd04db15cd47fd118c5b9684586514 Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sat, 8 Sep 2018 09:59:01 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Rename controller struct members for clarity
|
|
@@ -2648,7 +2648,7 @@ index 4a17d71e15d3..e4d6ec960630 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 918f28611928ad1d248d6d2a076858414b0f02fb Mon Sep 17 00:00:00 2001
|
|
|
+From 22bcc013e7b2b088ce8e25ee3afc7e4c0061c136 Mon Sep 17 00:00:00 2001
|
|
|
From: Lukas Wunner <lukas@wunner.de>
|
|
|
Date: Sat, 8 Sep 2018 09:59:01 +0200
|
|
|
Subject: [PATCH] PCI: pciehp: Reshuffle controller struct for clarity
|
|
@@ -2779,7 +2779,7 @@ index 2499489158cc..df82a0335515 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 8d8f50f10db4c1fd6bd8f07c7e3a5e5c0b934c3e Mon Sep 17 00:00:00 2001
|
|
|
+From 35e37226b70209617ef7bd069dad161ce8c3c5d4 Mon Sep 17 00:00:00 2001
|
|
|
From: Keith Busch <keith.busch@intel.com>
|
|
|
Date: Thu, 20 Sep 2018 10:27:17 -0600
|
|
|
Subject: [PATCH] PCI: Make link active reporting detection generic
|
|
@@ -2976,7 +2976,7 @@ index ec6c48ecd7d5..74c8e9190fed 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 5e95ad37389c12aff9587734ebb68750026234d7 Mon Sep 17 00:00:00 2001
|
|
|
+From cce3e2ba3b4c515d56ae5f86bec00720414efc54 Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:53:53 -0500
|
|
|
Subject: [PATCH] PCI: Do not skip power-managed bridges in pci_enable_wake()
|
|
@@ -3027,7 +3027,7 @@ index 99292b338401..2898b7c1ac4b 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 8f3ebf19d5a222171f13bdf5609917aff243e461 Mon Sep 17 00:00:00 2001
|
|
|
+From 1c9ea78b5ebc7ae099c17ef5c9fd27d27933499e Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:38:19 -0500
|
|
|
Subject: [PATCH] PCI: pciehp: Disable hotplug interrupt during suspend
|
|
@@ -3141,7 +3141,7 @@ index 0693870a9e24..b5c7f5ef597a 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From ee4527979ffd3e8233e646fa9fc0489b515e4fea Mon Sep 17 00:00:00 2001
|
|
|
+From 13ac0b84b553164de367e2c4c5e24d4a4b26a290 Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:41:46 -0500
|
|
|
Subject: [PATCH] PCI: pciehp: Do not handle events if interrupts are masked
|
|
@@ -3183,7 +3183,7 @@ index b5c7f5ef597a..242b9f30210a 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 904c645dfbc3561571e83466c37405d0596f0744 Mon Sep 17 00:00:00 2001
|
|
|
+From f88e87e0086832691a59ac344650f9d62228205a Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:41:47 -0500
|
|
|
Subject: [PATCH] PCI/portdrv: Resume upon exit from system suspend if left
|
|
@@ -3236,7 +3236,7 @@ index 23a5a0c2c3fe..5badf8a1ce0a 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 457fdf1cbc4dedb77510da9782a67ada2ef47ca1 Mon Sep 17 00:00:00 2001
|
|
|
+From 7e6f65431bf894e32b9add76543009191206ab9c Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:41:48 -0500
|
|
|
Subject: [PATCH] PCI/portdrv: Add runtime PM hooks for port service drivers
|
|
@@ -3348,7 +3348,7 @@ index 5badf8a1ce0a..59d2567e2db2 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From d6d430577d1761fd648f6f8830b5f484f636495b Mon Sep 17 00:00:00 2001
|
|
|
+From a928f3d4878d165894ebadf90e2801684d9a9189 Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:41:49 -0500
|
|
|
Subject: [PATCH] PCI: pciehp: Implement runtime PM callbacks
|
|
@@ -3405,7 +3405,7 @@ index 8e6e4ce869fb..e5de25ebc4cf 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From d8bca9ae8cb084e39851819309ba001ad86a6d93 Mon Sep 17 00:00:00 2001
|
|
|
+From 836f1081726d3e88c23ac278ea25042bc380684d Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:57:05 -0500
|
|
|
Subject: [PATCH] ACPI / property: Allow multiple property compatible _DSD
|
|
@@ -3700,7 +3700,7 @@ index cd412817654f..4e2e30e340fe 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 733f9fb9c82bef870602742234425e8086489b9f Mon Sep 17 00:00:00 2001
|
|
|
+From e45b7d8bd12193b28cefa6e021604e7ac4da0982 Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 27 Sep 2018 16:57:14 -0500
|
|
|
Subject: [PATCH] PCI / ACPI: Whitelist D3 for more PCIe hotplug ports
|
|
@@ -3865,7 +3865,7 @@ index e9ede82ee2c2..0a5efc437bd1 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From fdcc28601697d39255b44928cfd4f209c9a89997 Mon Sep 17 00:00:00 2001
|
|
|
+From a011a4594f53cdf3768f20e75fa6eee4b45b2d1c Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Mon, 7 Jan 2019 16:09:40 +0300
|
|
|
Subject: [PATCH] PCI: pciehp: Assign ctrl->slot_ctrl before writing it to
|
|
@@ -3919,7 +3919,7 @@ index 242b9f30210a..7074d4923811 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 3d155f1fbae37bff815ae3f9ec5c3370ddcc4ec0 Mon Sep 17 00:00:00 2001
|
|
|
+From 76fbb3688703c915072cf3d0d651f80b93ff1cc5 Mon Sep 17 00:00:00 2001
|
|
|
From: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
|
Date: Thu, 31 Jan 2019 20:07:46 +0300
|
|
|
Subject: [PATCH] PCI: pciehp: Disable Data Link Layer State Changed event on
|
|
@@ -4008,7 +4008,7 @@ index 7074d4923811..a37ff79a6e9e 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 30fd6451a7e698ca9737934ae5b342a37ec82485 Mon Sep 17 00:00:00 2001
|
|
|
+From c6f38cf4e34845ff08a3868ea24cde5308a85a0b Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Thu, 29 Oct 2020 22:04:38 +0100
|
|
|
Subject: [PATCH] PCI: Allow D3cold for hot-plug ports on Surface Books
|
|
@@ -4093,7 +4093,7 @@ index b53a6772ee09..70af1713767f 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 8988054398da2c235fca6474a35f0823365e17f6 Mon Sep 17 00:00:00 2001
|
|
|
+From ea00c70ff6887960f6971a592c9ac5240607d256 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 9 Nov 2020 14:23:00 +0100
|
|
|
Subject: [PATCH] PCI: Run platform power transition on initial D0 entry
|
|
@@ -4155,7 +4155,7 @@ index 70af1713767f..18caa27c774f 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From 4d21b52ee8ecea64a6fcbf9c352ee16fecdc24d3 Mon Sep 17 00:00:00 2001
|
|
|
+From 36d4ae2bffc6fbbedd6c583dd06d6d5fb3608dfe Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 31 Oct 2020 20:46:33 +0100
|
|
|
Subject: [PATCH] PCI: Add sysfs attribute for PCI device power state
|
|
@@ -4229,7 +4229,7 @@ index 1edf5a1836ea..ee1518650d55 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From b55b8c88e1961416ce386643cfa6698753c6f224 Mon Sep 17 00:00:00 2001
|
|
|
+From 2fdf98a4df1bd4ff0dc0d3cde6b79b41e75bc88e Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 17 Aug 2020 01:23:20 +0200
|
|
|
Subject: [PATCH] misc: surface_sam: Add file2alias support for Surface SAM
|
|
@@ -4331,7 +4331,7 @@ index 7f40b6aab689..76e3b1d7db45 100644
|
|
|
--
|
|
|
2.29.2
|
|
|
|
|
|
-From f29a2d6c5a4b458e6e3e6b9d36564944e6bf7a4f Mon Sep 17 00:00:00 2001
|
|
|
+From 962851e79728652618f82d7997966be7b436ee38 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Mon, 17 Aug 2020 01:44:30 +0200
|
|
|
Subject: [PATCH] misc: Add support for Surface System Aggregator Module
|
|
@@ -4371,7 +4371,7 @@ Patchset: surface-sam
|
|
|
.../clients/surface_acpi_notify.c | 886 ++++++
|
|
|
.../clients/surface_aggregator_cdev.c | 299 ++
|
|
|
.../clients/surface_aggregator_registry.c | 606 ++++
|
|
|
- .../clients/surface_battery.c | 1184 ++++++++
|
|
|
+ .../clients/surface_battery.c | 1174 ++++++++
|
|
|
.../surface_aggregator/clients/surface_dtx.c | 1275 +++++++++
|
|
|
.../surface_aggregator/clients/surface_hid.c | 918 ++++++
|
|
|
.../clients/surface_hotplug.c | 267 ++
|
|
@@ -4380,12 +4380,12 @@ Patchset: surface-sam
|
|
|
drivers/misc/surface_aggregator/controller.h | 285 ++
|
|
|
drivers/misc/surface_aggregator/core.c | 845 ++++++
|
|
|
drivers/misc/surface_aggregator/ssh_msgb.h | 205 ++
|
|
|
- .../surface_aggregator/ssh_packet_layer.c | 2055 +++++++++++++
|
|
|
- .../surface_aggregator/ssh_packet_layer.h | 188 ++
|
|
|
+ .../surface_aggregator/ssh_packet_layer.c | 2046 +++++++++++++
|
|
|
+ .../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 | 1265 ++++++++
|
|
|
- .../surface_aggregator/ssh_request_layer.h | 141 +
|
|
|
+ .../surface_aggregator/ssh_request_layer.c | 1256 ++++++++
|
|
|
+ .../surface_aggregator/ssh_request_layer.h | 143 +
|
|
|
drivers/misc/surface_aggregator/trace.h | 632 ++++
|
|
|
include/linux/mod_devicetable.h | 5 +-
|
|
|
include/linux/surface_acpi_notify.h | 39 +
|
|
@@ -4396,7 +4396,7 @@ Patchset: surface-sam
|
|
|
include/uapi/linux/surface_aggregator/dtx.h | 146 +
|
|
|
scripts/mod/devicetable-offsets.c | 3 +-
|
|
|
scripts/mod/file2alias.c | 10 +-
|
|
|
- 48 files changed, 18811 insertions(+), 7 deletions(-)
|
|
|
+ 48 files changed, 18787 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
|
|
@@ -8926,10 +8926,10 @@ index 000000000000..a18f85dd6881
|
|
|
+MODULE_LICENSE("GPL");
|
|
|
diff --git a/drivers/misc/surface_aggregator/clients/surface_battery.c b/drivers/misc/surface_aggregator/clients/surface_battery.c
|
|
|
new file mode 100644
|
|
|
-index 000000000000..c26993cf1b1c
|
|
|
+index 000000000000..6c38eda26aea
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/clients/surface_battery.c
|
|
|
-@@ -0,0 +1,1184 @@
|
|
|
+@@ -0,0 +1,1174 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
|
+/*
|
|
|
+ * Surface battery and AC device driver.
|
|
@@ -9379,26 +9379,16 @@ index 000000000000..c26993cf1b1c
|
|
|
+
|
|
|
+static int spwr_battery_recheck_adapter(struct spwr_battery_device *bat)
|
|
|
+{
|
|
|
-+ u32 full_cap = sprw_battery_get_full_cap_safe(bat);
|
|
|
-+ u32 remaining_cap = get_unaligned_le32(&bat->bst.remaining_cap);
|
|
|
-+
|
|
|
-+ if (full_cap == 0 || full_cap == SPWR_BATTERY_VALUE_UNKNOWN)
|
|
|
-+ return 0;
|
|
|
-+
|
|
|
-+ if (remaining_cap == SPWR_BATTERY_VALUE_UNKNOWN)
|
|
|
-+ return 0;
|
|
|
-+
|
|
|
+ /*
|
|
|
-+ * Handle battery update quirk:
|
|
|
-+ * When the battery is fully charged and the adapter is plugged in or
|
|
|
-+ * removed, the EC does not send a separate event for the state
|
|
|
-+ * (charging/discharging) change. Furthermore it may take some time until
|
|
|
-+ * the state is updated on the battery. Schedule an update to solve this.
|
|
|
++ * Handle battery update quirk: When the battery is fully charged (or
|
|
|
++ * charged up to the limit imposed by the UEFI battery limit) and the
|
|
|
++ * adapter is plugged in or removed, the EC does not send a separate
|
|
|
++ * event for the state (charging/discharging) change. Furthermore it
|
|
|
++ * may take some time until the state is updated on the battery.
|
|
|
++ * Schedule an update to solve this.
|
|
|
+ */
|
|
|
+
|
|
|
-+ if (remaining_cap >= full_cap)
|
|
|
-+ schedule_delayed_work(&bat->update_work, SPWR_AC_BAT_UPDATE_DELAY);
|
|
|
-+
|
|
|
++ schedule_delayed_work(&bat->update_work, SPWR_AC_BAT_UPDATE_DELAY);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
@@ -12722,7 +12712,7 @@ index 000000000000..cac7227f27ea
|
|
|
+MODULE_LICENSE("GPL");
|
|
|
diff --git a/drivers/misc/surface_aggregator/controller.c b/drivers/misc/surface_aggregator/controller.c
|
|
|
new file mode 100644
|
|
|
-index 000000000000..334b82834961
|
|
|
+index 000000000000..610f2825e64a
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/controller.c
|
|
|
@@ -0,0 +1,2541 @@
|
|
@@ -12836,7 +12826,7 @@ index 000000000000..334b82834961
|
|
|
+
|
|
|
+/**
|
|
|
+ * ssam_event_matches_notifier() - Test if an event matches a notifier.
|
|
|
-+ * @notif: The event notifier to test against.
|
|
|
++ * @n: The event notifier to test against.
|
|
|
+ * @event: The event to test.
|
|
|
+ *
|
|
|
+ * Return: Returns %true iff the given event matches the given notifier
|
|
@@ -16622,10 +16612,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..ae12db5e80f1
|
|
|
+index 000000000000..44b5394176cb
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/ssh_packet_layer.c
|
|
|
-@@ -0,0 +1,2055 @@
|
|
|
+@@ -0,0 +1,2046 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
|
+/*
|
|
|
+ * SSH packet transport layer.
|
|
@@ -17292,21 +17282,16 @@ index 000000000000..ae12db5e80f1
|
|
|
+{
|
|
|
+ unsigned long delta = msecs_to_jiffies(ktime_ms_delta(expires, now));
|
|
|
+ ktime_t aexp = ktime_add(expires, SSH_PTL_PACKET_TIMEOUT_RESOLUTION);
|
|
|
-+ ktime_t old_exp, old_act;
|
|
|
+
|
|
|
-+ /* Re-adjust / schedule reaper if it is above resolution delta. */
|
|
|
-+ old_act = READ_ONCE(ptl->rtx_timeout.expires);
|
|
|
-+ if (ktime_after(aexp, old_act))
|
|
|
-+ return;
|
|
|
++ spin_lock(&ptl->rtx_timeout.lock);
|
|
|
+
|
|
|
-+ do {
|
|
|
-+ old_exp = old_act;
|
|
|
-+ old_act = cmpxchg64(&ptl->rtx_timeout.expires, old_exp, expires);
|
|
|
-+ } while (old_exp != old_act && ktime_before(aexp, old_act));
|
|
|
-+
|
|
|
-+ /* If we updated the reaper expiration, modify work timeout. */
|
|
|
-+ if (old_exp == old_act && old_act != expires)
|
|
|
++ /* Re-adjust / schedule reaper only if it is above resolution delta. */
|
|
|
++ if (ktime_before(aexp, ptl->rtx_timeout.expires)) {
|
|
|
++ ptl->rtx_timeout.expires = expires;
|
|
|
+ mod_delayed_work(system_wq, &ptl->rtx_timeout.reaper, delta);
|
|
|
++ }
|
|
|
++
|
|
|
++ spin_unlock(&ptl->rtx_timeout.lock);
|
|
|
+}
|
|
|
+
|
|
|
+/* Must be called with queue lock held. */
|
|
@@ -18136,14 +18121,9 @@ index 000000000000..ae12db5e80f1
|
|
|
+ * Mark reaper as "not pending". This is done before checking any
|
|
|
+ * packets to avoid lost-update type problems.
|
|
|
+ */
|
|
|
-+ WRITE_ONCE(ptl->rtx_timeout.expires, KTIME_MAX);
|
|
|
-+ /*
|
|
|
-+ * Ensure that the reaper is marked as deactivated before we continue
|
|
|
-+ * checking packets to prevent lost-update problems when a packet is
|
|
|
-+ * added to the pending set and ssh_ptl_timeout_reaper_mod is called
|
|
|
-+ * during execution of the part below.
|
|
|
-+ */
|
|
|
-+ smp_mb__after_atomic();
|
|
|
++ spin_lock(&ptl->rtx_timeout.lock);
|
|
|
++ ptl->rtx_timeout.expires = KTIME_MAX;
|
|
|
++ spin_unlock(&ptl->rtx_timeout.lock);
|
|
|
+
|
|
|
+ spin_lock(&ptl->pending.lock);
|
|
|
+
|
|
@@ -18645,6 +18625,7 @@ index 000000000000..ae12db5e80f1
|
|
|
+ ptl->rx.thread = NULL;
|
|
|
+ init_waitqueue_head(&ptl->rx.wq);
|
|
|
+
|
|
|
++ spin_lock_init(&ptl->rtx_timeout.lock);
|
|
|
+ ptl->rtx_timeout.timeout = SSH_PTL_PACKET_TIMEOUT;
|
|
|
+ ptl->rtx_timeout.expires = KTIME_MAX;
|
|
|
+ INIT_DELAYED_WORK(&ptl->rtx_timeout.reaper, ssh_ptl_timeout_reap);
|
|
@@ -18683,10 +18664,10 @@ index 000000000000..ae12db5e80f1
|
|
|
+}
|
|
|
diff --git a/drivers/misc/surface_aggregator/ssh_packet_layer.h b/drivers/misc/surface_aggregator/ssh_packet_layer.h
|
|
|
new file mode 100644
|
|
|
-index 000000000000..c844cac0f4d7
|
|
|
+index 000000000000..e8757d03f279
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/ssh_packet_layer.h
|
|
|
-@@ -0,0 +1,188 @@
|
|
|
+@@ -0,0 +1,190 @@
|
|
|
+/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
+/*
|
|
|
+ * SSH packet transport layer.
|
|
@@ -18757,6 +18738,7 @@ index 000000000000..c844cac0f4d7
|
|
|
+ * @rx.blocked.seqs: Array of blocked sequence IDs.
|
|
|
+ * @rx.blocked.offset: Offset indicating where a new ID should be inserted.
|
|
|
+ * @rtx_timeout: Retransmission timeout subsystem.
|
|
|
++ * @rtx_timeout.lock: Lock for modifying the retransmission timeout reaper.
|
|
|
+ * @rtx_timeout.timeout: Timeout interval for retransmission.
|
|
|
+ * @rtx_timeout.expires: Time specifying when the reaper work is next scheduled.
|
|
|
+ * @rtx_timeout.reaper: Work performing timeout checks and subsequent actions.
|
|
@@ -18798,6 +18780,7 @@ index 000000000000..c844cac0f4d7
|
|
|
+ } rx;
|
|
|
+
|
|
|
+ struct {
|
|
|
++ spinlock_t lock;
|
|
|
+ ktime_t timeout;
|
|
|
+ ktime_t expires;
|
|
|
+ struct delayed_work reaper;
|
|
@@ -19272,10 +19255,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..966150542ae8
|
|
|
+index 000000000000..bf1782c85063
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/ssh_request_layer.c
|
|
|
-@@ -0,0 +1,1265 @@
|
|
|
+@@ -0,0 +1,1256 @@
|
|
|
+// SPDX-License-Identifier: GPL-2.0+
|
|
|
+/*
|
|
|
+ * SSH request transport layer.
|
|
@@ -19706,21 +19689,16 @@ index 000000000000..966150542ae8
|
|
|
+{
|
|
|
+ unsigned long delta = msecs_to_jiffies(ktime_ms_delta(expires, now));
|
|
|
+ ktime_t aexp = ktime_add(expires, SSH_RTL_REQUEST_TIMEOUT_RESOLUTION);
|
|
|
-+ ktime_t old_exp, old_act;
|
|
|
-+
|
|
|
-+ /* Re-adjust/schedule reaper if it is above resolution delta. */
|
|
|
-+ old_act = READ_ONCE(rtl->rtx_timeout.expires);
|
|
|
-+ if (ktime_after(aexp, old_act))
|
|
|
-+ return;
|
|
|
+
|
|
|
-+ do {
|
|
|
-+ old_exp = old_act;
|
|
|
-+ old_act = cmpxchg64(&rtl->rtx_timeout.expires, old_exp, expires);
|
|
|
-+ } while (old_exp != old_act && ktime_before(aexp, old_act));
|
|
|
++ spin_lock(&rtl->rtx_timeout.lock);
|
|
|
+
|
|
|
-+ /* If we updated the reaper expiration, modify work timeout. */
|
|
|
-+ if (old_exp == old_act && old_act != expires)
|
|
|
++ /* Re-adjust / schedule reaper only if it is above resolution delta. */
|
|
|
++ if (ktime_before(aexp, rtl->rtx_timeout.expires)) {
|
|
|
++ rtl->rtx_timeout.expires = expires;
|
|
|
+ mod_delayed_work(system_wq, &rtl->rtx_timeout.reaper, delta);
|
|
|
++ }
|
|
|
++
|
|
|
++ spin_unlock(&rtl->rtx_timeout.lock);
|
|
|
+}
|
|
|
+
|
|
|
+static void ssh_rtl_timeout_start(struct ssh_request *rqst)
|
|
@@ -20115,14 +20093,9 @@ index 000000000000..966150542ae8
|
|
|
+ * Mark reaper as "not pending". This is done before checking any
|
|
|
+ * requests to avoid lost-update type problems.
|
|
|
+ */
|
|
|
-+ WRITE_ONCE(rtl->rtx_timeout.expires, KTIME_MAX);
|
|
|
-+ /*
|
|
|
-+ * Ensure that the reaper is marked as deactivated before we continue
|
|
|
-+ * checking requests to prevent lost-update problems when a request is
|
|
|
-+ * added to the pending set and ssh_rtl_timeout_reaper_mod is called
|
|
|
-+ * during execution of the part below.
|
|
|
-+ */
|
|
|
-+ smp_mb__after_atomic();
|
|
|
++ spin_lock(&rtl->rtx_timeout.lock);
|
|
|
++ rtl->rtx_timeout.expires = KTIME_MAX;
|
|
|
++ spin_unlock(&rtl->rtx_timeout.lock);
|
|
|
+
|
|
|
+ spin_lock(&rtl->pending.lock);
|
|
|
+ list_for_each_entry_safe(r, n, &rtl->pending.head, node) {
|
|
@@ -20311,6 +20284,7 @@ index 000000000000..966150542ae8
|
|
|
+
|
|
|
+ INIT_WORK(&rtl->tx.work, ssh_rtl_tx_work_fn);
|
|
|
+
|
|
|
++ spin_lock_init(&rtl->rtx_timeout.lock);
|
|
|
+ rtl->rtx_timeout.timeout = SSH_RTL_REQUEST_TIMEOUT;
|
|
|
+ rtl->rtx_timeout.expires = KTIME_MAX;
|
|
|
+ INIT_DELAYED_WORK(&rtl->rtx_timeout.reaper, ssh_rtl_timeout_reap);
|
|
@@ -20543,10 +20517,10 @@ index 000000000000..966150542ae8
|
|
|
+}
|
|
|
diff --git a/drivers/misc/surface_aggregator/ssh_request_layer.h b/drivers/misc/surface_aggregator/ssh_request_layer.h
|
|
|
new file mode 100644
|
|
|
-index 000000000000..ab357b2b3735
|
|
|
+index 000000000000..9c2efdd8ae70
|
|
|
--- /dev/null
|
|
|
+++ b/drivers/misc/surface_aggregator/ssh_request_layer.h
|
|
|
-@@ -0,0 +1,141 @@
|
|
|
+@@ -0,0 +1,143 @@
|
|
|
+/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
+/*
|
|
|
+ * SSH request transport layer.
|
|
@@ -20605,6 +20579,7 @@ index 000000000000..ab357b2b3735
|
|
|
+ * @tx: Transmitter subsystem.
|
|
|
+ * @tx.work: Transmitter work item.
|
|
|
+ * @rtx_timeout: Retransmission timeout subsystem.
|
|
|
++ * @rtx_timeout.lock: Lock for modifying the retransmission timeout reaper.
|
|
|
+ * @rtx_timeout.timeout: Timeout interval for retransmission.
|
|
|
+ * @rtx_timeout.expires: Time specifying when the reaper work is next scheduled.
|
|
|
+ * @rtx_timeout.reaper: Work performing timeout checks and subsequent actions.
|
|
@@ -20630,6 +20605,7 @@ index 000000000000..ab357b2b3735
|
|
|
+ } tx;
|
|
|
+
|
|
|
+ struct {
|
|
|
++ spinlock_t lock;
|
|
|
+ ktime_t timeout;
|
|
|
+ ktime_t expires;
|
|
|
+ struct delayed_work reaper;
|