Re: [6.12.y regression] Regression with 58130e7ce6cb ("PCI/ERR: Ensure error recoverability at all times"): echo vfio-pci >driver_override does not work for DVB Adapter
From: Lukas Wunner
Date: Sat Mar 28 2026 - 10:11:46 EST
On Sat, Mar 28, 2026 at 02:37:50PM +0100, Salvatore Bonaccorso wrote:
> Bernd Schumacher reported in Debian (report and report from bisection
> in https://bugs.debian.org/1131025) a 6.12.y specific regression of
> 58130e7ce6cb ("PCI/ERR: Ensure error recoverability at all times"):
Thanks for the report and sorry for the breakage.
According to the Debian bug report, the issue only occurs on
v6.12-stable. It does not affect v6.18 and v6.19.
I note that v6.12-stable commit 58130e7ce6cb differs from upstream
commit a2f1e22390ac in that the call to pci_save_state() is at the
top of pci_bus_add_device(), not in the middle of the function after
pci_bridge_d3_update().
@Bernd, could you test whether moving the call to pci_save_state()
as in the small patch below resolves the issue on v6.12-stable?
If it does, then the upstream commit was backported to v6.12 in an
incorrect manner. If it does not, I need to dig deeper.
Thanks!
Lukas
-- >8 --
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 429c0c8ce93d..bdb3e10f947a 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -331,9 +331,6 @@ void pci_bus_add_device(struct pci_dev *dev)
struct device_node *dn = dev->dev.of_node;
int retval;
- /* Save config space for error recoverability */
- pci_save_state(dev);
-
/*
* Can not put in pci_device_add yet because resources
* are not assigned yet for some devices.
@@ -346,6 +343,9 @@ void pci_bus_add_device(struct pci_dev *dev)
pci_proc_attach_device(dev);
pci_bridge_d3_update(dev);
+ /* Save config space for error recoverability */
+ pci_save_state(dev);
+
dev->match_driver = !dn || of_device_is_available(dn);
retval = device_attach(&dev->dev);
if (retval < 0 && retval != -EPROBE_DEFER)