All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: Pierre Ossman <drzeus-mmc@drzeus.cx>
Cc: Ben Dooks <ben-linux@fluff.org>, linux-kernel@vger.kernel.org
Subject: Re: MMC: s3cmci: ensure host stopped on machine shutdown
Date: Thu, 17 Jul 2008 16:50:37 +0100	[thread overview]
Message-ID: <20080717155037.GI24620@fluff.org.uk> (raw)
In-Reply-To: <20080717172945.3481eefa@mjolnir.drzeus.cx>

On Thu, Jul 17, 2008 at 05:29:45PM +0200, Pierre Ossman wrote:
> On Thu, 17 Jul 2008 15:32:54 +0100
> Ben Dooks <ben-linux@fluff.org> wrote:
> 
> > Ensure that the s3cmci host controller is turned off
> > when the machine is shutdown, otherwise we end up
> > leaving the card powered and processing insertion and
> > removal events after the system prints "System halted."
> > 
> > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> > 
> > Index: linux-2.6.26-quilt3/drivers/mmc/host/s3cmci.c
> > ===================================================================
> > --- linux-2.6.26-quilt3.orig/drivers/mmc/host/s3cmci.c	2008-07-17 15:15:35.000000000 +0100
> > +++ linux-2.6.26-quilt3/drivers/mmc/host/s3cmci.c	2008-07-17 15:29:23.000000000 +0100
> > @@ -1331,21 +1331,30 @@ static int __devinit s3cmci_probe(struct
> >  	return ret;
> >  }
> >  
> > +static void s3cmci_shutdown(struct platform_device *pdev)
> > +{
> > +	struct mmc_host	*mmc = platform_get_drvdata(pdev);
> > +	struct s3cmci_host *host = mmc_priv(mmc);
> > +
> > +	if (host->irq_cd >= 0)
> > +		free_irq(host->irq_cd, host);
> > +
> > +	mmc_remove_host(mmc);
> > +	clk_disable(host->clk);
> > +}
> > +
> 
> The core can send requests your way until mmc_remove_host() returns so
> you can't remove the interrupt before then.

I'm only removing the card-detect interrupt, the main host one
is not being disabled here.

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

  reply	other threads:[~2008-07-17 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 14:32 MMC: s3cmci: ensure host stopped on machine shutdown Ben Dooks
2008-07-17 15:29 ` Pierre Ossman
2008-07-17 15:50   ` Ben Dooks [this message]
2008-07-17 16:22     ` Pierre Ossman
2008-07-17 18:27       ` Ben Dooks

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=20080717155037.GI24620@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=drzeus-mmc@drzeus.cx \
    --cc=linux-kernel@vger.kernel.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.