Skip to content

Commit

Permalink
thunderbolt: Fix port linking by checking all adapters
Browse files Browse the repository at this point in the history
[ Upstream commit 4271642 ]

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: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Sanjay R Mehta authored and gregkh committed Sep 18, 2021
1 parent 091df71 commit 9d75d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thunderbolt/switch.c
Expand Up @@ -2308,7 +2308,7 @@ static void tb_switch_default_link_ports(struct tb_switch *sw)
{
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 *subordinate;

Expand Down

0 comments on commit 9d75d0f

Please sign in to comment.