Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2541397imm; Mon, 10 Sep 2018 02:48:04 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb8GXedmPaE+adqp2p6ZGwpreAJj6vPiIkHNxmcp5eCt03re42BWJClpCQ9xg194uaFoiBi X-Received: by 2002:a17:902:4d45:: with SMTP id o5-v6mr20958907plh.78.1536572883932; Mon, 10 Sep 2018 02:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536572883; cv=none; d=google.com; s=arc-20160816; b=lmGgDLK+RKAI1f9wOiRvutO0hHKmXWEXo6llGx5Z+axbKYdTTtajNIFLJNvkcnEARv RMI7f6AtLQiRJaepXAS+ssRg+g05YdgSUd4X9ft/V0LuItb5D5dnQkmyyzvi+TzJPFwI Y0b2zZmzRNbhl3bW3v0rwo6wHEzC2Ga7q2S3Rk8XYwqqwG9lbnufsRIeQXUdNy6G9M/k WsmzpdXxn7rd+Uic8AiBCbxjJzqyQPNizKDgaXVhm5N0KqNOIIoeMv7vAxSRNDnfXG8N oPikIukhM8nduwGCrO+2p3VVtMbnhPAm974Qeh/YVJd3RDTwIn+ocd96WsLEoEjWaqij yDTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IlUT4D85Jfo3Am6fzK049yQXDTjM7eQMz2UdZNuyAMA=; b=YFjqQegE8TDOGe2I7tY9xOvm1zZ4c4eC5coXOiSmMOdgje4RE3HV6je59ISTU3EwvN mBu+rZz29XwClWeEsq9TXP7bCbO/BBwsnSMhziYw0Wjvlwgoo9eWsyM5K8pK3G7c7jJt VcwL/Uhrbdxm3CGqYZZ9aLn26noEQQScdr+SIuwjNV5oQbFY7FihLu7wyk9U7jnyJImu v/vYiqe2NK4q3TqNB7iUJvSlSLk/sm5Gd+Tts5d8ZzrgUpyf35rVGshrZ/nldzuHUQCQ cuXbNJ7eaNeu+IiCWTJXgTjyb8i9x/JJ99nfqNw0mrC6xHwDlolbxyZyl6yLBBOG81DV dBtA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o34-v6si16310266pgm.502.2018.09.10.02.47.48; Mon, 10 Sep 2018 02:48:03 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728088AbeIJOi0 (ORCPT + 99 others); Mon, 10 Sep 2018 10:38:26 -0400 Received: from mga06.intel.com ([134.134.136.31]:46449 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeIJOi0 (ORCPT ); Mon, 10 Sep 2018 10:38:26 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2018 02:45:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,355,1531810800"; d="scan'208";a="71974902" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by orsmga008.jf.intel.com with SMTP; 10 Sep 2018 02:44:55 -0700 Received: by lahna (sSMTP sendmail emulation); Mon, 10 Sep 2018 12:44:54 +0300 Date: Mon, 10 Sep 2018 12:44:54 +0300 From: Mika Westerberg To: Lukas Wunner Cc: Andreas Noever , Michael Jamet , Yehezkel Bernat , Stephen Hemminger , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] thunderbolt: Correlate PCI devices with Thunderbolt ports Message-ID: <20180910094454.GJ14465@lahna.fi.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukas, On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote: > Ideas what we can do with correlation: > > * Represent the relationship between PCI devices and Thunderbolt ports > with symlinks in sysfs. I wonder is that really useful? I don't think we should be adding sysfs entries without any real reason why it would be needed and who would be using them. > * Thunderbolt controllers up to revision 1 of Cactus Ridge 4C have to > use INTx because MSI signaling is broken. This results in hotplug > ports sharing interrupts with other devices and, when daisy-chaining > multiple affected Thunderbolt controllers, can lead to extremely > unbalanced interrupt usage. To avoid this we could prefer downstream > ports for tunnel establishment which do not share interrupts (based > on the nr_actions field of the correlated PCI device's irq_desc). > > * Alternatively, we could use non-working MSI signaling on affected > controllers and synthesize an interrupt whenever a tunnel is > established or goes down on unplug. Problem I see with this patch as it stands is that you add 200+ lines of code into the driver that is not being used by anything as far as I understand it.