public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Holger Schurig <holgerschurig@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Fabio Estevam <festevam@gmail.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>,
	open list <linux-kernel@vger.kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Dong Aisheng <b29396@freescale.com>
Subject: Re: SDHCI: mdelay() in hot path in esdhc_pltfm_set_clock looses CAN (!) frames
Date: Wed, 8 Jul 2015 08:43:04 +0200	[thread overview]
Message-ID: <20150708064304.GB18700@pengutronix.de> (raw)
In-Reply-To: <CAOpc7mGgD1c4BW1DXEEZQ06njQO6tgUKi0ssAGyL4SJXajDRGw@mail.gmail.com>

On Wed, Jul 08, 2015 at 08:22:57AM +0200, Holger Schurig wrote:
> Wow, at last some reaction. And I thought nobody cares ...
> 
> BTW, removing CONFIG_MMC_CLKGATE helped a bit, because the pointless
> clock-off-clock-on while the device is booting (or accessing multiple
> sectors within a short time) isn't going to happen anymore.
> 
> But really, a mdelay(1) in a driver ...

Look for the other mdelays in sdhci.c. There are up to a hundred of
them in sdhci_reset() which is called under a spin_lock_irqsave. I
remember that with the wrong type of card detection the MMC core
frequently polls for a card and if none is found the sdhci core was
resetted which falls into this mdelay polling loop in sdhci_reset. So if
you care about realtime you better have a card inserted...

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2015-07-08  6:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 13:43 SDHCI: mdelay() in hot path in esdhc_pltfm_set_clock looses CAN (!) frames Holger Schurig
2015-07-07 18:17 ` Fabio Estevam
2015-07-07 20:52   ` Russell King - ARM Linux
2015-07-08  6:22     ` Holger Schurig
2015-07-08  6:43       ` Sascha Hauer [this message]

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=20150708064304.GB18700@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=b29396@freescale.com \
    --cc=chris@printf.net \
    --cc=festevam@gmail.com \
    --cc=holgerschurig@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --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