lkml.org 
[lkml]   [2017]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4.4 42/76] mmc: sdhci: Do not disable interrupts while waiting for clock
From
Date
On Tue, 2017-03-28 at 14:30 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Adrian Hunter <adrian.hunter@intel.com>
>
> commit e2ebfb2142acefecc2496e71360f50d25726040b upstream.
>
> Disabling interrupts for even a millisecond can cause problems for some
> devices. That can happen when sdhci changes clock frequency because it
> waits for the clock to become stable under a spin lock.
>
> The spin lock is not necessary here. Anything that is racing with changes
> to the I/O state is already broken. The mmc core already provides
> synchronization via "claiming" the host.
[...]

In mainline, drivers/mmc/host/sdhci-of-at91.c has a slightly different
version of this code that seems to have the same issue. In 4.4 there's
another (conditional) mdelay(1) further up this function that seems to
be related to that hardware, and probably ought to have an unlock/lock
around it.

Ben.

--
Ben Hutchings
Software Developer, Codethink Ltd.


\
 
 \ /
  Last update: 2017-04-04 18:51    [W:1.987 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site