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
F83265322: D26925.id78681.diff
Wed, May 8, 4:28 AM
Unknown Object (File)
Thu, May 2, 1:16 PM
Unknown Object (File)
Thu, May 2, 1:08 PM
Unknown Object (File)
Thu, May 2, 11:21 AM
Unknown Object (File)
Thu, May 2, 11:19 AM
Unknown Object (File)
Thu, May 2, 10:54 AM
Unknown Object (File)
Thu, May 2, 7:58 AM
Unknown Object (File)
Mon, Apr 29, 1:39 PM
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.