linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sanjay R Mehta <Sanju.Mehta@amd.com>
To: <mika.westerberg@linux.intel.com>, <andreas.noever@gmail.com>,
	<michael.jamet@intel.com>, <YehezkelShB@gmail.com>
Cc: <Basavaraj.Natikar@amd.com>, <Nehal-bakulchandra.Shah@amd.com>,
	<Shyam-sundar.S-k@amd.com>, <linux-usb@vger.kernel.org>,
	Sanjay R Mehta <sanju.mehta@amd.com>
Subject: [PATCH v3 4/4] thunderbolt: Fix port linking by checking all adapters
Date: Fri, 6 Aug 2021 11:59:08 -0500	[thread overview]
Message-ID: <1628269148-51355-5-git-send-email-Sanju.Mehta@amd.com> (raw)
In-Reply-To: <1628269148-51355-1-git-send-email-Sanju.Mehta@amd.com>

From: Sanjay R Mehta <sanju.mehta@amd.com>

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 & 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.

Fixes: 0d46c08d1ed4 ("thunderbolt: Add default linking between lane adapters if not provided by DROM")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
---
 drivers/thunderbolt/switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index 6447876..5c3d4bd 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -2456,7 +2456,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;
 
-- 
2.7.4


  parent reply	other threads:[~2021-08-06 17:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 16:59 [PATCH v3 0/4] Added some bug fixes for USB4 Sanjay R Mehta
2021-08-06 16:59 ` [PATCH v3 1/4] thunderbolt: Add quirk to support vendor specific implementation Sanjay R Mehta
2021-08-06 16:59 ` [PATCH v3 2/4] thunderbolt: Handle ring interrupt by reading intr status Sanjay R Mehta
2021-08-06 16:59 ` [PATCH v3 3/4] thunderbolt: Skip port init for control adapter(0) Sanjay R Mehta
2021-08-06 16:59 ` Sanjay R Mehta [this message]
2021-08-09 12:06 ` [PATCH v3 0/4] Added some bug fixes for USB4 Mika Westerberg
2021-08-09 12:28   ` Sanjay R Mehta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1628269148-51355-5-git-send-email-Sanju.Mehta@amd.com \
    --to=sanju.mehta@amd.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).