From e7051beab8393dc614f7ea3969aa03bc490db1d6 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Mon, 22 Mar 2021 16:54:54 +0200 Subject: thunderbolt: Wait for the lanes to actually bond It may take some time until the two lanes enter bonded state so poll for the link width to match what is expected before going forward. This ensures the link is in expected state before we start establishing paths through it. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/thunderbolt/tb.h') diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index b4bc25b82fdb..e6c5e8fc7de7 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -883,6 +883,8 @@ int tb_port_get_link_width(struct tb_port *port); int tb_port_state(struct tb_port *port); int tb_port_lane_bonding_enable(struct tb_port *port); void tb_port_lane_bonding_disable(struct tb_port *port); +int tb_port_wait_for_link_width(struct tb_port *port, int width, + int timeout_msec); int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec); int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap); -- cgit v1.2.3