]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mmc: sdhci: restore host settings when card is removed
authorAaron Lu <aaron.lu@amd.com>
Fri, 29 Jun 2012 08:17:31 +0000 (16:17 +0800)
committerChris Ball <cjb@laptop.org>
Sun, 22 Jul 2012 19:25:47 +0000 (15:25 -0400)
commitb67c6b411dcf17199e1dfdf18da8b1c6caf73e6e
tree157df99c38f12e04aec8480d468b8fc648b84ac2
parent473b095a72a95ba719905b1f2e82cd18d099a427
mmc: sdhci: restore host settings when card is removed

Some of the host settings are affected by different cards inserted, e.g.
when an UHS-I card is inserted, the SDHCI_NEEDS_RETUING flag might be
set when the tuning timer expired and host's max_blk_count will be
reduced to make sure the data transfer for a command does not exceed 4MiB
to meet the retuning mode 1's requirement.

When the card is removed, we should restore the original setting of the
host since we can't be sure the next card being inserted will still be
an UHS-I card that needs tuning. The original setting include its
max_blk_count and no set of the flag of SDHCI_NEEDS_RETUNING.

Signed-off-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c