]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: Set pref erase size based on size
authorGwendal Grignou <gwendal@chromium.org>
Fri, 3 Jun 2016 16:08:52 +0000 (09:08 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:11 +0000 (10:34 +0200)
commit34236c2224625403f4314de9cee8acfb1ff507a4
tree0f5a98a4eac903286a60ab680d143e444b857067
parent10e0deed09c11b3386c6f49109330f4129d65e13
mmc: Set pref erase size based on size

If available, eMMC stack uses HC_ERASE_GRP_SIZE as the preferred erase
size. As some high capacity eMMC (64MB) reports this size to 512kB, the
discard operations end up taking very long time.

Improve the behaviour by instead calculating the preferred erase size
based on the eMMC size. In this way the discard operations becomes faster.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
[Ulf: Updated changelog and improved comment in code]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c