Re: Bug#1131025: [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

Lukas Wunner
2026-04-03T14:58:57Z

[cc += Alex, Ilpo]

On Thu, Apr 02, 2026 at 07:53:09AM +0200, Bernd Schumacher wrote:
> dmesg with patch is now attached

Thank you Bernd!

If you cherry-pick these two upstream commits onto v6.12.73,
does the issue go away?

4d4c10f763d7 ("PCI: Explicitly put devices into D0 when initializing")
907a7a2e5bf4 ("PCI/PM: Set up runtime PM even for devices without PCI PM")

The second one is a fix for the first one.

I suspect that the first one is the reason why you are seeing
the issue on v6.12.73 but not on current mainline. The commit
went into v6.16 but was not backported to LTS kernels.

@Alex:
The commit sets pci_dev->current_state to PCI_D0 on device enumeration,
whereas previously it was PCI_UNKNOWN. This changes code paths in
a number of places. In particular:

vfio_pci_core_register_device()
vfio_pci_set_power_state()

... calls pci_restore_state() without a prior pci_save_state() if
current_state is PCI_UNKNOWN. The function doesn't do that for PCI_D0.

Also, there is a code comment in vfio_pci_core_register_device()
claiming that "pci-core sets the device power state to an unknown value
at bootup" which is no longer true since commit 4d4c10f763d7.

I recently had to deal with a regression in ASPM code which was
likewise caused by the subtle change of current_state from PCI_UNKNOWN
to PCI_D0, so my non-artificial neural network was trained to recognize
this pattern and seeing the current_state checks in vfio code thus
immediately looked suspicious to me:

https://bugzilla.kernel.org/show_bug.cgi?id=220705

Thanks,

Lukas