All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@csr.com>
To: Linus Walleij <linus.ml.walleij@gmail.com>
Cc: Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, Ghorai Sukumar <s-ghorai@ti.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	Adrian Hunter <adrian.hunter@nokia.com>,
	Kyungmin Park <kmpark@infradead.org>,
	jh80.chung@samsung.com
Subject: Re: [PATCH 1/2] mmc: agressive clocking framework v8
Date: Wed, 22 Dec 2010 08:24:54 +0000	[thread overview]
Message-ID: <4D11B5D6.3030805@csr.com> (raw)
In-Reply-To: <AANLkTikdA5Pbiwx+VdhtgShhMGcLkJLV0B5O_Yi+_aCx@mail.gmail.com>

On 22/12/2010 08:12, Linus Walleij wrote:
> 2010/12/21 Chris Ball <cjb@laptop.org>:
> 
>> Hi Linus,
>>
>> On Wed, Nov 03, 2010 at 10:22:50AM +0100, Linus Walleij wrote:
>>> +/*
>>> + *   mmc_host_clk_exit - shut down clock gating code
>>> + *   @host: host with potential clock to control
>>> + */
>>> +static inline void mmc_host_clk_exit(struct mmc_host *host)
>>> +{
>>> +     /*
>>> +      * Wait for any outstanding gate and then make sure we're
>>> +      * ungated before exiting.
>>> +      */
>>> +     if (cancel_work_sync(&host->clk_disable_work))
>>> +             mmc_host_clk_gate_delayed(host);
>>> +     if (host->clk_gated)
>>> +             mmc_host_clk_ungate(host);
>>> +     BUG_ON(host->clk_requests > 0);
>>> +}
>>
>> I just hit the BUG_ON() above, when doing "rmmod sdhci-pci" on my x86
>> laptop running today's linux-next.  There was *no* SD card inserted,
>> and hadn't been one inserted all boot.
> 
> Hm, it's a plain bug...
> 
> We make sure it's ungated the line above so clk_requests is always
> == 1.
> 
> It should be BUG_ON(host->clk_requests > 1)

Change to a WARN_ON() perhaps?

David

  reply	other threads:[~2010-12-22  8:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03  9:22 [PATCH 1/2] mmc: agressive clocking framework v8 Linus Walleij
2010-11-08  9:26 ` Linus Walleij
2010-11-08 22:30   ` Linus Walleij
2010-11-09  3:59     ` Chris Ball
2010-11-09 10:18       ` Linus Walleij
2010-11-22 23:27       ` Chris Ball
2010-11-24 13:15         ` Linus Walleij
2010-11-24 13:38           ` Chris Ball
2010-11-10  9:05 ` Ohad Ben-Cohen
2010-11-10 16:25   ` Linus Walleij
2010-11-10 16:34     ` Chris Ball
2010-11-10 19:22     ` Ohad Ben-Cohen
2010-12-21 20:24 ` Chris Ball
2010-12-22  8:12   ` Linus Walleij
2010-12-22  8:24     ` David Vrabel [this message]
2010-12-22  8:50       ` Linus Walleij
2010-12-23  0:09         ` Chris Ball

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=4D11B5D6.3030805@csr.com \
    --to=david.vrabel@csr.com \
    --cc=adrian.hunter@nokia.com \
    --cc=cjb@laptop.org \
    --cc=jh80.chung@samsung.com \
    --cc=kmpark@infradead.org \
    --cc=linus.ml.walleij@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=s-ghorai@ti.com \
    /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.