linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mario Limonciello <superm1@kernel.org>
Cc: mario.limonciello@amd.com, bhelgaas@google.com,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 1/2] PCI: Don't show errors on inaccessible PCI devices
Date: Thu, 19 Jun 2025 08:14:50 +0200	[thread overview]
Message-ID: <aFOq2ub8P47kvmpC@wunner.de> (raw)
In-Reply-To: <20250616192813.3829124-2-superm1@kernel.org>

On Mon, Jun 16, 2025 at 02:26:56PM -0500, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
> 
> When a USB4 dock is unplugged the PCIe bridge it's connected to will
> remove issue a "Link Down" and "Card not detected event". The PCI core
> will treat this as a surprise hotplug event and unconfigure all downstream
> devices. This involves setting the device error state to
> `pci_channel_io_perm_failure` which pci_dev_is_disconnected() will check.
> 
> As the device is already gone and the PCI core is cleaning up there isn't
> really any reason to show error messages to the user about failing to
> change power states. Detect the device is marked disconnected and skip the
> messaging.

Code change looks reasonable to me, but should be cc'ed to Rafael.

I find the commit message a bit confusing.  I guess your point is
that it doesn't make sense to runtime resume disconnected devices
to D0 and report the (expected) failure to do so.  That's one sentence.
And the subject could be something like:

    PCI/PM: Skip resuming to D0 if disconnected

Thanks,

Lukas

  reply	other threads:[~2025-06-19  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16 19:26 [PATCH v2 0/2] Don't make noise about disconnected USB4 devices Mario Limonciello
2025-06-16 19:26 ` [PATCH v2 1/2] PCI: Don't show errors on inaccessible PCI devices Mario Limonciello
2025-06-19  6:14   ` Lukas Wunner [this message]
2025-06-19 13:36     ` Mario Limonciello
2025-06-16 19:26 ` [PATCH v2 2/2] PCI: Fix runtime PM usage count underflow Mario Limonciello
2025-06-19  6:09   ` 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=aFOq2ub8P47kvmpC@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --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;
as well as URLs for NNTP newsgroup(s).