From: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
To: Pierre Ossman <drzeus@drzeus.cx>
Cc: Andrew Victor <andrew@sanpeople.com>,
Marc Pignat <marc.pignat@hevs.ch>,
anti.sullin@artecdesign.ee,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Patrice Vilchez <patrice.vilchez@rfo.atmel.com>
Subject: [PATCH] bug in AT91 MCI suspend routines
Date: Thu, 30 Aug 2007 16:15:16 +0200 [thread overview]
Message-ID: <46D6D0F4.3090904@rfo.atmel.com> (raw)
From: Anti Sullin <anti.sullin@artecdesign.ee>
This patch fixes a bug in AT91 mmc host driver, that enables the wakeup
from suspend on card detection pin even if the card detect pin is not
available (==0). If not card detection pin is defined, IRQ0 == FIQ gets
enabled and if some activity is present on that pin, the system gets a
FIQ request, that causes a crash.
Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee>
Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
---
Original patch from Anti Sullin reviewed by Andrew Victor and
Marc Pignat ; thank you to all of you.
drivers/mmc/host/at91_mci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6-snapshot/drivers/mmc/host/at91_mci.c
===================================================================
--- linux-2.6-snapshot.orig/drivers/mmc/host/at91_mci.c
+++ linux-2.6-snapshot/drivers/mmc/host/at91_mci.c
@@ -941,7 +941,7 @@ static int __exit at91_mci_remove(struct
host = mmc_priv(mmc);
- if (host->present != -1) {
+ if (host->board->det_pin) {
device_init_wakeup(&pdev->dev, 0);
free_irq(host->board->det_pin, host);
cancel_delayed_work(&host->mmc->detect);
@@ -972,7 +972,7 @@ static int at91_mci_suspend(struct platf
struct at91mci_host *host = mmc_priv(mmc);
int ret = 0;
- if (device_may_wakeup(&pdev->dev))
+ if (host->board->det_pin && device_may_wakeup(&pdev->dev))
enable_irq_wake(host->board->det_pin);
if (mmc)
@@ -987,7 +987,7 @@ static int at91_mci_resume(struct platfo
struct at91mci_host *host = mmc_priv(mmc);
int ret = 0;
- if (device_may_wakeup(&pdev->dev))
+ if (host->board->det_pin && device_may_wakeup(&pdev->dev))
disable_irq_wake(host->board->det_pin);
if (mmc)
reply other threads:[~2007-08-30 14:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=46D6D0F4.3090904@rfo.atmel.com \
--to=nicolas.ferre@rfo.atmel.com \
--cc=andrew@sanpeople.com \
--cc=anti.sullin@artecdesign.ee \
--cc=drzeus@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.pignat@hevs.ch \
--cc=patrice.vilchez@rfo.atmel.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 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.