public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq
@ 2012-05-17  2:27 Ming Lei
  2012-05-17 13:56 ` S, Venkatraman
  0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2012-05-17  2:27 UTC (permalink / raw)
  To: Chris Ball, Grant Likely; +Cc: linux-omap, linux-mmc, Ming Lei

The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
otherwise the following failure message should be dumped because
hardware handler is defined as NULL:

[    3.383483] genirq: Threaded irq requested with handler=NULL and
!ONESHOT for irq 368
[    3.392730] omap_hsmmc: probe of omap_hsmmc.0 failed with error -22

The patch fixes one kernel hang bug which is caused by mmc card
probe failure and root device can't be brought up.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 drivers/mmc/host/omap_hsmmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index ebaf62a..9a7a60a 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1981,7 +1981,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
 		ret = request_threaded_irq(mmc_slot(host).card_detect_irq,
 					   NULL,
 					   omap_hsmmc_detect,
-					   IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+					   IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
 					   mmc_hostname(mmc), host);
 		if (ret) {
 			dev_dbg(mmc_dev(host->mmc),
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq
  2012-05-17  2:27 [PATCH -next] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq Ming Lei
@ 2012-05-17 13:56 ` S, Venkatraman
  2012-05-17 14:32   ` Chris Ball
  0 siblings, 1 reply; 3+ messages in thread
From: S, Venkatraman @ 2012-05-17 13:56 UTC (permalink / raw)
  To: Ming Lei; +Cc: Chris Ball, Grant Likely, linux-omap, linux-mmc

On Thu, May 17, 2012 at 7:57 AM, Ming Lei <ming.lei@canonical.com> wrote:
> The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
> otherwise the following failure message should be dumped because
> hardware handler is defined as NULL:
>
> [    3.383483] genirq: Threaded irq requested with handler=NULL and
> !ONESHOT for irq 368
> [    3.392730] omap_hsmmc: probe of omap_hsmmc.0 failed with error -22
>
> The patch fixes one kernel hang bug which is caused by mmc card
> probe failure and root device can't be brought up.
>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
Right thing to do!
Acked-by: Venkatraman S <svenkatr@ti.com>

> ---
>  drivers/mmc/host/omap_hsmmc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index ebaf62a..9a7a60a 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -1981,7 +1981,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
>                ret = request_threaded_irq(mmc_slot(host).card_detect_irq,
>                                           NULL,
>                                           omap_hsmmc_detect,
> -                                          IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> +                                          IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
>                                           mmc_hostname(mmc), host);
>                if (ret) {
>                        dev_dbg(mmc_dev(host->mmc),
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq
  2012-05-17 13:56 ` S, Venkatraman
@ 2012-05-17 14:32   ` Chris Ball
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-05-17 14:32 UTC (permalink / raw)
  To: S, Venkatraman; +Cc: Ming Lei, Grant Likely, linux-omap, linux-mmc

Hi,

On Thu, May 17 2012, S, Venkatraman wrote:
> On Thu, May 17, 2012 at 7:57 AM, Ming Lei <ming.lei@canonical.com> wrote:
>> The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
>> otherwise the following failure message should be dumped because
>> hardware handler is defined as NULL:
>>
>> [    3.383483] genirq: Threaded irq requested with handler=NULL and
>> !ONESHOT for irq 368
>> [    3.392730] omap_hsmmc: probe of omap_hsmmc.0 failed with error -22
>>
>> The patch fixes one kernel hang bug which is caused by mmc card
>> probe failure and root device can't be brought up.
>>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>
> Right thing to do!
> Acked-by: Venkatraman S <svenkatr@ti.com>

Thanks, pushed to mmc-next for 3.5 with a stable@ tag added.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-17 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17  2:27 [PATCH -next] mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irq Ming Lei
2012-05-17 13:56 ` S, Venkatraman
2012-05-17 14:32   ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox