Repository navigation
Commit 65c021e
PM: runtime: Defer suspending suppliers
[ Upstream commit 5244f5e ]
Because the PM-runtime status of the device is not updated in
__rpm_callback(), attempts to suspend the suppliers of the given
device triggered by the rpm_put_suppliers() call in there may
cause a supplier to be suspended completely before the status of
the consumer is updated to RPM_SUSPENDED, which is confusing.
To avoid that (1) modify __rpm_callback() to only decrease the
PM-runtime usage counter of each supplier and (2) make rpm_suspend()
try to suspend the suppliers after changing the consumer's status to
RPM_SUSPENDED, in analogy with the device's parent.
Link: https://lore.kernel.org/linux-pm/CAPDyKFqm06KDw_p8WXsM4dijDbho4bb6T4k50UqqvR1_COsp8g@mail.gmail.com/
Fixes: 21d5c57 ("PM / runtime: Use device links")
Reported-by: elaine.zhang <zhangqing@rock-chips.com>
Diagnosed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 3db5fc5 commit 65c021e
1 file changed
Lines changed: 39 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
320 | 340 | | |
321 | 341 | | |
322 | 342 | | |
| |||
344 | 364 | | |
345 | 365 | | |
346 | 366 | | |
347 | | - | |
| 367 | + | |
| 368 | + | |
348 | 369 | | |
| 370 | + | |
349 | 371 | | |
350 | 372 | | |
351 | 373 | | |
| |||
368 | 390 | | |
369 | 391 | | |
370 | 392 | | |
371 | | - | |
372 | | - | |
| 393 | + | |
373 | 394 | | |
| 395 | + | |
374 | 396 | | |
375 | 397 | | |
376 | 398 | | |
| |||
642 | 664 | | |
643 | 665 | | |
644 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
645 | 670 | | |
646 | | - | |
| 671 | + | |
647 | 672 | | |
648 | 673 | | |
649 | 674 | | |
| |||
652 | 677 | | |
653 | 678 | | |
654 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
655 | 688 | | |
656 | 689 | | |
657 | 690 | | |
| |||
0 commit comments