thunderbolt: Fix port linking by checking all adapters
authorSanjay R Mehta <sanju.mehta@amd.com>
Tue, 3 Aug 2021 12:34:56 +0000 (07:34 -0500)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 9 Aug 2021 11:58:29 +0000 (14:58 +0300)
commit42716425ad7e1b6529ec61c260c11176841f4b5f
tree2e3a4e55029cecfaf9c740d1d694839255900b4f
parentfb7a89ad2f048489605611801d480c7bb9d03f94
thunderbolt: Fix port linking by checking all adapters

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>
drivers/thunderbolt/switch.c