Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1320517
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Haibo Chen <haibo.chen@nxp.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq |
| Date | Thu, 28 Jan 2016 11:20:03 +0100 |
| Message-ID | <qVRQe-1UP-29@gated-at.bofh.it> (permalink) |
| X-Greylist | delayed 1877 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 Jan 2016 05:10:17 EST |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-nxp-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VlocZRMoMZPJXlSRafuP5UQxV4XlJl4EjyBOlCU4V/M=; b=JVfPQADj2fnt6C+dTCCdHA01Ef+0ZruXAGGHAA3jCz0s943F6VXU7F1qFID66rt/cmp45SZXcYLKsfnRgNmajh+ASUpl4AAcuQu2Lj7dfuYiA27IznJUSX5VJIBXVO4LgeXdqb9Wb7eXrlYqaVdkEDshriVW37jdxcYmH6Ocuao= |
| Authentication-Results | spf=none (sender IP is ) smtp.mailfrom=haibo.chen@nxp.com; |
| X-Mailer | git-send-email 1.9.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Originating-IP | [123.151.195.52] |
| X-Clientproxiedby | KL1PR03CA0036.apcprd03.prod.outlook.com (25.165.63.46) To DB3PR04MB0553.eurprd04.prod.outlook.com (25.160.43.25) |
| X-Microsoft-Exchange-Diagnostics | 1;DB3PR04MB0553;2:J+QpOUKntGCfc/yrp3VlbBcxMQ0rZosBd2u4P4azNUgBGYezjjzdZCzgZ2Gbaw7eQk8zGAZdOhhWFHL6YbFrz9XAxRshSaNhWEka8Ac1XUxQNwrsuiTAesy250iCzFQ9omenQLBu6V6YmzsJscXUyQ==;3:Z3FZe0xRn6iehZkrCYslD1eFlIB3gSOPLMd2onS0OjWTKbtsbylTION2EYmQiET/4kES4NU2zwfe/rIreyfa5Xb8Y5x7h92AO2etAlwT8VRy5mxQtrxWeA84Vn6X38eL;25:xDVV6Y7fIuEEdD0lG8cg0hEEAcLQAqedqDR4Teb3C/Z+G44GZ9dCL3A8PuKoAVX2yXfXMTPpI94t9Fzm/gpg3EPhyb25EJjLIj/aDNJd9tl8po/gICT61GM4jaPCfIdltM3DUQe1eC2jqEZSAoEStJkudx6EZvlMAtzJPYxzkSNQcc/163hucBon0Pd2HZPjK3yZC95bd7DuGpZ1qGW3bEuU22uUAHJj1zfFhqoklT/+dLDFSQu9u9bk5l+EbiZt |
| X-Microsoft-Antispam | UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR04MB0553; |
| X-Ms-Office365-Filtering-Correlation-ID | 4525b6d0-ee9b-48dc-768d-08d327c6d794 |
| X-Microsoft-Exchange-Diagnostics | 1;DB3PR04MB0553;20:Sku0av8ewo4s/Y1AjXvBDq7+meRQg5RROXobc/U3aznzUDa/HRRSqCL/ds/fswiLriADLnnKtrsh6uGaxaZFbuOndLQ+xYb7UzoLgrsPS49EONMlpYC4/fYb71GzDBy1XtqlF0IuoGlIVnc/EwWvuGcrr9YHNGa66B+PAtg9jJDyjTwp0/0CCkQIjhEmvzoLCCW2IzqEhMZZlBoghpvrOZNKy9mSm+HSkg2pkkrp998SpspZ3fpIx9BjBRLlTp+pIa9T7HSlU2xq7U/cMni/C2lxKrKfi0SrLX0Lyg73vgYccWTYzsrT/yJOR6mU/2K0fOcD3RWCk5SpIZghiujBQYPEkrxADd8ITgx1WLYvjA3zc+x6dZFb4vL/hDIE6/gtuErqAQraS0QQNozLBmm/q7ObQJbKf+SOLPEmnBs0u29AMwAjvuMAulq8TX4GuWML6leFjWfEQVvfGQVDIHR+uV2NAR2M6Vxzxiqp8pFVpijAvzwdtmd/AcNlsPPHWjr4;4:/0ZBGN8b32QqLCvF5toickC3gWAI3zfJzbc6dnaS4du3iadhmrn32YbbF35RX7+Temeyg0DMP1SiRyw2A7qI4eSE14UToePkZkHn//lqBpCsYFQKbJviH05H/QMAZSv3u8oi+zE+MyL+9FmM5VzcPr1gTIgPMSeKGTbu/ik9ekyQRP5Pg1Y3ZyU1Ml0J/S9il3POdMUNlba8/PD3cO7mSvHeGj5lEW60n2Vp1CCamRp8uTo77Mw0S77eoAVrJDFHoi1+Lv1a+qb7s+8ISUdA3AKirKfpvSbCo6m7wVLWBb4n8lqqcpNGoKOoYy/iU+AiGd6crvEChhQzVZei/jyVhM2NK5YpRToqflsm9w3nEqgBiTB1ShNqsLy80I9bwUY3dw6bKlygbZr2L/yCCpYfHhesfNPmueN/GCK90LMKtOM= |
| X-Microsoft-Antispam-Prvs | <DB3PR04MB05531BE6D7F8992150C4F12590DA0@DB3PR04MB0553.eurprd04.prod.outlook.com> |
| X-Exchange-Antispam-Report-Test | UriScan:(185117386973197); |
| X-Exchange-Antispam-Report-Cfa-Test | BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:DB3PR04MB0553;BCL:0;PCL:0;RULEID:;SRVR:DB3PR04MB0553; |
| X-Forefront-Prvs | 083526BF8A |
| X-Forefront-Antispam-Report | SFV:NSPM;SFS:(10009020)(6009001)(189002)(199003)(50226001)(5008740100001)(101416001)(33646002)(122386002)(36756003)(3470700001)(3846002)(6116002)(40100003)(1096002)(92566002)(586003)(48376002)(4326007)(2906002)(42186005)(50986999)(110136002)(19580395003)(19580405001)(97736004)(2351001)(47776003)(81156007)(87976001)(50466002)(5001960100002)(86362001)(106356001)(229853001)(189998001)(105586002)(66066001)(5003940100001)(77096005)(5004730100002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR04MB0553;H:b51421-server.ap.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; |
| Received-Spf | None (protection.outlook.com: nxp.com does not designate permitted sender hosts) |
| X-Microsoft-Exch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2/hzl14y3WfnQCtjQRc18= |
| X-Microsoft-Exchange-Diagnostics | 1;DB3PR04MB0553;5:iLGJwb1O1ycIwmcTgnKDSaBt3R7IfHc4LJC7sFBQydvY4+dKlt07AnrkMjonkpVNsSVvS3isKOaWGOfAzaMGhFI3Stu21lqLH4TCUaB+liJlLMVaTNUoA070uAHMp03TrpiP4teRVXd4eJ9VSfrJAA==;24:XlqYYAELyom0/GPj4LlT8BQbvWSpH/UVH8junc2deQE9zIIMYL9TzjNb4g13IlQiA/7/ATEYLsv40jvvUkJiLh1CjESQ0u+yd4/X8asDSpk= |
| Spamdiagnosticoutput | 1:23 |
| Spamdiagnosticmetadata | NSPM |
| X-Originatororg | nxp.com |
| X-Ms-Exchange-Crosstenant-Originalarrivaltime | 28 Jan 2016 09:38:53.0085 (UTC) |
| X-Ms-Exchange-Crosstenant-Fromentityheader | Hosted |
| X-Ms-Exchange-Transport-Crosstenantheadersstamped | DB3PR04MB0553 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 83 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <rmk+kernel@arm.linux.org.uk>, <haibo.chen@nxp.com>, <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org> |
| X-Original-Date | Thu, 28 Jan 2016 17:42:26 +0800 |
| X-Original-Message-ID | <1453974146-20951-1-git-send-email-haibo.chen@nxp.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1320517 |
Show key headers only | View raw
Currently sdhci driver free irq in host suspend, and call
request_threaded_irq() in host resume. But during host resume,
Ctrl+C can impact sdhci host resume, see the error log:
CPU1 is up
PM: noirq resume of devices complete after 0.637 msecs imx-sdma 30bd0000.sdma: loaded firmware 4.1
PM: early resume of devices complete after 0.774 msecs
dpm_run_callback(): platform_pm_resume+0x0/0x44 returns -4
PM: Device 30b40000.usdhc failed to resume: error -4
dpm_run_callback(): platform_pm_resume+0x0/0x44 returns -4
PM: Device 30b50000.usdhc failed to resume: error -4
dpm_run_callback(): platform_pm_resume+0x0/0x44 returns -4
PM: Device 30b60000.usdhc failed to resume: error -4 fec 30be0000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
mmc0: Timeout waiting for hardware interrupt.
mmc0: Timeout waiting for hardware interrupt.
mmc0: Timeout waiting for hardware interrupt.
mmc0: Timeout waiting for hardware interrupt.
mmc0: Timeout waiting for hardware interrupt.
mmc0: Timeout waiting for hardware interrupt.
mmc0: error -110 during resume (card was removed?)
mmc2: Timeout waiting for hardware interrupt.
mmc2: Timeout waiting for hardware interrupt.
mmc2: error -110 during resume (card was removed?)
In request_threaded_irq-> __setup_irq-> kthread_create
->kthread_create_on_node, the comment shows that SIGKILLed will
impact the kthread create, and return -EINTR.
This patch replace them with disable|enable_irq(), that will prevent
IRQs from being propagated to the sdhci driver.
Fixes: 781e989cf593 ("mmc: sdhci: convert to new SDIO IRQ handling")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
drivers/mmc/host/sdhci.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d622435..4b1646b 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2686,7 +2686,7 @@ int sdhci_suspend_host(struct sdhci_host *host)
host->ier = 0;
sdhci_writel(host, 0, SDHCI_INT_ENABLE);
sdhci_writel(host, 0, SDHCI_SIGNAL_ENABLE);
- free_irq(host->irq, host);
+ disable_irq(host->irq);
} else {
sdhci_enable_irq_wakeups(host);
enable_irq_wake(host->irq);
@@ -2698,8 +2698,6 @@ EXPORT_SYMBOL_GPL(sdhci_suspend_host);
int sdhci_resume_host(struct sdhci_host *host)
{
- int ret = 0;
-
if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
if (host->ops->enable_dma)
host->ops->enable_dma(host);
@@ -2718,11 +2716,7 @@ int sdhci_resume_host(struct sdhci_host *host)
}
if (!device_may_wakeup(mmc_dev(host->mmc))) {
- ret = request_threaded_irq(host->irq, sdhci_irq,
- sdhci_thread_irq, IRQF_SHARED,
- mmc_hostname(host->mmc), host);
- if (ret)
- return ret;
+ enable_irq(host->irq);
} else {
sdhci_disable_irq_wakeups(host);
disable_irq_wake(host->irq);
@@ -2730,7 +2724,7 @@ int sdhci_resume_host(struct sdhci_host *host)
sdhci_enable_card_detection(host);
- return ret;
+ return 0;
}
EXPORT_SYMBOL_GPL(sdhci_resume_host);
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Haibo Chen <haibo.chen@nxp.com> - 2016-01-28 11:20 +0100
Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-28 11:30 +0100
Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Ulf Hansson <ulf.hansson@linaro.org> - 2016-01-28 16:50 +0100
Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Thomas Gleixner <tglx@linutronix.de> - 2016-01-28 17:30 +0100
Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Thomas Gleixner <tglx@linutronix.de> - 2016-01-28 17:30 +0100
Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-28 17:40 +0100
csiph-web