archive mirror
 help / color / mirror / Atom feed
From: Slark Xiao <>
Cc:,,, Slark Xiao <>
Subject: [PATCH] Fix WWAN device disabled issue after S3 deep When WWAN device wake from S3 deep, under thinkpad platform,it would be disabled. This disable status could be checked by command 'nmcli r wwan' or 'rfkill list'. Issue analysis as below: 1. When host resume from S3 deep, thinkpad_acpi driver would call hotkey_resume() function. Finnaly, it will use wan_get_status to check the current status of WWAN device. During this resume progress, wan_get_status would always return off even WWAN boot up completely. 2. If wan_get_status() return off, rfkill_set_sw_state() would set WWAN's status as disabled. 3. This may be a fault of LENOVO BIOS. 4. Workaround is add a WWAN device check before rfkill_set_sw_state(). If it's a Foxconn WWAN device, then we will ignore to do a status update.
Date: Wed, 11 Aug 2021 16:03:38 +0800	[thread overview]
Message-ID: <> (raw)

Signed-off-by: Slark Xiao <>
 drivers/platform/x86/thinkpad_acpi.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 603156a6e3ed..e3b7bc0e7a33 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1159,6 +1159,13 @@ struct tpacpi_rfk_ops {
 static struct tpacpi_rfk *tpacpi_rfkill_switches[TPACPI_RFK_SW_MAX];
+/*Foxconn SDX55 T77W175 products. All available device ID*/
+static const struct pci_device_id foxconn_device_ids[] = {
+	{}
 /* Query FW and update rfkill sw state for a given rfkill switch */
 static int tpacpi_rfk_update_swstate(const struct tpacpi_rfk *tp_rfk)
@@ -1182,8 +1189,13 @@ static void tpacpi_rfk_update_swstate_all(void)
 	unsigned int i;
-	for (i = 0; i < TPACPI_RFK_SW_MAX; i++)
-		tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[i]);
+	for (i = 0; i < TPACPI_RFK_SW_MAX; i++) {
+		if (pci_dev_present(foxconn_device_ids) && i == 1)
+			pr_info("Find Foxconn wwan device, ignore to update rfkill switch status\n");
+		else
+			tpacpi_rfk_update_swstate(tpacpi_rfkill_switches[i]);
+	}

                 reply	other threads:[~2021-08-11  8:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).