thunderbolt: Tear down existing tunnels when resuming from hibernate
authorMika Westerberg <mika.westerberg@linux.intel.com>
Sun, 14 Nov 2021 15:20:59 +0000 (17:20 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 7 Dec 2021 12:18:33 +0000 (15:18 +0300)
commit43bddb26e20af916249b5318200cfe1734c1700c
tree4adc0f841b67230a9076724f52d3db4a558661f7
parentf3380cac0c0b3a6f49ab161e2a057c363962f48d
thunderbolt: Tear down existing tunnels when resuming from hibernate

If the boot firmware implements connection manager of its own it may not
create the paths in the same way or order we do. For example it may
create first PCIe tunnel and then USB3 tunnel. When we restore our
tunnels (first de-activating them) we may be doing that over completely
different tunnels and that leaves them possibly non-functional. For this
reason we re-use the tunnel discovery functionality and find out all the
existing tunnels, and tear them down. Once that is done we can restore
our tunnels.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/path.c
drivers/thunderbolt/tb.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/tunnel.c
drivers/thunderbolt/tunnel.h