From: Mario Limonciello <superm1@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: mario.limonciello@amd.com, bhelgaas@google.com,
linux-pci@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH 1/4] PCI: Don't show errors on inaccessible PCI devices
Date: Mon, 9 Jun 2025 10:41:00 -0500 [thread overview]
Message-ID: <8a45bf3f-5f30-4aed-85d5-b93d38d47a92@kernel.org> (raw)
In-Reply-To: <aEb5HjRQ6OHZj_hS@wunner.de>
On 6/9/2025 10:09 AM, Lukas Wunner wrote:
> [cc += Rafael, Mika]
>
> On Sun, Jun 08, 2025 at 08:58:01PM -0500, Mario Limonciello wrote:
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -1376,8 +1376,9 @@ int pci_power_up(struct pci_dev *dev)
>>
>> pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
>> if (PCI_POSSIBLE_ERROR(pmcsr)) {
>> - pci_err(dev, "Unable to change power state from %s to D0, device inaccessible\n",
>> - pci_power_name(dev->current_state));
>> + if (dev->error_state != pci_channel_io_perm_failure)
>> + pci_err(dev, "Unable to change power state from %s to D0, device inaccessible\n",
>> + pci_power_name(dev->current_state));
>> dev->current_state = PCI_D3cold;
>> return -EIO;
>> }
>
> Instead of merely silencing the error message, why not bail out early on
> in the function, i.e.
>
> if (pci_dev_is_disconnected(dev)) {
> dev->current_state = PCI_D3cold;
> return -EIO;
> }
>
Thanks for the suggestion. That sounds good to me, I'll have a try.
next prev parent reply other threads:[~2025-06-09 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 1:58 [PATCH 0/4] Don't make noise about disconnected USB4 devices Mario Limonciello
2025-06-09 1:58 ` [PATCH 1/4] PCI: Don't show errors on inaccessible PCI devices Mario Limonciello
2025-06-09 15:09 ` Lukas Wunner
2025-06-09 15:41 ` Mario Limonciello [this message]
2025-06-09 1:58 ` [PATCH 2/4] PCI: Fix runtime PM usage count underflow Mario Limonciello
2025-06-09 15:16 ` Lukas Wunner
2025-06-09 1:58 ` [PATCH 3/4] usb: xhci: Avoid showing errors during surprise removal Mario Limonciello
2025-06-09 12:42 ` Mathias Nyman
2025-06-09 13:07 ` Mario Limonciello
2025-06-09 14:52 ` Mathias Nyman
2025-06-09 1:58 ` [PATCH 4/4] usb: xhci: Avoid showing warnings for dying controller Mario Limonciello
2025-06-09 12:47 ` Mathias Nyman
2025-06-09 9:19 ` [PATCH 0/4] Don't make noise about disconnected USB4 devices Michał Pecio
2025-06-09 13:05 ` Mario Limonciello
2025-06-09 15:20 ` Lukas Wunner
-- strict thread matches above, loose matches on Subject: below --
2025-06-09 2:04 [PATCH 1/4] PCI: Don't show errors on inaccessible PCI devices Mario Limonciello
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=8a45bf3f-5f30-4aed-85d5-b93d38d47a92@kernel.org \
--to=superm1@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.