Page MenuHomeFreeBSD

Always return MMC errors from mmc_handle_reply()
ClosedPublic

Authored by kibab on Oct 24 2020, 11:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 12:00 PM
Unknown Object (File)
Nov 13 2024, 3:30 PM
Unknown Object (File)
Nov 3 2024, 1:43 PM
Unknown Object (File)
Oct 31 2024, 2:26 PM
Unknown Object (File)
Oct 31 2024, 2:26 PM
Unknown Object (File)
Oct 31 2024, 2:06 PM
Unknown Object (File)
Sep 26 2024, 9:07 PM
Unknown Object (File)
Sep 21 2024, 8:23 AM
Subscribers
None

Details

Summary

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).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/cam/mmc/mmc_da.c
255 ↗(On Diff #78681)

Should this '0' be spelled 'MMC_ERR_NONE'?

kibab marked an inline comment as done.Nov 3 2020, 8:07 AM
kibab added inline comments.
sys/cam/mmc/mmc_da.c
255 ↗(On Diff #78681)

Yes. here and below.

kibab marked an inline comment as done.
  • Address reviewer comments
This revision is now accepted and ready to land.Nov 3 2020, 8:14 AM
This revision was automatically updated to reflect the committed changes.