From: lirongqing <lirongqing@baidu.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Niklas Schnelle <schnelle@linux.ibm.com>,
Farhan Ali <alifm@linux.ibm.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
Frank Li <Frank.Li@nxp.com>, <linux-pci@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Li RongQing <lirongqing@baidu.com>
Subject: [PATCH] PCI: Save the Root Port state before a platform-specific reset
Date: Tue, 10 Nov 2026 13:33:48 +0800 [thread overview]
Message-ID: <20261110053348.2419-2-lirongqing@baidu.com> (raw)
In-Reply-To: <20261110053348.2419-1-lirongqing@baidu.com>
From: Li RongQing <lirongqing@baidu.com>
pcibios_reset_secondary_bus() restores the Root Port after
host->reset_root_port() without ever saving it. pci_bus_reset() only locks
the devices below the bridge, so the bridge itself is not in the saved set
either. Save the Root Port before the platform reset.
Fixes: 3fc686d550f6 ("PCI/ERR: Add support for resetting the Root Ports in a platform-specific way")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
drivers/pci/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index ddb86dd..eaccd89 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4929,6 +4929,7 @@ void __weak pcibios_reset_secondary_bus(struct pci_dev *dev)
int ret;
if (pci_is_root_bus(dev->bus) && host->reset_root_port) {
+ pci_save_state(dev);
ret = host->reset_root_port(host, dev);
if (ret)
pci_err(dev, "Failed to reset Root Port: %d\n", ret);
--
2.9.4
next prev parent reply other threads:[~2026-11-10 5:34 UTC|newest]
Thread overview: 4+ 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 ` lirongqing [this message]
2026-11-10 10:16 ` [PATCH] PCI: Save the Root Port state before a platform-specific reset Lukas Wunner
2026-11-10 10:13 ` [PATCH] PCI: Only restore state that was successfully saved around a reset 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=20261110053348.2419-2-lirongqing@baidu.com \
--to=lirongqing@baidu.com \
--cc=Frank.Li@nxp.com \
--cc=alifm@linux.ibm.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=schnelle@linux.ibm.com \
/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
all inboxes | Powered by JetHome®