]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mmc: sdhci-pci: Fix card detect race for Intel BXT/APL
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 9 Feb 2016 14:12:37 +0000 (16:12 +0200)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:22:57 +0000 (10:22 +0100)
commite85aa5a3f8635be85347406c2123de8f0c720009
treeed8a07203445d9b3138768e8861cf3a67ce62d43
parent92e45e1292b4a736397378178cf8adb6ff416e8f
mmc: sdhci-pci: Fix card detect race for Intel BXT/APL

BugLink: http://bugs.launchpad.net/bugs/1553179
commit 163cbe31e5163459908a41a2b4e0d33a28fd557a upstream.

Intel BXT/APL use a card detect GPIO however the host controller
will not enable bus power unless it's card detect also reflects
the presence of a card.  Unfortunately those 2 things race which
can result in commands not starting, after which the controller
does nothing and there is a 10 second wait for the driver's
10-second timer to timeout.

That is fixed by having the driver look also at the present state
register to determine if the card is present.  Consequently, provide
a 'get_cd' mmc host operation for BXT/APL that does that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/mmc/host/sdhci-pci-core.c