[PATCH 10/17][SRU][OEM-OSP1-B] thunderbolt: Correct path indices for PCIe tunnel
You-Sheng Yang
vicamo.yang at canonical.com
Tue Oct 1 12:46:03 UTC 2019
From: Mika Westerberg <mika.westerberg at linux.intel.com>
BugLink: https://bugs.launchpad.net/bugs/1844680
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: Rajmohan Mani <rajmohan.mani at intel.com>
Fixes: 8c7acaaf020f ("thunderbolt: Extend tunnel creation to more than 2 adjacent switches")
Signed-off-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Reviewed-by: Yehezkel Bernat <YehezkelShB at gmail.com>
(cherry picked from commit ce19f91eae43e39d5a1da55344756ab5a3c7e8d1)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
drivers/thunderbolt/tunnel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index 91d7e00516b4..5506dec3e22f 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -112,7 +112,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
return NULL;
}
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,
"PCIe Up");
@@ -121,7 +121,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up,
return NULL;
}
tb_pci_init_path(path);
- tunnel->paths[TB_PCI_PATH_DOWN] = path;
+ tunnel->paths[TB_PCI_PATH_UP] = path;
return tunnel;
}
--
2.20.1
More information about the kernel-team
mailing list