All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Francisco Beltrán Millalén" <fbeltranmillalen@gmail.com>,
	linux-pci@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v3 1/2] PCI/PM: Keep the saved config space of an inaccessible device
Date: Mon, 19 Oct 2026 20:34:22 +0000	[thread overview]
Message-ID: <sashiko-outbox-178178@kernel.org> (raw)
In-Reply-To: <20261019202445.38259-2-fbeltranmillalen@gmail.com>

> pci_save_state() saves the standard header without checking whether the
> device responded.  For an inaccessible device, each read returns all
> ones, overwriting the previous snapshot, which pci_restore_state()
> writes back after resume.  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.  This was seen on a MacBookPro14,3, where a bridge
> that stopped responding during system suspend came back after resume
> with bus numbers ff/ff/ff.
> 
> Commit e18d1abc3bff ("PCI: Avoid saving config space state if
> inaccessible") added pci_dev_config_accessible() and checks it before a
> reset.  Check it in pci_save_state() itself, so that system suspend is
> covered as well.
> 
> If it is not accessible, keep the previous snapshot, mark the state as
> saved and return 0.  This avoids changing callers or making the PM core
> warn about a low-power device without saved state.  pci_bus_add_device()
> saves the state when the device is added, so normally a snapshot exists.
> That snapshot can be older than the last values the device had, for
> example if its driver changed the Command register after the last
> successful save.
> 
> Assisted-by: LLM
> Signed-off-by: Francisco Beltrán Millalén <fbeltranmillalen@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261019202445.38259-1-fbeltranmillalen@gmail.com?part=1


  reply	other threads:[~2026-10-19 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 20:24 [PATCH v3 0/2] PCI/PM: Keep the saved config space of an inaccessible device Francisco Beltrán Millalén
2026-10-19 20:24 ` [PATCH v3 1/2] " Francisco Beltrán Millalén
2026-10-19 20:34   ` sashiko-bot [this message]
2026-10-19 20:24 ` [PATCH v3 2/2] PCI: Do not mistake an absent device for an active link Francisco Beltrán Millalén
2026-10-19 20:35   ` sashiko-bot
2026-10-20 10:20 ` [PATCH v3 0/2] PCI/PM: Keep the saved config space of an inaccessible device Mika Westerberg

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=sashiko-outbox-178178@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=fbeltranmillalen@gmail.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.