Update v4.19 patches

Changes:
 - SAM:
   - Fix bug in Surface HID get-report function
   - Fix other small issues

Links:
 - kernel: 9c073cfc7c
 - SAM: 0686c05d4b
This commit is contained in:
Maximilian Luz 2021-06-13 22:56:58 +02:00
parent 5a23881656
commit d2a59c584f
No known key found for this signature in database
GPG key ID: 70EC0937F6C26F02
15 changed files with 343 additions and 275 deletions

View file

@ -1,4 +1,4 @@
From 66bd915cb97590edb63025599405d0b186a0c033 Mon Sep 17 00:00:00 2001
From 33b9cc3d00237fa7f4b69817aa5498a76e07230d Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 18:00:43 +0200
Subject: [PATCH] platform/x86: Surface 3 battery platform operation region
@ -653,5 +653,5 @@ index 000000000000..e0af01a60302
+MODULE_DESCRIPTION("mshw0011 driver");
+MODULE_LICENSE("GPL v2");
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 4bacd340f30a355f99e75704c288240bb1acaadc Mon Sep 17 00:00:00 2001
From 40929c22a4fdf85500b373eca826a14162bfab8a Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Sun, 5 Jul 2020 14:56:20 +0300
Subject: [PATCH] dmaengine: dw: Initialize channel before each transfer
@ -85,5 +85,5 @@ index 055d83b6cb68..acf64302a2b2 100644
channel_clear_bit(dw, MASK.XFER, dwc->mask);
channel_clear_bit(dw, MASK.BLOCK, dwc->mask);
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 1cb2d25d26aa089c97194e605e5859cdba0f3127 Mon Sep 17 00:00:00 2001
From 511be71cc54751b2ec70abfb5003a7115ca79d38 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 18 Oct 2020 16:42:44 +0900
Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
@ -97,5 +97,5 @@ index 91bb99b69601..8418938b32ad 100644
};
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From a16f833c5b0d2dca416db7c174752b6b59e84791 Mon Sep 17 00:00:00 2001
From 28e314fa184243a3aa7ac8c2fc937c4d1f479fd9 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Jul 2019 17:51:37 +0200
Subject: [PATCH] platform/x86: surfacepro3_button: Fix device check
@ -90,9 +90,9 @@ index 1b491690ce07..96627627060e 100644
if (!button)
return -ENOMEM;
--
2.31.1
2.32.0
From d312af2333244116617b8c9f0b0f7984bc1ffd5b Mon Sep 17 00:00:00 2001
From 780bbe6f3351c777dda29d9de2fbfc5b41888bc5 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Jul 2019 17:52:01 +0200
Subject: [PATCH] Input: soc_button_array - Add support for newer surface
@ -295,9 +295,9 @@ index 55cd6e0b409c..8f21c062c85d 100644
};
--
2.31.1
2.32.0
From 442aafad3fb76fbd4d41e93dfb9e7677799caff0 Mon Sep 17 00:00:00 2001
From 212ca279a34acf58db5c8f4f96a34a1aca389f44 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoide@redhat.com>
Date: Sat, 5 Oct 2019 14:11:58 +0200
Subject: [PATCH] Input: soc_button_array - partial revert of support for newer
@ -384,9 +384,9 @@ index 8f21c062c85d..5983733d78dd 100644
}
--
2.31.1
2.32.0
From 96201f8faebf66c28485630dfc6f8fbc8cb49312 Mon Sep 17 00:00:00 2001
From c44150d87afb6396e5ffcb09d5d826bc552bf1b4 Mon Sep 17 00:00:00 2001
From: "Tsuchiya Yuto (kitakar5525)" <kitakar@gmail.com>
Date: Mon, 11 May 2020 17:40:21 +0900
Subject: [PATCH] Input: soc_button_array - fix Wdiscarded-qualifiers for
@ -436,5 +436,5 @@ index 5983733d78dd..c564ea99f47d 100644
return 0;
}
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From ae6dc641515e21c80430185873b5bd63b9dd40c1 Mon Sep 17 00:00:00 2001
From 218bfce7fbb23bff5943f14365ed67e282aa12c0 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
@ -330,5 +330,5 @@ index 2fda9893962d..ec6c48ecd7d5 100644
#ifdef CONFIG_PCIEAER
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 0a2b7c92bf8b74b75f6f1ca377078dbb6439a244 Mon Sep 17 00:00:00 2001
From 9d3f5efe490ec84e08ee0792498093ab7419233f Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 28 Sep 2019 17:58:17 +0200
Subject: [PATCH] Add support for Intel IPTS touch devices
@ -7310,5 +7310,5 @@ index 000000000000..f229a3436851
+
+#endif // IPTS_H
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 5fe5d52f6a98aec4ad5ee2a6f13d25692b4ba6db Mon Sep 17 00:00:00 2001
From d337283c13359054de9619094ffe228d0c4b605b Mon Sep 17 00:00:00 2001
From: Chuhong Yuan <hslester96@gmail.com>
Date: Wed, 24 Jul 2019 19:27:45 +0800
Subject: [PATCH] mwifiex: pcie: Use dev_get_drvdata
@ -47,9 +47,9 @@ index 5907b34037c2..4e655038e3f3 100644
if (!card->adapter) {
dev_err(dev, "adapter structure is not valid\n");
--
2.31.1
2.32.0
From 756f807795a6b6b4fd094367f7f2885a9322ba35 Mon Sep 17 00:00:00 2001
From 546e1cb26521a76ba7bafc36e35c78ea76a179b4 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Mon, 28 Sep 2020 17:46:49 +0900
Subject: [PATCH] mwifiex: pcie: add DMI-based quirk impl for Surface devices
@ -255,9 +255,9 @@ index 000000000000..5326ae7e5671
+
+void mwifiex_initialize_quirks(struct pcie_service_card *card);
--
2.31.1
2.32.0
From 3861312d1ede27de54f3a231f3d5255efe5f5566 Mon Sep 17 00:00:00 2001
From abdfaf52eac3b2b29bad706b6898974e089703b0 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Tue, 29 Sep 2020 17:25:22 +0900
Subject: [PATCH] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+
@ -456,9 +456,9 @@ index 5326ae7e5671..8b9dcb5070d8 100644
void mwifiex_initialize_quirks(struct pcie_service_card *card);
+int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
--
2.31.1
2.32.0
From bc846dfd932372544d2327633177bc00f6d121fa Mon Sep 17 00:00:00 2001
From 9f2a96b37618bb0c1f00d13890329a74e823e848 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Tue, 29 Sep 2020 17:32:22 +0900
Subject: [PATCH] mwifiex: pcie: add reset_wsid quirk for Surface 3
@ -635,9 +635,9 @@ index 8b9dcb5070d8..3ef7440418e3 100644
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
+int mwifiex_pcie_reset_wsid_quirk(struct pci_dev *pdev);
--
2.31.1
2.32.0
From 3dd94b0277c7651e92033e1566b760668524dc49 Mon Sep 17 00:00:00 2001
From 108841ef7273c271ce7bdcc131569530c45756ad Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Wed, 30 Sep 2020 18:08:24 +0900
Subject: [PATCH] mwifiex: pcie: (OEMB) add quirk for Surface 3 with broken DMI
@ -697,9 +697,9 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
.ident = "Surface Pro 3",
.matches = {
--
2.31.1
2.32.0
From 48676c9c13e5b98cc6f97f209dcd7817cce88f43 Mon Sep 17 00:00:00 2001
From 8122d7a509f633ff9608e2b2f24a5024b2e7f752 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:11:49 +0900
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
@ -852,9 +852,9 @@ index 3ef7440418e3..a95ebac06e13 100644
void mwifiex_initialize_quirks(struct pcie_service_card *card);
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
--
2.31.1
2.32.0
From f162468494c91b7d70c63b3fdaa885de0f581abe Mon Sep 17 00:00:00 2001
From 8d870444ef985ee31188e9c1e0e6761afd821883 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 10 Nov 2020 12:49:56 +0100
Subject: [PATCH] mwifiex: Use non-posted PCI register writes
@ -909,9 +909,9 @@ index d0e002cfc295..aae276fc1155 100644
}
--
2.31.1
2.32.0
From f7293c27715e3d18b6403c430557fd4b433fd595 Mon Sep 17 00:00:00 2001
From 52bede36cc5d3646cb20a9b75fbfcf7101200705 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 3 Nov 2020 13:28:04 +0100
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
@ -1076,9 +1076,9 @@ index a95ebac06e13..4ec2ae72f632 100644
void mwifiex_initialize_quirks(struct pcie_service_card *card);
int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
--
2.31.1
2.32.0
From d25ecded1d333d9df4670003237e6fa66a69843a Mon Sep 17 00:00:00 2001
From 41494497a1c3ade6247d8d1dccf3140cbe05463c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Sun, 28 Mar 2021 21:10:06 +0200
Subject: [PATCH] mwifiex: Try waking the firmware until we get an interrupt
@ -1165,9 +1165,9 @@ index 6b06f2a76cdc..45dc0bfe26ba 100644
if (reg->sleep_cookie) {
mwifiex_pcie_dev_wakeup_delay(adapter);
--
2.31.1
2.32.0
From 33e1ad68fc4a4936698c3ec73b7a226e89fe4031 Mon Sep 17 00:00:00 2001
From 9a18c59fdc364372eb99b390d18089b5a287fbf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Thu, 25 Mar 2021 11:33:02 +0100
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
@ -1243,9 +1243,9 @@ index 1b0adf5c2376..283a90928f0e 100644
set_bit(HCI_QUIRK_FIXUP_INQUIRY_MODE, &hdev->quirks);
set_bit(HCI_QUIRK_BROKEN_LOCAL_COMMANDS, &hdev->quirks);
--
2.31.1
2.32.0
From d38a00c40696cc85857a9a0f31208915e52fbccb Mon Sep 17 00:00:00 2001
From 618ee85be3172b26bfc4c01476029d3331a12f8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 12:31:26 +0100
Subject: [PATCH] mwifiex: Small cleanup for handling virtual interface type
@ -1344,9 +1344,9 @@ index 650191db25cb..5badf7fef37e 100644
mwifiex_dbg(priv->adapter, ERROR,
"%s: changing to %d not supported\n",
--
2.31.1
2.32.0
From fd7764267fc4a32169585ecc4b43e42c323a1ca2 Mon Sep 17 00:00:00 2001
From 41bdac42a091dbe81399d395747ab59dc777b15d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 12:44:39 +0100
Subject: [PATCH] mwifiex: Use function to check whether interface type change
@ -1577,9 +1577,9 @@ index 5badf7fef37e..e73334679992 100644
static void
--
2.31.1
2.32.0
From 2cc30e306698250a9bd0d7f097c709a4f1a2ba23 Mon Sep 17 00:00:00 2001
From 1a079ae5383c6e1cf63296e42f62a59b752dbae1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 13:33:04 +0100
Subject: [PATCH] mwifiex: Run SET_BSS_MODE when changing from P2P to STATION
@ -1645,9 +1645,9 @@ index e73334679992..99da637692cc 100644
params);
default:
--
2.31.1
2.32.0
From d1a36cca16a45bbae8b8ae4065bf44bc5ae252e5 Mon Sep 17 00:00:00 2001
From dab8b7fa189430f45795af39faff049d57d63aef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 14:42:54 +0100
Subject: [PATCH] mwifiex: Use helper function for counting interface types
@ -1821,9 +1821,9 @@ index 99da637692cc..feb3a858d8c1 100644
priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED;
--
2.31.1
2.32.0
From c427da241bf49cc49b7eefa59209ca8034d60e35 Mon Sep 17 00:00:00 2001
From 5176905aff4a48858d658ec3c5d2d36690706844 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Fri, 26 Mar 2021 15:56:58 +0100
Subject: [PATCH] mwifiex: Update virtual interface counters right after
@ -1924,9 +1924,9 @@ index feb3a858d8c1..54d9e789aa14 100644
}
/*
--
2.31.1
2.32.0
From da77c8f8f472f7ac39840ba205124e888eec4c30 Mon Sep 17 00:00:00 2001
From 010a28308d6b06792ca0c5c2414a1c01ede20e97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 13:42:40 +0100
Subject: [PATCH] mwifiex: Allow switching interface type from P2P_CLIENT to
@ -2013,9 +2013,9 @@ index 54d9e789aa14..ec5ed00b4b89 100644
return mwifiex_change_vif_to_ap(dev, curr_iftype, type,
params);
--
2.31.1
2.32.0
From ae42e15ea2bb3e66a3bd6f3a93cdbdd3f090cbf3 Mon Sep 17 00:00:00 2001
From a6e2cf6ce07541bd202121ffdd0d229e13ced202 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Fri, 26 Mar 2021 15:31:08 +0100
Subject: [PATCH] mwifiex: Handle interface type changes from AP to STATION
@ -2040,9 +2040,9 @@ index ec5ed00b4b89..0fc554abfea3 100644
type, params);
break;
--
2.31.1
2.32.0
From 8915d1878333f9feb5b0ae7bf58a7f822dbe3863 Mon Sep 17 00:00:00 2001
From 6923c8b8d97a17236d98bac2f11c83c6dfab85ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Fri, 26 Mar 2021 15:32:16 +0100
Subject: [PATCH] mwifiex: Properly initialize private structure on interface
@ -2095,9 +2095,9 @@ index 0fc554abfea3..7c6d31eb058c 100644
default:
mwifiex_dbg(adapter, ERROR,
--
2.31.1
2.32.0
From 42d294e9b4ba5a2936b1e10422c4b4142473e98f Mon Sep 17 00:00:00 2001
From 783ff3792b5341aa1db55626ec8e7a3209049e81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Sat, 27 Mar 2021 12:19:14 +0100
Subject: [PATCH] mwifiex: Fix copy-paste mistake when creating virtual
@ -2127,9 +2127,9 @@ index 7c6d31eb058c..16a94f06a518 100644
priv->bss_started = 0;
--
2.31.1
2.32.0
From 8fbe953b79a46c70955ff15ef05cbdf3945278dd Mon Sep 17 00:00:00 2001
From 24674a096cf110ee5aa876770efd8058b18bcf01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 13 Apr 2021 14:30:28 +0200
Subject: [PATCH] mwifiex: Deactive host sleep using HSCFG after it was
@ -2283,9 +2283,9 @@ index 4ed10cf82f9a..057c810a9ef7 100644
hs_cfg->action = cpu_to_le16(HS_CONFIGURE);
hs_cfg->params.hs_config.conditions = hscfg_param->conditions;
--
2.31.1
2.32.0
From 66421414b43b175c1c42c73c281ff591f6cc4a61 Mon Sep 17 00:00:00 2001
From 031d85206704c22d2f266ef6959d9e8f34f5a8a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 13 Apr 2021 14:23:05 +0200
Subject: [PATCH] mwifiex: Add quirk to disable deep sleep with certain
@ -2386,9 +2386,9 @@ index 7003767eef42..3079ca3e3fdc 100644
version_ext->version_str_sel = ver_ext->version_str_sel;
memcpy(version_ext->version_str, ver_ext->version_str,
--
2.31.1
2.32.0
From b655458e32900774093756b0fa41c1a211e77b07 Mon Sep 17 00:00:00 2001
From 9ddb495b5d6f121ab318f160329eb87757bc90df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Wed, 11 Nov 2020 15:17:07 +0100
Subject: [PATCH] mwifiex: Don't log error on suspend if wake-on-wlan is
@ -2418,9 +2418,9 @@ index 16a94f06a518..92d5c9aa5ec7 100644
ret = 0;
goto done;
--
2.31.1
2.32.0
From 9e9b0dec7feaab050855d6cb40c5e9cfe7823748 Mon Sep 17 00:00:00 2001
From ede03dd3736ac8c1a12d5da6d951e9c8e41b5a00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Sun, 28 Mar 2021 21:42:54 +0200
Subject: [PATCH] mwifiex: Log an error on command failure during key-material
@ -2458,9 +2458,9 @@ index 92d5c9aa5ec7..5786dcea79cc 100644
/*
--
2.31.1
2.32.0
From 4faf6c225ce1257b23e6969006b159170774d606 Mon Sep 17 00:00:00 2001
From 1355f9b6cf19436e7d0fcc0191cf966084e5a8f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 13 Apr 2021 12:44:03 +0200
Subject: [PATCH] mwifiex: Fix an incorrect comment
@ -2486,9 +2486,9 @@ index 5d75c971004b..b36b2103d555 100644
if (!INITIATOR_BIT(del_ba_param_set))
return 0;
--
2.31.1
2.32.0
From 089a78d4e4587b6ac20dabbe6d7b00dae806e50e Mon Sep 17 00:00:00 2001
From 7d65e74bf42a793ffcf5683f8c55c86f9b9b9d69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 13 Apr 2021 12:45:59 +0200
Subject: [PATCH] mwifiex: Send DELBA requests according to spec
@ -2529,9 +2529,9 @@ index b36b2103d555..4ed6ae8a96f1 100644
/* We don't wait for the response of this command */
--
2.31.1
2.32.0
From a848267f9be7d8988576cf813bbb61b40fb6eecf Mon Sep 17 00:00:00 2001
From fca332fcde05c1b05bf178302fbb1021eadef9b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Tue, 13 Apr 2021 12:57:41 +0200
Subject: [PATCH] mwifiex: Ignore BTCOEX events from the firmware
@ -2567,5 +2567,5 @@ index a327fc5b36e3..6228971d9b8b 100644
case EVENT_RXBA_SYNC:
dev_dbg(adapter->dev, "EVENT: RXBA_SYNC\n");
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 76311394c95798192e476e71b85bb2949e5d86f6 Mon Sep 17 00:00:00 2001
From d9048e8b019f1dc07bb4bb88488ca12379b66f43 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 16 Aug 2020 23:39:56 +0200
Subject: [PATCH] platform/x86: Add Driver to set up lid GPEs on MS Surface
@ -390,5 +390,5 @@ index 000000000000..7eaaeacbf408
+MODULE_ALIAS("dmi:*:svnMicrosoftCorporation:pnSurfaceLaptop2:*");
+MODULE_ALIAS("dmi:*:svnMicrosoftCorporation:pnSurfaceLaptop3:*");
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 0317b179aa42159cd89dc3e757c36f68b0fa35ca Mon Sep 17 00:00:00 2001
From 1d231f1d8b8cb0cb53fe9e42f5ef7d2bc6c2dfbe Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 25 Jul 2020 17:19:53 +0200
Subject: [PATCH] i2c: acpi: Implement RawBytes read access
@ -107,9 +107,9 @@ index 8ba4122fb340..f9a24b56fec0 100644
dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n",
accessor_type, client->addr);
--
2.31.1
2.32.0
From ce33b39fa1bffc298b6f9c312ef392c4748322ef Mon Sep 17 00:00:00 2001
From c4ef32e7298916ec0a6c8e9b73d69815414fea00 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 6 Sep 2020 04:01:19 +0200
Subject: [PATCH] platform/x86: Add driver for Surface Book 1 dGPU switch
@ -330,5 +330,5 @@ index 000000000000..8c66ed5110fd
+MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1");
+MODULE_LICENSE("GPL");
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From b18cbfbe9d487c24e272578afcf74cc68af93636 Mon Sep 17 00:00:00 2001
From 6c8e2dd5a9a23b45a58996063801a1d56d16afc7 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
@ -79,9 +79,9 @@ index b272c329d45d..cf547883a993 100644
} else { /* IPMI */
--
2.31.1
2.32.0
From 9528beca1088b8ab0b21aaf0b93864c36cf4b441 Mon Sep 17 00:00:00 2001
From d9cbdb64b648fe4a54efdc663d0b31e54f6c9667 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
@ -267,9 +267,9 @@ index c66a04d24f1d..1b18d12d217f 100644
if (!ctrl->serdev)
return -ENODEV;
--
2.31.1
2.32.0
From d3efb7a6b79a5c4b2fcef1d86c4a99f3279acb67 Mon Sep 17 00:00:00 2001
From 94ede501339d351a6849891e0ce504310903bb78 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 17 Aug 2020 01:23:20 +0200
Subject: [PATCH] Add file2alias support for Surface Aggregator devices
@ -368,9 +368,9 @@ index 7f40b6aab689..76e3b1d7db45 100644
/* Create MODULE_ALIAS() statements.
--
2.31.1
2.32.0
From 97b74a8f0b897844b8659e667d56d113c6ea19be Mon Sep 17 00:00:00 2001
From 3d64f7437ffd03985911d1c6286c4d39d5a6c3f7 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 17 Aug 2020 01:44:30 +0200
Subject: [PATCH] platform/x86: Add support for Surface System Aggregator
@ -399,7 +399,7 @@ Patchset: surface-sam
.../surface_aggregator/internal-api.rst | 67 +
.../surface_aggregator/internal.rst | 577 ++++
.../surface_aggregator/overview.rst | 77 +
.../driver-api/surface_aggregator/ssh.rst | 344 +++
.../driver-api/surface_aggregator/ssh.rst | 344 ++
drivers/hid/Kconfig | 2 +
drivers/hid/Makefile | 2 +
drivers/hid/surface-hid/Kconfig | 42 +
@ -415,18 +415,18 @@ Patchset: surface-sam
.../platform/x86/surface_aggregator/Makefile | 17 +
drivers/platform/x86/surface_aggregator/bus.c | 415 +++
drivers/platform/x86/surface_aggregator/bus.h | 27 +
.../x86/surface_aggregator/controller.c | 2718 +++++++++++++++++
.../x86/surface_aggregator/controller.c | 2780 +++++++++++++++++
.../x86/surface_aggregator/controller.h | 285 ++
.../platform/x86/surface_aggregator/core.c | 850 ++++++
.../platform/x86/surface_aggregator/core.c | 850 +++++
.../x86/surface_aggregator/ssh_msgb.h | 205 ++
.../x86/surface_aggregator/ssh_packet_layer.c | 2074 +++++++++++++
.../x86/surface_aggregator/ssh_packet_layer.c | 2074 ++++++++++++
.../x86/surface_aggregator/ssh_packet_layer.h | 190 ++
.../x86/surface_aggregator/ssh_parser.c | 228 ++
.../x86/surface_aggregator/ssh_parser.h | 154 +
.../surface_aggregator/ssh_request_layer.c | 1263 ++++++++
.../surface_aggregator/ssh_request_layer.h | 143 +
.../platform/x86/surface_aggregator/trace.h | 632 ++++
.../platform/x86/surface_aggregator_cdev.c | 804 +++++
.../platform/x86/surface_aggregator_cdev.c | 810 +++++
.../x86/surface_aggregator_registry.c | 618 ++++
drivers/platform/x86/surface_dtx.c | 1281 ++++++++
drivers/platform/x86/surface_perfmode.c | 122 +
@ -443,7 +443,7 @@ Patchset: surface-sam
include/uapi/linux/surface_aggregator/dtx.h | 146 +
scripts/mod/devicetable-offsets.c | 3 +-
scripts/mod/file2alias.c | 10 +-
55 files changed, 19953 insertions(+), 7 deletions(-)
55 files changed, 20021 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
@ -3151,7 +3151,7 @@ index 000000000000..4ae11cf09b25
+obj-$(CONFIG_SURFACE_KBD) += surface_kbd.o
diff --git a/drivers/hid/surface-hid/surface_hid.c b/drivers/hid/surface-hid/surface_hid.c
new file mode 100644
index 000000000000..80e4d185b66f
index 000000000000..82767dd3e088
--- /dev/null
+++ b/drivers/hid/surface-hid/surface_hid.c
@@ -0,0 +1,251 @@
@ -3298,7 +3298,7 @@ index 000000000000..80e4d185b66f
+ rqst.target_id = shid->uid.target;
+ rqst.instance_id = shid->uid.instance;
+ rqst.command_id = SURFACE_HID_CID_GET_FEATURE_REPORT;
+ rqst.flags = 0;
+ rqst.flags = SSAM_REQUEST_HAS_RESPONSE;
+ rqst.length = sizeof(rprt_id);
+ rqst.payload = &rprt_id;
+
@ -5652,10 +5652,10 @@ index 000000000000..ed032c2cbdb2
+#endif /* _SURFACE_AGGREGATOR_BUS_H */
diff --git a/drivers/platform/x86/surface_aggregator/controller.c b/drivers/platform/x86/surface_aggregator/controller.c
new file mode 100644
index 000000000000..b5ddce8c35cb
index 000000000000..caf76333f8b3
--- /dev/null
+++ b/drivers/platform/x86/surface_aggregator/controller.c
@@ -0,0 +1,2718 @@
@@ -0,0 +1,2780 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Main SSAM/SSH controller structure and functionality.
@ -6065,6 +6065,31 @@ index 000000000000..b5ddce8c35cb
+}
+
+/**
+ * ssam_nf_refcount_dec_free() - Decrement reference-/activation-count of the
+ * given event and free its entry if the reference count reaches zero.
+ * @nf: The notifier system reference.
+ * @reg: The registry used to enable/disable the event.
+ * @id: The event ID.
+ *
+ * Decrements the reference-/activation-count of the specified event, freeing
+ * its entry if it reaches zero.
+ *
+ * Note: ``nf->lock`` must be held when calling this function.
+ */
+static void ssam_nf_refcount_dec_free(struct ssam_nf *nf,
+ struct ssam_event_registry reg,
+ struct ssam_event_id id)
+{
+ struct ssam_nf_refcount_entry *entry;
+
+ lockdep_assert_held(&nf->lock);
+
+ entry = ssam_nf_refcount_dec(nf, reg, id);
+ if (entry && entry->refcount == 0)
+ kfree(entry);
+}
+
+/**
+ * ssam_nf_refcount_empty() - Test if the notification system has any
+ * enabled/active events.
+ * @nf: The notification system.
@ -7772,6 +7797,109 @@ index 000000000000..b5ddce8c35cb
+/* -- Top-level event registry interface. ----------------------------------- */
+
+/**
+ * ssam_nf_refcount_enable() - Enable event for reference count entry if it has
+ * not already been enabled.
+ * @ctrl: The controller to enable the event on.
+ * @entry: The reference count entry for the event to be enabled.
+ * @flags: The flags used for enabling the event on the EC.
+ *
+ * Enable the event associated with the given reference count entry if the
+ * reference count equals one, i.e. the event has not previously been enabled.
+ * If the event has already been enabled (i.e. reference count not equal to
+ * one), check that the flags used for enabling match and warn about this if
+ * they do not.
+ *
+ * This does not modify the reference count itself, which is done with
+ * ssam_nf_refcount_inc() / ssam_nf_refcount_dec().
+ *
+ * Note: ``nf->lock`` must be held when calling this function.
+ *
+ * Return: Returns zero on success. If the event is enabled by this call,
+ * returns the status of the event-enable EC command.
+ */
+static int ssam_nf_refcount_enable(struct ssam_controller *ctrl,
+ struct ssam_nf_refcount_entry *entry, u8 flags)
+{
+ const struct ssam_event_registry reg = entry->key.reg;
+ const struct ssam_event_id id = entry->key.id;
+ struct ssam_nf *nf = &ctrl->cplt.event.notif;
+ int status;
+
+ lockdep_assert_held(&nf->lock);
+
+ ssam_dbg(ctrl, "enabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ reg.target_category, id.target_category, id.instance, entry->refcount);
+
+ if (entry->refcount == 1) {
+ status = ssam_ssh_event_enable(ctrl, reg, id, flags);
+ if (status)
+ return status;
+
+ entry->flags = flags;
+
+ } else if (entry->flags != flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when enabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ flags, entry->flags, reg.target_category, id.target_category,
+ id.instance);
+ }
+
+ return 0;
+}
+
+/**
+ * ssam_nf_refcount_disable_free() - Disable event for reference count entry if it is
+ * no longer in use and free the corresponding entry.
+ * @ctrl: The controller to disable the event on.
+ * @entry: The reference count entry for the event to be disabled.
+ * @flags: The flags used for enabling the event on the EC.
+ *
+ * If the reference count equals zero, i.e. the event is no longer requested by
+ * any client, the event will be disabled and the corresponding reference count
+ * entry freed. The reference count entry must not be used any more after a
+ * call to this function.
+ *
+ * Also checks if the flags used for disabling the event match the flags used
+ * for enabling the event and warns if they do not (regardless of reference
+ * count).
+ *
+ * This does not modify the reference count itself, which is done with
+ * ssam_nf_refcount_inc() / ssam_nf_refcount_dec().
+ *
+ * Note: ``nf->lock`` must be held when calling this function.
+ *
+ * Return: Returns zero on success. If the event is disabled by this call,
+ * returns the status of the event-enable EC command.
+ */
+static int ssam_nf_refcount_disable_free(struct ssam_controller *ctrl,
+ struct ssam_nf_refcount_entry *entry, u8 flags)
+{
+ const struct ssam_event_registry reg = entry->key.reg;
+ const struct ssam_event_id id = entry->key.id;
+ struct ssam_nf *nf = &ctrl->cplt.event.notif;
+ int status = 0;
+
+ lockdep_assert_held(&nf->lock);
+
+ ssam_dbg(ctrl, "disabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ reg.target_category, id.target_category, id.instance, entry->refcount);
+
+ if (entry->flags != flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when disabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ flags, entry->flags, reg.target_category, id.target_category,
+ id.instance);
+ }
+
+ if (entry->refcount == 0) {
+ status = ssam_ssh_event_disable(ctrl, reg, id, flags);
+ kfree(entry);
+ }
+
+ return status;
+}
+
+/**
+ * ssam_notifier_register() - Register an event notifier.
+ * @ctrl: The controller to register the notifier on.
+ * @n: The event notifier to register.
@ -7815,41 +7943,26 @@ index 000000000000..b5ddce8c35cb
+ mutex_unlock(&nf->lock);
+ return PTR_ERR(entry);
+ }
+
+ ssam_dbg(ctrl, "enabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ n->event.reg.target_category, n->event.id.target_category,
+ n->event.id.instance, entry->refcount);
+ }
+
+ status = ssam_nfblk_insert(nf_head, &n->base);
+ if (status) {
+ if (entry) {
+ entry = ssam_nf_refcount_dec(nf, n->event.reg, n->event.id);
+ if (entry->refcount == 0)
+ kfree(entry);
+ }
+ if (entry)
+ ssam_nf_refcount_dec_free(nf, n->event.reg, n->event.id);
+
+ mutex_unlock(&nf->lock);
+ return status;
+ }
+
+ if (entry && entry->refcount == 1) {
+ status = ssam_ssh_event_enable(ctrl, n->event.reg, n->event.id, n->event.flags);
+ if (entry) {
+ status = ssam_nf_refcount_enable(ctrl, entry, n->event.flags);
+ if (status) {
+ ssam_nfblk_remove(&n->base);
+ kfree(ssam_nf_refcount_dec(nf, n->event.reg, n->event.id));
+ ssam_nf_refcount_dec_free(nf, n->event.reg, n->event.id);
+ mutex_unlock(&nf->lock);
+ synchronize_srcu(&nf_head->srcu);
+ return status;
+ }
+
+ entry->flags = n->event.flags;
+
+ } else if (entry && entry->flags != n->event.flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when enabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ n->event.flags, entry->flags, n->event.reg.target_category,
+ n->event.id.target_category, n->event.id.instance);
+ }
+
+ mutex_unlock(&nf->lock);
@ -7896,35 +8009,20 @@ index 000000000000..b5ddce8c35cb
+ * If this is an observer notifier, do not attempt to disable the
+ * event, just remove it.
+ */
+ if (n->flags & SSAM_EVENT_NOTIFIER_OBSERVER)
+ goto remove;
+ if (!(n->flags & SSAM_EVENT_NOTIFIER_OBSERVER)) {
+ entry = ssam_nf_refcount_dec(nf, n->event.reg, n->event.id);
+ if (WARN_ON(!entry)) {
+ /*
+ * If this does not return an entry, there's a logic
+ * error somewhere: The notifier block is registered,
+ * but the event refcount entry is not there. Remove
+ * the notifier block anyways.
+ */
+ status = -ENOENT;
+ goto remove;
+ }
+
+ entry = ssam_nf_refcount_dec(nf, n->event.reg, n->event.id);
+ if (WARN_ON(!entry)) {
+ /*
+ * If this does not return an entry, there's a logic error
+ * somewhere: The notifier block is registered, but the event
+ * refcount entry is not there. Remove the notifier block
+ * anyways.
+ */
+ status = -ENOENT;
+ goto remove;
+ }
+
+ ssam_dbg(ctrl, "disabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ n->event.reg.target_category, n->event.id.target_category,
+ n->event.id.instance, entry->refcount);
+
+ if (entry->flags != n->event.flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when disabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ n->event.flags, entry->flags, n->event.reg.target_category,
+ n->event.id.target_category, n->event.id.instance);
+ }
+
+ if (entry->refcount == 0) {
+ status = ssam_ssh_event_disable(ctrl, n->event.reg, n->event.id, n->event.flags);
+ kfree(entry);
+ status = ssam_nf_refcount_disable_free(ctrl, entry, n->event.flags);
+ }
+
+remove:
@ -7962,17 +8060,13 @@ index 000000000000..b5ddce8c35cb
+ struct ssam_event_id id, u8 flags)
+{
+ u16 rqid = ssh_tc_to_rqid(id.target_category);
+ struct ssam_nf *nf = &ctrl->cplt.event.notif;
+ struct ssam_nf_refcount_entry *entry;
+ struct ssam_nf_head *nf_head;
+ struct ssam_nf *nf;
+ int status;
+
+ if (!ssh_rqid_is_event(rqid))
+ return -EINVAL;
+
+ nf = &ctrl->cplt.event.notif;
+ nf_head = &nf->head[ssh_rqid_to_event(rqid)];
+
+ mutex_lock(&nf->lock);
+
+ entry = ssam_nf_refcount_inc(nf, reg, id);
@ -7981,25 +8075,11 @@ index 000000000000..b5ddce8c35cb
+ return PTR_ERR(entry);
+ }
+
+ ssam_dbg(ctrl, "enabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ reg.target_category, id.target_category, id.instance,
+ entry->refcount);
+
+ if (entry->refcount == 1) {
+ status = ssam_ssh_event_enable(ctrl, reg, id, flags);
+ if (status) {
+ kfree(ssam_nf_refcount_dec(nf, reg, id));
+ mutex_unlock(&nf->lock);
+ return status;
+ }
+
+ entry->flags = flags;
+
+ } else if (entry->flags != flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when enabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ flags, entry->flags, reg.target_category,
+ id.target_category, id.instance);
+ status = ssam_nf_refcount_enable(ctrl, entry, flags);
+ if (status) {
+ ssam_nf_refcount_dec_free(nf, reg, id);
+ mutex_unlock(&nf->lock);
+ return status;
+ }
+
+ mutex_unlock(&nf->lock);
@ -8031,40 +8111,22 @@ index 000000000000..b5ddce8c35cb
+ struct ssam_event_id id, u8 flags)
+{
+ u16 rqid = ssh_tc_to_rqid(id.target_category);
+ struct ssam_nf *nf = &ctrl->cplt.event.notif;
+ struct ssam_nf_refcount_entry *entry;
+ struct ssam_nf_head *nf_head;
+ struct ssam_nf *nf;
+ int status = 0;
+ int status;
+
+ if (!ssh_rqid_is_event(rqid))
+ return -EINVAL;
+
+ nf = &ctrl->cplt.event.notif;
+ nf_head = &nf->head[ssh_rqid_to_event(rqid)];
+
+ mutex_lock(&nf->lock);
+
+ entry = ssam_nf_refcount_dec(nf, reg, id);
+ if (WARN_ON(!entry)) {
+ if (!entry) {
+ mutex_unlock(&nf->lock);
+ return -ENOENT;
+ }
+
+ ssam_dbg(ctrl, "disabling event (reg: %#04x, tc: %#04x, iid: %#04x, rc: %d)\n",
+ reg.target_category, id.target_category, id.instance,
+ entry->refcount);
+
+ if (entry->flags != flags) {
+ ssam_warn(ctrl,
+ "inconsistent flags when disabling event: got %#04x, expected %#04x (reg: %#04x, tc: %#04x, iid: %#04x)\n",
+ flags, entry->flags, reg.target_category,
+ id.target_category, id.instance);
+ }
+
+ if (entry->refcount == 0) {
+ status = ssam_ssh_event_disable(ctrl, reg, id, flags);
+ kfree(entry);
+ }
+ status = ssam_nf_refcount_disable_free(ctrl, entry, flags);
+
+ mutex_unlock(&nf->lock);
+ return status;
@ -14460,10 +14522,10 @@ index 000000000000..de64cf169060
+#include <trace/define_trace.h>
diff --git a/drivers/platform/x86/surface_aggregator_cdev.c b/drivers/platform/x86/surface_aggregator_cdev.c
new file mode 100644
index 000000000000..93969d9f7f9a
index 000000000000..bbc0fc57ba13
--- /dev/null
+++ b/drivers/platform/x86/surface_aggregator_cdev.c
@@ -0,0 +1,804 @@
@@ -0,0 +1,810 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Provides user-space access to the SSAM EC via the /dev/surface/aggregator
@ -14488,6 +14550,7 @@ index 000000000000..93969d9f7f9a
+
+#include <linux/surface_aggregator/cdev.h>
+#include <linux/surface_aggregator/controller.h>
+#include <linux/surface_aggregator/serial_hub.h>
+
+#define SSAM_CDEV_DEVICE_NAME "surface_aggregator_cdev"
+
@ -14597,22 +14660,23 @@ index 000000000000..93969d9f7f9a
+ return 0;
+}
+
+static int ssam_cdev_notifier_register(struct ssam_cdev_client *client, u8 category, int priority)
+static int ssam_cdev_notifier_register(struct ssam_cdev_client *client, u8 tc, int priority)
+{
+ const u16 rqid = ssh_tc_to_rqid(tc);
+ const u16 event = ssh_rqid_to_event(rqid);
+ struct ssam_cdev_notifier *nf;
+ int index = ((int)category) - 1;
+ int status;
+
+ lockdep_assert_held_read(&client->cdev->lock);
+
+ /* Validate notifier target category. */
+ if (index < 0 || index >= SSH_NUM_EVENTS)
+ if (!ssh_rqid_is_event(rqid))
+ return -EINVAL;
+
+ mutex_lock(&client->notifier_lock);
+
+ /* Check if the notifier has already been registered. */
+ if (client->notifier[index]) {
+ if (client->notifier[event]) {
+ mutex_unlock(&client->notifier_lock);
+ return -EEXIST;
+ }
@ -14633,7 +14697,7 @@ index 000000000000..93969d9f7f9a
+ nf->client = client;
+ nf->nf.base.fn = ssam_cdev_notifier;
+ nf->nf.base.priority = priority;
+ nf->nf.event.id.target_category = category;
+ nf->nf.event.id.target_category = tc;
+ nf->nf.event.mask = 0; /* Do not do any matching. */
+ nf->nf.flags = SSAM_EVENT_NOTIFIER_OBSERVER;
+
@ -14642,35 +14706,36 @@ index 000000000000..93969d9f7f9a
+ if (status)
+ kfree(nf);
+ else
+ client->notifier[index] = nf;
+ client->notifier[event] = nf;
+
+ mutex_unlock(&client->notifier_lock);
+ return status;
+}
+
+static int ssam_cdev_notifier_unregister(struct ssam_cdev_client *client, u8 category)
+static int ssam_cdev_notifier_unregister(struct ssam_cdev_client *client, u8 tc)
+{
+ int index = ((int)category) - 1;
+ const u16 rqid = ssh_tc_to_rqid(tc);
+ const u16 event = ssh_rqid_to_event(rqid);
+ int status;
+
+ lockdep_assert_held_read(&client->cdev->lock);
+
+ /* Validate notifier target category. */
+ if (index < 0 || index >= SSH_NUM_EVENTS)
+ if (!ssh_rqid_is_event(rqid))
+ return -EINVAL;
+
+ mutex_lock(&client->notifier_lock);
+
+ /* Check if the notifier is currently registered. */
+ if (!client->notifier[index]) {
+ if (!client->notifier[event]) {
+ mutex_unlock(&client->notifier_lock);
+ return -ENOENT;
+ }
+
+ /* Unregister and free notifier. */
+ status = ssam_notifier_unregister(client->cdev->ctrl, &client->notifier[index]->nf);
+ kfree(client->notifier[index]);
+ client->notifier[index] = NULL;
+ status = ssam_notifier_unregister(client->cdev->ctrl, &client->notifier[event]->nf);
+ kfree(client->notifier[event]);
+ client->notifier[event] = NULL;
+
+ mutex_unlock(&client->notifier_lock);
+ return status;
@ -14948,6 +15013,9 @@ index 000000000000..93969d9f7f9a
+
+ if (test_bit(SSAM_CDEV_DEVICE_SHUTDOWN_BIT, &cdev->flags)) {
+ up_write(&cdev->client_lock);
+ mutex_destroy(&client->write_lock);
+ mutex_destroy(&client->read_lock);
+ mutex_destroy(&client->notifier_lock);
+ ssam_cdev_put(client->cdev);
+ vfree(client);
+ return -ENODEV;
@ -20846,5 +20914,5 @@ index 76e3b1d7db45..f171616ab318 100644
ADD(alias, "f", match_flags & SSAM_MATCH_FUNCTION, function);
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 8ee5e9b76e7d28202a565ebf52ddfe84a6a09d89 Mon Sep 17 00:00:00 2001
From f82031986b8ad346030ef822c8471cf94c2350cb 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
@ -195,9 +195,9 @@ index 5c58c22e0c08..18f83e554c73 100644
pci_lock_rescan_remove();
--
2.31.1
2.32.0
From 3793c22bbed9cec0c3f478473515fd1ad0a56b9c Mon Sep 17 00:00:00 2001
From a2281d0e8ad0ee3d0587b0aeee7fca89390e5dbe 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
@ -334,9 +334,9 @@ index 18f83e554c73..c512b2ed85ed 100644
#include <linux/types.h>
#include <linux/pci.h>
--
2.31.1
2.32.0
From 989f1eb5721c0da40ac074b55d4616fac3e6f364 Mon Sep 17 00:00:00 2001
From 56eba3776144f92ca3c76b06e1ca4f5e67e38723 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
@ -547,9 +547,9 @@ index d4b7049cbc70..576362d0b1cd 100644
struct pci_dev *pdev = ctrl_dev(ctrl);
u16 stat_mask = 0, ctrl_mask = 0;
--
2.31.1
2.32.0
From 6c66af2e66a170778615773efb37944496a6cd65 Mon Sep 17 00:00:00 2001
From 788924f1c4e7b48da5c43105ca0b263a883a78b7 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
@ -745,9 +745,9 @@ index 576362d0b1cd..7f4173d6771a 100644
pciehp_power_off_slot(ctrl->slot);
}
--
2.31.1
2.32.0
From 4fef561a946b093f706f0c9af87ccf9cfcebaf9b Mon Sep 17 00:00:00 2001
From 7bc10b0d32efd6cc1b0cde21680bf05255b9c60f 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
@ -790,9 +790,9 @@ index cb474338f39d..18aa830e79e4 100644
if (pdev->link_state)
--
2.31.1
2.32.0
From 8883f432c68512dab04ae829bd5ed96a91ac92e1 Mon Sep 17 00:00:00 2001
From 832e677dbc82643f0439bb160b582092a502d8e2 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
@ -876,9 +876,9 @@ index 2c3b5bd59b18..dee5a7507403 100644
result = reset_link(udev, service);
--
2.31.1
2.32.0
From a8bc4afa95893d37267b8c1335f7da28890ea334 Mon Sep 17 00:00:00 2001
From 5334081d2229d0d073b47b22f301524ccc465392 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
@ -2068,9 +2068,9 @@ index 8da87931bd45..b9c1396db6fe 100644
ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:00\n",
__func__, pci_domain_nr(parent), parent->number);
--
2.31.1
2.32.0
From 38a4236ea893c183ffa6cd38cd8a07240e58485f Mon Sep 17 00:00:00 2001
From 46618f9872010405be9f85af7d119da0e1d23186 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
@ -2375,9 +2375,9 @@ index 4a17d71e15d3..e4d6ec960630 100644
}
--
2.31.1
2.32.0
From d34485aebd5e534c3b4d58b983f2c9505ecdb0a5 Mon Sep 17 00:00:00 2001
From 1e09630ef1c49901043c70b7f71a70b2e8774946 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
@ -2506,9 +2506,9 @@ index 2499489158cc..df82a0335515 100644
int request_result;
wait_queue_head_t requester;
--
2.31.1
2.32.0
From 3192dc6166aa22e301c412180cf8b3486b1c8705 Mon Sep 17 00:00:00 2001
From 066616828413e37a836e4578a7e698f9e67b5920 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
@ -2703,9 +2703,9 @@ index ec6c48ecd7d5..74c8e9190fed 100644
atomic_t enable_cnt; /* pci_enable_device has been called */
--
2.31.1
2.32.0
From ea7477d96f140962febc4f5d5b3e3e3d114ec8d6 Mon Sep 17 00:00:00 2001
From 47de6198a61adce04ce584a5245283ef93a9e433 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()
@ -2754,9 +2754,9 @@ index 07d4a00131bc..77ba4f65e18b 100644
/* Don't do the same thing twice in a row for one device. */
--
2.31.1
2.32.0
From c8aa03db7da31b6275ed72ce96be08d1119244b9 Mon Sep 17 00:00:00 2001
From f4d709cd49473602aea1cd4ac3e861d5da7f177a 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
@ -2868,9 +2868,9 @@ index 0693870a9e24..b5c7f5ef597a 100644
* pciehp has a 1:1 bus:slot relationship so we ultimately want a secondary
* bus reset of the bridge, but at the same time we want to ensure that it is
--
2.31.1
2.32.0
From a7725bfc25fc7e4577290f7b93dc9e7395d7bc26 Mon Sep 17 00:00:00 2001
From 3aa0dfc1e4791251f5ef1cf7f5886fa62ce2f69c 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
@ -2910,9 +2910,9 @@ index b5c7f5ef597a..242b9f30210a 100644
/*
--
2.31.1
2.32.0
From 05cb6d9f3f5aa32c70d763d5096495f3fa0eee4f Mon Sep 17 00:00:00 2001
From 40fe09691a45ad0c46251eb34420c828fb314daf 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
@ -2963,9 +2963,9 @@ index 23a5a0c2c3fe..5badf8a1ce0a 100644
if (pci_bridge_d3_possible(dev)) {
/*
--
2.31.1
2.32.0
From cf58d7fa05f24856380c962cb4d6c84491ca0332 Mon Sep 17 00:00:00 2001
From d3fd8d2f7a904ee74f550a8fff94a2c0fcfc4e01 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
@ -3075,9 +3075,9 @@ index 5badf8a1ce0a..59d2567e2db2 100644
};
--
2.31.1
2.32.0
From ac10e8884445075ca4ae0fec001efa576e35ad55 Mon Sep 17 00:00:00 2001
From 11a45227fa517de5ec43fe918aff5aad02e37393 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
@ -3132,9 +3132,9 @@ index 8e6e4ce869fb..e5de25ebc4cf 100644
};
--
2.31.1
2.32.0
From 507b1a84685f12061a6892312353bdc468eace8f Mon Sep 17 00:00:00 2001
From 27d6c0528332b0fb00510c65a2a7b1d7e2c2d93d 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
@ -3427,9 +3427,9 @@ index 1a37748766b7..50a09003bb43 100644
void **valptr);
int acpi_dev_prop_read_single(struct acpi_device *adev,
--
2.31.1
2.32.0
From d7c690c9d7df4d0c338d5512d867bdbf11177537 Mon Sep 17 00:00:00 2001
From 248366022dc42030bdc2175ea13f6025500864a5 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
@ -3592,9 +3592,9 @@ index 39725b71300f..ee3e94c6ea6c 100644
int (*set_state)(struct pci_dev *dev, pci_power_t state);
pci_power_t (*get_state)(struct pci_dev *dev);
--
2.31.1
2.32.0
From 61bf54c71a0cdd08ccc3305ff3bf883892c5cd9e Mon Sep 17 00:00:00 2001
From 1f79b8b1ff82987d8dd31ebd3a402b007b0d1083 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
@ -3646,9 +3646,9 @@ index 242b9f30210a..7074d4923811 100644
/*
* Controllers with the Intel CF118 and similar errata advertise
--
2.31.1
2.32.0
From 94876f28f24c02e1960c3bbfd202f419a6107ca4 Mon Sep 17 00:00:00 2001
From 3864b36bf332975d32fdf1443a0ebafb70000044 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
@ -3735,9 +3735,9 @@ index 7074d4923811..a37ff79a6e9e 100644
/*
--
2.31.1
2.32.0
From 50533e4a6d3878657bbad10c57182181e582ce56 Mon Sep 17 00:00:00 2001
From 060381b1b25e661547eff00711032036cb31b9bf 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
@ -3820,9 +3820,9 @@ index ab930e5994dd..5f3f35d314c3 100644
if (dmi_check_system(bridge_d3_blacklist))
return false;
--
2.31.1
2.32.0
From 40b7d85f69171f9ec4d7d58339295cbc1abb97c1 Mon Sep 17 00:00:00 2001
From 19cea536c0e6bda17d66907910a02da8d795d5f3 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
@ -3893,9 +3893,9 @@ index 1edf5a1836ea..ee1518650d55 100644
&dev_attr_vendor.attr,
&dev_attr_device.attr,
--
2.31.1
2.32.0
From 1d4912955b393798fe39f10714cf4eafd1f5dbec Mon Sep 17 00:00:00 2001
From 949871f75c7552fc648a094a2a806d3fd9c404a7 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 14 Dec 2020 20:50:59 +0100
Subject: [PATCH] platform/x86: Add Surface Hotplug driver
@ -4245,5 +4245,5 @@ index 000000000000..cfcc15cfbacb
+MODULE_DESCRIPTION("Surface Hot-Plug Signaling Driver for Surface Book Devices");
+MODULE_LICENSE("GPL");
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 311f61be8d550dad45ed63339caa05e072fbbda0 Mon Sep 17 00:00:00 2001
From c6b8be443a14682a9a0d8ce89c0b5be5fb7cf108 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Thu, 5 Nov 2020 13:09:45 +0100
Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when
@ -34,7 +34,7 @@ Patchset: surface-typecover
1 file changed, 98 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index ccda72f748ee..96fb231fd266 100644
index c20945ed1dc1..93a93f991649 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -38,7 +38,10 @@
@ -106,7 +106,7 @@ index ccda72f748ee..96fb231fd266 100644
{ }
};
@@ -1665,6 +1685,69 @@ static void mt_expired_timeout(struct timer_list *t)
@@ -1669,6 +1689,69 @@ static void mt_expired_timeout(struct timer_list *t)
clear_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags);
}
@ -176,7 +176,7 @@ index ccda72f748ee..96fb231fd266 100644
static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
int ret, i;
@@ -1688,6 +1771,9 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
@@ -1692,6 +1775,9 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
td->inputmode_value = MT_INPUTMODE_TOUCHSCREEN;
hid_set_drvdata(hdev, td);
@ -186,7 +186,7 @@ index ccda72f748ee..96fb231fd266 100644
INIT_LIST_HEAD(&td->applications);
INIT_LIST_HEAD(&td->reports);
@@ -1712,15 +1798,19 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
@@ -1716,15 +1802,19 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
timer_setup(&td->release_timer, mt_expired_timeout, 0);
ret = hid_parse(hdev);
@ -208,7 +208,7 @@ index ccda72f748ee..96fb231fd266 100644
ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
if (ret)
@@ -1756,6 +1846,7 @@ static void mt_remove(struct hid_device *hdev)
@@ -1760,6 +1850,7 @@ static void mt_remove(struct hid_device *hdev)
{
struct mt_device *td = hid_get_drvdata(hdev);
@ -216,7 +216,7 @@ index ccda72f748ee..96fb231fd266 100644
del_timer_sync(&td->release_timer);
sysfs_remove_group(&hdev->dev.kobj, &mt_attribute_group);
@@ -2103,6 +2194,11 @@ static const struct hid_device_id mt_devices[] = {
@@ -2107,6 +2198,11 @@ static const struct hid_device_id mt_devices[] = {
MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
USB_DEVICE_ID_XIROKU_CSR2) },
@ -229,5 +229,5 @@ index ccda72f748ee..96fb231fd266 100644
{ .driver_data = MT_CLS_GOOGLE,
HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE,
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From 3b2b53b2a0db89f6be3273f21b9b42c47f2989b7 Mon Sep 17 00:00:00 2001
From dcb54fa055b34e6ab8de92fae8c0df12978cded2 Mon Sep 17 00:00:00 2001
From: Zoltan Tamas Vajda <zoltan.tamas.vajda@gmail.com>
Date: Thu, 3 Jun 2021 10:50:55 +0200
Subject: [PATCH] Added quirk for Surface Go touchscreen
@ -35,5 +35,5 @@ index 4dd151b2924e..4f5e58a9b19e 100644
};
--
2.31.1
2.32.0

View file

@ -1,4 +1,4 @@
From addb5afe5249eea71a4f922ea168614685a6c95d Mon Sep 17 00:00:00 2001
From 763366b32774433a9a888ec13f32688b3e2ad4fe Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Feb 2021 00:45:52 +0100
Subject: [PATCH] ath10k: Add module parameters to override board files
@ -117,5 +117,5 @@ index 436eac342b62..c9028d59bfe2 100644
ret = firmware_request_nowarn(&fw, filename, ar->dev);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
--
2.31.1
2.32.0

View file

@ -46,20 +46,20 @@ sha256sums=('84c2ea0b8d096bbb46eceb04825090a4c2f4987dcc0d3bdd0c80c7325522919d'
'4e68572e7cc4c5368f0236e0792660ae8498373988625dca46e509399a7eaea6'
'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2'
'c523d8ba9f02992c34b325cd7b07e27bfead33ecab29877e659a12b2d56b1118'
'1db89e197b05aafeab4257fd2610823137297d0f38761c5463f178903a81c730'
'960788d1f8e59965e6e68dc3c83fad09edade041738c85c277ad3fbcc3f3b66f'
'9e872762e8ab8513c8402864f124d0b34de348d625fe64193987c50b98770ae0'
'bd8677d585cb2cbdd8138ed475b1c1744d5f7f3ca5d95274b90b9961be459278'
'c22ec8bf62046a203a1c5d9e1e15425eef0933714d23d2e7f2e39023bf322a53'
'2d3ba06a04e652722ce804bfbbd478e40bdc83ce0fe106b4f62cde169207ff51'
'cfc277e4a36d50d815c274020a192ffc4cb77b67d7a54913c1259782d7f1d785'
'f511907d1f1e6ca8a7e6a2f4d9e464f4378de1095f8618a3abfa4cc1ac194577'
'8956b5be58f556064b5f29d149c7f2965c642c228faf828c4d7b09f93af44efa'
'1e31bd2ad6953b09e9f9fddfced439e8ff126accd40fb0726e0d7a23be71d2a8'
'5ae7331873642bb99f0b4bb0cf4c665f5ce73ec93ab21b75e6db460f9f946faf'
'4c44ba127c6430db1f1d17d021216cccba738900a446e246a3b1c36702c23d20'
'363f4bec0c02770b615efca07586de498b19a097d26c55ba8a2a22ea83512739'
'fe6a9f042b3d991b40c0e7676babb2778fb6fc3d53a2e43b919c18d9a57a8c3b')
'99346e0295813ebf0f64124cfe93a3eab888f5c4807c007c650dd9ae7372238c'
'54e59b161b21060fd6ca20414efadff9f7c924ea77486f8b4649387bf862ab09'
'b1797356e68bba6bbdfba641314f925a006667c192981c368529ac4bf4a000b3'
'd372f7963cf198032ec53a38995c0f0bdf9ef17541a57ef062a2f8f4810c4303'
'dc10bb8ba502ab99bffa53ae28246fd42426d457fb3860989da31bf7b2dca06b'
'effb11570d93fd78104a48a1923755a727e80286a2275f4cc4a2ab259c340e22'
'01dff88e9a2243d52d4e4d08f462a304d3ca4fa17e65209c19c7b81334f3451b'
'62fc8ecd3a3a66976efd9ad4c957595600114f0f14723832612d83fdd494a37b'
'4b073fa0ad6fcb9d4eda623761fed9b8a7d487cc8361983364a1d7429fb0b0ec'
'6972deb737a05073c88d5b39d02262ade5f5aa6e0da1e8210d85bfbc6d20c16e'
'72486c82afd9417214a2fa0434983e1f73f80b03f0d6959325553aa4d68df86d'
'2c409a68c6d1f92063e47bca60e09ec8e25d3d0546878279b2cd2cc11b89746a'
'b8b067e2cc2b96e5711822b3256782fda385c4ee262f82247516640ec36d0e58'
'98aaa3cd4830be79e26b3adc9100e626d8c4f1a69553e2e4697279439a15854d')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase