From: Farhan Ali <alifm@linux.ibm.com>
To: "Bjorn Helgaas" <helgaas@kernel.org>,
"Francisco Beltrán Millalén" <fbeltranmillalen@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Lukas Wunner <lukas@wunner.de>,
Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>
Subject: Re: [PATCH v2 2/3] PCI/PM: Do not save the config space of an inaccessible device
Date: Fri, 9 Oct 2026 10:08:15 -0700 [thread overview]
Message-ID: <7ed02ff5-d7f8-42e4-bca9-b3d3ce7b6795@linux.ibm.com> (raw)
In-Reply-To: <20261008225825.GA936610@bhelgaas>
Hi Bjorn,
Thanks for cc'ing me.
On 10/8/2026 3:58 PM, Bjorn Helgaas wrote:
> [+cc Lukas, Farhan, Andreas, Mika, Yehezkel]
>
> On Wed, Sep 30, 2026 at 11:19:13AM -0300, Francisco Beltrán Millalén wrote:
>> pci_save_state() reads the standard header into dev->saved_config_space
>> and marks it valid without checking that the device answered. If the
>> device is not accessible, every read returns all ones, the previous
>> snapshot is overwritten, and pci_restore_state() writes the all-ones
>> values back once the device answers again. On a bridge that sets every
>> writable bit of the Bridge Control register, Secondary Bus Reset
>> included, and sets the primary, secondary and subordinate bus numbers
>> to 0xff, which cuts off everything below it.
>>
>> On a MacBookPro14,3 this happens to the upstream bridge of a
>> Thunderbolt controller that drops off the bus while the system is
>> suspending: after resume the bridge answers again, but with bus numbers
>> ff/ff/ff and Secondary Bus Reset asserted, and the xHCI controllers
>> behind it are removed.
> Apparently this is a reproducible issue on MacBookPro14,3. That makes
> me a little hesitant because we're not actually dealing with the fact
> that the Thunderbolt controller isn't responsive during suspend.
>
> It seems worthwhile to me to skip pci_save_state() if the device isn't
> accessible, but I don't think it's a real solution to whatever is
> going on with Thunderbolt, and I don't think we should mention it here
> as though it is.
When I had initially looked into this, I had proposed adding the
accessibility check in pci_save_state() as well [1]. Though Lukas had
some valid concerns around the additional overhead from adding it in
pci_save_state(). But maybe its worth re-visiting again?
Thanks
Farhan
[1] https://lore.kernel.org/all/aOQX6ZTMvekd6gWy@wunner.de/
next prev parent reply other threads:[~2026-10-09 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:19 [PATCH v2 0/3] PCI/PM: Do not save the config space of an inaccessible device Francisco Beltrán Millalén
2026-09-30 14:19 ` [PATCH v2 1/3] usb: hcd-pci: Honour pci_save_state() failure Francisco Beltrán Millalén
2026-09-30 14:19 ` [PATCH v2 2/3] PCI/PM: Do not save the config space of an inaccessible device Francisco Beltrán Millalén
2026-10-08 22:58 ` Bjorn Helgaas
2026-10-09 2:41 ` Francisco Beltrán Millalén
2026-10-09 17:08 ` Farhan Ali [this message]
2026-09-30 14:19 ` [PATCH v2 3/3] PCI: Do not mistake an absent device for an active link Francisco Beltrán Millalén
2026-10-08 18:55 ` [PATCH v2 0/3] PCI/PM: Do not save the config space of an inaccessible device Darrell Gum
2026-10-08 22:34 ` Bjorn Helgaas
2026-10-09 2:40 ` Francisco Beltrán Millalén
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=7ed02ff5-d7f8-42e4-bca9-b3d3ce7b6795@linux.ibm.com \
--to=alifm@linux.ibm.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=bhelgaas@google.com \
--cc=fbeltranmillalen@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=stern@rowland.harvard.edu \
--cc=westeri@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