mmc: mmc: Fix partition switch timeout for some eMMCs
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 5 May 2016 05:12:28 +0000 (08:12 +0300)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:55 +0000 (10:42 +0200)
commite94c917abb4a6a083eda8831e63907d4c836fd53
tree6abf63766d664a530386831a6548f281a594f545
parent0cf266167e9f1e39bb411a49f1163f488f5a75e8
mmc: mmc: Fix partition switch timeout for some eMMCs

commit 1c447116d017a98c90f8f71c8c5a611e0aa42178 upstream.

Some eMMCs set the partition switch timeout too low.

Now typically eMMCs are considered a critical component (e.g. because
they store the root file system) and consequently are expected to be
reliable.  Thus we can neglect the use case where eMMCs can't switch
reliably and we might want a lower timeout to facilitate speedy
recovery.

Although we could employ a quirk for the cards that are affected (if
we could identify them all), as described above, there is little
benefit to having a low timeout, so instead simply set a minimum
timeout.

The minimum is set to 300ms somewhat arbitrarily - the examples that
have been seen had a timeout of 10ms but were sometimes taking 60-70ms.

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: Willy Tarreau <w@1wt.eu>
drivers/mmc/core/mmc.c