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)
Dec 18 2023, 7:40 AM
Unknown Object (File)
Nov 6 2023, 12:31 AM
Unknown Object (File)
Oct 7 2023, 11:36 AM
Unknown Object (File)
Oct 4 2023, 11:31 PM
Unknown Object (File)
Sep 3 2023, 3:48 AM
Unknown Object (File)
Sep 3 2023, 3:48 AM
Unknown Object (File)
Sep 3 2023, 3:47 AM
Unknown Object (File)
Sep 3 2023, 3:46 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34593
Build 31684: arc lint + arc unit

Event Timeline

sys/cam/mmc/mmc_da.c
254

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
254

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.