On 2019-09-12 19:05:47 +0100, Wolfram Sang wrote: > On Wed, Sep 11, 2019 at 04:16:56PM +0200, Ulf Hansson wrote: > > On Mon, 9 Sep 2019 at 12:46, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote: > > > > > > During probe, tmio variant drivers calls pm_runtime_enable() before they > > > call tmio_mmc_host_probe(). This doesn't work as expected, because > > > tmio_mmc_host_probe() calls pm_runtime_set_active(), which fails to set the > > > status to RPM_ACTIVE for the device, when its been enabled for runtime PM. > > > > > > Fix this by calling pm_runtime_enable() from tmio_mmc_host_probe() instead. > > > To avoid the device from being runtime suspended during the probe phase, > > > let's also increase the runtime PM usage count in tmio_mmc_host_probe(). > > > Consequentially, each tmio variant driver can decide themselves when to > > > call pm_runtime_put(), to allow the device to become runtime suspended. > > > > > > Additionally, if the tmio variant driver decided to call pm_runtime_put() > > > during probe, it's is expected that it also calls pm_runtime_get_sync() to > > > restore the usage count, before it calls tmio_mmc_host_remove(). > > > > > > Fixes: 7ff213193310 ("mmc: tmio: move runtime PM enablement to the driver implementations") > > > Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> > > > > So I decided to apply this for my fixes branch, as to get it tested > > for a few days. > > > > If you have any objections, please tell. > > Sadly, I can't test until next week because I am still on the road. Yet, > I recall Niklas said at LPC that the patch looks good to him, at least. > Yes I think it looks good and was planing to test it. Unfortunately I'm also on the road until the end of next week ;-( -- Regards, Niklas Söderlund