]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 19 May 2022 19:00:30 +0000 (12:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 06:41:19 +0000 (08:41 +0200)
commit327b6689898baa9734ca607939598d78b3cc234b
tree66c9f816c495c999b2fc2bd5fbec53106181996d
parentd471e9e673f76fdbc122649ad68601d10703f63f
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()

commit 533a6cfe08f96a7b5c65e06d20916d552c11b256 upstream

All callers of __mmc_switch() should now be specifying a valid timeout for
the CMD6 command. However, just to be sure, let's print a warning and
default to use the generic_cmd6_time in case the provided timeout_ms
argument is zero.

In this context, let's also simplify some of the corresponding code and
clarify some related comments.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200122142747.5690-4-ulf.hansson@linaro.org
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/core/mmc_ops.c