Files
linux/drivers
Mario Limonciello d2ef2fac35 thunderbolt: Fix a logic error in wake on connect
[ Upstream commit 1a760d10de ]

commit a5cfc9d658 ("thunderbolt: Add wake on connect/disconnect
on USB4 ports") introduced a sysfs file to control wake up policy
for a given USB4 port that defaulted to disabled.

However when testing commit 4bfeea6ec1 ("thunderbolt: Use wake
on connect and disconnect over suspend") I found that it was working
even without making changes to the power/wakeup file (which defaults
to disabled). This is because of a logic error doing a bitwise or
of the wake-on-connect flag with device_may_wakeup() which should
have been a logical AND.

Adjust the logic so that policy is only applied when wakeup is
actually enabled.

Fixes: a5cfc9d658 ("thunderbolt: Add wake on connect/disconnect on USB4 ports")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:40:29 +02:00
..
2025-04-22 16:06:05 +09:00
2025-06-19 15:39:25 +02:00
2025-06-19 15:39:20 +02:00
2025-05-15 04:49:15 +03:00
2025-04-11 17:32:38 -07:00
2025-06-10 07:17:10 -04:00
2025-04-08 19:30:58 +02:00