summaryrefslogtreecommitdiff
path: root/drivers/fpga/tests/fpga-bridge-test.c
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2025-04-11 10:14:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 15:40:29 +0200
commitd2ef2fac35b6140fcdff0d26b6194780240538e2 (patch)
tree450f4621e910ccde65746d7f68a15c271fffcb49 /drivers/fpga/tests/fpga-bridge-test.c
parente1b144aebe6fb898d96ced8c990d7aa38fda4a7a (diff)
thunderbolt: Fix a logic error in wake on connect
[ Upstream commit 1a760d10ded372d113a0410c42be246315bbc2ff ] commit a5cfc9d65879c ("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 4bfeea6ec1c02 ("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: a5cfc9d65879c ("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>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions