linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Mark mmc_host device with pm_runtime_no_callbacks
@ 2021-03-20  4:57 kehuanlin
  2021-03-22 10:25 ` Ulf Hansson
  0 siblings, 1 reply; 8+ messages in thread
From: kehuanlin @ 2021-03-20  4:57 UTC (permalink / raw)
  To: ulf.hansson; +Cc: linux-mmc, linux-kernel, kehuanlin, kehuanlin

The rpm_resume() will call parent's resume callback recursively.
Since mmc_host has no its own pm_runtime callbacks, the mmc devices
may fail to resume (-ENOSYS in rpm_callback) sometimes. Mark mmc_host
device with pm_runtime_no_callbacks can fix the issue.

Signed-off-by: kehuanlin <chgokhl@gmail.com>
---
 drivers/mmc/core/host.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 9b89a91b6b47..177bebd9a6c4 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -15,6 +15,7 @@
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/pagemap.h>
+#include <linux/pm_runtime.h>
 #include <linux/pm_wakeup.h>
 #include <linux/export.h>
 #include <linux/leds.h>
@@ -480,6 +481,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
 	host->class_dev.class = &mmc_host_class;
 	device_initialize(&host->class_dev);
 	device_enable_async_suspend(&host->class_dev);
+	pm_runtime_no_callbacks(&host->class_dev);
 
 	if (mmc_gpio_alloc(host)) {
 		put_device(&host->class_dev);
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-21  9:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20  4:57 [PATCH] mmc: core: Mark mmc_host device with pm_runtime_no_callbacks kehuanlin
2021-03-22 10:25 ` Ulf Hansson
2021-03-23 10:49   ` hieagle
2021-03-23 14:00     ` Ulf Hansson
2021-05-07 11:38       ` Ulf Hansson
2021-05-26 12:18       ` Ulf Hansson
2021-06-21  1:38   ` hieagle
2021-06-21  9:20     ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).