Thread (48 messages) 48 messages, 4 authors, 2021-11-29

Re: [PATCH v2 1/9] i2c: i801: Improve disabling runtime pm

From: Andy Shevchenko <hidden>
Date: 2021-08-12 09:48:39

On Wed, Aug 11, 2021 at 10:03:12PM +0200, Heiner Kallweit wrote:
On 11.08.2021 17:41, Andy Shevchenko wrote:
quoted
On Fri, Aug 06, 2021 at 11:12:18PM +0200, Heiner Kallweit wrote:
quoted
Setting the autosuspend delay to a negative value disables runtime pm in
a little bit smarter way, because we need no cleanup when removing the
driver. Note that this is safe when reloading the driver, because the
call to pm_runtime_set_autosuspend_delay() in probe() will reverse the
effect. See update_autosuspend() for details.
...
quoted
 		 * BIOS is accessing the host controller so prevent it from
 		 * suspending automatically from now on.
 		 */
-		pm_runtime_get_sync(&pdev->dev);
+		pm_runtime_set_autosuspend_delay(&pdev->dev, -1);
I dunno if it's being discussed, but with this you effectively allow user to
override the setting. It may screw things up AFAIU the comment above.
No, this hasn't been discussed. At least not now. Thanks for the hint.
This attribute is writable for the root user, so we could argue that
the root user has several options to break the system anyway.
But it will mean the side effect on this driver and typical (root-run) system
application (systemd like?) should care now the knowledge about this
side-effect. I do not think it is desired behaviour. But I'm not a maintainer
and I commented here just to make everybody understand the consequences of the
change.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help