All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Chander Kashyap <chander.kashyap@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	ben@simtec.co.uk, broonie@opensource.wolfsonmicro.com,
	kgene.kim@samsung.com, girish.shivananjappa@linaro.org,
	patches@linaro.org
Subject: Re: [PATCH 2/3] mmc: sdhci-s3c: Fix crash on module insertion for second time
Date: Wed, 19 Sep 2012 02:13:20 -0400	[thread overview]
Message-ID: <m3k3vqilq7.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <1347613731-29428-3-git-send-email-chander.kashyap@linaro.org> (Chander Kashyap's message of "Fri, 14 Sep 2012 14:38:50 +0530")

Hi,

On Fri, Sep 14 2012, Chander Kashyap wrote:
> If sdhci-s3c driver is built as module, it gives following error if inserted
> again after removing. This was happening as pm_runtime_use_autosuspend() is
> called in sdhci_s3c_probe() function but in sdhci_s3c_remove() its complementry
> pm_runtime_dont_use_autosuspend() is not called.
>
> BUG: spinlock bad magic on CPU#1, insmod/955
>  lock: 0xee771368, .magic: 00000000, .owner: insmod/955, .owner_cpu: 1
> [<c00147e0>] (unwind_backtrace+0x0/0xf8) from [<c0136b40>] (do_raw_spin_unlock+0xa4/0xe4)
> [<c0136b40>] (do_raw_spin_unlock+0xa4/0xe4) from [<c01be508>] (_raw_spin_unlock_irqrestore+0xc/0x38)
> [<c01be508>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c01a9334>] (sdhci_runtime_suspend_host+0x54/0x80)
> [<c01a9334>] (sdhci_runtime_suspend_host+0x54/0x80) from [<bf0060a8>] (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c])
> [<bf0060a8>] (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c]) from [<c016cb00>] (pm_generic_runtime_suspend+0x2c/0x40)
> [<c016cb00>] (pm_generic_runtime_suspend+0x2c/0x40) from [<c0170090>] (__rpm_callback+0x70/0x98)
> [<c0170090>] (__rpm_callback+0x70/0x98) from [<c01703f0>] (rpm_suspend+0xf0/0x534)
> [<c01703f0>] (rpm_suspend+0xf0/0x534) from [<c0171670>] (__pm_runtime_suspend+0x5c/0x74)
> [<c0171670>] (__pm_runtime_suspend+0x5c/0x74) from [<c016d018>] (pm_generic_runtime_idle+0x44/0x4c)
> [<c016d018>] (pm_generic_runtime_idle+0x44/0x4c) from [<c0170090>] (__rpm_callback+0x70/0x98)
> [<c0170090>] (__rpm_callback+0x70/0x98) from [<c0170984>] (rpm_idle+0xdc/0x18c)
> [<c0170984>] (rpm_idle+0xdc/0x18c) from [<c0171608>] (pm_runtime_set_autosuspend_delay+0x30/0x3c)
> [<c0171608>] (pm_runtime_set_autosuspend_delay+0x30/0x3c) from [<bf0069c4>] (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c])
> [<bf0069c4>] (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c]) from [<c016a014>] (platform_drv_probe+0x18/0x1c)
>
> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
> ---
>  drivers/mmc/host/sdhci-s3c.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 0cbb4c2..3f4518d 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -658,6 +658,7 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
>  
>  	sdhci_remove_host(host, 1);
>  
> +	pm_runtime_dont_use_autosuspend(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  
>  	clk_disable(sc->clk_bus[sc->cur_clk]);

Thanks, pushed to mmc-next for 3.7.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  parent reply	other threads:[~2012-09-19  6:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  9:08 [PATCH 0/3] mmc: sdhci-s3c: fixes and enhancements Chander Kashyap
2012-09-14  9:08 ` [PATCH 1/3] mmc: sdhci-s3c: Enable only required bus clock Chander Kashyap
2012-09-14  9:55   ` Jaehoon Chung
2012-09-14 10:46     ` Chander Kashyap
2012-09-14 10:49       ` Jaehoon Chung
2012-09-14  9:55   ` Girish K S
2012-09-19  6:12   ` Chris Ball
2012-09-14  9:08 ` [PATCH 2/3] mmc: sdhci-s3c: Fix crash on module insertion for second time Chander Kashyap
2012-09-14 10:25   ` Jaehoon Chung
2012-09-14 10:46   ` Girish K S
2012-09-19  6:13   ` Chris Ball [this message]
2012-09-14  9:08 ` [PATCH 3/3] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume Chander Kashyap
2012-09-19  6:14   ` Chris Ball
2012-09-19  7:43     ` Jaehoon Chung
2012-09-19  8:05       ` Chris Ball
2012-09-19 14:12       ` Chander Kashyap
2012-09-19 14:21         ` Chris Ball
2012-09-19 14:22           ` Chander Kashyap
2012-09-21  5:42   ` [PATCH v2 " Chander Kashyap
2012-09-21  6:49     ` Chris Ball
2012-10-17  9:15   ` [PATCH " Heiko Stübner
2012-10-18  2:04     ` Jaehoon Chung
2012-10-18  7:41       ` Heiko Stübner
2012-10-18  9:36         ` Seungwon Jeon
2012-10-18  9:52           ` Heiko Stübner

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=m3k3vqilq7.fsf@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=ben@simtec.co.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=chander.kashyap@linaro.org \
    --cc=girish.shivananjappa@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@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.