]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Always return MMC errors from mmc_handle_reply()
authorIlya Bakulin <kibab@FreeBSD.org>
Tue, 3 Nov 2020 21:38:59 +0000 (21:38 +0000)
committerIlya Bakulin <kibab@FreeBSD.org>
Tue, 3 Nov 2020 21:38:59 +0000 (21:38 +0000)
commitb6b885c4fe3163afa3ae0e73d819e795f0c4ac2a
treed0c5977fc62eb83dccc9a3160d912e0e0b68ee04
parent07bab4417d0e08bed86f48dea6d0c68f496b456c
Always return MMC errors from mmc_handle_reply()

There are two ways to propagate the error in MMCCAM:
 * Using cmd.error which is set by the peripheral driver;
 * Using CCB status which is... also set by the driver.

The problem is that those two error conditions don't necessarily match.
This leads to the confusion when handling the MMC reply. So enforce the consistency
by panicking if request is marked as completed successfully but MMC-level error
is present (this hints to the programming error).

Reviewed by: manu
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D26925
sys/cam/mmc/mmc_da.c