linux-stable/drivers/pci
Lukas Wunner 8531e283be PCI: Recognize Thunderbolt devices
Detect on probe whether a PCI device is part of a Thunderbolt controller.
Intel uses a Vendor-Specific Extended Capability (VSEC) with ID 0x1234
on such devices.  Detect presence of this VSEC and cache it in a newly
added is_thunderbolt bit in struct pci_dev.

Also, add a helper to check whether a given PCI device is situated on a
Thunderbolt daisy chain (i.e., below a PCI device with is_thunderbolt
set).

The necessity arises from the following:

* If an external Thunderbolt GPU is connected to a dual GPU laptop,
  that GPU is currently registered with vga_switcheroo even though it
  can neither drive the laptop's panel nor be powered off by the
  platform.  To vga_switcheroo it will appear as if two discrete
  GPUs are present.  As a result, when the external GPU is runtime
  suspended, vga_switcheroo will cut power to the internal discrete GPU
  which may not be runtime suspended at all at this moment.  The
  solution is to not register external GPUs with vga_switcheroo, which
  necessitates a way to recognize if they're on a Thunderbolt daisy
  chain.

* Dual GPU MacBook Pros introduced 2011+ can no longer switch external
  DisplayPort ports between GPUs.  (They're no longer just used for DP
  but have become combined DP/Thunderbolt ports.)  The driver to switch
  the ports, drivers/platform/x86/apple-gmux.c, needs to detect presence
  of a Thunderbolt controller and, if found, keep external ports
  permanently switched to the discrete GPU.

v2: Make kerneldoc for pci_is_thunderbolt_attached() more precise,
    drop portion of commit message pertaining to separate series.
    (Bjorn Helgaas)

Cc: Andreas Noever <andreas.noever@gmail.com>
Cc: Michael Jamet <michael.jamet@intel.com>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Amir Levy <amir.jer.levy@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: http://patchwork.freedesktop.org/patch/msgid/0ab165a4a35c0b60f29d4c306c653ead14fcd8f9.1489145162.git.lukas@wunner.de
2017-03-30 22:42:30 +02:00
..
dwc PCI: exynos: Initialize elbi_base even when using PHY framework 2017-03-07 12:46:38 -06:00
host pci-v4.11-fixes-1 2017-03-03 16:44:21 -08:00
hotplug sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
pcie PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove 2017-03-07 14:23:30 -06:00
access.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
ats.c
bus.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
ecam.c PCI: Add MCFG quirks for Qualcomm QDF2432 host controller 2016-12-06 13:45:49 -06:00
host-bridge.c
hotplug-pci.c
htirq.c
iov.c PCI: Lock each enable/disable num_vfs operation in sysfs 2017-02-03 13:42:38 -06:00
irq.c
Kconfig PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory 2017-02-21 14:59:53 -06:00
Makefile PCI: dwc: Remove dependency of designware on CONFIG_PCI 2017-02-21 15:00:26 -06:00
msi.c PCI: add an API to get node from vector 2017-03-02 08:56:04 -07:00
of.c
pci-acpi.c Merge branch 'pci/pm' into next 2016-12-12 11:25:04 -06:00
pci-driver.c pci-v4.11-changes 2017-02-23 11:53:22 -08:00
pci-label.c
pci-mid.c pci-v4.10-changes 2016-12-15 12:46:48 -08:00
pci-stub.c
pci-sysfs.c PCI: Lock each enable/disable num_vfs operation in sysfs 2017-02-03 13:42:38 -06:00
pci.c Revert "PCI: pciehp: Add runtime PM support for PCIe hotplug ports" 2017-02-03 08:53:51 -06:00
pci.h PCI: Recognize Thunderbolt devices 2017-03-30 22:42:30 +02:00
probe.c PCI: Recognize Thunderbolt devices 2017-03-30 22:42:30 +02:00
proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
quirks.c PCI: Prevent VPD access for QLogic ISP2722 2017-03-07 14:16:57 -06:00
remove.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
rom.c PCI: Add comments about ROM BAR updating 2016-11-29 18:05:09 -06:00
search.c
setup-bus.c PCI: Remove res_to_dev_res() debug message 2016-12-29 11:27:52 -06:00
setup-irq.c
setup-res.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
slot.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00
syscall.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vc.c
vpd.c
xen-pcifront.c xen: make use of xenbus_read_unsigned() in xen-pcifront 2016-11-07 13:55:26 +01:00