On Mon, 23 Mar 2015 10:10:18 +0100 Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote: > On 24 February 2015 at 03:42, NeilBrown <neilb@xxxxxxx> wrote: > > @@ -941,8 +947,12 @@ void mmc_release_host(struct mmc_host *host) > > > > WARN_ON(!host->claimed); > > > > - if (host->ops->disable && host->claim_cnt == 1) > > - host->ops->disable(host); > > + if (host->claim_cnt == 1) { > > + if (atomic_read(&host->sdio_narrowed) == 1) > > + atomic_set(&host->sdio_narrowed, 0); > > + if (host->ops->disable) > > + host->ops->disable(host); > > + } > > As omap_hsmmc in currently the only user of the > host_ops->enable|disable() callbacks, I wonder if this approach will > work "race-free" for those hosts that don't implement these callbacks? Hi Ulf, you might have guessed, but to be explicit: I withdraw this patchset. I much prefer the other approach that I suggested using runtime PM on the mmc_host device and switching to 1-bit more in the pm_runtime_suspend function. As you say, omap_hsmmc is the only user of enable/disable and they were an important part of my strategy in this patchset. Which raises the question: what is omap_hsmmc using enable/disable? My guess is that it is largely historical - added because omap_hsmmc wanted runtime pm before sufficient generic infrastructure was available. I've tested a patch to remove it, and it seem fine. I'll post it. Thanks, NeilBrown
Attachment:
pgpbXe8I4ZuKI.pgp
Description: OpenPGP digital signature