提交 609ece9c 编写于 作者: S Sanjay R Mehta 提交者: Zheng Zengkai

thunderbolt: Fix port linking by checking all adapters

stable inclusion
from stable-5.10.67
commit 491c8be21993bdb63f36dba3b7004d8bce6a83ff
bugzilla: 182619 https://gitee.com/openeuler/kernel/issues/I4EWO7

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=491c8be21993bdb63f36dba3b7004d8bce6a83ff

--------------------------------

[ Upstream commit 42716425 ]

In tb_switch_default_link_ports(), while linking of ports,
only odd-numbered ports (1,3,5..) are considered and even-numbered
ports are not considered.

AMD host router has lane adapters at 2 and 3 and link ports at adapter 2
is not considered due to which lane bonding gets disabled.

Hence added a fix such that all ports are considered during
linking of ports.
Signed-off-by: NBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: NSanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 df765278
...@@ -2204,7 +2204,7 @@ static void tb_switch_default_link_ports(struct tb_switch *sw) ...@@ -2204,7 +2204,7 @@ static void tb_switch_default_link_ports(struct tb_switch *sw)
{ {
int i; int i;
for (i = 1; i <= sw->config.max_port_number; i += 2) { for (i = 1; i <= sw->config.max_port_number; i++) {
struct tb_port *port = &sw->ports[i]; struct tb_port *port = &sw->ports[i];
struct tb_port *subordinate; struct tb_port *subordinate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册