public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenneth Crudup <kenny@panix.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>, Me <kenny@panix.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: So, I had to revert d6d458d42e1 ("Handle DisplayPort tunnel activation asynchronously") too, to stop my resume crashes
Date: Mon, 3 Mar 2025 06:17:06 -0800	[thread overview]
Message-ID: <7c42c094-83c5-453b-a229-c435d89d5ecc@panix.com> (raw)
In-Reply-To: <20250303140156.GY3713119@black.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]


Oh, and to be complete I should point out I have the following attached 
commit against Linus' master, else I don't get full power savings during 
s0ix sleep.

(I've been trying to get the PM people to get a version of this in for 
nearly a year now.)

I don't think it's relevant here, but just-in-case ....

-Kenny

-- 
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange 
County CA

[-- Attachment #2: 0001-PCI-ASPM-Fixup-ASPM-for-VMD-bridges.patch --]
[-- Type: text/x-patch, Size: 2110 bytes --]

From 849e27052d5a1e279cce7b6ab14e40a39c3b2b24 Mon Sep 17 00:00:00 2001
From: "Kenneth R. Crudup" <kenny@panix.com>
Date: Fri, 13 Dec 2024 15:28:42 -0800
Subject: [PATCH] PCI/ASPM: Fixup ASPM for VMD bridges

Effectively a squashed commit of:
UBUNTU: SAUCE: PCI/ASPM: Enable ASPM for links under VMD domain
UBUNTU: SAUCE: PCI/ASPM: Enable LTR for endpoints behind VMD
UBUNTU: SAUCE: vmd: fixup bridge ASPM by driver name instead
---
 drivers/pci/pcie/aspm.c | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 28567d457613..a5df6230cf3c 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -768,6 +768,31 @@ static void aspm_l1ss_init(struct pcie_link_state *link)
 		aspm_calc_l12_info(link, parent_l1ss_cap, child_l1ss_cap);
 }
 
+/*
+ * BIOS may not be able to access config space of devices under VMD domain, so
+ * it relies on software to enable ASPM for links under VMD.
+ */
+static bool pci_fixup_vmd_bridge_enable_aspm(struct pci_dev *pdev)
+{
+       struct pci_bus *bus = pdev->bus;
+       struct device *dev;
+       struct pci_driver *pdrv;
+
+       if (!pci_is_root_bus(bus))
+               return false;
+
+       dev = bus->bridge->parent;
+       if (dev == NULL)
+               return false;
+
+       pdrv = pci_dev_driver(to_pci_dev(dev));
+       if (pdrv == NULL || strcmp("vmd", pdrv->name))
+               return false;
+
+       pci_info(pdev, "enable ASPM for pci bridge behind vmd");
+       return true;
+}
+
 static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
 {
 	struct pci_dev *child = link->downstream, *parent = link->pdev;
@@ -846,7 +871,8 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
 	}
 
 	/* Save default state */
-	link->aspm_default = link->aspm_enabled;
+	link->aspm_default = pci_fixup_vmd_bridge_enable_aspm(parent) ?
+		PCIE_LINK_STATE_ASPM_ALL : link->aspm_enabled;
 
 	/* Setup initial capable state. Will be updated later */
 	link->aspm_capable = link->aspm_support;
-- 
2.45.2


      parent reply	other threads:[~2025-03-03 14:17 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-02  4:57 So, I had to revert d6d458d42e1 ("Handle DisplayPort tunnel activation asynchronously") too, to stop my resume crashes Kenneth Crudup
2025-03-02  5:36 ` Kenneth Crudup
2025-03-02 16:26   ` Kenneth Crudup
2025-03-02 16:30     ` Kenneth Crudup
2025-03-03 10:46       ` Mika Westerberg
2025-03-03 11:02         ` Kenneth Crudup
2025-03-03 11:21           ` Mika Westerberg
2025-03-03 11:38             ` Kenneth Crudup
2025-03-03 11:45               ` Kenneth Crudup
2025-03-03 11:55                 ` Mika Westerberg
2025-03-03 12:39                   ` Kenneth Crudup
2025-03-03 12:51                     ` Kenneth Crudup
2025-03-03 11:53               ` Mika Westerberg
2025-03-03 12:33                 ` Kenneth Crudup
2025-03-03 13:13                   ` Mika Westerberg
2025-03-03 13:19                     ` Kenneth Crudup
2025-03-03 13:23                       ` Mika Westerberg
2025-03-03 13:46                         ` Mika Westerberg
2025-03-03 13:53                           ` Kenneth Crudup
2025-03-03 14:01                             ` Mika Westerberg
2025-03-03 14:10                               ` Kenneth Crudup
2025-03-03 14:20                                 ` Mika Westerberg
2025-03-03 14:33                                   ` Kenneth Crudup
2025-03-03 17:58                                     ` Mika Westerberg
2025-03-03 18:20                                       ` Kenneth Crudup
2025-03-03 19:44                                         ` Kenneth Crudup
2025-03-04  8:27                                           ` Mika Westerberg
2025-03-04 12:52                                             ` Kenneth Crudup
2025-03-04 13:40                                               ` Mika Westerberg
2025-03-04 13:48                                                 ` Kenneth Crudup
2025-03-04 13:51                                                   ` Mika Westerberg
2025-03-04 17:29                                                     ` Kenneth Crudup
2025-03-05  8:31                                                       ` Mika Westerberg
2025-03-03 14:17                               ` Kenneth Crudup [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c42c094-83c5-453b-a229-c435d89d5ecc@panix.com \
    --to=kenny@panix.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox