Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4231965imj; Tue, 12 Feb 2019 12:07:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IYVBCJl94TRi3mGIKPxvQR4e9Q27QUZAcbyHmZuQdUKvOR+A/qk0uuQg9Of5eytIXHqnHPS X-Received: by 2002:a63:ce50:: with SMTP id r16mr3966012pgi.217.1550002035959; Tue, 12 Feb 2019 12:07:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550002035; cv=none; d=google.com; s=arc-20160816; b=FipAYM0pHYKnV7aJIqRCTn3PHwHlsO/lBnRbsO/irW0xtATX+kD830gFOzJcSOhq/k NTbIukV8N6ps4WwR6Za6IjGwLp0SMEKWMS2J3kzmeZfTRqzWEdwZTVADFxlVCR0JXubj tjr2vkxZ02HAZtB8SkfNRFif0iSpwJheMDm/H6BHBH52PDNP2rMDmaoNvuDNJLv3wYgz 5LIiI+prGKgzZfg7QFnqYx3lbouIOaIx59utiTwDsdJqGRfAatoGv3/XVJyMERmOGixq m3XUoxPQ0q9JPHCj16/8ygTGOU+magEmcJMjCHnyQ4Y6BUdOCmCQtpl7wINy6zUwexcw WCiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XDkoDrVttn6p2UP6INcpQ5ssiyzdx7FkphIf1UQwjAc=; b=OphWEkxlEiv5BWlGgsYgf+n/wLcDcPMBFA8vhRv/hA6MxrHVJzZNHnsTDoZ6nhNwbd mzfAjxmoMELEEjjEKqOAfGO3dOVz2fzsbxy6x2zD7D6BRcgio+mULoZn+uwaBCxTIeX3 h3RWtNn0GD1/s3O9pNzfjguxPQA2Vk9/e5OPoNLozMAqlRVCzUNhvI3dreXduEdV5AcS Z20662UlVR5+vIignffwuq6GBpmtg3nwwgyZkTh7g1pReYBBxIbY0D/c/ML/mHrKaMV/ wENGC6M0YXKOEIxR/eEsfD9QM/huXI8PBktuHE07O8b3zkxZUbyrKV6Dv8Lrqbq68lnl EgEA== ARC-Authentication-Results: i=1; mx.google.com; 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 30si7631134plb.161.2019.02.12.12.06.59; Tue, 12 Feb 2019 12:07:15 -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; 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 S1730876AbfBLTmv (ORCPT + 99 others); Tue, 12 Feb 2019 14:42:51 -0500 Received: from bmailout2.hostsharing.net ([83.223.90.240]:51711 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727428AbfBLTmv (ORCPT ); Tue, 12 Feb 2019 14:42:51 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 5F81C2800B3E2; Tue, 12 Feb 2019 20:42:49 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 16F1117E4A; Tue, 12 Feb 2019 20:42:49 +0100 (CET) Date: Tue, 12 Feb 2019 20:42:49 +0100 From: Lukas Wunner To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Michael Jamet , Yehezkel Bernat , Andreas Noever , Andy Shevchenko Subject: Re: [PATCH v2 16/28] thunderbolt: Discover preboot PCIe paths the boot firmware established Message-ID: <20190212194249.2ftl2ckureow44lo@wunner.de> References: <20190206131738.43696-1-mika.westerberg@linux.intel.com> <20190206131738.43696-17-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190206131738.43696-17-mika.westerberg@linux.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 06, 2019 at 04:17:26PM +0300, Mika Westerberg wrote: > +static struct tb_port *tb_port_remote(struct tb_port *port) > +{ > + struct tb_port *remote = port->remote; > + > + /* > + * If we have a dual link, the remote is available through the > + * primary link. > + */ > + if (!remote && port->dual_link_port && port->dual_link_port->remote) > + return port->dual_link_port->remote->dual_link_port; > + return remote; > +} Yet more special-casing for dual-link ports. :-( > + if (tunnel->dst_port->config.type != TB_TYPE_PCIE_UP) { > + tb_port_warn(tunnel->dst_port, > + "path does not end to a PCIe adapter\n"); Nit: I think the proper proposition is "on" or "at", not "to". The tunnel discovery algorithm looks solid to me, so: Reviewed-by: Lukas Wunner When the module is unloaded, tb_stop() currently deactivates all PCI tunnels. Is this still a good idea now that tunnels are discovered on probe? We could just leave the tunnels in place and rediscover them when the module is reloaded. If something was unplugged in the meantime, pciehp will have disconnected the devices and we should notice on reprobe that certain tunnels cannot be rediscovered, so no harm no foul. Thoughts? Thanks, Lukas