aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel-wmi-thunderbolt.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@dell.com>2018-09-26 11:10:58 -0500
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-09-27 12:18:20 +0300
commit7eccb5edba24cec9bb0a2b990ac66e755456303a (patch)
tree20dcc5af05261bff61a125f10e365c4379fff223 /drivers/platform/x86/intel-wmi-thunderbolt.c
parentplatform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier (diff)
downloadlinux-dev-7eccb5edba24cec9bb0a2b990ac66e755456303a.tar.xz
linux-dev-7eccb5edba24cec9bb0a2b990ac66e755456303a.zip
platform/x86: intel-wmi-thunderbolt: Add dynamic debugging
Some users have been reporting issues with thunderbolt being turned off before fully initialized. This is suspected to be caused by userspace turning off the Thunderbolt controller using intel-wmi-thunderbolt prematurely. Userspace has already made some mitigations for this situation: https://github.com/hughsie/fwupd/commit/ef6f1d76983c9b66 https://github.com/hughsie/fwupd/commit/c07ce5b4889a5384 To allow easier debugging of this situation add output that can be turned on with dynamic debugging to better root cause this problem. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199631 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201227 Suggested-by: Mika Westerberg <mika.westerberg@intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/intel-wmi-thunderbolt.c')
-rw-r--r--drivers/platform/x86/intel-wmi-thunderbolt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel-wmi-thunderbolt.c b/drivers/platform/x86/intel-wmi-thunderbolt.c
index b029a70b084a..9ded8e2af312 100644
--- a/drivers/platform/x86/intel-wmi-thunderbolt.c
+++ b/drivers/platform/x86/intel-wmi-thunderbolt.c
@@ -30,12 +30,16 @@ static ssize_t force_power_store(struct device *dev,
input.length = sizeof(u8);
input.pointer = &mode;
mode = hex_to_bin(buf[0]);
+ dev_dbg(dev, "force_power: storing %#x\n", mode);
if (mode == 0 || mode == 1) {
status = wmi_evaluate_method(INTEL_WMI_THUNDERBOLT_GUID, 0, 1,
&input, NULL);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ dev_dbg(dev, "force_power: failed to evaluate ACPI method\n");
return -ENODEV;
+ }
} else {
+ dev_dbg(dev, "force_power: unsupported mode\n");
return -EINVAL;
}
return count;