public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Haibo Chen <haibo.chen@nxp.com>
Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq
Date: Thu, 28 Jan 2016 10:20:57 +0000	[thread overview]
Message-ID: <20160128102057.GJ10826@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1453974146-20951-1-git-send-email-haibo.chen@nxp.com>

On Thu, Jan 28, 2016 at 05:42:26PM +0800, Haibo Chen wrote:
> 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:

Ctrl+C should have no effect on this - that seems to imply that there's
some other bug elsewhere.

> 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);

This is really not acceptable I'm afraid.  While it's common on ARM for
each interrupt to be uniquely allocated to a peripheral, not all SDHCI
platforms have that luxury.

SDHCI is also used on PCI, and on x86 platforms, it's common to have PCI
interrupts shared between (sometimes many) different PCI devices.

For example, on my laptop:

 18:    1089806     286185   IO-APIC-fasteoi   uhci_hcd:usb8, r852, mmc0

the SDHCI interrupt is shared with two other peripherals - one USB
controller and a NAND device.

Disabling the interrupt will adversely impact other peripherals and
cause regressions where the interrupt is shared.

So, I'm afraid I'm going to have to NAK this patch.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2016-01-28 10:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28  9:42 [PATCH] mmc: sdhci: disable irq in sdhci host suspend ranther than free this irq Haibo Chen
2016-01-28 10:20 ` Russell King - ARM Linux [this message]
2016-01-28 15:47   ` Ulf Hansson
2016-01-28 16:21     ` Thomas Gleixner
2016-01-28 16:27       ` Thomas Gleixner
2017-12-27  2:54         ` Peng Fan
2021-06-11 14:22           ` Martin Kaiser
2016-01-28 16:38     ` Russell King - ARM Linux

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=20160128102057.GJ10826@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=haibo.chen@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox