]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: mmci: stm32: fix max busy timeout calculation
authorChristophe Kerello <christophe.kerello@foss.st.com>
Tue, 13 Jun 2023 13:41:46 +0000 (15:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:14:08 +0000 (11:14 +0200)
commitcd87d9caef83d19fe4965f6f6caf067bf4b88db7
tree9713a152961c74adbeb42fe9d811a4766bd3e5f3
parente85d0e750b3ac89c4530cfa6dc85b38ae0ce565f
mmc: mmci: stm32: fix max busy timeout calculation

commit 47b3ad6b7842f49d374a01b054a4b1461a621bdc 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: 8266c585f489 ("mmc: mmci: add hardware busy timeout feature")
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Signed-off-by: Christophe 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: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/mmci.c