Commit d3fcd73
PCI: Fix runtime PM race with PME polling
Testing that a device is not currently in a low power state provides no
guarantees that the device is not imminently transitioning to such a state.
Increment the PM usage counter before accessing the device. Since we don't
wish to wake the device for PME polling, do so only if the device is
already active by using pm_runtime_get_if_active().
Link: https://lore.kernel.org/r/20230803171233.3810944-3-alex.williamson@redhat.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>1 parent 5cd903b commit d3fcd73
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2415 | 2415 | | |
2416 | 2416 | | |
2417 | 2417 | | |
2418 | | - | |
2419 | | - | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
2420 | 2424 | | |
2421 | | - | |
2422 | 2425 | | |
2423 | 2426 | | |
2424 | 2427 | | |
2425 | 2428 | | |
2426 | 2429 | | |
2427 | 2430 | | |
2428 | 2431 | | |
| 2432 | + | |
2429 | 2433 | | |
2430 | | - | |
2431 | | - | |
| 2434 | + | |
| 2435 | + | |
2432 | 2436 | | |
2433 | | - | |
| 2437 | + | |
| 2438 | + | |
2434 | 2439 | | |
2435 | 2440 | | |
2436 | | - | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
2437 | 2446 | | |
2438 | 2447 | | |
2439 | 2448 | | |
| |||
0 commit comments