From patchwork Wed Apr 5 08:29:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 9663207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 43FE260352 for ; Wed, 5 Apr 2017 08:29:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 314B1252D5 for ; Wed, 5 Apr 2017 08:29:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 261522858C; Wed, 5 Apr 2017 08:29:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6383D252D5 for ; Wed, 5 Apr 2017 08:29:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 770E26E746; Wed, 5 Apr 2017 08:29:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.hostsharing.net (mailout2.hostsharing.net [83.223.90.233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FB5A6E746 for ; Wed, 5 Apr 2017 08:29:14 +0000 (UTC) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout2.hostsharing.net (Postfix) with ESMTPS id CBFFB103C1642; Wed, 5 Apr 2017 10:29:04 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id D50491C6C13; Wed, 5 Apr 2017 10:29:11 +0200 (CEST) Date: Wed, 5 Apr 2017 10:29:11 +0200 From: Lukas Wunner To: Bjorn Helgaas Subject: Re: [PATCH v2 0/5] Thunderbolt GPU fixes Message-ID: <20170405082911.GA30781@h08.hostsharing.net> References: <20170331101159.GB3452@h08.hostsharing.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Mar 31, 2017 at 06:30:48AM -0700, Bjorn Helgaas wrote: > On Fri, Mar 31, 2017 at 3:11 AM, Lukas Wunner wrote: > > Bjorn, I haven't heard back after my reply to your e-mail of March 10 > > (regarding the "usually soldered to the mainboard" comment). I hope > > my reply was satisfactory. If it wasn't, please feel free to amend > > the comment after the 4.12 merge window closes or alternatively send > > me a patch to fix it up. > > I didn't want to needlessly prolong the discussion. I still think > "soldered to the mainboard" is unhelpful because it contributes to a > mental model that is incorrect, namely, that Thunderbolt connectedness > is somehow related to whether the device is soldered in or removable. > I don't think it's useful to reinforce the assumption that systems > with Thunderbolt have no PCIe slots. There's no technical reason we > can't have both, and I'm pretty sure I have an Intel box in the closet > that does. You're right, systems do exist which have other PCI expansion options besides Thunderbolt, even though they're relatively rare. E.g. there was one MacBook Pro (the 2011 17" model) which had a Thunderbolt 1 port as well as a CardBus slot. How about the patch below? If you can think of something better please let me know. Thanks! Lukas -- >8 -- Subject: [PATCH] PCI: Clarify kernel-doc of pci_is_thunderbolt_attached() The kernel-doc of pci_is_thunderbolt_attached() claims that a return value of false means the device is "usually soldered to the mainboard". Bjorn Helgaas pointed out that systems do exist which have both Thunderbolt as well as PCIe or CardBus slots and the kernel-doc may thus evoke incorrect assumptions. Attempt to make it more precise. Signed-off-by: Lukas Wunner --- include/linux/pci.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 5948cfd..78f3b41 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2167,7 +2167,8 @@ static inline bool pci_ari_enabled(struct pci_bus *bus) * * Walk upwards from @pdev and check for each encountered bridge if it's part * of a Thunderbolt controller. Reaching the host bridge means @pdev is not - * Thunderbolt-attached. (But rather soldered to the mainboard usually.) + * Thunderbolt-attached. (But rather soldered to the mainboard if the system + * has no other PCI expansion options.) */ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) {