From c856e76a2f97fd5832961dcc6a237a13b2bc3f83 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 29 Mar 2021 02:52:06 +0200 Subject: [PATCH] Update v5.11 patches Changes: - Attempt to properly fix WiFi firmware crashes caused by power-save mode and suspend. This aims to fix WiFi crashes without the need to disable power-saving options and achieve better power consumption. - Try to fix firmware wakeup issues. - Try to reduce WiFi speed impact when Bluetooth is active. - Fixes for P2P and AP modes. This should get miracast working. Links: - kernel: https://github.com/linux-surface/kernel/commit/5d2a6f03a1e58856617c60565c825a5d5c1389fa --- patches/5.11/0001-surface3-oemb.patch | 4 +- patches/5.11/0002-wifi.patch | 1530 ++++++++++++++--- patches/5.11/0003-ipts.patch | 12 +- patches/5.11/0004-surface-sam-over-hid.patch | 8 +- patches/5.11/0005-surface-sam.patch | 176 +- patches/5.11/0006-surface-hotplug.patch | 12 +- patches/5.11/0007-surface-typecover.patch | 4 +- patches/5.11/0008-surface-sensors.patch | 4 +- patches/5.11/0009-cameras.patch | 224 +-- .../5.11/0010-ath10k-firmware-override.patch | 5 +- pkg/arch/kernel/PKGBUILD | 22 +- 11 files changed, 1482 insertions(+), 519 deletions(-) diff --git a/patches/5.11/0001-surface3-oemb.patch b/patches/5.11/0001-surface3-oemb.patch index d43afedc4..ee6bc0ac9 100644 --- a/patches/5.11/0001-surface3-oemb.patch +++ b/patches/5.11/0001-surface3-oemb.patch @@ -1,4 +1,4 @@ -From 11492b8ad14c2f400a50abd8e4655a841294558c Mon Sep 17 00:00:00 2001 +From d3ae08c58e8ee31d5b0cc8b83943ec17f291eec9 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 @@ -97,5 +97,5 @@ index 2752dc955733..ef36a316e2ed 100644 }; -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0002-wifi.patch b/patches/5.11/0002-wifi.patch index ba1830199..f6db0e32c 100644 --- a/patches/5.11/0002-wifi.patch +++ b/patches/5.11/0002-wifi.patch @@ -1,4 +1,4 @@ -From 1488bfbdd03dc5f3903c71b91719d27e24a6c0f2 Mon Sep 17 00:00:00 2001 +From f46be9ffd2914cec4593067da550ffc426ba828c 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 @@ -204,9 +204,9 @@ index 000000000000..5326ae7e5671 + +void mwifiex_initialize_quirks(struct pcie_service_card *card); -- -2.30.2 +2.31.0 -From 4871ed416a4bcbab7907167c9eaebdcd93e04cae Mon Sep 17 00:00:00 2001 +From 7f9280d5497d4dfec2c494f0797ad0ed10e64a10 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+ @@ -405,9 +405,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.30.2 +2.31.0 -From 0cb80deaf51fc408ab60c7b65508a40c7b167508 Mon Sep 17 00:00:00 2001 +From 3f5a82f5a39d98e51f747415ae7746766b3c6971 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 @@ -584,9 +584,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.30.2 +2.31.0 -From 8751a784f243553c65ba7d215d26cefc9571d2fe Mon Sep 17 00:00:00 2001 +From dbd310b9c656233985765614aeeebb9533957482 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 @@ -646,177 +646,9 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644 .ident = "Surface Pro 3", .matches = { -- -2.30.2 +2.31.0 -From 30b13373c61b8f7544f4ec661cb0a0e01842e525 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 - suspend()/resume() - -There are issues with S0ix achievement and AP scanning after suspend -with the current Host Sleep method. - -When using the Host Sleep method, it prevents the platform to reach S0ix -during suspend. Also, after suspend, sometimes AP scanning won't work, -resulting in non-working wifi. - -To fix such issues, perform shutdown_sw()/reinit_sw() instead of Host -Sleep. - -As a side effect, this patch disables wakeups (means that Wake-On-WLAN -can't be used anymore, if it was working before), and might also reset -some internal states. - -Note that suspend() no longer checks if it's already suspended. - -With the previous Host Sleep method, the check was done by looking at -adapter->hs_activated in mwifiex_enable_hs() [sta_ioctl.c], but not -MWIFIEX_IS_SUSPENDED. So, what the previous method checked was instead -Host Sleep state, not suspend itself. Therefore, there is no need to check -the suspend state now. - -Also removed comment for suspend state check at top of suspend() -accordingly. - -Signed-off-by: Tsuchiya Yuto -Patchset: wifi ---- - drivers/net/wireless/marvell/mwifiex/pcie.c | 29 +++++++-------------- - 1 file changed, 10 insertions(+), 19 deletions(-) - -diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c -index bf9ef4ede3f1..30a602a18f9d 100644 ---- a/drivers/net/wireless/marvell/mwifiex/pcie.c -+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c -@@ -294,8 +294,7 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter) - * registered functions must have drivers with suspend and resume - * methods. Failing that the kernel simply removes the whole card. - * -- * If already not suspended, this function allocates and sends a host -- * sleep activate request to the firmware and turns off the traffic. -+ * This function shuts down the adapter. - */ - static int mwifiex_pcie_suspend(struct device *dev) - { -@@ -303,31 +302,21 @@ static int mwifiex_pcie_suspend(struct device *dev) - struct pcie_service_card *card = dev_get_drvdata(dev); - - -- /* Might still be loading firmware */ -- wait_for_completion(&card->fw_done); -- - adapter = card->adapter; - if (!adapter) { - dev_err(dev, "adapter is not valid\n"); - return 0; - } - -- mwifiex_enable_wake(adapter); -- -- /* Enable the Host Sleep */ -- if (!mwifiex_enable_hs(adapter)) { -+ /* Shut down SW */ -+ if (mwifiex_shutdown_sw(adapter)) { - mwifiex_dbg(adapter, ERROR, - "cmd: failed to suspend\n"); -- clear_bit(MWIFIEX_IS_HS_ENABLING, &adapter->work_flags); -- mwifiex_disable_wake(adapter); - return -EFAULT; - } - -- flush_workqueue(adapter->workqueue); -- - /* Indicate device suspended */ - set_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags); -- clear_bit(MWIFIEX_IS_HS_ENABLING, &adapter->work_flags); - - return 0; - } -@@ -337,13 +326,13 @@ static int mwifiex_pcie_suspend(struct device *dev) - * registered functions must have drivers with suspend and resume - * methods. Failing that the kernel simply removes the whole card. - * -- * If already not resumed, this function turns on the traffic and -- * sends a host sleep cancel request to the firmware. -+ * If already not resumed, this function reinits the adapter. - */ - static int mwifiex_pcie_resume(struct device *dev) - { - struct mwifiex_adapter *adapter; - struct pcie_service_card *card = dev_get_drvdata(dev); -+ int ret; - - - if (!card->adapter) { -@@ -361,9 +350,11 @@ static int mwifiex_pcie_resume(struct device *dev) - - clear_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags); - -- mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), -- MWIFIEX_ASYNC_CMD); -- mwifiex_disable_wake(adapter); -+ ret = mwifiex_reinit_sw(adapter); -+ if (ret) -+ dev_err(dev, "reinit failed: %d\n", ret); -+ else -+ mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); - - return 0; - } --- -2.30.2 - -From 0be2e8316621230bb7529c8e9067d6117c051603 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 - -The devicve_dump may take a little bit long time and users may want to -disable the dump for daily usage. - -This commit adds a new module parameter and disables device_dump by -default. - -Signed-off-by: Tsuchiya Yuto -Patchset: wifi ---- - drivers/net/wireless/marvell/mwifiex/pcie.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c -index 30a602a18f9d..113636355dec 100644 ---- a/drivers/net/wireless/marvell/mwifiex/pcie.c -+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c -@@ -183,6 +183,11 @@ static const struct mwifiex_pcie_device mwifiex_pcie8997 = { - .can_ext_scan = true, - }; - -+static bool enable_device_dump; -+module_param(enable_device_dump, bool, 0644); -+MODULE_PARM_DESC(enable_device_dump, -+ "enable device_dump (default: disabled)"); -+ - static const struct of_device_id mwifiex_pcie_of_match_table[] = { - { .compatible = "pci11ab,2b42" }, - { .compatible = "pci1b4b,2b42" }, -@@ -2943,6 +2948,12 @@ static void mwifiex_pcie_fw_dump(struct mwifiex_adapter *adapter) - - static void mwifiex_pcie_device_dump_work(struct mwifiex_adapter *adapter) - { -+ if (!enable_device_dump) { -+ mwifiex_dbg(adapter, MSG, -+ "device_dump is disabled by module parameter\n"); -+ return; -+ } -+ - adapter->devdump_data = vzalloc(MWIFIEX_FW_DUMP_SIZE); - if (!adapter->devdump_data) { - mwifiex_dbg(adapter, ERROR, --- -2.30.2 - -From 264838e5b5383b14e40f4cc196abefa690d1d859 Mon Sep 17 00:00:00 2001 +From a59d938fac929cc34a0cb0bcb2489fde92af12d2 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+ @@ -838,10 +670,10 @@ Patchset: wifi 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c -index 113636355dec..1a44ca3e66f3 100644 +index bf9ef4ede3f1..ba6296885b82 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c -@@ -375,6 +375,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, +@@ -379,6 +379,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct pcie_service_card *card; @@ -849,7 +681,7 @@ index 113636355dec..1a44ca3e66f3 100644 int ret; pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n", -@@ -416,6 +417,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, +@@ -420,6 +421,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, return -1; } @@ -969,150 +801,1280 @@ index 3ef7440418e3..a95ebac06e13 100644 void mwifiex_initialize_quirks(struct pcie_service_card *card); int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev); -- -2.30.2 +2.31.0 -From e70c8a87dd34dcde524bd13ad6bbcdd62617a08e 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 +From e77c4bb867183feb91cb25e1315fc90191454b5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Tue, 3 Nov 2020 13:28:04 +0100 +Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface + devices -This commit adds the allow_ps_mode module parameter and set it false -(disallowed) by default, to make ps_mode (power_save) control easier. +The most recent firmware of the 88W8897 card reports a hardcoded LTR +value to the system during initialization, probably as an (unsuccessful) +attempt of the developers to fix firmware crashes. This LTR value +prevents most of the Microsoft Surface devices from entering deep +powersaving states (either platform C-State 10 or S0ix state), because +the exit latency of that state would be higher than what the card can +tolerate. -On some setups (e.g., with 5GHz AP), power_save causes connection -completely unstable. So, we need to disable it. However, userspace tools -may try to enable it. For this reason, we need to tell userspace that -power_save is disallowed by default. +Turns out the card works just the same (including the firmware crashes) +no matter if that hardcoded LTR value is reported or not, so it's kind +of useless and only prevents us from saving power. -When this parameter is set to false, changing the power_save mode will -be disallowed like the following: +To get rid of those hardcoded LTR reports, it's possible to reset the +PCI bridge device after initializing the cards firmware. I'm not exactly +sure why that works, maybe the power management subsystem of the PCH +resets its stored LTR values when doing a function level reset of the +bridge device. Doing the reset once after starting the wifi firmware +works very well, probably because the firmware only reports that LTR +value a single time during firmware startup. - $ sudo iw dev mlan0 set power_save on - command failed: Operation not permitted (-1) - -Signed-off-by: Tsuchiya Yuto Patchset: wifi --- - drivers/net/wireless/marvell/mwifiex/cfg80211.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) + drivers/net/wireless/marvell/mwifiex/pcie.c | 12 +++++++++ + .../wireless/marvell/mwifiex/pcie_quirks.c | 26 +++++++++++++------ + .../wireless/marvell/mwifiex/pcie_quirks.h | 1 + + 3 files changed, 31 insertions(+), 8 deletions(-) -diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c -index a6b9dc6700b1..943bc1e8ceae 100644 ---- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c -+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c -@@ -25,6 +25,11 @@ - static char *reg_alpha2; - module_param(reg_alpha2, charp, 0); +diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c +index ba6296885b82..9ac12ff4a5c1 100644 +--- a/drivers/net/wireless/marvell/mwifiex/pcie.c ++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c +@@ -1757,9 +1757,21 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) + static int mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter) + { + struct pcie_service_card *card = adapter->card; ++ struct pci_dev *pdev = card->dev; ++ struct pci_dev *parent_pdev = pci_upstream_bridge(pdev); + const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; + int tx_wrap = card->txbd_wrptr & reg->tx_wrap_mask; -+static bool allow_ps_mode; -+module_param(allow_ps_mode, bool, 0644); -+MODULE_PARM_DESC(allow_ps_mode, -+ "allow WiFi power management to be enabled. (default: disallowed)"); ++ /* Trigger a function level reset of the PCI bridge device, this makes ++ * the firmware of PCIe 88W8897 cards stop reporting a fixed LTR value ++ * that prevents the system from entering package C10 and S0ix powersaving ++ * states. ++ * We need to do it here because it must happen after firmware ++ * initialization and this function is called after that is done. ++ */ ++ if (card->quirks & QUIRK_DO_FLR_ON_BRIDGE) ++ pci_reset_function(parent_pdev); + - static const struct ieee80211_iface_limit mwifiex_ap_sta_limits[] = { + /* Write the RX ring read pointer in to reg->rx_rdptr */ + if (mwifiex_write_reg(adapter, reg->rx_rdptr, card->rxbd_rdptr | + tx_wrap)) { +diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c +index a2aeb2af907e..6885575826a6 100644 +--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c ++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c +@@ -33,7 +33,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 4"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, { - .max = MWIFIEX_MAX_BSS_NUM, -@@ -435,6 +440,17 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy, + .ident = "Surface Pro 5", +@@ -43,7 +44,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "Surface_Pro_1796"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Pro 5 (LTE)", +@@ -53,7 +55,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "Surface_Pro_1807"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Pro 6", +@@ -62,7 +65,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Pro 6"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Book 1", +@@ -71,7 +75,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Book"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Book 2", +@@ -80,7 +85,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Book 2"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Laptop 1", +@@ -89,7 +95,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Laptop"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface Laptop 2", +@@ -98,7 +105,8 @@ static const struct dmi_system_id mwifiex_quirk_table[] = { + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Surface Laptop 2"), + }, + .driver_data = (void *)(QUIRK_FW_RST_D3COLD | +- QUIRK_NO_BRIDGE_D3), ++ QUIRK_NO_BRIDGE_D3 | ++ QUIRK_DO_FLR_ON_BRIDGE), + }, + { + .ident = "Surface 3", +@@ -147,6 +155,8 @@ void mwifiex_initialize_quirks(struct pcie_service_card *card) + if (card->quirks & QUIRK_NO_BRIDGE_D3) + dev_info(&pdev->dev, + "quirk no_brigde_d3 enabled\n"); ++ if (card->quirks & QUIRK_DO_FLR_ON_BRIDGE) ++ dev_info(&pdev->dev, "quirk do_flr_on_bridge enabled\n"); + } - ps_mode = enabled; + static void mwifiex_pcie_set_power_d3cold(struct pci_dev *pdev) +diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h +index a95ebac06e13..4ec2ae72f632 100644 +--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h ++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h +@@ -12,6 +12,7 @@ + */ + #define QUIRK_FW_RST_WSID_S3 BIT(1) + #define QUIRK_NO_BRIDGE_D3 BIT(2) ++#define QUIRK_DO_FLR_ON_BRIDGE BIT(3) -+ /* Allow ps_mode to be enabled only when allow_ps_mode is true */ -+ if (ps_mode && !allow_ps_mode) { -+ mwifiex_dbg(priv->adapter, MSG, -+ "Enabling ps_mode disallowed by modparam\n"); -+ -+ /* Return -EPERM to inform userspace tools that setting -+ * power_save to be enabled is not permitted. -+ */ -+ return -EPERM; + void mwifiex_initialize_quirks(struct pcie_service_card *card); + int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev); +-- +2.31.0 + +From ef2eea8b78ab6c4aceff7d7a7be5a82193425c51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Thu, 25 Mar 2021 11:33:02 +0100 +Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell + 88W8897 + +The Marvell 88W8897 combined wifi and bluetooth card (pcie+usb version) +is used in a lot of Microsoft Surface devices, and all those devices +suffer from very low 2.4GHz wifi connection speeds while bluetooth is +enabled. The reason for that is that the default passive scanning +interval for Bluetooth Low Energy devices is quite high in Linux +(interval of 60 msec and scan window of 30 msec, see hci_core.c), and +the Marvell chip is known for its bad bt+wifi coexisting performance. + +So decrease that passive scan interval and make the scan window shorter +on this particular device to allow for spending more time transmitting +wifi signals: The new scan interval is 250 msec (0x190 * 0.625 msec) and +the new scan window is 6.25 msec (0xa * 0,625 msec). + +This change has a very large impact on the 2.4GHz wifi speeds and gets +it up to performance comparable with the Windows driver, which seems to +apply a similar quirk. + +The interval and window length were tested and found to work very well +with a lot of Bluetooth Low Energy devices, including the Surface Pen, a +Bluetooth Speaker and two modern Bluetooth headphones. All devices were +discovered immediately after turning them on. Even lower values were +also tested, but they introduced longer delays until devices get +discovered. + +Patchset: wifi +--- + drivers/bluetooth/btusb.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c +index a4f834a50a98..e276f84a41bd 100644 +--- a/drivers/bluetooth/btusb.c ++++ b/drivers/bluetooth/btusb.c +@@ -61,6 +61,7 @@ static struct usb_driver btusb_driver; + #define BTUSB_VALID_LE_STATES 0x800000 + #define BTUSB_QCA_WCN6855 0x1000000 + #define BTUSB_INTEL_NEWGEN 0x2000000 ++#define BTUSB_LOWER_LESCAN_INTERVAL BIT(26) + + static const struct usb_device_id btusb_table[] = { + /* Generic Bluetooth USB device */ +@@ -357,6 +358,7 @@ static const struct usb_device_id blacklist_table[] = { + { USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL }, + { USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL }, + { USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL }, ++ { USB_DEVICE(0x1286, 0x204c), .driver_info = BTUSB_LOWER_LESCAN_INTERVAL }, + + /* Intel Bluetooth devices */ + { USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_NEW | +@@ -4491,6 +4493,19 @@ static int btusb_probe(struct usb_interface *intf, + if (id->driver_info & BTUSB_MARVELL) + hdev->set_bdaddr = btusb_set_bdaddr_marvell; + ++ /* The Marvell 88W8897 combined wifi and bluetooth card is known for ++ * very bad bt+wifi coexisting performance. ++ * ++ * Decrease the passive BT Low Energy scan interval a bit ++ * (0x0190 * 0.625 msec = 250 msec) and make the scan window shorter ++ * (0x000a * 0,625 msec = 6.25 msec). This allows for significantly ++ * higher wifi throughput while passively scanning for BT LE devices. ++ */ ++ if (id->driver_info & BTUSB_LOWER_LESCAN_INTERVAL) { ++ hdev->le_scan_interval = 0x0190; ++ hdev->le_scan_window = 0x000a; + } + - return mwifiex_drv_set_power(priv, &ps_mode); - } - + if (IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) && + (id->driver_info & BTUSB_MEDIATEK)) { + hdev->setup = btusb_mtk_setup; -- -2.30.2 +2.31.0 -From 9d7468b0241457b8cff8798224f649ef61374a85 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 +From a9fcadb8c659155a884f4560c19bbbad38c51db0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Wed, 11 Nov 2020 12:31:26 +0100 +Subject: [PATCH] mwifiex: Small cleanup for handling virtual interface type + changes -Users may want to know the ps_mode state change (e.g., diagnosing -connection issues). This commit adds the print when changing ps_mode. +Handle the obvious invalid virtual interface type changes with a general +check instead of looking at the individual change. + +For type changes from P2P_CLIENT to P2P_GO and the other way round, this +changes the behavior slightly: We now still do nothing, but return +-EOPNOTSUPP instead of 0. Now that behavior was incorrect before and +still is, because type changes between these two types are actually +possible and supported, which we'll fix in a following commit. -Signed-off-by: Tsuchiya Yuto Patchset: wifi --- - drivers/net/wireless/marvell/mwifiex/cfg80211.c | 7 +++++++ - 1 file changed, 7 insertions(+) + .../net/wireless/marvell/mwifiex/cfg80211.c | 39 +++++++------------ + 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c -index 943bc1e8ceae..a2eb8df8d385 100644 +index a6b9dc6700b1..d50fd8570475 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c -@@ -451,6 +451,13 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy, - return -EPERM; +@@ -1141,6 +1141,20 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return -EBUSY; } -+ if (ps_mode) -+ mwifiex_dbg(priv->adapter, MSG, -+ "Enabling ps_mode, disable if unstable.\n"); -+ else -+ mwifiex_dbg(priv->adapter, MSG, -+ "Disabling ps_mode.\n"); ++ if (type == NL80211_IFTYPE_UNSPECIFIED) { ++ mwifiex_dbg(priv->adapter, INFO, ++ "%s: no new type specified, keeping old type %d\n", ++ dev->name, curr_iftype); ++ return 0; ++ } + - return mwifiex_drv_set_power(priv, &ps_mode); ++ if (curr_iftype == type) { ++ mwifiex_dbg(priv->adapter, INFO, ++ "%s: interface already is of type %d\n", ++ dev->name, curr_iftype); ++ return 0; ++ } ++ + switch (curr_iftype) { + case NL80211_IFTYPE_ADHOC: + switch (type) { +@@ -1160,12 +1174,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + case NL80211_IFTYPE_AP: + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); +- case NL80211_IFTYPE_UNSPECIFIED: +- mwifiex_dbg(priv->adapter, INFO, +- "%s: kept type as IBSS\n", dev->name); +- fallthrough; +- case NL80211_IFTYPE_ADHOC: /* This shouldn't happen */ +- return 0; + default: + mwifiex_dbg(priv->adapter, ERROR, + "%s: changing to %d not supported\n", +@@ -1191,12 +1199,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + case NL80211_IFTYPE_AP: + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); +- case NL80211_IFTYPE_UNSPECIFIED: +- mwifiex_dbg(priv->adapter, INFO, +- "%s: kept type as STA\n", dev->name); +- fallthrough; +- case NL80211_IFTYPE_STATION: /* This shouldn't happen */ +- return 0; + default: + mwifiex_dbg(priv->adapter, ERROR, + "%s: changing to %d not supported\n", +@@ -1214,12 +1216,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + case NL80211_IFTYPE_P2P_GO: + return mwifiex_change_vif_to_p2p(dev, curr_iftype, + type, params); +- case NL80211_IFTYPE_UNSPECIFIED: +- mwifiex_dbg(priv->adapter, INFO, +- "%s: kept type as AP\n", dev->name); +- fallthrough; +- case NL80211_IFTYPE_AP: /* This shouldn't happen */ +- return 0; + default: + mwifiex_dbg(priv->adapter, ERROR, + "%s: changing to %d not supported\n", +@@ -1254,13 +1250,6 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return -EFAULT; + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); +- case NL80211_IFTYPE_UNSPECIFIED: +- mwifiex_dbg(priv->adapter, INFO, +- "%s: kept type as P2P\n", dev->name); +- fallthrough; +- case NL80211_IFTYPE_P2P_CLIENT: +- case NL80211_IFTYPE_P2P_GO: +- return 0; + default: + mwifiex_dbg(priv->adapter, ERROR, + "%s: changing to %d not supported\n", +-- +2.31.0 + +From 7a0a5f2c57d7ee8734717fddc809fc841af24996 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Wed, 11 Nov 2020 12:44:39 +0100 +Subject: [PATCH] mwifiex: Use function to check whether interface type change + is allowed + +Instead of bailing out in the function which is supposed to do the type +change, detect invalid changes beforehand using a generic function and +return an error if the change is not allowed. + +Patchset: wifi +--- + .../net/wireless/marvell/mwifiex/cfg80211.c | 139 ++++++++++++------ + 1 file changed, 92 insertions(+), 47 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index d50fd8570475..3a79a55bbfd2 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -939,6 +939,76 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv, + return 0; + } + ++static bool ++is_vif_type_change_allowed(struct mwifiex_adapter *adapter, ++ enum nl80211_iftype old_iftype, ++ enum nl80211_iftype new_iftype) ++{ ++ switch (old_iftype) { ++ case NL80211_IFTYPE_ADHOC: ++ switch (new_iftype) { ++ case NL80211_IFTYPE_STATION: ++ return true; ++ case NL80211_IFTYPE_P2P_CLIENT: ++ case NL80211_IFTYPE_P2P_GO: ++ return adapter->curr_iface_comb.p2p_intf != ++ adapter->iface_limit.p2p_intf; ++ case NL80211_IFTYPE_AP: ++ return adapter->curr_iface_comb.uap_intf != ++ adapter->iface_limit.uap_intf; ++ default: ++ return false; ++ } ++ ++ case NL80211_IFTYPE_STATION: ++ switch (new_iftype) { ++ case NL80211_IFTYPE_ADHOC: ++ return true; ++ case NL80211_IFTYPE_P2P_CLIENT: ++ case NL80211_IFTYPE_P2P_GO: ++ return adapter->curr_iface_comb.p2p_intf != ++ adapter->iface_limit.p2p_intf; ++ case NL80211_IFTYPE_AP: ++ return adapter->curr_iface_comb.uap_intf != ++ adapter->iface_limit.uap_intf; ++ default: ++ return false; ++ } ++ ++ case NL80211_IFTYPE_AP: ++ switch (new_iftype) { ++ case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: ++ return adapter->curr_iface_comb.sta_intf != ++ adapter->iface_limit.sta_intf; ++ case NL80211_IFTYPE_P2P_CLIENT: ++ case NL80211_IFTYPE_P2P_GO: ++ return adapter->curr_iface_comb.p2p_intf != ++ adapter->iface_limit.p2p_intf; ++ default: ++ return false; ++ } ++ ++ case NL80211_IFTYPE_P2P_CLIENT: ++ case NL80211_IFTYPE_P2P_GO: ++ switch (new_iftype) { ++ case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: ++ return true; ++ case NL80211_IFTYPE_AP: ++ return adapter->curr_iface_comb.uap_intf != ++ adapter->iface_limit.uap_intf; ++ default: ++ return false; ++ } ++ ++ default: ++ break; ++ } ++ ++ return false; ++} ++ + static int + mwifiex_change_vif_to_p2p(struct net_device *dev, + enum nl80211_iftype curr_iftype, +@@ -955,13 +1025,6 @@ mwifiex_change_vif_to_p2p(struct net_device *dev, + + adapter = priv->adapter; + +- if (adapter->curr_iface_comb.p2p_intf == +- adapter->iface_limit.p2p_intf) { +- mwifiex_dbg(adapter, ERROR, +- "cannot create multiple P2P ifaces\n"); +- return -1; +- } +- + mwifiex_dbg(adapter, INFO, + "%s: changing role to p2p\n", dev->name); + +@@ -1027,15 +1090,6 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev, + + adapter = priv->adapter; + +- if ((curr_iftype != NL80211_IFTYPE_P2P_CLIENT && +- curr_iftype != NL80211_IFTYPE_P2P_GO) && +- (adapter->curr_iface_comb.sta_intf == +- adapter->iface_limit.sta_intf)) { +- mwifiex_dbg(adapter, ERROR, +- "cannot create multiple station/adhoc ifaces\n"); +- return -1; +- } +- + if (type == NL80211_IFTYPE_STATION) + mwifiex_dbg(adapter, INFO, + "%s: changing role to station\n", dev->name); +@@ -1086,13 +1140,6 @@ mwifiex_change_vif_to_ap(struct net_device *dev, + + adapter = priv->adapter; + +- if (adapter->curr_iface_comb.uap_intf == +- adapter->iface_limit.uap_intf) { +- mwifiex_dbg(adapter, ERROR, +- "cannot create multiple AP ifaces\n"); +- return -1; +- } +- + mwifiex_dbg(adapter, INFO, + "%s: changing role to AP\n", dev->name); + +@@ -1155,6 +1202,13 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return 0; + } + ++ if (!is_vif_type_change_allowed(priv->adapter, curr_iftype, type)) { ++ mwifiex_dbg(priv->adapter, ERROR, ++ "%s: change from type %d to %d is not allowed\n", ++ dev->name, curr_iftype, type); ++ return -EOPNOTSUPP; ++ } ++ + switch (curr_iftype) { + case NL80211_IFTYPE_ADHOC: + switch (type) { +@@ -1175,12 +1229,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); + default: +- mwifiex_dbg(priv->adapter, ERROR, +- "%s: changing to %d not supported\n", +- dev->name, type); +- return -EOPNOTSUPP; ++ goto errnotsupp; + } +- break; ++ + case NL80211_IFTYPE_STATION: + switch (type) { + case NL80211_IFTYPE_ADHOC: +@@ -1200,12 +1251,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); + default: +- mwifiex_dbg(priv->adapter, ERROR, +- "%s: changing to %d not supported\n", +- dev->name, type); +- return -EOPNOTSUPP; ++ goto errnotsupp; + } +- break; ++ + case NL80211_IFTYPE_AP: + switch (type) { + case NL80211_IFTYPE_ADHOC: +@@ -1217,12 +1265,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return mwifiex_change_vif_to_p2p(dev, curr_iftype, + type, params); + default: +- mwifiex_dbg(priv->adapter, ERROR, +- "%s: changing to %d not supported\n", +- dev->name, type); +- return -EOPNOTSUPP; ++ goto errnotsupp; + } +- break; ++ + case NL80211_IFTYPE_P2P_CLIENT: + case NL80211_IFTYPE_P2P_GO: + switch (type) { +@@ -1251,21 +1296,21 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); + default: +- mwifiex_dbg(priv->adapter, ERROR, +- "%s: changing to %d not supported\n", +- dev->name, type); +- return -EOPNOTSUPP; ++ goto errnotsupp; + } +- break; ++ + default: +- mwifiex_dbg(priv->adapter, ERROR, +- "%s: unknown iftype: %d\n", +- dev->name, dev->ieee80211_ptr->iftype); +- return -EOPNOTSUPP; ++ goto errnotsupp; + } + + + return 0; ++ ++errnotsupp: ++ mwifiex_dbg(priv->adapter, ERROR, ++ "unsupported interface type transition: %d to %d\n", ++ curr_iftype, type); ++ return -EOPNOTSUPP; + } + + static void +-- +2.31.0 + +From 66684e715db286f46230c5f9f157ee4b7203575a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Wed, 11 Nov 2020 13:33:04 +0100 +Subject: [PATCH] mwifiex: Run SET_BSS_MODE when changing from P2P to STATION + vif-type + +We currently handle changing from the P2P to the STATION virtual +interface type slightly different than changing from P2P to ADHOC: When +changing to STATION, we don't send the SET_BSS_MODE command. We do send +that command on all other type-changes though, and it probably makes +sense to send the command since after all we just changed our BSS_MODE. +Looking at prior changes to this part of the code, it seems that this is +simply a leftover from old refactorings. + +Since sending the SET_BSS_MODE command is the only difference between +mwifiex_change_vif_to_sta_adhoc() and the current code, we can now use +mwifiex_change_vif_to_sta_adhoc() for both switching to ADHOC and +STATION interface type. + +This does not fix any particular bug and just "looked right", so there's +a small chance it might be a regression. + +Patchset: wifi +--- + .../net/wireless/marvell/mwifiex/cfg80211.c | 22 ++++--------------- + 1 file changed, 4 insertions(+), 18 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index 3a79a55bbfd2..66e978088061 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -1270,29 +1270,15 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + + case NL80211_IFTYPE_P2P_CLIENT: + case NL80211_IFTYPE_P2P_GO: ++ if (mwifiex_cfg80211_deinit_p2p(priv)) ++ return -EFAULT; ++ + switch (type) { +- case NL80211_IFTYPE_STATION: +- if (mwifiex_cfg80211_deinit_p2p(priv)) +- return -EFAULT; +- priv->adapter->curr_iface_comb.p2p_intf--; +- priv->adapter->curr_iface_comb.sta_intf++; +- dev->ieee80211_ptr->iftype = type; +- if (mwifiex_deinit_priv_params(priv)) +- return -1; +- if (mwifiex_init_new_priv_params(priv, dev, type)) +- return -1; +- if (mwifiex_sta_init_cmd(priv, false, false)) +- return -1; +- break; + case NL80211_IFTYPE_ADHOC: +- if (mwifiex_cfg80211_deinit_p2p(priv)) +- return -EFAULT; ++ case NL80211_IFTYPE_STATION: + return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, + type, params); +- break; + case NL80211_IFTYPE_AP: +- if (mwifiex_cfg80211_deinit_p2p(priv)) +- return -EFAULT; + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); + default: +-- +2.31.0 + +From 8a9fd20406edff99502a114fc630cd35556e0421 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Wed, 11 Nov 2020 14:42:54 +0100 +Subject: [PATCH] mwifiex: Use helper function for counting interface types + +Use a small helper function to increment and decrement the counter of +the interface types we currently manage. This makes the code that +actually changes and sets up the interface type a bit less messy and +also helps avoiding mistakes in case someone increments/decrements a +counter wrongly. + +Patchset: wifi +--- + .../net/wireless/marvell/mwifiex/cfg80211.c | 110 ++++++------------ + 1 file changed, 35 insertions(+), 75 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index 66e978088061..db30f595e9f9 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -1009,6 +1009,32 @@ is_vif_type_change_allowed(struct mwifiex_adapter *adapter, + return false; + } + ++static void ++update_vif_type_counter(struct mwifiex_adapter *adapter, ++ enum nl80211_iftype iftype, ++ int change) ++{ ++ switch (iftype) { ++ case NL80211_IFTYPE_UNSPECIFIED: ++ case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: ++ adapter->curr_iface_comb.sta_intf += change; ++ break; ++ case NL80211_IFTYPE_AP: ++ adapter->curr_iface_comb.uap_intf += change; ++ break; ++ case NL80211_IFTYPE_P2P_CLIENT: ++ case NL80211_IFTYPE_P2P_GO: ++ adapter->curr_iface_comb.p2p_intf += change; ++ break; ++ default: ++ mwifiex_dbg(adapter, ERROR, ++ "%s: Unsupported iftype passed: %d\n", ++ __func__, iftype); ++ break; ++ } ++} ++ + static int + mwifiex_change_vif_to_p2p(struct net_device *dev, + enum nl80211_iftype curr_iftype, +@@ -1056,19 +1082,8 @@ mwifiex_change_vif_to_p2p(struct net_device *dev, + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- switch (curr_iftype) { +- case NL80211_IFTYPE_STATION: +- case NL80211_IFTYPE_ADHOC: +- adapter->curr_iface_comb.sta_intf--; +- break; +- case NL80211_IFTYPE_AP: +- adapter->curr_iface_comb.uap_intf--; +- break; +- default: +- break; +- } +- +- adapter->curr_iface_comb.p2p_intf++; ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); + dev->ieee80211_ptr->iftype = type; + + return 0; +@@ -1107,20 +1122,10 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev, + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- switch (curr_iftype) { +- case NL80211_IFTYPE_P2P_CLIENT: +- case NL80211_IFTYPE_P2P_GO: +- adapter->curr_iface_comb.p2p_intf--; +- break; +- case NL80211_IFTYPE_AP: +- adapter->curr_iface_comb.uap_intf--; +- break; +- default: +- break; +- } +- +- adapter->curr_iface_comb.sta_intf++; ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); + dev->ieee80211_ptr->iftype = type; ++ + return 0; + } + +@@ -1153,20 +1158,8 @@ mwifiex_change_vif_to_ap(struct net_device *dev, + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- switch (curr_iftype) { +- case NL80211_IFTYPE_P2P_CLIENT: +- case NL80211_IFTYPE_P2P_GO: +- adapter->curr_iface_comb.p2p_intf--; +- break; +- case NL80211_IFTYPE_STATION: +- case NL80211_IFTYPE_ADHOC: +- adapter->curr_iface_comb.sta_intf--; +- break; +- default: +- break; +- } +- +- adapter->curr_iface_comb.uap_intf++; ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); + dev->ieee80211_ptr->iftype = type; + return 0; + } +@@ -3114,23 +3107,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, + mwifiex_dev_debugfs_init(priv); + #endif + +- switch (type) { +- case NL80211_IFTYPE_UNSPECIFIED: +- case NL80211_IFTYPE_STATION: +- case NL80211_IFTYPE_ADHOC: +- adapter->curr_iface_comb.sta_intf++; +- break; +- case NL80211_IFTYPE_AP: +- adapter->curr_iface_comb.uap_intf++; +- break; +- case NL80211_IFTYPE_P2P_CLIENT: +- adapter->curr_iface_comb.p2p_intf++; +- break; +- default: +- /* This should be dead code; checked above */ +- mwifiex_dbg(adapter, ERROR, "type not supported\n"); +- return ERR_PTR(-EINVAL); +- } ++ update_vif_type_counter(adapter, type, +1); + + return &priv->wdev; + +@@ -3196,24 +3173,7 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) + /* Clear the priv in adapter */ + priv->netdev = NULL; + +- switch (priv->bss_mode) { +- case NL80211_IFTYPE_UNSPECIFIED: +- case NL80211_IFTYPE_STATION: +- case NL80211_IFTYPE_ADHOC: +- adapter->curr_iface_comb.sta_intf--; +- break; +- case NL80211_IFTYPE_AP: +- adapter->curr_iface_comb.uap_intf--; +- break; +- case NL80211_IFTYPE_P2P_CLIENT: +- case NL80211_IFTYPE_P2P_GO: +- adapter->curr_iface_comb.p2p_intf--; +- break; +- default: +- mwifiex_dbg(adapter, ERROR, +- "del_virtual_intf: type not supported\n"); +- break; +- } ++ update_vif_type_counter(adapter, priv->bss_mode, -1); + + priv->bss_mode = NL80211_IFTYPE_UNSPECIFIED; + +-- +2.31.0 + +From 8c4ed414d5dfc88289cb79a772d952276fe9abd5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Fri, 26 Mar 2021 15:56:58 +0100 +Subject: [PATCH] mwifiex: Update virtual interface counters right after + setting bss_type + +In mwifiex_init_new_priv_params() we update our private driver state to +reflect the currently selected virtual interface type. Most notably we +set the bss_mode to the mode we're going to put the firmware in. + +Now after we updated the driver state we actually start talking to the +firmware and instruct it to set up the new mode. Those commands can and +will sometimes fail, in which case we return with an error from +mwifiex_change_vif_to_*. We currently update our virtual interface type +counters after this return, which means the code is never reached when a +firmware error happens and we never update the counters. Since we have +updated our bss_mode earlier though, the counters now no longer reflect +the actual state of the driver. + +This will break things on the next virtual interface change, because the +virtual interface type we're switching away from didn't get its counter +incremented, and we end up decrementing a 0-counter. + +To fix this, simply update the virtual interface type counters right +after updating our driver structures, so that they are always in sync. + +Patchset: wifi +--- + .../net/wireless/marvell/mwifiex/cfg80211.c | 25 +++++++++++-------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index db30f595e9f9..60de1cec77c7 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -1059,6 +1059,10 @@ mwifiex_change_vif_to_p2p(struct net_device *dev, + if (mwifiex_init_new_priv_params(priv, dev, type)) + return -1; + ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); ++ dev->ieee80211_ptr->iftype = type; ++ + switch (type) { + case NL80211_IFTYPE_P2P_CLIENT: + if (mwifiex_cfg80211_init_p2p_client(priv)) +@@ -1082,10 +1086,6 @@ mwifiex_change_vif_to_p2p(struct net_device *dev, + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- update_vif_type_counter(adapter, curr_iftype, -1); +- update_vif_type_counter(adapter, type, +1); +- dev->ieee80211_ptr->iftype = type; +- + return 0; + } + +@@ -1116,16 +1116,17 @@ mwifiex_change_vif_to_sta_adhoc(struct net_device *dev, + return -1; + if (mwifiex_init_new_priv_params(priv, dev, type)) + return -1; ++ ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); ++ dev->ieee80211_ptr->iftype = type; ++ + if (mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE, + HostCmd_ACT_GEN_SET, 0, NULL, true)) + return -1; + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- update_vif_type_counter(adapter, curr_iftype, -1); +- update_vif_type_counter(adapter, type, +1); +- dev->ieee80211_ptr->iftype = type; +- + return 0; + } + +@@ -1152,15 +1153,17 @@ mwifiex_change_vif_to_ap(struct net_device *dev, + return -1; + if (mwifiex_init_new_priv_params(priv, dev, type)) + return -1; ++ ++ update_vif_type_counter(adapter, curr_iftype, -1); ++ update_vif_type_counter(adapter, type, +1); ++ dev->ieee80211_ptr->iftype = type; ++ + if (mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE, + HostCmd_ACT_GEN_SET, 0, NULL, true)) + return -1; + if (mwifiex_sta_init_cmd(priv, false, false)) + return -1; + +- update_vif_type_counter(adapter, curr_iftype, -1); +- update_vif_type_counter(adapter, type, +1); +- dev->ieee80211_ptr->iftype = type; + return 0; + } + /* +-- +2.31.0 + +From 30db63046507c9c2f8b4c761366b5341a86809ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Wed, 11 Nov 2020 13:42:40 +0100 +Subject: [PATCH] mwifiex: Allow switching interface type from P2P_CLIENT to + P2P_GO + +It's possible to change virtual interface type between P2P_CLIENT and +P2P_GO, the card supports that just fine, and it happens for example +when using miracast with the miraclecast software. + +So allow type changes between P2P_CLIENT and P2P_GO and simply call into +mwifiex_change_vif_to_p2p(), which handles this just fine. We have to +call mwifiex_cfg80211_deinit_p2p() before though to make sure the old +p2p mode is properly uninitialized. + +Patchset: wifi +--- + .../net/wireless/marvell/mwifiex/cfg80211.c | 36 +++++++++++++++++++ + 1 file changed, 36 insertions(+) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index 60de1cec77c7..a37b504bd084 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -990,11 +990,26 @@ is_vif_type_change_allowed(struct mwifiex_adapter *adapter, + } + + case NL80211_IFTYPE_P2P_CLIENT: ++ switch (new_iftype) { ++ case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: ++ return true; ++ case NL80211_IFTYPE_P2P_GO: ++ return true; ++ case NL80211_IFTYPE_AP: ++ return adapter->curr_iface_comb.uap_intf != ++ adapter->iface_limit.uap_intf; ++ default: ++ return false; ++ } ++ + case NL80211_IFTYPE_P2P_GO: + switch (new_iftype) { + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_STATION: + return true; ++ case NL80211_IFTYPE_P2P_CLIENT: ++ return true; + case NL80211_IFTYPE_AP: + return adapter->curr_iface_comb.uap_intf != + adapter->iface_limit.uap_intf; +@@ -1265,6 +1280,24 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + } + + case NL80211_IFTYPE_P2P_CLIENT: ++ if (mwifiex_cfg80211_deinit_p2p(priv)) ++ return -EFAULT; ++ ++ switch (type) { ++ case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: ++ return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, ++ type, params); ++ case NL80211_IFTYPE_P2P_GO: ++ return mwifiex_change_vif_to_p2p(dev, curr_iftype, ++ type, params); ++ case NL80211_IFTYPE_AP: ++ return mwifiex_change_vif_to_ap(dev, curr_iftype, type, ++ params); ++ default: ++ goto errnotsupp; ++ } ++ + case NL80211_IFTYPE_P2P_GO: + if (mwifiex_cfg80211_deinit_p2p(priv)) + return -EFAULT; +@@ -1274,6 +1307,9 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + case NL80211_IFTYPE_STATION: + return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, + type, params); ++ case NL80211_IFTYPE_P2P_CLIENT: ++ return mwifiex_change_vif_to_p2p(dev, curr_iftype, ++ type, params); + case NL80211_IFTYPE_AP: + return mwifiex_change_vif_to_ap(dev, curr_iftype, type, + params); +-- +2.31.0 + +From dd92b70177a8b7b457d9eddcc373aeaa8073ecc0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Fri, 26 Mar 2021 15:31:08 +0100 +Subject: [PATCH] mwifiex: Handle interface type changes from AP to STATION + +Looks like this case was simply overseen, so handle it, too. + +Patchset: wifi +--- + drivers/net/wireless/marvell/mwifiex/cfg80211.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index a37b504bd084..e65f285e3efe 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -1268,6 +1268,7 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, + case NL80211_IFTYPE_AP: + switch (type) { + case NL80211_IFTYPE_ADHOC: ++ case NL80211_IFTYPE_STATION: + return mwifiex_change_vif_to_sta_adhoc(dev, curr_iftype, + type, params); + break; +-- +2.31.0 + +From abedd26878159cf75b6f303164eb678803e8d591 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Fri, 26 Mar 2021 15:32:16 +0100 +Subject: [PATCH] mwifiex: Properly initialize private structure on interface + type changes + +When creating a new virtual interface in mwifiex_add_virtual_intf(), we +update our internal driver states like bss_type, bss_priority, bss_role +and bss_mode to reflect the mode the firmware will be set to. + +When switching virtual interface mode using +mwifiex_init_new_priv_params() though, we currently only update bss_mode +and bss_role. In order for the interface mode switch to actually work, +we also need to update bss_type to its proper value, so do that. + +This fixes a crash of the firmware (because the driver tries to execute +commands that are invalid in AP mode) when switching from station mode +to AP mode. + +Patchset: wifi +--- + drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index e65f285e3efe..a290312313f3 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -908,16 +908,20 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv, + switch (type) { + case NL80211_IFTYPE_STATION: + case NL80211_IFTYPE_ADHOC: +- priv->bss_role = MWIFIEX_BSS_ROLE_STA; ++ priv->bss_role = MWIFIEX_BSS_ROLE_STA; ++ priv->bss_type = MWIFIEX_BSS_TYPE_STA; + break; + case NL80211_IFTYPE_P2P_CLIENT: +- priv->bss_role = MWIFIEX_BSS_ROLE_STA; ++ priv->bss_role = MWIFIEX_BSS_ROLE_STA; ++ priv->bss_type = MWIFIEX_BSS_TYPE_P2P; + break; + case NL80211_IFTYPE_P2P_GO: +- priv->bss_role = MWIFIEX_BSS_ROLE_UAP; ++ priv->bss_role = MWIFIEX_BSS_ROLE_UAP; ++ priv->bss_type = MWIFIEX_BSS_TYPE_P2P; + break; + case NL80211_IFTYPE_AP: + priv->bss_role = MWIFIEX_BSS_ROLE_UAP; ++ priv->bss_type = MWIFIEX_BSS_TYPE_UAP; + break; + default: + mwifiex_dbg(adapter, ERROR, +-- +2.31.0 + +From 3ecb0807a4af4e8bf90aa27e984dbecd3dd6f357 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Sat, 27 Mar 2021 12:19:14 +0100 +Subject: [PATCH] mwifiex: Fix copy-paste mistake when creating virtual + interface + +The BSS priority here for a new P2P_CLIENT device was accidentally set +to an enum that's certainly not meant for this. Since +MWIFIEX_BSS_ROLE_STA is 0 anyway, we can just set the bss_priority to 0 +instead here. + +Patchset: wifi +--- + drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +index a290312313f3..1e1cf523e228 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c +@@ -3040,7 +3040,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, + priv->bss_type = MWIFIEX_BSS_TYPE_P2P; + + priv->frame_type = MWIFIEX_DATA_FRAME_TYPE_ETH_II; +- priv->bss_priority = MWIFIEX_BSS_ROLE_STA; ++ priv->bss_priority = 0; + priv->bss_role = MWIFIEX_BSS_ROLE_STA; + priv->bss_started = 0; + +-- +2.31.0 + +From c8308fa6952959f216d22802e42d162a2db66858 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Tue, 10 Nov 2020 12:49:56 +0100 +Subject: [PATCH] mwifiex: Use non-posted PCI register writes + +On the 88W8897 card it's very important the TX ring write pointer is +updated correctly to its new value before setting the TX ready +interrupt, otherwise the firmware appears to crash (probably because +it's trying to DMA-read from the wrong place). + +Since PCI uses "posted writes" when writing to a register, it's not +guaranteed that a write will happen immediately. That means the pointer +might be outdated when setting the TX ready interrupt, leading to +firmware crashes especially when ASPM L1 and L1 substates are enabled +(because of the higher link latency, the write will probably take +longer). + +So fix those firmware crashes by always forcing non-posted writes. We do +that by simply reading back the register after writing it, just as a lot +of other drivers do. + +There are two reproducers that are fixed with this patch: + +1) During rx/tx traffic and with ASPM L1 substates enabled (the enabled +substates are platform dependent), the firmware crashes and eventually a +command timeout appears in the logs. That crash is fixed by using a +non-posted write in mwifiex_pcie_send_data(). + +2) When sending lots of commands to the card, waking it up from sleep in +very quick intervals, the firmware eventually crashes. That crash +appears to be fixed by some other non-posted write included here. + +Patchset: wifi +--- + drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c +index 9ac12ff4a5c1..4123c8bb6b6f 100644 +--- a/drivers/net/wireless/marvell/mwifiex/pcie.c ++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c +@@ -237,6 +237,12 @@ static int mwifiex_write_reg(struct mwifiex_adapter *adapter, int reg, u32 data) + + iowrite32(data, card->pci_mmap1 + reg); + ++ /* Do a read-back, which makes the write non-posted, ensuring the ++ * completion before returning. ++ * The firmware of the 88W8897 card is buggy and this avoids crashes. ++ */ ++ ioread32(card->pci_mmap1 + reg); ++ + return 0; } -- -2.30.2 +2.31.0 -From 5fa74c3c58172e900c5963470349522907e17aa6 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 +From 27ff118a76d7319446a6a88c6333b64b4521d563 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= +Date: Sun, 28 Mar 2021 21:10:06 +0200 +Subject: [PATCH] mwifiex: Try waking the firmware until we get an interrupt -At least on Surface devices, the ps_mode causes connection unstable, -especially with 5GHz APs. Then, it eventually causes fw crashing. +It seems that the firmware of the 88W8897 card sometimes ignores or +misses when we try to wake it up by reading the firmware status +register. This leads to the firmware wakeup timeout expiring and the +driver resetting the card because we assume the firmware has hung up or +crashed (unfortunately that's not unlikely with this card). -This commit disables ps_mode by default instead of enabling it. +Turns out that most of the time the firmware actually didn't hang up, +but simply "missed" our wakeup request and doesn't send us an AWAKE +event. -Required code is extracted from mwifiex_drv_set_power(). +Trying again to read the firmware status register after a short timeout +usually makes the firmware wake we up as expected, so add a small retry +loop to mwifiex_pm_wakeup_card() that looks at the interrupt status to +check whether the card woke up. + +The number of tries and timeout lengths for this were determined +experimentally: The firmware usually takes about 500 us to wake up +after we attempt to read the status register. In some cases where the +firmware is very busy (for example while doing a bluetooth scan) it +might even miss our requests for multiple milliseconds, which is why +after 15 tries the waiting time gets increased to 10 ms. The maximum +number of tries it took to wake the firmware when testing this was +around 20, so a maximum number of 50 tries should give us plenty of +safety margin. + +A good reproducer for this issue is letting the firmware sleep and wake +up in very short intervals, for example by pinging an device on the +network every 0.1 seconds. -Signed-off-by: Tsuchiya Yuto Patchset: wifi --- - drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) + drivers/net/wireless/marvell/mwifiex/pcie.c | 29 ++++++++++++++++----- + 1 file changed, 23 insertions(+), 6 deletions(-) -diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -index d3a968ef21ef..9b7b52fbc9c4 100644 ---- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c -@@ -2333,14 +2333,19 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init) - return -1; +diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c +index 4123c8bb6b6f..b5491509d6a2 100644 +--- a/drivers/net/wireless/marvell/mwifiex/pcie.c ++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c +@@ -665,6 +665,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) + { + struct pcie_service_card *card = adapter->card; + const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; ++ int n_tries = 0; - if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { -- /* Enable IEEE PS by default */ -- priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP; -+ /* Disable IEEE PS by default */ -+ priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_CAM; - ret = mwifiex_send_cmd(priv, - HostCmd_CMD_802_11_PS_MODE_ENH, -- EN_AUTO_PS, BITMAP_STA_PS, NULL, -+ DIS_AUTO_PS, BITMAP_STA_PS, NULL, - true); - if (ret) - return -1; -+ ret = mwifiex_send_cmd(priv, -+ HostCmd_CMD_802_11_PS_MODE_ENH, -+ GET_PS, 0, NULL, false); -+ if (ret) -+ return -1; - } + mwifiex_dbg(adapter, EVENT, + "event: Wakeup device...\n"); +@@ -672,12 +673,28 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) + if (reg->sleep_cookie) + mwifiex_pcie_dev_wakeup_delay(adapter); - if (drcs) { +- /* Accessing fw_status register will wakeup device */ +- if (mwifiex_write_reg(adapter, reg->fw_status, FIRMWARE_READY_PCIE)) { +- mwifiex_dbg(adapter, ERROR, +- "Writing fw_status register failed\n"); +- return -1; +- } ++ /* Access the fw_status register to wake up the device. ++ * Since the 88W8897 firmware sometimes appears to ignore or miss ++ * that wakeup request, we continue trying until we receive an ++ * interrupt from the card. ++ */ ++ do { ++ if (mwifiex_write_reg(adapter, reg->fw_status, FIRMWARE_READY_PCIE)) { ++ mwifiex_dbg(adapter, ERROR, ++ "Writing fw_status register failed\n"); ++ return -1; ++ } ++ ++ n_tries++; ++ ++ if (n_tries <= 15) ++ usleep_range(400, 700); ++ else ++ msleep(10); ++ } while (n_tries <= 50 && READ_ONCE(adapter->int_status) == 0); ++ ++ mwifiex_dbg(adapter, EVENT, ++ "event: Tried %d times until firmware woke up\n", n_tries); + + if (reg->sleep_cookie) { + mwifiex_pcie_dev_wakeup_delay(adapter); -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0003-ipts.patch b/patches/5.11/0003-ipts.patch index 066a3f036..e8963c2fd 100644 --- a/patches/5.11/0003-ipts.patch +++ b/patches/5.11/0003-ipts.patch @@ -1,4 +1,4 @@ -From 0af559d599e26e22dbd9d48df6011674fe872d4c Mon Sep 17 00:00:00 2001 +From 91c1d0698afc3c81905651232ca1d52ea92d9542 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Thu, 30 Jul 2020 13:21:53 +0200 Subject: [PATCH] misc: mei: Add missing IPTS device IDs @@ -34,9 +34,9 @@ index a7e179626b63..fdcc0eedc49f 100644 {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_TGP_H, MEI_ME_PCH15_SPS_CFG)}, -- -2.30.2 +2.31.0 -From 14a1ecff6afa2411c31b5797eaab950419f76c21 Mon Sep 17 00:00:00 2001 +From eb288ff77b396a6833237a950f40e41dd40fe011 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Thu, 25 Feb 2021 09:37:47 +0100 Subject: [PATCH] misc: mei: Remove client devices before shutting down bus @@ -63,9 +63,9 @@ index bcee77768b91..21ed765003e1 100644 mei_cancel_work(dev); -- -2.30.2 +2.31.0 -From b3d131d48a4585e8f02f87cddf57d950427e8541 Mon Sep 17 00:00:00 2001 +From f39f0f0c81d66f27fcbee988266e84300c9a5ab6 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Thu, 6 Aug 2020 11:20:41 +0200 Subject: [PATCH] misc: Add support for Intel Precise Touch & Stylus @@ -1530,5 +1530,5 @@ index 000000000000..53fb86a88f97 + +#endif /* _IPTS_UAPI_H_ */ -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0004-surface-sam-over-hid.patch b/patches/5.11/0004-surface-sam-over-hid.patch index 52d750474..de9667ff2 100644 --- a/patches/5.11/0004-surface-sam-over-hid.patch +++ b/patches/5.11/0004-surface-sam-over-hid.patch @@ -1,4 +1,4 @@ -From 68cd14de7a5df97b8dba160a116fe5596c84fee4 Mon Sep 17 00:00:00 2001 +From 02fcd1ef94143c2ad0cb7b76fcee1dc7daa8a6d7 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 @@ -108,9 +108,9 @@ index 37c510d9347a..aed579942436 100644 dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n", accessor_type, client->addr); -- -2.30.2 +2.31.0 -From c6612d79e80e2fd300ef5ca9d35ddc0c1658bdcd Mon Sep 17 00:00:00 2001 +From 09075d4c0946438018a185b86eac9dce15b29827 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 13 Feb 2021 16:41:18 +0100 Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch @@ -330,5 +330,5 @@ index 000000000000..8b816ed8f35c +MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0005-surface-sam.patch b/patches/5.11/0005-surface-sam.patch index c38540690..9bd63e61b 100644 --- a/patches/5.11/0005-surface-sam.patch +++ b/patches/5.11/0005-surface-sam.patch @@ -1,4 +1,4 @@ -From ac8ce29f97a7e4283006d5487858f7481c8f88e0 Mon Sep 17 00:00:00 2001 +From 0c700275d9f211fd8a11f7d6614e2f520638ba1f Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:51 +0100 Subject: [PATCH] platform/surface: Add Surface Aggregator subsystem @@ -79,10 +79,10 @@ Patchset: surface-sam create mode 100644 include/linux/surface_aggregator/serial_hub.h diff --git a/MAINTAINERS b/MAINTAINERS -index bfc1b86e3e73..2818a31d79db 100644 +index b6ab9c1a2119..530792c869c4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11807,6 +11807,14 @@ L: platform-driver-x86@vger.kernel.org +@@ -11806,6 +11806,14 @@ L: platform-driver-x86@vger.kernel.org S: Supported F: drivers/platform/surface/surfacepro3_button.c @@ -9158,9 +9158,9 @@ index 000000000000..64276fbfa1d5 + +#endif /* _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H */ -- -2.30.2 +2.31.0 -From 4aca10233239ba18ccdd6c6ea4f4e4fa752a2591 Mon Sep 17 00:00:00 2001 +From 8371b5f32f7ec7a9fedb20d1a7c8e18429e13633 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:52 +0100 Subject: [PATCH] platform/surface: aggregator: Add control packet allocation @@ -9320,9 +9320,9 @@ index 058f111292ca..e8757d03f279 100644 + #endif /* _SURFACE_AGGREGATOR_SSH_PACKET_LAYER_H */ -- -2.30.2 +2.31.0 -From 713a29e397995cc3ed6fdf9b5b3ae2db84eafaec Mon Sep 17 00:00:00 2001 +From dda656831cf11f505423f8edd5dd527f0606377c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:53 +0100 Subject: [PATCH] platform/surface: aggregator: Add event item allocation @@ -9548,9 +9548,9 @@ index 60d312f71436..37593234fb31 100644 } module_exit(ssam_core_exit); -- -2.30.2 +2.31.0 -From ba922482ece91e378e66cd859c21478f75e3b35a Mon Sep 17 00:00:00 2001 +From 7375917efd1285a1f7345d3a1e61374890f139a4 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:54 +0100 Subject: [PATCH] platform/surface: aggregator: Add trace points @@ -10442,9 +10442,9 @@ index 000000000000..dcca8007d876 + +#include -- -2.30.2 +2.31.0 -From 10839d18b1dc77bc91b759cb58399adebd08ad77 Mon Sep 17 00:00:00 2001 +From 65bd02ca093d1733cb54549a9751638451b52384 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:55 +0100 Subject: [PATCH] platform/surface: aggregator: Add error injection @@ -10951,9 +10951,9 @@ index dcca8007d876..eb332bb53ae4 100644 DEFINE_SSAM_FREE_EVENT(ctrl_packet_free); -- -2.30.2 +2.31.0 -From 740abde0aabc40926ed95d87681bbe0be0912760 Mon Sep 17 00:00:00 2001 +From b13806dafeff14be6cdaad9736d7c9327fe822ac Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:56 +0100 Subject: [PATCH] platform/surface: aggregator: Add dedicated bus and device @@ -12050,9 +12050,9 @@ index fb4827027536..d21d2871387b 100644 /* Create MODULE_ALIAS() statements. -- -2.30.2 +2.31.0 -From b3ad47735284dcdaf63aacd1a90e3f38f119f549 Mon Sep 17 00:00:00 2001 +From e17f8d603291fa603359d2ad132ea776dcfc1bfb Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:57 +0100 Subject: [PATCH] docs: driver-api: Add Surface Aggregator subsystem @@ -13677,10 +13677,10 @@ index 000000000000..bf007d6c9873 +frames) and at most three pending commands. The limit to synchronous frame +transfers seems to be consistent with behavior observed on Windows. diff --git a/MAINTAINERS b/MAINTAINERS -index 2818a31d79db..c89d831e74e0 100644 +index 530792c869c4..8e6fe82c1072 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11812,6 +11812,7 @@ M: Maximilian Luz +@@ -11811,6 +11811,7 @@ M: Maximilian Luz S: Maintained W: https://github.com/linux-surface/surface-aggregator-module C: irc://chat.freenode.net/##linux-surface @@ -13689,9 +13689,9 @@ index 2818a31d79db..c89d831e74e0 100644 F: include/linux/surface_aggregator/ -- -2.30.2 +2.31.0 -From 59a21b4afe5ffd5dead6b8ce596d8c7fe4f55516 Mon Sep 17 00:00:00 2001 +From 461efa8828105b740589ec8673adfe78a403945c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:58 +0100 Subject: [PATCH] platform/surface: Add Surface Aggregator user-space interface @@ -13854,10 +13854,10 @@ index a4c75a28c839..b5231d7f9200 100644 0xAB 00-1F linux/nbd.h 0xAC 00-1F linux/raw.h diff --git a/MAINTAINERS b/MAINTAINERS -index c89d831e74e0..5d15622ce47d 100644 +index 8e6fe82c1072..b45df8ec687f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11814,7 +11814,9 @@ W: https://github.com/linux-surface/surface-aggregator-module +@@ -11813,7 +11813,9 @@ W: https://github.com/linux-surface/surface-aggregator-module C: irc://chat.freenode.net/##linux-surface F: Documentation/driver-api/surface_aggregator/ F: drivers/platform/surface/aggregator/ @@ -14301,9 +14301,9 @@ index 000000000000..fbcce04abfe9 + +#endif /* _UAPI_LINUX_SURFACE_AGGREGATOR_CDEV_H */ -- -2.30.2 +2.31.0 -From 1b5d10df51f5e3ead7a4e70b7b128e5f67f24960 Mon Sep 17 00:00:00 2001 +From 3a1ade8f72b937629858465ebc82c0e4673bb751 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 21 Dec 2020 19:39:59 +0100 Subject: [PATCH] platform/surface: Add Surface ACPI Notify driver @@ -14423,10 +14423,10 @@ index 000000000000..38c2580e7758 +.. kernel-doc:: drivers/platform/surface/surface_acpi_notify.c + :export: diff --git a/MAINTAINERS b/MAINTAINERS -index 5d15622ce47d..d5fe6fdb0341 100644 +index b45df8ec687f..dfe4f4e1da7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11814,7 +11814,9 @@ W: https://github.com/linux-surface/surface-aggregator-module +@@ -11813,7 +11813,9 @@ W: https://github.com/linux-surface/surface-aggregator-module C: irc://chat.freenode.net/##linux-surface F: Documentation/driver-api/surface_aggregator/ F: drivers/platform/surface/aggregator/ @@ -15416,9 +15416,9 @@ index 000000000000..8e3e86c7d78c + +#endif /* _LINUX_SURFACE_ACPI_NOTIFY_H */ -- -2.30.2 +2.31.0 -From 5cd439a8dbf6fec296c3dc86092efc23a488595c Mon Sep 17 00:00:00 2001 +From f4a7514d778da6ff5180ac88e58c53d7573b8ae2 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 11 Jan 2021 14:46:48 +0000 Subject: [PATCH] platform/surface: fix potential integer overflow on shift of @@ -15454,9 +15454,9 @@ index 8cd67a669c86..ef9c1f8e8336 100644 dev_dbg(dev, "notify event %#04llx\n", func); -- -2.30.2 +2.31.0 -From 56d736d40a576959ca96b7829166586910d59e0c Mon Sep 17 00:00:00 2001 +From f459f702ea23d66f9e550b3db3435d27a0491a0e Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 11 Jan 2021 16:48:50 +0100 Subject: [PATCH] platform/surface: aggregator_cdev: Fix access of @@ -15494,9 +15494,9 @@ index 340d15b148b9..979340cdd9de 100644 void __user *rspdata; int status = 0, ret = 0, tmp; -- -2.30.2 +2.31.0 -From 60e3d0bba61f5b5c1e93e0e2ee617e7ba8ff39af Mon Sep 17 00:00:00 2001 +From 3580c235191512dfffa9b9cdc2ded467c33fe4ce Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Mon, 11 Jan 2021 16:48:51 +0100 Subject: [PATCH] platform/surface: aggregator_cdev: Add comments regarding @@ -15563,9 +15563,9 @@ index 979340cdd9de..79e28fab7e40 100644 if (!rsp.pointer) { ret = -ENOMEM; -- -2.30.2 +2.31.0 -From 4a3f5aa682a8f88dd30f625025d49782889e8a59 Mon Sep 17 00:00:00 2001 +From 08feed5fe75ced960fb3db8193f1fde8597b2d11 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 14 Jan 2021 09:04:52 +0100 Subject: [PATCH] platform/surface: aggregator: fix a kernel-doc markup @@ -15598,9 +15598,9 @@ index bb1c862411a2..25db4d638cfa 100644 * * Return: Returns zero on success, a negative error code on failure. -- -2.30.2 +2.31.0 -From 0cd74897b769d4dd4e8a553ba55a26b0874f8823 Mon Sep 17 00:00:00 2001 +From 58ae3b353f5cf89469766b3f2e2bdc461f145b2c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 14 Jan 2021 16:08:26 +0100 Subject: [PATCH] platform/surface: aggregator: Fix kernel-doc references @@ -15635,9 +15635,9 @@ index 25db4d638cfa..52a83a8fcf82 100644 * Return: Returns zero on success and a nonzero error code on failure. */ -- -2.30.2 +2.31.0 -From 5e39e09bf518b0db5ac27409388cb8a3bb90d7fb Mon Sep 17 00:00:00 2001 +From 975e2951520f6cda4c23bbb4a0f4ab81c9a7304b Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 26 Jan 2021 18:22:02 +0100 Subject: [PATCH] platform/surface: aggregator: Fix braces in if condition with @@ -15698,9 +15698,9 @@ index 74f0faaa2b27..583315db8b02 100644 /* -- -2.30.2 +2.31.0 -From a36768ee23b981a1035bcf38e089ef131c351a8d Mon Sep 17 00:00:00 2001 +From c34c49f35d59cbe74005ec7a1b4fda147272f2ba Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 11 Feb 2021 13:41:49 +0100 Subject: [PATCH] platform/surface: aggregator: Fix access of unaligned value @@ -15738,9 +15738,9 @@ index 583315db8b02..15d96eac6811 100644 static int ssh_ptl_rx_threadfn(void *data) -- -2.30.2 +2.31.0 -From ed6769d001c0375b055ee305c5428345569919f4 Mon Sep 17 00:00:00 2001 +From 99804626530d972c92ed6670e9f46c901251dba4 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 03:42:45 +0100 Subject: [PATCH] platform/surface: Set up Surface Aggregator device registry @@ -15781,10 +15781,10 @@ Patchset: surface-sam create mode 100644 drivers/platform/surface/surface_aggregator_registry.c diff --git a/MAINTAINERS b/MAINTAINERS -index d5fe6fdb0341..48e54650e28e 100644 +index dfe4f4e1da7a..1fd2fd35d5b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11816,6 +11816,7 @@ F: Documentation/driver-api/surface_aggregator/ +@@ -11815,6 +11815,7 @@ F: Documentation/driver-api/surface_aggregator/ F: drivers/platform/surface/aggregator/ F: drivers/platform/surface/surface_acpi_notify.c F: drivers/platform/surface/surface_aggregator_cdev.c @@ -16133,9 +16133,9 @@ index 000000000000..a051d941ad96 +MODULE_DESCRIPTION("Device-registry for Surface System Aggregator Module"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 -From 4845b4b5e713be0053ca231b692113e484c2d4cf Mon Sep 17 00:00:00 2001 +From a72e5aa8093f8325e96e1d997de0b18f09d62746 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 04:14:35 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add base device hub @@ -16459,9 +16459,9 @@ index a051d941ad96..6c23d75a044c 100644 MODULE_AUTHOR("Maximilian Luz "); MODULE_DESCRIPTION("Device-registry for Surface System Aggregator Module"); -- -2.30.2 +2.31.0 -From 0227617f146c0b3334b25b3326732be2c55703da Mon Sep 17 00:00:00 2001 +From afd3b258a6bdb96e0642babad9707383ae6da152 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 04:55:09 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add battery subsystem @@ -16545,9 +16545,9 @@ index 6c23d75a044c..cde279692842 100644 }; -- -2.30.2 +2.31.0 -From b05ed9016c7b47ba213729df92fb77f267f139ea Mon Sep 17 00:00:00 2001 +From 0cb17981f08cc3083bc2f84da48f49825f91fb6e Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 05:01:08 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add platform profile @@ -16644,9 +16644,9 @@ index cde279692842..33904613dd4b 100644 }; -- -2.30.2 +2.31.0 -From 43154320f9d73b6d1a82b8855abd76347b06fab7 Mon Sep 17 00:00:00 2001 +From c64ca95fc3915aa38881099919d2ef4b65b85ca9 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 05:06:41 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add DTX device @@ -16685,9 +16685,9 @@ index 33904613dd4b..dc044d06828b 100644 }; -- -2.30.2 +2.31.0 -From 955bd16c7d12fa917558dd5d64d28fa70b4e29c3 Mon Sep 17 00:00:00 2001 +From a706c777f1d1632e5c393c8e51aa0f8e3da4c757 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 7 Feb 2021 05:16:44 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add HID subsystem @@ -16778,9 +16778,9 @@ index dc044d06828b..caee90d135c5 100644 }; -- -2.30.2 +2.31.0 -From 9a690b4624791102095bada31fe116a42aefc42e Mon Sep 17 00:00:00 2001 +From 8558e1b824cd947857bc04c9a2c96bc3ef2a4475 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 9 Mar 2021 17:03:15 +0100 Subject: [PATCH] platform/surface: aggregator_registry: Add support for @@ -16819,9 +16819,9 @@ index caee90d135c5..6de74e893d06 100644 { "MSHW0107", (unsigned long)ssam_node_group_sb2 }, -- -2.30.2 +2.31.0 -From 7ba665f0a64ac65b54b8fa14f66ad716fc59d256 Mon Sep 17 00:00:00 2001 +From 5b6680505958324b1511d5845c51fb880686c2a4 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Tue, 9 Mar 2021 13:15:00 +0000 Subject: [PATCH] platform/surface: aggregator_registry: Make symbol @@ -16860,9 +16860,9 @@ index 6de74e893d06..304d601980ed 100644 }; -- -2.30.2 +2.31.0 -From 302380b72536e5763b84665497d74cd118a4c82e Mon Sep 17 00:00:00 2001 +From 329f536e5fe11a7a1c883bad0da1338f7d030c8b Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 9 Feb 2021 02:46:40 +0100 Subject: [PATCH] platform/surface: Add DTX driver @@ -16936,10 +16936,10 @@ index b5231d7f9200..e1dc72a8b62e 100644 0xAB 00-1F linux/nbd.h 0xAC 00-1F linux/raw.h diff --git a/MAINTAINERS b/MAINTAINERS -index 48e54650e28e..8ea459fc56f4 100644 +index 1fd2fd35d5b7..1a60e353df38 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11786,6 +11786,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] +@@ -11785,6 +11785,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] F: include/linux/cciss*.h F: include/uapi/linux/cciss*.h @@ -18351,9 +18351,9 @@ index 000000000000..0833aab0d819 + +#endif /* _UAPI_LINUX_SURFACE_AGGREGATOR_DTX_H */ -- -2.30.2 +2.31.0 -From 98b3587464dce41b5bbb51571628d0bb984e6969 Mon Sep 17 00:00:00 2001 +From fe26e240690665522af694f5a5a7a2985d0f236a Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 9 Feb 2021 02:50:11 +0100 Subject: [PATCH] platform/surface: dtx: Add support for native SSAM devices @@ -18492,9 +18492,9 @@ index a95adc1094aa..4bb5d286bf95 100644 MODULE_AUTHOR("Maximilian Luz "); MODULE_DESCRIPTION("Detachment-system driver for Surface System Aggregator Module"); -- -2.30.2 +2.31.0 -From 3167cf4b4888fe2493ffd3080fb263bff616a86f Mon Sep 17 00:00:00 2001 +From 5371ba2eedca09094db9dcf6b2b8c60159663543 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Tue, 9 Feb 2021 02:55:31 +0100 Subject: [PATCH] docs: driver-api: Add Surface DTX driver documentation @@ -19248,10 +19248,10 @@ index 3ccabce23271..98ea9946b8a2 100644 .. only:: subproject and html diff --git a/MAINTAINERS b/MAINTAINERS -index 8ea459fc56f4..ba2dfafeb28c 100644 +index 1a60e353df38..a6a4f5afdfa8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11790,6 +11790,7 @@ MICROSOFT SURFACE DTX DRIVER +@@ -11789,6 +11789,7 @@ MICROSOFT SURFACE DTX DRIVER M: Maximilian Luz L: platform-driver-x86@vger.kernel.org S: Maintained @@ -19260,9 +19260,9 @@ index 8ea459fc56f4..ba2dfafeb28c 100644 F: include/uapi/linux/surface_aggregator/dtx.h -- -2.30.2 +2.31.0 -From 3c31a1226a51cc499c825ac33bcca84bcae33b12 Mon Sep 17 00:00:00 2001 +From a6c935de36064d4dd03c11201ac1cf1013d26416 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 11 Feb 2021 20:02:57 +0100 Subject: [PATCH] input: Add bus ID for Surface Aggregator Module @@ -19289,9 +19289,9 @@ index 9a61c28ed3ae..3e81ea3d7df2 100644 /* * MT_TOOL types -- -2.30.2 +2.31.0 -From 1d310b0b0234751ab992fdbfb802526ac9dcf33c Mon Sep 17 00:00:00 2001 +From 67807eaaf15f2f6b96052861c98c8ba1d77a181d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 11 Feb 2021 20:08:50 +0100 Subject: [PATCH] HID: Add support for Surface Aggregator Module HID transport @@ -19324,10 +19324,10 @@ Patchset: surface-sam create mode 100644 drivers/hid/surface-hid/surface_hid_core.h diff --git a/MAINTAINERS b/MAINTAINERS -index ba2dfafeb28c..d4ebe9f7ae69 100644 +index a6a4f5afdfa8..2eac975aee50 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11809,6 +11809,13 @@ S: Maintained +@@ -11808,6 +11808,13 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git F: drivers/platform/surface/ @@ -20032,9 +20032,9 @@ index 000000000000..4b1a7b57e035 + +#endif /* SURFACE_HID_CORE_H */ -- -2.30.2 +2.31.0 -From 31cd43e3d1997502e00b13ee48807c02009dd496 Mon Sep 17 00:00:00 2001 +From 793ac74222c86e9e445aab0eded525edd6b75282 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 11 Feb 2021 20:10:17 +0100 Subject: [PATCH] HID: surface-hid: Add support for legacy keyboard interface @@ -20424,9 +20424,9 @@ index 000000000000..0635341bc517 +MODULE_DESCRIPTION("HID legacy transport driver for Surface System Aggregator Module"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 -From b9962fe5773fa4ac9fdc507a457213eef7a07bf5 Mon Sep 17 00:00:00 2001 +From eed7178fa7ca26b93d87546094922b5749763b2d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 12 Feb 2021 21:06:12 +0100 Subject: [PATCH] power: supply: Add battery driver for Surface Aggregator @@ -20458,10 +20458,10 @@ Patchset: surface-sam create mode 100644 drivers/power/supply/surface_battery.c diff --git a/MAINTAINERS b/MAINTAINERS -index d4ebe9f7ae69..b107e059770f 100644 +index 2eac975aee50..54a4769114e9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11786,6 +11786,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] +@@ -11785,6 +11785,13 @@ F: drivers/scsi/smartpqi/smartpqi*.[ch] F: include/linux/cciss*.h F: include/uapi/linux/cciss*.h @@ -21417,9 +21417,9 @@ index 000000000000..327fd7af386b +MODULE_DESCRIPTION("Battery driver for Surface System Aggregator Module"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 -From 593e853102454ab8e267d50a3b1884faebaf321e Mon Sep 17 00:00:00 2001 +From ac720c108673ef509b68ff0c1bb47a818cf98ed2 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 12 Feb 2021 21:07:17 +0100 Subject: [PATCH] power: supply: Add AC driver for Surface Aggregator Module @@ -21449,10 +21449,10 @@ Patchset: surface-sam create mode 100644 drivers/power/supply/surface_charger.c diff --git a/MAINTAINERS b/MAINTAINERS -index b107e059770f..2144ec466377 100644 +index 54a4769114e9..3d57740df499 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11792,6 +11792,7 @@ L: linux-pm@vger.kernel.org +@@ -11791,6 +11791,7 @@ L: linux-pm@vger.kernel.org L: platform-driver-x86@vger.kernel.org S: Maintained F: drivers/power/supply/surface_battery.c @@ -21797,9 +21797,9 @@ index 000000000000..982f9b9ef6f5 +MODULE_DESCRIPTION("AC driver for Surface System Aggregator Module"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 -From 2839d39115c1dcd229a8f88527cbc34baf32f7cf Mon Sep 17 00:00:00 2001 +From 8fc7d4f6d7efcf2a5b53bbd759affba0fa8f2f47 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 13 Feb 2021 19:58:50 +0100 Subject: [PATCH] platform/surface: Add performance mode driver @@ -21984,9 +21984,9 @@ index 000000000000..3b92a43f8606 +MODULE_DESCRIPTION("Performance mode interface for Surface System Aggregator Module"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 -From a7bff8250b03abc68fc6f1021926f90e382e53b3 Mon Sep 17 00:00:00 2001 +From 784252e94930063aec12fbdd0f4e60f899fbfdbc Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 4 Mar 2021 20:05:24 +0100 Subject: [PATCH] platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x @@ -22497,5 +22497,5 @@ index 02f3e06c0a60..4441ad667c3f 100644 return __raw_##name(sdev->ctrl, sdev->uid.target, \ sdev->uid.instance, ret); \ -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0006-surface-hotplug.patch b/patches/5.11/0006-surface-hotplug.patch index 0c54646bb..bc414ee5b 100644 --- a/patches/5.11/0006-surface-hotplug.patch +++ b/patches/5.11/0006-surface-hotplug.patch @@ -1,4 +1,4 @@ -From 81054350ba35353bc816eed3a639a6c8fae98596 Mon Sep 17 00:00:00 2001 +From 2be07e22dfd6088e4fcd41e54093950ffbd9b008 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Tue, 16 Mar 2021 16:51:40 +0100 Subject: [PATCH] PCI: PM: Do not read power state in pci_enable_device_flags() @@ -64,9 +64,9 @@ index 9449dfde2841..5ddc27d9a275 100644 bridge = pci_upstream_bridge(dev); if (bridge) -- -2.30.2 +2.31.0 -From 7c9284c5ecaa194bb1c6a36ac6e112d36da476bf Mon Sep 17 00:00:00 2001 +From 2861be00b54ea7017f48e5bbd010cde74969e58b Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 5 Feb 2021 02:26:57 +0100 Subject: [PATCH] platform/surface: Add Surface Hot-Plug driver @@ -104,10 +104,10 @@ Patchset: surface-hotplug create mode 100644 drivers/platform/surface/surface_hotplug.c diff --git a/MAINTAINERS b/MAINTAINERS -index 2144ec466377..a4a0519ce88c 100644 +index 3d57740df499..d1b36e222cd1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -11824,6 +11824,12 @@ L: platform-driver-x86@vger.kernel.org +@@ -11823,6 +11823,12 @@ L: platform-driver-x86@vger.kernel.org S: Maintained F: drivers/hid/surface-hid/ @@ -450,5 +450,5 @@ index 000000000000..cfcc15cfbacb +MODULE_DESCRIPTION("Surface Hot-Plug Signaling Driver for Surface Book Devices"); +MODULE_LICENSE("GPL"); -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0007-surface-typecover.patch b/patches/5.11/0007-surface-typecover.patch index e0a331902..9cbb74f11 100644 --- a/patches/5.11/0007-surface-typecover.patch +++ b/patches/5.11/0007-surface-typecover.patch @@ -1,4 +1,4 @@ -From 3cd2bb1dc4484b5e95a904bb186647d4ba948c39 Mon Sep 17 00:00:00 2001 +From 5c0caf4d38d2f819e4637bfff672a612b11543b3 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 @@ -229,5 +229,5 @@ index 8429ebe7097e..44d48e8bbe1a 100644 { .driver_data = MT_CLS_GOOGLE, HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE, -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0008-surface-sensors.patch b/patches/5.11/0008-surface-sensors.patch index 59748976e..bf8cb3ab0 100644 --- a/patches/5.11/0008-surface-sensors.patch +++ b/patches/5.11/0008-surface-sensors.patch @@ -1,4 +1,4 @@ -From 8ac1ee9e9be0b6c7bf7d3427354fcaac86bb2e99 Mon Sep 17 00:00:00 2001 +From d5cf2024ec3ac0682d5bea659cab215c5ac7626b Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sat, 19 Dec 2020 17:50:55 -0800 Subject: [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in @@ -49,5 +49,5 @@ index 547e7f9d6920..df0647856e5d 100644 .probe = apds9960_probe, .remove = apds9960_remove, -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0009-cameras.patch b/patches/5.11/0009-cameras.patch index cda7eb1dc..60e32cb90 100644 --- a/patches/5.11/0009-cameras.patch +++ b/patches/5.11/0009-cameras.patch @@ -1,4 +1,4 @@ -From d139f6ad02266d10fc377669ecb731d45bdd4500 Mon Sep 17 00:00:00 2001 +From 3cf9aa436dbde6acbdb12621ed4ad609b7823446 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 30 Dec 2020 22:44:05 +0200 Subject: [PATCH] media: ipu3-cio2: Add headers that ipu3-cio2.h is direct user @@ -48,9 +48,9 @@ index ccf0b85ae36f..62187ab5ae43 100644 #define CIO2_DEVICE_NAME "Intel IPU3 CIO2" #define CIO2_ENTITY_NAME "ipu3-csi2" -- -2.30.2 +2.31.0 -From 1838c935f2b1f5dde7b1baecdec233a7daad0a25 Mon Sep 17 00:00:00 2001 +From 84d419da7369f3930245b1c8a802d0559c713545 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 24 Oct 2020 22:42:28 +0100 Subject: [PATCH] device property: Return true in fwnode_device_is_available @@ -93,9 +93,9 @@ index 35b95c6ac0c6..0bf5260f14c6 100644 } EXPORT_SYMBOL_GPL(fwnode_device_is_available); -- -2.30.2 +2.31.0 -From 48da43469498e8ceb4ae341ba6e47f628b0f4365 Mon Sep 17 00:00:00 2001 +From c6bc671bda7f9d256dfee6067250a9038adac233 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 21 Nov 2020 22:06:38 +0000 Subject: [PATCH] device property: Call fwnode_graph_get_endpoint_by_id() for @@ -137,9 +137,9 @@ index 0bf5260f14c6..1421e9548857 100644 EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_by_id); -- -2.30.2 +2.31.0 -From d86c5b5615fa5815cdf9d002ae6bc8354e4e94e3 Mon Sep 17 00:00:00 2001 +From 9a3021ad26fa37e441cef315a5704bcd8fc3b396 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 25 Oct 2020 22:49:08 +0000 Subject: [PATCH] software_node: Enforce parent before child ordering of nodes @@ -240,9 +240,9 @@ index fbfb01ff1856..edfdd67daccd 100644 } EXPORT_SYMBOL_GPL(software_node_unregister_nodes); -- -2.30.2 +2.31.0 -From 458ff3ae61799e03472e69470ea56d945fd8d4de Mon Sep 17 00:00:00 2001 +From 219b4afbe1999076c053fef5ce7cc659c935e2d4 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 21 Oct 2020 22:25:03 +0100 Subject: [PATCH] software_node: unregister software_nodes in reverse order @@ -295,9 +295,9 @@ index edfdd67daccd..b22290106284 100644 } EXPORT_SYMBOL_GPL(software_node_unregister_node_group); -- -2.30.2 +2.31.0 -From eabea54bc35d50413dbf9d2d1e0f9a7134d9b068 Mon Sep 17 00:00:00 2001 +From 191817fe576ff7af61999648f51b03df1617f2f9 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Tue, 22 Dec 2020 13:09:05 +0000 Subject: [PATCH] device property: Define format macros for ports and endpoints @@ -336,9 +336,9 @@ index fde4ad97564c..77414e431e89 100644 /** -- -2.30.2 +2.31.0 -From ca49d4609ca0810b29f0a9a3304c779ebeb9431b Mon Sep 17 00:00:00 2001 +From 0dda3b01fbce83998658a5cbe88955cbc43fd6d0 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Tue, 15 Sep 2020 15:47:46 +0100 Subject: [PATCH] software_node: Add support for fwnode_graph*() family of @@ -504,9 +504,9 @@ index b22290106284..0e90bbf6e08c 100644 /* -------------------------------------------------------------------------- */ -- -2.30.2 +2.31.0 -From 2de3fa848e4959ed073edad6bc62e6e7f30d47c4 Mon Sep 17 00:00:00 2001 +From 2dfa15d2b2069bc79f42b4d000e10f028cfcd84d Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 10 Oct 2020 23:07:22 +0100 Subject: [PATCH] lib/test_printf.c: Use helper function to unwind array of @@ -542,9 +542,9 @@ index 7ac87f18a10f..7d60f24240a4 100644 static void __init -- -2.30.2 +2.31.0 -From a3fd727af5638af56a9e7f870358c94909fe4a1d Mon Sep 17 00:00:00 2001 +From ce6db3ab8e626c4479f4f6298143f8d5c2b8eb48 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 10 Oct 2020 23:11:36 +0100 Subject: [PATCH] ipu3-cio2: Add T: entry to MAINTAINERS @@ -561,10 +561,10 @@ Patchset: cameras 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS -index a4a0519ce88c..66ce274c17d7 100644 +index d1b36e222cd1..c6c13433ecf6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9010,6 +9010,7 @@ M: Bingbu Cao +@@ -9009,6 +9009,7 @@ M: Bingbu Cao R: Tianshu Qiu L: linux-media@vger.kernel.org S: Maintained @@ -573,9 +573,9 @@ index a4a0519ce88c..66ce274c17d7 100644 F: drivers/media/pci/intel/ipu3/ -- -2.30.2 +2.31.0 -From dc12beb630d30cf135d2af928c0f0c32ad1239f2 Mon Sep 17 00:00:00 2001 +From f3892d1a319390e3ca4b26fde4ea2aeedb37659c Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 10 Oct 2020 22:47:21 +0100 Subject: [PATCH] ipu3-cio2: Rename ipu3-cio2.c @@ -608,9 +608,9 @@ similarity index 100% rename from drivers/media/pci/intel/ipu3/ipu3-cio2.c rename to drivers/media/pci/intel/ipu3/ipu3-cio2-main.c -- -2.30.2 +2.31.0 -From ecea1ac6b877c82ac3bba9eeb1036f7d3e19226a Mon Sep 17 00:00:00 2001 +From f3d8fde7e10028a55590328bc9a84fffcedcc4de Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 21 Oct 2020 21:53:05 +0100 Subject: [PATCH] media: v4l2-core: v4l2-async: Check sd->fwnode->secondary in @@ -649,9 +649,9 @@ index e3ab003a6c85..9dd896d085ec 100644 * Otherwise, check if the sd fwnode and the asd fwnode refer to an * endpoint or a device. If they're of the same type, there's no match. -- -2.30.2 +2.31.0 -From 32745363d5960c00153c5c6e2befb70b8f36b248 Mon Sep 17 00:00:00 2001 +From cd230b7f379c1535c26eab15f60f32cb707542d0 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 15 Nov 2020 08:15:34 +0000 Subject: [PATCH] ACPI / bus: Add acpi_dev_get_next_match_dev() and helper @@ -758,9 +758,9 @@ index 6d1879bf9440..02a716a0af5d 100644 { put_device(&adev->dev); -- -2.30.2 +2.31.0 -From 60bcf2a7bf0fe513ac332d4ed2f88cc4a7797274 Mon Sep 17 00:00:00 2001 +From 2e8278bd9f1e8a67c2d7308586d05297d7e62c2a Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 19 Dec 2020 23:55:04 +0000 Subject: [PATCH] media: v4l2-fwnode: Include v4l2_fwnode_bus_type @@ -835,9 +835,9 @@ index 4365430eea6f..77fd6a3ec308 100644 * v4l2_fwnode_endpoint_parse() - parse all fwnode node properties * @fwnode: pointer to the endpoint's fwnode handle -- -2.30.2 +2.31.0 -From 8417d45ba36b8be2c5721ac83d70dd904d2849b0 Mon Sep 17 00:00:00 2001 +From a33a69f2fc23191ce4e71fe8fcfe09469da3274f Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 21 Oct 2020 21:53:44 +0100 Subject: [PATCH] ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver @@ -866,10 +866,10 @@ Patchset: cameras create mode 100644 drivers/media/pci/intel/ipu3/cio2-bridge.h diff --git a/MAINTAINERS b/MAINTAINERS -index 66ce274c17d7..fb99543648d3 100644 +index c6c13433ecf6..1bade5b42a40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9007,6 +9007,7 @@ INTEL IPU3 CSI-2 CIO2 DRIVER +@@ -9006,6 +9006,7 @@ INTEL IPU3 CSI-2 CIO2 DRIVER M: Yong Zhi M: Sakari Ailus M: Bingbu Cao @@ -1433,9 +1433,9 @@ index 62187ab5ae43..dc3e343a37fb 100644 + #endif -- -2.30.2 +2.31.0 -From 449a35c08c49efb444c567112c902236d8a46d86 Mon Sep 17 00:00:00 2001 +From 230fd396127f716a9fbde95e8eaae04c579a22fa Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 2 Dec 2020 12:38:10 +0000 Subject: [PATCH] acpi: utils: move acpi_lpss_dep() to utils @@ -1535,9 +1535,9 @@ index ddca1550cce6..78b38775f18b 100644 * acpi_dev_present - Detect that a given ACPI device is present * @hid: Hardware ID of the device. -- -2.30.2 +2.31.0 -From 4582fa1c85c48f6da92b80aff990b743e2122d9c Mon Sep 17 00:00:00 2001 +From 60a373610c9c8d118c63ac824373e62155e5235d Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 26 Nov 2020 21:12:41 +0000 Subject: [PATCH] acpi: utils: Add function to fetch dependent acpi_devices @@ -1621,9 +1621,9 @@ index 02a716a0af5d..33deb22294f2 100644 acpi_dev_get_next_match_dev(struct acpi_device *adev, const char *hid, const char *uid, s64 hrv); struct acpi_device * -- -2.30.2 +2.31.0 -From dbf35a5c65f2dd58c71c1be0d09ef2a504ef17a7 Mon Sep 17 00:00:00 2001 +From c28409d9a56e2b670866cea96bcbc44644332abe Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 16 Nov 2020 21:38:49 +0000 Subject: [PATCH] i2c: i2c-core-base: Use format macro in i2c_dev_set_name() @@ -1689,9 +1689,9 @@ index 56622658b215..65acae61dc5c 100644 { return NULL; -- -2.30.2 +2.31.0 -From 1aa68e382fe234582190d493dcb5fb0db4e72600 Mon Sep 17 00:00:00 2001 +From 5888b5ddc03295ee8a5c7421c092d39aa57027d9 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 2 Dec 2020 16:41:42 +0000 Subject: [PATCH] i2c: i2c-core-acpi: Add i2c_acpi_dev_name() @@ -1747,9 +1747,9 @@ index 65acae61dc5c..b82aac05b17f 100644 #else static inline bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares, -- -2.30.2 +2.31.0 -From 672300a46ead1e24197fb095b1a551685d550725 Mon Sep 17 00:00:00 2001 +From ca5f503b38dd978d141ccfaa4063bf65100bf647 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 16 Nov 2020 00:16:56 +0000 Subject: [PATCH] gpio: gpiolib-acpi: Export acpi_get_gpiod() @@ -1811,9 +1811,9 @@ index b20568c44001..c085527b7a86 100644 static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) -- -2.30.2 +2.31.0 -From a884f31bd2f59ee952e722304eb39ea830198ee2 Mon Sep 17 00:00:00 2001 +From 42dceee8b2eba8a27c308ddd6126d1c331258fcc Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 12 Dec 2020 23:56:59 +0000 Subject: [PATCH] mfd: Remove tps68470 MFD driver @@ -2002,9 +2002,9 @@ index 4a4df4ffd18c..000000000000 -}; -builtin_i2c_driver(tps68470_driver); -- -2.30.2 +2.31.0 -From cedb8e4ce35bf0f4bf1f7dd2fd914b535ac1acb8 Mon Sep 17 00:00:00 2001 +From 53ab798017645a4264f882e438c005c20d4717aa Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Fri, 15 Jan 2021 12:37:31 +0000 Subject: [PATCH] platform: x86: Add intel_skl_int3472 driver @@ -2046,10 +2046,10 @@ Patchset: cameras create mode 100644 drivers/platform/x86/intel_skl_int3472_tps68470.c diff --git a/MAINTAINERS b/MAINTAINERS -index fb99543648d3..f543702b8c65 100644 +index 1bade5b42a40..2aa943def82b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -9140,6 +9140,11 @@ S: Maintained +@@ -9139,6 +9139,11 @@ S: Maintained F: arch/x86/include/asm/intel_scu_ipc.h F: drivers/platform/x86/intel_scu_* @@ -2971,9 +2971,9 @@ index 000000000000..3fe27ec0caff + return ret; +} -- -2.30.2 +2.31.0 -From 0d37dbeabfe236f8f949f02de7b1cbe22d4bef3f Mon Sep 17 00:00:00 2001 +From 0a56179379de0aa8ca9211f4930a1b2185789bca Mon Sep 17 00:00:00 2001 From: Jake Day Date: Fri, 25 Sep 2020 10:24:53 -0400 Subject: [PATCH] media: i2c: Add support for the OV5693 image sensor @@ -6328,9 +6328,9 @@ index 000000000000..9a508e1f3624 +static unsigned long N_RES = N_RES_VIDEO; +#endif -- -2.30.2 +2.31.0 -From 1e6c1120f6279697cf786f71aa7ae75641b8616f Mon Sep 17 00:00:00 2001 +From 101d1bb6fa718bc0066ff09dc811112bada7f3e2 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 17 Jan 2021 19:08:18 +0000 Subject: [PATCH] media: i2c: Add reset pin toggling to ov5693 @@ -6369,9 +6369,9 @@ index 32485e4ed42b..f9ced52ad37a 100644 if (dev->indicator_led) -- -2.30.2 +2.31.0 -From adb67d1ab3016488b509155a2ac2d00b40fc716b Mon Sep 17 00:00:00 2001 +From 74fbb0f533698c523eea52282ebac37decaff73e Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 17 Jan 2021 21:39:15 +0000 Subject: [PATCH] media: i2c: Fix misnamed variable in power_down() for ov5693 @@ -6398,9 +6398,9 @@ index f9ced52ad37a..9fd44a3d1d85 100644 clk_disable_unprepare(dev->clk); -- -2.30.2 +2.31.0 -From fee4f3be51e2709eeb8c8473607a51b4ea2255b9 Mon Sep 17 00:00:00 2001 +From 5e5aa323d4c336e9ef2da347255af50ff497d6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= Date: Fri, 22 Jan 2021 20:58:13 +0100 Subject: [PATCH] cio2-bridge: Parse sensor orientation and rotation @@ -6561,9 +6561,9 @@ index dd0ffcafa489..924d99d20328 100644 struct property_entry ep_properties[5]; struct property_entry dev_properties[3]; -- -2.30.2 +2.31.0 -From e2af7aba4d1a5b3c1d3d547407496d5b606485e7 Mon Sep 17 00:00:00 2001 +From 29428e4ea53c791b7bb83f536e73889908ab79e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= Date: Fri, 22 Jan 2021 21:23:47 +0100 Subject: [PATCH] ov5693: Add orientation and rotation controls @@ -6617,9 +6617,9 @@ index 9fd44a3d1d85..1a85800df7ed 100644 ov5693->ctrl_handler.lock = &ov5693->input_lock; ov5693->sd.ctrl_handler = &ov5693->ctrl_handler; -- -2.30.2 +2.31.0 -From be6d897b9d8b7ee9d3e82428d8610c77cf3bd927 Mon Sep 17 00:00:00 2001 +From acf832b5d5736badf655fd7a1fe605c387ab615e Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 23 Jan 2021 00:28:32 +0000 Subject: [PATCH] platform: x86: Stylistic updates for intel-skl-int3472 @@ -7034,9 +7034,9 @@ index 3fe27ec0caff..40629291b339 100644 return -EINVAL; -- -2.30.2 +2.31.0 -From 1c8e9e4c7add5e546aa9ba8013262eb83ff52e4f Mon Sep 17 00:00:00 2001 +From 13a30985637a2bc2a21363aa8a39f57b61f006f2 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 23 Jan 2021 00:30:15 +0000 Subject: [PATCH] platform: x86: Add recalc_rate opp to int3472-discrete clock @@ -7161,9 +7161,9 @@ index 42ae8396eb64..98eb1ec3399e 100644 acpi_dev_put(int3472->sensor); -- -2.30.2 +2.31.0 -From c54807a89b25665b731e994e1b3bcb47bd6fb297 Mon Sep 17 00:00:00 2001 +From 5518f3688834aff07a66a7d1aaa4feb713e6ffdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= Date: Sun, 24 Jan 2021 11:07:42 +0100 Subject: [PATCH] cio2-bridge: Use macros and add warnings @@ -7265,9 +7265,9 @@ index 924d99d20328..e1e388cc9f45 100644 (const struct cio2_sensor_config) { \ .hid = _HID, \ -- -2.30.2 +2.31.0 -From c1790aab54ac016cae404e87883a130f68437440 Mon Sep 17 00:00:00 2001 +From f0f2d2ea5eb8c916c55b63928e2921a248311078 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 8 Feb 2021 21:44:38 +0000 Subject: [PATCH] media: i2c: Tidy up ov5693_init_controls() @@ -7387,9 +7387,9 @@ index 9a508e1f3624..26819cf3f4d2 100644 enum ov5693_tok_type { -- -2.30.2 +2.31.0 -From 994b904094ac91b3405610b3fad3f88245bff308 Mon Sep 17 00:00:00 2001 +From 4baa97014079ab310df40d3658e600e92d0d65fd Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 8 Feb 2021 21:46:49 +0000 Subject: [PATCH] media: i2c: Remove OV5693_PPL_DEFAULT @@ -7425,9 +7425,9 @@ index a9747ab783d7..7fb368eec327 100644 V4L2_CID_HBLANK, hblank, hblank, 1, hblank); -- -2.30.2 +2.31.0 -From dd5766b430de085379dfe440b41bd22af9a342d6 Mon Sep 17 00:00:00 2001 +From f34d3d9407a445b1e693467079c2f606c402737b Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 8 Feb 2021 22:53:02 +0000 Subject: [PATCH] media: i2c: Add vblank control to ov5693 driver @@ -7501,9 +7501,9 @@ index 26819cf3f4d2..9d7eed97963b 100644 }; -- -2.30.2 +2.31.0 -From 281ec02255edbf555256dfba78ce3f590ddf2e27 Mon Sep 17 00:00:00 2001 +From d84671fbbac83d353317ca795844ea8792093054 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 10 Feb 2021 00:36:32 +0000 Subject: [PATCH] media: i2c: update exposure control for ov5693 @@ -7576,9 +7576,9 @@ index 1950d7ac2d54..cea767230aa9 100644 /* Gain */ -- -2.30.2 +2.31.0 -From ef22c691e68e6de46c8bd93481056b5f0a8c8bf5 Mon Sep 17 00:00:00 2001 +From 22de9ffa3907243fe5a782d240114af9aa0303e3 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 10 Feb 2021 00:39:42 +0000 Subject: [PATCH] media: i2c: Fix incorrect bit-setting @@ -7612,9 +7612,9 @@ index cea767230aa9..f681dbfcec56 100644 #define OV5693_GAIN_CTRL_H_REG 0x3504 -- -2.30.2 +2.31.0 -From 014a6040ea449f0e9f333876943bc2e9571ec12b Mon Sep 17 00:00:00 2001 +From f712b5267439ff50424ce9a43177efb340d78f04 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 10 Feb 2021 16:25:48 +0000 Subject: [PATCH] media: i2c: Don't set stream on during mode config @@ -7762,9 +7762,9 @@ index 9d7eed97963b..965208078c2b 100644 }; -- -2.30.2 +2.31.0 -From c0286df86352d7a1e3578324dda154bb379d6098 Mon Sep 17 00:00:00 2001 +From ed6c7b8099e430deefc7d538e15c7506202e7e17 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 10 Feb 2021 16:35:24 +0000 Subject: [PATCH] media: i2c: Update gain control for ov5693 @@ -7834,9 +7834,9 @@ index f681dbfcec56..51eb3b05d121 100644 /* Flip */ -- -2.30.2 +2.31.0 -From 579d9ca78459c293307a9f788d905f8246f87375 Mon Sep 17 00:00:00 2001 +From b0a324eb8fa9bad2a4ef03a9f79f56790b051c4a Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 10 Feb 2021 23:44:39 +0000 Subject: [PATCH] media: i2c: Fixup gain read @@ -7897,9 +7897,9 @@ index 51eb3b05d121..952558c4f33b 100644 } -- -2.30.2 +2.31.0 -From caa10ec04b768f42dfe2fdc55fd1901bdc5e1e61 Mon Sep 17 00:00:00 2001 +From eeceaf12fdf9c7acc64852e1de04de5dc7867915 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 11 Feb 2021 00:40:10 +0000 Subject: [PATCH] media: i2c: Update controls on stream @@ -7932,9 +7932,9 @@ index 952558c4f33b..dd31083eeb7b 100644 enable ? OV5693_START_STREAMING : OV5693_STOP_STREAMING); -- -2.30.2 +2.31.0 -From b4b7b4127631dbd916e08b12715f3847e3adade6 Mon Sep 17 00:00:00 2001 +From a9f212e888cfc940e60ec8cedc4903c3a4650448 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 11 Feb 2021 23:29:15 +0000 Subject: [PATCH] media: i2c: Correct link frequency value @@ -7971,9 +7971,9 @@ index 965208078c2b..7f1d31a82d3d 100644 #define OV5693_NUM_SUPPLIES 2 -- -2.30.2 +2.31.0 -From 545b9c10a7b99bd28475f1265d53ab78de621a43 Mon Sep 17 00:00:00 2001 +From 7eebfc822df3632535bfc240e2c44d9fc7258edd Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Mon, 25 Jan 2021 23:12:09 +0000 Subject: [PATCH] media: i2c: Cleanup ov5693 driver @@ -8892,9 +8892,9 @@ index 7f1d31a82d3d..70ccb3aae4c7 100644 struct regulator_bulk_data supplies[OV5693_NUM_SUPPLIES]; struct clk *clk; -- -2.30.2 +2.31.0 -From 1013896b50c5066ba370bc77889fbf87619758b6 Mon Sep 17 00:00:00 2001 +From f921b89352253ca6e531e80dcbb5522d1cfbda31 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 28 Jan 2021 12:04:38 +0000 Subject: [PATCH] media: i2c: Add pm_runtime support to ov5693 driver @@ -9237,9 +9237,9 @@ index 70ccb3aae4c7..b78d3b474a43 100644 struct camera_sensor_platform_data *platform_data; ktime_t timestamp_t_focus_abs; -- -2.30.2 +2.31.0 -From af568b39e00152672fc705e9fa12d793ecac3fa9 Mon Sep 17 00:00:00 2001 +From ee6d3bde2367b58f48ae74e243c5ca21dd525f30 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 28 Jan 2021 12:07:36 +0000 Subject: [PATCH] media: i2c: Remove old power methods from ov5693 @@ -9408,9 +9408,9 @@ index f2eaa5f71a31..ce26ce86fbd5 100644 .pad = &ov5693_pad_ops, }; -- -2.30.2 +2.31.0 -From 38d1aac21cba50d80bdf5af5c517d01b7a35c3f6 Mon Sep 17 00:00:00 2001 +From 61b96dfcb6a9b28df30147352f4fb283b71bfec9 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 28 Jan 2021 12:14:00 +0000 Subject: [PATCH] media: i2c: Trim unused headers from ov5693 @@ -9449,9 +9449,9 @@ index ce26ce86fbd5..b3b391a49fdb 100644 #include -- -2.30.2 +2.31.0 -From 32c041d3ca2a8bfef8fe599aafc8a57a12c312d7 Mon Sep 17 00:00:00 2001 +From 9957063952ec0579febb1f678e320588b2548a5b Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 13 Feb 2021 21:39:35 +0000 Subject: [PATCH] media: i2c: Remove VCM stuff @@ -9868,9 +9868,9 @@ index b3b391a49fdb..2c82b6578de9 100644 v4l2_i2c_subdev_init(&ov5693->sd, client, &ov5693_ops); -- -2.30.2 +2.31.0 -From eaaf05c228588ec3cca3ba35ff6fd98642761fc4 Mon Sep 17 00:00:00 2001 +From 8fa8c17757205c2aa96ec7ae02b3b5cba0687276 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 13 Feb 2021 22:16:08 +0000 Subject: [PATCH] media: i2c: Tidy up ov5693 sensor init @@ -10024,9 +10024,9 @@ index 2c82b6578de9..313bc9177328 100644 mutex_unlock(&ov5693->lock); return ret; -- -2.30.2 +2.31.0 -From 25bf9e822722d666ce3b86283f7138dac654ebbd Mon Sep 17 00:00:00 2001 +From 7f286eae4ff5d865d78164c9ee0eea9b4cd87658 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Fri, 12 Feb 2021 16:14:04 +0000 Subject: [PATCH] media: i2c: cleanup macros in ov5693.h @@ -10170,9 +10170,9 @@ index b78d3b474a43..6502777eb5f3 100644 #define OV5693_FRAME_OFF_NUM 0x4202 #define OV5693_OTP_BYTE_MAX 32 //change to 32 as needed by otpdata -- -2.30.2 +2.31.0 -From dcc8aab81a14741b2ec576b075071a8a6c9336f5 Mon Sep 17 00:00:00 2001 +From 98cd92d4817034e83ea2d2afebd792362111b698 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Fri, 12 Feb 2021 16:19:09 +0000 Subject: [PATCH] media: i2c: use devm_kzalloc() to initialise ov5693 @@ -10200,9 +10200,9 @@ index 313bc9177328..d092ed698eb3 100644 return -ENOMEM; -- -2.30.2 +2.31.0 -From 1299e5c3472c58f18495a8cd231a6d2fd382cfbe Mon Sep 17 00:00:00 2001 +From 7df28396c6d03d99d1ce5cfd12769e0ffa4d332b Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Fri, 12 Feb 2021 16:26:21 +0000 Subject: [PATCH] media: i2c: Check for supported clk rate in probe @@ -10257,9 +10257,9 @@ index 6502777eb5f3..0dfbbe9a0ff2 100644 #define OV5693_LINK_FREQ_400MHZ 400000000 /* pixel_rate = link_freq * 2 * nr_of_lanes / bits_per_sample -- -2.30.2 +2.31.0 -From bb1dc6d5cff9dd515f93f4ec7a63df75b978e0f5 Mon Sep 17 00:00:00 2001 +From 4dc179ed440fe7e3a3f82e6537093cdb055440e4 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 13 Feb 2021 23:17:50 +0000 Subject: [PATCH] media: i2c: Use devres to fetch gpios @@ -10331,9 +10331,9 @@ index 8082d37841da..c580159079d2 100644 static int ov5693_get_regulators(struct ov5693_device *ov5693) -- -2.30.2 +2.31.0 -From 153894541d44538e1619859c767e42f558bff8f4 Mon Sep 17 00:00:00 2001 +From 3ba5ef360f0f5dfc70b9b566c118f40d7f08c5c7 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sat, 13 Feb 2021 23:20:47 +0000 Subject: [PATCH] media: i2c: Use devres to fetch regulators @@ -10374,9 +10374,9 @@ index c580159079d2..9f61b470f8ba 100644 ov5693->supplies); } -- -2.30.2 +2.31.0 -From 0f9ce0bf7e6898b54ad899cc57b5cb340231d5dd Mon Sep 17 00:00:00 2001 +From 154405f25059dfe2fa70b81425fa497e8d686b74 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 14 Feb 2021 12:39:14 +0000 Subject: [PATCH] media: i2c: remove debug print @@ -10453,9 +10453,9 @@ index 9f61b470f8ba..622a7ddf4063 100644 return 0; } -- -2.30.2 +2.31.0 -From 93936641fbe4d6f9cae93cecf7c9ccfdab584726 Mon Sep 17 00:00:00 2001 +From f860c535401b0981c4670e452b960463515d79cb Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 14 Feb 2021 14:32:50 +0000 Subject: [PATCH] media: i2c: Remove unused resolutions from ov5693 @@ -10882,9 +10882,9 @@ index 0dfbbe9a0ff2..29e6735112da 100644 static unsigned long N_RES = N_RES_VIDEO; -#endif -- -2.30.2 +2.31.0 -From f81c66cb9d59208e758929d8fa64406cede84ea1 Mon Sep 17 00:00:00 2001 +From 831f231d6f00ecc79ea6daa973fc21d31063af39 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 14 Feb 2021 14:45:58 +0000 Subject: [PATCH] media: i2c: update set_fmt() for ov5693 @@ -11123,5 +11123,5 @@ index 29e6735112da..0377853f8b2b 100644 int otp_size; u8 *otp_data; -- -2.30.2 +2.31.0 diff --git a/patches/5.11/0010-ath10k-firmware-override.patch b/patches/5.11/0010-ath10k-firmware-override.patch index f27dddf50..556ca075d 100644 --- a/patches/5.11/0010-ath10k-firmware-override.patch +++ b/patches/5.11/0010-ath10k-firmware-override.patch @@ -1,4 +1,4 @@ -From 906e380dfed7a8439306315b6ae19382b4e8dacc Mon Sep 17 00:00:00 2001 +From 35d1a8ada80a3db92d7b447bb412a4545b54a010 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Feb 2021 00:45:52 +0100 Subject: [PATCH] ath10k: Add module parameters to override board files @@ -14,6 +14,7 @@ file names in the driver. This allows us to package/deploy the override via a modprobe.d config. Signed-off-by: Maximilian Luz +Patchset: ath10k-firmware-override --- drivers/net/wireless/ath/ath10k/core.c | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) @@ -116,5 +117,5 @@ index a419ec7130f9..b2c21bf5995e 100644 ret = firmware_request_nowarn(&fw, filename, ar->dev); ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n", -- -2.30.2 +2.31.0 diff --git a/pkg/arch/kernel/PKGBUILD b/pkg/arch/kernel/PKGBUILD index 82cf58622..63b112109 100644 --- a/pkg/arch/kernel/PKGBUILD +++ b/pkg/arch/kernel/PKGBUILD @@ -46,17 +46,17 @@ validpgpkeys=( sha256sums=('526d03e411c37be6533de7ddaed9a2e1a30b5c4ddb6af7078f3e3a50697c01f9' 'd8d5d11c80424985642b0eea6ace3256b5a1e5e69d637104523460a5ebdda202' '3fbd134c61de6f4fa86567bb0faf02c4eb2c54111b6dc45367b8f6e9ef06556e' - '8cd2b019aac6d3807a5cdcbbbe0aad81e63193ff3e8dffd7a79d4a1421b858f6' - '912a2886379b700594486ddc6ca03689646ac0238c88b840f996b127b8d7f49c' - '2bd0688ce8de5513c3a74d86ef82915a579e0b0db12b4b24bba6d40d295baa85' - '05898a8da5c2e3e6da3ab18021fdf6c150128863dba8dab2f11fd0ca12e3e614' - 'b96c32592a3963d564117c378a39357a5343cf2856e28b34cfc0b5c21d999200' - 'aef6d5de9f9122f6c1286a014cacfeca96f91dfecc4113d9f672bd8abd3aa18d' - '9e06244f4542610e3f679090f2ccd352d870fdf3deda2a13fba88bd51f7d24de' - 'd164340db8d906a30e9d279ce404598ddf037e6354d2e9be00a18638709e52a2' - 'bad6b8fdae26265797809ede9eacd82cecaacf3f2d4cfb6d304d43efd34fdf28' - 'b0567228ae66471efc53baddfd1bea6973983ea7f6154e0b7d6997e29a8eaf10' - 'c1ee0d8b96b43a6668b78e736723dada5f92690accd926f18899930221368079') + '9474de18769968c5558fedda5be354fe0babf1365541d4d0ac8e1ac47d4bbb88' + '1a2bba00f08f3587fde1692043af956b9efd08a4526bdc1a50fa15476c6ed873' + 'ba2127667105305ca22e59d33f82c5630b931cf1f9d55ab3afcbab7d575ec808' + '4d8d839bd9dcee096bd071ef01f801e766fc2a4e91f7ec85b94f0147092bd4a6' + '31ff1e5fbc34aa0125315b675ace10ce6c43c4a5983ec23be17d9c8e7f2a3dc8' + '937f6be1b1cdc3822122ba84cd4404a2bdc439a959757f0c3d4ab6077032c1cd' + '8eb282d5120d6cca591765d65057c586a6562de92ef49236d6a76f8ad7cf1704' + 'a8614647368a23487de0e241f2b533de4f462b5f575c21971e823f54ce925f53' + '7a03877f503348de5f7f66a238519ccf902b837ac9b8035a4022adeb3901a1b3' + 'f89fd320baff454cb42ff6a78beada8f9eac430b7c80a51f10c43e5df7d2e414' + '9b2c03265f770955fbedc64dcf25dda684c88bae0bf6467a1f3d1153b92c0971') export KBUILD_BUILD_HOST=archlinux