linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Kevin Liu <kliu5@marvell.com>
Cc: linux-mmc@vger.kernel.org, Philip Rakity <prakity@nvidia.com>,
	Aaron Lu <aaron.lu@intel.com>, Shawn Guo <shawn.guo@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Johan Rudholm <johan.rudholm@stericsson.com>,
	Daniel Drake <dsd@laptop.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jerry Huang <Chang-Ming.Huang@freescale.com>,
	Alexander Stein <alexander.stein@systec-electronic.com>,
	Girish K S <girish.shivananjappa@linaro.org>,
	Haijun Zhang <Haijun.Zhang@freescale.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Thomas Abraham <thomas.abraham@linaro.org>,
	Chander Kashyap <chander.kashyap@linaro.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>,
	Zhangfei Gao <zhangfei.gao@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Chao
Subject: Re: [PATCH] mmc: sdhci: disable interrupt before free_irq
Date: Mon, 14 Jan 2013 14:41:13 -0500	[thread overview]
Message-ID: <87sj63sgbq.fsf@laptop.org> (raw)
In-Reply-To: <1357377508-12043-1-git-send-email-kliu5@marvell.com> (Kevin Liu's message of "Sat, 5 Jan 2013 17:18:28 +0800")

Hi,

On Sat, Jan 05 2013, Kevin Liu wrote:
> Current code missed disabling interrupts before free irq which is shared.
>
> Notice below comments for function free_irq (kernel/irq/manage.c):
> On a shared IRQ the caller must ensure the interrupt is disabled
> on the card it drives before calling this function.
>
> Original code has below issue during suspend/resume when multiple SD hosts
> share the same IRQ:
> 1. Assume there are two hosts (host1 for emmc while host2 for sd) share
> the same mmc irq.
> 2. When system suspend, host2 will be suspended before host1.
> So the sequence is below:
> 	step1: irq handler for host2 removed ->
> 	step2: irq handler for host1 removed and irq disabled ->
> 	... system suspended ...
> 	... system resumed ...
> 	step3: irq enabled and the irq handler for host1 restored ->
> 	step4: irq handler for host2 restored
> 3. So there is the buggy time slot that the irq is enabled but the irq handler
> for host2 is removed. Then host2 interrupt can be triggered but can't be handled
> at that moment.
>
> Signed-off-by: Jialing Fu <jlfu@marvell.com>
> Signed-off-by: Kevin Liu <kliu5@marvell.com>

Thanks, pushed to mmc-next for 3.9.

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

      reply	other threads:[~2013-01-14 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-05  9:18 [PATCH] mmc: sdhci: disable interrupt before free_irq Kevin Liu
2013-01-14 19:41 ` Chris Ball [this message]

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=87sj63sgbq.fsf@laptop.org \
    --to=cjb@laptop.org \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=Haijun.Zhang@freescale.com \
    --cc=aaron.lu@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.stein@systec-electronic.com \
    --cc=chander.kashyap@linaro.com \
    --cc=dsd@laptop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=girish.shivananjappa@linaro.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jh80.chung@samsung.com \
    --cc=johan.rudholm@stericsson.com \
    --cc=kliu5@marvell.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@nvidia.com \
    --cc=sebastian.hesselbarth@googlemail.com \
    --cc=shawn.guo@linaro.org \
    --cc=thomas.abraham@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=zhangfei.gao@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).