linux-yocto/drivers/thunderbolt
Mario Limonciello f2829faa3f 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:28:30 +02:00
..
acpi.c
cap.c
clx.c
ctl.c thunderbolt: Do not double dequeue a configuration request 2025-06-19 15:28:00 +02:00
ctl.h
debugfs.c
dma_port.c
dma_port.h
dma_test.c
domain.c
eeprom.c
icm.c
Kconfig
lc.c
Makefile
nhi_ops.c
nhi_regs.h
nhi.c thunderbolt: Add support for Intel Panther Lake-M/P 2025-01-09 13:31:49 +01:00
nhi.h thunderbolt: Add support for Intel Panther Lake-M/P 2025-01-09 13:31:49 +01:00
nvm.c
path.c
property.c
quirks.c
retimer.c thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer 2025-06-04 14:41:58 +02:00
sb_regs.h
switch.c
tb_msgs.h
tb_regs.h
tb.c thunderbolt: Scan retimers after device router has been enumerated 2025-05-02 07:50:55 +02:00
tb.h
test.c
tmu.c
tunnel.c
tunnel.h
usb4_port.c
usb4.c thunderbolt: Fix a logic error in wake on connect 2025-06-19 15:28:30 +02:00
xdomain.c