Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp451416pxb; Thu, 9 Sep 2021 04:55:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPE9dL6IylRDhEggorr0S3/aSFocqGdjtolMOpSBvXf6n48iSaG8vTA3duH/gu/vFMo4Qb X-Received: by 2002:a17:906:843:: with SMTP id f3mr2123050ejd.468.1631188508621; Thu, 09 Sep 2021 04:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188508; cv=none; d=google.com; s=arc-20160816; b=CurYEl/JsY/moLWoubG/eqjqaLqBaArKifoTRBY/HRtNurUnQE6PcrNaVnCl1Xno75 xvFKgpePhcaMyqNPEmF9EhvCW6e1Z2OV6aGirJnseJt03u5Lp8j5mFL4Lk9EUClgoQoF ZeaPVlHu1YrZ1XCRvO8xdpKJkfNPPSvrKs39BED5oddarkk8KmbQubMtmR7ntjSXP1eK h2NbhXiK+AO2S3nOjE06sbB2EO1w3XshR47JDOjaIYx21C7pSD7YLqJF1oZPltefDMLO s8MUenU6HcpGViG4BS9PIW+9t5fVKaEq8V4ADECF11gCbFaJLoa0y7oao7MGLqaGAiex peXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=klsOGye4rHXIm4DwqQZsjmORXVkiqz29Xvbfq5szqUo=; b=g6O9VTwIacGdf6O31ZdgEf6XhZmpUTGUjyufZgLOBngunH+rm6dcAF3ecRHBEyqgVB ZqVHYxo68Zu0X3mPH+tJm6WIYapwGYEgMV55RJqUEyJ8DOAGMUOGd9NWBFWVtEQ+BI0v ipKFli1eiQbYk1LVz/H6SifBishVPDgghMMpTx+/z9OOVSXqwhM5cTuDxYBR6XDoEQV9 PBImg/4THXSCQCZxEcL28gQLftEiP4SuzMazTVCmh2GKy8P1tE1LNthO8P0kgtK01B3/ GJkJpCqs2Bd3DinGkeH02kqBhNOScZmzIgY0gycTOW5576huyxQnmsZVWQ/Nhc3bo56V hZDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LiizHbSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq26si1920862ejc.615.2021.09.09.04.54.43; Thu, 09 Sep 2021 04:55:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LiizHbSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239648AbhIILyB (ORCPT + 99 others); Thu, 9 Sep 2021 07:54:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:55120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241447AbhIILu7 (ORCPT ); Thu, 9 Sep 2021 07:50:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5092C6135E; Thu, 9 Sep 2021 11:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187840; bh=6+FigFe1JfRp3EsUrqy4XkTFd6p4WNxKygRAKeaCjxE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LiizHbSSrEO9pcSVyKt+0gJj9EBSUIxEt7HKK1VnOA6MYwtTk7/xSE5BdxwnWASDO Nolo1VA7IIJQWmaMADuwX5XmRKl6O06K+VM9MZWDtKIYn1FKnUmFQ7L+LqXDmd5Wj7 o5HRftaQnmJpTPKiRYVRaXDR3wSpeCDrtmGQmnqq0+jblmHEUZ4CV1scQd8mvzTNq0 P9VdQl/iLEDbW1HygGnuEffPo/c5nfKUB4YhtUdTqfq66PK+TLRjGP9+u34Zg+hy6s oZ7yIg5V1EE2xIxInU2SU4cjhdqrDq7NZFcPOWtnYZWCVkcDstvv7wzTTcybzDINVk XN96yw2sc8iqg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sanjay R Mehta , Basavaraj Natikar , Mika Westerberg , Sasha Levin , linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 134/252] thunderbolt: Fix port linking by checking all adapters Date: Thu, 9 Sep 2021 07:39:08 -0400 Message-Id: <20210909114106.141462-134-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sanjay R Mehta [ Upstream commit 42716425ad7e1b6529ec61c260c11176841f4b5f ] 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 Signed-off-by: Sanjay R Mehta Signed-off-by: Mika Westerberg Signed-off-by: Sasha Levin --- 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 10d6b228cc94..eec59030c3a7 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2443,7 +2443,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.30.2