All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: "sashiko-reviews@lists.linux.dev"
	<sashiko-reviews@lists.linux.dev>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: 答复: [外部邮件] Re: [PATCH] PCI: Only restore state that was successfully saved around a reset
Date: Tue, 10 Nov 2026 08:17:39 +0000	[thread overview]
Message-ID: <e10398e8f2fe4d448e12c1e871564a9a@baidu.com> (raw)
In-Reply-To: <sashiko-outbox-206347@kernel.org>

> [Severity: High]
> Does skipping pci_restore_state() here introduce a regression that leaves the
> device unconfigured after a reset recovers it from an error?
> 
> Commit a2f1e22390ac ("PCI/ERR: Ensure error recoverability at all times") saves
> the initial config space in pci_bus_add_device() and removed the
> dev->state_saved check from pci_restore_state() so a valid baseline
> dev->state
> is always available even after a prior restore cleared dev->state_saved.
> 
> Commit e18d1abc3bff ("PCI: Avoid saving config space state if inaccessible")
> then skipped pci_save_state() in pci_dev_save_and_disable() when config space
> is inaccessible (such as during DPC) to avoid overwriting that preserved state
> with ~0 before the reset.
> 
> Since the hardware reset clears the device's registers back to power-on defaults,
> clearing dev->state_saved and skipping pci_restore_state() leaves BARs,
> PCI_COMMAND, capabilities, and bridge bus numbers unprogrammed once the
> reset makes config space accessible again.
> 
> [1] https://sashiko.dev/#/bug/linux-60bae679-5c85-4c49-8042-6817f9cb5c8f
> 

Sashiko is right — please drop this patch.

thanks

[Li,Rongqing] 

> --
> Sashiko AI
> review · https://sashiko.dev/#/patchset/20261110053348.2419-1-lirongqing
> @baidu.com?part=1

  reply	other threads:[~2026-11-10  8:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  5:33 [PATCH] PCI: Only restore state that was successfully saved around a reset lirongqing
2026-11-10  5:33 ` [PATCH] PCI: Save the Root Port state before a platform-specific reset lirongqing
2026-11-10  5:55   ` sashiko-bot
2026-11-10  8:19     ` 答复: [外部邮件] " Li,Rongqing
2026-11-10 10:16   ` Lukas Wunner
2026-11-12  2:47     ` 答复: [????] " Li,Rongqing
2026-11-10  5:51 ` [PATCH] PCI: Only restore state that was successfully saved around a reset sashiko-bot
2026-11-10  8:17   ` Li,Rongqing [this message]
2026-11-10 10:13 ` Lukas Wunner
2026-11-10 18:09 ` Farhan Ali
2026-11-12  2:31   ` 答复: [外部邮件] " Li,Rongqing

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=e10398e8f2fe4d448e12c1e871564a9a@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=linux-pci@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.