WSL2-Linux-Kernel/drivers/thunderbolt
Mika Westerberg 2f804823b5 thunderbolt: Runtime PM activate both ends of the device link
[ Upstream commit f3380cac0c ]

If protocol tunnels are already up when the driver is loaded, for
instance if the boot firmware implements connection manager of its own,
runtime PM reference count of the consumer devices behind the tunnel
might have been increased already before the device link is created but
the supplier device runtime PM reference count is not. This leads to a
situation where the supplier (the Thunderbolt driver) can runtime
suspend even if it should not because the corresponding protocol tunnel
needs to be up causing the devices to be removed from the corresponding
native bus.

Prevent this from happening by making both sides of the link runtime PM
active briefly. The pm_runtime_put() for the consumer (PCIe
root/downstream port, xHCI) then allows it to runtime suspend again but
keeps the supplier runtime resumed the whole time it is runtime active.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:04:36 +01:00
..
Kconfig
Makefile thunderbolt: build kunit tests without structleak plugin 2021-10-06 17:53:49 -06:00
acpi.c thunderbolt: Runtime PM activate both ends of the device link 2022-01-27 11:04:36 +01:00
cap.c
ctl.c
ctl.h
debugfs.c
dma_port.c
dma_port.h
dma_test.c
domain.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
eeprom.c thunderbolt: Fix DROM handling for USB4 DROM 2021-06-15 13:51:07 +03:00
icm.c thunderbolt: Add support for Intel Alder Lake 2021-06-11 11:42:54 +03:00
lc.c
nhi.c thunderbolt: Handle ring interrupt by reading interrupt status register 2021-08-09 14:58:29 +03:00
nhi.h thunderbolt: Add support for Intel Alder Lake 2021-06-11 11:42:54 +03:00
nhi_ops.c
nhi_regs.h
nvm.c
path.c
property.c
quirks.c
retimer.c thunderbolt: Check for NVM authentication status after the operation started 2021-06-01 10:53:32 +03:00
sb_regs.h thunderbolt: Add additional USB4 port operations for retimer access 2021-06-01 10:53:31 +03:00
switch.c thunderbolt: Changes for v5.15 merge window 2021-08-24 15:31:33 +02:00
tb.c thunderbolt: Add device links only when software connection manager is used 2021-06-11 11:42:54 +03:00
tb.h thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimers 2021-06-01 10:53:32 +03:00
tb_msgs.h
tb_regs.h
test.c thunderbolt: test: split up test cases in tb_test_credit_alloc_all 2021-09-06 12:27:03 -07:00
tmu.c
tunnel.c
tunnel.h
usb4.c thunderbolt: Add WRITE_ONLY and AUTHENTICATE_ONLY NVM operations for retimers 2021-06-01 10:53:32 +03:00
usb4_port.c thunderbolt: No need to include <linux/acpi.h> in usb4_port.c 2021-06-11 11:42:54 +03:00
xdomain.c