]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mmc: sdhci: Fix override of timeout clk wrt max_busy_timeout
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 7 Mar 2016 11:33:55 +0000 (13:33 +0200)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 12:53:41 +0000 (06:53 -0600)
commit265945470d644f8e07039a27a87e34b5c0cc18d5
treef719d043a26fef35022780ac78e9d74fa17964d3
parentbf4b6e1fee0b12f4e9e404900dd1dcf80d60114a
mmc: sdhci: Fix override of timeout clk wrt max_busy_timeout

BugLink: http://bugs.launchpad.net/bugs/1572722
commit 995136247915c5cee633d55ba23f6eebf67aa567 upstream.

Normally the timeout clock frequency is read from the capabilities
register.  It is also possible to set the value prior to calling
sdhci_add_host() in which case that value will override the
capabilities register value.  However that was being done after
calculating max_busy_timeout so that max_busy_timeout was being
calculated using the wrong value of timeout_clk.

Fix that by moving the override before max_busy_timeout is
calculated.

The result is that the max_busy_timeout and max_discard
increase for BSW devices so that, for example, the time for
mkfs.ext4 on a 64GB eMMC drops from about 1 minute 40 seconds
to about 20 seconds.

Note, in the future, the capabilities setting will be tidied up
and this override won't be used anymore.  However this fix is
needed for stable.

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.c