diff mbox

[v2,0/5] Thunderbolt GPU fixes

Message ID 20170405082911.GA30781@h08.hostsharing.net (mailing list archive)
State New, archived
Headers show

Commit Message

Lukas Wunner April 5, 2017, 8:29 a.m. UTC
On Fri, Mar 31, 2017 at 06:30:48AM -0700, Bjorn Helgaas wrote:
> On Fri, Mar 31, 2017 at 3:11 AM, Lukas Wunner <lukas@wunner.de> 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 <lukas@wunner.de>
---
 include/linux/pci.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

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)
 {