mmc-utils: Correctly handle write counter overflow status

The result field of an RPMB frame will have bit 7 set as soon as the
write counter reached its limit (0xffffffff) - even if the operation was
successful. Handle that correctly to avoid false error reports.

This was found and fixed over the RPMB model of QEMU after adjusting it
to expire earlier.

Fixes: c6cb053ec59e ("mmc-utils: RPMB: add support for 4 rpmb operations")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Avri Altman <avri.altman@sandisk.com>
Link: https://lore.kernel.org/r/167acbaa-c61f-4d75-b2b6-9acee22ddee9@siemens.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 file changed