All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Andreas Fenkart <afenkart@gmail.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	GTA04 owners <gta04-owner@goldelico.com>,
	NeilBrown <neil@brown.name>,
	linux-omap <linux-omap@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks
Date: Thu, 26 Mar 2015 08:49:26 +1100	[thread overview]
Message-ID: <20150326084926.4bc3d55d@notabene.brown> (raw)
In-Reply-To: <CAPDyKFrt-rhsh4XAHma=F083Y-XYxJbGyLUEEh1C6KUni-RZ7g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]

On Mon, 23 Mar 2015 10:10:18 +0100 Ulf Hansson <ulf.hansson@linaro.org> wrote:

> On 24 February 2015 at 03:42, NeilBrown <neilb@suse.de> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2015-03-25 21:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  2:42 [PATCH 0/4] Switch to 1-bit mode SDIO before disabling clocks NeilBrown
2015-02-24  2:42 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown
2015-03-03 22:53   ` Tony Lindgren
2015-03-04  5:28     ` NeilBrown
2015-03-04 15:08       ` Tony Lindgren
2015-03-23  9:10   ` Ulf Hansson
2015-03-25 21:49     ` NeilBrown [this message]
2015-02-24  2:42 ` [PATCH 1/4] mmc: core: fold mmc_set_bus_width calls into sdio_enable_4bit_bus NeilBrown
2015-03-23  9:34   ` Ulf Hansson
2015-02-24  2:42 ` [PATCH 2/4] mmc: core: allow non-blocking form of mmc_claim_host NeilBrown
2015-03-23  9:58   ` Ulf Hansson
2015-03-23 15:19     ` Ulf Hansson
2015-02-24  2:42 ` [PATCH 4/4] mmc: omap_hsmmc: switch to 1-bit before stopping clocks NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2015-01-30 19:05 [PATCH-v2 0/4] mmc: switch to 1-bit mode which " NeilBrown
2015-01-30 19:05 ` [PATCH 3/4] mmc: sdio: support switching to 1-bit before turning off clocks NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150326084926.4bc3d55d@notabene.brown \
    --to=neilb@suse.de \
    --cc=adrian.hunter@intel.com \
    --cc=afenkart@gmail.com \
    --cc=gta04-owner@goldelico.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=tony@atomide.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.