summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/tb.h
diff options
context:
space:
mode:
authorMika Westerberg2017-02-19 20:51:30 +0100
committerMika Westerberg2019-04-18 10:18:52 +0200
commitfb19fac1d734504073fee64e9f9b28ccd41ab350 (patch)
tree2e7be03e98a958f4d27797730caf5f8673883cf3 /drivers/thunderbolt/tb.h
parentthunderbolt: Assign remote for both ports in case of dual link (diff)
downloadkernel-qcow2-linux-fb19fac1d734504073fee64e9f9b28ccd41ab350.tar.gz
kernel-qcow2-linux-fb19fac1d734504073fee64e9f9b28ccd41ab350.tar.xz
kernel-qcow2-linux-fb19fac1d734504073fee64e9f9b28ccd41ab350.zip
thunderbolt: Add helper function to iterate from one port to another
We need to be able to walk from one port to another when we are creating paths where there are multiple switches between two ports. For this reason introduce a new function tb_next_port_on_path(). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Lukas Wunner <lukas@wunner.de>
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r--drivers/thunderbolt/tb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 43bc4f490021..11d5ab53ad36 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -495,6 +495,8 @@ int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
void tb_port_release_in_hopid(struct tb_port *port, int hopid);
int tb_port_alloc_out_hopid(struct tb_port *port, int hopid, int max_hopid);
void tb_port_release_out_hopid(struct tb_port *port, int hopid);
+struct tb_port *tb_next_port_on_path(struct tb_port *start, struct tb_port *end,
+ struct tb_port *prev);
int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap);