On 10/26/2024 2:19 AM, Marek Vasut wrote:
On 10/13/24 1:03 PM, Lukas Wunner wrote:
On Sat, Oct 12, 2024 at 02:48:48AM +0200, Marek Vasut wrote:
The pci_host_probe() does reallocate BARs for devices which start up
with
uninitialized BAR addresses set to 0 by calling
pci_bus_assign_resources(),
which updates the device config space content.
At the same time, pci_pm_runtime_suspend() triggers pci_save_state()
for
all devices which do not have drivers assigned to them to store current
content of their config space registers.
What exactly do you mean by "at the same time"?
[...]
Work around the issue by not suspending pci_bus_type devices which do
not have driver assigned to them, keep those devices active to prevent
pci_save_state() from being called. Once a proper driver takes over, it
can RPM manage the device correctly.
It sounds like you may want to acquire a runtime PM reference
or disable runtime PM for the duration of the bus scan (or at
least device scan) rather than the proposed workaround.
I was hoping to get at least an confirmation that this issue really
exists and that I'm not chasing some nonsense. Thoughts ?