summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r--drivers/thunderbolt/switch.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 504365d46827..5c2c0201ae7f 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -644,24 +644,6 @@ int tb_switch_reset(struct tb *tb, u64 route)
644 return res.err; 644 return res.err;
645} 645}
646 646
647struct tb_switch *get_switch_at_route(struct tb_switch *sw, u64 route)
648{
649 u8 next_port = route; /*
650 * Routes use a stride of 8 bits,
651 * eventhough a port index has 6 bits at most.
652 * */
653 if (route == 0)
654 return sw;
655 if (next_port > sw->config.max_port_number)
656 return NULL;
657 if (tb_is_upstream_port(&sw->ports[next_port]))
658 return NULL;
659 if (!sw->ports[next_port].remote)
660 return NULL;
661 return get_switch_at_route(sw->ports[next_port].remote->sw,
662 route >> TB_ROUTE_SHIFT);
663}
664
665/** 647/**
666 * tb_plug_events_active() - enable/disable plug events on a switch 648 * tb_plug_events_active() - enable/disable plug events on a switch
667 * 649 *