lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Oct 2022 23:12:23 -0500
From:   Mario Limonciello <mario.limonciello@....com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.com>
CC:     "open list:THUNDERBOLT DRIVER" <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <Sanju.Mehta@....com>,
        Mario Limonciello <mario.limonciello@....com>
Subject: [RFC 1/3] thunderbolt: Allow XHCI device links to enter runtime pm

Both on Intel's and AMD's USB4 designs it's important that the device
link to the XHCI controller used for tunneling is able to go into D3
for appropriate low power consumption features as well as for system
suspend states such as s0i3.

Historically this is accomplished by adding to a hardcoded list in the
XHCI driver, but this requires a change for every single platform.

We have a very good proxy that it's safe to do this since the firmware
has indicated the device link needs to be made.  So opt all XHCI
controllers with these device links into runtime PM.

Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
 drivers/thunderbolt/acpi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/thunderbolt/acpi.c b/drivers/thunderbolt/acpi.c
index b1f0dc8df47cd..5ffca085a47e3 100644
--- a/drivers/thunderbolt/acpi.c
+++ b/drivers/thunderbolt/acpi.c
@@ -75,6 +75,9 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data,
 		 pci_pcie_type(pdev) == PCI_EXP_TYPE_DOWNSTREAM))) {
 		const struct device_link *link;
 
+		if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
+			pm_runtime_allow(&pdev->dev);
+
 		/*
 		 * Make them both active first to make sure the NHI does
 		 * not runtime suspend before the consumer. The
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ