]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Re-work the code for eMMC sanitize
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Mar 2020 15:21:52 +0000 (16:21 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 26 Mar 2020 13:45:31 +0000 (14:45 +0100)
commit890a63a56353604a67e43f12bd5d570bb1f378bd
tree399ca5d6f5ccc6a06eb229b81f8fcc28f9c82817
parent3892e08426c04a3c95972a176e18da0b3ea7ac97
mmc: core: Re-work the code for eMMC sanitize

The error path for sanitize operations that completes with -ETIMEDOUT, is
tightly coupled with the internal request handling code of the core. More
precisely, mmc_wait_for_req_done() checks for specific sanitize errors.
This is not only inefficient as it affects all types of requests, but also
hackish.

Therefore, let's improve the behaviour by moving the error path out of the
mmc core. To do that, retuning needs to be held while running the sanitize
operation.

Moreover, to avoid exporting unnecessary symbols to the mmc block module,
let's move the code into the mmc_ops.c file. While updating the actual
code, let's also take the opportunity to clean up some of the mess around
it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200316152152.15122-1-ulf.hansson@linaro.org
drivers/mmc/core/block.c
drivers/mmc/core/core.c
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h
include/linux/mmc/core.h