]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thunderbolt: Fix wake on connect at runtime
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 19 Jun 2025 21:38:30 +0000 (16:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:53:11 +0000 (08:53 +0200)
commitdc52aff53465e446f771dfceb318a40737c68ff0
treea75d544c9cf6910506149cf5ad44b6f90957513d
parente6a2ff56b06e194e5c6abf4b53b93f14267040c7
thunderbolt: Fix wake on connect at runtime

commit 58d71d4242ce057955c783a14c82270c71f9e1e8 upstream.

commit 1a760d10ded37 ("thunderbolt: Fix a logic error in wake on connect")
fixated on the USB4 port sysfs wakeup file not working properly to control
policy, but it had an unintended side effect that the sysfs file controls
policy both at runtime and at suspend time. The sysfs file is supposed to
only control behavior while system is suspended.

Pass whether programming a port for runtime into usb4_switch_set_wake()
and if runtime then ignore the value in the sysfs file.

Cc: stable@vger.kernel.org
Reported-by: Alexander Kovacs <Alexander.Kovacs@amd.com>
Tested-by: Alexander Kovacs <Alexander.Kovacs@amd.com>
Fixes: 1a760d10ded37 ("thunderbolt: Fix a logic error in wake on connect")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/usb4.c