Re: [PATCH v2 net-next] net: ethernet: ti: davinci_mdio: Add workaround for errata i2329

From: Andrew Lunn
Date: Fri Aug 12 2022 - 11:54:56 EST


> sh_eth is not configured for autosuspend and uses only pm_runtime_put().

I don't know the runtime power management code very well. We should
probably ask somebody how does. However:

https://elixir.bootlin.com/linux/latest/source/drivers/base/power/runtime.c#L168

This suggests it should be safe to perform an auto suspend on a device
which is not configured for auto suspend. To me, it looks like is
should directly suspend.

Devices are in a tree. If you suspend a leaf, you can walk up the tree
and suspend its parent as well, if it is not needed. Similarly, if you
wake a leaf, you need its parents awake as well, so you need to walk
up the tree and wake them. In order for this to work reliably, i
expect runtime PM to be very tolerant. If a device is not configured
for runtime PM, actions should be a NOP. If it is not configured for
auto suspend, and you ask it to auto suspend, to me, it would make
sense for it to immediately suspend, etc.

> Please provide your views on this. Your inputs on the next course of action
> would be helpful.

I would suggest you talk to somebody who knows about runtime PM.

Andrew