aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/gcc-generate-rtl-pass.h
diff options
context:
space:
mode:
authorStanislaw Gruszka <[email protected]>2024-02-12 13:01:35 +0100
committerBjorn Helgaas <[email protected]>2024-03-07 17:58:07 -0600
commit002bf2fbc00e5c4b95fb167287e2ae7d1973281e (patch)
tree6431fa830ceac26fcdf8091264ebf9de5c1086a2 /scripts/gcc-plugins/gcc-generate-rtl-pass.h
parent96ed79791b1b213c892301595459e0ea404540b3 (diff)
PCI/AER: Block runtime suspend when handling errors
PM runtime can be done simultaneously with AER error handling. Avoid that by using pm_runtime_get_sync() before and pm_runtime_put() after reset in pcie_do_recovery() for all recovering devices. pm_runtime_get_sync() will increase dev->power.usage_count counter to prevent any possible future request to runtime suspend a device. It will also resume a device, if it was previously in D3hot state. I tested with igc device by doing simultaneous aer_inject and rpm suspend/resume via /sys/bus/pci/devices/PCI_ID/power/control and can reproduce: igc 0000:02:00.0: not ready 65535ms after bus reset; giving up pcieport 0000:00:1c.2: AER: Root Port link has been reset (-25) pcieport 0000:00:1c.2: AER: subordinate device reset failed pcieport 0000:00:1c.2: AER: device recovery failed igc 0000:02:00.0: Unable to change power state from D3hot to D0, device inaccessible The problem disappears when this patch is applied. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Cc: <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions