Commit 2f509a81 authored by Christophe Kerello's avatar Christophe Kerello Committed by sanglipeng
Browse files

mmc: mmci: stm32: fix max busy timeout calculation

stable inclusion
from stable-v5.10.186
commit 2e454015ca273a794e9311b4eda7b9659b09ad0d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8L5XP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2e454015ca273a794e9311b4eda7b9659b09ad0d



--------------------------------

commit 47b3ad6b upstream.

The way that the timeout is currently calculated could lead to a u64
timeout value in mmci_start_command(). This value is then cast in a u32
register that leads to mmc erase failed issue with some SD cards.

Fixes: 8266c585 ("mmc: mmci: add hardware busy timeout feature")
Signed-off-by: default avatarYann Gautier <yann.gautier@foss.st.com>
Signed-off-by: default avatarChristophe Kerello <christophe.kerello@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230613134146.418016-1-yann.gautier@foss.st.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 26b22d12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment