mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Raag Jadav <raag.jadav@intel.com>
Cc: Denis Benato <benato.denis96@gmail.com>,
	Mario Limonciello <superm1@kernel.org>,
	rafael@kernel.org, mahesh@linux.ibm.com, oohall@gmail.com,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com,
	aravind.iddamsetty@linux.intel.com
Subject: Re: [PATCH v3] PCI: Prevent power state transition of erroneous device
Date: Thu, 15 May 2025 14:26:53 +0200	[thread overview]
Message-ID: <aCXdjWaKpHST79ZO@wunner.de> (raw)
In-Reply-To: <aCXW4c-Ocly4t6yF@black.fi.intel.com>

On Thu, May 15, 2025 at 02:58:25PM +0300, Raag Jadav wrote:
> On Wed, May 14, 2025 at 11:25:36PM +0200, Denis Benato wrote:
> > I tested this patch on top of 6.14.6 and this patch comes with a nasty regression: s2idle resume breaks all my three GPUs, while for example the sound of a YT video resumes fine.
> >
> > You can see the dmesg here: https://pastebin.com/Um7bmdWi
> 
> Thanks for the report. From logs it looks like a hotplug event is triggered
> for presence detect which is disabling the slot and in turn loosing the
> device on resume. The cause of it is unclear though (assuming it is not
> a manual intervention).

When an Endpoint transitions to D3cold, the link to the Endpoint goes
down.  If the Downstream Port above the Endpoint is hotplug-capable,
it will see a Data Link Layer State Changed event as a side effect.
If it doesn't support out-of-band presence detect, it will also see
a Presence Detect Changed event as a side effect.

As a workaround, graphics drivers invoke pci_ignore_hotplug() and that
will cause pciehp and acpiphp to permanently ignore any hotplug events.

In v6.16 there will be a new pci_hp_ignore_link_change() and
pci_hp_unignore_link_change() API to tell PCI hotplug drivers that
DLLSC and PDC events shall be ignored temporarily:

https://git.kernel.org/pci/pci/c/2af781a9edc4

I intend to replace pci_ignore_hotplug() with this new approach,
as explained here:

https://lore.kernel.org/r/Z_nfuGrVh_CO7vbe@wunner.de

I'm not sure though if that will help with the issue at hand.

Thanks,

Lukas

  reply	other threads:[~2025-05-15 12:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-04  9:04 Raag Jadav
2025-05-12 10:23 ` Raag Jadav
2025-05-12 11:56 ` Rafael J. Wysocki
2025-05-12 16:52   ` Raag Jadav
2025-05-13  4:41 ` Lukas Wunner
2025-05-13 15:17   ` Raag Jadav
2025-05-14 16:29 ` Denis Benato
2025-05-14 19:53   ` Mario Limonciello
2025-05-14 21:25     ` Denis Benato
2025-05-15 11:58       ` Raag Jadav
2025-05-15 12:26         ` Lukas Wunner [this message]
2025-05-15 14:11         ` Denis Benato
2025-05-15 14:41           ` Mario Limonciello
2025-05-21 13:33         ` Lukas Wunner

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=aCXdjWaKpHST79ZO@wunner.de \
    --to=lukas@wunner.de \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=benato.denis96@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mahesh@linux.ibm.com \
    --cc=oohall@gmail.com \
    --cc=raag.jadav@intel.com \
    --cc=rafael@kernel.org \
    --cc=superm1@kernel.org \
    /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

all inboxes | Powered by JetHome®