Commit ce19f91e authored by Mika Westerberg's avatar Mika Westerberg

thunderbolt: Correct path indices for PCIe tunnel

PCIe tunnel path indices got mixed up when we added support for tunnels
between switches that are not adjacent. This did not affect the
functionality as it is just an index but fix it now nevertheless to make
the code easier to understand.
Reported-by: default avatarRajmohan Mani <rajmohan.mani@intel.com>
Fixes: 8c7acaaf ("thunderbolt: Extend tunnel creation to more than 2 adjacent switches")
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: default avatarYehezkel Bernat <YehezkelShB@gmail.com>
parent 04f77453
...@@ -211,7 +211,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up, ...@@ -211,7 +211,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
return NULL; return NULL;
} }
tb_pci_init_path(path); tb_pci_init_path(path);
tunnel->paths[TB_PCI_PATH_UP] = path; tunnel->paths[TB_PCI_PATH_DOWN] = path;
path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0, path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0,
"PCIe Up"); "PCIe Up");
...@@ -220,7 +220,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up, ...@@ -220,7 +220,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
return NULL; return NULL;
} }
tb_pci_init_path(path); tb_pci_init_path(path);
tunnel->paths[TB_PCI_PATH_DOWN] = path; tunnel->paths[TB_PCI_PATH_UP] = path;
return tunnel; return tunnel;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment