|
@@ -1,4 +1,4 @@
|
|
-From 25983eefaaae2c496f3d7aae8afd632b8604d1f0 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
+From f68e13904fe89824383047ad407cdf2868c0c644 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
Date: Tue, 3 Nov 2020 13:28:04 +0100
|
|
Date: Tue, 3 Nov 2020 13:28:04 +0100
|
|
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
|
|
Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface
|
|
@@ -165,7 +165,162 @@ index d6ff964aec5b..5d30ae39d65e 100644
|
|
--
|
|
--
|
|
2.39.0
|
|
2.39.0
|
|
|
|
|
|
-From 43b4cfa6bb01077e0c88dc94c0175e49d47e6733 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
+From 14ecac240936e807dd2366c70cdf9d108a5b8f40 Mon Sep 17 00:00:00 2001
|
|
|
|
+From: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
|
+Date: Sun, 4 Oct 2020 00:11:49 +0900
|
|
|
|
+Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
|
|
|
|
+
|
|
|
|
+Currently, mwifiex fw will crash after suspend on recent kernel series.
|
|
|
|
+On Windows, it seems that the root port of wifi will never enter D3 state
|
|
|
|
+(stay on D0 state). And on Linux, disabling the D3 state for the
|
|
|
|
+bridge fixes fw crashing after suspend.
|
|
|
|
+
|
|
|
|
+This commit disables the D3 state of root port on driver initialization
|
|
|
|
+and fixes fw crashing after suspend.
|
|
|
|
+
|
|
|
|
+Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
|
|
|
|
+Patchset: mwifiex
|
|
|
|
+---
|
|
|
|
+ drivers/net/wireless/marvell/mwifiex/pcie.c | 7 +++++
|
|
|
|
+ .../wireless/marvell/mwifiex/pcie_quirks.c | 27 +++++++++++++------
|
|
|
|
+ .../wireless/marvell/mwifiex/pcie_quirks.h | 1 +
|
|
|
|
+ 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 84be9289caa6..98be0d3cc41c 100644
|
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
|
|
|
+@@ -368,6 +368,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
|
|
|
+ const struct pci_device_id *ent)
|
|
|
|
+ {
|
|
|
|
+ struct pcie_service_card *card;
|
|
|
|
++ struct pci_dev *parent_pdev = pci_upstream_bridge(pdev);
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
|
|
+ pr_debug("info: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
|
|
|
|
+@@ -409,6 +410,12 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
++ /* disable bridge_d3 for Surface gen4+ devices to fix fw crashing
|
|
|
|
++ * after suspend
|
|
|
|
++ */
|
|
|
|
++ if (card->quirks & QUIRK_NO_BRIDGE_D3)
|
|
|
|
++ parent_pdev->bridge_d3 = false;
|
|
|
|
++
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+diff --git a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
|
|
|
|
+index f46b06f8d643..99b024ecbade 100644
|
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
|
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
|
|
|
|
+@@ -14,7 +14,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Pro 5",
|
|
|
|
+@@ -24,7 +25,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Pro 5 (LTE)",
|
|
|
|
+@@ -34,7 +36,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Pro 6",
|
|
|
|
+@@ -43,7 +46,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Book 1",
|
|
|
|
+@@ -52,7 +56,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Book 2",
|
|
|
|
+@@ -61,7 +66,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Laptop 1",
|
|
|
|
+@@ -70,7 +76,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .ident = "Surface Laptop 2",
|
|
|
|
+@@ -79,7 +86,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_DO_FLR_ON_BRIDGE),
|
|
|
|
++ QUIRK_DO_FLR_ON_BRIDGE |
|
|
|
|
++ QUIRK_NO_BRIDGE_D3),
|
|
|
|
+ },
|
|
|
|
+ {}
|
|
|
|
+ };
|
|
|
|
+@@ -99,6 +107,9 @@ void mwifiex_initialize_quirks(struct pcie_service_card *card)
|
|
|
|
+ dev_info(&pdev->dev, "quirk reset_d3cold enabled\n");
|
|
|
|
+ if (card->quirks & QUIRK_DO_FLR_ON_BRIDGE)
|
|
|
|
+ dev_info(&pdev->dev, "quirk do_flr_on_bridge enabled\n");
|
|
|
|
++ if (card->quirks & QUIRK_NO_BRIDGE_D3)
|
|
|
|
++ dev_info(&pdev->dev,
|
|
|
|
++ "quirk no_brigde_d3 enabled\n");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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 5d30ae39d65e..c14eb56eb911 100644
|
|
|
|
+--- a/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h
|
|
|
|
++++ b/drivers/net/wireless/marvell/mwifiex/pcie_quirks.h
|
|
|
|
+@@ -5,6 +5,7 @@
|
|
|
|
+
|
|
|
|
+ #define QUIRK_FW_RST_D3COLD BIT(0)
|
|
|
|
+ #define QUIRK_DO_FLR_ON_BRIDGE BIT(1)
|
|
|
|
++#define QUIRK_NO_BRIDGE_D3 BIT(2)
|
|
|
|
+
|
|
|
|
+ void mwifiex_initialize_quirks(struct pcie_service_card *card);
|
|
|
|
+ int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
|
|
|
|
+--
|
|
|
|
+2.39.0
|
|
|
|
+
|
|
|
|
+From 2aa594c47d5d32cba044b4b249c7b191d4c5c2e3 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
|
|
Date: Thu, 25 Mar 2021 11:33:02 +0100
|
|
Date: Thu, 25 Mar 2021 11:33:02 +0100
|
|
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
|
|
Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell
|