[SRU][OEM-B][PULL] Thunderbolt runtime D3 and PCIe D3 Cold
AceLan Kao
acelan.kao at canonical.com
Wed Oct 31 06:42:26 UTC 2018
BugLink: https://bugs.launchpad.net/bugs/1800770
[Impact]
Currently in Ubuntu Bionic 4.15 kernel, we already support thunderbolt
to enter runtime D3 Hot, and require BIOS' assist to cut off the power
of the thunderbolt.
After OSI "Windows 2017.2" (Windows 10 version 1709), BIOS stop cutting
off the power of thunderbolt, and leave it to OS to set thunderbolt to
D3 Cold. It consumes more than 2+Watt during short/long idle when
thunderbolt is in D3 Hot, instead of D3 Cold.
[Fix]
To add D3 Cold support, we mainly require this patchset[1] which is
targeted to enter v4.20. To avoid conflicts and solve error/warning
message, I cherry picked 142 and backported 10 commit. I also cherry
picked the "Windows 2017.2" OSI commit[2] as a whole.
[Test]
Verified on 2 machines with Alpine Ridge thunderbolt and 1 machine
with Titan Ridge thunderbolt, after S3 30 times, hotplug the thunderbolt
dockering, the HDMI output, Ethernet, USB disk are still working.
And verified the SRU stress test on another Alpine Ridge thunderbolt
machine, the result is positive.
[Regression Potential]
Medium. Although other engineers and I have done some testing on some
machines, our QA will do a more thoroughly testing when the kernel is in
proposed archive.
1. https://www.spinics.net/lists/linux-acpi/msg83977.html
2. https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?h=for-usb-next&id=140a6c8af798dfcc06796f907656604c6914
---
The following changes since commit 5a392e14134879aadacb0e3e553c0d866f0a1ee8:
UBUNTU: Ubuntu-oem-4.15.0-1025.30 (2018-10-24 15:31:37 +0300)
are available in the Git repository at:
https://git.launchpad.net/~acelankao/+git/ubuntu-bionic tbt_rtd3
for you to fetch changes up to edcb660a547a2aa4506c40c1e2b055d806240e92:
driver core: Don't ignore class_dir_create_and_add() failure. (2018-10-31 13:48:43 +0800)
----------------------------------------------------------------
Bjorn Helgaas (28):
PCI: Add SPDX GPL-2.0+ to replace GPL v2 or later boilerplate
PCI/portdrv: Merge pcieport_if.h into portdrv.h
PCI/PM: Move pcie_clear_root_pme_status() to core
PCI/portdrv: Remove pcie_port_bus_type link order dependency
PCI/portdrv: Disable port driver in compat mode
PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC
PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter
PCI/portdrv: Remove unnecessary "pcie_ports=auto" parameter
PCI/portdrv: Encapsulate pcie_ports_auto inside the port driver
PCI: Clean up whitespace in linux/pci.h, pci/pci.h
PCI/portdrv: Simplify PCIe feature permission checking
PCI/portdrv: Rename and reverse sense of pcie_ports_auto
PCI/DPC: Rename from pcie-dpc.c to dpc.c
PCI: pciehp: Add quirk for Command Completed errata
PCI: Add Qualcomm vendor ID
PCI: Remove redundant probes for device reset support
ixgbe: Report PCIe link properties with pcie_print_link_status()
PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver
PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors
PCI/portdrv: Remove unnecessary include of <linux/pci-aspm.h>
PCI: shpchp: Use dev_printk() for OSHP-related messages
bnx2x: Report PCIe link properties with pcie_print_link_status()
bnxt_en: Report PCIe link properties with pcie_print_link_status()
cxgb4: Report PCIe link properties with pcie_print_link_status()
fm10k: Report PCIe link properties with pcie_print_link_status()
PCI: Remove unused pcie_get_minimum_link()
PCI: shpchp: Manage SHPC unconditionally on non-ACPI systems
PCI: shpchp: Separate existence of SHPC and permission to use it
Bryant G. Ly (1):
powerpc/pseries: Add Initialization of VF Bars
Cyrille Pitchen (1):
PCI: Add vendor ID for Cadence
Desnes A. Nunes do Rosario (1):
PCI: Remove messages about reassigning resources
Frederick Lawler (3):
PCI/portdrv: Move pcieport_if.h to drivers/pci/pcie/
PCI: Add wrappers for dev_printk()
PCI/AER: Use cached AER Capability offset
Gil Kupfer (1):
PCI: Add "pci=noats" boot parameter
Hans de Goede (1):
xhci: Add Intel extended cap / otg phy mux handling
Hari Vyas (1):
PCI: Fix is_added/is_busmaster race condition
Jakub Kicinski (1):
PCI: Add "PCIe" to pcie_print_link_status() messages
Jan Kiszka (1):
PCI: Make pci_get_new_domain_nr() static
Keith Busch (1):
PCI: pciehp: Fix hot-add vs powerfault detection order
Logan Gunthorpe (3):
PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support
PCI: Make specifying PCI devices in kernel parameters reusable
PCI: Allow specifying devices using a base bus and path of devfns
Lukas Wunner (39):
PCI: pciehp: Fix use-after-free on unplug
PCI: pciehp: Declare pciehp_unconfigure_device() void
PCI: pciehp: Document struct slot and struct controller
PCI: hotplug: Don't leak pci_slot on registration failure
PCI: pciehp: Fix unprotected list iteration in IRQ handler
PCI: pciehp: Drop unnecessary NULL pointer check
PCI: pciehp: Convert to threaded IRQ
PCI: pciehp: Convert to threaded polling
PCI: pciehp: Stop blinking on slot enable failure
PCI: pciehp: Handle events synchronously
PCI: pciehp: Drop slot workqueue
PCI: hotplug: Demidlayer registration with the core
PCI: pciehp: Publish to user space last on probe
PCI: pciehp: Track enable/disable status
PCI: pciehp: Enable/disable exclusively from IRQ thread
PCI: pciehp: Drop enable/disable lock
PCI: pciehp: Declare pciehp_enable/disable_slot() static
PCI: pciehp: Tolerate initially unstable link
PCI: pciehp: Become resilient to missed events
PCI: pciehp: Always enable occupied slot on probe
PCI: pciehp: Avoid slot access during reset
PCI: portdrv: Deduplicate PM callback iterator
PCI: pciehp: Clear spurious events earlier on resume
PCI: pciehp: Obey compulsory command delay after resume
PCI: pciehp: Support interrupts sent from D3hot
PCI: pciehp: Resume to D0 on enable/disable
PCI: pciehp: Resume parent to D0 on config space access
PCI: sysfs: Resume to D0 on function reset
PCI: Whitelist native hotplug ports for runtime D3
PCI: Whitelist Thunderbolt ports for runtime D3
PCI: pciehp: Deduplicate presence check on probe & resume
PCI: pciehp: Tolerate Presence Detect hardwired to zero
PCI: Simplify disconnected marking
PCI: pciehp: Differentiate between surprise and safe removal
PCI: pciehp: Drop unnecessary includes
PCI: pciehp: Drop hotplug_slot_ops wrappers
PCI: pciehp: Avoid implicit fallthroughs in switch statements
PCI: pciehp: Unify controller and slot structs
PCI: Make pci_wakeup_bus() & pci_bus_set_current_state() public
Marc Zyngier (2):
xhci: Allow more than 32 quirks
xhci: Add quirk to zero 64bit registers on Renesas PCIe controllers
Mario Limonciello (2):
ACPICA: Recognize the Windows 10 version 1607 and 1703 OSI strings
ACPICA: Recognize the _OSI string "Windows 2017.2"
Markus Elfring (1):
PCI: Remove unnecessary messages for memory allocation failures
Mathias Nyman (6):
xhci-pci: allow host runtime PM as default for Intel Alpine and Titan Ridge
usb: Don't die twice if PCI xhci host is not responding in resume
xhci: refactor xhci_urb_enqueue a bit with minor changes
xhci: Clear the host side toggle manually when endpoint is soft reset
xhci: add helper to allocate command with input context
xhci: remove unnecessary boolean parameter from xhci_alloc_command
Michael Ellerman (1):
PCI/AER: Move pci_uevent_ers() out of pci.h
Mika Westerberg (31):
ACPI / hotplug / PCI: Don't scan bridges managed by native hotplug
ACPI / hotplug / PCI: Mark stale PCI devices disconnected
ACPI / hotplug / PCI: Drop unnecessary parentheses
PCI: Account for all bridges on bus when distributing bus numbers
PCI: Move resource distribution for single bridge outside loop
PCI: Improve pci_scan_bridge() and pci_scan_bridge_extend() doc
PCI: Do not skip power-managed bridges in pci_enable_wake()
PCI / ACPI: Enable wake automatically for power managed bridges
PCI: hotplug: Drop checking of PCI_BRIDGE_CONTROL in *_unconfigure_device()
PCI: pciehp: Clear Presence Detect and Data Link Layer Status Changed on resume
PCI: pciehp: Disable hotplug interrupt during suspend
PCI: pciehp: Do not handle events if interrupts are masked
PCI: pciehp: Make pciehp_is_native() stricter
PCI: pciehp: Rename host->native_hotplug to host->native_pcie_hotplug
PCI: hotplug: Add hotplug_is_native()
PCI: shpchp: Remove acpi_get_hp_hw_control_from_firmware() flags
PCI: shpchp: Remove get_hp_hw_control_from_firmware() wrapper
PCI: shpchp: Rely on previous _OSC results
PCI: shpchp: Add shpchp_is_native()
PCI: pciehp: Request control of native hotplug only if supported
PCI: shpchp: Request SHPC control via _OSC when adding host bridge
PCI/portdrv: Resume upon exit from system suspend if left runtime suspended
PCI/portdrv: Add runtime PM hooks for port service drivers
PCI: pciehp: Implement runtime PM callbacks
PCI/PME: Implement runtime PM callbacks
ACPI / property: Allow multiple property compatible _DSD entries
PCI / ACPI: Whitelist D3 for more PCIe hotplug ports
thunderbolt: Initialize after IOMMUs
ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge
thunderbolt: Do not handle ICM events after domain is stopped
PCI: shpchp: Convert SHPC to be builtin only
Oza Pawandeep (4):
PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices
PCI/AER: Rename error recovery interfaces to generic PCI naming
PCI/AER: Factor out error reporting to drivers/pci/pcie/err.c
PCI: Add generic pcie_wait_for_link() interface
Rafael J. Wysocki (8):
PCI / PM: Use SMART_SUSPEND and LEAVE_SUSPENDED flags for PCIe ports
PCI / PM: Do not clear state_saved for devices that remain suspended
PM: i2c-designware-platdrv: Use DPM_FLAG_SMART_PREPARE
PM: i2c-designware-platdrv: Optimize power management
PM / mfd: intel-lpss: Use DPM_FLAG_SMART_SUSPEND
PCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM
PCI / ACPI / PM: Resume all bridges on suspend-to-RAM
PCI / PM: Clean up outdated comments in pci_target_state()
Simon Guo (1):
PCI/hotplug: ppc: correct a php_slot usage after free
Sinan Kaya (6):
PCI: Handle FLR failure and allow other reset types
PCI: Protect restore with device lock to be consistent
PCI: Rename pci_flr_wait() to pci_dev_wait() and make it generic
PCI: Add a return type for pci_reset_bridge_secondary_bus()
PCI: Wait for device to become ready after a power management reset
PCI: Wait for device to become ready after secondary bus reset
Tal Gilboa (7):
PCI: Add pcie_get_speed_cap() to find max supported link speed
PCI: Add pcie_get_width_cap() to find max supported link width
PCI: Add pcie_bandwidth_capable() to compute max supported link bandwidth
PCI: Add pcie_bandwidth_available() to compute bandwidth available to device
PCI: Add pcie_print_link_status() to log link speed and whether it's limited
net/mlx4_core: Report PCIe link properties with pcie_print_link_status()
net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth
Tetsuo Handa (1):
driver core: Don't ignore class_dir_create_and_add() failure.
Documentation/PCI/pci-error-recovery.txt | 35 ++++--
Documentation/admin-guide/kernel-parameters.txt | 62 +++++++---
arch/powerpc/include/asm/pci.h | 2 +
arch/powerpc/kernel/pci-common.c | 4 +-
arch/powerpc/kernel/pci_of_scan.c | 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +-
arch/powerpc/platforms/pseries/setup.c | 165 +++++++++++++++++++++++++
drivers/acpi/acpica/utosi.c | 3 +
drivers/acpi/pci_root.c | 22 +++-
drivers/acpi/property.c | 97 +++++++++++----
drivers/acpi/x86/apple.c | 2 +-
drivers/base/core.c | 14 ++-
drivers/gpio/gpiolib-acpi.c | 2 +-
drivers/i2c/busses/i2c-designware-core.h | 2 -
drivers/i2c/busses/i2c-designware-platdrv.c | 39 +++---
drivers/iommu/amd_iommu.c | 11 +-
drivers/iommu/intel-iommu.c | 3 +-
drivers/mfd/intel-lpss.c | 6 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 23 +---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 +--
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 75 +-----------
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 87 +------------
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 47 +------
drivers/net/ethernet/mellanox/mlx4/main.c | 81 +-----------
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 32 +----
drivers/pci/access.c | 8 +-
drivers/pci/ats.c | 3 +
drivers/pci/bus.c | 10 +-
drivers/pci/host/pci-tegra.c | 15 +--
drivers/pci/host/pci-xgene-msi.c | 11 +-
drivers/pci/host/pci-xgene.c | 12 +-
drivers/pci/host/pcie-rockchip.c | 6 +-
drivers/pci/host/pcie-xilinx-nwl.c | 6 +-
drivers/pci/host/pcie-xilinx.c | 6 +-
drivers/pci/hotplug/Kconfig | 5 +-
drivers/pci/hotplug/acpi_pcihp.c | 85 ++++++-------
drivers/pci/hotplug/acpiphp.h | 16 +--
drivers/pci/hotplug/acpiphp_core.c | 38 +-----
drivers/pci/hotplug/acpiphp_glue.c | 115 ++++++++++-------
drivers/pci/hotplug/acpiphp_ibm.c | 16 +--
drivers/pci/hotplug/cpci_hotplug.h | 16 +--
drivers/pci/hotplug/cpci_hotplug_core.c | 30 +----
drivers/pci/hotplug/cpci_hotplug_pci.c | 16 +--
drivers/pci/hotplug/cpcihp_generic.c | 21 +---
drivers/pci/hotplug/cpcihp_zt5550.c | 21 +---
drivers/pci/hotplug/cpcihp_zt5550.h | 21 +---
drivers/pci/hotplug/cpqphp.h | 16 +--
drivers/pci/hotplug/cpqphp_core.c | 35 +-----
drivers/pci/hotplug/cpqphp_ctrl.c | 16 +--
drivers/pci/hotplug/cpqphp_nvram.c | 16 +--
drivers/pci/hotplug/cpqphp_nvram.h | 16 +--
drivers/pci/hotplug/cpqphp_pci.c | 16 +--
drivers/pci/hotplug/cpqphp_sysfs.c | 16 +--
drivers/pci/hotplug/ibmphp.h | 16 +--
drivers/pci/hotplug/ibmphp_core.c | 44 +++----
drivers/pci/hotplug/ibmphp_ebda.c | 36 +-----
drivers/pci/hotplug/ibmphp_hpc.c | 16 +--
drivers/pci/hotplug/ibmphp_pci.c | 76 ++++--------
drivers/pci/hotplug/ibmphp_res.c | 54 +++-----
drivers/pci/hotplug/pci_hotplug_core.c | 150 ++++++++++++++++-------
drivers/pci/hotplug/pciehp.h | 183 ++++++++++++++++-----------
drivers/pci/hotplug/pciehp_core.c | 237 ++++++++++++++++++-----------------
drivers/pci/hotplug/pciehp_ctrl.c | 508 +++++++++++++++++++++++++++++++--------------------------------------------
drivers/pci/hotplug/pciehp_hpc.c | 489 +++++++++++++++++++++++++++++++++++++++----------------------------------
drivers/pci/hotplug/pciehp_pci.c | 71 ++++-------
drivers/pci/hotplug/pcihp_skeleton.c | 16 +--
drivers/pci/hotplug/pnv_php.c | 52 +++-----
drivers/pci/hotplug/rpadlpar.h | 6 +-
drivers/pci/hotplug/rpadlpar_core.c | 6 +-
drivers/pci/hotplug/rpadlpar_sysfs.c | 6 +-
drivers/pci/hotplug/rpaphp.h | 16 +--
drivers/pci/hotplug/rpaphp_core.c | 18 +--
drivers/pci/hotplug/rpaphp_pci.c | 16 +--
drivers/pci/hotplug/rpaphp_slot.c | 29 +----
drivers/pci/hotplug/s390_pci_hpc.c | 13 +-
drivers/pci/hotplug/sgi_hotplug.c | 45 +++----
drivers/pci/hotplug/shpchp.h | 36 +-----
drivers/pci/hotplug/shpchp_core.c | 70 ++++-------
drivers/pci/hotplug/shpchp_ctrl.c | 16 +--
drivers/pci/hotplug/shpchp_hpc.c | 16 +--
drivers/pci/hotplug/shpchp_pci.c | 28 +----
drivers/pci/hotplug/shpchp_sysfs.c | 16 +--
drivers/pci/iov.c | 10 +-
drivers/pci/irq.c | 7 +-
drivers/pci/msi.c | 7 +-
drivers/pci/of.c | 6 +-
drivers/pci/pci-acpi.c | 107 +++++++++++++---
drivers/pci/pci-driver.c | 99 ++++++++++++++-
drivers/pci/pci-stub.c | 2 +-
drivers/pci/pci-sysfs.c | 50 ++------
drivers/pci/pci.c | 753 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
drivers/pci/pci.h | 95 +++++++++++----
drivers/pci/pcie/Makefile | 5 +-
drivers/pci/pcie/aer/aer_inject.c | 19 ++-
drivers/pci/pcie/aer/aerdrv.c | 8 +-
drivers/pci/pcie/aer/aerdrv.h | 33 +----
drivers/pci/pcie/aer/aerdrv_core.c | 305 ++-------------------------------------------
drivers/pci/pcie/aer/aerdrv_errprint.c | 22 ++--
drivers/pci/pcie/aer/ecrc.c | 4 +-
drivers/pci/pcie/aspm.c | 9 +-
drivers/pci/pcie/{pcie-dpc.c => dpc.c} | 15 +--
drivers/pci/pcie/err.c | 385 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/pcie/pme.c | 34 +++++-
drivers/pci/pcie/portdrv.h | 95 +++++++++++----
drivers/pci/pcie/portdrv_acpi.c | 3 +-
drivers/pci/pcie/portdrv_bus.c | 55 ---------
drivers/pci/pcie/portdrv_core.c | 133 ++++++++++----------
drivers/pci/pcie/portdrv_pci.c | 74 +++--------
drivers/pci/pcie/ptm.c | 2 +-
drivers/pci/probe.c | 109 ++++++++++-------
drivers/pci/quirks.c | 204 +++++++++++++++----------------
drivers/pci/remove.c | 5 +-
drivers/pci/rom.c | 4 +-
drivers/pci/setup-bus.c | 128 ++++++++++---------
drivers/pci/setup-irq.c | 4 +-
drivers/pci/setup-res.c | 40 +++---
drivers/pci/vc.c | 18 ++-
drivers/pci/xen-pcifront.c | 19 ++-
drivers/platform/x86/asus-wmi.c | 12 +-
drivers/platform/x86/eeepc-laptop.c | 12 +-
drivers/thunderbolt/icm.c | 49 +++-----
drivers/thunderbolt/nhi.c | 2 +-
drivers/usb/core/hcd-pci.c | 2 -
drivers/usb/host/Makefile | 2 +-
drivers/usb/host/xhci-ext-caps.c | 90 ++++++++++++++
drivers/usb/host/xhci-ext-caps.h | 2 +
drivers/usb/host/xhci-hub.c | 5 +-
drivers/usb/host/xhci-mem.c | 37 +++---
drivers/usb/host/xhci-pci.c | 37 +++++-
drivers/usb/host/xhci-ring.c | 11 +-
drivers/usb/host/xhci.c | 216 ++++++++++++++++++++++++++------
drivers/usb/host/xhci.h | 75 ++++++------
include/acpi/acpi_bus.h | 8 +-
include/acpi/actypes.h | 3 +
include/asm-generic/pci_iomap.h | 6 +-
include/linux/acpi.h | 9 ++
include/linux/pci.h | 457 ++++++++++++++++++++++++++++++++++----------------------------------
include/linux/pci_hotplug.h | 49 ++++----
include/linux/pci_ids.h | 5 +
include/linux/pcieport_if.h | 71 -----------
140 files changed, 3972 insertions(+), 3787 deletions(-)
rename drivers/pci/pcie/{pcie-dpc.c => dpc.c} (95%)
create mode 100644 drivers/pci/pcie/err.c
delete mode 100644 drivers/pci/pcie/portdrv_bus.c
create mode 100644 drivers/usb/host/xhci-ext-caps.c
delete mode 100644 include/linux/pcieport_if.h
--
2.17.1
More information about the kernel-team
mailing list