Skip to content
Commit 1fae817d authored by Ulf Hansson's avatar Ulf Hansson Committed by Greg Kroah-Hartman
Browse files

mmc: core: Fix error propagation for some ioctl commands



[ Upstream commit f19c5a73 ]

Userspace has currently no way of checking the internal R1 response error
bits for some commands. This is a problem for some commands, like RPMB for
example. Typically, we may detect that the busy completion has successfully
ended, while in fact the card did not complete the requested operation.

To fix the problem, let's always poll with CMD13 for these commands and
during the polling, let's also aggregate the R1 response bits. Before
completing the ioctl request, let's propagate the R1 response bits too.

Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Co-developed-by: default avatarChristian Loehle <christian.loehle@arm.com>
Signed-off-by: default avatarChristian Loehle <christian.loehle@arm.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230913112921.553019-1-ulf.hansson@linaro.org


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 719c01f2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment