From 343fcb8c70d76967ba64493ca984e40baad9d0f6 Mon Sep 17 00:00:00 2001 From: Andreas Noever Date: Thu, 12 Jun 2014 23:11:47 +0200 Subject: thunderbolt: Fix nontrivial endpoint devices. Fix issues observed with the Startech docking station: Fix the type of the route parameter in tb_ctl_rx. It should be u64 and not u8 (which only worked for short routes). A thunderbolt cable contains two lanes. If both endpoints support it a connection will be established on both lanes. Previously we tried to scan below both "dual link ports". Use the information extracted from the drom to only scan behind ports with lane_nr == 0. Endpoints with more complex thunderbolt controllers have some of their ports disabled (for example the NHI port or one of the HDMI/DP ports). Accessing them results in an error so we now ignore ports which are marked as disabled in the drom. Signed-off-by: Andreas Noever Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/tb.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/thunderbolt/tb.c') diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 1aa6dd7dc68b..d2c3fe346e91 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -38,6 +38,11 @@ static void tb_scan_port(struct tb_port *port) return; if (port->config.type != TB_TYPE_PORT) return; + if (port->dual_link_port && port->link_nr) + return; /* + * Downstream switch is reachable through two ports. + * Only scan on the primary port (link_nr == 0). + */ if (tb_wait_for_port(port, false) <= 0) return; if (port->remote) { -- cgit v1.2.3