thunderbolt: Take CL states into account when waiting for link to come up
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 23 Mar 2022 14:13:32 +0000 (16:13 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 17 Jan 2023 09:36:55 +0000 (11:36 +0200)
commite70a8f36987da50b9f443173f8800795f70266da
tree3e5fe311fe615d40b905ab5cafa041fd42d84d91
parent2426fdf77afb4d78316585531a4069905a5accc7
thunderbolt: Take CL states into account when waiting for link to come up

If CL states are enabled for the link it may be in these states too when
reading the lane adapter state but it will enter CL0 as soon as there is
traffic in the high-speed lanes. Upon discovery we want to make sure
that is accounted as the link being up, otherwise we end up tearing down
the topology with no good reason.

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