Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4484382ybx; Mon, 4 Nov 2019 14:11:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwHegJe+1OMOgbbpWAHQC5hc187gsJtsb492uC2OTskkIsKX3Ep/vLHruWCDbQqTl4T/z0E X-Received: by 2002:a17:906:751:: with SMTP id z17mr10028655ejb.313.1572905502008; Mon, 04 Nov 2019 14:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905502; cv=none; d=google.com; s=arc-20160816; b=bnQWTqlxOHKkFmlHWFq6DFeW/jiAJqFILnZTmCTqKIT685VybWmf8WOBbalYOQ7U3E hc+CR8aCvPytV/FI1Jpu/FXVx8hPv5Q2ZUIHocrHQL5+o4e79AfY0vd63+tgjTCGf2bO GHZEGDRm74a1UgOhnNcOIQnq47fzM/xbSFiDT/80tHJHiZZyV1zWK1X9DgScOxk4SdO+ 3D0jNYCE60qbPIBF/viDHjsp0LvkKjxZcpEMBOgWUUSKckXmA9soa6Wzjry1/LJglB4D Kdrpi7CPLOX2SJimmgrkGeC/c14Xa9a/RGlkrcqUgoqYkJRhwICeFaPCyjCKjmjQlhRA WXmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ctTurdg6njE7SdIlujsB7S1pAxB8ngg3/8SfzdMRZhw=; b=rFZiVLmwO+fcb8Hf/Iiu4Y6wP61W53UZW8WFStJK8u5zIKGrxqA8bvmM/iX7BdpNjq N+ivDn1bim/igdnRRHvz08droBeCBOwukrTll8neSyHoJkknhZu+2q14glZfoJSZDajU slwkahWj/lSxA0B644npws98ngOYx0J6OVQVQSd33PvDIgaQ85nrBbGzC1CnTeTn56vS wCnOF7Nuq6R3xH+UJ/OP1BhIgrGzECnr4bNwUQ9aMjWtHDgKR3eSAMA7v8TBi3gPbQ45 MbLxRlNpYS1F2Ssn9PaSm/GudAXqt6tRKt9l3EhxZ8CGvYjgAHgXGICpX2pYQ2T2LMPM 5HSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jynx4T0+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si5010003ejq.261.2019.11.04.14.11.18; Mon, 04 Nov 2019 14:11:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jynx4T0+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390240AbfKDWIc (ORCPT + 99 others); Mon, 4 Nov 2019 17:08:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:41288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387934AbfKDWIY (ORCPT ); Mon, 4 Nov 2019 17:08:24 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57B90205C9; Mon, 4 Nov 2019 22:08:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905303; bh=ehCd2uKuzcKZKMe7PXCnQAaDe+V/GG9EgLqTY/lcbkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jynx4T0+lY4MQK7G5g5yIk1iER/qFCbX94J2AyZXiCZ6qey4nz23WEJ68odBwULv+ Wn4bxlIYVKHdzt1andPLDwkciJ6+gqKu2cZupnmYgQe6hQ4kc9J2BeWhEh7xRdELoH bneS34NHrY8dhfPEE0/SKYh2AADkXRrpy/31UUII= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rajmohan Mani , Mika Westerberg , Yehezkel Bernat , Sasha Levin Subject: [PATCH 5.3 092/163] thunderbolt: Correct path indices for PCIe tunnel Date: Mon, 4 Nov 2019 22:44:42 +0100 Message-Id: <20191104212146.842453698@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mika Westerberg [ Upstream commit ce19f91eae43e39d5a1da55344756ab5a3c7e8d1 ] PCIe tunnel path indices got mixed up when we added support for tunnels between switches that are not adjacent. This did not affect the functionality as it is just an index but fix it now nevertheless to make the code easier to understand. Reported-by: Rajmohan Mani Fixes: 8c7acaaf020f ("thunderbolt: Extend tunnel creation to more than 2 adjacent switches") Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Signed-off-by: Sasha Levin --- drivers/thunderbolt/tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c index 31d0234837e45..5a99234826e73 100644 --- a/drivers/thunderbolt/tunnel.c +++ b/drivers/thunderbolt/tunnel.c @@ -211,7 +211,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up, return NULL; } tb_pci_init_path(path); - tunnel->paths[TB_PCI_PATH_UP] = path; + tunnel->paths[TB_PCI_PATH_DOWN] = path; path = tb_path_alloc(tb, up, TB_PCI_HOPID, down, TB_PCI_HOPID, 0, "PCIe Up"); @@ -220,7 +220,7 @@ struct tb_tunnel *tb_tunnel_alloc_pci(struct tb *tb, struct tb_port *up, return NULL; } tb_pci_init_path(path); - tunnel->paths[TB_PCI_PATH_DOWN] = path; + tunnel->paths[TB_PCI_PATH_UP] = path; return tunnel; } -- 2.20.1