Re: [PATCH 1/1] kernel/power/autosleep.c: check for pm_suspend() return before queueing suspend again

From: Pavel Machek
Date: Mon Jun 29 2015 - 05:21:20 EST


On Mon 2015-06-29 18:04:57, Nitish Ambastha wrote:
> Prevent tight loop for suspend-resume when some
> devices failed to suspend
> If some devices failed to suspend, we monitor this
> error in try_to_suspend(). pm_suspend() is already
> an 'int' returning function, how about checking return
> from pm_suspend() before queueing suspend again?
>
> For devices which do not register for pending events,
> this will prevent tight loop for suspend-resume in
> suspend abort scenarios due to device suspend failures

Umm. I guess code could be rearranged so that wait entry is shared
with the already existing case?

Plus, I don't think "INFO" is right log level for failure...

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/