diff mbox

[2.6.29-rc3] omap_hsmmc: card detect irq bugfix

Message ID 200902041442.04033.david-b@pacbell.net (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

David Brownell Feb. 4, 2009, 10:42 p.m. UTC
From: David Brownell <dbrownell@users.sourceforge.net>

Work around lockdep issue when card detect IRQ handlers run in
thread context ... it forces IRQF_DISABLED, which prevents all
access to twl4030 card detect signals.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 drivers/mmc/host/omap_hsmmc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pierre Ossman Feb. 18, 2009, 5:25 a.m. UTC | #1
On Wed, 4 Feb 2009 14:42:03 -0800
David Brownell <david-b@pacbell.net> wrote:

> From: David Brownell <dbrownell@users.sourceforge.net>
> 
> Work around lockdep issue when card detect IRQ handlers run in
> thread context ... it forces IRQF_DISABLED, which prevents all
> access to twl4030 card detect signals.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---

An ack from eiter Tony or one of the listed authors of this driver
would be nice.

Rgds
Tony Lindgren Feb. 18, 2009, 6:13 a.m. UTC | #2
* Pierre Ossman <drzeus-mmc@drzeus.cx> [090217 21:25]:
> On Wed, 4 Feb 2009 14:42:03 -0800
> David Brownell <david-b@pacbell.net> wrote:
> 
> > From: David Brownell <dbrownell@users.sourceforge.net>
> > 
> > Work around lockdep issue when card detect IRQ handlers run in
> > thread context ... it forces IRQF_DISABLED, which prevents all
> > access to twl4030 card detect signals.
> > 
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > ---
> 
> An ack from eiter Tony or one of the listed authors of this driver
> would be nice.

Here you are:

Acked-by: Tony Lindgren <tony@atomide.com>

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pierre Ossman Feb. 18, 2009, 8:26 p.m. UTC | #3
On Tue, 17 Feb 2009 22:13:59 -0800
Tony Lindgren <tony@atomide.com> wrote:

> * Pierre Ossman <drzeus-mmc@drzeus.cx> [090217 21:25]:
> > On Wed, 4 Feb 2009 14:42:03 -0800
> > David Brownell <david-b@pacbell.net> wrote:
> > 
> > > From: David Brownell <dbrownell@users.sourceforge.net>
> > > 
> > > Work around lockdep issue when card detect IRQ handlers run in
> > > thread context ... it forces IRQF_DISABLED, which prevents all
> > > access to twl4030 card detect signals.
> > > 
> > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > > ---
> > 
> > An ack from eiter Tony or one of the listed authors of this driver
> > would be nice.
> 
> Here you are:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>
> 

Queued. Could you have a look at the other omap_hsmmc patches as well?
And a patch for MAINTAINERS so that I can keep track of who's baby this
is. :)

Rgds
Tony Lindgren Feb. 18, 2009, 10:02 p.m. UTC | #4
* Pierre Ossman <drzeus-mmc@drzeus.cx> [090218 12:27]:
> On Tue, 17 Feb 2009 22:13:59 -0800
> Tony Lindgren <tony@atomide.com> wrote:
> 
> > * Pierre Ossman <drzeus-mmc@drzeus.cx> [090217 21:25]:
> > > On Wed, 4 Feb 2009 14:42:03 -0800
> > > David Brownell <david-b@pacbell.net> wrote:
> > > 
> > > > From: David Brownell <dbrownell@users.sourceforge.net>
> > > > 
> > > > Work around lockdep issue when card detect IRQ handlers run in
> > > > thread context ... it forces IRQF_DISABLED, which prevents all
> > > > access to twl4030 card detect signals.
> > > > 
> > > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > > > ---
> > > 
> > > An ack from eiter Tony or one of the listed authors of this driver
> > > would be nice.
> > 
> > Here you are:
> > 
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > 
> 
> Queued. Could you have a look at the other omap_hsmmc patches as well?
> And a patch for MAINTAINERS so that I can keep track of who's baby this
> is. :)

Thanks. We've been meaning to add some omap maintainers for some time
now, so I'll do a patch that adds an entries to MAINTAINERS for most
omap drivers and will post it to all the associated mailing lists.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -517,6 +517,9 @@  static void mmc_omap_detect(struct work_
 {
 	struct mmc_omap_host *host = container_of(work, struct mmc_omap_host,
 						mmc_carddetect_work);
+	struct omap_mmc_slot_data *slot = &mmc_slot(host);
+
+	host->carddetect = slot->card_detect(slot->card_detect_irq);
 
 	sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
 	if (host->carddetect) {
@@ -538,7 +541,6 @@  static irqreturn_t omap_mmc_cd_handler(i
 {
 	struct mmc_omap_host *host = (struct mmc_omap_host *)dev_id;
 
-	host->carddetect = mmc_slot(host).card_detect(irq);
 	schedule_work(&host->mmc_carddetect_work);
 
 	return IRQ_HANDLED;