Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1701510pxb; Thu, 16 Sep 2021 13:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsh3h0F0NvdMdTlX+rdvBqFwt6TnWKaMiDPld1WOcUbe6RytiIzq9YQ7VwJUuCcTbmRuux X-Received: by 2002:a92:c84c:: with SMTP id b12mr5357278ilq.105.1631823738452; Thu, 16 Sep 2021 13:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631823738; cv=none; d=google.com; s=arc-20160816; b=UfEKGhaJJ7vsjJrrAqRg3BUz4cWnkzom4jyrIlLOYpv1PcvDTpOXseYJBTdBsAcXv5 HmY2FPd/rnBXrF+mDL+TtTAyJSj8M5w1tgmDanFa4JnrhBI6oPo3bEMZfpyvYxxNsjkt agszKYvOgysPE7OcHFu/z0XdBfdjqtZ3nQxkeDD1YG2WskkjGO12fP1VfZt/As7+gm5W vToUJKYCPQlMCOzGYffNxG2mqHUts38IMdxEBiXoYVfK8CQRQupQaiSIXxu2Nox0Uwuv yPmPIFMiqYsFNIqagkIG6ifUDrqayeWU9EC4Y+tEYi4Jfi+oBrkcErmb7h9ubTPyQfUx Qkbw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LLhdGIAvmR5dUm5C6vUYDnow3RwxZ5CCV5jCv0YZr8I=; b=Da9mTvJfkUpchKGnj48Pd4AAtYOfQg+r4WPRDJ0y8XTERbfF6LL1HefsD5PeXNnFza dQmAhWHPY3XPKKSHPvbkzTaj7dVmOkIz9OzYJKAN0jzQ62R9AKnjZ8OInhTfpqfDGtjY tOhdn/tAO956DTo2V2eOcKA+sYNHsPNNGfRcYRyS8NcSbUXEJv2o2ivW0xw6qKlF2DyI TVqMEQ7W3WGvkrQHGERoZJc/kLGUeeRHnpAw2cKPWJFaLiYIH2QgOBxNBJ9VJpveCSmI ELgzMnoMQHJY4oe2pqp97e0npf526E13RCAsopw9j8Aa0DG0tEsd6zQ4fqHTI1YsvpoT GsVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QjitLb0w; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si3672750ilo.46.2021.09.16.13.22.06; Thu, 16 Sep 2021 13:22:18 -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=@linuxfoundation.org header.s=korg header.b=QjitLb0w; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbhIPQZS (ORCPT + 99 others); Thu, 16 Sep 2021 12:25:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:55010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240809AbhIPQRV (ORCPT ); Thu, 16 Sep 2021 12:17:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39C2661351; Thu, 16 Sep 2021 16:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808734; bh=wUMljGhgc5yPRcPZeHQ2QtxN4l0omWgDnImvqWZCzSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QjitLb0wMQQm3Lzadj8uTbgP8daNJM4VIG9Grn2KL2AcjJoNSxR48YnlLmKDH7izd wuFWhTX0WIiF2Tk9C3R/V4KlD0QA1KPlFwBGTYt7VP1sijbLWcBZMVUR3Wog3DD2o0 4ThIay1jXCxCHQ6jMY46yjKrNzhOswhr+WEHKkMA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Basavaraj Natikar , Sanjay R Mehta , Mika Westerberg , Sasha Levin Subject: [PATCH 5.10 202/306] thunderbolt: Fix port linking by checking all adapters Date: Thu, 16 Sep 2021 17:59:07 +0200 Message-Id: <20210916155800.938708217@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 9a272a516b2d..c4b157c29af7 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2204,7 +2204,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