]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 30 Jul 2024 08:41:25 +0000 (10:41 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 11 Aug 2024 07:43:25 +0000 (10:43 +0300)
commitfc2e706f4c5f8c081812a9dde482a96485d55cb8
tree56c64c2cf83ef528165000b32eb4edab247bfc7d
parent681e338ee60f5cde11360c498e9c0cd100133672
hw/sd/sdhci: Reset @data_count index on invalid ADMA transfers

We neglected to clear the @data_count index on ADMA error,
allowing to trigger assertion in sdhci_read_dataport() or
sdhci_write_dataport().

Cc: qemu-stable@nongnu.org
Fixes: d7dfca0807 ("hw/sdhci: introduce standard SD host controller")
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2455
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240730092138.32443-4-philmd@linaro.org>
(cherry picked from commit ed5a159c3de48a581f46de4c8c02b4b295e6c52d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/sd/sdhci.c